From 43c2f9bf808abff48e426145204cc2847e4475df Mon Sep 17 00:00:00 2001 From: Luke Carl Hartman Date: Fri, 18 Mar 2022 18:22:39 -0700 Subject: [PATCH 01/32] wp_editor a dded but small bugs --- .gitignore | 1 + gulpfile.js | 4 +- includes/class-enp_quiz-question.php | 2 + .../partials/quiz-create-question.php | 118 ++++++++++-------- 4 files changed, 73 insertions(+), 52 deletions(-) diff --git a/.gitignore b/.gitignore index 4d7a2e1a..f25a4c32 100755 --- a/.gitignore +++ b/.gitignore @@ -6,3 +6,4 @@ .sass-cache node_modules/* bower_components/* +.vscode/launch.json diff --git a/gulpfile.js b/gulpfile.js index 54a13ee4..f399a60f 100644 --- a/gulpfile.js +++ b/gulpfile.js @@ -16,8 +16,8 @@ var reload = browserSync.reload; gulp.task('serve', ['sassQuizTake', 'sassQuizCreate', 'quizCreateJS', 'quizDashboardJS', 'quizResultsJS', 'quizTakeJS', 'quizTakeIframeParentJS', 'quizTakeUtilityJS'], function() { browserSync({ - proxy: "https://quiz.test" - }); + proxy: "localhost:10044", + }); // quiz create gulp.watch('public/quiz-create/css/sass/*.{scss,sass}', ['sassQuizCreate']); diff --git a/includes/class-enp_quiz-question.php b/includes/class-enp_quiz-question.php index 1a571c71..64600665 100644 --- a/includes/class-enp_quiz-question.php +++ b/includes/class-enp_quiz-question.php @@ -488,6 +488,8 @@ public function get_question_type() { */ public function get_question_explanation() { $question_explanation = $this->question_explanation; + // ? TODO: perfect the target attribute add. kindof buggy. + $question_explanation = preg_replace('/(<]*)>/i', '$1 target="_blank">', $question_explanation); return $question_explanation; } diff --git a/public/quiz-create/templates/partials/quiz-create-question.php b/public/quiz-create/templates/partials/quiz-create-question.php index 1a636556..dad6446a 100644 --- a/public/quiz-create/templates/partials/quiz-create-question.php +++ b/public/quiz-create/templates/partials/quiz-create-question.php @@ -1,66 +1,84 @@ get_question_image(); + $question_image = $question->get_question_image(); ?> -
- - +
+ + - get_question_delete_button($question_id); - - if(isset($question_ids)) : ?> -
- get_question_move_button($question_id, $question_i, 'up', $question_ids); - echo $Quiz_create->get_question_move_button($question_id, $question_i, 'down', $question_ids); - ?> -
- + get_question_delete_button( $question_id ); + if ( isset( $question_ids ) ) : + ?> +
+ get_question_move_button( $question_id, $question_i, 'up', $question_ids ); + echo $Quiz_create->get_question_move_button( $question_id, $question_i, 'down', $question_ids ); + ?> +
+ - +
+ + -
- - + - + get_question_image_template( $question, $question_id, $question_i, $question_image ); + ?> - get_question_image_template($question, $question_id, $question_i, $question_image); - ?> +

Question Type

-

Question Type

+ get_question_type_input( $question, $question_id, $question_i ); - get_question_type_input($question, $question_id, $question_i); + require ENP_QUIZ_CREATE_TEMPLATES_PATH . '/partials/quiz-create-mc.php'; + $slider_id = $question->get_slider(); + $slider = new Enp_quiz_Slider( $slider_id ); + // don't add slider in for our js question_template + if ( $slider_id !== '' ) { + include ENP_QUIZ_CREATE_TEMPLATES_PATH . '/partials/quiz-create-slider.php'; + } - include(ENP_QUIZ_CREATE_TEMPLATES_PATH.'/partials/quiz-create-mc.php'); + ?> +
- $slider_id = $question->get_slider(); - $slider = new Enp_quiz_Slider($slider_id); - // don't add slider in for our js question_template - if($slider_id !== '') { - include(ENP_QUIZ_CREATE_TEMPLATES_PATH.'/partials/quiz-create-slider.php'); - } - - ?> -
- -
-
- - -
-
+
+
+ + 1 question added the toolbar wont show, user has to save & refresh or preview + if ( $question_i < 1 ) { // ? prevent json error for $question_id with {{}}'s + $question_id = 0; + } + $input = $question->get_question_explanation(); + $editor_id = "enp-question-explanation__$question_id"; + $editor_name = 'enp_question[' . $question_i . '][question_explanation]'; + $settings = array( + 'textarea_name' => $editor_name, + 'media_buttons' => false, // ? no media upload option + 'tinymce' => array( + 'toolbar1' => 'link,unlink', // ? limit what shows on the toolbar + 'toolbar2' => '', + 'toolbar3' => '', + ), + ); + wp_editor( $input, $editor_id, $settings ); + ?> +
+
+ From 73898b215269ae7701419b637588fd4070e2bf1e Mon Sep 17 00:00:00 2001 From: Luke Carl Hartman Date: Wed, 20 Apr 2022 11:49:33 -0700 Subject: [PATCH 02/32] blue and red color & border radius on form elements --- .../quiz-create/css/enp_quiz-create.min.css | 2 +- public/quiz-create/css/sass/_base.scss | 4 ++ public/quiz-create/css/sass/_quiz-create.scss | 5 ++ public/quiz-create/css/sass/_utilities.scss | 8 ++- public/quiz-create/css/sass/_variables.scss | 8 +-- .../templates/partials/quiz-share.php | 54 +++++++++++------ public/quiz-create/templates/quiz-create.php | 58 +++++++++---------- public/quiz-take/css/enp_quiz-take.min.css | 2 +- public/quiz-take/css/sass/_setup.scss | 1 + 9 files changed, 85 insertions(+), 57 deletions(-) diff --git a/public/quiz-create/css/enp_quiz-create.min.css b/public/quiz-create/css/enp_quiz-create.min.css index 1bccb99a..7e8c5f78 100644 --- a/public/quiz-create/css/enp_quiz-create.min.css +++ b/public/quiz-create/css/enp_quiz-create.min.css @@ -1 +1 @@ -html{font-size:1pc!important}html #enp-quiz{box-sizing:border-box}body #enp-quiz{background:#fff;overflow:hidden}#enp-quiz *,#enp-quiz *:after,#enp-quiz *:before{box-sizing:inherit}#enp-quiz ol,#enp-quiz ul{margin:0 0 1.6rem 1.25rem;padding:0}#enp-quiz textarea{margin-bottom:1rem}#enp-quiz button,#enp-quiz button:active,#enp-quiz button:focus,#enp-quiz button:hover,#enp-quiz iframe,#enp-quiz input[type=button],#enp-quiz input[type=button]:active,#enp-quiz input[type=button]:focus,#enp-quiz input[type=button]:hover,#enp-quiz input[type=reset],#enp-quiz input[type=reset]:active,#enp-quiz input[type=reset]:focus,#enp-quiz input[type=reset]:hover,#enp-quiz input[type=submit],#enp-quiz input[type=submit]:active,#enp-quiz input[type=submit]:focus,#enp-quiz input[type=submit]:hover{border:0}#enp-quiz .enp-screen-reader-text{clip:rect(1px,1px,1px,1px);height:1px;left:-625pc;overflow:hidden;position:absolute!important;top:auto;width:1px}#enp-quiz .enp-screen-reader-text:active,#enp-quiz .enp-screen-reader-text:focus,#enp-quiz .enp-screen-reader-text:hover{background-color:#f1f1f1;border-radius:3px;box-shadow:0 0 2px 2px rgba(0,0,0,.6);clip:auto!important;color:#21759b;display:block;font-size:14px;font-weight:700;height:auto;left:5px;line-height:normal;padding:15px 23px 14px;text-decoration:none;top:5px;width:auto;z-index:100000}#enp-quiz .enp-accordion-header{background:#fff;border:0;border-radius:0;box-shadow:inset 1px 1px 0 #ccc,inset -1px -1px 0 #ccc;color:#444;cursor:pointer;font-family:tablet-gothic,helvetica neue,helvetica,arial,sans-serif;font-size:.9rem;font-weight:400;letter-spacing:0;line-height:1.5;margin:1.6rem 0 0;min-height:3.065rem;padding:1rem 2rem 1rem 1rem;position:relative;text-align:left;text-transform:none;transition:all .2s cubic-bezier(0,0,.3,1);width:100%;z-index:9}#enp-quiz .enp-accordion-header:first-of-type{margin-top:0}#enp-quiz .enp-accordion-header .enp-accordion-header__icon{bottom:.75rem;fill:#666;position:absolute;right:.75rem;transition:all .35s cubic-bezier(0,0,.3,1)}#enp-quiz .enp-accordion-header--open .enp-accordion-header__icon{-webkit-transform:rotatex(180deg) translatey(2px);transform:rotatex(180deg) translatey(2px)}#enp-quiz .enp-accordion-content{background:#fff;box-shadow:inset 1px -1px 0 #ccc,inset -1px -1px 0 #ccc;display:block;height:auto;margin-bottom:1.6rem;overflow:visible;position:relative;width:100%}#enp-quiz .enp-accordion-content--closed{-webkit-animation:slideOutTop .25s cubic-bezier(0,0,.3,1) forwards;animation:slideOutTop .25s cubic-bezier(0,0,.3,1) forwards;display:none;margin-top:0;padding-top:0}#enp-quiz .enp-accordion-content--open{-webkit-animation:slideInTop .45s cubic-bezier(0,0,.3,1) forwards;animation:slideInTop .45s cubic-bezier(0,0,.3,1) forwards;margin-bottom:2rem;padding-top:1.6rem}#enp-quiz .enp-quiz-message{background:#fff;border:1px solid #eee;border-bottom:1px solid #ccc;margin-bottom:1.6rem;margin-left:auto;margin-right:auto;max-width:32pc;padding:1rem .375rem;position:relative}#enp-quiz .enp-quiz-message:after{clear:both;content:"";display:table}#enp-quiz .enp-quiz-message__title{font-size:.85rem;text-transform:uppercase}#enp-quiz .enp-message__list{font-size:1.1rem;list-style:none;margin-bottom:0;margin-left:0}#enp-quiz .enp-quiz-message--error{border-left:6px solid #f14021;color:#db2c0e}#enp-quiz .enp-quiz-message__title--error{color:#db2c0e}#enp-quiz .enp-quiz-message--success{border-left:6px solid #3bb275;color:#319461}#enp-quiz .enp-quiz-message__title--success{color:#319461}#enp-quiz .enp-quiz-message--note{border-left:6px solid #cca562}#enp-quiz .enp-quiz-message__title--note{color:#242f42}#enp-quiz .enp-quiz-message__close{background:0;border:0;box-shadow:none;margin:0;padding:0;position:absolute;right:5px;top:5px}#enp-quiz .enp-quiz-message--ajax{-webkit-animation:slideInBottom .3s;animation:slideInBottom .3s;margin-bottom:.6rem}#enp-quiz .enp-quiz-message-ajax-container{bottom:10px;position:fixed;z-index:9999}#enp-quiz .enp-quiz-message--saving__spinner{margin-left:-10px}#enp-quiz .enp-quiz-message--saving__text{font-size:1rem}#enp-quiz input.limited-chars,#enp-quiz textarea.limited-chars{margin-bottom:.2rem}#enp-quiz .limited-chars__container{color:#7a7a7a;display:block;font-size:.8rem;margin-bottom:1.2rem;text-align:right}#enp-quiz .limited-chars__counter{color:#666}#enp-quiz .limited-chars__container--error,#enp-quiz .limited-chars__container--error .limited-chars__counter{color:#db2c0e}#enp-quiz input.has-error,#enp-quiz textarea.has-error{border:1px solid #f14021}#enp-quiz input.has-error:focus,#enp-quiz textarea.has-error:focus{outline-color:#f14021}#enp-quiz .enp-tooltip{position:relative}#enp-quiz .enp-tooltip__activator:focus+.enp-tooltip__description,#enp-quiz .enp-tooltip__activator:focus>.enp-tooltip__description{display:block}#enp-quiz .enp-tooltip__description{background:#f5f5f5;border-radius:3px;display:none;font-size:.9rem;left:103%;margin-bottom:2rem;max-width:200px;padding:.9rem;position:absolute}.enp-sticky{left:0;position:relative;right:0;top:0;z-index:999}.enp-sticky.enp-sticky--fixed{position:fixed}.enp-breadcrumb-link{font-size:.85rem}.enp-breadcrumb-link__icon{left:.4rem;position:relative;top:.45rem}body #enp-quiz{color:#444;font-family:tablet-gothic,helvetica neue,helvetica,arial,sans-serif;font-size:1em;font-weight:400;line-height:1.6}@media(min-width:700px){body #enp-quiz{font-size:1.3em}}#enp-quiz h1,#enp-quiz h2,#enp-quiz h3,#enp-quiz h4,#enp-quiz h5,#enp-quiz h6{clear:both;color:#5d5e5f;font-family:tablet-gothic,helvetica neue,helvetica,arial,sans-serif;font-weight:700;line-height:1.2em;margin:0 0 .2rem}#enp-quiz h1{font-size:2em}#enp-quiz h2{font-size:1.75em}#enp-quiz h3{font-size:1.475em}#enp-quiz h4{font-size:1.3em}#enp-quiz h5{font-size:1.125em}#enp-quiz h6{font-size:1em}#enp-quiz p+h1,#enp-quiz p+h2,#enp-quiz p+h3,#enp-quiz p+h4,#enp-quiz p+h5,#enp-quiz p+h6,#enp-quiz ul+h1,#enp-quiz ul+h2,#enp-quiz ul+h3,#enp-quiz ul+h4,#enp-quiz ul+h5,#enp-quiz ul+h6{margin-top:1.8em}#enp-quiz p{font-size:.85em;font-weight:300;margin-bottom:1.125em}#enp-quiz ol,#enp-quiz ul{margin:0 0 1.6em 1.25em}#enp-quiz ul{list-style:disc}#enp-quiz ol{list-style:decimal}#enp-quiz li>ol,#enp-quiz li>ul{margin-bottom:0;margin-left:1.6em}#enp-quiz b,#enp-quiz strong{font-weight:700}#enp-quiz cite,#enp-quiz dfn,#enp-quiz em{font-family:georgia,times,serif;font-style:italic}#enp-quiz pre{background:#eee;font-family:Courier\ 10 Pitch,Courier,monospace;font-size:.95em;line-height:1.6;margin-bottom:1.6em;max-width:100%;overflow:auto;padding:1.6em}#enp-quiz .code,#enp-quiz code,#enp-quiz kbd,#enp-quiz tt,#enp-quiz var{font:.7em Monaco,Consolas,"Andale Mono","DejaVu Sans Mono",monospace}#enp-quiz table{border:0}#enp-quiz table th{border:0;border-bottom:1px solid #ddd;font-family:tablet-gothic,helvetica neue,helvetica,arial,sans-serif;font-size:.8rem;text-transform:uppercase}#enp-quiz table td{border:0;border-bottom:1px solid #eee;font-family:tablet-gothic,helvetica neue,helvetica,arial,sans-serif;font-size:1rem}#enp-quiz table tr:nth-child(even) td{background:#f8f8f8}#enp-quiz table tr:last-child td{border-bottom:0}#enp-quiz figure{margin:0}#enp-quiz img{height:auto;max-width:100%}#enp-quiz a{color:#4477b5;text-decoration:none;touch-action:manipulation;transition:color .2s}#enp-quiz a .enp-icon{fill:#4477b5}#enp-quiz a:active,#enp-quiz a:focus,#enp-quiz a:hover{color:#396497}#enp-quiz a:active .enp-icon,#enp-quiz a:focus .enp-icon,#enp-quiz a:hover .enp-icon{fill:#396497}#enp-quiz button:focus{outline-color:#4d90fe;outline-offset:-2px;outline-style:auto;outline-width:5px}#enp-quiz .enp-btn{background:#4477b5;border:0;border-radius:3px;box-shadow:inset 0 -2px 0 rgba(0,0,0,.2);color:#fff;cursor:pointer;font-size:15px;font-weight:400;letter-spacing:.05em;line-height:1.6;padding:.85em 1.4em .75em;text-align:center;text-transform:uppercase;transition:all .2s}#enp-quiz .enp-btn:focus,#enp-quiz .enp-btn:hover{background:#396497;box-shadow:none;color:#fff}#enp-quiz .enp-btn:active{background:#a2bcdc;box-shadow:inset 0 2px 0 rgba(0,0,0,.1);color:#fff}#enp-quiz .enp-btn:focus{outline-color:#4d90fe;outline-offset:-2px;outline-style:auto;outline-width:5px}#enp-quiz .enp-btn:disabled,#enp-quiz .enp-btn:disabled:focus,#enp-quiz .enp-btn:disabled:hover{background:#4477b5;cursor:default;opacity:.5}#enp-quiz .enp-btn--add{background:0;border:3px dashed #666;border-radius:3px;box-shadow:none;color:#545454;cursor:pointer;font-size:15px;font-weight:400;letter-spacing:.05em;line-height:1.6;padding:.85em 1.4em .75em;text-align:center;text-transform:uppercase;transition:all .2s;width:100%}#enp-quiz .enp-btn--add:focus,#enp-quiz .enp-btn--add:hover{background:#396497;box-shadow:none;color:#fff}#enp-quiz .enp-btn--add:active{background:#a2bcdc;box-shadow:inset 0 2px 0 rgba(0,0,0,.1);color:#fff}#enp-quiz .enp-btn--add:focus{outline-color:#4d90fe;outline-offset:-2px;outline-style:auto;outline-width:5px}#enp-quiz .enp-btn--add:disabled,#enp-quiz .enp-btn--add:disabled:focus,#enp-quiz .enp-btn--add:disabled:hover{background:#4477b5;cursor:default;opacity:.5}#enp-quiz .enp-btn--add:focus,#enp-quiz .enp-btn--add:hover{background:hsla(0,0%,100%,.9);border:3px dashed #444;color:#444}#enp-quiz .enp-btn--disabled{cursor:default;opacity:.65}#enp-quiz .enp-btn--enabled{-webkit-animation:expand .6s;animation:expand .6s}#enp-quiz .enp-icon{height:24px;transition:all .2s;width:24px}#enp-quiz .enp-page-title{font-size:1.6rem}@-webkit-keyframes slideInBottom{0%{-webkit-transform:translate3d(0,75pt,0);opacity:0;transform:translate3d(0,75pt,0)}to{-webkit-transform:translate3d(0,0,0);opacity:1;transform:translate3d(0,0,0)}}@keyframes slideInBottom{0%{-webkit-transform:translate3d(0,75pt,0);opacity:0;transform:translate3d(0,75pt,0)}to{-webkit-transform:translate3d(0,0,0);opacity:1;transform:translate3d(0,0,0)}}@-webkit-keyframes slideInTop{0%{-webkit-transform:translate3d(0,-20px,0);height:auto;opacity:0;transform:translate3d(0,-20px,0)}to{-webkit-transform:translate3d(0,0,0);height:auto;opacity:1;transform:translate3d(0,0,0)}}@keyframes slideInTop{0%{-webkit-transform:translate3d(0,-20px,0);height:auto;opacity:0;transform:translate3d(0,-20px,0)}to{-webkit-transform:translate3d(0,0,0);height:auto;opacity:1;transform:translate3d(0,0,0)}}@-webkit-keyframes slideInTop--reduced-opacity{0%{-webkit-transform:translate3d(0,-20px,0);height:auto;opacity:0;transform:translate3d(0,-20px,0)}to{-webkit-transform:translate3d(0,0,0);height:auto;opacity:.8;transform:translate3d(0,0,0)}}@keyframes slideInTop--reduced-opacity{0%{-webkit-transform:translate3d(0,-20px,0);height:auto;opacity:0;transform:translate3d(0,-20px,0)}to{-webkit-transform:translate3d(0,0,0);height:auto;opacity:.8;transform:translate3d(0,0,0)}}@-webkit-keyframes slideOutTop{0%{-webkit-transform:translate3d(0,0,0);height:75pt;opacity:1;overflow:hidden;transform:translate3d(0,0,0)}to{-webkit-transform:translate3d(0,-20px,0);height:0;opacity:0;transform:translate3d(0,-20px,0)}}@keyframes slideOutTop{0%{-webkit-transform:translate3d(0,0,0);height:75pt;opacity:1;overflow:hidden;transform:translate3d(0,0,0)}to{-webkit-transform:translate3d(0,-20px,0);height:0;opacity:0;transform:translate3d(0,-20px,0)}}@-webkit-keyframes removeElement{0%{-webkit-transform:translate3d(0,0,0);opacity:1;transform:translate3d(0,0,0)}to{-webkit-transform:translate3d(-200px,0,0);height:0;margin:0;opacity:0;padding:0;transform:translate3d(-200px,0,0);z-index:-1}}@keyframes removeElement{0%{-webkit-transform:translate3d(0,0,0);opacity:1;transform:translate3d(0,0,0)}to{-webkit-transform:translate3d(-200px,0,0);height:0;margin:0;opacity:0;padding:0;transform:translate3d(-200px,0,0);z-index:-1}}@-webkit-keyframes removeAnswers{0%{-webkit-transform:translate3d(0,0,0);opacity:1;transform:translate3d(0,0,0)}to{-webkit-transform:translate3d(-200px,0,0);display:none;height:0;opacity:0;padding:0;transform:translate3d(-200px,0,0);z-index:-1}}@keyframes removeAnswers{0%{-webkit-transform:translate3d(0,0,0);opacity:1;transform:translate3d(0,0,0)}to{-webkit-transform:translate3d(-200px,0,0);display:none;height:0;opacity:0;padding:0;transform:translate3d(-200px,0,0);z-index:-1}}@-webkit-keyframes removeQuestion{0%{-webkit-transform:translatex(0);opacity:1;transform:translatex(0)}to{-webkit-transform:translatex(-200px);opacity:0;transform:translatex(-200px)}}@keyframes removeQuestion{0%{-webkit-transform:translatex(0);opacity:1;transform:translatex(0)}to{-webkit-transform:translatex(-200px);opacity:0;transform:translatex(-200px)}}@-webkit-keyframes showNextQuestion{0%{-webkit-transform:translatex(200px);opacity:0;transform:translatex(200px)}to{-webkit-transform:translatex(0);opacity:1;transform:translatex(0)}}@keyframes showNextQuestion{0%{-webkit-transform:translatex(200px);opacity:0;transform:translatex(200px)}to{-webkit-transform:translatex(0);opacity:1;transform:translatex(0)}}@-webkit-keyframes expand{0%{-webkit-transform:scale3d(1,1,1);box-shadow:0 0 0 rgba(0,0,0,.3);opacity:.8;transform:scale3d(1,1,1)}to{-webkit-transform:scale3d(1,1,1);box-shadow:0 0 0 rgba(0,0,0,.3),inset 0 2px 0 rgba(0,0,0,.2);opacity:1;transform:scale3d(1,1,1)}40%{opacity:1}70%{-webkit-transform:scale3d(1.1,1.1,1);box-shadow:0 0 8px rgba(0,0,0,.4);opacity:1;transform:scale3d(1.1,1.1,1)}}@keyframes expand{0%{-webkit-transform:scale3d(1,1,1);box-shadow:0 0 0 rgba(0,0,0,.3);opacity:.8;transform:scale3d(1,1,1)}to{-webkit-transform:scale3d(1,1,1);box-shadow:0 0 0 rgba(0,0,0,.3),inset 0 2px 0 rgba(0,0,0,.2);opacity:1;transform:scale3d(1,1,1)}40%{opacity:1}70%{-webkit-transform:scale3d(1.1,1.1,1);box-shadow:0 0 8px rgba(0,0,0,.4);opacity:1;transform:scale3d(1.1,1.1,1)}}@-webkit-keyframes checkmark{0%,to{-webkit-transform:scale3d(.2,.2,1);opacity:0;transform:scale3d(.2,.2,1)}10%,92%{-webkit-transform:scale3d(1.4,1.4,1);transform:scale3d(1.4,1.4,1)}12%{-webkit-transform:scale3d(1,1,1);transform:scale3d(1,1,1)}5%{opacity:1}90%{-webkit-transform:scale3d(1,1,1);opacity:1;transform:scale3d(1,1,1)}}@keyframes checkmark{0%,to{-webkit-transform:scale3d(.2,.2,1);opacity:0;transform:scale3d(.2,.2,1)}10%,92%{-webkit-transform:scale3d(1.4,1.4,1);transform:scale3d(1.4,1.4,1)}12%{-webkit-transform:scale3d(1,1,1);transform:scale3d(1,1,1)}5%{opacity:1}90%{-webkit-transform:scale3d(1,1,1);opacity:1;transform:scale3d(1,1,1)}}@-webkit-keyframes fadeOut{0%{opacity:1}to{opacity:0}}@keyframes fadeOut{0%{opacity:1}to{opacity:0}}@-webkit-keyframes fadeIn{0%{opacity:0}to{opacity:1}}@keyframes fadeIn{0%{opacity:0}to{opacity:1}}@-webkit-keyframes navSlideIn{0%{-webkit-transform:translate3d(0,-200px,0);transform:translate3d(0,-200px,0)}to{-webkit-transform:translate3d(0,0,0);transform:translate3d(0,0,0)}}@keyframes navSlideIn{0%{-webkit-transform:translate3d(0,-200px,0);transform:translate3d(0,-200px,0)}to{-webkit-transform:translate3d(0,0,0);transform:translate3d(0,0,0)}}.spinner{margin:0 auto;text-align:center;width:70px}.spinner>div{-webkit-animation:sk-bouncedelay 1.4s infinite ease-in-out both;animation:sk-bouncedelay 1.4s infinite ease-in-out both;background-color:#333;border-radius:100%;display:inline-block;height:18px;width:18px}.spinner .bounce1{-webkit-animation-delay:-.32s;animation-delay:-.32s}.spinner .bounce2{-webkit-animation-delay:-.16s;animation-delay:-.16s}@-webkit-keyframes sk-bouncedelay{0%,80%,to{-webkit-transform:scale(0)}40%{-webkit-transform:scale(1)}}@keyframes sk-bouncedelay{0%,80%,to{-webkit-transform:scale(0);transform:scale(0)}40%{-webkit-transform:scale(1);transform:scale(1)}}#enp-quiz{transition:background .25s cubic-bezier(0,0,.3,1)}#enp-quiz .enp-container{margin-left:auto;margin-right:auto;max-width:40pc;padding-left:20px;padding-right:20px}#enp-quiz .enp-container:after{clear:both;content:"";display:table}#enp-quiz .enp-aside{background:#fff;border:1px solid #eee;border-bottom-color:#ccc;font-size:1.2rem;margin-bottom:1.6rem;margin-left:auto;margin-right:auto;max-width:32pc;padding:1.6rem 20px}@media(min-width:700px){#enp-quiz .enp-aside{margin-bottom:2.6rem;padding:1.6rem 2rem}}#enp-quiz .enp-aside:after{clear:both;content:"";display:table}#enp-quiz .enp-aside__title{font-size:.85rem;font-weight:600;text-transform:uppercase}#enp-quiz fieldset{border:0;margin:0;padding:0}#enp-quiz .enp-label{color:#5e5e5e;display:block;font-size:.85rem;font-weight:400;text-transform:uppercase}#enp-quiz .enp-legend{border:0;color:#5e5e5e;display:block;font-size:.85rem;font-weight:400;margin-bottom:.2rem;padding-top:1.6rem;text-transform:uppercase}#enp-quiz .enp-input{background:#fff;border:1px solid #aaa;border-radius:3px;font-family:tablet-gothic,helvetica neue,helvetica,arial,sans-serif;font-size:1rem;margin-bottom:1.2rem;max-width:100%;padding:.8rem .5rem;width:20rem}@media(min-width:700px){#enp-quiz .enp-input{padding:.8rem}}#enp-quiz .enp-input.enp-input--has-description{margin-bottom:.2rem}#enp-quiz .enp-input-description,#enp-quiz .enp-textarea-description{font-size:.85rem;margin-bottom:1rem}#enp-quiz .enp-input-description--before,#enp-quiz .enp-textarea-description--before{margin-bottom:0}#enp-quiz .enp-input:-ms-input-placeholder,#enp-quiz .enp-input::-ms-input-placeholder,#enp-quiz .enp-input::-webkit-input-placeholder,#enp-quiz .enp-input::placeholder,#enp-quiz .enp-textarea:-ms-input-placeholder,#enp-quiz .enp-textarea::-ms-input-placeholder,#enp-quiz .enp-textarea::-webkit-input-placeholder,#enp-quiz .enp-textarea::placeholder{color:#aaa;font-family:tablet-gothic,helvetica neue,helvetica,arial,sans-serif;font-weight:300}#enp-quiz .enp-textarea{background:#fff;border:1px solid #aaa;border-radius:3px;font-family:tablet-gothic,helvetica neue,helvetica,arial,sans-serif;font-size:1rem;line-height:1.5;margin-bottom:1.2rem;max-width:100%;padding:.8rem .5rem;width:100%}@media(min-width:700px){#enp-quiz .enp-textarea{padding:.8rem}}#enp-quiz .enp-textarea:focus{outline-color:#4d90fe;outline-offset:-2px;outline-style:auto;outline-width:5px}#enp-quiz .enp-textarea.enp-textarea--has-description{margin-bottom:.2rem}#enp-quiz .enp-textarea.enp-textarea--has-description--before{margin-bottom:1.2rem}#enp-quiz .enp-embed-code{background:#fff;border:1px solid #aaa;border-radius:3px;font-family:Monaco,Consolas,Andale Mono,DejaVu Sans Mono,monospace;font-size:.9rem;line-height:1.5;margin-bottom:1.2rem;max-width:100%;padding:1.6rem;width:100%}@media(min-width:700px){#enp-quiz .enp-embed-code{padding:.8rem}}#enp-quiz .enp-embed-code:focus{outline-color:#4d90fe;outline-offset:-2px;outline-style:auto;outline-width:5px}#enp-quiz .enp-preview-page-container,#enp-quiz .enp-publish-page-container,#enp-quiz .enp-quiz-form-container{background:#f8f8f8;margin-left:auto;margin-right:auto;max-width:40pc;padding:6rem 20px 4rem;position:relative}#enp-quiz .enp-preview-page-container:after,#enp-quiz .enp-publish-page-container:after,#enp-quiz .enp-quiz-form-container:after{clear:both;content:"";display:table}@media(min-width:700px){#enp-quiz .enp-preview-page-container,#enp-quiz .enp-publish-page-container,#enp-quiz .enp-quiz-form-container{max-width:840px}}@media(min-width:750pt){#enp-quiz .enp-preview-page-container,#enp-quiz .enp-publish-page-container,#enp-quiz .enp-quiz-form-container{max-width:750pt}}#enp-quiz .enp-quiz-form{margin-left:auto;margin-right:auto;max-width:32pc;padding-left:0;padding-right:0}#enp-quiz .enp-quiz-form:after{clear:both;content:"";display:table}#enp-quiz .enp-quiz-form .enp-input,#enp-quiz .enp-quiz-form .enp-textarea{width:100%}#enp-quiz .enp-quiz-title__label{color:#5e5e5e;display:block;font-size:.85rem;font-weight:500;text-transform:uppercase}#enp-quiz .enp-quiz-title__textarea{background:#fff;border:1px solid #aaa;border-radius:3px;font-family:tablet-gothic,helvetica neue,helvetica,arial,sans-serif;font-size:1.6rem;font-weight:700;margin-bottom:1rem;max-width:100%;padding:.8rem .5rem;width:20rem}@media(min-width:700px){#enp-quiz .enp-quiz-title__textarea{padding:.8rem}}#enp-quiz .enp-quiz-title__textarea:-ms-input-placeholder,#enp-quiz .enp-quiz-title__textarea::-ms-input-placeholder,#enp-quiz .enp-quiz-title__textarea::-webkit-input-placeholder,#enp-quiz .enp-quiz-title__textarea::placeholder{font-weight:700}#enp-quiz .enp-accordion-container{margin-bottom:1.6rem;position:relative}#enp-quiz .enp-question-content{background:#fff;padding-top:0;position:relative;width:100%}#enp-quiz .enp-question-inner{padding:1.6rem 1.6rem 1rem}@media(min-width:700px){#enp-quiz .enp-question-inner{padding-left:2.9rem;padding-right:2.8rem}}#enp-quiz .enp-question-title__label{color:#5e5e5e;display:block;font-size:.85rem;font-weight:500;text-transform:uppercase}#enp-quiz .enp-question-title__textarea{background:#fff;border:1px solid #aaa;border-radius:3px;font-family:tablet-gothic,helvetica neue,helvetica,arial,sans-serif;font-size:1.3rem;margin-bottom:1.2rem;max-width:100%;padding:1rem 1.2rem;width:20rem}@media(min-width:700px){#enp-quiz .enp-question-title__textarea{padding:.8rem}}#enp-quiz .enp-question-image-upload{-webkit-transform:translate3d(0,0,0);background:#f5f5f5;border:2px dashed #bbb;border-radius:3px;box-shadow:none;color:#666;cursor:pointer;font-size:.85rem;font-weight:400;letter-spacing:.05em;line-height:1.6;margin-bottom:2rem;padding:.85em 1.4em .75em;position:relative;text-align:center;text-transform:uppercase;transform:translate3d(0,0,0);transition:all .3s cubic-bezier(0,0,.3,1)}#enp-quiz .enp-question-image-upload:focus,#enp-quiz .enp-question-image-upload:hover{background:#396497;box-shadow:none;color:#fff}#enp-quiz .enp-question-image-upload:active{background:#a2bcdc;box-shadow:inset 0 2px 0 rgba(0,0,0,.1);color:#fff}#enp-quiz .enp-question-image-upload:focus{outline-color:#4d90fe;outline-offset:-2px;outline-style:auto;outline-width:5px}#enp-quiz .enp-question-image-upload:disabled,#enp-quiz .enp-question-image-upload:disabled:focus,#enp-quiz .enp-question-image-upload:disabled:hover{background:#4477b5;cursor:default;opacity:.5}#enp-quiz .enp-question-image-upload:focus,#enp-quiz .enp-question-image-upload:hover{background:hsla(0,0%,100%,.9);border:2px dashed #999;color:#444}#enp-quiz .enp-question-image-upload .enp-question-image-upload__icon--photo{-webkit-transform:translate3d(0,0,0);height:2.8rem;left:0;margin:0 auto;opacity:0;position:absolute;right:0;top:0;transform:translate3d(0,0,0);transition:opacity .2s,transform .3s cubic-bezier(0,0,.3,1),-webkit-transform .3s cubic-bezier(0,0,.3,1);width:2.8rem;z-index:-1}#enp-quiz .enp-question-image-upload .enp-question-image-upload__icon--add{background:#666;border-radius:50%;fill:#f5f5f5;height:1rem;margin-right:5px;padding:.02rem;position:relative;top:.2rem;width:1rem}#enp-quiz .enp-question-image-upload:active,#enp-quiz .enp-question-image-upload:focus,#enp-quiz .enp-question-image-upload:hover{padding-bottom:2rem;padding-top:5rem}#enp-quiz .enp-question-image-upload:active .enp-question-image-upload__icon--photo,#enp-quiz .enp-question-image-upload:focus .enp-question-image-upload__icon--photo,#enp-quiz .enp-question-image-upload:hover .enp-question-image-upload__icon--photo{-webkit-transform:translate3d(0,1.75rem,0);opacity:1;transform:translate3d(0,1.75rem,0);z-index:1}#enp-quiz .enp-question-image-upload:active .enp-question-image-upload__icon--add,#enp-quiz .enp-question-image-upload:focus .enp-question-image-upload__icon--add,#enp-quiz .enp-question-image-upload:hover .enp-question-image-upload__icon--add{background:#444;fill:#fff}#enp-quiz .enp-question-image__container{margin-bottom:1rem;position:relative}#enp-quiz .enp-question-image{margin-bottom:1.2rem}#enp-quiz .enp-question-type__legend{border:0;color:#5e5e5e;display:block;font-size:.85rem;font-weight:400;margin-bottom:.2rem;padding-top:1.6rem;text-transform:uppercase}#enp-quiz .enp-question-type__input{clip:rect(1px,1px,1px,1px);height:1px;left:-625pc;overflow:hidden;position:absolute!important;top:auto;width:1px}#enp-quiz .enp-question-type__label{border-radius:3px;cursor:pointer;display:inline-block;padding:.2rem .5rem;text-transform:capitalize}#enp-quiz .enp-question-type__input:checked+.enp-question-type__label{background:#3bb275;color:#fff;text-shadow:0 0 1px rgba(0,0,0,.7)}#enp-quiz .enp-question-type__input:focus+.enp-question-type__label{outline-color:#4d90fe;outline-offset:-2px;outline-style:auto;outline-width:5px;z-index:8}#enp-quiz .enp-question-type__label{position:relative;z-index:9}#enp-quiz .enp-mc-options,#enp-quiz .enp-slider-options{-webkit-animation:slideOutTop .25s cubic-bezier(0,0,.3,1) forwards;-webkit-animation-delay:0s,.05s;animation:slideOutTop .25s cubic-bezier(0,0,.3,1) forwards;animation-delay:0s,.05s;display:none;margin-top:0}#enp-quiz .enp-question-type__input--mc:checked~.enp-mc-options,#enp-quiz .enp-question-type__input--slider:checked~.enp-slider-options{-webkit-animation:fadeIn .45s cubic-bezier(0,0,.3,1) forwards;animation:fadeIn .45s cubic-bezier(0,0,.3,1) forwards;display:block;visibility:visible}#enp-quiz .enp-mc-options__list{list-style:none;margin-left:0}#enp-quiz .enp-mc-option{padding-left:6px;position:relative}@media(min-width:700px){#enp-quiz .enp-mc-option{padding-left:0}}#enp-quiz .enp-mc-options__legend{color:#5e5e5e;display:block;font-size:.85rem;font-weight:500;text-transform:uppercase}#enp-quiz .enp-mc-option__add,#enp-quiz .enp-mc-option__button--correct,#enp-quiz .enp-mc-option__button--delete{display:none}#enp-quiz .enp-question-type__input--mc:checked~.enp-mc-options .enp-mc-option__add,#enp-quiz .enp-question-type__input--mc:checked~.enp-mc-options .enp-mc-option__button--correct,#enp-quiz .enp-question-type__input--mc:checked~.enp-mc-options .enp-mc-option__button--delete{display:block}#enp-quiz .enp-button__question-image-delete,#enp-quiz .enp-mc-option__button--delete{background:0;border:0;box-shadow:none;cursor:pointer;fill:#bbb;margin:0;padding:0;position:absolute;right:-24px;top:9px}@media(min-width:700px){#enp-quiz .enp-button__question-image-delete,#enp-quiz .enp-mc-option__button--delete{right:-30px}}#enp-quiz .enp-button__question-image-delete:focus,#enp-quiz .enp-button__question-image-delete:hover,#enp-quiz .enp-mc-option__button--delete:focus,#enp-quiz .enp-mc-option__button--delete:hover{fill:#f14021}#enp-quiz .enp-mc-option__button--correct{background:0;border:0;box-shadow:none;left:-24px;margin:0;padding:0;position:absolute;top:8px}@media(min-width:700px){#enp-quiz .enp-mc-option__button--correct{left:-35px}}#enp-quiz .enp-mc-option__button--correct .enp-mc-option__icon--correct{background:#fff;border:2px solid #e97763;border-radius:50%;cursor:pointer;fill:#fff;height:28px;padding:.05em;transition:all .2s;width:28px}@media(min-width:700px){#enp-quiz .enp-mc-option__button--correct .enp-mc-option__icon--correct{padding:.15em}}#enp-quiz .enp-mc-option__button--correct:focus .enp-mc-option__icon--correct,#enp-quiz .enp-mc-option__button--correct:hover .enp-mc-option__icon--correct{background:#fff;border-color:#3bb275;fill:#3bb275}#enp-quiz .enp-mc-option__button--correct:disabled{opacity:1}#enp-quiz .enp-mc-option__button--correct:disabled .enp-mc-option__icon--correct{border:2px solid transparent;cursor:default;fill:#fff}#enp-quiz .enp-mc-option--correct .enp-mc-option__input{border:1px solid #3bb275;box-shadow:inset 0 0 3px #3bb275}#enp-quiz .enp-mc-option--correct .enp-mc-option__button--correct:focus .enp-mc-option__icon--correct,#enp-quiz .enp-mc-option--correct .enp-mc-option__button--correct:hover .enp-mc-option__icon--correct,#enp-quiz .enp-mc-option--correct .enp-mc-option__icon--correct{background:#3bb275;border-color:#3bb275;fill:#fff}#enp-quiz .enp-mc-option__add{background:#f5f5f5;border:2px dashed #bbb;border-radius:3px;box-shadow:none;color:#666;cursor:pointer;font-size:.85rem;font-weight:400;letter-spacing:.05em;line-height:1.6;padding:.7rem .75rem .8rem;text-align:left;text-transform:uppercase;transition:all .2s}#enp-quiz .enp-mc-option__add:focus,#enp-quiz .enp-mc-option__add:hover{background:#396497;box-shadow:none;color:#fff}#enp-quiz .enp-mc-option__add:active{background:#a2bcdc;box-shadow:inset 0 2px 0 rgba(0,0,0,.1);color:#fff}#enp-quiz .enp-mc-option__add:focus{outline-color:#4d90fe;outline-offset:-2px;outline-style:auto;outline-width:5px}#enp-quiz .enp-mc-option__add:disabled,#enp-quiz .enp-mc-option__add:disabled:focus,#enp-quiz .enp-mc-option__add:disabled:hover{background:#4477b5;cursor:default;opacity:.5}#enp-quiz .enp-mc-option__add:focus,#enp-quiz .enp-mc-option__add:hover{background:hsla(0,0%,100%,.9);border:2px dashed #999;color:#444}#enp-quiz .enp-mc-option__add .enp-mc-option__add__icon{background:#666;border-radius:50%;fill:#f5f5f5;height:1rem;margin-right:5px;padding:.02rem;position:relative;top:.2rem;width:1rem}#enp-quiz .enp-mc-option__add:hover .enp-mc-option__add__icon{background:#444;fill:#fff}#enp-quiz .enp-slider-options .enp-input{max-width:11.8rem}#enp-quiz .enp-slider-correct__container .enp-input,#enp-quiz .enp-slider-range__container .enp-input{max-width:8.8rem}@media(min-width:25pc){#enp-quiz .enp-slider-correct__container .enp-input,#enp-quiz .enp-slider-range__container .enp-input{max-width:11.8rem}}#enp-quiz .enp-slider-preview{border:1px solid #ddd;margin-bottom:1.6rem;margin-top:.2rem;padding:1.6rem 1.6rem .6rem;position:relative}#enp-quiz .enp-slider-preview .enp-label--slider-preview{font-size:.75rem;left:.4rem;position:absolute;text-transform:uppercase;top:.2rem;width:100%}#enp-quiz .enp-slider-correct__container,#enp-quiz .enp-slider-range__container{align-items:center;display:flex;justify-content:space-between}#enp-quiz .enp-slider-correct__helper,#enp-quiz .enp-slider-range__helper{background:#fff;color:#777;font-size:.85rem;padding:0 .3rem;position:relative}#enp-quiz .enp-slider-correct__helper:before,#enp-quiz .enp-slider-range__helper:before{background:#ddd;content:"";height:4px;left:-60px;position:absolute;top:44%;transition:width .7s cubic-bezier(0,0,.3,1),background 1.6s cubic-bezier(0,0,.3,1);width:90pt;z-index:-1}#enp-quiz .enp-slider-options{margin-bottom:2rem}#enp-quiz .enp-slider-options .enp-accordion-header{font-size:.85rem;padding:.675rem;text-transform:uppercase}#enp-quiz .enp-slider-options .enp-slider-advanced-options__content{border:0;box-shadow:none;margin-bottom:0;padding-bottom:0;padding-top:1rem}#enp-quiz .enp-slider-correct-high__container{position:relative}#enp-quiz .enp-slider-correct-high__input-container--hidden{display:none}#enp-quiz .enp-slider-correct__helper--hidden:before{background:#3bb275;width:0}#enp-quiz .enp-slider-correct-answer-range--add-range{background:#f5f5f5;border:2px dashed #bbb;border-radius:3px;box-shadow:none;color:#666;cursor:pointer;font-size:.7rem;font-weight:400;letter-spacing:.05em;line-height:1.6;margin-left:.8rem;padding:.85em 1.4em .75em;text-align:center;text-transform:uppercase;transition:all .2s}#enp-quiz .enp-slider-correct-answer-range--add-range:focus,#enp-quiz .enp-slider-correct-answer-range--add-range:hover{background:#396497;box-shadow:none;color:#fff}#enp-quiz .enp-slider-correct-answer-range--add-range:active{background:#a2bcdc;box-shadow:inset 0 2px 0 rgba(0,0,0,.1);color:#fff}#enp-quiz .enp-slider-correct-answer-range--add-range:focus{outline-color:#4d90fe;outline-offset:-2px;outline-style:auto;outline-width:5px}#enp-quiz .enp-slider-correct-answer-range--add-range:disabled,#enp-quiz .enp-slider-correct-answer-range--add-range:disabled:focus,#enp-quiz .enp-slider-correct-answer-range--add-range:disabled:hover{background:#4477b5;cursor:default;opacity:.5}#enp-quiz .enp-slider-correct-answer-range--add-range:focus,#enp-quiz .enp-slider-correct-answer-range--add-range:hover{background:hsla(0,0%,100%,.9);border:2px dashed #999;color:#444}@media(min-width:25pc){#enp-quiz .enp-slider-correct-answer-range--add-range{font-size:.8rem;padding:.7rem}}@media(min-width:700px){#enp-quiz .enp-slider-correct-answer-range--add-range{min-width:11.4rem;padding:.7rem 1.2rem}}#enp-quiz .enp-slider-correct-answer-range--add-range .enp-slider-correct-answer-range__icon{background:#666;border-radius:50%;fill:#f5f5f5;height:1rem;left:-.2rem;margin-right:5px;padding:.02rem;position:relative;width:1rem}#enp-quiz .enp-slider-correct-answer-range--add-range:hover .enp-slider-correct-answer-range__icon{background:#444;fill:#fff}#enp-quiz .enp-slider-correct-answer-range--remove-range{background:0;border:0;bottom:1.6rem;box-shadow:none;padding:0 .1rem;position:absolute;right:-1.6rem}#enp-quiz .enp-slider-correct-answer-range--remove-range .enp-slider-correct-answer-range__icon{fill:#666;height:1.2em;width:1.2em}#enp-quiz .enp-slider-correct-answer-range--remove-range:focus .enp-slider-correct-answer-range__icon,#enp-quiz .enp-slider-correct-answer-range--remove-range:hover .enp-slider-correct-answer-range__icon{fill:#f14021}@media(min-width:700px){#enp-quiz .enp-slider-correct-answer-range--remove-range{bottom:auto;right:-.2rem;top:-.2rem}}#enp-quiz .enp-slider-options .enp-input:-moz-read-only,#enp-quiz .enp-slider-options .enp-input:read-only{background:#f5f5f5}#enp-quiz .enp-answer-explanation{background:#eaf4ff;box-shadow:inset 1px 0 0 #ccc,inset -1px -1px 0 #ccc,inset 0 1px 0 #ddd;padding-top:2rem}#enp-quiz .enp-answer-explanation__label{color:#5e5e5e;display:block;font-size:.85rem;font-weight:500;text-transform:uppercase}#enp-quiz .enp-question__button--delete{background:0;border:0;box-shadow:none;cursor:pointer;fill:#bbb;margin:0;padding:0;position:absolute;right:9px;top:9px}@media(min-width:700px){#enp-quiz .enp-question__button--delete{right:-30px}}#enp-quiz .enp-question__button--delete:hover{fill:#f14021}#enp-quiz .enp-question__move{left:15px;position:absolute}@media(min-width:700px){#enp-quiz .enp-question__move{left:-40px}}#enp-quiz .enp-sort__placeholder{background:#ddd;height:60px;margin-bottom:1.6rem;max-height:90pt;width:100%}#enp-quiz .ui-sortable .ui-sortable-helper .ui-sortable-handle{cursor:-webkit-grabbing}#enp-quiz .enp-question__button--move{background:0;border:0;box-shadow:none;cursor:pointer;fill:#bbb;margin:0;padding:0;position:absolute}#enp-quiz .enp-question__button--move:focus,#enp-quiz .enp-question__button--move:hover{fill:#333}#enp-quiz .enp-question__button--move:disabled{opacity:.5}#enp-quiz .enp-question__button--move--up{left:-9px;top:0}#enp-quiz .enp-question__button--move--down{right:-9px;top:3px}#enp-quiz .enp-quiz-form__add-question{background:0;border:3px dashed #666;border-radius:3px;box-shadow:none;color:#545454;cursor:pointer;font-size:15px;font-weight:400;letter-spacing:.05em;line-height:1.6;margin-bottom:2rem;margin-top:1.6rem;padding:1rem 1.4em;text-align:center;text-transform:uppercase;transition:all .2s}#enp-quiz .enp-quiz-form__add-question:focus,#enp-quiz .enp-quiz-form__add-question:hover{background:#396497;box-shadow:none;color:#fff}#enp-quiz .enp-quiz-form__add-question:active{box-shadow:inset 0 2px 0 rgba(0,0,0,.1);color:#fff}#enp-quiz .enp-quiz-form__add-question:focus{outline-color:#4d90fe;outline-offset:-2px;outline-style:auto;outline-width:5px}#enp-quiz .enp-quiz-form__add-question:disabled,#enp-quiz .enp-quiz-form__add-question:disabled:focus,#enp-quiz .enp-quiz-form__add-question:disabled:hover{background:#4477b5;cursor:default;opacity:.5}#enp-quiz .enp-quiz-form__add-question:focus,#enp-quiz .enp-quiz-form__add-question:hover{background:#396497;box-shadow:none;color:#fff}#enp-quiz .enp-quiz-form__add-question:active{background:#a2bcdc;box-shadow:inset 0 2px 0 rgba(0,0,0,.1);color:#fff}#enp-quiz .enp-quiz-form__add-question:focus{outline-color:#4d90fe;outline-offset:-2px;outline-style:auto;outline-width:5px}#enp-quiz .enp-quiz-form__add-question:disabled,#enp-quiz .enp-quiz-form__add-question:disabled:focus,#enp-quiz .enp-quiz-form__add-question:disabled:hover{background:#4477b5;cursor:default;opacity:.5}#enp-quiz .enp-quiz-form__add-question:focus,#enp-quiz .enp-quiz-form__add-question:hover{background:hsla(0,0%,100%,.9);border:3px dashed #444;color:#444}#enp-quiz .enp-quiz-form__add-question .enp-add-question__icon{background:#666;border-radius:50%;fill:#f5f5f5;height:1.2rem;margin-right:5px;padding:.02rem;position:relative;top:.2rem;width:1.2rem}#enp-quiz .enp-quiz-form__add-question:hover .enp-add-question__icon{background:#444;fill:#fff}#enp-quiz .enp-quiz-form__save{background:#4477b5;border:0;border-radius:3px;box-shadow:inset 0 -2px 0 rgba(0,0,0,.2);color:#fff;cursor:pointer;font-size:15px;font-weight:400;letter-spacing:.05em;line-height:1.6;margin-bottom:1rem;opacity:.8;padding:.85em 1.4em .75em;text-align:center;text-shadow:0 -1px 2px rgba(0,0,0,.6);text-transform:uppercase;transition:all .2s;width:100%}#enp-quiz .enp-quiz-form__save:focus,#enp-quiz .enp-quiz-form__save:hover{background:#396497;box-shadow:none;color:#fff}#enp-quiz .enp-quiz-form__save:active{background:#a2bcdc;box-shadow:inset 0 2px 0 rgba(0,0,0,.1);color:#fff}#enp-quiz .enp-quiz-form__save:focus{outline-color:#4d90fe;outline-offset:-2px;outline-style:auto;outline-width:5px}#enp-quiz .enp-quiz-form__save:disabled,#enp-quiz .enp-quiz-form__save:disabled:focus,#enp-quiz .enp-quiz-form__save:disabled:hover{background:#4477b5;cursor:default;opacity:.5}#enp-quiz .enp-quiz-form__save:focus,#enp-quiz .enp-quiz-form__save:hover{opacity:1}@media(min-width:25pc){#enp-quiz .enp-quiz-form__save{margin-right:3%;margin-top:1.6rem;padding:1.2rem 1.8rem 1.1rem;position:relative;top:-2px;width:27%}}#enp-quiz .enp-quiz-form__save--reveal{-webkit-animation:slideInTop--reduced-opacity .3s cubic-bezier(0,0,.3,1);animation:slideInTop--reduced-opacity .3s cubic-bezier(0,0,.3,1)}#enp-quiz .enp-btn--next-step{background:#4477b5;border:0;border-radius:3px;box-shadow:inset 0 -2px 0 rgba(0,0,0,.2);color:#fff;cursor:pointer;font-size:15px;font-weight:400;letter-spacing:.05em;line-height:1.6;text-align:center;text-transform:uppercase;transition:all .2s}#enp-quiz .enp-btn--next-step:focus,#enp-quiz .enp-btn--next-step:hover{background:#396497;box-shadow:none;color:#fff}#enp-quiz .enp-btn--next-step:active{background:#a2bcdc;box-shadow:inset 0 2px 0 rgba(0,0,0,.1);color:#fff}#enp-quiz .enp-btn--next-step:focus{outline-color:#4d90fe;outline-offset:-2px;outline-style:auto;outline-width:5px}#enp-quiz .enp-btn--next-step:disabled,#enp-quiz .enp-btn--next-step:disabled:focus,#enp-quiz .enp-btn--next-step:disabled:hover{background:#4477b5;cursor:default;opacity:.5}#enp-quiz .enp-btn--next-step__icon{background:#fff;border-radius:50%;fill:#4477b5;height:1.2rem;margin-left:.5em;position:relative;top:.15rem;width:1.2rem}#enp-quiz .enp-btn--next-step__icon:hover{background:#fff;fill:#396497}#enp-quiz .enp-btn--next-step{padding:1rem 1.4rem;width:100%}@media(min-width:25pc){#enp-quiz .enp-btn--next-step{width:68%}}#enp-quiz .enp-btn--next-step--reveal{-webkit-animation:slideInTop .3s cubic-bezier(0,0,.3,1);animation:slideInTop .3s cubic-bezier(0,0,.3,1)}#enp-quiz .enp-accordion-header--inserting,#enp-quiz .enp-mc-option--inputs{-webkit-animation:slideInBottom .4s cubic-bezier(0,0,.3,1) forwards;animation:slideInBottom .4s cubic-bezier(0,0,.3,1) forwards}#enp-quiz .enp-mc-option--remove,#enp-quiz .enp-question--remove,#enp-quiz .enp-question__image--remove{-webkit-animation:removeElement .5s cubic-bezier(0,0,.3,1) forwards;animation:removeElement .5s cubic-bezier(0,0,.3,1) forwards}#enp-quiz .enp-image-upload-wait{background:#f5f5f5;border:2px dashed #bbb;border-radius:3px;box-shadow:none;color:#666;cursor:pointer;font-size:15px;font-weight:400;letter-spacing:.05em;line-height:1.6;margin-bottom:1rem;padding:4rem 1.4em;text-align:center;text-transform:uppercase;transition:all .2s;width:100%}#enp-quiz .enp-image-upload-wait:focus,#enp-quiz .enp-image-upload-wait:hover{background:#396497;box-shadow:none;color:#fff}#enp-quiz .enp-image-upload-wait:active{background:#a2bcdc;box-shadow:inset 0 2px 0 rgba(0,0,0,.1);color:#fff}#enp-quiz .enp-image-upload-wait:focus{outline-color:#4d90fe;outline-offset:-2px;outline-style:auto;outline-width:5px}#enp-quiz .enp-image-upload-wait:disabled,#enp-quiz .enp-image-upload-wait:disabled:focus,#enp-quiz .enp-image-upload-wait:disabled:hover{background:#4477b5;cursor:default;opacity:.5}#enp-quiz .enp-image-upload-wait:focus,#enp-quiz .enp-image-upload-wait:hover{background:hsla(0,0%,100%,.9);border:2px dashed #999;color:#444}#enp-quiz .enp-accordion-header.question-has-error{box-shadow:0 0 3px #f14021;color:#f14021}.enp-quiz.ui-sortable--sorting #enp-quiz .enp-accordion-content{display:none}@media(min-width:750pt){#enp-quiz .enp-quiz-settings-container{float:left;margin:0;width:40%}#enp-quiz .enp-quiz-preview-container{float:left;width:60%}}#enp-quiz .enp-quiz-settings__title,#enp-quiz .enp-quiz-share__legend{font-size:.85rem;font-weight:600;padding-top:0;position:relative;text-transform:uppercase}#enp-quiz .enp-quiz-settings__form{margin-bottom:3rem}@media(min-width:750pt){#enp-quiz .enp-quiz-settings__form{margin-bottom:0;padding:0}}@media(min-width:700px){#enp-quiz .enp-fieldset{position:relative}}@media(min-width:700px){#enp-quiz .enp-title-display__legend{padding-top:.4rem}}#enp-quiz .enp-quiz-share__input,#enp-quiz .enp-quiz-styles__input{width:100%}#enp-quiz .enp-quiz-styles__textarea--custom-css{font-family:Monaco,Consolas,Andale Mono,DejaVu Sans Mono,monospace;font-size:.9rem;min-height:200px}#enp-quiz .enp-fieldset--section{padding:1.6rem 1rem}#enp-quiz .enp-fieldset--section.enp-accordion-content--open{margin-bottom:0}#enp-quiz .enp-quiz-share--facebook{margin-bottom:2rem}#enp-quiz .enp-title-display__legend{border:0;color:#5e5e5e;display:block;font-size:.85rem;font-weight:400;margin-bottom:.2rem;padding-top:1.6rem;text-transform:uppercase}#enp-quiz .enp-title-display__input{clip:rect(1px,1px,1px,1px);height:1px;left:-625pc;overflow:hidden;position:absolute!important;top:auto;width:1px}#enp-quiz .enp-title-display__label{border-radius:3px;cursor:pointer;display:inline-block;padding:.2rem .5rem;text-transform:capitalize}#enp-quiz .enp-title-display__input:checked+.enp-title-display__label{background:#3bb275;color:#fff;text-shadow:0 0 1px rgba(0,0,0,.7)}#enp-quiz .enp-title-display__input:focus+.enp-title-display__label{outline-color:#4d90fe;outline-offset:-2px;outline-style:auto;outline-width:5px;z-index:8}#enp-quiz .enp-mc-options-order__legend{border:0;color:#5e5e5e;display:block;font-size:.85rem;font-weight:400;margin-bottom:.2rem;padding-top:1.6rem;text-transform:uppercase}#enp-quiz .enp-mc-options-order__input{clip:rect(1px,1px,1px,1px);height:1px;left:-625pc;overflow:hidden;position:absolute!important;top:auto;width:1px}#enp-quiz .enp-mc-options-order__label{border-radius:3px;cursor:pointer;display:inline-block;padding:.2rem .5rem;text-transform:capitalize}#enp-quiz .enp-mc-options-order__input:checked+.enp-mc-options-order__label{background:#3bb275;color:#fff;text-shadow:0 0 1px rgba(0,0,0,.7)}#enp-quiz .enp-mc-options-order__input:focus+.enp-mc-options-order__label{outline-color:#4d90fe;outline-offset:-2px;outline-style:auto;outline-width:5px;z-index:8}#enp-quiz .enp-mc-options-order{margin-bottom:1.6rem}#enp-quiz .enp-quiz-share__textarea{margin-bottom:2rem;min-height:7.6rem}@media(min-width:700px){#enp-quiz .enp-quiz-share__textarea{min-height:4.6rem}}@media(min-width:750pt){#enp-quiz .enp-quiz-share__textarea{min-height:7.6rem}}#enp-quiz .enp-preview-form__submit{margin-top:1.6rem}#enp-quiz .enp-quiz-preview__title{font-size:.85rem;font-weight:600;text-transform:uppercase}#enp-quiz .enp-preview-form__submit{background:#4477b5;border:0;border-radius:3px;box-shadow:inset 0 -2px 0 rgba(0,0,0,.2);color:#fff;cursor:pointer;font-size:15px;font-weight:400;letter-spacing:.05em;line-height:1.6;margin-bottom:1rem;opacity:.8;padding:.85rem 1.4em;text-align:center;text-shadow:0 -1px 2px rgba(0,0,0,.6);text-transform:uppercase;transition:all .2s;width:100%}#enp-quiz .enp-preview-form__submit:focus,#enp-quiz .enp-preview-form__submit:hover{background:#396497;box-shadow:none;color:#fff}#enp-quiz .enp-preview-form__submit:active{background:#a2bcdc;box-shadow:inset 0 2px 0 rgba(0,0,0,.1);color:#fff}#enp-quiz .enp-preview-form__submit:focus{outline-color:#4d90fe;outline-offset:-2px;outline-style:auto;outline-width:5px}#enp-quiz .enp-preview-form__submit:disabled,#enp-quiz .enp-preview-form__submit:disabled:focus,#enp-quiz .enp-preview-form__submit:disabled:hover{background:#4477b5;cursor:default;opacity:.5}#enp-quiz .enp-preview-form__submit:focus,#enp-quiz .enp-preview-form__submit:hover{opacity:1}#enp-quiz .enp-preview-form__submit--publish{padding:1.05rem 1.8rem .95rem;position:relative;width:100%;z-index:99999999}#enp-quiz .enp-quiz-styles__iris-wrapper{position:relative}#enp-quiz .iris-picker{box-sizing:content-box;margin-bottom:1rem;padding-bottom:3rem;padding-right:30px;position:relative;top:-1.2rem;z-index:9999999999}@media(min-width:750pt){#enp-quiz .iris-picker{left:104%;position:absolute;top:-4px}}#enp-quiz .iris-picker:last-of-type{margin-bottom:0}#enp-quiz .iris-picker .ui-draggable-handle:focus .ui-slider-handle,#enp-quiz .iris-picker .ui-slider-handle:focus{box-shadow:0 0 3px rgba(0,0,0,.75)}#enp-quiz .enp-quiz-styles__set-default{background:transparent;border:2px solid #4477b5;border-radius:3px;bottom:10px;box-shadow:none;color:#4477b5;cursor:pointer;font-size:.75rem;font-weight:400;left:10px;letter-spacing:.05em;line-height:1.6;padding:.85em 1.4em .75em;position:absolute;text-align:center;text-transform:uppercase;transition:all .2s}#enp-quiz .enp-quiz-styles__set-default:focus,#enp-quiz .enp-quiz-styles__set-default:hover{background:#396497;box-shadow:none;color:#fff}#enp-quiz .enp-quiz-styles__set-default:active{background:#a2bcdc;box-shadow:inset 0 2px 0 rgba(0,0,0,.1);color:#fff}#enp-quiz .enp-quiz-styles__set-default:focus{outline-color:#4d90fe;outline-offset:-2px;outline-style:auto;outline-width:5px}#enp-quiz .enp-quiz-styles__set-default:disabled,#enp-quiz .enp-quiz-styles__set-default:disabled:focus,#enp-quiz .enp-quiz-styles__set-default:disabled:hover{background:#4477b5;cursor:default;opacity:.5}#enp-quiz .enp-quiz-styles__set-default:focus,#enp-quiz .enp-quiz-styles__set-default:hover{background:transparent;border:2px solid #396497;color:#396497}#enp-quiz .enp-iris__close{background:0;border:0;box-shadow:none;cursor:pointer;fill:#888;margin:0;padding:0;position:absolute;right:5px;top:5px}#enp-quiz .enp-quiz-styles__input--color{padding-left:45px}#enp-quiz .enp-quiz-styles__color-demo{border:1px solid #ccc;border-radius:3px;height:30px;left:8px;position:absolute;top:8px;width:30px}#enp-quiz .enp-share-quiz__url{display:block;font-size:1rem;line-height:1.4;word-wrap:break-word}#enp-quiz .enp-share-quiz{align-content:center;align-items:center;display:flex;list-style:none;margin-left:0}#enp-quiz .enp-share-quiz__item{margin-right:20px}#enp-quiz .enp-share-quiz__item:last-child{margin-right:0}#enp-quiz .enp-share-quiz__item__icon{background:#5887c0;border-radius:50%;fill:#fff!important;height:2.4rem;padding:.6rem;width:2.4rem}#enp-quiz .enp-share-quiz__item__icon--facebook{background-color:#3a5795}#enp-quiz .enp-share-quiz__item__icon--twitter{background-color:#4099ff}#enp-quiz .enp-share-quiz{justify-content:space-around;margin-bottom:0}#enp-quiz .enp-ab-create__container{background:#f8f8f8;margin-left:auto;margin-right:auto;max-width:40pc;padding:3rem 20px;width:100%}#enp-quiz .enp-ab-create__container:after{clear:both;content:"";display:table}@media(min-width:700px){#enp-quiz .enp-ab-create__container{max-width:840px}}@media(min-width:750pt){#enp-quiz .enp-ab-create__container{max-width:750pt}}#enp-quiz .enp-ab-create__form{margin-left:auto;margin-right:auto;max-width:32pc;padding-left:20px;padding-right:20px}#enp-quiz .enp-ab-create__form:after{clear:both;content:"";display:table}#enp-quiz .enp-ab-create__label{color:#5e5e5e;display:block;font-size:.85rem;font-weight:500;text-transform:uppercase}#enp-quiz .enp-ab-create-title__textarea{background:#fff;border:1px solid #aaa;border-radius:3px;font-family:tablet-gothic,helvetica neue,helvetica,arial,sans-serif;font-size:1.6rem;font-weight:700;margin-bottom:1rem;max-width:100%;padding:.8rem .5rem;width:100%}@media(min-width:700px){#enp-quiz .enp-ab-create-title__textarea{padding:.8rem}}#enp-quiz .enp-ab-create-title__textarea:-ms-input-placeholder,#enp-quiz .enp-ab-create-title__textarea::-ms-input-placeholder,#enp-quiz .enp-ab-create-title__textarea::-webkit-input-placeholder,#enp-quiz .enp-ab-create-title__textarea::placeholder{font-weight:700}#enp-quiz .enp-ab-create__select{-moz-appearance:none;-webkit-appearance:none;appearance:none;background:url(../svg/chevron-down.svg) 100% 50% no-repeat;background-color:#fff;border:1px solid #bbb;border-radius:3px;box-shadow:inset -26px 0 0 rgba(0,0,0,.1);font-size:.85rem;margin-bottom:1.6rem;padding:.7rem 2pc .7rem .8rem;width:100%}#enp-quiz .enp-ab-create__submit{padding-bottom:1em;padding-top:1em;width:100%}#enp-quiz .enp-dash-container{background:#f8f8f8;margin-left:auto;margin-right:auto;max-width:40pc;padding:2rem 20px;transition:all .25s cubic-bezier(0,0,.3,1)}#enp-quiz .enp-dash-container:after{clear:both;content:"";display:table}@media(min-width:700px){#enp-quiz .enp-dash-container{max-width:840px}}@media(min-width:750pt){#enp-quiz .enp-dash-container{max-width:750pt}}#enp-quiz .enp-dash__section-header{display:block;margin-bottom:.325rem}@media(min-width:700px){#enp-quiz .enp-dash__section-header{align-content:flex-end;align-items:flex-end;display:flex;justify-content:space-between}}#enp-quiz .enp-search-quizzes{display:block}@media(min-width:25pc){#enp-quiz .enp-search-quizzes{align-content:flex-end;align-items:flex-end;display:flex}}#enp-quiz .enp-search-quizzes__form-item{display:block;margin-bottom:.6rem}@media(min-width:25pc){#enp-quiz .enp-search-quizzes__form-item{margin-bottom:0;margin-right:1rem}#enp-quiz .enp-search-quizzes__form-item:last-of-type{margin-right:0}}#enp-quiz .enp-quiz-search{position:relative}#enp-quiz .enp-search-quizzes__label{clip:rect(1px,1px,1px,1px);height:1px;left:-625pc;margin-bottom:0;overflow:hidden;position:absolute!important;top:auto;width:1px}#enp-quiz .enp-quiz-search__input{font-size:.85rem;margin:0 0 .1rem;max-width:10pc;padding:.3rem .3rem .3rem 26px}#enp-quiz .enp-quiz-search__icon{bottom:.3rem;height:21px;left:.2rem;position:absolute;width:21px}#enp-quiz .enp-search-quizzes__button{padding:.2rem .8rem}#enp-quiz .enp-search-results-description{font-size:.85rem}#enp-quiz .enp-search-results-description__link{white-space:nowrap}#enp-quiz .enp-search-results-description__icon{height:1.3em;left:2px;position:relative;top:4px;width:1.3em}#enp-quiz .enp-dash__section-title{font-size:.85rem;margin-bottom:.325rem;text-transform:uppercase}#enp-quiz .enp-view-toggle{cursor:pointer;display:none;opacity:.5}@media(min-width:700px){#enp-quiz .enp-view-toggle{display:flex}}#enp-quiz .enp-view-toggle__active{opacity:1}#enp-quiz .enp-sort-by{margin-left:5px}#enp-quiz .enp-dash-list{align-items:stretch;display:flex;flex-flow:row wrap;list-style:none;margin-left:0}#enp-quiz .enp-dash-item{align-content:flex-end;background:#fff;border:0;display:flex;flex-basis:100%;flex-direction:column;justify-content:flex-end;list-style:none;margin:0 0 .8rem;padding:1rem 1.2rem;transition:all .35s cubic-bezier(0,0,.3,1)}@media(min-width:700px){#enp-quiz .enp-dash-item{flex-basis:49%;margin:0 2% .8rem 0;max-width:49%}#enp-quiz .enp-dash-item:nth-child(2n){margin-right:0}}@media(min-width:750pt){#enp-quiz .enp-dash-item{flex-basis:32.5%;margin-right:1.25%;max-width:32.5%}#enp-quiz .enp-dash-item:nth-child(2n){margin-right:1.25%}#enp-quiz .enp-dash-item:nth-child(3n){margin-right:0}}#enp-quiz .enp-dash-item--published{box-shadow:inset 4px 0 0 #3bb275,0 1px 0 rgba(0,0,0,.1)}#enp-quiz .enp-dash-item--draft{box-shadow:inset 4px 0 0 #92dbb6,0 1px 0 rgba(0,0,0,.1)}#enp-quiz .enp-dash-item--remove{-webkit-animation:removeElement .5s cubic-bezier(0,0,.3,1) forwards;animation:removeElement .5s cubic-bezier(0,0,.3,1) forwards}#enp-quiz .enp-dash-list--list-view .enp-dash-item{flex-basis:100%;margin:0 0 .8rem}#enp-quiz .enp-dash-item__spinner{-webkit-animation:fadeIn .3s cubic-bezier(0,0,.3,1);align-content:center;align-items:center;animation:fadeIn .3s cubic-bezier(0,0,.3,1);background:hsla(0,59%,90%,.8);bottom:0;display:flex;justify-content:center;left:0;position:absolute;right:0;top:0;width:100%;z-index:999}#enp-quiz .enp-dash-item__header{background:#fff;border-bottom:1px solid #ddd;position:relative;z-index:99}#enp-quiz .enp-dash-item__title{font-size:1rem;padding:0 24px .375rem 0}#enp-quiz .enp-dash-item__content{padding:0 0 .375rem;position:relative;transition:all .2s cubic-bezier(0,0,.3,1)}#enp-quiz .enp-dash-item__meta{color:#565656;font-size:.75rem;font-weight:300}#enp-quiz .enp-dash-item__username{border-left:1px solid #ddd;margin-left:.2rem;padding-left:.4rem;word-wrap:break-word}#enp-quiz .enp-dash-item__title--ab-test{padding-bottom:0}#enp-quiz .enp-dash-item__ab-quizzes{color:#666;font-size:.85rem;list-style:none;margin-bottom:.8rem;margin-left:0}#enp-quiz .enp-dash-item__nav{font-size:.85rem;list-style:none;margin-bottom:0;margin-left:0}#enp-quiz .enp-dash-item__nav__item{display:inline-block;font-size:.85rem;margin-bottom:0;margin-right:10px;padding-bottom:0}#enp-quiz .enp-dash-item__nav__item a{font-weight:400}#enp-quiz .enp-dash-item__nav__item a:focus{outline:1px dotted #4477b5;outline-offset:1px}#enp-quiz .enp-dash-item__nav__item:last-of-type{margin-right:0}#enp-quiz .enp-dash-item__delete{background:0;border:0;box-shadow:none;cursor:pointer;margin:0;padding:0;position:relative;top:4px}#enp-quiz .enp-dash-item__delete__icon{fill:#bbb;height:20px;width:20px}#enp-quiz .enp-dash-item__delete__icon:focus,#enp-quiz .enp-dash-item__delete__icon:hover{fill:#f14021}#enp-quiz .enp-dash-item__nav--collapsible{-webkit-transform:translate3d(0,0,0);background:#fff;bottom:auto;display:none;margin-top:.2rem;position:absolute;right:auto;top:100%;transform:translate3d(0,0,0);transition:all .2s cubic-bezier(0,0,.3,1)}#enp-quiz .enp-dash-item__nav--collapsible .enp-dash-item__nav__item{padding:0 0 .4rem}#enp-quiz .enp-dash-item__menu-action{background:0;border:0;bottom:.2rem;color:#444;cursor:pointer;height:24px;padding:0;position:absolute;right:0}#enp-quiz .enp-dash-item__menu-action__icon{fill:#444;height:24px;transition:all .3s cubic-bezier(0,0,.3,1);width:24px}#enp-quiz .enp-dash-item__menu-action__icon--bottom{left:0;position:absolute}#enp-quiz .enp-dash-item--menu-active{-webkit-transform:translate3d(0,-3px,0);transform:translate3d(0,-3px,0)}#enp-quiz .enp-dash-item--menu-active.enp-dash-item--published{box-shadow:inset 4px 0 0 #3bb275,0 2px 2px rgba(0,0,0,.2)}#enp-quiz .enp-dash-item--menu-active.enp-dash-item--draft{box-shadow:inset 4px 0 0 #92dbb6,0 2px 2px rgba(0,0,0,.2)}#enp-quiz .enp-dash-item--menu-active .enp-dash-item__menu-action__icon--bottom{-webkit-transform:translatey(-15.5%);transform:translatey(-15.5%)}#enp-quiz .enp-dash-item--menu-active .enp-dash-item__menu-action__icon--top{-webkit-transform:rotatex(-180deg) translatey(0);transform:rotatex(-180deg) translatey(0)}#enp-quiz .enp-dash-item--menu-active .enp-dash-item__nav--collapsible{-webkit-animation:slideInTop .25s cubic-bezier(0,0,.3,1) forwards;animation:slideInTop .25s cubic-bezier(0,0,.3,1) forwards;display:block}#enp-quiz .enp-dash-item--menu-active .enp-dash-item__content{-webkit-transform:translate3d(0,.675rem,0);opacity:.4;transform:translate3d(0,.675rem,0)}#enp-quiz .enp-quiz-results{display:flex;justify-content:space-around;list-style:none;margin:.8rem 0 0;padding:0;text-align:center}#enp-quiz .enp-quiz-results__item{color:#454545;margin:0 2% 0 0;padding:0}@media(max-width:280px){#enp-quiz .enp-quiz-results__item{margin-bottom:.6rem;padding:0;width:100%}}#enp-quiz .enp-quiz-results__number{font-size:1.6rem;line-height:1;position:relative}#enp-quiz .enp-dash-item--draft .enp-quiz-results__number{opacity:.5}#enp-quiz .enp-quiz-results__number--average-score{color:#319461}#enp-quiz .enp-quiz-results__number--average-score:after{content:"%";font-size:.9rem;position:absolute;right:-1rem;top:.3rem}#enp-quiz .enp-quiz-results__label{color:#888;font-size:.7rem;font-weight:300;text-transform:uppercase}#enp-quiz .enp-quiz-list__view{align-content:flex-end;align-items:flex-end;display:flex}#enp-quiz .enp-dash-item--add-new{background:0;border:0;padding:0;position:relative}@media(min-width:700px){#enp-quiz .enp-dash-item--add-new{min-height:7rem}}#enp-quiz .enp-dash-link--add-new{background:0;border:2px dashed #bbb;border-radius:3px;box-shadow:none;color:#4477b5;cursor:pointer;font-size:15px;font-weight:400;justify-content:flex-start;letter-spacing:.05em;line-height:1.6;padding:1rem 1.2rem;text-align:center;text-transform:uppercase;transition:all .2s}#enp-quiz .enp-dash-link--add-new:focus,#enp-quiz .enp-dash-link--add-new:hover{background:#396497;box-shadow:none;color:#fff}#enp-quiz .enp-dash-link--add-new:active{background:#a2bcdc;box-shadow:inset 0 2px 0 rgba(0,0,0,.1);color:#fff}#enp-quiz .enp-dash-link--add-new:focus{outline-color:#4d90fe;outline-offset:-2px;outline-style:auto;outline-width:5px}#enp-quiz .enp-dash-link--add-new:disabled,#enp-quiz .enp-dash-link--add-new:disabled:focus,#enp-quiz .enp-dash-link--add-new:disabled:hover{background:#4477b5;cursor:default;opacity:.5}#enp-quiz .enp-dash-link--add-new:focus,#enp-quiz .enp-dash-link--add-new:hover{background:hsla(0,0%,100%,.9);border:2px dashed #999;color:#444}@media(min-width:700px){#enp-quiz .enp-dash-link--add-new{align-content:center;align-items:center;bottom:0;display:flex;flex-direction:column;font-size:.85rem;justify-content:center;left:0;position:absolute;right:0;text-transform:uppercase;top:0}}#enp-quiz .enp-dash-link--add-new .enp-dash-link__icon{background:#5887c0;border-radius:50%;fill:#fff;height:1.2rem;margin-right:5px;width:1.2rem}@media(min-width:700px){#enp-quiz .enp-dash-link--add-new .enp-dash-link__icon{height:2rem;margin:.8rem 0 .2rem;width:2rem}}#enp-quiz .enp-dash-link--add-new:hover{color:#396497}#enp-quiz .enp-dash-link--add-new:hover .enp-dash-link__icon{background:#396497;fill:#fff}#enp-quiz .enp-quiz-message--welcome p{color:#444}#enp-quiz .enp-paginate{align-content:center;align-items:center;display:flex;font-size:1rem;justify-content:center;list-style:none;margin-left:0}#enp-quiz .enp-paginate__link{align-content:center;align-items:center;border-radius:3px;display:flex;font-weight:400;justify-content:center;margin:0 .2rem;padding:0 .4rem}#enp-quiz .enp-paginate__link--current-page{border:2px solid #5887c0}#enp-quiz .enp-paginate__item--first-page,#enp-quiz .enp-paginate__item--last-page{display:flex}#enp-quiz .enp-paginate__item--first-page:after,#enp-quiz .enp-paginate__item--last-page:before{bottom:.2rem;content:"...";font-size:1rem;opacity:.6;position:relative}#enp-quiz .enp-paginate__item--no-gap:after,#enp-quiz .enp-paginate__item--no-gap:before{content:""}#enp-quiz .enp-paginate__item--next-page{margin-left:.2rem}#enp-quiz .enp-paginate__item--previous-page{margin-right:.2rem}#enp-quiz .enp-quiz-breadcrumbs{align-content:center;align-items:center;background:#fff;border-bottom:1px solid #ddd;display:flex;justify-content:center;left:-500%;margin-left:auto;margin-right:auto;padding:10px;position:absolute;right:-500%;top:0;width:1000%;z-index:99999}#enp-quiz .enp-quiz-breadcrumbs__list{display:flex;list-style:none;margin-bottom:0;margin-left:0}#enp-quiz .enp-quiz-breadcrumbs__item{align-content:center;align-items:center;display:flex;fill:#4477b5;justify-content:center;margin-right:5px}#enp-quiz .enp-quiz-breadcrumbs__item:last-of-type{margin-right:0}@media(min-width:25pc){#enp-quiz .enp-quiz-breadcrumbs__item{margin-right:10px}}#enp-quiz .enp-quiz-breadcrumbs__link--disabled{cursor:default;opacity:.65}#enp-quiz .enp-quiz-breadcrumbs__link--active{background:transparent;border:2px solid #4477b5;border-radius:3px;box-shadow:none;color:#4477b5;cursor:pointer;font-size:15px;font-weight:400;letter-spacing:.05em;line-height:1.6;padding:.4em 1em;text-align:center;text-transform:uppercase;transition:all .2s}#enp-quiz .enp-quiz-breadcrumbs__link--active:focus,#enp-quiz .enp-quiz-breadcrumbs__link--active:hover{background:#396497;box-shadow:none;color:#fff}#enp-quiz .enp-quiz-breadcrumbs__link--active:active{background:#a2bcdc;box-shadow:inset 0 2px 0 rgba(0,0,0,.1);color:#fff}#enp-quiz .enp-quiz-breadcrumbs__link--active:focus{outline-color:#4d90fe;outline-offset:-2px;outline-style:auto;outline-width:5px}#enp-quiz .enp-quiz-breadcrumbs__link--active:disabled,#enp-quiz .enp-quiz-breadcrumbs__link--active:disabled:focus,#enp-quiz .enp-quiz-breadcrumbs__link--active:disabled:hover{background:#4477b5;cursor:default;opacity:.5}#enp-quiz .enp-quiz-breadcrumbs__link--active:focus,#enp-quiz .enp-quiz-breadcrumbs__link--active:hover{background:transparent;border:2px solid #396497;color:#396497}#enp-quiz .enp-quiz-breadcrumbs__link{font-size:1rem;font-weight:400;letter-spacing:0;text-transform:none}#enp-quiz .enp-quiz-breadcrumbs--fixed{-webkit-animation:navSlideIn .25s;animation:navSlideIn .25s;position:fixed;top:0}#enp-quiz .enp-results-title{background:#f8f8f8;border-bottom:1px solid #ddd;font-size:1.6rem;margin:-1.2rem 0 2rem;padding:3.2rem 20px 2.6rem;text-align:center}#enp-quiz .enp-results-title:after{content:"RESULTS";display:block;font-size:.85rem;font-weight:400;text-transform:uppercase}#enp-quiz .enp-results__container{display:block;margin-left:auto;margin-right:auto;max-width:40pc;padding-left:20px;padding-right:20px}#enp-quiz .enp-results__container:after{clear:both;content:"";display:table}@media(min-width:700px){#enp-quiz .enp-results__container{max-width:840px}}@media(min-width:750pt){#enp-quiz .enp-results__container{display:flex;justify-content:space-between;max-width:750pt}}#enp-quiz .enp-quiz-scores__container,#enp-quiz .enp-results-flow__container{width:100%}@media(min-width:750pt){#enp-quiz .enp-quiz-scores__container,#enp-quiz .enp-results-flow__container{width:48%}}#enp-quiz .enp-quiz-score__line-chart{height:300px;margin-bottom:1rem}#enp-quiz .enp-quiz-score__line-chart .ct-label{color:#444}#enp-quiz .enp-quiz-score__line-chart .ct-grid{stroke:#dadada;stroke-dasharray:0}#enp-quiz .enp-quiz-score__line-chart .ct-line{stroke:#3bb275;stroke-width:2px}#enp-quiz .enp-quiz-score__line-chart .ct-point{stroke:#3bb275;stroke-width:8px}#enp-quiz .enp-quiz-scores-table{margin:0 auto;max-width:500px;width:100%}#enp-quiz .enp-quiz-scores-table tr th{background-color:#fff}#enp-quiz .enp-quiz-scores-table__label{padding-left:5%}#enp-quiz .enp-quiz-scores-table__score{padding-right:5%;text-align:right}#enp-quiz .enp-results-flow{border-radius:50%;height:20pc;margin:2rem auto;position:relative;width:20pc}@media(min-width:25pc){#enp-quiz .enp-results-flow{height:390px;width:390px}}@media(min-width:700px){#enp-quiz .enp-results-flow{height:450px;width:450px}}@media(min-width:750pt){#enp-quiz .enp-results-flow{height:25pc;width:25pc}}#enp-quiz .enp-results-flow__section-title{clip:rect(1px,1px,1px,1px);height:1px;left:-625pc;overflow:hidden;position:absolute!important;top:auto;width:1px}#enp-quiz .enp-results-flow__item{-webkit-animation:.85s slideInBottom cubic-bezier(0,0,.3,1) forwards;animation:.85s slideInBottom cubic-bezier(0,0,.3,1) forwards;border:2px solid #3bb275;border-radius:50%;height:100%;left:0;letter-spacing:.05rem;margin:0 auto;padding:12.5% 0 0;right:0;text-align:center;width:100%}#enp-quiz .enp-results-flow__item--total-views{background:#fff}#enp-quiz .enp-results-flow__item--quiz-starts{background:#eaf8f1;bottom:2.5%;height:65%;padding-top:8%;position:absolute;width:65%}#enp-quiz .enp-results-flow__item--quiz-finishes{background:#b8e8cf;bottom:5%;height:35%;position:absolute;width:35%}#enp-quiz .enp-results-flow__title{color:#444;font-size:.7rem;margin-bottom:0;text-transform:uppercase}@media(min-width:700px){#enp-quiz .enp-results-flow__title{font-weight:700;margin-bottom:2px}}#enp-quiz .enp-results-flow__number{font-size:1.4rem;font-weight:700;line-height:1.2}#enp-quiz .enp-results-flow__number--total-views{font-size:2rem}#enp-quiz .enp-results-flow__number--quiz-starts{font-size:1.65rem}#enp-quiz .enp-results-flow__percentage{color:#444;display:inline-block;font-size:.8rem;font-weight:400;left:-.1rem;position:relative;top:-.7em}#enp-quiz .enp-results-flow__percentage:after{color:#444;content:"%";font-size:.7rem;position:absolute;right:-.75rem}#enp-quiz .enp-results-questions__section{background:#f5f5f5;border-bottom:1px solid #ddd;border-top:1px solid #ddd;margin-bottom:3rem;margin-top:5rem;padding-bottom:3rem;padding-top:5rem}#enp-quiz .enp-results-questions__header{align-items:flex-start;flex-direction:column}@media(min-width:25pc){#enp-quiz .enp-results-questions__header{align-items:flex-end;display:flex;flex-direction:row;justify-content:space-between}}#enp-quiz .enp-results-questions__key,#enp-quiz .enp-results-questions__title{font-size:.85rem;text-transform:uppercase}#enp-quiz .enp-results-questions{list-style:none;margin-left:0}#enp-quiz .enp-results-question{font-size:1rem;margin-bottom:1rem;padding:0;width:100%}#enp-quiz .enp-results-question__header{padding:1rem 1.2rem;position:relative}#enp-quiz .enp-results-question__question,#enp-quiz .enp-results-question__stats{font-size:1rem;line-height:1.4}#enp-quiz .enp-results-question__question{font-weight:400}@media(min-width:25pc){#enp-quiz .enp-results-question__question{margin-bottom:0;padding-right:7em}}#enp-quiz .enp-results-question__stats{font-size:.9rem}@media(min-width:25pc){#enp-quiz .enp-results-question__stats{bottom:1rem;position:absolute;right:1.2rem;text-align:right}}#enp-quiz .enp-results-question__stats,#enp-quiz .enp-results-questions__key{font-weight:300}#enp-quiz .enp-results-question__content{padding:2rem 1.2rem 1.2rem}#enp-quiz .enp-results-question__deep-stats{display:flex;justify-content:space-around;list-style:none;margin-left:0;text-align:center}#enp-quiz .enp-results-question__deep-stat__number{font-size:1.8rem;line-height:1;position:relative}#enp-quiz .enp-results-question__deep-stat__number--correct,#enp-quiz .enp-results-question__deep-stat__number--finishes{color:#319461}#enp-quiz .enp-results-question__deep-stat__number--incorrect{color:#e97763}#enp-quiz .enp-results-question__deep-stat__number--correct:after,#enp-quiz .enp-results-question__deep-stat__number--finishes:after,#enp-quiz .enp-results-question__deep-stat__number--incorrect:after{content:"%";font-size:.9rem;position:absolute;right:-1rem;top:.3rem}#enp-quiz .enp-results-question__deep-stat__label{font-size:.8rem;text-transform:uppercase}#enp-quiz .enp-results-question__options{list-style:none;margin-bottom:0;margin-left:0}#enp-quiz .enp-results-question__option{border-top:1px solid #ddd;padding:.8rem .8rem .8rem .4rem}@media(min-width:25pc){#enp-quiz .enp-results-question__option{display:flex;flex-direction:row;justify-content:space-between}}#enp-quiz .enp-results-question__option:first-of-type{margin-top:1.4rem}#enp-quiz .enp-results-question__option--correct{background:#eaf8f1}#enp-quiz .enp-results-question__option__text{flex-grow:100;margin-right:1rem}#enp-quiz .enp-results-question__option__text__helper{font-size:.85rem;font-weight:300;margin-right:.4rem;text-transform:uppercase}@media(min-width:25pc){#enp-quiz .enp-results-question__option__icon{margin-right:.3rem;min-width:1.6rem}}#enp-quiz .enp-results-question__option__icon--incorrect{fill:#e97763;opacity:.5}#enp-quiz .enp-results-question__option__icon--correct{fill:#319461;opacity:1}#enp-quiz .enp-results-question__option__percentage--incorrect{color:#e97763}#enp-quiz .enp-results-question__option__percentage--correct{color:#319461}#enp-quiz .enp-results-question__option__number-selected{font-weight:300}#enp-quiz .enp-slider-responses__title{font-size:.85rem;font-weight:400;margin-top:1.6rem;text-transform:uppercase}#enp-quiz .enp-slider-responses__line-chart .ct-point{stroke-width:8px}#enp-quiz .enp-slider-responses__line-chart--high,#enp-quiz .enp-slider-responses__line-chart--low{stroke:#f14021}#enp-quiz .enp-slider-responses__line-chart--correct{stroke:#3bb275}#enp-quiz .enp-slider-responses-table{width:100%}#enp-quiz .enp-slider-responses-table tr:nth-child(even) td{background-color:#fff}#enp-quiz .enp-slider-responses-table tr.enp-slider-responses-table__response--correct td{background-color:#eaf8f1}#enp-quiz .enp-slider-responses-table__content{box-shadow:none;padding-top:1rem}#enp-quiz .enp-slider-responses-table--hide-zero .enp-slider-responses-table__frequency--zero{display:none}#enp-quiz .enp-slider-responses-table__response-frequency{align-items:center;display:flex;justify-content:space-between}#enp-quiz .enp-slider-responses-table__toggle-zero-frequency{background:#fff;border:0;border-radius:0;box-shadow:inset 1px 1px 0 #ccc,inset -1px -1px 0 #ccc;color:#444;cursor:pointer;font-family:tablet-gothic,helvetica neue,helvetica,arial,sans-serif;font-size:.9rem;font-weight:400;letter-spacing:0;line-height:1.5;margin:0;min-height:3.065rem;padding:0 .6rem;position:relative;text-align:left;text-transform:none;transition:all .2s cubic-bezier(0,0,.3,1);width:auto;z-index:9}.enp-quiz-results #enp-quiz .enp-aside{border:0}.enp-quiz-results .enp-results-questions__title__quiz-title{clip:rect(1px,1px,1px,1px);height:1px;left:-625pc;overflow:hidden;position:absolute!important;top:auto;width:1px}#enp-quiz .enp-results--ab{display:block;margin-bottom:3rem}@media(min-width:750pt){#enp-quiz .enp-results--ab{align-content:flex-end;display:flex;flex-wrap:wrap;padding:10px;width:50%}#enp-quiz .enp-results--a{border-right:1px solid #ddd;padding-right:1rem}#enp-quiz .enp-results--b{padding-left:1rem}}#enp-quiz .enp-results-title--ab,#enp-quiz .enp-results__container--ab .enp-results-flow__container{min-width:100%}#enp-quiz .enp-results--loser .enp-results-flow__item{border:2px solid #f14021}#enp-quiz .enp-results--loser .enp-results-flow__item--quiz-starts{background:#feedea}#enp-quiz .enp-results--loser .enp-results-flow__item--quiz-finishes{background:#fbccc4}#enp-quiz .enp-results--loser .enp-results-questions__title,#enp-quiz .enp-results--loser th{color:#db2c0e}#enp-quiz .enp-results--winner .enp-results-questions__title,#enp-quiz .enp-results--winner th{color:#319461}#enp-quiz .enp-results-title--a,#enp-quiz .enp-results-title--b{background:transparent}#enp-quiz .enp-ab-scores{margin-left:auto;margin-right:auto;max-width:40pc;padding-left:20px;padding-right:20px}#enp-quiz .enp-ab-scores:after{clear:both;content:"";display:table}@media(min-width:700px){#enp-quiz .enp-ab-scores{max-width:840px}}@media(min-width:750pt){#enp-quiz .enp-ab-scores{max-width:750pt}}#enp-quiz .enp-ab-scores th.enp-quiz-scores-table__label,#enp-quiz .enp-ab-scores th.enp-quiz-scores-table__score{padding-left:0;padding-right:0}#enp-quiz .enp-ab-scores__title{font-size:.85rem;padding-left:50px;text-transform:uppercase}#enp-quiz .enp-quiz-score__line-chart .enp-test-loser .ct-line,#enp-quiz .enp-quiz-score__line-chart .enp-test-loser .ct-point{stroke:#f14021}#enp-quiz .enp-quiz-scores{margin-top:0}#enp-quiz .enp-ab-scores .enp-quiz-scores-table,#enp-quiz .enp-question-results{margin-bottom:1.6rem}@media(min-width:750pt){#enp-quiz .enp-ab-scores .enp-quiz-scores-table,#enp-quiz .enp-question-results{float:left;margin:0;width:48%}#enp-quiz .enp-ab-scores .enp-quiz-scores-table:first-of-type,#enp-quiz .enp-question-results:first-of-type{margin-right:4%}}#enp-quiz .enp-question-results__container{margin-left:auto;margin-right:auto;max-width:40pc;padding-left:20px;padding-right:20px}#enp-quiz .enp-question-results__container:after{clear:both;content:"";display:table}@media(min-width:700px){#enp-quiz .enp-question-results__container{max-width:840px}}@media(min-width:750pt){#enp-quiz .enp-question-results__container{max-width:750pt}}#enp-quiz .enp-question-results--ab .enp-results-questions__section{background:#fff;border:0;margin:1.6rem auto;padding:1.6rem 0}#enp-quiz .enp-question-results--ab .enp-results-questions__container{padding:0}#enp-quiz .enp-ab-new-embed-code__section{margin-bottom:2rem;margin-left:auto;margin-right:auto;max-width:540px;padding-bottom:2rem;padding-left:20px;padding-right:20px}#enp-quiz .enp-ab-new-embed-code__section:after{clear:both;content:"";display:table}#enp-quiz .enp-ab-new-embed-code__section .enp-ab-embed-code{margin:0;padding:0}#enp-quiz .enp-ab-embed-code__section{background:#f5f5f5;border-bottom:1px solid #ddd;border-top:1px solid #ddd;margin-bottom:3rem;margin-top:5rem;padding-bottom:3rem;padding-top:5rem}#enp-quiz .enp-ab-embed-code{margin-left:auto;margin-right:auto;max-width:40pc;padding-left:20px;padding-right:20px}#enp-quiz .enp-ab-embed-code:after{clear:both;content:"";display:table}#enp-quiz .enp-ab-embed-code__title{font-size:.85rem;text-transform:uppercase}#enp-quiz .enp-embed-code__textarea{margin-bottom:0}#enp-quiz .enp-embed-code__instructions{font-size:1.1rem}#enp-quiz .enp-slider{margin-bottom:1.6rem}#enp-quiz .enp-slider-input__container{align-items:center;display:flex;justify-content:center;margin:1.6rem auto;position:relative}#enp-quiz .enp-slider-input__label{color:#5e5e5e;display:block;font-size:.85rem;font-weight:400;text-transform:uppercase}#enp-quiz .enp-slider-input__prefix,#enp-quiz .enp-slider-input__suffix{font-size:1rem}#enp-quiz .enp-slider-input__prefix{margin-right:.2rem;white-space:pre}#enp-quiz .enp-slider-input__suffix{margin-left:.2rem;white-space:pre}#enp-quiz .enp-slider-input__input{background:#fff;border:1px solid #aaa;border-radius:3px;font-family:tablet-gothic,helvetica neue,helvetica,arial,sans-serif;font-size:1rem;margin-bottom:0;max-width:100%;padding:.75rem;transition:all .25s cubic-bezier(0,0,.3,1);width:auto}@media(min-width:700px){#enp-quiz .enp-slider-input__input{padding:.8rem}}#enp-quiz .enp-slider-input__input--incorrect{color:#f14021}#enp-quiz .enp-slider-input__input--correct{color:#319461}#enp-quiz .enp-slider-input__input--invalid-animation{box-shadow:0 0 2px 1px #e97763}#enp-quiz .enp-slider_input__range-helper{bottom:-1.2rem;font-size:.8rem;position:absolute}#enp-quiz .enp-slider_input__range-helper--low{left:0}#enp-quiz .enp-slider_input__range-helper--high{right:0}#enp-quiz .enp-slider-input__range-helper__number{color:#666;position:relative}#enp-quiz .ui-slider-range-show-correct__tooltip-container{position:relative}#enp-quiz .ui-slider-range-show-correct__tooltip{background-color:#fff;border:2px solid #3bb275;border-radius:50%;height:1.1rem;margin-left:-.55rem;position:absolute;top:-.4rem;width:1.1rem;z-index:9999}#enp-quiz .ui-slider-range-show-correct__tooltip--low{left:0}#enp-quiz .ui-slider-range-show-correct__tooltip--high{right:-.55rem}#enp-quiz .ui-slider-range-show-correct__tooltip__text{color:#287950;display:inline-block;font-size:.825rem;min-width:100%;position:relative;text-align:center;text-shadow:0 1px 0 #fff;top:-1.35rem}#enp-quiz .enp-slider{background:#ddd;position:relative;text-align:left}#enp-quiz .enp-slider .ui-helper-hidden{display:none}#enp-quiz .enp-slider .ui-helper-hidden-accessible{border:0;clip:rect(0 0 0 0);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px}#enp-quiz .enp-slider .ui-helper-reset{border:0;font-size:100%;line-height:1.3;list-style:none;margin:0;outline:0;padding:0;text-decoration:none}#enp-quiz .enp-slider .ui-helper-clearfix:after,#enp-quiz .enp-slider .ui-helper-clearfix:before{border-collapse:collapse;content:"";display:table}#enp-quiz .enp-slider .ui-helper-clearfix:after{clear:both}#enp-quiz .enp-slider .ui-helper-clearfix{min-height:0}#enp-quiz .enp-slider .ui-helper-zfix{filter:alpha(opacity=0);height:100%;left:0;opacity:0;position:absolute;top:0;width:100%}#enp-quiz .enp-slider .ui-front{z-index:100}#enp-quiz .enp-slider .ui-state-disabled{cursor:default!important}#enp-quiz .enp-slider .ui-icon{background-repeat:no-repeat;display:block;overflow:hidden;text-indent:-99999px}#enp-quiz .enp-slider .ui-widget-overlay{height:100%;left:0;position:fixed;top:0;width:100%}#enp-quiz .enp-slider .ui-slider-handle{background:#fff;border:1px solid #aaa;border-radius:50%;cursor:default;height:1.2rem;margin-left:-.6rem;position:absolute;top:-.4rem;touch-action:none;transition:opacity .2s cubic-bezier(0,0,.3,1),height .18s cubic-bezier(0,0,.3,1),width .18s cubic-bezier(0,0,.3,1),transform .18s cubic-bezier(0,0,.3,1),-webkit-transform .18s cubic-bezier(0,0,.3,1);width:1.2rem;z-index:2}#enp-quiz .enp-slider .ui-slider-handle:focus{box-shadow:0 0 3px 1px #4d90fe;outline:0}#enp-quiz .enp-slider .ui-slider-handle--correct,#enp-quiz .enp-slider .ui-slider-handle--incorrect{height:1.1rem;margin-left:-.55rem;top:-.4rem;width:1.1rem}#enp-quiz .enp-slider .ui-slider-handle--incorrect{border:2px solid #f14021;z-index:1}#enp-quiz .enp-slider .ui-slider-handle--correct{border:2px solid #3bb275;z-index:99999}#enp-quiz .enp-slider .ui-slider-range{background-position:0 0;border:0;display:block;font-size:.7rem;height:100%;position:absolute;top:0;z-index:1}#enp-quiz .enp-slider .ui-slider-range-show-correct{background:#3bb275;z-index:9}#enp-quiz .enp-slider .ui-slider-range-min{background:#3bb275;left:0}#enp-quiz .enp-slider .ui-slider-range-max{right:0}#enp-quiz .enp-slider.ui-state-disabled .ui-slider-handle,#enp-quiz .enp-slider.ui-state-disabled .ui-slider-range{-webkit-filter:inherit;filter:inherit}#enp-quiz .ui-slider-horizontal{height:.3rem}#enp-quiz .enp-question__answered .enp-slider{background:#bbb}#enp-quiz .enp-question__answered .ui-slider-range-min{background:#fff} \ No newline at end of file +html{font-size:1pc!important}html #enp-quiz{box-sizing:border-box}body #enp-quiz{background:#fff;overflow:hidden}#enp-quiz *,#enp-quiz *:after,#enp-quiz *:before{box-sizing:inherit}#enp-quiz ol,#enp-quiz ul{margin:0 0 1.6rem 1.25rem;padding:0}#enp-quiz textarea{margin-bottom:1rem}#enp-quiz button,#enp-quiz button:active,#enp-quiz button:focus,#enp-quiz button:hover,#enp-quiz iframe,#enp-quiz input[type=button],#enp-quiz input[type=button]:active,#enp-quiz input[type=button]:focus,#enp-quiz input[type=button]:hover,#enp-quiz input[type=reset],#enp-quiz input[type=reset]:active,#enp-quiz input[type=reset]:focus,#enp-quiz input[type=reset]:hover,#enp-quiz input[type=submit],#enp-quiz input[type=submit]:active,#enp-quiz input[type=submit]:focus,#enp-quiz input[type=submit]:hover{border:0}#enp-quiz .enp-screen-reader-text{clip:rect(1px,1px,1px,1px);height:1px;left:-625pc;overflow:hidden;position:absolute!important;top:auto;width:1px}#enp-quiz .enp-screen-reader-text:active,#enp-quiz .enp-screen-reader-text:focus,#enp-quiz .enp-screen-reader-text:hover{background-color:#f1f1f1;border-radius:3px;box-shadow:0 0 2px 2px rgba(0,0,0,.6);clip:auto!important;color:#21759b;display:block;font-size:14px;font-weight:700;height:auto;left:5px;line-height:normal;padding:15px 23px 14px;text-decoration:none;top:5px;width:auto;z-index:100000}#enp-quiz .enp-accordion-header{background:#fff;border:0;border-radius:3px;box-shadow:inset 1px 1px 0 #ccc,inset -1px -1px 0 #ccc;color:#444;cursor:pointer;font-family:tablet-gothic,helvetica neue,helvetica,arial,sans-serif;font-size:.9rem;font-weight:400;letter-spacing:0;line-height:1.5;margin:1.6rem 0 0;min-height:3.065rem;padding:1rem 2rem 1rem 1rem;position:relative;text-align:left;text-transform:none;transition:all .2s cubic-bezier(0,0,.3,1);width:100%;z-index:9}#enp-quiz .enp-accordion-header:first-of-type{margin-top:0}#enp-quiz .enp-accordion-header .enp-accordion-header__icon{bottom:.75rem;fill:#666;position:absolute;right:.75rem;transition:all .35s cubic-bezier(0,0,.3,1)}#enp-quiz .enp-accordion-header--open .enp-accordion-header__icon{-webkit-transform:rotatex(180deg) translatey(2px);transform:rotatex(180deg) translatey(2px)}#enp-quiz .enp-accordion-content{background:#fff;box-shadow:inset 1px -1px 0 #ccc,inset -1px -1px 0 #ccc;display:block;height:auto;margin-bottom:1.6rem;overflow:visible;position:relative;width:100%}#enp-quiz .enp-accordion-content--closed{-webkit-animation:slideOutTop .25s cubic-bezier(0,0,.3,1) forwards;animation:slideOutTop .25s cubic-bezier(0,0,.3,1) forwards;display:none;margin-top:0;padding-top:0}#enp-quiz .enp-accordion-content--open{-webkit-animation:slideInTop .45s cubic-bezier(0,0,.3,1) forwards;animation:slideInTop .45s cubic-bezier(0,0,.3,1) forwards;margin-bottom:2rem;padding-top:1.6rem}#enp-quiz .enp-quiz-message{background:#fff;border:1px solid #eee;border-bottom:1px solid #ccc;bottom:0;left:0;margin-bottom:1.6rem;margin-left:auto;margin-right:auto;max-width:32pc;padding:1rem .375rem;position:fixed}#enp-quiz .enp-quiz-message:after{clear:both;content:"";display:table}#enp-quiz .enp-quiz-message__title{font-size:.85rem;text-transform:uppercase}#enp-quiz .enp-message__list{font-size:1.1rem;list-style:none;margin-bottom:0;margin-left:0}#enp-quiz .enp-quiz-message--error{border-left:6px solid #bf5700;color:#bf5700}#enp-quiz .enp-quiz-message__title--error{color:#964400}#enp-quiz .enp-quiz-message--success{border-left:6px solid #3bb275;color:#319461}#enp-quiz .enp-quiz-message__title--success{color:#319461}#enp-quiz .enp-quiz-message--note{border-left:6px solid #cca562}#enp-quiz .enp-quiz-message__title--note{color:#242f42}#enp-quiz .enp-quiz-message__close{background:0;border:0;box-shadow:none;margin:0;padding:0;position:absolute;right:5px;top:5px}#enp-quiz .enp-quiz-message--ajax{-webkit-animation:slideInBottom .3s;animation:slideInBottom .3s;margin-bottom:.6rem}#enp-quiz .enp-quiz-message-ajax-container{bottom:10px;position:fixed;z-index:9999}#enp-quiz .enp-quiz-message--saving__spinner{margin-left:-10px}#enp-quiz .enp-quiz-message--saving__text{font-size:1rem}#enp-quiz input.limited-chars,#enp-quiz textarea.limited-chars{margin-bottom:.2rem}#enp-quiz .limited-chars__container{color:#7a7a7a;display:block;font-size:.8rem;margin-bottom:1.2rem;text-align:right}#enp-quiz .limited-chars__counter{color:#666}#enp-quiz .limited-chars__container--error,#enp-quiz .limited-chars__container--error .limited-chars__counter{color:#964400}#enp-quiz input.has-error,#enp-quiz textarea.has-error{border:1px solid #bf5700}#enp-quiz input.has-error:focus,#enp-quiz textarea.has-error:focus{outline-color:#bf5700}#enp-quiz .enp-tooltip{position:relative}#enp-quiz .enp-tooltip__activator:focus+.enp-tooltip__description,#enp-quiz .enp-tooltip__activator:focus>.enp-tooltip__description{display:block}#enp-quiz .enp-tooltip__description{background:#f5f5f5;border-radius:3px;display:none;font-size:.9rem;left:103%;margin-bottom:2rem;max-width:200px;padding:.9rem;position:absolute}.enp-sticky{left:0;position:relative;right:0;top:0;z-index:999}.enp-sticky.enp-sticky--fixed{position:fixed}.enp-breadcrumb-link{font-size:.85rem}.enp-breadcrumb-link__icon{left:.4rem;position:relative;top:.45rem}body #enp-quiz{color:#444;font-family:tablet-gothic,helvetica neue,helvetica,arial,sans-serif;font-size:1em;font-weight:400;line-height:1.6}@media(min-width:700px){body #enp-quiz{font-size:1.3em}}#enp-quiz h1,#enp-quiz h2,#enp-quiz h3,#enp-quiz h4,#enp-quiz h5,#enp-quiz h6{clear:both;color:#5d5e5f;font-family:tablet-gothic,helvetica neue,helvetica,arial,sans-serif;font-weight:700;line-height:1.2em;margin:0 0 .2rem}#enp-quiz h1{font-size:2em}#enp-quiz h2{font-size:1.75em}#enp-quiz h3{font-size:1.475em}#enp-quiz h4{font-size:1.3em}#enp-quiz h5{font-size:1.125em}#enp-quiz h6{font-size:1em}#enp-quiz p+h1,#enp-quiz p+h2,#enp-quiz p+h3,#enp-quiz p+h4,#enp-quiz p+h5,#enp-quiz p+h6,#enp-quiz ul+h1,#enp-quiz ul+h2,#enp-quiz ul+h3,#enp-quiz ul+h4,#enp-quiz ul+h5,#enp-quiz ul+h6{margin-top:1.8em}#enp-quiz p{font-size:.85em;font-weight:300;margin-bottom:1.125em}#enp-quiz ol,#enp-quiz ul{margin:0 0 1.6em 1.25em}#enp-quiz ul{list-style:disc}#enp-quiz ol{list-style:decimal}#enp-quiz li>ol,#enp-quiz li>ul{margin-bottom:0;margin-left:1.6em}#enp-quiz b,#enp-quiz strong{font-weight:700}#enp-quiz cite,#enp-quiz dfn,#enp-quiz em{font-family:georgia,times,serif;font-style:italic}#enp-quiz pre{background:#eee;font-family:Courier\ 10 Pitch,Courier,monospace;font-size:.95em;line-height:1.6;margin-bottom:1.6em;max-width:100%;overflow:auto;padding:1.6em}#enp-quiz .code,#enp-quiz code,#enp-quiz kbd,#enp-quiz tt,#enp-quiz var{font:.7em Monaco,Consolas,"Andale Mono","DejaVu Sans Mono",monospace}#enp-quiz table{border:0}#enp-quiz table th{border:0;border-bottom:1px solid #ddd;font-family:tablet-gothic,helvetica neue,helvetica,arial,sans-serif;font-size:.8rem;text-transform:uppercase}#enp-quiz table td{border:0;border-bottom:1px solid #eee;font-family:tablet-gothic,helvetica neue,helvetica,arial,sans-serif;font-size:1rem}#enp-quiz table tr:nth-child(even) td{background:#f8f8f8}#enp-quiz table tr:last-child td{border-bottom:0}#enp-quiz figure{margin:0}#enp-quiz img{height:auto;max-width:100%}#enp-quiz a{color:#333f48;text-decoration:none;touch-action:manipulation;transition:color .2s}#enp-quiz a .enp-icon{fill:#333f48}#enp-quiz a:active,#enp-quiz a:focus,#enp-quiz a:hover{color:#222a30}#enp-quiz a:active .enp-icon,#enp-quiz a:focus .enp-icon,#enp-quiz a:hover .enp-icon{fill:#222a30}#enp-quiz button:focus{outline-color:#4d90fe;outline-offset:-2px;outline-style:auto;outline-width:5px}#enp-quiz .enp-btn{background:#333f48;border:0;border-radius:3px;box-shadow:inset 0 -2px 0 rgba(0,0,0,.2);color:#fff;cursor:pointer;font-size:15px;font-weight:400;letter-spacing:.05em;line-height:1.6;padding:.85em 1.4em .75em;text-align:center;text-transform:uppercase;transition:all .2s}#enp-quiz .enp-btn:focus,#enp-quiz .enp-btn:hover{background:#222a30;box-shadow:none;color:#fff}#enp-quiz .enp-btn:active{background:#5d7384;box-shadow:inset 0 2px 0 rgba(0,0,0,.1);color:#fff}#enp-quiz .enp-btn:focus{outline-color:#4d90fe;outline-offset:-2px;outline-style:auto;outline-width:5px}#enp-quiz .enp-btn:disabled,#enp-quiz .enp-btn:disabled:focus,#enp-quiz .enp-btn:disabled:hover{background:#333f48;cursor:default;opacity:.5}#enp-quiz .enp-btn--add{background:0;border:3px dashed #666;border-radius:3px;box-shadow:none;color:#545454;cursor:pointer;font-size:15px;font-weight:400;letter-spacing:.05em;line-height:1.6;padding:.85em 1.4em .75em;text-align:center;text-transform:uppercase;transition:all .2s;width:100%}#enp-quiz .enp-btn--add:focus,#enp-quiz .enp-btn--add:hover{background:#222a30;box-shadow:none;color:#fff}#enp-quiz .enp-btn--add:active{background:#5d7384;box-shadow:inset 0 2px 0 rgba(0,0,0,.1);color:#fff}#enp-quiz .enp-btn--add:focus{outline-color:#4d90fe;outline-offset:-2px;outline-style:auto;outline-width:5px}#enp-quiz .enp-btn--add:disabled,#enp-quiz .enp-btn--add:disabled:focus,#enp-quiz .enp-btn--add:disabled:hover{background:#333f48;cursor:default;opacity:.5}#enp-quiz .enp-btn--add:focus,#enp-quiz .enp-btn--add:hover{background:hsla(0,0%,100%,.9);border:3px dashed #444;color:#444}#enp-quiz .enp-btn--disabled{cursor:default;opacity:.65}#enp-quiz .enp-btn--enabled{-webkit-animation:expand .6s;animation:expand .6s}#enp-quiz .enp-icon{height:24px;transition:all .2s;width:24px}#enp-quiz .enp-page-title{font-size:1.6rem}@-webkit-keyframes slideInBottom{0%{-webkit-transform:translate3d(0,75pt,0);opacity:0;transform:translate3d(0,75pt,0)}to{-webkit-transform:translate3d(0,0,0);opacity:1;transform:translate3d(0,0,0)}}@keyframes slideInBottom{0%{-webkit-transform:translate3d(0,75pt,0);opacity:0;transform:translate3d(0,75pt,0)}to{-webkit-transform:translate3d(0,0,0);opacity:1;transform:translate3d(0,0,0)}}@-webkit-keyframes slideInTop{0%{-webkit-transform:translate3d(0,-20px,0);height:auto;opacity:0;transform:translate3d(0,-20px,0)}to{-webkit-transform:translate3d(0,0,0);height:auto;opacity:1;transform:translate3d(0,0,0)}}@keyframes slideInTop{0%{-webkit-transform:translate3d(0,-20px,0);height:auto;opacity:0;transform:translate3d(0,-20px,0)}to{-webkit-transform:translate3d(0,0,0);height:auto;opacity:1;transform:translate3d(0,0,0)}}@-webkit-keyframes slideInTop--reduced-opacity{0%{-webkit-transform:translate3d(0,-20px,0);height:auto;opacity:0;transform:translate3d(0,-20px,0)}to{-webkit-transform:translate3d(0,0,0);height:auto;opacity:.8;transform:translate3d(0,0,0)}}@keyframes slideInTop--reduced-opacity{0%{-webkit-transform:translate3d(0,-20px,0);height:auto;opacity:0;transform:translate3d(0,-20px,0)}to{-webkit-transform:translate3d(0,0,0);height:auto;opacity:.8;transform:translate3d(0,0,0)}}@-webkit-keyframes slideOutTop{0%{-webkit-transform:translate3d(0,0,0);height:75pt;opacity:1;overflow:hidden;transform:translate3d(0,0,0)}to{-webkit-transform:translate3d(0,-20px,0);height:0;opacity:0;transform:translate3d(0,-20px,0)}}@keyframes slideOutTop{0%{-webkit-transform:translate3d(0,0,0);height:75pt;opacity:1;overflow:hidden;transform:translate3d(0,0,0)}to{-webkit-transform:translate3d(0,-20px,0);height:0;opacity:0;transform:translate3d(0,-20px,0)}}@-webkit-keyframes removeElement{0%{-webkit-transform:translate3d(0,0,0);opacity:1;transform:translate3d(0,0,0)}to{-webkit-transform:translate3d(-200px,0,0);height:0;margin:0;opacity:0;padding:0;transform:translate3d(-200px,0,0);z-index:-1}}@keyframes removeElement{0%{-webkit-transform:translate3d(0,0,0);opacity:1;transform:translate3d(0,0,0)}to{-webkit-transform:translate3d(-200px,0,0);height:0;margin:0;opacity:0;padding:0;transform:translate3d(-200px,0,0);z-index:-1}}@-webkit-keyframes removeAnswers{0%{-webkit-transform:translate3d(0,0,0);opacity:1;transform:translate3d(0,0,0)}to{-webkit-transform:translate3d(-200px,0,0);display:none;height:0;opacity:0;padding:0;transform:translate3d(-200px,0,0);z-index:-1}}@keyframes removeAnswers{0%{-webkit-transform:translate3d(0,0,0);opacity:1;transform:translate3d(0,0,0)}to{-webkit-transform:translate3d(-200px,0,0);display:none;height:0;opacity:0;padding:0;transform:translate3d(-200px,0,0);z-index:-1}}@-webkit-keyframes removeQuestion{0%{-webkit-transform:translatex(0);opacity:1;transform:translatex(0)}to{-webkit-transform:translatex(-200px);opacity:0;transform:translatex(-200px)}}@keyframes removeQuestion{0%{-webkit-transform:translatex(0);opacity:1;transform:translatex(0)}to{-webkit-transform:translatex(-200px);opacity:0;transform:translatex(-200px)}}@-webkit-keyframes showNextQuestion{0%{-webkit-transform:translatex(200px);opacity:0;transform:translatex(200px)}to{-webkit-transform:translatex(0);opacity:1;transform:translatex(0)}}@keyframes showNextQuestion{0%{-webkit-transform:translatex(200px);opacity:0;transform:translatex(200px)}to{-webkit-transform:translatex(0);opacity:1;transform:translatex(0)}}@-webkit-keyframes expand{0%{-webkit-transform:scale3d(1,1,1);box-shadow:0 0 0 rgba(0,0,0,.3);opacity:.8;transform:scale3d(1,1,1)}to{-webkit-transform:scale3d(1,1,1);box-shadow:0 0 0 rgba(0,0,0,.3),inset 0 2px 0 rgba(0,0,0,.2);opacity:1;transform:scale3d(1,1,1)}40%{opacity:1}70%{-webkit-transform:scale3d(1.1,1.1,1);box-shadow:0 0 8px rgba(0,0,0,.4);opacity:1;transform:scale3d(1.1,1.1,1)}}@keyframes expand{0%{-webkit-transform:scale3d(1,1,1);box-shadow:0 0 0 rgba(0,0,0,.3);opacity:.8;transform:scale3d(1,1,1)}to{-webkit-transform:scale3d(1,1,1);box-shadow:0 0 0 rgba(0,0,0,.3),inset 0 2px 0 rgba(0,0,0,.2);opacity:1;transform:scale3d(1,1,1)}40%{opacity:1}70%{-webkit-transform:scale3d(1.1,1.1,1);box-shadow:0 0 8px rgba(0,0,0,.4);opacity:1;transform:scale3d(1.1,1.1,1)}}@-webkit-keyframes checkmark{0%,to{-webkit-transform:scale3d(.2,.2,1);opacity:0;transform:scale3d(.2,.2,1)}10%,92%{-webkit-transform:scale3d(1.4,1.4,1);transform:scale3d(1.4,1.4,1)}12%{-webkit-transform:scale3d(1,1,1);transform:scale3d(1,1,1)}5%{opacity:1}90%{-webkit-transform:scale3d(1,1,1);opacity:1;transform:scale3d(1,1,1)}}@keyframes checkmark{0%,to{-webkit-transform:scale3d(.2,.2,1);opacity:0;transform:scale3d(.2,.2,1)}10%,92%{-webkit-transform:scale3d(1.4,1.4,1);transform:scale3d(1.4,1.4,1)}12%{-webkit-transform:scale3d(1,1,1);transform:scale3d(1,1,1)}5%{opacity:1}90%{-webkit-transform:scale3d(1,1,1);opacity:1;transform:scale3d(1,1,1)}}@-webkit-keyframes fadeOut{0%{opacity:1}to{opacity:0}}@keyframes fadeOut{0%{opacity:1}to{opacity:0}}@-webkit-keyframes fadeIn{0%{opacity:0}to{opacity:1}}@keyframes fadeIn{0%{opacity:0}to{opacity:1}}@-webkit-keyframes navSlideIn{0%{-webkit-transform:translate3d(0,-200px,0);transform:translate3d(0,-200px,0)}to{-webkit-transform:translate3d(0,0,0);transform:translate3d(0,0,0)}}@keyframes navSlideIn{0%{-webkit-transform:translate3d(0,-200px,0);transform:translate3d(0,-200px,0)}to{-webkit-transform:translate3d(0,0,0);transform:translate3d(0,0,0)}}.spinner{margin:0 auto;text-align:center;width:70px}.spinner>div{-webkit-animation:sk-bouncedelay 1.4s infinite ease-in-out both;animation:sk-bouncedelay 1.4s infinite ease-in-out both;background-color:#333;border-radius:100%;display:inline-block;height:18px;width:18px}.spinner .bounce1{-webkit-animation-delay:-.32s;animation-delay:-.32s}.spinner .bounce2{-webkit-animation-delay:-.16s;animation-delay:-.16s}@-webkit-keyframes sk-bouncedelay{0%,80%,to{-webkit-transform:scale(0)}40%{-webkit-transform:scale(1)}}@keyframes sk-bouncedelay{0%,80%,to{-webkit-transform:scale(0);transform:scale(0)}40%{-webkit-transform:scale(1);transform:scale(1)}}#enp-quiz{transition:background .25s cubic-bezier(0,0,.3,1)}#enp-quiz .enp-container{margin-left:auto;margin-right:auto;max-width:40pc;padding-left:20px;padding-right:20px}#enp-quiz .enp-container:after{clear:both;content:"";display:table}#enp-quiz .enp-aside{background:#fff;border:1px solid #eee;border-bottom-color:#ccc;font-size:1.2rem;margin-bottom:1.6rem;margin-left:auto;margin-right:auto;max-width:32pc;padding:1.6rem 20px}@media(min-width:700px){#enp-quiz .enp-aside{margin-bottom:2.6rem;padding:1.6rem 2rem}}#enp-quiz .enp-aside:after{clear:both;content:"";display:table}#enp-quiz .enp-aside__title{font-size:.85rem;font-weight:600;text-transform:uppercase}#enp-quiz .enp-page-title{border-bottom:2px solid #333f48}#enp-quiz fieldset{border:0;margin:0;padding:0}#enp-quiz .enp-label{color:#5e5e5e;display:block;font-size:.85rem;font-weight:400;text-transform:uppercase}#enp-quiz .enp-legend{border:0;color:#5e5e5e;display:block;font-size:.85rem;font-weight:400;margin-bottom:.2rem;padding-top:1.6rem;text-transform:uppercase}#enp-quiz .enp-input{background:#fff;border:1px solid #aaa;border-radius:3px;font-family:tablet-gothic,helvetica neue,helvetica,arial,sans-serif;font-size:1rem;margin-bottom:1.2rem;max-width:100%;padding:.8rem .5rem;width:20rem}@media(min-width:700px){#enp-quiz .enp-input{padding:.8rem}}#enp-quiz .enp-input.enp-input--has-description{margin-bottom:.2rem}#enp-quiz .enp-input-description,#enp-quiz .enp-textarea-description{font-size:.85rem;margin-bottom:1rem}#enp-quiz .enp-input-description--before,#enp-quiz .enp-textarea-description--before{margin-bottom:0}#enp-quiz .enp-input:-ms-input-placeholder,#enp-quiz .enp-input::-ms-input-placeholder,#enp-quiz .enp-input::-webkit-input-placeholder,#enp-quiz .enp-input::placeholder,#enp-quiz .enp-textarea:-ms-input-placeholder,#enp-quiz .enp-textarea::-ms-input-placeholder,#enp-quiz .enp-textarea::-webkit-input-placeholder,#enp-quiz .enp-textarea::placeholder{color:#aaa;font-family:tablet-gothic,helvetica neue,helvetica,arial,sans-serif;font-weight:300}#enp-quiz .enp-textarea{background:#fff;border:1px solid #aaa;border-radius:3px;font-family:tablet-gothic,helvetica neue,helvetica,arial,sans-serif;font-size:1rem;line-height:1.5;margin-bottom:1.2rem;max-width:100%;padding:.8rem .5rem;width:100%}@media(min-width:700px){#enp-quiz .enp-textarea{padding:.8rem}}#enp-quiz .enp-textarea:focus{outline-color:#4d90fe;outline-offset:-2px;outline-style:auto;outline-width:5px}#enp-quiz .enp-textarea.enp-textarea--has-description{margin-bottom:.2rem}#enp-quiz .enp-textarea.enp-textarea--has-description--before{margin-bottom:1.2rem}#enp-quiz .enp-embed-code{background:#fff;border:1px solid #aaa;border-radius:3px;font-family:Monaco,Consolas,Andale Mono,DejaVu Sans Mono,monospace;font-size:.9rem;line-height:1.5;margin-bottom:1.2rem;max-width:100%;padding:1.6rem;width:100%}@media(min-width:700px){#enp-quiz .enp-embed-code{padding:.8rem}}#enp-quiz .enp-embed-code:focus{outline-color:#4d90fe;outline-offset:-2px;outline-style:auto;outline-width:5px}#enp-quiz .enp-preview-page-container,#enp-quiz .enp-publish-page-container,#enp-quiz .enp-quiz-form-container{background:#f8f8f8;margin-left:auto;margin-right:auto;max-width:40pc;padding:6rem 20px 4rem;position:relative}#enp-quiz .enp-preview-page-container:after,#enp-quiz .enp-publish-page-container:after,#enp-quiz .enp-quiz-form-container:after{clear:both;content:"";display:table}@media(min-width:700px){#enp-quiz .enp-preview-page-container,#enp-quiz .enp-publish-page-container,#enp-quiz .enp-quiz-form-container{max-width:840px}}@media(min-width:750pt){#enp-quiz .enp-preview-page-container,#enp-quiz .enp-publish-page-container,#enp-quiz .enp-quiz-form-container{max-width:750pt}}#enp-quiz .enp-quiz-form{margin-left:auto;margin-right:auto;max-width:32pc;padding-left:0;padding-right:0}#enp-quiz .enp-quiz-form:after{clear:both;content:"";display:table}#enp-quiz .enp-quiz-form .enp-input,#enp-quiz .enp-quiz-form .enp-textarea{width:100%}#enp-quiz .enp-quiz-title__label{color:#5e5e5e;display:block;font-size:.85rem;font-weight:500;text-transform:uppercase}#enp-quiz .enp-quiz-title__textarea{background:#fff;border:1px solid #aaa;border-radius:3px;font-family:tablet-gothic,helvetica neue,helvetica,arial,sans-serif;font-size:1.6rem;font-weight:700;margin-bottom:1rem;max-width:100%;padding:.8rem .5rem;width:20rem}@media(min-width:700px){#enp-quiz .enp-quiz-title__textarea{padding:.8rem}}#enp-quiz .enp-quiz-title__textarea:-ms-input-placeholder,#enp-quiz .enp-quiz-title__textarea::-ms-input-placeholder,#enp-quiz .enp-quiz-title__textarea::-webkit-input-placeholder,#enp-quiz .enp-quiz-title__textarea::placeholder{font-weight:700}#enp-quiz textarea{color:#000}#enp-quiz .enp-accordion-container{margin-bottom:1.6rem;position:relative}#enp-quiz .enp-question-content{background:#fff;padding-top:0;position:relative;width:100%}#enp-quiz .enp-question-inner{padding:1.6rem 1.6rem 1rem}@media(min-width:700px){#enp-quiz .enp-question-inner{padding-left:2.9rem;padding-right:2.8rem}}#enp-quiz .enp-question-title__label{color:#5e5e5e;display:block;font-size:.85rem;font-weight:500;text-transform:uppercase}#enp-quiz .enp-question-title__textarea{background:#fff;border:1px solid #aaa;border-radius:3px;font-family:tablet-gothic,helvetica neue,helvetica,arial,sans-serif;font-size:1.3rem;margin-bottom:1.2rem;max-width:100%;padding:1rem 1.2rem;width:20rem}@media(min-width:700px){#enp-quiz .enp-question-title__textarea{padding:.8rem}}#enp-quiz .enp-question-image-upload{-webkit-transform:translate3d(0,0,0);background:#f5f5f5;border:2px dashed #bbb;border-radius:3px;box-shadow:none;color:#666;cursor:pointer;font-size:.85rem;font-weight:400;letter-spacing:.05em;line-height:1.6;margin-bottom:2rem;padding:.85em 1.4em .75em;position:relative;text-align:center;text-transform:uppercase;transform:translate3d(0,0,0);transition:all .3s cubic-bezier(0,0,.3,1)}#enp-quiz .enp-question-image-upload:focus,#enp-quiz .enp-question-image-upload:hover{background:#222a30;box-shadow:none;color:#fff}#enp-quiz .enp-question-image-upload:active{background:#5d7384;box-shadow:inset 0 2px 0 rgba(0,0,0,.1);color:#fff}#enp-quiz .enp-question-image-upload:focus{outline-color:#4d90fe;outline-offset:-2px;outline-style:auto;outline-width:5px}#enp-quiz .enp-question-image-upload:disabled,#enp-quiz .enp-question-image-upload:disabled:focus,#enp-quiz .enp-question-image-upload:disabled:hover{background:#333f48;cursor:default;opacity:.5}#enp-quiz .enp-question-image-upload:focus,#enp-quiz .enp-question-image-upload:hover{background:hsla(0,0%,100%,.9);border:2px dashed #999;color:#444}#enp-quiz .enp-question-image-upload .enp-question-image-upload__icon--photo{-webkit-transform:translate3d(0,0,0);height:2.8rem;left:0;margin:0 auto;opacity:0;position:absolute;right:0;top:0;transform:translate3d(0,0,0);transition:opacity .2s,transform .3s cubic-bezier(0,0,.3,1),-webkit-transform .3s cubic-bezier(0,0,.3,1);width:2.8rem;z-index:-1}#enp-quiz .enp-question-image-upload .enp-question-image-upload__icon--add{background:#666;border-radius:50%;fill:#f5f5f5;height:1rem;margin-right:5px;padding:.02rem;position:relative;top:.2rem;width:1rem}#enp-quiz .enp-question-image-upload:active,#enp-quiz .enp-question-image-upload:focus,#enp-quiz .enp-question-image-upload:hover{padding-bottom:2rem;padding-top:5rem}#enp-quiz .enp-question-image-upload:active .enp-question-image-upload__icon--photo,#enp-quiz .enp-question-image-upload:focus .enp-question-image-upload__icon--photo,#enp-quiz .enp-question-image-upload:hover .enp-question-image-upload__icon--photo{-webkit-transform:translate3d(0,1.75rem,0);opacity:1;transform:translate3d(0,1.75rem,0);z-index:1}#enp-quiz .enp-question-image-upload:active .enp-question-image-upload__icon--add,#enp-quiz .enp-question-image-upload:focus .enp-question-image-upload__icon--add,#enp-quiz .enp-question-image-upload:hover .enp-question-image-upload__icon--add{background:#444;fill:#fff}#enp-quiz .enp-question-image__container{margin-bottom:1rem;position:relative}#enp-quiz .enp-question-image{margin-bottom:1.2rem}#enp-quiz .enp-question-type__legend{border:0;color:#5e5e5e;display:block;font-size:.85rem;font-weight:400;margin-bottom:.2rem;padding-top:1.6rem;text-transform:uppercase}#enp-quiz .enp-question-type__input{clip:rect(1px,1px,1px,1px);height:1px;left:-625pc;overflow:hidden;position:absolute!important;top:auto;width:1px}#enp-quiz .enp-question-type__label{border-radius:3px;cursor:pointer;display:inline-block;padding:.2rem .5rem;text-transform:capitalize}#enp-quiz .enp-question-type__input:checked+.enp-question-type__label{background:#3bb275;color:#fff;text-shadow:0 0 1px rgba(0,0,0,.7)}#enp-quiz .enp-question-type__input:focus+.enp-question-type__label{outline-color:#4d90fe;outline-offset:-2px;outline-style:auto;outline-width:5px;z-index:8}#enp-quiz .enp-question-type__label{position:relative;z-index:9}#enp-quiz .enp-mc-options,#enp-quiz .enp-slider-options{-webkit-animation:slideOutTop .25s cubic-bezier(0,0,.3,1) forwards;-webkit-animation-delay:0s,.05s;animation:slideOutTop .25s cubic-bezier(0,0,.3,1) forwards;animation-delay:0s,.05s;display:none;margin-top:0}#enp-quiz .enp-question-type__input--mc:checked~.enp-mc-options,#enp-quiz .enp-question-type__input--slider:checked~.enp-slider-options{-webkit-animation:fadeIn .45s cubic-bezier(0,0,.3,1) forwards;animation:fadeIn .45s cubic-bezier(0,0,.3,1) forwards;display:block;visibility:visible}#enp-quiz .enp-mc-options__list{list-style:none;margin-left:0}#enp-quiz .enp-mc-option{padding-left:6px;position:relative}@media(min-width:700px){#enp-quiz .enp-mc-option{padding-left:0}}#enp-quiz .enp-mc-options__legend{color:#5e5e5e;display:block;font-size:.85rem;font-weight:500;text-transform:uppercase}#enp-quiz .enp-mc-option__add,#enp-quiz .enp-mc-option__button--correct,#enp-quiz .enp-mc-option__button--delete{display:none}#enp-quiz .enp-question-type__input--mc:checked~.enp-mc-options .enp-mc-option__add,#enp-quiz .enp-question-type__input--mc:checked~.enp-mc-options .enp-mc-option__button--correct,#enp-quiz .enp-question-type__input--mc:checked~.enp-mc-options .enp-mc-option__button--delete{display:block}#enp-quiz .enp-button__question-image-delete,#enp-quiz .enp-mc-option__button--delete{background:0;border:0;box-shadow:none;cursor:pointer;fill:#bbb;margin:0;padding:0;position:absolute;right:-24px;top:9px}@media(min-width:700px){#enp-quiz .enp-button__question-image-delete,#enp-quiz .enp-mc-option__button--delete{right:-30px}}#enp-quiz .enp-button__question-image-delete:focus,#enp-quiz .enp-button__question-image-delete:hover,#enp-quiz .enp-mc-option__button--delete:focus,#enp-quiz .enp-mc-option__button--delete:hover{fill:#bf5700}#enp-quiz .enp-mc-option__button--correct{background:0;border:0;box-shadow:none;left:-24px;margin:0;padding:0;position:absolute;top:8px}@media(min-width:700px){#enp-quiz .enp-mc-option__button--correct{left:-35px}}#enp-quiz .enp-mc-option__button--correct .enp-mc-option__icon--correct{background:#fff;border:2px solid #e97763;border-radius:50%;cursor:pointer;fill:#fff;height:28px;padding:.05em;transition:all .2s;width:28px}@media(min-width:700px){#enp-quiz .enp-mc-option__button--correct .enp-mc-option__icon--correct{padding:.15em}}#enp-quiz .enp-mc-option__button--correct:focus .enp-mc-option__icon--correct,#enp-quiz .enp-mc-option__button--correct:hover .enp-mc-option__icon--correct{background:#fff;border-color:#3bb275;fill:#3bb275}#enp-quiz .enp-mc-option__button--correct:disabled{opacity:1}#enp-quiz .enp-mc-option__button--correct:disabled .enp-mc-option__icon--correct{border:2px solid transparent;cursor:default;fill:#fff}#enp-quiz .enp-mc-option--correct .enp-mc-option__input{border:1px solid #3bb275;box-shadow:inset 0 0 3px #3bb275}#enp-quiz .enp-mc-option--correct .enp-mc-option__button--correct:focus .enp-mc-option__icon--correct,#enp-quiz .enp-mc-option--correct .enp-mc-option__button--correct:hover .enp-mc-option__icon--correct,#enp-quiz .enp-mc-option--correct .enp-mc-option__icon--correct{background:#3bb275;border-color:#3bb275;fill:#fff}#enp-quiz .enp-mc-option__add{background:#f5f5f5;border:2px dashed #bbb;border-radius:3px;box-shadow:none;color:#666;cursor:pointer;font-size:.85rem;font-weight:400;letter-spacing:.05em;line-height:1.6;padding:.7rem .75rem .8rem;text-align:left;text-transform:uppercase;transition:all .2s}#enp-quiz .enp-mc-option__add:focus,#enp-quiz .enp-mc-option__add:hover{background:#222a30;box-shadow:none;color:#fff}#enp-quiz .enp-mc-option__add:active{background:#5d7384;box-shadow:inset 0 2px 0 rgba(0,0,0,.1);color:#fff}#enp-quiz .enp-mc-option__add:focus{outline-color:#4d90fe;outline-offset:-2px;outline-style:auto;outline-width:5px}#enp-quiz .enp-mc-option__add:disabled,#enp-quiz .enp-mc-option__add:disabled:focus,#enp-quiz .enp-mc-option__add:disabled:hover{background:#333f48;cursor:default;opacity:.5}#enp-quiz .enp-mc-option__add:focus,#enp-quiz .enp-mc-option__add:hover{background:hsla(0,0%,100%,.9);border:2px dashed #999;color:#444}#enp-quiz .enp-mc-option__add .enp-mc-option__add__icon{background:#666;border-radius:50%;fill:#f5f5f5;height:1rem;margin-right:5px;padding:.02rem;position:relative;top:.2rem;width:1rem}#enp-quiz .enp-mc-option__add:hover .enp-mc-option__add__icon{background:#444;fill:#fff}#enp-quiz .enp-slider-options .enp-input{max-width:11.8rem}#enp-quiz .enp-slider-correct__container .enp-input,#enp-quiz .enp-slider-range__container .enp-input{max-width:8.8rem}@media(min-width:25pc){#enp-quiz .enp-slider-correct__container .enp-input,#enp-quiz .enp-slider-range__container .enp-input{max-width:11.8rem}}#enp-quiz .enp-slider-preview{border:1px solid #ddd;margin-bottom:1.6rem;margin-top:.2rem;padding:1.6rem 1.6rem .6rem;position:relative}#enp-quiz .enp-slider-preview .enp-label--slider-preview{font-size:.75rem;left:.4rem;position:absolute;text-transform:uppercase;top:.2rem;width:100%}#enp-quiz .enp-slider-correct__container,#enp-quiz .enp-slider-range__container{align-items:center;display:flex;justify-content:space-between}#enp-quiz .enp-slider-correct__helper,#enp-quiz .enp-slider-range__helper{background:#fff;color:#777;font-size:.85rem;padding:0 .3rem;position:relative}#enp-quiz .enp-slider-correct__helper:before,#enp-quiz .enp-slider-range__helper:before{background:#ddd;content:"";height:4px;left:-60px;position:absolute;top:44%;transition:width .7s cubic-bezier(0,0,.3,1),background 1.6s cubic-bezier(0,0,.3,1);width:90pt;z-index:-1}#enp-quiz .enp-slider-options{margin-bottom:2rem}#enp-quiz .enp-slider-options .enp-accordion-header{font-size:.85rem;padding:.675rem;text-transform:uppercase}#enp-quiz .enp-slider-options .enp-slider-advanced-options__content{border:0;box-shadow:none;margin-bottom:0;padding-bottom:0;padding-top:1rem}#enp-quiz .enp-slider-correct-high__container{position:relative}#enp-quiz .enp-slider-correct-high__input-container--hidden{display:none}#enp-quiz .enp-slider-correct__helper--hidden:before{background:#3bb275;width:0}#enp-quiz .enp-slider-correct-answer-range--add-range{background:#f5f5f5;border:2px dashed #bbb;border-radius:3px;box-shadow:none;color:#666;cursor:pointer;font-size:.7rem;font-weight:400;letter-spacing:.05em;line-height:1.6;margin-left:.8rem;padding:.85em 1.4em .75em;text-align:center;text-transform:uppercase;transition:all .2s}#enp-quiz .enp-slider-correct-answer-range--add-range:focus,#enp-quiz .enp-slider-correct-answer-range--add-range:hover{background:#222a30;box-shadow:none;color:#fff}#enp-quiz .enp-slider-correct-answer-range--add-range:active{background:#5d7384;box-shadow:inset 0 2px 0 rgba(0,0,0,.1);color:#fff}#enp-quiz .enp-slider-correct-answer-range--add-range:focus{outline-color:#4d90fe;outline-offset:-2px;outline-style:auto;outline-width:5px}#enp-quiz .enp-slider-correct-answer-range--add-range:disabled,#enp-quiz .enp-slider-correct-answer-range--add-range:disabled:focus,#enp-quiz .enp-slider-correct-answer-range--add-range:disabled:hover{background:#333f48;cursor:default;opacity:.5}#enp-quiz .enp-slider-correct-answer-range--add-range:focus,#enp-quiz .enp-slider-correct-answer-range--add-range:hover{background:hsla(0,0%,100%,.9);border:2px dashed #999;color:#444}@media(min-width:25pc){#enp-quiz .enp-slider-correct-answer-range--add-range{font-size:.8rem;padding:.7rem}}@media(min-width:700px){#enp-quiz .enp-slider-correct-answer-range--add-range{min-width:11.4rem;padding:.7rem 1.2rem}}#enp-quiz .enp-slider-correct-answer-range--add-range .enp-slider-correct-answer-range__icon{background:#666;border-radius:50%;fill:#f5f5f5;height:1rem;left:-.2rem;margin-right:5px;padding:.02rem;position:relative;width:1rem}#enp-quiz .enp-slider-correct-answer-range--add-range:hover .enp-slider-correct-answer-range__icon{background:#444;fill:#fff}#enp-quiz .enp-slider-correct-answer-range--remove-range{background:0;border:0;bottom:1.6rem;box-shadow:none;padding:0 .1rem;position:absolute;right:-1.6rem}#enp-quiz .enp-slider-correct-answer-range--remove-range .enp-slider-correct-answer-range__icon{fill:#666;height:1.2em;width:1.2em}#enp-quiz .enp-slider-correct-answer-range--remove-range:focus .enp-slider-correct-answer-range__icon,#enp-quiz .enp-slider-correct-answer-range--remove-range:hover .enp-slider-correct-answer-range__icon{fill:#bf5700}@media(min-width:700px){#enp-quiz .enp-slider-correct-answer-range--remove-range{bottom:auto;right:-.2rem;top:-.2rem}}#enp-quiz .enp-slider-options .enp-input:-moz-read-only,#enp-quiz .enp-slider-options .enp-input:read-only{background:#f5f5f5}#enp-quiz .enp-answer-explanation{background:#eaf4ff;box-shadow:inset 1px 0 0 #ccc,inset -1px -1px 0 #ccc,inset 0 1px 0 #ddd;padding-top:2rem}#enp-quiz .enp-answer-explanation__label{color:#5e5e5e;display:block;font-size:.85rem;font-weight:500;text-transform:uppercase}#enp-quiz .enp-question__button--delete{background:0;border:0;box-shadow:none;cursor:pointer;fill:#bbb;margin:0;padding:0;position:absolute;right:9px;top:9px}@media(min-width:700px){#enp-quiz .enp-question__button--delete{right:-30px}}#enp-quiz .enp-question__button--delete:hover{fill:#bf5700}#enp-quiz .enp-question__move{left:15px;position:absolute}@media(min-width:700px){#enp-quiz .enp-question__move{left:-40px}}#enp-quiz .enp-sort__placeholder{background:#ddd;height:60px;margin-bottom:1.6rem;max-height:90pt;width:100%}#enp-quiz .ui-sortable .ui-sortable-helper .ui-sortable-handle{cursor:-webkit-grabbing}#enp-quiz .enp-question__button--move{background:0;border:0;box-shadow:none;cursor:pointer;fill:#bbb;margin:0;padding:0;position:absolute}#enp-quiz .enp-question__button--move:focus,#enp-quiz .enp-question__button--move:hover{fill:#333}#enp-quiz .enp-question__button--move:disabled{opacity:.5}#enp-quiz .enp-question__button--move--up{left:-9px;top:0}#enp-quiz .enp-question__button--move--down{right:-9px;top:3px}#enp-quiz .enp-quiz-form__add-question{background:0;border:3px dashed #666;border-radius:3px;box-shadow:none;color:#545454;cursor:pointer;font-size:15px;font-weight:400;letter-spacing:.05em;line-height:1.6;margin-bottom:2rem;margin-top:1.6rem;padding:1rem 1.4em;text-align:center;text-transform:uppercase;transition:all .2s}#enp-quiz .enp-quiz-form__add-question:focus,#enp-quiz .enp-quiz-form__add-question:hover{background:#222a30;box-shadow:none;color:#fff}#enp-quiz .enp-quiz-form__add-question:active{box-shadow:inset 0 2px 0 rgba(0,0,0,.1);color:#fff}#enp-quiz .enp-quiz-form__add-question:focus{outline-color:#4d90fe;outline-offset:-2px;outline-style:auto;outline-width:5px}#enp-quiz .enp-quiz-form__add-question:disabled,#enp-quiz .enp-quiz-form__add-question:disabled:focus,#enp-quiz .enp-quiz-form__add-question:disabled:hover{background:#333f48;cursor:default;opacity:.5}#enp-quiz .enp-quiz-form__add-question:focus,#enp-quiz .enp-quiz-form__add-question:hover{background:#222a30;box-shadow:none;color:#fff}#enp-quiz .enp-quiz-form__add-question:active{background:#5d7384;box-shadow:inset 0 2px 0 rgba(0,0,0,.1);color:#fff}#enp-quiz .enp-quiz-form__add-question:focus{outline-color:#4d90fe;outline-offset:-2px;outline-style:auto;outline-width:5px}#enp-quiz .enp-quiz-form__add-question:disabled,#enp-quiz .enp-quiz-form__add-question:disabled:focus,#enp-quiz .enp-quiz-form__add-question:disabled:hover{background:#333f48;cursor:default;opacity:.5}#enp-quiz .enp-quiz-form__add-question:focus,#enp-quiz .enp-quiz-form__add-question:hover{background:hsla(0,0%,100%,.9);border:3px dashed #444;color:#444}#enp-quiz .enp-quiz-form__add-question .enp-add-question__icon{background:#666;border-radius:50%;fill:#f5f5f5;height:1.2rem;margin-right:5px;padding:.02rem;position:relative;top:.2rem;width:1.2rem}#enp-quiz .enp-quiz-form__add-question:hover .enp-add-question__icon{background:#444;fill:#fff}#enp-quiz .enp-quiz-form__save{background:#333f48;border:0;border-radius:3px;box-shadow:inset 0 -2px 0 rgba(0,0,0,.2);color:#fff;cursor:pointer;font-size:15px;font-weight:400;letter-spacing:.05em;line-height:1.6;margin-bottom:1rem;opacity:.8;padding:.85em 1.4em .75em;text-align:center;text-shadow:0 -1px 2px rgba(0,0,0,.6);text-transform:uppercase;transition:all .2s;width:100%}#enp-quiz .enp-quiz-form__save:focus,#enp-quiz .enp-quiz-form__save:hover{background:#222a30;box-shadow:none;color:#fff}#enp-quiz .enp-quiz-form__save:active{background:#5d7384;box-shadow:inset 0 2px 0 rgba(0,0,0,.1);color:#fff}#enp-quiz .enp-quiz-form__save:focus{outline-color:#4d90fe;outline-offset:-2px;outline-style:auto;outline-width:5px}#enp-quiz .enp-quiz-form__save:disabled,#enp-quiz .enp-quiz-form__save:disabled:focus,#enp-quiz .enp-quiz-form__save:disabled:hover{background:#333f48;cursor:default;opacity:.5}#enp-quiz .enp-quiz-form__save:focus,#enp-quiz .enp-quiz-form__save:hover{opacity:1}@media(min-width:25pc){#enp-quiz .enp-quiz-form__save{margin-right:3%;margin-top:1.6rem;padding:1.2rem 1.8rem 1.1rem;position:relative;top:-2px;width:27%}}#enp-quiz .enp-quiz-form__save--reveal{-webkit-animation:slideInTop--reduced-opacity .3s cubic-bezier(0,0,.3,1);animation:slideInTop--reduced-opacity .3s cubic-bezier(0,0,.3,1)}#enp-quiz .enp-btn--next-step{background:#333f48;border:0;border-radius:3px;box-shadow:inset 0 -2px 0 rgba(0,0,0,.2);color:#fff;cursor:pointer;font-size:15px;font-weight:400;letter-spacing:.05em;line-height:1.6;text-align:center;text-transform:uppercase;transition:all .2s}#enp-quiz .enp-btn--next-step:focus,#enp-quiz .enp-btn--next-step:hover{background:#222a30;box-shadow:none;color:#fff}#enp-quiz .enp-btn--next-step:active{background:#5d7384;box-shadow:inset 0 2px 0 rgba(0,0,0,.1);color:#fff}#enp-quiz .enp-btn--next-step:focus{outline-color:#4d90fe;outline-offset:-2px;outline-style:auto;outline-width:5px}#enp-quiz .enp-btn--next-step:disabled,#enp-quiz .enp-btn--next-step:disabled:focus,#enp-quiz .enp-btn--next-step:disabled:hover{background:#333f48;cursor:default;opacity:.5}#enp-quiz .enp-btn--next-step__icon{background:#fff;border-radius:50%;fill:#333f48;height:1.2rem;margin-left:.5em;position:relative;top:.15rem;width:1.2rem}#enp-quiz .enp-btn--next-step__icon:hover{background:#fff;fill:#222a30}#enp-quiz .enp-btn--next-step{padding:1rem 1.4rem;width:100%}@media(min-width:25pc){#enp-quiz .enp-btn--next-step{width:68%}}#enp-quiz .enp-btn--next-step--reveal{-webkit-animation:slideInTop .3s cubic-bezier(0,0,.3,1);animation:slideInTop .3s cubic-bezier(0,0,.3,1)}#enp-quiz .enp-accordion-header--inserting,#enp-quiz .enp-mc-option--inputs{-webkit-animation:slideInBottom .4s cubic-bezier(0,0,.3,1) forwards;animation:slideInBottom .4s cubic-bezier(0,0,.3,1) forwards}#enp-quiz .enp-mc-option--remove,#enp-quiz .enp-question--remove,#enp-quiz .enp-question__image--remove{-webkit-animation:removeElement .5s cubic-bezier(0,0,.3,1) forwards;animation:removeElement .5s cubic-bezier(0,0,.3,1) forwards}#enp-quiz .enp-image-upload-wait{background:#f5f5f5;border:2px dashed #bbb;border-radius:3px;box-shadow:none;color:#666;cursor:pointer;font-size:15px;font-weight:400;letter-spacing:.05em;line-height:1.6;margin-bottom:1rem;padding:4rem 1.4em;text-align:center;text-transform:uppercase;transition:all .2s;width:100%}#enp-quiz .enp-image-upload-wait:focus,#enp-quiz .enp-image-upload-wait:hover{background:#222a30;box-shadow:none;color:#fff}#enp-quiz .enp-image-upload-wait:active{background:#5d7384;box-shadow:inset 0 2px 0 rgba(0,0,0,.1);color:#fff}#enp-quiz .enp-image-upload-wait:focus{outline-color:#4d90fe;outline-offset:-2px;outline-style:auto;outline-width:5px}#enp-quiz .enp-image-upload-wait:disabled,#enp-quiz .enp-image-upload-wait:disabled:focus,#enp-quiz .enp-image-upload-wait:disabled:hover{background:#333f48;cursor:default;opacity:.5}#enp-quiz .enp-image-upload-wait:focus,#enp-quiz .enp-image-upload-wait:hover{background:hsla(0,0%,100%,.9);border:2px dashed #999;color:#444}#enp-quiz .enp-accordion-header.question-has-error{box-shadow:0 0 3px #bf5700;color:#bf5700}.enp-quiz.ui-sortable--sorting #enp-quiz .enp-accordion-content{display:none}@media(min-width:750pt){#enp-quiz .enp-quiz-settings-container{float:left;margin:0;width:40%}#enp-quiz .enp-quiz-preview-container{float:left;width:60%}}#enp-quiz .enp-quiz-settings__title,#enp-quiz .enp-quiz-share__legend{font-size:.85rem;font-weight:600;padding-top:0;position:relative;text-transform:uppercase}#enp-quiz .enp-quiz-settings__form{margin-bottom:3rem}@media(min-width:750pt){#enp-quiz .enp-quiz-settings__form{margin-bottom:0;padding:0}}@media(min-width:700px){#enp-quiz .enp-fieldset{position:relative}}@media(min-width:700px){#enp-quiz .enp-title-display__legend{padding-top:.4rem}}#enp-quiz .enp-quiz-share__input,#enp-quiz .enp-quiz-styles__input{width:100%}#enp-quiz .enp-quiz-styles__textarea--custom-css{font-family:Monaco,Consolas,Andale Mono,DejaVu Sans Mono,monospace;font-size:.9rem;min-height:200px}#enp-quiz .enp-fieldset--section{padding:1.6rem 1rem}#enp-quiz .enp-fieldset--section.enp-accordion-content--open{margin-bottom:0}#enp-quiz .enp-quiz-share--facebook{margin-bottom:2rem}#enp-quiz .enp-title-display__legend{border:0;color:#5e5e5e;display:block;font-size:.85rem;font-weight:400;margin-bottom:.2rem;padding-top:1.6rem;text-transform:uppercase}#enp-quiz .enp-title-display__input{clip:rect(1px,1px,1px,1px);height:1px;left:-625pc;overflow:hidden;position:absolute!important;top:auto;width:1px}#enp-quiz .enp-title-display__label{border-radius:3px;cursor:pointer;display:inline-block;padding:.2rem .5rem;text-transform:capitalize}#enp-quiz .enp-title-display__input:checked+.enp-title-display__label{background:#3bb275;color:#fff;text-shadow:0 0 1px rgba(0,0,0,.7)}#enp-quiz .enp-title-display__input:focus+.enp-title-display__label{outline-color:#4d90fe;outline-offset:-2px;outline-style:auto;outline-width:5px;z-index:8}#enp-quiz .enp-mc-options-order__legend{border:0;color:#5e5e5e;display:block;font-size:.85rem;font-weight:400;margin-bottom:.2rem;padding-top:1.6rem;text-transform:uppercase}#enp-quiz .enp-mc-options-order__input{clip:rect(1px,1px,1px,1px);height:1px;left:-625pc;overflow:hidden;position:absolute!important;top:auto;width:1px}#enp-quiz .enp-mc-options-order__label{border-radius:3px;cursor:pointer;display:inline-block;padding:.2rem .5rem;text-transform:capitalize}#enp-quiz .enp-mc-options-order__input:checked+.enp-mc-options-order__label{background:#3bb275;color:#fff;text-shadow:0 0 1px rgba(0,0,0,.7)}#enp-quiz .enp-mc-options-order__input:focus+.enp-mc-options-order__label{outline-color:#4d90fe;outline-offset:-2px;outline-style:auto;outline-width:5px;z-index:8}#enp-quiz .enp-mc-options-order{margin-bottom:1.6rem}#enp-quiz .enp-quiz-share__textarea{margin-bottom:2rem;min-height:7.6rem}@media(min-width:700px){#enp-quiz .enp-quiz-share__textarea{min-height:4.6rem}}@media(min-width:750pt){#enp-quiz .enp-quiz-share__textarea{min-height:7.6rem}}#enp-quiz .enp-preview-form__submit{margin-top:1.6rem}#enp-quiz .enp-quiz-preview__title{font-size:.85rem;font-weight:600;text-transform:uppercase}#enp-quiz .enp-preview-form__submit{background:#333f48;border:0;border-radius:3px;box-shadow:inset 0 -2px 0 rgba(0,0,0,.2);color:#fff;cursor:pointer;font-size:15px;font-weight:400;letter-spacing:.05em;line-height:1.6;margin-bottom:1rem;opacity:.8;padding:.85rem 1.4em;text-align:center;text-shadow:0 -1px 2px rgba(0,0,0,.6);text-transform:uppercase;transition:all .2s;width:100%}#enp-quiz .enp-preview-form__submit:focus,#enp-quiz .enp-preview-form__submit:hover{background:#222a30;box-shadow:none;color:#fff}#enp-quiz .enp-preview-form__submit:active{background:#5d7384;box-shadow:inset 0 2px 0 rgba(0,0,0,.1);color:#fff}#enp-quiz .enp-preview-form__submit:focus{outline-color:#4d90fe;outline-offset:-2px;outline-style:auto;outline-width:5px}#enp-quiz .enp-preview-form__submit:disabled,#enp-quiz .enp-preview-form__submit:disabled:focus,#enp-quiz .enp-preview-form__submit:disabled:hover{background:#333f48;cursor:default;opacity:.5}#enp-quiz .enp-preview-form__submit:focus,#enp-quiz .enp-preview-form__submit:hover{opacity:1}#enp-quiz .enp-preview-form__submit--publish{padding:1.05rem 1.8rem .95rem;position:relative;width:100%;z-index:99999999}#enp-quiz .enp-quiz-styles__iris-wrapper{position:relative}#enp-quiz .iris-picker{box-sizing:content-box;margin-bottom:1rem;padding-bottom:3rem;padding-right:30px;position:relative;top:-1.2rem;z-index:9999999999}@media(min-width:750pt){#enp-quiz .iris-picker{left:104%;position:absolute;top:-4px}}#enp-quiz .iris-picker:last-of-type{margin-bottom:0}#enp-quiz .iris-picker .ui-draggable-handle:focus .ui-slider-handle,#enp-quiz .iris-picker .ui-slider-handle:focus{box-shadow:0 0 3px rgba(0,0,0,.75)}#enp-quiz .enp-quiz-styles__set-default{background:transparent;border:2px solid #333f48;border-radius:3px;bottom:10px;box-shadow:none;color:#333f48;cursor:pointer;font-size:.75rem;font-weight:400;left:10px;letter-spacing:.05em;line-height:1.6;padding:.85em 1.4em .75em;position:absolute;text-align:center;text-transform:uppercase;transition:all .2s}#enp-quiz .enp-quiz-styles__set-default:focus,#enp-quiz .enp-quiz-styles__set-default:hover{background:#222a30;box-shadow:none;color:#fff}#enp-quiz .enp-quiz-styles__set-default:active{background:#5d7384;box-shadow:inset 0 2px 0 rgba(0,0,0,.1);color:#fff}#enp-quiz .enp-quiz-styles__set-default:focus{outline-color:#4d90fe;outline-offset:-2px;outline-style:auto;outline-width:5px}#enp-quiz .enp-quiz-styles__set-default:disabled,#enp-quiz .enp-quiz-styles__set-default:disabled:focus,#enp-quiz .enp-quiz-styles__set-default:disabled:hover{background:#333f48;cursor:default;opacity:.5}#enp-quiz .enp-quiz-styles__set-default:focus,#enp-quiz .enp-quiz-styles__set-default:hover{background:transparent;border:2px solid #222a30;color:#222a30}#enp-quiz .enp-iris__close{background:0;border:0;box-shadow:none;cursor:pointer;fill:#888;margin:0;padding:0;position:absolute;right:5px;top:5px}#enp-quiz .enp-quiz-styles__input--color{padding-left:45px}#enp-quiz .enp-quiz-styles__color-demo{border:1px solid #ccc;border-radius:3px;height:30px;left:8px;position:absolute;top:8px;width:30px}#enp-quiz .enp-share-quiz__url{display:block;font-size:1rem;line-height:1.4;word-wrap:break-word}#enp-quiz .enp-share-quiz{align-content:center;align-items:center;display:flex;list-style:none;margin-left:0}#enp-quiz .enp-share-quiz__item{margin-right:20px}#enp-quiz .enp-share-quiz__item:last-child{margin-right:0}#enp-quiz .enp-share-quiz__item__icon{background:#333f48;border-radius:50%;fill:#fff!important;height:2.4rem;padding:.6rem;width:2.4rem}#enp-quiz .enp-share-quiz__item__icon--facebook{background-color:#3a5795}#enp-quiz .enp-share-quiz__item__icon--twitter{background-color:#4099ff}#enp-quiz .enp-share-quiz{justify-content:space-around;margin-bottom:0}#enp-quiz .enp-ab-create__container{background:#f8f8f8;margin-left:auto;margin-right:auto;max-width:40pc;padding:3rem 20px;width:100%}#enp-quiz .enp-ab-create__container:after{clear:both;content:"";display:table}@media(min-width:700px){#enp-quiz .enp-ab-create__container{max-width:840px}}@media(min-width:750pt){#enp-quiz .enp-ab-create__container{max-width:750pt}}#enp-quiz .enp-ab-create__form{margin-left:auto;margin-right:auto;max-width:32pc;padding-left:20px;padding-right:20px}#enp-quiz .enp-ab-create__form:after{clear:both;content:"";display:table}#enp-quiz .enp-ab-create__label{color:#5e5e5e;display:block;font-size:.85rem;font-weight:500;text-transform:uppercase}#enp-quiz .enp-ab-create-title__textarea{background:#fff;border:1px solid #aaa;border-radius:3px;font-family:tablet-gothic,helvetica neue,helvetica,arial,sans-serif;font-size:1.6rem;font-weight:700;margin-bottom:1rem;max-width:100%;padding:.8rem .5rem;width:100%}@media(min-width:700px){#enp-quiz .enp-ab-create-title__textarea{padding:.8rem}}#enp-quiz .enp-ab-create-title__textarea:-ms-input-placeholder,#enp-quiz .enp-ab-create-title__textarea::-ms-input-placeholder,#enp-quiz .enp-ab-create-title__textarea::-webkit-input-placeholder,#enp-quiz .enp-ab-create-title__textarea::placeholder{font-weight:700}#enp-quiz .enp-ab-create__select{-moz-appearance:none;-webkit-appearance:none;appearance:none;background:url(../svg/chevron-down.svg) 100% 50% no-repeat;background-color:#fff;border:1px solid #bbb;border-radius:3px;box-shadow:inset -26px 0 0 rgba(0,0,0,.1);font-size:.85rem;margin-bottom:1.6rem;padding:.7rem 2pc .7rem .8rem;width:100%}#enp-quiz .enp-ab-create__submit{padding-bottom:1em;padding-top:1em;width:100%}#enp-quiz .enp-dash-container{background:#f8f8f8;margin-left:auto;margin-right:auto;max-width:40pc;padding:2rem 20px;transition:all .25s cubic-bezier(0,0,.3,1)}#enp-quiz .enp-dash-container:after{clear:both;content:"";display:table}@media(min-width:700px){#enp-quiz .enp-dash-container{max-width:840px}}@media(min-width:750pt){#enp-quiz .enp-dash-container{max-width:750pt}}#enp-quiz .enp-dash__section-header{display:block;margin-bottom:.325rem}@media(min-width:700px){#enp-quiz .enp-dash__section-header{align-content:flex-end;align-items:flex-end;display:flex;justify-content:space-between}}#enp-quiz .enp-search-quizzes{display:block}@media(min-width:25pc){#enp-quiz .enp-search-quizzes{align-content:flex-end;align-items:flex-end;display:flex}}#enp-quiz .enp-search-quizzes__form-item{display:block;margin-bottom:.6rem}@media(min-width:25pc){#enp-quiz .enp-search-quizzes__form-item{margin-bottom:0;margin-right:1rem}#enp-quiz .enp-search-quizzes__form-item:last-of-type{margin-right:0}}#enp-quiz .enp-quiz-search{position:relative}#enp-quiz .enp-search-quizzes__label{clip:rect(1px,1px,1px,1px);height:1px;left:-625pc;margin-bottom:0;overflow:hidden;position:absolute!important;top:auto;width:1px}#enp-quiz .enp-quiz-search__input{font-size:.85rem;margin:0 0 .1rem;max-width:10pc;padding:.3rem .3rem .3rem 26px}#enp-quiz .enp-quiz-search__icon{bottom:.3rem;height:21px;left:.2rem;position:absolute;width:21px}#enp-quiz .enp-search-quizzes__button{padding:.2rem .8rem}#enp-quiz .enp-search-results-description{font-size:.85rem}#enp-quiz .enp-search-results-description__link{white-space:nowrap}#enp-quiz .enp-search-results-description__icon{height:1.3em;left:2px;position:relative;top:4px;width:1.3em}#enp-quiz .enp-dash__section-title{font-size:.85rem;margin-bottom:.325rem;text-transform:uppercase}#enp-quiz .enp-view-toggle{cursor:pointer;display:none;opacity:.5}@media(min-width:700px){#enp-quiz .enp-view-toggle{display:flex}}#enp-quiz .enp-view-toggle__active{opacity:1}#enp-quiz .enp-sort-by{margin-left:5px}#enp-quiz .enp-dash-list{align-items:stretch;display:flex;flex-flow:row wrap;list-style:none;margin-left:0}#enp-quiz .enp-dash-item{align-content:flex-end;background:#fff;border:0;display:flex;flex-basis:100%;flex-direction:column;justify-content:flex-end;list-style:none;margin:0 0 .8rem;padding:1rem 1.2rem;transition:all .35s cubic-bezier(0,0,.3,1)}@media(min-width:700px){#enp-quiz .enp-dash-item{flex-basis:49%;margin:0 2% .8rem 0;max-width:49%}#enp-quiz .enp-dash-item:nth-child(2n){margin-right:0}}@media(min-width:750pt){#enp-quiz .enp-dash-item{flex-basis:32.5%;margin-right:1.25%;max-width:32.5%}#enp-quiz .enp-dash-item:nth-child(2n){margin-right:1.25%}#enp-quiz .enp-dash-item:nth-child(3n){margin-right:0}}#enp-quiz .enp-dash-item--published{box-shadow:inset 4px 0 0 #3bb275,0 1px 0 rgba(0,0,0,.1)}#enp-quiz .enp-dash-item--draft{box-shadow:inset 4px 0 0 #92dbb6,0 1px 0 rgba(0,0,0,.1)}#enp-quiz .enp-dash-item--remove{-webkit-animation:removeElement .5s cubic-bezier(0,0,.3,1) forwards;animation:removeElement .5s cubic-bezier(0,0,.3,1) forwards}#enp-quiz .enp-dash-list--list-view .enp-dash-item{flex-basis:100%;margin:0 0 .8rem}#enp-quiz .enp-dash-item__spinner{-webkit-animation:fadeIn .3s cubic-bezier(0,0,.3,1);align-content:center;align-items:center;animation:fadeIn .3s cubic-bezier(0,0,.3,1);background:hsla(0,59%,90%,.8);bottom:0;display:flex;justify-content:center;left:0;position:absolute;right:0;top:0;width:100%;z-index:999}#enp-quiz .enp-dash-item__header{background:#fff;border-bottom:1px solid #ddd;position:relative;z-index:99}#enp-quiz .enp-dash-item__title{font-size:1rem;padding:0 24px .375rem 0}#enp-quiz .enp-dash-item__content{padding:0 0 .375rem;position:relative;transition:all .2s cubic-bezier(0,0,.3,1)}#enp-quiz .enp-dash-item__meta{color:#565656;font-size:.75rem;font-weight:300}#enp-quiz .enp-dash-item__username{border-left:1px solid #ddd;margin-left:.2rem;padding-left:.4rem;word-wrap:break-word}#enp-quiz .enp-dash-item__title--ab-test{padding-bottom:0}#enp-quiz .enp-dash-item__ab-quizzes{color:#666;font-size:.85rem;list-style:none;margin-bottom:.8rem;margin-left:0}#enp-quiz .enp-dash-item__nav{font-size:.85rem;list-style:none;margin-bottom:0;margin-left:0}#enp-quiz .enp-dash-item__nav__item{display:inline-block;font-size:.85rem;margin-bottom:0;margin-right:10px;padding-bottom:0}#enp-quiz .enp-dash-item__nav__item a{font-weight:400}#enp-quiz .enp-dash-item__nav__item a:focus{outline:1px dotted #333f48;outline-offset:1px}#enp-quiz .enp-dash-item__nav__item:last-of-type{margin-right:0}#enp-quiz .enp-dash-item__delete{background:0;border:0;box-shadow:none;cursor:pointer;margin:0;padding:0;position:relative;top:4px}#enp-quiz .enp-dash-item__delete__icon{fill:#bbb;height:20px;width:20px}#enp-quiz .enp-dash-item__delete__icon:focus,#enp-quiz .enp-dash-item__delete__icon:hover{fill:#bf5700}#enp-quiz .enp-dash-item__nav--collapsible{-webkit-transform:translate3d(0,0,0);background:#fff;bottom:auto;display:none;margin-top:.2rem;position:absolute;right:auto;top:100%;transform:translate3d(0,0,0);transition:all .2s cubic-bezier(0,0,.3,1)}#enp-quiz .enp-dash-item__nav--collapsible .enp-dash-item__nav__item{padding:0 0 .4rem}#enp-quiz .enp-dash-item__menu-action{background:0;border:0;bottom:.2rem;color:#444;cursor:pointer;height:24px;padding:0;position:absolute;right:0}#enp-quiz .enp-dash-item__menu-action__icon{fill:#444;height:24px;transition:all .3s cubic-bezier(0,0,.3,1);width:24px}#enp-quiz .enp-dash-item__menu-action__icon--bottom{left:0;position:absolute}#enp-quiz .enp-dash-item--menu-active{-webkit-transform:translate3d(0,-3px,0);transform:translate3d(0,-3px,0)}#enp-quiz .enp-dash-item--menu-active.enp-dash-item--published{box-shadow:inset 4px 0 0 #3bb275,0 2px 2px rgba(0,0,0,.2)}#enp-quiz .enp-dash-item--menu-active.enp-dash-item--draft{box-shadow:inset 4px 0 0 #92dbb6,0 2px 2px rgba(0,0,0,.2)}#enp-quiz .enp-dash-item--menu-active .enp-dash-item__menu-action__icon--bottom{-webkit-transform:translatey(-15.5%);transform:translatey(-15.5%)}#enp-quiz .enp-dash-item--menu-active .enp-dash-item__menu-action__icon--top{-webkit-transform:rotatex(-180deg) translatey(0);transform:rotatex(-180deg) translatey(0)}#enp-quiz .enp-dash-item--menu-active .enp-dash-item__nav--collapsible{-webkit-animation:slideInTop .25s cubic-bezier(0,0,.3,1) forwards;animation:slideInTop .25s cubic-bezier(0,0,.3,1) forwards;display:block}#enp-quiz .enp-dash-item--menu-active .enp-dash-item__content{-webkit-transform:translate3d(0,.675rem,0);opacity:.4;transform:translate3d(0,.675rem,0)}#enp-quiz .enp-quiz-results{display:flex;justify-content:space-around;list-style:none;margin:.8rem 0 0;padding:0;text-align:center}#enp-quiz .enp-quiz-results__item{color:#454545;margin:0 2% 0 0;padding:0}@media(max-width:280px){#enp-quiz .enp-quiz-results__item{margin-bottom:.6rem;padding:0;width:100%}}#enp-quiz .enp-quiz-results__number{font-size:1.6rem;line-height:1;position:relative}#enp-quiz .enp-dash-item--draft .enp-quiz-results__number{opacity:.5}#enp-quiz .enp-quiz-results__number--average-score{color:#319461}#enp-quiz .enp-quiz-results__number--average-score:after{content:"%";font-size:.9rem;position:absolute;right:-1rem;top:.3rem}#enp-quiz .enp-quiz-results__label{color:#888;font-size:.7rem;font-weight:300;text-transform:uppercase}#enp-quiz .enp-quiz-list__view{align-content:flex-end;align-items:flex-end;display:flex}#enp-quiz .enp-dash-item--add-new{background:0;border:0;padding:0;position:relative}@media(min-width:700px){#enp-quiz .enp-dash-item--add-new{min-height:7rem}}#enp-quiz .enp-dash-link--add-new{background:0;border:2px dashed #bbb;border-radius:3px;box-shadow:none;color:#333f48;cursor:pointer;font-size:15px;font-weight:400;justify-content:flex-start;letter-spacing:.05em;line-height:1.6;padding:1rem 1.2rem;text-align:center;text-transform:uppercase;transition:all .2s}#enp-quiz .enp-dash-link--add-new:focus,#enp-quiz .enp-dash-link--add-new:hover{background:#222a30;box-shadow:none;color:#fff}#enp-quiz .enp-dash-link--add-new:active{background:#5d7384;box-shadow:inset 0 2px 0 rgba(0,0,0,.1);color:#fff}#enp-quiz .enp-dash-link--add-new:focus{outline-color:#4d90fe;outline-offset:-2px;outline-style:auto;outline-width:5px}#enp-quiz .enp-dash-link--add-new:disabled,#enp-quiz .enp-dash-link--add-new:disabled:focus,#enp-quiz .enp-dash-link--add-new:disabled:hover{background:#333f48;cursor:default;opacity:.5}#enp-quiz .enp-dash-link--add-new:focus,#enp-quiz .enp-dash-link--add-new:hover{background:hsla(0,0%,100%,.9);border:2px dashed #999;color:#444}@media(min-width:700px){#enp-quiz .enp-dash-link--add-new{align-content:center;align-items:center;bottom:0;display:flex;flex-direction:column;font-size:.85rem;justify-content:center;left:0;position:absolute;right:0;text-transform:uppercase;top:0}}#enp-quiz .enp-dash-link--add-new .enp-dash-link__icon{background:#333f48;border-radius:50%;fill:#fff;height:1.2rem;margin-right:5px;width:1.2rem}@media(min-width:700px){#enp-quiz .enp-dash-link--add-new .enp-dash-link__icon{height:2rem;margin:.8rem 0 .2rem;width:2rem}}#enp-quiz .enp-dash-link--add-new:hover{color:#222a30}#enp-quiz .enp-dash-link--add-new:hover .enp-dash-link__icon{background:#222a30;fill:#fff}#enp-quiz .enp-quiz-message--welcome p{color:#444}#enp-quiz .enp-paginate{align-content:center;align-items:center;display:flex;font-size:1rem;justify-content:center;list-style:none;margin-left:0}#enp-quiz .enp-paginate__link{align-content:center;align-items:center;border-radius:3px;display:flex;font-weight:400;justify-content:center;margin:0 .2rem;padding:0 .4rem}#enp-quiz .enp-paginate__link--current-page{border:2px solid #333f48}#enp-quiz .enp-paginate__item--first-page,#enp-quiz .enp-paginate__item--last-page{display:flex}#enp-quiz .enp-paginate__item--first-page:after,#enp-quiz .enp-paginate__item--last-page:before{bottom:.2rem;content:"...";font-size:1rem;opacity:.6;position:relative}#enp-quiz .enp-paginate__item--no-gap:after,#enp-quiz .enp-paginate__item--no-gap:before{content:""}#enp-quiz .enp-paginate__item--next-page{margin-left:.2rem}#enp-quiz .enp-paginate__item--previous-page{margin-right:.2rem}#enp-quiz .enp-quiz-breadcrumbs{align-content:center;align-items:center;background:#fff;border-bottom:1px solid #ddd;display:flex;justify-content:center;left:-500%;margin-left:auto;margin-right:auto;padding:10px;position:absolute;right:-500%;top:0;width:1000%;z-index:99999}#enp-quiz .enp-quiz-breadcrumbs__list{display:flex;list-style:none;margin-bottom:0;margin-left:0}#enp-quiz .enp-quiz-breadcrumbs__item{align-content:center;align-items:center;display:flex;fill:#333f48;justify-content:center;margin-right:5px}#enp-quiz .enp-quiz-breadcrumbs__item:last-of-type{margin-right:0}@media(min-width:25pc){#enp-quiz .enp-quiz-breadcrumbs__item{margin-right:10px}}#enp-quiz .enp-quiz-breadcrumbs__link--disabled{cursor:default;opacity:.65}#enp-quiz .enp-quiz-breadcrumbs__link--active{background:transparent;border:2px solid #333f48;border-radius:3px;box-shadow:none;color:#333f48;cursor:pointer;font-size:15px;font-weight:400;letter-spacing:.05em;line-height:1.6;padding:.4em 1em;text-align:center;text-transform:uppercase;transition:all .2s}#enp-quiz .enp-quiz-breadcrumbs__link--active:focus,#enp-quiz .enp-quiz-breadcrumbs__link--active:hover{background:#222a30;box-shadow:none;color:#fff}#enp-quiz .enp-quiz-breadcrumbs__link--active:active{background:#5d7384;box-shadow:inset 0 2px 0 rgba(0,0,0,.1);color:#fff}#enp-quiz .enp-quiz-breadcrumbs__link--active:focus{outline-color:#4d90fe;outline-offset:-2px;outline-style:auto;outline-width:5px}#enp-quiz .enp-quiz-breadcrumbs__link--active:disabled,#enp-quiz .enp-quiz-breadcrumbs__link--active:disabled:focus,#enp-quiz .enp-quiz-breadcrumbs__link--active:disabled:hover{background:#333f48;cursor:default;opacity:.5}#enp-quiz .enp-quiz-breadcrumbs__link--active:focus,#enp-quiz .enp-quiz-breadcrumbs__link--active:hover{background:transparent;border:2px solid #222a30;color:#222a30}#enp-quiz .enp-quiz-breadcrumbs__link{font-size:1rem;font-weight:400;letter-spacing:0;text-transform:none}#enp-quiz .enp-quiz-breadcrumbs--fixed{-webkit-animation:navSlideIn .25s;animation:navSlideIn .25s;position:fixed;top:0}#enp-quiz .enp-results-title{background:#f8f8f8;border-bottom:1px solid #ddd;font-size:1.6rem;margin:-1.2rem 0 2rem;padding:3.2rem 20px 2.6rem;text-align:center}#enp-quiz .enp-results-title:after{content:"RESULTS";display:block;font-size:.85rem;font-weight:400;text-transform:uppercase}#enp-quiz .enp-results__container{display:block;margin-left:auto;margin-right:auto;max-width:40pc;padding-left:20px;padding-right:20px}#enp-quiz .enp-results__container:after{clear:both;content:"";display:table}@media(min-width:700px){#enp-quiz .enp-results__container{max-width:840px}}@media(min-width:750pt){#enp-quiz .enp-results__container{display:flex;justify-content:space-between;max-width:750pt}}#enp-quiz .enp-quiz-scores__container,#enp-quiz .enp-results-flow__container{width:100%}@media(min-width:750pt){#enp-quiz .enp-quiz-scores__container,#enp-quiz .enp-results-flow__container{width:48%}}#enp-quiz .enp-quiz-score__line-chart{height:300px;margin-bottom:1rem}#enp-quiz .enp-quiz-score__line-chart .ct-label{color:#444}#enp-quiz .enp-quiz-score__line-chart .ct-grid{stroke:#dadada;stroke-dasharray:0}#enp-quiz .enp-quiz-score__line-chart .ct-line{stroke:#3bb275;stroke-width:2px}#enp-quiz .enp-quiz-score__line-chart .ct-point{stroke:#3bb275;stroke-width:8px}#enp-quiz .enp-quiz-scores-table{margin:0 auto;max-width:500px;width:100%}#enp-quiz .enp-quiz-scores-table tr th{background-color:#fff}#enp-quiz .enp-quiz-scores-table__label{padding-left:5%}#enp-quiz .enp-quiz-scores-table__score{padding-right:5%;text-align:right}#enp-quiz .enp-results-flow{border-radius:50%;height:20pc;margin:2rem auto;position:relative;width:20pc}@media(min-width:25pc){#enp-quiz .enp-results-flow{height:390px;width:390px}}@media(min-width:700px){#enp-quiz .enp-results-flow{height:450px;width:450px}}@media(min-width:750pt){#enp-quiz .enp-results-flow{height:25pc;width:25pc}}#enp-quiz .enp-results-flow__section-title{clip:rect(1px,1px,1px,1px);height:1px;left:-625pc;overflow:hidden;position:absolute!important;top:auto;width:1px}#enp-quiz .enp-results-flow__item{-webkit-animation:.85s slideInBottom cubic-bezier(0,0,.3,1) forwards;animation:.85s slideInBottom cubic-bezier(0,0,.3,1) forwards;border:2px solid #3bb275;border-radius:50%;height:100%;left:0;letter-spacing:.05rem;margin:0 auto;padding:12.5% 0 0;right:0;text-align:center;width:100%}#enp-quiz .enp-results-flow__item--total-views{background:#fff}#enp-quiz .enp-results-flow__item--quiz-starts{background:#eaf8f1;bottom:2.5%;height:65%;padding-top:8%;position:absolute;width:65%}#enp-quiz .enp-results-flow__item--quiz-finishes{background:#b8e8cf;bottom:5%;height:35%;position:absolute;width:35%}#enp-quiz .enp-results-flow__title{color:#444;font-size:.7rem;margin-bottom:0;text-transform:uppercase}@media(min-width:700px){#enp-quiz .enp-results-flow__title{font-weight:700;margin-bottom:2px}}#enp-quiz .enp-results-flow__number{font-size:1.4rem;font-weight:700;line-height:1.2}#enp-quiz .enp-results-flow__number--total-views{font-size:2rem}#enp-quiz .enp-results-flow__number--quiz-starts{font-size:1.65rem}#enp-quiz .enp-results-flow__percentage{color:#444;display:inline-block;font-size:.8rem;font-weight:400;left:-.1rem;position:relative;top:-.7em}#enp-quiz .enp-results-flow__percentage:after{color:#444;content:"%";font-size:.7rem;position:absolute;right:-.75rem}#enp-quiz .enp-results-questions__section{background:#f5f5f5;border-bottom:1px solid #ddd;border-top:1px solid #ddd;margin-bottom:3rem;margin-top:5rem;padding-bottom:3rem;padding-top:5rem}#enp-quiz .enp-results-questions__header{align-items:flex-start;flex-direction:column}@media(min-width:25pc){#enp-quiz .enp-results-questions__header{align-items:flex-end;display:flex;flex-direction:row;justify-content:space-between}}#enp-quiz .enp-results-questions__key,#enp-quiz .enp-results-questions__title{font-size:.85rem;text-transform:uppercase}#enp-quiz .enp-results-questions{list-style:none;margin-left:0}#enp-quiz .enp-results-question{font-size:1rem;margin-bottom:1rem;padding:0;width:100%}#enp-quiz .enp-results-question__header{padding:1rem 1.2rem;position:relative}#enp-quiz .enp-results-question__question,#enp-quiz .enp-results-question__stats{font-size:1rem;line-height:1.4}#enp-quiz .enp-results-question__question{font-weight:400}@media(min-width:25pc){#enp-quiz .enp-results-question__question{margin-bottom:0;padding-right:7em}}#enp-quiz .enp-results-question__stats{font-size:.9rem}@media(min-width:25pc){#enp-quiz .enp-results-question__stats{bottom:1rem;position:absolute;right:1.2rem;text-align:right}}#enp-quiz .enp-results-question__stats,#enp-quiz .enp-results-questions__key{font-weight:300}#enp-quiz .enp-results-question__content{padding:2rem 1.2rem 1.2rem}#enp-quiz .enp-results-question__deep-stats{display:flex;justify-content:space-around;list-style:none;margin-left:0;text-align:center}#enp-quiz .enp-results-question__deep-stat__number{font-size:1.8rem;line-height:1;position:relative}#enp-quiz .enp-results-question__deep-stat__number--correct,#enp-quiz .enp-results-question__deep-stat__number--finishes{color:#319461}#enp-quiz .enp-results-question__deep-stat__number--incorrect{color:#e97763}#enp-quiz .enp-results-question__deep-stat__number--correct:after,#enp-quiz .enp-results-question__deep-stat__number--finishes:after,#enp-quiz .enp-results-question__deep-stat__number--incorrect:after{content:"%";font-size:.9rem;position:absolute;right:-1rem;top:.3rem}#enp-quiz .enp-results-question__deep-stat__label{font-size:.8rem;text-transform:uppercase}#enp-quiz .enp-results-question__options{list-style:none;margin-bottom:0;margin-left:0}#enp-quiz .enp-results-question__option{border-top:1px solid #ddd;padding:.8rem .8rem .8rem .4rem}@media(min-width:25pc){#enp-quiz .enp-results-question__option{display:flex;flex-direction:row;justify-content:space-between}}#enp-quiz .enp-results-question__option:first-of-type{margin-top:1.4rem}#enp-quiz .enp-results-question__option--correct{background:#eaf8f1}#enp-quiz .enp-results-question__option__text{flex-grow:100;margin-right:1rem}#enp-quiz .enp-results-question__option__text__helper{font-size:.85rem;font-weight:300;margin-right:.4rem;text-transform:uppercase}@media(min-width:25pc){#enp-quiz .enp-results-question__option__icon{margin-right:.3rem;min-width:1.6rem}}#enp-quiz .enp-results-question__option__icon--incorrect{fill:#e97763;opacity:.5}#enp-quiz .enp-results-question__option__icon--correct{fill:#319461;opacity:1}#enp-quiz .enp-results-question__option__percentage--incorrect{color:#e97763}#enp-quiz .enp-results-question__option__percentage--correct{color:#319461}#enp-quiz .enp-results-question__option__number-selected{font-weight:300}#enp-quiz .enp-slider-responses__title{font-size:.85rem;font-weight:400;margin-top:1.6rem;text-transform:uppercase}#enp-quiz .enp-slider-responses__line-chart .ct-point{stroke-width:8px}#enp-quiz .enp-slider-responses__line-chart--high,#enp-quiz .enp-slider-responses__line-chart--low{stroke:#bf5700}#enp-quiz .enp-slider-responses__line-chart--correct{stroke:#3bb275}#enp-quiz .enp-slider-responses-table{width:100%}#enp-quiz .enp-slider-responses-table tr:nth-child(even) td{background-color:#fff}#enp-quiz .enp-slider-responses-table tr.enp-slider-responses-table__response--correct td{background-color:#eaf8f1}#enp-quiz .enp-slider-responses-table__content{box-shadow:none;padding-top:1rem}#enp-quiz .enp-slider-responses-table--hide-zero .enp-slider-responses-table__frequency--zero{display:none}#enp-quiz .enp-slider-responses-table__response-frequency{align-items:center;display:flex;justify-content:space-between}#enp-quiz .enp-slider-responses-table__toggle-zero-frequency{background:#fff;border:0;border-radius:3px;box-shadow:inset 1px 1px 0 #ccc,inset -1px -1px 0 #ccc;color:#444;cursor:pointer;font-family:tablet-gothic,helvetica neue,helvetica,arial,sans-serif;font-size:.9rem;font-weight:400;letter-spacing:0;line-height:1.5;margin:0;min-height:3.065rem;padding:0 .6rem;position:relative;text-align:left;text-transform:none;transition:all .2s cubic-bezier(0,0,.3,1);width:auto;z-index:9}.enp-quiz-results #enp-quiz .enp-aside{border:0}.enp-quiz-results .enp-results-questions__title__quiz-title{clip:rect(1px,1px,1px,1px);height:1px;left:-625pc;overflow:hidden;position:absolute!important;top:auto;width:1px}#enp-quiz .enp-results--ab{display:block;margin-bottom:3rem}@media(min-width:750pt){#enp-quiz .enp-results--ab{align-content:flex-end;display:flex;flex-wrap:wrap;padding:10px;width:50%}#enp-quiz .enp-results--a{border-right:1px solid #ddd;padding-right:1rem}#enp-quiz .enp-results--b{padding-left:1rem}}#enp-quiz .enp-results-title--ab,#enp-quiz .enp-results__container--ab .enp-results-flow__container{min-width:100%}#enp-quiz .enp-results--loser .enp-results-flow__item{border:2px solid #bf5700}#enp-quiz .enp-results--loser .enp-results-flow__item--quiz-starts{background:#ffc696}#enp-quiz .enp-results--loser .enp-results-flow__item--quiz-finishes{background:#ffb06d}#enp-quiz .enp-results--loser .enp-results-questions__title,#enp-quiz .enp-results--loser th{color:#964400}#enp-quiz .enp-results--winner .enp-results-questions__title,#enp-quiz .enp-results--winner th{color:#319461}#enp-quiz .enp-results-title--a,#enp-quiz .enp-results-title--b{background:transparent}#enp-quiz .enp-ab-scores{margin-left:auto;margin-right:auto;max-width:40pc;padding-left:20px;padding-right:20px}#enp-quiz .enp-ab-scores:after{clear:both;content:"";display:table}@media(min-width:700px){#enp-quiz .enp-ab-scores{max-width:840px}}@media(min-width:750pt){#enp-quiz .enp-ab-scores{max-width:750pt}}#enp-quiz .enp-ab-scores th.enp-quiz-scores-table__label,#enp-quiz .enp-ab-scores th.enp-quiz-scores-table__score{padding-left:0;padding-right:0}#enp-quiz .enp-ab-scores__title{font-size:.85rem;padding-left:50px;text-transform:uppercase}#enp-quiz .enp-quiz-score__line-chart .enp-test-loser .ct-line,#enp-quiz .enp-quiz-score__line-chart .enp-test-loser .ct-point{stroke:#bf5700}#enp-quiz .enp-quiz-scores{margin-top:0}#enp-quiz .enp-ab-scores .enp-quiz-scores-table,#enp-quiz .enp-question-results{margin-bottom:1.6rem}@media(min-width:750pt){#enp-quiz .enp-ab-scores .enp-quiz-scores-table,#enp-quiz .enp-question-results{float:left;margin:0;width:48%}#enp-quiz .enp-ab-scores .enp-quiz-scores-table:first-of-type,#enp-quiz .enp-question-results:first-of-type{margin-right:4%}}#enp-quiz .enp-question-results__container{margin-left:auto;margin-right:auto;max-width:40pc;padding-left:20px;padding-right:20px}#enp-quiz .enp-question-results__container:after{clear:both;content:"";display:table}@media(min-width:700px){#enp-quiz .enp-question-results__container{max-width:840px}}@media(min-width:750pt){#enp-quiz .enp-question-results__container{max-width:750pt}}#enp-quiz .enp-question-results--ab .enp-results-questions__section{background:#fff;border:0;margin:1.6rem auto;padding:1.6rem 0}#enp-quiz .enp-question-results--ab .enp-results-questions__container{padding:0}#enp-quiz .enp-ab-new-embed-code__section{margin-bottom:2rem;margin-left:auto;margin-right:auto;max-width:540px;padding-bottom:2rem;padding-left:20px;padding-right:20px}#enp-quiz .enp-ab-new-embed-code__section:after{clear:both;content:"";display:table}#enp-quiz .enp-ab-new-embed-code__section .enp-ab-embed-code{margin:0;padding:0}#enp-quiz .enp-ab-embed-code__section{background:#f5f5f5;border-bottom:1px solid #ddd;border-top:1px solid #ddd;margin-bottom:3rem;margin-top:5rem;padding-bottom:3rem;padding-top:5rem}#enp-quiz .enp-ab-embed-code{margin-left:auto;margin-right:auto;max-width:40pc;padding-left:20px;padding-right:20px}#enp-quiz .enp-ab-embed-code:after{clear:both;content:"";display:table}#enp-quiz .enp-ab-embed-code__title{font-size:.85rem;text-transform:uppercase}#enp-quiz .enp-embed-code__textarea{margin-bottom:0}#enp-quiz .enp-embed-code__instructions{font-size:1.1rem}#enp-quiz .enp-slider{margin-bottom:1.6rem}#enp-quiz .enp-slider-input__container{align-items:center;display:flex;justify-content:center;margin:1.6rem auto;position:relative}#enp-quiz .enp-slider-input__label{color:#5e5e5e;display:block;font-size:.85rem;font-weight:400;text-transform:uppercase}#enp-quiz .enp-slider-input__prefix,#enp-quiz .enp-slider-input__suffix{font-size:1rem}#enp-quiz .enp-slider-input__prefix{margin-right:.2rem;white-space:pre}#enp-quiz .enp-slider-input__suffix{margin-left:.2rem;white-space:pre}#enp-quiz .enp-slider-input__input{background:#fff;border:1px solid #aaa;border-radius:3px;font-family:tablet-gothic,helvetica neue,helvetica,arial,sans-serif;font-size:1rem;margin-bottom:0;max-width:100%;padding:.75rem;transition:all .25s cubic-bezier(0,0,.3,1);width:auto}@media(min-width:700px){#enp-quiz .enp-slider-input__input{padding:.8rem}}#enp-quiz .enp-slider-input__input--incorrect{color:#bf5700}#enp-quiz .enp-slider-input__input--correct{color:#319461}#enp-quiz .enp-slider-input__input--invalid-animation{box-shadow:0 0 2px 1px #e97763}#enp-quiz .enp-slider_input__range-helper{bottom:-1.2rem;font-size:.8rem;position:absolute}#enp-quiz .enp-slider_input__range-helper--low{left:0}#enp-quiz .enp-slider_input__range-helper--high{right:0}#enp-quiz .enp-slider-input__range-helper__number{color:#666;position:relative}#enp-quiz .ui-slider-range-show-correct__tooltip-container{position:relative}#enp-quiz .ui-slider-range-show-correct__tooltip{background-color:#fff;border:2px solid #3bb275;border-radius:50%;height:1.1rem;margin-left:-.55rem;position:absolute;top:-.4rem;width:1.1rem;z-index:9999}#enp-quiz .ui-slider-range-show-correct__tooltip--low{left:0}#enp-quiz .ui-slider-range-show-correct__tooltip--high{right:-.55rem}#enp-quiz .ui-slider-range-show-correct__tooltip__text{color:#287950;display:inline-block;font-size:.825rem;min-width:100%;position:relative;text-align:center;text-shadow:0 1px 0 #fff;top:-1.35rem}#enp-quiz .enp-slider{background:#ddd;position:relative;text-align:left}#enp-quiz .enp-slider .ui-helper-hidden{display:none}#enp-quiz .enp-slider .ui-helper-hidden-accessible{border:0;clip:rect(0 0 0 0);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px}#enp-quiz .enp-slider .ui-helper-reset{border:0;font-size:100%;line-height:1.3;list-style:none;margin:0;outline:0;padding:0;text-decoration:none}#enp-quiz .enp-slider .ui-helper-clearfix:after,#enp-quiz .enp-slider .ui-helper-clearfix:before{border-collapse:collapse;content:"";display:table}#enp-quiz .enp-slider .ui-helper-clearfix:after{clear:both}#enp-quiz .enp-slider .ui-helper-clearfix{min-height:0}#enp-quiz .enp-slider .ui-helper-zfix{filter:alpha(opacity=0);height:100%;left:0;opacity:0;position:absolute;top:0;width:100%}#enp-quiz .enp-slider .ui-front{z-index:100}#enp-quiz .enp-slider .ui-state-disabled{cursor:default!important}#enp-quiz .enp-slider .ui-icon{background-repeat:no-repeat;display:block;overflow:hidden;text-indent:-99999px}#enp-quiz .enp-slider .ui-widget-overlay{height:100%;left:0;position:fixed;top:0;width:100%}#enp-quiz .enp-slider .ui-slider-handle{background:#fff;border:1px solid #aaa;border-radius:50%;cursor:default;height:1.2rem;margin-left:-.6rem;position:absolute;top:-.4rem;touch-action:none;transition:opacity .2s cubic-bezier(0,0,.3,1),height .18s cubic-bezier(0,0,.3,1),width .18s cubic-bezier(0,0,.3,1),transform .18s cubic-bezier(0,0,.3,1),-webkit-transform .18s cubic-bezier(0,0,.3,1);width:1.2rem;z-index:2}#enp-quiz .enp-slider .ui-slider-handle:focus{box-shadow:0 0 3px 1px #4d90fe;outline:0}#enp-quiz .enp-slider .ui-slider-handle--correct,#enp-quiz .enp-slider .ui-slider-handle--incorrect{height:1.1rem;margin-left:-.55rem;top:-.4rem;width:1.1rem}#enp-quiz .enp-slider .ui-slider-handle--incorrect{border:2px solid #bf5700;z-index:1}#enp-quiz .enp-slider .ui-slider-handle--correct{border:2px solid #3bb275;z-index:99999}#enp-quiz .enp-slider .ui-slider-range{background-position:0 0;border:0;display:block;font-size:.7rem;height:100%;position:absolute;top:0;z-index:1}#enp-quiz .enp-slider .ui-slider-range-show-correct{background:#3bb275;z-index:9}#enp-quiz .enp-slider .ui-slider-range-min{background:#3bb275;left:0}#enp-quiz .enp-slider .ui-slider-range-max{right:0}#enp-quiz .enp-slider.ui-state-disabled .ui-slider-handle,#enp-quiz .enp-slider.ui-state-disabled .ui-slider-range{-webkit-filter:inherit;filter:inherit}#enp-quiz .ui-slider-horizontal{height:.3rem}#enp-quiz .enp-question__answered .enp-slider{background:#bbb}#enp-quiz .enp-question__answered .ui-slider-range-min{background:#fff} \ No newline at end of file diff --git a/public/quiz-create/css/sass/_base.scss b/public/quiz-create/css/sass/_base.scss index 165de936..f9363766 100644 --- a/public/quiz-create/css/sass/_base.scss +++ b/public/quiz-create/css/sass/_base.scss @@ -15,4 +15,8 @@ @include small-uppercase; font-weight: 600; } + + .enp-page-title { + border-bottom: 2px solid $blue; + } } diff --git a/public/quiz-create/css/sass/_quiz-create.scss b/public/quiz-create/css/sass/_quiz-create.scss index 0a27b4cf..914b3c63 100644 --- a/public/quiz-create/css/sass/_quiz-create.scss +++ b/public/quiz-create/css/sass/_quiz-create.scss @@ -27,6 +27,10 @@ .enp-quiz-title__textarea { @include input--xl; } + + textarea { + color: #000; + } .enp-accordion-container { margin-bottom: 1.6rem; @@ -415,6 +419,7 @@ .enp-answer-explanation__label { @include label--bold; + } .enp-question__button--delete { diff --git a/public/quiz-create/css/sass/_utilities.scss b/public/quiz-create/css/sass/_utilities.scss index 0e6ead78..40a5a9e2 100644 --- a/public/quiz-create/css/sass/_utilities.scss +++ b/public/quiz-create/css/sass/_utilities.scss @@ -431,7 +431,7 @@ letter-spacing: 0; text-align: left; border: none; - border-radius: 0; + border-radius: 3px; min-height: 3.065rem; padding: 1rem 2rem 1rem 1rem; margin: 1.6rem 0 0; @@ -560,7 +560,9 @@ border-bottom: 1px solid #ccc; padding: 1rem 0.375rem; margin-bottom: 1.6rem; - position: relative; + position: fixed; + bottom: 0; + left: 0; } .enp-quiz-message__title { @@ -575,7 +577,7 @@ .enp-quiz-message--error { border-left: 6px solid $red; - color: $dark_red; + color: $red; } .enp-quiz-message__title--error { diff --git a/public/quiz-create/css/sass/_variables.scss b/public/quiz-create/css/sass/_variables.scss index 598b4d99..f45732c5 100644 --- a/public/quiz-create/css/sass/_variables.scss +++ b/public/quiz-create/css/sass/_variables.scss @@ -4,7 +4,7 @@ $fontTitle : "tablet-gothic", "helvetica neue", helvetica, arial, sans-serif; //colors $font : #444; $title : #5D5E5F; -$blue: #5887C0; +$blue: #333f48; $dark_blue: #242f42; $light_blue: #EAF4FF; $light_gray: #F5F5F5; @@ -12,12 +12,12 @@ $gray: #bbb; $dark_gray: #666; $darker_gray: #444; $really_light_gray: #F8F8F8; -$link : darken($blue, 6); +$link: $blue; $khaki: #CCA562; $green: darken(#58C88F, 10); $dark_green: darken($green, 8); -$red: #f14021; -$dark_red: darken(#f14021, 8); +$red: #bf5700; +$dark_red: darken($red, 8); $fade_red: #E97763; $link_hover: darken($link, 8); // animation diff --git a/public/quiz-create/templates/partials/quiz-share.php b/public/quiz-create/templates/partials/quiz-share.php index 1b14f98b..27672b78 100644 --- a/public/quiz-create/templates/partials/quiz-share.php +++ b/public/quiz-create/templates/partials/quiz-share.php @@ -1,21 +1,37 @@ diff --git a/public/quiz-create/templates/quiz-create.php b/public/quiz-create/templates/quiz-create.php index 02dc0655..c1fe8680 100644 --- a/public/quiz-create/templates/quiz-create.php +++ b/public/quiz-create/templates/quiz-create.php @@ -23,42 +23,42 @@ ?> dashboard_breadcrumb_link();?>
- + - + -
- outputKey(); - echo $Quiz_create->hidden_fields();?> + + outputKey(); + echo $Quiz_create->hidden_fields();?> -
- - -
+
+ + +
-
- get_questions(); - if(!empty($question_ids)){ - foreach($question_ids as $question_id) { - include(ENP_QUIZ_CREATE_TEMPLATES_PATH.'/partials/quiz-create-question.php'); - $question_i++; - } - } - ?> -
+
+ get_questions(); + if(!empty($question_ids)){ + foreach($question_ids as $question_id) { + include(ENP_QUIZ_CREATE_TEMPLATES_PATH.'/partials/quiz-create-question.php'); + $question_i++; + } + } + ?> +
- get_add_question_button();?> + get_add_question_button();?> - + - get_next_step_button();?> + get_next_step_button();?> -
+
diff --git a/public/quiz-take/css/enp_quiz-take.min.css b/public/quiz-take/css/enp_quiz-take.min.css index 0bf80591..d4498507 100644 --- a/public/quiz-take/css/enp_quiz-take.min.css +++ b/public/quiz-take/css/enp_quiz-take.min.css @@ -1 +1 @@ -a,abbr,acronym,address,applet,big,blockquote,body,caption,cite,code,dd,del,dfn,div,dl,dt,em,fieldset,font,form,h1,h2,h3,h4,h5,h6,html,iframe,ins,kbd,label,legend,li,object,ol,p,pre,q,s,samp,small,span,strike,strong,sub,sup,table,tbody,td,tfoot,th,thead,tr,tt,ul,var{border:0;font-family:inherit;font-size:100%;font-style:inherit;font-weight:inherit;margin:0;outline:0;padding:0;vertical-align:baseline}html{-ms-text-size-adjust:100%;-webkit-text-size-adjust:100%;font-size:100%;overflow-y:scroll}body{background:#fff;overflow:hidden}article,aside,details,figcaption,figure,footer,header,nav,section{display:block}ol,ul{list-style:none}table{border-collapse:separate;border-spacing:0}caption,td,th{font-weight:400;text-align:left}blockquote:after,blockquote:before,q:after,q:before{content:""}blockquote,q{quotes:"" ""}a:focus{outline:thin dotted}a:active,a:hover{outline:0}a img{border:0}html{box-sizing:border-box}*,*:after,*:before{box-sizing:inherit}html{font-size:1pc!important}html #enp-quiz{box-sizing:border-box}body #enp-quiz{background:#fff;overflow:hidden}#enp-quiz *,#enp-quiz *:after,#enp-quiz *:before{box-sizing:inherit}#enp-quiz ol,#enp-quiz ul{margin:0 0 1.6rem 1.25rem;padding:0}#enp-quiz textarea{margin-bottom:1rem}#enp-quiz button,#enp-quiz button:active,#enp-quiz button:focus,#enp-quiz button:hover,#enp-quiz iframe,#enp-quiz input[type=button],#enp-quiz input[type=button]:active,#enp-quiz input[type=button]:focus,#enp-quiz input[type=button]:hover,#enp-quiz input[type=reset],#enp-quiz input[type=reset]:active,#enp-quiz input[type=reset]:focus,#enp-quiz input[type=reset]:hover,#enp-quiz input[type=submit],#enp-quiz input[type=submit]:active,#enp-quiz input[type=submit]:focus,#enp-quiz input[type=submit]:hover{border:0}#enp-quiz .enp-screen-reader-text{clip:rect(1px,1px,1px,1px);height:1px;left:-625pc;overflow:hidden;position:absolute!important;top:auto;width:1px}#enp-quiz .enp-screen-reader-text:active,#enp-quiz .enp-screen-reader-text:focus,#enp-quiz .enp-screen-reader-text:hover{background-color:#f1f1f1;border-radius:3px;box-shadow:0 0 2px 2px rgba(0,0,0,.6);clip:auto!important;color:#21759b;display:block;font-size:14px;font-weight:700;height:auto;left:5px;line-height:normal;padding:15px 23px 14px;text-decoration:none;top:5px;width:auto;z-index:100000}#enp-quiz .enp-quiz-message{background:#fff;border:1px solid #eee;border-bottom:1px solid #ccc;margin:1.6rem auto;max-width:25pc;padding:1rem .375rem}#enp-quiz .enp-quiz-message:after{clear:both;content:"";display:table}#enp-quiz .enp-quiz-message__title{font-size:.85rem;text-transform:uppercase}#enp-quiz .enp-message__list{font-size:1.1rem;list-style:none;margin-bottom:0;margin-left:0}#enp-quiz .enp-quiz-message--error{-webkit-animation:slideInTop .3s cubic-bezier(0,0,.3,1);animation:slideInTop .3s cubic-bezier(0,0,.3,1);border-left:6px solid #f14021}#enp-quiz .enp-quiz-message__title--error{color:#db2c0e}#enp-quiz .enp-quiz-message--success{border-left:6px solid #3bb275;color:#319461}#enp-quiz .enp-quiz-message__title--success{color:#319461}body{color:#444;font-family:tablet-gothic,helvetica neue,helvetica,arial,sans-serif;font-size:1em;font-weight:400;line-height:1.6}@media(min-width:700px){body{font-size:1.3em}}#enp-quiz h1,#enp-quiz h2,#enp-quiz h3,#enp-quiz h4,#enp-quiz h5,#enp-quiz h6{clear:both;color:#444;font-family:tablet-gothic,helvetica neue,helvetica,arial,sans-serif;font-weight:700;line-height:1.2em;margin:0 0 .2rem}#enp-quiz h1{font-size:2em}#enp-quiz h2{font-size:1.75em}#enp-quiz h3{font-size:1.475em}#enp-quiz h4{font-size:1.3em}#enp-quiz h5{font-size:1.125em}#enp-quiz h6{font-size:1em}#enp-quiz p+h1,#enp-quiz p+h2,#enp-quiz p+h3,#enp-quiz p+h4,#enp-quiz p+h5,#enp-quiz p+h6,#enp-quiz ul+h1,#enp-quiz ul+h2,#enp-quiz ul+h3,#enp-quiz ul+h4,#enp-quiz ul+h5,#enp-quiz ul+h6{margin-top:1.8em}#enp-quiz p{font-size:.85em;font-weight:300;margin-bottom:1.125em}#enp-quiz ol,#enp-quiz ul{margin:0 0 1.6em 1.25em}#enp-quiz ul{list-style:disc}#enp-quiz ol{list-style:decimal}#enp-quiz li>ol,#enp-quiz li>ul{margin-bottom:0;margin-left:1.6em}#enp-quiz b,#enp-quiz strong{font-weight:700}#enp-quiz cite,#enp-quiz dfn,#enp-quiz em{font-family:georgia,times,serif;font-style:italic}#enp-quiz pre{background:#eee;font-family:Courier\ 10 Pitch,Courier,monospace;font-size:.95em;line-height:1.6;margin-bottom:1.6em;max-width:100%;overflow:auto;padding:1.6em}#enp-quiz .code,#enp-quiz code,#enp-quiz kbd,#enp-quiz tt,#enp-quiz var{font:.7em Monaco,Consolas,"Andale Mono","DejaVu Sans Mono",monospace}#enp-quiz figure{margin:0}#enp-quiz img{height:auto;max-width:100%}#enp-quiz a{color:#5887c0;text-decoration:none;touch-action:manipulation;transition:color .2s}#enp-quiz a .enp-icon{fill:#5887c0}#enp-quiz a:active,#enp-quiz a:focus,#enp-quiz a:hover{color:#3f6ea6}#enp-quiz a:active .enp-icon,#enp-quiz a:focus .enp-icon,#enp-quiz a:hover .enp-icon{fill:#3f6ea6}#enp-quiz button:focus{outline-color:#4d90fe;outline-offset:-2px;outline-style:auto;outline-width:5px}#enp-quiz .enp-btn{background:#5887c0;border:0;border-radius:3px;box-shadow:inset 0 -2px 0 rgba(0,0,0,.2);color:#fff;cursor:pointer;font-size:15px;font-weight:400;letter-spacing:.05em;line-height:1.6;padding:.85em 1.4em .75em;text-align:center;text-transform:uppercase;transition:all .2s}#enp-quiz .enp-btn:hover{background:#3f6ea6;box-shadow:none;color:#fff}#enp-quiz .enp-btn:active{background:#a2bcdc;box-shadow:inset 0 2px 0 rgba(0,0,0,.1);color:#fff}#enp-quiz .enp-btn:focus{outline-color:#4d90fe;outline-offset:-2px;outline-style:auto;outline-width:5px}#enp-quiz .enp-btn--add{background:0;border:3px dashed #666;border-radius:3px;box-shadow:none;color:#545454;cursor:pointer;font-size:15px;font-weight:400;letter-spacing:.05em;line-height:1.6;padding:.85em 1.4em .75em;text-align:center;text-transform:uppercase;transition:all .2s;width:100%}#enp-quiz .enp-btn--add:hover{box-shadow:none;color:#fff}#enp-quiz .enp-btn--add:active{background:#a2bcdc;box-shadow:inset 0 2px 0 rgba(0,0,0,.1);color:#fff}#enp-quiz .enp-btn--add:focus{outline-color:#4d90fe;outline-offset:-2px;outline-style:auto;outline-width:5px}#enp-quiz .enp-btn--add:focus,#enp-quiz .enp-btn--add:hover{background:hsla(0,0%,100%,.9);border:3px dashed #444;color:#444}#enp-quiz .enp-btn--disabled{cursor:default;opacity:.65}#enp-quiz .enp-btn--enabled{-webkit-animation:expand .6s;animation:expand .6s}#enp-quiz .enp-icon{height:24px;transition:all .2s;width:24px}#enp-quiz .enp-page-title{font-size:1.6rem}#enp-quiz fieldset{border:0;margin:0;padding:0}.enp-label{color:#5e5e5e;display:block;font-size:.85rem;font-weight:400;text-transform:uppercase}.enp-legend{border:0;color:#5e5e5e;display:block;font-size:.85rem;font-weight:400;margin-bottom:.2rem;padding-top:1.6rem;text-transform:uppercase}.enp-input{background:#fff;border:1px solid #aaa;border-radius:3px;font-family:tablet-gothic,helvetica neue,helvetica,arial,sans-serif;font-size:1rem;margin-bottom:1.2rem;max-width:100%;padding:.8rem .5rem;width:20rem}@media(min-width:700px){.enp-input{padding:.8rem}}.enp-input:-ms-input-placeholder,.enp-input::-ms-input-placeholder,.enp-input::-webkit-input-placeholder,.enp-input::placeholder,.enp-textarea:-ms-input-placeholder,.enp-textarea::-ms-input-placeholder,.enp-textarea::-webkit-input-placeholder,.enp-textarea::placeholder{color:#aaa;font-family:tablet-gothic,helvetica neue,helvetica,arial,sans-serif;font-weight:300}@-webkit-keyframes removeAnswers{0%{-webkit-transform:translate3d(0,0,0);height:auto;opacity:1;transform:translate3d(0,0,0)}10%{-webkit-transform:translate3d(0,0,0);opacity:1;transform:translate3d(0,0,0)}to{-webkit-transform:translate3d(-150px,0,0);display:none;height:0;opacity:0;padding:0;transform:translate3d(-150px,0,0);z-index:-1}}@keyframes removeAnswers{0%{-webkit-transform:translate3d(0,0,0);height:auto;opacity:1;transform:translate3d(0,0,0)}10%{-webkit-transform:translate3d(0,0,0);opacity:1;transform:translate3d(0,0,0)}to{-webkit-transform:translate3d(-150px,0,0);display:none;height:0;opacity:0;padding:0;transform:translate3d(-150px,0,0);z-index:-1}}@-webkit-keyframes removeQuestion{0%,15%{-webkit-transform:translatex(0);opacity:1;transform:translatex(0)}to{-webkit-transform:translatex(-150px);opacity:0;transform:translatex(-150px)}}@keyframes removeQuestion{0%,15%{-webkit-transform:translatex(0);opacity:1;transform:translatex(0)}to{-webkit-transform:translatex(-150px);opacity:0;transform:translatex(-150px)}}@-webkit-keyframes showNextQuestion{0%{-webkit-transform:translatex(90pt);opacity:0;transform:translatex(90pt)}to{-webkit-transform:translatex(0);opacity:1;transform:translatex(0)}}@keyframes showNextQuestion{0%{-webkit-transform:translatex(90pt);opacity:0;transform:translatex(90pt)}to{-webkit-transform:translatex(0);opacity:1;transform:translatex(0)}}@-webkit-keyframes slideInTop{0%{-webkit-transform:translate3d(0,-20px,0);height:auto;opacity:0;transform:translate3d(0,-20px,0)}to{-webkit-transform:translate3d(0,0,0);height:auto;opacity:1;transform:translate3d(0,0,0)}}@keyframes slideInTop{0%{-webkit-transform:translate3d(0,-20px,0);height:auto;opacity:0;transform:translate3d(0,-20px,0)}to{-webkit-transform:translate3d(0,0,0);height:auto;opacity:1;transform:translate3d(0,0,0)}}@-webkit-keyframes slideInBottom{0%{-webkit-transform:translate3d(0,20px,0);opacity:0;transform:translate3d(0,20px,0)}to{-webkit-transform:translate3d(0,0,0);opacity:1;transform:translate3d(0,0,0)}}@keyframes slideInBottom{0%{-webkit-transform:translate3d(0,20px,0);opacity:0;transform:translate3d(0,20px,0)}to{-webkit-transform:translate3d(0,0,0);opacity:1;transform:translate3d(0,0,0)}}@-webkit-keyframes flashRedShadow{0%{background:#f14021}to{background:#fff}}@keyframes flashRedShadow{0%{background:#f14021}to{background:#fff}}@-webkit-keyframes errorContainer{0%{}to{background-color:rgba(241,64,33,.2)}}@keyframes errorContainer{0%{}to{background-color:rgba(241,64,33,.2)}}@-webkit-keyframes pop{0%{opacity:1;width:0}to{opacity:0;width:40%}30%{width:100%}80%{opacity:1;width:100%}}@keyframes pop{0%{opacity:1;width:0}to{opacity:0;width:40%}30%{width:100%}80%{opacity:1;width:100%}}.spinner{margin:0 auto;text-align:center;width:70px}.spinner>div{-webkit-animation:sk-bouncedelay 1.4s infinite ease-in-out both;animation:sk-bouncedelay 1.4s infinite ease-in-out both;background-color:#333;border-radius:100%;display:inline-block;height:18px;width:18px}.spinner .bounce1{-webkit-animation-delay:-.32s;animation-delay:-.32s}.spinner .bounce2{-webkit-animation-delay:-.16s;animation-delay:-.16s}@-webkit-keyframes sk-bouncedelay{0%,80%,to{-webkit-transform:scale(0)}40%{-webkit-transform:scale(1)}}@keyframes sk-bouncedelay{0%,80%,to{-webkit-transform:scale(0);transform:scale(0)}40%{-webkit-transform:scale(1);transform:scale(1)}}#enp-quiz{background:transparent}#enp-quiz .enp-quiz__container{background:#fff;border:1px solid #ddd;padding:0;position:relative}#enp-quiz .enp-quiz__header{border-bottom:1px solid #ddd;position:relative}#enp-quiz .enp-quiz__title{font-size:.85rem;font-weight:500;letter-spacing:.01rem;padding:.6rem 1rem;text-transform:uppercase}#enp-quiz .enp-quiz__title--hide{display:none}#enp-quiz .enp-quiz__progress{bottom:0;height:0;left:0;position:absolute;right:0}#enp-quiz .enp-quiz__progress__bar{background:#3bb275;height:3px;min-width:2rem;position:relative;transition:all .5s cubic-bezier(0,0,.3,1);width:0}#enp-quiz .enp-quiz__progress__bar__question-count{bottom:-1.3rem;font-size:.8rem;position:absolute;right:4px}#enp-quiz .enp-question__container{display:block}#enp-quiz .enp-question__form{color:#444;margin-left:auto;margin-right:auto;max-width:40pc;overflow:hidden;padding:2rem 20px 2.6rem}#enp-quiz .enp-question__form:after{clear:both;content:"";display:table}@media(min-width:700px){#enp-quiz .enp-question__form{padding:2.6rem 3rem}}#enp-quiz .enp-question__question{box-sizing:border-box;display:table;font-size:1.8rem;font-weight:700;line-height:1.2;margin-bottom:.2rem;max-width:100%;padding-bottom:.1rem;position:relative;white-space:normal}@media(min-width:25pc){#enp-quiz .enp-question__question{font-size:2rem}}#enp-quiz .enp-question__question:after{background-color:rgba(0,0,0,.2);bottom:0;content:"";height:2px;left:0;margin:auto;position:absolute;right:0;width:0}#enp-quiz .enp-question__question:focus:after{-webkit-animation:pop .8s cubic-bezier(0,0,.3,1);animation:pop .8s cubic-bezier(0,0,.3,1)}#enp-quiz .enp-question-image{margin-bottom:.4rem}#enp-quiz .enp-question__helper{font-size:1rem}#enp-quiz .enp-option__input{clip:rect(1px,1px,1px,1px);height:1px;left:-625pc;overflow:hidden;position:absolute!important;top:auto;width:1px}#enp-quiz .enp-option__input:checked+.enp-option__label:before{background-color:#3bb275}#enp-quiz .enp-option__input:focus+.enp-option__label{background:#f5f5f5;color:#444}#enp-quiz .enp-option__label{background:0;border:0;border-bottom:1px solid rgba(0,0,0,.1);color:#444;display:block;font-size:1rem;font-weight:400;line-height:1.6;padding:.8rem 0 .8rem 40px;position:relative;text-align:left;text-transform:none;transition:color .2s cubic-bezier(0,0,.3,1),background .2s cubic-bezier(0,0,.3,1);width:100%}#enp-quiz .enp-option__label:before{background-clip:content-box;background-color:transparent;border:2px solid #3bb275;border-radius:50%;content:"";height:20px;left:10px;padding:3px;position:absolute;top:.925rem;transition:all .2s;width:20px}#enp-quiz .enp-option__label:last-of-type{border-bottom:0}#enp-quiz .enp-question__container--unanswered .enp-option__label:hover{cursor:pointer}#enp-quiz .enp-question__container--unanswered .enp-option__label:hover:before{background-color:#3bb275}#enp-quiz .enp-question__submit{background:#5887c0;border:0;border-radius:3px;box-shadow:inset 0 -2px 0 rgba(0,0,0,.2);color:#fff;cursor:pointer;font-size:15px;font-weight:400;letter-spacing:.05em;line-height:1.6;padding:1em 2.8em .95em 1.4em;position:relative;text-align:center;text-transform:uppercase;transition:padding .3s cubic-bezier(0,0,.3,1)}#enp-quiz .enp-question__submit:hover{background:#3f6ea6;box-shadow:none;color:#fff}#enp-quiz .enp-question__submit:active{background:#a2bcdc;box-shadow:inset 0 2px 0 rgba(0,0,0,.1);color:#fff}#enp-quiz .enp-question__submit:focus{outline-color:#4d90fe;outline-offset:-2px;outline-style:auto;outline-width:5px}#enp-quiz .enp-question__submit__icon{-webkit-transform:translate3d(0,0,0);background:transparent;border-radius:50%;bottom:0;fill:#fff;height:1.6em;margin-bottom:auto;margin-left:.5em;margin-top:auto;position:absolute;top:0;transform:translate3d(0,0,0);transition:all .3s cubic-bezier(0,0,.3,1);width:1.6em}#enp-quiz .enp-question__submit:focus .enp-question__submit__icon,#enp-quiz .enp-question__submit:hover .enp-question__submit__icon{background:#fff;fill:#3f6ea6}#enp-quiz .enp-question__submit:focus,#enp-quiz .enp-question__submit:hover{padding-right:4em}#enp-quiz .enp-question__submit .enp-question__submit__icon{right:.8em}#enp-quiz .enp-question__fieldset--mc .enp-question__submit{height:0;opacity:0;padding-bottom:0;padding-top:0}#enp-quiz .enp-question__fieldset--mc .enp-option__input:checked~.enp-options__submit{-webkit-animation:.3s slideInTop cubic-bezier(0,0,.3,1) forwards;animation:.3s slideInTop cubic-bezier(0,0,.3,1) forwards;height:auto;margin-top:.4rem;opacity:1;padding-bottom:.95em;padding-top:1em}#enp-quiz .enp-question__fieldset--slider .enp-options__submit{margin-top:1.4rem}#enp-quiz .enp-question__container--explanation{background-color:rgba(0,0,0,.15)}#enp-quiz .enp-question__container--explanation .enp-question__submit{display:none}#enp-quiz .enp-question__container--explanation .enp-option__label{border-bottom:0;margin-bottom:5px}#enp-quiz .enp-question__container--explanation .enp-option__input--correct-clicked+.enp-option__label:before{background-color:#3bb275}#enp-quiz .enp-question__container--explanation .enp-option__input--correct+.enp-option__label{background-color:#e6f7ee;box-shadow:inset 4px 0 0 #3bb275}#enp-quiz .enp-question__container--explanation .enp-option__input--incorrect-clicked+.enp-option__label{background-color:#fff;box-shadow:inset 4px 0 0 #f14021}#enp-quiz .enp-question__container--explanation .enp-option__input--incorrect-clicked+.enp-option__label:before{background-color:#f14021;border:2px solid #f14021}#enp-quiz .enp-option__input--slide-hide+.enp-option__label{-webkit-animation:removeAnswers .6s cubic-bezier(.28,.01,0,.69) forwards;animation:removeAnswers .6s cubic-bezier(.28,.01,0,.69) forwards;height:0;margin:0}#enp-quiz .enp-explanation{background:#fff;padding:1.6rem 1.6rem 1.5rem}#enp-quiz .enp-question__fieldset--slider .enp-explanation{-webkit-animation:slideInBottom .3s cubic-bezier(0,0,.3,1) forwards;animation:slideInBottom .3s cubic-bezier(0,0,.3,1) forwards}#enp-quiz .enp-explanation--correct{box-shadow:inset 4px 0 0 #3bb275}#enp-quiz .enp-explanation--correct .enp-explanation__percentage:after{content:"% Got This Right"}#enp-quiz .enp-explanation--incorrect{box-shadow:inset 4px 0 0 #f14021}#enp-quiz .enp-explanation--incorrect .enp-explanation__percentage:after{content:"% Got This Wrong"}#enp-quiz .enp-explanation__title{font-size:.85rem;text-transform:uppercase}#enp-quiz .enp-explanation__percentage{color:#565656;font-size:.75rem;font-weight:500;margin-left:4px}#enp-quiz .enp-explanation__percentage:after{content:"%"}#enp-quiz .enp-explanation--correct .enp-explanation__title{color:#2e8c5c}#enp-quiz .enp-explanation--incorrect .enp-explanation__title{color:#d22b0d}#enp-quiz .enp-explanation__explanation{font-weight:400;margin-top:.4rem}#enp-quiz .enp-next-step{border:0;border-radius:3px;box-shadow:inset 0 -2px 0 rgba(0,0,0,.2);color:#fff;cursor:pointer;font-size:15px;font-weight:400;letter-spacing:.05em;line-height:1.6;padding:1em 2.8em .95em 1.4em;position:relative;text-align:center;text-transform:uppercase;transition:padding .3s cubic-bezier(0,0,.3,1)}#enp-quiz .enp-next-step:hover{box-shadow:none}#enp-quiz .enp-next-step:active{box-shadow:inset 0 2px 0 rgba(0,0,0,.1);color:#fff}#enp-quiz .enp-next-step:focus{outline-offset:-2px;outline-style:auto;outline-width:5px}#enp-quiz .enp-next-step__icon{-webkit-transform:translate3d(0,0,0);background:transparent;border-radius:50%;bottom:0;fill:#fff;height:1.6em;margin-bottom:auto;margin-left:.5em;margin-top:auto;position:absolute;top:0;transform:translate3d(0,0,0);transition:all .3s cubic-bezier(0,0,.3,1);width:1.6em}#enp-quiz .enp-next-step:focus .enp-next-step__icon,#enp-quiz .enp-next-step:hover .enp-next-step__icon{background:#fff;fill:#3f6ea6}#enp-quiz .enp-next-step{background:transparent;border:2px solid #5887c0;border-radius:3px;box-shadow:none;color:#5887c0;cursor:pointer;display:inline-block;font-size:15px;font-weight:400;letter-spacing:.05em;line-height:1.6;padding:.8em 2.4em .8em 1.4em;position:relative;text-align:center;text-transform:uppercase;transition:all .2s;width:100%}#enp-quiz .enp-next-step:hover{background:#3f6ea6;box-shadow:none}#enp-quiz .enp-next-step:active{background:#a2bcdc;box-shadow:inset 0 2px 0 rgba(0,0,0,.1);color:#fff}#enp-quiz .enp-next-step:focus{outline-color:#4d90fe;outline-offset:-2px;outline-style:auto;outline-width:5px}#enp-quiz .enp-next-step:focus,#enp-quiz .enp-next-step:hover{background:transparent;border:2px solid #3f6ea6;color:#3f6ea6}#enp-quiz .enp-next-step .enp-next-step__icon{fill:#5887c0;transition:all .3s cubic-bezier(0,0,.3,1)}#enp-quiz .enp-next-step:hover .enp-next-step__icon{-webkit-transform:translate3d(1em,0,0);background:#5887c0;fill:#fff;margin-right:1em;transform:translate3d(1em,0,0)}#enp-quiz .enp-question--on-deck{-webkit-transform:translatex(200px);opacity:0;position:absolute;top:0;transform:translatex(200px);z-index:-1}#enp-quiz .enp-question--show{-webkit-animation:showNextQuestion .6s cubic-bezier(0,0,.3,1) forwards;animation:showNextQuestion .6s cubic-bezier(0,0,.3,1) forwards}#enp-quiz .enp-question--remove{-webkit-animation:removeQuestion .15s cubic-bezier(0,0,.3,1) forwards;animation:removeQuestion .15s cubic-bezier(0,0,.3,1) forwards;position:absolute}#enp-quiz .enp-results__score{border-radius:50%;display:block;height:200px;margin:0 auto 1rem;position:relative;text-align:center;width:200px}#enp-quiz .enp-results__score__title{-webkit-transform:translate(-50%,-50%);color:#444;font-size:5rem;font-weight:400;left:50%;line-height:1;margin:0;position:absolute;top:50%;transform:translate(-50%,-50%)}#enp-quiz .enp-results__score__title__percentage{font-size:1.3rem;font-weight:300;position:absolute;top:1rem}#enp-quiz .enp-results__encouragement{font-size:1.8rem;font-weight:500;line-height:1.2;margin:.2rem;text-align:center}#enp-quiz .enp-results__description{margin:0 auto 1.6rem;max-width:24rem}#enp-quiz .enp-results__score__circle{-webkit-transform:rotate(-90deg);transform:rotate(-90deg)}#enp-quiz #enp-results__score__circle__path,#enp-quiz .enp-results__score__circle__bg{stroke:#ddd;stroke-width:4px}#enp-quiz #enp-results__score__circle__path{stroke:#3bb275}#enp-quiz .enp-results__score__circle__setOffset{transition:stroke-dashoffset 1.2s cubic-bezier(0,0,.3,1)}#enp-quiz .enp-results__score__circle__resetOffset{stroke-dashoffset:565.48}#enp-quiz .enp-results__share-title{font-size:.85rem;margin:2.4rem 0 1rem;text-align:center;text-transform:uppercase}#enp-quiz .enp-results__share{list-style:none;margin-left:0;text-align:center}#enp-quiz .enp-results__share__item{display:inline-block;margin-right:20px}#enp-quiz .enp-results__share__item:last-child{margin-right:0}#enp-quiz .enp-results__share__item__icon{background:#5887c0;border-radius:50%;fill:#fff!important;height:2.4rem;padding:.6rem;width:2.4rem}#enp-quiz .enp-results__share__item__icon--facebook{background-color:#3a5795}#enp-quiz .enp-results__share__item__icon--twitter{background-color:#4099ff}#enp-quiz .enp-quiz-restart__container{text-align:center}#enp-quiz .enp-question__container--error{-webkit-animation:errorContainer .3s cubic-bezier(0,0,.3,1) forwards;animation:errorContainer .3s cubic-bezier(0,0,.3,1) forwards;padding:1rem 10px}#enp-quiz .enp-callout{font-size:.8rem;padding:.4rem;text-align:right}#enp-quiz .enp-slider{margin-bottom:1.6rem}#enp-quiz .enp-slider-input__container{align-items:center;display:flex;justify-content:center;margin:1.6rem auto;position:relative}#enp-quiz .enp-slider-input__label{color:#5e5e5e;display:block;font-size:.85rem;font-weight:400;text-transform:uppercase}#enp-quiz .enp-slider-input__prefix,#enp-quiz .enp-slider-input__suffix{font-size:1rem}#enp-quiz .enp-slider-input__prefix{margin-right:.2rem;white-space:pre}#enp-quiz .enp-slider-input__suffix{margin-left:.2rem;white-space:pre}#enp-quiz .enp-slider-input__input{background:#fff;border:1px solid #aaa;border-radius:3px;font-family:tablet-gothic,helvetica neue,helvetica,arial,sans-serif;font-size:1rem;margin-bottom:0;max-width:100%;padding:.75rem;transition:all .25s cubic-bezier(0,0,.3,1);width:auto}@media(min-width:700px){#enp-quiz .enp-slider-input__input{padding:.8rem}}#enp-quiz .enp-slider-input__input--incorrect{color:#f14021}#enp-quiz .enp-slider-input__input--correct{color:#319461}#enp-quiz .enp-slider-input__input--invalid-animation{box-shadow:0 0 2px 1px #e97763}#enp-quiz .enp-slider_input__range-helper{bottom:-1.2rem;font-size:.8rem;position:absolute}#enp-quiz .enp-slider_input__range-helper--low{left:0}#enp-quiz .enp-slider_input__range-helper--high{right:0}#enp-quiz .enp-slider-input__range-helper__number{color:#666;position:relative}#enp-quiz .ui-slider-range-show-correct__tooltip-container{position:relative}#enp-quiz .ui-slider-range-show-correct__tooltip{background-color:#fff;border:2px solid #3bb275;border-radius:50%;height:1.1rem;margin-left:-.55rem;position:absolute;top:-.4rem;width:1.1rem;z-index:9999}#enp-quiz .ui-slider-range-show-correct__tooltip--low{left:0}#enp-quiz .ui-slider-range-show-correct__tooltip--high{right:-.55rem}#enp-quiz .ui-slider-range-show-correct__tooltip__text{color:#287950;display:inline-block;font-size:.825rem;min-width:100%;position:relative;text-align:center;text-shadow:0 1px 0 #fff;top:-1.35rem}#enp-quiz .enp-slider{background:#ddd;position:relative;text-align:left}#enp-quiz .enp-slider .ui-helper-hidden{display:none}#enp-quiz .enp-slider .ui-helper-hidden-accessible{border:0;clip:rect(0 0 0 0);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px}#enp-quiz .enp-slider .ui-helper-reset{border:0;font-size:100%;line-height:1.3;list-style:none;margin:0;outline:0;padding:0;text-decoration:none}#enp-quiz .enp-slider .ui-helper-clearfix:after,#enp-quiz .enp-slider .ui-helper-clearfix:before{border-collapse:collapse;content:"";display:table}#enp-quiz .enp-slider .ui-helper-clearfix:after{clear:both}#enp-quiz .enp-slider .ui-helper-clearfix{min-height:0}#enp-quiz .enp-slider .ui-helper-zfix{filter:alpha(opacity=0);height:100%;left:0;opacity:0;position:absolute;top:0;width:100%}#enp-quiz .enp-slider .ui-front{z-index:100}#enp-quiz .enp-slider .ui-state-disabled{cursor:default!important}#enp-quiz .enp-slider .ui-icon{background-repeat:no-repeat;display:block;overflow:hidden;text-indent:-99999px}#enp-quiz .enp-slider .ui-widget-overlay{height:100%;left:0;position:fixed;top:0;width:100%}#enp-quiz .enp-slider .ui-slider-handle{background:#fff;border:1px solid #aaa;border-radius:50%;cursor:default;height:1.2rem;margin-left:-.6rem;position:absolute;top:-.4rem;touch-action:none;transition:opacity .2s cubic-bezier(0,0,.3,1),height .18s cubic-bezier(0,0,.3,1),width .18s cubic-bezier(0,0,.3,1),transform .18s cubic-bezier(0,0,.3,1),-webkit-transform .18s cubic-bezier(0,0,.3,1);width:1.2rem;z-index:2}@media(max-width:699px){#enp-quiz .enp-slider .ui-slider-handle{-webkit-transform:rotate(225deg);height:2rem;margin-left:-1rem;top:-.85rem;transform:rotate(225deg);width:2rem}}#enp-quiz .enp-slider .ui-slider-handle:focus{box-shadow:0 0 3px 1px #4d90fe;outline:0}@media(max-width:699px){#enp-quiz .enp-slider .ui-slider-handle.ui-state-active{-webkit-transform:translate3d(-.2rem,-.8rem,0) rotate(225deg);border-top-left-radius:0;height:2.2rem;transform:translate3d(-.2rem,-.8rem,0) rotate(225deg);width:2.2rem}}#enp-quiz .enp-slider .ui-slider-handle--correct,#enp-quiz .enp-slider .ui-slider-handle--incorrect{height:1.1rem;margin-left:-.55rem;top:-.4rem;width:1.1rem}#enp-quiz .enp-slider .ui-slider-handle--incorrect{border:2px solid #f14021;z-index:1}#enp-quiz .enp-slider .ui-slider-handle--correct{border:2px solid #3bb275;z-index:99999}#enp-quiz .enp-slider .ui-slider-range{background-position:0 0;border:0;display:block;font-size:.7rem;height:100%;position:absolute;top:0;z-index:1}#enp-quiz .enp-slider .ui-slider-range-show-correct{background:#3bb275;z-index:9}#enp-quiz .enp-slider .ui-slider-range-min{background:#3bb275;left:0}#enp-quiz .enp-slider .ui-slider-range-max{right:0}#enp-quiz .enp-slider.ui-state-disabled .ui-slider-handle,#enp-quiz .enp-slider.ui-state-disabled .ui-slider-range{-webkit-filter:inherit;filter:inherit}#enp-quiz .ui-slider-horizontal{height:.3rem}#enp-quiz .enp-question__answered .enp-slider{background:#bbb}#enp-quiz .enp-question__answered .ui-slider-range-min{background:#fff} \ No newline at end of file +a,abbr,acronym,address,applet,big,blockquote,body,caption,cite,code,dd,del,dfn,div,dl,dt,em,fieldset,font,form,h1,h2,h3,h4,h5,h6,html,iframe,ins,kbd,label,legend,li,object,ol,p,pre,q,s,samp,small,span,strike,strong,sub,sup,table,tbody,td,tfoot,th,thead,tr,tt,ul,var{border:0;font-family:inherit;font-size:100%;font-style:inherit;font-weight:inherit;margin:0;outline:0;padding:0;vertical-align:baseline}html{-ms-text-size-adjust:100%;-webkit-text-size-adjust:100%;font-size:100%;overflow-y:scroll}body{background:#fff;overflow:hidden}article,aside,details,figcaption,figure,footer,header,nav,section{display:block}ol,ul{list-style:none}table{border-collapse:separate;border-spacing:0}caption,td,th{font-weight:400;text-align:left}blockquote:after,blockquote:before,q:after,q:before{content:""}blockquote,q{quotes:"" ""}a:focus{outline:thin dotted}a:active,a:hover{outline:0}a img{border:0}html{box-sizing:border-box}*,*:after,*:before{box-sizing:inherit}html{font-size:1pc!important}html #enp-quiz{border-radius:3px;box-sizing:border-box}body #enp-quiz{background:#fff;overflow:hidden}#enp-quiz *,#enp-quiz *:after,#enp-quiz *:before{box-sizing:inherit}#enp-quiz ol,#enp-quiz ul{margin:0 0 1.6rem 1.25rem;padding:0}#enp-quiz textarea{margin-bottom:1rem}#enp-quiz button,#enp-quiz button:active,#enp-quiz button:focus,#enp-quiz button:hover,#enp-quiz iframe,#enp-quiz input[type=button],#enp-quiz input[type=button]:active,#enp-quiz input[type=button]:focus,#enp-quiz input[type=button]:hover,#enp-quiz input[type=reset],#enp-quiz input[type=reset]:active,#enp-quiz input[type=reset]:focus,#enp-quiz input[type=reset]:hover,#enp-quiz input[type=submit],#enp-quiz input[type=submit]:active,#enp-quiz input[type=submit]:focus,#enp-quiz input[type=submit]:hover{border:0}#enp-quiz .enp-screen-reader-text{clip:rect(1px,1px,1px,1px);height:1px;left:-625pc;overflow:hidden;position:absolute!important;top:auto;width:1px}#enp-quiz .enp-screen-reader-text:active,#enp-quiz .enp-screen-reader-text:focus,#enp-quiz .enp-screen-reader-text:hover{background-color:#f1f1f1;border-radius:3px;box-shadow:0 0 2px 2px rgba(0,0,0,.6);clip:auto!important;color:#21759b;display:block;font-size:14px;font-weight:700;height:auto;left:5px;line-height:normal;padding:15px 23px 14px;text-decoration:none;top:5px;width:auto;z-index:100000}#enp-quiz .enp-quiz-message{background:#fff;border:1px solid #eee;border-bottom:1px solid #ccc;margin:1.6rem auto;max-width:25pc;padding:1rem .375rem}#enp-quiz .enp-quiz-message:after{clear:both;content:"";display:table}#enp-quiz .enp-quiz-message__title{font-size:.85rem;text-transform:uppercase}#enp-quiz .enp-message__list{font-size:1.1rem;list-style:none;margin-bottom:0;margin-left:0}#enp-quiz .enp-quiz-message--error{-webkit-animation:slideInTop .3s cubic-bezier(0,0,.3,1);animation:slideInTop .3s cubic-bezier(0,0,.3,1);border-left:6px solid #f14021}#enp-quiz .enp-quiz-message__title--error{color:#db2c0e}#enp-quiz .enp-quiz-message--success{border-left:6px solid #3bb275;color:#319461}#enp-quiz .enp-quiz-message__title--success{color:#319461}body{color:#444;font-family:tablet-gothic,helvetica neue,helvetica,arial,sans-serif;font-size:1em;font-weight:400;line-height:1.6}@media(min-width:700px){body{font-size:1.3em}}#enp-quiz h1,#enp-quiz h2,#enp-quiz h3,#enp-quiz h4,#enp-quiz h5,#enp-quiz h6{clear:both;color:#444;font-family:tablet-gothic,helvetica neue,helvetica,arial,sans-serif;font-weight:700;line-height:1.2em;margin:0 0 .2rem}#enp-quiz h1{font-size:2em}#enp-quiz h2{font-size:1.75em}#enp-quiz h3{font-size:1.475em}#enp-quiz h4{font-size:1.3em}#enp-quiz h5{font-size:1.125em}#enp-quiz h6{font-size:1em}#enp-quiz p+h1,#enp-quiz p+h2,#enp-quiz p+h3,#enp-quiz p+h4,#enp-quiz p+h5,#enp-quiz p+h6,#enp-quiz ul+h1,#enp-quiz ul+h2,#enp-quiz ul+h3,#enp-quiz ul+h4,#enp-quiz ul+h5,#enp-quiz ul+h6{margin-top:1.8em}#enp-quiz p{font-size:.85em;font-weight:300;margin-bottom:1.125em}#enp-quiz ol,#enp-quiz ul{margin:0 0 1.6em 1.25em}#enp-quiz ul{list-style:disc}#enp-quiz ol{list-style:decimal}#enp-quiz li>ol,#enp-quiz li>ul{margin-bottom:0;margin-left:1.6em}#enp-quiz b,#enp-quiz strong{font-weight:700}#enp-quiz cite,#enp-quiz dfn,#enp-quiz em{font-family:georgia,times,serif;font-style:italic}#enp-quiz pre{background:#eee;font-family:Courier\ 10 Pitch,Courier,monospace;font-size:.95em;line-height:1.6;margin-bottom:1.6em;max-width:100%;overflow:auto;padding:1.6em}#enp-quiz .code,#enp-quiz code,#enp-quiz kbd,#enp-quiz tt,#enp-quiz var{font:.7em Monaco,Consolas,"Andale Mono","DejaVu Sans Mono",monospace}#enp-quiz figure{margin:0}#enp-quiz img{height:auto;max-width:100%}#enp-quiz a{color:#5887c0;text-decoration:none;touch-action:manipulation;transition:color .2s}#enp-quiz a .enp-icon{fill:#5887c0}#enp-quiz a:active,#enp-quiz a:focus,#enp-quiz a:hover{color:#3f6ea6}#enp-quiz a:active .enp-icon,#enp-quiz a:focus .enp-icon,#enp-quiz a:hover .enp-icon{fill:#3f6ea6}#enp-quiz button:focus{outline-color:#4d90fe;outline-offset:-2px;outline-style:auto;outline-width:5px}#enp-quiz .enp-btn{background:#5887c0;border:0;border-radius:3px;box-shadow:inset 0 -2px 0 rgba(0,0,0,.2);color:#fff;cursor:pointer;font-size:15px;font-weight:400;letter-spacing:.05em;line-height:1.6;padding:.85em 1.4em .75em;text-align:center;text-transform:uppercase;transition:all .2s}#enp-quiz .enp-btn:hover{background:#3f6ea6;box-shadow:none;color:#fff}#enp-quiz .enp-btn:active{background:#a2bcdc;box-shadow:inset 0 2px 0 rgba(0,0,0,.1);color:#fff}#enp-quiz .enp-btn:focus{outline-color:#4d90fe;outline-offset:-2px;outline-style:auto;outline-width:5px}#enp-quiz .enp-btn--add{background:0;border:3px dashed #666;border-radius:3px;box-shadow:none;color:#545454;cursor:pointer;font-size:15px;font-weight:400;letter-spacing:.05em;line-height:1.6;padding:.85em 1.4em .75em;text-align:center;text-transform:uppercase;transition:all .2s;width:100%}#enp-quiz .enp-btn--add:hover{box-shadow:none;color:#fff}#enp-quiz .enp-btn--add:active{background:#a2bcdc;box-shadow:inset 0 2px 0 rgba(0,0,0,.1);color:#fff}#enp-quiz .enp-btn--add:focus{outline-color:#4d90fe;outline-offset:-2px;outline-style:auto;outline-width:5px}#enp-quiz .enp-btn--add:focus,#enp-quiz .enp-btn--add:hover{background:hsla(0,0%,100%,.9);border:3px dashed #444;color:#444}#enp-quiz .enp-btn--disabled{cursor:default;opacity:.65}#enp-quiz .enp-btn--enabled{-webkit-animation:expand .6s;animation:expand .6s}#enp-quiz .enp-icon{height:24px;transition:all .2s;width:24px}#enp-quiz .enp-page-title{font-size:1.6rem}#enp-quiz fieldset{border:0;margin:0;padding:0}.enp-label{color:#5e5e5e;display:block;font-size:.85rem;font-weight:400;text-transform:uppercase}.enp-legend{border:0;color:#5e5e5e;display:block;font-size:.85rem;font-weight:400;margin-bottom:.2rem;padding-top:1.6rem;text-transform:uppercase}.enp-input{background:#fff;border:1px solid #aaa;border-radius:3px;font-family:tablet-gothic,helvetica neue,helvetica,arial,sans-serif;font-size:1rem;margin-bottom:1.2rem;max-width:100%;padding:.8rem .5rem;width:20rem}@media(min-width:700px){.enp-input{padding:.8rem}}.enp-input:-ms-input-placeholder,.enp-input::-ms-input-placeholder,.enp-input::-webkit-input-placeholder,.enp-input::placeholder,.enp-textarea:-ms-input-placeholder,.enp-textarea::-ms-input-placeholder,.enp-textarea::-webkit-input-placeholder,.enp-textarea::placeholder{color:#aaa;font-family:tablet-gothic,helvetica neue,helvetica,arial,sans-serif;font-weight:300}@-webkit-keyframes removeAnswers{0%{-webkit-transform:translate3d(0,0,0);height:auto;opacity:1;transform:translate3d(0,0,0)}10%{-webkit-transform:translate3d(0,0,0);opacity:1;transform:translate3d(0,0,0)}to{-webkit-transform:translate3d(-150px,0,0);display:none;height:0;opacity:0;padding:0;transform:translate3d(-150px,0,0);z-index:-1}}@keyframes removeAnswers{0%{-webkit-transform:translate3d(0,0,0);height:auto;opacity:1;transform:translate3d(0,0,0)}10%{-webkit-transform:translate3d(0,0,0);opacity:1;transform:translate3d(0,0,0)}to{-webkit-transform:translate3d(-150px,0,0);display:none;height:0;opacity:0;padding:0;transform:translate3d(-150px,0,0);z-index:-1}}@-webkit-keyframes removeQuestion{0%,15%{-webkit-transform:translatex(0);opacity:1;transform:translatex(0)}to{-webkit-transform:translatex(-150px);opacity:0;transform:translatex(-150px)}}@keyframes removeQuestion{0%,15%{-webkit-transform:translatex(0);opacity:1;transform:translatex(0)}to{-webkit-transform:translatex(-150px);opacity:0;transform:translatex(-150px)}}@-webkit-keyframes showNextQuestion{0%{-webkit-transform:translatex(90pt);opacity:0;transform:translatex(90pt)}to{-webkit-transform:translatex(0);opacity:1;transform:translatex(0)}}@keyframes showNextQuestion{0%{-webkit-transform:translatex(90pt);opacity:0;transform:translatex(90pt)}to{-webkit-transform:translatex(0);opacity:1;transform:translatex(0)}}@-webkit-keyframes slideInTop{0%{-webkit-transform:translate3d(0,-20px,0);height:auto;opacity:0;transform:translate3d(0,-20px,0)}to{-webkit-transform:translate3d(0,0,0);height:auto;opacity:1;transform:translate3d(0,0,0)}}@keyframes slideInTop{0%{-webkit-transform:translate3d(0,-20px,0);height:auto;opacity:0;transform:translate3d(0,-20px,0)}to{-webkit-transform:translate3d(0,0,0);height:auto;opacity:1;transform:translate3d(0,0,0)}}@-webkit-keyframes slideInBottom{0%{-webkit-transform:translate3d(0,20px,0);opacity:0;transform:translate3d(0,20px,0)}to{-webkit-transform:translate3d(0,0,0);opacity:1;transform:translate3d(0,0,0)}}@keyframes slideInBottom{0%{-webkit-transform:translate3d(0,20px,0);opacity:0;transform:translate3d(0,20px,0)}to{-webkit-transform:translate3d(0,0,0);opacity:1;transform:translate3d(0,0,0)}}@-webkit-keyframes flashRedShadow{0%{background:#f14021}to{background:#fff}}@keyframes flashRedShadow{0%{background:#f14021}to{background:#fff}}@-webkit-keyframes errorContainer{0%{}to{background-color:rgba(241,64,33,.2)}}@keyframes errorContainer{0%{}to{background-color:rgba(241,64,33,.2)}}@-webkit-keyframes pop{0%{opacity:1;width:0}to{opacity:0;width:40%}30%{width:100%}80%{opacity:1;width:100%}}@keyframes pop{0%{opacity:1;width:0}to{opacity:0;width:40%}30%{width:100%}80%{opacity:1;width:100%}}.spinner{margin:0 auto;text-align:center;width:70px}.spinner>div{-webkit-animation:sk-bouncedelay 1.4s infinite ease-in-out both;animation:sk-bouncedelay 1.4s infinite ease-in-out both;background-color:#333;border-radius:100%;display:inline-block;height:18px;width:18px}.spinner .bounce1{-webkit-animation-delay:-.32s;animation-delay:-.32s}.spinner .bounce2{-webkit-animation-delay:-.16s;animation-delay:-.16s}@-webkit-keyframes sk-bouncedelay{0%,80%,to{-webkit-transform:scale(0)}40%{-webkit-transform:scale(1)}}@keyframes sk-bouncedelay{0%,80%,to{-webkit-transform:scale(0);transform:scale(0)}40%{-webkit-transform:scale(1);transform:scale(1)}}#enp-quiz{background:transparent}#enp-quiz .enp-quiz__container{background:#fff;border:1px solid #ddd;padding:0;position:relative}#enp-quiz .enp-quiz__header{border-bottom:1px solid #ddd;position:relative}#enp-quiz .enp-quiz__title{font-size:.85rem;font-weight:500;letter-spacing:.01rem;padding:.6rem 1rem;text-transform:uppercase}#enp-quiz .enp-quiz__title--hide{display:none}#enp-quiz .enp-quiz__progress{bottom:0;height:0;left:0;position:absolute;right:0}#enp-quiz .enp-quiz__progress__bar{background:#3bb275;height:3px;min-width:2rem;position:relative;transition:all .5s cubic-bezier(0,0,.3,1);width:0}#enp-quiz .enp-quiz__progress__bar__question-count{bottom:-1.3rem;font-size:.8rem;position:absolute;right:4px}#enp-quiz .enp-question__container{display:block}#enp-quiz .enp-question__form{color:#444;margin-left:auto;margin-right:auto;max-width:40pc;overflow:hidden;padding:2rem 20px 2.6rem}#enp-quiz .enp-question__form:after{clear:both;content:"";display:table}@media(min-width:700px){#enp-quiz .enp-question__form{padding:2.6rem 3rem}}#enp-quiz .enp-question__question{box-sizing:border-box;display:table;font-size:1.8rem;font-weight:700;line-height:1.2;margin-bottom:.2rem;max-width:100%;padding-bottom:.1rem;position:relative;white-space:normal}@media(min-width:25pc){#enp-quiz .enp-question__question{font-size:2rem}}#enp-quiz .enp-question__question:after{background-color:rgba(0,0,0,.2);bottom:0;content:"";height:2px;left:0;margin:auto;position:absolute;right:0;width:0}#enp-quiz .enp-question__question:focus:after{-webkit-animation:pop .8s cubic-bezier(0,0,.3,1);animation:pop .8s cubic-bezier(0,0,.3,1)}#enp-quiz .enp-question-image{margin-bottom:.4rem}#enp-quiz .enp-question__helper{font-size:1rem}#enp-quiz .enp-option__input{clip:rect(1px,1px,1px,1px);height:1px;left:-625pc;overflow:hidden;position:absolute!important;top:auto;width:1px}#enp-quiz .enp-option__input:checked+.enp-option__label:before{background-color:#3bb275}#enp-quiz .enp-option__input:focus+.enp-option__label{background:#f5f5f5;color:#444}#enp-quiz .enp-option__label{background:0;border:0;border-bottom:1px solid rgba(0,0,0,.1);color:#444;display:block;font-size:1rem;font-weight:400;line-height:1.6;padding:.8rem 0 .8rem 40px;position:relative;text-align:left;text-transform:none;transition:color .2s cubic-bezier(0,0,.3,1),background .2s cubic-bezier(0,0,.3,1);width:100%}#enp-quiz .enp-option__label:before{background-clip:content-box;background-color:transparent;border:2px solid #3bb275;border-radius:50%;content:"";height:20px;left:10px;padding:3px;position:absolute;top:.925rem;transition:all .2s;width:20px}#enp-quiz .enp-option__label:last-of-type{border-bottom:0}#enp-quiz .enp-question__container--unanswered .enp-option__label:hover{cursor:pointer}#enp-quiz .enp-question__container--unanswered .enp-option__label:hover:before{background-color:#3bb275}#enp-quiz .enp-question__submit{background:#5887c0;border:0;border-radius:3px;box-shadow:inset 0 -2px 0 rgba(0,0,0,.2);color:#fff;cursor:pointer;font-size:15px;font-weight:400;letter-spacing:.05em;line-height:1.6;padding:1em 2.8em .95em 1.4em;position:relative;text-align:center;text-transform:uppercase;transition:padding .3s cubic-bezier(0,0,.3,1)}#enp-quiz .enp-question__submit:hover{background:#3f6ea6;box-shadow:none;color:#fff}#enp-quiz .enp-question__submit:active{background:#a2bcdc;box-shadow:inset 0 2px 0 rgba(0,0,0,.1);color:#fff}#enp-quiz .enp-question__submit:focus{outline-color:#4d90fe;outline-offset:-2px;outline-style:auto;outline-width:5px}#enp-quiz .enp-question__submit__icon{-webkit-transform:translate3d(0,0,0);background:transparent;border-radius:50%;bottom:0;fill:#fff;height:1.6em;margin-bottom:auto;margin-left:.5em;margin-top:auto;position:absolute;top:0;transform:translate3d(0,0,0);transition:all .3s cubic-bezier(0,0,.3,1);width:1.6em}#enp-quiz .enp-question__submit:focus .enp-question__submit__icon,#enp-quiz .enp-question__submit:hover .enp-question__submit__icon{background:#fff;fill:#3f6ea6}#enp-quiz .enp-question__submit:focus,#enp-quiz .enp-question__submit:hover{padding-right:4em}#enp-quiz .enp-question__submit .enp-question__submit__icon{right:.8em}#enp-quiz .enp-question__fieldset--mc .enp-question__submit{height:0;opacity:0;padding-bottom:0;padding-top:0}#enp-quiz .enp-question__fieldset--mc .enp-option__input:checked~.enp-options__submit{-webkit-animation:.3s slideInTop cubic-bezier(0,0,.3,1) forwards;animation:.3s slideInTop cubic-bezier(0,0,.3,1) forwards;height:auto;margin-top:.4rem;opacity:1;padding-bottom:.95em;padding-top:1em}#enp-quiz .enp-question__fieldset--slider .enp-options__submit{margin-top:1.4rem}#enp-quiz .enp-question__container--explanation{background-color:rgba(0,0,0,.15)}#enp-quiz .enp-question__container--explanation .enp-question__submit{display:none}#enp-quiz .enp-question__container--explanation .enp-option__label{border-bottom:0;margin-bottom:5px}#enp-quiz .enp-question__container--explanation .enp-option__input--correct-clicked+.enp-option__label:before{background-color:#3bb275}#enp-quiz .enp-question__container--explanation .enp-option__input--correct+.enp-option__label{background-color:#e6f7ee;box-shadow:inset 4px 0 0 #3bb275}#enp-quiz .enp-question__container--explanation .enp-option__input--incorrect-clicked+.enp-option__label{background-color:#fff;box-shadow:inset 4px 0 0 #f14021}#enp-quiz .enp-question__container--explanation .enp-option__input--incorrect-clicked+.enp-option__label:before{background-color:#f14021;border:2px solid #f14021}#enp-quiz .enp-option__input--slide-hide+.enp-option__label{-webkit-animation:removeAnswers .6s cubic-bezier(.28,.01,0,.69) forwards;animation:removeAnswers .6s cubic-bezier(.28,.01,0,.69) forwards;height:0;margin:0}#enp-quiz .enp-explanation{background:#fff;padding:1.6rem 1.6rem 1.5rem}#enp-quiz .enp-question__fieldset--slider .enp-explanation{-webkit-animation:slideInBottom .3s cubic-bezier(0,0,.3,1) forwards;animation:slideInBottom .3s cubic-bezier(0,0,.3,1) forwards}#enp-quiz .enp-explanation--correct{box-shadow:inset 4px 0 0 #3bb275}#enp-quiz .enp-explanation--correct .enp-explanation__percentage:after{content:"% Got This Right"}#enp-quiz .enp-explanation--incorrect{box-shadow:inset 4px 0 0 #f14021}#enp-quiz .enp-explanation--incorrect .enp-explanation__percentage:after{content:"% Got This Wrong"}#enp-quiz .enp-explanation__title{font-size:.85rem;text-transform:uppercase}#enp-quiz .enp-explanation__percentage{color:#565656;font-size:.75rem;font-weight:500;margin-left:4px}#enp-quiz .enp-explanation__percentage:after{content:"%"}#enp-quiz .enp-explanation--correct .enp-explanation__title{color:#2e8c5c}#enp-quiz .enp-explanation--incorrect .enp-explanation__title{color:#d22b0d}#enp-quiz .enp-explanation__explanation{font-weight:400;margin-top:.4rem}#enp-quiz .enp-next-step{border:0;border-radius:3px;box-shadow:inset 0 -2px 0 rgba(0,0,0,.2);color:#fff;cursor:pointer;font-size:15px;font-weight:400;letter-spacing:.05em;line-height:1.6;padding:1em 2.8em .95em 1.4em;position:relative;text-align:center;text-transform:uppercase;transition:padding .3s cubic-bezier(0,0,.3,1)}#enp-quiz .enp-next-step:hover{box-shadow:none}#enp-quiz .enp-next-step:active{box-shadow:inset 0 2px 0 rgba(0,0,0,.1);color:#fff}#enp-quiz .enp-next-step:focus{outline-offset:-2px;outline-style:auto;outline-width:5px}#enp-quiz .enp-next-step__icon{-webkit-transform:translate3d(0,0,0);background:transparent;border-radius:50%;bottom:0;fill:#fff;height:1.6em;margin-bottom:auto;margin-left:.5em;margin-top:auto;position:absolute;top:0;transform:translate3d(0,0,0);transition:all .3s cubic-bezier(0,0,.3,1);width:1.6em}#enp-quiz .enp-next-step:focus .enp-next-step__icon,#enp-quiz .enp-next-step:hover .enp-next-step__icon{background:#fff;fill:#3f6ea6}#enp-quiz .enp-next-step{background:transparent;border:2px solid #5887c0;border-radius:3px;box-shadow:none;color:#5887c0;cursor:pointer;display:inline-block;font-size:15px;font-weight:400;letter-spacing:.05em;line-height:1.6;padding:.8em 2.4em .8em 1.4em;position:relative;text-align:center;text-transform:uppercase;transition:all .2s;width:100%}#enp-quiz .enp-next-step:hover{background:#3f6ea6;box-shadow:none}#enp-quiz .enp-next-step:active{background:#a2bcdc;box-shadow:inset 0 2px 0 rgba(0,0,0,.1);color:#fff}#enp-quiz .enp-next-step:focus{outline-color:#4d90fe;outline-offset:-2px;outline-style:auto;outline-width:5px}#enp-quiz .enp-next-step:focus,#enp-quiz .enp-next-step:hover{background:transparent;border:2px solid #3f6ea6;color:#3f6ea6}#enp-quiz .enp-next-step .enp-next-step__icon{fill:#5887c0;transition:all .3s cubic-bezier(0,0,.3,1)}#enp-quiz .enp-next-step:hover .enp-next-step__icon{-webkit-transform:translate3d(1em,0,0);background:#5887c0;fill:#fff;margin-right:1em;transform:translate3d(1em,0,0)}#enp-quiz .enp-question--on-deck{-webkit-transform:translatex(200px);opacity:0;position:absolute;top:0;transform:translatex(200px);z-index:-1}#enp-quiz .enp-question--show{-webkit-animation:showNextQuestion .6s cubic-bezier(0,0,.3,1) forwards;animation:showNextQuestion .6s cubic-bezier(0,0,.3,1) forwards}#enp-quiz .enp-question--remove{-webkit-animation:removeQuestion .15s cubic-bezier(0,0,.3,1) forwards;animation:removeQuestion .15s cubic-bezier(0,0,.3,1) forwards;position:absolute}#enp-quiz .enp-results__score{border-radius:50%;display:block;height:200px;margin:0 auto 1rem;position:relative;text-align:center;width:200px}#enp-quiz .enp-results__score__title{-webkit-transform:translate(-50%,-50%);color:#444;font-size:5rem;font-weight:400;left:50%;line-height:1;margin:0;position:absolute;top:50%;transform:translate(-50%,-50%)}#enp-quiz .enp-results__score__title__percentage{font-size:1.3rem;font-weight:300;position:absolute;top:1rem}#enp-quiz .enp-results__encouragement{font-size:1.8rem;font-weight:500;line-height:1.2;margin:.2rem;text-align:center}#enp-quiz .enp-results__description{margin:0 auto 1.6rem;max-width:24rem}#enp-quiz .enp-results__score__circle{-webkit-transform:rotate(-90deg);transform:rotate(-90deg)}#enp-quiz #enp-results__score__circle__path,#enp-quiz .enp-results__score__circle__bg{stroke:#ddd;stroke-width:4px}#enp-quiz #enp-results__score__circle__path{stroke:#3bb275}#enp-quiz .enp-results__score__circle__setOffset{transition:stroke-dashoffset 1.2s cubic-bezier(0,0,.3,1)}#enp-quiz .enp-results__score__circle__resetOffset{stroke-dashoffset:565.48}#enp-quiz .enp-results__share-title{font-size:.85rem;margin:2.4rem 0 1rem;text-align:center;text-transform:uppercase}#enp-quiz .enp-results__share{list-style:none;margin-left:0;text-align:center}#enp-quiz .enp-results__share__item{display:inline-block;margin-right:20px}#enp-quiz .enp-results__share__item:last-child{margin-right:0}#enp-quiz .enp-results__share__item__icon{background:#5887c0;border-radius:50%;fill:#fff!important;height:2.4rem;padding:.6rem;width:2.4rem}#enp-quiz .enp-results__share__item__icon--facebook{background-color:#3a5795}#enp-quiz .enp-results__share__item__icon--twitter{background-color:#4099ff}#enp-quiz .enp-quiz-restart__container{text-align:center}#enp-quiz .enp-question__container--error{-webkit-animation:errorContainer .3s cubic-bezier(0,0,.3,1) forwards;animation:errorContainer .3s cubic-bezier(0,0,.3,1) forwards;padding:1rem 10px}#enp-quiz .enp-callout{font-size:.8rem;padding:.4rem;text-align:right}#enp-quiz .enp-slider{margin-bottom:1.6rem}#enp-quiz .enp-slider-input__container{align-items:center;display:flex;justify-content:center;margin:1.6rem auto;position:relative}#enp-quiz .enp-slider-input__label{color:#5e5e5e;display:block;font-size:.85rem;font-weight:400;text-transform:uppercase}#enp-quiz .enp-slider-input__prefix,#enp-quiz .enp-slider-input__suffix{font-size:1rem}#enp-quiz .enp-slider-input__prefix{margin-right:.2rem;white-space:pre}#enp-quiz .enp-slider-input__suffix{margin-left:.2rem;white-space:pre}#enp-quiz .enp-slider-input__input{background:#fff;border:1px solid #aaa;border-radius:3px;font-family:tablet-gothic,helvetica neue,helvetica,arial,sans-serif;font-size:1rem;margin-bottom:0;max-width:100%;padding:.75rem;transition:all .25s cubic-bezier(0,0,.3,1);width:auto}@media(min-width:700px){#enp-quiz .enp-slider-input__input{padding:.8rem}}#enp-quiz .enp-slider-input__input--incorrect{color:#f14021}#enp-quiz .enp-slider-input__input--correct{color:#319461}#enp-quiz .enp-slider-input__input--invalid-animation{box-shadow:0 0 2px 1px #e97763}#enp-quiz .enp-slider_input__range-helper{bottom:-1.2rem;font-size:.8rem;position:absolute}#enp-quiz .enp-slider_input__range-helper--low{left:0}#enp-quiz .enp-slider_input__range-helper--high{right:0}#enp-quiz .enp-slider-input__range-helper__number{color:#666;position:relative}#enp-quiz .ui-slider-range-show-correct__tooltip-container{position:relative}#enp-quiz .ui-slider-range-show-correct__tooltip{background-color:#fff;border:2px solid #3bb275;border-radius:50%;height:1.1rem;margin-left:-.55rem;position:absolute;top:-.4rem;width:1.1rem;z-index:9999}#enp-quiz .ui-slider-range-show-correct__tooltip--low{left:0}#enp-quiz .ui-slider-range-show-correct__tooltip--high{right:-.55rem}#enp-quiz .ui-slider-range-show-correct__tooltip__text{color:#287950;display:inline-block;font-size:.825rem;min-width:100%;position:relative;text-align:center;text-shadow:0 1px 0 #fff;top:-1.35rem}#enp-quiz .enp-slider{background:#ddd;position:relative;text-align:left}#enp-quiz .enp-slider .ui-helper-hidden{display:none}#enp-quiz .enp-slider .ui-helper-hidden-accessible{border:0;clip:rect(0 0 0 0);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px}#enp-quiz .enp-slider .ui-helper-reset{border:0;font-size:100%;line-height:1.3;list-style:none;margin:0;outline:0;padding:0;text-decoration:none}#enp-quiz .enp-slider .ui-helper-clearfix:after,#enp-quiz .enp-slider .ui-helper-clearfix:before{border-collapse:collapse;content:"";display:table}#enp-quiz .enp-slider .ui-helper-clearfix:after{clear:both}#enp-quiz .enp-slider .ui-helper-clearfix{min-height:0}#enp-quiz .enp-slider .ui-helper-zfix{filter:alpha(opacity=0);height:100%;left:0;opacity:0;position:absolute;top:0;width:100%}#enp-quiz .enp-slider .ui-front{z-index:100}#enp-quiz .enp-slider .ui-state-disabled{cursor:default!important}#enp-quiz .enp-slider .ui-icon{background-repeat:no-repeat;display:block;overflow:hidden;text-indent:-99999px}#enp-quiz .enp-slider .ui-widget-overlay{height:100%;left:0;position:fixed;top:0;width:100%}#enp-quiz .enp-slider .ui-slider-handle{background:#fff;border:1px solid #aaa;border-radius:50%;cursor:default;height:1.2rem;margin-left:-.6rem;position:absolute;top:-.4rem;touch-action:none;transition:opacity .2s cubic-bezier(0,0,.3,1),height .18s cubic-bezier(0,0,.3,1),width .18s cubic-bezier(0,0,.3,1),transform .18s cubic-bezier(0,0,.3,1),-webkit-transform .18s cubic-bezier(0,0,.3,1);width:1.2rem;z-index:2}@media(max-width:699px){#enp-quiz .enp-slider .ui-slider-handle{-webkit-transform:rotate(225deg);height:2rem;margin-left:-1rem;top:-.85rem;transform:rotate(225deg);width:2rem}}#enp-quiz .enp-slider .ui-slider-handle:focus{box-shadow:0 0 3px 1px #4d90fe;outline:0}@media(max-width:699px){#enp-quiz .enp-slider .ui-slider-handle.ui-state-active{-webkit-transform:translate3d(-.2rem,-.8rem,0) rotate(225deg);border-top-left-radius:0;height:2.2rem;transform:translate3d(-.2rem,-.8rem,0) rotate(225deg);width:2.2rem}}#enp-quiz .enp-slider .ui-slider-handle--correct,#enp-quiz .enp-slider .ui-slider-handle--incorrect{height:1.1rem;margin-left:-.55rem;top:-.4rem;width:1.1rem}#enp-quiz .enp-slider .ui-slider-handle--incorrect{border:2px solid #f14021;z-index:1}#enp-quiz .enp-slider .ui-slider-handle--correct{border:2px solid #3bb275;z-index:99999}#enp-quiz .enp-slider .ui-slider-range{background-position:0 0;border:0;display:block;font-size:.7rem;height:100%;position:absolute;top:0;z-index:1}#enp-quiz .enp-slider .ui-slider-range-show-correct{background:#3bb275;z-index:9}#enp-quiz .enp-slider .ui-slider-range-min{background:#3bb275;left:0}#enp-quiz .enp-slider .ui-slider-range-max{right:0}#enp-quiz .enp-slider.ui-state-disabled .ui-slider-handle,#enp-quiz .enp-slider.ui-state-disabled .ui-slider-range{-webkit-filter:inherit;filter:inherit}#enp-quiz .ui-slider-horizontal{height:.3rem}#enp-quiz .enp-question__answered .enp-slider{background:#bbb}#enp-quiz .enp-question__answered .ui-slider-range-min{background:#fff} \ No newline at end of file diff --git a/public/quiz-take/css/sass/_setup.scss b/public/quiz-take/css/sass/_setup.scss index fe0fae61..b43bd14c 100644 --- a/public/quiz-take/css/sass/_setup.scss +++ b/public/quiz-take/css/sass/_setup.scss @@ -81,6 +81,7 @@ html { html #enp-quiz { box-sizing: border-box; + border-radius: 3px; } body #enp-quiz { From 61014b60e0c17979ae2ed99de41aef39dec7489e Mon Sep 17 00:00:00 2001 From: Luke Carl Hartman Date: Wed, 20 Apr 2022 12:24:39 -0700 Subject: [PATCH 03/32] more syling (colors, border-radius ext) --- .../quiz-create/css/enp_quiz-create.min.css | 2 +- public/quiz-create/css/sass/_dashboard.scss | 15 ++++- .../quiz-create/css/sass/_quiz-publish.scss | 2 +- public/quiz-create/css/sass/_utilities.scss | 6 +- public/quiz-take/css/enp_quiz-take.min.css | 2 +- public/quiz-take/css/sass/_quiz.scss | 4 +- public/quiz-take/css/sass/_utilities.scss | 2 +- public/quiz-take/css/sass/_variables.scss | 2 +- .../quiz-take/templates/partials/quiz-end.php | 64 +++++++++---------- 9 files changed, 56 insertions(+), 43 deletions(-) diff --git a/public/quiz-create/css/enp_quiz-create.min.css b/public/quiz-create/css/enp_quiz-create.min.css index 7e8c5f78..e060f9e7 100644 --- a/public/quiz-create/css/enp_quiz-create.min.css +++ b/public/quiz-create/css/enp_quiz-create.min.css @@ -1 +1 @@ -html{font-size:1pc!important}html #enp-quiz{box-sizing:border-box}body #enp-quiz{background:#fff;overflow:hidden}#enp-quiz *,#enp-quiz *:after,#enp-quiz *:before{box-sizing:inherit}#enp-quiz ol,#enp-quiz ul{margin:0 0 1.6rem 1.25rem;padding:0}#enp-quiz textarea{margin-bottom:1rem}#enp-quiz button,#enp-quiz button:active,#enp-quiz button:focus,#enp-quiz button:hover,#enp-quiz iframe,#enp-quiz input[type=button],#enp-quiz input[type=button]:active,#enp-quiz input[type=button]:focus,#enp-quiz input[type=button]:hover,#enp-quiz input[type=reset],#enp-quiz input[type=reset]:active,#enp-quiz input[type=reset]:focus,#enp-quiz input[type=reset]:hover,#enp-quiz input[type=submit],#enp-quiz input[type=submit]:active,#enp-quiz input[type=submit]:focus,#enp-quiz input[type=submit]:hover{border:0}#enp-quiz .enp-screen-reader-text{clip:rect(1px,1px,1px,1px);height:1px;left:-625pc;overflow:hidden;position:absolute!important;top:auto;width:1px}#enp-quiz .enp-screen-reader-text:active,#enp-quiz .enp-screen-reader-text:focus,#enp-quiz .enp-screen-reader-text:hover{background-color:#f1f1f1;border-radius:3px;box-shadow:0 0 2px 2px rgba(0,0,0,.6);clip:auto!important;color:#21759b;display:block;font-size:14px;font-weight:700;height:auto;left:5px;line-height:normal;padding:15px 23px 14px;text-decoration:none;top:5px;width:auto;z-index:100000}#enp-quiz .enp-accordion-header{background:#fff;border:0;border-radius:3px;box-shadow:inset 1px 1px 0 #ccc,inset -1px -1px 0 #ccc;color:#444;cursor:pointer;font-family:tablet-gothic,helvetica neue,helvetica,arial,sans-serif;font-size:.9rem;font-weight:400;letter-spacing:0;line-height:1.5;margin:1.6rem 0 0;min-height:3.065rem;padding:1rem 2rem 1rem 1rem;position:relative;text-align:left;text-transform:none;transition:all .2s cubic-bezier(0,0,.3,1);width:100%;z-index:9}#enp-quiz .enp-accordion-header:first-of-type{margin-top:0}#enp-quiz .enp-accordion-header .enp-accordion-header__icon{bottom:.75rem;fill:#666;position:absolute;right:.75rem;transition:all .35s cubic-bezier(0,0,.3,1)}#enp-quiz .enp-accordion-header--open .enp-accordion-header__icon{-webkit-transform:rotatex(180deg) translatey(2px);transform:rotatex(180deg) translatey(2px)}#enp-quiz .enp-accordion-content{background:#fff;box-shadow:inset 1px -1px 0 #ccc,inset -1px -1px 0 #ccc;display:block;height:auto;margin-bottom:1.6rem;overflow:visible;position:relative;width:100%}#enp-quiz .enp-accordion-content--closed{-webkit-animation:slideOutTop .25s cubic-bezier(0,0,.3,1) forwards;animation:slideOutTop .25s cubic-bezier(0,0,.3,1) forwards;display:none;margin-top:0;padding-top:0}#enp-quiz .enp-accordion-content--open{-webkit-animation:slideInTop .45s cubic-bezier(0,0,.3,1) forwards;animation:slideInTop .45s cubic-bezier(0,0,.3,1) forwards;margin-bottom:2rem;padding-top:1.6rem}#enp-quiz .enp-quiz-message{background:#fff;border:1px solid #eee;border-bottom:1px solid #ccc;bottom:0;left:0;margin-bottom:1.6rem;margin-left:auto;margin-right:auto;max-width:32pc;padding:1rem .375rem;position:fixed}#enp-quiz .enp-quiz-message:after{clear:both;content:"";display:table}#enp-quiz .enp-quiz-message__title{font-size:.85rem;text-transform:uppercase}#enp-quiz .enp-message__list{font-size:1.1rem;list-style:none;margin-bottom:0;margin-left:0}#enp-quiz .enp-quiz-message--error{border-left:6px solid #bf5700;color:#bf5700}#enp-quiz .enp-quiz-message__title--error{color:#964400}#enp-quiz .enp-quiz-message--success{border-left:6px solid #3bb275;color:#319461}#enp-quiz .enp-quiz-message__title--success{color:#319461}#enp-quiz .enp-quiz-message--note{border-left:6px solid #cca562}#enp-quiz .enp-quiz-message__title--note{color:#242f42}#enp-quiz .enp-quiz-message__close{background:0;border:0;box-shadow:none;margin:0;padding:0;position:absolute;right:5px;top:5px}#enp-quiz .enp-quiz-message--ajax{-webkit-animation:slideInBottom .3s;animation:slideInBottom .3s;margin-bottom:.6rem}#enp-quiz .enp-quiz-message-ajax-container{bottom:10px;position:fixed;z-index:9999}#enp-quiz .enp-quiz-message--saving__spinner{margin-left:-10px}#enp-quiz .enp-quiz-message--saving__text{font-size:1rem}#enp-quiz input.limited-chars,#enp-quiz textarea.limited-chars{margin-bottom:.2rem}#enp-quiz .limited-chars__container{color:#7a7a7a;display:block;font-size:.8rem;margin-bottom:1.2rem;text-align:right}#enp-quiz .limited-chars__counter{color:#666}#enp-quiz .limited-chars__container--error,#enp-quiz .limited-chars__container--error .limited-chars__counter{color:#964400}#enp-quiz input.has-error,#enp-quiz textarea.has-error{border:1px solid #bf5700}#enp-quiz input.has-error:focus,#enp-quiz textarea.has-error:focus{outline-color:#bf5700}#enp-quiz .enp-tooltip{position:relative}#enp-quiz .enp-tooltip__activator:focus+.enp-tooltip__description,#enp-quiz .enp-tooltip__activator:focus>.enp-tooltip__description{display:block}#enp-quiz .enp-tooltip__description{background:#f5f5f5;border-radius:3px;display:none;font-size:.9rem;left:103%;margin-bottom:2rem;max-width:200px;padding:.9rem;position:absolute}.enp-sticky{left:0;position:relative;right:0;top:0;z-index:999}.enp-sticky.enp-sticky--fixed{position:fixed}.enp-breadcrumb-link{font-size:.85rem}.enp-breadcrumb-link__icon{left:.4rem;position:relative;top:.45rem}body #enp-quiz{color:#444;font-family:tablet-gothic,helvetica neue,helvetica,arial,sans-serif;font-size:1em;font-weight:400;line-height:1.6}@media(min-width:700px){body #enp-quiz{font-size:1.3em}}#enp-quiz h1,#enp-quiz h2,#enp-quiz h3,#enp-quiz h4,#enp-quiz h5,#enp-quiz h6{clear:both;color:#5d5e5f;font-family:tablet-gothic,helvetica neue,helvetica,arial,sans-serif;font-weight:700;line-height:1.2em;margin:0 0 .2rem}#enp-quiz h1{font-size:2em}#enp-quiz h2{font-size:1.75em}#enp-quiz h3{font-size:1.475em}#enp-quiz h4{font-size:1.3em}#enp-quiz h5{font-size:1.125em}#enp-quiz h6{font-size:1em}#enp-quiz p+h1,#enp-quiz p+h2,#enp-quiz p+h3,#enp-quiz p+h4,#enp-quiz p+h5,#enp-quiz p+h6,#enp-quiz ul+h1,#enp-quiz ul+h2,#enp-quiz ul+h3,#enp-quiz ul+h4,#enp-quiz ul+h5,#enp-quiz ul+h6{margin-top:1.8em}#enp-quiz p{font-size:.85em;font-weight:300;margin-bottom:1.125em}#enp-quiz ol,#enp-quiz ul{margin:0 0 1.6em 1.25em}#enp-quiz ul{list-style:disc}#enp-quiz ol{list-style:decimal}#enp-quiz li>ol,#enp-quiz li>ul{margin-bottom:0;margin-left:1.6em}#enp-quiz b,#enp-quiz strong{font-weight:700}#enp-quiz cite,#enp-quiz dfn,#enp-quiz em{font-family:georgia,times,serif;font-style:italic}#enp-quiz pre{background:#eee;font-family:Courier\ 10 Pitch,Courier,monospace;font-size:.95em;line-height:1.6;margin-bottom:1.6em;max-width:100%;overflow:auto;padding:1.6em}#enp-quiz .code,#enp-quiz code,#enp-quiz kbd,#enp-quiz tt,#enp-quiz var{font:.7em Monaco,Consolas,"Andale Mono","DejaVu Sans Mono",monospace}#enp-quiz table{border:0}#enp-quiz table th{border:0;border-bottom:1px solid #ddd;font-family:tablet-gothic,helvetica neue,helvetica,arial,sans-serif;font-size:.8rem;text-transform:uppercase}#enp-quiz table td{border:0;border-bottom:1px solid #eee;font-family:tablet-gothic,helvetica neue,helvetica,arial,sans-serif;font-size:1rem}#enp-quiz table tr:nth-child(even) td{background:#f8f8f8}#enp-quiz table tr:last-child td{border-bottom:0}#enp-quiz figure{margin:0}#enp-quiz img{height:auto;max-width:100%}#enp-quiz a{color:#333f48;text-decoration:none;touch-action:manipulation;transition:color .2s}#enp-quiz a .enp-icon{fill:#333f48}#enp-quiz a:active,#enp-quiz a:focus,#enp-quiz a:hover{color:#222a30}#enp-quiz a:active .enp-icon,#enp-quiz a:focus .enp-icon,#enp-quiz a:hover .enp-icon{fill:#222a30}#enp-quiz button:focus{outline-color:#4d90fe;outline-offset:-2px;outline-style:auto;outline-width:5px}#enp-quiz .enp-btn{background:#333f48;border:0;border-radius:3px;box-shadow:inset 0 -2px 0 rgba(0,0,0,.2);color:#fff;cursor:pointer;font-size:15px;font-weight:400;letter-spacing:.05em;line-height:1.6;padding:.85em 1.4em .75em;text-align:center;text-transform:uppercase;transition:all .2s}#enp-quiz .enp-btn:focus,#enp-quiz .enp-btn:hover{background:#222a30;box-shadow:none;color:#fff}#enp-quiz .enp-btn:active{background:#5d7384;box-shadow:inset 0 2px 0 rgba(0,0,0,.1);color:#fff}#enp-quiz .enp-btn:focus{outline-color:#4d90fe;outline-offset:-2px;outline-style:auto;outline-width:5px}#enp-quiz .enp-btn:disabled,#enp-quiz .enp-btn:disabled:focus,#enp-quiz .enp-btn:disabled:hover{background:#333f48;cursor:default;opacity:.5}#enp-quiz .enp-btn--add{background:0;border:3px dashed #666;border-radius:3px;box-shadow:none;color:#545454;cursor:pointer;font-size:15px;font-weight:400;letter-spacing:.05em;line-height:1.6;padding:.85em 1.4em .75em;text-align:center;text-transform:uppercase;transition:all .2s;width:100%}#enp-quiz .enp-btn--add:focus,#enp-quiz .enp-btn--add:hover{background:#222a30;box-shadow:none;color:#fff}#enp-quiz .enp-btn--add:active{background:#5d7384;box-shadow:inset 0 2px 0 rgba(0,0,0,.1);color:#fff}#enp-quiz .enp-btn--add:focus{outline-color:#4d90fe;outline-offset:-2px;outline-style:auto;outline-width:5px}#enp-quiz .enp-btn--add:disabled,#enp-quiz .enp-btn--add:disabled:focus,#enp-quiz .enp-btn--add:disabled:hover{background:#333f48;cursor:default;opacity:.5}#enp-quiz .enp-btn--add:focus,#enp-quiz .enp-btn--add:hover{background:hsla(0,0%,100%,.9);border:3px dashed #444;color:#444}#enp-quiz .enp-btn--disabled{cursor:default;opacity:.65}#enp-quiz .enp-btn--enabled{-webkit-animation:expand .6s;animation:expand .6s}#enp-quiz .enp-icon{height:24px;transition:all .2s;width:24px}#enp-quiz .enp-page-title{font-size:1.6rem}@-webkit-keyframes slideInBottom{0%{-webkit-transform:translate3d(0,75pt,0);opacity:0;transform:translate3d(0,75pt,0)}to{-webkit-transform:translate3d(0,0,0);opacity:1;transform:translate3d(0,0,0)}}@keyframes slideInBottom{0%{-webkit-transform:translate3d(0,75pt,0);opacity:0;transform:translate3d(0,75pt,0)}to{-webkit-transform:translate3d(0,0,0);opacity:1;transform:translate3d(0,0,0)}}@-webkit-keyframes slideInTop{0%{-webkit-transform:translate3d(0,-20px,0);height:auto;opacity:0;transform:translate3d(0,-20px,0)}to{-webkit-transform:translate3d(0,0,0);height:auto;opacity:1;transform:translate3d(0,0,0)}}@keyframes slideInTop{0%{-webkit-transform:translate3d(0,-20px,0);height:auto;opacity:0;transform:translate3d(0,-20px,0)}to{-webkit-transform:translate3d(0,0,0);height:auto;opacity:1;transform:translate3d(0,0,0)}}@-webkit-keyframes slideInTop--reduced-opacity{0%{-webkit-transform:translate3d(0,-20px,0);height:auto;opacity:0;transform:translate3d(0,-20px,0)}to{-webkit-transform:translate3d(0,0,0);height:auto;opacity:.8;transform:translate3d(0,0,0)}}@keyframes slideInTop--reduced-opacity{0%{-webkit-transform:translate3d(0,-20px,0);height:auto;opacity:0;transform:translate3d(0,-20px,0)}to{-webkit-transform:translate3d(0,0,0);height:auto;opacity:.8;transform:translate3d(0,0,0)}}@-webkit-keyframes slideOutTop{0%{-webkit-transform:translate3d(0,0,0);height:75pt;opacity:1;overflow:hidden;transform:translate3d(0,0,0)}to{-webkit-transform:translate3d(0,-20px,0);height:0;opacity:0;transform:translate3d(0,-20px,0)}}@keyframes slideOutTop{0%{-webkit-transform:translate3d(0,0,0);height:75pt;opacity:1;overflow:hidden;transform:translate3d(0,0,0)}to{-webkit-transform:translate3d(0,-20px,0);height:0;opacity:0;transform:translate3d(0,-20px,0)}}@-webkit-keyframes removeElement{0%{-webkit-transform:translate3d(0,0,0);opacity:1;transform:translate3d(0,0,0)}to{-webkit-transform:translate3d(-200px,0,0);height:0;margin:0;opacity:0;padding:0;transform:translate3d(-200px,0,0);z-index:-1}}@keyframes removeElement{0%{-webkit-transform:translate3d(0,0,0);opacity:1;transform:translate3d(0,0,0)}to{-webkit-transform:translate3d(-200px,0,0);height:0;margin:0;opacity:0;padding:0;transform:translate3d(-200px,0,0);z-index:-1}}@-webkit-keyframes removeAnswers{0%{-webkit-transform:translate3d(0,0,0);opacity:1;transform:translate3d(0,0,0)}to{-webkit-transform:translate3d(-200px,0,0);display:none;height:0;opacity:0;padding:0;transform:translate3d(-200px,0,0);z-index:-1}}@keyframes removeAnswers{0%{-webkit-transform:translate3d(0,0,0);opacity:1;transform:translate3d(0,0,0)}to{-webkit-transform:translate3d(-200px,0,0);display:none;height:0;opacity:0;padding:0;transform:translate3d(-200px,0,0);z-index:-1}}@-webkit-keyframes removeQuestion{0%{-webkit-transform:translatex(0);opacity:1;transform:translatex(0)}to{-webkit-transform:translatex(-200px);opacity:0;transform:translatex(-200px)}}@keyframes removeQuestion{0%{-webkit-transform:translatex(0);opacity:1;transform:translatex(0)}to{-webkit-transform:translatex(-200px);opacity:0;transform:translatex(-200px)}}@-webkit-keyframes showNextQuestion{0%{-webkit-transform:translatex(200px);opacity:0;transform:translatex(200px)}to{-webkit-transform:translatex(0);opacity:1;transform:translatex(0)}}@keyframes showNextQuestion{0%{-webkit-transform:translatex(200px);opacity:0;transform:translatex(200px)}to{-webkit-transform:translatex(0);opacity:1;transform:translatex(0)}}@-webkit-keyframes expand{0%{-webkit-transform:scale3d(1,1,1);box-shadow:0 0 0 rgba(0,0,0,.3);opacity:.8;transform:scale3d(1,1,1)}to{-webkit-transform:scale3d(1,1,1);box-shadow:0 0 0 rgba(0,0,0,.3),inset 0 2px 0 rgba(0,0,0,.2);opacity:1;transform:scale3d(1,1,1)}40%{opacity:1}70%{-webkit-transform:scale3d(1.1,1.1,1);box-shadow:0 0 8px rgba(0,0,0,.4);opacity:1;transform:scale3d(1.1,1.1,1)}}@keyframes expand{0%{-webkit-transform:scale3d(1,1,1);box-shadow:0 0 0 rgba(0,0,0,.3);opacity:.8;transform:scale3d(1,1,1)}to{-webkit-transform:scale3d(1,1,1);box-shadow:0 0 0 rgba(0,0,0,.3),inset 0 2px 0 rgba(0,0,0,.2);opacity:1;transform:scale3d(1,1,1)}40%{opacity:1}70%{-webkit-transform:scale3d(1.1,1.1,1);box-shadow:0 0 8px rgba(0,0,0,.4);opacity:1;transform:scale3d(1.1,1.1,1)}}@-webkit-keyframes checkmark{0%,to{-webkit-transform:scale3d(.2,.2,1);opacity:0;transform:scale3d(.2,.2,1)}10%,92%{-webkit-transform:scale3d(1.4,1.4,1);transform:scale3d(1.4,1.4,1)}12%{-webkit-transform:scale3d(1,1,1);transform:scale3d(1,1,1)}5%{opacity:1}90%{-webkit-transform:scale3d(1,1,1);opacity:1;transform:scale3d(1,1,1)}}@keyframes checkmark{0%,to{-webkit-transform:scale3d(.2,.2,1);opacity:0;transform:scale3d(.2,.2,1)}10%,92%{-webkit-transform:scale3d(1.4,1.4,1);transform:scale3d(1.4,1.4,1)}12%{-webkit-transform:scale3d(1,1,1);transform:scale3d(1,1,1)}5%{opacity:1}90%{-webkit-transform:scale3d(1,1,1);opacity:1;transform:scale3d(1,1,1)}}@-webkit-keyframes fadeOut{0%{opacity:1}to{opacity:0}}@keyframes fadeOut{0%{opacity:1}to{opacity:0}}@-webkit-keyframes fadeIn{0%{opacity:0}to{opacity:1}}@keyframes fadeIn{0%{opacity:0}to{opacity:1}}@-webkit-keyframes navSlideIn{0%{-webkit-transform:translate3d(0,-200px,0);transform:translate3d(0,-200px,0)}to{-webkit-transform:translate3d(0,0,0);transform:translate3d(0,0,0)}}@keyframes navSlideIn{0%{-webkit-transform:translate3d(0,-200px,0);transform:translate3d(0,-200px,0)}to{-webkit-transform:translate3d(0,0,0);transform:translate3d(0,0,0)}}.spinner{margin:0 auto;text-align:center;width:70px}.spinner>div{-webkit-animation:sk-bouncedelay 1.4s infinite ease-in-out both;animation:sk-bouncedelay 1.4s infinite ease-in-out both;background-color:#333;border-radius:100%;display:inline-block;height:18px;width:18px}.spinner .bounce1{-webkit-animation-delay:-.32s;animation-delay:-.32s}.spinner .bounce2{-webkit-animation-delay:-.16s;animation-delay:-.16s}@-webkit-keyframes sk-bouncedelay{0%,80%,to{-webkit-transform:scale(0)}40%{-webkit-transform:scale(1)}}@keyframes sk-bouncedelay{0%,80%,to{-webkit-transform:scale(0);transform:scale(0)}40%{-webkit-transform:scale(1);transform:scale(1)}}#enp-quiz{transition:background .25s cubic-bezier(0,0,.3,1)}#enp-quiz .enp-container{margin-left:auto;margin-right:auto;max-width:40pc;padding-left:20px;padding-right:20px}#enp-quiz .enp-container:after{clear:both;content:"";display:table}#enp-quiz .enp-aside{background:#fff;border:1px solid #eee;border-bottom-color:#ccc;font-size:1.2rem;margin-bottom:1.6rem;margin-left:auto;margin-right:auto;max-width:32pc;padding:1.6rem 20px}@media(min-width:700px){#enp-quiz .enp-aside{margin-bottom:2.6rem;padding:1.6rem 2rem}}#enp-quiz .enp-aside:after{clear:both;content:"";display:table}#enp-quiz .enp-aside__title{font-size:.85rem;font-weight:600;text-transform:uppercase}#enp-quiz .enp-page-title{border-bottom:2px solid #333f48}#enp-quiz fieldset{border:0;margin:0;padding:0}#enp-quiz .enp-label{color:#5e5e5e;display:block;font-size:.85rem;font-weight:400;text-transform:uppercase}#enp-quiz .enp-legend{border:0;color:#5e5e5e;display:block;font-size:.85rem;font-weight:400;margin-bottom:.2rem;padding-top:1.6rem;text-transform:uppercase}#enp-quiz .enp-input{background:#fff;border:1px solid #aaa;border-radius:3px;font-family:tablet-gothic,helvetica neue,helvetica,arial,sans-serif;font-size:1rem;margin-bottom:1.2rem;max-width:100%;padding:.8rem .5rem;width:20rem}@media(min-width:700px){#enp-quiz .enp-input{padding:.8rem}}#enp-quiz .enp-input.enp-input--has-description{margin-bottom:.2rem}#enp-quiz .enp-input-description,#enp-quiz .enp-textarea-description{font-size:.85rem;margin-bottom:1rem}#enp-quiz .enp-input-description--before,#enp-quiz .enp-textarea-description--before{margin-bottom:0}#enp-quiz .enp-input:-ms-input-placeholder,#enp-quiz .enp-input::-ms-input-placeholder,#enp-quiz .enp-input::-webkit-input-placeholder,#enp-quiz .enp-input::placeholder,#enp-quiz .enp-textarea:-ms-input-placeholder,#enp-quiz .enp-textarea::-ms-input-placeholder,#enp-quiz .enp-textarea::-webkit-input-placeholder,#enp-quiz .enp-textarea::placeholder{color:#aaa;font-family:tablet-gothic,helvetica neue,helvetica,arial,sans-serif;font-weight:300}#enp-quiz .enp-textarea{background:#fff;border:1px solid #aaa;border-radius:3px;font-family:tablet-gothic,helvetica neue,helvetica,arial,sans-serif;font-size:1rem;line-height:1.5;margin-bottom:1.2rem;max-width:100%;padding:.8rem .5rem;width:100%}@media(min-width:700px){#enp-quiz .enp-textarea{padding:.8rem}}#enp-quiz .enp-textarea:focus{outline-color:#4d90fe;outline-offset:-2px;outline-style:auto;outline-width:5px}#enp-quiz .enp-textarea.enp-textarea--has-description{margin-bottom:.2rem}#enp-quiz .enp-textarea.enp-textarea--has-description--before{margin-bottom:1.2rem}#enp-quiz .enp-embed-code{background:#fff;border:1px solid #aaa;border-radius:3px;font-family:Monaco,Consolas,Andale Mono,DejaVu Sans Mono,monospace;font-size:.9rem;line-height:1.5;margin-bottom:1.2rem;max-width:100%;padding:1.6rem;width:100%}@media(min-width:700px){#enp-quiz .enp-embed-code{padding:.8rem}}#enp-quiz .enp-embed-code:focus{outline-color:#4d90fe;outline-offset:-2px;outline-style:auto;outline-width:5px}#enp-quiz .enp-preview-page-container,#enp-quiz .enp-publish-page-container,#enp-quiz .enp-quiz-form-container{background:#f8f8f8;margin-left:auto;margin-right:auto;max-width:40pc;padding:6rem 20px 4rem;position:relative}#enp-quiz .enp-preview-page-container:after,#enp-quiz .enp-publish-page-container:after,#enp-quiz .enp-quiz-form-container:after{clear:both;content:"";display:table}@media(min-width:700px){#enp-quiz .enp-preview-page-container,#enp-quiz .enp-publish-page-container,#enp-quiz .enp-quiz-form-container{max-width:840px}}@media(min-width:750pt){#enp-quiz .enp-preview-page-container,#enp-quiz .enp-publish-page-container,#enp-quiz .enp-quiz-form-container{max-width:750pt}}#enp-quiz .enp-quiz-form{margin-left:auto;margin-right:auto;max-width:32pc;padding-left:0;padding-right:0}#enp-quiz .enp-quiz-form:after{clear:both;content:"";display:table}#enp-quiz .enp-quiz-form .enp-input,#enp-quiz .enp-quiz-form .enp-textarea{width:100%}#enp-quiz .enp-quiz-title__label{color:#5e5e5e;display:block;font-size:.85rem;font-weight:500;text-transform:uppercase}#enp-quiz .enp-quiz-title__textarea{background:#fff;border:1px solid #aaa;border-radius:3px;font-family:tablet-gothic,helvetica neue,helvetica,arial,sans-serif;font-size:1.6rem;font-weight:700;margin-bottom:1rem;max-width:100%;padding:.8rem .5rem;width:20rem}@media(min-width:700px){#enp-quiz .enp-quiz-title__textarea{padding:.8rem}}#enp-quiz .enp-quiz-title__textarea:-ms-input-placeholder,#enp-quiz .enp-quiz-title__textarea::-ms-input-placeholder,#enp-quiz .enp-quiz-title__textarea::-webkit-input-placeholder,#enp-quiz .enp-quiz-title__textarea::placeholder{font-weight:700}#enp-quiz textarea{color:#000}#enp-quiz .enp-accordion-container{margin-bottom:1.6rem;position:relative}#enp-quiz .enp-question-content{background:#fff;padding-top:0;position:relative;width:100%}#enp-quiz .enp-question-inner{padding:1.6rem 1.6rem 1rem}@media(min-width:700px){#enp-quiz .enp-question-inner{padding-left:2.9rem;padding-right:2.8rem}}#enp-quiz .enp-question-title__label{color:#5e5e5e;display:block;font-size:.85rem;font-weight:500;text-transform:uppercase}#enp-quiz .enp-question-title__textarea{background:#fff;border:1px solid #aaa;border-radius:3px;font-family:tablet-gothic,helvetica neue,helvetica,arial,sans-serif;font-size:1.3rem;margin-bottom:1.2rem;max-width:100%;padding:1rem 1.2rem;width:20rem}@media(min-width:700px){#enp-quiz .enp-question-title__textarea{padding:.8rem}}#enp-quiz .enp-question-image-upload{-webkit-transform:translate3d(0,0,0);background:#f5f5f5;border:2px dashed #bbb;border-radius:3px;box-shadow:none;color:#666;cursor:pointer;font-size:.85rem;font-weight:400;letter-spacing:.05em;line-height:1.6;margin-bottom:2rem;padding:.85em 1.4em .75em;position:relative;text-align:center;text-transform:uppercase;transform:translate3d(0,0,0);transition:all .3s cubic-bezier(0,0,.3,1)}#enp-quiz .enp-question-image-upload:focus,#enp-quiz .enp-question-image-upload:hover{background:#222a30;box-shadow:none;color:#fff}#enp-quiz .enp-question-image-upload:active{background:#5d7384;box-shadow:inset 0 2px 0 rgba(0,0,0,.1);color:#fff}#enp-quiz .enp-question-image-upload:focus{outline-color:#4d90fe;outline-offset:-2px;outline-style:auto;outline-width:5px}#enp-quiz .enp-question-image-upload:disabled,#enp-quiz .enp-question-image-upload:disabled:focus,#enp-quiz .enp-question-image-upload:disabled:hover{background:#333f48;cursor:default;opacity:.5}#enp-quiz .enp-question-image-upload:focus,#enp-quiz .enp-question-image-upload:hover{background:hsla(0,0%,100%,.9);border:2px dashed #999;color:#444}#enp-quiz .enp-question-image-upload .enp-question-image-upload__icon--photo{-webkit-transform:translate3d(0,0,0);height:2.8rem;left:0;margin:0 auto;opacity:0;position:absolute;right:0;top:0;transform:translate3d(0,0,0);transition:opacity .2s,transform .3s cubic-bezier(0,0,.3,1),-webkit-transform .3s cubic-bezier(0,0,.3,1);width:2.8rem;z-index:-1}#enp-quiz .enp-question-image-upload .enp-question-image-upload__icon--add{background:#666;border-radius:50%;fill:#f5f5f5;height:1rem;margin-right:5px;padding:.02rem;position:relative;top:.2rem;width:1rem}#enp-quiz .enp-question-image-upload:active,#enp-quiz .enp-question-image-upload:focus,#enp-quiz .enp-question-image-upload:hover{padding-bottom:2rem;padding-top:5rem}#enp-quiz .enp-question-image-upload:active .enp-question-image-upload__icon--photo,#enp-quiz .enp-question-image-upload:focus .enp-question-image-upload__icon--photo,#enp-quiz .enp-question-image-upload:hover .enp-question-image-upload__icon--photo{-webkit-transform:translate3d(0,1.75rem,0);opacity:1;transform:translate3d(0,1.75rem,0);z-index:1}#enp-quiz .enp-question-image-upload:active .enp-question-image-upload__icon--add,#enp-quiz .enp-question-image-upload:focus .enp-question-image-upload__icon--add,#enp-quiz .enp-question-image-upload:hover .enp-question-image-upload__icon--add{background:#444;fill:#fff}#enp-quiz .enp-question-image__container{margin-bottom:1rem;position:relative}#enp-quiz .enp-question-image{margin-bottom:1.2rem}#enp-quiz .enp-question-type__legend{border:0;color:#5e5e5e;display:block;font-size:.85rem;font-weight:400;margin-bottom:.2rem;padding-top:1.6rem;text-transform:uppercase}#enp-quiz .enp-question-type__input{clip:rect(1px,1px,1px,1px);height:1px;left:-625pc;overflow:hidden;position:absolute!important;top:auto;width:1px}#enp-quiz .enp-question-type__label{border-radius:3px;cursor:pointer;display:inline-block;padding:.2rem .5rem;text-transform:capitalize}#enp-quiz .enp-question-type__input:checked+.enp-question-type__label{background:#3bb275;color:#fff;text-shadow:0 0 1px rgba(0,0,0,.7)}#enp-quiz .enp-question-type__input:focus+.enp-question-type__label{outline-color:#4d90fe;outline-offset:-2px;outline-style:auto;outline-width:5px;z-index:8}#enp-quiz .enp-question-type__label{position:relative;z-index:9}#enp-quiz .enp-mc-options,#enp-quiz .enp-slider-options{-webkit-animation:slideOutTop .25s cubic-bezier(0,0,.3,1) forwards;-webkit-animation-delay:0s,.05s;animation:slideOutTop .25s cubic-bezier(0,0,.3,1) forwards;animation-delay:0s,.05s;display:none;margin-top:0}#enp-quiz .enp-question-type__input--mc:checked~.enp-mc-options,#enp-quiz .enp-question-type__input--slider:checked~.enp-slider-options{-webkit-animation:fadeIn .45s cubic-bezier(0,0,.3,1) forwards;animation:fadeIn .45s cubic-bezier(0,0,.3,1) forwards;display:block;visibility:visible}#enp-quiz .enp-mc-options__list{list-style:none;margin-left:0}#enp-quiz .enp-mc-option{padding-left:6px;position:relative}@media(min-width:700px){#enp-quiz .enp-mc-option{padding-left:0}}#enp-quiz .enp-mc-options__legend{color:#5e5e5e;display:block;font-size:.85rem;font-weight:500;text-transform:uppercase}#enp-quiz .enp-mc-option__add,#enp-quiz .enp-mc-option__button--correct,#enp-quiz .enp-mc-option__button--delete{display:none}#enp-quiz .enp-question-type__input--mc:checked~.enp-mc-options .enp-mc-option__add,#enp-quiz .enp-question-type__input--mc:checked~.enp-mc-options .enp-mc-option__button--correct,#enp-quiz .enp-question-type__input--mc:checked~.enp-mc-options .enp-mc-option__button--delete{display:block}#enp-quiz .enp-button__question-image-delete,#enp-quiz .enp-mc-option__button--delete{background:0;border:0;box-shadow:none;cursor:pointer;fill:#bbb;margin:0;padding:0;position:absolute;right:-24px;top:9px}@media(min-width:700px){#enp-quiz .enp-button__question-image-delete,#enp-quiz .enp-mc-option__button--delete{right:-30px}}#enp-quiz .enp-button__question-image-delete:focus,#enp-quiz .enp-button__question-image-delete:hover,#enp-quiz .enp-mc-option__button--delete:focus,#enp-quiz .enp-mc-option__button--delete:hover{fill:#bf5700}#enp-quiz .enp-mc-option__button--correct{background:0;border:0;box-shadow:none;left:-24px;margin:0;padding:0;position:absolute;top:8px}@media(min-width:700px){#enp-quiz .enp-mc-option__button--correct{left:-35px}}#enp-quiz .enp-mc-option__button--correct .enp-mc-option__icon--correct{background:#fff;border:2px solid #e97763;border-radius:50%;cursor:pointer;fill:#fff;height:28px;padding:.05em;transition:all .2s;width:28px}@media(min-width:700px){#enp-quiz .enp-mc-option__button--correct .enp-mc-option__icon--correct{padding:.15em}}#enp-quiz .enp-mc-option__button--correct:focus .enp-mc-option__icon--correct,#enp-quiz .enp-mc-option__button--correct:hover .enp-mc-option__icon--correct{background:#fff;border-color:#3bb275;fill:#3bb275}#enp-quiz .enp-mc-option__button--correct:disabled{opacity:1}#enp-quiz .enp-mc-option__button--correct:disabled .enp-mc-option__icon--correct{border:2px solid transparent;cursor:default;fill:#fff}#enp-quiz .enp-mc-option--correct .enp-mc-option__input{border:1px solid #3bb275;box-shadow:inset 0 0 3px #3bb275}#enp-quiz .enp-mc-option--correct .enp-mc-option__button--correct:focus .enp-mc-option__icon--correct,#enp-quiz .enp-mc-option--correct .enp-mc-option__button--correct:hover .enp-mc-option__icon--correct,#enp-quiz .enp-mc-option--correct .enp-mc-option__icon--correct{background:#3bb275;border-color:#3bb275;fill:#fff}#enp-quiz .enp-mc-option__add{background:#f5f5f5;border:2px dashed #bbb;border-radius:3px;box-shadow:none;color:#666;cursor:pointer;font-size:.85rem;font-weight:400;letter-spacing:.05em;line-height:1.6;padding:.7rem .75rem .8rem;text-align:left;text-transform:uppercase;transition:all .2s}#enp-quiz .enp-mc-option__add:focus,#enp-quiz .enp-mc-option__add:hover{background:#222a30;box-shadow:none;color:#fff}#enp-quiz .enp-mc-option__add:active{background:#5d7384;box-shadow:inset 0 2px 0 rgba(0,0,0,.1);color:#fff}#enp-quiz .enp-mc-option__add:focus{outline-color:#4d90fe;outline-offset:-2px;outline-style:auto;outline-width:5px}#enp-quiz .enp-mc-option__add:disabled,#enp-quiz .enp-mc-option__add:disabled:focus,#enp-quiz .enp-mc-option__add:disabled:hover{background:#333f48;cursor:default;opacity:.5}#enp-quiz .enp-mc-option__add:focus,#enp-quiz .enp-mc-option__add:hover{background:hsla(0,0%,100%,.9);border:2px dashed #999;color:#444}#enp-quiz .enp-mc-option__add .enp-mc-option__add__icon{background:#666;border-radius:50%;fill:#f5f5f5;height:1rem;margin-right:5px;padding:.02rem;position:relative;top:.2rem;width:1rem}#enp-quiz .enp-mc-option__add:hover .enp-mc-option__add__icon{background:#444;fill:#fff}#enp-quiz .enp-slider-options .enp-input{max-width:11.8rem}#enp-quiz .enp-slider-correct__container .enp-input,#enp-quiz .enp-slider-range__container .enp-input{max-width:8.8rem}@media(min-width:25pc){#enp-quiz .enp-slider-correct__container .enp-input,#enp-quiz .enp-slider-range__container .enp-input{max-width:11.8rem}}#enp-quiz .enp-slider-preview{border:1px solid #ddd;margin-bottom:1.6rem;margin-top:.2rem;padding:1.6rem 1.6rem .6rem;position:relative}#enp-quiz .enp-slider-preview .enp-label--slider-preview{font-size:.75rem;left:.4rem;position:absolute;text-transform:uppercase;top:.2rem;width:100%}#enp-quiz .enp-slider-correct__container,#enp-quiz .enp-slider-range__container{align-items:center;display:flex;justify-content:space-between}#enp-quiz .enp-slider-correct__helper,#enp-quiz .enp-slider-range__helper{background:#fff;color:#777;font-size:.85rem;padding:0 .3rem;position:relative}#enp-quiz .enp-slider-correct__helper:before,#enp-quiz .enp-slider-range__helper:before{background:#ddd;content:"";height:4px;left:-60px;position:absolute;top:44%;transition:width .7s cubic-bezier(0,0,.3,1),background 1.6s cubic-bezier(0,0,.3,1);width:90pt;z-index:-1}#enp-quiz .enp-slider-options{margin-bottom:2rem}#enp-quiz .enp-slider-options .enp-accordion-header{font-size:.85rem;padding:.675rem;text-transform:uppercase}#enp-quiz .enp-slider-options .enp-slider-advanced-options__content{border:0;box-shadow:none;margin-bottom:0;padding-bottom:0;padding-top:1rem}#enp-quiz .enp-slider-correct-high__container{position:relative}#enp-quiz .enp-slider-correct-high__input-container--hidden{display:none}#enp-quiz .enp-slider-correct__helper--hidden:before{background:#3bb275;width:0}#enp-quiz .enp-slider-correct-answer-range--add-range{background:#f5f5f5;border:2px dashed #bbb;border-radius:3px;box-shadow:none;color:#666;cursor:pointer;font-size:.7rem;font-weight:400;letter-spacing:.05em;line-height:1.6;margin-left:.8rem;padding:.85em 1.4em .75em;text-align:center;text-transform:uppercase;transition:all .2s}#enp-quiz .enp-slider-correct-answer-range--add-range:focus,#enp-quiz .enp-slider-correct-answer-range--add-range:hover{background:#222a30;box-shadow:none;color:#fff}#enp-quiz .enp-slider-correct-answer-range--add-range:active{background:#5d7384;box-shadow:inset 0 2px 0 rgba(0,0,0,.1);color:#fff}#enp-quiz .enp-slider-correct-answer-range--add-range:focus{outline-color:#4d90fe;outline-offset:-2px;outline-style:auto;outline-width:5px}#enp-quiz .enp-slider-correct-answer-range--add-range:disabled,#enp-quiz .enp-slider-correct-answer-range--add-range:disabled:focus,#enp-quiz .enp-slider-correct-answer-range--add-range:disabled:hover{background:#333f48;cursor:default;opacity:.5}#enp-quiz .enp-slider-correct-answer-range--add-range:focus,#enp-quiz .enp-slider-correct-answer-range--add-range:hover{background:hsla(0,0%,100%,.9);border:2px dashed #999;color:#444}@media(min-width:25pc){#enp-quiz .enp-slider-correct-answer-range--add-range{font-size:.8rem;padding:.7rem}}@media(min-width:700px){#enp-quiz .enp-slider-correct-answer-range--add-range{min-width:11.4rem;padding:.7rem 1.2rem}}#enp-quiz .enp-slider-correct-answer-range--add-range .enp-slider-correct-answer-range__icon{background:#666;border-radius:50%;fill:#f5f5f5;height:1rem;left:-.2rem;margin-right:5px;padding:.02rem;position:relative;width:1rem}#enp-quiz .enp-slider-correct-answer-range--add-range:hover .enp-slider-correct-answer-range__icon{background:#444;fill:#fff}#enp-quiz .enp-slider-correct-answer-range--remove-range{background:0;border:0;bottom:1.6rem;box-shadow:none;padding:0 .1rem;position:absolute;right:-1.6rem}#enp-quiz .enp-slider-correct-answer-range--remove-range .enp-slider-correct-answer-range__icon{fill:#666;height:1.2em;width:1.2em}#enp-quiz .enp-slider-correct-answer-range--remove-range:focus .enp-slider-correct-answer-range__icon,#enp-quiz .enp-slider-correct-answer-range--remove-range:hover .enp-slider-correct-answer-range__icon{fill:#bf5700}@media(min-width:700px){#enp-quiz .enp-slider-correct-answer-range--remove-range{bottom:auto;right:-.2rem;top:-.2rem}}#enp-quiz .enp-slider-options .enp-input:-moz-read-only,#enp-quiz .enp-slider-options .enp-input:read-only{background:#f5f5f5}#enp-quiz .enp-answer-explanation{background:#eaf4ff;box-shadow:inset 1px 0 0 #ccc,inset -1px -1px 0 #ccc,inset 0 1px 0 #ddd;padding-top:2rem}#enp-quiz .enp-answer-explanation__label{color:#5e5e5e;display:block;font-size:.85rem;font-weight:500;text-transform:uppercase}#enp-quiz .enp-question__button--delete{background:0;border:0;box-shadow:none;cursor:pointer;fill:#bbb;margin:0;padding:0;position:absolute;right:9px;top:9px}@media(min-width:700px){#enp-quiz .enp-question__button--delete{right:-30px}}#enp-quiz .enp-question__button--delete:hover{fill:#bf5700}#enp-quiz .enp-question__move{left:15px;position:absolute}@media(min-width:700px){#enp-quiz .enp-question__move{left:-40px}}#enp-quiz .enp-sort__placeholder{background:#ddd;height:60px;margin-bottom:1.6rem;max-height:90pt;width:100%}#enp-quiz .ui-sortable .ui-sortable-helper .ui-sortable-handle{cursor:-webkit-grabbing}#enp-quiz .enp-question__button--move{background:0;border:0;box-shadow:none;cursor:pointer;fill:#bbb;margin:0;padding:0;position:absolute}#enp-quiz .enp-question__button--move:focus,#enp-quiz .enp-question__button--move:hover{fill:#333}#enp-quiz .enp-question__button--move:disabled{opacity:.5}#enp-quiz .enp-question__button--move--up{left:-9px;top:0}#enp-quiz .enp-question__button--move--down{right:-9px;top:3px}#enp-quiz .enp-quiz-form__add-question{background:0;border:3px dashed #666;border-radius:3px;box-shadow:none;color:#545454;cursor:pointer;font-size:15px;font-weight:400;letter-spacing:.05em;line-height:1.6;margin-bottom:2rem;margin-top:1.6rem;padding:1rem 1.4em;text-align:center;text-transform:uppercase;transition:all .2s}#enp-quiz .enp-quiz-form__add-question:focus,#enp-quiz .enp-quiz-form__add-question:hover{background:#222a30;box-shadow:none;color:#fff}#enp-quiz .enp-quiz-form__add-question:active{box-shadow:inset 0 2px 0 rgba(0,0,0,.1);color:#fff}#enp-quiz .enp-quiz-form__add-question:focus{outline-color:#4d90fe;outline-offset:-2px;outline-style:auto;outline-width:5px}#enp-quiz .enp-quiz-form__add-question:disabled,#enp-quiz .enp-quiz-form__add-question:disabled:focus,#enp-quiz .enp-quiz-form__add-question:disabled:hover{background:#333f48;cursor:default;opacity:.5}#enp-quiz .enp-quiz-form__add-question:focus,#enp-quiz .enp-quiz-form__add-question:hover{background:#222a30;box-shadow:none;color:#fff}#enp-quiz .enp-quiz-form__add-question:active{background:#5d7384;box-shadow:inset 0 2px 0 rgba(0,0,0,.1);color:#fff}#enp-quiz .enp-quiz-form__add-question:focus{outline-color:#4d90fe;outline-offset:-2px;outline-style:auto;outline-width:5px}#enp-quiz .enp-quiz-form__add-question:disabled,#enp-quiz .enp-quiz-form__add-question:disabled:focus,#enp-quiz .enp-quiz-form__add-question:disabled:hover{background:#333f48;cursor:default;opacity:.5}#enp-quiz .enp-quiz-form__add-question:focus,#enp-quiz .enp-quiz-form__add-question:hover{background:hsla(0,0%,100%,.9);border:3px dashed #444;color:#444}#enp-quiz .enp-quiz-form__add-question .enp-add-question__icon{background:#666;border-radius:50%;fill:#f5f5f5;height:1.2rem;margin-right:5px;padding:.02rem;position:relative;top:.2rem;width:1.2rem}#enp-quiz .enp-quiz-form__add-question:hover .enp-add-question__icon{background:#444;fill:#fff}#enp-quiz .enp-quiz-form__save{background:#333f48;border:0;border-radius:3px;box-shadow:inset 0 -2px 0 rgba(0,0,0,.2);color:#fff;cursor:pointer;font-size:15px;font-weight:400;letter-spacing:.05em;line-height:1.6;margin-bottom:1rem;opacity:.8;padding:.85em 1.4em .75em;text-align:center;text-shadow:0 -1px 2px rgba(0,0,0,.6);text-transform:uppercase;transition:all .2s;width:100%}#enp-quiz .enp-quiz-form__save:focus,#enp-quiz .enp-quiz-form__save:hover{background:#222a30;box-shadow:none;color:#fff}#enp-quiz .enp-quiz-form__save:active{background:#5d7384;box-shadow:inset 0 2px 0 rgba(0,0,0,.1);color:#fff}#enp-quiz .enp-quiz-form__save:focus{outline-color:#4d90fe;outline-offset:-2px;outline-style:auto;outline-width:5px}#enp-quiz .enp-quiz-form__save:disabled,#enp-quiz .enp-quiz-form__save:disabled:focus,#enp-quiz .enp-quiz-form__save:disabled:hover{background:#333f48;cursor:default;opacity:.5}#enp-quiz .enp-quiz-form__save:focus,#enp-quiz .enp-quiz-form__save:hover{opacity:1}@media(min-width:25pc){#enp-quiz .enp-quiz-form__save{margin-right:3%;margin-top:1.6rem;padding:1.2rem 1.8rem 1.1rem;position:relative;top:-2px;width:27%}}#enp-quiz .enp-quiz-form__save--reveal{-webkit-animation:slideInTop--reduced-opacity .3s cubic-bezier(0,0,.3,1);animation:slideInTop--reduced-opacity .3s cubic-bezier(0,0,.3,1)}#enp-quiz .enp-btn--next-step{background:#333f48;border:0;border-radius:3px;box-shadow:inset 0 -2px 0 rgba(0,0,0,.2);color:#fff;cursor:pointer;font-size:15px;font-weight:400;letter-spacing:.05em;line-height:1.6;text-align:center;text-transform:uppercase;transition:all .2s}#enp-quiz .enp-btn--next-step:focus,#enp-quiz .enp-btn--next-step:hover{background:#222a30;box-shadow:none;color:#fff}#enp-quiz .enp-btn--next-step:active{background:#5d7384;box-shadow:inset 0 2px 0 rgba(0,0,0,.1);color:#fff}#enp-quiz .enp-btn--next-step:focus{outline-color:#4d90fe;outline-offset:-2px;outline-style:auto;outline-width:5px}#enp-quiz .enp-btn--next-step:disabled,#enp-quiz .enp-btn--next-step:disabled:focus,#enp-quiz .enp-btn--next-step:disabled:hover{background:#333f48;cursor:default;opacity:.5}#enp-quiz .enp-btn--next-step__icon{background:#fff;border-radius:50%;fill:#333f48;height:1.2rem;margin-left:.5em;position:relative;top:.15rem;width:1.2rem}#enp-quiz .enp-btn--next-step__icon:hover{background:#fff;fill:#222a30}#enp-quiz .enp-btn--next-step{padding:1rem 1.4rem;width:100%}@media(min-width:25pc){#enp-quiz .enp-btn--next-step{width:68%}}#enp-quiz .enp-btn--next-step--reveal{-webkit-animation:slideInTop .3s cubic-bezier(0,0,.3,1);animation:slideInTop .3s cubic-bezier(0,0,.3,1)}#enp-quiz .enp-accordion-header--inserting,#enp-quiz .enp-mc-option--inputs{-webkit-animation:slideInBottom .4s cubic-bezier(0,0,.3,1) forwards;animation:slideInBottom .4s cubic-bezier(0,0,.3,1) forwards}#enp-quiz .enp-mc-option--remove,#enp-quiz .enp-question--remove,#enp-quiz .enp-question__image--remove{-webkit-animation:removeElement .5s cubic-bezier(0,0,.3,1) forwards;animation:removeElement .5s cubic-bezier(0,0,.3,1) forwards}#enp-quiz .enp-image-upload-wait{background:#f5f5f5;border:2px dashed #bbb;border-radius:3px;box-shadow:none;color:#666;cursor:pointer;font-size:15px;font-weight:400;letter-spacing:.05em;line-height:1.6;margin-bottom:1rem;padding:4rem 1.4em;text-align:center;text-transform:uppercase;transition:all .2s;width:100%}#enp-quiz .enp-image-upload-wait:focus,#enp-quiz .enp-image-upload-wait:hover{background:#222a30;box-shadow:none;color:#fff}#enp-quiz .enp-image-upload-wait:active{background:#5d7384;box-shadow:inset 0 2px 0 rgba(0,0,0,.1);color:#fff}#enp-quiz .enp-image-upload-wait:focus{outline-color:#4d90fe;outline-offset:-2px;outline-style:auto;outline-width:5px}#enp-quiz .enp-image-upload-wait:disabled,#enp-quiz .enp-image-upload-wait:disabled:focus,#enp-quiz .enp-image-upload-wait:disabled:hover{background:#333f48;cursor:default;opacity:.5}#enp-quiz .enp-image-upload-wait:focus,#enp-quiz .enp-image-upload-wait:hover{background:hsla(0,0%,100%,.9);border:2px dashed #999;color:#444}#enp-quiz .enp-accordion-header.question-has-error{box-shadow:0 0 3px #bf5700;color:#bf5700}.enp-quiz.ui-sortable--sorting #enp-quiz .enp-accordion-content{display:none}@media(min-width:750pt){#enp-quiz .enp-quiz-settings-container{float:left;margin:0;width:40%}#enp-quiz .enp-quiz-preview-container{float:left;width:60%}}#enp-quiz .enp-quiz-settings__title,#enp-quiz .enp-quiz-share__legend{font-size:.85rem;font-weight:600;padding-top:0;position:relative;text-transform:uppercase}#enp-quiz .enp-quiz-settings__form{margin-bottom:3rem}@media(min-width:750pt){#enp-quiz .enp-quiz-settings__form{margin-bottom:0;padding:0}}@media(min-width:700px){#enp-quiz .enp-fieldset{position:relative}}@media(min-width:700px){#enp-quiz .enp-title-display__legend{padding-top:.4rem}}#enp-quiz .enp-quiz-share__input,#enp-quiz .enp-quiz-styles__input{width:100%}#enp-quiz .enp-quiz-styles__textarea--custom-css{font-family:Monaco,Consolas,Andale Mono,DejaVu Sans Mono,monospace;font-size:.9rem;min-height:200px}#enp-quiz .enp-fieldset--section{padding:1.6rem 1rem}#enp-quiz .enp-fieldset--section.enp-accordion-content--open{margin-bottom:0}#enp-quiz .enp-quiz-share--facebook{margin-bottom:2rem}#enp-quiz .enp-title-display__legend{border:0;color:#5e5e5e;display:block;font-size:.85rem;font-weight:400;margin-bottom:.2rem;padding-top:1.6rem;text-transform:uppercase}#enp-quiz .enp-title-display__input{clip:rect(1px,1px,1px,1px);height:1px;left:-625pc;overflow:hidden;position:absolute!important;top:auto;width:1px}#enp-quiz .enp-title-display__label{border-radius:3px;cursor:pointer;display:inline-block;padding:.2rem .5rem;text-transform:capitalize}#enp-quiz .enp-title-display__input:checked+.enp-title-display__label{background:#3bb275;color:#fff;text-shadow:0 0 1px rgba(0,0,0,.7)}#enp-quiz .enp-title-display__input:focus+.enp-title-display__label{outline-color:#4d90fe;outline-offset:-2px;outline-style:auto;outline-width:5px;z-index:8}#enp-quiz .enp-mc-options-order__legend{border:0;color:#5e5e5e;display:block;font-size:.85rem;font-weight:400;margin-bottom:.2rem;padding-top:1.6rem;text-transform:uppercase}#enp-quiz .enp-mc-options-order__input{clip:rect(1px,1px,1px,1px);height:1px;left:-625pc;overflow:hidden;position:absolute!important;top:auto;width:1px}#enp-quiz .enp-mc-options-order__label{border-radius:3px;cursor:pointer;display:inline-block;padding:.2rem .5rem;text-transform:capitalize}#enp-quiz .enp-mc-options-order__input:checked+.enp-mc-options-order__label{background:#3bb275;color:#fff;text-shadow:0 0 1px rgba(0,0,0,.7)}#enp-quiz .enp-mc-options-order__input:focus+.enp-mc-options-order__label{outline-color:#4d90fe;outline-offset:-2px;outline-style:auto;outline-width:5px;z-index:8}#enp-quiz .enp-mc-options-order{margin-bottom:1.6rem}#enp-quiz .enp-quiz-share__textarea{margin-bottom:2rem;min-height:7.6rem}@media(min-width:700px){#enp-quiz .enp-quiz-share__textarea{min-height:4.6rem}}@media(min-width:750pt){#enp-quiz .enp-quiz-share__textarea{min-height:7.6rem}}#enp-quiz .enp-preview-form__submit{margin-top:1.6rem}#enp-quiz .enp-quiz-preview__title{font-size:.85rem;font-weight:600;text-transform:uppercase}#enp-quiz .enp-preview-form__submit{background:#333f48;border:0;border-radius:3px;box-shadow:inset 0 -2px 0 rgba(0,0,0,.2);color:#fff;cursor:pointer;font-size:15px;font-weight:400;letter-spacing:.05em;line-height:1.6;margin-bottom:1rem;opacity:.8;padding:.85rem 1.4em;text-align:center;text-shadow:0 -1px 2px rgba(0,0,0,.6);text-transform:uppercase;transition:all .2s;width:100%}#enp-quiz .enp-preview-form__submit:focus,#enp-quiz .enp-preview-form__submit:hover{background:#222a30;box-shadow:none;color:#fff}#enp-quiz .enp-preview-form__submit:active{background:#5d7384;box-shadow:inset 0 2px 0 rgba(0,0,0,.1);color:#fff}#enp-quiz .enp-preview-form__submit:focus{outline-color:#4d90fe;outline-offset:-2px;outline-style:auto;outline-width:5px}#enp-quiz .enp-preview-form__submit:disabled,#enp-quiz .enp-preview-form__submit:disabled:focus,#enp-quiz .enp-preview-form__submit:disabled:hover{background:#333f48;cursor:default;opacity:.5}#enp-quiz .enp-preview-form__submit:focus,#enp-quiz .enp-preview-form__submit:hover{opacity:1}#enp-quiz .enp-preview-form__submit--publish{padding:1.05rem 1.8rem .95rem;position:relative;width:100%;z-index:99999999}#enp-quiz .enp-quiz-styles__iris-wrapper{position:relative}#enp-quiz .iris-picker{box-sizing:content-box;margin-bottom:1rem;padding-bottom:3rem;padding-right:30px;position:relative;top:-1.2rem;z-index:9999999999}@media(min-width:750pt){#enp-quiz .iris-picker{left:104%;position:absolute;top:-4px}}#enp-quiz .iris-picker:last-of-type{margin-bottom:0}#enp-quiz .iris-picker .ui-draggable-handle:focus .ui-slider-handle,#enp-quiz .iris-picker .ui-slider-handle:focus{box-shadow:0 0 3px rgba(0,0,0,.75)}#enp-quiz .enp-quiz-styles__set-default{background:transparent;border:2px solid #333f48;border-radius:3px;bottom:10px;box-shadow:none;color:#333f48;cursor:pointer;font-size:.75rem;font-weight:400;left:10px;letter-spacing:.05em;line-height:1.6;padding:.85em 1.4em .75em;position:absolute;text-align:center;text-transform:uppercase;transition:all .2s}#enp-quiz .enp-quiz-styles__set-default:focus,#enp-quiz .enp-quiz-styles__set-default:hover{background:#222a30;box-shadow:none;color:#fff}#enp-quiz .enp-quiz-styles__set-default:active{background:#5d7384;box-shadow:inset 0 2px 0 rgba(0,0,0,.1);color:#fff}#enp-quiz .enp-quiz-styles__set-default:focus{outline-color:#4d90fe;outline-offset:-2px;outline-style:auto;outline-width:5px}#enp-quiz .enp-quiz-styles__set-default:disabled,#enp-quiz .enp-quiz-styles__set-default:disabled:focus,#enp-quiz .enp-quiz-styles__set-default:disabled:hover{background:#333f48;cursor:default;opacity:.5}#enp-quiz .enp-quiz-styles__set-default:focus,#enp-quiz .enp-quiz-styles__set-default:hover{background:transparent;border:2px solid #222a30;color:#222a30}#enp-quiz .enp-iris__close{background:0;border:0;box-shadow:none;cursor:pointer;fill:#888;margin:0;padding:0;position:absolute;right:5px;top:5px}#enp-quiz .enp-quiz-styles__input--color{padding-left:45px}#enp-quiz .enp-quiz-styles__color-demo{border:1px solid #ccc;border-radius:3px;height:30px;left:8px;position:absolute;top:8px;width:30px}#enp-quiz .enp-share-quiz__url{display:block;font-size:1rem;line-height:1.4;word-wrap:break-word}#enp-quiz .enp-share-quiz{align-content:center;align-items:center;display:flex;list-style:none;margin-left:0}#enp-quiz .enp-share-quiz__item{margin-right:20px}#enp-quiz .enp-share-quiz__item:last-child{margin-right:0}#enp-quiz .enp-share-quiz__item__icon{background:#333f48;border-radius:50%;fill:#fff!important;height:2.4rem;padding:.6rem;width:2.4rem}#enp-quiz .enp-share-quiz__item__icon--facebook{background-color:#3a5795}#enp-quiz .enp-share-quiz__item__icon--twitter{background-color:#4099ff}#enp-quiz .enp-share-quiz{justify-content:space-around;margin-bottom:0}#enp-quiz .enp-ab-create__container{background:#f8f8f8;margin-left:auto;margin-right:auto;max-width:40pc;padding:3rem 20px;width:100%}#enp-quiz .enp-ab-create__container:after{clear:both;content:"";display:table}@media(min-width:700px){#enp-quiz .enp-ab-create__container{max-width:840px}}@media(min-width:750pt){#enp-quiz .enp-ab-create__container{max-width:750pt}}#enp-quiz .enp-ab-create__form{margin-left:auto;margin-right:auto;max-width:32pc;padding-left:20px;padding-right:20px}#enp-quiz .enp-ab-create__form:after{clear:both;content:"";display:table}#enp-quiz .enp-ab-create__label{color:#5e5e5e;display:block;font-size:.85rem;font-weight:500;text-transform:uppercase}#enp-quiz .enp-ab-create-title__textarea{background:#fff;border:1px solid #aaa;border-radius:3px;font-family:tablet-gothic,helvetica neue,helvetica,arial,sans-serif;font-size:1.6rem;font-weight:700;margin-bottom:1rem;max-width:100%;padding:.8rem .5rem;width:100%}@media(min-width:700px){#enp-quiz .enp-ab-create-title__textarea{padding:.8rem}}#enp-quiz .enp-ab-create-title__textarea:-ms-input-placeholder,#enp-quiz .enp-ab-create-title__textarea::-ms-input-placeholder,#enp-quiz .enp-ab-create-title__textarea::-webkit-input-placeholder,#enp-quiz .enp-ab-create-title__textarea::placeholder{font-weight:700}#enp-quiz .enp-ab-create__select{-moz-appearance:none;-webkit-appearance:none;appearance:none;background:url(../svg/chevron-down.svg) 100% 50% no-repeat;background-color:#fff;border:1px solid #bbb;border-radius:3px;box-shadow:inset -26px 0 0 rgba(0,0,0,.1);font-size:.85rem;margin-bottom:1.6rem;padding:.7rem 2pc .7rem .8rem;width:100%}#enp-quiz .enp-ab-create__submit{padding-bottom:1em;padding-top:1em;width:100%}#enp-quiz .enp-dash-container{background:#f8f8f8;margin-left:auto;margin-right:auto;max-width:40pc;padding:2rem 20px;transition:all .25s cubic-bezier(0,0,.3,1)}#enp-quiz .enp-dash-container:after{clear:both;content:"";display:table}@media(min-width:700px){#enp-quiz .enp-dash-container{max-width:840px}}@media(min-width:750pt){#enp-quiz .enp-dash-container{max-width:750pt}}#enp-quiz .enp-dash__section-header{display:block;margin-bottom:.325rem}@media(min-width:700px){#enp-quiz .enp-dash__section-header{align-content:flex-end;align-items:flex-end;display:flex;justify-content:space-between}}#enp-quiz .enp-search-quizzes{display:block}@media(min-width:25pc){#enp-quiz .enp-search-quizzes{align-content:flex-end;align-items:flex-end;display:flex}}#enp-quiz .enp-search-quizzes__form-item{display:block;margin-bottom:.6rem}@media(min-width:25pc){#enp-quiz .enp-search-quizzes__form-item{margin-bottom:0;margin-right:1rem}#enp-quiz .enp-search-quizzes__form-item:last-of-type{margin-right:0}}#enp-quiz .enp-quiz-search{position:relative}#enp-quiz .enp-search-quizzes__label{clip:rect(1px,1px,1px,1px);height:1px;left:-625pc;margin-bottom:0;overflow:hidden;position:absolute!important;top:auto;width:1px}#enp-quiz .enp-quiz-search__input{font-size:.85rem;margin:0 0 .1rem;max-width:10pc;padding:.3rem .3rem .3rem 26px}#enp-quiz .enp-quiz-search__icon{bottom:.3rem;height:21px;left:.2rem;position:absolute;width:21px}#enp-quiz .enp-search-quizzes__button{padding:.2rem .8rem}#enp-quiz .enp-search-results-description{font-size:.85rem}#enp-quiz .enp-search-results-description__link{white-space:nowrap}#enp-quiz .enp-search-results-description__icon{height:1.3em;left:2px;position:relative;top:4px;width:1.3em}#enp-quiz .enp-dash__section-title{font-size:.85rem;margin-bottom:.325rem;text-transform:uppercase}#enp-quiz .enp-view-toggle{cursor:pointer;display:none;opacity:.5}@media(min-width:700px){#enp-quiz .enp-view-toggle{display:flex}}#enp-quiz .enp-view-toggle__active{opacity:1}#enp-quiz .enp-sort-by{margin-left:5px}#enp-quiz .enp-dash-list{align-items:stretch;display:flex;flex-flow:row wrap;list-style:none;margin-left:0}#enp-quiz .enp-dash-item{align-content:flex-end;background:#fff;border:0;display:flex;flex-basis:100%;flex-direction:column;justify-content:flex-end;list-style:none;margin:0 0 .8rem;padding:1rem 1.2rem;transition:all .35s cubic-bezier(0,0,.3,1)}@media(min-width:700px){#enp-quiz .enp-dash-item{flex-basis:49%;margin:0 2% .8rem 0;max-width:49%}#enp-quiz .enp-dash-item:nth-child(2n){margin-right:0}}@media(min-width:750pt){#enp-quiz .enp-dash-item{flex-basis:32.5%;margin-right:1.25%;max-width:32.5%}#enp-quiz .enp-dash-item:nth-child(2n){margin-right:1.25%}#enp-quiz .enp-dash-item:nth-child(3n){margin-right:0}}#enp-quiz .enp-dash-item--published{box-shadow:inset 4px 0 0 #3bb275,0 1px 0 rgba(0,0,0,.1)}#enp-quiz .enp-dash-item--draft{box-shadow:inset 4px 0 0 #92dbb6,0 1px 0 rgba(0,0,0,.1)}#enp-quiz .enp-dash-item--remove{-webkit-animation:removeElement .5s cubic-bezier(0,0,.3,1) forwards;animation:removeElement .5s cubic-bezier(0,0,.3,1) forwards}#enp-quiz .enp-dash-list--list-view .enp-dash-item{flex-basis:100%;margin:0 0 .8rem}#enp-quiz .enp-dash-item__spinner{-webkit-animation:fadeIn .3s cubic-bezier(0,0,.3,1);align-content:center;align-items:center;animation:fadeIn .3s cubic-bezier(0,0,.3,1);background:hsla(0,59%,90%,.8);bottom:0;display:flex;justify-content:center;left:0;position:absolute;right:0;top:0;width:100%;z-index:999}#enp-quiz .enp-dash-item__header{background:#fff;border-bottom:1px solid #ddd;position:relative;z-index:99}#enp-quiz .enp-dash-item__title{font-size:1rem;padding:0 24px .375rem 0}#enp-quiz .enp-dash-item__content{padding:0 0 .375rem;position:relative;transition:all .2s cubic-bezier(0,0,.3,1)}#enp-quiz .enp-dash-item__meta{color:#565656;font-size:.75rem;font-weight:300}#enp-quiz .enp-dash-item__username{border-left:1px solid #ddd;margin-left:.2rem;padding-left:.4rem;word-wrap:break-word}#enp-quiz .enp-dash-item__title--ab-test{padding-bottom:0}#enp-quiz .enp-dash-item__ab-quizzes{color:#666;font-size:.85rem;list-style:none;margin-bottom:.8rem;margin-left:0}#enp-quiz .enp-dash-item__nav{font-size:.85rem;list-style:none;margin-bottom:0;margin-left:0}#enp-quiz .enp-dash-item__nav__item{display:inline-block;font-size:.85rem;margin-bottom:0;margin-right:10px;padding-bottom:0}#enp-quiz .enp-dash-item__nav__item a{font-weight:400}#enp-quiz .enp-dash-item__nav__item a:focus{outline:1px dotted #333f48;outline-offset:1px}#enp-quiz .enp-dash-item__nav__item:last-of-type{margin-right:0}#enp-quiz .enp-dash-item__delete{background:0;border:0;box-shadow:none;cursor:pointer;margin:0;padding:0;position:relative;top:4px}#enp-quiz .enp-dash-item__delete__icon{fill:#bbb;height:20px;width:20px}#enp-quiz .enp-dash-item__delete__icon:focus,#enp-quiz .enp-dash-item__delete__icon:hover{fill:#bf5700}#enp-quiz .enp-dash-item__nav--collapsible{-webkit-transform:translate3d(0,0,0);background:#fff;bottom:auto;display:none;margin-top:.2rem;position:absolute;right:auto;top:100%;transform:translate3d(0,0,0);transition:all .2s cubic-bezier(0,0,.3,1)}#enp-quiz .enp-dash-item__nav--collapsible .enp-dash-item__nav__item{padding:0 0 .4rem}#enp-quiz .enp-dash-item__menu-action{background:0;border:0;bottom:.2rem;color:#444;cursor:pointer;height:24px;padding:0;position:absolute;right:0}#enp-quiz .enp-dash-item__menu-action__icon{fill:#444;height:24px;transition:all .3s cubic-bezier(0,0,.3,1);width:24px}#enp-quiz .enp-dash-item__menu-action__icon--bottom{left:0;position:absolute}#enp-quiz .enp-dash-item--menu-active{-webkit-transform:translate3d(0,-3px,0);transform:translate3d(0,-3px,0)}#enp-quiz .enp-dash-item--menu-active.enp-dash-item--published{box-shadow:inset 4px 0 0 #3bb275,0 2px 2px rgba(0,0,0,.2)}#enp-quiz .enp-dash-item--menu-active.enp-dash-item--draft{box-shadow:inset 4px 0 0 #92dbb6,0 2px 2px rgba(0,0,0,.2)}#enp-quiz .enp-dash-item--menu-active .enp-dash-item__menu-action__icon--bottom{-webkit-transform:translatey(-15.5%);transform:translatey(-15.5%)}#enp-quiz .enp-dash-item--menu-active .enp-dash-item__menu-action__icon--top{-webkit-transform:rotatex(-180deg) translatey(0);transform:rotatex(-180deg) translatey(0)}#enp-quiz .enp-dash-item--menu-active .enp-dash-item__nav--collapsible{-webkit-animation:slideInTop .25s cubic-bezier(0,0,.3,1) forwards;animation:slideInTop .25s cubic-bezier(0,0,.3,1) forwards;display:block}#enp-quiz .enp-dash-item--menu-active .enp-dash-item__content{-webkit-transform:translate3d(0,.675rem,0);opacity:.4;transform:translate3d(0,.675rem,0)}#enp-quiz .enp-quiz-results{display:flex;justify-content:space-around;list-style:none;margin:.8rem 0 0;padding:0;text-align:center}#enp-quiz .enp-quiz-results__item{color:#454545;margin:0 2% 0 0;padding:0}@media(max-width:280px){#enp-quiz .enp-quiz-results__item{margin-bottom:.6rem;padding:0;width:100%}}#enp-quiz .enp-quiz-results__number{font-size:1.6rem;line-height:1;position:relative}#enp-quiz .enp-dash-item--draft .enp-quiz-results__number{opacity:.5}#enp-quiz .enp-quiz-results__number--average-score{color:#319461}#enp-quiz .enp-quiz-results__number--average-score:after{content:"%";font-size:.9rem;position:absolute;right:-1rem;top:.3rem}#enp-quiz .enp-quiz-results__label{color:#888;font-size:.7rem;font-weight:300;text-transform:uppercase}#enp-quiz .enp-quiz-list__view{align-content:flex-end;align-items:flex-end;display:flex}#enp-quiz .enp-dash-item--add-new{background:0;border:0;padding:0;position:relative}@media(min-width:700px){#enp-quiz .enp-dash-item--add-new{min-height:7rem}}#enp-quiz .enp-dash-link--add-new{background:0;border:2px dashed #bbb;border-radius:3px;box-shadow:none;color:#333f48;cursor:pointer;font-size:15px;font-weight:400;justify-content:flex-start;letter-spacing:.05em;line-height:1.6;padding:1rem 1.2rem;text-align:center;text-transform:uppercase;transition:all .2s}#enp-quiz .enp-dash-link--add-new:focus,#enp-quiz .enp-dash-link--add-new:hover{background:#222a30;box-shadow:none;color:#fff}#enp-quiz .enp-dash-link--add-new:active{background:#5d7384;box-shadow:inset 0 2px 0 rgba(0,0,0,.1);color:#fff}#enp-quiz .enp-dash-link--add-new:focus{outline-color:#4d90fe;outline-offset:-2px;outline-style:auto;outline-width:5px}#enp-quiz .enp-dash-link--add-new:disabled,#enp-quiz .enp-dash-link--add-new:disabled:focus,#enp-quiz .enp-dash-link--add-new:disabled:hover{background:#333f48;cursor:default;opacity:.5}#enp-quiz .enp-dash-link--add-new:focus,#enp-quiz .enp-dash-link--add-new:hover{background:hsla(0,0%,100%,.9);border:2px dashed #999;color:#444}@media(min-width:700px){#enp-quiz .enp-dash-link--add-new{align-content:center;align-items:center;bottom:0;display:flex;flex-direction:column;font-size:.85rem;justify-content:center;left:0;position:absolute;right:0;text-transform:uppercase;top:0}}#enp-quiz .enp-dash-link--add-new .enp-dash-link__icon{background:#333f48;border-radius:50%;fill:#fff;height:1.2rem;margin-right:5px;width:1.2rem}@media(min-width:700px){#enp-quiz .enp-dash-link--add-new .enp-dash-link__icon{height:2rem;margin:.8rem 0 .2rem;width:2rem}}#enp-quiz .enp-dash-link--add-new:hover{color:#222a30}#enp-quiz .enp-dash-link--add-new:hover .enp-dash-link__icon{background:#222a30;fill:#fff}#enp-quiz .enp-quiz-message--welcome p{color:#444}#enp-quiz .enp-paginate{align-content:center;align-items:center;display:flex;font-size:1rem;justify-content:center;list-style:none;margin-left:0}#enp-quiz .enp-paginate__link{align-content:center;align-items:center;border-radius:3px;display:flex;font-weight:400;justify-content:center;margin:0 .2rem;padding:0 .4rem}#enp-quiz .enp-paginate__link--current-page{border:2px solid #333f48}#enp-quiz .enp-paginate__item--first-page,#enp-quiz .enp-paginate__item--last-page{display:flex}#enp-quiz .enp-paginate__item--first-page:after,#enp-quiz .enp-paginate__item--last-page:before{bottom:.2rem;content:"...";font-size:1rem;opacity:.6;position:relative}#enp-quiz .enp-paginate__item--no-gap:after,#enp-quiz .enp-paginate__item--no-gap:before{content:""}#enp-quiz .enp-paginate__item--next-page{margin-left:.2rem}#enp-quiz .enp-paginate__item--previous-page{margin-right:.2rem}#enp-quiz .enp-quiz-breadcrumbs{align-content:center;align-items:center;background:#fff;border-bottom:1px solid #ddd;display:flex;justify-content:center;left:-500%;margin-left:auto;margin-right:auto;padding:10px;position:absolute;right:-500%;top:0;width:1000%;z-index:99999}#enp-quiz .enp-quiz-breadcrumbs__list{display:flex;list-style:none;margin-bottom:0;margin-left:0}#enp-quiz .enp-quiz-breadcrumbs__item{align-content:center;align-items:center;display:flex;fill:#333f48;justify-content:center;margin-right:5px}#enp-quiz .enp-quiz-breadcrumbs__item:last-of-type{margin-right:0}@media(min-width:25pc){#enp-quiz .enp-quiz-breadcrumbs__item{margin-right:10px}}#enp-quiz .enp-quiz-breadcrumbs__link--disabled{cursor:default;opacity:.65}#enp-quiz .enp-quiz-breadcrumbs__link--active{background:transparent;border:2px solid #333f48;border-radius:3px;box-shadow:none;color:#333f48;cursor:pointer;font-size:15px;font-weight:400;letter-spacing:.05em;line-height:1.6;padding:.4em 1em;text-align:center;text-transform:uppercase;transition:all .2s}#enp-quiz .enp-quiz-breadcrumbs__link--active:focus,#enp-quiz .enp-quiz-breadcrumbs__link--active:hover{background:#222a30;box-shadow:none;color:#fff}#enp-quiz .enp-quiz-breadcrumbs__link--active:active{background:#5d7384;box-shadow:inset 0 2px 0 rgba(0,0,0,.1);color:#fff}#enp-quiz .enp-quiz-breadcrumbs__link--active:focus{outline-color:#4d90fe;outline-offset:-2px;outline-style:auto;outline-width:5px}#enp-quiz .enp-quiz-breadcrumbs__link--active:disabled,#enp-quiz .enp-quiz-breadcrumbs__link--active:disabled:focus,#enp-quiz .enp-quiz-breadcrumbs__link--active:disabled:hover{background:#333f48;cursor:default;opacity:.5}#enp-quiz .enp-quiz-breadcrumbs__link--active:focus,#enp-quiz .enp-quiz-breadcrumbs__link--active:hover{background:transparent;border:2px solid #222a30;color:#222a30}#enp-quiz .enp-quiz-breadcrumbs__link{font-size:1rem;font-weight:400;letter-spacing:0;text-transform:none}#enp-quiz .enp-quiz-breadcrumbs--fixed{-webkit-animation:navSlideIn .25s;animation:navSlideIn .25s;position:fixed;top:0}#enp-quiz .enp-results-title{background:#f8f8f8;border-bottom:1px solid #ddd;font-size:1.6rem;margin:-1.2rem 0 2rem;padding:3.2rem 20px 2.6rem;text-align:center}#enp-quiz .enp-results-title:after{content:"RESULTS";display:block;font-size:.85rem;font-weight:400;text-transform:uppercase}#enp-quiz .enp-results__container{display:block;margin-left:auto;margin-right:auto;max-width:40pc;padding-left:20px;padding-right:20px}#enp-quiz .enp-results__container:after{clear:both;content:"";display:table}@media(min-width:700px){#enp-quiz .enp-results__container{max-width:840px}}@media(min-width:750pt){#enp-quiz .enp-results__container{display:flex;justify-content:space-between;max-width:750pt}}#enp-quiz .enp-quiz-scores__container,#enp-quiz .enp-results-flow__container{width:100%}@media(min-width:750pt){#enp-quiz .enp-quiz-scores__container,#enp-quiz .enp-results-flow__container{width:48%}}#enp-quiz .enp-quiz-score__line-chart{height:300px;margin-bottom:1rem}#enp-quiz .enp-quiz-score__line-chart .ct-label{color:#444}#enp-quiz .enp-quiz-score__line-chart .ct-grid{stroke:#dadada;stroke-dasharray:0}#enp-quiz .enp-quiz-score__line-chart .ct-line{stroke:#3bb275;stroke-width:2px}#enp-quiz .enp-quiz-score__line-chart .ct-point{stroke:#3bb275;stroke-width:8px}#enp-quiz .enp-quiz-scores-table{margin:0 auto;max-width:500px;width:100%}#enp-quiz .enp-quiz-scores-table tr th{background-color:#fff}#enp-quiz .enp-quiz-scores-table__label{padding-left:5%}#enp-quiz .enp-quiz-scores-table__score{padding-right:5%;text-align:right}#enp-quiz .enp-results-flow{border-radius:50%;height:20pc;margin:2rem auto;position:relative;width:20pc}@media(min-width:25pc){#enp-quiz .enp-results-flow{height:390px;width:390px}}@media(min-width:700px){#enp-quiz .enp-results-flow{height:450px;width:450px}}@media(min-width:750pt){#enp-quiz .enp-results-flow{height:25pc;width:25pc}}#enp-quiz .enp-results-flow__section-title{clip:rect(1px,1px,1px,1px);height:1px;left:-625pc;overflow:hidden;position:absolute!important;top:auto;width:1px}#enp-quiz .enp-results-flow__item{-webkit-animation:.85s slideInBottom cubic-bezier(0,0,.3,1) forwards;animation:.85s slideInBottom cubic-bezier(0,0,.3,1) forwards;border:2px solid #3bb275;border-radius:50%;height:100%;left:0;letter-spacing:.05rem;margin:0 auto;padding:12.5% 0 0;right:0;text-align:center;width:100%}#enp-quiz .enp-results-flow__item--total-views{background:#fff}#enp-quiz .enp-results-flow__item--quiz-starts{background:#eaf8f1;bottom:2.5%;height:65%;padding-top:8%;position:absolute;width:65%}#enp-quiz .enp-results-flow__item--quiz-finishes{background:#b8e8cf;bottom:5%;height:35%;position:absolute;width:35%}#enp-quiz .enp-results-flow__title{color:#444;font-size:.7rem;margin-bottom:0;text-transform:uppercase}@media(min-width:700px){#enp-quiz .enp-results-flow__title{font-weight:700;margin-bottom:2px}}#enp-quiz .enp-results-flow__number{font-size:1.4rem;font-weight:700;line-height:1.2}#enp-quiz .enp-results-flow__number--total-views{font-size:2rem}#enp-quiz .enp-results-flow__number--quiz-starts{font-size:1.65rem}#enp-quiz .enp-results-flow__percentage{color:#444;display:inline-block;font-size:.8rem;font-weight:400;left:-.1rem;position:relative;top:-.7em}#enp-quiz .enp-results-flow__percentage:after{color:#444;content:"%";font-size:.7rem;position:absolute;right:-.75rem}#enp-quiz .enp-results-questions__section{background:#f5f5f5;border-bottom:1px solid #ddd;border-top:1px solid #ddd;margin-bottom:3rem;margin-top:5rem;padding-bottom:3rem;padding-top:5rem}#enp-quiz .enp-results-questions__header{align-items:flex-start;flex-direction:column}@media(min-width:25pc){#enp-quiz .enp-results-questions__header{align-items:flex-end;display:flex;flex-direction:row;justify-content:space-between}}#enp-quiz .enp-results-questions__key,#enp-quiz .enp-results-questions__title{font-size:.85rem;text-transform:uppercase}#enp-quiz .enp-results-questions{list-style:none;margin-left:0}#enp-quiz .enp-results-question{font-size:1rem;margin-bottom:1rem;padding:0;width:100%}#enp-quiz .enp-results-question__header{padding:1rem 1.2rem;position:relative}#enp-quiz .enp-results-question__question,#enp-quiz .enp-results-question__stats{font-size:1rem;line-height:1.4}#enp-quiz .enp-results-question__question{font-weight:400}@media(min-width:25pc){#enp-quiz .enp-results-question__question{margin-bottom:0;padding-right:7em}}#enp-quiz .enp-results-question__stats{font-size:.9rem}@media(min-width:25pc){#enp-quiz .enp-results-question__stats{bottom:1rem;position:absolute;right:1.2rem;text-align:right}}#enp-quiz .enp-results-question__stats,#enp-quiz .enp-results-questions__key{font-weight:300}#enp-quiz .enp-results-question__content{padding:2rem 1.2rem 1.2rem}#enp-quiz .enp-results-question__deep-stats{display:flex;justify-content:space-around;list-style:none;margin-left:0;text-align:center}#enp-quiz .enp-results-question__deep-stat__number{font-size:1.8rem;line-height:1;position:relative}#enp-quiz .enp-results-question__deep-stat__number--correct,#enp-quiz .enp-results-question__deep-stat__number--finishes{color:#319461}#enp-quiz .enp-results-question__deep-stat__number--incorrect{color:#e97763}#enp-quiz .enp-results-question__deep-stat__number--correct:after,#enp-quiz .enp-results-question__deep-stat__number--finishes:after,#enp-quiz .enp-results-question__deep-stat__number--incorrect:after{content:"%";font-size:.9rem;position:absolute;right:-1rem;top:.3rem}#enp-quiz .enp-results-question__deep-stat__label{font-size:.8rem;text-transform:uppercase}#enp-quiz .enp-results-question__options{list-style:none;margin-bottom:0;margin-left:0}#enp-quiz .enp-results-question__option{border-top:1px solid #ddd;padding:.8rem .8rem .8rem .4rem}@media(min-width:25pc){#enp-quiz .enp-results-question__option{display:flex;flex-direction:row;justify-content:space-between}}#enp-quiz .enp-results-question__option:first-of-type{margin-top:1.4rem}#enp-quiz .enp-results-question__option--correct{background:#eaf8f1}#enp-quiz .enp-results-question__option__text{flex-grow:100;margin-right:1rem}#enp-quiz .enp-results-question__option__text__helper{font-size:.85rem;font-weight:300;margin-right:.4rem;text-transform:uppercase}@media(min-width:25pc){#enp-quiz .enp-results-question__option__icon{margin-right:.3rem;min-width:1.6rem}}#enp-quiz .enp-results-question__option__icon--incorrect{fill:#e97763;opacity:.5}#enp-quiz .enp-results-question__option__icon--correct{fill:#319461;opacity:1}#enp-quiz .enp-results-question__option__percentage--incorrect{color:#e97763}#enp-quiz .enp-results-question__option__percentage--correct{color:#319461}#enp-quiz .enp-results-question__option__number-selected{font-weight:300}#enp-quiz .enp-slider-responses__title{font-size:.85rem;font-weight:400;margin-top:1.6rem;text-transform:uppercase}#enp-quiz .enp-slider-responses__line-chart .ct-point{stroke-width:8px}#enp-quiz .enp-slider-responses__line-chart--high,#enp-quiz .enp-slider-responses__line-chart--low{stroke:#bf5700}#enp-quiz .enp-slider-responses__line-chart--correct{stroke:#3bb275}#enp-quiz .enp-slider-responses-table{width:100%}#enp-quiz .enp-slider-responses-table tr:nth-child(even) td{background-color:#fff}#enp-quiz .enp-slider-responses-table tr.enp-slider-responses-table__response--correct td{background-color:#eaf8f1}#enp-quiz .enp-slider-responses-table__content{box-shadow:none;padding-top:1rem}#enp-quiz .enp-slider-responses-table--hide-zero .enp-slider-responses-table__frequency--zero{display:none}#enp-quiz .enp-slider-responses-table__response-frequency{align-items:center;display:flex;justify-content:space-between}#enp-quiz .enp-slider-responses-table__toggle-zero-frequency{background:#fff;border:0;border-radius:3px;box-shadow:inset 1px 1px 0 #ccc,inset -1px -1px 0 #ccc;color:#444;cursor:pointer;font-family:tablet-gothic,helvetica neue,helvetica,arial,sans-serif;font-size:.9rem;font-weight:400;letter-spacing:0;line-height:1.5;margin:0;min-height:3.065rem;padding:0 .6rem;position:relative;text-align:left;text-transform:none;transition:all .2s cubic-bezier(0,0,.3,1);width:auto;z-index:9}.enp-quiz-results #enp-quiz .enp-aside{border:0}.enp-quiz-results .enp-results-questions__title__quiz-title{clip:rect(1px,1px,1px,1px);height:1px;left:-625pc;overflow:hidden;position:absolute!important;top:auto;width:1px}#enp-quiz .enp-results--ab{display:block;margin-bottom:3rem}@media(min-width:750pt){#enp-quiz .enp-results--ab{align-content:flex-end;display:flex;flex-wrap:wrap;padding:10px;width:50%}#enp-quiz .enp-results--a{border-right:1px solid #ddd;padding-right:1rem}#enp-quiz .enp-results--b{padding-left:1rem}}#enp-quiz .enp-results-title--ab,#enp-quiz .enp-results__container--ab .enp-results-flow__container{min-width:100%}#enp-quiz .enp-results--loser .enp-results-flow__item{border:2px solid #bf5700}#enp-quiz .enp-results--loser .enp-results-flow__item--quiz-starts{background:#ffc696}#enp-quiz .enp-results--loser .enp-results-flow__item--quiz-finishes{background:#ffb06d}#enp-quiz .enp-results--loser .enp-results-questions__title,#enp-quiz .enp-results--loser th{color:#964400}#enp-quiz .enp-results--winner .enp-results-questions__title,#enp-quiz .enp-results--winner th{color:#319461}#enp-quiz .enp-results-title--a,#enp-quiz .enp-results-title--b{background:transparent}#enp-quiz .enp-ab-scores{margin-left:auto;margin-right:auto;max-width:40pc;padding-left:20px;padding-right:20px}#enp-quiz .enp-ab-scores:after{clear:both;content:"";display:table}@media(min-width:700px){#enp-quiz .enp-ab-scores{max-width:840px}}@media(min-width:750pt){#enp-quiz .enp-ab-scores{max-width:750pt}}#enp-quiz .enp-ab-scores th.enp-quiz-scores-table__label,#enp-quiz .enp-ab-scores th.enp-quiz-scores-table__score{padding-left:0;padding-right:0}#enp-quiz .enp-ab-scores__title{font-size:.85rem;padding-left:50px;text-transform:uppercase}#enp-quiz .enp-quiz-score__line-chart .enp-test-loser .ct-line,#enp-quiz .enp-quiz-score__line-chart .enp-test-loser .ct-point{stroke:#bf5700}#enp-quiz .enp-quiz-scores{margin-top:0}#enp-quiz .enp-ab-scores .enp-quiz-scores-table,#enp-quiz .enp-question-results{margin-bottom:1.6rem}@media(min-width:750pt){#enp-quiz .enp-ab-scores .enp-quiz-scores-table,#enp-quiz .enp-question-results{float:left;margin:0;width:48%}#enp-quiz .enp-ab-scores .enp-quiz-scores-table:first-of-type,#enp-quiz .enp-question-results:first-of-type{margin-right:4%}}#enp-quiz .enp-question-results__container{margin-left:auto;margin-right:auto;max-width:40pc;padding-left:20px;padding-right:20px}#enp-quiz .enp-question-results__container:after{clear:both;content:"";display:table}@media(min-width:700px){#enp-quiz .enp-question-results__container{max-width:840px}}@media(min-width:750pt){#enp-quiz .enp-question-results__container{max-width:750pt}}#enp-quiz .enp-question-results--ab .enp-results-questions__section{background:#fff;border:0;margin:1.6rem auto;padding:1.6rem 0}#enp-quiz .enp-question-results--ab .enp-results-questions__container{padding:0}#enp-quiz .enp-ab-new-embed-code__section{margin-bottom:2rem;margin-left:auto;margin-right:auto;max-width:540px;padding-bottom:2rem;padding-left:20px;padding-right:20px}#enp-quiz .enp-ab-new-embed-code__section:after{clear:both;content:"";display:table}#enp-quiz .enp-ab-new-embed-code__section .enp-ab-embed-code{margin:0;padding:0}#enp-quiz .enp-ab-embed-code__section{background:#f5f5f5;border-bottom:1px solid #ddd;border-top:1px solid #ddd;margin-bottom:3rem;margin-top:5rem;padding-bottom:3rem;padding-top:5rem}#enp-quiz .enp-ab-embed-code{margin-left:auto;margin-right:auto;max-width:40pc;padding-left:20px;padding-right:20px}#enp-quiz .enp-ab-embed-code:after{clear:both;content:"";display:table}#enp-quiz .enp-ab-embed-code__title{font-size:.85rem;text-transform:uppercase}#enp-quiz .enp-embed-code__textarea{margin-bottom:0}#enp-quiz .enp-embed-code__instructions{font-size:1.1rem}#enp-quiz .enp-slider{margin-bottom:1.6rem}#enp-quiz .enp-slider-input__container{align-items:center;display:flex;justify-content:center;margin:1.6rem auto;position:relative}#enp-quiz .enp-slider-input__label{color:#5e5e5e;display:block;font-size:.85rem;font-weight:400;text-transform:uppercase}#enp-quiz .enp-slider-input__prefix,#enp-quiz .enp-slider-input__suffix{font-size:1rem}#enp-quiz .enp-slider-input__prefix{margin-right:.2rem;white-space:pre}#enp-quiz .enp-slider-input__suffix{margin-left:.2rem;white-space:pre}#enp-quiz .enp-slider-input__input{background:#fff;border:1px solid #aaa;border-radius:3px;font-family:tablet-gothic,helvetica neue,helvetica,arial,sans-serif;font-size:1rem;margin-bottom:0;max-width:100%;padding:.75rem;transition:all .25s cubic-bezier(0,0,.3,1);width:auto}@media(min-width:700px){#enp-quiz .enp-slider-input__input{padding:.8rem}}#enp-quiz .enp-slider-input__input--incorrect{color:#bf5700}#enp-quiz .enp-slider-input__input--correct{color:#319461}#enp-quiz .enp-slider-input__input--invalid-animation{box-shadow:0 0 2px 1px #e97763}#enp-quiz .enp-slider_input__range-helper{bottom:-1.2rem;font-size:.8rem;position:absolute}#enp-quiz .enp-slider_input__range-helper--low{left:0}#enp-quiz .enp-slider_input__range-helper--high{right:0}#enp-quiz .enp-slider-input__range-helper__number{color:#666;position:relative}#enp-quiz .ui-slider-range-show-correct__tooltip-container{position:relative}#enp-quiz .ui-slider-range-show-correct__tooltip{background-color:#fff;border:2px solid #3bb275;border-radius:50%;height:1.1rem;margin-left:-.55rem;position:absolute;top:-.4rem;width:1.1rem;z-index:9999}#enp-quiz .ui-slider-range-show-correct__tooltip--low{left:0}#enp-quiz .ui-slider-range-show-correct__tooltip--high{right:-.55rem}#enp-quiz .ui-slider-range-show-correct__tooltip__text{color:#287950;display:inline-block;font-size:.825rem;min-width:100%;position:relative;text-align:center;text-shadow:0 1px 0 #fff;top:-1.35rem}#enp-quiz .enp-slider{background:#ddd;position:relative;text-align:left}#enp-quiz .enp-slider .ui-helper-hidden{display:none}#enp-quiz .enp-slider .ui-helper-hidden-accessible{border:0;clip:rect(0 0 0 0);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px}#enp-quiz .enp-slider .ui-helper-reset{border:0;font-size:100%;line-height:1.3;list-style:none;margin:0;outline:0;padding:0;text-decoration:none}#enp-quiz .enp-slider .ui-helper-clearfix:after,#enp-quiz .enp-slider .ui-helper-clearfix:before{border-collapse:collapse;content:"";display:table}#enp-quiz .enp-slider .ui-helper-clearfix:after{clear:both}#enp-quiz .enp-slider .ui-helper-clearfix{min-height:0}#enp-quiz .enp-slider .ui-helper-zfix{filter:alpha(opacity=0);height:100%;left:0;opacity:0;position:absolute;top:0;width:100%}#enp-quiz .enp-slider .ui-front{z-index:100}#enp-quiz .enp-slider .ui-state-disabled{cursor:default!important}#enp-quiz .enp-slider .ui-icon{background-repeat:no-repeat;display:block;overflow:hidden;text-indent:-99999px}#enp-quiz .enp-slider .ui-widget-overlay{height:100%;left:0;position:fixed;top:0;width:100%}#enp-quiz .enp-slider .ui-slider-handle{background:#fff;border:1px solid #aaa;border-radius:50%;cursor:default;height:1.2rem;margin-left:-.6rem;position:absolute;top:-.4rem;touch-action:none;transition:opacity .2s cubic-bezier(0,0,.3,1),height .18s cubic-bezier(0,0,.3,1),width .18s cubic-bezier(0,0,.3,1),transform .18s cubic-bezier(0,0,.3,1),-webkit-transform .18s cubic-bezier(0,0,.3,1);width:1.2rem;z-index:2}#enp-quiz .enp-slider .ui-slider-handle:focus{box-shadow:0 0 3px 1px #4d90fe;outline:0}#enp-quiz .enp-slider .ui-slider-handle--correct,#enp-quiz .enp-slider .ui-slider-handle--incorrect{height:1.1rem;margin-left:-.55rem;top:-.4rem;width:1.1rem}#enp-quiz .enp-slider .ui-slider-handle--incorrect{border:2px solid #bf5700;z-index:1}#enp-quiz .enp-slider .ui-slider-handle--correct{border:2px solid #3bb275;z-index:99999}#enp-quiz .enp-slider .ui-slider-range{background-position:0 0;border:0;display:block;font-size:.7rem;height:100%;position:absolute;top:0;z-index:1}#enp-quiz .enp-slider .ui-slider-range-show-correct{background:#3bb275;z-index:9}#enp-quiz .enp-slider .ui-slider-range-min{background:#3bb275;left:0}#enp-quiz .enp-slider .ui-slider-range-max{right:0}#enp-quiz .enp-slider.ui-state-disabled .ui-slider-handle,#enp-quiz .enp-slider.ui-state-disabled .ui-slider-range{-webkit-filter:inherit;filter:inherit}#enp-quiz .ui-slider-horizontal{height:.3rem}#enp-quiz .enp-question__answered .enp-slider{background:#bbb}#enp-quiz .enp-question__answered .ui-slider-range-min{background:#fff} \ No newline at end of file +html{font-size:1pc!important}html #enp-quiz{box-sizing:border-box}body #enp-quiz{background:#fff;overflow:hidden}#enp-quiz *,#enp-quiz *:after,#enp-quiz *:before{box-sizing:inherit}#enp-quiz ol,#enp-quiz ul{margin:0 0 1.6rem 1.25rem;padding:0}#enp-quiz textarea{margin-bottom:1rem}#enp-quiz button,#enp-quiz button:active,#enp-quiz button:focus,#enp-quiz button:hover,#enp-quiz iframe,#enp-quiz input[type=button],#enp-quiz input[type=button]:active,#enp-quiz input[type=button]:focus,#enp-quiz input[type=button]:hover,#enp-quiz input[type=reset],#enp-quiz input[type=reset]:active,#enp-quiz input[type=reset]:focus,#enp-quiz input[type=reset]:hover,#enp-quiz input[type=submit],#enp-quiz input[type=submit]:active,#enp-quiz input[type=submit]:focus,#enp-quiz input[type=submit]:hover{border:0}#enp-quiz .enp-screen-reader-text{clip:rect(1px,1px,1px,1px);height:1px;left:-625pc;overflow:hidden;position:absolute!important;top:auto;width:1px}#enp-quiz .enp-screen-reader-text:active,#enp-quiz .enp-screen-reader-text:focus,#enp-quiz .enp-screen-reader-text:hover{background-color:#f1f1f1;border-radius:3px;box-shadow:0 0 2px 2px rgba(0,0,0,.6);clip:auto!important;color:#21759b;display:block;font-size:14px;font-weight:700;height:auto;left:5px;line-height:normal;padding:15px 23px 14px;text-decoration:none;top:5px;width:auto;z-index:100000}#enp-quiz .enp-accordion-header{background:#fff;border:0;border-radius:3px;box-shadow:inset 1px 1px 0 #ccc,inset -1px -1px 0 #ccc;color:#444;cursor:pointer;font-family:tablet-gothic,helvetica neue,helvetica,arial,sans-serif;font-size:.9rem;font-weight:400;letter-spacing:0;line-height:1.5;margin:1.6rem 0 0;min-height:3.065rem;padding:1rem 2rem 1rem 1rem;position:relative;text-align:left;text-transform:none;transition:all .2s cubic-bezier(0,0,.3,1);width:100%;z-index:9}#enp-quiz .enp-accordion-header:first-of-type{margin-top:0}#enp-quiz .enp-accordion-header .enp-accordion-header__icon{bottom:.75rem;fill:#666;position:absolute;right:.75rem;transition:all .35s cubic-bezier(0,0,.3,1)}#enp-quiz .enp-accordion-header--open .enp-accordion-header__icon{-webkit-transform:rotatex(180deg) translatey(2px);transform:rotatex(180deg) translatey(2px)}#enp-quiz .enp-accordion-content{background:#fff;box-shadow:inset 1px -1px 0 #ccc,inset -1px -1px 0 #ccc;display:block;height:auto;margin-bottom:1.6rem;overflow:visible;position:relative;width:100%}#enp-quiz .enp-accordion-content--closed{-webkit-animation:slideOutTop .25s cubic-bezier(0,0,.3,1) forwards;animation:slideOutTop .25s cubic-bezier(0,0,.3,1) forwards;display:none;margin-top:0;padding-top:0}#enp-quiz .enp-accordion-content--open{-webkit-animation:slideInTop .45s cubic-bezier(0,0,.3,1) forwards;animation:slideInTop .45s cubic-bezier(0,0,.3,1) forwards;margin-bottom:2rem;padding-top:1.6rem}#enp-quiz .enp-quiz-message{background:#fff;border:1px solid #eee;border-bottom:1px solid #ccc;bottom:0;left:0;margin-bottom:1.6rem;margin-left:auto;margin-right:auto;max-width:32pc;padding:1rem .375rem;position:fixed}#enp-quiz .enp-quiz-message:after{clear:both;content:"";display:table}#enp-quiz .enp-quiz-message__title{font-size:1.5rem;text-transform:uppercase}#enp-quiz .enp-message__list{font-size:1.1rem;list-style:none;margin-bottom:0;margin-left:0}#enp-quiz .enp-quiz-message--error{border-left:6px solid #bf5700;color:#bf5700}#enp-quiz .enp-quiz-message__title--error{color:#964400}#enp-quiz .enp-quiz-message--success{border-left:6px solid #3bb275;color:#319461}#enp-quiz .enp-quiz-message__title--success{color:#319461}#enp-quiz .enp-quiz-message--note{border-left:6px solid #cca562}#enp-quiz .enp-quiz-message__title--note{color:#242f42}#enp-quiz .enp-quiz-message__close{background:0;border:0;box-shadow:none;margin:0;padding:0;position:absolute;right:5px;top:5px}#enp-quiz .enp-quiz-message--ajax{-webkit-animation:slideInBottom .3s;animation:slideInBottom .3s;margin-bottom:.6rem}#enp-quiz .enp-quiz-message-ajax-container{bottom:10px;position:fixed;z-index:9999}#enp-quiz .enp-quiz-message--saving__spinner{margin-left:-10px}#enp-quiz .enp-quiz-message--saving__text{font-size:1rem}#enp-quiz input.limited-chars,#enp-quiz textarea.limited-chars{margin-bottom:.2rem}#enp-quiz .limited-chars__container{color:#7a7a7a;display:block;font-size:.8rem;margin-bottom:1.2rem;text-align:right}#enp-quiz .limited-chars__counter{color:#666}#enp-quiz .limited-chars__container--error,#enp-quiz .limited-chars__container--error .limited-chars__counter{color:#964400}#enp-quiz input.has-error,#enp-quiz textarea.has-error{border:1px solid #bf5700}#enp-quiz input.has-error:focus,#enp-quiz textarea.has-error:focus{outline-color:#bf5700}#enp-quiz .enp-tooltip{position:relative}#enp-quiz .enp-tooltip__activator:focus+.enp-tooltip__description,#enp-quiz .enp-tooltip__activator:focus>.enp-tooltip__description{display:block}#enp-quiz .enp-tooltip__description{background:#f5f5f5;border-radius:3px;display:none;font-size:.9rem;left:103%;margin-bottom:2rem;max-width:200px;padding:.9rem;position:absolute}.enp-sticky{left:0;position:relative;right:0;top:0;z-index:999}.enp-sticky.enp-sticky--fixed{position:fixed}.enp-breadcrumb-link__container{background-color:#fff}.enp-breadcrumb-link{font-size:.85rem}.enp-breadcrumb-link__icon{left:.4rem;position:relative;top:.45rem}body #enp-quiz{color:#444;font-family:tablet-gothic,helvetica neue,helvetica,arial,sans-serif;font-size:1em;font-weight:400;line-height:1.6}@media(min-width:700px){body #enp-quiz{font-size:1.3em}}#enp-quiz h1,#enp-quiz h2,#enp-quiz h3,#enp-quiz h4,#enp-quiz h5,#enp-quiz h6{clear:both;color:#5d5e5f;font-family:tablet-gothic,helvetica neue,helvetica,arial,sans-serif;font-weight:700;line-height:1.2em;margin:0 0 .2rem}#enp-quiz h1{font-size:2em}#enp-quiz h2{font-size:1.75em}#enp-quiz h3{font-size:1.475em}#enp-quiz h4{font-size:1.3em}#enp-quiz h5{font-size:1.125em}#enp-quiz h6{font-size:1em}#enp-quiz p+h1,#enp-quiz p+h2,#enp-quiz p+h3,#enp-quiz p+h4,#enp-quiz p+h5,#enp-quiz p+h6,#enp-quiz ul+h1,#enp-quiz ul+h2,#enp-quiz ul+h3,#enp-quiz ul+h4,#enp-quiz ul+h5,#enp-quiz ul+h6{margin-top:1.8em}#enp-quiz p{font-size:.85em;font-weight:300;margin-bottom:1.125em}#enp-quiz ol,#enp-quiz ul{margin:0 0 1.6em 1.25em}#enp-quiz ul{list-style:disc}#enp-quiz ol{list-style:decimal}#enp-quiz li>ol,#enp-quiz li>ul{margin-bottom:0;margin-left:1.6em}#enp-quiz b,#enp-quiz strong{font-weight:700}#enp-quiz cite,#enp-quiz dfn,#enp-quiz em{font-family:georgia,times,serif;font-style:italic}#enp-quiz pre{background:#eee;font-family:Courier\ 10 Pitch,Courier,monospace;font-size:.95em;line-height:1.6;margin-bottom:1.6em;max-width:100%;overflow:auto;padding:1.6em}#enp-quiz .code,#enp-quiz code,#enp-quiz kbd,#enp-quiz tt,#enp-quiz var{font:.7em Monaco,Consolas,"Andale Mono","DejaVu Sans Mono",monospace}#enp-quiz table{border:0}#enp-quiz table th{border:0;border-bottom:1px solid #ddd;font-family:tablet-gothic,helvetica neue,helvetica,arial,sans-serif;font-size:.8rem;text-transform:uppercase}#enp-quiz table td{border:0;border-bottom:1px solid #eee;font-family:tablet-gothic,helvetica neue,helvetica,arial,sans-serif;font-size:1rem}#enp-quiz table tr:nth-child(even) td{background:#f8f8f8}#enp-quiz table tr:last-child td{border-bottom:0}#enp-quiz figure{margin:0}#enp-quiz img{height:auto;max-width:100%}#enp-quiz a{color:#333f48;text-decoration:none;touch-action:manipulation;transition:color .2s}#enp-quiz a .enp-icon{fill:#333f48}#enp-quiz a:active,#enp-quiz a:focus,#enp-quiz a:hover{color:#222a30}#enp-quiz a:active .enp-icon,#enp-quiz a:focus .enp-icon,#enp-quiz a:hover .enp-icon{fill:#222a30}#enp-quiz button:focus{outline-color:#4d90fe;outline-offset:-2px;outline-style:auto;outline-width:5px}#enp-quiz .enp-btn{background:#333f48;border:0;border-radius:3px;box-shadow:inset 0 -2px 0 rgba(0,0,0,.2);color:#fff;cursor:pointer;font-size:15px;font-weight:400;letter-spacing:.05em;line-height:1.6;padding:.85em 1.4em .75em;text-align:center;text-transform:uppercase;transition:all .2s}#enp-quiz .enp-btn:focus,#enp-quiz .enp-btn:hover{background:#222a30;box-shadow:none;color:#fff}#enp-quiz .enp-btn:active{background:#5d7384;box-shadow:inset 0 2px 0 rgba(0,0,0,.1);color:#fff}#enp-quiz .enp-btn:focus{outline-color:#4d90fe;outline-offset:-2px;outline-style:auto;outline-width:5px}#enp-quiz .enp-btn:disabled,#enp-quiz .enp-btn:disabled:focus,#enp-quiz .enp-btn:disabled:hover{background:#333f48;cursor:default;opacity:.5}#enp-quiz .enp-btn--add{background:0;border:3px dashed #666;border-radius:3px;box-shadow:none;color:#545454;cursor:pointer;font-size:15px;font-weight:400;letter-spacing:.05em;line-height:1.6;padding:.85em 1.4em .75em;text-align:center;text-transform:uppercase;transition:all .2s;width:100%}#enp-quiz .enp-btn--add:focus,#enp-quiz .enp-btn--add:hover{background:#222a30;box-shadow:none;color:#fff}#enp-quiz .enp-btn--add:active{background:#5d7384;box-shadow:inset 0 2px 0 rgba(0,0,0,.1);color:#fff}#enp-quiz .enp-btn--add:focus{outline-color:#4d90fe;outline-offset:-2px;outline-style:auto;outline-width:5px}#enp-quiz .enp-btn--add:disabled,#enp-quiz .enp-btn--add:disabled:focus,#enp-quiz .enp-btn--add:disabled:hover{background:#333f48;cursor:default;opacity:.5}#enp-quiz .enp-btn--add:focus,#enp-quiz .enp-btn--add:hover{background:hsla(0,0%,100%,.9);border:3px dashed #444;color:#444}#enp-quiz .enp-btn--disabled{cursor:default;opacity:.65}#enp-quiz .enp-btn--enabled{-webkit-animation:expand .6s;animation:expand .6s}#enp-quiz .enp-icon{height:24px;transition:all .2s;width:24px}#enp-quiz .enp-page-title{font-size:1.6rem}@-webkit-keyframes slideInBottom{0%{-webkit-transform:translate3d(0,75pt,0);opacity:0;transform:translate3d(0,75pt,0)}to{-webkit-transform:translate3d(0,0,0);opacity:1;transform:translate3d(0,0,0)}}@keyframes slideInBottom{0%{-webkit-transform:translate3d(0,75pt,0);opacity:0;transform:translate3d(0,75pt,0)}to{-webkit-transform:translate3d(0,0,0);opacity:1;transform:translate3d(0,0,0)}}@-webkit-keyframes slideInTop{0%{-webkit-transform:translate3d(0,-20px,0);height:auto;opacity:0;transform:translate3d(0,-20px,0)}to{-webkit-transform:translate3d(0,0,0);height:auto;opacity:1;transform:translate3d(0,0,0)}}@keyframes slideInTop{0%{-webkit-transform:translate3d(0,-20px,0);height:auto;opacity:0;transform:translate3d(0,-20px,0)}to{-webkit-transform:translate3d(0,0,0);height:auto;opacity:1;transform:translate3d(0,0,0)}}@-webkit-keyframes slideInTop--reduced-opacity{0%{-webkit-transform:translate3d(0,-20px,0);height:auto;opacity:0;transform:translate3d(0,-20px,0)}to{-webkit-transform:translate3d(0,0,0);height:auto;opacity:.8;transform:translate3d(0,0,0)}}@keyframes slideInTop--reduced-opacity{0%{-webkit-transform:translate3d(0,-20px,0);height:auto;opacity:0;transform:translate3d(0,-20px,0)}to{-webkit-transform:translate3d(0,0,0);height:auto;opacity:.8;transform:translate3d(0,0,0)}}@-webkit-keyframes slideOutTop{0%{-webkit-transform:translate3d(0,0,0);height:75pt;opacity:1;overflow:hidden;transform:translate3d(0,0,0)}to{-webkit-transform:translate3d(0,-20px,0);height:0;opacity:0;transform:translate3d(0,-20px,0)}}@keyframes slideOutTop{0%{-webkit-transform:translate3d(0,0,0);height:75pt;opacity:1;overflow:hidden;transform:translate3d(0,0,0)}to{-webkit-transform:translate3d(0,-20px,0);height:0;opacity:0;transform:translate3d(0,-20px,0)}}@-webkit-keyframes removeElement{0%{-webkit-transform:translate3d(0,0,0);opacity:1;transform:translate3d(0,0,0)}to{-webkit-transform:translate3d(-200px,0,0);height:0;margin:0;opacity:0;padding:0;transform:translate3d(-200px,0,0);z-index:-1}}@keyframes removeElement{0%{-webkit-transform:translate3d(0,0,0);opacity:1;transform:translate3d(0,0,0)}to{-webkit-transform:translate3d(-200px,0,0);height:0;margin:0;opacity:0;padding:0;transform:translate3d(-200px,0,0);z-index:-1}}@-webkit-keyframes removeAnswers{0%{-webkit-transform:translate3d(0,0,0);opacity:1;transform:translate3d(0,0,0)}to{-webkit-transform:translate3d(-200px,0,0);display:none;height:0;opacity:0;padding:0;transform:translate3d(-200px,0,0);z-index:-1}}@keyframes removeAnswers{0%{-webkit-transform:translate3d(0,0,0);opacity:1;transform:translate3d(0,0,0)}to{-webkit-transform:translate3d(-200px,0,0);display:none;height:0;opacity:0;padding:0;transform:translate3d(-200px,0,0);z-index:-1}}@-webkit-keyframes removeQuestion{0%{-webkit-transform:translatex(0);opacity:1;transform:translatex(0)}to{-webkit-transform:translatex(-200px);opacity:0;transform:translatex(-200px)}}@keyframes removeQuestion{0%{-webkit-transform:translatex(0);opacity:1;transform:translatex(0)}to{-webkit-transform:translatex(-200px);opacity:0;transform:translatex(-200px)}}@-webkit-keyframes showNextQuestion{0%{-webkit-transform:translatex(200px);opacity:0;transform:translatex(200px)}to{-webkit-transform:translatex(0);opacity:1;transform:translatex(0)}}@keyframes showNextQuestion{0%{-webkit-transform:translatex(200px);opacity:0;transform:translatex(200px)}to{-webkit-transform:translatex(0);opacity:1;transform:translatex(0)}}@-webkit-keyframes expand{0%{-webkit-transform:scale3d(1,1,1);box-shadow:0 0 0 rgba(0,0,0,.3);opacity:.8;transform:scale3d(1,1,1)}to{-webkit-transform:scale3d(1,1,1);box-shadow:0 0 0 rgba(0,0,0,.3),inset 0 2px 0 rgba(0,0,0,.2);opacity:1;transform:scale3d(1,1,1)}40%{opacity:1}70%{-webkit-transform:scale3d(1.1,1.1,1);box-shadow:0 0 8px rgba(0,0,0,.4);opacity:1;transform:scale3d(1.1,1.1,1)}}@keyframes expand{0%{-webkit-transform:scale3d(1,1,1);box-shadow:0 0 0 rgba(0,0,0,.3);opacity:.8;transform:scale3d(1,1,1)}to{-webkit-transform:scale3d(1,1,1);box-shadow:0 0 0 rgba(0,0,0,.3),inset 0 2px 0 rgba(0,0,0,.2);opacity:1;transform:scale3d(1,1,1)}40%{opacity:1}70%{-webkit-transform:scale3d(1.1,1.1,1);box-shadow:0 0 8px rgba(0,0,0,.4);opacity:1;transform:scale3d(1.1,1.1,1)}}@-webkit-keyframes checkmark{0%,to{-webkit-transform:scale3d(.2,.2,1);opacity:0;transform:scale3d(.2,.2,1)}10%,92%{-webkit-transform:scale3d(1.4,1.4,1);transform:scale3d(1.4,1.4,1)}12%{-webkit-transform:scale3d(1,1,1);transform:scale3d(1,1,1)}5%{opacity:1}90%{-webkit-transform:scale3d(1,1,1);opacity:1;transform:scale3d(1,1,1)}}@keyframes checkmark{0%,to{-webkit-transform:scale3d(.2,.2,1);opacity:0;transform:scale3d(.2,.2,1)}10%,92%{-webkit-transform:scale3d(1.4,1.4,1);transform:scale3d(1.4,1.4,1)}12%{-webkit-transform:scale3d(1,1,1);transform:scale3d(1,1,1)}5%{opacity:1}90%{-webkit-transform:scale3d(1,1,1);opacity:1;transform:scale3d(1,1,1)}}@-webkit-keyframes fadeOut{0%{opacity:1}to{opacity:0}}@keyframes fadeOut{0%{opacity:1}to{opacity:0}}@-webkit-keyframes fadeIn{0%{opacity:0}to{opacity:1}}@keyframes fadeIn{0%{opacity:0}to{opacity:1}}@-webkit-keyframes navSlideIn{0%{-webkit-transform:translate3d(0,-200px,0);transform:translate3d(0,-200px,0)}to{-webkit-transform:translate3d(0,0,0);transform:translate3d(0,0,0)}}@keyframes navSlideIn{0%{-webkit-transform:translate3d(0,-200px,0);transform:translate3d(0,-200px,0)}to{-webkit-transform:translate3d(0,0,0);transform:translate3d(0,0,0)}}.spinner{margin:0 auto;text-align:center;width:70px}.spinner>div{-webkit-animation:sk-bouncedelay 1.4s infinite ease-in-out both;animation:sk-bouncedelay 1.4s infinite ease-in-out both;background-color:#333;border-radius:100%;display:inline-block;height:18px;width:18px}.spinner .bounce1{-webkit-animation-delay:-.32s;animation-delay:-.32s}.spinner .bounce2{-webkit-animation-delay:-.16s;animation-delay:-.16s}@-webkit-keyframes sk-bouncedelay{0%,80%,to{-webkit-transform:scale(0)}40%{-webkit-transform:scale(1)}}@keyframes sk-bouncedelay{0%,80%,to{-webkit-transform:scale(0);transform:scale(0)}40%{-webkit-transform:scale(1);transform:scale(1)}}#enp-quiz{transition:background .25s cubic-bezier(0,0,.3,1)}#enp-quiz .enp-container{margin-left:auto;margin-right:auto;max-width:40pc;padding-left:20px;padding-right:20px}#enp-quiz .enp-container:after{clear:both;content:"";display:table}#enp-quiz .enp-aside{background:#fff;border:1px solid #eee;border-bottom-color:#ccc;font-size:1.2rem;margin-bottom:1.6rem;margin-left:auto;margin-right:auto;max-width:32pc;padding:1.6rem 20px}@media(min-width:700px){#enp-quiz .enp-aside{margin-bottom:2.6rem;padding:1.6rem 2rem}}#enp-quiz .enp-aside:after{clear:both;content:"";display:table}#enp-quiz .enp-aside__title{font-size:1.5rem;font-weight:600;text-transform:uppercase}#enp-quiz .enp-page-title{border-bottom:2px solid #333f48}#enp-quiz fieldset{border:0;margin:0;padding:0}#enp-quiz .enp-label{color:#5e5e5e;display:block;font-size:.85rem;font-weight:400;text-transform:uppercase}#enp-quiz .enp-legend{border:0;color:#5e5e5e;display:block;font-size:.85rem;font-weight:400;margin-bottom:.2rem;padding-top:1.6rem;text-transform:uppercase}#enp-quiz .enp-input{background:#fff;border:1px solid #aaa;border-radius:3px;font-family:tablet-gothic,helvetica neue,helvetica,arial,sans-serif;font-size:1rem;margin-bottom:1.2rem;max-width:100%;padding:.8rem .5rem;width:20rem}@media(min-width:700px){#enp-quiz .enp-input{padding:.8rem}}#enp-quiz .enp-input.enp-input--has-description{margin-bottom:.2rem}#enp-quiz .enp-input-description,#enp-quiz .enp-textarea-description{font-size:.85rem;margin-bottom:1rem}#enp-quiz .enp-input-description--before,#enp-quiz .enp-textarea-description--before{margin-bottom:0}#enp-quiz .enp-input:-ms-input-placeholder,#enp-quiz .enp-input::-ms-input-placeholder,#enp-quiz .enp-input::-webkit-input-placeholder,#enp-quiz .enp-input::placeholder,#enp-quiz .enp-textarea:-ms-input-placeholder,#enp-quiz .enp-textarea::-ms-input-placeholder,#enp-quiz .enp-textarea::-webkit-input-placeholder,#enp-quiz .enp-textarea::placeholder{color:#aaa;font-family:tablet-gothic,helvetica neue,helvetica,arial,sans-serif;font-weight:300}#enp-quiz .enp-textarea{background:#fff;border:1px solid #aaa;border-radius:3px;font-family:tablet-gothic,helvetica neue,helvetica,arial,sans-serif;font-size:1rem;line-height:1.5;margin-bottom:1.2rem;max-width:100%;padding:.8rem .5rem;width:100%}@media(min-width:700px){#enp-quiz .enp-textarea{padding:.8rem}}#enp-quiz .enp-textarea:focus{outline-color:#4d90fe;outline-offset:-2px;outline-style:auto;outline-width:5px}#enp-quiz .enp-textarea.enp-textarea--has-description{margin-bottom:.2rem}#enp-quiz .enp-textarea.enp-textarea--has-description--before{margin-bottom:1.2rem}#enp-quiz .enp-embed-code{background:#fff;border:1px solid #aaa;border-radius:3px;font-family:Monaco,Consolas,Andale Mono,DejaVu Sans Mono,monospace;font-size:.9rem;line-height:1.5;margin-bottom:1.2rem;max-width:100%;padding:1.6rem;width:100%}@media(min-width:700px){#enp-quiz .enp-embed-code{padding:.8rem}}#enp-quiz .enp-embed-code:focus{outline-color:#4d90fe;outline-offset:-2px;outline-style:auto;outline-width:5px}#enp-quiz .enp-preview-page-container,#enp-quiz .enp-publish-page-container,#enp-quiz .enp-quiz-form-container{background:#f8f8f8;margin-left:auto;margin-right:auto;max-width:40pc;padding:6rem 20px 4rem;position:relative}#enp-quiz .enp-preview-page-container:after,#enp-quiz .enp-publish-page-container:after,#enp-quiz .enp-quiz-form-container:after{clear:both;content:"";display:table}@media(min-width:700px){#enp-quiz .enp-preview-page-container,#enp-quiz .enp-publish-page-container,#enp-quiz .enp-quiz-form-container{max-width:840px}}@media(min-width:750pt){#enp-quiz .enp-preview-page-container,#enp-quiz .enp-publish-page-container,#enp-quiz .enp-quiz-form-container{max-width:750pt}}#enp-quiz .enp-quiz-form{margin-left:auto;margin-right:auto;max-width:32pc;padding-left:0;padding-right:0}#enp-quiz .enp-quiz-form:after{clear:both;content:"";display:table}#enp-quiz .enp-quiz-form .enp-input,#enp-quiz .enp-quiz-form .enp-textarea{width:100%}#enp-quiz .enp-quiz-title__label{color:#5e5e5e;display:block;font-size:.85rem;font-weight:500;text-transform:uppercase}#enp-quiz .enp-quiz-title__textarea{background:#fff;border:1px solid #aaa;border-radius:3px;font-family:tablet-gothic,helvetica neue,helvetica,arial,sans-serif;font-size:1.6rem;font-weight:700;margin-bottom:1rem;max-width:100%;padding:.8rem .5rem;width:20rem}@media(min-width:700px){#enp-quiz .enp-quiz-title__textarea{padding:.8rem}}#enp-quiz .enp-quiz-title__textarea:-ms-input-placeholder,#enp-quiz .enp-quiz-title__textarea::-ms-input-placeholder,#enp-quiz .enp-quiz-title__textarea::-webkit-input-placeholder,#enp-quiz .enp-quiz-title__textarea::placeholder{font-weight:700}#enp-quiz textarea{color:#000}#enp-quiz .enp-accordion-container{margin-bottom:1.6rem;position:relative}#enp-quiz .enp-question-content{background:#fff;padding-top:0;position:relative;width:100%}#enp-quiz .enp-question-inner{padding:1.6rem 1.6rem 1rem}@media(min-width:700px){#enp-quiz .enp-question-inner{padding-left:2.9rem;padding-right:2.8rem}}#enp-quiz .enp-question-title__label{color:#5e5e5e;display:block;font-size:.85rem;font-weight:500;text-transform:uppercase}#enp-quiz .enp-question-title__textarea{background:#fff;border:1px solid #aaa;border-radius:3px;font-family:tablet-gothic,helvetica neue,helvetica,arial,sans-serif;font-size:1.3rem;margin-bottom:1.2rem;max-width:100%;padding:1rem 1.2rem;width:20rem}@media(min-width:700px){#enp-quiz .enp-question-title__textarea{padding:.8rem}}#enp-quiz .enp-question-image-upload{-webkit-transform:translate3d(0,0,0);background:#f5f5f5;border:2px dashed #bbb;border-radius:3px;box-shadow:none;color:#666;cursor:pointer;font-size:1.5rem;font-weight:400;letter-spacing:.05em;line-height:1.6;margin-bottom:2rem;padding:.85em 1.4em .75em;position:relative;text-align:center;text-transform:uppercase;transform:translate3d(0,0,0);transition:all .3s cubic-bezier(0,0,.3,1)}#enp-quiz .enp-question-image-upload:focus,#enp-quiz .enp-question-image-upload:hover{background:#222a30;box-shadow:none;color:#fff}#enp-quiz .enp-question-image-upload:active{background:#5d7384;box-shadow:inset 0 2px 0 rgba(0,0,0,.1);color:#fff}#enp-quiz .enp-question-image-upload:focus{outline-color:#4d90fe;outline-offset:-2px;outline-style:auto;outline-width:5px}#enp-quiz .enp-question-image-upload:disabled,#enp-quiz .enp-question-image-upload:disabled:focus,#enp-quiz .enp-question-image-upload:disabled:hover{background:#333f48;cursor:default;opacity:.5}#enp-quiz .enp-question-image-upload:focus,#enp-quiz .enp-question-image-upload:hover{background:hsla(0,0%,100%,.9);border:2px dashed #999;color:#444}#enp-quiz .enp-question-image-upload .enp-question-image-upload__icon--photo{-webkit-transform:translate3d(0,0,0);height:2.8rem;left:0;margin:0 auto;opacity:0;position:absolute;right:0;top:0;transform:translate3d(0,0,0);transition:opacity .2s,transform .3s cubic-bezier(0,0,.3,1),-webkit-transform .3s cubic-bezier(0,0,.3,1);width:2.8rem;z-index:-1}#enp-quiz .enp-question-image-upload .enp-question-image-upload__icon--add{background:#666;border-radius:50%;fill:#f5f5f5;height:1rem;margin-right:5px;padding:.02rem;position:relative;top:.2rem;width:1rem}#enp-quiz .enp-question-image-upload:active,#enp-quiz .enp-question-image-upload:focus,#enp-quiz .enp-question-image-upload:hover{padding-bottom:2rem;padding-top:5rem}#enp-quiz .enp-question-image-upload:active .enp-question-image-upload__icon--photo,#enp-quiz .enp-question-image-upload:focus .enp-question-image-upload__icon--photo,#enp-quiz .enp-question-image-upload:hover .enp-question-image-upload__icon--photo{-webkit-transform:translate3d(0,1.75rem,0);opacity:1;transform:translate3d(0,1.75rem,0);z-index:1}#enp-quiz .enp-question-image-upload:active .enp-question-image-upload__icon--add,#enp-quiz .enp-question-image-upload:focus .enp-question-image-upload__icon--add,#enp-quiz .enp-question-image-upload:hover .enp-question-image-upload__icon--add{background:#444;fill:#fff}#enp-quiz .enp-question-image__container{margin-bottom:1rem;position:relative}#enp-quiz .enp-question-image{margin-bottom:1.2rem}#enp-quiz .enp-question-type__legend{border:0;color:#5e5e5e;display:block;font-size:.85rem;font-weight:400;margin-bottom:.2rem;padding-top:1.6rem;text-transform:uppercase}#enp-quiz .enp-question-type__input{clip:rect(1px,1px,1px,1px);height:1px;left:-625pc;overflow:hidden;position:absolute!important;top:auto;width:1px}#enp-quiz .enp-question-type__label{border-radius:3px;cursor:pointer;display:inline-block;padding:.2rem .5rem;text-transform:capitalize}#enp-quiz .enp-question-type__input:checked+.enp-question-type__label{background:#3bb275;color:#fff;text-shadow:0 0 1px rgba(0,0,0,.7)}#enp-quiz .enp-question-type__input:focus+.enp-question-type__label{outline-color:#4d90fe;outline-offset:-2px;outline-style:auto;outline-width:5px;z-index:8}#enp-quiz .enp-question-type__label{position:relative;z-index:9}#enp-quiz .enp-mc-options,#enp-quiz .enp-slider-options{-webkit-animation:slideOutTop .25s cubic-bezier(0,0,.3,1) forwards;-webkit-animation-delay:0s,.05s;animation:slideOutTop .25s cubic-bezier(0,0,.3,1) forwards;animation-delay:0s,.05s;display:none;margin-top:0}#enp-quiz .enp-question-type__input--mc:checked~.enp-mc-options,#enp-quiz .enp-question-type__input--slider:checked~.enp-slider-options{-webkit-animation:fadeIn .45s cubic-bezier(0,0,.3,1) forwards;animation:fadeIn .45s cubic-bezier(0,0,.3,1) forwards;display:block;visibility:visible}#enp-quiz .enp-mc-options__list{list-style:none;margin-left:0}#enp-quiz .enp-mc-option{padding-left:6px;position:relative}@media(min-width:700px){#enp-quiz .enp-mc-option{padding-left:0}}#enp-quiz .enp-mc-options__legend{color:#5e5e5e;display:block;font-size:.85rem;font-weight:500;text-transform:uppercase}#enp-quiz .enp-mc-option__add,#enp-quiz .enp-mc-option__button--correct,#enp-quiz .enp-mc-option__button--delete{display:none}#enp-quiz .enp-question-type__input--mc:checked~.enp-mc-options .enp-mc-option__add,#enp-quiz .enp-question-type__input--mc:checked~.enp-mc-options .enp-mc-option__button--correct,#enp-quiz .enp-question-type__input--mc:checked~.enp-mc-options .enp-mc-option__button--delete{display:block}#enp-quiz .enp-button__question-image-delete,#enp-quiz .enp-mc-option__button--delete{background:0;border:0;box-shadow:none;cursor:pointer;fill:#bbb;margin:0;padding:0;position:absolute;right:-24px;top:9px}@media(min-width:700px){#enp-quiz .enp-button__question-image-delete,#enp-quiz .enp-mc-option__button--delete{right:-30px}}#enp-quiz .enp-button__question-image-delete:focus,#enp-quiz .enp-button__question-image-delete:hover,#enp-quiz .enp-mc-option__button--delete:focus,#enp-quiz .enp-mc-option__button--delete:hover{fill:#bf5700}#enp-quiz .enp-mc-option__button--correct{background:0;border:0;box-shadow:none;left:-24px;margin:0;padding:0;position:absolute;top:8px}@media(min-width:700px){#enp-quiz .enp-mc-option__button--correct{left:-35px}}#enp-quiz .enp-mc-option__button--correct .enp-mc-option__icon--correct{background:#fff;border:2px solid #e97763;border-radius:50%;cursor:pointer;fill:#fff;height:28px;padding:.05em;transition:all .2s;width:28px}@media(min-width:700px){#enp-quiz .enp-mc-option__button--correct .enp-mc-option__icon--correct{padding:.15em}}#enp-quiz .enp-mc-option__button--correct:focus .enp-mc-option__icon--correct,#enp-quiz .enp-mc-option__button--correct:hover .enp-mc-option__icon--correct{background:#fff;border-color:#3bb275;fill:#3bb275}#enp-quiz .enp-mc-option__button--correct:disabled{opacity:1}#enp-quiz .enp-mc-option__button--correct:disabled .enp-mc-option__icon--correct{border:2px solid transparent;cursor:default;fill:#fff}#enp-quiz .enp-mc-option--correct .enp-mc-option__input{border:1px solid #3bb275;box-shadow:inset 0 0 3px #3bb275}#enp-quiz .enp-mc-option--correct .enp-mc-option__button--correct:focus .enp-mc-option__icon--correct,#enp-quiz .enp-mc-option--correct .enp-mc-option__button--correct:hover .enp-mc-option__icon--correct,#enp-quiz .enp-mc-option--correct .enp-mc-option__icon--correct{background:#3bb275;border-color:#3bb275;fill:#fff}#enp-quiz .enp-mc-option__add{background:#f5f5f5;border:2px dashed #bbb;border-radius:3px;box-shadow:none;color:#666;cursor:pointer;font-size:1.5rem;font-weight:400;letter-spacing:.05em;line-height:1.6;padding:.7rem .75rem .8rem;text-align:left;text-transform:uppercase;transition:all .2s}#enp-quiz .enp-mc-option__add:focus,#enp-quiz .enp-mc-option__add:hover{background:#222a30;box-shadow:none;color:#fff}#enp-quiz .enp-mc-option__add:active{background:#5d7384;box-shadow:inset 0 2px 0 rgba(0,0,0,.1);color:#fff}#enp-quiz .enp-mc-option__add:focus{outline-color:#4d90fe;outline-offset:-2px;outline-style:auto;outline-width:5px}#enp-quiz .enp-mc-option__add:disabled,#enp-quiz .enp-mc-option__add:disabled:focus,#enp-quiz .enp-mc-option__add:disabled:hover{background:#333f48;cursor:default;opacity:.5}#enp-quiz .enp-mc-option__add:focus,#enp-quiz .enp-mc-option__add:hover{background:hsla(0,0%,100%,.9);border:2px dashed #999;color:#444}#enp-quiz .enp-mc-option__add .enp-mc-option__add__icon{background:#666;border-radius:50%;fill:#f5f5f5;height:1rem;margin-right:5px;padding:.02rem;position:relative;top:.2rem;width:1rem}#enp-quiz .enp-mc-option__add:hover .enp-mc-option__add__icon{background:#444;fill:#fff}#enp-quiz .enp-slider-options .enp-input{max-width:11.8rem}#enp-quiz .enp-slider-correct__container .enp-input,#enp-quiz .enp-slider-range__container .enp-input{max-width:8.8rem}@media(min-width:25pc){#enp-quiz .enp-slider-correct__container .enp-input,#enp-quiz .enp-slider-range__container .enp-input{max-width:11.8rem}}#enp-quiz .enp-slider-preview{border:1px solid #ddd;margin-bottom:1.6rem;margin-top:.2rem;padding:1.6rem 1.6rem .6rem;position:relative}#enp-quiz .enp-slider-preview .enp-label--slider-preview{font-size:.75rem;left:.4rem;position:absolute;text-transform:uppercase;top:.2rem;width:100%}#enp-quiz .enp-slider-correct__container,#enp-quiz .enp-slider-range__container{align-items:center;display:flex;justify-content:space-between}#enp-quiz .enp-slider-correct__helper,#enp-quiz .enp-slider-range__helper{background:#fff;color:#777;font-size:.85rem;padding:0 .3rem;position:relative}#enp-quiz .enp-slider-correct__helper:before,#enp-quiz .enp-slider-range__helper:before{background:#ddd;content:"";height:4px;left:-60px;position:absolute;top:44%;transition:width .7s cubic-bezier(0,0,.3,1),background 1.6s cubic-bezier(0,0,.3,1);width:90pt;z-index:-1}#enp-quiz .enp-slider-options{margin-bottom:2rem}#enp-quiz .enp-slider-options .enp-accordion-header{font-size:.85rem;padding:.675rem;text-transform:uppercase}#enp-quiz .enp-slider-options .enp-slider-advanced-options__content{border:0;box-shadow:none;margin-bottom:0;padding-bottom:0;padding-top:1rem}#enp-quiz .enp-slider-correct-high__container{position:relative}#enp-quiz .enp-slider-correct-high__input-container--hidden{display:none}#enp-quiz .enp-slider-correct__helper--hidden:before{background:#3bb275;width:0}#enp-quiz .enp-slider-correct-answer-range--add-range{background:#f5f5f5;border:2px dashed #bbb;border-radius:3px;box-shadow:none;color:#666;cursor:pointer;font-size:.7rem;font-weight:400;letter-spacing:.05em;line-height:1.6;margin-left:.8rem;padding:.85em 1.4em .75em;text-align:center;text-transform:uppercase;transition:all .2s}#enp-quiz .enp-slider-correct-answer-range--add-range:focus,#enp-quiz .enp-slider-correct-answer-range--add-range:hover{background:#222a30;box-shadow:none;color:#fff}#enp-quiz .enp-slider-correct-answer-range--add-range:active{background:#5d7384;box-shadow:inset 0 2px 0 rgba(0,0,0,.1);color:#fff}#enp-quiz .enp-slider-correct-answer-range--add-range:focus{outline-color:#4d90fe;outline-offset:-2px;outline-style:auto;outline-width:5px}#enp-quiz .enp-slider-correct-answer-range--add-range:disabled,#enp-quiz .enp-slider-correct-answer-range--add-range:disabled:focus,#enp-quiz .enp-slider-correct-answer-range--add-range:disabled:hover{background:#333f48;cursor:default;opacity:.5}#enp-quiz .enp-slider-correct-answer-range--add-range:focus,#enp-quiz .enp-slider-correct-answer-range--add-range:hover{background:hsla(0,0%,100%,.9);border:2px dashed #999;color:#444}@media(min-width:25pc){#enp-quiz .enp-slider-correct-answer-range--add-range{font-size:.8rem;padding:.7rem}}@media(min-width:700px){#enp-quiz .enp-slider-correct-answer-range--add-range{min-width:11.4rem;padding:.7rem 1.2rem}}#enp-quiz .enp-slider-correct-answer-range--add-range .enp-slider-correct-answer-range__icon{background:#666;border-radius:50%;fill:#f5f5f5;height:1rem;left:-.2rem;margin-right:5px;padding:.02rem;position:relative;width:1rem}#enp-quiz .enp-slider-correct-answer-range--add-range:hover .enp-slider-correct-answer-range__icon{background:#444;fill:#fff}#enp-quiz .enp-slider-correct-answer-range--remove-range{background:0;border:0;bottom:1.6rem;box-shadow:none;padding:0 .1rem;position:absolute;right:-1.6rem}#enp-quiz .enp-slider-correct-answer-range--remove-range .enp-slider-correct-answer-range__icon{fill:#666;height:1.2em;width:1.2em}#enp-quiz .enp-slider-correct-answer-range--remove-range:focus .enp-slider-correct-answer-range__icon,#enp-quiz .enp-slider-correct-answer-range--remove-range:hover .enp-slider-correct-answer-range__icon{fill:#bf5700}@media(min-width:700px){#enp-quiz .enp-slider-correct-answer-range--remove-range{bottom:auto;right:-.2rem;top:-.2rem}}#enp-quiz .enp-slider-options .enp-input:-moz-read-only,#enp-quiz .enp-slider-options .enp-input:read-only{background:#f5f5f5}#enp-quiz .enp-answer-explanation{background:#eaf4ff;box-shadow:inset 1px 0 0 #ccc,inset -1px -1px 0 #ccc,inset 0 1px 0 #ddd;padding-top:2rem}#enp-quiz .enp-answer-explanation__label{color:#5e5e5e;display:block;font-size:.85rem;font-weight:500;text-transform:uppercase}#enp-quiz .enp-question__button--delete{background:0;border:0;box-shadow:none;cursor:pointer;fill:#bbb;margin:0;padding:0;position:absolute;right:9px;top:9px}@media(min-width:700px){#enp-quiz .enp-question__button--delete{right:-30px}}#enp-quiz .enp-question__button--delete:hover{fill:#bf5700}#enp-quiz .enp-question__move{left:15px;position:absolute}@media(min-width:700px){#enp-quiz .enp-question__move{left:-40px}}#enp-quiz .enp-sort__placeholder{background:#ddd;height:60px;margin-bottom:1.6rem;max-height:90pt;width:100%}#enp-quiz .ui-sortable .ui-sortable-helper .ui-sortable-handle{cursor:-webkit-grabbing}#enp-quiz .enp-question__button--move{background:0;border:0;box-shadow:none;cursor:pointer;fill:#bbb;margin:0;padding:0;position:absolute}#enp-quiz .enp-question__button--move:focus,#enp-quiz .enp-question__button--move:hover{fill:#333}#enp-quiz .enp-question__button--move:disabled{opacity:.5}#enp-quiz .enp-question__button--move--up{left:-9px;top:0}#enp-quiz .enp-question__button--move--down{right:-9px;top:3px}#enp-quiz .enp-quiz-form__add-question{background:0;border:3px dashed #666;border-radius:3px;box-shadow:none;color:#545454;cursor:pointer;font-size:15px;font-weight:400;letter-spacing:.05em;line-height:1.6;margin-bottom:2rem;margin-top:1.6rem;padding:1rem 1.4em;text-align:center;text-transform:uppercase;transition:all .2s}#enp-quiz .enp-quiz-form__add-question:focus,#enp-quiz .enp-quiz-form__add-question:hover{background:#222a30;box-shadow:none;color:#fff}#enp-quiz .enp-quiz-form__add-question:active{box-shadow:inset 0 2px 0 rgba(0,0,0,.1);color:#fff}#enp-quiz .enp-quiz-form__add-question:focus{outline-color:#4d90fe;outline-offset:-2px;outline-style:auto;outline-width:5px}#enp-quiz .enp-quiz-form__add-question:disabled,#enp-quiz .enp-quiz-form__add-question:disabled:focus,#enp-quiz .enp-quiz-form__add-question:disabled:hover{background:#333f48;cursor:default;opacity:.5}#enp-quiz .enp-quiz-form__add-question:focus,#enp-quiz .enp-quiz-form__add-question:hover{background:#222a30;box-shadow:none;color:#fff}#enp-quiz .enp-quiz-form__add-question:active{background:#5d7384;box-shadow:inset 0 2px 0 rgba(0,0,0,.1);color:#fff}#enp-quiz .enp-quiz-form__add-question:focus{outline-color:#4d90fe;outline-offset:-2px;outline-style:auto;outline-width:5px}#enp-quiz .enp-quiz-form__add-question:disabled,#enp-quiz .enp-quiz-form__add-question:disabled:focus,#enp-quiz .enp-quiz-form__add-question:disabled:hover{background:#333f48;cursor:default;opacity:.5}#enp-quiz .enp-quiz-form__add-question:focus,#enp-quiz .enp-quiz-form__add-question:hover{background:hsla(0,0%,100%,.9);border:3px dashed #444;color:#444}#enp-quiz .enp-quiz-form__add-question .enp-add-question__icon{background:#666;border-radius:50%;fill:#f5f5f5;height:1.2rem;margin-right:5px;padding:.02rem;position:relative;top:.2rem;width:1.2rem}#enp-quiz .enp-quiz-form__add-question:hover .enp-add-question__icon{background:#444;fill:#fff}#enp-quiz .enp-quiz-form__save{background:#333f48;border:0;border-radius:3px;box-shadow:inset 0 -2px 0 rgba(0,0,0,.2);color:#fff;cursor:pointer;font-size:15px;font-weight:400;letter-spacing:.05em;line-height:1.6;margin-bottom:1rem;opacity:.8;padding:.85em 1.4em .75em;text-align:center;text-shadow:0 -1px 2px rgba(0,0,0,.6);text-transform:uppercase;transition:all .2s;width:100%}#enp-quiz .enp-quiz-form__save:focus,#enp-quiz .enp-quiz-form__save:hover{background:#222a30;box-shadow:none;color:#fff}#enp-quiz .enp-quiz-form__save:active{background:#5d7384;box-shadow:inset 0 2px 0 rgba(0,0,0,.1);color:#fff}#enp-quiz .enp-quiz-form__save:focus{outline-color:#4d90fe;outline-offset:-2px;outline-style:auto;outline-width:5px}#enp-quiz .enp-quiz-form__save:disabled,#enp-quiz .enp-quiz-form__save:disabled:focus,#enp-quiz .enp-quiz-form__save:disabled:hover{background:#333f48;cursor:default;opacity:.5}#enp-quiz .enp-quiz-form__save:focus,#enp-quiz .enp-quiz-form__save:hover{opacity:1}@media(min-width:25pc){#enp-quiz .enp-quiz-form__save{margin-right:3%;margin-top:1.6rem;padding:1.2rem 1.8rem 1.1rem;position:relative;top:-2px;width:27%}}#enp-quiz .enp-quiz-form__save--reveal{-webkit-animation:slideInTop--reduced-opacity .3s cubic-bezier(0,0,.3,1);animation:slideInTop--reduced-opacity .3s cubic-bezier(0,0,.3,1)}#enp-quiz .enp-btn--next-step{background:#333f48;border:0;border-radius:3px;box-shadow:inset 0 -2px 0 rgba(0,0,0,.2);color:#fff;cursor:pointer;font-size:15px;font-weight:400;letter-spacing:.05em;line-height:1.6;text-align:center;text-transform:uppercase;transition:all .2s}#enp-quiz .enp-btn--next-step:focus,#enp-quiz .enp-btn--next-step:hover{background:#222a30;box-shadow:none;color:#fff}#enp-quiz .enp-btn--next-step:active{background:#5d7384;box-shadow:inset 0 2px 0 rgba(0,0,0,.1);color:#fff}#enp-quiz .enp-btn--next-step:focus{outline-color:#4d90fe;outline-offset:-2px;outline-style:auto;outline-width:5px}#enp-quiz .enp-btn--next-step:disabled,#enp-quiz .enp-btn--next-step:disabled:focus,#enp-quiz .enp-btn--next-step:disabled:hover{background:#333f48;cursor:default;opacity:.5}#enp-quiz .enp-btn--next-step__icon{background:#fff;border-radius:50%;fill:#333f48;height:1.2rem;margin-left:.5em;position:relative;top:.15rem;width:1.2rem}#enp-quiz .enp-btn--next-step__icon:hover{background:#fff;fill:#222a30}#enp-quiz .enp-btn--next-step{padding:1rem 1.4rem;width:100%}@media(min-width:25pc){#enp-quiz .enp-btn--next-step{width:68%}}#enp-quiz .enp-btn--next-step--reveal{-webkit-animation:slideInTop .3s cubic-bezier(0,0,.3,1);animation:slideInTop .3s cubic-bezier(0,0,.3,1)}#enp-quiz .enp-accordion-header--inserting,#enp-quiz .enp-mc-option--inputs{-webkit-animation:slideInBottom .4s cubic-bezier(0,0,.3,1) forwards;animation:slideInBottom .4s cubic-bezier(0,0,.3,1) forwards}#enp-quiz .enp-mc-option--remove,#enp-quiz .enp-question--remove,#enp-quiz .enp-question__image--remove{-webkit-animation:removeElement .5s cubic-bezier(0,0,.3,1) forwards;animation:removeElement .5s cubic-bezier(0,0,.3,1) forwards}#enp-quiz .enp-image-upload-wait{background:#f5f5f5;border:2px dashed #bbb;border-radius:3px;box-shadow:none;color:#666;cursor:pointer;font-size:15px;font-weight:400;letter-spacing:.05em;line-height:1.6;margin-bottom:1rem;padding:4rem 1.4em;text-align:center;text-transform:uppercase;transition:all .2s;width:100%}#enp-quiz .enp-image-upload-wait:focus,#enp-quiz .enp-image-upload-wait:hover{background:#222a30;box-shadow:none;color:#fff}#enp-quiz .enp-image-upload-wait:active{background:#5d7384;box-shadow:inset 0 2px 0 rgba(0,0,0,.1);color:#fff}#enp-quiz .enp-image-upload-wait:focus{outline-color:#4d90fe;outline-offset:-2px;outline-style:auto;outline-width:5px}#enp-quiz .enp-image-upload-wait:disabled,#enp-quiz .enp-image-upload-wait:disabled:focus,#enp-quiz .enp-image-upload-wait:disabled:hover{background:#333f48;cursor:default;opacity:.5}#enp-quiz .enp-image-upload-wait:focus,#enp-quiz .enp-image-upload-wait:hover{background:hsla(0,0%,100%,.9);border:2px dashed #999;color:#444}#enp-quiz .enp-accordion-header.question-has-error{box-shadow:0 0 3px #bf5700;color:#bf5700}.enp-quiz.ui-sortable--sorting #enp-quiz .enp-accordion-content{display:none}@media(min-width:750pt){#enp-quiz .enp-quiz-settings-container{float:left;margin:0;width:40%}#enp-quiz .enp-quiz-preview-container{float:left;width:60%}}#enp-quiz .enp-quiz-settings__title,#enp-quiz .enp-quiz-share__legend{font-size:1.5rem;font-weight:600;padding-top:0;position:relative;text-transform:uppercase}#enp-quiz .enp-quiz-settings__form{margin-bottom:3rem}@media(min-width:750pt){#enp-quiz .enp-quiz-settings__form{margin-bottom:0;padding:0}}@media(min-width:700px){#enp-quiz .enp-fieldset{position:relative}}@media(min-width:700px){#enp-quiz .enp-title-display__legend{padding-top:.4rem}}#enp-quiz .enp-quiz-share__input,#enp-quiz .enp-quiz-styles__input{width:100%}#enp-quiz .enp-quiz-styles__textarea--custom-css{font-family:Monaco,Consolas,Andale Mono,DejaVu Sans Mono,monospace;font-size:.9rem;min-height:200px}#enp-quiz .enp-fieldset--section{padding:1.6rem 1rem}#enp-quiz .enp-fieldset--section.enp-accordion-content--open{margin-bottom:0}#enp-quiz .enp-quiz-share--facebook{margin-bottom:2rem}#enp-quiz .enp-title-display__legend{border:0;color:#5e5e5e;display:block;font-size:.85rem;font-weight:400;margin-bottom:.2rem;padding-top:1.6rem;text-transform:uppercase}#enp-quiz .enp-title-display__input{clip:rect(1px,1px,1px,1px);height:1px;left:-625pc;overflow:hidden;position:absolute!important;top:auto;width:1px}#enp-quiz .enp-title-display__label{border-radius:3px;cursor:pointer;display:inline-block;padding:.2rem .5rem;text-transform:capitalize}#enp-quiz .enp-title-display__input:checked+.enp-title-display__label{background:#3bb275;color:#fff;text-shadow:0 0 1px rgba(0,0,0,.7)}#enp-quiz .enp-title-display__input:focus+.enp-title-display__label{outline-color:#4d90fe;outline-offset:-2px;outline-style:auto;outline-width:5px;z-index:8}#enp-quiz .enp-mc-options-order__legend{border:0;color:#5e5e5e;display:block;font-size:.85rem;font-weight:400;margin-bottom:.2rem;padding-top:1.6rem;text-transform:uppercase}#enp-quiz .enp-mc-options-order__input{clip:rect(1px,1px,1px,1px);height:1px;left:-625pc;overflow:hidden;position:absolute!important;top:auto;width:1px}#enp-quiz .enp-mc-options-order__label{border-radius:3px;cursor:pointer;display:inline-block;padding:.2rem .5rem;text-transform:capitalize}#enp-quiz .enp-mc-options-order__input:checked+.enp-mc-options-order__label{background:#3bb275;color:#fff;text-shadow:0 0 1px rgba(0,0,0,.7)}#enp-quiz .enp-mc-options-order__input:focus+.enp-mc-options-order__label{outline-color:#4d90fe;outline-offset:-2px;outline-style:auto;outline-width:5px;z-index:8}#enp-quiz .enp-mc-options-order{margin-bottom:1.6rem}#enp-quiz .enp-quiz-share__textarea{margin-bottom:2rem;min-height:7.6rem}@media(min-width:700px){#enp-quiz .enp-quiz-share__textarea{min-height:4.6rem}}@media(min-width:750pt){#enp-quiz .enp-quiz-share__textarea{min-height:7.6rem}}#enp-quiz .enp-preview-form__submit{margin-top:1.6rem}#enp-quiz .enp-quiz-preview__title{font-size:1.5rem;font-weight:600;text-transform:uppercase}#enp-quiz .enp-preview-form__submit{background:#333f48;border:0;border-radius:3px;box-shadow:inset 0 -2px 0 rgba(0,0,0,.2);color:#fff;cursor:pointer;font-size:15px;font-weight:400;letter-spacing:.05em;line-height:1.6;margin-bottom:1rem;opacity:.8;padding:.85rem 1.4em;text-align:center;text-shadow:0 -1px 2px rgba(0,0,0,.6);text-transform:uppercase;transition:all .2s;width:100%}#enp-quiz .enp-preview-form__submit:focus,#enp-quiz .enp-preview-form__submit:hover{background:#222a30;box-shadow:none;color:#fff}#enp-quiz .enp-preview-form__submit:active{background:#5d7384;box-shadow:inset 0 2px 0 rgba(0,0,0,.1);color:#fff}#enp-quiz .enp-preview-form__submit:focus{outline-color:#4d90fe;outline-offset:-2px;outline-style:auto;outline-width:5px}#enp-quiz .enp-preview-form__submit:disabled,#enp-quiz .enp-preview-form__submit:disabled:focus,#enp-quiz .enp-preview-form__submit:disabled:hover{background:#333f48;cursor:default;opacity:.5}#enp-quiz .enp-preview-form__submit:focus,#enp-quiz .enp-preview-form__submit:hover{opacity:1}#enp-quiz .enp-preview-form__submit--publish{padding:1.05rem 1.8rem .95rem;position:relative;width:100%;z-index:99999999}#enp-quiz .enp-quiz-styles__iris-wrapper{position:relative}#enp-quiz .iris-picker{box-sizing:content-box;margin-bottom:1rem;padding-bottom:3rem;padding-right:30px;position:relative;top:-1.2rem;z-index:9999999999}@media(min-width:750pt){#enp-quiz .iris-picker{left:104%;position:absolute;top:-4px}}#enp-quiz .iris-picker:last-of-type{margin-bottom:0}#enp-quiz .iris-picker .ui-draggable-handle:focus .ui-slider-handle,#enp-quiz .iris-picker .ui-slider-handle:focus{box-shadow:0 0 3px rgba(0,0,0,.75)}#enp-quiz .enp-quiz-styles__set-default{background:transparent;border:2px solid #333f48;border-radius:3px;bottom:10px;box-shadow:none;color:#333f48;cursor:pointer;font-size:.75rem;font-weight:400;left:10px;letter-spacing:.05em;line-height:1.6;padding:.85em 1.4em .75em;position:absolute;text-align:center;text-transform:uppercase;transition:all .2s}#enp-quiz .enp-quiz-styles__set-default:focus,#enp-quiz .enp-quiz-styles__set-default:hover{background:#222a30;box-shadow:none;color:#fff}#enp-quiz .enp-quiz-styles__set-default:active{background:#5d7384;box-shadow:inset 0 2px 0 rgba(0,0,0,.1);color:#fff}#enp-quiz .enp-quiz-styles__set-default:focus{outline-color:#4d90fe;outline-offset:-2px;outline-style:auto;outline-width:5px}#enp-quiz .enp-quiz-styles__set-default:disabled,#enp-quiz .enp-quiz-styles__set-default:disabled:focus,#enp-quiz .enp-quiz-styles__set-default:disabled:hover{background:#333f48;cursor:default;opacity:.5}#enp-quiz .enp-quiz-styles__set-default:focus,#enp-quiz .enp-quiz-styles__set-default:hover{background:transparent;border:2px solid #222a30;color:#222a30}#enp-quiz .enp-iris__close{background:0;border:0;box-shadow:none;cursor:pointer;fill:#888;margin:0;padding:0;position:absolute;right:5px;top:5px}#enp-quiz .enp-quiz-styles__input--color{padding-left:45px}#enp-quiz .enp-quiz-styles__color-demo{border:1px solid #ccc;border-radius:3px;height:30px;left:8px;position:absolute;top:8px;width:30px}#enp-quiz .enp-share-quiz__url{display:block;font-size:1.5rem;line-height:1.4;word-wrap:break-word}#enp-quiz .enp-share-quiz{align-content:center;align-items:center;display:flex;list-style:none;margin-left:0}#enp-quiz .enp-share-quiz__item{margin-right:20px}#enp-quiz .enp-share-quiz__item:last-child{margin-right:0}#enp-quiz .enp-share-quiz__item__icon{background:#333f48;border-radius:50%;fill:#fff!important;height:2.4rem;padding:.6rem;width:2.4rem}#enp-quiz .enp-share-quiz__item__icon--facebook{background-color:#3a5795}#enp-quiz .enp-share-quiz__item__icon--twitter{background-color:#4099ff}#enp-quiz .enp-share-quiz{justify-content:space-around;margin-bottom:0}#enp-quiz .enp-ab-create__container{background:#f8f8f8;margin-left:auto;margin-right:auto;max-width:40pc;padding:3rem 20px;width:100%}#enp-quiz .enp-ab-create__container:after{clear:both;content:"";display:table}@media(min-width:700px){#enp-quiz .enp-ab-create__container{max-width:840px}}@media(min-width:750pt){#enp-quiz .enp-ab-create__container{max-width:750pt}}#enp-quiz .enp-ab-create__form{margin-left:auto;margin-right:auto;max-width:32pc;padding-left:20px;padding-right:20px}#enp-quiz .enp-ab-create__form:after{clear:both;content:"";display:table}#enp-quiz .enp-ab-create__label{color:#5e5e5e;display:block;font-size:.85rem;font-weight:500;text-transform:uppercase}#enp-quiz .enp-ab-create-title__textarea{background:#fff;border:1px solid #aaa;border-radius:3px;font-family:tablet-gothic,helvetica neue,helvetica,arial,sans-serif;font-size:1.6rem;font-weight:700;margin-bottom:1rem;max-width:100%;padding:.8rem .5rem;width:100%}@media(min-width:700px){#enp-quiz .enp-ab-create-title__textarea{padding:.8rem}}#enp-quiz .enp-ab-create-title__textarea:-ms-input-placeholder,#enp-quiz .enp-ab-create-title__textarea::-ms-input-placeholder,#enp-quiz .enp-ab-create-title__textarea::-webkit-input-placeholder,#enp-quiz .enp-ab-create-title__textarea::placeholder{font-weight:700}#enp-quiz .enp-ab-create__select{-moz-appearance:none;-webkit-appearance:none;appearance:none;background:url(../svg/chevron-down.svg) 100% 50% no-repeat;background-color:#fff;border:1px solid #bbb;border-radius:3px;box-shadow:inset -26px 0 0 rgba(0,0,0,.1);font-size:.85rem;margin-bottom:1.6rem;padding:.7rem 2pc .7rem .8rem;width:100%}#enp-quiz .enp-ab-create__submit{padding-bottom:1em;padding-top:1em;width:100%}#enp-quiz.enp-quiz__main{background:#f8f8f8}#enp-quiz .enp-dash-container{margin-left:auto;margin-right:auto;max-width:40pc;padding:2rem 20px;transition:all .25s cubic-bezier(0,0,.3,1)}#enp-quiz .enp-dash-container:after{clear:both;content:"";display:table}@media(min-width:700px){#enp-quiz .enp-dash-container{max-width:840px}}@media(min-width:750pt){#enp-quiz .enp-dash-container{max-width:750pt}}#enp-quiz .enp-dash__section-header{display:block;margin-bottom:.325rem}@media(min-width:700px){#enp-quiz .enp-dash__section-header{align-content:flex-end;align-items:flex-end;display:flex;justify-content:space-between}}#enp-quiz .enp-search-quizzes{display:block}@media(min-width:25pc){#enp-quiz .enp-search-quizzes{align-content:flex-end;align-items:flex-end;display:flex}}#enp-quiz .enp-search-quizzes__form-item{display:block;margin-bottom:.6rem}@media(min-width:25pc){#enp-quiz .enp-search-quizzes__form-item{margin-bottom:0;margin-right:1rem}#enp-quiz .enp-search-quizzes__form-item:last-of-type{margin-right:0}}#enp-quiz .enp-quiz-search{position:relative}#enp-quiz .enp-search-quizzes__label{clip:rect(1px,1px,1px,1px);height:1px;left:-625pc;margin-bottom:0;overflow:hidden;position:absolute!important;top:auto;width:1px}#enp-quiz .enp-search-quizzes__select{padding:.3rem}#enp-quiz .enp-quiz-search__input{font-size:.85rem;margin:0 0 .1rem;max-width:10pc;padding:.3rem .3rem .3rem 26px}#enp-quiz .enp-quiz-search__icon{bottom:.3rem;height:21px;left:.2rem;position:absolute;width:21px}#enp-quiz .enp-search-quizzes__button{padding:.2rem .8rem}#enp-quiz .enp-search-results-description{font-size:.85rem}#enp-quiz .enp-search-results-description__link{white-space:nowrap}#enp-quiz .enp-search-results-description__icon{height:1.3em;left:2px;position:relative;top:4px;width:1.3em}#enp-quiz .enp-dash__section-title{font-size:1.5rem;margin-bottom:.325rem;text-transform:uppercase}#enp-quiz .enp-view-toggle{cursor:pointer;display:none;opacity:.5}@media(min-width:700px){#enp-quiz .enp-view-toggle{display:flex}}#enp-quiz .enp-view-toggle__active{opacity:1}#enp-quiz .enp-sort-by{margin-left:5px}#enp-quiz .enp-dash-list{align-items:stretch;display:flex;flex-flow:row wrap;list-style:none;margin-left:0}#enp-quiz .enp-dash-item{align-content:flex-end;background:#fff;border:0;border-radius:3px;display:flex;flex-basis:100%;flex-direction:column;justify-content:flex-end;list-style:none;margin:0 0 .8rem;padding:1rem 1.2rem;transition:all .35s cubic-bezier(0,0,.3,1)}@media(min-width:700px){#enp-quiz .enp-dash-item{flex-basis:49%;margin:0 2% .8rem 0;max-width:49%}#enp-quiz .enp-dash-item:nth-child(2n){margin-right:0}}@media(min-width:750pt){#enp-quiz .enp-dash-item{flex-basis:32.5%;margin-right:1.25%;max-width:32.5%}#enp-quiz .enp-dash-item:nth-child(2n){margin-right:1.25%}#enp-quiz .enp-dash-item:nth-child(3n){margin-right:0}}#enp-quiz .enp-dash-item--published{box-shadow:inset 4px 0 0 #333f48,0 1px 0 rgba(0,0,0,.1)}#enp-quiz .enp-dash-item--draft{box-shadow:inset 4px 0 0 #a3b2be,0 1px 0 rgba(0,0,0,.1)}#enp-quiz .enp-dash-item--remove{-webkit-animation:removeElement .5s cubic-bezier(0,0,.3,1) forwards;animation:removeElement .5s cubic-bezier(0,0,.3,1) forwards}#enp-quiz .enp-dash-list--list-view .enp-dash-item{flex-basis:100%;margin:0 0 .8rem}#enp-quiz .enp-dash-item__spinner{-webkit-animation:fadeIn .3s cubic-bezier(0,0,.3,1);align-content:center;align-items:center;animation:fadeIn .3s cubic-bezier(0,0,.3,1);background:hsla(0,59%,90%,.8);bottom:0;display:flex;justify-content:center;left:0;position:absolute;right:0;top:0;width:100%;z-index:999}#enp-quiz .enp-dash-item__header{background:#fff;border-bottom:1px solid #ddd;position:relative;z-index:99}#enp-quiz .enp-dash-item__title{font-size:1rem;padding:0 24px .375rem 0}#enp-quiz .enp-dash-item__content{padding:0 0 .375rem;position:relative;transition:all .2s cubic-bezier(0,0,.3,1)}#enp-quiz .enp-dash-item__meta{color:#565656;font-size:.75rem;font-weight:300}#enp-quiz .enp-dash-item__username{border-left:1px solid #ddd;margin-left:.2rem;padding-left:.4rem;word-wrap:break-word}#enp-quiz .enp-dash-item__title--ab-test{padding-bottom:0}#enp-quiz .enp-dash-item__ab-quizzes{color:#666;font-size:.85rem;list-style:none;margin-bottom:.8rem;margin-left:0}#enp-quiz .enp-dash-item__nav{font-size:.85rem;list-style:none;margin-bottom:0;margin-left:0}#enp-quiz .enp-dash-item__nav__item{display:inline-block;font-size:.85rem;margin-bottom:0;margin-right:10px;padding-bottom:0}#enp-quiz .enp-dash-item__nav__item a{font-weight:400}#enp-quiz .enp-dash-item__nav__item a:focus{outline:1px dotted #333f48;outline-offset:1px}#enp-quiz .enp-dash-item__nav__item:last-of-type{margin-right:0}#enp-quiz .enp-dash-item__delete{background:0;border:0;box-shadow:none;cursor:pointer;margin:0;padding:0;position:relative;top:4px}#enp-quiz .enp-dash-item__delete__icon{fill:#bbb;height:20px;width:20px}#enp-quiz .enp-dash-item__delete__icon:focus,#enp-quiz .enp-dash-item__delete__icon:hover{fill:#bf5700}#enp-quiz .enp-dash-item__nav--collapsible{-webkit-transform:translate3d(0,0,0);background:#fff;bottom:auto;display:none;margin-top:.2rem;position:absolute;right:auto;top:100%;transform:translate3d(0,0,0);transition:all .2s cubic-bezier(0,0,.3,1)}#enp-quiz .enp-dash-item__nav--collapsible .enp-dash-item__nav__item{padding:0 0 .4rem}#enp-quiz .enp-dash-item__menu-action{background:0;border:0;bottom:.2rem;color:#444;cursor:pointer;height:24px;padding:0;position:absolute;right:0}#enp-quiz .enp-dash-item__menu-action__icon{fill:#444;height:24px;transition:all .3s cubic-bezier(0,0,.3,1);width:24px}#enp-quiz .enp-dash-item__menu-action__icon--bottom{left:0;position:absolute}#enp-quiz .enp-dash-item--menu-active{-webkit-transform:translate3d(0,-3px,0);transform:translate3d(0,-3px,0)}#enp-quiz .enp-dash-item--menu-active.enp-dash-item--published{box-shadow:inset 4px 0 0 #3bb275,0 2px 2px rgba(0,0,0,.2)}#enp-quiz .enp-dash-item--menu-active.enp-dash-item--draft{box-shadow:inset 4px 0 0 #92dbb6,0 2px 2px rgba(0,0,0,.2)}#enp-quiz .enp-dash-item--menu-active .enp-dash-item__menu-action__icon--bottom{-webkit-transform:translatey(-15.5%);transform:translatey(-15.5%)}#enp-quiz .enp-dash-item--menu-active .enp-dash-item__menu-action__icon--top{-webkit-transform:rotatex(-180deg) translatey(0);transform:rotatex(-180deg) translatey(0)}#enp-quiz .enp-dash-item--menu-active .enp-dash-item__nav--collapsible{-webkit-animation:slideInTop .25s cubic-bezier(0,0,.3,1) forwards;animation:slideInTop .25s cubic-bezier(0,0,.3,1) forwards;display:block}#enp-quiz .enp-dash-item--menu-active .enp-dash-item__content{-webkit-transform:translate3d(0,.675rem,0);opacity:.4;transform:translate3d(0,.675rem,0)}#enp-quiz .enp-quiz-results{display:flex;justify-content:space-around;list-style:none;margin:.8rem 0 0;padding:0;text-align:center}#enp-quiz .enp-quiz-results__item{color:#454545;margin:0 2% 0 0;padding:0}@media(max-width:280px){#enp-quiz .enp-quiz-results__item{margin-bottom:.6rem;padding:0;width:100%}}#enp-quiz .enp-quiz-results__number{font-size:1.6rem;line-height:1;position:relative}#enp-quiz .enp-dash-item--draft .enp-quiz-results__number{opacity:.5}#enp-quiz .enp-quiz-results__number--average-score{color:#319461}#enp-quiz .enp-quiz-results__number--average-score:after{content:"%";font-size:.9rem;position:absolute;right:-1rem;top:.3rem}#enp-quiz .enp-quiz-results__label{color:#888;font-size:.7rem;font-weight:300;text-transform:uppercase}#enp-quiz .enp-quiz-list__view{align-content:flex-end;align-items:flex-end;display:flex}#enp-quiz .enp-dash-item--add-new{background:0;border:0;padding:0;position:relative}@media(min-width:700px){#enp-quiz .enp-dash-item--add-new{min-height:7rem}}#enp-quiz .enp-dash-link--add-new{background:0;border:2px dashed #bbb;border-radius:3px;box-shadow:none;color:#333f48;cursor:pointer;font-size:15px;font-weight:400;justify-content:flex-start;letter-spacing:.05em;line-height:1.6;padding:1rem 1.2rem;text-align:center;text-transform:uppercase;transition:all .2s}#enp-quiz .enp-dash-link--add-new:focus,#enp-quiz .enp-dash-link--add-new:hover{background:#222a30;box-shadow:none;color:#fff}#enp-quiz .enp-dash-link--add-new:active{background:#5d7384;box-shadow:inset 0 2px 0 rgba(0,0,0,.1);color:#fff}#enp-quiz .enp-dash-link--add-new:focus{outline-color:#4d90fe;outline-offset:-2px;outline-style:auto;outline-width:5px}#enp-quiz .enp-dash-link--add-new:disabled,#enp-quiz .enp-dash-link--add-new:disabled:focus,#enp-quiz .enp-dash-link--add-new:disabled:hover{background:#333f48;cursor:default;opacity:.5}#enp-quiz .enp-dash-link--add-new:focus,#enp-quiz .enp-dash-link--add-new:hover{background:hsla(0,0%,100%,.9);border:2px dashed #999;color:#444}@media(min-width:700px){#enp-quiz .enp-dash-link--add-new{align-content:center;align-items:center;bottom:0;display:flex;flex-direction:column;font-size:1.5rem;justify-content:center;left:0;position:absolute;right:0;text-transform:uppercase;top:0}}#enp-quiz .enp-dash-link--add-new .enp-dash-link__icon{background:#333f48;border-radius:50%;fill:#fff;height:1.2rem;margin-right:5px;width:1.2rem}@media(min-width:700px){#enp-quiz .enp-dash-link--add-new .enp-dash-link__icon{height:2rem;margin:.8rem 0 .2rem;width:2rem}}#enp-quiz .enp-dash-link--add-new:hover{color:#222a30}#enp-quiz .enp-dash-link--add-new:hover .enp-dash-link__icon{background:#222a30;fill:#fff}#enp-quiz .enp-quiz-message--welcome p{color:#444}#enp-quiz .enp-paginate{align-content:center;align-items:center;display:flex;font-size:1rem;justify-content:center;list-style:none;margin-left:0}#enp-quiz .enp-paginate__link{align-content:center;align-items:center;border-radius:3px;display:flex;font-weight:400;justify-content:center;margin:0 .2rem;padding:0 .4rem}#enp-quiz .enp-paginate__link--current-page{border:2px solid #333f48}#enp-quiz .enp-paginate__item--first-page,#enp-quiz .enp-paginate__item--last-page{display:flex}#enp-quiz .enp-paginate__item--first-page:after,#enp-quiz .enp-paginate__item--last-page:before{bottom:.2rem;content:"...";font-size:1rem;opacity:.6;position:relative}#enp-quiz .enp-paginate__item--no-gap:after,#enp-quiz .enp-paginate__item--no-gap:before{content:""}#enp-quiz .enp-paginate__item--next-page{margin-left:.2rem}#enp-quiz .enp-paginate__item--previous-page{margin-right:.2rem}#enp-quiz .enp-quiz-breadcrumbs{align-content:center;align-items:center;background:#fff;border-bottom:1px solid #ddd;display:flex;justify-content:center;left:-500%;margin-left:auto;margin-right:auto;padding:10px;position:absolute;right:-500%;top:0;width:1000%;z-index:99999}#enp-quiz .enp-quiz-breadcrumbs__list{display:flex;list-style:none;margin-bottom:0;margin-left:0}#enp-quiz .enp-quiz-breadcrumbs__item{align-content:center;align-items:center;display:flex;fill:#333f48;justify-content:center;margin-right:5px}#enp-quiz .enp-quiz-breadcrumbs__item:last-of-type{margin-right:0}@media(min-width:25pc){#enp-quiz .enp-quiz-breadcrumbs__item{margin-right:10px}}#enp-quiz .enp-quiz-breadcrumbs__link--disabled{cursor:default;opacity:.65}#enp-quiz .enp-quiz-breadcrumbs__link--active{background:transparent;border:2px solid #333f48;border-radius:3px;box-shadow:none;color:#333f48;cursor:pointer;font-size:15px;font-weight:400;letter-spacing:.05em;line-height:1.6;padding:.4em 1em;text-align:center;text-transform:uppercase;transition:all .2s}#enp-quiz .enp-quiz-breadcrumbs__link--active:focus,#enp-quiz .enp-quiz-breadcrumbs__link--active:hover{background:#222a30;box-shadow:none;color:#fff}#enp-quiz .enp-quiz-breadcrumbs__link--active:active{background:#5d7384;box-shadow:inset 0 2px 0 rgba(0,0,0,.1);color:#fff}#enp-quiz .enp-quiz-breadcrumbs__link--active:focus{outline-color:#4d90fe;outline-offset:-2px;outline-style:auto;outline-width:5px}#enp-quiz .enp-quiz-breadcrumbs__link--active:disabled,#enp-quiz .enp-quiz-breadcrumbs__link--active:disabled:focus,#enp-quiz .enp-quiz-breadcrumbs__link--active:disabled:hover{background:#333f48;cursor:default;opacity:.5}#enp-quiz .enp-quiz-breadcrumbs__link--active:focus,#enp-quiz .enp-quiz-breadcrumbs__link--active:hover{background:transparent;border:2px solid #222a30;color:#222a30}#enp-quiz .enp-quiz-breadcrumbs__link{font-size:1rem;font-weight:400;letter-spacing:0;text-transform:none}#enp-quiz .enp-quiz-breadcrumbs--fixed{-webkit-animation:navSlideIn .25s;animation:navSlideIn .25s;position:fixed;top:0}#enp-quiz .enp-results-title{background:#f8f8f8;border-bottom:1px solid #ddd;font-size:1.6rem;margin:-1.2rem 0 2rem;padding:3.2rem 20px 2.6rem;text-align:center}#enp-quiz .enp-results-title:after{content:"RESULTS";display:block;font-size:1.5rem;font-weight:400;text-transform:uppercase}#enp-quiz .enp-results__container{display:block;margin-left:auto;margin-right:auto;max-width:40pc;padding-left:20px;padding-right:20px}#enp-quiz .enp-results__container:after{clear:both;content:"";display:table}@media(min-width:700px){#enp-quiz .enp-results__container{max-width:840px}}@media(min-width:750pt){#enp-quiz .enp-results__container{display:flex;justify-content:space-between;max-width:750pt}}#enp-quiz .enp-quiz-scores__container,#enp-quiz .enp-results-flow__container{width:100%}@media(min-width:750pt){#enp-quiz .enp-quiz-scores__container,#enp-quiz .enp-results-flow__container{width:48%}}#enp-quiz .enp-quiz-score__line-chart{height:300px;margin-bottom:1rem}#enp-quiz .enp-quiz-score__line-chart .ct-label{color:#444}#enp-quiz .enp-quiz-score__line-chart .ct-grid{stroke:#dadada;stroke-dasharray:0}#enp-quiz .enp-quiz-score__line-chart .ct-line{stroke:#3bb275;stroke-width:2px}#enp-quiz .enp-quiz-score__line-chart .ct-point{stroke:#3bb275;stroke-width:8px}#enp-quiz .enp-quiz-scores-table{margin:0 auto;max-width:500px;width:100%}#enp-quiz .enp-quiz-scores-table tr th{background-color:#fff}#enp-quiz .enp-quiz-scores-table__label{padding-left:5%}#enp-quiz .enp-quiz-scores-table__score{padding-right:5%;text-align:right}#enp-quiz .enp-results-flow{border-radius:50%;height:20pc;margin:2rem auto;position:relative;width:20pc}@media(min-width:25pc){#enp-quiz .enp-results-flow{height:390px;width:390px}}@media(min-width:700px){#enp-quiz .enp-results-flow{height:450px;width:450px}}@media(min-width:750pt){#enp-quiz .enp-results-flow{height:25pc;width:25pc}}#enp-quiz .enp-results-flow__section-title{clip:rect(1px,1px,1px,1px);height:1px;left:-625pc;overflow:hidden;position:absolute!important;top:auto;width:1px}#enp-quiz .enp-results-flow__item{-webkit-animation:.85s slideInBottom cubic-bezier(0,0,.3,1) forwards;animation:.85s slideInBottom cubic-bezier(0,0,.3,1) forwards;border:2px solid #3bb275;border-radius:50%;height:100%;left:0;letter-spacing:.05rem;margin:0 auto;padding:12.5% 0 0;right:0;text-align:center;width:100%}#enp-quiz .enp-results-flow__item--total-views{background:#fff}#enp-quiz .enp-results-flow__item--quiz-starts{background:#eaf8f1;bottom:2.5%;height:65%;padding-top:8%;position:absolute;width:65%}#enp-quiz .enp-results-flow__item--quiz-finishes{background:#b8e8cf;bottom:5%;height:35%;position:absolute;width:35%}#enp-quiz .enp-results-flow__title{color:#444;font-size:.7rem;margin-bottom:0;text-transform:uppercase}@media(min-width:700px){#enp-quiz .enp-results-flow__title{font-weight:700;margin-bottom:2px}}#enp-quiz .enp-results-flow__number{font-size:1.4rem;font-weight:700;line-height:1.2}#enp-quiz .enp-results-flow__number--total-views{font-size:2rem}#enp-quiz .enp-results-flow__number--quiz-starts{font-size:1.65rem}#enp-quiz .enp-results-flow__percentage{color:#444;display:inline-block;font-size:.8rem;font-weight:400;left:-.1rem;position:relative;top:-.7em}#enp-quiz .enp-results-flow__percentage:after{color:#444;content:"%";font-size:.7rem;position:absolute;right:-.75rem}#enp-quiz .enp-results-questions__section{background:#f5f5f5;border-bottom:1px solid #ddd;border-top:1px solid #ddd;margin-bottom:3rem;margin-top:5rem;padding-bottom:3rem;padding-top:5rem}#enp-quiz .enp-results-questions__header{align-items:flex-start;flex-direction:column}@media(min-width:25pc){#enp-quiz .enp-results-questions__header{align-items:flex-end;display:flex;flex-direction:row;justify-content:space-between}}#enp-quiz .enp-results-questions__key,#enp-quiz .enp-results-questions__title{font-size:1.5rem;text-transform:uppercase}#enp-quiz .enp-results-questions{list-style:none;margin-left:0}#enp-quiz .enp-results-question{font-size:1rem;margin-bottom:1rem;padding:0;width:100%}#enp-quiz .enp-results-question__header{padding:1rem 1.2rem;position:relative}#enp-quiz .enp-results-question__question,#enp-quiz .enp-results-question__stats{font-size:1rem;line-height:1.4}#enp-quiz .enp-results-question__question{font-weight:400}@media(min-width:25pc){#enp-quiz .enp-results-question__question{margin-bottom:0;padding-right:7em}}#enp-quiz .enp-results-question__stats{font-size:.9rem}@media(min-width:25pc){#enp-quiz .enp-results-question__stats{bottom:1rem;position:absolute;right:1.2rem;text-align:right}}#enp-quiz .enp-results-question__stats,#enp-quiz .enp-results-questions__key{font-weight:300}#enp-quiz .enp-results-question__content{padding:2rem 1.2rem 1.2rem}#enp-quiz .enp-results-question__deep-stats{display:flex;justify-content:space-around;list-style:none;margin-left:0;text-align:center}#enp-quiz .enp-results-question__deep-stat__number{font-size:1.8rem;line-height:1;position:relative}#enp-quiz .enp-results-question__deep-stat__number--correct,#enp-quiz .enp-results-question__deep-stat__number--finishes{color:#319461}#enp-quiz .enp-results-question__deep-stat__number--incorrect{color:#e97763}#enp-quiz .enp-results-question__deep-stat__number--correct:after,#enp-quiz .enp-results-question__deep-stat__number--finishes:after,#enp-quiz .enp-results-question__deep-stat__number--incorrect:after{content:"%";font-size:.9rem;position:absolute;right:-1rem;top:.3rem}#enp-quiz .enp-results-question__deep-stat__label{font-size:.8rem;text-transform:uppercase}#enp-quiz .enp-results-question__options{list-style:none;margin-bottom:0;margin-left:0}#enp-quiz .enp-results-question__option{border-top:1px solid #ddd;padding:.8rem .8rem .8rem .4rem}@media(min-width:25pc){#enp-quiz .enp-results-question__option{display:flex;flex-direction:row;justify-content:space-between}}#enp-quiz .enp-results-question__option:first-of-type{margin-top:1.4rem}#enp-quiz .enp-results-question__option--correct{background:#eaf8f1}#enp-quiz .enp-results-question__option__text{flex-grow:100;margin-right:1rem}#enp-quiz .enp-results-question__option__text__helper{font-size:1.5rem;font-weight:300;margin-right:.4rem;text-transform:uppercase}@media(min-width:25pc){#enp-quiz .enp-results-question__option__icon{margin-right:.3rem;min-width:1.6rem}}#enp-quiz .enp-results-question__option__icon--incorrect{fill:#e97763;opacity:.5}#enp-quiz .enp-results-question__option__icon--correct{fill:#319461;opacity:1}#enp-quiz .enp-results-question__option__percentage--incorrect{color:#e97763}#enp-quiz .enp-results-question__option__percentage--correct{color:#319461}#enp-quiz .enp-results-question__option__number-selected{font-weight:300}#enp-quiz .enp-slider-responses__title{font-size:1.5rem;font-weight:400;margin-top:1.6rem;text-transform:uppercase}#enp-quiz .enp-slider-responses__line-chart .ct-point{stroke-width:8px}#enp-quiz .enp-slider-responses__line-chart--high,#enp-quiz .enp-slider-responses__line-chart--low{stroke:#bf5700}#enp-quiz .enp-slider-responses__line-chart--correct{stroke:#3bb275}#enp-quiz .enp-slider-responses-table{width:100%}#enp-quiz .enp-slider-responses-table tr:nth-child(even) td{background-color:#fff}#enp-quiz .enp-slider-responses-table tr.enp-slider-responses-table__response--correct td{background-color:#eaf8f1}#enp-quiz .enp-slider-responses-table__content{box-shadow:none;padding-top:1rem}#enp-quiz .enp-slider-responses-table--hide-zero .enp-slider-responses-table__frequency--zero{display:none}#enp-quiz .enp-slider-responses-table__response-frequency{align-items:center;display:flex;justify-content:space-between}#enp-quiz .enp-slider-responses-table__toggle-zero-frequency{background:#fff;border:0;border-radius:3px;box-shadow:inset 1px 1px 0 #ccc,inset -1px -1px 0 #ccc;color:#444;cursor:pointer;font-family:tablet-gothic,helvetica neue,helvetica,arial,sans-serif;font-size:.9rem;font-weight:400;letter-spacing:0;line-height:1.5;margin:0;min-height:3.065rem;padding:0 .6rem;position:relative;text-align:left;text-transform:none;transition:all .2s cubic-bezier(0,0,.3,1);width:auto;z-index:9}.enp-quiz-results #enp-quiz .enp-aside{border:0}.enp-quiz-results .enp-results-questions__title__quiz-title{clip:rect(1px,1px,1px,1px);height:1px;left:-625pc;overflow:hidden;position:absolute!important;top:auto;width:1px}#enp-quiz .enp-results--ab{display:block;margin-bottom:3rem}@media(min-width:750pt){#enp-quiz .enp-results--ab{align-content:flex-end;display:flex;flex-wrap:wrap;padding:10px;width:50%}#enp-quiz .enp-results--a{border-right:1px solid #ddd;padding-right:1rem}#enp-quiz .enp-results--b{padding-left:1rem}}#enp-quiz .enp-results-title--ab,#enp-quiz .enp-results__container--ab .enp-results-flow__container{min-width:100%}#enp-quiz .enp-results--loser .enp-results-flow__item{border:2px solid #bf5700}#enp-quiz .enp-results--loser .enp-results-flow__item--quiz-starts{background:#ffc696}#enp-quiz .enp-results--loser .enp-results-flow__item--quiz-finishes{background:#ffb06d}#enp-quiz .enp-results--loser .enp-results-questions__title,#enp-quiz .enp-results--loser th{color:#964400}#enp-quiz .enp-results--winner .enp-results-questions__title,#enp-quiz .enp-results--winner th{color:#319461}#enp-quiz .enp-results-title--a,#enp-quiz .enp-results-title--b{background:transparent}#enp-quiz .enp-ab-scores{margin-left:auto;margin-right:auto;max-width:40pc;padding-left:20px;padding-right:20px}#enp-quiz .enp-ab-scores:after{clear:both;content:"";display:table}@media(min-width:700px){#enp-quiz .enp-ab-scores{max-width:840px}}@media(min-width:750pt){#enp-quiz .enp-ab-scores{max-width:750pt}}#enp-quiz .enp-ab-scores th.enp-quiz-scores-table__label,#enp-quiz .enp-ab-scores th.enp-quiz-scores-table__score{padding-left:0;padding-right:0}#enp-quiz .enp-ab-scores__title{font-size:1.5rem;padding-left:50px;text-transform:uppercase}#enp-quiz .enp-quiz-score__line-chart .enp-test-loser .ct-line,#enp-quiz .enp-quiz-score__line-chart .enp-test-loser .ct-point{stroke:#bf5700}#enp-quiz .enp-quiz-scores{margin-top:0}#enp-quiz .enp-ab-scores .enp-quiz-scores-table,#enp-quiz .enp-question-results{margin-bottom:1.6rem}@media(min-width:750pt){#enp-quiz .enp-ab-scores .enp-quiz-scores-table,#enp-quiz .enp-question-results{float:left;margin:0;width:48%}#enp-quiz .enp-ab-scores .enp-quiz-scores-table:first-of-type,#enp-quiz .enp-question-results:first-of-type{margin-right:4%}}#enp-quiz .enp-question-results__container{margin-left:auto;margin-right:auto;max-width:40pc;padding-left:20px;padding-right:20px}#enp-quiz .enp-question-results__container:after{clear:both;content:"";display:table}@media(min-width:700px){#enp-quiz .enp-question-results__container{max-width:840px}}@media(min-width:750pt){#enp-quiz .enp-question-results__container{max-width:750pt}}#enp-quiz .enp-question-results--ab .enp-results-questions__section{background:#fff;border:0;margin:1.6rem auto;padding:1.6rem 0}#enp-quiz .enp-question-results--ab .enp-results-questions__container{padding:0}#enp-quiz .enp-ab-new-embed-code__section{margin-bottom:2rem;margin-left:auto;margin-right:auto;max-width:540px;padding-bottom:2rem;padding-left:20px;padding-right:20px}#enp-quiz .enp-ab-new-embed-code__section:after{clear:both;content:"";display:table}#enp-quiz .enp-ab-new-embed-code__section .enp-ab-embed-code{margin:0;padding:0}#enp-quiz .enp-ab-embed-code__section{background:#f5f5f5;border-bottom:1px solid #ddd;border-top:1px solid #ddd;margin-bottom:3rem;margin-top:5rem;padding-bottom:3rem;padding-top:5rem}#enp-quiz .enp-ab-embed-code{margin-left:auto;margin-right:auto;max-width:40pc;padding-left:20px;padding-right:20px}#enp-quiz .enp-ab-embed-code:after{clear:both;content:"";display:table}#enp-quiz .enp-ab-embed-code__title{font-size:1.5rem;text-transform:uppercase}#enp-quiz .enp-embed-code__textarea{margin-bottom:0}#enp-quiz .enp-embed-code__instructions{font-size:1.1rem}#enp-quiz .enp-slider{margin-bottom:1.6rem}#enp-quiz .enp-slider-input__container{align-items:center;display:flex;justify-content:center;margin:1.6rem auto;position:relative}#enp-quiz .enp-slider-input__label{color:#5e5e5e;display:block;font-size:.85rem;font-weight:400;text-transform:uppercase}#enp-quiz .enp-slider-input__prefix,#enp-quiz .enp-slider-input__suffix{font-size:1rem}#enp-quiz .enp-slider-input__prefix{margin-right:.2rem;white-space:pre}#enp-quiz .enp-slider-input__suffix{margin-left:.2rem;white-space:pre}#enp-quiz .enp-slider-input__input{background:#fff;border:1px solid #aaa;border-radius:3px;font-family:tablet-gothic,helvetica neue,helvetica,arial,sans-serif;font-size:1rem;margin-bottom:0;max-width:100%;padding:.75rem;transition:all .25s cubic-bezier(0,0,.3,1);width:auto}@media(min-width:700px){#enp-quiz .enp-slider-input__input{padding:.8rem}}#enp-quiz .enp-slider-input__input--incorrect{color:#bf5700}#enp-quiz .enp-slider-input__input--correct{color:#319461}#enp-quiz .enp-slider-input__input--invalid-animation{box-shadow:0 0 2px 1px #e97763}#enp-quiz .enp-slider_input__range-helper{bottom:-1.2rem;font-size:.8rem;position:absolute}#enp-quiz .enp-slider_input__range-helper--low{left:0}#enp-quiz .enp-slider_input__range-helper--high{right:0}#enp-quiz .enp-slider-input__range-helper__number{color:#666;position:relative}#enp-quiz .ui-slider-range-show-correct__tooltip-container{position:relative}#enp-quiz .ui-slider-range-show-correct__tooltip{background-color:#fff;border:2px solid #3bb275;border-radius:50%;height:1.1rem;margin-left:-.55rem;position:absolute;top:-.4rem;width:1.1rem;z-index:9999}#enp-quiz .ui-slider-range-show-correct__tooltip--low{left:0}#enp-quiz .ui-slider-range-show-correct__tooltip--high{right:-.55rem}#enp-quiz .ui-slider-range-show-correct__tooltip__text{color:#287950;display:inline-block;font-size:.825rem;min-width:100%;position:relative;text-align:center;text-shadow:0 1px 0 #fff;top:-1.35rem}#enp-quiz .enp-slider{background:#ddd;position:relative;text-align:left}#enp-quiz .enp-slider .ui-helper-hidden{display:none}#enp-quiz .enp-slider .ui-helper-hidden-accessible{border:0;clip:rect(0 0 0 0);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px}#enp-quiz .enp-slider .ui-helper-reset{border:0;font-size:100%;line-height:1.3;list-style:none;margin:0;outline:0;padding:0;text-decoration:none}#enp-quiz .enp-slider .ui-helper-clearfix:after,#enp-quiz .enp-slider .ui-helper-clearfix:before{border-collapse:collapse;content:"";display:table}#enp-quiz .enp-slider .ui-helper-clearfix:after{clear:both}#enp-quiz .enp-slider .ui-helper-clearfix{min-height:0}#enp-quiz .enp-slider .ui-helper-zfix{filter:alpha(opacity=0);height:100%;left:0;opacity:0;position:absolute;top:0;width:100%}#enp-quiz .enp-slider .ui-front{z-index:100}#enp-quiz .enp-slider .ui-state-disabled{cursor:default!important}#enp-quiz .enp-slider .ui-icon{background-repeat:no-repeat;display:block;overflow:hidden;text-indent:-99999px}#enp-quiz .enp-slider .ui-widget-overlay{height:100%;left:0;position:fixed;top:0;width:100%}#enp-quiz .enp-slider .ui-slider-handle{background:#fff;border:1px solid #aaa;border-radius:50%;cursor:default;height:1.2rem;margin-left:-.6rem;position:absolute;top:-.4rem;touch-action:none;transition:opacity .2s cubic-bezier(0,0,.3,1),height .18s cubic-bezier(0,0,.3,1),width .18s cubic-bezier(0,0,.3,1),transform .18s cubic-bezier(0,0,.3,1),-webkit-transform .18s cubic-bezier(0,0,.3,1);width:1.2rem;z-index:2}#enp-quiz .enp-slider .ui-slider-handle:focus{box-shadow:0 0 3px 1px #4d90fe;outline:0}#enp-quiz .enp-slider .ui-slider-handle--correct,#enp-quiz .enp-slider .ui-slider-handle--incorrect{height:1.1rem;margin-left:-.55rem;top:-.4rem;width:1.1rem}#enp-quiz .enp-slider .ui-slider-handle--incorrect{border:2px solid #bf5700;z-index:1}#enp-quiz .enp-slider .ui-slider-handle--correct{border:2px solid #3bb275;z-index:99999}#enp-quiz .enp-slider .ui-slider-range{background-position:0 0;border:0;display:block;font-size:.7rem;height:100%;position:absolute;top:0;z-index:1}#enp-quiz .enp-slider .ui-slider-range-show-correct{background:#3bb275;z-index:9}#enp-quiz .enp-slider .ui-slider-range-min{background:#3bb275;left:0}#enp-quiz .enp-slider .ui-slider-range-max{right:0}#enp-quiz .enp-slider.ui-state-disabled .ui-slider-handle,#enp-quiz .enp-slider.ui-state-disabled .ui-slider-range{-webkit-filter:inherit;filter:inherit}#enp-quiz .ui-slider-horizontal{height:.3rem}#enp-quiz .enp-question__answered .enp-slider{background:#bbb}#enp-quiz .enp-question__answered .ui-slider-range-min{background:#fff} \ No newline at end of file diff --git a/public/quiz-create/css/sass/_dashboard.scss b/public/quiz-create/css/sass/_dashboard.scss index cbf19a0d..503d2a76 100644 --- a/public/quiz-create/css/sass/_dashboard.scss +++ b/public/quiz-create/css/sass/_dashboard.scss @@ -1,9 +1,13 @@ #enp-quiz { + &.enp-quiz__main { + background: $really_light_gray; + } + .enp-dash-container { @include container--wide; @include xpadding-vertical; - background: $really_light_gray; + // background: $really_light_gray; transition: all .25s $fastInEaseOut; } @@ -52,6 +56,10 @@ @include screen-reader-text ; } + .enp-search-quizzes__select { + padding: .3rem; + } + .enp-quiz-search__input { max-width: 160px; margin: 0 0 0.1rem; @@ -122,14 +130,15 @@ align-content: flex-end; justify-content: flex-end; border: none; + border-radius: 3px; } .enp-dash-item--published { - box-shadow: inset 4px 0 0 $green, 0 1px 0 rgba(0,0,0,.1); + box-shadow: inset 4px 0 0 $blue, 0 1px 0 rgba(0,0,0,.1); } .enp-dash-item--draft { - box-shadow: inset 4px 0 0 lighten($green, 25%), 0 1px 0 rgba(0,0,0,.1); + box-shadow: inset 4px 0 0 lighten($blue, 45%), 0 1px 0 rgba(0,0,0,.1); } .enp-dash-item--remove { diff --git a/public/quiz-create/css/sass/_quiz-publish.scss b/public/quiz-create/css/sass/_quiz-publish.scss index e29ec3f4..cb258c0f 100644 --- a/public/quiz-create/css/sass/_quiz-publish.scss +++ b/public/quiz-create/css/sass/_quiz-publish.scss @@ -66,7 +66,7 @@ .enp-share-quiz__url { display: block; - font-size: 1rem; + font-size: 1.5rem; line-height: 1.4; word-wrap: break-word; } diff --git a/public/quiz-create/css/sass/_utilities.scss b/public/quiz-create/css/sass/_utilities.scss index 40a5a9e2..0adbf74a 100644 --- a/public/quiz-create/css/sass/_utilities.scss +++ b/public/quiz-create/css/sass/_utilities.scss @@ -326,7 +326,7 @@ } @mixin small-uppercase { - font-size: 0.85rem; + font-size: 1.5rem; text-transform: uppercase; } @@ -702,6 +702,10 @@ } } +.enp-breadcrumb-link__container { + background-color: #fff; +} + .enp-breadcrumb-link { font-size: 0.85rem; } diff --git a/public/quiz-take/css/enp_quiz-take.min.css b/public/quiz-take/css/enp_quiz-take.min.css index d4498507..a7033e9c 100644 --- a/public/quiz-take/css/enp_quiz-take.min.css +++ b/public/quiz-take/css/enp_quiz-take.min.css @@ -1 +1 @@ -a,abbr,acronym,address,applet,big,blockquote,body,caption,cite,code,dd,del,dfn,div,dl,dt,em,fieldset,font,form,h1,h2,h3,h4,h5,h6,html,iframe,ins,kbd,label,legend,li,object,ol,p,pre,q,s,samp,small,span,strike,strong,sub,sup,table,tbody,td,tfoot,th,thead,tr,tt,ul,var{border:0;font-family:inherit;font-size:100%;font-style:inherit;font-weight:inherit;margin:0;outline:0;padding:0;vertical-align:baseline}html{-ms-text-size-adjust:100%;-webkit-text-size-adjust:100%;font-size:100%;overflow-y:scroll}body{background:#fff;overflow:hidden}article,aside,details,figcaption,figure,footer,header,nav,section{display:block}ol,ul{list-style:none}table{border-collapse:separate;border-spacing:0}caption,td,th{font-weight:400;text-align:left}blockquote:after,blockquote:before,q:after,q:before{content:""}blockquote,q{quotes:"" ""}a:focus{outline:thin dotted}a:active,a:hover{outline:0}a img{border:0}html{box-sizing:border-box}*,*:after,*:before{box-sizing:inherit}html{font-size:1pc!important}html #enp-quiz{border-radius:3px;box-sizing:border-box}body #enp-quiz{background:#fff;overflow:hidden}#enp-quiz *,#enp-quiz *:after,#enp-quiz *:before{box-sizing:inherit}#enp-quiz ol,#enp-quiz ul{margin:0 0 1.6rem 1.25rem;padding:0}#enp-quiz textarea{margin-bottom:1rem}#enp-quiz button,#enp-quiz button:active,#enp-quiz button:focus,#enp-quiz button:hover,#enp-quiz iframe,#enp-quiz input[type=button],#enp-quiz input[type=button]:active,#enp-quiz input[type=button]:focus,#enp-quiz input[type=button]:hover,#enp-quiz input[type=reset],#enp-quiz input[type=reset]:active,#enp-quiz input[type=reset]:focus,#enp-quiz input[type=reset]:hover,#enp-quiz input[type=submit],#enp-quiz input[type=submit]:active,#enp-quiz input[type=submit]:focus,#enp-quiz input[type=submit]:hover{border:0}#enp-quiz .enp-screen-reader-text{clip:rect(1px,1px,1px,1px);height:1px;left:-625pc;overflow:hidden;position:absolute!important;top:auto;width:1px}#enp-quiz .enp-screen-reader-text:active,#enp-quiz .enp-screen-reader-text:focus,#enp-quiz .enp-screen-reader-text:hover{background-color:#f1f1f1;border-radius:3px;box-shadow:0 0 2px 2px rgba(0,0,0,.6);clip:auto!important;color:#21759b;display:block;font-size:14px;font-weight:700;height:auto;left:5px;line-height:normal;padding:15px 23px 14px;text-decoration:none;top:5px;width:auto;z-index:100000}#enp-quiz .enp-quiz-message{background:#fff;border:1px solid #eee;border-bottom:1px solid #ccc;margin:1.6rem auto;max-width:25pc;padding:1rem .375rem}#enp-quiz .enp-quiz-message:after{clear:both;content:"";display:table}#enp-quiz .enp-quiz-message__title{font-size:.85rem;text-transform:uppercase}#enp-quiz .enp-message__list{font-size:1.1rem;list-style:none;margin-bottom:0;margin-left:0}#enp-quiz .enp-quiz-message--error{-webkit-animation:slideInTop .3s cubic-bezier(0,0,.3,1);animation:slideInTop .3s cubic-bezier(0,0,.3,1);border-left:6px solid #f14021}#enp-quiz .enp-quiz-message__title--error{color:#db2c0e}#enp-quiz .enp-quiz-message--success{border-left:6px solid #3bb275;color:#319461}#enp-quiz .enp-quiz-message__title--success{color:#319461}body{color:#444;font-family:tablet-gothic,helvetica neue,helvetica,arial,sans-serif;font-size:1em;font-weight:400;line-height:1.6}@media(min-width:700px){body{font-size:1.3em}}#enp-quiz h1,#enp-quiz h2,#enp-quiz h3,#enp-quiz h4,#enp-quiz h5,#enp-quiz h6{clear:both;color:#444;font-family:tablet-gothic,helvetica neue,helvetica,arial,sans-serif;font-weight:700;line-height:1.2em;margin:0 0 .2rem}#enp-quiz h1{font-size:2em}#enp-quiz h2{font-size:1.75em}#enp-quiz h3{font-size:1.475em}#enp-quiz h4{font-size:1.3em}#enp-quiz h5{font-size:1.125em}#enp-quiz h6{font-size:1em}#enp-quiz p+h1,#enp-quiz p+h2,#enp-quiz p+h3,#enp-quiz p+h4,#enp-quiz p+h5,#enp-quiz p+h6,#enp-quiz ul+h1,#enp-quiz ul+h2,#enp-quiz ul+h3,#enp-quiz ul+h4,#enp-quiz ul+h5,#enp-quiz ul+h6{margin-top:1.8em}#enp-quiz p{font-size:.85em;font-weight:300;margin-bottom:1.125em}#enp-quiz ol,#enp-quiz ul{margin:0 0 1.6em 1.25em}#enp-quiz ul{list-style:disc}#enp-quiz ol{list-style:decimal}#enp-quiz li>ol,#enp-quiz li>ul{margin-bottom:0;margin-left:1.6em}#enp-quiz b,#enp-quiz strong{font-weight:700}#enp-quiz cite,#enp-quiz dfn,#enp-quiz em{font-family:georgia,times,serif;font-style:italic}#enp-quiz pre{background:#eee;font-family:Courier\ 10 Pitch,Courier,monospace;font-size:.95em;line-height:1.6;margin-bottom:1.6em;max-width:100%;overflow:auto;padding:1.6em}#enp-quiz .code,#enp-quiz code,#enp-quiz kbd,#enp-quiz tt,#enp-quiz var{font:.7em Monaco,Consolas,"Andale Mono","DejaVu Sans Mono",monospace}#enp-quiz figure{margin:0}#enp-quiz img{height:auto;max-width:100%}#enp-quiz a{color:#5887c0;text-decoration:none;touch-action:manipulation;transition:color .2s}#enp-quiz a .enp-icon{fill:#5887c0}#enp-quiz a:active,#enp-quiz a:focus,#enp-quiz a:hover{color:#3f6ea6}#enp-quiz a:active .enp-icon,#enp-quiz a:focus .enp-icon,#enp-quiz a:hover .enp-icon{fill:#3f6ea6}#enp-quiz button:focus{outline-color:#4d90fe;outline-offset:-2px;outline-style:auto;outline-width:5px}#enp-quiz .enp-btn{background:#5887c0;border:0;border-radius:3px;box-shadow:inset 0 -2px 0 rgba(0,0,0,.2);color:#fff;cursor:pointer;font-size:15px;font-weight:400;letter-spacing:.05em;line-height:1.6;padding:.85em 1.4em .75em;text-align:center;text-transform:uppercase;transition:all .2s}#enp-quiz .enp-btn:hover{background:#3f6ea6;box-shadow:none;color:#fff}#enp-quiz .enp-btn:active{background:#a2bcdc;box-shadow:inset 0 2px 0 rgba(0,0,0,.1);color:#fff}#enp-quiz .enp-btn:focus{outline-color:#4d90fe;outline-offset:-2px;outline-style:auto;outline-width:5px}#enp-quiz .enp-btn--add{background:0;border:3px dashed #666;border-radius:3px;box-shadow:none;color:#545454;cursor:pointer;font-size:15px;font-weight:400;letter-spacing:.05em;line-height:1.6;padding:.85em 1.4em .75em;text-align:center;text-transform:uppercase;transition:all .2s;width:100%}#enp-quiz .enp-btn--add:hover{box-shadow:none;color:#fff}#enp-quiz .enp-btn--add:active{background:#a2bcdc;box-shadow:inset 0 2px 0 rgba(0,0,0,.1);color:#fff}#enp-quiz .enp-btn--add:focus{outline-color:#4d90fe;outline-offset:-2px;outline-style:auto;outline-width:5px}#enp-quiz .enp-btn--add:focus,#enp-quiz .enp-btn--add:hover{background:hsla(0,0%,100%,.9);border:3px dashed #444;color:#444}#enp-quiz .enp-btn--disabled{cursor:default;opacity:.65}#enp-quiz .enp-btn--enabled{-webkit-animation:expand .6s;animation:expand .6s}#enp-quiz .enp-icon{height:24px;transition:all .2s;width:24px}#enp-quiz .enp-page-title{font-size:1.6rem}#enp-quiz fieldset{border:0;margin:0;padding:0}.enp-label{color:#5e5e5e;display:block;font-size:.85rem;font-weight:400;text-transform:uppercase}.enp-legend{border:0;color:#5e5e5e;display:block;font-size:.85rem;font-weight:400;margin-bottom:.2rem;padding-top:1.6rem;text-transform:uppercase}.enp-input{background:#fff;border:1px solid #aaa;border-radius:3px;font-family:tablet-gothic,helvetica neue,helvetica,arial,sans-serif;font-size:1rem;margin-bottom:1.2rem;max-width:100%;padding:.8rem .5rem;width:20rem}@media(min-width:700px){.enp-input{padding:.8rem}}.enp-input:-ms-input-placeholder,.enp-input::-ms-input-placeholder,.enp-input::-webkit-input-placeholder,.enp-input::placeholder,.enp-textarea:-ms-input-placeholder,.enp-textarea::-ms-input-placeholder,.enp-textarea::-webkit-input-placeholder,.enp-textarea::placeholder{color:#aaa;font-family:tablet-gothic,helvetica neue,helvetica,arial,sans-serif;font-weight:300}@-webkit-keyframes removeAnswers{0%{-webkit-transform:translate3d(0,0,0);height:auto;opacity:1;transform:translate3d(0,0,0)}10%{-webkit-transform:translate3d(0,0,0);opacity:1;transform:translate3d(0,0,0)}to{-webkit-transform:translate3d(-150px,0,0);display:none;height:0;opacity:0;padding:0;transform:translate3d(-150px,0,0);z-index:-1}}@keyframes removeAnswers{0%{-webkit-transform:translate3d(0,0,0);height:auto;opacity:1;transform:translate3d(0,0,0)}10%{-webkit-transform:translate3d(0,0,0);opacity:1;transform:translate3d(0,0,0)}to{-webkit-transform:translate3d(-150px,0,0);display:none;height:0;opacity:0;padding:0;transform:translate3d(-150px,0,0);z-index:-1}}@-webkit-keyframes removeQuestion{0%,15%{-webkit-transform:translatex(0);opacity:1;transform:translatex(0)}to{-webkit-transform:translatex(-150px);opacity:0;transform:translatex(-150px)}}@keyframes removeQuestion{0%,15%{-webkit-transform:translatex(0);opacity:1;transform:translatex(0)}to{-webkit-transform:translatex(-150px);opacity:0;transform:translatex(-150px)}}@-webkit-keyframes showNextQuestion{0%{-webkit-transform:translatex(90pt);opacity:0;transform:translatex(90pt)}to{-webkit-transform:translatex(0);opacity:1;transform:translatex(0)}}@keyframes showNextQuestion{0%{-webkit-transform:translatex(90pt);opacity:0;transform:translatex(90pt)}to{-webkit-transform:translatex(0);opacity:1;transform:translatex(0)}}@-webkit-keyframes slideInTop{0%{-webkit-transform:translate3d(0,-20px,0);height:auto;opacity:0;transform:translate3d(0,-20px,0)}to{-webkit-transform:translate3d(0,0,0);height:auto;opacity:1;transform:translate3d(0,0,0)}}@keyframes slideInTop{0%{-webkit-transform:translate3d(0,-20px,0);height:auto;opacity:0;transform:translate3d(0,-20px,0)}to{-webkit-transform:translate3d(0,0,0);height:auto;opacity:1;transform:translate3d(0,0,0)}}@-webkit-keyframes slideInBottom{0%{-webkit-transform:translate3d(0,20px,0);opacity:0;transform:translate3d(0,20px,0)}to{-webkit-transform:translate3d(0,0,0);opacity:1;transform:translate3d(0,0,0)}}@keyframes slideInBottom{0%{-webkit-transform:translate3d(0,20px,0);opacity:0;transform:translate3d(0,20px,0)}to{-webkit-transform:translate3d(0,0,0);opacity:1;transform:translate3d(0,0,0)}}@-webkit-keyframes flashRedShadow{0%{background:#f14021}to{background:#fff}}@keyframes flashRedShadow{0%{background:#f14021}to{background:#fff}}@-webkit-keyframes errorContainer{0%{}to{background-color:rgba(241,64,33,.2)}}@keyframes errorContainer{0%{}to{background-color:rgba(241,64,33,.2)}}@-webkit-keyframes pop{0%{opacity:1;width:0}to{opacity:0;width:40%}30%{width:100%}80%{opacity:1;width:100%}}@keyframes pop{0%{opacity:1;width:0}to{opacity:0;width:40%}30%{width:100%}80%{opacity:1;width:100%}}.spinner{margin:0 auto;text-align:center;width:70px}.spinner>div{-webkit-animation:sk-bouncedelay 1.4s infinite ease-in-out both;animation:sk-bouncedelay 1.4s infinite ease-in-out both;background-color:#333;border-radius:100%;display:inline-block;height:18px;width:18px}.spinner .bounce1{-webkit-animation-delay:-.32s;animation-delay:-.32s}.spinner .bounce2{-webkit-animation-delay:-.16s;animation-delay:-.16s}@-webkit-keyframes sk-bouncedelay{0%,80%,to{-webkit-transform:scale(0)}40%{-webkit-transform:scale(1)}}@keyframes sk-bouncedelay{0%,80%,to{-webkit-transform:scale(0);transform:scale(0)}40%{-webkit-transform:scale(1);transform:scale(1)}}#enp-quiz{background:transparent}#enp-quiz .enp-quiz__container{background:#fff;border:1px solid #ddd;padding:0;position:relative}#enp-quiz .enp-quiz__header{border-bottom:1px solid #ddd;position:relative}#enp-quiz .enp-quiz__title{font-size:.85rem;font-weight:500;letter-spacing:.01rem;padding:.6rem 1rem;text-transform:uppercase}#enp-quiz .enp-quiz__title--hide{display:none}#enp-quiz .enp-quiz__progress{bottom:0;height:0;left:0;position:absolute;right:0}#enp-quiz .enp-quiz__progress__bar{background:#3bb275;height:3px;min-width:2rem;position:relative;transition:all .5s cubic-bezier(0,0,.3,1);width:0}#enp-quiz .enp-quiz__progress__bar__question-count{bottom:-1.3rem;font-size:.8rem;position:absolute;right:4px}#enp-quiz .enp-question__container{display:block}#enp-quiz .enp-question__form{color:#444;margin-left:auto;margin-right:auto;max-width:40pc;overflow:hidden;padding:2rem 20px 2.6rem}#enp-quiz .enp-question__form:after{clear:both;content:"";display:table}@media(min-width:700px){#enp-quiz .enp-question__form{padding:2.6rem 3rem}}#enp-quiz .enp-question__question{box-sizing:border-box;display:table;font-size:1.8rem;font-weight:700;line-height:1.2;margin-bottom:.2rem;max-width:100%;padding-bottom:.1rem;position:relative;white-space:normal}@media(min-width:25pc){#enp-quiz .enp-question__question{font-size:2rem}}#enp-quiz .enp-question__question:after{background-color:rgba(0,0,0,.2);bottom:0;content:"";height:2px;left:0;margin:auto;position:absolute;right:0;width:0}#enp-quiz .enp-question__question:focus:after{-webkit-animation:pop .8s cubic-bezier(0,0,.3,1);animation:pop .8s cubic-bezier(0,0,.3,1)}#enp-quiz .enp-question-image{margin-bottom:.4rem}#enp-quiz .enp-question__helper{font-size:1rem}#enp-quiz .enp-option__input{clip:rect(1px,1px,1px,1px);height:1px;left:-625pc;overflow:hidden;position:absolute!important;top:auto;width:1px}#enp-quiz .enp-option__input:checked+.enp-option__label:before{background-color:#3bb275}#enp-quiz .enp-option__input:focus+.enp-option__label{background:#f5f5f5;color:#444}#enp-quiz .enp-option__label{background:0;border:0;border-bottom:1px solid rgba(0,0,0,.1);color:#444;display:block;font-size:1rem;font-weight:400;line-height:1.6;padding:.8rem 0 .8rem 40px;position:relative;text-align:left;text-transform:none;transition:color .2s cubic-bezier(0,0,.3,1),background .2s cubic-bezier(0,0,.3,1);width:100%}#enp-quiz .enp-option__label:before{background-clip:content-box;background-color:transparent;border:2px solid #3bb275;border-radius:50%;content:"";height:20px;left:10px;padding:3px;position:absolute;top:.925rem;transition:all .2s;width:20px}#enp-quiz .enp-option__label:last-of-type{border-bottom:0}#enp-quiz .enp-question__container--unanswered .enp-option__label:hover{cursor:pointer}#enp-quiz .enp-question__container--unanswered .enp-option__label:hover:before{background-color:#3bb275}#enp-quiz .enp-question__submit{background:#5887c0;border:0;border-radius:3px;box-shadow:inset 0 -2px 0 rgba(0,0,0,.2);color:#fff;cursor:pointer;font-size:15px;font-weight:400;letter-spacing:.05em;line-height:1.6;padding:1em 2.8em .95em 1.4em;position:relative;text-align:center;text-transform:uppercase;transition:padding .3s cubic-bezier(0,0,.3,1)}#enp-quiz .enp-question__submit:hover{background:#3f6ea6;box-shadow:none;color:#fff}#enp-quiz .enp-question__submit:active{background:#a2bcdc;box-shadow:inset 0 2px 0 rgba(0,0,0,.1);color:#fff}#enp-quiz .enp-question__submit:focus{outline-color:#4d90fe;outline-offset:-2px;outline-style:auto;outline-width:5px}#enp-quiz .enp-question__submit__icon{-webkit-transform:translate3d(0,0,0);background:transparent;border-radius:50%;bottom:0;fill:#fff;height:1.6em;margin-bottom:auto;margin-left:.5em;margin-top:auto;position:absolute;top:0;transform:translate3d(0,0,0);transition:all .3s cubic-bezier(0,0,.3,1);width:1.6em}#enp-quiz .enp-question__submit:focus .enp-question__submit__icon,#enp-quiz .enp-question__submit:hover .enp-question__submit__icon{background:#fff;fill:#3f6ea6}#enp-quiz .enp-question__submit:focus,#enp-quiz .enp-question__submit:hover{padding-right:4em}#enp-quiz .enp-question__submit .enp-question__submit__icon{right:.8em}#enp-quiz .enp-question__fieldset--mc .enp-question__submit{height:0;opacity:0;padding-bottom:0;padding-top:0}#enp-quiz .enp-question__fieldset--mc .enp-option__input:checked~.enp-options__submit{-webkit-animation:.3s slideInTop cubic-bezier(0,0,.3,1) forwards;animation:.3s slideInTop cubic-bezier(0,0,.3,1) forwards;height:auto;margin-top:.4rem;opacity:1;padding-bottom:.95em;padding-top:1em}#enp-quiz .enp-question__fieldset--slider .enp-options__submit{margin-top:1.4rem}#enp-quiz .enp-question__container--explanation{background-color:rgba(0,0,0,.15)}#enp-quiz .enp-question__container--explanation .enp-question__submit{display:none}#enp-quiz .enp-question__container--explanation .enp-option__label{border-bottom:0;margin-bottom:5px}#enp-quiz .enp-question__container--explanation .enp-option__input--correct-clicked+.enp-option__label:before{background-color:#3bb275}#enp-quiz .enp-question__container--explanation .enp-option__input--correct+.enp-option__label{background-color:#e6f7ee;box-shadow:inset 4px 0 0 #3bb275}#enp-quiz .enp-question__container--explanation .enp-option__input--incorrect-clicked+.enp-option__label{background-color:#fff;box-shadow:inset 4px 0 0 #f14021}#enp-quiz .enp-question__container--explanation .enp-option__input--incorrect-clicked+.enp-option__label:before{background-color:#f14021;border:2px solid #f14021}#enp-quiz .enp-option__input--slide-hide+.enp-option__label{-webkit-animation:removeAnswers .6s cubic-bezier(.28,.01,0,.69) forwards;animation:removeAnswers .6s cubic-bezier(.28,.01,0,.69) forwards;height:0;margin:0}#enp-quiz .enp-explanation{background:#fff;padding:1.6rem 1.6rem 1.5rem}#enp-quiz .enp-question__fieldset--slider .enp-explanation{-webkit-animation:slideInBottom .3s cubic-bezier(0,0,.3,1) forwards;animation:slideInBottom .3s cubic-bezier(0,0,.3,1) forwards}#enp-quiz .enp-explanation--correct{box-shadow:inset 4px 0 0 #3bb275}#enp-quiz .enp-explanation--correct .enp-explanation__percentage:after{content:"% Got This Right"}#enp-quiz .enp-explanation--incorrect{box-shadow:inset 4px 0 0 #f14021}#enp-quiz .enp-explanation--incorrect .enp-explanation__percentage:after{content:"% Got This Wrong"}#enp-quiz .enp-explanation__title{font-size:.85rem;text-transform:uppercase}#enp-quiz .enp-explanation__percentage{color:#565656;font-size:.75rem;font-weight:500;margin-left:4px}#enp-quiz .enp-explanation__percentage:after{content:"%"}#enp-quiz .enp-explanation--correct .enp-explanation__title{color:#2e8c5c}#enp-quiz .enp-explanation--incorrect .enp-explanation__title{color:#d22b0d}#enp-quiz .enp-explanation__explanation{font-weight:400;margin-top:.4rem}#enp-quiz .enp-next-step{border:0;border-radius:3px;box-shadow:inset 0 -2px 0 rgba(0,0,0,.2);color:#fff;cursor:pointer;font-size:15px;font-weight:400;letter-spacing:.05em;line-height:1.6;padding:1em 2.8em .95em 1.4em;position:relative;text-align:center;text-transform:uppercase;transition:padding .3s cubic-bezier(0,0,.3,1)}#enp-quiz .enp-next-step:hover{box-shadow:none}#enp-quiz .enp-next-step:active{box-shadow:inset 0 2px 0 rgba(0,0,0,.1);color:#fff}#enp-quiz .enp-next-step:focus{outline-offset:-2px;outline-style:auto;outline-width:5px}#enp-quiz .enp-next-step__icon{-webkit-transform:translate3d(0,0,0);background:transparent;border-radius:50%;bottom:0;fill:#fff;height:1.6em;margin-bottom:auto;margin-left:.5em;margin-top:auto;position:absolute;top:0;transform:translate3d(0,0,0);transition:all .3s cubic-bezier(0,0,.3,1);width:1.6em}#enp-quiz .enp-next-step:focus .enp-next-step__icon,#enp-quiz .enp-next-step:hover .enp-next-step__icon{background:#fff;fill:#3f6ea6}#enp-quiz .enp-next-step{background:transparent;border:2px solid #5887c0;border-radius:3px;box-shadow:none;color:#5887c0;cursor:pointer;display:inline-block;font-size:15px;font-weight:400;letter-spacing:.05em;line-height:1.6;padding:.8em 2.4em .8em 1.4em;position:relative;text-align:center;text-transform:uppercase;transition:all .2s;width:100%}#enp-quiz .enp-next-step:hover{background:#3f6ea6;box-shadow:none}#enp-quiz .enp-next-step:active{background:#a2bcdc;box-shadow:inset 0 2px 0 rgba(0,0,0,.1);color:#fff}#enp-quiz .enp-next-step:focus{outline-color:#4d90fe;outline-offset:-2px;outline-style:auto;outline-width:5px}#enp-quiz .enp-next-step:focus,#enp-quiz .enp-next-step:hover{background:transparent;border:2px solid #3f6ea6;color:#3f6ea6}#enp-quiz .enp-next-step .enp-next-step__icon{fill:#5887c0;transition:all .3s cubic-bezier(0,0,.3,1)}#enp-quiz .enp-next-step:hover .enp-next-step__icon{-webkit-transform:translate3d(1em,0,0);background:#5887c0;fill:#fff;margin-right:1em;transform:translate3d(1em,0,0)}#enp-quiz .enp-question--on-deck{-webkit-transform:translatex(200px);opacity:0;position:absolute;top:0;transform:translatex(200px);z-index:-1}#enp-quiz .enp-question--show{-webkit-animation:showNextQuestion .6s cubic-bezier(0,0,.3,1) forwards;animation:showNextQuestion .6s cubic-bezier(0,0,.3,1) forwards}#enp-quiz .enp-question--remove{-webkit-animation:removeQuestion .15s cubic-bezier(0,0,.3,1) forwards;animation:removeQuestion .15s cubic-bezier(0,0,.3,1) forwards;position:absolute}#enp-quiz .enp-results__score{border-radius:50%;display:block;height:200px;margin:0 auto 1rem;position:relative;text-align:center;width:200px}#enp-quiz .enp-results__score__title{-webkit-transform:translate(-50%,-50%);color:#444;font-size:5rem;font-weight:400;left:50%;line-height:1;margin:0;position:absolute;top:50%;transform:translate(-50%,-50%)}#enp-quiz .enp-results__score__title__percentage{font-size:1.3rem;font-weight:300;position:absolute;top:1rem}#enp-quiz .enp-results__encouragement{font-size:1.8rem;font-weight:500;line-height:1.2;margin:.2rem;text-align:center}#enp-quiz .enp-results__description{margin:0 auto 1.6rem;max-width:24rem}#enp-quiz .enp-results__score__circle{-webkit-transform:rotate(-90deg);transform:rotate(-90deg)}#enp-quiz #enp-results__score__circle__path,#enp-quiz .enp-results__score__circle__bg{stroke:#ddd;stroke-width:4px}#enp-quiz #enp-results__score__circle__path{stroke:#3bb275}#enp-quiz .enp-results__score__circle__setOffset{transition:stroke-dashoffset 1.2s cubic-bezier(0,0,.3,1)}#enp-quiz .enp-results__score__circle__resetOffset{stroke-dashoffset:565.48}#enp-quiz .enp-results__share-title{font-size:.85rem;margin:2.4rem 0 1rem;text-align:center;text-transform:uppercase}#enp-quiz .enp-results__share{list-style:none;margin-left:0;text-align:center}#enp-quiz .enp-results__share__item{display:inline-block;margin-right:20px}#enp-quiz .enp-results__share__item:last-child{margin-right:0}#enp-quiz .enp-results__share__item__icon{background:#5887c0;border-radius:50%;fill:#fff!important;height:2.4rem;padding:.6rem;width:2.4rem}#enp-quiz .enp-results__share__item__icon--facebook{background-color:#3a5795}#enp-quiz .enp-results__share__item__icon--twitter{background-color:#4099ff}#enp-quiz .enp-quiz-restart__container{text-align:center}#enp-quiz .enp-question__container--error{-webkit-animation:errorContainer .3s cubic-bezier(0,0,.3,1) forwards;animation:errorContainer .3s cubic-bezier(0,0,.3,1) forwards;padding:1rem 10px}#enp-quiz .enp-callout{font-size:.8rem;padding:.4rem;text-align:right}#enp-quiz .enp-slider{margin-bottom:1.6rem}#enp-quiz .enp-slider-input__container{align-items:center;display:flex;justify-content:center;margin:1.6rem auto;position:relative}#enp-quiz .enp-slider-input__label{color:#5e5e5e;display:block;font-size:.85rem;font-weight:400;text-transform:uppercase}#enp-quiz .enp-slider-input__prefix,#enp-quiz .enp-slider-input__suffix{font-size:1rem}#enp-quiz .enp-slider-input__prefix{margin-right:.2rem;white-space:pre}#enp-quiz .enp-slider-input__suffix{margin-left:.2rem;white-space:pre}#enp-quiz .enp-slider-input__input{background:#fff;border:1px solid #aaa;border-radius:3px;font-family:tablet-gothic,helvetica neue,helvetica,arial,sans-serif;font-size:1rem;margin-bottom:0;max-width:100%;padding:.75rem;transition:all .25s cubic-bezier(0,0,.3,1);width:auto}@media(min-width:700px){#enp-quiz .enp-slider-input__input{padding:.8rem}}#enp-quiz .enp-slider-input__input--incorrect{color:#f14021}#enp-quiz .enp-slider-input__input--correct{color:#319461}#enp-quiz .enp-slider-input__input--invalid-animation{box-shadow:0 0 2px 1px #e97763}#enp-quiz .enp-slider_input__range-helper{bottom:-1.2rem;font-size:.8rem;position:absolute}#enp-quiz .enp-slider_input__range-helper--low{left:0}#enp-quiz .enp-slider_input__range-helper--high{right:0}#enp-quiz .enp-slider-input__range-helper__number{color:#666;position:relative}#enp-quiz .ui-slider-range-show-correct__tooltip-container{position:relative}#enp-quiz .ui-slider-range-show-correct__tooltip{background-color:#fff;border:2px solid #3bb275;border-radius:50%;height:1.1rem;margin-left:-.55rem;position:absolute;top:-.4rem;width:1.1rem;z-index:9999}#enp-quiz .ui-slider-range-show-correct__tooltip--low{left:0}#enp-quiz .ui-slider-range-show-correct__tooltip--high{right:-.55rem}#enp-quiz .ui-slider-range-show-correct__tooltip__text{color:#287950;display:inline-block;font-size:.825rem;min-width:100%;position:relative;text-align:center;text-shadow:0 1px 0 #fff;top:-1.35rem}#enp-quiz .enp-slider{background:#ddd;position:relative;text-align:left}#enp-quiz .enp-slider .ui-helper-hidden{display:none}#enp-quiz .enp-slider .ui-helper-hidden-accessible{border:0;clip:rect(0 0 0 0);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px}#enp-quiz .enp-slider .ui-helper-reset{border:0;font-size:100%;line-height:1.3;list-style:none;margin:0;outline:0;padding:0;text-decoration:none}#enp-quiz .enp-slider .ui-helper-clearfix:after,#enp-quiz .enp-slider .ui-helper-clearfix:before{border-collapse:collapse;content:"";display:table}#enp-quiz .enp-slider .ui-helper-clearfix:after{clear:both}#enp-quiz .enp-slider .ui-helper-clearfix{min-height:0}#enp-quiz .enp-slider .ui-helper-zfix{filter:alpha(opacity=0);height:100%;left:0;opacity:0;position:absolute;top:0;width:100%}#enp-quiz .enp-slider .ui-front{z-index:100}#enp-quiz .enp-slider .ui-state-disabled{cursor:default!important}#enp-quiz .enp-slider .ui-icon{background-repeat:no-repeat;display:block;overflow:hidden;text-indent:-99999px}#enp-quiz .enp-slider .ui-widget-overlay{height:100%;left:0;position:fixed;top:0;width:100%}#enp-quiz .enp-slider .ui-slider-handle{background:#fff;border:1px solid #aaa;border-radius:50%;cursor:default;height:1.2rem;margin-left:-.6rem;position:absolute;top:-.4rem;touch-action:none;transition:opacity .2s cubic-bezier(0,0,.3,1),height .18s cubic-bezier(0,0,.3,1),width .18s cubic-bezier(0,0,.3,1),transform .18s cubic-bezier(0,0,.3,1),-webkit-transform .18s cubic-bezier(0,0,.3,1);width:1.2rem;z-index:2}@media(max-width:699px){#enp-quiz .enp-slider .ui-slider-handle{-webkit-transform:rotate(225deg);height:2rem;margin-left:-1rem;top:-.85rem;transform:rotate(225deg);width:2rem}}#enp-quiz .enp-slider .ui-slider-handle:focus{box-shadow:0 0 3px 1px #4d90fe;outline:0}@media(max-width:699px){#enp-quiz .enp-slider .ui-slider-handle.ui-state-active{-webkit-transform:translate3d(-.2rem,-.8rem,0) rotate(225deg);border-top-left-radius:0;height:2.2rem;transform:translate3d(-.2rem,-.8rem,0) rotate(225deg);width:2.2rem}}#enp-quiz .enp-slider .ui-slider-handle--correct,#enp-quiz .enp-slider .ui-slider-handle--incorrect{height:1.1rem;margin-left:-.55rem;top:-.4rem;width:1.1rem}#enp-quiz .enp-slider .ui-slider-handle--incorrect{border:2px solid #f14021;z-index:1}#enp-quiz .enp-slider .ui-slider-handle--correct{border:2px solid #3bb275;z-index:99999}#enp-quiz .enp-slider .ui-slider-range{background-position:0 0;border:0;display:block;font-size:.7rem;height:100%;position:absolute;top:0;z-index:1}#enp-quiz .enp-slider .ui-slider-range-show-correct{background:#3bb275;z-index:9}#enp-quiz .enp-slider .ui-slider-range-min{background:#3bb275;left:0}#enp-quiz .enp-slider .ui-slider-range-max{right:0}#enp-quiz .enp-slider.ui-state-disabled .ui-slider-handle,#enp-quiz .enp-slider.ui-state-disabled .ui-slider-range{-webkit-filter:inherit;filter:inherit}#enp-quiz .ui-slider-horizontal{height:.3rem}#enp-quiz .enp-question__answered .enp-slider{background:#bbb}#enp-quiz .enp-question__answered .ui-slider-range-min{background:#fff} \ No newline at end of file +a,abbr,acronym,address,applet,big,blockquote,body,caption,cite,code,dd,del,dfn,div,dl,dt,em,fieldset,font,form,h1,h2,h3,h4,h5,h6,html,iframe,ins,kbd,label,legend,li,object,ol,p,pre,q,s,samp,small,span,strike,strong,sub,sup,table,tbody,td,tfoot,th,thead,tr,tt,ul,var{border:0;font-family:inherit;font-size:100%;font-style:inherit;font-weight:inherit;margin:0;outline:0;padding:0;vertical-align:baseline}html{-ms-text-size-adjust:100%;-webkit-text-size-adjust:100%;font-size:100%;overflow-y:scroll}body{background:#fff;overflow:hidden}article,aside,details,figcaption,figure,footer,header,nav,section{display:block}ol,ul{list-style:none}table{border-collapse:separate;border-spacing:0}caption,td,th{font-weight:400;text-align:left}blockquote:after,blockquote:before,q:after,q:before{content:""}blockquote,q{quotes:"" ""}a:focus{outline:thin dotted}a:active,a:hover{outline:0}a img{border:0}html{box-sizing:border-box}*,*:after,*:before{box-sizing:inherit}html{font-size:1pc!important}html #enp-quiz{border-radius:3px;box-sizing:border-box}body #enp-quiz{background:#fff;overflow:hidden}#enp-quiz *,#enp-quiz *:after,#enp-quiz *:before{box-sizing:inherit}#enp-quiz ol,#enp-quiz ul{margin:0 0 1.6rem 1.25rem;padding:0}#enp-quiz textarea{margin-bottom:1rem}#enp-quiz button,#enp-quiz button:active,#enp-quiz button:focus,#enp-quiz button:hover,#enp-quiz iframe,#enp-quiz input[type=button],#enp-quiz input[type=button]:active,#enp-quiz input[type=button]:focus,#enp-quiz input[type=button]:hover,#enp-quiz input[type=reset],#enp-quiz input[type=reset]:active,#enp-quiz input[type=reset]:focus,#enp-quiz input[type=reset]:hover,#enp-quiz input[type=submit],#enp-quiz input[type=submit]:active,#enp-quiz input[type=submit]:focus,#enp-quiz input[type=submit]:hover{border:0}#enp-quiz .enp-screen-reader-text{clip:rect(1px,1px,1px,1px);height:1px;left:-625pc;overflow:hidden;position:absolute!important;top:auto;width:1px}#enp-quiz .enp-screen-reader-text:active,#enp-quiz .enp-screen-reader-text:focus,#enp-quiz .enp-screen-reader-text:hover{background-color:#f1f1f1;border-radius:3px;box-shadow:0 0 2px 2px rgba(0,0,0,.6);clip:auto!important;color:#21759b;display:block;font-size:14px;font-weight:700;height:auto;left:5px;line-height:normal;padding:15px 23px 14px;text-decoration:none;top:5px;width:auto;z-index:100000}#enp-quiz .enp-quiz-message{background:#fff;border:1px solid #eee;border-bottom:1px solid #ccc;margin:1.6rem auto;max-width:25pc;padding:1rem .375rem}#enp-quiz .enp-quiz-message:after{clear:both;content:"";display:table}#enp-quiz .enp-quiz-message__title{font-size:.85rem;text-transform:uppercase}#enp-quiz .enp-message__list{font-size:1.1rem;list-style:none;margin-bottom:0;margin-left:0}#enp-quiz .enp-quiz-message--error{-webkit-animation:slideInTop .3s cubic-bezier(0,0,.3,1);animation:slideInTop .3s cubic-bezier(0,0,.3,1);border-left:6px solid #f14021}#enp-quiz .enp-quiz-message__title--error{color:#db2c0e}#enp-quiz .enp-quiz-message--success{border-left:6px solid #3bb275;color:#319461}#enp-quiz .enp-quiz-message__title--success{color:#319461}body{color:#444;font-family:tablet-gothic,helvetica neue,helvetica,arial,sans-serif;font-size:1em;font-weight:400;line-height:1.6}@media(min-width:700px){body{font-size:1.3em}}#enp-quiz h1,#enp-quiz h2,#enp-quiz h3,#enp-quiz h4,#enp-quiz h5,#enp-quiz h6{clear:both;color:#444;font-family:tablet-gothic,helvetica neue,helvetica,arial,sans-serif;font-weight:700;line-height:1.2em;margin:0 0 .2rem}#enp-quiz h1{font-size:2em}#enp-quiz h2{font-size:1.75em}#enp-quiz h3{font-size:1.475em}#enp-quiz h4{font-size:1.3em}#enp-quiz h5{font-size:1.125em}#enp-quiz h6{font-size:1em}#enp-quiz p+h1,#enp-quiz p+h2,#enp-quiz p+h3,#enp-quiz p+h4,#enp-quiz p+h5,#enp-quiz p+h6,#enp-quiz ul+h1,#enp-quiz ul+h2,#enp-quiz ul+h3,#enp-quiz ul+h4,#enp-quiz ul+h5,#enp-quiz ul+h6{margin-top:1.8em}#enp-quiz p{font-size:.85em;font-weight:300;margin-bottom:1.125em}#enp-quiz ol,#enp-quiz ul{margin:0 0 1.6em 1.25em}#enp-quiz ul{list-style:disc}#enp-quiz ol{list-style:decimal}#enp-quiz li>ol,#enp-quiz li>ul{margin-bottom:0;margin-left:1.6em}#enp-quiz b,#enp-quiz strong{font-weight:700}#enp-quiz cite,#enp-quiz dfn,#enp-quiz em{font-family:georgia,times,serif;font-style:italic}#enp-quiz pre{background:#eee;font-family:Courier\ 10 Pitch,Courier,monospace;font-size:.95em;line-height:1.6;margin-bottom:1.6em;max-width:100%;overflow:auto;padding:1.6em}#enp-quiz .code,#enp-quiz code,#enp-quiz kbd,#enp-quiz tt,#enp-quiz var{font:.7em Monaco,Consolas,"Andale Mono","DejaVu Sans Mono",monospace}#enp-quiz figure{margin:0}#enp-quiz img{height:auto;max-width:100%}#enp-quiz a{color:#333f48;text-decoration:none;touch-action:manipulation;transition:color .2s}#enp-quiz a .enp-icon{fill:#333f48}#enp-quiz a:active,#enp-quiz a:focus,#enp-quiz a:hover{color:#1e252a}#enp-quiz a:active .enp-icon,#enp-quiz a:focus .enp-icon,#enp-quiz a:hover .enp-icon{fill:#1e252a}#enp-quiz button:focus{outline-color:#4d90fe;outline-offset:-2px;outline-style:auto;outline-width:5px}#enp-quiz .enp-btn{background:#333f48;border:0;border-radius:3px;box-shadow:inset 0 -2px 0 rgba(0,0,0,.2);color:#fff;cursor:pointer;font-size:15px;font-weight:400;letter-spacing:.05em;line-height:1.6;padding:.85em 1.4em .75em;text-align:center;text-transform:uppercase;transition:all .2s}#enp-quiz .enp-btn:hover{background:#1e252a;box-shadow:none;color:#fff}#enp-quiz .enp-btn:active{background:#5d7384;box-shadow:inset 0 2px 0 rgba(0,0,0,.1);color:#fff}#enp-quiz .enp-btn:focus{outline-color:#4d90fe;outline-offset:-2px;outline-style:auto;outline-width:5px}#enp-quiz .enp-btn--add{background:0;border:3px dashed #666;border-radius:3px;box-shadow:none;color:#545454;cursor:pointer;font-size:15px;font-weight:400;letter-spacing:.05em;line-height:1.6;padding:.85em 1.4em .75em;text-align:center;text-transform:uppercase;transition:all .2s;width:100%}#enp-quiz .enp-btn--add:hover{box-shadow:none;color:#fff}#enp-quiz .enp-btn--add:active{background:#5d7384;box-shadow:inset 0 2px 0 rgba(0,0,0,.1);color:#fff}#enp-quiz .enp-btn--add:focus{outline-color:#4d90fe;outline-offset:-2px;outline-style:auto;outline-width:5px}#enp-quiz .enp-btn--add:focus,#enp-quiz .enp-btn--add:hover{background:hsla(0,0%,100%,.9);border:3px dashed #444;color:#444}#enp-quiz .enp-btn--disabled{cursor:default;opacity:.65}#enp-quiz .enp-btn--enabled{-webkit-animation:expand .6s;animation:expand .6s}#enp-quiz .enp-icon{height:24px;transition:all .2s;width:24px}#enp-quiz .enp-page-title{font-size:1.6rem}#enp-quiz fieldset{border:0;margin:0;padding:0}.enp-label{color:#5e5e5e;display:block;font-size:.85rem;font-weight:400;text-transform:uppercase}.enp-legend{border:0;color:#5e5e5e;display:block;font-size:.85rem;font-weight:400;margin-bottom:.2rem;padding-top:1.6rem;text-transform:uppercase}.enp-input{background:#fff;border:1px solid #aaa;border-radius:3px;font-family:tablet-gothic,helvetica neue,helvetica,arial,sans-serif;font-size:1rem;margin-bottom:1.2rem;max-width:100%;padding:.8rem .5rem;width:20rem}@media(min-width:700px){.enp-input{padding:.8rem}}.enp-input:-ms-input-placeholder,.enp-input::-ms-input-placeholder,.enp-input::-webkit-input-placeholder,.enp-input::placeholder,.enp-textarea:-ms-input-placeholder,.enp-textarea::-ms-input-placeholder,.enp-textarea::-webkit-input-placeholder,.enp-textarea::placeholder{color:#aaa;font-family:tablet-gothic,helvetica neue,helvetica,arial,sans-serif;font-weight:300}@-webkit-keyframes removeAnswers{0%{-webkit-transform:translate3d(0,0,0);height:auto;opacity:1;transform:translate3d(0,0,0)}10%{-webkit-transform:translate3d(0,0,0);opacity:1;transform:translate3d(0,0,0)}to{-webkit-transform:translate3d(-150px,0,0);display:none;height:0;opacity:0;padding:0;transform:translate3d(-150px,0,0);z-index:-1}}@keyframes removeAnswers{0%{-webkit-transform:translate3d(0,0,0);height:auto;opacity:1;transform:translate3d(0,0,0)}10%{-webkit-transform:translate3d(0,0,0);opacity:1;transform:translate3d(0,0,0)}to{-webkit-transform:translate3d(-150px,0,0);display:none;height:0;opacity:0;padding:0;transform:translate3d(-150px,0,0);z-index:-1}}@-webkit-keyframes removeQuestion{0%,15%{-webkit-transform:translatex(0);opacity:1;transform:translatex(0)}to{-webkit-transform:translatex(-150px);opacity:0;transform:translatex(-150px)}}@keyframes removeQuestion{0%,15%{-webkit-transform:translatex(0);opacity:1;transform:translatex(0)}to{-webkit-transform:translatex(-150px);opacity:0;transform:translatex(-150px)}}@-webkit-keyframes showNextQuestion{0%{-webkit-transform:translatex(90pt);opacity:0;transform:translatex(90pt)}to{-webkit-transform:translatex(0);opacity:1;transform:translatex(0)}}@keyframes showNextQuestion{0%{-webkit-transform:translatex(90pt);opacity:0;transform:translatex(90pt)}to{-webkit-transform:translatex(0);opacity:1;transform:translatex(0)}}@-webkit-keyframes slideInTop{0%{-webkit-transform:translate3d(0,-20px,0);height:auto;opacity:0;transform:translate3d(0,-20px,0)}to{-webkit-transform:translate3d(0,0,0);height:auto;opacity:1;transform:translate3d(0,0,0)}}@keyframes slideInTop{0%{-webkit-transform:translate3d(0,-20px,0);height:auto;opacity:0;transform:translate3d(0,-20px,0)}to{-webkit-transform:translate3d(0,0,0);height:auto;opacity:1;transform:translate3d(0,0,0)}}@-webkit-keyframes slideInBottom{0%{-webkit-transform:translate3d(0,20px,0);opacity:0;transform:translate3d(0,20px,0)}to{-webkit-transform:translate3d(0,0,0);opacity:1;transform:translate3d(0,0,0)}}@keyframes slideInBottom{0%{-webkit-transform:translate3d(0,20px,0);opacity:0;transform:translate3d(0,20px,0)}to{-webkit-transform:translate3d(0,0,0);opacity:1;transform:translate3d(0,0,0)}}@-webkit-keyframes flashRedShadow{0%{background:#f14021}to{background:#fff}}@keyframes flashRedShadow{0%{background:#f14021}to{background:#fff}}@-webkit-keyframes errorContainer{0%{}to{background-color:rgba(241,64,33,.2)}}@keyframes errorContainer{0%{}to{background-color:rgba(241,64,33,.2)}}@-webkit-keyframes pop{0%{opacity:1;width:0}to{opacity:0;width:40%}30%{width:100%}80%{opacity:1;width:100%}}@keyframes pop{0%{opacity:1;width:0}to{opacity:0;width:40%}30%{width:100%}80%{opacity:1;width:100%}}.spinner{margin:0 auto;text-align:center;width:70px}.spinner>div{-webkit-animation:sk-bouncedelay 1.4s infinite ease-in-out both;animation:sk-bouncedelay 1.4s infinite ease-in-out both;background-color:#333;border-radius:100%;display:inline-block;height:18px;width:18px}.spinner .bounce1{-webkit-animation-delay:-.32s;animation-delay:-.32s}.spinner .bounce2{-webkit-animation-delay:-.16s;animation-delay:-.16s}@-webkit-keyframes sk-bouncedelay{0%,80%,to{-webkit-transform:scale(0)}40%{-webkit-transform:scale(1)}}@keyframes sk-bouncedelay{0%,80%,to{-webkit-transform:scale(0);transform:scale(0)}40%{-webkit-transform:scale(1);transform:scale(1)}}#enp-quiz{background:transparent}#enp-quiz .enp-quiz__container{background:#fff;border:1px solid #ddd;padding:0;position:relative}#enp-quiz .enp-quiz__header{border-bottom:1px solid #ddd;position:relative}#enp-quiz .enp-quiz__title{font-size:.85rem;font-weight:500;letter-spacing:.01rem;padding:.6rem 1rem;text-transform:uppercase}#enp-quiz .enp-quiz__title--hide{display:none}#enp-quiz .enp-quiz__progress{bottom:0;height:0;left:0;position:absolute;right:0}#enp-quiz .enp-quiz__progress__bar{background:#3bb275;height:3px;min-width:2rem;position:relative;transition:all .5s cubic-bezier(0,0,.3,1);width:0}#enp-quiz .enp-quiz__progress__bar__question-count{bottom:.7rem;font-size:.8rem;position:absolute;right:1rem}#enp-quiz .enp-question__container{display:block}#enp-quiz .enp-question__form{color:#444;margin-left:auto;margin-right:auto;max-width:40pc;overflow:hidden;padding:2rem 20px 2.6rem}#enp-quiz .enp-question__form:after{clear:both;content:"";display:table}@media(min-width:700px){#enp-quiz .enp-question__form{padding:2.6rem 3rem}}#enp-quiz .enp-question__question{box-sizing:border-box;display:table;font-size:1.8rem;font-weight:700;line-height:1.2;margin-bottom:.2rem;max-width:100%;padding-bottom:.1rem;position:relative;white-space:normal}@media(min-width:25pc){#enp-quiz .enp-question__question{font-size:2rem}}#enp-quiz .enp-question__question:after{background-color:rgba(0,0,0,.2);bottom:0;content:"";height:2px;left:0;margin:auto;position:absolute;right:0;width:0}#enp-quiz .enp-question__question:focus:after{-webkit-animation:pop .8s cubic-bezier(0,0,.3,1);animation:pop .8s cubic-bezier(0,0,.3,1)}#enp-quiz .enp-question-image{margin-bottom:.4rem}#enp-quiz .enp-question__helper{font-size:1rem}#enp-quiz .enp-option__input{clip:rect(1px,1px,1px,1px);height:1px;left:-625pc;overflow:hidden;position:absolute!important;top:auto;width:1px}#enp-quiz .enp-option__input:checked+.enp-option__label:before{background-color:#3bb275}#enp-quiz .enp-option__input:focus+.enp-option__label{background:#f5f5f5;color:#444}#enp-quiz .enp-option__label{background:0;border:0;border-bottom:1px solid rgba(0,0,0,.1);color:#444;display:block;font-size:1rem;font-weight:400;line-height:1.6;padding:.8rem 0 .8rem 40px;position:relative;text-align:left;text-transform:none;transition:color .2s cubic-bezier(0,0,.3,1),background .2s cubic-bezier(0,0,.3,1);width:100%}#enp-quiz .enp-option__label:before{background-clip:content-box;background-color:transparent;border:2px solid #3bb275;border-radius:50%;content:"";height:20px;left:10px;padding:3px;position:absolute;top:.925rem;transition:all .2s;width:20px}#enp-quiz .enp-option__label:last-of-type{border-bottom:0}#enp-quiz .enp-question__container--unanswered .enp-option__label:hover{cursor:pointer}#enp-quiz .enp-question__container--unanswered .enp-option__label:hover:before{background-color:#3bb275}#enp-quiz .enp-question__submit{background:#333f48;border:0;border-radius:3px;box-shadow:inset 0 -2px 0 rgba(0,0,0,.2);color:#fff;cursor:pointer;font-size:15px;font-weight:400;letter-spacing:.05em;line-height:1.6;padding:1em 2.8em .95em 1.4em;position:relative;text-align:center;text-transform:uppercase;transition:padding .3s cubic-bezier(0,0,.3,1)}#enp-quiz .enp-question__submit:hover{background:#1e252a;box-shadow:none;color:#fff}#enp-quiz .enp-question__submit:active{background:#5d7384;box-shadow:inset 0 2px 0 rgba(0,0,0,.1);color:#fff}#enp-quiz .enp-question__submit:focus{outline-color:#4d90fe;outline-offset:-2px;outline-style:auto;outline-width:5px}#enp-quiz .enp-question__submit__icon{-webkit-transform:translate3d(0,0,0);background:transparent;border-radius:50%;bottom:0;fill:#fff;height:1.6em;margin-bottom:auto;margin-left:.5em;margin-top:auto;position:absolute;top:0;transform:translate3d(0,0,0);transition:all .3s cubic-bezier(0,0,.3,1);width:1.6em}#enp-quiz .enp-question__submit:focus .enp-question__submit__icon,#enp-quiz .enp-question__submit:hover .enp-question__submit__icon{background:#fff;fill:#1e252a}#enp-quiz .enp-question__submit:focus,#enp-quiz .enp-question__submit:hover{padding-right:4em}#enp-quiz .enp-question__submit .enp-question__submit__icon{right:.8em}#enp-quiz .enp-question__fieldset--mc .enp-question__submit{height:0;opacity:0;padding-bottom:0;padding-top:0}#enp-quiz .enp-question__fieldset--mc .enp-option__input:checked~.enp-options__submit{-webkit-animation:.3s slideInTop cubic-bezier(0,0,.3,1) forwards;animation:.3s slideInTop cubic-bezier(0,0,.3,1) forwards;height:auto;margin-top:.4rem;opacity:1;padding-bottom:.95em;padding-top:1em}#enp-quiz .enp-question__fieldset--slider .enp-options__submit{margin-top:1.4rem}#enp-quiz .enp-question__container--explanation{background-color:rgba(0,0,0,.15)}#enp-quiz .enp-question__container--explanation .enp-question__submit{display:none}#enp-quiz .enp-question__container--explanation .enp-option__label{border-bottom:0;margin-bottom:5px}#enp-quiz .enp-question__container--explanation .enp-option__input--correct-clicked+.enp-option__label:before{background-color:#3bb275}#enp-quiz .enp-question__container--explanation .enp-option__input--correct+.enp-option__label{background-color:#e6f7ee;box-shadow:inset 4px 0 0 #3bb275}#enp-quiz .enp-question__container--explanation .enp-option__input--incorrect-clicked+.enp-option__label{background-color:#fff;box-shadow:inset 4px 0 0 #f14021}#enp-quiz .enp-question__container--explanation .enp-option__input--incorrect-clicked+.enp-option__label:before{background-color:#f14021;border:2px solid #f14021}#enp-quiz .enp-option__input--slide-hide+.enp-option__label{-webkit-animation:removeAnswers .6s cubic-bezier(.28,.01,0,.69) forwards;animation:removeAnswers .6s cubic-bezier(.28,.01,0,.69) forwards;height:0;margin:0}#enp-quiz .enp-explanation{background:#fff;padding:1.6rem 1.6rem 1.5rem}#enp-quiz .enp-question__fieldset--slider .enp-explanation{-webkit-animation:slideInBottom .3s cubic-bezier(0,0,.3,1) forwards;animation:slideInBottom .3s cubic-bezier(0,0,.3,1) forwards}#enp-quiz .enp-explanation--correct{box-shadow:inset 4px 0 0 #3bb275}#enp-quiz .enp-explanation--correct .enp-explanation__percentage:after{content:"% Got This Right"}#enp-quiz .enp-explanation--incorrect{box-shadow:inset 4px 0 0 #f14021}#enp-quiz .enp-explanation--incorrect .enp-explanation__percentage:after{content:"% Got This Wrong"}#enp-quiz .enp-explanation__title{font-size:.85rem;text-transform:uppercase}#enp-quiz .enp-explanation__percentage{color:#565656;font-size:.75rem;font-weight:500;margin-left:4px}#enp-quiz .enp-explanation__percentage:after{content:"%"}#enp-quiz .enp-explanation--correct .enp-explanation__title{color:#2e8c5c}#enp-quiz .enp-explanation--incorrect .enp-explanation__title{color:#d22b0d}#enp-quiz .enp-explanation__explanation{font-weight:400;margin-top:.4rem}#enp-quiz .enp-next-step{border:0;border-radius:3px;box-shadow:inset 0 -2px 0 rgba(0,0,0,.2);color:#fff;cursor:pointer;font-size:15px;font-weight:400;letter-spacing:.05em;line-height:1.6;padding:1em 2.8em .95em 1.4em;position:relative;text-align:center;text-transform:uppercase;transition:padding .3s cubic-bezier(0,0,.3,1)}#enp-quiz .enp-next-step:hover{box-shadow:none}#enp-quiz .enp-next-step:active{box-shadow:inset 0 2px 0 rgba(0,0,0,.1);color:#fff}#enp-quiz .enp-next-step:focus{outline-offset:-2px;outline-style:auto;outline-width:5px}#enp-quiz .enp-next-step__icon{-webkit-transform:translate3d(0,0,0);background:transparent;border-radius:50%;bottom:0;fill:#fff;height:1.6em;margin-bottom:auto;margin-left:.5em;margin-top:auto;position:absolute;top:0;transform:translate3d(0,0,0);transition:all .3s cubic-bezier(0,0,.3,1);width:1.6em}#enp-quiz .enp-next-step:focus .enp-next-step__icon,#enp-quiz .enp-next-step:hover .enp-next-step__icon{background:#fff;fill:#1e252a}#enp-quiz .enp-next-step{background:transparent;border:2px solid #333f48;border-radius:3px;box-shadow:none;color:#333f48;cursor:pointer;display:inline-block;font-size:15px;font-weight:400;letter-spacing:.05em;line-height:1.6;padding:.8em 2.4em .8em 1.4em;position:relative;text-align:center;text-transform:uppercase;transition:all .2s;width:100%}#enp-quiz .enp-next-step:hover{background:#1e252a;box-shadow:none}#enp-quiz .enp-next-step:active{background:#5d7384;box-shadow:inset 0 2px 0 rgba(0,0,0,.1);color:#fff}#enp-quiz .enp-next-step:focus{outline-color:#4d90fe;outline-offset:-2px;outline-style:auto;outline-width:5px}#enp-quiz .enp-next-step:focus,#enp-quiz .enp-next-step:hover{background:transparent;border:2px solid #1e252a;color:#1e252a}#enp-quiz .enp-next-step .enp-next-step__icon{fill:#333f48;transition:all .3s cubic-bezier(0,0,.3,1)}#enp-quiz .enp-next-step:hover .enp-next-step__icon{-webkit-transform:translate3d(1em,0,0);background:#333f48;fill:#fff;margin-right:1em;transform:translate3d(1em,0,0)}#enp-quiz .enp-question--on-deck{-webkit-transform:translatex(200px);opacity:0;position:absolute;top:0;transform:translatex(200px);z-index:-1}#enp-quiz .enp-question--show{-webkit-animation:showNextQuestion .6s cubic-bezier(0,0,.3,1) forwards;animation:showNextQuestion .6s cubic-bezier(0,0,.3,1) forwards}#enp-quiz .enp-question--remove{-webkit-animation:removeQuestion .15s cubic-bezier(0,0,.3,1) forwards;animation:removeQuestion .15s cubic-bezier(0,0,.3,1) forwards;position:absolute}#enp-quiz .enp-results__score{border-radius:50%;display:block;height:200px;margin:0 auto 1rem;position:relative;text-align:center;width:200px}#enp-quiz .enp-results__score__title{-webkit-transform:translate(-50%,-50%);color:#444;font-size:5rem;font-weight:400;left:50%;line-height:1;margin:0;position:absolute;top:50%;transform:translate(-50%,-50%)}#enp-quiz .enp-results__score__title__percentage{font-size:1.3rem;font-weight:300;position:absolute;top:1rem}#enp-quiz .enp-results__encouragement{font-size:1.8rem;font-weight:500;line-height:1.2;margin:.2rem;text-align:center}#enp-quiz .enp-results__description{margin:0 auto 1.6rem;max-width:24rem}#enp-quiz .enp-results__score__circle{-webkit-transform:rotate(-90deg);transform:rotate(-90deg)}#enp-quiz #enp-results__score__circle__path,#enp-quiz .enp-results__score__circle__bg{stroke:#ddd;stroke-width:4px}#enp-quiz #enp-results__score__circle__path{stroke:#3bb275}#enp-quiz .enp-results__score__circle__setOffset{transition:stroke-dashoffset 1.2s cubic-bezier(0,0,.3,1)}#enp-quiz .enp-results__score__circle__resetOffset{stroke-dashoffset:565.48}#enp-quiz .enp-results__share-title{font-size:.85rem;margin:2.4rem 0 1rem;text-align:center;text-transform:uppercase}#enp-quiz .enp-results__share{list-style:none;margin-left:0;text-align:center}#enp-quiz .enp-results__share__item{display:inline-block;margin-right:20px}#enp-quiz .enp-results__share__item:last-child{margin-right:0}#enp-quiz .enp-results__share__item__icon{background:#333f48;border-radius:50%;fill:#fff!important;height:2.4rem;padding:.6rem;width:2.4rem}#enp-quiz .enp-results__share__item__icon--facebook{background-color:#3a5795}#enp-quiz .enp-results__share__item__icon--twitter{background-color:#4099ff}#enp-quiz .enp-quiz-restart__container{text-align:center}#enp-quiz .enp-question__container--error{-webkit-animation:errorContainer .3s cubic-bezier(0,0,.3,1) forwards;animation:errorContainer .3s cubic-bezier(0,0,.3,1) forwards;padding:1rem 10px}#enp-quiz .enp-callout{font-size:.8rem;padding:.4rem;text-align:right}#enp-quiz .enp-slider{margin-bottom:1.6rem}#enp-quiz .enp-slider-input__container{align-items:center;display:flex;justify-content:center;margin:1.6rem auto;position:relative}#enp-quiz .enp-slider-input__label{color:#5e5e5e;display:block;font-size:.85rem;font-weight:400;text-transform:uppercase}#enp-quiz .enp-slider-input__prefix,#enp-quiz .enp-slider-input__suffix{font-size:1rem}#enp-quiz .enp-slider-input__prefix{margin-right:.2rem;white-space:pre}#enp-quiz .enp-slider-input__suffix{margin-left:.2rem;white-space:pre}#enp-quiz .enp-slider-input__input{background:#fff;border:1px solid #aaa;border-radius:3px;font-family:tablet-gothic,helvetica neue,helvetica,arial,sans-serif;font-size:1rem;margin-bottom:0;max-width:100%;padding:.75rem;transition:all .25s cubic-bezier(0,0,.3,1);width:auto}@media(min-width:700px){#enp-quiz .enp-slider-input__input{padding:.8rem}}#enp-quiz .enp-slider-input__input--incorrect{color:#f14021}#enp-quiz .enp-slider-input__input--correct{color:#319461}#enp-quiz .enp-slider-input__input--invalid-animation{box-shadow:0 0 2px 1px #e97763}#enp-quiz .enp-slider_input__range-helper{bottom:-1.2rem;font-size:.8rem;position:absolute}#enp-quiz .enp-slider_input__range-helper--low{left:0}#enp-quiz .enp-slider_input__range-helper--high{right:0}#enp-quiz .enp-slider-input__range-helper__number{color:#666;position:relative}#enp-quiz .ui-slider-range-show-correct__tooltip-container{position:relative}#enp-quiz .ui-slider-range-show-correct__tooltip{background-color:#fff;border:2px solid #3bb275;border-radius:50%;height:1.1rem;margin-left:-.55rem;position:absolute;top:-.4rem;width:1.1rem;z-index:9999}#enp-quiz .ui-slider-range-show-correct__tooltip--low{left:0}#enp-quiz .ui-slider-range-show-correct__tooltip--high{right:-.55rem}#enp-quiz .ui-slider-range-show-correct__tooltip__text{color:#287950;display:inline-block;font-size:.825rem;min-width:100%;position:relative;text-align:center;text-shadow:0 1px 0 #fff;top:-1.35rem}#enp-quiz .enp-slider{background:#ddd;position:relative;text-align:left}#enp-quiz .enp-slider .ui-helper-hidden{display:none}#enp-quiz .enp-slider .ui-helper-hidden-accessible{border:0;clip:rect(0 0 0 0);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px}#enp-quiz .enp-slider .ui-helper-reset{border:0;font-size:100%;line-height:1.3;list-style:none;margin:0;outline:0;padding:0;text-decoration:none}#enp-quiz .enp-slider .ui-helper-clearfix:after,#enp-quiz .enp-slider .ui-helper-clearfix:before{border-collapse:collapse;content:"";display:table}#enp-quiz .enp-slider .ui-helper-clearfix:after{clear:both}#enp-quiz .enp-slider .ui-helper-clearfix{min-height:0}#enp-quiz .enp-slider .ui-helper-zfix{filter:alpha(opacity=0);height:100%;left:0;opacity:0;position:absolute;top:0;width:100%}#enp-quiz .enp-slider .ui-front{z-index:100}#enp-quiz .enp-slider .ui-state-disabled{cursor:default!important}#enp-quiz .enp-slider .ui-icon{background-repeat:no-repeat;display:block;overflow:hidden;text-indent:-99999px}#enp-quiz .enp-slider .ui-widget-overlay{height:100%;left:0;position:fixed;top:0;width:100%}#enp-quiz .enp-slider .ui-slider-handle{background:#fff;border:1px solid #aaa;border-radius:50%;cursor:default;height:1.2rem;margin-left:-.6rem;position:absolute;top:-.4rem;touch-action:none;transition:opacity .2s cubic-bezier(0,0,.3,1),height .18s cubic-bezier(0,0,.3,1),width .18s cubic-bezier(0,0,.3,1),transform .18s cubic-bezier(0,0,.3,1),-webkit-transform .18s cubic-bezier(0,0,.3,1);width:1.2rem;z-index:2}@media(max-width:699px){#enp-quiz .enp-slider .ui-slider-handle{-webkit-transform:rotate(225deg);height:2rem;margin-left:-1rem;top:-.85rem;transform:rotate(225deg);width:2rem}}#enp-quiz .enp-slider .ui-slider-handle:focus{box-shadow:0 0 3px 1px #4d90fe;outline:0}@media(max-width:699px){#enp-quiz .enp-slider .ui-slider-handle.ui-state-active{-webkit-transform:translate3d(-.2rem,-.8rem,0) rotate(225deg);border-top-left-radius:0;height:2.2rem;transform:translate3d(-.2rem,-.8rem,0) rotate(225deg);width:2.2rem}}#enp-quiz .enp-slider .ui-slider-handle--correct,#enp-quiz .enp-slider .ui-slider-handle--incorrect{height:1.1rem;margin-left:-.55rem;top:-.4rem;width:1.1rem}#enp-quiz .enp-slider .ui-slider-handle--incorrect{border:2px solid #f14021;z-index:1}#enp-quiz .enp-slider .ui-slider-handle--correct{border:2px solid #3bb275;z-index:99999}#enp-quiz .enp-slider .ui-slider-range{background-position:0 0;border:0;display:block;font-size:.7rem;height:100%;position:absolute;top:0;z-index:1}#enp-quiz .enp-slider .ui-slider-range-show-correct{background:#3bb275;z-index:9}#enp-quiz .enp-slider .ui-slider-range-min{background:#3bb275;left:0}#enp-quiz .enp-slider .ui-slider-range-max{right:0}#enp-quiz .enp-slider.ui-state-disabled .ui-slider-handle,#enp-quiz .enp-slider.ui-state-disabled .ui-slider-range{-webkit-filter:inherit;filter:inherit}#enp-quiz .ui-slider-horizontal{height:.3rem}#enp-quiz .enp-question__answered .enp-slider{background:#bbb}#enp-quiz .enp-question__answered .ui-slider-range-min{background:#fff} \ No newline at end of file diff --git a/public/quiz-take/css/sass/_quiz.scss b/public/quiz-take/css/sass/_quiz.scss index f24072db..17a91f29 100644 --- a/public/quiz-take/css/sass/_quiz.scss +++ b/public/quiz-take/css/sass/_quiz.scss @@ -49,8 +49,8 @@ .enp-quiz__progress__bar__question-count { position: absolute; - right: 4px; - bottom: -1.3rem; + right: 1rem; + bottom: 0.7rem; font-size: .8rem; } diff --git a/public/quiz-take/css/sass/_utilities.scss b/public/quiz-take/css/sass/_utilities.scss index b34e77a2..efed4389 100644 --- a/public/quiz-take/css/sass/_utilities.scss +++ b/public/quiz-take/css/sass/_utilities.scss @@ -82,7 +82,7 @@ @mixin btn--ghost { @include btn; - border: 2px solid $link; + border: 2px solid $blue; background: transparent; color: $link; box-shadow: none; diff --git a/public/quiz-take/css/sass/_variables.scss b/public/quiz-take/css/sass/_variables.scss index f57eb9b4..7a62844f 100644 --- a/public/quiz-take/css/sass/_variables.scss +++ b/public/quiz-take/css/sass/_variables.scss @@ -4,7 +4,7 @@ $fontTitle : "tablet-gothic", "helvetica neue", helvetica, arial, sans-serif; //colors $font : #444; $title : #5D5E5F; -$blue: #5887C0; +$blue: #333f48; $dark_blue: #242f42; $light_blue: #EAF4FF; $light_gray: #F5F5F5; diff --git a/public/quiz-take/templates/partials/quiz-end.php b/public/quiz-take/templates/partials/quiz-end.php index 933f1e22..5c934b76 100644 --- a/public/quiz-take/templates/partials/quiz-end.php +++ b/public/quiz-take/templates/partials/quiz-end.php @@ -1,36 +1,36 @@
-
-

get_score_percentage();?>% Correct

- - - - -
-

get_quiz_end_title();?>

-

get_quiz_end_content();?>

- - -
- -
+
+

get_score_percentage();?>% Correct

+ + + + +
+

get_quiz_end_title();?>

+

get_quiz_end_content();?>

+
+ +
+ +
From 1ea4abb61c267501c27ac93f885a7eab1dfc5ad2 Mon Sep 17 00:00:00 2001 From: Luke Carl Hartman Date: Wed, 27 Apr 2022 13:31:05 -0700 Subject: [PATCH 04/32] quiz dashboard list, gulp cssmaps, color theme change --- gulpfile.js | 354 +- package-lock.json | 3982 ++++++++++++----- package.json | 2 + .../quiz-create/css/enp_quiz-create.min.css | 3 +- .../css/enp_quiz-create.min.css.map | 1 + public/quiz-create/css/sass/_dashboard.scss | 109 +- .../quiz-create/css/sass/_quiz-results.scss | 1 + public/quiz-create/css/sass/_structure.scss | 39 +- public/quiz-create/css/sass/_utilities.scss | 18 +- public/quiz-create/css/sass/_variables.scss | 36 +- .../includes/class-enp_quiz-dashboard.php | 328 +- public/quiz-create/js/dashboard.js | 2 +- public/quiz-create/js/dist/dashboard.js | 2 +- public/quiz-create/js/dist/dashboard.min.js | 2 +- public/quiz-create/svg/symbol-defs.svg | 21 +- .../templates/partials/dashboard-ab-item.php | 56 +- .../partials/dashboard-quiz-item.php | 112 +- public/quiz-create/templates/quiz-create.php | 4 +- public/quiz-take/css/enp_quiz-take.min.css | 3 +- .../quiz-take/css/enp_quiz-take.min.css.map | 1 + public/quiz-take/css/sass/_quiz.scss | 4 +- public/quiz-take/css/sass/_variables.scss | 38 +- 22 files changed, 3450 insertions(+), 1668 deletions(-) create mode 100644 public/quiz-create/css/enp_quiz-create.min.css.map create mode 100644 public/quiz-take/css/enp_quiz-take.min.css.map diff --git a/gulpfile.js b/gulpfile.js index f399a60f..1805cb12 100644 --- a/gulpfile.js +++ b/gulpfile.js @@ -2,8 +2,9 @@ var gulp = require('gulp'); var runSequence = require('run-sequence'); var browserSync = require('browser-sync'); var sass = require('gulp-sass'); +var sourcemaps = require('gulp-sourcemaps'); var autoprefixer = require('gulp-autoprefixer'); -var crass = require('gulp-crass'); +var cssnano = require('gulp-cssnano'); var uglify = require('gulp-uglify'); var rename = require("gulp-rename"); var concat = require("gulp-concat"); @@ -15,248 +16,251 @@ var reload = browserSync.reload; // Static Server + watching scss/html files gulp.task('serve', ['sassQuizTake', 'sassQuizCreate', 'quizCreateJS', 'quizDashboardJS', 'quizResultsJS', 'quizTakeJS', 'quizTakeIframeParentJS', 'quizTakeUtilityJS'], function() { - browserSync({ + browserSync({ proxy: "localhost:10044", }); - // quiz create - gulp.watch('public/quiz-create/css/sass/*.{scss,sass}', ['sassQuizCreate']); - // watch javascript files - // compress on change - gulp.watch('public/quiz-create/js/quiz-create/*.js', ['quizCreateJS']); - gulp.watch('public/quiz-create/js/dashboard.js', ['quizDashboardJS']); - // compress on change - gulp.watch('public/quiz-create/js/quiz-results/*.js', ['quizResultsJS']); - - // quiz take - gulp.watch('public/quiz-take/css/sass/*.{scss,sass}', ['sassQuizTake']); - - // compress on change - gulp.watch('public/quiz-take/js/quiz-take/*.js', ['quizTakeJS']); - - // compress on change - gulp.watch('public/quiz-take/js/iframe-parent/*.js', ['quizTakeIframeParentJS']); - - // compress on change Quiz Take utilities - gulp.watch('public/quiz-take/js/utilities/*.js', ['quizTakeUtilityJS']); - - // Watch for file changes - onChangeReload = ["public/quiz-create/css/enp_quiz-create.min.css", - "public/quiz-create/*.php", - "public/quiz-create/includes/*.php", - "public/quiz-create/js/dist/quiz-create.min.js", - "public/quiz-take/css/enp_quiz-take.min.css", - "public/quiz-take/*.php", - "public/quiz-take/includes/*.php", - "public/quiz-take/js/dist/quiz-take.min.js" - ]; - gulp.watch(onChangeReload).on('change', reload); + // quiz create + gulp.watch('public/quiz-create/css/sass/*.{scss,sass}', ['sassQuizCreate']); + // watch javascript files + // compress on change + gulp.watch('public/quiz-create/js/quiz-create/*.js', ['quizCreateJS']); + gulp.watch('public/quiz-create/js/dashboard.js', ['quizDashboardJS']); + // compress on change + gulp.watch('public/quiz-create/js/quiz-results/*.js', ['quizResultsJS']); + + // quiz take + gulp.watch('public/quiz-take/css/sass/*.{scss,sass}', ['sassQuizTake']); + + // compress on change + gulp.watch('public/quiz-take/js/quiz-take/*.js', ['quizTakeJS']); + + // compress on change + gulp.watch('public/quiz-take/js/iframe-parent/*.js', ['quizTakeIframeParentJS']); + + // compress on change Quiz Take utilities + gulp.watch('public/quiz-take/js/utilities/*.js', ['quizTakeUtilityJS']); + + // Watch for file changes + onChangeReload = ["public/quiz-create/css/enp_quiz-create.min.css", + "public/quiz-create/*.php", + "public/quiz-create/includes/*.php", + "public/quiz-create/js/dist/quiz-create.min.js", + "public/quiz-take/css/enp_quiz-take.min.css", + "public/quiz-take/*.php", + "public/quiz-take/includes/*.php", + "public/quiz-take/js/dist/quiz-take.min.js" + ]; + gulp.watch(onChangeReload).on('change', reload); }); gulp.task('sassQuizCreate', function () { - processSASS('public/quiz-create/css/'); + processSASS('public/quiz-create/css/'); }); gulp.task('sassQuizTake', function () { - processSASS('public/quiz-take/css/'); - // the slider is in the quiz create css now too... - processSASS('public/quiz-create/css/'); + processSASS('public/quiz-take/css/'); + // the slider is in the quiz create css now too... + processSASS('public/quiz-create/css/'); }); gulp.task('quizCreateJS', function(callback) { - runSequence('concatQuizCreateJS', - 'compressQuizCreateJS', - callback); + runSequence('concatQuizCreateJS', + 'compressQuizCreateJS', + callback); }); gulp.task('concatQuizCreateJS', function() { - rootPath = "public/quiz-create/js/quiz-create/"; - src = [rootPath+"quiz-create--utilities.js", - rootPath+"quiz-create--templates.js", - rootPath+"quiz-create--onLoad.js", - rootPath+"quiz-create--ux.js", - "public/quiz-create/js/utilities/display-messages.js", - rootPath+"quiz-create--reorder-question.js", - rootPath+"quiz-create--save-question.js", - rootPath+"quiz-create--save-question-image.js", - rootPath+"quiz-create--save-mc-option.js", - rootPath+"quiz-create--save-slider.js", - rootPath+"quiz-create--save.js", - "public/quiz-take/js/quiz-take/quiz-take--slider.js" - - ]; - filename = 'quiz-create'; - dist = 'public/quiz-create/js/dist/'; - return concatjQuery(src, filename, dist); + rootPath = "public/quiz-create/js/quiz-create/"; + src = [rootPath+"quiz-create--utilities.js", + rootPath+"quiz-create--templates.js", + rootPath+"quiz-create--onLoad.js", + rootPath+"quiz-create--ux.js", + "public/quiz-create/js/utilities/display-messages.js", + rootPath+"quiz-create--reorder-question.js", + rootPath+"quiz-create--save-question.js", + rootPath+"quiz-create--save-question-image.js", + rootPath+"quiz-create--save-mc-option.js", + rootPath+"quiz-create--save-slider.js", + rootPath+"quiz-create--save.js", + "public/quiz-take/js/quiz-take/quiz-take--slider.js" + + ]; + filename = 'quiz-create'; + dist = 'public/quiz-create/js/dist/'; + return concatjQuery(src, filename, dist); }); gulp.task('compressQuizCreateJS', function() { - dist = 'public/quiz-create/js/dist/'; - return compressJS(dist); + dist = 'public/quiz-create/js/dist/'; + return compressJS(dist); }); gulp.task('quizDashboardJS', function(callback) { - runSequence('concatQuizDashboardJS', - 'compressQuizCreateJS', - callback); + runSequence('concatQuizDashboardJS', + 'compressQuizCreateJS', + callback); }); gulp.task('concatQuizDashboardJS', function() { - rootPath = "public/quiz-create/js/"; - src = [rootPath+"dashboard.js", - rootPath+"utilities/display-messages.js", - ]; - filename = 'dashboard'; - dist = 'public/quiz-create/js/dist/'; - return concatjQuery(src, filename, dist); + rootPath = "public/quiz-create/js/"; + src = [rootPath+"dashboard.js", + rootPath+"utilities/display-messages.js", + ]; + filename = 'dashboard'; + dist = 'public/quiz-create/js/dist/'; + return concatjQuery(src, filename, dist); }); gulp.task('quizResultsJS', function(callback) { - runSequence('concatQuizResultsJS', - 'concatQuizABResultsJS', - 'compressQuizCreateJS', - callback); + runSequence('concatQuizResultsJS', + 'concatQuizABResultsJS', + 'compressQuizCreateJS', + callback); }); gulp.task('quizABResultsJS', function(callback) { - runSequence('concatQuizABResultsJS', - 'compressQuizCreateJS', - callback); + runSequence('concatQuizABResultsJS', + 'compressQuizCreateJS', + callback); }); gulp.task('concatQuizResultsJS', function() { - rootPath = "public/quiz-create/js/quiz-results/"; - src = [rootPath+"quiz-results.js", - rootPath+"quiz-results--init.js", - rootPath+"quiz-results--slider.js" - ]; - filename = 'quiz-results'; - dist = 'public/quiz-create/js/dist/'; - return concatjQuery(src, filename, dist); + rootPath = "public/quiz-create/js/quiz-results/"; + src = [rootPath+"quiz-results.js", + rootPath+"quiz-results--init.js", + rootPath+"quiz-results--slider.js" + ]; + filename = 'quiz-results'; + dist = 'public/quiz-create/js/dist/'; + return concatjQuery(src, filename, dist); }); gulp.task('concatQuizABResultsJS', function() { - rootPath = "public/quiz-create/js/quiz-results/"; - src = [rootPath+"ab-results.js", - rootPath+"quiz-results--init.js", - rootPath+"quiz-results--slider.js" - ]; - filename = 'ab-results'; - dist = 'public/quiz-create/js/dist/'; - return concatjQuery(src, filename, dist); + rootPath = "public/quiz-create/js/quiz-results/"; + src = [rootPath+"ab-results.js", + rootPath+"quiz-results--init.js", + rootPath+"quiz-results--slider.js" + ]; + filename = 'ab-results'; + dist = 'public/quiz-create/js/dist/'; + return concatjQuery(src, filename, dist); }); gulp.task('quizTakeJS', function(callback) { - runSequence('concatQuizTakeJS', - 'compressQuizTakeJS', - callback); + runSequence('concatQuizTakeJS', + 'compressQuizTakeJS', + callback); }); gulp.task('concatQuizTakeJS', function() { - rootPath = "public/quiz-take/js/quiz-take/"; - src = [//"public/quiz-take/js/utilities/jquery.ui.touch-punch.min.js", - rootPath+"quiz-take--utilities.js", - rootPath+"quiz-take--templates.js", - rootPath+"quiz-take--ux.js", - rootPath+"quiz-take--postmessage.js", - rootPath+"quiz-take--question.js", - rootPath+"quiz-take--question-explanation.js", - rootPath+"quiz-take--mc-option.js", - rootPath+"quiz-take--slider.js", - rootPath+"quiz-take--quiz-end.js", - rootPath+"quiz-take--quiz-restart.js", - rootPath+"quiz-take--init.js", - ]; - filename = 'quiz-take'; - dist = 'public/quiz-take/js/dist/'; - return concatjQuery(src, filename, dist); + rootPath = "public/quiz-take/js/quiz-take/"; + src = [//"public/quiz-take/js/utilities/jquery.ui.touch-punch.min.js", + rootPath+"quiz-take--utilities.js", + rootPath+"quiz-take--templates.js", + rootPath+"quiz-take--ux.js", + rootPath+"quiz-take--postmessage.js", + rootPath+"quiz-take--question.js", + rootPath+"quiz-take--question-explanation.js", + rootPath+"quiz-take--mc-option.js", + rootPath+"quiz-take--slider.js", + rootPath+"quiz-take--quiz-end.js", + rootPath+"quiz-take--quiz-restart.js", + rootPath+"quiz-take--init.js", + ]; + filename = 'quiz-take'; + dist = 'public/quiz-take/js/dist/'; + return concatjQuery(src, filename, dist); }); gulp.task('quizTakeIframeParentJS', function(callback) { - runSequence('concatQuizTakeIframeParentJS', - 'compressQuizTakeJS', - callback); + runSequence('concatQuizTakeIframeParentJS', + 'compressQuizTakeJS', + callback); }); gulp.task('concatQuizTakeIframeParentJS', function() { - rootPath = "public/quiz-take/js/iframe-parent/"; - src = [rootPath+"enpIframeQuiz.js", - rootPath+"iframe-parent--listener.js", - ]; - filename = 'iframe-parent'; - dist = 'public/quiz-take/js/dist/'; - return gulp.src(src) - .pipe(plumber()) - .pipe(concat(filename+'.js')) - .pipe(gulp.dest(dist)); + rootPath = "public/quiz-take/js/iframe-parent/"; + src = [rootPath+"enpIframeQuiz.js", + rootPath+"iframe-parent--listener.js", + ]; + filename = 'iframe-parent'; + dist = 'public/quiz-take/js/dist/'; + return gulp.src(src) + .pipe(plumber()) + .pipe(concat(filename+'.js')) + .pipe(gulp.dest(dist)); }); gulp.task('quizTakeUtilityJS', function(callback) { - runSequence('concatQuizTakeUtilityJS', - 'compressQuizTakeJS', - callback); + runSequence('concatQuizTakeUtilityJS', + 'compressQuizTakeJS', + callback); }); gulp.task('concatQuizTakeUtilityJS', function() { - rootPath = "public/quiz-take/js/utilities/"; - src = [rootPath+"html5shiv.min.js", - rootPath+"jquery-ui.min.js", - rootPath+"underscore.min.js", - rootPath+"jquery.ui.touch-punch.min.js" - ]; - filename = 'utilities'; - dist = 'public/quiz-take/js/dist/'; - return gulp.src(src) - .pipe(plumber()) - .pipe(concat(filename+'.js')) - .pipe(gulp.dest(dist)); + rootPath = "public/quiz-take/js/utilities/"; + src = [rootPath+"html5shiv.min.js", + rootPath+"jquery-ui.min.js", + rootPath+"underscore.min.js", + rootPath+"jquery.ui.touch-punch.min.js" + ]; + filename = 'utilities'; + dist = 'public/quiz-take/js/dist/'; + return gulp.src(src) + .pipe(plumber()) + .pipe(concat(filename+'.js')) + .pipe(gulp.dest(dist)); }); gulp.task('compressQuizTakeJS', function() { - dist = 'public/quiz-take/js/dist/'; - return compressJS(dist); + dist = 'public/quiz-take/js/dist/'; + return compressJS(dist); }); function concatjQuery(src, filename, dist) { - return gulp.src(src) - .pipe(plumber()) - .pipe(concat(filename+'.js')) - .pipe(insert.wrap('jQuery( document ).ready( function( $ ) {', '});')) - .pipe(gulp.dest(dist)); + return gulp.src(src) + .pipe(plumber()) + .pipe(concat(filename+'.js')) + .pipe(insert.wrap('jQuery( document ).ready( function( $ ) {', '});')) + .pipe(gulp.dest(dist)); } function compressJS(path) { - return gulp.src([path+"*.js","!"+path+"*.min.js"]) - .pipe(plumber()) - .pipe(uglify()) - .pipe(rename({ - suffix: '.min' - })) - .pipe(gulp.dest(path)); + return gulp.src([path+"*.js","!"+path+"*.min.js"]) + .pipe(plumber()) + .pipe(uglify()) + .pipe(rename({ + suffix: '.min' + })) + .pipe(gulp.dest(path)); } function processSASS(path) { - return gulp.src(path+'sass/*.{scss,sass}') - .pipe(plumber()) - - // Converts Sass into CSS with Gulp Sass - .pipe(sass({ - errLogToConsole: true - })) - // adds prefixes to whatever needs to get done - .pipe(autoprefixer()) - - // minify the CSS - .pipe(crass({pretty:false})) - - // rename to add .min - .pipe(rename({ - suffix: '.min' - })) - // Outputs CSS files in the css folder - .pipe(gulp.dest(path)); + return gulp.src(path+'sass/*.{scss,sass}') + .pipe(plumber()) + .pipe(sourcemaps.init()) + // Converts Sass into CSS with Gulp Sass + .pipe(sass({ + errLogToConsole: true + })) + + // adds prefixes to whatever needs to get done + .pipe(autoprefixer()) + + // minify the CSS + .pipe(cssnano()) + + // rename to add .min + .pipe(rename({ + suffix: '.min' + })) + .pipe(sourcemaps.write('.')) + + // Outputs CSS files in the css folder + .pipe(gulp.dest(path)); } // Creating a default task diff --git a/package-lock.json b/package-lock.json index 2a37980f..ee5e8e20 100644 --- a/package-lock.json +++ b/package-lock.json @@ -4,6 +4,69 @@ "lockfileVersion": 1, "requires": true, "dependencies": { + "@gulp-sourcemaps/identity-map": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/@gulp-sourcemaps/identity-map/-/identity-map-2.0.1.tgz", + "integrity": "sha512-Tb+nSISZku+eQ4X1lAkevcQa+jknn/OVUgZ3XCxEKIsLsqYuPoJwJOPQeaOk75X3WPftb29GWY1eqE7GLsXb1Q==", + "dev": true, + "requires": { + "acorn": "6.4.2", + "normalize-path": "3.0.0", + "postcss": "7.0.39", + "source-map": "0.6.1", + "through2": "3.0.2" + }, + "dependencies": { + "inherits": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", + "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==", + "dev": true + }, + "normalize-path": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-3.0.0.tgz", + "integrity": "sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==", + "dev": true + }, + "postcss": { + "version": "7.0.39", + "resolved": "https://registry.npmjs.org/postcss/-/postcss-7.0.39.tgz", + "integrity": "sha512-yioayjNbHn6z1/Bywyb2Y4s3yvDAeXGOyxqD+LnVOinq6Mdmd++SW2wUNVzavyyHxd6+DxzWGIuosg6P1Rj8uA==", + "dev": true, + "requires": { + "picocolors": "0.2.1", + "source-map": "0.6.1" + } + }, + "source-map": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", + "dev": true + }, + "through2": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/through2/-/through2-3.0.2.tgz", + "integrity": "sha512-enaDQ4MUyP2W6ZyT6EsMzqBPZaM/avg8iuo+l2d3QCs0J+6RaqkHV/2/lOwDTueBHeJ/2LG9lrLW3d5rWPucuQ==", + "dev": true, + "requires": { + "inherits": "2.0.4", + "readable-stream": "2.3.6" + } + } + } + }, + "@gulp-sourcemaps/map-sources": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/@gulp-sourcemaps/map-sources/-/map-sources-1.0.0.tgz", + "integrity": "sha1-iQrnxdjId/bThIYCFazp1+yUW9o=", + "dev": true, + "requires": { + "normalize-path": "2.1.1", + "through2": "2.0.3" + } + }, "@sinonjs/formatio": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/@sinonjs/formatio/-/formatio-2.0.0.tgz", @@ -25,16 +88,28 @@ "integrity": "sha1-63d99gEXI6OxTopywIBcjoZ0a9I=", "dev": true, "requires": { - "mime-types": "~2.1.18", + "mime-types": "2.1.18", "negotiator": "0.6.1" } }, + "acorn": { + "version": "6.4.2", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-6.4.2.tgz", + "integrity": "sha512-XtGIhXwF8YM8bJhGxG5kXgjkEuNGLTkoYqVE+KMR+aspr4KGYmKYg7yUe3KghyQ9yheNwLnjmzh/7+gfDBmHCQ==", + "dev": true + }, "after": { "version": "0.8.2", "resolved": "https://registry.npmjs.org/after/-/after-0.8.2.tgz", "integrity": "sha1-/ts5T58OAqqXaOcCvaI7UF+ufh8=", "dev": true }, + "alphanum-sort": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/alphanum-sort/-/alphanum-sort-1.0.2.tgz", + "integrity": "sha1-l6ERlkmyEa0zaR2fn0hqjsn74KM=", + "dev": true + }, "amdefine": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/amdefine/-/amdefine-1.0.1.tgz", @@ -47,7 +122,7 @@ "integrity": "sha512-SFKX67auSNoVR38N3L+nvsPjOE0bybKTYbkf5tRvushrAPQ9V75huw0ZxBkKVeRU9kqH3d6HA4xTckbwZ4ixmA==", "dev": true, "requires": { - "ansi-wrap": "^0.1.0" + "ansi-wrap": "0.1.0" } }, "ansi-cyan": { @@ -101,8 +176,8 @@ "integrity": "sha512-0XNayC8lTHQ2OI8aljNCN3sSx6hsr/1+rlcDAotXJR7C1oZZHCNsfpbKwMjRA3Uqb5tF1Rae2oloTr4xpq+WjA==", "dev": true, "requires": { - "micromatch": "^2.1.5", - "normalize-path": "^2.0.0" + "micromatch": "2.3.11", + "normalize-path": "2.1.1" } }, "aproba": { @@ -123,8 +198,8 @@ "integrity": "sha512-5hYdAkZlcG8tOLujVDTgCT+uPX0VnpAH28gWsLfzpXYm7wP6mp5Q/gYyR7YQ0cKVJcXJnl3j2kpBan13PtQf6w==", "dev": true, "requires": { - "delegates": "^1.0.0", - "readable-stream": "^2.0.6" + "delegates": "1.0.0", + "readable-stream": "2.3.6" } }, "argparse": { @@ -133,7 +208,7 @@ "integrity": "sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg==", "dev": true, "requires": { - "sprintf-js": "~1.0.2" + "sprintf-js": "1.0.3" } }, "arr-diff": { @@ -142,7 +217,7 @@ "integrity": "sha1-jzuCf5Vai9ZpaX5KQlasPOrjVs8=", "dev": true, "requires": { - "arr-flatten": "^1.0.1" + "arr-flatten": "1.1.0" } }, "arr-flatten": { @@ -271,12 +346,12 @@ "integrity": "sha512-9D0OoxWCqq9Okp9wD+igaCf6ZaNjYNFSCKxgMLAxAGqXwpapaZ+D0PBv265VHQLgam8a7gld4E6KgJJM6SKfQQ==", "dev": true, "requires": { - "browserslist": "^3.2.8", - "caniuse-lite": "^1.0.30000859", - "normalize-range": "^0.1.2", - "num2fraction": "^1.2.2", - "postcss": "^6.0.23", - "postcss-value-parser": "^3.2.3" + "browserslist": "3.2.8", + "caniuse-lite": "1.0.30000859", + "normalize-range": "0.1.2", + "num2fraction": "1.2.2", + "postcss": "6.0.23", + "postcss-value-parser": "3.3.0" } }, "aws-sign2": { @@ -297,8 +372,8 @@ "integrity": "sha1-LY4+XQvb1zJ/kbyBT1xXZg+Bgk0=", "dev": true, "requires": { - "follow-redirects": "^1.2.5", - "is-buffer": "^1.1.5" + "follow-redirects": "1.5.0", + "is-buffer": "1.1.6" } }, "backo2": { @@ -319,13 +394,13 @@ "integrity": "sha512-5T6P4xPgpp0YDFvSWwEZ4NoE3aM4QBQXDzmVbraCkFj8zHM+mba8SyqB5DbZWyR7mYHo6Y7BdQo3MoA4m0TeQg==", "dev": true, "requires": { - "cache-base": "^1.0.1", - "class-utils": "^0.3.5", - "component-emitter": "^1.2.1", - "define-property": "^1.0.0", - "isobject": "^3.0.1", - "mixin-deep": "^1.2.0", - "pascalcase": "^0.1.1" + "cache-base": "1.0.1", + "class-utils": "0.3.6", + "component-emitter": "1.2.1", + "define-property": "1.0.0", + "isobject": "3.0.1", + "mixin-deep": "1.3.1", + "pascalcase": "0.1.1" }, "dependencies": { "define-property": { @@ -334,7 +409,7 @@ "integrity": "sha1-dp66rz9KY6rTr56NMEybvnm/sOY=", "dev": true, "requires": { - "is-descriptor": "^1.0.0" + "is-descriptor": "1.0.2" } }, "is-accessor-descriptor": { @@ -343,7 +418,7 @@ "integrity": "sha512-m5hnHTkcVsPfqx3AKlyttIPb7J+XykHvJP2B9bZDjlhLIoEq4XoK64Vg7boZlVWYK6LUY94dYPEE7Lh0ZkZKcQ==", "dev": true, "requires": { - "kind-of": "^6.0.0" + "kind-of": "6.0.2" } }, "is-data-descriptor": { @@ -352,7 +427,7 @@ "integrity": "sha512-jbRXy1FmtAoCjQkVmIVYwuuqDFUbaOeDjmed1tOGPrsMhtJA4rD9tkgA0F1qJ3gRFRXcHYVkdeaP50Q5rE/jLQ==", "dev": true, "requires": { - "kind-of": "^6.0.0" + "kind-of": "6.0.2" } }, "is-descriptor": { @@ -361,9 +436,9 @@ "integrity": "sha512-2eis5WqQGV7peooDyLmNEPUrps9+SXX5c9pL3xEB+4e9HnGuDa7mB7kHxHw4CbqS9k1T2hOH3miL8n8WtiYVtg==", "dev": true, "requires": { - "is-accessor-descriptor": "^1.0.0", - "is-data-descriptor": "^1.0.0", - "kind-of": "^6.0.2" + "is-accessor-descriptor": "1.0.0", + "is-data-descriptor": "1.0.0", + "kind-of": "6.0.2" } }, "isobject": { @@ -405,7 +480,7 @@ "dev": true, "optional": true, "requires": { - "tweetnacl": "^0.14.3" + "tweetnacl": "0.14.5" } }, "beeper": { @@ -441,7 +516,7 @@ "integrity": "sha1-E+v+d4oDIFz+A3UUgeu0szAMEmo=", "dev": true, "requires": { - "inherits": "~2.0.0" + "inherits": "2.0.3" } }, "boom": { @@ -450,7 +525,7 @@ "integrity": "sha1-OciRjO/1eZ+D+UkqhI9iWt0Mdm8=", "dev": true, "requires": { - "hoek": "2.x.x" + "hoek": "2.16.3" } }, "brace-expansion": { @@ -459,7 +534,7 @@ "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", "dev": true, "requires": { - "balanced-match": "^1.0.0", + "balanced-match": "1.0.0", "concat-map": "0.0.1" } }, @@ -469,9 +544,9 @@ "integrity": "sha1-uneWLhLf+WnWt2cR6RS3N4V79qc=", "dev": true, "requires": { - "expand-range": "^1.8.1", - "preserve": "^0.2.0", - "repeat-element": "^1.1.2" + "expand-range": "1.8.2", + "preserve": "0.2.0", + "repeat-element": "1.1.2" } }, "browser-stdout": { @@ -486,16 +561,16 @@ "integrity": "sha512-r6ZRYncfYRGerw4Rh5S8Q9x9WKDdrwH572hd3ofsYgn0Px6a6EqXiLBVTCss2+2a45G9ZgjRHSeo9YY56UpgKw==", "dev": true, "requires": { - "browser-sync-ui": "v1.0.1", + "browser-sync-ui": "1.0.1", "bs-recipes": "1.3.4", "chokidar": "1.7.0", "connect": "3.6.6", - "connect-history-api-fallback": "^1.5.0", - "dev-ip": "^1.0.1", + "connect-history-api-fallback": "1.5.0", + "dev-ip": "1.0.1", "easy-extender": "2.3.2", "eazy-logger": "3.0.2", - "etag": "^1.8.1", - "fresh": "^0.5.2", + "etag": "1.8.1", + "fresh": "0.5.2", "fs-extra": "3.0.1", "http-proxy": "1.15.2", "immutable": "3.8.2", @@ -504,7 +579,7 @@ "opn": "4.0.2", "portscanner": "2.1.1", "qs": "6.2.3", - "raw-body": "^2.3.2", + "raw-body": "2.3.3", "resp-modifier": "6.0.2", "rx": "4.1.0", "serve-index": "1.9.1", @@ -522,11 +597,11 @@ "dev": true, "requires": { "async-each-series": "0.1.1", - "connect-history-api-fallback": "^1.1.0", - "immutable": "^3.7.6", + "connect-history-api-fallback": "1.5.0", + "immutable": "3.8.2", "server-destroy": "1.0.1", "socket.io-client": "2.0.4", - "stream-throttle": "^0.1.3" + "stream-throttle": "0.1.3" } }, "browserslist": { @@ -535,8 +610,8 @@ "integrity": "sha512-WHVocJYavUwVgVViC0ORikPHQquXwVh939TaelZ4WDqpWgTX/FsGhl/+P4qBUAGcRvtOgDgC+xftNWWp2RUTAQ==", "dev": true, "requires": { - "caniuse-lite": "^1.0.30000844", - "electron-to-chromium": "^1.3.47" + "caniuse-lite": "1.0.30000859", + "electron-to-chromium": "1.3.50" } }, "bs-recipes": { @@ -545,6 +620,12 @@ "integrity": "sha1-DS1NSKcYyMBEdp/cT4lZLci2lYU=", "dev": true }, + "buffer-from": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/buffer-from/-/buffer-from-1.1.2.tgz", + "integrity": "sha512-E+XQCRwSbaaiChtv6k6Dwgc+bx+Bs6vuKJHHl5kox/BaKbhiXzqQOwK4cO22yElGp2OCmjwVhT3HmxgyPGnJfQ==", + "dev": true + }, "builtin-modules": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/builtin-modules/-/builtin-modules-1.1.1.tgz", @@ -563,15 +644,15 @@ "integrity": "sha512-AKcdTnFSWATd5/GCPRxr2ChwIJ85CeyrEyjRHlKxQ56d4XJMGym0uAiKn0xbLOGOl3+yRpOTi484dVCEc5AUzQ==", "dev": true, "requires": { - "collection-visit": "^1.0.0", - "component-emitter": "^1.2.1", - "get-value": "^2.0.6", - "has-value": "^1.0.0", - "isobject": "^3.0.1", - "set-value": "^2.0.0", - "to-object-path": "^0.3.0", - "union-value": "^1.0.0", - "unset-value": "^1.0.0" + "collection-visit": "1.0.0", + "component-emitter": "1.2.1", + "get-value": "2.0.6", + "has-value": "1.0.0", + "isobject": "3.0.1", + "set-value": "2.0.0", + "to-object-path": "0.3.0", + "union-value": "1.0.0", + "unset-value": "1.0.0" }, "dependencies": { "isobject": { @@ -600,8 +681,8 @@ "integrity": "sha1-MIvur/3ygRkFHvodkyITyRuPkuc=", "dev": true, "requires": { - "camelcase": "^2.0.0", - "map-obj": "^1.0.0" + "camelcase": "2.1.1", + "map-obj": "1.0.1" }, "dependencies": { "camelcase": { @@ -612,6 +693,36 @@ } } }, + "caniuse-api": { + "version": "1.6.1", + "resolved": "https://registry.npmjs.org/caniuse-api/-/caniuse-api-1.6.1.tgz", + "integrity": "sha1-tTTnxzTE+B7F++isoq0kNUuWLGw=", + "dev": true, + "requires": { + "browserslist": "1.7.7", + "caniuse-db": "1.0.30001332", + "lodash.memoize": "4.1.2", + "lodash.uniq": "4.5.0" + }, + "dependencies": { + "browserslist": { + "version": "1.7.7", + "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-1.7.7.tgz", + "integrity": "sha1-C9dnBCWL6CmyOYu1Dkti0aFmsLk=", + "dev": true, + "requires": { + "caniuse-db": "1.0.30001332", + "electron-to-chromium": "1.3.50" + } + } + } + }, + "caniuse-db": { + "version": "1.0.30001332", + "resolved": "https://registry.npmjs.org/caniuse-db/-/caniuse-db-1.0.30001332.tgz", + "integrity": "sha512-/0YiL5sYWdh4EAqCFezyL6+wbLOxVVuLwVNs7f6pyCoV3wRJAOyTeTbR2TGwxiEIpWtK5aGwS7AwhioGi+5MAg==", + "dev": true + }, "caniuse-lite": { "version": "1.0.30000859", "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30000859.tgz", @@ -630,12 +741,12 @@ "integrity": "sha1-D2RYS6ZC8PKs4oBiefTwbKI61zw=", "dev": true, "requires": { - "assertion-error": "^1.0.1", - "check-error": "^1.0.1", - "deep-eql": "^3.0.0", - "get-func-name": "^2.0.0", - "pathval": "^1.0.0", - "type-detect": "^4.0.0" + "assertion-error": "1.1.0", + "check-error": "1.0.2", + "deep-eql": "3.0.1", + "get-func-name": "2.0.0", + "pathval": "1.1.0", + "type-detect": "4.0.8" } }, "chalk": { @@ -644,11 +755,11 @@ "integrity": "sha1-qBFcVeSnAv5NFQq9OHKCKn4J/Jg=", "dev": true, "requires": { - "ansi-styles": "^2.2.1", - "escape-string-regexp": "^1.0.2", - "has-ansi": "^2.0.0", - "strip-ansi": "^3.0.0", - "supports-color": "^2.0.0" + "ansi-styles": "2.2.1", + "escape-string-regexp": "1.0.5", + "has-ansi": "2.0.0", + "strip-ansi": "3.0.1", + "supports-color": "2.0.0" } }, "check-error": { @@ -663,15 +774,15 @@ "integrity": "sha1-eY5ol3gVHIB2tLNg5e3SjNortGg=", "dev": true, "requires": { - "anymatch": "^1.3.0", - "async-each": "^1.0.0", - "fsevents": "^1.0.0", - "glob-parent": "^2.0.0", - "inherits": "^2.0.1", - "is-binary-path": "^1.0.0", - "is-glob": "^2.0.0", - "path-is-absolute": "^1.0.0", - "readdirp": "^2.0.0" + "anymatch": "1.3.2", + "async-each": "1.0.1", + "fsevents": "1.2.4", + "glob-parent": "2.0.0", + "inherits": "2.0.3", + "is-binary-path": "1.0.1", + "is-glob": "2.0.1", + "path-is-absolute": "1.0.1", + "readdirp": "2.1.0" } }, "clap": { @@ -680,7 +791,7 @@ "integrity": "sha512-4CoL/A3hf90V3VIEjeuhSvlGFEHKzOz+Wfc2IVZc+FaUgU0ZQafJTP49fvnULipOPcAfqhyI2duwQyns6xqjYA==", "dev": true, "requires": { - "chalk": "^1.1.3" + "chalk": "1.1.3" } }, "class-utils": { @@ -689,10 +800,10 @@ "integrity": "sha512-qOhPa/Fj7s6TY8H8esGu5QNpMMQxz79h+urzrNYN6mn+9BnxlDGf5QZ+XeCDsxSjPqsSR56XOZOJmpeurnLMeg==", "dev": true, "requires": { - "arr-union": "^3.1.0", - "define-property": "^0.2.5", - "isobject": "^3.0.0", - "static-extend": "^0.1.1" + "arr-union": "3.1.0", + "define-property": "0.2.5", + "isobject": "3.0.1", + "static-extend": "0.1.2" }, "dependencies": { "define-property": { @@ -701,7 +812,7 @@ "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=", "dev": true, "requires": { - "is-descriptor": "^0.1.0" + "is-descriptor": "0.1.6" } }, "isobject": { @@ -718,9 +829,9 @@ "integrity": "sha1-EgYBU3qRbSmUD5NNo7SNWFo5IT0=", "dev": true, "requires": { - "string-width": "^1.0.1", - "strip-ansi": "^3.0.1", - "wrap-ansi": "^2.0.0" + "string-width": "1.0.2", + "strip-ansi": "3.0.1", + "wrap-ansi": "2.1.0" } }, "clone": { @@ -747,9 +858,9 @@ "integrity": "sha512-Bq6+4t+lbM8vhTs/Bef5c5AdEMtapp/iFb6+s4/Hh9MVTt8OLKH7ZOOZSCT+Ys7hsHvqv0GuMPJ1lnQJVHvxpg==", "dev": true, "requires": { - "inherits": "^2.0.1", - "process-nextick-args": "^2.0.0", - "readable-stream": "^2.3.5" + "inherits": "2.0.3", + "process-nextick-args": "2.0.0", + "readable-stream": "2.3.6" } }, "coa": { @@ -758,7 +869,7 @@ "integrity": "sha1-qe8VNmDWqGqL3sAomlxoTSF0Mv0=", "dev": true, "requires": { - "q": "^1.1.2" + "q": "1.5.1" } }, "code-point-at": { @@ -773,8 +884,19 @@ "integrity": "sha1-S8A3PBZLwykbTTaMgpzxqApZ3KA=", "dev": true, "requires": { - "map-visit": "^1.0.0", - "object-visit": "^1.0.0" + "map-visit": "1.0.0", + "object-visit": "1.0.1" + } + }, + "color": { + "version": "0.11.4", + "resolved": "https://registry.npmjs.org/color/-/color-0.11.4.tgz", + "integrity": "sha1-bXtcdPtl6EHNSHkq0e1eB7kE12Q=", + "dev": true, + "requires": { + "clone": "1.0.4", + "color-convert": "1.9.2", + "color-string": "0.3.0" } }, "color-convert": { @@ -792,12 +914,32 @@ "integrity": "sha1-SxQVMEz1ACjqgWQ2Q72C6gWANok=", "dev": true }, + "color-string": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/color-string/-/color-string-0.3.0.tgz", + "integrity": "sha1-J9RvtnAlxcL6JZk7+/V55HhBuZE=", + "dev": true, + "requires": { + "color-name": "1.1.1" + } + }, "color-support": { "version": "1.1.3", "resolved": "https://registry.npmjs.org/color-support/-/color-support-1.1.3.tgz", "integrity": "sha512-qiBjkpbMLO/HL68y+lh4q0/O1MZFj2RX6X/KmMa3+gJD3z+WwI1ZzDHysvqHGS3mP6mznPckpXmw1nI9cJjyRg==", "dev": true }, + "colormin": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/colormin/-/colormin-1.1.2.tgz", + "integrity": "sha1-6i90IKcrlogaOKrlnsEkpvcpgTM=", + "dev": true, + "requires": { + "color": "0.11.4", + "css-color-names": "0.0.4", + "has": "1.0.3" + } + }, "colors": { "version": "1.1.2", "resolved": "https://registry.npmjs.org/colors/-/colors-1.1.2.tgz", @@ -810,7 +952,7 @@ "integrity": "sha1-cj599ugBrFYTETp+RFqbactjKBg=", "dev": true, "requires": { - "delayed-stream": "~1.0.0" + "delayed-stream": "1.0.0" } }, "commander": { @@ -849,7 +991,7 @@ "integrity": "sha512-4gEjHJFT9e+2W/77h/DS5SGUgwDaOwprX8L/gl5+3ixnzkVJJsZWDSelmN3Oilw3LNDZjZV0yqH1hLG3k6nghg==", "dev": true, "requires": { - "source-map": "^0.6.1" + "source-map": "0.6.1" }, "dependencies": { "source-map": { @@ -868,7 +1010,7 @@ "requires": { "debug": "2.6.9", "finalhandler": "1.1.0", - "parseurl": "~1.3.2", + "parseurl": "1.3.2", "utils-merge": "1.0.1" } }, @@ -884,6 +1026,15 @@ "integrity": "sha1-PXz0Rk22RG6mRL9LOVB/mFEAjo4=", "dev": true }, + "convert-source-map": { + "version": "1.8.0", + "resolved": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-1.8.0.tgz", + "integrity": "sha512-+OQdjP49zViI/6i7nIJpA8rAl4sV/JdPfU9nZs3VqOwGIgizICvuN2ru6fMd+4llL0tar18UYJXfZ/TWtmhUjA==", + "dev": true, + "requires": { + "safe-buffer": "5.1.2" + } + }, "cookie": { "version": "0.3.1", "resolved": "https://registry.npmjs.org/cookie/-/cookie-0.3.1.tgz", @@ -908,9 +1059,9 @@ "integrity": "sha512-0gOYgXVAr6KF7xNUv/+QmTrVsMowpuYu9y1SWzMHFrERzxTygqpeBTXI9CMg1NI1AwQ96ZrkaGHVT9eTC66+Tw==", "dev": true, "requires": { - "color-convert": "^1.7.0", - "strong-data-uri": "^1.0.4", - "svgo": "^0.7.1" + "color-convert": "1.9.2", + "strong-data-uri": "1.0.6", + "svgo": "0.7.2" } }, "cross-spawn": { @@ -919,8 +1070,8 @@ "integrity": "sha1-ElYDfsufDF9549bvE14wdwGEuYI=", "dev": true, "requires": { - "lru-cache": "^4.0.1", - "which": "^1.2.9" + "lru-cache": "4.1.3", + "which": "1.3.1" }, "dependencies": { "lru-cache": { @@ -929,8 +1080,8 @@ "integrity": "sha512-fFEhvcgzuIoJVUF8fYr5KR0YqxD238zgObTps31YdADwPPAp82a4M8TrckkWyx7ekNlf9aBcVn81cFwwXngrJA==", "dev": true, "requires": { - "pseudomap": "^1.0.2", - "yallist": "^2.1.2" + "pseudomap": "1.0.2", + "yallist": "2.1.2" } } } @@ -941,7 +1092,147 @@ "integrity": "sha1-O9/s3GCBR8HGcgL6KR59ylnqo7g=", "dev": true, "requires": { - "boom": "2.x.x" + "boom": "2.10.1" + } + }, + "css": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/css/-/css-3.0.0.tgz", + "integrity": "sha512-DG9pFfwOrzc+hawpmqX/dHYHJG+Bsdb0klhyi1sDneOgGOXy9wQIC8hzyVp1e4NRYDBdxcylvywPkkXCHAzTyQ==", + "dev": true, + "requires": { + "inherits": "2.0.4", + "source-map": "0.6.1", + "source-map-resolve": "0.6.0" + }, + "dependencies": { + "atob": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/atob/-/atob-2.1.2.tgz", + "integrity": "sha512-Wm6ukoaOGJi/73p/cl2GvLjTI5JM1k/O14isD73YML8StrH/7/lRFgmg8nICZgD3bZZvjwCGxtMOD3wWNAu8cg==", + "dev": true + }, + "inherits": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", + "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==", + "dev": true + }, + "source-map": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", + "dev": true + }, + "source-map-resolve": { + "version": "0.6.0", + "resolved": "https://registry.npmjs.org/source-map-resolve/-/source-map-resolve-0.6.0.tgz", + "integrity": "sha512-KXBr9d/fO/bWo97NXsPIAW1bFSBOuCnjbNTBMO7N59hsv5i9yzRDfcYwwt0l04+VqnKC+EwzvJZIP/qkuMgR/w==", + "dev": true, + "requires": { + "atob": "2.1.2", + "decode-uri-component": "0.2.0" + } + } + } + }, + "css-color-names": { + "version": "0.0.4", + "resolved": "https://registry.npmjs.org/css-color-names/-/css-color-names-0.0.4.tgz", + "integrity": "sha1-gIrcLnnPhHOAabZGyyDsJ762KeA=", + "dev": true + }, + "cssnano": { + "version": "3.10.0", + "resolved": "https://registry.npmjs.org/cssnano/-/cssnano-3.10.0.tgz", + "integrity": "sha1-Tzj2zqK5sX+gFJDyPx3GjqZcHDg=", + "dev": true, + "requires": { + "autoprefixer": "6.7.7", + "decamelize": "1.2.0", + "defined": "1.0.0", + "has": "1.0.3", + "object-assign": "4.1.1", + "postcss": "5.2.18", + "postcss-calc": "5.3.1", + "postcss-colormin": "2.2.2", + "postcss-convert-values": "2.6.1", + "postcss-discard-comments": "2.0.4", + "postcss-discard-duplicates": "2.1.0", + "postcss-discard-empty": "2.1.0", + "postcss-discard-overridden": "0.1.1", + "postcss-discard-unused": "2.2.3", + "postcss-filter-plugins": "2.0.3", + "postcss-merge-idents": "2.1.7", + "postcss-merge-longhand": "2.0.2", + "postcss-merge-rules": "2.1.2", + "postcss-minify-font-values": "1.0.5", + "postcss-minify-gradients": "1.0.5", + "postcss-minify-params": "1.2.2", + "postcss-minify-selectors": "2.1.1", + "postcss-normalize-charset": "1.1.1", + "postcss-normalize-url": "3.0.8", + "postcss-ordered-values": "2.2.3", + "postcss-reduce-idents": "2.4.0", + "postcss-reduce-initial": "1.0.1", + "postcss-reduce-transforms": "1.0.4", + "postcss-svgo": "2.1.6", + "postcss-unique-selectors": "2.0.2", + "postcss-value-parser": "3.3.0", + "postcss-zindex": "2.2.0" + }, + "dependencies": { + "autoprefixer": { + "version": "6.7.7", + "resolved": "https://registry.npmjs.org/autoprefixer/-/autoprefixer-6.7.7.tgz", + "integrity": "sha1-Hb0cg1ZY41zj+ZhAmdsAWFx4IBQ=", + "dev": true, + "requires": { + "browserslist": "1.7.7", + "caniuse-db": "1.0.30001332", + "normalize-range": "0.1.2", + "num2fraction": "1.2.2", + "postcss": "5.2.18", + "postcss-value-parser": "3.3.0" + } + }, + "browserslist": { + "version": "1.7.7", + "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-1.7.7.tgz", + "integrity": "sha1-C9dnBCWL6CmyOYu1Dkti0aFmsLk=", + "dev": true, + "requires": { + "caniuse-db": "1.0.30001332", + "electron-to-chromium": "1.3.50" + } + }, + "has-flag": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-1.0.0.tgz", + "integrity": "sha1-nZ55MWXOAXoA8AQYxD+UKnsdEfo=", + "dev": true + }, + "postcss": { + "version": "5.2.18", + "resolved": "https://registry.npmjs.org/postcss/-/postcss-5.2.18.tgz", + "integrity": "sha512-zrUjRRe1bpXKsX1qAJNJjqZViErVuyEkMTRrwu4ud4sbTtIBRmtaYDrHmcGgmrbsW3MHfmtIf+vJumgQn+PrXg==", + "dev": true, + "requires": { + "chalk": "1.1.3", + "js-base64": "2.4.5", + "source-map": "0.5.7", + "supports-color": "3.2.3" + } + }, + "supports-color": { + "version": "3.2.3", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-3.2.3.tgz", + "integrity": "sha1-ZawFBLOVQXHYpklGsq48u4pfVPY=", + "dev": true, + "requires": { + "has-flag": "1.0.0" + } + } } }, "csso": { @@ -950,8 +1241,8 @@ "integrity": "sha1-3dUsWHAz9J6Utx/FVWnyUuj/X4U=", "dev": true, "requires": { - "clap": "^1.0.9", - "source-map": "^0.5.3" + "clap": "1.2.3", + "source-map": "0.5.7" } }, "csswring": { @@ -960,9 +1251,9 @@ "integrity": "sha512-Cz2/8nVqI6li/t4hfZbPTQDF7FkE4qP534j1xbBnLxA1cYl51ZRSg0PTDVWzbzlSsR+tfV2Iv/w+0cTmfKS7JA==", "dev": true, "requires": { - "minimist": "^1.2.0", - "onecolor": "^3.0.5", - "postcss": "^6.0.17" + "minimist": "1.2.0", + "onecolor": "3.0.5", + "postcss": "6.0.23" } }, "currently-unhandled": { @@ -971,7 +1262,17 @@ "integrity": "sha1-mI3zP+qxke95mmE2nddsF635V+o=", "dev": true, "requires": { - "array-find-index": "^1.0.1" + "array-find-index": "1.0.2" + } + }, + "d": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/d/-/d-1.0.1.tgz", + "integrity": "sha512-m62ShEObQ39CfralilEQRjH6oAMtNCV1xJyEx5LpRYUVN+EviphDgUc/F3hnYbADmkiNs67Y+3ylmlG7Lnu+FA==", + "dev": true, + "requires": { + "es5-ext": "0.10.61", + "type": "1.2.0" } }, "dashdash": { @@ -980,7 +1281,7 @@ "integrity": "sha1-hTz6D3y+L+1d4gMmuN1YEDX24vA=", "dev": true, "requires": { - "assert-plus": "^1.0.0" + "assert-plus": "1.0.0" }, "dependencies": { "assert-plus": { @@ -1006,6 +1307,34 @@ "ms": "2.0.0" } }, + "debug-fabulous": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/debug-fabulous/-/debug-fabulous-1.1.0.tgz", + "integrity": "sha512-GZqvGIgKNlUnHUPQhepnUZFIMoi3dgZKQBzKDeL2g7oJF9SNAji/AAu36dusFUas0O+pae74lNeoIPHqXWDkLg==", + "dev": true, + "requires": { + "debug": "3.2.7", + "memoizee": "0.4.15", + "object-assign": "4.1.1" + }, + "dependencies": { + "debug": { + "version": "3.2.7", + "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.7.tgz", + "integrity": "sha512-CFjzYYAi4ThfiQvizrFQevTTXHtnCqWfe7x1AhgEscTz6ZbLbfoLRLPugTQyBth6f8ZERVUSyWHFD/7Wu4t1XQ==", + "dev": true, + "requires": { + "ms": "2.1.3" + } + }, + "ms": { + "version": "2.1.3", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", + "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==", + "dev": true + } + } + }, "decamelize": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/decamelize/-/decamelize-1.2.0.tgz", @@ -1024,7 +1353,7 @@ "integrity": "sha512-+QeIQyN5ZuO+3Uk5DYh6/1eKO0m0YmJFGNmFHGACpf1ClL1nmlV/p4gNgbl2pJGxgXb4faqo6UE+M5ACEMyVcw==", "dev": true, "requires": { - "type-detect": "^4.0.0" + "type-detect": "4.0.8" } }, "defaults": { @@ -1033,7 +1362,7 @@ "integrity": "sha1-xlYFHpgX2f8I7YgUd/P+QBnz730=", "dev": true, "requires": { - "clone": "^1.0.2" + "clone": "1.0.4" } }, "define-property": { @@ -1042,8 +1371,8 @@ "integrity": "sha512-jwK2UV4cnPpbcG7+VRARKTZPUWowwXA8bzH5NP6ud0oeAxyYPuGZUAC7hMugpCdz4BeSZl2Dl9k66CHJ/46ZYQ==", "dev": true, "requires": { - "is-descriptor": "^1.0.2", - "isobject": "^3.0.1" + "is-descriptor": "1.0.2", + "isobject": "3.0.1" }, "dependencies": { "is-accessor-descriptor": { @@ -1052,7 +1381,7 @@ "integrity": "sha512-m5hnHTkcVsPfqx3AKlyttIPb7J+XykHvJP2B9bZDjlhLIoEq4XoK64Vg7boZlVWYK6LUY94dYPEE7Lh0ZkZKcQ==", "dev": true, "requires": { - "kind-of": "^6.0.0" + "kind-of": "6.0.2" } }, "is-data-descriptor": { @@ -1061,7 +1390,7 @@ "integrity": "sha512-jbRXy1FmtAoCjQkVmIVYwuuqDFUbaOeDjmed1tOGPrsMhtJA4rD9tkgA0F1qJ3gRFRXcHYVkdeaP50Q5rE/jLQ==", "dev": true, "requires": { - "kind-of": "^6.0.0" + "kind-of": "6.0.2" } }, "is-descriptor": { @@ -1070,9 +1399,9 @@ "integrity": "sha512-2eis5WqQGV7peooDyLmNEPUrps9+SXX5c9pL3xEB+4e9HnGuDa7mB7kHxHw4CbqS9k1T2hOH3miL8n8WtiYVtg==", "dev": true, "requires": { - "is-accessor-descriptor": "^1.0.0", - "is-data-descriptor": "^1.0.0", - "kind-of": "^6.0.2" + "is-accessor-descriptor": "1.0.0", + "is-data-descriptor": "1.0.0", + "kind-of": "6.0.2" } }, "isobject": { @@ -1089,6 +1418,12 @@ } } }, + "defined": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/defined/-/defined-1.0.0.tgz", + "integrity": "sha1-yY2bzvdWdBiOEQlpFRGZ45sfppM=", + "dev": true + }, "delayed-stream": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz", @@ -1125,6 +1460,12 @@ "integrity": "sha1-8NZtA2cqglyxtzvbP+YjEMjlUrc=", "dev": true }, + "detect-newline": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/detect-newline/-/detect-newline-2.1.0.tgz", + "integrity": "sha1-9B8cEL5LAOh7XxPaaAdZ8sW/0+I=", + "dev": true + }, "dev-ip": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/dev-ip/-/dev-ip-1.0.1.tgz", @@ -1143,7 +1484,7 @@ "integrity": "sha1-xhTc9n4vsUmVqRcR5aYX6KYKMds=", "dev": true, "requires": { - "readable-stream": "~1.1.9" + "readable-stream": "1.1.14" }, "dependencies": { "isarray": { @@ -1158,10 +1499,10 @@ "integrity": "sha1-fPTFTvZI44EwhMY23SB54WbAgdk=", "dev": true, "requires": { - "core-util-is": "~1.0.0", - "inherits": "~2.0.1", + "core-util-is": "1.0.2", + "inherits": "2.0.3", "isarray": "0.0.1", - "string_decoder": "~0.10.x" + "string_decoder": "0.10.31" } }, "string_decoder": { @@ -1178,10 +1519,10 @@ "integrity": "sha512-fO3Di4tBKJpYTFHAxTU00BcfWMY9w24r/x21a6rZRbsD/ToUgGxsMbiGRmB7uVAXeGKXD9MwiLZa5E97EVgIRQ==", "dev": true, "requires": { - "end-of-stream": "^1.0.0", - "inherits": "^2.0.1", - "readable-stream": "^2.0.0", - "stream-shift": "^1.0.0" + "end-of-stream": "1.4.1", + "inherits": "2.0.3", + "readable-stream": "2.3.6", + "stream-shift": "1.0.0" }, "dependencies": { "end-of-stream": { @@ -1190,7 +1531,7 @@ "integrity": "sha512-1MkrZNvWTKCaigbn+W15elq2BB/L22nqrSY5DKlo3X6+vclJm8Bb5djXJBmEX6fS3+zCh/F4VBK5Z2KxJt4s2Q==", "dev": true, "requires": { - "once": "^1.4.0" + "once": "1.4.0" } }, "once": { @@ -1199,7 +1540,7 @@ "integrity": "sha1-WDsap3WWHUsROsF9nFC6753Xa9E=", "dev": true, "requires": { - "wrappy": "1" + "wrappy": "1.0.2" } } } @@ -1210,7 +1551,7 @@ "integrity": "sha1-PTJI/r4rFZYHMW2PnPSRwWZIIh0=", "dev": true, "requires": { - "lodash": "^3.10.1" + "lodash": "3.10.1" } }, "eazy-logger": { @@ -1219,7 +1560,7 @@ "integrity": "sha1-oyWqXlPROiIliJsqxBE7K5Y29Pw=", "dev": true, "requires": { - "tfunk": "^3.0.1" + "tfunk": "3.1.0" } }, "ecc-jsbn": { @@ -1229,7 +1570,7 @@ "dev": true, "optional": true, "requires": { - "jsbn": "~0.1.0" + "jsbn": "0.1.1" } }, "ee-first": { @@ -1256,7 +1597,7 @@ "integrity": "sha1-jhdyBsPICDfYVjLouTWd/osvbq8=", "dev": true, "requires": { - "once": "~1.3.0" + "once": "1.3.3" } }, "engine.io": { @@ -1265,12 +1606,12 @@ "integrity": "sha512-mRbgmAtQ4GAlKwuPnnAvXXwdPhEx+jkc0OBCLrXuD/CRvwNK3AxRSnqK4FSqmAMRRHryVJP8TopOvmEaA64fKw==", "dev": true, "requires": { - "accepts": "~1.3.4", + "accepts": "1.3.5", "base64id": "1.0.0", "cookie": "0.3.1", - "debug": "~3.1.0", - "engine.io-parser": "~2.1.0", - "ws": "~3.3.1" + "debug": "3.1.0", + "engine.io-parser": "2.1.2", + "ws": "3.3.3" }, "dependencies": { "debug": { @@ -1292,14 +1633,14 @@ "requires": { "component-emitter": "1.2.1", "component-inherit": "0.0.3", - "debug": "~3.1.0", - "engine.io-parser": "~2.1.1", + "debug": "3.1.0", + "engine.io-parser": "2.1.2", "has-cors": "1.1.0", "indexof": "0.0.1", "parseqs": "0.0.5", "parseuri": "0.0.5", - "ws": "~3.3.1", - "xmlhttprequest-ssl": "~1.5.4", + "ws": "3.3.3", + "xmlhttprequest-ssl": "1.5.5", "yeast": "0.1.2" }, "dependencies": { @@ -1321,10 +1662,10 @@ "dev": true, "requires": { "after": "0.8.2", - "arraybuffer.slice": "~0.0.7", + "arraybuffer.slice": "0.0.7", "base64-arraybuffer": "0.1.5", "blob": "0.0.4", - "has-binary2": "~1.0.2" + "has-binary2": "1.0.3" } }, "error-ex": { @@ -1333,7 +1674,51 @@ "integrity": "sha512-7dFHNmqeFSEt2ZBsCriorKnn3Z2pj+fd9kmI6QoWw4//DL+icEBfc0U7qJCisqrTsKTjw4fNFy2pW9OqStD84g==", "dev": true, "requires": { - "is-arrayish": "^0.2.1" + "is-arrayish": "0.2.1" + } + }, + "es5-ext": { + "version": "0.10.61", + "resolved": "https://registry.npmjs.org/es5-ext/-/es5-ext-0.10.61.tgz", + "integrity": "sha512-yFhIqQAzu2Ca2I4SE2Au3rxVfmohU9Y7wqGR+s7+H7krk26NXhIRAZDgqd6xqjCEFUomDEA3/Bo/7fKmIkW1kA==", + "dev": true, + "requires": { + "es6-iterator": "2.0.3", + "es6-symbol": "3.1.3", + "next-tick": "1.1.0" + } + }, + "es6-iterator": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/es6-iterator/-/es6-iterator-2.0.3.tgz", + "integrity": "sha1-p96IkUGgWpSwhUQDstCg+/qY87c=", + "dev": true, + "requires": { + "d": "1.0.1", + "es5-ext": "0.10.61", + "es6-symbol": "3.1.3" + } + }, + "es6-symbol": { + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/es6-symbol/-/es6-symbol-3.1.3.tgz", + "integrity": "sha512-NJ6Yn3FuDinBaBRWl/q5X/s4koRHBrgKAu+yGI6JCBeiu3qrcbJhwT2GeR/EXVfylRk8dpQVJoLEFhK+Mu31NA==", + "dev": true, + "requires": { + "d": "1.0.1", + "ext": "1.6.0" + } + }, + "es6-weak-map": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/es6-weak-map/-/es6-weak-map-2.0.3.tgz", + "integrity": "sha512-p5um32HOTO1kP+w7PRnB+5lQ43Z6muuMuIMffvDN8ZB4GcnjLBV6zGStpbASIMk4DCAvEaamhe2zhyCb/QXXsA==", + "dev": true, + "requires": { + "d": "1.0.1", + "es5-ext": "0.10.61", + "es6-iterator": "2.0.3", + "es6-symbol": "3.1.3" } }, "escape-html": { @@ -1360,6 +1745,16 @@ "integrity": "sha1-Qa4u62XvpiJorr/qg6x9eSmbCIc=", "dev": true }, + "event-emitter": { + "version": "0.3.5", + "resolved": "https://registry.npmjs.org/event-emitter/-/event-emitter-0.3.5.tgz", + "integrity": "sha1-34xp7vFkeSPHFXuc6DhAYQsCzDk=", + "dev": true, + "requires": { + "d": "1.0.1", + "es5-ext": "0.10.61" + } + }, "eventemitter3": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/eventemitter3/-/eventemitter3-1.2.0.tgz", @@ -1372,7 +1767,7 @@ "integrity": "sha1-3wcoTjQqgHzXM6xa9yQR5YHRF3s=", "dev": true, "requires": { - "is-posix-bracket": "^0.1.0" + "is-posix-bracket": "0.1.1" } }, "expand-range": { @@ -1381,7 +1776,7 @@ "integrity": "sha1-opnv/TNf4nIeuujiV+x5ZE/IUzc=", "dev": true, "requires": { - "fill-range": "^2.1.0" + "fill-range": "2.2.4" } }, "expand-tilde": { @@ -1390,7 +1785,24 @@ "integrity": "sha1-l+gBqgUt8CRU3kawK/YhZCzchQI=", "dev": true, "requires": { - "homedir-polyfill": "^1.0.1" + "homedir-polyfill": "1.0.1" + } + }, + "ext": { + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/ext/-/ext-1.6.0.tgz", + "integrity": "sha512-sdBImtzkq2HpkdRLtlLWDa6w4DX22ijZLKx8BMPUuKe1c5lbN6xwQDQCxSfxBQnHZ13ls/FH0MQZx/q/gr6FQg==", + "dev": true, + "requires": { + "type": "2.6.0" + }, + "dependencies": { + "type": { + "version": "2.6.0", + "resolved": "https://registry.npmjs.org/type/-/type-2.6.0.tgz", + "integrity": "sha512-eiDBDOmkih5pMbo9OqsqPRGMljLodLcwd5XD5JbtNB0o89xZAwynY9EdCDsJU7LtcVCClu9DvM7/0Ep1hYX3EQ==", + "dev": true + } } }, "extend": { @@ -1405,8 +1817,8 @@ "integrity": "sha1-Jqcarwc7OfshJxcnRhMcJwQCjbg=", "dev": true, "requires": { - "assign-symbols": "^1.0.0", - "is-extendable": "^1.0.1" + "assign-symbols": "1.0.0", + "is-extendable": "1.0.1" }, "dependencies": { "is-extendable": { @@ -1415,7 +1827,7 @@ "integrity": "sha512-arnXMxT1hhoKo9k1LZdmlNyJdDDfy2v0fXjFlmok4+i8ul/6WlbVge9bhM74OpNPQPMGUToDtz+KXa1PneJxOA==", "dev": true, "requires": { - "is-plain-object": "^2.0.4" + "is-plain-object": "2.0.4" } } } @@ -1426,7 +1838,7 @@ "integrity": "sha1-Lhj/PS9JqydlzskCPwEdqo2DSaE=", "dev": true, "requires": { - "is-extglob": "^1.0.0" + "is-extglob": "1.0.0" } }, "extsprintf": { @@ -1441,9 +1853,9 @@ "integrity": "sha1-9BEl49hPLn2JpD0G2VjI94vha+E=", "dev": true, "requires": { - "ansi-gray": "^0.1.1", - "color-support": "^1.1.3", - "time-stamp": "^1.0.0" + "ansi-gray": "0.1.1", + "color-support": "1.1.3", + "time-stamp": "1.1.0" } }, "filename-regex": { @@ -1458,11 +1870,11 @@ "integrity": "sha512-cnrcCbj01+j2gTG921VZPnHbjmdAf8oQV/iGeV2kZxGSyfYjjTyY79ErsK1WJWMpw6DaApEX72binqJE+/d+5Q==", "dev": true, "requires": { - "is-number": "^2.1.0", - "isobject": "^2.0.0", - "randomatic": "^3.0.0", - "repeat-element": "^1.1.2", - "repeat-string": "^1.5.2" + "is-number": "2.1.0", + "isobject": "2.1.0", + "randomatic": "3.0.0", + "repeat-element": "1.1.2", + "repeat-string": "1.6.1" } }, "finalhandler": { @@ -1472,12 +1884,12 @@ "dev": true, "requires": { "debug": "2.6.9", - "encodeurl": "~1.0.1", - "escape-html": "~1.0.3", - "on-finished": "~2.3.0", - "parseurl": "~1.3.2", - "statuses": "~1.3.1", - "unpipe": "~1.0.0" + "encodeurl": "1.0.2", + "escape-html": "1.0.3", + "on-finished": "2.3.0", + "parseurl": "1.3.2", + "statuses": "1.3.1", + "unpipe": "1.0.0" } }, "find-index": { @@ -1492,8 +1904,8 @@ "integrity": "sha1-ay6YIrGizgpgq2TWEOzK1TyyTQ8=", "dev": true, "requires": { - "path-exists": "^2.0.0", - "pinkie-promise": "^2.0.0" + "path-exists": "2.1.0", + "pinkie-promise": "2.0.1" } }, "findup-sync": { @@ -1502,10 +1914,10 @@ "integrity": "sha1-kyaxSIwi0aYIhlCoaQGy2akKLLw=", "dev": true, "requires": { - "detect-file": "^1.0.0", - "is-glob": "^3.1.0", - "micromatch": "^3.0.4", - "resolve-dir": "^1.0.1" + "detect-file": "1.0.0", + "is-glob": "3.1.0", + "micromatch": "3.1.10", + "resolve-dir": "1.0.1" }, "dependencies": { "arr-diff": { @@ -1526,16 +1938,16 @@ "integrity": "sha512-aNdbnj9P8PjdXU4ybaWLK2IF3jc/EoDYbC7AazW6to3TRsfXxscC9UXOB5iDiEQrkyIbWp2SLQda4+QAa7nc3w==", "dev": true, "requires": { - "arr-flatten": "^1.1.0", - "array-unique": "^0.3.2", - "extend-shallow": "^2.0.1", - "fill-range": "^4.0.0", - "isobject": "^3.0.1", - "repeat-element": "^1.1.2", - "snapdragon": "^0.8.1", - "snapdragon-node": "^2.0.1", - "split-string": "^3.0.2", - "to-regex": "^3.0.1" + "arr-flatten": "1.1.0", + "array-unique": "0.3.2", + "extend-shallow": "2.0.1", + "fill-range": "4.0.0", + "isobject": "3.0.1", + "repeat-element": "1.1.2", + "snapdragon": "0.8.2", + "snapdragon-node": "2.1.1", + "split-string": "3.1.0", + "to-regex": "3.0.2" }, "dependencies": { "extend-shallow": { @@ -1544,7 +1956,7 @@ "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", "dev": true, "requires": { - "is-extendable": "^0.1.0" + "is-extendable": "0.1.1" } } } @@ -1555,13 +1967,13 @@ "integrity": "sha1-t3c14xXOMPa27/D4OwQVGiJEliI=", "dev": true, "requires": { - "debug": "^2.3.3", - "define-property": "^0.2.5", - "extend-shallow": "^2.0.1", - "posix-character-classes": "^0.1.0", - "regex-not": "^1.0.0", - "snapdragon": "^0.8.1", - "to-regex": "^3.0.1" + "debug": "2.6.9", + "define-property": "0.2.5", + "extend-shallow": "2.0.1", + "posix-character-classes": "0.1.1", + "regex-not": "1.0.2", + "snapdragon": "0.8.2", + "to-regex": "3.0.2" }, "dependencies": { "define-property": { @@ -1570,7 +1982,7 @@ "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=", "dev": true, "requires": { - "is-descriptor": "^0.1.0" + "is-descriptor": "0.1.6" } }, "extend-shallow": { @@ -1579,7 +1991,7 @@ "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", "dev": true, "requires": { - "is-extendable": "^0.1.0" + "is-extendable": "0.1.1" } }, "is-accessor-descriptor": { @@ -1588,7 +2000,7 @@ "integrity": "sha1-qeEss66Nh2cn7u84Q/igiXtcmNY=", "dev": true, "requires": { - "kind-of": "^3.0.2" + "kind-of": "3.2.2" }, "dependencies": { "kind-of": { @@ -1597,7 +2009,7 @@ "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", "dev": true, "requires": { - "is-buffer": "^1.1.5" + "is-buffer": "1.1.6" } } } @@ -1608,7 +2020,7 @@ "integrity": "sha1-C17mSDiOLIYCgueT8YVv7D8wG1Y=", "dev": true, "requires": { - "kind-of": "^3.0.2" + "kind-of": "3.2.2" }, "dependencies": { "kind-of": { @@ -1617,7 +2029,7 @@ "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", "dev": true, "requires": { - "is-buffer": "^1.1.5" + "is-buffer": "1.1.6" } } } @@ -1628,9 +2040,9 @@ "integrity": "sha512-avDYr0SB3DwO9zsMov0gKCESFYqCnE4hq/4z3TdUlukEy5t9C0YRq7HLrsN52NAcqXKaepeCD0n+B0arnVG3Hg==", "dev": true, "requires": { - "is-accessor-descriptor": "^0.1.6", - "is-data-descriptor": "^0.1.4", - "kind-of": "^5.0.0" + "is-accessor-descriptor": "0.1.6", + "is-data-descriptor": "0.1.4", + "kind-of": "5.1.0" } }, "kind-of": { @@ -1647,14 +2059,14 @@ "integrity": "sha512-Nmb6QXkELsuBr24CJSkilo6UHHgbekK5UiZgfE6UHD3Eb27YC6oD+bhcT+tJ6cl8dmsgdQxnWlcry8ksBIBLpw==", "dev": true, "requires": { - "array-unique": "^0.3.2", - "define-property": "^1.0.0", - "expand-brackets": "^2.1.4", - "extend-shallow": "^2.0.1", - "fragment-cache": "^0.2.1", - "regex-not": "^1.0.0", - "snapdragon": "^0.8.1", - "to-regex": "^3.0.1" + "array-unique": "0.3.2", + "define-property": "1.0.0", + "expand-brackets": "2.1.4", + "extend-shallow": "2.0.1", + "fragment-cache": "0.2.1", + "regex-not": "1.0.2", + "snapdragon": "0.8.2", + "to-regex": "3.0.2" }, "dependencies": { "define-property": { @@ -1663,7 +2075,7 @@ "integrity": "sha1-dp66rz9KY6rTr56NMEybvnm/sOY=", "dev": true, "requires": { - "is-descriptor": "^1.0.0" + "is-descriptor": "1.0.2" } }, "extend-shallow": { @@ -1672,7 +2084,7 @@ "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", "dev": true, "requires": { - "is-extendable": "^0.1.0" + "is-extendable": "0.1.1" } } } @@ -1683,10 +2095,10 @@ "integrity": "sha1-1USBHUKPmOsGpj3EAtJAPDKMOPc=", "dev": true, "requires": { - "extend-shallow": "^2.0.1", - "is-number": "^3.0.0", - "repeat-string": "^1.6.1", - "to-regex-range": "^2.1.0" + "extend-shallow": "2.0.1", + "is-number": "3.0.0", + "repeat-string": "1.6.1", + "to-regex-range": "2.1.1" }, "dependencies": { "extend-shallow": { @@ -1695,7 +2107,7 @@ "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", "dev": true, "requires": { - "is-extendable": "^0.1.0" + "is-extendable": "0.1.1" } } } @@ -1706,7 +2118,7 @@ "integrity": "sha512-m5hnHTkcVsPfqx3AKlyttIPb7J+XykHvJP2B9bZDjlhLIoEq4XoK64Vg7boZlVWYK6LUY94dYPEE7Lh0ZkZKcQ==", "dev": true, "requires": { - "kind-of": "^6.0.0" + "kind-of": "6.0.2" } }, "is-data-descriptor": { @@ -1715,7 +2127,7 @@ "integrity": "sha512-jbRXy1FmtAoCjQkVmIVYwuuqDFUbaOeDjmed1tOGPrsMhtJA4rD9tkgA0F1qJ3gRFRXcHYVkdeaP50Q5rE/jLQ==", "dev": true, "requires": { - "kind-of": "^6.0.0" + "kind-of": "6.0.2" } }, "is-descriptor": { @@ -1724,9 +2136,9 @@ "integrity": "sha512-2eis5WqQGV7peooDyLmNEPUrps9+SXX5c9pL3xEB+4e9HnGuDa7mB7kHxHw4CbqS9k1T2hOH3miL8n8WtiYVtg==", "dev": true, "requires": { - "is-accessor-descriptor": "^1.0.0", - "is-data-descriptor": "^1.0.0", - "kind-of": "^6.0.2" + "is-accessor-descriptor": "1.0.0", + "is-data-descriptor": "1.0.0", + "kind-of": "6.0.2" } }, "is-extglob": { @@ -1741,7 +2153,7 @@ "integrity": "sha1-e6WuJCF4BKxwcHuWkiVnSGzD6Eo=", "dev": true, "requires": { - "is-extglob": "^2.1.0" + "is-extglob": "2.1.1" } }, "is-number": { @@ -1750,7 +2162,7 @@ "integrity": "sha1-JP1iAaR4LPUFYcgQJ2r8fRLXEZU=", "dev": true, "requires": { - "kind-of": "^3.0.2" + "kind-of": "3.2.2" }, "dependencies": { "kind-of": { @@ -1759,7 +2171,7 @@ "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", "dev": true, "requires": { - "is-buffer": "^1.1.5" + "is-buffer": "1.1.6" } } } @@ -1782,19 +2194,19 @@ "integrity": "sha512-MWikgl9n9M3w+bpsY3He8L+w9eF9338xRl8IAO5viDizwSzziFEyUzo2xrrloB64ADbTf8uA8vRqqttDTOmccg==", "dev": true, "requires": { - "arr-diff": "^4.0.0", - "array-unique": "^0.3.2", - "braces": "^2.3.1", - "define-property": "^2.0.2", - "extend-shallow": "^3.0.2", - "extglob": "^2.0.4", - "fragment-cache": "^0.2.1", - "kind-of": "^6.0.2", - "nanomatch": "^1.2.9", - "object.pick": "^1.3.0", - "regex-not": "^1.0.0", - "snapdragon": "^0.8.1", - "to-regex": "^3.0.2" + "arr-diff": "4.0.0", + "array-unique": "0.3.2", + "braces": "2.3.2", + "define-property": "2.0.2", + "extend-shallow": "3.0.2", + "extglob": "2.0.4", + "fragment-cache": "0.2.1", + "kind-of": "6.0.2", + "nanomatch": "1.2.9", + "object.pick": "1.3.0", + "regex-not": "1.0.2", + "snapdragon": "0.8.2", + "to-regex": "3.0.2" } } } @@ -1805,11 +2217,11 @@ "integrity": "sha1-s33IRLdqL15wgeiE98CuNE8VNHY=", "dev": true, "requires": { - "expand-tilde": "^2.0.2", - "is-plain-object": "^2.0.3", - "object.defaults": "^1.1.0", - "object.pick": "^1.2.0", - "parse-filepath": "^1.0.1" + "expand-tilde": "2.0.2", + "is-plain-object": "2.0.4", + "object.defaults": "1.1.0", + "object.pick": "1.3.0", + "parse-filepath": "1.0.2" } }, "first-chunk-stream": { @@ -1824,13 +2236,19 @@ "integrity": "sha1-Tnmumy6zi/hrO7Vr8+ClaqX8q9c=", "dev": true }, + "flatten": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/flatten/-/flatten-1.0.3.tgz", + "integrity": "sha512-dVsPA/UwQ8+2uoFe5GHtiBMu48dWLTdsuEd7CKGlZlD78r1TTWBvDuFaFGKCo/ZfEr95Uk56vZoX86OsHkUeIg==", + "dev": true + }, "follow-redirects": { "version": "1.5.0", "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.5.0.tgz", "integrity": "sha512-fdrt472/9qQ6Kgjvb935ig6vJCuofpBUD14f9Vb+SLlm7xIe4Qva5gey8EKtv8lp7ahE1wilg3xL1znpVGtZIA==", "dev": true, "requires": { - "debug": "^3.1.0" + "debug": "3.1.0" }, "dependencies": { "debug": { @@ -1856,7 +2274,7 @@ "integrity": "sha1-UmXGgaTylNq78XyVCbZ2OqhFEM4=", "dev": true, "requires": { - "for-in": "^1.0.1" + "for-in": "1.0.2" } }, "forever-agent": { @@ -1877,9 +2295,9 @@ "integrity": "sha1-M8GDrPGTJ27KqYFDpp6Uv+4XUNE=", "dev": true, "requires": { - "asynckit": "^0.4.0", - "combined-stream": "^1.0.5", - "mime-types": "^2.1.12" + "asynckit": "0.4.0", + "combined-stream": "1.0.6", + "mime-types": "2.1.18" } }, "fragment-cache": { @@ -1888,7 +2306,7 @@ "integrity": "sha1-QpD60n8T6Jvn8zeZxrxaCr//DRk=", "dev": true, "requires": { - "map-cache": "^0.2.2" + "map-cache": "0.2.2" } }, "fresh": { @@ -1903,9 +2321,9 @@ "integrity": "sha1-N5TzeMWLNC6n27sjCVEJxLO2IpE=", "dev": true, "requires": { - "graceful-fs": "^4.1.2", - "jsonfile": "^3.0.0", - "universalify": "^0.1.0" + "graceful-fs": "4.1.11", + "jsonfile": "3.0.1", + "universalify": "0.1.2" } }, "fs.realpath": { @@ -1921,8 +2339,8 @@ "dev": true, "optional": true, "requires": { - "nan": "^2.9.2", - "node-pre-gyp": "^0.10.0" + "nan": "2.10.0", + "node-pre-gyp": "0.10.0" }, "dependencies": { "abbrev": { @@ -1948,8 +2366,8 @@ "dev": true, "optional": true, "requires": { - "delegates": "^1.0.0", - "readable-stream": "^2.0.6" + "delegates": "1.0.0", + "readable-stream": "2.3.6" } }, "balanced-match": { @@ -1962,7 +2380,7 @@ "bundled": true, "dev": true, "requires": { - "balanced-match": "^1.0.0", + "balanced-match": "1.0.0", "concat-map": "0.0.1" } }, @@ -2026,7 +2444,7 @@ "dev": true, "optional": true, "requires": { - "minipass": "^2.2.1" + "minipass": "2.2.4" } }, "fs.realpath": { @@ -2041,14 +2459,14 @@ "dev": true, "optional": true, "requires": { - "aproba": "^1.0.3", - "console-control-strings": "^1.0.0", - "has-unicode": "^2.0.0", - "object-assign": "^4.1.0", - "signal-exit": "^3.0.0", - "string-width": "^1.0.1", - "strip-ansi": "^3.0.1", - "wide-align": "^1.1.0" + "aproba": "1.2.0", + "console-control-strings": "1.1.0", + "has-unicode": "2.0.1", + "object-assign": "4.1.1", + "signal-exit": "3.0.2", + "string-width": "1.0.2", + "strip-ansi": "3.0.1", + "wide-align": "1.1.2" } }, "glob": { @@ -2057,12 +2475,12 @@ "dev": true, "optional": true, "requires": { - "fs.realpath": "^1.0.0", - "inflight": "^1.0.4", - "inherits": "2", - "minimatch": "^3.0.4", - "once": "^1.3.0", - "path-is-absolute": "^1.0.0" + "fs.realpath": "1.0.0", + "inflight": "1.0.6", + "inherits": "2.0.3", + "minimatch": "3.0.4", + "once": "1.4.0", + "path-is-absolute": "1.0.1" } }, "has-unicode": { @@ -2077,7 +2495,7 @@ "dev": true, "optional": true, "requires": { - "safer-buffer": "^2.1.0" + "safer-buffer": "2.1.2" } }, "ignore-walk": { @@ -2086,7 +2504,7 @@ "dev": true, "optional": true, "requires": { - "minimatch": "^3.0.4" + "minimatch": "3.0.4" } }, "inflight": { @@ -2095,8 +2513,8 @@ "dev": true, "optional": true, "requires": { - "once": "^1.3.0", - "wrappy": "1" + "once": "1.4.0", + "wrappy": "1.0.2" } }, "inherits": { @@ -2115,7 +2533,7 @@ "bundled": true, "dev": true, "requires": { - "number-is-nan": "^1.0.0" + "number-is-nan": "1.0.1" } }, "isarray": { @@ -2129,7 +2547,7 @@ "bundled": true, "dev": true, "requires": { - "brace-expansion": "^1.1.7" + "brace-expansion": "1.1.11" } }, "minimist": { @@ -2142,8 +2560,8 @@ "bundled": true, "dev": true, "requires": { - "safe-buffer": "^5.1.1", - "yallist": "^3.0.0" + "safe-buffer": "5.1.1", + "yallist": "3.0.2" } }, "minizlib": { @@ -2152,7 +2570,7 @@ "dev": true, "optional": true, "requires": { - "minipass": "^2.2.1" + "minipass": "2.2.4" } }, "mkdirp": { @@ -2175,9 +2593,9 @@ "dev": true, "optional": true, "requires": { - "debug": "^2.1.2", - "iconv-lite": "^0.4.4", - "sax": "^1.2.4" + "debug": "2.6.9", + "iconv-lite": "0.4.21", + "sax": "1.2.4" } }, "node-pre-gyp": { @@ -2186,16 +2604,16 @@ "dev": true, "optional": true, "requires": { - "detect-libc": "^1.0.2", - "mkdirp": "^0.5.1", - "needle": "^2.2.0", - "nopt": "^4.0.1", - "npm-packlist": "^1.1.6", - "npmlog": "^4.0.2", - "rc": "^1.1.7", - "rimraf": "^2.6.1", - "semver": "^5.3.0", - "tar": "^4" + "detect-libc": "1.0.3", + "mkdirp": "0.5.1", + "needle": "2.2.0", + "nopt": "4.0.1", + "npm-packlist": "1.1.10", + "npmlog": "4.1.2", + "rc": "1.2.7", + "rimraf": "2.6.2", + "semver": "5.5.0", + "tar": "4.4.1" } }, "nopt": { @@ -2204,8 +2622,8 @@ "dev": true, "optional": true, "requires": { - "abbrev": "1", - "osenv": "^0.1.4" + "abbrev": "1.1.1", + "osenv": "0.1.5" } }, "npm-bundled": { @@ -2220,8 +2638,8 @@ "dev": true, "optional": true, "requires": { - "ignore-walk": "^3.0.1", - "npm-bundled": "^1.0.1" + "ignore-walk": "3.0.1", + "npm-bundled": "1.0.3" } }, "npmlog": { @@ -2230,10 +2648,10 @@ "dev": true, "optional": true, "requires": { - "are-we-there-yet": "~1.1.2", - "console-control-strings": "~1.1.0", - "gauge": "~2.7.3", - "set-blocking": "~2.0.0" + "are-we-there-yet": "1.1.4", + "console-control-strings": "1.1.0", + "gauge": "2.7.4", + "set-blocking": "2.0.0" } }, "number-is-nan": { @@ -2252,7 +2670,7 @@ "bundled": true, "dev": true, "requires": { - "wrappy": "1" + "wrappy": "1.0.2" } }, "os-homedir": { @@ -2273,8 +2691,8 @@ "dev": true, "optional": true, "requires": { - "os-homedir": "^1.0.0", - "os-tmpdir": "^1.0.0" + "os-homedir": "1.0.2", + "os-tmpdir": "1.0.2" } }, "path-is-absolute": { @@ -2295,10 +2713,10 @@ "dev": true, "optional": true, "requires": { - "deep-extend": "^0.5.1", - "ini": "~1.3.0", - "minimist": "^1.2.0", - "strip-json-comments": "~2.0.1" + "deep-extend": "0.5.1", + "ini": "1.3.5", + "minimist": "1.2.0", + "strip-json-comments": "2.0.1" }, "dependencies": { "minimist": { @@ -2315,13 +2733,13 @@ "dev": true, "optional": true, "requires": { - "core-util-is": "~1.0.0", - "inherits": "~2.0.3", - "isarray": "~1.0.0", - "process-nextick-args": "~2.0.0", - "safe-buffer": "~5.1.1", - "string_decoder": "~1.1.1", - "util-deprecate": "~1.0.1" + "core-util-is": "1.0.2", + "inherits": "2.0.3", + "isarray": "1.0.0", + "process-nextick-args": "2.0.0", + "safe-buffer": "5.1.1", + "string_decoder": "1.1.1", + "util-deprecate": "1.0.2" } }, "rimraf": { @@ -2330,7 +2748,7 @@ "dev": true, "optional": true, "requires": { - "glob": "^7.0.5" + "glob": "7.1.2" } }, "safe-buffer": { @@ -2373,9 +2791,9 @@ "bundled": true, "dev": true, "requires": { - "code-point-at": "^1.0.0", - "is-fullwidth-code-point": "^1.0.0", - "strip-ansi": "^3.0.0" + "code-point-at": "1.1.0", + "is-fullwidth-code-point": "1.0.0", + "strip-ansi": "3.0.1" } }, "string_decoder": { @@ -2384,7 +2802,7 @@ "dev": true, "optional": true, "requires": { - "safe-buffer": "~5.1.0" + "safe-buffer": "5.1.1" } }, "strip-ansi": { @@ -2392,7 +2810,7 @@ "bundled": true, "dev": true, "requires": { - "ansi-regex": "^2.0.0" + "ansi-regex": "2.1.1" } }, "strip-json-comments": { @@ -2407,13 +2825,13 @@ "dev": true, "optional": true, "requires": { - "chownr": "^1.0.1", - "fs-minipass": "^1.2.5", - "minipass": "^2.2.4", - "minizlib": "^1.1.0", - "mkdirp": "^0.5.0", - "safe-buffer": "^5.1.1", - "yallist": "^3.0.2" + "chownr": "1.0.1", + "fs-minipass": "1.2.5", + "minipass": "2.2.4", + "minizlib": "1.1.0", + "mkdirp": "0.5.1", + "safe-buffer": "5.1.1", + "yallist": "3.0.2" } }, "util-deprecate": { @@ -2428,7 +2846,7 @@ "dev": true, "optional": true, "requires": { - "string-width": "^1.0.2" + "string-width": "1.0.2" } }, "wrappy": { @@ -2449,26 +2867,32 @@ "integrity": "sha1-XB+x8RdHcRTwYyoOtLcbPLD9MXE=", "dev": true, "requires": { - "graceful-fs": "^4.1.2", - "inherits": "~2.0.0", - "mkdirp": ">=0.5 0", - "rimraf": "2" + "graceful-fs": "4.1.11", + "inherits": "2.0.3", + "mkdirp": "0.5.1", + "rimraf": "2.6.2" } }, + "function-bind": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.1.tgz", + "integrity": "sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A==", + "dev": true + }, "gauge": { "version": "2.7.4", "resolved": "https://registry.npmjs.org/gauge/-/gauge-2.7.4.tgz", "integrity": "sha1-LANAXHU4w51+s3sxcCLjJfsBi/c=", "dev": true, "requires": { - "aproba": "^1.0.3", - "console-control-strings": "^1.0.0", - "has-unicode": "^2.0.0", - "object-assign": "^4.1.0", - "signal-exit": "^3.0.0", - "string-width": "^1.0.1", - "strip-ansi": "^3.0.1", - "wide-align": "^1.1.0" + "aproba": "1.2.0", + "console-control-strings": "1.1.0", + "has-unicode": "2.0.1", + "object-assign": "4.1.1", + "signal-exit": "3.0.2", + "string-width": "1.0.2", + "strip-ansi": "3.0.1", + "wide-align": "1.1.3" } }, "gaze": { @@ -2477,7 +2901,7 @@ "integrity": "sha1-QLcJU30k0dRXZ9takIaJ3+aaxE8=", "dev": true, "requires": { - "globule": "~0.1.0" + "globule": "0.1.0" } }, "generate-function": { @@ -2492,7 +2916,7 @@ "integrity": "sha1-nA4cQDCM6AT0eDYYuTf6iPmdUNA=", "dev": true, "requires": { - "is-property": "^1.0.0" + "is-property": "1.0.2" } }, "get-caller-file": { @@ -2525,7 +2949,7 @@ "integrity": "sha1-Xv+OPmhNVprkyysSgmBOi6YhSfo=", "dev": true, "requires": { - "assert-plus": "^1.0.0" + "assert-plus": "1.0.0" }, "dependencies": { "assert-plus": { @@ -2542,10 +2966,10 @@ "integrity": "sha1-xstz0yJsHv7wTePFbQEvAzd+4V8=", "dev": true, "requires": { - "inflight": "^1.0.4", - "inherits": "2", - "minimatch": "^2.0.1", - "once": "^1.3.0" + "inflight": "1.0.6", + "inherits": "2.0.3", + "minimatch": "2.0.10", + "once": "1.3.3" }, "dependencies": { "minimatch": { @@ -2554,7 +2978,7 @@ "integrity": "sha1-jQh8OcazjAAbl/ynzm0OHoCvusc=", "dev": true, "requires": { - "brace-expansion": "^1.0.0" + "brace-expansion": "1.1.11" } } } @@ -2565,8 +2989,8 @@ "integrity": "sha1-27Fk9iIbHAscz4Kuoyi0l98Oo8Q=", "dev": true, "requires": { - "glob-parent": "^2.0.0", - "is-glob": "^2.0.0" + "glob-parent": "2.0.0", + "is-glob": "2.0.1" } }, "glob-parent": { @@ -2575,7 +2999,7 @@ "integrity": "sha1-gTg9ctsFT8zPUzbaqQLxgvbtuyg=", "dev": true, "requires": { - "is-glob": "^2.0.0" + "is-glob": "2.0.1" } }, "glob-stream": { @@ -2584,12 +3008,12 @@ "integrity": "sha1-kXCl8St5Awb9/lmPMT+PeVT9FDs=", "dev": true, "requires": { - "glob": "^4.3.1", - "glob2base": "^0.0.12", - "minimatch": "^2.0.1", - "ordered-read-streams": "^0.1.0", - "through2": "^0.6.1", - "unique-stream": "^1.0.0" + "glob": "4.5.3", + "glob2base": "0.0.12", + "minimatch": "2.0.10", + "ordered-read-streams": "0.1.0", + "through2": "0.6.5", + "unique-stream": "1.0.0" }, "dependencies": { "isarray": { @@ -2604,7 +3028,7 @@ "integrity": "sha1-jQh8OcazjAAbl/ynzm0OHoCvusc=", "dev": true, "requires": { - "brace-expansion": "^1.0.0" + "brace-expansion": "1.1.11" } }, "readable-stream": { @@ -2613,10 +3037,10 @@ "integrity": "sha1-Elgg40vIQtLyqq+v5MKRbuMsFXw=", "dev": true, "requires": { - "core-util-is": "~1.0.0", - "inherits": "~2.0.1", + "core-util-is": "1.0.2", + "inherits": "2.0.3", "isarray": "0.0.1", - "string_decoder": "~0.10.x" + "string_decoder": "0.10.31" } }, "string_decoder": { @@ -2631,8 +3055,8 @@ "integrity": "sha1-QaucZ7KdVyCQcUEOHXp6lozTrUg=", "dev": true, "requires": { - "readable-stream": ">=1.0.33-1 <1.1.0-0", - "xtend": ">=4.0.0 <4.1.0-0" + "readable-stream": "1.0.34", + "xtend": "4.0.1" } } } @@ -2643,7 +3067,7 @@ "integrity": "sha1-uVtKjfdLOcgymLDAXJeLTZo7cQs=", "dev": true, "requires": { - "gaze": "^0.5.1" + "gaze": "0.5.2" } }, "glob2base": { @@ -2652,7 +3076,7 @@ "integrity": "sha1-nUGbPijxLoOjYhZKJ3BVkiycDVY=", "dev": true, "requires": { - "find-index": "^0.1.1" + "find-index": "0.1.1" } }, "global-modules": { @@ -2661,9 +3085,9 @@ "integrity": "sha512-sKzpEkf11GpOFuw0Zzjzmt4B4UZwjOcG757PPvrfhxcLFbq0wpsgpOqxpxtxFiCG4DtG93M6XRVbF2oGdev7bg==", "dev": true, "requires": { - "global-prefix": "^1.0.1", - "is-windows": "^1.0.1", - "resolve-dir": "^1.0.0" + "global-prefix": "1.0.2", + "is-windows": "1.0.2", + "resolve-dir": "1.0.1" } }, "global-prefix": { @@ -2672,11 +3096,11 @@ "integrity": "sha1-2/dDxsFJklk8ZVVoy2btMsASLr4=", "dev": true, "requires": { - "expand-tilde": "^2.0.2", - "homedir-polyfill": "^1.0.1", - "ini": "^1.3.4", - "is-windows": "^1.0.1", - "which": "^1.2.14" + "expand-tilde": "2.0.2", + "homedir-polyfill": "1.0.1", + "ini": "1.3.5", + "is-windows": "1.0.2", + "which": "1.3.1" } }, "globule": { @@ -2685,9 +3109,9 @@ "integrity": "sha1-2cjt3h2nnRJaFRt5UzuXhnY0auU=", "dev": true, "requires": { - "glob": "~3.1.21", - "lodash": "~1.0.1", - "minimatch": "~0.2.11" + "glob": "3.1.21", + "lodash": "1.0.2", + "minimatch": "0.2.14" }, "dependencies": { "glob": { @@ -2696,9 +3120,9 @@ "integrity": "sha1-0p4KBV3qUTj00H7UDomC6DwgZs0=", "dev": true, "requires": { - "graceful-fs": "~1.2.0", - "inherits": "1", - "minimatch": "~0.2.11" + "graceful-fs": "1.2.3", + "inherits": "1.0.2", + "minimatch": "0.2.14" } }, "graceful-fs": { @@ -2725,8 +3149,8 @@ "integrity": "sha1-x054BXT2PG+aCQ6Q775u9TpqdWo=", "dev": true, "requires": { - "lru-cache": "2", - "sigmund": "~1.0.0" + "lru-cache": "2.7.3", + "sigmund": "1.0.1" } } } @@ -2737,7 +3161,7 @@ "integrity": "sha512-ynYqXLoluBKf9XGR1gA59yEJisIL7YHEH4xr3ZziHB5/yl4qWfaK8Js9jGe6gBGCSCKVqiyO30WnRZADvemUNw==", "dev": true, "requires": { - "sparkles": "^1.0.0" + "sparkles": "1.0.1" } }, "graceful-fs": { @@ -2758,19 +3182,19 @@ "integrity": "sha1-VxzkWSjdQK9lFPxAEYZgFsE4RbQ=", "dev": true, "requires": { - "archy": "^1.0.0", - "chalk": "^1.0.0", - "deprecated": "^0.0.1", - "gulp-util": "^3.0.0", - "interpret": "^1.0.0", - "liftoff": "^2.1.0", - "minimist": "^1.1.0", - "orchestrator": "^0.3.0", - "pretty-hrtime": "^1.0.0", - "semver": "^4.1.0", - "tildify": "^1.0.0", - "v8flags": "^2.0.2", - "vinyl-fs": "^0.3.0" + "archy": "1.0.0", + "chalk": "1.1.3", + "deprecated": "0.0.1", + "gulp-util": "3.0.8", + "interpret": "1.1.0", + "liftoff": "2.5.0", + "minimist": "1.2.0", + "orchestrator": "0.3.8", + "pretty-hrtime": "1.0.3", + "semver": "4.3.6", + "tildify": "1.2.0", + "v8flags": "2.1.1", + "vinyl-fs": "0.3.14" }, "dependencies": { "semver": { @@ -2787,12 +3211,12 @@ "integrity": "sha1-gjfCeKaXdScKHK/n1vEBz81YVUQ=", "dev": true, "requires": { - "autoprefixer": "^8.0.0", - "fancy-log": "^1.3.2", - "plugin-error": "^1.0.1", - "postcss": "^6.0.1", - "through2": "^2.0.0", - "vinyl-sourcemaps-apply": "^0.2.0" + "autoprefixer": "8.6.4", + "fancy-log": "1.3.2", + "plugin-error": "1.0.1", + "postcss": "6.0.23", + "through2": "2.0.3", + "vinyl-sourcemaps-apply": "0.2.1" } }, "gulp-concat": { @@ -2801,9 +3225,9 @@ "integrity": "sha1-Yz0WyV2IUEYorQJmVmPO5aR5M1M=", "dev": true, "requires": { - "concat-with-sourcemaps": "^1.0.0", - "through2": "^2.0.0", - "vinyl": "^2.0.0" + "concat-with-sourcemaps": "1.1.0", + "through2": "2.0.3", + "vinyl": "2.2.0" }, "dependencies": { "clone": { @@ -2830,12 +3254,12 @@ "integrity": "sha512-MBH+yP0kC/GQ5GwBqrTPTzEfiiLjta7hTtvQtbxBgTeSXsmKQRQecjibMbxIXzVT3Y9KJK+drOz1/k+vsu8Nkg==", "dev": true, "requires": { - "clone": "^2.1.1", - "clone-buffer": "^1.0.0", - "clone-stats": "^1.0.0", - "cloneable-readable": "^1.0.0", - "remove-trailing-separator": "^1.0.1", - "replace-ext": "^1.0.0" + "clone": "2.1.1", + "clone-buffer": "1.0.0", + "clone-stats": "1.0.0", + "cloneable-readable": "1.1.2", + "remove-trailing-separator": "1.1.0", + "replace-ext": "1.0.0" } } } @@ -2846,12 +3270,12 @@ "integrity": "sha1-yPBjO05ulQ/5PEdbPI07hL4Dt9w=", "dev": true, "requires": { - "concat-with-sourcemaps": "^1.0.4", - "gulp-if": "^2.0.0", - "gulp-util": "^3.0.6", - "lodash.assign": "^3.2.0", - "stream-combiner2": "^1.1.1", - "through2": "^2.0.0" + "concat-with-sourcemaps": "1.1.0", + "gulp-if": "2.0.2", + "gulp-util": "3.0.8", + "lodash.assign": "3.2.0", + "stream-combiner2": "1.1.1", + "through2": "2.0.3" } }, "gulp-crass": { @@ -2860,10 +3284,23 @@ "integrity": "sha1-RtD38aTamVwiG2ftxJNw95i/eNs=", "dev": true, "requires": { - "crass": "*", - "csswring": "^6.0.1", - "gulp-util": "^3.0.4", - "through2": "^2.0.3" + "crass": "0.12.3", + "csswring": "6.0.3", + "gulp-util": "3.0.8", + "through2": "2.0.3" + } + }, + "gulp-cssnano": { + "version": "2.1.3", + "resolved": "https://registry.npmjs.org/gulp-cssnano/-/gulp-cssnano-2.1.3.tgz", + "integrity": "sha512-r8qdX5pTXsBb/IRm9loE8Ijz8UiPW/URMC/bKJe4FPNHRaz4aEx8Bev03L0FYHd/7BSGu/ebmfumAkpGuTdenA==", + "dev": true, + "requires": { + "buffer-from": "1.1.2", + "cssnano": "3.10.0", + "object-assign": "4.1.1", + "plugin-error": "1.0.1", + "vinyl-sourcemaps-apply": "0.2.1" } }, "gulp-if": { @@ -2872,9 +3309,9 @@ "integrity": "sha1-pJe351cwBQQcqivIt92jyARE1ik=", "dev": true, "requires": { - "gulp-match": "^1.0.3", - "ternary-stream": "^2.0.1", - "through2": "^2.0.1" + "gulp-match": "1.0.3", + "ternary-stream": "2.0.1", + "through2": "2.0.3" } }, "gulp-insert": { @@ -2883,7 +3320,7 @@ "integrity": "sha1-MjE/E+SiPPWsylzl8MCAkjx3hgI=", "dev": true, "requires": { - "readable-stream": "^1.0.26-4", + "readable-stream": "1.1.14", "streamqueue": "0.0.6" }, "dependencies": { @@ -2899,10 +3336,10 @@ "integrity": "sha1-fPTFTvZI44EwhMY23SB54WbAgdk=", "dev": true, "requires": { - "core-util-is": "~1.0.0", - "inherits": "~2.0.1", + "core-util-is": "1.0.2", + "inherits": "2.0.3", "isarray": "0.0.1", - "string_decoder": "~0.10.x" + "string_decoder": "0.10.31" } }, "string_decoder": { @@ -2919,7 +3356,7 @@ "integrity": "sha1-kcfA1/Kb7NZgbVfYCn+Hdqh6uo4=", "dev": true, "requires": { - "minimatch": "^3.0.3" + "minimatch": "3.0.4" } }, "gulp-plumber": { @@ -2928,10 +3365,10 @@ "integrity": "sha512-L/LJftsbKoHbVj6dN5pvMsyJn9jYI0wT0nMg3G6VZhDac4NesezecYTi8/48rHi+yEic3sUpw6jlSc7qNWh32A==", "dev": true, "requires": { - "chalk": "^1.1.3", - "fancy-log": "^1.3.2", - "plugin-error": "^0.1.2", - "through2": "^2.0.3" + "chalk": "1.1.3", + "fancy-log": "1.3.2", + "plugin-error": "0.1.2", + "through2": "2.0.3" }, "dependencies": { "arr-diff": { @@ -2940,8 +3377,8 @@ "integrity": "sha1-aHwydYFjWI/vfeezb6vklesaOZo=", "dev": true, "requires": { - "arr-flatten": "^1.0.1", - "array-slice": "^0.2.3" + "arr-flatten": "1.1.0", + "array-slice": "0.2.3" } }, "arr-union": { @@ -2962,7 +3399,7 @@ "integrity": "sha1-Gda/lN/AnXa6cR85uHLSH/TdkHE=", "dev": true, "requires": { - "kind-of": "^1.1.0" + "kind-of": "1.1.0" } }, "kind-of": { @@ -2977,11 +3414,11 @@ "integrity": "sha1-O5uzM1zPAPQl4HQ34ZJ2ln2kes4=", "dev": true, "requires": { - "ansi-cyan": "^0.1.1", - "ansi-red": "^0.1.1", - "arr-diff": "^1.0.1", - "arr-union": "^2.0.1", - "extend-shallow": "^1.1.2" + "ansi-cyan": "0.1.1", + "ansi-red": "0.1.1", + "arr-diff": "1.1.0", + "arr-union": "2.1.0", + "extend-shallow": "1.1.4" } } } @@ -2998,14 +3435,14 @@ "integrity": "sha512-OMQEgWNggpog8Tc5v1MuI6eo+5iiPkVeLL76iBhDoEEScLUPfZlpvzmgTnLkpcqdrNodZxpz5qcv6mS2rulk3g==", "dev": true, "requires": { - "chalk": "^2.3.0", - "lodash.clonedeep": "^4.3.2", - "node-sass": "^4.8.3", - "plugin-error": "^1.0.1", - "replace-ext": "^1.0.0", - "strip-ansi": "^4.0.0", - "through2": "^2.0.0", - "vinyl-sourcemaps-apply": "^0.2.0" + "chalk": "2.4.1", + "lodash.clonedeep": "4.5.0", + "node-sass": "4.9.0", + "plugin-error": "1.0.1", + "replace-ext": "1.0.0", + "strip-ansi": "4.0.0", + "through2": "2.0.3", + "vinyl-sourcemaps-apply": "0.2.1" }, "dependencies": { "ansi-regex": { @@ -3020,7 +3457,7 @@ "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", "dev": true, "requires": { - "color-convert": "^1.9.0" + "color-convert": "1.9.2" } }, "chalk": { @@ -3029,9 +3466,9 @@ "integrity": "sha512-ObN6h1v2fTJSmUXoS3nMQ92LbDK9be4TV+6G+omQlGJFdcUX5heKi1LZ1YnRMIgwTLEj3E24bT6tYni50rlCfQ==", "dev": true, "requires": { - "ansi-styles": "^3.2.1", - "escape-string-regexp": "^1.0.5", - "supports-color": "^5.3.0" + "ansi-styles": "3.2.1", + "escape-string-regexp": "1.0.5", + "supports-color": "5.4.0" } }, "replace-ext": { @@ -3046,7 +3483,7 @@ "integrity": "sha1-qEeQIusaw2iocTibY1JixQXuNo8=", "dev": true, "requires": { - "ansi-regex": "^3.0.0" + "ansi-regex": "3.0.0" } }, "supports-color": { @@ -3055,24 +3492,51 @@ "integrity": "sha512-zjaXglF5nnWpsq470jSv6P9DwPvgLkuapYmfDm3JWOm0vkNTVF2tI4UrN2r6jH1qM/uc/WtxYY1hYoA2dOKj5w==", "dev": true, "requires": { - "has-flag": "^3.0.0" + "has-flag": "3.0.0" } } } }, + "gulp-sourcemaps": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/gulp-sourcemaps/-/gulp-sourcemaps-3.0.0.tgz", + "integrity": "sha512-RqvUckJkuYqy4VaIH60RMal4ZtG0IbQ6PXMNkNsshEGJ9cldUPRb/YCgboYae+CLAs1HQNb4ADTKCx65HInquQ==", + "dev": true, + "requires": { + "@gulp-sourcemaps/identity-map": "2.0.1", + "@gulp-sourcemaps/map-sources": "1.0.0", + "acorn": "6.4.2", + "convert-source-map": "1.8.0", + "css": "3.0.0", + "debug-fabulous": "1.1.0", + "detect-newline": "2.1.0", + "graceful-fs": "4.1.11", + "source-map": "0.6.1", + "strip-bom-string": "1.0.0", + "through2": "2.0.3" + }, + "dependencies": { + "source-map": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", + "dev": true + } + } + }, "gulp-uglify": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/gulp-uglify/-/gulp-uglify-3.0.0.tgz", "integrity": "sha1-DfAzHXKg0wLj434QlIXd3zPG0co=", "dev": true, "requires": { - "gulplog": "^1.0.0", - "has-gulplog": "^0.1.0", - "lodash": "^4.13.1", - "make-error-cause": "^1.1.1", - "through2": "^2.0.0", - "uglify-js": "^3.0.5", - "vinyl-sourcemaps-apply": "^0.2.0" + "gulplog": "1.0.0", + "has-gulplog": "0.1.0", + "lodash": "4.17.10", + "make-error-cause": "1.2.2", + "through2": "2.0.3", + "uglify-js": "3.4.2", + "vinyl-sourcemaps-apply": "0.2.1" }, "dependencies": { "lodash": { @@ -3089,24 +3553,24 @@ "integrity": "sha1-AFTh50RQLifATBh8PsxQXdVLu08=", "dev": true, "requires": { - "array-differ": "^1.0.0", - "array-uniq": "^1.0.2", - "beeper": "^1.0.0", - "chalk": "^1.0.0", - "dateformat": "^2.0.0", - "fancy-log": "^1.1.0", - "gulplog": "^1.0.0", - "has-gulplog": "^0.1.0", - "lodash._reescape": "^3.0.0", - "lodash._reevaluate": "^3.0.0", - "lodash._reinterpolate": "^3.0.0", - "lodash.template": "^3.0.0", - "minimist": "^1.1.0", - "multipipe": "^0.1.2", - "object-assign": "^3.0.0", + "array-differ": "1.0.0", + "array-uniq": "1.0.3", + "beeper": "1.1.1", + "chalk": "1.1.3", + "dateformat": "2.2.0", + "fancy-log": "1.3.2", + "gulplog": "1.0.0", + "has-gulplog": "0.1.0", + "lodash._reescape": "3.0.0", + "lodash._reevaluate": "3.0.0", + "lodash._reinterpolate": "3.0.0", + "lodash.template": "3.6.2", + "minimist": "1.2.0", + "multipipe": "0.1.2", + "object-assign": "3.0.0", "replace-ext": "0.0.1", - "through2": "^2.0.0", - "vinyl": "^0.5.0" + "through2": "2.0.3", + "vinyl": "0.5.3" }, "dependencies": { "object-assign": { @@ -3123,7 +3587,7 @@ "integrity": "sha1-4oxNRdBey77YGDY86PnFkmIp/+U=", "dev": true, "requires": { - "glogg": "^1.0.0" + "glogg": "1.0.1" } }, "har-validator": { @@ -3132,10 +3596,19 @@ "integrity": "sha1-zcvAgYgmWtEZtqWnyKtw7s+10n0=", "dev": true, "requires": { - "chalk": "^1.1.1", - "commander": "^2.9.0", - "is-my-json-valid": "^2.12.4", - "pinkie-promise": "^2.0.0" + "chalk": "1.1.3", + "commander": "2.15.1", + "is-my-json-valid": "2.17.2", + "pinkie-promise": "2.0.1" + } + }, + "has": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/has/-/has-1.0.3.tgz", + "integrity": "sha512-f2dvO0VU6Oej7RkWJGrehjbzMAjFp5/VKPp5tTpWIV4JHHZK1/BxbFRtf/siA2SWTe09caDmVtYYzWEIbBS4zw==", + "dev": true, + "requires": { + "function-bind": "1.1.1" } }, "has-ansi": { @@ -3144,7 +3617,7 @@ "integrity": "sha1-NPUEnOHs3ysGSa8+8k5F7TVBbZE=", "dev": true, "requires": { - "ansi-regex": "^2.0.0" + "ansi-regex": "2.1.1" } }, "has-binary2": { @@ -3174,7 +3647,7 @@ "integrity": "sha1-ZBTIKRNpfaUVkDl9r7EvIpZ4Ec4=", "dev": true, "requires": { - "sparkles": "^1.0.0" + "sparkles": "1.0.1" } }, "has-unicode": { @@ -3189,9 +3662,9 @@ "integrity": "sha1-GLKB2lhbHFxR3vJMkw7SmgvmsXc=", "dev": true, "requires": { - "get-value": "^2.0.6", - "has-values": "^1.0.0", - "isobject": "^3.0.0" + "get-value": "2.0.6", + "has-values": "1.0.0", + "isobject": "3.0.1" }, "dependencies": { "isobject": { @@ -3208,8 +3681,8 @@ "integrity": "sha1-lbC2P+whRmGab+V/51Yo1aOe/k8=", "dev": true, "requires": { - "is-number": "^3.0.0", - "kind-of": "^4.0.0" + "is-number": "3.0.0", + "kind-of": "4.0.0" }, "dependencies": { "is-number": { @@ -3218,7 +3691,7 @@ "integrity": "sha1-JP1iAaR4LPUFYcgQJ2r8fRLXEZU=", "dev": true, "requires": { - "kind-of": "^3.0.2" + "kind-of": "3.2.2" }, "dependencies": { "kind-of": { @@ -3227,7 +3700,7 @@ "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", "dev": true, "requires": { - "is-buffer": "^1.1.5" + "is-buffer": "1.1.6" } } } @@ -3238,7 +3711,7 @@ "integrity": "sha1-IIE989cSkosgc3hpGkUGb65y3Vc=", "dev": true, "requires": { - "is-buffer": "^1.1.5" + "is-buffer": "1.1.6" } } } @@ -3249,10 +3722,10 @@ "integrity": "sha1-B4REvXwWQLD+VA0sm3PVlnjo4cQ=", "dev": true, "requires": { - "boom": "2.x.x", - "cryptiles": "2.x.x", - "hoek": "2.x.x", - "sntp": "1.x.x" + "boom": "2.10.1", + "cryptiles": "2.0.5", + "hoek": "2.16.3", + "sntp": "1.0.9" } }, "he": { @@ -3273,7 +3746,7 @@ "integrity": "sha1-TCu8inWJmP7r9e1oWA921GdotLw=", "dev": true, "requires": { - "parse-passwd": "^1.0.0" + "parse-passwd": "1.0.0" } }, "hosted-git-info": { @@ -3282,16 +3755,22 @@ "integrity": "sha512-Ba4+0M4YvIDUUsprMjhVTU1yN9F2/LJSAl69ZpzaLT4l4j5mwTS6jqqW9Ojvj6lKz/veqPzpJBqGbXspOb533A==", "dev": true }, + "html-comment-regex": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/html-comment-regex/-/html-comment-regex-1.1.2.tgz", + "integrity": "sha512-P+M65QY2JQ5Y0G9KKdlDpo0zK+/OHptU5AaBwUfAIDJZk1MYf32Frm84EcOytfJE0t5JvkAnKlmjsXDnWzCJmQ==", + "dev": true + }, "http-errors": { "version": "1.6.3", "resolved": "https://registry.npmjs.org/http-errors/-/http-errors-1.6.3.tgz", "integrity": "sha1-i1VoC7S+KDoLW/TqLjhYC+HZMg0=", "dev": true, "requires": { - "depd": "~1.1.2", + "depd": "1.1.2", "inherits": "2.0.3", "setprototypeof": "1.1.0", - "statuses": ">= 1.4.0 < 2" + "statuses": "1.5.0" }, "dependencies": { "statuses": { @@ -3308,8 +3787,8 @@ "integrity": "sha1-ZC/cr/5S00SNK9o7AHnpQJBk2jE=", "dev": true, "requires": { - "eventemitter3": "1.x.x", - "requires-port": "1.x.x" + "eventemitter3": "1.2.0", + "requires-port": "1.0.0" } }, "http-signature": { @@ -3318,9 +3797,9 @@ "integrity": "sha1-33LiZwZs0Kxn+3at+OE0qPvPkb8=", "dev": true, "requires": { - "assert-plus": "^0.2.0", - "jsprim": "^1.2.2", - "sshpk": "^1.7.0" + "assert-plus": "0.2.0", + "jsprim": "1.4.1", + "sshpk": "1.14.2" } }, "iconv-lite": { @@ -3329,7 +3808,7 @@ "integrity": "sha512-neyTUVFtahjf0mB3dZT77u+8O0QB89jFdnBkd5P1JgYPbPaia3gXXOVL2fq8VyU2gMMD7SaN7QukTB/pmXYvDA==", "dev": true, "requires": { - "safer-buffer": ">= 2.1.2 < 3" + "safer-buffer": "2.1.2" } }, "immutable": { @@ -3350,9 +3829,15 @@ "integrity": "sha1-ji1INIdCEhtKghi3oTfppSBJ3IA=", "dev": true, "requires": { - "repeating": "^2.0.0" + "repeating": "2.0.1" } }, + "indexes-of": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/indexes-of/-/indexes-of-1.0.1.tgz", + "integrity": "sha1-8w9xbI4r00bHtn0985FVZqfAVgc=", + "dev": true + }, "indexof": { "version": "0.0.1", "resolved": "https://registry.npmjs.org/indexof/-/indexof-0.0.1.tgz", @@ -3365,8 +3850,8 @@ "integrity": "sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk=", "dev": true, "requires": { - "once": "^1.3.0", - "wrappy": "1" + "once": "1.3.3", + "wrappy": "1.0.2" } }, "inherits": { @@ -3399,17 +3884,23 @@ "integrity": "sha512-dOWoqflvcydARa360Gvv18DZ/gRuHKi2NU/wU5X1ZFzdYfH29nkiNZsF3mp4OJ3H4yo9Mx8A/uAGNzpzPN3yBA==", "dev": true, "requires": { - "is-relative": "^1.0.0", - "is-windows": "^1.0.1" + "is-relative": "1.0.0", + "is-windows": "1.0.2" } }, + "is-absolute-url": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/is-absolute-url/-/is-absolute-url-2.1.0.tgz", + "integrity": "sha1-UFMN+4T8yap9vnhS6Do3uTufKqY=", + "dev": true + }, "is-accessor-descriptor": { "version": "0.1.6", "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-0.1.6.tgz", "integrity": "sha1-qeEss66Nh2cn7u84Q/igiXtcmNY=", "dev": true, "requires": { - "kind-of": "^3.0.2" + "kind-of": "3.2.2" } }, "is-arrayish": { @@ -3424,7 +3915,7 @@ "integrity": "sha1-dfFmQrSA8YenEcgUFh/TpKdlWJg=", "dev": true, "requires": { - "binary-extensions": "^1.0.0" + "binary-extensions": "1.11.0" } }, "is-buffer": { @@ -3439,7 +3930,7 @@ "integrity": "sha1-VAVy0096wxGfj3bDDLwbHgN6/74=", "dev": true, "requires": { - "builtin-modules": "^1.0.0" + "builtin-modules": "1.1.1" } }, "is-data-descriptor": { @@ -3448,7 +3939,7 @@ "integrity": "sha1-C17mSDiOLIYCgueT8YVv7D8wG1Y=", "dev": true, "requires": { - "kind-of": "^3.0.2" + "kind-of": "3.2.2" } }, "is-descriptor": { @@ -3457,9 +3948,9 @@ "integrity": "sha512-avDYr0SB3DwO9zsMov0gKCESFYqCnE4hq/4z3TdUlukEy5t9C0YRq7HLrsN52NAcqXKaepeCD0n+B0arnVG3Hg==", "dev": true, "requires": { - "is-accessor-descriptor": "^0.1.6", - "is-data-descriptor": "^0.1.4", - "kind-of": "^5.0.0" + "is-accessor-descriptor": "0.1.6", + "is-data-descriptor": "0.1.4", + "kind-of": "5.1.0" }, "dependencies": { "kind-of": { @@ -3482,7 +3973,7 @@ "integrity": "sha1-IjgJj8Ih3gvPpdnqxMRdY4qhxTQ=", "dev": true, "requires": { - "is-primitive": "^2.0.0" + "is-primitive": "2.0.0" } }, "is-extendable": { @@ -3503,7 +3994,7 @@ "integrity": "sha1-zGZ3aVYCvlUO8R6LSqYwU0K20Ko=", "dev": true, "requires": { - "number-is-nan": "^1.0.0" + "number-is-nan": "1.0.1" } }, "is-fullwidth-code-point": { @@ -3512,7 +4003,7 @@ "integrity": "sha1-754xOG8DGn8NZDr4L95QxFfvAMs=", "dev": true, "requires": { - "number-is-nan": "^1.0.0" + "number-is-nan": "1.0.1" } }, "is-glob": { @@ -3521,7 +4012,7 @@ "integrity": "sha1-0Jb5JqPe1WAPP9/ZEZjLCIjC2GM=", "dev": true, "requires": { - "is-extglob": "^1.0.0" + "is-extglob": "1.0.0" } }, "is-my-ip-valid": { @@ -3536,11 +4027,11 @@ "integrity": "sha512-IBhBslgngMQN8DDSppmgDv7RNrlFotuuDsKcrCP3+HbFaVivIBU7u9oiiErw8sH4ynx3+gOGQ3q2otkgiSi6kg==", "dev": true, "requires": { - "generate-function": "^2.0.0", - "generate-object-property": "^1.1.0", - "is-my-ip-valid": "^1.0.0", - "jsonpointer": "^4.0.0", - "xtend": "^4.0.0" + "generate-function": "2.0.0", + "generate-object-property": "1.2.0", + "is-my-ip-valid": "1.0.0", + "jsonpointer": "4.0.1", + "xtend": "4.0.1" } }, "is-number": { @@ -3549,7 +4040,7 @@ "integrity": "sha1-Afy7s5NGOlSPL0ZszhbezknbkI8=", "dev": true, "requires": { - "kind-of": "^3.0.2" + "kind-of": "3.2.2" } }, "is-number-like": { @@ -3558,7 +4049,7 @@ "integrity": "sha512-6rZi3ezCyFcn5L71ywzz2bS5b2Igl1En3eTlZlvKjpz1n3IZLAYMbKYAIQgFmEu0GENg92ziU/faEOA/aixjbA==", "dev": true, "requires": { - "lodash.isfinite": "^3.3.2" + "lodash.isfinite": "3.3.2" } }, "is-odd": { @@ -3567,7 +4058,7 @@ "integrity": "sha512-OTiixgpZAT1M4NHgS5IguFp/Vz2VI3U7Goh4/HA1adtwyLtSBrxYlcSYkhpAE07s4fKEcjrFxyvtQBND4vFQyQ==", "dev": true, "requires": { - "is-number": "^4.0.0" + "is-number": "4.0.0" }, "dependencies": { "is-number": { @@ -3578,13 +4069,19 @@ } } }, + "is-plain-obj": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/is-plain-obj/-/is-plain-obj-1.1.0.tgz", + "integrity": "sha1-caUMhCnfync8kqOQpKA7OfzVHT4=", + "dev": true + }, "is-plain-object": { "version": "2.0.4", "resolved": "https://registry.npmjs.org/is-plain-object/-/is-plain-object-2.0.4.tgz", "integrity": "sha512-h5PpgXkWitc38BBMYawTYMWJHFZJVnBquFE57xFpjB8pJFiF6gZ+bU+WyI/yqXiFR5mdLsgYNaPe8uao6Uv9Og==", "dev": true, "requires": { - "isobject": "^3.0.1" + "isobject": "3.0.1" }, "dependencies": { "isobject": { @@ -3607,6 +4104,12 @@ "integrity": "sha1-IHurkWOEmcB7Kt8kCkGochADRXU=", "dev": true }, + "is-promise": { + "version": "2.2.2", + "resolved": "https://registry.npmjs.org/is-promise/-/is-promise-2.2.2.tgz", + "integrity": "sha512-+lP4/6lKUBfQjZ2pdxThZvLUAafmZb8OAxFb8XXtiQmS35INgr85hdOGoEs124ez1FCnZJt6jau/T+alh58QFQ==", + "dev": true + }, "is-property": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/is-property/-/is-property-1.0.2.tgz", @@ -3619,7 +4122,16 @@ "integrity": "sha512-Kw/ReK0iqwKeu0MITLFuj0jbPAmEiOsIwyIXvvbfa6QfmN9pkD1M+8pdk7Rl/dTKbH34/XBFMbgD4iMJhLQbGA==", "dev": true, "requires": { - "is-unc-path": "^1.0.0" + "is-unc-path": "1.0.0" + } + }, + "is-svg": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/is-svg/-/is-svg-2.1.0.tgz", + "integrity": "sha1-z2EJDaDZ77yrhyLeum8DIgjbsOk=", + "dev": true, + "requires": { + "html-comment-regex": "1.1.2" } }, "is-typedarray": { @@ -3634,7 +4146,7 @@ "integrity": "sha512-mrGpVd0fs7WWLfVsStvgF6iEJnbjDFZh9/emhRDcGWTduTfNHd9CHeUwH3gYIjdbwo4On6hunkztwOaAw0yllQ==", "dev": true, "requires": { - "unc-path-regex": "^0.1.2" + "unc-path-regex": "0.1.2" } }, "is-utf8": { @@ -3696,8 +4208,8 @@ "integrity": "sha1-XJZ93YN6m/3KXy3oQlOr6KHAO4A=", "dev": true, "requires": { - "argparse": "^1.0.7", - "esprima": "^2.6.0" + "argparse": "1.0.10", + "esprima": "2.7.3" } }, "jsbn": { @@ -3725,7 +4237,7 @@ "integrity": "sha1-pezG9l9T9mLEQVx2daAzHQmS7GY=", "dev": true, "requires": { - "graceful-fs": "^4.1.6" + "graceful-fs": "4.1.11" } }, "jsonpointer": { @@ -3766,7 +4278,7 @@ "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", "dev": true, "requires": { - "is-buffer": "^1.1.5" + "is-buffer": "1.1.6" } }, "lcid": { @@ -3775,7 +4287,7 @@ "integrity": "sha1-MIrMr6C8SDo4Z7S28rlQYlHRuDU=", "dev": true, "requires": { - "invert-kv": "^1.0.0" + "invert-kv": "1.0.0" } }, "liftoff": { @@ -3784,14 +4296,14 @@ "integrity": "sha1-IAkpG7Mc6oYbvxCnwVooyvdcMew=", "dev": true, "requires": { - "extend": "^3.0.0", - "findup-sync": "^2.0.0", - "fined": "^1.0.1", - "flagged-respawn": "^1.0.0", - "is-plain-object": "^2.0.4", - "object.map": "^1.0.0", - "rechoir": "^0.6.2", - "resolve": "^1.1.7" + "extend": "3.0.1", + "findup-sync": "2.0.0", + "fined": "1.1.0", + "flagged-respawn": "1.0.0", + "is-plain-object": "2.0.4", + "object.map": "1.0.1", + "rechoir": "0.6.2", + "resolve": "1.8.1" } }, "limiter": { @@ -3806,11 +4318,11 @@ "integrity": "sha1-lWkFcI1YtLq0wiYbBPWfMcmTdMA=", "dev": true, "requires": { - "graceful-fs": "^4.1.2", - "parse-json": "^2.2.0", - "pify": "^2.0.0", - "pinkie-promise": "^2.0.0", - "strip-bom": "^2.0.0" + "graceful-fs": "4.1.11", + "parse-json": "2.2.0", + "pify": "2.3.0", + "pinkie-promise": "2.0.1", + "strip-bom": "2.0.0" } }, "localtunnel": { @@ -3840,19 +4352,19 @@ "integrity": "sha1-eC7CHvQDNF+DCoCMo9UTr1YGUgg=", "dev": true, "requires": { - "camelcase": "^3.0.0", - "cliui": "^3.2.0", - "decamelize": "^1.1.1", - "get-caller-file": "^1.0.1", - "os-locale": "^1.4.0", - "read-pkg-up": "^1.0.1", - "require-directory": "^2.1.1", - "require-main-filename": "^1.0.1", - "set-blocking": "^2.0.0", - "string-width": "^1.0.2", - "which-module": "^1.0.0", - "y18n": "^3.2.1", - "yargs-parser": "^4.2.0" + "camelcase": "3.0.0", + "cliui": "3.2.0", + "decamelize": "1.2.0", + "get-caller-file": "1.0.2", + "os-locale": "1.4.0", + "read-pkg-up": "1.0.1", + "require-directory": "2.1.1", + "require-main-filename": "1.0.1", + "set-blocking": "2.0.0", + "string-width": "1.0.2", + "which-module": "1.0.0", + "y18n": "3.2.1", + "yargs-parser": "4.2.1" } } } @@ -3869,8 +4381,8 @@ "integrity": "sha1-jDigmVAPIVrQnlnxci/QxSv+Ck4=", "dev": true, "requires": { - "lodash._basecopy": "^3.0.0", - "lodash.keys": "^3.0.0" + "lodash._basecopy": "3.0.1", + "lodash.keys": "3.1.2" } }, "lodash._basecopy": { @@ -3903,9 +4415,9 @@ "integrity": "sha1-g4pbri/aymOsIt7o4Z+k5taXCxE=", "dev": true, "requires": { - "lodash._bindcallback": "^3.0.0", - "lodash._isiterateecall": "^3.0.0", - "lodash.restparam": "^3.0.0" + "lodash._bindcallback": "3.0.1", + "lodash._isiterateecall": "3.0.9", + "lodash.restparam": "3.6.1" } }, "lodash._getnative": { @@ -3950,9 +4462,9 @@ "integrity": "sha1-POnwI0tLIiPilrj6CsH+6OvKZPo=", "dev": true, "requires": { - "lodash._baseassign": "^3.0.0", - "lodash._createassigner": "^3.0.0", - "lodash.keys": "^3.0.0" + "lodash._baseassign": "3.2.0", + "lodash._createassigner": "3.1.1", + "lodash.keys": "3.1.2" } }, "lodash.clonedeep": { @@ -3967,7 +4479,7 @@ "integrity": "sha1-mV7g3BjBtIzJLv+ucaEKq1tIdpg=", "dev": true, "requires": { - "lodash._root": "^3.0.0" + "lodash._root": "3.0.1" } }, "lodash.get": { @@ -4000,11 +4512,17 @@ "integrity": "sha1-TbwEcrFWvlCgsoaFXRvQsMZWCYo=", "dev": true, "requires": { - "lodash._getnative": "^3.0.0", - "lodash.isarguments": "^3.0.0", - "lodash.isarray": "^3.0.0" + "lodash._getnative": "3.9.1", + "lodash.isarguments": "3.1.0", + "lodash.isarray": "3.0.4" } }, + "lodash.memoize": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/lodash.memoize/-/lodash.memoize-4.1.2.tgz", + "integrity": "sha1-vMbEmkKihA7Zl/Mj6tpezRguC/4=", + "dev": true + }, "lodash.mergewith": { "version": "4.6.1", "resolved": "https://registry.npmjs.org/lodash.mergewith/-/lodash.mergewith-4.6.1.tgz", @@ -4023,15 +4541,15 @@ "integrity": "sha1-+M3sxhaaJVvpCYrosMU9N4kx0U8=", "dev": true, "requires": { - "lodash._basecopy": "^3.0.0", - "lodash._basetostring": "^3.0.0", - "lodash._basevalues": "^3.0.0", - "lodash._isiterateecall": "^3.0.0", - "lodash._reinterpolate": "^3.0.0", - "lodash.escape": "^3.0.0", - "lodash.keys": "^3.0.0", - "lodash.restparam": "^3.0.0", - "lodash.templatesettings": "^3.0.0" + "lodash._basecopy": "3.0.1", + "lodash._basetostring": "3.0.1", + "lodash._basevalues": "3.0.0", + "lodash._isiterateecall": "3.0.9", + "lodash._reinterpolate": "3.0.0", + "lodash.escape": "3.2.0", + "lodash.keys": "3.1.2", + "lodash.restparam": "3.6.1", + "lodash.templatesettings": "3.1.1" } }, "lodash.templatesettings": { @@ -4040,10 +4558,16 @@ "integrity": "sha1-+zB4RHU7Zrnxr6VOJix0UwfbqOU=", "dev": true, "requires": { - "lodash._reinterpolate": "^3.0.0", - "lodash.escape": "^3.0.0" + "lodash._reinterpolate": "3.0.0", + "lodash.escape": "3.2.0" } }, + "lodash.uniq": { + "version": "4.5.0", + "resolved": "https://registry.npmjs.org/lodash.uniq/-/lodash.uniq-4.5.0.tgz", + "integrity": "sha1-0CJTc662Uq3BvILklFM5qEJ1R3M=", + "dev": true + }, "lolex": { "version": "2.7.0", "resolved": "https://registry.npmjs.org/lolex/-/lolex-2.7.0.tgz", @@ -4056,8 +4580,8 @@ "integrity": "sha1-W0b4AUft7leIcPCG0Eghz5mOVR8=", "dev": true, "requires": { - "currently-unhandled": "^0.4.1", - "signal-exit": "^3.0.0" + "currently-unhandled": "0.4.1", + "signal-exit": "3.0.2" } }, "lru-cache": { @@ -4066,6 +4590,15 @@ "integrity": "sha1-bUUk6LlV+V1PW1iFHOId1y+06VI=", "dev": true }, + "lru-queue": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/lru-queue/-/lru-queue-0.1.0.tgz", + "integrity": "sha1-Jzi9nw089PhEkMVzbEhpmsYyzaM=", + "dev": true, + "requires": { + "es5-ext": "0.10.61" + } + }, "make-error": { "version": "1.3.4", "resolved": "https://registry.npmjs.org/make-error/-/make-error-1.3.4.tgz", @@ -4078,7 +4611,7 @@ "integrity": "sha1-3wOI/NCzeBbf8KX7gQiTl3fcvJ0=", "dev": true, "requires": { - "make-error": "^1.2.0" + "make-error": "1.3.4" } }, "make-iterator": { @@ -4087,7 +4620,7 @@ "integrity": "sha512-pxiuXh0iVEq7VM7KMIhs5gxsfxCux2URptUQaXo4iZZJxBAzTPOLE2BumO5dbfVYq/hBJFBR/a1mFDmOx5AGmw==", "dev": true, "requires": { - "kind-of": "^6.0.2" + "kind-of": "6.0.2" }, "dependencies": { "kind-of": { @@ -4116,31 +4649,53 @@ "integrity": "sha1-7Nyo8TFE5mDxtb1B8S80edmN+48=", "dev": true, "requires": { - "object-visit": "^1.0.0" + "object-visit": "1.0.1" } }, - "math-random": { + "math-expression-evaluator": { + "version": "1.3.14", + "resolved": "https://registry.npmjs.org/math-expression-evaluator/-/math-expression-evaluator-1.3.14.tgz", + "integrity": "sha512-M6AMrvq9bO8uL42KvQHPA2/SbAobA0R7gviUmPrcTcGfdwpaLitz4q2Euzx2lP9Oy88vxK3HOrsISgSwKsYS4A==", + "dev": true + }, + "math-random": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/math-random/-/math-random-1.0.1.tgz", "integrity": "sha1-izqsWIuKZuSXXjzepn97sylgH6w=", "dev": true }, + "memoizee": { + "version": "0.4.15", + "resolved": "https://registry.npmjs.org/memoizee/-/memoizee-0.4.15.tgz", + "integrity": "sha512-UBWmJpLZd5STPm7PMUlOw/TSy972M+z8gcyQ5veOnSDRREz/0bmpyTfKt3/51DhEBqCZQn1udM/5flcSPYhkdQ==", + "dev": true, + "requires": { + "d": "1.0.1", + "es5-ext": "0.10.61", + "es6-weak-map": "2.0.3", + "event-emitter": "0.3.5", + "is-promise": "2.2.2", + "lru-queue": "0.1.0", + "next-tick": "1.1.0", + "timers-ext": "0.1.7" + } + }, "meow": { "version": "3.7.0", "resolved": "https://registry.npmjs.org/meow/-/meow-3.7.0.tgz", "integrity": "sha1-cstmi0JSKCkKu/qFaJJYcwioAfs=", "dev": true, "requires": { - "camelcase-keys": "^2.0.0", - "decamelize": "^1.1.2", - "loud-rejection": "^1.0.0", - "map-obj": "^1.0.1", - "minimist": "^1.1.3", - "normalize-package-data": "^2.3.4", - "object-assign": "^4.0.1", - "read-pkg-up": "^1.0.1", - "redent": "^1.0.0", - "trim-newlines": "^1.0.0" + "camelcase-keys": "2.1.0", + "decamelize": "1.2.0", + "loud-rejection": "1.6.0", + "map-obj": "1.0.1", + "minimist": "1.2.0", + "normalize-package-data": "2.4.0", + "object-assign": "4.1.1", + "read-pkg-up": "1.0.1", + "redent": "1.0.0", + "trim-newlines": "1.0.0" } }, "merge-stream": { @@ -4149,7 +4704,7 @@ "integrity": "sha1-QEEgLVCKNCugAXQAjfDCUbjBNeE=", "dev": true, "requires": { - "readable-stream": "^2.0.1" + "readable-stream": "2.3.6" } }, "micromatch": { @@ -4158,19 +4713,19 @@ "integrity": "sha1-hmd8l9FyCzY0MdBNDRUpO9OMFWU=", "dev": true, "requires": { - "arr-diff": "^2.0.0", - "array-unique": "^0.2.1", - "braces": "^1.8.2", - "expand-brackets": "^0.1.4", - "extglob": "^0.3.1", - "filename-regex": "^2.0.0", - "is-extglob": "^1.0.0", - "is-glob": "^2.0.1", - "kind-of": "^3.0.2", - "normalize-path": "^2.0.1", - "object.omit": "^2.0.0", - "parse-glob": "^3.0.4", - "regex-cache": "^0.4.2" + "arr-diff": "2.0.0", + "array-unique": "0.2.1", + "braces": "1.8.5", + "expand-brackets": "0.1.5", + "extglob": "0.3.2", + "filename-regex": "2.0.1", + "is-extglob": "1.0.0", + "is-glob": "2.0.1", + "kind-of": "3.2.2", + "normalize-path": "2.1.1", + "object.omit": "2.0.1", + "parse-glob": "3.0.4", + "regex-cache": "0.4.4" } }, "mime": { @@ -4191,7 +4746,7 @@ "integrity": "sha512-lc/aahn+t4/SWV/qcmumYjymLsWfN3ELhpmVuUFjgsORruuZPVSwAQryq+HHGvO/SI2KVX26bx+En+zhM8g8hQ==", "dev": true, "requires": { - "mime-db": "~1.33.0" + "mime-db": "1.33.0" } }, "minimatch": { @@ -4200,7 +4755,7 @@ "integrity": "sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==", "dev": true, "requires": { - "brace-expansion": "^1.1.7" + "brace-expansion": "1.1.11" } }, "minimist": { @@ -4215,8 +4770,8 @@ "integrity": "sha512-8ZItLHeEgaqEvd5lYBXfm4EZSFCX29Jb9K+lAHhDKzReKBQKj3R+7NOF6tjqYi9t4oI8VUfaWITJQm86wnXGNQ==", "dev": true, "requires": { - "for-in": "^1.0.2", - "is-extendable": "^1.0.1" + "for-in": "1.0.2", + "is-extendable": "1.0.1" }, "dependencies": { "is-extendable": { @@ -4225,7 +4780,7 @@ "integrity": "sha512-arnXMxT1hhoKo9k1LZdmlNyJdDDfy2v0fXjFlmok4+i8ul/6WlbVge9bhM74OpNPQPMGUToDtz+KXa1PneJxOA==", "dev": true, "requires": { - "is-plain-object": "^2.0.4" + "is-plain-object": "2.0.4" } } } @@ -4281,12 +4836,12 @@ "integrity": "sha512-MJTUg1kjuLeQCJ+ccE4Vpa6kKVXkPYJ2mOCQyUuKLcLQsdrMCpBPUi8qVE6+YuaJkozeA9NusTAw3hLr8Xe5EQ==", "dev": true, "requires": { - "fs.realpath": "^1.0.0", - "inflight": "^1.0.4", - "inherits": "2", - "minimatch": "^3.0.4", - "once": "^1.3.0", - "path-is-absolute": "^1.0.0" + "fs.realpath": "1.0.0", + "inflight": "1.0.6", + "inherits": "2.0.3", + "minimatch": "3.0.4", + "once": "1.3.3", + "path-is-absolute": "1.0.1" } }, "supports-color": { @@ -4295,7 +4850,7 @@ "integrity": "sha512-zjaXglF5nnWpsq470jSv6P9DwPvgLkuapYmfDm3JWOm0vkNTVF2tI4UrN2r6jH1qM/uc/WtxYY1hYoA2dOKj5w==", "dev": true, "requires": { - "has-flag": "^3.0.0" + "has-flag": "3.0.0" } } } @@ -4327,18 +4882,18 @@ "integrity": "sha512-n8R9bS8yQ6eSXaV6jHUpKzD8gLsin02w1HSFiegwrs9E098Ylhw5jdyKPaYqvHknHaSCKTPp7C8dGCQ0q9koXA==", "dev": true, "requires": { - "arr-diff": "^4.0.0", - "array-unique": "^0.3.2", - "define-property": "^2.0.2", - "extend-shallow": "^3.0.2", - "fragment-cache": "^0.2.1", - "is-odd": "^2.0.0", - "is-windows": "^1.0.2", - "kind-of": "^6.0.2", - "object.pick": "^1.3.0", - "regex-not": "^1.0.0", - "snapdragon": "^0.8.1", - "to-regex": "^3.0.1" + "arr-diff": "4.0.0", + "array-unique": "0.3.2", + "define-property": "2.0.2", + "extend-shallow": "3.0.2", + "fragment-cache": "0.2.1", + "is-odd": "2.0.0", + "is-windows": "1.0.2", + "kind-of": "6.0.2", + "object.pick": "1.3.0", + "regex-not": "1.0.2", + "snapdragon": "0.8.2", + "to-regex": "3.0.2" }, "dependencies": { "arr-diff": { @@ -4373,17 +4928,23 @@ "integrity": "sha1-KzJxhOiZIQEXeyhWP7XnECrNDKk=", "dev": true }, + "next-tick": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/next-tick/-/next-tick-1.1.0.tgz", + "integrity": "sha512-CXdUiJembsNjuToQvxayPZF9Vqht7hewsvy2sOWafLvi2awflj9mOC6bHIg50orX8IJvWKY9wYQ/zB2kogPslQ==", + "dev": true + }, "nise": { "version": "1.4.2", "resolved": "https://registry.npmjs.org/nise/-/nise-1.4.2.tgz", "integrity": "sha512-BxH/DxoQYYdhKgVAfqVy4pzXRZELHOIewzoesxpjYvpU+7YOalQhGNPf7wAx8pLrTNPrHRDlLOkAl8UI0ZpXjw==", "dev": true, "requires": { - "@sinonjs/formatio": "^2.0.0", - "just-extend": "^1.1.27", - "lolex": "^2.3.2", - "path-to-regexp": "^1.7.0", - "text-encoding": "^0.6.4" + "@sinonjs/formatio": "2.0.0", + "just-extend": "1.1.27", + "lolex": "2.7.0", + "path-to-regexp": "1.7.0", + "text-encoding": "0.6.4" } }, "node-gyp": { @@ -4392,18 +4953,18 @@ "integrity": "sha512-qDQE/Ft9xXP6zphwx4sD0t+VhwV7yFaloMpfbL2QnnDZcyaiakWlLdtFGGQfTAwpFHdpbRhRxVhIHN1OKAjgbg==", "dev": true, "requires": { - "fstream": "^1.0.0", - "glob": "^7.0.3", - "graceful-fs": "^4.1.2", - "mkdirp": "^0.5.0", - "nopt": "2 || 3", - "npmlog": "0 || 1 || 2 || 3 || 4", - "osenv": "0", - "request": ">=2.9.0 <2.82.0", - "rimraf": "2", - "semver": "~5.3.0", - "tar": "^2.0.0", - "which": "1" + "fstream": "1.0.11", + "glob": "7.1.2", + "graceful-fs": "4.1.11", + "mkdirp": "0.5.1", + "nopt": "3.0.6", + "npmlog": "4.1.2", + "osenv": "0.1.5", + "request": "2.79.0", + "rimraf": "2.6.2", + "semver": "5.3.0", + "tar": "2.2.1", + "which": "1.3.1" }, "dependencies": { "glob": { @@ -4412,12 +4973,12 @@ "integrity": "sha512-MJTUg1kjuLeQCJ+ccE4Vpa6kKVXkPYJ2mOCQyUuKLcLQsdrMCpBPUi8qVE6+YuaJkozeA9NusTAw3hLr8Xe5EQ==", "dev": true, "requires": { - "fs.realpath": "^1.0.0", - "inflight": "^1.0.4", - "inherits": "2", - "minimatch": "^3.0.4", - "once": "^1.3.0", - "path-is-absolute": "^1.0.0" + "fs.realpath": "1.0.0", + "inflight": "1.0.6", + "inherits": "2.0.3", + "minimatch": "3.0.4", + "once": "1.3.3", + "path-is-absolute": "1.0.1" } }, "semver": { @@ -4434,25 +4995,25 @@ "integrity": "sha512-QFHfrZl6lqRU3csypwviz2XLgGNOoWQbo2GOvtsfQqOfL4cy1BtWnhx/XUeAO9LT3ahBzSRXcEO6DdvAH9DzSg==", "dev": true, "requires": { - "async-foreach": "^0.1.3", - "chalk": "^1.1.1", - "cross-spawn": "^3.0.0", - "gaze": "^1.0.0", - "get-stdin": "^4.0.1", - "glob": "^7.0.3", - "in-publish": "^2.0.0", - "lodash.assign": "^4.2.0", - "lodash.clonedeep": "^4.3.2", - "lodash.mergewith": "^4.6.0", - "meow": "^3.7.0", - "mkdirp": "^0.5.1", - "nan": "^2.10.0", - "node-gyp": "^3.3.1", - "npmlog": "^4.0.0", - "request": "~2.79.0", - "sass-graph": "^2.2.4", - "stdout-stream": "^1.4.0", - "true-case-path": "^1.0.2" + "async-foreach": "0.1.3", + "chalk": "1.1.3", + "cross-spawn": "3.0.1", + "gaze": "1.1.3", + "get-stdin": "4.0.1", + "glob": "7.1.2", + "in-publish": "2.0.0", + "lodash.assign": "4.2.0", + "lodash.clonedeep": "4.5.0", + "lodash.mergewith": "4.6.1", + "meow": "3.7.0", + "mkdirp": "0.5.1", + "nan": "2.10.0", + "node-gyp": "3.7.0", + "npmlog": "4.1.2", + "request": "2.79.0", + "sass-graph": "2.2.4", + "stdout-stream": "1.4.0", + "true-case-path": "1.0.2" }, "dependencies": { "gaze": { @@ -4461,7 +5022,7 @@ "integrity": "sha512-BRdNm8hbWzFzWHERTrejLqwHDfS4GibPoq5wjTPIoJHoBtKGPg3xAFfxmM+9ztbXelxcf2hwQcaz1PtmFeue8g==", "dev": true, "requires": { - "globule": "^1.0.0" + "globule": "1.2.1" } }, "glob": { @@ -4470,12 +5031,12 @@ "integrity": "sha512-MJTUg1kjuLeQCJ+ccE4Vpa6kKVXkPYJ2mOCQyUuKLcLQsdrMCpBPUi8qVE6+YuaJkozeA9NusTAw3hLr8Xe5EQ==", "dev": true, "requires": { - "fs.realpath": "^1.0.0", - "inflight": "^1.0.4", - "inherits": "2", - "minimatch": "^3.0.4", - "once": "^1.3.0", - "path-is-absolute": "^1.0.0" + "fs.realpath": "1.0.0", + "inflight": "1.0.6", + "inherits": "2.0.3", + "minimatch": "3.0.4", + "once": "1.3.3", + "path-is-absolute": "1.0.1" } }, "globule": { @@ -4484,9 +5045,9 @@ "integrity": "sha512-g7QtgWF4uYSL5/dn71WxubOrS7JVGCnFPEnoeChJmBnyR9Mw8nGoEwOgJL/RC2Te0WhbsEUCejfH8SZNJ+adYQ==", "dev": true, "requires": { - "glob": "~7.1.1", - "lodash": "~4.17.10", - "minimatch": "~3.0.2" + "glob": "7.1.2", + "lodash": "4.17.10", + "minimatch": "3.0.4" } }, "lodash": { @@ -4509,7 +5070,7 @@ "integrity": "sha1-xkZdvwirzU2zWTF/eaxopkayj/k=", "dev": true, "requires": { - "abbrev": "1" + "abbrev": "1.1.1" } }, "normalize-package-data": { @@ -4518,10 +5079,10 @@ "integrity": "sha512-9jjUFbTPfEy3R/ad/2oNbKtW9Hgovl5O1FvFWKkKblNXoN/Oou6+9+KKohPK13Yc3/TyunyWhJp6gvRNR/PPAw==", "dev": true, "requires": { - "hosted-git-info": "^2.1.4", - "is-builtin-module": "^1.0.0", - "semver": "2 || 3 || 4 || 5", - "validate-npm-package-license": "^3.0.1" + "hosted-git-info": "2.6.1", + "is-builtin-module": "1.0.0", + "semver": "5.5.0", + "validate-npm-package-license": "3.0.3" } }, "normalize-path": { @@ -4530,7 +5091,7 @@ "integrity": "sha1-GrKLVW4Zg2Oowab35vogE3/mrtk=", "dev": true, "requires": { - "remove-trailing-separator": "^1.0.1" + "remove-trailing-separator": "1.1.0" } }, "normalize-range": { @@ -4539,16 +5100,28 @@ "integrity": "sha1-LRDAa9/TEuqXd2laTShDlFa3WUI=", "dev": true }, + "normalize-url": { + "version": "1.9.1", + "resolved": "https://registry.npmjs.org/normalize-url/-/normalize-url-1.9.1.tgz", + "integrity": "sha1-LMDWazHqIwNkWENuNiDYWVTGbDw=", + "dev": true, + "requires": { + "object-assign": "4.1.1", + "prepend-http": "1.0.4", + "query-string": "4.3.4", + "sort-keys": "1.1.2" + } + }, "npmlog": { "version": "4.1.2", "resolved": "https://registry.npmjs.org/npmlog/-/npmlog-4.1.2.tgz", "integrity": "sha512-2uUqazuKlTaSI/dC8AzicUck7+IrEaOnN/e0jd3Xtt1KcGpwx30v50mL7oPyr/h9bL3E4aZccVwpwP+5W9Vjkg==", "dev": true, "requires": { - "are-we-there-yet": "~1.1.2", - "console-control-strings": "~1.1.0", - "gauge": "~2.7.3", - "set-blocking": "~2.0.0" + "are-we-there-yet": "1.1.5", + "console-control-strings": "1.1.0", + "gauge": "2.7.4", + "set-blocking": "2.0.0" } }, "num2fraction": { @@ -4587,9 +5160,9 @@ "integrity": "sha1-fn2Fi3gb18mRpBupde04EnVOmYw=", "dev": true, "requires": { - "copy-descriptor": "^0.1.0", - "define-property": "^0.2.5", - "kind-of": "^3.0.3" + "copy-descriptor": "0.1.1", + "define-property": "0.2.5", + "kind-of": "3.2.2" }, "dependencies": { "define-property": { @@ -4598,7 +5171,7 @@ "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=", "dev": true, "requires": { - "is-descriptor": "^0.1.0" + "is-descriptor": "0.1.6" } } } @@ -4615,7 +5188,7 @@ "integrity": "sha1-95xEk68MU3e1n+OdOV5BBC3QRbs=", "dev": true, "requires": { - "isobject": "^3.0.0" + "isobject": "3.0.1" }, "dependencies": { "isobject": { @@ -4632,10 +5205,10 @@ "integrity": "sha1-On+GgzS0B96gbaFtiNXNKeQ1/s8=", "dev": true, "requires": { - "array-each": "^1.0.1", - "array-slice": "^1.0.0", - "for-own": "^1.0.0", - "isobject": "^3.0.0" + "array-each": "1.0.1", + "array-slice": "1.1.0", + "for-own": "1.0.0", + "isobject": "3.0.1" }, "dependencies": { "for-own": { @@ -4644,7 +5217,7 @@ "integrity": "sha1-xjMy9BXO3EsE2/5wz4NklMU8tEs=", "dev": true, "requires": { - "for-in": "^1.0.1" + "for-in": "1.0.2" } }, "isobject": { @@ -4661,8 +5234,8 @@ "integrity": "sha1-z4Plncj8wK1fQlDh94s7gb2AHTc=", "dev": true, "requires": { - "for-own": "^1.0.0", - "make-iterator": "^1.0.0" + "for-own": "1.0.0", + "make-iterator": "1.0.1" }, "dependencies": { "for-own": { @@ -4671,7 +5244,7 @@ "integrity": "sha1-xjMy9BXO3EsE2/5wz4NklMU8tEs=", "dev": true, "requires": { - "for-in": "^1.0.1" + "for-in": "1.0.2" } } } @@ -4682,8 +5255,8 @@ "integrity": "sha1-Gpx0SCnznbuFjHbKNXmuKlTr0fo=", "dev": true, "requires": { - "for-own": "^0.1.4", - "is-extendable": "^0.1.1" + "for-own": "0.1.5", + "is-extendable": "0.1.1" } }, "object.pick": { @@ -4692,7 +5265,7 @@ "integrity": "sha1-h6EKxMFpS9Lhy/U1kaZhQftd10c=", "dev": true, "requires": { - "isobject": "^3.0.1" + "isobject": "3.0.1" }, "dependencies": { "isobject": { @@ -4718,7 +5291,7 @@ "integrity": "sha1-suJhVXzkwxTsgwTz+oJmPkKXyiA=", "dev": true, "requires": { - "wrappy": "1" + "wrappy": "1.0.2" } }, "onecolor": { @@ -4739,8 +5312,8 @@ "integrity": "sha1-erwi5kTf9jsKltWrfyeQwPAavJU=", "dev": true, "requires": { - "object-assign": "^4.0.1", - "pinkie-promise": "^2.0.0" + "object-assign": "4.1.1", + "pinkie-promise": "2.0.1" } }, "orchestrator": { @@ -4749,9 +5322,9 @@ "integrity": "sha1-FOfp4nZPcxX7rBhOUGx6pt+UrX4=", "dev": true, "requires": { - "end-of-stream": "~0.1.5", - "sequencify": "~0.0.7", - "stream-consume": "~0.1.0" + "end-of-stream": "0.1.5", + "sequencify": "0.0.7", + "stream-consume": "0.1.1" } }, "ordered-read-streams": { @@ -4772,7 +5345,7 @@ "integrity": "sha1-IPnxeuKe00XoveWDsT0gCYA8FNk=", "dev": true, "requires": { - "lcid": "^1.0.0" + "lcid": "1.0.0" } }, "os-tmpdir": { @@ -4787,8 +5360,8 @@ "integrity": "sha512-0CWcCECdMVc2Rw3U5w9ZjqX6ga6ubk1xDVKxtBQPK7wis/0F2r9T6k4ydGYhecl7YUBxBVxhL5oisPsNxAPe2g==", "dev": true, "requires": { - "os-homedir": "^1.0.0", - "os-tmpdir": "^1.0.0" + "os-homedir": "1.0.2", + "os-tmpdir": "1.0.2" } }, "parse-filepath": { @@ -4797,9 +5370,9 @@ "integrity": "sha1-pjISf1Oq89FYdvWHLz/6x2PWyJE=", "dev": true, "requires": { - "is-absolute": "^1.0.0", - "map-cache": "^0.2.0", - "path-root": "^0.1.1" + "is-absolute": "1.0.0", + "map-cache": "0.2.2", + "path-root": "0.1.1" } }, "parse-glob": { @@ -4808,10 +5381,10 @@ "integrity": "sha1-ssN2z7EfNVE7rdFz7wu246OIORw=", "dev": true, "requires": { - "glob-base": "^0.3.0", - "is-dotfile": "^1.0.0", - "is-extglob": "^1.0.0", - "is-glob": "^2.0.0" + "glob-base": "0.3.0", + "is-dotfile": "1.0.3", + "is-extglob": "1.0.0", + "is-glob": "2.0.1" } }, "parse-json": { @@ -4820,7 +5393,7 @@ "integrity": "sha1-9ID0BDTvgHQfhGkJn43qGPVaTck=", "dev": true, "requires": { - "error-ex": "^1.2.0" + "error-ex": "1.3.2" } }, "parse-passwd": { @@ -4835,7 +5408,7 @@ "integrity": "sha1-1SCKNzjkZ2bikbouoXNoSSGouJ0=", "dev": true, "requires": { - "better-assert": "~1.0.0" + "better-assert": "1.0.2" } }, "parseuri": { @@ -4844,7 +5417,7 @@ "integrity": "sha1-gCBKUNTbt3m/3G6+J3jZDkvOMgo=", "dev": true, "requires": { - "better-assert": "~1.0.0" + "better-assert": "1.0.2" } }, "parseurl": { @@ -4865,7 +5438,7 @@ "integrity": "sha1-D+tsZPD8UY2adU3V77YscCJ2H0s=", "dev": true, "requires": { - "pinkie-promise": "^2.0.0" + "pinkie-promise": "2.0.1" } }, "path-is-absolute": { @@ -4880,156 +5453,1134 @@ "integrity": "sha1-PBrfhx6pzWyUMbbqK9dKD/BVxME=", "dev": true }, - "path-root": { - "version": "0.1.1", - "resolved": "https://registry.npmjs.org/path-root/-/path-root-0.1.1.tgz", - "integrity": "sha1-mkpoFMrBwM1zNgqV8yCDyOpHRbc=", + "path-root": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/path-root/-/path-root-0.1.1.tgz", + "integrity": "sha1-mkpoFMrBwM1zNgqV8yCDyOpHRbc=", + "dev": true, + "requires": { + "path-root-regex": "0.1.2" + } + }, + "path-root-regex": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/path-root-regex/-/path-root-regex-0.1.2.tgz", + "integrity": "sha1-v8zcjfWxLcUsi0PsONGNcsBLqW0=", + "dev": true + }, + "path-to-regexp": { + "version": "1.7.0", + "resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-1.7.0.tgz", + "integrity": "sha1-Wf3g9DW62suhA6hOnTvGTpa5k30=", + "dev": true, + "requires": { + "isarray": "0.0.1" + }, + "dependencies": { + "isarray": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-0.0.1.tgz", + "integrity": "sha1-ihis/Kmo9Bd+Cav8YDiTmwXR7t8=", + "dev": true + } + } + }, + "path-type": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/path-type/-/path-type-1.1.0.tgz", + "integrity": "sha1-WcRPfuSR2nBNpBXaWkBwuk+P5EE=", + "dev": true, + "requires": { + "graceful-fs": "4.1.11", + "pify": "2.3.0", + "pinkie-promise": "2.0.1" + } + }, + "pathval": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/pathval/-/pathval-1.1.0.tgz", + "integrity": "sha1-uULm1L3mUwBe9rcTYd74cn0GReA=", + "dev": true + }, + "picocolors": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-0.2.1.tgz", + "integrity": "sha512-cMlDqaLEqfSaW8Z7N5Jw+lyIW869EzT73/F5lhtY9cLGoVxSXznfgfXMO0Z5K0o0Q2TkTXq+0KFsdnSe3jDViA==", + "dev": true + }, + "pify": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/pify/-/pify-2.3.0.tgz", + "integrity": "sha1-7RQaasBDqEnqWISY59yosVMw6Qw=", + "dev": true + }, + "pinkie": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/pinkie/-/pinkie-2.0.4.tgz", + "integrity": "sha1-clVrgM+g1IqXToDnckjoDtT3+HA=", + "dev": true + }, + "pinkie-promise": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/pinkie-promise/-/pinkie-promise-2.0.1.tgz", + "integrity": "sha1-ITXW36ejWMBprJsXh3YogihFD/o=", + "dev": true, + "requires": { + "pinkie": "2.0.4" + } + }, + "plugin-error": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/plugin-error/-/plugin-error-1.0.1.tgz", + "integrity": "sha512-L1zP0dk7vGweZME2i+EeakvUNqSrdiI3F91TwEoYiGrAfUXmVv6fJIq4g82PAXxNsWOp0J7ZqQy/3Szz0ajTxA==", + "dev": true, + "requires": { + "ansi-colors": "1.1.0", + "arr-diff": "4.0.0", + "arr-union": "3.1.0", + "extend-shallow": "3.0.2" + }, + "dependencies": { + "arr-diff": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/arr-diff/-/arr-diff-4.0.0.tgz", + "integrity": "sha1-1kYQdP6/7HHn4VI1dhoyml3HxSA=", + "dev": true + } + } + }, + "portscanner": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/portscanner/-/portscanner-2.1.1.tgz", + "integrity": "sha1-6rtAnk3iSVD1oqUW01rnaTQ/u5Y=", + "dev": true, + "requires": { + "async": "1.5.2", + "is-number-like": "1.0.8" + } + }, + "posix-character-classes": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/posix-character-classes/-/posix-character-classes-0.1.1.tgz", + "integrity": "sha1-AerA/jta9xoqbAL+q7jB/vfgDqs=", + "dev": true + }, + "postcss": { + "version": "6.0.23", + "resolved": "https://registry.npmjs.org/postcss/-/postcss-6.0.23.tgz", + "integrity": "sha512-soOk1h6J3VMTZtVeVpv15/Hpdl2cBLX3CAw4TAbkpTJiNPk9YP/zWcD1ND+xEtvyuuvKzbxliTOIyvkSeSJ6ag==", + "dev": true, + "requires": { + "chalk": "2.4.1", + "source-map": "0.6.1", + "supports-color": "5.4.0" + }, + "dependencies": { + "ansi-styles": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", + "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", + "dev": true, + "requires": { + "color-convert": "1.9.2" + } + }, + "chalk": { + "version": "2.4.1", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.1.tgz", + "integrity": "sha512-ObN6h1v2fTJSmUXoS3nMQ92LbDK9be4TV+6G+omQlGJFdcUX5heKi1LZ1YnRMIgwTLEj3E24bT6tYni50rlCfQ==", + "dev": true, + "requires": { + "ansi-styles": "3.2.1", + "escape-string-regexp": "1.0.5", + "supports-color": "5.4.0" + } + }, + "source-map": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", + "dev": true + }, + "supports-color": { + "version": "5.4.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.4.0.tgz", + "integrity": "sha512-zjaXglF5nnWpsq470jSv6P9DwPvgLkuapYmfDm3JWOm0vkNTVF2tI4UrN2r6jH1qM/uc/WtxYY1hYoA2dOKj5w==", + "dev": true, + "requires": { + "has-flag": "3.0.0" + } + } + } + }, + "postcss-calc": { + "version": "5.3.1", + "resolved": "https://registry.npmjs.org/postcss-calc/-/postcss-calc-5.3.1.tgz", + "integrity": "sha1-d7rnypKK2FcW4v2kLyYb98HWW14=", + "dev": true, + "requires": { + "postcss": "5.2.18", + "postcss-message-helpers": "2.0.0", + "reduce-css-calc": "1.3.0" + }, + "dependencies": { + "has-flag": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-1.0.0.tgz", + "integrity": "sha1-nZ55MWXOAXoA8AQYxD+UKnsdEfo=", + "dev": true + }, + "postcss": { + "version": "5.2.18", + "resolved": "https://registry.npmjs.org/postcss/-/postcss-5.2.18.tgz", + "integrity": "sha512-zrUjRRe1bpXKsX1qAJNJjqZViErVuyEkMTRrwu4ud4sbTtIBRmtaYDrHmcGgmrbsW3MHfmtIf+vJumgQn+PrXg==", + "dev": true, + "requires": { + "chalk": "1.1.3", + "js-base64": "2.4.5", + "source-map": "0.5.7", + "supports-color": "3.2.3" + } + }, + "supports-color": { + "version": "3.2.3", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-3.2.3.tgz", + "integrity": "sha1-ZawFBLOVQXHYpklGsq48u4pfVPY=", + "dev": true, + "requires": { + "has-flag": "1.0.0" + } + } + } + }, + "postcss-colormin": { + "version": "2.2.2", + "resolved": "https://registry.npmjs.org/postcss-colormin/-/postcss-colormin-2.2.2.tgz", + "integrity": "sha1-ZjFBfV8OkJo9fsJrJMio0eT5bks=", + "dev": true, + "requires": { + "colormin": "1.1.2", + "postcss": "5.2.18", + "postcss-value-parser": "3.3.0" + }, + "dependencies": { + "has-flag": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-1.0.0.tgz", + "integrity": "sha1-nZ55MWXOAXoA8AQYxD+UKnsdEfo=", + "dev": true + }, + "postcss": { + "version": "5.2.18", + "resolved": "https://registry.npmjs.org/postcss/-/postcss-5.2.18.tgz", + "integrity": "sha512-zrUjRRe1bpXKsX1qAJNJjqZViErVuyEkMTRrwu4ud4sbTtIBRmtaYDrHmcGgmrbsW3MHfmtIf+vJumgQn+PrXg==", + "dev": true, + "requires": { + "chalk": "1.1.3", + "js-base64": "2.4.5", + "source-map": "0.5.7", + "supports-color": "3.2.3" + } + }, + "supports-color": { + "version": "3.2.3", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-3.2.3.tgz", + "integrity": "sha1-ZawFBLOVQXHYpklGsq48u4pfVPY=", + "dev": true, + "requires": { + "has-flag": "1.0.0" + } + } + } + }, + "postcss-convert-values": { + "version": "2.6.1", + "resolved": "https://registry.npmjs.org/postcss-convert-values/-/postcss-convert-values-2.6.1.tgz", + "integrity": "sha1-u9hZPFwf0uPRwyK7kl3K6Nrk1i0=", + "dev": true, + "requires": { + "postcss": "5.2.18", + "postcss-value-parser": "3.3.0" + }, + "dependencies": { + "has-flag": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-1.0.0.tgz", + "integrity": "sha1-nZ55MWXOAXoA8AQYxD+UKnsdEfo=", + "dev": true + }, + "postcss": { + "version": "5.2.18", + "resolved": "https://registry.npmjs.org/postcss/-/postcss-5.2.18.tgz", + "integrity": "sha512-zrUjRRe1bpXKsX1qAJNJjqZViErVuyEkMTRrwu4ud4sbTtIBRmtaYDrHmcGgmrbsW3MHfmtIf+vJumgQn+PrXg==", + "dev": true, + "requires": { + "chalk": "1.1.3", + "js-base64": "2.4.5", + "source-map": "0.5.7", + "supports-color": "3.2.3" + } + }, + "supports-color": { + "version": "3.2.3", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-3.2.3.tgz", + "integrity": "sha1-ZawFBLOVQXHYpklGsq48u4pfVPY=", + "dev": true, + "requires": { + "has-flag": "1.0.0" + } + } + } + }, + "postcss-discard-comments": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/postcss-discard-comments/-/postcss-discard-comments-2.0.4.tgz", + "integrity": "sha1-vv6J+v1bPazlzM5Rt2uBUUvgDj0=", + "dev": true, + "requires": { + "postcss": "5.2.18" + }, + "dependencies": { + "has-flag": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-1.0.0.tgz", + "integrity": "sha1-nZ55MWXOAXoA8AQYxD+UKnsdEfo=", + "dev": true + }, + "postcss": { + "version": "5.2.18", + "resolved": "https://registry.npmjs.org/postcss/-/postcss-5.2.18.tgz", + "integrity": "sha512-zrUjRRe1bpXKsX1qAJNJjqZViErVuyEkMTRrwu4ud4sbTtIBRmtaYDrHmcGgmrbsW3MHfmtIf+vJumgQn+PrXg==", + "dev": true, + "requires": { + "chalk": "1.1.3", + "js-base64": "2.4.5", + "source-map": "0.5.7", + "supports-color": "3.2.3" + } + }, + "supports-color": { + "version": "3.2.3", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-3.2.3.tgz", + "integrity": "sha1-ZawFBLOVQXHYpklGsq48u4pfVPY=", + "dev": true, + "requires": { + "has-flag": "1.0.0" + } + } + } + }, + "postcss-discard-duplicates": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/postcss-discard-duplicates/-/postcss-discard-duplicates-2.1.0.tgz", + "integrity": "sha1-uavye4isGIFYpesSq8riAmO5GTI=", + "dev": true, + "requires": { + "postcss": "5.2.18" + }, + "dependencies": { + "has-flag": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-1.0.0.tgz", + "integrity": "sha1-nZ55MWXOAXoA8AQYxD+UKnsdEfo=", + "dev": true + }, + "postcss": { + "version": "5.2.18", + "resolved": "https://registry.npmjs.org/postcss/-/postcss-5.2.18.tgz", + "integrity": "sha512-zrUjRRe1bpXKsX1qAJNJjqZViErVuyEkMTRrwu4ud4sbTtIBRmtaYDrHmcGgmrbsW3MHfmtIf+vJumgQn+PrXg==", + "dev": true, + "requires": { + "chalk": "1.1.3", + "js-base64": "2.4.5", + "source-map": "0.5.7", + "supports-color": "3.2.3" + } + }, + "supports-color": { + "version": "3.2.3", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-3.2.3.tgz", + "integrity": "sha1-ZawFBLOVQXHYpklGsq48u4pfVPY=", + "dev": true, + "requires": { + "has-flag": "1.0.0" + } + } + } + }, + "postcss-discard-empty": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/postcss-discard-empty/-/postcss-discard-empty-2.1.0.tgz", + "integrity": "sha1-0rS9nVztXr2Nyt52QMfXzX9PkrU=", + "dev": true, + "requires": { + "postcss": "5.2.18" + }, + "dependencies": { + "has-flag": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-1.0.0.tgz", + "integrity": "sha1-nZ55MWXOAXoA8AQYxD+UKnsdEfo=", + "dev": true + }, + "postcss": { + "version": "5.2.18", + "resolved": "https://registry.npmjs.org/postcss/-/postcss-5.2.18.tgz", + "integrity": "sha512-zrUjRRe1bpXKsX1qAJNJjqZViErVuyEkMTRrwu4ud4sbTtIBRmtaYDrHmcGgmrbsW3MHfmtIf+vJumgQn+PrXg==", + "dev": true, + "requires": { + "chalk": "1.1.3", + "js-base64": "2.4.5", + "source-map": "0.5.7", + "supports-color": "3.2.3" + } + }, + "supports-color": { + "version": "3.2.3", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-3.2.3.tgz", + "integrity": "sha1-ZawFBLOVQXHYpklGsq48u4pfVPY=", + "dev": true, + "requires": { + "has-flag": "1.0.0" + } + } + } + }, + "postcss-discard-overridden": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/postcss-discard-overridden/-/postcss-discard-overridden-0.1.1.tgz", + "integrity": "sha1-ix6vVU9ob7KIzYdMVWZ7CqNmjVg=", + "dev": true, + "requires": { + "postcss": "5.2.18" + }, + "dependencies": { + "has-flag": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-1.0.0.tgz", + "integrity": "sha1-nZ55MWXOAXoA8AQYxD+UKnsdEfo=", + "dev": true + }, + "postcss": { + "version": "5.2.18", + "resolved": "https://registry.npmjs.org/postcss/-/postcss-5.2.18.tgz", + "integrity": "sha512-zrUjRRe1bpXKsX1qAJNJjqZViErVuyEkMTRrwu4ud4sbTtIBRmtaYDrHmcGgmrbsW3MHfmtIf+vJumgQn+PrXg==", + "dev": true, + "requires": { + "chalk": "1.1.3", + "js-base64": "2.4.5", + "source-map": "0.5.7", + "supports-color": "3.2.3" + } + }, + "supports-color": { + "version": "3.2.3", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-3.2.3.tgz", + "integrity": "sha1-ZawFBLOVQXHYpklGsq48u4pfVPY=", + "dev": true, + "requires": { + "has-flag": "1.0.0" + } + } + } + }, + "postcss-discard-unused": { + "version": "2.2.3", + "resolved": "https://registry.npmjs.org/postcss-discard-unused/-/postcss-discard-unused-2.2.3.tgz", + "integrity": "sha1-vOMLLMWR/8Y0Mitfs0ZLbZNPRDM=", + "dev": true, + "requires": { + "postcss": "5.2.18", + "uniqs": "2.0.0" + }, + "dependencies": { + "has-flag": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-1.0.0.tgz", + "integrity": "sha1-nZ55MWXOAXoA8AQYxD+UKnsdEfo=", + "dev": true + }, + "postcss": { + "version": "5.2.18", + "resolved": "https://registry.npmjs.org/postcss/-/postcss-5.2.18.tgz", + "integrity": "sha512-zrUjRRe1bpXKsX1qAJNJjqZViErVuyEkMTRrwu4ud4sbTtIBRmtaYDrHmcGgmrbsW3MHfmtIf+vJumgQn+PrXg==", + "dev": true, + "requires": { + "chalk": "1.1.3", + "js-base64": "2.4.5", + "source-map": "0.5.7", + "supports-color": "3.2.3" + } + }, + "supports-color": { + "version": "3.2.3", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-3.2.3.tgz", + "integrity": "sha1-ZawFBLOVQXHYpklGsq48u4pfVPY=", + "dev": true, + "requires": { + "has-flag": "1.0.0" + } + } + } + }, + "postcss-filter-plugins": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/postcss-filter-plugins/-/postcss-filter-plugins-2.0.3.tgz", + "integrity": "sha512-T53GVFsdinJhgwm7rg1BzbeBRomOg9y5MBVhGcsV0CxurUdVj1UlPdKtn7aqYA/c/QVkzKMjq2bSV5dKG5+AwQ==", + "dev": true, + "requires": { + "postcss": "5.2.18" + }, + "dependencies": { + "has-flag": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-1.0.0.tgz", + "integrity": "sha1-nZ55MWXOAXoA8AQYxD+UKnsdEfo=", + "dev": true + }, + "postcss": { + "version": "5.2.18", + "resolved": "https://registry.npmjs.org/postcss/-/postcss-5.2.18.tgz", + "integrity": "sha512-zrUjRRe1bpXKsX1qAJNJjqZViErVuyEkMTRrwu4ud4sbTtIBRmtaYDrHmcGgmrbsW3MHfmtIf+vJumgQn+PrXg==", + "dev": true, + "requires": { + "chalk": "1.1.3", + "js-base64": "2.4.5", + "source-map": "0.5.7", + "supports-color": "3.2.3" + } + }, + "supports-color": { + "version": "3.2.3", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-3.2.3.tgz", + "integrity": "sha1-ZawFBLOVQXHYpklGsq48u4pfVPY=", + "dev": true, + "requires": { + "has-flag": "1.0.0" + } + } + } + }, + "postcss-merge-idents": { + "version": "2.1.7", + "resolved": "https://registry.npmjs.org/postcss-merge-idents/-/postcss-merge-idents-2.1.7.tgz", + "integrity": "sha1-TFUwMTwI4dWzu/PSu8dH4njuonA=", + "dev": true, + "requires": { + "has": "1.0.3", + "postcss": "5.2.18", + "postcss-value-parser": "3.3.0" + }, + "dependencies": { + "has-flag": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-1.0.0.tgz", + "integrity": "sha1-nZ55MWXOAXoA8AQYxD+UKnsdEfo=", + "dev": true + }, + "postcss": { + "version": "5.2.18", + "resolved": "https://registry.npmjs.org/postcss/-/postcss-5.2.18.tgz", + "integrity": "sha512-zrUjRRe1bpXKsX1qAJNJjqZViErVuyEkMTRrwu4ud4sbTtIBRmtaYDrHmcGgmrbsW3MHfmtIf+vJumgQn+PrXg==", + "dev": true, + "requires": { + "chalk": "1.1.3", + "js-base64": "2.4.5", + "source-map": "0.5.7", + "supports-color": "3.2.3" + } + }, + "supports-color": { + "version": "3.2.3", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-3.2.3.tgz", + "integrity": "sha1-ZawFBLOVQXHYpklGsq48u4pfVPY=", + "dev": true, + "requires": { + "has-flag": "1.0.0" + } + } + } + }, + "postcss-merge-longhand": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/postcss-merge-longhand/-/postcss-merge-longhand-2.0.2.tgz", + "integrity": "sha1-I9kM0Sewp3mUkVMyc5A0oaTz1lg=", + "dev": true, + "requires": { + "postcss": "5.2.18" + }, + "dependencies": { + "has-flag": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-1.0.0.tgz", + "integrity": "sha1-nZ55MWXOAXoA8AQYxD+UKnsdEfo=", + "dev": true + }, + "postcss": { + "version": "5.2.18", + "resolved": "https://registry.npmjs.org/postcss/-/postcss-5.2.18.tgz", + "integrity": "sha512-zrUjRRe1bpXKsX1qAJNJjqZViErVuyEkMTRrwu4ud4sbTtIBRmtaYDrHmcGgmrbsW3MHfmtIf+vJumgQn+PrXg==", + "dev": true, + "requires": { + "chalk": "1.1.3", + "js-base64": "2.4.5", + "source-map": "0.5.7", + "supports-color": "3.2.3" + } + }, + "supports-color": { + "version": "3.2.3", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-3.2.3.tgz", + "integrity": "sha1-ZawFBLOVQXHYpklGsq48u4pfVPY=", + "dev": true, + "requires": { + "has-flag": "1.0.0" + } + } + } + }, + "postcss-merge-rules": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/postcss-merge-rules/-/postcss-merge-rules-2.1.2.tgz", + "integrity": "sha1-0d9d+qexrMO+VT8OnhDofGG19yE=", + "dev": true, + "requires": { + "browserslist": "1.7.7", + "caniuse-api": "1.6.1", + "postcss": "5.2.18", + "postcss-selector-parser": "2.2.3", + "vendors": "1.0.4" + }, + "dependencies": { + "browserslist": { + "version": "1.7.7", + "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-1.7.7.tgz", + "integrity": "sha1-C9dnBCWL6CmyOYu1Dkti0aFmsLk=", + "dev": true, + "requires": { + "caniuse-db": "1.0.30001332", + "electron-to-chromium": "1.3.50" + } + }, + "has-flag": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-1.0.0.tgz", + "integrity": "sha1-nZ55MWXOAXoA8AQYxD+UKnsdEfo=", + "dev": true + }, + "postcss": { + "version": "5.2.18", + "resolved": "https://registry.npmjs.org/postcss/-/postcss-5.2.18.tgz", + "integrity": "sha512-zrUjRRe1bpXKsX1qAJNJjqZViErVuyEkMTRrwu4ud4sbTtIBRmtaYDrHmcGgmrbsW3MHfmtIf+vJumgQn+PrXg==", + "dev": true, + "requires": { + "chalk": "1.1.3", + "js-base64": "2.4.5", + "source-map": "0.5.7", + "supports-color": "3.2.3" + } + }, + "supports-color": { + "version": "3.2.3", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-3.2.3.tgz", + "integrity": "sha1-ZawFBLOVQXHYpklGsq48u4pfVPY=", + "dev": true, + "requires": { + "has-flag": "1.0.0" + } + } + } + }, + "postcss-message-helpers": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/postcss-message-helpers/-/postcss-message-helpers-2.0.0.tgz", + "integrity": "sha1-pPL0+rbk/gAvCu0ABHjN9S+bpg4=", + "dev": true + }, + "postcss-minify-font-values": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/postcss-minify-font-values/-/postcss-minify-font-values-1.0.5.tgz", + "integrity": "sha1-S1jttWZB66fIR0qzUmyv17vey2k=", + "dev": true, + "requires": { + "object-assign": "4.1.1", + "postcss": "5.2.18", + "postcss-value-parser": "3.3.0" + }, + "dependencies": { + "has-flag": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-1.0.0.tgz", + "integrity": "sha1-nZ55MWXOAXoA8AQYxD+UKnsdEfo=", + "dev": true + }, + "postcss": { + "version": "5.2.18", + "resolved": "https://registry.npmjs.org/postcss/-/postcss-5.2.18.tgz", + "integrity": "sha512-zrUjRRe1bpXKsX1qAJNJjqZViErVuyEkMTRrwu4ud4sbTtIBRmtaYDrHmcGgmrbsW3MHfmtIf+vJumgQn+PrXg==", + "dev": true, + "requires": { + "chalk": "1.1.3", + "js-base64": "2.4.5", + "source-map": "0.5.7", + "supports-color": "3.2.3" + } + }, + "supports-color": { + "version": "3.2.3", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-3.2.3.tgz", + "integrity": "sha1-ZawFBLOVQXHYpklGsq48u4pfVPY=", + "dev": true, + "requires": { + "has-flag": "1.0.0" + } + } + } + }, + "postcss-minify-gradients": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/postcss-minify-gradients/-/postcss-minify-gradients-1.0.5.tgz", + "integrity": "sha1-Xb2hE3NwP4PPtKPqOIHY11/15uE=", + "dev": true, + "requires": { + "postcss": "5.2.18", + "postcss-value-parser": "3.3.0" + }, + "dependencies": { + "has-flag": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-1.0.0.tgz", + "integrity": "sha1-nZ55MWXOAXoA8AQYxD+UKnsdEfo=", + "dev": true + }, + "postcss": { + "version": "5.2.18", + "resolved": "https://registry.npmjs.org/postcss/-/postcss-5.2.18.tgz", + "integrity": "sha512-zrUjRRe1bpXKsX1qAJNJjqZViErVuyEkMTRrwu4ud4sbTtIBRmtaYDrHmcGgmrbsW3MHfmtIf+vJumgQn+PrXg==", + "dev": true, + "requires": { + "chalk": "1.1.3", + "js-base64": "2.4.5", + "source-map": "0.5.7", + "supports-color": "3.2.3" + } + }, + "supports-color": { + "version": "3.2.3", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-3.2.3.tgz", + "integrity": "sha1-ZawFBLOVQXHYpklGsq48u4pfVPY=", + "dev": true, + "requires": { + "has-flag": "1.0.0" + } + } + } + }, + "postcss-minify-params": { + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/postcss-minify-params/-/postcss-minify-params-1.2.2.tgz", + "integrity": "sha1-rSzgcTc7lDs9kwo/pZo1jCjW8fM=", + "dev": true, + "requires": { + "alphanum-sort": "1.0.2", + "postcss": "5.2.18", + "postcss-value-parser": "3.3.0", + "uniqs": "2.0.0" + }, + "dependencies": { + "has-flag": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-1.0.0.tgz", + "integrity": "sha1-nZ55MWXOAXoA8AQYxD+UKnsdEfo=", + "dev": true + }, + "postcss": { + "version": "5.2.18", + "resolved": "https://registry.npmjs.org/postcss/-/postcss-5.2.18.tgz", + "integrity": "sha512-zrUjRRe1bpXKsX1qAJNJjqZViErVuyEkMTRrwu4ud4sbTtIBRmtaYDrHmcGgmrbsW3MHfmtIf+vJumgQn+PrXg==", + "dev": true, + "requires": { + "chalk": "1.1.3", + "js-base64": "2.4.5", + "source-map": "0.5.7", + "supports-color": "3.2.3" + } + }, + "supports-color": { + "version": "3.2.3", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-3.2.3.tgz", + "integrity": "sha1-ZawFBLOVQXHYpklGsq48u4pfVPY=", + "dev": true, + "requires": { + "has-flag": "1.0.0" + } + } + } + }, + "postcss-minify-selectors": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/postcss-minify-selectors/-/postcss-minify-selectors-2.1.1.tgz", + "integrity": "sha1-ssapjAByz5G5MtGkllCBFDEXNb8=", + "dev": true, + "requires": { + "alphanum-sort": "1.0.2", + "has": "1.0.3", + "postcss": "5.2.18", + "postcss-selector-parser": "2.2.3" + }, + "dependencies": { + "has-flag": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-1.0.0.tgz", + "integrity": "sha1-nZ55MWXOAXoA8AQYxD+UKnsdEfo=", + "dev": true + }, + "postcss": { + "version": "5.2.18", + "resolved": "https://registry.npmjs.org/postcss/-/postcss-5.2.18.tgz", + "integrity": "sha512-zrUjRRe1bpXKsX1qAJNJjqZViErVuyEkMTRrwu4ud4sbTtIBRmtaYDrHmcGgmrbsW3MHfmtIf+vJumgQn+PrXg==", + "dev": true, + "requires": { + "chalk": "1.1.3", + "js-base64": "2.4.5", + "source-map": "0.5.7", + "supports-color": "3.2.3" + } + }, + "supports-color": { + "version": "3.2.3", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-3.2.3.tgz", + "integrity": "sha1-ZawFBLOVQXHYpklGsq48u4pfVPY=", + "dev": true, + "requires": { + "has-flag": "1.0.0" + } + } + } + }, + "postcss-normalize-charset": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/postcss-normalize-charset/-/postcss-normalize-charset-1.1.1.tgz", + "integrity": "sha1-757nEhLX/nWceO0WL2HtYrXLk/E=", + "dev": true, + "requires": { + "postcss": "5.2.18" + }, + "dependencies": { + "has-flag": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-1.0.0.tgz", + "integrity": "sha1-nZ55MWXOAXoA8AQYxD+UKnsdEfo=", + "dev": true + }, + "postcss": { + "version": "5.2.18", + "resolved": "https://registry.npmjs.org/postcss/-/postcss-5.2.18.tgz", + "integrity": "sha512-zrUjRRe1bpXKsX1qAJNJjqZViErVuyEkMTRrwu4ud4sbTtIBRmtaYDrHmcGgmrbsW3MHfmtIf+vJumgQn+PrXg==", + "dev": true, + "requires": { + "chalk": "1.1.3", + "js-base64": "2.4.5", + "source-map": "0.5.7", + "supports-color": "3.2.3" + } + }, + "supports-color": { + "version": "3.2.3", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-3.2.3.tgz", + "integrity": "sha1-ZawFBLOVQXHYpklGsq48u4pfVPY=", + "dev": true, + "requires": { + "has-flag": "1.0.0" + } + } + } + }, + "postcss-normalize-url": { + "version": "3.0.8", + "resolved": "https://registry.npmjs.org/postcss-normalize-url/-/postcss-normalize-url-3.0.8.tgz", + "integrity": "sha1-EI90s/L82viRov+j6kWSJ5/HgiI=", "dev": true, "requires": { - "path-root-regex": "^0.1.0" + "is-absolute-url": "2.1.0", + "normalize-url": "1.9.1", + "postcss": "5.2.18", + "postcss-value-parser": "3.3.0" + }, + "dependencies": { + "has-flag": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-1.0.0.tgz", + "integrity": "sha1-nZ55MWXOAXoA8AQYxD+UKnsdEfo=", + "dev": true + }, + "postcss": { + "version": "5.2.18", + "resolved": "https://registry.npmjs.org/postcss/-/postcss-5.2.18.tgz", + "integrity": "sha512-zrUjRRe1bpXKsX1qAJNJjqZViErVuyEkMTRrwu4ud4sbTtIBRmtaYDrHmcGgmrbsW3MHfmtIf+vJumgQn+PrXg==", + "dev": true, + "requires": { + "chalk": "1.1.3", + "js-base64": "2.4.5", + "source-map": "0.5.7", + "supports-color": "3.2.3" + } + }, + "supports-color": { + "version": "3.2.3", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-3.2.3.tgz", + "integrity": "sha1-ZawFBLOVQXHYpklGsq48u4pfVPY=", + "dev": true, + "requires": { + "has-flag": "1.0.0" + } + } } }, - "path-root-regex": { - "version": "0.1.2", - "resolved": "https://registry.npmjs.org/path-root-regex/-/path-root-regex-0.1.2.tgz", - "integrity": "sha1-v8zcjfWxLcUsi0PsONGNcsBLqW0=", - "dev": true - }, - "path-to-regexp": { - "version": "1.7.0", - "resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-1.7.0.tgz", - "integrity": "sha1-Wf3g9DW62suhA6hOnTvGTpa5k30=", + "postcss-ordered-values": { + "version": "2.2.3", + "resolved": "https://registry.npmjs.org/postcss-ordered-values/-/postcss-ordered-values-2.2.3.tgz", + "integrity": "sha1-7sbCpntsQSqNsgQud/6NpD+VwR0=", "dev": true, "requires": { - "isarray": "0.0.1" + "postcss": "5.2.18", + "postcss-value-parser": "3.3.0" }, "dependencies": { - "isarray": { - "version": "0.0.1", - "resolved": "https://registry.npmjs.org/isarray/-/isarray-0.0.1.tgz", - "integrity": "sha1-ihis/Kmo9Bd+Cav8YDiTmwXR7t8=", + "has-flag": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-1.0.0.tgz", + "integrity": "sha1-nZ55MWXOAXoA8AQYxD+UKnsdEfo=", "dev": true + }, + "postcss": { + "version": "5.2.18", + "resolved": "https://registry.npmjs.org/postcss/-/postcss-5.2.18.tgz", + "integrity": "sha512-zrUjRRe1bpXKsX1qAJNJjqZViErVuyEkMTRrwu4ud4sbTtIBRmtaYDrHmcGgmrbsW3MHfmtIf+vJumgQn+PrXg==", + "dev": true, + "requires": { + "chalk": "1.1.3", + "js-base64": "2.4.5", + "source-map": "0.5.7", + "supports-color": "3.2.3" + } + }, + "supports-color": { + "version": "3.2.3", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-3.2.3.tgz", + "integrity": "sha1-ZawFBLOVQXHYpklGsq48u4pfVPY=", + "dev": true, + "requires": { + "has-flag": "1.0.0" + } } } }, - "path-type": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/path-type/-/path-type-1.1.0.tgz", - "integrity": "sha1-WcRPfuSR2nBNpBXaWkBwuk+P5EE=", + "postcss-reduce-idents": { + "version": "2.4.0", + "resolved": "https://registry.npmjs.org/postcss-reduce-idents/-/postcss-reduce-idents-2.4.0.tgz", + "integrity": "sha1-wsbSDMlYKE9qv75j92Cb9AkFmtM=", "dev": true, "requires": { - "graceful-fs": "^4.1.2", - "pify": "^2.0.0", - "pinkie-promise": "^2.0.0" + "postcss": "5.2.18", + "postcss-value-parser": "3.3.0" + }, + "dependencies": { + "has-flag": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-1.0.0.tgz", + "integrity": "sha1-nZ55MWXOAXoA8AQYxD+UKnsdEfo=", + "dev": true + }, + "postcss": { + "version": "5.2.18", + "resolved": "https://registry.npmjs.org/postcss/-/postcss-5.2.18.tgz", + "integrity": "sha512-zrUjRRe1bpXKsX1qAJNJjqZViErVuyEkMTRrwu4ud4sbTtIBRmtaYDrHmcGgmrbsW3MHfmtIf+vJumgQn+PrXg==", + "dev": true, + "requires": { + "chalk": "1.1.3", + "js-base64": "2.4.5", + "source-map": "0.5.7", + "supports-color": "3.2.3" + } + }, + "supports-color": { + "version": "3.2.3", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-3.2.3.tgz", + "integrity": "sha1-ZawFBLOVQXHYpklGsq48u4pfVPY=", + "dev": true, + "requires": { + "has-flag": "1.0.0" + } + } } }, - "pathval": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/pathval/-/pathval-1.1.0.tgz", - "integrity": "sha1-uULm1L3mUwBe9rcTYd74cn0GReA=", - "dev": true - }, - "pify": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/pify/-/pify-2.3.0.tgz", - "integrity": "sha1-7RQaasBDqEnqWISY59yosVMw6Qw=", - "dev": true - }, - "pinkie": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/pinkie/-/pinkie-2.0.4.tgz", - "integrity": "sha1-clVrgM+g1IqXToDnckjoDtT3+HA=", - "dev": true - }, - "pinkie-promise": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/pinkie-promise/-/pinkie-promise-2.0.1.tgz", - "integrity": "sha1-ITXW36ejWMBprJsXh3YogihFD/o=", + "postcss-reduce-initial": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/postcss-reduce-initial/-/postcss-reduce-initial-1.0.1.tgz", + "integrity": "sha1-aPgGlfBF0IJjqHmtJA343WT2ROo=", "dev": true, "requires": { - "pinkie": "^2.0.0" + "postcss": "5.2.18" + }, + "dependencies": { + "has-flag": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-1.0.0.tgz", + "integrity": "sha1-nZ55MWXOAXoA8AQYxD+UKnsdEfo=", + "dev": true + }, + "postcss": { + "version": "5.2.18", + "resolved": "https://registry.npmjs.org/postcss/-/postcss-5.2.18.tgz", + "integrity": "sha512-zrUjRRe1bpXKsX1qAJNJjqZViErVuyEkMTRrwu4ud4sbTtIBRmtaYDrHmcGgmrbsW3MHfmtIf+vJumgQn+PrXg==", + "dev": true, + "requires": { + "chalk": "1.1.3", + "js-base64": "2.4.5", + "source-map": "0.5.7", + "supports-color": "3.2.3" + } + }, + "supports-color": { + "version": "3.2.3", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-3.2.3.tgz", + "integrity": "sha1-ZawFBLOVQXHYpklGsq48u4pfVPY=", + "dev": true, + "requires": { + "has-flag": "1.0.0" + } + } } }, - "plugin-error": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/plugin-error/-/plugin-error-1.0.1.tgz", - "integrity": "sha512-L1zP0dk7vGweZME2i+EeakvUNqSrdiI3F91TwEoYiGrAfUXmVv6fJIq4g82PAXxNsWOp0J7ZqQy/3Szz0ajTxA==", + "postcss-reduce-transforms": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/postcss-reduce-transforms/-/postcss-reduce-transforms-1.0.4.tgz", + "integrity": "sha1-/3b02CEkN7McKYpC0uFEQCV3GuE=", "dev": true, "requires": { - "ansi-colors": "^1.0.1", - "arr-diff": "^4.0.0", - "arr-union": "^3.1.0", - "extend-shallow": "^3.0.2" + "has": "1.0.3", + "postcss": "5.2.18", + "postcss-value-parser": "3.3.0" }, "dependencies": { - "arr-diff": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/arr-diff/-/arr-diff-4.0.0.tgz", - "integrity": "sha1-1kYQdP6/7HHn4VI1dhoyml3HxSA=", + "has-flag": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-1.0.0.tgz", + "integrity": "sha1-nZ55MWXOAXoA8AQYxD+UKnsdEfo=", "dev": true + }, + "postcss": { + "version": "5.2.18", + "resolved": "https://registry.npmjs.org/postcss/-/postcss-5.2.18.tgz", + "integrity": "sha512-zrUjRRe1bpXKsX1qAJNJjqZViErVuyEkMTRrwu4ud4sbTtIBRmtaYDrHmcGgmrbsW3MHfmtIf+vJumgQn+PrXg==", + "dev": true, + "requires": { + "chalk": "1.1.3", + "js-base64": "2.4.5", + "source-map": "0.5.7", + "supports-color": "3.2.3" + } + }, + "supports-color": { + "version": "3.2.3", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-3.2.3.tgz", + "integrity": "sha1-ZawFBLOVQXHYpklGsq48u4pfVPY=", + "dev": true, + "requires": { + "has-flag": "1.0.0" + } } } }, - "portscanner": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/portscanner/-/portscanner-2.1.1.tgz", - "integrity": "sha1-6rtAnk3iSVD1oqUW01rnaTQ/u5Y=", + "postcss-selector-parser": { + "version": "2.2.3", + "resolved": "https://registry.npmjs.org/postcss-selector-parser/-/postcss-selector-parser-2.2.3.tgz", + "integrity": "sha1-+UN3iGBsPJrO4W/+jYsWKX8nu5A=", "dev": true, "requires": { - "async": "1.5.2", - "is-number-like": "^1.0.3" + "flatten": "1.0.3", + "indexes-of": "1.0.1", + "uniq": "1.0.1" } }, - "posix-character-classes": { - "version": "0.1.1", - "resolved": "https://registry.npmjs.org/posix-character-classes/-/posix-character-classes-0.1.1.tgz", - "integrity": "sha1-AerA/jta9xoqbAL+q7jB/vfgDqs=", - "dev": true - }, - "postcss": { - "version": "6.0.23", - "resolved": "https://registry.npmjs.org/postcss/-/postcss-6.0.23.tgz", - "integrity": "sha512-soOk1h6J3VMTZtVeVpv15/Hpdl2cBLX3CAw4TAbkpTJiNPk9YP/zWcD1ND+xEtvyuuvKzbxliTOIyvkSeSJ6ag==", + "postcss-svgo": { + "version": "2.1.6", + "resolved": "https://registry.npmjs.org/postcss-svgo/-/postcss-svgo-2.1.6.tgz", + "integrity": "sha1-tt8YqmE7Zm4TPwittSGcJoSsEI0=", "dev": true, "requires": { - "chalk": "^2.4.1", - "source-map": "^0.6.1", - "supports-color": "^5.4.0" + "is-svg": "2.1.0", + "postcss": "5.2.18", + "postcss-value-parser": "3.3.0", + "svgo": "0.7.2" }, "dependencies": { - "ansi-styles": { - "version": "3.2.1", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", - "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", + "has-flag": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-1.0.0.tgz", + "integrity": "sha1-nZ55MWXOAXoA8AQYxD+UKnsdEfo=", + "dev": true + }, + "postcss": { + "version": "5.2.18", + "resolved": "https://registry.npmjs.org/postcss/-/postcss-5.2.18.tgz", + "integrity": "sha512-zrUjRRe1bpXKsX1qAJNJjqZViErVuyEkMTRrwu4ud4sbTtIBRmtaYDrHmcGgmrbsW3MHfmtIf+vJumgQn+PrXg==", "dev": true, "requires": { - "color-convert": "^1.9.0" + "chalk": "1.1.3", + "js-base64": "2.4.5", + "source-map": "0.5.7", + "supports-color": "3.2.3" } }, - "chalk": { - "version": "2.4.1", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.1.tgz", - "integrity": "sha512-ObN6h1v2fTJSmUXoS3nMQ92LbDK9be4TV+6G+omQlGJFdcUX5heKi1LZ1YnRMIgwTLEj3E24bT6tYni50rlCfQ==", + "supports-color": { + "version": "3.2.3", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-3.2.3.tgz", + "integrity": "sha1-ZawFBLOVQXHYpklGsq48u4pfVPY=", "dev": true, "requires": { - "ansi-styles": "^3.2.1", - "escape-string-regexp": "^1.0.5", - "supports-color": "^5.3.0" + "has-flag": "1.0.0" } - }, - "source-map": { - "version": "0.6.1", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", - "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", + } + } + }, + "postcss-unique-selectors": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/postcss-unique-selectors/-/postcss-unique-selectors-2.0.2.tgz", + "integrity": "sha1-mB1X0p3csz57Hf4f1DuGSfkzyh0=", + "dev": true, + "requires": { + "alphanum-sort": "1.0.2", + "postcss": "5.2.18", + "uniqs": "2.0.0" + }, + "dependencies": { + "has-flag": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-1.0.0.tgz", + "integrity": "sha1-nZ55MWXOAXoA8AQYxD+UKnsdEfo=", "dev": true }, + "postcss": { + "version": "5.2.18", + "resolved": "https://registry.npmjs.org/postcss/-/postcss-5.2.18.tgz", + "integrity": "sha512-zrUjRRe1bpXKsX1qAJNJjqZViErVuyEkMTRrwu4ud4sbTtIBRmtaYDrHmcGgmrbsW3MHfmtIf+vJumgQn+PrXg==", + "dev": true, + "requires": { + "chalk": "1.1.3", + "js-base64": "2.4.5", + "source-map": "0.5.7", + "supports-color": "3.2.3" + } + }, "supports-color": { - "version": "5.4.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.4.0.tgz", - "integrity": "sha512-zjaXglF5nnWpsq470jSv6P9DwPvgLkuapYmfDm3JWOm0vkNTVF2tI4UrN2r6jH1qM/uc/WtxYY1hYoA2dOKj5w==", + "version": "3.2.3", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-3.2.3.tgz", + "integrity": "sha1-ZawFBLOVQXHYpklGsq48u4pfVPY=", "dev": true, "requires": { - "has-flag": "^3.0.0" + "has-flag": "1.0.0" } } } @@ -5040,6 +6591,52 @@ "integrity": "sha1-h/OPnxj3dKSrTIojL1xc6IcqnRU=", "dev": true }, + "postcss-zindex": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/postcss-zindex/-/postcss-zindex-2.2.0.tgz", + "integrity": "sha1-0hCd3AVbka9n/EyzsCWUZjnSryI=", + "dev": true, + "requires": { + "has": "1.0.3", + "postcss": "5.2.18", + "uniqs": "2.0.0" + }, + "dependencies": { + "has-flag": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-1.0.0.tgz", + "integrity": "sha1-nZ55MWXOAXoA8AQYxD+UKnsdEfo=", + "dev": true + }, + "postcss": { + "version": "5.2.18", + "resolved": "https://registry.npmjs.org/postcss/-/postcss-5.2.18.tgz", + "integrity": "sha512-zrUjRRe1bpXKsX1qAJNJjqZViErVuyEkMTRrwu4ud4sbTtIBRmtaYDrHmcGgmrbsW3MHfmtIf+vJumgQn+PrXg==", + "dev": true, + "requires": { + "chalk": "1.1.3", + "js-base64": "2.4.5", + "source-map": "0.5.7", + "supports-color": "3.2.3" + } + }, + "supports-color": { + "version": "3.2.3", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-3.2.3.tgz", + "integrity": "sha1-ZawFBLOVQXHYpklGsq48u4pfVPY=", + "dev": true, + "requires": { + "has-flag": "1.0.0" + } + } + } + }, + "prepend-http": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/prepend-http/-/prepend-http-1.0.4.tgz", + "integrity": "sha1-1PRWKwzjaW5BrFLQ4ALlemNdxtw=", + "dev": true + }, "preserve": { "version": "0.2.0", "resolved": "https://registry.npmjs.org/preserve/-/preserve-0.2.0.tgz", @@ -5082,15 +6679,25 @@ "integrity": "sha1-HPyyXBCpsrSDBT/zn138kjOQjP4=", "dev": true }, + "query-string": { + "version": "4.3.4", + "resolved": "https://registry.npmjs.org/query-string/-/query-string-4.3.4.tgz", + "integrity": "sha1-u7aTucqRXCMlFbIosaArYJBD2+s=", + "dev": true, + "requires": { + "object-assign": "4.1.1", + "strict-uri-encode": "1.1.0" + } + }, "randomatic": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/randomatic/-/randomatic-3.0.0.tgz", "integrity": "sha512-VdxFOIEY3mNO5PtSRkkle/hPJDHvQhK21oa73K4yAc9qmp6N429gAyF1gZMOTMeS0/AYzaV/2Trcef+NaIonSA==", "dev": true, "requires": { - "is-number": "^4.0.0", - "kind-of": "^6.0.0", - "math-random": "^1.0.1" + "is-number": "4.0.0", + "kind-of": "6.0.2", + "math-random": "1.0.1" }, "dependencies": { "is-number": { @@ -5131,9 +6738,9 @@ "integrity": "sha1-9f+qXs0pyzHAR0vKfXVra7KePyg=", "dev": true, "requires": { - "load-json-file": "^1.0.0", - "normalize-package-data": "^2.3.2", - "path-type": "^1.0.0" + "load-json-file": "1.1.0", + "normalize-package-data": "2.4.0", + "path-type": "1.1.0" } }, "read-pkg-up": { @@ -5142,8 +6749,8 @@ "integrity": "sha1-nWPBMnbAZZGNV/ACpX9AobZD+wI=", "dev": true, "requires": { - "find-up": "^1.0.0", - "read-pkg": "^1.0.0" + "find-up": "1.1.2", + "read-pkg": "1.1.0" } }, "readable-stream": { @@ -5152,13 +6759,13 @@ "integrity": "sha512-tQtKA9WIAhBF3+VLAseyMqZeBjW0AHJoxOtYqSUZNJxauErmLbVm2FW1y+J/YA9dUrAC39ITejlZWhVIwawkKw==", "dev": true, "requires": { - "core-util-is": "~1.0.0", - "inherits": "~2.0.3", - "isarray": "~1.0.0", - "process-nextick-args": "~2.0.0", - "safe-buffer": "~5.1.1", - "string_decoder": "~1.1.1", - "util-deprecate": "~1.0.1" + "core-util-is": "1.0.2", + "inherits": "2.0.3", + "isarray": "1.0.0", + "process-nextick-args": "2.0.0", + "safe-buffer": "5.1.2", + "string_decoder": "1.1.1", + "util-deprecate": "1.0.2" }, "dependencies": { "isarray": { @@ -5175,10 +6782,10 @@ "integrity": "sha1-TtCtBg3zBzMAxIRANz9y0cxkLXg=", "dev": true, "requires": { - "graceful-fs": "^4.1.2", - "minimatch": "^3.0.2", - "readable-stream": "^2.0.2", - "set-immediate-shim": "^1.0.1" + "graceful-fs": "4.1.11", + "minimatch": "3.0.4", + "readable-stream": "2.3.6", + "set-immediate-shim": "1.0.1" } }, "rechoir": { @@ -5187,7 +6794,7 @@ "integrity": "sha1-hSBLVNuoLVdC4oyWdW70OvUOM4Q=", "dev": true, "requires": { - "resolve": "^1.1.6" + "resolve": "1.8.1" } }, "redent": { @@ -5196,8 +6803,36 @@ "integrity": "sha1-z5Fqsf1fHxbfsggi3W7H9zDCr94=", "dev": true, "requires": { - "indent-string": "^2.1.0", - "strip-indent": "^1.0.1" + "indent-string": "2.1.0", + "strip-indent": "1.0.1" + } + }, + "reduce-css-calc": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/reduce-css-calc/-/reduce-css-calc-1.3.0.tgz", + "integrity": "sha1-dHyRTgSWFKTJz7umKYca0dKSdxY=", + "dev": true, + "requires": { + "balanced-match": "0.4.2", + "math-expression-evaluator": "1.3.14", + "reduce-function-call": "1.0.3" + }, + "dependencies": { + "balanced-match": { + "version": "0.4.2", + "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-0.4.2.tgz", + "integrity": "sha1-yz8+PHMtwPAe5wtAPzAuYddwmDg=", + "dev": true + } + } + }, + "reduce-function-call": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/reduce-function-call/-/reduce-function-call-1.0.3.tgz", + "integrity": "sha512-Hl/tuV2VDgWgCSEeWMLwxLZqX7OK59eU1guxXsRKTAyeYimivsKdtcV4fu3r710tpG5GmDKDhQ0HSZLExnNmyQ==", + "dev": true, + "requires": { + "balanced-match": "1.0.0" } }, "regex-cache": { @@ -5206,7 +6841,7 @@ "integrity": "sha512-nVIZwtCjkC9YgvWkpM55B5rBhBYRZhAaJbgcFYXXsHnbZ9UZI9nnVWYZpBlCqv9ho2eZryPnWrZGsOdPwVWXWQ==", "dev": true, "requires": { - "is-equal-shallow": "^0.1.3" + "is-equal-shallow": "0.1.3" } }, "regex-not": { @@ -5215,8 +6850,8 @@ "integrity": "sha512-J6SDjUgDxQj5NusnOtdFxDwN/+HWykR8GELwctJ7mdqhcyy1xEc4SRFHUXvxTp661YaVKAjfRLZ9cCqS6tn32A==", "dev": true, "requires": { - "extend-shallow": "^3.0.2", - "safe-regex": "^1.1.0" + "extend-shallow": "3.0.2", + "safe-regex": "1.1.0" } }, "remove-trailing-separator": { @@ -5243,7 +6878,7 @@ "integrity": "sha1-UhTFOpJtNVJwdSf7q0FdvAjQbdo=", "dev": true, "requires": { - "is-finite": "^1.0.0" + "is-finite": "1.0.2" } }, "replace-ext": { @@ -5258,26 +6893,26 @@ "integrity": "sha1-Tf5b9r6LjNw3/Pk+BLZVd3InEN4=", "dev": true, "requires": { - "aws-sign2": "~0.6.0", - "aws4": "^1.2.1", - "caseless": "~0.11.0", - "combined-stream": "~1.0.5", - "extend": "~3.0.0", - "forever-agent": "~0.6.1", - "form-data": "~2.1.1", - "har-validator": "~2.0.6", - "hawk": "~3.1.3", - "http-signature": "~1.1.0", - "is-typedarray": "~1.0.0", - "isstream": "~0.1.2", - "json-stringify-safe": "~5.0.1", - "mime-types": "~2.1.7", - "oauth-sign": "~0.8.1", - "qs": "~6.3.0", - "stringstream": "~0.0.4", - "tough-cookie": "~2.3.0", - "tunnel-agent": "~0.4.1", - "uuid": "^3.0.0" + "aws-sign2": "0.6.0", + "aws4": "1.7.0", + "caseless": "0.11.0", + "combined-stream": "1.0.6", + "extend": "3.0.1", + "forever-agent": "0.6.1", + "form-data": "2.1.4", + "har-validator": "2.0.6", + "hawk": "3.1.3", + "http-signature": "1.1.1", + "is-typedarray": "1.0.0", + "isstream": "0.1.2", + "json-stringify-safe": "5.0.1", + "mime-types": "2.1.18", + "oauth-sign": "0.8.2", + "qs": "6.3.2", + "stringstream": "0.0.6", + "tough-cookie": "2.3.4", + "tunnel-agent": "0.4.3", + "uuid": "3.3.0" }, "dependencies": { "qs": { @@ -5312,7 +6947,7 @@ "integrity": "sha512-AicPrAC7Qu1JxPCZ9ZgCZlY35QgFnNqc+0LtbRNxnVw4TXvjQ72wnuL9JQcEBgXkI9JM8MsT9kaQoHcpCRJOYA==", "dev": true, "requires": { - "path-parse": "^1.0.5" + "path-parse": "1.0.5" } }, "resolve-dir": { @@ -5321,8 +6956,8 @@ "integrity": "sha1-eaQGRMNivoLybv/nOcm7U4IEb0M=", "dev": true, "requires": { - "expand-tilde": "^2.0.0", - "global-modules": "^1.0.0" + "expand-tilde": "2.0.2", + "global-modules": "1.0.0" } }, "resolve-url": { @@ -5337,8 +6972,8 @@ "integrity": "sha1-sSTeXE+6/LpUH0j/pzlw9KpFa08=", "dev": true, "requires": { - "debug": "^2.2.0", - "minimatch": "^3.0.2" + "debug": "2.6.9", + "minimatch": "3.0.4" } }, "ret": { @@ -5353,7 +6988,7 @@ "integrity": "sha512-lreewLK/BlghmxtfH36YYVg1i8IAce4TI7oao75I1g245+6BctqTVQiBP3YUJ9C6DQOXJmkYR9X9fCLtCOJc5w==", "dev": true, "requires": { - "glob": "^7.0.5" + "glob": "7.1.2" }, "dependencies": { "glob": { @@ -5362,12 +6997,12 @@ "integrity": "sha512-MJTUg1kjuLeQCJ+ccE4Vpa6kKVXkPYJ2mOCQyUuKLcLQsdrMCpBPUi8qVE6+YuaJkozeA9NusTAw3hLr8Xe5EQ==", "dev": true, "requires": { - "fs.realpath": "^1.0.0", - "inflight": "^1.0.4", - "inherits": "2", - "minimatch": "^3.0.4", - "once": "^1.3.0", - "path-is-absolute": "^1.0.0" + "fs.realpath": "1.0.0", + "inflight": "1.0.6", + "inherits": "2.0.3", + "minimatch": "3.0.4", + "once": "1.3.3", + "path-is-absolute": "1.0.1" } } } @@ -5378,9 +7013,9 @@ "integrity": "sha512-qkzZnQWMZjcKbh3CNly2srtrkaO/2H/SI5f2eliMCapdRD3UhMrwjfOAZJAnZ2H8Ju4aBzFZkBGXUqFs9V0yxw==", "dev": true, "requires": { - "chalk": "^1.1.3", - "fancy-log": "^1.3.2", - "plugin-error": "^0.1.2" + "chalk": "1.1.3", + "fancy-log": "1.3.2", + "plugin-error": "0.1.2" }, "dependencies": { "arr-diff": { @@ -5389,8 +7024,8 @@ "integrity": "sha1-aHwydYFjWI/vfeezb6vklesaOZo=", "dev": true, "requires": { - "arr-flatten": "^1.0.1", - "array-slice": "^0.2.3" + "arr-flatten": "1.1.0", + "array-slice": "0.2.3" } }, "arr-union": { @@ -5411,7 +7046,7 @@ "integrity": "sha1-Gda/lN/AnXa6cR85uHLSH/TdkHE=", "dev": true, "requires": { - "kind-of": "^1.1.0" + "kind-of": "1.1.0" } }, "kind-of": { @@ -5426,11 +7061,11 @@ "integrity": "sha1-O5uzM1zPAPQl4HQ34ZJ2ln2kes4=", "dev": true, "requires": { - "ansi-cyan": "^0.1.1", - "ansi-red": "^0.1.1", - "arr-diff": "^1.0.1", - "arr-union": "^2.0.1", - "extend-shallow": "^1.1.2" + "ansi-cyan": "0.1.1", + "ansi-red": "0.1.1", + "arr-diff": "1.1.0", + "arr-union": "2.1.0", + "extend-shallow": "1.1.4" } } } @@ -5453,7 +7088,7 @@ "integrity": "sha1-QKNmnzsHfR6UPURinhV91IAjvy4=", "dev": true, "requires": { - "ret": "~0.1.10" + "ret": "0.1.15" } }, "safer-buffer": { @@ -5474,10 +7109,10 @@ "integrity": "sha1-E/vWPNHK8JCLn9k0dq1DpR0eC0k=", "dev": true, "requires": { - "glob": "^7.0.0", - "lodash": "^4.0.0", - "scss-tokenizer": "^0.2.3", - "yargs": "^7.0.0" + "glob": "7.1.2", + "lodash": "4.17.10", + "scss-tokenizer": "0.2.3", + "yargs": "7.1.0" }, "dependencies": { "glob": { @@ -5486,12 +7121,12 @@ "integrity": "sha512-MJTUg1kjuLeQCJ+ccE4Vpa6kKVXkPYJ2mOCQyUuKLcLQsdrMCpBPUi8qVE6+YuaJkozeA9NusTAw3hLr8Xe5EQ==", "dev": true, "requires": { - "fs.realpath": "^1.0.0", - "inflight": "^1.0.4", - "inherits": "2", - "minimatch": "^3.0.4", - "once": "^1.3.0", - "path-is-absolute": "^1.0.0" + "fs.realpath": "1.0.0", + "inflight": "1.0.6", + "inherits": "2.0.3", + "minimatch": "3.0.4", + "once": "1.3.3", + "path-is-absolute": "1.0.1" } }, "lodash": { @@ -5506,19 +7141,19 @@ "integrity": "sha1-a6MY6xaWFyf10oT46gA+jWFU0Mg=", "dev": true, "requires": { - "camelcase": "^3.0.0", - "cliui": "^3.2.0", - "decamelize": "^1.1.1", - "get-caller-file": "^1.0.1", - "os-locale": "^1.4.0", - "read-pkg-up": "^1.0.1", - "require-directory": "^2.1.1", - "require-main-filename": "^1.0.1", - "set-blocking": "^2.0.0", - "string-width": "^1.0.2", - "which-module": "^1.0.0", - "y18n": "^3.2.1", - "yargs-parser": "^5.0.0" + "camelcase": "3.0.0", + "cliui": "3.2.0", + "decamelize": "1.2.0", + "get-caller-file": "1.0.2", + "os-locale": "1.4.0", + "read-pkg-up": "1.0.1", + "require-directory": "2.1.1", + "require-main-filename": "1.0.1", + "set-blocking": "2.0.0", + "string-width": "1.0.2", + "which-module": "1.0.0", + "y18n": "3.2.1", + "yargs-parser": "5.0.0" } }, "yargs-parser": { @@ -5527,7 +7162,7 @@ "integrity": "sha1-J17PDX/+Bcd+ZOfIbkzZS/DhIoo=", "dev": true, "requires": { - "camelcase": "^3.0.0" + "camelcase": "3.0.0" } } } @@ -5544,8 +7179,8 @@ "integrity": "sha1-jrBtualyMzOCTT9VMGQRSYR85dE=", "dev": true, "requires": { - "js-base64": "^2.1.8", - "source-map": "^0.4.2" + "js-base64": "2.4.5", + "source-map": "0.4.4" }, "dependencies": { "source-map": { @@ -5554,7 +7189,7 @@ "integrity": "sha1-66T12pwNyZneaAMti092FzZSA2s=", "dev": true, "requires": { - "amdefine": ">=0.0.4" + "amdefine": "1.0.1" } } } @@ -5572,18 +7207,18 @@ "dev": true, "requires": { "debug": "2.6.9", - "depd": "~1.1.2", - "destroy": "~1.0.4", - "encodeurl": "~1.0.2", - "escape-html": "~1.0.3", - "etag": "~1.8.1", + "depd": "1.1.2", + "destroy": "1.0.4", + "encodeurl": "1.0.2", + "escape-html": "1.0.3", + "etag": "1.8.1", "fresh": "0.5.2", - "http-errors": "~1.6.2", + "http-errors": "1.6.3", "mime": "1.4.1", "ms": "2.0.0", - "on-finished": "~2.3.0", - "range-parser": "~1.2.0", - "statuses": "~1.4.0" + "on-finished": "2.3.0", + "range-parser": "1.2.0", + "statuses": "1.4.0" }, "dependencies": { "statuses": { @@ -5606,13 +7241,13 @@ "integrity": "sha1-03aNabHn2C5c4FD/9bRTvqEqkjk=", "dev": true, "requires": { - "accepts": "~1.3.4", + "accepts": "1.3.5", "batch": "0.6.1", "debug": "2.6.9", - "escape-html": "~1.0.3", - "http-errors": "~1.6.2", - "mime-types": "~2.1.17", - "parseurl": "~1.3.2" + "escape-html": "1.0.3", + "http-errors": "1.6.3", + "mime-types": "2.1.18", + "parseurl": "1.3.2" } }, "serve-static": { @@ -5621,9 +7256,9 @@ "integrity": "sha512-p/tdJrO4U387R9oMjb1oj7qSMaMfmOyd4j9hOFoxZe2baQszgHcSWjuya/CiT5kgZZKRudHNOA0pYXOl8rQ5nw==", "dev": true, "requires": { - "encodeurl": "~1.0.2", - "escape-html": "~1.0.3", - "parseurl": "~1.3.2", + "encodeurl": "1.0.2", + "escape-html": "1.0.3", + "parseurl": "1.3.2", "send": "0.16.2" } }, @@ -5651,10 +7286,10 @@ "integrity": "sha512-hw0yxk9GT/Hr5yJEYnHNKYXkIA8mVJgd9ditYZCe16ZczcaELYYcfvaXesNACk2O8O0nTiPQcQhGUQj8JLzeeg==", "dev": true, "requires": { - "extend-shallow": "^2.0.1", - "is-extendable": "^0.1.1", - "is-plain-object": "^2.0.3", - "split-string": "^3.0.1" + "extend-shallow": "2.0.1", + "is-extendable": "0.1.1", + "is-plain-object": "2.0.4", + "split-string": "3.1.0" }, "dependencies": { "extend-shallow": { @@ -5663,7 +7298,7 @@ "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", "dev": true, "requires": { - "is-extendable": "^0.1.0" + "is-extendable": "0.1.1" } } } @@ -5692,13 +7327,13 @@ "integrity": "sha512-h/3uHscbt5pQNxkf7Y/Lb9/OM44YNCicHakcq73ncbrIS8lXg+ZGOZbtuU+/km4YnyiCYfQQEwANaReJz7KDfw==", "dev": true, "requires": { - "@sinonjs/formatio": "^2.0.0", - "diff": "^3.5.0", - "lodash.get": "^4.4.2", - "lolex": "^2.4.2", - "nise": "^1.3.3", - "supports-color": "^5.4.0", - "type-detect": "^4.0.8" + "@sinonjs/formatio": "2.0.0", + "diff": "3.5.0", + "lodash.get": "4.4.2", + "lolex": "2.7.0", + "nise": "1.4.2", + "supports-color": "5.4.0", + "type-detect": "4.0.8" }, "dependencies": { "supports-color": { @@ -5707,7 +7342,7 @@ "integrity": "sha512-zjaXglF5nnWpsq470jSv6P9DwPvgLkuapYmfDm3JWOm0vkNTVF2tI4UrN2r6jH1qM/uc/WtxYY1hYoA2dOKj5w==", "dev": true, "requires": { - "has-flag": "^3.0.0" + "has-flag": "3.0.0" } } } @@ -5724,14 +7359,14 @@ "integrity": "sha512-FtyOnWN/wCHTVXOMwvSv26d+ko5vWlIDD6zoUJ7LW8vh+ZBC8QdljveRP+crNrtBwioEUWy/4dMtbBjA4ioNlg==", "dev": true, "requires": { - "base": "^0.11.1", - "debug": "^2.2.0", - "define-property": "^0.2.5", - "extend-shallow": "^2.0.1", - "map-cache": "^0.2.2", - "source-map": "^0.5.6", - "source-map-resolve": "^0.5.0", - "use": "^3.1.0" + "base": "0.11.2", + "debug": "2.6.9", + "define-property": "0.2.5", + "extend-shallow": "2.0.1", + "map-cache": "0.2.2", + "source-map": "0.5.7", + "source-map-resolve": "0.5.2", + "use": "3.1.0" }, "dependencies": { "define-property": { @@ -5740,7 +7375,7 @@ "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=", "dev": true, "requires": { - "is-descriptor": "^0.1.0" + "is-descriptor": "0.1.6" } }, "extend-shallow": { @@ -5749,7 +7384,7 @@ "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", "dev": true, "requires": { - "is-extendable": "^0.1.0" + "is-extendable": "0.1.1" } } } @@ -5760,9 +7395,9 @@ "integrity": "sha512-O27l4xaMYt/RSQ5TR3vpWCAB5Kb/czIcqUFOM/C4fYcLnbZUc1PkjTAMjof2pBWaSTwOUd6qUHcFGVGj7aIwnw==", "dev": true, "requires": { - "define-property": "^1.0.0", - "isobject": "^3.0.0", - "snapdragon-util": "^3.0.1" + "define-property": "1.0.0", + "isobject": "3.0.1", + "snapdragon-util": "3.0.1" }, "dependencies": { "define-property": { @@ -5771,7 +7406,7 @@ "integrity": "sha1-dp66rz9KY6rTr56NMEybvnm/sOY=", "dev": true, "requires": { - "is-descriptor": "^1.0.0" + "is-descriptor": "1.0.2" } }, "is-accessor-descriptor": { @@ -5780,7 +7415,7 @@ "integrity": "sha512-m5hnHTkcVsPfqx3AKlyttIPb7J+XykHvJP2B9bZDjlhLIoEq4XoK64Vg7boZlVWYK6LUY94dYPEE7Lh0ZkZKcQ==", "dev": true, "requires": { - "kind-of": "^6.0.0" + "kind-of": "6.0.2" } }, "is-data-descriptor": { @@ -5789,7 +7424,7 @@ "integrity": "sha512-jbRXy1FmtAoCjQkVmIVYwuuqDFUbaOeDjmed1tOGPrsMhtJA4rD9tkgA0F1qJ3gRFRXcHYVkdeaP50Q5rE/jLQ==", "dev": true, "requires": { - "kind-of": "^6.0.0" + "kind-of": "6.0.2" } }, "is-descriptor": { @@ -5798,9 +7433,9 @@ "integrity": "sha512-2eis5WqQGV7peooDyLmNEPUrps9+SXX5c9pL3xEB+4e9HnGuDa7mB7kHxHw4CbqS9k1T2hOH3miL8n8WtiYVtg==", "dev": true, "requires": { - "is-accessor-descriptor": "^1.0.0", - "is-data-descriptor": "^1.0.0", - "kind-of": "^6.0.2" + "is-accessor-descriptor": "1.0.0", + "is-data-descriptor": "1.0.0", + "kind-of": "6.0.2" } }, "isobject": { @@ -5823,7 +7458,7 @@ "integrity": "sha512-mbKkMdQKsjX4BAL4bRYTj21edOf8cN7XHdYUJEe+Zn99hVEYcMvKPct1IqNe7+AZPirn8BCDOQBHQZknqmKlZQ==", "dev": true, "requires": { - "kind-of": "^3.2.0" + "kind-of": "3.2.2" } }, "sntp": { @@ -5832,7 +7467,7 @@ "integrity": "sha1-ZUEYTMkK7qbG57NeJlkIJEPGYZg=", "dev": true, "requires": { - "hoek": "2.x.x" + "hoek": "2.16.3" } }, "socket.io": { @@ -5841,12 +7476,12 @@ "integrity": "sha512-rORqq9c+7W0DAK3cleWNSyfv/qKXV99hV4tZe+gGLfBECw3XEhBy7x85F3wypA9688LKjtwO9pX9L33/xQI8yA==", "dev": true, "requires": { - "debug": "~3.1.0", - "engine.io": "~3.2.0", - "has-binary2": "~1.0.2", - "socket.io-adapter": "~1.1.0", + "debug": "3.1.0", + "engine.io": "3.2.0", + "has-binary2": "1.0.3", + "socket.io-adapter": "1.1.1", "socket.io-client": "2.1.1", - "socket.io-parser": "~3.2.0" + "socket.io-parser": "3.2.0" }, "dependencies": { "debug": { @@ -5866,14 +7501,14 @@ "requires": { "component-emitter": "1.2.1", "component-inherit": "0.0.3", - "debug": "~3.1.0", - "engine.io-parser": "~2.1.1", + "debug": "3.1.0", + "engine.io-parser": "2.1.2", "has-cors": "1.1.0", "indexof": "0.0.1", "parseqs": "0.0.5", "parseuri": "0.0.5", - "ws": "~3.3.1", - "xmlhttprequest-ssl": "~1.5.4", + "ws": "3.3.3", + "xmlhttprequest-ssl": "1.5.5", "yeast": "0.1.2" } }, @@ -5887,15 +7522,15 @@ "base64-arraybuffer": "0.1.5", "component-bind": "1.0.0", "component-emitter": "1.2.1", - "debug": "~3.1.0", - "engine.io-client": "~3.2.0", - "has-binary2": "~1.0.2", + "debug": "3.1.0", + "engine.io-client": "3.2.1", + "has-binary2": "1.0.3", "has-cors": "1.1.0", "indexof": "0.0.1", "object-component": "0.0.3", "parseqs": "0.0.5", "parseuri": "0.0.5", - "socket.io-parser": "~3.2.0", + "socket.io-parser": "3.2.0", "to-array": "0.1.4" } }, @@ -5906,7 +7541,7 @@ "dev": true, "requires": { "component-emitter": "1.2.1", - "debug": "~3.1.0", + "debug": "3.1.0", "isarray": "2.0.1" } } @@ -5928,14 +7563,14 @@ "base64-arraybuffer": "0.1.5", "component-bind": "1.0.0", "component-emitter": "1.2.1", - "debug": "~2.6.4", - "engine.io-client": "~3.1.0", + "debug": "2.6.9", + "engine.io-client": "3.1.6", "has-cors": "1.1.0", "indexof": "0.0.1", "object-component": "0.0.3", "parseqs": "0.0.5", "parseuri": "0.0.5", - "socket.io-parser": "~3.1.1", + "socket.io-parser": "3.1.3", "to-array": "0.1.4" } }, @@ -5946,8 +7581,8 @@ "dev": true, "requires": { "component-emitter": "1.2.1", - "debug": "~3.1.0", - "has-binary2": "~1.0.2", + "debug": "3.1.0", + "has-binary2": "1.0.3", "isarray": "2.0.1" }, "dependencies": { @@ -5962,6 +7597,15 @@ } } }, + "sort-keys": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/sort-keys/-/sort-keys-1.1.2.tgz", + "integrity": "sha1-RBttTTRnmPG05J6JIK37oOVD+a0=", + "dev": true, + "requires": { + "is-plain-obj": "1.1.0" + } + }, "source-map": { "version": "0.5.7", "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.5.7.tgz", @@ -5974,11 +7618,11 @@ "integrity": "sha512-MjqsvNwyz1s0k81Goz/9vRBe9SZdB09Bdw+/zYyO+3CuPk6fouTaxscHkgtE8jKvf01kVfl8riHzERQ/kefaSA==", "dev": true, "requires": { - "atob": "^2.1.1", - "decode-uri-component": "^0.2.0", - "resolve-url": "^0.2.1", - "source-map-url": "^0.4.0", - "urix": "^0.1.0" + "atob": "2.1.1", + "decode-uri-component": "0.2.0", + "resolve-url": "0.2.1", + "source-map-url": "0.4.0", + "urix": "0.1.0" } }, "source-map-url": { @@ -5999,8 +7643,8 @@ "integrity": "sha512-N19o9z5cEyc8yQQPukRCZ9EUmb4HUpnrmaL/fxS2pBo2jbfcFRVuFZ/oFC+vZz0MNNk0h80iMn5/S6qGZOL5+g==", "dev": true, "requires": { - "spdx-expression-parse": "^3.0.0", - "spdx-license-ids": "^3.0.0" + "spdx-expression-parse": "3.0.0", + "spdx-license-ids": "3.0.0" } }, "spdx-exceptions": { @@ -6015,8 +7659,8 @@ "integrity": "sha512-Yg6D3XpRD4kkOmTpdgbUiEJFKghJH03fiC1OPll5h/0sO6neh2jqRDVHOQ4o/LMea0tgCkbMgea5ip/e+MkWyg==", "dev": true, "requires": { - "spdx-exceptions": "^2.1.0", - "spdx-license-ids": "^3.0.0" + "spdx-exceptions": "2.1.0", + "spdx-license-ids": "3.0.0" } }, "spdx-license-ids": { @@ -6031,7 +7675,7 @@ "integrity": "sha512-NzNVhJDYpwceVVii8/Hu6DKfD2G+NrQHlS/V/qgv763EYudVwEcMQNxd2lh+0VrUByXN/oJkl5grOhYWvQUYiw==", "dev": true, "requires": { - "extend-shallow": "^3.0.0" + "extend-shallow": "3.0.2" } }, "sprintf-js": { @@ -6046,15 +7690,15 @@ "integrity": "sha1-xvxhZIo9nE52T9P8306hBeSSupg=", "dev": true, "requires": { - "asn1": "~0.2.3", - "assert-plus": "^1.0.0", - "bcrypt-pbkdf": "^1.0.0", - "dashdash": "^1.12.0", - "ecc-jsbn": "~0.1.1", - "getpass": "^0.1.1", - "jsbn": "~0.1.0", - "safer-buffer": "^2.0.2", - "tweetnacl": "~0.14.0" + "asn1": "0.2.3", + "assert-plus": "1.0.0", + "bcrypt-pbkdf": "1.0.1", + "dashdash": "1.14.1", + "ecc-jsbn": "0.1.1", + "getpass": "0.1.7", + "jsbn": "0.1.1", + "safer-buffer": "2.1.2", + "tweetnacl": "0.14.5" }, "dependencies": { "assert-plus": { @@ -6071,8 +7715,8 @@ "integrity": "sha1-YICcOcv/VTNyJv1eC1IPNB8ftcY=", "dev": true, "requires": { - "define-property": "^0.2.5", - "object-copy": "^0.1.0" + "define-property": "0.2.5", + "object-copy": "0.1.0" }, "dependencies": { "define-property": { @@ -6081,7 +7725,7 @@ "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=", "dev": true, "requires": { - "is-descriptor": "^0.1.0" + "is-descriptor": "0.1.6" } } } @@ -6098,7 +7742,7 @@ "integrity": "sha1-osfIWH5U2UJ+qe2zrD8s1SLfN4s=", "dev": true, "requires": { - "readable-stream": "^2.0.1" + "readable-stream": "2.3.6" } }, "stream-combiner2": { @@ -6107,8 +7751,8 @@ "integrity": "sha1-+02KFCDqNidk4hrUeAOXvry0HL4=", "dev": true, "requires": { - "duplexer2": "~0.1.0", - "readable-stream": "^2.0.2" + "duplexer2": "0.1.4", + "readable-stream": "2.3.6" }, "dependencies": { "duplexer2": { @@ -6117,7 +7761,7 @@ "integrity": "sha1-ixLauHjA1p4+eJEFFmKjL8a93ME=", "dev": true, "requires": { - "readable-stream": "^2.0.2" + "readable-stream": "2.3.6" } } } @@ -6140,8 +7784,8 @@ "integrity": "sha1-rdV8jXzHOoFjDTHNVdOWHPr7qcM=", "dev": true, "requires": { - "commander": "^2.2.0", - "limiter": "^1.0.5" + "commander": "2.15.1", + "limiter": "1.1.3" } }, "streamqueue": { @@ -6150,7 +7794,7 @@ "integrity": "sha1-ZvX17JTpuK8knkrsLdH3Qb/pTeM=", "dev": true, "requires": { - "readable-stream": "^1.0.26-2" + "readable-stream": "1.1.14" }, "dependencies": { "isarray": { @@ -6165,10 +7809,10 @@ "integrity": "sha1-fPTFTvZI44EwhMY23SB54WbAgdk=", "dev": true, "requires": { - "core-util-is": "~1.0.0", - "inherits": "~2.0.1", + "core-util-is": "1.0.2", + "inherits": "2.0.3", "isarray": "0.0.1", - "string_decoder": "~0.10.x" + "string_decoder": "0.10.31" } }, "string_decoder": { @@ -6179,15 +7823,21 @@ } } }, + "strict-uri-encode": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/strict-uri-encode/-/strict-uri-encode-1.1.0.tgz", + "integrity": "sha1-J5siXfHVgrH1TmWt3UNS4Y+qBxM=", + "dev": true + }, "string-width": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/string-width/-/string-width-1.0.2.tgz", "integrity": "sha1-EYvfW4zcUaKn5w0hHgfisLmxB9M=", "dev": true, "requires": { - "code-point-at": "^1.0.0", - "is-fullwidth-code-point": "^1.0.0", - "strip-ansi": "^3.0.0" + "code-point-at": "1.1.0", + "is-fullwidth-code-point": "1.0.0", + "strip-ansi": "3.0.1" } }, "string_decoder": { @@ -6196,7 +7846,7 @@ "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", "dev": true, "requires": { - "safe-buffer": "~5.1.0" + "safe-buffer": "5.1.2" } }, "stringstream": { @@ -6211,7 +7861,7 @@ "integrity": "sha1-ajhfuIU9lS1f8F0Oiq+UJ43GPc8=", "dev": true, "requires": { - "ansi-regex": "^2.0.0" + "ansi-regex": "2.1.1" } }, "strip-bom": { @@ -6220,16 +7870,22 @@ "integrity": "sha1-YhmoVhZSBJHzV4i9vxRHqZx+aw4=", "dev": true, "requires": { - "is-utf8": "^0.2.0" + "is-utf8": "0.2.1" } }, + "strip-bom-string": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/strip-bom-string/-/strip-bom-string-1.0.0.tgz", + "integrity": "sha1-5SEekiQ2n7uB1jOi8ABE3IztrZI=", + "dev": true + }, "strip-indent": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/strip-indent/-/strip-indent-1.0.1.tgz", "integrity": "sha1-DHlipq3vp7vUrDZkYKY4VSrhoKI=", "dev": true, "requires": { - "get-stdin": "^4.0.1" + "get-stdin": "4.0.1" } }, "strong-data-uri": { @@ -6238,7 +7894,7 @@ "integrity": "sha512-zhzBZev0uhT2IrFUerenXhfaE0vFUYwAZsnG0gIKGpfM/Gi6jOUQ3cmcvyTsXeDLIPiTubHESeO7EbD6FoPmzw==", "dev": true, "requires": { - "truncate": "^2.0.1" + "truncate": "2.0.1" } }, "supports-color": { @@ -6253,13 +7909,13 @@ "integrity": "sha1-n1dyQTlSE1xv779Ar+ak+qiLS7U=", "dev": true, "requires": { - "coa": "~1.0.1", - "colors": "~1.1.2", - "csso": "~2.3.1", - "js-yaml": "~3.7.0", - "mkdirp": "~0.5.1", - "sax": "~1.2.1", - "whet.extend": "~0.9.9" + "coa": "1.0.4", + "colors": "1.1.2", + "csso": "2.3.2", + "js-yaml": "3.7.0", + "mkdirp": "0.5.1", + "sax": "1.2.4", + "whet.extend": "0.9.9" } }, "tar": { @@ -6268,9 +7924,9 @@ "integrity": "sha1-jk0qJWwOIYXGsYrWlK7JaLg8sdE=", "dev": true, "requires": { - "block-stream": "*", - "fstream": "^1.0.2", - "inherits": "2" + "block-stream": "0.0.9", + "fstream": "1.0.11", + "inherits": "2.0.3" } }, "ternary-stream": { @@ -6279,10 +7935,10 @@ "integrity": "sha1-Bk5Im0tb9gumpre8fy9cJ07Pgmk=", "dev": true, "requires": { - "duplexify": "^3.5.0", - "fork-stream": "^0.0.4", - "merge-stream": "^1.0.0", - "through2": "^2.0.1" + "duplexify": "3.6.0", + "fork-stream": "0.0.4", + "merge-stream": "1.0.1", + "through2": "2.0.3" } }, "text-encoding": { @@ -6297,8 +7953,8 @@ "integrity": "sha1-OORBT8ZJd9h6/apy+sttKfgve1s=", "dev": true, "requires": { - "chalk": "^1.1.1", - "object-path": "^0.9.0" + "chalk": "1.1.3", + "object-path": "0.9.2" } }, "through2": { @@ -6307,8 +7963,8 @@ "integrity": "sha1-AARWmzfHx0ujnEPzzteNGtlBQL4=", "dev": true, "requires": { - "readable-stream": "^2.1.5", - "xtend": "~4.0.1" + "readable-stream": "2.3.6", + "xtend": "4.0.1" } }, "tildify": { @@ -6317,7 +7973,7 @@ "integrity": "sha1-3OwD9V3Km3qj5bBPIYF+tW5jWIo=", "dev": true, "requires": { - "os-homedir": "^1.0.0" + "os-homedir": "1.0.2" } }, "time-stamp": { @@ -6326,6 +7982,16 @@ "integrity": "sha1-dkpaEa9QVhkhsTPztE5hhofg9cM=", "dev": true }, + "timers-ext": { + "version": "0.1.7", + "resolved": "https://registry.npmjs.org/timers-ext/-/timers-ext-0.1.7.tgz", + "integrity": "sha512-b85NUNzTSdodShTIbky6ZF02e8STtVVfD+fu4aXXShEELpozH+bCpJLYMPZbsABN2wDH7fJpqIoXxJpzbf0NqQ==", + "dev": true, + "requires": { + "es5-ext": "0.10.61", + "next-tick": "1.1.0" + } + }, "to-array": { "version": "0.1.4", "resolved": "https://registry.npmjs.org/to-array/-/to-array-0.1.4.tgz", @@ -6338,7 +8004,7 @@ "integrity": "sha1-KXWIt7Dn4KwI4E5nL4XB9JmeF68=", "dev": true, "requires": { - "kind-of": "^3.0.2" + "kind-of": "3.2.2" } }, "to-regex": { @@ -6347,10 +8013,10 @@ "integrity": "sha512-FWtleNAtZ/Ki2qtqej2CXTOayOH9bHDQF+Q48VpWyDXjbYxA4Yz8iDB31zXOBUlOHHKidDbqGVrTUvQMPmBGBw==", "dev": true, "requires": { - "define-property": "^2.0.2", - "extend-shallow": "^3.0.2", - "regex-not": "^1.0.2", - "safe-regex": "^1.1.0" + "define-property": "2.0.2", + "extend-shallow": "3.0.2", + "regex-not": "1.0.2", + "safe-regex": "1.1.0" } }, "to-regex-range": { @@ -6359,8 +8025,8 @@ "integrity": "sha1-fIDBe53+vlmeJzZ+DU3VWQFB2zg=", "dev": true, "requires": { - "is-number": "^3.0.0", - "repeat-string": "^1.6.1" + "is-number": "3.0.0", + "repeat-string": "1.6.1" }, "dependencies": { "is-number": { @@ -6369,7 +8035,7 @@ "integrity": "sha1-JP1iAaR4LPUFYcgQJ2r8fRLXEZU=", "dev": true, "requires": { - "kind-of": "^3.0.2" + "kind-of": "3.2.2" } } } @@ -6380,7 +8046,7 @@ "integrity": "sha512-TZ6TTfI5NtZnuyy/Kecv+CnoROnyXn2DN97LontgQpCwsX2XyLYCC0ENhYkehSOwAp8rTQKc/NUIF7BkQ5rKLA==", "dev": true, "requires": { - "punycode": "^1.4.1" + "punycode": "1.4.1" } }, "trim-newlines": { @@ -6395,7 +8061,7 @@ "integrity": "sha1-fskRMJJHZsf1c74wIMNPj9/QDWI=", "dev": true, "requires": { - "glob": "^6.0.4" + "glob": "6.0.4" }, "dependencies": { "glob": { @@ -6404,11 +8070,11 @@ "integrity": "sha1-DwiGD2oVUSey+t1PnOJLGqtuTSI=", "dev": true, "requires": { - "inflight": "^1.0.4", - "inherits": "2", - "minimatch": "2 || 3", - "once": "^1.3.0", - "path-is-absolute": "^1.0.0" + "inflight": "1.0.6", + "inherits": "2.0.3", + "minimatch": "3.0.4", + "once": "1.3.3", + "path-is-absolute": "1.0.1" } } } @@ -6432,6 +8098,12 @@ "dev": true, "optional": true }, + "type": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/type/-/type-1.2.0.tgz", + "integrity": "sha512-+5nt5AAniqsCnu2cEQQdpzCAh33kVx8n0VoFidKpB1dVVLAN/F+bgVOqOJqOnEnrhp222clB5p3vUlD+1QAnfg==", + "dev": true + }, "type-detect": { "version": "4.0.8", "resolved": "https://registry.npmjs.org/type-detect/-/type-detect-4.0.8.tgz", @@ -6450,8 +8122,8 @@ "integrity": "sha512-/kVQDzwiE9Vy7Y63eMkMozF4jIt0C2+xHctF9YpqNWdE/NLOuMurshkpoYGUlAbeYhACPv0HJPIHJul0Ak4/uw==", "dev": true, "requires": { - "commander": "~2.15.0", - "source-map": "~0.6.1" + "commander": "2.15.1", + "source-map": "0.6.1" }, "dependencies": { "source-map": { @@ -6480,10 +8152,10 @@ "integrity": "sha1-XHHDTLW61dzr4+oM0IIHulqhrqQ=", "dev": true, "requires": { - "arr-union": "^3.1.0", - "get-value": "^2.0.6", - "is-extendable": "^0.1.1", - "set-value": "^0.4.3" + "arr-union": "3.1.0", + "get-value": "2.0.6", + "is-extendable": "0.1.1", + "set-value": "0.4.3" }, "dependencies": { "extend-shallow": { @@ -6492,7 +8164,7 @@ "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", "dev": true, "requires": { - "is-extendable": "^0.1.0" + "is-extendable": "0.1.1" } }, "set-value": { @@ -6501,14 +8173,26 @@ "integrity": "sha1-fbCPnT0i3H945Trzw79GZuzfzPE=", "dev": true, "requires": { - "extend-shallow": "^2.0.1", - "is-extendable": "^0.1.1", - "is-plain-object": "^2.0.1", - "to-object-path": "^0.3.0" + "extend-shallow": "2.0.1", + "is-extendable": "0.1.1", + "is-plain-object": "2.0.4", + "to-object-path": "0.3.0" } } } }, + "uniq": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/uniq/-/uniq-1.0.1.tgz", + "integrity": "sha1-sxxa6CVIRKOoKBVBzisEuGWnNP8=", + "dev": true + }, + "uniqs": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/uniqs/-/uniqs-2.0.0.tgz", + "integrity": "sha1-/+3ks2slKQaW5uFl1KWe25mOawI=", + "dev": true + }, "unique-stream": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/unique-stream/-/unique-stream-1.0.0.tgz", @@ -6533,8 +8217,8 @@ "integrity": "sha1-g3aHP30jNRef+x5vw6jtDfyKtVk=", "dev": true, "requires": { - "has-value": "^0.3.1", - "isobject": "^3.0.0" + "has-value": "0.3.1", + "isobject": "3.0.1" }, "dependencies": { "has-value": { @@ -6543,9 +8227,9 @@ "integrity": "sha1-ex9YutpiyoJ+wKIHgCVlSEWZXh8=", "dev": true, "requires": { - "get-value": "^2.0.3", - "has-values": "^0.1.4", - "isobject": "^2.0.0" + "get-value": "2.0.6", + "has-values": "0.1.4", + "isobject": "2.1.0" }, "dependencies": { "isobject": { @@ -6591,7 +8275,7 @@ "integrity": "sha512-6UJEQM/L+mzC3ZJNM56Q4DFGLX/evKGRg15UJHGB9X5j5Z3AFbgZvjUh2yq/UJUY4U5dh7Fal++XbNg1uzpRAw==", "dev": true, "requires": { - "kind-of": "^6.0.2" + "kind-of": "6.0.2" }, "dependencies": { "kind-of": { @@ -6632,7 +8316,7 @@ "integrity": "sha1-qrGh+jDUX4jdMhFIh1rALAtV5bQ=", "dev": true, "requires": { - "user-home": "^1.1.1" + "user-home": "1.1.1" } }, "validate-npm-package-license": { @@ -6641,19 +8325,25 @@ "integrity": "sha512-63ZOUnL4SIXj4L0NixR3L1lcjO38crAbgrTpl28t8jjrfuiOBL5Iygm+60qPs/KsZGzPNg6Smnc/oY16QTjF0g==", "dev": true, "requires": { - "spdx-correct": "^3.0.0", - "spdx-expression-parse": "^3.0.0" + "spdx-correct": "3.0.0", + "spdx-expression-parse": "3.0.0" } }, + "vendors": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/vendors/-/vendors-1.0.4.tgz", + "integrity": "sha512-/juG65kTL4Cy2su4P8HjtkTxk6VmJDiOPBufWniqQ6wknac6jNiXS9vU+hO3wgusiyqWlzTbVHi0dyJqRONg3w==", + "dev": true + }, "verror": { "version": "1.10.0", "resolved": "https://registry.npmjs.org/verror/-/verror-1.10.0.tgz", "integrity": "sha1-OhBcoXBTr1XW4nDB+CiGguGNpAA=", "dev": true, "requires": { - "assert-plus": "^1.0.0", + "assert-plus": "1.0.0", "core-util-is": "1.0.2", - "extsprintf": "^1.2.0" + "extsprintf": "1.3.0" }, "dependencies": { "assert-plus": { @@ -6670,8 +8360,8 @@ "integrity": "sha1-sEVbOPxeDPMNQyUTLkYZcMIJHN4=", "dev": true, "requires": { - "clone": "^1.0.0", - "clone-stats": "^0.0.1", + "clone": "1.0.4", + "clone-stats": "0.0.1", "replace-ext": "0.0.1" } }, @@ -6681,14 +8371,14 @@ "integrity": "sha1-mmhRzhysHBzqX+hsCTHWIMLPqeY=", "dev": true, "requires": { - "defaults": "^1.0.0", - "glob-stream": "^3.1.5", - "glob-watcher": "^0.0.6", - "graceful-fs": "^3.0.0", - "mkdirp": "^0.5.0", - "strip-bom": "^1.0.0", - "through2": "^0.6.1", - "vinyl": "^0.4.0" + "defaults": "1.0.3", + "glob-stream": "3.1.18", + "glob-watcher": "0.0.6", + "graceful-fs": "3.0.11", + "mkdirp": "0.5.1", + "strip-bom": "1.0.0", + "through2": "0.6.5", + "vinyl": "0.4.6" }, "dependencies": { "clone": { @@ -6703,7 +8393,7 @@ "integrity": "sha1-dhPHeKGv6mLyXGMKCG1/Osu92Bg=", "dev": true, "requires": { - "natives": "^1.1.0" + "natives": "1.1.4" } }, "isarray": { @@ -6718,10 +8408,10 @@ "integrity": "sha1-Elgg40vIQtLyqq+v5MKRbuMsFXw=", "dev": true, "requires": { - "core-util-is": "~1.0.0", - "inherits": "~2.0.1", + "core-util-is": "1.0.2", + "inherits": "2.0.3", "isarray": "0.0.1", - "string_decoder": "~0.10.x" + "string_decoder": "0.10.31" } }, "string_decoder": { @@ -6736,8 +8426,8 @@ "integrity": "sha1-hbiGLzhEtabV7IRnqTWYFzo295Q=", "dev": true, "requires": { - "first-chunk-stream": "^1.0.0", - "is-utf8": "^0.2.0" + "first-chunk-stream": "1.0.0", + "is-utf8": "0.2.1" } }, "through2": { @@ -6746,8 +8436,8 @@ "integrity": "sha1-QaucZ7KdVyCQcUEOHXp6lozTrUg=", "dev": true, "requires": { - "readable-stream": ">=1.0.33-1 <1.1.0-0", - "xtend": ">=4.0.0 <4.1.0-0" + "readable-stream": "1.0.34", + "xtend": "4.0.1" } }, "vinyl": { @@ -6756,8 +8446,8 @@ "integrity": "sha1-LzVsh6VQolVGHza76ypbqL94SEc=", "dev": true, "requires": { - "clone": "^0.2.0", - "clone-stats": "^0.0.1" + "clone": "0.2.0", + "clone-stats": "0.0.1" } } } @@ -6768,7 +8458,7 @@ "integrity": "sha1-q2VJ1h0XLCsbh75cUI0jnI74dwU=", "dev": true, "requires": { - "source-map": "^0.5.1" + "source-map": "0.5.7" } }, "whet.extend": { @@ -6783,7 +8473,7 @@ "integrity": "sha512-HxJdYWq1MTIQbJ3nw0cqssHoTNU267KlrDuGZ1WYlxDStUtKUhOaJmh112/TZmHxxUfuJqPXSOm7tDyas0OSIQ==", "dev": true, "requires": { - "isexe": "^2.0.0" + "isexe": "2.0.0" } }, "which-module": { @@ -6798,7 +8488,7 @@ "integrity": "sha512-QGkOQc8XL6Bt5PwnsExKBPuMKBxnGxWWW3fU55Xt4feHozMUhdUMaBCk290qpm/wG5u/RSKzwdAC4i51YigihA==", "dev": true, "requires": { - "string-width": "^1.0.2 || 2" + "string-width": "1.0.2" } }, "window-size": { @@ -6813,8 +8503,8 @@ "integrity": "sha1-2Pw9KE3QV5T+hJc8rs3Rz4JP3YU=", "dev": true, "requires": { - "string-width": "^1.0.1", - "strip-ansi": "^3.0.1" + "string-width": "1.0.2", + "strip-ansi": "3.0.1" } }, "wrappy": { @@ -6829,9 +8519,9 @@ "integrity": "sha512-nnWLa/NwZSt4KQJu51MYlCcSQ5g7INpOrOMt4XV8j4dqTXdmlUmSHQ8/oLC069ckre0fRsgfvsKwbTdtKLCDkA==", "dev": true, "requires": { - "async-limiter": "~1.0.0", - "safe-buffer": "~5.1.0", - "ultron": "~1.1.0" + "async-limiter": "1.0.0", + "safe-buffer": "5.1.2", + "ultron": "1.1.1" } }, "xmlhttprequest-ssl": { @@ -6864,20 +8554,20 @@ "integrity": "sha1-gW4ahm1VmMzzTlWW3c4i2S2kkNQ=", "dev": true, "requires": { - "camelcase": "^3.0.0", - "cliui": "^3.2.0", - "decamelize": "^1.1.1", - "get-caller-file": "^1.0.1", - "os-locale": "^1.4.0", - "read-pkg-up": "^1.0.1", - "require-directory": "^2.1.1", - "require-main-filename": "^1.0.1", - "set-blocking": "^2.0.0", - "string-width": "^1.0.2", - "which-module": "^1.0.0", - "window-size": "^0.2.0", - "y18n": "^3.2.1", - "yargs-parser": "^4.1.0" + "camelcase": "3.0.0", + "cliui": "3.2.0", + "decamelize": "1.2.0", + "get-caller-file": "1.0.2", + "os-locale": "1.4.0", + "read-pkg-up": "1.0.1", + "require-directory": "2.1.1", + "require-main-filename": "1.0.1", + "set-blocking": "2.0.0", + "string-width": "1.0.2", + "which-module": "1.0.0", + "window-size": "0.2.0", + "y18n": "3.2.1", + "yargs-parser": "4.2.1" } }, "yargs-parser": { @@ -6886,7 +8576,7 @@ "integrity": "sha1-KczqwNxPA8bIe0qfIX3RjJ90hxw=", "dev": true, "requires": { - "camelcase": "^3.0.0" + "camelcase": "3.0.0" } }, "yeast": { diff --git a/package.json b/package.json index 24936f81..8e012d49 100644 --- a/package.json +++ b/package.json @@ -17,10 +17,12 @@ "gulp-concat": "^2.6.0", "gulp-concat-util": "^0.5.5", "gulp-crass": "^0.2.2", + "gulp-cssnano": "^2.1.3", "gulp-insert": "^0.5.0", "gulp-plumber": "^1.2.0", "gulp-rename": "^1.2.2", "gulp-sass": "^4.0.1", + "gulp-sourcemaps": "^3.0.0", "gulp-uglify": "^3.0.0", "mocha": "^5.1.1", "run-sequence": "^2.2.1", diff --git a/public/quiz-create/css/enp_quiz-create.min.css b/public/quiz-create/css/enp_quiz-create.min.css index e060f9e7..c4c15874 100644 --- a/public/quiz-create/css/enp_quiz-create.min.css +++ b/public/quiz-create/css/enp_quiz-create.min.css @@ -1 +1,2 @@ -html{font-size:1pc!important}html #enp-quiz{box-sizing:border-box}body #enp-quiz{background:#fff;overflow:hidden}#enp-quiz *,#enp-quiz *:after,#enp-quiz *:before{box-sizing:inherit}#enp-quiz ol,#enp-quiz ul{margin:0 0 1.6rem 1.25rem;padding:0}#enp-quiz textarea{margin-bottom:1rem}#enp-quiz button,#enp-quiz button:active,#enp-quiz button:focus,#enp-quiz button:hover,#enp-quiz iframe,#enp-quiz input[type=button],#enp-quiz input[type=button]:active,#enp-quiz input[type=button]:focus,#enp-quiz input[type=button]:hover,#enp-quiz input[type=reset],#enp-quiz input[type=reset]:active,#enp-quiz input[type=reset]:focus,#enp-quiz input[type=reset]:hover,#enp-quiz input[type=submit],#enp-quiz input[type=submit]:active,#enp-quiz input[type=submit]:focus,#enp-quiz input[type=submit]:hover{border:0}#enp-quiz .enp-screen-reader-text{clip:rect(1px,1px,1px,1px);height:1px;left:-625pc;overflow:hidden;position:absolute!important;top:auto;width:1px}#enp-quiz .enp-screen-reader-text:active,#enp-quiz .enp-screen-reader-text:focus,#enp-quiz .enp-screen-reader-text:hover{background-color:#f1f1f1;border-radius:3px;box-shadow:0 0 2px 2px rgba(0,0,0,.6);clip:auto!important;color:#21759b;display:block;font-size:14px;font-weight:700;height:auto;left:5px;line-height:normal;padding:15px 23px 14px;text-decoration:none;top:5px;width:auto;z-index:100000}#enp-quiz .enp-accordion-header{background:#fff;border:0;border-radius:3px;box-shadow:inset 1px 1px 0 #ccc,inset -1px -1px 0 #ccc;color:#444;cursor:pointer;font-family:tablet-gothic,helvetica neue,helvetica,arial,sans-serif;font-size:.9rem;font-weight:400;letter-spacing:0;line-height:1.5;margin:1.6rem 0 0;min-height:3.065rem;padding:1rem 2rem 1rem 1rem;position:relative;text-align:left;text-transform:none;transition:all .2s cubic-bezier(0,0,.3,1);width:100%;z-index:9}#enp-quiz .enp-accordion-header:first-of-type{margin-top:0}#enp-quiz .enp-accordion-header .enp-accordion-header__icon{bottom:.75rem;fill:#666;position:absolute;right:.75rem;transition:all .35s cubic-bezier(0,0,.3,1)}#enp-quiz .enp-accordion-header--open .enp-accordion-header__icon{-webkit-transform:rotatex(180deg) translatey(2px);transform:rotatex(180deg) translatey(2px)}#enp-quiz .enp-accordion-content{background:#fff;box-shadow:inset 1px -1px 0 #ccc,inset -1px -1px 0 #ccc;display:block;height:auto;margin-bottom:1.6rem;overflow:visible;position:relative;width:100%}#enp-quiz .enp-accordion-content--closed{-webkit-animation:slideOutTop .25s cubic-bezier(0,0,.3,1) forwards;animation:slideOutTop .25s cubic-bezier(0,0,.3,1) forwards;display:none;margin-top:0;padding-top:0}#enp-quiz .enp-accordion-content--open{-webkit-animation:slideInTop .45s cubic-bezier(0,0,.3,1) forwards;animation:slideInTop .45s cubic-bezier(0,0,.3,1) forwards;margin-bottom:2rem;padding-top:1.6rem}#enp-quiz .enp-quiz-message{background:#fff;border:1px solid #eee;border-bottom:1px solid #ccc;bottom:0;left:0;margin-bottom:1.6rem;margin-left:auto;margin-right:auto;max-width:32pc;padding:1rem .375rem;position:fixed}#enp-quiz .enp-quiz-message:after{clear:both;content:"";display:table}#enp-quiz .enp-quiz-message__title{font-size:1.5rem;text-transform:uppercase}#enp-quiz .enp-message__list{font-size:1.1rem;list-style:none;margin-bottom:0;margin-left:0}#enp-quiz .enp-quiz-message--error{border-left:6px solid #bf5700;color:#bf5700}#enp-quiz .enp-quiz-message__title--error{color:#964400}#enp-quiz .enp-quiz-message--success{border-left:6px solid #3bb275;color:#319461}#enp-quiz .enp-quiz-message__title--success{color:#319461}#enp-quiz .enp-quiz-message--note{border-left:6px solid #cca562}#enp-quiz .enp-quiz-message__title--note{color:#242f42}#enp-quiz .enp-quiz-message__close{background:0;border:0;box-shadow:none;margin:0;padding:0;position:absolute;right:5px;top:5px}#enp-quiz .enp-quiz-message--ajax{-webkit-animation:slideInBottom .3s;animation:slideInBottom .3s;margin-bottom:.6rem}#enp-quiz .enp-quiz-message-ajax-container{bottom:10px;position:fixed;z-index:9999}#enp-quiz .enp-quiz-message--saving__spinner{margin-left:-10px}#enp-quiz .enp-quiz-message--saving__text{font-size:1rem}#enp-quiz input.limited-chars,#enp-quiz textarea.limited-chars{margin-bottom:.2rem}#enp-quiz .limited-chars__container{color:#7a7a7a;display:block;font-size:.8rem;margin-bottom:1.2rem;text-align:right}#enp-quiz .limited-chars__counter{color:#666}#enp-quiz .limited-chars__container--error,#enp-quiz .limited-chars__container--error .limited-chars__counter{color:#964400}#enp-quiz input.has-error,#enp-quiz textarea.has-error{border:1px solid #bf5700}#enp-quiz input.has-error:focus,#enp-quiz textarea.has-error:focus{outline-color:#bf5700}#enp-quiz .enp-tooltip{position:relative}#enp-quiz .enp-tooltip__activator:focus+.enp-tooltip__description,#enp-quiz .enp-tooltip__activator:focus>.enp-tooltip__description{display:block}#enp-quiz .enp-tooltip__description{background:#f5f5f5;border-radius:3px;display:none;font-size:.9rem;left:103%;margin-bottom:2rem;max-width:200px;padding:.9rem;position:absolute}.enp-sticky{left:0;position:relative;right:0;top:0;z-index:999}.enp-sticky.enp-sticky--fixed{position:fixed}.enp-breadcrumb-link__container{background-color:#fff}.enp-breadcrumb-link{font-size:.85rem}.enp-breadcrumb-link__icon{left:.4rem;position:relative;top:.45rem}body #enp-quiz{color:#444;font-family:tablet-gothic,helvetica neue,helvetica,arial,sans-serif;font-size:1em;font-weight:400;line-height:1.6}@media(min-width:700px){body #enp-quiz{font-size:1.3em}}#enp-quiz h1,#enp-quiz h2,#enp-quiz h3,#enp-quiz h4,#enp-quiz h5,#enp-quiz h6{clear:both;color:#5d5e5f;font-family:tablet-gothic,helvetica neue,helvetica,arial,sans-serif;font-weight:700;line-height:1.2em;margin:0 0 .2rem}#enp-quiz h1{font-size:2em}#enp-quiz h2{font-size:1.75em}#enp-quiz h3{font-size:1.475em}#enp-quiz h4{font-size:1.3em}#enp-quiz h5{font-size:1.125em}#enp-quiz h6{font-size:1em}#enp-quiz p+h1,#enp-quiz p+h2,#enp-quiz p+h3,#enp-quiz p+h4,#enp-quiz p+h5,#enp-quiz p+h6,#enp-quiz ul+h1,#enp-quiz ul+h2,#enp-quiz ul+h3,#enp-quiz ul+h4,#enp-quiz ul+h5,#enp-quiz ul+h6{margin-top:1.8em}#enp-quiz p{font-size:.85em;font-weight:300;margin-bottom:1.125em}#enp-quiz ol,#enp-quiz ul{margin:0 0 1.6em 1.25em}#enp-quiz ul{list-style:disc}#enp-quiz ol{list-style:decimal}#enp-quiz li>ol,#enp-quiz li>ul{margin-bottom:0;margin-left:1.6em}#enp-quiz b,#enp-quiz strong{font-weight:700}#enp-quiz cite,#enp-quiz dfn,#enp-quiz em{font-family:georgia,times,serif;font-style:italic}#enp-quiz pre{background:#eee;font-family:Courier\ 10 Pitch,Courier,monospace;font-size:.95em;line-height:1.6;margin-bottom:1.6em;max-width:100%;overflow:auto;padding:1.6em}#enp-quiz .code,#enp-quiz code,#enp-quiz kbd,#enp-quiz tt,#enp-quiz var{font:.7em Monaco,Consolas,"Andale Mono","DejaVu Sans Mono",monospace}#enp-quiz table{border:0}#enp-quiz table th{border:0;border-bottom:1px solid #ddd;font-family:tablet-gothic,helvetica neue,helvetica,arial,sans-serif;font-size:.8rem;text-transform:uppercase}#enp-quiz table td{border:0;border-bottom:1px solid #eee;font-family:tablet-gothic,helvetica neue,helvetica,arial,sans-serif;font-size:1rem}#enp-quiz table tr:nth-child(even) td{background:#f8f8f8}#enp-quiz table tr:last-child td{border-bottom:0}#enp-quiz figure{margin:0}#enp-quiz img{height:auto;max-width:100%}#enp-quiz a{color:#333f48;text-decoration:none;touch-action:manipulation;transition:color .2s}#enp-quiz a .enp-icon{fill:#333f48}#enp-quiz a:active,#enp-quiz a:focus,#enp-quiz a:hover{color:#222a30}#enp-quiz a:active .enp-icon,#enp-quiz a:focus .enp-icon,#enp-quiz a:hover .enp-icon{fill:#222a30}#enp-quiz button:focus{outline-color:#4d90fe;outline-offset:-2px;outline-style:auto;outline-width:5px}#enp-quiz .enp-btn{background:#333f48;border:0;border-radius:3px;box-shadow:inset 0 -2px 0 rgba(0,0,0,.2);color:#fff;cursor:pointer;font-size:15px;font-weight:400;letter-spacing:.05em;line-height:1.6;padding:.85em 1.4em .75em;text-align:center;text-transform:uppercase;transition:all .2s}#enp-quiz .enp-btn:focus,#enp-quiz .enp-btn:hover{background:#222a30;box-shadow:none;color:#fff}#enp-quiz .enp-btn:active{background:#5d7384;box-shadow:inset 0 2px 0 rgba(0,0,0,.1);color:#fff}#enp-quiz .enp-btn:focus{outline-color:#4d90fe;outline-offset:-2px;outline-style:auto;outline-width:5px}#enp-quiz .enp-btn:disabled,#enp-quiz .enp-btn:disabled:focus,#enp-quiz .enp-btn:disabled:hover{background:#333f48;cursor:default;opacity:.5}#enp-quiz .enp-btn--add{background:0;border:3px dashed #666;border-radius:3px;box-shadow:none;color:#545454;cursor:pointer;font-size:15px;font-weight:400;letter-spacing:.05em;line-height:1.6;padding:.85em 1.4em .75em;text-align:center;text-transform:uppercase;transition:all .2s;width:100%}#enp-quiz .enp-btn--add:focus,#enp-quiz .enp-btn--add:hover{background:#222a30;box-shadow:none;color:#fff}#enp-quiz .enp-btn--add:active{background:#5d7384;box-shadow:inset 0 2px 0 rgba(0,0,0,.1);color:#fff}#enp-quiz .enp-btn--add:focus{outline-color:#4d90fe;outline-offset:-2px;outline-style:auto;outline-width:5px}#enp-quiz .enp-btn--add:disabled,#enp-quiz .enp-btn--add:disabled:focus,#enp-quiz .enp-btn--add:disabled:hover{background:#333f48;cursor:default;opacity:.5}#enp-quiz .enp-btn--add:focus,#enp-quiz .enp-btn--add:hover{background:hsla(0,0%,100%,.9);border:3px dashed #444;color:#444}#enp-quiz .enp-btn--disabled{cursor:default;opacity:.65}#enp-quiz .enp-btn--enabled{-webkit-animation:expand .6s;animation:expand .6s}#enp-quiz .enp-icon{height:24px;transition:all .2s;width:24px}#enp-quiz .enp-page-title{font-size:1.6rem}@-webkit-keyframes slideInBottom{0%{-webkit-transform:translate3d(0,75pt,0);opacity:0;transform:translate3d(0,75pt,0)}to{-webkit-transform:translate3d(0,0,0);opacity:1;transform:translate3d(0,0,0)}}@keyframes slideInBottom{0%{-webkit-transform:translate3d(0,75pt,0);opacity:0;transform:translate3d(0,75pt,0)}to{-webkit-transform:translate3d(0,0,0);opacity:1;transform:translate3d(0,0,0)}}@-webkit-keyframes slideInTop{0%{-webkit-transform:translate3d(0,-20px,0);height:auto;opacity:0;transform:translate3d(0,-20px,0)}to{-webkit-transform:translate3d(0,0,0);height:auto;opacity:1;transform:translate3d(0,0,0)}}@keyframes slideInTop{0%{-webkit-transform:translate3d(0,-20px,0);height:auto;opacity:0;transform:translate3d(0,-20px,0)}to{-webkit-transform:translate3d(0,0,0);height:auto;opacity:1;transform:translate3d(0,0,0)}}@-webkit-keyframes slideInTop--reduced-opacity{0%{-webkit-transform:translate3d(0,-20px,0);height:auto;opacity:0;transform:translate3d(0,-20px,0)}to{-webkit-transform:translate3d(0,0,0);height:auto;opacity:.8;transform:translate3d(0,0,0)}}@keyframes slideInTop--reduced-opacity{0%{-webkit-transform:translate3d(0,-20px,0);height:auto;opacity:0;transform:translate3d(0,-20px,0)}to{-webkit-transform:translate3d(0,0,0);height:auto;opacity:.8;transform:translate3d(0,0,0)}}@-webkit-keyframes slideOutTop{0%{-webkit-transform:translate3d(0,0,0);height:75pt;opacity:1;overflow:hidden;transform:translate3d(0,0,0)}to{-webkit-transform:translate3d(0,-20px,0);height:0;opacity:0;transform:translate3d(0,-20px,0)}}@keyframes slideOutTop{0%{-webkit-transform:translate3d(0,0,0);height:75pt;opacity:1;overflow:hidden;transform:translate3d(0,0,0)}to{-webkit-transform:translate3d(0,-20px,0);height:0;opacity:0;transform:translate3d(0,-20px,0)}}@-webkit-keyframes removeElement{0%{-webkit-transform:translate3d(0,0,0);opacity:1;transform:translate3d(0,0,0)}to{-webkit-transform:translate3d(-200px,0,0);height:0;margin:0;opacity:0;padding:0;transform:translate3d(-200px,0,0);z-index:-1}}@keyframes removeElement{0%{-webkit-transform:translate3d(0,0,0);opacity:1;transform:translate3d(0,0,0)}to{-webkit-transform:translate3d(-200px,0,0);height:0;margin:0;opacity:0;padding:0;transform:translate3d(-200px,0,0);z-index:-1}}@-webkit-keyframes removeAnswers{0%{-webkit-transform:translate3d(0,0,0);opacity:1;transform:translate3d(0,0,0)}to{-webkit-transform:translate3d(-200px,0,0);display:none;height:0;opacity:0;padding:0;transform:translate3d(-200px,0,0);z-index:-1}}@keyframes removeAnswers{0%{-webkit-transform:translate3d(0,0,0);opacity:1;transform:translate3d(0,0,0)}to{-webkit-transform:translate3d(-200px,0,0);display:none;height:0;opacity:0;padding:0;transform:translate3d(-200px,0,0);z-index:-1}}@-webkit-keyframes removeQuestion{0%{-webkit-transform:translatex(0);opacity:1;transform:translatex(0)}to{-webkit-transform:translatex(-200px);opacity:0;transform:translatex(-200px)}}@keyframes removeQuestion{0%{-webkit-transform:translatex(0);opacity:1;transform:translatex(0)}to{-webkit-transform:translatex(-200px);opacity:0;transform:translatex(-200px)}}@-webkit-keyframes showNextQuestion{0%{-webkit-transform:translatex(200px);opacity:0;transform:translatex(200px)}to{-webkit-transform:translatex(0);opacity:1;transform:translatex(0)}}@keyframes showNextQuestion{0%{-webkit-transform:translatex(200px);opacity:0;transform:translatex(200px)}to{-webkit-transform:translatex(0);opacity:1;transform:translatex(0)}}@-webkit-keyframes expand{0%{-webkit-transform:scale3d(1,1,1);box-shadow:0 0 0 rgba(0,0,0,.3);opacity:.8;transform:scale3d(1,1,1)}to{-webkit-transform:scale3d(1,1,1);box-shadow:0 0 0 rgba(0,0,0,.3),inset 0 2px 0 rgba(0,0,0,.2);opacity:1;transform:scale3d(1,1,1)}40%{opacity:1}70%{-webkit-transform:scale3d(1.1,1.1,1);box-shadow:0 0 8px rgba(0,0,0,.4);opacity:1;transform:scale3d(1.1,1.1,1)}}@keyframes expand{0%{-webkit-transform:scale3d(1,1,1);box-shadow:0 0 0 rgba(0,0,0,.3);opacity:.8;transform:scale3d(1,1,1)}to{-webkit-transform:scale3d(1,1,1);box-shadow:0 0 0 rgba(0,0,0,.3),inset 0 2px 0 rgba(0,0,0,.2);opacity:1;transform:scale3d(1,1,1)}40%{opacity:1}70%{-webkit-transform:scale3d(1.1,1.1,1);box-shadow:0 0 8px rgba(0,0,0,.4);opacity:1;transform:scale3d(1.1,1.1,1)}}@-webkit-keyframes checkmark{0%,to{-webkit-transform:scale3d(.2,.2,1);opacity:0;transform:scale3d(.2,.2,1)}10%,92%{-webkit-transform:scale3d(1.4,1.4,1);transform:scale3d(1.4,1.4,1)}12%{-webkit-transform:scale3d(1,1,1);transform:scale3d(1,1,1)}5%{opacity:1}90%{-webkit-transform:scale3d(1,1,1);opacity:1;transform:scale3d(1,1,1)}}@keyframes checkmark{0%,to{-webkit-transform:scale3d(.2,.2,1);opacity:0;transform:scale3d(.2,.2,1)}10%,92%{-webkit-transform:scale3d(1.4,1.4,1);transform:scale3d(1.4,1.4,1)}12%{-webkit-transform:scale3d(1,1,1);transform:scale3d(1,1,1)}5%{opacity:1}90%{-webkit-transform:scale3d(1,1,1);opacity:1;transform:scale3d(1,1,1)}}@-webkit-keyframes fadeOut{0%{opacity:1}to{opacity:0}}@keyframes fadeOut{0%{opacity:1}to{opacity:0}}@-webkit-keyframes fadeIn{0%{opacity:0}to{opacity:1}}@keyframes fadeIn{0%{opacity:0}to{opacity:1}}@-webkit-keyframes navSlideIn{0%{-webkit-transform:translate3d(0,-200px,0);transform:translate3d(0,-200px,0)}to{-webkit-transform:translate3d(0,0,0);transform:translate3d(0,0,0)}}@keyframes navSlideIn{0%{-webkit-transform:translate3d(0,-200px,0);transform:translate3d(0,-200px,0)}to{-webkit-transform:translate3d(0,0,0);transform:translate3d(0,0,0)}}.spinner{margin:0 auto;text-align:center;width:70px}.spinner>div{-webkit-animation:sk-bouncedelay 1.4s infinite ease-in-out both;animation:sk-bouncedelay 1.4s infinite ease-in-out both;background-color:#333;border-radius:100%;display:inline-block;height:18px;width:18px}.spinner .bounce1{-webkit-animation-delay:-.32s;animation-delay:-.32s}.spinner .bounce2{-webkit-animation-delay:-.16s;animation-delay:-.16s}@-webkit-keyframes sk-bouncedelay{0%,80%,to{-webkit-transform:scale(0)}40%{-webkit-transform:scale(1)}}@keyframes sk-bouncedelay{0%,80%,to{-webkit-transform:scale(0);transform:scale(0)}40%{-webkit-transform:scale(1);transform:scale(1)}}#enp-quiz{transition:background .25s cubic-bezier(0,0,.3,1)}#enp-quiz .enp-container{margin-left:auto;margin-right:auto;max-width:40pc;padding-left:20px;padding-right:20px}#enp-quiz .enp-container:after{clear:both;content:"";display:table}#enp-quiz .enp-aside{background:#fff;border:1px solid #eee;border-bottom-color:#ccc;font-size:1.2rem;margin-bottom:1.6rem;margin-left:auto;margin-right:auto;max-width:32pc;padding:1.6rem 20px}@media(min-width:700px){#enp-quiz .enp-aside{margin-bottom:2.6rem;padding:1.6rem 2rem}}#enp-quiz .enp-aside:after{clear:both;content:"";display:table}#enp-quiz .enp-aside__title{font-size:1.5rem;font-weight:600;text-transform:uppercase}#enp-quiz .enp-page-title{border-bottom:2px solid #333f48}#enp-quiz fieldset{border:0;margin:0;padding:0}#enp-quiz .enp-label{color:#5e5e5e;display:block;font-size:.85rem;font-weight:400;text-transform:uppercase}#enp-quiz .enp-legend{border:0;color:#5e5e5e;display:block;font-size:.85rem;font-weight:400;margin-bottom:.2rem;padding-top:1.6rem;text-transform:uppercase}#enp-quiz .enp-input{background:#fff;border:1px solid #aaa;border-radius:3px;font-family:tablet-gothic,helvetica neue,helvetica,arial,sans-serif;font-size:1rem;margin-bottom:1.2rem;max-width:100%;padding:.8rem .5rem;width:20rem}@media(min-width:700px){#enp-quiz .enp-input{padding:.8rem}}#enp-quiz .enp-input.enp-input--has-description{margin-bottom:.2rem}#enp-quiz .enp-input-description,#enp-quiz .enp-textarea-description{font-size:.85rem;margin-bottom:1rem}#enp-quiz .enp-input-description--before,#enp-quiz .enp-textarea-description--before{margin-bottom:0}#enp-quiz .enp-input:-ms-input-placeholder,#enp-quiz .enp-input::-ms-input-placeholder,#enp-quiz .enp-input::-webkit-input-placeholder,#enp-quiz .enp-input::placeholder,#enp-quiz .enp-textarea:-ms-input-placeholder,#enp-quiz .enp-textarea::-ms-input-placeholder,#enp-quiz .enp-textarea::-webkit-input-placeholder,#enp-quiz .enp-textarea::placeholder{color:#aaa;font-family:tablet-gothic,helvetica neue,helvetica,arial,sans-serif;font-weight:300}#enp-quiz .enp-textarea{background:#fff;border:1px solid #aaa;border-radius:3px;font-family:tablet-gothic,helvetica neue,helvetica,arial,sans-serif;font-size:1rem;line-height:1.5;margin-bottom:1.2rem;max-width:100%;padding:.8rem .5rem;width:100%}@media(min-width:700px){#enp-quiz .enp-textarea{padding:.8rem}}#enp-quiz .enp-textarea:focus{outline-color:#4d90fe;outline-offset:-2px;outline-style:auto;outline-width:5px}#enp-quiz .enp-textarea.enp-textarea--has-description{margin-bottom:.2rem}#enp-quiz .enp-textarea.enp-textarea--has-description--before{margin-bottom:1.2rem}#enp-quiz .enp-embed-code{background:#fff;border:1px solid #aaa;border-radius:3px;font-family:Monaco,Consolas,Andale Mono,DejaVu Sans Mono,monospace;font-size:.9rem;line-height:1.5;margin-bottom:1.2rem;max-width:100%;padding:1.6rem;width:100%}@media(min-width:700px){#enp-quiz .enp-embed-code{padding:.8rem}}#enp-quiz .enp-embed-code:focus{outline-color:#4d90fe;outline-offset:-2px;outline-style:auto;outline-width:5px}#enp-quiz .enp-preview-page-container,#enp-quiz .enp-publish-page-container,#enp-quiz .enp-quiz-form-container{background:#f8f8f8;margin-left:auto;margin-right:auto;max-width:40pc;padding:6rem 20px 4rem;position:relative}#enp-quiz .enp-preview-page-container:after,#enp-quiz .enp-publish-page-container:after,#enp-quiz .enp-quiz-form-container:after{clear:both;content:"";display:table}@media(min-width:700px){#enp-quiz .enp-preview-page-container,#enp-quiz .enp-publish-page-container,#enp-quiz .enp-quiz-form-container{max-width:840px}}@media(min-width:750pt){#enp-quiz .enp-preview-page-container,#enp-quiz .enp-publish-page-container,#enp-quiz .enp-quiz-form-container{max-width:750pt}}#enp-quiz .enp-quiz-form{margin-left:auto;margin-right:auto;max-width:32pc;padding-left:0;padding-right:0}#enp-quiz .enp-quiz-form:after{clear:both;content:"";display:table}#enp-quiz .enp-quiz-form .enp-input,#enp-quiz .enp-quiz-form .enp-textarea{width:100%}#enp-quiz .enp-quiz-title__label{color:#5e5e5e;display:block;font-size:.85rem;font-weight:500;text-transform:uppercase}#enp-quiz .enp-quiz-title__textarea{background:#fff;border:1px solid #aaa;border-radius:3px;font-family:tablet-gothic,helvetica neue,helvetica,arial,sans-serif;font-size:1.6rem;font-weight:700;margin-bottom:1rem;max-width:100%;padding:.8rem .5rem;width:20rem}@media(min-width:700px){#enp-quiz .enp-quiz-title__textarea{padding:.8rem}}#enp-quiz .enp-quiz-title__textarea:-ms-input-placeholder,#enp-quiz .enp-quiz-title__textarea::-ms-input-placeholder,#enp-quiz .enp-quiz-title__textarea::-webkit-input-placeholder,#enp-quiz .enp-quiz-title__textarea::placeholder{font-weight:700}#enp-quiz textarea{color:#000}#enp-quiz .enp-accordion-container{margin-bottom:1.6rem;position:relative}#enp-quiz .enp-question-content{background:#fff;padding-top:0;position:relative;width:100%}#enp-quiz .enp-question-inner{padding:1.6rem 1.6rem 1rem}@media(min-width:700px){#enp-quiz .enp-question-inner{padding-left:2.9rem;padding-right:2.8rem}}#enp-quiz .enp-question-title__label{color:#5e5e5e;display:block;font-size:.85rem;font-weight:500;text-transform:uppercase}#enp-quiz .enp-question-title__textarea{background:#fff;border:1px solid #aaa;border-radius:3px;font-family:tablet-gothic,helvetica neue,helvetica,arial,sans-serif;font-size:1.3rem;margin-bottom:1.2rem;max-width:100%;padding:1rem 1.2rem;width:20rem}@media(min-width:700px){#enp-quiz .enp-question-title__textarea{padding:.8rem}}#enp-quiz .enp-question-image-upload{-webkit-transform:translate3d(0,0,0);background:#f5f5f5;border:2px dashed #bbb;border-radius:3px;box-shadow:none;color:#666;cursor:pointer;font-size:1.5rem;font-weight:400;letter-spacing:.05em;line-height:1.6;margin-bottom:2rem;padding:.85em 1.4em .75em;position:relative;text-align:center;text-transform:uppercase;transform:translate3d(0,0,0);transition:all .3s cubic-bezier(0,0,.3,1)}#enp-quiz .enp-question-image-upload:focus,#enp-quiz .enp-question-image-upload:hover{background:#222a30;box-shadow:none;color:#fff}#enp-quiz .enp-question-image-upload:active{background:#5d7384;box-shadow:inset 0 2px 0 rgba(0,0,0,.1);color:#fff}#enp-quiz .enp-question-image-upload:focus{outline-color:#4d90fe;outline-offset:-2px;outline-style:auto;outline-width:5px}#enp-quiz .enp-question-image-upload:disabled,#enp-quiz .enp-question-image-upload:disabled:focus,#enp-quiz .enp-question-image-upload:disabled:hover{background:#333f48;cursor:default;opacity:.5}#enp-quiz .enp-question-image-upload:focus,#enp-quiz .enp-question-image-upload:hover{background:hsla(0,0%,100%,.9);border:2px dashed #999;color:#444}#enp-quiz .enp-question-image-upload .enp-question-image-upload__icon--photo{-webkit-transform:translate3d(0,0,0);height:2.8rem;left:0;margin:0 auto;opacity:0;position:absolute;right:0;top:0;transform:translate3d(0,0,0);transition:opacity .2s,transform .3s cubic-bezier(0,0,.3,1),-webkit-transform .3s cubic-bezier(0,0,.3,1);width:2.8rem;z-index:-1}#enp-quiz .enp-question-image-upload .enp-question-image-upload__icon--add{background:#666;border-radius:50%;fill:#f5f5f5;height:1rem;margin-right:5px;padding:.02rem;position:relative;top:.2rem;width:1rem}#enp-quiz .enp-question-image-upload:active,#enp-quiz .enp-question-image-upload:focus,#enp-quiz .enp-question-image-upload:hover{padding-bottom:2rem;padding-top:5rem}#enp-quiz .enp-question-image-upload:active .enp-question-image-upload__icon--photo,#enp-quiz .enp-question-image-upload:focus .enp-question-image-upload__icon--photo,#enp-quiz .enp-question-image-upload:hover .enp-question-image-upload__icon--photo{-webkit-transform:translate3d(0,1.75rem,0);opacity:1;transform:translate3d(0,1.75rem,0);z-index:1}#enp-quiz .enp-question-image-upload:active .enp-question-image-upload__icon--add,#enp-quiz .enp-question-image-upload:focus .enp-question-image-upload__icon--add,#enp-quiz .enp-question-image-upload:hover .enp-question-image-upload__icon--add{background:#444;fill:#fff}#enp-quiz .enp-question-image__container{margin-bottom:1rem;position:relative}#enp-quiz .enp-question-image{margin-bottom:1.2rem}#enp-quiz .enp-question-type__legend{border:0;color:#5e5e5e;display:block;font-size:.85rem;font-weight:400;margin-bottom:.2rem;padding-top:1.6rem;text-transform:uppercase}#enp-quiz .enp-question-type__input{clip:rect(1px,1px,1px,1px);height:1px;left:-625pc;overflow:hidden;position:absolute!important;top:auto;width:1px}#enp-quiz .enp-question-type__label{border-radius:3px;cursor:pointer;display:inline-block;padding:.2rem .5rem;text-transform:capitalize}#enp-quiz .enp-question-type__input:checked+.enp-question-type__label{background:#3bb275;color:#fff;text-shadow:0 0 1px rgba(0,0,0,.7)}#enp-quiz .enp-question-type__input:focus+.enp-question-type__label{outline-color:#4d90fe;outline-offset:-2px;outline-style:auto;outline-width:5px;z-index:8}#enp-quiz .enp-question-type__label{position:relative;z-index:9}#enp-quiz .enp-mc-options,#enp-quiz .enp-slider-options{-webkit-animation:slideOutTop .25s cubic-bezier(0,0,.3,1) forwards;-webkit-animation-delay:0s,.05s;animation:slideOutTop .25s cubic-bezier(0,0,.3,1) forwards;animation-delay:0s,.05s;display:none;margin-top:0}#enp-quiz .enp-question-type__input--mc:checked~.enp-mc-options,#enp-quiz .enp-question-type__input--slider:checked~.enp-slider-options{-webkit-animation:fadeIn .45s cubic-bezier(0,0,.3,1) forwards;animation:fadeIn .45s cubic-bezier(0,0,.3,1) forwards;display:block;visibility:visible}#enp-quiz .enp-mc-options__list{list-style:none;margin-left:0}#enp-quiz .enp-mc-option{padding-left:6px;position:relative}@media(min-width:700px){#enp-quiz .enp-mc-option{padding-left:0}}#enp-quiz .enp-mc-options__legend{color:#5e5e5e;display:block;font-size:.85rem;font-weight:500;text-transform:uppercase}#enp-quiz .enp-mc-option__add,#enp-quiz .enp-mc-option__button--correct,#enp-quiz .enp-mc-option__button--delete{display:none}#enp-quiz .enp-question-type__input--mc:checked~.enp-mc-options .enp-mc-option__add,#enp-quiz .enp-question-type__input--mc:checked~.enp-mc-options .enp-mc-option__button--correct,#enp-quiz .enp-question-type__input--mc:checked~.enp-mc-options .enp-mc-option__button--delete{display:block}#enp-quiz .enp-button__question-image-delete,#enp-quiz .enp-mc-option__button--delete{background:0;border:0;box-shadow:none;cursor:pointer;fill:#bbb;margin:0;padding:0;position:absolute;right:-24px;top:9px}@media(min-width:700px){#enp-quiz .enp-button__question-image-delete,#enp-quiz .enp-mc-option__button--delete{right:-30px}}#enp-quiz .enp-button__question-image-delete:focus,#enp-quiz .enp-button__question-image-delete:hover,#enp-quiz .enp-mc-option__button--delete:focus,#enp-quiz .enp-mc-option__button--delete:hover{fill:#bf5700}#enp-quiz .enp-mc-option__button--correct{background:0;border:0;box-shadow:none;left:-24px;margin:0;padding:0;position:absolute;top:8px}@media(min-width:700px){#enp-quiz .enp-mc-option__button--correct{left:-35px}}#enp-quiz .enp-mc-option__button--correct .enp-mc-option__icon--correct{background:#fff;border:2px solid #e97763;border-radius:50%;cursor:pointer;fill:#fff;height:28px;padding:.05em;transition:all .2s;width:28px}@media(min-width:700px){#enp-quiz .enp-mc-option__button--correct .enp-mc-option__icon--correct{padding:.15em}}#enp-quiz .enp-mc-option__button--correct:focus .enp-mc-option__icon--correct,#enp-quiz .enp-mc-option__button--correct:hover .enp-mc-option__icon--correct{background:#fff;border-color:#3bb275;fill:#3bb275}#enp-quiz .enp-mc-option__button--correct:disabled{opacity:1}#enp-quiz .enp-mc-option__button--correct:disabled .enp-mc-option__icon--correct{border:2px solid transparent;cursor:default;fill:#fff}#enp-quiz .enp-mc-option--correct .enp-mc-option__input{border:1px solid #3bb275;box-shadow:inset 0 0 3px #3bb275}#enp-quiz .enp-mc-option--correct .enp-mc-option__button--correct:focus .enp-mc-option__icon--correct,#enp-quiz .enp-mc-option--correct .enp-mc-option__button--correct:hover .enp-mc-option__icon--correct,#enp-quiz .enp-mc-option--correct .enp-mc-option__icon--correct{background:#3bb275;border-color:#3bb275;fill:#fff}#enp-quiz .enp-mc-option__add{background:#f5f5f5;border:2px dashed #bbb;border-radius:3px;box-shadow:none;color:#666;cursor:pointer;font-size:1.5rem;font-weight:400;letter-spacing:.05em;line-height:1.6;padding:.7rem .75rem .8rem;text-align:left;text-transform:uppercase;transition:all .2s}#enp-quiz .enp-mc-option__add:focus,#enp-quiz .enp-mc-option__add:hover{background:#222a30;box-shadow:none;color:#fff}#enp-quiz .enp-mc-option__add:active{background:#5d7384;box-shadow:inset 0 2px 0 rgba(0,0,0,.1);color:#fff}#enp-quiz .enp-mc-option__add:focus{outline-color:#4d90fe;outline-offset:-2px;outline-style:auto;outline-width:5px}#enp-quiz .enp-mc-option__add:disabled,#enp-quiz .enp-mc-option__add:disabled:focus,#enp-quiz .enp-mc-option__add:disabled:hover{background:#333f48;cursor:default;opacity:.5}#enp-quiz .enp-mc-option__add:focus,#enp-quiz .enp-mc-option__add:hover{background:hsla(0,0%,100%,.9);border:2px dashed #999;color:#444}#enp-quiz .enp-mc-option__add .enp-mc-option__add__icon{background:#666;border-radius:50%;fill:#f5f5f5;height:1rem;margin-right:5px;padding:.02rem;position:relative;top:.2rem;width:1rem}#enp-quiz .enp-mc-option__add:hover .enp-mc-option__add__icon{background:#444;fill:#fff}#enp-quiz .enp-slider-options .enp-input{max-width:11.8rem}#enp-quiz .enp-slider-correct__container .enp-input,#enp-quiz .enp-slider-range__container .enp-input{max-width:8.8rem}@media(min-width:25pc){#enp-quiz .enp-slider-correct__container .enp-input,#enp-quiz .enp-slider-range__container .enp-input{max-width:11.8rem}}#enp-quiz .enp-slider-preview{border:1px solid #ddd;margin-bottom:1.6rem;margin-top:.2rem;padding:1.6rem 1.6rem .6rem;position:relative}#enp-quiz .enp-slider-preview .enp-label--slider-preview{font-size:.75rem;left:.4rem;position:absolute;text-transform:uppercase;top:.2rem;width:100%}#enp-quiz .enp-slider-correct__container,#enp-quiz .enp-slider-range__container{align-items:center;display:flex;justify-content:space-between}#enp-quiz .enp-slider-correct__helper,#enp-quiz .enp-slider-range__helper{background:#fff;color:#777;font-size:.85rem;padding:0 .3rem;position:relative}#enp-quiz .enp-slider-correct__helper:before,#enp-quiz .enp-slider-range__helper:before{background:#ddd;content:"";height:4px;left:-60px;position:absolute;top:44%;transition:width .7s cubic-bezier(0,0,.3,1),background 1.6s cubic-bezier(0,0,.3,1);width:90pt;z-index:-1}#enp-quiz .enp-slider-options{margin-bottom:2rem}#enp-quiz .enp-slider-options .enp-accordion-header{font-size:.85rem;padding:.675rem;text-transform:uppercase}#enp-quiz .enp-slider-options .enp-slider-advanced-options__content{border:0;box-shadow:none;margin-bottom:0;padding-bottom:0;padding-top:1rem}#enp-quiz .enp-slider-correct-high__container{position:relative}#enp-quiz .enp-slider-correct-high__input-container--hidden{display:none}#enp-quiz .enp-slider-correct__helper--hidden:before{background:#3bb275;width:0}#enp-quiz .enp-slider-correct-answer-range--add-range{background:#f5f5f5;border:2px dashed #bbb;border-radius:3px;box-shadow:none;color:#666;cursor:pointer;font-size:.7rem;font-weight:400;letter-spacing:.05em;line-height:1.6;margin-left:.8rem;padding:.85em 1.4em .75em;text-align:center;text-transform:uppercase;transition:all .2s}#enp-quiz .enp-slider-correct-answer-range--add-range:focus,#enp-quiz .enp-slider-correct-answer-range--add-range:hover{background:#222a30;box-shadow:none;color:#fff}#enp-quiz .enp-slider-correct-answer-range--add-range:active{background:#5d7384;box-shadow:inset 0 2px 0 rgba(0,0,0,.1);color:#fff}#enp-quiz .enp-slider-correct-answer-range--add-range:focus{outline-color:#4d90fe;outline-offset:-2px;outline-style:auto;outline-width:5px}#enp-quiz .enp-slider-correct-answer-range--add-range:disabled,#enp-quiz .enp-slider-correct-answer-range--add-range:disabled:focus,#enp-quiz .enp-slider-correct-answer-range--add-range:disabled:hover{background:#333f48;cursor:default;opacity:.5}#enp-quiz .enp-slider-correct-answer-range--add-range:focus,#enp-quiz .enp-slider-correct-answer-range--add-range:hover{background:hsla(0,0%,100%,.9);border:2px dashed #999;color:#444}@media(min-width:25pc){#enp-quiz .enp-slider-correct-answer-range--add-range{font-size:.8rem;padding:.7rem}}@media(min-width:700px){#enp-quiz .enp-slider-correct-answer-range--add-range{min-width:11.4rem;padding:.7rem 1.2rem}}#enp-quiz .enp-slider-correct-answer-range--add-range .enp-slider-correct-answer-range__icon{background:#666;border-radius:50%;fill:#f5f5f5;height:1rem;left:-.2rem;margin-right:5px;padding:.02rem;position:relative;width:1rem}#enp-quiz .enp-slider-correct-answer-range--add-range:hover .enp-slider-correct-answer-range__icon{background:#444;fill:#fff}#enp-quiz .enp-slider-correct-answer-range--remove-range{background:0;border:0;bottom:1.6rem;box-shadow:none;padding:0 .1rem;position:absolute;right:-1.6rem}#enp-quiz .enp-slider-correct-answer-range--remove-range .enp-slider-correct-answer-range__icon{fill:#666;height:1.2em;width:1.2em}#enp-quiz .enp-slider-correct-answer-range--remove-range:focus .enp-slider-correct-answer-range__icon,#enp-quiz .enp-slider-correct-answer-range--remove-range:hover .enp-slider-correct-answer-range__icon{fill:#bf5700}@media(min-width:700px){#enp-quiz .enp-slider-correct-answer-range--remove-range{bottom:auto;right:-.2rem;top:-.2rem}}#enp-quiz .enp-slider-options .enp-input:-moz-read-only,#enp-quiz .enp-slider-options .enp-input:read-only{background:#f5f5f5}#enp-quiz .enp-answer-explanation{background:#eaf4ff;box-shadow:inset 1px 0 0 #ccc,inset -1px -1px 0 #ccc,inset 0 1px 0 #ddd;padding-top:2rem}#enp-quiz .enp-answer-explanation__label{color:#5e5e5e;display:block;font-size:.85rem;font-weight:500;text-transform:uppercase}#enp-quiz .enp-question__button--delete{background:0;border:0;box-shadow:none;cursor:pointer;fill:#bbb;margin:0;padding:0;position:absolute;right:9px;top:9px}@media(min-width:700px){#enp-quiz .enp-question__button--delete{right:-30px}}#enp-quiz .enp-question__button--delete:hover{fill:#bf5700}#enp-quiz .enp-question__move{left:15px;position:absolute}@media(min-width:700px){#enp-quiz .enp-question__move{left:-40px}}#enp-quiz .enp-sort__placeholder{background:#ddd;height:60px;margin-bottom:1.6rem;max-height:90pt;width:100%}#enp-quiz .ui-sortable .ui-sortable-helper .ui-sortable-handle{cursor:-webkit-grabbing}#enp-quiz .enp-question__button--move{background:0;border:0;box-shadow:none;cursor:pointer;fill:#bbb;margin:0;padding:0;position:absolute}#enp-quiz .enp-question__button--move:focus,#enp-quiz .enp-question__button--move:hover{fill:#333}#enp-quiz .enp-question__button--move:disabled{opacity:.5}#enp-quiz .enp-question__button--move--up{left:-9px;top:0}#enp-quiz .enp-question__button--move--down{right:-9px;top:3px}#enp-quiz .enp-quiz-form__add-question{background:0;border:3px dashed #666;border-radius:3px;box-shadow:none;color:#545454;cursor:pointer;font-size:15px;font-weight:400;letter-spacing:.05em;line-height:1.6;margin-bottom:2rem;margin-top:1.6rem;padding:1rem 1.4em;text-align:center;text-transform:uppercase;transition:all .2s}#enp-quiz .enp-quiz-form__add-question:focus,#enp-quiz .enp-quiz-form__add-question:hover{background:#222a30;box-shadow:none;color:#fff}#enp-quiz .enp-quiz-form__add-question:active{box-shadow:inset 0 2px 0 rgba(0,0,0,.1);color:#fff}#enp-quiz .enp-quiz-form__add-question:focus{outline-color:#4d90fe;outline-offset:-2px;outline-style:auto;outline-width:5px}#enp-quiz .enp-quiz-form__add-question:disabled,#enp-quiz .enp-quiz-form__add-question:disabled:focus,#enp-quiz .enp-quiz-form__add-question:disabled:hover{background:#333f48;cursor:default;opacity:.5}#enp-quiz .enp-quiz-form__add-question:focus,#enp-quiz .enp-quiz-form__add-question:hover{background:#222a30;box-shadow:none;color:#fff}#enp-quiz .enp-quiz-form__add-question:active{background:#5d7384;box-shadow:inset 0 2px 0 rgba(0,0,0,.1);color:#fff}#enp-quiz .enp-quiz-form__add-question:focus{outline-color:#4d90fe;outline-offset:-2px;outline-style:auto;outline-width:5px}#enp-quiz .enp-quiz-form__add-question:disabled,#enp-quiz .enp-quiz-form__add-question:disabled:focus,#enp-quiz .enp-quiz-form__add-question:disabled:hover{background:#333f48;cursor:default;opacity:.5}#enp-quiz .enp-quiz-form__add-question:focus,#enp-quiz .enp-quiz-form__add-question:hover{background:hsla(0,0%,100%,.9);border:3px dashed #444;color:#444}#enp-quiz .enp-quiz-form__add-question .enp-add-question__icon{background:#666;border-radius:50%;fill:#f5f5f5;height:1.2rem;margin-right:5px;padding:.02rem;position:relative;top:.2rem;width:1.2rem}#enp-quiz .enp-quiz-form__add-question:hover .enp-add-question__icon{background:#444;fill:#fff}#enp-quiz .enp-quiz-form__save{background:#333f48;border:0;border-radius:3px;box-shadow:inset 0 -2px 0 rgba(0,0,0,.2);color:#fff;cursor:pointer;font-size:15px;font-weight:400;letter-spacing:.05em;line-height:1.6;margin-bottom:1rem;opacity:.8;padding:.85em 1.4em .75em;text-align:center;text-shadow:0 -1px 2px rgba(0,0,0,.6);text-transform:uppercase;transition:all .2s;width:100%}#enp-quiz .enp-quiz-form__save:focus,#enp-quiz .enp-quiz-form__save:hover{background:#222a30;box-shadow:none;color:#fff}#enp-quiz .enp-quiz-form__save:active{background:#5d7384;box-shadow:inset 0 2px 0 rgba(0,0,0,.1);color:#fff}#enp-quiz .enp-quiz-form__save:focus{outline-color:#4d90fe;outline-offset:-2px;outline-style:auto;outline-width:5px}#enp-quiz .enp-quiz-form__save:disabled,#enp-quiz .enp-quiz-form__save:disabled:focus,#enp-quiz .enp-quiz-form__save:disabled:hover{background:#333f48;cursor:default;opacity:.5}#enp-quiz .enp-quiz-form__save:focus,#enp-quiz .enp-quiz-form__save:hover{opacity:1}@media(min-width:25pc){#enp-quiz .enp-quiz-form__save{margin-right:3%;margin-top:1.6rem;padding:1.2rem 1.8rem 1.1rem;position:relative;top:-2px;width:27%}}#enp-quiz .enp-quiz-form__save--reveal{-webkit-animation:slideInTop--reduced-opacity .3s cubic-bezier(0,0,.3,1);animation:slideInTop--reduced-opacity .3s cubic-bezier(0,0,.3,1)}#enp-quiz .enp-btn--next-step{background:#333f48;border:0;border-radius:3px;box-shadow:inset 0 -2px 0 rgba(0,0,0,.2);color:#fff;cursor:pointer;font-size:15px;font-weight:400;letter-spacing:.05em;line-height:1.6;text-align:center;text-transform:uppercase;transition:all .2s}#enp-quiz .enp-btn--next-step:focus,#enp-quiz .enp-btn--next-step:hover{background:#222a30;box-shadow:none;color:#fff}#enp-quiz .enp-btn--next-step:active{background:#5d7384;box-shadow:inset 0 2px 0 rgba(0,0,0,.1);color:#fff}#enp-quiz .enp-btn--next-step:focus{outline-color:#4d90fe;outline-offset:-2px;outline-style:auto;outline-width:5px}#enp-quiz .enp-btn--next-step:disabled,#enp-quiz .enp-btn--next-step:disabled:focus,#enp-quiz .enp-btn--next-step:disabled:hover{background:#333f48;cursor:default;opacity:.5}#enp-quiz .enp-btn--next-step__icon{background:#fff;border-radius:50%;fill:#333f48;height:1.2rem;margin-left:.5em;position:relative;top:.15rem;width:1.2rem}#enp-quiz .enp-btn--next-step__icon:hover{background:#fff;fill:#222a30}#enp-quiz .enp-btn--next-step{padding:1rem 1.4rem;width:100%}@media(min-width:25pc){#enp-quiz .enp-btn--next-step{width:68%}}#enp-quiz .enp-btn--next-step--reveal{-webkit-animation:slideInTop .3s cubic-bezier(0,0,.3,1);animation:slideInTop .3s cubic-bezier(0,0,.3,1)}#enp-quiz .enp-accordion-header--inserting,#enp-quiz .enp-mc-option--inputs{-webkit-animation:slideInBottom .4s cubic-bezier(0,0,.3,1) forwards;animation:slideInBottom .4s cubic-bezier(0,0,.3,1) forwards}#enp-quiz .enp-mc-option--remove,#enp-quiz .enp-question--remove,#enp-quiz .enp-question__image--remove{-webkit-animation:removeElement .5s cubic-bezier(0,0,.3,1) forwards;animation:removeElement .5s cubic-bezier(0,0,.3,1) forwards}#enp-quiz .enp-image-upload-wait{background:#f5f5f5;border:2px dashed #bbb;border-radius:3px;box-shadow:none;color:#666;cursor:pointer;font-size:15px;font-weight:400;letter-spacing:.05em;line-height:1.6;margin-bottom:1rem;padding:4rem 1.4em;text-align:center;text-transform:uppercase;transition:all .2s;width:100%}#enp-quiz .enp-image-upload-wait:focus,#enp-quiz .enp-image-upload-wait:hover{background:#222a30;box-shadow:none;color:#fff}#enp-quiz .enp-image-upload-wait:active{background:#5d7384;box-shadow:inset 0 2px 0 rgba(0,0,0,.1);color:#fff}#enp-quiz .enp-image-upload-wait:focus{outline-color:#4d90fe;outline-offset:-2px;outline-style:auto;outline-width:5px}#enp-quiz .enp-image-upload-wait:disabled,#enp-quiz .enp-image-upload-wait:disabled:focus,#enp-quiz .enp-image-upload-wait:disabled:hover{background:#333f48;cursor:default;opacity:.5}#enp-quiz .enp-image-upload-wait:focus,#enp-quiz .enp-image-upload-wait:hover{background:hsla(0,0%,100%,.9);border:2px dashed #999;color:#444}#enp-quiz .enp-accordion-header.question-has-error{box-shadow:0 0 3px #bf5700;color:#bf5700}.enp-quiz.ui-sortable--sorting #enp-quiz .enp-accordion-content{display:none}@media(min-width:750pt){#enp-quiz .enp-quiz-settings-container{float:left;margin:0;width:40%}#enp-quiz .enp-quiz-preview-container{float:left;width:60%}}#enp-quiz .enp-quiz-settings__title,#enp-quiz .enp-quiz-share__legend{font-size:1.5rem;font-weight:600;padding-top:0;position:relative;text-transform:uppercase}#enp-quiz .enp-quiz-settings__form{margin-bottom:3rem}@media(min-width:750pt){#enp-quiz .enp-quiz-settings__form{margin-bottom:0;padding:0}}@media(min-width:700px){#enp-quiz .enp-fieldset{position:relative}}@media(min-width:700px){#enp-quiz .enp-title-display__legend{padding-top:.4rem}}#enp-quiz .enp-quiz-share__input,#enp-quiz .enp-quiz-styles__input{width:100%}#enp-quiz .enp-quiz-styles__textarea--custom-css{font-family:Monaco,Consolas,Andale Mono,DejaVu Sans Mono,monospace;font-size:.9rem;min-height:200px}#enp-quiz .enp-fieldset--section{padding:1.6rem 1rem}#enp-quiz .enp-fieldset--section.enp-accordion-content--open{margin-bottom:0}#enp-quiz .enp-quiz-share--facebook{margin-bottom:2rem}#enp-quiz .enp-title-display__legend{border:0;color:#5e5e5e;display:block;font-size:.85rem;font-weight:400;margin-bottom:.2rem;padding-top:1.6rem;text-transform:uppercase}#enp-quiz .enp-title-display__input{clip:rect(1px,1px,1px,1px);height:1px;left:-625pc;overflow:hidden;position:absolute!important;top:auto;width:1px}#enp-quiz .enp-title-display__label{border-radius:3px;cursor:pointer;display:inline-block;padding:.2rem .5rem;text-transform:capitalize}#enp-quiz .enp-title-display__input:checked+.enp-title-display__label{background:#3bb275;color:#fff;text-shadow:0 0 1px rgba(0,0,0,.7)}#enp-quiz .enp-title-display__input:focus+.enp-title-display__label{outline-color:#4d90fe;outline-offset:-2px;outline-style:auto;outline-width:5px;z-index:8}#enp-quiz .enp-mc-options-order__legend{border:0;color:#5e5e5e;display:block;font-size:.85rem;font-weight:400;margin-bottom:.2rem;padding-top:1.6rem;text-transform:uppercase}#enp-quiz .enp-mc-options-order__input{clip:rect(1px,1px,1px,1px);height:1px;left:-625pc;overflow:hidden;position:absolute!important;top:auto;width:1px}#enp-quiz .enp-mc-options-order__label{border-radius:3px;cursor:pointer;display:inline-block;padding:.2rem .5rem;text-transform:capitalize}#enp-quiz .enp-mc-options-order__input:checked+.enp-mc-options-order__label{background:#3bb275;color:#fff;text-shadow:0 0 1px rgba(0,0,0,.7)}#enp-quiz .enp-mc-options-order__input:focus+.enp-mc-options-order__label{outline-color:#4d90fe;outline-offset:-2px;outline-style:auto;outline-width:5px;z-index:8}#enp-quiz .enp-mc-options-order{margin-bottom:1.6rem}#enp-quiz .enp-quiz-share__textarea{margin-bottom:2rem;min-height:7.6rem}@media(min-width:700px){#enp-quiz .enp-quiz-share__textarea{min-height:4.6rem}}@media(min-width:750pt){#enp-quiz .enp-quiz-share__textarea{min-height:7.6rem}}#enp-quiz .enp-preview-form__submit{margin-top:1.6rem}#enp-quiz .enp-quiz-preview__title{font-size:1.5rem;font-weight:600;text-transform:uppercase}#enp-quiz .enp-preview-form__submit{background:#333f48;border:0;border-radius:3px;box-shadow:inset 0 -2px 0 rgba(0,0,0,.2);color:#fff;cursor:pointer;font-size:15px;font-weight:400;letter-spacing:.05em;line-height:1.6;margin-bottom:1rem;opacity:.8;padding:.85rem 1.4em;text-align:center;text-shadow:0 -1px 2px rgba(0,0,0,.6);text-transform:uppercase;transition:all .2s;width:100%}#enp-quiz .enp-preview-form__submit:focus,#enp-quiz .enp-preview-form__submit:hover{background:#222a30;box-shadow:none;color:#fff}#enp-quiz .enp-preview-form__submit:active{background:#5d7384;box-shadow:inset 0 2px 0 rgba(0,0,0,.1);color:#fff}#enp-quiz .enp-preview-form__submit:focus{outline-color:#4d90fe;outline-offset:-2px;outline-style:auto;outline-width:5px}#enp-quiz .enp-preview-form__submit:disabled,#enp-quiz .enp-preview-form__submit:disabled:focus,#enp-quiz .enp-preview-form__submit:disabled:hover{background:#333f48;cursor:default;opacity:.5}#enp-quiz .enp-preview-form__submit:focus,#enp-quiz .enp-preview-form__submit:hover{opacity:1}#enp-quiz .enp-preview-form__submit--publish{padding:1.05rem 1.8rem .95rem;position:relative;width:100%;z-index:99999999}#enp-quiz .enp-quiz-styles__iris-wrapper{position:relative}#enp-quiz .iris-picker{box-sizing:content-box;margin-bottom:1rem;padding-bottom:3rem;padding-right:30px;position:relative;top:-1.2rem;z-index:9999999999}@media(min-width:750pt){#enp-quiz .iris-picker{left:104%;position:absolute;top:-4px}}#enp-quiz .iris-picker:last-of-type{margin-bottom:0}#enp-quiz .iris-picker .ui-draggable-handle:focus .ui-slider-handle,#enp-quiz .iris-picker .ui-slider-handle:focus{box-shadow:0 0 3px rgba(0,0,0,.75)}#enp-quiz .enp-quiz-styles__set-default{background:transparent;border:2px solid #333f48;border-radius:3px;bottom:10px;box-shadow:none;color:#333f48;cursor:pointer;font-size:.75rem;font-weight:400;left:10px;letter-spacing:.05em;line-height:1.6;padding:.85em 1.4em .75em;position:absolute;text-align:center;text-transform:uppercase;transition:all .2s}#enp-quiz .enp-quiz-styles__set-default:focus,#enp-quiz .enp-quiz-styles__set-default:hover{background:#222a30;box-shadow:none;color:#fff}#enp-quiz .enp-quiz-styles__set-default:active{background:#5d7384;box-shadow:inset 0 2px 0 rgba(0,0,0,.1);color:#fff}#enp-quiz .enp-quiz-styles__set-default:focus{outline-color:#4d90fe;outline-offset:-2px;outline-style:auto;outline-width:5px}#enp-quiz .enp-quiz-styles__set-default:disabled,#enp-quiz .enp-quiz-styles__set-default:disabled:focus,#enp-quiz .enp-quiz-styles__set-default:disabled:hover{background:#333f48;cursor:default;opacity:.5}#enp-quiz .enp-quiz-styles__set-default:focus,#enp-quiz .enp-quiz-styles__set-default:hover{background:transparent;border:2px solid #222a30;color:#222a30}#enp-quiz .enp-iris__close{background:0;border:0;box-shadow:none;cursor:pointer;fill:#888;margin:0;padding:0;position:absolute;right:5px;top:5px}#enp-quiz .enp-quiz-styles__input--color{padding-left:45px}#enp-quiz .enp-quiz-styles__color-demo{border:1px solid #ccc;border-radius:3px;height:30px;left:8px;position:absolute;top:8px;width:30px}#enp-quiz .enp-share-quiz__url{display:block;font-size:1.5rem;line-height:1.4;word-wrap:break-word}#enp-quiz .enp-share-quiz{align-content:center;align-items:center;display:flex;list-style:none;margin-left:0}#enp-quiz .enp-share-quiz__item{margin-right:20px}#enp-quiz .enp-share-quiz__item:last-child{margin-right:0}#enp-quiz .enp-share-quiz__item__icon{background:#333f48;border-radius:50%;fill:#fff!important;height:2.4rem;padding:.6rem;width:2.4rem}#enp-quiz .enp-share-quiz__item__icon--facebook{background-color:#3a5795}#enp-quiz .enp-share-quiz__item__icon--twitter{background-color:#4099ff}#enp-quiz .enp-share-quiz{justify-content:space-around;margin-bottom:0}#enp-quiz .enp-ab-create__container{background:#f8f8f8;margin-left:auto;margin-right:auto;max-width:40pc;padding:3rem 20px;width:100%}#enp-quiz .enp-ab-create__container:after{clear:both;content:"";display:table}@media(min-width:700px){#enp-quiz .enp-ab-create__container{max-width:840px}}@media(min-width:750pt){#enp-quiz .enp-ab-create__container{max-width:750pt}}#enp-quiz .enp-ab-create__form{margin-left:auto;margin-right:auto;max-width:32pc;padding-left:20px;padding-right:20px}#enp-quiz .enp-ab-create__form:after{clear:both;content:"";display:table}#enp-quiz .enp-ab-create__label{color:#5e5e5e;display:block;font-size:.85rem;font-weight:500;text-transform:uppercase}#enp-quiz .enp-ab-create-title__textarea{background:#fff;border:1px solid #aaa;border-radius:3px;font-family:tablet-gothic,helvetica neue,helvetica,arial,sans-serif;font-size:1.6rem;font-weight:700;margin-bottom:1rem;max-width:100%;padding:.8rem .5rem;width:100%}@media(min-width:700px){#enp-quiz .enp-ab-create-title__textarea{padding:.8rem}}#enp-quiz .enp-ab-create-title__textarea:-ms-input-placeholder,#enp-quiz .enp-ab-create-title__textarea::-ms-input-placeholder,#enp-quiz .enp-ab-create-title__textarea::-webkit-input-placeholder,#enp-quiz .enp-ab-create-title__textarea::placeholder{font-weight:700}#enp-quiz .enp-ab-create__select{-moz-appearance:none;-webkit-appearance:none;appearance:none;background:url(../svg/chevron-down.svg) 100% 50% no-repeat;background-color:#fff;border:1px solid #bbb;border-radius:3px;box-shadow:inset -26px 0 0 rgba(0,0,0,.1);font-size:.85rem;margin-bottom:1.6rem;padding:.7rem 2pc .7rem .8rem;width:100%}#enp-quiz .enp-ab-create__submit{padding-bottom:1em;padding-top:1em;width:100%}#enp-quiz.enp-quiz__main{background:#f8f8f8}#enp-quiz .enp-dash-container{margin-left:auto;margin-right:auto;max-width:40pc;padding:2rem 20px;transition:all .25s cubic-bezier(0,0,.3,1)}#enp-quiz .enp-dash-container:after{clear:both;content:"";display:table}@media(min-width:700px){#enp-quiz .enp-dash-container{max-width:840px}}@media(min-width:750pt){#enp-quiz .enp-dash-container{max-width:750pt}}#enp-quiz .enp-dash__section-header{display:block;margin-bottom:.325rem}@media(min-width:700px){#enp-quiz .enp-dash__section-header{align-content:flex-end;align-items:flex-end;display:flex;justify-content:space-between}}#enp-quiz .enp-search-quizzes{display:block}@media(min-width:25pc){#enp-quiz .enp-search-quizzes{align-content:flex-end;align-items:flex-end;display:flex}}#enp-quiz .enp-search-quizzes__form-item{display:block;margin-bottom:.6rem}@media(min-width:25pc){#enp-quiz .enp-search-quizzes__form-item{margin-bottom:0;margin-right:1rem}#enp-quiz .enp-search-quizzes__form-item:last-of-type{margin-right:0}}#enp-quiz .enp-quiz-search{position:relative}#enp-quiz .enp-search-quizzes__label{clip:rect(1px,1px,1px,1px);height:1px;left:-625pc;margin-bottom:0;overflow:hidden;position:absolute!important;top:auto;width:1px}#enp-quiz .enp-search-quizzes__select{padding:.3rem}#enp-quiz .enp-quiz-search__input{font-size:.85rem;margin:0 0 .1rem;max-width:10pc;padding:.3rem .3rem .3rem 26px}#enp-quiz .enp-quiz-search__icon{bottom:.3rem;height:21px;left:.2rem;position:absolute;width:21px}#enp-quiz .enp-search-quizzes__button{padding:.2rem .8rem}#enp-quiz .enp-search-results-description{font-size:.85rem}#enp-quiz .enp-search-results-description__link{white-space:nowrap}#enp-quiz .enp-search-results-description__icon{height:1.3em;left:2px;position:relative;top:4px;width:1.3em}#enp-quiz .enp-dash__section-title{font-size:1.5rem;margin-bottom:.325rem;text-transform:uppercase}#enp-quiz .enp-view-toggle{cursor:pointer;display:none;opacity:.5}@media(min-width:700px){#enp-quiz .enp-view-toggle{display:flex}}#enp-quiz .enp-view-toggle__active{opacity:1}#enp-quiz .enp-sort-by{margin-left:5px}#enp-quiz .enp-dash-list{align-items:stretch;display:flex;flex-flow:row wrap;list-style:none;margin-left:0}#enp-quiz .enp-dash-item{align-content:flex-end;background:#fff;border:0;border-radius:3px;display:flex;flex-basis:100%;flex-direction:column;justify-content:flex-end;list-style:none;margin:0 0 .8rem;padding:1rem 1.2rem;transition:all .35s cubic-bezier(0,0,.3,1)}@media(min-width:700px){#enp-quiz .enp-dash-item{flex-basis:49%;margin:0 2% .8rem 0;max-width:49%}#enp-quiz .enp-dash-item:nth-child(2n){margin-right:0}}@media(min-width:750pt){#enp-quiz .enp-dash-item{flex-basis:32.5%;margin-right:1.25%;max-width:32.5%}#enp-quiz .enp-dash-item:nth-child(2n){margin-right:1.25%}#enp-quiz .enp-dash-item:nth-child(3n){margin-right:0}}#enp-quiz .enp-dash-item--published{box-shadow:inset 4px 0 0 #333f48,0 1px 0 rgba(0,0,0,.1)}#enp-quiz .enp-dash-item--draft{box-shadow:inset 4px 0 0 #a3b2be,0 1px 0 rgba(0,0,0,.1)}#enp-quiz .enp-dash-item--remove{-webkit-animation:removeElement .5s cubic-bezier(0,0,.3,1) forwards;animation:removeElement .5s cubic-bezier(0,0,.3,1) forwards}#enp-quiz .enp-dash-list--list-view .enp-dash-item{flex-basis:100%;margin:0 0 .8rem}#enp-quiz .enp-dash-item__spinner{-webkit-animation:fadeIn .3s cubic-bezier(0,0,.3,1);align-content:center;align-items:center;animation:fadeIn .3s cubic-bezier(0,0,.3,1);background:hsla(0,59%,90%,.8);bottom:0;display:flex;justify-content:center;left:0;position:absolute;right:0;top:0;width:100%;z-index:999}#enp-quiz .enp-dash-item__header{background:#fff;border-bottom:1px solid #ddd;position:relative;z-index:99}#enp-quiz .enp-dash-item__title{font-size:1rem;padding:0 24px .375rem 0}#enp-quiz .enp-dash-item__content{padding:0 0 .375rem;position:relative;transition:all .2s cubic-bezier(0,0,.3,1)}#enp-quiz .enp-dash-item__meta{color:#565656;font-size:.75rem;font-weight:300}#enp-quiz .enp-dash-item__username{border-left:1px solid #ddd;margin-left:.2rem;padding-left:.4rem;word-wrap:break-word}#enp-quiz .enp-dash-item__title--ab-test{padding-bottom:0}#enp-quiz .enp-dash-item__ab-quizzes{color:#666;font-size:.85rem;list-style:none;margin-bottom:.8rem;margin-left:0}#enp-quiz .enp-dash-item__nav{font-size:.85rem;list-style:none;margin-bottom:0;margin-left:0}#enp-quiz .enp-dash-item__nav__item{display:inline-block;font-size:.85rem;margin-bottom:0;margin-right:10px;padding-bottom:0}#enp-quiz .enp-dash-item__nav__item a{font-weight:400}#enp-quiz .enp-dash-item__nav__item a:focus{outline:1px dotted #333f48;outline-offset:1px}#enp-quiz .enp-dash-item__nav__item:last-of-type{margin-right:0}#enp-quiz .enp-dash-item__delete{background:0;border:0;box-shadow:none;cursor:pointer;margin:0;padding:0;position:relative;top:4px}#enp-quiz .enp-dash-item__delete__icon{fill:#bbb;height:20px;width:20px}#enp-quiz .enp-dash-item__delete__icon:focus,#enp-quiz .enp-dash-item__delete__icon:hover{fill:#bf5700}#enp-quiz .enp-dash-item__nav--collapsible{-webkit-transform:translate3d(0,0,0);background:#fff;bottom:auto;display:none;margin-top:.2rem;position:absolute;right:auto;top:100%;transform:translate3d(0,0,0);transition:all .2s cubic-bezier(0,0,.3,1)}#enp-quiz .enp-dash-item__nav--collapsible .enp-dash-item__nav__item{padding:0 0 .4rem}#enp-quiz .enp-dash-item__menu-action{background:0;border:0;bottom:.2rem;color:#444;cursor:pointer;height:24px;padding:0;position:absolute;right:0}#enp-quiz .enp-dash-item__menu-action__icon{fill:#444;height:24px;transition:all .3s cubic-bezier(0,0,.3,1);width:24px}#enp-quiz .enp-dash-item__menu-action__icon--bottom{left:0;position:absolute}#enp-quiz .enp-dash-item--menu-active{-webkit-transform:translate3d(0,-3px,0);transform:translate3d(0,-3px,0)}#enp-quiz .enp-dash-item--menu-active.enp-dash-item--published{box-shadow:inset 4px 0 0 #3bb275,0 2px 2px rgba(0,0,0,.2)}#enp-quiz .enp-dash-item--menu-active.enp-dash-item--draft{box-shadow:inset 4px 0 0 #92dbb6,0 2px 2px rgba(0,0,0,.2)}#enp-quiz .enp-dash-item--menu-active .enp-dash-item__menu-action__icon--bottom{-webkit-transform:translatey(-15.5%);transform:translatey(-15.5%)}#enp-quiz .enp-dash-item--menu-active .enp-dash-item__menu-action__icon--top{-webkit-transform:rotatex(-180deg) translatey(0);transform:rotatex(-180deg) translatey(0)}#enp-quiz .enp-dash-item--menu-active .enp-dash-item__nav--collapsible{-webkit-animation:slideInTop .25s cubic-bezier(0,0,.3,1) forwards;animation:slideInTop .25s cubic-bezier(0,0,.3,1) forwards;display:block}#enp-quiz .enp-dash-item--menu-active .enp-dash-item__content{-webkit-transform:translate3d(0,.675rem,0);opacity:.4;transform:translate3d(0,.675rem,0)}#enp-quiz .enp-quiz-results{display:flex;justify-content:space-around;list-style:none;margin:.8rem 0 0;padding:0;text-align:center}#enp-quiz .enp-quiz-results__item{color:#454545;margin:0 2% 0 0;padding:0}@media(max-width:280px){#enp-quiz .enp-quiz-results__item{margin-bottom:.6rem;padding:0;width:100%}}#enp-quiz .enp-quiz-results__number{font-size:1.6rem;line-height:1;position:relative}#enp-quiz .enp-dash-item--draft .enp-quiz-results__number{opacity:.5}#enp-quiz .enp-quiz-results__number--average-score{color:#319461}#enp-quiz .enp-quiz-results__number--average-score:after{content:"%";font-size:.9rem;position:absolute;right:-1rem;top:.3rem}#enp-quiz .enp-quiz-results__label{color:#888;font-size:.7rem;font-weight:300;text-transform:uppercase}#enp-quiz .enp-quiz-list__view{align-content:flex-end;align-items:flex-end;display:flex}#enp-quiz .enp-dash-item--add-new{background:0;border:0;padding:0;position:relative}@media(min-width:700px){#enp-quiz .enp-dash-item--add-new{min-height:7rem}}#enp-quiz .enp-dash-link--add-new{background:0;border:2px dashed #bbb;border-radius:3px;box-shadow:none;color:#333f48;cursor:pointer;font-size:15px;font-weight:400;justify-content:flex-start;letter-spacing:.05em;line-height:1.6;padding:1rem 1.2rem;text-align:center;text-transform:uppercase;transition:all .2s}#enp-quiz .enp-dash-link--add-new:focus,#enp-quiz .enp-dash-link--add-new:hover{background:#222a30;box-shadow:none;color:#fff}#enp-quiz .enp-dash-link--add-new:active{background:#5d7384;box-shadow:inset 0 2px 0 rgba(0,0,0,.1);color:#fff}#enp-quiz .enp-dash-link--add-new:focus{outline-color:#4d90fe;outline-offset:-2px;outline-style:auto;outline-width:5px}#enp-quiz .enp-dash-link--add-new:disabled,#enp-quiz .enp-dash-link--add-new:disabled:focus,#enp-quiz .enp-dash-link--add-new:disabled:hover{background:#333f48;cursor:default;opacity:.5}#enp-quiz .enp-dash-link--add-new:focus,#enp-quiz .enp-dash-link--add-new:hover{background:hsla(0,0%,100%,.9);border:2px dashed #999;color:#444}@media(min-width:700px){#enp-quiz .enp-dash-link--add-new{align-content:center;align-items:center;bottom:0;display:flex;flex-direction:column;font-size:1.5rem;justify-content:center;left:0;position:absolute;right:0;text-transform:uppercase;top:0}}#enp-quiz .enp-dash-link--add-new .enp-dash-link__icon{background:#333f48;border-radius:50%;fill:#fff;height:1.2rem;margin-right:5px;width:1.2rem}@media(min-width:700px){#enp-quiz .enp-dash-link--add-new .enp-dash-link__icon{height:2rem;margin:.8rem 0 .2rem;width:2rem}}#enp-quiz .enp-dash-link--add-new:hover{color:#222a30}#enp-quiz .enp-dash-link--add-new:hover .enp-dash-link__icon{background:#222a30;fill:#fff}#enp-quiz .enp-quiz-message--welcome p{color:#444}#enp-quiz .enp-paginate{align-content:center;align-items:center;display:flex;font-size:1rem;justify-content:center;list-style:none;margin-left:0}#enp-quiz .enp-paginate__link{align-content:center;align-items:center;border-radius:3px;display:flex;font-weight:400;justify-content:center;margin:0 .2rem;padding:0 .4rem}#enp-quiz .enp-paginate__link--current-page{border:2px solid #333f48}#enp-quiz .enp-paginate__item--first-page,#enp-quiz .enp-paginate__item--last-page{display:flex}#enp-quiz .enp-paginate__item--first-page:after,#enp-quiz .enp-paginate__item--last-page:before{bottom:.2rem;content:"...";font-size:1rem;opacity:.6;position:relative}#enp-quiz .enp-paginate__item--no-gap:after,#enp-quiz .enp-paginate__item--no-gap:before{content:""}#enp-quiz .enp-paginate__item--next-page{margin-left:.2rem}#enp-quiz .enp-paginate__item--previous-page{margin-right:.2rem}#enp-quiz .enp-quiz-breadcrumbs{align-content:center;align-items:center;background:#fff;border-bottom:1px solid #ddd;display:flex;justify-content:center;left:-500%;margin-left:auto;margin-right:auto;padding:10px;position:absolute;right:-500%;top:0;width:1000%;z-index:99999}#enp-quiz .enp-quiz-breadcrumbs__list{display:flex;list-style:none;margin-bottom:0;margin-left:0}#enp-quiz .enp-quiz-breadcrumbs__item{align-content:center;align-items:center;display:flex;fill:#333f48;justify-content:center;margin-right:5px}#enp-quiz .enp-quiz-breadcrumbs__item:last-of-type{margin-right:0}@media(min-width:25pc){#enp-quiz .enp-quiz-breadcrumbs__item{margin-right:10px}}#enp-quiz .enp-quiz-breadcrumbs__link--disabled{cursor:default;opacity:.65}#enp-quiz .enp-quiz-breadcrumbs__link--active{background:transparent;border:2px solid #333f48;border-radius:3px;box-shadow:none;color:#333f48;cursor:pointer;font-size:15px;font-weight:400;letter-spacing:.05em;line-height:1.6;padding:.4em 1em;text-align:center;text-transform:uppercase;transition:all .2s}#enp-quiz .enp-quiz-breadcrumbs__link--active:focus,#enp-quiz .enp-quiz-breadcrumbs__link--active:hover{background:#222a30;box-shadow:none;color:#fff}#enp-quiz .enp-quiz-breadcrumbs__link--active:active{background:#5d7384;box-shadow:inset 0 2px 0 rgba(0,0,0,.1);color:#fff}#enp-quiz .enp-quiz-breadcrumbs__link--active:focus{outline-color:#4d90fe;outline-offset:-2px;outline-style:auto;outline-width:5px}#enp-quiz .enp-quiz-breadcrumbs__link--active:disabled,#enp-quiz .enp-quiz-breadcrumbs__link--active:disabled:focus,#enp-quiz .enp-quiz-breadcrumbs__link--active:disabled:hover{background:#333f48;cursor:default;opacity:.5}#enp-quiz .enp-quiz-breadcrumbs__link--active:focus,#enp-quiz .enp-quiz-breadcrumbs__link--active:hover{background:transparent;border:2px solid #222a30;color:#222a30}#enp-quiz .enp-quiz-breadcrumbs__link{font-size:1rem;font-weight:400;letter-spacing:0;text-transform:none}#enp-quiz .enp-quiz-breadcrumbs--fixed{-webkit-animation:navSlideIn .25s;animation:navSlideIn .25s;position:fixed;top:0}#enp-quiz .enp-results-title{background:#f8f8f8;border-bottom:1px solid #ddd;font-size:1.6rem;margin:-1.2rem 0 2rem;padding:3.2rem 20px 2.6rem;text-align:center}#enp-quiz .enp-results-title:after{content:"RESULTS";display:block;font-size:1.5rem;font-weight:400;text-transform:uppercase}#enp-quiz .enp-results__container{display:block;margin-left:auto;margin-right:auto;max-width:40pc;padding-left:20px;padding-right:20px}#enp-quiz .enp-results__container:after{clear:both;content:"";display:table}@media(min-width:700px){#enp-quiz .enp-results__container{max-width:840px}}@media(min-width:750pt){#enp-quiz .enp-results__container{display:flex;justify-content:space-between;max-width:750pt}}#enp-quiz .enp-quiz-scores__container,#enp-quiz .enp-results-flow__container{width:100%}@media(min-width:750pt){#enp-quiz .enp-quiz-scores__container,#enp-quiz .enp-results-flow__container{width:48%}}#enp-quiz .enp-quiz-score__line-chart{height:300px;margin-bottom:1rem}#enp-quiz .enp-quiz-score__line-chart .ct-label{color:#444}#enp-quiz .enp-quiz-score__line-chart .ct-grid{stroke:#dadada;stroke-dasharray:0}#enp-quiz .enp-quiz-score__line-chart .ct-line{stroke:#3bb275;stroke-width:2px}#enp-quiz .enp-quiz-score__line-chart .ct-point{stroke:#3bb275;stroke-width:8px}#enp-quiz .enp-quiz-scores-table{margin:0 auto;max-width:500px;width:100%}#enp-quiz .enp-quiz-scores-table tr th{background-color:#fff}#enp-quiz .enp-quiz-scores-table__label{padding-left:5%}#enp-quiz .enp-quiz-scores-table__score{padding-right:5%;text-align:right}#enp-quiz .enp-results-flow{border-radius:50%;height:20pc;margin:2rem auto;position:relative;width:20pc}@media(min-width:25pc){#enp-quiz .enp-results-flow{height:390px;width:390px}}@media(min-width:700px){#enp-quiz .enp-results-flow{height:450px;width:450px}}@media(min-width:750pt){#enp-quiz .enp-results-flow{height:25pc;width:25pc}}#enp-quiz .enp-results-flow__section-title{clip:rect(1px,1px,1px,1px);height:1px;left:-625pc;overflow:hidden;position:absolute!important;top:auto;width:1px}#enp-quiz .enp-results-flow__item{-webkit-animation:.85s slideInBottom cubic-bezier(0,0,.3,1) forwards;animation:.85s slideInBottom cubic-bezier(0,0,.3,1) forwards;border:2px solid #3bb275;border-radius:50%;height:100%;left:0;letter-spacing:.05rem;margin:0 auto;padding:12.5% 0 0;right:0;text-align:center;width:100%}#enp-quiz .enp-results-flow__item--total-views{background:#fff}#enp-quiz .enp-results-flow__item--quiz-starts{background:#eaf8f1;bottom:2.5%;height:65%;padding-top:8%;position:absolute;width:65%}#enp-quiz .enp-results-flow__item--quiz-finishes{background:#b8e8cf;bottom:5%;height:35%;position:absolute;width:35%}#enp-quiz .enp-results-flow__title{color:#444;font-size:.7rem;margin-bottom:0;text-transform:uppercase}@media(min-width:700px){#enp-quiz .enp-results-flow__title{font-weight:700;margin-bottom:2px}}#enp-quiz .enp-results-flow__number{font-size:1.4rem;font-weight:700;line-height:1.2}#enp-quiz .enp-results-flow__number--total-views{font-size:2rem}#enp-quiz .enp-results-flow__number--quiz-starts{font-size:1.65rem}#enp-quiz .enp-results-flow__percentage{color:#444;display:inline-block;font-size:.8rem;font-weight:400;left:-.1rem;position:relative;top:-.7em}#enp-quiz .enp-results-flow__percentage:after{color:#444;content:"%";font-size:.7rem;position:absolute;right:-.75rem}#enp-quiz .enp-results-questions__section{background:#f5f5f5;border-bottom:1px solid #ddd;border-top:1px solid #ddd;margin-bottom:3rem;margin-top:5rem;padding-bottom:3rem;padding-top:5rem}#enp-quiz .enp-results-questions__header{align-items:flex-start;flex-direction:column}@media(min-width:25pc){#enp-quiz .enp-results-questions__header{align-items:flex-end;display:flex;flex-direction:row;justify-content:space-between}}#enp-quiz .enp-results-questions__key,#enp-quiz .enp-results-questions__title{font-size:1.5rem;text-transform:uppercase}#enp-quiz .enp-results-questions{list-style:none;margin-left:0}#enp-quiz .enp-results-question{font-size:1rem;margin-bottom:1rem;padding:0;width:100%}#enp-quiz .enp-results-question__header{padding:1rem 1.2rem;position:relative}#enp-quiz .enp-results-question__question,#enp-quiz .enp-results-question__stats{font-size:1rem;line-height:1.4}#enp-quiz .enp-results-question__question{font-weight:400}@media(min-width:25pc){#enp-quiz .enp-results-question__question{margin-bottom:0;padding-right:7em}}#enp-quiz .enp-results-question__stats{font-size:.9rem}@media(min-width:25pc){#enp-quiz .enp-results-question__stats{bottom:1rem;position:absolute;right:1.2rem;text-align:right}}#enp-quiz .enp-results-question__stats,#enp-quiz .enp-results-questions__key{font-weight:300}#enp-quiz .enp-results-question__content{padding:2rem 1.2rem 1.2rem}#enp-quiz .enp-results-question__deep-stats{display:flex;justify-content:space-around;list-style:none;margin-left:0;text-align:center}#enp-quiz .enp-results-question__deep-stat__number{font-size:1.8rem;line-height:1;position:relative}#enp-quiz .enp-results-question__deep-stat__number--correct,#enp-quiz .enp-results-question__deep-stat__number--finishes{color:#319461}#enp-quiz .enp-results-question__deep-stat__number--incorrect{color:#e97763}#enp-quiz .enp-results-question__deep-stat__number--correct:after,#enp-quiz .enp-results-question__deep-stat__number--finishes:after,#enp-quiz .enp-results-question__deep-stat__number--incorrect:after{content:"%";font-size:.9rem;position:absolute;right:-1rem;top:.3rem}#enp-quiz .enp-results-question__deep-stat__label{font-size:.8rem;text-transform:uppercase}#enp-quiz .enp-results-question__options{list-style:none;margin-bottom:0;margin-left:0}#enp-quiz .enp-results-question__option{border-top:1px solid #ddd;padding:.8rem .8rem .8rem .4rem}@media(min-width:25pc){#enp-quiz .enp-results-question__option{display:flex;flex-direction:row;justify-content:space-between}}#enp-quiz .enp-results-question__option:first-of-type{margin-top:1.4rem}#enp-quiz .enp-results-question__option--correct{background:#eaf8f1}#enp-quiz .enp-results-question__option__text{flex-grow:100;margin-right:1rem}#enp-quiz .enp-results-question__option__text__helper{font-size:1.5rem;font-weight:300;margin-right:.4rem;text-transform:uppercase}@media(min-width:25pc){#enp-quiz .enp-results-question__option__icon{margin-right:.3rem;min-width:1.6rem}}#enp-quiz .enp-results-question__option__icon--incorrect{fill:#e97763;opacity:.5}#enp-quiz .enp-results-question__option__icon--correct{fill:#319461;opacity:1}#enp-quiz .enp-results-question__option__percentage--incorrect{color:#e97763}#enp-quiz .enp-results-question__option__percentage--correct{color:#319461}#enp-quiz .enp-results-question__option__number-selected{font-weight:300}#enp-quiz .enp-slider-responses__title{font-size:1.5rem;font-weight:400;margin-top:1.6rem;text-transform:uppercase}#enp-quiz .enp-slider-responses__line-chart .ct-point{stroke-width:8px}#enp-quiz .enp-slider-responses__line-chart--high,#enp-quiz .enp-slider-responses__line-chart--low{stroke:#bf5700}#enp-quiz .enp-slider-responses__line-chart--correct{stroke:#3bb275}#enp-quiz .enp-slider-responses-table{width:100%}#enp-quiz .enp-slider-responses-table tr:nth-child(even) td{background-color:#fff}#enp-quiz .enp-slider-responses-table tr.enp-slider-responses-table__response--correct td{background-color:#eaf8f1}#enp-quiz .enp-slider-responses-table__content{box-shadow:none;padding-top:1rem}#enp-quiz .enp-slider-responses-table--hide-zero .enp-slider-responses-table__frequency--zero{display:none}#enp-quiz .enp-slider-responses-table__response-frequency{align-items:center;display:flex;justify-content:space-between}#enp-quiz .enp-slider-responses-table__toggle-zero-frequency{background:#fff;border:0;border-radius:3px;box-shadow:inset 1px 1px 0 #ccc,inset -1px -1px 0 #ccc;color:#444;cursor:pointer;font-family:tablet-gothic,helvetica neue,helvetica,arial,sans-serif;font-size:.9rem;font-weight:400;letter-spacing:0;line-height:1.5;margin:0;min-height:3.065rem;padding:0 .6rem;position:relative;text-align:left;text-transform:none;transition:all .2s cubic-bezier(0,0,.3,1);width:auto;z-index:9}.enp-quiz-results #enp-quiz .enp-aside{border:0}.enp-quiz-results .enp-results-questions__title__quiz-title{clip:rect(1px,1px,1px,1px);height:1px;left:-625pc;overflow:hidden;position:absolute!important;top:auto;width:1px}#enp-quiz .enp-results--ab{display:block;margin-bottom:3rem}@media(min-width:750pt){#enp-quiz .enp-results--ab{align-content:flex-end;display:flex;flex-wrap:wrap;padding:10px;width:50%}#enp-quiz .enp-results--a{border-right:1px solid #ddd;padding-right:1rem}#enp-quiz .enp-results--b{padding-left:1rem}}#enp-quiz .enp-results-title--ab,#enp-quiz .enp-results__container--ab .enp-results-flow__container{min-width:100%}#enp-quiz .enp-results--loser .enp-results-flow__item{border:2px solid #bf5700}#enp-quiz .enp-results--loser .enp-results-flow__item--quiz-starts{background:#ffc696}#enp-quiz .enp-results--loser .enp-results-flow__item--quiz-finishes{background:#ffb06d}#enp-quiz .enp-results--loser .enp-results-questions__title,#enp-quiz .enp-results--loser th{color:#964400}#enp-quiz .enp-results--winner .enp-results-questions__title,#enp-quiz .enp-results--winner th{color:#319461}#enp-quiz .enp-results-title--a,#enp-quiz .enp-results-title--b{background:transparent}#enp-quiz .enp-ab-scores{margin-left:auto;margin-right:auto;max-width:40pc;padding-left:20px;padding-right:20px}#enp-quiz .enp-ab-scores:after{clear:both;content:"";display:table}@media(min-width:700px){#enp-quiz .enp-ab-scores{max-width:840px}}@media(min-width:750pt){#enp-quiz .enp-ab-scores{max-width:750pt}}#enp-quiz .enp-ab-scores th.enp-quiz-scores-table__label,#enp-quiz .enp-ab-scores th.enp-quiz-scores-table__score{padding-left:0;padding-right:0}#enp-quiz .enp-ab-scores__title{font-size:1.5rem;padding-left:50px;text-transform:uppercase}#enp-quiz .enp-quiz-score__line-chart .enp-test-loser .ct-line,#enp-quiz .enp-quiz-score__line-chart .enp-test-loser .ct-point{stroke:#bf5700}#enp-quiz .enp-quiz-scores{margin-top:0}#enp-quiz .enp-ab-scores .enp-quiz-scores-table,#enp-quiz .enp-question-results{margin-bottom:1.6rem}@media(min-width:750pt){#enp-quiz .enp-ab-scores .enp-quiz-scores-table,#enp-quiz .enp-question-results{float:left;margin:0;width:48%}#enp-quiz .enp-ab-scores .enp-quiz-scores-table:first-of-type,#enp-quiz .enp-question-results:first-of-type{margin-right:4%}}#enp-quiz .enp-question-results__container{margin-left:auto;margin-right:auto;max-width:40pc;padding-left:20px;padding-right:20px}#enp-quiz .enp-question-results__container:after{clear:both;content:"";display:table}@media(min-width:700px){#enp-quiz .enp-question-results__container{max-width:840px}}@media(min-width:750pt){#enp-quiz .enp-question-results__container{max-width:750pt}}#enp-quiz .enp-question-results--ab .enp-results-questions__section{background:#fff;border:0;margin:1.6rem auto;padding:1.6rem 0}#enp-quiz .enp-question-results--ab .enp-results-questions__container{padding:0}#enp-quiz .enp-ab-new-embed-code__section{margin-bottom:2rem;margin-left:auto;margin-right:auto;max-width:540px;padding-bottom:2rem;padding-left:20px;padding-right:20px}#enp-quiz .enp-ab-new-embed-code__section:after{clear:both;content:"";display:table}#enp-quiz .enp-ab-new-embed-code__section .enp-ab-embed-code{margin:0;padding:0}#enp-quiz .enp-ab-embed-code__section{background:#f5f5f5;border-bottom:1px solid #ddd;border-top:1px solid #ddd;margin-bottom:3rem;margin-top:5rem;padding-bottom:3rem;padding-top:5rem}#enp-quiz .enp-ab-embed-code{margin-left:auto;margin-right:auto;max-width:40pc;padding-left:20px;padding-right:20px}#enp-quiz .enp-ab-embed-code:after{clear:both;content:"";display:table}#enp-quiz .enp-ab-embed-code__title{font-size:1.5rem;text-transform:uppercase}#enp-quiz .enp-embed-code__textarea{margin-bottom:0}#enp-quiz .enp-embed-code__instructions{font-size:1.1rem}#enp-quiz .enp-slider{margin-bottom:1.6rem}#enp-quiz .enp-slider-input__container{align-items:center;display:flex;justify-content:center;margin:1.6rem auto;position:relative}#enp-quiz .enp-slider-input__label{color:#5e5e5e;display:block;font-size:.85rem;font-weight:400;text-transform:uppercase}#enp-quiz .enp-slider-input__prefix,#enp-quiz .enp-slider-input__suffix{font-size:1rem}#enp-quiz .enp-slider-input__prefix{margin-right:.2rem;white-space:pre}#enp-quiz .enp-slider-input__suffix{margin-left:.2rem;white-space:pre}#enp-quiz .enp-slider-input__input{background:#fff;border:1px solid #aaa;border-radius:3px;font-family:tablet-gothic,helvetica neue,helvetica,arial,sans-serif;font-size:1rem;margin-bottom:0;max-width:100%;padding:.75rem;transition:all .25s cubic-bezier(0,0,.3,1);width:auto}@media(min-width:700px){#enp-quiz .enp-slider-input__input{padding:.8rem}}#enp-quiz .enp-slider-input__input--incorrect{color:#bf5700}#enp-quiz .enp-slider-input__input--correct{color:#319461}#enp-quiz .enp-slider-input__input--invalid-animation{box-shadow:0 0 2px 1px #e97763}#enp-quiz .enp-slider_input__range-helper{bottom:-1.2rem;font-size:.8rem;position:absolute}#enp-quiz .enp-slider_input__range-helper--low{left:0}#enp-quiz .enp-slider_input__range-helper--high{right:0}#enp-quiz .enp-slider-input__range-helper__number{color:#666;position:relative}#enp-quiz .ui-slider-range-show-correct__tooltip-container{position:relative}#enp-quiz .ui-slider-range-show-correct__tooltip{background-color:#fff;border:2px solid #3bb275;border-radius:50%;height:1.1rem;margin-left:-.55rem;position:absolute;top:-.4rem;width:1.1rem;z-index:9999}#enp-quiz .ui-slider-range-show-correct__tooltip--low{left:0}#enp-quiz .ui-slider-range-show-correct__tooltip--high{right:-.55rem}#enp-quiz .ui-slider-range-show-correct__tooltip__text{color:#287950;display:inline-block;font-size:.825rem;min-width:100%;position:relative;text-align:center;text-shadow:0 1px 0 #fff;top:-1.35rem}#enp-quiz .enp-slider{background:#ddd;position:relative;text-align:left}#enp-quiz .enp-slider .ui-helper-hidden{display:none}#enp-quiz .enp-slider .ui-helper-hidden-accessible{border:0;clip:rect(0 0 0 0);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px}#enp-quiz .enp-slider .ui-helper-reset{border:0;font-size:100%;line-height:1.3;list-style:none;margin:0;outline:0;padding:0;text-decoration:none}#enp-quiz .enp-slider .ui-helper-clearfix:after,#enp-quiz .enp-slider .ui-helper-clearfix:before{border-collapse:collapse;content:"";display:table}#enp-quiz .enp-slider .ui-helper-clearfix:after{clear:both}#enp-quiz .enp-slider .ui-helper-clearfix{min-height:0}#enp-quiz .enp-slider .ui-helper-zfix{filter:alpha(opacity=0);height:100%;left:0;opacity:0;position:absolute;top:0;width:100%}#enp-quiz .enp-slider .ui-front{z-index:100}#enp-quiz .enp-slider .ui-state-disabled{cursor:default!important}#enp-quiz .enp-slider .ui-icon{background-repeat:no-repeat;display:block;overflow:hidden;text-indent:-99999px}#enp-quiz .enp-slider .ui-widget-overlay{height:100%;left:0;position:fixed;top:0;width:100%}#enp-quiz .enp-slider .ui-slider-handle{background:#fff;border:1px solid #aaa;border-radius:50%;cursor:default;height:1.2rem;margin-left:-.6rem;position:absolute;top:-.4rem;touch-action:none;transition:opacity .2s cubic-bezier(0,0,.3,1),height .18s cubic-bezier(0,0,.3,1),width .18s cubic-bezier(0,0,.3,1),transform .18s cubic-bezier(0,0,.3,1),-webkit-transform .18s cubic-bezier(0,0,.3,1);width:1.2rem;z-index:2}#enp-quiz .enp-slider .ui-slider-handle:focus{box-shadow:0 0 3px 1px #4d90fe;outline:0}#enp-quiz .enp-slider .ui-slider-handle--correct,#enp-quiz .enp-slider .ui-slider-handle--incorrect{height:1.1rem;margin-left:-.55rem;top:-.4rem;width:1.1rem}#enp-quiz .enp-slider .ui-slider-handle--incorrect{border:2px solid #bf5700;z-index:1}#enp-quiz .enp-slider .ui-slider-handle--correct{border:2px solid #3bb275;z-index:99999}#enp-quiz .enp-slider .ui-slider-range{background-position:0 0;border:0;display:block;font-size:.7rem;height:100%;position:absolute;top:0;z-index:1}#enp-quiz .enp-slider .ui-slider-range-show-correct{background:#3bb275;z-index:9}#enp-quiz .enp-slider .ui-slider-range-min{background:#3bb275;left:0}#enp-quiz .enp-slider .ui-slider-range-max{right:0}#enp-quiz .enp-slider.ui-state-disabled .ui-slider-handle,#enp-quiz .enp-slider.ui-state-disabled .ui-slider-range{-webkit-filter:inherit;filter:inherit}#enp-quiz .ui-slider-horizontal{height:.3rem}#enp-quiz .enp-question__answered .enp-slider{background:#bbb}#enp-quiz .enp-question__answered .ui-slider-range-min{background:#fff} \ No newline at end of file +html{font-size:16px!important}html #enp-quiz{box-sizing:border-box}body #enp-quiz{background:#fff;overflow:hidden}#enp-quiz *,#enp-quiz :after,#enp-quiz :before{box-sizing:inherit}#enp-quiz ol,#enp-quiz ul{margin:0 0 1.6rem 1.25rem;padding:0}#enp-quiz textarea{margin-bottom:1rem}#enp-quiz button,#enp-quiz button:active,#enp-quiz button:focus,#enp-quiz button:hover,#enp-quiz iframe,#enp-quiz input[type=button],#enp-quiz input[type=button]:active,#enp-quiz input[type=button]:focus,#enp-quiz input[type=button]:hover,#enp-quiz input[type=reset],#enp-quiz input[type=reset]:active,#enp-quiz input[type=reset]:focus,#enp-quiz input[type=reset]:hover,#enp-quiz input[type=submit],#enp-quiz input[type=submit]:active,#enp-quiz input[type=submit]:focus,#enp-quiz input[type=submit]:hover{border:none}#enp-quiz .enp-screen-reader-text{clip:rect(1px,1px,1px,1px);position:absolute!important;left:-10000px;top:auto;width:1px;height:1px;overflow:hidden}#enp-quiz .enp-screen-reader-text:active,#enp-quiz .enp-screen-reader-text:focus,#enp-quiz .enp-screen-reader-text:hover{background-color:#f1f1f1;border-radius:3px;box-shadow:0 0 2px 2px rgba(0,0,0,.6);clip:auto!important;color:#21759b;display:block;font-size:14px;font-weight:700;height:auto;left:5px;line-height:normal;padding:15px 23px 14px;text-decoration:none;top:5px;width:auto;z-index:100000}#enp-quiz .enp-accordion-header{background:#fff;width:100%;box-shadow:inset 1px 1px 0 #ccc,inset -1px -1px 0 #ccc;color:#1d1c25;font-family:Arial,monospace,helvetica,arial,sans-serif;font-size:.9rem;font-weight:400;line-height:1.5;text-transform:none;letter-spacing:0;text-align:left;border:none;border-radius:3px;min-height:3.065rem;padding:1rem 2rem 1rem 1rem;margin:1.6rem 0 0;position:relative;z-index:9;cursor:pointer;transition:all .2s cubic-bezier(0,0,.3,1)}#enp-quiz .enp-accordion-header:first-of-type{margin-top:0}#enp-quiz .enp-accordion-header .enp-accordion-header__icon{position:absolute;fill:#e8e4ed;right:.75rem;bottom:.75rem;transition:all .35s cubic-bezier(0,0,.3,1)}#enp-quiz .enp-accordion-header--open .enp-accordion-header__icon{transform:rotateX(180deg) translateY(2px)}#enp-quiz .enp-accordion-content{background:#fff;width:100%;box-shadow:inset 1px -1px 0 #ccc,inset -1px -1px 0 #ccc;display:block;position:relative;height:auto;overflow:visible;margin-bottom:1.6rem}#enp-quiz .enp-accordion-content--closed{margin-top:0;padding-top:0;animation:d .25s cubic-bezier(0,0,.3,1) forwards;display:none}#enp-quiz .enp-accordion-content--open{padding-top:1.6rem;margin-bottom:2rem;animation:b .45s cubic-bezier(0,0,.3,1) forwards}#enp-quiz .enp-quiz-message{max-width:640px;margin-left:auto;margin-right:auto;padding-left:20px;padding-right:20px;max-width:512px;background:#fff;border:1px solid #eee;border-bottom:1px solid #ccc;padding:1rem .375rem;margin-bottom:1.6rem;position:fixed;bottom:0;left:0}#enp-quiz .enp-quiz-message:after{content:"";display:table;clear:both}#enp-quiz .enp-quiz-message__title{font-size:1rem;text-transform:uppercase}#enp-quiz .enp-message__list{list-style:none;margin-left:0;font-size:1.1rem;margin-bottom:0}#enp-quiz .enp-quiz-message--error{border-left:6px solid #bf5700;color:#bf5700}#enp-quiz .enp-quiz-message__title--error{color:#964400}#enp-quiz .enp-quiz-message--success{border-left:6px solid #60aaad;color:#4e9497}#enp-quiz .enp-quiz-message__title--success{color:#4e9497}#enp-quiz .enp-quiz-message--note{border-left:6px solid #cca562}#enp-quiz .enp-quiz-message__title--note{color:#242f42}#enp-quiz .enp-quiz-message__close{border:none;background:none;box-shadow:none;padding:0;margin:0;position:absolute;top:5px;right:5px}#enp-quiz .enp-quiz-message--ajax{margin-bottom:.6rem;animation:a .3s}#enp-quiz .enp-quiz-message-ajax-container{z-index:9999;position:fixed;bottom:10px}#enp-quiz .enp-quiz-message--saving__spinner{margin-left:-10px}#enp-quiz .enp-quiz-message--saving__text{font-size:1rem}#enp-quiz input.limited-chars,#enp-quiz textarea.limited-chars{margin-bottom:.2rem}#enp-quiz .limited-chars__container{color:#fdfcfd;font-size:.8rem;display:block;text-align:right;margin-bottom:1.2rem}#enp-quiz .limited-chars__counter{color:#e8e4ed}#enp-quiz .limited-chars__container--error,#enp-quiz .limited-chars__container--error .limited-chars__counter{color:#964400}#enp-quiz input.has-error,#enp-quiz textarea.has-error{border:1px solid #bf5700}#enp-quiz input.has-error:focus,#enp-quiz textarea.has-error:focus{outline-color:#bf5700}#enp-quiz .enp-tooltip{position:relative}#enp-quiz .enp-tooltip__activator:focus+.enp-tooltip__description,#enp-quiz .enp-tooltip__activator:focus>.enp-tooltip__description{display:block}#enp-quiz .enp-tooltip__description{display:none;position:absolute;left:103%;margin-bottom:2rem;border-radius:3px;background:#faf9fb;font-size:.9rem;padding:.9rem;max-width:200px}.enp-sticky{position:relative;left:0;right:0;top:0;z-index:999}.enp-sticky.enp-sticky--fixed{position:fixed}.enp-breadcrumb-link{font-size:.85rem}.enp-breadcrumb-link__icon{position:relative;top:.45rem;left:.4rem}body #enp-quiz{color:#1d1c25;font-family:Arial,monospace,helvetica,arial,sans-serif;font-size:1em;line-height:1.6;font-weight:400}@media (min-width:700px){body #enp-quiz{font-size:1.3em}}#enp-quiz h1,#enp-quiz h2,#enp-quiz h3,#enp-quiz h4,#enp-quiz h5,#enp-quiz h6{font-family:Arial,monospace,helvetica,arial,sans-serif;color:#5d5e5f;clear:both;margin:0 0 .2rem;font-weight:700;line-height:1.2em}#enp-quiz h1{font-size:2em}#enp-quiz h2{font-size:1.75em}#enp-quiz h3{font-size:1.475em}#enp-quiz h4{font-size:1.3em}#enp-quiz h5{font-size:1.125em}#enp-quiz h6{font-size:1em}#enp-quiz p+h1,#enp-quiz p+h2,#enp-quiz p+h3,#enp-quiz p+h4,#enp-quiz p+h5,#enp-quiz p+h6,#enp-quiz ul+h1,#enp-quiz ul+h2,#enp-quiz ul+h3,#enp-quiz ul+h4,#enp-quiz ul+h5,#enp-quiz ul+h6{margin-top:1.8em}#enp-quiz p{font-size:.85em;margin-bottom:1.125em;font-weight:300}#enp-quiz ol,#enp-quiz ul{margin:0 0 1.6em 1.25em}#enp-quiz ul{list-style:disc}#enp-quiz ol{list-style:decimal}#enp-quiz li>ol,#enp-quiz li>ul{margin-bottom:0;margin-left:1.6em}#enp-quiz b,#enp-quiz strong{font-weight:700}#enp-quiz cite,#enp-quiz dfn,#enp-quiz em{font-family:georgia,times,serif;font-style:italic}#enp-quiz pre{background:#eee;font-family:Courier\ 10 Pitch,Courier,monospace;font-size:.95em;line-height:1.6;margin-bottom:1.6em;padding:1.6em;overflow:auto;max-width:100%}#enp-quiz .code,#enp-quiz code,#enp-quiz kbd,#enp-quiz tt,#enp-quiz var{font:.7em Monaco,Consolas,Andale Mono,DejaVu Sans Mono,monospace}#enp-quiz table{border:none}#enp-quiz table th{font-size:.8rem;text-transform:uppercase;border:none;border-bottom:1px solid #ddd}#enp-quiz table td,#enp-quiz table th{font-family:Arial,monospace,helvetica,arial,sans-serif}#enp-quiz table td{font-size:1rem;border:none;border-bottom:1px solid #eee}#enp-quiz table tr:nth-child(2n) td{background:#f8f8f8}#enp-quiz table tr:last-child td{border-bottom:none}#enp-quiz figure{margin:0}#enp-quiz img{height:auto;max-width:100%}#enp-quiz a{color:#bf5700;text-decoration:none;transition:color .2s;touch-action:manipulation}#enp-quiz a .enp-icon{fill:#bf5700}#enp-quiz a:active,#enp-quiz a:focus,#enp-quiz a:hover{color:#964400}#enp-quiz a:active .enp-icon,#enp-quiz a:focus .enp-icon,#enp-quiz a:hover .enp-icon{fill:#964400}#enp-quiz button:focus{outline-color:#4d90fe;outline-offset:-2px;outline-style:auto;outline-width:5px}#enp-quiz .enp-btn{text-align:center;border:none;border-radius:3px;padding:.85em 1.4em .75em;font-size:15px;font-weight:400;letter-spacing:.05em;color:#fff;box-shadow:inset 0 -2px 0 rgba(0,0,0,.2);background:#bf5700;cursor:pointer;text-transform:uppercase;transition:all .2s;line-height:1.6}#enp-quiz .enp-btn:focus,#enp-quiz .enp-btn:hover{color:#fff;box-shadow:none;background:#964400}#enp-quiz .enp-btn:active{color:#fff;box-shadow:inset 0 2px 0 rgba(0,0,0,.1);background:#4c4761}#enp-quiz .enp-btn:focus{outline-color:#4d90fe;outline-offset:-2px;outline-style:auto;outline-width:5px}#enp-quiz .enp-btn:disabled,#enp-quiz .enp-btn:disabled:focus,#enp-quiz .enp-btn:disabled:hover{background:#bf5700;cursor:default;opacity:.5}#enp-quiz .enp-btn--add{text-align:center;border:none;border-radius:3px;padding:.85em 1.4em .75em;font-size:15px;font-weight:400;letter-spacing:.05em;color:#fff;box-shadow:inset 0 -2px 0 rgba(0,0,0,.2);background:#bf5700;cursor:pointer;text-transform:uppercase;transition:all .2s;line-height:1.6;border:1px dashed #e8e4ed;background:none;color:#545454;box-shadow:none;width:100%}#enp-quiz .enp-btn--add:focus,#enp-quiz .enp-btn--add:hover{color:#fff;box-shadow:none;background:#964400}#enp-quiz .enp-btn--add:active{color:#fff;box-shadow:inset 0 2px 0 rgba(0,0,0,.1);background:#4c4761}#enp-quiz .enp-btn--add:focus{outline-color:#4d90fe;outline-offset:-2px;outline-style:auto;outline-width:5px}#enp-quiz .enp-btn--add:disabled,#enp-quiz .enp-btn--add:disabled:focus,#enp-quiz .enp-btn--add:disabled:hover{background:#bf5700;cursor:default;opacity:.5}#enp-quiz .enp-btn--add:focus,#enp-quiz .enp-btn--add:hover{border:1px dashed #b5a6c4;color:#b5a6c4;background:hsla(0,0%,100%,.9)}#enp-quiz .enp-btn--disabled{opacity:.65;cursor:default}#enp-quiz .enp-btn--enabled{animation:f .6s}#enp-quiz .enp-icon{width:24px;height:24px;transition:all .2s}#enp-quiz .enp-page-title{font-size:1.6rem}@keyframes a{0%{opacity:0;transform:translate3d(0,100px,0)}to{opacity:1;transform:translateZ(0)}}@keyframes b{0%{opacity:0;height:auto;transform:translate3d(0,-20px,0)}to{opacity:1;height:auto;transform:translateZ(0)}}@keyframes c{0%{opacity:0;height:auto;transform:translate3d(0,-20px,0)}to{opacity:.8;height:auto;transform:translateZ(0)}}@keyframes d{0%{overflow:hidden;height:100px;opacity:1;transform:translateZ(0)}to{height:0;opacity:0;transform:translate3d(0,-20px,0)}}@keyframes e{0%{opacity:1;transform:translateZ(0)}to{padding:0;margin:0;opacity:0;height:0;z-index:-1;transform:translate3d(-200px,0,0)}}@keyframes f{0%{opacity:.8;transform:scaleX(1);box-shadow:0 0 0 rgba(0,0,0,.3)}40%{opacity:1}70%{opacity:1;transform:scale3d(1.1,1.1,1);box-shadow:0 0 8px rgba(0,0,0,.4)}to{opacity:1;transform:scaleX(1);box-shadow:0 0 0 rgba(0,0,0,.3),inset 0 2px 0 rgba(0,0,0,.2)}}@keyframes g{0%{opacity:0}to{opacity:1}}@keyframes h{0%{transform:translate3d(0,-200px,0)}to{transform:translateZ(0)}}.spinner{margin:0 auto;width:70px;text-align:center}.spinner>div{width:18px;height:18px;background-color:#333;border-radius:100%;display:inline-block;animation:i 1.4s infinite ease-in-out both}.spinner .bounce1{animation-delay:-.32s}.spinner .bounce2{animation-delay:-.16s}@keyframes i{0%,80%,to{transform:scale(0)}40%{transform:scale(1)}}#enp-quiz{transition:background .25s cubic-bezier(0,0,.3,1)}#enp-quiz .enp-container{max-width:640px;margin-left:auto;margin-right:auto;padding-left:20px;padding-right:20px}#enp-quiz .enp-container:after{content:"";display:table;clear:both}#enp-quiz .enp-aside{padding:1.6rem;margin-bottom:1.6rem;background:#fff;border-radius:3px;border:1px solid #eee;border-bottom-color:#ccc;max-width:640px;margin-left:auto;margin-right:auto;padding-left:20px;padding-right:20px;max-width:512px;font-size:1.2rem}@media (min-width:700px){#enp-quiz .enp-aside{margin-bottom:2.6rem;padding:1.6rem 2rem}}#enp-quiz .enp-aside:after{content:"";display:table;clear:both}#enp-quiz .enp-aside__title{font-size:1rem;text-transform:uppercase;font-weight:600}#enp-quiz .enp-page-title{border-bottom:2px solid #1e1c26}#enp-quiz fieldset{border:none;margin:0;padding:0}#enp-quiz .enp-label,#enp-quiz .enp-legend{display:block;color:#343242;font-weight:400;font-size:.85rem;text-transform:uppercase}#enp-quiz .enp-legend{padding-top:1.6rem;margin-bottom:.2rem;border:none}#enp-quiz .enp-input{font-size:1rem;font-family:Arial,monospace,helvetica,arial,sans-serif;padding:.8rem .5rem;background:#fff;border:1px solid #aaa;border-radius:3px;width:20rem;max-width:100%;margin-bottom:1.2rem}@media (min-width:700px){#enp-quiz .enp-input{padding:.8rem}}#enp-quiz .enp-input.enp-input--has-description{margin-bottom:.2rem}#enp-quiz .enp-input-description,#enp-quiz .enp-textarea-description{margin-bottom:1rem;font-size:.85rem}#enp-quiz .enp-input-description--before,#enp-quiz .enp-textarea-description--before{margin-bottom:0}#enp-quiz .enp-input::-webkit-input-placeholder,#enp-quiz .enp-textarea::-webkit-input-placeholder{font-family:Arial,monospace,helvetica,arial,sans-serif;font-weight:300;color:#7a7697}#enp-quiz .enp-input:-ms-input-placeholder,#enp-quiz .enp-input::-ms-input-placeholder,#enp-quiz .enp-textarea:-ms-input-placeholder,#enp-quiz .enp-textarea::-ms-input-placeholder{font-family:Arial,monospace,helvetica,arial,sans-serif;font-weight:300;color:#7a7697}#enp-quiz .enp-input::placeholder,#enp-quiz .enp-textarea::placeholder{font-family:Arial,monospace,helvetica,arial,sans-serif;font-weight:300;color:#7a7697}#enp-quiz .enp-textarea{font-size:1rem;font-family:Arial,monospace,helvetica,arial,sans-serif;padding:.8rem .5rem;background:#fff;border:1px solid #aaa;border-radius:3px;width:20rem;max-width:100%;margin-bottom:1.2rem;line-height:1.5;width:100%}@media (min-width:700px){#enp-quiz .enp-textarea{padding:.8rem}}#enp-quiz .enp-textarea:focus{outline-color:#4d90fe;outline-offset:-2px;outline-style:auto;outline-width:5px}#enp-quiz .enp-textarea.enp-textarea--has-description{margin-bottom:.2rem}#enp-quiz .enp-textarea.enp-textarea--has-description--before{margin-bottom:1.2rem}#enp-quiz .enp-embed-code{font-size:1rem;font-family:Arial,monospace,helvetica,arial,sans-serif;padding:.8rem .5rem;background:#fff;border:1px solid #aaa;border-radius:3px;width:20rem;max-width:100%;margin-bottom:1.2rem;line-height:1.5;width:100%;padding:1.6rem;font-size:.9rem;font-family:Monaco,Consolas,Andale Mono,DejaVu Sans Mono,monospace}@media (min-width:700px){#enp-quiz .enp-embed-code{padding:.8rem}}#enp-quiz .enp-embed-code:focus{outline-color:#4d90fe;outline-offset:-2px;outline-style:auto;outline-width:5px}#enp-quiz .enp-preview-page-container,#enp-quiz .enp-publish-page-container,#enp-quiz .enp-quiz-form-container{max-width:640px;margin-left:auto;margin-right:auto;padding:6rem 20px 4rem;position:relative;background:#f8f8f8}#enp-quiz .enp-preview-page-container:after,#enp-quiz .enp-publish-page-container:after,#enp-quiz .enp-quiz-form-container:after{content:"";display:table;clear:both}@media (min-width:700px){#enp-quiz .enp-preview-page-container,#enp-quiz .enp-publish-page-container,#enp-quiz .enp-quiz-form-container{max-width:840px}}@media (min-width:1000px){#enp-quiz .enp-preview-page-container,#enp-quiz .enp-publish-page-container,#enp-quiz .enp-quiz-form-container{max-width:1000px}}#enp-quiz .enp-quiz-form{max-width:640px;margin-left:auto;margin-right:auto;padding-left:20px;padding-right:20px;max-width:512px;padding-left:0;padding-right:0}#enp-quiz .enp-quiz-form:after{content:"";display:table;clear:both}#enp-quiz .enp-quiz-form .enp-input,#enp-quiz .enp-quiz-form .enp-textarea{width:100%}#enp-quiz .enp-quiz-title__label{display:block;color:#343242;font-weight:400;font-size:.85rem;text-transform:uppercase;font-weight:500}#enp-quiz .enp-quiz-title__textarea{font-size:1rem;font-family:Arial,monospace,helvetica,arial,sans-serif;padding:.8rem .5rem;background:#fff;border:1px solid #aaa;border-radius:3px;width:20rem;max-width:100%;margin-bottom:1.2rem;font-weight:700;font-size:1.6rem;margin-bottom:1rem}@media (min-width:700px){#enp-quiz .enp-quiz-title__textarea{padding:.8rem}}#enp-quiz .enp-quiz-title__textarea::-webkit-input-placeholder{font-weight:700}#enp-quiz .enp-quiz-title__textarea:-ms-input-placeholder,#enp-quiz .enp-quiz-title__textarea::-ms-input-placeholder{font-weight:700}#enp-quiz .enp-quiz-title__textarea::placeholder{font-weight:700}#enp-quiz textarea{color:#000}#enp-quiz .enp-accordion-container{margin-bottom:1.6rem;position:relative}#enp-quiz .enp-question-content{background:#fff;width:100%;padding-top:0;position:relative}#enp-quiz .enp-question-inner{padding:1.6rem 1.6rem 1rem}@media (min-width:700px){#enp-quiz .enp-question-inner{padding-right:2.8rem;padding-left:2.9rem}}#enp-quiz .enp-question-title__label{display:block;color:#343242;font-weight:400;font-size:.85rem;text-transform:uppercase;font-weight:500}#enp-quiz .enp-question-title__textarea{font-size:1rem;font-family:Arial,monospace,helvetica,arial,sans-serif;padding:.8rem .5rem;background:#fff;border:1px solid #aaa;border-radius:3px;width:20rem;max-width:100%;margin-bottom:1.2rem;padding:1rem 1.2rem;font-size:1.3rem}@media (min-width:700px){#enp-quiz .enp-question-title__textarea{padding:.8rem}}#enp-quiz .enp-question-image-upload{text-align:center;border:none;border-radius:3px;padding:.85em 1.4em .75em;font-size:15px;font-weight:400;letter-spacing:.05em;color:#fff;box-shadow:inset 0 -2px 0 rgba(0,0,0,.2);background:#bf5700;cursor:pointer;line-height:1.6;border:1px dashed #e8e4ed;background:none;color:#545454;box-shadow:none;border:2px dashed #f5f3f7;color:#e8e4ed;transition:all .2s;background:#faf9fb;font-size:1rem;text-transform:uppercase;position:relative;margin-bottom:2rem;transform:translateZ(0);transition:all .3s cubic-bezier(0,0,.3,1)}#enp-quiz .enp-question-image-upload:focus,#enp-quiz .enp-question-image-upload:hover{color:#fff;box-shadow:none;background:#964400}#enp-quiz .enp-question-image-upload:active{color:#fff;box-shadow:inset 0 2px 0 rgba(0,0,0,.1);background:#4c4761}#enp-quiz .enp-question-image-upload:focus{outline-color:#4d90fe;outline-offset:-2px;outline-style:auto;outline-width:5px}#enp-quiz .enp-question-image-upload:disabled,#enp-quiz .enp-question-image-upload:disabled:focus,#enp-quiz .enp-question-image-upload:disabled:hover{background:#bf5700;cursor:default;opacity:.5}#enp-quiz .enp-question-image-upload:focus,#enp-quiz .enp-question-image-upload:hover{border:1px dashed #b5a6c4;background:hsla(0,0%,100%,.9);color:#b5a6c4;border:2px dashed #999}#enp-quiz .enp-question-image-upload .enp-question-image-upload__icon--photo{width:2.8rem;height:2.8rem;opacity:0;position:absolute;top:0;left:0;right:0;margin:0 auto;transform:translateZ(0);z-index:-1;transition:opacity .2s,transform .3s cubic-bezier(0,0,.3,1)}#enp-quiz .enp-question-image-upload .enp-question-image-upload__icon--add{width:1rem;height:1rem;border-radius:50%;background:#1e1c26;fill:#fff;padding:.02rem;background:#e8e4ed;fill:#faf9fb;margin-right:5px;position:relative;top:.2rem}#enp-quiz .enp-question-image-upload:active,#enp-quiz .enp-question-image-upload:focus,#enp-quiz .enp-question-image-upload:hover{padding-top:5rem;padding-bottom:2rem}#enp-quiz .enp-question-image-upload:active .enp-question-image-upload__icon--photo,#enp-quiz .enp-question-image-upload:focus .enp-question-image-upload__icon--photo,#enp-quiz .enp-question-image-upload:hover .enp-question-image-upload__icon--photo{opacity:1;z-index:1;transform:translate3d(0,1.75rem,0)}#enp-quiz .enp-question-image-upload:active .enp-question-image-upload__icon--add,#enp-quiz .enp-question-image-upload:focus .enp-question-image-upload__icon--add,#enp-quiz .enp-question-image-upload:hover .enp-question-image-upload__icon--add{fill:#fff;background:#b5a6c4}#enp-quiz .enp-question-image__container{position:relative;margin-bottom:1rem}#enp-quiz .enp-question-image{margin-bottom:1.2rem}#enp-quiz .enp-question-type__legend{display:block;color:#343242;font-weight:400;font-size:.85rem;text-transform:uppercase;padding-top:1.6rem;margin-bottom:.2rem;border:none}#enp-quiz .enp-question-type__input{clip:rect(1px,1px,1px,1px);position:absolute!important;left:-10000px;top:auto;width:1px;height:1px;overflow:hidden}#enp-quiz .enp-question-type__label{text-transform:capitalize;display:inline-block;padding:.2rem .5rem;border-radius:3px;cursor:pointer}#enp-quiz .enp-question-type__input:checked+.enp-question-type__label{background:#60aaad;color:#fff;text-shadow:0 0 1px rgba(0,0,0,.7)}#enp-quiz .enp-question-type__input:focus+.enp-question-type__label{z-index:8;outline-color:#4d90fe;outline-offset:-2px;outline-style:auto;outline-width:5px}#enp-quiz .enp-question-type__label{position:relative;z-index:9}#enp-quiz .enp-mc-options,#enp-quiz .enp-slider-options{margin-top:0;display:none;animation:d .25s cubic-bezier(0,0,.3,1) forwards;animation-delay:0s,.05s}#enp-quiz .enp-question-type__input--mc:checked~.enp-mc-options,#enp-quiz .enp-question-type__input--slider:checked~.enp-slider-options{visibility:visible;display:block;animation:g .45s cubic-bezier(0,0,.3,1) forwards}#enp-quiz .enp-mc-options__list{list-style:none;margin-left:0}#enp-quiz .enp-mc-option{position:relative;padding-left:6px}@media (min-width:700px){#enp-quiz .enp-mc-option{padding-left:0}}#enp-quiz .enp-mc-options__legend{display:block;color:#343242;font-weight:400;font-size:.85rem;text-transform:uppercase;font-weight:500}#enp-quiz .enp-mc-option__add,#enp-quiz .enp-mc-option__button--correct,#enp-quiz .enp-mc-option__button--delete{display:none}#enp-quiz .enp-question-type__input--mc:checked~.enp-mc-options .enp-mc-option__add,#enp-quiz .enp-question-type__input--mc:checked~.enp-mc-options .enp-mc-option__button--correct,#enp-quiz .enp-question-type__input--mc:checked~.enp-mc-options .enp-mc-option__button--delete{display:block}#enp-quiz .enp-button__question-image-delete,#enp-quiz .enp-mc-option__button--delete{border:none;background:none;box-shadow:none;padding:0;margin:0;position:absolute;top:9px;right:-24px;fill:#bbb;cursor:pointer}@media (min-width:700px){#enp-quiz .enp-button__question-image-delete,#enp-quiz .enp-mc-option__button--delete{right:-30px}}#enp-quiz .enp-button__question-image-delete:focus,#enp-quiz .enp-button__question-image-delete:hover,#enp-quiz .enp-mc-option__button--delete:focus,#enp-quiz .enp-mc-option__button--delete:hover{fill:#bf5700}#enp-quiz .enp-mc-option__button--correct{border:none;background:none;box-shadow:none;padding:0;margin:0;position:absolute;top:8px;left:-24px}@media (min-width:700px){#enp-quiz .enp-mc-option__button--correct{left:-35px}}#enp-quiz .enp-mc-option__button--correct .enp-mc-option__icon--correct{border-radius:50%;background:#1e1c26;padding:.05em;width:28px;height:28px;fill:#fff;background:#fff;cursor:pointer;border:2px solid #c1893e;transition:all .2s}@media (min-width:700px){#enp-quiz .enp-mc-option__button--correct .enp-mc-option__icon--correct{padding:.15em}}#enp-quiz .enp-mc-option__button--correct:focus .enp-mc-option__icon--correct,#enp-quiz .enp-mc-option__button--correct:hover .enp-mc-option__icon--correct{background:#fff;border-color:#60aaad;fill:#60aaad}#enp-quiz .enp-mc-option__button--correct:disabled{opacity:1}#enp-quiz .enp-mc-option__button--correct:disabled .enp-mc-option__icon--correct{cursor:default;fill:#fff;border:2px solid transparent}#enp-quiz .enp-mc-option--correct .enp-mc-option__input{box-shadow:inset 0 0 3px #60aaad;border:1px solid #60aaad}#enp-quiz .enp-mc-option--correct .enp-mc-option__button--correct:focus .enp-mc-option__icon--correct,#enp-quiz .enp-mc-option--correct .enp-mc-option__button--correct:hover .enp-mc-option__icon--correct,#enp-quiz .enp-mc-option--correct .enp-mc-option__icon--correct{fill:#fff;border-color:#60aaad;background:#60aaad}#enp-quiz .enp-mc-option__add{text-align:center;border:none;border-radius:3px;padding:.85em 1.4em .75em;font-size:15px;font-weight:400;letter-spacing:.05em;color:#fff;box-shadow:inset 0 -2px 0 rgba(0,0,0,.2);background:#bf5700;cursor:pointer;line-height:1.6;border:1px dashed #e8e4ed;background:none;color:#545454;box-shadow:none;border:2px dashed #f5f3f7;color:#e8e4ed;transition:all .2s;background:#faf9fb;font-size:1rem;text-transform:uppercase;text-align:left;padding:.7rem .75rem .8rem}#enp-quiz .enp-mc-option__add:focus,#enp-quiz .enp-mc-option__add:hover{color:#fff;box-shadow:none;background:#964400}#enp-quiz .enp-mc-option__add:active{color:#fff;box-shadow:inset 0 2px 0 rgba(0,0,0,.1);background:#4c4761}#enp-quiz .enp-mc-option__add:focus{outline-color:#4d90fe;outline-offset:-2px;outline-style:auto;outline-width:5px}#enp-quiz .enp-mc-option__add:disabled,#enp-quiz .enp-mc-option__add:disabled:focus,#enp-quiz .enp-mc-option__add:disabled:hover{background:#bf5700;cursor:default;opacity:.5}#enp-quiz .enp-mc-option__add:focus,#enp-quiz .enp-mc-option__add:hover{border:1px dashed #b5a6c4;background:hsla(0,0%,100%,.9);color:#b5a6c4;border:2px dashed #999}#enp-quiz .enp-mc-option__add .enp-mc-option__add__icon{width:1rem;height:1rem;border-radius:50%;background:#1e1c26;fill:#fff;padding:.02rem;margin-right:5px;background:#e8e4ed;fill:#faf9fb;position:relative;top:.2rem}#enp-quiz .enp-mc-option__add:hover .enp-mc-option__add__icon{fill:#fff;background:#b5a6c4}#enp-quiz .enp-slider-options .enp-input{max-width:11.8rem}#enp-quiz .enp-slider-correct__container .enp-input,#enp-quiz .enp-slider-range__container .enp-input{max-width:8.8rem}@media (min-width:400px){#enp-quiz .enp-slider-correct__container .enp-input,#enp-quiz .enp-slider-range__container .enp-input{max-width:11.8rem}}#enp-quiz .enp-slider-preview{border:1px solid #ddd;margin-top:.2rem;margin-bottom:1.6rem;padding:1.6rem 1.6rem .6rem;position:relative}#enp-quiz .enp-slider-preview .enp-label--slider-preview{position:absolute;width:100%;top:.2rem;left:.4rem;font-size:.75rem;text-transform:uppercase}#enp-quiz .enp-slider-correct__container,#enp-quiz .enp-slider-range__container{display:flex;justify-content:space-between;align-items:center}#enp-quiz .enp-slider-correct__helper,#enp-quiz .enp-slider-range__helper{color:#777;font-size:.85rem;background:#fff;padding:0 .3rem;position:relative}#enp-quiz .enp-slider-correct__helper:before,#enp-quiz .enp-slider-range__helper:before{content:"";position:absolute;top:44%;height:4px;background:#ddd;width:120px;left:-60px;z-index:-1;transition:width .7s cubic-bezier(0,0,.3,1),background 1.6s cubic-bezier(0,0,.3,1)}#enp-quiz .enp-slider-options{margin-bottom:2rem}#enp-quiz .enp-slider-options .enp-accordion-header{text-transform:uppercase;font-size:.85rem;padding:.675rem}#enp-quiz .enp-slider-options .enp-slider-advanced-options__content{border:none;box-shadow:none;padding-top:1rem;padding-bottom:0;margin-bottom:0}#enp-quiz .enp-slider-correct-high__container{position:relative}#enp-quiz .enp-slider-correct-high__input-container--hidden{display:none}#enp-quiz .enp-slider-correct__helper--hidden:before{width:0;background:#60aaad}#enp-quiz .enp-slider-correct-answer-range--add-range{text-align:center;border:none;border-radius:3px;padding:.85em 1.4em .75em;font-size:15px;font-weight:400;letter-spacing:.05em;color:#fff;box-shadow:inset 0 -2px 0 rgba(0,0,0,.2);background:#bf5700;cursor:pointer;text-transform:uppercase;line-height:1.6;border:1px dashed #e8e4ed;background:none;color:#545454;box-shadow:none;border:2px dashed #f5f3f7;color:#e8e4ed;transition:all .2s;background:#faf9fb;margin-left:.8rem;font-size:.7rem}#enp-quiz .enp-slider-correct-answer-range--add-range:focus,#enp-quiz .enp-slider-correct-answer-range--add-range:hover{color:#fff;box-shadow:none;background:#964400}#enp-quiz .enp-slider-correct-answer-range--add-range:active{color:#fff;box-shadow:inset 0 2px 0 rgba(0,0,0,.1);background:#4c4761}#enp-quiz .enp-slider-correct-answer-range--add-range:focus{outline-color:#4d90fe;outline-offset:-2px;outline-style:auto;outline-width:5px}#enp-quiz .enp-slider-correct-answer-range--add-range:disabled,#enp-quiz .enp-slider-correct-answer-range--add-range:disabled:focus,#enp-quiz .enp-slider-correct-answer-range--add-range:disabled:hover{background:#bf5700;cursor:default;opacity:.5}#enp-quiz .enp-slider-correct-answer-range--add-range:focus,#enp-quiz .enp-slider-correct-answer-range--add-range:hover{border:1px dashed #b5a6c4;background:hsla(0,0%,100%,.9);color:#b5a6c4;border:2px dashed #999}@media (min-width:400px){#enp-quiz .enp-slider-correct-answer-range--add-range{font-size:.8rem;padding:.7rem}}@media (min-width:700px){#enp-quiz .enp-slider-correct-answer-range--add-range{padding:.7rem 1.2rem;min-width:11.4rem}}#enp-quiz .enp-slider-correct-answer-range--add-range .enp-slider-correct-answer-range__icon{width:1rem;height:1rem;border-radius:50%;background:#1e1c26;fill:#fff;padding:.02rem;margin-right:5px;background:#e8e4ed;fill:#faf9fb;position:relative;left:-.2rem}#enp-quiz .enp-slider-correct-answer-range--add-range:hover .enp-slider-correct-answer-range__icon{fill:#fff;background:#b5a6c4}#enp-quiz .enp-slider-correct-answer-range--remove-range{position:absolute;right:-1.6rem;bottom:1.6rem;background:none;border:none;box-shadow:none;padding:0 .1rem}#enp-quiz .enp-slider-correct-answer-range--remove-range .enp-slider-correct-answer-range__icon{width:1.2em;height:1.2em;fill:#e8e4ed}#enp-quiz .enp-slider-correct-answer-range--remove-range:focus .enp-slider-correct-answer-range__icon,#enp-quiz .enp-slider-correct-answer-range--remove-range:hover .enp-slider-correct-answer-range__icon{fill:#bf5700}@media (min-width:700px){#enp-quiz .enp-slider-correct-answer-range--remove-range{top:-.2rem;right:-.2rem;bottom:auto}}#enp-quiz .enp-slider-options .enp-input:-moz-read-only{background:#faf9fb}#enp-quiz .enp-slider-options .enp-input:read-only{background:#faf9fb}#enp-quiz .enp-answer-explanation{background:#fff;padding-top:2rem;box-shadow:inset 1px 0 0 #ccc,inset -1px -1px 0 #ccc,inset 0 1px 0 #ddd}#enp-quiz .enp-answer-explanation__label{display:block;color:#343242;font-weight:400;font-size:.85rem;text-transform:uppercase;font-weight:500}#enp-quiz .enp-question__button--delete{border:none;background:none;box-shadow:none;padding:0;margin:0;position:absolute;top:9px;right:9px;fill:#bbb;cursor:pointer}@media (min-width:700px){#enp-quiz .enp-question__button--delete{right:-30px}}#enp-quiz .enp-question__button--delete:hover{fill:#bf5700}#enp-quiz .enp-question__move{position:absolute;left:15px}@media (min-width:700px){#enp-quiz .enp-question__move{left:-40px}}#enp-quiz .enp-sort__placeholder{background:#ddd;height:60px;width:100%;max-height:120px;margin-bottom:1.6rem}#enp-quiz .ui-sortable .ui-sortable-helper .ui-sortable-handle{cursor:move;cursor:grabbing;cursor:-webkit-grabbing}#enp-quiz .enp-question__button--move{border:none;background:none;box-shadow:none;padding:0;margin:0;position:absolute;fill:#bbb;cursor:pointer}#enp-quiz .enp-question__button--move:focus,#enp-quiz .enp-question__button--move:hover{fill:#333}#enp-quiz .enp-question__button--move:disabled{opacity:.5}#enp-quiz .enp-question__button--move--up{top:0;left:-9px}#enp-quiz .enp-question__button--move--down{top:3px;right:-9px}#enp-quiz .enp-quiz-form__add-question{padding:.75em .8em .7em 1.4em;text-align:center;border:none;border-radius:3px;padding:.85em 1.4em .75em;font-size:15px;font-weight:400;letter-spacing:.05em;color:#fff;box-shadow:inset 0 -2px 0 rgba(0,0,0,.2);background:#bf5700;cursor:pointer;text-transform:uppercase;transition:all .2s;line-height:1.6;border:1px dashed #e8e4ed;background:none;color:#545454;box-shadow:none;padding-top:1rem;padding-bottom:1rem;margin-top:1.6rem;margin-bottom:2rem}#enp-quiz .enp-quiz-form__add-question:focus,#enp-quiz .enp-quiz-form__add-question:hover{color:#fff;box-shadow:none;background:#964400}#enp-quiz .enp-quiz-form__add-question:active{color:#fff;box-shadow:inset 0 2px 0 rgba(0,0,0,.1);background:#4c4761}#enp-quiz .enp-quiz-form__add-question:focus{outline-color:#4d90fe;outline-offset:-2px;outline-style:auto;outline-width:5px}#enp-quiz .enp-quiz-form__add-question:disabled,#enp-quiz .enp-quiz-form__add-question:disabled:focus,#enp-quiz .enp-quiz-form__add-question:disabled:hover{background:#bf5700;cursor:default;opacity:.5}#enp-quiz .enp-quiz-form__add-question:focus,#enp-quiz .enp-quiz-form__add-question:hover{border:1px dashed #b5a6c4;color:#b5a6c4;background:hsla(0,0%,100%,.9)}#enp-quiz .enp-quiz-form__add-question .enp-add-question__icon{width:1rem;height:1rem;border-radius:50%;background:#1e1c26;fill:#fff;padding:.02rem;margin-right:5px;width:1.2rem;height:1.2rem;background:#e8e4ed;fill:#faf9fb;position:relative;top:.2rem}#enp-quiz .enp-quiz-form__add-question:hover .enp-add-question__icon{fill:#fff;background:#b5a6c4}#enp-quiz .enp-quiz-form__save{text-align:center;border:none;border-radius:3px;padding:.85em 1.4em .75em;font-size:15px;font-weight:400;letter-spacing:.05em;color:#fff;box-shadow:inset 0 -2px 0 rgba(0,0,0,.2);background:#bf5700;cursor:pointer;text-transform:uppercase;transition:all .2s;line-height:1.6;width:100%;margin-bottom:1rem;opacity:.8;text-shadow:0 -1px 2px rgba(0,0,0,.6)}#enp-quiz .enp-quiz-form__save:focus,#enp-quiz .enp-quiz-form__save:hover{color:#fff;box-shadow:none;background:#964400}#enp-quiz .enp-quiz-form__save:active{color:#fff;box-shadow:inset 0 2px 0 rgba(0,0,0,.1);background:#4c4761}#enp-quiz .enp-quiz-form__save:focus{outline-color:#4d90fe;outline-offset:-2px;outline-style:auto;outline-width:5px}#enp-quiz .enp-quiz-form__save:disabled,#enp-quiz .enp-quiz-form__save:disabled:focus,#enp-quiz .enp-quiz-form__save:disabled:hover{background:#bf5700;cursor:default;opacity:.5}#enp-quiz .enp-quiz-form__save:focus,#enp-quiz .enp-quiz-form__save:hover{opacity:1}@media (min-width:400px){#enp-quiz .enp-quiz-form__save{padding:1.2rem 1.8rem 1.1rem;width:27%;margin-right:3%;position:relative;top:-2px;margin-top:1.6rem}}#enp-quiz .enp-quiz-form__save--reveal{animation:c .3s cubic-bezier(0,0,.3,1)}#enp-quiz .enp-btn--next-step{text-align:center;border:none;border-radius:3px;padding:.85em 1.4em .75em;font-size:15px;font-weight:400;letter-spacing:.05em;color:#fff;box-shadow:inset 0 -2px 0 rgba(0,0,0,.2);background:#bf5700;cursor:pointer;text-transform:uppercase;transition:all .2s;line-height:1.6;padding:.65em 1.2em .85em 1.4em}#enp-quiz .enp-btn--next-step:focus,#enp-quiz .enp-btn--next-step:hover{color:#fff;box-shadow:none;background:#964400}#enp-quiz .enp-btn--next-step:active{color:#fff;box-shadow:inset 0 2px 0 rgba(0,0,0,.1);background:#4c4761}#enp-quiz .enp-btn--next-step:focus{outline-color:#4d90fe;outline-offset:-2px;outline-style:auto;outline-width:5px}#enp-quiz .enp-btn--next-step:disabled,#enp-quiz .enp-btn--next-step:disabled:focus,#enp-quiz .enp-btn--next-step:disabled:hover{background:#bf5700;cursor:default;opacity:.5}#enp-quiz .enp-btn--next-step__icon{border-radius:50%;background:#1e1c26;fill:#fff;background:#fff;fill:#bf5700;width:1.2rem;height:1.2rem;margin-left:.5em;position:relative;top:.15rem}#enp-quiz .enp-btn--next-step__icon:hover{background:#fff;fill:#964400}#enp-quiz .enp-btn--next-step{width:100%;padding:1rem 1.4rem}@media (min-width:400px){#enp-quiz .enp-btn--next-step{width:68%}}#enp-quiz .enp-btn--next-step--reveal{animation:b .3s cubic-bezier(0,0,.3,1)}#enp-quiz .enp-accordion-header--inserting,#enp-quiz .enp-mc-option--inputs{animation:a .4s cubic-bezier(0,0,.3,1) forwards}#enp-quiz .enp-mc-option--remove,#enp-quiz .enp-question--remove,#enp-quiz .enp-question__image--remove{animation:e .5s cubic-bezier(0,0,.3,1) forwards}#enp-quiz .enp-image-upload-wait{text-align:center;border:none;border-radius:3px;padding:.85em 1.4em .75em;font-size:15px;font-weight:400;letter-spacing:.05em;color:#fff;box-shadow:inset 0 -2px 0 rgba(0,0,0,.2);background:#bf5700;cursor:pointer;text-transform:uppercase;line-height:1.6;border:1px dashed #e8e4ed;background:none;color:#545454;box-shadow:none;border:2px dashed #f5f3f7;color:#e8e4ed;transition:all .2s;background:#faf9fb;padding-top:4rem;padding-bottom:4rem;margin-bottom:1rem;width:100%}#enp-quiz .enp-image-upload-wait:focus,#enp-quiz .enp-image-upload-wait:hover{color:#fff;box-shadow:none;background:#964400}#enp-quiz .enp-image-upload-wait:active{color:#fff;box-shadow:inset 0 2px 0 rgba(0,0,0,.1);background:#4c4761}#enp-quiz .enp-image-upload-wait:focus{outline-color:#4d90fe;outline-offset:-2px;outline-style:auto;outline-width:5px}#enp-quiz .enp-image-upload-wait:disabled,#enp-quiz .enp-image-upload-wait:disabled:focus,#enp-quiz .enp-image-upload-wait:disabled:hover{background:#bf5700;cursor:default;opacity:.5}#enp-quiz .enp-image-upload-wait:focus,#enp-quiz .enp-image-upload-wait:hover{border:1px dashed #b5a6c4;background:hsla(0,0%,100%,.9);color:#b5a6c4;border:2px dashed #999}#enp-quiz .enp-accordion-header.question-has-error{color:#bf5700;box-shadow:0 0 3px #bf5700}.enp-quiz.ui-sortable--sorting #enp-quiz .enp-accordion-content{display:none}@media (min-width:1000px){#enp-quiz .enp-quiz-settings-container{margin:0;width:40%;float:left}}@media (min-width:1000px){#enp-quiz .enp-quiz-preview-container{width:60%;float:left}}#enp-quiz .enp-quiz-settings__title,#enp-quiz .enp-quiz-share__legend{position:relative;font-size:1rem;text-transform:uppercase;font-weight:600;padding-top:0}#enp-quiz .enp-quiz-settings__form{margin-bottom:3rem}@media (min-width:1000px){#enp-quiz .enp-quiz-settings__form{padding:0;margin-bottom:0}}@media (min-width:700px){#enp-quiz .enp-fieldset{position:relative}}#enp-quiz .enp-title-display__legend{padding-top:0}@media (min-width:700px){#enp-quiz .enp-title-display__legend{padding-top:.4rem}}#enp-quiz .enp-quiz-share__input,#enp-quiz .enp-quiz-styles__input{width:100%}#enp-quiz .enp-quiz-styles__textarea--custom-css{font-family:Monaco,Consolas,Andale Mono,DejaVu Sans Mono,monospace;font-size:.9rem;min-height:200px}#enp-quiz .enp-fieldset--section{padding:1.6rem 1rem}#enp-quiz .enp-fieldset--section.enp-accordion-content--open{margin-bottom:0}#enp-quiz .enp-quiz-share--facebook{margin-bottom:2rem}#enp-quiz .enp-title-display__legend{display:block;color:#343242;font-weight:400;font-size:.85rem;text-transform:uppercase;padding-top:1.6rem;margin-bottom:.2rem;border:none}#enp-quiz .enp-title-display__input{clip:rect(1px,1px,1px,1px);position:absolute!important;left:-10000px;top:auto;width:1px;height:1px;overflow:hidden}#enp-quiz .enp-title-display__label{text-transform:capitalize;display:inline-block;padding:.2rem .5rem;border-radius:3px;cursor:pointer}#enp-quiz .enp-title-display__input:checked+.enp-title-display__label{background:#60aaad;color:#fff;text-shadow:0 0 1px rgba(0,0,0,.7)}#enp-quiz .enp-title-display__input:focus+.enp-title-display__label{z-index:8;outline-color:#4d90fe;outline-offset:-2px;outline-style:auto;outline-width:5px}#enp-quiz .enp-mc-options-order__legend{display:block;color:#343242;font-weight:400;font-size:.85rem;text-transform:uppercase;padding-top:1.6rem;margin-bottom:.2rem;border:none}#enp-quiz .enp-mc-options-order__input{clip:rect(1px,1px,1px,1px);position:absolute!important;left:-10000px;top:auto;width:1px;height:1px;overflow:hidden}#enp-quiz .enp-mc-options-order__label{text-transform:capitalize;display:inline-block;padding:.2rem .5rem;border-radius:3px;cursor:pointer}#enp-quiz .enp-mc-options-order__input:checked+.enp-mc-options-order__label{background:#60aaad;color:#fff;text-shadow:0 0 1px rgba(0,0,0,.7)}#enp-quiz .enp-mc-options-order__input:focus+.enp-mc-options-order__label{z-index:8;outline-color:#4d90fe;outline-offset:-2px;outline-style:auto;outline-width:5px}#enp-quiz .enp-mc-options-order{margin-bottom:1.6rem}#enp-quiz .enp-quiz-share__textarea{min-height:7.6rem;margin-bottom:2rem}@media (min-width:700px){#enp-quiz .enp-quiz-share__textarea{min-height:4.6rem}}@media (min-width:1000px){#enp-quiz .enp-quiz-share__textarea{min-height:7.6rem}}#enp-quiz .enp-preview-form__submit{margin-top:1.6rem;margin-bottom:1.6rem}#enp-quiz .enp-quiz-preview__title{font-size:1rem;text-transform:uppercase;font-weight:600}#enp-quiz .enp-preview-form__submit{text-align:center;border:none;border-radius:3px;padding:.85em 1.4em .75em;font-size:15px;font-weight:400;letter-spacing:.05em;color:#fff;box-shadow:inset 0 -2px 0 rgba(0,0,0,.2);background:#bf5700;cursor:pointer;text-transform:uppercase;transition:all .2s;line-height:1.6;width:100%;padding-top:.85rem;padding-bottom:.85rem;margin-bottom:1rem;opacity:.8;text-shadow:0 -1px 2px rgba(0,0,0,.6)}#enp-quiz .enp-preview-form__submit:focus,#enp-quiz .enp-preview-form__submit:hover{color:#fff;box-shadow:none;background:#964400}#enp-quiz .enp-preview-form__submit:active{color:#fff;box-shadow:inset 0 2px 0 rgba(0,0,0,.1);background:#4c4761}#enp-quiz .enp-preview-form__submit:focus{outline-color:#4d90fe;outline-offset:-2px;outline-style:auto;outline-width:5px}#enp-quiz .enp-preview-form__submit:disabled,#enp-quiz .enp-preview-form__submit:disabled:focus,#enp-quiz .enp-preview-form__submit:disabled:hover{background:#bf5700;cursor:default;opacity:.5}#enp-quiz .enp-preview-form__submit:focus,#enp-quiz .enp-preview-form__submit:hover{opacity:1}#enp-quiz .enp-preview-form__submit--publish{width:100%;position:relative;z-index:99999999;padding:1.05rem 1.8rem .95rem}#enp-quiz .enp-quiz-styles__iris-wrapper{position:relative}#enp-quiz .iris-picker{box-sizing:content-box;position:relative;z-index:9999999999;top:-1.2rem;margin-bottom:1rem;padding-bottom:3rem;padding-right:30px}@media (min-width:1000px){#enp-quiz .iris-picker{position:absolute;top:-4px;left:104%}}#enp-quiz .iris-picker:last-of-type{margin-bottom:0}#enp-quiz .iris-picker .ui-draggable-handle:focus .ui-slider-handle,#enp-quiz .iris-picker .ui-slider-handle:focus{box-shadow:0 0 3px rgba(0,0,0,.75)}#enp-quiz .enp-quiz-styles__set-default{text-align:center;border:none;border-radius:3px;padding:.85em 1.4em .75em;font-size:15px;font-weight:400;letter-spacing:.05em;color:#fff;box-shadow:inset 0 -2px 0 rgba(0,0,0,.2);background:#bf5700;cursor:pointer;text-transform:uppercase;transition:all .2s;line-height:1.6;border:2px solid #bf5700;background:transparent;color:#bf5700;box-shadow:none;font-size:.75rem;position:absolute;left:10px;bottom:10px}#enp-quiz .enp-quiz-styles__set-default:focus,#enp-quiz .enp-quiz-styles__set-default:hover{color:#fff;box-shadow:none;background:#964400}#enp-quiz .enp-quiz-styles__set-default:active{color:#fff;box-shadow:inset 0 2px 0 rgba(0,0,0,.1);background:#4c4761}#enp-quiz .enp-quiz-styles__set-default:focus{outline-color:#4d90fe;outline-offset:-2px;outline-style:auto;outline-width:5px}#enp-quiz .enp-quiz-styles__set-default:disabled,#enp-quiz .enp-quiz-styles__set-default:disabled:focus,#enp-quiz .enp-quiz-styles__set-default:disabled:hover{background:#bf5700;cursor:default;opacity:.5}#enp-quiz .enp-quiz-styles__set-default:focus,#enp-quiz .enp-quiz-styles__set-default:hover{background:transparent;border:2px solid #964400;color:#964400}#enp-quiz .enp-iris__close{border:none;background:none;box-shadow:none;padding:0;margin:0;position:absolute;top:5px;right:5px;fill:#888;cursor:pointer}#enp-quiz .enp-quiz-styles__input--color{padding-left:45px}#enp-quiz .enp-quiz-styles__color-demo{width:30px;height:30px;border:1px solid #ccc;top:8px;left:8px;border-radius:3px;position:absolute}#enp-quiz .enp-share-quiz__url{display:block;font-size:1.5rem;line-height:1.4;word-wrap:break-word}#enp-quiz .enp-share-quiz{list-style:none;margin-left:0;display:flex;justify-content:center;align-content:center;align-items:center}#enp-quiz .enp-share-quiz__item{margin-right:20px}#enp-quiz .enp-share-quiz__item:last-child{margin-right:0}#enp-quiz .enp-share-quiz__item__icon{width:2.4rem;height:2.4rem;border-radius:50%;background:#1e1c26;fill:#fff;padding:.6rem;fill:#fff!important}#enp-quiz .enp-share-quiz__item__icon--facebook{background-color:#3a5795}#enp-quiz .enp-share-quiz__item__icon--twitter{background-color:#4099ff}#enp-quiz .enp-share-quiz{justify-content:space-around;margin-bottom:0}#enp-quiz .enp-ab-create__container{max-width:640px;margin-left:auto;margin-right:auto;padding:3rem 20px;width:100%;background:#f8f8f8}#enp-quiz .enp-ab-create__container:after{content:"";display:table;clear:both}@media (min-width:700px){#enp-quiz .enp-ab-create__container{max-width:840px}}@media (min-width:1000px){#enp-quiz .enp-ab-create__container{max-width:1000px}}#enp-quiz .enp-ab-create__form{max-width:640px;margin-left:auto;margin-right:auto;padding-left:20px;padding-right:20px;max-width:512px}#enp-quiz .enp-ab-create__form:after{content:"";display:table;clear:both}#enp-quiz .enp-ab-create__label{display:block;color:#343242;font-weight:400;font-size:.85rem;text-transform:uppercase;font-weight:500}#enp-quiz .enp-ab-create-title__textarea{font-size:1rem;font-family:Arial,monospace,helvetica,arial,sans-serif;padding:.8rem .5rem;background:#fff;border:1px solid #aaa;border-radius:3px;width:20rem;max-width:100%;margin-bottom:1.2rem;font-weight:700;font-size:1.6rem;margin-bottom:1rem;width:100%}@media (min-width:700px){#enp-quiz .enp-ab-create-title__textarea{padding:.8rem}}#enp-quiz .enp-ab-create-title__textarea::-webkit-input-placeholder{font-weight:700}#enp-quiz .enp-ab-create-title__textarea:-ms-input-placeholder,#enp-quiz .enp-ab-create-title__textarea::-ms-input-placeholder{font-weight:700}#enp-quiz .enp-ab-create-title__textarea::placeholder{font-weight:700}#enp-quiz .enp-ab-create__select{width:100%;-webkit-appearance:none;-moz-appearance:none;appearance:none;font-size:.85rem;padding:.7rem 32px .7rem .8rem;border:1px solid #bbb;border-radius:3px;margin-bottom:1.6rem;background:url(../svg/chevron-down.svg) 100% 50% no-repeat;background-color:#fff;box-shadow:inset -26px 0 0 rgba(0,0,0,.1)}#enp-quiz .enp-ab-create__submit{width:100%;padding-top:1em;padding-bottom:1em}#enp-quiz.enp-quiz__main{background:#faf9fb}#enp-quiz .enp-dash-container{max-width:640px;margin-left:auto;margin-right:auto;padding:2rem 20px;transition:all .25s cubic-bezier(0,0,.3,1)}#enp-quiz .enp-dash-container:after{content:"";display:table;clear:both}@media (min-width:700px){#enp-quiz .enp-dash-container{max-width:840px}}@media (min-width:1000px){#enp-quiz .enp-dash-container{max-width:1000px}}#enp-quiz .enp-dash__section-header{display:block;margin-bottom:.325rem}@media (min-width:700px){#enp-quiz .enp-dash__section-header{display:flex;align-items:flex-end;align-content:flex-end;justify-content:space-between}}#enp-quiz .enp-search-quizzes{display:block}@media (min-width:400px){#enp-quiz .enp-search-quizzes{display:flex;align-items:flex-end;align-content:flex-end}}#enp-quiz .enp-search-quizzes__form-item{margin-bottom:.6rem;display:block}@media (min-width:400px){#enp-quiz .enp-search-quizzes__form-item{margin-bottom:0;margin-right:1rem}#enp-quiz .enp-search-quizzes__form-item:last-of-type{margin-right:0}}#enp-quiz .enp-quiz-search{position:relative}#enp-quiz .enp-search-quizzes__label{margin-bottom:0;clip:rect(1px,1px,1px,1px);position:absolute!important;left:-10000px;top:auto;width:1px;height:1px;overflow:hidden}#enp-quiz .enp-search-quizzes__select{padding:.3rem;border-radius:3px}#enp-quiz .enp-quiz-search__input{max-width:160px;margin:0 0 .1rem;padding:.3rem .3rem .3rem 26px;font-size:.85rem}#enp-quiz .enp-quiz-search__icon{position:absolute;bottom:.3rem;left:.2rem;width:21px;height:21px}#enp-quiz .enp-search-quizzes__button{padding:.2rem .8rem}#enp-quiz .enp-search-results-description{font-size:.85rem}#enp-quiz .enp-search-results-description__link{white-space:nowrap}#enp-quiz .enp-search-results-description__icon{width:1.3em;height:1.3em;position:relative;top:4px;left:2px}#enp-quiz .enp-dash__section-title{font-size:1rem;text-transform:uppercase;margin-bottom:.325rem}#enp-quiz .enp-view-toggle{cursor:pointer;opacity:.5;display:none}@media (min-width:700px){#enp-quiz .enp-view-toggle{display:flex}}#enp-quiz .enp-view-toggle__active{opacity:1}#enp-quiz .enp-sort-by{margin-left:5px}#enp-quiz .enp-dash-list{display:flex;flex-flow:column wrap;align-items:stretch;list-style:none;margin-left:0}#enp-quiz .enp-dash-item{flex-basis:100%;padding:1rem 1.2rem;background:#fff;border:1px solid #eee;border-bottom:1px solid #ddd;list-style:none;transition:all .35s cubic-bezier(0,0,.3,1);margin:0 0 .8rem;justify-content:space-between;display:flex;flex-direction:column;align-content:flex-end;justify-content:flex-end;border:none;border-radius:3px;background-color:#f5f3f7}#enp-quiz .enp-dash-item--published{box-shadow:inset 4px 0 0 #1e1c26,0 1px 0 rgba(0,0,0,.1)}#enp-quiz .enp-dash-item--draft{box-shadow:inset 4px 0 0 #8a84a4,0 1px 0 rgba(0,0,0,.1)}#enp-quiz .enp-dash-item--remove{animation:e .5s cubic-bezier(0,0,.3,1) forwards}#enp-quiz .enp-dash-list--list-view .enp-dash-item{margin:0 0 .8rem;flex-basis:100%}#enp-quiz .enp-dash-item__spinner{display:flex;justify-content:center;align-content:center;align-items:center;position:absolute;top:0;bottom:0;left:0;right:0;background:hsla(0,59%,90%,.8);width:100%;animation:g .3s cubic-bezier(0,0,.3,1)}#enp-quiz .enp-dash-item__header{padding:.5rem 1rem;background:#faf9fb;border-bottom:1px solid #e8e4ed;display:flex;justify-content:space-between;align-items:center;border-radius:3px}#enp-quiz .enp-dash-item__title{font-size:1rem;padding-bottom:.5rem;padding:0;margin-bottom:0}#enp-quiz .enp-dash-item__title a{color:#1e1c26}#enp-quiz .enp-dash-item__content{padding:0 0 .375rem;position:relative;transition:all .2s cubic-bezier(0,0,.3,1)}#enp-quiz .enp-dash-item__meta{font-size:.7rem;font-weight:300;color:#565656;font-size:.75rem}#enp-quiz .enp-dash-item__username{word-wrap:break-word;padding-left:.4rem;margin-left:.2rem;border-left:1px solid #ddd}#enp-quiz .enp-dash-item__title--ab-test{padding-bottom:0}#enp-quiz .enp-dash-item__ab-quizzes{list-style:none;margin-left:0;font-size:.85rem;color:#e8e4ed;margin-bottom:.8rem}#enp-quiz .enp-dash-item__nav{list-style:none;margin-left:0;margin-bottom:0;font-size:.85rem}#enp-quiz .enp-dash-item__nav__item{display:flex;margin:0;width:100%;padding:12px;align-items:center}#enp-quiz .enp-dash-item__nav__item:hover{background-color:#f5f3f7}#enp-quiz .enp-dash-item__nav__item:hover .enp-dash-item__icon{fill:#bf5700}#enp-quiz .enp-dash-item__nav__item a{font-weight:400;color:#bf5700;display:flex;align-items:center}#enp-quiz .enp-dash-item__nav__item a:focus{outline:1px dotted #bf5700;outline-offset:1px}#enp-quiz .enp-dash-item__nav__item:last-of-type{margin-right:0}#enp-quiz .enp-dash-item__delete{border:none;background:none;box-shadow:none;margin:0;position:relative;padding:0;cursor:pointer;display:flex}#enp-quiz .enp-dash-item__delete .enp-icon{fill:#b5a6c4}#enp-quiz .enp-dash-item__icon{fill:#b5a6c4;width:15px;height:15px;margin-right:10px}#enp-quiz .enp-dash-item__nav--collapsible{display:none;position:absolute;z-index:2;top:53px;right:1.5rem;width:195px;background-color:#fff;text-align:left;transform:translateZ(0);transition:all .2s cubic-bezier(0,0,.3,1)}#enp-quiz .enp-dash-item__nav--collapsible .enp-dash-item__nav__item{padding:.5rem 1rem;cursor:pointer}#enp-quiz .enp-dash-item__menu-action{height:24px;background:none;border:none;color:#444;padding:0;bottom:.2rem;right:1.5rem;top:1.5rem;cursor:pointer}#enp-quiz .enp-dash-item__menu-action-wrap{max-width:0;display:flex;flex-direction:column;align-items:flex-end}#enp-quiz .enp-dash-item__menu-action__icon{width:15px;height:15px;fill:#b5a6c4;transition:all .3s cubic-bezier(0,0,.3,1)}#enp-quiz .enp-dash-item--menu-active{transform:translate3d(0,-3px,0)}#enp-quiz .enp-dash-item--menu-active.enp-dash-item--published{box-shadow:inset 4px 0 0 #60aaad,0 2px 2px rgba(0,0,0,.2)}#enp-quiz .enp-dash-item--menu-active.enp-dash-item--draft{box-shadow:inset 4px 0 0 #b4d7d8,0 2px 2px rgba(0,0,0,.2)}#enp-quiz .enp-dash-item--menu-active .enp-dash-item__menu-action__icon--bottom{transform:rotateX(180deg)}#enp-quiz .enp-dash-item--menu-active .enp-dash-item__nav--collapsible{display:block;animation:b .25s cubic-bezier(0,0,.3,1) forwards;border-radius:3px;box-shadow:0 2px 2px rgba(0,0,0,.2)}#enp-quiz .enp-dash-item--menu-active .enp-dash-item__content{opacity:.4}#enp-quiz .enp-quiz-results{display:flex;justify-content:space-around;list-style:none;margin:.8rem 0 0;padding:0;text-align:center}#enp-quiz .enp-quiz-results__item{margin:0 2% 0 0;padding:0;color:#454545}@media (max-width:280px){#enp-quiz .enp-quiz-results__item{width:100%;padding:0;margin-bottom:.6rem}}#enp-quiz .enp-quiz-results__number{font-size:1.6rem;line-height:1;position:relative}#enp-quiz .enp-dash-item--draft .enp-quiz-results__number{opacity:.5}#enp-quiz .enp-quiz-results__number--average-score{color:#4e9497}#enp-quiz .enp-quiz-results__number--average-score:after{content:"%";font-size:.9rem;position:absolute;top:.3rem;right:-1rem}#enp-quiz .enp-quiz-results__label{text-transform:uppercase;font-size:.7rem;font-weight:300;color:#888}#enp-quiz .enp-quiz-list__view{display:flex;align-items:flex-end;align-content:flex-end}#enp-quiz .enp-dash-item--add-new{background:none;border:none;padding:0;position:relative}@media (min-width:700px){#enp-quiz .enp-dash-item--add-new{min-height:7rem}}#enp-quiz .enp-dash-link--add-new{text-align:center;border:none;border-radius:3px;padding:.85em 1.4em .75em;font-size:15px;font-weight:400;letter-spacing:.05em;color:#fff;box-shadow:inset 0 -2px 0 rgba(0,0,0,.2);background:#bf5700;cursor:pointer;text-transform:uppercase;line-height:1.6;border:1px dashed #e8e4ed;background:none;color:#545454;box-shadow:none;border:2px dashed #f5f3f7;color:#e8e4ed;transition:all .2s;justify-content:flex-start;color:#bf5700;padding:1rem 1.2rem}#enp-quiz .enp-dash-link--add-new:focus,#enp-quiz .enp-dash-link--add-new:hover{color:#fff;box-shadow:none;background:#964400}#enp-quiz .enp-dash-link--add-new:active{color:#fff;box-shadow:inset 0 2px 0 rgba(0,0,0,.1);background:#4c4761}#enp-quiz .enp-dash-link--add-new:focus{outline-color:#4d90fe;outline-offset:-2px;outline-style:auto;outline-width:5px}#enp-quiz .enp-dash-link--add-new:disabled,#enp-quiz .enp-dash-link--add-new:disabled:focus,#enp-quiz .enp-dash-link--add-new:disabled:hover{background:#bf5700;cursor:default;opacity:.5}#enp-quiz .enp-dash-link--add-new:focus,#enp-quiz .enp-dash-link--add-new:hover{border:1px dashed #b5a6c4;background:hsla(0,0%,100%,.9);color:#b5a6c4;border:2px dashed #999}@media (min-width:700px){#enp-quiz .enp-dash-link--add-new{font-size:1rem;text-transform:uppercase;display:flex;justify-content:center;align-content:center;align-items:center;flex-direction:column;position:absolute;top:0;left:0;right:0;bottom:0}}#enp-quiz .enp-dash-link--add-new .enp-dash-link__icon{border-radius:50%;background:#1e1c26;fill:#fff;width:1.2rem;height:1.2rem;margin-right:5px}@media (min-width:700px){#enp-quiz .enp-dash-link--add-new .enp-dash-link__icon{width:2rem;height:2rem;margin:.8rem 0 .2rem}}#enp-quiz .enp-dash-link--add-new:hover{color:#964400}#enp-quiz .enp-dash-link--add-new:hover .enp-dash-link__icon{fill:#fff;background:#964400}#enp-quiz .enp-quiz-message--welcome p{color:#1d1c25}#enp-quiz .enp-paginate{list-style:none;margin-left:0;font-size:1rem}#enp-quiz .enp-paginate,#enp-quiz .enp-paginate__link{display:flex;justify-content:center;align-content:center;align-items:center}#enp-quiz .enp-paginate__link{margin:0 .2rem;padding:0 .4rem;border-radius:3px;font-weight:400}#enp-quiz .enp-paginate__link--current-page{border:2px solid #1e1c26}#enp-quiz .enp-paginate__item--first-page,#enp-quiz .enp-paginate__item--last-page{display:flex}#enp-quiz .enp-paginate__item--first-page:after,#enp-quiz .enp-paginate__item--last-page:before{content:"...";font-size:1rem;position:relative;bottom:.2rem;opacity:.6}#enp-quiz .enp-paginate__item--no-gap:after,#enp-quiz .enp-paginate__item--no-gap:before{content:""}#enp-quiz .enp-paginate__item--next-page{margin-left:.2rem}#enp-quiz .enp-paginate__item--previous-page{margin-right:.2rem}#enp-quiz .enp-quiz-breadcrumbs{display:flex;justify-content:center;align-content:center;align-items:center;position:absolute;top:0;width:1000%;left:-500%;right:-500%;margin-left:auto;margin-right:auto;background:#fff;border-bottom:1px solid #ddd;padding:10px;z-index:99999}#enp-quiz .enp-quiz-breadcrumbs__list{display:flex;list-style:none;margin-left:0;margin-bottom:0}#enp-quiz .enp-quiz-breadcrumbs__item{margin-right:10px;display:flex;justify-content:center;align-content:center;align-items:center;fill:#bf5700;margin-right:5px}#enp-quiz .enp-quiz-breadcrumbs__item:last-of-type{margin-right:0}@media (min-width:400px){#enp-quiz .enp-quiz-breadcrumbs__item{margin-right:10px}}#enp-quiz .enp-quiz-breadcrumbs__link--disabled{opacity:.65;cursor:default}#enp-quiz .enp-quiz-breadcrumbs__link--active{text-align:center;border:none;border-radius:3px;padding:.85em 1.4em .75em;font-size:15px;font-weight:400;letter-spacing:.05em;color:#fff;box-shadow:inset 0 -2px 0 rgba(0,0,0,.2);background:#bf5700;cursor:pointer;text-transform:uppercase;transition:all .2s;line-height:1.6;border:2px solid #bf5700;background:transparent;color:#bf5700;box-shadow:none;padding:.4em 1em}#enp-quiz .enp-quiz-breadcrumbs__link--active:focus,#enp-quiz .enp-quiz-breadcrumbs__link--active:hover{color:#fff;box-shadow:none;background:#964400}#enp-quiz .enp-quiz-breadcrumbs__link--active:active{color:#fff;box-shadow:inset 0 2px 0 rgba(0,0,0,.1);background:#4c4761}#enp-quiz .enp-quiz-breadcrumbs__link--active:focus{outline-color:#4d90fe;outline-offset:-2px;outline-style:auto;outline-width:5px}#enp-quiz .enp-quiz-breadcrumbs__link--active:disabled,#enp-quiz .enp-quiz-breadcrumbs__link--active:disabled:focus,#enp-quiz .enp-quiz-breadcrumbs__link--active:disabled:hover{background:#bf5700;cursor:default;opacity:.5}#enp-quiz .enp-quiz-breadcrumbs__link--active:focus,#enp-quiz .enp-quiz-breadcrumbs__link--active:hover{background:transparent;border:2px solid #964400;color:#964400}#enp-quiz .enp-quiz-breadcrumbs__link{font-size:1rem;font-weight:400;text-transform:none;letter-spacing:0}#enp-quiz .enp-quiz-breadcrumbs--fixed{top:0;position:fixed;animation:h .25s}#enp-quiz .enp-results-title{font-size:1.6rem;text-align:center;padding:3.2rem 20px 2.6rem;background:#f8f8f8;margin:-1.2rem 0 2rem;border-bottom:1px solid #ddd}#enp-quiz .enp-results-title:after{font-size:1rem;text-transform:uppercase;display:block;content:"RESULTS";font-weight:400}#enp-quiz .enp-results__container{max-width:640px;margin-left:auto;margin-right:auto;padding-left:20px;padding-right:20px;display:block}#enp-quiz .enp-results__container:after{content:"";display:table;clear:both}@media (min-width:700px){#enp-quiz .enp-results__container{max-width:840px}}@media (min-width:1000px){#enp-quiz .enp-results__container{max-width:1000px;display:flex;justify-content:space-between}}#enp-quiz .enp-quiz-scores__container,#enp-quiz .enp-results-flow__container{width:100%}@media (min-width:1000px){#enp-quiz .enp-quiz-scores__container,#enp-quiz .enp-results-flow__container{width:48%}}#enp-quiz .enp-quiz-scores{margin-top:2.6rem}#enp-quiz .enp-quiz-score__line-chart{height:300px;margin-bottom:1rem}#enp-quiz .enp-quiz-score__line-chart .ct-label{color:#1d1c25}#enp-quiz .enp-quiz-score__line-chart .ct-grid{stroke:#dadada;stroke-dasharray:0}#enp-quiz .enp-quiz-score__line-chart .ct-line{stroke:#60aaad;stroke-width:2px}#enp-quiz .enp-quiz-score__line-chart .ct-point{stroke:#60aaad;stroke-width:8px}#enp-quiz .enp-quiz-scores-table{width:100%;max-width:500px;margin:0 auto}#enp-quiz .enp-quiz-scores-table tr th{background-color:#fff}#enp-quiz .enp-quiz-scores-table__label{padding-left:5%}#enp-quiz .enp-quiz-scores-table__score{text-align:right;padding-right:5%}#enp-quiz .enp-results-flow{position:relative;margin:2rem auto;width:320px;height:320px;border-radius:50%}@media (min-width:400px){#enp-quiz .enp-results-flow{width:390px;height:390px}}@media (min-width:700px){#enp-quiz .enp-results-flow{width:450px;height:450px}}@media (min-width:1000px){#enp-quiz .enp-results-flow{width:400px;height:400px}}#enp-quiz .enp-results-flow__section-title{clip:rect(1px,1px,1px,1px);position:absolute!important;left:-10000px;top:auto;width:1px;height:1px;overflow:hidden}#enp-quiz .enp-results-flow__item{border-radius:50%;text-align:center;height:100%;width:100%;margin:0 auto;left:0;right:0;padding:12.5% 0 0;letter-spacing:.05rem;border:2px solid #60aaad;animation:.85s a cubic-bezier(0,0,.3,1) forwards}#enp-quiz .enp-results-flow__item--total-views{background:#fff}#enp-quiz .enp-results-flow__item--quiz-starts{width:65%;height:65%;position:absolute;padding-top:8%;bottom:2.5%;background:#fff}#enp-quiz .enp-results-flow__item--quiz-finishes{width:35%;height:35%;position:absolute;bottom:5%;background:#d6e9ea}#enp-quiz .enp-results-flow__title{font-size:1rem;text-transform:uppercase;color:#444;font-size:.7rem;margin-bottom:0}@media (min-width:700px){#enp-quiz .enp-results-flow__title{font-weight:700;margin-bottom:2px}}#enp-quiz .enp-results-flow__number{font-weight:700;font-size:1.4rem;line-height:1.2}#enp-quiz .enp-results-flow__number--total-views{font-size:2rem}#enp-quiz .enp-results-flow__number--quiz-starts{font-size:1.65rem}#enp-quiz .enp-results-flow__percentage{font-size:.8rem;font-weight:400;position:relative;display:inline-block;top:-.7em;left:-.1rem;color:#444}#enp-quiz .enp-results-flow__percentage:after{content:"%";position:absolute;right:-.75rem;font-size:.7rem;color:#444}#enp-quiz .enp-results-questions__section{background:#faf9fb;border-bottom:1px solid #ddd;border-top:1px solid #ddd;padding-top:3rem;margin-top:3rem;padding-top:5rem;padding-bottom:3rem;margin-top:5rem;margin-bottom:3rem}#enp-quiz .enp-results-questions__header{align-items:flex-start;flex-direction:column}@media (min-width:400px){#enp-quiz .enp-results-questions__header{display:flex;justify-content:space-between;flex-direction:row;align-items:flex-end}}#enp-quiz .enp-results-questions__key,#enp-quiz .enp-results-questions__title{font-size:1rem;text-transform:uppercase}#enp-quiz .enp-results-questions{list-style:none;margin-left:0}#enp-quiz .enp-results-question{width:100%;font-size:1rem;padding:0;margin-bottom:1rem}#enp-quiz .enp-results-question__header{padding:1rem 1.2rem;position:relative}#enp-quiz .enp-results-question__question,#enp-quiz .enp-results-question__stats{font-size:1rem;line-height:1.4}#enp-quiz .enp-results-question__question{font-weight:400}@media (min-width:400px){#enp-quiz .enp-results-question__question{padding-right:7em;margin-bottom:0}}#enp-quiz .enp-results-question__stats{font-size:.9rem}@media (min-width:400px){#enp-quiz .enp-results-question__stats{position:absolute;bottom:1rem;right:1.2rem;text-align:right}}#enp-quiz .enp-results-question__stats,#enp-quiz .enp-results-questions__key{font-weight:300}#enp-quiz .enp-results-question__content{padding:2rem 1.2rem 1.2rem;border-radius:3px}#enp-quiz .enp-results-question__deep-stats{display:flex;justify-content:space-around;list-style:none;margin-left:0;text-align:center}#enp-quiz .enp-results-question__deep-stat__number{font-size:1.8rem;line-height:1;position:relative}#enp-quiz .enp-results-question__deep-stat__number--correct,#enp-quiz .enp-results-question__deep-stat__number--finishes{color:#4e9497}#enp-quiz .enp-results-question__deep-stat__number--incorrect{color:#c1893e}#enp-quiz .enp-results-question__deep-stat__number--correct:after,#enp-quiz .enp-results-question__deep-stat__number--finishes:after,#enp-quiz .enp-results-question__deep-stat__number--incorrect:after{content:"%";font-size:.9rem;position:absolute;top:.3rem;right:-1rem}#enp-quiz .enp-results-question__deep-stat__label{font-size:1rem;text-transform:uppercase;font-size:.8rem}#enp-quiz .enp-results-question__options{list-style:none;margin-left:0;margin-bottom:0}#enp-quiz .enp-results-question__option{padding:.8rem .8rem .8rem .4rem;border-top:1px solid #ddd}@media (min-width:400px){#enp-quiz .enp-results-question__option{display:flex;justify-content:space-between;flex-direction:row}}#enp-quiz .enp-results-question__option:first-of-type{margin-top:1.4rem}#enp-quiz .enp-results-question__option--correct{background:#fff}#enp-quiz .enp-results-question__option__text{flex-grow:100;margin-right:1rem}#enp-quiz .enp-results-question__option__text__helper{font-weight:300;font-size:1rem;text-transform:uppercase;margin-right:.4rem}@media (min-width:400px){#enp-quiz .enp-results-question__option__icon{margin-right:.3rem;min-width:1.6rem}}#enp-quiz .enp-results-question__option__icon--incorrect{fill:#c1893e;opacity:.5}#enp-quiz .enp-results-question__option__icon--correct{fill:#4e9497;opacity:1}#enp-quiz .enp-results-question__option__percentage--incorrect{color:#c1893e}#enp-quiz .enp-results-question__option__percentage--correct{color:#4e9497}#enp-quiz .enp-results-question__option__number-selected{font-weight:300}#enp-quiz .enp-slider-responses__title{font-size:1rem;text-transform:uppercase;font-weight:400;margin-top:1.6rem}#enp-quiz .enp-slider-responses__line-chart .ct-point{stroke-width:8px}#enp-quiz .enp-slider-responses__line-chart--high,#enp-quiz .enp-slider-responses__line-chart--low{stroke:#bf5700}#enp-quiz .enp-slider-responses__line-chart--correct{stroke:#60aaad}#enp-quiz .enp-slider-responses-table{width:100%}#enp-quiz .enp-slider-responses-table tr.enp-slider-responses-table__response--correct td,#enp-quiz .enp-slider-responses-table tr:nth-child(2n) td{background-color:#fff}#enp-quiz .enp-slider-responses-table__content{box-shadow:none;padding-top:1rem}#enp-quiz .enp-slider-responses-table--hide-zero .enp-slider-responses-table__frequency--zero{display:none}#enp-quiz .enp-slider-responses-table__response-frequency{display:flex;justify-content:space-between;align-items:center}#enp-quiz .enp-slider-responses-table__toggle-zero-frequency{background:#fff;width:100%;box-shadow:inset 1px 1px 0 #ccc,inset -1px -1px 0 #ccc;color:#1d1c25;font-family:Arial,monospace,helvetica,arial,sans-serif;font-size:.9rem;font-weight:400;line-height:1.5;text-transform:none;letter-spacing:0;text-align:left;border:none;border-radius:3px;min-height:3.065rem;padding:1rem 2rem 1rem 1rem;margin:1.6rem 0 0;position:relative;z-index:9;cursor:pointer;transition:all .2s cubic-bezier(0,0,.3,1);width:auto;padding:0 .6rem;margin:0}.enp-quiz-results #enp-quiz .enp-aside{border:none}.enp-quiz-results .enp-results-questions__title__quiz-title{clip:rect(1px,1px,1px,1px);position:absolute!important;left:-10000px;top:auto;width:1px;height:1px;overflow:hidden}#enp-quiz .enp-results--ab{display:block;margin-bottom:3rem}@media (min-width:1000px){#enp-quiz .enp-results--ab{display:flex;flex-wrap:wrap;align-content:flex-end;width:50%;padding:10px}}@media (min-width:1000px){#enp-quiz .enp-results--a{padding-right:1rem;border-right:1px solid #ddd}}@media (min-width:1000px){#enp-quiz .enp-results--b{padding-left:1rem}}#enp-quiz .enp-results-title--ab,#enp-quiz .enp-results__container--ab .enp-results-flow__container{min-width:100%}#enp-quiz .enp-results--loser .enp-results-flow__item{border:2px solid #bf5700}#enp-quiz .enp-results--loser .enp-results-flow__item--quiz-starts{background:#ffc696}#enp-quiz .enp-results--loser .enp-results-flow__item--quiz-finishes{background:#ffb06d}#enp-quiz .enp-results--loser .enp-results-questions__title,#enp-quiz .enp-results--loser th{color:#964400}#enp-quiz .enp-results--winner .enp-results-questions__title,#enp-quiz .enp-results--winner th{color:#4e9497}#enp-quiz .enp-results-title--a,#enp-quiz .enp-results-title--b{background:transparent}#enp-quiz .enp-ab-scores{max-width:640px;margin-left:auto;margin-right:auto;padding-left:20px;padding-right:20px}#enp-quiz .enp-ab-scores:after{content:"";display:table;clear:both}@media (min-width:700px){#enp-quiz .enp-ab-scores{max-width:840px}}@media (min-width:1000px){#enp-quiz .enp-ab-scores{max-width:1000px}}#enp-quiz .enp-ab-scores th.enp-quiz-scores-table__label,#enp-quiz .enp-ab-scores th.enp-quiz-scores-table__score{padding-left:0;padding-right:0}#enp-quiz .enp-ab-scores__title{padding-left:50px;font-size:1rem;text-transform:uppercase}#enp-quiz .enp-quiz-score__line-chart .enp-test-loser .ct-line,#enp-quiz .enp-quiz-score__line-chart .enp-test-loser .ct-point{stroke:#bf5700}#enp-quiz .enp-quiz-scores{margin-top:0}#enp-quiz .enp-ab-scores .enp-quiz-scores-table,#enp-quiz .enp-question-results{margin-bottom:1.6rem}@media (min-width:1000px){#enp-quiz .enp-ab-scores .enp-quiz-scores-table,#enp-quiz .enp-question-results{float:left;width:48%;margin:0}#enp-quiz .enp-ab-scores .enp-quiz-scores-table:first-of-type,#enp-quiz .enp-question-results:first-of-type{margin-right:4%}}#enp-quiz .enp-question-results__container{max-width:640px;margin-left:auto;margin-right:auto;padding-left:20px;padding-right:20px}#enp-quiz .enp-question-results__container:after{content:"";display:table;clear:both}@media (min-width:700px){#enp-quiz .enp-question-results__container{max-width:840px}}@media (min-width:1000px){#enp-quiz .enp-question-results__container{max-width:1000px}}#enp-quiz .enp-question-results--ab .enp-results-questions__section{background:#fff;border:none;padding:1.6rem 0;margin:1.6rem auto}#enp-quiz .enp-question-results--ab .enp-results-questions__container{padding:0}#enp-quiz .enp-ab-new-embed-code__section{max-width:640px;margin-left:auto;margin-right:auto;padding-left:20px;padding-right:20px;max-width:512px;max-width:540px;padding-bottom:2rem;margin-bottom:2rem}#enp-quiz .enp-ab-new-embed-code__section:after{content:"";display:table;clear:both}#enp-quiz .enp-ab-new-embed-code__section .enp-ab-embed-code{padding:0;margin:0}#enp-quiz .enp-ab-embed-code__section{background:#faf9fb;border-bottom:1px solid #ddd;border-top:1px solid #ddd;padding-top:3rem;padding-bottom:3rem;margin-top:3rem;margin-bottom:3rem;padding-top:5rem;margin-top:5rem}#enp-quiz .enp-ab-embed-code{max-width:640px;margin-left:auto;margin-right:auto;padding-left:20px;padding-right:20px}#enp-quiz .enp-ab-embed-code:after{content:"";display:table;clear:both}#enp-quiz .enp-ab-embed-code__title{font-size:1rem;text-transform:uppercase}#enp-quiz .enp-embed-code__textarea{margin-bottom:0}#enp-quiz .enp-embed-code__instructions{font-size:1.1rem}#enp-quiz .enp-slider{margin-bottom:1.6rem}#enp-quiz .enp-slider-input__container{display:flex;align-items:center;justify-content:center;margin:1.6rem auto;position:relative}#enp-quiz .enp-slider-input__label{display:block;color:#343242;font-weight:400;font-size:.85rem;text-transform:uppercase}#enp-quiz .enp-slider-input__prefix,#enp-quiz .enp-slider-input__suffix{font-size:1rem}#enp-quiz .enp-slider-input__prefix{margin-right:.2rem;white-space:pre}#enp-quiz .enp-slider-input__suffix{margin-left:.2rem;white-space:pre}#enp-quiz .enp-slider-input__input{font-size:1rem;font-family:Arial,monospace,helvetica,arial,sans-serif;padding:.8rem .5rem;background:#fff;border:1px solid #aaa;border-radius:3px;width:20rem;max-width:100%;margin-bottom:1.2rem;margin-bottom:0;padding:.75rem;width:auto;transition:all .25s cubic-bezier(0,0,.3,1)}@media (min-width:700px){#enp-quiz .enp-slider-input__input{padding:.8rem}}#enp-quiz .enp-slider-input__input--incorrect{color:#bf5700}#enp-quiz .enp-slider-input__input--correct{color:#4e9497}#enp-quiz .enp-slider-input__input--invalid-animation{box-shadow:0 0 2px 1px #c1893e}#enp-quiz .enp-slider_input__range-helper{position:absolute;bottom:-1.2rem;font-size:.8rem}#enp-quiz .enp-slider_input__range-helper--low{left:0}#enp-quiz .enp-slider_input__range-helper--high{right:0}#enp-quiz .enp-slider-input__range-helper__number{position:relative;color:#e8e4ed}#enp-quiz .ui-slider-range-show-correct__tooltip-container{position:relative}#enp-quiz .ui-slider-range-show-correct__tooltip{position:absolute;top:-.4rem;margin-left:-.55rem;height:1rem;width:1.1rem;height:1.1rem;border:2px solid #60aaad;background-color:#fff;border-radius:50%;z-index:9999}#enp-quiz .ui-slider-range-show-correct__tooltip--low{left:0}#enp-quiz .ui-slider-range-show-correct__tooltip--high{right:-.55rem}#enp-quiz .ui-slider-range-show-correct__tooltip__text{position:relative;color:#417d7f;top:-1.35rem;font-size:.825rem;min-width:100%;display:inline-block;text-align:center;text-shadow:0 1px 0 #fff}#enp-quiz .enp-slider{position:relative;text-align:left;background:#ddd}#enp-quiz .enp-slider .ui-helper-hidden{display:none}#enp-quiz .enp-slider .ui-helper-hidden-accessible{border:0;clip:rect(0 0 0 0);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px}#enp-quiz .enp-slider .ui-helper-reset{margin:0;padding:0;border:0;outline:0;line-height:1.3;text-decoration:none;font-size:100%;list-style:none}#enp-quiz .enp-slider .ui-helper-clearfix:after,#enp-quiz .enp-slider .ui-helper-clearfix:before{content:"";display:table;border-collapse:collapse}#enp-quiz .enp-slider .ui-helper-clearfix:after{clear:both}#enp-quiz .enp-slider .ui-helper-clearfix{min-height:0}#enp-quiz .enp-slider .ui-helper-zfix{width:100%;height:100%;top:0;left:0;position:absolute;opacity:0;filter:alpha(opacity=0)}#enp-quiz .enp-slider .ui-front{z-index:100}#enp-quiz .enp-slider .ui-state-disabled{cursor:default!important}#enp-quiz .enp-slider .ui-icon{display:block;text-indent:-99999px;overflow:hidden;background-repeat:no-repeat}#enp-quiz .enp-slider .ui-widget-overlay{position:fixed;top:0;left:0;width:100%;height:100%}#enp-quiz .enp-slider .ui-slider-handle{background:#fff;border-radius:50%;border:1px solid #aaa;position:absolute;z-index:2;width:1.2rem;height:1.2rem;top:-.4rem;margin-left:-.6rem;cursor:default;touch-action:none;transition:opacity .2s cubic-bezier(0,0,.3,1),height .18s cubic-bezier(0,0,.3,1),width .18s cubic-bezier(0,0,.3,1),transform .18s cubic-bezier(0,0,.3,1)}#enp-quiz .enp-slider .ui-slider-handle:focus{outline:none;box-shadow:0 0 3px 1px #4d90fe}#enp-quiz .enp-slider .ui-slider-handle--correct,#enp-quiz .enp-slider .ui-slider-handle--incorrect{width:1.1rem;height:1.1rem;top:-.4rem;margin-left:-.55rem}#enp-quiz .enp-slider .ui-slider-handle--incorrect{z-index:1;border:2px solid #bf5700}#enp-quiz .enp-slider .ui-slider-handle--correct{border:2px solid #60aaad;z-index:99999}#enp-quiz .enp-slider .ui-slider-range{position:absolute;z-index:1;font-size:.7rem;display:block;border:0;background-position:0 0;top:0;height:100%}#enp-quiz .enp-slider .ui-slider-range-show-correct{background:#60aaad;z-index:9}#enp-quiz .enp-slider .ui-slider-range-min{left:0;background:#60aaad}#enp-quiz .enp-slider .ui-slider-range-max{right:0}#enp-quiz .enp-slider.ui-state-disabled .ui-slider-handle,#enp-quiz .enp-slider.ui-state-disabled .ui-slider-range{filter:inherit}#enp-quiz .ui-slider-horizontal{height:.3rem}#enp-quiz .enp-question__answered .enp-slider{background:#bbb}#enp-quiz .enp-question__answered .ui-slider-range-min{background:#fff} +/*# sourceMappingURL=enp_quiz-create.min.css.map */ diff --git a/public/quiz-create/css/enp_quiz-create.min.css.map b/public/quiz-create/css/enp_quiz-create.min.css.map new file mode 100644 index 00000000..bda7a63a --- /dev/null +++ b/public/quiz-create/css/enp_quiz-create.min.css.map @@ -0,0 +1 @@ +{"version":3,"sources":["_setup.scss","_utilities.scss","_variables.scss","_structure.scss","_typography.scss","_animations.scss","_base.scss","_forms.scss","_quiz-create.scss","_quiz-preview.scss","_quiz-publish.scss","_ab-create.scss","_dashboard.scss","_breadcrumbs.scss","_quiz-results.scss","_ab-results.scss","../../../quiz-take/css/sass/_slider.scss"],"names":[],"mappings":"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","file":"enp_quiz-create.min.css","sourcesContent":["html {\n font-size: 16px!important; // set our rem value reference\n}\n\nhtml #enp-quiz {\n box-sizing: border-box;\n}\n\nbody #enp-quiz {\n background: #fff;\n overflow: hidden;\n}\n\n#enp-quiz {\n *, *:before, *:after {\n box-sizing: inherit;\n }\n\n ul, ol {\n margin: 0 0 1.6rem 1.25rem;\n padding: 0;\n }\n\n textarea {\n margin-bottom: 1rem;\n }\n\n button, input[type=\"button\"], input[type=\"reset\"], input[type=\"submit\"] {\n border: none;\n &:active,\n &:focus,\n &:hover {\n border: none;\n }\n }\n\n iframe {\n border: none;\n }\n}\n","@mixin focus--glow {\n outline-color: #4D90FE;\n outline-offset: -2px;\n outline-style: auto;\n outline-width: 5px;\n}\n\n@mixin disabled {\n opacity: 0.65;\n cursor: default;\n}\n\n@mixin btn {\n text-align: center;\n border: none;\n border-radius: 3px;\n padding: .85em 1.4em .75em;\n font-size: 15px;\n font-weight: 400;\n letter-spacing: .05em;\n color: #fff;\n box-shadow: inset 0 -2px 0 rgba(0,0,0,.2);\n background: $link;\n cursor: pointer;\n text-transform: uppercase;\n transition: all .2s;\n line-height: 1.6;\n\n &:focus,\n &:hover {\n color: #fff;\n box-shadow: none;\n background: $link_hover;\n }\n\n &:active {\n color: #fff;\n box-shadow: inset 0 2px 0 rgba(0,0,0,.1);\n background: lighten($blue, 20);\n }\n\n &:focus {\n @include focus--glow;\n }\n\n &:disabled,\n &:disabled:focus,\n &:disabled:hover {\n background: $link;\n cursor: default;\n opacity: .5;\n\n\n }\n}\n\n@mixin btn--reset {\n border: none;\n background: none;\n box-shadow: none;\n padding: 0;\n margin: 0;\n}\n\n@mixin btn--submit {\n @include btn;\n}\n\n@mixin btn--ghost {\n @include btn;\n border: 2px solid $link;\n background: transparent;\n color: $link;\n box-shadow: none;\n\n &:focus,\n &:hover {\n background: transparent;\n border: 2px solid $link_hover;\n color: $link_hover;\n }\n}\n\n@mixin box-shadow {\n box-shadow: 0 2px 2px rgba(0,0,0,.2);\n}\n\n@mixin btn--dashed {\n @include btn;\n border: 1px dashed $dark_gray;\n background: none;\n color: #545454;\n box-shadow: none;\n\n &:hover,\n &:focus {\n border: 1px dashed $darker_gray;\n color: $darker_gray;\n background: rgba(255,255,255,.9);\n }\n}\n\n@mixin btn--dashed--light {\n @include btn--dashed;\n border: 2px dashed $gray;\n color: $dark_gray;\n transition: all .2s;\n\n &:hover,\n &:focus {\n color: $darker_gray;\n border: 2px dashed #999;\n }\n}\n\n@mixin btn--dashed--light--alt-bg {\n @include btn--dashed--light ;\n background: $light_gray;\n}\n\n@mixin btn--small {\n font-size: 13px;\n}\n\n@mixin btn--thin {\n padding: 0.4em 1em;\n}\n\n@mixin btn--icon {\n @include btn;\n padding: .75em 0.8em .7em 1.4em;\n}\n\n@mixin btn--icon__icon {\n @include icon--white;\n @include icon--xl;\n position: relative;\n top: 4px;\n}\n\n/*\n* @usage: @include btn--icon(BEM-root-class);\n* Button with icon with white circular background.\n* --------------\n* | BTN TEXT > |\n* --------------\n* @param $rootBEM: root class name that will be extended\n\n@mixin btn--icon($rootBEM) {\n .(#){$rootBEM} {\n @include btn--icon;\n }\n\n .(#){$rootBEM}__icon {\n @include btn--icon__icon ;\n }\n}\n*/\n\n@mixin btn--icon--icon-circle {\n @include btn;\n padding: .65em 1.2em .85em 1.4em;\n}\n\n// use when the icon is larger and on the right\n@mixin btn--icon__icon--circle {\n @include icon--circle;\n @include icon--white-bg;\n @include icon--normal;\n margin-left: 0.5em;\n position: relative;\n top: 0.15rem;\n}\n\n@mixin btn--icon__icon--circle--hover {\n @include icon--white-bg--hover;\n}\n\n/*\n* @usage: @include btn--icon--circle(BEM-root-class);\n* Button with icon with white circular background.\n* ---------------\n* | BTN TEXT (>) |\n* ---------------\n* @param $rootBEM: root class name that will be extended\n*/\n@mixin btn--icon--circle($rootBEM) {\n .#{$rootBEM} {\n @include btn--icon--icon-circle;\n }\n\n .#{$rootBEM}__icon {\n @include btn--icon__icon--circle ;\n\n\n &:hover {\n @include btn--icon__icon--circle--hover ;\n }\n }\n}\n\n/*\n* @usage: @include btn--icon--hover-circle(BEM-root-class);\n* Button with icon. Hovering/focusing button moves\n* the icon to right and fades in a white circular background\n* -------------- ----------------\n* | BTN TEXT > | --hover/focus--> | BTN TEXT (>) |\n* -------------- ----------------\n* @param $rootBEM: root class name that will be extended\n*/\n@mixin btn--icon--hover-circle($rootBEM) {\n .#{$rootBEM} {\n @include btn--icon--icon-circle;\n padding-right: 0.8em;\n }\n\n .#{$rootBEM}__icon {\n @include btn--icon__icon--circle ;\n margin-left: 0;\n width: 1.6em;\n height: 1.6em;\n background: transparent;\n fill: #fff;\n transform: translate3d(0, 0, 0);\n transition: all .3s ease-in-out;\n }\n\n .#{$rootBEM}:hover .#{$rootBEM}__icon {\n @include btn--icon__icon--circle--hover ;\n transform: translate3d(1em, 0, 0);\n margin-right: 1em;\n }\n\n\n}\n\n// use on small icons and placed on the left\n@mixin btn--icon__icon--circle--small {\n @include icon--circle--small;\n margin-right: 5px;\n}\n\n\n// use this to match the icon to the inline font-size\n@mixin icon--inline {\n width: 1em;\n height: 1em;\n position: relative;\n top: .125em;\n}\n\n@mixin icon--small {\n width: 1rem;\n height: 1rem;\n}\n\n@mixin icon--normal {\n width: 1.2rem;\n height: 1.2rem;\n}\n\n@mixin icon--large {\n width: 1.5rem;\n height: 1.5rem;\n}\n\n@mixin icon--xl {\n width: 1.8rem;\n height: 1.8rem;\n}\n\n@mixin icon--xxl {\n width: 2.4rem;\n height: 2.4rem;\n}\n\n@mixin icon--xxxl {\n width: 2.8rem;\n height: 2.8rem;\n}\n\n@mixin icon--circle {\n border-radius: 50%;\n background: $blue;\n fill: #fff;\n}\n\n@mixin border-radius {\n border-radius: 3px;\n}\n\n@mixin icon--circle--pad {\n @include icon--circle ;\n padding: 0.05em;\n\n @include breakpoint(medium) {\n padding: 0.15em;\n }\n}\n\n@mixin icon--circle--pad--xl {\n @include icon--circle ;\n padding: 0.6rem;\n}\n\n@mixin icon--circle--small {\n @include icon--small;\n @include icon--circle;\n padding: 0.02rem;\n}\n\n@mixin icon--white {\n fill: #fff;\n}\n\n@mixin icon--white-bg {\n background: #fff;\n fill: $link;\n}\n\n@mixin icon--white-bg--hover {\n background: #fff;\n fill: $link_hover;\n}\n\n@mixin icon--gray-bg {\n background: $dark_gray;\n fill: $light_gray;\n}\n\n@mixin icon--gray-bg--hover {\n fill: #fff;\n background: $darker_gray;\n}\n\n@mixin small-uppercase {\n font-size: 1rem;\n text-transform: uppercase;\n}\n\n@mixin hint {\n font-size: .7rem;\n font-weight: 300;\n color: #565656;\n}\n\n@mixin green {\n color: $green;\n}\n\n@mixin dark-green {\n color: $dark_green;\n}\n\n@mixin red {\n color: $red;\n}\n\n@mixin fade-red {\n color: $fade_red;\n}\n\n/* Text meant only for screen readers */\n@mixin screen-reader-text {\n clip: rect(1px, 1px, 1px, 1px);\n position: absolute !important;\n left:-10000px;\n top:auto;\n width:1px;\n height:1px;\n overflow:hidden;\n}\n\n@mixin screen-reader-text--hover {\n background-color: #f1f1f1;\n border-radius: 3px;\n box-shadow: 0 0 2px 2px rgba(0, 0, 0, 0.6);\n clip: auto !important;\n color: #21759b;\n display: block;\n font-size: 14px;\n font-weight: bold;\n height: auto;\n left: 5px;\n line-height: normal;\n padding: 15px 23px 14px;\n text-decoration: none;\n top: 5px;\n width: auto;\n z-index: 100000;\n}\n\n@mixin xmargin-vertical {\n margin-top: 2rem;\n margin-bottom: 2rem;\n}\n\n@mixin xmargin-horizontal {\n margin-right: 2rem;\n margin-left: 2rem;\n}\n\n@mixin xpadding-vertical {\n padding-top: 2rem;\n padding-bottom: 2rem;\n}\n\n@mixin xpadding-horizontal {\n padding-right: 2rem;\n padding-left: 2rem;\n}\n\n@mixin ul-no-style {\n list-style: none;\n margin-left: 0;\n}\n\n@mixin hidden--accessible {\n height: 0;\n opacity: 0;\n padding: 0;\n overflow: hidden;\n}\n\n@mixin accordion {\n background: #fff;\n width: 100%;\n}\n\n@mixin accordion__header {\n @include accordion ;\n box-shadow: inset 1px 1px 0 #ccc, inset -1px -1px 0 #ccc;\n color: $font;\n font-family: $fontTitle;\n font-size: .9rem;\n font-weight: 400;\n line-height: 1.5;\n text-transform: none;\n letter-spacing: 0;\n text-align: left;\n border: none;\n border-radius: 3px;\n min-height: 3.065rem;\n padding: 1rem 2rem 1rem 1rem;\n margin: 1.6rem 0 0;\n position: relative;\n z-index: 9;\n cursor: pointer;\n transition: all .2s $fastInEaseOut;\n}\n\n@mixin accordion__content {\n @include accordion ;\n box-shadow: inset 1px -1px 0 #ccc, inset -1px -1px 0 #ccc;\n display: block;\n position: relative;\n height: auto;\n overflow: visible;\n margin-bottom: 1.6rem;\n}\n\n@mixin accordion__content--closed {\n margin-top: 0;\n padding-top: 0rem;\n animation: slideOutTop .25s $fastInEaseOut forwards;\n display: none;\n}\n\n@mixin accordion__content--open {\n padding-top: 1.6rem;\n margin-bottom: 2rem;\n animation: slideInTop .45s $fastInEaseOut forwards;\n}\n\n// Share Icons\n@mixin share_icons($rootBEM) {\n\n .#{$rootBEM} {\n @include ul-no-style;\n @include flex-center;\n }\n\n .#{$rootBEM}__item {\n margin-right: 20px;\n\n &:last-child {\n margin-right: 0;\n }\n }\n\n .#{$rootBEM}__item__icon {\n @include icon--xxl;\n @include icon--circle--pad--xl;\n\n fill: #fff!important;\n }\n\n .#{$rootBEM}__item__icon--facebook {\n background-color: #3a5795;\n }\n\n .#{$rootBEM}__item__icon--twitter {\n background-color: #4099ff;\n }\n}\n\n@mixin section--alt {\n background: $light_gray;\n border-bottom: 1px solid #ddd;\n border-top: 1px solid #ddd;\n padding-top: 3rem;\n padding-bottom: 3rem;\n margin-top: 3rem;\n margin-bottom: 3rem;\n}\n\n#enp-quiz {\n .enp-screen-reader-text {\n @include screen-reader-text;\n }\n\n .enp-screen-reader-text:hover,\n .enp-screen-reader-text:active,\n .enp-screen-reader-text:focus {\n @include screen-reader-text--hover;\n }\n\n .enp-accordion-header {\n @include accordion__header ;\n\n &:first-of-type {\n margin-top: 0;\n }\n\n .enp-accordion-header__icon {\n position: absolute;\n fill: $dark_gray;\n right: 0.75rem;\n bottom: 0.75rem;\n transition: all .35s $fastInEaseOut;\n }\n }\n\n .enp-accordion-header--open {\n\n .enp-accordion-header__icon {\n transform: rotateX(180deg) translateY(2px);\n }\n\n }\n\n .enp-accordion-content {\n @include accordion__content ;\n }\n\n .enp-accordion-content--closed {\n @include accordion__content--closed ;\n }\n\n .enp-accordion-content--open {\n @include accordion__content--open ;\n }\n\n .enp-quiz-message {\n @include container--thin;\n background: #fff;\n border: 1px solid #eee;\n border-bottom: 1px solid #ccc;\n padding: 1rem 0.375rem;\n margin-bottom: 1.6rem;\n position: fixed;\n bottom: 0;\n left: 0;\n }\n\n .enp-quiz-message__title {\n @include small-uppercase;\n }\n\n .enp-message__list {\n @include ul-no-style;\n font-size: 1.1rem;\n margin-bottom: 0;\n }\n\n .enp-quiz-message--error {\n border-left: 6px solid $red;\n color: $red;\n }\n\n .enp-quiz-message__title--error {\n color: $dark_red;\n }\n\n .enp-quiz-message--success {\n border-left: 6px solid $green;\n color: $dark_green;\n }\n\n .enp-quiz-message__title--success {\n color: $dark_green;\n }\n\n .enp-quiz-message--note {\n border-left: 6px solid $khaki;\n }\n\n .enp-quiz-message__title--note {\n color: $dark_blue;\n }\n\n .enp-quiz-message__close {\n @include btn--reset;\n position: absolute;\n top: 5px;\n right: 5px;\n }\n\n .enp-quiz-message--ajax {\n margin-bottom: .6rem;\n animation: slideInBottom .3s;\n }\n\n .enp-quiz-message-ajax-container {\n z-index: 9999;\n position: fixed;\n bottom: 10px;\n }\n\n .enp-quiz-message--saving__spinner {\n margin-left: -10px;\n }\n\n .enp-quiz-message--saving__text {\n font-size: 1rem;\n }\n\n textarea.limited-chars,\n input.limited-chars {\n margin-bottom: 0.2rem;\n }\n\n .limited-chars__container {\n color: lighten($dark_gray, 8);\n font-size: 0.8rem;\n display: block;\n text-align: right;\n margin-bottom: 1.2rem;\n }\n\n .limited-chars__counter {\n color: $dark_gray;\n }\n\n .limited-chars__container--error {\n color: $dark_red;\n\n .limited-chars__counter {\n color: $dark_red;\n }\n }\n\n textarea.has-error,\n input.has-error {\n border: 1px solid $red;\n &:focus {\n outline-color: $red;\n }\n\n }\n\n\n\n .enp-tooltip {\n position: relative;\n }\n\n .enp-tooltip__activator {\n\n &:focus + .enp-tooltip__description,\n &:focus > .enp-tooltip__description {\n display: block;\n }\n }\n\n .enp-tooltip__description {\n display: none;\n position: absolute;\n left: 103%;\n margin-bottom: 2rem;\n border-radius: 3px;\n background: $light_gray;\n font-size: 0.9rem;\n padding: 0.9rem;\n max-width: 200px;\n }\n\n\n}\n\n.enp-sticky {\n position: relative;\n left: 0;\n right: 0;\n top: 0;\n z-index: 999;\n\n &.enp-sticky--fixed {\n position: fixed;\n }\n}\n\n.enp-breadcrumb-link {\n font-size: 0.85rem;\n}\n\n.enp-breadcrumb-link__icon {\n position: relative;\n top: 0.45rem;\n left: 0.4rem;\n}\n","//fonts\n$fontBody : Arial,monospace, helvetica, arial, sans-serif;\n$fontTitle : Arial,monospace, helvetica, arial, sans-serif;\n//colors\n$font : #1d1c25;\n$background: #FAF9FB;\n$title : #5D5E5F;\n$blue: #1E1C26;\n$dark_blue: #242f42;\n$light_blue: lighten($blue, 100);\n$light_gray: #FAF9FB;\n$really_light_gray: #F8F8F8;\n$gray: darken($light_gray, 2);\n$dark_gray: darken($gray, 5);\n$darker_gray: darken($dark_gray, 20);\n$link: #bf5700;\n$khaki: #CCA562;\n$green: #60AAAD;\n$dark_green: darken($green, 8);\n$red: #bf5700;\n$dark_red: darken($red, 8);\n$fade_red: #C1893E;\n$link_hover: darken($link, 8);\n// animation\n$fastInEaseOut: cubic-bezier(0.000, 0, .3, 1);\n\n\n$breakpoints: (\n \"small\" : 400px,\n \"medium\" : 700px,\n \"large\" : 1000px\n);\n\n// -----------------------------------------------------------------------------\n// Core\n// -----------------------------------------------------------------------------\n\n// Caching current breakpoint\n// Not meant to be manually edited\n$default-breakpoint: root;\n$current-breakpoint: $default-breakpoint;\n\n// The usual breakpoint mixin\n// Except it updates the $current-breakpoint variable\n// 1. If breakpoint name exists in map\n// 2. Update $current-breakpoint\n// 3. Open a media query\n// 4. Let the user dump content\n// 5. Then reset $current-breakpoint\n// 6. If breakpoint name doesn't exist in map, warn the user\n@mixin breakpoint($breakpoint) {\n $value: map-get($breakpoints, $breakpoint);\n\n @if $value != null { // 1\n $current-breakpoint: $breakpoint !global; // 2\n @media (min-width: $value) { @content; } // 3\n $current-breakpoint: $default-breakpoint !global; // 5\n }\n\n @else {\n @warn \"Invalid breakpoint `#{$breakpoint}`.\"; // 6\n }\n}\n\n// for only targeting a specific device\n// NOTE: DOESN'T SUPPORT THE @include placeholders!!!\n@mixin media($query) {\n @if $query == max-small {\n $media_query: \"max-width: #{map-get($breakpoints, \"small\")}\";\n } @else if $query == only-medium {\n $media_query: \"min-width: #{map-get($breakpoints, \"medium\")}) and (max-width: #{(map-get($breakpoints, \"large\") - 1px)}\";\n } @else if $query == max-medium {\n $media_query: \"max-width: #{(map-get($breakpoints, \"medium\") - 1px)}\";\n } @else if $query == max-large {\n $media_query: \"max-width: #{(map-get($breakpoints, \"large\") - 1px)}\";\n } @else {\n // just use the number provided as a max width\n $media_query: \"max-width: #{$query}\";\n }\n\n @if variable-exists(media_query) {\n @media ($media_query) {\n @content;\n }\n }\n\n}\n","@mixin clearfix {\n &:after {\n content: \"\";\n display: table;\n clear: both;\n }\n}\n\n@mixin container {\n max-width: 640px;\n margin-left: auto;\n margin-right: auto;\n padding-left: 20px;\n padding-right: 20px;\n @include clearfix;\n}\n\n@mixin well {\n padding: 1.6rem;\n margin-bottom: 1.6rem;\n background: $light_blue;\n @include border-radius;\n border: 1px solid #eee;\n border-bottom-color: #ccc;\n\n @include breakpoint(medium) {\n margin-bottom: 2.6rem;\n padding: 1.6rem 2rem;\n }\n}\n\n@mixin container--wide {\n @include container;\n\n @include breakpoint(medium) {\n max-width: 840px;\n }\n\n @include breakpoint(large) {\n max-width: 1000px;\n }\n}\n\n\n@mixin container--thin {\n @include container;\n max-width: 512px;\n}\n\n@mixin container--really-thin {\n @include container;\n max-width: 300px;\n}\n\n@mixin container--form {\n @include container--thin;\n\n .enp-input,\n .enp-textarea {\n width: 100%;\n }\n}\n\n@mixin container--form--thin {\n @include well;\n @include container--really-thin;\n\n .enp-input,\n .enp-textarea {\n width: 100%;\n }\n}\n\n@mixin flex-container { // no pseudo element to clear and break spacing\n @include container;\n}\n\n@mixin flex-container--wide { // no pseudo element to clear and break spacing\n @include flex-container;\n\n @include breakpoint(medium) {\n max-width: 840px;\n }\n\n @include breakpoint(large) {\n max-width: 1000px;\n }\n}\n\n@mixin flex {\n display: flex;\n}\n\n@mixin flex-list__item {\n flex-basis: 100%;\n margin: 0;\n border-bottom-color: #ddd;\n}\n\n@mixin flex-spread {\n @include flex;\n justify-content: space-between;\n}\n\n@mixin flex-spread-vertical {\n @include flex-spread;\n flex-direction: column;\n}\n\n@mixin flex-spread-around {\n @include flex;\n justify-content: space-around;\n}\n\n@mixin flex-bottom {\n @include flex;\n align-items: flex-end;\n align-content: flex-end;\n}\n\n@mixin flex-center {\n @include flex;\n justify-content: center;\n align-content: center;\n align-items: center;\n}\n\n@mixin flex-vertical-center {\n @include flex;\n align-content: center;\n align-items: center;\n}\n\n@mixin flex-inline {\n @include flex;\n @include ul-no-style;\n margin-bottom: 0;\n}\n\n@mixin flex-inline__item {\n margin-right: 10px;\n\n &:last-of-type {\n margin-right: 0;\n }\n}\n\n\n@mixin flex-grid {\n @include flex;\n flex-flow: column wrap;\n align-items: stretch;\n @include ul-no-style;\n}\n\n@mixin flex-grid__item {\n flex-basis: 100%;\n padding: 1rem 1.2rem;\n background: #fff;\n border: 1px solid #eee;\n border-bottom: 1px solid #ddd;\n list-style: none;\n transition: all .35s $fastInEaseOut;\n margin: 0 0 0.8rem;\n\n @include breakpoint(medium) {\n // flex-basis: 100%;\n // max-width: 100%;\n // margin: 0 2% 0.8rem 0;\n\n // &:nth-child(2n) {\n // margin-right: 0;\n // }\n }\n\n // @include breakpoint(large) {\n // flex-basis: 100%;\n // max-width: 100%;\n // margin-right: 1.25%;\n\n // &:nth-child(2n) {\n // margin-right: 1.25%;\n // }\n\n // &:nth-child(3n) {\n // margin-right: 0;\n // }\n // }\n}\n\n@mixin flex-grid__title {\n font-size: 1rem;\n padding-bottom: 0.5rem;\n}\n","body #enp-quiz {\n color: $font;\n font-family: $fontBody;\n font-size: 1em;\n line-height: 1.6;\n font-weight: 400;\n\n @include breakpoint(medium) {\n font-size: 1.3em;\n }\n}\n\n#enp-quiz {\n /* Headings */\n h1,h2,h3,h4,h5,h6 {\n font-family: $fontTitle;\n color: $title;\n clear: both;\n margin: 0 0 .2rem;\n font-weight: bold;\n line-height: 1.2em;\n }\n\n h1 {\n font-size: 2em;\n }\n\n h2 {\n font-size: 1.75em;\n }\n\n h3 {\n font-size: 1.475em;\n }\n\n h4 {\n font-size: 1.3em;\n }\n\n h5 {\n font-size: 1.125em;\n }\n\n h6 {\n font-size: 1em;\n }\n\n p+h1, ul+h1,\n p+h2, ul+h2,\n p+h3, ul+h3,\n p+h4, ul+h4,\n p+h5, ul+h5,\n p+h6, ul+h6 {\n margin-top: 1.8em;\n }\n\n /* Text elements */\n p {\n font-size: 0.85em;\n margin-bottom: 1.125em;\n font-weight: 300;\n }\n ul, ol {\n margin: 0 0 1.6em 1.25em;\n }\n ul {\n list-style: disc;\n }\n ol {\n list-style: decimal;\n }\n li > ul,\n li > ol {\n margin-bottom: 0;\n margin-left: 1.6em;\n }\n\n b, strong {\n font-weight: bold;\n }\n\n dfn, cite, em {\n font-family: georgia, times, serif;\n font-style: italic;\n }\n\n pre {\n background: #eee;\n font-family: \"Courier 10 Pitch\", Courier, monospace;\n font-size: .95em;\n line-height: 1.6;\n margin-bottom: 1.6em;\n padding: 1.6em;\n overflow: auto;\n max-width: 100%;\n }\n .code, code, kbd, tt, var {\n font: .7em Monaco, Consolas, \"Andale Mono\", \"DejaVu Sans Mono\", monospace;\n }\n\n table {\n border: none;\n\n th {\n font-family: $fontTitle;\n font-size: .8rem;\n text-transform: uppercase;\n border: none;\n border-bottom: 1px solid #ddd;\n }\n\n td {\n font-family: $fontBody;\n font-size: 1rem;\n border: none;\n border-bottom: 1px solid #eee;\n }\n\n tr:nth-child(even) td {\n background: $really_light_gray;\n }\n\n tr:last-child td {\n border-bottom: none;\n }\n }\n\n figure {\n margin: 0;\n }\n\n img {\n height: auto; /* Make sure images are scaled correctly. */\n max-width: 100%; /* Adhere to container width. */\n }\n\n /* Links */\n a {\n color: $link;\n text-decoration: none;\n transition: color .2s;\n touch-action: manipulation; // remove 300ms delay for ie\n\n .enp-icon {\n fill: $link;\n }\n }\n\n a:hover,\n a:focus,\n a:active {\n color: $link_hover;\n\n .enp-icon {\n fill: $link_hover;\n }\n }\n\n button {\n &:focus {\n @include focus--glow;\n }\n }\n\n .enp-btn {\n @include btn;\n }\n\n\n .enp-btn--add {\n @include btn--dashed;\n width: 100%;\n }\n\n .enp-btn--disabled {\n @include disabled;\n }\n\n .enp-btn--enabled {\n animation: expand .6s;\n }\n\n .enp-icon {\n width: 24px;\n height: 24px;\n transition: all .2s;\n }\n\n .enp-page-title {\n font-size: 1.6rem;\n }\n}\n","@keyframes slideInBottom {\n 0% {\n opacity: 0;\n transform: translate3d(0, 100px, 0);\n }\n 100% {\n opacity: 1;\n transform: translate3d(0, 0, 0);\n }\n}\n\n@keyframes slideInTop {\n 0% {\n opacity: 0;\n height: auto;\n transform: translate3d(0, -20px, 0);\n }\n 100% {\n opacity: 1;\n height: auto;\n transform: translate3d(0, 0, 0);\n }\n}\n\n@keyframes slideInTop--reduced-opacity {\n 0% {\n opacity: 0;\n height: auto;\n transform: translate3d(0, -20px, 0);\n }\n 100% {\n opacity: 0.8;\n height: auto;\n transform: translate3d(0, 0, 0);\n }\n}\n\n\n@keyframes slideOutTop {\n 0% {\n overflow: hidden;\n height: 100px;\n opacity: 1;\n transform: translate3d(0, 0, 0);\n }\n 100% {\n height: 0;\n opacity: 0;\n transform: translate3d(0, -20px, 0);\n }\n}\n\n@keyframes removeElement {\n 0% {\n opacity: 1;\n transform: translate3d(0, 0, 0);\n }\n 100% {\n padding: 0;\n margin: 0;\n opacity: 0;\n height: 0;\n z-index: -1;\n transform: translate3d(-200px, 0, 0);\n }\n}\n\n@keyframes removeAnswers {\n 0% {\n opacity: 1;\n transform: translate3d(0, 0, 0);\n }\n 100% {\n padding: 0;\n opacity: 0;\n display: none;\n height: 0;\n z-index: -1;\n transform: translate3d(-200px, 0, 0);\n }\n}\n\n@keyframes removeQuestion {\n 0% {\n opacity: 1;\n transform: translateX(0);\n }\n 100% {\n opacity: 0;\n transform: translateX(-200px);\n }\n}\n\n@keyframes showNextQuestion {\n 0% {\n opacity: 0;\n transform: translateX(200px);\n }\n\n 100% {\n opacity: 1;\n transform: translateX(0);\n }\n}\n\n@keyframes expand {\n 0% {\n opacity: 0.8;\n transform: scale3d(1, 1, 1);\n box-shadow: 0 0 0px rgba(0,0,0,.3);\n }\n\n 40% {\n opacity: 1;\n }\n\n 70% {\n opacity: 1;\n transform: scale3d(1.1, 1.1, 1);\n box-shadow: 0 0 8px rgba(0,0,0,.4);\n }\n\n 100% {\n opacity: 1;\n transform: scale3d(1, 1, 1);\n box-shadow: 0 0 0px rgba(0,0,0,.3), inset 0 2px 0 rgba(0,0,0,.2);\n }\n}\n\n@keyframes checkmark {\n 0% {\n opacity: 0;\n transform: scale3d(0.2, 0.2, 1);\n }\n 5% {\n opacity: 1;\n }\n 10% {\n transform: scale3d(1.4, 1.4, 1);\n }\n 12% {\n transform: scale3d(1, 1, 1);\n }\n 90% {\n opacity: 1;\n transform: scale3d(1, 1, 1);\n }\n 92% {\n transform: scale3d(1.4, 1.4, 1);\n }\n 100% {\n opacity: 0;\n transform: scale3d(0.2, 0.2, 1);\n }\n\n}\n\n@keyframes fadeOut {\n 0% {\n opacity: 1;\n }\n 100% {\n opacity: 0;\n }\n}\n\n@keyframes fadeIn {\n 0% {\n opacity: 0;\n }\n 100% {\n opacity: 1;\n }\n}\n\n@keyframes navSlideIn {\n 0% {\n transform: translate3d(0, -200px, 0);\n }\n 100% {\n transform: translate3d(0, 0, 0);\n }\n}\n\n\n.spinner {\n margin: 0 auto;\n width: 70px;\n text-align: center;\n}\n\n.spinner > div {\n width: 18px;\n height: 18px;\n background-color: #333;\n\n border-radius: 100%;\n display: inline-block;\n -webkit-animation: sk-bouncedelay 1.4s infinite ease-in-out both;\n animation: sk-bouncedelay 1.4s infinite ease-in-out both;\n}\n\n.spinner .bounce1 {\n -webkit-animation-delay: -0.32s;\n animation-delay: -0.32s;\n}\n\n.spinner .bounce2 {\n -webkit-animation-delay: -0.16s;\n animation-delay: -0.16s;\n}\n\n@-webkit-keyframes sk-bouncedelay {\n 0%, 80%, 100% { -webkit-transform: scale(0) }\n 40% { -webkit-transform: scale(1.0) }\n}\n\n@keyframes sk-bouncedelay {\n 0%, 80%, 100% {\n -webkit-transform: scale(0);\n transform: scale(0);\n } 40% {\n -webkit-transform: scale(1.0);\n transform: scale(1.0);\n }\n}\n","#enp-quiz {\n transition: background .25s $fastInEaseOut;\n\n .enp-container {\n @include container;\n }\n\n .enp-aside {\n @include well;\n @include container--thin;\n font-size: 1.2rem;\n }\n\n .enp-aside__title {\n @include small-uppercase;\n font-weight: 600;\n }\n\n .enp-page-title {\n border-bottom: 2px solid $blue;\n }\n}\n","\n\n// enter the root BEM class and this will output the correct CSS for you\n@mixin radio-block($rootBEM) {\n .#{$rootBEM}__legend {\n @include radio-block__legend ;\n }\n\n .#{$rootBEM}__input {\n @include radio-block__input ;\n }\n\n .#{$rootBEM}__label {\n @include radio-block__label ;\n }\n\n .#{$rootBEM}__input:checked + .#{$rootBEM}__label {\n @include radio-block__label--checked ;\n }\n\n .#{$rootBEM}__input:focus + .#{$rootBEM}__label {\n @include radio-block__label--focus ;\n }\n}\n\n@mixin radio-inline($rootBEM) {\n .#{$rootBEM}__legend {\n @include radio-inline__legend ;\n }\n\n .#{$rootBEM}__input {\n @include radio-inline__input ;\n }\n\n .#{$rootBEM}__label {\n @include radio-inline__label ;\n }\n\n .#{$rootBEM}__input:checked + .#{$rootBEM}__label {\n @include radio-inline__label--checked ;\n }\n\n .#{$rootBEM}__input:focus + .#{$rootBEM}__label {\n @include radio-inline__label--focus ;\n }\n\n}\n\n@mixin label {\n display: block;\n color: lighten($font, 10);\n font-weight: normal;\n font-size: 0.85rem;\n text-transform: uppercase;\n}\n\n@mixin legend {\n @include label;\n padding-top: 1.6rem;\n margin-bottom: 0.2rem;\n border: none;\n}\n\n@mixin label--bold {\n @include label;\n font-weight: 500;\n}\n\n@mixin legend--bold {\n @include label--bold;\n}\n\n@mixin input {\n font-size: 1rem;\n font-family: $fontBody;\n padding: 0.8rem 0.5rem;\n background: #fff;\n border: 1px solid #aaa;\n border-radius: 3px;\n width: 20rem;\n max-width: 100%;\n margin-bottom: 1.2rem;\n\n @include breakpoint(medium) {\n padding: 0.8rem;\n }\n}\n\n@mixin input--large {\n @include input;\n padding: 1rem 1.2rem;\n font-size: 1.3rem;\n}\n\n@mixin input--xl {\n @include input;\n font-weight: bold;\n font-size: 1.6rem;\n margin-bottom: 1rem;\n\n &::placeholder {\n font-weight: bold;\n }\n}\n\n@mixin textarea {\n @include input;\n line-height: 1.5;\n width: 100%;\n\n &:focus {\n @include focus--glow;\n }\n}\n\n\n/*\n@mixin no-radio__input {\n display: inline-block;\n width: 0;\n margin: 0;\n padding: 0;\n opacity: 0;\n overflow: hidden;\n}\n\n@mixin no-radio__label {\n display: inline-block;\n position: relative;\n left: -1rem;\n padding: .2rem .6rem;\n @include small-uppercase;\n font-size: .8rem;\n font-weight: normal;\n background: transparent;\n border-radius: 3px;\n transition: all .2s;\n}*/\n\n@mixin radio-block__legend {\n @include legend;\n margin-bottom: 0.6rem;\n}\n\n@mixin radio-block__input {\n position: absolute;\n z-index: 9;\n margin-left: 9px;\n}\n\n@mixin radio-block__label {\n text-transform: capitalize;\n background: #f2f2f2;\n display: block;\n padding: 5px 10px 5px 39px;\n position: relative;\n top: -6px;\n box-shadow: inset -1px -1px 0 rgba(0,0,0,.1), inset 30px 0px 0 rgba(255,255,255,.7), inset 31px 0px 0 rgba(0,0,0,.1);\n}\n\n@mixin radio-block__label--checked {\n background: $green;\n color: #fff;\n text-shadow: 0 0 1px rgba(0,0,0,.7);\n}\n\n@mixin radio-block__label--focus {\n z-index: 8;\n @include focus--glow ;\n}\n\n@mixin radio-inline__legend {\n @include legend;\n}\n\n@mixin radio-inline__input {\n @include screen-reader-text;\n}\n\n@mixin radio-inline__label {\n text-transform: capitalize;\n display: inline-block;\n padding: 0.2rem 0.5rem;\n border-radius: 3px;\n cursor: pointer;\n}\n\n@mixin radio-inline__label--checked {\n @include radio-block__label--checked ;\n}\n\n@mixin radio-inline__label--focus {\n @include radio-block__label--focus ;\n}\n\n@mixin select--wide--chevron {\n width: 100%;\n -webkit-appearance: none;\n -moz-appearance: none;\n appearance: none;\n font-size: 0.85rem;\n padding: 0.7rem 32px 0.7rem 0.8rem;\n border: 1px solid #bbb;\n border-radius: 3px;\n margin-bottom: 1.6rem;\n background: url(../svg/chevron-down.svg) 100% 50% no-repeat;\n background-color: #fff;\n box-shadow: inset -26px 0 0 rgba(0,0,0,.1);\n}\n\n\n#enp-quiz {\n\n fieldset {\n border: none;\n margin: 0;\n padding: 0;\n }\n\n .enp-label {\n @include label;\n }\n\n .enp-legend {\n @include legend;\n }\n\n .enp-input {\n @include input;\n\n &.enp-input--has-description {\n margin-bottom: 0.2rem;\n }\n }\n\n .enp-textarea-description,\n .enp-input-description {\n margin-bottom: 1rem;\n font-size: 0.85rem;\n }\n\n .enp-textarea-description--before,\n .enp-input-description--before {\n margin-bottom: 0;\n }\n\n .enp-input::placeholder,\n .enp-textarea::placeholder {\n font-family: $fontBody;\n font-weight: 300;\n color: lighten($font, 40);\n }\n\n .enp-textarea {\n @include textarea;\n\n &.enp-textarea--has-description {\n margin-bottom: 0.2rem;\n }\n &.enp-textarea--has-description--before {\n margin-bottom: 1.2rem;\n }\n }\n\n .enp-embed-code {\n @include textarea;\n width: 100%;\n padding: 1.6rem;\n font-size: 0.9rem;\n font-family: Monaco, Consolas, \"Andale Mono\", \"DejaVu Sans Mono\", monospace;\n\n @include media(max-medium) {\n padding: .8rem;\n }\n }\n}\n","#enp-quiz {\n .enp-publish-page-container,\n .enp-preview-page-container,\n .enp-quiz-form-container {\n @include container--wide;\n position: relative;\n padding-top: 6rem;\n padding-bottom: 4rem;\n background: $really_light_gray;\n\n @include media(max-small) {\n padding-left: 8px;\n padding-right: 8px;\n }\n }\n\n .enp-quiz-form {\n @include container--form;\n padding-left: 0;\n padding-right: 0;\n }\n\n .enp-quiz-title__label {\n @include label--bold;\n }\n\n .enp-quiz-title__textarea {\n @include input--xl;\n }\n \n textarea {\n color: #000;\n }\n\n .enp-accordion-container {\n margin-bottom: 1.6rem;\n position: relative;\n }\n\n .enp-question-content {\n @include accordion;\n padding-top: 0;\n position: relative;\n }\n\n .enp-question-inner {\n padding: 1.6rem 1.6rem 1rem;\n\n @include breakpoint(medium) {\n padding-right: 2.8rem;\n padding-left: 2.9rem;\n }\n\n }\n\n .enp-question-title__label {\n @include label--bold;\n }\n\n .enp-question-title__textarea {\n @include input--large;\n }\n\n .enp-question-image-upload {\n @include btn--dashed--light--alt-bg;\n @include small-uppercase;\n position: relative;\n margin-bottom: 2rem;\n transform: translate3d(0, 0, 0);\n transition: all .3s $fastInEaseOut;\n\n .enp-question-image-upload__icon--photo {\n @include icon--xxxl;\n opacity: 0;\n position: absolute;\n top: 0;\n left: 0;\n right: 0;\n margin: 0 auto;\n transform: translate3d(0, 0, 0);\n z-index: -1;\n transition: opacity .2s, transform .3s $fastInEaseOut;\n }\n\n .enp-question-image-upload__icon--add {\n @include icon--circle--small;\n @include icon--gray-bg;\n margin-right: 5px;\n position: relative;\n top: 0.2rem;\n }\n\n &:hover,\n &:focus,\n &:active {\n padding-top: 5rem;\n padding-bottom: 2rem;\n\n .enp-question-image-upload__icon--photo {\n opacity: 1;\n z-index: 1;\n transform: translate3d(0, 1.75rem, 0);\n }\n\n .enp-question-image-upload__icon--add {\n @include icon--gray-bg--hover;\n }\n }\n }\n\n .enp-question-image__container {\n position: relative;\n margin-bottom: 1rem;\n }\n\n .enp-question-image {\n margin-bottom: 1.2rem;\n }\n\n @include radio-inline(enp-question-type);\n\n .enp-question-type__label {\n position: relative;\n z-index: 9;\n }\n\n .enp-slider-options,\n .enp-mc-options {\n margin-top: 0rem;\n display: none;\n animation: slideOutTop .25s $fastInEaseOut forwards;\n animation-delay: 0s, .05s;\n }\n\n .enp-question-type__input--slider:checked ~ .enp-slider-options,\n .enp-question-type__input--mc:checked ~ .enp-mc-options {\n visibility: visible;\n display: block;\n animation: fadeIn .45s $fastInEaseOut forwards;\n }\n\n .enp-mc-options__list {\n @include ul-no-style;\n }\n\n .enp-mc-option {\n position: relative;\n padding-left: 6px;\n\n @include breakpoint(medium) {\n padding-left: 0;\n }\n }\n\n .enp-mc-options__legend {\n @include legend--bold;\n }\n\n .enp-mc-option__add,\n .enp-mc-option__button--correct,\n .enp-mc-option__button--delete {\n display: none;\n }\n\n .enp-question-type__input--mc:checked ~ .enp-mc-options {\n .enp-mc-option__add,\n .enp-mc-option__button--correct,\n .enp-mc-option__button--delete {\n display: block;\n }\n }\n\n .enp-button__question-image-delete,\n .enp-mc-option__button--delete {\n @include btn--reset;\n position: absolute;\n top: 9px;\n right: -24px;\n fill: #bbb;\n cursor: pointer;\n\n @include breakpoint(medium) {\n right: -30px;\n }\n\n &:focus,\n &:hover {\n fill: $red;\n }\n }\n\n .enp-mc-option__button--correct {\n @include btn--reset;\n position: absolute;\n top: 8px;\n left: -24px;\n\n @include breakpoint(medium) {\n left: -35px;\n }\n\n .enp-mc-option__icon--correct {\n @include icon--circle--pad;\n width: 28px;\n height: 28px;\n fill: #fff;\n background: #fff;\n cursor: pointer;\n border: 2px solid $fade_red;\n transition: all .2s;\n }\n\n &:focus .enp-mc-option__icon--correct,\n &:hover .enp-mc-option__icon--correct {\n background: #fff;\n border-color: $green;\n fill: $green;\n }\n\n &:disabled {\n opacity: 1;\n\n .enp-mc-option__icon--correct {\n cursor: default;\n fill: #fff;\n border: 2px solid transparent;\n }\n }\n }\n\n .enp-mc-option--correct {\n .enp-mc-option__input {\n box-shadow: inset 0 0 3px $green;\n border: 1px solid $green;\n }\n\n .enp-mc-option__button--correct:focus .enp-mc-option__icon--correct,\n .enp-mc-option__button--correct:hover .enp-mc-option__icon--correct,\n .enp-mc-option__icon--correct {\n fill: #fff;\n border-color: $green;\n background: $green;\n }\n }\n\n .enp-mc-option__add {\n @include btn--dashed--light--alt-bg;\n @include small-uppercase;\n text-align: left;\n padding: 0.7rem 0.75rem 0.8rem;\n\n .enp-mc-option__add__icon {\n @include btn--icon__icon--circle--small ;\n @include icon--gray-bg;\n position: relative;\n top: 0.2rem;\n }\n\n &:hover .enp-mc-option__add__icon {\n @include icon--gray-bg--hover;\n }\n }\n\n .enp-slider-options .enp-input {\n max-width: 11.8rem;\n }\n\n .enp-slider-range__container .enp-input,\n .enp-slider-correct__container .enp-input {\n max-width: 8.8rem;\n @include breakpoint('small') {\n max-width: 11.8rem;\n }\n }\n\n .enp-slider-preview {\n border: 1px solid #ddd;\n margin-top: 0.2rem;\n margin-bottom: 1.6rem;\n padding: 1.6rem 1.6rem .6rem;\n position: relative;\n\n .enp-label--slider-preview {\n position: absolute;\n width: 100%;\n top: 0.2rem;\n left: 0.4rem;\n font-size: 0.75rem;\n text-transform: uppercase;\n }\n }\n\n .enp-slider-range__container,\n .enp-slider-correct__container {\n @include flex-spread;\n align-items: center;\n }\n\n .enp-slider-range__helper,\n .enp-slider-correct__helper {\n color: #777;\n font-size: 0.85rem;\n background: #fff;\n padding: 0 .3rem;\n position: relative;\n\n &:before {\n content: '';\n position: absolute;\n top: 44%;\n height: 4px;\n background: #ddd;\n width: 120px;\n left: -60px;\n z-index: -1;\n transition: width 0.7s $fastInEaseOut, background 1.6s $fastInEaseOut;\n }\n }\n\n .enp-slider-options {\n margin-bottom: 2rem;\n\n .enp-accordion-header {\n text-transform: uppercase;\n font-size: 0.85rem;\n padding: 0.675rem;\n }\n\n .enp-slider-advanced-options__content {\n border: none;\n box-shadow: none;\n padding-top: 1rem;\n padding-bottom: 0;\n margin-bottom: 0;\n }\n }\n\n .enp-slider-correct-high__container {\n position: relative;\n }\n\n .enp-slider-correct-high__input-container--hidden {\n display: none;\n }\n\n .enp-slider-correct__helper--hidden {\n &:before {\n width: 0;\n background: $green;\n }\n }\n\n .enp-slider-correct-answer-range--add-range {\n @include btn--dashed--light--alt-bg;\n margin-left: 0.8rem;\n font-size: 0.7rem;\n\n @include breakpoint('small') {\n font-size: 0.8rem;\n padding: .7rem;\n }\n\n @include breakpoint('medium') {\n padding: .7rem 1.2rem;\n min-width: 11.4rem;\n }\n\n .enp-slider-correct-answer-range__icon {\n @include btn--icon__icon--circle--small ;\n @include icon--gray-bg;\n position: relative;\n left: -0.2rem;\n }\n\n &:hover .enp-slider-correct-answer-range__icon {\n @include icon--gray-bg--hover;\n }\n }\n\n .enp-slider-correct-answer-range--remove-range {\n position: absolute;\n right: -1.6rem;\n bottom: 1.6rem;\n background: none;\n border: none;\n box-shadow: none;\n padding: 0 0.1rem;\n\n .enp-slider-correct-answer-range__icon {\n width: 1.2em;\n height: 1.2em;\n fill: $dark_gray;\n }\n\n &:hover,\n &:focus {\n .enp-slider-correct-answer-range__icon {\n fill: $red;\n }\n }\n\n @include breakpoint(medium) {\n top: -0.2rem;\n right: -0.2rem;\n bottom: auto;\n }\n\n }\n\n .enp-slider-options .enp-input:read-only {\n background: $light_gray;\n }\n\n .enp-answer-explanation {\n background: $light_blue;\n padding-top: 2rem;\n box-shadow: inset 1px 0px 0 #ccc, inset -1px -1px 0 #ccc, inset 0 1px 0 #ddd;\n }\n\n .enp-answer-explanation__label {\n @include label--bold;\n\n }\n\n .enp-question__button--delete {\n @include btn--reset;\n position: absolute;\n top: 9px;\n right: 9px;\n fill: #bbb;\n cursor: pointer;\n\n @include breakpoint(medium) {\n right: -30px;\n }\n\n &:hover {\n fill: $red;\n }\n }\n\n .enp-question__move {\n position: absolute;\n left: 15px;\n\n @include breakpoint(medium) {\n left: -40px;\n }\n }\n\n .enp-sort__placeholder {\n background: #ddd;\n height: 60px;\n width: 100%;\n max-height: 120px;\n margin-bottom: 1.6rem;\n }\n\n .ui-sortable .ui-sortable-helper {\n .ui-sortable-handle {\n cursor: move;\n cursor: grabbing;\n cursor: -webkit-grabbing;\n }\n }\n \n\n .enp-question__button--move {\n @include btn--reset;\n position: absolute;\n fill: #bbb;\n cursor: pointer;\n\n &:hover, &:focus {\n fill: #333;\n }\n\n &:disabled {\n opacity: 0.5;\n }\n }\n\n .enp-question__button--move--up {\n top: 0px;\n left: -9px;\n }\n\n\n .enp-question__button--move--down {\n top: 3px;\n right: -9px;\n }\n\n .enp-quiz-form__add-question {\n @include btn--icon;\n @include btn--dashed;\n padding-top: 1rem;\n padding-bottom: 1rem;\n margin-top: 1.6rem;\n margin-bottom: 2rem;\n\n .enp-add-question__icon {\n @include btn--icon__icon--circle--small;\n @include icon--normal;\n @include icon--gray-bg;\n position: relative;\n top: 0.2rem;\n }\n\n &:hover .enp-add-question__icon {\n @include icon--gray-bg--hover;\n }\n }\n\n .enp-quiz-form__save {\n @include btn;\n width: 100%;\n margin-bottom: 1rem;\n opacity: 0.8;\n text-shadow: 0px -1px 2px rgba(0,0,0,.6);\n\n &:hover,\n &:focus {\n opacity: 1;\n }\n\n @include breakpoint(small) {\n padding: 1.2rem 1.8rem 1.1rem;\n width: 27%;\n margin-right: 3%;\n position: relative;\n top: -2px;\n margin-top: 1.6rem;\n }\n\n /*@include breakpoint(medium) {\n padding-top: 1rem;\n padding-bottom: 1rem;\n margin-top: 1.6rem;\n margin-bottom: 2rem;\n }*/\n }\n\n .enp-quiz-form__save--reveal {\n animation: slideInTop--reduced-opacity .3s $fastInEaseOut;\n }\n\n @include btn--icon--circle(enp-btn--next-step);\n\n .enp-btn--next-step {\n width: 100%;\n padding: 1rem 1.4rem 1rem;\n\n @include breakpoint(small) {\n width: 68%;\n }\n\n /*\n * AFTER we have remove the Save button,\n * use this code to add the preview button into the\n * header\n @include media(max-medium) {\n padding: 1rem 1.4rem 1rem;\n }\n\n @include breakpoint(medium) {\n position: absolute;\n right: 20px;\n top: 10px;\n width: auto;\n z-index: 999999;\n\n &.enp-btn--next-step--fixed {\n position: fixed;\n animation: navSlideIn .25s;\n }\n }*/\n\n }\n\n .enp-btn--next-step--reveal {\n animation: slideInTop .3s $fastInEaseOut;\n }\n\n\n // UX interactions\n .enp-mc-option--inputs,\n .enp-accordion-header--inserting {\n animation: slideInBottom .4s $fastInEaseOut forwards;\n }\n\n .enp-mc-option--remove,\n .enp-question--remove,\n .enp-question__image--remove {\n animation: removeElement .5s $fastInEaseOut forwards;\n }\n\n .enp-image-upload-wait {\n @include btn--dashed--light--alt-bg;\n padding-top: 4rem;\n padding-bottom: 4rem;\n margin-bottom: 1rem;\n width: 100%;\n }\n\n // validation\n .enp-accordion-header.question-has-error {\n color: $red;\n box-shadow: 0 0 3px $red;\n }\n\n}\n\n.enp-quiz.ui-sortable--sorting #enp-quiz .enp-accordion-content {\n display: none;\n}","#enp-quiz {\n\n\n .enp-quiz-settings-container {\n\n @include breakpoint(large) {\n margin: 0;\n width: 40%;\n float: left;\n }\n }\n\n .enp-quiz-preview-container {\n\n @include breakpoint(large) {\n width: 60%;\n float: left;\n }\n\n }\n\n .enp-quiz-share__legend,\n .enp-quiz-settings__title {\n position: relative;\n @include small-uppercase;\n font-weight: 600;\n padding-top: 0;\n }\n\n .enp-quiz-settings__form {\n margin-bottom: 3rem;\n\n @include breakpoint(large) {\n padding: 0;\n margin-bottom: 0;\n }\n }\n\n .enp-fieldset {\n @include breakpoint(medium) {\n // this is necessary to keep the form elements visible on top of the\n // white BG on the sidebar. We can't set this on the whole form bc\n // then the publish button won't be positioned right\n position: relative;\n }\n }\n\n .enp-title-display__legend {\n padding-top: 0;\n\n @include breakpoint(medium) {\n padding-top: 0.4rem;\n }\n }\n\n .enp-quiz-share__input,\n .enp-quiz-styles__input {\n width: 100%;\n }\n\n .enp-quiz-styles__textarea--custom-css {\n font-family: Monaco,Consolas,\"Andale Mono\",\"DejaVu Sans Mono\",monospace;\n font-size: 0.9rem;\n min-height: 200px;\n }\n\n .enp-fieldset--section {\n padding: 1.6rem 1rem;\n\n &.enp-accordion-content--open {\n margin-bottom: 0;\n }\n }\n\n .enp-quiz-share--facebook {\n margin-bottom: 2rem;\n }\n\n @include radio-inline(enp-title-display);\n @include radio-inline(enp-mc-options-order);\n\n .enp-mc-options-order {\n margin-bottom: 1.6rem;\n }\n\n .enp-quiz-share__textarea {\n min-height: 7.6rem;\n margin-bottom: 2rem;\n\n @include breakpoint('medium') {\n min-height: 4.6rem;\n }\n\n @include breakpoint('large') {\n min-height: 7.6rem;\n }\n\n\n }\n\n .enp-preview-form__submit {\n margin-top: 1.6rem;\n margin-bottom: 1.6rem;\n }\n\n .enp-quiz-preview__title {\n @include small-uppercase;\n font-weight: 600;\n }\n\n .enp-preview-form__submit {\n @include btn;\n width: 100%;\n padding-top: 0.85rem;\n padding-bottom: 0.85rem;\n margin-bottom: 1rem;\n opacity: 0.8;\n text-shadow: 0px -1px 2px rgba(0,0,0,.6);\n\n &:hover,\n &:focus {\n opacity: 1;\n }\n }\n\n .enp-preview-form__submit--publish {\n width: 100%;\n position: relative;\n z-index: 99999999;\n padding: 1.05rem 1.8rem .95rem;\n }\n\n .enp-quiz-styles__iris-wrapper {\n position: relative;\n }\n\n // Fix for WP Color Picker formatting\n .iris-picker {\n box-sizing: content-box;\n position: relative;\n z-index: 9999999999;\n top: -1.2rem;\n margin-bottom: 1rem;\n padding-bottom: 3rem;\n padding-right: 30px;\n\n @include breakpoint(large) {\n position: absolute;\n top: -4px;\n left: 104%;\n }\n\n &:last-of-type {\n margin-bottom: 0;\n }\n\n .ui-slider-handle:focus,\n .ui-draggable-handle:focus .ui-slider-handle {\n box-shadow: 0 0 3px rgba(0,0,0,.75);\n }\n\n }\n\n .enp-quiz-styles__set-default {\n @include btn--ghost;\n font-size: 0.75rem;\n position: absolute;\n left: 10px;\n bottom: 10px;\n }\n\n .enp-iris__close {\n @include btn--reset;\n position: absolute;\n top: 5px;\n right: 5px;\n fill: #888;\n cursor: pointer;\n }\n\n .enp-quiz-styles__input--color {\n padding-left: 45px;\n }\n\n .enp-quiz-styles__color-demo {\n width: 30px;\n height: 30px;\n border: 1px solid #ccc;\n top: 8px;\n left: 8px;\n border-radius: 3px;\n\n position: absolute;\n }\n\n\n}\n","#enp-quiz {\n /* Removing flexbox layout temporarily\n * because it wasn't laying out correctly before content loading\n * It would snap into the correct layout after a resize or textarea highlight\n .enp-publish-page-container {\n &:before {\n @include breakpoint(medium) {\n position: absolute;\n top: 0;\n bottom: 0;\n left: -100%;\n width: 128%;\n content: '';\n background: #fff;\n border-right: 1px solid #ddd;\n }\n\n @include breakpoint(large) {\n width: 124%;\n }\n }\n\n .enp-quiz-message {\n @include breakpoint(medium) {\n margin-left: 33%;\n }\n\n @include breakpoint(large) {\n margin-left: 26%;\n }\n }\n }\n\n .enp-publish-page-flex-container {\n @include breakpoint(medium) {\n @include flex;\n align-items: stretch;\n flex-direction: row-reverse;\n }\n }\n\n .enp-publish-page__aside-container {\n\n @include breakpoint(medium) {\n position: relative;\n margin: 0 6% 0 0;\n padding: 0;\n width: 24%;\n }\n\n @include breakpoint(large) {\n margin: 0;\n //padding-left: 20px;\n width: 20%;\n }\n }\n\n .enp-share-quiz__container,\n .enp-ab-ad__container {\n @include breakpoint(medium) {\n padding: 0;\n border: none;\n }\n }\n */\n\n .enp-share-quiz__url {\n display: block;\n font-size: 1.5rem;\n line-height: 1.4;\n word-wrap: break-word;\n }\n\n @include share_icons(enp-share-quiz);\n\n .enp-share-quiz {\n justify-content: space-around;\n margin-bottom: 0;\n }\n}\n","#enp-quiz {\n .enp-ab-create__container {\n @include container--wide;\n width: 100%;\n background: $really_light_gray;\n padding-top: 3rem;\n padding-bottom: 3rem;\n }\n\n .enp-ab-create__form {\n @include container--thin;\n }\n\n .enp-ab-create__label {\n @include label--bold;\n }\n\n .enp-ab-create-title__textarea {\n @include input--xl;\n width: 100%;\n }\n\n .enp-ab-create__select {\n @include select--wide--chevron;\n }\n\n .enp-ab-create__submit {\n width: 100%;\n padding-top: 1em;\n padding-bottom: 1em;\n }\n}\n","#enp-quiz {\n\n &.enp-quiz__main {\n background: $background;\n }\n\n .enp-dash-container {\n @include container--wide;\n @include xpadding-vertical;\n // background: $really_light_gray;\n transition: all .25s $fastInEaseOut;\n }\n\n .enp-dash__section-header {\n display: block;\n margin-bottom: 0.325rem;\n\n @include breakpoint(medium) {\n display: flex;\n @include flex-bottom;\n justify-content: space-between;\n }\n\n }\n\n .enp-search-quizzes {\n display: block;\n @include breakpoint(small) {\n display: flex;\n @include flex-bottom;\n }\n\n }\n\n .enp-search-quizzes__form-item {\n margin-bottom: 0.6rem;\n display: block;\n\n @include breakpoint('small') {\n margin-bottom: 0;\n margin-right: 1rem;\n\n &:last-of-type {\n margin-right: 0;\n }\n }\n\n }\n\n .enp-quiz-search {\n position: relative;\n }\n\n .enp-search-quizzes__label {\n margin-bottom: 0;\n @include screen-reader-text ;\n }\n\n .enp-search-quizzes__select {\n padding: .3rem;\n border-radius: 3px;\n }\n\n .enp-quiz-search__input {\n max-width: 160px;\n margin: 0 0 0.1rem;\n padding: .3rem .3rem .3rem 26px;\n font-size: 0.85rem;\n }\n\n .enp-quiz-search__icon {\n position: absolute;\n bottom: 0.3rem;\n left: 0.2rem;\n width: 21px;\n height: 21px;\n }\n\n .enp-search-quizzes__button {\n padding: 0.2rem 0.8rem;\n }\n\n .enp-search-results-description {\n font-size: 0.85rem;\n }\n\n .enp-search-results-description__link {\n white-space: nowrap;\n }\n\n .enp-search-results-description__icon {\n width: 1.3em;\n height: 1.3em;\n position: relative;\n top: 4px;\n left: 2px;\n }\n\n .enp-dash__section-title {\n @include small-uppercase;\n margin-bottom: 0.325rem;\n }\n\n .enp-view-toggle {\n cursor: pointer;\n opacity: .5;\n display: none; // hide the buttons for small screens\n\n @include breakpoint(medium) {\n display: flex;\n }\n }\n\n .enp-view-toggle__active {\n opacity: 1;\n }\n\n .enp-sort-by {\n margin-left: 5px;\n }\n\n .enp-dash-list {\n @include flex-grid;\n }\n\n .enp-dash-item {\n @include flex-grid__item ;\n @include flex-spread-vertical;\n display: flex;\n flex-direction: column;\n align-content: flex-end;\n justify-content: flex-end;\n border: none;\n border-radius: 3px;\n background-color: $gray;\n }\n\n .enp-dash-item--published {\n box-shadow: inset 4px 0 0 $blue, 0 1px 0 rgba(0,0,0,.1);\n }\n\n .enp-dash-item--draft {\n box-shadow: inset 4px 0 0 lighten($blue, 45%), 0 1px 0 rgba(0,0,0,.1);\n }\n\n .enp-dash-item--remove {\n animation: removeElement .5s $fastInEaseOut forwards;\n }\n\n .enp-dash-list--list-view {\n .enp-dash-item {\n margin: 0 0 0.8rem;\n flex-basis: 100%;\n }\n }\n\n .enp-dash-item__spinner {\n @include flex-center ;\n position: absolute;\n top: 0;\n bottom: 0;\n left: 0;\n right: 0;\n background: rgba(245,216,216,0.8);\n width: 100%;\n animation: fadeIn .3s $fastInEaseOut;\n }\n\n .enp-dash-item__header {\n padding: 0.5rem 1rem;\n background: $light_gray;\n border-bottom: 1px solid $dark_gray;\n display: flex;\n justify-content: space-between;\n align-items: center;\n @include border-radius;\n }\n\n .enp-dash-item__title {\n @include flex-grid__title ;\n padding: 0;\n margin-bottom: 0;\n a {\n color: $blue;\n }\n }\n\n .enp-dash-item__content {\n padding: 0rem 0 0.375rem;\n position: relative;\n transition: all .2s $fastInEaseOut;\n }\n\n .enp-dash-item__meta {\n @include hint;\n font-size: 0.75rem;\n }\n\n .enp-dash-item__username {\n word-wrap: break-word;\n padding-left: 0.4rem;\n margin-left: 0.2rem;\n border-left: 1px solid #ddd;\n }\n\n .enp-dash-item__title--ab-test {\n padding-bottom: 0;\n }\n\n .enp-dash-item__ab-quizzes {\n @include ul-no-style;\n font-size: 0.85rem;\n color: $dark_gray;\n margin-bottom: 0.8rem;\n }\n\n .enp-dash-item__nav {\n @include ul-no-style;\n margin-bottom: 0;\n font-size: 0.85rem;\n }\n\n .enp-dash-item__nav__item {\n display: flex;\n margin: 0;\n width: 100%;\n padding: 12px;\n align-items: center;\n &:hover {\n background-color: $gray;\n .enp-dash-item__icon {\n fill: $red;\n }\n }\n a {\n font-weight: normal;\n color: $red;\n @include flex;\n align-items: center;\n\n &:focus {\n outline: 1px dotted $link;\n outline-offset: 1px;\n }\n }\n\n &:last-of-type {\n margin-right: 0;\n }\n }\n\n .enp-dash-item__delete {\n @include btn--reset;\n position: relative;\n padding: 0;\n cursor: pointer;\n @include flex;\n .enp-icon {\n fill: $darker_gray;\n }\n }\n .enp-dash-item__icon {\n fill: $darker_gray;\n width: 15px;\n height: 15px;\n margin-right: 10px;\n // min-width: 15%;\n }\n\n .enp-dash-item__nav--collapsible {\n display: none;\n position: absolute;\n z-index: 2;\n top: 53px;\n right: 1.5rem;\n width: 195px;\n background-color: #fff;\n text-align: left;\n transform: translate3d(0,0,0);\n transition: all .2s $fastInEaseOut;\n\n .enp-dash-item__nav__item {\n padding: 0.5rem 1rem;\n cursor: pointer;\n }\n }\n\n .enp-dash-item__menu-action {\n height: 24px;\n background: none;\n border: none;\n color: #444;\n padding: 0;\n bottom: 0.2rem;\n right: 1.5rem;\n top: 1.5rem;\n cursor: pointer;\n }\n\n .enp-dash-item__menu-action-wrap {\n max-width: 0;\n display: flex;\n flex-direction: column;\n align-items: flex-end;\n }\n\n .enp-dash-item__menu-action__icon {\n width: 15px;\n height: 15px;\n fill: $darker_gray;\n transition: all .3s $fastInEaseOut;\n }\n\n .enp-dash-item__menu-action__icon--bottom {\n \n }\n\n .enp-dash-item--menu-active {\n transform: translate3d(0,-3px,0);\n\n &.enp-dash-item--published {\n box-shadow: inset 4px 0 0 $green, 0 2px 2px rgba(0,0,0,.2);\n }\n\n &.enp-dash-item--draft {\n box-shadow: inset 4px 0 0 lighten($green, 25%), 0 2px 2px rgba(0,0,0,.2);\n }\n\n .enp-dash-item__menu-action__icon--bottom {\n transform: rotateX(180deg);\n }\n // .enp-dash-item__menu-action__icon--top {\n // transform: rotateX(-180deg) translateY(0px);\n // }\n\n .enp-dash-item__nav--collapsible {\n display: block;\n animation: slideInTop .25s $fastInEaseOut forwards;\n @include border-radius;\n @include box-shadow;\n }\n\n .enp-dash-item__content {\n opacity: 0.4;\n }\n\n }\n\n\n .enp-quiz-results {\n display: flex;\n justify-content: space-around;\n list-style: none;\n margin: 0.8rem 0 0;\n padding: 0;\n text-align: center;\n }\n\n .enp-quiz-results__item {\n\n margin: 0 2% 0 0;\n padding: 0;\n color: #454545;\n\n @media (max-width:280px) {\n width: 100%;\n padding: 0;\n margin-bottom: 0.6rem;\n }\n }\n\n .enp-quiz-results__number {\n font-size: 1.6rem;\n line-height: 1;\n position: relative;\n }\n\n .enp-dash-item--draft .enp-quiz-results__number {\n opacity: 0.5;\n }\n\n .enp-quiz-results__number--average-score {\n color: darken($green, 8);\n\n &:after {\n content: '%';\n font-size: .9rem;\n position: absolute;\n top: .3rem;\n right: -1rem;\n }\n }\n\n .enp-quiz-results__label {\n text-transform: uppercase;\n font-size: .7rem;\n font-weight: 300;\n color: #888;\n }\n\n\n .enp-quiz-list__view {\n @include flex-bottom;\n }\n\n .enp-dash-item--add-new {\n background: none;\n border: none;\n padding: 0;\n position: relative;\n\n @include breakpoint(medium) {\n min-height: 7rem;\n }\n\n }\n\n .enp-dash-link--add-new {\n @include btn--dashed--light;\n justify-content: flex-start;\n color: $link;\n padding: 1rem 1.2rem;\n\n\n @include breakpoint(medium) {\n @include small-uppercase;\n @include flex-center;\n flex-direction: column;\n position: absolute;\n top: 0;\n left: 0;\n right: 0;\n bottom: 0;\n }\n\n .enp-dash-link__icon {\n @include icon--circle;\n @include icon--normal;\n margin-right: 5px;\n\n @include breakpoint(medium) {\n width: 2rem;\n height: 2rem;\n margin: 0.8rem 0 0.2rem;\n }\n }\n\n &:hover {\n color: $link_hover;\n\n .enp-dash-link__icon {\n fill: #fff;\n background: $link_hover;\n }\n }\n\n }\n\n .enp-quiz-message--welcome p {\n color: $font;\n }\n\n // pagination\n .enp-paginate {\n @include ul-no-style ;\n @include flex-center ;\n font-size: 1rem;\n }\n\n .enp-paginate__link {\n @include flex-center ;\n margin: 0 0.2rem;\n padding: 0 0.4rem;\n border-radius: 3px;\n font-weight: normal;\n\n }\n\n .enp-paginate__link--current-page {\n border: 2px solid $blue;\n }\n\n .enp-paginate__item--last-page,\n .enp-paginate__item--first-page {\n display: flex;\n }\n\n .enp-paginate__item--first-page:after,\n .enp-paginate__item--last-page:before {\n content: '...';\n font-size: 1rem;\n position: relative;\n bottom: 0.2rem;\n opacity: 0.6;\n }\n\n .enp-paginate__item--no-gap {\n &:before,\n &:after {\n content:'';\n }\n }\n\n .enp-paginate__item--next-page {\n margin-left: 0.2rem;\n }\n\n .enp-paginate__item--previous-page {\n margin-right: 0.2rem;\n }\n}\n","#enp-quiz {\n .enp-quiz-breadcrumbs {\n @include flex-center;\n position: absolute;\n top: 0;\n width: 1000%;\n left: -500%;\n right: -500%;\n margin-left: auto;\n margin-right: auto;\n background: #fff;\n border-bottom: 1px solid #ddd;\n padding: 10px;\n z-index: 99999;\n }\n\n .enp-quiz-breadcrumbs__list {\n @include flex-inline;\n }\n\n .enp-quiz-breadcrumbs__item {\n @include flex-inline__item ;\n @include flex-center;\n fill: $link;\n margin-right: 5px;\n\n @include breakpoint(small) {\n margin-right: 10px;\n }\n }\n\n .enp-quiz-breadcrumbs__link--disabled {\n @include disabled;\n }\n\n .enp-quiz-breadcrumbs__link--active {\n @include btn--ghost;\n @include btn--thin;\n }\n\n .enp-quiz-breadcrumbs__link {\n font-size: 1rem;\n font-weight: 400;\n text-transform: none;\n letter-spacing: 0;\n }\n\n // JS\n .enp-quiz-breadcrumbs--fixed {\n top: 0;\n position: fixed;\n animation: navSlideIn .25s;\n }\n}\n","#enp-quiz {\n .enp-results-title {\n font-size: 1.6rem;\n text-align: center;\n padding: 3.2rem 20px 2.6rem;\n background: $really_light_gray;\n margin: -1.2rem 0 2rem;\n border-bottom: 1px solid #ddd;\n\n &:after {\n @include small-uppercase;\n display: block;\n content: \"RESULTS\";\n font-weight: normal;\n }\n }\n\n .enp-results__container {\n @include container--wide;\n display: block;\n\n @include breakpoint(large) {\n display: flex;\n @include flex-spread;\n }\n }\n\n .enp-results__container,\n .enp-quiz-scores__container,\n .enp-results-flow__container {\n @include media(max-medium) {\n padding: 8px;\n }\n }\n\n .enp-quiz-scores__container,\n .enp-results-flow__container {\n width: 100%;\n\n @include breakpoint(large) {\n width: 48%;\n }\n }\n\n .enp-quiz-scores {\n margin-top: 2.6rem;\n }\n\n .enp-quiz-score__line-chart {\n height: 300px;\n margin-bottom: 1rem;\n\n .ct-label {\n color: $font;\n }\n\n .ct-grid {\n stroke: #dadada;\n stroke-dasharray: 0;\n }\n\n .ct-line {\n stroke: $green;\n stroke-width: 2px;\n }\n\n .ct-point {\n stroke: $green;\n stroke-width: 8px;\n }\n }\n\n .enp-quiz-scores-table {\n width: 100%;\n max-width: 500px;\n margin: 0 auto;\n\n tr th {\n background-color: #fff;\n }\n }\n\n .enp-quiz-scores-table__label {\n padding-left: 5%;\n }\n\n .enp-quiz-scores-table__score {\n text-align: right;\n padding-right: 5%;\n }\n\n .enp-results-flow {\n position: relative;\n margin: 2rem auto;\n width: 320px;\n height: 320px;\n border-radius: 50%;\n\n @include media(300px) {\n left: -100px;\n }\n\n @include breakpoint(small) {\n width: 390px;\n height: 390px;\n }\n\n @include breakpoint(medium) {\n width: 450px;\n height: 450px;\n }\n\n @include breakpoint(large) {\n width: 400px;\n height: 400px;\n }\n\n }\n\n .enp-results-flow__section-title {\n @include screen-reader-text;\n }\n\n .enp-results-flow__item {\n border-radius: 50%;\n text-align: center;\n height: 100%;\n width: 100%;\n margin: 0 auto;\n left: 0;\n right: 0;\n padding: 12.5% 0 0;\n letter-spacing: 0.05rem;\n border: 2px solid $green;\n animation: 0.85s slideInBottom $fastInEaseOut forwards;\n }\n\n .enp-results-flow__item--total-views {\n background: #fff;\n }\n\n .enp-results-flow__item--quiz-starts {\n width: 65%;\n height: 65%;\n position: absolute;\n padding-top: 8%;\n bottom: 2.5%;\n background: lighten($green, 48);\n }\n\n .enp-results-flow__item--quiz-finishes {\n width: 35%;\n height: 35%;\n position: absolute;\n bottom: 5%;\n background: lighten($green, 35);\n }\n\n .enp-results-flow__title {\n @include small-uppercase;\n color: #444;\n font-size: .7rem;\n margin-bottom: 0px;\n\n @include breakpoint(medium) {\n font-weight: bold;\n margin-bottom: 2px;\n }\n }\n\n .enp-results-flow__number {\n font-weight: bold;\n font-size: 1.4rem;\n line-height: 1.2;\n }\n\n .enp-results-flow__number--total-views {\n font-size: 2rem;\n }\n\n .enp-results-flow__number--quiz-starts {\n font-size: 1.65rem;\n }\n\n .enp-results-flow__percentage {\n font-size: .8rem;\n font-weight: normal;\n position: relative;\n display: inline-block;\n top: -0.7em;\n left: -.1rem;\n color: #444;\n\n &:after {\n content: '%';\n position: absolute;\n right: -0.75rem;\n font-size: .7rem;\n color: #444;\n }\n }\n\n .enp-results-questions__section {\n @include section--alt;\n padding-top: 5rem;\n padding-bottom: 3rem;\n margin-top: 5rem;\n margin-bottom: 3rem;\n }\n\n .enp-results-questions__container {\n @include media(max-small) {\n padding-left: 8px;\n padding-right: 8px;\n }\n }\n\n .enp-results-questions__header {\n align-items: flex-start;\n flex-direction: column;\n\n @include breakpoint(small) {\n @include flex-spread;\n flex-direction: row;\n align-items: flex-end;\n }\n }\n\n .enp-results-questions__title {\n @include small-uppercase;\n }\n\n .enp-results-questions__key {\n @include small-uppercase;\n }\n\n .enp-results-questions {\n @include ul-no-style;\n }\n\n .enp-results-question {\n width: 100%;\n font-size: 1rem;\n padding: 0;\n margin-bottom: 1rem;\n }\n\n .enp-results-question__header {\n padding: 1rem 1.2rem;\n position: relative;\n }\n\n .enp-results-question__question,\n .enp-results-question__stats {\n font-size: 1rem;\n line-height: 1.4;\n }\n\n .enp-results-question__question {\n font-weight: normal;\n\n @include breakpoint(small) {\n padding-right: 7em;\n margin-bottom: 0;\n }\n }\n\n .enp-results-question__stats {\n font-size: .9rem;\n\n @include breakpoint(small) {\n position: absolute;\n bottom: 1rem;\n right: 1.2rem;\n text-align: right;\n }\n }\n\n .enp-results-questions__key,\n .enp-results-question__stats {\n font-weight: 300;\n }\n\n .enp-results-question__content {\n padding: 2rem 1.2rem 1.2rem;\n @include border-radius;\n }\n\n .enp-results-question__deep-stats {\n @include flex-spread-around;\n @include ul-no-style;\n text-align: center;\n\n @include media(500px) {\n flex-wrap: wrap;\n }\n }\n\n .enp-results-question__deep-stat {\n\n @include media(500px) {\n width: 48%;\n margin: 0 2% 2% 0;\n padding: 1.6rem 0;\n\n &:nth-child(even) {\n margin-right: 0;\n }\n }\n\n @include media(280px) {\n width: 100%;\n padding: 0;\n margin-bottom: 1.6rem;\n }\n }\n\n .enp-results-question__deep-stat__number {\n font-size: 1.8rem;\n line-height: 1;\n position: relative;\n }\n\n .enp-results-question__deep-stat__number--finishes,\n .enp-results-question__deep-stat__number--correct {\n @include dark-green;\n }\n\n .enp-results-question__deep-stat__number--incorrect {\n @include fade-red;\n }\n\n .enp-results-question__deep-stat__number--correct,\n .enp-results-question__deep-stat__number--incorrect,\n .enp-results-question__deep-stat__number--finishes {\n &:after {\n content: '%';\n font-size: .9rem;\n position: absolute;\n top: .3rem;\n right: -1rem;\n }\n }\n\n .enp-results-question__deep-stat__label {\n @include small-uppercase;\n font-size: .8rem;\n }\n\n .enp-results-question__options {\n @include ul-no-style;\n margin-bottom: 0;\n }\n\n .enp-results-question__option {\n padding: 0.8rem 0.8rem 0.8rem 0.4rem;\n border-top: 1px solid #ddd;\n @include media(max-small) {\n position: relative;\n flex-direction: column;\n }\n\n @include breakpoint(small) {\n @include flex-spread;\n flex-direction: row;\n }\n\n &:first-of-type {\n margin-top: 1.4rem;\n }\n\n }\n\n .enp-results-question__option--correct {\n background: lighten($green, 48);\n }\n\n .enp-results-question__option__text {\n flex-grow: 100;\n margin-right: 1rem;\n }\n\n .enp-results-question__option__text__helper {\n font-weight: 300;\n @include small-uppercase;\n margin-right: 0.4rem;\n }\n\n .enp-results-question__option__icon {\n @include media(max-small) {\n position: relative;\n left: -3px;\n }\n\n @include breakpoint(small) {\n margin-right: 0.3rem;\n min-width: 1.6rem;\n }\n }\n\n .enp-results-question__option__icon--incorrect {\n fill: $fade_red;\n opacity: 0.5;\n }\n\n .enp-results-question__option__icon--correct {\n fill: $dark_green;\n opacity: 1;\n }\n\n .enp-results-question__option__percentage--incorrect {\n @include fade-red;\n }\n\n .enp-results-question__option__percentage--correct {\n @include dark-green;\n }\n\n .enp-results-question__option__number-selected {\n font-weight: 300;\n\n @include media(max-small) {\n position: absolute;\n top: 0.8rem;\n right: 0.8rem;\n }\n }\n\n .enp-slider-responses__title {\n @include small-uppercase;\n font-weight: 400;\n margin-top: 1.6rem;\n }\n\n .enp-slider-responses__line-chart {\n .ct-point {\n stroke-width: 8px;\n }\n }\n\n .enp-slider-responses__line-chart--low,\n .enp-slider-responses__line-chart--high {\n stroke: $red;\n }\n\n .enp-slider-responses__line-chart--correct {\n stroke: $green;\n }\n\n .enp-slider-responses-table {\n width: 100%;\n }\n\n .enp-slider-responses-table tr:nth-child(even) td {\n background-color: #fff;\n }\n\n .enp-slider-responses-table tr.enp-slider-responses-table__response--correct td {\n background-color: lighten($green, 48);\n }\n\n .enp-slider-responses-table__content {\n box-shadow: none;\n padding-top: 1rem;\n }\n\n .enp-slider-responses-table--hide-zero {\n .enp-slider-responses-table__frequency--zero {\n display: none;\n }\n }\n\n .enp-slider-responses-table__response-frequency {\n @include flex-spread ;\n align-items: center;\n }\n\n .enp-slider-responses-table__toggle-zero-frequency {\n @include accordion__header ;\n width: auto;\n padding: 0 0.6rem;\n margin: 0;\n }\n\n\n\n}\n\n.enp-quiz-results {\n #enp-quiz .enp-aside {\n border: none;\n }\n\n .enp-results-questions__title__quiz-title {\n @include screen-reader-text;\n }\n}\n","#enp-quiz {\n\n .enp-results--ab {\n display: block;\n margin-bottom: 3rem;\n\n @include breakpoint(large) {\n display: flex;\n flex-wrap: wrap;\n align-content: flex-end;\n width: 50%;\n padding: 10px;\n }\n\n }\n\n .enp-results--a {\n @include breakpoint(large) {\n padding-right: 1rem;\n border-right: 1px solid #ddd;\n }\n }\n\n .enp-results--b {\n @include breakpoint(large) {\n padding-left: 1rem;\n }\n }\n\n .enp-results-title--ab,\n .enp-results__container--ab .enp-results-flow__container {\n min-width: 100%;\n }\n\n .enp-results--loser {\n .enp-results-flow__item {\n border: 2px solid $red;\n }\n\n .enp-results-flow__item--quiz-starts {\n background: lighten($red, 42);\n }\n\n .enp-results-flow__item--quiz-finishes {\n background: lighten($red, 34);\n }\n\n th,\n .enp-results-questions__title {\n color: $dark_red;\n }\n\n }\n\n .enp-results--winner {\n th,\n .enp-results-questions__title {\n color: $dark_green;\n }\n\n }\n\n .enp-results-title--a,\n .enp-results-title--b {\n background: transparent;\n }\n\n .enp-ab-scores {\n @include container--wide;\n\n th.enp-quiz-scores-table__label,\n th.enp-quiz-scores-table__score {\n padding-left: 0;\n padding-right: 0;\n }\n }\n\n .enp-ab-scores__title {\n padding-left: 50px;\n @include small-uppercase;\n }\n\n .enp-quiz-score__line-chart .enp-test-loser {\n\n .ct-line,\n .ct-point {\n stroke: $red;\n }\n }\n\n .enp-quiz-scores {\n margin-top: 0;\n }\n\n .enp-question-results,\n .enp-ab-scores .enp-quiz-scores-table {\n margin-bottom: 1.6rem;\n\n @include breakpoint(large) {\n float: left;\n width: 48%;\n margin: 0;\n\n &:first-of-type {\n margin-right: 4%;\n }\n }\n }\n\n .enp-question-results__container {\n @include container--wide;\n }\n\n .enp-question-results--ab {\n\n .enp-results-questions__section {\n background: #fff;\n border: none;\n padding: 1.6rem 0;\n margin: 1.6rem auto;\n }\n\n .enp-results-questions__container {\n padding: 0;\n }\n\n }\n\n .enp-ab-new-embed-code__section {\n @include container--thin;\n max-width: 540px;\n padding-bottom: 2rem;\n margin-bottom: 2rem;\n\n .enp-ab-embed-code {\n padding: 0;\n margin: 0;\n }\n }\n\n .enp-ab-embed-code__section {\n @include section--alt;\n padding-top: 5rem;\n margin-top: 5rem;\n }\n\n .enp-ab-embed-code {\n @include container;\n }\n\n .enp-ab-embed-code__title {\n @include small-uppercase;\n }\n\n .enp-embed-code__textarea {\n margin-bottom: 0;\n }\n\n .enp-embed-code__instructions {\n font-size: 1.1rem;\n }\n}\n","#enp-quiz {\n\n .enp-slider {\n margin-bottom: 1.6rem;\n }\n\n .enp-slider-input__container {\n display: flex;\n align-items: center;\n justify-content: center;\n margin: 1.6rem auto;\n position: relative;\n }\n\n .enp-slider-input__label {\n @include label;\n }\n\n .enp-slider-input__prefix,\n .enp-slider-input__suffix {\n font-size: 1rem;\n }\n\n .enp-slider-input__prefix {\n margin-right: .2rem;\n white-space: pre;\n }\n\n .enp-slider-input__suffix {\n margin-left: .2rem;\n white-space: pre;\n }\n\n .enp-slider-input__input {\n @include input;\n margin-bottom: 0;\n padding: .75rem;\n width: auto;\n transition: all .25s $fastInEaseOut;\n }\n\n .enp-slider-input__input--incorrect {\n color: $red;\n }\n\n .enp-slider-input__input--correct {\n color: $dark_green;\n }\n\n .enp-slider-input__input--invalid-animation {\n box-shadow: 0 0 2px 1px $fade_red;\n }\n\n .enp-slider_input__range-helper {\n position: absolute;\n bottom: -1.2rem;\n font-size: 0.8rem;\n }\n\n .enp-slider_input__range-helper--low {\n left: 0;\n }\n\n .enp-slider_input__range-helper--high {\n right: 0;\n }\n\n .enp-slider-input__range-helper__number {\n position: relative;\n color: $dark_gray;\n }\n\n .enp-slider_input__range-helper__number--low {\n\n }\n\n .enp-slider_input__range-helper__number--high {\n\n }\n\n .ui-slider-range-show-correct__tooltip-container {\n position: relative;\n }\n\n .ui-slider-range-show-correct__tooltip {\n position: absolute;\n top: -0.4rem;\n margin-left: -0.55rem;\n height: 1rem;\n width: 1.1rem;\n height: 1.1rem;\n border: 2px solid $green;\n background-color: #fff;\n border-radius: 50%;\n z-index: 9999;\n }\n\n .ui-slider-range-show-correct__tooltip--low {\n left: 0;\n }\n\n .ui-slider-range-show-correct__tooltip--high {\n right: -0.55rem;\n }\n\n .ui-slider-range-show-correct__tooltip__text {\n position: relative;\n color: darken($green, 15);\n top: -1.35rem;\n font-size: .825rem;\n min-width: 100%;\n display: inline-block;\n text-align: center;\n text-shadow: 0 1px 0 #fff;\n }\n\n .ui-slider-range-show-correct__tooltip__text--low {\n\n }\n\n .ui-slider-range-show-correct__tooltip__text--high {\n\n }\n\n .ui-slider-range-show-correct__tooltip__text--low-center {\n //left: 0; // not perfectly centered for huge numbers, but is for small numbers\n }\n\n // JQUERY SLIDER\n .enp-slider {\n\t\tposition: relative;\n\t\ttext-align: left;\n\t\tbackground: #ddd;\n\n\t\t/* Layout helpers\n\t\t----------------------------------*/\n\t\t.ui-helper-hidden {\n\t\t\tdisplay: none;\n\t\t}\n\t\t.ui-helper-hidden-accessible {\n\t\t\tborder: 0;\n\t\t\tclip: rect(0 0 0 0);\n\t\t\theight: 1px;\n\t\t\tmargin: -1px;\n\t\t\toverflow: hidden;\n\t\t\tpadding: 0;\n\t\t\tposition: absolute;\n\t\t\twidth: 1px;\n\t\t}\n\t\t.ui-helper-reset {\n\t\t\tmargin: 0;\n\t\t\tpadding: 0;\n\t\t\tborder: 0;\n\t\t\toutline: 0;\n\t\t\tline-height: 1.3;\n\t\t\ttext-decoration: none;\n\t\t\tfont-size: 100%;\n\t\t\tlist-style: none;\n\t\t}\n\t\t.ui-helper-clearfix:before,\n\t\t.ui-helper-clearfix:after {\n\t\t\tcontent: \"\";\n\t\t\tdisplay: table;\n\t\t\tborder-collapse: collapse;\n\t\t}\n\t\t.ui-helper-clearfix:after {\n\t\t\tclear: both;\n\t\t}\n\t\t.ui-helper-clearfix {\n\t\t\tmin-height: 0; /* support: IE7 */\n\t\t}\n\t\t.ui-helper-zfix {\n\t\t\twidth: 100%;\n\t\t\theight: 100%;\n\t\t\ttop: 0;\n\t\t\tleft: 0;\n\t\t\tposition: absolute;\n\t\t\topacity: 0;\n\t\t\tfilter:alpha(opacity=0); /* support: IE8 */\n\t\t}\n\n\t\t.ui-front {\n\t\t\tz-index: 100;\n\t\t}\n\n\n\t\t/* Interaction Cues\n\t\t----------------------------------*/\n\t\t.ui-state-disabled {\n\t\t\tcursor: default !important;\n\t\t}\n\n\n\t\t/* Icons\n\t\t----------------------------------*/\n\n\t\t/* states and images */\n\t\t.ui-icon {\n\t\t\tdisplay: block;\n\t\t\ttext-indent: -99999px;\n\t\t\toverflow: hidden;\n\t\t\tbackground-repeat: no-repeat;\n\t\t}\n\n\n\t\t/* Misc visuals\n\t\t----------------------------------*/\n\n\t\t/* Overlays */\n\t\t.ui-widget-overlay {\n\t\t\tposition: fixed;\n\t\t\ttop: 0;\n\t\t\tleft: 0;\n\t\t\twidth: 100%;\n\t\t\theight: 100%;\n\t\t}\n\n\t\t.ui-slider-handle {\n\t\t\tbackground: #fff;\n\t\t\tborder-radius: 50%;\n\t\t\tborder: 1px solid #aaa;\n\t\t\tposition: absolute;\n\t\t\tz-index: 2;\n\t\t\twidth: 1.2rem;\n\t\t\theight: 1.2rem;\n top: -.4rem;\n\t\t\tmargin-left: -.6rem;\n\t\t\tcursor: default;\n\t\t\t-ms-touch-action: none;\n\t\t\ttouch-action: none;\n\t\t\ttransition: opacity 0.2s $fastInEaseOut, height .18s $fastInEaseOut, width .18s $fastInEaseOut, transform 0.18s $fastInEaseOut;\n\n @include media(max-medium) {\n width: 2rem;\n \t\t\theight: 2rem;\n top: -.85rem;\n margin-left: -1rem;\n transform: rotate(225deg);\n }\n\n\t\t\t&:focus {\n\t\t\t\toutline: none;\n\t\t\t\tbox-shadow: 0 0 3px 1px #4D90FE;\n\t\t\t}\n\n &.ui-state-active {\n @include media(max-medium) {\n width: 2.2rem;\n height: 2.2rem;\n border-top-left-radius: 0;\n transform: translate3d(-0.2rem, -0.8rem, 0) rotate(225deg);\n }\n\n }\n\n\t\t}\n\n .ui-slider-handle--correct,\n\t\t.ui-slider-handle--incorrect {\n width: 1.1rem;\n\t\t\theight: 1.1rem;\n top: -.4rem;\n margin-left: -.55rem;\n }\n\n .ui-slider-handle--incorrect {\n z-index: 1;\n\t\t\tborder: 2px solid $red;\n\t\t}\n\n .ui-slider-handle--correct {\n border: 2px solid $green;\n z-index: 99999;\n }\n\n\t\t.ui-slider-range {\n\t\t\tposition: absolute;\n\t\t\tz-index: 1;\n\t\t\tfont-size: .7rem;\n\t\t\tdisplay: block;\n\t\t\tborder: 0;\n\t\t\tbackground-position: 0 0;\n\t\t\ttop: 0;\n\t\t\theight: 100%;\n\t\t}\n\n .ui-slider-range-show-correct {\n background: $green;\n z-index: 9;\n }\n\n\t\t.ui-slider-range-min {\n\t\t\tleft: 0;\n\t\t\tbackground: $green;\n\t\t}\n\n\t\t.ui-slider-range-max {\n\t\t\tright: 0;\n\t\t}\n\n\t\t/* support: IE8 - See #6727 */\n\t\t&.ui-state-disabled .ui-slider-handle,\n\t\t&.ui-state-disabled .ui-slider-range {\n\t\t\tfilter: inherit;\n\t\t}\n\t}\n\n\t.ui-slider-horizontal {\n\t\theight: .3rem;\n\t}\n\n\t.enp-question__answered {\n\t\t.enp-slider {\n\t\t\tbackground: #bbb;\n\t\t}\n\n\t\t.ui-slider-range-min {\n\t\t\tbackground: #fff;\n\t\t}\n\n\t}\n\n}\n"]} \ No newline at end of file diff --git a/public/quiz-create/css/sass/_dashboard.scss b/public/quiz-create/css/sass/_dashboard.scss index 503d2a76..4224aebe 100644 --- a/public/quiz-create/css/sass/_dashboard.scss +++ b/public/quiz-create/css/sass/_dashboard.scss @@ -1,7 +1,7 @@ #enp-quiz { &.enp-quiz__main { - background: $really_light_gray; + background: $background; } .enp-dash-container { @@ -58,6 +58,7 @@ .enp-search-quizzes__select { padding: .3rem; + border-radius: 3px; } .enp-quiz-search__input { @@ -131,6 +132,7 @@ justify-content: flex-end; border: none; border-radius: 3px; + background-color: $gray; } .enp-dash-item--published { @@ -161,20 +163,26 @@ right: 0; background: rgba(245,216,216,0.8); width: 100%; - z-index: 999; animation: fadeIn .3s $fastInEaseOut; } .enp-dash-item__header { - position: relative; - z-index: 99; - background: #fff; - border-bottom: 1px solid #ddd; + padding: 0.5rem 1rem; + background: $light_gray; + border-bottom: 1px solid $dark_gray; + display: flex; + justify-content: space-between; + align-items: center; + @include border-radius; } .enp-dash-item__title { @include flex-grid__title ; - padding: 0 24px 0.375rem 0; + padding: 0; + margin-bottom: 0; + a { + color: $blue; + } } .enp-dash-item__content { @@ -213,14 +221,22 @@ } .enp-dash-item__nav__item { - display: inline-block; - font-size: 0.85rem; - margin-bottom: 0; - padding-bottom: 0; - margin-right: 10px; - + display: flex; + margin: 0; + width: 100%; + padding: 12px; + align-items: center; + &:hover { + background-color: $gray; + .enp-dash-item__icon { + fill: $red; + } + } a { font-weight: normal; + color: $red; + @include flex; + align-items: center; &:focus { outline: 1px dotted $link; @@ -236,34 +252,36 @@ .enp-dash-item__delete { @include btn--reset; position: relative; - top: 4px; + padding: 0; cursor: pointer; - } - - .enp-dash-item__delete__icon { - fill: #bbb; - width: 20px; - height: 20px; - - &:focus, - &:hover { - fill: $red; + @include flex; + .enp-icon { + fill: $darker_gray; } } + .enp-dash-item__icon { + fill: $darker_gray; + width: 15px; + height: 15px; + margin-right: 10px; + // min-width: 15%; + } .enp-dash-item__nav--collapsible { display: none; position: absolute; - background: #fff; - bottom: auto; - right: auto; - top: 100%; - margin-top: 0.2rem; + z-index: 2; + top: 53px; + right: 1.5rem; + width: 195px; + background-color: #fff; + text-align: left; transform: translate3d(0,0,0); transition: all .2s $fastInEaseOut; .enp-dash-item__nav__item { - padding: 0 0 0.4rem; + padding: 0.5rem 1rem; + cursor: pointer; } } @@ -273,22 +291,28 @@ border: none; color: #444; padding: 0; - position: absolute; bottom: 0.2rem; - right: 0; + right: 1.5rem; + top: 1.5rem; cursor: pointer; } + .enp-dash-item__menu-action-wrap { + max-width: 0; + display: flex; + flex-direction: column; + align-items: flex-end; + } + .enp-dash-item__menu-action__icon { - width: 24px; - height: 24px; - fill: #444; + width: 15px; + height: 15px; + fill: $darker_gray; transition: all .3s $fastInEaseOut; } .enp-dash-item__menu-action__icon--bottom { - position: absolute; - left: 0; + } .enp-dash-item--menu-active { @@ -303,20 +327,21 @@ } .enp-dash-item__menu-action__icon--bottom { - transform: translateY(-15.5%); - } - .enp-dash-item__menu-action__icon--top { - transform: rotateX(-180deg) translateY(0px); + transform: rotateX(180deg); } + // .enp-dash-item__menu-action__icon--top { + // transform: rotateX(-180deg) translateY(0px); + // } .enp-dash-item__nav--collapsible { display: block; animation: slideInTop .25s $fastInEaseOut forwards; + @include border-radius; + @include box-shadow; } .enp-dash-item__content { opacity: 0.4; - transform: translate3d(0, 0.675rem, 0); } } diff --git a/public/quiz-create/css/sass/_quiz-results.scss b/public/quiz-create/css/sass/_quiz-results.scss index 937f827f..ad0ec1e0 100644 --- a/public/quiz-create/css/sass/_quiz-results.scss +++ b/public/quiz-create/css/sass/_quiz-results.scss @@ -283,6 +283,7 @@ .enp-results-question__content { padding: 2rem 1.2rem 1.2rem; + @include border-radius; } .enp-results-question__deep-stats { diff --git a/public/quiz-create/css/sass/_structure.scss b/public/quiz-create/css/sass/_structure.scss index 043b40eb..579e73ac 100644 --- a/public/quiz-create/css/sass/_structure.scss +++ b/public/quiz-create/css/sass/_structure.scss @@ -18,7 +18,8 @@ @mixin well { padding: 1.6rem; margin-bottom: 1.6rem; - background: #fff; + background: $light_blue; + @include border-radius; border: 1px solid #eee; border-bottom-color: #ccc; @@ -147,7 +148,7 @@ @mixin flex-grid { @include flex; - flex-flow: row wrap; + flex-flow: column wrap; align-items: stretch; @include ul-no-style; } @@ -163,28 +164,28 @@ margin: 0 0 0.8rem; @include breakpoint(medium) { - flex-basis: 49%; - max-width: 49%; - margin: 0 2% 0.8rem 0; + // flex-basis: 100%; + // max-width: 100%; + // margin: 0 2% 0.8rem 0; - &:nth-child(2n) { - margin-right: 0; - } + // &:nth-child(2n) { + // margin-right: 0; + // } } - @include breakpoint(large) { - flex-basis: 32.5%; - max-width: 32.5%; - margin-right: 1.25%; + // @include breakpoint(large) { + // flex-basis: 100%; + // max-width: 100%; + // margin-right: 1.25%; - &:nth-child(2n) { - margin-right: 1.25%; - } + // &:nth-child(2n) { + // margin-right: 1.25%; + // } - &:nth-child(3n) { - margin-right: 0; - } - } + // &:nth-child(3n) { + // margin-right: 0; + // } + // } } @mixin flex-grid__title { diff --git a/public/quiz-create/css/sass/_utilities.scss b/public/quiz-create/css/sass/_utilities.scss index 0adbf74a..b9859c50 100644 --- a/public/quiz-create/css/sass/_utilities.scss +++ b/public/quiz-create/css/sass/_utilities.scss @@ -81,16 +81,20 @@ } } +@mixin box-shadow { + box-shadow: 0 2px 2px rgba(0,0,0,.2); +} + @mixin btn--dashed { @include btn; - border: 3px dashed $dark_gray; + border: 1px dashed $dark_gray; background: none; color: #545454; box-shadow: none; &:hover, &:focus { - border: 3px dashed $darker_gray; + border: 1px dashed $darker_gray; color: $darker_gray; background: rgba(255,255,255,.9); } @@ -281,6 +285,10 @@ fill: #fff; } +@mixin border-radius { + border-radius: 3px; +} + @mixin icon--circle--pad { @include icon--circle ; padding: 0.05em; @@ -326,7 +334,7 @@ } @mixin small-uppercase { - font-size: 1.5rem; + font-size: 1rem; text-transform: uppercase; } @@ -702,10 +710,6 @@ } } -.enp-breadcrumb-link__container { - background-color: #fff; -} - .enp-breadcrumb-link { font-size: 0.85rem; } diff --git a/public/quiz-create/css/sass/_variables.scss b/public/quiz-create/css/sass/_variables.scss index f45732c5..e9d49907 100644 --- a/public/quiz-create/css/sass/_variables.scss +++ b/public/quiz-create/css/sass/_variables.scss @@ -1,24 +1,34 @@ //fonts -$fontBody : "tablet-gothic", "helvetica neue", helvetica, arial, sans-serif; -$fontTitle : "tablet-gothic", "helvetica neue", helvetica, arial, sans-serif; -//colors -$font : #444; +$fontBody : Arial,monospace, helvetica, arial, sans-serif; +$fontTitle : Arial,monospace, helvetica, arial, sans-serif; + +// // // colors +$font : #1d1c25; +$background: #FAF9FB; $title : #5D5E5F; -$blue: #333f48; + +// Blues +$blue: #1E1C26; $dark_blue: #242f42; -$light_blue: #EAF4FF; -$light_gray: #F5F5F5; -$gray: #bbb; -$dark_gray: #666; -$darker_gray: #444; +$light_blue: lighten($blue, 100); + +// Grays +$light_gray: #FAF9FB; $really_light_gray: #F8F8F8; -$link: $blue; +$gray: darken($light_gray, 2); +$dark_gray: darken($gray, 5); +$darker_gray: darken($dark_gray, 20); + +// Other colors $khaki: #CCA562; -$green: darken(#58C88F, 10); +$green: #60AAAD; $dark_green: darken($green, 8); $red: #bf5700; $dark_red: darken($red, 8); -$fade_red: #E97763; +$fade_red: #C1893E; + +// Elements +$link: #bf5700; $link_hover: darken($link, 8); // animation $fastInEaseOut: cubic-bezier(0.000, 0, .3, 1); diff --git a/public/quiz-create/includes/class-enp_quiz-dashboard.php b/public/quiz-create/includes/class-enp_quiz-dashboard.php index b4c64933..d6b57024 100644 --- a/public/quiz-create/includes/class-enp_quiz-dashboard.php +++ b/public/quiz-create/includes/class-enp_quiz-dashboard.php @@ -21,50 +21,50 @@ * @author Engaging News Project */ class Enp_quiz_Dashboard extends Enp_quiz_Create { - public $user, - $quizzes, - $paginate; - - public function __construct() { - $this->user = new Enp_quiz_User(get_current_user_id()); - $this->quizzes = $this->set_quizzes(); - // we're including this as a fallback for the other pages. - // Other page classes will not need to do this - add_filter( 'the_content', array($this, 'load_template' )); - // load take quiz styles + public $user, + $quizzes, + $paginate; + + public function __construct() { + $this->user = new Enp_quiz_User(get_current_user_id()); + $this->quizzes = $this->set_quizzes(); + // we're including this as a fallback for the other pages. + // Other page classes will not need to do this + add_filter( 'the_content', array($this, 'load_template' )); + // load take quiz styles add_action('wp_enqueue_scripts', array($this, 'enqueue_styles')); // load take quiz scripts add_action('wp_enqueue_scripts', array($this, 'enqueue_scripts')); - } - - public function load_template() { - ob_start(); - //Start the class - $user = $this->user; - $quizzes = $this->quizzes; - $paginate = $this->paginate; - $nonce_input = $this->get_enp_quiz_nonce(); - include_once( ENP_QUIZ_CREATE_TEMPLATES_PATH.'/dashboard.php' ); - $content = ob_get_contents(); - if (ob_get_length()) ob_end_clean(); + } - return $content; - } + public function load_template() { + ob_start(); + //Start the class + $user = $this->user; + $quizzes = $this->quizzes; + $paginate = $this->paginate; + $nonce_input = $this->get_enp_quiz_nonce(); + include_once( ENP_QUIZ_CREATE_TEMPLATES_PATH.'/dashboard.php' ); + $content = ob_get_contents(); + if (ob_get_length()) ob_end_clean(); + + return $content; + } - public function set_quizzes() { - $quizzes = new Enp_quiz_Search_quizzes(); - // build the search from the URL - $quizzes->set_variables_from_url_query(); + public function set_quizzes() { + $quizzes = new Enp_quiz_Search_quizzes(); + // build the search from the URL + $quizzes->set_variables_from_url_query(); - // return the selected quizzes - $the_quizzes = $quizzes->select_quizzes(); + // return the selected quizzes + $the_quizzes = $quizzes->select_quizzes(); - $this->paginate = new Enp_quiz_Paginate($quizzes->get_total(), $quizzes->get_page(), $quizzes->get_limit(), ENP_QUIZ_DASHBOARD_URL.'user/?'.$_SERVER['QUERY_STRING']); + $this->paginate = new Enp_quiz_Paginate($quizzes->get_total(), $quizzes->get_page(), $quizzes->get_limit(), ENP_QUIZ_DASHBOARD_URL.'user/?'.$_SERVER['QUERY_STRING']); - return $the_quizzes; - } + return $the_quizzes; + } - public function enqueue_styles() { + public function enqueue_styles() { } @@ -77,137 +77,141 @@ public function enqueue_scripts() { wp_register_script( $this->plugin_name.'-dashboard', plugin_dir_url( __FILE__ ) . '../js/dist/dashboard.min.js', array( 'jquery' ), ENP_QUIZ_VERSION, true ); wp_enqueue_script( $this->plugin_name.'-dashboard' ); - // addClass with SVG shim for old jquery - wp_register_script( $this->plugin_name.'-svg-class-shim', plugin_dir_url( __FILE__ ) . '../js/dist/svg-class-shim.min.js', array( 'jquery' ), ENP_QUIZ_VERSION, true ); + // addClass with SVG shim for old jquery + wp_register_script( $this->plugin_name.'-svg-class-shim', plugin_dir_url( __FILE__ ) . '../js/dist/svg-class-shim.min.js', array( 'jquery' ), ENP_QUIZ_VERSION, true ); wp_enqueue_script( $this->plugin_name.'-svg-class-shim' ); - // localize scripts for use with JS - wp_localize_script( $this->plugin_name.'-dashboard','quizDashboard', array( - 'ajax_url' => admin_url( 'admin-ajax.php' ), - 'quiz_dashboard_url' => ENP_QUIZ_DASHBOARD_URL, - )); + // localize scripts for use with JS + wp_localize_script( $this->plugin_name.'-dashboard','quizDashboard', array( + 'ajax_url' => admin_url( 'admin-ajax.php' ), + 'quiz_dashboard_url' => ENP_QUIZ_DASHBOARD_URL, + )); } - public function get_quiz_dashboard_item_title($quiz) { - if(!is_object($quiz)) { - return false; - } - $quiz_status = $quiz->get_quiz_status(); - if($quiz_status === 'published') { - $quiz_title = ''.$quiz->get_quiz_title().''; - } elseif($quiz_status === 'draft') { - // if you want to add back in the edit pencil icons - //$quiz_title .= ' '; - $quiz_title = 'Edit '.$quiz->get_quiz_title().''; - } - return $quiz_title; - } - - public function get_quiz_actions($quiz) { - if(!is_object($quiz)) { - return false; - } - // set blank array - $quiz_actions = array(); - - $quiz_status = $quiz->get_quiz_status(); - $quiz_id = $quiz->get_quiz_id(); - if($quiz_status === 'published') { - $quiz_actions[] = array( - 'title'=>'Results', - 'url' => ENP_QUIZ_RESULTS_URL.$quiz_id, - ); - $quiz_actions[] = array( - 'title'=>'Edit', - 'url' => ENP_QUIZ_CREATE_URL.$quiz_id, - ); - $quiz_actions[] = array( - 'title'=>'Settings', - 'url' => ENP_QUIZ_PREVIEW_URL.$quiz_id, - ); - $quiz_actions[] = array( - 'title'=>'Embed', - 'url' => ENP_QUIZ_PUBLISH_URL.$quiz_id, - ); - } elseif($quiz_status === 'draft') { - $quiz_actions[] = array( - 'title'=>'Edit', - 'url' => ENP_QUIZ_CREATE_URL.$quiz_id, - ); - - // see if the quiz is valid. If it is, allow a preview for it - $response = new Enp_quiz_Save_quiz_Response(); - $validate = $response->validate_quiz_and_questions($quiz); - if($validate === 'valid') { - $quiz_actions[] = array( - 'title'=>'Preview', - 'url' => ENP_QUIZ_PREVIEW_URL.$quiz_id, - ); - } - } - - - return $quiz_actions; - } - - public function get_dashboard_quiz_views($quiz) { - $views = 0; - if($quiz->get_quiz_status() === 'published') { - $views = $quiz->get_quiz_views(); - } - return $views; - } - - public function get_dashboard_quiz_finishes($quiz) { - $finishes = 0; - if($quiz->get_quiz_status() === 'published') { - $finishes = $quiz->get_quiz_finishes(); - } - return $finishes; - } - - public function get_dashboard_quiz_score_average($quiz) { - $score_average = 0; - if($quiz->get_quiz_status() === 'published') { - $score_average = round($quiz->get_quiz_score_average() * 100); - } - return $score_average; - } - - public function get_clear_search_url() { - $query = $_SERVER['QUERY_STRING']; - if(!empty($query)) { - // regex to strip out the search query string - // matches - // ex1: search followed by & (& included in result) - // search=test&order_by=quiz_created_at&include=user - // ex2: search at end of url - // search=test2test - // ex3: search followed by / (/ not included in result) - // search=test/ - //$query = preg_replace('/(?:search=)(?:[\S])+((&|(?=\/)|$))/', '', $query); - $query = preg_replace('/search=\S*?(&|(?=\/)|$)/', '', $query); - - } - - return ENP_QUIZ_DASHBOARD_URL.'user/?'.$query; - } - - public function include_draft_published_option($include) { - $include_draft_published = false; - if( current_user_can('manage_options') && $include === 'all_users') { - $include_draft_published = true; - } else { - $pub_quiz_count = count($this->user->get_published_quizzes()); - $all_quiz_count = count($this->user->get_quizzes()); - // see if there are published quizzes and draft quizzes - if(0 < $pub_quiz_count && $pub_quiz_count < $all_quiz_count) { - $include_draft_published = true; - } - } - - return $include_draft_published; - } + public function get_quiz_dashboard_item_title($quiz) { + if(!is_object($quiz)) { + return false; + } + $quiz_status = $quiz->get_quiz_status(); + if($quiz_status === 'published') { + $quiz_title = ''.$quiz->get_quiz_title().''; + } elseif($quiz_status === 'draft') { + // if you want to add back in the edit pencil icons + //$quiz_title .= ' '; + $quiz_title = 'Edit '.$quiz->get_quiz_title().''; + } + return $quiz_title; + } + + public function get_quiz_actions($quiz) { + if(!is_object($quiz)) { + return false; + } + // set blank array + $quiz_actions = array(); + + $quiz_status = $quiz->get_quiz_status(); + $quiz_id = $quiz->get_quiz_id(); + if($quiz_status === 'published') { + $quiz_actions[] = array( + 'title'=>'Results', + 'url' => ENP_QUIZ_RESULTS_URL.$quiz_id, + 'icon' => 'results', + ); + $quiz_actions[] = array( + 'title'=>'Edit', + 'url' => ENP_QUIZ_CREATE_URL.$quiz_id, + 'icon' => 'edit', + ); + $quiz_actions[] = array( + 'title'=>'Settings', + 'url' => ENP_QUIZ_PREVIEW_URL.$quiz_id, + 'icon' => 'settings', + ); + $quiz_actions[] = array( + 'title'=>'Embed', + 'url' => ENP_QUIZ_PUBLISH_URL.$quiz_id, + 'icon' => 'share', + ); + } elseif($quiz_status === 'draft') { + $quiz_actions[] = array( + 'title'=>'Edit', + 'url' => ENP_QUIZ_CREATE_URL.$quiz_id, + ); + + // see if the quiz is valid. If it is, allow a preview for it + $response = new Enp_quiz_Save_quiz_Response(); + $validate = $response->validate_quiz_and_questions($quiz); + if($validate === 'valid') { + $quiz_actions[] = array( + 'title'=>'Preview', + 'url' => ENP_QUIZ_PREVIEW_URL.$quiz_id, + ); + } + } + + + return $quiz_actions; + } + + public function get_dashboard_quiz_views($quiz) { + $views = 0; + if($quiz->get_quiz_status() === 'published') { + $views = $quiz->get_quiz_views(); + } + return $views; + } + + public function get_dashboard_quiz_finishes($quiz) { + $finishes = 0; + if($quiz->get_quiz_status() === 'published') { + $finishes = $quiz->get_quiz_finishes(); + } + return $finishes; + } + + public function get_dashboard_quiz_score_average($quiz) { + $score_average = 0; + if($quiz->get_quiz_status() === 'published') { + $score_average = round($quiz->get_quiz_score_average() * 100); + } + return $score_average; + } + + public function get_clear_search_url() { + $query = $_SERVER['QUERY_STRING']; + if(!empty($query)) { + // regex to strip out the search query string + // matches + // ex1: search followed by & (& included in result) + // search=test&order_by=quiz_created_at&include=user + // ex2: search at end of url + // search=test2test + // ex3: search followed by / (/ not included in result) + // search=test/ + //$query = preg_replace('/(?:search=)(?:[\S])+((&|(?=\/)|$))/', '', $query); + $query = preg_replace('/search=\S*?(&|(?=\/)|$)/', '', $query); + + } + + return ENP_QUIZ_DASHBOARD_URL.'user/?'.$query; + } + + public function include_draft_published_option($include) { + $include_draft_published = false; + if( current_user_can('manage_options') && $include === 'all_users') { + $include_draft_published = true; + } else { + $pub_quiz_count = count($this->user->get_published_quizzes()); + $all_quiz_count = count($this->user->get_quizzes()); + // see if there are published quizzes and draft quizzes + if(0 < $pub_quiz_count && $pub_quiz_count < $all_quiz_count) { + $include_draft_published = true; + } + } + + return $include_draft_published; + } } diff --git a/public/quiz-create/js/dashboard.js b/public/quiz-create/js/dashboard.js index d136f2b7..9e98515f 100644 --- a/public/quiz-create/js/dashboard.js +++ b/public/quiz-create/js/dashboard.js @@ -47,7 +47,7 @@ $(document).on('click', '.enp-view-toggle', function() { $('.enp-dash-item__nav').each(function() { $(this).addClass('enp-dash-item__nav--collapsible') .attr('aria-hidden', true) - .before(''); + .before(''); }); /** diff --git a/public/quiz-create/js/dist/dashboard.js b/public/quiz-create/js/dist/dashboard.js index 950fbcc6..690305f6 100644 --- a/public/quiz-create/js/dist/dashboard.js +++ b/public/quiz-create/js/dist/dashboard.js @@ -47,7 +47,7 @@ $(document).on('click', '.enp-view-toggle', function() { $('.enp-dash-item__nav').each(function() { $(this).addClass('enp-dash-item__nav--collapsible') .attr('aria-hidden', true) - .before(''); + .before(''); }); /** diff --git a/public/quiz-create/js/dist/dashboard.min.js b/public/quiz-create/js/dist/dashboard.min.js index 451d42c2..a842f641 100644 --- a/public/quiz-create/js/dist/dashboard.min.js +++ b/public/quiz-create/js/dist/dashboard.min.js @@ -1 +1 @@ -jQuery(document).ready(function(m){function n(e){e.removeClass("enp-dash-item--menu-active"),m(".enp-dash-item__menu-action",e).attr("aria-expanded",!1),m(".enp-dash-item__nav",e).attr("aria-hidden",!0)}function i(e,a,t){if(void 0===t.responseJSON)return o(),u("Something went wrong. Please reload the page and try again.","error"),!1;!function(e){void 0!==e.success&&0

'+e+"

"),m(".enp-message-"+t).delay(3500).fadeOut(function(){m(".enp-message-"+t).fadeOut()})}m(".enp-search-quizzes__button").addClass("enp-screen-reader-text"),m(document).on("change",".enp-search-quizzes__select",function(){m("#enp-search-quizzes").submit()}),m(".enp-dash-item__nav").each(function(){m(this).addClass("enp-dash-item__nav--collapsible").attr("aria-hidden",!0).before('')}),m(document).on("click",".enp-dash-item__menu-action",function(){var e,a=m(this).closest(".enp-dash-item");if(a.hasClass("enp-dash-item--menu-active"))n(a);else{var t=m(".enp-dash-item--menu-active");0
');var s=function(e,a){var t;"delete-quiz"===a?(r=m(".enp-dash-item__quiz-id",e).val(),c=document.getElementById("enp-delete-quiz-"+r),(l=new FormData(c)).append("enp-quiz-submit","delete-quiz"),l.append("action","save_quiz"),t=l):"delete-ab-test"===a&&(s=m(".enp-dash-item__ab-test-id",n=e).val(),i=m(".enp-dash-item__quiz-id-a",n).val(),d=m(".enp-dash-item__quiz-id-b",n).val(),o=document.getElementById("enp-delete-ab-test-"+s+"a"+i+"b"+d),(u=new FormData(o)).append("enp-ab-test-submit","delete-ab-test"),u.append("action","save_ab_test"),t=u);var n,s,i,d,o,u;var r,c,l;return t}(t,n);m.ajax({type:"POST",url:quizDashboard.ajax_url,data:s,processData:!1,contentType:!1}).done(i).fail(function(e,a,t){console.log("AJAX failed",e.getAllResponseHeaders(),a,t)}).then(function(e,a,t){}).always(function(){o()})}),m("#enp-quiz").append('
')}); \ No newline at end of file +jQuery(document).ready(function(p){function n(e){e.removeClass("enp-dash-item--menu-active"),p(".enp-dash-item__menu-action",e).attr("aria-expanded",!1),p(".enp-dash-item__nav",e).attr("aria-hidden",!0)}function i(e,a,t){if(void 0===t.responseJSON)return o(),u("Something went wrong. Please reload the page and try again.","error"),!1;!function(e){void 0!==e.success&&0

'+e+"

"),p(".enp-message-"+t).delay(3500).fadeOut(function(){p(".enp-message-"+t).fadeOut()})}p(".enp-search-quizzes__button").addClass("enp-screen-reader-text"),p(document).on("change",".enp-search-quizzes__select",function(){p("#enp-search-quizzes").submit()}),p(".enp-dash-item__nav").each(function(){p(this).addClass("enp-dash-item__nav--collapsible").attr("aria-hidden",!0).before('')}),p(document).on("click",".enp-dash-item__menu-action",function(){var e,a=p(this).closest(".enp-dash-item");if(a.hasClass("enp-dash-item--menu-active"))n(a);else{var t=p(".enp-dash-item--menu-active");0
');var s=function(e,a){var t;"delete-quiz"===a?(r=p(".enp-dash-item__quiz-id",e).val(),c=document.getElementById("enp-delete-quiz-"+r),(l=new FormData(c)).append("enp-quiz-submit","delete-quiz"),l.append("action","save_quiz"),t=l):"delete-ab-test"===a&&(s=p(".enp-dash-item__ab-test-id",n=e).val(),i=p(".enp-dash-item__quiz-id-a",n).val(),d=p(".enp-dash-item__quiz-id-b",n).val(),o=document.getElementById("enp-delete-ab-test-"+s+"a"+i+"b"+d),(u=new FormData(o)).append("enp-ab-test-submit","delete-ab-test"),u.append("action","save_ab_test"),t=u);var n,s,i,d,o,u;var r,c,l;return t}(t,n);p.ajax({type:"POST",url:quizDashboard.ajax_url,data:s,processData:!1,contentType:!1}).done(i).fail(function(e,a,t){console.log("AJAX failed",e.getAllResponseHeaders(),a,t)}).then(function(e,a,t){}).always(function(){o()})}),p("#enp-quiz").append('
')}); \ No newline at end of file diff --git a/public/quiz-create/svg/symbol-defs.svg b/public/quiz-create/svg/symbol-defs.svg index e5d64954..584a522d 100755 --- a/public/quiz-create/svg/symbol-defs.svg +++ b/public/quiz-create/svg/symbol-defs.svg @@ -24,9 +24,9 @@ navigate_next - + show_more - + arrow_down @@ -46,8 +46,9 @@ edit - - + +delete + photo @@ -69,5 +70,17 @@ facebook + +share + + + +settings + + + +results + + diff --git a/public/quiz-create/templates/partials/dashboard-ab-item.php b/public/quiz-create/templates/partials/dashboard-ab-item.php index 3867f14d..93d70760 100644 --- a/public/quiz-create/templates/partials/dashboard-ab-item.php +++ b/public/quiz-create/templates/partials/dashboard-ab-item.php @@ -4,32 +4,32 @@ $unique_ab_test_id = $ab_test->get_ab_test_id().'a'.$ab_test->get_quiz_id_a().'b'.$ab_test->get_quiz_id_b(); ?>
  • -
    -

    get_ab_test_title();?>

    -
      -
    • Results
    • -
    • Embed
    • -
    • -
      - - - - - -
      -
    • -
    -
    -
    -
      -
    • A. get_quiz_title();?>
    • -
    • B. get_quiz_title();?>
    • -
    -
    +
    +

    get_ab_test_title();?>

    +
      +
    • Results
    • +
    • Embed
    • +
    • +
      + + + + + +
      +
    • +
    +
    +
    +
      +
    • A. get_quiz_title();?>
    • +
    • B. get_quiz_title();?>
    • +
    +
  • diff --git a/public/quiz-create/templates/partials/dashboard-quiz-item.php b/public/quiz-create/templates/partials/dashboard-quiz-item.php index 525bb46a..5c599c68 100644 --- a/public/quiz-create/templates/partials/dashboard-quiz-item.php +++ b/public/quiz-create/templates/partials/dashboard-quiz-item.php @@ -1,54 +1,66 @@
  • -
    -

    get_quiz_dashboard_item_title($quiz);?>

    - -
    -
    - get_quiz_created_at() );?> -
    - get_quiz_created_by(); - $user_info = get_userdata($created_by); - echo ' '.($user_info !== false ? "$user_info->user_email" : "user has been deleted").''; - }?> -
    -
      -
    • - get_dashboard_quiz_views($quiz);?> -
      Views
      -
    • -
    • - get_dashboard_quiz_finishes($quiz);?> -
      Finishes
      -
    • -
    • - get_dashboard_quiz_score_average($quiz);?> -
      Average
      -
    • -
    -
    +
    +

    get_quiz_dashboard_item_title($quiz);?>

    + +
    +
    + get_quiz_created_at() );?> +
    + get_quiz_created_by(); + $user_info = get_userdata($created_by); + echo ' '.($user_info !== false ? "$user_info->user_email" : "user has been deleted").''; + }?> +
    +
      +
    • + get_dashboard_quiz_views($quiz);?> +
      Views
      +
    • +
    • + get_dashboard_quiz_finishes($quiz);?> +
      Finishes
      +
    • +
    • + get_dashboard_quiz_score_average($quiz);?> +
      Average
      +
    • +
    +
  • diff --git a/public/quiz-create/templates/quiz-create.php b/public/quiz-create/templates/quiz-create.php index c1fe8680..c33c3d64 100644 --- a/public/quiz-create/templates/quiz-create.php +++ b/public/quiz-create/templates/quiz-create.php @@ -33,10 +33,10 @@ echo $Quiz_create->hidden_fields();?>
    -
    diff --git a/public/quiz-take/css/enp_quiz-take.min.css b/public/quiz-take/css/enp_quiz-take.min.css index a7033e9c..2df8b576 100644 --- a/public/quiz-take/css/enp_quiz-take.min.css +++ b/public/quiz-take/css/enp_quiz-take.min.css @@ -1 +1,2 @@ -a,abbr,acronym,address,applet,big,blockquote,body,caption,cite,code,dd,del,dfn,div,dl,dt,em,fieldset,font,form,h1,h2,h3,h4,h5,h6,html,iframe,ins,kbd,label,legend,li,object,ol,p,pre,q,s,samp,small,span,strike,strong,sub,sup,table,tbody,td,tfoot,th,thead,tr,tt,ul,var{border:0;font-family:inherit;font-size:100%;font-style:inherit;font-weight:inherit;margin:0;outline:0;padding:0;vertical-align:baseline}html{-ms-text-size-adjust:100%;-webkit-text-size-adjust:100%;font-size:100%;overflow-y:scroll}body{background:#fff;overflow:hidden}article,aside,details,figcaption,figure,footer,header,nav,section{display:block}ol,ul{list-style:none}table{border-collapse:separate;border-spacing:0}caption,td,th{font-weight:400;text-align:left}blockquote:after,blockquote:before,q:after,q:before{content:""}blockquote,q{quotes:"" ""}a:focus{outline:thin dotted}a:active,a:hover{outline:0}a img{border:0}html{box-sizing:border-box}*,*:after,*:before{box-sizing:inherit}html{font-size:1pc!important}html #enp-quiz{border-radius:3px;box-sizing:border-box}body #enp-quiz{background:#fff;overflow:hidden}#enp-quiz *,#enp-quiz *:after,#enp-quiz *:before{box-sizing:inherit}#enp-quiz ol,#enp-quiz ul{margin:0 0 1.6rem 1.25rem;padding:0}#enp-quiz textarea{margin-bottom:1rem}#enp-quiz button,#enp-quiz button:active,#enp-quiz button:focus,#enp-quiz button:hover,#enp-quiz iframe,#enp-quiz input[type=button],#enp-quiz input[type=button]:active,#enp-quiz input[type=button]:focus,#enp-quiz input[type=button]:hover,#enp-quiz input[type=reset],#enp-quiz input[type=reset]:active,#enp-quiz input[type=reset]:focus,#enp-quiz input[type=reset]:hover,#enp-quiz input[type=submit],#enp-quiz input[type=submit]:active,#enp-quiz input[type=submit]:focus,#enp-quiz input[type=submit]:hover{border:0}#enp-quiz .enp-screen-reader-text{clip:rect(1px,1px,1px,1px);height:1px;left:-625pc;overflow:hidden;position:absolute!important;top:auto;width:1px}#enp-quiz .enp-screen-reader-text:active,#enp-quiz .enp-screen-reader-text:focus,#enp-quiz .enp-screen-reader-text:hover{background-color:#f1f1f1;border-radius:3px;box-shadow:0 0 2px 2px rgba(0,0,0,.6);clip:auto!important;color:#21759b;display:block;font-size:14px;font-weight:700;height:auto;left:5px;line-height:normal;padding:15px 23px 14px;text-decoration:none;top:5px;width:auto;z-index:100000}#enp-quiz .enp-quiz-message{background:#fff;border:1px solid #eee;border-bottom:1px solid #ccc;margin:1.6rem auto;max-width:25pc;padding:1rem .375rem}#enp-quiz .enp-quiz-message:after{clear:both;content:"";display:table}#enp-quiz .enp-quiz-message__title{font-size:.85rem;text-transform:uppercase}#enp-quiz .enp-message__list{font-size:1.1rem;list-style:none;margin-bottom:0;margin-left:0}#enp-quiz .enp-quiz-message--error{-webkit-animation:slideInTop .3s cubic-bezier(0,0,.3,1);animation:slideInTop .3s cubic-bezier(0,0,.3,1);border-left:6px solid #f14021}#enp-quiz .enp-quiz-message__title--error{color:#db2c0e}#enp-quiz .enp-quiz-message--success{border-left:6px solid #3bb275;color:#319461}#enp-quiz .enp-quiz-message__title--success{color:#319461}body{color:#444;font-family:tablet-gothic,helvetica neue,helvetica,arial,sans-serif;font-size:1em;font-weight:400;line-height:1.6}@media(min-width:700px){body{font-size:1.3em}}#enp-quiz h1,#enp-quiz h2,#enp-quiz h3,#enp-quiz h4,#enp-quiz h5,#enp-quiz h6{clear:both;color:#444;font-family:tablet-gothic,helvetica neue,helvetica,arial,sans-serif;font-weight:700;line-height:1.2em;margin:0 0 .2rem}#enp-quiz h1{font-size:2em}#enp-quiz h2{font-size:1.75em}#enp-quiz h3{font-size:1.475em}#enp-quiz h4{font-size:1.3em}#enp-quiz h5{font-size:1.125em}#enp-quiz h6{font-size:1em}#enp-quiz p+h1,#enp-quiz p+h2,#enp-quiz p+h3,#enp-quiz p+h4,#enp-quiz p+h5,#enp-quiz p+h6,#enp-quiz ul+h1,#enp-quiz ul+h2,#enp-quiz ul+h3,#enp-quiz ul+h4,#enp-quiz ul+h5,#enp-quiz ul+h6{margin-top:1.8em}#enp-quiz p{font-size:.85em;font-weight:300;margin-bottom:1.125em}#enp-quiz ol,#enp-quiz ul{margin:0 0 1.6em 1.25em}#enp-quiz ul{list-style:disc}#enp-quiz ol{list-style:decimal}#enp-quiz li>ol,#enp-quiz li>ul{margin-bottom:0;margin-left:1.6em}#enp-quiz b,#enp-quiz strong{font-weight:700}#enp-quiz cite,#enp-quiz dfn,#enp-quiz em{font-family:georgia,times,serif;font-style:italic}#enp-quiz pre{background:#eee;font-family:Courier\ 10 Pitch,Courier,monospace;font-size:.95em;line-height:1.6;margin-bottom:1.6em;max-width:100%;overflow:auto;padding:1.6em}#enp-quiz .code,#enp-quiz code,#enp-quiz kbd,#enp-quiz tt,#enp-quiz var{font:.7em Monaco,Consolas,"Andale Mono","DejaVu Sans Mono",monospace}#enp-quiz figure{margin:0}#enp-quiz img{height:auto;max-width:100%}#enp-quiz a{color:#333f48;text-decoration:none;touch-action:manipulation;transition:color .2s}#enp-quiz a .enp-icon{fill:#333f48}#enp-quiz a:active,#enp-quiz a:focus,#enp-quiz a:hover{color:#1e252a}#enp-quiz a:active .enp-icon,#enp-quiz a:focus .enp-icon,#enp-quiz a:hover .enp-icon{fill:#1e252a}#enp-quiz button:focus{outline-color:#4d90fe;outline-offset:-2px;outline-style:auto;outline-width:5px}#enp-quiz .enp-btn{background:#333f48;border:0;border-radius:3px;box-shadow:inset 0 -2px 0 rgba(0,0,0,.2);color:#fff;cursor:pointer;font-size:15px;font-weight:400;letter-spacing:.05em;line-height:1.6;padding:.85em 1.4em .75em;text-align:center;text-transform:uppercase;transition:all .2s}#enp-quiz .enp-btn:hover{background:#1e252a;box-shadow:none;color:#fff}#enp-quiz .enp-btn:active{background:#5d7384;box-shadow:inset 0 2px 0 rgba(0,0,0,.1);color:#fff}#enp-quiz .enp-btn:focus{outline-color:#4d90fe;outline-offset:-2px;outline-style:auto;outline-width:5px}#enp-quiz .enp-btn--add{background:0;border:3px dashed #666;border-radius:3px;box-shadow:none;color:#545454;cursor:pointer;font-size:15px;font-weight:400;letter-spacing:.05em;line-height:1.6;padding:.85em 1.4em .75em;text-align:center;text-transform:uppercase;transition:all .2s;width:100%}#enp-quiz .enp-btn--add:hover{box-shadow:none;color:#fff}#enp-quiz .enp-btn--add:active{background:#5d7384;box-shadow:inset 0 2px 0 rgba(0,0,0,.1);color:#fff}#enp-quiz .enp-btn--add:focus{outline-color:#4d90fe;outline-offset:-2px;outline-style:auto;outline-width:5px}#enp-quiz .enp-btn--add:focus,#enp-quiz .enp-btn--add:hover{background:hsla(0,0%,100%,.9);border:3px dashed #444;color:#444}#enp-quiz .enp-btn--disabled{cursor:default;opacity:.65}#enp-quiz .enp-btn--enabled{-webkit-animation:expand .6s;animation:expand .6s}#enp-quiz .enp-icon{height:24px;transition:all .2s;width:24px}#enp-quiz .enp-page-title{font-size:1.6rem}#enp-quiz fieldset{border:0;margin:0;padding:0}.enp-label{color:#5e5e5e;display:block;font-size:.85rem;font-weight:400;text-transform:uppercase}.enp-legend{border:0;color:#5e5e5e;display:block;font-size:.85rem;font-weight:400;margin-bottom:.2rem;padding-top:1.6rem;text-transform:uppercase}.enp-input{background:#fff;border:1px solid #aaa;border-radius:3px;font-family:tablet-gothic,helvetica neue,helvetica,arial,sans-serif;font-size:1rem;margin-bottom:1.2rem;max-width:100%;padding:.8rem .5rem;width:20rem}@media(min-width:700px){.enp-input{padding:.8rem}}.enp-input:-ms-input-placeholder,.enp-input::-ms-input-placeholder,.enp-input::-webkit-input-placeholder,.enp-input::placeholder,.enp-textarea:-ms-input-placeholder,.enp-textarea::-ms-input-placeholder,.enp-textarea::-webkit-input-placeholder,.enp-textarea::placeholder{color:#aaa;font-family:tablet-gothic,helvetica neue,helvetica,arial,sans-serif;font-weight:300}@-webkit-keyframes removeAnswers{0%{-webkit-transform:translate3d(0,0,0);height:auto;opacity:1;transform:translate3d(0,0,0)}10%{-webkit-transform:translate3d(0,0,0);opacity:1;transform:translate3d(0,0,0)}to{-webkit-transform:translate3d(-150px,0,0);display:none;height:0;opacity:0;padding:0;transform:translate3d(-150px,0,0);z-index:-1}}@keyframes removeAnswers{0%{-webkit-transform:translate3d(0,0,0);height:auto;opacity:1;transform:translate3d(0,0,0)}10%{-webkit-transform:translate3d(0,0,0);opacity:1;transform:translate3d(0,0,0)}to{-webkit-transform:translate3d(-150px,0,0);display:none;height:0;opacity:0;padding:0;transform:translate3d(-150px,0,0);z-index:-1}}@-webkit-keyframes removeQuestion{0%,15%{-webkit-transform:translatex(0);opacity:1;transform:translatex(0)}to{-webkit-transform:translatex(-150px);opacity:0;transform:translatex(-150px)}}@keyframes removeQuestion{0%,15%{-webkit-transform:translatex(0);opacity:1;transform:translatex(0)}to{-webkit-transform:translatex(-150px);opacity:0;transform:translatex(-150px)}}@-webkit-keyframes showNextQuestion{0%{-webkit-transform:translatex(90pt);opacity:0;transform:translatex(90pt)}to{-webkit-transform:translatex(0);opacity:1;transform:translatex(0)}}@keyframes showNextQuestion{0%{-webkit-transform:translatex(90pt);opacity:0;transform:translatex(90pt)}to{-webkit-transform:translatex(0);opacity:1;transform:translatex(0)}}@-webkit-keyframes slideInTop{0%{-webkit-transform:translate3d(0,-20px,0);height:auto;opacity:0;transform:translate3d(0,-20px,0)}to{-webkit-transform:translate3d(0,0,0);height:auto;opacity:1;transform:translate3d(0,0,0)}}@keyframes slideInTop{0%{-webkit-transform:translate3d(0,-20px,0);height:auto;opacity:0;transform:translate3d(0,-20px,0)}to{-webkit-transform:translate3d(0,0,0);height:auto;opacity:1;transform:translate3d(0,0,0)}}@-webkit-keyframes slideInBottom{0%{-webkit-transform:translate3d(0,20px,0);opacity:0;transform:translate3d(0,20px,0)}to{-webkit-transform:translate3d(0,0,0);opacity:1;transform:translate3d(0,0,0)}}@keyframes slideInBottom{0%{-webkit-transform:translate3d(0,20px,0);opacity:0;transform:translate3d(0,20px,0)}to{-webkit-transform:translate3d(0,0,0);opacity:1;transform:translate3d(0,0,0)}}@-webkit-keyframes flashRedShadow{0%{background:#f14021}to{background:#fff}}@keyframes flashRedShadow{0%{background:#f14021}to{background:#fff}}@-webkit-keyframes errorContainer{0%{}to{background-color:rgba(241,64,33,.2)}}@keyframes errorContainer{0%{}to{background-color:rgba(241,64,33,.2)}}@-webkit-keyframes pop{0%{opacity:1;width:0}to{opacity:0;width:40%}30%{width:100%}80%{opacity:1;width:100%}}@keyframes pop{0%{opacity:1;width:0}to{opacity:0;width:40%}30%{width:100%}80%{opacity:1;width:100%}}.spinner{margin:0 auto;text-align:center;width:70px}.spinner>div{-webkit-animation:sk-bouncedelay 1.4s infinite ease-in-out both;animation:sk-bouncedelay 1.4s infinite ease-in-out both;background-color:#333;border-radius:100%;display:inline-block;height:18px;width:18px}.spinner .bounce1{-webkit-animation-delay:-.32s;animation-delay:-.32s}.spinner .bounce2{-webkit-animation-delay:-.16s;animation-delay:-.16s}@-webkit-keyframes sk-bouncedelay{0%,80%,to{-webkit-transform:scale(0)}40%{-webkit-transform:scale(1)}}@keyframes sk-bouncedelay{0%,80%,to{-webkit-transform:scale(0);transform:scale(0)}40%{-webkit-transform:scale(1);transform:scale(1)}}#enp-quiz{background:transparent}#enp-quiz .enp-quiz__container{background:#fff;border:1px solid #ddd;padding:0;position:relative}#enp-quiz .enp-quiz__header{border-bottom:1px solid #ddd;position:relative}#enp-quiz .enp-quiz__title{font-size:.85rem;font-weight:500;letter-spacing:.01rem;padding:.6rem 1rem;text-transform:uppercase}#enp-quiz .enp-quiz__title--hide{display:none}#enp-quiz .enp-quiz__progress{bottom:0;height:0;left:0;position:absolute;right:0}#enp-quiz .enp-quiz__progress__bar{background:#3bb275;height:3px;min-width:2rem;position:relative;transition:all .5s cubic-bezier(0,0,.3,1);width:0}#enp-quiz .enp-quiz__progress__bar__question-count{bottom:.7rem;font-size:.8rem;position:absolute;right:1rem}#enp-quiz .enp-question__container{display:block}#enp-quiz .enp-question__form{color:#444;margin-left:auto;margin-right:auto;max-width:40pc;overflow:hidden;padding:2rem 20px 2.6rem}#enp-quiz .enp-question__form:after{clear:both;content:"";display:table}@media(min-width:700px){#enp-quiz .enp-question__form{padding:2.6rem 3rem}}#enp-quiz .enp-question__question{box-sizing:border-box;display:table;font-size:1.8rem;font-weight:700;line-height:1.2;margin-bottom:.2rem;max-width:100%;padding-bottom:.1rem;position:relative;white-space:normal}@media(min-width:25pc){#enp-quiz .enp-question__question{font-size:2rem}}#enp-quiz .enp-question__question:after{background-color:rgba(0,0,0,.2);bottom:0;content:"";height:2px;left:0;margin:auto;position:absolute;right:0;width:0}#enp-quiz .enp-question__question:focus:after{-webkit-animation:pop .8s cubic-bezier(0,0,.3,1);animation:pop .8s cubic-bezier(0,0,.3,1)}#enp-quiz .enp-question-image{margin-bottom:.4rem}#enp-quiz .enp-question__helper{font-size:1rem}#enp-quiz .enp-option__input{clip:rect(1px,1px,1px,1px);height:1px;left:-625pc;overflow:hidden;position:absolute!important;top:auto;width:1px}#enp-quiz .enp-option__input:checked+.enp-option__label:before{background-color:#3bb275}#enp-quiz .enp-option__input:focus+.enp-option__label{background:#f5f5f5;color:#444}#enp-quiz .enp-option__label{background:0;border:0;border-bottom:1px solid rgba(0,0,0,.1);color:#444;display:block;font-size:1rem;font-weight:400;line-height:1.6;padding:.8rem 0 .8rem 40px;position:relative;text-align:left;text-transform:none;transition:color .2s cubic-bezier(0,0,.3,1),background .2s cubic-bezier(0,0,.3,1);width:100%}#enp-quiz .enp-option__label:before{background-clip:content-box;background-color:transparent;border:2px solid #3bb275;border-radius:50%;content:"";height:20px;left:10px;padding:3px;position:absolute;top:.925rem;transition:all .2s;width:20px}#enp-quiz .enp-option__label:last-of-type{border-bottom:0}#enp-quiz .enp-question__container--unanswered .enp-option__label:hover{cursor:pointer}#enp-quiz .enp-question__container--unanswered .enp-option__label:hover:before{background-color:#3bb275}#enp-quiz .enp-question__submit{background:#333f48;border:0;border-radius:3px;box-shadow:inset 0 -2px 0 rgba(0,0,0,.2);color:#fff;cursor:pointer;font-size:15px;font-weight:400;letter-spacing:.05em;line-height:1.6;padding:1em 2.8em .95em 1.4em;position:relative;text-align:center;text-transform:uppercase;transition:padding .3s cubic-bezier(0,0,.3,1)}#enp-quiz .enp-question__submit:hover{background:#1e252a;box-shadow:none;color:#fff}#enp-quiz .enp-question__submit:active{background:#5d7384;box-shadow:inset 0 2px 0 rgba(0,0,0,.1);color:#fff}#enp-quiz .enp-question__submit:focus{outline-color:#4d90fe;outline-offset:-2px;outline-style:auto;outline-width:5px}#enp-quiz .enp-question__submit__icon{-webkit-transform:translate3d(0,0,0);background:transparent;border-radius:50%;bottom:0;fill:#fff;height:1.6em;margin-bottom:auto;margin-left:.5em;margin-top:auto;position:absolute;top:0;transform:translate3d(0,0,0);transition:all .3s cubic-bezier(0,0,.3,1);width:1.6em}#enp-quiz .enp-question__submit:focus .enp-question__submit__icon,#enp-quiz .enp-question__submit:hover .enp-question__submit__icon{background:#fff;fill:#1e252a}#enp-quiz .enp-question__submit:focus,#enp-quiz .enp-question__submit:hover{padding-right:4em}#enp-quiz .enp-question__submit .enp-question__submit__icon{right:.8em}#enp-quiz .enp-question__fieldset--mc .enp-question__submit{height:0;opacity:0;padding-bottom:0;padding-top:0}#enp-quiz .enp-question__fieldset--mc .enp-option__input:checked~.enp-options__submit{-webkit-animation:.3s slideInTop cubic-bezier(0,0,.3,1) forwards;animation:.3s slideInTop cubic-bezier(0,0,.3,1) forwards;height:auto;margin-top:.4rem;opacity:1;padding-bottom:.95em;padding-top:1em}#enp-quiz .enp-question__fieldset--slider .enp-options__submit{margin-top:1.4rem}#enp-quiz .enp-question__container--explanation{background-color:rgba(0,0,0,.15)}#enp-quiz .enp-question__container--explanation .enp-question__submit{display:none}#enp-quiz .enp-question__container--explanation .enp-option__label{border-bottom:0;margin-bottom:5px}#enp-quiz .enp-question__container--explanation .enp-option__input--correct-clicked+.enp-option__label:before{background-color:#3bb275}#enp-quiz .enp-question__container--explanation .enp-option__input--correct+.enp-option__label{background-color:#e6f7ee;box-shadow:inset 4px 0 0 #3bb275}#enp-quiz .enp-question__container--explanation .enp-option__input--incorrect-clicked+.enp-option__label{background-color:#fff;box-shadow:inset 4px 0 0 #f14021}#enp-quiz .enp-question__container--explanation .enp-option__input--incorrect-clicked+.enp-option__label:before{background-color:#f14021;border:2px solid #f14021}#enp-quiz .enp-option__input--slide-hide+.enp-option__label{-webkit-animation:removeAnswers .6s cubic-bezier(.28,.01,0,.69) forwards;animation:removeAnswers .6s cubic-bezier(.28,.01,0,.69) forwards;height:0;margin:0}#enp-quiz .enp-explanation{background:#fff;padding:1.6rem 1.6rem 1.5rem}#enp-quiz .enp-question__fieldset--slider .enp-explanation{-webkit-animation:slideInBottom .3s cubic-bezier(0,0,.3,1) forwards;animation:slideInBottom .3s cubic-bezier(0,0,.3,1) forwards}#enp-quiz .enp-explanation--correct{box-shadow:inset 4px 0 0 #3bb275}#enp-quiz .enp-explanation--correct .enp-explanation__percentage:after{content:"% Got This Right"}#enp-quiz .enp-explanation--incorrect{box-shadow:inset 4px 0 0 #f14021}#enp-quiz .enp-explanation--incorrect .enp-explanation__percentage:after{content:"% Got This Wrong"}#enp-quiz .enp-explanation__title{font-size:.85rem;text-transform:uppercase}#enp-quiz .enp-explanation__percentage{color:#565656;font-size:.75rem;font-weight:500;margin-left:4px}#enp-quiz .enp-explanation__percentage:after{content:"%"}#enp-quiz .enp-explanation--correct .enp-explanation__title{color:#2e8c5c}#enp-quiz .enp-explanation--incorrect .enp-explanation__title{color:#d22b0d}#enp-quiz .enp-explanation__explanation{font-weight:400;margin-top:.4rem}#enp-quiz .enp-next-step{border:0;border-radius:3px;box-shadow:inset 0 -2px 0 rgba(0,0,0,.2);color:#fff;cursor:pointer;font-size:15px;font-weight:400;letter-spacing:.05em;line-height:1.6;padding:1em 2.8em .95em 1.4em;position:relative;text-align:center;text-transform:uppercase;transition:padding .3s cubic-bezier(0,0,.3,1)}#enp-quiz .enp-next-step:hover{box-shadow:none}#enp-quiz .enp-next-step:active{box-shadow:inset 0 2px 0 rgba(0,0,0,.1);color:#fff}#enp-quiz .enp-next-step:focus{outline-offset:-2px;outline-style:auto;outline-width:5px}#enp-quiz .enp-next-step__icon{-webkit-transform:translate3d(0,0,0);background:transparent;border-radius:50%;bottom:0;fill:#fff;height:1.6em;margin-bottom:auto;margin-left:.5em;margin-top:auto;position:absolute;top:0;transform:translate3d(0,0,0);transition:all .3s cubic-bezier(0,0,.3,1);width:1.6em}#enp-quiz .enp-next-step:focus .enp-next-step__icon,#enp-quiz .enp-next-step:hover .enp-next-step__icon{background:#fff;fill:#1e252a}#enp-quiz .enp-next-step{background:transparent;border:2px solid #333f48;border-radius:3px;box-shadow:none;color:#333f48;cursor:pointer;display:inline-block;font-size:15px;font-weight:400;letter-spacing:.05em;line-height:1.6;padding:.8em 2.4em .8em 1.4em;position:relative;text-align:center;text-transform:uppercase;transition:all .2s;width:100%}#enp-quiz .enp-next-step:hover{background:#1e252a;box-shadow:none}#enp-quiz .enp-next-step:active{background:#5d7384;box-shadow:inset 0 2px 0 rgba(0,0,0,.1);color:#fff}#enp-quiz .enp-next-step:focus{outline-color:#4d90fe;outline-offset:-2px;outline-style:auto;outline-width:5px}#enp-quiz .enp-next-step:focus,#enp-quiz .enp-next-step:hover{background:transparent;border:2px solid #1e252a;color:#1e252a}#enp-quiz .enp-next-step .enp-next-step__icon{fill:#333f48;transition:all .3s cubic-bezier(0,0,.3,1)}#enp-quiz .enp-next-step:hover .enp-next-step__icon{-webkit-transform:translate3d(1em,0,0);background:#333f48;fill:#fff;margin-right:1em;transform:translate3d(1em,0,0)}#enp-quiz .enp-question--on-deck{-webkit-transform:translatex(200px);opacity:0;position:absolute;top:0;transform:translatex(200px);z-index:-1}#enp-quiz .enp-question--show{-webkit-animation:showNextQuestion .6s cubic-bezier(0,0,.3,1) forwards;animation:showNextQuestion .6s cubic-bezier(0,0,.3,1) forwards}#enp-quiz .enp-question--remove{-webkit-animation:removeQuestion .15s cubic-bezier(0,0,.3,1) forwards;animation:removeQuestion .15s cubic-bezier(0,0,.3,1) forwards;position:absolute}#enp-quiz .enp-results__score{border-radius:50%;display:block;height:200px;margin:0 auto 1rem;position:relative;text-align:center;width:200px}#enp-quiz .enp-results__score__title{-webkit-transform:translate(-50%,-50%);color:#444;font-size:5rem;font-weight:400;left:50%;line-height:1;margin:0;position:absolute;top:50%;transform:translate(-50%,-50%)}#enp-quiz .enp-results__score__title__percentage{font-size:1.3rem;font-weight:300;position:absolute;top:1rem}#enp-quiz .enp-results__encouragement{font-size:1.8rem;font-weight:500;line-height:1.2;margin:.2rem;text-align:center}#enp-quiz .enp-results__description{margin:0 auto 1.6rem;max-width:24rem}#enp-quiz .enp-results__score__circle{-webkit-transform:rotate(-90deg);transform:rotate(-90deg)}#enp-quiz #enp-results__score__circle__path,#enp-quiz .enp-results__score__circle__bg{stroke:#ddd;stroke-width:4px}#enp-quiz #enp-results__score__circle__path{stroke:#3bb275}#enp-quiz .enp-results__score__circle__setOffset{transition:stroke-dashoffset 1.2s cubic-bezier(0,0,.3,1)}#enp-quiz .enp-results__score__circle__resetOffset{stroke-dashoffset:565.48}#enp-quiz .enp-results__share-title{font-size:.85rem;margin:2.4rem 0 1rem;text-align:center;text-transform:uppercase}#enp-quiz .enp-results__share{list-style:none;margin-left:0;text-align:center}#enp-quiz .enp-results__share__item{display:inline-block;margin-right:20px}#enp-quiz .enp-results__share__item:last-child{margin-right:0}#enp-quiz .enp-results__share__item__icon{background:#333f48;border-radius:50%;fill:#fff!important;height:2.4rem;padding:.6rem;width:2.4rem}#enp-quiz .enp-results__share__item__icon--facebook{background-color:#3a5795}#enp-quiz .enp-results__share__item__icon--twitter{background-color:#4099ff}#enp-quiz .enp-quiz-restart__container{text-align:center}#enp-quiz .enp-question__container--error{-webkit-animation:errorContainer .3s cubic-bezier(0,0,.3,1) forwards;animation:errorContainer .3s cubic-bezier(0,0,.3,1) forwards;padding:1rem 10px}#enp-quiz .enp-callout{font-size:.8rem;padding:.4rem;text-align:right}#enp-quiz .enp-slider{margin-bottom:1.6rem}#enp-quiz .enp-slider-input__container{align-items:center;display:flex;justify-content:center;margin:1.6rem auto;position:relative}#enp-quiz .enp-slider-input__label{color:#5e5e5e;display:block;font-size:.85rem;font-weight:400;text-transform:uppercase}#enp-quiz .enp-slider-input__prefix,#enp-quiz .enp-slider-input__suffix{font-size:1rem}#enp-quiz .enp-slider-input__prefix{margin-right:.2rem;white-space:pre}#enp-quiz .enp-slider-input__suffix{margin-left:.2rem;white-space:pre}#enp-quiz .enp-slider-input__input{background:#fff;border:1px solid #aaa;border-radius:3px;font-family:tablet-gothic,helvetica neue,helvetica,arial,sans-serif;font-size:1rem;margin-bottom:0;max-width:100%;padding:.75rem;transition:all .25s cubic-bezier(0,0,.3,1);width:auto}@media(min-width:700px){#enp-quiz .enp-slider-input__input{padding:.8rem}}#enp-quiz .enp-slider-input__input--incorrect{color:#f14021}#enp-quiz .enp-slider-input__input--correct{color:#319461}#enp-quiz .enp-slider-input__input--invalid-animation{box-shadow:0 0 2px 1px #e97763}#enp-quiz .enp-slider_input__range-helper{bottom:-1.2rem;font-size:.8rem;position:absolute}#enp-quiz .enp-slider_input__range-helper--low{left:0}#enp-quiz .enp-slider_input__range-helper--high{right:0}#enp-quiz .enp-slider-input__range-helper__number{color:#666;position:relative}#enp-quiz .ui-slider-range-show-correct__tooltip-container{position:relative}#enp-quiz .ui-slider-range-show-correct__tooltip{background-color:#fff;border:2px solid #3bb275;border-radius:50%;height:1.1rem;margin-left:-.55rem;position:absolute;top:-.4rem;width:1.1rem;z-index:9999}#enp-quiz .ui-slider-range-show-correct__tooltip--low{left:0}#enp-quiz .ui-slider-range-show-correct__tooltip--high{right:-.55rem}#enp-quiz .ui-slider-range-show-correct__tooltip__text{color:#287950;display:inline-block;font-size:.825rem;min-width:100%;position:relative;text-align:center;text-shadow:0 1px 0 #fff;top:-1.35rem}#enp-quiz .enp-slider{background:#ddd;position:relative;text-align:left}#enp-quiz .enp-slider .ui-helper-hidden{display:none}#enp-quiz .enp-slider .ui-helper-hidden-accessible{border:0;clip:rect(0 0 0 0);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px}#enp-quiz .enp-slider .ui-helper-reset{border:0;font-size:100%;line-height:1.3;list-style:none;margin:0;outline:0;padding:0;text-decoration:none}#enp-quiz .enp-slider .ui-helper-clearfix:after,#enp-quiz .enp-slider .ui-helper-clearfix:before{border-collapse:collapse;content:"";display:table}#enp-quiz .enp-slider .ui-helper-clearfix:after{clear:both}#enp-quiz .enp-slider .ui-helper-clearfix{min-height:0}#enp-quiz .enp-slider .ui-helper-zfix{filter:alpha(opacity=0);height:100%;left:0;opacity:0;position:absolute;top:0;width:100%}#enp-quiz .enp-slider .ui-front{z-index:100}#enp-quiz .enp-slider .ui-state-disabled{cursor:default!important}#enp-quiz .enp-slider .ui-icon{background-repeat:no-repeat;display:block;overflow:hidden;text-indent:-99999px}#enp-quiz .enp-slider .ui-widget-overlay{height:100%;left:0;position:fixed;top:0;width:100%}#enp-quiz .enp-slider .ui-slider-handle{background:#fff;border:1px solid #aaa;border-radius:50%;cursor:default;height:1.2rem;margin-left:-.6rem;position:absolute;top:-.4rem;touch-action:none;transition:opacity .2s cubic-bezier(0,0,.3,1),height .18s cubic-bezier(0,0,.3,1),width .18s cubic-bezier(0,0,.3,1),transform .18s cubic-bezier(0,0,.3,1),-webkit-transform .18s cubic-bezier(0,0,.3,1);width:1.2rem;z-index:2}@media(max-width:699px){#enp-quiz .enp-slider .ui-slider-handle{-webkit-transform:rotate(225deg);height:2rem;margin-left:-1rem;top:-.85rem;transform:rotate(225deg);width:2rem}}#enp-quiz .enp-slider .ui-slider-handle:focus{box-shadow:0 0 3px 1px #4d90fe;outline:0}@media(max-width:699px){#enp-quiz .enp-slider .ui-slider-handle.ui-state-active{-webkit-transform:translate3d(-.2rem,-.8rem,0) rotate(225deg);border-top-left-radius:0;height:2.2rem;transform:translate3d(-.2rem,-.8rem,0) rotate(225deg);width:2.2rem}}#enp-quiz .enp-slider .ui-slider-handle--correct,#enp-quiz .enp-slider .ui-slider-handle--incorrect{height:1.1rem;margin-left:-.55rem;top:-.4rem;width:1.1rem}#enp-quiz .enp-slider .ui-slider-handle--incorrect{border:2px solid #f14021;z-index:1}#enp-quiz .enp-slider .ui-slider-handle--correct{border:2px solid #3bb275;z-index:99999}#enp-quiz .enp-slider .ui-slider-range{background-position:0 0;border:0;display:block;font-size:.7rem;height:100%;position:absolute;top:0;z-index:1}#enp-quiz .enp-slider .ui-slider-range-show-correct{background:#3bb275;z-index:9}#enp-quiz .enp-slider .ui-slider-range-min{background:#3bb275;left:0}#enp-quiz .enp-slider .ui-slider-range-max{right:0}#enp-quiz .enp-slider.ui-state-disabled .ui-slider-handle,#enp-quiz .enp-slider.ui-state-disabled .ui-slider-range{-webkit-filter:inherit;filter:inherit}#enp-quiz .ui-slider-horizontal{height:.3rem}#enp-quiz .enp-question__answered .enp-slider{background:#bbb}#enp-quiz .enp-question__answered .ui-slider-range-min{background:#fff} \ No newline at end of file +a,abbr,acronym,address,applet,big,blockquote,body,caption,cite,code,dd,del,dfn,div,dl,dt,em,fieldset,font,form,h1,h2,h3,h4,h5,h6,html,iframe,ins,kbd,label,legend,li,object,ol,p,pre,q,s,samp,small,span,strike,strong,sub,sup,table,tbody,td,tfoot,th,thead,tr,tt,ul,var{border:0;font-family:inherit;font-size:100%;font-style:inherit;font-weight:inherit;margin:0;outline:0;padding:0;vertical-align:baseline}html{font-size:100%;overflow-y:scroll;-webkit-text-size-adjust:100%;-ms-text-size-adjust:100%}body{background:#fff;overflow:hidden}article,aside,details,figcaption,figure,footer,header,nav,section{display:block}ol,ul{list-style:none}table{border-collapse:separate;border-spacing:0}caption,td,th{font-weight:400;text-align:left}blockquote:after,blockquote:before,q:after,q:before{content:""}blockquote,q{quotes:"" ""}a:focus{outline:thin dotted}a:active,a:hover{outline:0}a img{border:0}html{box-sizing:border-box}*,:after,:before{box-sizing:inherit}html{font-size:16px!important}html #enp-quiz{box-sizing:border-box;border-radius:3px}body #enp-quiz{background:#fff;overflow:hidden}#enp-quiz *,#enp-quiz :after,#enp-quiz :before{box-sizing:inherit}#enp-quiz ol,#enp-quiz ul{margin:0 0 1.6rem 1.25rem;padding:0}#enp-quiz textarea{margin-bottom:1rem}#enp-quiz button,#enp-quiz button:active,#enp-quiz button:focus,#enp-quiz button:hover,#enp-quiz iframe,#enp-quiz input[type=button],#enp-quiz input[type=button]:active,#enp-quiz input[type=button]:focus,#enp-quiz input[type=button]:hover,#enp-quiz input[type=reset],#enp-quiz input[type=reset]:active,#enp-quiz input[type=reset]:focus,#enp-quiz input[type=reset]:hover,#enp-quiz input[type=submit],#enp-quiz input[type=submit]:active,#enp-quiz input[type=submit]:focus,#enp-quiz input[type=submit]:hover{border:none}#enp-quiz .enp-screen-reader-text{clip:rect(1px,1px,1px,1px);position:absolute!important;left:-10000px;top:auto;width:1px;height:1px;overflow:hidden}#enp-quiz .enp-screen-reader-text:active,#enp-quiz .enp-screen-reader-text:focus,#enp-quiz .enp-screen-reader-text:hover{background-color:#f1f1f1;border-radius:3px;box-shadow:0 0 2px 2px rgba(0,0,0,.6);clip:auto!important;color:#21759b;display:block;font-size:14px;font-weight:700;height:auto;left:5px;line-height:normal;padding:15px 23px 14px;text-decoration:none;top:5px;width:auto;z-index:100000}#enp-quiz .enp-quiz-message{max-width:640px;margin:1.6rem auto;padding-left:20px;padding-right:20px;max-width:400px;background:#fff;border:1px solid #eee;border-bottom:1px solid #ccc;padding:1rem .375rem}#enp-quiz .enp-quiz-message:after{content:"";display:table;clear:both}#enp-quiz .enp-quiz-message__title{font-size:.85rem;text-transform:uppercase}#enp-quiz .enp-message__list{list-style:none;margin-left:0;font-size:1.1rem;margin-bottom:0}#enp-quiz .enp-quiz-message--error{border-left:6px solid #bf5700;animation:d .3s cubic-bezier(0,0,.3,1)}#enp-quiz .enp-quiz-message__title--error{color:#964400}#enp-quiz .enp-quiz-message--success{border-left:6px solid #60aaad;color:#4e9497}#enp-quiz .enp-quiz-message__title--success{color:#4e9497}body{color:#1d1c25;font-family:Arial,monospace,helvetica,arial,sans-serif;font-size:1em;line-height:1.6;font-weight:400}@media (min-width:700px){body{font-size:1.3em}}#enp-quiz h1,#enp-quiz h2,#enp-quiz h3,#enp-quiz h4,#enp-quiz h5,#enp-quiz h6{font-family:Arial,monospace,helvetica,arial,sans-serif;color:#1d1c25;clear:both;margin:0 0 .2rem;font-weight:700;line-height:1.2em}#enp-quiz h1{font-size:2em}#enp-quiz h2{font-size:1.75em}#enp-quiz h3{font-size:1.475em}#enp-quiz h4{font-size:1.3em}#enp-quiz h5{font-size:1.125em}#enp-quiz h6{font-size:1em}#enp-quiz p+h1,#enp-quiz p+h2,#enp-quiz p+h3,#enp-quiz p+h4,#enp-quiz p+h5,#enp-quiz p+h6,#enp-quiz ul+h1,#enp-quiz ul+h2,#enp-quiz ul+h3,#enp-quiz ul+h4,#enp-quiz ul+h5,#enp-quiz ul+h6{margin-top:1.8em}#enp-quiz p{font-size:.85em;margin-bottom:1.125em;font-weight:300}#enp-quiz ol,#enp-quiz ul{margin:0 0 1.6em 1.25em}#enp-quiz ul{list-style:disc}#enp-quiz ol{list-style:decimal}#enp-quiz li>ol,#enp-quiz li>ul{margin-bottom:0;margin-left:1.6em}#enp-quiz b,#enp-quiz strong{font-weight:700}#enp-quiz cite,#enp-quiz dfn,#enp-quiz em{font-family:georgia,times,serif;font-style:italic}#enp-quiz pre{background:#eee;font-family:Courier\ 10 Pitch,Courier,monospace;font-size:.95em;line-height:1.6;margin-bottom:1.6em;padding:1.6em;overflow:auto;max-width:100%}#enp-quiz .code,#enp-quiz code,#enp-quiz kbd,#enp-quiz tt,#enp-quiz var{font:.7em Monaco,Consolas,Andale Mono,DejaVu Sans Mono,monospace}#enp-quiz figure{margin:0}#enp-quiz img{height:auto;max-width:100%}#enp-quiz a{color:#1e1c26;text-decoration:none;transition:color .2s;touch-action:manipulation}#enp-quiz a .enp-icon{fill:#1e1c26}#enp-quiz a:active,#enp-quiz a:focus,#enp-quiz a:hover{color:#070609}#enp-quiz a:active .enp-icon,#enp-quiz a:focus .enp-icon,#enp-quiz a:hover .enp-icon{fill:#070609}#enp-quiz button:focus{outline-color:#4d90fe;outline-offset:-2px;outline-style:auto;outline-width:5px}#enp-quiz .enp-btn{text-align:center;border:none;border-radius:3px;padding:.85em 1.4em .75em;font-size:15px;font-weight:400;letter-spacing:.05em;line-height:1.6;color:#fff;box-shadow:inset 0 -2px 0 rgba(0,0,0,.2);background:#1e1c26;cursor:pointer;text-transform:uppercase;transition:all .2s}#enp-quiz .enp-btn:hover{color:#fff;box-shadow:none;background:#070609}#enp-quiz .enp-btn:active{color:#fff;box-shadow:inset 0 2px 0 rgba(0,0,0,.1);background:#4c4761}#enp-quiz .enp-btn:focus{outline-color:#4d90fe;outline-offset:-2px;outline-style:auto;outline-width:5px}#enp-quiz .enp-btn--add{text-align:center;border:none;border-radius:3px;padding:.85em 1.4em .75em;font-size:15px;font-weight:400;letter-spacing:.05em;line-height:1.6;color:#fff;box-shadow:inset 0 -2px 0 rgba(0,0,0,.2);background:#1e1c26;cursor:pointer;text-transform:uppercase;transition:all .2s;border:3px dashed #e3e3e3;background:none;color:#545454;box-shadow:none;width:100%}#enp-quiz .enp-btn--add:hover{color:#fff;box-shadow:none;background:#070609}#enp-quiz .enp-btn--add:active{color:#fff;box-shadow:inset 0 2px 0 rgba(0,0,0,.1);background:#4c4761}#enp-quiz .enp-btn--add:focus{outline-color:#4d90fe;outline-offset:-2px;outline-style:auto;outline-width:5px}#enp-quiz .enp-btn--add:focus,#enp-quiz .enp-btn--add:hover{border:3px dashed #b0b0b0;color:#b0b0b0;background:hsla(0,0%,100%,.9)}#enp-quiz .enp-btn--disabled{opacity:.65;cursor:default}#enp-quiz .enp-btn--enabled{animation:expand .6s}#enp-quiz .enp-icon{width:24px;height:24px;transition:all .2s}#enp-quiz .enp-page-title{font-size:1.6rem}#enp-quiz fieldset{border:none;margin:0;padding:0}.enp-label,.enp-legend{display:block;color:#343242;font-weight:400;font-size:.85rem;text-transform:uppercase}.enp-legend{padding-top:1.6rem;margin-bottom:.2rem;border:none}.enp-input{font-size:1rem;font-family:Arial,monospace,helvetica,arial,sans-serif;padding:.8rem .5rem;background:#fff;border:1px solid #aaa;border-radius:3px;width:20rem;max-width:100%;margin-bottom:1.2rem}@media (min-width:700px){.enp-input{padding:.8rem}}.enp-input::-webkit-input-placeholder,.enp-textarea::-webkit-input-placeholder{font-family:Arial,monospace,helvetica,arial,sans-serif;font-weight:300;color:#7a7697}.enp-input:-ms-input-placeholder,.enp-input::-ms-input-placeholder,.enp-textarea:-ms-input-placeholder,.enp-textarea::-ms-input-placeholder{font-family:Arial,monospace,helvetica,arial,sans-serif;font-weight:300;color:#7a7697}.enp-input::placeholder,.enp-textarea::placeholder{font-family:Arial,monospace,helvetica,arial,sans-serif;font-weight:300;color:#7a7697}@keyframes a{0%{opacity:1;height:auto;transform:translateZ(0)}10%{opacity:1;transform:translateZ(0)}to{padding:0;opacity:0;display:none;height:0;z-index:-1;transform:translate3d(-150px,0,0)}}@keyframes b{0%{opacity:1;transform:translateX(0)}15%{opacity:1;transform:translateX(0)}to{opacity:0;transform:translateX(-150px)}}@keyframes c{0%{opacity:0;transform:translateX(120px)}to{opacity:1;transform:translateX(0)}}@keyframes d{0%{opacity:0;height:auto;transform:translate3d(0,-20px,0)}to{opacity:1;height:auto;transform:translateZ(0)}}@keyframes e{0%{opacity:0;transform:translate3d(0,20px,0)}to{opacity:1;transform:translateZ(0)}}@keyframes f{to{background-color:rgba(191,87,0,.2)}}@keyframes g{0%{width:0;opacity:1}30%{width:100%}80%{opacity:1;width:100%}to{width:40%;opacity:0}}.spinner{margin:0 auto;width:70px;text-align:center}.spinner>div{width:18px;height:18px;background-color:#333;border-radius:100%;display:inline-block;animation:h 1.4s infinite ease-in-out both}.spinner .bounce1{animation-delay:-.32s}.spinner .bounce2{animation-delay:-.16s}@keyframes h{0%,80%,to{transform:scale(0)}40%{transform:scale(1)}}#enp-quiz{background:transparent}#enp-quiz .enp-quiz__container{position:relative;padding:0;background:#fff;border:1px solid #ddd}#enp-quiz .enp-quiz__header{position:relative;border-bottom:1px solid #ddd}#enp-quiz .enp-quiz__title{font-size:.85rem;text-transform:uppercase;font-weight:500;letter-spacing:.01rem;padding:.6rem 1rem}#enp-quiz .enp-quiz__title--hide{display:none}#enp-quiz .enp-quiz__progress{position:absolute;bottom:0;left:0;right:0;height:0}#enp-quiz .enp-quiz__progress__bar{position:relative;width:0;min-width:2rem;height:3px;background:#60aaad;transition:all .5s cubic-bezier(0,0,.3,1)}#enp-quiz .enp-quiz__progress__bar__question-count{position:absolute;right:1rem;bottom:.7rem;font-size:.8rem}#enp-quiz .enp-question__container{display:block;min-height:92vh}#enp-quiz .enp-question__form{max-width:640px;margin-left:auto;margin-right:auto;padding:2rem 20px 2.6rem;overflow:hidden;color:#1d1c25}#enp-quiz .enp-question__form:after{content:"";display:table;clear:both}@media (min-width:700px){#enp-quiz .enp-question__form{padding:2.6rem 3rem}}#enp-quiz .enp-question__question{font-size:1.8rem;font-weight:700;line-height:1.2;margin-bottom:.2rem;padding-bottom:.1rem;position:relative;box-sizing:border-box;display:table;max-width:100%;white-space:normal}@media (min-width:400px){#enp-quiz .enp-question__question{font-size:2rem}}#enp-quiz .enp-question__question:after{content:"";position:absolute;height:2px;background-color:#eee;background-color:rgba(0,0,0,.2);margin:auto;width:0;bottom:0;left:0;right:0}#enp-quiz .enp-question__question:focus:after{animation:g .8s cubic-bezier(0,0,.3,1)}#enp-quiz .enp-question-image{margin-bottom:.4rem}#enp-quiz .enp-question__helper{font-size:1rem}#enp-quiz .enp-option__input{clip:rect(1px,1px,1px,1px);position:absolute!important;left:-10000px;top:auto;width:1px;height:1px;overflow:hidden}#enp-quiz .enp-option__input:checked+.enp-option__label:before{background-color:#60aaad}#enp-quiz .enp-option__input:focus+.enp-option__label{color:#1d1c25;background:#f5f5f5}#enp-quiz .enp-option__label{display:block;position:relative;width:100%;text-align:left;text-transform:none;padding:.8rem 0 .8rem 40px;font-size:1rem;font-weight:400;line-height:1.6;border:none;border-bottom:1px solid #eee;border-bottom:1px solid rgba(0,0,0,.1);background:none;color:#1d1c25;transition:color .2s cubic-bezier(0,0,.3,1),background .2s cubic-bezier(0,0,.3,1)}#enp-quiz .enp-option__label:before{content:"";position:absolute;top:.925rem;left:10px;width:20px;height:20px;border-radius:50%;border:2px solid #60aaad;padding:3px;background-clip:content-box;background-color:transparent;transition:all .2s}#enp-quiz .enp-option__label:last-of-type{border-bottom:none}#enp-quiz .enp-question__container--unanswered .enp-option__label:hover{cursor:pointer}#enp-quiz .enp-question__container--unanswered .enp-option__label:hover:before{background-color:#60aaad}#enp-quiz .enp-question__submit{text-align:center;border:none;border-radius:3px;padding:.85em 1.4em .75em;font-size:15px;font-weight:400;letter-spacing:.05em;line-height:1.6;color:#fff;box-shadow:inset 0 -2px 0 rgba(0,0,0,.2);background:#1e1c26;cursor:pointer;text-transform:uppercase;transition:all .2s;padding:.8em 1.2em .6em 1.4em;position:relative;padding-right:2.8em;padding-top:1em;padding-bottom:.95em;transition:padding .3s cubic-bezier(0,0,.3,1)}#enp-quiz .enp-question__submit:hover{color:#fff;box-shadow:none;background:#070609}#enp-quiz .enp-question__submit:active{color:#fff;box-shadow:inset 0 2px 0 rgba(0,0,0,.1);background:#4c4761}#enp-quiz .enp-question__submit:focus{outline-color:#4d90fe;outline-offset:-2px;outline-style:auto;outline-width:5px}#enp-quiz .enp-question__submit__icon{border-radius:50%;background:#1e1c26;background:#fff;fill:#1e1c26;width:1.2rem;height:1.2rem;margin-left:.5em;width:1.6em;height:1.6em;background:transparent;fill:#fff;position:absolute;top:0;bottom:0;margin-top:auto;margin-bottom:auto;transform:translateZ(0);transition:all .3s cubic-bezier(0,0,.3,1)}#enp-quiz .enp-question__submit:focus .enp-question__submit__icon,#enp-quiz .enp-question__submit:hover .enp-question__submit__icon{background:#fff;fill:#070609}#enp-quiz .enp-question__submit:focus,#enp-quiz .enp-question__submit:hover{padding-right:4em}#enp-quiz .enp-question__submit .enp-question__submit__icon{right:.8em}#enp-quiz .enp-question__fieldset--mc .enp-question__submit{opacity:0;height:0;padding-top:0;padding-bottom:0}#enp-quiz .enp-question__fieldset--mc .enp-option__input:checked~.enp-options__submit{margin-top:.4rem;padding-top:1em;padding-bottom:.95em;height:auto;opacity:1;animation:.3s d cubic-bezier(0,0,.3,1) forwards}#enp-quiz .enp-question__fieldset--slider .enp-options__submit{margin-top:1.4rem}#enp-quiz .enp-question__container--explanation{background-color:#faf9fb}#enp-quiz .enp-question__container--explanation .enp-question__submit{display:none}#enp-quiz .enp-question__container--explanation .enp-option__label{margin-bottom:5px;border-bottom:none}#enp-quiz .enp-question__container--explanation .enp-option__input--correct-clicked+.enp-option__label:before{background-color:#60aaad}#enp-quiz .enp-question__container--explanation .enp-option__input--correct+.enp-option__label{box-shadow:inset 4px 0 0 #60aaad;background-color:#feffff}#enp-quiz .enp-question__container--explanation .enp-option__input--incorrect-clicked+.enp-option__label{background-color:#fff;box-shadow:inset 4px 0 0 #bf5700}#enp-quiz .enp-question__container--explanation .enp-option__input--incorrect-clicked+.enp-option__label:before{border:2px solid #bf5700;background-color:#bf5700}#enp-quiz .enp-option__input--slide-hide+.enp-option__label{margin:0;height:0;animation:a .6s cubic-bezier(.28,.01,0,.69) forwards}#enp-quiz .enp-explanation{background:#fff;padding:1.6rem 1.6rem 1.5rem}#enp-quiz .enp-question__fieldset--slider .enp-explanation{animation:e .3s cubic-bezier(0,0,.3,1) forwards}#enp-quiz .enp-explanation--correct{box-shadow:inset 4px 0 0 #60aaad}#enp-quiz .enp-explanation--correct .enp-explanation__percentage:after{content:"% Got This Right"}#enp-quiz .enp-explanation--incorrect{box-shadow:inset 4px 0 0 #bf5700}#enp-quiz .enp-explanation--incorrect .enp-explanation__percentage:after{content:"% Got This Wrong"}#enp-quiz .enp-explanation__title{font-size:.85rem;text-transform:uppercase}#enp-quiz .enp-explanation__percentage{font-size:.75rem;font-weight:500;color:#565656;margin-left:4px}#enp-quiz .enp-explanation__percentage:after{content:"%"}#enp-quiz .enp-explanation--correct .enp-explanation__title{color:#4a8d90}#enp-quiz .enp-explanation--incorrect .enp-explanation__title{color:#8c4000}#enp-quiz .enp-explanation__explanation{font-weight:400;margin-top:.4rem}#enp-quiz .enp-next-step{padding:.8em 1.2em .6em 1.4em;padding-right:2.8em;padding-top:1em;padding-bottom:.95em;transition:padding .3s cubic-bezier(0,0,.3,1)}#enp-quiz .enp-next-step__icon{border-radius:50%;background:#1e1c26;background:#fff;fill:#1e1c26;width:1.2rem;height:1.2rem;margin-left:.5em;width:1.6em;height:1.6em;background:transparent;fill:#fff;position:absolute;top:0;bottom:0;margin-top:auto;margin-bottom:auto;transform:translateZ(0);transition:all .3s cubic-bezier(0,0,.3,1)}#enp-quiz .enp-next-step:focus .enp-next-step__icon,#enp-quiz .enp-next-step:hover .enp-next-step__icon{background:#fff;fill:#070609}#enp-quiz .enp-next-step{text-align:center;border:none;border-radius:3px;padding:.85em 1.4em .75em;font-size:15px;font-weight:400;letter-spacing:.05em;line-height:1.6;color:#fff;box-shadow:inset 0 -2px 0 rgba(0,0,0,.2);background:#1e1c26;cursor:pointer;text-transform:uppercase;transition:all .2s;border:2px solid #1e1c26;background:transparent;color:#1e1c26;box-shadow:none;display:inline-block;width:100%;padding:.8em 2.4em .8em 1.4em;position:relative}#enp-quiz .enp-next-step:hover{color:#fff;box-shadow:none;background:#070609}#enp-quiz .enp-next-step:active{color:#fff;box-shadow:inset 0 2px 0 rgba(0,0,0,.1);background:#4c4761}#enp-quiz .enp-next-step:focus{outline-color:#4d90fe;outline-offset:-2px;outline-style:auto;outline-width:5px}#enp-quiz .enp-next-step:focus,#enp-quiz .enp-next-step:hover{background:transparent;border:2px solid #070609;color:#070609}#enp-quiz .enp-next-step .enp-next-step__icon{fill:#1e1c26;transition:all .3s cubic-bezier(0,0,.3,1)}#enp-quiz .enp-next-step:hover .enp-next-step__icon{fill:#fff;background:#1e1c26;margin-right:0;transform:translate3d(1em,0,0);margin-right:1em}#enp-quiz .enp-question--on-deck{transform:translateX(200px);opacity:0;z-index:-1;top:0;position:absolute}#enp-quiz .enp-question--show{animation:c .6s cubic-bezier(0,0,.3,1) forwards}#enp-quiz .enp-question--remove{position:absolute;animation:b .15s cubic-bezier(0,0,.3,1) forwards}#enp-quiz .enp-results__score{position:relative;text-align:center;border-radius:50%;margin:0 auto 1rem;display:block;height:200px;width:200px}#enp-quiz .enp-results__score__title{color:#1d1c25;font-size:5rem;line-height:1;font-weight:400;position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);margin:0}#enp-quiz .enp-results__score__title__percentage{font-size:1.3rem;position:absolute;top:1rem;font-weight:300}#enp-quiz .enp-results__encouragement{font-size:1.8rem;font-weight:500;text-align:center;line-height:1.2;margin:.2rem}#enp-quiz .enp-results__description{max-width:24rem;margin:0 auto 1.6rem}#enp-quiz .enp-results__score__circle{transform:rotate(-90deg)}#enp-quiz #enp-results__score__circle__path,#enp-quiz .enp-results__score__circle__bg{stroke:#ddd;stroke-width:4px}#enp-quiz #enp-results__score__circle__path{stroke:#60aaad}#enp-quiz .enp-results__score__circle__setOffset{transition:stroke-dashoffset 1.2s cubic-bezier(0,0,.3,1)}#enp-quiz .enp-results__score__circle__resetOffset{stroke-dashoffset:565.48}#enp-quiz .enp-results__share-title{margin:2.4rem 0 1rem;font-size:.85rem;text-transform:uppercase;text-align:center}#enp-quiz .enp-results__share{list-style:none;margin-left:0;text-align:center}#enp-quiz .enp-results__share__item{display:inline-block;margin-right:20px}#enp-quiz .enp-results__share__item:last-child{margin-right:0}#enp-quiz .enp-results__share__item__icon{width:2.4rem;height:2.4rem;border-radius:50%;background:#1e1c26;fill:#fff;padding:.6rem;fill:#fff!important}#enp-quiz .enp-results__share__item__icon--facebook{background-color:#3a5795}#enp-quiz .enp-results__share__item__icon--twitter{background-color:#4099ff}#enp-quiz .enp-quiz-restart__container{text-align:center}#enp-quiz .enp-question__container--error{padding:1rem 10px;animation:f .3s cubic-bezier(0,0,.3,1) forwards}#enp-quiz .enp-callout{font-size:10px;font-size:.8rem;text-align:right;padding:.4rem}#enp-quiz .enp-slider{margin-bottom:1.6rem}#enp-quiz .enp-slider-input__container{display:flex;align-items:center;justify-content:center;margin:1.6rem auto;position:relative}#enp-quiz .enp-slider-input__label{display:block;color:#343242;font-weight:400;font-size:.85rem;text-transform:uppercase}#enp-quiz .enp-slider-input__prefix,#enp-quiz .enp-slider-input__suffix{font-size:1rem}#enp-quiz .enp-slider-input__prefix{margin-right:.2rem;white-space:pre}#enp-quiz .enp-slider-input__suffix{margin-left:.2rem;white-space:pre}#enp-quiz .enp-slider-input__input{font-size:1rem;font-family:Arial,monospace,helvetica,arial,sans-serif;padding:.8rem .5rem;background:#fff;border:1px solid #aaa;border-radius:3px;width:20rem;max-width:100%;margin-bottom:1.2rem;margin-bottom:0;padding:.75rem;width:auto;transition:all .25s cubic-bezier(0,0,.3,1)}@media (min-width:700px){#enp-quiz .enp-slider-input__input{padding:.8rem}}#enp-quiz .enp-slider-input__input--incorrect{color:#bf5700}#enp-quiz .enp-slider-input__input--correct{color:#4e9497}#enp-quiz .enp-slider-input__input--invalid-animation{box-shadow:0 0 2px 1px #c1893e}#enp-quiz .enp-slider_input__range-helper{position:absolute;bottom:-1.2rem;font-size:.8rem}#enp-quiz .enp-slider_input__range-helper--low{left:0}#enp-quiz .enp-slider_input__range-helper--high{right:0}#enp-quiz .enp-slider-input__range-helper__number{position:relative;color:#e3e3e3}#enp-quiz .ui-slider-range-show-correct__tooltip-container{position:relative}#enp-quiz .ui-slider-range-show-correct__tooltip{position:absolute;top:-.4rem;margin-left:-.55rem;height:1rem;width:1.1rem;height:1.1rem;border:2px solid #60aaad;background-color:#fff;border-radius:50%;z-index:9999}#enp-quiz .ui-slider-range-show-correct__tooltip--low{left:0}#enp-quiz .ui-slider-range-show-correct__tooltip--high{right:-.55rem}#enp-quiz .ui-slider-range-show-correct__tooltip__text{position:relative;color:#417d7f;top:-1.35rem;font-size:.825rem;min-width:100%;display:inline-block;text-align:center;text-shadow:0 1px 0 #fff}#enp-quiz .enp-slider{position:relative;text-align:left;background:#ddd}#enp-quiz .enp-slider .ui-helper-hidden{display:none}#enp-quiz .enp-slider .ui-helper-hidden-accessible{border:0;clip:rect(0 0 0 0);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px}#enp-quiz .enp-slider .ui-helper-reset{margin:0;padding:0;border:0;outline:0;line-height:1.3;text-decoration:none;font-size:100%;list-style:none}#enp-quiz .enp-slider .ui-helper-clearfix:after,#enp-quiz .enp-slider .ui-helper-clearfix:before{content:"";display:table;border-collapse:collapse}#enp-quiz .enp-slider .ui-helper-clearfix:after{clear:both}#enp-quiz .enp-slider .ui-helper-clearfix{min-height:0}#enp-quiz .enp-slider .ui-helper-zfix{width:100%;height:100%;top:0;left:0;position:absolute;opacity:0;filter:alpha(opacity=0)}#enp-quiz .enp-slider .ui-front{z-index:100}#enp-quiz .enp-slider .ui-state-disabled{cursor:default!important}#enp-quiz .enp-slider .ui-icon{display:block;text-indent:-99999px;overflow:hidden;background-repeat:no-repeat}#enp-quiz .enp-slider .ui-widget-overlay{position:fixed;top:0;left:0;width:100%;height:100%}#enp-quiz .enp-slider .ui-slider-handle{background:#fff;border-radius:50%;border:1px solid #aaa;position:absolute;z-index:2;width:1.2rem;height:1.2rem;top:-.4rem;margin-left:-.6rem;cursor:default;touch-action:none;transition:opacity .2s cubic-bezier(0,0,.3,1),height .18s cubic-bezier(0,0,.3,1),width .18s cubic-bezier(0,0,.3,1),transform .18s cubic-bezier(0,0,.3,1)}@media (max-width:699px){#enp-quiz .enp-slider .ui-slider-handle{width:2rem;height:2rem;top:-.85rem;margin-left:-1rem;transform:rotate(225deg)}}#enp-quiz .enp-slider .ui-slider-handle:focus{outline:none;box-shadow:0 0 3px 1px #4d90fe}@media (max-width:699px){#enp-quiz .enp-slider .ui-slider-handle.ui-state-active{width:2.2rem;height:2.2rem;border-top-left-radius:0;transform:translate3d(-.2rem,-.8rem,0) rotate(225deg)}}#enp-quiz .enp-slider .ui-slider-handle--correct,#enp-quiz .enp-slider .ui-slider-handle--incorrect{width:1.1rem;height:1.1rem;top:-.4rem;margin-left:-.55rem}#enp-quiz .enp-slider .ui-slider-handle--incorrect{z-index:1;border:2px solid #bf5700}#enp-quiz .enp-slider .ui-slider-handle--correct{border:2px solid #60aaad;z-index:99999}#enp-quiz .enp-slider .ui-slider-range{position:absolute;z-index:1;font-size:.7rem;display:block;border:0;background-position:0 0;top:0;height:100%}#enp-quiz .enp-slider .ui-slider-range-show-correct{background:#60aaad;z-index:9}#enp-quiz .enp-slider .ui-slider-range-min{left:0;background:#60aaad}#enp-quiz .enp-slider .ui-slider-range-max{right:0}#enp-quiz .enp-slider.ui-state-disabled .ui-slider-handle,#enp-quiz .enp-slider.ui-state-disabled .ui-slider-range{filter:inherit}#enp-quiz .ui-slider-horizontal{height:.3rem}#enp-quiz .enp-question__answered .enp-slider{background:#bbb}#enp-quiz .enp-question__answered .ui-slider-range-min{background:#fff} +/*# sourceMappingURL=enp_quiz-take.min.css.map */ diff --git a/public/quiz-take/css/enp_quiz-take.min.css.map b/public/quiz-take/css/enp_quiz-take.min.css.map new file mode 100644 index 00000000..0e8813f1 --- /dev/null +++ b/public/quiz-take/css/enp_quiz-take.min.css.map @@ -0,0 +1 @@ +{"version":3,"sources":["_setup.scss","_utilities.scss","_structure.scss","_variables.scss","_typography.scss","_forms.scss","_animations.scss","_quiz.scss","_slider.scss"],"names":[],"mappings":"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","file":"enp_quiz-take.min.css","sourcesContent":["html, body, div, span, applet, object, iframe,\nh1, h2, h3, h4, h5, h6, p, blockquote, pre,\na, abbr, acronym, address, big, cite, code,\ndel, dfn, em, font, ins, kbd, q, s, samp,\nsmall, strike, strong, sub, sup, tt, var,\ndl, dt, dd, ol, ul, li,\nfieldset, form, label, legend,\ntable, caption, tbody, tfoot, thead, tr, th, td {\nborder: 0;\nfont-family: inherit;\nfont-size: 100%;\nfont-style: inherit;\nfont-weight: inherit;\nmargin: 0;\noutline: 0;\npadding: 0;\nvertical-align: baseline;\n}\nhtml {\nfont-size: 100%; /* Corrects text resizing oddly in IE6/7 when body font-size is set using em units http://clagnut.com/blog/348/#c790 */\noverflow-y: scroll; /* Keeps page centred in all browsers regardless of content height */\n-webkit-text-size-adjust: 100%; /* Prevents iOS text size adjust after orientation change, without disabling user zoom */\n-ms-text-size-adjust: 100%; /* www.456bereastreet.com/archive/201012/controlling_text_size_in_safari_for_ios_without_disabling_user_zoom/ */\n}\nbody {\nbackground: #fff;\noverflow: hidden;\n}\narticle,\naside,\ndetails,\nfigcaption,\nfigure,\nfooter,\nheader,\nnav,\nsection {\ndisplay: block;\n}\nol, ul {\nlist-style: none;\n}\ntable { /* tables still need 'cellspacing=\"0\"' in the markup */\nborder-collapse: separate;\nborder-spacing: 0;\n}\ncaption, th, td {\nfont-weight: normal;\ntext-align: left;\n}\nblockquote:before, blockquote:after,\nq:before, q:after {\ncontent: \"\";\n}\nblockquote, q {\nquotes: \"\" \"\";\n}\na:focus {\noutline: thin dotted;\n}\na:hover,\na:active { /* Improves readability when focused and also mouse hovered in all browsers people.opera.com/patrickl/experiments/keyboard/test */\noutline: 0;\n}\na img {\nborder: 0;\n}\n\n/* Reseting to border-box so we can do 100% width with 20px and not mess stuff up. */\nhtml {\nbox-sizing: border-box;\n}\n\n*, *:before, *:after {\nbox-sizing: inherit;\n}\n\nhtml {\n font-size: 16px!important; // set our rem value reference\n}\n\nhtml #enp-quiz {\n box-sizing: border-box;\n border-radius: 3px;\n}\n\nbody #enp-quiz {\n background: #fff;\n overflow: hidden;\n}\n\n#enp-quiz {\n *, *:before, *:after {\n box-sizing: inherit;\n }\n\n ul, ol {\n margin: 0 0 1.6rem 1.25rem;\n padding: 0;\n }\n\n textarea {\n margin-bottom: 1rem;\n }\n\n button, input[type=\"button\"], input[type=\"reset\"], input[type=\"submit\"] {\n border: none;\n &:active,\n &:focus,\n &:hover {\n border: none;\n }\n }\n\n iframe {\n border: none;\n }\n}\n","/* Text meant only for screen readers */\n@mixin screen-reader-text {\n clip: rect(1px, 1px, 1px, 1px);\n position: absolute !important;\n left:-10000px;\n top:auto;\n width:1px;\n height:1px;\n overflow:hidden;\n}\n\n@mixin screen-reader-text--hover {\n background-color: #f1f1f1;\n border-radius: 3px;\n box-shadow: 0 0 2px 2px rgba(0, 0, 0, 0.6);\n clip: auto !important;\n color: #21759b;\n display: block;\n font-size: 14px;\n font-weight: bold;\n height: auto;\n left: 5px;\n line-height: normal;\n padding: 15px 23px 14px;\n text-decoration: none;\n top: 5px;\n width: auto;\n z-index: 100000;\n}\n\n\n@mixin disabled {\n opacity: 0.65;\n cursor: default;\n}\n\n@mixin btn {\n text-align: center;\n border: none;\n border-radius: 3px;\n padding: .85em 1.4em .75em;\n font-size: 15px;\n font-weight: 400;\n letter-spacing: .05em;\n line-height: 1.6;\n color: #fff;\n box-shadow: inset 0 -2px 0 rgba(0,0,0,.2);\n background: $link;\n cursor: pointer;\n text-transform: uppercase;\n transition: all .2s;\n\n &:hover {\n color: #fff;\n box-shadow: none;\n background: $link_hover;\n }\n\n &:active {\n color: #fff;\n box-shadow: inset 0 2px 0 rgba(0,0,0,.1);\n background: lighten($link, 20);\n }\n\n &:focus {\n @include focus--glow;\n }\n}\n\n@mixin btn--reset {\n border: none;\n background: none;\n box-shadow: none;\n padding: 0;\n margin: 0;\n}\n\n\n@mixin btn--submit {\n @include btn;\n}\n\n@mixin btn--ghost {\n @include btn;\n border: 2px solid $blue;\n background: transparent;\n color: $link;\n box-shadow: none;\n\n &:focus,\n &:hover {\n background: transparent;\n border: 2px solid $link_hover;\n color: $link_hover;\n }\n}\n\n@mixin btn--dashed {\n @include btn;\n border: 3px dashed $dark_gray;\n background: none;\n color: #545454;\n box-shadow: none;\n\n &:hover,\n &:focus {\n border: 3px dashed $darker_gray;\n color: $darker_gray;\n background: rgba(255,255,255,.9);\n }\n}\n\n@mixin btn--small {\n font-size: 13px;\n}\n\n@mixin btn--thin {\n padding: 0.4em 1em;\n}\n\n@mixin btn--wide {\n width: 100%;\n padding-top: 1em;\n padding-bottom: 1em;\n}\n\n@mixin btn--icon {\n @include btn;\n padding: .75em 0.8em .7em 1.4em;\n}\n\n@mixin btn--icon__icon {\n @include icon--white;\n @include icon--xl;\n}\n\n/*\n* @usage: @include btn--icon(BEM-root-class);\n* Button with icon with white circular background.\n* --------------\n* | BTN TEXT > |\n* --------------\n* @param $rootBEM: root class name that will be extended\n*/\n@mixin btn--icon($rootBEM) {\n .#{$rootBEM} {\n @include btn--icon;\n }\n\n .#{$rootBEM}__icon {\n @include btn--icon__icon ;\n }\n}\n\n@mixin btn--icon--icon-circle {\n @include btn;\n padding: .8em 1.2em .6em 1.4em;\n}\n\n// use when the icon is larger and on the right\n@mixin btn--icon__icon--circle {\n @include icon--circle;\n @include icon--white-bg;\n @include icon--normal;\n margin-left: 0.5em;\n}\n\n@mixin btn--icon__icon--circle--hover {\n @include icon--white-bg--hover;\n}\n\n/*\n* @usage: @include btn--icon--circle(BEM-root-class);\n* Button with icon with white circular background.\n* ---------------\n* | BTN TEXT (>) |\n* ---------------\n* @param $rootBEM: root class name that will be extended\n*/\n@mixin btn--icon--circle($rootBEM) {\n .#{$rootBEM} {\n @include btn--icon--icon-circle;\n }\n\n .#{$rootBEM}__icon {\n @include btn--icon__icon--circle ;\n\n &:hover {\n @include btn--icon__icon--circle--hover ;\n }\n }\n}\n\n/*\n* @usage: @include btn--icon--hover-circle(BEM-root-class);\n* Button with icon. Hovering/focusing button moves\n* the icon to right and fades in a white circular background\n* -------------- ----------------\n* | BTN TEXT > | --hover/focus--> | BTN TEXT (>) |\n* -------------- ----------------\n* @param $rootBEM: root class name that will be extended\n*/\n@mixin btn--icon--hover-circle($rootBEM) {\n .#{$rootBEM} {\n @include btn--icon--icon-circle;\n position: relative;\n padding-right: 2.8em;\n padding-top: 1em;\n padding-bottom: 0.95em;\n transition: padding .3s $fastInEaseOut;\n }\n\n .#{$rootBEM}__icon {\n @include btn--icon__icon--circle ;\n width: 1.6em;\n height: 1.6em;\n background: transparent;\n fill: #fff;\n position: absolute;\n top: 0;\n bottom: 0;\n margin-top: auto;\n margin-bottom: auto;\n transform: translate3d(0, 0, 0);\n transition: all .3s $fastInEaseOut;\n }\n\n .#{$rootBEM}:hover,\n .#{$rootBEM}:focus {\n\n .#{$rootBEM}__icon {\n @include btn--icon__icon--circle--hover ;\n }\n }\n\n\n\n\n}\n\n// use on small icons and placed on the left\n@mixin btn--icon__icon--circle--small {\n @include icon--circle--small;\n margin-right: 5px;\n}\n\n\n// use this to match the icon to the inline font-size\n@mixin icon--inline {\n width: 1em;\n height: 1em;\n position: relative;\n top: .125em;\n}\n\n@mixin icon--small {\n width: 1rem;\n height: 1rem;\n}\n\n@mixin icon--normal {\n width: 1.2rem;\n height: 1.2rem;\n}\n\n@mixin icon--large {\n width: 1.5rem;\n height: 1.5rem;\n}\n\n@mixin icon--xl {\n width: 1.8rem;\n height: 1.8rem;\n}\n\n@mixin icon--xxl {\n width: 2.4rem;\n height: 2.4rem;\n}\n\n@mixin icon--xxxl {\n width: 2.8rem;\n height: 2.8rem;\n}\n\n@mixin icon--circle {\n border-radius: 50%;\n background: $link;\n fill: #fff;\n}\n\n@mixin icon--circle--pad {\n @include icon--circle ;\n padding: 0.05em;\n\n @include breakpoint(medium) {\n padding: 0.15em;\n }\n}\n\n@mixin icon--circle--pad--xl {\n @include icon--circle ;\n padding: 0.6rem;\n}\n\n@mixin icon--circle--small {\n @include icon--small;\n @include icon--circle;\n padding: 0.02rem;\n}\n\n@mixin icon--white {\n fill: #fff;\n}\n\n@mixin icon--white-bg {\n background: #fff;\n fill: $link;\n}\n\n@mixin icon--white-bg--hover {\n background: #fff;\n fill: $link_hover;\n}\n\n@mixin icon--gray-bg {\n background: $dark_gray;\n fill: $light_gray;\n}\n\n@mixin icon--gray-bg--hover {\n fill: #fff;\n background: $darker_gray;\n}\n\n@mixin small-uppercase {\n font-size: 0.85rem;\n text-transform: uppercase;\n}\n\n@mixin hint {\n font-size: .7rem;\n font-weight: 300;\n color: #565656;\n}\n\n@mixin green {\n color: $green;\n}\n\n@mixin dark-green {\n color: $dark_green;\n}\n\n@mixin red {\n color: $red;\n}\n\n@mixin fade-red {\n color: $fade_red;\n}\n\n@mixin xmargin-vertical {\n margin-top: 2rem;\n margin-bottom: 2rem;\n}\n\n@mixin xmargin-horizontal {\n margin-right: 2rem;\n margin-left: 2rem;\n}\n\n@mixin xpadding-vertical {\n padding-top: 2rem;\n padding-bottom: 2rem;\n}\n\n@mixin xpadding-horizontal {\n padding-right: 2rem;\n padding-left: 2rem;\n}\n\n@mixin ul-no-style {\n list-style: none;\n margin-left: 0;\n}\n\n@mixin well {\n padding: 1.6rem;\n margin-bottom: 1.6rem;\n background: #fff;\n border: 1px solid #eee;\n border-bottom-color: #ccc;\n\n @include breakpoint(medium) {\n margin-bottom: 2.6rem;\n padding: 1.6rem 2rem;\n }\n}\n\n@mixin hidden--accessible {\n height: 0;\n opacity: 0;\n padding: 0;\n overflow: hidden;\n}\n\n// Share Icons\n@mixin share_icons($rootBEM) {\n\n .#{$rootBEM} {\n @include ul-no-style;\n text-align: center;\n }\n\n .#{$rootBEM}__item {\n display: inline-block;\n margin-right: 20px;\n\n &:last-child {\n margin-right: 0;\n }\n }\n\n .#{$rootBEM}__item__icon {\n @include icon--xxl;\n @include icon--circle--pad--xl;\n fill: #fff!important;\n }\n\n .#{$rootBEM}__item__icon--facebook {\n background-color: #3a5795;\n }\n\n .#{$rootBEM}__item__icon--twitter {\n background-color: #4099ff;\n }\n}\n\n@mixin section--alt {\n background: $light_gray;\n border-bottom: 1px solid #ddd;\n border-top: 1px solid #ddd;\n padding-top: 3rem;\n padding-bottom: 3rem;\n margin-top: 3rem;\n margin-bottom: 3rem;\n}\n\n#enp-quiz {\n .enp-screen-reader-text {\n @include screen-reader-text;\n }\n\n .enp-screen-reader-text:hover,\n .enp-screen-reader-text:active,\n .enp-screen-reader-text:focus {\n @include screen-reader-text--hover;\n }\n}\n\n@mixin focus--glow {\n outline-color: #4D90FE;\n outline-offset: -2px;\n outline-style: auto;\n outline-width: 5px;\n}\n\n#enp-quiz {\n\n .enp-quiz-message {\n @include container;\n max-width: 400px;\n background: #fff;\n border: 1px solid #eee;\n border-bottom: 1px solid #ccc;\n padding: 1rem 0.375rem;\n margin-top: 1.6rem;\n margin-bottom: 1.6rem;\n }\n\n .enp-quiz-message__title {\n @include small-uppercase;\n }\n\n .enp-message__list {\n @include ul-no-style;\n font-size: 1.1rem;\n margin-bottom: 0;\n }\n\n .enp-quiz-message--error {\n border-left: 6px solid $red;\n animation: slideInTop .3s $fastInEaseOut;\n }\n\n .enp-quiz-message__title--error {\n color: $dark_red;\n }\n\n .enp-quiz-message--success {\n border-left: 6px solid $green;\n color: $dark_green;\n }\n\n .enp-quiz-message__title--success {\n color: $dark_green;\n }\n\n}\n","@mixin clearfix {\n &:after {\n content: \"\";\n display: table;\n clear: both;\n }\n}\n\n@mixin container {\n max-width: 640px;\n margin-left: auto;\n margin-right: auto;\n padding-left: 20px;\n padding-right: 20px;\n @include clearfix;\n}\n\n@mixin flex {\n display: flex;\n}\n\n@mixin flex-center {\n @include flex;\n justify-content: center;\n align-content: center;\n align-items: center;\n}\n","//fonts\n$fontBody : Arial, monospace, helvetica, arial, sans-serif;\n$fontTitle : Arial, monospace, helvetica, arial, sans-serif;\n\n// // // colors\n$font : #1d1c25;\n$background: #FAF9FB;\n$title : #5D5E5F;\n\n// Blues\n$blue: #1E1C26;\n$dark_blue: #242f42;\n$light_blue: lighten($blue, 100);\n\n// Grays\n$light_gray: #F5F5F5;\n$really_light_gray: #F8F8F8;\n$gray: darken($light_gray, 2);\n$dark_gray: darken($gray, 5);\n$darker_gray: darken($dark_gray, 20);\n\n// Other colors\n$green: darken(#58C88F,10);\n$green: #60AAAD;\n$dark_green: darken($green, 8);\n$red: #bf5700;\n$dark_red: darken($red, 8);\n$fade_red: #C1893E;\n\n// Elements\n$link: $blue;\n$link_hover: darken($link, 10%);\n\n// animation\n$fastInEaseOut: cubic-bezier(0, 0, .3, 1);\n$easeInOut: cubic-bezier(0.15,0,.5,1);\n$easeInPauseFastOut: cubic-bezier(.28,.01,0,.69);\n\n$breakpoints: (\n \"small\" : 400px,\n \"medium\" : 700px,\n \"large\" : 1000px\n);\n\n// -----------------------------------------------------------------------------\n// Core\n// -----------------------------------------------------------------------------\n\n// Caching current breakpoint\n// Not meant to be manually edited\n$default-breakpoint: root;\n$current-breakpoint: $default-breakpoint;\n\n// The usual breakpoint mixin\n// Except it updates the $current-breakpoint variable\n// 1. If breakpoint name exists in map\n// 2. Update $current-breakpoint\n// 3. Open a media query\n// 4. Let the user dump content\n// 5. Then reset $current-breakpoint\n// 6. If breakpoint name doesn't exist in map, warn the user\n@mixin breakpoint($breakpoint) {\n $value: map-get($breakpoints, $breakpoint);\n\n @if $value != null { // 1\n $current-breakpoint: $breakpoint !global; // 2\n @media (min-width: $value) { @content; } // 3\n $current-breakpoint: $default-breakpoint !global; // 5\n }\n\n @else {\n @warn \"Invalid breakpoint `#{$breakpoint}`.\"; // 6\n }\n}\n\n// for only targeting a specific device\n// NOTE: DOESN'T SUPPORT THE @include placeholders!!!\n@mixin media($query) {\n $media_query: \"\";\n @if $query == max-small {\n $media_query: \"max-width: #{map-get($breakpoints, \"small\")}\";\n } @else if $query == only-medium {\n $media_query: \"min-width: #{map-get($breakpoints, \"medium\")}) and (max-width: #{(map-get($breakpoints, \"large\") - 1px)}\";\n } @else if $query == max-medium {\n $media_query: \"max-width: #{(map-get($breakpoints, \"medium\") - 1px)}\";\n } @else if $query == max-large {\n $media_query: \"max-width: #{(map-get($breakpoints, \"large\") - 1px)}\";\n } @else {\n // just use the number provided as a max width\n $media_query: \"max-width: #{$query}\";\n }\n\n @if variable-exists(media_query) {\n @media ($media_query) {\n @content;\n }\n }\n\n\n}\n","body {\n color: $font;\n font-family: $fontBody;\n font-size: 1em;\n line-height: 1.6;\n font-weight: 400;\n\n @include breakpoint(medium) {\n font-size: 1.3em;\n }\n}\n\n#enp-quiz {\n /* Headings */\n h1,h2,h3,h4,h5,h6 {\n font-family: $fontTitle;\n color: $font;\n clear: both;\n margin: 0 0 .2rem;\n font-weight: bold;\n line-height: 1.2em;\n }\n\n h1 {\n font-size: 2em;\n }\n\n h2 {\n font-size: 1.75em;\n }\n\n h3 {\n font-size: 1.475em;\n }\n\n h4 {\n font-size: 1.3em;\n }\n\n h5 {\n font-size: 1.125em;\n }\n\n h6 {\n font-size: 1em;\n }\n\n p+h1, ul+h1,\n p+h2, ul+h2,\n p+h3, ul+h3,\n p+h4, ul+h4,\n p+h5, ul+h5,\n p+h6, ul+h6 {\n margin-top: 1.8em;\n }\n\n /* Text elements */\n p {\n font-size: 0.85em;\n margin-bottom: 1.125em;\n font-weight: 300;\n }\n ul, ol {\n margin: 0 0 1.6em 1.25em;\n }\n ul {\n list-style: disc;\n }\n ol {\n list-style: decimal;\n }\n li > ul,\n li > ol {\n margin-bottom: 0;\n margin-left: 1.6em;\n }\n\n b, strong {\n font-weight: bold;\n }\n\n dfn, cite, em {\n font-family: georgia, times, serif;\n font-style: italic;\n }\n\n pre {\n background: #eee;\n font-family: \"Courier 10 Pitch\", Courier, monospace;\n font-size: .95em;\n line-height: 1.6;\n margin-bottom: 1.6em;\n padding: 1.6em;\n overflow: auto;\n max-width: 100%;\n }\n .code, code, kbd, tt, var {\n font: .7em Monaco, Consolas, \"Andale Mono\", \"DejaVu Sans Mono\", monospace;\n }\n\n figure {\n margin: 0;\n }\n\n img {\n height: auto; /* Make sure images are scaled correctly. */\n max-width: 100%; /* Adhere to container width. */\n }\n\n /* Links */\n a {\n color: $link;\n text-decoration: none;\n transition: color .2s;\n touch-action: manipulation; // remove 300ms delay for ie\n\n .enp-icon {\n fill: $link;\n }\n }\n\n a:hover,\n a:focus,\n a:active {\n color: $link_hover;\n\n .enp-icon {\n fill: $link_hover;\n }\n }\n\n button {\n &:focus {\n @include focus--glow;\n }\n }\n\n .enp-btn {\n @include btn;\n }\n\n\n .enp-btn--add {\n @include btn--dashed;\n width: 100%;\n }\n\n .enp-btn--disabled {\n @include disabled;\n }\n\n .enp-btn--enabled {\n animation: expand .6s;\n }\n\n .enp-icon {\n width: 24px;\n height: 24px;\n transition: all .2s;\n }\n\n .enp-page-title {\n font-size: 1.6rem;\n }\n}\n\n","#enp-quiz fieldset {\n border: none;\n margin: 0;\n padding: 0;\n}\n\n// enter the root BEM class and this will output the correct CSS for you\n@mixin radio-block($rootBEM) {\n .#{$rootBEM}__legend {\n @include radio-block__legend ;\n }\n\n .#{$rootBEM}__input {\n @include radio-block__input ;\n }\n\n .#{$rootBEM}__label {\n @include radio-block__label ;\n }\n\n .#{$rootBEM}__input:checked + .#{$rootBEM}__label {\n @include radio-block__label--checked ;\n }\n\n .#{$rootBEM}__input:focus + .#{$rootBEM}__label {\n @include radio-block__label--focus ;\n }\n}\n\n@mixin radio-inline($rootBEM) {\n .#{$rootBEM}__legend {\n @include radio-inline__legend ;\n }\n\n .#{$rootBEM}__input {\n @include radio-inline__input ;\n }\n\n .#{$rootBEM}__label {\n @include radio-inline__label ;\n }\n\n .#{$rootBEM}__input:checked + .#{$rootBEM}__label {\n @include radio-inline__label--checked ;\n }\n\n .#{$rootBEM}__input:focus + .#{$rootBEM}__label {\n @include radio-inline__label--focus ;\n }\n}\n\n@mixin label {\n display: block;\n color: lighten($font, 10);\n font-weight: normal;\n font-size: 0.85rem;\n text-transform: uppercase;\n}\n\n.enp-label {\n @include label;\n}\n\n@mixin legend {\n @include label;\n padding-top: 1.6rem;\n margin-bottom: 0.2rem;\n border: none;\n}\n\n.enp-legend {\n @include legend;\n}\n\n@mixin label--bold {\n @include label;\n font-weight: 500;\n}\n\n@mixin legend--bold {\n @include label--bold;\n}\n\n@mixin input {\n font-size: 1rem;\n font-family: $fontBody;\n padding: 0.8rem 0.5rem;\n background: #fff;\n border: 1px solid #aaa;\n border-radius: 3px;\n width: 20rem;\n max-width: 100%;\n margin-bottom: 1.2rem;\n\n @include breakpoint(medium) {\n padding: 0.8rem;\n }\n}\n\n@mixin input--large {\n @include input;\n padding: 1rem 1.2rem;\n font-size: 1.3rem;\n}\n\n@mixin input--xl {\n @include input;\n font-weight: bold;\n font-size: 1.6rem;\n margin-bottom: 1rem;\n\n &::placeholder {\n font-weight: bold;\n }\n}\n\n.enp-input {\n @include input;\n}\n\n.enp-input::placeholder,\n.enp-textarea::placeholder {\n font-family: $fontBody;\n font-weight: 300;\n color: lighten($font, 40);\n}\n\n@mixin textarea {\n @include input;\n line-height: 1.5;\n width: 100%;\n\n &:focus {\n @include focus--glow;\n }\n}\n\n@mixin radio-block__legend {\n @include legend;\n margin-bottom: 0.6rem;\n}\n\n@mixin radio-block__input {\n position: absolute;\n z-index: 9;\n margin-left: 9px;\n}\n\n@mixin radio-block__label {\n text-transform: capitalize;\n background: #f2f2f2;\n display: block;\n padding: 5px 10px 5px 39px;\n position: relative;\n top: -6px;\n box-shadow: inset -1px -1px 0 rgba(0,0,0,.1), inset 30px 0px 0 rgba(255,255,255,.7), inset 31px 0px 0 rgba(0,0,0,.1);\n}\n\n@mixin radio-block__label--checked {\n background: $green;\n color: #fff;\n text-shadow: 0 0 1px rgba(0,0,0,.7);\n}\n\n@mixin radio-block__label--focus {\n z-index: 8;\n @include focus--glow ;\n}\n\n@mixin radio-inline__legend {\n @include legend;\n}\n\n@mixin radio-inline__input {\n @include screen-reader-text;\n}\n\n@mixin radio-inline__label {\n text-transform: capitalize;\n display: inline-block;\n padding: 0.2rem 0.5rem;\n border-radius: 3px;\n}\n\n@mixin radio-inline__label--checked {\n @include radio-block__label--checked ;\n}\n\n@mixin radio-inline__label--focus {\n @include radio-block__label--focus ;\n}\n","@keyframes removeAnswers {\n 0% {\n opacity: 1;\n height: auto;\n transform: translate3d(0, 0, 0);\n }\n 10% {\n opacity: 1;\n transform: translate3d(0, 0, 0);\n }\n 100% {\n padding: 0;\n opacity: 0;\n display: none;\n height: 0;\n z-index: -1;\n transform: translate3d(-150px, 0, 0);\n }\n}\n\n@keyframes removeQuestion {\n 0% {\n opacity: 1;\n transform: translateX(0);\n }\n 15% {\n opacity: 1;\n transform: translateX(0);\n }\n 100% {\n opacity: 0;\n transform: translateX(-150px);\n }\n}\n\n@keyframes showNextQuestion {\n 0% {\n opacity: 0;\n transform: translateX(120px);\n }\n\n 100% {\n opacity: 1;\n transform: translateX(0);\n }\n}\n\n@keyframes slideInTop {\n 0% {\n opacity: 0;\n height: auto;\n transform: translate3d(0, -20px, 0);\n }\n 100% {\n opacity: 1;\n height: auto;\n transform: translate3d(0, 0, 0);\n }\n}\n\n@keyframes slideInBottom {\n 0% {\n opacity: 0;\n transform: translate3d(0, 20px, 0);\n }\n 100% {\n opacity: 1;\n transform: translate3d(0, 0, 0);\n }\n}\n\n@keyframes flashRedShadow {\n 0% {\n background: $red;\n }\n 100% {\n background: #fff;\n }\n}\n\n\n@keyframes errorContainer {\n 0% {\n //background-color: #fff;\n }\n 100% {\n background-color: rgba($red, .2);\n }\n}\n\n@keyframes pop {\n 0% {\n width: 0;\n opacity: 1;\n }\n 30% {\n width: 100%;\n }\n 80% {\n opacity: 1;\n width: 100%;\n }\n 100% {\n width: 40%;\n opacity: 0;\n }\n}\n\n\n.spinner {\n margin: 0 auto;\n width: 70px;\n text-align: center;\n}\n\n.spinner > div {\n width: 18px;\n height: 18px;\n background-color: #333;\n\n border-radius: 100%;\n display: inline-block;\n -webkit-animation: sk-bouncedelay 1.4s infinite ease-in-out both;\n animation: sk-bouncedelay 1.4s infinite ease-in-out both;\n}\n\n.spinner .bounce1 {\n -webkit-animation-delay: -0.32s;\n animation-delay: -0.32s;\n}\n\n.spinner .bounce2 {\n -webkit-animation-delay: -0.16s;\n animation-delay: -0.16s;\n}\n\n@-webkit-keyframes sk-bouncedelay {\n 0%, 80%, 100% { -webkit-transform: scale(0) }\n 40% { -webkit-transform: scale(1.0) }\n}\n\n@keyframes sk-bouncedelay {\n 0%, 80%, 100% {\n -webkit-transform: scale(0);\n transform: scale(0);\n } 40% {\n -webkit-transform: scale(1.0);\n transform: scale(1.0);\n }\n}\n"," // -------------------------//\n // Taking a Quiz Styles //\n// -------------------------//\n\n#enp-quiz {\n background: transparent;\n\n .enp-quiz__container {\n position: relative;\n padding: 0;\n background: #fff;\n border: 1px solid #ddd;\n }\n\n .enp-quiz__header {\n position: relative;\n border-bottom: 1px solid #ddd;\n }\n\n .enp-quiz__title {\n @include small-uppercase;\n font-weight: 500;\n letter-spacing: 0.01rem;\n padding: 0.6rem 1rem;\n }\n\n .enp-quiz__title--hide {\n display: none;\n }\n\n .enp-quiz__progress {\n position: absolute;\n bottom: 0;\n left: 0;\n right: 0;\n height: 0;\n }\n\n .enp-quiz__progress__bar {\n position: relative;\n // this will be calculated on load\n width: 0;\n // to prevent 30 question quizzes from having a width of 3.33% and not being wide enough to display the question count\n min-width: 2rem;\n height: 3px;\n background: $green;\n transition: all .5s $fastInEaseOut;\n }\n\n .enp-quiz__progress__bar__question-count {\n position: absolute;\n right: 1rem;\n bottom: 0.7rem;\n font-size: .8rem;\n }\n\n .enp-question__container {\n display: block;\n min-height: 92vh;\n }\n\n .enp-question__form {\n //transition: all .3s $fastInEaseOut;\n @include container;\n overflow: hidden;\n color: $font;\n padding-top: 2rem;\n padding-bottom: 2.6rem;\n\n @include breakpoint(medium) {\n padding: 2.6rem 3rem;\n }\n }\n\n .enp-question__question {\n font-size: 1.8rem;\n font-weight: bold;\n line-height: 1.2;\n margin-bottom: 0.2rem;\n padding-bottom: 0.1rem;\n position: relative;\n box-sizing: border-box; /* IE9-11 & Edge 12-13 */\n display: table; /* IE8-11 */\n max-width: 100%; /* Patch for IE9-11 & Edge 12-13 */\n white-space: normal; /* IE8-11 */\n\n @include breakpoint(small) {\n font-size: 2rem;\n }\n\n &:after {\n content: '';\n position: absolute;\n height: 2px;\n background-color: #eee;\n background-color: rgba(0,0,0,.2);\n margin: auto;\n width: 0;\n bottom: 0;\n left: 0;\n right: 0;\n }\n\n &:focus {\n &:after {\n animation: pop .8s $fastInEaseOut;\n }\n\n }\n }\n\n .enp-question-image {\n margin-bottom: 0.4rem;\n }\n\n .enp-question__helper {\n font-size: 1rem;\n }\n\n .enp-option__input {\n @include screen-reader-text;\n\n &:checked + .enp-option__label:before {\n background-color: $green;\n }\n\n &:focus + .enp-option__label {\n color: $font;\n background: $light_gray;\n }\n }\n\n .enp-option__label {\n display: block;\n position: relative;\n width: 100%;\n text-align: left;\n text-transform: none;\n padding: 0.8rem 0rem 0.8rem 40px;\n font-size: 1rem;\n font-weight: 400;\n line-height: 1.6;\n border: none;\n border-bottom: 1px solid #eee;\n border-bottom: 1px solid rgba(0,0,0,.1);\n background: none;\n color: $font;\n transition: color .2s $fastInEaseOut, background .2s $fastInEaseOut;\n\n &:before {\n content: '';\n position: absolute;\n top: 0.925rem;\n left: 10px;\n width: 20px;\n height: 20px;\n border-radius: 50%;\n border: 2px solid $green;\n padding: 3px;\n background-clip: content-box; /* support: IE9+ */\n background-color: transparent;\n transition: all .2s;\n }\n\n &:last-of-type {\n border-bottom: none;\n }\n }\n\n .enp-question__container--unanswered {\n .enp-option__label {\n\n &:hover {\n cursor: pointer;\n\n &:before {\n background-color: $green;\n }\n }\n }\n }\n\n // if keyboard user (or JS didn't submit the question).\n // show the submit button (they can also hit enter to submit tho)\n @include btn--icon--hover-circle(enp-question__submit);\n\n .enp-question__submit {\n\n &:hover,\n &:focus {\n padding-right: 4em;\n }\n\n .enp-question__submit__icon {\n right: 0.8em;\n }\n }\n\n .enp-question__fieldset--mc .enp-question__submit {\n opacity: 0;\n height: 0;\n padding-top: 0;\n padding-bottom: 0;\n }\n\n .enp-question__fieldset--mc .enp-option__input:checked ~ .enp-options__submit {\n margin-top: 0.4rem;\n padding-top: 1em;\n padding-bottom: 0.95em;\n height: auto;\n opacity: 1;\n animation: .3s slideInTop $fastInEaseOut forwards;\n }\n\n .enp-question__fieldset--slider .enp-options__submit {\n margin-top: 1.4rem;\n }\n // ----------------------//\n // Answer Explanation //\n // ----------------------//\n\n .enp-question__container--explanation {\n background-color: $background;\n\n .enp-question__submit {\n display: none;\n }\n\n .enp-option__label {\n margin-bottom: 5px;\n border-bottom: none;\n }\n\n .enp-option__input--correct-clicked + .enp-option__label {\n\n &:before {\n background-color: $green;\n }\n\n }\n\n .enp-option__input--correct + .enp-option__label {\n box-shadow: inset 4px 0 0 $green;\n background-color: lighten($green, 47);\n }\n\n .enp-option__input--incorrect-clicked + .enp-option__label {\n background-color: #fff;\n box-shadow: inset 4px 0 0 $red;\n\n &:before {\n border: 2px solid $red;\n background-color: $red;\n }\n }\n }\n\n .enp-option__input--slide-hide + .enp-option__label{\n margin: 0;\n height: 0;\n animation: removeAnswers 0.6s $easeInPauseFastOut forwards;\n }\n\n .enp-explanation {\n background: #fff;\n padding: 1.6rem 1.6rem 1.5rem;\n }\n\n .enp-question__fieldset--slider .enp-explanation {\n animation: slideInBottom .3s $fastInEaseOut forwards;\n }\n\n .enp-explanation--correct {\n box-shadow: inset 4px 0 0 $green;\n\n // set our text for after the percentage\n .enp-explanation__percentage:after {\n content: '% Got This Right';\n }\n }\n\n .enp-explanation--incorrect {\n box-shadow: inset 4px 0 0 $red;\n\n // set our text for after the percentage\n .enp-explanation__percentage:after {\n content: '% Got This Wrong';\n }\n\n }\n\n .enp-explanation__title {\n @include small-uppercase;\n }\n\n .enp-explanation__percentage {\n font-size: .75rem;\n font-weight: 500;\n color: #565656;\n margin-left: 4px;\n\n &:after {\n content: '%';\n }\n }\n\n .enp-explanation--correct .enp-explanation__title {\n color: darken($green, 10);\n }\n\n .enp-explanation--incorrect .enp-explanation__title {\n color: darken($red, 10);\n }\n\n .enp-explanation__explanation {\n font-weight: 400;\n margin-top: 0.4rem;\n }\n\n @include btn--icon--hover-circle(enp-next-step);\n .enp-next-step {\n @include btn--ghost;\n display: inline-block;\n width: 100%;\n padding: .8em 2.4em .8em 1.4em;\n position: relative;\n\n\n .enp-next-step__icon {\n fill: $link;\n transition: all .3s $fastInEaseOut;\n }\n\n &:hover {\n .enp-next-step__icon {\n fill: #fff;\n background: $link;\n margin-right: 0;\n transform: translate3d(1em, 0, 0);\n margin-right: 1em;\n }\n }\n }\n\n\n //\n // Next Question\n //\n\n\n .enp-question--on-deck {\n transform: translateX(200px);\n opacity: 0;\n z-index: -1;\n top: 0;\n position: absolute;\n }\n\n .enp-question--show {\n animation: showNextQuestion .6s $fastInEaseOut forwards;\n }\n\n .enp-question--remove {\n position: absolute;\n animation: removeQuestion .15s $fastInEaseOut forwards;\n }\n\n // ----------------------//\n // Quiz Results //\n // ----------------------//\n\n .enp-results__score {\n position: relative;\n text-align: center;\n border-radius: 50%;\n margin: 0 auto 1rem;\n display: block;\n height: 200px;\n width: 200px;\n }\n\n .enp-results__score__title {\n color: $font;\n font-size: 5rem;\n line-height: 1;\n font-weight: 400;\n position: absolute;\n top: 50%;\n left: 50%;\n transform: translate(-50%, -50%);\n margin: 0;\n }\n\n .enp-results__score__title__percentage {\n font-size: 1.3rem;\n position: absolute;\n top: 1rem;\n font-weight: 300;\n }\n\n .enp-results__encouragement {\n font-size: 1.8rem;\n font-weight: 500;\n text-align: center;\n line-height: 1.2;\n margin: 0.2rem;\n }\n\n .enp-results__description {\n max-width: 24rem;\n margin: 0 auto 1.6rem;\n }\n\n .enp-results__score__circle {\n transform: rotate(-90deg);\n }\n\n #enp-results__score__circle__path,\n .enp-results__score__circle__bg {\n stroke: #ddd;\n stroke-width: 4px;\n }\n\n #enp-results__score__circle__path {\n stroke: $green;\n }\n\n .enp-results__score__circle__setOffset {\n transition: stroke-dashoffset 1.2s $fastInEaseOut;\n }\n\n .enp-results__score__circle__resetOffset {\n stroke-dashoffset: 565.48;\n }\n\n .enp-results__share-title {\n margin: 2.4rem 0 1rem;\n }\n\n .enp-results__share-title {\n @include small-uppercase;\n text-align: center;\n }\n\n @include share_icons(enp-results__share);\n\n .enp-quiz-restart__container {\n text-align: center;\n }\n\n // error state\n .enp-question__container--error {\n padding: 1rem 10px;\n //background-color: rgba($red, .2);\n animation: errorContainer .3s $fastInEaseOut forwards;\n }\n\n .enp-callout {\n font-size: 10px;\n font-size: 0.8rem;\n text-align: right;\n padding: 0.4rem;\n }\n}\n","#enp-quiz {\n\n .enp-slider {\n margin-bottom: 1.6rem;\n }\n\n .enp-slider-input__container {\n display: flex;\n align-items: center;\n justify-content: center;\n margin: 1.6rem auto;\n position: relative;\n }\n\n .enp-slider-input__label {\n @include label;\n }\n\n .enp-slider-input__prefix,\n .enp-slider-input__suffix {\n font-size: 1rem;\n }\n\n .enp-slider-input__prefix {\n margin-right: .2rem;\n white-space: pre;\n }\n\n .enp-slider-input__suffix {\n margin-left: .2rem;\n white-space: pre;\n }\n\n .enp-slider-input__input {\n @include input;\n margin-bottom: 0;\n padding: .75rem;\n width: auto;\n transition: all .25s $fastInEaseOut;\n }\n\n .enp-slider-input__input--incorrect {\n color: $red;\n }\n\n .enp-slider-input__input--correct {\n color: $dark_green;\n }\n\n .enp-slider-input__input--invalid-animation {\n box-shadow: 0 0 2px 1px $fade_red;\n }\n\n .enp-slider_input__range-helper {\n position: absolute;\n bottom: -1.2rem;\n font-size: 0.8rem;\n }\n\n .enp-slider_input__range-helper--low {\n left: 0;\n }\n\n .enp-slider_input__range-helper--high {\n right: 0;\n }\n\n .enp-slider-input__range-helper__number {\n position: relative;\n color: $dark_gray;\n }\n\n .enp-slider_input__range-helper__number--low {\n\n }\n\n .enp-slider_input__range-helper__number--high {\n\n }\n\n .ui-slider-range-show-correct__tooltip-container {\n position: relative;\n }\n\n .ui-slider-range-show-correct__tooltip {\n position: absolute;\n top: -0.4rem;\n margin-left: -0.55rem;\n height: 1rem;\n width: 1.1rem;\n height: 1.1rem;\n border: 2px solid $green;\n background-color: #fff;\n border-radius: 50%;\n z-index: 9999;\n }\n\n .ui-slider-range-show-correct__tooltip--low {\n left: 0;\n }\n\n .ui-slider-range-show-correct__tooltip--high {\n right: -0.55rem;\n }\n\n .ui-slider-range-show-correct__tooltip__text {\n position: relative;\n color: darken($green, 15);\n top: -1.35rem;\n font-size: .825rem;\n min-width: 100%;\n display: inline-block;\n text-align: center;\n text-shadow: 0 1px 0 #fff;\n }\n\n .ui-slider-range-show-correct__tooltip__text--low {\n\n }\n\n .ui-slider-range-show-correct__tooltip__text--high {\n\n }\n\n .ui-slider-range-show-correct__tooltip__text--low-center {\n //left: 0; // not perfectly centered for huge numbers, but is for small numbers\n }\n\n // JQUERY SLIDER\n .enp-slider {\n\t\tposition: relative;\n\t\ttext-align: left;\n\t\tbackground: #ddd;\n\n\t\t/* Layout helpers\n\t\t----------------------------------*/\n\t\t.ui-helper-hidden {\n\t\t\tdisplay: none;\n\t\t}\n\t\t.ui-helper-hidden-accessible {\n\t\t\tborder: 0;\n\t\t\tclip: rect(0 0 0 0);\n\t\t\theight: 1px;\n\t\t\tmargin: -1px;\n\t\t\toverflow: hidden;\n\t\t\tpadding: 0;\n\t\t\tposition: absolute;\n\t\t\twidth: 1px;\n\t\t}\n\t\t.ui-helper-reset {\n\t\t\tmargin: 0;\n\t\t\tpadding: 0;\n\t\t\tborder: 0;\n\t\t\toutline: 0;\n\t\t\tline-height: 1.3;\n\t\t\ttext-decoration: none;\n\t\t\tfont-size: 100%;\n\t\t\tlist-style: none;\n\t\t}\n\t\t.ui-helper-clearfix:before,\n\t\t.ui-helper-clearfix:after {\n\t\t\tcontent: \"\";\n\t\t\tdisplay: table;\n\t\t\tborder-collapse: collapse;\n\t\t}\n\t\t.ui-helper-clearfix:after {\n\t\t\tclear: both;\n\t\t}\n\t\t.ui-helper-clearfix {\n\t\t\tmin-height: 0; /* support: IE7 */\n\t\t}\n\t\t.ui-helper-zfix {\n\t\t\twidth: 100%;\n\t\t\theight: 100%;\n\t\t\ttop: 0;\n\t\t\tleft: 0;\n\t\t\tposition: absolute;\n\t\t\topacity: 0;\n\t\t\tfilter:alpha(opacity=0); /* support: IE8 */\n\t\t}\n\n\t\t.ui-front {\n\t\t\tz-index: 100;\n\t\t}\n\n\n\t\t/* Interaction Cues\n\t\t----------------------------------*/\n\t\t.ui-state-disabled {\n\t\t\tcursor: default !important;\n\t\t}\n\n\n\t\t/* Icons\n\t\t----------------------------------*/\n\n\t\t/* states and images */\n\t\t.ui-icon {\n\t\t\tdisplay: block;\n\t\t\ttext-indent: -99999px;\n\t\t\toverflow: hidden;\n\t\t\tbackground-repeat: no-repeat;\n\t\t}\n\n\n\t\t/* Misc visuals\n\t\t----------------------------------*/\n\n\t\t/* Overlays */\n\t\t.ui-widget-overlay {\n\t\t\tposition: fixed;\n\t\t\ttop: 0;\n\t\t\tleft: 0;\n\t\t\twidth: 100%;\n\t\t\theight: 100%;\n\t\t}\n\n\t\t.ui-slider-handle {\n\t\t\tbackground: #fff;\n\t\t\tborder-radius: 50%;\n\t\t\tborder: 1px solid #aaa;\n\t\t\tposition: absolute;\n\t\t\tz-index: 2;\n\t\t\twidth: 1.2rem;\n\t\t\theight: 1.2rem;\n top: -.4rem;\n\t\t\tmargin-left: -.6rem;\n\t\t\tcursor: default;\n\t\t\t-ms-touch-action: none;\n\t\t\ttouch-action: none;\n\t\t\ttransition: opacity 0.2s $fastInEaseOut, height .18s $fastInEaseOut, width .18s $fastInEaseOut, transform 0.18s $fastInEaseOut;\n\n @include media(max-medium) {\n width: 2rem;\n \t\t\theight: 2rem;\n top: -.85rem;\n margin-left: -1rem;\n transform: rotate(225deg);\n }\n\n\t\t\t&:focus {\n\t\t\t\toutline: none;\n\t\t\t\tbox-shadow: 0 0 3px 1px #4D90FE;\n\t\t\t}\n\n &.ui-state-active {\n @include media(max-medium) {\n width: 2.2rem;\n height: 2.2rem;\n border-top-left-radius: 0;\n transform: translate3d(-0.2rem, -0.8rem, 0) rotate(225deg);\n }\n\n }\n\n\t\t}\n\n .ui-slider-handle--correct,\n\t\t.ui-slider-handle--incorrect {\n width: 1.1rem;\n\t\t\theight: 1.1rem;\n top: -.4rem;\n margin-left: -.55rem;\n }\n\n .ui-slider-handle--incorrect {\n z-index: 1;\n\t\t\tborder: 2px solid $red;\n\t\t}\n\n .ui-slider-handle--correct {\n border: 2px solid $green;\n z-index: 99999;\n }\n\n\t\t.ui-slider-range {\n\t\t\tposition: absolute;\n\t\t\tz-index: 1;\n\t\t\tfont-size: .7rem;\n\t\t\tdisplay: block;\n\t\t\tborder: 0;\n\t\t\tbackground-position: 0 0;\n\t\t\ttop: 0;\n\t\t\theight: 100%;\n\t\t}\n\n .ui-slider-range-show-correct {\n background: $green;\n z-index: 9;\n }\n\n\t\t.ui-slider-range-min {\n\t\t\tleft: 0;\n\t\t\tbackground: $green;\n\t\t}\n\n\t\t.ui-slider-range-max {\n\t\t\tright: 0;\n\t\t}\n\n\t\t/* support: IE8 - See #6727 */\n\t\t&.ui-state-disabled .ui-slider-handle,\n\t\t&.ui-state-disabled .ui-slider-range {\n\t\t\tfilter: inherit;\n\t\t}\n\t}\n\n\t.ui-slider-horizontal {\n\t\theight: .3rem;\n\t}\n\n\t.enp-question__answered {\n\t\t.enp-slider {\n\t\t\tbackground: #bbb;\n\t\t}\n\n\t\t.ui-slider-range-min {\n\t\t\tbackground: #fff;\n\t\t}\n\n\t}\n\n}\n"]} \ No newline at end of file diff --git a/public/quiz-take/css/sass/_quiz.scss b/public/quiz-take/css/sass/_quiz.scss index 17a91f29..8725a50d 100644 --- a/public/quiz-take/css/sass/_quiz.scss +++ b/public/quiz-take/css/sass/_quiz.scss @@ -56,6 +56,7 @@ .enp-question__container { display: block; + min-height: 92vh; } .enp-question__form { @@ -219,8 +220,7 @@ // ----------------------// .enp-question__container--explanation { - background-color: #eee; - background-color: rgba(0, 0, 0, 0.15); + background-color: $background; .enp-question__submit { display: none; diff --git a/public/quiz-take/css/sass/_variables.scss b/public/quiz-take/css/sass/_variables.scss index 7a62844f..de31173c 100644 --- a/public/quiz-take/css/sass/_variables.scss +++ b/public/quiz-take/css/sass/_variables.scss @@ -1,24 +1,36 @@ //fonts -$fontBody : "tablet-gothic", "helvetica neue", helvetica, arial, sans-serif; -$fontTitle : "tablet-gothic", "helvetica neue", helvetica, arial, sans-serif; -//colors -$font : #444; +$fontBody : Arial, monospace, helvetica, arial, sans-serif; +$fontTitle : Arial, monospace, helvetica, arial, sans-serif; + +// // // colors +$font : #1d1c25; +$background: #FAF9FB; $title : #5D5E5F; -$blue: #333f48; + +// Blues +$blue: #1E1C26; $dark_blue: #242f42; -$light_blue: #EAF4FF; +$light_blue: lighten($blue, 100); + +// Grays $light_gray: #F5F5F5; -$gray: #bbb; -$dark_gray: #666; -$darker_gray: #444; $really_light_gray: #F8F8F8; -$link : $blue; +$gray: darken($light_gray, 2); +$dark_gray: darken($gray, 5); +$darker_gray: darken($dark_gray, 20); + +// Other colors $green: darken(#58C88F,10); +$green: #60AAAD; $dark_green: darken($green, 8); -$red: #f14021; -$dark_red: darken(#f14021, 8); -$fade_red: #E97763; +$red: #bf5700; +$dark_red: darken($red, 8); +$fade_red: #C1893E; + +// Elements +$link: $blue; $link_hover: darken($link, 10%); + // animation $fastInEaseOut: cubic-bezier(0, 0, .3, 1); $easeInOut: cubic-bezier(0.15,0,.5,1); From 22f6372f528d6e1d0eef7bc1f5ce8ea8e553fb49 Mon Sep 17 00:00:00 2001 From: Luke Carl Hartman Date: Wed, 27 Apr 2022 13:31:41 -0700 Subject: [PATCH 05/32] css map update --- public/quiz-create/css/enp_quiz-create.min.css.map | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/public/quiz-create/css/enp_quiz-create.min.css.map b/public/quiz-create/css/enp_quiz-create.min.css.map index bda7a63a..55761bf3 100644 --- a/public/quiz-create/css/enp_quiz-create.min.css.map +++ b/public/quiz-create/css/enp_quiz-create.min.css.map @@ -1 +1 @@ -{"version":3,"sources":["_setup.scss","_utilities.scss","_variables.scss","_structure.scss","_typography.scss","_animations.scss","_base.scss","_forms.scss","_quiz-create.scss","_quiz-preview.scss","_quiz-publish.scss","_ab-create.scss","_dashboard.scss","_breadcrumbs.scss","_quiz-results.scss","_ab-results.scss","../../../quiz-take/css/sass/_slider.scss"],"names":[],"mappings":"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","file":"enp_quiz-create.min.css","sourcesContent":["html {\n font-size: 16px!important; // set our rem value reference\n}\n\nhtml #enp-quiz {\n box-sizing: border-box;\n}\n\nbody #enp-quiz {\n background: #fff;\n overflow: hidden;\n}\n\n#enp-quiz {\n *, *:before, *:after {\n box-sizing: inherit;\n }\n\n ul, ol {\n margin: 0 0 1.6rem 1.25rem;\n padding: 0;\n }\n\n textarea {\n margin-bottom: 1rem;\n }\n\n button, input[type=\"button\"], input[type=\"reset\"], input[type=\"submit\"] {\n border: none;\n &:active,\n &:focus,\n &:hover {\n border: none;\n }\n }\n\n iframe {\n border: none;\n }\n}\n","@mixin focus--glow {\n outline-color: #4D90FE;\n outline-offset: -2px;\n outline-style: auto;\n outline-width: 5px;\n}\n\n@mixin disabled {\n opacity: 0.65;\n cursor: default;\n}\n\n@mixin btn {\n text-align: center;\n border: none;\n border-radius: 3px;\n padding: .85em 1.4em .75em;\n font-size: 15px;\n font-weight: 400;\n letter-spacing: .05em;\n color: #fff;\n box-shadow: inset 0 -2px 0 rgba(0,0,0,.2);\n background: $link;\n cursor: pointer;\n text-transform: uppercase;\n transition: all .2s;\n line-height: 1.6;\n\n &:focus,\n &:hover {\n color: #fff;\n box-shadow: none;\n background: $link_hover;\n }\n\n &:active {\n color: #fff;\n box-shadow: inset 0 2px 0 rgba(0,0,0,.1);\n background: lighten($blue, 20);\n }\n\n &:focus {\n @include focus--glow;\n }\n\n &:disabled,\n &:disabled:focus,\n &:disabled:hover {\n background: $link;\n cursor: default;\n opacity: .5;\n\n\n }\n}\n\n@mixin btn--reset {\n border: none;\n background: none;\n box-shadow: none;\n padding: 0;\n margin: 0;\n}\n\n@mixin btn--submit {\n @include btn;\n}\n\n@mixin btn--ghost {\n @include btn;\n border: 2px solid $link;\n background: transparent;\n color: $link;\n box-shadow: none;\n\n &:focus,\n &:hover {\n background: transparent;\n border: 2px solid $link_hover;\n color: $link_hover;\n }\n}\n\n@mixin box-shadow {\n box-shadow: 0 2px 2px rgba(0,0,0,.2);\n}\n\n@mixin btn--dashed {\n @include btn;\n border: 1px dashed $dark_gray;\n background: none;\n color: #545454;\n box-shadow: none;\n\n &:hover,\n &:focus {\n border: 1px dashed $darker_gray;\n color: $darker_gray;\n background: rgba(255,255,255,.9);\n }\n}\n\n@mixin btn--dashed--light {\n @include btn--dashed;\n border: 2px dashed $gray;\n color: $dark_gray;\n transition: all .2s;\n\n &:hover,\n &:focus {\n color: $darker_gray;\n border: 2px dashed #999;\n }\n}\n\n@mixin btn--dashed--light--alt-bg {\n @include btn--dashed--light ;\n background: $light_gray;\n}\n\n@mixin btn--small {\n font-size: 13px;\n}\n\n@mixin btn--thin {\n padding: 0.4em 1em;\n}\n\n@mixin btn--icon {\n @include btn;\n padding: .75em 0.8em .7em 1.4em;\n}\n\n@mixin btn--icon__icon {\n @include icon--white;\n @include icon--xl;\n position: relative;\n top: 4px;\n}\n\n/*\n* @usage: @include btn--icon(BEM-root-class);\n* Button with icon with white circular background.\n* --------------\n* | BTN TEXT > |\n* --------------\n* @param $rootBEM: root class name that will be extended\n\n@mixin btn--icon($rootBEM) {\n .(#){$rootBEM} {\n @include btn--icon;\n }\n\n .(#){$rootBEM}__icon {\n @include btn--icon__icon ;\n }\n}\n*/\n\n@mixin btn--icon--icon-circle {\n @include btn;\n padding: .65em 1.2em .85em 1.4em;\n}\n\n// use when the icon is larger and on the right\n@mixin btn--icon__icon--circle {\n @include icon--circle;\n @include icon--white-bg;\n @include icon--normal;\n margin-left: 0.5em;\n position: relative;\n top: 0.15rem;\n}\n\n@mixin btn--icon__icon--circle--hover {\n @include icon--white-bg--hover;\n}\n\n/*\n* @usage: @include btn--icon--circle(BEM-root-class);\n* Button with icon with white circular background.\n* ---------------\n* | BTN TEXT (>) |\n* ---------------\n* @param $rootBEM: root class name that will be extended\n*/\n@mixin btn--icon--circle($rootBEM) {\n .#{$rootBEM} {\n @include btn--icon--icon-circle;\n }\n\n .#{$rootBEM}__icon {\n @include btn--icon__icon--circle ;\n\n\n &:hover {\n @include btn--icon__icon--circle--hover ;\n }\n }\n}\n\n/*\n* @usage: @include btn--icon--hover-circle(BEM-root-class);\n* Button with icon. Hovering/focusing button moves\n* the icon to right and fades in a white circular background\n* -------------- ----------------\n* | BTN TEXT > | --hover/focus--> | BTN TEXT (>) |\n* -------------- ----------------\n* @param $rootBEM: root class name that will be extended\n*/\n@mixin btn--icon--hover-circle($rootBEM) {\n .#{$rootBEM} {\n @include btn--icon--icon-circle;\n padding-right: 0.8em;\n }\n\n .#{$rootBEM}__icon {\n @include btn--icon__icon--circle ;\n margin-left: 0;\n width: 1.6em;\n height: 1.6em;\n background: transparent;\n fill: #fff;\n transform: translate3d(0, 0, 0);\n transition: all .3s ease-in-out;\n }\n\n .#{$rootBEM}:hover .#{$rootBEM}__icon {\n @include btn--icon__icon--circle--hover ;\n transform: translate3d(1em, 0, 0);\n margin-right: 1em;\n }\n\n\n}\n\n// use on small icons and placed on the left\n@mixin btn--icon__icon--circle--small {\n @include icon--circle--small;\n margin-right: 5px;\n}\n\n\n// use this to match the icon to the inline font-size\n@mixin icon--inline {\n width: 1em;\n height: 1em;\n position: relative;\n top: .125em;\n}\n\n@mixin icon--small {\n width: 1rem;\n height: 1rem;\n}\n\n@mixin icon--normal {\n width: 1.2rem;\n height: 1.2rem;\n}\n\n@mixin icon--large {\n width: 1.5rem;\n height: 1.5rem;\n}\n\n@mixin icon--xl {\n width: 1.8rem;\n height: 1.8rem;\n}\n\n@mixin icon--xxl {\n width: 2.4rem;\n height: 2.4rem;\n}\n\n@mixin icon--xxxl {\n width: 2.8rem;\n height: 2.8rem;\n}\n\n@mixin icon--circle {\n border-radius: 50%;\n background: $blue;\n fill: #fff;\n}\n\n@mixin border-radius {\n border-radius: 3px;\n}\n\n@mixin icon--circle--pad {\n @include icon--circle ;\n padding: 0.05em;\n\n @include breakpoint(medium) {\n padding: 0.15em;\n }\n}\n\n@mixin icon--circle--pad--xl {\n @include icon--circle ;\n padding: 0.6rem;\n}\n\n@mixin icon--circle--small {\n @include icon--small;\n @include icon--circle;\n padding: 0.02rem;\n}\n\n@mixin icon--white {\n fill: #fff;\n}\n\n@mixin icon--white-bg {\n background: #fff;\n fill: $link;\n}\n\n@mixin icon--white-bg--hover {\n background: #fff;\n fill: $link_hover;\n}\n\n@mixin icon--gray-bg {\n background: $dark_gray;\n fill: $light_gray;\n}\n\n@mixin icon--gray-bg--hover {\n fill: #fff;\n background: $darker_gray;\n}\n\n@mixin small-uppercase {\n font-size: 1rem;\n text-transform: uppercase;\n}\n\n@mixin hint {\n font-size: .7rem;\n font-weight: 300;\n color: #565656;\n}\n\n@mixin green {\n color: $green;\n}\n\n@mixin dark-green {\n color: $dark_green;\n}\n\n@mixin red {\n color: $red;\n}\n\n@mixin fade-red {\n color: $fade_red;\n}\n\n/* Text meant only for screen readers */\n@mixin screen-reader-text {\n clip: rect(1px, 1px, 1px, 1px);\n position: absolute !important;\n left:-10000px;\n top:auto;\n width:1px;\n height:1px;\n overflow:hidden;\n}\n\n@mixin screen-reader-text--hover {\n background-color: #f1f1f1;\n border-radius: 3px;\n box-shadow: 0 0 2px 2px rgba(0, 0, 0, 0.6);\n clip: auto !important;\n color: #21759b;\n display: block;\n font-size: 14px;\n font-weight: bold;\n height: auto;\n left: 5px;\n line-height: normal;\n padding: 15px 23px 14px;\n text-decoration: none;\n top: 5px;\n width: auto;\n z-index: 100000;\n}\n\n@mixin xmargin-vertical {\n margin-top: 2rem;\n margin-bottom: 2rem;\n}\n\n@mixin xmargin-horizontal {\n margin-right: 2rem;\n margin-left: 2rem;\n}\n\n@mixin xpadding-vertical {\n padding-top: 2rem;\n padding-bottom: 2rem;\n}\n\n@mixin xpadding-horizontal {\n padding-right: 2rem;\n padding-left: 2rem;\n}\n\n@mixin ul-no-style {\n list-style: none;\n margin-left: 0;\n}\n\n@mixin hidden--accessible {\n height: 0;\n opacity: 0;\n padding: 0;\n overflow: hidden;\n}\n\n@mixin accordion {\n background: #fff;\n width: 100%;\n}\n\n@mixin accordion__header {\n @include accordion ;\n box-shadow: inset 1px 1px 0 #ccc, inset -1px -1px 0 #ccc;\n color: $font;\n font-family: $fontTitle;\n font-size: .9rem;\n font-weight: 400;\n line-height: 1.5;\n text-transform: none;\n letter-spacing: 0;\n text-align: left;\n border: none;\n border-radius: 3px;\n min-height: 3.065rem;\n padding: 1rem 2rem 1rem 1rem;\n margin: 1.6rem 0 0;\n position: relative;\n z-index: 9;\n cursor: pointer;\n transition: all .2s $fastInEaseOut;\n}\n\n@mixin accordion__content {\n @include accordion ;\n box-shadow: inset 1px -1px 0 #ccc, inset -1px -1px 0 #ccc;\n display: block;\n position: relative;\n height: auto;\n overflow: visible;\n margin-bottom: 1.6rem;\n}\n\n@mixin accordion__content--closed {\n margin-top: 0;\n padding-top: 0rem;\n animation: slideOutTop .25s $fastInEaseOut forwards;\n display: none;\n}\n\n@mixin accordion__content--open {\n padding-top: 1.6rem;\n margin-bottom: 2rem;\n animation: slideInTop .45s $fastInEaseOut forwards;\n}\n\n// Share Icons\n@mixin share_icons($rootBEM) {\n\n .#{$rootBEM} {\n @include ul-no-style;\n @include flex-center;\n }\n\n .#{$rootBEM}__item {\n margin-right: 20px;\n\n &:last-child {\n margin-right: 0;\n }\n }\n\n .#{$rootBEM}__item__icon {\n @include icon--xxl;\n @include icon--circle--pad--xl;\n\n fill: #fff!important;\n }\n\n .#{$rootBEM}__item__icon--facebook {\n background-color: #3a5795;\n }\n\n .#{$rootBEM}__item__icon--twitter {\n background-color: #4099ff;\n }\n}\n\n@mixin section--alt {\n background: $light_gray;\n border-bottom: 1px solid #ddd;\n border-top: 1px solid #ddd;\n padding-top: 3rem;\n padding-bottom: 3rem;\n margin-top: 3rem;\n margin-bottom: 3rem;\n}\n\n#enp-quiz {\n .enp-screen-reader-text {\n @include screen-reader-text;\n }\n\n .enp-screen-reader-text:hover,\n .enp-screen-reader-text:active,\n .enp-screen-reader-text:focus {\n @include screen-reader-text--hover;\n }\n\n .enp-accordion-header {\n @include accordion__header ;\n\n &:first-of-type {\n margin-top: 0;\n }\n\n .enp-accordion-header__icon {\n position: absolute;\n fill: $dark_gray;\n right: 0.75rem;\n bottom: 0.75rem;\n transition: all .35s $fastInEaseOut;\n }\n }\n\n .enp-accordion-header--open {\n\n .enp-accordion-header__icon {\n transform: rotateX(180deg) translateY(2px);\n }\n\n }\n\n .enp-accordion-content {\n @include accordion__content ;\n }\n\n .enp-accordion-content--closed {\n @include accordion__content--closed ;\n }\n\n .enp-accordion-content--open {\n @include accordion__content--open ;\n }\n\n .enp-quiz-message {\n @include container--thin;\n background: #fff;\n border: 1px solid #eee;\n border-bottom: 1px solid #ccc;\n padding: 1rem 0.375rem;\n margin-bottom: 1.6rem;\n position: fixed;\n bottom: 0;\n left: 0;\n }\n\n .enp-quiz-message__title {\n @include small-uppercase;\n }\n\n .enp-message__list {\n @include ul-no-style;\n font-size: 1.1rem;\n margin-bottom: 0;\n }\n\n .enp-quiz-message--error {\n border-left: 6px solid $red;\n color: $red;\n }\n\n .enp-quiz-message__title--error {\n color: $dark_red;\n }\n\n .enp-quiz-message--success {\n border-left: 6px solid $green;\n color: $dark_green;\n }\n\n .enp-quiz-message__title--success {\n color: $dark_green;\n }\n\n .enp-quiz-message--note {\n border-left: 6px solid $khaki;\n }\n\n .enp-quiz-message__title--note {\n color: $dark_blue;\n }\n\n .enp-quiz-message__close {\n @include btn--reset;\n position: absolute;\n top: 5px;\n right: 5px;\n }\n\n .enp-quiz-message--ajax {\n margin-bottom: .6rem;\n animation: slideInBottom .3s;\n }\n\n .enp-quiz-message-ajax-container {\n z-index: 9999;\n position: fixed;\n bottom: 10px;\n }\n\n .enp-quiz-message--saving__spinner {\n margin-left: -10px;\n }\n\n .enp-quiz-message--saving__text {\n font-size: 1rem;\n }\n\n textarea.limited-chars,\n input.limited-chars {\n margin-bottom: 0.2rem;\n }\n\n .limited-chars__container {\n color: lighten($dark_gray, 8);\n font-size: 0.8rem;\n display: block;\n text-align: right;\n margin-bottom: 1.2rem;\n }\n\n .limited-chars__counter {\n color: $dark_gray;\n }\n\n .limited-chars__container--error {\n color: $dark_red;\n\n .limited-chars__counter {\n color: $dark_red;\n }\n }\n\n textarea.has-error,\n input.has-error {\n border: 1px solid $red;\n &:focus {\n outline-color: $red;\n }\n\n }\n\n\n\n .enp-tooltip {\n position: relative;\n }\n\n .enp-tooltip__activator {\n\n &:focus + .enp-tooltip__description,\n &:focus > .enp-tooltip__description {\n display: block;\n }\n }\n\n .enp-tooltip__description {\n display: none;\n position: absolute;\n left: 103%;\n margin-bottom: 2rem;\n border-radius: 3px;\n background: $light_gray;\n font-size: 0.9rem;\n padding: 0.9rem;\n max-width: 200px;\n }\n\n\n}\n\n.enp-sticky {\n position: relative;\n left: 0;\n right: 0;\n top: 0;\n z-index: 999;\n\n &.enp-sticky--fixed {\n position: fixed;\n }\n}\n\n.enp-breadcrumb-link {\n font-size: 0.85rem;\n}\n\n.enp-breadcrumb-link__icon {\n position: relative;\n top: 0.45rem;\n left: 0.4rem;\n}\n","//fonts\n$fontBody : Arial,monospace, helvetica, arial, sans-serif;\n$fontTitle : Arial,monospace, helvetica, arial, sans-serif;\n//colors\n$font : #1d1c25;\n$background: #FAF9FB;\n$title : #5D5E5F;\n$blue: #1E1C26;\n$dark_blue: #242f42;\n$light_blue: lighten($blue, 100);\n$light_gray: #FAF9FB;\n$really_light_gray: #F8F8F8;\n$gray: darken($light_gray, 2);\n$dark_gray: darken($gray, 5);\n$darker_gray: darken($dark_gray, 20);\n$link: #bf5700;\n$khaki: #CCA562;\n$green: #60AAAD;\n$dark_green: darken($green, 8);\n$red: #bf5700;\n$dark_red: darken($red, 8);\n$fade_red: #C1893E;\n$link_hover: darken($link, 8);\n// animation\n$fastInEaseOut: cubic-bezier(0.000, 0, .3, 1);\n\n\n$breakpoints: (\n \"small\" : 400px,\n \"medium\" : 700px,\n \"large\" : 1000px\n);\n\n// -----------------------------------------------------------------------------\n// Core\n// -----------------------------------------------------------------------------\n\n// Caching current breakpoint\n// Not meant to be manually edited\n$default-breakpoint: root;\n$current-breakpoint: $default-breakpoint;\n\n// The usual breakpoint mixin\n// Except it updates the $current-breakpoint variable\n// 1. If breakpoint name exists in map\n// 2. Update $current-breakpoint\n// 3. Open a media query\n// 4. Let the user dump content\n// 5. Then reset $current-breakpoint\n// 6. If breakpoint name doesn't exist in map, warn the user\n@mixin breakpoint($breakpoint) {\n $value: map-get($breakpoints, $breakpoint);\n\n @if $value != null { // 1\n $current-breakpoint: $breakpoint !global; // 2\n @media (min-width: $value) { @content; } // 3\n $current-breakpoint: $default-breakpoint !global; // 5\n }\n\n @else {\n @warn \"Invalid breakpoint `#{$breakpoint}`.\"; // 6\n }\n}\n\n// for only targeting a specific device\n// NOTE: DOESN'T SUPPORT THE @include placeholders!!!\n@mixin media($query) {\n @if $query == max-small {\n $media_query: \"max-width: #{map-get($breakpoints, \"small\")}\";\n } @else if $query == only-medium {\n $media_query: \"min-width: #{map-get($breakpoints, \"medium\")}) and (max-width: #{(map-get($breakpoints, \"large\") - 1px)}\";\n } @else if $query == max-medium {\n $media_query: \"max-width: #{(map-get($breakpoints, \"medium\") - 1px)}\";\n } @else if $query == max-large {\n $media_query: \"max-width: #{(map-get($breakpoints, \"large\") - 1px)}\";\n } @else {\n // just use the number provided as a max width\n $media_query: \"max-width: #{$query}\";\n }\n\n @if variable-exists(media_query) {\n @media ($media_query) {\n @content;\n }\n }\n\n}\n","@mixin clearfix {\n &:after {\n content: \"\";\n display: table;\n clear: both;\n }\n}\n\n@mixin container {\n max-width: 640px;\n margin-left: auto;\n margin-right: auto;\n padding-left: 20px;\n padding-right: 20px;\n @include clearfix;\n}\n\n@mixin well {\n padding: 1.6rem;\n margin-bottom: 1.6rem;\n background: $light_blue;\n @include border-radius;\n border: 1px solid #eee;\n border-bottom-color: #ccc;\n\n @include breakpoint(medium) {\n margin-bottom: 2.6rem;\n padding: 1.6rem 2rem;\n }\n}\n\n@mixin container--wide {\n @include container;\n\n @include breakpoint(medium) {\n max-width: 840px;\n }\n\n @include breakpoint(large) {\n max-width: 1000px;\n }\n}\n\n\n@mixin container--thin {\n @include container;\n max-width: 512px;\n}\n\n@mixin container--really-thin {\n @include container;\n max-width: 300px;\n}\n\n@mixin container--form {\n @include container--thin;\n\n .enp-input,\n .enp-textarea {\n width: 100%;\n }\n}\n\n@mixin container--form--thin {\n @include well;\n @include container--really-thin;\n\n .enp-input,\n .enp-textarea {\n width: 100%;\n }\n}\n\n@mixin flex-container { // no pseudo element to clear and break spacing\n @include container;\n}\n\n@mixin flex-container--wide { // no pseudo element to clear and break spacing\n @include flex-container;\n\n @include breakpoint(medium) {\n max-width: 840px;\n }\n\n @include breakpoint(large) {\n max-width: 1000px;\n }\n}\n\n@mixin flex {\n display: flex;\n}\n\n@mixin flex-list__item {\n flex-basis: 100%;\n margin: 0;\n border-bottom-color: #ddd;\n}\n\n@mixin flex-spread {\n @include flex;\n justify-content: space-between;\n}\n\n@mixin flex-spread-vertical {\n @include flex-spread;\n flex-direction: column;\n}\n\n@mixin flex-spread-around {\n @include flex;\n justify-content: space-around;\n}\n\n@mixin flex-bottom {\n @include flex;\n align-items: flex-end;\n align-content: flex-end;\n}\n\n@mixin flex-center {\n @include flex;\n justify-content: center;\n align-content: center;\n align-items: center;\n}\n\n@mixin flex-vertical-center {\n @include flex;\n align-content: center;\n align-items: center;\n}\n\n@mixin flex-inline {\n @include flex;\n @include ul-no-style;\n margin-bottom: 0;\n}\n\n@mixin flex-inline__item {\n margin-right: 10px;\n\n &:last-of-type {\n margin-right: 0;\n }\n}\n\n\n@mixin flex-grid {\n @include flex;\n flex-flow: column wrap;\n align-items: stretch;\n @include ul-no-style;\n}\n\n@mixin flex-grid__item {\n flex-basis: 100%;\n padding: 1rem 1.2rem;\n background: #fff;\n border: 1px solid #eee;\n border-bottom: 1px solid #ddd;\n list-style: none;\n transition: all .35s $fastInEaseOut;\n margin: 0 0 0.8rem;\n\n @include breakpoint(medium) {\n // flex-basis: 100%;\n // max-width: 100%;\n // margin: 0 2% 0.8rem 0;\n\n // &:nth-child(2n) {\n // margin-right: 0;\n // }\n }\n\n // @include breakpoint(large) {\n // flex-basis: 100%;\n // max-width: 100%;\n // margin-right: 1.25%;\n\n // &:nth-child(2n) {\n // margin-right: 1.25%;\n // }\n\n // &:nth-child(3n) {\n // margin-right: 0;\n // }\n // }\n}\n\n@mixin flex-grid__title {\n font-size: 1rem;\n padding-bottom: 0.5rem;\n}\n","body #enp-quiz {\n color: $font;\n font-family: $fontBody;\n font-size: 1em;\n line-height: 1.6;\n font-weight: 400;\n\n @include breakpoint(medium) {\n font-size: 1.3em;\n }\n}\n\n#enp-quiz {\n /* Headings */\n h1,h2,h3,h4,h5,h6 {\n font-family: $fontTitle;\n color: $title;\n clear: both;\n margin: 0 0 .2rem;\n font-weight: bold;\n line-height: 1.2em;\n }\n\n h1 {\n font-size: 2em;\n }\n\n h2 {\n font-size: 1.75em;\n }\n\n h3 {\n font-size: 1.475em;\n }\n\n h4 {\n font-size: 1.3em;\n }\n\n h5 {\n font-size: 1.125em;\n }\n\n h6 {\n font-size: 1em;\n }\n\n p+h1, ul+h1,\n p+h2, ul+h2,\n p+h3, ul+h3,\n p+h4, ul+h4,\n p+h5, ul+h5,\n p+h6, ul+h6 {\n margin-top: 1.8em;\n }\n\n /* Text elements */\n p {\n font-size: 0.85em;\n margin-bottom: 1.125em;\n font-weight: 300;\n }\n ul, ol {\n margin: 0 0 1.6em 1.25em;\n }\n ul {\n list-style: disc;\n }\n ol {\n list-style: decimal;\n }\n li > ul,\n li > ol {\n margin-bottom: 0;\n margin-left: 1.6em;\n }\n\n b, strong {\n font-weight: bold;\n }\n\n dfn, cite, em {\n font-family: georgia, times, serif;\n font-style: italic;\n }\n\n pre {\n background: #eee;\n font-family: \"Courier 10 Pitch\", Courier, monospace;\n font-size: .95em;\n line-height: 1.6;\n margin-bottom: 1.6em;\n padding: 1.6em;\n overflow: auto;\n max-width: 100%;\n }\n .code, code, kbd, tt, var {\n font: .7em Monaco, Consolas, \"Andale Mono\", \"DejaVu Sans Mono\", monospace;\n }\n\n table {\n border: none;\n\n th {\n font-family: $fontTitle;\n font-size: .8rem;\n text-transform: uppercase;\n border: none;\n border-bottom: 1px solid #ddd;\n }\n\n td {\n font-family: $fontBody;\n font-size: 1rem;\n border: none;\n border-bottom: 1px solid #eee;\n }\n\n tr:nth-child(even) td {\n background: $really_light_gray;\n }\n\n tr:last-child td {\n border-bottom: none;\n }\n }\n\n figure {\n margin: 0;\n }\n\n img {\n height: auto; /* Make sure images are scaled correctly. */\n max-width: 100%; /* Adhere to container width. */\n }\n\n /* Links */\n a {\n color: $link;\n text-decoration: none;\n transition: color .2s;\n touch-action: manipulation; // remove 300ms delay for ie\n\n .enp-icon {\n fill: $link;\n }\n }\n\n a:hover,\n a:focus,\n a:active {\n color: $link_hover;\n\n .enp-icon {\n fill: $link_hover;\n }\n }\n\n button {\n &:focus {\n @include focus--glow;\n }\n }\n\n .enp-btn {\n @include btn;\n }\n\n\n .enp-btn--add {\n @include btn--dashed;\n width: 100%;\n }\n\n .enp-btn--disabled {\n @include disabled;\n }\n\n .enp-btn--enabled {\n animation: expand .6s;\n }\n\n .enp-icon {\n width: 24px;\n height: 24px;\n transition: all .2s;\n }\n\n .enp-page-title {\n font-size: 1.6rem;\n }\n}\n","@keyframes slideInBottom {\n 0% {\n opacity: 0;\n transform: translate3d(0, 100px, 0);\n }\n 100% {\n opacity: 1;\n transform: translate3d(0, 0, 0);\n }\n}\n\n@keyframes slideInTop {\n 0% {\n opacity: 0;\n height: auto;\n transform: translate3d(0, -20px, 0);\n }\n 100% {\n opacity: 1;\n height: auto;\n transform: translate3d(0, 0, 0);\n }\n}\n\n@keyframes slideInTop--reduced-opacity {\n 0% {\n opacity: 0;\n height: auto;\n transform: translate3d(0, -20px, 0);\n }\n 100% {\n opacity: 0.8;\n height: auto;\n transform: translate3d(0, 0, 0);\n }\n}\n\n\n@keyframes slideOutTop {\n 0% {\n overflow: hidden;\n height: 100px;\n opacity: 1;\n transform: translate3d(0, 0, 0);\n }\n 100% {\n height: 0;\n opacity: 0;\n transform: translate3d(0, -20px, 0);\n }\n}\n\n@keyframes removeElement {\n 0% {\n opacity: 1;\n transform: translate3d(0, 0, 0);\n }\n 100% {\n padding: 0;\n margin: 0;\n opacity: 0;\n height: 0;\n z-index: -1;\n transform: translate3d(-200px, 0, 0);\n }\n}\n\n@keyframes removeAnswers {\n 0% {\n opacity: 1;\n transform: translate3d(0, 0, 0);\n }\n 100% {\n padding: 0;\n opacity: 0;\n display: none;\n height: 0;\n z-index: -1;\n transform: translate3d(-200px, 0, 0);\n }\n}\n\n@keyframes removeQuestion {\n 0% {\n opacity: 1;\n transform: translateX(0);\n }\n 100% {\n opacity: 0;\n transform: translateX(-200px);\n }\n}\n\n@keyframes showNextQuestion {\n 0% {\n opacity: 0;\n transform: translateX(200px);\n }\n\n 100% {\n opacity: 1;\n transform: translateX(0);\n }\n}\n\n@keyframes expand {\n 0% {\n opacity: 0.8;\n transform: scale3d(1, 1, 1);\n box-shadow: 0 0 0px rgba(0,0,0,.3);\n }\n\n 40% {\n opacity: 1;\n }\n\n 70% {\n opacity: 1;\n transform: scale3d(1.1, 1.1, 1);\n box-shadow: 0 0 8px rgba(0,0,0,.4);\n }\n\n 100% {\n opacity: 1;\n transform: scale3d(1, 1, 1);\n box-shadow: 0 0 0px rgba(0,0,0,.3), inset 0 2px 0 rgba(0,0,0,.2);\n }\n}\n\n@keyframes checkmark {\n 0% {\n opacity: 0;\n transform: scale3d(0.2, 0.2, 1);\n }\n 5% {\n opacity: 1;\n }\n 10% {\n transform: scale3d(1.4, 1.4, 1);\n }\n 12% {\n transform: scale3d(1, 1, 1);\n }\n 90% {\n opacity: 1;\n transform: scale3d(1, 1, 1);\n }\n 92% {\n transform: scale3d(1.4, 1.4, 1);\n }\n 100% {\n opacity: 0;\n transform: scale3d(0.2, 0.2, 1);\n }\n\n}\n\n@keyframes fadeOut {\n 0% {\n opacity: 1;\n }\n 100% {\n opacity: 0;\n }\n}\n\n@keyframes fadeIn {\n 0% {\n opacity: 0;\n }\n 100% {\n opacity: 1;\n }\n}\n\n@keyframes navSlideIn {\n 0% {\n transform: translate3d(0, -200px, 0);\n }\n 100% {\n transform: translate3d(0, 0, 0);\n }\n}\n\n\n.spinner {\n margin: 0 auto;\n width: 70px;\n text-align: center;\n}\n\n.spinner > div {\n width: 18px;\n height: 18px;\n background-color: #333;\n\n border-radius: 100%;\n display: inline-block;\n -webkit-animation: sk-bouncedelay 1.4s infinite ease-in-out both;\n animation: sk-bouncedelay 1.4s infinite ease-in-out both;\n}\n\n.spinner .bounce1 {\n -webkit-animation-delay: -0.32s;\n animation-delay: -0.32s;\n}\n\n.spinner .bounce2 {\n -webkit-animation-delay: -0.16s;\n animation-delay: -0.16s;\n}\n\n@-webkit-keyframes sk-bouncedelay {\n 0%, 80%, 100% { -webkit-transform: scale(0) }\n 40% { -webkit-transform: scale(1.0) }\n}\n\n@keyframes sk-bouncedelay {\n 0%, 80%, 100% {\n -webkit-transform: scale(0);\n transform: scale(0);\n } 40% {\n -webkit-transform: scale(1.0);\n transform: scale(1.0);\n }\n}\n","#enp-quiz {\n transition: background .25s $fastInEaseOut;\n\n .enp-container {\n @include container;\n }\n\n .enp-aside {\n @include well;\n @include container--thin;\n font-size: 1.2rem;\n }\n\n .enp-aside__title {\n @include small-uppercase;\n font-weight: 600;\n }\n\n .enp-page-title {\n border-bottom: 2px solid $blue;\n }\n}\n","\n\n// enter the root BEM class and this will output the correct CSS for you\n@mixin radio-block($rootBEM) {\n .#{$rootBEM}__legend {\n @include radio-block__legend ;\n }\n\n .#{$rootBEM}__input {\n @include radio-block__input ;\n }\n\n .#{$rootBEM}__label {\n @include radio-block__label ;\n }\n\n .#{$rootBEM}__input:checked + .#{$rootBEM}__label {\n @include radio-block__label--checked ;\n }\n\n .#{$rootBEM}__input:focus + .#{$rootBEM}__label {\n @include radio-block__label--focus ;\n }\n}\n\n@mixin radio-inline($rootBEM) {\n .#{$rootBEM}__legend {\n @include radio-inline__legend ;\n }\n\n .#{$rootBEM}__input {\n @include radio-inline__input ;\n }\n\n .#{$rootBEM}__label {\n @include radio-inline__label ;\n }\n\n .#{$rootBEM}__input:checked + .#{$rootBEM}__label {\n @include radio-inline__label--checked ;\n }\n\n .#{$rootBEM}__input:focus + .#{$rootBEM}__label {\n @include radio-inline__label--focus ;\n }\n\n}\n\n@mixin label {\n display: block;\n color: lighten($font, 10);\n font-weight: normal;\n font-size: 0.85rem;\n text-transform: uppercase;\n}\n\n@mixin legend {\n @include label;\n padding-top: 1.6rem;\n margin-bottom: 0.2rem;\n border: none;\n}\n\n@mixin label--bold {\n @include label;\n font-weight: 500;\n}\n\n@mixin legend--bold {\n @include label--bold;\n}\n\n@mixin input {\n font-size: 1rem;\n font-family: $fontBody;\n padding: 0.8rem 0.5rem;\n background: #fff;\n border: 1px solid #aaa;\n border-radius: 3px;\n width: 20rem;\n max-width: 100%;\n margin-bottom: 1.2rem;\n\n @include breakpoint(medium) {\n padding: 0.8rem;\n }\n}\n\n@mixin input--large {\n @include input;\n padding: 1rem 1.2rem;\n font-size: 1.3rem;\n}\n\n@mixin input--xl {\n @include input;\n font-weight: bold;\n font-size: 1.6rem;\n margin-bottom: 1rem;\n\n &::placeholder {\n font-weight: bold;\n }\n}\n\n@mixin textarea {\n @include input;\n line-height: 1.5;\n width: 100%;\n\n &:focus {\n @include focus--glow;\n }\n}\n\n\n/*\n@mixin no-radio__input {\n display: inline-block;\n width: 0;\n margin: 0;\n padding: 0;\n opacity: 0;\n overflow: hidden;\n}\n\n@mixin no-radio__label {\n display: inline-block;\n position: relative;\n left: -1rem;\n padding: .2rem .6rem;\n @include small-uppercase;\n font-size: .8rem;\n font-weight: normal;\n background: transparent;\n border-radius: 3px;\n transition: all .2s;\n}*/\n\n@mixin radio-block__legend {\n @include legend;\n margin-bottom: 0.6rem;\n}\n\n@mixin radio-block__input {\n position: absolute;\n z-index: 9;\n margin-left: 9px;\n}\n\n@mixin radio-block__label {\n text-transform: capitalize;\n background: #f2f2f2;\n display: block;\n padding: 5px 10px 5px 39px;\n position: relative;\n top: -6px;\n box-shadow: inset -1px -1px 0 rgba(0,0,0,.1), inset 30px 0px 0 rgba(255,255,255,.7), inset 31px 0px 0 rgba(0,0,0,.1);\n}\n\n@mixin radio-block__label--checked {\n background: $green;\n color: #fff;\n text-shadow: 0 0 1px rgba(0,0,0,.7);\n}\n\n@mixin radio-block__label--focus {\n z-index: 8;\n @include focus--glow ;\n}\n\n@mixin radio-inline__legend {\n @include legend;\n}\n\n@mixin radio-inline__input {\n @include screen-reader-text;\n}\n\n@mixin radio-inline__label {\n text-transform: capitalize;\n display: inline-block;\n padding: 0.2rem 0.5rem;\n border-radius: 3px;\n cursor: pointer;\n}\n\n@mixin radio-inline__label--checked {\n @include radio-block__label--checked ;\n}\n\n@mixin radio-inline__label--focus {\n @include radio-block__label--focus ;\n}\n\n@mixin select--wide--chevron {\n width: 100%;\n -webkit-appearance: none;\n -moz-appearance: none;\n appearance: none;\n font-size: 0.85rem;\n padding: 0.7rem 32px 0.7rem 0.8rem;\n border: 1px solid #bbb;\n border-radius: 3px;\n margin-bottom: 1.6rem;\n background: url(../svg/chevron-down.svg) 100% 50% no-repeat;\n background-color: #fff;\n box-shadow: inset -26px 0 0 rgba(0,0,0,.1);\n}\n\n\n#enp-quiz {\n\n fieldset {\n border: none;\n margin: 0;\n padding: 0;\n }\n\n .enp-label {\n @include label;\n }\n\n .enp-legend {\n @include legend;\n }\n\n .enp-input {\n @include input;\n\n &.enp-input--has-description {\n margin-bottom: 0.2rem;\n }\n }\n\n .enp-textarea-description,\n .enp-input-description {\n margin-bottom: 1rem;\n font-size: 0.85rem;\n }\n\n .enp-textarea-description--before,\n .enp-input-description--before {\n margin-bottom: 0;\n }\n\n .enp-input::placeholder,\n .enp-textarea::placeholder {\n font-family: $fontBody;\n font-weight: 300;\n color: lighten($font, 40);\n }\n\n .enp-textarea {\n @include textarea;\n\n &.enp-textarea--has-description {\n margin-bottom: 0.2rem;\n }\n &.enp-textarea--has-description--before {\n margin-bottom: 1.2rem;\n }\n }\n\n .enp-embed-code {\n @include textarea;\n width: 100%;\n padding: 1.6rem;\n font-size: 0.9rem;\n font-family: Monaco, Consolas, \"Andale Mono\", \"DejaVu Sans Mono\", monospace;\n\n @include media(max-medium) {\n padding: .8rem;\n }\n }\n}\n","#enp-quiz {\n .enp-publish-page-container,\n .enp-preview-page-container,\n .enp-quiz-form-container {\n @include container--wide;\n position: relative;\n padding-top: 6rem;\n padding-bottom: 4rem;\n background: $really_light_gray;\n\n @include media(max-small) {\n padding-left: 8px;\n padding-right: 8px;\n }\n }\n\n .enp-quiz-form {\n @include container--form;\n padding-left: 0;\n padding-right: 0;\n }\n\n .enp-quiz-title__label {\n @include label--bold;\n }\n\n .enp-quiz-title__textarea {\n @include input--xl;\n }\n \n textarea {\n color: #000;\n }\n\n .enp-accordion-container {\n margin-bottom: 1.6rem;\n position: relative;\n }\n\n .enp-question-content {\n @include accordion;\n padding-top: 0;\n position: relative;\n }\n\n .enp-question-inner {\n padding: 1.6rem 1.6rem 1rem;\n\n @include breakpoint(medium) {\n padding-right: 2.8rem;\n padding-left: 2.9rem;\n }\n\n }\n\n .enp-question-title__label {\n @include label--bold;\n }\n\n .enp-question-title__textarea {\n @include input--large;\n }\n\n .enp-question-image-upload {\n @include btn--dashed--light--alt-bg;\n @include small-uppercase;\n position: relative;\n margin-bottom: 2rem;\n transform: translate3d(0, 0, 0);\n transition: all .3s $fastInEaseOut;\n\n .enp-question-image-upload__icon--photo {\n @include icon--xxxl;\n opacity: 0;\n position: absolute;\n top: 0;\n left: 0;\n right: 0;\n margin: 0 auto;\n transform: translate3d(0, 0, 0);\n z-index: -1;\n transition: opacity .2s, transform .3s $fastInEaseOut;\n }\n\n .enp-question-image-upload__icon--add {\n @include icon--circle--small;\n @include icon--gray-bg;\n margin-right: 5px;\n position: relative;\n top: 0.2rem;\n }\n\n &:hover,\n &:focus,\n &:active {\n padding-top: 5rem;\n padding-bottom: 2rem;\n\n .enp-question-image-upload__icon--photo {\n opacity: 1;\n z-index: 1;\n transform: translate3d(0, 1.75rem, 0);\n }\n\n .enp-question-image-upload__icon--add {\n @include icon--gray-bg--hover;\n }\n }\n }\n\n .enp-question-image__container {\n position: relative;\n margin-bottom: 1rem;\n }\n\n .enp-question-image {\n margin-bottom: 1.2rem;\n }\n\n @include radio-inline(enp-question-type);\n\n .enp-question-type__label {\n position: relative;\n z-index: 9;\n }\n\n .enp-slider-options,\n .enp-mc-options {\n margin-top: 0rem;\n display: none;\n animation: slideOutTop .25s $fastInEaseOut forwards;\n animation-delay: 0s, .05s;\n }\n\n .enp-question-type__input--slider:checked ~ .enp-slider-options,\n .enp-question-type__input--mc:checked ~ .enp-mc-options {\n visibility: visible;\n display: block;\n animation: fadeIn .45s $fastInEaseOut forwards;\n }\n\n .enp-mc-options__list {\n @include ul-no-style;\n }\n\n .enp-mc-option {\n position: relative;\n padding-left: 6px;\n\n @include breakpoint(medium) {\n padding-left: 0;\n }\n }\n\n .enp-mc-options__legend {\n @include legend--bold;\n }\n\n .enp-mc-option__add,\n .enp-mc-option__button--correct,\n .enp-mc-option__button--delete {\n display: none;\n }\n\n .enp-question-type__input--mc:checked ~ .enp-mc-options {\n .enp-mc-option__add,\n .enp-mc-option__button--correct,\n .enp-mc-option__button--delete {\n display: block;\n }\n }\n\n .enp-button__question-image-delete,\n .enp-mc-option__button--delete {\n @include btn--reset;\n position: absolute;\n top: 9px;\n right: -24px;\n fill: #bbb;\n cursor: pointer;\n\n @include breakpoint(medium) {\n right: -30px;\n }\n\n &:focus,\n &:hover {\n fill: $red;\n }\n }\n\n .enp-mc-option__button--correct {\n @include btn--reset;\n position: absolute;\n top: 8px;\n left: -24px;\n\n @include breakpoint(medium) {\n left: -35px;\n }\n\n .enp-mc-option__icon--correct {\n @include icon--circle--pad;\n width: 28px;\n height: 28px;\n fill: #fff;\n background: #fff;\n cursor: pointer;\n border: 2px solid $fade_red;\n transition: all .2s;\n }\n\n &:focus .enp-mc-option__icon--correct,\n &:hover .enp-mc-option__icon--correct {\n background: #fff;\n border-color: $green;\n fill: $green;\n }\n\n &:disabled {\n opacity: 1;\n\n .enp-mc-option__icon--correct {\n cursor: default;\n fill: #fff;\n border: 2px solid transparent;\n }\n }\n }\n\n .enp-mc-option--correct {\n .enp-mc-option__input {\n box-shadow: inset 0 0 3px $green;\n border: 1px solid $green;\n }\n\n .enp-mc-option__button--correct:focus .enp-mc-option__icon--correct,\n .enp-mc-option__button--correct:hover .enp-mc-option__icon--correct,\n .enp-mc-option__icon--correct {\n fill: #fff;\n border-color: $green;\n background: $green;\n }\n }\n\n .enp-mc-option__add {\n @include btn--dashed--light--alt-bg;\n @include small-uppercase;\n text-align: left;\n padding: 0.7rem 0.75rem 0.8rem;\n\n .enp-mc-option__add__icon {\n @include btn--icon__icon--circle--small ;\n @include icon--gray-bg;\n position: relative;\n top: 0.2rem;\n }\n\n &:hover .enp-mc-option__add__icon {\n @include icon--gray-bg--hover;\n }\n }\n\n .enp-slider-options .enp-input {\n max-width: 11.8rem;\n }\n\n .enp-slider-range__container .enp-input,\n .enp-slider-correct__container .enp-input {\n max-width: 8.8rem;\n @include breakpoint('small') {\n max-width: 11.8rem;\n }\n }\n\n .enp-slider-preview {\n border: 1px solid #ddd;\n margin-top: 0.2rem;\n margin-bottom: 1.6rem;\n padding: 1.6rem 1.6rem .6rem;\n position: relative;\n\n .enp-label--slider-preview {\n position: absolute;\n width: 100%;\n top: 0.2rem;\n left: 0.4rem;\n font-size: 0.75rem;\n text-transform: uppercase;\n }\n }\n\n .enp-slider-range__container,\n .enp-slider-correct__container {\n @include flex-spread;\n align-items: center;\n }\n\n .enp-slider-range__helper,\n .enp-slider-correct__helper {\n color: #777;\n font-size: 0.85rem;\n background: #fff;\n padding: 0 .3rem;\n position: relative;\n\n &:before {\n content: '';\n position: absolute;\n top: 44%;\n height: 4px;\n background: #ddd;\n width: 120px;\n left: -60px;\n z-index: -1;\n transition: width 0.7s $fastInEaseOut, background 1.6s $fastInEaseOut;\n }\n }\n\n .enp-slider-options {\n margin-bottom: 2rem;\n\n .enp-accordion-header {\n text-transform: uppercase;\n font-size: 0.85rem;\n padding: 0.675rem;\n }\n\n .enp-slider-advanced-options__content {\n border: none;\n box-shadow: none;\n padding-top: 1rem;\n padding-bottom: 0;\n margin-bottom: 0;\n }\n }\n\n .enp-slider-correct-high__container {\n position: relative;\n }\n\n .enp-slider-correct-high__input-container--hidden {\n display: none;\n }\n\n .enp-slider-correct__helper--hidden {\n &:before {\n width: 0;\n background: $green;\n }\n }\n\n .enp-slider-correct-answer-range--add-range {\n @include btn--dashed--light--alt-bg;\n margin-left: 0.8rem;\n font-size: 0.7rem;\n\n @include breakpoint('small') {\n font-size: 0.8rem;\n padding: .7rem;\n }\n\n @include breakpoint('medium') {\n padding: .7rem 1.2rem;\n min-width: 11.4rem;\n }\n\n .enp-slider-correct-answer-range__icon {\n @include btn--icon__icon--circle--small ;\n @include icon--gray-bg;\n position: relative;\n left: -0.2rem;\n }\n\n &:hover .enp-slider-correct-answer-range__icon {\n @include icon--gray-bg--hover;\n }\n }\n\n .enp-slider-correct-answer-range--remove-range {\n position: absolute;\n right: -1.6rem;\n bottom: 1.6rem;\n background: none;\n border: none;\n box-shadow: none;\n padding: 0 0.1rem;\n\n .enp-slider-correct-answer-range__icon {\n width: 1.2em;\n height: 1.2em;\n fill: $dark_gray;\n }\n\n &:hover,\n &:focus {\n .enp-slider-correct-answer-range__icon {\n fill: $red;\n }\n }\n\n @include breakpoint(medium) {\n top: -0.2rem;\n right: -0.2rem;\n bottom: auto;\n }\n\n }\n\n .enp-slider-options .enp-input:read-only {\n background: $light_gray;\n }\n\n .enp-answer-explanation {\n background: $light_blue;\n padding-top: 2rem;\n box-shadow: inset 1px 0px 0 #ccc, inset -1px -1px 0 #ccc, inset 0 1px 0 #ddd;\n }\n\n .enp-answer-explanation__label {\n @include label--bold;\n\n }\n\n .enp-question__button--delete {\n @include btn--reset;\n position: absolute;\n top: 9px;\n right: 9px;\n fill: #bbb;\n cursor: pointer;\n\n @include breakpoint(medium) {\n right: -30px;\n }\n\n &:hover {\n fill: $red;\n }\n }\n\n .enp-question__move {\n position: absolute;\n left: 15px;\n\n @include breakpoint(medium) {\n left: -40px;\n }\n }\n\n .enp-sort__placeholder {\n background: #ddd;\n height: 60px;\n width: 100%;\n max-height: 120px;\n margin-bottom: 1.6rem;\n }\n\n .ui-sortable .ui-sortable-helper {\n .ui-sortable-handle {\n cursor: move;\n cursor: grabbing;\n cursor: -webkit-grabbing;\n }\n }\n \n\n .enp-question__button--move {\n @include btn--reset;\n position: absolute;\n fill: #bbb;\n cursor: pointer;\n\n &:hover, &:focus {\n fill: #333;\n }\n\n &:disabled {\n opacity: 0.5;\n }\n }\n\n .enp-question__button--move--up {\n top: 0px;\n left: -9px;\n }\n\n\n .enp-question__button--move--down {\n top: 3px;\n right: -9px;\n }\n\n .enp-quiz-form__add-question {\n @include btn--icon;\n @include btn--dashed;\n padding-top: 1rem;\n padding-bottom: 1rem;\n margin-top: 1.6rem;\n margin-bottom: 2rem;\n\n .enp-add-question__icon {\n @include btn--icon__icon--circle--small;\n @include icon--normal;\n @include icon--gray-bg;\n position: relative;\n top: 0.2rem;\n }\n\n &:hover .enp-add-question__icon {\n @include icon--gray-bg--hover;\n }\n }\n\n .enp-quiz-form__save {\n @include btn;\n width: 100%;\n margin-bottom: 1rem;\n opacity: 0.8;\n text-shadow: 0px -1px 2px rgba(0,0,0,.6);\n\n &:hover,\n &:focus {\n opacity: 1;\n }\n\n @include breakpoint(small) {\n padding: 1.2rem 1.8rem 1.1rem;\n width: 27%;\n margin-right: 3%;\n position: relative;\n top: -2px;\n margin-top: 1.6rem;\n }\n\n /*@include breakpoint(medium) {\n padding-top: 1rem;\n padding-bottom: 1rem;\n margin-top: 1.6rem;\n margin-bottom: 2rem;\n }*/\n }\n\n .enp-quiz-form__save--reveal {\n animation: slideInTop--reduced-opacity .3s $fastInEaseOut;\n }\n\n @include btn--icon--circle(enp-btn--next-step);\n\n .enp-btn--next-step {\n width: 100%;\n padding: 1rem 1.4rem 1rem;\n\n @include breakpoint(small) {\n width: 68%;\n }\n\n /*\n * AFTER we have remove the Save button,\n * use this code to add the preview button into the\n * header\n @include media(max-medium) {\n padding: 1rem 1.4rem 1rem;\n }\n\n @include breakpoint(medium) {\n position: absolute;\n right: 20px;\n top: 10px;\n width: auto;\n z-index: 999999;\n\n &.enp-btn--next-step--fixed {\n position: fixed;\n animation: navSlideIn .25s;\n }\n }*/\n\n }\n\n .enp-btn--next-step--reveal {\n animation: slideInTop .3s $fastInEaseOut;\n }\n\n\n // UX interactions\n .enp-mc-option--inputs,\n .enp-accordion-header--inserting {\n animation: slideInBottom .4s $fastInEaseOut forwards;\n }\n\n .enp-mc-option--remove,\n .enp-question--remove,\n .enp-question__image--remove {\n animation: removeElement .5s $fastInEaseOut forwards;\n }\n\n .enp-image-upload-wait {\n @include btn--dashed--light--alt-bg;\n padding-top: 4rem;\n padding-bottom: 4rem;\n margin-bottom: 1rem;\n width: 100%;\n }\n\n // validation\n .enp-accordion-header.question-has-error {\n color: $red;\n box-shadow: 0 0 3px $red;\n }\n\n}\n\n.enp-quiz.ui-sortable--sorting #enp-quiz .enp-accordion-content {\n display: none;\n}","#enp-quiz {\n\n\n .enp-quiz-settings-container {\n\n @include breakpoint(large) {\n margin: 0;\n width: 40%;\n float: left;\n }\n }\n\n .enp-quiz-preview-container {\n\n @include breakpoint(large) {\n width: 60%;\n float: left;\n }\n\n }\n\n .enp-quiz-share__legend,\n .enp-quiz-settings__title {\n position: relative;\n @include small-uppercase;\n font-weight: 600;\n padding-top: 0;\n }\n\n .enp-quiz-settings__form {\n margin-bottom: 3rem;\n\n @include breakpoint(large) {\n padding: 0;\n margin-bottom: 0;\n }\n }\n\n .enp-fieldset {\n @include breakpoint(medium) {\n // this is necessary to keep the form elements visible on top of the\n // white BG on the sidebar. We can't set this on the whole form bc\n // then the publish button won't be positioned right\n position: relative;\n }\n }\n\n .enp-title-display__legend {\n padding-top: 0;\n\n @include breakpoint(medium) {\n padding-top: 0.4rem;\n }\n }\n\n .enp-quiz-share__input,\n .enp-quiz-styles__input {\n width: 100%;\n }\n\n .enp-quiz-styles__textarea--custom-css {\n font-family: Monaco,Consolas,\"Andale Mono\",\"DejaVu Sans Mono\",monospace;\n font-size: 0.9rem;\n min-height: 200px;\n }\n\n .enp-fieldset--section {\n padding: 1.6rem 1rem;\n\n &.enp-accordion-content--open {\n margin-bottom: 0;\n }\n }\n\n .enp-quiz-share--facebook {\n margin-bottom: 2rem;\n }\n\n @include radio-inline(enp-title-display);\n @include radio-inline(enp-mc-options-order);\n\n .enp-mc-options-order {\n margin-bottom: 1.6rem;\n }\n\n .enp-quiz-share__textarea {\n min-height: 7.6rem;\n margin-bottom: 2rem;\n\n @include breakpoint('medium') {\n min-height: 4.6rem;\n }\n\n @include breakpoint('large') {\n min-height: 7.6rem;\n }\n\n\n }\n\n .enp-preview-form__submit {\n margin-top: 1.6rem;\n margin-bottom: 1.6rem;\n }\n\n .enp-quiz-preview__title {\n @include small-uppercase;\n font-weight: 600;\n }\n\n .enp-preview-form__submit {\n @include btn;\n width: 100%;\n padding-top: 0.85rem;\n padding-bottom: 0.85rem;\n margin-bottom: 1rem;\n opacity: 0.8;\n text-shadow: 0px -1px 2px rgba(0,0,0,.6);\n\n &:hover,\n &:focus {\n opacity: 1;\n }\n }\n\n .enp-preview-form__submit--publish {\n width: 100%;\n position: relative;\n z-index: 99999999;\n padding: 1.05rem 1.8rem .95rem;\n }\n\n .enp-quiz-styles__iris-wrapper {\n position: relative;\n }\n\n // Fix for WP Color Picker formatting\n .iris-picker {\n box-sizing: content-box;\n position: relative;\n z-index: 9999999999;\n top: -1.2rem;\n margin-bottom: 1rem;\n padding-bottom: 3rem;\n padding-right: 30px;\n\n @include breakpoint(large) {\n position: absolute;\n top: -4px;\n left: 104%;\n }\n\n &:last-of-type {\n margin-bottom: 0;\n }\n\n .ui-slider-handle:focus,\n .ui-draggable-handle:focus .ui-slider-handle {\n box-shadow: 0 0 3px rgba(0,0,0,.75);\n }\n\n }\n\n .enp-quiz-styles__set-default {\n @include btn--ghost;\n font-size: 0.75rem;\n position: absolute;\n left: 10px;\n bottom: 10px;\n }\n\n .enp-iris__close {\n @include btn--reset;\n position: absolute;\n top: 5px;\n right: 5px;\n fill: #888;\n cursor: pointer;\n }\n\n .enp-quiz-styles__input--color {\n padding-left: 45px;\n }\n\n .enp-quiz-styles__color-demo {\n width: 30px;\n height: 30px;\n border: 1px solid #ccc;\n top: 8px;\n left: 8px;\n border-radius: 3px;\n\n position: absolute;\n }\n\n\n}\n","#enp-quiz {\n /* Removing flexbox layout temporarily\n * because it wasn't laying out correctly before content loading\n * It would snap into the correct layout after a resize or textarea highlight\n .enp-publish-page-container {\n &:before {\n @include breakpoint(medium) {\n position: absolute;\n top: 0;\n bottom: 0;\n left: -100%;\n width: 128%;\n content: '';\n background: #fff;\n border-right: 1px solid #ddd;\n }\n\n @include breakpoint(large) {\n width: 124%;\n }\n }\n\n .enp-quiz-message {\n @include breakpoint(medium) {\n margin-left: 33%;\n }\n\n @include breakpoint(large) {\n margin-left: 26%;\n }\n }\n }\n\n .enp-publish-page-flex-container {\n @include breakpoint(medium) {\n @include flex;\n align-items: stretch;\n flex-direction: row-reverse;\n }\n }\n\n .enp-publish-page__aside-container {\n\n @include breakpoint(medium) {\n position: relative;\n margin: 0 6% 0 0;\n padding: 0;\n width: 24%;\n }\n\n @include breakpoint(large) {\n margin: 0;\n //padding-left: 20px;\n width: 20%;\n }\n }\n\n .enp-share-quiz__container,\n .enp-ab-ad__container {\n @include breakpoint(medium) {\n padding: 0;\n border: none;\n }\n }\n */\n\n .enp-share-quiz__url {\n display: block;\n font-size: 1.5rem;\n line-height: 1.4;\n word-wrap: break-word;\n }\n\n @include share_icons(enp-share-quiz);\n\n .enp-share-quiz {\n justify-content: space-around;\n margin-bottom: 0;\n }\n}\n","#enp-quiz {\n .enp-ab-create__container {\n @include container--wide;\n width: 100%;\n background: $really_light_gray;\n padding-top: 3rem;\n padding-bottom: 3rem;\n }\n\n .enp-ab-create__form {\n @include container--thin;\n }\n\n .enp-ab-create__label {\n @include label--bold;\n }\n\n .enp-ab-create-title__textarea {\n @include input--xl;\n width: 100%;\n }\n\n .enp-ab-create__select {\n @include select--wide--chevron;\n }\n\n .enp-ab-create__submit {\n width: 100%;\n padding-top: 1em;\n padding-bottom: 1em;\n }\n}\n","#enp-quiz {\n\n &.enp-quiz__main {\n background: $background;\n }\n\n .enp-dash-container {\n @include container--wide;\n @include xpadding-vertical;\n // background: $really_light_gray;\n transition: all .25s $fastInEaseOut;\n }\n\n .enp-dash__section-header {\n display: block;\n margin-bottom: 0.325rem;\n\n @include breakpoint(medium) {\n display: flex;\n @include flex-bottom;\n justify-content: space-between;\n }\n\n }\n\n .enp-search-quizzes {\n display: block;\n @include breakpoint(small) {\n display: flex;\n @include flex-bottom;\n }\n\n }\n\n .enp-search-quizzes__form-item {\n margin-bottom: 0.6rem;\n display: block;\n\n @include breakpoint('small') {\n margin-bottom: 0;\n margin-right: 1rem;\n\n &:last-of-type {\n margin-right: 0;\n }\n }\n\n }\n\n .enp-quiz-search {\n position: relative;\n }\n\n .enp-search-quizzes__label {\n margin-bottom: 0;\n @include screen-reader-text ;\n }\n\n .enp-search-quizzes__select {\n padding: .3rem;\n border-radius: 3px;\n }\n\n .enp-quiz-search__input {\n max-width: 160px;\n margin: 0 0 0.1rem;\n padding: .3rem .3rem .3rem 26px;\n font-size: 0.85rem;\n }\n\n .enp-quiz-search__icon {\n position: absolute;\n bottom: 0.3rem;\n left: 0.2rem;\n width: 21px;\n height: 21px;\n }\n\n .enp-search-quizzes__button {\n padding: 0.2rem 0.8rem;\n }\n\n .enp-search-results-description {\n font-size: 0.85rem;\n }\n\n .enp-search-results-description__link {\n white-space: nowrap;\n }\n\n .enp-search-results-description__icon {\n width: 1.3em;\n height: 1.3em;\n position: relative;\n top: 4px;\n left: 2px;\n }\n\n .enp-dash__section-title {\n @include small-uppercase;\n margin-bottom: 0.325rem;\n }\n\n .enp-view-toggle {\n cursor: pointer;\n opacity: .5;\n display: none; // hide the buttons for small screens\n\n @include breakpoint(medium) {\n display: flex;\n }\n }\n\n .enp-view-toggle__active {\n opacity: 1;\n }\n\n .enp-sort-by {\n margin-left: 5px;\n }\n\n .enp-dash-list {\n @include flex-grid;\n }\n\n .enp-dash-item {\n @include flex-grid__item ;\n @include flex-spread-vertical;\n display: flex;\n flex-direction: column;\n align-content: flex-end;\n justify-content: flex-end;\n border: none;\n border-radius: 3px;\n background-color: $gray;\n }\n\n .enp-dash-item--published {\n box-shadow: inset 4px 0 0 $blue, 0 1px 0 rgba(0,0,0,.1);\n }\n\n .enp-dash-item--draft {\n box-shadow: inset 4px 0 0 lighten($blue, 45%), 0 1px 0 rgba(0,0,0,.1);\n }\n\n .enp-dash-item--remove {\n animation: removeElement .5s $fastInEaseOut forwards;\n }\n\n .enp-dash-list--list-view {\n .enp-dash-item {\n margin: 0 0 0.8rem;\n flex-basis: 100%;\n }\n }\n\n .enp-dash-item__spinner {\n @include flex-center ;\n position: absolute;\n top: 0;\n bottom: 0;\n left: 0;\n right: 0;\n background: rgba(245,216,216,0.8);\n width: 100%;\n animation: fadeIn .3s $fastInEaseOut;\n }\n\n .enp-dash-item__header {\n padding: 0.5rem 1rem;\n background: $light_gray;\n border-bottom: 1px solid $dark_gray;\n display: flex;\n justify-content: space-between;\n align-items: center;\n @include border-radius;\n }\n\n .enp-dash-item__title {\n @include flex-grid__title ;\n padding: 0;\n margin-bottom: 0;\n a {\n color: $blue;\n }\n }\n\n .enp-dash-item__content {\n padding: 0rem 0 0.375rem;\n position: relative;\n transition: all .2s $fastInEaseOut;\n }\n\n .enp-dash-item__meta {\n @include hint;\n font-size: 0.75rem;\n }\n\n .enp-dash-item__username {\n word-wrap: break-word;\n padding-left: 0.4rem;\n margin-left: 0.2rem;\n border-left: 1px solid #ddd;\n }\n\n .enp-dash-item__title--ab-test {\n padding-bottom: 0;\n }\n\n .enp-dash-item__ab-quizzes {\n @include ul-no-style;\n font-size: 0.85rem;\n color: $dark_gray;\n margin-bottom: 0.8rem;\n }\n\n .enp-dash-item__nav {\n @include ul-no-style;\n margin-bottom: 0;\n font-size: 0.85rem;\n }\n\n .enp-dash-item__nav__item {\n display: flex;\n margin: 0;\n width: 100%;\n padding: 12px;\n align-items: center;\n &:hover {\n background-color: $gray;\n .enp-dash-item__icon {\n fill: $red;\n }\n }\n a {\n font-weight: normal;\n color: $red;\n @include flex;\n align-items: center;\n\n &:focus {\n outline: 1px dotted $link;\n outline-offset: 1px;\n }\n }\n\n &:last-of-type {\n margin-right: 0;\n }\n }\n\n .enp-dash-item__delete {\n @include btn--reset;\n position: relative;\n padding: 0;\n cursor: pointer;\n @include flex;\n .enp-icon {\n fill: $darker_gray;\n }\n }\n .enp-dash-item__icon {\n fill: $darker_gray;\n width: 15px;\n height: 15px;\n margin-right: 10px;\n // min-width: 15%;\n }\n\n .enp-dash-item__nav--collapsible {\n display: none;\n position: absolute;\n z-index: 2;\n top: 53px;\n right: 1.5rem;\n width: 195px;\n background-color: #fff;\n text-align: left;\n transform: translate3d(0,0,0);\n transition: all .2s $fastInEaseOut;\n\n .enp-dash-item__nav__item {\n padding: 0.5rem 1rem;\n cursor: pointer;\n }\n }\n\n .enp-dash-item__menu-action {\n height: 24px;\n background: none;\n border: none;\n color: #444;\n padding: 0;\n bottom: 0.2rem;\n right: 1.5rem;\n top: 1.5rem;\n cursor: pointer;\n }\n\n .enp-dash-item__menu-action-wrap {\n max-width: 0;\n display: flex;\n flex-direction: column;\n align-items: flex-end;\n }\n\n .enp-dash-item__menu-action__icon {\n width: 15px;\n height: 15px;\n fill: $darker_gray;\n transition: all .3s $fastInEaseOut;\n }\n\n .enp-dash-item__menu-action__icon--bottom {\n \n }\n\n .enp-dash-item--menu-active {\n transform: translate3d(0,-3px,0);\n\n &.enp-dash-item--published {\n box-shadow: inset 4px 0 0 $green, 0 2px 2px rgba(0,0,0,.2);\n }\n\n &.enp-dash-item--draft {\n box-shadow: inset 4px 0 0 lighten($green, 25%), 0 2px 2px rgba(0,0,0,.2);\n }\n\n .enp-dash-item__menu-action__icon--bottom {\n transform: rotateX(180deg);\n }\n // .enp-dash-item__menu-action__icon--top {\n // transform: rotateX(-180deg) translateY(0px);\n // }\n\n .enp-dash-item__nav--collapsible {\n display: block;\n animation: slideInTop .25s $fastInEaseOut forwards;\n @include border-radius;\n @include box-shadow;\n }\n\n .enp-dash-item__content {\n opacity: 0.4;\n }\n\n }\n\n\n .enp-quiz-results {\n display: flex;\n justify-content: space-around;\n list-style: none;\n margin: 0.8rem 0 0;\n padding: 0;\n text-align: center;\n }\n\n .enp-quiz-results__item {\n\n margin: 0 2% 0 0;\n padding: 0;\n color: #454545;\n\n @media (max-width:280px) {\n width: 100%;\n padding: 0;\n margin-bottom: 0.6rem;\n }\n }\n\n .enp-quiz-results__number {\n font-size: 1.6rem;\n line-height: 1;\n position: relative;\n }\n\n .enp-dash-item--draft .enp-quiz-results__number {\n opacity: 0.5;\n }\n\n .enp-quiz-results__number--average-score {\n color: darken($green, 8);\n\n &:after {\n content: '%';\n font-size: .9rem;\n position: absolute;\n top: .3rem;\n right: -1rem;\n }\n }\n\n .enp-quiz-results__label {\n text-transform: uppercase;\n font-size: .7rem;\n font-weight: 300;\n color: #888;\n }\n\n\n .enp-quiz-list__view {\n @include flex-bottom;\n }\n\n .enp-dash-item--add-new {\n background: none;\n border: none;\n padding: 0;\n position: relative;\n\n @include breakpoint(medium) {\n min-height: 7rem;\n }\n\n }\n\n .enp-dash-link--add-new {\n @include btn--dashed--light;\n justify-content: flex-start;\n color: $link;\n padding: 1rem 1.2rem;\n\n\n @include breakpoint(medium) {\n @include small-uppercase;\n @include flex-center;\n flex-direction: column;\n position: absolute;\n top: 0;\n left: 0;\n right: 0;\n bottom: 0;\n }\n\n .enp-dash-link__icon {\n @include icon--circle;\n @include icon--normal;\n margin-right: 5px;\n\n @include breakpoint(medium) {\n width: 2rem;\n height: 2rem;\n margin: 0.8rem 0 0.2rem;\n }\n }\n\n &:hover {\n color: $link_hover;\n\n .enp-dash-link__icon {\n fill: #fff;\n background: $link_hover;\n }\n }\n\n }\n\n .enp-quiz-message--welcome p {\n color: $font;\n }\n\n // pagination\n .enp-paginate {\n @include ul-no-style ;\n @include flex-center ;\n font-size: 1rem;\n }\n\n .enp-paginate__link {\n @include flex-center ;\n margin: 0 0.2rem;\n padding: 0 0.4rem;\n border-radius: 3px;\n font-weight: normal;\n\n }\n\n .enp-paginate__link--current-page {\n border: 2px solid $blue;\n }\n\n .enp-paginate__item--last-page,\n .enp-paginate__item--first-page {\n display: flex;\n }\n\n .enp-paginate__item--first-page:after,\n .enp-paginate__item--last-page:before {\n content: '...';\n font-size: 1rem;\n position: relative;\n bottom: 0.2rem;\n opacity: 0.6;\n }\n\n .enp-paginate__item--no-gap {\n &:before,\n &:after {\n content:'';\n }\n }\n\n .enp-paginate__item--next-page {\n margin-left: 0.2rem;\n }\n\n .enp-paginate__item--previous-page {\n margin-right: 0.2rem;\n }\n}\n","#enp-quiz {\n .enp-quiz-breadcrumbs {\n @include flex-center;\n position: absolute;\n top: 0;\n width: 1000%;\n left: -500%;\n right: -500%;\n margin-left: auto;\n margin-right: auto;\n background: #fff;\n border-bottom: 1px solid #ddd;\n padding: 10px;\n z-index: 99999;\n }\n\n .enp-quiz-breadcrumbs__list {\n @include flex-inline;\n }\n\n .enp-quiz-breadcrumbs__item {\n @include flex-inline__item ;\n @include flex-center;\n fill: $link;\n margin-right: 5px;\n\n @include breakpoint(small) {\n margin-right: 10px;\n }\n }\n\n .enp-quiz-breadcrumbs__link--disabled {\n @include disabled;\n }\n\n .enp-quiz-breadcrumbs__link--active {\n @include btn--ghost;\n @include btn--thin;\n }\n\n .enp-quiz-breadcrumbs__link {\n font-size: 1rem;\n font-weight: 400;\n text-transform: none;\n letter-spacing: 0;\n }\n\n // JS\n .enp-quiz-breadcrumbs--fixed {\n top: 0;\n position: fixed;\n animation: navSlideIn .25s;\n }\n}\n","#enp-quiz {\n .enp-results-title {\n font-size: 1.6rem;\n text-align: center;\n padding: 3.2rem 20px 2.6rem;\n background: $really_light_gray;\n margin: -1.2rem 0 2rem;\n border-bottom: 1px solid #ddd;\n\n &:after {\n @include small-uppercase;\n display: block;\n content: \"RESULTS\";\n font-weight: normal;\n }\n }\n\n .enp-results__container {\n @include container--wide;\n display: block;\n\n @include breakpoint(large) {\n display: flex;\n @include flex-spread;\n }\n }\n\n .enp-results__container,\n .enp-quiz-scores__container,\n .enp-results-flow__container {\n @include media(max-medium) {\n padding: 8px;\n }\n }\n\n .enp-quiz-scores__container,\n .enp-results-flow__container {\n width: 100%;\n\n @include breakpoint(large) {\n width: 48%;\n }\n }\n\n .enp-quiz-scores {\n margin-top: 2.6rem;\n }\n\n .enp-quiz-score__line-chart {\n height: 300px;\n margin-bottom: 1rem;\n\n .ct-label {\n color: $font;\n }\n\n .ct-grid {\n stroke: #dadada;\n stroke-dasharray: 0;\n }\n\n .ct-line {\n stroke: $green;\n stroke-width: 2px;\n }\n\n .ct-point {\n stroke: $green;\n stroke-width: 8px;\n }\n }\n\n .enp-quiz-scores-table {\n width: 100%;\n max-width: 500px;\n margin: 0 auto;\n\n tr th {\n background-color: #fff;\n }\n }\n\n .enp-quiz-scores-table__label {\n padding-left: 5%;\n }\n\n .enp-quiz-scores-table__score {\n text-align: right;\n padding-right: 5%;\n }\n\n .enp-results-flow {\n position: relative;\n margin: 2rem auto;\n width: 320px;\n height: 320px;\n border-radius: 50%;\n\n @include media(300px) {\n left: -100px;\n }\n\n @include breakpoint(small) {\n width: 390px;\n height: 390px;\n }\n\n @include breakpoint(medium) {\n width: 450px;\n height: 450px;\n }\n\n @include breakpoint(large) {\n width: 400px;\n height: 400px;\n }\n\n }\n\n .enp-results-flow__section-title {\n @include screen-reader-text;\n }\n\n .enp-results-flow__item {\n border-radius: 50%;\n text-align: center;\n height: 100%;\n width: 100%;\n margin: 0 auto;\n left: 0;\n right: 0;\n padding: 12.5% 0 0;\n letter-spacing: 0.05rem;\n border: 2px solid $green;\n animation: 0.85s slideInBottom $fastInEaseOut forwards;\n }\n\n .enp-results-flow__item--total-views {\n background: #fff;\n }\n\n .enp-results-flow__item--quiz-starts {\n width: 65%;\n height: 65%;\n position: absolute;\n padding-top: 8%;\n bottom: 2.5%;\n background: lighten($green, 48);\n }\n\n .enp-results-flow__item--quiz-finishes {\n width: 35%;\n height: 35%;\n position: absolute;\n bottom: 5%;\n background: lighten($green, 35);\n }\n\n .enp-results-flow__title {\n @include small-uppercase;\n color: #444;\n font-size: .7rem;\n margin-bottom: 0px;\n\n @include breakpoint(medium) {\n font-weight: bold;\n margin-bottom: 2px;\n }\n }\n\n .enp-results-flow__number {\n font-weight: bold;\n font-size: 1.4rem;\n line-height: 1.2;\n }\n\n .enp-results-flow__number--total-views {\n font-size: 2rem;\n }\n\n .enp-results-flow__number--quiz-starts {\n font-size: 1.65rem;\n }\n\n .enp-results-flow__percentage {\n font-size: .8rem;\n font-weight: normal;\n position: relative;\n display: inline-block;\n top: -0.7em;\n left: -.1rem;\n color: #444;\n\n &:after {\n content: '%';\n position: absolute;\n right: -0.75rem;\n font-size: .7rem;\n color: #444;\n }\n }\n\n .enp-results-questions__section {\n @include section--alt;\n padding-top: 5rem;\n padding-bottom: 3rem;\n margin-top: 5rem;\n margin-bottom: 3rem;\n }\n\n .enp-results-questions__container {\n @include media(max-small) {\n padding-left: 8px;\n padding-right: 8px;\n }\n }\n\n .enp-results-questions__header {\n align-items: flex-start;\n flex-direction: column;\n\n @include breakpoint(small) {\n @include flex-spread;\n flex-direction: row;\n align-items: flex-end;\n }\n }\n\n .enp-results-questions__title {\n @include small-uppercase;\n }\n\n .enp-results-questions__key {\n @include small-uppercase;\n }\n\n .enp-results-questions {\n @include ul-no-style;\n }\n\n .enp-results-question {\n width: 100%;\n font-size: 1rem;\n padding: 0;\n margin-bottom: 1rem;\n }\n\n .enp-results-question__header {\n padding: 1rem 1.2rem;\n position: relative;\n }\n\n .enp-results-question__question,\n .enp-results-question__stats {\n font-size: 1rem;\n line-height: 1.4;\n }\n\n .enp-results-question__question {\n font-weight: normal;\n\n @include breakpoint(small) {\n padding-right: 7em;\n margin-bottom: 0;\n }\n }\n\n .enp-results-question__stats {\n font-size: .9rem;\n\n @include breakpoint(small) {\n position: absolute;\n bottom: 1rem;\n right: 1.2rem;\n text-align: right;\n }\n }\n\n .enp-results-questions__key,\n .enp-results-question__stats {\n font-weight: 300;\n }\n\n .enp-results-question__content {\n padding: 2rem 1.2rem 1.2rem;\n @include border-radius;\n }\n\n .enp-results-question__deep-stats {\n @include flex-spread-around;\n @include ul-no-style;\n text-align: center;\n\n @include media(500px) {\n flex-wrap: wrap;\n }\n }\n\n .enp-results-question__deep-stat {\n\n @include media(500px) {\n width: 48%;\n margin: 0 2% 2% 0;\n padding: 1.6rem 0;\n\n &:nth-child(even) {\n margin-right: 0;\n }\n }\n\n @include media(280px) {\n width: 100%;\n padding: 0;\n margin-bottom: 1.6rem;\n }\n }\n\n .enp-results-question__deep-stat__number {\n font-size: 1.8rem;\n line-height: 1;\n position: relative;\n }\n\n .enp-results-question__deep-stat__number--finishes,\n .enp-results-question__deep-stat__number--correct {\n @include dark-green;\n }\n\n .enp-results-question__deep-stat__number--incorrect {\n @include fade-red;\n }\n\n .enp-results-question__deep-stat__number--correct,\n .enp-results-question__deep-stat__number--incorrect,\n .enp-results-question__deep-stat__number--finishes {\n &:after {\n content: '%';\n font-size: .9rem;\n position: absolute;\n top: .3rem;\n right: -1rem;\n }\n }\n\n .enp-results-question__deep-stat__label {\n @include small-uppercase;\n font-size: .8rem;\n }\n\n .enp-results-question__options {\n @include ul-no-style;\n margin-bottom: 0;\n }\n\n .enp-results-question__option {\n padding: 0.8rem 0.8rem 0.8rem 0.4rem;\n border-top: 1px solid #ddd;\n @include media(max-small) {\n position: relative;\n flex-direction: column;\n }\n\n @include breakpoint(small) {\n @include flex-spread;\n flex-direction: row;\n }\n\n &:first-of-type {\n margin-top: 1.4rem;\n }\n\n }\n\n .enp-results-question__option--correct {\n background: lighten($green, 48);\n }\n\n .enp-results-question__option__text {\n flex-grow: 100;\n margin-right: 1rem;\n }\n\n .enp-results-question__option__text__helper {\n font-weight: 300;\n @include small-uppercase;\n margin-right: 0.4rem;\n }\n\n .enp-results-question__option__icon {\n @include media(max-small) {\n position: relative;\n left: -3px;\n }\n\n @include breakpoint(small) {\n margin-right: 0.3rem;\n min-width: 1.6rem;\n }\n }\n\n .enp-results-question__option__icon--incorrect {\n fill: $fade_red;\n opacity: 0.5;\n }\n\n .enp-results-question__option__icon--correct {\n fill: $dark_green;\n opacity: 1;\n }\n\n .enp-results-question__option__percentage--incorrect {\n @include fade-red;\n }\n\n .enp-results-question__option__percentage--correct {\n @include dark-green;\n }\n\n .enp-results-question__option__number-selected {\n font-weight: 300;\n\n @include media(max-small) {\n position: absolute;\n top: 0.8rem;\n right: 0.8rem;\n }\n }\n\n .enp-slider-responses__title {\n @include small-uppercase;\n font-weight: 400;\n margin-top: 1.6rem;\n }\n\n .enp-slider-responses__line-chart {\n .ct-point {\n stroke-width: 8px;\n }\n }\n\n .enp-slider-responses__line-chart--low,\n .enp-slider-responses__line-chart--high {\n stroke: $red;\n }\n\n .enp-slider-responses__line-chart--correct {\n stroke: $green;\n }\n\n .enp-slider-responses-table {\n width: 100%;\n }\n\n .enp-slider-responses-table tr:nth-child(even) td {\n background-color: #fff;\n }\n\n .enp-slider-responses-table tr.enp-slider-responses-table__response--correct td {\n background-color: lighten($green, 48);\n }\n\n .enp-slider-responses-table__content {\n box-shadow: none;\n padding-top: 1rem;\n }\n\n .enp-slider-responses-table--hide-zero {\n .enp-slider-responses-table__frequency--zero {\n display: none;\n }\n }\n\n .enp-slider-responses-table__response-frequency {\n @include flex-spread ;\n align-items: center;\n }\n\n .enp-slider-responses-table__toggle-zero-frequency {\n @include accordion__header ;\n width: auto;\n padding: 0 0.6rem;\n margin: 0;\n }\n\n\n\n}\n\n.enp-quiz-results {\n #enp-quiz .enp-aside {\n border: none;\n }\n\n .enp-results-questions__title__quiz-title {\n @include screen-reader-text;\n }\n}\n","#enp-quiz {\n\n .enp-results--ab {\n display: block;\n margin-bottom: 3rem;\n\n @include breakpoint(large) {\n display: flex;\n flex-wrap: wrap;\n align-content: flex-end;\n width: 50%;\n padding: 10px;\n }\n\n }\n\n .enp-results--a {\n @include breakpoint(large) {\n padding-right: 1rem;\n border-right: 1px solid #ddd;\n }\n }\n\n .enp-results--b {\n @include breakpoint(large) {\n padding-left: 1rem;\n }\n }\n\n .enp-results-title--ab,\n .enp-results__container--ab .enp-results-flow__container {\n min-width: 100%;\n }\n\n .enp-results--loser {\n .enp-results-flow__item {\n border: 2px solid $red;\n }\n\n .enp-results-flow__item--quiz-starts {\n background: lighten($red, 42);\n }\n\n .enp-results-flow__item--quiz-finishes {\n background: lighten($red, 34);\n }\n\n th,\n .enp-results-questions__title {\n color: $dark_red;\n }\n\n }\n\n .enp-results--winner {\n th,\n .enp-results-questions__title {\n color: $dark_green;\n }\n\n }\n\n .enp-results-title--a,\n .enp-results-title--b {\n background: transparent;\n }\n\n .enp-ab-scores {\n @include container--wide;\n\n th.enp-quiz-scores-table__label,\n th.enp-quiz-scores-table__score {\n padding-left: 0;\n padding-right: 0;\n }\n }\n\n .enp-ab-scores__title {\n padding-left: 50px;\n @include small-uppercase;\n }\n\n .enp-quiz-score__line-chart .enp-test-loser {\n\n .ct-line,\n .ct-point {\n stroke: $red;\n }\n }\n\n .enp-quiz-scores {\n margin-top: 0;\n }\n\n .enp-question-results,\n .enp-ab-scores .enp-quiz-scores-table {\n margin-bottom: 1.6rem;\n\n @include breakpoint(large) {\n float: left;\n width: 48%;\n margin: 0;\n\n &:first-of-type {\n margin-right: 4%;\n }\n }\n }\n\n .enp-question-results__container {\n @include container--wide;\n }\n\n .enp-question-results--ab {\n\n .enp-results-questions__section {\n background: #fff;\n border: none;\n padding: 1.6rem 0;\n margin: 1.6rem auto;\n }\n\n .enp-results-questions__container {\n padding: 0;\n }\n\n }\n\n .enp-ab-new-embed-code__section {\n @include container--thin;\n max-width: 540px;\n padding-bottom: 2rem;\n margin-bottom: 2rem;\n\n .enp-ab-embed-code {\n padding: 0;\n margin: 0;\n }\n }\n\n .enp-ab-embed-code__section {\n @include section--alt;\n padding-top: 5rem;\n margin-top: 5rem;\n }\n\n .enp-ab-embed-code {\n @include container;\n }\n\n .enp-ab-embed-code__title {\n @include small-uppercase;\n }\n\n .enp-embed-code__textarea {\n margin-bottom: 0;\n }\n\n .enp-embed-code__instructions {\n font-size: 1.1rem;\n }\n}\n","#enp-quiz {\n\n .enp-slider {\n margin-bottom: 1.6rem;\n }\n\n .enp-slider-input__container {\n display: flex;\n align-items: center;\n justify-content: center;\n margin: 1.6rem auto;\n position: relative;\n }\n\n .enp-slider-input__label {\n @include label;\n }\n\n .enp-slider-input__prefix,\n .enp-slider-input__suffix {\n font-size: 1rem;\n }\n\n .enp-slider-input__prefix {\n margin-right: .2rem;\n white-space: pre;\n }\n\n .enp-slider-input__suffix {\n margin-left: .2rem;\n white-space: pre;\n }\n\n .enp-slider-input__input {\n @include input;\n margin-bottom: 0;\n padding: .75rem;\n width: auto;\n transition: all .25s $fastInEaseOut;\n }\n\n .enp-slider-input__input--incorrect {\n color: $red;\n }\n\n .enp-slider-input__input--correct {\n color: $dark_green;\n }\n\n .enp-slider-input__input--invalid-animation {\n box-shadow: 0 0 2px 1px $fade_red;\n }\n\n .enp-slider_input__range-helper {\n position: absolute;\n bottom: -1.2rem;\n font-size: 0.8rem;\n }\n\n .enp-slider_input__range-helper--low {\n left: 0;\n }\n\n .enp-slider_input__range-helper--high {\n right: 0;\n }\n\n .enp-slider-input__range-helper__number {\n position: relative;\n color: $dark_gray;\n }\n\n .enp-slider_input__range-helper__number--low {\n\n }\n\n .enp-slider_input__range-helper__number--high {\n\n }\n\n .ui-slider-range-show-correct__tooltip-container {\n position: relative;\n }\n\n .ui-slider-range-show-correct__tooltip {\n position: absolute;\n top: -0.4rem;\n margin-left: -0.55rem;\n height: 1rem;\n width: 1.1rem;\n height: 1.1rem;\n border: 2px solid $green;\n background-color: #fff;\n border-radius: 50%;\n z-index: 9999;\n }\n\n .ui-slider-range-show-correct__tooltip--low {\n left: 0;\n }\n\n .ui-slider-range-show-correct__tooltip--high {\n right: -0.55rem;\n }\n\n .ui-slider-range-show-correct__tooltip__text {\n position: relative;\n color: darken($green, 15);\n top: -1.35rem;\n font-size: .825rem;\n min-width: 100%;\n display: inline-block;\n text-align: center;\n text-shadow: 0 1px 0 #fff;\n }\n\n .ui-slider-range-show-correct__tooltip__text--low {\n\n }\n\n .ui-slider-range-show-correct__tooltip__text--high {\n\n }\n\n .ui-slider-range-show-correct__tooltip__text--low-center {\n //left: 0; // not perfectly centered for huge numbers, but is for small numbers\n }\n\n // JQUERY SLIDER\n .enp-slider {\n\t\tposition: relative;\n\t\ttext-align: left;\n\t\tbackground: #ddd;\n\n\t\t/* Layout helpers\n\t\t----------------------------------*/\n\t\t.ui-helper-hidden {\n\t\t\tdisplay: none;\n\t\t}\n\t\t.ui-helper-hidden-accessible {\n\t\t\tborder: 0;\n\t\t\tclip: rect(0 0 0 0);\n\t\t\theight: 1px;\n\t\t\tmargin: -1px;\n\t\t\toverflow: hidden;\n\t\t\tpadding: 0;\n\t\t\tposition: absolute;\n\t\t\twidth: 1px;\n\t\t}\n\t\t.ui-helper-reset {\n\t\t\tmargin: 0;\n\t\t\tpadding: 0;\n\t\t\tborder: 0;\n\t\t\toutline: 0;\n\t\t\tline-height: 1.3;\n\t\t\ttext-decoration: none;\n\t\t\tfont-size: 100%;\n\t\t\tlist-style: none;\n\t\t}\n\t\t.ui-helper-clearfix:before,\n\t\t.ui-helper-clearfix:after {\n\t\t\tcontent: \"\";\n\t\t\tdisplay: table;\n\t\t\tborder-collapse: collapse;\n\t\t}\n\t\t.ui-helper-clearfix:after {\n\t\t\tclear: both;\n\t\t}\n\t\t.ui-helper-clearfix {\n\t\t\tmin-height: 0; /* support: IE7 */\n\t\t}\n\t\t.ui-helper-zfix {\n\t\t\twidth: 100%;\n\t\t\theight: 100%;\n\t\t\ttop: 0;\n\t\t\tleft: 0;\n\t\t\tposition: absolute;\n\t\t\topacity: 0;\n\t\t\tfilter:alpha(opacity=0); /* support: IE8 */\n\t\t}\n\n\t\t.ui-front {\n\t\t\tz-index: 100;\n\t\t}\n\n\n\t\t/* Interaction Cues\n\t\t----------------------------------*/\n\t\t.ui-state-disabled {\n\t\t\tcursor: default !important;\n\t\t}\n\n\n\t\t/* Icons\n\t\t----------------------------------*/\n\n\t\t/* states and images */\n\t\t.ui-icon {\n\t\t\tdisplay: block;\n\t\t\ttext-indent: -99999px;\n\t\t\toverflow: hidden;\n\t\t\tbackground-repeat: no-repeat;\n\t\t}\n\n\n\t\t/* Misc visuals\n\t\t----------------------------------*/\n\n\t\t/* Overlays */\n\t\t.ui-widget-overlay {\n\t\t\tposition: fixed;\n\t\t\ttop: 0;\n\t\t\tleft: 0;\n\t\t\twidth: 100%;\n\t\t\theight: 100%;\n\t\t}\n\n\t\t.ui-slider-handle {\n\t\t\tbackground: #fff;\n\t\t\tborder-radius: 50%;\n\t\t\tborder: 1px solid #aaa;\n\t\t\tposition: absolute;\n\t\t\tz-index: 2;\n\t\t\twidth: 1.2rem;\n\t\t\theight: 1.2rem;\n top: -.4rem;\n\t\t\tmargin-left: -.6rem;\n\t\t\tcursor: default;\n\t\t\t-ms-touch-action: none;\n\t\t\ttouch-action: none;\n\t\t\ttransition: opacity 0.2s $fastInEaseOut, height .18s $fastInEaseOut, width .18s $fastInEaseOut, transform 0.18s $fastInEaseOut;\n\n @include media(max-medium) {\n width: 2rem;\n \t\t\theight: 2rem;\n top: -.85rem;\n margin-left: -1rem;\n transform: rotate(225deg);\n }\n\n\t\t\t&:focus {\n\t\t\t\toutline: none;\n\t\t\t\tbox-shadow: 0 0 3px 1px #4D90FE;\n\t\t\t}\n\n &.ui-state-active {\n @include media(max-medium) {\n width: 2.2rem;\n height: 2.2rem;\n border-top-left-radius: 0;\n transform: translate3d(-0.2rem, -0.8rem, 0) rotate(225deg);\n }\n\n }\n\n\t\t}\n\n .ui-slider-handle--correct,\n\t\t.ui-slider-handle--incorrect {\n width: 1.1rem;\n\t\t\theight: 1.1rem;\n top: -.4rem;\n margin-left: -.55rem;\n }\n\n .ui-slider-handle--incorrect {\n z-index: 1;\n\t\t\tborder: 2px solid $red;\n\t\t}\n\n .ui-slider-handle--correct {\n border: 2px solid $green;\n z-index: 99999;\n }\n\n\t\t.ui-slider-range {\n\t\t\tposition: absolute;\n\t\t\tz-index: 1;\n\t\t\tfont-size: .7rem;\n\t\t\tdisplay: block;\n\t\t\tborder: 0;\n\t\t\tbackground-position: 0 0;\n\t\t\ttop: 0;\n\t\t\theight: 100%;\n\t\t}\n\n .ui-slider-range-show-correct {\n background: $green;\n z-index: 9;\n }\n\n\t\t.ui-slider-range-min {\n\t\t\tleft: 0;\n\t\t\tbackground: $green;\n\t\t}\n\n\t\t.ui-slider-range-max {\n\t\t\tright: 0;\n\t\t}\n\n\t\t/* support: IE8 - See #6727 */\n\t\t&.ui-state-disabled .ui-slider-handle,\n\t\t&.ui-state-disabled .ui-slider-range {\n\t\t\tfilter: inherit;\n\t\t}\n\t}\n\n\t.ui-slider-horizontal {\n\t\theight: .3rem;\n\t}\n\n\t.enp-question__answered {\n\t\t.enp-slider {\n\t\t\tbackground: #bbb;\n\t\t}\n\n\t\t.ui-slider-range-min {\n\t\t\tbackground: #fff;\n\t\t}\n\n\t}\n\n}\n"]} \ No newline at end of file +{"version":3,"sources":["_setup.scss","_utilities.scss","_variables.scss","_structure.scss","_typography.scss","_animations.scss","_base.scss","_forms.scss","_quiz-create.scss","_quiz-preview.scss","_quiz-publish.scss","_ab-create.scss","_dashboard.scss","_breadcrumbs.scss","_quiz-results.scss","_ab-results.scss","../../../quiz-take/css/sass/_slider.scss"],"names":[],"mappings":"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","file":"enp_quiz-create.min.css","sourcesContent":["html {\n font-size: 16px!important; // set our rem value reference\n}\n\nhtml #enp-quiz {\n box-sizing: border-box;\n}\n\nbody #enp-quiz {\n background: #fff;\n overflow: hidden;\n}\n\n#enp-quiz {\n *, *:before, *:after {\n box-sizing: inherit;\n }\n\n ul, ol {\n margin: 0 0 1.6rem 1.25rem;\n padding: 0;\n }\n\n textarea {\n margin-bottom: 1rem;\n }\n\n button, input[type=\"button\"], input[type=\"reset\"], input[type=\"submit\"] {\n border: none;\n &:active,\n &:focus,\n &:hover {\n border: none;\n }\n }\n\n iframe {\n border: none;\n }\n}\n","@mixin focus--glow {\n outline-color: #4D90FE;\n outline-offset: -2px;\n outline-style: auto;\n outline-width: 5px;\n}\n\n@mixin disabled {\n opacity: 0.65;\n cursor: default;\n}\n\n@mixin btn {\n text-align: center;\n border: none;\n border-radius: 3px;\n padding: .85em 1.4em .75em;\n font-size: 15px;\n font-weight: 400;\n letter-spacing: .05em;\n color: #fff;\n box-shadow: inset 0 -2px 0 rgba(0,0,0,.2);\n background: $link;\n cursor: pointer;\n text-transform: uppercase;\n transition: all .2s;\n line-height: 1.6;\n\n &:focus,\n &:hover {\n color: #fff;\n box-shadow: none;\n background: $link_hover;\n }\n\n &:active {\n color: #fff;\n box-shadow: inset 0 2px 0 rgba(0,0,0,.1);\n background: lighten($blue, 20);\n }\n\n &:focus {\n @include focus--glow;\n }\n\n &:disabled,\n &:disabled:focus,\n &:disabled:hover {\n background: $link;\n cursor: default;\n opacity: .5;\n\n\n }\n}\n\n@mixin btn--reset {\n border: none;\n background: none;\n box-shadow: none;\n padding: 0;\n margin: 0;\n}\n\n@mixin btn--submit {\n @include btn;\n}\n\n@mixin btn--ghost {\n @include btn;\n border: 2px solid $link;\n background: transparent;\n color: $link;\n box-shadow: none;\n\n &:focus,\n &:hover {\n background: transparent;\n border: 2px solid $link_hover;\n color: $link_hover;\n }\n}\n\n@mixin box-shadow {\n box-shadow: 0 2px 2px rgba(0,0,0,.2);\n}\n\n@mixin btn--dashed {\n @include btn;\n border: 1px dashed $dark_gray;\n background: none;\n color: #545454;\n box-shadow: none;\n\n &:hover,\n &:focus {\n border: 1px dashed $darker_gray;\n color: $darker_gray;\n background: rgba(255,255,255,.9);\n }\n}\n\n@mixin btn--dashed--light {\n @include btn--dashed;\n border: 2px dashed $gray;\n color: $dark_gray;\n transition: all .2s;\n\n &:hover,\n &:focus {\n color: $darker_gray;\n border: 2px dashed #999;\n }\n}\n\n@mixin btn--dashed--light--alt-bg {\n @include btn--dashed--light ;\n background: $light_gray;\n}\n\n@mixin btn--small {\n font-size: 13px;\n}\n\n@mixin btn--thin {\n padding: 0.4em 1em;\n}\n\n@mixin btn--icon {\n @include btn;\n padding: .75em 0.8em .7em 1.4em;\n}\n\n@mixin btn--icon__icon {\n @include icon--white;\n @include icon--xl;\n position: relative;\n top: 4px;\n}\n\n/*\n* @usage: @include btn--icon(BEM-root-class);\n* Button with icon with white circular background.\n* --------------\n* | BTN TEXT > |\n* --------------\n* @param $rootBEM: root class name that will be extended\n\n@mixin btn--icon($rootBEM) {\n .(#){$rootBEM} {\n @include btn--icon;\n }\n\n .(#){$rootBEM}__icon {\n @include btn--icon__icon ;\n }\n}\n*/\n\n@mixin btn--icon--icon-circle {\n @include btn;\n padding: .65em 1.2em .85em 1.4em;\n}\n\n// use when the icon is larger and on the right\n@mixin btn--icon__icon--circle {\n @include icon--circle;\n @include icon--white-bg;\n @include icon--normal;\n margin-left: 0.5em;\n position: relative;\n top: 0.15rem;\n}\n\n@mixin btn--icon__icon--circle--hover {\n @include icon--white-bg--hover;\n}\n\n/*\n* @usage: @include btn--icon--circle(BEM-root-class);\n* Button with icon with white circular background.\n* ---------------\n* | BTN TEXT (>) |\n* ---------------\n* @param $rootBEM: root class name that will be extended\n*/\n@mixin btn--icon--circle($rootBEM) {\n .#{$rootBEM} {\n @include btn--icon--icon-circle;\n }\n\n .#{$rootBEM}__icon {\n @include btn--icon__icon--circle ;\n\n\n &:hover {\n @include btn--icon__icon--circle--hover ;\n }\n }\n}\n\n/*\n* @usage: @include btn--icon--hover-circle(BEM-root-class);\n* Button with icon. Hovering/focusing button moves\n* the icon to right and fades in a white circular background\n* -------------- ----------------\n* | BTN TEXT > | --hover/focus--> | BTN TEXT (>) |\n* -------------- ----------------\n* @param $rootBEM: root class name that will be extended\n*/\n@mixin btn--icon--hover-circle($rootBEM) {\n .#{$rootBEM} {\n @include btn--icon--icon-circle;\n padding-right: 0.8em;\n }\n\n .#{$rootBEM}__icon {\n @include btn--icon__icon--circle ;\n margin-left: 0;\n width: 1.6em;\n height: 1.6em;\n background: transparent;\n fill: #fff;\n transform: translate3d(0, 0, 0);\n transition: all .3s ease-in-out;\n }\n\n .#{$rootBEM}:hover .#{$rootBEM}__icon {\n @include btn--icon__icon--circle--hover ;\n transform: translate3d(1em, 0, 0);\n margin-right: 1em;\n }\n\n\n}\n\n// use on small icons and placed on the left\n@mixin btn--icon__icon--circle--small {\n @include icon--circle--small;\n margin-right: 5px;\n}\n\n\n// use this to match the icon to the inline font-size\n@mixin icon--inline {\n width: 1em;\n height: 1em;\n position: relative;\n top: .125em;\n}\n\n@mixin icon--small {\n width: 1rem;\n height: 1rem;\n}\n\n@mixin icon--normal {\n width: 1.2rem;\n height: 1.2rem;\n}\n\n@mixin icon--large {\n width: 1.5rem;\n height: 1.5rem;\n}\n\n@mixin icon--xl {\n width: 1.8rem;\n height: 1.8rem;\n}\n\n@mixin icon--xxl {\n width: 2.4rem;\n height: 2.4rem;\n}\n\n@mixin icon--xxxl {\n width: 2.8rem;\n height: 2.8rem;\n}\n\n@mixin icon--circle {\n border-radius: 50%;\n background: $blue;\n fill: #fff;\n}\n\n@mixin border-radius {\n border-radius: 3px;\n}\n\n@mixin icon--circle--pad {\n @include icon--circle ;\n padding: 0.05em;\n\n @include breakpoint(medium) {\n padding: 0.15em;\n }\n}\n\n@mixin icon--circle--pad--xl {\n @include icon--circle ;\n padding: 0.6rem;\n}\n\n@mixin icon--circle--small {\n @include icon--small;\n @include icon--circle;\n padding: 0.02rem;\n}\n\n@mixin icon--white {\n fill: #fff;\n}\n\n@mixin icon--white-bg {\n background: #fff;\n fill: $link;\n}\n\n@mixin icon--white-bg--hover {\n background: #fff;\n fill: $link_hover;\n}\n\n@mixin icon--gray-bg {\n background: $dark_gray;\n fill: $light_gray;\n}\n\n@mixin icon--gray-bg--hover {\n fill: #fff;\n background: $darker_gray;\n}\n\n@mixin small-uppercase {\n font-size: 1rem;\n text-transform: uppercase;\n}\n\n@mixin hint {\n font-size: .7rem;\n font-weight: 300;\n color: #565656;\n}\n\n@mixin green {\n color: $green;\n}\n\n@mixin dark-green {\n color: $dark_green;\n}\n\n@mixin red {\n color: $red;\n}\n\n@mixin fade-red {\n color: $fade_red;\n}\n\n/* Text meant only for screen readers */\n@mixin screen-reader-text {\n clip: rect(1px, 1px, 1px, 1px);\n position: absolute !important;\n left:-10000px;\n top:auto;\n width:1px;\n height:1px;\n overflow:hidden;\n}\n\n@mixin screen-reader-text--hover {\n background-color: #f1f1f1;\n border-radius: 3px;\n box-shadow: 0 0 2px 2px rgba(0, 0, 0, 0.6);\n clip: auto !important;\n color: #21759b;\n display: block;\n font-size: 14px;\n font-weight: bold;\n height: auto;\n left: 5px;\n line-height: normal;\n padding: 15px 23px 14px;\n text-decoration: none;\n top: 5px;\n width: auto;\n z-index: 100000;\n}\n\n@mixin xmargin-vertical {\n margin-top: 2rem;\n margin-bottom: 2rem;\n}\n\n@mixin xmargin-horizontal {\n margin-right: 2rem;\n margin-left: 2rem;\n}\n\n@mixin xpadding-vertical {\n padding-top: 2rem;\n padding-bottom: 2rem;\n}\n\n@mixin xpadding-horizontal {\n padding-right: 2rem;\n padding-left: 2rem;\n}\n\n@mixin ul-no-style {\n list-style: none;\n margin-left: 0;\n}\n\n@mixin hidden--accessible {\n height: 0;\n opacity: 0;\n padding: 0;\n overflow: hidden;\n}\n\n@mixin accordion {\n background: #fff;\n width: 100%;\n}\n\n@mixin accordion__header {\n @include accordion ;\n box-shadow: inset 1px 1px 0 #ccc, inset -1px -1px 0 #ccc;\n color: $font;\n font-family: $fontTitle;\n font-size: .9rem;\n font-weight: 400;\n line-height: 1.5;\n text-transform: none;\n letter-spacing: 0;\n text-align: left;\n border: none;\n border-radius: 3px;\n min-height: 3.065rem;\n padding: 1rem 2rem 1rem 1rem;\n margin: 1.6rem 0 0;\n position: relative;\n z-index: 9;\n cursor: pointer;\n transition: all .2s $fastInEaseOut;\n}\n\n@mixin accordion__content {\n @include accordion ;\n box-shadow: inset 1px -1px 0 #ccc, inset -1px -1px 0 #ccc;\n display: block;\n position: relative;\n height: auto;\n overflow: visible;\n margin-bottom: 1.6rem;\n}\n\n@mixin accordion__content--closed {\n margin-top: 0;\n padding-top: 0rem;\n animation: slideOutTop .25s $fastInEaseOut forwards;\n display: none;\n}\n\n@mixin accordion__content--open {\n padding-top: 1.6rem;\n margin-bottom: 2rem;\n animation: slideInTop .45s $fastInEaseOut forwards;\n}\n\n// Share Icons\n@mixin share_icons($rootBEM) {\n\n .#{$rootBEM} {\n @include ul-no-style;\n @include flex-center;\n }\n\n .#{$rootBEM}__item {\n margin-right: 20px;\n\n &:last-child {\n margin-right: 0;\n }\n }\n\n .#{$rootBEM}__item__icon {\n @include icon--xxl;\n @include icon--circle--pad--xl;\n\n fill: #fff!important;\n }\n\n .#{$rootBEM}__item__icon--facebook {\n background-color: #3a5795;\n }\n\n .#{$rootBEM}__item__icon--twitter {\n background-color: #4099ff;\n }\n}\n\n@mixin section--alt {\n background: $light_gray;\n border-bottom: 1px solid #ddd;\n border-top: 1px solid #ddd;\n padding-top: 3rem;\n padding-bottom: 3rem;\n margin-top: 3rem;\n margin-bottom: 3rem;\n}\n\n#enp-quiz {\n .enp-screen-reader-text {\n @include screen-reader-text;\n }\n\n .enp-screen-reader-text:hover,\n .enp-screen-reader-text:active,\n .enp-screen-reader-text:focus {\n @include screen-reader-text--hover;\n }\n\n .enp-accordion-header {\n @include accordion__header ;\n\n &:first-of-type {\n margin-top: 0;\n }\n\n .enp-accordion-header__icon {\n position: absolute;\n fill: $dark_gray;\n right: 0.75rem;\n bottom: 0.75rem;\n transition: all .35s $fastInEaseOut;\n }\n }\n\n .enp-accordion-header--open {\n\n .enp-accordion-header__icon {\n transform: rotateX(180deg) translateY(2px);\n }\n\n }\n\n .enp-accordion-content {\n @include accordion__content ;\n }\n\n .enp-accordion-content--closed {\n @include accordion__content--closed ;\n }\n\n .enp-accordion-content--open {\n @include accordion__content--open ;\n }\n\n .enp-quiz-message {\n @include container--thin;\n background: #fff;\n border: 1px solid #eee;\n border-bottom: 1px solid #ccc;\n padding: 1rem 0.375rem;\n margin-bottom: 1.6rem;\n position: fixed;\n bottom: 0;\n left: 0;\n }\n\n .enp-quiz-message__title {\n @include small-uppercase;\n }\n\n .enp-message__list {\n @include ul-no-style;\n font-size: 1.1rem;\n margin-bottom: 0;\n }\n\n .enp-quiz-message--error {\n border-left: 6px solid $red;\n color: $red;\n }\n\n .enp-quiz-message__title--error {\n color: $dark_red;\n }\n\n .enp-quiz-message--success {\n border-left: 6px solid $green;\n color: $dark_green;\n }\n\n .enp-quiz-message__title--success {\n color: $dark_green;\n }\n\n .enp-quiz-message--note {\n border-left: 6px solid $khaki;\n }\n\n .enp-quiz-message__title--note {\n color: $dark_blue;\n }\n\n .enp-quiz-message__close {\n @include btn--reset;\n position: absolute;\n top: 5px;\n right: 5px;\n }\n\n .enp-quiz-message--ajax {\n margin-bottom: .6rem;\n animation: slideInBottom .3s;\n }\n\n .enp-quiz-message-ajax-container {\n z-index: 9999;\n position: fixed;\n bottom: 10px;\n }\n\n .enp-quiz-message--saving__spinner {\n margin-left: -10px;\n }\n\n .enp-quiz-message--saving__text {\n font-size: 1rem;\n }\n\n textarea.limited-chars,\n input.limited-chars {\n margin-bottom: 0.2rem;\n }\n\n .limited-chars__container {\n color: lighten($dark_gray, 8);\n font-size: 0.8rem;\n display: block;\n text-align: right;\n margin-bottom: 1.2rem;\n }\n\n .limited-chars__counter {\n color: $dark_gray;\n }\n\n .limited-chars__container--error {\n color: $dark_red;\n\n .limited-chars__counter {\n color: $dark_red;\n }\n }\n\n textarea.has-error,\n input.has-error {\n border: 1px solid $red;\n &:focus {\n outline-color: $red;\n }\n\n }\n\n\n\n .enp-tooltip {\n position: relative;\n }\n\n .enp-tooltip__activator {\n\n &:focus + .enp-tooltip__description,\n &:focus > .enp-tooltip__description {\n display: block;\n }\n }\n\n .enp-tooltip__description {\n display: none;\n position: absolute;\n left: 103%;\n margin-bottom: 2rem;\n border-radius: 3px;\n background: $light_gray;\n font-size: 0.9rem;\n padding: 0.9rem;\n max-width: 200px;\n }\n\n\n}\n\n.enp-sticky {\n position: relative;\n left: 0;\n right: 0;\n top: 0;\n z-index: 999;\n\n &.enp-sticky--fixed {\n position: fixed;\n }\n}\n\n.enp-breadcrumb-link {\n font-size: 0.85rem;\n}\n\n.enp-breadcrumb-link__icon {\n position: relative;\n top: 0.45rem;\n left: 0.4rem;\n}\n","//fonts\n$fontBody : Arial,monospace, helvetica, arial, sans-serif;\n$fontTitle : Arial,monospace, helvetica, arial, sans-serif;\n\n// // // colors\n$font : #1d1c25;\n$background: #FAF9FB;\n$title : #5D5E5F;\n\n// Blues\n$blue: #1E1C26;\n$dark_blue: #242f42;\n$light_blue: lighten($blue, 100);\n\n// Grays\n$light_gray: #FAF9FB;\n$really_light_gray: #F8F8F8;\n$gray: darken($light_gray, 2);\n$dark_gray: darken($gray, 5);\n$darker_gray: darken($dark_gray, 20);\n\n// Other colors\n$khaki: #CCA562;\n$green: #60AAAD;\n$dark_green: darken($green, 8);\n$red: #bf5700;\n$dark_red: darken($red, 8);\n$fade_red: #C1893E;\n\n// Elements\n$link: #bf5700;\n$link_hover: darken($link, 8);\n// animation\n$fastInEaseOut: cubic-bezier(0.000, 0, .3, 1);\n\n\n$breakpoints: (\n \"small\" : 400px,\n \"medium\" : 700px,\n \"large\" : 1000px\n);\n\n// -----------------------------------------------------------------------------\n// Core\n// -----------------------------------------------------------------------------\n\n// Caching current breakpoint\n// Not meant to be manually edited\n$default-breakpoint: root;\n$current-breakpoint: $default-breakpoint;\n\n// The usual breakpoint mixin\n// Except it updates the $current-breakpoint variable\n// 1. If breakpoint name exists in map\n// 2. Update $current-breakpoint\n// 3. Open a media query\n// 4. Let the user dump content\n// 5. Then reset $current-breakpoint\n// 6. If breakpoint name doesn't exist in map, warn the user\n@mixin breakpoint($breakpoint) {\n $value: map-get($breakpoints, $breakpoint);\n\n @if $value != null { // 1\n $current-breakpoint: $breakpoint !global; // 2\n @media (min-width: $value) { @content; } // 3\n $current-breakpoint: $default-breakpoint !global; // 5\n }\n\n @else {\n @warn \"Invalid breakpoint `#{$breakpoint}`.\"; // 6\n }\n}\n\n// for only targeting a specific device\n// NOTE: DOESN'T SUPPORT THE @include placeholders!!!\n@mixin media($query) {\n @if $query == max-small {\n $media_query: \"max-width: #{map-get($breakpoints, \"small\")}\";\n } @else if $query == only-medium {\n $media_query: \"min-width: #{map-get($breakpoints, \"medium\")}) and (max-width: #{(map-get($breakpoints, \"large\") - 1px)}\";\n } @else if $query == max-medium {\n $media_query: \"max-width: #{(map-get($breakpoints, \"medium\") - 1px)}\";\n } @else if $query == max-large {\n $media_query: \"max-width: #{(map-get($breakpoints, \"large\") - 1px)}\";\n } @else {\n // just use the number provided as a max width\n $media_query: \"max-width: #{$query}\";\n }\n\n @if variable-exists(media_query) {\n @media ($media_query) {\n @content;\n }\n }\n\n}\n","@mixin clearfix {\n &:after {\n content: \"\";\n display: table;\n clear: both;\n }\n}\n\n@mixin container {\n max-width: 640px;\n margin-left: auto;\n margin-right: auto;\n padding-left: 20px;\n padding-right: 20px;\n @include clearfix;\n}\n\n@mixin well {\n padding: 1.6rem;\n margin-bottom: 1.6rem;\n background: $light_blue;\n @include border-radius;\n border: 1px solid #eee;\n border-bottom-color: #ccc;\n\n @include breakpoint(medium) {\n margin-bottom: 2.6rem;\n padding: 1.6rem 2rem;\n }\n}\n\n@mixin container--wide {\n @include container;\n\n @include breakpoint(medium) {\n max-width: 840px;\n }\n\n @include breakpoint(large) {\n max-width: 1000px;\n }\n}\n\n\n@mixin container--thin {\n @include container;\n max-width: 512px;\n}\n\n@mixin container--really-thin {\n @include container;\n max-width: 300px;\n}\n\n@mixin container--form {\n @include container--thin;\n\n .enp-input,\n .enp-textarea {\n width: 100%;\n }\n}\n\n@mixin container--form--thin {\n @include well;\n @include container--really-thin;\n\n .enp-input,\n .enp-textarea {\n width: 100%;\n }\n}\n\n@mixin flex-container { // no pseudo element to clear and break spacing\n @include container;\n}\n\n@mixin flex-container--wide { // no pseudo element to clear and break spacing\n @include flex-container;\n\n @include breakpoint(medium) {\n max-width: 840px;\n }\n\n @include breakpoint(large) {\n max-width: 1000px;\n }\n}\n\n@mixin flex {\n display: flex;\n}\n\n@mixin flex-list__item {\n flex-basis: 100%;\n margin: 0;\n border-bottom-color: #ddd;\n}\n\n@mixin flex-spread {\n @include flex;\n justify-content: space-between;\n}\n\n@mixin flex-spread-vertical {\n @include flex-spread;\n flex-direction: column;\n}\n\n@mixin flex-spread-around {\n @include flex;\n justify-content: space-around;\n}\n\n@mixin flex-bottom {\n @include flex;\n align-items: flex-end;\n align-content: flex-end;\n}\n\n@mixin flex-center {\n @include flex;\n justify-content: center;\n align-content: center;\n align-items: center;\n}\n\n@mixin flex-vertical-center {\n @include flex;\n align-content: center;\n align-items: center;\n}\n\n@mixin flex-inline {\n @include flex;\n @include ul-no-style;\n margin-bottom: 0;\n}\n\n@mixin flex-inline__item {\n margin-right: 10px;\n\n &:last-of-type {\n margin-right: 0;\n }\n}\n\n\n@mixin flex-grid {\n @include flex;\n flex-flow: column wrap;\n align-items: stretch;\n @include ul-no-style;\n}\n\n@mixin flex-grid__item {\n flex-basis: 100%;\n padding: 1rem 1.2rem;\n background: #fff;\n border: 1px solid #eee;\n border-bottom: 1px solid #ddd;\n list-style: none;\n transition: all .35s $fastInEaseOut;\n margin: 0 0 0.8rem;\n\n @include breakpoint(medium) {\n // flex-basis: 100%;\n // max-width: 100%;\n // margin: 0 2% 0.8rem 0;\n\n // &:nth-child(2n) {\n // margin-right: 0;\n // }\n }\n\n // @include breakpoint(large) {\n // flex-basis: 100%;\n // max-width: 100%;\n // margin-right: 1.25%;\n\n // &:nth-child(2n) {\n // margin-right: 1.25%;\n // }\n\n // &:nth-child(3n) {\n // margin-right: 0;\n // }\n // }\n}\n\n@mixin flex-grid__title {\n font-size: 1rem;\n padding-bottom: 0.5rem;\n}\n","body #enp-quiz {\n color: $font;\n font-family: $fontBody;\n font-size: 1em;\n line-height: 1.6;\n font-weight: 400;\n\n @include breakpoint(medium) {\n font-size: 1.3em;\n }\n}\n\n#enp-quiz {\n /* Headings */\n h1,h2,h3,h4,h5,h6 {\n font-family: $fontTitle;\n color: $title;\n clear: both;\n margin: 0 0 .2rem;\n font-weight: bold;\n line-height: 1.2em;\n }\n\n h1 {\n font-size: 2em;\n }\n\n h2 {\n font-size: 1.75em;\n }\n\n h3 {\n font-size: 1.475em;\n }\n\n h4 {\n font-size: 1.3em;\n }\n\n h5 {\n font-size: 1.125em;\n }\n\n h6 {\n font-size: 1em;\n }\n\n p+h1, ul+h1,\n p+h2, ul+h2,\n p+h3, ul+h3,\n p+h4, ul+h4,\n p+h5, ul+h5,\n p+h6, ul+h6 {\n margin-top: 1.8em;\n }\n\n /* Text elements */\n p {\n font-size: 0.85em;\n margin-bottom: 1.125em;\n font-weight: 300;\n }\n ul, ol {\n margin: 0 0 1.6em 1.25em;\n }\n ul {\n list-style: disc;\n }\n ol {\n list-style: decimal;\n }\n li > ul,\n li > ol {\n margin-bottom: 0;\n margin-left: 1.6em;\n }\n\n b, strong {\n font-weight: bold;\n }\n\n dfn, cite, em {\n font-family: georgia, times, serif;\n font-style: italic;\n }\n\n pre {\n background: #eee;\n font-family: \"Courier 10 Pitch\", Courier, monospace;\n font-size: .95em;\n line-height: 1.6;\n margin-bottom: 1.6em;\n padding: 1.6em;\n overflow: auto;\n max-width: 100%;\n }\n .code, code, kbd, tt, var {\n font: .7em Monaco, Consolas, \"Andale Mono\", \"DejaVu Sans Mono\", monospace;\n }\n\n table {\n border: none;\n\n th {\n font-family: $fontTitle;\n font-size: .8rem;\n text-transform: uppercase;\n border: none;\n border-bottom: 1px solid #ddd;\n }\n\n td {\n font-family: $fontBody;\n font-size: 1rem;\n border: none;\n border-bottom: 1px solid #eee;\n }\n\n tr:nth-child(even) td {\n background: $really_light_gray;\n }\n\n tr:last-child td {\n border-bottom: none;\n }\n }\n\n figure {\n margin: 0;\n }\n\n img {\n height: auto; /* Make sure images are scaled correctly. */\n max-width: 100%; /* Adhere to container width. */\n }\n\n /* Links */\n a {\n color: $link;\n text-decoration: none;\n transition: color .2s;\n touch-action: manipulation; // remove 300ms delay for ie\n\n .enp-icon {\n fill: $link;\n }\n }\n\n a:hover,\n a:focus,\n a:active {\n color: $link_hover;\n\n .enp-icon {\n fill: $link_hover;\n }\n }\n\n button {\n &:focus {\n @include focus--glow;\n }\n }\n\n .enp-btn {\n @include btn;\n }\n\n\n .enp-btn--add {\n @include btn--dashed;\n width: 100%;\n }\n\n .enp-btn--disabled {\n @include disabled;\n }\n\n .enp-btn--enabled {\n animation: expand .6s;\n }\n\n .enp-icon {\n width: 24px;\n height: 24px;\n transition: all .2s;\n }\n\n .enp-page-title {\n font-size: 1.6rem;\n }\n}\n","@keyframes slideInBottom {\n 0% {\n opacity: 0;\n transform: translate3d(0, 100px, 0);\n }\n 100% {\n opacity: 1;\n transform: translate3d(0, 0, 0);\n }\n}\n\n@keyframes slideInTop {\n 0% {\n opacity: 0;\n height: auto;\n transform: translate3d(0, -20px, 0);\n }\n 100% {\n opacity: 1;\n height: auto;\n transform: translate3d(0, 0, 0);\n }\n}\n\n@keyframes slideInTop--reduced-opacity {\n 0% {\n opacity: 0;\n height: auto;\n transform: translate3d(0, -20px, 0);\n }\n 100% {\n opacity: 0.8;\n height: auto;\n transform: translate3d(0, 0, 0);\n }\n}\n\n\n@keyframes slideOutTop {\n 0% {\n overflow: hidden;\n height: 100px;\n opacity: 1;\n transform: translate3d(0, 0, 0);\n }\n 100% {\n height: 0;\n opacity: 0;\n transform: translate3d(0, -20px, 0);\n }\n}\n\n@keyframes removeElement {\n 0% {\n opacity: 1;\n transform: translate3d(0, 0, 0);\n }\n 100% {\n padding: 0;\n margin: 0;\n opacity: 0;\n height: 0;\n z-index: -1;\n transform: translate3d(-200px, 0, 0);\n }\n}\n\n@keyframes removeAnswers {\n 0% {\n opacity: 1;\n transform: translate3d(0, 0, 0);\n }\n 100% {\n padding: 0;\n opacity: 0;\n display: none;\n height: 0;\n z-index: -1;\n transform: translate3d(-200px, 0, 0);\n }\n}\n\n@keyframes removeQuestion {\n 0% {\n opacity: 1;\n transform: translateX(0);\n }\n 100% {\n opacity: 0;\n transform: translateX(-200px);\n }\n}\n\n@keyframes showNextQuestion {\n 0% {\n opacity: 0;\n transform: translateX(200px);\n }\n\n 100% {\n opacity: 1;\n transform: translateX(0);\n }\n}\n\n@keyframes expand {\n 0% {\n opacity: 0.8;\n transform: scale3d(1, 1, 1);\n box-shadow: 0 0 0px rgba(0,0,0,.3);\n }\n\n 40% {\n opacity: 1;\n }\n\n 70% {\n opacity: 1;\n transform: scale3d(1.1, 1.1, 1);\n box-shadow: 0 0 8px rgba(0,0,0,.4);\n }\n\n 100% {\n opacity: 1;\n transform: scale3d(1, 1, 1);\n box-shadow: 0 0 0px rgba(0,0,0,.3), inset 0 2px 0 rgba(0,0,0,.2);\n }\n}\n\n@keyframes checkmark {\n 0% {\n opacity: 0;\n transform: scale3d(0.2, 0.2, 1);\n }\n 5% {\n opacity: 1;\n }\n 10% {\n transform: scale3d(1.4, 1.4, 1);\n }\n 12% {\n transform: scale3d(1, 1, 1);\n }\n 90% {\n opacity: 1;\n transform: scale3d(1, 1, 1);\n }\n 92% {\n transform: scale3d(1.4, 1.4, 1);\n }\n 100% {\n opacity: 0;\n transform: scale3d(0.2, 0.2, 1);\n }\n\n}\n\n@keyframes fadeOut {\n 0% {\n opacity: 1;\n }\n 100% {\n opacity: 0;\n }\n}\n\n@keyframes fadeIn {\n 0% {\n opacity: 0;\n }\n 100% {\n opacity: 1;\n }\n}\n\n@keyframes navSlideIn {\n 0% {\n transform: translate3d(0, -200px, 0);\n }\n 100% {\n transform: translate3d(0, 0, 0);\n }\n}\n\n\n.spinner {\n margin: 0 auto;\n width: 70px;\n text-align: center;\n}\n\n.spinner > div {\n width: 18px;\n height: 18px;\n background-color: #333;\n\n border-radius: 100%;\n display: inline-block;\n -webkit-animation: sk-bouncedelay 1.4s infinite ease-in-out both;\n animation: sk-bouncedelay 1.4s infinite ease-in-out both;\n}\n\n.spinner .bounce1 {\n -webkit-animation-delay: -0.32s;\n animation-delay: -0.32s;\n}\n\n.spinner .bounce2 {\n -webkit-animation-delay: -0.16s;\n animation-delay: -0.16s;\n}\n\n@-webkit-keyframes sk-bouncedelay {\n 0%, 80%, 100% { -webkit-transform: scale(0) }\n 40% { -webkit-transform: scale(1.0) }\n}\n\n@keyframes sk-bouncedelay {\n 0%, 80%, 100% {\n -webkit-transform: scale(0);\n transform: scale(0);\n } 40% {\n -webkit-transform: scale(1.0);\n transform: scale(1.0);\n }\n}\n","#enp-quiz {\n transition: background .25s $fastInEaseOut;\n\n .enp-container {\n @include container;\n }\n\n .enp-aside {\n @include well;\n @include container--thin;\n font-size: 1.2rem;\n }\n\n .enp-aside__title {\n @include small-uppercase;\n font-weight: 600;\n }\n\n .enp-page-title {\n border-bottom: 2px solid $blue;\n }\n}\n","\n\n// enter the root BEM class and this will output the correct CSS for you\n@mixin radio-block($rootBEM) {\n .#{$rootBEM}__legend {\n @include radio-block__legend ;\n }\n\n .#{$rootBEM}__input {\n @include radio-block__input ;\n }\n\n .#{$rootBEM}__label {\n @include radio-block__label ;\n }\n\n .#{$rootBEM}__input:checked + .#{$rootBEM}__label {\n @include radio-block__label--checked ;\n }\n\n .#{$rootBEM}__input:focus + .#{$rootBEM}__label {\n @include radio-block__label--focus ;\n }\n}\n\n@mixin radio-inline($rootBEM) {\n .#{$rootBEM}__legend {\n @include radio-inline__legend ;\n }\n\n .#{$rootBEM}__input {\n @include radio-inline__input ;\n }\n\n .#{$rootBEM}__label {\n @include radio-inline__label ;\n }\n\n .#{$rootBEM}__input:checked + .#{$rootBEM}__label {\n @include radio-inline__label--checked ;\n }\n\n .#{$rootBEM}__input:focus + .#{$rootBEM}__label {\n @include radio-inline__label--focus ;\n }\n\n}\n\n@mixin label {\n display: block;\n color: lighten($font, 10);\n font-weight: normal;\n font-size: 0.85rem;\n text-transform: uppercase;\n}\n\n@mixin legend {\n @include label;\n padding-top: 1.6rem;\n margin-bottom: 0.2rem;\n border: none;\n}\n\n@mixin label--bold {\n @include label;\n font-weight: 500;\n}\n\n@mixin legend--bold {\n @include label--bold;\n}\n\n@mixin input {\n font-size: 1rem;\n font-family: $fontBody;\n padding: 0.8rem 0.5rem;\n background: #fff;\n border: 1px solid #aaa;\n border-radius: 3px;\n width: 20rem;\n max-width: 100%;\n margin-bottom: 1.2rem;\n\n @include breakpoint(medium) {\n padding: 0.8rem;\n }\n}\n\n@mixin input--large {\n @include input;\n padding: 1rem 1.2rem;\n font-size: 1.3rem;\n}\n\n@mixin input--xl {\n @include input;\n font-weight: bold;\n font-size: 1.6rem;\n margin-bottom: 1rem;\n\n &::placeholder {\n font-weight: bold;\n }\n}\n\n@mixin textarea {\n @include input;\n line-height: 1.5;\n width: 100%;\n\n &:focus {\n @include focus--glow;\n }\n}\n\n\n/*\n@mixin no-radio__input {\n display: inline-block;\n width: 0;\n margin: 0;\n padding: 0;\n opacity: 0;\n overflow: hidden;\n}\n\n@mixin no-radio__label {\n display: inline-block;\n position: relative;\n left: -1rem;\n padding: .2rem .6rem;\n @include small-uppercase;\n font-size: .8rem;\n font-weight: normal;\n background: transparent;\n border-radius: 3px;\n transition: all .2s;\n}*/\n\n@mixin radio-block__legend {\n @include legend;\n margin-bottom: 0.6rem;\n}\n\n@mixin radio-block__input {\n position: absolute;\n z-index: 9;\n margin-left: 9px;\n}\n\n@mixin radio-block__label {\n text-transform: capitalize;\n background: #f2f2f2;\n display: block;\n padding: 5px 10px 5px 39px;\n position: relative;\n top: -6px;\n box-shadow: inset -1px -1px 0 rgba(0,0,0,.1), inset 30px 0px 0 rgba(255,255,255,.7), inset 31px 0px 0 rgba(0,0,0,.1);\n}\n\n@mixin radio-block__label--checked {\n background: $green;\n color: #fff;\n text-shadow: 0 0 1px rgba(0,0,0,.7);\n}\n\n@mixin radio-block__label--focus {\n z-index: 8;\n @include focus--glow ;\n}\n\n@mixin radio-inline__legend {\n @include legend;\n}\n\n@mixin radio-inline__input {\n @include screen-reader-text;\n}\n\n@mixin radio-inline__label {\n text-transform: capitalize;\n display: inline-block;\n padding: 0.2rem 0.5rem;\n border-radius: 3px;\n cursor: pointer;\n}\n\n@mixin radio-inline__label--checked {\n @include radio-block__label--checked ;\n}\n\n@mixin radio-inline__label--focus {\n @include radio-block__label--focus ;\n}\n\n@mixin select--wide--chevron {\n width: 100%;\n -webkit-appearance: none;\n -moz-appearance: none;\n appearance: none;\n font-size: 0.85rem;\n padding: 0.7rem 32px 0.7rem 0.8rem;\n border: 1px solid #bbb;\n border-radius: 3px;\n margin-bottom: 1.6rem;\n background: url(../svg/chevron-down.svg) 100% 50% no-repeat;\n background-color: #fff;\n box-shadow: inset -26px 0 0 rgba(0,0,0,.1);\n}\n\n\n#enp-quiz {\n\n fieldset {\n border: none;\n margin: 0;\n padding: 0;\n }\n\n .enp-label {\n @include label;\n }\n\n .enp-legend {\n @include legend;\n }\n\n .enp-input {\n @include input;\n\n &.enp-input--has-description {\n margin-bottom: 0.2rem;\n }\n }\n\n .enp-textarea-description,\n .enp-input-description {\n margin-bottom: 1rem;\n font-size: 0.85rem;\n }\n\n .enp-textarea-description--before,\n .enp-input-description--before {\n margin-bottom: 0;\n }\n\n .enp-input::placeholder,\n .enp-textarea::placeholder {\n font-family: $fontBody;\n font-weight: 300;\n color: lighten($font, 40);\n }\n\n .enp-textarea {\n @include textarea;\n\n &.enp-textarea--has-description {\n margin-bottom: 0.2rem;\n }\n &.enp-textarea--has-description--before {\n margin-bottom: 1.2rem;\n }\n }\n\n .enp-embed-code {\n @include textarea;\n width: 100%;\n padding: 1.6rem;\n font-size: 0.9rem;\n font-family: Monaco, Consolas, \"Andale Mono\", \"DejaVu Sans Mono\", monospace;\n\n @include media(max-medium) {\n padding: .8rem;\n }\n }\n}\n","#enp-quiz {\n .enp-publish-page-container,\n .enp-preview-page-container,\n .enp-quiz-form-container {\n @include container--wide;\n position: relative;\n padding-top: 6rem;\n padding-bottom: 4rem;\n background: $really_light_gray;\n\n @include media(max-small) {\n padding-left: 8px;\n padding-right: 8px;\n }\n }\n\n .enp-quiz-form {\n @include container--form;\n padding-left: 0;\n padding-right: 0;\n }\n\n .enp-quiz-title__label {\n @include label--bold;\n }\n\n .enp-quiz-title__textarea {\n @include input--xl;\n }\n \n textarea {\n color: #000;\n }\n\n .enp-accordion-container {\n margin-bottom: 1.6rem;\n position: relative;\n }\n\n .enp-question-content {\n @include accordion;\n padding-top: 0;\n position: relative;\n }\n\n .enp-question-inner {\n padding: 1.6rem 1.6rem 1rem;\n\n @include breakpoint(medium) {\n padding-right: 2.8rem;\n padding-left: 2.9rem;\n }\n\n }\n\n .enp-question-title__label {\n @include label--bold;\n }\n\n .enp-question-title__textarea {\n @include input--large;\n }\n\n .enp-question-image-upload {\n @include btn--dashed--light--alt-bg;\n @include small-uppercase;\n position: relative;\n margin-bottom: 2rem;\n transform: translate3d(0, 0, 0);\n transition: all .3s $fastInEaseOut;\n\n .enp-question-image-upload__icon--photo {\n @include icon--xxxl;\n opacity: 0;\n position: absolute;\n top: 0;\n left: 0;\n right: 0;\n margin: 0 auto;\n transform: translate3d(0, 0, 0);\n z-index: -1;\n transition: opacity .2s, transform .3s $fastInEaseOut;\n }\n\n .enp-question-image-upload__icon--add {\n @include icon--circle--small;\n @include icon--gray-bg;\n margin-right: 5px;\n position: relative;\n top: 0.2rem;\n }\n\n &:hover,\n &:focus,\n &:active {\n padding-top: 5rem;\n padding-bottom: 2rem;\n\n .enp-question-image-upload__icon--photo {\n opacity: 1;\n z-index: 1;\n transform: translate3d(0, 1.75rem, 0);\n }\n\n .enp-question-image-upload__icon--add {\n @include icon--gray-bg--hover;\n }\n }\n }\n\n .enp-question-image__container {\n position: relative;\n margin-bottom: 1rem;\n }\n\n .enp-question-image {\n margin-bottom: 1.2rem;\n }\n\n @include radio-inline(enp-question-type);\n\n .enp-question-type__label {\n position: relative;\n z-index: 9;\n }\n\n .enp-slider-options,\n .enp-mc-options {\n margin-top: 0rem;\n display: none;\n animation: slideOutTop .25s $fastInEaseOut forwards;\n animation-delay: 0s, .05s;\n }\n\n .enp-question-type__input--slider:checked ~ .enp-slider-options,\n .enp-question-type__input--mc:checked ~ .enp-mc-options {\n visibility: visible;\n display: block;\n animation: fadeIn .45s $fastInEaseOut forwards;\n }\n\n .enp-mc-options__list {\n @include ul-no-style;\n }\n\n .enp-mc-option {\n position: relative;\n padding-left: 6px;\n\n @include breakpoint(medium) {\n padding-left: 0;\n }\n }\n\n .enp-mc-options__legend {\n @include legend--bold;\n }\n\n .enp-mc-option__add,\n .enp-mc-option__button--correct,\n .enp-mc-option__button--delete {\n display: none;\n }\n\n .enp-question-type__input--mc:checked ~ .enp-mc-options {\n .enp-mc-option__add,\n .enp-mc-option__button--correct,\n .enp-mc-option__button--delete {\n display: block;\n }\n }\n\n .enp-button__question-image-delete,\n .enp-mc-option__button--delete {\n @include btn--reset;\n position: absolute;\n top: 9px;\n right: -24px;\n fill: #bbb;\n cursor: pointer;\n\n @include breakpoint(medium) {\n right: -30px;\n }\n\n &:focus,\n &:hover {\n fill: $red;\n }\n }\n\n .enp-mc-option__button--correct {\n @include btn--reset;\n position: absolute;\n top: 8px;\n left: -24px;\n\n @include breakpoint(medium) {\n left: -35px;\n }\n\n .enp-mc-option__icon--correct {\n @include icon--circle--pad;\n width: 28px;\n height: 28px;\n fill: #fff;\n background: #fff;\n cursor: pointer;\n border: 2px solid $fade_red;\n transition: all .2s;\n }\n\n &:focus .enp-mc-option__icon--correct,\n &:hover .enp-mc-option__icon--correct {\n background: #fff;\n border-color: $green;\n fill: $green;\n }\n\n &:disabled {\n opacity: 1;\n\n .enp-mc-option__icon--correct {\n cursor: default;\n fill: #fff;\n border: 2px solid transparent;\n }\n }\n }\n\n .enp-mc-option--correct {\n .enp-mc-option__input {\n box-shadow: inset 0 0 3px $green;\n border: 1px solid $green;\n }\n\n .enp-mc-option__button--correct:focus .enp-mc-option__icon--correct,\n .enp-mc-option__button--correct:hover .enp-mc-option__icon--correct,\n .enp-mc-option__icon--correct {\n fill: #fff;\n border-color: $green;\n background: $green;\n }\n }\n\n .enp-mc-option__add {\n @include btn--dashed--light--alt-bg;\n @include small-uppercase;\n text-align: left;\n padding: 0.7rem 0.75rem 0.8rem;\n\n .enp-mc-option__add__icon {\n @include btn--icon__icon--circle--small ;\n @include icon--gray-bg;\n position: relative;\n top: 0.2rem;\n }\n\n &:hover .enp-mc-option__add__icon {\n @include icon--gray-bg--hover;\n }\n }\n\n .enp-slider-options .enp-input {\n max-width: 11.8rem;\n }\n\n .enp-slider-range__container .enp-input,\n .enp-slider-correct__container .enp-input {\n max-width: 8.8rem;\n @include breakpoint('small') {\n max-width: 11.8rem;\n }\n }\n\n .enp-slider-preview {\n border: 1px solid #ddd;\n margin-top: 0.2rem;\n margin-bottom: 1.6rem;\n padding: 1.6rem 1.6rem .6rem;\n position: relative;\n\n .enp-label--slider-preview {\n position: absolute;\n width: 100%;\n top: 0.2rem;\n left: 0.4rem;\n font-size: 0.75rem;\n text-transform: uppercase;\n }\n }\n\n .enp-slider-range__container,\n .enp-slider-correct__container {\n @include flex-spread;\n align-items: center;\n }\n\n .enp-slider-range__helper,\n .enp-slider-correct__helper {\n color: #777;\n font-size: 0.85rem;\n background: #fff;\n padding: 0 .3rem;\n position: relative;\n\n &:before {\n content: '';\n position: absolute;\n top: 44%;\n height: 4px;\n background: #ddd;\n width: 120px;\n left: -60px;\n z-index: -1;\n transition: width 0.7s $fastInEaseOut, background 1.6s $fastInEaseOut;\n }\n }\n\n .enp-slider-options {\n margin-bottom: 2rem;\n\n .enp-accordion-header {\n text-transform: uppercase;\n font-size: 0.85rem;\n padding: 0.675rem;\n }\n\n .enp-slider-advanced-options__content {\n border: none;\n box-shadow: none;\n padding-top: 1rem;\n padding-bottom: 0;\n margin-bottom: 0;\n }\n }\n\n .enp-slider-correct-high__container {\n position: relative;\n }\n\n .enp-slider-correct-high__input-container--hidden {\n display: none;\n }\n\n .enp-slider-correct__helper--hidden {\n &:before {\n width: 0;\n background: $green;\n }\n }\n\n .enp-slider-correct-answer-range--add-range {\n @include btn--dashed--light--alt-bg;\n margin-left: 0.8rem;\n font-size: 0.7rem;\n\n @include breakpoint('small') {\n font-size: 0.8rem;\n padding: .7rem;\n }\n\n @include breakpoint('medium') {\n padding: .7rem 1.2rem;\n min-width: 11.4rem;\n }\n\n .enp-slider-correct-answer-range__icon {\n @include btn--icon__icon--circle--small ;\n @include icon--gray-bg;\n position: relative;\n left: -0.2rem;\n }\n\n &:hover .enp-slider-correct-answer-range__icon {\n @include icon--gray-bg--hover;\n }\n }\n\n .enp-slider-correct-answer-range--remove-range {\n position: absolute;\n right: -1.6rem;\n bottom: 1.6rem;\n background: none;\n border: none;\n box-shadow: none;\n padding: 0 0.1rem;\n\n .enp-slider-correct-answer-range__icon {\n width: 1.2em;\n height: 1.2em;\n fill: $dark_gray;\n }\n\n &:hover,\n &:focus {\n .enp-slider-correct-answer-range__icon {\n fill: $red;\n }\n }\n\n @include breakpoint(medium) {\n top: -0.2rem;\n right: -0.2rem;\n bottom: auto;\n }\n\n }\n\n .enp-slider-options .enp-input:read-only {\n background: $light_gray;\n }\n\n .enp-answer-explanation {\n background: $light_blue;\n padding-top: 2rem;\n box-shadow: inset 1px 0px 0 #ccc, inset -1px -1px 0 #ccc, inset 0 1px 0 #ddd;\n }\n\n .enp-answer-explanation__label {\n @include label--bold;\n\n }\n\n .enp-question__button--delete {\n @include btn--reset;\n position: absolute;\n top: 9px;\n right: 9px;\n fill: #bbb;\n cursor: pointer;\n\n @include breakpoint(medium) {\n right: -30px;\n }\n\n &:hover {\n fill: $red;\n }\n }\n\n .enp-question__move {\n position: absolute;\n left: 15px;\n\n @include breakpoint(medium) {\n left: -40px;\n }\n }\n\n .enp-sort__placeholder {\n background: #ddd;\n height: 60px;\n width: 100%;\n max-height: 120px;\n margin-bottom: 1.6rem;\n }\n\n .ui-sortable .ui-sortable-helper {\n .ui-sortable-handle {\n cursor: move;\n cursor: grabbing;\n cursor: -webkit-grabbing;\n }\n }\n \n\n .enp-question__button--move {\n @include btn--reset;\n position: absolute;\n fill: #bbb;\n cursor: pointer;\n\n &:hover, &:focus {\n fill: #333;\n }\n\n &:disabled {\n opacity: 0.5;\n }\n }\n\n .enp-question__button--move--up {\n top: 0px;\n left: -9px;\n }\n\n\n .enp-question__button--move--down {\n top: 3px;\n right: -9px;\n }\n\n .enp-quiz-form__add-question {\n @include btn--icon;\n @include btn--dashed;\n padding-top: 1rem;\n padding-bottom: 1rem;\n margin-top: 1.6rem;\n margin-bottom: 2rem;\n\n .enp-add-question__icon {\n @include btn--icon__icon--circle--small;\n @include icon--normal;\n @include icon--gray-bg;\n position: relative;\n top: 0.2rem;\n }\n\n &:hover .enp-add-question__icon {\n @include icon--gray-bg--hover;\n }\n }\n\n .enp-quiz-form__save {\n @include btn;\n width: 100%;\n margin-bottom: 1rem;\n opacity: 0.8;\n text-shadow: 0px -1px 2px rgba(0,0,0,.6);\n\n &:hover,\n &:focus {\n opacity: 1;\n }\n\n @include breakpoint(small) {\n padding: 1.2rem 1.8rem 1.1rem;\n width: 27%;\n margin-right: 3%;\n position: relative;\n top: -2px;\n margin-top: 1.6rem;\n }\n\n /*@include breakpoint(medium) {\n padding-top: 1rem;\n padding-bottom: 1rem;\n margin-top: 1.6rem;\n margin-bottom: 2rem;\n }*/\n }\n\n .enp-quiz-form__save--reveal {\n animation: slideInTop--reduced-opacity .3s $fastInEaseOut;\n }\n\n @include btn--icon--circle(enp-btn--next-step);\n\n .enp-btn--next-step {\n width: 100%;\n padding: 1rem 1.4rem 1rem;\n\n @include breakpoint(small) {\n width: 68%;\n }\n\n /*\n * AFTER we have remove the Save button,\n * use this code to add the preview button into the\n * header\n @include media(max-medium) {\n padding: 1rem 1.4rem 1rem;\n }\n\n @include breakpoint(medium) {\n position: absolute;\n right: 20px;\n top: 10px;\n width: auto;\n z-index: 999999;\n\n &.enp-btn--next-step--fixed {\n position: fixed;\n animation: navSlideIn .25s;\n }\n }*/\n\n }\n\n .enp-btn--next-step--reveal {\n animation: slideInTop .3s $fastInEaseOut;\n }\n\n\n // UX interactions\n .enp-mc-option--inputs,\n .enp-accordion-header--inserting {\n animation: slideInBottom .4s $fastInEaseOut forwards;\n }\n\n .enp-mc-option--remove,\n .enp-question--remove,\n .enp-question__image--remove {\n animation: removeElement .5s $fastInEaseOut forwards;\n }\n\n .enp-image-upload-wait {\n @include btn--dashed--light--alt-bg;\n padding-top: 4rem;\n padding-bottom: 4rem;\n margin-bottom: 1rem;\n width: 100%;\n }\n\n // validation\n .enp-accordion-header.question-has-error {\n color: $red;\n box-shadow: 0 0 3px $red;\n }\n\n}\n\n.enp-quiz.ui-sortable--sorting #enp-quiz .enp-accordion-content {\n display: none;\n}","#enp-quiz {\n\n\n .enp-quiz-settings-container {\n\n @include breakpoint(large) {\n margin: 0;\n width: 40%;\n float: left;\n }\n }\n\n .enp-quiz-preview-container {\n\n @include breakpoint(large) {\n width: 60%;\n float: left;\n }\n\n }\n\n .enp-quiz-share__legend,\n .enp-quiz-settings__title {\n position: relative;\n @include small-uppercase;\n font-weight: 600;\n padding-top: 0;\n }\n\n .enp-quiz-settings__form {\n margin-bottom: 3rem;\n\n @include breakpoint(large) {\n padding: 0;\n margin-bottom: 0;\n }\n }\n\n .enp-fieldset {\n @include breakpoint(medium) {\n // this is necessary to keep the form elements visible on top of the\n // white BG on the sidebar. We can't set this on the whole form bc\n // then the publish button won't be positioned right\n position: relative;\n }\n }\n\n .enp-title-display__legend {\n padding-top: 0;\n\n @include breakpoint(medium) {\n padding-top: 0.4rem;\n }\n }\n\n .enp-quiz-share__input,\n .enp-quiz-styles__input {\n width: 100%;\n }\n\n .enp-quiz-styles__textarea--custom-css {\n font-family: Monaco,Consolas,\"Andale Mono\",\"DejaVu Sans Mono\",monospace;\n font-size: 0.9rem;\n min-height: 200px;\n }\n\n .enp-fieldset--section {\n padding: 1.6rem 1rem;\n\n &.enp-accordion-content--open {\n margin-bottom: 0;\n }\n }\n\n .enp-quiz-share--facebook {\n margin-bottom: 2rem;\n }\n\n @include radio-inline(enp-title-display);\n @include radio-inline(enp-mc-options-order);\n\n .enp-mc-options-order {\n margin-bottom: 1.6rem;\n }\n\n .enp-quiz-share__textarea {\n min-height: 7.6rem;\n margin-bottom: 2rem;\n\n @include breakpoint('medium') {\n min-height: 4.6rem;\n }\n\n @include breakpoint('large') {\n min-height: 7.6rem;\n }\n\n\n }\n\n .enp-preview-form__submit {\n margin-top: 1.6rem;\n margin-bottom: 1.6rem;\n }\n\n .enp-quiz-preview__title {\n @include small-uppercase;\n font-weight: 600;\n }\n\n .enp-preview-form__submit {\n @include btn;\n width: 100%;\n padding-top: 0.85rem;\n padding-bottom: 0.85rem;\n margin-bottom: 1rem;\n opacity: 0.8;\n text-shadow: 0px -1px 2px rgba(0,0,0,.6);\n\n &:hover,\n &:focus {\n opacity: 1;\n }\n }\n\n .enp-preview-form__submit--publish {\n width: 100%;\n position: relative;\n z-index: 99999999;\n padding: 1.05rem 1.8rem .95rem;\n }\n\n .enp-quiz-styles__iris-wrapper {\n position: relative;\n }\n\n // Fix for WP Color Picker formatting\n .iris-picker {\n box-sizing: content-box;\n position: relative;\n z-index: 9999999999;\n top: -1.2rem;\n margin-bottom: 1rem;\n padding-bottom: 3rem;\n padding-right: 30px;\n\n @include breakpoint(large) {\n position: absolute;\n top: -4px;\n left: 104%;\n }\n\n &:last-of-type {\n margin-bottom: 0;\n }\n\n .ui-slider-handle:focus,\n .ui-draggable-handle:focus .ui-slider-handle {\n box-shadow: 0 0 3px rgba(0,0,0,.75);\n }\n\n }\n\n .enp-quiz-styles__set-default {\n @include btn--ghost;\n font-size: 0.75rem;\n position: absolute;\n left: 10px;\n bottom: 10px;\n }\n\n .enp-iris__close {\n @include btn--reset;\n position: absolute;\n top: 5px;\n right: 5px;\n fill: #888;\n cursor: pointer;\n }\n\n .enp-quiz-styles__input--color {\n padding-left: 45px;\n }\n\n .enp-quiz-styles__color-demo {\n width: 30px;\n height: 30px;\n border: 1px solid #ccc;\n top: 8px;\n left: 8px;\n border-radius: 3px;\n\n position: absolute;\n }\n\n\n}\n","#enp-quiz {\n /* Removing flexbox layout temporarily\n * because it wasn't laying out correctly before content loading\n * It would snap into the correct layout after a resize or textarea highlight\n .enp-publish-page-container {\n &:before {\n @include breakpoint(medium) {\n position: absolute;\n top: 0;\n bottom: 0;\n left: -100%;\n width: 128%;\n content: '';\n background: #fff;\n border-right: 1px solid #ddd;\n }\n\n @include breakpoint(large) {\n width: 124%;\n }\n }\n\n .enp-quiz-message {\n @include breakpoint(medium) {\n margin-left: 33%;\n }\n\n @include breakpoint(large) {\n margin-left: 26%;\n }\n }\n }\n\n .enp-publish-page-flex-container {\n @include breakpoint(medium) {\n @include flex;\n align-items: stretch;\n flex-direction: row-reverse;\n }\n }\n\n .enp-publish-page__aside-container {\n\n @include breakpoint(medium) {\n position: relative;\n margin: 0 6% 0 0;\n padding: 0;\n width: 24%;\n }\n\n @include breakpoint(large) {\n margin: 0;\n //padding-left: 20px;\n width: 20%;\n }\n }\n\n .enp-share-quiz__container,\n .enp-ab-ad__container {\n @include breakpoint(medium) {\n padding: 0;\n border: none;\n }\n }\n */\n\n .enp-share-quiz__url {\n display: block;\n font-size: 1.5rem;\n line-height: 1.4;\n word-wrap: break-word;\n }\n\n @include share_icons(enp-share-quiz);\n\n .enp-share-quiz {\n justify-content: space-around;\n margin-bottom: 0;\n }\n}\n","#enp-quiz {\n .enp-ab-create__container {\n @include container--wide;\n width: 100%;\n background: $really_light_gray;\n padding-top: 3rem;\n padding-bottom: 3rem;\n }\n\n .enp-ab-create__form {\n @include container--thin;\n }\n\n .enp-ab-create__label {\n @include label--bold;\n }\n\n .enp-ab-create-title__textarea {\n @include input--xl;\n width: 100%;\n }\n\n .enp-ab-create__select {\n @include select--wide--chevron;\n }\n\n .enp-ab-create__submit {\n width: 100%;\n padding-top: 1em;\n padding-bottom: 1em;\n }\n}\n","#enp-quiz {\n\n &.enp-quiz__main {\n background: $background;\n }\n\n .enp-dash-container {\n @include container--wide;\n @include xpadding-vertical;\n // background: $really_light_gray;\n transition: all .25s $fastInEaseOut;\n }\n\n .enp-dash__section-header {\n display: block;\n margin-bottom: 0.325rem;\n\n @include breakpoint(medium) {\n display: flex;\n @include flex-bottom;\n justify-content: space-between;\n }\n\n }\n\n .enp-search-quizzes {\n display: block;\n @include breakpoint(small) {\n display: flex;\n @include flex-bottom;\n }\n\n }\n\n .enp-search-quizzes__form-item {\n margin-bottom: 0.6rem;\n display: block;\n\n @include breakpoint('small') {\n margin-bottom: 0;\n margin-right: 1rem;\n\n &:last-of-type {\n margin-right: 0;\n }\n }\n\n }\n\n .enp-quiz-search {\n position: relative;\n }\n\n .enp-search-quizzes__label {\n margin-bottom: 0;\n @include screen-reader-text ;\n }\n\n .enp-search-quizzes__select {\n padding: .3rem;\n border-radius: 3px;\n }\n\n .enp-quiz-search__input {\n max-width: 160px;\n margin: 0 0 0.1rem;\n padding: .3rem .3rem .3rem 26px;\n font-size: 0.85rem;\n }\n\n .enp-quiz-search__icon {\n position: absolute;\n bottom: 0.3rem;\n left: 0.2rem;\n width: 21px;\n height: 21px;\n }\n\n .enp-search-quizzes__button {\n padding: 0.2rem 0.8rem;\n }\n\n .enp-search-results-description {\n font-size: 0.85rem;\n }\n\n .enp-search-results-description__link {\n white-space: nowrap;\n }\n\n .enp-search-results-description__icon {\n width: 1.3em;\n height: 1.3em;\n position: relative;\n top: 4px;\n left: 2px;\n }\n\n .enp-dash__section-title {\n @include small-uppercase;\n margin-bottom: 0.325rem;\n }\n\n .enp-view-toggle {\n cursor: pointer;\n opacity: .5;\n display: none; // hide the buttons for small screens\n\n @include breakpoint(medium) {\n display: flex;\n }\n }\n\n .enp-view-toggle__active {\n opacity: 1;\n }\n\n .enp-sort-by {\n margin-left: 5px;\n }\n\n .enp-dash-list {\n @include flex-grid;\n }\n\n .enp-dash-item {\n @include flex-grid__item ;\n @include flex-spread-vertical;\n display: flex;\n flex-direction: column;\n align-content: flex-end;\n justify-content: flex-end;\n border: none;\n border-radius: 3px;\n background-color: $gray;\n }\n\n .enp-dash-item--published {\n box-shadow: inset 4px 0 0 $blue, 0 1px 0 rgba(0,0,0,.1);\n }\n\n .enp-dash-item--draft {\n box-shadow: inset 4px 0 0 lighten($blue, 45%), 0 1px 0 rgba(0,0,0,.1);\n }\n\n .enp-dash-item--remove {\n animation: removeElement .5s $fastInEaseOut forwards;\n }\n\n .enp-dash-list--list-view {\n .enp-dash-item {\n margin: 0 0 0.8rem;\n flex-basis: 100%;\n }\n }\n\n .enp-dash-item__spinner {\n @include flex-center ;\n position: absolute;\n top: 0;\n bottom: 0;\n left: 0;\n right: 0;\n background: rgba(245,216,216,0.8);\n width: 100%;\n animation: fadeIn .3s $fastInEaseOut;\n }\n\n .enp-dash-item__header {\n padding: 0.5rem 1rem;\n background: $light_gray;\n border-bottom: 1px solid $dark_gray;\n display: flex;\n justify-content: space-between;\n align-items: center;\n @include border-radius;\n }\n\n .enp-dash-item__title {\n @include flex-grid__title ;\n padding: 0;\n margin-bottom: 0;\n a {\n color: $blue;\n }\n }\n\n .enp-dash-item__content {\n padding: 0rem 0 0.375rem;\n position: relative;\n transition: all .2s $fastInEaseOut;\n }\n\n .enp-dash-item__meta {\n @include hint;\n font-size: 0.75rem;\n }\n\n .enp-dash-item__username {\n word-wrap: break-word;\n padding-left: 0.4rem;\n margin-left: 0.2rem;\n border-left: 1px solid #ddd;\n }\n\n .enp-dash-item__title--ab-test {\n padding-bottom: 0;\n }\n\n .enp-dash-item__ab-quizzes {\n @include ul-no-style;\n font-size: 0.85rem;\n color: $dark_gray;\n margin-bottom: 0.8rem;\n }\n\n .enp-dash-item__nav {\n @include ul-no-style;\n margin-bottom: 0;\n font-size: 0.85rem;\n }\n\n .enp-dash-item__nav__item {\n display: flex;\n margin: 0;\n width: 100%;\n padding: 12px;\n align-items: center;\n &:hover {\n background-color: $gray;\n .enp-dash-item__icon {\n fill: $red;\n }\n }\n a {\n font-weight: normal;\n color: $red;\n @include flex;\n align-items: center;\n\n &:focus {\n outline: 1px dotted $link;\n outline-offset: 1px;\n }\n }\n\n &:last-of-type {\n margin-right: 0;\n }\n }\n\n .enp-dash-item__delete {\n @include btn--reset;\n position: relative;\n padding: 0;\n cursor: pointer;\n @include flex;\n .enp-icon {\n fill: $darker_gray;\n }\n }\n .enp-dash-item__icon {\n fill: $darker_gray;\n width: 15px;\n height: 15px;\n margin-right: 10px;\n // min-width: 15%;\n }\n\n .enp-dash-item__nav--collapsible {\n display: none;\n position: absolute;\n z-index: 2;\n top: 53px;\n right: 1.5rem;\n width: 195px;\n background-color: #fff;\n text-align: left;\n transform: translate3d(0,0,0);\n transition: all .2s $fastInEaseOut;\n\n .enp-dash-item__nav__item {\n padding: 0.5rem 1rem;\n cursor: pointer;\n }\n }\n\n .enp-dash-item__menu-action {\n height: 24px;\n background: none;\n border: none;\n color: #444;\n padding: 0;\n bottom: 0.2rem;\n right: 1.5rem;\n top: 1.5rem;\n cursor: pointer;\n }\n\n .enp-dash-item__menu-action-wrap {\n max-width: 0;\n display: flex;\n flex-direction: column;\n align-items: flex-end;\n }\n\n .enp-dash-item__menu-action__icon {\n width: 15px;\n height: 15px;\n fill: $darker_gray;\n transition: all .3s $fastInEaseOut;\n }\n\n .enp-dash-item__menu-action__icon--bottom {\n \n }\n\n .enp-dash-item--menu-active {\n transform: translate3d(0,-3px,0);\n\n &.enp-dash-item--published {\n box-shadow: inset 4px 0 0 $green, 0 2px 2px rgba(0,0,0,.2);\n }\n\n &.enp-dash-item--draft {\n box-shadow: inset 4px 0 0 lighten($green, 25%), 0 2px 2px rgba(0,0,0,.2);\n }\n\n .enp-dash-item__menu-action__icon--bottom {\n transform: rotateX(180deg);\n }\n // .enp-dash-item__menu-action__icon--top {\n // transform: rotateX(-180deg) translateY(0px);\n // }\n\n .enp-dash-item__nav--collapsible {\n display: block;\n animation: slideInTop .25s $fastInEaseOut forwards;\n @include border-radius;\n @include box-shadow;\n }\n\n .enp-dash-item__content {\n opacity: 0.4;\n }\n\n }\n\n\n .enp-quiz-results {\n display: flex;\n justify-content: space-around;\n list-style: none;\n margin: 0.8rem 0 0;\n padding: 0;\n text-align: center;\n }\n\n .enp-quiz-results__item {\n\n margin: 0 2% 0 0;\n padding: 0;\n color: #454545;\n\n @media (max-width:280px) {\n width: 100%;\n padding: 0;\n margin-bottom: 0.6rem;\n }\n }\n\n .enp-quiz-results__number {\n font-size: 1.6rem;\n line-height: 1;\n position: relative;\n }\n\n .enp-dash-item--draft .enp-quiz-results__number {\n opacity: 0.5;\n }\n\n .enp-quiz-results__number--average-score {\n color: darken($green, 8);\n\n &:after {\n content: '%';\n font-size: .9rem;\n position: absolute;\n top: .3rem;\n right: -1rem;\n }\n }\n\n .enp-quiz-results__label {\n text-transform: uppercase;\n font-size: .7rem;\n font-weight: 300;\n color: #888;\n }\n\n\n .enp-quiz-list__view {\n @include flex-bottom;\n }\n\n .enp-dash-item--add-new {\n background: none;\n border: none;\n padding: 0;\n position: relative;\n\n @include breakpoint(medium) {\n min-height: 7rem;\n }\n\n }\n\n .enp-dash-link--add-new {\n @include btn--dashed--light;\n justify-content: flex-start;\n color: $link;\n padding: 1rem 1.2rem;\n\n\n @include breakpoint(medium) {\n @include small-uppercase;\n @include flex-center;\n flex-direction: column;\n position: absolute;\n top: 0;\n left: 0;\n right: 0;\n bottom: 0;\n }\n\n .enp-dash-link__icon {\n @include icon--circle;\n @include icon--normal;\n margin-right: 5px;\n\n @include breakpoint(medium) {\n width: 2rem;\n height: 2rem;\n margin: 0.8rem 0 0.2rem;\n }\n }\n\n &:hover {\n color: $link_hover;\n\n .enp-dash-link__icon {\n fill: #fff;\n background: $link_hover;\n }\n }\n\n }\n\n .enp-quiz-message--welcome p {\n color: $font;\n }\n\n // pagination\n .enp-paginate {\n @include ul-no-style ;\n @include flex-center ;\n font-size: 1rem;\n }\n\n .enp-paginate__link {\n @include flex-center ;\n margin: 0 0.2rem;\n padding: 0 0.4rem;\n border-radius: 3px;\n font-weight: normal;\n\n }\n\n .enp-paginate__link--current-page {\n border: 2px solid $blue;\n }\n\n .enp-paginate__item--last-page,\n .enp-paginate__item--first-page {\n display: flex;\n }\n\n .enp-paginate__item--first-page:after,\n .enp-paginate__item--last-page:before {\n content: '...';\n font-size: 1rem;\n position: relative;\n bottom: 0.2rem;\n opacity: 0.6;\n }\n\n .enp-paginate__item--no-gap {\n &:before,\n &:after {\n content:'';\n }\n }\n\n .enp-paginate__item--next-page {\n margin-left: 0.2rem;\n }\n\n .enp-paginate__item--previous-page {\n margin-right: 0.2rem;\n }\n}\n","#enp-quiz {\n .enp-quiz-breadcrumbs {\n @include flex-center;\n position: absolute;\n top: 0;\n width: 1000%;\n left: -500%;\n right: -500%;\n margin-left: auto;\n margin-right: auto;\n background: #fff;\n border-bottom: 1px solid #ddd;\n padding: 10px;\n z-index: 99999;\n }\n\n .enp-quiz-breadcrumbs__list {\n @include flex-inline;\n }\n\n .enp-quiz-breadcrumbs__item {\n @include flex-inline__item ;\n @include flex-center;\n fill: $link;\n margin-right: 5px;\n\n @include breakpoint(small) {\n margin-right: 10px;\n }\n }\n\n .enp-quiz-breadcrumbs__link--disabled {\n @include disabled;\n }\n\n .enp-quiz-breadcrumbs__link--active {\n @include btn--ghost;\n @include btn--thin;\n }\n\n .enp-quiz-breadcrumbs__link {\n font-size: 1rem;\n font-weight: 400;\n text-transform: none;\n letter-spacing: 0;\n }\n\n // JS\n .enp-quiz-breadcrumbs--fixed {\n top: 0;\n position: fixed;\n animation: navSlideIn .25s;\n }\n}\n","#enp-quiz {\n .enp-results-title {\n font-size: 1.6rem;\n text-align: center;\n padding: 3.2rem 20px 2.6rem;\n background: $really_light_gray;\n margin: -1.2rem 0 2rem;\n border-bottom: 1px solid #ddd;\n\n &:after {\n @include small-uppercase;\n display: block;\n content: \"RESULTS\";\n font-weight: normal;\n }\n }\n\n .enp-results__container {\n @include container--wide;\n display: block;\n\n @include breakpoint(large) {\n display: flex;\n @include flex-spread;\n }\n }\n\n .enp-results__container,\n .enp-quiz-scores__container,\n .enp-results-flow__container {\n @include media(max-medium) {\n padding: 8px;\n }\n }\n\n .enp-quiz-scores__container,\n .enp-results-flow__container {\n width: 100%;\n\n @include breakpoint(large) {\n width: 48%;\n }\n }\n\n .enp-quiz-scores {\n margin-top: 2.6rem;\n }\n\n .enp-quiz-score__line-chart {\n height: 300px;\n margin-bottom: 1rem;\n\n .ct-label {\n color: $font;\n }\n\n .ct-grid {\n stroke: #dadada;\n stroke-dasharray: 0;\n }\n\n .ct-line {\n stroke: $green;\n stroke-width: 2px;\n }\n\n .ct-point {\n stroke: $green;\n stroke-width: 8px;\n }\n }\n\n .enp-quiz-scores-table {\n width: 100%;\n max-width: 500px;\n margin: 0 auto;\n\n tr th {\n background-color: #fff;\n }\n }\n\n .enp-quiz-scores-table__label {\n padding-left: 5%;\n }\n\n .enp-quiz-scores-table__score {\n text-align: right;\n padding-right: 5%;\n }\n\n .enp-results-flow {\n position: relative;\n margin: 2rem auto;\n width: 320px;\n height: 320px;\n border-radius: 50%;\n\n @include media(300px) {\n left: -100px;\n }\n\n @include breakpoint(small) {\n width: 390px;\n height: 390px;\n }\n\n @include breakpoint(medium) {\n width: 450px;\n height: 450px;\n }\n\n @include breakpoint(large) {\n width: 400px;\n height: 400px;\n }\n\n }\n\n .enp-results-flow__section-title {\n @include screen-reader-text;\n }\n\n .enp-results-flow__item {\n border-radius: 50%;\n text-align: center;\n height: 100%;\n width: 100%;\n margin: 0 auto;\n left: 0;\n right: 0;\n padding: 12.5% 0 0;\n letter-spacing: 0.05rem;\n border: 2px solid $green;\n animation: 0.85s slideInBottom $fastInEaseOut forwards;\n }\n\n .enp-results-flow__item--total-views {\n background: #fff;\n }\n\n .enp-results-flow__item--quiz-starts {\n width: 65%;\n height: 65%;\n position: absolute;\n padding-top: 8%;\n bottom: 2.5%;\n background: lighten($green, 48);\n }\n\n .enp-results-flow__item--quiz-finishes {\n width: 35%;\n height: 35%;\n position: absolute;\n bottom: 5%;\n background: lighten($green, 35);\n }\n\n .enp-results-flow__title {\n @include small-uppercase;\n color: #444;\n font-size: .7rem;\n margin-bottom: 0px;\n\n @include breakpoint(medium) {\n font-weight: bold;\n margin-bottom: 2px;\n }\n }\n\n .enp-results-flow__number {\n font-weight: bold;\n font-size: 1.4rem;\n line-height: 1.2;\n }\n\n .enp-results-flow__number--total-views {\n font-size: 2rem;\n }\n\n .enp-results-flow__number--quiz-starts {\n font-size: 1.65rem;\n }\n\n .enp-results-flow__percentage {\n font-size: .8rem;\n font-weight: normal;\n position: relative;\n display: inline-block;\n top: -0.7em;\n left: -.1rem;\n color: #444;\n\n &:after {\n content: '%';\n position: absolute;\n right: -0.75rem;\n font-size: .7rem;\n color: #444;\n }\n }\n\n .enp-results-questions__section {\n @include section--alt;\n padding-top: 5rem;\n padding-bottom: 3rem;\n margin-top: 5rem;\n margin-bottom: 3rem;\n }\n\n .enp-results-questions__container {\n @include media(max-small) {\n padding-left: 8px;\n padding-right: 8px;\n }\n }\n\n .enp-results-questions__header {\n align-items: flex-start;\n flex-direction: column;\n\n @include breakpoint(small) {\n @include flex-spread;\n flex-direction: row;\n align-items: flex-end;\n }\n }\n\n .enp-results-questions__title {\n @include small-uppercase;\n }\n\n .enp-results-questions__key {\n @include small-uppercase;\n }\n\n .enp-results-questions {\n @include ul-no-style;\n }\n\n .enp-results-question {\n width: 100%;\n font-size: 1rem;\n padding: 0;\n margin-bottom: 1rem;\n }\n\n .enp-results-question__header {\n padding: 1rem 1.2rem;\n position: relative;\n }\n\n .enp-results-question__question,\n .enp-results-question__stats {\n font-size: 1rem;\n line-height: 1.4;\n }\n\n .enp-results-question__question {\n font-weight: normal;\n\n @include breakpoint(small) {\n padding-right: 7em;\n margin-bottom: 0;\n }\n }\n\n .enp-results-question__stats {\n font-size: .9rem;\n\n @include breakpoint(small) {\n position: absolute;\n bottom: 1rem;\n right: 1.2rem;\n text-align: right;\n }\n }\n\n .enp-results-questions__key,\n .enp-results-question__stats {\n font-weight: 300;\n }\n\n .enp-results-question__content {\n padding: 2rem 1.2rem 1.2rem;\n @include border-radius;\n }\n\n .enp-results-question__deep-stats {\n @include flex-spread-around;\n @include ul-no-style;\n text-align: center;\n\n @include media(500px) {\n flex-wrap: wrap;\n }\n }\n\n .enp-results-question__deep-stat {\n\n @include media(500px) {\n width: 48%;\n margin: 0 2% 2% 0;\n padding: 1.6rem 0;\n\n &:nth-child(even) {\n margin-right: 0;\n }\n }\n\n @include media(280px) {\n width: 100%;\n padding: 0;\n margin-bottom: 1.6rem;\n }\n }\n\n .enp-results-question__deep-stat__number {\n font-size: 1.8rem;\n line-height: 1;\n position: relative;\n }\n\n .enp-results-question__deep-stat__number--finishes,\n .enp-results-question__deep-stat__number--correct {\n @include dark-green;\n }\n\n .enp-results-question__deep-stat__number--incorrect {\n @include fade-red;\n }\n\n .enp-results-question__deep-stat__number--correct,\n .enp-results-question__deep-stat__number--incorrect,\n .enp-results-question__deep-stat__number--finishes {\n &:after {\n content: '%';\n font-size: .9rem;\n position: absolute;\n top: .3rem;\n right: -1rem;\n }\n }\n\n .enp-results-question__deep-stat__label {\n @include small-uppercase;\n font-size: .8rem;\n }\n\n .enp-results-question__options {\n @include ul-no-style;\n margin-bottom: 0;\n }\n\n .enp-results-question__option {\n padding: 0.8rem 0.8rem 0.8rem 0.4rem;\n border-top: 1px solid #ddd;\n @include media(max-small) {\n position: relative;\n flex-direction: column;\n }\n\n @include breakpoint(small) {\n @include flex-spread;\n flex-direction: row;\n }\n\n &:first-of-type {\n margin-top: 1.4rem;\n }\n\n }\n\n .enp-results-question__option--correct {\n background: lighten($green, 48);\n }\n\n .enp-results-question__option__text {\n flex-grow: 100;\n margin-right: 1rem;\n }\n\n .enp-results-question__option__text__helper {\n font-weight: 300;\n @include small-uppercase;\n margin-right: 0.4rem;\n }\n\n .enp-results-question__option__icon {\n @include media(max-small) {\n position: relative;\n left: -3px;\n }\n\n @include breakpoint(small) {\n margin-right: 0.3rem;\n min-width: 1.6rem;\n }\n }\n\n .enp-results-question__option__icon--incorrect {\n fill: $fade_red;\n opacity: 0.5;\n }\n\n .enp-results-question__option__icon--correct {\n fill: $dark_green;\n opacity: 1;\n }\n\n .enp-results-question__option__percentage--incorrect {\n @include fade-red;\n }\n\n .enp-results-question__option__percentage--correct {\n @include dark-green;\n }\n\n .enp-results-question__option__number-selected {\n font-weight: 300;\n\n @include media(max-small) {\n position: absolute;\n top: 0.8rem;\n right: 0.8rem;\n }\n }\n\n .enp-slider-responses__title {\n @include small-uppercase;\n font-weight: 400;\n margin-top: 1.6rem;\n }\n\n .enp-slider-responses__line-chart {\n .ct-point {\n stroke-width: 8px;\n }\n }\n\n .enp-slider-responses__line-chart--low,\n .enp-slider-responses__line-chart--high {\n stroke: $red;\n }\n\n .enp-slider-responses__line-chart--correct {\n stroke: $green;\n }\n\n .enp-slider-responses-table {\n width: 100%;\n }\n\n .enp-slider-responses-table tr:nth-child(even) td {\n background-color: #fff;\n }\n\n .enp-slider-responses-table tr.enp-slider-responses-table__response--correct td {\n background-color: lighten($green, 48);\n }\n\n .enp-slider-responses-table__content {\n box-shadow: none;\n padding-top: 1rem;\n }\n\n .enp-slider-responses-table--hide-zero {\n .enp-slider-responses-table__frequency--zero {\n display: none;\n }\n }\n\n .enp-slider-responses-table__response-frequency {\n @include flex-spread ;\n align-items: center;\n }\n\n .enp-slider-responses-table__toggle-zero-frequency {\n @include accordion__header ;\n width: auto;\n padding: 0 0.6rem;\n margin: 0;\n }\n\n\n\n}\n\n.enp-quiz-results {\n #enp-quiz .enp-aside {\n border: none;\n }\n\n .enp-results-questions__title__quiz-title {\n @include screen-reader-text;\n }\n}\n","#enp-quiz {\n\n .enp-results--ab {\n display: block;\n margin-bottom: 3rem;\n\n @include breakpoint(large) {\n display: flex;\n flex-wrap: wrap;\n align-content: flex-end;\n width: 50%;\n padding: 10px;\n }\n\n }\n\n .enp-results--a {\n @include breakpoint(large) {\n padding-right: 1rem;\n border-right: 1px solid #ddd;\n }\n }\n\n .enp-results--b {\n @include breakpoint(large) {\n padding-left: 1rem;\n }\n }\n\n .enp-results-title--ab,\n .enp-results__container--ab .enp-results-flow__container {\n min-width: 100%;\n }\n\n .enp-results--loser {\n .enp-results-flow__item {\n border: 2px solid $red;\n }\n\n .enp-results-flow__item--quiz-starts {\n background: lighten($red, 42);\n }\n\n .enp-results-flow__item--quiz-finishes {\n background: lighten($red, 34);\n }\n\n th,\n .enp-results-questions__title {\n color: $dark_red;\n }\n\n }\n\n .enp-results--winner {\n th,\n .enp-results-questions__title {\n color: $dark_green;\n }\n\n }\n\n .enp-results-title--a,\n .enp-results-title--b {\n background: transparent;\n }\n\n .enp-ab-scores {\n @include container--wide;\n\n th.enp-quiz-scores-table__label,\n th.enp-quiz-scores-table__score {\n padding-left: 0;\n padding-right: 0;\n }\n }\n\n .enp-ab-scores__title {\n padding-left: 50px;\n @include small-uppercase;\n }\n\n .enp-quiz-score__line-chart .enp-test-loser {\n\n .ct-line,\n .ct-point {\n stroke: $red;\n }\n }\n\n .enp-quiz-scores {\n margin-top: 0;\n }\n\n .enp-question-results,\n .enp-ab-scores .enp-quiz-scores-table {\n margin-bottom: 1.6rem;\n\n @include breakpoint(large) {\n float: left;\n width: 48%;\n margin: 0;\n\n &:first-of-type {\n margin-right: 4%;\n }\n }\n }\n\n .enp-question-results__container {\n @include container--wide;\n }\n\n .enp-question-results--ab {\n\n .enp-results-questions__section {\n background: #fff;\n border: none;\n padding: 1.6rem 0;\n margin: 1.6rem auto;\n }\n\n .enp-results-questions__container {\n padding: 0;\n }\n\n }\n\n .enp-ab-new-embed-code__section {\n @include container--thin;\n max-width: 540px;\n padding-bottom: 2rem;\n margin-bottom: 2rem;\n\n .enp-ab-embed-code {\n padding: 0;\n margin: 0;\n }\n }\n\n .enp-ab-embed-code__section {\n @include section--alt;\n padding-top: 5rem;\n margin-top: 5rem;\n }\n\n .enp-ab-embed-code {\n @include container;\n }\n\n .enp-ab-embed-code__title {\n @include small-uppercase;\n }\n\n .enp-embed-code__textarea {\n margin-bottom: 0;\n }\n\n .enp-embed-code__instructions {\n font-size: 1.1rem;\n }\n}\n","#enp-quiz {\n\n .enp-slider {\n margin-bottom: 1.6rem;\n }\n\n .enp-slider-input__container {\n display: flex;\n align-items: center;\n justify-content: center;\n margin: 1.6rem auto;\n position: relative;\n }\n\n .enp-slider-input__label {\n @include label;\n }\n\n .enp-slider-input__prefix,\n .enp-slider-input__suffix {\n font-size: 1rem;\n }\n\n .enp-slider-input__prefix {\n margin-right: .2rem;\n white-space: pre;\n }\n\n .enp-slider-input__suffix {\n margin-left: .2rem;\n white-space: pre;\n }\n\n .enp-slider-input__input {\n @include input;\n margin-bottom: 0;\n padding: .75rem;\n width: auto;\n transition: all .25s $fastInEaseOut;\n }\n\n .enp-slider-input__input--incorrect {\n color: $red;\n }\n\n .enp-slider-input__input--correct {\n color: $dark_green;\n }\n\n .enp-slider-input__input--invalid-animation {\n box-shadow: 0 0 2px 1px $fade_red;\n }\n\n .enp-slider_input__range-helper {\n position: absolute;\n bottom: -1.2rem;\n font-size: 0.8rem;\n }\n\n .enp-slider_input__range-helper--low {\n left: 0;\n }\n\n .enp-slider_input__range-helper--high {\n right: 0;\n }\n\n .enp-slider-input__range-helper__number {\n position: relative;\n color: $dark_gray;\n }\n\n .enp-slider_input__range-helper__number--low {\n\n }\n\n .enp-slider_input__range-helper__number--high {\n\n }\n\n .ui-slider-range-show-correct__tooltip-container {\n position: relative;\n }\n\n .ui-slider-range-show-correct__tooltip {\n position: absolute;\n top: -0.4rem;\n margin-left: -0.55rem;\n height: 1rem;\n width: 1.1rem;\n height: 1.1rem;\n border: 2px solid $green;\n background-color: #fff;\n border-radius: 50%;\n z-index: 9999;\n }\n\n .ui-slider-range-show-correct__tooltip--low {\n left: 0;\n }\n\n .ui-slider-range-show-correct__tooltip--high {\n right: -0.55rem;\n }\n\n .ui-slider-range-show-correct__tooltip__text {\n position: relative;\n color: darken($green, 15);\n top: -1.35rem;\n font-size: .825rem;\n min-width: 100%;\n display: inline-block;\n text-align: center;\n text-shadow: 0 1px 0 #fff;\n }\n\n .ui-slider-range-show-correct__tooltip__text--low {\n\n }\n\n .ui-slider-range-show-correct__tooltip__text--high {\n\n }\n\n .ui-slider-range-show-correct__tooltip__text--low-center {\n //left: 0; // not perfectly centered for huge numbers, but is for small numbers\n }\n\n // JQUERY SLIDER\n .enp-slider {\n\t\tposition: relative;\n\t\ttext-align: left;\n\t\tbackground: #ddd;\n\n\t\t/* Layout helpers\n\t\t----------------------------------*/\n\t\t.ui-helper-hidden {\n\t\t\tdisplay: none;\n\t\t}\n\t\t.ui-helper-hidden-accessible {\n\t\t\tborder: 0;\n\t\t\tclip: rect(0 0 0 0);\n\t\t\theight: 1px;\n\t\t\tmargin: -1px;\n\t\t\toverflow: hidden;\n\t\t\tpadding: 0;\n\t\t\tposition: absolute;\n\t\t\twidth: 1px;\n\t\t}\n\t\t.ui-helper-reset {\n\t\t\tmargin: 0;\n\t\t\tpadding: 0;\n\t\t\tborder: 0;\n\t\t\toutline: 0;\n\t\t\tline-height: 1.3;\n\t\t\ttext-decoration: none;\n\t\t\tfont-size: 100%;\n\t\t\tlist-style: none;\n\t\t}\n\t\t.ui-helper-clearfix:before,\n\t\t.ui-helper-clearfix:after {\n\t\t\tcontent: \"\";\n\t\t\tdisplay: table;\n\t\t\tborder-collapse: collapse;\n\t\t}\n\t\t.ui-helper-clearfix:after {\n\t\t\tclear: both;\n\t\t}\n\t\t.ui-helper-clearfix {\n\t\t\tmin-height: 0; /* support: IE7 */\n\t\t}\n\t\t.ui-helper-zfix {\n\t\t\twidth: 100%;\n\t\t\theight: 100%;\n\t\t\ttop: 0;\n\t\t\tleft: 0;\n\t\t\tposition: absolute;\n\t\t\topacity: 0;\n\t\t\tfilter:alpha(opacity=0); /* support: IE8 */\n\t\t}\n\n\t\t.ui-front {\n\t\t\tz-index: 100;\n\t\t}\n\n\n\t\t/* Interaction Cues\n\t\t----------------------------------*/\n\t\t.ui-state-disabled {\n\t\t\tcursor: default !important;\n\t\t}\n\n\n\t\t/* Icons\n\t\t----------------------------------*/\n\n\t\t/* states and images */\n\t\t.ui-icon {\n\t\t\tdisplay: block;\n\t\t\ttext-indent: -99999px;\n\t\t\toverflow: hidden;\n\t\t\tbackground-repeat: no-repeat;\n\t\t}\n\n\n\t\t/* Misc visuals\n\t\t----------------------------------*/\n\n\t\t/* Overlays */\n\t\t.ui-widget-overlay {\n\t\t\tposition: fixed;\n\t\t\ttop: 0;\n\t\t\tleft: 0;\n\t\t\twidth: 100%;\n\t\t\theight: 100%;\n\t\t}\n\n\t\t.ui-slider-handle {\n\t\t\tbackground: #fff;\n\t\t\tborder-radius: 50%;\n\t\t\tborder: 1px solid #aaa;\n\t\t\tposition: absolute;\n\t\t\tz-index: 2;\n\t\t\twidth: 1.2rem;\n\t\t\theight: 1.2rem;\n top: -.4rem;\n\t\t\tmargin-left: -.6rem;\n\t\t\tcursor: default;\n\t\t\t-ms-touch-action: none;\n\t\t\ttouch-action: none;\n\t\t\ttransition: opacity 0.2s $fastInEaseOut, height .18s $fastInEaseOut, width .18s $fastInEaseOut, transform 0.18s $fastInEaseOut;\n\n @include media(max-medium) {\n width: 2rem;\n \t\t\theight: 2rem;\n top: -.85rem;\n margin-left: -1rem;\n transform: rotate(225deg);\n }\n\n\t\t\t&:focus {\n\t\t\t\toutline: none;\n\t\t\t\tbox-shadow: 0 0 3px 1px #4D90FE;\n\t\t\t}\n\n &.ui-state-active {\n @include media(max-medium) {\n width: 2.2rem;\n height: 2.2rem;\n border-top-left-radius: 0;\n transform: translate3d(-0.2rem, -0.8rem, 0) rotate(225deg);\n }\n\n }\n\n\t\t}\n\n .ui-slider-handle--correct,\n\t\t.ui-slider-handle--incorrect {\n width: 1.1rem;\n\t\t\theight: 1.1rem;\n top: -.4rem;\n margin-left: -.55rem;\n }\n\n .ui-slider-handle--incorrect {\n z-index: 1;\n\t\t\tborder: 2px solid $red;\n\t\t}\n\n .ui-slider-handle--correct {\n border: 2px solid $green;\n z-index: 99999;\n }\n\n\t\t.ui-slider-range {\n\t\t\tposition: absolute;\n\t\t\tz-index: 1;\n\t\t\tfont-size: .7rem;\n\t\t\tdisplay: block;\n\t\t\tborder: 0;\n\t\t\tbackground-position: 0 0;\n\t\t\ttop: 0;\n\t\t\theight: 100%;\n\t\t}\n\n .ui-slider-range-show-correct {\n background: $green;\n z-index: 9;\n }\n\n\t\t.ui-slider-range-min {\n\t\t\tleft: 0;\n\t\t\tbackground: $green;\n\t\t}\n\n\t\t.ui-slider-range-max {\n\t\t\tright: 0;\n\t\t}\n\n\t\t/* support: IE8 - See #6727 */\n\t\t&.ui-state-disabled .ui-slider-handle,\n\t\t&.ui-state-disabled .ui-slider-range {\n\t\t\tfilter: inherit;\n\t\t}\n\t}\n\n\t.ui-slider-horizontal {\n\t\theight: .3rem;\n\t}\n\n\t.enp-question__answered {\n\t\t.enp-slider {\n\t\t\tbackground: #bbb;\n\t\t}\n\n\t\t.ui-slider-range-min {\n\t\t\tbackground: #fff;\n\t\t}\n\n\t}\n\n}\n"]} \ No newline at end of file From e8780f4d540a3bdda579f9c25214ee405de6c088 Mon Sep 17 00:00:00 2001 From: Luke Carl Hartman Date: Wed, 27 Apr 2022 19:58:33 -0700 Subject: [PATCH 06/32] new css grid layout --- gulpfile.js | 2 +- public/quiz-create/class-enp_quiz-create.php | 2 +- .../quiz-create/css/enp_quiz-create.min.css | 2 +- .../css/enp_quiz-create.min.css.map | 2 +- public/quiz-create/css/sass/_base.scss | 2 +- public/quiz-create/css/sass/_breadcrumbs.scss | 25 +-- public/quiz-create/css/sass/_dashboard.scss | 92 +++++++---- public/quiz-create/css/sass/_quiz-create.scss | 20 ++- public/quiz-create/css/sass/_structure.scss | 15 +- public/quiz-create/css/sass/_utilities.scss | 8 +- public/quiz-create/templates/dashboard.php | 149 +++++++++--------- 11 files changed, 190 insertions(+), 129 deletions(-) diff --git a/gulpfile.js b/gulpfile.js index 1805cb12..8473cc65 100644 --- a/gulpfile.js +++ b/gulpfile.js @@ -43,7 +43,7 @@ gulp.task('serve', ['sassQuizTake', 'sassQuizCreate', 'quizCreateJS', 'quizDashb // Watch for file changes onChangeReload = ["public/quiz-create/css/enp_quiz-create.min.css", - "public/quiz-create/*.php", + "public/quiz-create/templates/*.php", "public/quiz-create/includes/*.php", "public/quiz-create/js/dist/quiz-create.min.js", "public/quiz-take/css/enp_quiz-take.min.css", diff --git a/public/quiz-create/class-enp_quiz-create.php b/public/quiz-create/class-enp_quiz-create.php index ba6098ab..e6a39bb3 100755 --- a/public/quiz-create/class-enp_quiz-create.php +++ b/public/quiz-create/class-enp_quiz-create.php @@ -790,7 +790,7 @@ public function unset_quiz_take_cookies($quiz) { } public function dashboard_breadcrumb_link() { - return ' diff --git a/public/quiz-create/templates/quiz-create.php b/public/quiz-create/templates/quiz-create.php index c33c3d64..03db7b09 100644 --- a/public/quiz-create/templates/quiz-create.php +++ b/public/quiz-create/templates/quiz-create.php @@ -21,44 +21,51 @@ * */ ?> -dashboard_breadcrumb_link();?> -
    - + +
    +
    + - + -
    - outputKey(); - echo $Quiz_create->hidden_fields();?> + + outputKey(); + echo $Quiz_create->hidden_fields();?> -
    - - -
    +
    + + +
    -
    - get_questions(); - if(!empty($question_ids)){ - foreach($question_ids as $question_id) { - include(ENP_QUIZ_CREATE_TEMPLATES_PATH.'/partials/quiz-create-question.php'); - $question_i++; - } - } - ?> -
    +
    + get_questions(); + if(!empty($question_ids)){ + foreach($question_ids as $question_id) { + include(ENP_QUIZ_CREATE_TEMPLATES_PATH.'/partials/quiz-create-question.php'); + $question_i++; + } + } + ?> +
    - get_add_question_button();?> + get_add_question_button();?> +
    - + - get_next_step_button();?> + get_next_step_button();?> - -
    + + + +
    + \ No newline at end of file diff --git a/public/quiz-create/templates/quiz-preview.php b/public/quiz-create/templates/quiz-preview.php index 9b0f13dc..81278148 100644 --- a/public/quiz-create/templates/quiz-preview.php +++ b/public/quiz-create/templates/quiz-preview.php @@ -10,144 +10,149 @@ * $quiz = quiz object (if exits), error page if it doesn't (TODO) */ ?> -dashboard_breadcrumb_link();?> -
    - - -
    -
    -

    Quiz Settings

    -
    - outputKey();?> - - -
    - Quiz Styles - -
    - Title Display - get_quiz_title_display();?> - /> - - /> - -
    - -
    - Multiple Choice Options Order - get_quiz_mc_options_order();?> - /> - - /> - -
    - - - - - - - - - - - - - - - - - - - - - - - - -

    Advanced. Entered CSS could break your quiz, and is sanitized on save.

    - - -
    - -
    - Quiz Share Text - - - - - -
    - - - - -
    -
    - -
    -

    Quiz Preview

    - - + + +
    +
    + + +
    +
    +

    Quiz Settings

    +
    + outputKey();?> + + +
    + Quiz Styles + +
    + Title Display + get_quiz_title_display();?> + /> + + /> + +
    + +
    + Multiple Choice Options Order + get_quiz_mc_options_order();?> + /> + + /> + +
    + + + + + + + + + + + + + + + + + + + + + + + + +

    Advanced. Entered CSS could break your quiz, and is sanitized on save.

    + + +
    + +
    + Quiz Share Text + + + + + +
    + + + + +
    +
    + +
    +

    Quiz Preview

    + + - + -
    -
    -
    +
    +
    +
    + diff --git a/public/quiz-create/templates/quiz-publish.php b/public/quiz-create/templates/quiz-publish.php index c2f3228c..909aa0d0 100644 --- a/public/quiz-create/templates/quiz-publish.php +++ b/public/quiz-create/templates/quiz-publish.php @@ -10,26 +10,31 @@ * $quiz = quiz object (if exits), error page if it doesn't (TODO) */ ?> -dashboard_breadcrumb_link();?> -
    - - -
    -
    -

    Embed

    - + -
    +
    +
    + + +
    +
    +

    Embed

    + -
    +
    - +
    - -
    + + + +
    +
    -
    + \ No newline at end of file diff --git a/public/quiz-create/templates/quiz-results.php b/public/quiz-create/templates/quiz-results.php index e606db9b..0055ccf7 100644 --- a/public/quiz-create/templates/quiz-results.php +++ b/public/quiz-create/templates/quiz-results.php @@ -6,40 +6,63 @@ * @package Enp_quiz */ ?> -dashboard_breadcrumb_link();?> -

    get_quiz_title();?>

    -
    -
    - -
    + - - - - - - quiz_score_chart_data['quiz_scores'] as $key => $val) {?> - - - - - +
    +

    get_quiz_title();?>

    +
    +
    + +
    -
    Score# of People
    quiz_score_chart_data['quiz_scores_labels'][$key];?>
    -
    -
    +
    +
    +
    +
    - + + + + + + quiz_score_chart_data['quiz_scores'] as $key => $val) {?> + + + + + -
    - - -
    +
    Score# of People
    quiz_score_chart_data['quiz_scores_labels'][$key];?>
    +
    +
    + + + + diff --git a/public/quiz-take/css/enp_quiz-take.min.css b/public/quiz-take/css/enp_quiz-take.min.css index 2df8b576..1617d629 100644 --- a/public/quiz-take/css/enp_quiz-take.min.css +++ b/public/quiz-take/css/enp_quiz-take.min.css @@ -1,2 +1,2 @@ -a,abbr,acronym,address,applet,big,blockquote,body,caption,cite,code,dd,del,dfn,div,dl,dt,em,fieldset,font,form,h1,h2,h3,h4,h5,h6,html,iframe,ins,kbd,label,legend,li,object,ol,p,pre,q,s,samp,small,span,strike,strong,sub,sup,table,tbody,td,tfoot,th,thead,tr,tt,ul,var{border:0;font-family:inherit;font-size:100%;font-style:inherit;font-weight:inherit;margin:0;outline:0;padding:0;vertical-align:baseline}html{font-size:100%;overflow-y:scroll;-webkit-text-size-adjust:100%;-ms-text-size-adjust:100%}body{background:#fff;overflow:hidden}article,aside,details,figcaption,figure,footer,header,nav,section{display:block}ol,ul{list-style:none}table{border-collapse:separate;border-spacing:0}caption,td,th{font-weight:400;text-align:left}blockquote:after,blockquote:before,q:after,q:before{content:""}blockquote,q{quotes:"" ""}a:focus{outline:thin dotted}a:active,a:hover{outline:0}a img{border:0}html{box-sizing:border-box}*,:after,:before{box-sizing:inherit}html{font-size:16px!important}html #enp-quiz{box-sizing:border-box;border-radius:3px}body #enp-quiz{background:#fff;overflow:hidden}#enp-quiz *,#enp-quiz :after,#enp-quiz :before{box-sizing:inherit}#enp-quiz ol,#enp-quiz ul{margin:0 0 1.6rem 1.25rem;padding:0}#enp-quiz textarea{margin-bottom:1rem}#enp-quiz button,#enp-quiz button:active,#enp-quiz button:focus,#enp-quiz button:hover,#enp-quiz iframe,#enp-quiz input[type=button],#enp-quiz input[type=button]:active,#enp-quiz input[type=button]:focus,#enp-quiz input[type=button]:hover,#enp-quiz input[type=reset],#enp-quiz input[type=reset]:active,#enp-quiz input[type=reset]:focus,#enp-quiz input[type=reset]:hover,#enp-quiz input[type=submit],#enp-quiz input[type=submit]:active,#enp-quiz input[type=submit]:focus,#enp-quiz input[type=submit]:hover{border:none}#enp-quiz .enp-screen-reader-text{clip:rect(1px,1px,1px,1px);position:absolute!important;left:-10000px;top:auto;width:1px;height:1px;overflow:hidden}#enp-quiz .enp-screen-reader-text:active,#enp-quiz .enp-screen-reader-text:focus,#enp-quiz .enp-screen-reader-text:hover{background-color:#f1f1f1;border-radius:3px;box-shadow:0 0 2px 2px rgba(0,0,0,.6);clip:auto!important;color:#21759b;display:block;font-size:14px;font-weight:700;height:auto;left:5px;line-height:normal;padding:15px 23px 14px;text-decoration:none;top:5px;width:auto;z-index:100000}#enp-quiz .enp-quiz-message{max-width:640px;margin:1.6rem auto;padding-left:20px;padding-right:20px;max-width:400px;background:#fff;border:1px solid #eee;border-bottom:1px solid #ccc;padding:1rem .375rem}#enp-quiz .enp-quiz-message:after{content:"";display:table;clear:both}#enp-quiz .enp-quiz-message__title{font-size:.85rem;text-transform:uppercase}#enp-quiz .enp-message__list{list-style:none;margin-left:0;font-size:1.1rem;margin-bottom:0}#enp-quiz .enp-quiz-message--error{border-left:6px solid #bf5700;animation:d .3s cubic-bezier(0,0,.3,1)}#enp-quiz .enp-quiz-message__title--error{color:#964400}#enp-quiz .enp-quiz-message--success{border-left:6px solid #60aaad;color:#4e9497}#enp-quiz .enp-quiz-message__title--success{color:#4e9497}body{color:#1d1c25;font-family:Arial,monospace,helvetica,arial,sans-serif;font-size:1em;line-height:1.6;font-weight:400}@media (min-width:700px){body{font-size:1.3em}}#enp-quiz h1,#enp-quiz h2,#enp-quiz h3,#enp-quiz h4,#enp-quiz h5,#enp-quiz h6{font-family:Arial,monospace,helvetica,arial,sans-serif;color:#1d1c25;clear:both;margin:0 0 .2rem;font-weight:700;line-height:1.2em}#enp-quiz h1{font-size:2em}#enp-quiz h2{font-size:1.75em}#enp-quiz h3{font-size:1.475em}#enp-quiz h4{font-size:1.3em}#enp-quiz h5{font-size:1.125em}#enp-quiz h6{font-size:1em}#enp-quiz p+h1,#enp-quiz p+h2,#enp-quiz p+h3,#enp-quiz p+h4,#enp-quiz p+h5,#enp-quiz p+h6,#enp-quiz ul+h1,#enp-quiz ul+h2,#enp-quiz ul+h3,#enp-quiz ul+h4,#enp-quiz ul+h5,#enp-quiz ul+h6{margin-top:1.8em}#enp-quiz p{font-size:.85em;margin-bottom:1.125em;font-weight:300}#enp-quiz ol,#enp-quiz ul{margin:0 0 1.6em 1.25em}#enp-quiz ul{list-style:disc}#enp-quiz ol{list-style:decimal}#enp-quiz li>ol,#enp-quiz li>ul{margin-bottom:0;margin-left:1.6em}#enp-quiz b,#enp-quiz strong{font-weight:700}#enp-quiz cite,#enp-quiz dfn,#enp-quiz em{font-family:georgia,times,serif;font-style:italic}#enp-quiz pre{background:#eee;font-family:Courier\ 10 Pitch,Courier,monospace;font-size:.95em;line-height:1.6;margin-bottom:1.6em;padding:1.6em;overflow:auto;max-width:100%}#enp-quiz .code,#enp-quiz code,#enp-quiz kbd,#enp-quiz tt,#enp-quiz var{font:.7em Monaco,Consolas,Andale Mono,DejaVu Sans Mono,monospace}#enp-quiz figure{margin:0}#enp-quiz img{height:auto;max-width:100%}#enp-quiz a{color:#1e1c26;text-decoration:none;transition:color .2s;touch-action:manipulation}#enp-quiz a .enp-icon{fill:#1e1c26}#enp-quiz a:active,#enp-quiz a:focus,#enp-quiz a:hover{color:#070609}#enp-quiz a:active .enp-icon,#enp-quiz a:focus .enp-icon,#enp-quiz a:hover .enp-icon{fill:#070609}#enp-quiz button:focus{outline-color:#4d90fe;outline-offset:-2px;outline-style:auto;outline-width:5px}#enp-quiz .enp-btn{text-align:center;border:none;border-radius:3px;padding:.85em 1.4em .75em;font-size:15px;font-weight:400;letter-spacing:.05em;line-height:1.6;color:#fff;box-shadow:inset 0 -2px 0 rgba(0,0,0,.2);background:#1e1c26;cursor:pointer;text-transform:uppercase;transition:all .2s}#enp-quiz .enp-btn:hover{color:#fff;box-shadow:none;background:#070609}#enp-quiz .enp-btn:active{color:#fff;box-shadow:inset 0 2px 0 rgba(0,0,0,.1);background:#4c4761}#enp-quiz .enp-btn:focus{outline-color:#4d90fe;outline-offset:-2px;outline-style:auto;outline-width:5px}#enp-quiz .enp-btn--add{text-align:center;border:none;border-radius:3px;padding:.85em 1.4em .75em;font-size:15px;font-weight:400;letter-spacing:.05em;line-height:1.6;color:#fff;box-shadow:inset 0 -2px 0 rgba(0,0,0,.2);background:#1e1c26;cursor:pointer;text-transform:uppercase;transition:all .2s;border:3px dashed #e3e3e3;background:none;color:#545454;box-shadow:none;width:100%}#enp-quiz .enp-btn--add:hover{color:#fff;box-shadow:none;background:#070609}#enp-quiz .enp-btn--add:active{color:#fff;box-shadow:inset 0 2px 0 rgba(0,0,0,.1);background:#4c4761}#enp-quiz .enp-btn--add:focus{outline-color:#4d90fe;outline-offset:-2px;outline-style:auto;outline-width:5px}#enp-quiz .enp-btn--add:focus,#enp-quiz .enp-btn--add:hover{border:3px dashed #b0b0b0;color:#b0b0b0;background:hsla(0,0%,100%,.9)}#enp-quiz .enp-btn--disabled{opacity:.65;cursor:default}#enp-quiz .enp-btn--enabled{animation:expand .6s}#enp-quiz .enp-icon{width:24px;height:24px;transition:all .2s}#enp-quiz .enp-page-title{font-size:1.6rem}#enp-quiz fieldset{border:none;margin:0;padding:0}.enp-label,.enp-legend{display:block;color:#343242;font-weight:400;font-size:.85rem;text-transform:uppercase}.enp-legend{padding-top:1.6rem;margin-bottom:.2rem;border:none}.enp-input{font-size:1rem;font-family:Arial,monospace,helvetica,arial,sans-serif;padding:.8rem .5rem;background:#fff;border:1px solid #aaa;border-radius:3px;width:20rem;max-width:100%;margin-bottom:1.2rem}@media (min-width:700px){.enp-input{padding:.8rem}}.enp-input::-webkit-input-placeholder,.enp-textarea::-webkit-input-placeholder{font-family:Arial,monospace,helvetica,arial,sans-serif;font-weight:300;color:#7a7697}.enp-input:-ms-input-placeholder,.enp-input::-ms-input-placeholder,.enp-textarea:-ms-input-placeholder,.enp-textarea::-ms-input-placeholder{font-family:Arial,monospace,helvetica,arial,sans-serif;font-weight:300;color:#7a7697}.enp-input::placeholder,.enp-textarea::placeholder{font-family:Arial,monospace,helvetica,arial,sans-serif;font-weight:300;color:#7a7697}@keyframes a{0%{opacity:1;height:auto;transform:translateZ(0)}10%{opacity:1;transform:translateZ(0)}to{padding:0;opacity:0;display:none;height:0;z-index:-1;transform:translate3d(-150px,0,0)}}@keyframes b{0%{opacity:1;transform:translateX(0)}15%{opacity:1;transform:translateX(0)}to{opacity:0;transform:translateX(-150px)}}@keyframes c{0%{opacity:0;transform:translateX(120px)}to{opacity:1;transform:translateX(0)}}@keyframes d{0%{opacity:0;height:auto;transform:translate3d(0,-20px,0)}to{opacity:1;height:auto;transform:translateZ(0)}}@keyframes e{0%{opacity:0;transform:translate3d(0,20px,0)}to{opacity:1;transform:translateZ(0)}}@keyframes f{to{background-color:rgba(191,87,0,.2)}}@keyframes g{0%{width:0;opacity:1}30%{width:100%}80%{opacity:1;width:100%}to{width:40%;opacity:0}}.spinner{margin:0 auto;width:70px;text-align:center}.spinner>div{width:18px;height:18px;background-color:#333;border-radius:100%;display:inline-block;animation:h 1.4s infinite ease-in-out both}.spinner .bounce1{animation-delay:-.32s}.spinner .bounce2{animation-delay:-.16s}@keyframes h{0%,80%,to{transform:scale(0)}40%{transform:scale(1)}}#enp-quiz{background:transparent}#enp-quiz .enp-quiz__container{position:relative;padding:0;background:#fff;border:1px solid #ddd}#enp-quiz .enp-quiz__header{position:relative;border-bottom:1px solid #ddd}#enp-quiz .enp-quiz__title{font-size:.85rem;text-transform:uppercase;font-weight:500;letter-spacing:.01rem;padding:.6rem 1rem}#enp-quiz .enp-quiz__title--hide{display:none}#enp-quiz .enp-quiz__progress{position:absolute;bottom:0;left:0;right:0;height:0}#enp-quiz .enp-quiz__progress__bar{position:relative;width:0;min-width:2rem;height:3px;background:#60aaad;transition:all .5s cubic-bezier(0,0,.3,1)}#enp-quiz .enp-quiz__progress__bar__question-count{position:absolute;right:1rem;bottom:.7rem;font-size:.8rem}#enp-quiz .enp-question__container{display:block;min-height:92vh}#enp-quiz .enp-question__form{max-width:640px;margin-left:auto;margin-right:auto;padding:2rem 20px 2.6rem;overflow:hidden;color:#1d1c25}#enp-quiz .enp-question__form:after{content:"";display:table;clear:both}@media (min-width:700px){#enp-quiz .enp-question__form{padding:2.6rem 3rem}}#enp-quiz .enp-question__question{font-size:1.8rem;font-weight:700;line-height:1.2;margin-bottom:.2rem;padding-bottom:.1rem;position:relative;box-sizing:border-box;display:table;max-width:100%;white-space:normal}@media (min-width:400px){#enp-quiz .enp-question__question{font-size:2rem}}#enp-quiz .enp-question__question:after{content:"";position:absolute;height:2px;background-color:#eee;background-color:rgba(0,0,0,.2);margin:auto;width:0;bottom:0;left:0;right:0}#enp-quiz .enp-question__question:focus:after{animation:g .8s cubic-bezier(0,0,.3,1)}#enp-quiz .enp-question-image{margin-bottom:.4rem}#enp-quiz .enp-question__helper{font-size:1rem}#enp-quiz .enp-option__input{clip:rect(1px,1px,1px,1px);position:absolute!important;left:-10000px;top:auto;width:1px;height:1px;overflow:hidden}#enp-quiz .enp-option__input:checked+.enp-option__label:before{background-color:#60aaad}#enp-quiz .enp-option__input:focus+.enp-option__label{color:#1d1c25;background:#f5f5f5}#enp-quiz .enp-option__label{display:block;position:relative;width:100%;text-align:left;text-transform:none;padding:.8rem 0 .8rem 40px;font-size:1rem;font-weight:400;line-height:1.6;border:none;border-bottom:1px solid #eee;border-bottom:1px solid rgba(0,0,0,.1);background:none;color:#1d1c25;transition:color .2s cubic-bezier(0,0,.3,1),background .2s cubic-bezier(0,0,.3,1)}#enp-quiz .enp-option__label:before{content:"";position:absolute;top:.925rem;left:10px;width:20px;height:20px;border-radius:50%;border:2px solid #60aaad;padding:3px;background-clip:content-box;background-color:transparent;transition:all .2s}#enp-quiz .enp-option__label:last-of-type{border-bottom:none}#enp-quiz .enp-question__container--unanswered .enp-option__label:hover{cursor:pointer}#enp-quiz .enp-question__container--unanswered .enp-option__label:hover:before{background-color:#60aaad}#enp-quiz .enp-question__submit{text-align:center;border:none;border-radius:3px;padding:.85em 1.4em .75em;font-size:15px;font-weight:400;letter-spacing:.05em;line-height:1.6;color:#fff;box-shadow:inset 0 -2px 0 rgba(0,0,0,.2);background:#1e1c26;cursor:pointer;text-transform:uppercase;transition:all .2s;padding:.8em 1.2em .6em 1.4em;position:relative;padding-right:2.8em;padding-top:1em;padding-bottom:.95em;transition:padding .3s cubic-bezier(0,0,.3,1)}#enp-quiz .enp-question__submit:hover{color:#fff;box-shadow:none;background:#070609}#enp-quiz .enp-question__submit:active{color:#fff;box-shadow:inset 0 2px 0 rgba(0,0,0,.1);background:#4c4761}#enp-quiz .enp-question__submit:focus{outline-color:#4d90fe;outline-offset:-2px;outline-style:auto;outline-width:5px}#enp-quiz .enp-question__submit__icon{border-radius:50%;background:#1e1c26;background:#fff;fill:#1e1c26;width:1.2rem;height:1.2rem;margin-left:.5em;width:1.6em;height:1.6em;background:transparent;fill:#fff;position:absolute;top:0;bottom:0;margin-top:auto;margin-bottom:auto;transform:translateZ(0);transition:all .3s cubic-bezier(0,0,.3,1)}#enp-quiz .enp-question__submit:focus .enp-question__submit__icon,#enp-quiz .enp-question__submit:hover .enp-question__submit__icon{background:#fff;fill:#070609}#enp-quiz .enp-question__submit:focus,#enp-quiz .enp-question__submit:hover{padding-right:4em}#enp-quiz .enp-question__submit .enp-question__submit__icon{right:.8em}#enp-quiz .enp-question__fieldset--mc .enp-question__submit{opacity:0;height:0;padding-top:0;padding-bottom:0}#enp-quiz .enp-question__fieldset--mc .enp-option__input:checked~.enp-options__submit{margin-top:.4rem;padding-top:1em;padding-bottom:.95em;height:auto;opacity:1;animation:.3s d cubic-bezier(0,0,.3,1) forwards}#enp-quiz .enp-question__fieldset--slider .enp-options__submit{margin-top:1.4rem}#enp-quiz .enp-question__container--explanation{background-color:#faf9fb}#enp-quiz .enp-question__container--explanation .enp-question__submit{display:none}#enp-quiz .enp-question__container--explanation .enp-option__label{margin-bottom:5px;border-bottom:none}#enp-quiz .enp-question__container--explanation .enp-option__input--correct-clicked+.enp-option__label:before{background-color:#60aaad}#enp-quiz .enp-question__container--explanation .enp-option__input--correct+.enp-option__label{box-shadow:inset 4px 0 0 #60aaad;background-color:#feffff}#enp-quiz .enp-question__container--explanation .enp-option__input--incorrect-clicked+.enp-option__label{background-color:#fff;box-shadow:inset 4px 0 0 #bf5700}#enp-quiz .enp-question__container--explanation .enp-option__input--incorrect-clicked+.enp-option__label:before{border:2px solid #bf5700;background-color:#bf5700}#enp-quiz .enp-option__input--slide-hide+.enp-option__label{margin:0;height:0;animation:a .6s cubic-bezier(.28,.01,0,.69) forwards}#enp-quiz .enp-explanation{background:#fff;padding:1.6rem 1.6rem 1.5rem}#enp-quiz .enp-question__fieldset--slider .enp-explanation{animation:e .3s cubic-bezier(0,0,.3,1) forwards}#enp-quiz .enp-explanation--correct{box-shadow:inset 4px 0 0 #60aaad}#enp-quiz .enp-explanation--correct .enp-explanation__percentage:after{content:"% Got This Right"}#enp-quiz .enp-explanation--incorrect{box-shadow:inset 4px 0 0 #bf5700}#enp-quiz .enp-explanation--incorrect .enp-explanation__percentage:after{content:"% Got This Wrong"}#enp-quiz .enp-explanation__title{font-size:.85rem;text-transform:uppercase}#enp-quiz .enp-explanation__percentage{font-size:.75rem;font-weight:500;color:#565656;margin-left:4px}#enp-quiz .enp-explanation__percentage:after{content:"%"}#enp-quiz .enp-explanation--correct .enp-explanation__title{color:#4a8d90}#enp-quiz .enp-explanation--incorrect .enp-explanation__title{color:#8c4000}#enp-quiz .enp-explanation__explanation{font-weight:400;margin-top:.4rem}#enp-quiz .enp-next-step{padding:.8em 1.2em .6em 1.4em;padding-right:2.8em;padding-top:1em;padding-bottom:.95em;transition:padding .3s cubic-bezier(0,0,.3,1)}#enp-quiz .enp-next-step__icon{border-radius:50%;background:#1e1c26;background:#fff;fill:#1e1c26;width:1.2rem;height:1.2rem;margin-left:.5em;width:1.6em;height:1.6em;background:transparent;fill:#fff;position:absolute;top:0;bottom:0;margin-top:auto;margin-bottom:auto;transform:translateZ(0);transition:all .3s cubic-bezier(0,0,.3,1)}#enp-quiz .enp-next-step:focus .enp-next-step__icon,#enp-quiz .enp-next-step:hover .enp-next-step__icon{background:#fff;fill:#070609}#enp-quiz .enp-next-step{text-align:center;border:none;border-radius:3px;padding:.85em 1.4em .75em;font-size:15px;font-weight:400;letter-spacing:.05em;line-height:1.6;color:#fff;box-shadow:inset 0 -2px 0 rgba(0,0,0,.2);background:#1e1c26;cursor:pointer;text-transform:uppercase;transition:all .2s;border:2px solid #1e1c26;background:transparent;color:#1e1c26;box-shadow:none;display:inline-block;width:100%;padding:.8em 2.4em .8em 1.4em;position:relative}#enp-quiz .enp-next-step:hover{color:#fff;box-shadow:none;background:#070609}#enp-quiz .enp-next-step:active{color:#fff;box-shadow:inset 0 2px 0 rgba(0,0,0,.1);background:#4c4761}#enp-quiz .enp-next-step:focus{outline-color:#4d90fe;outline-offset:-2px;outline-style:auto;outline-width:5px}#enp-quiz .enp-next-step:focus,#enp-quiz .enp-next-step:hover{background:transparent;border:2px solid #070609;color:#070609}#enp-quiz .enp-next-step .enp-next-step__icon{fill:#1e1c26;transition:all .3s cubic-bezier(0,0,.3,1)}#enp-quiz .enp-next-step:hover .enp-next-step__icon{fill:#fff;background:#1e1c26;margin-right:0;transform:translate3d(1em,0,0);margin-right:1em}#enp-quiz .enp-question--on-deck{transform:translateX(200px);opacity:0;z-index:-1;top:0;position:absolute}#enp-quiz .enp-question--show{animation:c .6s cubic-bezier(0,0,.3,1) forwards}#enp-quiz .enp-question--remove{position:absolute;animation:b .15s cubic-bezier(0,0,.3,1) forwards}#enp-quiz .enp-results__score{position:relative;text-align:center;border-radius:50%;margin:0 auto 1rem;display:block;height:200px;width:200px}#enp-quiz .enp-results__score__title{color:#1d1c25;font-size:5rem;line-height:1;font-weight:400;position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);margin:0}#enp-quiz .enp-results__score__title__percentage{font-size:1.3rem;position:absolute;top:1rem;font-weight:300}#enp-quiz .enp-results__encouragement{font-size:1.8rem;font-weight:500;text-align:center;line-height:1.2;margin:.2rem}#enp-quiz .enp-results__description{max-width:24rem;margin:0 auto 1.6rem}#enp-quiz .enp-results__score__circle{transform:rotate(-90deg)}#enp-quiz #enp-results__score__circle__path,#enp-quiz .enp-results__score__circle__bg{stroke:#ddd;stroke-width:4px}#enp-quiz #enp-results__score__circle__path{stroke:#60aaad}#enp-quiz .enp-results__score__circle__setOffset{transition:stroke-dashoffset 1.2s cubic-bezier(0,0,.3,1)}#enp-quiz .enp-results__score__circle__resetOffset{stroke-dashoffset:565.48}#enp-quiz .enp-results__share-title{margin:2.4rem 0 1rem;font-size:.85rem;text-transform:uppercase;text-align:center}#enp-quiz .enp-results__share{list-style:none;margin-left:0;text-align:center}#enp-quiz .enp-results__share__item{display:inline-block;margin-right:20px}#enp-quiz .enp-results__share__item:last-child{margin-right:0}#enp-quiz .enp-results__share__item__icon{width:2.4rem;height:2.4rem;border-radius:50%;background:#1e1c26;fill:#fff;padding:.6rem;fill:#fff!important}#enp-quiz .enp-results__share__item__icon--facebook{background-color:#3a5795}#enp-quiz .enp-results__share__item__icon--twitter{background-color:#4099ff}#enp-quiz .enp-quiz-restart__container{text-align:center}#enp-quiz .enp-question__container--error{padding:1rem 10px;animation:f .3s cubic-bezier(0,0,.3,1) forwards}#enp-quiz .enp-callout{font-size:10px;font-size:.8rem;text-align:right;padding:.4rem}#enp-quiz .enp-slider{margin-bottom:1.6rem}#enp-quiz .enp-slider-input__container{display:flex;align-items:center;justify-content:center;margin:1.6rem auto;position:relative}#enp-quiz .enp-slider-input__label{display:block;color:#343242;font-weight:400;font-size:.85rem;text-transform:uppercase}#enp-quiz .enp-slider-input__prefix,#enp-quiz .enp-slider-input__suffix{font-size:1rem}#enp-quiz .enp-slider-input__prefix{margin-right:.2rem;white-space:pre}#enp-quiz .enp-slider-input__suffix{margin-left:.2rem;white-space:pre}#enp-quiz .enp-slider-input__input{font-size:1rem;font-family:Arial,monospace,helvetica,arial,sans-serif;padding:.8rem .5rem;background:#fff;border:1px solid #aaa;border-radius:3px;width:20rem;max-width:100%;margin-bottom:1.2rem;margin-bottom:0;padding:.75rem;width:auto;transition:all .25s cubic-bezier(0,0,.3,1)}@media (min-width:700px){#enp-quiz .enp-slider-input__input{padding:.8rem}}#enp-quiz .enp-slider-input__input--incorrect{color:#bf5700}#enp-quiz .enp-slider-input__input--correct{color:#4e9497}#enp-quiz .enp-slider-input__input--invalid-animation{box-shadow:0 0 2px 1px #c1893e}#enp-quiz .enp-slider_input__range-helper{position:absolute;bottom:-1.2rem;font-size:.8rem}#enp-quiz .enp-slider_input__range-helper--low{left:0}#enp-quiz .enp-slider_input__range-helper--high{right:0}#enp-quiz .enp-slider-input__range-helper__number{position:relative;color:#e3e3e3}#enp-quiz .ui-slider-range-show-correct__tooltip-container{position:relative}#enp-quiz .ui-slider-range-show-correct__tooltip{position:absolute;top:-.4rem;margin-left:-.55rem;height:1rem;width:1.1rem;height:1.1rem;border:2px solid #60aaad;background-color:#fff;border-radius:50%;z-index:9999}#enp-quiz .ui-slider-range-show-correct__tooltip--low{left:0}#enp-quiz .ui-slider-range-show-correct__tooltip--high{right:-.55rem}#enp-quiz .ui-slider-range-show-correct__tooltip__text{position:relative;color:#417d7f;top:-1.35rem;font-size:.825rem;min-width:100%;display:inline-block;text-align:center;text-shadow:0 1px 0 #fff}#enp-quiz .enp-slider{position:relative;text-align:left;background:#ddd}#enp-quiz .enp-slider .ui-helper-hidden{display:none}#enp-quiz .enp-slider .ui-helper-hidden-accessible{border:0;clip:rect(0 0 0 0);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px}#enp-quiz .enp-slider .ui-helper-reset{margin:0;padding:0;border:0;outline:0;line-height:1.3;text-decoration:none;font-size:100%;list-style:none}#enp-quiz .enp-slider .ui-helper-clearfix:after,#enp-quiz .enp-slider .ui-helper-clearfix:before{content:"";display:table;border-collapse:collapse}#enp-quiz .enp-slider .ui-helper-clearfix:after{clear:both}#enp-quiz .enp-slider .ui-helper-clearfix{min-height:0}#enp-quiz .enp-slider .ui-helper-zfix{width:100%;height:100%;top:0;left:0;position:absolute;opacity:0;filter:alpha(opacity=0)}#enp-quiz .enp-slider .ui-front{z-index:100}#enp-quiz .enp-slider .ui-state-disabled{cursor:default!important}#enp-quiz .enp-slider .ui-icon{display:block;text-indent:-99999px;overflow:hidden;background-repeat:no-repeat}#enp-quiz .enp-slider .ui-widget-overlay{position:fixed;top:0;left:0;width:100%;height:100%}#enp-quiz .enp-slider .ui-slider-handle{background:#fff;border-radius:50%;border:1px solid #aaa;position:absolute;z-index:2;width:1.2rem;height:1.2rem;top:-.4rem;margin-left:-.6rem;cursor:default;touch-action:none;transition:opacity .2s cubic-bezier(0,0,.3,1),height .18s cubic-bezier(0,0,.3,1),width .18s cubic-bezier(0,0,.3,1),transform .18s cubic-bezier(0,0,.3,1)}@media (max-width:699px){#enp-quiz .enp-slider .ui-slider-handle{width:2rem;height:2rem;top:-.85rem;margin-left:-1rem;transform:rotate(225deg)}}#enp-quiz .enp-slider .ui-slider-handle:focus{outline:none;box-shadow:0 0 3px 1px #4d90fe}@media (max-width:699px){#enp-quiz .enp-slider .ui-slider-handle.ui-state-active{width:2.2rem;height:2.2rem;border-top-left-radius:0;transform:translate3d(-.2rem,-.8rem,0) rotate(225deg)}}#enp-quiz .enp-slider .ui-slider-handle--correct,#enp-quiz .enp-slider .ui-slider-handle--incorrect{width:1.1rem;height:1.1rem;top:-.4rem;margin-left:-.55rem}#enp-quiz .enp-slider .ui-slider-handle--incorrect{z-index:1;border:2px solid #bf5700}#enp-quiz .enp-slider .ui-slider-handle--correct{border:2px solid #60aaad;z-index:99999}#enp-quiz .enp-slider .ui-slider-range{position:absolute;z-index:1;font-size:.7rem;display:block;border:0;background-position:0 0;top:0;height:100%}#enp-quiz .enp-slider .ui-slider-range-show-correct{background:#60aaad;z-index:9}#enp-quiz .enp-slider .ui-slider-range-min{left:0;background:#60aaad}#enp-quiz .enp-slider .ui-slider-range-max{right:0}#enp-quiz .enp-slider.ui-state-disabled .ui-slider-handle,#enp-quiz .enp-slider.ui-state-disabled .ui-slider-range{filter:inherit}#enp-quiz .ui-slider-horizontal{height:.3rem}#enp-quiz .enp-question__answered .enp-slider{background:#bbb}#enp-quiz .enp-question__answered .ui-slider-range-min{background:#fff} +a,abbr,acronym,address,applet,big,blockquote,body,caption,cite,code,dd,del,dfn,div,dl,dt,em,fieldset,font,form,h1,h2,h3,h4,h5,h6,html,iframe,ins,kbd,label,legend,li,object,ol,p,pre,q,s,samp,small,span,strike,strong,sub,sup,table,tbody,td,tfoot,th,thead,tr,tt,ul,var{border:0;font-family:inherit;font-size:100%;font-style:inherit;font-weight:inherit;margin:0;outline:0;padding:0;vertical-align:baseline}html{font-size:100%;overflow-y:scroll;-webkit-text-size-adjust:100%;-ms-text-size-adjust:100%}body{background:#fff;overflow:hidden}article,aside,details,figcaption,figure,footer,header,nav,section{display:block}ol,ul{list-style:none}table{border-collapse:separate;border-spacing:0}caption,td,th{font-weight:400;text-align:left}blockquote:after,blockquote:before,q:after,q:before{content:""}blockquote,q{quotes:"" ""}a:focus{outline:thin dotted}a:active,a:hover{outline:0}a img{border:0}html{box-sizing:border-box}*,:after,:before{box-sizing:inherit}html{font-size:16px!important}html #enp-quiz{box-sizing:border-box;border-radius:3px}body #enp-quiz{background:#fff;overflow:hidden}#enp-quiz *,#enp-quiz :after,#enp-quiz :before{box-sizing:inherit}#enp-quiz ol,#enp-quiz ul{margin:0 0 1.6rem 1.25rem;padding:0}#enp-quiz textarea{margin-bottom:1rem}#enp-quiz button,#enp-quiz button:active,#enp-quiz button:focus,#enp-quiz button:hover,#enp-quiz iframe,#enp-quiz input[type=button],#enp-quiz input[type=button]:active,#enp-quiz input[type=button]:focus,#enp-quiz input[type=button]:hover,#enp-quiz input[type=reset],#enp-quiz input[type=reset]:active,#enp-quiz input[type=reset]:focus,#enp-quiz input[type=reset]:hover,#enp-quiz input[type=submit],#enp-quiz input[type=submit]:active,#enp-quiz input[type=submit]:focus,#enp-quiz input[type=submit]:hover{border:none}#enp-quiz .enp-screen-reader-text{clip:rect(1px,1px,1px,1px);position:absolute!important;left:-10000px;top:auto;width:1px;height:1px;overflow:hidden}#enp-quiz .enp-screen-reader-text:active,#enp-quiz .enp-screen-reader-text:focus,#enp-quiz .enp-screen-reader-text:hover{background-color:#f1f1f1;border-radius:3px;box-shadow:0 0 2px 2px rgba(0,0,0,.6);clip:auto!important;color:#21759b;display:block;font-size:14px;font-weight:700;height:auto;left:5px;line-height:normal;padding:15px 23px 14px;text-decoration:none;top:5px;width:auto;z-index:100000}#enp-quiz .enp-quiz-message{max-width:640px;margin:1.6rem auto;padding-left:20px;padding-right:20px;max-width:400px;background:#fff;border:1px solid #eee;border-bottom:1px solid #ccc;padding:1rem .375rem}#enp-quiz .enp-quiz-message:after{content:"";display:table;clear:both}#enp-quiz .enp-quiz-message__title{font-size:.85rem;text-transform:uppercase}#enp-quiz .enp-message__list{list-style:none;margin-left:0;font-size:1.1rem;margin-bottom:0}#enp-quiz .enp-quiz-message--error{border-left:6px solid #bf5700;animation:d .3s cubic-bezier(0,0,.3,1)}#enp-quiz .enp-quiz-message__title--error{color:#964400}#enp-quiz .enp-quiz-message--success{border-left:6px solid #60aaad;color:#4e9497}#enp-quiz .enp-quiz-message__title--success{color:#4e9497}body{color:#1d1c25;font-family:Arial,monospace,helvetica,arial,sans-serif;font-size:1em;line-height:1.6;font-weight:400}@media (min-width:700px){body{font-size:1.3em}}#enp-quiz h1,#enp-quiz h2,#enp-quiz h3,#enp-quiz h4,#enp-quiz h5,#enp-quiz h6{font-family:Arial,monospace,helvetica,arial,sans-serif;color:#1d1c25;clear:both;margin:0 0 .2rem;font-weight:700;line-height:1.2em}#enp-quiz h1{font-size:2em}#enp-quiz h2{font-size:1.75em}#enp-quiz h3{font-size:1.475em}#enp-quiz h4{font-size:1.3em}#enp-quiz h5{font-size:1.125em}#enp-quiz h6{font-size:1em}#enp-quiz p+h1,#enp-quiz p+h2,#enp-quiz p+h3,#enp-quiz p+h4,#enp-quiz p+h5,#enp-quiz p+h6,#enp-quiz ul+h1,#enp-quiz ul+h2,#enp-quiz ul+h3,#enp-quiz ul+h4,#enp-quiz ul+h5,#enp-quiz ul+h6{margin-top:1.8em}#enp-quiz p{font-size:.85em;margin-bottom:1.125em;font-weight:300}#enp-quiz ol,#enp-quiz ul{margin:0 0 1.6em 1.25em}#enp-quiz ul{list-style:disc}#enp-quiz ol{list-style:decimal}#enp-quiz li>ol,#enp-quiz li>ul{margin-bottom:0;margin-left:1.6em}#enp-quiz b,#enp-quiz strong{font-weight:700}#enp-quiz cite,#enp-quiz dfn,#enp-quiz em{font-family:georgia,times,serif;font-style:italic}#enp-quiz pre{background:#eee;font-family:Courier\ 10 Pitch,Courier,monospace;font-size:.95em;line-height:1.6;margin-bottom:1.6em;padding:1.6em;overflow:auto;max-width:100%}#enp-quiz .code,#enp-quiz code,#enp-quiz kbd,#enp-quiz tt,#enp-quiz var{font:.7em Monaco,Consolas,Andale Mono,DejaVu Sans Mono,monospace}#enp-quiz figure{margin:0}#enp-quiz img{height:auto;max-width:100%}#enp-quiz a{color:#00a9b7;text-decoration:none;transition:color .2s;touch-action:manipulation}#enp-quiz a .enp-icon{fill:#00a9b7}#enp-quiz a:active,#enp-quiz a:focus,#enp-quiz a:hover{color:#007a84}#enp-quiz a:active .enp-icon,#enp-quiz a:focus .enp-icon,#enp-quiz a:hover .enp-icon{fill:#007a84}#enp-quiz button:focus{outline-color:#4d90fe;outline-offset:-2px;outline-style:auto;outline-width:5px}#enp-quiz .enp-btn{text-align:center;border:none;border-radius:3px;padding:.85em 1.4em .75em;font-size:15px;font-weight:400;letter-spacing:.05em;line-height:1.6;color:#fff;box-shadow:inset 0 -2px 0 rgba(0,0,0,.2);background:#00a9b7;cursor:pointer;text-transform:uppercase;transition:all .2s}#enp-quiz .enp-btn:hover{color:#fff;box-shadow:none;background:#007a84}#enp-quiz .enp-btn:active{color:#fff;box-shadow:inset 0 2px 0 rgba(0,0,0,.1);background:#1eeeff}#enp-quiz .enp-btn:focus{outline-color:#4d90fe;outline-offset:-2px;outline-style:auto;outline-width:5px}#enp-quiz .enp-btn--add{text-align:center;border:none;border-radius:3px;padding:.85em 1.4em .75em;font-size:15px;font-weight:400;letter-spacing:.05em;line-height:1.6;color:#fff;box-shadow:inset 0 -2px 0 rgba(0,0,0,.2);background:#00a9b7;cursor:pointer;text-transform:uppercase;transition:all .2s;border:3px dashed #e3e3e3;background:none;color:#545454;box-shadow:none;width:100%}#enp-quiz .enp-btn--add:hover{color:#fff;box-shadow:none;background:#007a84}#enp-quiz .enp-btn--add:active{color:#fff;box-shadow:inset 0 2px 0 rgba(0,0,0,.1);background:#1eeeff}#enp-quiz .enp-btn--add:focus{outline-color:#4d90fe;outline-offset:-2px;outline-style:auto;outline-width:5px}#enp-quiz .enp-btn--add:focus,#enp-quiz .enp-btn--add:hover{border:3px dashed #b0b0b0;color:#b0b0b0;background:hsla(0,0%,100%,.9)}#enp-quiz .enp-btn--disabled{opacity:.65;cursor:default}#enp-quiz .enp-btn--enabled{animation:expand .6s}#enp-quiz .enp-icon{width:24px;height:24px;transition:all .2s}#enp-quiz .enp-page-title{font-size:1.6rem}#enp-quiz fieldset{border:none;margin:0;padding:0}.enp-label,.enp-legend{display:block;color:#343242;font-weight:400;font-size:.85rem;text-transform:uppercase}.enp-legend{padding-top:1.6rem;margin-bottom:.2rem;border:none}.enp-input{font-size:1rem;font-family:Arial,monospace,helvetica,arial,sans-serif;padding:.8rem .5rem;background:#fff;border:1px solid #aaa;border-radius:3px;width:20rem;max-width:100%;margin-bottom:1.2rem}@media (min-width:700px){.enp-input{padding:.8rem}}.enp-input::-webkit-input-placeholder,.enp-textarea::-webkit-input-placeholder{font-family:Arial,monospace,helvetica,arial,sans-serif;font-weight:300;color:#7a7697}.enp-input:-ms-input-placeholder,.enp-input::-ms-input-placeholder,.enp-textarea:-ms-input-placeholder,.enp-textarea::-ms-input-placeholder{font-family:Arial,monospace,helvetica,arial,sans-serif;font-weight:300;color:#7a7697}.enp-input::placeholder,.enp-textarea::placeholder{font-family:Arial,monospace,helvetica,arial,sans-serif;font-weight:300;color:#7a7697}@keyframes a{0%{opacity:1;height:auto;transform:translateZ(0)}10%{opacity:1;transform:translateZ(0)}to{padding:0;opacity:0;display:none;height:0;z-index:-1;transform:translate3d(-150px,0,0)}}@keyframes b{0%{opacity:1;transform:translateX(0)}15%{opacity:1;transform:translateX(0)}to{opacity:0;transform:translateX(-150px)}}@keyframes c{0%{opacity:0;transform:translateX(120px)}to{opacity:1;transform:translateX(0)}}@keyframes d{0%{opacity:0;height:auto;transform:translate3d(0,-20px,0)}to{opacity:1;height:auto;transform:translateZ(0)}}@keyframes e{0%{opacity:0;transform:translate3d(0,20px,0)}to{opacity:1;transform:translateZ(0)}}@keyframes f{to{background-color:rgba(191,87,0,.2)}}@keyframes g{0%{width:0;opacity:1}30%{width:100%}80%{opacity:1;width:100%}to{width:40%;opacity:0}}.spinner{margin:0 auto;width:70px;text-align:center}.spinner>div{width:18px;height:18px;background-color:#333;border-radius:100%;display:inline-block;animation:h 1.4s infinite ease-in-out both}.spinner .bounce1{animation-delay:-.32s}.spinner .bounce2{animation-delay:-.16s}@keyframes h{0%,80%,to{transform:scale(0)}40%{transform:scale(1)}}#enp-quiz{background:transparent}#enp-quiz .enp-quiz__container{position:relative;padding:0;background:#fff;border:1px solid #ddd}#enp-quiz .enp-quiz__header{position:relative;border-bottom:1px solid #ddd}#enp-quiz .enp-quiz__title{font-size:.85rem;text-transform:uppercase;font-weight:500;letter-spacing:.01rem;padding:.6rem 1rem}#enp-quiz .enp-quiz__title--hide{display:none}#enp-quiz .enp-quiz__progress{position:absolute;bottom:0;left:0;right:0;height:0}#enp-quiz .enp-quiz__progress__bar{position:relative;width:0;min-width:2rem;height:3px;background:#60aaad;transition:all .5s cubic-bezier(0,0,.3,1)}#enp-quiz .enp-quiz__progress__bar__question-count{position:absolute;right:1rem;bottom:.7rem;font-size:.8rem}#enp-quiz .enp-question__container{display:block;min-height:92vh}#enp-quiz .enp-question__form{max-width:640px;margin-left:auto;margin-right:auto;padding:2rem 20px 2.6rem;overflow:hidden;color:#1d1c25}#enp-quiz .enp-question__form:after{content:"";display:table;clear:both}@media (min-width:700px){#enp-quiz .enp-question__form{padding:2.6rem 3rem}}#enp-quiz .enp-question__question{font-size:1.8rem;font-weight:700;line-height:1.2;margin-bottom:.2rem;padding-bottom:.1rem;position:relative;box-sizing:border-box;display:table;max-width:100%;white-space:normal}@media (min-width:400px){#enp-quiz .enp-question__question{font-size:2rem}}#enp-quiz .enp-question__question:after{content:"";position:absolute;height:2px;background-color:#eee;background-color:rgba(0,0,0,.2);margin:auto;width:0;bottom:0;left:0;right:0}#enp-quiz .enp-question__question:focus:after{animation:g .8s cubic-bezier(0,0,.3,1)}#enp-quiz .enp-question-image{margin-bottom:.4rem}#enp-quiz .enp-question__helper{font-size:1rem}#enp-quiz .enp-option__input{clip:rect(1px,1px,1px,1px);position:absolute!important;left:-10000px;top:auto;width:1px;height:1px;overflow:hidden}#enp-quiz .enp-option__input:checked+.enp-option__label:before{background-color:#60aaad}#enp-quiz .enp-option__input:focus+.enp-option__label{color:#1d1c25;background:#f5f5f5}#enp-quiz .enp-option__label{display:block;position:relative;width:100%;text-align:left;text-transform:none;padding:.8rem 0 .8rem 40px;font-size:1rem;font-weight:400;line-height:1.6;border:none;border-bottom:1px solid #eee;border-bottom:1px solid rgba(0,0,0,.1);background:none;color:#1d1c25;transition:color .2s cubic-bezier(0,0,.3,1),background .2s cubic-bezier(0,0,.3,1)}#enp-quiz .enp-option__label:before{content:"";position:absolute;top:.925rem;left:10px;width:20px;height:20px;border-radius:50%;border:2px solid #60aaad;padding:3px;background-clip:content-box;background-color:transparent;transition:all .2s}#enp-quiz .enp-option__label:last-of-type{border-bottom:none}#enp-quiz .enp-question__container--unanswered .enp-option__label:hover{cursor:pointer}#enp-quiz .enp-question__container--unanswered .enp-option__label:hover:before{background-color:#60aaad}#enp-quiz .enp-question__submit{text-align:center;border:none;border-radius:3px;padding:.85em 1.4em .75em;font-size:15px;font-weight:400;letter-spacing:.05em;line-height:1.6;color:#fff;box-shadow:inset 0 -2px 0 rgba(0,0,0,.2);background:#00a9b7;cursor:pointer;text-transform:uppercase;transition:all .2s;padding:.8em 1.2em .6em 1.4em;position:relative;padding-right:2.8em;padding-top:1em;padding-bottom:.95em;transition:padding .3s cubic-bezier(0,0,.3,1)}#enp-quiz .enp-question__submit:hover{color:#fff;box-shadow:none;background:#007a84}#enp-quiz .enp-question__submit:active{color:#fff;box-shadow:inset 0 2px 0 rgba(0,0,0,.1);background:#1eeeff}#enp-quiz .enp-question__submit:focus{outline-color:#4d90fe;outline-offset:-2px;outline-style:auto;outline-width:5px}#enp-quiz .enp-question__submit__icon{border-radius:50%;background:#00a9b7;background:#fff;fill:#00a9b7;width:1.2rem;height:1.2rem;margin-left:.5em;width:1.6em;height:1.6em;background:transparent;fill:#fff;position:absolute;top:0;bottom:0;margin-top:auto;margin-bottom:auto;transform:translateZ(0);transition:all .3s cubic-bezier(0,0,.3,1)}#enp-quiz .enp-question__submit:focus .enp-question__submit__icon,#enp-quiz .enp-question__submit:hover .enp-question__submit__icon{background:#fff;fill:#007a84}#enp-quiz .enp-question__submit:focus,#enp-quiz .enp-question__submit:hover{padding-right:4em}#enp-quiz .enp-question__submit .enp-question__submit__icon{right:.8em}#enp-quiz .enp-question__fieldset--mc .enp-question__submit{opacity:0;height:0;padding-top:0;padding-bottom:0}#enp-quiz .enp-question__fieldset--mc .enp-option__input:checked~.enp-options__submit{margin-top:.4rem;padding-top:1em;padding-bottom:.95em;height:auto;opacity:1;animation:.3s d cubic-bezier(0,0,.3,1) forwards}#enp-quiz .enp-question__fieldset--slider .enp-options__submit{margin-top:1.4rem}#enp-quiz .enp-question__container--explanation{background-color:#faf9fb}#enp-quiz .enp-question__container--explanation .enp-question__submit{display:none}#enp-quiz .enp-question__container--explanation .enp-option__label{margin-bottom:5px;border-bottom:none}#enp-quiz .enp-question__container--explanation .enp-option__input--correct-clicked+.enp-option__label:before{background-color:#60aaad}#enp-quiz .enp-question__container--explanation .enp-option__input--correct+.enp-option__label{box-shadow:inset 4px 0 0 #60aaad;background-color:#feffff}#enp-quiz .enp-question__container--explanation .enp-option__input--incorrect-clicked+.enp-option__label{background-color:#fff;box-shadow:inset 4px 0 0 #bf5700}#enp-quiz .enp-question__container--explanation .enp-option__input--incorrect-clicked+.enp-option__label:before{border:2px solid #bf5700;background-color:#bf5700}#enp-quiz .enp-option__input--slide-hide+.enp-option__label{margin:0;height:0;animation:a .6s cubic-bezier(.28,.01,0,.69) forwards}#enp-quiz .enp-explanation{background:#fff;padding:1.6rem 1.6rem 1.5rem}#enp-quiz .enp-question__fieldset--slider .enp-explanation{animation:e .3s cubic-bezier(0,0,.3,1) forwards}#enp-quiz .enp-explanation--correct{box-shadow:inset 4px 0 0 #60aaad}#enp-quiz .enp-explanation--correct .enp-explanation__percentage:after{content:"% Got This Right"}#enp-quiz .enp-explanation--incorrect{box-shadow:inset 4px 0 0 #bf5700}#enp-quiz .enp-explanation--incorrect .enp-explanation__percentage:after{content:"% Got This Wrong"}#enp-quiz .enp-explanation__title{font-size:.85rem;text-transform:uppercase}#enp-quiz .enp-explanation__percentage{font-size:.75rem;font-weight:500;color:#565656;margin-left:4px}#enp-quiz .enp-explanation__percentage:after{content:"%"}#enp-quiz .enp-explanation--correct .enp-explanation__title{color:#4a8d90}#enp-quiz .enp-explanation--incorrect .enp-explanation__title{color:#8c4000}#enp-quiz .enp-explanation__explanation{font-weight:400;margin-top:.4rem}#enp-quiz .enp-next-step{padding:.8em 1.2em .6em 1.4em;padding-right:2.8em;padding-top:1em;padding-bottom:.95em;transition:padding .3s cubic-bezier(0,0,.3,1)}#enp-quiz .enp-next-step__icon{border-radius:50%;background:#00a9b7;background:#fff;fill:#00a9b7;width:1.2rem;height:1.2rem;margin-left:.5em;width:1.6em;height:1.6em;background:transparent;fill:#fff;position:absolute;top:0;bottom:0;margin-top:auto;margin-bottom:auto;transform:translateZ(0);transition:all .3s cubic-bezier(0,0,.3,1)}#enp-quiz .enp-next-step:focus .enp-next-step__icon,#enp-quiz .enp-next-step:hover .enp-next-step__icon{background:#fff;fill:#007a84}#enp-quiz .enp-next-step{text-align:center;border:none;border-radius:3px;padding:.85em 1.4em .75em;font-size:15px;font-weight:400;letter-spacing:.05em;line-height:1.6;color:#fff;box-shadow:inset 0 -2px 0 rgba(0,0,0,.2);background:#00a9b7;cursor:pointer;text-transform:uppercase;transition:all .2s;border:2px solid #00a9b7;background:transparent;color:#00a9b7;box-shadow:none;display:inline-block;width:100%;padding:.8em 2.4em .8em 1.4em;position:relative}#enp-quiz .enp-next-step:hover{color:#fff;box-shadow:none;background:#007a84}#enp-quiz .enp-next-step:active{color:#fff;box-shadow:inset 0 2px 0 rgba(0,0,0,.1);background:#1eeeff}#enp-quiz .enp-next-step:focus{outline-color:#4d90fe;outline-offset:-2px;outline-style:auto;outline-width:5px}#enp-quiz .enp-next-step:focus,#enp-quiz .enp-next-step:hover{background:transparent;border:2px solid #007a84;color:#007a84}#enp-quiz .enp-next-step .enp-next-step__icon{fill:#00a9b7;transition:all .3s cubic-bezier(0,0,.3,1)}#enp-quiz .enp-next-step:hover .enp-next-step__icon{fill:#fff;background:#00a9b7;margin-right:0;transform:translate3d(1em,0,0);margin-right:1em}#enp-quiz .enp-question--on-deck{transform:translateX(200px);opacity:0;z-index:-1;top:0;position:absolute}#enp-quiz .enp-question--show{animation:c .6s cubic-bezier(0,0,.3,1) forwards}#enp-quiz .enp-question--remove{position:absolute;animation:b .15s cubic-bezier(0,0,.3,1) forwards}#enp-quiz .enp-results__score{position:relative;text-align:center;border-radius:50%;margin:0 auto 1rem;display:block;height:200px;width:200px}#enp-quiz .enp-results__score__title{color:#1d1c25;font-size:5rem;line-height:1;font-weight:400;position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);margin:0}#enp-quiz .enp-results__score__title__percentage{font-size:1.3rem;position:absolute;top:1rem;font-weight:300}#enp-quiz .enp-results__encouragement{font-size:1.8rem;font-weight:500;text-align:center;line-height:1.2;margin:.2rem}#enp-quiz .enp-results__description{max-width:24rem;margin:0 auto 1.6rem}#enp-quiz .enp-results__score__circle{transform:rotate(-90deg)}#enp-quiz #enp-results__score__circle__path,#enp-quiz .enp-results__score__circle__bg{stroke:#ddd;stroke-width:4px}#enp-quiz #enp-results__score__circle__path{stroke:#60aaad}#enp-quiz .enp-results__score__circle__setOffset{transition:stroke-dashoffset 1.2s cubic-bezier(0,0,.3,1)}#enp-quiz .enp-results__score__circle__resetOffset{stroke-dashoffset:565.48}#enp-quiz .enp-results__share-title{margin:2.4rem 0 1rem;font-size:.85rem;text-transform:uppercase;text-align:center}#enp-quiz .enp-results__share{list-style:none;margin-left:0;text-align:center}#enp-quiz .enp-results__share__item{display:inline-block;margin-right:20px}#enp-quiz .enp-results__share__item:last-child{margin-right:0}#enp-quiz .enp-results__share__item__icon{width:2.4rem;height:2.4rem;border-radius:50%;background:#00a9b7;fill:#fff;padding:.6rem;fill:#fff!important}#enp-quiz .enp-results__share__item__icon--facebook{background-color:#3a5795}#enp-quiz .enp-results__share__item__icon--twitter{background-color:#4099ff}#enp-quiz .enp-quiz-restart__container{text-align:center}#enp-quiz .enp-question__container--error{padding:1rem 10px;animation:f .3s cubic-bezier(0,0,.3,1) forwards}#enp-quiz .enp-callout{font-size:10px;font-size:.8rem;text-align:right;padding:.4rem}#enp-quiz .enp-slider{margin-bottom:1.6rem}#enp-quiz .enp-slider-input__container{display:flex;align-items:center;justify-content:center;margin:1.6rem auto;position:relative}#enp-quiz .enp-slider-input__label{display:block;color:#343242;font-weight:400;font-size:.85rem;text-transform:uppercase}#enp-quiz .enp-slider-input__prefix,#enp-quiz .enp-slider-input__suffix{font-size:1rem}#enp-quiz .enp-slider-input__prefix{margin-right:.2rem;white-space:pre}#enp-quiz .enp-slider-input__suffix{margin-left:.2rem;white-space:pre}#enp-quiz .enp-slider-input__input{font-size:1rem;font-family:Arial,monospace,helvetica,arial,sans-serif;padding:.8rem .5rem;background:#fff;border:1px solid #aaa;border-radius:3px;width:20rem;max-width:100%;margin-bottom:1.2rem;margin-bottom:0;padding:.75rem;width:auto;transition:all .25s cubic-bezier(0,0,.3,1)}@media (min-width:700px){#enp-quiz .enp-slider-input__input{padding:.8rem}}#enp-quiz .enp-slider-input__input--incorrect{color:#bf5700}#enp-quiz .enp-slider-input__input--correct{color:#4e9497}#enp-quiz .enp-slider-input__input--invalid-animation{box-shadow:0 0 2px 1px #c1893e}#enp-quiz .enp-slider_input__range-helper{position:absolute;bottom:-1.2rem;font-size:.8rem}#enp-quiz .enp-slider_input__range-helper--low{left:0}#enp-quiz .enp-slider_input__range-helper--high{right:0}#enp-quiz .enp-slider-input__range-helper__number{position:relative;color:#e3e3e3}#enp-quiz .ui-slider-range-show-correct__tooltip-container{position:relative}#enp-quiz .ui-slider-range-show-correct__tooltip{position:absolute;top:-.4rem;margin-left:-.55rem;height:1rem;width:1.1rem;height:1.1rem;border:2px solid #60aaad;background-color:#fff;border-radius:50%;z-index:9999}#enp-quiz .ui-slider-range-show-correct__tooltip--low{left:0}#enp-quiz .ui-slider-range-show-correct__tooltip--high{right:-.55rem}#enp-quiz .ui-slider-range-show-correct__tooltip__text{position:relative;color:#417d7f;top:-1.35rem;font-size:.825rem;min-width:100%;display:inline-block;text-align:center;text-shadow:0 1px 0 #fff}#enp-quiz .enp-slider{position:relative;text-align:left;background:#ddd}#enp-quiz .enp-slider .ui-helper-hidden{display:none}#enp-quiz .enp-slider .ui-helper-hidden-accessible{border:0;clip:rect(0 0 0 0);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px}#enp-quiz .enp-slider .ui-helper-reset{margin:0;padding:0;border:0;outline:0;line-height:1.3;text-decoration:none;font-size:100%;list-style:none}#enp-quiz .enp-slider .ui-helper-clearfix:after,#enp-quiz .enp-slider .ui-helper-clearfix:before{content:"";display:table;border-collapse:collapse}#enp-quiz .enp-slider .ui-helper-clearfix:after{clear:both}#enp-quiz .enp-slider .ui-helper-clearfix{min-height:0}#enp-quiz .enp-slider .ui-helper-zfix{width:100%;height:100%;top:0;left:0;position:absolute;opacity:0;filter:alpha(opacity=0)}#enp-quiz .enp-slider .ui-front{z-index:100}#enp-quiz .enp-slider .ui-state-disabled{cursor:default!important}#enp-quiz .enp-slider .ui-icon{display:block;text-indent:-99999px;overflow:hidden;background-repeat:no-repeat}#enp-quiz .enp-slider .ui-widget-overlay{position:fixed;top:0;left:0;width:100%;height:100%}#enp-quiz .enp-slider .ui-slider-handle{background:#fff;border-radius:50%;border:1px solid #aaa;position:absolute;z-index:2;width:1.2rem;height:1.2rem;top:-.4rem;margin-left:-.6rem;cursor:default;touch-action:none;transition:opacity .2s cubic-bezier(0,0,.3,1),height .18s cubic-bezier(0,0,.3,1),width .18s cubic-bezier(0,0,.3,1),transform .18s cubic-bezier(0,0,.3,1)}@media (max-width:699px){#enp-quiz .enp-slider .ui-slider-handle{width:2rem;height:2rem;top:-.85rem;margin-left:-1rem;transform:rotate(225deg)}}#enp-quiz .enp-slider .ui-slider-handle:focus{outline:none;box-shadow:0 0 3px 1px #4d90fe}@media (max-width:699px){#enp-quiz .enp-slider .ui-slider-handle.ui-state-active{width:2.2rem;height:2.2rem;border-top-left-radius:0;transform:translate3d(-.2rem,-.8rem,0) rotate(225deg)}}#enp-quiz .enp-slider .ui-slider-handle--correct,#enp-quiz .enp-slider .ui-slider-handle--incorrect{width:1.1rem;height:1.1rem;top:-.4rem;margin-left:-.55rem}#enp-quiz .enp-slider .ui-slider-handle--incorrect{z-index:1;border:2px solid #bf5700}#enp-quiz .enp-slider .ui-slider-handle--correct{border:2px solid #60aaad;z-index:99999}#enp-quiz .enp-slider .ui-slider-range{position:absolute;z-index:1;font-size:.7rem;display:block;border:0;background-position:0 0;top:0;height:100%}#enp-quiz .enp-slider .ui-slider-range-show-correct{background:#60aaad;z-index:9}#enp-quiz .enp-slider .ui-slider-range-min{left:0;background:#60aaad}#enp-quiz .enp-slider .ui-slider-range-max{right:0}#enp-quiz .enp-slider.ui-state-disabled .ui-slider-handle,#enp-quiz .enp-slider.ui-state-disabled .ui-slider-range{filter:inherit}#enp-quiz .ui-slider-horizontal{height:.3rem}#enp-quiz .enp-question__answered .enp-slider{background:#bbb}#enp-quiz .enp-question__answered .ui-slider-range-min{background:#fff} /*# sourceMappingURL=enp_quiz-take.min.css.map */ diff --git a/public/quiz-take/css/enp_quiz-take.min.css.map b/public/quiz-take/css/enp_quiz-take.min.css.map index 0e8813f1..c09d8859 100644 --- a/public/quiz-take/css/enp_quiz-take.min.css.map +++ b/public/quiz-take/css/enp_quiz-take.min.css.map @@ -1 +1 @@ -{"version":3,"sources":["_setup.scss","_utilities.scss","_structure.scss","_variables.scss","_typography.scss","_forms.scss","_animations.scss","_quiz.scss","_slider.scss"],"names":[],"mappings":"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","file":"enp_quiz-take.min.css","sourcesContent":["html, body, div, span, applet, object, iframe,\nh1, h2, h3, h4, h5, h6, p, blockquote, pre,\na, abbr, acronym, address, big, cite, code,\ndel, dfn, em, font, ins, kbd, q, s, samp,\nsmall, strike, strong, sub, sup, tt, var,\ndl, dt, dd, ol, ul, li,\nfieldset, form, label, legend,\ntable, caption, tbody, tfoot, thead, tr, th, td {\nborder: 0;\nfont-family: inherit;\nfont-size: 100%;\nfont-style: inherit;\nfont-weight: inherit;\nmargin: 0;\noutline: 0;\npadding: 0;\nvertical-align: baseline;\n}\nhtml {\nfont-size: 100%; /* Corrects text resizing oddly in IE6/7 when body font-size is set using em units http://clagnut.com/blog/348/#c790 */\noverflow-y: scroll; /* Keeps page centred in all browsers regardless of content height */\n-webkit-text-size-adjust: 100%; /* Prevents iOS text size adjust after orientation change, without disabling user zoom */\n-ms-text-size-adjust: 100%; /* www.456bereastreet.com/archive/201012/controlling_text_size_in_safari_for_ios_without_disabling_user_zoom/ */\n}\nbody {\nbackground: #fff;\noverflow: hidden;\n}\narticle,\naside,\ndetails,\nfigcaption,\nfigure,\nfooter,\nheader,\nnav,\nsection {\ndisplay: block;\n}\nol, ul {\nlist-style: none;\n}\ntable { /* tables still need 'cellspacing=\"0\"' in the markup */\nborder-collapse: separate;\nborder-spacing: 0;\n}\ncaption, th, td {\nfont-weight: normal;\ntext-align: left;\n}\nblockquote:before, blockquote:after,\nq:before, q:after {\ncontent: \"\";\n}\nblockquote, q {\nquotes: \"\" \"\";\n}\na:focus {\noutline: thin dotted;\n}\na:hover,\na:active { /* Improves readability when focused and also mouse hovered in all browsers people.opera.com/patrickl/experiments/keyboard/test */\noutline: 0;\n}\na img {\nborder: 0;\n}\n\n/* Reseting to border-box so we can do 100% width with 20px and not mess stuff up. */\nhtml {\nbox-sizing: border-box;\n}\n\n*, *:before, *:after {\nbox-sizing: inherit;\n}\n\nhtml {\n font-size: 16px!important; // set our rem value reference\n}\n\nhtml #enp-quiz {\n box-sizing: border-box;\n border-radius: 3px;\n}\n\nbody #enp-quiz {\n background: #fff;\n overflow: hidden;\n}\n\n#enp-quiz {\n *, *:before, *:after {\n box-sizing: inherit;\n }\n\n ul, ol {\n margin: 0 0 1.6rem 1.25rem;\n padding: 0;\n }\n\n textarea {\n margin-bottom: 1rem;\n }\n\n button, input[type=\"button\"], input[type=\"reset\"], input[type=\"submit\"] {\n border: none;\n &:active,\n &:focus,\n &:hover {\n border: none;\n }\n }\n\n iframe {\n border: none;\n }\n}\n","/* Text meant only for screen readers */\n@mixin screen-reader-text {\n clip: rect(1px, 1px, 1px, 1px);\n position: absolute !important;\n left:-10000px;\n top:auto;\n width:1px;\n height:1px;\n overflow:hidden;\n}\n\n@mixin screen-reader-text--hover {\n background-color: #f1f1f1;\n border-radius: 3px;\n box-shadow: 0 0 2px 2px rgba(0, 0, 0, 0.6);\n clip: auto !important;\n color: #21759b;\n display: block;\n font-size: 14px;\n font-weight: bold;\n height: auto;\n left: 5px;\n line-height: normal;\n padding: 15px 23px 14px;\n text-decoration: none;\n top: 5px;\n width: auto;\n z-index: 100000;\n}\n\n\n@mixin disabled {\n opacity: 0.65;\n cursor: default;\n}\n\n@mixin btn {\n text-align: center;\n border: none;\n border-radius: 3px;\n padding: .85em 1.4em .75em;\n font-size: 15px;\n font-weight: 400;\n letter-spacing: .05em;\n line-height: 1.6;\n color: #fff;\n box-shadow: inset 0 -2px 0 rgba(0,0,0,.2);\n background: $link;\n cursor: pointer;\n text-transform: uppercase;\n transition: all .2s;\n\n &:hover {\n color: #fff;\n box-shadow: none;\n background: $link_hover;\n }\n\n &:active {\n color: #fff;\n box-shadow: inset 0 2px 0 rgba(0,0,0,.1);\n background: lighten($link, 20);\n }\n\n &:focus {\n @include focus--glow;\n }\n}\n\n@mixin btn--reset {\n border: none;\n background: none;\n box-shadow: none;\n padding: 0;\n margin: 0;\n}\n\n\n@mixin btn--submit {\n @include btn;\n}\n\n@mixin btn--ghost {\n @include btn;\n border: 2px solid $blue;\n background: transparent;\n color: $link;\n box-shadow: none;\n\n &:focus,\n &:hover {\n background: transparent;\n border: 2px solid $link_hover;\n color: $link_hover;\n }\n}\n\n@mixin btn--dashed {\n @include btn;\n border: 3px dashed $dark_gray;\n background: none;\n color: #545454;\n box-shadow: none;\n\n &:hover,\n &:focus {\n border: 3px dashed $darker_gray;\n color: $darker_gray;\n background: rgba(255,255,255,.9);\n }\n}\n\n@mixin btn--small {\n font-size: 13px;\n}\n\n@mixin btn--thin {\n padding: 0.4em 1em;\n}\n\n@mixin btn--wide {\n width: 100%;\n padding-top: 1em;\n padding-bottom: 1em;\n}\n\n@mixin btn--icon {\n @include btn;\n padding: .75em 0.8em .7em 1.4em;\n}\n\n@mixin btn--icon__icon {\n @include icon--white;\n @include icon--xl;\n}\n\n/*\n* @usage: @include btn--icon(BEM-root-class);\n* Button with icon with white circular background.\n* --------------\n* | BTN TEXT > |\n* --------------\n* @param $rootBEM: root class name that will be extended\n*/\n@mixin btn--icon($rootBEM) {\n .#{$rootBEM} {\n @include btn--icon;\n }\n\n .#{$rootBEM}__icon {\n @include btn--icon__icon ;\n }\n}\n\n@mixin btn--icon--icon-circle {\n @include btn;\n padding: .8em 1.2em .6em 1.4em;\n}\n\n// use when the icon is larger and on the right\n@mixin btn--icon__icon--circle {\n @include icon--circle;\n @include icon--white-bg;\n @include icon--normal;\n margin-left: 0.5em;\n}\n\n@mixin btn--icon__icon--circle--hover {\n @include icon--white-bg--hover;\n}\n\n/*\n* @usage: @include btn--icon--circle(BEM-root-class);\n* Button with icon with white circular background.\n* ---------------\n* | BTN TEXT (>) |\n* ---------------\n* @param $rootBEM: root class name that will be extended\n*/\n@mixin btn--icon--circle($rootBEM) {\n .#{$rootBEM} {\n @include btn--icon--icon-circle;\n }\n\n .#{$rootBEM}__icon {\n @include btn--icon__icon--circle ;\n\n &:hover {\n @include btn--icon__icon--circle--hover ;\n }\n }\n}\n\n/*\n* @usage: @include btn--icon--hover-circle(BEM-root-class);\n* Button with icon. Hovering/focusing button moves\n* the icon to right and fades in a white circular background\n* -------------- ----------------\n* | BTN TEXT > | --hover/focus--> | BTN TEXT (>) |\n* -------------- ----------------\n* @param $rootBEM: root class name that will be extended\n*/\n@mixin btn--icon--hover-circle($rootBEM) {\n .#{$rootBEM} {\n @include btn--icon--icon-circle;\n position: relative;\n padding-right: 2.8em;\n padding-top: 1em;\n padding-bottom: 0.95em;\n transition: padding .3s $fastInEaseOut;\n }\n\n .#{$rootBEM}__icon {\n @include btn--icon__icon--circle ;\n width: 1.6em;\n height: 1.6em;\n background: transparent;\n fill: #fff;\n position: absolute;\n top: 0;\n bottom: 0;\n margin-top: auto;\n margin-bottom: auto;\n transform: translate3d(0, 0, 0);\n transition: all .3s $fastInEaseOut;\n }\n\n .#{$rootBEM}:hover,\n .#{$rootBEM}:focus {\n\n .#{$rootBEM}__icon {\n @include btn--icon__icon--circle--hover ;\n }\n }\n\n\n\n\n}\n\n// use on small icons and placed on the left\n@mixin btn--icon__icon--circle--small {\n @include icon--circle--small;\n margin-right: 5px;\n}\n\n\n// use this to match the icon to the inline font-size\n@mixin icon--inline {\n width: 1em;\n height: 1em;\n position: relative;\n top: .125em;\n}\n\n@mixin icon--small {\n width: 1rem;\n height: 1rem;\n}\n\n@mixin icon--normal {\n width: 1.2rem;\n height: 1.2rem;\n}\n\n@mixin icon--large {\n width: 1.5rem;\n height: 1.5rem;\n}\n\n@mixin icon--xl {\n width: 1.8rem;\n height: 1.8rem;\n}\n\n@mixin icon--xxl {\n width: 2.4rem;\n height: 2.4rem;\n}\n\n@mixin icon--xxxl {\n width: 2.8rem;\n height: 2.8rem;\n}\n\n@mixin icon--circle {\n border-radius: 50%;\n background: $link;\n fill: #fff;\n}\n\n@mixin icon--circle--pad {\n @include icon--circle ;\n padding: 0.05em;\n\n @include breakpoint(medium) {\n padding: 0.15em;\n }\n}\n\n@mixin icon--circle--pad--xl {\n @include icon--circle ;\n padding: 0.6rem;\n}\n\n@mixin icon--circle--small {\n @include icon--small;\n @include icon--circle;\n padding: 0.02rem;\n}\n\n@mixin icon--white {\n fill: #fff;\n}\n\n@mixin icon--white-bg {\n background: #fff;\n fill: $link;\n}\n\n@mixin icon--white-bg--hover {\n background: #fff;\n fill: $link_hover;\n}\n\n@mixin icon--gray-bg {\n background: $dark_gray;\n fill: $light_gray;\n}\n\n@mixin icon--gray-bg--hover {\n fill: #fff;\n background: $darker_gray;\n}\n\n@mixin small-uppercase {\n font-size: 0.85rem;\n text-transform: uppercase;\n}\n\n@mixin hint {\n font-size: .7rem;\n font-weight: 300;\n color: #565656;\n}\n\n@mixin green {\n color: $green;\n}\n\n@mixin dark-green {\n color: $dark_green;\n}\n\n@mixin red {\n color: $red;\n}\n\n@mixin fade-red {\n color: $fade_red;\n}\n\n@mixin xmargin-vertical {\n margin-top: 2rem;\n margin-bottom: 2rem;\n}\n\n@mixin xmargin-horizontal {\n margin-right: 2rem;\n margin-left: 2rem;\n}\n\n@mixin xpadding-vertical {\n padding-top: 2rem;\n padding-bottom: 2rem;\n}\n\n@mixin xpadding-horizontal {\n padding-right: 2rem;\n padding-left: 2rem;\n}\n\n@mixin ul-no-style {\n list-style: none;\n margin-left: 0;\n}\n\n@mixin well {\n padding: 1.6rem;\n margin-bottom: 1.6rem;\n background: #fff;\n border: 1px solid #eee;\n border-bottom-color: #ccc;\n\n @include breakpoint(medium) {\n margin-bottom: 2.6rem;\n padding: 1.6rem 2rem;\n }\n}\n\n@mixin hidden--accessible {\n height: 0;\n opacity: 0;\n padding: 0;\n overflow: hidden;\n}\n\n// Share Icons\n@mixin share_icons($rootBEM) {\n\n .#{$rootBEM} {\n @include ul-no-style;\n text-align: center;\n }\n\n .#{$rootBEM}__item {\n display: inline-block;\n margin-right: 20px;\n\n &:last-child {\n margin-right: 0;\n }\n }\n\n .#{$rootBEM}__item__icon {\n @include icon--xxl;\n @include icon--circle--pad--xl;\n fill: #fff!important;\n }\n\n .#{$rootBEM}__item__icon--facebook {\n background-color: #3a5795;\n }\n\n .#{$rootBEM}__item__icon--twitter {\n background-color: #4099ff;\n }\n}\n\n@mixin section--alt {\n background: $light_gray;\n border-bottom: 1px solid #ddd;\n border-top: 1px solid #ddd;\n padding-top: 3rem;\n padding-bottom: 3rem;\n margin-top: 3rem;\n margin-bottom: 3rem;\n}\n\n#enp-quiz {\n .enp-screen-reader-text {\n @include screen-reader-text;\n }\n\n .enp-screen-reader-text:hover,\n .enp-screen-reader-text:active,\n .enp-screen-reader-text:focus {\n @include screen-reader-text--hover;\n }\n}\n\n@mixin focus--glow {\n outline-color: #4D90FE;\n outline-offset: -2px;\n outline-style: auto;\n outline-width: 5px;\n}\n\n#enp-quiz {\n\n .enp-quiz-message {\n @include container;\n max-width: 400px;\n background: #fff;\n border: 1px solid #eee;\n border-bottom: 1px solid #ccc;\n padding: 1rem 0.375rem;\n margin-top: 1.6rem;\n margin-bottom: 1.6rem;\n }\n\n .enp-quiz-message__title {\n @include small-uppercase;\n }\n\n .enp-message__list {\n @include ul-no-style;\n font-size: 1.1rem;\n margin-bottom: 0;\n }\n\n .enp-quiz-message--error {\n border-left: 6px solid $red;\n animation: slideInTop .3s $fastInEaseOut;\n }\n\n .enp-quiz-message__title--error {\n color: $dark_red;\n }\n\n .enp-quiz-message--success {\n border-left: 6px solid $green;\n color: $dark_green;\n }\n\n .enp-quiz-message__title--success {\n color: $dark_green;\n }\n\n}\n","@mixin clearfix {\n &:after {\n content: \"\";\n display: table;\n clear: both;\n }\n}\n\n@mixin container {\n max-width: 640px;\n margin-left: auto;\n margin-right: auto;\n padding-left: 20px;\n padding-right: 20px;\n @include clearfix;\n}\n\n@mixin flex {\n display: flex;\n}\n\n@mixin flex-center {\n @include flex;\n justify-content: center;\n align-content: center;\n align-items: center;\n}\n","//fonts\n$fontBody : Arial, monospace, helvetica, arial, sans-serif;\n$fontTitle : Arial, monospace, helvetica, arial, sans-serif;\n\n// // // colors\n$font : #1d1c25;\n$background: #FAF9FB;\n$title : #5D5E5F;\n\n// Blues\n$blue: #1E1C26;\n$dark_blue: #242f42;\n$light_blue: lighten($blue, 100);\n\n// Grays\n$light_gray: #F5F5F5;\n$really_light_gray: #F8F8F8;\n$gray: darken($light_gray, 2);\n$dark_gray: darken($gray, 5);\n$darker_gray: darken($dark_gray, 20);\n\n// Other colors\n$green: darken(#58C88F,10);\n$green: #60AAAD;\n$dark_green: darken($green, 8);\n$red: #bf5700;\n$dark_red: darken($red, 8);\n$fade_red: #C1893E;\n\n// Elements\n$link: $blue;\n$link_hover: darken($link, 10%);\n\n// animation\n$fastInEaseOut: cubic-bezier(0, 0, .3, 1);\n$easeInOut: cubic-bezier(0.15,0,.5,1);\n$easeInPauseFastOut: cubic-bezier(.28,.01,0,.69);\n\n$breakpoints: (\n \"small\" : 400px,\n \"medium\" : 700px,\n \"large\" : 1000px\n);\n\n// -----------------------------------------------------------------------------\n// Core\n// -----------------------------------------------------------------------------\n\n// Caching current breakpoint\n// Not meant to be manually edited\n$default-breakpoint: root;\n$current-breakpoint: $default-breakpoint;\n\n// The usual breakpoint mixin\n// Except it updates the $current-breakpoint variable\n// 1. If breakpoint name exists in map\n// 2. Update $current-breakpoint\n// 3. Open a media query\n// 4. Let the user dump content\n// 5. Then reset $current-breakpoint\n// 6. If breakpoint name doesn't exist in map, warn the user\n@mixin breakpoint($breakpoint) {\n $value: map-get($breakpoints, $breakpoint);\n\n @if $value != null { // 1\n $current-breakpoint: $breakpoint !global; // 2\n @media (min-width: $value) { @content; } // 3\n $current-breakpoint: $default-breakpoint !global; // 5\n }\n\n @else {\n @warn \"Invalid breakpoint `#{$breakpoint}`.\"; // 6\n }\n}\n\n// for only targeting a specific device\n// NOTE: DOESN'T SUPPORT THE @include placeholders!!!\n@mixin media($query) {\n $media_query: \"\";\n @if $query == max-small {\n $media_query: \"max-width: #{map-get($breakpoints, \"small\")}\";\n } @else if $query == only-medium {\n $media_query: \"min-width: #{map-get($breakpoints, \"medium\")}) and (max-width: #{(map-get($breakpoints, \"large\") - 1px)}\";\n } @else if $query == max-medium {\n $media_query: \"max-width: #{(map-get($breakpoints, \"medium\") - 1px)}\";\n } @else if $query == max-large {\n $media_query: \"max-width: #{(map-get($breakpoints, \"large\") - 1px)}\";\n } @else {\n // just use the number provided as a max width\n $media_query: \"max-width: #{$query}\";\n }\n\n @if variable-exists(media_query) {\n @media ($media_query) {\n @content;\n }\n }\n\n\n}\n","body {\n color: $font;\n font-family: $fontBody;\n font-size: 1em;\n line-height: 1.6;\n font-weight: 400;\n\n @include breakpoint(medium) {\n font-size: 1.3em;\n }\n}\n\n#enp-quiz {\n /* Headings */\n h1,h2,h3,h4,h5,h6 {\n font-family: $fontTitle;\n color: $font;\n clear: both;\n margin: 0 0 .2rem;\n font-weight: bold;\n line-height: 1.2em;\n }\n\n h1 {\n font-size: 2em;\n }\n\n h2 {\n font-size: 1.75em;\n }\n\n h3 {\n font-size: 1.475em;\n }\n\n h4 {\n font-size: 1.3em;\n }\n\n h5 {\n font-size: 1.125em;\n }\n\n h6 {\n font-size: 1em;\n }\n\n p+h1, ul+h1,\n p+h2, ul+h2,\n p+h3, ul+h3,\n p+h4, ul+h4,\n p+h5, ul+h5,\n p+h6, ul+h6 {\n margin-top: 1.8em;\n }\n\n /* Text elements */\n p {\n font-size: 0.85em;\n margin-bottom: 1.125em;\n font-weight: 300;\n }\n ul, ol {\n margin: 0 0 1.6em 1.25em;\n }\n ul {\n list-style: disc;\n }\n ol {\n list-style: decimal;\n }\n li > ul,\n li > ol {\n margin-bottom: 0;\n margin-left: 1.6em;\n }\n\n b, strong {\n font-weight: bold;\n }\n\n dfn, cite, em {\n font-family: georgia, times, serif;\n font-style: italic;\n }\n\n pre {\n background: #eee;\n font-family: \"Courier 10 Pitch\", Courier, monospace;\n font-size: .95em;\n line-height: 1.6;\n margin-bottom: 1.6em;\n padding: 1.6em;\n overflow: auto;\n max-width: 100%;\n }\n .code, code, kbd, tt, var {\n font: .7em Monaco, Consolas, \"Andale Mono\", \"DejaVu Sans Mono\", monospace;\n }\n\n figure {\n margin: 0;\n }\n\n img {\n height: auto; /* Make sure images are scaled correctly. */\n max-width: 100%; /* Adhere to container width. */\n }\n\n /* Links */\n a {\n color: $link;\n text-decoration: none;\n transition: color .2s;\n touch-action: manipulation; // remove 300ms delay for ie\n\n .enp-icon {\n fill: $link;\n }\n }\n\n a:hover,\n a:focus,\n a:active {\n color: $link_hover;\n\n .enp-icon {\n fill: $link_hover;\n }\n }\n\n button {\n &:focus {\n @include focus--glow;\n }\n }\n\n .enp-btn {\n @include btn;\n }\n\n\n .enp-btn--add {\n @include btn--dashed;\n width: 100%;\n }\n\n .enp-btn--disabled {\n @include disabled;\n }\n\n .enp-btn--enabled {\n animation: expand .6s;\n }\n\n .enp-icon {\n width: 24px;\n height: 24px;\n transition: all .2s;\n }\n\n .enp-page-title {\n font-size: 1.6rem;\n }\n}\n\n","#enp-quiz fieldset {\n border: none;\n margin: 0;\n padding: 0;\n}\n\n// enter the root BEM class and this will output the correct CSS for you\n@mixin radio-block($rootBEM) {\n .#{$rootBEM}__legend {\n @include radio-block__legend ;\n }\n\n .#{$rootBEM}__input {\n @include radio-block__input ;\n }\n\n .#{$rootBEM}__label {\n @include radio-block__label ;\n }\n\n .#{$rootBEM}__input:checked + .#{$rootBEM}__label {\n @include radio-block__label--checked ;\n }\n\n .#{$rootBEM}__input:focus + .#{$rootBEM}__label {\n @include radio-block__label--focus ;\n }\n}\n\n@mixin radio-inline($rootBEM) {\n .#{$rootBEM}__legend {\n @include radio-inline__legend ;\n }\n\n .#{$rootBEM}__input {\n @include radio-inline__input ;\n }\n\n .#{$rootBEM}__label {\n @include radio-inline__label ;\n }\n\n .#{$rootBEM}__input:checked + .#{$rootBEM}__label {\n @include radio-inline__label--checked ;\n }\n\n .#{$rootBEM}__input:focus + .#{$rootBEM}__label {\n @include radio-inline__label--focus ;\n }\n}\n\n@mixin label {\n display: block;\n color: lighten($font, 10);\n font-weight: normal;\n font-size: 0.85rem;\n text-transform: uppercase;\n}\n\n.enp-label {\n @include label;\n}\n\n@mixin legend {\n @include label;\n padding-top: 1.6rem;\n margin-bottom: 0.2rem;\n border: none;\n}\n\n.enp-legend {\n @include legend;\n}\n\n@mixin label--bold {\n @include label;\n font-weight: 500;\n}\n\n@mixin legend--bold {\n @include label--bold;\n}\n\n@mixin input {\n font-size: 1rem;\n font-family: $fontBody;\n padding: 0.8rem 0.5rem;\n background: #fff;\n border: 1px solid #aaa;\n border-radius: 3px;\n width: 20rem;\n max-width: 100%;\n margin-bottom: 1.2rem;\n\n @include breakpoint(medium) {\n padding: 0.8rem;\n }\n}\n\n@mixin input--large {\n @include input;\n padding: 1rem 1.2rem;\n font-size: 1.3rem;\n}\n\n@mixin input--xl {\n @include input;\n font-weight: bold;\n font-size: 1.6rem;\n margin-bottom: 1rem;\n\n &::placeholder {\n font-weight: bold;\n }\n}\n\n.enp-input {\n @include input;\n}\n\n.enp-input::placeholder,\n.enp-textarea::placeholder {\n font-family: $fontBody;\n font-weight: 300;\n color: lighten($font, 40);\n}\n\n@mixin textarea {\n @include input;\n line-height: 1.5;\n width: 100%;\n\n &:focus {\n @include focus--glow;\n }\n}\n\n@mixin radio-block__legend {\n @include legend;\n margin-bottom: 0.6rem;\n}\n\n@mixin radio-block__input {\n position: absolute;\n z-index: 9;\n margin-left: 9px;\n}\n\n@mixin radio-block__label {\n text-transform: capitalize;\n background: #f2f2f2;\n display: block;\n padding: 5px 10px 5px 39px;\n position: relative;\n top: -6px;\n box-shadow: inset -1px -1px 0 rgba(0,0,0,.1), inset 30px 0px 0 rgba(255,255,255,.7), inset 31px 0px 0 rgba(0,0,0,.1);\n}\n\n@mixin radio-block__label--checked {\n background: $green;\n color: #fff;\n text-shadow: 0 0 1px rgba(0,0,0,.7);\n}\n\n@mixin radio-block__label--focus {\n z-index: 8;\n @include focus--glow ;\n}\n\n@mixin radio-inline__legend {\n @include legend;\n}\n\n@mixin radio-inline__input {\n @include screen-reader-text;\n}\n\n@mixin radio-inline__label {\n text-transform: capitalize;\n display: inline-block;\n padding: 0.2rem 0.5rem;\n border-radius: 3px;\n}\n\n@mixin radio-inline__label--checked {\n @include radio-block__label--checked ;\n}\n\n@mixin radio-inline__label--focus {\n @include radio-block__label--focus ;\n}\n","@keyframes removeAnswers {\n 0% {\n opacity: 1;\n height: auto;\n transform: translate3d(0, 0, 0);\n }\n 10% {\n opacity: 1;\n transform: translate3d(0, 0, 0);\n }\n 100% {\n padding: 0;\n opacity: 0;\n display: none;\n height: 0;\n z-index: -1;\n transform: translate3d(-150px, 0, 0);\n }\n}\n\n@keyframes removeQuestion {\n 0% {\n opacity: 1;\n transform: translateX(0);\n }\n 15% {\n opacity: 1;\n transform: translateX(0);\n }\n 100% {\n opacity: 0;\n transform: translateX(-150px);\n }\n}\n\n@keyframes showNextQuestion {\n 0% {\n opacity: 0;\n transform: translateX(120px);\n }\n\n 100% {\n opacity: 1;\n transform: translateX(0);\n }\n}\n\n@keyframes slideInTop {\n 0% {\n opacity: 0;\n height: auto;\n transform: translate3d(0, -20px, 0);\n }\n 100% {\n opacity: 1;\n height: auto;\n transform: translate3d(0, 0, 0);\n }\n}\n\n@keyframes slideInBottom {\n 0% {\n opacity: 0;\n transform: translate3d(0, 20px, 0);\n }\n 100% {\n opacity: 1;\n transform: translate3d(0, 0, 0);\n }\n}\n\n@keyframes flashRedShadow {\n 0% {\n background: $red;\n }\n 100% {\n background: #fff;\n }\n}\n\n\n@keyframes errorContainer {\n 0% {\n //background-color: #fff;\n }\n 100% {\n background-color: rgba($red, .2);\n }\n}\n\n@keyframes pop {\n 0% {\n width: 0;\n opacity: 1;\n }\n 30% {\n width: 100%;\n }\n 80% {\n opacity: 1;\n width: 100%;\n }\n 100% {\n width: 40%;\n opacity: 0;\n }\n}\n\n\n.spinner {\n margin: 0 auto;\n width: 70px;\n text-align: center;\n}\n\n.spinner > div {\n width: 18px;\n height: 18px;\n background-color: #333;\n\n border-radius: 100%;\n display: inline-block;\n -webkit-animation: sk-bouncedelay 1.4s infinite ease-in-out both;\n animation: sk-bouncedelay 1.4s infinite ease-in-out both;\n}\n\n.spinner .bounce1 {\n -webkit-animation-delay: -0.32s;\n animation-delay: -0.32s;\n}\n\n.spinner .bounce2 {\n -webkit-animation-delay: -0.16s;\n animation-delay: -0.16s;\n}\n\n@-webkit-keyframes sk-bouncedelay {\n 0%, 80%, 100% { -webkit-transform: scale(0) }\n 40% { -webkit-transform: scale(1.0) }\n}\n\n@keyframes sk-bouncedelay {\n 0%, 80%, 100% {\n -webkit-transform: scale(0);\n transform: scale(0);\n } 40% {\n -webkit-transform: scale(1.0);\n transform: scale(1.0);\n }\n}\n"," // -------------------------//\n // Taking a Quiz Styles //\n// -------------------------//\n\n#enp-quiz {\n background: transparent;\n\n .enp-quiz__container {\n position: relative;\n padding: 0;\n background: #fff;\n border: 1px solid #ddd;\n }\n\n .enp-quiz__header {\n position: relative;\n border-bottom: 1px solid #ddd;\n }\n\n .enp-quiz__title {\n @include small-uppercase;\n font-weight: 500;\n letter-spacing: 0.01rem;\n padding: 0.6rem 1rem;\n }\n\n .enp-quiz__title--hide {\n display: none;\n }\n\n .enp-quiz__progress {\n position: absolute;\n bottom: 0;\n left: 0;\n right: 0;\n height: 0;\n }\n\n .enp-quiz__progress__bar {\n position: relative;\n // this will be calculated on load\n width: 0;\n // to prevent 30 question quizzes from having a width of 3.33% and not being wide enough to display the question count\n min-width: 2rem;\n height: 3px;\n background: $green;\n transition: all .5s $fastInEaseOut;\n }\n\n .enp-quiz__progress__bar__question-count {\n position: absolute;\n right: 1rem;\n bottom: 0.7rem;\n font-size: .8rem;\n }\n\n .enp-question__container {\n display: block;\n min-height: 92vh;\n }\n\n .enp-question__form {\n //transition: all .3s $fastInEaseOut;\n @include container;\n overflow: hidden;\n color: $font;\n padding-top: 2rem;\n padding-bottom: 2.6rem;\n\n @include breakpoint(medium) {\n padding: 2.6rem 3rem;\n }\n }\n\n .enp-question__question {\n font-size: 1.8rem;\n font-weight: bold;\n line-height: 1.2;\n margin-bottom: 0.2rem;\n padding-bottom: 0.1rem;\n position: relative;\n box-sizing: border-box; /* IE9-11 & Edge 12-13 */\n display: table; /* IE8-11 */\n max-width: 100%; /* Patch for IE9-11 & Edge 12-13 */\n white-space: normal; /* IE8-11 */\n\n @include breakpoint(small) {\n font-size: 2rem;\n }\n\n &:after {\n content: '';\n position: absolute;\n height: 2px;\n background-color: #eee;\n background-color: rgba(0,0,0,.2);\n margin: auto;\n width: 0;\n bottom: 0;\n left: 0;\n right: 0;\n }\n\n &:focus {\n &:after {\n animation: pop .8s $fastInEaseOut;\n }\n\n }\n }\n\n .enp-question-image {\n margin-bottom: 0.4rem;\n }\n\n .enp-question__helper {\n font-size: 1rem;\n }\n\n .enp-option__input {\n @include screen-reader-text;\n\n &:checked + .enp-option__label:before {\n background-color: $green;\n }\n\n &:focus + .enp-option__label {\n color: $font;\n background: $light_gray;\n }\n }\n\n .enp-option__label {\n display: block;\n position: relative;\n width: 100%;\n text-align: left;\n text-transform: none;\n padding: 0.8rem 0rem 0.8rem 40px;\n font-size: 1rem;\n font-weight: 400;\n line-height: 1.6;\n border: none;\n border-bottom: 1px solid #eee;\n border-bottom: 1px solid rgba(0,0,0,.1);\n background: none;\n color: $font;\n transition: color .2s $fastInEaseOut, background .2s $fastInEaseOut;\n\n &:before {\n content: '';\n position: absolute;\n top: 0.925rem;\n left: 10px;\n width: 20px;\n height: 20px;\n border-radius: 50%;\n border: 2px solid $green;\n padding: 3px;\n background-clip: content-box; /* support: IE9+ */\n background-color: transparent;\n transition: all .2s;\n }\n\n &:last-of-type {\n border-bottom: none;\n }\n }\n\n .enp-question__container--unanswered {\n .enp-option__label {\n\n &:hover {\n cursor: pointer;\n\n &:before {\n background-color: $green;\n }\n }\n }\n }\n\n // if keyboard user (or JS didn't submit the question).\n // show the submit button (they can also hit enter to submit tho)\n @include btn--icon--hover-circle(enp-question__submit);\n\n .enp-question__submit {\n\n &:hover,\n &:focus {\n padding-right: 4em;\n }\n\n .enp-question__submit__icon {\n right: 0.8em;\n }\n }\n\n .enp-question__fieldset--mc .enp-question__submit {\n opacity: 0;\n height: 0;\n padding-top: 0;\n padding-bottom: 0;\n }\n\n .enp-question__fieldset--mc .enp-option__input:checked ~ .enp-options__submit {\n margin-top: 0.4rem;\n padding-top: 1em;\n padding-bottom: 0.95em;\n height: auto;\n opacity: 1;\n animation: .3s slideInTop $fastInEaseOut forwards;\n }\n\n .enp-question__fieldset--slider .enp-options__submit {\n margin-top: 1.4rem;\n }\n // ----------------------//\n // Answer Explanation //\n // ----------------------//\n\n .enp-question__container--explanation {\n background-color: $background;\n\n .enp-question__submit {\n display: none;\n }\n\n .enp-option__label {\n margin-bottom: 5px;\n border-bottom: none;\n }\n\n .enp-option__input--correct-clicked + .enp-option__label {\n\n &:before {\n background-color: $green;\n }\n\n }\n\n .enp-option__input--correct + .enp-option__label {\n box-shadow: inset 4px 0 0 $green;\n background-color: lighten($green, 47);\n }\n\n .enp-option__input--incorrect-clicked + .enp-option__label {\n background-color: #fff;\n box-shadow: inset 4px 0 0 $red;\n\n &:before {\n border: 2px solid $red;\n background-color: $red;\n }\n }\n }\n\n .enp-option__input--slide-hide + .enp-option__label{\n margin: 0;\n height: 0;\n animation: removeAnswers 0.6s $easeInPauseFastOut forwards;\n }\n\n .enp-explanation {\n background: #fff;\n padding: 1.6rem 1.6rem 1.5rem;\n }\n\n .enp-question__fieldset--slider .enp-explanation {\n animation: slideInBottom .3s $fastInEaseOut forwards;\n }\n\n .enp-explanation--correct {\n box-shadow: inset 4px 0 0 $green;\n\n // set our text for after the percentage\n .enp-explanation__percentage:after {\n content: '% Got This Right';\n }\n }\n\n .enp-explanation--incorrect {\n box-shadow: inset 4px 0 0 $red;\n\n // set our text for after the percentage\n .enp-explanation__percentage:after {\n content: '% Got This Wrong';\n }\n\n }\n\n .enp-explanation__title {\n @include small-uppercase;\n }\n\n .enp-explanation__percentage {\n font-size: .75rem;\n font-weight: 500;\n color: #565656;\n margin-left: 4px;\n\n &:after {\n content: '%';\n }\n }\n\n .enp-explanation--correct .enp-explanation__title {\n color: darken($green, 10);\n }\n\n .enp-explanation--incorrect .enp-explanation__title {\n color: darken($red, 10);\n }\n\n .enp-explanation__explanation {\n font-weight: 400;\n margin-top: 0.4rem;\n }\n\n @include btn--icon--hover-circle(enp-next-step);\n .enp-next-step {\n @include btn--ghost;\n display: inline-block;\n width: 100%;\n padding: .8em 2.4em .8em 1.4em;\n position: relative;\n\n\n .enp-next-step__icon {\n fill: $link;\n transition: all .3s $fastInEaseOut;\n }\n\n &:hover {\n .enp-next-step__icon {\n fill: #fff;\n background: $link;\n margin-right: 0;\n transform: translate3d(1em, 0, 0);\n margin-right: 1em;\n }\n }\n }\n\n\n //\n // Next Question\n //\n\n\n .enp-question--on-deck {\n transform: translateX(200px);\n opacity: 0;\n z-index: -1;\n top: 0;\n position: absolute;\n }\n\n .enp-question--show {\n animation: showNextQuestion .6s $fastInEaseOut forwards;\n }\n\n .enp-question--remove {\n position: absolute;\n animation: removeQuestion .15s $fastInEaseOut forwards;\n }\n\n // ----------------------//\n // Quiz Results //\n // ----------------------//\n\n .enp-results__score {\n position: relative;\n text-align: center;\n border-radius: 50%;\n margin: 0 auto 1rem;\n display: block;\n height: 200px;\n width: 200px;\n }\n\n .enp-results__score__title {\n color: $font;\n font-size: 5rem;\n line-height: 1;\n font-weight: 400;\n position: absolute;\n top: 50%;\n left: 50%;\n transform: translate(-50%, -50%);\n margin: 0;\n }\n\n .enp-results__score__title__percentage {\n font-size: 1.3rem;\n position: absolute;\n top: 1rem;\n font-weight: 300;\n }\n\n .enp-results__encouragement {\n font-size: 1.8rem;\n font-weight: 500;\n text-align: center;\n line-height: 1.2;\n margin: 0.2rem;\n }\n\n .enp-results__description {\n max-width: 24rem;\n margin: 0 auto 1.6rem;\n }\n\n .enp-results__score__circle {\n transform: rotate(-90deg);\n }\n\n #enp-results__score__circle__path,\n .enp-results__score__circle__bg {\n stroke: #ddd;\n stroke-width: 4px;\n }\n\n #enp-results__score__circle__path {\n stroke: $green;\n }\n\n .enp-results__score__circle__setOffset {\n transition: stroke-dashoffset 1.2s $fastInEaseOut;\n }\n\n .enp-results__score__circle__resetOffset {\n stroke-dashoffset: 565.48;\n }\n\n .enp-results__share-title {\n margin: 2.4rem 0 1rem;\n }\n\n .enp-results__share-title {\n @include small-uppercase;\n text-align: center;\n }\n\n @include share_icons(enp-results__share);\n\n .enp-quiz-restart__container {\n text-align: center;\n }\n\n // error state\n .enp-question__container--error {\n padding: 1rem 10px;\n //background-color: rgba($red, .2);\n animation: errorContainer .3s $fastInEaseOut forwards;\n }\n\n .enp-callout {\n font-size: 10px;\n font-size: 0.8rem;\n text-align: right;\n padding: 0.4rem;\n }\n}\n","#enp-quiz {\n\n .enp-slider {\n margin-bottom: 1.6rem;\n }\n\n .enp-slider-input__container {\n display: flex;\n align-items: center;\n justify-content: center;\n margin: 1.6rem auto;\n position: relative;\n }\n\n .enp-slider-input__label {\n @include label;\n }\n\n .enp-slider-input__prefix,\n .enp-slider-input__suffix {\n font-size: 1rem;\n }\n\n .enp-slider-input__prefix {\n margin-right: .2rem;\n white-space: pre;\n }\n\n .enp-slider-input__suffix {\n margin-left: .2rem;\n white-space: pre;\n }\n\n .enp-slider-input__input {\n @include input;\n margin-bottom: 0;\n padding: .75rem;\n width: auto;\n transition: all .25s $fastInEaseOut;\n }\n\n .enp-slider-input__input--incorrect {\n color: $red;\n }\n\n .enp-slider-input__input--correct {\n color: $dark_green;\n }\n\n .enp-slider-input__input--invalid-animation {\n box-shadow: 0 0 2px 1px $fade_red;\n }\n\n .enp-slider_input__range-helper {\n position: absolute;\n bottom: -1.2rem;\n font-size: 0.8rem;\n }\n\n .enp-slider_input__range-helper--low {\n left: 0;\n }\n\n .enp-slider_input__range-helper--high {\n right: 0;\n }\n\n .enp-slider-input__range-helper__number {\n position: relative;\n color: $dark_gray;\n }\n\n .enp-slider_input__range-helper__number--low {\n\n }\n\n .enp-slider_input__range-helper__number--high {\n\n }\n\n .ui-slider-range-show-correct__tooltip-container {\n position: relative;\n }\n\n .ui-slider-range-show-correct__tooltip {\n position: absolute;\n top: -0.4rem;\n margin-left: -0.55rem;\n height: 1rem;\n width: 1.1rem;\n height: 1.1rem;\n border: 2px solid $green;\n background-color: #fff;\n border-radius: 50%;\n z-index: 9999;\n }\n\n .ui-slider-range-show-correct__tooltip--low {\n left: 0;\n }\n\n .ui-slider-range-show-correct__tooltip--high {\n right: -0.55rem;\n }\n\n .ui-slider-range-show-correct__tooltip__text {\n position: relative;\n color: darken($green, 15);\n top: -1.35rem;\n font-size: .825rem;\n min-width: 100%;\n display: inline-block;\n text-align: center;\n text-shadow: 0 1px 0 #fff;\n }\n\n .ui-slider-range-show-correct__tooltip__text--low {\n\n }\n\n .ui-slider-range-show-correct__tooltip__text--high {\n\n }\n\n .ui-slider-range-show-correct__tooltip__text--low-center {\n //left: 0; // not perfectly centered for huge numbers, but is for small numbers\n }\n\n // JQUERY SLIDER\n .enp-slider {\n\t\tposition: relative;\n\t\ttext-align: left;\n\t\tbackground: #ddd;\n\n\t\t/* Layout helpers\n\t\t----------------------------------*/\n\t\t.ui-helper-hidden {\n\t\t\tdisplay: none;\n\t\t}\n\t\t.ui-helper-hidden-accessible {\n\t\t\tborder: 0;\n\t\t\tclip: rect(0 0 0 0);\n\t\t\theight: 1px;\n\t\t\tmargin: -1px;\n\t\t\toverflow: hidden;\n\t\t\tpadding: 0;\n\t\t\tposition: absolute;\n\t\t\twidth: 1px;\n\t\t}\n\t\t.ui-helper-reset {\n\t\t\tmargin: 0;\n\t\t\tpadding: 0;\n\t\t\tborder: 0;\n\t\t\toutline: 0;\n\t\t\tline-height: 1.3;\n\t\t\ttext-decoration: none;\n\t\t\tfont-size: 100%;\n\t\t\tlist-style: none;\n\t\t}\n\t\t.ui-helper-clearfix:before,\n\t\t.ui-helper-clearfix:after {\n\t\t\tcontent: \"\";\n\t\t\tdisplay: table;\n\t\t\tborder-collapse: collapse;\n\t\t}\n\t\t.ui-helper-clearfix:after {\n\t\t\tclear: both;\n\t\t}\n\t\t.ui-helper-clearfix {\n\t\t\tmin-height: 0; /* support: IE7 */\n\t\t}\n\t\t.ui-helper-zfix {\n\t\t\twidth: 100%;\n\t\t\theight: 100%;\n\t\t\ttop: 0;\n\t\t\tleft: 0;\n\t\t\tposition: absolute;\n\t\t\topacity: 0;\n\t\t\tfilter:alpha(opacity=0); /* support: IE8 */\n\t\t}\n\n\t\t.ui-front {\n\t\t\tz-index: 100;\n\t\t}\n\n\n\t\t/* Interaction Cues\n\t\t----------------------------------*/\n\t\t.ui-state-disabled {\n\t\t\tcursor: default !important;\n\t\t}\n\n\n\t\t/* Icons\n\t\t----------------------------------*/\n\n\t\t/* states and images */\n\t\t.ui-icon {\n\t\t\tdisplay: block;\n\t\t\ttext-indent: -99999px;\n\t\t\toverflow: hidden;\n\t\t\tbackground-repeat: no-repeat;\n\t\t}\n\n\n\t\t/* Misc visuals\n\t\t----------------------------------*/\n\n\t\t/* Overlays */\n\t\t.ui-widget-overlay {\n\t\t\tposition: fixed;\n\t\t\ttop: 0;\n\t\t\tleft: 0;\n\t\t\twidth: 100%;\n\t\t\theight: 100%;\n\t\t}\n\n\t\t.ui-slider-handle {\n\t\t\tbackground: #fff;\n\t\t\tborder-radius: 50%;\n\t\t\tborder: 1px solid #aaa;\n\t\t\tposition: absolute;\n\t\t\tz-index: 2;\n\t\t\twidth: 1.2rem;\n\t\t\theight: 1.2rem;\n top: -.4rem;\n\t\t\tmargin-left: -.6rem;\n\t\t\tcursor: default;\n\t\t\t-ms-touch-action: none;\n\t\t\ttouch-action: none;\n\t\t\ttransition: opacity 0.2s $fastInEaseOut, height .18s $fastInEaseOut, width .18s $fastInEaseOut, transform 0.18s $fastInEaseOut;\n\n @include media(max-medium) {\n width: 2rem;\n \t\t\theight: 2rem;\n top: -.85rem;\n margin-left: -1rem;\n transform: rotate(225deg);\n }\n\n\t\t\t&:focus {\n\t\t\t\toutline: none;\n\t\t\t\tbox-shadow: 0 0 3px 1px #4D90FE;\n\t\t\t}\n\n &.ui-state-active {\n @include media(max-medium) {\n width: 2.2rem;\n height: 2.2rem;\n border-top-left-radius: 0;\n transform: translate3d(-0.2rem, -0.8rem, 0) rotate(225deg);\n }\n\n }\n\n\t\t}\n\n .ui-slider-handle--correct,\n\t\t.ui-slider-handle--incorrect {\n width: 1.1rem;\n\t\t\theight: 1.1rem;\n top: -.4rem;\n margin-left: -.55rem;\n }\n\n .ui-slider-handle--incorrect {\n z-index: 1;\n\t\t\tborder: 2px solid $red;\n\t\t}\n\n .ui-slider-handle--correct {\n border: 2px solid $green;\n z-index: 99999;\n }\n\n\t\t.ui-slider-range {\n\t\t\tposition: absolute;\n\t\t\tz-index: 1;\n\t\t\tfont-size: .7rem;\n\t\t\tdisplay: block;\n\t\t\tborder: 0;\n\t\t\tbackground-position: 0 0;\n\t\t\ttop: 0;\n\t\t\theight: 100%;\n\t\t}\n\n .ui-slider-range-show-correct {\n background: $green;\n z-index: 9;\n }\n\n\t\t.ui-slider-range-min {\n\t\t\tleft: 0;\n\t\t\tbackground: $green;\n\t\t}\n\n\t\t.ui-slider-range-max {\n\t\t\tright: 0;\n\t\t}\n\n\t\t/* support: IE8 - See #6727 */\n\t\t&.ui-state-disabled .ui-slider-handle,\n\t\t&.ui-state-disabled .ui-slider-range {\n\t\t\tfilter: inherit;\n\t\t}\n\t}\n\n\t.ui-slider-horizontal {\n\t\theight: .3rem;\n\t}\n\n\t.enp-question__answered {\n\t\t.enp-slider {\n\t\t\tbackground: #bbb;\n\t\t}\n\n\t\t.ui-slider-range-min {\n\t\t\tbackground: #fff;\n\t\t}\n\n\t}\n\n}\n"]} \ No newline at end of file +{"version":3,"sources":["_setup.scss","_utilities.scss","_structure.scss","_variables.scss","_typography.scss","_forms.scss","_animations.scss","_quiz.scss","_slider.scss"],"names":[],"mappings":"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","file":"enp_quiz-take.min.css","sourcesContent":["html, body, div, span, applet, object, iframe,\nh1, h2, h3, h4, h5, h6, p, blockquote, pre,\na, abbr, acronym, address, big, cite, code,\ndel, dfn, em, font, ins, kbd, q, s, samp,\nsmall, strike, strong, sub, sup, tt, var,\ndl, dt, dd, ol, ul, li,\nfieldset, form, label, legend,\ntable, caption, tbody, tfoot, thead, tr, th, td {\nborder: 0;\nfont-family: inherit;\nfont-size: 100%;\nfont-style: inherit;\nfont-weight: inherit;\nmargin: 0;\noutline: 0;\npadding: 0;\nvertical-align: baseline;\n}\nhtml {\nfont-size: 100%; /* Corrects text resizing oddly in IE6/7 when body font-size is set using em units http://clagnut.com/blog/348/#c790 */\noverflow-y: scroll; /* Keeps page centred in all browsers regardless of content height */\n-webkit-text-size-adjust: 100%; /* Prevents iOS text size adjust after orientation change, without disabling user zoom */\n-ms-text-size-adjust: 100%; /* www.456bereastreet.com/archive/201012/controlling_text_size_in_safari_for_ios_without_disabling_user_zoom/ */\n}\nbody {\nbackground: #fff;\noverflow: hidden;\n}\narticle,\naside,\ndetails,\nfigcaption,\nfigure,\nfooter,\nheader,\nnav,\nsection {\ndisplay: block;\n}\nol, ul {\nlist-style: none;\n}\ntable { /* tables still need 'cellspacing=\"0\"' in the markup */\nborder-collapse: separate;\nborder-spacing: 0;\n}\ncaption, th, td {\nfont-weight: normal;\ntext-align: left;\n}\nblockquote:before, blockquote:after,\nq:before, q:after {\ncontent: \"\";\n}\nblockquote, q {\nquotes: \"\" \"\";\n}\na:focus {\noutline: thin dotted;\n}\na:hover,\na:active { /* Improves readability when focused and also mouse hovered in all browsers people.opera.com/patrickl/experiments/keyboard/test */\noutline: 0;\n}\na img {\nborder: 0;\n}\n\n/* Reseting to border-box so we can do 100% width with 20px and not mess stuff up. */\nhtml {\nbox-sizing: border-box;\n}\n\n*, *:before, *:after {\nbox-sizing: inherit;\n}\n\nhtml {\n font-size: 16px!important; // set our rem value reference\n}\n\nhtml #enp-quiz {\n box-sizing: border-box;\n border-radius: 3px;\n}\n\nbody #enp-quiz {\n background: #fff;\n overflow: hidden;\n}\n\n#enp-quiz {\n *, *:before, *:after {\n box-sizing: inherit;\n }\n\n ul, ol {\n margin: 0 0 1.6rem 1.25rem;\n padding: 0;\n }\n\n textarea {\n margin-bottom: 1rem;\n }\n\n button, input[type=\"button\"], input[type=\"reset\"], input[type=\"submit\"] {\n border: none;\n &:active,\n &:focus,\n &:hover {\n border: none;\n }\n }\n\n iframe {\n border: none;\n }\n}\n","/* Text meant only for screen readers */\n@mixin screen-reader-text {\n clip: rect(1px, 1px, 1px, 1px);\n position: absolute !important;\n left:-10000px;\n top:auto;\n width:1px;\n height:1px;\n overflow:hidden;\n}\n\n@mixin screen-reader-text--hover {\n background-color: #f1f1f1;\n border-radius: 3px;\n box-shadow: 0 0 2px 2px rgba(0, 0, 0, 0.6);\n clip: auto !important;\n color: #21759b;\n display: block;\n font-size: 14px;\n font-weight: bold;\n height: auto;\n left: 5px;\n line-height: normal;\n padding: 15px 23px 14px;\n text-decoration: none;\n top: 5px;\n width: auto;\n z-index: 100000;\n}\n\n\n@mixin disabled {\n opacity: 0.65;\n cursor: default;\n}\n\n@mixin btn {\n text-align: center;\n border: none;\n border-radius: 3px;\n padding: .85em 1.4em .75em;\n font-size: 15px;\n font-weight: 400;\n letter-spacing: .05em;\n line-height: 1.6;\n color: #fff;\n box-shadow: inset 0 -2px 0 rgba(0,0,0,.2);\n background: $link;\n cursor: pointer;\n text-transform: uppercase;\n transition: all .2s;\n\n &:hover {\n color: #fff;\n box-shadow: none;\n background: $link_hover;\n }\n\n &:active {\n color: #fff;\n box-shadow: inset 0 2px 0 rgba(0,0,0,.1);\n background: lighten($link, 20);\n }\n\n &:focus {\n @include focus--glow;\n }\n}\n\n@mixin btn--reset {\n border: none;\n background: none;\n box-shadow: none;\n padding: 0;\n margin: 0;\n}\n\n\n@mixin btn--submit {\n @include btn;\n}\n\n@mixin btn--ghost {\n @include btn;\n border: 2px solid $blue;\n background: transparent;\n color: $link;\n box-shadow: none;\n\n &:focus,\n &:hover {\n background: transparent;\n border: 2px solid $link_hover;\n color: $link_hover;\n }\n}\n\n@mixin btn--dashed {\n @include btn;\n border: 3px dashed $dark_gray;\n background: none;\n color: #545454;\n box-shadow: none;\n\n &:hover,\n &:focus {\n border: 3px dashed $darker_gray;\n color: $darker_gray;\n background: rgba(255,255,255,.9);\n }\n}\n\n@mixin btn--small {\n font-size: 13px;\n}\n\n@mixin btn--thin {\n padding: 0.4em 1em;\n}\n\n@mixin btn--wide {\n width: 100%;\n padding-top: 1em;\n padding-bottom: 1em;\n}\n\n@mixin btn--icon {\n @include btn;\n padding: .75em 0.8em .7em 1.4em;\n}\n\n@mixin btn--icon__icon {\n @include icon--white;\n @include icon--xl;\n}\n\n/*\n* @usage: @include btn--icon(BEM-root-class);\n* Button with icon with white circular background.\n* --------------\n* | BTN TEXT > |\n* --------------\n* @param $rootBEM: root class name that will be extended\n*/\n@mixin btn--icon($rootBEM) {\n .#{$rootBEM} {\n @include btn--icon;\n }\n\n .#{$rootBEM}__icon {\n @include btn--icon__icon ;\n }\n}\n\n@mixin btn--icon--icon-circle {\n @include btn;\n padding: .8em 1.2em .6em 1.4em;\n}\n\n// use when the icon is larger and on the right\n@mixin btn--icon__icon--circle {\n @include icon--circle;\n @include icon--white-bg;\n @include icon--normal;\n margin-left: 0.5em;\n}\n\n@mixin btn--icon__icon--circle--hover {\n @include icon--white-bg--hover;\n}\n\n/*\n* @usage: @include btn--icon--circle(BEM-root-class);\n* Button with icon with white circular background.\n* ---------------\n* | BTN TEXT (>) |\n* ---------------\n* @param $rootBEM: root class name that will be extended\n*/\n@mixin btn--icon--circle($rootBEM) {\n .#{$rootBEM} {\n @include btn--icon--icon-circle;\n }\n\n .#{$rootBEM}__icon {\n @include btn--icon__icon--circle ;\n\n &:hover {\n @include btn--icon__icon--circle--hover ;\n }\n }\n}\n\n/*\n* @usage: @include btn--icon--hover-circle(BEM-root-class);\n* Button with icon. Hovering/focusing button moves\n* the icon to right and fades in a white circular background\n* -------------- ----------------\n* | BTN TEXT > | --hover/focus--> | BTN TEXT (>) |\n* -------------- ----------------\n* @param $rootBEM: root class name that will be extended\n*/\n@mixin btn--icon--hover-circle($rootBEM) {\n .#{$rootBEM} {\n @include btn--icon--icon-circle;\n position: relative;\n padding-right: 2.8em;\n padding-top: 1em;\n padding-bottom: 0.95em;\n transition: padding .3s $fastInEaseOut;\n }\n\n .#{$rootBEM}__icon {\n @include btn--icon__icon--circle ;\n width: 1.6em;\n height: 1.6em;\n background: transparent;\n fill: #fff;\n position: absolute;\n top: 0;\n bottom: 0;\n margin-top: auto;\n margin-bottom: auto;\n transform: translate3d(0, 0, 0);\n transition: all .3s $fastInEaseOut;\n }\n\n .#{$rootBEM}:hover,\n .#{$rootBEM}:focus {\n\n .#{$rootBEM}__icon {\n @include btn--icon__icon--circle--hover ;\n }\n }\n\n\n\n\n}\n\n// use on small icons and placed on the left\n@mixin btn--icon__icon--circle--small {\n @include icon--circle--small;\n margin-right: 5px;\n}\n\n\n// use this to match the icon to the inline font-size\n@mixin icon--inline {\n width: 1em;\n height: 1em;\n position: relative;\n top: .125em;\n}\n\n@mixin icon--small {\n width: 1rem;\n height: 1rem;\n}\n\n@mixin icon--normal {\n width: 1.2rem;\n height: 1.2rem;\n}\n\n@mixin icon--large {\n width: 1.5rem;\n height: 1.5rem;\n}\n\n@mixin icon--xl {\n width: 1.8rem;\n height: 1.8rem;\n}\n\n@mixin icon--xxl {\n width: 2.4rem;\n height: 2.4rem;\n}\n\n@mixin icon--xxxl {\n width: 2.8rem;\n height: 2.8rem;\n}\n\n@mixin icon--circle {\n border-radius: 50%;\n background: $link;\n fill: #fff;\n}\n\n@mixin icon--circle--pad {\n @include icon--circle ;\n padding: 0.05em;\n\n @include breakpoint(medium) {\n padding: 0.15em;\n }\n}\n\n@mixin icon--circle--pad--xl {\n @include icon--circle ;\n padding: 0.6rem;\n}\n\n@mixin icon--circle--small {\n @include icon--small;\n @include icon--circle;\n padding: 0.02rem;\n}\n\n@mixin icon--white {\n fill: #fff;\n}\n\n@mixin icon--white-bg {\n background: #fff;\n fill: $link;\n}\n\n@mixin icon--white-bg--hover {\n background: #fff;\n fill: $link_hover;\n}\n\n@mixin icon--gray-bg {\n background: $dark_gray;\n fill: $light_gray;\n}\n\n@mixin icon--gray-bg--hover {\n fill: #fff;\n background: $darker_gray;\n}\n\n@mixin small-uppercase {\n font-size: 0.85rem;\n text-transform: uppercase;\n}\n\n@mixin hint {\n font-size: .7rem;\n font-weight: 300;\n color: #565656;\n}\n\n@mixin green {\n color: $green;\n}\n\n@mixin dark-green {\n color: $dark_green;\n}\n\n@mixin red {\n color: $red;\n}\n\n@mixin fade-red {\n color: $fade_red;\n}\n\n@mixin xmargin-vertical {\n margin-top: 2rem;\n margin-bottom: 2rem;\n}\n\n@mixin xmargin-horizontal {\n margin-right: 2rem;\n margin-left: 2rem;\n}\n\n@mixin xpadding-vertical {\n padding-top: 2rem;\n padding-bottom: 2rem;\n}\n\n@mixin xpadding-horizontal {\n padding-right: 2rem;\n padding-left: 2rem;\n}\n\n@mixin ul-no-style {\n list-style: none;\n margin-left: 0;\n}\n\n@mixin well {\n padding: 1.6rem;\n margin-bottom: 1.6rem;\n background: #fff;\n border: 1px solid #eee;\n border-bottom-color: #ccc;\n\n @include breakpoint(medium) {\n margin-bottom: 2.6rem;\n padding: 1.6rem 2rem;\n }\n}\n\n@mixin hidden--accessible {\n height: 0;\n opacity: 0;\n padding: 0;\n overflow: hidden;\n}\n\n// Share Icons\n@mixin share_icons($rootBEM) {\n\n .#{$rootBEM} {\n @include ul-no-style;\n text-align: center;\n }\n\n .#{$rootBEM}__item {\n display: inline-block;\n margin-right: 20px;\n\n &:last-child {\n margin-right: 0;\n }\n }\n\n .#{$rootBEM}__item__icon {\n @include icon--xxl;\n @include icon--circle--pad--xl;\n fill: #fff!important;\n }\n\n .#{$rootBEM}__item__icon--facebook {\n background-color: #3a5795;\n }\n\n .#{$rootBEM}__item__icon--twitter {\n background-color: #4099ff;\n }\n}\n\n@mixin section--alt {\n background: $light_gray;\n border-bottom: 1px solid #ddd;\n border-top: 1px solid #ddd;\n padding-top: 3rem;\n padding-bottom: 3rem;\n margin-top: 3rem;\n margin-bottom: 3rem;\n}\n\n#enp-quiz {\n .enp-screen-reader-text {\n @include screen-reader-text;\n }\n\n .enp-screen-reader-text:hover,\n .enp-screen-reader-text:active,\n .enp-screen-reader-text:focus {\n @include screen-reader-text--hover;\n }\n}\n\n@mixin focus--glow {\n outline-color: #4D90FE;\n outline-offset: -2px;\n outline-style: auto;\n outline-width: 5px;\n}\n\n#enp-quiz {\n\n .enp-quiz-message {\n @include container;\n max-width: 400px;\n background: #fff;\n border: 1px solid #eee;\n border-bottom: 1px solid #ccc;\n padding: 1rem 0.375rem;\n margin-top: 1.6rem;\n margin-bottom: 1.6rem;\n }\n\n .enp-quiz-message__title {\n @include small-uppercase;\n }\n\n .enp-message__list {\n @include ul-no-style;\n font-size: 1.1rem;\n margin-bottom: 0;\n }\n\n .enp-quiz-message--error {\n border-left: 6px solid $red;\n animation: slideInTop .3s $fastInEaseOut;\n }\n\n .enp-quiz-message__title--error {\n color: $dark_red;\n }\n\n .enp-quiz-message--success {\n border-left: 6px solid $green;\n color: $dark_green;\n }\n\n .enp-quiz-message__title--success {\n color: $dark_green;\n }\n\n}\n","@mixin clearfix {\n &:after {\n content: \"\";\n display: table;\n clear: both;\n }\n}\n\n@mixin container {\n max-width: 640px;\n margin-left: auto;\n margin-right: auto;\n padding-left: 20px;\n padding-right: 20px;\n @include clearfix;\n}\n\n@mixin flex {\n display: flex;\n}\n\n@mixin flex-center {\n @include flex;\n justify-content: center;\n align-content: center;\n align-items: center;\n}\n","//fonts\n$fontBody : Arial, monospace, helvetica, arial, sans-serif;\n$fontTitle : Arial, monospace, helvetica, arial, sans-serif;\n\n// // // colors\n$font : #1d1c25;\n$background: #FAF9FB;\n$title : #5D5E5F;\n\n// Blues\n$blue: #00A9B7;\n$dark_blue: #333F48;\n$light_blue: lighten($blue, 100);\n\n// Grays\n$light_gray: #F5F5F5;\n$really_light_gray: #F8F8F8;\n$gray: darken($light_gray, 2);\n$dark_gray: darken($gray, 5);\n$darker_gray: darken($dark_gray, 20);\n\n// Other colors\n$green: darken(#58C88F,10);\n$green: #60AAAD;\n$dark_green: darken($green, 8);\n$red: #bf5700;\n$dark_red: darken($red, 8);\n$fade_red: #C1893E;\n\n// Elements\n$link: $blue;\n$link_hover: darken($link, 10%);\n\n// animation\n$fastInEaseOut: cubic-bezier(0, 0, .3, 1);\n$easeInOut: cubic-bezier(0.15,0,.5,1);\n$easeInPauseFastOut: cubic-bezier(.28,.01,0,.69);\n\n$breakpoints: (\n \"small\" : 400px,\n \"medium\" : 700px,\n \"large\" : 1000px\n);\n\n// -----------------------------------------------------------------------------\n// Core\n// -----------------------------------------------------------------------------\n\n// Caching current breakpoint\n// Not meant to be manually edited\n$default-breakpoint: root;\n$current-breakpoint: $default-breakpoint;\n\n// The usual breakpoint mixin\n// Except it updates the $current-breakpoint variable\n// 1. If breakpoint name exists in map\n// 2. Update $current-breakpoint\n// 3. Open a media query\n// 4. Let the user dump content\n// 5. Then reset $current-breakpoint\n// 6. If breakpoint name doesn't exist in map, warn the user\n@mixin breakpoint($breakpoint) {\n $value: map-get($breakpoints, $breakpoint);\n\n @if $value != null { // 1\n $current-breakpoint: $breakpoint !global; // 2\n @media (min-width: $value) { @content; } // 3\n $current-breakpoint: $default-breakpoint !global; // 5\n }\n\n @else {\n @warn \"Invalid breakpoint `#{$breakpoint}`.\"; // 6\n }\n}\n\n// for only targeting a specific device\n// NOTE: DOESN'T SUPPORT THE @include placeholders!!!\n@mixin media($query) {\n $media_query: \"\";\n @if $query == max-small {\n $media_query: \"max-width: #{map-get($breakpoints, \"small\")}\";\n } @else if $query == only-medium {\n $media_query: \"min-width: #{map-get($breakpoints, \"medium\")}) and (max-width: #{(map-get($breakpoints, \"large\") - 1px)}\";\n } @else if $query == max-medium {\n $media_query: \"max-width: #{(map-get($breakpoints, \"medium\") - 1px)}\";\n } @else if $query == max-large {\n $media_query: \"max-width: #{(map-get($breakpoints, \"large\") - 1px)}\";\n } @else {\n // just use the number provided as a max width\n $media_query: \"max-width: #{$query}\";\n }\n\n @if variable-exists(media_query) {\n @media ($media_query) {\n @content;\n }\n }\n\n\n}\n","body {\n color: $font;\n font-family: $fontBody;\n font-size: 1em;\n line-height: 1.6;\n font-weight: 400;\n\n @include breakpoint(medium) {\n font-size: 1.3em;\n }\n}\n\n#enp-quiz {\n /* Headings */\n h1,h2,h3,h4,h5,h6 {\n font-family: $fontTitle;\n color: $font;\n clear: both;\n margin: 0 0 .2rem;\n font-weight: bold;\n line-height: 1.2em;\n }\n\n h1 {\n font-size: 2em;\n }\n\n h2 {\n font-size: 1.75em;\n }\n\n h3 {\n font-size: 1.475em;\n }\n\n h4 {\n font-size: 1.3em;\n }\n\n h5 {\n font-size: 1.125em;\n }\n\n h6 {\n font-size: 1em;\n }\n\n p+h1, ul+h1,\n p+h2, ul+h2,\n p+h3, ul+h3,\n p+h4, ul+h4,\n p+h5, ul+h5,\n p+h6, ul+h6 {\n margin-top: 1.8em;\n }\n\n /* Text elements */\n p {\n font-size: 0.85em;\n margin-bottom: 1.125em;\n font-weight: 300;\n }\n ul, ol {\n margin: 0 0 1.6em 1.25em;\n }\n ul {\n list-style: disc;\n }\n ol {\n list-style: decimal;\n }\n li > ul,\n li > ol {\n margin-bottom: 0;\n margin-left: 1.6em;\n }\n\n b, strong {\n font-weight: bold;\n }\n\n dfn, cite, em {\n font-family: georgia, times, serif;\n font-style: italic;\n }\n\n pre {\n background: #eee;\n font-family: \"Courier 10 Pitch\", Courier, monospace;\n font-size: .95em;\n line-height: 1.6;\n margin-bottom: 1.6em;\n padding: 1.6em;\n overflow: auto;\n max-width: 100%;\n }\n .code, code, kbd, tt, var {\n font: .7em Monaco, Consolas, \"Andale Mono\", \"DejaVu Sans Mono\", monospace;\n }\n\n figure {\n margin: 0;\n }\n\n img {\n height: auto; /* Make sure images are scaled correctly. */\n max-width: 100%; /* Adhere to container width. */\n }\n\n /* Links */\n a {\n color: $link;\n text-decoration: none;\n transition: color .2s;\n touch-action: manipulation; // remove 300ms delay for ie\n\n .enp-icon {\n fill: $link;\n }\n }\n\n a:hover,\n a:focus,\n a:active {\n color: $link_hover;\n\n .enp-icon {\n fill: $link_hover;\n }\n }\n\n button {\n &:focus {\n @include focus--glow;\n }\n }\n\n .enp-btn {\n @include btn;\n }\n\n\n .enp-btn--add {\n @include btn--dashed;\n width: 100%;\n }\n\n .enp-btn--disabled {\n @include disabled;\n }\n\n .enp-btn--enabled {\n animation: expand .6s;\n }\n\n .enp-icon {\n width: 24px;\n height: 24px;\n transition: all .2s;\n }\n\n .enp-page-title {\n font-size: 1.6rem;\n }\n}\n\n","#enp-quiz fieldset {\n border: none;\n margin: 0;\n padding: 0;\n}\n\n// enter the root BEM class and this will output the correct CSS for you\n@mixin radio-block($rootBEM) {\n .#{$rootBEM}__legend {\n @include radio-block__legend ;\n }\n\n .#{$rootBEM}__input {\n @include radio-block__input ;\n }\n\n .#{$rootBEM}__label {\n @include radio-block__label ;\n }\n\n .#{$rootBEM}__input:checked + .#{$rootBEM}__label {\n @include radio-block__label--checked ;\n }\n\n .#{$rootBEM}__input:focus + .#{$rootBEM}__label {\n @include radio-block__label--focus ;\n }\n}\n\n@mixin radio-inline($rootBEM) {\n .#{$rootBEM}__legend {\n @include radio-inline__legend ;\n }\n\n .#{$rootBEM}__input {\n @include radio-inline__input ;\n }\n\n .#{$rootBEM}__label {\n @include radio-inline__label ;\n }\n\n .#{$rootBEM}__input:checked + .#{$rootBEM}__label {\n @include radio-inline__label--checked ;\n }\n\n .#{$rootBEM}__input:focus + .#{$rootBEM}__label {\n @include radio-inline__label--focus ;\n }\n}\n\n@mixin label {\n display: block;\n color: lighten($font, 10);\n font-weight: normal;\n font-size: 0.85rem;\n text-transform: uppercase;\n}\n\n.enp-label {\n @include label;\n}\n\n@mixin legend {\n @include label;\n padding-top: 1.6rem;\n margin-bottom: 0.2rem;\n border: none;\n}\n\n.enp-legend {\n @include legend;\n}\n\n@mixin label--bold {\n @include label;\n font-weight: 500;\n}\n\n@mixin legend--bold {\n @include label--bold;\n}\n\n@mixin input {\n font-size: 1rem;\n font-family: $fontBody;\n padding: 0.8rem 0.5rem;\n background: #fff;\n border: 1px solid #aaa;\n border-radius: 3px;\n width: 20rem;\n max-width: 100%;\n margin-bottom: 1.2rem;\n\n @include breakpoint(medium) {\n padding: 0.8rem;\n }\n}\n\n@mixin input--large {\n @include input;\n padding: 1rem 1.2rem;\n font-size: 1.3rem;\n}\n\n@mixin input--xl {\n @include input;\n font-weight: bold;\n font-size: 1.6rem;\n margin-bottom: 1rem;\n\n &::placeholder {\n font-weight: bold;\n }\n}\n\n.enp-input {\n @include input;\n}\n\n.enp-input::placeholder,\n.enp-textarea::placeholder {\n font-family: $fontBody;\n font-weight: 300;\n color: lighten($font, 40);\n}\n\n@mixin textarea {\n @include input;\n line-height: 1.5;\n width: 100%;\n\n &:focus {\n @include focus--glow;\n }\n}\n\n@mixin radio-block__legend {\n @include legend;\n margin-bottom: 0.6rem;\n}\n\n@mixin radio-block__input {\n position: absolute;\n z-index: 9;\n margin-left: 9px;\n}\n\n@mixin radio-block__label {\n text-transform: capitalize;\n background: #f2f2f2;\n display: block;\n padding: 5px 10px 5px 39px;\n position: relative;\n top: -6px;\n box-shadow: inset -1px -1px 0 rgba(0,0,0,.1), inset 30px 0px 0 rgba(255,255,255,.7), inset 31px 0px 0 rgba(0,0,0,.1);\n}\n\n@mixin radio-block__label--checked {\n background: $green;\n color: #fff;\n text-shadow: 0 0 1px rgba(0,0,0,.7);\n}\n\n@mixin radio-block__label--focus {\n z-index: 8;\n @include focus--glow ;\n}\n\n@mixin radio-inline__legend {\n @include legend;\n}\n\n@mixin radio-inline__input {\n @include screen-reader-text;\n}\n\n@mixin radio-inline__label {\n text-transform: capitalize;\n display: inline-block;\n padding: 0.2rem 0.5rem;\n border-radius: 3px;\n}\n\n@mixin radio-inline__label--checked {\n @include radio-block__label--checked ;\n}\n\n@mixin radio-inline__label--focus {\n @include radio-block__label--focus ;\n}\n","@keyframes removeAnswers {\n 0% {\n opacity: 1;\n height: auto;\n transform: translate3d(0, 0, 0);\n }\n 10% {\n opacity: 1;\n transform: translate3d(0, 0, 0);\n }\n 100% {\n padding: 0;\n opacity: 0;\n display: none;\n height: 0;\n z-index: -1;\n transform: translate3d(-150px, 0, 0);\n }\n}\n\n@keyframes removeQuestion {\n 0% {\n opacity: 1;\n transform: translateX(0);\n }\n 15% {\n opacity: 1;\n transform: translateX(0);\n }\n 100% {\n opacity: 0;\n transform: translateX(-150px);\n }\n}\n\n@keyframes showNextQuestion {\n 0% {\n opacity: 0;\n transform: translateX(120px);\n }\n\n 100% {\n opacity: 1;\n transform: translateX(0);\n }\n}\n\n@keyframes slideInTop {\n 0% {\n opacity: 0;\n height: auto;\n transform: translate3d(0, -20px, 0);\n }\n 100% {\n opacity: 1;\n height: auto;\n transform: translate3d(0, 0, 0);\n }\n}\n\n@keyframes slideInBottom {\n 0% {\n opacity: 0;\n transform: translate3d(0, 20px, 0);\n }\n 100% {\n opacity: 1;\n transform: translate3d(0, 0, 0);\n }\n}\n\n@keyframes flashRedShadow {\n 0% {\n background: $red;\n }\n 100% {\n background: #fff;\n }\n}\n\n\n@keyframes errorContainer {\n 0% {\n //background-color: #fff;\n }\n 100% {\n background-color: rgba($red, .2);\n }\n}\n\n@keyframes pop {\n 0% {\n width: 0;\n opacity: 1;\n }\n 30% {\n width: 100%;\n }\n 80% {\n opacity: 1;\n width: 100%;\n }\n 100% {\n width: 40%;\n opacity: 0;\n }\n}\n\n\n.spinner {\n margin: 0 auto;\n width: 70px;\n text-align: center;\n}\n\n.spinner > div {\n width: 18px;\n height: 18px;\n background-color: #333;\n\n border-radius: 100%;\n display: inline-block;\n -webkit-animation: sk-bouncedelay 1.4s infinite ease-in-out both;\n animation: sk-bouncedelay 1.4s infinite ease-in-out both;\n}\n\n.spinner .bounce1 {\n -webkit-animation-delay: -0.32s;\n animation-delay: -0.32s;\n}\n\n.spinner .bounce2 {\n -webkit-animation-delay: -0.16s;\n animation-delay: -0.16s;\n}\n\n@-webkit-keyframes sk-bouncedelay {\n 0%, 80%, 100% { -webkit-transform: scale(0) }\n 40% { -webkit-transform: scale(1.0) }\n}\n\n@keyframes sk-bouncedelay {\n 0%, 80%, 100% {\n -webkit-transform: scale(0);\n transform: scale(0);\n } 40% {\n -webkit-transform: scale(1.0);\n transform: scale(1.0);\n }\n}\n"," // -------------------------//\n // Taking a Quiz Styles //\n// -------------------------//\n\n#enp-quiz {\n background: transparent;\n\n .enp-quiz__container {\n position: relative;\n padding: 0;\n background: #fff;\n border: 1px solid #ddd;\n }\n\n .enp-quiz__header {\n position: relative;\n border-bottom: 1px solid #ddd;\n }\n\n .enp-quiz__title {\n @include small-uppercase;\n font-weight: 500;\n letter-spacing: 0.01rem;\n padding: 0.6rem 1rem;\n }\n\n .enp-quiz__title--hide {\n display: none;\n }\n\n .enp-quiz__progress {\n position: absolute;\n bottom: 0;\n left: 0;\n right: 0;\n height: 0;\n }\n\n .enp-quiz__progress__bar {\n position: relative;\n // this will be calculated on load\n width: 0;\n // to prevent 30 question quizzes from having a width of 3.33% and not being wide enough to display the question count\n min-width: 2rem;\n height: 3px;\n background: $green;\n transition: all .5s $fastInEaseOut;\n }\n\n .enp-quiz__progress__bar__question-count {\n position: absolute;\n right: 1rem;\n bottom: 0.7rem;\n font-size: .8rem;\n }\n\n .enp-question__container {\n display: block;\n min-height: 92vh;\n }\n\n .enp-question__form {\n //transition: all .3s $fastInEaseOut;\n @include container;\n overflow: hidden;\n color: $font;\n padding-top: 2rem;\n padding-bottom: 2.6rem;\n\n @include breakpoint(medium) {\n padding: 2.6rem 3rem;\n }\n }\n\n .enp-question__question {\n font-size: 1.8rem;\n font-weight: bold;\n line-height: 1.2;\n margin-bottom: 0.2rem;\n padding-bottom: 0.1rem;\n position: relative;\n box-sizing: border-box; /* IE9-11 & Edge 12-13 */\n display: table; /* IE8-11 */\n max-width: 100%; /* Patch for IE9-11 & Edge 12-13 */\n white-space: normal; /* IE8-11 */\n\n @include breakpoint(small) {\n font-size: 2rem;\n }\n\n &:after {\n content: '';\n position: absolute;\n height: 2px;\n background-color: #eee;\n background-color: rgba(0,0,0,.2);\n margin: auto;\n width: 0;\n bottom: 0;\n left: 0;\n right: 0;\n }\n\n &:focus {\n &:after {\n animation: pop .8s $fastInEaseOut;\n }\n\n }\n }\n\n .enp-question-image {\n margin-bottom: 0.4rem;\n }\n\n .enp-question__helper {\n font-size: 1rem;\n }\n\n .enp-option__input {\n @include screen-reader-text;\n\n &:checked + .enp-option__label:before {\n background-color: $green;\n }\n\n &:focus + .enp-option__label {\n color: $font;\n background: $light_gray;\n }\n }\n\n .enp-option__label {\n display: block;\n position: relative;\n width: 100%;\n text-align: left;\n text-transform: none;\n padding: 0.8rem 0rem 0.8rem 40px;\n font-size: 1rem;\n font-weight: 400;\n line-height: 1.6;\n border: none;\n border-bottom: 1px solid #eee;\n border-bottom: 1px solid rgba(0,0,0,.1);\n background: none;\n color: $font;\n transition: color .2s $fastInEaseOut, background .2s $fastInEaseOut;\n\n &:before {\n content: '';\n position: absolute;\n top: 0.925rem;\n left: 10px;\n width: 20px;\n height: 20px;\n border-radius: 50%;\n border: 2px solid $green;\n padding: 3px;\n background-clip: content-box; /* support: IE9+ */\n background-color: transparent;\n transition: all .2s;\n }\n\n &:last-of-type {\n border-bottom: none;\n }\n }\n\n .enp-question__container--unanswered {\n .enp-option__label {\n\n &:hover {\n cursor: pointer;\n\n &:before {\n background-color: $green;\n }\n }\n }\n }\n\n // if keyboard user (or JS didn't submit the question).\n // show the submit button (they can also hit enter to submit tho)\n @include btn--icon--hover-circle(enp-question__submit);\n\n .enp-question__submit {\n\n &:hover,\n &:focus {\n padding-right: 4em;\n }\n\n .enp-question__submit__icon {\n right: 0.8em;\n }\n }\n\n .enp-question__fieldset--mc .enp-question__submit {\n opacity: 0;\n height: 0;\n padding-top: 0;\n padding-bottom: 0;\n }\n\n .enp-question__fieldset--mc .enp-option__input:checked ~ .enp-options__submit {\n margin-top: 0.4rem;\n padding-top: 1em;\n padding-bottom: 0.95em;\n height: auto;\n opacity: 1;\n animation: .3s slideInTop $fastInEaseOut forwards;\n }\n\n .enp-question__fieldset--slider .enp-options__submit {\n margin-top: 1.4rem;\n }\n // ----------------------//\n // Answer Explanation //\n // ----------------------//\n\n .enp-question__container--explanation {\n background-color: $background;\n\n .enp-question__submit {\n display: none;\n }\n\n .enp-option__label {\n margin-bottom: 5px;\n border-bottom: none;\n }\n\n .enp-option__input--correct-clicked + .enp-option__label {\n\n &:before {\n background-color: $green;\n }\n\n }\n\n .enp-option__input--correct + .enp-option__label {\n box-shadow: inset 4px 0 0 $green;\n background-color: lighten($green, 47);\n }\n\n .enp-option__input--incorrect-clicked + .enp-option__label {\n background-color: #fff;\n box-shadow: inset 4px 0 0 $red;\n\n &:before {\n border: 2px solid $red;\n background-color: $red;\n }\n }\n }\n\n .enp-option__input--slide-hide + .enp-option__label{\n margin: 0;\n height: 0;\n animation: removeAnswers 0.6s $easeInPauseFastOut forwards;\n }\n\n .enp-explanation {\n background: #fff;\n padding: 1.6rem 1.6rem 1.5rem;\n }\n\n .enp-question__fieldset--slider .enp-explanation {\n animation: slideInBottom .3s $fastInEaseOut forwards;\n }\n\n .enp-explanation--correct {\n box-shadow: inset 4px 0 0 $green;\n\n // set our text for after the percentage\n .enp-explanation__percentage:after {\n content: '% Got This Right';\n }\n }\n\n .enp-explanation--incorrect {\n box-shadow: inset 4px 0 0 $red;\n\n // set our text for after the percentage\n .enp-explanation__percentage:after {\n content: '% Got This Wrong';\n }\n\n }\n\n .enp-explanation__title {\n @include small-uppercase;\n }\n\n .enp-explanation__percentage {\n font-size: .75rem;\n font-weight: 500;\n color: #565656;\n margin-left: 4px;\n\n &:after {\n content: '%';\n }\n }\n\n .enp-explanation--correct .enp-explanation__title {\n color: darken($green, 10);\n }\n\n .enp-explanation--incorrect .enp-explanation__title {\n color: darken($red, 10);\n }\n\n .enp-explanation__explanation {\n font-weight: 400;\n margin-top: 0.4rem;\n }\n\n @include btn--icon--hover-circle(enp-next-step);\n .enp-next-step {\n @include btn--ghost;\n display: inline-block;\n width: 100%;\n padding: .8em 2.4em .8em 1.4em;\n position: relative;\n\n\n .enp-next-step__icon {\n fill: $link;\n transition: all .3s $fastInEaseOut;\n }\n\n &:hover {\n .enp-next-step__icon {\n fill: #fff;\n background: $link;\n margin-right: 0;\n transform: translate3d(1em, 0, 0);\n margin-right: 1em;\n }\n }\n }\n\n\n //\n // Next Question\n //\n\n\n .enp-question--on-deck {\n transform: translateX(200px);\n opacity: 0;\n z-index: -1;\n top: 0;\n position: absolute;\n }\n\n .enp-question--show {\n animation: showNextQuestion .6s $fastInEaseOut forwards;\n }\n\n .enp-question--remove {\n position: absolute;\n animation: removeQuestion .15s $fastInEaseOut forwards;\n }\n\n // ----------------------//\n // Quiz Results //\n // ----------------------//\n\n .enp-results__score {\n position: relative;\n text-align: center;\n border-radius: 50%;\n margin: 0 auto 1rem;\n display: block;\n height: 200px;\n width: 200px;\n }\n\n .enp-results__score__title {\n color: $font;\n font-size: 5rem;\n line-height: 1;\n font-weight: 400;\n position: absolute;\n top: 50%;\n left: 50%;\n transform: translate(-50%, -50%);\n margin: 0;\n }\n\n .enp-results__score__title__percentage {\n font-size: 1.3rem;\n position: absolute;\n top: 1rem;\n font-weight: 300;\n }\n\n .enp-results__encouragement {\n font-size: 1.8rem;\n font-weight: 500;\n text-align: center;\n line-height: 1.2;\n margin: 0.2rem;\n }\n\n .enp-results__description {\n max-width: 24rem;\n margin: 0 auto 1.6rem;\n }\n\n .enp-results__score__circle {\n transform: rotate(-90deg);\n }\n\n #enp-results__score__circle__path,\n .enp-results__score__circle__bg {\n stroke: #ddd;\n stroke-width: 4px;\n }\n\n #enp-results__score__circle__path {\n stroke: $green;\n }\n\n .enp-results__score__circle__setOffset {\n transition: stroke-dashoffset 1.2s $fastInEaseOut;\n }\n\n .enp-results__score__circle__resetOffset {\n stroke-dashoffset: 565.48;\n }\n\n .enp-results__share-title {\n margin: 2.4rem 0 1rem;\n }\n\n .enp-results__share-title {\n @include small-uppercase;\n text-align: center;\n }\n\n @include share_icons(enp-results__share);\n\n .enp-quiz-restart__container {\n text-align: center;\n }\n\n // error state\n .enp-question__container--error {\n padding: 1rem 10px;\n //background-color: rgba($red, .2);\n animation: errorContainer .3s $fastInEaseOut forwards;\n }\n\n .enp-callout {\n font-size: 10px;\n font-size: 0.8rem;\n text-align: right;\n padding: 0.4rem;\n }\n}\n","#enp-quiz {\n\n .enp-slider {\n margin-bottom: 1.6rem;\n }\n\n .enp-slider-input__container {\n display: flex;\n align-items: center;\n justify-content: center;\n margin: 1.6rem auto;\n position: relative;\n }\n\n .enp-slider-input__label {\n @include label;\n }\n\n .enp-slider-input__prefix,\n .enp-slider-input__suffix {\n font-size: 1rem;\n }\n\n .enp-slider-input__prefix {\n margin-right: .2rem;\n white-space: pre;\n }\n\n .enp-slider-input__suffix {\n margin-left: .2rem;\n white-space: pre;\n }\n\n .enp-slider-input__input {\n @include input;\n margin-bottom: 0;\n padding: .75rem;\n width: auto;\n transition: all .25s $fastInEaseOut;\n }\n\n .enp-slider-input__input--incorrect {\n color: $red;\n }\n\n .enp-slider-input__input--correct {\n color: $dark_green;\n }\n\n .enp-slider-input__input--invalid-animation {\n box-shadow: 0 0 2px 1px $fade_red;\n }\n\n .enp-slider_input__range-helper {\n position: absolute;\n bottom: -1.2rem;\n font-size: 0.8rem;\n }\n\n .enp-slider_input__range-helper--low {\n left: 0;\n }\n\n .enp-slider_input__range-helper--high {\n right: 0;\n }\n\n .enp-slider-input__range-helper__number {\n position: relative;\n color: $dark_gray;\n }\n\n .enp-slider_input__range-helper__number--low {\n\n }\n\n .enp-slider_input__range-helper__number--high {\n\n }\n\n .ui-slider-range-show-correct__tooltip-container {\n position: relative;\n }\n\n .ui-slider-range-show-correct__tooltip {\n position: absolute;\n top: -0.4rem;\n margin-left: -0.55rem;\n height: 1rem;\n width: 1.1rem;\n height: 1.1rem;\n border: 2px solid $green;\n background-color: #fff;\n border-radius: 50%;\n z-index: 9999;\n }\n\n .ui-slider-range-show-correct__tooltip--low {\n left: 0;\n }\n\n .ui-slider-range-show-correct__tooltip--high {\n right: -0.55rem;\n }\n\n .ui-slider-range-show-correct__tooltip__text {\n position: relative;\n color: darken($green, 15);\n top: -1.35rem;\n font-size: .825rem;\n min-width: 100%;\n display: inline-block;\n text-align: center;\n text-shadow: 0 1px 0 #fff;\n }\n\n .ui-slider-range-show-correct__tooltip__text--low {\n\n }\n\n .ui-slider-range-show-correct__tooltip__text--high {\n\n }\n\n .ui-slider-range-show-correct__tooltip__text--low-center {\n //left: 0; // not perfectly centered for huge numbers, but is for small numbers\n }\n\n // JQUERY SLIDER\n .enp-slider {\n\t\tposition: relative;\n\t\ttext-align: left;\n\t\tbackground: #ddd;\n\n\t\t/* Layout helpers\n\t\t----------------------------------*/\n\t\t.ui-helper-hidden {\n\t\t\tdisplay: none;\n\t\t}\n\t\t.ui-helper-hidden-accessible {\n\t\t\tborder: 0;\n\t\t\tclip: rect(0 0 0 0);\n\t\t\theight: 1px;\n\t\t\tmargin: -1px;\n\t\t\toverflow: hidden;\n\t\t\tpadding: 0;\n\t\t\tposition: absolute;\n\t\t\twidth: 1px;\n\t\t}\n\t\t.ui-helper-reset {\n\t\t\tmargin: 0;\n\t\t\tpadding: 0;\n\t\t\tborder: 0;\n\t\t\toutline: 0;\n\t\t\tline-height: 1.3;\n\t\t\ttext-decoration: none;\n\t\t\tfont-size: 100%;\n\t\t\tlist-style: none;\n\t\t}\n\t\t.ui-helper-clearfix:before,\n\t\t.ui-helper-clearfix:after {\n\t\t\tcontent: \"\";\n\t\t\tdisplay: table;\n\t\t\tborder-collapse: collapse;\n\t\t}\n\t\t.ui-helper-clearfix:after {\n\t\t\tclear: both;\n\t\t}\n\t\t.ui-helper-clearfix {\n\t\t\tmin-height: 0; /* support: IE7 */\n\t\t}\n\t\t.ui-helper-zfix {\n\t\t\twidth: 100%;\n\t\t\theight: 100%;\n\t\t\ttop: 0;\n\t\t\tleft: 0;\n\t\t\tposition: absolute;\n\t\t\topacity: 0;\n\t\t\tfilter:alpha(opacity=0); /* support: IE8 */\n\t\t}\n\n\t\t.ui-front {\n\t\t\tz-index: 100;\n\t\t}\n\n\n\t\t/* Interaction Cues\n\t\t----------------------------------*/\n\t\t.ui-state-disabled {\n\t\t\tcursor: default !important;\n\t\t}\n\n\n\t\t/* Icons\n\t\t----------------------------------*/\n\n\t\t/* states and images */\n\t\t.ui-icon {\n\t\t\tdisplay: block;\n\t\t\ttext-indent: -99999px;\n\t\t\toverflow: hidden;\n\t\t\tbackground-repeat: no-repeat;\n\t\t}\n\n\n\t\t/* Misc visuals\n\t\t----------------------------------*/\n\n\t\t/* Overlays */\n\t\t.ui-widget-overlay {\n\t\t\tposition: fixed;\n\t\t\ttop: 0;\n\t\t\tleft: 0;\n\t\t\twidth: 100%;\n\t\t\theight: 100%;\n\t\t}\n\n\t\t.ui-slider-handle {\n\t\t\tbackground: #fff;\n\t\t\tborder-radius: 50%;\n\t\t\tborder: 1px solid #aaa;\n\t\t\tposition: absolute;\n\t\t\tz-index: 2;\n\t\t\twidth: 1.2rem;\n\t\t\theight: 1.2rem;\n top: -.4rem;\n\t\t\tmargin-left: -.6rem;\n\t\t\tcursor: default;\n\t\t\t-ms-touch-action: none;\n\t\t\ttouch-action: none;\n\t\t\ttransition: opacity 0.2s $fastInEaseOut, height .18s $fastInEaseOut, width .18s $fastInEaseOut, transform 0.18s $fastInEaseOut;\n\n @include media(max-medium) {\n width: 2rem;\n \t\t\theight: 2rem;\n top: -.85rem;\n margin-left: -1rem;\n transform: rotate(225deg);\n }\n\n\t\t\t&:focus {\n\t\t\t\toutline: none;\n\t\t\t\tbox-shadow: 0 0 3px 1px #4D90FE;\n\t\t\t}\n\n &.ui-state-active {\n @include media(max-medium) {\n width: 2.2rem;\n height: 2.2rem;\n border-top-left-radius: 0;\n transform: translate3d(-0.2rem, -0.8rem, 0) rotate(225deg);\n }\n\n }\n\n\t\t}\n\n .ui-slider-handle--correct,\n\t\t.ui-slider-handle--incorrect {\n width: 1.1rem;\n\t\t\theight: 1.1rem;\n top: -.4rem;\n margin-left: -.55rem;\n }\n\n .ui-slider-handle--incorrect {\n z-index: 1;\n\t\t\tborder: 2px solid $red;\n\t\t}\n\n .ui-slider-handle--correct {\n border: 2px solid $green;\n z-index: 99999;\n }\n\n\t\t.ui-slider-range {\n\t\t\tposition: absolute;\n\t\t\tz-index: 1;\n\t\t\tfont-size: .7rem;\n\t\t\tdisplay: block;\n\t\t\tborder: 0;\n\t\t\tbackground-position: 0 0;\n\t\t\ttop: 0;\n\t\t\theight: 100%;\n\t\t}\n\n .ui-slider-range-show-correct {\n background: $green;\n z-index: 9;\n }\n\n\t\t.ui-slider-range-min {\n\t\t\tleft: 0;\n\t\t\tbackground: $green;\n\t\t}\n\n\t\t.ui-slider-range-max {\n\t\t\tright: 0;\n\t\t}\n\n\t\t/* support: IE8 - See #6727 */\n\t\t&.ui-state-disabled .ui-slider-handle,\n\t\t&.ui-state-disabled .ui-slider-range {\n\t\t\tfilter: inherit;\n\t\t}\n\t}\n\n\t.ui-slider-horizontal {\n\t\theight: .3rem;\n\t}\n\n\t.enp-question__answered {\n\t\t.enp-slider {\n\t\t\tbackground: #bbb;\n\t\t}\n\n\t\t.ui-slider-range-min {\n\t\t\tbackground: #fff;\n\t\t}\n\n\t}\n\n}\n"]} \ No newline at end of file diff --git a/public/quiz-take/css/sass/_variables.scss b/public/quiz-take/css/sass/_variables.scss index de31173c..2c4b9448 100644 --- a/public/quiz-take/css/sass/_variables.scss +++ b/public/quiz-take/css/sass/_variables.scss @@ -8,8 +8,8 @@ $background: #FAF9FB; $title : #5D5E5F; // Blues -$blue: #1E1C26; -$dark_blue: #242f42; +$blue: #00A9B7; +$dark_blue: #333F48; $light_blue: lighten($blue, 100); // Grays From 1af72051576feb2199cc4dae98d2618d5541b723 Mon Sep 17 00:00:00 2001 From: Luke Carl Hartman Date: Thu, 28 Apr 2022 21:56:30 -0700 Subject: [PATCH 08/32] composer install, quiz_title_test works! (just a test ;) --- .vscode/settings.json | 3 + composer.json | 5 + composer.lock | 75 + database/class-enp_quiz_db.php | 312 +- database/class-enp_quiz_save_quiz.php | 2140 +++++------ .../class-enp_quiz_save_quiz_response.php | 1613 ++++---- includes/class-enp_quiz-activator.php | 324 +- includes/class-enp_quiz-quiz.php | 1940 +++++----- .../quiz-create/css/enp_quiz-create.min.css | 2 +- .../css/enp_quiz-create.min.css.map | 2 +- public/quiz-create/css/sass/_dashboard.scss | 47 +- .../includes/class-enp_quiz-quiz_create.php | 875 ++--- .../partials/dashboard-quiz-item.php | 4 +- .../partials/quiz-create-question.php | 43 +- public/quiz-create/templates/quiz-create.php | 80 +- vendor/autoload.php | 7 + vendor/bin/phpcbf | 117 + vendor/bin/phpcs | 117 + vendor/composer/ClassLoader.php | 572 +++ vendor/composer/InstalledVersions.php | 350 ++ vendor/composer/LICENSE | 21 + vendor/composer/autoload_classmap.php | 10 + vendor/composer/autoload_namespaces.php | 9 + vendor/composer/autoload_psr4.php | 9 + vendor/composer/autoload_real.php | 55 + vendor/composer/autoload_static.php | 20 + vendor/composer/installed.json | 67 + vendor/composer/installed.php | 32 + .../squizlabs/php_codesniffer/CONTRIBUTING.md | 13 + .../php_codesniffer/CodeSniffer.conf.dist | 9 + vendor/squizlabs/php_codesniffer/README.md | 133 + vendor/squizlabs/php_codesniffer/autoload.php | 342 ++ vendor/squizlabs/php_codesniffer/bin/phpcbf | 19 + .../squizlabs/php_codesniffer/bin/phpcbf.bat | 12 + vendor/squizlabs/php_codesniffer/bin/phpcs | 19 + .../squizlabs/php_codesniffer/bin/phpcs.bat | 12 + .../squizlabs/php_codesniffer/composer.json | 40 + vendor/squizlabs/php_codesniffer/licence.txt | 24 + vendor/squizlabs/php_codesniffer/phpcs.xsd | 136 + .../squizlabs/php_codesniffer/src/Config.php | 1704 +++++++++ .../src/Exceptions/DeepExitException.php | 18 + .../src/Exceptions/RuntimeException.php | 15 + .../src/Exceptions/TokenizerException.php | 15 + .../php_codesniffer/src/Files/DummyFile.php | 82 + .../php_codesniffer/src/Files/File.php | 2799 ++++++++++++++ .../php_codesniffer/src/Files/FileList.php | 255 ++ .../php_codesniffer/src/Files/LocalFile.php | 219 ++ .../src/Filters/ExactMatch.php | 108 + .../php_codesniffer/src/Filters/Filter.php | 285 ++ .../src/Filters/GitModified.php | 66 + .../php_codesniffer/src/Filters/GitStaged.php | 68 + .../squizlabs/php_codesniffer/src/Fixer.php | 806 ++++ .../src/Generators/Generator.php | 117 + .../php_codesniffer/src/Generators/HTML.php | 270 ++ .../src/Generators/Markdown.php | 161 + .../php_codesniffer/src/Generators/Text.php | 253 ++ .../php_codesniffer/src/Reporter.php | 423 +++ .../php_codesniffer/src/Reports/Cbf.php | 253 ++ .../src/Reports/Checkstyle.php | 109 + .../php_codesniffer/src/Reports/Code.php | 362 ++ .../php_codesniffer/src/Reports/Csv.php | 91 + .../php_codesniffer/src/Reports/Diff.php | 130 + .../php_codesniffer/src/Reports/Emacs.php | 90 + .../php_codesniffer/src/Reports/Full.php | 231 ++ .../php_codesniffer/src/Reports/Gitblame.php | 91 + .../php_codesniffer/src/Reports/Hgblame.php | 110 + .../php_codesniffer/src/Reports/Info.php | 172 + .../php_codesniffer/src/Reports/Json.php | 106 + .../php_codesniffer/src/Reports/Junit.php | 131 + .../src/Reports/Notifysend.php | 242 ++ .../php_codesniffer/src/Reports/Report.php | 64 + .../php_codesniffer/src/Reports/Source.php | 336 ++ .../php_codesniffer/src/Reports/Summary.php | 183 + .../php_codesniffer/src/Reports/Svnblame.php | 73 + .../src/Reports/VersionControl.php | 376 ++ .../php_codesniffer/src/Reports/Xml.php | 126 + .../squizlabs/php_codesniffer/src/Ruleset.php | 1383 +++++++ .../squizlabs/php_codesniffer/src/Runner.php | 890 +++++ .../src/Sniffs/AbstractArraySniff.php | 172 + .../src/Sniffs/AbstractPatternSniff.php | 936 +++++ .../src/Sniffs/AbstractScopeSniff.php | 191 + .../src/Sniffs/AbstractVariableSniff.php | 230 ++ .../php_codesniffer/src/Sniffs/Sniff.php | 80 + .../DisallowLongArraySyntaxStandard.xml | 23 + .../DisallowShortArraySyntaxStandard.xml | 23 + .../Classes/DuplicateClassNameStandard.xml | 27 + .../Classes/OpeningBraceSameLineStandard.xml | 28 + .../AssignmentInConditionStandard.xml | 23 + .../CodeAnalysis/EmptyStatementStandard.xml | 23 + .../ForLoopShouldBeWhileLoopStandard.xml | 23 + .../ForLoopWithTestFunctionCallStandard.xml | 24 + .../JumbledIncrementerStandard.xml | 25 + .../UnconditionalIfStatementStandard.xml | 39 + .../UnnecessaryFinalModifierStandard.xml | 29 + .../UnusedFunctionParameterStandard.xml | 25 + .../UselessOverridingMethodStandard.xml | 32 + .../Generic/Docs/Commenting/FixmeStandard.xml | 25 + .../Generic/Docs/Commenting/TodoStandard.xml | 25 + .../DisallowYodaConditionsStandard.xml | 23 + .../InlineControlStructureStandard.xml | 22 + .../Generic/Docs/Debug/CSSLintStandard.xml | 19 + .../Docs/Debug/ClosureLinterStandard.xml | 19 + .../Generic/Docs/Debug/JSHintStandard.xml | 19 + .../Docs/Files/ByteOrderMarkStandard.xml | 7 + .../Docs/Files/EndFileNewlineStandard.xml | 7 + .../Docs/Files/EndFileNoNewlineStandard.xml | 7 + .../Docs/Files/ExecutableFileStandard.xml | 7 + .../Generic/Docs/Files/InlineHTMLStandard.xml | 24 + .../Docs/Files/LineEndingsStandard.xml | 7 + .../Generic/Docs/Files/LineLengthStandard.xml | 7 + .../Docs/Files/LowercasedFilenameStandard.xml | 7 + .../Docs/Files/OneClassPerFileStandard.xml | 29 + .../Files/OneInterfacePerFileStandard.xml | 29 + .../OneObjectStructurePerFileStandard.xml | 29 + .../Docs/Files/OneTraitPerFileStandard.xml | 29 + .../DisallowMultipleStatementsStandard.xml | 20 + .../MultipleStatementAlignmentStandard.xml | 56 + .../Formatting/NoSpaceAfterCastStandard.xml | 19 + .../Formatting/SpaceAfterCastStandard.xml | 19 + .../Docs/Formatting/SpaceAfterNotStandard.xml | 25 + .../CallTimePassByReferenceStandard.xml | 31 + .../FunctionCallArgumentSpacingStandard.xml | 39 + .../OpeningFunctionBraceBsdAllmanStandard.xml | 24 + ...gFunctionBraceKernighanRitchieStandard.xml | 24 + .../Metrics/CyclomaticComplexityStandard.xml | 7 + .../Docs/Metrics/NestingLevelStandard.xml | 7 + .../AbstractClassNamePrefixStandard.xml | 23 + .../CamelCapsFunctionNameStandard.xml | 23 + .../ConstructorNameStandard.xml | 29 + .../InterfaceNameSuffixStandard.xml | 23 + .../TraitNameSuffixStandard.xml | 23 + .../UpperCaseConstantNameStandard.xml | 29 + .../Docs/PHP/BacktickOperatorStandard.xml | 7 + .../CharacterBeforePHPOpeningTagStandard.xml | 22 + .../Docs/PHP/ClosingPHPTagStandard.xml | 22 + .../Docs/PHP/DeprecatedFunctionsStandard.xml | 19 + .../DisallowAlternativePHPTagsStandard.xml | 7 + .../DisallowRequestSuperglobalStandard.xml | 7 + .../Docs/PHP/DisallowShortOpenTagStandard.xml | 7 + .../Docs/PHP/DiscourageGotoStandard.xml | 7 + .../Docs/PHP/ForbiddenFunctionsStandard.xml | 19 + .../Docs/PHP/LowerCaseConstantStandard.xml | 23 + .../Docs/PHP/LowerCaseKeywordStandard.xml | 19 + .../Docs/PHP/LowerCaseTypeStandard.xml | 38 + .../Docs/PHP/NoSilencedErrorsStandard.xml | 23 + .../Generic/Docs/PHP/SAPIUsageStandard.xml | 23 + .../Docs/PHP/UpperCaseConstantStandard.xml | 23 + .../UnnecessaryStringConcatStandard.xml | 19 + .../SubversionPropertiesStandard.xml | 7 + .../ArbitraryParenthesesSpacingStandard.xml | 26 + .../DisallowSpaceIndentStandard.xml | 7 + .../WhiteSpace/DisallowTabIndentStandard.xml | 7 + .../Docs/WhiteSpace/ScopeIndentStandard.xml | 23 + .../SpreadOperatorSpacingAfterStandard.xml | 34 + .../Sniffs/Arrays/ArrayIndentSniff.php | 177 + .../Arrays/DisallowLongArraySyntaxSniff.php | 78 + .../Arrays/DisallowShortArraySyntaxSniff.php | 61 + .../Classes/DuplicateClassNameSniff.php | 117 + .../Classes/OpeningBraceSameLineSniff.php | 123 + .../AssignmentInConditionSniff.php | 171 + .../CodeAnalysis/EmptyPHPStatementSniff.php | 162 + .../CodeAnalysis/EmptyStatementSniff.php | 97 + .../ForLoopShouldBeWhileLoopSniff.php | 91 + .../ForLoopWithTestFunctionCallSniff.php | 101 + .../CodeAnalysis/JumbledIncrementerSniff.php | 134 + .../UnconditionalIfStatementSniff.php | 93 + .../UnnecessaryFinalModifierSniff.php | 85 + .../UnusedFunctionParameterSniff.php | 265 ++ .../UselessOverridingMethodSniff.php | 161 + .../Sniffs/Commenting/DocCommentSniff.php | 353 ++ .../Generic/Sniffs/Commenting/FixmeSniff.php | 78 + .../Generic/Sniffs/Commenting/TodoSniff.php | 77 + .../DisallowYodaConditionsSniff.php | 188 + .../InlineControlStructureSniff.php | 381 ++ .../Generic/Sniffs/Debug/CSSLintSniff.php | 96 + .../Sniffs/Debug/ClosureLinterSniff.php | 117 + .../Generic/Sniffs/Debug/ESLintSniff.php | 113 + .../Generic/Sniffs/Debug/JSHintSniff.php | 95 + .../Sniffs/Files/ByteOrderMarkSniff.php | 80 + .../Sniffs/Files/EndFileNewlineSniff.php | 84 + .../Sniffs/Files/EndFileNoNewlineSniff.php | 91 + .../Sniffs/Files/ExecutableFileSniff.php | 62 + .../Generic/Sniffs/Files/InlineHTMLSniff.php | 79 + .../Generic/Sniffs/Files/LineEndingsSniff.php | 148 + .../Generic/Sniffs/Files/LineLengthSniff.php | 201 + .../Sniffs/Files/LowercasedFilenameSniff.php | 70 + .../Sniffs/Files/OneClassPerFileSniff.php | 51 + .../Sniffs/Files/OneInterfacePerFileSniff.php | 51 + .../Files/OneObjectStructurePerFileSniff.php | 55 + .../Sniffs/Files/OneTraitPerFileSniff.php | 51 + .../DisallowMultipleStatementsSniff.php | 105 + .../MultipleStatementAlignmentSniff.php | 426 +++ .../Formatting/NoSpaceAfterCastSniff.php | 61 + .../Sniffs/Formatting/SpaceAfterCastSniff.php | 153 + .../Sniffs/Formatting/SpaceAfterNotSniff.php | 135 + .../Formatting/SpaceBeforeCastSniff.php | 73 + .../CallTimePassByReferenceSniff.php | 141 + .../FunctionCallArgumentSpacingSniff.php | 185 + .../OpeningFunctionBraceBsdAllmanSniff.php | 227 ++ ...ningFunctionBraceKernighanRitchieSniff.php | 184 + .../Metrics/CyclomaticComplexitySniff.php | 116 + .../Sniffs/Metrics/NestingLevelSniff.php | 100 + .../AbstractClassNamePrefixSniff.php | 60 + .../CamelCapsFunctionNameSniff.php | 223 ++ .../ConstructorNameSniff.php | 163 + .../InterfaceNameSuffixSniff.php | 54 + .../TraitNameSuffixSniff.php | 54 + .../UpperCaseConstantNameSniff.php | 141 + .../Sniffs/PHP/BacktickOperatorSniff.php | 48 + .../PHP/CharacterBeforePHPOpeningTagSniff.php | 86 + .../Generic/Sniffs/PHP/ClosingPHPTagSniff.php | 54 + .../Sniffs/PHP/DeprecatedFunctionsSniff.php | 73 + .../PHP/DisallowAlternativePHPTagsSniff.php | 253 ++ .../PHP/DisallowRequestSuperglobalSniff.php | 54 + .../Sniffs/PHP/DisallowShortOpenTagSniff.php | 168 + .../Sniffs/PHP/DiscourageGotoSniff.php | 50 + .../Sniffs/PHP/ForbiddenFunctionsSniff.php | 240 ++ .../Sniffs/PHP/LowerCaseConstantSniff.php | 83 + .../Sniffs/PHP/LowerCaseKeywordSniff.php | 144 + .../Generic/Sniffs/PHP/LowerCaseTypeSniff.php | 268 ++ .../Sniffs/PHP/NoSilencedErrorsSniff.php | 77 + .../Sniffs/PHP/RequireStrictTypesSniff.php | 69 + .../Generic/Sniffs/PHP/SAPIUsageSniff.php | 67 + .../Generic/Sniffs/PHP/SyntaxSniff.php | 75 + .../Sniffs/PHP/UpperCaseConstantSniff.php | 73 + .../Strings/UnnecessaryStringConcatSniff.php | 125 + .../VersionControl/GitMergeConflictSniff.php | 228 ++ .../SubversionPropertiesSniff.php | 186 + .../ArbitraryParenthesesSpacingSniff.php | 238 ++ .../WhiteSpace/DisallowSpaceIndentSniff.php | 220 ++ .../WhiteSpace/DisallowTabIndentSniff.php | 190 + .../IncrementDecrementSpacingSniff.php | 170 + .../LanguageConstructSpacingSniff.php | 146 + .../Sniffs/WhiteSpace/ScopeIndentSniff.php | 1575 ++++++++ .../SpreadOperatorSpacingAfterSniff.php | 146 + .../Tests/Arrays/ArrayIndentUnitTest.inc | 100 + .../Arrays/ArrayIndentUnitTest.inc.fixed | 101 + .../Tests/Arrays/ArrayIndentUnitTest.php | 67 + .../DisallowLongArraySyntaxUnitTest.1.inc | 28 + ...isallowLongArraySyntaxUnitTest.1.inc.fixed | 28 + .../DisallowLongArraySyntaxUnitTest.2.inc | 17 + ...isallowLongArraySyntaxUnitTest.2.inc.fixed | 17 + .../DisallowLongArraySyntaxUnitTest.php | 66 + .../DisallowShortArraySyntaxUnitTest.inc | 12 + ...DisallowShortArraySyntaxUnitTest.inc.fixed | 12 + .../DisallowShortArraySyntaxUnitTest.php | 53 + .../Classes/DuplicateClassNameUnitTest.1.inc | 11 + .../Classes/DuplicateClassNameUnitTest.2.inc | 5 + .../Classes/DuplicateClassNameUnitTest.3.inc | 10 + .../Classes/DuplicateClassNameUnitTest.4.inc | 5 + .../Classes/DuplicateClassNameUnitTest.5.inc | 8 + .../Classes/DuplicateClassNameUnitTest.6.inc | 12 + .../Classes/DuplicateClassNameUnitTest.php | 77 + .../Classes/OpeningBraceSameLineUnitTest.inc | 91 + .../OpeningBraceSameLineUnitTest.inc.fixed | 91 + .../Classes/OpeningBraceSameLineUnitTest.php | 61 + .../AssignmentInConditionUnitTest.inc | 95 + .../AssignmentInConditionUnitTest.php | 83 + .../EmptyPHPStatementUnitTest.inc | 86 + .../EmptyPHPStatementUnitTest.inc.fixed | 80 + .../EmptyPHPStatementUnitTest.php | 68 + .../CodeAnalysis/EmptyStatementUnitTest.inc | 74 + .../CodeAnalysis/EmptyStatementUnitTest.php | 63 + .../ForLoopShouldBeWhileLoopUnitTest.inc | 13 + .../ForLoopShouldBeWhileLoopUnitTest.php | 51 + .../ForLoopWithTestFunctionCallUnitTest.inc | 15 + .../ForLoopWithTestFunctionCallUnitTest.php | 51 + .../JumbledIncrementerUnitTest.inc | 25 + .../JumbledIncrementerUnitTest.php | 52 + .../UnconditionalIfStatementUnitTest.inc | 13 + .../UnconditionalIfStatementUnitTest.php | 52 + .../UnnecessaryFinalModifierUnitTest.inc | 29 + .../UnnecessaryFinalModifierUnitTest.php | 53 + .../UnusedFunctionParameterUnitTest.inc | 154 + .../UnusedFunctionParameterUnitTest.php | 58 + .../UselessOverridingMethodUnitTest.inc | 25 + .../UselessOverridingMethodUnitTest.php | 51 + .../Tests/Commenting/DocCommentUnitTest.inc | 252 ++ .../Commenting/DocCommentUnitTest.inc.fixed | 257 ++ .../Tests/Commenting/DocCommentUnitTest.js | 250 ++ .../Commenting/DocCommentUnitTest.js.fixed | 255 ++ .../Tests/Commenting/DocCommentUnitTest.php | 111 + .../Tests/Commenting/FixmeUnitTest.inc | 23 + .../Generic/Tests/Commenting/FixmeUnitTest.js | 23 + .../Tests/Commenting/FixmeUnitTest.php | 62 + .../Generic/Tests/Commenting/TodoUnitTest.inc | 23 + .../Generic/Tests/Commenting/TodoUnitTest.js | 23 + .../Generic/Tests/Commenting/TodoUnitTest.php | 61 + .../DisallowYodaConditionsUnitTest.inc | 175 + .../DisallowYodaConditionsUnitTest.php | 85 + .../InlineControlStructureUnitTest.1.inc | 274 ++ ...InlineControlStructureUnitTest.1.inc.fixed | 309 ++ .../InlineControlStructureUnitTest.2.inc | 8 + .../InlineControlStructureUnitTest.3.inc | 4 + .../InlineControlStructureUnitTest.4.inc | 5 + .../InlineControlStructureUnitTest.5.inc | 4 + .../InlineControlStructureUnitTest.6.inc | 6 + .../InlineControlStructureUnitTest.7.inc | 16 + .../InlineControlStructureUnitTest.js | 31 + .../InlineControlStructureUnitTest.js.fixed | 39 + .../InlineControlStructureUnitTest.php | 112 + .../Generic/Tests/Debug/CSSLintUnitTest.css | 6 + .../Generic/Tests/Debug/CSSLintUnitTest.php | 70 + .../Tests/Debug/ClosureLinterUnitTest.js | 6 + .../Tests/Debug/ClosureLinterUnitTest.php | 69 + .../Generic/Tests/Debug/ESLintUnitTest.js | 1 + .../Generic/Tests/Debug/ESLintUnitTest.php | 113 + .../Generic/Tests/Debug/JSHintUnitTest.js | 3 + .../Generic/Tests/Debug/JSHintUnitTest.php | 67 + .../Tests/Files/ByteOrderMarkUnitTest.inc | 3 + .../Tests/Files/ByteOrderMarkUnitTest.php | 48 + .../Tests/Files/EndFileNewlineUnitTest.1.css | 3 + .../Tests/Files/EndFileNewlineUnitTest.1.inc | 3 + .../Tests/Files/EndFileNewlineUnitTest.1.js | 3 + .../Tests/Files/EndFileNewlineUnitTest.2.css | 2 + .../Tests/Files/EndFileNewlineUnitTest.2.inc | 2 + .../Tests/Files/EndFileNewlineUnitTest.2.js | 2 + .../Tests/Files/EndFileNewlineUnitTest.3.css | 2 + .../Files/EndFileNewlineUnitTest.3.css.fixed | 2 + .../Tests/Files/EndFileNewlineUnitTest.3.inc | 2 + .../Files/EndFileNewlineUnitTest.3.inc.fixed | 2 + .../Tests/Files/EndFileNewlineUnitTest.3.js | 2 + .../Files/EndFileNewlineUnitTest.3.js.fixed | 2 + .../Tests/Files/EndFileNewlineUnitTest.4.inc | 2 + .../Files/EndFileNewlineUnitTest.4.inc.fixed | 2 + .../Tests/Files/EndFileNewlineUnitTest.5.inc | 2 + .../Tests/Files/EndFileNewlineUnitTest.6.inc | 1 + .../Files/EndFileNewlineUnitTest.6.inc.fixed | 1 + .../Tests/Files/EndFileNewlineUnitTest.7.inc | 1 + .../Files/EndFileNewlineUnitTest.7.inc.fixed | 1 + .../Tests/Files/EndFileNewlineUnitTest.8.inc | 1 + .../Tests/Files/EndFileNewlineUnitTest.php | 63 + .../Files/EndFileNoNewlineUnitTest.1.css | 3 + .../EndFileNoNewlineUnitTest.1.css.fixed | 2 + .../Files/EndFileNoNewlineUnitTest.1.inc | 3 + .../EndFileNoNewlineUnitTest.1.inc.fixed | 2 + .../Tests/Files/EndFileNoNewlineUnitTest.1.js | 3 + .../Files/EndFileNoNewlineUnitTest.1.js.fixed | 2 + .../Files/EndFileNoNewlineUnitTest.10.inc | 1 + .../Files/EndFileNoNewlineUnitTest.2.css | 2 + .../EndFileNoNewlineUnitTest.2.css.fixed | 2 + .../Files/EndFileNoNewlineUnitTest.2.inc | 3 + .../EndFileNoNewlineUnitTest.2.inc.fixed | 3 + .../Tests/Files/EndFileNoNewlineUnitTest.2.js | 2 + .../Files/EndFileNoNewlineUnitTest.2.js.fixed | 2 + .../Files/EndFileNoNewlineUnitTest.3.css | 2 + .../Files/EndFileNoNewlineUnitTest.3.inc | 2 + .../Tests/Files/EndFileNoNewlineUnitTest.3.js | 2 + .../Files/EndFileNoNewlineUnitTest.4.inc | 3 + .../Files/EndFileNoNewlineUnitTest.5.inc | 2 + .../Files/EndFileNoNewlineUnitTest.6.inc | 2 + .../EndFileNoNewlineUnitTest.6.inc.fixed | 2 + .../Files/EndFileNoNewlineUnitTest.7.inc | 6 + .../Files/EndFileNoNewlineUnitTest.8.inc | 1 + .../EndFileNoNewlineUnitTest.8.inc.fixed | 1 + .../Files/EndFileNoNewlineUnitTest.9.inc | 1 + .../EndFileNoNewlineUnitTest.9.inc.fixed | 1 + .../Tests/Files/EndFileNoNewlineUnitTest.php | 67 + .../Tests/Files/ExecutableFileUnitTest.1.inc | 1 + .../Tests/Files/ExecutableFileUnitTest.2.inc | 1 + .../Tests/Files/ExecutableFileUnitTest.3.inc | 1 + .../Tests/Files/ExecutableFileUnitTest.4.inc | 1 + .../Tests/Files/ExecutableFileUnitTest.php | 73 + .../Tests/Files/InlineHTMLUnitTest.1.inc | 3 + .../Tests/Files/InlineHTMLUnitTest.2.inc | 3 + .../Tests/Files/InlineHTMLUnitTest.3.inc | 6 + .../Tests/Files/InlineHTMLUnitTest.4.inc | 3 + .../Tests/Files/InlineHTMLUnitTest.5.inc | 3 + .../Tests/Files/InlineHTMLUnitTest.6.inc | 2 + .../Tests/Files/InlineHTMLUnitTest.7.inc | 2 + .../Tests/Files/InlineHTMLUnitTest.php | 65 + .../Tests/Files/LineEndingsUnitTest.1.inc | 18 + .../Files/LineEndingsUnitTest.1.inc.fixed | 18 + .../Tests/Files/LineEndingsUnitTest.2.inc | 5 + .../Files/LineEndingsUnitTest.2.inc.fixed | 5 + .../Tests/Files/LineEndingsUnitTest.css | 3 + .../Tests/Files/LineEndingsUnitTest.css.fixed | 3 + .../Tests/Files/LineEndingsUnitTest.js | 2 + .../Tests/Files/LineEndingsUnitTest.js.fixed | 2 + .../Tests/Files/LineEndingsUnitTest.php | 63 + .../Tests/Files/LineLengthUnitTest.1.inc | 84 + .../Tests/Files/LineLengthUnitTest.2.inc | 7 + .../Tests/Files/LineLengthUnitTest.3.inc | 16 + .../Tests/Files/LineLengthUnitTest.4.inc | 16 + .../Tests/Files/LineLengthUnitTest.php | 111 + .../Files/LowercasedFilenameUnitTest.1.inc | 7 + .../Files/LowercasedFilenameUnitTest.2.inc | 7 + .../Files/LowercasedFilenameUnitTest.php | 56 + .../Tests/Files/OneClassPerFileUnitTest.inc | 13 + .../Tests/Files/OneClassPerFileUnitTest.php | 51 + .../Files/OneInterfacePerFileUnitTest.inc | 13 + .../Files/OneInterfacePerFileUnitTest.php | 51 + .../OneObjectStructurePerFileUnitTest.inc | 21 + .../OneObjectStructurePerFileUnitTest.php | 53 + .../Tests/Files/OneTraitPerFileUnitTest.inc | 17 + .../Tests/Files/OneTraitPerFileUnitTest.php | 51 + .../DisallowMultipleStatementsUnitTest.inc | 20 + ...sallowMultipleStatementsUnitTest.inc.fixed | 25 + .../DisallowMultipleStatementsUnitTest.php | 54 + .../MultipleStatementAlignmentUnitTest.inc | 504 +++ ...ltipleStatementAlignmentUnitTest.inc.fixed | 504 +++ .../MultipleStatementAlignmentUnitTest.js | 118 + ...ultipleStatementAlignmentUnitTest.js.fixed | 118 + .../MultipleStatementAlignmentUnitTest.php | 166 + .../Formatting/NoSpaceAfterCastUnitTest.inc | 51 + .../NoSpaceAfterCastUnitTest.inc.fixed | 51 + .../Formatting/NoSpaceAfterCastUnitTest.php | 72 + .../Formatting/SpaceAfterCastUnitTest.inc | 95 + .../SpaceAfterCastUnitTest.inc.fixed | 92 + .../Formatting/SpaceAfterCastUnitTest.php | 87 + .../Formatting/SpaceAfterNotUnitTest.inc | 86 + .../SpaceAfterNotUnitTest.inc.fixed | 83 + .../Tests/Formatting/SpaceAfterNotUnitTest.js | 5 + .../Formatting/SpaceAfterNotUnitTest.js.fixed | 5 + .../Formatting/SpaceAfterNotUnitTest.php | 91 + .../Formatting/SpaceBeforeCastUnitTest.inc | 65 + .../SpaceBeforeCastUnitTest.inc.fixed | 65 + .../Formatting/SpaceBeforeCastUnitTest.php | 78 + .../CallTimePassByReferenceUnitTest.inc | 39 + .../CallTimePassByReferenceUnitTest.php | 55 + .../FunctionCallArgumentSpacingUnitTest.inc | 155 + ...ctionCallArgumentSpacingUnitTest.inc.fixed | 155 + .../FunctionCallArgumentSpacingUnitTest.php | 77 + .../OpeningFunctionBraceBsdAllmanUnitTest.inc | 263 ++ ...ngFunctionBraceBsdAllmanUnitTest.inc.fixed | 280 ++ .../OpeningFunctionBraceBsdAllmanUnitTest.php | 84 + ...gFunctionBraceKernighanRitchieUnitTest.inc | 210 ++ ...ionBraceKernighanRitchieUnitTest.inc.fixed | 198 + ...gFunctionBraceKernighanRitchieUnitTest.php | 75 + .../Metrics/CyclomaticComplexityUnitTest.inc | 436 +++ .../Metrics/CyclomaticComplexityUnitTest.php | 57 + .../Tests/Metrics/NestingLevelUnitTest.inc | 102 + .../Tests/Metrics/NestingLevelUnitTest.php | 51 + .../AbstractClassNamePrefixUnitTest.inc | 59 + .../AbstractClassNamePrefixUnitTest.php | 53 + .../CamelCapsFunctionNameUnitTest.inc | 167 + .../CamelCapsFunctionNameUnitTest.php | 88 + .../ConstructorNameUnitTest.inc | 97 + .../ConstructorNameUnitTest.php | 54 + .../InterfaceNameSuffixUnitTest.inc | 27 + .../InterfaceNameSuffixUnitTest.php | 47 + .../TraitNameSuffixUnitTest.inc | 13 + .../TraitNameSuffixUnitTest.php | 50 + .../UpperCaseConstantNameUnitTest.inc | 33 + .../UpperCaseConstantNameUnitTest.php | 56 + .../Tests/PHP/BacktickOperatorUnitTest.inc | 2 + .../Tests/PHP/BacktickOperatorUnitTest.php | 48 + ...CharacterBeforePHPOpeningTagUnitTest.1.inc | 9 + ...CharacterBeforePHPOpeningTagUnitTest.2.inc | 4 + ...CharacterBeforePHPOpeningTagUnitTest.3.inc | 3 + .../CharacterBeforePHPOpeningTagUnitTest.php | 57 + .../Tests/PHP/ClosingPHPTagUnitTest.1.inc | 10 + .../Tests/PHP/ClosingPHPTagUnitTest.2.inc | 5 + .../Tests/PHP/ClosingPHPTagUnitTest.php | 59 + .../Tests/PHP/DeprecatedFunctionsUnitTest.inc | 4 + .../Tests/PHP/DeprecatedFunctionsUnitTest.php | 58 + .../DisallowAlternativePHPTagsUnitTest.1.inc | 14 + ...llowAlternativePHPTagsUnitTest.1.inc.fixed | 14 + .../DisallowAlternativePHPTagsUnitTest.2.inc | 6 + ...llowAlternativePHPTagsUnitTest.2.inc.fixed | 6 + .../DisallowAlternativePHPTagsUnitTest.3.inc | 7 + .../DisallowAlternativePHPTagsUnitTest.php | 105 + .../DisallowRequestSuperglobalUnitTest.inc | 16 + .../DisallowRequestSuperglobalUnitTest.php | 51 + .../PHP/DisallowShortOpenTagUnitTest.1.inc | 11 + .../DisallowShortOpenTagUnitTest.1.inc.fixed | 11 + .../PHP/DisallowShortOpenTagUnitTest.2.inc | 8 + .../DisallowShortOpenTagUnitTest.2.inc.fixed | 8 + .../PHP/DisallowShortOpenTagUnitTest.3.inc | 16 + .../PHP/DisallowShortOpenTagUnitTest.php | 103 + .../Tests/PHP/DiscourageGotoUnitTest.inc | 18 + .../Tests/PHP/DiscourageGotoUnitTest.php | 53 + .../Tests/PHP/ForbiddenFunctionsUnitTest.inc | 57 + .../Tests/PHP/ForbiddenFunctionsUnitTest.php | 54 + .../Tests/PHP/LowerCaseConstantUnitTest.inc | 83 + .../PHP/LowerCaseConstantUnitTest.inc.fixed | 83 + .../Tests/PHP/LowerCaseConstantUnitTest.js | 14 + .../PHP/LowerCaseConstantUnitTest.js.fixed | 14 + .../Tests/PHP/LowerCaseConstantUnitTest.php | 84 + .../Tests/PHP/LowerCaseKeywordUnitTest.inc | 39 + .../PHP/LowerCaseKeywordUnitTest.inc.fixed | 39 + .../Tests/PHP/LowerCaseKeywordUnitTest.php | 63 + .../Tests/PHP/LowerCaseTypeUnitTest.inc | 83 + .../Tests/PHP/LowerCaseTypeUnitTest.inc.fixed | 83 + .../Tests/PHP/LowerCaseTypeUnitTest.php | 88 + .../Tests/PHP/NoSilencedErrorsUnitTest.inc | 10 + .../Tests/PHP/NoSilencedErrorsUnitTest.php | 51 + .../PHP/RequireStrictTypesUnitTest.1.inc | 8 + .../PHP/RequireStrictTypesUnitTest.2.inc | 2 + .../Tests/PHP/RequireStrictTypesUnitTest.php | 56 + .../Generic/Tests/PHP/SAPIUsageUnitTest.inc | 5 + .../Generic/Tests/PHP/SAPIUsageUnitTest.php | 48 + .../Generic/Tests/PHP/SyntaxUnitTest.1.inc | 4 + .../Generic/Tests/PHP/SyntaxUnitTest.2.inc | 3 + .../Generic/Tests/PHP/SyntaxUnitTest.php | 59 + .../Tests/PHP/UpperCaseConstantUnitTest.inc | 81 + .../PHP/UpperCaseConstantUnitTest.inc.fixed | 81 + .../Tests/PHP/UpperCaseConstantUnitTest.php | 63 + .../UnnecessaryStringConcatUnitTest.inc | 21 + .../UnnecessaryStringConcatUnitTest.js | 15 + .../UnnecessaryStringConcatUnitTest.php | 73 + .../GitMergeConflictUnitTest.1.css | 35 + .../GitMergeConflictUnitTest.1.inc | 61 + .../GitMergeConflictUnitTest.2.css | 32 + .../GitMergeConflictUnitTest.2.inc | 31 + .../GitMergeConflictUnitTest.3.inc | 43 + .../GitMergeConflictUnitTest.4.inc | 71 + .../GitMergeConflictUnitTest.5.inc | 34 + .../GitMergeConflictUnitTest.6.inc | 34 + .../GitMergeConflictUnitTest.7.inc | 19 + .../GitMergeConflictUnitTest.js | 33 + .../GitMergeConflictUnitTest.php | 170 + .../SubversionPropertiesUnitTest.inc | 3 + .../SubversionPropertiesUnitTest.php | 61 + .../ArbitraryParenthesesSpacingUnitTest.inc | 165 + ...itraryParenthesesSpacingUnitTest.inc.fixed | 153 + .../ArbitraryParenthesesSpacingUnitTest.php | 85 + .../DisallowSpaceIndentUnitTest.1.inc | 118 + .../DisallowSpaceIndentUnitTest.1.inc.fixed | 118 + .../DisallowSpaceIndentUnitTest.2.inc | 118 + .../DisallowSpaceIndentUnitTest.2.inc.fixed | 118 + .../DisallowSpaceIndentUnitTest.3.inc | 19 + .../DisallowSpaceIndentUnitTest.3.inc.fixed | 19 + .../DisallowSpaceIndentUnitTest.css | 4 + .../DisallowSpaceIndentUnitTest.css.fixed | 4 + .../WhiteSpace/DisallowSpaceIndentUnitTest.js | 9 + .../DisallowSpaceIndentUnitTest.js.fixed | 9 + .../DisallowSpaceIndentUnitTest.php | 129 + .../DisallowTabIndentUnitTest.1.inc | 93 + .../DisallowTabIndentUnitTest.1.inc.fixed | 93 + .../DisallowTabIndentUnitTest.2.inc | 19 + .../DisallowTabIndentUnitTest.2.inc.fixed | 19 + .../WhiteSpace/DisallowTabIndentUnitTest.css | 5 + .../DisallowTabIndentUnitTest.css.fixed | 5 + .../WhiteSpace/DisallowTabIndentUnitTest.js | 9 + .../DisallowTabIndentUnitTest.js.fixed | 9 + .../WhiteSpace/DisallowTabIndentUnitTest.php | 136 + .../IncrementDecrementSpacingUnitTest.inc | 17 + ...ncrementDecrementSpacingUnitTest.inc.fixed | 16 + .../IncrementDecrementSpacingUnitTest.js | 17 + ...IncrementDecrementSpacingUnitTest.js.fixed | 16 + .../IncrementDecrementSpacingUnitTest.php | 66 + .../LanguageConstructSpacingUnitTest.inc | 79 + ...LanguageConstructSpacingUnitTest.inc.fixed | 73 + .../LanguageConstructSpacingUnitTest.php | 74 + .../WhiteSpace/ScopeIndentUnitTest.1.inc | 1595 ++++++++ .../ScopeIndentUnitTest.1.inc.fixed | 1595 ++++++++ .../Tests/WhiteSpace/ScopeIndentUnitTest.1.js | 239 ++ .../WhiteSpace/ScopeIndentUnitTest.1.js.fixed | 239 ++ .../WhiteSpace/ScopeIndentUnitTest.2.inc | 1595 ++++++++ .../ScopeIndentUnitTest.2.inc.fixed | 1595 ++++++++ .../WhiteSpace/ScopeIndentUnitTest.3.inc | 28 + .../ScopeIndentUnitTest.3.inc.fixed | 28 + .../WhiteSpace/ScopeIndentUnitTest.4.inc | 6 + .../Tests/WhiteSpace/ScopeIndentUnitTest.php | 214 ++ .../SpreadOperatorSpacingAfterUnitTest.inc | 73 + ...readOperatorSpacingAfterUnitTest.inc.fixed | 68 + .../SpreadOperatorSpacingAfterUnitTest.php | 58 + .../src/Standards/Generic/ruleset.xml | 4 + .../Sniffs/CSS/BrowserSpecificStylesSniff.php | 87 + .../Channels/DisallowSelfActionsSniff.php | 125 + .../Sniffs/Channels/IncludeOwnSystemSniff.php | 98 + .../Sniffs/Channels/IncludeSystemSniff.php | 314 ++ .../Sniffs/Channels/UnusedSystemSniff.php | 141 + .../Commenting/FunctionCommentSniff.php | 84 + .../MySource/Sniffs/Debug/DebugCodeSniff.php | 55 + .../Sniffs/Debug/FirebugConsoleSniff.php | 64 + .../Sniffs/Objects/AssignThisSniff.php | 81 + .../Objects/CreateWidgetTypeCallbackSniff.php | 218 ++ .../Sniffs/Objects/DisallowNewWidgetSniff.php | 59 + .../Sniffs/PHP/AjaxNullComparisonSniff.php | 103 + .../Sniffs/PHP/EvalObjectFactorySniff.php | 114 + .../Sniffs/PHP/GetRequestDataSniff.php | 106 + .../Sniffs/PHP/ReturnFunctionValueSniff.php | 63 + .../Sniffs/Strings/JoinStringsSniff.php | 76 + .../CSS/BrowserSpecificStylesUnitTest.css | 13 + .../CSS/BrowserSpecificStylesUnitTest.php | 48 + .../Channels/DisallowSelfActionsUnitTest.inc | 51 + .../Channels/DisallowSelfActionsUnitTest.php | 53 + .../Tests/Channels/IncludeSystemUnitTest.inc | 112 + .../Tests/Channels/IncludeSystemUnitTest.php | 60 + .../Tests/Channels/UnusedSystemUnitTest.inc | 67 + .../Tests/Channels/UnusedSystemUnitTest.php | 55 + .../Commenting/FunctionCommentUnitTest.inc | 101 + .../Commenting/FunctionCommentUnitTest.php | 54 + .../Tests/Debug/DebugCodeUnitTest.inc | 4 + .../Tests/Debug/DebugCodeUnitTest.php | 51 + .../Tests/Debug/FirebugConsoleUnitTest.js | 8 + .../Tests/Debug/FirebugConsoleUnitTest.php | 61 + .../Tests/Objects/AssignThisUnitTest.js | 20 + .../Tests/Objects/AssignThisUnitTest.php | 58 + .../CreateWidgetTypeCallbackUnitTest.js | 186 + .../CreateWidgetTypeCallbackUnitTest.php | 59 + .../Objects/DisallowNewWidgetUnitTest.inc | 6 + .../Objects/DisallowNewWidgetUnitTest.php | 48 + .../Tests/PHP/AjaxNullComparisonUnitTest.inc | 182 + .../Tests/PHP/AjaxNullComparisonUnitTest.php | 55 + .../Tests/PHP/EvalObjectFactoryUnitTest.inc | 26 + .../Tests/PHP/EvalObjectFactoryUnitTest.php | 52 + .../Tests/PHP/GetRequestDataUnitTest.inc | 30 + .../Tests/PHP/GetRequestDataUnitTest.php | 56 + .../Tests/PHP/ReturnFunctionValueUnitTest.inc | 9 + .../Tests/PHP/ReturnFunctionValueUnitTest.php | 52 + .../Tests/Strings/JoinStringsUnitTest.js | 18 + .../Tests/Strings/JoinStringsUnitTest.php | 62 + .../src/Standards/MySource/ruleset.xml | 18 + .../Docs/Classes/ClassDeclarationStandard.xml | 22 + .../Docs/Commenting/ClassCommentStandard.xml | 177 + .../Docs/Commenting/FileCommentStandard.xml | 286 ++ .../Commenting/FunctionCommentStandard.xml | 230 ++ .../Docs/Commenting/InlineCommentStandard.xml | 19 + .../ControlSignatureStandard.xml | 36 + .../MultiLineConditionStandard.xml | 60 + .../PEAR/Docs/Files/IncludingFileStandard.xml | 24 + .../PEAR/Docs/Files/LineLengthStandard.xml | 7 + .../MultiLineAssignmentStandard.xml | 35 + .../FunctionCallSignatureStandard.xml | 19 + .../Functions/FunctionDeclarationStandard.xml | 41 + .../Functions/ValidDefaultValueStandard.xml | 25 + .../ValidClassNameStandard.xml | 23 + .../ValidFunctionNameStandard.xml | 23 + .../ValidVariableNameStandard.xml | 29 + .../ObjectOperatorIndentStandard.xml | 39 + .../WhiteSpace/ScopeClosingBraceStandard.xml | 23 + .../Docs/WhiteSpace/ScopeIndentStandard.xml | 29 + .../Sniffs/Classes/ClassDeclarationSniff.php | 149 + .../Sniffs/Commenting/ClassCommentSniff.php | 118 + .../Sniffs/Commenting/FileCommentSniff.php | 581 +++ .../Commenting/FunctionCommentSniff.php | 525 +++ .../Sniffs/Commenting/InlineCommentSniff.php | 68 + .../ControlSignatureSniff.php | 48 + .../MultiLineConditionSniff.php | 283 ++ .../PEAR/Sniffs/Files/IncludingFileSniff.php | 136 + .../Formatting/MultiLineAssignmentSniff.php | 106 + .../Functions/FunctionCallSignatureSniff.php | 628 ++++ .../Functions/FunctionDeclarationSniff.php | 522 +++ .../Functions/ValidDefaultValueSniff.php | 78 + .../NamingConventions/ValidClassNameSniff.php | 97 + .../ValidFunctionNameSniff.php | 284 ++ .../ValidVariableNameSniff.php | 103 + .../WhiteSpace/ObjectOperatorIndentSniff.php | 204 + .../WhiteSpace/ScopeClosingBraceSniff.php | 179 + .../Sniffs/WhiteSpace/ScopeIndentSniff.php | 24 + .../Classes/ClassDeclarationUnitTest.1.inc | 112 + .../ClassDeclarationUnitTest.1.inc.fixed | 121 + .../Classes/ClassDeclarationUnitTest.2.inc | 11 + .../Classes/ClassDeclarationUnitTest.php | 94 + .../Tests/Commenting/ClassCommentUnitTest.inc | 135 + .../Tests/Commenting/ClassCommentUnitTest.php | 70 + .../Commenting/FileCommentUnitTest.1.inc | 53 + .../Commenting/FileCommentUnitTest.2.inc | 9 + .../Tests/Commenting/FileCommentUnitTest.php | 88 + .../Commenting/FunctionCommentUnitTest.inc | 478 +++ .../FunctionCommentUnitTest.inc.fixed | 478 +++ .../Commenting/FunctionCommentUnitTest.php | 96 + .../Commenting/InlineCommentUnitTest.inc | 29 + .../InlineCommentUnitTest.inc.fixed | 29 + .../Commenting/InlineCommentUnitTest.php | 55 + .../ControlSignatureUnitTest.inc | 165 + .../ControlSignatureUnitTest.php | 72 + .../MultiLineConditionUnitTest.inc | 251 ++ .../MultiLineConditionUnitTest.inc.fixed | 247 ++ .../MultiLineConditionUnitTest.js | 251 ++ .../MultiLineConditionUnitTest.js.fixed | 247 ++ .../MultiLineConditionUnitTest.php | 91 + .../Tests/Files/IncludingFileUnitTest.inc | 99 + .../Files/IncludingFileUnitTest.inc.fixed | 99 + .../Tests/Files/IncludingFileUnitTest.php | 67 + .../MultiLineAssignmentUnitTest.inc | 22 + .../MultiLineAssignmentUnitTest.php | 52 + .../FunctionCallSignatureUnitTest.inc | 550 +++ .../FunctionCallSignatureUnitTest.inc.fixed | 565 +++ .../FunctionCallSignatureUnitTest.js | 80 + .../FunctionCallSignatureUnitTest.js.fixed | 84 + .../FunctionCallSignatureUnitTest.php | 154 + .../Functions/FunctionDeclarationUnitTest.inc | 420 +++ .../FunctionDeclarationUnitTest.inc.fixed | 418 +++ .../Functions/FunctionDeclarationUnitTest.js | 59 + .../FunctionDeclarationUnitTest.js.fixed | 60 + .../Functions/FunctionDeclarationUnitTest.php | 138 + .../Functions/ValidDefaultValueUnitTest.inc | 119 + .../Functions/ValidDefaultValueUnitTest.php | 60 + .../ValidClassNameUnitTest.inc | 68 + .../ValidClassNameUnitTest.php | 67 + .../ValidFunctionNameUnitTest.inc | 222 ++ .../ValidFunctionNameUnitTest.php | 145 + .../ValidVariableNameUnitTest.inc | 101 + .../ValidVariableNameUnitTest.php | 56 + .../ObjectOperatorIndentUnitTest.inc | 142 + .../ObjectOperatorIndentUnitTest.inc.fixed | 142 + .../ObjectOperatorIndentUnitTest.php | 74 + .../WhiteSpace/ScopeClosingBraceUnitTest.inc | 154 + .../ScopeClosingBraceUnitTest.inc.fixed | 159 + .../WhiteSpace/ScopeClosingBraceUnitTest.php | 65 + .../Tests/WhiteSpace/ScopeIndentUnitTest.inc | 314 ++ .../Tests/WhiteSpace/ScopeIndentUnitTest.php | 66 + .../src/Standards/PEAR/ruleset.xml | 41 + .../Docs/Classes/ClassDeclarationStandard.xml | 48 + .../PSR1/Docs/Files/SideEffectsStandard.xml | 27 + .../Methods/CamelCapsMethodNameStandard.xml | 29 + .../Sniffs/Classes/ClassDeclarationSniff.php | 74 + .../PSR1/Sniffs/Files/SideEffectsSniff.php | 298 ++ .../Methods/CamelCapsMethodNameSniff.php | 91 + .../Classes/ClassDeclarationUnitTest.1.inc | 3 + .../Classes/ClassDeclarationUnitTest.2.inc | 4 + .../Classes/ClassDeclarationUnitTest.php | 57 + .../Tests/Files/SideEffectsUnitTest.1.inc | 73 + .../Tests/Files/SideEffectsUnitTest.10.inc | 8 + .../Tests/Files/SideEffectsUnitTest.11.inc | 11 + .../Tests/Files/SideEffectsUnitTest.12.inc | 8 + .../Tests/Files/SideEffectsUnitTest.13.inc | 2 + .../Tests/Files/SideEffectsUnitTest.14.inc | 2 + .../Tests/Files/SideEffectsUnitTest.15.inc | 2 + .../Tests/Files/SideEffectsUnitTest.16.inc | 2 + .../Tests/Files/SideEffectsUnitTest.2.inc | 24 + .../Tests/Files/SideEffectsUnitTest.3.inc | 6 + .../Tests/Files/SideEffectsUnitTest.4.inc | 10 + .../Tests/Files/SideEffectsUnitTest.5.inc | 2 + .../Tests/Files/SideEffectsUnitTest.6.inc | 9 + .../Tests/Files/SideEffectsUnitTest.7.inc | 8 + .../Tests/Files/SideEffectsUnitTest.8.inc | 8 + .../Tests/Files/SideEffectsUnitTest.9.inc | 8 + .../PSR1/Tests/Files/SideEffectsUnitTest.php | 80 + .../Methods/CamelCapsMethodNameUnitTest.inc | 81 + .../Methods/CamelCapsMethodNameUnitTest.php | 59 + .../src/Standards/PSR1/ruleset.xml | 47 + .../Classes/ClassInstantiationStandard.xml | 19 + .../NullableTypeDeclarationStandard.xml | 45 + .../ShortFormTypeKeywordsStandard.xml | 19 + .../CompoundNamespaceDepthStandard.xml | 28 + .../Operators/OperatorSpacingStandard.xml | 27 + .../Classes/AnonClassDeclarationSniff.php | 242 ++ .../Classes/ClassInstantiationSniff.php | 114 + .../Sniffs/Classes/ClosingBraceSniff.php | 66 + .../Sniffs/Classes/OpeningBraceSpaceSniff.php | 80 + .../BooleanOperatorPlacementSniff.php | 229 ++ .../ControlStructureSpacingSniff.php | 192 + .../Sniffs/Files/DeclareStatementSniff.php | 256 ++ .../PSR12/Sniffs/Files/FileHeaderSniff.php | 428 +++ .../Sniffs/Files/ImportStatementSniff.php | 77 + .../PSR12/Sniffs/Files/OpenTagSniff.php | 73 + .../NullableTypeDeclarationSniff.php | 91 + .../Functions/ReturnTypeDeclarationSniff.php | 110 + .../Keywords/ShortFormTypeKeywordsSniff.php | 75 + .../CompoundNamespaceDepthSniff.php | 80 + .../Sniffs/Operators/OperatorSpacingSniff.php | 112 + .../Properties/ConstantVisibilitySniff.php | 61 + .../Sniffs/Traits/UseDeclarationSniff.php | 700 ++++ .../Classes/AnonClassDeclarationUnitTest.inc | 84 + .../AnonClassDeclarationUnitTest.inc.fixed | 86 + .../Classes/AnonClassDeclarationUnitTest.php | 71 + .../Classes/ClassInstantiationUnitTest.inc | 44 + .../ClassInstantiationUnitTest.inc.fixed | 44 + .../Classes/ClassInstantiationUnitTest.php | 66 + .../Tests/Classes/ClosingBraceUnitTest.inc | 47 + .../Tests/Classes/ClosingBraceUnitTest.php | 54 + .../Classes/OpeningBraceSpaceUnitTest.inc | 49 + .../OpeningBraceSpaceUnitTest.inc.fixed | 41 + .../Classes/OpeningBraceSpaceUnitTest.php | 54 + .../BooleanOperatorPlacementUnitTest.inc | 131 + ...BooleanOperatorPlacementUnitTest.inc.fixed | 141 + .../BooleanOperatorPlacementUnitTest.php | 59 + .../ControlStructureSpacingUnitTest.inc | 100 + .../ControlStructureSpacingUnitTest.inc.fixed | 103 + .../ControlStructureSpacingUnitTest.php | 68 + .../Tests/Files/DeclareStatementUnitTest.inc | 50 + .../Files/DeclareStatementUnitTest.inc.fixed | 54 + .../Tests/Files/DeclareStatementUnitTest.php | 72 + .../Tests/Files/FileHeaderUnitTest.1.inc | 29 + .../Tests/Files/FileHeaderUnitTest.10.inc | 4 + .../Files/FileHeaderUnitTest.10.inc.fixed | 5 + .../Tests/Files/FileHeaderUnitTest.11.inc | 21 + .../Files/FileHeaderUnitTest.11.inc.fixed | 22 + .../Tests/Files/FileHeaderUnitTest.12.inc | 17 + .../Files/FileHeaderUnitTest.12.inc.fixed | 18 + .../Tests/Files/FileHeaderUnitTest.13.inc | 24 + .../Tests/Files/FileHeaderUnitTest.14.inc | 7 + .../Tests/Files/FileHeaderUnitTest.15.inc | 5 + .../Tests/Files/FileHeaderUnitTest.16.inc | 13 + .../Tests/Files/FileHeaderUnitTest.17.inc | 13 + .../Tests/Files/FileHeaderUnitTest.2.inc | 33 + .../Files/FileHeaderUnitTest.2.inc.fixed | 29 + .../Tests/Files/FileHeaderUnitTest.3.inc | 27 + .../Tests/Files/FileHeaderUnitTest.4.inc | 15 + .../Files/FileHeaderUnitTest.4.inc.fixed | 19 + .../Tests/Files/FileHeaderUnitTest.5.inc | 18 + .../Tests/Files/FileHeaderUnitTest.6.inc | 13 + .../Tests/Files/FileHeaderUnitTest.7.inc | 2 + .../Files/FileHeaderUnitTest.7.inc.fixed | 3 + .../Tests/Files/FileHeaderUnitTest.8.inc | 5 + .../Tests/Files/FileHeaderUnitTest.9.inc | 7 + .../PSR12/Tests/Files/FileHeaderUnitTest.php | 82 + .../Tests/Files/ImportStatementUnitTest.inc | 19 + .../Files/ImportStatementUnitTest.inc.fixed | 19 + .../Tests/Files/ImportStatementUnitTest.php | 52 + .../PSR12/Tests/Files/OpenTagUnitTest.1.inc | 3 + .../PSR12/Tests/Files/OpenTagUnitTest.2.inc | 1 + .../Tests/Files/OpenTagUnitTest.2.inc.fixed | 2 + .../PSR12/Tests/Files/OpenTagUnitTest.3.inc | 3 + .../PSR12/Tests/Files/OpenTagUnitTest.4.inc | 2 + .../PSR12/Tests/Files/OpenTagUnitTest.5.inc | 1 + .../PSR12/Tests/Files/OpenTagUnitTest.php | 55 + .../NullableTypeDeclarationUnitTest.inc | 87 + .../NullableTypeDeclarationUnitTest.inc.fixed | 85 + .../NullableTypeDeclarationUnitTest.php | 64 + .../ReturnTypeDeclarationUnitTest.inc | 66 + .../ReturnTypeDeclarationUnitTest.inc.fixed | 62 + .../ReturnTypeDeclarationUnitTest.php | 61 + .../ShortFormTypeKeywordsUnitTest.inc | 14 + .../ShortFormTypeKeywordsUnitTest.inc.fixed | 14 + .../ShortFormTypeKeywordsUnitTest.php | 54 + .../CompoundNamespaceDepthUnitTest.inc | 31 + .../CompoundNamespaceDepthUnitTest.php | 52 + .../Operators/OperatorSpacingUnitTest.inc | 77 + .../OperatorSpacingUnitTest.inc.fixed | 77 + .../Operators/OperatorSpacingUnitTest.php | 69 + .../Properties/ConstantVisibilityUnitTest.inc | 7 + .../Properties/ConstantVisibilityUnitTest.php | 48 + .../Tests/Traits/UseDeclarationUnitTest.inc | 209 ++ .../Traits/UseDeclarationUnitTest.inc.fixed | 203 + .../Tests/Traits/UseDeclarationUnitTest.php | 70 + .../src/Standards/PSR12/ruleset.xml | 347 ++ .../Docs/Classes/ClassDeclarationStandard.xml | 23 + .../Classes/PropertyDeclarationStandard.xml | 81 + .../ControlStructureSpacingStandard.xml | 23 + .../ElseIfDeclarationStandard.xml | 27 + .../SwitchDeclarationStandard.xml | 104 + .../Docs/Files/EndFileNewlineStandard.xml | 7 + .../Methods/MethodDeclarationStandard.xml | 51 + .../NamespaceDeclarationStandard.xml | 22 + .../Namespaces/UseDeclarationStandard.xml | 57 + .../Sniffs/Classes/ClassDeclarationSniff.php | 528 +++ .../Classes/PropertyDeclarationSniff.php | 184 + .../ControlStructureSpacingSniff.php | 142 + .../ElseIfDeclarationSniff.php | 72 + .../SwitchDeclarationSniff.php | 396 ++ .../PSR2/Sniffs/Files/ClosingTagSniff.php | 89 + .../PSR2/Sniffs/Files/EndFileNewlineSniff.php | 107 + .../Methods/FunctionCallSignatureSniff.php | 79 + .../Methods/FunctionClosingBraceSniff.php | 91 + .../Sniffs/Methods/MethodDeclarationSniff.php | 162 + .../Namespaces/NamespaceDeclarationSniff.php | 100 + .../Sniffs/Namespaces/UseDeclarationSniff.php | 297 ++ .../Classes/ClassDeclarationUnitTest.inc | 241 ++ .../ClassDeclarationUnitTest.inc.fixed | 234 ++ .../Classes/ClassDeclarationUnitTest.php | 86 + .../Classes/PropertyDeclarationUnitTest.inc | 73 + .../PropertyDeclarationUnitTest.inc.fixed | 70 + .../Classes/PropertyDeclarationUnitTest.php | 74 + .../ControlStructureSpacingUnitTest.inc | 81 + .../ControlStructureSpacingUnitTest.inc.fixed | 80 + .../ControlStructureSpacingUnitTest.php | 62 + .../ElseIfDeclarationUnitTest.inc | 17 + .../ElseIfDeclarationUnitTest.inc.fixed | 17 + .../ElseIfDeclarationUnitTest.php | 51 + .../SwitchDeclarationUnitTest.inc | 586 +++ .../SwitchDeclarationUnitTest.inc.fixed | 581 +++ .../SwitchDeclarationUnitTest.php | 81 + .../PSR2/Tests/Files/ClosingTagUnitTest.1.inc | 12 + .../Files/ClosingTagUnitTest.1.inc.fixed | 12 + .../PSR2/Tests/Files/ClosingTagUnitTest.2.inc | 3 + .../PSR2/Tests/Files/ClosingTagUnitTest.3.inc | 7 + .../PSR2/Tests/Files/ClosingTagUnitTest.4.inc | 1 + .../Files/ClosingTagUnitTest.4.inc.fixed | 1 + .../PSR2/Tests/Files/ClosingTagUnitTest.5.inc | 1 + .../Files/ClosingTagUnitTest.5.inc.fixed | 1 + .../PSR2/Tests/Files/ClosingTagUnitTest.6.inc | 5 + .../Files/ClosingTagUnitTest.6.inc.fixed | 5 + .../PSR2/Tests/Files/ClosingTagUnitTest.7.inc | 5 + .../Files/ClosingTagUnitTest.7.inc.fixed | 5 + .../PSR2/Tests/Files/ClosingTagUnitTest.php | 64 + .../Tests/Files/EndFileNewlineUnitTest.1.inc | 3 + .../Files/EndFileNewlineUnitTest.1.inc.fixed | 2 + .../Tests/Files/EndFileNewlineUnitTest.10.inc | 3 + .../Files/EndFileNewlineUnitTest.10.inc.fixed | 2 + .../Tests/Files/EndFileNewlineUnitTest.11.inc | 1 + .../Files/EndFileNewlineUnitTest.11.inc.fixed | 1 + .../Tests/Files/EndFileNewlineUnitTest.12.inc | 1 + .../Files/EndFileNewlineUnitTest.12.inc.fixed | 1 + .../Tests/Files/EndFileNewlineUnitTest.13.inc | 5 + .../Files/EndFileNewlineUnitTest.13.inc.fixed | 1 + .../Tests/Files/EndFileNewlineUnitTest.14.inc | 1 + .../Tests/Files/EndFileNewlineUnitTest.2.inc | 2 + .../Tests/Files/EndFileNewlineUnitTest.3.inc | 2 + .../Files/EndFileNewlineUnitTest.3.inc.fixed | 2 + .../Tests/Files/EndFileNewlineUnitTest.4.inc | 4 + .../Tests/Files/EndFileNewlineUnitTest.5.inc | 6 + .../Tests/Files/EndFileNewlineUnitTest.6.inc | 2 + .../Files/EndFileNewlineUnitTest.6.inc.fixed | 2 + .../Tests/Files/EndFileNewlineUnitTest.7.inc | 11 + .../Files/EndFileNewlineUnitTest.7.inc.fixed | 2 + .../Tests/Files/EndFileNewlineUnitTest.8.inc | 2 + .../Tests/Files/EndFileNewlineUnitTest.9.inc | 2 + .../Files/EndFileNewlineUnitTest.9.inc.fixed | 2 + .../Tests/Files/EndFileNewlineUnitTest.php | 66 + .../Methods/FunctionCallSignatureUnitTest.inc | 267 ++ .../FunctionCallSignatureUnitTest.inc.fixed | 283 ++ .../Methods/FunctionCallSignatureUnitTest.php | 94 + .../Methods/FunctionClosingBraceUnitTest.inc | 70 + .../FunctionClosingBraceUnitTest.inc.fixed | 61 + .../Methods/FunctionClosingBraceUnitTest.php | 55 + .../Methods/MethodDeclarationUnitTest.inc | 66 + .../MethodDeclarationUnitTest.inc.fixed | 66 + .../Methods/MethodDeclarationUnitTest.php | 69 + .../NamespaceDeclarationUnitTest.inc | 26 + .../NamespaceDeclarationUnitTest.inc.fixed | 28 + .../NamespaceDeclarationUnitTest.php | 53 + .../Namespaces/UseDeclarationUnitTest.1.inc | 38 + .../Namespaces/UseDeclarationUnitTest.10.inc | 8 + .../UseDeclarationUnitTest.10.inc.fixed | 9 + .../Namespaces/UseDeclarationUnitTest.11.inc | 2 + .../UseDeclarationUnitTest.11.inc.fixed | 4 + .../Namespaces/UseDeclarationUnitTest.12.inc | 9 + .../UseDeclarationUnitTest.12.inc.fixed | 11 + .../Namespaces/UseDeclarationUnitTest.13.inc | 10 + .../UseDeclarationUnitTest.13.inc.fixed | 11 + .../Namespaces/UseDeclarationUnitTest.14.inc | 8 + .../UseDeclarationUnitTest.14.inc.fixed | 9 + .../Namespaces/UseDeclarationUnitTest.15.inc | 10 + .../Namespaces/UseDeclarationUnitTest.16.inc | 11 + .../UseDeclarationUnitTest.16.inc.fixed | 9 + .../Namespaces/UseDeclarationUnitTest.17.inc | 3 + .../Namespaces/UseDeclarationUnitTest.2.inc | 21 + .../UseDeclarationUnitTest.2.inc.fixed | 27 + .../Namespaces/UseDeclarationUnitTest.3.inc | 16 + .../UseDeclarationUnitTest.3.inc.fixed | 16 + .../Namespaces/UseDeclarationUnitTest.4.inc | 4 + .../Namespaces/UseDeclarationUnitTest.5.inc | 47 + .../UseDeclarationUnitTest.5.inc.fixed | 56 + .../Namespaces/UseDeclarationUnitTest.6.inc | 1 + .../Namespaces/UseDeclarationUnitTest.7.inc | 1 + .../Namespaces/UseDeclarationUnitTest.8.inc | 8 + .../Namespaces/UseDeclarationUnitTest.9.inc | 8 + .../Namespaces/UseDeclarationUnitTest.php | 97 + .../src/Standards/PSR2/ruleset.xml | 218 ++ .../Arrays/ArrayBracketSpacingStandard.xml | 19 + .../Docs/Arrays/ArrayDeclarationStandard.xml | 117 + .../LowercaseClassKeywordsStandard.xml | 23 + .../Classes/SelfMemberReferenceStandard.xml | 63 + .../DocCommentAlignmentStandard.xml | 39 + .../FunctionCommentThrowTagStandard.xml | 32 + .../ForEachLoopDeclarationStandard.xml | 39 + .../ForLoopDeclarationStandard.xml | 55 + .../LowercaseDeclarationStandard.xml | 23 + .../FunctionDuplicateArgumentStandard.xml | 23 + .../LowercaseFunctionKeywordsStandard.xml | 25 + .../Docs/Scope/StaticThisUsageStandard.xml | 31 + .../Docs/Strings/EchoedStringsStandard.xml | 19 + .../Docs/WhiteSpace/CastSpacingStandard.xml | 19 + .../FunctionOpeningBraceStandard.xml | 41 + .../LanguageConstructSpacingStandard.xml | 19 + .../ObjectOperatorSpacingStandard.xml | 19 + .../ScopeKeywordSpacingStandard.xml | 23 + .../WhiteSpace/SemicolonSpacingStandard.xml | 19 + .../Arrays/ArrayBracketSpacingSniff.php | 95 + .../Sniffs/Arrays/ArrayDeclarationSniff.php | 894 +++++ .../ClassDefinitionClosingBraceSpaceSniff.php | 134 + .../CSS/ClassDefinitionNameSpacingSniff.php | 111 + .../ClassDefinitionOpeningBraceSpaceSniff.php | 176 + .../Squiz/Sniffs/CSS/ColonSpacingSniff.php | 107 + .../Sniffs/CSS/ColourDefinitionSniff.php | 88 + .../DisallowMultipleStyleDefinitionsSniff.php | 71 + .../CSS/DuplicateClassDefinitionSniff.php | 116 + .../CSS/DuplicateStyleDefinitionSniff.php | 88 + .../Sniffs/CSS/EmptyClassDefinitionSniff.php | 61 + .../Sniffs/CSS/EmptyStyleDefinitionSniff.php | 64 + .../Squiz/Sniffs/CSS/ForbiddenStylesSniff.php | 177 + .../Squiz/Sniffs/CSS/IndentationSniff.php | 150 + .../CSS/LowercaseStyleDefinitionSniff.php | 97 + .../Squiz/Sniffs/CSS/MissingColonSniff.php | 91 + .../Squiz/Sniffs/CSS/NamedColoursSniff.php | 93 + .../Squiz/Sniffs/CSS/OpacitySniff.php | 101 + .../Sniffs/CSS/SemicolonSpacingSniff.php | 103 + .../Squiz/Sniffs/CSS/ShorthandSizeSniff.php | 181 + .../Sniffs/Classes/ClassDeclarationSniff.php | 206 ++ .../Sniffs/Classes/ClassFileNameSniff.php | 69 + .../Sniffs/Classes/DuplicatePropertySniff.php | 82 + .../Classes/LowercaseClassKeywordsSniff.php | 72 + .../Classes/SelfMemberReferenceSniff.php | 240 ++ .../Sniffs/Classes/ValidClassNameSniff.php | 86 + .../Sniffs/Commenting/BlockCommentSniff.php | 399 ++ .../Sniffs/Commenting/ClassCommentSniff.php | 106 + .../ClosingDeclarationCommentSniff.php | 129 + .../Commenting/DocCommentAlignmentSniff.php | 158 + .../Commenting/EmptyCatchCommentSniff.php | 55 + .../Sniffs/Commenting/FileCommentSniff.php | 226 ++ .../Commenting/FunctionCommentSniff.php | 766 ++++ .../FunctionCommentThrowTagSniff.php | 233 ++ .../Sniffs/Commenting/InlineCommentSniff.php | 347 ++ .../LongConditionClosingCommentSniff.php | 218 ++ .../Commenting/PostStatementCommentSniff.php | 121 + .../Commenting/VariableCommentSniff.php | 192 + .../ControlSignatureSniff.php | 325 ++ .../ElseIfDeclarationSniff.php | 51 + .../ForEachLoopDeclarationSniff.php | 236 ++ .../ForLoopDeclarationSniff.php | 316 ++ .../InlineIfDeclarationSniff.php | 155 + .../LowercaseDeclarationSniff.php | 75 + .../SwitchDeclarationSniff.php | 304 ++ .../Squiz/Sniffs/Debug/JSLintSniff.php | 86 + .../Sniffs/Debug/JavaScriptLintSniff.php | 89 + .../Squiz/Sniffs/Files/FileExtensionSniff.php | 68 + .../Formatting/OperatorBracketSniff.php | 393 ++ ...unctionDeclarationArgumentSpacingSniff.php | 398 ++ .../Functions/FunctionDeclarationSniff.php | 34 + .../FunctionDuplicateArgumentSniff.php | 64 + .../Sniffs/Functions/GlobalFunctionSniff.php | 61 + .../LowercaseFunctionKeywordsSniff.php | 69 + .../MultiLineFunctionDeclarationSniff.php | 258 ++ .../ValidFunctionNameSniff.php | 54 + .../ValidVariableNameSniff.php | 190 + .../DisallowObjectStringIndexSniff.php | 85 + .../Objects/ObjectInstantiationSniff.php | 85 + .../Sniffs/Objects/ObjectMemberCommaSniff.php | 64 + .../ComparisonOperatorUsageSniff.php | 235 ++ .../IncrementDecrementUsageSniff.php | 225 ++ .../Operators/ValidLogicalOperatorsSniff.php | 67 + .../Sniffs/PHP/CommentedOutCodeSniff.php | 288 ++ .../PHP/DisallowBooleanStatementSniff.php | 59 + .../PHP/DisallowComparisonAssignmentSniff.php | 111 + .../Sniffs/PHP/DisallowInlineIfSniff.php | 57 + .../PHP/DisallowMultipleAssignmentsSniff.php | 186 + .../PHP/DisallowSizeFunctionsInLoopsSniff.php | 116 + .../Sniffs/PHP/DiscouragedFunctionsSniff.php | 38 + .../Squiz/Sniffs/PHP/EmbeddedPhpSniff.php | 402 ++ .../Standards/Squiz/Sniffs/PHP/EvalSniff.php | 48 + .../Squiz/Sniffs/PHP/GlobalKeywordSniff.php | 53 + .../Squiz/Sniffs/PHP/HeredocSniff.php | 51 + .../Squiz/Sniffs/PHP/InnerFunctionsSniff.php | 68 + .../Sniffs/PHP/LowercasePHPFunctionsSniff.php | 162 + .../Sniffs/PHP/NonExecutableCodeSniff.php | 277 ++ .../Sniffs/Scope/MemberVarScopeSniff.php | 77 + .../Squiz/Sniffs/Scope/MethodScopeSniff.php | 92 + .../Sniffs/Scope/StaticThisUsageSniff.php | 128 + .../Strings/ConcatenationSpacingSniff.php | 164 + .../Sniffs/Strings/DoubleQuoteUsageSniff.php | 144 + .../Sniffs/Strings/EchoedStringsSniff.php | 88 + .../Sniffs/WhiteSpace/CastSpacingSniff.php | 65 + .../ControlStructureSpacingSniff.php | 358 ++ .../FunctionClosingBraceSpaceSniff.php | 164 + .../FunctionOpeningBraceSpaceSniff.php | 98 + .../WhiteSpace/FunctionSpacingSniff.php | 367 ++ .../LanguageConstructSpacingSniff.php | 89 + .../LogicalOperatorSpacingSniff.php | 102 + .../WhiteSpace/MemberVarSpacingSniff.php | 254 ++ .../WhiteSpace/ObjectOperatorSpacingSniff.php | 167 + .../WhiteSpace/OperatorSpacingSniff.php | 381 ++ .../WhiteSpace/PropertyLabelSpacingSniff.php | 79 + .../WhiteSpace/ScopeClosingBraceSniff.php | 114 + .../WhiteSpace/ScopeKeywordSpacingSniff.php | 168 + .../WhiteSpace/SemicolonSpacingSniff.php | 116 + .../WhiteSpace/SuperfluousWhitespaceSniff.php | 265 ++ .../Arrays/ArrayBracketSpacingUnitTest.inc | 31 + .../ArrayBracketSpacingUnitTest.inc.fixed | 31 + .../Arrays/ArrayBracketSpacingUnitTest.php | 57 + .../Arrays/ArrayDeclarationUnitTest.1.inc | 481 +++ .../ArrayDeclarationUnitTest.1.inc.fixed | 517 +++ .../Arrays/ArrayDeclarationUnitTest.2.inc | 470 +++ .../ArrayDeclarationUnitTest.2.inc.fixed | 504 +++ .../Tests/Arrays/ArrayDeclarationUnitTest.php | 236 ++ ...assDefinitionClosingBraceSpaceUnitTest.css | 81 + ...initionClosingBraceSpaceUnitTest.css.fixed | 85 + ...assDefinitionClosingBraceSpaceUnitTest.php | 60 + .../ClassDefinitionNameSpacingUnitTest.css | 66 + .../ClassDefinitionNameSpacingUnitTest.php | 51 + ...assDefinitionOpeningBraceSpaceUnitTest.css | 108 + ...initionOpeningBraceSpaceUnitTest.css.fixed | 106 + ...assDefinitionOpeningBraceSpaceUnitTest.php | 64 + .../Squiz/Tests/CSS/ColonSpacingUnitTest.css | 42 + .../Tests/CSS/ColonSpacingUnitTest.css.fixed | 40 + .../Squiz/Tests/CSS/ColonSpacingUnitTest.php | 60 + .../Tests/CSS/ColourDefinitionUnitTest.css | 16 + .../CSS/ColourDefinitionUnitTest.css.fixed | 16 + .../Tests/CSS/ColourDefinitionUnitTest.php | 52 + ...sallowMultipleStyleDefinitionsUnitTest.css | 17 + ...MultipleStyleDefinitionsUnitTest.css.fixed | 27 + ...sallowMultipleStyleDefinitionsUnitTest.php | 54 + .../CSS/DuplicateClassDefinitionUnitTest.css | 103 + .../CSS/DuplicateClassDefinitionUnitTest.php | 54 + .../CSS/DuplicateStyleDefinitionUnitTest.css | 27 + .../CSS/DuplicateStyleDefinitionUnitTest.php | 48 + .../CSS/EmptyClassDefinitionUnitTest.css | 15 + .../CSS/EmptyClassDefinitionUnitTest.php | 54 + .../CSS/EmptyStyleDefinitionUnitTest.css | 11 + .../CSS/EmptyStyleDefinitionUnitTest.php | 53 + .../Tests/CSS/ForbiddenStylesUnitTest.css | 18 + .../CSS/ForbiddenStylesUnitTest.css.fixed | 18 + .../Tests/CSS/ForbiddenStylesUnitTest.php | 57 + .../Squiz/Tests/CSS/IndentationUnitTest.1.css | 79 + .../Tests/CSS/IndentationUnitTest.1.css.fixed | 73 + .../Squiz/Tests/CSS/IndentationUnitTest.2.css | 3 + .../Squiz/Tests/CSS/IndentationUnitTest.php | 75 + .../CSS/LowercaseStyleDefinitionUnitTest.css | 14 + .../CSS/LowercaseStyleDefinitionUnitTest.php | 53 + .../Squiz/Tests/CSS/MissingColonUnitTest.css | 21 + .../Squiz/Tests/CSS/MissingColonUnitTest.php | 53 + .../Squiz/Tests/CSS/NamedColoursUnitTest.css | 25 + .../Squiz/Tests/CSS/NamedColoursUnitTest.php | 54 + .../Squiz/Tests/CSS/OpacityUnitTest.css | 35 + .../Squiz/Tests/CSS/OpacityUnitTest.css.fixed | 35 + .../Squiz/Tests/CSS/OpacityUnitTest.php | 60 + .../Tests/CSS/SemicolonSpacingUnitTest.css | 61 + .../CSS/SemicolonSpacingUnitTest.css.fixed | 58 + .../Tests/CSS/SemicolonSpacingUnitTest.php | 58 + .../Squiz/Tests/CSS/ShorthandSizeUnitTest.css | 45 + .../Tests/CSS/ShorthandSizeUnitTest.css.fixed | 41 + .../Squiz/Tests/CSS/ShorthandSizeUnitTest.php | 59 + .../Classes/ClassDeclarationUnitTest.inc | 121 + .../ClassDeclarationUnitTest.inc.fixed | 132 + .../Classes/ClassDeclarationUnitTest.php | 84 + .../Tests/Classes/ClassFileNameUnitTest.inc | 37 + .../Tests/Classes/ClassFileNameUnitTest.php | 70 + .../Classes/DuplicatePropertyUnitTest.js | 45 + .../Classes/DuplicatePropertyUnitTest.php | 52 + .../LowercaseClassKeywordsUnitTest.inc | 13 + .../LowercaseClassKeywordsUnitTest.inc.fixed | 13 + .../LowercaseClassKeywordsUnitTest.php | 58 + .../Classes/SelfMemberReferenceUnitTest.inc | 174 + .../SelfMemberReferenceUnitTest.inc.fixed | 162 + .../Classes/SelfMemberReferenceUnitTest.php | 64 + .../Tests/Classes/ValidClassNameUnitTest.inc | 147 + .../Tests/Classes/ValidClassNameUnitTest.php | 70 + .../Tests/Commenting/BlockCommentUnitTest.inc | 290 ++ .../Commenting/BlockCommentUnitTest.inc.fixed | 292 ++ .../Tests/Commenting/BlockCommentUnitTest.php | 104 + .../Tests/Commenting/ClassCommentUnitTest.inc | 133 + .../Tests/Commenting/ClassCommentUnitTest.php | 59 + .../ClosingDeclarationCommentUnitTest.inc | 82 + .../ClosingDeclarationCommentUnitTest.php | 57 + .../DocCommentAlignmentUnitTest.inc | 83 + .../DocCommentAlignmentUnitTest.inc.fixed | 83 + .../Commenting/DocCommentAlignmentUnitTest.js | 76 + .../DocCommentAlignmentUnitTest.js.fixed | 76 + .../DocCommentAlignmentUnitTest.php | 70 + .../Commenting/EmptyCatchCommentUnitTest.inc | 55 + .../Commenting/EmptyCatchCommentUnitTest.php | 55 + .../Commenting/FileCommentUnitTest.1.inc | 43 + .../FileCommentUnitTest.1.inc.fixed | 43 + .../Tests/Commenting/FileCommentUnitTest.1.js | 40 + .../Commenting/FileCommentUnitTest.1.js.fixed | 40 + .../Commenting/FileCommentUnitTest.2.inc | 11 + .../Tests/Commenting/FileCommentUnitTest.2.js | 10 + .../Commenting/FileCommentUnitTest.3.inc | 9 + .../Commenting/FileCommentUnitTest.4.inc | 3 + .../Commenting/FileCommentUnitTest.5.inc | 4 + .../Commenting/FileCommentUnitTest.6.inc | 12 + .../Commenting/FileCommentUnitTest.7.inc | 12 + .../Commenting/FileCommentUnitTest.8.inc | 9 + .../Tests/Commenting/FileCommentUnitTest.php | 75 + .../FunctionCommentThrowTagUnitTest.inc | 511 +++ .../FunctionCommentThrowTagUnitTest.php | 60 + .../Commenting/FunctionCommentUnitTest.inc | 1043 ++++++ .../FunctionCommentUnitTest.inc.fixed | 1043 ++++++ .../Commenting/FunctionCommentUnitTest.php | 177 + .../Commenting/InlineCommentUnitTest.inc | 175 + .../InlineCommentUnitTest.inc.fixed | 168 + .../Tests/Commenting/InlineCommentUnitTest.js | 129 + .../Commenting/InlineCommentUnitTest.js.fixed | 125 + .../Commenting/InlineCommentUnitTest.php | 91 + .../LongConditionClosingCommentUnitTest.inc | 1033 ++++++ ...gConditionClosingCommentUnitTest.inc.fixed | 1033 ++++++ .../LongConditionClosingCommentUnitTest.js | 444 +++ ...ngConditionClosingCommentUnitTest.js.fixed | 444 +++ .../LongConditionClosingCommentUnitTest.php | 103 + .../PostStatementCommentUnitTest.1.js | 36 + .../PostStatementCommentUnitTest.1.js.fixed | 39 + .../PostStatementCommentUnitTest.2.js | 2 + .../PostStatementCommentUnitTest.inc | 54 + .../PostStatementCommentUnitTest.inc.fixed | 59 + .../PostStatementCommentUnitTest.php | 69 + .../Commenting/VariableCommentUnitTest.inc | 385 ++ .../VariableCommentUnitTest.inc.fixed | 385 ++ .../Commenting/VariableCommentUnitTest.php | 81 + .../ControlSignatureUnitTest.inc | 310 ++ .../ControlSignatureUnitTest.inc.fixed | 314 ++ .../ControlSignatureUnitTest.js | 135 + .../ControlSignatureUnitTest.js.fixed | 141 + .../ControlSignatureUnitTest.php | 102 + .../ElseIfDeclarationUnitTest.inc | 14 + .../ElseIfDeclarationUnitTest.inc.fixed | 14 + .../ElseIfDeclarationUnitTest.php | 51 + .../ForEachLoopDeclarationUnitTest.inc | 36 + .../ForEachLoopDeclarationUnitTest.inc.fixed | 36 + .../ForEachLoopDeclarationUnitTest.php | 56 + .../ForLoopDeclarationUnitTest.inc | 129 + .../ForLoopDeclarationUnitTest.inc.fixed | 95 + .../ForLoopDeclarationUnitTest.js | 125 + .../ForLoopDeclarationUnitTest.js.fixed | 91 + .../ForLoopDeclarationUnitTest.php | 132 + .../InlineIfDeclarationUnitTest.inc | 48 + .../InlineIfDeclarationUnitTest.inc.fixed | 48 + .../InlineIfDeclarationUnitTest.php | 75 + .../LowercaseDeclarationUnitTest.inc | 24 + .../LowercaseDeclarationUnitTest.inc.fixed | 24 + .../LowercaseDeclarationUnitTest.php | 61 + .../SwitchDeclarationUnitTest.inc | 333 ++ .../SwitchDeclarationUnitTest.inc.fixed | 342 ++ .../SwitchDeclarationUnitTest.js | 287 ++ .../SwitchDeclarationUnitTest.php | 152 + .../Squiz/Tests/Debug/JSLintUnitTest.js | 2 + .../Squiz/Tests/Debug/JSLintUnitTest.php | 69 + .../Tests/Debug/JavaScriptLintUnitTest.js | 2 + .../Tests/Debug/JavaScriptLintUnitTest.php | 66 + .../Tests/Files/FileExtensionUnitTest.1.inc | 3 + .../Tests/Files/FileExtensionUnitTest.2.inc | 3 + .../Tests/Files/FileExtensionUnitTest.3.inc | 3 + .../Tests/Files/FileExtensionUnitTest.4.inc | 3 + .../Tests/Files/FileExtensionUnitTest.php | 55 + .../Formatting/OperatorBracketUnitTest.inc | 195 + .../OperatorBracketUnitTest.inc.fixed | 195 + .../Formatting/OperatorBracketUnitTest.js | 118 + .../OperatorBracketUnitTest.js.fixed | 118 + .../Formatting/OperatorBracketUnitTest.php | 117 + ...tionDeclarationArgumentSpacingUnitTest.inc | 111 + ...clarationArgumentSpacingUnitTest.inc.fixed | 111 + ...tionDeclarationArgumentSpacingUnitTest.php | 86 + .../Functions/FunctionDeclarationUnitTest.inc | 75 + .../Functions/FunctionDeclarationUnitTest.php | 51 + .../FunctionDuplicateArgumentUnitTest.inc | 6 + .../FunctionDuplicateArgumentUnitTest.php | 52 + .../Functions/GlobalFunctionUnitTest.inc | 17 + .../Functions/GlobalFunctionUnitTest.php | 48 + .../LowercaseFunctionKeywordsUnitTest.inc | 28 + ...owercaseFunctionKeywordsUnitTest.inc.fixed | 28 + .../LowercaseFunctionKeywordsUnitTest.php | 58 + .../MultiLineFunctionDeclarationUnitTest.inc | 257 ++ ...iLineFunctionDeclarationUnitTest.inc.fixed | 269 ++ .../MultiLineFunctionDeclarationUnitTest.js | 73 + ...tiLineFunctionDeclarationUnitTest.js.fixed | 81 + .../MultiLineFunctionDeclarationUnitTest.php | 113 + .../ValidFunctionNameUnitTest.inc | 27 + .../ValidFunctionNameUnitTest.php | 59 + .../ValidVariableNameUnitTest.inc | 148 + .../ValidVariableNameUnitTest.php | 86 + .../DisallowObjectStringIndexUnitTest.js | 37 + .../DisallowObjectStringIndexUnitTest.php | 59 + .../Objects/ObjectInstantiationUnitTest.inc | 46 + .../Objects/ObjectInstantiationUnitTest.php | 53 + .../Objects/ObjectMemberCommaUnitTest.js | 47 + .../ObjectMemberCommaUnitTest.js.fixed | 47 + .../Objects/ObjectMemberCommaUnitTest.php | 53 + .../ComparisonOperatorUsageUnitTest.inc | 138 + .../ComparisonOperatorUsageUnitTest.js | 71 + .../ComparisonOperatorUsageUnitTest.php | 101 + .../IncrementDecrementUsageUnitTest.inc | 42 + .../IncrementDecrementUsageUnitTest.php | 60 + .../ValidLogicalOperatorsUnitTest.inc | 28 + .../ValidLogicalOperatorsUnitTest.php | 52 + .../Tests/PHP/CommentedOutCodeUnitTest.css | 23 + .../Tests/PHP/CommentedOutCodeUnitTest.inc | 158 + .../Tests/PHP/CommentedOutCodeUnitTest.php | 76 + .../PHP/DisallowBooleanStatementUnitTest.inc | 27 + .../PHP/DisallowBooleanStatementUnitTest.php | 53 + .../DisallowComparisonAssignmentUnitTest.inc | 73 + .../DisallowComparisonAssignmentUnitTest.php | 59 + .../Tests/PHP/DisallowInlineIfUnitTest.inc | 18 + .../Tests/PHP/DisallowInlineIfUnitTest.js | 2 + .../Tests/PHP/DisallowInlineIfUnitTest.php | 63 + .../DisallowMultipleAssignmentsUnitTest.inc | 110 + .../DisallowMultipleAssignmentsUnitTest.php | 58 + .../DisallowSizeFunctionsInLoopsUnitTest.inc | 58 + .../DisallowSizeFunctionsInLoopsUnitTest.js | 13 + .../DisallowSizeFunctionsInLoopsUnitTest.php | 73 + .../PHP/DiscouragedFunctionsUnitTest.inc | 5 + .../PHP/DiscouragedFunctionsUnitTest.php | 52 + .../Squiz/Tests/PHP/EmbeddedPhpUnitTest.inc | 119 + .../Tests/PHP/EmbeddedPhpUnitTest.inc.fixed | 119 + .../Squiz/Tests/PHP/EmbeddedPhpUnitTest.php | 78 + .../Squiz/Tests/PHP/EvalUnitTest.inc | 5 + .../Squiz/Tests/PHP/EvalUnitTest.php | 51 + .../Squiz/Tests/PHP/GlobalKeywordUnitTest.inc | 13 + .../Squiz/Tests/PHP/GlobalKeywordUnitTest.php | 51 + .../Squiz/Tests/PHP/HeredocUnitTest.inc | 27 + .../Squiz/Tests/PHP/HeredocUnitTest.php | 51 + .../Tests/PHP/InnerFunctionsUnitTest.inc | 50 + .../Tests/PHP/InnerFunctionsUnitTest.php | 51 + .../PHP/LowercasePHPFunctionsUnitTest.inc | 43 + .../LowercasePHPFunctionsUnitTest.inc.fixed | 43 + .../PHP/LowercasePHPFunctionsUnitTest.php | 55 + .../Tests/PHP/NonExecutableCodeUnitTest.1.inc | 301 ++ .../Tests/PHP/NonExecutableCodeUnitTest.2.inc | 55 + .../Tests/PHP/NonExecutableCodeUnitTest.php | 97 + .../Tests/Scope/MemberVarScopeUnitTest.inc | 72 + .../Tests/Scope/MemberVarScopeUnitTest.php | 57 + .../Squiz/Tests/Scope/MethodScopeUnitTest.inc | 42 + .../Squiz/Tests/Scope/MethodScopeUnitTest.php | 52 + .../Tests/Scope/StaticThisUsageUnitTest.inc | 117 + .../Tests/Scope/StaticThisUsageUnitTest.php | 61 + .../Strings/ConcatenationSpacingUnitTest.inc | 49 + .../ConcatenationSpacingUnitTest.inc.fixed | 47 + .../Strings/ConcatenationSpacingUnitTest.php | 66 + .../Strings/DoubleQuoteUsageUnitTest.inc | 37 + .../DoubleQuoteUsageUnitTest.inc.fixed | 37 + .../Strings/DoubleQuoteUsageUnitTest.php | 62 + .../Tests/Strings/EchoedStringsUnitTest.inc | 13 + .../Strings/EchoedStringsUnitTest.inc.fixed | 13 + .../Tests/Strings/EchoedStringsUnitTest.php | 55 + .../Tests/WhiteSpace/CastSpacingUnitTest.inc | 9 + .../WhiteSpace/CastSpacingUnitTest.inc.fixed | 9 + .../Tests/WhiteSpace/CastSpacingUnitTest.php | 54 + .../ControlStructureSpacingUnitTest.inc | 263 ++ .../ControlStructureSpacingUnitTest.inc.fixed | 255 ++ .../ControlStructureSpacingUnitTest.js | 93 + .../ControlStructureSpacingUnitTest.js.fixed | 93 + .../ControlStructureSpacingUnitTest.php | 103 + .../FunctionClosingBraceSpaceUnitTest.inc | 39 + ...unctionClosingBraceSpaceUnitTest.inc.fixed | 45 + .../FunctionClosingBraceSpaceUnitTest.js | 132 + ...FunctionClosingBraceSpaceUnitTest.js.fixed | 133 + .../FunctionClosingBraceSpaceUnitTest.php | 76 + .../FunctionOpeningBraceSpaceUnitTest.inc | 54 + ...unctionOpeningBraceSpaceUnitTest.inc.fixed | 49 + .../FunctionOpeningBraceSpaceUnitTest.js | 115 + ...FunctionOpeningBraceSpaceUnitTest.js.fixed | 109 + .../FunctionOpeningBraceSpaceUnitTest.php | 68 + .../WhiteSpace/FunctionSpacingUnitTest.1.inc | 576 +++ .../FunctionSpacingUnitTest.1.inc.fixed | 658 ++++ .../WhiteSpace/FunctionSpacingUnitTest.2.inc | 5 + .../FunctionSpacingUnitTest.2.inc.fixed | 7 + .../WhiteSpace/FunctionSpacingUnitTest.3.inc | 10 + .../FunctionSpacingUnitTest.3.inc.fixed | 7 + .../WhiteSpace/FunctionSpacingUnitTest.4.inc | 7 + .../WhiteSpace/FunctionSpacingUnitTest.5.inc | 8 + .../FunctionSpacingUnitTest.5.inc.fixed | 10 + .../WhiteSpace/FunctionSpacingUnitTest.6.inc | 13 + .../FunctionSpacingUnitTest.6.inc.fixed | 10 + .../WhiteSpace/FunctionSpacingUnitTest.7.inc | 10 + .../WhiteSpace/FunctionSpacingUnitTest.php | 134 + .../LanguageConstructSpacingUnitTest.inc | 43 + ...LanguageConstructSpacingUnitTest.inc.fixed | 41 + .../LanguageConstructSpacingUnitTest.php | 60 + .../LogicalOperatorSpacingUnitTest.inc | 19 + .../LogicalOperatorSpacingUnitTest.inc.fixed | 19 + .../LogicalOperatorSpacingUnitTest.js | 19 + .../LogicalOperatorSpacingUnitTest.js.fixed | 19 + .../LogicalOperatorSpacingUnitTest.php | 56 + .../WhiteSpace/MemberVarSpacingUnitTest.inc | 367 ++ .../MemberVarSpacingUnitTest.inc.fixed | 352 ++ .../WhiteSpace/MemberVarSpacingUnitTest.php | 85 + .../ObjectOperatorSpacingUnitTest.inc | 52 + .../ObjectOperatorSpacingUnitTest.inc.fixed | 48 + .../ObjectOperatorSpacingUnitTest.php | 68 + .../WhiteSpace/OperatorSpacingUnitTest.inc | 481 +++ .../OperatorSpacingUnitTest.inc.fixed | 475 +++ .../WhiteSpace/OperatorSpacingUnitTest.js | 103 + .../OperatorSpacingUnitTest.js.fixed | 97 + .../WhiteSpace/OperatorSpacingUnitTest.php | 170 + .../PropertyLabelSpacingUnitTest.js | 40 + .../PropertyLabelSpacingUnitTest.js.fixed | 39 + .../PropertyLabelSpacingUnitTest.php | 55 + .../WhiteSpace/ScopeClosingBraceUnitTest.inc | 122 + .../ScopeClosingBraceUnitTest.inc.fixed | 125 + .../WhiteSpace/ScopeClosingBraceUnitTest.php | 57 + .../ScopeKeywordSpacingUnitTest.inc | 128 + .../ScopeKeywordSpacingUnitTest.inc.fixed | 122 + .../ScopeKeywordSpacingUnitTest.php | 67 + .../WhiteSpace/SemicolonSpacingUnitTest.inc | 42 + .../SemicolonSpacingUnitTest.inc.fixed | 41 + .../WhiteSpace/SemicolonSpacingUnitTest.js | 25 + .../SemicolonSpacingUnitTest.js.fixed | 25 + .../WhiteSpace/SemicolonSpacingUnitTest.php | 83 + .../SuperfluousWhitespaceUnitTest.1.css | 25 + .../SuperfluousWhitespaceUnitTest.1.css.fixed | 23 + .../SuperfluousWhitespaceUnitTest.1.inc | 74 + .../SuperfluousWhitespaceUnitTest.1.inc.fixed | 68 + .../SuperfluousWhitespaceUnitTest.1.js | 56 + .../SuperfluousWhitespaceUnitTest.1.js.fixed | 50 + .../SuperfluousWhitespaceUnitTest.2.css | 3 + .../SuperfluousWhitespaceUnitTest.2.css.fixed | 3 + .../SuperfluousWhitespaceUnitTest.2.inc | 9 + .../SuperfluousWhitespaceUnitTest.2.inc.fixed | 7 + .../SuperfluousWhitespaceUnitTest.2.js | 1 + .../SuperfluousWhitespaceUnitTest.2.js.fixed | 1 + .../SuperfluousWhitespaceUnitTest.3.css | 3 + .../SuperfluousWhitespaceUnitTest.3.css.fixed | 3 + .../SuperfluousWhitespaceUnitTest.3.inc | 14 + .../SuperfluousWhitespaceUnitTest.3.inc.fixed | 5 + .../SuperfluousWhitespaceUnitTest.3.js | 1 + .../SuperfluousWhitespaceUnitTest.3.js.fixed | 1 + .../SuperfluousWhitespaceUnitTest.4.inc | 4 + .../SuperfluousWhitespaceUnitTest.4.inc.fixed | 4 + .../SuperfluousWhitespaceUnitTest.5.inc | 5 + .../SuperfluousWhitespaceUnitTest.5.inc.fixed | 4 + .../SuperfluousWhitespaceUnitTest.php | 113 + .../src/Standards/Squiz/ruleset.xml | 132 + .../Zend/Docs/Debug/CodeAnalyzerStandard.xml | 25 + .../Zend/Docs/Files/ClosingTagStandard.xml | 22 + .../ValidVariableNameStandard.xml | 37 + .../Zend/Sniffs/Debug/CodeAnalyzerSniff.php | 98 + .../Zend/Sniffs/Files/ClosingTagSniff.php | 79 + .../ValidVariableNameSniff.php | 196 + .../Zend/Tests/Debug/CodeAnalyzerUnitTest.inc | 6 + .../Zend/Tests/Debug/CodeAnalyzerUnitTest.php | 66 + .../Zend/Tests/Files/ClosingTagUnitTest.1.inc | 12 + .../Files/ClosingTagUnitTest.1.inc.fixed | 12 + .../Zend/Tests/Files/ClosingTagUnitTest.2.inc | 3 + .../Zend/Tests/Files/ClosingTagUnitTest.3.inc | 1 + .../Files/ClosingTagUnitTest.3.inc.fixed | 1 + .../Zend/Tests/Files/ClosingTagUnitTest.4.inc | 1 + .../Files/ClosingTagUnitTest.4.inc.fixed | 1 + .../Zend/Tests/Files/ClosingTagUnitTest.5.inc | 1 + .../Files/ClosingTagUnitTest.5.inc.fixed | 1 + .../Zend/Tests/Files/ClosingTagUnitTest.6.inc | 3 + .../Files/ClosingTagUnitTest.6.inc.fixed | 3 + .../Zend/Tests/Files/ClosingTagUnitTest.7.inc | 1 + .../Files/ClosingTagUnitTest.7.inc.fixed | 1 + .../Zend/Tests/Files/ClosingTagUnitTest.php | 65 + .../ValidVariableNameUnitTest.inc | 122 + .../ValidVariableNameUnitTest.php | 94 + .../src/Standards/Zend/ruleset.xml | 32 + .../php_codesniffer/src/Tokenizers/CSS.php | 537 +++ .../src/Tokenizers/Comment.php | 277 ++ .../php_codesniffer/src/Tokenizers/JS.php | 1256 +++++++ .../php_codesniffer/src/Tokenizers/PHP.php | 3289 +++++++++++++++++ .../src/Tokenizers/Tokenizer.php | 1732 +++++++++ .../php_codesniffer/src/Util/Cache.php | 351 ++ .../php_codesniffer/src/Util/Common.php | 570 +++ .../php_codesniffer/src/Util/Standards.php | 334 ++ .../php_codesniffer/src/Util/Timing.php | 86 + .../php_codesniffer/src/Util/Tokens.php | 716 ++++ .../php_codesniffer/tests/AllTests.php | 64 + .../tests/Core/AbstractMethodUnitTest.php | 140 + .../php_codesniffer/tests/Core/AllTests.php | 63 + .../Autoloader/DetermineLoadedClassTest.php | 118 + .../tests/Core/Autoloader/TestFiles/A.inc | 3 + .../tests/Core/Autoloader/TestFiles/B.inc | 4 + .../tests/Core/Autoloader/TestFiles/C.inc | 4 + .../tests/Core/Autoloader/TestFiles/Sub/C.inc | 5 + .../tests/Core/ErrorSuppressionTest.php | 1247 +++++++ .../Core/File/FindEndOfStatementTest.inc | 105 + .../Core/File/FindEndOfStatementTest.php | 415 +++ .../Core/File/FindExtendedClassNameTest.inc | 37 + .../Core/File/FindExtendedClassNameTest.php | 93 + .../FindImplementedInterfaceNamesTest.inc | 26 + .../FindImplementedInterfaceNamesTest.php | 89 + .../Core/File/FindStartOfStatementTest.inc | 123 + .../Core/File/FindStartOfStatementTest.php | 503 +++ .../Core/File/GetMemberPropertiesTest.inc | 258 ++ .../Core/File/GetMemberPropertiesTest.php | 705 ++++ .../Core/File/GetMethodParametersTest.inc | 142 + .../Core/File/GetMethodParametersTest.php | 969 +++++ .../Core/File/GetMethodPropertiesTest.inc | 128 + .../Core/File/GetMethodPropertiesTest.php | 749 ++++ .../tests/Core/File/IsReferenceTest.inc | 150 + .../tests/Core/File/IsReferenceTest.php | 248 ++ .../tests/Core/Filters/Filter/AcceptTest.php | 154 + .../tests/Core/Filters/Filter/AcceptTest.xml | 16 + .../tests/Core/IsCamelCapsTest.php | 135 + .../RuleInclusionAbsoluteLinuxTest.php | 118 + .../RuleInclusionAbsoluteLinuxTest.xml | 11 + .../RuleInclusionAbsoluteWindowsTest.php | 119 + .../RuleInclusionAbsoluteWindowsTest.xml | 11 + .../Ruleset/RuleInclusionTest-include.xml | 10 + .../tests/Core/Ruleset/RuleInclusionTest.php | 297 ++ .../tests/Core/Ruleset/RuleInclusionTest.xml | 46 + .../Core/Sniffs/AbstractArraySniffTest.inc | 51 + .../Core/Sniffs/AbstractArraySniffTest.php | 290 ++ .../Sniffs/AbstractArraySniffTestable.php | 65 + .../AnonClassParenthesisOwnerTest.inc | 19 + .../AnonClassParenthesisOwnerTest.php | 144 + .../tests/Core/Tokenizer/ArrayKeywordTest.inc | 35 + .../tests/Core/Tokenizer/ArrayKeywordTest.php | 170 + .../tests/Core/Tokenizer/AttributesTest.inc | 90 + .../tests/Core/Tokenizer/AttributesTest.php | 659 ++++ .../Core/Tokenizer/BackfillFnTokenTest.inc | 198 + .../Core/Tokenizer/BackfillFnTokenTest.php | 802 ++++ .../Core/Tokenizer/BackfillMatchTokenTest.inc | 319 ++ .../Core/Tokenizer/BackfillMatchTokenTest.php | 529 +++ .../BackfillNumericSeparatorTest.inc | 82 + .../BackfillNumericSeparatorTest.php | 380 ++ .../tests/Core/Tokenizer/BitwiseOrTest.inc | 119 + .../tests/Core/Tokenizer/BitwiseOrTest.php | 133 + .../Core/Tokenizer/DefaultKeywordTest.inc | 203 + .../Core/Tokenizer/DefaultKeywordTest.php | 302 ++ .../tests/Core/Tokenizer/DoubleArrowTest.inc | 281 ++ .../tests/Core/Tokenizer/DoubleArrowTest.php | 237 ++ .../tests/Core/Tokenizer/FinallyTest.inc | 40 + .../tests/Core/Tokenizer/FinallyTest.php | 96 + .../tests/Core/Tokenizer/GotoLabelTest.inc | 53 + .../tests/Core/Tokenizer/GotoLabelTest.php | 171 + .../NamedFunctionCallArgumentsTest.inc | 398 ++ .../NamedFunctionCallArgumentsTest.php | 882 +++++ .../Tokenizer/NullsafeObjectOperatorTest.inc | 29 + .../Tokenizer/NullsafeObjectOperatorTest.php | 140 + .../ScopeSettingWithNamespaceOperatorTest.inc | 19 + .../ScopeSettingWithNamespaceOperatorTest.php | 98 + .../tests/Core/Tokenizer/ShortArrayTest.inc | 97 + .../tests/Core/Tokenizer/ShortArrayTest.php | 132 + .../Tokenizer/StableCommentWhitespaceTest.inc | 139 + .../Tokenizer/StableCommentWhitespaceTest.php | 1056 ++++++ .../StableCommentWhitespaceWinTest.inc | 63 + .../StableCommentWhitespaceWinTest.php | 367 ++ .../UndoNamespacedNameSingleTokenTest.inc | 147 + .../UndoNamespacedNameSingleTokenTest.php | 1295 +++++++ .../php_codesniffer/tests/FileList.php | 94 + .../tests/Standards/AbstractSniffUnitTest.php | 461 +++ .../tests/Standards/AllSniffs.php | 123 + .../php_codesniffer/tests/TestSuite.php | 35 + .../php_codesniffer/tests/TestSuite7.php | 35 + .../php_codesniffer/tests/bootstrap.php | 91 + 1500 files changed, 167017 insertions(+), 3572 deletions(-) create mode 100644 .vscode/settings.json create mode 100644 composer.json create mode 100644 composer.lock create mode 100644 vendor/autoload.php create mode 100755 vendor/bin/phpcbf create mode 100755 vendor/bin/phpcs create mode 100644 vendor/composer/ClassLoader.php create mode 100644 vendor/composer/InstalledVersions.php create mode 100644 vendor/composer/LICENSE create mode 100644 vendor/composer/autoload_classmap.php create mode 100644 vendor/composer/autoload_namespaces.php create mode 100644 vendor/composer/autoload_psr4.php create mode 100644 vendor/composer/autoload_real.php create mode 100644 vendor/composer/autoload_static.php create mode 100644 vendor/composer/installed.json create mode 100644 vendor/composer/installed.php create mode 100644 vendor/squizlabs/php_codesniffer/CONTRIBUTING.md create mode 100644 vendor/squizlabs/php_codesniffer/CodeSniffer.conf.dist create mode 100644 vendor/squizlabs/php_codesniffer/README.md create mode 100644 vendor/squizlabs/php_codesniffer/autoload.php create mode 100755 vendor/squizlabs/php_codesniffer/bin/phpcbf create mode 100644 vendor/squizlabs/php_codesniffer/bin/phpcbf.bat create mode 100755 vendor/squizlabs/php_codesniffer/bin/phpcs create mode 100755 vendor/squizlabs/php_codesniffer/bin/phpcs.bat create mode 100644 vendor/squizlabs/php_codesniffer/composer.json create mode 100644 vendor/squizlabs/php_codesniffer/licence.txt create mode 100644 vendor/squizlabs/php_codesniffer/phpcs.xsd create mode 100644 vendor/squizlabs/php_codesniffer/src/Config.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Exceptions/DeepExitException.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Exceptions/RuntimeException.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Exceptions/TokenizerException.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Files/DummyFile.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Files/File.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Files/FileList.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Files/LocalFile.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Filters/ExactMatch.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Filters/Filter.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Filters/GitModified.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Filters/GitStaged.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Fixer.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Generators/Generator.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Generators/HTML.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Generators/Markdown.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Generators/Text.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Reporter.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Reports/Cbf.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Reports/Checkstyle.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Reports/Code.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Reports/Csv.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Reports/Diff.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Reports/Emacs.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Reports/Full.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Reports/Gitblame.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Reports/Hgblame.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Reports/Info.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Reports/Json.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Reports/Junit.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Reports/Notifysend.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Reports/Report.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Reports/Source.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Reports/Summary.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Reports/Svnblame.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Reports/VersionControl.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Reports/Xml.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Ruleset.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Runner.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Sniffs/AbstractArraySniff.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Sniffs/AbstractPatternSniff.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Sniffs/AbstractScopeSniff.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Sniffs/AbstractVariableSniff.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Sniffs/Sniff.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Docs/Arrays/DisallowLongArraySyntaxStandard.xml create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Docs/Arrays/DisallowShortArraySyntaxStandard.xml create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Docs/Classes/DuplicateClassNameStandard.xml create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Docs/Classes/OpeningBraceSameLineStandard.xml create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Docs/CodeAnalysis/AssignmentInConditionStandard.xml create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Docs/CodeAnalysis/EmptyStatementStandard.xml create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Docs/CodeAnalysis/ForLoopShouldBeWhileLoopStandard.xml create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Docs/CodeAnalysis/ForLoopWithTestFunctionCallStandard.xml create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Docs/CodeAnalysis/JumbledIncrementerStandard.xml create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Docs/CodeAnalysis/UnconditionalIfStatementStandard.xml create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Docs/CodeAnalysis/UnnecessaryFinalModifierStandard.xml create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Docs/CodeAnalysis/UnusedFunctionParameterStandard.xml create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Docs/CodeAnalysis/UselessOverridingMethodStandard.xml create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Docs/Commenting/FixmeStandard.xml create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Docs/Commenting/TodoStandard.xml create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Docs/ControlStructures/DisallowYodaConditionsStandard.xml create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Docs/ControlStructures/InlineControlStructureStandard.xml create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Docs/Debug/CSSLintStandard.xml create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Docs/Debug/ClosureLinterStandard.xml create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Docs/Debug/JSHintStandard.xml create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Docs/Files/ByteOrderMarkStandard.xml create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Docs/Files/EndFileNewlineStandard.xml create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Docs/Files/EndFileNoNewlineStandard.xml create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Docs/Files/ExecutableFileStandard.xml create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Docs/Files/InlineHTMLStandard.xml create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Docs/Files/LineEndingsStandard.xml create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Docs/Files/LineLengthStandard.xml create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Docs/Files/LowercasedFilenameStandard.xml create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Docs/Files/OneClassPerFileStandard.xml create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Docs/Files/OneInterfacePerFileStandard.xml create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Docs/Files/OneObjectStructurePerFileStandard.xml create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Docs/Files/OneTraitPerFileStandard.xml create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Docs/Formatting/DisallowMultipleStatementsStandard.xml create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Docs/Formatting/MultipleStatementAlignmentStandard.xml create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Docs/Formatting/NoSpaceAfterCastStandard.xml create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Docs/Formatting/SpaceAfterCastStandard.xml create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Docs/Formatting/SpaceAfterNotStandard.xml create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Docs/Functions/CallTimePassByReferenceStandard.xml create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Docs/Functions/FunctionCallArgumentSpacingStandard.xml create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Docs/Functions/OpeningFunctionBraceBsdAllmanStandard.xml create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Docs/Functions/OpeningFunctionBraceKernighanRitchieStandard.xml create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Docs/Metrics/CyclomaticComplexityStandard.xml create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Docs/Metrics/NestingLevelStandard.xml create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Docs/NamingConventions/AbstractClassNamePrefixStandard.xml create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Docs/NamingConventions/CamelCapsFunctionNameStandard.xml create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Docs/NamingConventions/ConstructorNameStandard.xml create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Docs/NamingConventions/InterfaceNameSuffixStandard.xml create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Docs/NamingConventions/TraitNameSuffixStandard.xml create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Docs/NamingConventions/UpperCaseConstantNameStandard.xml create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Docs/PHP/BacktickOperatorStandard.xml create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Docs/PHP/CharacterBeforePHPOpeningTagStandard.xml create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Docs/PHP/ClosingPHPTagStandard.xml create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Docs/PHP/DeprecatedFunctionsStandard.xml create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Docs/PHP/DisallowAlternativePHPTagsStandard.xml create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Docs/PHP/DisallowRequestSuperglobalStandard.xml create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Docs/PHP/DisallowShortOpenTagStandard.xml create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Docs/PHP/DiscourageGotoStandard.xml create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Docs/PHP/ForbiddenFunctionsStandard.xml create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Docs/PHP/LowerCaseConstantStandard.xml create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Docs/PHP/LowerCaseKeywordStandard.xml create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Docs/PHP/LowerCaseTypeStandard.xml create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Docs/PHP/NoSilencedErrorsStandard.xml create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Docs/PHP/SAPIUsageStandard.xml create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Docs/PHP/UpperCaseConstantStandard.xml create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Docs/Strings/UnnecessaryStringConcatStandard.xml create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Docs/VersionControl/SubversionPropertiesStandard.xml create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Docs/WhiteSpace/ArbitraryParenthesesSpacingStandard.xml create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Docs/WhiteSpace/DisallowSpaceIndentStandard.xml create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Docs/WhiteSpace/DisallowTabIndentStandard.xml create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Docs/WhiteSpace/ScopeIndentStandard.xml create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Docs/WhiteSpace/SpreadOperatorSpacingAfterStandard.xml create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Sniffs/Arrays/ArrayIndentSniff.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Sniffs/Arrays/DisallowLongArraySyntaxSniff.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Sniffs/Arrays/DisallowShortArraySyntaxSniff.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Sniffs/Classes/DuplicateClassNameSniff.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Sniffs/Classes/OpeningBraceSameLineSniff.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Sniffs/CodeAnalysis/AssignmentInConditionSniff.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Sniffs/CodeAnalysis/EmptyPHPStatementSniff.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Sniffs/CodeAnalysis/EmptyStatementSniff.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Sniffs/CodeAnalysis/ForLoopShouldBeWhileLoopSniff.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Sniffs/CodeAnalysis/ForLoopWithTestFunctionCallSniff.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Sniffs/CodeAnalysis/JumbledIncrementerSniff.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Sniffs/CodeAnalysis/UnconditionalIfStatementSniff.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Sniffs/CodeAnalysis/UnnecessaryFinalModifierSniff.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Sniffs/CodeAnalysis/UnusedFunctionParameterSniff.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Sniffs/CodeAnalysis/UselessOverridingMethodSniff.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Sniffs/Commenting/DocCommentSniff.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Sniffs/Commenting/FixmeSniff.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Sniffs/Commenting/TodoSniff.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Sniffs/ControlStructures/DisallowYodaConditionsSniff.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Sniffs/ControlStructures/InlineControlStructureSniff.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Sniffs/Debug/CSSLintSniff.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Sniffs/Debug/ClosureLinterSniff.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Sniffs/Debug/ESLintSniff.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Sniffs/Debug/JSHintSniff.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Sniffs/Files/ByteOrderMarkSniff.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Sniffs/Files/EndFileNewlineSniff.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Sniffs/Files/EndFileNoNewlineSniff.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Sniffs/Files/ExecutableFileSniff.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Sniffs/Files/InlineHTMLSniff.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Sniffs/Files/LineEndingsSniff.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Sniffs/Files/LineLengthSniff.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Sniffs/Files/LowercasedFilenameSniff.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Sniffs/Files/OneClassPerFileSniff.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Sniffs/Files/OneInterfacePerFileSniff.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Sniffs/Files/OneObjectStructurePerFileSniff.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Sniffs/Files/OneTraitPerFileSniff.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Sniffs/Formatting/DisallowMultipleStatementsSniff.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Sniffs/Formatting/MultipleStatementAlignmentSniff.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Sniffs/Formatting/NoSpaceAfterCastSniff.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Sniffs/Formatting/SpaceAfterCastSniff.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Sniffs/Formatting/SpaceAfterNotSniff.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Sniffs/Formatting/SpaceBeforeCastSniff.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Sniffs/Functions/CallTimePassByReferenceSniff.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Sniffs/Functions/FunctionCallArgumentSpacingSniff.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Sniffs/Functions/OpeningFunctionBraceBsdAllmanSniff.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Sniffs/Functions/OpeningFunctionBraceKernighanRitchieSniff.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Sniffs/Metrics/CyclomaticComplexitySniff.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Sniffs/Metrics/NestingLevelSniff.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Sniffs/NamingConventions/AbstractClassNamePrefixSniff.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Sniffs/NamingConventions/CamelCapsFunctionNameSniff.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Sniffs/NamingConventions/ConstructorNameSniff.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Sniffs/NamingConventions/InterfaceNameSuffixSniff.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Sniffs/NamingConventions/TraitNameSuffixSniff.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Sniffs/NamingConventions/UpperCaseConstantNameSniff.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Sniffs/PHP/BacktickOperatorSniff.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Sniffs/PHP/CharacterBeforePHPOpeningTagSniff.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Sniffs/PHP/ClosingPHPTagSniff.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Sniffs/PHP/DeprecatedFunctionsSniff.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Sniffs/PHP/DisallowAlternativePHPTagsSniff.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Sniffs/PHP/DisallowRequestSuperglobalSniff.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Sniffs/PHP/DisallowShortOpenTagSniff.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Sniffs/PHP/DiscourageGotoSniff.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Sniffs/PHP/ForbiddenFunctionsSniff.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Sniffs/PHP/LowerCaseConstantSniff.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Sniffs/PHP/LowerCaseKeywordSniff.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Sniffs/PHP/LowerCaseTypeSniff.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Sniffs/PHP/NoSilencedErrorsSniff.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Sniffs/PHP/RequireStrictTypesSniff.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Sniffs/PHP/SAPIUsageSniff.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Sniffs/PHP/SyntaxSniff.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Sniffs/PHP/UpperCaseConstantSniff.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Sniffs/Strings/UnnecessaryStringConcatSniff.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Sniffs/VersionControl/GitMergeConflictSniff.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Sniffs/VersionControl/SubversionPropertiesSniff.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Sniffs/WhiteSpace/ArbitraryParenthesesSpacingSniff.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Sniffs/WhiteSpace/DisallowSpaceIndentSniff.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Sniffs/WhiteSpace/DisallowTabIndentSniff.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Sniffs/WhiteSpace/IncrementDecrementSpacingSniff.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Sniffs/WhiteSpace/LanguageConstructSpacingSniff.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Sniffs/WhiteSpace/ScopeIndentSniff.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Sniffs/WhiteSpace/SpreadOperatorSpacingAfterSniff.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/Arrays/ArrayIndentUnitTest.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/Arrays/ArrayIndentUnitTest.inc.fixed create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/Arrays/ArrayIndentUnitTest.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/Arrays/DisallowLongArraySyntaxUnitTest.1.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/Arrays/DisallowLongArraySyntaxUnitTest.1.inc.fixed create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/Arrays/DisallowLongArraySyntaxUnitTest.2.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/Arrays/DisallowLongArraySyntaxUnitTest.2.inc.fixed create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/Arrays/DisallowLongArraySyntaxUnitTest.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/Arrays/DisallowShortArraySyntaxUnitTest.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/Arrays/DisallowShortArraySyntaxUnitTest.inc.fixed create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/Arrays/DisallowShortArraySyntaxUnitTest.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/Classes/DuplicateClassNameUnitTest.1.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/Classes/DuplicateClassNameUnitTest.2.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/Classes/DuplicateClassNameUnitTest.3.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/Classes/DuplicateClassNameUnitTest.4.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/Classes/DuplicateClassNameUnitTest.5.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/Classes/DuplicateClassNameUnitTest.6.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/Classes/DuplicateClassNameUnitTest.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/Classes/OpeningBraceSameLineUnitTest.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/Classes/OpeningBraceSameLineUnitTest.inc.fixed create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/Classes/OpeningBraceSameLineUnitTest.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/CodeAnalysis/AssignmentInConditionUnitTest.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/CodeAnalysis/AssignmentInConditionUnitTest.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/CodeAnalysis/EmptyPHPStatementUnitTest.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/CodeAnalysis/EmptyPHPStatementUnitTest.inc.fixed create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/CodeAnalysis/EmptyPHPStatementUnitTest.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/CodeAnalysis/EmptyStatementUnitTest.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/CodeAnalysis/EmptyStatementUnitTest.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/CodeAnalysis/ForLoopShouldBeWhileLoopUnitTest.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/CodeAnalysis/ForLoopShouldBeWhileLoopUnitTest.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/CodeAnalysis/ForLoopWithTestFunctionCallUnitTest.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/CodeAnalysis/ForLoopWithTestFunctionCallUnitTest.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/CodeAnalysis/JumbledIncrementerUnitTest.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/CodeAnalysis/JumbledIncrementerUnitTest.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/CodeAnalysis/UnconditionalIfStatementUnitTest.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/CodeAnalysis/UnconditionalIfStatementUnitTest.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/CodeAnalysis/UnnecessaryFinalModifierUnitTest.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/CodeAnalysis/UnnecessaryFinalModifierUnitTest.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/CodeAnalysis/UnusedFunctionParameterUnitTest.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/CodeAnalysis/UnusedFunctionParameterUnitTest.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/CodeAnalysis/UselessOverridingMethodUnitTest.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/CodeAnalysis/UselessOverridingMethodUnitTest.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/Commenting/DocCommentUnitTest.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/Commenting/DocCommentUnitTest.inc.fixed create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/Commenting/DocCommentUnitTest.js create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/Commenting/DocCommentUnitTest.js.fixed create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/Commenting/DocCommentUnitTest.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/Commenting/FixmeUnitTest.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/Commenting/FixmeUnitTest.js create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/Commenting/FixmeUnitTest.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/Commenting/TodoUnitTest.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/Commenting/TodoUnitTest.js create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/Commenting/TodoUnitTest.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/ControlStructures/DisallowYodaConditionsUnitTest.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/ControlStructures/DisallowYodaConditionsUnitTest.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/ControlStructures/InlineControlStructureUnitTest.1.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/ControlStructures/InlineControlStructureUnitTest.1.inc.fixed create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/ControlStructures/InlineControlStructureUnitTest.2.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/ControlStructures/InlineControlStructureUnitTest.3.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/ControlStructures/InlineControlStructureUnitTest.4.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/ControlStructures/InlineControlStructureUnitTest.5.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/ControlStructures/InlineControlStructureUnitTest.6.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/ControlStructures/InlineControlStructureUnitTest.7.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/ControlStructures/InlineControlStructureUnitTest.js create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/ControlStructures/InlineControlStructureUnitTest.js.fixed create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/ControlStructures/InlineControlStructureUnitTest.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/Debug/CSSLintUnitTest.css create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/Debug/CSSLintUnitTest.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/Debug/ClosureLinterUnitTest.js create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/Debug/ClosureLinterUnitTest.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/Debug/ESLintUnitTest.js create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/Debug/ESLintUnitTest.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/Debug/JSHintUnitTest.js create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/Debug/JSHintUnitTest.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/Files/ByteOrderMarkUnitTest.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/Files/ByteOrderMarkUnitTest.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/Files/EndFileNewlineUnitTest.1.css create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/Files/EndFileNewlineUnitTest.1.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/Files/EndFileNewlineUnitTest.1.js create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/Files/EndFileNewlineUnitTest.2.css create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/Files/EndFileNewlineUnitTest.2.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/Files/EndFileNewlineUnitTest.2.js create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/Files/EndFileNewlineUnitTest.3.css create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/Files/EndFileNewlineUnitTest.3.css.fixed create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/Files/EndFileNewlineUnitTest.3.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/Files/EndFileNewlineUnitTest.3.inc.fixed create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/Files/EndFileNewlineUnitTest.3.js create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/Files/EndFileNewlineUnitTest.3.js.fixed create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/Files/EndFileNewlineUnitTest.4.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/Files/EndFileNewlineUnitTest.4.inc.fixed create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/Files/EndFileNewlineUnitTest.5.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/Files/EndFileNewlineUnitTest.6.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/Files/EndFileNewlineUnitTest.6.inc.fixed create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/Files/EndFileNewlineUnitTest.7.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/Files/EndFileNewlineUnitTest.7.inc.fixed create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/Files/EndFileNewlineUnitTest.8.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/Files/EndFileNewlineUnitTest.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/Files/EndFileNoNewlineUnitTest.1.css create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/Files/EndFileNoNewlineUnitTest.1.css.fixed create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/Files/EndFileNoNewlineUnitTest.1.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/Files/EndFileNoNewlineUnitTest.1.inc.fixed create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/Files/EndFileNoNewlineUnitTest.1.js create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/Files/EndFileNoNewlineUnitTest.1.js.fixed create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/Files/EndFileNoNewlineUnitTest.10.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/Files/EndFileNoNewlineUnitTest.2.css create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/Files/EndFileNoNewlineUnitTest.2.css.fixed create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/Files/EndFileNoNewlineUnitTest.2.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/Files/EndFileNoNewlineUnitTest.2.inc.fixed create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/Files/EndFileNoNewlineUnitTest.2.js create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/Files/EndFileNoNewlineUnitTest.2.js.fixed create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/Files/EndFileNoNewlineUnitTest.3.css create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/Files/EndFileNoNewlineUnitTest.3.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/Files/EndFileNoNewlineUnitTest.3.js create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/Files/EndFileNoNewlineUnitTest.4.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/Files/EndFileNoNewlineUnitTest.5.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/Files/EndFileNoNewlineUnitTest.6.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/Files/EndFileNoNewlineUnitTest.6.inc.fixed create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/Files/EndFileNoNewlineUnitTest.7.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/Files/EndFileNoNewlineUnitTest.8.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/Files/EndFileNoNewlineUnitTest.8.inc.fixed create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/Files/EndFileNoNewlineUnitTest.9.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/Files/EndFileNoNewlineUnitTest.9.inc.fixed create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/Files/EndFileNoNewlineUnitTest.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/Files/ExecutableFileUnitTest.1.inc create mode 100755 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/Files/ExecutableFileUnitTest.2.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/Files/ExecutableFileUnitTest.3.inc create mode 100755 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/Files/ExecutableFileUnitTest.4.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/Files/ExecutableFileUnitTest.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/Files/InlineHTMLUnitTest.1.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/Files/InlineHTMLUnitTest.2.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/Files/InlineHTMLUnitTest.3.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/Files/InlineHTMLUnitTest.4.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/Files/InlineHTMLUnitTest.5.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/Files/InlineHTMLUnitTest.6.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/Files/InlineHTMLUnitTest.7.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/Files/InlineHTMLUnitTest.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/Files/LineEndingsUnitTest.1.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/Files/LineEndingsUnitTest.1.inc.fixed create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/Files/LineEndingsUnitTest.2.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/Files/LineEndingsUnitTest.2.inc.fixed create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/Files/LineEndingsUnitTest.css create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/Files/LineEndingsUnitTest.css.fixed create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/Files/LineEndingsUnitTest.js create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/Files/LineEndingsUnitTest.js.fixed create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/Files/LineEndingsUnitTest.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/Files/LineLengthUnitTest.1.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/Files/LineLengthUnitTest.2.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/Files/LineLengthUnitTest.3.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/Files/LineLengthUnitTest.4.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/Files/LineLengthUnitTest.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/Files/LowercasedFilenameUnitTest.1.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/Files/LowercasedFilenameUnitTest.2.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/Files/LowercasedFilenameUnitTest.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/Files/OneClassPerFileUnitTest.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/Files/OneClassPerFileUnitTest.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/Files/OneInterfacePerFileUnitTest.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/Files/OneInterfacePerFileUnitTest.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/Files/OneObjectStructurePerFileUnitTest.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/Files/OneObjectStructurePerFileUnitTest.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/Files/OneTraitPerFileUnitTest.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/Files/OneTraitPerFileUnitTest.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/Formatting/DisallowMultipleStatementsUnitTest.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/Formatting/DisallowMultipleStatementsUnitTest.inc.fixed create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/Formatting/DisallowMultipleStatementsUnitTest.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/Formatting/MultipleStatementAlignmentUnitTest.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/Formatting/MultipleStatementAlignmentUnitTest.inc.fixed create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/Formatting/MultipleStatementAlignmentUnitTest.js create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/Formatting/MultipleStatementAlignmentUnitTest.js.fixed create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/Formatting/MultipleStatementAlignmentUnitTest.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/Formatting/NoSpaceAfterCastUnitTest.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/Formatting/NoSpaceAfterCastUnitTest.inc.fixed create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/Formatting/NoSpaceAfterCastUnitTest.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/Formatting/SpaceAfterCastUnitTest.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/Formatting/SpaceAfterCastUnitTest.inc.fixed create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/Formatting/SpaceAfterCastUnitTest.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/Formatting/SpaceAfterNotUnitTest.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/Formatting/SpaceAfterNotUnitTest.inc.fixed create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/Formatting/SpaceAfterNotUnitTest.js create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/Formatting/SpaceAfterNotUnitTest.js.fixed create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/Formatting/SpaceAfterNotUnitTest.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/Formatting/SpaceBeforeCastUnitTest.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/Formatting/SpaceBeforeCastUnitTest.inc.fixed create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/Formatting/SpaceBeforeCastUnitTest.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/Functions/CallTimePassByReferenceUnitTest.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/Functions/CallTimePassByReferenceUnitTest.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/Functions/FunctionCallArgumentSpacingUnitTest.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/Functions/FunctionCallArgumentSpacingUnitTest.inc.fixed create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/Functions/FunctionCallArgumentSpacingUnitTest.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/Functions/OpeningFunctionBraceBsdAllmanUnitTest.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/Functions/OpeningFunctionBraceBsdAllmanUnitTest.inc.fixed create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/Functions/OpeningFunctionBraceBsdAllmanUnitTest.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/Functions/OpeningFunctionBraceKernighanRitchieUnitTest.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/Functions/OpeningFunctionBraceKernighanRitchieUnitTest.inc.fixed create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/Functions/OpeningFunctionBraceKernighanRitchieUnitTest.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/Metrics/CyclomaticComplexityUnitTest.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/Metrics/CyclomaticComplexityUnitTest.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/Metrics/NestingLevelUnitTest.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/Metrics/NestingLevelUnitTest.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/NamingConventions/AbstractClassNamePrefixUnitTest.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/NamingConventions/AbstractClassNamePrefixUnitTest.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/NamingConventions/CamelCapsFunctionNameUnitTest.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/NamingConventions/CamelCapsFunctionNameUnitTest.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/NamingConventions/ConstructorNameUnitTest.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/NamingConventions/ConstructorNameUnitTest.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/NamingConventions/InterfaceNameSuffixUnitTest.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/NamingConventions/InterfaceNameSuffixUnitTest.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/NamingConventions/TraitNameSuffixUnitTest.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/NamingConventions/TraitNameSuffixUnitTest.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/NamingConventions/UpperCaseConstantNameUnitTest.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/NamingConventions/UpperCaseConstantNameUnitTest.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/PHP/BacktickOperatorUnitTest.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/PHP/BacktickOperatorUnitTest.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/PHP/CharacterBeforePHPOpeningTagUnitTest.1.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/PHP/CharacterBeforePHPOpeningTagUnitTest.2.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/PHP/CharacterBeforePHPOpeningTagUnitTest.3.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/PHP/CharacterBeforePHPOpeningTagUnitTest.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/PHP/ClosingPHPTagUnitTest.1.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/PHP/ClosingPHPTagUnitTest.2.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/PHP/ClosingPHPTagUnitTest.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/PHP/DeprecatedFunctionsUnitTest.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/PHP/DeprecatedFunctionsUnitTest.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/PHP/DisallowAlternativePHPTagsUnitTest.1.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/PHP/DisallowAlternativePHPTagsUnitTest.1.inc.fixed create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/PHP/DisallowAlternativePHPTagsUnitTest.2.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/PHP/DisallowAlternativePHPTagsUnitTest.2.inc.fixed create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/PHP/DisallowAlternativePHPTagsUnitTest.3.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/PHP/DisallowAlternativePHPTagsUnitTest.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/PHP/DisallowRequestSuperglobalUnitTest.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/PHP/DisallowRequestSuperglobalUnitTest.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/PHP/DisallowShortOpenTagUnitTest.1.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/PHP/DisallowShortOpenTagUnitTest.1.inc.fixed create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/PHP/DisallowShortOpenTagUnitTest.2.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/PHP/DisallowShortOpenTagUnitTest.2.inc.fixed create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/PHP/DisallowShortOpenTagUnitTest.3.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/PHP/DisallowShortOpenTagUnitTest.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/PHP/DiscourageGotoUnitTest.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/PHP/DiscourageGotoUnitTest.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/PHP/ForbiddenFunctionsUnitTest.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/PHP/ForbiddenFunctionsUnitTest.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/PHP/LowerCaseConstantUnitTest.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/PHP/LowerCaseConstantUnitTest.inc.fixed create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/PHP/LowerCaseConstantUnitTest.js create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/PHP/LowerCaseConstantUnitTest.js.fixed create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/PHP/LowerCaseConstantUnitTest.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/PHP/LowerCaseKeywordUnitTest.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/PHP/LowerCaseKeywordUnitTest.inc.fixed create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/PHP/LowerCaseKeywordUnitTest.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/PHP/LowerCaseTypeUnitTest.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/PHP/LowerCaseTypeUnitTest.inc.fixed create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/PHP/LowerCaseTypeUnitTest.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/PHP/NoSilencedErrorsUnitTest.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/PHP/NoSilencedErrorsUnitTest.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/PHP/RequireStrictTypesUnitTest.1.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/PHP/RequireStrictTypesUnitTest.2.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/PHP/RequireStrictTypesUnitTest.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/PHP/SAPIUsageUnitTest.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/PHP/SAPIUsageUnitTest.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/PHP/SyntaxUnitTest.1.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/PHP/SyntaxUnitTest.2.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/PHP/SyntaxUnitTest.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/PHP/UpperCaseConstantUnitTest.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/PHP/UpperCaseConstantUnitTest.inc.fixed create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/PHP/UpperCaseConstantUnitTest.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/Strings/UnnecessaryStringConcatUnitTest.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/Strings/UnnecessaryStringConcatUnitTest.js create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/Strings/UnnecessaryStringConcatUnitTest.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/VersionControl/GitMergeConflictUnitTest.1.css create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/VersionControl/GitMergeConflictUnitTest.1.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/VersionControl/GitMergeConflictUnitTest.2.css create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/VersionControl/GitMergeConflictUnitTest.2.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/VersionControl/GitMergeConflictUnitTest.3.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/VersionControl/GitMergeConflictUnitTest.4.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/VersionControl/GitMergeConflictUnitTest.5.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/VersionControl/GitMergeConflictUnitTest.6.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/VersionControl/GitMergeConflictUnitTest.7.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/VersionControl/GitMergeConflictUnitTest.js create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/VersionControl/GitMergeConflictUnitTest.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/VersionControl/SubversionPropertiesUnitTest.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/VersionControl/SubversionPropertiesUnitTest.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/WhiteSpace/ArbitraryParenthesesSpacingUnitTest.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/WhiteSpace/ArbitraryParenthesesSpacingUnitTest.inc.fixed create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/WhiteSpace/ArbitraryParenthesesSpacingUnitTest.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/WhiteSpace/DisallowSpaceIndentUnitTest.1.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/WhiteSpace/DisallowSpaceIndentUnitTest.1.inc.fixed create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/WhiteSpace/DisallowSpaceIndentUnitTest.2.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/WhiteSpace/DisallowSpaceIndentUnitTest.2.inc.fixed create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/WhiteSpace/DisallowSpaceIndentUnitTest.3.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/WhiteSpace/DisallowSpaceIndentUnitTest.3.inc.fixed create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/WhiteSpace/DisallowSpaceIndentUnitTest.css create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/WhiteSpace/DisallowSpaceIndentUnitTest.css.fixed create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/WhiteSpace/DisallowSpaceIndentUnitTest.js create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/WhiteSpace/DisallowSpaceIndentUnitTest.js.fixed create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/WhiteSpace/DisallowSpaceIndentUnitTest.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/WhiteSpace/DisallowTabIndentUnitTest.1.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/WhiteSpace/DisallowTabIndentUnitTest.1.inc.fixed create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/WhiteSpace/DisallowTabIndentUnitTest.2.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/WhiteSpace/DisallowTabIndentUnitTest.2.inc.fixed create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/WhiteSpace/DisallowTabIndentUnitTest.css create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/WhiteSpace/DisallowTabIndentUnitTest.css.fixed create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/WhiteSpace/DisallowTabIndentUnitTest.js create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/WhiteSpace/DisallowTabIndentUnitTest.js.fixed create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/WhiteSpace/DisallowTabIndentUnitTest.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/WhiteSpace/IncrementDecrementSpacingUnitTest.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/WhiteSpace/IncrementDecrementSpacingUnitTest.inc.fixed create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/WhiteSpace/IncrementDecrementSpacingUnitTest.js create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/WhiteSpace/IncrementDecrementSpacingUnitTest.js.fixed create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/WhiteSpace/IncrementDecrementSpacingUnitTest.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/WhiteSpace/LanguageConstructSpacingUnitTest.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/WhiteSpace/LanguageConstructSpacingUnitTest.inc.fixed create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/WhiteSpace/LanguageConstructSpacingUnitTest.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/WhiteSpace/ScopeIndentUnitTest.1.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/WhiteSpace/ScopeIndentUnitTest.1.inc.fixed create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/WhiteSpace/ScopeIndentUnitTest.1.js create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/WhiteSpace/ScopeIndentUnitTest.1.js.fixed create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/WhiteSpace/ScopeIndentUnitTest.2.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/WhiteSpace/ScopeIndentUnitTest.2.inc.fixed create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/WhiteSpace/ScopeIndentUnitTest.3.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/WhiteSpace/ScopeIndentUnitTest.3.inc.fixed create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/WhiteSpace/ScopeIndentUnitTest.4.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/WhiteSpace/ScopeIndentUnitTest.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/WhiteSpace/SpreadOperatorSpacingAfterUnitTest.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/WhiteSpace/SpreadOperatorSpacingAfterUnitTest.inc.fixed create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/WhiteSpace/SpreadOperatorSpacingAfterUnitTest.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Generic/ruleset.xml create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/MySource/Sniffs/CSS/BrowserSpecificStylesSniff.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/MySource/Sniffs/Channels/DisallowSelfActionsSniff.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/MySource/Sniffs/Channels/IncludeOwnSystemSniff.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/MySource/Sniffs/Channels/IncludeSystemSniff.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/MySource/Sniffs/Channels/UnusedSystemSniff.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/MySource/Sniffs/Commenting/FunctionCommentSniff.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/MySource/Sniffs/Debug/DebugCodeSniff.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/MySource/Sniffs/Debug/FirebugConsoleSniff.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/MySource/Sniffs/Objects/AssignThisSniff.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/MySource/Sniffs/Objects/CreateWidgetTypeCallbackSniff.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/MySource/Sniffs/Objects/DisallowNewWidgetSniff.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/MySource/Sniffs/PHP/AjaxNullComparisonSniff.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/MySource/Sniffs/PHP/EvalObjectFactorySniff.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/MySource/Sniffs/PHP/GetRequestDataSniff.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/MySource/Sniffs/PHP/ReturnFunctionValueSniff.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/MySource/Sniffs/Strings/JoinStringsSniff.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/MySource/Tests/CSS/BrowserSpecificStylesUnitTest.css create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/MySource/Tests/CSS/BrowserSpecificStylesUnitTest.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/MySource/Tests/Channels/DisallowSelfActionsUnitTest.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/MySource/Tests/Channels/DisallowSelfActionsUnitTest.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/MySource/Tests/Channels/IncludeSystemUnitTest.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/MySource/Tests/Channels/IncludeSystemUnitTest.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/MySource/Tests/Channels/UnusedSystemUnitTest.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/MySource/Tests/Channels/UnusedSystemUnitTest.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/MySource/Tests/Commenting/FunctionCommentUnitTest.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/MySource/Tests/Commenting/FunctionCommentUnitTest.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/MySource/Tests/Debug/DebugCodeUnitTest.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/MySource/Tests/Debug/DebugCodeUnitTest.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/MySource/Tests/Debug/FirebugConsoleUnitTest.js create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/MySource/Tests/Debug/FirebugConsoleUnitTest.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/MySource/Tests/Objects/AssignThisUnitTest.js create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/MySource/Tests/Objects/AssignThisUnitTest.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/MySource/Tests/Objects/CreateWidgetTypeCallbackUnitTest.js create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/MySource/Tests/Objects/CreateWidgetTypeCallbackUnitTest.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/MySource/Tests/Objects/DisallowNewWidgetUnitTest.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/MySource/Tests/Objects/DisallowNewWidgetUnitTest.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/MySource/Tests/PHP/AjaxNullComparisonUnitTest.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/MySource/Tests/PHP/AjaxNullComparisonUnitTest.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/MySource/Tests/PHP/EvalObjectFactoryUnitTest.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/MySource/Tests/PHP/EvalObjectFactoryUnitTest.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/MySource/Tests/PHP/GetRequestDataUnitTest.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/MySource/Tests/PHP/GetRequestDataUnitTest.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/MySource/Tests/PHP/ReturnFunctionValueUnitTest.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/MySource/Tests/PHP/ReturnFunctionValueUnitTest.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/MySource/Tests/Strings/JoinStringsUnitTest.js create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/MySource/Tests/Strings/JoinStringsUnitTest.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/MySource/ruleset.xml create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/PEAR/Docs/Classes/ClassDeclarationStandard.xml create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/PEAR/Docs/Commenting/ClassCommentStandard.xml create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/PEAR/Docs/Commenting/FileCommentStandard.xml create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/PEAR/Docs/Commenting/FunctionCommentStandard.xml create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/PEAR/Docs/Commenting/InlineCommentStandard.xml create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/PEAR/Docs/ControlStructures/ControlSignatureStandard.xml create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/PEAR/Docs/ControlStructures/MultiLineConditionStandard.xml create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/PEAR/Docs/Files/IncludingFileStandard.xml create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/PEAR/Docs/Files/LineLengthStandard.xml create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/PEAR/Docs/Formatting/MultiLineAssignmentStandard.xml create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/PEAR/Docs/Functions/FunctionCallSignatureStandard.xml create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/PEAR/Docs/Functions/FunctionDeclarationStandard.xml create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/PEAR/Docs/Functions/ValidDefaultValueStandard.xml create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/PEAR/Docs/NamingConventions/ValidClassNameStandard.xml create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/PEAR/Docs/NamingConventions/ValidFunctionNameStandard.xml create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/PEAR/Docs/NamingConventions/ValidVariableNameStandard.xml create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/PEAR/Docs/WhiteSpace/ObjectOperatorIndentStandard.xml create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/PEAR/Docs/WhiteSpace/ScopeClosingBraceStandard.xml create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/PEAR/Docs/WhiteSpace/ScopeIndentStandard.xml create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/PEAR/Sniffs/Classes/ClassDeclarationSniff.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/PEAR/Sniffs/Commenting/ClassCommentSniff.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/PEAR/Sniffs/Commenting/FileCommentSniff.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/PEAR/Sniffs/Commenting/FunctionCommentSniff.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/PEAR/Sniffs/Commenting/InlineCommentSniff.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/PEAR/Sniffs/ControlStructures/ControlSignatureSniff.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/PEAR/Sniffs/ControlStructures/MultiLineConditionSniff.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/PEAR/Sniffs/Files/IncludingFileSniff.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/PEAR/Sniffs/Formatting/MultiLineAssignmentSniff.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/PEAR/Sniffs/Functions/FunctionCallSignatureSniff.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/PEAR/Sniffs/Functions/FunctionDeclarationSniff.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/PEAR/Sniffs/Functions/ValidDefaultValueSniff.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/PEAR/Sniffs/NamingConventions/ValidClassNameSniff.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/PEAR/Sniffs/NamingConventions/ValidFunctionNameSniff.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/PEAR/Sniffs/NamingConventions/ValidVariableNameSniff.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/PEAR/Sniffs/WhiteSpace/ObjectOperatorIndentSniff.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/PEAR/Sniffs/WhiteSpace/ScopeClosingBraceSniff.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/PEAR/Sniffs/WhiteSpace/ScopeIndentSniff.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/PEAR/Tests/Classes/ClassDeclarationUnitTest.1.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/PEAR/Tests/Classes/ClassDeclarationUnitTest.1.inc.fixed create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/PEAR/Tests/Classes/ClassDeclarationUnitTest.2.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/PEAR/Tests/Classes/ClassDeclarationUnitTest.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/PEAR/Tests/Commenting/ClassCommentUnitTest.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/PEAR/Tests/Commenting/ClassCommentUnitTest.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/PEAR/Tests/Commenting/FileCommentUnitTest.1.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/PEAR/Tests/Commenting/FileCommentUnitTest.2.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/PEAR/Tests/Commenting/FileCommentUnitTest.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/PEAR/Tests/Commenting/FunctionCommentUnitTest.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/PEAR/Tests/Commenting/FunctionCommentUnitTest.inc.fixed create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/PEAR/Tests/Commenting/FunctionCommentUnitTest.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/PEAR/Tests/Commenting/InlineCommentUnitTest.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/PEAR/Tests/Commenting/InlineCommentUnitTest.inc.fixed create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/PEAR/Tests/Commenting/InlineCommentUnitTest.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/PEAR/Tests/ControlStructures/ControlSignatureUnitTest.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/PEAR/Tests/ControlStructures/ControlSignatureUnitTest.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/PEAR/Tests/ControlStructures/MultiLineConditionUnitTest.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/PEAR/Tests/ControlStructures/MultiLineConditionUnitTest.inc.fixed create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/PEAR/Tests/ControlStructures/MultiLineConditionUnitTest.js create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/PEAR/Tests/ControlStructures/MultiLineConditionUnitTest.js.fixed create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/PEAR/Tests/ControlStructures/MultiLineConditionUnitTest.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/PEAR/Tests/Files/IncludingFileUnitTest.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/PEAR/Tests/Files/IncludingFileUnitTest.inc.fixed create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/PEAR/Tests/Files/IncludingFileUnitTest.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/PEAR/Tests/Formatting/MultiLineAssignmentUnitTest.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/PEAR/Tests/Formatting/MultiLineAssignmentUnitTest.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/PEAR/Tests/Functions/FunctionCallSignatureUnitTest.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/PEAR/Tests/Functions/FunctionCallSignatureUnitTest.inc.fixed create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/PEAR/Tests/Functions/FunctionCallSignatureUnitTest.js create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/PEAR/Tests/Functions/FunctionCallSignatureUnitTest.js.fixed create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/PEAR/Tests/Functions/FunctionCallSignatureUnitTest.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/PEAR/Tests/Functions/FunctionDeclarationUnitTest.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/PEAR/Tests/Functions/FunctionDeclarationUnitTest.inc.fixed create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/PEAR/Tests/Functions/FunctionDeclarationUnitTest.js create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/PEAR/Tests/Functions/FunctionDeclarationUnitTest.js.fixed create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/PEAR/Tests/Functions/FunctionDeclarationUnitTest.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/PEAR/Tests/Functions/ValidDefaultValueUnitTest.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/PEAR/Tests/Functions/ValidDefaultValueUnitTest.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/PEAR/Tests/NamingConventions/ValidClassNameUnitTest.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/PEAR/Tests/NamingConventions/ValidClassNameUnitTest.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/PEAR/Tests/NamingConventions/ValidFunctionNameUnitTest.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/PEAR/Tests/NamingConventions/ValidFunctionNameUnitTest.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/PEAR/Tests/NamingConventions/ValidVariableNameUnitTest.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/PEAR/Tests/NamingConventions/ValidVariableNameUnitTest.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/PEAR/Tests/WhiteSpace/ObjectOperatorIndentUnitTest.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/PEAR/Tests/WhiteSpace/ObjectOperatorIndentUnitTest.inc.fixed create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/PEAR/Tests/WhiteSpace/ObjectOperatorIndentUnitTest.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/PEAR/Tests/WhiteSpace/ScopeClosingBraceUnitTest.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/PEAR/Tests/WhiteSpace/ScopeClosingBraceUnitTest.inc.fixed create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/PEAR/Tests/WhiteSpace/ScopeClosingBraceUnitTest.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/PEAR/Tests/WhiteSpace/ScopeIndentUnitTest.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/PEAR/Tests/WhiteSpace/ScopeIndentUnitTest.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/PEAR/ruleset.xml create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/PSR1/Docs/Classes/ClassDeclarationStandard.xml create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/PSR1/Docs/Files/SideEffectsStandard.xml create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/PSR1/Docs/Methods/CamelCapsMethodNameStandard.xml create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/PSR1/Sniffs/Classes/ClassDeclarationSniff.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/PSR1/Sniffs/Files/SideEffectsSniff.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/PSR1/Sniffs/Methods/CamelCapsMethodNameSniff.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/PSR1/Tests/Classes/ClassDeclarationUnitTest.1.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/PSR1/Tests/Classes/ClassDeclarationUnitTest.2.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/PSR1/Tests/Classes/ClassDeclarationUnitTest.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/PSR1/Tests/Files/SideEffectsUnitTest.1.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/PSR1/Tests/Files/SideEffectsUnitTest.10.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/PSR1/Tests/Files/SideEffectsUnitTest.11.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/PSR1/Tests/Files/SideEffectsUnitTest.12.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/PSR1/Tests/Files/SideEffectsUnitTest.13.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/PSR1/Tests/Files/SideEffectsUnitTest.14.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/PSR1/Tests/Files/SideEffectsUnitTest.15.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/PSR1/Tests/Files/SideEffectsUnitTest.16.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/PSR1/Tests/Files/SideEffectsUnitTest.2.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/PSR1/Tests/Files/SideEffectsUnitTest.3.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/PSR1/Tests/Files/SideEffectsUnitTest.4.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/PSR1/Tests/Files/SideEffectsUnitTest.5.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/PSR1/Tests/Files/SideEffectsUnitTest.6.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/PSR1/Tests/Files/SideEffectsUnitTest.7.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/PSR1/Tests/Files/SideEffectsUnitTest.8.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/PSR1/Tests/Files/SideEffectsUnitTest.9.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/PSR1/Tests/Files/SideEffectsUnitTest.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/PSR1/Tests/Methods/CamelCapsMethodNameUnitTest.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/PSR1/Tests/Methods/CamelCapsMethodNameUnitTest.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/PSR1/ruleset.xml create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/PSR12/Docs/Classes/ClassInstantiationStandard.xml create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/PSR12/Docs/Functions/NullableTypeDeclarationStandard.xml create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/PSR12/Docs/Keywords/ShortFormTypeKeywordsStandard.xml create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/PSR12/Docs/Namespaces/CompoundNamespaceDepthStandard.xml create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/PSR12/Docs/Operators/OperatorSpacingStandard.xml create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/PSR12/Sniffs/Classes/AnonClassDeclarationSniff.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/PSR12/Sniffs/Classes/ClassInstantiationSniff.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/PSR12/Sniffs/Classes/ClosingBraceSniff.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/PSR12/Sniffs/Classes/OpeningBraceSpaceSniff.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/PSR12/Sniffs/ControlStructures/BooleanOperatorPlacementSniff.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/PSR12/Sniffs/ControlStructures/ControlStructureSpacingSniff.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/PSR12/Sniffs/Files/DeclareStatementSniff.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/PSR12/Sniffs/Files/FileHeaderSniff.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/PSR12/Sniffs/Files/ImportStatementSniff.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/PSR12/Sniffs/Files/OpenTagSniff.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/PSR12/Sniffs/Functions/NullableTypeDeclarationSniff.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/PSR12/Sniffs/Functions/ReturnTypeDeclarationSniff.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/PSR12/Sniffs/Keywords/ShortFormTypeKeywordsSniff.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/PSR12/Sniffs/Namespaces/CompoundNamespaceDepthSniff.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/PSR12/Sniffs/Operators/OperatorSpacingSniff.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/PSR12/Sniffs/Properties/ConstantVisibilitySniff.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/PSR12/Sniffs/Traits/UseDeclarationSniff.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/PSR12/Tests/Classes/AnonClassDeclarationUnitTest.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/PSR12/Tests/Classes/AnonClassDeclarationUnitTest.inc.fixed create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/PSR12/Tests/Classes/AnonClassDeclarationUnitTest.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/PSR12/Tests/Classes/ClassInstantiationUnitTest.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/PSR12/Tests/Classes/ClassInstantiationUnitTest.inc.fixed create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/PSR12/Tests/Classes/ClassInstantiationUnitTest.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/PSR12/Tests/Classes/ClosingBraceUnitTest.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/PSR12/Tests/Classes/ClosingBraceUnitTest.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/PSR12/Tests/Classes/OpeningBraceSpaceUnitTest.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/PSR12/Tests/Classes/OpeningBraceSpaceUnitTest.inc.fixed create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/PSR12/Tests/Classes/OpeningBraceSpaceUnitTest.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/PSR12/Tests/ControlStructures/BooleanOperatorPlacementUnitTest.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/PSR12/Tests/ControlStructures/BooleanOperatorPlacementUnitTest.inc.fixed create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/PSR12/Tests/ControlStructures/BooleanOperatorPlacementUnitTest.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/PSR12/Tests/ControlStructures/ControlStructureSpacingUnitTest.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/PSR12/Tests/ControlStructures/ControlStructureSpacingUnitTest.inc.fixed create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/PSR12/Tests/ControlStructures/ControlStructureSpacingUnitTest.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/PSR12/Tests/Files/DeclareStatementUnitTest.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/PSR12/Tests/Files/DeclareStatementUnitTest.inc.fixed create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/PSR12/Tests/Files/DeclareStatementUnitTest.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/PSR12/Tests/Files/FileHeaderUnitTest.1.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/PSR12/Tests/Files/FileHeaderUnitTest.10.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/PSR12/Tests/Files/FileHeaderUnitTest.10.inc.fixed create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/PSR12/Tests/Files/FileHeaderUnitTest.11.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/PSR12/Tests/Files/FileHeaderUnitTest.11.inc.fixed create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/PSR12/Tests/Files/FileHeaderUnitTest.12.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/PSR12/Tests/Files/FileHeaderUnitTest.12.inc.fixed create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/PSR12/Tests/Files/FileHeaderUnitTest.13.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/PSR12/Tests/Files/FileHeaderUnitTest.14.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/PSR12/Tests/Files/FileHeaderUnitTest.15.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/PSR12/Tests/Files/FileHeaderUnitTest.16.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/PSR12/Tests/Files/FileHeaderUnitTest.17.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/PSR12/Tests/Files/FileHeaderUnitTest.2.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/PSR12/Tests/Files/FileHeaderUnitTest.2.inc.fixed create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/PSR12/Tests/Files/FileHeaderUnitTest.3.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/PSR12/Tests/Files/FileHeaderUnitTest.4.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/PSR12/Tests/Files/FileHeaderUnitTest.4.inc.fixed create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/PSR12/Tests/Files/FileHeaderUnitTest.5.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/PSR12/Tests/Files/FileHeaderUnitTest.6.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/PSR12/Tests/Files/FileHeaderUnitTest.7.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/PSR12/Tests/Files/FileHeaderUnitTest.7.inc.fixed create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/PSR12/Tests/Files/FileHeaderUnitTest.8.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/PSR12/Tests/Files/FileHeaderUnitTest.9.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/PSR12/Tests/Files/FileHeaderUnitTest.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/PSR12/Tests/Files/ImportStatementUnitTest.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/PSR12/Tests/Files/ImportStatementUnitTest.inc.fixed create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/PSR12/Tests/Files/ImportStatementUnitTest.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/PSR12/Tests/Files/OpenTagUnitTest.1.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/PSR12/Tests/Files/OpenTagUnitTest.2.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/PSR12/Tests/Files/OpenTagUnitTest.2.inc.fixed create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/PSR12/Tests/Files/OpenTagUnitTest.3.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/PSR12/Tests/Files/OpenTagUnitTest.4.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/PSR12/Tests/Files/OpenTagUnitTest.5.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/PSR12/Tests/Files/OpenTagUnitTest.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/PSR12/Tests/Functions/NullableTypeDeclarationUnitTest.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/PSR12/Tests/Functions/NullableTypeDeclarationUnitTest.inc.fixed create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/PSR12/Tests/Functions/NullableTypeDeclarationUnitTest.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/PSR12/Tests/Functions/ReturnTypeDeclarationUnitTest.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/PSR12/Tests/Functions/ReturnTypeDeclarationUnitTest.inc.fixed create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/PSR12/Tests/Functions/ReturnTypeDeclarationUnitTest.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/PSR12/Tests/Keywords/ShortFormTypeKeywordsUnitTest.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/PSR12/Tests/Keywords/ShortFormTypeKeywordsUnitTest.inc.fixed create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/PSR12/Tests/Keywords/ShortFormTypeKeywordsUnitTest.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/PSR12/Tests/Namespaces/CompoundNamespaceDepthUnitTest.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/PSR12/Tests/Namespaces/CompoundNamespaceDepthUnitTest.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/PSR12/Tests/Operators/OperatorSpacingUnitTest.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/PSR12/Tests/Operators/OperatorSpacingUnitTest.inc.fixed create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/PSR12/Tests/Operators/OperatorSpacingUnitTest.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/PSR12/Tests/Properties/ConstantVisibilityUnitTest.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/PSR12/Tests/Properties/ConstantVisibilityUnitTest.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/PSR12/Tests/Traits/UseDeclarationUnitTest.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/PSR12/Tests/Traits/UseDeclarationUnitTest.inc.fixed create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/PSR12/Tests/Traits/UseDeclarationUnitTest.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/PSR12/ruleset.xml create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/PSR2/Docs/Classes/ClassDeclarationStandard.xml create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/PSR2/Docs/Classes/PropertyDeclarationStandard.xml create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/PSR2/Docs/ControlStructures/ControlStructureSpacingStandard.xml create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/PSR2/Docs/ControlStructures/ElseIfDeclarationStandard.xml create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/PSR2/Docs/ControlStructures/SwitchDeclarationStandard.xml create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/PSR2/Docs/Files/EndFileNewlineStandard.xml create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/PSR2/Docs/Methods/MethodDeclarationStandard.xml create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/PSR2/Docs/Namespaces/NamespaceDeclarationStandard.xml create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/PSR2/Docs/Namespaces/UseDeclarationStandard.xml create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/PSR2/Sniffs/Classes/ClassDeclarationSniff.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/PSR2/Sniffs/Classes/PropertyDeclarationSniff.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/PSR2/Sniffs/ControlStructures/ControlStructureSpacingSniff.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/PSR2/Sniffs/ControlStructures/ElseIfDeclarationSniff.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/PSR2/Sniffs/ControlStructures/SwitchDeclarationSniff.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/PSR2/Sniffs/Files/ClosingTagSniff.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/PSR2/Sniffs/Files/EndFileNewlineSniff.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/PSR2/Sniffs/Methods/FunctionCallSignatureSniff.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/PSR2/Sniffs/Methods/FunctionClosingBraceSniff.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/PSR2/Sniffs/Methods/MethodDeclarationSniff.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/PSR2/Sniffs/Namespaces/NamespaceDeclarationSniff.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/PSR2/Sniffs/Namespaces/UseDeclarationSniff.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/PSR2/Tests/Classes/ClassDeclarationUnitTest.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/PSR2/Tests/Classes/ClassDeclarationUnitTest.inc.fixed create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/PSR2/Tests/Classes/ClassDeclarationUnitTest.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/PSR2/Tests/Classes/PropertyDeclarationUnitTest.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/PSR2/Tests/Classes/PropertyDeclarationUnitTest.inc.fixed create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/PSR2/Tests/Classes/PropertyDeclarationUnitTest.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/PSR2/Tests/ControlStructures/ControlStructureSpacingUnitTest.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/PSR2/Tests/ControlStructures/ControlStructureSpacingUnitTest.inc.fixed create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/PSR2/Tests/ControlStructures/ControlStructureSpacingUnitTest.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/PSR2/Tests/ControlStructures/ElseIfDeclarationUnitTest.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/PSR2/Tests/ControlStructures/ElseIfDeclarationUnitTest.inc.fixed create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/PSR2/Tests/ControlStructures/ElseIfDeclarationUnitTest.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/PSR2/Tests/ControlStructures/SwitchDeclarationUnitTest.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/PSR2/Tests/ControlStructures/SwitchDeclarationUnitTest.inc.fixed create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/PSR2/Tests/ControlStructures/SwitchDeclarationUnitTest.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/PSR2/Tests/Files/ClosingTagUnitTest.1.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/PSR2/Tests/Files/ClosingTagUnitTest.1.inc.fixed create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/PSR2/Tests/Files/ClosingTagUnitTest.2.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/PSR2/Tests/Files/ClosingTagUnitTest.3.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/PSR2/Tests/Files/ClosingTagUnitTest.4.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/PSR2/Tests/Files/ClosingTagUnitTest.4.inc.fixed create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/PSR2/Tests/Files/ClosingTagUnitTest.5.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/PSR2/Tests/Files/ClosingTagUnitTest.5.inc.fixed create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/PSR2/Tests/Files/ClosingTagUnitTest.6.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/PSR2/Tests/Files/ClosingTagUnitTest.6.inc.fixed create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/PSR2/Tests/Files/ClosingTagUnitTest.7.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/PSR2/Tests/Files/ClosingTagUnitTest.7.inc.fixed create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/PSR2/Tests/Files/ClosingTagUnitTest.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/PSR2/Tests/Files/EndFileNewlineUnitTest.1.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/PSR2/Tests/Files/EndFileNewlineUnitTest.1.inc.fixed create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/PSR2/Tests/Files/EndFileNewlineUnitTest.10.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/PSR2/Tests/Files/EndFileNewlineUnitTest.10.inc.fixed create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/PSR2/Tests/Files/EndFileNewlineUnitTest.11.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/PSR2/Tests/Files/EndFileNewlineUnitTest.11.inc.fixed create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/PSR2/Tests/Files/EndFileNewlineUnitTest.12.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/PSR2/Tests/Files/EndFileNewlineUnitTest.12.inc.fixed create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/PSR2/Tests/Files/EndFileNewlineUnitTest.13.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/PSR2/Tests/Files/EndFileNewlineUnitTest.13.inc.fixed create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/PSR2/Tests/Files/EndFileNewlineUnitTest.14.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/PSR2/Tests/Files/EndFileNewlineUnitTest.2.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/PSR2/Tests/Files/EndFileNewlineUnitTest.3.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/PSR2/Tests/Files/EndFileNewlineUnitTest.3.inc.fixed create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/PSR2/Tests/Files/EndFileNewlineUnitTest.4.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/PSR2/Tests/Files/EndFileNewlineUnitTest.5.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/PSR2/Tests/Files/EndFileNewlineUnitTest.6.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/PSR2/Tests/Files/EndFileNewlineUnitTest.6.inc.fixed create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/PSR2/Tests/Files/EndFileNewlineUnitTest.7.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/PSR2/Tests/Files/EndFileNewlineUnitTest.7.inc.fixed create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/PSR2/Tests/Files/EndFileNewlineUnitTest.8.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/PSR2/Tests/Files/EndFileNewlineUnitTest.9.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/PSR2/Tests/Files/EndFileNewlineUnitTest.9.inc.fixed create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/PSR2/Tests/Files/EndFileNewlineUnitTest.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/PSR2/Tests/Methods/FunctionCallSignatureUnitTest.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/PSR2/Tests/Methods/FunctionCallSignatureUnitTest.inc.fixed create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/PSR2/Tests/Methods/FunctionCallSignatureUnitTest.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/PSR2/Tests/Methods/FunctionClosingBraceUnitTest.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/PSR2/Tests/Methods/FunctionClosingBraceUnitTest.inc.fixed create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/PSR2/Tests/Methods/FunctionClosingBraceUnitTest.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/PSR2/Tests/Methods/MethodDeclarationUnitTest.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/PSR2/Tests/Methods/MethodDeclarationUnitTest.inc.fixed create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/PSR2/Tests/Methods/MethodDeclarationUnitTest.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/PSR2/Tests/Namespaces/NamespaceDeclarationUnitTest.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/PSR2/Tests/Namespaces/NamespaceDeclarationUnitTest.inc.fixed create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/PSR2/Tests/Namespaces/NamespaceDeclarationUnitTest.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/PSR2/Tests/Namespaces/UseDeclarationUnitTest.1.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/PSR2/Tests/Namespaces/UseDeclarationUnitTest.10.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/PSR2/Tests/Namespaces/UseDeclarationUnitTest.10.inc.fixed create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/PSR2/Tests/Namespaces/UseDeclarationUnitTest.11.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/PSR2/Tests/Namespaces/UseDeclarationUnitTest.11.inc.fixed create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/PSR2/Tests/Namespaces/UseDeclarationUnitTest.12.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/PSR2/Tests/Namespaces/UseDeclarationUnitTest.12.inc.fixed create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/PSR2/Tests/Namespaces/UseDeclarationUnitTest.13.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/PSR2/Tests/Namespaces/UseDeclarationUnitTest.13.inc.fixed create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/PSR2/Tests/Namespaces/UseDeclarationUnitTest.14.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/PSR2/Tests/Namespaces/UseDeclarationUnitTest.14.inc.fixed create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/PSR2/Tests/Namespaces/UseDeclarationUnitTest.15.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/PSR2/Tests/Namespaces/UseDeclarationUnitTest.16.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/PSR2/Tests/Namespaces/UseDeclarationUnitTest.16.inc.fixed create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/PSR2/Tests/Namespaces/UseDeclarationUnitTest.17.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/PSR2/Tests/Namespaces/UseDeclarationUnitTest.2.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/PSR2/Tests/Namespaces/UseDeclarationUnitTest.2.inc.fixed create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/PSR2/Tests/Namespaces/UseDeclarationUnitTest.3.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/PSR2/Tests/Namespaces/UseDeclarationUnitTest.3.inc.fixed create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/PSR2/Tests/Namespaces/UseDeclarationUnitTest.4.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/PSR2/Tests/Namespaces/UseDeclarationUnitTest.5.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/PSR2/Tests/Namespaces/UseDeclarationUnitTest.5.inc.fixed create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/PSR2/Tests/Namespaces/UseDeclarationUnitTest.6.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/PSR2/Tests/Namespaces/UseDeclarationUnitTest.7.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/PSR2/Tests/Namespaces/UseDeclarationUnitTest.8.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/PSR2/Tests/Namespaces/UseDeclarationUnitTest.9.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/PSR2/Tests/Namespaces/UseDeclarationUnitTest.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/PSR2/ruleset.xml create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Docs/Arrays/ArrayBracketSpacingStandard.xml create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Docs/Arrays/ArrayDeclarationStandard.xml create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Docs/Classes/LowercaseClassKeywordsStandard.xml create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Docs/Classes/SelfMemberReferenceStandard.xml create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Docs/Commenting/DocCommentAlignmentStandard.xml create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Docs/Commenting/FunctionCommentThrowTagStandard.xml create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Docs/ControlStructures/ForEachLoopDeclarationStandard.xml create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Docs/ControlStructures/ForLoopDeclarationStandard.xml create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Docs/ControlStructures/LowercaseDeclarationStandard.xml create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Docs/Functions/FunctionDuplicateArgumentStandard.xml create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Docs/Functions/LowercaseFunctionKeywordsStandard.xml create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Docs/Scope/StaticThisUsageStandard.xml create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Docs/Strings/EchoedStringsStandard.xml create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Docs/WhiteSpace/CastSpacingStandard.xml create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Docs/WhiteSpace/FunctionOpeningBraceStandard.xml create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Docs/WhiteSpace/LanguageConstructSpacingStandard.xml create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Docs/WhiteSpace/ObjectOperatorSpacingStandard.xml create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Docs/WhiteSpace/ScopeKeywordSpacingStandard.xml create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Docs/WhiteSpace/SemicolonSpacingStandard.xml create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Sniffs/Arrays/ArrayBracketSpacingSniff.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Sniffs/Arrays/ArrayDeclarationSniff.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Sniffs/CSS/ClassDefinitionClosingBraceSpaceSniff.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Sniffs/CSS/ClassDefinitionNameSpacingSniff.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Sniffs/CSS/ClassDefinitionOpeningBraceSpaceSniff.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Sniffs/CSS/ColonSpacingSniff.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Sniffs/CSS/ColourDefinitionSniff.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Sniffs/CSS/DisallowMultipleStyleDefinitionsSniff.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Sniffs/CSS/DuplicateClassDefinitionSniff.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Sniffs/CSS/DuplicateStyleDefinitionSniff.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Sniffs/CSS/EmptyClassDefinitionSniff.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Sniffs/CSS/EmptyStyleDefinitionSniff.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Sniffs/CSS/ForbiddenStylesSniff.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Sniffs/CSS/IndentationSniff.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Sniffs/CSS/LowercaseStyleDefinitionSniff.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Sniffs/CSS/MissingColonSniff.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Sniffs/CSS/NamedColoursSniff.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Sniffs/CSS/OpacitySniff.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Sniffs/CSS/SemicolonSpacingSniff.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Sniffs/CSS/ShorthandSizeSniff.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Sniffs/Classes/ClassDeclarationSniff.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Sniffs/Classes/ClassFileNameSniff.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Sniffs/Classes/DuplicatePropertySniff.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Sniffs/Classes/LowercaseClassKeywordsSniff.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Sniffs/Classes/SelfMemberReferenceSniff.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Sniffs/Classes/ValidClassNameSniff.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Sniffs/Commenting/BlockCommentSniff.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Sniffs/Commenting/ClassCommentSniff.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Sniffs/Commenting/ClosingDeclarationCommentSniff.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Sniffs/Commenting/DocCommentAlignmentSniff.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Sniffs/Commenting/EmptyCatchCommentSniff.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Sniffs/Commenting/FileCommentSniff.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Sniffs/Commenting/FunctionCommentSniff.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Sniffs/Commenting/FunctionCommentThrowTagSniff.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Sniffs/Commenting/InlineCommentSniff.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Sniffs/Commenting/LongConditionClosingCommentSniff.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Sniffs/Commenting/PostStatementCommentSniff.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Sniffs/Commenting/VariableCommentSniff.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Sniffs/ControlStructures/ControlSignatureSniff.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Sniffs/ControlStructures/ElseIfDeclarationSniff.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Sniffs/ControlStructures/ForEachLoopDeclarationSniff.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Sniffs/ControlStructures/ForLoopDeclarationSniff.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Sniffs/ControlStructures/InlineIfDeclarationSniff.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Sniffs/ControlStructures/LowercaseDeclarationSniff.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Sniffs/ControlStructures/SwitchDeclarationSniff.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Sniffs/Debug/JSLintSniff.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Sniffs/Debug/JavaScriptLintSniff.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Sniffs/Files/FileExtensionSniff.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Sniffs/Formatting/OperatorBracketSniff.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Sniffs/Functions/FunctionDeclarationArgumentSpacingSniff.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Sniffs/Functions/FunctionDeclarationSniff.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Sniffs/Functions/FunctionDuplicateArgumentSniff.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Sniffs/Functions/GlobalFunctionSniff.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Sniffs/Functions/LowercaseFunctionKeywordsSniff.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Sniffs/Functions/MultiLineFunctionDeclarationSniff.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Sniffs/NamingConventions/ValidFunctionNameSniff.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Sniffs/NamingConventions/ValidVariableNameSniff.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Sniffs/Objects/DisallowObjectStringIndexSniff.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Sniffs/Objects/ObjectInstantiationSniff.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Sniffs/Objects/ObjectMemberCommaSniff.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Sniffs/Operators/ComparisonOperatorUsageSniff.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Sniffs/Operators/IncrementDecrementUsageSniff.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Sniffs/Operators/ValidLogicalOperatorsSniff.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Sniffs/PHP/CommentedOutCodeSniff.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Sniffs/PHP/DisallowBooleanStatementSniff.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Sniffs/PHP/DisallowComparisonAssignmentSniff.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Sniffs/PHP/DisallowInlineIfSniff.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Sniffs/PHP/DisallowMultipleAssignmentsSniff.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Sniffs/PHP/DisallowSizeFunctionsInLoopsSniff.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Sniffs/PHP/DiscouragedFunctionsSniff.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Sniffs/PHP/EmbeddedPhpSniff.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Sniffs/PHP/EvalSniff.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Sniffs/PHP/GlobalKeywordSniff.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Sniffs/PHP/HeredocSniff.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Sniffs/PHP/InnerFunctionsSniff.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Sniffs/PHP/LowercasePHPFunctionsSniff.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Sniffs/PHP/NonExecutableCodeSniff.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Sniffs/Scope/MemberVarScopeSniff.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Sniffs/Scope/MethodScopeSniff.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Sniffs/Scope/StaticThisUsageSniff.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Sniffs/Strings/ConcatenationSpacingSniff.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Sniffs/Strings/DoubleQuoteUsageSniff.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Sniffs/Strings/EchoedStringsSniff.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Sniffs/WhiteSpace/CastSpacingSniff.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Sniffs/WhiteSpace/ControlStructureSpacingSniff.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Sniffs/WhiteSpace/FunctionClosingBraceSpaceSniff.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Sniffs/WhiteSpace/FunctionOpeningBraceSpaceSniff.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Sniffs/WhiteSpace/FunctionSpacingSniff.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Sniffs/WhiteSpace/LanguageConstructSpacingSniff.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Sniffs/WhiteSpace/LogicalOperatorSpacingSniff.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Sniffs/WhiteSpace/MemberVarSpacingSniff.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Sniffs/WhiteSpace/ObjectOperatorSpacingSniff.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Sniffs/WhiteSpace/OperatorSpacingSniff.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Sniffs/WhiteSpace/PropertyLabelSpacingSniff.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Sniffs/WhiteSpace/ScopeClosingBraceSniff.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Sniffs/WhiteSpace/ScopeKeywordSpacingSniff.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Sniffs/WhiteSpace/SemicolonSpacingSniff.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Sniffs/WhiteSpace/SuperfluousWhitespaceSniff.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/Arrays/ArrayBracketSpacingUnitTest.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/Arrays/ArrayBracketSpacingUnitTest.inc.fixed create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/Arrays/ArrayBracketSpacingUnitTest.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/Arrays/ArrayDeclarationUnitTest.1.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/Arrays/ArrayDeclarationUnitTest.1.inc.fixed create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/Arrays/ArrayDeclarationUnitTest.2.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/Arrays/ArrayDeclarationUnitTest.2.inc.fixed create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/Arrays/ArrayDeclarationUnitTest.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/CSS/ClassDefinitionClosingBraceSpaceUnitTest.css create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/CSS/ClassDefinitionClosingBraceSpaceUnitTest.css.fixed create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/CSS/ClassDefinitionClosingBraceSpaceUnitTest.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/CSS/ClassDefinitionNameSpacingUnitTest.css create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/CSS/ClassDefinitionNameSpacingUnitTest.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/CSS/ClassDefinitionOpeningBraceSpaceUnitTest.css create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/CSS/ClassDefinitionOpeningBraceSpaceUnitTest.css.fixed create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/CSS/ClassDefinitionOpeningBraceSpaceUnitTest.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/CSS/ColonSpacingUnitTest.css create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/CSS/ColonSpacingUnitTest.css.fixed create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/CSS/ColonSpacingUnitTest.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/CSS/ColourDefinitionUnitTest.css create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/CSS/ColourDefinitionUnitTest.css.fixed create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/CSS/ColourDefinitionUnitTest.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/CSS/DisallowMultipleStyleDefinitionsUnitTest.css create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/CSS/DisallowMultipleStyleDefinitionsUnitTest.css.fixed create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/CSS/DisallowMultipleStyleDefinitionsUnitTest.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/CSS/DuplicateClassDefinitionUnitTest.css create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/CSS/DuplicateClassDefinitionUnitTest.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/CSS/DuplicateStyleDefinitionUnitTest.css create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/CSS/DuplicateStyleDefinitionUnitTest.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/CSS/EmptyClassDefinitionUnitTest.css create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/CSS/EmptyClassDefinitionUnitTest.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/CSS/EmptyStyleDefinitionUnitTest.css create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/CSS/EmptyStyleDefinitionUnitTest.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/CSS/ForbiddenStylesUnitTest.css create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/CSS/ForbiddenStylesUnitTest.css.fixed create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/CSS/ForbiddenStylesUnitTest.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/CSS/IndentationUnitTest.1.css create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/CSS/IndentationUnitTest.1.css.fixed create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/CSS/IndentationUnitTest.2.css create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/CSS/IndentationUnitTest.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/CSS/LowercaseStyleDefinitionUnitTest.css create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/CSS/LowercaseStyleDefinitionUnitTest.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/CSS/MissingColonUnitTest.css create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/CSS/MissingColonUnitTest.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/CSS/NamedColoursUnitTest.css create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/CSS/NamedColoursUnitTest.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/CSS/OpacityUnitTest.css create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/CSS/OpacityUnitTest.css.fixed create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/CSS/OpacityUnitTest.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/CSS/SemicolonSpacingUnitTest.css create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/CSS/SemicolonSpacingUnitTest.css.fixed create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/CSS/SemicolonSpacingUnitTest.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/CSS/ShorthandSizeUnitTest.css create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/CSS/ShorthandSizeUnitTest.css.fixed create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/CSS/ShorthandSizeUnitTest.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/Classes/ClassDeclarationUnitTest.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/Classes/ClassDeclarationUnitTest.inc.fixed create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/Classes/ClassDeclarationUnitTest.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/Classes/ClassFileNameUnitTest.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/Classes/ClassFileNameUnitTest.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/Classes/DuplicatePropertyUnitTest.js create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/Classes/DuplicatePropertyUnitTest.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/Classes/LowercaseClassKeywordsUnitTest.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/Classes/LowercaseClassKeywordsUnitTest.inc.fixed create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/Classes/LowercaseClassKeywordsUnitTest.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/Classes/SelfMemberReferenceUnitTest.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/Classes/SelfMemberReferenceUnitTest.inc.fixed create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/Classes/SelfMemberReferenceUnitTest.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/Classes/ValidClassNameUnitTest.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/Classes/ValidClassNameUnitTest.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/Commenting/BlockCommentUnitTest.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/Commenting/BlockCommentUnitTest.inc.fixed create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/Commenting/BlockCommentUnitTest.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/Commenting/ClassCommentUnitTest.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/Commenting/ClassCommentUnitTest.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/Commenting/ClosingDeclarationCommentUnitTest.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/Commenting/ClosingDeclarationCommentUnitTest.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/Commenting/DocCommentAlignmentUnitTest.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/Commenting/DocCommentAlignmentUnitTest.inc.fixed create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/Commenting/DocCommentAlignmentUnitTest.js create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/Commenting/DocCommentAlignmentUnitTest.js.fixed create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/Commenting/DocCommentAlignmentUnitTest.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/Commenting/EmptyCatchCommentUnitTest.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/Commenting/EmptyCatchCommentUnitTest.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/Commenting/FileCommentUnitTest.1.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/Commenting/FileCommentUnitTest.1.inc.fixed create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/Commenting/FileCommentUnitTest.1.js create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/Commenting/FileCommentUnitTest.1.js.fixed create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/Commenting/FileCommentUnitTest.2.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/Commenting/FileCommentUnitTest.2.js create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/Commenting/FileCommentUnitTest.3.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/Commenting/FileCommentUnitTest.4.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/Commenting/FileCommentUnitTest.5.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/Commenting/FileCommentUnitTest.6.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/Commenting/FileCommentUnitTest.7.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/Commenting/FileCommentUnitTest.8.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/Commenting/FileCommentUnitTest.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/Commenting/FunctionCommentThrowTagUnitTest.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/Commenting/FunctionCommentThrowTagUnitTest.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/Commenting/FunctionCommentUnitTest.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/Commenting/FunctionCommentUnitTest.inc.fixed create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/Commenting/FunctionCommentUnitTest.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/Commenting/InlineCommentUnitTest.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/Commenting/InlineCommentUnitTest.inc.fixed create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/Commenting/InlineCommentUnitTest.js create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/Commenting/InlineCommentUnitTest.js.fixed create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/Commenting/InlineCommentUnitTest.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/Commenting/LongConditionClosingCommentUnitTest.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/Commenting/LongConditionClosingCommentUnitTest.inc.fixed create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/Commenting/LongConditionClosingCommentUnitTest.js create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/Commenting/LongConditionClosingCommentUnitTest.js.fixed create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/Commenting/LongConditionClosingCommentUnitTest.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/Commenting/PostStatementCommentUnitTest.1.js create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/Commenting/PostStatementCommentUnitTest.1.js.fixed create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/Commenting/PostStatementCommentUnitTest.2.js create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/Commenting/PostStatementCommentUnitTest.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/Commenting/PostStatementCommentUnitTest.inc.fixed create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/Commenting/PostStatementCommentUnitTest.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/Commenting/VariableCommentUnitTest.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/Commenting/VariableCommentUnitTest.inc.fixed create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/Commenting/VariableCommentUnitTest.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/ControlStructures/ControlSignatureUnitTest.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/ControlStructures/ControlSignatureUnitTest.inc.fixed create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/ControlStructures/ControlSignatureUnitTest.js create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/ControlStructures/ControlSignatureUnitTest.js.fixed create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/ControlStructures/ControlSignatureUnitTest.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/ControlStructures/ElseIfDeclarationUnitTest.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/ControlStructures/ElseIfDeclarationUnitTest.inc.fixed create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/ControlStructures/ElseIfDeclarationUnitTest.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/ControlStructures/ForEachLoopDeclarationUnitTest.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/ControlStructures/ForEachLoopDeclarationUnitTest.inc.fixed create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/ControlStructures/ForEachLoopDeclarationUnitTest.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/ControlStructures/ForLoopDeclarationUnitTest.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/ControlStructures/ForLoopDeclarationUnitTest.inc.fixed create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/ControlStructures/ForLoopDeclarationUnitTest.js create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/ControlStructures/ForLoopDeclarationUnitTest.js.fixed create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/ControlStructures/ForLoopDeclarationUnitTest.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/ControlStructures/InlineIfDeclarationUnitTest.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/ControlStructures/InlineIfDeclarationUnitTest.inc.fixed create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/ControlStructures/InlineIfDeclarationUnitTest.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/ControlStructures/LowercaseDeclarationUnitTest.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/ControlStructures/LowercaseDeclarationUnitTest.inc.fixed create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/ControlStructures/LowercaseDeclarationUnitTest.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/ControlStructures/SwitchDeclarationUnitTest.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/ControlStructures/SwitchDeclarationUnitTest.inc.fixed create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/ControlStructures/SwitchDeclarationUnitTest.js create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/ControlStructures/SwitchDeclarationUnitTest.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/Debug/JSLintUnitTest.js create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/Debug/JSLintUnitTest.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/Debug/JavaScriptLintUnitTest.js create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/Debug/JavaScriptLintUnitTest.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/Files/FileExtensionUnitTest.1.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/Files/FileExtensionUnitTest.2.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/Files/FileExtensionUnitTest.3.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/Files/FileExtensionUnitTest.4.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/Files/FileExtensionUnitTest.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/Formatting/OperatorBracketUnitTest.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/Formatting/OperatorBracketUnitTest.inc.fixed create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/Formatting/OperatorBracketUnitTest.js create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/Formatting/OperatorBracketUnitTest.js.fixed create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/Formatting/OperatorBracketUnitTest.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/Functions/FunctionDeclarationArgumentSpacingUnitTest.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/Functions/FunctionDeclarationArgumentSpacingUnitTest.inc.fixed create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/Functions/FunctionDeclarationArgumentSpacingUnitTest.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/Functions/FunctionDeclarationUnitTest.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/Functions/FunctionDeclarationUnitTest.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/Functions/FunctionDuplicateArgumentUnitTest.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/Functions/FunctionDuplicateArgumentUnitTest.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/Functions/GlobalFunctionUnitTest.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/Functions/GlobalFunctionUnitTest.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/Functions/LowercaseFunctionKeywordsUnitTest.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/Functions/LowercaseFunctionKeywordsUnitTest.inc.fixed create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/Functions/LowercaseFunctionKeywordsUnitTest.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/Functions/MultiLineFunctionDeclarationUnitTest.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/Functions/MultiLineFunctionDeclarationUnitTest.inc.fixed create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/Functions/MultiLineFunctionDeclarationUnitTest.js create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/Functions/MultiLineFunctionDeclarationUnitTest.js.fixed create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/Functions/MultiLineFunctionDeclarationUnitTest.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/NamingConventions/ValidFunctionNameUnitTest.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/NamingConventions/ValidFunctionNameUnitTest.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/NamingConventions/ValidVariableNameUnitTest.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/NamingConventions/ValidVariableNameUnitTest.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/Objects/DisallowObjectStringIndexUnitTest.js create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/Objects/DisallowObjectStringIndexUnitTest.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/Objects/ObjectInstantiationUnitTest.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/Objects/ObjectInstantiationUnitTest.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/Objects/ObjectMemberCommaUnitTest.js create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/Objects/ObjectMemberCommaUnitTest.js.fixed create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/Objects/ObjectMemberCommaUnitTest.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/Operators/ComparisonOperatorUsageUnitTest.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/Operators/ComparisonOperatorUsageUnitTest.js create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/Operators/ComparisonOperatorUsageUnitTest.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/Operators/IncrementDecrementUsageUnitTest.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/Operators/IncrementDecrementUsageUnitTest.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/Operators/ValidLogicalOperatorsUnitTest.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/Operators/ValidLogicalOperatorsUnitTest.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/PHP/CommentedOutCodeUnitTest.css create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/PHP/CommentedOutCodeUnitTest.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/PHP/CommentedOutCodeUnitTest.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/PHP/DisallowBooleanStatementUnitTest.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/PHP/DisallowBooleanStatementUnitTest.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/PHP/DisallowComparisonAssignmentUnitTest.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/PHP/DisallowComparisonAssignmentUnitTest.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/PHP/DisallowInlineIfUnitTest.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/PHP/DisallowInlineIfUnitTest.js create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/PHP/DisallowInlineIfUnitTest.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/PHP/DisallowMultipleAssignmentsUnitTest.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/PHP/DisallowMultipleAssignmentsUnitTest.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/PHP/DisallowSizeFunctionsInLoopsUnitTest.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/PHP/DisallowSizeFunctionsInLoopsUnitTest.js create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/PHP/DisallowSizeFunctionsInLoopsUnitTest.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/PHP/DiscouragedFunctionsUnitTest.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/PHP/DiscouragedFunctionsUnitTest.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/PHP/EmbeddedPhpUnitTest.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/PHP/EmbeddedPhpUnitTest.inc.fixed create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/PHP/EmbeddedPhpUnitTest.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/PHP/EvalUnitTest.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/PHP/EvalUnitTest.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/PHP/GlobalKeywordUnitTest.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/PHP/GlobalKeywordUnitTest.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/PHP/HeredocUnitTest.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/PHP/HeredocUnitTest.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/PHP/InnerFunctionsUnitTest.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/PHP/InnerFunctionsUnitTest.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/PHP/LowercasePHPFunctionsUnitTest.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/PHP/LowercasePHPFunctionsUnitTest.inc.fixed create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/PHP/LowercasePHPFunctionsUnitTest.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/PHP/NonExecutableCodeUnitTest.1.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/PHP/NonExecutableCodeUnitTest.2.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/PHP/NonExecutableCodeUnitTest.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/Scope/MemberVarScopeUnitTest.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/Scope/MemberVarScopeUnitTest.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/Scope/MethodScopeUnitTest.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/Scope/MethodScopeUnitTest.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/Scope/StaticThisUsageUnitTest.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/Scope/StaticThisUsageUnitTest.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/Strings/ConcatenationSpacingUnitTest.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/Strings/ConcatenationSpacingUnitTest.inc.fixed create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/Strings/ConcatenationSpacingUnitTest.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/Strings/DoubleQuoteUsageUnitTest.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/Strings/DoubleQuoteUsageUnitTest.inc.fixed create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/Strings/DoubleQuoteUsageUnitTest.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/Strings/EchoedStringsUnitTest.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/Strings/EchoedStringsUnitTest.inc.fixed create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/Strings/EchoedStringsUnitTest.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/WhiteSpace/CastSpacingUnitTest.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/WhiteSpace/CastSpacingUnitTest.inc.fixed create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/WhiteSpace/CastSpacingUnitTest.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/WhiteSpace/ControlStructureSpacingUnitTest.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/WhiteSpace/ControlStructureSpacingUnitTest.inc.fixed create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/WhiteSpace/ControlStructureSpacingUnitTest.js create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/WhiteSpace/ControlStructureSpacingUnitTest.js.fixed create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/WhiteSpace/ControlStructureSpacingUnitTest.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/WhiteSpace/FunctionClosingBraceSpaceUnitTest.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/WhiteSpace/FunctionClosingBraceSpaceUnitTest.inc.fixed create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/WhiteSpace/FunctionClosingBraceSpaceUnitTest.js create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/WhiteSpace/FunctionClosingBraceSpaceUnitTest.js.fixed create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/WhiteSpace/FunctionClosingBraceSpaceUnitTest.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/WhiteSpace/FunctionOpeningBraceSpaceUnitTest.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/WhiteSpace/FunctionOpeningBraceSpaceUnitTest.inc.fixed create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/WhiteSpace/FunctionOpeningBraceSpaceUnitTest.js create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/WhiteSpace/FunctionOpeningBraceSpaceUnitTest.js.fixed create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/WhiteSpace/FunctionOpeningBraceSpaceUnitTest.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/WhiteSpace/FunctionSpacingUnitTest.1.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/WhiteSpace/FunctionSpacingUnitTest.1.inc.fixed create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/WhiteSpace/FunctionSpacingUnitTest.2.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/WhiteSpace/FunctionSpacingUnitTest.2.inc.fixed create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/WhiteSpace/FunctionSpacingUnitTest.3.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/WhiteSpace/FunctionSpacingUnitTest.3.inc.fixed create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/WhiteSpace/FunctionSpacingUnitTest.4.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/WhiteSpace/FunctionSpacingUnitTest.5.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/WhiteSpace/FunctionSpacingUnitTest.5.inc.fixed create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/WhiteSpace/FunctionSpacingUnitTest.6.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/WhiteSpace/FunctionSpacingUnitTest.6.inc.fixed create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/WhiteSpace/FunctionSpacingUnitTest.7.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/WhiteSpace/FunctionSpacingUnitTest.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/WhiteSpace/LanguageConstructSpacingUnitTest.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/WhiteSpace/LanguageConstructSpacingUnitTest.inc.fixed create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/WhiteSpace/LanguageConstructSpacingUnitTest.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/WhiteSpace/LogicalOperatorSpacingUnitTest.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/WhiteSpace/LogicalOperatorSpacingUnitTest.inc.fixed create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/WhiteSpace/LogicalOperatorSpacingUnitTest.js create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/WhiteSpace/LogicalOperatorSpacingUnitTest.js.fixed create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/WhiteSpace/LogicalOperatorSpacingUnitTest.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/WhiteSpace/MemberVarSpacingUnitTest.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/WhiteSpace/MemberVarSpacingUnitTest.inc.fixed create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/WhiteSpace/MemberVarSpacingUnitTest.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/WhiteSpace/ObjectOperatorSpacingUnitTest.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/WhiteSpace/ObjectOperatorSpacingUnitTest.inc.fixed create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/WhiteSpace/ObjectOperatorSpacingUnitTest.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/WhiteSpace/OperatorSpacingUnitTest.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/WhiteSpace/OperatorSpacingUnitTest.inc.fixed create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/WhiteSpace/OperatorSpacingUnitTest.js create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/WhiteSpace/OperatorSpacingUnitTest.js.fixed create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/WhiteSpace/OperatorSpacingUnitTest.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/WhiteSpace/PropertyLabelSpacingUnitTest.js create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/WhiteSpace/PropertyLabelSpacingUnitTest.js.fixed create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/WhiteSpace/PropertyLabelSpacingUnitTest.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/WhiteSpace/ScopeClosingBraceUnitTest.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/WhiteSpace/ScopeClosingBraceUnitTest.inc.fixed create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/WhiteSpace/ScopeClosingBraceUnitTest.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/WhiteSpace/ScopeKeywordSpacingUnitTest.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/WhiteSpace/ScopeKeywordSpacingUnitTest.inc.fixed create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/WhiteSpace/ScopeKeywordSpacingUnitTest.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/WhiteSpace/SemicolonSpacingUnitTest.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/WhiteSpace/SemicolonSpacingUnitTest.inc.fixed create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/WhiteSpace/SemicolonSpacingUnitTest.js create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/WhiteSpace/SemicolonSpacingUnitTest.js.fixed create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/WhiteSpace/SemicolonSpacingUnitTest.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/WhiteSpace/SuperfluousWhitespaceUnitTest.1.css create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/WhiteSpace/SuperfluousWhitespaceUnitTest.1.css.fixed create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/WhiteSpace/SuperfluousWhitespaceUnitTest.1.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/WhiteSpace/SuperfluousWhitespaceUnitTest.1.inc.fixed create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/WhiteSpace/SuperfluousWhitespaceUnitTest.1.js create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/WhiteSpace/SuperfluousWhitespaceUnitTest.1.js.fixed create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/WhiteSpace/SuperfluousWhitespaceUnitTest.2.css create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/WhiteSpace/SuperfluousWhitespaceUnitTest.2.css.fixed create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/WhiteSpace/SuperfluousWhitespaceUnitTest.2.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/WhiteSpace/SuperfluousWhitespaceUnitTest.2.inc.fixed create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/WhiteSpace/SuperfluousWhitespaceUnitTest.2.js create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/WhiteSpace/SuperfluousWhitespaceUnitTest.2.js.fixed create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/WhiteSpace/SuperfluousWhitespaceUnitTest.3.css create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/WhiteSpace/SuperfluousWhitespaceUnitTest.3.css.fixed create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/WhiteSpace/SuperfluousWhitespaceUnitTest.3.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/WhiteSpace/SuperfluousWhitespaceUnitTest.3.inc.fixed create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/WhiteSpace/SuperfluousWhitespaceUnitTest.3.js create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/WhiteSpace/SuperfluousWhitespaceUnitTest.3.js.fixed create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/WhiteSpace/SuperfluousWhitespaceUnitTest.4.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/WhiteSpace/SuperfluousWhitespaceUnitTest.4.inc.fixed create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/WhiteSpace/SuperfluousWhitespaceUnitTest.5.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/WhiteSpace/SuperfluousWhitespaceUnitTest.5.inc.fixed create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/WhiteSpace/SuperfluousWhitespaceUnitTest.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Squiz/ruleset.xml create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Zend/Docs/Debug/CodeAnalyzerStandard.xml create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Zend/Docs/Files/ClosingTagStandard.xml create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Zend/Docs/NamingConventions/ValidVariableNameStandard.xml create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Zend/Sniffs/Debug/CodeAnalyzerSniff.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Zend/Sniffs/Files/ClosingTagSniff.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Zend/Sniffs/NamingConventions/ValidVariableNameSniff.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Zend/Tests/Debug/CodeAnalyzerUnitTest.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Zend/Tests/Debug/CodeAnalyzerUnitTest.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Zend/Tests/Files/ClosingTagUnitTest.1.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Zend/Tests/Files/ClosingTagUnitTest.1.inc.fixed create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Zend/Tests/Files/ClosingTagUnitTest.2.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Zend/Tests/Files/ClosingTagUnitTest.3.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Zend/Tests/Files/ClosingTagUnitTest.3.inc.fixed create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Zend/Tests/Files/ClosingTagUnitTest.4.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Zend/Tests/Files/ClosingTagUnitTest.4.inc.fixed create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Zend/Tests/Files/ClosingTagUnitTest.5.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Zend/Tests/Files/ClosingTagUnitTest.5.inc.fixed create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Zend/Tests/Files/ClosingTagUnitTest.6.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Zend/Tests/Files/ClosingTagUnitTest.6.inc.fixed create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Zend/Tests/Files/ClosingTagUnitTest.7.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Zend/Tests/Files/ClosingTagUnitTest.7.inc.fixed create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Zend/Tests/Files/ClosingTagUnitTest.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Zend/Tests/NamingConventions/ValidVariableNameUnitTest.inc create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Zend/Tests/NamingConventions/ValidVariableNameUnitTest.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Standards/Zend/ruleset.xml create mode 100644 vendor/squizlabs/php_codesniffer/src/Tokenizers/CSS.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Tokenizers/Comment.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Tokenizers/JS.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Tokenizers/PHP.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Tokenizers/Tokenizer.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Util/Cache.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Util/Common.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Util/Standards.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Util/Timing.php create mode 100644 vendor/squizlabs/php_codesniffer/src/Util/Tokens.php create mode 100644 vendor/squizlabs/php_codesniffer/tests/AllTests.php create mode 100644 vendor/squizlabs/php_codesniffer/tests/Core/AbstractMethodUnitTest.php create mode 100644 vendor/squizlabs/php_codesniffer/tests/Core/AllTests.php create mode 100644 vendor/squizlabs/php_codesniffer/tests/Core/Autoloader/DetermineLoadedClassTest.php create mode 100644 vendor/squizlabs/php_codesniffer/tests/Core/Autoloader/TestFiles/A.inc create mode 100644 vendor/squizlabs/php_codesniffer/tests/Core/Autoloader/TestFiles/B.inc create mode 100644 vendor/squizlabs/php_codesniffer/tests/Core/Autoloader/TestFiles/C.inc create mode 100644 vendor/squizlabs/php_codesniffer/tests/Core/Autoloader/TestFiles/Sub/C.inc create mode 100644 vendor/squizlabs/php_codesniffer/tests/Core/ErrorSuppressionTest.php create mode 100644 vendor/squizlabs/php_codesniffer/tests/Core/File/FindEndOfStatementTest.inc create mode 100644 vendor/squizlabs/php_codesniffer/tests/Core/File/FindEndOfStatementTest.php create mode 100644 vendor/squizlabs/php_codesniffer/tests/Core/File/FindExtendedClassNameTest.inc create mode 100644 vendor/squizlabs/php_codesniffer/tests/Core/File/FindExtendedClassNameTest.php create mode 100644 vendor/squizlabs/php_codesniffer/tests/Core/File/FindImplementedInterfaceNamesTest.inc create mode 100644 vendor/squizlabs/php_codesniffer/tests/Core/File/FindImplementedInterfaceNamesTest.php create mode 100644 vendor/squizlabs/php_codesniffer/tests/Core/File/FindStartOfStatementTest.inc create mode 100644 vendor/squizlabs/php_codesniffer/tests/Core/File/FindStartOfStatementTest.php create mode 100644 vendor/squizlabs/php_codesniffer/tests/Core/File/GetMemberPropertiesTest.inc create mode 100644 vendor/squizlabs/php_codesniffer/tests/Core/File/GetMemberPropertiesTest.php create mode 100644 vendor/squizlabs/php_codesniffer/tests/Core/File/GetMethodParametersTest.inc create mode 100644 vendor/squizlabs/php_codesniffer/tests/Core/File/GetMethodParametersTest.php create mode 100644 vendor/squizlabs/php_codesniffer/tests/Core/File/GetMethodPropertiesTest.inc create mode 100644 vendor/squizlabs/php_codesniffer/tests/Core/File/GetMethodPropertiesTest.php create mode 100644 vendor/squizlabs/php_codesniffer/tests/Core/File/IsReferenceTest.inc create mode 100644 vendor/squizlabs/php_codesniffer/tests/Core/File/IsReferenceTest.php create mode 100644 vendor/squizlabs/php_codesniffer/tests/Core/Filters/Filter/AcceptTest.php create mode 100644 vendor/squizlabs/php_codesniffer/tests/Core/Filters/Filter/AcceptTest.xml create mode 100644 vendor/squizlabs/php_codesniffer/tests/Core/IsCamelCapsTest.php create mode 100644 vendor/squizlabs/php_codesniffer/tests/Core/Ruleset/RuleInclusionAbsoluteLinuxTest.php create mode 100644 vendor/squizlabs/php_codesniffer/tests/Core/Ruleset/RuleInclusionAbsoluteLinuxTest.xml create mode 100644 vendor/squizlabs/php_codesniffer/tests/Core/Ruleset/RuleInclusionAbsoluteWindowsTest.php create mode 100644 vendor/squizlabs/php_codesniffer/tests/Core/Ruleset/RuleInclusionAbsoluteWindowsTest.xml create mode 100644 vendor/squizlabs/php_codesniffer/tests/Core/Ruleset/RuleInclusionTest-include.xml create mode 100644 vendor/squizlabs/php_codesniffer/tests/Core/Ruleset/RuleInclusionTest.php create mode 100644 vendor/squizlabs/php_codesniffer/tests/Core/Ruleset/RuleInclusionTest.xml create mode 100644 vendor/squizlabs/php_codesniffer/tests/Core/Sniffs/AbstractArraySniffTest.inc create mode 100644 vendor/squizlabs/php_codesniffer/tests/Core/Sniffs/AbstractArraySniffTest.php create mode 100644 vendor/squizlabs/php_codesniffer/tests/Core/Sniffs/AbstractArraySniffTestable.php create mode 100644 vendor/squizlabs/php_codesniffer/tests/Core/Tokenizer/AnonClassParenthesisOwnerTest.inc create mode 100644 vendor/squizlabs/php_codesniffer/tests/Core/Tokenizer/AnonClassParenthesisOwnerTest.php create mode 100644 vendor/squizlabs/php_codesniffer/tests/Core/Tokenizer/ArrayKeywordTest.inc create mode 100644 vendor/squizlabs/php_codesniffer/tests/Core/Tokenizer/ArrayKeywordTest.php create mode 100644 vendor/squizlabs/php_codesniffer/tests/Core/Tokenizer/AttributesTest.inc create mode 100644 vendor/squizlabs/php_codesniffer/tests/Core/Tokenizer/AttributesTest.php create mode 100644 vendor/squizlabs/php_codesniffer/tests/Core/Tokenizer/BackfillFnTokenTest.inc create mode 100644 vendor/squizlabs/php_codesniffer/tests/Core/Tokenizer/BackfillFnTokenTest.php create mode 100644 vendor/squizlabs/php_codesniffer/tests/Core/Tokenizer/BackfillMatchTokenTest.inc create mode 100644 vendor/squizlabs/php_codesniffer/tests/Core/Tokenizer/BackfillMatchTokenTest.php create mode 100644 vendor/squizlabs/php_codesniffer/tests/Core/Tokenizer/BackfillNumericSeparatorTest.inc create mode 100644 vendor/squizlabs/php_codesniffer/tests/Core/Tokenizer/BackfillNumericSeparatorTest.php create mode 100644 vendor/squizlabs/php_codesniffer/tests/Core/Tokenizer/BitwiseOrTest.inc create mode 100644 vendor/squizlabs/php_codesniffer/tests/Core/Tokenizer/BitwiseOrTest.php create mode 100644 vendor/squizlabs/php_codesniffer/tests/Core/Tokenizer/DefaultKeywordTest.inc create mode 100644 vendor/squizlabs/php_codesniffer/tests/Core/Tokenizer/DefaultKeywordTest.php create mode 100644 vendor/squizlabs/php_codesniffer/tests/Core/Tokenizer/DoubleArrowTest.inc create mode 100644 vendor/squizlabs/php_codesniffer/tests/Core/Tokenizer/DoubleArrowTest.php create mode 100644 vendor/squizlabs/php_codesniffer/tests/Core/Tokenizer/FinallyTest.inc create mode 100644 vendor/squizlabs/php_codesniffer/tests/Core/Tokenizer/FinallyTest.php create mode 100644 vendor/squizlabs/php_codesniffer/tests/Core/Tokenizer/GotoLabelTest.inc create mode 100644 vendor/squizlabs/php_codesniffer/tests/Core/Tokenizer/GotoLabelTest.php create mode 100644 vendor/squizlabs/php_codesniffer/tests/Core/Tokenizer/NamedFunctionCallArgumentsTest.inc create mode 100644 vendor/squizlabs/php_codesniffer/tests/Core/Tokenizer/NamedFunctionCallArgumentsTest.php create mode 100644 vendor/squizlabs/php_codesniffer/tests/Core/Tokenizer/NullsafeObjectOperatorTest.inc create mode 100644 vendor/squizlabs/php_codesniffer/tests/Core/Tokenizer/NullsafeObjectOperatorTest.php create mode 100644 vendor/squizlabs/php_codesniffer/tests/Core/Tokenizer/ScopeSettingWithNamespaceOperatorTest.inc create mode 100644 vendor/squizlabs/php_codesniffer/tests/Core/Tokenizer/ScopeSettingWithNamespaceOperatorTest.php create mode 100644 vendor/squizlabs/php_codesniffer/tests/Core/Tokenizer/ShortArrayTest.inc create mode 100644 vendor/squizlabs/php_codesniffer/tests/Core/Tokenizer/ShortArrayTest.php create mode 100644 vendor/squizlabs/php_codesniffer/tests/Core/Tokenizer/StableCommentWhitespaceTest.inc create mode 100644 vendor/squizlabs/php_codesniffer/tests/Core/Tokenizer/StableCommentWhitespaceTest.php create mode 100644 vendor/squizlabs/php_codesniffer/tests/Core/Tokenizer/StableCommentWhitespaceWinTest.inc create mode 100644 vendor/squizlabs/php_codesniffer/tests/Core/Tokenizer/StableCommentWhitespaceWinTest.php create mode 100644 vendor/squizlabs/php_codesniffer/tests/Core/Tokenizer/UndoNamespacedNameSingleTokenTest.inc create mode 100644 vendor/squizlabs/php_codesniffer/tests/Core/Tokenizer/UndoNamespacedNameSingleTokenTest.php create mode 100644 vendor/squizlabs/php_codesniffer/tests/FileList.php create mode 100644 vendor/squizlabs/php_codesniffer/tests/Standards/AbstractSniffUnitTest.php create mode 100644 vendor/squizlabs/php_codesniffer/tests/Standards/AllSniffs.php create mode 100644 vendor/squizlabs/php_codesniffer/tests/TestSuite.php create mode 100644 vendor/squizlabs/php_codesniffer/tests/TestSuite7.php create mode 100644 vendor/squizlabs/php_codesniffer/tests/bootstrap.php diff --git a/.vscode/settings.json b/.vscode/settings.json new file mode 100644 index 00000000..b1404d52 --- /dev/null +++ b/.vscode/settings.json @@ -0,0 +1,3 @@ +{ + "phpsab.fixerEnable": false +} \ No newline at end of file diff --git a/composer.json b/composer.json new file mode 100644 index 00000000..6621cee4 --- /dev/null +++ b/composer.json @@ -0,0 +1,5 @@ +{ + "require-dev": { + "squizlabs/php_codesniffer": "^3.6" + } +} diff --git a/composer.lock b/composer.lock new file mode 100644 index 00000000..4cdb20c4 --- /dev/null +++ b/composer.lock @@ -0,0 +1,75 @@ +{ + "_readme": [ + "This file locks the dependencies of your project to a known state", + "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", + "This file is @generated automatically" + ], + "content-hash": "41d912bd58e662a1350f62ec1dc8f75b", + "packages": [], + "packages-dev": [ + { + "name": "squizlabs/php_codesniffer", + "version": "3.6.2", + "source": { + "type": "git", + "url": "https://github.com/squizlabs/PHP_CodeSniffer.git", + "reference": "5e4e71592f69da17871dba6e80dd51bce74a351a" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/squizlabs/PHP_CodeSniffer/zipball/5e4e71592f69da17871dba6e80dd51bce74a351a", + "reference": "5e4e71592f69da17871dba6e80dd51bce74a351a", + "shasum": "" + }, + "require": { + "ext-simplexml": "*", + "ext-tokenizer": "*", + "ext-xmlwriter": "*", + "php": ">=5.4.0" + }, + "require-dev": { + "phpunit/phpunit": "^4.0 || ^5.0 || ^6.0 || ^7.0" + }, + "bin": [ + "bin/phpcs", + "bin/phpcbf" + ], + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "3.x-dev" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Greg Sherwood", + "role": "lead" + } + ], + "description": "PHP_CodeSniffer tokenizes PHP, JavaScript and CSS files and detects violations of a defined set of coding standards.", + "homepage": "https://github.com/squizlabs/PHP_CodeSniffer", + "keywords": [ + "phpcs", + "standards" + ], + "support": { + "issues": "https://github.com/squizlabs/PHP_CodeSniffer/issues", + "source": "https://github.com/squizlabs/PHP_CodeSniffer", + "wiki": "https://github.com/squizlabs/PHP_CodeSniffer/wiki" + }, + "time": "2021-12-12T21:44:58+00:00" + } + ], + "aliases": [], + "minimum-stability": "stable", + "stability-flags": [], + "prefer-stable": false, + "prefer-lowest": false, + "platform": [], + "platform-dev": [], + "plugin-api-version": "2.2.0" +} diff --git a/database/class-enp_quiz_db.php b/database/class-enp_quiz_db.php index 824125d5..d2b3803e 100644 --- a/database/class-enp_quiz_db.php +++ b/database/class-enp_quiz_db.php @@ -1,20 +1,23 @@ quiz_table = $enp_quiz_table_quiz; $this->quiz_option_table = $enp_quiz_table_quiz_option; @@ -38,160 +41,175 @@ public function __construct() { PDO::ATTR_ERRMODE => PDO::ERRMODE_EXCEPTION ); // create the new connection - parent::__construct('mysql:host='.$enp_db_host.';dbname='.$enp_db_name, - $enp_db_user, - $enp_db_password, - $options); - } catch (Exception $e) { - $this->errors = $e->getMessage(); - } + parent::__construct( + 'mysql:host=' . $enp_db_host . ';dbname=' . $enp_db_name, + $enp_db_user, + $enp_db_password, + $options + ); + } catch (Exception $e) { + $this->errors = $e->getMessage(); + } } - public function query($sql, $params = null) { + public function query($sql, $params = null) + { $stmt = $this->prepare($sql); - $stmt->execute($params); - return $stmt; - } + $stmt->execute($params); + return $stmt; + } - public function fetchOne($sql, $params = []) { + public function fetchOne($sql, $params = []) + { $stmt = $this->query($sql, $params); return $stmt->fetch(PDO::FETCH_ASSOC); } - public function fetchAll($sql, $params = []) { + public function fetchAll($sql, $params = []) + { $stmt = $this->query($sql, $params); - return $stmt->fetchAll(PDO::FETCH_ASSOC); + return $stmt->fetchAll(PDO::FETCH_ASSOC); } /* - * Get Quizzes - * - */ - public function getQuizzes($where = []) { + * Get Quizzes + * + */ + public function getQuizzes($where = []) + { $params = $this->buildParams($where); - $sql = "SELECT * from ".$this->quiz_table." WHERE quiz_is_deleted = 0"; - - if($where) { - $sql .= $this->buildWhere($params, true); - } - - return $this->fetchAll($sql, $params); - } - - /* - * Get Domains - * - */ - public function getDomains($where = []) { + $sql = "SELECT * from " . $this->quiz_table . " WHERE quiz_is_deleted = 0"; + + if ($where) { + $sql .= $this->buildWhere($params, true); + } + + return $this->fetchAll($sql, $params); + } + + /* + * Get Domains + * + */ + public function getDomains($where = []) + { $params = $this->buildParams($where); - $sql = "SELECT DISTINCT(SUBSTRING_INDEX((SUBSTRING_INDEX((SUBSTRING_INDEX(embed_site_url, '://', -1)), '/', 1)), '.', -2)) as domain from ".$this->embed_site_table; - - if($where) { - $sql .= $this->buildWhere($params, true); - } - - return $this->fetchAll($sql, $params); + $sql = "SELECT DISTINCT(SUBSTRING_INDEX((SUBSTRING_INDEX((SUBSTRING_INDEX(embed_site_url, '://', -1)), '/', 1)), '.', -2)) as domain from " . $this->embed_site_table; + + if ($where) { + $sql .= $this->buildWhere($params, true); + } + + return $this->fetchAll($sql, $params); } - - /* - * Get Sites - * - */ - public function getSites($where = []) { + + /* + * Get Sites + * + */ + public function getSites($where = []) + { $params = $this->buildParams($where); - $sql = "SELECT * from ".$this->embed_site_table; - - if($where) { - $sql .= $this->buildWhere($params, true); - } - - return $this->fetchAll($sql, $params); - } - - /* - * Get Embeds - * - */ - public function getEmbeds($where = []) { + $sql = "SELECT * from " . $this->embed_site_table; + + if ($where) { + $sql .= $this->buildWhere($params, true); + } + + return $this->fetchAll($sql, $params); + } + + /* + * Get Embeds + * + */ + public function getEmbeds($where = []) + { $params = $this->buildParams($where); - $sql = "SELECT * from ".$this->embed_quiz_table; - - if($where) { - $sql .= $this->buildWhere($params, true); - } - - return $this->fetchAll($sql, $params); - } - - // TOTALS - public function getResponsesCorrectTotal() { - $sql = "SELECT COUNT(*) from ".$this->response_question_table." WHERE response_correct = 1"; - return (int) $this->fetchOne($sql)['COUNT(*)']; - } - - public function getResponsesIncorrectTotal() { - $sql = "SELECT COUNT(*) from ".$this->response_question_table." WHERE response_correct = 0"; - return (int) $this->fetchOne($sql)['COUNT(*)']; - } - - public function getMCQuestionsTotal() { - $sql = "SELECT COUNT(*) from ".$this->question_table." WHERE question_type = 'mc'"; - return (int) $this->fetchOne($sql)['COUNT(*)']; - } - - public function getSliderQuestionsTotal() { - $sql = "SELECT COUNT(*) from ".$this->question_table." WHERE question_type = 'slider'"; - return (int) $this->fetchOne($sql)['COUNT(*)']; - } - - public function getUniqueUsersTotal() { - $sql = "SELECT COUNT(DISTINCT user_id) as users - FROM ".$this->response_quiz_table; - - return (int) $this->fetchOne($sql)['users']; - - } - public function buildWhere($params, $where = true) { - $sql = ''; - if($where === true) { - $sql = ' WHERE '; - } - if(!empty($params)) { - $i = 1; - foreach($params as $key => $val) { - if(is_array($val)) { - // for things like 'date > :date' - $sql .= $val['key'].' '.$val['operator'].' '.$val['val']; - } else { - $sql .= $key.' = '.$val; - } - if($i !== count($params)) { - // not the last one, so add an AND statement - $where .= " AND "; - $i++; - } - } - } - return $sql; - } - - /** - * Builds out bound parameters in the array by adding a : to the beginning of the array keys - * - * @param $params ARRAY - * @return ARRAY - */ - public function buildParams($params) { - $bound = []; - - foreach($params as $key => $val) { - $bound[$key] = $val; - } - - return $bound; - } + $sql = "SELECT * from " . $this->embed_quiz_table; + + if ($where) { + $sql .= $this->buildWhere($params, true); + } + + return $this->fetchAll($sql, $params); + } + + // TOTALS + public function getResponsesCorrectTotal() + { + $sql = "SELECT COUNT(*) from " . $this->response_question_table . " WHERE response_correct = 1"; + return (int) $this->fetchOne($sql)['COUNT(*)']; + } + + public function getResponsesIncorrectTotal() + { + $sql = "SELECT COUNT(*) from " . $this->response_question_table . " WHERE response_correct = 0"; + return (int) $this->fetchOne($sql)['COUNT(*)']; + } + + public function getMCQuestionsTotal() + { + $sql = "SELECT COUNT(*) from " . $this->question_table . " WHERE question_type = 'mc'"; + return (int) $this->fetchOne($sql)['COUNT(*)']; + } + + public function getSliderQuestionsTotal() + { + $sql = "SELECT COUNT(*) from " . $this->question_table . " WHERE question_type = 'slider'"; + return (int) $this->fetchOne($sql)['COUNT(*)']; + } + + public function getUniqueUsersTotal() + { + $sql = "SELECT COUNT(DISTINCT user_id) as users + FROM " . $this->response_quiz_table; + + return (int) $this->fetchOne($sql)['users']; + } + public function buildWhere($params, $where = true) + { + $sql = ''; + if ($where === true) { + $sql = ' WHERE '; + } + if (!empty($params)) { + $i = 1; + foreach ($params as $key => $val) { + if (is_array($val)) { + // for things like 'date > :date' + $sql .= $val['key'] . ' ' . $val['operator'] . ' ' . $val['val']; + } else { + $sql .= $key . ' = ' . $val; + } + if ($i !== count($params)) { + // not the last one, so add an AND statement + $where .= " AND "; + $i++; + } + } + } + return $sql; + } + + /** + * Builds out bound parameters in the array by adding a : to the beginning of the array keys + * + * @param $params ARRAY + * @return ARRAY + */ + public function buildParams($params) + { + $bound = []; + + foreach ($params as $key => $val) { + $bound[$key] = $val; + } + + return $bound; + } } diff --git a/database/class-enp_quiz_save_quiz.php b/database/class-enp_quiz_save_quiz.php index dbd1a734..a9bc20ac 100644 --- a/database/class-enp_quiz_save_quiz.php +++ b/database/class-enp_quiz_save_quiz.php @@ -1,4 +1,5 @@ */ -class Enp_quiz_Save_quiz extends Enp_quiz_Save { - protected static $quiz, - $quiz_obj, - $response_obj, - $user_action_action, - $user_action_element, - $user_action_details; - - public function __construct() { - - } - - public function save($quiz) { - // first off, sanitize the whole submitted thang - self::$quiz = $this->sanitize_array($quiz); - // flatten it out to make it easier to work with - self::$quiz = $this->flatten_quiz_array(self::$quiz); - - // Open a new response object - self::$response_obj = new Enp_quiz_Save_quiz_Response(); - // setup the user_action response - self::$response_obj->set_user_action_response(self::$quiz); - // these are referenced a lot, so lets set a quick link up for them - self::$user_action_action = self::$response_obj->get_user_action_action(); - self::$user_action_element = self::$response_obj->get_user_action_element(); - self::$user_action_details = self::$response_obj->get_user_action_details(); - - // create our object - self::$quiz_obj = new Enp_quiz_Quiz(self::$quiz['quiz_id']); - // fill the quiz with all the values - $this->prepare_submitted_quiz(); - // process questions - $this->prepare_submitted_questions(); - - // Check if we're allowed to save. If any glaring errors, return the errors here - // TODO: Check to make sure we can save. If there are errors, just return to page! - - // Alrighty! - // actually save the quiz - $this->save_quiz(); - - // if we are trying to move to preview, check - // for error messages (like, not enough mc_options, no correct option set, no questions, etc...) - if(self::$user_action_action === 'next') { - // builds error messages if trying to preview quiz - $quiz_obj_validate = new Enp_quiz_Quiz(self::$quiz['quiz_id']); - $validate = self::$response_obj->validate_quiz_and_questions($quiz_obj_validate); - - // see if they're trying to publish the quiz - if(self::$user_action_element === 'publish') { - if($validate === 'valid') { - // is the quiz already published? - if(self::$quiz_obj->get_quiz_status() !== 'published') { - // OK, it's good! Publish it! - $this->pdo_publish_quiz(); - // now let's reset the data and responses on that quiz as well - // delete all the responses & reset the stats for the quiz and questions - $quiz_data = new Enp_quiz_Save_quiz_take_Quiz_data(self::$quiz_obj); - $quiz_data->delete_quiz_responses(self::$quiz_obj); - } else { - // don't worry about it, probably just clicked on the "embed" on the quiz preview/settings page - } - - } - } - } - - // check to see if we need to trigger a rescrape from Facebook to update the OG Tags - $this->facebook_api_rescrape(); - - // return the response to the user - return self::$response_obj; - } - - /** - * The quiz they submit isn't in the exact format we want it in - * so we need to reindex it to a nice format and set their values - * - * @param $quiz = array() in this format: - * $quiz = array( - * 'quiz' => $_POST['enp_quiz'], // array of quiz values (quiz_id, quiz_title, etc) - * 'questions' => $_POST['enp_question'], // array of questions - * 'quiz_updated_by' => $user_id, - * 'quiz_updated_at' => $date_time, - * ); - * @return nicely formatted and value validated quiz array ready for saving - */ - protected function prepare_submitted_quiz() { - - $quiz_id = $this->set_quiz_value('quiz_id', 0); - $quiz_title = $this->set_quiz_value('quiz_title', ''); - $quiz_status = $this->set_quiz_value('quiz_status', 'draft'); - $quiz_finish_message = $this->set_quiz_value('quiz_finish_message', 'Thanks for taking our quiz!'); - $quiz_updated_by = $this->set_quiz_value('quiz_updated_by', 0); - $quiz_updated_at = $this->set_quiz_value('quiz_updated_at', date("Y-m-d H:i:s")); - $quiz_owner = $this->set_quiz_value__object_first('quiz_owner', $quiz_updated_by); - $quiz_created_by = $this->set_quiz_value__object_first('quiz_created_by', $quiz_updated_by); - $quiz_created_at = $this->set_quiz_value('quiz_created_at', $quiz_updated_at); - $quiz_is_deleted = $this->set_quiz_is_deleted(); - // Options - $quiz_title_display = $this->set_quiz_value('quiz_title_display', 'show'); - $quiz_mc_options_order = $this->set_quiz_value('quiz_mc_options_order', 'random'); - $quiz_width = $this->set_quiz_css_measurement_value('quiz_width', '100%'); - $quiz_bg_color = $this->set_quiz_hex_value('quiz_bg_color', '#ffffff'); - $quiz_text_color = $this->set_quiz_hex_value('quiz_text_color', '#444444'); - $quiz_border_color = $this->set_quiz_hex_value('quiz_border_color', '#dddddd'); - $quiz_button_color = $this->set_quiz_hex_value('quiz_button_color', '#5887C0'); - $quiz_correct_color = $this->set_quiz_hex_value('quiz_correct_color', '#3bb275'); - $quiz_incorrect_color = $this->set_quiz_hex_value('quiz_incorrect_color', '#f14021'); - - // custom css - $quiz_custom_css = $this->set_quiz_css_value('quiz_custom_css', '', false); - $quiz_custom_css_minified = $this->optimize_css($quiz_custom_css); - - // facebook - $facebook_title = $this->set_quiz_value('facebook_title', $quiz_title); - $facebook_description = $this->set_quiz_value('facebook_description', 'How well can you do?'); - $facebook_quote_end = $this->set_quiz_value('facebook_quote_end', 'I got {{score_percentage}}% right.'); - // email - $email_subject = $facebook_title; - $email_body_start = $facebook_description; - $email_body_end = $facebook_quote_end.' - -'.$facebook_description; - // twitter - $include_url = true; - $replace_mustache = true; - $tweet_end = $this->set_tweet_value('tweet_end', 'I got {{score_percentage}}% right on this quiz. How many can you get right?', $include_url, $replace_mustache); - - $default_quiz = array( - 'quiz_id' => $quiz_id, - 'quiz_title' => $quiz_title, - 'quiz_status' => $quiz_status, - 'quiz_finish_message' => $quiz_finish_message, - 'quiz_owner' => $quiz_owner, - 'quiz_created_by' => $quiz_created_by, - 'quiz_created_at' => $quiz_created_at, - 'quiz_updated_by' => $quiz_updated_by, - 'quiz_updated_at' => $quiz_updated_at, - 'quiz_is_deleted' => $quiz_is_deleted, - // quiz options - 'quiz_title_display' => $quiz_title_display, - 'quiz_mc_options_order' => $quiz_mc_options_order, - 'quiz_width' => $quiz_width, - 'quiz_bg_color' => $quiz_bg_color, - 'quiz_text_color' => $quiz_text_color, - 'quiz_border_color' => $quiz_border_color, - 'quiz_button_color' => $quiz_button_color, - 'quiz_correct_color' => $quiz_correct_color, - 'quiz_incorrect_color' => $quiz_incorrect_color, - // quiz options - css - 'quiz_custom_css' => $quiz_custom_css, - 'quiz_custom_css_minified' => $quiz_custom_css_minified, - - // quiz options - share text - 'facebook_title' => $facebook_title, - 'facebook_description' => $facebook_description, - 'facebook_quote_end' => $facebook_quote_end, - // email is set off of facebook share content - 'email_subject' => $email_subject, - 'email_body_start' => $email_body_start, - 'email_body_end' => $email_body_end, - // tweet share text - 'tweet_end'=> $tweet_end, - ); - // We don't want to lose anything that was in the sent quiz (like questions, etc) - // so we'll merge them to make sure we don't lose anything - self::$quiz = array_merge(self::$quiz, $default_quiz); - } - /** - * Reformat and set values for all submitted questions - * - * @param $questions = array() in this format: - * $questions = array( - * array( - * $question = array( - * 'question_id' => $question['question_id'], - * 'question_title' =>$question['question_title'], - * 'question_type' =>$question['question_type'], - * 'slider' || 'mc_option' => array(); - * 'question_explanation' => $question['question_explanation'], - * 'question_order' => $question['question_order'], - * ); - * ), - * ); - * @return nicely formatted and value validated questions array ready for saving - */ - protected function prepare_submitted_questions() { - - $allow_question_save = $this->preprocess_questions(); - if($allow_question_save === 'no_questions') { - // nothing to save/insert here... - return false; - } - // start our counter for our question_order - $i = 0; - // open a new default_questions array - $prepared_questions = array(); - // loop through all submitted questions - foreach(self::$quiz['question'] as $question) { - // see if we're supposed to delete this question - $question['question_is_deleted'] = $this->preprocess_deleted_question($question); - - // Check if we're deleting this question - if($question['question_is_deleted'] === 0) { - // we're clear! - // add in our new question_order value - $question['question_order'] = $i; - $i++; - } else { - // if we're deleting the question, we need to set the question_order - // differently and NOT increase the question_order counter - // add in our new question_order value - $question['question_order'] = -1; - } - - // create the object - $question_obj = new Enp_quiz_Save_question(); - // prepare the values - $question = $question_obj->prepare_submitted_question($question); - // set the nicely formatted returned $question - $prepared_questions[] = $question; - - - } - - // We don't want to lose anything that was in the sent quiz - // so we'll merge them to make sure we don't lose anything - self::$quiz['question'] = $prepared_questions; - } - - protected function preprocess_questions() { - // If user action is ADD QUESTION - // create a dummy question to insert in the DB - if(self::$user_action_action === 'add' && self::$user_action_element === 'question') { - // create a blank question in the db - if(!array_key_exists('question', self::$quiz)) { - // this is the first question for the quiz, we need to create an empty array for it. - // the values will get automatically generated later by our prepare_question functions - self::$quiz['question'] = array(); - } - // add a new empty question array to the end of the array - // so our foreach loop will run one extra time - self::$quiz['question'][] = array(); - } - elseif(!array_key_exists('question', self::$quiz)) { - return 'no_questions'; - } - // see if we're moving a question - elseif(self::$user_action_action === 'move' && self::$user_action_element === 'question') { - // make sure we're not moving it to a location that's not possible with this array. If it's greater than array count, just set it as the last one - $to = self::$user_action_details['move_question_to']; - - if(count(self::$quiz['question']) < $to) { - $to = count($array); - } - elseif($to <= -1) { - $to = 0; - } - - // get index of the one you want to move - $index = 0; - foreach(self::$quiz['question'] as $question) { - if($question['question_id'] == self::$user_action_details['question_id']) { - // this is it! - break; - } - $index++; - } - - // check to make sure we're trying to move it to a new position, otherwise this is pointless - if($to === $index) { - return; - } - - // find the position of the element we want to move - $from = array_splice(self::$quiz['question'], $index, 1); - // actually move it - array_splice(self::$quiz['question'], $to, 0, $from); - } - } - - /** - * we need to check if a question is trying to be deleted, so we know - * to NOT increase the order counter and to flag the is_deleted value - * @param $question (array) question submitted from form - * @return $is_deleted (int) 1 = delete, 0 = not deleted - */ - protected function preprocess_deleted_question($question) { - $is_deleted = 0; - // see if we're supposed to delete a question - if(self::$user_action_action === 'delete' && self::$user_action_element === 'question') { - // flag it as being deleted - // if they want to delete, see if we match the question_id - $question_id_to_delete = self::$user_action_details['question_id']; - if($question_id_to_delete === (int) $question['question_id']) { - // we've got a match! this is the one they want to delete - $is_deleted = 1; - } - } - - return $is_deleted; - } - - /** - * Reformats quiz array into something easier to work with - * array('quiz' => array('quiz_id'=>1, 'quiz_title'=>'Untitled',...)); - * becomes - * array('quiz_id'=>0, quiz_title' => 'Untitled'...) - */ - protected function flatten_quiz_array($submitted_quiz) { - $flattened_quiz = array(); - if(array_key_exists('quiz', $submitted_quiz) && is_array($submitted_quiz['quiz'])) { - // Flatten the submitted arrays a bit to make it easier to understand - $flattened_quiz = $submitted_quiz['quiz']; - // unset (delete) the quiz - unset($submitted_quiz['quiz']); - } - - if(array_key_exists('question', $submitted_quiz) && is_array($submitted_quiz['question'])) { - // get the question - $flattened_quiz['question'] = $submitted_quiz['question']; - // unset (delete) the quiz - unset($submitted_quiz['question']); - } - - // merge the remainder - $flattened_quiz = array_merge($submitted_quiz, $flattened_quiz); - - return $flattened_quiz; - } - - /* - * Sanitize all keys and values of an array. Loops through ALL arrays (even nested) - */ - protected function sanitize_array($array) { - $sanitized_array = array(); - // check to make sure it's an array - if (!is_array($array) || !count($array)) { - return $sanitized_array; - } - // loop through each key/value - foreach ($array as $key => $value) { - // sanitize the key - $key = sanitize_key($key); - - // if it's not an array, sanitize the value - if (!is_array($value) && !is_object($value)) { - $sanitized_array[$key] = sanitize_text_field($value); - } - - // if it is an array, loop through that array with the same function - if (is_array($value)) { - $sanitized_array[$key] = $this->sanitize_array($value); - } - } - // return our new, clean, sanitized array - return $sanitized_array; - } - - /** - * Core function that hooks everything together for saving - * Inserts or Updates the quiz in the database - * - * @return response array of quiz_id, action, status, and errors (if any) - */ - private function save_quiz() { - - // check for the quiz_title real quick - if(self::$quiz['quiz_title'] === '') { - // You had ONE job... - self::$response_obj->add_error('Please enter a quiz title.'); - return false; - } - - // If the quiz_obj doesn't exist the quiz object will set the quiz_id as null - if(self::$quiz_obj->get_quiz_id() === null) { - // Congratulations, quiz! You're ready for insert! - $this->insert_quiz(); - // set the quiz_id on our array self::quiz array now that we have one - self::$quiz['quiz_id'] = self::$response_obj->quiz_id; - } else { - // check to make sure that the quiz owner matches - $allow_update = $this->allow_user_to_update_quiz(); - // update a quiz entry - if($allow_update === true) { - // the current user matches the quiz owner - $this->update_quiz(); - } else { - // Hmm... the user is trying to update a quiz that isn't theirs - self::$response_obj->add_error('Quiz Update not Allowed'); - return false; - } - } - - // save all of our questions and other stuff - // check to make sure a quiz_id is there - if(self::$quiz['quiz_id'] !== 0) { - // if a quiz_id is set, lets try saving the quiz options - $this->save_quiz_options(); - - // check to see if we HAVE questions to save - if(!empty(self::$quiz['question'])){ - $this->save_questions(); - } - - } else { - // hopefully won't ever happen... this would mean that the quiz_insert failed - // so we don't have a quiz to assign these questions to - self::$response_obj->add_error('Questions could not be saved to your quiz.'); - return false; - } - - } - - /** - * Check to see if the owner of the submitted quiz matches - * the one they want to update - * - * @param $quiz_owner_id = Selected quiz row from database - * @param $user_id = User trying to update the quiz - * @return (BOOLEAN) true if current user owns quiz, false if not - * @since 0.0.1 - */ - protected function quiz_owned_by_current_user() { - // cast to integers to make sure we're talkin the same talk here - $quiz_owner_id = (int) self::$quiz_obj->get_quiz_owner(); - $current_user_id = (int) self::$quiz['quiz_updated_by']; - // set it to false to start. Guilty til proven innocent. - $quiz_owned_by_current_user = false; - - // check to make sure we have values for each - if($quiz_owner_id !== false && $current_user_id !== false ) { - // check to see if the owner and user match - if($quiz_owner_id === $current_user_id) { - // if they match, then it's legit - $quiz_owned_by_current_user = true; - } - } - - return $quiz_owned_by_current_user; - } - - /** - * See if we should allow the current user to update the quiz - * @return (BOOLEAN) true if we should allow the user - * to update the quiz, false if not - */ - protected function allow_user_to_update_quiz() { - $allow_save = false; - // see if user is admin or not - if(current_user_can('manage_options') === true) { - $allow_save = true; - } else { - // see if this user owns the quiz - $allow_save = $this->quiz_owned_by_current_user(); - } - - return $allow_save; - } - - /** - * Connects to DB and inserts the quiz. - * @return builds and returns a response message - */ - protected function insert_quiz() { - // connect to PDO - $pdo = new enp_quiz_Db(); - // Get our Parameters ready - $params = array(':quiz_title' => self::$quiz['quiz_title'], - ':quiz_status' => self::$quiz['quiz_status'], - ':quiz_finish_message' => self::$quiz['quiz_finish_message'], - ':quiz_owner' => self::$quiz['quiz_owner'], - ':quiz_created_by' => self::$quiz['quiz_created_by'], - ':quiz_created_at' => self::$quiz['quiz_created_at'], - ':quiz_updated_by' => self::$quiz['quiz_updated_by'], - ':quiz_updated_at' => self::$quiz['quiz_updated_at'], - ':quiz_is_deleted' => self::$quiz['quiz_is_deleted'], - ); - // write our SQL statement - $sql = "INSERT INTO ".$pdo->quiz_table." ( - quiz_title, - quiz_status, - quiz_finish_message, - quiz_owner, - quiz_created_by, - quiz_created_at, - quiz_updated_by, - quiz_updated_at, - quiz_is_deleted - ) - VALUES( - :quiz_title, - :quiz_status, - :quiz_finish_message, - :quiz_owner, - :quiz_created_by, - :quiz_created_at, - :quiz_updated_by, - :quiz_updated_at, - :quiz_is_deleted - )"; - // insert the quiz into the database - $stmt = $pdo->query($sql, $params); - - // success! - if($stmt !== false) { - self::$quiz['quiz_id'] = $pdo->lastInsertId(); - self::$response_obj->set_status('success'); - self::$response_obj->set_action('insert'); - self::$response_obj->add_success('Quiz created.'); - // build a full response object - self::$response_obj->set_quiz_response(self::$quiz); - - } else { - self::$response_obj->add_error('Quiz could not be added to the database. Try again and if it continues to not work, send us an email with details of how you got to this error.'); - } - } - - /** - * Connects to DB and updates the quiz. - * @return builds and returns a response message - */ - protected function update_quiz() { - // connect to PDO - $pdo = new enp_quiz_Db(); - - $params = $this->set_update_quiz_params(); - - $sql = "UPDATE ".$pdo->quiz_table." - SET quiz_title = :quiz_title, - quiz_status = :quiz_status, - quiz_finish_message = :quiz_finish_message, - quiz_updated_by = :quiz_updated_by, - quiz_updated_at = :quiz_updated_at, - quiz_is_deleted = :quiz_is_deleted - - WHERE quiz_id = :quiz_id - AND quiz_owner = :quiz_owner - "; - - $stmt = $pdo->query($sql, $params); - - // success! - if($stmt !== false) { - self::$response_obj->set_status('success'); - self::$response_obj->set_action('update'); - - // if we're deleting the quiz, don't say "quiz saved" - if(self::$user_action_action === 'delete' && self::$user_action_element === 'quiz') { - self::$response_obj->add_success('Quiz deleted.'); - // kick off the process of deleting all AB tests related to this quiz - $ab_test_delete_response = $this->delete_quiz_ab_tests(self::$quiz_obj->get_quiz_id(), self::$quiz['quiz_owner']); - // merge deleting ab tests with the global response - self::$response_obj->set_ab_test_delete_response($ab_test_delete_response); - - } else { - self::$response_obj->add_success('Quiz saved.'); - } - - // build a full response object - self::$response_obj->set_quiz_response(self::$quiz); - } else { - self::$response_obj->add_error('Quiz could not be updated. Try again and if it continues to not work, send us an email with details of how you got to this error.'); - } - - } - - protected function save_quiz_options() { - // this effectively whitelists it for us - $quiz_options = array('quiz_title_display', - 'quiz_mc_options_order', - 'quiz_width', - 'quiz_bg_color', - 'quiz_text_color', - 'quiz_border_color', - 'quiz_button_color', - 'quiz_correct_color', - 'quiz_incorrect_color', - 'quiz_custom_css', - 'quiz_custom_css_minified', - 'facebook_title', - 'facebook_description', - 'facebook_quote_end', - 'email_subject', - 'email_body_start', - 'email_body_end', - 'tweet_end' - ); - foreach($quiz_options as $quiz_option) { - if(array_key_exists($quiz_option, self::$quiz)) { - $save_quiz_option = new Enp_quiz_Save_quiz_option(); - $save_quiz_option->save_quiz_option($quiz_option); - } - } - - } - - /** - * Connects to DB and updates the quiz. - * @return builds and returns a response message - */ - protected function pdo_publish_quiz() { - // connect to PDO - $pdo = new enp_quiz_Db(); - - $params = array(':quiz_id' => self::$quiz_obj->get_quiz_id(), - ':quiz_status' => 'published', - ':quiz_owner' => self::$quiz['quiz_owner'], - ':quiz_updated_by' => self::$quiz['quiz_updated_by'], - ':quiz_updated_at' => self::$quiz['quiz_updated_at'] - ); - - $sql = "UPDATE ".$pdo->quiz_table." - SET quiz_status = :quiz_status, - quiz_updated_by = :quiz_updated_by, - quiz_updated_at = :quiz_updated_at - WHERE quiz_id = :quiz_id - AND quiz_owner = :quiz_owner"; - - $stmt = $pdo->query($sql, $params); - - // success! - if($stmt !== false) { - self::$response_obj->set_quiz_id(self::$quiz['quiz_id']); - self::$response_obj->set_status('success'); - self::$response_obj->set_action('update'); - self::$response_obj->add_success('Quiz published!'); - } else { - self::$response_obj->add_error('Quiz could not be published. Try again and if it continues to not work, send us an email with details of how you got to this error.'); - } - - } - - /** - * Can be called from anywhere to publish a quiz - * - */ - public function publish_quiz($quiz) { - if(is_object($quiz)) { - $quiz = (array) $quiz; - } - // set our action - $quiz['user_action'] = 'quiz-publish'; - $this->save($quiz); - } - - /** - * Populate self::$quiz array with values - * from self::$quiz_obj if they're not present in self::$quiz - * We need all the values to brute update, but don't want to have to pass the - * values in every form. - * - * @param $slider = array(); of slider data - * @return ID of saved slider or false if error - * @since 0.0.1 - */ - protected function set_update_quiz_params() { - $params = array(':quiz_id' => self::$quiz_obj->get_quiz_id(), - ':quiz_title' => self::$quiz['quiz_title'], - ':quiz_status' => self::$quiz['quiz_status'], - ':quiz_finish_message' => self::$quiz['quiz_finish_message'], - ':quiz_owner' => self::$quiz['quiz_owner'], - ':quiz_updated_by' => self::$quiz['quiz_updated_by'], - ':quiz_updated_at' => self::$quiz['quiz_updated_at'], - ':quiz_is_deleted' => self::$quiz['quiz_is_deleted'] - ); - return $params; - } - - - /** - * Loop through a $quiz['question'] array to save to the db - * - * @param $question = array(); of all $quiz['question'] data - * @since 0.0.1 - */ - protected function save_questions() { - // loop through the questions and save each one - foreach(self::$quiz['question'] as $question) { - // save it! Yay! - // get access to the question object - $question_obj = new Enp_quiz_Save_question(); - // save the question - $question_obj->save_question($question); - } - } - - /** - * Check to see if a value was passed in self::$quiz array - * If it was, set it as the value. If it wasn't, set the value - * from self::$quiz_obj - * - * @param $key = key that should be set in the quiz array. - * @param $default = int or string of default value if nothing is found - * @return value from either self::$quiz[$key] or self::$quiz_obj->get_quiz_$key() - */ - protected function set_quiz_value($key, $default) { - $param_value = $default; - // see if the value is already in our submitted quiz - if(array_key_exists($key, self::$quiz) && self::$quiz[$key] !== "") { - $param_value = self::$quiz[$key]; - } else { - $obj_value = $this->get_quiz_object_value($key); - if($obj_value !== null) { - $param_value = $obj_value; - } - } - - return $param_value; - } - - /** - * Should be merged with set_quiz_value with an extra paramter to allow - * it to be an empty value. For example, with the set_quiz_value, you can't - * delete a field. With this method, you can delete fields. - * - * @param $key = key that should be set in the quiz array. - * @param $default = int or string of default value if nothing is found - * @return value from either self::$quiz[$key] or self::$quiz_obj->get_quiz_$key() - */ - protected function set_quiz_value__allow_empty($key, $default) { - $param_value = $default; - // see if the value is already in our submitted quiz - if(array_key_exists($key, self::$quiz)) { - $param_value = self::$quiz[$key]; - } else { - $obj_value = $this->get_quiz_object_value($key); - if($obj_value !== null) { - $param_value = $obj_value; - } - } - - return $param_value; - } - - /** - * Sometimes you need to set the value from the object first instead - * of the submitted value, such as for quiz_owner, when it might be - * updated by someone other than the quiz_owner (an admin) - * @param $key = key that should be set in the quiz array. - * @param $default = int or string of default value if nothing is found - * @return value from either self::$quiz[$key] or self::$quiz_obj->get_quiz_$key() - */ - public function set_quiz_value__object_first($key, $default) { - // see if the value is already in our quiz object - $obj_value = $this->get_quiz_object_value($key); - if($obj_value !== null) { - $param_value = $obj_value; - } elseif(array_key_exists($key, self::$quiz) && self::$quiz[$key] !== "") { - $param_value = self::$quiz[$key]; - } else { - $param_value = $default; - } - - return $param_value; - } - - /** - * Dynamically set our value from the quiz object - * @param $key = the value you want to get 'quiz_title', 'quiz_id', etc. - * @return $obj_value (mixed) value if found, null if not found - */ - protected function get_quiz_object_value($key) { - $obj_value = null; - // check to see if there's even an object - if(self::$quiz_obj->get_quiz_id() !== null) { - // if it's not in our submited quiz, try to get it from the object - // dynamically create the quiz getter function - $get_obj_value = 'get_'.$key; - // get the quiz object value - $obj_value = self::$quiz_obj->$get_obj_value(); - } - return $obj_value; - } - - /** - * Get and validate quiz value from object or set as default - * useful if user submission doesn't validate. - * - * @param $key = the value you want to get/set 'quiz_bg_color', 'quiz_width', etc. - * @param $default = the value you want to fall back to - * @param $validation = string of validation function 'css_measurement', 'hex', etc - * @return $value (mixed) quiz object value if found and valid, $default value if not found in object/invalid object value - */ - protected function validate_quiz_value_from_object($key, $default, $validation) { - // try to get the value from the object - $obj_value = $this->get_quiz_object_value($key); - // build our validation function string - $validate_function = 'validate_'.$validation; - // validate our object value - $valid_obj_value = $this->$validate_function($obj_value); - // if it's not valid, set it to the default - if($valid_obj_value === false) { - // ok, we've exhausted all or options. set it to the default - $value = $default; - } else { - // the object is valid, that's good! - $value = $obj_value; - } - return $value; - } - - /** - * Check to see if a value was passed in self::$quiz array - * If it was, set it as the value (after validating). If it wasn't, set the value - * from self::$quiz_obj or default - * - * @param $key = key that should be set in the quiz array. - * @param $default = int or string of default value if nothing is found - * @return value from either self::$quiz[$key] or self::$quiz_obj->get_quiz_$key() - */ - public function set_quiz_hex_value($key, $default) { - // set it with what they submitted - $hex = $this->set_quiz_value($key, $default); - // validate the hex - $valid_hex = $this->validate_hex($hex); - // check it - - if($valid_hex === false) { - // generate a good error message - self::$response_obj->add_error('Hex Color value for '.$key.' was not valid. Hex Color Value must be a valid Hex value like #ffffff'); - // if it's not a valid hex, try to get the old value from the object - // and fallback to default if necessary - $hex = $this->validate_quiz_value_from_object($key, $default, 'hex'); - } - - return $hex; - } - - /** - * Check to see if a value was passed in self::$quiz array - * If it was, set it as the value (after validating). If it wasn't, set the value - * from self::$quiz_obj or default - * - * @param $key = key that should be set in the quiz array. - * @param $default = int or string of default value if nothing is found - * @return value from either self::$quiz[$key] or self::$quiz_obj->get_quiz_$key() - */ - public function set_quiz_css_measurement_value($key, $default) { - // set it with what they submitted - $css_measurement = $this->set_quiz_value($key, $default); - // validate the hex - $valid_css_measurement = $this->validate_css_measurement($css_measurement); - // check it - if($valid_css_measurement === false) { - // add a good error message - self::$response_obj->add_error('CSS Measurement value for '.$key.' is not valid. Measurements can be any valid CSS Measurement such as 100%, 600px, 30rem, 80vw'); - // if it's not a valid css_measurement, try to get the old value from the object - // and fallback to default if necessary - $css_measurement = $this->validate_quiz_value_from_object($key, $default, 'css_measurement'); - } - - return $css_measurement; - } - - /** - * Sets a quiz value for CSS formatted entries by running it through CSS Tidy - * @param $key = key that should be set in the quiz array. - * @param $default = int or string of default value if nothing is found - * @param $minify (BOOLEAN) if you want it minified or more readable - * @return CSS Tidy formatted string - */ - public function set_quiz_css_value($key, $default = '', $minify = true) { - // set the value - $css = $this->set_quiz_value__allow_empty($key, $default); - // run it through css tidy - $css = $this->optimize_css($css, $minify); - // return it - return $css; - } - - /** - * Run a string through CSS tidy - * - * @param $css = submitted css - * @return optimized css from css tidy - */ - public function optimize_css($css, $minify = true) { - // it there isn't a value, return it - if(empty($css)) { - return ''; - } - // get the csstidy class - require_once ENP_QUIZ_PLUGIN_DIR . 'includes/css-tidy/class.csstidy.php'; - // open the CSS tidy class - $csstidy = new csstidy(); - $csstidy->optimise = $css; - - $csstidy->set_cfg( 'case_properties', false ); - // this also removes -moz, etc prefixes. - $csstidy->set_cfg( 'discard_invalid_properties', true ); - - if($minify === true) { - // minifies the css - $csstidy->set_cfg( 'template', 'highest'); - } else { - // don't change the case of the class/id names - $csstidy->set_cfg( 'optimise_shorthands', 0 ); - $csstidy->set_cfg( 'remove_last_;', false ); - $csstidy->set_cfg( 'template', ENP_QUIZ_PLUGIN_DIR . 'includes/css-tidy/formatted-css.tpl' ); - } - - $csstidy->parse( $css ); - - $css = $csstidy->print->plain(); - - return $css; - } - - /** - * Check to see if a value was passed in self::$quiz array - * If it was, set it as the value (after validating). If it wasn't, set the value - * from self::$quiz_obj or default - * - * @param $key = key that should be set in the quiz array. - * @param $default = int or string of default value if nothing is found - * @param $include_url (BOOLEAN) URLs count as 21 characters. Set true if - * you will be using a URL with the tweet - * @param $mustache (BOOLEAN) checks for {{score_percentage}} and replaces - * it with '100' if found - * @return value from either self::$quiz[$key] or self::$quiz_obj->get_quiz_$key() - */ - public function set_tweet_value($key, $default, $include_url, $mustache) { - // set it with what they submitted - $tweet = $this->set_quiz_value($key, $default); - // validate the tweet - $valid_tweet = $this->validate_tweet($tweet, $include_url, $mustache); - // check it - - if($valid_tweet === false) { - // generate a good error message - self::$response_obj->add_error('The tweet for '.$key.' has too many characters. It can\'t have more than 117 characters because sharing the URL for the quiz uses up 23 of the 140 available characters.'); - // if it's not a valid tweet, try to get the old value from the object - // and fallback to default if necessary - $tweet = $this->validate_quiz_value_from_object($key, $default, 'tweet'); - } - - return $tweet; - } - - /** - * In order to show the updated Facebook Share Title & Description, - * we have to tell Facebook to rescrape the URL to grab the updated content - */ - public function facebook_api_rescrape() { - $rescrape = false; - $new_title = self::$quiz['facebook_title']; - $old_title = self::$quiz_obj->get_facebook_title(); - $new_description = self::$quiz['facebook_description']; - $old_description = self::$quiz_obj->get_facebook_description(); - - // see if the submitted values match the current values or not - if($new_title !== $old_title || $new_description !== $old_description){ - $rescrape = true; - } - - if($rescrape === true) { - // curl post to have facebook rescrape - // set the ID off the response_obj just in case it's a new quiz - $this->facebook_curl_post(ENP_QUIZ_URL . self::$response_obj->quiz_id); - } - - } - - /** - * Sends a curl post request to FB to trigger a rescrape of the Quiz - * $quiz_url (string) The Quiz url you want to update. - */ - public function facebook_curl_post($quiz_url) { - $graph_url= "https://graph.facebook.com"; - - $postData = "id=" . $quiz_url . "&scrape=true"; - - $ch = curl_init(); - - curl_setopt($ch, CURLOPT_URL, $graph_url); - curl_setopt($ch, CURLOPT_HEADER, 0); - curl_setopt($ch, CURLOPT_POST, 1); - curl_setopt($ch, CURLOPT_POSTFIELDS, $postData); - curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); - curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 0); - - $output = curl_exec($ch); - curl_close($ch); - } - - - /** - * Decide if a quiz should be deleted or not - * @param self::$quiz - */ - protected function set_quiz_is_deleted() { - //get the current values (from submission or object) - $is_deleted = $this->set_quiz_value('quiz_is_deleted', '0'); - // see if the user action is to delete a quiz - if(self::$user_action_action === 'delete' && self::$user_action_element === 'quiz') { - // if they want to delete, see if we match the quiz ID - if(self::$user_action_details['quiz_id'] === (int) self::$quiz_obj->get_quiz_id()) { - // we've got a match! this is the one they want to delete - $is_deleted = 1; - } - } - // return if this one should be deleted or not - return $is_deleted; - } - - /** - * Deletes all AB Tests that this quiz is a part of - * @param $quiz_id (string/int) of the id of the quiz - * @return $ab_test_response (array) from deleting all the ab tests (which ids were deleted, if it was successful, etc) - */ - protected function delete_quiz_ab_tests($quiz_id, $quiz_owner) { - // get all the ab test ids that this quiz is a part of - $ab_test_ids = $this->get_all_quiz_ab_tests($quiz_id); - // if there are any, loop through them and delete em! - $ab_test_response = array(); - if(!empty($ab_test_ids)) { - // open the ab test save class - $save_ab_test = new Enp_quiz_Save_ab_test(); - foreach($ab_test_ids as $ab_test_id) { - $ab_test_params = array( - 'ab_test_id' => $ab_test_id, - 'ab_test_updated_by' => $quiz_owner - ); - $ab_test_response[] = $save_ab_test->delete($ab_test_params); - } - } - return $ab_test_response; - } - - /** - * Select all AB Tests that a quiz is a part of - * @param $quiz_id - * @return $ab_test_ids (array) of all AB Test IDs - */ - protected function get_all_quiz_ab_tests($quiz_id) { - $pdo = new enp_quiz_Db(); - // Do a select query to see if we get a returned row - $params = array( - ":quiz_id" => $quiz_id - ); - $sql = "SELECT ab_test_id from ".$pdo->ab_test_table." - WHERE (quiz_id_a = :quiz_id OR quiz_id_b = :quiz_id) - AND ab_test_is_deleted = 0"; - $stmt = $pdo->query($sql, $params); - $ab_test_row = $stmt->fetchAll(PDO::FETCH_COLUMN); - // return the found quiz row - return $ab_test_row; - } +class Enp_quiz_Save_quiz extends Enp_quiz_Save +{ + protected static $quiz, + $quiz_obj, + $response_obj, + $user_action_action, + $user_action_element, + $user_action_details; + + public function __construct() + { + } + + public function save($quiz) + { + // first off, sanitize the whole submitted thang + self::$quiz = $this->sanitize_array($quiz); + // flatten it out to make it easier to work with + self::$quiz = $this->flatten_quiz_array(self::$quiz); + + // Open a new response object + self::$response_obj = new Enp_quiz_Save_quiz_Response(); + // setup the user_action response + self::$response_obj->set_user_action_response(self::$quiz); + // these are referenced a lot, so lets set a quick link up for them + self::$user_action_action = self::$response_obj->get_user_action_action(); + self::$user_action_element = self::$response_obj->get_user_action_element(); + self::$user_action_details = self::$response_obj->get_user_action_details(); + + // create our object + self::$quiz_obj = new Enp_quiz_Quiz(self::$quiz['quiz_id']); + // fill the quiz with all the values + $this->prepare_submitted_quiz(); + // process questions + $this->prepare_submitted_questions(); + + // Check if we're allowed to save. If any glaring errors, return the errors here + // TODO: Check to make sure we can save. If there are errors, just return to page! + + // Alrighty! + // actually save the quiz + $this->save_quiz(); + + // if we are trying to move to preview, check + // for error messages (like, not enough mc_options, no correct option set, no questions, etc...) + if (self::$user_action_action === 'next') { + // builds error messages if trying to preview quiz + $quiz_obj_validate = new Enp_quiz_Quiz(self::$quiz['quiz_id']); + $validate = self::$response_obj->validate_quiz_and_questions($quiz_obj_validate); + + // see if they're trying to publish the quiz + if (self::$user_action_element === 'publish') { + if ($validate === 'valid') { + // is the quiz already published? + if (self::$quiz_obj->get_quiz_status() !== 'published') { + // OK, it's good! Publish it! + $this->pdo_publish_quiz(); + // now let's reset the data and responses on that quiz as well + // delete all the responses & reset the stats for the quiz and questions + $quiz_data = new Enp_quiz_Save_quiz_take_Quiz_data(self::$quiz_obj); + $quiz_data->delete_quiz_responses(self::$quiz_obj); + } else { + // don't worry about it, probably just clicked on the "embed" on the quiz preview/settings page + } + } + } + } + + // check to see if we need to trigger a rescrape from Facebook to update the OG Tags + $this->facebook_api_rescrape(); + + // return the response to the user + return self::$response_obj; + } + + /** + * The quiz they submit isn't in the exact format we want it in + * so we need to reindex it to a nice format and set their values + * + * @param $quiz = array() in this format: + * $quiz = array( + * 'quiz' => $_POST['enp_quiz'], // array of quiz values (quiz_id, quiz_title, etc) + * 'questions' => $_POST['enp_question'], // array of questions + * 'quiz_updated_by' => $user_id, + * 'quiz_updated_at' => $date_time, + * ); + * @return nicely formatted and value validated quiz array ready for saving + */ + protected function prepare_submitted_quiz() + { + + $quiz_id = $this->set_quiz_value('quiz_id', 0); + $quiz_title = $this->set_quiz_value('quiz_title', ''); + $quiz_title_test = $this->set_quiz_value('quiz_title_test', ''); + $quiz_status = $this->set_quiz_value('quiz_status', 'draft'); + $quiz_finish_message = $this->set_quiz_value('quiz_finish_message', 'Thanks for taking our quiz!'); + $quiz_updated_by = $this->set_quiz_value('quiz_updated_by', 0); + $quiz_updated_at = $this->set_quiz_value('quiz_updated_at', date("Y-m-d H:i:s")); + $quiz_owner = $this->set_quiz_value__object_first('quiz_owner', $quiz_updated_by); + $quiz_created_by = $this->set_quiz_value__object_first('quiz_created_by', $quiz_updated_by); + $quiz_created_at = $this->set_quiz_value('quiz_created_at', $quiz_updated_at); + $quiz_is_deleted = $this->set_quiz_is_deleted(); + // Options + $quiz_title_display = $this->set_quiz_value('quiz_title_display', 'show'); + $quiz_mc_options_order = $this->set_quiz_value('quiz_mc_options_order', 'random'); + $quiz_width = $this->set_quiz_css_measurement_value('quiz_width', '100%'); + $quiz_bg_color = $this->set_quiz_hex_value('quiz_bg_color', '#ffffff'); + $quiz_text_color = $this->set_quiz_hex_value('quiz_text_color', '#444444'); + $quiz_border_color = $this->set_quiz_hex_value('quiz_border_color', '#dddddd'); + $quiz_button_color = $this->set_quiz_hex_value('quiz_button_color', '#5887C0'); + $quiz_correct_color = $this->set_quiz_hex_value('quiz_correct_color', '#3bb275'); + $quiz_incorrect_color = $this->set_quiz_hex_value('quiz_incorrect_color', '#f14021'); + + // custom css + $quiz_custom_css = $this->set_quiz_css_value('quiz_custom_css', '', false); + $quiz_custom_css_minified = $this->optimize_css($quiz_custom_css); + + // facebook + $facebook_title = $this->set_quiz_value('facebook_title', $quiz_title); + $facebook_description = $this->set_quiz_value('facebook_description', 'How well can you do?'); + $facebook_quote_end = $this->set_quiz_value('facebook_quote_end', 'I got {{score_percentage}}% right.'); + // email + $email_subject = $facebook_title; + $email_body_start = $facebook_description; + $email_body_end = $facebook_quote_end . ' + +' . $facebook_description; + // twitter + $include_url = true; + $replace_mustache = true; + $tweet_end = $this->set_tweet_value('tweet_end', 'I got {{score_percentage}}% right on this quiz. How many can you get right?', $include_url, $replace_mustache); + + $default_quiz = array( + 'quiz_id' => $quiz_id, + 'quiz_title' => $quiz_title, + 'quiz_title_test' => $quiz_title_test, + 'quiz_status' => $quiz_status, + 'quiz_finish_message' => $quiz_finish_message, + 'quiz_owner' => $quiz_owner, + 'quiz_created_by' => $quiz_created_by, + 'quiz_created_at' => $quiz_created_at, + 'quiz_updated_by' => $quiz_updated_by, + 'quiz_updated_at' => $quiz_updated_at, + 'quiz_is_deleted' => $quiz_is_deleted, + // quiz options + 'quiz_title_display' => $quiz_title_display, + 'quiz_mc_options_order' => $quiz_mc_options_order, + 'quiz_width' => $quiz_width, + 'quiz_bg_color' => $quiz_bg_color, + 'quiz_text_color' => $quiz_text_color, + 'quiz_border_color' => $quiz_border_color, + 'quiz_button_color' => $quiz_button_color, + 'quiz_correct_color' => $quiz_correct_color, + 'quiz_incorrect_color' => $quiz_incorrect_color, + // quiz options - css + 'quiz_custom_css' => $quiz_custom_css, + 'quiz_custom_css_minified' => $quiz_custom_css_minified, + + // quiz options - share text + 'facebook_title' => $facebook_title, + 'facebook_description' => $facebook_description, + 'facebook_quote_end' => $facebook_quote_end, + // email is set off of facebook share content + 'email_subject' => $email_subject, + 'email_body_start' => $email_body_start, + 'email_body_end' => $email_body_end, + // tweet share text + 'tweet_end' => $tweet_end, + ); + // We don't want to lose anything that was in the sent quiz (like questions, etc) + // so we'll merge them to make sure we don't lose anything + self::$quiz = array_merge(self::$quiz, $default_quiz); + } + /** + * Reformat and set values for all submitted questions + * + * @param $questions = array() in this format: + * $questions = array( + * array( + * $question = array( + * 'question_id' => $question['question_id'], + * 'question_title' =>$question['question_title'], + * 'question_type' =>$question['question_type'], + * 'slider' || 'mc_option' => array(); + * 'question_explanation' => $question['question_explanation'], + * 'question_order' => $question['question_order'], + * ); + * ), + * ); + * @return nicely formatted and value validated questions array ready for saving + */ + protected function prepare_submitted_questions() + { + + $allow_question_save = $this->preprocess_questions(); + if ($allow_question_save === 'no_questions') { + // nothing to save/insert here... + return false; + } + // start our counter for our question_order + $i = 0; + // open a new default_questions array + $prepared_questions = array(); + // loop through all submitted questions + foreach (self::$quiz['question'] as $question) { + // see if we're supposed to delete this question + $question['question_is_deleted'] = $this->preprocess_deleted_question($question); + + // Check if we're deleting this question + if ($question['question_is_deleted'] === 0) { + // we're clear! + // add in our new question_order value + $question['question_order'] = $i; + $i++; + } else { + // if we're deleting the question, we need to set the question_order + // differently and NOT increase the question_order counter + // add in our new question_order value + $question['question_order'] = -1; + } + + // create the object + $question_obj = new Enp_quiz_Save_question(); + // prepare the values + $question = $question_obj->prepare_submitted_question($question); + // set the nicely formatted returned $question + $prepared_questions[] = $question; + } + + // We don't want to lose anything that was in the sent quiz + // so we'll merge them to make sure we don't lose anything + self::$quiz['question'] = $prepared_questions; + } + + protected function preprocess_questions() + { + // If user action is ADD QUESTION + // create a dummy question to insert in the DB + if (self::$user_action_action === 'add' && self::$user_action_element === 'question') { + // create a blank question in the db + if (!array_key_exists('question', self::$quiz)) { + // this is the first question for the quiz, we need to create an empty array for it. + // the values will get automatically generated later by our prepare_question functions + self::$quiz['question'] = array(); + } + // add a new empty question array to the end of the array + // so our foreach loop will run one extra time + self::$quiz['question'][] = array(); + } elseif (!array_key_exists('question', self::$quiz)) { + return 'no_questions'; + } + // see if we're moving a question + elseif (self::$user_action_action === 'move' && self::$user_action_element === 'question') { + // make sure we're not moving it to a location that's not possible with this array. If it's greater than array count, just set it as the last one + $to = self::$user_action_details['move_question_to']; + + if (count(self::$quiz['question']) < $to) { + $to = count($array); + } elseif ($to <= -1) { + $to = 0; + } + + // get index of the one you want to move + $index = 0; + foreach (self::$quiz['question'] as $question) { + if ($question['question_id'] == self::$user_action_details['question_id']) { + // this is it! + break; + } + $index++; + } + + // check to make sure we're trying to move it to a new position, otherwise this is pointless + if ($to === $index) { + return; + } + + // find the position of the element we want to move + $from = array_splice(self::$quiz['question'], $index, 1); + // actually move it + array_splice(self::$quiz['question'], $to, 0, $from); + } + } + + /** + * we need to check if a question is trying to be deleted, so we know + * to NOT increase the order counter and to flag the is_deleted value + * @param $question (array) question submitted from form + * @return $is_deleted (int) 1 = delete, 0 = not deleted + */ + protected function preprocess_deleted_question($question) + { + $is_deleted = 0; + // see if we're supposed to delete a question + if (self::$user_action_action === 'delete' && self::$user_action_element === 'question') { + // flag it as being deleted + // if they want to delete, see if we match the question_id + $question_id_to_delete = self::$user_action_details['question_id']; + if ($question_id_to_delete === (int) $question['question_id']) { + // we've got a match! this is the one they want to delete + $is_deleted = 1; + } + } + + return $is_deleted; + } + + /** + * Reformats quiz array into something easier to work with + * array('quiz' => array('quiz_id'=>1, 'quiz_title'=>'Untitled',...)); + * becomes + * array('quiz_id'=>0, quiz_title' => 'Untitled'...) + */ + protected function flatten_quiz_array($submitted_quiz) + { + $flattened_quiz = array(); + if (array_key_exists('quiz', $submitted_quiz) && is_array($submitted_quiz['quiz'])) { + // Flatten the submitted arrays a bit to make it easier to understand + $flattened_quiz = $submitted_quiz['quiz']; + // unset (delete) the quiz + unset($submitted_quiz['quiz']); + } + + if (array_key_exists('question', $submitted_quiz) && is_array($submitted_quiz['question'])) { + // get the question + $flattened_quiz['question'] = $submitted_quiz['question']; + // unset (delete) the quiz + unset($submitted_quiz['question']); + } + + // merge the remainder + $flattened_quiz = array_merge($submitted_quiz, $flattened_quiz); + + return $flattened_quiz; + } + + /* + * Sanitize all keys and values of an array. Loops through ALL arrays (even nested) + */ + protected function sanitize_array($array) + { + $sanitized_array = array(); + // check to make sure it's an array + if (!is_array($array) || !count($array)) { + return $sanitized_array; + } + // loop through each key/value + foreach ($array as $key => $value) { + // sanitize the key + $key = sanitize_key($key); + + // if it's not an array, sanitize the value + if (!is_array($value) && !is_object($value)) { + $sanitized_array[$key] = sanitize_text_field($value); + } + + // if it is an array, loop through that array with the same function + if (is_array($value)) { + $sanitized_array[$key] = $this->sanitize_array($value); + } + } + // return our new, clean, sanitized array + return $sanitized_array; + } + + /** + * Core function that hooks everything together for saving + * Inserts or Updates the quiz in the database + * + * @return response array of quiz_id, action, status, and errors (if any) + */ + private function save_quiz() + { + + // check for the quiz_title real quick + if (self::$quiz['quiz_title'] === '') { + // You had ONE job... + self::$response_obj->add_error('Please enter a quiz title.'); + return false; + } + + // check for the quiz_title real quick + if (self::$quiz['quiz_title_test'] === '') { + // You had ONE job... + self::$response_obj->add_error('Please enter a quiz test title.'); + return false; + } + + // If the quiz_obj doesn't exist the quiz object will set the quiz_id as null + if (self::$quiz_obj->get_quiz_id() === null) { + // Congratulations, quiz! You're ready for insert! + $this->insert_quiz(); + // set the quiz_id on our array self::quiz array now that we have one + self::$quiz['quiz_id'] = self::$response_obj->quiz_id; + } else { + // check to make sure that the quiz owner matches + $allow_update = $this->allow_user_to_update_quiz(); + // update a quiz entry + if ($allow_update === true) { + // the current user matches the quiz owner + $this->update_quiz(); + } else { + // Hmm... the user is trying to update a quiz that isn't theirs + self::$response_obj->add_error('Quiz Update not Allowed'); + return false; + } + } + + // save all of our questions and other stuff + // check to make sure a quiz_id is there + if (self::$quiz['quiz_id'] !== 0) { + // if a quiz_id is set, lets try saving the quiz options + $this->save_quiz_options(); + + // check to see if we HAVE questions to save + if (!empty(self::$quiz['question'])) { + $this->save_questions(); + } + } else { + // hopefully won't ever happen... this would mean that the quiz_insert failed + // so we don't have a quiz to assign these questions to + self::$response_obj->add_error('Questions could not be saved to your quiz.'); + return false; + } + } + + /** + * Check to see if the owner of the submitted quiz matches + * the one they want to update + * + * @param $quiz_owner_id = Selected quiz row from database + * @param $user_id = User trying to update the quiz + * @return (BOOLEAN) true if current user owns quiz, false if not + * @since 0.0.1 + */ + protected function quiz_owned_by_current_user() + { + // cast to integers to make sure we're talkin the same talk here + $quiz_owner_id = (int) self::$quiz_obj->get_quiz_owner(); + $current_user_id = (int) self::$quiz['quiz_updated_by']; + // set it to false to start. Guilty til proven innocent. + $quiz_owned_by_current_user = false; + + // check to make sure we have values for each + if ($quiz_owner_id !== false && $current_user_id !== false) { + // check to see if the owner and user match + if ($quiz_owner_id === $current_user_id) { + // if they match, then it's legit + $quiz_owned_by_current_user = true; + } + } + + return $quiz_owned_by_current_user; + } + + /** + * See if we should allow the current user to update the quiz + * @return (BOOLEAN) true if we should allow the user + * to update the quiz, false if not + */ + protected function allow_user_to_update_quiz() + { + $allow_save = false; + // see if user is admin or not + if (current_user_can('manage_options') === true) { + $allow_save = true; + } else { + // see if this user owns the quiz + $allow_save = $this->quiz_owned_by_current_user(); + } + + return $allow_save; + } + + /** + * Connects to DB and inserts the quiz. + * @return builds and returns a response message + */ + protected function insert_quiz() + { + // connect to PDO + $pdo = new enp_quiz_Db(); + // Get our Parameters ready + $params = array( + ':quiz_title' => self::$quiz['quiz_title'], + ':quiz_title_test' => self::$quiz['quiz_title_test'], + ':quiz_status' => self::$quiz['quiz_status'], + ':quiz_finish_message' => self::$quiz['quiz_finish_message'], + ':quiz_owner' => self::$quiz['quiz_owner'], + ':quiz_created_by' => self::$quiz['quiz_created_by'], + ':quiz_created_at' => self::$quiz['quiz_created_at'], + ':quiz_updated_by' => self::$quiz['quiz_updated_by'], + ':quiz_updated_at' => self::$quiz['quiz_updated_at'], + ':quiz_is_deleted' => self::$quiz['quiz_is_deleted'], + ); + // write our SQL statement + $sql = "INSERT INTO " . $pdo->quiz_table . " ( + quiz_title, + quiz_title_test, + quiz_status, + quiz_finish_message, + quiz_owner, + quiz_created_by, + quiz_created_at, + quiz_updated_by, + quiz_updated_at, + quiz_is_deleted + ) + VALUES( + :quiz_title, + :quiz_title_test, + :quiz_status, + :quiz_finish_message, + :quiz_owner, + :quiz_created_by, + :quiz_created_at, + :quiz_updated_by, + :quiz_updated_at, + :quiz_is_deleted + )"; + // insert the quiz into the database + $stmt = $pdo->query($sql, $params); + + // success! + if ($stmt !== false) { + self::$quiz['quiz_id'] = $pdo->lastInsertId(); + self::$response_obj->set_status('success'); + self::$response_obj->set_action('insert'); + self::$response_obj->add_success('Quiz created.'); + // build a full response object + self::$response_obj->set_quiz_response(self::$quiz); + } else { + self::$response_obj->add_error('Quiz could not be added to the database. Try again and if it continues to not work, send us an email with details of how you got to this error.'); + } + } + + /** + * Connects to DB and updates the quiz. + * @return builds and returns a response message + */ + protected function update_quiz() + { + // connect to PDO + $pdo = new enp_quiz_Db(); + + $params = $this->set_update_quiz_params(); + + $sql = "UPDATE " . $pdo->quiz_table . " + SET quiz_title = :quiz_title, + quiz_title_test = :quiz_title_test, + quiz_status = :quiz_status, + quiz_finish_message = :quiz_finish_message, + quiz_updated_by = :quiz_updated_by, + quiz_updated_at = :quiz_updated_at, + quiz_is_deleted = :quiz_is_deleted + + WHERE quiz_id = :quiz_id + AND quiz_owner = :quiz_owner + "; + + $stmt = $pdo->query($sql, $params); + + // success! + if ($stmt !== false) { + self::$response_obj->set_status('success'); + self::$response_obj->set_action('update'); + + // if we're deleting the quiz, don't say "quiz saved" + if (self::$user_action_action === 'delete' && self::$user_action_element === 'quiz') { + self::$response_obj->add_success('Quiz deleted.'); + // kick off the process of deleting all AB tests related to this quiz + $ab_test_delete_response = $this->delete_quiz_ab_tests(self::$quiz_obj->get_quiz_id(), self::$quiz['quiz_owner']); + // merge deleting ab tests with the global response + self::$response_obj->set_ab_test_delete_response($ab_test_delete_response); + } else { + self::$response_obj->add_success('Quiz saved.'); + } + + // build a full response object + self::$response_obj->set_quiz_response(self::$quiz); + } else { + self::$response_obj->add_error('Quiz could not be updated. Try again and if it continues to not work, send us an email with details of how you got to this error.'); + } + } + + protected function save_quiz_options() + { + // this effectively whitelists it for us + $quiz_options = array( + 'quiz_title_display', + 'quiz_mc_options_order', + 'quiz_width', + 'quiz_bg_color', + 'quiz_text_color', + 'quiz_border_color', + 'quiz_button_color', + 'quiz_correct_color', + 'quiz_incorrect_color', + 'quiz_custom_css', + 'quiz_custom_css_minified', + 'facebook_title', + 'facebook_description', + 'facebook_quote_end', + 'email_subject', + 'email_body_start', + 'email_body_end', + 'tweet_end' + ); + foreach ($quiz_options as $quiz_option) { + if (array_key_exists($quiz_option, self::$quiz)) { + $save_quiz_option = new Enp_quiz_Save_quiz_option(); + $save_quiz_option->save_quiz_option($quiz_option); + } + } + } + + /** + * Connects to DB and updates the quiz. + * @return builds and returns a response message + */ + protected function pdo_publish_quiz() + { + // connect to PDO + $pdo = new enp_quiz_Db(); + + $params = array( + ':quiz_id' => self::$quiz_obj->get_quiz_id(), + ':quiz_status' => 'published', + ':quiz_owner' => self::$quiz['quiz_owner'], + ':quiz_updated_by' => self::$quiz['quiz_updated_by'], + ':quiz_updated_at' => self::$quiz['quiz_updated_at'] + ); + + $sql = "UPDATE " . $pdo->quiz_table . " + SET quiz_status = :quiz_status, + quiz_updated_by = :quiz_updated_by, + quiz_updated_at = :quiz_updated_at + WHERE quiz_id = :quiz_id + AND quiz_owner = :quiz_owner"; + + $stmt = $pdo->query($sql, $params); + + // success! + if ($stmt !== false) { + self::$response_obj->set_quiz_id(self::$quiz['quiz_id']); + self::$response_obj->set_status('success'); + self::$response_obj->set_action('update'); + self::$response_obj->add_success('Quiz published!'); + } else { + self::$response_obj->add_error('Quiz could not be published. Try again and if it continues to not work, send us an email with details of how you got to this error.'); + } + } + + /** + * Can be called from anywhere to publish a quiz + * + */ + public function publish_quiz($quiz) + { + if (is_object($quiz)) { + $quiz = (array) $quiz; + } + // set our action + $quiz['user_action'] = 'quiz-publish'; + $this->save($quiz); + } + + /** + * Populate self::$quiz array with values + * from self::$quiz_obj if they're not present in self::$quiz + * We need all the values to brute update, but don't want to have to pass the + * values in every form. + * + * @param $slider = array(); of slider data + * @return ID of saved slider or false if error + * @since 0.0.1 + */ + protected function set_update_quiz_params() + { + $params = array( + ':quiz_id' => self::$quiz_obj->get_quiz_id(), + ':quiz_title' => self::$quiz['quiz_title'], + ':quiz_title_test' => self::$quiz['quiz_title_test'], + ':quiz_status' => self::$quiz['quiz_status'], + ':quiz_finish_message' => self::$quiz['quiz_finish_message'], + ':quiz_owner' => self::$quiz['quiz_owner'], + ':quiz_updated_by' => self::$quiz['quiz_updated_by'], + ':quiz_updated_at' => self::$quiz['quiz_updated_at'], + ':quiz_is_deleted' => self::$quiz['quiz_is_deleted'] + ); + return $params; + } + + + /** + * Loop through a $quiz['question'] array to save to the db + * + * @param $question = array(); of all $quiz['question'] data + * @since 0.0.1 + */ + protected function save_questions() + { + // loop through the questions and save each one + foreach (self::$quiz['question'] as $question) { + // save it! Yay! + // get access to the question object + $question_obj = new Enp_quiz_Save_question(); + // save the question + $question_obj->save_question($question); + } + } + + /** + * Check to see if a value was passed in self::$quiz array + * If it was, set it as the value. If it wasn't, set the value + * from self::$quiz_obj + * + * @param $key = key that should be set in the quiz array. + * @param $default = int or string of default value if nothing is found + * @return value from either self::$quiz[$key] or self::$quiz_obj->get_quiz_$key() + */ + protected function set_quiz_value($key, $default) + { + $param_value = $default; + // see if the value is already in our submitted quiz + if (array_key_exists($key, self::$quiz) && self::$quiz[$key] !== "") { + $param_value = self::$quiz[$key]; + } else { + $obj_value = $this->get_quiz_object_value($key); + if ($obj_value !== null) { + $param_value = $obj_value; + } + } + + return $param_value; + } + + /** + * Should be merged with set_quiz_value with an extra paramter to allow + * it to be an empty value. For example, with the set_quiz_value, you can't + * delete a field. With this method, you can delete fields. + * + * @param $key = key that should be set in the quiz array. + * @param $default = int or string of default value if nothing is found + * @return value from either self::$quiz[$key] or self::$quiz_obj->get_quiz_$key() + */ + protected function set_quiz_value__allow_empty($key, $default) + { + $param_value = $default; + // see if the value is already in our submitted quiz + if (array_key_exists($key, self::$quiz)) { + $param_value = self::$quiz[$key]; + } else { + $obj_value = $this->get_quiz_object_value($key); + if ($obj_value !== null) { + $param_value = $obj_value; + } + } + + return $param_value; + } + + /** + * Sometimes you need to set the value from the object first instead + * of the submitted value, such as for quiz_owner, when it might be + * updated by someone other than the quiz_owner (an admin) + * @param $key = key that should be set in the quiz array. + * @param $default = int or string of default value if nothing is found + * @return value from either self::$quiz[$key] or self::$quiz_obj->get_quiz_$key() + */ + public function set_quiz_value__object_first($key, $default) + { + // see if the value is already in our quiz object + $obj_value = $this->get_quiz_object_value($key); + if ($obj_value !== null) { + $param_value = $obj_value; + } elseif (array_key_exists($key, self::$quiz) && self::$quiz[$key] !== "") { + $param_value = self::$quiz[$key]; + } else { + $param_value = $default; + } + + return $param_value; + } + + /** + * Dynamically set our value from the quiz object + * @param $key = the value you want to get 'quiz_title', 'quiz_id', etc. + * @return $obj_value (mixed) value if found, null if not found + */ + protected function get_quiz_object_value($key) + { + $obj_value = null; + // check to see if there's even an object + if (self::$quiz_obj->get_quiz_id() !== null) { + // if it's not in our submited quiz, try to get it from the object + // dynamically create the quiz getter function + $get_obj_value = 'get_' . $key; + // get the quiz object value + $obj_value = self::$quiz_obj->$get_obj_value(); + } + return $obj_value; + } + + /** + * Get and validate quiz value from object or set as default + * useful if user submission doesn't validate. + * + * @param $key = the value you want to get/set 'quiz_bg_color', 'quiz_width', etc. + * @param $default = the value you want to fall back to + * @param $validation = string of validation function 'css_measurement', 'hex', etc + * @return $value (mixed) quiz object value if found and valid, $default value if not found in object/invalid object value + */ + protected function validate_quiz_value_from_object($key, $default, $validation) + { + // try to get the value from the object + $obj_value = $this->get_quiz_object_value($key); + // build our validation function string + $validate_function = 'validate_' . $validation; + // validate our object value + $valid_obj_value = $this->$validate_function($obj_value); + // if it's not valid, set it to the default + if ($valid_obj_value === false) { + // ok, we've exhausted all or options. set it to the default + $value = $default; + } else { + // the object is valid, that's good! + $value = $obj_value; + } + return $value; + } + + /** + * Check to see if a value was passed in self::$quiz array + * If it was, set it as the value (after validating). If it wasn't, set the value + * from self::$quiz_obj or default + * + * @param $key = key that should be set in the quiz array. + * @param $default = int or string of default value if nothing is found + * @return value from either self::$quiz[$key] or self::$quiz_obj->get_quiz_$key() + */ + public function set_quiz_hex_value($key, $default) + { + // set it with what they submitted + $hex = $this->set_quiz_value($key, $default); + // validate the hex + $valid_hex = $this->validate_hex($hex); + // check it + + if ($valid_hex === false) { + // generate a good error message + self::$response_obj->add_error('Hex Color value for ' . $key . ' was not valid. Hex Color Value must be a valid Hex value like #ffffff'); + // if it's not a valid hex, try to get the old value from the object + // and fallback to default if necessary + $hex = $this->validate_quiz_value_from_object($key, $default, 'hex'); + } + + return $hex; + } + + /** + * Check to see if a value was passed in self::$quiz array + * If it was, set it as the value (after validating). If it wasn't, set the value + * from self::$quiz_obj or default + * + * @param $key = key that should be set in the quiz array. + * @param $default = int or string of default value if nothing is found + * @return value from either self::$quiz[$key] or self::$quiz_obj->get_quiz_$key() + */ + public function set_quiz_css_measurement_value($key, $default) + { + // set it with what they submitted + $css_measurement = $this->set_quiz_value($key, $default); + // validate the hex + $valid_css_measurement = $this->validate_css_measurement($css_measurement); + // check it + if ($valid_css_measurement === false) { + // add a good error message + self::$response_obj->add_error('CSS Measurement value for ' . $key . ' is not valid. Measurements can be any valid CSS Measurement such as 100%, 600px, 30rem, 80vw'); + // if it's not a valid css_measurement, try to get the old value from the object + // and fallback to default if necessary + $css_measurement = $this->validate_quiz_value_from_object($key, $default, 'css_measurement'); + } + + return $css_measurement; + } + + /** + * Sets a quiz value for CSS formatted entries by running it through CSS Tidy + * @param $key = key that should be set in the quiz array. + * @param $default = int or string of default value if nothing is found + * @param $minify (BOOLEAN) if you want it minified or more readable + * @return CSS Tidy formatted string + */ + public function set_quiz_css_value($key, $default = '', $minify = true) + { + // set the value + $css = $this->set_quiz_value__allow_empty($key, $default); + // run it through css tidy + $css = $this->optimize_css($css, $minify); + // return it + return $css; + } + + /** + * Run a string through CSS tidy + * + * @param $css = submitted css + * @return optimized css from css tidy + */ + public function optimize_css($css, $minify = true) + { + // it there isn't a value, return it + if (empty($css)) { + return ''; + } + // get the csstidy class + require_once ENP_QUIZ_PLUGIN_DIR . 'includes/css-tidy/class.csstidy.php'; + // open the CSS tidy class + $csstidy = new csstidy(); + $csstidy->optimise = $css; + + $csstidy->set_cfg('case_properties', false); + // this also removes -moz, etc prefixes. + $csstidy->set_cfg('discard_invalid_properties', true); + + if ($minify === true) { + // minifies the css + $csstidy->set_cfg('template', 'highest'); + } else { + // don't change the case of the class/id names + $csstidy->set_cfg('optimise_shorthands', 0); + $csstidy->set_cfg('remove_last_;', false); + $csstidy->set_cfg('template', ENP_QUIZ_PLUGIN_DIR . 'includes/css-tidy/formatted-css.tpl'); + } + + $csstidy->parse($css); + + $css = $csstidy->print->plain(); + + return $css; + } + + /** + * Check to see if a value was passed in self::$quiz array + * If it was, set it as the value (after validating). If it wasn't, set the value + * from self::$quiz_obj or default + * + * @param $key = key that should be set in the quiz array. + * @param $default = int or string of default value if nothing is found + * @param $include_url (BOOLEAN) URLs count as 21 characters. Set true if + * you will be using a URL with the tweet + * @param $mustache (BOOLEAN) checks for {{score_percentage}} and replaces + * it with '100' if found + * @return value from either self::$quiz[$key] or self::$quiz_obj->get_quiz_$key() + */ + public function set_tweet_value($key, $default, $include_url, $mustache) + { + // set it with what they submitted + $tweet = $this->set_quiz_value($key, $default); + // validate the tweet + $valid_tweet = $this->validate_tweet($tweet, $include_url, $mustache); + // check it + + if ($valid_tweet === false) { + // generate a good error message + self::$response_obj->add_error('The tweet for ' . $key . ' has too many characters. It can\'t have more than 117 characters because sharing the URL for the quiz uses up 23 of the 140 available characters.'); + // if it's not a valid tweet, try to get the old value from the object + // and fallback to default if necessary + $tweet = $this->validate_quiz_value_from_object($key, $default, 'tweet'); + } + + return $tweet; + } + + /** + * In order to show the updated Facebook Share Title & Description, + * we have to tell Facebook to rescrape the URL to grab the updated content + */ + public function facebook_api_rescrape() + { + $rescrape = false; + $new_title = self::$quiz['facebook_title']; + $old_title = self::$quiz_obj->get_facebook_title(); + $new_description = self::$quiz['facebook_description']; + $old_description = self::$quiz_obj->get_facebook_description(); + + // see if the submitted values match the current values or not + if ($new_title !== $old_title || $new_description !== $old_description) { + $rescrape = true; + } + + if ($rescrape === true) { + // curl post to have facebook rescrape + // set the ID off the response_obj just in case it's a new quiz + $this->facebook_curl_post(ENP_QUIZ_URL . self::$response_obj->quiz_id); + } + } + + /** + * Sends a curl post request to FB to trigger a rescrape of the Quiz + * $quiz_url (string) The Quiz url you want to update. + */ + public function facebook_curl_post($quiz_url) + { + $graph_url = "https://graph.facebook.com"; + + $postData = "id=" . $quiz_url . "&scrape=true"; + + $ch = curl_init(); + + curl_setopt($ch, CURLOPT_URL, $graph_url); + curl_setopt($ch, CURLOPT_HEADER, 0); + curl_setopt($ch, CURLOPT_POST, 1); + curl_setopt($ch, CURLOPT_POSTFIELDS, $postData); + curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); + curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 0); + + $output = curl_exec($ch); + curl_close($ch); + } + + + /** + * Decide if a quiz should be deleted or not + * @param self::$quiz + */ + protected function set_quiz_is_deleted() + { + //get the current values (from submission or object) + $is_deleted = $this->set_quiz_value('quiz_is_deleted', '0'); + // see if the user action is to delete a quiz + if (self::$user_action_action === 'delete' && self::$user_action_element === 'quiz') { + // if they want to delete, see if we match the quiz ID + if (self::$user_action_details['quiz_id'] === (int) self::$quiz_obj->get_quiz_id()) { + // we've got a match! this is the one they want to delete + $is_deleted = 1; + } + } + // return if this one should be deleted or not + return $is_deleted; + } + + /** + * Deletes all AB Tests that this quiz is a part of + * @param $quiz_id (string/int) of the id of the quiz + * @return $ab_test_response (array) from deleting all the ab tests (which ids were deleted, if it was successful, etc) + */ + protected function delete_quiz_ab_tests($quiz_id, $quiz_owner) + { + // get all the ab test ids that this quiz is a part of + $ab_test_ids = $this->get_all_quiz_ab_tests($quiz_id); + // if there are any, loop through them and delete em! + $ab_test_response = array(); + if (!empty($ab_test_ids)) { + // open the ab test save class + $save_ab_test = new Enp_quiz_Save_ab_test(); + foreach ($ab_test_ids as $ab_test_id) { + $ab_test_params = array( + 'ab_test_id' => $ab_test_id, + 'ab_test_updated_by' => $quiz_owner + ); + $ab_test_response[] = $save_ab_test->delete($ab_test_params); + } + } + return $ab_test_response; + } + + /** + * Select all AB Tests that a quiz is a part of + * @param $quiz_id + * @return $ab_test_ids (array) of all AB Test IDs + */ + protected function get_all_quiz_ab_tests($quiz_id) + { + $pdo = new enp_quiz_Db(); + // Do a select query to see if we get a returned row + $params = array( + ":quiz_id" => $quiz_id + ); + $sql = "SELECT ab_test_id from " . $pdo->ab_test_table . " + WHERE (quiz_id_a = :quiz_id OR quiz_id_b = :quiz_id) + AND ab_test_is_deleted = 0"; + $stmt = $pdo->query($sql, $params); + $ab_test_row = $stmt->fetchAll(PDO::FETCH_COLUMN); + // return the found quiz row + return $ab_test_row; + } } -?> diff --git a/database/class-enp_quiz_save_quiz_response.php b/database/class-enp_quiz_save_quiz_response.php index 57c4f633..75203bff 100644 --- a/database/class-enp_quiz_save_quiz_response.php +++ b/database/class-enp_quiz_save_quiz_response.php @@ -1,4 +1,5 @@ */ -class Enp_quiz_Save_quiz_Response extends Enp_quiz_Save { - public $quiz_id, - $quiz_title, - $quiz_status, - $status, - $action, - $message = array('error'=>array(),'success'=>array()), - $question = array(), - $quiz_option = array(), - $user_action = array(); - - public function __construct() { - - } - - /** - * Sets a quiz_id on our response array - * @param string = quiz_id you want to set - * @return response object array - */ - public function set_quiz_id($quiz_id) { - $this->quiz_id = $quiz_id; - } - - /** - * Sets an action on our response array - * @param string = action you want to set - * @return response object array - */ - public function set_action($action) { - $this->action = $action; - } - - /** - * Sets a status on our response array - * @param string = status you want to set - * @return response object array - */ - public function set_status($status) { - $this->status = $status; - } - - /** - * Gets response from quiz save class and assigns values to our response object - */ - public function set_quiz_response($quiz) { - $this->set_quiz_id($quiz['quiz_id']); - $this->quiz_title = $quiz['quiz_title']; - $this->quiz_status = $quiz['quiz_status']; - $this->quiz_finish_message = $quiz['quiz_finish_message']; - $this->quiz_updated_at = $quiz['quiz_updated_at']; - } - - /** - * Gets response from save quiz option class and and assigns them - * to our response object - * - * @param $quiz_option_response = array() of values like 'action', 'status', and 'quiz_option_id' - * @param $quiz = the quiz array that was being saved - */ - public function set_quiz_option_response($quiz_option_response, $quiz_option) { - // sets our quiz_option response to our quiz_option response - $this->quiz_option[$quiz_option] = $quiz_option_response; - } - - /** - * Loops through all passed responses from the save class and and assigns them - * to our response object - * - * @param $question_response = array() of values like 'action', 'status', and 'mc_option_id' - * @param $question = the question array that was being saved - */ - public function set_question_response($question_response, $question) { - $question_number = $question['question_order']; - - // sets the key/value for each item passed in the response - foreach($question_response as $key => $value) { - // set the question array with our response values - $this->question[$question_number][$key] = $value; - } - } - - /** - * Loops through all passed responses from the save class and and assigns them - * to our response object - * - * @param $mc_option_response = array() of values like 'action', 'status', and 'mc_option_id' - * @param $question = the question array that was being saved - * @param $mc_option = the mc_option array that was being saved - */ - public function set_mc_option_response($mc_option_response, $question, $mc_option) { - $question_number = $question['question_order']; - $mc_option_number = $mc_option['mc_option_order']; - // sets the key/value for each item passed in the response - foreach($mc_option_response as $key => $value) { - // set the question/mc_option array with our response values - $this->question[$question_number]['mc_option'][$mc_option_number][$key] = $value; - } - } - - /** - * Loops through all passed responses from the save class and and assigns them - * to our response object - * - * @param $slider_response = array() of values like 'action', 'status', and 'mc_option_id' - * @param $question = the question array that was being saved - */ - public function set_slider_response($slider_response, $question) { - $question_number = $question['question_order']; - - // sets the key/value for each item passed in the response - foreach($slider_response as $key => $value) { - // set the question array with our response values - $this->question[$question_number]['slider'][$key] = $value; - } - } - - /** - * Loops through all passed responses from the delete ab test class and and assigns them - * to our response object - * - * @param $ab_test_delete_response = array('action' => 'update', - * 'element' => 'ab_test', - * 'status' => 'success/error' - * 'ab_test_id'=> (int), - * 'quiz_id_a' => (int), - * 'quiz_id_b' => (int), - * 'user_action' => array( - * 'action'=>'delete', - * 'element'=>'ab_test' - * ), - * ); - * - */ - public function set_ab_test_delete_response($ab_test_delete_response) { - // stuff it into the user_action. Not a great fit, but best place - // for random vars right now - if(!empty($ab_test_delete_response)) { - foreach($ab_test_delete_response as $ab_response) { - $this->user_action['secondary_action']['ab_test_deleted'][] = $ab_response; - } - } - - } - - /** - * Sets a new error to our error response array - * @param string = message you want to add - * @return response object array - */ - public function add_error($error) { - $this->message['error'][] = $error; - } - - /** - * Sets a new success to our success response array - * @param string = message you want to add - * @return response object array - */ - public function add_success($success) { - $this->message['success'][] = $success; - } - - - /** - * Build a user_action response array so enp_quiz-create class knows - * what to do next, like go to preview page, add another question, etc - */ - public function set_user_action_response($quiz) { - $action = null; - $element = null; - $details = array(); - - // set the user action to 'save' if there isn't one - if(array_key_exists('user_action', $quiz)) { - $user_action = $quiz['user_action']; - } else { - $user_action = 'save'; - } - - // if they want to preview, then see if they're allowed to go on - if($user_action === 'quiz-preview') { - $action = 'next'; - $element = 'preview'; - } - // if they want to publish, then see if they're allowed to go on - elseif($user_action === 'quiz-publish') { - $action = 'next'; - $element = 'publish'; - } - // if they want to add a question - elseif($user_action === 'add-question') { - // what else do we want to do? - $action = 'add'; - $element = 'question'; - } - // if they want to move a question - elseif(strpos($user_action, 'question--move-') !== false) { - $action = 'move'; - $element = 'question'; - - $get_data = str_replace('question--move-', '', $user_action); - // now it looks like {{questionID}}-to-{{ new position}} - $get_data = explode('-', $get_data); - $question_id = $get_data[0]; - $to = $get_data[count($get_data) - 1]; - - $details = array( - 'question_id' => (int) $question_id, - 'move_question_to' => (int) $to - ); - } - // check to see if user wants to add-mc-option - elseif(strpos($user_action, 'add-mc-option__question-') !== false) { - $action = 'add'; - $element = 'mc_option'; - // extract the question number by removing 'add-mc-option__question-' from the string - // we can't use question_id because the question_id might not - // have been created yet - $question_id = str_replace('add-mc-option__question-', '', $user_action); - $details = array('question_id' => (int) $question_id); - } - // check to see if user wants to add-mc-option - elseif(strpos($user_action, 'mc-option--correct__question-') !== false) { - // get our matches - preg_match_all('/\d+/', $user_action, $matches); - // will return array of arrays splitting all number groups - // first match is our question_id - $question_id = $matches[0][0]; - // second match is our option_id - $mc_option_id = $matches[0][1]; - $action = 'set_correct'; - $element = 'mc_option'; - - $details = array( - 'question_id' => (int) $question_id, - 'mc_option_id' => (int) $mc_option_id, - ); - } - // DELETE question - elseif(strpos($user_action, 'question--delete-') !== false) { - $action = 'delete'; - $element = 'question'; - // extract the question number by removing 'add-mc-option__question-' from the string - // we can't use question_id because the question_id might not - // have been created yet - $question_id = str_replace('question--delete-', '', $user_action); - $details = array('question_id' => (int) $question_id); - } - // UPLOAD question_image - elseif(strpos($user_action, 'question-image--upload-') !== false) { - - $action = 'upload'; - $element = 'question_image'; - // extract the question number by removing 'add-mc-option__question-' from the string - // we can't use question_id because the question_id might not - // have been created yet - $question_id = str_replace('question-image--upload-', '', $user_action); - $details = array('question_id' => (int) $question_id); - } - // DELETE question_image - elseif(strpos($user_action, 'question-image--delete-') !== false) { - - $action = 'delete'; - $element = 'question_image'; - // extract the question number by removing 'add-mc-option__question-' from the string - // we can't use question_id because the question_id might not - // have been created yet - $question_id = str_replace('question-image--delete-', '', $user_action); - $details = array('question_id' => (int) $question_id); - } - // DELETE mc_option - elseif(strpos($user_action, 'mc-option--delete-') !== false) { - $action = 'delete'; - $element = 'mc_option'; - // extract the question number by removing 'add-mc-option__question-' from the string - // we can't use question_id because the question_id might not - // have been created yet - $mc_option_id = str_replace('mc-option--delete-', '', $user_action); - $details = array('mc_option_id' => (int) $mc_option_id); - } - // DELETE entire Quiz! Gasp! - elseif(strpos($user_action, 'delete-quiz') !== false) { - $action = 'delete'; - $element = 'quiz'; - $details = array('quiz_id' => (int) $quiz['quiz_id']); - } - - $this->user_action = array( - 'action' => $action, - 'element' => $element, - 'details' => $details, - ); - } - - - /** - * Runs all checks to validate and build error messages on quiz form - * All the functions it runs add to the response object if there are errors - * - * @usage $response = new Enp_quiz_Save_quiz_Response(); - * $validate = $response->validate_quiz_and_questions($quiz); - * var_dump($validate); // returns 'invalid' or 'valid' - * var_dump($response->get_error_messages()); // all error messages - * - * @param $quiz (quiz array or Enp_quiz_Quiz() object) - * @return (kinda) builds all error messages, accessible from $this->message['error'] - * @return (string) valid or invalid - */ - public function validate_quiz_and_questions($quiz) { - // if we got passed a quiz object, let's turn it into an array - if(is_object($quiz)) { - $quiz = $this->quiz_object_to_array($quiz); - } - - // check to make sure there's a quiz ID - if($quiz['quiz_id'] === null) { - // there's no quiz... invalid - $this->add_error('Quiz does not exist.'); - return 'invalid'; - } - - // validate the quiz - $this->validate_quiz($quiz); - // check to see if they need to add questions - if($this->validate_has_question($quiz) === 'has_question') { - // we have a question title and explanation in the first question, - // so let's check more in depth. This checks for all errors - // in all questions - $this->validate_questions($quiz); - } - - // return a valid or invalid string. - // the function builds all error messages too, so those will be - // available to whatever is calling validate_quiz_and_questions($quiz) - if(empty($this->message['error'])) { - return 'valid'; - } else { - return 'invalid'; - } - } - - public function quiz_object_to_array($quiz_obj) { - $quiz_array = (array) $quiz_obj; - $new_questions_array = array(); - if(!empty($quiz_array)) { - $question_ids = $quiz_obj->get_questions(); - if(!empty($question_ids)){ - foreach($question_ids as $question_id) { - // generate the object - $question_obj = new Enp_quiz_Question($question_id); - // arrayify the question - $question_array = (array) $question_obj; - // check if mc or slider and add that object as an array - if($question_obj->get_question_type() === 'mc') { - $mc_option_ids = $question_obj->get_mc_options(); - if(!empty($mc_option_ids)) { - foreach($question_obj->get_mc_options() as $mc_option_id) { - $mc_option_object = new Enp_quiz_MC_option($mc_option_id); - $mc_option_array = (array) $mc_option_object; - $question_array['mc_option'][] = $mc_option_array; - } - } - } elseif($question_obj->get_question_type() === 'slider') { - // get the slider ID - $slider_id = $question_obj->get_slider(); - // get the slider object - $slider_object = new Enp_quiz_Slider($slider_id); - // cast it to an array - $slider_array = (array) $slider_object; - // add it to the question - $question_array['slider'] = $slider_array; - } - - // add it to our questions array - $quiz_array['question'][] = $question_array; - - } - } - - } - return $quiz_array; - } - - - /** - * Checks to see if the first question is empty. If it is, add an error - * @return 'has_questions' if question found, false if there are questions - * - */ - public function validate_has_question($quiz) { - if(empty($quiz['question'][0]['question_title']) && empty($quiz['question'][0]['question_explanation'])) { - $this->add_error('Question 1 does not have question text or an explanation.'); - return false; - } - return 'has_question'; - } - - /** - * Loop through questions and check for errors - */ - public function validate_questions($quiz) { - $i = 1; - // this is weird to set it as OK initially, but... - $return_message = 'no_errors'; - // loop through all questions and check for titles, answer explanations, etc - foreach($quiz['question'] as $question) { - // checks if the title is empty or not - $validate_title = $this->validate_question_title($question); - if($validate_title === 'no_title') { - $return_message = 'has_errors'; - } - // checks if the answer explanation is empty or not - $validate_explanation = $this->validate_question_explanation($question); - if($validate_explanation === 'no_question_explanation') { - $return_message = 'has_errors'; - } - - // check to see if the question is a slider or mc choice - if($question['question_type'] === 'mc') { - //TODO - // add mc_options if mc question type - $this->validate_question_mc_options($question); - } elseif($question['question_type'] === 'slider') { - // validate slider - $this->validate_question_slider($question); - } else { - // should never happen... - $this->add_error('Question '.($question['question_order']+1).' does not have a question type (multiple choice, slider, etc).'); - } - $i++; - } - return $return_message; - } - - - /** - * Checks questions for titles - * @return true if no question, false if there are questions - * - */ - public function validate_question_title($question) { - $return_message = 'has_title'; - if(empty($question['question_title'])) { - $this->add_error('Question '.($question['question_order']+1).' is missing an actual question.'); - $return_message = 'no_title'; - } - - return $return_message; - } - - /** - * Checks questions for answer explanation - * @return string 'has_question_explanation' if found, 'no_question_explanation' if not found - * - */ - public function validate_question_explanation($question) { - $return_message = 'has_question_explanation'; - if(empty($question['question_explanation'])) { - $this->add_error('Question '.($question['question_order']+1).' is missing an answer explanation.'); - $return_message = 'no_question_explanation'; - } - - return $return_message; - } - - - /** - * Checks questions for mc_options (if it should have them) - * @return string 'has_mc_options' if found, 'no_mc_options' if not found - * - */ - public function validate_question_mc_options($question) { - - $return_message = 'no_mc_options'; - if(!array_key_exists('mc_option', $question)) { - return $return_message; - } else { - $mc_options = $question['mc_option']; - } - - if(empty($mc_options)) { - $this->add_error('Question '.($question['question_order']+1).' is missing multiple choice options.'); - $return_message = 'no_mc_options'; - return $return_message; - } - - if(count($mc_options) === 1) { - $this->add_error('Question '.($question['question_order']+1).' does not have enough multiple choice options.'); - } else { - $mc_option_has_correct = false; - foreach($mc_options as $option) { - // check for values - if($option['mc_option_content'] === '') { - $this->add_error('Question '.($question['question_order']+1).' has an empty Multiple Choice Option field.'); - } - // check to see if ANY one has been chosen - if((int)$option['mc_option_correct'] === 1) { - $mc_option_has_correct = true; - // we have a correct option! yay! Everything is good. - $return_message = 'has_mc_options'; - } - } - if($mc_option_has_correct !== true ) { - $this->add_error('Question '.($question['question_order']+1).' needs a correct Multiple Choce Option answer to be selected.'); - } - } - - return $return_message; - } - - public function validate_question_slider($question) { - $return_message = 'valid'; - if(!array_key_exists('slider', $question)) { - $return_message = 'key_does_not_exist'; - return $return_message; - } else { - $slider = $question['slider']; - } - - if(empty($slider)) { - $this->add_error('Question '.($question['question_order']+1).' Slider has no values.'); - $return_message = 'no_slider_values'; - return $return_message; - } - - // check all the necessary fields for values - $required_fields = array( - 'slider_id', - 'slider_range_low', - 'slider_range_high', - 'slider_correct_low', - 'slider_correct_high', - 'slider_increment' - ); - - $empty_fields = false; - - foreach($required_fields as $required) { - // check if it's empty or not and that it doesn't match a 0 because - // 0 is a valid entry - if(empty($slider[$required]) && $slider[$required] !== (float) 0) { - $empty_fields = true; - $this->add_error('Question '.($question['question_order']+1).' Slider field '.$required.' is empty.'); - } - } - - // if we have empty fields, just finish the validation check now - if($empty_fields === true) { - $return_message = 'missing_required_slider_fields'; - return $return_message; - } - if($slider['slider_range_high'] <= $slider['slider_range_low'] ) { - $return_message = 'invalid'; - $this->add_error('Slider range for Question '.($question['question_order']+1).' needs to be changed.'); - } - - if($slider['slider_correct_high'] < $slider['slider_correct_low']) { - $return_message = 'invalid'; - $this->add_error('Question '.($question['question_order']+1).' Slider Correct Answer High value is greater than the Correct Low value.'); - } - - if($slider['slider_range_high'] < $slider['slider_correct_high'] ) { - $return_message = 'invalid'; - $this->add_error('Question '.($question['question_order']+1).' Slider Correct Answer is higher than the slider range. Increase the Slider End value or decrease the Slider Correct value.'); - } - - if($slider['slider_correct_low'] < $slider['slider_range_low'] ) { - $return_message = 'invalid'; - $this->add_error('Question '.($question['question_order']+1).' Slider Correct answer is lower than the slider range. Decrease the Slider Start value or increase the Slider Correct answer.'); - } - - // get all increments into an array - if($slider['slider_increment'] === (float) 0) { - $return_message = 'invalid'; - $this->add_error('Question '.($question['question_order']+1).' Slider increment cannot be 0.'); - } - // check that we're less than 1001 intervals - elseif( 1000 < ($slider['slider_range_high'] - $slider['slider_range_low']) / $slider['slider_increment'] ) { - $return_message = 'invalid'; - $this->add_error('Question '.($question['question_order']+1).' has '.($slider['slider_range_high'] - $slider['slider_range_low']) / $slider['slider_increment'].' intervals. It cannot have more than 1000 intervals. Decrease the Slider Low/High Range values or increase the Slider Increment value.'); - } else { - // check to make sure the increment allows user to select the correct answer - // loop through the numbers to validate the increment - // stop at 1000, that's too many. - $start = $slider['slider_range_low']; - $end = $slider['slider_range_high']; - $current_number = $start; - - while($current_number <= $end) { - // check if we're in the correct range - if($slider['slider_correct_low'] <= $current_number && $current_number <= $slider['slider_correct_high'] ) { - // we've got a correct answer! - break; - } - // we're above the correct answer high, then break and return the error message. no reason to keep checking - elseif($slider['slider_correct_high'] < $current_number ) { - $this->add_error('Question '.($question['question_order']+1).' Slider correct answer is impossible to select with a Slider Increment value of '.$slider['slider_increment'].'. Change the correct answer value or increment value.'); - break; - } else { - // increase the interval and keep going - $current_number = $current_number + $slider['slider_increment']; - } - } - - } - - return $return_message; - } - - /** - * Get the user_action['action'] - * @param response_obj - * @return string set in the user_action['action'] - */ - public function get_user_action_action() { - return $this->user_action['action']; - } - - /** - * Get the user_action['element'] - * @param response_obj - * @return string set in the user_action['element'] - */ - public function get_user_action_element() { - return $this->user_action['element']; - } - - /** - * Get the user_action['details'] array - * @param response_obj - * @return array set in the user_action['details'] - */ - public function get_user_action_details() { - return $this->user_action['details']; - } - - /** - * Get the error messages array - * @param response_obj - * @return array set in the $messages['error'] - */ - public function get_error_messages() { - return $this->message['error']; - } - - /** - * Get the success messages array - * @param response_obj - * @return array set in the $messages['success'] - */ - public function get_success_messages() { - return $this->message['success']; - } - - /** - * Validate a quiz - * @param $quiz (array) a 100% complete quiz array - * @return (mixed) true if valid, false if not - */ - public function validate_quiz($quiz) { - $quiz_options = $quiz['quiz_options']; - // check key_exists and not empty - $quiz_keys = array('quiz_title'); - $quiz_option_keys = array( - 'quiz_title_display', - 'quiz_text_color', - 'quiz_bg_color', - 'quiz_width' - ); - $valid = $this->validate_is_set($quiz, $quiz_keys); - $valid_options = $this->validate_is_set($quiz_options, $quiz_option_keys); - // we have values! let's keep on going with our check - if($valid !== false) { - // validate quiz title - $this->validate_quiz_title($quiz['quiz_title']); - // validate quiz title display - $this->validate_quiz_title_display($quiz_options['quiz_title_display']); - // validate hex values - $hex_keys = array( - 'quiz_text_color', - 'quiz_bg_color' - ); - $this->validate_hex_values($quiz_options, $hex_keys); - // validate css_measurement values - $css_measurement_keys = array('quiz_width'); - $this->validate_css_measurement_values($quiz_options, $css_measurement_keys); - } - } - - public function validate_quiz_title($value) { - $valid = false; - if(empty($value)) { - $this->add_error("Quiz Title can't be empty. Please enter a Title for your Quiz."); - } else { - $valid = true; - } - return $valid; - } - - public function validate_quiz_title_display($value) { - $valid = false; - if($value !== 'show' && $value !== 'hide') { - $this->add_error('Quiz Title Display must equal "show" or "hide".'); - } else { - $valid = true; - } - return $valid; - } - - public function validate_is_set($array = array(), $keys = array()) { - // set as true and prove it's not valid - $valid = true; - if(empty($array) || empty($keys)) { - return false; - } - // check for all values - foreach($keys as $key) { - // validate the the key exists in the array - $validate = $this->validate_exists($array, $key); - - // if it doesn't exist, set valid to false - if($validate === false) { - $valid = false; - } else { - // it exists, so see if it's empty - $validate = $this->validate_not_empty($array, $key); - // if it's empty, set $valid to false - if($validate === false) { - $valid = false; - } - } - } - - return $valid; - } - - public function validate_exists($array, $key) { - $exists = false; - if(array_key_exists($key, $array)) { - $exists = true; - } else { - // if key doesn't exist, add error - // if empty, add error - $this->add_error($key.' does not exist.'); - } - return $exists; - } - - public function validate_not_empty($array, $key) { - $not_empty = false; - if(!empty($array[$key])) { - $not_empty = true; - } else { - // if empty, add error - $this->add_error($key.' is empty.'); - } - return $not_empty; - } - - public function validate_hex_values($array, $keys) { - $valid = true; - if(!empty($keys)) { - foreach($keys as $key) { - $validate = $this->validate_hex($array[$key]); - if($validate === false) { - // generate a good error message - $this->add_error('Hex Color value for '.$key.' was not valid. Hex Color Value must be a valid Hex value like #ffffff'); - $valid = false; - } - } - } - return $valid; - } - - public function validate_css_measurement_values($array, $keys) { - $valid = true; - if(!empty($keys)) { - foreach($keys as $key) { - $validate = $this->validate_css_measurement($array[$key]); - if($validate === false) { - // generate a good error message - // give a good error message - $this->add_error('CSS Measurement value for '.$key.' is not valid. Measurements can be any valid CSS Measurement such as 100%, 600px, 30rem, 80vw'); - $valid = false; - } - } - } - return $valid; - } +class Enp_quiz_Save_quiz_Response extends Enp_quiz_Save +{ + public $quiz_id, + $quiz_title, + $quiz_title_test, + $quiz_status, + $status, + $action, + $message = array('error' => array(), 'success' => array()), + $question = array(), + $quiz_option = array(), + $user_action = array(); + + public function __construct() + { + } + + /** + * Sets a quiz_id on our response array + * @param string = quiz_id you want to set + * @return response object array + */ + public function set_quiz_id($quiz_id) + { + $this->quiz_id = $quiz_id; + } + + /** + * Sets an action on our response array + * @param string = action you want to set + * @return response object array + */ + public function set_action($action) + { + $this->action = $action; + } + + /** + * Sets a status on our response array + * @param string = status you want to set + * @return response object array + */ + public function set_status($status) + { + $this->status = $status; + } + + /** + * Gets response from quiz save class and assigns values to our response object + */ + public function set_quiz_response($quiz) + { + $this->set_quiz_id($quiz['quiz_id']); + $this->quiz_title = $quiz['quiz_title']; + $this->quiz_title_test = $quiz['quiz_title_test']; + $this->quiz_status = $quiz['quiz_status']; + $this->quiz_finish_message = $quiz['quiz_finish_message']; + $this->quiz_updated_at = $quiz['quiz_updated_at']; + } + + /** + * Gets response from save quiz option class and and assigns them + * to our response object + * + * @param $quiz_option_response = array() of values like 'action', 'status', and 'quiz_option_id' + * @param $quiz = the quiz array that was being saved + */ + public function set_quiz_option_response($quiz_option_response, $quiz_option) + { + // sets our quiz_option response to our quiz_option response + $this->quiz_option[$quiz_option] = $quiz_option_response; + } + + /** + * Loops through all passed responses from the save class and and assigns them + * to our response object + * + * @param $question_response = array() of values like 'action', 'status', and 'mc_option_id' + * @param $question = the question array that was being saved + */ + public function set_question_response($question_response, $question) + { + $question_number = $question['question_order']; + + // sets the key/value for each item passed in the response + foreach ($question_response as $key => $value) { + // set the question array with our response values + $this->question[$question_number][$key] = $value; + } + } + + /** + * Loops through all passed responses from the save class and and assigns them + * to our response object + * + * @param $mc_option_response = array() of values like 'action', 'status', and 'mc_option_id' + * @param $question = the question array that was being saved + * @param $mc_option = the mc_option array that was being saved + */ + public function set_mc_option_response($mc_option_response, $question, $mc_option) + { + $question_number = $question['question_order']; + $mc_option_number = $mc_option['mc_option_order']; + // sets the key/value for each item passed in the response + foreach ($mc_option_response as $key => $value) { + // set the question/mc_option array with our response values + $this->question[$question_number]['mc_option'][$mc_option_number][$key] = $value; + } + } + + /** + * Loops through all passed responses from the save class and and assigns them + * to our response object + * + * @param $slider_response = array() of values like 'action', 'status', and 'mc_option_id' + * @param $question = the question array that was being saved + */ + public function set_slider_response($slider_response, $question) + { + $question_number = $question['question_order']; + + // sets the key/value for each item passed in the response + foreach ($slider_response as $key => $value) { + // set the question array with our response values + $this->question[$question_number]['slider'][$key] = $value; + } + } + + /** + * Loops through all passed responses from the delete ab test class and and assigns them + * to our response object + * + * @param $ab_test_delete_response = array('action' => 'update', + * 'element' => 'ab_test', + * 'status' => 'success/error' + * 'ab_test_id'=> (int), + * 'quiz_id_a' => (int), + * 'quiz_id_b' => (int), + * 'user_action' => array( + * 'action'=>'delete', + * 'element'=>'ab_test' + * ), + * ); + * + */ + public function set_ab_test_delete_response($ab_test_delete_response) + { + // stuff it into the user_action. Not a great fit, but best place + // for random vars right now + if (!empty($ab_test_delete_response)) { + foreach ($ab_test_delete_response as $ab_response) { + $this->user_action['secondary_action']['ab_test_deleted'][] = $ab_response; + } + } + } + + /** + * Sets a new error to our error response array + * @param string = message you want to add + * @return response object array + */ + public function add_error($error) + { + $this->message['error'][] = $error; + } + + /** + * Sets a new success to our success response array + * @param string = message you want to add + * @return response object array + */ + public function add_success($success) + { + $this->message['success'][] = $success; + } + + + /** + * Build a user_action response array so enp_quiz-create class knows + * what to do next, like go to preview page, add another question, etc + */ + public function set_user_action_response($quiz) + { + $action = null; + $element = null; + $details = array(); + + // set the user action to 'save' if there isn't one + if (array_key_exists('user_action', $quiz)) { + $user_action = $quiz['user_action']; + } else { + $user_action = 'save'; + } + + // if they want to preview, then see if they're allowed to go on + if ($user_action === 'quiz-preview') { + $action = 'next'; + $element = 'preview'; + } + // if they want to publish, then see if they're allowed to go on + elseif ($user_action === 'quiz-publish') { + $action = 'next'; + $element = 'publish'; + } + // if they want to add a question + elseif ($user_action === 'add-question') { + // what else do we want to do? + $action = 'add'; + $element = 'question'; + } + // if they want to move a question + elseif (strpos($user_action, 'question--move-') !== false) { + $action = 'move'; + $element = 'question'; + + $get_data = str_replace('question--move-', '', $user_action); + // now it looks like {{questionID}}-to-{{ new position}} + $get_data = explode('-', $get_data); + $question_id = $get_data[0]; + $to = $get_data[count($get_data) - 1]; + + $details = array( + 'question_id' => (int) $question_id, + 'move_question_to' => (int) $to + ); + } + // check to see if user wants to add-mc-option + elseif (strpos($user_action, 'add-mc-option__question-') !== false) { + $action = 'add'; + $element = 'mc_option'; + // extract the question number by removing 'add-mc-option__question-' from the string + // we can't use question_id because the question_id might not + // have been created yet + $question_id = str_replace('add-mc-option__question-', '', $user_action); + $details = array('question_id' => (int) $question_id); + } + // check to see if user wants to add-mc-option + elseif (strpos($user_action, 'mc-option--correct__question-') !== false) { + // get our matches + preg_match_all('/\d+/', $user_action, $matches); + // will return array of arrays splitting all number groups + // first match is our question_id + $question_id = $matches[0][0]; + // second match is our option_id + $mc_option_id = $matches[0][1]; + $action = 'set_correct'; + $element = 'mc_option'; + + $details = array( + 'question_id' => (int) $question_id, + 'mc_option_id' => (int) $mc_option_id, + ); + } + // DELETE question + elseif (strpos($user_action, 'question--delete-') !== false) { + $action = 'delete'; + $element = 'question'; + // extract the question number by removing 'add-mc-option__question-' from the string + // we can't use question_id because the question_id might not + // have been created yet + $question_id = str_replace('question--delete-', '', $user_action); + $details = array('question_id' => (int) $question_id); + } + // UPLOAD question_image + elseif (strpos($user_action, 'question-image--upload-') !== false) { + + $action = 'upload'; + $element = 'question_image'; + // extract the question number by removing 'add-mc-option__question-' from the string + // we can't use question_id because the question_id might not + // have been created yet + $question_id = str_replace('question-image--upload-', '', $user_action); + $details = array('question_id' => (int) $question_id); + } + // DELETE question_image + elseif (strpos($user_action, 'question-image--delete-') !== false) { + + $action = 'delete'; + $element = 'question_image'; + // extract the question number by removing 'add-mc-option__question-' from the string + // we can't use question_id because the question_id might not + // have been created yet + $question_id = str_replace('question-image--delete-', '', $user_action); + $details = array('question_id' => (int) $question_id); + } + // DELETE mc_option + elseif (strpos($user_action, 'mc-option--delete-') !== false) { + $action = 'delete'; + $element = 'mc_option'; + // extract the question number by removing 'add-mc-option__question-' from the string + // we can't use question_id because the question_id might not + // have been created yet + $mc_option_id = str_replace('mc-option--delete-', '', $user_action); + $details = array('mc_option_id' => (int) $mc_option_id); + } + // DELETE entire Quiz! Gasp! + elseif (strpos($user_action, 'delete-quiz') !== false) { + $action = 'delete'; + $element = 'quiz'; + $details = array('quiz_id' => (int) $quiz['quiz_id']); + } + + $this->user_action = array( + 'action' => $action, + 'element' => $element, + 'details' => $details, + ); + } + + + /** + * Runs all checks to validate and build error messages on quiz form + * All the functions it runs add to the response object if there are errors + * + * @usage $response = new Enp_quiz_Save_quiz_Response(); + * $validate = $response->validate_quiz_and_questions($quiz); + * var_dump($validate); // returns 'invalid' or 'valid' + * var_dump($response->get_error_messages()); // all error messages + * + * @param $quiz (quiz array or Enp_quiz_Quiz() object) + * @return (kinda) builds all error messages, accessible from $this->message['error'] + * @return (string) valid or invalid + */ + public function validate_quiz_and_questions($quiz) + { + // if we got passed a quiz object, let's turn it into an array + if (is_object($quiz)) { + $quiz = $this->quiz_object_to_array($quiz); + } + + // check to make sure there's a quiz ID + if ($quiz['quiz_id'] === null) { + // there's no quiz... invalid + $this->add_error('Quiz does not exist.'); + return 'invalid'; + } + + // validate the quiz + $this->validate_quiz($quiz); + // check to see if they need to add questions + if ($this->validate_has_question($quiz) === 'has_question') { + // we have a question title and explanation in the first question, + // so let's check more in depth. This checks for all errors + // in all questions + $this->validate_questions($quiz); + } + + // return a valid or invalid string. + // the function builds all error messages too, so those will be + // available to whatever is calling validate_quiz_and_questions($quiz) + if (empty($this->message['error'])) { + return 'valid'; + } else { + return 'invalid'; + } + } + + public function quiz_object_to_array($quiz_obj) + { + $quiz_array = (array) $quiz_obj; + $new_questions_array = array(); + if (!empty($quiz_array)) { + $question_ids = $quiz_obj->get_questions(); + if (!empty($question_ids)) { + foreach ($question_ids as $question_id) { + // generate the object + $question_obj = new Enp_quiz_Question($question_id); + // arrayify the question + $question_array = (array) $question_obj; + // check if mc or slider and add that object as an array + if ($question_obj->get_question_type() === 'mc') { + $mc_option_ids = $question_obj->get_mc_options(); + if (!empty($mc_option_ids)) { + foreach ($question_obj->get_mc_options() as $mc_option_id) { + $mc_option_object = new Enp_quiz_MC_option($mc_option_id); + $mc_option_array = (array) $mc_option_object; + $question_array['mc_option'][] = $mc_option_array; + } + } + } elseif ($question_obj->get_question_type() === 'slider') { + // get the slider ID + $slider_id = $question_obj->get_slider(); + // get the slider object + $slider_object = new Enp_quiz_Slider($slider_id); + // cast it to an array + $slider_array = (array) $slider_object; + // add it to the question + $question_array['slider'] = $slider_array; + } + + // add it to our questions array + $quiz_array['question'][] = $question_array; + } + } + } + return $quiz_array; + } + + + /** + * Checks to see if the first question is empty. If it is, add an error + * @return 'has_questions' if question found, false if there are questions + * + */ + public function validate_has_question($quiz) + { + if (empty($quiz['question'][0]['question_title']) && empty($quiz['question'][0]['question_explanation'])) { + $this->add_error('Question 1 does not have question text or an explanation.'); + return false; + } + return 'has_question'; + } + + /** + * Loop through questions and check for errors + */ + public function validate_questions($quiz) + { + $i = 1; + // this is weird to set it as OK initially, but... + $return_message = 'no_errors'; + // loop through all questions and check for titles, answer explanations, etc + foreach ($quiz['question'] as $question) { + // checks if the title is empty or not + $validate_title = $this->validate_question_title($question); + if ($validate_title === 'no_title') { + $return_message = 'has_errors'; + } + // checks if the answer explanation is empty or not + $validate_explanation = $this->validate_question_explanation($question); + if ($validate_explanation === 'no_question_explanation') { + $return_message = 'has_errors'; + } + + // check to see if the question is a slider or mc choice + if ($question['question_type'] === 'mc') { + //TODO + // add mc_options if mc question type + $this->validate_question_mc_options($question); + } elseif ($question['question_type'] === 'slider') { + // validate slider + $this->validate_question_slider($question); + } else { + // should never happen... + $this->add_error('Question ' . ($question['question_order'] + 1) . ' does not have a question type (multiple choice, slider, etc).'); + } + $i++; + } + return $return_message; + } + + + /** + * Checks questions for titles + * @return true if no question, false if there are questions + * + */ + public function validate_question_title($question) + { + $return_message = 'has_title'; + if (empty($question['question_title'])) { + $this->add_error('Question ' . ($question['question_order'] + 1) . ' is missing an actual question.'); + $return_message = 'no_title'; + } + + return $return_message; + } + + /** + * Checks questions for answer explanation + * @return string 'has_question_explanation' if found, 'no_question_explanation' if not found + * + */ + public function validate_question_explanation($question) + { + $return_message = 'has_question_explanation'; + if (empty($question['question_explanation'])) { + $this->add_error('Question ' . ($question['question_order'] + 1) . ' is missing an answer explanation.'); + $return_message = 'no_question_explanation'; + } + + return $return_message; + } + + + /** + * Checks questions for mc_options (if it should have them) + * @return string 'has_mc_options' if found, 'no_mc_options' if not found + * + */ + public function validate_question_mc_options($question) + { + + $return_message = 'no_mc_options'; + if (!array_key_exists('mc_option', $question)) { + return $return_message; + } else { + $mc_options = $question['mc_option']; + } + + if (empty($mc_options)) { + $this->add_error('Question ' . ($question['question_order'] + 1) . ' is missing multiple choice options.'); + $return_message = 'no_mc_options'; + return $return_message; + } + + if (count($mc_options) === 1) { + $this->add_error('Question ' . ($question['question_order'] + 1) . ' does not have enough multiple choice options.'); + } else { + $mc_option_has_correct = false; + foreach ($mc_options as $option) { + // check for values + if ($option['mc_option_content'] === '') { + $this->add_error('Question ' . ($question['question_order'] + 1) . ' has an empty Multiple Choice Option field.'); + } + // check to see if ANY one has been chosen + if ((int)$option['mc_option_correct'] === 1) { + $mc_option_has_correct = true; + // we have a correct option! yay! Everything is good. + $return_message = 'has_mc_options'; + } + } + if ($mc_option_has_correct !== true) { + $this->add_error('Question ' . ($question['question_order'] + 1) . ' needs a correct Multiple Choce Option answer to be selected.'); + } + } + + return $return_message; + } + + public function validate_question_slider($question) + { + $return_message = 'valid'; + if (!array_key_exists('slider', $question)) { + $return_message = 'key_does_not_exist'; + return $return_message; + } else { + $slider = $question['slider']; + } + + if (empty($slider)) { + $this->add_error('Question ' . ($question['question_order'] + 1) . ' Slider has no values.'); + $return_message = 'no_slider_values'; + return $return_message; + } + + // check all the necessary fields for values + $required_fields = array( + 'slider_id', + 'slider_range_low', + 'slider_range_high', + 'slider_correct_low', + 'slider_correct_high', + 'slider_increment' + ); + + $empty_fields = false; + + foreach ($required_fields as $required) { + // check if it's empty or not and that it doesn't match a 0 because + // 0 is a valid entry + if (empty($slider[$required]) && $slider[$required] !== (float) 0) { + $empty_fields = true; + $this->add_error('Question ' . ($question['question_order'] + 1) . ' Slider field ' . $required . ' is empty.'); + } + } + + // if we have empty fields, just finish the validation check now + if ($empty_fields === true) { + $return_message = 'missing_required_slider_fields'; + return $return_message; + } + if ($slider['slider_range_high'] <= $slider['slider_range_low']) { + $return_message = 'invalid'; + $this->add_error('Slider range for Question ' . ($question['question_order'] + 1) . ' needs to be changed.'); + } + + if ($slider['slider_correct_high'] < $slider['slider_correct_low']) { + $return_message = 'invalid'; + $this->add_error('Question ' . ($question['question_order'] + 1) . ' Slider Correct Answer High value is greater than the Correct Low value.'); + } + + if ($slider['slider_range_high'] < $slider['slider_correct_high']) { + $return_message = 'invalid'; + $this->add_error('Question ' . ($question['question_order'] + 1) . ' Slider Correct Answer is higher than the slider range. Increase the Slider End value or decrease the Slider Correct value.'); + } + + if ($slider['slider_correct_low'] < $slider['slider_range_low']) { + $return_message = 'invalid'; + $this->add_error('Question ' . ($question['question_order'] + 1) . ' Slider Correct answer is lower than the slider range. Decrease the Slider Start value or increase the Slider Correct answer.'); + } + + // get all increments into an array + if ($slider['slider_increment'] === (float) 0) { + $return_message = 'invalid'; + $this->add_error('Question ' . ($question['question_order'] + 1) . ' Slider increment cannot be 0.'); + } + // check that we're less than 1001 intervals + elseif (1000 < ($slider['slider_range_high'] - $slider['slider_range_low']) / $slider['slider_increment']) { + $return_message = 'invalid'; + $this->add_error('Question ' . ($question['question_order'] + 1) . ' has ' . ($slider['slider_range_high'] - $slider['slider_range_low']) / $slider['slider_increment'] . ' intervals. It cannot have more than 1000 intervals. Decrease the Slider Low/High Range values or increase the Slider Increment value.'); + } else { + // check to make sure the increment allows user to select the correct answer + // loop through the numbers to validate the increment + // stop at 1000, that's too many. + $start = $slider['slider_range_low']; + $end = $slider['slider_range_high']; + $current_number = $start; + + while ($current_number <= $end) { + // check if we're in the correct range + if ($slider['slider_correct_low'] <= $current_number && $current_number <= $slider['slider_correct_high']) { + // we've got a correct answer! + break; + } + // we're above the correct answer high, then break and return the error message. no reason to keep checking + elseif ($slider['slider_correct_high'] < $current_number) { + $this->add_error('Question ' . ($question['question_order'] + 1) . ' Slider correct answer is impossible to select with a Slider Increment value of ' . $slider['slider_increment'] . '. Change the correct answer value or increment value.'); + break; + } else { + // increase the interval and keep going + $current_number = $current_number + $slider['slider_increment']; + } + } + } + + return $return_message; + } + + /** + * Get the user_action['action'] + * @param response_obj + * @return string set in the user_action['action'] + */ + public function get_user_action_action() + { + return $this->user_action['action']; + } + + /** + * Get the user_action['element'] + * @param response_obj + * @return string set in the user_action['element'] + */ + public function get_user_action_element() + { + return $this->user_action['element']; + } + + /** + * Get the user_action['details'] array + * @param response_obj + * @return array set in the user_action['details'] + */ + public function get_user_action_details() + { + return $this->user_action['details']; + } + + /** + * Get the error messages array + * @param response_obj + * @return array set in the $messages['error'] + */ + public function get_error_messages() + { + return $this->message['error']; + } + + /** + * Get the success messages array + * @param response_obj + * @return array set in the $messages['success'] + */ + public function get_success_messages() + { + return $this->message['success']; + } + + /** + * Validate a quiz + * @param $quiz (array) a 100% complete quiz array + * @return (mixed) true if valid, false if not + */ + public function validate_quiz($quiz) + { + $quiz_options = $quiz['quiz_options']; + // check key_exists and not empty + $quiz_keys = array('quiz_title'); + $quiz_option_keys = array( + 'quiz_title_display', + 'quiz_text_color', + 'quiz_bg_color', + 'quiz_width' + ); + $valid = $this->validate_is_set($quiz, $quiz_keys); + $valid_options = $this->validate_is_set($quiz_options, $quiz_option_keys); + // we have values! let's keep on going with our check + if ($valid !== false) { + // validate quiz title + $this->validate_quiz_title($quiz['quiz_title']); + // validate quiz title display + $this->validate_quiz_title_display($quiz_options['quiz_title_display']); + // validate hex values + $hex_keys = array( + 'quiz_text_color', + 'quiz_bg_color' + ); + $this->validate_hex_values($quiz_options, $hex_keys); + // validate css_measurement values + $css_measurement_keys = array('quiz_width'); + $this->validate_css_measurement_values($quiz_options, $css_measurement_keys); + } + } + + public function validate_quiz_title($value) + { + $valid = false; + if (empty($value)) { + $this->add_error("Quiz Title can't be empty. Please enter a Title for your Quiz."); + } else { + $valid = true; + } + return $valid; + } + + public function validate_quiz_title_display($value) + { + $valid = false; + if ($value !== 'show' && $value !== 'hide') { + $this->add_error('Quiz Title Display must equal "show" or "hide".'); + } else { + $valid = true; + } + return $valid; + } + + public function validate_is_set($array = array(), $keys = array()) + { + // set as true and prove it's not valid + $valid = true; + if (empty($array) || empty($keys)) { + return false; + } + // check for all values + foreach ($keys as $key) { + // validate the the key exists in the array + $validate = $this->validate_exists($array, $key); + + // if it doesn't exist, set valid to false + if ($validate === false) { + $valid = false; + } else { + // it exists, so see if it's empty + $validate = $this->validate_not_empty($array, $key); + // if it's empty, set $valid to false + if ($validate === false) { + $valid = false; + } + } + } + + return $valid; + } + + public function validate_exists($array, $key) + { + $exists = false; + if (array_key_exists($key, $array)) { + $exists = true; + } else { + // if key doesn't exist, add error + // if empty, add error + $this->add_error($key . ' does not exist.'); + } + return $exists; + } + + public function validate_not_empty($array, $key) + { + $not_empty = false; + if (!empty($array[$key])) { + $not_empty = true; + } else { + // if empty, add error + $this->add_error($key . ' is empty.'); + } + return $not_empty; + } + + public function validate_hex_values($array, $keys) + { + $valid = true; + if (!empty($keys)) { + foreach ($keys as $key) { + $validate = $this->validate_hex($array[$key]); + if ($validate === false) { + // generate a good error message + $this->add_error('Hex Color value for ' . $key . ' was not valid. Hex Color Value must be a valid Hex value like #ffffff'); + $valid = false; + } + } + } + return $valid; + } + + public function validate_css_measurement_values($array, $keys) + { + $valid = true; + if (!empty($keys)) { + foreach ($keys as $key) { + $validate = $this->validate_css_measurement($array[$key]); + if ($validate === false) { + // generate a good error message + // give a good error message + $this->add_error('CSS Measurement value for ' . $key . ' is not valid. Measurements can be any valid CSS Measurement such as 100%, 600px, 30rem, 80vw'); + $valid = false; + } + } + } + return $valid; + } } diff --git a/includes/class-enp_quiz-activator.php b/includes/class-enp_quiz-activator.php index b7da4bd9..13816d25 100755 --- a/includes/class-enp_quiz-activator.php +++ b/includes/class-enp_quiz-activator.php @@ -10,24 +10,25 @@ * @subpackage Enp_quiz/includes * @author Engaging News Project */ -class Enp_quiz_Activator { +class Enp_quiz_Activator +{ public $enp_database_config_path, - $enp_config_path, - $quiz_table_name, - $quiz_option_table_name, - $question_table_name, - $mc_option_table_name, - $slider_table_name, - $response_quiz_table_name, - $response_question_table_name, - $response_mc_table_name, - $response_slider_table_name, - $ab_test_table_name, - $ab_test_response_table_name, - $embed_site_table_name, - $embed_site_type_table_name, - $embed_site_br_site_type_table_name, - $embed_quiz_table_name; + $enp_config_path, + $quiz_table_name, + $quiz_option_table_name, + $question_table_name, + $mc_option_table_name, + $slider_table_name, + $response_quiz_table_name, + $response_question_table_name, + $response_mc_table_name, + $response_slider_table_name, + $ab_test_table_name, + $ab_test_response_table_name, + $embed_site_table_name, + $embed_site_type_table_name, + $embed_site_br_site_type_table_name, + $embed_quiz_table_name; /** * Short Description. (use period) * @@ -35,26 +36,28 @@ class Enp_quiz_Activator { * * @since 0.0.1 */ - public function __construct() { + public function __construct() + { // set some stuff // set enp-database-quiz-config file path - $this->enp_database_config_path = $_SERVER["DOCUMENT_ROOT"].'/enp-quiz-database-config.php'; + $this->enp_database_config_path = $_SERVER["DOCUMENT_ROOT"] . '/enp-quiz-database-config.php'; // set enp-quiz-config file path - $this->enp_config_path = WP_CONTENT_DIR.'/enp-quiz-config.php'; + $this->enp_config_path = WP_CONTENT_DIR . '/enp-quiz-config.php'; // set table names $this->set_table_names(); // do nothing. do $this->run_activation() if you want to run it } - public function run_activation() { + public function run_activation() + { $this->create_tables(); $database_config_file_exists = $this->check_database_config_file(); // if doesn't exist, create it - if($database_config_file_exists === false) { + if ($database_config_file_exists === false) { //create the config file $this->create_database_config_file(); } @@ -63,7 +66,7 @@ public function run_activation() { $config_file_exists = $this->check_config_file(); // if doesn't exist, create it - if($config_file_exists === false) { + if ($config_file_exists === false) { //create the config file $this->create_config_file(); } @@ -74,7 +77,7 @@ public function run_activation() { // check to see if our image upload directory exists if (!file_exists(ENP_QUIZ_IMAGE_DIR)) { // if it doesn't exist, create it - mkdir(ENP_QUIZ_IMAGE_DIR, 0777, true); + mkdir(ENP_QUIZ_IMAGE_DIR, 0777, true); } // Set-up rewrite rules based on our config files @@ -82,43 +85,45 @@ public function run_activation() { $this->add_rewrite_rules(); } - protected function include_config_file() { + protected function include_config_file() + { $config_file_exists = $this->check_config_file(); //check to make sure the config file exists - if($config_file_exists === true) { + if ($config_file_exists === true) { include_once($this->enp_config_path); } else { die('Could not find the enp-quiz-config.php file in the wp-content folder. Try deactivating and re-activating the plugin. This should create the config file.'); } } - public function add_rewrite_rules($hard = true) { - if(!defined('ENP_QUIZ_TAKE_TEMPLATES_PATH')) { + public function add_rewrite_rules($hard = true) + { + if (!defined('ENP_QUIZ_TAKE_TEMPLATES_PATH')) { $this->include_config_file(); } - + // path to quiz // we have to remove the base path because add_rewrite_rule will start // at the base directory. Take ABSPATH and subtract it from our Config Template Path - $enp_quiz_take_template_path = str_replace(ABSPATH,"",ENP_QUIZ_TAKE_TEMPLATES_PATH); - $enp_quiz_create_template_path = str_replace(ABSPATH,"",ENP_QUIZ_CREATE_TEMPLATES_PATH); + $enp_quiz_take_template_path = str_replace(ABSPATH, "", ENP_QUIZ_TAKE_TEMPLATES_PATH); + $enp_quiz_create_template_path = str_replace(ABSPATH, "", ENP_QUIZ_CREATE_TEMPLATES_PATH); // Quiz Create - add_rewrite_rule('enp-quiz/([^/]*)/([^/]*)?','index.php?enp_quiz_template=$matches[1]&enp_quiz_id=$matches[2]','top'); + add_rewrite_rule('enp-quiz/([^/]*)/([^/]*)?', 'index.php?enp_quiz_template=$matches[1]&enp_quiz_id=$matches[2]', 'top'); // Quiz Take - add_rewrite_rule('quiz-embed/([0-9]+)?$', $enp_quiz_take_template_path.'quiz.php?quiz_id=$1','top'); + add_rewrite_rule('quiz-embed/([0-9]+)?$', $enp_quiz_take_template_path . 'quiz.php?quiz_id=$1', 'top'); // Take AB Test - add_rewrite_rule('ab-embed/([0-9]+)?$', $enp_quiz_take_template_path.'ab-test.php?ab_test_id=$1','top'); + add_rewrite_rule('ab-embed/([0-9]+)?$', $enp_quiz_take_template_path . 'ab-test.php?ab_test_id=$1', 'top'); - if($hard == true) { + if ($hard == true) { // hard flush on rewrite rules so it regenerates the htaccess file flush_rewrite_rules(); } - } - protected function set_table_names() { + protected function set_table_names() + { global $wpdb; $this->quiz_table_name = $wpdb->prefix . 'enp_quiz'; @@ -139,13 +144,14 @@ protected function set_table_names() { } /** - * Creates all the tables we need for the plugin - * Will not create tables that already exist, so feel free to run - * this script if adding new tables (since they will only be created) - * if they don't exist - * @dependencies $wpdb global - */ - public function create_tables() { + * Creates all the tables we need for the plugin + * Will not create tables that already exist, so feel free to run + * this script if adding new tables (since they will only be created) + * if they don't exist + * @dependencies $wpdb global + */ + public function create_tables() + { global $wpdb; $charset_collate = $wpdb->get_charset_collate(); // quiz table name @@ -154,6 +160,7 @@ public function create_tables() { $quiz_sql = "CREATE TABLE $quiz_table_name ( quiz_id BIGINT(20) NOT NULL AUTO_INCREMENT, quiz_title VARCHAR(255) NOT NULL, + quiz_title_test VARCHAR(255) NOT NULL, quiz_status VARCHAR(11) NOT NULL, quiz_finish_message VARCHAR(510) NOT NULL, quiz_owner BIGINT(20) NOT NULL, @@ -389,87 +396,88 @@ public function create_tables() { // create a tables array, // store all the table names and queries $tables = array( - array( - 'name'=>$this->quiz_table_name, - 'sql'=>$quiz_sql - ), - array( - 'name'=>$this->quiz_option_table_name, - 'sql'=>$quiz_option_sql - ), - array( - 'name'=>$this->question_table_name, - 'sql'=>$question_sql - ), - array( - 'name'=>$this->mc_option_table_name, - 'sql'=>$mc_option_sql - ), - array( - 'name'=>$this->slider_table_name, - 'sql'=>$slider_sql - ), - array( - 'name'=>$this->response_quiz_table_name, - 'sql'=>$response_quiz_sql - ), - array( - 'name'=>$this->response_question_table_name, - 'sql'=>$response_question_sql - ), - array( - 'name'=>$this->response_mc_table_name, - 'sql'=>$response_mc_sql - ), - array( - 'name'=>$this->response_slider_table_name, - 'sql'=>$response_slider_sql - ), - array( - 'name'=>$this->ab_test_table_name, - 'sql'=>$ab_test_sql - ), - array( - 'name'=>$this->ab_test_response_table_name, - 'sql'=>$ab_test_response_sql - ), - array( - 'name'=>$this->embed_site_table_name, - 'sql'=>$embed_site_sql - ), - array( - 'name'=>$this->embed_site_type_table_name, - 'sql'=>$embed_site_type_sql - ), - array( - 'name'=>$this->embed_site_br_site_type_table_name, - 'sql'=>$embed_site_br_site_type_sql - ), - array( - 'name'=>$this->embed_quiz_table_name, - 'sql'=>$embed_quiz_sql - ), - ); + array( + 'name' => $this->quiz_table_name, + 'sql' => $quiz_sql + ), + array( + 'name' => $this->quiz_option_table_name, + 'sql' => $quiz_option_sql + ), + array( + 'name' => $this->question_table_name, + 'sql' => $question_sql + ), + array( + 'name' => $this->mc_option_table_name, + 'sql' => $mc_option_sql + ), + array( + 'name' => $this->slider_table_name, + 'sql' => $slider_sql + ), + array( + 'name' => $this->response_quiz_table_name, + 'sql' => $response_quiz_sql + ), + array( + 'name' => $this->response_question_table_name, + 'sql' => $response_question_sql + ), + array( + 'name' => $this->response_mc_table_name, + 'sql' => $response_mc_sql + ), + array( + 'name' => $this->response_slider_table_name, + 'sql' => $response_slider_sql + ), + array( + 'name' => $this->ab_test_table_name, + 'sql' => $ab_test_sql + ), + array( + 'name' => $this->ab_test_response_table_name, + 'sql' => $ab_test_response_sql + ), + array( + 'name' => $this->embed_site_table_name, + 'sql' => $embed_site_sql + ), + array( + 'name' => $this->embed_site_type_table_name, + 'sql' => $embed_site_type_sql + ), + array( + 'name' => $this->embed_site_br_site_type_table_name, + 'sql' => $embed_site_br_site_type_sql + ), + array( + 'name' => $this->embed_quiz_table_name, + 'sql' => $embed_quiz_sql + ), + ); // require file that allows table creation - require_once( ABSPATH . 'wp-admin/includes/upgrade.php' ); + require_once(ABSPATH . 'wp-admin/includes/upgrade.php'); // loop through all of our tables and // create them if they haven't already been created - foreach($tables as $table) { + foreach ($tables as $table) { $table_name = $table['name']; $table_sql = $table['sql']; // see if the table exists or not - if($wpdb->get_var("show tables like '$table_name'") != $table_name) { + if ($wpdb->get_var("show tables like '$table_name'") != $table_name) { // it doesn't exist, so create the table dbDelta($table_sql); } } } - protected function check_database_config_file() { + protected function check_database_config_file() + { // see if the file exists - if(file_exists($this->enp_database_config_path)) { + if (file_exists($this->enp_database_config_path)) { // if the file exists, return true return true; } @@ -477,33 +485,34 @@ protected function check_database_config_file() { return false; } - protected function create_database_config_file() { + protected function create_database_config_file() + { // creates and opens the file for writing $database_config_file = fopen($this->enp_database_config_path, "w"); -// use single quotes around the DB_PASSWORD in case they have -// a $ in their password -$database_connection = 'quiz_table_name.'"; -$enp_quiz_table_quiz_option = "'.$this->quiz_option_table_name.'"; -$enp_quiz_table_question = "'.$this->question_table_name.'"; -$enp_quiz_table_question_mc_option = "'.$this->mc_option_table_name.'"; -$enp_quiz_table_question_slider = "'.$this->slider_table_name.'"; -$enp_quiz_table_ab_test = "'.$this->ab_test_table_name.'"; -$enp_quiz_table_response_quiz = "'.$this->response_quiz_table_name.'"; -$enp_quiz_table_response_question = "'.$this->response_question_table_name.'"; -$enp_quiz_table_response_mc = "'.$this->response_mc_table_name.'"; -$enp_quiz_table_response_slider = "'.$this->response_slider_table_name.'"; -$enp_quiz_table_ab_test_response = "'.$this->ab_test_response_table_name.'"; -$enp_quiz_table_embed_site = "'.$this->embed_site_table_name.'"; -$enp_quiz_table_embed_site_type = "'.$this->embed_site_type_table_name.'"; -$enp_quiz_table_embed_site_br_site_type = "'.$this->embed_site_br_site_type_table_name.'"; -$enp_quiz_table_embed_quiz = "'.$this->embed_quiz_table_name.'";'; +$enp_db_name = "' . DB_NAME . '"; +$enp_db_user = "' . DB_USER . '"; +$enp_db_password = \'' . DB_PASSWORD . '\'; +$enp_db_host = "' . DB_HOST . '"; +$enp_quiz_table_quiz = "' . $this->quiz_table_name . '"; +$enp_quiz_table_quiz_option = "' . $this->quiz_option_table_name . '"; +$enp_quiz_table_question = "' . $this->question_table_name . '"; +$enp_quiz_table_question_mc_option = "' . $this->mc_option_table_name . '"; +$enp_quiz_table_question_slider = "' . $this->slider_table_name . '"; +$enp_quiz_table_ab_test = "' . $this->ab_test_table_name . '"; +$enp_quiz_table_response_quiz = "' . $this->response_quiz_table_name . '"; +$enp_quiz_table_response_question = "' . $this->response_question_table_name . '"; +$enp_quiz_table_response_mc = "' . $this->response_mc_table_name . '"; +$enp_quiz_table_response_slider = "' . $this->response_slider_table_name . '"; +$enp_quiz_table_ab_test_response = "' . $this->ab_test_response_table_name . '"; +$enp_quiz_table_embed_site = "' . $this->embed_site_table_name . '"; +$enp_quiz_table_embed_site_type = "' . $this->embed_site_type_table_name . '"; +$enp_quiz_table_embed_site_br_site_type = "' . $this->embed_site_br_site_type_table_name . '"; +$enp_quiz_table_embed_quiz = "' . $this->embed_quiz_table_name . '";'; // write to the file fwrite($database_config_file, $database_connection); @@ -512,9 +521,10 @@ protected function create_database_config_file() { return true; } - protected function check_config_file() { + protected function check_config_file() + { // see if the file exists - if(file_exists($this->enp_config_path)) { + if (file_exists($this->enp_config_path)) { // if the file exists, return true return true; } @@ -522,7 +532,8 @@ protected function check_config_file() { return false; } - protected function create_config_file() { + protected function create_config_file() + { // creates and opens the file for writing $config_file = fopen($this->enp_config_path, "w"); // get site url and append our string @@ -531,26 +542,26 @@ protected function create_config_file() { // default image directory for question image uploads $image_dir = wp_upload_dir(); -$config_contents = -'enp_database_config_path.'"); -define("ENP_QUIZ_CREATE_TEMPLATES_PATH", "'.ENP_QUIZ_ROOT.'public/quiz-create/templates/"); -define("ENP_QUIZ_CREATE_MAIN_TEMPLATE_PATH", "'.ENP_QUIZ_ROOT.'public/quiz-create/templates/enp-quiz-page.php"); -define("ENP_QUIZ_TAKE_TEMPLATES_PATH", "'.ENP_QUIZ_ROOT.'public/quiz-take/templates/"); -define("ENP_QUIZ_TAKE_RESOURCES_PATH", "'.ENP_QUIZ_ROOT.'public/quiz-take/"); -define("ENP_QUIZ_DASHBOARD_URL", "'.$enp_create_url.'/dashboard/"); -define("ENP_QUIZ_CREATE_URL", "'.$enp_create_url.'/quiz-create/"); -define("ENP_QUIZ_PREVIEW_URL", "'.$enp_create_url.'/quiz-preview/"); -define("ENP_QUIZ_PUBLISH_URL", "'.$enp_create_url.'/quiz-publish/"); -define("ENP_QUIZ_RESULTS_URL", "'.$enp_create_url.'/quiz-results/"); -define("ENP_AB_TEST_URL", "'.$enp_create_url.'/ab-test/"); -define("ENP_AB_RESULTS_URL", "'.$enp_create_url.'/ab-results/"); -define("ENP_QUIZ_URL", "'.$enp_take_url.'/quiz-embed/"); -define("ENP_TAKE_AB_TEST_URL", "'.$enp_take_url.'/ab-embed/"); -define("ENP_QUIZ_IMAGE_DIR", "'.$image_dir["basedir"].'/enp-quiz/"); -define("ENP_QUIZ_IMAGE_URL", "'.$image_dir["baseurl"].'/enp-quiz/"); -define("ENP_QUIZ_PLUGIN_DIR", "'.ENP_QUIZ_ROOT.'"); -define("ENP_QUIZ_PLUGIN_URL", "'.ENP_QUIZ_ROOT_URL.'/"); + $config_contents = + 'enp_database_config_path . '"); +define("ENP_QUIZ_CREATE_TEMPLATES_PATH", "' . ENP_QUIZ_ROOT . 'public/quiz-create/templates/"); +define("ENP_QUIZ_CREATE_MAIN_TEMPLATE_PATH", "' . ENP_QUIZ_ROOT . 'public/quiz-create/templates/enp-quiz-page.php"); +define("ENP_QUIZ_TAKE_TEMPLATES_PATH", "' . ENP_QUIZ_ROOT . 'public/quiz-take/templates/"); +define("ENP_QUIZ_TAKE_RESOURCES_PATH", "' . ENP_QUIZ_ROOT . 'public/quiz-take/"); +define("ENP_QUIZ_DASHBOARD_URL", "' . $enp_create_url . '/dashboard/"); +define("ENP_QUIZ_CREATE_URL", "' . $enp_create_url . '/quiz-create/"); +define("ENP_QUIZ_PREVIEW_URL", "' . $enp_create_url . '/quiz-preview/"); +define("ENP_QUIZ_PUBLISH_URL", "' . $enp_create_url . '/quiz-publish/"); +define("ENP_QUIZ_RESULTS_URL", "' . $enp_create_url . '/quiz-results/"); +define("ENP_AB_TEST_URL", "' . $enp_create_url . '/ab-test/"); +define("ENP_AB_RESULTS_URL", "' . $enp_create_url . '/ab-results/"); +define("ENP_QUIZ_URL", "' . $enp_take_url . '/quiz-embed/"); +define("ENP_TAKE_AB_TEST_URL", "' . $enp_take_url . '/ab-embed/"); +define("ENP_QUIZ_IMAGE_DIR", "' . $image_dir["basedir"] . '/enp-quiz/"); +define("ENP_QUIZ_IMAGE_URL", "' . $image_dir["baseurl"] . '/enp-quiz/"); +define("ENP_QUIZ_PLUGIN_DIR", "' . ENP_QUIZ_ROOT . '"); +define("ENP_QUIZ_PLUGIN_URL", "' . ENP_QUIZ_ROOT_URL . '/"); ?>'; // write to the file @@ -559,5 +570,4 @@ protected function create_config_file() { fclose($config_file); return true; } - } diff --git a/includes/class-enp_quiz-quiz.php b/includes/class-enp_quiz-quiz.php index d4665fb5..33b68cfe 100644 --- a/includes/class-enp_quiz-quiz.php +++ b/includes/class-enp_quiz-quiz.php @@ -1,926 +1,1020 @@ get_quiz_by_id($quiz_id); - } - - /** - * Build quiz object by id - * - * @param $quiz_id = quiz_id that you want to select - * @return quiz object, false if not found - **/ - public function get_quiz_by_id($quiz_id) { - self::$quiz = $this->select_quiz_by_id($quiz_id); - if(self::$quiz !== false) { - self::$quiz = $this->set_quiz_object_values(); - } - return self::$quiz; - } - - /** - * For using PDO to select one quiz row - * - * @param $quiz_id = quiz_id that you want to select - * @return row from database table if found, false if not found - **/ - public function select_quiz_by_id($quiz_id) { - $pdo = new enp_quiz_Db(); - // Do a select query to see if we get a returned row - $params = array( - ":quiz_id" => $quiz_id - ); - $sql = "SELECT * from ".$pdo->quiz_table." WHERE - quiz_id = :quiz_id - AND quiz_is_deleted = 0"; - $stmt = $pdo->query($sql, $params); - $quiz_row = $stmt->fetch(); - // return the found quiz row - return $quiz_row; - } - - /** - * Hook up all the values for the object - * @param $quiz = row from the quiz_table - */ - protected function set_quiz_object_values() { - $this->quiz_id = $this->set_quiz_id(); - $this->quiz_title = $this->set_quiz_title(); - $this->quiz_status = $this->set_quiz_status(); - $this->quiz_finish_message = $this->set_quiz_finish_message(); - $this->quiz_owner = $this->set_quiz_owner(); - $this->quiz_created_by = $this->set_quiz_created_by(); - $this->quiz_created_at = $this->set_quiz_created_at(); - $this->quiz_updated_by = $this->set_quiz_updated_by(); - $this->quiz_updated_at = $this->set_quiz_updated_at(); - $this->quiz_is_deleted = $this->set_quiz_is_deleted(); - $this->questions = $this->set_questions(); - $this->quiz_views = $this->set_quiz_views(); - $this->quiz_starts = $this->set_quiz_starts(); - $this->quiz_finishes = $this->set_quiz_finishes(); - $this->quiz_score_average = $this->set_quiz_score_average(); - $this->quiz_time_spent = $this->set_quiz_time_spent(); - $this->quiz_time_spent_average = $this->set_quiz_time_spent_average(); - - // set options - $this->set_quiz_options(); - } - - /** - * Queries the quiz options table and sets more quiz object values - * @param $quiz_id - */ - protected function set_quiz_options() { - $option_rows = $this->select_quiz_options(); - foreach($option_rows as $row => $option) { - // allow any option value to be set. We can whitelist it later if we'd like/if it's a security issue - // $whitelist = array(''); - // check if in_array($whitelist); - // ... - $option_value = $option['quiz_option_value']; - $option_name = $option['quiz_option_name']; - - $this->quiz_options[$option_name] = stripslashes($option_value); - - } - } - - /** - * For using PDO to select one quiz row - * - * @param $quiz_id = quiz_id that you want to select - * @return row from database table if found, false if not found - **/ - protected function select_quiz_options() { - $quiz_id = $this->quiz_id; - - $pdo = new enp_quiz_Db(); - // Do a select query to see if we get a returned row - $params = array( - ":quiz_id" => $quiz_id - ); - $sql = "SELECT * from ".$pdo->quiz_option_table." WHERE - quiz_id = :quiz_id"; - $stmt = $pdo->query($sql, $params); - $option_rows = $stmt->fetchAll(PDO::FETCH_ASSOC); - return $option_rows; - } - - /** - * Set the quiz_id for our Quiz Object - * @param $quiz = quiz row from quiz database table - * @return quiz_id field from the database - */ - protected function set_quiz_id() { - $quiz_id = self::$quiz['quiz_id']; - return $quiz_id; - } - - /** - * Set the quiz_title for our Quiz Object - * @param $quiz = quiz row from quiz database table - * @return quiz_title field from the database - */ - protected function set_quiz_title() { - $quiz_title = stripslashes(self::$quiz['quiz_title']); - return $quiz_title; - } - - /** - * Set the quiz_status for our Quiz Object - * @param $quiz = quiz row from quiz database table - * @return 'published' or 'draft' - */ - protected function set_quiz_status() { - $quiz_status = self::$quiz['quiz_status']; - if($quiz_status !== 'published') { - $quiz_status = 'draft'; - } - return $quiz_status; - } - - /** - * Set the quiz_finish_message for our Quiz Object - * @param $quiz = quiz row from quiz database table - * @return quiz_finish_message field from the database - */ - protected function set_quiz_finish_message() { - $quiz_finish_message = stripslashes(self::$quiz['quiz_finish_message']); - return $quiz_finish_message; - } - - /** - * Set the quiz_owner for our Quiz Object - * @param $quiz = quiz row from quiz database table - * @return quiz_owner field from the database - */ - protected function set_quiz_owner() { - $quiz_owner = self::$quiz['quiz_owner']; - return $quiz_owner; - } - - /** - * Set the created_by for our Quiz Object - * @param $quiz = quiz row from quiz database table - * @return created_by field from the database - */ - protected function set_quiz_created_by() { - $created_by = self::$quiz['quiz_created_by']; - return $created_by; - } - - /** - * Set the created_at for our Quiz Object - * @param $quiz = quiz row from quiz database table - * @return created_at field from the database - */ - protected function set_quiz_created_at() { - $created_at = self::$quiz['quiz_created_at']; - return $created_at; - } - - /** - * Set the updated_by for our Quiz Object - * @param $quiz = quiz row from quiz database table - * @return updated_by field from the database - */ - protected function set_quiz_updated_by() { - $updated_by = self::$quiz['quiz_updated_by']; - return $updated_by; - } - - /** - * Set the updated_at for our Quiz Object - * @param $quiz = quiz row from quiz database table - * @return updated_at field from the database - */ - protected function set_quiz_updated_at() { - $updated_at = self::$quiz['quiz_updated_at']; - return $updated_at; - } - - /** - * Set the is_deleted for our Quiz Object - * @param $quiz = quiz row from quiz database table - * @return is_deleted field from the database - */ - protected function set_quiz_is_deleted() { - $is_deleted = self::$quiz['quiz_is_deleted']; - return $is_deleted; - } - - /** - * Set the questions for our Quiz Object - * @param $quiz_id - * @return questions array of ids array(3,4,5) from the database - */ - protected function set_questions() { - $quiz_id = self::$quiz['quiz_id']; - - $pdo = new enp_quiz_Db(); - // Do a select query to see if we get a returned row - $params = array( - ":quiz_id" => $quiz_id - ); - $sql = "SELECT question_id from ".$pdo->question_table." WHERE - quiz_id = :quiz_id - AND question_is_deleted = 0 - ORDER BY question_order ASC"; - $stmt = $pdo->query($sql, $params); - $question_rows = $stmt->fetchAll(PDO::FETCH_ASSOC); - - $questions = array(); - foreach($question_rows as $row => $question) { - $questions[] = (int) $question['question_id']; - } - return $questions; - } - - /** - * Set the views for our Quiz Object - * @param $quiz = quiz row from quiz database table - * @return views field from the database - */ - protected function set_quiz_views() { - $views = self::$quiz['quiz_views']; - return $views; - } - - /** - * Set the starts for our Quiz Object - * @param $quiz = quiz row from quiz database table - * @return starts field from the database - */ - protected function set_quiz_starts() { - $starts = self::$quiz['quiz_starts']; - return $starts; - } - - /** - * Set the finishes for our Quiz Object - * @param $quiz = quiz row from quiz database table - * @return finishes field from the database - */ - protected function set_quiz_finishes() { - $finishes = self::$quiz['quiz_finishes']; - return $finishes; - } - - /** - * Set the score_average for our Quiz Object - * @param $quiz = quiz row from quiz database table - * @return score_average field from the database - */ - protected function set_quiz_score_average() { - $score_average = self::$quiz['quiz_score_average']; - return $score_average; - } - - /** - * Set the time_spent for our Quiz Object - * @param $quiz = quiz row from quiz database table - * @return time_spent field from the database - */ - protected function set_quiz_time_spent() { - $time_spent = self::$quiz['quiz_time_spent']; - return $time_spent; - } - - /** - * Set the time_spent_average for our Quiz Object - * @param $quiz = quiz row from quiz database table - * @return time_spent_average field from the database - */ - protected function set_quiz_time_spent_average() { - $time_spent_average = self::$quiz['quiz_time_spent_average']; - return $time_spent_average; - } - - /** - * Get the quiz_id for our Quiz Object - * @param $quiz = quiz object - * @return quiz_id from the object - */ - public function get_quiz_id() { - $quiz_id = $this->quiz_id; - return $quiz_id; - } - - /** - * Get the quiz_title for our Quiz Object - * @param $quiz = quiz object - * @return quiz_title from the object - */ - public function get_quiz_title() { - $quiz_title = $this->quiz_title; - return $quiz_title; - } - - /** - * Get the quiz_status for our Quiz Object - * @param $quiz = quiz object - * @return 'published' or 'draft' - */ - public function get_quiz_status() { - $quiz_status = $this->quiz_status; - return $quiz_status; - } - - /** - * Get the quiz_finish_message for our Quiz Object - * @param $quiz = quiz object - * @return quiz_finish_message from the quiz object - */ - public function get_quiz_finish_message() { - $quiz_finish_message = $this->quiz_finish_message; - return $quiz_finish_message; - } - - /** - * Get the quiz_owner for our Quiz Object - * @param $quiz = quiz object - * @return user_id - */ - public function get_quiz_owner() { - $quiz_owner = $this->quiz_owner; - return $quiz_owner; - } - - /** - * Get the quiz_created_by for our Quiz Object - * @param $quiz = quiz object - * @return user_id - */ - public function get_quiz_created_by() { - $quiz_created_by = $this->quiz_created_by; - return $quiz_created_by; - } - - /** - * Get the quiz_created_at for our Quiz Object - * @param $quiz = quiz object - * @return Date formatted Y-m-d H:i:s - */ - public function get_quiz_created_at() { - $quiz_created_at = $this->quiz_created_at; - return $quiz_created_at; - } - - /** - * Get the quiz_updated_by for our Quiz Object - * @param $quiz = quiz object - * @return user_id - */ - public function get_quiz_updated_by() { - $quiz_updated_by = $this->quiz_updated_by; - return $quiz_updated_by; - } - - /** - * Get the quiz_updated_at for our Quiz Object - * @param $quiz = quiz object - * @return Date formatted Y-m-d H:i:s - */ - public function get_quiz_updated_at() { - $quiz_updated_at = $this->quiz_updated_at; - return $quiz_updated_at; - } - - /** - * Get the quiz_is_deleted for our Quiz Object - * @param $quiz = quiz object - * @return Date formatted Y-m-d H:i:s - */ - public function get_quiz_is_deleted() { - $quiz_is_deleted = $this->quiz_is_deleted; - return $quiz_is_deleted; - } - - /** - * Get a quiz option from our Quiz Object - * @param $key (string) key from the $this->quiz_option array - * @return (Mixed) $value of the item in the array if found, null if not found - */ - public function get_quiz_option($key) { - $value = null; - if(is_array($this->quiz_options) && array_key_exists($key, $this->quiz_options)) { - $value = $this->quiz_options[$key]; - } - return $value; - } - - /** - * Get the quiz_title_display for our Quiz Object - * @param $quiz = quiz object - * @return (string) 'show' or 'hide' - */ - public function get_quiz_title_display() { - return $this->get_quiz_option('quiz_title_display'); - } - - - /** - * Get the quiz_width for our Quiz Object - * @param $quiz = quiz object - * @return (string) %, px, em, or rem value (100%, 800px, 20rem, etc) - */ - public function get_quiz_width() { - return $this->get_quiz_option('quiz_width'); - } - - /** - * Get the quiz_bg_color for our Quiz Object - * @param $quiz = quiz object - * @return #hex code - */ - public function get_quiz_bg_color() { - return $this->get_quiz_option('quiz_bg_color'); - } - - /** - * Get the quiz_text_color for our Quiz Object - * @param $quiz = quiz object - * @return #hex code - */ - public function get_quiz_text_color() { - return $this->get_quiz_option('quiz_text_color'); - } - - /** - * Get the quiz_border_color for our Quiz Object - * @param $quiz = quiz object - * @return #hex code - */ - public function get_quiz_border_color() { - return $this->get_quiz_option('quiz_border_color'); - } - - /** - * Get the quiz_button_color for our Quiz Object - * @param $quiz = quiz object - * @return #hex code - */ - public function get_quiz_button_color() { - return $this->get_quiz_option('quiz_button_color'); - } - - /** - * Get the quiz_correct_color for our Quiz Object - * @param $quiz = quiz object - * @return #hex code - */ - public function get_quiz_correct_color() { - return $this->get_quiz_option('quiz_correct_color'); - } - - /** - * Get the quiz_incorrect_color for our Quiz Object - * @param $quiz = quiz object - * @return #hex code - */ - public function get_quiz_incorrect_color() { - return $this->get_quiz_option('quiz_incorrect_color'); - } - - /** - * Get the quiz_custom_css for our Quiz Object - * @param $quiz = quiz object - * @return saved css - */ - public function get_quiz_custom_css() { - return $this->get_quiz_option('quiz_custom_css'); - } - - /** - * Get the quiz_custom_css_minified for our Quiz Object - * @param $quiz = quiz object - * @return saved css - */ - public function get_quiz_custom_css_minified() { - return $this->get_quiz_option('quiz_custom_css_minified'); - } - - /** - * Get the quiz_custom_css_minified for our Quiz Object - * @param $quiz = quiz object - * @return saved css - */ - public function get_quiz_mc_options_order() { - return $this->get_quiz_option('quiz_mc_options_order'); - } - - /** - * Get the facebook_title_start for our Quiz Object - * @param $quiz = quiz object - * @return string - */ - public function get_facebook_title() { - return $this->get_quiz_option('facebook_title'); - } - - /** - * Get the facebook_description_start for our Quiz Object - * @param $quiz = quiz object - * @return string - */ - public function get_facebook_description() { - return $this->get_quiz_option('facebook_description'); - } - - /** - * Get the facebook_quote_end for our Quiz Object - * @param $quiz = quiz object - * @return string - */ - public function get_facebook_quote_end() { - return $this->get_quiz_option('facebook_quote_end'); - } - - - /** - * Get the email_subject_start for our Quiz Object - * @param $quiz = quiz object - * @return string - */ - public function get_email_subject() { - return $this->get_quiz_option('email_subject'); - } - - /** - * Get the facebook_description_start for our Quiz Object - * @param $quiz = quiz object - * @return string - */ - public function get_email_body_start() { - return $this->get_quiz_option('email_body_start'); - } - - /** - * Get the email_body_end for our Quiz Object - * @param $quiz = quiz object - * @return string - */ - public function get_email_body_end() { - return $this->get_quiz_option('email_body_end'); - } - - /** - * Get the tweet_end for our Quiz Object - * @param $quiz = quiz object - * @return string - */ - public function get_tweet_end() { - $tweet = $this->get_quiz_option('tweet_end'); - return $tweet; - } - - /** - * Utility function for encoding content - * @param $key (string) of Object var ('tweet_end', 'email_body_start', etc) - * @param $encoding (string) 'rawurl','url','htmlspecialchars' - * @param $mustache BOOLEAN keep mustache variables decoded - * @return encoded string - */ - public function get_encoded($key, $encoding = 'url', $mustache = false) { - $getter = 'get_'.$key; - $value = $this->$getter(); - $value = $this->encode_content($value, $encoding, $mustache); - return $value; - } - /** - * Get the questions for our Quiz Object - * @param $quiz = quiz object - * @return array of question_id's as integers - */ - public function get_questions() { - $questions = $this->questions; - return $questions; - } - - - /** - * Get the quiz views for our Quiz Object - * @param $quiz = quiz object - * @return Date formatted Y-m-d H:i:s - */ - public function get_quiz_views() { - $quiz_views = $this->quiz_views; - return $quiz_views; - } - - /** - * Get the quiz starts for our Quiz Object - * @param $quiz = quiz object - * @return Date formatted Y-m-d H:i:s - */ - public function get_quiz_starts() { - $quiz_starts = $this->quiz_starts; - return $quiz_starts; - } - - /** - * Get the quiz finishes for our Quiz Object - * @param $quiz = quiz object - * @return Date formatted Y-m-d H:i:s - */ - public function get_quiz_finishes() { - $quiz_finishes = $this->quiz_finishes; - return $quiz_finishes; - } - - /** - * Get the quiz score_average for our Quiz Object - * @param $quiz = quiz object - * @return Date formatted Y-m-d H:i:s - */ - public function get_quiz_score_average() { - $quiz_score_average = $this->quiz_score_average; - return $quiz_score_average; - } - - /** - * Utility function to return count of all questions - * @return (int) number of questions in the quiz - */ - public function get_total_question_count() { - $questions = $this->get_questions(); - return count($questions); - } - - - /** - * Get the quiz time_spent for our Quiz Object - * @param $quiz = quiz object - * @return Date formatted Y-m-d H:i:s - */ - public function get_quiz_time_spent() { - $quiz_time_spent = $this->quiz_time_spent; - return $quiz_time_spent; - } - - /** - * Get the quiz time_spent_average for our Quiz Object - * @param $quiz = quiz object - * @return Date formatted Y-m-d H:i:s - */ - public function get_quiz_time_spent_average() { - $quiz_time_spent_average = $this->quiz_time_spent_average; - return $quiz_time_spent_average; - } - - /** - * Get the individual score data on each take of this quiz - * @param $quiz = quiz object - * @return array of all the scores - */ - public function get_quiz_scores() { - $pdo = new enp_quiz_Db(); - // Do a select query to see if we get a returned row - $params = array( - ":quiz_id" => $this->get_quiz_id() - ); - $sql = "SELECT quiz_score from ".$pdo->response_quiz_table." - WHERE quiz_completed = 1 - AND quiz_id = :quiz_id - AND response_quiz_is_deleted = 0 - ORDER BY quiz_score ASC"; - $stmt = $pdo->query($sql, $params); - $scores = $stmt->fetchAll(PDO::FETCH_ASSOC); - - $quiz_scores = array(); - foreach($scores as $score) { - $quiz_scores[] = (int) round($score['quiz_score'] * 100); - } - - // return the found quiz row - return $quiz_scores; - } - - /** - * Outputs an array that returns the count of each possible score - * @return array($score => $how_many_people_got_this_score, 100'=>'12', '50'=>12, '0'=>4); - */ - public function get_quiz_scores_group_count() { - $all_quiz_scores = $this->get_quiz_scores(); - $all_quiz_scores = array_count_values($all_quiz_scores); - // merge the array with a default of possible scores array - // so we have all values, even if they don't have a set score yet - $default_scores = array(); - $total_questions = $this->get_total_question_count(); - // return 0 if there are no questions - if($total_questions === 0) { - return $all_quiz_scores; - } - - $i = 0; - while($i <= $total_questions) { - $key = (int) round($i/$total_questions * 100); - $default_scores[$key] = 0; - $i++; - } - - - // merge the arrays while preserving keys - $all_quiz_scores = $all_quiz_scores + $default_scores; - // sort by key, low to high - ksort($all_quiz_scores); - - return $all_quiz_scores; - } - - /** - * Useful for line charts and tables of quiz score data - * @return array('quiz_scores'=>array(scores grouped by integer), 'quiz_scores_labels'=>array(score labels)) - */ - public function get_quiz_score_chart_data() { - $all_quiz_scores = $this->get_quiz_scores_group_count(); - $quiz_scores_labels = array(); - $quiz_scores = array(); - foreach($all_quiz_scores as $key => $val) { - $quiz_scores_labels[] = $key.'%'; - $quiz_scores[] = $val; - } - - $quiz_results = array( - 'quiz_scores' => $quiz_scores, - 'quiz_scores_labels' => $quiz_scores_labels, - ); - - return $quiz_results; - } - - /** - * Get the Quiz Take URL - */ - public function get_quiz_url() { - return ENP_QUIZ_URL.$this->get_quiz_id(); - } - - /** - * Create an entire quiz json object with all question and mc option data - */ - public function get_quiz_json() { - $quiz = $this->get_take_quiz_array(); - return json_encode($quiz); - } - - public function get_take_quiz_array() { - $quiz = (array) $this; - unset($quiz['quiz_owner']); - unset($quiz['quiz_created_by']); - unset($quiz['quiz_updated_by']); - - return $quiz; - } - - /** - * If you ever need the entirely built quiz at once with all questions - * and all MC Option/Slider data - * @return array of quiz and questions - */ - public function get_quiz_with_full_questions_array() { - $quiz = $this->get_take_quiz_array(); - $question_ids = $this->get_questions(); - // create a blank question array - // remove what we don't need - unset($quiz['questions']); - $quiz['question'] = array(); - // loop questions - if(!empty($question_ids)) { - foreach($question_ids as $question_id) { - // get question object - $question = new Enp_quiz_Question($question_id); - $question_array = $question->get_take_question_array(); - // add this question to the array we'll send via json - $quiz['question'][] = $question_array; - } - } - return $quiz; - } - - - /** - * Get the value we should be saving on a quiz - * get posted if present, if not, get object. This is so we give them their - * current entry if we don't *actually* save yet. - * @param $string = what you want to get ('quiz_title', 'quiz_status', whatever) - * @return $value - */ - public function get_value($string) { - $value = ''; - if(isset($_POST['enp_quiz'])) { - $posted_value = $_POST['enp_quiz']; - if(!empty($posted_value[$string])) { - $value = stripslashes($posted_value[$string]); - } - - } - // if the value didn't get set, try with our object - if($value === '') { - $get_obj_value = 'get_'.$string; - $obj_value = $this->$get_obj_value(); - if($obj_value !== null) { - $value = $obj_value; - } - } - // send them back whatever the value should be - return $value; - } - - /** - * Encode and replace {{mustache}} template vars for share text - * - * @param $content (string) the content you want encoded - * @param $encoding (mixed - string or boolean). - * false = no encoding. rawurl = rawurlencode(). url = urlencode(). htmlspecialchars = htmlspecialchars(); - * @param $mustache (BOOLEAN) Should we search the string to replace {{mustache}} strings? - * @return STRING encoded and {{mustache}} replaced $content - */ - public function encode_content($content = '', $encoding = 'url', $mustache = false) { - if($encoding === 'url') { - $content = urlencode($content); - } elseif($encoding === 'rawurl') { - $content = rawurlencode($content); - } elseif($encoding === 'htmlspecialchars') { - $content = htmlspecialchars($content); - } - - if($mustache === true) { - // re-create mustache template variables that just got encoded - $content = $this->prepare_encoded_mustache_string($content); - } - - return $content; - } - - - /** - * If a string is URL encoded and you need to make it turn back into - * {{var}}. Right now it only replaces score_percentage, but we could upgrade * it to use regex or an array later (or the Mustache PHP implementation) - * - * @param $str (urlcoded string) - * @return $str with %7B%7Bscore_percentage%7D%7D turned into {{score_percentage}} - */ - public function prepare_encoded_mustache_string($str) { - $str = str_replace('%7B%7Bscore_percentage%7D%7D', '{{score_percentage}}', $str); - return $str; - } - - - /** - * For using PDO to select all a site's rows - * - * @param $site_id = embed_quiz_site that you want to get quizzes on that site - * @return rows from database table if found, false if not found - **/ - protected function select_embed_quizzes() { - $pdo = new enp_quiz_Db(); - // Do a select query to see if we get a returned row - $params = array( - ":quiz_id" => $this->get_quiz_id() - ); - - $sql = "SELECT * from ".$pdo->embed_quiz_table." WHERE - quiz_id = :quiz_id"; - $stmt = $pdo->query($sql, $params); - $embed_quiz_row = $stmt->fetchAll(PDO::FETCH_ASSOC); - // return the found site row - return $embed_quiz_row; - } - - - public function get_where_embedded() { - // get where it's been embedded - $embed_quiz_ids = $this->selected_embed_quizzes(); - // process the results - } - +/** + * Create a quiz object + * @param $quiz_id = the id of the quiz you want to get + * @return quiz object + */ +class Enp_quiz_Quiz +{ + public $quiz_id, + $quiz_title, + $quiz_title_test, + $quiz_status, + $quiz_finish_message, + $quiz_owner, + $quiz_created_by, + $quiz_created_at, + $quiz_updated_by, + $quiz_updated_at, + $questions, + $quiz_options, + $quiz_views, + $quiz_starts, + $quiz_finishes, + $quiz_score_average, + $quiz_time_spent, + $quiz_time_spent_average, + $quiz_is_deleted; + + protected static $quiz; + + public function __construct($quiz_id) + { + // returns false if no quiz found + $this->get_quiz_by_id($quiz_id); + } + + /** + * Build quiz object by id + * + * @param $quiz_id = quiz_id that you want to select + * @return quiz object, false if not found + **/ + public function get_quiz_by_id($quiz_id) + { + self::$quiz = $this->select_quiz_by_id($quiz_id); + if (self::$quiz !== false) { + self::$quiz = $this->set_quiz_object_values(); + } + return self::$quiz; + } + + /** + * For using PDO to select one quiz row + * + * @param $quiz_id = quiz_id that you want to select + * @return row from database table if found, false if not found + **/ + public function select_quiz_by_id($quiz_id) + { + $pdo = new enp_quiz_Db(); + // Do a select query to see if we get a returned row + $params = array( + ":quiz_id" => $quiz_id + ); + $sql = "SELECT * from " . $pdo->quiz_table . " WHERE + quiz_id = :quiz_id + AND quiz_is_deleted = 0"; + $stmt = $pdo->query($sql, $params); + $quiz_row = $stmt->fetch(); + // return the found quiz row + return $quiz_row; + } + + /** + * Hook up all the values for the object + * @param $quiz = row from the quiz_table + */ + protected function set_quiz_object_values() + { + $this->quiz_id = $this->set_quiz_id(); + $this->quiz_title = $this->set_quiz_title(); + $this->quiz_status = $this->set_quiz_status(); + $this->quiz_finish_message = $this->set_quiz_finish_message(); + $this->quiz_owner = $this->set_quiz_owner(); + $this->quiz_created_by = $this->set_quiz_created_by(); + $this->quiz_created_at = $this->set_quiz_created_at(); + $this->quiz_updated_by = $this->set_quiz_updated_by(); + $this->quiz_updated_at = $this->set_quiz_updated_at(); + $this->quiz_is_deleted = $this->set_quiz_is_deleted(); + $this->questions = $this->set_questions(); + $this->quiz_views = $this->set_quiz_views(); + $this->quiz_starts = $this->set_quiz_starts(); + $this->quiz_finishes = $this->set_quiz_finishes(); + $this->quiz_score_average = $this->set_quiz_score_average(); + $this->quiz_time_spent = $this->set_quiz_time_spent(); + $this->quiz_time_spent_average = $this->set_quiz_time_spent_average(); + + // set options + $this->set_quiz_options(); + } + + /** + * Queries the quiz options table and sets more quiz object values + * @param $quiz_id + */ + protected function set_quiz_options() + { + $option_rows = $this->select_quiz_options(); + foreach ($option_rows as $row => $option) { + // allow any option value to be set. We can whitelist it later if we'd like/if it's a security issue + // $whitelist = array(''); + // check if in_array($whitelist); + // ... + $option_value = $option['quiz_option_value']; + $option_name = $option['quiz_option_name']; + + $this->quiz_options[$option_name] = stripslashes($option_value); + } + } + + /** + * For using PDO to select one quiz row + * + * @param $quiz_id = quiz_id that you want to select + * @return row from database table if found, false if not found + **/ + protected function select_quiz_options() + { + $quiz_id = $this->quiz_id; + + $pdo = new enp_quiz_Db(); + // Do a select query to see if we get a returned row + $params = array( + ":quiz_id" => $quiz_id + ); + $sql = "SELECT * from " . $pdo->quiz_option_table . " WHERE + quiz_id = :quiz_id"; + $stmt = $pdo->query($sql, $params); + $option_rows = $stmt->fetchAll(PDO::FETCH_ASSOC); + return $option_rows; + } + + /** + * Set the quiz_id for our Quiz Object + * @param $quiz = quiz row from quiz database table + * @return quiz_id field from the database + */ + protected function set_quiz_id() + { + $quiz_id = self::$quiz['quiz_id']; + return $quiz_id; + } + + /** + * Set the quiz_title for our Quiz Object + * @param $quiz = quiz row from quiz database table + * @return quiz_title field from the database + */ + protected function set_quiz_title() + { + $quiz_title = stripslashes(self::$quiz['quiz_title']); + return $quiz_title; + } + + /** + * Set the quiz_title_test for our Quiz Object + * @param $quiz = quiz row from quiz database table + * @return quiz_title_test field from the database + */ + protected function set_quiz_title_test() + { + $quiz_title_test = stripslashes(self::$quiz['quiz_title_test']); + return $quiz_title_test; + } + + /** + * Set the quiz_status for our Quiz Object + * @param $quiz = quiz row from quiz database table + * @return 'published' or 'draft' + */ + protected function set_quiz_status() + { + $quiz_status = self::$quiz['quiz_status']; + if ($quiz_status !== 'published') { + $quiz_status = 'draft'; + } + return $quiz_status; + } + + /** + * Set the quiz_finish_message for our Quiz Object + * @param $quiz = quiz row from quiz database table + * @return quiz_finish_message field from the database + */ + protected function set_quiz_finish_message() + { + $quiz_finish_message = stripslashes(self::$quiz['quiz_finish_message']); + return $quiz_finish_message; + } + + /** + * Set the quiz_owner for our Quiz Object + * @param $quiz = quiz row from quiz database table + * @return quiz_owner field from the database + */ + protected function set_quiz_owner() + { + $quiz_owner = self::$quiz['quiz_owner']; + return $quiz_owner; + } + + /** + * Set the created_by for our Quiz Object + * @param $quiz = quiz row from quiz database table + * @return created_by field from the database + */ + protected function set_quiz_created_by() + { + $created_by = self::$quiz['quiz_created_by']; + return $created_by; + } + + /** + * Set the created_at for our Quiz Object + * @param $quiz = quiz row from quiz database table + * @return created_at field from the database + */ + protected function set_quiz_created_at() + { + $created_at = self::$quiz['quiz_created_at']; + return $created_at; + } + + /** + * Set the updated_by for our Quiz Object + * @param $quiz = quiz row from quiz database table + * @return updated_by field from the database + */ + protected function set_quiz_updated_by() + { + $updated_by = self::$quiz['quiz_updated_by']; + return $updated_by; + } + + /** + * Set the updated_at for our Quiz Object + * @param $quiz = quiz row from quiz database table + * @return updated_at field from the database + */ + protected function set_quiz_updated_at() + { + $updated_at = self::$quiz['quiz_updated_at']; + return $updated_at; + } + + /** + * Set the is_deleted for our Quiz Object + * @param $quiz = quiz row from quiz database table + * @return is_deleted field from the database + */ + protected function set_quiz_is_deleted() + { + $is_deleted = self::$quiz['quiz_is_deleted']; + return $is_deleted; + } + + /** + * Set the questions for our Quiz Object + * @param $quiz_id + * @return questions array of ids array(3,4,5) from the database + */ + protected function set_questions() + { + $quiz_id = self::$quiz['quiz_id']; + + $pdo = new enp_quiz_Db(); + // Do a select query to see if we get a returned row + $params = array( + ":quiz_id" => $quiz_id + ); + $sql = "SELECT question_id from " . $pdo->question_table . " WHERE + quiz_id = :quiz_id + AND question_is_deleted = 0 + ORDER BY question_order ASC"; + $stmt = $pdo->query($sql, $params); + $question_rows = $stmt->fetchAll(PDO::FETCH_ASSOC); + + $questions = array(); + foreach ($question_rows as $row => $question) { + $questions[] = (int) $question['question_id']; + } + return $questions; + } + + /** + * Set the views for our Quiz Object + * @param $quiz = quiz row from quiz database table + * @return views field from the database + */ + protected function set_quiz_views() + { + $views = self::$quiz['quiz_views']; + return $views; + } + + /** + * Set the starts for our Quiz Object + * @param $quiz = quiz row from quiz database table + * @return starts field from the database + */ + protected function set_quiz_starts() + { + $starts = self::$quiz['quiz_starts']; + return $starts; + } + + /** + * Set the finishes for our Quiz Object + * @param $quiz = quiz row from quiz database table + * @return finishes field from the database + */ + protected function set_quiz_finishes() + { + $finishes = self::$quiz['quiz_finishes']; + return $finishes; + } + + /** + * Set the score_average for our Quiz Object + * @param $quiz = quiz row from quiz database table + * @return score_average field from the database + */ + protected function set_quiz_score_average() + { + $score_average = self::$quiz['quiz_score_average']; + return $score_average; + } + + /** + * Set the time_spent for our Quiz Object + * @param $quiz = quiz row from quiz database table + * @return time_spent field from the database + */ + protected function set_quiz_time_spent() + { + $time_spent = self::$quiz['quiz_time_spent']; + return $time_spent; + } + + /** + * Set the time_spent_average for our Quiz Object + * @param $quiz = quiz row from quiz database table + * @return time_spent_average field from the database + */ + protected function set_quiz_time_spent_average() + { + $time_spent_average = self::$quiz['quiz_time_spent_average']; + return $time_spent_average; + } + + /** + * Get the quiz_id for our Quiz Object + * @param $quiz = quiz object + * @return quiz_id from the object + */ + public function get_quiz_id() + { + $quiz_id = $this->quiz_id; + return $quiz_id; + } + + /** + * Get the quiz_title for our Quiz Object + * @param $quiz = quiz object + * @return quiz_title from the object + */ + public function get_quiz_title() + { + $quiz_title = $this->quiz_title; + return $quiz_title; + } + + /** + * Get the quiz_title_test for our Quiz Object + * @param $quiz = quiz object + * @return quiz_title_test from the object + */ + public function get_quiz_title_test() + { + $quiz_title_test = $this->quiz_title_test; + return $quiz_title_test; + } + + /** + * Get the quiz_status for our Quiz Object + * @param $quiz = quiz object + * @return 'published' or 'draft' + */ + public function get_quiz_status() + { + $quiz_status = $this->quiz_status; + return $quiz_status; + } + + /** + * Get the quiz_finish_message for our Quiz Object + * @param $quiz = quiz object + * @return quiz_finish_message from the quiz object + */ + public function get_quiz_finish_message() + { + $quiz_finish_message = $this->quiz_finish_message; + return $quiz_finish_message; + } + + /** + * Get the quiz_owner for our Quiz Object + * @param $quiz = quiz object + * @return user_id + */ + public function get_quiz_owner() + { + $quiz_owner = $this->quiz_owner; + return $quiz_owner; + } + + /** + * Get the quiz_created_by for our Quiz Object + * @param $quiz = quiz object + * @return user_id + */ + public function get_quiz_created_by() + { + $quiz_created_by = $this->quiz_created_by; + return $quiz_created_by; + } + + /** + * Get the quiz_created_at for our Quiz Object + * @param $quiz = quiz object + * @return Date formatted Y-m-d H:i:s + */ + public function get_quiz_created_at() + { + $quiz_created_at = $this->quiz_created_at; + return $quiz_created_at; + } + + /** + * Get the quiz_updated_by for our Quiz Object + * @param $quiz = quiz object + * @return user_id + */ + public function get_quiz_updated_by() + { + $quiz_updated_by = $this->quiz_updated_by; + return $quiz_updated_by; + } + + /** + * Get the quiz_updated_at for our Quiz Object + * @param $quiz = quiz object + * @return Date formatted Y-m-d H:i:s + */ + public function get_quiz_updated_at() + { + $quiz_updated_at = $this->quiz_updated_at; + return $quiz_updated_at; + } + + /** + * Get the quiz_is_deleted for our Quiz Object + * @param $quiz = quiz object + * @return Date formatted Y-m-d H:i:s + */ + public function get_quiz_is_deleted() + { + $quiz_is_deleted = $this->quiz_is_deleted; + return $quiz_is_deleted; + } + + /** + * Get a quiz option from our Quiz Object + * @param $key (string) key from the $this->quiz_option array + * @return (Mixed) $value of the item in the array if found, null if not found + */ + public function get_quiz_option($key) + { + $value = null; + if (is_array($this->quiz_options) && array_key_exists($key, $this->quiz_options)) { + $value = $this->quiz_options[$key]; + } + return $value; + } + + /** + * Get the quiz_title_display for our Quiz Object + * @param $quiz = quiz object + * @return (string) 'show' or 'hide' + */ + public function get_quiz_title_display() + { + return $this->get_quiz_option('quiz_title_display'); + } + + + /** + * Get the quiz_width for our Quiz Object + * @param $quiz = quiz object + * @return (string) %, px, em, or rem value (100%, 800px, 20rem, etc) + */ + public function get_quiz_width() + { + return $this->get_quiz_option('quiz_width'); + } + + /** + * Get the quiz_bg_color for our Quiz Object + * @param $quiz = quiz object + * @return #hex code + */ + public function get_quiz_bg_color() + { + return $this->get_quiz_option('quiz_bg_color'); + } + + /** + * Get the quiz_text_color for our Quiz Object + * @param $quiz = quiz object + * @return #hex code + */ + public function get_quiz_text_color() + { + return $this->get_quiz_option('quiz_text_color'); + } + + /** + * Get the quiz_border_color for our Quiz Object + * @param $quiz = quiz object + * @return #hex code + */ + public function get_quiz_border_color() + { + return $this->get_quiz_option('quiz_border_color'); + } + + /** + * Get the quiz_button_color for our Quiz Object + * @param $quiz = quiz object + * @return #hex code + */ + public function get_quiz_button_color() + { + return $this->get_quiz_option('quiz_button_color'); + } + + /** + * Get the quiz_correct_color for our Quiz Object + * @param $quiz = quiz object + * @return #hex code + */ + public function get_quiz_correct_color() + { + return $this->get_quiz_option('quiz_correct_color'); + } + + /** + * Get the quiz_incorrect_color for our Quiz Object + * @param $quiz = quiz object + * @return #hex code + */ + public function get_quiz_incorrect_color() + { + return $this->get_quiz_option('quiz_incorrect_color'); + } + + /** + * Get the quiz_custom_css for our Quiz Object + * @param $quiz = quiz object + * @return saved css + */ + public function get_quiz_custom_css() + { + return $this->get_quiz_option('quiz_custom_css'); + } + + /** + * Get the quiz_custom_css_minified for our Quiz Object + * @param $quiz = quiz object + * @return saved css + */ + public function get_quiz_custom_css_minified() + { + return $this->get_quiz_option('quiz_custom_css_minified'); + } + + /** + * Get the quiz_custom_css_minified for our Quiz Object + * @param $quiz = quiz object + * @return saved css + */ + public function get_quiz_mc_options_order() + { + return $this->get_quiz_option('quiz_mc_options_order'); + } + + /** + * Get the facebook_title_start for our Quiz Object + * @param $quiz = quiz object + * @return string + */ + public function get_facebook_title() + { + return $this->get_quiz_option('facebook_title'); + } + + /** + * Get the facebook_description_start for our Quiz Object + * @param $quiz = quiz object + * @return string + */ + public function get_facebook_description() + { + return $this->get_quiz_option('facebook_description'); + } + + /** + * Get the facebook_quote_end for our Quiz Object + * @param $quiz = quiz object + * @return string + */ + public function get_facebook_quote_end() + { + return $this->get_quiz_option('facebook_quote_end'); + } + + + /** + * Get the email_subject_start for our Quiz Object + * @param $quiz = quiz object + * @return string + */ + public function get_email_subject() + { + return $this->get_quiz_option('email_subject'); + } + + /** + * Get the facebook_description_start for our Quiz Object + * @param $quiz = quiz object + * @return string + */ + public function get_email_body_start() + { + return $this->get_quiz_option('email_body_start'); + } + + /** + * Get the email_body_end for our Quiz Object + * @param $quiz = quiz object + * @return string + */ + public function get_email_body_end() + { + return $this->get_quiz_option('email_body_end'); + } + + /** + * Get the tweet_end for our Quiz Object + * @param $quiz = quiz object + * @return string + */ + public function get_tweet_end() + { + $tweet = $this->get_quiz_option('tweet_end'); + return $tweet; + } + + /** + * Utility function for encoding content + * @param $key (string) of Object var ('tweet_end', 'email_body_start', etc) + * @param $encoding (string) 'rawurl','url','htmlspecialchars' + * @param $mustache BOOLEAN keep mustache variables decoded + * @return encoded string + */ + public function get_encoded($key, $encoding = 'url', $mustache = false) + { + $getter = 'get_' . $key; + $value = $this->$getter(); + $value = $this->encode_content($value, $encoding, $mustache); + return $value; + } + /** + * Get the questions for our Quiz Object + * @param $quiz = quiz object + * @return array of question_id's as integers + */ + public function get_questions() + { + $questions = $this->questions; + return $questions; + } + + + /** + * Get the quiz views for our Quiz Object + * @param $quiz = quiz object + * @return Date formatted Y-m-d H:i:s + */ + public function get_quiz_views() + { + $quiz_views = $this->quiz_views; + return $quiz_views; + } + + /** + * Get the quiz starts for our Quiz Object + * @param $quiz = quiz object + * @return Date formatted Y-m-d H:i:s + */ + public function get_quiz_starts() + { + $quiz_starts = $this->quiz_starts; + return $quiz_starts; + } + + /** + * Get the quiz finishes for our Quiz Object + * @param $quiz = quiz object + * @return Date formatted Y-m-d H:i:s + */ + public function get_quiz_finishes() + { + $quiz_finishes = $this->quiz_finishes; + return $quiz_finishes; + } + + /** + * Get the quiz score_average for our Quiz Object + * @param $quiz = quiz object + * @return Date formatted Y-m-d H:i:s + */ + public function get_quiz_score_average() + { + $quiz_score_average = $this->quiz_score_average; + return $quiz_score_average; + } + + /** + * Utility function to return count of all questions + * @return (int) number of questions in the quiz + */ + public function get_total_question_count() + { + $questions = $this->get_questions(); + return count($questions); + } + + + /** + * Get the quiz time_spent for our Quiz Object + * @param $quiz = quiz object + * @return Date formatted Y-m-d H:i:s + */ + public function get_quiz_time_spent() + { + $quiz_time_spent = $this->quiz_time_spent; + return $quiz_time_spent; + } + + /** + * Get the quiz time_spent_average for our Quiz Object + * @param $quiz = quiz object + * @return Date formatted Y-m-d H:i:s + */ + public function get_quiz_time_spent_average() + { + $quiz_time_spent_average = $this->quiz_time_spent_average; + return $quiz_time_spent_average; + } + + /** + * Get the individual score data on each take of this quiz + * @param $quiz = quiz object + * @return array of all the scores + */ + public function get_quiz_scores() + { + $pdo = new enp_quiz_Db(); + // Do a select query to see if we get a returned row + $params = array( + ":quiz_id" => $this->get_quiz_id() + ); + $sql = "SELECT quiz_score from " . $pdo->response_quiz_table . " + WHERE quiz_completed = 1 + AND quiz_id = :quiz_id + AND response_quiz_is_deleted = 0 + ORDER BY quiz_score ASC"; + $stmt = $pdo->query($sql, $params); + $scores = $stmt->fetchAll(PDO::FETCH_ASSOC); + + $quiz_scores = array(); + foreach ($scores as $score) { + $quiz_scores[] = (int) round($score['quiz_score'] * 100); + } + + // return the found quiz row + return $quiz_scores; + } + + /** + * Outputs an array that returns the count of each possible score + * @return array($score => $how_many_people_got_this_score, 100'=>'12', '50'=>12, '0'=>4); + */ + public function get_quiz_scores_group_count() + { + $all_quiz_scores = $this->get_quiz_scores(); + $all_quiz_scores = array_count_values($all_quiz_scores); + // merge the array with a default of possible scores array + // so we have all values, even if they don't have a set score yet + $default_scores = array(); + $total_questions = $this->get_total_question_count(); + // return 0 if there are no questions + if ($total_questions === 0) { + return $all_quiz_scores; + } + + $i = 0; + while ($i <= $total_questions) { + $key = (int) round($i / $total_questions * 100); + $default_scores[$key] = 0; + $i++; + } + + + // merge the arrays while preserving keys + $all_quiz_scores = $all_quiz_scores + $default_scores; + // sort by key, low to high + ksort($all_quiz_scores); + + return $all_quiz_scores; + } + + /** + * Useful for line charts and tables of quiz score data + * @return array('quiz_scores'=>array(scores grouped by integer), 'quiz_scores_labels'=>array(score labels)) + */ + public function get_quiz_score_chart_data() + { + $all_quiz_scores = $this->get_quiz_scores_group_count(); + $quiz_scores_labels = array(); + $quiz_scores = array(); + foreach ($all_quiz_scores as $key => $val) { + $quiz_scores_labels[] = $key . '%'; + $quiz_scores[] = $val; + } + + $quiz_results = array( + 'quiz_scores' => $quiz_scores, + 'quiz_scores_labels' => $quiz_scores_labels, + ); + + return $quiz_results; + } + + /** + * Get the Quiz Take URL + */ + public function get_quiz_url() + { + return ENP_QUIZ_URL . $this->get_quiz_id(); + } + + /** + * Create an entire quiz json object with all question and mc option data + */ + public function get_quiz_json() + { + $quiz = $this->get_take_quiz_array(); + return json_encode($quiz); + } + + public function get_take_quiz_array() + { + $quiz = (array) $this; + unset($quiz['quiz_owner']); + unset($quiz['quiz_created_by']); + unset($quiz['quiz_updated_by']); + + return $quiz; + } + + /** + * If you ever need the entirely built quiz at once with all questions + * and all MC Option/Slider data + * @return array of quiz and questions + */ + public function get_quiz_with_full_questions_array() + { + $quiz = $this->get_take_quiz_array(); + $question_ids = $this->get_questions(); + // create a blank question array + // remove what we don't need + unset($quiz['questions']); + $quiz['question'] = array(); + // loop questions + if (!empty($question_ids)) { + foreach ($question_ids as $question_id) { + // get question object + $question = new Enp_quiz_Question($question_id); + $question_array = $question->get_take_question_array(); + // add this question to the array we'll send via json + $quiz['question'][] = $question_array; + } + } + return $quiz; + } + + + /** + * Get the value we should be saving on a quiz + * get posted if present, if not, get object. This is so we give them their + * current entry if we don't *actually* save yet. + * @param $string = what you want to get ('quiz_title', 'quiz_status', whatever) + * @return $value + */ + public function get_value($string) + { + $value = ''; + if (isset($_POST['enp_quiz'])) { + $posted_value = $_POST['enp_quiz']; + if (!empty($posted_value[$string])) { + $value = stripslashes($posted_value[$string]); + } + } + // if the value didn't get set, try with our object + if ($value === '') { + $get_obj_value = 'get_' . $string; + $obj_value = $this->$get_obj_value(); + if ($obj_value !== null) { + $value = $obj_value; + } + } + // send them back whatever the value should be + return $value; + } + + /** + * Encode and replace {{mustache}} template vars for share text + * + * @param $content (string) the content you want encoded + * @param $encoding (mixed - string or boolean). + * false = no encoding. rawurl = rawurlencode(). url = urlencode(). htmlspecialchars = htmlspecialchars(); + * @param $mustache (BOOLEAN) Should we search the string to replace {{mustache}} strings? + * @return STRING encoded and {{mustache}} replaced $content + */ + public function encode_content($content = '', $encoding = 'url', $mustache = false) + { + if ($encoding === 'url') { + $content = urlencode($content); + } elseif ($encoding === 'rawurl') { + $content = rawurlencode($content); + } elseif ($encoding === 'htmlspecialchars') { + $content = htmlspecialchars($content); + } + + if ($mustache === true) { + // re-create mustache template variables that just got encoded + $content = $this->prepare_encoded_mustache_string($content); + } + + return $content; + } + + + /** + * If a string is URL encoded and you need to make it turn back into + * {{var}}. Right now it only replaces score_percentage, but we could upgrade * it to use regex or an array later (or the Mustache PHP implementation) + * + * @param $str (urlcoded string) + * @return $str with %7B%7Bscore_percentage%7D%7D turned into {{score_percentage}} + */ + public function prepare_encoded_mustache_string($str) + { + $str = str_replace('%7B%7Bscore_percentage%7D%7D', '{{score_percentage}}', $str); + return $str; + } + + + /** + * For using PDO to select all a site's rows + * + * @param $site_id = embed_quiz_site that you want to get quizzes on that site + * @return rows from database table if found, false if not found + **/ + protected function select_embed_quizzes() + { + $pdo = new enp_quiz_Db(); + // Do a select query to see if we get a returned row + $params = array( + ":quiz_id" => $this->get_quiz_id() + ); + + $sql = "SELECT * from " . $pdo->embed_quiz_table . " WHERE + quiz_id = :quiz_id"; + $stmt = $pdo->query($sql, $params); + $embed_quiz_row = $stmt->fetchAll(PDO::FETCH_ASSOC); + // return the found site row + return $embed_quiz_row; + } + + + public function get_where_embedded() + { + // get where it's been embedded + $embed_quiz_ids = $this->selected_embed_quizzes(); + // process the results + } } diff --git a/public/quiz-create/css/enp_quiz-create.min.css b/public/quiz-create/css/enp_quiz-create.min.css index a0533843..2e14987b 100644 --- a/public/quiz-create/css/enp_quiz-create.min.css +++ b/public/quiz-create/css/enp_quiz-create.min.css @@ -1,2 +1,2 @@ -html{font-size:16px!important}html #enp-quiz{box-sizing:border-box}body #enp-quiz{background:#fff;overflow:hidden}#enp-quiz *,#enp-quiz :after,#enp-quiz :before{box-sizing:inherit}#enp-quiz ol,#enp-quiz ul{margin:0 0 1.6rem 1.25rem;padding:0}#enp-quiz textarea{margin-bottom:1rem}#enp-quiz button,#enp-quiz button:active,#enp-quiz button:focus,#enp-quiz button:hover,#enp-quiz iframe,#enp-quiz input[type=button],#enp-quiz input[type=button]:active,#enp-quiz input[type=button]:focus,#enp-quiz input[type=button]:hover,#enp-quiz input[type=reset],#enp-quiz input[type=reset]:active,#enp-quiz input[type=reset]:focus,#enp-quiz input[type=reset]:hover,#enp-quiz input[type=submit],#enp-quiz input[type=submit]:active,#enp-quiz input[type=submit]:focus,#enp-quiz input[type=submit]:hover{border:none}#enp-quiz .enp-screen-reader-text{clip:rect(1px,1px,1px,1px);position:absolute!important;left:-10000px;top:auto;width:1px;height:1px;overflow:hidden}#enp-quiz .enp-screen-reader-text:active,#enp-quiz .enp-screen-reader-text:focus,#enp-quiz .enp-screen-reader-text:hover{background-color:#f1f1f1;border-radius:3px;box-shadow:0 0 2px 2px rgba(0,0,0,.6);clip:auto!important;color:#21759b;display:block;font-size:14px;font-weight:700;height:auto;left:5px;line-height:normal;padding:15px 23px 14px;text-decoration:none;top:5px;width:auto;z-index:100000}#enp-quiz .enp-accordion-header{background:#fff;width:100%;box-shadow:inset 1px 1px 0 #ccc,inset -1px -1px 0 #ccc;color:#1d1c25;font-family:Arial,monospace,helvetica,arial,sans-serif;font-size:.9rem;font-weight:400;line-height:1.5;text-transform:none;letter-spacing:0;text-align:left;border:none;border-radius:3px;min-height:3.065rem;padding:1rem 2rem 1rem 1rem;margin:1.6rem 0 0;position:relative;z-index:9;cursor:pointer;transition:all .2s cubic-bezier(0,0,.3,1)}#enp-quiz .enp-accordion-header:first-of-type{margin-top:0}#enp-quiz .enp-accordion-header .enp-accordion-header__icon{position:absolute;fill:#e8e4ed;right:.75rem;bottom:.75rem;transition:all .35s cubic-bezier(0,0,.3,1)}#enp-quiz .enp-accordion-header--open .enp-accordion-header__icon{transform:rotateX(180deg) translateY(2px)}#enp-quiz .enp-accordion-content{background:#fff;width:100%;box-shadow:inset 1px -1px 0 #ccc,inset -1px -1px 0 #ccc;display:block;position:relative;height:auto;overflow:visible;margin-bottom:1.6rem}#enp-quiz .enp-accordion-content--closed{margin-top:0;padding-top:0;animation:d .25s cubic-bezier(0,0,.3,1) forwards;display:none}#enp-quiz .enp-accordion-content--open{padding-top:1.6rem;margin-bottom:2rem;animation:b .45s cubic-bezier(0,0,.3,1) forwards}#enp-quiz .enp-quiz-message{max-width:740px;margin:0 auto;background:#fff;border:1px solid #eee;border-bottom:1px solid #ccc;padding:1rem;margin-bottom:1.6rem;position:fixed;bottom:0;left:0}#enp-quiz .enp-quiz-message:after{content:"";display:table;clear:both}#enp-quiz .enp-quiz-message__title{font-size:1rem;text-transform:uppercase}#enp-quiz .enp-message__list{list-style:none;margin-left:0;font-size:1.1rem;margin-bottom:0}#enp-quiz .enp-quiz-message--error{border-left:6px solid #bf5700;color:#bf5700}#enp-quiz .enp-quiz-message__title--error{color:#964400}#enp-quiz .enp-quiz-message--success{border-left:6px solid #60aaad;color:#4e9497}#enp-quiz .enp-quiz-message__title--success{color:#4e9497}#enp-quiz .enp-quiz-message--note{border-left:6px solid #cca562}#enp-quiz .enp-quiz-message__title--note{color:#333f48}#enp-quiz .enp-quiz-message__close{border:none;background:none;box-shadow:none;padding:0;margin:0;position:absolute;top:5px;right:5px}#enp-quiz .enp-quiz-message--ajax{margin-bottom:.6rem;animation:a .3s}#enp-quiz .enp-quiz-message-ajax-container{z-index:9999;position:fixed;bottom:10px}#enp-quiz .enp-quiz-message--saving__spinner{margin-left:-10px}#enp-quiz .enp-quiz-message--saving__text{font-size:1rem}#enp-quiz input.limited-chars,#enp-quiz textarea.limited-chars{margin-bottom:.2rem}#enp-quiz .limited-chars__container{color:#fdfcfd;font-size:.8rem;display:block;text-align:right;margin-bottom:1.2rem}#enp-quiz .limited-chars__counter{color:#e8e4ed}#enp-quiz .limited-chars__container--error,#enp-quiz .limited-chars__container--error .limited-chars__counter{color:#964400}#enp-quiz input.has-error,#enp-quiz textarea.has-error{border:1px solid #bf5700}#enp-quiz input.has-error:focus,#enp-quiz textarea.has-error:focus{outline-color:#bf5700}#enp-quiz .enp-tooltip{position:relative}#enp-quiz .enp-tooltip__activator:focus+.enp-tooltip__description,#enp-quiz .enp-tooltip__activator:focus>.enp-tooltip__description{display:block}#enp-quiz .enp-tooltip__description{display:none;position:absolute;left:103%;margin-bottom:2rem;border-radius:3px;background:#faf9fb;font-size:.9rem;padding:.9rem;max-width:200px}.enp-sticky{position:relative;left:0;right:0;top:0;z-index:999}.enp-sticky.enp-sticky--fixed{position:fixed}.enp-breadcrumb-link{font-size:.85rem}.enp-breadcrumb-link__icon{position:relative;top:.45rem;left:.4rem}body #enp-quiz{color:#1d1c25;font-family:Arial,monospace,helvetica,arial,sans-serif;font-size:1em;line-height:1.6;font-weight:400}@media (min-width:700px){body #enp-quiz{font-size:1.3em}}#enp-quiz h1,#enp-quiz h2,#enp-quiz h3,#enp-quiz h4,#enp-quiz h5,#enp-quiz h6{font-family:Arial,monospace,helvetica,arial,sans-serif;color:#5d5e5f;clear:both;margin:0 0 .2rem;font-weight:700;line-height:1.2em}#enp-quiz h1{font-size:2em}#enp-quiz h2{font-size:1.75em}#enp-quiz h3{font-size:1.475em}#enp-quiz h4{font-size:1.3em}#enp-quiz h5{font-size:1.125em}#enp-quiz h6{font-size:1em}#enp-quiz p+h1,#enp-quiz p+h2,#enp-quiz p+h3,#enp-quiz p+h4,#enp-quiz p+h5,#enp-quiz p+h6,#enp-quiz ul+h1,#enp-quiz ul+h2,#enp-quiz ul+h3,#enp-quiz ul+h4,#enp-quiz ul+h5,#enp-quiz ul+h6{margin-top:1.8em}#enp-quiz p{font-size:.85em;margin-bottom:1.125em;font-weight:300}#enp-quiz ol,#enp-quiz ul{margin:0 0 1.6em 1.25em}#enp-quiz ul{list-style:disc}#enp-quiz ol{list-style:decimal}#enp-quiz li>ol,#enp-quiz li>ul{margin-bottom:0;margin-left:1.6em}#enp-quiz b,#enp-quiz strong{font-weight:700}#enp-quiz cite,#enp-quiz dfn,#enp-quiz em{font-family:georgia,times,serif;font-style:italic}#enp-quiz pre{background:#eee;font-family:Courier\ 10 Pitch,Courier,monospace;font-size:.95em;line-height:1.6;margin-bottom:1.6em;padding:1.6em;overflow:auto;max-width:100%}#enp-quiz .code,#enp-quiz code,#enp-quiz kbd,#enp-quiz tt,#enp-quiz var{font:.7em Monaco,Consolas,Andale Mono,DejaVu Sans Mono,monospace}#enp-quiz table{border:none}#enp-quiz table th{font-size:.8rem;text-transform:uppercase;border:none;border-bottom:1px solid #ddd}#enp-quiz table td,#enp-quiz table th{font-family:Arial,monospace,helvetica,arial,sans-serif}#enp-quiz table td{font-size:1rem;border:none;border-bottom:1px solid #eee}#enp-quiz table tr:nth-child(2n) td{background:#fdfcfd}#enp-quiz table tr:last-child td{border-bottom:none}#enp-quiz figure{margin:0}#enp-quiz img{height:auto;max-width:100%}#enp-quiz a{color:#bf5700;text-decoration:none;transition:color .2s;touch-action:manipulation}#enp-quiz a .enp-icon{fill:#bf5700}#enp-quiz a:active,#enp-quiz a:focus,#enp-quiz a:hover{color:#964400}#enp-quiz a:active .enp-icon,#enp-quiz a:focus .enp-icon,#enp-quiz a:hover .enp-icon{fill:#964400}#enp-quiz button:focus{outline-color:#4d90fe;outline-offset:-2px;outline-style:auto;outline-width:5px}#enp-quiz .enp-btn{text-align:center;border:none;border-radius:3px;padding:.85em 1.4em .75em;font-size:15px;font-weight:400;letter-spacing:.05em;color:#fff;box-shadow:inset 0 -2px 0 rgba(0,0,0,.2);background:#bf5700;cursor:pointer;text-transform:uppercase;transition:all .2s;line-height:1.6}#enp-quiz .enp-btn:focus,#enp-quiz .enp-btn:hover{color:#fff;box-shadow:none;background:#964400}#enp-quiz .enp-btn:active{color:#fff;box-shadow:inset 0 2px 0 rgba(0,0,0,.1);background:#1eeeff}#enp-quiz .enp-btn:focus{outline-color:#4d90fe;outline-offset:-2px;outline-style:auto;outline-width:5px}#enp-quiz .enp-btn:disabled,#enp-quiz .enp-btn:disabled:focus,#enp-quiz .enp-btn:disabled:hover{background:#bf5700;cursor:default;opacity:.5}#enp-quiz .enp-btn--add{text-align:center;border:none;border-radius:3px;padding:.85em 1.4em .75em;font-size:15px;font-weight:400;letter-spacing:.05em;color:#fff;box-shadow:inset 0 -2px 0 rgba(0,0,0,.2);background:#bf5700;cursor:pointer;text-transform:uppercase;transition:all .2s;line-height:1.6;border:1px dashed #b5a6c4;background:none;color:#545454;box-shadow:none;width:100%}#enp-quiz .enp-btn--add:focus,#enp-quiz .enp-btn--add:hover{color:#fff;box-shadow:none;background:#964400}#enp-quiz .enp-btn--add:active{color:#fff;box-shadow:inset 0 2px 0 rgba(0,0,0,.1);background:#1eeeff}#enp-quiz .enp-btn--add:focus{outline-color:#4d90fe;outline-offset:-2px;outline-style:auto;outline-width:5px}#enp-quiz .enp-btn--add:disabled,#enp-quiz .enp-btn--add:disabled:focus,#enp-quiz .enp-btn--add:disabled:hover{background:#bf5700;cursor:default;opacity:.5}#enp-quiz .enp-btn--add:focus,#enp-quiz .enp-btn--add:hover{border:1px dashed #69547e;color:#b5a6c4;background:hsla(0,0%,100%,.9)}#enp-quiz .enp-btn--disabled{opacity:.65;cursor:default}#enp-quiz .enp-btn--enabled{animation:f .6s}#enp-quiz .enp-icon{width:24px;height:24px;transition:all .2s}#enp-quiz .enp-page-title{font-size:1.6rem}@keyframes a{0%{opacity:0;transform:translate3d(0,100px,0)}to{opacity:1;transform:translateZ(0)}}@keyframes b{0%{opacity:0;height:auto;transform:translate3d(0,-20px,0)}to{opacity:1;height:auto;transform:translateZ(0)}}@keyframes c{0%{opacity:0;height:auto;transform:translate3d(0,-20px,0)}to{opacity:.8;height:auto;transform:translateZ(0)}}@keyframes d{0%{overflow:hidden;height:100px;opacity:1;transform:translateZ(0)}to{height:0;opacity:0;transform:translate3d(0,-20px,0)}}@keyframes e{0%{opacity:1;transform:translateZ(0)}to{padding:0;margin:0;opacity:0;height:0;z-index:-1;transform:translate3d(-200px,0,0)}}@keyframes f{0%{opacity:.8;transform:scaleX(1);box-shadow:0 0 0 rgba(0,0,0,.3)}40%{opacity:1}70%{opacity:1;transform:scale3d(1.1,1.1,1);box-shadow:0 0 8px rgba(0,0,0,.4)}to{opacity:1;transform:scaleX(1);box-shadow:0 0 0 rgba(0,0,0,.3),inset 0 2px 0 rgba(0,0,0,.2)}}@keyframes g{0%{opacity:0}to{opacity:1}}@keyframes h{0%{transform:translate3d(0,-200px,0)}to{transform:translateZ(0)}}.spinner{margin:0 auto;width:70px;text-align:center}.spinner>div{width:18px;height:18px;background-color:#333;border-radius:100%;display:inline-block;animation:i 1.4s infinite ease-in-out both}.spinner .bounce1{animation-delay:-.32s}.spinner .bounce2{animation-delay:-.16s}@keyframes i{0%,80%,to{transform:scale(0)}40%{transform:scale(1)}}#enp-quiz{transition:background .25s cubic-bezier(0,0,.3,1)}#enp-quiz .enp-aside{padding:1.6rem;margin-bottom:1.6rem;background:#fff;border-radius:3px;border:1px solid #eee;border-bottom-color:#ccc;max-width:740px;margin:0 auto;font-size:1.2rem}@media (min-width:700px){#enp-quiz .enp-aside{margin-bottom:2.6rem;padding:1.6rem 2rem}}#enp-quiz .enp-aside:after{content:"";display:table;clear:both}#enp-quiz .enp-aside__title{font-size:1rem;text-transform:uppercase;font-weight:600}#enp-quiz .enp-page-title{border-bottom:2px solid #00a9b7}#enp-quiz fieldset{border:none;margin:0;padding:0}#enp-quiz .enp-label,#enp-quiz .enp-legend{display:block;color:#343242;font-weight:400;font-size:.85rem;text-transform:uppercase}#enp-quiz .enp-legend{padding-top:1.6rem;margin-bottom:.2rem;border:none}#enp-quiz .enp-input{font-size:1rem;font-family:Arial,monospace,helvetica,arial,sans-serif;padding:.8rem .5rem;background:#fff;border:1px solid #aaa;border-radius:3px;width:20rem;max-width:100%;margin-bottom:1.2rem}@media (min-width:700px){#enp-quiz .enp-input{padding:.8rem;width:100%}}#enp-quiz .enp-input.enp-input--has-description{margin-bottom:.2rem}#enp-quiz .enp-input-description,#enp-quiz .enp-textarea-description{margin-bottom:1rem;font-size:.85rem}#enp-quiz .enp-input-description--before,#enp-quiz .enp-textarea-description--before{margin-bottom:0}#enp-quiz .enp-input::-webkit-input-placeholder,#enp-quiz .enp-textarea::-webkit-input-placeholder{font-family:Arial,monospace,helvetica,arial,sans-serif;font-weight:300;color:#7a7697}#enp-quiz .enp-input:-ms-input-placeholder,#enp-quiz .enp-input::-ms-input-placeholder,#enp-quiz .enp-textarea:-ms-input-placeholder,#enp-quiz .enp-textarea::-ms-input-placeholder{font-family:Arial,monospace,helvetica,arial,sans-serif;font-weight:300;color:#7a7697}#enp-quiz .enp-input::placeholder,#enp-quiz .enp-textarea::placeholder{font-family:Arial,monospace,helvetica,arial,sans-serif;font-weight:300;color:#7a7697}#enp-quiz .enp-textarea{font-size:1rem;font-family:Arial,monospace,helvetica,arial,sans-serif;padding:.8rem .5rem;background:#fff;border:1px solid #aaa;border-radius:3px;width:20rem;max-width:100%;margin-bottom:1.2rem;line-height:1.5}@media (min-width:700px){#enp-quiz .enp-textarea{padding:.8rem;width:100%}}#enp-quiz .enp-textarea:focus{outline-color:#4d90fe;outline-offset:-2px;outline-style:auto;outline-width:5px}#enp-quiz .enp-textarea.enp-textarea--has-description{margin-bottom:.2rem}#enp-quiz .enp-textarea.enp-textarea--has-description--before{margin-bottom:1.2rem}#enp-quiz .enp-embed-code{font-size:1rem;font-family:Arial,monospace,helvetica,arial,sans-serif;padding:.8rem .5rem;background:#fff;border:1px solid #aaa;border-radius:3px;width:20rem;max-width:100%;margin-bottom:1.2rem;line-height:1.5;padding:1.6rem;font-size:.7rem;font-family:Monaco,Consolas,Andale Mono,DejaVu Sans Mono,monospace}@media (min-width:700px){#enp-quiz .enp-embed-code{padding:.8rem;width:100%}}#enp-quiz .enp-embed-code:focus{outline-color:#4d90fe;outline-offset:-2px;outline-style:auto;outline-width:5px}#enp-quiz .enp-preview-page-container,#enp-quiz .enp-publish-page-container,#enp-quiz .enp-quiz-form-container{display:grid;grid-column:2/-1;gap:1rem;width:100%;justify-items:center}#enp-quiz .enp-quiz-form{display:grid;padding-left:0;padding-right:0}@media (min-width:700px){#enp-quiz .enp-quiz-form{width:100%;max-width:40rem}}#enp-quiz .enp-preview-page-flex-container{display:grid;gap:1rem}@media (min-width:700px){#enp-quiz .enp-preview-page-flex-container{grid-template-columns:1fr 3fr;padding:0 2rem}}#enp-quiz .enp-quiz-title__label{display:block;color:#343242;font-weight:400;font-size:.85rem;text-transform:uppercase;font-weight:500}#enp-quiz .enp-quiz-title__textarea{font-size:1rem;font-family:Arial,monospace,helvetica,arial,sans-serif;padding:.8rem .5rem;background:#fff;border:1px solid #aaa;border-radius:3px;width:20rem;max-width:100%;margin-bottom:1.2rem;font-weight:700;font-size:1.6rem;margin-bottom:1rem}@media (min-width:700px){#enp-quiz .enp-quiz-title__textarea{padding:.8rem;width:100%}}#enp-quiz .enp-quiz-title__textarea::-webkit-input-placeholder{font-weight:700}#enp-quiz .enp-quiz-title__textarea:-ms-input-placeholder,#enp-quiz .enp-quiz-title__textarea::-ms-input-placeholder{font-weight:700}#enp-quiz .enp-quiz-title__textarea::placeholder{font-weight:700}#enp-quiz textarea{color:#000}#enp-quiz .enp-accordion-container{margin-bottom:1.6rem;position:relative}#enp-quiz .enp-question-content{background:#fff;width:100%;padding-top:0;position:relative}#enp-quiz .enp-question-inner{padding:1.6rem 1.6rem 1rem}@media (min-width:700px){#enp-quiz .enp-question-inner{padding-right:2.8rem;padding-left:2.9rem}}#enp-quiz .enp-question-title__label{display:block;color:#343242;font-weight:400;font-size:.85rem;text-transform:uppercase;font-weight:500}#enp-quiz .enp-question-title__textarea{font-family:Arial,monospace,helvetica,arial,sans-serif;padding:.8rem .5rem;background:#fff;border:1px solid #aaa;border-radius:3px;width:20rem;max-width:100%;margin-bottom:1.2rem;padding:1rem 1.2rem;font-size:1rem}@media (min-width:700px){#enp-quiz .enp-question-title__textarea{padding:.8rem;width:100%}}#enp-quiz .enp-question-image-upload{text-align:center;border:none;border-radius:3px;padding:.85em 1.4em .75em;font-size:15px;font-weight:400;letter-spacing:.05em;color:#fff;box-shadow:inset 0 -2px 0 rgba(0,0,0,.2);background:#bf5700;cursor:pointer;line-height:1.6;border:1px dashed #b5a6c4;background:none;color:#545454;box-shadow:none;border:2px dashed #b5a6c4;color:#e8e4ed;transition:all .2s;background:#faf9fb;font-size:1rem;text-transform:uppercase;position:relative;margin-bottom:2rem;transform:translateZ(0);transition:all .3s cubic-bezier(0,0,.3,1)}#enp-quiz .enp-question-image-upload:focus,#enp-quiz .enp-question-image-upload:hover{color:#fff;box-shadow:none;background:#964400}#enp-quiz .enp-question-image-upload:active{color:#fff;box-shadow:inset 0 2px 0 rgba(0,0,0,.1);background:#1eeeff}#enp-quiz .enp-question-image-upload:focus{outline-color:#4d90fe;outline-offset:-2px;outline-style:auto;outline-width:5px}#enp-quiz .enp-question-image-upload:disabled,#enp-quiz .enp-question-image-upload:disabled:focus,#enp-quiz .enp-question-image-upload:disabled:hover{background:#bf5700;cursor:default;opacity:.5}#enp-quiz .enp-question-image-upload:focus,#enp-quiz .enp-question-image-upload:hover{border:1px dashed #69547e;background:hsla(0,0%,100%,.9);color:#b5a6c4;border:2px dashed #999}#enp-quiz .enp-question-image-upload .enp-question-image-upload__icon--photo{width:2.8rem;height:2.8rem;opacity:0;position:absolute;top:0;left:0;right:0;margin:0 auto;transform:translateZ(0);z-index:-1;transition:opacity .2s,transform .3s cubic-bezier(0,0,.3,1)}#enp-quiz .enp-question-image-upload .enp-question-image-upload__icon--add{width:1rem;height:1rem;border-radius:50%;fill:#fff;padding:.02rem;background:#e8e4ed;fill:#faf9fb;margin-right:5px;position:relative;top:.2rem}#enp-quiz .enp-question-image-upload:active,#enp-quiz .enp-question-image-upload:focus,#enp-quiz .enp-question-image-upload:hover{padding-top:5rem;padding-bottom:2rem}#enp-quiz .enp-question-image-upload:active .enp-question-image-upload__icon--photo,#enp-quiz .enp-question-image-upload:focus .enp-question-image-upload__icon--photo,#enp-quiz .enp-question-image-upload:hover .enp-question-image-upload__icon--photo{opacity:1;z-index:1;transform:translate3d(0,1.75rem,0)}#enp-quiz .enp-question-image-upload:active .enp-question-image-upload__icon--add,#enp-quiz .enp-question-image-upload:focus .enp-question-image-upload__icon--add,#enp-quiz .enp-question-image-upload:hover .enp-question-image-upload__icon--add{fill:#fff;background:#b5a6c4}#enp-quiz .enp-question-image__container{position:relative;margin-bottom:1rem}#enp-quiz .enp-question-image{margin-bottom:1.2rem}#enp-quiz .enp-question-type__legend{display:block;color:#343242;font-weight:400;font-size:.85rem;text-transform:uppercase;padding-top:1.6rem;margin-bottom:.2rem;border:none}#enp-quiz .enp-question-type__input{clip:rect(1px,1px,1px,1px);position:absolute!important;left:-10000px;top:auto;width:1px;height:1px;overflow:hidden}#enp-quiz .enp-question-type__label{text-transform:capitalize;display:inline-block;padding:.2rem .5rem;border-radius:3px;cursor:pointer}#enp-quiz .enp-question-type__input:checked+.enp-question-type__label{background:#60aaad;color:#fff;text-shadow:0 0 1px rgba(0,0,0,.7)}#enp-quiz .enp-question-type__input:focus+.enp-question-type__label{z-index:8;outline-color:#4d90fe;outline-offset:-2px;outline-style:auto;outline-width:5px}#enp-quiz .enp-question-type__label{position:relative;z-index:9}#enp-quiz .enp-mc-options,#enp-quiz .enp-slider-options{margin-top:0;display:none;animation:d .25s cubic-bezier(0,0,.3,1) forwards;animation-delay:0s,.05s}#enp-quiz .enp-question-type__input--mc:checked~.enp-mc-options,#enp-quiz .enp-question-type__input--slider:checked~.enp-slider-options{visibility:visible;display:block;animation:g .45s cubic-bezier(0,0,.3,1) forwards}#enp-quiz .enp-mc-options__list{list-style:none;margin-left:0}#enp-quiz .enp-mc-option{position:relative;padding-left:6px}@media (min-width:700px){#enp-quiz .enp-mc-option{padding-left:0}}#enp-quiz .enp-mc-options__legend{display:block;color:#343242;font-weight:400;font-size:.85rem;text-transform:uppercase;font-weight:500}#enp-quiz .enp-mc-option__add,#enp-quiz .enp-mc-option__button--correct,#enp-quiz .enp-mc-option__button--delete{display:none}#enp-quiz .enp-question-type__input--mc:checked~.enp-mc-options .enp-mc-option__add,#enp-quiz .enp-question-type__input--mc:checked~.enp-mc-options .enp-mc-option__button--correct,#enp-quiz .enp-question-type__input--mc:checked~.enp-mc-options .enp-mc-option__button--delete{display:block}#enp-quiz .enp-button__question-image-delete,#enp-quiz .enp-mc-option__button--delete{border:none;background:none;box-shadow:none;padding:0;margin:0;position:absolute;top:9px;right:-24px;fill:#bbb;cursor:pointer}@media (min-width:700px){#enp-quiz .enp-button__question-image-delete,#enp-quiz .enp-mc-option__button--delete{right:-30px}}#enp-quiz .enp-button__question-image-delete:focus,#enp-quiz .enp-button__question-image-delete:hover,#enp-quiz .enp-mc-option__button--delete:focus,#enp-quiz .enp-mc-option__button--delete:hover{fill:#bf5700}#enp-quiz .enp-mc-option__button--correct{border:none;background:none;box-shadow:none;padding:0;margin:0;position:absolute;top:8px;left:-24px}@media (min-width:700px){#enp-quiz .enp-mc-option__button--correct{left:-35px}}#enp-quiz .enp-mc-option__button--correct .enp-mc-option__icon--correct{border-radius:50%;padding:.05em;width:28px;height:28px;fill:#fff;background:#fff;cursor:pointer;border:2px solid #c1893e;transition:all .2s}@media (min-width:700px){#enp-quiz .enp-mc-option__button--correct .enp-mc-option__icon--correct{padding:.15em}}#enp-quiz .enp-mc-option__button--correct:focus .enp-mc-option__icon--correct,#enp-quiz .enp-mc-option__button--correct:hover .enp-mc-option__icon--correct{background:#fff;border-color:#60aaad;fill:#60aaad}#enp-quiz .enp-mc-option__button--correct:disabled{opacity:1}#enp-quiz .enp-mc-option__button--correct:disabled .enp-mc-option__icon--correct{cursor:default;fill:#fff;border:2px solid transparent}#enp-quiz .enp-mc-option--correct .enp-mc-option__input{box-shadow:inset 0 0 3px #60aaad;border:1px solid #60aaad}#enp-quiz .enp-mc-option--correct .enp-mc-option__button--correct:focus .enp-mc-option__icon--correct,#enp-quiz .enp-mc-option--correct .enp-mc-option__button--correct:hover .enp-mc-option__icon--correct,#enp-quiz .enp-mc-option--correct .enp-mc-option__icon--correct{fill:#fff;border-color:#60aaad;background:#60aaad}#enp-quiz .enp-mc-option__add{text-align:center;border:none;border-radius:3px;padding:.85em 1.4em .75em;font-size:15px;font-weight:400;letter-spacing:.05em;color:#fff;box-shadow:inset 0 -2px 0 rgba(0,0,0,.2);background:#bf5700;cursor:pointer;line-height:1.6;border:1px dashed #b5a6c4;background:none;color:#545454;box-shadow:none;border:2px dashed #b5a6c4;color:#e8e4ed;transition:all .2s;background:#faf9fb;font-size:1rem;text-transform:uppercase;text-align:left;padding:.7rem .75rem .8rem}#enp-quiz .enp-mc-option__add:focus,#enp-quiz .enp-mc-option__add:hover{color:#fff;box-shadow:none;background:#964400}#enp-quiz .enp-mc-option__add:active{color:#fff;box-shadow:inset 0 2px 0 rgba(0,0,0,.1);background:#1eeeff}#enp-quiz .enp-mc-option__add:focus{outline-color:#4d90fe;outline-offset:-2px;outline-style:auto;outline-width:5px}#enp-quiz .enp-mc-option__add:disabled,#enp-quiz .enp-mc-option__add:disabled:focus,#enp-quiz .enp-mc-option__add:disabled:hover{background:#bf5700;cursor:default;opacity:.5}#enp-quiz .enp-mc-option__add:focus,#enp-quiz .enp-mc-option__add:hover{border:1px dashed #69547e;background:hsla(0,0%,100%,.9);color:#b5a6c4;border:2px dashed #999}#enp-quiz .enp-mc-option__add .enp-mc-option__add__icon{width:1rem;height:1rem;border-radius:50%;fill:#fff;padding:.02rem;margin-right:5px;background:#e8e4ed;fill:#faf9fb;position:relative;top:.2rem}#enp-quiz .enp-mc-option__add:hover .enp-mc-option__add__icon{fill:#fff;background:#b5a6c4}#enp-quiz .enp-slider-options .enp-input{max-width:11.8rem}#enp-quiz .enp-slider-correct__container .enp-input,#enp-quiz .enp-slider-range__container .enp-input{max-width:8.8rem}@media (min-width:400px){#enp-quiz .enp-slider-correct__container .enp-input,#enp-quiz .enp-slider-range__container .enp-input{max-width:11.8rem}}#enp-quiz .enp-slider-preview{border:1px solid #ddd;margin-top:.2rem;margin-bottom:1.6rem;padding:1.6rem 1.6rem .6rem;position:relative}#enp-quiz .enp-slider-preview .enp-label--slider-preview{position:absolute;width:100%;top:.2rem;left:.4rem;font-size:.75rem;text-transform:uppercase}#enp-quiz .enp-slider-correct__container,#enp-quiz .enp-slider-range__container{display:flex;justify-content:space-between;align-items:center}#enp-quiz .enp-slider-correct__helper,#enp-quiz .enp-slider-range__helper{color:#777;font-size:.85rem;background:#fff;padding:0 .3rem;position:relative}#enp-quiz .enp-slider-correct__helper:before,#enp-quiz .enp-slider-range__helper:before{content:"";position:absolute;top:44%;height:4px;background:#ddd;width:120px;left:-60px;z-index:-1;transition:width .7s cubic-bezier(0,0,.3,1),background 1.6s cubic-bezier(0,0,.3,1)}#enp-quiz .enp-slider-options{margin-bottom:2rem}#enp-quiz .enp-slider-options .enp-accordion-header{text-transform:uppercase;font-size:.85rem;padding:.675rem}#enp-quiz .enp-slider-options .enp-slider-advanced-options__content{border:none;box-shadow:none;padding-top:1rem;padding-bottom:0;margin-bottom:0}#enp-quiz .enp-slider-correct-high__container{position:relative}#enp-quiz .enp-slider-correct-high__input-container--hidden{display:none}#enp-quiz .enp-slider-correct__helper--hidden:before{width:0;background:#60aaad}#enp-quiz .enp-slider-correct-answer-range--add-range{text-align:center;border:none;border-radius:3px;padding:.85em 1.4em .75em;font-size:15px;font-weight:400;letter-spacing:.05em;color:#fff;box-shadow:inset 0 -2px 0 rgba(0,0,0,.2);background:#bf5700;cursor:pointer;text-transform:uppercase;line-height:1.6;border:1px dashed #b5a6c4;background:none;color:#545454;box-shadow:none;border:2px dashed #b5a6c4;color:#e8e4ed;transition:all .2s;background:#faf9fb;margin-left:.8rem;font-size:.7rem}#enp-quiz .enp-slider-correct-answer-range--add-range:focus,#enp-quiz .enp-slider-correct-answer-range--add-range:hover{color:#fff;box-shadow:none;background:#964400}#enp-quiz .enp-slider-correct-answer-range--add-range:active{color:#fff;box-shadow:inset 0 2px 0 rgba(0,0,0,.1);background:#1eeeff}#enp-quiz .enp-slider-correct-answer-range--add-range:focus{outline-color:#4d90fe;outline-offset:-2px;outline-style:auto;outline-width:5px}#enp-quiz .enp-slider-correct-answer-range--add-range:disabled,#enp-quiz .enp-slider-correct-answer-range--add-range:disabled:focus,#enp-quiz .enp-slider-correct-answer-range--add-range:disabled:hover{background:#bf5700;cursor:default;opacity:.5}#enp-quiz .enp-slider-correct-answer-range--add-range:focus,#enp-quiz .enp-slider-correct-answer-range--add-range:hover{border:1px dashed #69547e;background:hsla(0,0%,100%,.9);color:#b5a6c4;border:2px dashed #999}@media (min-width:400px){#enp-quiz .enp-slider-correct-answer-range--add-range{font-size:.8rem;padding:.7rem}}@media (min-width:700px){#enp-quiz .enp-slider-correct-answer-range--add-range{padding:.7rem 1.2rem;min-width:11.4rem}}#enp-quiz .enp-slider-correct-answer-range--add-range .enp-slider-correct-answer-range__icon{width:1rem;height:1rem;border-radius:50%;fill:#fff;padding:.02rem;margin-right:5px;background:#e8e4ed;fill:#faf9fb;position:relative;left:-.2rem}#enp-quiz .enp-slider-correct-answer-range--add-range:hover .enp-slider-correct-answer-range__icon{fill:#fff;background:#b5a6c4}#enp-quiz .enp-slider-correct-answer-range--remove-range{position:absolute;right:-1.6rem;bottom:1.6rem;background:none;border:none;box-shadow:none;padding:0 .1rem}#enp-quiz .enp-slider-correct-answer-range--remove-range .enp-slider-correct-answer-range__icon{width:1.2em;height:1.2em;fill:#e8e4ed}#enp-quiz .enp-slider-correct-answer-range--remove-range:focus .enp-slider-correct-answer-range__icon,#enp-quiz .enp-slider-correct-answer-range--remove-range:hover .enp-slider-correct-answer-range__icon{fill:#bf5700}@media (min-width:700px){#enp-quiz .enp-slider-correct-answer-range--remove-range{top:-.2rem;right:-.2rem;bottom:auto}}#enp-quiz .enp-slider-options .enp-input:-moz-read-only{background:#faf9fb}#enp-quiz .enp-slider-options .enp-input:read-only{background:#faf9fb}#enp-quiz .enp-answer-explanation{background:#fff;padding-top:2rem;box-shadow:inset 1px 0 0 #ccc,inset -1px -1px 0 #ccc,inset 0 1px 0 #ddd}#enp-quiz .enp-answer-explanation__label{display:block;color:#343242;font-weight:400;font-size:.85rem;text-transform:uppercase;font-weight:500}#enp-quiz .enp-question__button--delete{border:none;background:none;box-shadow:none;padding:0;margin:0;position:absolute;top:9px;right:9px;fill:#bbb;cursor:pointer}@media (min-width:700px){#enp-quiz .enp-question__button--delete{right:-30px}}#enp-quiz .enp-question__button--delete:hover{fill:#bf5700}#enp-quiz .enp-question__move{position:absolute;left:15px}@media (min-width:700px){#enp-quiz .enp-question__move{left:-40px}}#enp-quiz .enp-sort__placeholder{background:#ddd;height:60px;width:100%;max-height:120px;margin-bottom:1.6rem}#enp-quiz .ui-sortable .ui-sortable-helper .ui-sortable-handle{cursor:move;cursor:grabbing;cursor:-webkit-grabbing}#enp-quiz .enp-question__button--move{border:none;background:none;box-shadow:none;padding:0;margin:0;position:absolute;fill:#bbb;cursor:pointer}#enp-quiz .enp-question__button--move:focus,#enp-quiz .enp-question__button--move:hover{fill:#333}#enp-quiz .enp-question__button--move:disabled{opacity:.5}#enp-quiz .enp-question__button--move--up{top:0;left:-9px}#enp-quiz .enp-question__button--move--down{top:3px;right:-9px}#enp-quiz .enp-quiz-form__add-question{padding:.75em .8em .7em 1.4em;text-align:center;border:none;border-radius:3px;padding:.85em 1.4em .75em;font-size:15px;font-weight:400;letter-spacing:.05em;color:#fff;box-shadow:inset 0 -2px 0 rgba(0,0,0,.2);background:#bf5700;cursor:pointer;text-transform:uppercase;transition:all .2s;line-height:1.6;border:1px dashed #b5a6c4;background:none;color:#545454;box-shadow:none;padding-top:1rem;padding-bottom:1rem;margin-top:1.6rem;margin-bottom:2rem}#enp-quiz .enp-quiz-form__add-question:focus,#enp-quiz .enp-quiz-form__add-question:hover{color:#fff;box-shadow:none;background:#964400}#enp-quiz .enp-quiz-form__add-question:active{color:#fff;box-shadow:inset 0 2px 0 rgba(0,0,0,.1);background:#1eeeff}#enp-quiz .enp-quiz-form__add-question:focus{outline-color:#4d90fe;outline-offset:-2px;outline-style:auto;outline-width:5px}#enp-quiz .enp-quiz-form__add-question:disabled,#enp-quiz .enp-quiz-form__add-question:disabled:focus,#enp-quiz .enp-quiz-form__add-question:disabled:hover{background:#bf5700;cursor:default;opacity:.5}#enp-quiz .enp-quiz-form__add-question:focus,#enp-quiz .enp-quiz-form__add-question:hover{border:1px dashed #69547e;color:#b5a6c4;background:hsla(0,0%,100%,.9)}#enp-quiz .enp-quiz-form__add-question .enp-add-question__icon{width:1rem;height:1rem;border-radius:50%;fill:#fff;padding:.02rem;margin-right:5px;width:1.2rem;height:1.2rem;background:#e8e4ed;fill:#faf9fb;position:relative;top:.2rem}#enp-quiz .enp-quiz-form__add-question:hover .enp-add-question__icon{fill:#fff;background:#b5a6c4}#enp-quiz .enp-btn--save__btns{display:flex;align-items:center;align-items:flex-start}#enp-quiz .enp-quiz-form__save{text-align:center;border:none;border-radius:3px;padding:.85em 1.4em .75em;font-size:15px;font-weight:400;letter-spacing:.05em;color:#fff;box-shadow:inset 0 -2px 0 rgba(0,0,0,.2);background:#bf5700;cursor:pointer;text-transform:uppercase;transition:all .2s;line-height:1.6;width:100%;margin-bottom:1rem;opacity:.8;text-shadow:0 -1px 2px rgba(0,0,0,.6)}#enp-quiz .enp-quiz-form__save:focus,#enp-quiz .enp-quiz-form__save:hover{color:#fff;box-shadow:none;background:#964400}#enp-quiz .enp-quiz-form__save:active{color:#fff;box-shadow:inset 0 2px 0 rgba(0,0,0,.1);background:#1eeeff}#enp-quiz .enp-quiz-form__save:focus{outline-color:#4d90fe;outline-offset:-2px;outline-style:auto;outline-width:5px}#enp-quiz .enp-quiz-form__save:disabled,#enp-quiz .enp-quiz-form__save:disabled:focus,#enp-quiz .enp-quiz-form__save:disabled:hover{background:#bf5700;cursor:default;opacity:.5}#enp-quiz .enp-quiz-form__save:focus,#enp-quiz .enp-quiz-form__save:hover{opacity:1}@media (min-width:400px){#enp-quiz .enp-quiz-form__save{padding:1.2rem 1.8rem 1.1rem;width:27%;margin-right:3%;position:relative}}#enp-quiz .enp-quiz-form__save--reveal{animation:c .3s cubic-bezier(0,0,.3,1)}#enp-quiz .enp-btn--next-step{text-align:center;border:none;border-radius:3px;padding:.85em 1.4em .75em;font-size:15px;font-weight:400;letter-spacing:.05em;color:#fff;box-shadow:inset 0 -2px 0 rgba(0,0,0,.2);background:#bf5700;cursor:pointer;text-transform:uppercase;transition:all .2s;line-height:1.6;padding:.65em 1.2em .85em 1.4em}#enp-quiz .enp-btn--next-step:focus,#enp-quiz .enp-btn--next-step:hover{color:#fff;box-shadow:none;background:#964400}#enp-quiz .enp-btn--next-step:active{color:#fff;box-shadow:inset 0 2px 0 rgba(0,0,0,.1);background:#1eeeff}#enp-quiz .enp-btn--next-step:focus{outline-color:#4d90fe;outline-offset:-2px;outline-style:auto;outline-width:5px}#enp-quiz .enp-btn--next-step:disabled,#enp-quiz .enp-btn--next-step:disabled:focus,#enp-quiz .enp-btn--next-step:disabled:hover{background:#bf5700;cursor:default;opacity:.5}#enp-quiz .enp-btn--next-step__icon{border-radius:50%;fill:#fff;background:#fff;fill:#bf5700;width:1.2rem;height:1.2rem;margin-left:.5em;position:relative;top:.15rem}#enp-quiz .enp-btn--next-step__icon:hover{background:#fff;fill:#964400}#enp-quiz .enp-btn--next-step{width:100%;padding:1rem 1.4rem}@media (min-width:700px){#enp-quiz .enp-btn--next-step{padding:1.2rem 1.8rem 1.1rem}}#enp-quiz .enp-btn--next-step .enp-btn--next-step__icon{width:1rem;height:1rem}#enp-quiz .enp-btn--next-step--reveal{animation:b .3s cubic-bezier(0,0,.3,1)}#enp-quiz .enp-accordion-header--inserting,#enp-quiz .enp-mc-option--inputs{animation:a .4s cubic-bezier(0,0,.3,1) forwards}#enp-quiz .enp-mc-option--remove,#enp-quiz .enp-question--remove,#enp-quiz .enp-question__image--remove{animation:e .5s cubic-bezier(0,0,.3,1) forwards}#enp-quiz .enp-image-upload-wait{text-align:center;border:none;border-radius:3px;padding:.85em 1.4em .75em;font-size:15px;font-weight:400;letter-spacing:.05em;color:#fff;box-shadow:inset 0 -2px 0 rgba(0,0,0,.2);background:#bf5700;cursor:pointer;text-transform:uppercase;line-height:1.6;border:1px dashed #b5a6c4;background:none;color:#545454;box-shadow:none;border:2px dashed #b5a6c4;color:#e8e4ed;transition:all .2s;background:#faf9fb;padding-top:4rem;padding-bottom:4rem;margin-bottom:1rem;width:100%}#enp-quiz .enp-image-upload-wait:focus,#enp-quiz .enp-image-upload-wait:hover{color:#fff;box-shadow:none;background:#964400}#enp-quiz .enp-image-upload-wait:active{color:#fff;box-shadow:inset 0 2px 0 rgba(0,0,0,.1);background:#1eeeff}#enp-quiz .enp-image-upload-wait:focus{outline-color:#4d90fe;outline-offset:-2px;outline-style:auto;outline-width:5px}#enp-quiz .enp-image-upload-wait:disabled,#enp-quiz .enp-image-upload-wait:disabled:focus,#enp-quiz .enp-image-upload-wait:disabled:hover{background:#bf5700;cursor:default;opacity:.5}#enp-quiz .enp-image-upload-wait:focus,#enp-quiz .enp-image-upload-wait:hover{border:1px dashed #69547e;background:hsla(0,0%,100%,.9);color:#b5a6c4;border:2px dashed #999}#enp-quiz .enp-accordion-header.question-has-error{color:#bf5700;box-shadow:0 0 3px #bf5700}.enp-quiz.ui-sortable--sorting #enp-quiz .enp-accordion-content{display:none}#enp-quiz .enp-quiz-settings__title,#enp-quiz .enp-quiz-share__legend{position:relative;font-size:1rem;text-transform:uppercase;font-weight:600;padding-top:0}#enp-quiz .enp-quiz-settings__form{margin-bottom:3rem;overflow:visible}@media (min-width:1000px){#enp-quiz .enp-quiz-settings__form{padding:0;margin-bottom:0}}@media (min-width:700px){#enp-quiz .enp-fieldset{position:relative}}#enp-quiz .enp-title-display__legend{padding-top:0}@media (min-width:700px){#enp-quiz .enp-title-display__legend{padding-top:.4rem}}#enp-quiz .enp-quiz-share__input,#enp-quiz .enp-quiz-styles__input{width:100%}#enp-quiz .enp-quiz-styles__textarea--custom-css{font-family:Monaco,Consolas,Andale Mono,DejaVu Sans Mono,monospace;font-size:.9rem;min-height:200px}#enp-quiz .enp-fieldset--section{padding:1.6rem 1rem}#enp-quiz .enp-fieldset--section.enp-accordion-content--open{margin-bottom:0}#enp-quiz .enp-quiz-share--facebook{margin-bottom:2rem}#enp-quiz .enp-title-display__legend{display:block;color:#343242;font-weight:400;font-size:.85rem;text-transform:uppercase;padding-top:1.6rem;margin-bottom:.2rem;border:none}#enp-quiz .enp-title-display__input{clip:rect(1px,1px,1px,1px);position:absolute!important;left:-10000px;top:auto;width:1px;height:1px;overflow:hidden}#enp-quiz .enp-title-display__label{text-transform:capitalize;display:inline-block;padding:.2rem .5rem;border-radius:3px;cursor:pointer}#enp-quiz .enp-title-display__input:checked+.enp-title-display__label{background:#60aaad;color:#fff;text-shadow:0 0 1px rgba(0,0,0,.7)}#enp-quiz .enp-title-display__input:focus+.enp-title-display__label{z-index:8;outline-color:#4d90fe;outline-offset:-2px;outline-style:auto;outline-width:5px}#enp-quiz .enp-mc-options-order__legend{display:block;color:#343242;font-weight:400;font-size:.85rem;text-transform:uppercase;padding-top:1.6rem;margin-bottom:.2rem;border:none}#enp-quiz .enp-mc-options-order__input{clip:rect(1px,1px,1px,1px);position:absolute!important;left:-10000px;top:auto;width:1px;height:1px;overflow:hidden}#enp-quiz .enp-mc-options-order__label{text-transform:capitalize;display:inline-block;padding:.2rem .5rem;border-radius:3px;cursor:pointer}#enp-quiz .enp-mc-options-order__input:checked+.enp-mc-options-order__label{background:#60aaad;color:#fff;text-shadow:0 0 1px rgba(0,0,0,.7)}#enp-quiz .enp-mc-options-order__input:focus+.enp-mc-options-order__label{z-index:8;outline-color:#4d90fe;outline-offset:-2px;outline-style:auto;outline-width:5px}#enp-quiz .enp-mc-options-order{margin-bottom:1.6rem}#enp-quiz .enp-quiz-share__textarea{min-height:7.6rem;margin-bottom:2rem}@media (min-width:700px){#enp-quiz .enp-quiz-share__textarea{min-height:4.6rem}}@media (min-width:1000px){#enp-quiz .enp-quiz-share__textarea{min-height:7.6rem}}#enp-quiz .enp-preview-form__submit{margin-top:1.6rem;margin-bottom:1.6rem}#enp-quiz .enp-quiz-preview__title{font-size:1rem;text-transform:uppercase;font-weight:600}#enp-quiz .enp-preview-form__submit{text-align:center;border:none;border-radius:3px;padding:.85em 1.4em .75em;font-size:15px;font-weight:400;letter-spacing:.05em;color:#fff;box-shadow:inset 0 -2px 0 rgba(0,0,0,.2);background:#bf5700;cursor:pointer;text-transform:uppercase;transition:all .2s;line-height:1.6;width:100%;padding-top:.85rem;padding-bottom:.85rem;margin-bottom:1rem;opacity:.8;text-shadow:0 -1px 2px rgba(0,0,0,.6)}#enp-quiz .enp-preview-form__submit:focus,#enp-quiz .enp-preview-form__submit:hover{color:#fff;box-shadow:none;background:#964400}#enp-quiz .enp-preview-form__submit:active{color:#fff;box-shadow:inset 0 2px 0 rgba(0,0,0,.1);background:#1eeeff}#enp-quiz .enp-preview-form__submit:focus{outline-color:#4d90fe;outline-offset:-2px;outline-style:auto;outline-width:5px}#enp-quiz .enp-preview-form__submit:disabled,#enp-quiz .enp-preview-form__submit:disabled:focus,#enp-quiz .enp-preview-form__submit:disabled:hover{background:#bf5700;cursor:default;opacity:.5}#enp-quiz .enp-preview-form__submit:focus,#enp-quiz .enp-preview-form__submit:hover{opacity:1}#enp-quiz .enp-preview-form__submit--publish{width:100%;position:relative;z-index:99999999;padding:1.05rem 1.8rem .95rem}#enp-quiz .enp-quiz-styles__iris-wrapper{position:relative}#enp-quiz .iris-picker{box-sizing:content-box;position:relative;z-index:9999999999;top:-1.2rem;margin-bottom:1rem;padding-bottom:3rem;padding-right:30px}@media (min-width:1000px){#enp-quiz .iris-picker{position:absolute;top:-4px;left:0}}#enp-quiz .iris-picker:last-of-type{margin-bottom:0}#enp-quiz .iris-picker .ui-draggable-handle:focus .ui-slider-handle,#enp-quiz .iris-picker .ui-slider-handle:focus{box-shadow:0 0 3px rgba(0,0,0,.75)}#enp-quiz .enp-quiz-styles__set-default{text-align:center;border:none;border-radius:3px;padding:.85em 1.4em .75em;font-size:15px;font-weight:400;letter-spacing:.05em;color:#fff;box-shadow:inset 0 -2px 0 rgba(0,0,0,.2);background:#bf5700;cursor:pointer;text-transform:uppercase;transition:all .2s;line-height:1.6;border:2px solid #bf5700;background:transparent;color:#bf5700;box-shadow:none;font-size:.75rem;position:absolute;left:10px;bottom:10px}#enp-quiz .enp-quiz-styles__set-default:focus,#enp-quiz .enp-quiz-styles__set-default:hover{color:#fff;box-shadow:none;background:#964400}#enp-quiz .enp-quiz-styles__set-default:active{color:#fff;box-shadow:inset 0 2px 0 rgba(0,0,0,.1);background:#1eeeff}#enp-quiz .enp-quiz-styles__set-default:focus{outline-color:#4d90fe;outline-offset:-2px;outline-style:auto;outline-width:5px}#enp-quiz .enp-quiz-styles__set-default:disabled,#enp-quiz .enp-quiz-styles__set-default:disabled:focus,#enp-quiz .enp-quiz-styles__set-default:disabled:hover{background:#bf5700;cursor:default;opacity:.5}#enp-quiz .enp-quiz-styles__set-default:focus,#enp-quiz .enp-quiz-styles__set-default:hover{background:transparent;border:2px solid #964400;color:#964400}#enp-quiz .enp-iris__close{border:none;background:none;box-shadow:none;padding:0;margin:0;position:absolute;top:5px;right:5px;fill:#888;cursor:pointer}#enp-quiz .enp-quiz-styles__input--color{padding-left:45px}#enp-quiz .enp-quiz-styles__color-demo{width:30px;height:30px;border:1px solid #ccc;top:8px;left:8px;border-radius:3px;position:absolute}#enp-quiz .enp-share-quiz__url{display:block;font-size:1.5rem;line-height:1.4;word-wrap:break-word}#enp-quiz .enp-share-quiz{list-style:none;margin-left:0;display:flex;justify-content:center;align-content:center;align-items:center}#enp-quiz .enp-share-quiz__item{margin-right:20px}#enp-quiz .enp-share-quiz__item:last-child{margin-right:0}#enp-quiz .enp-share-quiz__item__icon{width:2.4rem;height:2.4rem;border-radius:50%;fill:#fff;padding:.6rem;fill:#fff!important}#enp-quiz .enp-share-quiz__item__icon--facebook{background-color:#3a5795}#enp-quiz .enp-share-quiz__item__icon--twitter{background-color:#4099ff}#enp-quiz .enp-share-quiz{justify-content:space-around;margin-bottom:0}#enp-quiz .enp-ab-create__container{max-width:740px;margin:0 auto;width:100%;background:#fdfcfd;padding-top:3rem;padding-bottom:3rem}#enp-quiz .enp-ab-create__container:after{content:"";display:table;clear:both}@media (min-width:700px){#enp-quiz .enp-ab-create__container{max-width:1000px}}@media (min-width:1000px){#enp-quiz .enp-ab-create__container{max-width:1440px}}#enp-quiz .enp-ab-create__form{max-width:740px;margin:0 auto}#enp-quiz .enp-ab-create__form:after{content:"";display:table;clear:both}#enp-quiz .enp-ab-create__label{display:block;color:#343242;font-weight:400;font-size:.85rem;text-transform:uppercase;font-weight:500}#enp-quiz .enp-ab-create-title__textarea{font-size:1rem;font-family:Arial,monospace,helvetica,arial,sans-serif;padding:.8rem .5rem;background:#fff;border:1px solid #aaa;border-radius:3px;width:20rem;max-width:100%;margin-bottom:1.2rem;font-weight:700;font-size:1.6rem;margin-bottom:1rem;width:100%}@media (min-width:700px){#enp-quiz .enp-ab-create-title__textarea{padding:.8rem;width:100%}}#enp-quiz .enp-ab-create-title__textarea::-webkit-input-placeholder{font-weight:700}#enp-quiz .enp-ab-create-title__textarea:-ms-input-placeholder,#enp-quiz .enp-ab-create-title__textarea::-ms-input-placeholder{font-weight:700}#enp-quiz .enp-ab-create-title__textarea::placeholder{font-weight:700}#enp-quiz .enp-ab-create__select{width:100%;-webkit-appearance:none;-moz-appearance:none;appearance:none;font-size:.85rem;padding:.7rem 32px .7rem .8rem;border:1px solid #bbb;border-radius:3px;margin-bottom:1.6rem;background:url(../svg/chevron-down.svg) 100% 50% no-repeat;background-color:#fff;box-shadow:inset -26px 0 0 rgba(0,0,0,.1)}#enp-quiz .enp-ab-create__submit{width:100%;padding-top:1em;padding-bottom:1em}#headerimg h1{text-align:center;font-size:40px!important}#enp-quiz.enp-quiz__main{max-width:740px;margin:0 auto;display:grid;gap:1em;min-height:85vh}#enp-quiz.enp-quiz__main:after{content:"";display:table;clear:both}@media (min-width:1000px){#enp-quiz.enp-quiz__main{max-width:740px;margin:0 auto;grid-template-columns:1fr 4fr}#enp-quiz.enp-quiz__main:after{content:"";display:table;clear:both}}@media (min-width:1000px) and (min-width:700px){#enp-quiz.enp-quiz__main{max-width:1000px}}@media (min-width:1000px) and (min-width:1000px){#enp-quiz.enp-quiz__main{max-width:1440px}}#enp-quiz .enp-dash-container{padding:2rem;transition:all .25s cubic-bezier(0,0,.3,1)}#enp-quiz .enp-dash__section-aside{background-color:#faf9fb}@media (min-width:700px){#enp-quiz .enp-dash__section-aside{padding:2rem}}#enp-quiz .enp-breadcrumb-link__container{padding-bottom:2rem}#enp-quiz .enp-search-quizzes{display:flex;justify-content:space-between;flex-wrap:wrap;padding:1em}@media (min-width:700px){#enp-quiz .enp-search-quizzes{padding:.2rem .8rem;flex-wrap:nowrap}}@media (min-width:1000px){#enp-quiz .enp-search-quizzes{display:flex;justify-content:space-between;flex-direction:column}}#enp-quiz .enp-search-quizzes__form-item{margin-bottom:.6rem;flex:0 1 48%}@media (min-width:400px){#enp-quiz .enp-search-quizzes__form-item{margin-bottom:0;margin-right:1rem;flex:1 0 auto}}#enp-quiz .enp-quiz-search{flex:1 0 100%;position:relative}@media (min-width:700px){#enp-quiz .enp-quiz-search{flex:1 0 auto}}#enp-quiz .enp-search-quizzes__label{margin-bottom:0;clip:rect(1px,1px,1px,1px);position:absolute!important;left:-10000px;top:auto;width:1px;height:1px;overflow:hidden}#enp-quiz .enp-search-quizzes__select{padding:.3rem;border-radius:3px;width:100%}@media (min-width:1000px){#enp-quiz .enp-search-quizzes__select{min-width:200px}}#enp-quiz .enp-quiz-search__input{width:100%;margin:0 0 .1rem;padding:.3rem .3rem .3rem 26px;font-size:.85rem}@media (min-width:700px){#enp-quiz .enp-quiz-search__input{max-width:200px}}#enp-quiz .enp-quiz-search__icon{position:absolute;bottom:.3rem;left:.2rem;width:21px;height:21px}#enp-quiz .enp-search-quizzes__button{padding:.2rem .8rem}#enp-quiz .enp-search-results-description{font-size:.85rem}#enp-quiz .enp-search-results-description__link{white-space:nowrap}#enp-quiz .enp-search-results-description__icon{width:1.3em;height:1.3em;position:relative;top:4px;left:2px}#enp-quiz .enp-dash__section-title{font-size:1rem;text-transform:uppercase;margin-bottom:.325rem;border-bottom:1px solid #e8e4ed}#enp-quiz .enp-dash__ab-test-helper--not-enough-quizzes{color:#b5a6c4}#enp-quiz .enp-view-toggle{cursor:pointer;opacity:.5;display:none}@media (min-width:700px){#enp-quiz .enp-view-toggle{display:flex}}#enp-quiz .enp-view-toggle__active{opacity:1}#enp-quiz .enp-sort-by{margin-left:5px}#enp-quiz .enp-dash-list{display:flex;flex-flow:column wrap;align-items:stretch;list-style:none;margin-left:0}#enp-quiz .enp-dash-item{flex-basis:100%;padding:1rem 1.2rem;background:#fff;border:1px solid #eee;border-bottom:1px solid #ddd;list-style:none;transition:all .35s cubic-bezier(0,0,.3,1);margin:0 0 .8rem;justify-content:space-between;display:flex;flex-direction:column;align-content:flex-end;justify-content:flex-end;border:none;border-radius:3px;background-color:#f5f3f7}#enp-quiz .enp-dash-item--draft,#enp-quiz .enp-dash-item--published{box-shadow:inset 4px 0 0 #00a9b7,0 1px 0 rgba(0,0,0,.1)}#enp-quiz .enp-dash-item--remove{animation:e .5s cubic-bezier(0,0,.3,1) forwards}#enp-quiz .enp-dash-list--list-view .enp-dash-item{margin:0 0 .8rem;flex-basis:100%}#enp-quiz .enp-dash-item__spinner{display:flex;justify-content:center;align-content:center;align-items:center;position:absolute;top:0;bottom:0;left:0;right:0;background:hsla(0,59%,90%,.8);width:100%;animation:g .3s cubic-bezier(0,0,.3,1)}#enp-quiz .enp-dash-item__header{padding:.5rem 1rem;background:#faf9fb;border-bottom:1px solid #e8e4ed;display:flex;justify-content:space-between;align-items:center;border-radius:3px}#enp-quiz .enp-dash-item__title{font-size:1rem;padding-bottom:.5rem;padding:0;margin-bottom:0}#enp-quiz .enp-dash-item__title a{color:#00a9b7}#enp-quiz .enp-dash-item__content{padding:0 0 .375rem;position:relative;transition:all .2s cubic-bezier(0,0,.3,1)}#enp-quiz .enp-dash-item__meta{font-size:.7rem;font-weight:300;color:#565656;font-size:.75rem}#enp-quiz .enp-dash-item__username{word-wrap:break-word;padding-left:.4rem;margin-left:.2rem;border-left:1px solid #ddd}#enp-quiz .enp-dash-item__title--ab-test{padding-bottom:0}#enp-quiz .enp-dash-item__ab-quizzes{list-style:none;margin-left:0;font-size:.85rem;color:#e8e4ed;margin-bottom:.8rem}#enp-quiz .enp-dash-item__nav{list-style:none;margin-left:0;margin-bottom:0;font-size:.85rem}#enp-quiz .enp-dash-item__nav__item{display:flex;margin:0;width:100%;padding:12px;align-items:center}#enp-quiz .enp-dash-item__nav__item:hover{background-color:#f5f3f7}#enp-quiz .enp-dash-item__nav__item:hover .enp-dash-item__icon{fill:#bf5700}#enp-quiz .enp-dash-item__nav__item a{font-weight:400;color:#bf5700;display:flex;align-items:center}#enp-quiz .enp-dash-item__nav__item a:focus{outline:1px dotted #bf5700;outline-offset:1px}#enp-quiz .enp-dash-item__nav__item:last-of-type{margin-right:0}#enp-quiz .enp-dash-item__delete{border:none;background:none;box-shadow:none;margin:0;position:relative;padding:0;cursor:pointer;display:flex}#enp-quiz .enp-dash-item__delete .enp-icon{fill:#b5a6c4}#enp-quiz .enp-dash-item__icon{fill:#b5a6c4;width:15px;height:15px;margin-right:10px}#enp-quiz .enp-dash-item__nav--collapsible{display:none;position:absolute;z-index:2;top:53px;right:1.5rem;width:195px;background-color:#fff;text-align:left;transform:translateZ(0);transition:all .2s cubic-bezier(0,0,.3,1)}#enp-quiz .enp-dash-item__nav--collapsible .enp-dash-item__nav__item{padding:.5rem 1rem;cursor:pointer}#enp-quiz .enp-dash-item__menu-action{height:24px;background:none;border:none;color:#444;padding:0;bottom:.2rem;right:1.5rem;top:1.5rem;cursor:pointer}#enp-quiz .enp-dash-item__menu-action-wrap{max-width:0;display:flex;flex-direction:column;align-items:flex-end}#enp-quiz .enp-dash-item__menu-action__icon{width:15px;height:15px;fill:#b5a6c4;transition:all .3s cubic-bezier(0,0,.3,1)}#enp-quiz .enp-dash-item--menu-active{transform:translate3d(0,-3px,0)}#enp-quiz .enp-dash-item--menu-active.enp-dash-item--published{box-shadow:inset 4px 0 0 #60aaad,0 2px 2px rgba(0,0,0,.2)}#enp-quiz .enp-dash-item--menu-active.enp-dash-item--draft{box-shadow:inset 4px 0 0 #b4d7d8,0 2px 2px rgba(0,0,0,.2)}#enp-quiz .enp-dash-item--menu-active .enp-dash-item__menu-action__icon--bottom{transform:rotateX(180deg)}#enp-quiz .enp-dash-item--menu-active .enp-dash-item__nav--collapsible{display:block;animation:b .25s cubic-bezier(0,0,.3,1) forwards;border-radius:3px;box-shadow:0 2px 2px rgba(0,0,0,.2)}#enp-quiz .enp-dash-item--menu-active .enp-dash-item__content{opacity:.4}#enp-quiz .enp-quiz-results{display:flex;justify-content:space-around;list-style:none;margin:.8rem 0 0;padding:0;text-align:center}#enp-quiz .enp-quiz-results__item{margin:0 2% 0 0;padding:0;color:#454545}@media (max-width:280px){#enp-quiz .enp-quiz-results__item{width:100%;padding:0;margin-bottom:.6rem}}#enp-quiz .enp-quiz-results__number{font-size:1.6rem;line-height:1;position:relative}#enp-quiz .enp-dash-item--draft .enp-quiz-results__number{opacity:.5}#enp-quiz .enp-quiz-results__number--average-score{color:#4e9497}#enp-quiz .enp-quiz-results__number--average-score:after{content:"%";font-size:.9rem;position:absolute;top:.3rem;right:-1rem}#enp-quiz .enp-quiz-results__label{text-transform:uppercase;font-size:.7rem;font-weight:300;color:#888}#enp-quiz .enp-dash-item--add-new__wrap{display:grid;gap:1em;grid-template-columns:1fr 1fr}#enp-quiz .enp-dash-list--quiz__container{display:grid;gap:1em}@media (min-width:1000px){#enp-quiz .enp-dash-list--quiz__container{grid-template-columns:1fr 1fr}}#enp-quiz .enp-dash-item--add-new{background:none;border:none;padding:0;position:relative}@media (min-width:1000px){#enp-quiz .enp-dash-item--add-new{padding-top:7rem}}#enp-quiz .enp-dash-link--add-new{text-align:center;border:none;border-radius:3px;padding:.85em 1.4em .75em;font-size:15px;font-weight:400;letter-spacing:.05em;color:#fff;box-shadow:inset 0 -2px 0 rgba(0,0,0,.2);background:#bf5700;cursor:pointer;text-transform:uppercase;line-height:1.6;border:1px dashed #b5a6c4;background:none;color:#545454;box-shadow:none;border:2px dashed #b5a6c4;color:#e8e4ed;transition:all .2s;justify-content:flex-start;color:#bf5700;padding:1rem 1.2rem}#enp-quiz .enp-dash-link--add-new:focus,#enp-quiz .enp-dash-link--add-new:hover{color:#fff;box-shadow:none;background:#964400}#enp-quiz .enp-dash-link--add-new:active{color:#fff;box-shadow:inset 0 2px 0 rgba(0,0,0,.1);background:#1eeeff}#enp-quiz .enp-dash-link--add-new:focus{outline-color:#4d90fe;outline-offset:-2px;outline-style:auto;outline-width:5px}#enp-quiz .enp-dash-link--add-new:disabled,#enp-quiz .enp-dash-link--add-new:disabled:focus,#enp-quiz .enp-dash-link--add-new:disabled:hover{background:#bf5700;cursor:default;opacity:.5}#enp-quiz .enp-dash-link--add-new:focus,#enp-quiz .enp-dash-link--add-new:hover{border:1px dashed #69547e;background:hsla(0,0%,100%,.9);color:#b5a6c4;border:2px dashed #999}@media (min-width:700px){#enp-quiz .enp-dash-link--add-new{font-size:1rem;text-transform:uppercase;display:flex;justify-content:center;align-content:center;align-items:center;flex-direction:column;position:absolute;top:0;left:0;right:0;bottom:0}}#enp-quiz .enp-dash-link--add-new .enp-dash-link__icon{border-radius:50%;fill:#fff;width:1.2rem;height:1.2rem;margin-right:5px}@media (min-width:700px){#enp-quiz .enp-dash-link--add-new .enp-dash-link__icon{width:2rem;height:2rem;margin:.8rem 0 .2rem}}#enp-quiz .enp-dash-link--add-new:hover{color:#964400}#enp-quiz .enp-dash-link--add-new:hover .enp-dash-link__icon{fill:#fff;background:#964400}#enp-quiz .enp-quiz-message--welcome p{color:#1d1c25}#enp-quiz .enp-paginate{list-style:none;margin-left:0;font-size:1rem}#enp-quiz .enp-paginate,#enp-quiz .enp-paginate__link{display:flex;justify-content:center;align-content:center;align-items:center}#enp-quiz .enp-paginate__link{margin:0 .2rem;padding:0 .4rem;border-radius:3px;font-weight:400}#enp-quiz .enp-paginate__link--current-page{border:2px solid #00a9b7}#enp-quiz .enp-paginate__item--first-page,#enp-quiz .enp-paginate__item--last-page{display:flex}#enp-quiz .enp-paginate__item--first-page:after,#enp-quiz .enp-paginate__item--last-page:before{content:"...";font-size:1rem;position:relative;bottom:.2rem;opacity:.6}#enp-quiz .enp-paginate__item--no-gap:after,#enp-quiz .enp-paginate__item--no-gap:before{content:""}#enp-quiz .enp-paginate__item--next-page{margin-left:.2rem}#enp-quiz .enp-paginate__item--previous-page{margin-right:.2rem}#enp-quiz .enp-quiz-breadcrumbs{grid-row:1}#enp-quiz .enp-quiz-breadcrumbs__list{display:flex;list-style:none;margin-left:0;margin-bottom:0}#enp-quiz .enp-quiz-breadcrumbs__item{margin-right:10px;display:flex;justify-content:center;align-content:center;align-items:center;fill:#bf5700;margin-right:5px}#enp-quiz .enp-quiz-breadcrumbs__item:last-of-type{margin-right:0}@media (min-width:400px){#enp-quiz .enp-quiz-breadcrumbs__item{margin-right:10px}}#enp-quiz .enp-quiz-breadcrumbs__link--disabled{opacity:.65;cursor:default}#enp-quiz .enp-quiz-breadcrumbs__link--active{text-align:center;border:none;border-radius:3px;padding:.85em 1.4em .75em;font-size:15px;font-weight:400;letter-spacing:.05em;color:#fff;box-shadow:inset 0 -2px 0 rgba(0,0,0,.2);background:#bf5700;cursor:pointer;text-transform:uppercase;transition:all .2s;line-height:1.6;border:2px solid #bf5700;background:transparent;color:#bf5700;box-shadow:none;padding:.4em 1em}#enp-quiz .enp-quiz-breadcrumbs__link--active:focus,#enp-quiz .enp-quiz-breadcrumbs__link--active:hover{color:#fff;box-shadow:none;background:#964400}#enp-quiz .enp-quiz-breadcrumbs__link--active:active{color:#fff;box-shadow:inset 0 2px 0 rgba(0,0,0,.1);background:#1eeeff}#enp-quiz .enp-quiz-breadcrumbs__link--active:focus{outline-color:#4d90fe;outline-offset:-2px;outline-style:auto;outline-width:5px}#enp-quiz .enp-quiz-breadcrumbs__link--active:disabled,#enp-quiz .enp-quiz-breadcrumbs__link--active:disabled:focus,#enp-quiz .enp-quiz-breadcrumbs__link--active:disabled:hover{background:#bf5700;cursor:default;opacity:.5}#enp-quiz .enp-quiz-breadcrumbs__link--active:focus,#enp-quiz .enp-quiz-breadcrumbs__link--active:hover{background:transparent;border:2px solid #964400;color:#964400}#enp-quiz .enp-quiz-breadcrumbs__link{font-size:1rem;font-weight:400;text-transform:none;letter-spacing:0}#enp-quiz .enp-quiz-breadcrumbs--fixed{top:0;position:fixed;animation:h .25s}#enp-quiz .enp-results-title{font-size:1.6rem;text-align:center;padding:3.2rem 20px 2.6rem;background:#fdfcfd;margin:-1.2rem 0 2rem;border-bottom:1px solid #ddd}#enp-quiz .enp-results-title:after{font-size:1rem;text-transform:uppercase;display:block;content:"RESULTS";font-weight:400}#enp-quiz .enp-results__container{max-width:740px;margin:0 auto;display:block}#enp-quiz .enp-results__container:after{content:"";display:table;clear:both}@media (min-width:700px){#enp-quiz .enp-results__container{max-width:1000px}}@media (min-width:1000px){#enp-quiz .enp-results__container{max-width:1440px;display:flex;justify-content:space-between}}#enp-quiz .enp-quiz-scores__container,#enp-quiz .enp-results-flow__container{width:100%}@media (min-width:1000px){#enp-quiz .enp-quiz-scores__container,#enp-quiz .enp-results-flow__container{width:48%}}#enp-quiz .enp-quiz-scores{margin-top:2.6rem}#enp-quiz .enp-quiz-score__line-chart{height:300px;margin-bottom:1rem}#enp-quiz .enp-quiz-score__line-chart .ct-label{color:#1d1c25}#enp-quiz .enp-quiz-score__line-chart .ct-grid{stroke:#dadada;stroke-dasharray:0}#enp-quiz .enp-quiz-score__line-chart .ct-line{stroke:#60aaad;stroke-width:2px}#enp-quiz .enp-quiz-score__line-chart .ct-point{stroke:#60aaad;stroke-width:8px}#enp-quiz .enp-quiz-scores-table{width:100%;max-width:500px;margin:0 auto}#enp-quiz .enp-quiz-scores-table tr th{background-color:#fff}#enp-quiz .enp-quiz-scores-table__label{padding-left:5%}#enp-quiz .enp-quiz-scores-table__score{text-align:right;padding-right:5%}#enp-quiz .enp-results-flow{position:relative;margin:2rem auto;width:320px;height:320px;border-radius:50%}@media (min-width:400px){#enp-quiz .enp-results-flow{width:390px;height:390px}}@media (min-width:700px){#enp-quiz .enp-results-flow{width:450px;height:450px}}@media (min-width:1000px){#enp-quiz .enp-results-flow{width:400px;height:400px}}#enp-quiz .enp-results-flow__section-title{clip:rect(1px,1px,1px,1px);position:absolute!important;left:-10000px;top:auto;width:1px;height:1px;overflow:hidden}#enp-quiz .enp-results-flow__item{border-radius:50%;text-align:center;height:100%;width:100%;margin:0 auto;left:0;right:0;padding:12.5% 0 0;letter-spacing:.05rem;border:2px solid #60aaad;animation:.85s a cubic-bezier(0,0,.3,1) forwards}#enp-quiz .enp-results-flow__item--total-views{background:#fff}#enp-quiz .enp-results-flow__item--quiz-starts{width:65%;height:65%;position:absolute;padding-top:8%;bottom:2.5%;background:#fff}#enp-quiz .enp-results-flow__item--quiz-finishes{width:35%;height:35%;position:absolute;bottom:5%;background:#d6e9ea}#enp-quiz .enp-results-flow__title{font-size:1rem;text-transform:uppercase;color:#444;font-size:.7rem;margin-bottom:0}@media (min-width:700px){#enp-quiz .enp-results-flow__title{font-weight:700;margin-bottom:2px}}#enp-quiz .enp-results-flow__number{font-weight:700;font-size:1.4rem;line-height:1.2}#enp-quiz .enp-results-flow__number--total-views{font-size:2rem}#enp-quiz .enp-results-flow__number--quiz-starts{font-size:1.65rem}#enp-quiz .enp-results-flow__percentage{font-size:.8rem;font-weight:400;position:relative;display:inline-block;top:-.7em;left:-.1rem;color:#444}#enp-quiz .enp-results-flow__percentage:after{content:"%";position:absolute;right:-.75rem;font-size:.7rem;color:#444}#enp-quiz .enp-results-questions__section{padding-top:5rem;padding-bottom:3rem;margin-top:5rem;margin-bottom:3rem}@media (min-width:700px){#enp-quiz .enp-results-questions__section{margin-right:2rem;margin-left:2rem}}#enp-quiz .enp-results-questions__header{align-items:flex-start;flex-direction:column}@media (min-width:400px){#enp-quiz .enp-results-questions__header{display:flex;justify-content:space-between;flex-direction:row;align-items:flex-end}}#enp-quiz .enp-results-questions__key,#enp-quiz .enp-results-questions__title{font-size:1rem;text-transform:uppercase}#enp-quiz .enp-results-questions{list-style:none;margin-left:0}#enp-quiz .enp-results-question{width:100%;font-size:1rem;padding:0;margin-bottom:1rem}#enp-quiz .enp-results-question__header{padding:1rem 1.2rem;position:relative}#enp-quiz .enp-results-question__question,#enp-quiz .enp-results-question__stats{font-size:1rem;line-height:1.4}#enp-quiz .enp-results-question__question{font-weight:400}@media (min-width:400px){#enp-quiz .enp-results-question__question{padding-right:7em;margin-bottom:0}}#enp-quiz .enp-results-question__stats{font-size:.9rem}@media (min-width:400px){#enp-quiz .enp-results-question__stats{position:absolute;bottom:1rem;right:1.2rem;text-align:right}}#enp-quiz .enp-results-question__stats,#enp-quiz .enp-results-questions__key{font-weight:300}#enp-quiz .enp-results-question__content{padding:2rem 1.2rem 1.2rem;border-radius:3px}#enp-quiz .enp-results-question__deep-stats{display:flex;justify-content:space-around;list-style:none;margin-left:0;text-align:center}#enp-quiz .enp-results-question__deep-stat__number{font-size:1.8rem;line-height:1;position:relative}#enp-quiz .enp-results-question__deep-stat__number--correct,#enp-quiz .enp-results-question__deep-stat__number--finishes{color:#4e9497}#enp-quiz .enp-results-question__deep-stat__number--incorrect{color:#c1893e}#enp-quiz .enp-results-question__deep-stat__number--correct:after,#enp-quiz .enp-results-question__deep-stat__number--finishes:after,#enp-quiz .enp-results-question__deep-stat__number--incorrect:after{content:"%";font-size:.9rem;position:absolute;top:.3rem;right:-1rem}#enp-quiz .enp-results-question__deep-stat__label{font-size:1rem;text-transform:uppercase;font-size:.8rem}#enp-quiz .enp-results-question__options{list-style:none;margin-left:0;margin-bottom:0}#enp-quiz .enp-results-question__option{padding:.8rem .8rem .8rem .4rem;border-top:1px solid #ddd}@media (min-width:400px){#enp-quiz .enp-results-question__option{display:flex;justify-content:space-between;flex-direction:row}}#enp-quiz .enp-results-question__option:first-of-type{margin-top:1.4rem}#enp-quiz .enp-results-question__option--correct{background:#fff}#enp-quiz .enp-results-question__option__text{flex-grow:100;margin-right:1rem}#enp-quiz .enp-results-question__option__text__helper{font-weight:300;font-size:1rem;text-transform:uppercase;margin-right:.4rem}@media (min-width:400px){#enp-quiz .enp-results-question__option__icon{margin-right:.3rem;min-width:1.6rem}}#enp-quiz .enp-results-question__option__icon--incorrect{fill:#c1893e;opacity:.5}#enp-quiz .enp-results-question__option__icon--correct{fill:#4e9497;opacity:1}#enp-quiz .enp-results-question__option__percentage--incorrect{color:#c1893e}#enp-quiz .enp-results-question__option__percentage--correct{color:#4e9497}#enp-quiz .enp-results-question__option__number-selected{font-weight:300}#enp-quiz .enp-slider-responses__title{font-size:1rem;text-transform:uppercase;font-weight:400;margin-top:1.6rem}#enp-quiz .enp-slider-responses__line-chart .ct-point{stroke-width:8px}#enp-quiz .enp-slider-responses__line-chart--high,#enp-quiz .enp-slider-responses__line-chart--low{stroke:#bf5700}#enp-quiz .enp-slider-responses__line-chart--correct{stroke:#60aaad}#enp-quiz .enp-slider-responses-table{width:100%}#enp-quiz .enp-slider-responses-table tr.enp-slider-responses-table__response--correct td,#enp-quiz .enp-slider-responses-table tr:nth-child(2n) td{background-color:#fff}#enp-quiz .enp-slider-responses-table__content{box-shadow:none;padding-top:1rem}#enp-quiz .enp-slider-responses-table--hide-zero .enp-slider-responses-table__frequency--zero{display:none}#enp-quiz .enp-slider-responses-table__response-frequency{display:flex;justify-content:space-between;align-items:center}#enp-quiz .enp-slider-responses-table__toggle-zero-frequency{background:#fff;width:100%;box-shadow:inset 1px 1px 0 #ccc,inset -1px -1px 0 #ccc;color:#1d1c25;font-family:Arial,monospace,helvetica,arial,sans-serif;font-size:.9rem;font-weight:400;line-height:1.5;text-transform:none;letter-spacing:0;text-align:left;border:none;border-radius:3px;min-height:3.065rem;padding:1rem 2rem 1rem 1rem;margin:1.6rem 0 0;position:relative;z-index:9;cursor:pointer;transition:all .2s cubic-bezier(0,0,.3,1);width:auto;padding:0 .6rem;margin:0}.enp-quiz-results #enp-quiz .enp-aside{border:none}.enp-quiz-results .enp-results-questions__title__quiz-title{clip:rect(1px,1px,1px,1px);position:absolute!important;left:-10000px;top:auto;width:1px;height:1px;overflow:hidden}#enp-quiz .enp-results--ab{display:block;margin-bottom:3rem}@media (min-width:1000px){#enp-quiz .enp-results--ab{display:flex;flex-wrap:wrap;align-content:flex-end;width:50%;padding:10px}}@media (min-width:1000px){#enp-quiz .enp-results--a{padding-right:1rem;border-right:1px solid #ddd}}@media (min-width:1000px){#enp-quiz .enp-results--b{padding-left:1rem}}#enp-quiz .enp-results-title--ab,#enp-quiz .enp-results__container--ab .enp-results-flow__container{min-width:100%}#enp-quiz .enp-results--loser .enp-results-flow__item{border:2px solid #bf5700}#enp-quiz .enp-results--loser .enp-results-flow__item--quiz-starts{background:#ffc696}#enp-quiz .enp-results--loser .enp-results-flow__item--quiz-finishes{background:#ffb06d}#enp-quiz .enp-results--loser .enp-results-questions__title,#enp-quiz .enp-results--loser th{color:#964400}#enp-quiz .enp-results--winner .enp-results-questions__title,#enp-quiz .enp-results--winner th{color:#4e9497}#enp-quiz .enp-results-title--a,#enp-quiz .enp-results-title--b{background:transparent}#enp-quiz .enp-ab-scores{max-width:740px;margin:0 auto}#enp-quiz .enp-ab-scores:after{content:"";display:table;clear:both}@media (min-width:700px){#enp-quiz .enp-ab-scores{max-width:1000px}}@media (min-width:1000px){#enp-quiz .enp-ab-scores{max-width:1440px}}#enp-quiz .enp-ab-scores th.enp-quiz-scores-table__label,#enp-quiz .enp-ab-scores th.enp-quiz-scores-table__score{padding-left:0;padding-right:0}#enp-quiz .enp-ab-scores__title{padding-left:50px;font-size:1rem;text-transform:uppercase}#enp-quiz .enp-quiz-score__line-chart .enp-test-loser .ct-line,#enp-quiz .enp-quiz-score__line-chart .enp-test-loser .ct-point{stroke:#bf5700}#enp-quiz .enp-quiz-scores{margin-top:0}#enp-quiz .enp-ab-scores .enp-quiz-scores-table,#enp-quiz .enp-question-results{margin-bottom:1.6rem}@media (min-width:1000px){#enp-quiz .enp-ab-scores .enp-quiz-scores-table,#enp-quiz .enp-question-results{float:left;width:48%;margin:0}#enp-quiz .enp-ab-scores .enp-quiz-scores-table:first-of-type,#enp-quiz .enp-question-results:first-of-type{margin-right:4%}}#enp-quiz .enp-question-results__container{max-width:740px;margin:0 auto}#enp-quiz .enp-question-results__container:after{content:"";display:table;clear:both}@media (min-width:700px){#enp-quiz .enp-question-results__container{max-width:1000px}}@media (min-width:1000px){#enp-quiz .enp-question-results__container{max-width:1440px}}#enp-quiz .enp-question-results--ab .enp-results-questions__section{background:#fff;border:none;padding:1.6rem 0;margin:1.6rem auto}#enp-quiz .enp-question-results--ab .enp-results-questions__container{padding:0}#enp-quiz .enp-ab-new-embed-code__section{max-width:740px;margin:0 auto;max-width:540px;padding-bottom:2rem;margin-bottom:2rem}#enp-quiz .enp-ab-new-embed-code__section:after{content:"";display:table;clear:both}#enp-quiz .enp-ab-new-embed-code__section .enp-ab-embed-code{padding:0;margin:0}#enp-quiz .enp-ab-embed-code__section{background:#faf9fb;border-bottom:1px solid #ddd;border-top:1px solid #ddd;padding-top:3rem;padding-bottom:3rem;margin-top:3rem;margin-bottom:3rem;padding-top:5rem;margin-top:5rem}#enp-quiz .enp-ab-embed-code{max-width:740px;margin:0 auto}#enp-quiz .enp-ab-embed-code:after{content:"";display:table;clear:both}#enp-quiz .enp-ab-embed-code__title{font-size:1rem;text-transform:uppercase}#enp-quiz .enp-embed-code__textarea{margin-bottom:0}#enp-quiz .enp-embed-code__instructions{font-size:1.1rem}#enp-quiz .enp-slider{margin-bottom:1.6rem}#enp-quiz .enp-slider-input__container{display:flex;align-items:center;justify-content:center;margin:1.6rem auto;position:relative}#enp-quiz .enp-slider-input__label{display:block;color:#343242;font-weight:400;font-size:.85rem;text-transform:uppercase}#enp-quiz .enp-slider-input__prefix,#enp-quiz .enp-slider-input__suffix{font-size:1rem}#enp-quiz .enp-slider-input__prefix{margin-right:.2rem;white-space:pre}#enp-quiz .enp-slider-input__suffix{margin-left:.2rem;white-space:pre}#enp-quiz .enp-slider-input__input{font-size:1rem;font-family:Arial,monospace,helvetica,arial,sans-serif;padding:.8rem .5rem;background:#fff;border:1px solid #aaa;border-radius:3px;width:20rem;max-width:100%;margin-bottom:1.2rem;margin-bottom:0;padding:.75rem;width:auto;transition:all .25s cubic-bezier(0,0,.3,1)}@media (min-width:700px){#enp-quiz .enp-slider-input__input{padding:.8rem;width:100%}}#enp-quiz .enp-slider-input__input--incorrect{color:#bf5700}#enp-quiz .enp-slider-input__input--correct{color:#4e9497}#enp-quiz .enp-slider-input__input--invalid-animation{box-shadow:0 0 2px 1px #c1893e}#enp-quiz .enp-slider_input__range-helper{position:absolute;bottom:-1.2rem;font-size:.8rem}#enp-quiz .enp-slider_input__range-helper--low{left:0}#enp-quiz .enp-slider_input__range-helper--high{right:0}#enp-quiz .enp-slider-input__range-helper__number{position:relative;color:#e8e4ed}#enp-quiz .ui-slider-range-show-correct__tooltip-container{position:relative}#enp-quiz .ui-slider-range-show-correct__tooltip{position:absolute;top:-.4rem;margin-left:-.55rem;height:1rem;width:1.1rem;height:1.1rem;border:2px solid #60aaad;background-color:#fff;border-radius:50%;z-index:9999}#enp-quiz .ui-slider-range-show-correct__tooltip--low{left:0}#enp-quiz .ui-slider-range-show-correct__tooltip--high{right:-.55rem}#enp-quiz .ui-slider-range-show-correct__tooltip__text{position:relative;color:#417d7f;top:-1.35rem;font-size:.825rem;min-width:100%;display:inline-block;text-align:center;text-shadow:0 1px 0 #fff}#enp-quiz .enp-slider{position:relative;text-align:left;background:#ddd}#enp-quiz .enp-slider .ui-helper-hidden{display:none}#enp-quiz .enp-slider .ui-helper-hidden-accessible{border:0;clip:rect(0 0 0 0);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px}#enp-quiz .enp-slider .ui-helper-reset{margin:0;padding:0;border:0;outline:0;line-height:1.3;text-decoration:none;font-size:100%;list-style:none}#enp-quiz .enp-slider .ui-helper-clearfix:after,#enp-quiz .enp-slider .ui-helper-clearfix:before{content:"";display:table;border-collapse:collapse}#enp-quiz .enp-slider .ui-helper-clearfix:after{clear:both}#enp-quiz .enp-slider .ui-helper-clearfix{min-height:0}#enp-quiz .enp-slider .ui-helper-zfix{width:100%;height:100%;top:0;left:0;position:absolute;opacity:0;filter:alpha(opacity=0)}#enp-quiz .enp-slider .ui-front{z-index:100}#enp-quiz .enp-slider .ui-state-disabled{cursor:default!important}#enp-quiz .enp-slider .ui-icon{display:block;text-indent:-99999px;overflow:hidden;background-repeat:no-repeat}#enp-quiz .enp-slider .ui-widget-overlay{position:fixed;top:0;left:0;width:100%;height:100%}#enp-quiz .enp-slider .ui-slider-handle{background:#fff;border-radius:50%;border:1px solid #aaa;position:absolute;z-index:2;width:1.2rem;height:1.2rem;top:-.4rem;margin-left:-.6rem;cursor:default;touch-action:none;transition:opacity .2s cubic-bezier(0,0,.3,1),height .18s cubic-bezier(0,0,.3,1),width .18s cubic-bezier(0,0,.3,1),transform .18s cubic-bezier(0,0,.3,1)}#enp-quiz .enp-slider .ui-slider-handle:focus{outline:none;box-shadow:0 0 3px 1px #4d90fe}#enp-quiz .enp-slider .ui-slider-handle--correct,#enp-quiz .enp-slider .ui-slider-handle--incorrect{width:1.1rem;height:1.1rem;top:-.4rem;margin-left:-.55rem}#enp-quiz .enp-slider .ui-slider-handle--incorrect{z-index:1;border:2px solid #bf5700}#enp-quiz .enp-slider .ui-slider-handle--correct{border:2px solid #60aaad;z-index:99999}#enp-quiz .enp-slider .ui-slider-range{position:absolute;z-index:1;font-size:.7rem;display:block;border:0;background-position:0 0;top:0;height:100%}#enp-quiz .enp-slider .ui-slider-range-show-correct{background:#60aaad;z-index:9}#enp-quiz .enp-slider .ui-slider-range-min{left:0;background:#60aaad}#enp-quiz .enp-slider .ui-slider-range-max{right:0}#enp-quiz .enp-slider.ui-state-disabled .ui-slider-handle,#enp-quiz .enp-slider.ui-state-disabled .ui-slider-range{filter:inherit}#enp-quiz .ui-slider-horizontal{height:.3rem}#enp-quiz .enp-question__answered .enp-slider{background:#bbb}#enp-quiz .enp-question__answered .ui-slider-range-min{background:#fff} +html{font-size:16px!important}html #enp-quiz{box-sizing:border-box}body #enp-quiz{background:#fff;overflow:hidden}#enp-quiz *,#enp-quiz :after,#enp-quiz :before{box-sizing:inherit}#enp-quiz ol,#enp-quiz ul{margin:0 0 1.6rem 1.25rem;padding:0}#enp-quiz textarea{margin-bottom:1rem}#enp-quiz button,#enp-quiz button:active,#enp-quiz button:focus,#enp-quiz button:hover,#enp-quiz iframe,#enp-quiz input[type=button],#enp-quiz input[type=button]:active,#enp-quiz input[type=button]:focus,#enp-quiz input[type=button]:hover,#enp-quiz input[type=reset],#enp-quiz input[type=reset]:active,#enp-quiz input[type=reset]:focus,#enp-quiz input[type=reset]:hover,#enp-quiz input[type=submit],#enp-quiz input[type=submit]:active,#enp-quiz input[type=submit]:focus,#enp-quiz input[type=submit]:hover{border:none}#enp-quiz .enp-screen-reader-text{clip:rect(1px,1px,1px,1px);position:absolute!important;left:-10000px;top:auto;width:1px;height:1px;overflow:hidden}#enp-quiz .enp-screen-reader-text:active,#enp-quiz .enp-screen-reader-text:focus,#enp-quiz .enp-screen-reader-text:hover{background-color:#f1f1f1;border-radius:3px;box-shadow:0 0 2px 2px rgba(0,0,0,.6);clip:auto!important;color:#21759b;display:block;font-size:14px;font-weight:700;height:auto;left:5px;line-height:normal;padding:15px 23px 14px;text-decoration:none;top:5px;width:auto;z-index:100000}#enp-quiz .enp-accordion-header{background:#fff;width:100%;box-shadow:inset 1px 1px 0 #ccc,inset -1px -1px 0 #ccc;color:#1d1c25;font-family:Arial,monospace,helvetica,arial,sans-serif;font-size:.9rem;font-weight:400;line-height:1.5;text-transform:none;letter-spacing:0;text-align:left;border:none;border-radius:3px;min-height:3.065rem;padding:1rem 2rem 1rem 1rem;margin:1.6rem 0 0;position:relative;z-index:9;cursor:pointer;transition:all .2s cubic-bezier(0,0,.3,1)}#enp-quiz .enp-accordion-header:first-of-type{margin-top:0}#enp-quiz .enp-accordion-header .enp-accordion-header__icon{position:absolute;fill:#e8e4ed;right:.75rem;bottom:.75rem;transition:all .35s cubic-bezier(0,0,.3,1)}#enp-quiz .enp-accordion-header--open .enp-accordion-header__icon{transform:rotateX(180deg) translateY(2px)}#enp-quiz .enp-accordion-content{background:#fff;width:100%;box-shadow:inset 1px -1px 0 #ccc,inset -1px -1px 0 #ccc;display:block;position:relative;height:auto;overflow:visible;margin-bottom:1.6rem}#enp-quiz .enp-accordion-content--closed{margin-top:0;padding-top:0;animation:d .25s cubic-bezier(0,0,.3,1) forwards;display:none}#enp-quiz .enp-accordion-content--open{padding-top:1.6rem;margin-bottom:2rem;animation:b .45s cubic-bezier(0,0,.3,1) forwards}#enp-quiz .enp-quiz-message{max-width:740px;margin:0 auto;background:#fff;border:1px solid #eee;border-bottom:1px solid #ccc;padding:1rem;margin-bottom:1.6rem;position:fixed;bottom:0;left:0}#enp-quiz .enp-quiz-message:after{content:"";display:table;clear:both}#enp-quiz .enp-quiz-message__title{font-size:1rem;text-transform:uppercase}#enp-quiz .enp-message__list{list-style:none;margin-left:0;font-size:1.1rem;margin-bottom:0}#enp-quiz .enp-quiz-message--error{border-left:6px solid #bf5700;color:#bf5700}#enp-quiz .enp-quiz-message__title--error{color:#964400}#enp-quiz .enp-quiz-message--success{border-left:6px solid #60aaad;color:#4e9497}#enp-quiz .enp-quiz-message__title--success{color:#4e9497}#enp-quiz .enp-quiz-message--note{border-left:6px solid #cca562}#enp-quiz .enp-quiz-message__title--note{color:#333f48}#enp-quiz .enp-quiz-message__close{border:none;background:none;box-shadow:none;padding:0;margin:0;position:absolute;top:5px;right:5px}#enp-quiz .enp-quiz-message--ajax{margin-bottom:.6rem;animation:a .3s}#enp-quiz .enp-quiz-message-ajax-container{z-index:9999;position:fixed;bottom:10px}#enp-quiz .enp-quiz-message--saving__spinner{margin-left:-10px}#enp-quiz .enp-quiz-message--saving__text{font-size:1rem}#enp-quiz input.limited-chars,#enp-quiz textarea.limited-chars{margin-bottom:.2rem}#enp-quiz .limited-chars__container{color:#fdfcfd;font-size:.8rem;display:block;text-align:right;margin-bottom:1.2rem}#enp-quiz .limited-chars__counter{color:#e8e4ed}#enp-quiz .limited-chars__container--error,#enp-quiz .limited-chars__container--error .limited-chars__counter{color:#964400}#enp-quiz input.has-error,#enp-quiz textarea.has-error{border:1px solid #bf5700}#enp-quiz input.has-error:focus,#enp-quiz textarea.has-error:focus{outline-color:#bf5700}#enp-quiz .enp-tooltip{position:relative}#enp-quiz .enp-tooltip__activator:focus+.enp-tooltip__description,#enp-quiz .enp-tooltip__activator:focus>.enp-tooltip__description{display:block}#enp-quiz .enp-tooltip__description{display:none;position:absolute;left:103%;margin-bottom:2rem;border-radius:3px;background:#faf9fb;font-size:.9rem;padding:.9rem;max-width:200px}.enp-sticky{position:relative;left:0;right:0;top:0;z-index:999}.enp-sticky.enp-sticky--fixed{position:fixed}.enp-breadcrumb-link{font-size:.85rem}.enp-breadcrumb-link__icon{position:relative;top:.45rem;left:.4rem}body #enp-quiz{color:#1d1c25;font-family:Arial,monospace,helvetica,arial,sans-serif;font-size:1em;line-height:1.6;font-weight:400}@media (min-width:700px){body #enp-quiz{font-size:1.3em}}#enp-quiz h1,#enp-quiz h2,#enp-quiz h3,#enp-quiz h4,#enp-quiz h5,#enp-quiz h6{font-family:Arial,monospace,helvetica,arial,sans-serif;color:#5d5e5f;clear:both;margin:0 0 .2rem;font-weight:700;line-height:1.2em}#enp-quiz h1{font-size:2em}#enp-quiz h2{font-size:1.75em}#enp-quiz h3{font-size:1.475em}#enp-quiz h4{font-size:1.3em}#enp-quiz h5{font-size:1.125em}#enp-quiz h6{font-size:1em}#enp-quiz p+h1,#enp-quiz p+h2,#enp-quiz p+h3,#enp-quiz p+h4,#enp-quiz p+h5,#enp-quiz p+h6,#enp-quiz ul+h1,#enp-quiz ul+h2,#enp-quiz ul+h3,#enp-quiz ul+h4,#enp-quiz ul+h5,#enp-quiz ul+h6{margin-top:1.8em}#enp-quiz p{font-size:.85em;margin-bottom:1.125em;font-weight:300}#enp-quiz ol,#enp-quiz ul{margin:0 0 1.6em 1.25em}#enp-quiz ul{list-style:disc}#enp-quiz ol{list-style:decimal}#enp-quiz li>ol,#enp-quiz li>ul{margin-bottom:0;margin-left:1.6em}#enp-quiz b,#enp-quiz strong{font-weight:700}#enp-quiz cite,#enp-quiz dfn,#enp-quiz em{font-family:georgia,times,serif;font-style:italic}#enp-quiz pre{background:#eee;font-family:Courier\ 10 Pitch,Courier,monospace;font-size:.95em;line-height:1.6;margin-bottom:1.6em;padding:1.6em;overflow:auto;max-width:100%}#enp-quiz .code,#enp-quiz code,#enp-quiz kbd,#enp-quiz tt,#enp-quiz var{font:.7em Monaco,Consolas,Andale Mono,DejaVu Sans Mono,monospace}#enp-quiz table{border:none}#enp-quiz table th{font-size:.8rem;text-transform:uppercase;border:none;border-bottom:1px solid #ddd}#enp-quiz table td,#enp-quiz table th{font-family:Arial,monospace,helvetica,arial,sans-serif}#enp-quiz table td{font-size:1rem;border:none;border-bottom:1px solid #eee}#enp-quiz table tr:nth-child(2n) td{background:#fdfcfd}#enp-quiz table tr:last-child td{border-bottom:none}#enp-quiz figure{margin:0}#enp-quiz img{height:auto;max-width:100%}#enp-quiz a{color:#bf5700;text-decoration:none;transition:color .2s;touch-action:manipulation}#enp-quiz a .enp-icon{fill:#bf5700}#enp-quiz a:active,#enp-quiz a:focus,#enp-quiz a:hover{color:#964400}#enp-quiz a:active .enp-icon,#enp-quiz a:focus .enp-icon,#enp-quiz a:hover .enp-icon{fill:#964400}#enp-quiz button:focus{outline-color:#4d90fe;outline-offset:-2px;outline-style:auto;outline-width:5px}#enp-quiz .enp-btn{text-align:center;border:none;border-radius:3px;padding:.85em 1.4em .75em;font-size:15px;font-weight:400;letter-spacing:.05em;color:#fff;box-shadow:inset 0 -2px 0 rgba(0,0,0,.2);background:#bf5700;cursor:pointer;text-transform:uppercase;transition:all .2s;line-height:1.6}#enp-quiz .enp-btn:focus,#enp-quiz .enp-btn:hover{color:#fff;box-shadow:none;background:#964400}#enp-quiz .enp-btn:active{color:#fff;box-shadow:inset 0 2px 0 rgba(0,0,0,.1);background:#1eeeff}#enp-quiz .enp-btn:focus{outline-color:#4d90fe;outline-offset:-2px;outline-style:auto;outline-width:5px}#enp-quiz .enp-btn:disabled,#enp-quiz .enp-btn:disabled:focus,#enp-quiz .enp-btn:disabled:hover{background:#bf5700;cursor:default;opacity:.5}#enp-quiz .enp-btn--add{text-align:center;border:none;border-radius:3px;padding:.85em 1.4em .75em;font-size:15px;font-weight:400;letter-spacing:.05em;color:#fff;box-shadow:inset 0 -2px 0 rgba(0,0,0,.2);background:#bf5700;cursor:pointer;text-transform:uppercase;transition:all .2s;line-height:1.6;border:1px dashed #b5a6c4;background:none;color:#545454;box-shadow:none;width:100%}#enp-quiz .enp-btn--add:focus,#enp-quiz .enp-btn--add:hover{color:#fff;box-shadow:none;background:#964400}#enp-quiz .enp-btn--add:active{color:#fff;box-shadow:inset 0 2px 0 rgba(0,0,0,.1);background:#1eeeff}#enp-quiz .enp-btn--add:focus{outline-color:#4d90fe;outline-offset:-2px;outline-style:auto;outline-width:5px}#enp-quiz .enp-btn--add:disabled,#enp-quiz .enp-btn--add:disabled:focus,#enp-quiz .enp-btn--add:disabled:hover{background:#bf5700;cursor:default;opacity:.5}#enp-quiz .enp-btn--add:focus,#enp-quiz .enp-btn--add:hover{border:1px dashed #69547e;color:#b5a6c4;background:hsla(0,0%,100%,.9)}#enp-quiz .enp-btn--disabled{opacity:.65;cursor:default}#enp-quiz .enp-btn--enabled{animation:f .6s}#enp-quiz .enp-icon{width:24px;height:24px;transition:all .2s}#enp-quiz .enp-page-title{font-size:1.6rem}@keyframes a{0%{opacity:0;transform:translate3d(0,100px,0)}to{opacity:1;transform:translateZ(0)}}@keyframes b{0%{opacity:0;height:auto;transform:translate3d(0,-20px,0)}to{opacity:1;height:auto;transform:translateZ(0)}}@keyframes c{0%{opacity:0;height:auto;transform:translate3d(0,-20px,0)}to{opacity:.8;height:auto;transform:translateZ(0)}}@keyframes d{0%{overflow:hidden;height:100px;opacity:1;transform:translateZ(0)}to{height:0;opacity:0;transform:translate3d(0,-20px,0)}}@keyframes e{0%{opacity:1;transform:translateZ(0)}to{padding:0;margin:0;opacity:0;height:0;z-index:-1;transform:translate3d(-200px,0,0)}}@keyframes f{0%{opacity:.8;transform:scaleX(1);box-shadow:0 0 0 rgba(0,0,0,.3)}40%{opacity:1}70%{opacity:1;transform:scale3d(1.1,1.1,1);box-shadow:0 0 8px rgba(0,0,0,.4)}to{opacity:1;transform:scaleX(1);box-shadow:0 0 0 rgba(0,0,0,.3),inset 0 2px 0 rgba(0,0,0,.2)}}@keyframes g{0%{opacity:0}to{opacity:1}}@keyframes h{0%{transform:translate3d(0,-200px,0)}to{transform:translateZ(0)}}.spinner{margin:0 auto;width:70px;text-align:center}.spinner>div{width:18px;height:18px;background-color:#333;border-radius:100%;display:inline-block;animation:i 1.4s infinite ease-in-out both}.spinner .bounce1{animation-delay:-.32s}.spinner .bounce2{animation-delay:-.16s}@keyframes i{0%,80%,to{transform:scale(0)}40%{transform:scale(1)}}#enp-quiz{transition:background .25s cubic-bezier(0,0,.3,1)}#enp-quiz .enp-aside{padding:1.6rem;margin-bottom:1.6rem;background:#fff;border-radius:3px;border:1px solid #eee;border-bottom-color:#ccc;max-width:740px;margin:0 auto;font-size:1.2rem}@media (min-width:700px){#enp-quiz .enp-aside{margin-bottom:2.6rem;padding:1.6rem 2rem}}#enp-quiz .enp-aside:after{content:"";display:table;clear:both}#enp-quiz .enp-aside__title{font-size:1rem;text-transform:uppercase;font-weight:600}#enp-quiz .enp-page-title{border-bottom:2px solid #00a9b7}#enp-quiz fieldset{border:none;margin:0;padding:0}#enp-quiz .enp-label,#enp-quiz .enp-legend{display:block;color:#343242;font-weight:400;font-size:.85rem;text-transform:uppercase}#enp-quiz .enp-legend{padding-top:1.6rem;margin-bottom:.2rem;border:none}#enp-quiz .enp-input{font-size:1rem;font-family:Arial,monospace,helvetica,arial,sans-serif;padding:.8rem .5rem;background:#fff;border:1px solid #aaa;border-radius:3px;width:20rem;max-width:100%;margin-bottom:1.2rem}@media (min-width:700px){#enp-quiz .enp-input{padding:.8rem;width:100%}}#enp-quiz .enp-input.enp-input--has-description{margin-bottom:.2rem}#enp-quiz .enp-input-description,#enp-quiz .enp-textarea-description{margin-bottom:1rem;font-size:.85rem}#enp-quiz .enp-input-description--before,#enp-quiz .enp-textarea-description--before{margin-bottom:0}#enp-quiz .enp-input::-webkit-input-placeholder,#enp-quiz .enp-textarea::-webkit-input-placeholder{font-family:Arial,monospace,helvetica,arial,sans-serif;font-weight:300;color:#7a7697}#enp-quiz .enp-input:-ms-input-placeholder,#enp-quiz .enp-input::-ms-input-placeholder,#enp-quiz .enp-textarea:-ms-input-placeholder,#enp-quiz .enp-textarea::-ms-input-placeholder{font-family:Arial,monospace,helvetica,arial,sans-serif;font-weight:300;color:#7a7697}#enp-quiz .enp-input::placeholder,#enp-quiz .enp-textarea::placeholder{font-family:Arial,monospace,helvetica,arial,sans-serif;font-weight:300;color:#7a7697}#enp-quiz .enp-textarea{font-size:1rem;font-family:Arial,monospace,helvetica,arial,sans-serif;padding:.8rem .5rem;background:#fff;border:1px solid #aaa;border-radius:3px;width:20rem;max-width:100%;margin-bottom:1.2rem;line-height:1.5}@media (min-width:700px){#enp-quiz .enp-textarea{padding:.8rem;width:100%}}#enp-quiz .enp-textarea:focus{outline-color:#4d90fe;outline-offset:-2px;outline-style:auto;outline-width:5px}#enp-quiz .enp-textarea.enp-textarea--has-description{margin-bottom:.2rem}#enp-quiz .enp-textarea.enp-textarea--has-description--before{margin-bottom:1.2rem}#enp-quiz .enp-embed-code{font-size:1rem;font-family:Arial,monospace,helvetica,arial,sans-serif;padding:.8rem .5rem;background:#fff;border:1px solid #aaa;border-radius:3px;width:20rem;max-width:100%;margin-bottom:1.2rem;line-height:1.5;padding:1.6rem;font-size:.7rem;font-family:Monaco,Consolas,Andale Mono,DejaVu Sans Mono,monospace}@media (min-width:700px){#enp-quiz .enp-embed-code{padding:.8rem;width:100%}}#enp-quiz .enp-embed-code:focus{outline-color:#4d90fe;outline-offset:-2px;outline-style:auto;outline-width:5px}#enp-quiz .enp-preview-page-container,#enp-quiz .enp-publish-page-container,#enp-quiz .enp-quiz-form-container{display:grid;grid-column:2/-1;gap:1rem;width:100%;justify-items:center}#enp-quiz .enp-quiz-form{display:grid;padding-left:0;padding-right:0}@media (min-width:700px){#enp-quiz .enp-quiz-form{width:100%;max-width:40rem}}#enp-quiz .enp-preview-page-flex-container{display:grid;gap:1rem}@media (min-width:700px){#enp-quiz .enp-preview-page-flex-container{grid-template-columns:1fr 3fr;padding:0 2rem}}#enp-quiz .enp-quiz-title__label{display:block;color:#343242;font-weight:400;font-size:.85rem;text-transform:uppercase;font-weight:500}#enp-quiz .enp-quiz-title__textarea{font-size:1rem;font-family:Arial,monospace,helvetica,arial,sans-serif;padding:.8rem .5rem;background:#fff;border:1px solid #aaa;border-radius:3px;width:20rem;max-width:100%;margin-bottom:1.2rem;font-weight:700;font-size:1.6rem;margin-bottom:1rem}@media (min-width:700px){#enp-quiz .enp-quiz-title__textarea{padding:.8rem;width:100%}}#enp-quiz .enp-quiz-title__textarea::-webkit-input-placeholder{font-weight:700}#enp-quiz .enp-quiz-title__textarea:-ms-input-placeholder,#enp-quiz .enp-quiz-title__textarea::-ms-input-placeholder{font-weight:700}#enp-quiz .enp-quiz-title__textarea::placeholder{font-weight:700}#enp-quiz textarea{color:#000}#enp-quiz .enp-accordion-container{margin-bottom:1.6rem;position:relative}#enp-quiz .enp-question-content{background:#fff;width:100%;padding-top:0;position:relative}#enp-quiz .enp-question-inner{padding:1.6rem 1.6rem 1rem}@media (min-width:700px){#enp-quiz .enp-question-inner{padding-right:2.8rem;padding-left:2.9rem}}#enp-quiz .enp-question-title__label{display:block;color:#343242;font-weight:400;font-size:.85rem;text-transform:uppercase;font-weight:500}#enp-quiz .enp-question-title__textarea{font-family:Arial,monospace,helvetica,arial,sans-serif;padding:.8rem .5rem;background:#fff;border:1px solid #aaa;border-radius:3px;width:20rem;max-width:100%;margin-bottom:1.2rem;padding:1rem 1.2rem;font-size:1rem}@media (min-width:700px){#enp-quiz .enp-question-title__textarea{padding:.8rem;width:100%}}#enp-quiz .enp-question-image-upload{text-align:center;border:none;border-radius:3px;padding:.85em 1.4em .75em;font-size:15px;font-weight:400;letter-spacing:.05em;color:#fff;box-shadow:inset 0 -2px 0 rgba(0,0,0,.2);background:#bf5700;cursor:pointer;line-height:1.6;border:1px dashed #b5a6c4;background:none;color:#545454;box-shadow:none;border:2px dashed #b5a6c4;color:#e8e4ed;transition:all .2s;background:#faf9fb;font-size:1rem;text-transform:uppercase;position:relative;margin-bottom:2rem;transform:translateZ(0);transition:all .3s cubic-bezier(0,0,.3,1)}#enp-quiz .enp-question-image-upload:focus,#enp-quiz .enp-question-image-upload:hover{color:#fff;box-shadow:none;background:#964400}#enp-quiz .enp-question-image-upload:active{color:#fff;box-shadow:inset 0 2px 0 rgba(0,0,0,.1);background:#1eeeff}#enp-quiz .enp-question-image-upload:focus{outline-color:#4d90fe;outline-offset:-2px;outline-style:auto;outline-width:5px}#enp-quiz .enp-question-image-upload:disabled,#enp-quiz .enp-question-image-upload:disabled:focus,#enp-quiz .enp-question-image-upload:disabled:hover{background:#bf5700;cursor:default;opacity:.5}#enp-quiz .enp-question-image-upload:focus,#enp-quiz .enp-question-image-upload:hover{border:1px dashed #69547e;background:hsla(0,0%,100%,.9);color:#b5a6c4;border:2px dashed #999}#enp-quiz .enp-question-image-upload .enp-question-image-upload__icon--photo{width:2.8rem;height:2.8rem;opacity:0;position:absolute;top:0;left:0;right:0;margin:0 auto;transform:translateZ(0);z-index:-1;transition:opacity .2s,transform .3s cubic-bezier(0,0,.3,1)}#enp-quiz .enp-question-image-upload .enp-question-image-upload__icon--add{width:1rem;height:1rem;border-radius:50%;fill:#fff;padding:.02rem;background:#e8e4ed;fill:#faf9fb;margin-right:5px;position:relative;top:.2rem}#enp-quiz .enp-question-image-upload:active,#enp-quiz .enp-question-image-upload:focus,#enp-quiz .enp-question-image-upload:hover{padding-top:5rem;padding-bottom:2rem}#enp-quiz .enp-question-image-upload:active .enp-question-image-upload__icon--photo,#enp-quiz .enp-question-image-upload:focus .enp-question-image-upload__icon--photo,#enp-quiz .enp-question-image-upload:hover .enp-question-image-upload__icon--photo{opacity:1;z-index:1;transform:translate3d(0,1.75rem,0)}#enp-quiz .enp-question-image-upload:active .enp-question-image-upload__icon--add,#enp-quiz .enp-question-image-upload:focus .enp-question-image-upload__icon--add,#enp-quiz .enp-question-image-upload:hover .enp-question-image-upload__icon--add{fill:#fff;background:#b5a6c4}#enp-quiz .enp-question-image__container{position:relative;margin-bottom:1rem}#enp-quiz .enp-question-image{margin-bottom:1.2rem}#enp-quiz .enp-question-type__legend{display:block;color:#343242;font-weight:400;font-size:.85rem;text-transform:uppercase;padding-top:1.6rem;margin-bottom:.2rem;border:none}#enp-quiz .enp-question-type__input{clip:rect(1px,1px,1px,1px);position:absolute!important;left:-10000px;top:auto;width:1px;height:1px;overflow:hidden}#enp-quiz .enp-question-type__label{text-transform:capitalize;display:inline-block;padding:.2rem .5rem;border-radius:3px;cursor:pointer}#enp-quiz .enp-question-type__input:checked+.enp-question-type__label{background:#60aaad;color:#fff;text-shadow:0 0 1px rgba(0,0,0,.7)}#enp-quiz .enp-question-type__input:focus+.enp-question-type__label{z-index:8;outline-color:#4d90fe;outline-offset:-2px;outline-style:auto;outline-width:5px}#enp-quiz .enp-question-type__label{position:relative;z-index:9}#enp-quiz .enp-mc-options,#enp-quiz .enp-slider-options{margin-top:0;display:none;animation:d .25s cubic-bezier(0,0,.3,1) forwards;animation-delay:0s,.05s}#enp-quiz .enp-question-type__input--mc:checked~.enp-mc-options,#enp-quiz .enp-question-type__input--slider:checked~.enp-slider-options{visibility:visible;display:block;animation:g .45s cubic-bezier(0,0,.3,1) forwards}#enp-quiz .enp-mc-options__list{list-style:none;margin-left:0}#enp-quiz .enp-mc-option{position:relative;padding-left:6px}@media (min-width:700px){#enp-quiz .enp-mc-option{padding-left:0}}#enp-quiz .enp-mc-options__legend{display:block;color:#343242;font-weight:400;font-size:.85rem;text-transform:uppercase;font-weight:500}#enp-quiz .enp-mc-option__add,#enp-quiz .enp-mc-option__button--correct,#enp-quiz .enp-mc-option__button--delete{display:none}#enp-quiz .enp-question-type__input--mc:checked~.enp-mc-options .enp-mc-option__add,#enp-quiz .enp-question-type__input--mc:checked~.enp-mc-options .enp-mc-option__button--correct,#enp-quiz .enp-question-type__input--mc:checked~.enp-mc-options .enp-mc-option__button--delete{display:block}#enp-quiz .enp-button__question-image-delete,#enp-quiz .enp-mc-option__button--delete{border:none;background:none;box-shadow:none;padding:0;margin:0;position:absolute;top:9px;right:-24px;fill:#bbb;cursor:pointer}@media (min-width:700px){#enp-quiz .enp-button__question-image-delete,#enp-quiz .enp-mc-option__button--delete{right:-30px}}#enp-quiz .enp-button__question-image-delete:focus,#enp-quiz .enp-button__question-image-delete:hover,#enp-quiz .enp-mc-option__button--delete:focus,#enp-quiz .enp-mc-option__button--delete:hover{fill:#bf5700}#enp-quiz .enp-mc-option__button--correct{border:none;background:none;box-shadow:none;padding:0;margin:0;position:absolute;top:8px;left:-24px}@media (min-width:700px){#enp-quiz .enp-mc-option__button--correct{left:-35px}}#enp-quiz .enp-mc-option__button--correct .enp-mc-option__icon--correct{border-radius:50%;padding:.05em;width:28px;height:28px;fill:#fff;background:#fff;cursor:pointer;border:2px solid #c1893e;transition:all .2s}@media (min-width:700px){#enp-quiz .enp-mc-option__button--correct .enp-mc-option__icon--correct{padding:.15em}}#enp-quiz .enp-mc-option__button--correct:focus .enp-mc-option__icon--correct,#enp-quiz .enp-mc-option__button--correct:hover .enp-mc-option__icon--correct{background:#fff;border-color:#60aaad;fill:#60aaad}#enp-quiz .enp-mc-option__button--correct:disabled{opacity:1}#enp-quiz .enp-mc-option__button--correct:disabled .enp-mc-option__icon--correct{cursor:default;fill:#fff;border:2px solid transparent}#enp-quiz .enp-mc-option--correct .enp-mc-option__input{box-shadow:inset 0 0 3px #60aaad;border:1px solid #60aaad}#enp-quiz .enp-mc-option--correct .enp-mc-option__button--correct:focus .enp-mc-option__icon--correct,#enp-quiz .enp-mc-option--correct .enp-mc-option__button--correct:hover .enp-mc-option__icon--correct,#enp-quiz .enp-mc-option--correct .enp-mc-option__icon--correct{fill:#fff;border-color:#60aaad;background:#60aaad}#enp-quiz .enp-mc-option__add{text-align:center;border:none;border-radius:3px;padding:.85em 1.4em .75em;font-size:15px;font-weight:400;letter-spacing:.05em;color:#fff;box-shadow:inset 0 -2px 0 rgba(0,0,0,.2);background:#bf5700;cursor:pointer;line-height:1.6;border:1px dashed #b5a6c4;background:none;color:#545454;box-shadow:none;border:2px dashed #b5a6c4;color:#e8e4ed;transition:all .2s;background:#faf9fb;font-size:1rem;text-transform:uppercase;text-align:left;padding:.7rem .75rem .8rem}#enp-quiz .enp-mc-option__add:focus,#enp-quiz .enp-mc-option__add:hover{color:#fff;box-shadow:none;background:#964400}#enp-quiz .enp-mc-option__add:active{color:#fff;box-shadow:inset 0 2px 0 rgba(0,0,0,.1);background:#1eeeff}#enp-quiz .enp-mc-option__add:focus{outline-color:#4d90fe;outline-offset:-2px;outline-style:auto;outline-width:5px}#enp-quiz .enp-mc-option__add:disabled,#enp-quiz .enp-mc-option__add:disabled:focus,#enp-quiz .enp-mc-option__add:disabled:hover{background:#bf5700;cursor:default;opacity:.5}#enp-quiz .enp-mc-option__add:focus,#enp-quiz .enp-mc-option__add:hover{border:1px dashed #69547e;background:hsla(0,0%,100%,.9);color:#b5a6c4;border:2px dashed #999}#enp-quiz .enp-mc-option__add .enp-mc-option__add__icon{width:1rem;height:1rem;border-radius:50%;fill:#fff;padding:.02rem;margin-right:5px;background:#e8e4ed;fill:#faf9fb;position:relative;top:.2rem}#enp-quiz .enp-mc-option__add:hover .enp-mc-option__add__icon{fill:#fff;background:#b5a6c4}#enp-quiz .enp-slider-options .enp-input{max-width:11.8rem}#enp-quiz .enp-slider-correct__container .enp-input,#enp-quiz .enp-slider-range__container .enp-input{max-width:8.8rem}@media (min-width:400px){#enp-quiz .enp-slider-correct__container .enp-input,#enp-quiz .enp-slider-range__container .enp-input{max-width:11.8rem}}#enp-quiz .enp-slider-preview{border:1px solid #ddd;margin-top:.2rem;margin-bottom:1.6rem;padding:1.6rem 1.6rem .6rem;position:relative}#enp-quiz .enp-slider-preview .enp-label--slider-preview{position:absolute;width:100%;top:.2rem;left:.4rem;font-size:.75rem;text-transform:uppercase}#enp-quiz .enp-slider-correct__container,#enp-quiz .enp-slider-range__container{display:flex;justify-content:space-between;align-items:center}#enp-quiz .enp-slider-correct__helper,#enp-quiz .enp-slider-range__helper{color:#777;font-size:.85rem;background:#fff;padding:0 .3rem;position:relative}#enp-quiz .enp-slider-correct__helper:before,#enp-quiz .enp-slider-range__helper:before{content:"";position:absolute;top:44%;height:4px;background:#ddd;width:120px;left:-60px;z-index:-1;transition:width .7s cubic-bezier(0,0,.3,1),background 1.6s cubic-bezier(0,0,.3,1)}#enp-quiz .enp-slider-options{margin-bottom:2rem}#enp-quiz .enp-slider-options .enp-accordion-header{text-transform:uppercase;font-size:.85rem;padding:.675rem}#enp-quiz .enp-slider-options .enp-slider-advanced-options__content{border:none;box-shadow:none;padding-top:1rem;padding-bottom:0;margin-bottom:0}#enp-quiz .enp-slider-correct-high__container{position:relative}#enp-quiz .enp-slider-correct-high__input-container--hidden{display:none}#enp-quiz .enp-slider-correct__helper--hidden:before{width:0;background:#60aaad}#enp-quiz .enp-slider-correct-answer-range--add-range{text-align:center;border:none;border-radius:3px;padding:.85em 1.4em .75em;font-size:15px;font-weight:400;letter-spacing:.05em;color:#fff;box-shadow:inset 0 -2px 0 rgba(0,0,0,.2);background:#bf5700;cursor:pointer;text-transform:uppercase;line-height:1.6;border:1px dashed #b5a6c4;background:none;color:#545454;box-shadow:none;border:2px dashed #b5a6c4;color:#e8e4ed;transition:all .2s;background:#faf9fb;margin-left:.8rem;font-size:.7rem}#enp-quiz .enp-slider-correct-answer-range--add-range:focus,#enp-quiz .enp-slider-correct-answer-range--add-range:hover{color:#fff;box-shadow:none;background:#964400}#enp-quiz .enp-slider-correct-answer-range--add-range:active{color:#fff;box-shadow:inset 0 2px 0 rgba(0,0,0,.1);background:#1eeeff}#enp-quiz .enp-slider-correct-answer-range--add-range:focus{outline-color:#4d90fe;outline-offset:-2px;outline-style:auto;outline-width:5px}#enp-quiz .enp-slider-correct-answer-range--add-range:disabled,#enp-quiz .enp-slider-correct-answer-range--add-range:disabled:focus,#enp-quiz .enp-slider-correct-answer-range--add-range:disabled:hover{background:#bf5700;cursor:default;opacity:.5}#enp-quiz .enp-slider-correct-answer-range--add-range:focus,#enp-quiz .enp-slider-correct-answer-range--add-range:hover{border:1px dashed #69547e;background:hsla(0,0%,100%,.9);color:#b5a6c4;border:2px dashed #999}@media (min-width:400px){#enp-quiz .enp-slider-correct-answer-range--add-range{font-size:.8rem;padding:.7rem}}@media (min-width:700px){#enp-quiz .enp-slider-correct-answer-range--add-range{padding:.7rem 1.2rem;min-width:11.4rem}}#enp-quiz .enp-slider-correct-answer-range--add-range .enp-slider-correct-answer-range__icon{width:1rem;height:1rem;border-radius:50%;fill:#fff;padding:.02rem;margin-right:5px;background:#e8e4ed;fill:#faf9fb;position:relative;left:-.2rem}#enp-quiz .enp-slider-correct-answer-range--add-range:hover .enp-slider-correct-answer-range__icon{fill:#fff;background:#b5a6c4}#enp-quiz .enp-slider-correct-answer-range--remove-range{position:absolute;right:-1.6rem;bottom:1.6rem;background:none;border:none;box-shadow:none;padding:0 .1rem}#enp-quiz .enp-slider-correct-answer-range--remove-range .enp-slider-correct-answer-range__icon{width:1.2em;height:1.2em;fill:#e8e4ed}#enp-quiz .enp-slider-correct-answer-range--remove-range:focus .enp-slider-correct-answer-range__icon,#enp-quiz .enp-slider-correct-answer-range--remove-range:hover .enp-slider-correct-answer-range__icon{fill:#bf5700}@media (min-width:700px){#enp-quiz .enp-slider-correct-answer-range--remove-range{top:-.2rem;right:-.2rem;bottom:auto}}#enp-quiz .enp-slider-options .enp-input:-moz-read-only{background:#faf9fb}#enp-quiz .enp-slider-options .enp-input:read-only{background:#faf9fb}#enp-quiz .enp-answer-explanation{background:#fff;padding-top:2rem;box-shadow:inset 1px 0 0 #ccc,inset -1px -1px 0 #ccc,inset 0 1px 0 #ddd}#enp-quiz .enp-answer-explanation__label{display:block;color:#343242;font-weight:400;font-size:.85rem;text-transform:uppercase;font-weight:500}#enp-quiz .enp-question__button--delete{border:none;background:none;box-shadow:none;padding:0;margin:0;position:absolute;top:9px;right:9px;fill:#bbb;cursor:pointer}@media (min-width:700px){#enp-quiz .enp-question__button--delete{right:-30px}}#enp-quiz .enp-question__button--delete:hover{fill:#bf5700}#enp-quiz .enp-question__move{position:absolute;left:15px}@media (min-width:700px){#enp-quiz .enp-question__move{left:-40px}}#enp-quiz .enp-sort__placeholder{background:#ddd;height:60px;width:100%;max-height:120px;margin-bottom:1.6rem}#enp-quiz .ui-sortable .ui-sortable-helper .ui-sortable-handle{cursor:move;cursor:grabbing;cursor:-webkit-grabbing}#enp-quiz .enp-question__button--move{border:none;background:none;box-shadow:none;padding:0;margin:0;position:absolute;fill:#bbb;cursor:pointer}#enp-quiz .enp-question__button--move:focus,#enp-quiz .enp-question__button--move:hover{fill:#333}#enp-quiz .enp-question__button--move:disabled{opacity:.5}#enp-quiz .enp-question__button--move--up{top:0;left:-9px}#enp-quiz .enp-question__button--move--down{top:3px;right:-9px}#enp-quiz .enp-quiz-form__add-question{padding:.75em .8em .7em 1.4em;text-align:center;border:none;border-radius:3px;padding:.85em 1.4em .75em;font-size:15px;font-weight:400;letter-spacing:.05em;color:#fff;box-shadow:inset 0 -2px 0 rgba(0,0,0,.2);background:#bf5700;cursor:pointer;text-transform:uppercase;transition:all .2s;line-height:1.6;border:1px dashed #b5a6c4;background:none;color:#545454;box-shadow:none;padding-top:1rem;padding-bottom:1rem;margin-top:1.6rem;margin-bottom:2rem}#enp-quiz .enp-quiz-form__add-question:focus,#enp-quiz .enp-quiz-form__add-question:hover{color:#fff;box-shadow:none;background:#964400}#enp-quiz .enp-quiz-form__add-question:active{color:#fff;box-shadow:inset 0 2px 0 rgba(0,0,0,.1);background:#1eeeff}#enp-quiz .enp-quiz-form__add-question:focus{outline-color:#4d90fe;outline-offset:-2px;outline-style:auto;outline-width:5px}#enp-quiz .enp-quiz-form__add-question:disabled,#enp-quiz .enp-quiz-form__add-question:disabled:focus,#enp-quiz .enp-quiz-form__add-question:disabled:hover{background:#bf5700;cursor:default;opacity:.5}#enp-quiz .enp-quiz-form__add-question:focus,#enp-quiz .enp-quiz-form__add-question:hover{border:1px dashed #69547e;color:#b5a6c4;background:hsla(0,0%,100%,.9)}#enp-quiz .enp-quiz-form__add-question .enp-add-question__icon{width:1rem;height:1rem;border-radius:50%;fill:#fff;padding:.02rem;margin-right:5px;width:1.2rem;height:1.2rem;background:#e8e4ed;fill:#faf9fb;position:relative;top:.2rem}#enp-quiz .enp-quiz-form__add-question:hover .enp-add-question__icon{fill:#fff;background:#b5a6c4}#enp-quiz .enp-btn--save__btns{display:flex;align-items:center;align-items:flex-start}#enp-quiz .enp-quiz-form__save{text-align:center;border:none;border-radius:3px;padding:.85em 1.4em .75em;font-size:15px;font-weight:400;letter-spacing:.05em;color:#fff;box-shadow:inset 0 -2px 0 rgba(0,0,0,.2);background:#bf5700;cursor:pointer;text-transform:uppercase;transition:all .2s;line-height:1.6;width:100%;margin-bottom:1rem;opacity:.8;text-shadow:0 -1px 2px rgba(0,0,0,.6)}#enp-quiz .enp-quiz-form__save:focus,#enp-quiz .enp-quiz-form__save:hover{color:#fff;box-shadow:none;background:#964400}#enp-quiz .enp-quiz-form__save:active{color:#fff;box-shadow:inset 0 2px 0 rgba(0,0,0,.1);background:#1eeeff}#enp-quiz .enp-quiz-form__save:focus{outline-color:#4d90fe;outline-offset:-2px;outline-style:auto;outline-width:5px}#enp-quiz .enp-quiz-form__save:disabled,#enp-quiz .enp-quiz-form__save:disabled:focus,#enp-quiz .enp-quiz-form__save:disabled:hover{background:#bf5700;cursor:default;opacity:.5}#enp-quiz .enp-quiz-form__save:focus,#enp-quiz .enp-quiz-form__save:hover{opacity:1}@media (min-width:400px){#enp-quiz .enp-quiz-form__save{padding:1.2rem 1.8rem 1.1rem;width:27%;margin-right:3%;position:relative}}#enp-quiz .enp-quiz-form__save--reveal{animation:c .3s cubic-bezier(0,0,.3,1)}#enp-quiz .enp-btn--next-step{text-align:center;border:none;border-radius:3px;padding:.85em 1.4em .75em;font-size:15px;font-weight:400;letter-spacing:.05em;color:#fff;box-shadow:inset 0 -2px 0 rgba(0,0,0,.2);background:#bf5700;cursor:pointer;text-transform:uppercase;transition:all .2s;line-height:1.6;padding:.65em 1.2em .85em 1.4em}#enp-quiz .enp-btn--next-step:focus,#enp-quiz .enp-btn--next-step:hover{color:#fff;box-shadow:none;background:#964400}#enp-quiz .enp-btn--next-step:active{color:#fff;box-shadow:inset 0 2px 0 rgba(0,0,0,.1);background:#1eeeff}#enp-quiz .enp-btn--next-step:focus{outline-color:#4d90fe;outline-offset:-2px;outline-style:auto;outline-width:5px}#enp-quiz .enp-btn--next-step:disabled,#enp-quiz .enp-btn--next-step:disabled:focus,#enp-quiz .enp-btn--next-step:disabled:hover{background:#bf5700;cursor:default;opacity:.5}#enp-quiz .enp-btn--next-step__icon{border-radius:50%;fill:#fff;background:#fff;fill:#bf5700;width:1.2rem;height:1.2rem;margin-left:.5em;position:relative;top:.15rem}#enp-quiz .enp-btn--next-step__icon:hover{background:#fff;fill:#964400}#enp-quiz .enp-btn--next-step{width:100%;padding:1rem 1.4rem}@media (min-width:700px){#enp-quiz .enp-btn--next-step{padding:1.2rem 1.8rem 1.1rem}}#enp-quiz .enp-btn--next-step .enp-btn--next-step__icon{width:1rem;height:1rem}#enp-quiz .enp-btn--next-step--reveal{animation:b .3s cubic-bezier(0,0,.3,1)}#enp-quiz .enp-accordion-header--inserting,#enp-quiz .enp-mc-option--inputs{animation:a .4s cubic-bezier(0,0,.3,1) forwards}#enp-quiz .enp-mc-option--remove,#enp-quiz .enp-question--remove,#enp-quiz .enp-question__image--remove{animation:e .5s cubic-bezier(0,0,.3,1) forwards}#enp-quiz .enp-image-upload-wait{text-align:center;border:none;border-radius:3px;padding:.85em 1.4em .75em;font-size:15px;font-weight:400;letter-spacing:.05em;color:#fff;box-shadow:inset 0 -2px 0 rgba(0,0,0,.2);background:#bf5700;cursor:pointer;text-transform:uppercase;line-height:1.6;border:1px dashed #b5a6c4;background:none;color:#545454;box-shadow:none;border:2px dashed #b5a6c4;color:#e8e4ed;transition:all .2s;background:#faf9fb;padding-top:4rem;padding-bottom:4rem;margin-bottom:1rem;width:100%}#enp-quiz .enp-image-upload-wait:focus,#enp-quiz .enp-image-upload-wait:hover{color:#fff;box-shadow:none;background:#964400}#enp-quiz .enp-image-upload-wait:active{color:#fff;box-shadow:inset 0 2px 0 rgba(0,0,0,.1);background:#1eeeff}#enp-quiz .enp-image-upload-wait:focus{outline-color:#4d90fe;outline-offset:-2px;outline-style:auto;outline-width:5px}#enp-quiz .enp-image-upload-wait:disabled,#enp-quiz .enp-image-upload-wait:disabled:focus,#enp-quiz .enp-image-upload-wait:disabled:hover{background:#bf5700;cursor:default;opacity:.5}#enp-quiz .enp-image-upload-wait:focus,#enp-quiz .enp-image-upload-wait:hover{border:1px dashed #69547e;background:hsla(0,0%,100%,.9);color:#b5a6c4;border:2px dashed #999}#enp-quiz .enp-accordion-header.question-has-error{color:#bf5700;box-shadow:0 0 3px #bf5700}.enp-quiz.ui-sortable--sorting #enp-quiz .enp-accordion-content{display:none}#enp-quiz .enp-quiz-settings__title,#enp-quiz .enp-quiz-share__legend{position:relative;font-size:1rem;text-transform:uppercase;font-weight:600;padding-top:0}#enp-quiz .enp-quiz-settings__form{margin-bottom:3rem;overflow:visible}@media (min-width:1000px){#enp-quiz .enp-quiz-settings__form{padding:0;margin-bottom:0}}@media (min-width:700px){#enp-quiz .enp-fieldset{position:relative}}#enp-quiz .enp-title-display__legend{padding-top:0}@media (min-width:700px){#enp-quiz .enp-title-display__legend{padding-top:.4rem}}#enp-quiz .enp-quiz-share__input,#enp-quiz .enp-quiz-styles__input{width:100%}#enp-quiz .enp-quiz-styles__textarea--custom-css{font-family:Monaco,Consolas,Andale Mono,DejaVu Sans Mono,monospace;font-size:.9rem;min-height:200px}#enp-quiz .enp-fieldset--section{padding:1.6rem 1rem}#enp-quiz .enp-fieldset--section.enp-accordion-content--open{margin-bottom:0}#enp-quiz .enp-quiz-share--facebook{margin-bottom:2rem}#enp-quiz .enp-title-display__legend{display:block;color:#343242;font-weight:400;font-size:.85rem;text-transform:uppercase;padding-top:1.6rem;margin-bottom:.2rem;border:none}#enp-quiz .enp-title-display__input{clip:rect(1px,1px,1px,1px);position:absolute!important;left:-10000px;top:auto;width:1px;height:1px;overflow:hidden}#enp-quiz .enp-title-display__label{text-transform:capitalize;display:inline-block;padding:.2rem .5rem;border-radius:3px;cursor:pointer}#enp-quiz .enp-title-display__input:checked+.enp-title-display__label{background:#60aaad;color:#fff;text-shadow:0 0 1px rgba(0,0,0,.7)}#enp-quiz .enp-title-display__input:focus+.enp-title-display__label{z-index:8;outline-color:#4d90fe;outline-offset:-2px;outline-style:auto;outline-width:5px}#enp-quiz .enp-mc-options-order__legend{display:block;color:#343242;font-weight:400;font-size:.85rem;text-transform:uppercase;padding-top:1.6rem;margin-bottom:.2rem;border:none}#enp-quiz .enp-mc-options-order__input{clip:rect(1px,1px,1px,1px);position:absolute!important;left:-10000px;top:auto;width:1px;height:1px;overflow:hidden}#enp-quiz .enp-mc-options-order__label{text-transform:capitalize;display:inline-block;padding:.2rem .5rem;border-radius:3px;cursor:pointer}#enp-quiz .enp-mc-options-order__input:checked+.enp-mc-options-order__label{background:#60aaad;color:#fff;text-shadow:0 0 1px rgba(0,0,0,.7)}#enp-quiz .enp-mc-options-order__input:focus+.enp-mc-options-order__label{z-index:8;outline-color:#4d90fe;outline-offset:-2px;outline-style:auto;outline-width:5px}#enp-quiz .enp-mc-options-order{margin-bottom:1.6rem}#enp-quiz .enp-quiz-share__textarea{min-height:7.6rem;margin-bottom:2rem}@media (min-width:700px){#enp-quiz .enp-quiz-share__textarea{min-height:4.6rem}}@media (min-width:1000px){#enp-quiz .enp-quiz-share__textarea{min-height:7.6rem}}#enp-quiz .enp-preview-form__submit{margin-top:1.6rem;margin-bottom:1.6rem}#enp-quiz .enp-quiz-preview__title{font-size:1rem;text-transform:uppercase;font-weight:600}#enp-quiz .enp-preview-form__submit{text-align:center;border:none;border-radius:3px;padding:.85em 1.4em .75em;font-size:15px;font-weight:400;letter-spacing:.05em;color:#fff;box-shadow:inset 0 -2px 0 rgba(0,0,0,.2);background:#bf5700;cursor:pointer;text-transform:uppercase;transition:all .2s;line-height:1.6;width:100%;padding-top:.85rem;padding-bottom:.85rem;margin-bottom:1rem;opacity:.8;text-shadow:0 -1px 2px rgba(0,0,0,.6)}#enp-quiz .enp-preview-form__submit:focus,#enp-quiz .enp-preview-form__submit:hover{color:#fff;box-shadow:none;background:#964400}#enp-quiz .enp-preview-form__submit:active{color:#fff;box-shadow:inset 0 2px 0 rgba(0,0,0,.1);background:#1eeeff}#enp-quiz .enp-preview-form__submit:focus{outline-color:#4d90fe;outline-offset:-2px;outline-style:auto;outline-width:5px}#enp-quiz .enp-preview-form__submit:disabled,#enp-quiz .enp-preview-form__submit:disabled:focus,#enp-quiz .enp-preview-form__submit:disabled:hover{background:#bf5700;cursor:default;opacity:.5}#enp-quiz .enp-preview-form__submit:focus,#enp-quiz .enp-preview-form__submit:hover{opacity:1}#enp-quiz .enp-preview-form__submit--publish{width:100%;position:relative;z-index:99999999;padding:1.05rem 1.8rem .95rem}#enp-quiz .enp-quiz-styles__iris-wrapper{position:relative}#enp-quiz .iris-picker{box-sizing:content-box;position:relative;z-index:9999999999;top:-1.2rem;margin-bottom:1rem;padding-bottom:3rem;padding-right:30px}@media (min-width:1000px){#enp-quiz .iris-picker{position:absolute;top:-4px;left:0}}#enp-quiz .iris-picker:last-of-type{margin-bottom:0}#enp-quiz .iris-picker .ui-draggable-handle:focus .ui-slider-handle,#enp-quiz .iris-picker .ui-slider-handle:focus{box-shadow:0 0 3px rgba(0,0,0,.75)}#enp-quiz .enp-quiz-styles__set-default{text-align:center;border:none;border-radius:3px;padding:.85em 1.4em .75em;font-size:15px;font-weight:400;letter-spacing:.05em;color:#fff;box-shadow:inset 0 -2px 0 rgba(0,0,0,.2);background:#bf5700;cursor:pointer;text-transform:uppercase;transition:all .2s;line-height:1.6;border:2px solid #bf5700;background:transparent;color:#bf5700;box-shadow:none;font-size:.75rem;position:absolute;left:10px;bottom:10px}#enp-quiz .enp-quiz-styles__set-default:focus,#enp-quiz .enp-quiz-styles__set-default:hover{color:#fff;box-shadow:none;background:#964400}#enp-quiz .enp-quiz-styles__set-default:active{color:#fff;box-shadow:inset 0 2px 0 rgba(0,0,0,.1);background:#1eeeff}#enp-quiz .enp-quiz-styles__set-default:focus{outline-color:#4d90fe;outline-offset:-2px;outline-style:auto;outline-width:5px}#enp-quiz .enp-quiz-styles__set-default:disabled,#enp-quiz .enp-quiz-styles__set-default:disabled:focus,#enp-quiz .enp-quiz-styles__set-default:disabled:hover{background:#bf5700;cursor:default;opacity:.5}#enp-quiz .enp-quiz-styles__set-default:focus,#enp-quiz .enp-quiz-styles__set-default:hover{background:transparent;border:2px solid #964400;color:#964400}#enp-quiz .enp-iris__close{border:none;background:none;box-shadow:none;padding:0;margin:0;position:absolute;top:5px;right:5px;fill:#888;cursor:pointer}#enp-quiz .enp-quiz-styles__input--color{padding-left:45px}#enp-quiz .enp-quiz-styles__color-demo{width:30px;height:30px;border:1px solid #ccc;top:8px;left:8px;border-radius:3px;position:absolute}#enp-quiz .enp-share-quiz__url{display:block;font-size:1.5rem;line-height:1.4;word-wrap:break-word}#enp-quiz .enp-share-quiz{list-style:none;margin-left:0;display:flex;justify-content:center;align-content:center;align-items:center}#enp-quiz .enp-share-quiz__item{margin-right:20px}#enp-quiz .enp-share-quiz__item:last-child{margin-right:0}#enp-quiz .enp-share-quiz__item__icon{width:2.4rem;height:2.4rem;border-radius:50%;fill:#fff;padding:.6rem;fill:#fff!important}#enp-quiz .enp-share-quiz__item__icon--facebook{background-color:#3a5795}#enp-quiz .enp-share-quiz__item__icon--twitter{background-color:#4099ff}#enp-quiz .enp-share-quiz{justify-content:space-around;margin-bottom:0}#enp-quiz .enp-ab-create__container{max-width:740px;margin:0 auto;width:100%;background:#fdfcfd;padding-top:3rem;padding-bottom:3rem}#enp-quiz .enp-ab-create__container:after{content:"";display:table;clear:both}@media (min-width:700px){#enp-quiz .enp-ab-create__container{max-width:1000px}}@media (min-width:1000px){#enp-quiz .enp-ab-create__container{max-width:1440px}}#enp-quiz .enp-ab-create__form{max-width:740px;margin:0 auto}#enp-quiz .enp-ab-create__form:after{content:"";display:table;clear:both}#enp-quiz .enp-ab-create__label{display:block;color:#343242;font-weight:400;font-size:.85rem;text-transform:uppercase;font-weight:500}#enp-quiz .enp-ab-create-title__textarea{font-size:1rem;font-family:Arial,monospace,helvetica,arial,sans-serif;padding:.8rem .5rem;background:#fff;border:1px solid #aaa;border-radius:3px;width:20rem;max-width:100%;margin-bottom:1.2rem;font-weight:700;font-size:1.6rem;margin-bottom:1rem;width:100%}@media (min-width:700px){#enp-quiz .enp-ab-create-title__textarea{padding:.8rem;width:100%}}#enp-quiz .enp-ab-create-title__textarea::-webkit-input-placeholder{font-weight:700}#enp-quiz .enp-ab-create-title__textarea:-ms-input-placeholder,#enp-quiz .enp-ab-create-title__textarea::-ms-input-placeholder{font-weight:700}#enp-quiz .enp-ab-create-title__textarea::placeholder{font-weight:700}#enp-quiz .enp-ab-create__select{width:100%;-webkit-appearance:none;-moz-appearance:none;appearance:none;font-size:.85rem;padding:.7rem 32px .7rem .8rem;border:1px solid #bbb;border-radius:3px;margin-bottom:1.6rem;background:url(../svg/chevron-down.svg) 100% 50% no-repeat;background-color:#fff;box-shadow:inset -26px 0 0 rgba(0,0,0,.1)}#enp-quiz .enp-ab-create__submit{width:100%;padding-top:1em;padding-bottom:1em}#headerimg h1{text-align:center;font-size:40px!important}#enp-quiz.enp-quiz__main{max-width:740px;margin:0 auto;display:grid;gap:1em;min-height:85vh}#enp-quiz.enp-quiz__main:after{content:"";display:table;clear:both}@media (min-width:1000px){#enp-quiz.enp-quiz__main{max-width:740px;margin:0 auto;grid-template-columns:1fr 4fr}#enp-quiz.enp-quiz__main:after{content:"";display:table;clear:both}}@media (min-width:1000px) and (min-width:700px){#enp-quiz.enp-quiz__main{max-width:1000px}}@media (min-width:1000px) and (min-width:1000px){#enp-quiz.enp-quiz__main{max-width:1440px}}#enp-quiz .enp-dash-container{padding:2rem;transition:all .25s cubic-bezier(0,0,.3,1)}#enp-quiz .enp-dash__section-aside{background-color:#faf9fb}@media (min-width:700px){#enp-quiz .enp-dash__section-aside{padding:2rem}}#enp-quiz .enp-breadcrumb-link__container{padding-bottom:2rem}#enp-quiz .enp-search-quizzes{display:flex;justify-content:space-between;flex-wrap:wrap;padding:1em}@media (min-width:700px){#enp-quiz .enp-search-quizzes{padding:.2rem .8rem;flex-wrap:nowrap}}@media (min-width:1000px){#enp-quiz .enp-search-quizzes{display:flex;justify-content:space-between;flex-direction:column}}#enp-quiz .enp-search-quizzes__form-item{margin-bottom:.6rem;flex:0 1 48%}@media (min-width:400px){#enp-quiz .enp-search-quizzes__form-item{margin-bottom:0;margin-right:1rem;flex:1 0 auto}}#enp-quiz .enp-quiz-search{flex:1 0 100%;position:relative}@media (min-width:700px){#enp-quiz .enp-quiz-search{flex:1 0 auto}}#enp-quiz .enp-search-quizzes__label{margin-bottom:0;clip:rect(1px,1px,1px,1px);position:absolute!important;left:-10000px;top:auto;width:1px;height:1px;overflow:hidden}#enp-quiz .enp-search-quizzes__select{padding:.3rem;border-radius:3px;width:100%}@media (min-width:1000px){#enp-quiz .enp-search-quizzes__select{min-width:200px}}#enp-quiz .enp-quiz-search__input{width:100%;margin:0 0 .1rem;padding:.3rem .3rem .3rem 26px;font-size:.85rem}@media (min-width:700px){#enp-quiz .enp-quiz-search__input{max-width:200px}}#enp-quiz .enp-quiz-search__icon{position:absolute;bottom:.3rem;left:.2rem;width:21px;height:21px}#enp-quiz .enp-search-quizzes__button{padding:.2rem .8rem}#enp-quiz .enp-search-results-description{font-size:.85rem}#enp-quiz .enp-search-results-description__link{white-space:nowrap}#enp-quiz .enp-search-results-description__icon{width:1.3em;height:1.3em;position:relative;top:4px;left:2px}#enp-quiz .enp-dash__section-title{font-size:1rem;text-transform:uppercase;margin-bottom:.325rem;border-bottom:1px solid #e8e4ed}#enp-quiz .enp-dash__ab-test-helper--not-enough-quizzes{color:#b5a6c4}#enp-quiz .enp-view-toggle{cursor:pointer;opacity:.5;display:none}@media (min-width:700px){#enp-quiz .enp-view-toggle{display:flex}}#enp-quiz .enp-view-toggle__active{opacity:1}#enp-quiz .enp-sort-by{margin-left:5px}#enp-quiz .enp-dash-list{display:flex;flex-flow:column wrap;align-items:stretch;list-style:none;margin-left:0}#enp-quiz .enp-dash-item{flex-basis:100%;padding:1rem 1.2rem;background:#fff;border:1px solid #eee;border-bottom:1px solid #ddd;list-style:none;transition:all .35s cubic-bezier(0,0,.3,1);margin:0 0 .8rem;justify-content:space-between;display:flex;z-index:1;flex-direction:column;align-content:flex-end;justify-content:flex-end;border:none;border-radius:3px;background-color:#f5f3f7}#enp-quiz .enp-dash-item--draft,#enp-quiz .enp-dash-item--published{box-shadow:inset 4px 0 0 #00a9b7,0 1px 0 rgba(0,0,0,.1)}#enp-quiz .enp-dash-item--remove{animation:e .5s cubic-bezier(0,0,.3,1) forwards}#enp-quiz .enp-dash-list--list-view .enp-dash-item{margin:0 0 .8rem;flex-basis:100%}#enp-quiz .enp-dash-item__spinner{display:flex;justify-content:center;align-content:center;align-items:center;position:absolute;top:0;bottom:0;left:0;right:0;background:hsla(0,59%,90%,.8);width:100%;animation:g .3s cubic-bezier(0,0,.3,1)}#enp-quiz .enp-dash-item__header{padding:.5rem 1rem;background:#faf9fb;border-bottom:1px solid #e8e4ed;display:flex;justify-content:space-between;align-items:center;border-radius:3px}#enp-quiz .enp-dash-item__title{font-size:1rem;padding-bottom:.5rem;padding:0;margin-bottom:0}#enp-quiz .enp-dash-item__title a{color:#00a9b7}#enp-quiz .enp-dash-item__content{padding:0 0 .375rem;position:relative;transition:all .2s cubic-bezier(0,0,.3,1)}#enp-quiz .enp-dash-item__meta{font-size:.7rem;font-weight:300;color:#565656;font-size:.75rem}#enp-quiz .enp-dash-item__username{word-wrap:break-word;padding-left:.4rem;margin-left:.2rem;border-left:1px solid #ddd}#enp-quiz .enp-dash-item__title--ab-test{padding-bottom:0}#enp-quiz .enp-dash-item__ab-quizzes{list-style:none;margin-left:0;font-size:.85rem;color:#e8e4ed;margin-bottom:.8rem}#enp-quiz .enp-dash-item__nav{list-style:none;margin-left:0;margin-bottom:0;font-size:.85rem}#enp-quiz .enp-dash-item__nav__item{display:flex;margin:0;width:100%;align-items:center}#enp-quiz .enp-dash-item__nav__item:hover{background-color:#f5f3f7}#enp-quiz .enp-dash-item__nav__item:hover .enp-dash-item__icon{fill:#bf5700}#enp-quiz .enp-dash-item__nav__item a{font-weight:400;color:#b5a6c4;display:flex;align-items:center;width:100%;padding:12px}#enp-quiz .enp-dash-item__nav__item a:focus,#enp-quiz .enp-dash-item__nav__item a:hover{color:#bf5700;outline:1px dotted #bf5700;outline-offset:1px}#enp-quiz .enp-delete-quiz{width:100%}#enp-quiz .enp-delete-quiz:hover .enp-dash-item__delete{color:#bf5700}#enp-quiz .enp-delete-quiz:hover .enp-icon{fill:#bf5700}#enp-quiz .enp-dash-item__delete{border:none;background:none;box-shadow:none;padding:0;margin:0;display:flex;padding:12px;align-items:center;position:relative;line-height:1.6;color:#b5a6c4;cursor:pointer;width:100%}#enp-quiz .enp-dash-item__delete .enp-icon{fill:#b5a6c4}#enp-quiz .enp-dash-item__icon{fill:#b5a6c4;width:15px;height:15px;margin-right:10px}#enp-quiz .enp-dash-item__nav--collapsible{display:none;position:absolute;z-index:2;top:44px;right:-17px;width:195px;background-color:#fff;text-align:left;transform:translateZ(0);transition:all .2s cubic-bezier(0,0,.3,1)}#enp-quiz .enp-dash-item__nav--collapsible .enp-dash-item__nav__item{cursor:pointer}#enp-quiz .enp-dash-item__menu-action{height:24px;background:none;border:none;color:#444;padding:0;bottom:.2rem;right:1.5rem;top:1.5rem;cursor:pointer}#enp-quiz .enp-dash-item__menu-action-wrap{max-width:0;display:flex;flex-direction:column;align-items:flex-end}#enp-quiz .enp-dash-item__menu-action__icon{width:15px;height:15px;fill:#b5a6c4;transition:all .3s cubic-bezier(0,0,.3,1)}#enp-quiz .enp-dash-item--menu-active{transform:translate3d(0,-3px,0);z-index:2}#enp-quiz .enp-dash-item--menu-active .enp-dash-item__nav-wrap{position:relative}#enp-quiz .enp-dash-item--menu-active.enp-dash-item--published{box-shadow:inset 4px 0 0 #60aaad,0 2px 2px rgba(0,0,0,.2)}#enp-quiz .enp-dash-item--menu-active.enp-dash-item--draft{box-shadow:inset 4px 0 0 #b4d7d8,0 2px 2px rgba(0,0,0,.2)}#enp-quiz .enp-dash-item--menu-active .enp-dash-item__menu-action__icon--bottom{transform:rotateX(180deg)}#enp-quiz .enp-dash-item--menu-active .enp-dash-item__nav--collapsible{display:block;animation:b .25s cubic-bezier(0,0,.3,1) forwards;border-radius:3px;box-shadow:0 2px 2px rgba(0,0,0,.2)}#enp-quiz .enp-dash-item--menu-active .enp-dash-item__content{opacity:.4}#enp-quiz .enp-quiz-results{display:flex;justify-content:space-around;list-style:none;margin:.8rem 0 0;padding:0;text-align:center}#enp-quiz .enp-quiz-results__item{margin:0 2% 0 0;padding:0;color:#454545}@media (max-width:280px){#enp-quiz .enp-quiz-results__item{width:100%;padding:0;margin-bottom:.6rem}}#enp-quiz .enp-quiz-results__number{font-size:1.6rem;line-height:1;position:relative}#enp-quiz .enp-dash-item--draft .enp-quiz-results__number{opacity:.5}#enp-quiz .enp-quiz-results__number--average-score{color:#4e9497}#enp-quiz .enp-quiz-results__number--average-score:after{content:"%";font-size:.9rem;position:absolute;top:.3rem;right:-1rem}#enp-quiz .enp-quiz-results__label{text-transform:uppercase;font-size:.7rem;font-weight:300;color:#888}#enp-quiz .enp-dash-item--add-new__wrap{display:grid;gap:1em;grid-template-columns:1fr 1fr}#enp-quiz .enp-dash-list--quiz__container{display:grid;gap:1em}@media (min-width:1000px){#enp-quiz .enp-dash-list--quiz__container{grid-template-columns:1fr 1fr}}#enp-quiz .enp-dash-item--add-new{background:none;border:none;padding:0;position:relative}@media (min-width:1000px){#enp-quiz .enp-dash-item--add-new{padding-top:7rem}}#enp-quiz .enp-dash-link--add-new{text-align:center;border:none;border-radius:3px;padding:.85em 1.4em .75em;font-size:15px;font-weight:400;letter-spacing:.05em;color:#fff;box-shadow:inset 0 -2px 0 rgba(0,0,0,.2);background:#bf5700;cursor:pointer;text-transform:uppercase;line-height:1.6;border:1px dashed #b5a6c4;background:none;color:#545454;box-shadow:none;border:2px dashed #b5a6c4;color:#e8e4ed;transition:all .2s;justify-content:flex-start;color:#bf5700;padding:1rem 1.2rem}#enp-quiz .enp-dash-link--add-new:focus,#enp-quiz .enp-dash-link--add-new:hover{color:#fff;box-shadow:none;background:#964400}#enp-quiz .enp-dash-link--add-new:active{color:#fff;box-shadow:inset 0 2px 0 rgba(0,0,0,.1);background:#1eeeff}#enp-quiz .enp-dash-link--add-new:focus{outline-color:#4d90fe;outline-offset:-2px;outline-style:auto;outline-width:5px}#enp-quiz .enp-dash-link--add-new:disabled,#enp-quiz .enp-dash-link--add-new:disabled:focus,#enp-quiz .enp-dash-link--add-new:disabled:hover{background:#bf5700;cursor:default;opacity:.5}#enp-quiz .enp-dash-link--add-new:focus,#enp-quiz .enp-dash-link--add-new:hover{border:1px dashed #69547e;background:hsla(0,0%,100%,.9);color:#b5a6c4;border:2px dashed #999}@media (min-width:700px){#enp-quiz .enp-dash-link--add-new{font-size:1rem;text-transform:uppercase;display:flex;justify-content:center;align-content:center;align-items:center;flex-direction:column;position:absolute;top:0;left:0;right:0;bottom:0}}#enp-quiz .enp-dash-link--add-new .enp-dash-link__icon{border-radius:50%;fill:#fff;width:1.2rem;height:1.2rem;margin-right:5px;background-color:#333f48}@media (min-width:700px){#enp-quiz .enp-dash-link--add-new .enp-dash-link__icon{width:2rem;height:2rem;margin:.8rem 0 .2rem}}#enp-quiz .enp-dash-link--add-new:hover{color:#964400}#enp-quiz .enp-dash-link--add-new:hover .enp-dash-link__icon{fill:#fff;background:#964400}#enp-quiz .enp-quiz-message--welcome p{color:#1d1c25}#enp-quiz .enp-paginate{list-style:none;margin-left:0;font-size:1rem}#enp-quiz .enp-paginate,#enp-quiz .enp-paginate__link{display:flex;justify-content:center;align-content:center;align-items:center}#enp-quiz .enp-paginate__link{margin:0 .2rem;padding:0 .4rem;border-radius:3px;font-weight:400}#enp-quiz .enp-paginate__link--current-page{border:2px solid #00a9b7}#enp-quiz .enp-paginate__item--first-page,#enp-quiz .enp-paginate__item--last-page{display:flex}#enp-quiz .enp-paginate__item--first-page:after,#enp-quiz .enp-paginate__item--last-page:before{content:"...";font-size:1rem;position:relative;bottom:.2rem;opacity:.6}#enp-quiz .enp-paginate__item--no-gap:after,#enp-quiz .enp-paginate__item--no-gap:before{content:""}#enp-quiz .enp-paginate__item--next-page{margin-left:.2rem}#enp-quiz .enp-paginate__item--previous-page{margin-right:.2rem}#enp-quiz .enp-quiz-breadcrumbs{grid-row:1}#enp-quiz .enp-quiz-breadcrumbs__list{display:flex;list-style:none;margin-left:0;margin-bottom:0}#enp-quiz .enp-quiz-breadcrumbs__item{margin-right:10px;display:flex;justify-content:center;align-content:center;align-items:center;fill:#bf5700;margin-right:5px}#enp-quiz .enp-quiz-breadcrumbs__item:last-of-type{margin-right:0}@media (min-width:400px){#enp-quiz .enp-quiz-breadcrumbs__item{margin-right:10px}}#enp-quiz .enp-quiz-breadcrumbs__link--disabled{opacity:.65;cursor:default}#enp-quiz .enp-quiz-breadcrumbs__link--active{text-align:center;border:none;border-radius:3px;padding:.85em 1.4em .75em;font-size:15px;font-weight:400;letter-spacing:.05em;color:#fff;box-shadow:inset 0 -2px 0 rgba(0,0,0,.2);background:#bf5700;cursor:pointer;text-transform:uppercase;transition:all .2s;line-height:1.6;border:2px solid #bf5700;background:transparent;color:#bf5700;box-shadow:none;padding:.4em 1em}#enp-quiz .enp-quiz-breadcrumbs__link--active:focus,#enp-quiz .enp-quiz-breadcrumbs__link--active:hover{color:#fff;box-shadow:none;background:#964400}#enp-quiz .enp-quiz-breadcrumbs__link--active:active{color:#fff;box-shadow:inset 0 2px 0 rgba(0,0,0,.1);background:#1eeeff}#enp-quiz .enp-quiz-breadcrumbs__link--active:focus{outline-color:#4d90fe;outline-offset:-2px;outline-style:auto;outline-width:5px}#enp-quiz .enp-quiz-breadcrumbs__link--active:disabled,#enp-quiz .enp-quiz-breadcrumbs__link--active:disabled:focus,#enp-quiz .enp-quiz-breadcrumbs__link--active:disabled:hover{background:#bf5700;cursor:default;opacity:.5}#enp-quiz .enp-quiz-breadcrumbs__link--active:focus,#enp-quiz .enp-quiz-breadcrumbs__link--active:hover{background:transparent;border:2px solid #964400;color:#964400}#enp-quiz .enp-quiz-breadcrumbs__link{font-size:1rem;font-weight:400;text-transform:none;letter-spacing:0}#enp-quiz .enp-quiz-breadcrumbs--fixed{top:0;position:fixed;animation:h .25s}#enp-quiz .enp-results-title{font-size:1.6rem;text-align:center;padding:3.2rem 20px 2.6rem;background:#fdfcfd;margin:-1.2rem 0 2rem;border-bottom:1px solid #ddd}#enp-quiz .enp-results-title:after{font-size:1rem;text-transform:uppercase;display:block;content:"RESULTS";font-weight:400}#enp-quiz .enp-results__container{max-width:740px;margin:0 auto;display:block}#enp-quiz .enp-results__container:after{content:"";display:table;clear:both}@media (min-width:700px){#enp-quiz .enp-results__container{max-width:1000px}}@media (min-width:1000px){#enp-quiz .enp-results__container{max-width:1440px;display:flex;justify-content:space-between}}#enp-quiz .enp-quiz-scores__container,#enp-quiz .enp-results-flow__container{width:100%}@media (min-width:1000px){#enp-quiz .enp-quiz-scores__container,#enp-quiz .enp-results-flow__container{width:48%}}#enp-quiz .enp-quiz-scores{margin-top:2.6rem}#enp-quiz .enp-quiz-score__line-chart{height:300px;margin-bottom:1rem}#enp-quiz .enp-quiz-score__line-chart .ct-label{color:#1d1c25}#enp-quiz .enp-quiz-score__line-chart .ct-grid{stroke:#dadada;stroke-dasharray:0}#enp-quiz .enp-quiz-score__line-chart .ct-line{stroke:#60aaad;stroke-width:2px}#enp-quiz .enp-quiz-score__line-chart .ct-point{stroke:#60aaad;stroke-width:8px}#enp-quiz .enp-quiz-scores-table{width:100%;max-width:500px;margin:0 auto}#enp-quiz .enp-quiz-scores-table tr th{background-color:#fff}#enp-quiz .enp-quiz-scores-table__label{padding-left:5%}#enp-quiz .enp-quiz-scores-table__score{text-align:right;padding-right:5%}#enp-quiz .enp-results-flow{position:relative;margin:2rem auto;width:320px;height:320px;border-radius:50%}@media (min-width:400px){#enp-quiz .enp-results-flow{width:390px;height:390px}}@media (min-width:700px){#enp-quiz .enp-results-flow{width:450px;height:450px}}@media (min-width:1000px){#enp-quiz .enp-results-flow{width:400px;height:400px}}#enp-quiz .enp-results-flow__section-title{clip:rect(1px,1px,1px,1px);position:absolute!important;left:-10000px;top:auto;width:1px;height:1px;overflow:hidden}#enp-quiz .enp-results-flow__item{border-radius:50%;text-align:center;height:100%;width:100%;margin:0 auto;left:0;right:0;padding:12.5% 0 0;letter-spacing:.05rem;border:2px solid #60aaad;animation:.85s a cubic-bezier(0,0,.3,1) forwards}#enp-quiz .enp-results-flow__item--total-views{background:#fff}#enp-quiz .enp-results-flow__item--quiz-starts{width:65%;height:65%;position:absolute;padding-top:8%;bottom:2.5%;background:#fff}#enp-quiz .enp-results-flow__item--quiz-finishes{width:35%;height:35%;position:absolute;bottom:5%;background:#d6e9ea}#enp-quiz .enp-results-flow__title{font-size:1rem;text-transform:uppercase;color:#444;font-size:.7rem;margin-bottom:0}@media (min-width:700px){#enp-quiz .enp-results-flow__title{font-weight:700;margin-bottom:2px}}#enp-quiz .enp-results-flow__number{font-weight:700;font-size:1.4rem;line-height:1.2}#enp-quiz .enp-results-flow__number--total-views{font-size:2rem}#enp-quiz .enp-results-flow__number--quiz-starts{font-size:1.65rem}#enp-quiz .enp-results-flow__percentage{font-size:.8rem;font-weight:400;position:relative;display:inline-block;top:-.7em;left:-.1rem;color:#444}#enp-quiz .enp-results-flow__percentage:after{content:"%";position:absolute;right:-.75rem;font-size:.7rem;color:#444}#enp-quiz .enp-results-questions__section{padding-top:5rem;padding-bottom:3rem;margin-top:5rem;margin-bottom:3rem}@media (min-width:700px){#enp-quiz .enp-results-questions__section{margin-right:2rem;margin-left:2rem}}#enp-quiz .enp-results-questions__header{align-items:flex-start;flex-direction:column}@media (min-width:400px){#enp-quiz .enp-results-questions__header{display:flex;justify-content:space-between;flex-direction:row;align-items:flex-end}}#enp-quiz .enp-results-questions__key,#enp-quiz .enp-results-questions__title{font-size:1rem;text-transform:uppercase}#enp-quiz .enp-results-questions{list-style:none;margin-left:0}#enp-quiz .enp-results-question{width:100%;font-size:1rem;padding:0;margin-bottom:1rem}#enp-quiz .enp-results-question__header{padding:1rem 1.2rem;position:relative}#enp-quiz .enp-results-question__question,#enp-quiz .enp-results-question__stats{font-size:1rem;line-height:1.4}#enp-quiz .enp-results-question__question{font-weight:400}@media (min-width:400px){#enp-quiz .enp-results-question__question{padding-right:7em;margin-bottom:0}}#enp-quiz .enp-results-question__stats{font-size:.9rem}@media (min-width:400px){#enp-quiz .enp-results-question__stats{position:absolute;bottom:1rem;right:1.2rem;text-align:right}}#enp-quiz .enp-results-question__stats,#enp-quiz .enp-results-questions__key{font-weight:300}#enp-quiz .enp-results-question__content{padding:2rem 1.2rem 1.2rem;border-radius:3px}#enp-quiz .enp-results-question__deep-stats{display:flex;justify-content:space-around;list-style:none;margin-left:0;text-align:center}#enp-quiz .enp-results-question__deep-stat__number{font-size:1.8rem;line-height:1;position:relative}#enp-quiz .enp-results-question__deep-stat__number--correct,#enp-quiz .enp-results-question__deep-stat__number--finishes{color:#4e9497}#enp-quiz .enp-results-question__deep-stat__number--incorrect{color:#c1893e}#enp-quiz .enp-results-question__deep-stat__number--correct:after,#enp-quiz .enp-results-question__deep-stat__number--finishes:after,#enp-quiz .enp-results-question__deep-stat__number--incorrect:after{content:"%";font-size:.9rem;position:absolute;top:.3rem;right:-1rem}#enp-quiz .enp-results-question__deep-stat__label{font-size:1rem;text-transform:uppercase;font-size:.8rem}#enp-quiz .enp-results-question__options{list-style:none;margin-left:0;margin-bottom:0}#enp-quiz .enp-results-question__option{padding:.8rem .8rem .8rem .4rem;border-top:1px solid #ddd}@media (min-width:400px){#enp-quiz .enp-results-question__option{display:flex;justify-content:space-between;flex-direction:row}}#enp-quiz .enp-results-question__option:first-of-type{margin-top:1.4rem}#enp-quiz .enp-results-question__option--correct{background:#fff}#enp-quiz .enp-results-question__option__text{flex-grow:100;margin-right:1rem}#enp-quiz .enp-results-question__option__text__helper{font-weight:300;font-size:1rem;text-transform:uppercase;margin-right:.4rem}@media (min-width:400px){#enp-quiz .enp-results-question__option__icon{margin-right:.3rem;min-width:1.6rem}}#enp-quiz .enp-results-question__option__icon--incorrect{fill:#c1893e;opacity:.5}#enp-quiz .enp-results-question__option__icon--correct{fill:#4e9497;opacity:1}#enp-quiz .enp-results-question__option__percentage--incorrect{color:#c1893e}#enp-quiz .enp-results-question__option__percentage--correct{color:#4e9497}#enp-quiz .enp-results-question__option__number-selected{font-weight:300}#enp-quiz .enp-slider-responses__title{font-size:1rem;text-transform:uppercase;font-weight:400;margin-top:1.6rem}#enp-quiz .enp-slider-responses__line-chart .ct-point{stroke-width:8px}#enp-quiz .enp-slider-responses__line-chart--high,#enp-quiz .enp-slider-responses__line-chart--low{stroke:#bf5700}#enp-quiz .enp-slider-responses__line-chart--correct{stroke:#60aaad}#enp-quiz .enp-slider-responses-table{width:100%}#enp-quiz .enp-slider-responses-table tr.enp-slider-responses-table__response--correct td,#enp-quiz .enp-slider-responses-table tr:nth-child(2n) td{background-color:#fff}#enp-quiz .enp-slider-responses-table__content{box-shadow:none;padding-top:1rem}#enp-quiz .enp-slider-responses-table--hide-zero .enp-slider-responses-table__frequency--zero{display:none}#enp-quiz .enp-slider-responses-table__response-frequency{display:flex;justify-content:space-between;align-items:center}#enp-quiz .enp-slider-responses-table__toggle-zero-frequency{background:#fff;width:100%;box-shadow:inset 1px 1px 0 #ccc,inset -1px -1px 0 #ccc;color:#1d1c25;font-family:Arial,monospace,helvetica,arial,sans-serif;font-size:.9rem;font-weight:400;line-height:1.5;text-transform:none;letter-spacing:0;text-align:left;border:none;border-radius:3px;min-height:3.065rem;padding:1rem 2rem 1rem 1rem;margin:1.6rem 0 0;position:relative;z-index:9;cursor:pointer;transition:all .2s cubic-bezier(0,0,.3,1);width:auto;padding:0 .6rem;margin:0}.enp-quiz-results #enp-quiz .enp-aside{border:none}.enp-quiz-results .enp-results-questions__title__quiz-title{clip:rect(1px,1px,1px,1px);position:absolute!important;left:-10000px;top:auto;width:1px;height:1px;overflow:hidden}#enp-quiz .enp-results--ab{display:block;margin-bottom:3rem}@media (min-width:1000px){#enp-quiz .enp-results--ab{display:flex;flex-wrap:wrap;align-content:flex-end;width:50%;padding:10px}}@media (min-width:1000px){#enp-quiz .enp-results--a{padding-right:1rem;border-right:1px solid #ddd}}@media (min-width:1000px){#enp-quiz .enp-results--b{padding-left:1rem}}#enp-quiz .enp-results-title--ab,#enp-quiz .enp-results__container--ab .enp-results-flow__container{min-width:100%}#enp-quiz .enp-results--loser .enp-results-flow__item{border:2px solid #bf5700}#enp-quiz .enp-results--loser .enp-results-flow__item--quiz-starts{background:#ffc696}#enp-quiz .enp-results--loser .enp-results-flow__item--quiz-finishes{background:#ffb06d}#enp-quiz .enp-results--loser .enp-results-questions__title,#enp-quiz .enp-results--loser th{color:#964400}#enp-quiz .enp-results--winner .enp-results-questions__title,#enp-quiz .enp-results--winner th{color:#4e9497}#enp-quiz .enp-results-title--a,#enp-quiz .enp-results-title--b{background:transparent}#enp-quiz .enp-ab-scores{max-width:740px;margin:0 auto}#enp-quiz .enp-ab-scores:after{content:"";display:table;clear:both}@media (min-width:700px){#enp-quiz .enp-ab-scores{max-width:1000px}}@media (min-width:1000px){#enp-quiz .enp-ab-scores{max-width:1440px}}#enp-quiz .enp-ab-scores th.enp-quiz-scores-table__label,#enp-quiz .enp-ab-scores th.enp-quiz-scores-table__score{padding-left:0;padding-right:0}#enp-quiz .enp-ab-scores__title{padding-left:50px;font-size:1rem;text-transform:uppercase}#enp-quiz .enp-quiz-score__line-chart .enp-test-loser .ct-line,#enp-quiz .enp-quiz-score__line-chart .enp-test-loser .ct-point{stroke:#bf5700}#enp-quiz .enp-quiz-scores{margin-top:0}#enp-quiz .enp-ab-scores .enp-quiz-scores-table,#enp-quiz .enp-question-results{margin-bottom:1.6rem}@media (min-width:1000px){#enp-quiz .enp-ab-scores .enp-quiz-scores-table,#enp-quiz .enp-question-results{float:left;width:48%;margin:0}#enp-quiz .enp-ab-scores .enp-quiz-scores-table:first-of-type,#enp-quiz .enp-question-results:first-of-type{margin-right:4%}}#enp-quiz .enp-question-results__container{max-width:740px;margin:0 auto}#enp-quiz .enp-question-results__container:after{content:"";display:table;clear:both}@media (min-width:700px){#enp-quiz .enp-question-results__container{max-width:1000px}}@media (min-width:1000px){#enp-quiz .enp-question-results__container{max-width:1440px}}#enp-quiz .enp-question-results--ab .enp-results-questions__section{background:#fff;border:none;padding:1.6rem 0;margin:1.6rem auto}#enp-quiz .enp-question-results--ab .enp-results-questions__container{padding:0}#enp-quiz .enp-ab-new-embed-code__section{max-width:740px;margin:0 auto;max-width:540px;padding-bottom:2rem;margin-bottom:2rem}#enp-quiz .enp-ab-new-embed-code__section:after{content:"";display:table;clear:both}#enp-quiz .enp-ab-new-embed-code__section .enp-ab-embed-code{padding:0;margin:0}#enp-quiz .enp-ab-embed-code__section{background:#faf9fb;border-bottom:1px solid #ddd;border-top:1px solid #ddd;padding-top:3rem;padding-bottom:3rem;margin-top:3rem;margin-bottom:3rem;padding-top:5rem;margin-top:5rem}#enp-quiz .enp-ab-embed-code{max-width:740px;margin:0 auto}#enp-quiz .enp-ab-embed-code:after{content:"";display:table;clear:both}#enp-quiz .enp-ab-embed-code__title{font-size:1rem;text-transform:uppercase}#enp-quiz .enp-embed-code__textarea{margin-bottom:0}#enp-quiz .enp-embed-code__instructions{font-size:1.1rem}#enp-quiz .enp-slider{margin-bottom:1.6rem}#enp-quiz .enp-slider-input__container{display:flex;align-items:center;justify-content:center;margin:1.6rem auto;position:relative}#enp-quiz .enp-slider-input__label{display:block;color:#343242;font-weight:400;font-size:.85rem;text-transform:uppercase}#enp-quiz .enp-slider-input__prefix,#enp-quiz .enp-slider-input__suffix{font-size:1rem}#enp-quiz .enp-slider-input__prefix{margin-right:.2rem;white-space:pre}#enp-quiz .enp-slider-input__suffix{margin-left:.2rem;white-space:pre}#enp-quiz .enp-slider-input__input{font-size:1rem;font-family:Arial,monospace,helvetica,arial,sans-serif;padding:.8rem .5rem;background:#fff;border:1px solid #aaa;border-radius:3px;width:20rem;max-width:100%;margin-bottom:1.2rem;margin-bottom:0;padding:.75rem;width:auto;transition:all .25s cubic-bezier(0,0,.3,1)}@media (min-width:700px){#enp-quiz .enp-slider-input__input{padding:.8rem;width:100%}}#enp-quiz .enp-slider-input__input--incorrect{color:#bf5700}#enp-quiz .enp-slider-input__input--correct{color:#4e9497}#enp-quiz .enp-slider-input__input--invalid-animation{box-shadow:0 0 2px 1px #c1893e}#enp-quiz .enp-slider_input__range-helper{position:absolute;bottom:-1.2rem;font-size:.8rem}#enp-quiz .enp-slider_input__range-helper--low{left:0}#enp-quiz .enp-slider_input__range-helper--high{right:0}#enp-quiz .enp-slider-input__range-helper__number{position:relative;color:#e8e4ed}#enp-quiz .ui-slider-range-show-correct__tooltip-container{position:relative}#enp-quiz .ui-slider-range-show-correct__tooltip{position:absolute;top:-.4rem;margin-left:-.55rem;height:1rem;width:1.1rem;height:1.1rem;border:2px solid #60aaad;background-color:#fff;border-radius:50%;z-index:9999}#enp-quiz .ui-slider-range-show-correct__tooltip--low{left:0}#enp-quiz .ui-slider-range-show-correct__tooltip--high{right:-.55rem}#enp-quiz .ui-slider-range-show-correct__tooltip__text{position:relative;color:#417d7f;top:-1.35rem;font-size:.825rem;min-width:100%;display:inline-block;text-align:center;text-shadow:0 1px 0 #fff}#enp-quiz .enp-slider{position:relative;text-align:left;background:#ddd}#enp-quiz .enp-slider .ui-helper-hidden{display:none}#enp-quiz .enp-slider .ui-helper-hidden-accessible{border:0;clip:rect(0 0 0 0);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px}#enp-quiz .enp-slider .ui-helper-reset{margin:0;padding:0;border:0;outline:0;line-height:1.3;text-decoration:none;font-size:100%;list-style:none}#enp-quiz .enp-slider .ui-helper-clearfix:after,#enp-quiz .enp-slider .ui-helper-clearfix:before{content:"";display:table;border-collapse:collapse}#enp-quiz .enp-slider .ui-helper-clearfix:after{clear:both}#enp-quiz .enp-slider .ui-helper-clearfix{min-height:0}#enp-quiz .enp-slider .ui-helper-zfix{width:100%;height:100%;top:0;left:0;position:absolute;opacity:0;filter:alpha(opacity=0)}#enp-quiz .enp-slider .ui-front{z-index:100}#enp-quiz .enp-slider .ui-state-disabled{cursor:default!important}#enp-quiz .enp-slider .ui-icon{display:block;text-indent:-99999px;overflow:hidden;background-repeat:no-repeat}#enp-quiz .enp-slider .ui-widget-overlay{position:fixed;top:0;left:0;width:100%;height:100%}#enp-quiz .enp-slider .ui-slider-handle{background:#fff;border-radius:50%;border:1px solid #aaa;position:absolute;z-index:2;width:1.2rem;height:1.2rem;top:-.4rem;margin-left:-.6rem;cursor:default;touch-action:none;transition:opacity .2s cubic-bezier(0,0,.3,1),height .18s cubic-bezier(0,0,.3,1),width .18s cubic-bezier(0,0,.3,1),transform .18s cubic-bezier(0,0,.3,1)}#enp-quiz .enp-slider .ui-slider-handle:focus{outline:none;box-shadow:0 0 3px 1px #4d90fe}#enp-quiz .enp-slider .ui-slider-handle--correct,#enp-quiz .enp-slider .ui-slider-handle--incorrect{width:1.1rem;height:1.1rem;top:-.4rem;margin-left:-.55rem}#enp-quiz .enp-slider .ui-slider-handle--incorrect{z-index:1;border:2px solid #bf5700}#enp-quiz .enp-slider .ui-slider-handle--correct{border:2px solid #60aaad;z-index:99999}#enp-quiz .enp-slider .ui-slider-range{position:absolute;z-index:1;font-size:.7rem;display:block;border:0;background-position:0 0;top:0;height:100%}#enp-quiz .enp-slider .ui-slider-range-show-correct{background:#60aaad;z-index:9}#enp-quiz .enp-slider .ui-slider-range-min{left:0;background:#60aaad}#enp-quiz .enp-slider .ui-slider-range-max{right:0}#enp-quiz .enp-slider.ui-state-disabled .ui-slider-handle,#enp-quiz .enp-slider.ui-state-disabled .ui-slider-range{filter:inherit}#enp-quiz .ui-slider-horizontal{height:.3rem}#enp-quiz .enp-question__answered .enp-slider{background:#bbb}#enp-quiz .enp-question__answered .ui-slider-range-min{background:#fff} /*# sourceMappingURL=enp_quiz-create.min.css.map */ diff --git a/public/quiz-create/css/enp_quiz-create.min.css.map b/public/quiz-create/css/enp_quiz-create.min.css.map index 3523dfee..c33cba9c 100644 --- a/public/quiz-create/css/enp_quiz-create.min.css.map +++ b/public/quiz-create/css/enp_quiz-create.min.css.map @@ -1 +1 @@ -{"version":3,"sources":["_setup.scss","_utilities.scss","_variables.scss","_structure.scss","_typography.scss","_animations.scss","_base.scss","_forms.scss","_quiz-create.scss","_quiz-preview.scss","_quiz-publish.scss","_ab-create.scss","_dashboard.scss","_breadcrumbs.scss","_quiz-results.scss","_ab-results.scss","../../../quiz-take/css/sass/_slider.scss"],"names":[],"mappings":"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","file":"enp_quiz-create.min.css","sourcesContent":["html {\n font-size: 16px!important; // set our rem value reference\n}\n\nhtml #enp-quiz {\n box-sizing: border-box;\n}\n\nbody #enp-quiz {\n background: #fff;\n overflow: hidden;\n}\n\n#enp-quiz {\n *, *:before, *:after {\n box-sizing: inherit;\n }\n\n ul, ol {\n margin: 0 0 1.6rem 1.25rem;\n padding: 0;\n }\n\n textarea {\n margin-bottom: 1rem;\n }\n\n button, input[type=\"button\"], input[type=\"reset\"], input[type=\"submit\"] {\n border: none;\n &:active,\n &:focus,\n &:hover {\n border: none;\n }\n }\n\n iframe {\n border: none;\n }\n}\n","@mixin focus--glow {\n outline-color: #4D90FE;\n outline-offset: -2px;\n outline-style: auto;\n outline-width: 5px;\n}\n\n@mixin disabled {\n opacity: 0.65;\n cursor: default;\n}\n\n@mixin btn {\n text-align: center;\n border: none;\n border-radius: 3px;\n padding: .85em 1.4em .75em;\n font-size: 15px;\n font-weight: 400;\n letter-spacing: .05em;\n color: #fff;\n box-shadow: inset 0 -2px 0 rgba(0,0,0,.2);\n background: $link;\n cursor: pointer;\n text-transform: uppercase;\n transition: all .2s;\n line-height: 1.6;\n\n &:focus,\n &:hover {\n color: #fff;\n box-shadow: none;\n background: $link_hover;\n }\n\n &:active {\n color: #fff;\n box-shadow: inset 0 2px 0 rgba(0,0,0,.1);\n background: lighten($blue, 20);\n }\n\n &:focus {\n @include focus--glow;\n }\n\n &:disabled,\n &:disabled:focus,\n &:disabled:hover {\n background: $link;\n cursor: default;\n opacity: .5;\n\n\n }\n}\n\n@mixin btn--reset {\n border: none;\n background: none;\n box-shadow: none;\n padding: 0;\n margin: 0;\n}\n\n@mixin btn--submit {\n @include btn;\n}\n\n@mixin btn--ghost {\n @include btn;\n border: 2px solid $link;\n background: transparent;\n color: $link;\n box-shadow: none;\n\n &:focus,\n &:hover {\n background: transparent;\n border: 2px solid $link_hover;\n color: $link_hover;\n }\n}\n\n@mixin box-shadow {\n box-shadow: 0 2px 2px rgba(0,0,0,.2);\n}\n\n@mixin btn--dashed {\n @include btn;\n border: 1px dashed $darker_gray;\n background: none;\n color: #545454;\n box-shadow: none;\n\n &:hover,\n &:focus {\n border: 1px dashed $darkest_gray;\n color: $darker_gray;\n background: rgba(255,255,255,.9);\n }\n}\n\n@mixin btn--dashed--light {\n @include btn--dashed;\n border: 2px dashed $darker-gray;\n color: $dark_gray;\n transition: all .2s;\n\n &:hover,\n &:focus {\n color: $darker_gray;\n border: 2px dashed #999;\n }\n}\n\n@mixin btn--dashed--light--alt-bg {\n @include btn--dashed--light ;\n background: $light_gray;\n}\n\n@mixin btn--small {\n font-size: 13px;\n}\n\n@mixin btn--thin {\n padding: 0.4em 1em;\n}\n\n@mixin btn--icon {\n @include btn;\n padding: .75em 0.8em .7em 1.4em;\n}\n\n@mixin btn--icon__icon {\n @include icon--white;\n @include icon--xl;\n position: relative;\n top: 4px;\n}\n\n/*\n* @usage: @include btn--icon(BEM-root-class);\n* Button with icon with white circular background.\n* --------------\n* | BTN TEXT > |\n* --------------\n* @param $rootBEM: root class name that will be extended\n\n@mixin btn--icon($rootBEM) {\n .(#){$rootBEM} {\n @include btn--icon;\n }\n\n .(#){$rootBEM}__icon {\n @include btn--icon__icon ;\n }\n}\n*/\n\n@mixin btn--icon--icon-circle {\n @include btn;\n padding: .65em 1.2em .85em 1.4em;\n}\n\n// use when the icon is larger and on the right\n@mixin btn--icon__icon--circle {\n @include icon--circle;\n @include icon--white-bg;\n @include icon--normal;\n margin-left: 0.5em;\n position: relative;\n top: 0.15rem;\n}\n\n@mixin btn--icon__icon--circle--hover {\n @include icon--white-bg--hover;\n}\n\n/*\n* @usage: @include btn--icon--circle(BEM-root-class);\n* Button with icon with white circular background.\n* ---------------\n* | BTN TEXT (>) |\n* ---------------\n* @param $rootBEM: root class name that will be extended\n*/\n@mixin btn--icon--circle($rootBEM) {\n .#{$rootBEM} {\n @include btn--icon--icon-circle;\n }\n\n .#{$rootBEM}__icon {\n @include btn--icon__icon--circle ;\n\n\n &:hover {\n @include btn--icon__icon--circle--hover ;\n }\n }\n}\n\n/*\n* @usage: @include btn--icon--hover-circle(BEM-root-class);\n* Button with icon. Hovering/focusing button moves\n* the icon to right and fades in a white circular background\n* -------------- ----------------\n* | BTN TEXT > | --hover/focus--> | BTN TEXT (>) |\n* -------------- ----------------\n* @param $rootBEM: root class name that will be extended\n*/\n@mixin btn--icon--hover-circle($rootBEM) {\n .#{$rootBEM} {\n @include btn--icon--icon-circle;\n padding-right: 0.8em;\n }\n\n .#{$rootBEM}__icon {\n @include btn--icon__icon--circle ;\n margin-left: 0;\n width: 1em;\n height: 1em;\n background: transparent;\n fill: #fff;\n transform: translate3d(0, 0, 0);\n transition: all .3s ease-in-out;\n }\n\n .#{$rootBEM}:hover .#{$rootBEM}__icon {\n @include btn--icon__icon--circle--hover ;\n transform: translate3d(1em, 0, 0);\n margin-right: 1em;\n }\n\n\n}\n\n// use on small icons and placed on the left\n@mixin btn--icon__icon--circle--small {\n @include icon--circle--small;\n margin-right: 5px;\n}\n\n\n// use this to match the icon to the inline font-size\n@mixin icon--inline {\n width: 1em;\n height: 1em;\n position: relative;\n top: .125em;\n}\n\n@mixin icon--small {\n width: 1rem;\n height: 1rem;\n}\n\n@mixin icon--normal {\n width: 1.2rem;\n height: 1.2rem;\n}\n\n@mixin icon--large {\n width: 1.5rem;\n height: 1.5rem;\n}\n\n@mixin icon--xl {\n width: 1.8rem;\n height: 1.8rem;\n}\n\n@mixin icon--xxl {\n width: 2.4rem;\n height: 2.4rem;\n}\n\n@mixin icon--xxxl {\n width: 2.8rem;\n height: 2.8rem;\n}\n\n@mixin icon--circle {\n border-radius: 50%;\n fill: #fff;\n}\n\n@mixin border-radius {\n border-radius: 3px;\n}\n\n@mixin icon--circle--pad {\n @include icon--circle ;\n padding: 0.05em;\n\n @include breakpoint(medium) {\n padding: 0.15em;\n }\n}\n\n@mixin icon--circle--pad--xl {\n @include icon--circle ;\n padding: 0.6rem;\n}\n\n@mixin icon--circle--small {\n @include icon--small;\n @include icon--circle;\n padding: 0.02rem;\n}\n\n@mixin icon--white {\n fill: #fff;\n}\n\n@mixin icon--white-bg {\n background: #fff;\n fill: $link;\n}\n\n@mixin icon--white-bg--hover {\n background: #fff;\n fill: $link_hover;\n}\n\n@mixin icon--gray-bg {\n background: $dark_gray;\n fill: $light_gray;\n}\n\n@mixin icon--gray-bg--hover {\n fill: #fff;\n background: $darker_gray;\n}\n\n@mixin small-uppercase {\n font-size: 1rem;\n text-transform: uppercase;\n}\n\n@mixin hint {\n font-size: .7rem;\n font-weight: 300;\n color: #565656;\n}\n\n@mixin green {\n color: $green;\n}\n\n@mixin dark-green {\n color: $dark_green;\n}\n\n@mixin red {\n color: $red;\n}\n\n@mixin fade-red {\n color: $fade_red;\n}\n\n/* Text meant only for screen readers */\n@mixin screen-reader-text {\n clip: rect(1px, 1px, 1px, 1px);\n position: absolute !important;\n left:-10000px;\n top:auto;\n width:1px;\n height:1px;\n overflow:hidden;\n}\n\n@mixin screen-reader-text--hover {\n background-color: #f1f1f1;\n border-radius: 3px;\n box-shadow: 0 0 2px 2px rgba(0, 0, 0, 0.6);\n clip: auto !important;\n color: #21759b;\n display: block;\n font-size: 14px;\n font-weight: bold;\n height: auto;\n left: 5px;\n line-height: normal;\n padding: 15px 23px 14px;\n text-decoration: none;\n top: 5px;\n width: auto;\n z-index: 100000;\n}\n\n@mixin xmargin-vertical {\n margin-top: 2rem;\n margin-bottom: 2rem;\n}\n\n@mixin xmargin-horizontal {\n margin-right: 2rem;\n margin-left: 2rem;\n}\n\n@mixin xpadding-vertical {\n padding-top: 2rem;\n padding-bottom: 2rem;\n}\n\n@mixin xpadding-vertical-top {\n padding-top: 2rem;\n}\n\n@mixin xpadding-horizontal {\n padding-right: 2rem;\n padding-left: 2rem;\n}\n\n@mixin header-space {\n @include breakpoint(large) {\n padding-top: 7rem;\n }\n}\n\n@mixin ul-no-style {\n list-style: none;\n margin-left: 0;\n}\n\n@mixin hidden--accessible {\n height: 0;\n opacity: 0;\n padding: 0;\n overflow: hidden;\n}\n\n@mixin accordion {\n background: #fff;\n width: 100%;\n}\n\n@mixin accordion__header {\n @include accordion ;\n box-shadow: inset 1px 1px 0 #ccc, inset -1px -1px 0 #ccc;\n color: $font;\n font-family: $fontTitle;\n font-size: .9rem;\n font-weight: 400;\n line-height: 1.5;\n text-transform: none;\n letter-spacing: 0;\n text-align: left;\n border: none;\n border-radius: 3px;\n min-height: 3.065rem;\n padding: 1rem 2rem 1rem 1rem;\n margin: 1.6rem 0 0;\n position: relative;\n z-index: 9;\n cursor: pointer;\n transition: all .2s $fastInEaseOut;\n}\n\n@mixin accordion__content {\n @include accordion ;\n box-shadow: inset 1px -1px 0 #ccc, inset -1px -1px 0 #ccc;\n display: block;\n position: relative;\n height: auto;\n overflow: visible;\n margin-bottom: 1.6rem;\n}\n\n@mixin accordion__content--closed {\n margin-top: 0;\n padding-top: 0rem;\n animation: slideOutTop .25s $fastInEaseOut forwards;\n display: none;\n}\n\n@mixin accordion__content--open {\n padding-top: 1.6rem;\n margin-bottom: 2rem;\n animation: slideInTop .45s $fastInEaseOut forwards;\n}\n\n// Share Icons\n@mixin share_icons($rootBEM) {\n\n .#{$rootBEM} {\n @include ul-no-style;\n @include flex-center;\n }\n\n .#{$rootBEM}__item {\n margin-right: 20px;\n\n &:last-child {\n margin-right: 0;\n }\n }\n\n .#{$rootBEM}__item__icon {\n @include icon--xxl;\n @include icon--circle--pad--xl;\n\n fill: #fff!important;\n }\n\n .#{$rootBEM}__item__icon--facebook {\n background-color: #3a5795;\n }\n\n .#{$rootBEM}__item__icon--twitter {\n background-color: #4099ff;\n }\n}\n\n@mixin section--alt {\n background: $light_gray;\n border-bottom: 1px solid #ddd;\n border-top: 1px solid #ddd;\n padding-top: 3rem;\n padding-bottom: 3rem;\n margin-top: 3rem;\n margin-bottom: 3rem;\n}\n\n#enp-quiz {\n .enp-screen-reader-text {\n @include screen-reader-text;\n }\n\n .enp-screen-reader-text:hover,\n .enp-screen-reader-text:active,\n .enp-screen-reader-text:focus {\n @include screen-reader-text--hover;\n }\n\n .enp-accordion-header {\n @include accordion__header ;\n\n &:first-of-type {\n margin-top: 0;\n }\n\n .enp-accordion-header__icon {\n position: absolute;\n fill: $dark_gray;\n right: 0.75rem;\n bottom: 0.75rem;\n transition: all .35s $fastInEaseOut;\n }\n }\n\n .enp-accordion-header--open {\n\n .enp-accordion-header__icon {\n transform: rotateX(180deg) translateY(2px);\n }\n\n }\n\n .enp-accordion-content {\n @include accordion__content ;\n }\n\n .enp-accordion-content--closed {\n @include accordion__content--closed ;\n }\n\n .enp-accordion-content--open {\n @include accordion__content--open ;\n }\n\n .enp-quiz-message {\n @include container--thin;\n background: #fff;\n border: 1px solid #eee;\n border-bottom: 1px solid #ccc;\n padding: 1rem;\n margin-bottom: 1.6rem;\n position: fixed;\n bottom: 0;\n left: 0;\n }\n\n .enp-quiz-message__title {\n @include small-uppercase;\n }\n\n .enp-message__list {\n @include ul-no-style;\n font-size: 1.1rem;\n margin-bottom: 0;\n }\n\n .enp-quiz-message--error {\n border-left: 6px solid $red;\n color: $red;\n }\n\n .enp-quiz-message__title--error {\n color: $dark_red;\n }\n\n .enp-quiz-message--success {\n border-left: 6px solid $green;\n color: $dark_green;\n }\n\n .enp-quiz-message__title--success {\n color: $dark_green;\n }\n\n .enp-quiz-message--note {\n border-left: 6px solid $khaki;\n }\n\n .enp-quiz-message__title--note {\n color: $dark_blue;\n }\n\n .enp-quiz-message__close {\n @include btn--reset;\n position: absolute;\n top: 5px;\n right: 5px;\n }\n\n .enp-quiz-message--ajax {\n margin-bottom: .6rem;\n animation: slideInBottom .3s;\n }\n\n .enp-quiz-message-ajax-container {\n z-index: 9999;\n position: fixed;\n bottom: 10px;\n }\n\n .enp-quiz-message--saving__spinner {\n margin-left: -10px;\n }\n\n .enp-quiz-message--saving__text {\n font-size: 1rem;\n }\n\n textarea.limited-chars,\n input.limited-chars {\n margin-bottom: 0.2rem;\n }\n\n .limited-chars__container {\n color: lighten($dark_gray, 8);\n font-size: 0.8rem;\n display: block;\n text-align: right;\n margin-bottom: 1.2rem;\n }\n\n .limited-chars__counter {\n color: $dark_gray;\n }\n\n .limited-chars__container--error {\n color: $dark_red;\n\n .limited-chars__counter {\n color: $dark_red;\n }\n }\n\n textarea.has-error,\n input.has-error {\n border: 1px solid $red;\n &:focus {\n outline-color: $red;\n }\n\n }\n\n\n\n .enp-tooltip {\n position: relative;\n }\n\n .enp-tooltip__activator {\n\n &:focus + .enp-tooltip__description,\n &:focus > .enp-tooltip__description {\n display: block;\n }\n }\n\n .enp-tooltip__description {\n display: none;\n position: absolute;\n left: 103%;\n margin-bottom: 2rem;\n border-radius: 3px;\n background: $light_gray;\n font-size: 0.9rem;\n padding: 0.9rem;\n max-width: 200px;\n }\n\n\n}\n\n.enp-sticky {\n position: relative;\n left: 0;\n right: 0;\n top: 0;\n z-index: 999;\n\n &.enp-sticky--fixed {\n position: fixed;\n }\n}\n\n.enp-breadcrumb-link {\n font-size: 0.85rem;\n}\n\n.enp-breadcrumb-link__icon {\n position: relative;\n top: 0.45rem;\n left: 0.4rem;\n}\n","//fonts\n$fontBody : Arial,monospace, helvetica, arial, sans-serif;\n$fontTitle : Arial,monospace, helvetica, arial, sans-serif;\n\n// // // colors\n$font : #1d1c25;\n$background: #FAF9FB;\n$title : #5D5E5F;\n\n// Blues\n$blue: #00A9B7;\n$dark_blue: #333F48;\n$light_blue: lighten($blue, 100);\n\n// Grays\n$light_gray: #FAF9FB;\n$really_light_gray: lighten($light_gray, 1);\n$gray: darken($light_gray, 2);\n$dark_gray: darken($gray, 5);\n$darker_gray: darken($dark_gray, 20);\n$darkest_gray: darken($dark_gray, 50);\n\n// Other colors\n$khaki: #CCA562;\n$green: #60AAAD;\n$dark_green: darken($green, 8);\n$red: #bf5700;\n$dark_red: darken($red, 8);\n$fade_red: #C1893E;\n\n// Elements\n$link: #bf5700;\n$link_hover: darken($link, 8);\n// animation\n$fastInEaseOut: cubic-bezier(0.000, 0, .3, 1);\n\n\n$breakpoints: (\n \"small\" : 400px,\n \"medium\" : 700px,\n \"large\" : 1000px\n);\n\n// -----------------------------------------------------------------------------\n// Core\n// -----------------------------------------------------------------------------\n\n// Caching current breakpoint\n// Not meant to be manually edited\n$default-breakpoint: root;\n$current-breakpoint: $default-breakpoint;\n\n// The usual breakpoint mixin\n// Except it updates the $current-breakpoint variable\n// 1. If breakpoint name exists in map\n// 2. Update $current-breakpoint\n// 3. Open a media query\n// 4. Let the user dump content\n// 5. Then reset $current-breakpoint\n// 6. If breakpoint name doesn't exist in map, warn the user\n@mixin breakpoint($breakpoint) {\n $value: map-get($breakpoints, $breakpoint);\n\n @if $value != null { // 1\n $current-breakpoint: $breakpoint !global; // 2\n @media (min-width: $value) { @content; } // 3\n $current-breakpoint: $default-breakpoint !global; // 5\n }\n\n @else {\n @warn \"Invalid breakpoint `#{$breakpoint}`.\"; // 6\n }\n}\n\n// for only targeting a specific device\n// NOTE: DOESN'T SUPPORT THE @include placeholders!!!\n@mixin media($query) {\n @if $query == max-small {\n $media_query: \"max-width: #{map-get($breakpoints, \"small\")}\";\n } @else if $query == only-medium {\n $media_query: \"min-width: #{map-get($breakpoints, \"medium\")}) and (max-width: #{(map-get($breakpoints, \"large\") - 1px)}\";\n } @else if $query == max-medium {\n $media_query: \"max-width: #{(map-get($breakpoints, \"medium\") - 1px)}\";\n } @else if $query == max-large {\n $media_query: \"max-width: #{(map-get($breakpoints, \"large\") - 1px)}\";\n } @else {\n // just use the number provided as a max width\n $media_query: \"max-width: #{$query}\";\n }\n\n @if variable-exists(media_query) {\n @media ($media_query) {\n @content;\n }\n }\n\n}\n","@mixin clearfix {\n &:after {\n content: \"\";\n display: table;\n clear: both;\n }\n}\n\n@mixin container {\n max-width: 740px;\n margin: 0 auto;\n @include clearfix;\n}\n\n@mixin well {\n padding: 1.6rem;\n margin-bottom: 1.6rem;\n background: $light_blue;\n @include border-radius;\n border: 1px solid #eee;\n border-bottom-color: #ccc;\n\n @include breakpoint(medium) {\n margin-bottom: 2.6rem;\n padding: 1.6rem 2rem;\n }\n}\n\n@mixin container--wide {\n @include container;\n\n @include breakpoint(medium) {\n max-width: 1000px;\n }\n\n @include breakpoint(large) {\n max-width: 1440px;\n }\n}\n\n\n@mixin container--thin {\n @include container;\n // max-width: 512px;\n}\n\n@mixin container--really-thin {\n @include container;\n max-width: 300px;\n}\n\n@mixin container--form {\n @include container--thin;\n\n .enp-input,\n .enp-textarea {\n width: 100%;\n }\n}\n\n@mixin container--form--thin {\n @include well;\n @include container--really-thin;\n\n .enp-input,\n .enp-textarea {\n width: 100%;\n }\n}\n\n@mixin flex-container { // no pseudo element to clear and break spacing\n @include container;\n}\n\n@mixin flex-container--wide { // no pseudo element to clear and break spacing\n @include flex-container;\n\n @include breakpoint(medium) {\n max-width: 840px;\n }\n\n @include breakpoint(large) {\n max-width: 1000px;\n }\n}\n\n@mixin flex {\n display: flex;\n}\n\n@mixin flex-list__item {\n flex-basis: 100%;\n margin: 0;\n border-bottom-color: #ddd;\n}\n\n@mixin flex-spread {\n @include flex;\n justify-content: space-between;\n}\n\n@mixin flex-spread-vertical {\n @include flex-spread;\n flex-direction: column;\n}\n\n@mixin flex-spread-around {\n @include flex;\n justify-content: space-around;\n}\n\n@mixin flex-bottom {\n @include flex;\n align-items: flex-end;\n align-content: flex-end;\n}\n\n@mixin flex-center {\n @include flex;\n justify-content: center;\n align-content: center;\n align-items: center;\n}\n\n@mixin flex-vertical-center {\n @include flex;\n align-content: center;\n align-items: center;\n}\n\n@mixin flex-inline {\n @include flex;\n @include ul-no-style;\n margin-bottom: 0;\n}\n\n@mixin flex-inline__item {\n margin-right: 10px;\n\n &:last-of-type {\n margin-right: 0;\n }\n}\n\n\n@mixin flex-grid {\n @include flex;\n flex-flow: column wrap;\n align-items: stretch;\n @include ul-no-style;\n}\n\n@mixin flex-grid__item {\n flex-basis: 100%;\n padding: 1rem 1.2rem;\n background: #fff;\n border: 1px solid #eee;\n border-bottom: 1px solid #ddd;\n list-style: none;\n transition: all .35s $fastInEaseOut;\n margin: 0 0 0.8rem;\n\n // @include breakpoint(medium) {\n // flex-basis: 100%;\n // max-width: 100%;\n // margin: 0 2% 0.8rem 0;\n\n // &:nth-child(2n) {\n // margin-right: 0;\n // }\n // }\n\n // @include breakpoint(large) {\n // flex-basis: 100%;\n // max-width: 100%;\n // margin-right: 1.25%;\n\n // &:nth-child(2n) {\n // margin-right: 1.25%;\n // }\n\n // &:nth-child(3n) {\n // margin-right: 0;\n // }\n // }\n}\n\n@mixin flex-grid__title {\n font-size: 1rem;\n padding-bottom: 0.5rem;\n}\n","body #enp-quiz {\n color: $font;\n font-family: $fontBody;\n font-size: 1em;\n line-height: 1.6;\n font-weight: 400;\n\n @include breakpoint(medium) {\n font-size: 1.3em;\n }\n}\n\n#enp-quiz {\n /* Headings */\n h1,h2,h3,h4,h5,h6 {\n font-family: $fontTitle;\n color: $title;\n clear: both;\n margin: 0 0 .2rem;\n font-weight: bold;\n line-height: 1.2em;\n }\n\n h1 {\n font-size: 2em;\n }\n\n h2 {\n font-size: 1.75em;\n }\n\n h3 {\n font-size: 1.475em;\n }\n\n h4 {\n font-size: 1.3em;\n }\n\n h5 {\n font-size: 1.125em;\n }\n\n h6 {\n font-size: 1em;\n }\n\n p+h1, ul+h1,\n p+h2, ul+h2,\n p+h3, ul+h3,\n p+h4, ul+h4,\n p+h5, ul+h5,\n p+h6, ul+h6 {\n margin-top: 1.8em;\n }\n\n /* Text elements */\n p {\n font-size: 0.85em;\n margin-bottom: 1.125em;\n font-weight: 300;\n }\n ul, ol {\n margin: 0 0 1.6em 1.25em;\n }\n ul {\n list-style: disc;\n }\n ol {\n list-style: decimal;\n }\n li > ul,\n li > ol {\n margin-bottom: 0;\n margin-left: 1.6em;\n }\n\n b, strong {\n font-weight: bold;\n }\n\n dfn, cite, em {\n font-family: georgia, times, serif;\n font-style: italic;\n }\n\n pre {\n background: #eee;\n font-family: \"Courier 10 Pitch\", Courier, monospace;\n font-size: .95em;\n line-height: 1.6;\n margin-bottom: 1.6em;\n padding: 1.6em;\n overflow: auto;\n max-width: 100%;\n }\n .code, code, kbd, tt, var {\n font: .7em Monaco, Consolas, \"Andale Mono\", \"DejaVu Sans Mono\", monospace;\n }\n\n table {\n border: none;\n\n th {\n font-family: $fontTitle;\n font-size: .8rem;\n text-transform: uppercase;\n border: none;\n border-bottom: 1px solid #ddd;\n }\n\n td {\n font-family: $fontBody;\n font-size: 1rem;\n border: none;\n border-bottom: 1px solid #eee;\n }\n\n tr:nth-child(even) td {\n background: $really_light_gray;\n }\n\n tr:last-child td {\n border-bottom: none;\n }\n }\n\n figure {\n margin: 0;\n }\n\n img {\n height: auto; /* Make sure images are scaled correctly. */\n max-width: 100%; /* Adhere to container width. */\n }\n\n /* Links */\n a {\n color: $link;\n text-decoration: none;\n transition: color .2s;\n touch-action: manipulation; // remove 300ms delay for ie\n\n .enp-icon {\n fill: $link;\n }\n }\n\n a:hover,\n a:focus,\n a:active {\n color: $link_hover;\n\n .enp-icon {\n fill: $link_hover;\n }\n }\n\n button {\n &:focus {\n @include focus--glow;\n }\n }\n\n .enp-btn {\n @include btn;\n }\n\n\n .enp-btn--add {\n @include btn--dashed;\n width: 100%;\n }\n\n .enp-btn--disabled {\n @include disabled;\n }\n\n .enp-btn--enabled {\n animation: expand .6s;\n }\n\n .enp-icon {\n width: 24px;\n height: 24px;\n transition: all .2s;\n }\n\n .enp-page-title {\n font-size: 1.6rem;\n }\n}\n","@keyframes slideInBottom {\n 0% {\n opacity: 0;\n transform: translate3d(0, 100px, 0);\n }\n 100% {\n opacity: 1;\n transform: translate3d(0, 0, 0);\n }\n}\n\n@keyframes slideInTop {\n 0% {\n opacity: 0;\n height: auto;\n transform: translate3d(0, -20px, 0);\n }\n 100% {\n opacity: 1;\n height: auto;\n transform: translate3d(0, 0, 0);\n }\n}\n\n@keyframes slideInTop--reduced-opacity {\n 0% {\n opacity: 0;\n height: auto;\n transform: translate3d(0, -20px, 0);\n }\n 100% {\n opacity: 0.8;\n height: auto;\n transform: translate3d(0, 0, 0);\n }\n}\n\n\n@keyframes slideOutTop {\n 0% {\n overflow: hidden;\n height: 100px;\n opacity: 1;\n transform: translate3d(0, 0, 0);\n }\n 100% {\n height: 0;\n opacity: 0;\n transform: translate3d(0, -20px, 0);\n }\n}\n\n@keyframes removeElement {\n 0% {\n opacity: 1;\n transform: translate3d(0, 0, 0);\n }\n 100% {\n padding: 0;\n margin: 0;\n opacity: 0;\n height: 0;\n z-index: -1;\n transform: translate3d(-200px, 0, 0);\n }\n}\n\n@keyframes removeAnswers {\n 0% {\n opacity: 1;\n transform: translate3d(0, 0, 0);\n }\n 100% {\n padding: 0;\n opacity: 0;\n display: none;\n height: 0;\n z-index: -1;\n transform: translate3d(-200px, 0, 0);\n }\n}\n\n@keyframes removeQuestion {\n 0% {\n opacity: 1;\n transform: translateX(0);\n }\n 100% {\n opacity: 0;\n transform: translateX(-200px);\n }\n}\n\n@keyframes showNextQuestion {\n 0% {\n opacity: 0;\n transform: translateX(200px);\n }\n\n 100% {\n opacity: 1;\n transform: translateX(0);\n }\n}\n\n@keyframes expand {\n 0% {\n opacity: 0.8;\n transform: scale3d(1, 1, 1);\n box-shadow: 0 0 0px rgba(0,0,0,.3);\n }\n\n 40% {\n opacity: 1;\n }\n\n 70% {\n opacity: 1;\n transform: scale3d(1.1, 1.1, 1);\n box-shadow: 0 0 8px rgba(0,0,0,.4);\n }\n\n 100% {\n opacity: 1;\n transform: scale3d(1, 1, 1);\n box-shadow: 0 0 0px rgba(0,0,0,.3), inset 0 2px 0 rgba(0,0,0,.2);\n }\n}\n\n@keyframes checkmark {\n 0% {\n opacity: 0;\n transform: scale3d(0.2, 0.2, 1);\n }\n 5% {\n opacity: 1;\n }\n 10% {\n transform: scale3d(1.4, 1.4, 1);\n }\n 12% {\n transform: scale3d(1, 1, 1);\n }\n 90% {\n opacity: 1;\n transform: scale3d(1, 1, 1);\n }\n 92% {\n transform: scale3d(1.4, 1.4, 1);\n }\n 100% {\n opacity: 0;\n transform: scale3d(0.2, 0.2, 1);\n }\n\n}\n\n@keyframes fadeOut {\n 0% {\n opacity: 1;\n }\n 100% {\n opacity: 0;\n }\n}\n\n@keyframes fadeIn {\n 0% {\n opacity: 0;\n }\n 100% {\n opacity: 1;\n }\n}\n\n@keyframes navSlideIn {\n 0% {\n transform: translate3d(0, -200px, 0);\n }\n 100% {\n transform: translate3d(0, 0, 0);\n }\n}\n\n\n.spinner {\n margin: 0 auto;\n width: 70px;\n text-align: center;\n}\n\n.spinner > div {\n width: 18px;\n height: 18px;\n background-color: #333;\n\n border-radius: 100%;\n display: inline-block;\n -webkit-animation: sk-bouncedelay 1.4s infinite ease-in-out both;\n animation: sk-bouncedelay 1.4s infinite ease-in-out both;\n}\n\n.spinner .bounce1 {\n -webkit-animation-delay: -0.32s;\n animation-delay: -0.32s;\n}\n\n.spinner .bounce2 {\n -webkit-animation-delay: -0.16s;\n animation-delay: -0.16s;\n}\n\n@-webkit-keyframes sk-bouncedelay {\n 0%, 80%, 100% { -webkit-transform: scale(0) }\n 40% { -webkit-transform: scale(1.0) }\n}\n\n@keyframes sk-bouncedelay {\n 0%, 80%, 100% {\n -webkit-transform: scale(0);\n transform: scale(0);\n } 40% {\n -webkit-transform: scale(1.0);\n transform: scale(1.0);\n }\n}\n","#enp-quiz {\n transition: background .25s $fastInEaseOut;\n\n .enp-container {\n // @include container;\n }\n\n .enp-aside {\n @include well;\n @include container--thin;\n font-size: 1.2rem;\n }\n\n .enp-aside__title {\n @include small-uppercase;\n font-weight: 600;\n }\n\n .enp-page-title {\n border-bottom: 2px solid $blue;\n }\n}\n","\n\n// enter the root BEM class and this will output the correct CSS for you\n@mixin radio-block($rootBEM) {\n .#{$rootBEM}__legend {\n @include radio-block__legend ;\n }\n\n .#{$rootBEM}__input {\n @include radio-block__input ;\n }\n\n .#{$rootBEM}__label {\n @include radio-block__label ;\n }\n\n .#{$rootBEM}__input:checked + .#{$rootBEM}__label {\n @include radio-block__label--checked ;\n }\n\n .#{$rootBEM}__input:focus + .#{$rootBEM}__label {\n @include radio-block__label--focus ;\n }\n}\n\n@mixin radio-inline($rootBEM) {\n .#{$rootBEM}__legend {\n @include radio-inline__legend ;\n }\n\n .#{$rootBEM}__input {\n @include radio-inline__input ;\n }\n\n .#{$rootBEM}__label {\n @include radio-inline__label ;\n }\n\n .#{$rootBEM}__input:checked + .#{$rootBEM}__label {\n @include radio-inline__label--checked ;\n }\n\n .#{$rootBEM}__input:focus + .#{$rootBEM}__label {\n @include radio-inline__label--focus ;\n }\n\n}\n\n@mixin label {\n display: block;\n color: lighten($font, 10);\n font-weight: normal;\n font-size: 0.85rem;\n text-transform: uppercase;\n}\n\n@mixin legend {\n @include label;\n padding-top: 1.6rem;\n margin-bottom: 0.2rem;\n border: none;\n}\n\n@mixin label--bold {\n @include label;\n font-weight: 500;\n}\n\n@mixin legend--bold {\n @include label--bold;\n}\n\n@mixin input {\n font-size: 1rem;\n font-family: $fontBody;\n padding: 0.8rem 0.5rem;\n background: #fff;\n border: 1px solid #aaa;\n border-radius: 3px;\n width: 20rem;\n max-width: 100%;\n margin-bottom: 1.2rem;\n\n @include breakpoint(medium) {\n padding: 0.8rem;\n width: 100%;\n }\n}\n\n@mixin input--large {\n @include input;\n padding: 1rem 1.2rem;\n font-size: 1rem;\n}\n\n@mixin input--xl {\n @include input;\n font-weight: bold;\n font-size: 1.6rem;\n margin-bottom: 1rem;\n\n &::placeholder {\n font-weight: bold;\n }\n}\n\n@mixin textarea {\n @include input;\n line-height: 1.5;\n\n &:focus {\n @include focus--glow;\n }\n}\n\n\n/*\n@mixin no-radio__input {\n display: inline-block;\n width: 0;\n margin: 0;\n padding: 0;\n opacity: 0;\n overflow: hidden;\n}\n\n@mixin no-radio__label {\n display: inline-block;\n position: relative;\n left: -1rem;\n padding: .2rem .6rem;\n @include small-uppercase;\n font-size: .8rem;\n font-weight: normal;\n background: transparent;\n border-radius: 3px;\n transition: all .2s;\n}*/\n\n@mixin radio-block__legend {\n @include legend;\n margin-bottom: 0.6rem;\n}\n\n@mixin radio-block__input {\n position: absolute;\n z-index: 9;\n margin-left: 9px;\n}\n\n@mixin radio-block__label {\n text-transform: capitalize;\n background: #f2f2f2;\n display: block;\n padding: 5px 10px 5px 39px;\n position: relative;\n top: -6px;\n box-shadow: inset -1px -1px 0 rgba(0,0,0,.1), inset 30px 0px 0 rgba(255,255,255,.7), inset 31px 0px 0 rgba(0,0,0,.1);\n}\n\n@mixin radio-block__label--checked {\n background: $green;\n color: #fff;\n text-shadow: 0 0 1px rgba(0,0,0,.7);\n}\n\n@mixin radio-block__label--focus {\n z-index: 8;\n @include focus--glow ;\n}\n\n@mixin radio-inline__legend {\n @include legend;\n}\n\n@mixin radio-inline__input {\n @include screen-reader-text;\n}\n\n@mixin radio-inline__label {\n text-transform: capitalize;\n display: inline-block;\n padding: 0.2rem 0.5rem;\n border-radius: 3px;\n cursor: pointer;\n}\n\n@mixin radio-inline__label--checked {\n @include radio-block__label--checked ;\n}\n\n@mixin radio-inline__label--focus {\n @include radio-block__label--focus ;\n}\n\n@mixin select--wide--chevron {\n width: 100%;\n -webkit-appearance: none;\n -moz-appearance: none;\n appearance: none;\n font-size: 0.85rem;\n padding: 0.7rem 32px 0.7rem 0.8rem;\n border: 1px solid #bbb;\n border-radius: 3px;\n margin-bottom: 1.6rem;\n background: url(../svg/chevron-down.svg) 100% 50% no-repeat;\n background-color: #fff;\n box-shadow: inset -26px 0 0 rgba(0,0,0,.1);\n}\n\n\n#enp-quiz {\n\n fieldset {\n border: none;\n margin: 0;\n padding: 0;\n }\n\n .enp-label {\n @include label;\n }\n\n .enp-legend {\n @include legend;\n }\n\n .enp-input {\n @include input;\n\n &.enp-input--has-description {\n margin-bottom: 0.2rem;\n }\n }\n\n .enp-textarea-description,\n .enp-input-description {\n margin-bottom: 1rem;\n font-size: 0.85rem;\n }\n\n .enp-textarea-description--before,\n .enp-input-description--before {\n margin-bottom: 0;\n }\n\n .enp-input::placeholder,\n .enp-textarea::placeholder {\n font-family: $fontBody;\n font-weight: 300;\n color: lighten($font, 40);\n }\n\n .enp-textarea {\n @include textarea;\n\n &.enp-textarea--has-description {\n margin-bottom: 0.2rem;\n }\n &.enp-textarea--has-description--before {\n margin-bottom: 1.2rem;\n }\n }\n\n .enp-embed-code {\n @include textarea;\n padding: 1.6rem;\n font-size: 0.7rem;\n font-family: Monaco, Consolas, \"Andale Mono\", \"DejaVu Sans Mono\", monospace;\n\n @include media(max-medium) {\n padding: .8rem;\n }\n }\n}\n","#enp-quiz {\n // .enp-publish-page-container,\n // .enp-preview-page-container {\n // @include container--wide;\n // position: relative;\n // @include xpadding-vertical;\n // background: $really_light_gray;\n\n\n // }\n\n .enp-publish-page-container,\n .enp-quiz-form-container,\n .enp-preview-page-container {\n display: grid;\n grid-column: 2/-1;\n gap: 1rem;;\n width: 100%;\n justify-items: center;\n \n @include media(max-small) {\n padding-left: 8px;\n padding-right: 8px;\n }\n }\n // .enp-breadcrumb-link__container {\n // display: grid;\n // grid-column: 1/span 1;\n // justify-content: center;\n // align-items: flex-start;\n // @include xpadding-vertical;\n // }\n .enp-quiz-form {\n display: grid;\n padding-left: 0;\n padding-right: 0;\n @include breakpoint(medium) {\n width: 100%;\n max-width: 40rem;\n }\n }\n\n .enp-preview-page-flex-container {\n display: grid;\n gap: 1rem;\n\n @include breakpoint(medium) {\n grid-template-columns: 1fr 3fr;\n padding: 0 2rem;\n }\n }\n\n .enp-quiz-title__label {\n @include label--bold;\n }\n\n .enp-quiz-title__textarea {\n @include input--xl;\n }\n \n textarea {\n color: #000;\n }\n\n .enp-accordion-container {\n margin-bottom: 1.6rem;\n position: relative;\n }\n\n .enp-question-content {\n @include accordion;\n padding-top: 0;\n position: relative;\n }\n\n .enp-question-inner {\n padding: 1.6rem 1.6rem 1rem;\n\n @include breakpoint(medium) {\n padding-right: 2.8rem;\n padding-left: 2.9rem;\n }\n\n }\n\n .enp-question-title__label {\n @include label--bold;\n }\n\n .enp-question-title__textarea {\n @include input--large;\n }\n\n .enp-question-image-upload {\n @include btn--dashed--light--alt-bg;\n @include small-uppercase;\n position: relative;\n margin-bottom: 2rem;\n transform: translate3d(0, 0, 0);\n transition: all .3s $fastInEaseOut;\n\n .enp-question-image-upload__icon--photo {\n @include icon--xxxl;\n opacity: 0;\n position: absolute;\n top: 0;\n left: 0;\n right: 0;\n margin: 0 auto;\n transform: translate3d(0, 0, 0);\n z-index: -1;\n transition: opacity .2s, transform .3s $fastInEaseOut;\n }\n\n .enp-question-image-upload__icon--add {\n @include icon--circle--small;\n @include icon--gray-bg;\n margin-right: 5px;\n position: relative;\n top: 0.2rem;\n }\n\n &:hover,\n &:focus,\n &:active {\n padding-top: 5rem;\n padding-bottom: 2rem;\n\n .enp-question-image-upload__icon--photo {\n opacity: 1;\n z-index: 1;\n transform: translate3d(0, 1.75rem, 0);\n }\n\n .enp-question-image-upload__icon--add {\n @include icon--gray-bg--hover;\n }\n }\n }\n\n .enp-question-image__container {\n position: relative;\n margin-bottom: 1rem;\n }\n\n .enp-question-image {\n margin-bottom: 1.2rem;\n }\n\n @include radio-inline(enp-question-type);\n\n .enp-question-type__label {\n position: relative;\n z-index: 9;\n }\n\n .enp-slider-options,\n .enp-mc-options {\n margin-top: 0rem;\n display: none;\n animation: slideOutTop .25s $fastInEaseOut forwards;\n animation-delay: 0s, .05s;\n }\n\n .enp-question-type__input--slider:checked ~ .enp-slider-options,\n .enp-question-type__input--mc:checked ~ .enp-mc-options {\n visibility: visible;\n display: block;\n animation: fadeIn .45s $fastInEaseOut forwards;\n }\n\n .enp-mc-options__list {\n @include ul-no-style;\n }\n\n .enp-mc-option {\n position: relative;\n padding-left: 6px;\n\n @include breakpoint(medium) {\n padding-left: 0;\n }\n }\n\n .enp-mc-options__legend {\n @include legend--bold;\n }\n\n .enp-mc-option__add,\n .enp-mc-option__button--correct,\n .enp-mc-option__button--delete {\n display: none;\n }\n\n .enp-question-type__input--mc:checked ~ .enp-mc-options {\n .enp-mc-option__add,\n .enp-mc-option__button--correct,\n .enp-mc-option__button--delete {\n display: block;\n }\n }\n\n .enp-button__question-image-delete,\n .enp-mc-option__button--delete {\n @include btn--reset;\n position: absolute;\n top: 9px;\n right: -24px;\n fill: #bbb;\n cursor: pointer;\n\n @include breakpoint(medium) {\n right: -30px;\n }\n\n &:focus,\n &:hover {\n fill: $red;\n }\n }\n\n .enp-mc-option__button--correct {\n @include btn--reset;\n position: absolute;\n top: 8px;\n left: -24px;\n\n @include breakpoint(medium) {\n left: -35px;\n }\n\n .enp-mc-option__icon--correct {\n @include icon--circle--pad;\n width: 28px;\n height: 28px;\n fill: #fff;\n background: #fff;\n cursor: pointer;\n border: 2px solid $fade_red;\n transition: all .2s;\n }\n\n &:focus .enp-mc-option__icon--correct,\n &:hover .enp-mc-option__icon--correct {\n background: #fff;\n border-color: $green;\n fill: $green;\n }\n\n &:disabled {\n opacity: 1;\n\n .enp-mc-option__icon--correct {\n cursor: default;\n fill: #fff;\n border: 2px solid transparent;\n }\n }\n }\n\n .enp-mc-option--correct {\n .enp-mc-option__input {\n box-shadow: inset 0 0 3px $green;\n border: 1px solid $green;\n }\n\n .enp-mc-option__button--correct:focus .enp-mc-option__icon--correct,\n .enp-mc-option__button--correct:hover .enp-mc-option__icon--correct,\n .enp-mc-option__icon--correct {\n fill: #fff;\n border-color: $green;\n background: $green;\n }\n }\n\n .enp-mc-option__add {\n @include btn--dashed--light--alt-bg;\n @include small-uppercase;\n text-align: left;\n padding: 0.7rem 0.75rem 0.8rem;\n\n .enp-mc-option__add__icon {\n @include btn--icon__icon--circle--small ;\n @include icon--gray-bg;\n position: relative;\n top: 0.2rem;\n }\n\n &:hover .enp-mc-option__add__icon {\n @include icon--gray-bg--hover;\n }\n }\n\n .enp-slider-options .enp-input {\n max-width: 11.8rem;\n }\n\n .enp-slider-range__container .enp-input,\n .enp-slider-correct__container .enp-input {\n max-width: 8.8rem;\n @include breakpoint('small') {\n max-width: 11.8rem;\n }\n }\n\n .enp-slider-preview {\n border: 1px solid #ddd;\n margin-top: 0.2rem;\n margin-bottom: 1.6rem;\n padding: 1.6rem 1.6rem .6rem;\n position: relative;\n\n .enp-label--slider-preview {\n position: absolute;\n width: 100%;\n top: 0.2rem;\n left: 0.4rem;\n font-size: 0.75rem;\n text-transform: uppercase;\n }\n }\n\n .enp-slider-range__container,\n .enp-slider-correct__container {\n @include flex-spread;\n align-items: center;\n }\n\n .enp-slider-range__helper,\n .enp-slider-correct__helper {\n color: #777;\n font-size: 0.85rem;\n background: #fff;\n padding: 0 .3rem;\n position: relative;\n\n &:before {\n content: '';\n position: absolute;\n top: 44%;\n height: 4px;\n background: #ddd;\n width: 120px;\n left: -60px;\n z-index: -1;\n transition: width 0.7s $fastInEaseOut, background 1.6s $fastInEaseOut;\n }\n }\n\n .enp-slider-options {\n margin-bottom: 2rem;\n\n .enp-accordion-header {\n text-transform: uppercase;\n font-size: 0.85rem;\n padding: 0.675rem;\n }\n\n .enp-slider-advanced-options__content {\n border: none;\n box-shadow: none;\n padding-top: 1rem;\n padding-bottom: 0;\n margin-bottom: 0;\n }\n }\n\n .enp-slider-correct-high__container {\n position: relative;\n }\n\n .enp-slider-correct-high__input-container--hidden {\n display: none;\n }\n\n .enp-slider-correct__helper--hidden {\n &:before {\n width: 0;\n background: $green;\n }\n }\n\n .enp-slider-correct-answer-range--add-range {\n @include btn--dashed--light--alt-bg;\n margin-left: 0.8rem;\n font-size: 0.7rem;\n\n @include breakpoint('small') {\n font-size: 0.8rem;\n padding: .7rem;\n }\n\n @include breakpoint('medium') {\n padding: .7rem 1.2rem;\n min-width: 11.4rem;\n }\n\n .enp-slider-correct-answer-range__icon {\n @include btn--icon__icon--circle--small ;\n @include icon--gray-bg;\n position: relative;\n left: -0.2rem;\n }\n\n &:hover .enp-slider-correct-answer-range__icon {\n @include icon--gray-bg--hover;\n }\n }\n\n .enp-slider-correct-answer-range--remove-range {\n position: absolute;\n right: -1.6rem;\n bottom: 1.6rem;\n background: none;\n border: none;\n box-shadow: none;\n padding: 0 0.1rem;\n\n .enp-slider-correct-answer-range__icon {\n width: 1.2em;\n height: 1.2em;\n fill: $dark_gray;\n }\n\n &:hover,\n &:focus {\n .enp-slider-correct-answer-range__icon {\n fill: $red;\n }\n }\n\n @include breakpoint(medium) {\n top: -0.2rem;\n right: -0.2rem;\n bottom: auto;\n }\n\n }\n\n .enp-slider-options .enp-input:read-only {\n background: $light_gray;\n }\n\n .enp-answer-explanation {\n background: $light_blue;\n padding-top: 2rem;\n box-shadow: inset 1px 0px 0 #ccc, inset -1px -1px 0 #ccc, inset 0 1px 0 #ddd;\n }\n\n .enp-answer-explanation__label {\n @include label--bold;\n\n }\n\n .enp-question__button--delete {\n @include btn--reset;\n position: absolute;\n top: 9px;\n right: 9px;\n fill: #bbb;\n cursor: pointer;\n\n @include breakpoint(medium) {\n right: -30px;\n }\n\n &:hover {\n fill: $red;\n }\n }\n\n .enp-question__move {\n position: absolute;\n left: 15px;\n\n @include breakpoint(medium) {\n left: -40px;\n }\n }\n\n .enp-sort__placeholder {\n background: #ddd;\n height: 60px;\n width: 100%;\n max-height: 120px;\n margin-bottom: 1.6rem;\n }\n\n .ui-sortable .ui-sortable-helper {\n .ui-sortable-handle {\n cursor: move;\n cursor: grabbing;\n cursor: -webkit-grabbing;\n }\n }\n \n\n .enp-question__button--move {\n @include btn--reset;\n position: absolute;\n fill: #bbb;\n cursor: pointer;\n\n &:hover, &:focus {\n fill: #333;\n }\n\n &:disabled {\n opacity: 0.5;\n }\n }\n\n .enp-question__button--move--up {\n top: 0px;\n left: -9px;\n }\n\n\n .enp-question__button--move--down {\n top: 3px;\n right: -9px;\n }\n\n .enp-quiz-form__add-question {\n @include btn--icon;\n @include btn--dashed;\n padding-top: 1rem;\n padding-bottom: 1rem;\n margin-top: 1.6rem;\n margin-bottom: 2rem;\n\n .enp-add-question__icon {\n @include btn--icon__icon--circle--small;\n @include icon--normal;\n @include icon--gray-bg;\n position: relative;\n top: 0.2rem;\n }\n\n &:hover .enp-add-question__icon {\n @include icon--gray-bg--hover;\n }\n }\n\n .enp-btn--save__btns {\n @include flex;\n align-items: center;\n align-items: flex-start;\n }\n\n .enp-quiz-form__save {\n @include btn;\n width: 100%;\n margin-bottom: 1rem;\n opacity: 0.8;\n text-shadow: 0px -1px 2px rgba(0,0,0,.6);\n\n &:hover,\n &:focus {\n opacity: 1;\n }\n\n @include breakpoint(small) {\n padding: 1.2rem 1.8rem 1.1rem;\n width: 27%;\n margin-right: 3%;\n position: relative;\n }\n }\n\n .enp-quiz-form__save--reveal {\n animation: slideInTop--reduced-opacity .3s $fastInEaseOut;\n }\n\n @include btn--icon--circle(enp-btn--next-step);\n\n .enp-btn--next-step {\n // @include btn;\n width: 100%;\n padding: 1rem 1.4rem 1rem;\n\n @include breakpoint(medium) {\n padding: 1.2rem 1.8rem 1.1rem;\n }\n .enp-btn--next-step__icon {\n width: 1rem;\n height: 1rem;\n }\n // @include breakpoint(small) {\n // width: auto;\n // }\n\n /*\n * AFTER we have removed the Save button,\n * use this code to add the preview button into the\n * header\n @include media(max-medium) {\n padding: 1rem 1.4rem 1rem;\n }\n\n @include breakpoint(medium) {\n position: absolute;\n right: 20px;\n top: 10px;\n width: auto;\n z-index: 999999;\n\n &.enp-btn--next-step--fixed {\n position: fixed;\n animation: navSlideIn .25s;\n }\n }*/\n\n }\n\n .enp-btn--next-step--reveal {\n animation: slideInTop .3s $fastInEaseOut;\n }\n\n\n // UX interactions\n .enp-mc-option--inputs,\n .enp-accordion-header--inserting {\n animation: slideInBottom .4s $fastInEaseOut forwards;\n }\n\n .enp-mc-option--remove,\n .enp-question--remove,\n .enp-question__image--remove {\n animation: removeElement .5s $fastInEaseOut forwards;\n }\n\n .enp-image-upload-wait {\n @include btn--dashed--light--alt-bg;\n padding-top: 4rem;\n padding-bottom: 4rem;\n margin-bottom: 1rem;\n width: 100%;\n }\n\n // validation\n .enp-accordion-header.question-has-error {\n color: $red;\n box-shadow: 0 0 3px $red;\n }\n\n}\n\n.enp-quiz.ui-sortable--sorting #enp-quiz .enp-accordion-content {\n display: none;\n}","#enp-quiz {\n\n\n .enp-quiz-settings-container {\n\n @include breakpoint(large) {\n // margin: 0;\n // width: 40%;\n // float: left;\n }\n }\n\n .enp-quiz-preview-container {\n\n @include breakpoint(large) {\n // width: 60%;\n // float: left;\n }\n\n }\n\n .enp-quiz-share__legend,\n .enp-quiz-settings__title {\n position: relative;\n @include small-uppercase;\n font-weight: 600;\n padding-top: 0;\n }\n\n .enp-quiz-settings__form {\n margin-bottom: 3rem;\n overflow: visible;\n @include breakpoint(large) {\n padding: 0;\n margin-bottom: 0;\n }\n }\n\n .enp-fieldset {\n @include breakpoint(medium) {\n // this is necessary to keep the form elements visible on top of the\n // white BG on the sidebar. We can't set this on the whole form bc\n // then the publish button won't be positioned right\n position: relative;\n }\n }\n\n .enp-title-display__legend {\n padding-top: 0;\n\n @include breakpoint(medium) {\n padding-top: 0.4rem;\n }\n }\n\n .enp-quiz-share__input,\n .enp-quiz-styles__input {\n width: 100%;\n }\n\n .enp-quiz-styles__textarea--custom-css {\n font-family: Monaco,Consolas,\"Andale Mono\",\"DejaVu Sans Mono\",monospace;\n font-size: 0.9rem;\n min-height: 200px;\n }\n\n .enp-fieldset--section {\n padding: 1.6rem 1rem;\n\n &.enp-accordion-content--open {\n margin-bottom: 0;\n }\n }\n\n .enp-quiz-share--facebook {\n margin-bottom: 2rem;\n }\n\n @include radio-inline(enp-title-display);\n @include radio-inline(enp-mc-options-order);\n\n .enp-mc-options-order {\n margin-bottom: 1.6rem;\n }\n\n .enp-quiz-share__textarea {\n min-height: 7.6rem;\n margin-bottom: 2rem;\n\n @include breakpoint('medium') {\n min-height: 4.6rem;\n }\n\n @include breakpoint('large') {\n min-height: 7.6rem;\n }\n\n\n }\n\n .enp-preview-form__submit {\n margin-top: 1.6rem;\n margin-bottom: 1.6rem;\n }\n\n .enp-quiz-preview__title {\n @include small-uppercase;\n font-weight: 600;\n }\n\n .enp-preview-form__submit {\n @include btn;\n width: 100%;\n padding-top: 0.85rem;\n padding-bottom: 0.85rem;\n margin-bottom: 1rem;\n opacity: 0.8;\n text-shadow: 0px -1px 2px rgba(0,0,0,.6);\n\n &:hover,\n &:focus {\n opacity: 1;\n }\n }\n\n .enp-preview-form__submit--publish {\n width: 100%;\n position: relative;\n z-index: 99999999;\n padding: 1.05rem 1.8rem .95rem;\n }\n\n .enp-quiz-styles__iris-wrapper {\n position: relative;\n }\n\n // Fix for WP Color Picker formatting\n .iris-picker {\n box-sizing: content-box;\n position: relative;\n z-index: 9999999999;\n top: -1.2rem;\n margin-bottom: 1rem;\n padding-bottom: 3rem;\n padding-right: 30px;\n\n @include breakpoint(large) {\n position: absolute;\n top: -4px;\n left: 0;\n }\n\n &:last-of-type {\n margin-bottom: 0;\n }\n\n .ui-slider-handle:focus,\n .ui-draggable-handle:focus .ui-slider-handle {\n box-shadow: 0 0 3px rgba(0,0,0,.75);\n }\n\n }\n\n .enp-quiz-styles__set-default {\n @include btn--ghost;\n font-size: 0.75rem;\n position: absolute;\n left: 10px;\n bottom: 10px;\n }\n\n .enp-iris__close {\n @include btn--reset;\n position: absolute;\n top: 5px;\n right: 5px;\n fill: #888;\n cursor: pointer;\n }\n\n .enp-quiz-styles__input--color {\n padding-left: 45px;\n }\n\n .enp-quiz-styles__color-demo {\n width: 30px;\n height: 30px;\n border: 1px solid #ccc;\n top: 8px;\n left: 8px;\n border-radius: 3px;\n\n position: absolute;\n }\n\n\n}\n","#enp-quiz {\n /* Removing flexbox layout temporarily\n * because it wasn't laying out correctly before content loading\n * It would snap into the correct layout after a resize or textarea highlight\n .enp-publish-page-container {\n &:before {\n @include breakpoint(medium) {\n position: absolute;\n top: 0;\n bottom: 0;\n left: -100%;\n width: 128%;\n content: '';\n background: #fff;\n border-right: 1px solid #ddd;\n }\n\n @include breakpoint(large) {\n width: 124%;\n }\n }\n\n .enp-quiz-message {\n @include breakpoint(medium) {\n margin-left: 33%;\n }\n\n @include breakpoint(large) {\n margin-left: 26%;\n }\n }\n }\n\n .enp-publish-page-flex-container {\n @include breakpoint(medium) {\n @include flex;\n align-items: stretch;\n flex-direction: row-reverse;\n }\n }\n\n .enp-publish-page__aside-container {\n\n @include breakpoint(medium) {\n position: relative;\n margin: 0 6% 0 0;\n padding: 0;\n width: 24%;\n }\n\n @include breakpoint(large) {\n margin: 0;\n //padding-left: 20px;\n width: 20%;\n }\n }\n\n .enp-share-quiz__container,\n .enp-ab-ad__container {\n @include breakpoint(medium) {\n padding: 0;\n border: none;\n }\n }\n */\n\n .enp-share-quiz__url {\n display: block;\n font-size: 1.5rem;\n line-height: 1.4;\n word-wrap: break-word;\n }\n\n @include share_icons(enp-share-quiz);\n\n .enp-share-quiz {\n justify-content: space-around;\n margin-bottom: 0;\n }\n}\n","#enp-quiz {\n .enp-ab-create__container {\n @include container--wide;\n width: 100%;\n background: $really_light_gray;\n padding-top: 3rem;\n padding-bottom: 3rem;\n }\n\n .enp-ab-create__form {\n @include container--thin;\n }\n\n .enp-ab-create__label {\n @include label--bold;\n }\n\n .enp-ab-create-title__textarea {\n @include input--xl;\n width: 100%;\n }\n\n .enp-ab-create__select {\n @include select--wide--chevron;\n }\n\n .enp-ab-create__submit {\n width: 100%;\n padding-top: 1em;\n padding-bottom: 1em;\n }\n}\n","// TEMP for dev theme\n#headerimg h1 {\n text-align: center;\n font-size: 40px !important;\n}\n#enp-quiz {\n\n &.enp-quiz__main {\n @include container;\n display: grid;\n gap: 1em;\n min-height: 85vh;\n \n @include breakpoint(large) {\n @include container--wide;\n grid-template-columns: 1fr 4fr;\n }\n }\n\n .enp-dash-container {\n @include xpadding-vertical;\n @include xpadding-horizontal;\n transition: all .25s $fastInEaseOut;\n }\n\n .enp-dash__section-aside {\n background-color: $background;\n @include breakpoint(medium) {\n @include xpadding-vertical;\n @include xpadding-horizontal;\n }\n }\n\n .enp-breadcrumb-link__container {\n padding-bottom: 2rem;\n }\n\n .enp-search-quizzes {\n display: flex;\n justify-content: space-between;\n flex-wrap: wrap;\n padding: 1em;\n\n @include breakpoint(medium) {\n padding: 0.2rem 0.8rem;\n flex-wrap: nowrap;\n }\n @include breakpoint(large) {\n @include flex-spread-vertical;\n }\n }\n\n .enp-search-quizzes__form-item {\n margin-bottom: 0.6rem;\n flex: 0 1 48%;\n\n @include breakpoint(small) {\n margin-bottom: 0;\n margin-right: 1rem;\n flex: 1 0 auto;\n }\n\n }\n\n .enp-quiz-search {\n flex: 1 0 100%;\n position: relative;\n @include breakpoint(medium) {\n flex: 1 0 auto;\n }\n }\n\n .enp-search-quizzes__label {\n margin-bottom: 0;\n @include screen-reader-text ;\n }\n\n .enp-search-quizzes__select {\n padding: .3rem;\n border-radius: 3px;\n width: 100%;\n @include breakpoint(large) {\n min-width: 200px;\n }\n }\n\n .enp-quiz-search__input {\n width: 100%;\n margin: 0 0 0.1rem;\n padding: .3rem .3rem .3rem 26px;\n font-size: 0.85rem;\n @include breakpoint(medium) {\n max-width: 200px;\n }\n }\n\n .enp-quiz-search__icon {\n position: absolute;\n bottom: 0.3rem;\n left: 0.2rem;\n width: 21px;\n height: 21px;\n }\n\n .enp-search-quizzes__button {\n padding: 0.2rem 0.8rem;\n }\n\n .enp-search-results-description {\n font-size: 0.85rem;\n }\n\n .enp-search-results-description__link {\n white-space: nowrap;\n }\n\n .enp-search-results-description__icon {\n width: 1.3em;\n height: 1.3em;\n position: relative;\n top: 4px;\n left: 2px;\n }\n\n .enp-dash__section-title {\n @include small-uppercase;\n margin-bottom: 0.325rem;\n border-bottom: 1px solid $dark-gray;\n }\n\n .enp-dash__ab-test-helper--not-enough-quizzes {\n color: $darker-gray;\n }\n\n .enp-view-toggle {\n cursor: pointer;\n opacity: .5;\n display: none; // hide the buttons for small screens\n\n @include breakpoint(medium) {\n display: flex;\n }\n }\n\n .enp-view-toggle__active {\n opacity: 1;\n }\n\n .enp-sort-by {\n margin-left: 5px;\n }\n\n .enp-dash-list {\n @include flex-grid;\n }\n\n .enp-dash-item {\n @include flex-grid__item ;\n @include flex-spread-vertical;\n display: flex;\n flex-direction: column;\n align-content: flex-end;\n justify-content: flex-end;\n border: none;\n border-radius: 3px;\n background-color: $gray;\n }\n\n .enp-dash-item--published {\n box-shadow: inset 4px 0 0 $blue, 0 1px 0 rgba(0,0,0,.1);\n }\n\n .enp-dash-item--draft {\n box-shadow: inset 4px 0 0 $blue, 0 1px 0 rgba(0,0,0,.1);\n }\n\n .enp-dash-item--remove {\n animation: removeElement .5s $fastInEaseOut forwards;\n }\n\n .enp-dash-list--list-view {\n .enp-dash-item {\n margin: 0 0 0.8rem;\n flex-basis: 100%;\n }\n }\n\n .enp-dash-item__spinner {\n @include flex-center ;\n position: absolute;\n top: 0;\n bottom: 0;\n left: 0;\n right: 0;\n background: rgba(245,216,216,0.8);\n width: 100%;\n animation: fadeIn .3s $fastInEaseOut;\n }\n\n .enp-dash-item__header {\n padding: 0.5rem 1rem;\n background: $light_gray;\n border-bottom: 1px solid $dark_gray;\n display: flex;\n justify-content: space-between;\n align-items: center;\n @include border-radius;\n }\n\n .enp-dash-item__title {\n @include flex-grid__title ;\n padding: 0;\n margin-bottom: 0;\n a {\n color: $blue;\n }\n }\n\n .enp-dash-item__content {\n padding: 0rem 0 0.375rem;\n position: relative;\n transition: all .2s $fastInEaseOut;\n }\n\n .enp-dash-item__meta {\n @include hint;\n font-size: 0.75rem;\n }\n\n .enp-dash-item__username {\n word-wrap: break-word;\n padding-left: 0.4rem;\n margin-left: 0.2rem;\n border-left: 1px solid #ddd;\n }\n\n .enp-dash-item__title--ab-test {\n padding-bottom: 0;\n }\n\n .enp-dash-item__ab-quizzes {\n @include ul-no-style;\n font-size: 0.85rem;\n color: $dark_gray;\n margin-bottom: 0.8rem;\n }\n\n .enp-dash-item__nav {\n @include ul-no-style;\n margin-bottom: 0;\n font-size: 0.85rem;\n }\n\n .enp-dash-item__nav__item {\n display: flex;\n margin: 0;\n width: 100%;\n padding: 12px;\n align-items: center;\n &:hover {\n background-color: $gray;\n .enp-dash-item__icon {\n fill: $red;\n }\n }\n a {\n font-weight: normal;\n color: $red;\n @include flex;\n align-items: center;\n\n &:focus {\n outline: 1px dotted $link;\n outline-offset: 1px;\n }\n }\n\n &:last-of-type {\n margin-right: 0;\n }\n }\n\n .enp-dash-item__delete {\n @include btn--reset;\n position: relative;\n padding: 0;\n cursor: pointer;\n @include flex;\n .enp-icon {\n fill: $darker_gray;\n }\n }\n .enp-dash-item__icon {\n fill: $darker_gray;\n width: 15px;\n height: 15px;\n margin-right: 10px;\n // min-width: 15%;\n }\n\n .enp-dash-item__nav--collapsible {\n display: none;\n position: absolute;\n z-index: 2;\n top: 53px;\n right: 1.5rem;\n width: 195px;\n background-color: #fff;\n text-align: left;\n transform: translate3d(0,0,0);\n transition: all .2s $fastInEaseOut;\n\n .enp-dash-item__nav__item {\n padding: 0.5rem 1rem;\n cursor: pointer;\n }\n }\n\n .enp-dash-item__menu-action {\n height: 24px;\n background: none;\n border: none;\n color: #444;\n padding: 0;\n bottom: 0.2rem;\n right: 1.5rem;\n top: 1.5rem;\n cursor: pointer;\n }\n\n .enp-dash-item__menu-action-wrap {\n max-width: 0;\n display: flex;\n flex-direction: column;\n align-items: flex-end;\n }\n\n .enp-dash-item__menu-action__icon {\n width: 15px;\n height: 15px;\n fill: $darker_gray;\n transition: all .3s $fastInEaseOut;\n }\n\n .enp-dash-item__menu-action__icon--bottom {\n \n }\n\n .enp-dash-item--menu-active {\n transform: translate3d(0,-3px,0);\n\n &.enp-dash-item--published {\n box-shadow: inset 4px 0 0 $green, 0 2px 2px rgba(0,0,0,.2);\n }\n\n &.enp-dash-item--draft {\n box-shadow: inset 4px 0 0 lighten($green, 25%), 0 2px 2px rgba(0,0,0,.2);\n }\n\n .enp-dash-item__menu-action__icon--bottom {\n transform: rotateX(180deg);\n }\n // .enp-dash-item__menu-action__icon--top {\n // transform: rotateX(-180deg) translateY(0px);\n // }\n\n .enp-dash-item__nav--collapsible {\n display: block;\n animation: slideInTop .25s $fastInEaseOut forwards;\n @include border-radius;\n @include box-shadow;\n }\n\n .enp-dash-item__content {\n opacity: 0.4;\n }\n\n }\n\n\n .enp-quiz-results {\n display: flex;\n justify-content: space-around;\n list-style: none;\n margin: 0.8rem 0 0;\n padding: 0;\n text-align: center;\n }\n\n .enp-quiz-results__item {\n\n margin: 0 2% 0 0;\n padding: 0;\n color: #454545;\n\n @media (max-width:280px) {\n width: 100%;\n padding: 0;\n margin-bottom: 0.6rem;\n }\n }\n\n .enp-quiz-results__number {\n font-size: 1.6rem;\n line-height: 1;\n position: relative;\n }\n\n .enp-dash-item--draft .enp-quiz-results__number {\n opacity: 0.5;\n }\n\n .enp-quiz-results__number--average-score {\n color: darken($green, 8);\n\n &:after {\n content: '%';\n font-size: .9rem;\n position: absolute;\n top: .3rem;\n right: -1rem;\n }\n }\n\n .enp-quiz-results__label {\n text-transform: uppercase;\n font-size: .7rem;\n font-weight: 300;\n color: #888;\n }\n\n\n .enp-quiz-list__view {\n // @include flex-bottom;\n }\n\n .enp-dash-item--add-new__wrap {\n display: grid;\n gap: 1em;\n grid-template-columns: 1fr 1fr;\n }\n\n .enp-dash-list--quiz__container {\n display: grid;\n gap: 1em;\n @include breakpoint(large) {\n grid-template-columns: 1fr 1fr;\n }\n }\n\n .enp-dash-item--add-new {\n background: none;\n border: none;\n padding: 0;\n position: relative;\n @include header-space;\n }\n\n .enp-dash-link--add-new {\n @include btn--dashed--light;\n justify-content: flex-start;\n color: $link;\n padding: 1rem 1.2rem;\n\n\n @include breakpoint(medium) {\n @include small-uppercase;\n @include flex-center;\n flex-direction: column;\n position: absolute;\n top: 0;\n left: 0;\n right: 0;\n bottom: 0;\n }\n\n .enp-dash-link__icon {\n @include icon--circle;\n @include icon--normal;\n margin-right: 5px;\n\n @include breakpoint(medium) {\n width: 2rem;\n height: 2rem;\n margin: 0.8rem 0 0.2rem;\n }\n }\n\n &:hover {\n color: $link_hover;\n\n .enp-dash-link__icon {\n fill: #fff;\n background: $link_hover;\n }\n }\n\n }\n\n .enp-quiz-message--welcome p {\n color: $font;\n }\n\n // pagination\n .enp-paginate {\n @include ul-no-style ;\n @include flex-center ;\n font-size: 1rem;\n }\n\n .enp-paginate__link {\n @include flex-center ;\n margin: 0 0.2rem;\n padding: 0 0.4rem;\n border-radius: 3px;\n font-weight: normal;\n\n }\n\n .enp-paginate__link--current-page {\n border: 2px solid $blue;\n }\n\n .enp-paginate__item--last-page,\n .enp-paginate__item--first-page {\n display: flex;\n }\n\n .enp-paginate__item--first-page:after,\n .enp-paginate__item--last-page:before {\n content: '...';\n font-size: 1rem;\n position: relative;\n bottom: 0.2rem;\n opacity: 0.6;\n }\n\n .enp-paginate__item--no-gap {\n &:before,\n &:after {\n content:'';\n }\n }\n\n .enp-paginate__item--next-page {\n margin-left: 0.2rem;\n }\n\n .enp-paginate__item--previous-page {\n margin-right: 0.2rem;\n }\n}\n","#enp-quiz {\n .enp-quiz-breadcrumbs {\n grid-row: 1;\n // @include flex-center;\n // position: absolute;\n // top: 0;\n // width: 1000%;\n // left: -500%;\n // right: -500%;\n // margin-left: auto;\n // margin-right: auto;\n // background: #fff;\n // border-bottom: 1px solid #ddd;\n // padding: 10px;\n // z-index: 99999;\n }\n\n .enp-quiz-breadcrumbs__list {\n @include flex-inline;\n }\n\n .enp-quiz-breadcrumbs__item {\n @include flex-inline__item ;\n @include flex-center;\n fill: $link;\n margin-right: 5px;\n\n @include breakpoint(small) {\n margin-right: 10px;\n }\n }\n\n .enp-quiz-breadcrumbs__link--disabled {\n @include disabled;\n }\n\n .enp-quiz-breadcrumbs__link--active {\n @include btn--ghost;\n @include btn--thin;\n }\n\n .enp-quiz-breadcrumbs__link {\n font-size: 1rem;\n font-weight: 400;\n text-transform: none;\n letter-spacing: 0;\n }\n\n // JS\n .enp-quiz-breadcrumbs--fixed {\n top: 0;\n position: fixed;\n animation: navSlideIn .25s;\n }\n}\n","#enp-quiz {\n .enp-results-title {\n font-size: 1.6rem;\n text-align: center;\n padding: 3.2rem 20px 2.6rem;\n background: $really_light_gray;\n margin: -1.2rem 0 2rem;\n border-bottom: 1px solid #ddd;\n\n &:after {\n @include small-uppercase;\n display: block;\n content: \"RESULTS\";\n font-weight: normal;\n }\n }\n\n .enp-results__container {\n @include container--wide;\n display: block;\n\n @include breakpoint(large) {\n display: flex;\n @include flex-spread;\n }\n }\n\n .enp-results__container,\n .enp-quiz-scores__container,\n .enp-results-flow__container {\n @include media(max-medium) {\n padding: 8px;\n }\n }\n\n .enp-quiz-scores__container,\n .enp-results-flow__container {\n width: 100%;\n\n @include breakpoint(large) {\n width: 48%;\n }\n }\n\n .enp-quiz-scores {\n margin-top: 2.6rem;\n }\n\n .enp-quiz-score__line-chart {\n height: 300px;\n margin-bottom: 1rem;\n\n .ct-label {\n color: $font;\n }\n\n .ct-grid {\n stroke: #dadada;\n stroke-dasharray: 0;\n }\n\n .ct-line {\n stroke: $green;\n stroke-width: 2px;\n }\n\n .ct-point {\n stroke: $green;\n stroke-width: 8px;\n }\n }\n\n .enp-quiz-scores-table {\n width: 100%;\n max-width: 500px;\n margin: 0 auto;\n\n tr th {\n background-color: #fff;\n }\n }\n\n .enp-quiz-scores-table__label {\n padding-left: 5%;\n }\n\n .enp-quiz-scores-table__score {\n text-align: right;\n padding-right: 5%;\n }\n\n .enp-results-flow {\n position: relative;\n margin: 2rem auto;\n width: 320px;\n height: 320px;\n border-radius: 50%;\n\n @include media(300px) {\n left: -100px;\n }\n\n @include breakpoint(small) {\n width: 390px;\n height: 390px;\n }\n\n @include breakpoint(medium) {\n width: 450px;\n height: 450px;\n }\n\n @include breakpoint(large) {\n width: 400px;\n height: 400px;\n }\n\n }\n\n .enp-results-flow__section-title {\n @include screen-reader-text;\n }\n\n .enp-results-flow__item {\n border-radius: 50%;\n text-align: center;\n height: 100%;\n width: 100%;\n margin: 0 auto;\n left: 0;\n right: 0;\n padding: 12.5% 0 0;\n letter-spacing: 0.05rem;\n border: 2px solid $green;\n animation: 0.85s slideInBottom $fastInEaseOut forwards;\n }\n\n .enp-results-flow__item--total-views {\n background: #fff;\n }\n\n .enp-results-flow__item--quiz-starts {\n width: 65%;\n height: 65%;\n position: absolute;\n padding-top: 8%;\n bottom: 2.5%;\n background: lighten($green, 48);\n }\n\n .enp-results-flow__item--quiz-finishes {\n width: 35%;\n height: 35%;\n position: absolute;\n bottom: 5%;\n background: lighten($green, 35);\n }\n\n .enp-results-flow__title {\n @include small-uppercase;\n color: #444;\n font-size: .7rem;\n margin-bottom: 0px;\n\n @include breakpoint(medium) {\n font-weight: bold;\n margin-bottom: 2px;\n }\n }\n\n .enp-results-flow__number {\n font-weight: bold;\n font-size: 1.4rem;\n line-height: 1.2;\n }\n\n .enp-results-flow__number--total-views {\n font-size: 2rem;\n }\n\n .enp-results-flow__number--quiz-starts {\n font-size: 1.65rem;\n }\n\n .enp-results-flow__percentage {\n font-size: .8rem;\n font-weight: normal;\n position: relative;\n display: inline-block;\n top: -0.7em;\n left: -.1rem;\n color: #444;\n\n &:after {\n content: '%';\n position: absolute;\n right: -0.75rem;\n font-size: .7rem;\n color: #444;\n }\n }\n\n .enp-results-questions__section {\n // @include section--alt;\n padding-top: 5rem;\n padding-bottom: 3rem;\n margin-top: 5rem;\n margin-bottom: 3rem;\n @include breakpoint(medium) {\n @include xmargin-horizontal;\n }\n }\n\n .enp-results-questions__container {\n @include media(max-small) {\n padding-left: 8px;\n padding-right: 8px;\n }\n }\n\n .enp-results-questions__header {\n align-items: flex-start;\n flex-direction: column;\n\n @include breakpoint(small) {\n @include flex-spread;\n flex-direction: row;\n align-items: flex-end;\n }\n }\n\n .enp-results-questions__title {\n @include small-uppercase;\n }\n\n .enp-results-questions__key {\n @include small-uppercase;\n }\n\n .enp-results-questions {\n @include ul-no-style;\n }\n\n .enp-results-question {\n width: 100%;\n font-size: 1rem;\n padding: 0;\n margin-bottom: 1rem;\n }\n\n .enp-results-question__header {\n padding: 1rem 1.2rem;\n position: relative;\n }\n\n .enp-results-question__question,\n .enp-results-question__stats {\n font-size: 1rem;\n line-height: 1.4;\n }\n\n .enp-results-question__question {\n font-weight: normal;\n\n @include breakpoint(small) {\n padding-right: 7em;\n margin-bottom: 0;\n }\n }\n\n .enp-results-question__stats {\n font-size: .9rem;\n\n @include breakpoint(small) {\n position: absolute;\n bottom: 1rem;\n right: 1.2rem;\n text-align: right;\n }\n }\n\n .enp-results-questions__key,\n .enp-results-question__stats {\n font-weight: 300;\n }\n\n .enp-results-question__content {\n padding: 2rem 1.2rem 1.2rem;\n @include border-radius;\n }\n\n .enp-results-question__deep-stats {\n @include flex-spread-around;\n @include ul-no-style;\n text-align: center;\n\n @include media(500px) {\n flex-wrap: wrap;\n }\n }\n\n .enp-results-question__deep-stat {\n\n @include media(500px) {\n width: 48%;\n margin: 0 2% 2% 0;\n padding: 1.6rem 0;\n\n &:nth-child(even) {\n margin-right: 0;\n }\n }\n\n @include media(280px) {\n width: 100%;\n padding: 0;\n margin-bottom: 1.6rem;\n }\n }\n\n .enp-results-question__deep-stat__number {\n font-size: 1.8rem;\n line-height: 1;\n position: relative;\n }\n\n .enp-results-question__deep-stat__number--finishes,\n .enp-results-question__deep-stat__number--correct {\n @include dark-green;\n }\n\n .enp-results-question__deep-stat__number--incorrect {\n @include fade-red;\n }\n\n .enp-results-question__deep-stat__number--correct,\n .enp-results-question__deep-stat__number--incorrect,\n .enp-results-question__deep-stat__number--finishes {\n &:after {\n content: '%';\n font-size: .9rem;\n position: absolute;\n top: .3rem;\n right: -1rem;\n }\n }\n\n .enp-results-question__deep-stat__label {\n @include small-uppercase;\n font-size: .8rem;\n }\n\n .enp-results-question__options {\n @include ul-no-style;\n margin-bottom: 0;\n }\n\n .enp-results-question__option {\n padding: 0.8rem 0.8rem 0.8rem 0.4rem;\n border-top: 1px solid #ddd;\n @include media(max-small) {\n position: relative;\n flex-direction: column;\n }\n\n @include breakpoint(small) {\n @include flex-spread;\n flex-direction: row;\n }\n\n &:first-of-type {\n margin-top: 1.4rem;\n }\n\n }\n\n .enp-results-question__option--correct {\n background: lighten($green, 48);\n }\n\n .enp-results-question__option__text {\n flex-grow: 100;\n margin-right: 1rem;\n }\n\n .enp-results-question__option__text__helper {\n font-weight: 300;\n @include small-uppercase;\n margin-right: 0.4rem;\n }\n\n .enp-results-question__option__icon {\n @include media(max-small) {\n position: relative;\n left: -3px;\n }\n\n @include breakpoint(small) {\n margin-right: 0.3rem;\n min-width: 1.6rem;\n }\n }\n\n .enp-results-question__option__icon--incorrect {\n fill: $fade_red;\n opacity: 0.5;\n }\n\n .enp-results-question__option__icon--correct {\n fill: $dark_green;\n opacity: 1;\n }\n\n .enp-results-question__option__percentage--incorrect {\n @include fade-red;\n }\n\n .enp-results-question__option__percentage--correct {\n @include dark-green;\n }\n\n .enp-results-question__option__number-selected {\n font-weight: 300;\n\n @include media(max-small) {\n position: absolute;\n top: 0.8rem;\n right: 0.8rem;\n }\n }\n\n .enp-slider-responses__title {\n @include small-uppercase;\n font-weight: 400;\n margin-top: 1.6rem;\n }\n\n .enp-slider-responses__line-chart {\n .ct-point {\n stroke-width: 8px;\n }\n }\n\n .enp-slider-responses__line-chart--low,\n .enp-slider-responses__line-chart--high {\n stroke: $red;\n }\n\n .enp-slider-responses__line-chart--correct {\n stroke: $green;\n }\n\n .enp-slider-responses-table {\n width: 100%;\n }\n\n .enp-slider-responses-table tr:nth-child(even) td {\n background-color: #fff;\n }\n\n .enp-slider-responses-table tr.enp-slider-responses-table__response--correct td {\n background-color: lighten($green, 48);\n }\n\n .enp-slider-responses-table__content {\n box-shadow: none;\n padding-top: 1rem;\n }\n\n .enp-slider-responses-table--hide-zero {\n .enp-slider-responses-table__frequency--zero {\n display: none;\n }\n }\n\n .enp-slider-responses-table__response-frequency {\n @include flex-spread ;\n align-items: center;\n }\n\n .enp-slider-responses-table__toggle-zero-frequency {\n @include accordion__header ;\n width: auto;\n padding: 0 0.6rem;\n margin: 0;\n }\n\n\n\n}\n\n.enp-quiz-results {\n #enp-quiz .enp-aside {\n border: none;\n }\n\n .enp-results-questions__title__quiz-title {\n @include screen-reader-text;\n }\n}\n","#enp-quiz {\n\n .enp-results--ab {\n display: block;\n margin-bottom: 3rem;\n\n @include breakpoint(large) {\n display: flex;\n flex-wrap: wrap;\n align-content: flex-end;\n width: 50%;\n padding: 10px;\n }\n\n }\n\n .enp-results--a {\n @include breakpoint(large) {\n padding-right: 1rem;\n border-right: 1px solid #ddd;\n }\n }\n\n .enp-results--b {\n @include breakpoint(large) {\n padding-left: 1rem;\n }\n }\n\n .enp-results-title--ab,\n .enp-results__container--ab .enp-results-flow__container {\n min-width: 100%;\n }\n\n .enp-results--loser {\n .enp-results-flow__item {\n border: 2px solid $red;\n }\n\n .enp-results-flow__item--quiz-starts {\n background: lighten($red, 42);\n }\n\n .enp-results-flow__item--quiz-finishes {\n background: lighten($red, 34);\n }\n\n th,\n .enp-results-questions__title {\n color: $dark_red;\n }\n\n }\n\n .enp-results--winner {\n th,\n .enp-results-questions__title {\n color: $dark_green;\n }\n\n }\n\n .enp-results-title--a,\n .enp-results-title--b {\n background: transparent;\n }\n\n .enp-ab-scores {\n @include container--wide;\n\n th.enp-quiz-scores-table__label,\n th.enp-quiz-scores-table__score {\n padding-left: 0;\n padding-right: 0;\n }\n }\n\n .enp-ab-scores__title {\n padding-left: 50px;\n @include small-uppercase;\n }\n\n .enp-quiz-score__line-chart .enp-test-loser {\n\n .ct-line,\n .ct-point {\n stroke: $red;\n }\n }\n\n .enp-quiz-scores {\n margin-top: 0;\n }\n\n .enp-question-results,\n .enp-ab-scores .enp-quiz-scores-table {\n margin-bottom: 1.6rem;\n\n @include breakpoint(large) {\n float: left;\n width: 48%;\n margin: 0;\n\n &:first-of-type {\n margin-right: 4%;\n }\n }\n }\n\n .enp-question-results__container {\n @include container--wide;\n }\n\n .enp-question-results--ab {\n\n .enp-results-questions__section {\n background: #fff;\n border: none;\n padding: 1.6rem 0;\n margin: 1.6rem auto;\n }\n\n .enp-results-questions__container {\n padding: 0;\n }\n\n }\n\n .enp-ab-new-embed-code__section {\n @include container--thin;\n max-width: 540px;\n padding-bottom: 2rem;\n margin-bottom: 2rem;\n\n .enp-ab-embed-code {\n padding: 0;\n margin: 0;\n }\n }\n\n .enp-ab-embed-code__section {\n @include section--alt;\n padding-top: 5rem;\n margin-top: 5rem;\n }\n\n .enp-ab-embed-code {\n @include container;\n }\n\n .enp-ab-embed-code__title {\n @include small-uppercase;\n }\n\n .enp-embed-code__textarea {\n margin-bottom: 0;\n }\n\n .enp-embed-code__instructions {\n font-size: 1.1rem;\n }\n}\n","#enp-quiz {\n\n .enp-slider {\n margin-bottom: 1.6rem;\n }\n\n .enp-slider-input__container {\n display: flex;\n align-items: center;\n justify-content: center;\n margin: 1.6rem auto;\n position: relative;\n }\n\n .enp-slider-input__label {\n @include label;\n }\n\n .enp-slider-input__prefix,\n .enp-slider-input__suffix {\n font-size: 1rem;\n }\n\n .enp-slider-input__prefix {\n margin-right: .2rem;\n white-space: pre;\n }\n\n .enp-slider-input__suffix {\n margin-left: .2rem;\n white-space: pre;\n }\n\n .enp-slider-input__input {\n @include input;\n margin-bottom: 0;\n padding: .75rem;\n width: auto;\n transition: all .25s $fastInEaseOut;\n }\n\n .enp-slider-input__input--incorrect {\n color: $red;\n }\n\n .enp-slider-input__input--correct {\n color: $dark_green;\n }\n\n .enp-slider-input__input--invalid-animation {\n box-shadow: 0 0 2px 1px $fade_red;\n }\n\n .enp-slider_input__range-helper {\n position: absolute;\n bottom: -1.2rem;\n font-size: 0.8rem;\n }\n\n .enp-slider_input__range-helper--low {\n left: 0;\n }\n\n .enp-slider_input__range-helper--high {\n right: 0;\n }\n\n .enp-slider-input__range-helper__number {\n position: relative;\n color: $dark_gray;\n }\n\n .enp-slider_input__range-helper__number--low {\n\n }\n\n .enp-slider_input__range-helper__number--high {\n\n }\n\n .ui-slider-range-show-correct__tooltip-container {\n position: relative;\n }\n\n .ui-slider-range-show-correct__tooltip {\n position: absolute;\n top: -0.4rem;\n margin-left: -0.55rem;\n height: 1rem;\n width: 1.1rem;\n height: 1.1rem;\n border: 2px solid $green;\n background-color: #fff;\n border-radius: 50%;\n z-index: 9999;\n }\n\n .ui-slider-range-show-correct__tooltip--low {\n left: 0;\n }\n\n .ui-slider-range-show-correct__tooltip--high {\n right: -0.55rem;\n }\n\n .ui-slider-range-show-correct__tooltip__text {\n position: relative;\n color: darken($green, 15);\n top: -1.35rem;\n font-size: .825rem;\n min-width: 100%;\n display: inline-block;\n text-align: center;\n text-shadow: 0 1px 0 #fff;\n }\n\n .ui-slider-range-show-correct__tooltip__text--low {\n\n }\n\n .ui-slider-range-show-correct__tooltip__text--high {\n\n }\n\n .ui-slider-range-show-correct__tooltip__text--low-center {\n //left: 0; // not perfectly centered for huge numbers, but is for small numbers\n }\n\n // JQUERY SLIDER\n .enp-slider {\n\t\tposition: relative;\n\t\ttext-align: left;\n\t\tbackground: #ddd;\n\n\t\t/* Layout helpers\n\t\t----------------------------------*/\n\t\t.ui-helper-hidden {\n\t\t\tdisplay: none;\n\t\t}\n\t\t.ui-helper-hidden-accessible {\n\t\t\tborder: 0;\n\t\t\tclip: rect(0 0 0 0);\n\t\t\theight: 1px;\n\t\t\tmargin: -1px;\n\t\t\toverflow: hidden;\n\t\t\tpadding: 0;\n\t\t\tposition: absolute;\n\t\t\twidth: 1px;\n\t\t}\n\t\t.ui-helper-reset {\n\t\t\tmargin: 0;\n\t\t\tpadding: 0;\n\t\t\tborder: 0;\n\t\t\toutline: 0;\n\t\t\tline-height: 1.3;\n\t\t\ttext-decoration: none;\n\t\t\tfont-size: 100%;\n\t\t\tlist-style: none;\n\t\t}\n\t\t.ui-helper-clearfix:before,\n\t\t.ui-helper-clearfix:after {\n\t\t\tcontent: \"\";\n\t\t\tdisplay: table;\n\t\t\tborder-collapse: collapse;\n\t\t}\n\t\t.ui-helper-clearfix:after {\n\t\t\tclear: both;\n\t\t}\n\t\t.ui-helper-clearfix {\n\t\t\tmin-height: 0; /* support: IE7 */\n\t\t}\n\t\t.ui-helper-zfix {\n\t\t\twidth: 100%;\n\t\t\theight: 100%;\n\t\t\ttop: 0;\n\t\t\tleft: 0;\n\t\t\tposition: absolute;\n\t\t\topacity: 0;\n\t\t\tfilter:alpha(opacity=0); /* support: IE8 */\n\t\t}\n\n\t\t.ui-front {\n\t\t\tz-index: 100;\n\t\t}\n\n\n\t\t/* Interaction Cues\n\t\t----------------------------------*/\n\t\t.ui-state-disabled {\n\t\t\tcursor: default !important;\n\t\t}\n\n\n\t\t/* Icons\n\t\t----------------------------------*/\n\n\t\t/* states and images */\n\t\t.ui-icon {\n\t\t\tdisplay: block;\n\t\t\ttext-indent: -99999px;\n\t\t\toverflow: hidden;\n\t\t\tbackground-repeat: no-repeat;\n\t\t}\n\n\n\t\t/* Misc visuals\n\t\t----------------------------------*/\n\n\t\t/* Overlays */\n\t\t.ui-widget-overlay {\n\t\t\tposition: fixed;\n\t\t\ttop: 0;\n\t\t\tleft: 0;\n\t\t\twidth: 100%;\n\t\t\theight: 100%;\n\t\t}\n\n\t\t.ui-slider-handle {\n\t\t\tbackground: #fff;\n\t\t\tborder-radius: 50%;\n\t\t\tborder: 1px solid #aaa;\n\t\t\tposition: absolute;\n\t\t\tz-index: 2;\n\t\t\twidth: 1.2rem;\n\t\t\theight: 1.2rem;\n top: -.4rem;\n\t\t\tmargin-left: -.6rem;\n\t\t\tcursor: default;\n\t\t\t-ms-touch-action: none;\n\t\t\ttouch-action: none;\n\t\t\ttransition: opacity 0.2s $fastInEaseOut, height .18s $fastInEaseOut, width .18s $fastInEaseOut, transform 0.18s $fastInEaseOut;\n\n @include media(max-medium) {\n width: 2rem;\n \t\t\theight: 2rem;\n top: -.85rem;\n margin-left: -1rem;\n transform: rotate(225deg);\n }\n\n\t\t\t&:focus {\n\t\t\t\toutline: none;\n\t\t\t\tbox-shadow: 0 0 3px 1px #4D90FE;\n\t\t\t}\n\n &.ui-state-active {\n @include media(max-medium) {\n width: 2.2rem;\n height: 2.2rem;\n border-top-left-radius: 0;\n transform: translate3d(-0.2rem, -0.8rem, 0) rotate(225deg);\n }\n\n }\n\n\t\t}\n\n .ui-slider-handle--correct,\n\t\t.ui-slider-handle--incorrect {\n width: 1.1rem;\n\t\t\theight: 1.1rem;\n top: -.4rem;\n margin-left: -.55rem;\n }\n\n .ui-slider-handle--incorrect {\n z-index: 1;\n\t\t\tborder: 2px solid $red;\n\t\t}\n\n .ui-slider-handle--correct {\n border: 2px solid $green;\n z-index: 99999;\n }\n\n\t\t.ui-slider-range {\n\t\t\tposition: absolute;\n\t\t\tz-index: 1;\n\t\t\tfont-size: .7rem;\n\t\t\tdisplay: block;\n\t\t\tborder: 0;\n\t\t\tbackground-position: 0 0;\n\t\t\ttop: 0;\n\t\t\theight: 100%;\n\t\t}\n\n .ui-slider-range-show-correct {\n background: $green;\n z-index: 9;\n }\n\n\t\t.ui-slider-range-min {\n\t\t\tleft: 0;\n\t\t\tbackground: $green;\n\t\t}\n\n\t\t.ui-slider-range-max {\n\t\t\tright: 0;\n\t\t}\n\n\t\t/* support: IE8 - See #6727 */\n\t\t&.ui-state-disabled .ui-slider-handle,\n\t\t&.ui-state-disabled .ui-slider-range {\n\t\t\tfilter: inherit;\n\t\t}\n\t}\n\n\t.ui-slider-horizontal {\n\t\theight: .3rem;\n\t}\n\n\t.enp-question__answered {\n\t\t.enp-slider {\n\t\t\tbackground: #bbb;\n\t\t}\n\n\t\t.ui-slider-range-min {\n\t\t\tbackground: #fff;\n\t\t}\n\n\t}\n\n}\n"]} \ No newline at end of file +{"version":3,"sources":["_setup.scss","_utilities.scss","_variables.scss","_structure.scss","_typography.scss","_animations.scss","_base.scss","_forms.scss","_quiz-create.scss","_quiz-preview.scss","_quiz-publish.scss","_ab-create.scss","_dashboard.scss","_breadcrumbs.scss","_quiz-results.scss","_ab-results.scss","../../../quiz-take/css/sass/_slider.scss"],"names":[],"mappings":"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","file":"enp_quiz-create.min.css","sourcesContent":["html {\n font-size: 16px!important; // set our rem value reference\n}\n\nhtml #enp-quiz {\n box-sizing: border-box;\n}\n\nbody #enp-quiz {\n background: #fff;\n overflow: hidden;\n}\n\n#enp-quiz {\n *, *:before, *:after {\n box-sizing: inherit;\n }\n\n ul, ol {\n margin: 0 0 1.6rem 1.25rem;\n padding: 0;\n }\n\n textarea {\n margin-bottom: 1rem;\n }\n\n button, input[type=\"button\"], input[type=\"reset\"], input[type=\"submit\"] {\n border: none;\n &:active,\n &:focus,\n &:hover {\n border: none;\n }\n }\n\n iframe {\n border: none;\n }\n}\n","@mixin focus--glow {\n outline-color: #4D90FE;\n outline-offset: -2px;\n outline-style: auto;\n outline-width: 5px;\n}\n\n@mixin disabled {\n opacity: 0.65;\n cursor: default;\n}\n\n@mixin btn {\n text-align: center;\n border: none;\n border-radius: 3px;\n padding: .85em 1.4em .75em;\n font-size: 15px;\n font-weight: 400;\n letter-spacing: .05em;\n color: #fff;\n box-shadow: inset 0 -2px 0 rgba(0,0,0,.2);\n background: $link;\n cursor: pointer;\n text-transform: uppercase;\n transition: all .2s;\n line-height: 1.6;\n\n &:focus,\n &:hover {\n color: #fff;\n box-shadow: none;\n background: $link_hover;\n }\n\n &:active {\n color: #fff;\n box-shadow: inset 0 2px 0 rgba(0,0,0,.1);\n background: lighten($blue, 20);\n }\n\n &:focus {\n @include focus--glow;\n }\n\n &:disabled,\n &:disabled:focus,\n &:disabled:hover {\n background: $link;\n cursor: default;\n opacity: .5;\n\n\n }\n}\n\n@mixin btn--reset {\n border: none;\n background: none;\n box-shadow: none;\n padding: 0;\n margin: 0;\n}\n\n@mixin btn--submit {\n @include btn;\n}\n\n@mixin btn--ghost {\n @include btn;\n border: 2px solid $link;\n background: transparent;\n color: $link;\n box-shadow: none;\n\n &:focus,\n &:hover {\n background: transparent;\n border: 2px solid $link_hover;\n color: $link_hover;\n }\n}\n\n@mixin box-shadow {\n box-shadow: 0 2px 2px rgba(0,0,0,.2);\n}\n\n@mixin btn--dashed {\n @include btn;\n border: 1px dashed $darker_gray;\n background: none;\n color: #545454;\n box-shadow: none;\n\n &:hover,\n &:focus {\n border: 1px dashed $darkest_gray;\n color: $darker_gray;\n background: rgba(255,255,255,.9);\n }\n}\n\n@mixin btn--dashed--light {\n @include btn--dashed;\n border: 2px dashed $darker-gray;\n color: $dark_gray;\n transition: all .2s;\n\n &:hover,\n &:focus {\n color: $darker_gray;\n border: 2px dashed #999;\n }\n}\n\n@mixin btn--dashed--light--alt-bg {\n @include btn--dashed--light ;\n background: $light_gray;\n}\n\n@mixin btn--small {\n font-size: 13px;\n}\n\n@mixin btn--thin {\n padding: 0.4em 1em;\n}\n\n@mixin btn--icon {\n @include btn;\n padding: .75em 0.8em .7em 1.4em;\n}\n\n@mixin btn--icon__icon {\n @include icon--white;\n @include icon--xl;\n position: relative;\n top: 4px;\n}\n\n/*\n* @usage: @include btn--icon(BEM-root-class);\n* Button with icon with white circular background.\n* --------------\n* | BTN TEXT > |\n* --------------\n* @param $rootBEM: root class name that will be extended\n\n@mixin btn--icon($rootBEM) {\n .(#){$rootBEM} {\n @include btn--icon;\n }\n\n .(#){$rootBEM}__icon {\n @include btn--icon__icon ;\n }\n}\n*/\n\n@mixin btn--icon--icon-circle {\n @include btn;\n padding: .65em 1.2em .85em 1.4em;\n}\n\n// use when the icon is larger and on the right\n@mixin btn--icon__icon--circle {\n @include icon--circle;\n @include icon--white-bg;\n @include icon--normal;\n margin-left: 0.5em;\n position: relative;\n top: 0.15rem;\n}\n\n@mixin btn--icon__icon--circle--hover {\n @include icon--white-bg--hover;\n}\n\n/*\n* @usage: @include btn--icon--circle(BEM-root-class);\n* Button with icon with white circular background.\n* ---------------\n* | BTN TEXT (>) |\n* ---------------\n* @param $rootBEM: root class name that will be extended\n*/\n@mixin btn--icon--circle($rootBEM) {\n .#{$rootBEM} {\n @include btn--icon--icon-circle;\n }\n\n .#{$rootBEM}__icon {\n @include btn--icon__icon--circle ;\n\n\n &:hover {\n @include btn--icon__icon--circle--hover ;\n }\n }\n}\n\n/*\n* @usage: @include btn--icon--hover-circle(BEM-root-class);\n* Button with icon. Hovering/focusing button moves\n* the icon to right and fades in a white circular background\n* -------------- ----------------\n* | BTN TEXT > | --hover/focus--> | BTN TEXT (>) |\n* -------------- ----------------\n* @param $rootBEM: root class name that will be extended\n*/\n@mixin btn--icon--hover-circle($rootBEM) {\n .#{$rootBEM} {\n @include btn--icon--icon-circle;\n padding-right: 0.8em;\n }\n\n .#{$rootBEM}__icon {\n @include btn--icon__icon--circle ;\n margin-left: 0;\n width: 1em;\n height: 1em;\n background: transparent;\n fill: #fff;\n transform: translate3d(0, 0, 0);\n transition: all .3s ease-in-out;\n }\n\n .#{$rootBEM}:hover .#{$rootBEM}__icon {\n @include btn--icon__icon--circle--hover ;\n transform: translate3d(1em, 0, 0);\n margin-right: 1em;\n }\n\n\n}\n\n// use on small icons and placed on the left\n@mixin btn--icon__icon--circle--small {\n @include icon--circle--small;\n margin-right: 5px;\n}\n\n\n// use this to match the icon to the inline font-size\n@mixin icon--inline {\n width: 1em;\n height: 1em;\n position: relative;\n top: .125em;\n}\n\n@mixin icon--small {\n width: 1rem;\n height: 1rem;\n}\n\n@mixin icon--normal {\n width: 1.2rem;\n height: 1.2rem;\n}\n\n@mixin icon--large {\n width: 1.5rem;\n height: 1.5rem;\n}\n\n@mixin icon--xl {\n width: 1.8rem;\n height: 1.8rem;\n}\n\n@mixin icon--xxl {\n width: 2.4rem;\n height: 2.4rem;\n}\n\n@mixin icon--xxxl {\n width: 2.8rem;\n height: 2.8rem;\n}\n\n@mixin icon--circle {\n border-radius: 50%;\n fill: #fff;\n}\n\n@mixin border-radius {\n border-radius: 3px;\n}\n\n@mixin icon--circle--pad {\n @include icon--circle ;\n padding: 0.05em;\n\n @include breakpoint(medium) {\n padding: 0.15em;\n }\n}\n\n@mixin icon--circle--pad--xl {\n @include icon--circle ;\n padding: 0.6rem;\n}\n\n@mixin icon--circle--small {\n @include icon--small;\n @include icon--circle;\n padding: 0.02rem;\n}\n\n@mixin icon--white {\n fill: #fff;\n}\n\n@mixin icon--white-bg {\n background: #fff;\n fill: $link;\n}\n\n@mixin icon--white-bg--hover {\n background: #fff;\n fill: $link_hover;\n}\n\n@mixin icon--gray-bg {\n background: $dark_gray;\n fill: $light_gray;\n}\n\n@mixin icon--gray-bg--hover {\n fill: #fff;\n background: $darker_gray;\n}\n\n@mixin small-uppercase {\n font-size: 1rem;\n text-transform: uppercase;\n}\n\n@mixin hint {\n font-size: .7rem;\n font-weight: 300;\n color: #565656;\n}\n\n@mixin green {\n color: $green;\n}\n\n@mixin dark-green {\n color: $dark_green;\n}\n\n@mixin red {\n color: $red;\n}\n\n@mixin fade-red {\n color: $fade_red;\n}\n\n/* Text meant only for screen readers */\n@mixin screen-reader-text {\n clip: rect(1px, 1px, 1px, 1px);\n position: absolute !important;\n left:-10000px;\n top:auto;\n width:1px;\n height:1px;\n overflow:hidden;\n}\n\n@mixin screen-reader-text--hover {\n background-color: #f1f1f1;\n border-radius: 3px;\n box-shadow: 0 0 2px 2px rgba(0, 0, 0, 0.6);\n clip: auto !important;\n color: #21759b;\n display: block;\n font-size: 14px;\n font-weight: bold;\n height: auto;\n left: 5px;\n line-height: normal;\n padding: 15px 23px 14px;\n text-decoration: none;\n top: 5px;\n width: auto;\n z-index: 100000;\n}\n\n@mixin xmargin-vertical {\n margin-top: 2rem;\n margin-bottom: 2rem;\n}\n\n@mixin xmargin-horizontal {\n margin-right: 2rem;\n margin-left: 2rem;\n}\n\n@mixin xpadding-vertical {\n padding-top: 2rem;\n padding-bottom: 2rem;\n}\n\n@mixin xpadding-vertical-top {\n padding-top: 2rem;\n}\n\n@mixin xpadding-horizontal {\n padding-right: 2rem;\n padding-left: 2rem;\n}\n\n@mixin header-space {\n @include breakpoint(large) {\n padding-top: 7rem;\n }\n}\n\n@mixin ul-no-style {\n list-style: none;\n margin-left: 0;\n}\n\n@mixin hidden--accessible {\n height: 0;\n opacity: 0;\n padding: 0;\n overflow: hidden;\n}\n\n@mixin accordion {\n background: #fff;\n width: 100%;\n}\n\n@mixin accordion__header {\n @include accordion ;\n box-shadow: inset 1px 1px 0 #ccc, inset -1px -1px 0 #ccc;\n color: $font;\n font-family: $fontTitle;\n font-size: .9rem;\n font-weight: 400;\n line-height: 1.5;\n text-transform: none;\n letter-spacing: 0;\n text-align: left;\n border: none;\n border-radius: 3px;\n min-height: 3.065rem;\n padding: 1rem 2rem 1rem 1rem;\n margin: 1.6rem 0 0;\n position: relative;\n z-index: 9;\n cursor: pointer;\n transition: all .2s $fastInEaseOut;\n}\n\n@mixin accordion__content {\n @include accordion ;\n box-shadow: inset 1px -1px 0 #ccc, inset -1px -1px 0 #ccc;\n display: block;\n position: relative;\n height: auto;\n overflow: visible;\n margin-bottom: 1.6rem;\n}\n\n@mixin accordion__content--closed {\n margin-top: 0;\n padding-top: 0rem;\n animation: slideOutTop .25s $fastInEaseOut forwards;\n display: none;\n}\n\n@mixin accordion__content--open {\n padding-top: 1.6rem;\n margin-bottom: 2rem;\n animation: slideInTop .45s $fastInEaseOut forwards;\n}\n\n// Share Icons\n@mixin share_icons($rootBEM) {\n\n .#{$rootBEM} {\n @include ul-no-style;\n @include flex-center;\n }\n\n .#{$rootBEM}__item {\n margin-right: 20px;\n\n &:last-child {\n margin-right: 0;\n }\n }\n\n .#{$rootBEM}__item__icon {\n @include icon--xxl;\n @include icon--circle--pad--xl;\n\n fill: #fff!important;\n }\n\n .#{$rootBEM}__item__icon--facebook {\n background-color: #3a5795;\n }\n\n .#{$rootBEM}__item__icon--twitter {\n background-color: #4099ff;\n }\n}\n\n@mixin section--alt {\n background: $light_gray;\n border-bottom: 1px solid #ddd;\n border-top: 1px solid #ddd;\n padding-top: 3rem;\n padding-bottom: 3rem;\n margin-top: 3rem;\n margin-bottom: 3rem;\n}\n\n#enp-quiz {\n .enp-screen-reader-text {\n @include screen-reader-text;\n }\n\n .enp-screen-reader-text:hover,\n .enp-screen-reader-text:active,\n .enp-screen-reader-text:focus {\n @include screen-reader-text--hover;\n }\n\n .enp-accordion-header {\n @include accordion__header ;\n\n &:first-of-type {\n margin-top: 0;\n }\n\n .enp-accordion-header__icon {\n position: absolute;\n fill: $dark_gray;\n right: 0.75rem;\n bottom: 0.75rem;\n transition: all .35s $fastInEaseOut;\n }\n }\n\n .enp-accordion-header--open {\n\n .enp-accordion-header__icon {\n transform: rotateX(180deg) translateY(2px);\n }\n\n }\n\n .enp-accordion-content {\n @include accordion__content ;\n }\n\n .enp-accordion-content--closed {\n @include accordion__content--closed ;\n }\n\n .enp-accordion-content--open {\n @include accordion__content--open ;\n }\n\n .enp-quiz-message {\n @include container--thin;\n background: #fff;\n border: 1px solid #eee;\n border-bottom: 1px solid #ccc;\n padding: 1rem;\n margin-bottom: 1.6rem;\n position: fixed;\n bottom: 0;\n left: 0;\n }\n\n .enp-quiz-message__title {\n @include small-uppercase;\n }\n\n .enp-message__list {\n @include ul-no-style;\n font-size: 1.1rem;\n margin-bottom: 0;\n }\n\n .enp-quiz-message--error {\n border-left: 6px solid $red;\n color: $red;\n }\n\n .enp-quiz-message__title--error {\n color: $dark_red;\n }\n\n .enp-quiz-message--success {\n border-left: 6px solid $green;\n color: $dark_green;\n }\n\n .enp-quiz-message__title--success {\n color: $dark_green;\n }\n\n .enp-quiz-message--note {\n border-left: 6px solid $khaki;\n }\n\n .enp-quiz-message__title--note {\n color: $dark_blue;\n }\n\n .enp-quiz-message__close {\n @include btn--reset;\n position: absolute;\n top: 5px;\n right: 5px;\n }\n\n .enp-quiz-message--ajax {\n margin-bottom: .6rem;\n animation: slideInBottom .3s;\n }\n\n .enp-quiz-message-ajax-container {\n z-index: 9999;\n position: fixed;\n bottom: 10px;\n }\n\n .enp-quiz-message--saving__spinner {\n margin-left: -10px;\n }\n\n .enp-quiz-message--saving__text {\n font-size: 1rem;\n }\n\n textarea.limited-chars,\n input.limited-chars {\n margin-bottom: 0.2rem;\n }\n\n .limited-chars__container {\n color: lighten($dark_gray, 8);\n font-size: 0.8rem;\n display: block;\n text-align: right;\n margin-bottom: 1.2rem;\n }\n\n .limited-chars__counter {\n color: $dark_gray;\n }\n\n .limited-chars__container--error {\n color: $dark_red;\n\n .limited-chars__counter {\n color: $dark_red;\n }\n }\n\n textarea.has-error,\n input.has-error {\n border: 1px solid $red;\n &:focus {\n outline-color: $red;\n }\n\n }\n\n\n\n .enp-tooltip {\n position: relative;\n }\n\n .enp-tooltip__activator {\n\n &:focus + .enp-tooltip__description,\n &:focus > .enp-tooltip__description {\n display: block;\n }\n }\n\n .enp-tooltip__description {\n display: none;\n position: absolute;\n left: 103%;\n margin-bottom: 2rem;\n border-radius: 3px;\n background: $light_gray;\n font-size: 0.9rem;\n padding: 0.9rem;\n max-width: 200px;\n }\n\n\n}\n\n.enp-sticky {\n position: relative;\n left: 0;\n right: 0;\n top: 0;\n z-index: 999;\n\n &.enp-sticky--fixed {\n position: fixed;\n }\n}\n\n.enp-breadcrumb-link {\n font-size: 0.85rem;\n}\n\n.enp-breadcrumb-link__icon {\n position: relative;\n top: 0.45rem;\n left: 0.4rem;\n}\n","//fonts\n$fontBody : Arial,monospace, helvetica, arial, sans-serif;\n$fontTitle : Arial,monospace, helvetica, arial, sans-serif;\n\n// // // colors\n$font : #1d1c25;\n$background: #FAF9FB;\n$title : #5D5E5F;\n\n// Blues\n$blue: #00A9B7;\n$dark_blue: #333F48;\n$light_blue: lighten($blue, 100);\n\n// Grays\n$light_gray: #FAF9FB;\n$really_light_gray: lighten($light_gray, 1);\n$gray: darken($light_gray, 2);\n$dark_gray: darken($gray, 5);\n$darker_gray: darken($dark_gray, 20);\n$darkest_gray: darken($dark_gray, 50);\n\n// Other colors\n$khaki: #CCA562;\n$green: #60AAAD;\n$dark_green: darken($green, 8);\n$red: #bf5700;\n$dark_red: darken($red, 8);\n$fade_red: #C1893E;\n\n// Elements\n$link: #bf5700;\n$link_hover: darken($link, 8);\n// animation\n$fastInEaseOut: cubic-bezier(0.000, 0, .3, 1);\n\n\n$breakpoints: (\n \"small\" : 400px,\n \"medium\" : 700px,\n \"large\" : 1000px\n);\n\n// -----------------------------------------------------------------------------\n// Core\n// -----------------------------------------------------------------------------\n\n// Caching current breakpoint\n// Not meant to be manually edited\n$default-breakpoint: root;\n$current-breakpoint: $default-breakpoint;\n\n// The usual breakpoint mixin\n// Except it updates the $current-breakpoint variable\n// 1. If breakpoint name exists in map\n// 2. Update $current-breakpoint\n// 3. Open a media query\n// 4. Let the user dump content\n// 5. Then reset $current-breakpoint\n// 6. If breakpoint name doesn't exist in map, warn the user\n@mixin breakpoint($breakpoint) {\n $value: map-get($breakpoints, $breakpoint);\n\n @if $value != null { // 1\n $current-breakpoint: $breakpoint !global; // 2\n @media (min-width: $value) { @content; } // 3\n $current-breakpoint: $default-breakpoint !global; // 5\n }\n\n @else {\n @warn \"Invalid breakpoint `#{$breakpoint}`.\"; // 6\n }\n}\n\n// for only targeting a specific device\n// NOTE: DOESN'T SUPPORT THE @include placeholders!!!\n@mixin media($query) {\n @if $query == max-small {\n $media_query: \"max-width: #{map-get($breakpoints, \"small\")}\";\n } @else if $query == only-medium {\n $media_query: \"min-width: #{map-get($breakpoints, \"medium\")}) and (max-width: #{(map-get($breakpoints, \"large\") - 1px)}\";\n } @else if $query == max-medium {\n $media_query: \"max-width: #{(map-get($breakpoints, \"medium\") - 1px)}\";\n } @else if $query == max-large {\n $media_query: \"max-width: #{(map-get($breakpoints, \"large\") - 1px)}\";\n } @else {\n // just use the number provided as a max width\n $media_query: \"max-width: #{$query}\";\n }\n\n @if variable-exists(media_query) {\n @media ($media_query) {\n @content;\n }\n }\n\n}\n","@mixin clearfix {\n &:after {\n content: \"\";\n display: table;\n clear: both;\n }\n}\n\n@mixin container {\n max-width: 740px;\n margin: 0 auto;\n @include clearfix;\n}\n\n@mixin well {\n padding: 1.6rem;\n margin-bottom: 1.6rem;\n background: $light_blue;\n @include border-radius;\n border: 1px solid #eee;\n border-bottom-color: #ccc;\n\n @include breakpoint(medium) {\n margin-bottom: 2.6rem;\n padding: 1.6rem 2rem;\n }\n}\n\n@mixin container--wide {\n @include container;\n\n @include breakpoint(medium) {\n max-width: 1000px;\n }\n\n @include breakpoint(large) {\n max-width: 1440px;\n }\n}\n\n\n@mixin container--thin {\n @include container;\n // max-width: 512px;\n}\n\n@mixin container--really-thin {\n @include container;\n max-width: 300px;\n}\n\n@mixin container--form {\n @include container--thin;\n\n .enp-input,\n .enp-textarea {\n width: 100%;\n }\n}\n\n@mixin container--form--thin {\n @include well;\n @include container--really-thin;\n\n .enp-input,\n .enp-textarea {\n width: 100%;\n }\n}\n\n@mixin flex-container { // no pseudo element to clear and break spacing\n @include container;\n}\n\n@mixin flex-container--wide { // no pseudo element to clear and break spacing\n @include flex-container;\n\n @include breakpoint(medium) {\n max-width: 840px;\n }\n\n @include breakpoint(large) {\n max-width: 1000px;\n }\n}\n\n@mixin flex {\n display: flex;\n}\n\n@mixin flex-list__item {\n flex-basis: 100%;\n margin: 0;\n border-bottom-color: #ddd;\n}\n\n@mixin flex-spread {\n @include flex;\n justify-content: space-between;\n}\n\n@mixin flex-spread-vertical {\n @include flex-spread;\n flex-direction: column;\n}\n\n@mixin flex-spread-around {\n @include flex;\n justify-content: space-around;\n}\n\n@mixin flex-bottom {\n @include flex;\n align-items: flex-end;\n align-content: flex-end;\n}\n\n@mixin flex-center {\n @include flex;\n justify-content: center;\n align-content: center;\n align-items: center;\n}\n\n@mixin flex-vertical-center {\n @include flex;\n align-content: center;\n align-items: center;\n}\n\n@mixin flex-inline {\n @include flex;\n @include ul-no-style;\n margin-bottom: 0;\n}\n\n@mixin flex-inline__item {\n margin-right: 10px;\n\n &:last-of-type {\n margin-right: 0;\n }\n}\n\n\n@mixin flex-grid {\n @include flex;\n flex-flow: column wrap;\n align-items: stretch;\n @include ul-no-style;\n}\n\n@mixin flex-grid__item {\n flex-basis: 100%;\n padding: 1rem 1.2rem;\n background: #fff;\n border: 1px solid #eee;\n border-bottom: 1px solid #ddd;\n list-style: none;\n transition: all .35s $fastInEaseOut;\n margin: 0 0 0.8rem;\n\n // @include breakpoint(medium) {\n // flex-basis: 100%;\n // max-width: 100%;\n // margin: 0 2% 0.8rem 0;\n\n // &:nth-child(2n) {\n // margin-right: 0;\n // }\n // }\n\n // @include breakpoint(large) {\n // flex-basis: 100%;\n // max-width: 100%;\n // margin-right: 1.25%;\n\n // &:nth-child(2n) {\n // margin-right: 1.25%;\n // }\n\n // &:nth-child(3n) {\n // margin-right: 0;\n // }\n // }\n}\n\n@mixin flex-grid__title {\n font-size: 1rem;\n padding-bottom: 0.5rem;\n}\n","body #enp-quiz {\n color: $font;\n font-family: $fontBody;\n font-size: 1em;\n line-height: 1.6;\n font-weight: 400;\n\n @include breakpoint(medium) {\n font-size: 1.3em;\n }\n}\n\n#enp-quiz {\n /* Headings */\n h1,h2,h3,h4,h5,h6 {\n font-family: $fontTitle;\n color: $title;\n clear: both;\n margin: 0 0 .2rem;\n font-weight: bold;\n line-height: 1.2em;\n }\n\n h1 {\n font-size: 2em;\n }\n\n h2 {\n font-size: 1.75em;\n }\n\n h3 {\n font-size: 1.475em;\n }\n\n h4 {\n font-size: 1.3em;\n }\n\n h5 {\n font-size: 1.125em;\n }\n\n h6 {\n font-size: 1em;\n }\n\n p+h1, ul+h1,\n p+h2, ul+h2,\n p+h3, ul+h3,\n p+h4, ul+h4,\n p+h5, ul+h5,\n p+h6, ul+h6 {\n margin-top: 1.8em;\n }\n\n /* Text elements */\n p {\n font-size: 0.85em;\n margin-bottom: 1.125em;\n font-weight: 300;\n }\n ul, ol {\n margin: 0 0 1.6em 1.25em;\n }\n ul {\n list-style: disc;\n }\n ol {\n list-style: decimal;\n }\n li > ul,\n li > ol {\n margin-bottom: 0;\n margin-left: 1.6em;\n }\n\n b, strong {\n font-weight: bold;\n }\n\n dfn, cite, em {\n font-family: georgia, times, serif;\n font-style: italic;\n }\n\n pre {\n background: #eee;\n font-family: \"Courier 10 Pitch\", Courier, monospace;\n font-size: .95em;\n line-height: 1.6;\n margin-bottom: 1.6em;\n padding: 1.6em;\n overflow: auto;\n max-width: 100%;\n }\n .code, code, kbd, tt, var {\n font: .7em Monaco, Consolas, \"Andale Mono\", \"DejaVu Sans Mono\", monospace;\n }\n\n table {\n border: none;\n\n th {\n font-family: $fontTitle;\n font-size: .8rem;\n text-transform: uppercase;\n border: none;\n border-bottom: 1px solid #ddd;\n }\n\n td {\n font-family: $fontBody;\n font-size: 1rem;\n border: none;\n border-bottom: 1px solid #eee;\n }\n\n tr:nth-child(even) td {\n background: $really_light_gray;\n }\n\n tr:last-child td {\n border-bottom: none;\n }\n }\n\n figure {\n margin: 0;\n }\n\n img {\n height: auto; /* Make sure images are scaled correctly. */\n max-width: 100%; /* Adhere to container width. */\n }\n\n /* Links */\n a {\n color: $link;\n text-decoration: none;\n transition: color .2s;\n touch-action: manipulation; // remove 300ms delay for ie\n\n .enp-icon {\n fill: $link;\n }\n }\n\n a:hover,\n a:focus,\n a:active {\n color: $link_hover;\n\n .enp-icon {\n fill: $link_hover;\n }\n }\n\n button {\n &:focus {\n @include focus--glow;\n }\n }\n\n .enp-btn {\n @include btn;\n }\n\n\n .enp-btn--add {\n @include btn--dashed;\n width: 100%;\n }\n\n .enp-btn--disabled {\n @include disabled;\n }\n\n .enp-btn--enabled {\n animation: expand .6s;\n }\n\n .enp-icon {\n width: 24px;\n height: 24px;\n transition: all .2s;\n }\n\n .enp-page-title {\n font-size: 1.6rem;\n }\n}\n","@keyframes slideInBottom {\n 0% {\n opacity: 0;\n transform: translate3d(0, 100px, 0);\n }\n 100% {\n opacity: 1;\n transform: translate3d(0, 0, 0);\n }\n}\n\n@keyframes slideInTop {\n 0% {\n opacity: 0;\n height: auto;\n transform: translate3d(0, -20px, 0);\n }\n 100% {\n opacity: 1;\n height: auto;\n transform: translate3d(0, 0, 0);\n }\n}\n\n@keyframes slideInTop--reduced-opacity {\n 0% {\n opacity: 0;\n height: auto;\n transform: translate3d(0, -20px, 0);\n }\n 100% {\n opacity: 0.8;\n height: auto;\n transform: translate3d(0, 0, 0);\n }\n}\n\n\n@keyframes slideOutTop {\n 0% {\n overflow: hidden;\n height: 100px;\n opacity: 1;\n transform: translate3d(0, 0, 0);\n }\n 100% {\n height: 0;\n opacity: 0;\n transform: translate3d(0, -20px, 0);\n }\n}\n\n@keyframes removeElement {\n 0% {\n opacity: 1;\n transform: translate3d(0, 0, 0);\n }\n 100% {\n padding: 0;\n margin: 0;\n opacity: 0;\n height: 0;\n z-index: -1;\n transform: translate3d(-200px, 0, 0);\n }\n}\n\n@keyframes removeAnswers {\n 0% {\n opacity: 1;\n transform: translate3d(0, 0, 0);\n }\n 100% {\n padding: 0;\n opacity: 0;\n display: none;\n height: 0;\n z-index: -1;\n transform: translate3d(-200px, 0, 0);\n }\n}\n\n@keyframes removeQuestion {\n 0% {\n opacity: 1;\n transform: translateX(0);\n }\n 100% {\n opacity: 0;\n transform: translateX(-200px);\n }\n}\n\n@keyframes showNextQuestion {\n 0% {\n opacity: 0;\n transform: translateX(200px);\n }\n\n 100% {\n opacity: 1;\n transform: translateX(0);\n }\n}\n\n@keyframes expand {\n 0% {\n opacity: 0.8;\n transform: scale3d(1, 1, 1);\n box-shadow: 0 0 0px rgba(0,0,0,.3);\n }\n\n 40% {\n opacity: 1;\n }\n\n 70% {\n opacity: 1;\n transform: scale3d(1.1, 1.1, 1);\n box-shadow: 0 0 8px rgba(0,0,0,.4);\n }\n\n 100% {\n opacity: 1;\n transform: scale3d(1, 1, 1);\n box-shadow: 0 0 0px rgba(0,0,0,.3), inset 0 2px 0 rgba(0,0,0,.2);\n }\n}\n\n@keyframes checkmark {\n 0% {\n opacity: 0;\n transform: scale3d(0.2, 0.2, 1);\n }\n 5% {\n opacity: 1;\n }\n 10% {\n transform: scale3d(1.4, 1.4, 1);\n }\n 12% {\n transform: scale3d(1, 1, 1);\n }\n 90% {\n opacity: 1;\n transform: scale3d(1, 1, 1);\n }\n 92% {\n transform: scale3d(1.4, 1.4, 1);\n }\n 100% {\n opacity: 0;\n transform: scale3d(0.2, 0.2, 1);\n }\n\n}\n\n@keyframes fadeOut {\n 0% {\n opacity: 1;\n }\n 100% {\n opacity: 0;\n }\n}\n\n@keyframes fadeIn {\n 0% {\n opacity: 0;\n }\n 100% {\n opacity: 1;\n }\n}\n\n@keyframes navSlideIn {\n 0% {\n transform: translate3d(0, -200px, 0);\n }\n 100% {\n transform: translate3d(0, 0, 0);\n }\n}\n\n\n.spinner {\n margin: 0 auto;\n width: 70px;\n text-align: center;\n}\n\n.spinner > div {\n width: 18px;\n height: 18px;\n background-color: #333;\n\n border-radius: 100%;\n display: inline-block;\n -webkit-animation: sk-bouncedelay 1.4s infinite ease-in-out both;\n animation: sk-bouncedelay 1.4s infinite ease-in-out both;\n}\n\n.spinner .bounce1 {\n -webkit-animation-delay: -0.32s;\n animation-delay: -0.32s;\n}\n\n.spinner .bounce2 {\n -webkit-animation-delay: -0.16s;\n animation-delay: -0.16s;\n}\n\n@-webkit-keyframes sk-bouncedelay {\n 0%, 80%, 100% { -webkit-transform: scale(0) }\n 40% { -webkit-transform: scale(1.0) }\n}\n\n@keyframes sk-bouncedelay {\n 0%, 80%, 100% {\n -webkit-transform: scale(0);\n transform: scale(0);\n } 40% {\n -webkit-transform: scale(1.0);\n transform: scale(1.0);\n }\n}\n","#enp-quiz {\n transition: background .25s $fastInEaseOut;\n\n .enp-container {\n // @include container;\n }\n\n .enp-aside {\n @include well;\n @include container--thin;\n font-size: 1.2rem;\n }\n\n .enp-aside__title {\n @include small-uppercase;\n font-weight: 600;\n }\n\n .enp-page-title {\n border-bottom: 2px solid $blue;\n }\n}\n","\n\n// enter the root BEM class and this will output the correct CSS for you\n@mixin radio-block($rootBEM) {\n .#{$rootBEM}__legend {\n @include radio-block__legend ;\n }\n\n .#{$rootBEM}__input {\n @include radio-block__input ;\n }\n\n .#{$rootBEM}__label {\n @include radio-block__label ;\n }\n\n .#{$rootBEM}__input:checked + .#{$rootBEM}__label {\n @include radio-block__label--checked ;\n }\n\n .#{$rootBEM}__input:focus + .#{$rootBEM}__label {\n @include radio-block__label--focus ;\n }\n}\n\n@mixin radio-inline($rootBEM) {\n .#{$rootBEM}__legend {\n @include radio-inline__legend ;\n }\n\n .#{$rootBEM}__input {\n @include radio-inline__input ;\n }\n\n .#{$rootBEM}__label {\n @include radio-inline__label ;\n }\n\n .#{$rootBEM}__input:checked + .#{$rootBEM}__label {\n @include radio-inline__label--checked ;\n }\n\n .#{$rootBEM}__input:focus + .#{$rootBEM}__label {\n @include radio-inline__label--focus ;\n }\n\n}\n\n@mixin label {\n display: block;\n color: lighten($font, 10);\n font-weight: normal;\n font-size: 0.85rem;\n text-transform: uppercase;\n}\n\n@mixin legend {\n @include label;\n padding-top: 1.6rem;\n margin-bottom: 0.2rem;\n border: none;\n}\n\n@mixin label--bold {\n @include label;\n font-weight: 500;\n}\n\n@mixin legend--bold {\n @include label--bold;\n}\n\n@mixin input {\n font-size: 1rem;\n font-family: $fontBody;\n padding: 0.8rem 0.5rem;\n background: #fff;\n border: 1px solid #aaa;\n border-radius: 3px;\n width: 20rem;\n max-width: 100%;\n margin-bottom: 1.2rem;\n\n @include breakpoint(medium) {\n padding: 0.8rem;\n width: 100%;\n }\n}\n\n@mixin input--large {\n @include input;\n padding: 1rem 1.2rem;\n font-size: 1rem;\n}\n\n@mixin input--xl {\n @include input;\n font-weight: bold;\n font-size: 1.6rem;\n margin-bottom: 1rem;\n\n &::placeholder {\n font-weight: bold;\n }\n}\n\n@mixin textarea {\n @include input;\n line-height: 1.5;\n\n &:focus {\n @include focus--glow;\n }\n}\n\n\n/*\n@mixin no-radio__input {\n display: inline-block;\n width: 0;\n margin: 0;\n padding: 0;\n opacity: 0;\n overflow: hidden;\n}\n\n@mixin no-radio__label {\n display: inline-block;\n position: relative;\n left: -1rem;\n padding: .2rem .6rem;\n @include small-uppercase;\n font-size: .8rem;\n font-weight: normal;\n background: transparent;\n border-radius: 3px;\n transition: all .2s;\n}*/\n\n@mixin radio-block__legend {\n @include legend;\n margin-bottom: 0.6rem;\n}\n\n@mixin radio-block__input {\n position: absolute;\n z-index: 9;\n margin-left: 9px;\n}\n\n@mixin radio-block__label {\n text-transform: capitalize;\n background: #f2f2f2;\n display: block;\n padding: 5px 10px 5px 39px;\n position: relative;\n top: -6px;\n box-shadow: inset -1px -1px 0 rgba(0,0,0,.1), inset 30px 0px 0 rgba(255,255,255,.7), inset 31px 0px 0 rgba(0,0,0,.1);\n}\n\n@mixin radio-block__label--checked {\n background: $green;\n color: #fff;\n text-shadow: 0 0 1px rgba(0,0,0,.7);\n}\n\n@mixin radio-block__label--focus {\n z-index: 8;\n @include focus--glow ;\n}\n\n@mixin radio-inline__legend {\n @include legend;\n}\n\n@mixin radio-inline__input {\n @include screen-reader-text;\n}\n\n@mixin radio-inline__label {\n text-transform: capitalize;\n display: inline-block;\n padding: 0.2rem 0.5rem;\n border-radius: 3px;\n cursor: pointer;\n}\n\n@mixin radio-inline__label--checked {\n @include radio-block__label--checked ;\n}\n\n@mixin radio-inline__label--focus {\n @include radio-block__label--focus ;\n}\n\n@mixin select--wide--chevron {\n width: 100%;\n -webkit-appearance: none;\n -moz-appearance: none;\n appearance: none;\n font-size: 0.85rem;\n padding: 0.7rem 32px 0.7rem 0.8rem;\n border: 1px solid #bbb;\n border-radius: 3px;\n margin-bottom: 1.6rem;\n background: url(../svg/chevron-down.svg) 100% 50% no-repeat;\n background-color: #fff;\n box-shadow: inset -26px 0 0 rgba(0,0,0,.1);\n}\n\n\n#enp-quiz {\n\n fieldset {\n border: none;\n margin: 0;\n padding: 0;\n }\n\n .enp-label {\n @include label;\n }\n\n .enp-legend {\n @include legend;\n }\n\n .enp-input {\n @include input;\n\n &.enp-input--has-description {\n margin-bottom: 0.2rem;\n }\n }\n\n .enp-textarea-description,\n .enp-input-description {\n margin-bottom: 1rem;\n font-size: 0.85rem;\n }\n\n .enp-textarea-description--before,\n .enp-input-description--before {\n margin-bottom: 0;\n }\n\n .enp-input::placeholder,\n .enp-textarea::placeholder {\n font-family: $fontBody;\n font-weight: 300;\n color: lighten($font, 40);\n }\n\n .enp-textarea {\n @include textarea;\n\n &.enp-textarea--has-description {\n margin-bottom: 0.2rem;\n }\n &.enp-textarea--has-description--before {\n margin-bottom: 1.2rem;\n }\n }\n\n .enp-embed-code {\n @include textarea;\n padding: 1.6rem;\n font-size: 0.7rem;\n font-family: Monaco, Consolas, \"Andale Mono\", \"DejaVu Sans Mono\", monospace;\n\n @include media(max-medium) {\n padding: .8rem;\n }\n }\n}\n","#enp-quiz {\n // .enp-publish-page-container,\n // .enp-preview-page-container {\n // @include container--wide;\n // position: relative;\n // @include xpadding-vertical;\n // background: $really_light_gray;\n\n\n // }\n\n .enp-publish-page-container,\n .enp-quiz-form-container,\n .enp-preview-page-container {\n display: grid;\n grid-column: 2/-1;\n gap: 1rem;;\n width: 100%;\n justify-items: center;\n \n @include media(max-small) {\n padding-left: 8px;\n padding-right: 8px;\n }\n }\n // .enp-breadcrumb-link__container {\n // display: grid;\n // grid-column: 1/span 1;\n // justify-content: center;\n // align-items: flex-start;\n // @include xpadding-vertical;\n // }\n .enp-quiz-form {\n display: grid;\n padding-left: 0;\n padding-right: 0;\n @include breakpoint(medium) {\n width: 100%;\n max-width: 40rem;\n }\n }\n\n .enp-preview-page-flex-container {\n display: grid;\n gap: 1rem;\n\n @include breakpoint(medium) {\n grid-template-columns: 1fr 3fr;\n padding: 0 2rem;\n }\n }\n\n .enp-quiz-title__label {\n @include label--bold;\n }\n\n .enp-quiz-title__textarea {\n @include input--xl;\n }\n \n textarea {\n color: #000;\n }\n\n .enp-accordion-container {\n margin-bottom: 1.6rem;\n position: relative;\n }\n\n .enp-question-content {\n @include accordion;\n padding-top: 0;\n position: relative;\n }\n\n .enp-question-inner {\n padding: 1.6rem 1.6rem 1rem;\n\n @include breakpoint(medium) {\n padding-right: 2.8rem;\n padding-left: 2.9rem;\n }\n\n }\n\n .enp-question-title__label {\n @include label--bold;\n }\n\n .enp-question-title__textarea {\n @include input--large;\n }\n\n .enp-question-image-upload {\n @include btn--dashed--light--alt-bg;\n @include small-uppercase;\n position: relative;\n margin-bottom: 2rem;\n transform: translate3d(0, 0, 0);\n transition: all .3s $fastInEaseOut;\n\n .enp-question-image-upload__icon--photo {\n @include icon--xxxl;\n opacity: 0;\n position: absolute;\n top: 0;\n left: 0;\n right: 0;\n margin: 0 auto;\n transform: translate3d(0, 0, 0);\n z-index: -1;\n transition: opacity .2s, transform .3s $fastInEaseOut;\n }\n\n .enp-question-image-upload__icon--add {\n @include icon--circle--small;\n @include icon--gray-bg;\n margin-right: 5px;\n position: relative;\n top: 0.2rem;\n }\n\n &:hover,\n &:focus,\n &:active {\n padding-top: 5rem;\n padding-bottom: 2rem;\n\n .enp-question-image-upload__icon--photo {\n opacity: 1;\n z-index: 1;\n transform: translate3d(0, 1.75rem, 0);\n }\n\n .enp-question-image-upload__icon--add {\n @include icon--gray-bg--hover;\n }\n }\n }\n\n .enp-question-image__container {\n position: relative;\n margin-bottom: 1rem;\n }\n\n .enp-question-image {\n margin-bottom: 1.2rem;\n }\n\n @include radio-inline(enp-question-type);\n\n .enp-question-type__label {\n position: relative;\n z-index: 9;\n }\n\n .enp-slider-options,\n .enp-mc-options {\n margin-top: 0rem;\n display: none;\n animation: slideOutTop .25s $fastInEaseOut forwards;\n animation-delay: 0s, .05s;\n }\n\n .enp-question-type__input--slider:checked ~ .enp-slider-options,\n .enp-question-type__input--mc:checked ~ .enp-mc-options {\n visibility: visible;\n display: block;\n animation: fadeIn .45s $fastInEaseOut forwards;\n }\n\n .enp-mc-options__list {\n @include ul-no-style;\n }\n\n .enp-mc-option {\n position: relative;\n padding-left: 6px;\n\n @include breakpoint(medium) {\n padding-left: 0;\n }\n }\n\n .enp-mc-options__legend {\n @include legend--bold;\n }\n\n .enp-mc-option__add,\n .enp-mc-option__button--correct,\n .enp-mc-option__button--delete {\n display: none;\n }\n\n .enp-question-type__input--mc:checked ~ .enp-mc-options {\n .enp-mc-option__add,\n .enp-mc-option__button--correct,\n .enp-mc-option__button--delete {\n display: block;\n }\n }\n\n .enp-button__question-image-delete,\n .enp-mc-option__button--delete {\n @include btn--reset;\n position: absolute;\n top: 9px;\n right: -24px;\n fill: #bbb;\n cursor: pointer;\n\n @include breakpoint(medium) {\n right: -30px;\n }\n\n &:focus,\n &:hover {\n fill: $red;\n }\n }\n\n .enp-mc-option__button--correct {\n @include btn--reset;\n position: absolute;\n top: 8px;\n left: -24px;\n\n @include breakpoint(medium) {\n left: -35px;\n }\n\n .enp-mc-option__icon--correct {\n @include icon--circle--pad;\n width: 28px;\n height: 28px;\n fill: #fff;\n background: #fff;\n cursor: pointer;\n border: 2px solid $fade_red;\n transition: all .2s;\n }\n\n &:focus .enp-mc-option__icon--correct,\n &:hover .enp-mc-option__icon--correct {\n background: #fff;\n border-color: $green;\n fill: $green;\n }\n\n &:disabled {\n opacity: 1;\n\n .enp-mc-option__icon--correct {\n cursor: default;\n fill: #fff;\n border: 2px solid transparent;\n }\n }\n }\n\n .enp-mc-option--correct {\n .enp-mc-option__input {\n box-shadow: inset 0 0 3px $green;\n border: 1px solid $green;\n }\n\n .enp-mc-option__button--correct:focus .enp-mc-option__icon--correct,\n .enp-mc-option__button--correct:hover .enp-mc-option__icon--correct,\n .enp-mc-option__icon--correct {\n fill: #fff;\n border-color: $green;\n background: $green;\n }\n }\n\n .enp-mc-option__add {\n @include btn--dashed--light--alt-bg;\n @include small-uppercase;\n text-align: left;\n padding: 0.7rem 0.75rem 0.8rem;\n\n .enp-mc-option__add__icon {\n @include btn--icon__icon--circle--small ;\n @include icon--gray-bg;\n position: relative;\n top: 0.2rem;\n }\n\n &:hover .enp-mc-option__add__icon {\n @include icon--gray-bg--hover;\n }\n }\n\n .enp-slider-options .enp-input {\n max-width: 11.8rem;\n }\n\n .enp-slider-range__container .enp-input,\n .enp-slider-correct__container .enp-input {\n max-width: 8.8rem;\n @include breakpoint('small') {\n max-width: 11.8rem;\n }\n }\n\n .enp-slider-preview {\n border: 1px solid #ddd;\n margin-top: 0.2rem;\n margin-bottom: 1.6rem;\n padding: 1.6rem 1.6rem .6rem;\n position: relative;\n\n .enp-label--slider-preview {\n position: absolute;\n width: 100%;\n top: 0.2rem;\n left: 0.4rem;\n font-size: 0.75rem;\n text-transform: uppercase;\n }\n }\n\n .enp-slider-range__container,\n .enp-slider-correct__container {\n @include flex-spread;\n align-items: center;\n }\n\n .enp-slider-range__helper,\n .enp-slider-correct__helper {\n color: #777;\n font-size: 0.85rem;\n background: #fff;\n padding: 0 .3rem;\n position: relative;\n\n &:before {\n content: '';\n position: absolute;\n top: 44%;\n height: 4px;\n background: #ddd;\n width: 120px;\n left: -60px;\n z-index: -1;\n transition: width 0.7s $fastInEaseOut, background 1.6s $fastInEaseOut;\n }\n }\n\n .enp-slider-options {\n margin-bottom: 2rem;\n\n .enp-accordion-header {\n text-transform: uppercase;\n font-size: 0.85rem;\n padding: 0.675rem;\n }\n\n .enp-slider-advanced-options__content {\n border: none;\n box-shadow: none;\n padding-top: 1rem;\n padding-bottom: 0;\n margin-bottom: 0;\n }\n }\n\n .enp-slider-correct-high__container {\n position: relative;\n }\n\n .enp-slider-correct-high__input-container--hidden {\n display: none;\n }\n\n .enp-slider-correct__helper--hidden {\n &:before {\n width: 0;\n background: $green;\n }\n }\n\n .enp-slider-correct-answer-range--add-range {\n @include btn--dashed--light--alt-bg;\n margin-left: 0.8rem;\n font-size: 0.7rem;\n\n @include breakpoint('small') {\n font-size: 0.8rem;\n padding: .7rem;\n }\n\n @include breakpoint('medium') {\n padding: .7rem 1.2rem;\n min-width: 11.4rem;\n }\n\n .enp-slider-correct-answer-range__icon {\n @include btn--icon__icon--circle--small ;\n @include icon--gray-bg;\n position: relative;\n left: -0.2rem;\n }\n\n &:hover .enp-slider-correct-answer-range__icon {\n @include icon--gray-bg--hover;\n }\n }\n\n .enp-slider-correct-answer-range--remove-range {\n position: absolute;\n right: -1.6rem;\n bottom: 1.6rem;\n background: none;\n border: none;\n box-shadow: none;\n padding: 0 0.1rem;\n\n .enp-slider-correct-answer-range__icon {\n width: 1.2em;\n height: 1.2em;\n fill: $dark_gray;\n }\n\n &:hover,\n &:focus {\n .enp-slider-correct-answer-range__icon {\n fill: $red;\n }\n }\n\n @include breakpoint(medium) {\n top: -0.2rem;\n right: -0.2rem;\n bottom: auto;\n }\n\n }\n\n .enp-slider-options .enp-input:read-only {\n background: $light_gray;\n }\n\n .enp-answer-explanation {\n background: $light_blue;\n padding-top: 2rem;\n box-shadow: inset 1px 0px 0 #ccc, inset -1px -1px 0 #ccc, inset 0 1px 0 #ddd;\n }\n\n .enp-answer-explanation__label {\n @include label--bold;\n\n }\n\n .enp-question__button--delete {\n @include btn--reset;\n position: absolute;\n top: 9px;\n right: 9px;\n fill: #bbb;\n cursor: pointer;\n\n @include breakpoint(medium) {\n right: -30px;\n }\n\n &:hover {\n fill: $red;\n }\n }\n\n .enp-question__move {\n position: absolute;\n left: 15px;\n\n @include breakpoint(medium) {\n left: -40px;\n }\n }\n\n .enp-sort__placeholder {\n background: #ddd;\n height: 60px;\n width: 100%;\n max-height: 120px;\n margin-bottom: 1.6rem;\n }\n\n .ui-sortable .ui-sortable-helper {\n .ui-sortable-handle {\n cursor: move;\n cursor: grabbing;\n cursor: -webkit-grabbing;\n }\n }\n \n\n .enp-question__button--move {\n @include btn--reset;\n position: absolute;\n fill: #bbb;\n cursor: pointer;\n\n &:hover, &:focus {\n fill: #333;\n }\n\n &:disabled {\n opacity: 0.5;\n }\n }\n\n .enp-question__button--move--up {\n top: 0px;\n left: -9px;\n }\n\n\n .enp-question__button--move--down {\n top: 3px;\n right: -9px;\n }\n\n .enp-quiz-form__add-question {\n @include btn--icon;\n @include btn--dashed;\n padding-top: 1rem;\n padding-bottom: 1rem;\n margin-top: 1.6rem;\n margin-bottom: 2rem;\n\n .enp-add-question__icon {\n @include btn--icon__icon--circle--small;\n @include icon--normal;\n @include icon--gray-bg;\n position: relative;\n top: 0.2rem;\n }\n\n &:hover .enp-add-question__icon {\n @include icon--gray-bg--hover;\n }\n }\n\n .enp-btn--save__btns {\n @include flex;\n align-items: center;\n align-items: flex-start;\n }\n\n .enp-quiz-form__save {\n @include btn;\n width: 100%;\n margin-bottom: 1rem;\n opacity: 0.8;\n text-shadow: 0px -1px 2px rgba(0,0,0,.6);\n\n &:hover,\n &:focus {\n opacity: 1;\n }\n\n @include breakpoint(small) {\n padding: 1.2rem 1.8rem 1.1rem;\n width: 27%;\n margin-right: 3%;\n position: relative;\n }\n }\n\n .enp-quiz-form__save--reveal {\n animation: slideInTop--reduced-opacity .3s $fastInEaseOut;\n }\n\n @include btn--icon--circle(enp-btn--next-step);\n\n .enp-btn--next-step {\n // @include btn;\n width: 100%;\n padding: 1rem 1.4rem 1rem;\n\n @include breakpoint(medium) {\n padding: 1.2rem 1.8rem 1.1rem;\n }\n .enp-btn--next-step__icon {\n width: 1rem;\n height: 1rem;\n }\n // @include breakpoint(small) {\n // width: auto;\n // }\n\n /*\n * AFTER we have removed the Save button,\n * use this code to add the preview button into the\n * header\n @include media(max-medium) {\n padding: 1rem 1.4rem 1rem;\n }\n\n @include breakpoint(medium) {\n position: absolute;\n right: 20px;\n top: 10px;\n width: auto;\n z-index: 999999;\n\n &.enp-btn--next-step--fixed {\n position: fixed;\n animation: navSlideIn .25s;\n }\n }*/\n\n }\n\n .enp-btn--next-step--reveal {\n animation: slideInTop .3s $fastInEaseOut;\n }\n\n\n // UX interactions\n .enp-mc-option--inputs,\n .enp-accordion-header--inserting {\n animation: slideInBottom .4s $fastInEaseOut forwards;\n }\n\n .enp-mc-option--remove,\n .enp-question--remove,\n .enp-question__image--remove {\n animation: removeElement .5s $fastInEaseOut forwards;\n }\n\n .enp-image-upload-wait {\n @include btn--dashed--light--alt-bg;\n padding-top: 4rem;\n padding-bottom: 4rem;\n margin-bottom: 1rem;\n width: 100%;\n }\n\n // validation\n .enp-accordion-header.question-has-error {\n color: $red;\n box-shadow: 0 0 3px $red;\n }\n\n}\n\n.enp-quiz.ui-sortable--sorting #enp-quiz .enp-accordion-content {\n display: none;\n}","#enp-quiz {\n\n\n .enp-quiz-settings-container {\n\n @include breakpoint(large) {\n // margin: 0;\n // width: 40%;\n // float: left;\n }\n }\n\n .enp-quiz-preview-container {\n\n @include breakpoint(large) {\n // width: 60%;\n // float: left;\n }\n\n }\n\n .enp-quiz-share__legend,\n .enp-quiz-settings__title {\n position: relative;\n @include small-uppercase;\n font-weight: 600;\n padding-top: 0;\n }\n\n .enp-quiz-settings__form {\n margin-bottom: 3rem;\n overflow: visible;\n @include breakpoint(large) {\n padding: 0;\n margin-bottom: 0;\n }\n }\n\n .enp-fieldset {\n @include breakpoint(medium) {\n // this is necessary to keep the form elements visible on top of the\n // white BG on the sidebar. We can't set this on the whole form bc\n // then the publish button won't be positioned right\n position: relative;\n }\n }\n\n .enp-title-display__legend {\n padding-top: 0;\n\n @include breakpoint(medium) {\n padding-top: 0.4rem;\n }\n }\n\n .enp-quiz-share__input,\n .enp-quiz-styles__input {\n width: 100%;\n }\n\n .enp-quiz-styles__textarea--custom-css {\n font-family: Monaco,Consolas,\"Andale Mono\",\"DejaVu Sans Mono\",monospace;\n font-size: 0.9rem;\n min-height: 200px;\n }\n\n .enp-fieldset--section {\n padding: 1.6rem 1rem;\n\n &.enp-accordion-content--open {\n margin-bottom: 0;\n }\n }\n\n .enp-quiz-share--facebook {\n margin-bottom: 2rem;\n }\n\n @include radio-inline(enp-title-display);\n @include radio-inline(enp-mc-options-order);\n\n .enp-mc-options-order {\n margin-bottom: 1.6rem;\n }\n\n .enp-quiz-share__textarea {\n min-height: 7.6rem;\n margin-bottom: 2rem;\n\n @include breakpoint('medium') {\n min-height: 4.6rem;\n }\n\n @include breakpoint('large') {\n min-height: 7.6rem;\n }\n\n\n }\n\n .enp-preview-form__submit {\n margin-top: 1.6rem;\n margin-bottom: 1.6rem;\n }\n\n .enp-quiz-preview__title {\n @include small-uppercase;\n font-weight: 600;\n }\n\n .enp-preview-form__submit {\n @include btn;\n width: 100%;\n padding-top: 0.85rem;\n padding-bottom: 0.85rem;\n margin-bottom: 1rem;\n opacity: 0.8;\n text-shadow: 0px -1px 2px rgba(0,0,0,.6);\n\n &:hover,\n &:focus {\n opacity: 1;\n }\n }\n\n .enp-preview-form__submit--publish {\n width: 100%;\n position: relative;\n z-index: 99999999;\n padding: 1.05rem 1.8rem .95rem;\n }\n\n .enp-quiz-styles__iris-wrapper {\n position: relative;\n }\n\n // Fix for WP Color Picker formatting\n .iris-picker {\n box-sizing: content-box;\n position: relative;\n z-index: 9999999999;\n top: -1.2rem;\n margin-bottom: 1rem;\n padding-bottom: 3rem;\n padding-right: 30px;\n\n @include breakpoint(large) {\n position: absolute;\n top: -4px;\n left: 0;\n }\n\n &:last-of-type {\n margin-bottom: 0;\n }\n\n .ui-slider-handle:focus,\n .ui-draggable-handle:focus .ui-slider-handle {\n box-shadow: 0 0 3px rgba(0,0,0,.75);\n }\n\n }\n\n .enp-quiz-styles__set-default {\n @include btn--ghost;\n font-size: 0.75rem;\n position: absolute;\n left: 10px;\n bottom: 10px;\n }\n\n .enp-iris__close {\n @include btn--reset;\n position: absolute;\n top: 5px;\n right: 5px;\n fill: #888;\n cursor: pointer;\n }\n\n .enp-quiz-styles__input--color {\n padding-left: 45px;\n }\n\n .enp-quiz-styles__color-demo {\n width: 30px;\n height: 30px;\n border: 1px solid #ccc;\n top: 8px;\n left: 8px;\n border-radius: 3px;\n\n position: absolute;\n }\n\n\n}\n","#enp-quiz {\n /* Removing flexbox layout temporarily\n * because it wasn't laying out correctly before content loading\n * It would snap into the correct layout after a resize or textarea highlight\n .enp-publish-page-container {\n &:before {\n @include breakpoint(medium) {\n position: absolute;\n top: 0;\n bottom: 0;\n left: -100%;\n width: 128%;\n content: '';\n background: #fff;\n border-right: 1px solid #ddd;\n }\n\n @include breakpoint(large) {\n width: 124%;\n }\n }\n\n .enp-quiz-message {\n @include breakpoint(medium) {\n margin-left: 33%;\n }\n\n @include breakpoint(large) {\n margin-left: 26%;\n }\n }\n }\n\n .enp-publish-page-flex-container {\n @include breakpoint(medium) {\n @include flex;\n align-items: stretch;\n flex-direction: row-reverse;\n }\n }\n\n .enp-publish-page__aside-container {\n\n @include breakpoint(medium) {\n position: relative;\n margin: 0 6% 0 0;\n padding: 0;\n width: 24%;\n }\n\n @include breakpoint(large) {\n margin: 0;\n //padding-left: 20px;\n width: 20%;\n }\n }\n\n .enp-share-quiz__container,\n .enp-ab-ad__container {\n @include breakpoint(medium) {\n padding: 0;\n border: none;\n }\n }\n */\n\n .enp-share-quiz__url {\n display: block;\n font-size: 1.5rem;\n line-height: 1.4;\n word-wrap: break-word;\n }\n\n @include share_icons(enp-share-quiz);\n\n .enp-share-quiz {\n justify-content: space-around;\n margin-bottom: 0;\n }\n}\n","#enp-quiz {\n .enp-ab-create__container {\n @include container--wide;\n width: 100%;\n background: $really_light_gray;\n padding-top: 3rem;\n padding-bottom: 3rem;\n }\n\n .enp-ab-create__form {\n @include container--thin;\n }\n\n .enp-ab-create__label {\n @include label--bold;\n }\n\n .enp-ab-create-title__textarea {\n @include input--xl;\n width: 100%;\n }\n\n .enp-ab-create__select {\n @include select--wide--chevron;\n }\n\n .enp-ab-create__submit {\n width: 100%;\n padding-top: 1em;\n padding-bottom: 1em;\n }\n}\n","// TEMP for dev theme\n#headerimg h1 {\n text-align: center;\n font-size: 40px !important;\n}\n#enp-quiz {\n\n &.enp-quiz__main {\n @include container;\n display: grid;\n gap: 1em;\n min-height: 85vh;\n \n @include breakpoint(large) {\n @include container--wide;\n grid-template-columns: 1fr 4fr;\n }\n }\n\n .enp-dash-container {\n @include xpadding-vertical;\n @include xpadding-horizontal;\n transition: all .25s $fastInEaseOut;\n }\n\n .enp-dash__section-aside {\n background-color: $background;\n @include breakpoint(medium) {\n @include xpadding-vertical;\n @include xpadding-horizontal;\n }\n }\n\n .enp-breadcrumb-link__container {\n padding-bottom: 2rem;\n }\n\n .enp-search-quizzes {\n display: flex;\n justify-content: space-between;\n flex-wrap: wrap;\n padding: 1em;\n\n @include breakpoint(medium) {\n padding: 0.2rem 0.8rem;\n flex-wrap: nowrap;\n }\n @include breakpoint(large) {\n @include flex-spread-vertical;\n }\n }\n\n .enp-search-quizzes__form-item {\n margin-bottom: 0.6rem;\n flex: 0 1 48%;\n\n @include breakpoint(small) {\n margin-bottom: 0;\n margin-right: 1rem;\n flex: 1 0 auto;\n }\n\n }\n\n .enp-quiz-search {\n flex: 1 0 100%;\n position: relative;\n @include breakpoint(medium) {\n flex: 1 0 auto;\n }\n }\n\n .enp-search-quizzes__label {\n margin-bottom: 0;\n @include screen-reader-text ;\n }\n\n .enp-search-quizzes__select {\n padding: .3rem;\n border-radius: 3px;\n width: 100%;\n @include breakpoint(large) {\n min-width: 200px;\n }\n }\n\n .enp-quiz-search__input {\n width: 100%;\n margin: 0 0 0.1rem;\n padding: .3rem .3rem .3rem 26px;\n font-size: 0.85rem;\n @include breakpoint(medium) {\n max-width: 200px;\n }\n }\n\n .enp-quiz-search__icon {\n position: absolute;\n bottom: 0.3rem;\n left: 0.2rem;\n width: 21px;\n height: 21px;\n }\n\n .enp-search-quizzes__button {\n padding: 0.2rem 0.8rem;\n }\n\n .enp-search-results-description {\n font-size: 0.85rem;\n }\n\n .enp-search-results-description__link {\n white-space: nowrap;\n }\n\n .enp-search-results-description__icon {\n width: 1.3em;\n height: 1.3em;\n position: relative;\n top: 4px;\n left: 2px;\n }\n\n .enp-dash__section-title {\n @include small-uppercase;\n margin-bottom: 0.325rem;\n border-bottom: 1px solid $dark-gray;\n }\n\n .enp-dash__ab-test-helper--not-enough-quizzes {\n color: $darker-gray;\n }\n\n .enp-view-toggle {\n cursor: pointer;\n opacity: .5;\n display: none; // hide the buttons for small screens\n\n @include breakpoint(medium) {\n display: flex;\n }\n }\n\n .enp-view-toggle__active {\n opacity: 1;\n }\n\n .enp-sort-by {\n margin-left: 5px;\n }\n\n .enp-dash-list {\n @include flex-grid;\n }\n\n .enp-dash-item {\n @include flex-grid__item ;\n @include flex-spread-vertical;\n display: flex;\n z-index: 1;\n flex-direction: column;\n align-content: flex-end;\n justify-content: flex-end;\n border: none;\n border-radius: 3px;\n background-color: $gray;\n }\n\n .enp-dash-item--published {\n box-shadow: inset 4px 0 0 $blue, 0 1px 0 rgba(0,0,0,.1);\n }\n\n .enp-dash-item--draft {\n box-shadow: inset 4px 0 0 $blue, 0 1px 0 rgba(0,0,0,.1);\n }\n\n .enp-dash-item--remove {\n animation: removeElement .5s $fastInEaseOut forwards;\n }\n\n .enp-dash-list--list-view {\n .enp-dash-item {\n margin: 0 0 0.8rem;\n flex-basis: 100%;\n }\n }\n\n .enp-dash-item__spinner {\n @include flex-center ;\n position: absolute;\n top: 0;\n bottom: 0;\n left: 0;\n right: 0;\n background: rgba(245,216,216,0.8);\n width: 100%;\n animation: fadeIn .3s $fastInEaseOut;\n }\n\n .enp-dash-item__header {\n padding: 0.5rem 1rem;\n background: $light_gray;\n border-bottom: 1px solid $dark_gray;\n display: flex;\n justify-content: space-between;\n align-items: center;\n @include border-radius;\n }\n\n .enp-dash-item__title {\n @include flex-grid__title ;\n padding: 0;\n margin-bottom: 0;\n a {\n color: $blue;\n }\n }\n\n .enp-dash-item__content {\n padding: 0rem 0 0.375rem;\n position: relative;\n transition: all .2s $fastInEaseOut;\n }\n\n .enp-dash-item__meta {\n @include hint;\n font-size: 0.75rem;\n }\n\n .enp-dash-item__username {\n word-wrap: break-word;\n padding-left: 0.4rem;\n margin-left: 0.2rem;\n border-left: 1px solid #ddd;\n }\n\n .enp-dash-item__title--ab-test {\n padding-bottom: 0;\n }\n\n .enp-dash-item__ab-quizzes {\n @include ul-no-style;\n font-size: 0.85rem;\n color: $dark_gray;\n margin-bottom: 0.8rem;\n }\n\n .enp-dash-item__nav {\n @include ul-no-style;\n margin-bottom: 0;\n font-size: 0.85rem;\n }\n\n .enp-dash-item__nav__item {\n display: flex;\n margin: 0;\n width: 100%;\n align-items: center;\n &:hover {\n background-color: $gray;\n .enp-dash-item__icon {\n fill: $red;\n }\n }\n a {\n font-weight: normal;\n color: $darker_gray;\n @include flex;\n align-items: center;\n width: 100%;\n padding: 12px;\n &:focus,\n &:hover {\n color: $red;\n outline: 1px dotted $link;\n outline-offset: 1px;\n }\n }\n }\n .enp-delete-quiz {\n width: 100%;\n &:hover {\n .enp-dash-item__delete {\n color: $red;\n }\n .enp-icon {\n fill: $red;\n }\n }\n }\n .enp-dash-item__delete {\n @include btn--reset;\n @include flex;\n padding: 12px;\n align-items: center;\n position: relative;\n line-height: 1.6;\n color: $darker_gray;\n cursor: pointer;\n width: 100%;\n .enp-icon {\n fill: $darker_gray;\n }\n }\n .enp-dash-item__icon {\n fill: $darker_gray;\n width: 15px;\n height: 15px;\n margin-right: 10px;\n }\n\n .enp-dash-item__nav--collapsible {\n display: none;\n position: absolute;\n z-index: 2;\n top: 44px;\n right: -17px;\n width: 195px;\n background-color: #fff;\n text-align: left;\n transform: translate3d(0,0,0);\n transition: all .2s $fastInEaseOut;\n\n .enp-dash-item__nav__item {\n cursor: pointer;\n }\n }\n\n .enp-dash-item__menu-action {\n height: 24px;\n background: none;\n border: none;\n color: #444;\n padding: 0;\n bottom: 0.2rem;\n right: 1.5rem;\n top: 1.5rem;\n cursor: pointer;\n }\n\n .enp-dash-item__menu-action-wrap {\n max-width: 0;\n display: flex;\n flex-direction: column;\n align-items: flex-end;\n }\n\n .enp-dash-item__menu-action__icon {\n width: 15px;\n height: 15px;\n fill: $darker_gray;\n transition: all .3s $fastInEaseOut;\n }\n\n .enp-dash-item__menu-action__icon--bottom {\n \n }\n\n .enp-dash-item--menu-active {\n transform: translate3d(0,-3px,0);\n z-index: 2;\n .enp-dash-item__nav-wrap {\n position: relative;\n }\n\n &.enp-dash-item--published {\n box-shadow: inset 4px 0 0 $green, 0 2px 2px rgba(0,0,0,.2);\n }\n\n &.enp-dash-item--draft {\n box-shadow: inset 4px 0 0 lighten($green, 25%), 0 2px 2px rgba(0,0,0,.2);\n }\n\n .enp-dash-item__menu-action__icon--bottom {\n transform: rotateX(180deg);\n }\n\n .enp-dash-item__nav--collapsible {\n display: block;\n animation: slideInTop .25s $fastInEaseOut forwards;\n @include border-radius;\n @include box-shadow;\n }\n\n .enp-dash-item__content {\n opacity: 0.4;\n }\n\n }\n\n\n .enp-quiz-results {\n display: flex;\n justify-content: space-around;\n list-style: none;\n margin: 0.8rem 0 0;\n padding: 0;\n text-align: center;\n }\n\n .enp-quiz-results__item {\n\n margin: 0 2% 0 0;\n padding: 0;\n color: #454545;\n\n @media (max-width:280px) {\n width: 100%;\n padding: 0;\n margin-bottom: 0.6rem;\n }\n }\n\n .enp-quiz-results__number {\n font-size: 1.6rem;\n line-height: 1;\n position: relative;\n }\n\n .enp-dash-item--draft .enp-quiz-results__number {\n opacity: 0.5;\n }\n\n .enp-quiz-results__number--average-score {\n color: darken($green, 8);\n\n &:after {\n content: '%';\n font-size: .9rem;\n position: absolute;\n top: .3rem;\n right: -1rem;\n }\n }\n\n .enp-quiz-results__label {\n text-transform: uppercase;\n font-size: .7rem;\n font-weight: 300;\n color: #888;\n }\n\n\n .enp-quiz-list__view {\n // @include flex-bottom;\n }\n\n .enp-dash-item--add-new__wrap {\n display: grid;\n gap: 1em;\n grid-template-columns: 1fr 1fr;\n }\n\n .enp-dash-list--quiz__container {\n display: grid;\n gap: 1em;\n @include breakpoint(large) {\n grid-template-columns: 1fr 1fr;\n }\n }\n\n .enp-dash-item--add-new {\n background: none;\n border: none;\n padding: 0;\n position: relative;\n @include header-space;\n }\n\n .enp-dash-link--add-new {\n @include btn--dashed--light;\n justify-content: flex-start;\n color: $link;\n padding: 1rem 1.2rem;\n\n\n @include breakpoint(medium) {\n @include small-uppercase;\n @include flex-center;\n flex-direction: column;\n position: absolute;\n top: 0;\n left: 0;\n right: 0;\n bottom: 0;\n }\n\n .enp-dash-link__icon {\n @include icon--circle;\n @include icon--normal;\n margin-right: 5px;\n background-color: $dark_blue;\n\n @include breakpoint(medium) {\n width: 2rem;\n height: 2rem;\n margin: 0.8rem 0 0.2rem;\n }\n }\n\n &:hover {\n color: $link_hover;\n\n .enp-dash-link__icon {\n fill: #fff;\n background: $link_hover;\n }\n }\n\n }\n\n .enp-quiz-message--welcome p {\n color: $font;\n }\n\n // pagination\n .enp-paginate {\n @include ul-no-style ;\n @include flex-center ;\n font-size: 1rem;\n }\n\n .enp-paginate__link {\n @include flex-center ;\n margin: 0 0.2rem;\n padding: 0 0.4rem;\n border-radius: 3px;\n font-weight: normal;\n\n }\n\n .enp-paginate__link--current-page {\n border: 2px solid $blue;\n }\n\n .enp-paginate__item--last-page,\n .enp-paginate__item--first-page {\n display: flex;\n }\n\n .enp-paginate__item--first-page:after,\n .enp-paginate__item--last-page:before {\n content: '...';\n font-size: 1rem;\n position: relative;\n bottom: 0.2rem;\n opacity: 0.6;\n }\n\n .enp-paginate__item--no-gap {\n &:before,\n &:after {\n content:'';\n }\n }\n\n .enp-paginate__item--next-page {\n margin-left: 0.2rem;\n }\n\n .enp-paginate__item--previous-page {\n margin-right: 0.2rem;\n }\n}\n","#enp-quiz {\n .enp-quiz-breadcrumbs {\n grid-row: 1;\n // @include flex-center;\n // position: absolute;\n // top: 0;\n // width: 1000%;\n // left: -500%;\n // right: -500%;\n // margin-left: auto;\n // margin-right: auto;\n // background: #fff;\n // border-bottom: 1px solid #ddd;\n // padding: 10px;\n // z-index: 99999;\n }\n\n .enp-quiz-breadcrumbs__list {\n @include flex-inline;\n }\n\n .enp-quiz-breadcrumbs__item {\n @include flex-inline__item ;\n @include flex-center;\n fill: $link;\n margin-right: 5px;\n\n @include breakpoint(small) {\n margin-right: 10px;\n }\n }\n\n .enp-quiz-breadcrumbs__link--disabled {\n @include disabled;\n }\n\n .enp-quiz-breadcrumbs__link--active {\n @include btn--ghost;\n @include btn--thin;\n }\n\n .enp-quiz-breadcrumbs__link {\n font-size: 1rem;\n font-weight: 400;\n text-transform: none;\n letter-spacing: 0;\n }\n\n // JS\n .enp-quiz-breadcrumbs--fixed {\n top: 0;\n position: fixed;\n animation: navSlideIn .25s;\n }\n}\n","#enp-quiz {\n .enp-results-title {\n font-size: 1.6rem;\n text-align: center;\n padding: 3.2rem 20px 2.6rem;\n background: $really_light_gray;\n margin: -1.2rem 0 2rem;\n border-bottom: 1px solid #ddd;\n\n &:after {\n @include small-uppercase;\n display: block;\n content: \"RESULTS\";\n font-weight: normal;\n }\n }\n\n .enp-results__container {\n @include container--wide;\n display: block;\n\n @include breakpoint(large) {\n display: flex;\n @include flex-spread;\n }\n }\n\n .enp-results__container,\n .enp-quiz-scores__container,\n .enp-results-flow__container {\n @include media(max-medium) {\n padding: 8px;\n }\n }\n\n .enp-quiz-scores__container,\n .enp-results-flow__container {\n width: 100%;\n\n @include breakpoint(large) {\n width: 48%;\n }\n }\n\n .enp-quiz-scores {\n margin-top: 2.6rem;\n }\n\n .enp-quiz-score__line-chart {\n height: 300px;\n margin-bottom: 1rem;\n\n .ct-label {\n color: $font;\n }\n\n .ct-grid {\n stroke: #dadada;\n stroke-dasharray: 0;\n }\n\n .ct-line {\n stroke: $green;\n stroke-width: 2px;\n }\n\n .ct-point {\n stroke: $green;\n stroke-width: 8px;\n }\n }\n\n .enp-quiz-scores-table {\n width: 100%;\n max-width: 500px;\n margin: 0 auto;\n\n tr th {\n background-color: #fff;\n }\n }\n\n .enp-quiz-scores-table__label {\n padding-left: 5%;\n }\n\n .enp-quiz-scores-table__score {\n text-align: right;\n padding-right: 5%;\n }\n\n .enp-results-flow {\n position: relative;\n margin: 2rem auto;\n width: 320px;\n height: 320px;\n border-radius: 50%;\n\n @include media(300px) {\n left: -100px;\n }\n\n @include breakpoint(small) {\n width: 390px;\n height: 390px;\n }\n\n @include breakpoint(medium) {\n width: 450px;\n height: 450px;\n }\n\n @include breakpoint(large) {\n width: 400px;\n height: 400px;\n }\n\n }\n\n .enp-results-flow__section-title {\n @include screen-reader-text;\n }\n\n .enp-results-flow__item {\n border-radius: 50%;\n text-align: center;\n height: 100%;\n width: 100%;\n margin: 0 auto;\n left: 0;\n right: 0;\n padding: 12.5% 0 0;\n letter-spacing: 0.05rem;\n border: 2px solid $green;\n animation: 0.85s slideInBottom $fastInEaseOut forwards;\n }\n\n .enp-results-flow__item--total-views {\n background: #fff;\n }\n\n .enp-results-flow__item--quiz-starts {\n width: 65%;\n height: 65%;\n position: absolute;\n padding-top: 8%;\n bottom: 2.5%;\n background: lighten($green, 48);\n }\n\n .enp-results-flow__item--quiz-finishes {\n width: 35%;\n height: 35%;\n position: absolute;\n bottom: 5%;\n background: lighten($green, 35);\n }\n\n .enp-results-flow__title {\n @include small-uppercase;\n color: #444;\n font-size: .7rem;\n margin-bottom: 0px;\n\n @include breakpoint(medium) {\n font-weight: bold;\n margin-bottom: 2px;\n }\n }\n\n .enp-results-flow__number {\n font-weight: bold;\n font-size: 1.4rem;\n line-height: 1.2;\n }\n\n .enp-results-flow__number--total-views {\n font-size: 2rem;\n }\n\n .enp-results-flow__number--quiz-starts {\n font-size: 1.65rem;\n }\n\n .enp-results-flow__percentage {\n font-size: .8rem;\n font-weight: normal;\n position: relative;\n display: inline-block;\n top: -0.7em;\n left: -.1rem;\n color: #444;\n\n &:after {\n content: '%';\n position: absolute;\n right: -0.75rem;\n font-size: .7rem;\n color: #444;\n }\n }\n\n .enp-results-questions__section {\n // @include section--alt;\n padding-top: 5rem;\n padding-bottom: 3rem;\n margin-top: 5rem;\n margin-bottom: 3rem;\n @include breakpoint(medium) {\n @include xmargin-horizontal;\n }\n }\n\n .enp-results-questions__container {\n @include media(max-small) {\n padding-left: 8px;\n padding-right: 8px;\n }\n }\n\n .enp-results-questions__header {\n align-items: flex-start;\n flex-direction: column;\n\n @include breakpoint(small) {\n @include flex-spread;\n flex-direction: row;\n align-items: flex-end;\n }\n }\n\n .enp-results-questions__title {\n @include small-uppercase;\n }\n\n .enp-results-questions__key {\n @include small-uppercase;\n }\n\n .enp-results-questions {\n @include ul-no-style;\n }\n\n .enp-results-question {\n width: 100%;\n font-size: 1rem;\n padding: 0;\n margin-bottom: 1rem;\n }\n\n .enp-results-question__header {\n padding: 1rem 1.2rem;\n position: relative;\n }\n\n .enp-results-question__question,\n .enp-results-question__stats {\n font-size: 1rem;\n line-height: 1.4;\n }\n\n .enp-results-question__question {\n font-weight: normal;\n\n @include breakpoint(small) {\n padding-right: 7em;\n margin-bottom: 0;\n }\n }\n\n .enp-results-question__stats {\n font-size: .9rem;\n\n @include breakpoint(small) {\n position: absolute;\n bottom: 1rem;\n right: 1.2rem;\n text-align: right;\n }\n }\n\n .enp-results-questions__key,\n .enp-results-question__stats {\n font-weight: 300;\n }\n\n .enp-results-question__content {\n padding: 2rem 1.2rem 1.2rem;\n @include border-radius;\n }\n\n .enp-results-question__deep-stats {\n @include flex-spread-around;\n @include ul-no-style;\n text-align: center;\n\n @include media(500px) {\n flex-wrap: wrap;\n }\n }\n\n .enp-results-question__deep-stat {\n\n @include media(500px) {\n width: 48%;\n margin: 0 2% 2% 0;\n padding: 1.6rem 0;\n\n &:nth-child(even) {\n margin-right: 0;\n }\n }\n\n @include media(280px) {\n width: 100%;\n padding: 0;\n margin-bottom: 1.6rem;\n }\n }\n\n .enp-results-question__deep-stat__number {\n font-size: 1.8rem;\n line-height: 1;\n position: relative;\n }\n\n .enp-results-question__deep-stat__number--finishes,\n .enp-results-question__deep-stat__number--correct {\n @include dark-green;\n }\n\n .enp-results-question__deep-stat__number--incorrect {\n @include fade-red;\n }\n\n .enp-results-question__deep-stat__number--correct,\n .enp-results-question__deep-stat__number--incorrect,\n .enp-results-question__deep-stat__number--finishes {\n &:after {\n content: '%';\n font-size: .9rem;\n position: absolute;\n top: .3rem;\n right: -1rem;\n }\n }\n\n .enp-results-question__deep-stat__label {\n @include small-uppercase;\n font-size: .8rem;\n }\n\n .enp-results-question__options {\n @include ul-no-style;\n margin-bottom: 0;\n }\n\n .enp-results-question__option {\n padding: 0.8rem 0.8rem 0.8rem 0.4rem;\n border-top: 1px solid #ddd;\n @include media(max-small) {\n position: relative;\n flex-direction: column;\n }\n\n @include breakpoint(small) {\n @include flex-spread;\n flex-direction: row;\n }\n\n &:first-of-type {\n margin-top: 1.4rem;\n }\n\n }\n\n .enp-results-question__option--correct {\n background: lighten($green, 48);\n }\n\n .enp-results-question__option__text {\n flex-grow: 100;\n margin-right: 1rem;\n }\n\n .enp-results-question__option__text__helper {\n font-weight: 300;\n @include small-uppercase;\n margin-right: 0.4rem;\n }\n\n .enp-results-question__option__icon {\n @include media(max-small) {\n position: relative;\n left: -3px;\n }\n\n @include breakpoint(small) {\n margin-right: 0.3rem;\n min-width: 1.6rem;\n }\n }\n\n .enp-results-question__option__icon--incorrect {\n fill: $fade_red;\n opacity: 0.5;\n }\n\n .enp-results-question__option__icon--correct {\n fill: $dark_green;\n opacity: 1;\n }\n\n .enp-results-question__option__percentage--incorrect {\n @include fade-red;\n }\n\n .enp-results-question__option__percentage--correct {\n @include dark-green;\n }\n\n .enp-results-question__option__number-selected {\n font-weight: 300;\n\n @include media(max-small) {\n position: absolute;\n top: 0.8rem;\n right: 0.8rem;\n }\n }\n\n .enp-slider-responses__title {\n @include small-uppercase;\n font-weight: 400;\n margin-top: 1.6rem;\n }\n\n .enp-slider-responses__line-chart {\n .ct-point {\n stroke-width: 8px;\n }\n }\n\n .enp-slider-responses__line-chart--low,\n .enp-slider-responses__line-chart--high {\n stroke: $red;\n }\n\n .enp-slider-responses__line-chart--correct {\n stroke: $green;\n }\n\n .enp-slider-responses-table {\n width: 100%;\n }\n\n .enp-slider-responses-table tr:nth-child(even) td {\n background-color: #fff;\n }\n\n .enp-slider-responses-table tr.enp-slider-responses-table__response--correct td {\n background-color: lighten($green, 48);\n }\n\n .enp-slider-responses-table__content {\n box-shadow: none;\n padding-top: 1rem;\n }\n\n .enp-slider-responses-table--hide-zero {\n .enp-slider-responses-table__frequency--zero {\n display: none;\n }\n }\n\n .enp-slider-responses-table__response-frequency {\n @include flex-spread ;\n align-items: center;\n }\n\n .enp-slider-responses-table__toggle-zero-frequency {\n @include accordion__header ;\n width: auto;\n padding: 0 0.6rem;\n margin: 0;\n }\n\n\n\n}\n\n.enp-quiz-results {\n #enp-quiz .enp-aside {\n border: none;\n }\n\n .enp-results-questions__title__quiz-title {\n @include screen-reader-text;\n }\n}\n","#enp-quiz {\n\n .enp-results--ab {\n display: block;\n margin-bottom: 3rem;\n\n @include breakpoint(large) {\n display: flex;\n flex-wrap: wrap;\n align-content: flex-end;\n width: 50%;\n padding: 10px;\n }\n\n }\n\n .enp-results--a {\n @include breakpoint(large) {\n padding-right: 1rem;\n border-right: 1px solid #ddd;\n }\n }\n\n .enp-results--b {\n @include breakpoint(large) {\n padding-left: 1rem;\n }\n }\n\n .enp-results-title--ab,\n .enp-results__container--ab .enp-results-flow__container {\n min-width: 100%;\n }\n\n .enp-results--loser {\n .enp-results-flow__item {\n border: 2px solid $red;\n }\n\n .enp-results-flow__item--quiz-starts {\n background: lighten($red, 42);\n }\n\n .enp-results-flow__item--quiz-finishes {\n background: lighten($red, 34);\n }\n\n th,\n .enp-results-questions__title {\n color: $dark_red;\n }\n\n }\n\n .enp-results--winner {\n th,\n .enp-results-questions__title {\n color: $dark_green;\n }\n\n }\n\n .enp-results-title--a,\n .enp-results-title--b {\n background: transparent;\n }\n\n .enp-ab-scores {\n @include container--wide;\n\n th.enp-quiz-scores-table__label,\n th.enp-quiz-scores-table__score {\n padding-left: 0;\n padding-right: 0;\n }\n }\n\n .enp-ab-scores__title {\n padding-left: 50px;\n @include small-uppercase;\n }\n\n .enp-quiz-score__line-chart .enp-test-loser {\n\n .ct-line,\n .ct-point {\n stroke: $red;\n }\n }\n\n .enp-quiz-scores {\n margin-top: 0;\n }\n\n .enp-question-results,\n .enp-ab-scores .enp-quiz-scores-table {\n margin-bottom: 1.6rem;\n\n @include breakpoint(large) {\n float: left;\n width: 48%;\n margin: 0;\n\n &:first-of-type {\n margin-right: 4%;\n }\n }\n }\n\n .enp-question-results__container {\n @include container--wide;\n }\n\n .enp-question-results--ab {\n\n .enp-results-questions__section {\n background: #fff;\n border: none;\n padding: 1.6rem 0;\n margin: 1.6rem auto;\n }\n\n .enp-results-questions__container {\n padding: 0;\n }\n\n }\n\n .enp-ab-new-embed-code__section {\n @include container--thin;\n max-width: 540px;\n padding-bottom: 2rem;\n margin-bottom: 2rem;\n\n .enp-ab-embed-code {\n padding: 0;\n margin: 0;\n }\n }\n\n .enp-ab-embed-code__section {\n @include section--alt;\n padding-top: 5rem;\n margin-top: 5rem;\n }\n\n .enp-ab-embed-code {\n @include container;\n }\n\n .enp-ab-embed-code__title {\n @include small-uppercase;\n }\n\n .enp-embed-code__textarea {\n margin-bottom: 0;\n }\n\n .enp-embed-code__instructions {\n font-size: 1.1rem;\n }\n}\n","#enp-quiz {\n\n .enp-slider {\n margin-bottom: 1.6rem;\n }\n\n .enp-slider-input__container {\n display: flex;\n align-items: center;\n justify-content: center;\n margin: 1.6rem auto;\n position: relative;\n }\n\n .enp-slider-input__label {\n @include label;\n }\n\n .enp-slider-input__prefix,\n .enp-slider-input__suffix {\n font-size: 1rem;\n }\n\n .enp-slider-input__prefix {\n margin-right: .2rem;\n white-space: pre;\n }\n\n .enp-slider-input__suffix {\n margin-left: .2rem;\n white-space: pre;\n }\n\n .enp-slider-input__input {\n @include input;\n margin-bottom: 0;\n padding: .75rem;\n width: auto;\n transition: all .25s $fastInEaseOut;\n }\n\n .enp-slider-input__input--incorrect {\n color: $red;\n }\n\n .enp-slider-input__input--correct {\n color: $dark_green;\n }\n\n .enp-slider-input__input--invalid-animation {\n box-shadow: 0 0 2px 1px $fade_red;\n }\n\n .enp-slider_input__range-helper {\n position: absolute;\n bottom: -1.2rem;\n font-size: 0.8rem;\n }\n\n .enp-slider_input__range-helper--low {\n left: 0;\n }\n\n .enp-slider_input__range-helper--high {\n right: 0;\n }\n\n .enp-slider-input__range-helper__number {\n position: relative;\n color: $dark_gray;\n }\n\n .enp-slider_input__range-helper__number--low {\n\n }\n\n .enp-slider_input__range-helper__number--high {\n\n }\n\n .ui-slider-range-show-correct__tooltip-container {\n position: relative;\n }\n\n .ui-slider-range-show-correct__tooltip {\n position: absolute;\n top: -0.4rem;\n margin-left: -0.55rem;\n height: 1rem;\n width: 1.1rem;\n height: 1.1rem;\n border: 2px solid $green;\n background-color: #fff;\n border-radius: 50%;\n z-index: 9999;\n }\n\n .ui-slider-range-show-correct__tooltip--low {\n left: 0;\n }\n\n .ui-slider-range-show-correct__tooltip--high {\n right: -0.55rem;\n }\n\n .ui-slider-range-show-correct__tooltip__text {\n position: relative;\n color: darken($green, 15);\n top: -1.35rem;\n font-size: .825rem;\n min-width: 100%;\n display: inline-block;\n text-align: center;\n text-shadow: 0 1px 0 #fff;\n }\n\n .ui-slider-range-show-correct__tooltip__text--low {\n\n }\n\n .ui-slider-range-show-correct__tooltip__text--high {\n\n }\n\n .ui-slider-range-show-correct__tooltip__text--low-center {\n //left: 0; // not perfectly centered for huge numbers, but is for small numbers\n }\n\n // JQUERY SLIDER\n .enp-slider {\n\t\tposition: relative;\n\t\ttext-align: left;\n\t\tbackground: #ddd;\n\n\t\t/* Layout helpers\n\t\t----------------------------------*/\n\t\t.ui-helper-hidden {\n\t\t\tdisplay: none;\n\t\t}\n\t\t.ui-helper-hidden-accessible {\n\t\t\tborder: 0;\n\t\t\tclip: rect(0 0 0 0);\n\t\t\theight: 1px;\n\t\t\tmargin: -1px;\n\t\t\toverflow: hidden;\n\t\t\tpadding: 0;\n\t\t\tposition: absolute;\n\t\t\twidth: 1px;\n\t\t}\n\t\t.ui-helper-reset {\n\t\t\tmargin: 0;\n\t\t\tpadding: 0;\n\t\t\tborder: 0;\n\t\t\toutline: 0;\n\t\t\tline-height: 1.3;\n\t\t\ttext-decoration: none;\n\t\t\tfont-size: 100%;\n\t\t\tlist-style: none;\n\t\t}\n\t\t.ui-helper-clearfix:before,\n\t\t.ui-helper-clearfix:after {\n\t\t\tcontent: \"\";\n\t\t\tdisplay: table;\n\t\t\tborder-collapse: collapse;\n\t\t}\n\t\t.ui-helper-clearfix:after {\n\t\t\tclear: both;\n\t\t}\n\t\t.ui-helper-clearfix {\n\t\t\tmin-height: 0; /* support: IE7 */\n\t\t}\n\t\t.ui-helper-zfix {\n\t\t\twidth: 100%;\n\t\t\theight: 100%;\n\t\t\ttop: 0;\n\t\t\tleft: 0;\n\t\t\tposition: absolute;\n\t\t\topacity: 0;\n\t\t\tfilter:alpha(opacity=0); /* support: IE8 */\n\t\t}\n\n\t\t.ui-front {\n\t\t\tz-index: 100;\n\t\t}\n\n\n\t\t/* Interaction Cues\n\t\t----------------------------------*/\n\t\t.ui-state-disabled {\n\t\t\tcursor: default !important;\n\t\t}\n\n\n\t\t/* Icons\n\t\t----------------------------------*/\n\n\t\t/* states and images */\n\t\t.ui-icon {\n\t\t\tdisplay: block;\n\t\t\ttext-indent: -99999px;\n\t\t\toverflow: hidden;\n\t\t\tbackground-repeat: no-repeat;\n\t\t}\n\n\n\t\t/* Misc visuals\n\t\t----------------------------------*/\n\n\t\t/* Overlays */\n\t\t.ui-widget-overlay {\n\t\t\tposition: fixed;\n\t\t\ttop: 0;\n\t\t\tleft: 0;\n\t\t\twidth: 100%;\n\t\t\theight: 100%;\n\t\t}\n\n\t\t.ui-slider-handle {\n\t\t\tbackground: #fff;\n\t\t\tborder-radius: 50%;\n\t\t\tborder: 1px solid #aaa;\n\t\t\tposition: absolute;\n\t\t\tz-index: 2;\n\t\t\twidth: 1.2rem;\n\t\t\theight: 1.2rem;\n top: -.4rem;\n\t\t\tmargin-left: -.6rem;\n\t\t\tcursor: default;\n\t\t\t-ms-touch-action: none;\n\t\t\ttouch-action: none;\n\t\t\ttransition: opacity 0.2s $fastInEaseOut, height .18s $fastInEaseOut, width .18s $fastInEaseOut, transform 0.18s $fastInEaseOut;\n\n @include media(max-medium) {\n width: 2rem;\n \t\t\theight: 2rem;\n top: -.85rem;\n margin-left: -1rem;\n transform: rotate(225deg);\n }\n\n\t\t\t&:focus {\n\t\t\t\toutline: none;\n\t\t\t\tbox-shadow: 0 0 3px 1px #4D90FE;\n\t\t\t}\n\n &.ui-state-active {\n @include media(max-medium) {\n width: 2.2rem;\n height: 2.2rem;\n border-top-left-radius: 0;\n transform: translate3d(-0.2rem, -0.8rem, 0) rotate(225deg);\n }\n\n }\n\n\t\t}\n\n .ui-slider-handle--correct,\n\t\t.ui-slider-handle--incorrect {\n width: 1.1rem;\n\t\t\theight: 1.1rem;\n top: -.4rem;\n margin-left: -.55rem;\n }\n\n .ui-slider-handle--incorrect {\n z-index: 1;\n\t\t\tborder: 2px solid $red;\n\t\t}\n\n .ui-slider-handle--correct {\n border: 2px solid $green;\n z-index: 99999;\n }\n\n\t\t.ui-slider-range {\n\t\t\tposition: absolute;\n\t\t\tz-index: 1;\n\t\t\tfont-size: .7rem;\n\t\t\tdisplay: block;\n\t\t\tborder: 0;\n\t\t\tbackground-position: 0 0;\n\t\t\ttop: 0;\n\t\t\theight: 100%;\n\t\t}\n\n .ui-slider-range-show-correct {\n background: $green;\n z-index: 9;\n }\n\n\t\t.ui-slider-range-min {\n\t\t\tleft: 0;\n\t\t\tbackground: $green;\n\t\t}\n\n\t\t.ui-slider-range-max {\n\t\t\tright: 0;\n\t\t}\n\n\t\t/* support: IE8 - See #6727 */\n\t\t&.ui-state-disabled .ui-slider-handle,\n\t\t&.ui-state-disabled .ui-slider-range {\n\t\t\tfilter: inherit;\n\t\t}\n\t}\n\n\t.ui-slider-horizontal {\n\t\theight: .3rem;\n\t}\n\n\t.enp-question__answered {\n\t\t.enp-slider {\n\t\t\tbackground: #bbb;\n\t\t}\n\n\t\t.ui-slider-range-min {\n\t\t\tbackground: #fff;\n\t\t}\n\n\t}\n\n}\n"]} \ No newline at end of file diff --git a/public/quiz-create/css/sass/_dashboard.scss b/public/quiz-create/css/sass/_dashboard.scss index a9041f6e..08b105fb 100644 --- a/public/quiz-create/css/sass/_dashboard.scss +++ b/public/quiz-create/css/sass/_dashboard.scss @@ -158,6 +158,7 @@ @include flex-grid__item ; @include flex-spread-vertical; display: flex; + z-index: 1; flex-direction: column; align-content: flex-end; justify-content: flex-end; @@ -255,7 +256,6 @@ display: flex; margin: 0; width: 100%; - padding: 12px; align-items: center; &:hover { background-color: $gray; @@ -265,27 +265,40 @@ } a { font-weight: normal; - color: $red; + color: $darker_gray; @include flex; align-items: center; - - &:focus { + width: 100%; + padding: 12px; + &:focus, + &:hover { + color: $red; outline: 1px dotted $link; outline-offset: 1px; } } - - &:last-of-type { - margin-right: 0; + } + .enp-delete-quiz { + width: 100%; + &:hover { + .enp-dash-item__delete { + color: $red; + } + .enp-icon { + fill: $red; + } } } - .enp-dash-item__delete { @include btn--reset; + @include flex; + padding: 12px; + align-items: center; position: relative; - padding: 0; + line-height: 1.6; + color: $darker_gray; cursor: pointer; - @include flex; + width: 100%; .enp-icon { fill: $darker_gray; } @@ -295,15 +308,14 @@ width: 15px; height: 15px; margin-right: 10px; - // min-width: 15%; } .enp-dash-item__nav--collapsible { display: none; position: absolute; z-index: 2; - top: 53px; - right: 1.5rem; + top: 44px; + right: -17px; width: 195px; background-color: #fff; text-align: left; @@ -311,7 +323,6 @@ transition: all .2s $fastInEaseOut; .enp-dash-item__nav__item { - padding: 0.5rem 1rem; cursor: pointer; } } @@ -348,6 +359,10 @@ .enp-dash-item--menu-active { transform: translate3d(0,-3px,0); + z-index: 2; + .enp-dash-item__nav-wrap { + position: relative; + } &.enp-dash-item--published { box-shadow: inset 4px 0 0 $green, 0 2px 2px rgba(0,0,0,.2); @@ -360,9 +375,6 @@ .enp-dash-item__menu-action__icon--bottom { transform: rotateX(180deg); } - // .enp-dash-item__menu-action__icon--top { - // transform: rotateX(-180deg) translateY(0px); - // } .enp-dash-item__nav--collapsible { display: block; @@ -478,6 +490,7 @@ @include icon--circle; @include icon--normal; margin-right: 5px; + background-color: $dark_blue; @include breakpoint(medium) { width: 2rem; diff --git a/public/quiz-create/includes/class-enp_quiz-quiz_create.php b/public/quiz-create/includes/class-enp_quiz-quiz_create.php index 5c7ec59b..f3322308 100644 --- a/public/quiz-create/includes/class-enp_quiz-quiz_create.php +++ b/public/quiz-create/includes/class-enp_quiz-quiz_create.php @@ -20,53 +20,56 @@ * @subpackage Enp_quiz/public/Quiz_create * @author Engaging News Project */ -class Enp_quiz_Quiz_create extends Enp_quiz_Create { - public $quiz, - $quiz_action_url, - $new_quiz_flag; - public function __construct() { - // load the quiz - $this->quiz = $this->load_quiz(); - $quiz_id = $this->quiz->get_quiz_id(); - $this->quiz_action_url = $this->set_quiz_action_url($quiz_id); - $this->new_quiz_flag = $this->set_new_quiz_flag($quiz_id); - - // if the quiz is published, go to the preview page instead - // because you can't edit published quizzes and display error message - // TODO: Offer to duplicate the quiz in error message? - $this->quiz_published_redirect($this->quiz); - - //add_action('init', array($this, 'register_my_session', 1)); - // Other page classes will not need to do this - add_filter( 'the_content', array($this, 'load_content' )); - // load take quiz styles +class Enp_quiz_Quiz_create extends Enp_quiz_Create +{ + public $quiz, + $quiz_action_url, + $new_quiz_flag; + public function __construct() + { + // load the quiz + $this->quiz = $this->load_quiz(); + $quiz_id = $this->quiz->get_quiz_id(); + $this->quiz_action_url = $this->set_quiz_action_url($quiz_id); + $this->new_quiz_flag = $this->set_new_quiz_flag($quiz_id); + + // if the quiz is published, go to the preview page instead + // because you can't edit published quizzes and display error message + // TODO: Offer to duplicate the quiz in error message? + $this->quiz_published_redirect($this->quiz); + + //add_action('init', array($this, 'register_my_session', 1)); + // Other page classes will not need to do this + add_filter('the_content', array($this, 'load_content')); + // load take quiz styles add_action('wp_enqueue_scripts', array($this, 'enqueue_styles')); // load take quiz scripts add_action('wp_enqueue_scripts', array($this, 'enqueue_scripts')); - // load js templates - add_action('wp_footer', array($this, 'quiz_create_js_templates')); - } - - public function load_content($content) { - ob_start(); - //Start the class - $Quiz_create = $this; - $quiz = $this->quiz; - $quiz_id = $quiz->get_quiz_id(); - $quiz_status = $quiz->get_quiz_status(); - $enp_quiz_nonce = parent::$nonce; - $user_action = $this->load_user_action(); - $enp_current_page = 'create'; - - include_once( ENP_QUIZ_CREATE_TEMPLATES_PATH.'/quiz-create.php' ); - $content = ob_get_contents(); - if (ob_get_length()) ob_end_clean(); - - return $content; - } + // load js templates + add_action('wp_footer', array($this, 'quiz_create_js_templates')); + } - public function enqueue_styles() { + public function load_content($content) + { + ob_start(); + //Start the class + $Quiz_create = $this; + $quiz = $this->quiz; + $quiz_id = $quiz->get_quiz_id(); + $quiz_status = $quiz->get_quiz_status(); + $enp_quiz_nonce = parent::$nonce; + $user_action = $this->load_user_action(); + $enp_current_page = 'create'; + + include_once(ENP_QUIZ_CREATE_TEMPLATES_PATH . '/quiz-create.php'); + $content = ob_get_contents(); + if (ob_get_length()) ob_end_clean(); + + return $content; + } + public function enqueue_styles() + { } /** @@ -74,392 +77,418 @@ public function enqueue_styles() { * * @since 0.0.1 */ - public function enqueue_scripts() { - $plugin_name = $this->plugin_name; + public function enqueue_scripts() + { + $plugin_name = $this->plugin_name; - wp_register_script( $plugin_name.'-accordion', plugin_dir_url( __FILE__ ) . '../js/utilities/accordion.js', array( 'underscore' ), ENP_QUIZ_VERSION, true ); - wp_enqueue_script( $plugin_name.'-accordion' ); + wp_register_script($plugin_name . '-accordion', plugin_dir_url(__FILE__) . '../js/utilities/accordion.js', array('underscore'), ENP_QUIZ_VERSION, true); + wp_enqueue_script($plugin_name . '-accordion'); - /*wp_register_script( $plugin_name.'-sticky-header', plugin_dir_url( __FILE__ ) . '../js/utilities/sticky-header.js', array( 'jquery', 'underscore' ), ENP_QUIZ_VERSION, true ); + /*wp_register_script( $plugin_name.'-sticky-header', plugin_dir_url( __FILE__ ) . '../js/utilities/sticky-header.js', array( 'jquery', 'underscore' ), ENP_QUIZ_VERSION, true ); wp_enqueue_script( $plugin_name.'-sticky-header' );*/ - // quiz create script. - // Mama Mia that's alotta dependencies! - wp_register_script( - $plugin_name.'-quiz-create', - plugin_dir_url( __FILE__ ) . '../js/dist/quiz-create.js', - array( - 'jquery', - 'underscore', - 'jquery-ui-slider', - 'jquery-ui-sortable', - 'jquery-touch-punch', - //$plugin_name.'-sticky-header', - $plugin_name.'-accordion' - ), - ENP_QUIZ_VERSION, true - ); - wp_enqueue_script( $plugin_name.'-quiz-create' ); - - wp_localize_script( $plugin_name.'-quiz-create','quizCreate', array( - 'ajax_url' => admin_url( 'admin-ajax.php' ), - 'quiz_create_url' => ENP_QUIZ_CREATE_URL, - 'quiz_image_url' => ENP_QUIZ_IMAGE_URL, - )); - - - - } - - public function set_quiz_action_url($quiz_id) { - if(is_numeric($quiz_id) || is_int($quiz_id)) { - $quiz_action_url = ENP_QUIZ_CREATE_URL.$quiz_id.'/'; - } else { - $quiz_action_url = ENP_QUIZ_CREATE_URL.'new/'; - } - return $quiz_action_url; - } - - public function set_new_quiz_flag($quiz_id) { - if(empty($quiz_id)) { - $new_quiz_flag= '1'; - } else { - $new_quiz_flag= '0'; - } - - return $new_quiz_flag; - } - - public function get_quiz_action_url() { - return htmlentities($this->quiz_action_url); - } - - public function get_new_quiz_flag() { - return $this->new_quiz_flag; - } - /** - * Template HTML loaders - */ - - public function hidden_fields() { - - $quiz_id_input = ''; - $quiz_new_flag_input = ''; - - return $quiz_id_input."\n".$quiz_new_flag_input; - - - } - public function get_mc_option_add_button($question_id) { - $mc_option_add_button = ''; - if($this->is_quiz_fully_editable() === true) { - $mc_option_add_button = '
  • - -
  • '; - } - - return $mc_option_add_button; - } - - public function get_mc_option_delete_button($mc_option_id) { - $mc_option_delete_button = ''; - - if($this->is_quiz_fully_editable() === true) { - $mc_option_delete_button = ''; - } - - return $mc_option_delete_button; - } - - public function get_mc_option_correct_button($question_id, $mc_option_id) { - $mc_option_correct_button = ''; - - - $mc_option_correct_button = ''; - - return $mc_option_correct_button; - } - - public function get_question_delete_button($question_id) { - $delete_button = ''; - if($this->is_quiz_fully_editable() === true) { - $delete_button = ''; - } - return $delete_button; - } - - public function get_question_move_button($question_id, $position, $direction, $questions) { - $move_button = ''; - $new_position = ($direction === 'up' ? $position - 1 : $position + 1); - $disabled = false; - if($position === 0 && $direction === 'up') { - $disabled = true; - } - elseif($direction === 'down' && count($questions) === $new_position) { - $disabled = true; - } - - if($this->is_quiz_fully_editable() === true) { - $move_button = ''; - } - - return $move_button; - } - - public function get_question_image_template($question, $question_id, $question_i, $question_image) { - ob_start(); - if(!empty($question_image)) { - include(ENP_QUIZ_CREATE_TEMPLATES_PATH.'/partials/quiz-create-question-image.php'); - } elseif($question_id !== '{{question_id}}') { - include(ENP_QUIZ_CREATE_TEMPLATES_PATH.'/partials/quiz-create-question-image-upload.php'); - } - $image_template = ob_get_contents(); - // don't use ob_get_length first as this is a nested ob (output buffer) - // inside question template and messes up the JS template output - ob_end_clean(); - - return $image_template; - } - - public function get_quiz_create_question_image($question, $question_id) { - $question_image = ''; - if ($question_id !== '{{question_id}}') { - $question_image = ''.$question->get_question_image_alt().''; - } - return $question_image; - } - - public function get_question_type_input($question, $question_id, $question_i) { - $question_type_input = ''; - - if($this->is_quiz_fully_editable() === true) { - // get both inputs - $question_type_input = $this->get_question_type_mc_input($question, $question_id, $question_i)."\n".$this->get_question_type_slider_input($question, $question_id, $question_i); - } - // check if published - else { - // is the question an mc option? - if($question->get_question_type() === 'mc') { - // just output the mc option input - $question_type_input = $this->get_question_type_mc_input($question, $question_id, $question_i); - } else if($question->get_question_type() === 'slider') { - $question_type_input = $this->get_question_type_slider_input($question, $question_id, $question_i); - } - } - - return $question_type_input; - } - - public function get_question_type_mc_input($question, $question_id, $question_i) { - $mc_input = 'get_question_type(), 'mc', false ).'/> - '; - - return $mc_input; - } - - public function get_question_type_slider_input($question, $question_id, $question_i) { - $slider_input = 'get_question_type(), 'slider', false ).'/> - '; - - return $slider_input; - } - - public function get_slider_range_low_input($slider, $question_i) { - return ' - is_quiz_fully_editable() === false? ' readonly' : '').'/>'; - } - - public function get_slider_range_high_input($slider, $question_i) { - return ' - is_quiz_fully_editable() === false ? ' readonly' : '').'/>'; - } - - public function get_slider_correct_low_input($slider, $question_i) { - return ' - is_quiz_fully_editable() === false ? ' readonly' : '').'/>'; - } - - public function get_slider_correct_high_input($slider, $question_i) { - return ' - is_quiz_fully_editable()=== false ? ' readonly' : '').'/>'; - } - - public function get_slider_increment_input($slider, $question_i) { - return ' - is_quiz_fully_editable() === false ? ' readonly' : '').'/>'; - } - - public function get_add_question_button() { - $add_question_btn = ''; - if($this->is_quiz_fully_editable() === true) { - $add_question_btn = ''; - } - return $add_question_btn; - } - - public function get_next_step_button() { - return ''; - } - - public function is_before_publish() { - if($this->quiz->get_quiz_status() === 'draft' || $this->get_new_quiz_flag() === '1') { - $is_before_publish = true; - } else { - $is_before_publish = false; - } - - return $is_before_publish; - } - - /** - * Check if a quiz should be in the fully editable state or not - * @return (BOOLEAN) true if editable, false if not - */ - public function is_quiz_fully_editable() { - // see if it's an admin user - if(current_user_can('manage_options')) { - $fully_editable = true; - } else { - // check if we're in draft or publish state - $fully_editable = $this->is_before_publish(); - } - - return $fully_editable; - } - - - public function quiz_create_js_templates() { - $Quiz_create = $this; - $question_id = '{{question_id}}'; - $question_i = '{{question_position}}'; - $question = new Enp_quiz_Question($question_id); - - $js_templates = $this->question_js_template($Quiz_create, $question_id, $question_i); - $js_templates .= $this->question_image_js_template($Quiz_create, $question, $question_id, $question_i); - $js_templates .= $this->question_image_upload_js_template($question_id); - $js_templates .= $this->question_image_upload_button_js_template($Quiz_create, $question_id, $question_i); - $js_templates .= $this->mc_option_js_template($Quiz_create, $question_id, $question_i); - $js_templates .= $this->slider_js_templates($Quiz_create, $question_id, $question_i); - - echo $js_templates; - } - - public function question_js_template($Quiz_create, $question_id, $question_i) { - - // set-up our template - $js_template = ''; - - return $js_template; - } - - - public function question_image_upload_button_js_template($Quiz_create, $question_id, $question_i) { - $js_template = ''; - - return $js_template; - } - - public function question_image_js_template($Quiz_create, $question, $question_id, $question_i) { - $js_template = ''; - return $js_template; - } - - public function question_image_upload_js_template($question_id) { - $js_template = ''; - return $js_template; - } - - public function mc_option_js_template($Quiz_create, $question_id, $question_i) { - $mc_option_id = '{{mc_option_id}}'; - $mc_option_i = '{{mc_option_position}}'; - // set-up our template - $js_template = ''; - return $js_template; - } - - public function slider_js_templates($Quiz_create, $question_id, $question_i) { - $slider = new Enp_quiz_Slider(0); - // foreach key, set it as a js template var - foreach($slider as $key => $value) { - // we don't want to unset our question object - $slider->$key = '{{'.$key.'}}'; - } - // set-up our template - $slider_js_templates = ''; - - // set-up our template - $slider_js_templates .= ''; - - // set-up our template - $slider_js_templates .= ''; - - return $slider_js_templates; - } + // quiz create script. + // Mama Mia that's alotta dependencies! + wp_register_script( + $plugin_name . '-quiz-create', + plugin_dir_url(__FILE__) . '../js/dist/quiz-create.js', + array( + 'jquery', + 'underscore', + 'jquery-ui-slider', + 'jquery-ui-sortable', + 'jquery-touch-punch', + //$plugin_name.'-sticky-header', + $plugin_name . '-accordion' + ), + ENP_QUIZ_VERSION, + true + ); + wp_enqueue_script($plugin_name . '-quiz-create'); + + wp_localize_script($plugin_name . '-quiz-create', 'quizCreate', array( + 'ajax_url' => admin_url('admin-ajax.php'), + 'quiz_create_url' => ENP_QUIZ_CREATE_URL, + 'quiz_image_url' => ENP_QUIZ_IMAGE_URL, + )); + } + + public function set_quiz_action_url($quiz_id) + { + if (is_numeric($quiz_id) || is_int($quiz_id)) { + $quiz_action_url = ENP_QUIZ_CREATE_URL . $quiz_id . '/'; + } else { + $quiz_action_url = ENP_QUIZ_CREATE_URL . 'new/'; + } + return $quiz_action_url; + } + + public function set_new_quiz_flag($quiz_id) + { + if (empty($quiz_id)) { + $new_quiz_flag = '1'; + } else { + $new_quiz_flag = '0'; + } + + return $new_quiz_flag; + } + + public function get_quiz_action_url() + { + return htmlentities($this->quiz_action_url); + } + + public function get_new_quiz_flag() + { + return $this->new_quiz_flag; + } + /** + * Template HTML loaders + */ + + public function hidden_fields() + { + + $quiz_id_input = ''; + $quiz_new_flag_input = ''; + + return $quiz_id_input . "\n" . $quiz_new_flag_input; + } + public function get_mc_option_add_button($question_id) + { + $mc_option_add_button = ''; + if ($this->is_quiz_fully_editable() === true) { + $mc_option_add_button = '
  • + +
  • '; + } + + return $mc_option_add_button; + } + + public function get_mc_option_delete_button($mc_option_id) + { + $mc_option_delete_button = ''; + + if ($this->is_quiz_fully_editable() === true) { + $mc_option_delete_button = ''; + } + + return $mc_option_delete_button; + } + + public function get_mc_option_correct_button($question_id, $mc_option_id) + { + $mc_option_correct_button = ''; + + + $mc_option_correct_button = ''; + + return $mc_option_correct_button; + } + + public function get_question_delete_button($question_id) + { + $delete_button = ''; + if ($this->is_quiz_fully_editable() === true) { + $delete_button = ''; + } + return $delete_button; + } + + public function get_question_move_button($question_id, $position, $direction, $questions) + { + $move_button = ''; + $new_position = ($direction === 'up' ? $position - 1 : $position + 1); + $disabled = false; + if ($position === 0 && $direction === 'up') { + $disabled = true; + } elseif ($direction === 'down' && count($questions) === $new_position) { + $disabled = true; + } + + if ($this->is_quiz_fully_editable() === true) { + $move_button = ''; + } + + return $move_button; + } + + public function get_question_image_template($question, $question_id, $question_i, $question_image) + { + ob_start(); + if (!empty($question_image)) { + include(ENP_QUIZ_CREATE_TEMPLATES_PATH . '/partials/quiz-create-question-image.php'); + } elseif ($question_id !== '{{question_id}}') { + include(ENP_QUIZ_CREATE_TEMPLATES_PATH . '/partials/quiz-create-question-image-upload.php'); + } + $image_template = ob_get_contents(); + // don't use ob_get_length first as this is a nested ob (output buffer) + // inside question template and messes up the JS template output + ob_end_clean(); + + return $image_template; + } + + public function get_quiz_create_question_image($question, $question_id) + { + $question_image = ''; + if ($question_id !== '{{question_id}}') { + $question_image = '' . $question->get_question_image_alt() . ''; + } + return $question_image; + } + + public function get_question_type_input($question, $question_id, $question_i) + { + $question_type_input = ''; + + if ($this->is_quiz_fully_editable() === true) { + // get both inputs + $question_type_input = $this->get_question_type_mc_input($question, $question_id, $question_i) . "\n" . $this->get_question_type_slider_input($question, $question_id, $question_i); + } + // check if published + else { + // is the question an mc option? + if ($question->get_question_type() === 'mc') { + // just output the mc option input + $question_type_input = $this->get_question_type_mc_input($question, $question_id, $question_i); + } else if ($question->get_question_type() === 'slider') { + $question_type_input = $this->get_question_type_slider_input($question, $question_id, $question_i); + } + } + + return $question_type_input; + } + + public function get_question_type_mc_input($question, $question_id, $question_i) + { + $mc_input = 'get_question_type(), 'mc', false) . '/> + '; + + return $mc_input; + } + + public function get_question_type_slider_input($question, $question_id, $question_i) + { + $slider_input = 'get_question_type(), 'slider', false) . '/> + '; + + return $slider_input; + } + + public function get_slider_range_low_input($slider, $question_i) + { + return ' + is_quiz_fully_editable() === false ? ' readonly' : '') . '/>'; + } + + public function get_slider_range_high_input($slider, $question_i) + { + return ' + is_quiz_fully_editable() === false ? ' readonly' : '') . '/>'; + } + + public function get_slider_correct_low_input($slider, $question_i) + { + return ' + is_quiz_fully_editable() === false ? ' readonly' : '') . '/>'; + } + + public function get_slider_correct_high_input($slider, $question_i) + { + return ' + is_quiz_fully_editable() === false ? ' readonly' : '') . '/>'; + } + + public function get_slider_increment_input($slider, $question_i) + { + return ' + is_quiz_fully_editable() === false ? ' readonly' : '') . '/>'; + } + + public function get_add_question_button() + { + $add_question_btn = ''; + if ($this->is_quiz_fully_editable() === true) { + $add_question_btn = ''; + } + return $add_question_btn; + } + + public function get_next_step_button() + { + return ''; + } + + public function is_before_publish() + { + if ($this->quiz->get_quiz_status() === 'draft' || $this->get_new_quiz_flag() === '1') { + $is_before_publish = true; + } else { + $is_before_publish = false; + } + + return $is_before_publish; + } + + /** + * Check if a quiz should be in the fully editable state or not + * @return (BOOLEAN) true if editable, false if not + */ + public function is_quiz_fully_editable() + { + // see if it's an admin user + if (current_user_can('manage_options')) { + $fully_editable = true; + } else { + // check if we're in draft or publish state + $fully_editable = $this->is_before_publish(); + } + + return $fully_editable; + } + + + public function quiz_create_js_templates() + { + $Quiz_create = $this; + $question_id = '{{question_id}}'; + $question_i = '{{question_position}}'; + $question = new Enp_quiz_Question($question_id); + + $js_templates = $this->question_js_template($Quiz_create, $question_id, $question_i); + $js_templates .= $this->question_image_js_template($Quiz_create, $question, $question_id, $question_i); + $js_templates .= $this->question_image_upload_js_template($question_id); + $js_templates .= $this->question_image_upload_button_js_template($Quiz_create, $question_id, $question_i); + $js_templates .= $this->mc_option_js_template($Quiz_create, $question_id, $question_i); + $js_templates .= $this->slider_js_templates($Quiz_create, $question_id, $question_i); + + echo $js_templates; + } + + public function question_js_template($Quiz_create, $question_id, $question_i) + { + + // set-up our template + $js_template = ''; + + return $js_template; + } + + + public function question_image_upload_button_js_template($Quiz_create, $question_id, $question_i) + { + $js_template = ''; + + return $js_template; + } + + public function question_image_js_template($Quiz_create, $question, $question_id, $question_i) + { + $js_template = ''; + return $js_template; + } + public function question_image_upload_js_template($question_id) + { + $js_template = ''; + return $js_template; + } + + public function mc_option_js_template($Quiz_create, $question_id, $question_i) + { + $mc_option_id = '{{mc_option_id}}'; + $mc_option_i = '{{mc_option_position}}'; + // set-up our template + $js_template = ''; + return $js_template; + } + + public function slider_js_templates($Quiz_create, $question_id, $question_i) + { + $slider = new Enp_quiz_Slider(0); + // foreach key, set it as a js template var + foreach ($slider as $key => $value) { + // we don't want to unset our question object + $slider->$key = '{{' . $key . '}}'; + } + // set-up our template + $slider_js_templates = ''; + + // set-up our template + $slider_js_templates .= ''; + + // set-up our template + $slider_js_templates .= ''; + + return $slider_js_templates; + } } diff --git a/public/quiz-create/templates/partials/dashboard-quiz-item.php b/public/quiz-create/templates/partials/dashboard-quiz-item.php index 5c599c68..f0da4913 100644 --- a/public/quiz-create/templates/partials/dashboard-quiz-item.php +++ b/public/quiz-create/templates/partials/dashboard-quiz-item.php @@ -3,7 +3,7 @@
  • get_quiz_dashboard_item_title($quiz);?>

    -
    - - + \ No newline at end of file diff --git a/public/quiz-create/templates/quiz-create.php b/public/quiz-create/templates/quiz-create.php index 03db7b09..0308eca9 100644 --- a/public/quiz-create/templates/quiz-create.php +++ b/public/quiz-create/templates/quiz-create.php @@ -1,10 +1,11 @@
    -
    - +
    + - + - - outputKey(); - echo $Quiz_create->hidden_fields();?> + + outputKey(); + echo $Quiz_create->hidden_fields(); ?> -
    - - -
    +
    + + + -
    - get_questions(); - if(!empty($question_ids)){ - foreach($question_ids as $question_id) { - include(ENP_QUIZ_CREATE_TEMPLATES_PATH.'/partials/quiz-create-question.php'); - $question_i++; - } - } - ?> -
    +
    - get_add_question_button();?> +
    + get_questions(); + if (!empty($question_ids)) { + foreach ($question_ids as $question_id) { + include ENP_QUIZ_CREATE_TEMPLATES_PATH . '/partials/quiz-create-question.php'; + $question_i++; + } + } + ?> +
    -
    + get_add_question_button(); ?> - +
    - get_next_step_button();?> + -
    + get_next_step_button(); ?> - -
    -
    \ No newline at end of file + + + + + +realpath = realpath($opened_path) ?: $opened_path; + $opened_path = $this->realpath; + $this->handle = fopen($this->realpath, $mode); + $this->position = 0; + + return (bool) $this->handle; + } + + public function stream_read($count) + { + $data = fread($this->handle, $count); + + if ($this->position === 0) { + $data = preg_replace('{^#!.*\r?\n}', '', $data); + } + + $this->position += strlen($data); + + return $data; + } + + public function stream_cast($castAs) + { + return $this->handle; + } + + public function stream_close() + { + fclose($this->handle); + } + + public function stream_lock($operation) + { + return $operation ? flock($this->handle, $operation) : true; + } + + public function stream_seek($offset, $whence) + { + if (0 === fseek($this->handle, $offset, $whence)) { + $this->position = ftell($this->handle); + return true; + } + + return false; + } + + public function stream_tell() + { + return $this->position; + } + + public function stream_eof() + { + return feof($this->handle); + } + + public function stream_stat() + { + return array(); + } + + public function stream_set_option($option, $arg1, $arg2) + { + return true; + } + + public function url_stat($path, $flags) + { + $path = substr($path, 17); + if (file_exists($path)) { + return stat($path); + } + + return false; + } + } + } + + if (function_exists('stream_wrapper_register') && stream_wrapper_register('phpvfscomposer', 'Composer\BinProxyWrapper')) { + include("phpvfscomposer://" . __DIR__ . '/..'.'/squizlabs/php_codesniffer/bin/phpcbf'); + exit(0); + } +} + +include __DIR__ . '/..'.'/squizlabs/php_codesniffer/bin/phpcbf'; diff --git a/vendor/bin/phpcs b/vendor/bin/phpcs new file mode 100755 index 00000000..5123b7d6 --- /dev/null +++ b/vendor/bin/phpcs @@ -0,0 +1,117 @@ +#!/usr/bin/env php +realpath = realpath($opened_path) ?: $opened_path; + $opened_path = $this->realpath; + $this->handle = fopen($this->realpath, $mode); + $this->position = 0; + + return (bool) $this->handle; + } + + public function stream_read($count) + { + $data = fread($this->handle, $count); + + if ($this->position === 0) { + $data = preg_replace('{^#!.*\r?\n}', '', $data); + } + + $this->position += strlen($data); + + return $data; + } + + public function stream_cast($castAs) + { + return $this->handle; + } + + public function stream_close() + { + fclose($this->handle); + } + + public function stream_lock($operation) + { + return $operation ? flock($this->handle, $operation) : true; + } + + public function stream_seek($offset, $whence) + { + if (0 === fseek($this->handle, $offset, $whence)) { + $this->position = ftell($this->handle); + return true; + } + + return false; + } + + public function stream_tell() + { + return $this->position; + } + + public function stream_eof() + { + return feof($this->handle); + } + + public function stream_stat() + { + return array(); + } + + public function stream_set_option($option, $arg1, $arg2) + { + return true; + } + + public function url_stat($path, $flags) + { + $path = substr($path, 17); + if (file_exists($path)) { + return stat($path); + } + + return false; + } + } + } + + if (function_exists('stream_wrapper_register') && stream_wrapper_register('phpvfscomposer', 'Composer\BinProxyWrapper')) { + include("phpvfscomposer://" . __DIR__ . '/..'.'/squizlabs/php_codesniffer/bin/phpcs'); + exit(0); + } +} + +include __DIR__ . '/..'.'/squizlabs/php_codesniffer/bin/phpcs'; diff --git a/vendor/composer/ClassLoader.php b/vendor/composer/ClassLoader.php new file mode 100644 index 00000000..afef3fa2 --- /dev/null +++ b/vendor/composer/ClassLoader.php @@ -0,0 +1,572 @@ + + * Jordi Boggiano + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Composer\Autoload; + +/** + * ClassLoader implements a PSR-0, PSR-4 and classmap class loader. + * + * $loader = new \Composer\Autoload\ClassLoader(); + * + * // register classes with namespaces + * $loader->add('Symfony\Component', __DIR__.'/component'); + * $loader->add('Symfony', __DIR__.'/framework'); + * + * // activate the autoloader + * $loader->register(); + * + * // to enable searching the include path (eg. for PEAR packages) + * $loader->setUseIncludePath(true); + * + * In this example, if you try to use a class in the Symfony\Component + * namespace or one of its children (Symfony\Component\Console for instance), + * the autoloader will first look for the class under the component/ + * directory, and it will then fallback to the framework/ directory if not + * found before giving up. + * + * This class is loosely based on the Symfony UniversalClassLoader. + * + * @author Fabien Potencier + * @author Jordi Boggiano + * @see https://www.php-fig.org/psr/psr-0/ + * @see https://www.php-fig.org/psr/psr-4/ + */ +class ClassLoader +{ + /** @var ?string */ + private $vendorDir; + + // PSR-4 + /** + * @var array[] + * @psalm-var array> + */ + private $prefixLengthsPsr4 = array(); + /** + * @var array[] + * @psalm-var array> + */ + private $prefixDirsPsr4 = array(); + /** + * @var array[] + * @psalm-var array + */ + private $fallbackDirsPsr4 = array(); + + // PSR-0 + /** + * @var array[] + * @psalm-var array> + */ + private $prefixesPsr0 = array(); + /** + * @var array[] + * @psalm-var array + */ + private $fallbackDirsPsr0 = array(); + + /** @var bool */ + private $useIncludePath = false; + + /** + * @var string[] + * @psalm-var array + */ + private $classMap = array(); + + /** @var bool */ + private $classMapAuthoritative = false; + + /** + * @var bool[] + * @psalm-var array + */ + private $missingClasses = array(); + + /** @var ?string */ + private $apcuPrefix; + + /** + * @var self[] + */ + private static $registeredLoaders = array(); + + /** + * @param ?string $vendorDir + */ + public function __construct($vendorDir = null) + { + $this->vendorDir = $vendorDir; + } + + /** + * @return string[] + */ + public function getPrefixes() + { + if (!empty($this->prefixesPsr0)) { + return call_user_func_array('array_merge', array_values($this->prefixesPsr0)); + } + + return array(); + } + + /** + * @return array[] + * @psalm-return array> + */ + public function getPrefixesPsr4() + { + return $this->prefixDirsPsr4; + } + + /** + * @return array[] + * @psalm-return array + */ + public function getFallbackDirs() + { + return $this->fallbackDirsPsr0; + } + + /** + * @return array[] + * @psalm-return array + */ + public function getFallbackDirsPsr4() + { + return $this->fallbackDirsPsr4; + } + + /** + * @return string[] Array of classname => path + * @psalm-return array + */ + public function getClassMap() + { + return $this->classMap; + } + + /** + * @param string[] $classMap Class to filename map + * @psalm-param array $classMap + * + * @return void + */ + public function addClassMap(array $classMap) + { + if ($this->classMap) { + $this->classMap = array_merge($this->classMap, $classMap); + } else { + $this->classMap = $classMap; + } + } + + /** + * Registers a set of PSR-0 directories for a given prefix, either + * appending or prepending to the ones previously set for this prefix. + * + * @param string $prefix The prefix + * @param string[]|string $paths The PSR-0 root directories + * @param bool $prepend Whether to prepend the directories + * + * @return void + */ + public function add($prefix, $paths, $prepend = false) + { + if (!$prefix) { + if ($prepend) { + $this->fallbackDirsPsr0 = array_merge( + (array) $paths, + $this->fallbackDirsPsr0 + ); + } else { + $this->fallbackDirsPsr0 = array_merge( + $this->fallbackDirsPsr0, + (array) $paths + ); + } + + return; + } + + $first = $prefix[0]; + if (!isset($this->prefixesPsr0[$first][$prefix])) { + $this->prefixesPsr0[$first][$prefix] = (array) $paths; + + return; + } + if ($prepend) { + $this->prefixesPsr0[$first][$prefix] = array_merge( + (array) $paths, + $this->prefixesPsr0[$first][$prefix] + ); + } else { + $this->prefixesPsr0[$first][$prefix] = array_merge( + $this->prefixesPsr0[$first][$prefix], + (array) $paths + ); + } + } + + /** + * Registers a set of PSR-4 directories for a given namespace, either + * appending or prepending to the ones previously set for this namespace. + * + * @param string $prefix The prefix/namespace, with trailing '\\' + * @param string[]|string $paths The PSR-4 base directories + * @param bool $prepend Whether to prepend the directories + * + * @throws \InvalidArgumentException + * + * @return void + */ + public function addPsr4($prefix, $paths, $prepend = false) + { + if (!$prefix) { + // Register directories for the root namespace. + if ($prepend) { + $this->fallbackDirsPsr4 = array_merge( + (array) $paths, + $this->fallbackDirsPsr4 + ); + } else { + $this->fallbackDirsPsr4 = array_merge( + $this->fallbackDirsPsr4, + (array) $paths + ); + } + } elseif (!isset($this->prefixDirsPsr4[$prefix])) { + // Register directories for a new namespace. + $length = strlen($prefix); + if ('\\' !== $prefix[$length - 1]) { + throw new \InvalidArgumentException("A non-empty PSR-4 prefix must end with a namespace separator."); + } + $this->prefixLengthsPsr4[$prefix[0]][$prefix] = $length; + $this->prefixDirsPsr4[$prefix] = (array) $paths; + } elseif ($prepend) { + // Prepend directories for an already registered namespace. + $this->prefixDirsPsr4[$prefix] = array_merge( + (array) $paths, + $this->prefixDirsPsr4[$prefix] + ); + } else { + // Append directories for an already registered namespace. + $this->prefixDirsPsr4[$prefix] = array_merge( + $this->prefixDirsPsr4[$prefix], + (array) $paths + ); + } + } + + /** + * Registers a set of PSR-0 directories for a given prefix, + * replacing any others previously set for this prefix. + * + * @param string $prefix The prefix + * @param string[]|string $paths The PSR-0 base directories + * + * @return void + */ + public function set($prefix, $paths) + { + if (!$prefix) { + $this->fallbackDirsPsr0 = (array) $paths; + } else { + $this->prefixesPsr0[$prefix[0]][$prefix] = (array) $paths; + } + } + + /** + * Registers a set of PSR-4 directories for a given namespace, + * replacing any others previously set for this namespace. + * + * @param string $prefix The prefix/namespace, with trailing '\\' + * @param string[]|string $paths The PSR-4 base directories + * + * @throws \InvalidArgumentException + * + * @return void + */ + public function setPsr4($prefix, $paths) + { + if (!$prefix) { + $this->fallbackDirsPsr4 = (array) $paths; + } else { + $length = strlen($prefix); + if ('\\' !== $prefix[$length - 1]) { + throw new \InvalidArgumentException("A non-empty PSR-4 prefix must end with a namespace separator."); + } + $this->prefixLengthsPsr4[$prefix[0]][$prefix] = $length; + $this->prefixDirsPsr4[$prefix] = (array) $paths; + } + } + + /** + * Turns on searching the include path for class files. + * + * @param bool $useIncludePath + * + * @return void + */ + public function setUseIncludePath($useIncludePath) + { + $this->useIncludePath = $useIncludePath; + } + + /** + * Can be used to check if the autoloader uses the include path to check + * for classes. + * + * @return bool + */ + public function getUseIncludePath() + { + return $this->useIncludePath; + } + + /** + * Turns off searching the prefix and fallback directories for classes + * that have not been registered with the class map. + * + * @param bool $classMapAuthoritative + * + * @return void + */ + public function setClassMapAuthoritative($classMapAuthoritative) + { + $this->classMapAuthoritative = $classMapAuthoritative; + } + + /** + * Should class lookup fail if not found in the current class map? + * + * @return bool + */ + public function isClassMapAuthoritative() + { + return $this->classMapAuthoritative; + } + + /** + * APCu prefix to use to cache found/not-found classes, if the extension is enabled. + * + * @param string|null $apcuPrefix + * + * @return void + */ + public function setApcuPrefix($apcuPrefix) + { + $this->apcuPrefix = function_exists('apcu_fetch') && filter_var(ini_get('apc.enabled'), FILTER_VALIDATE_BOOLEAN) ? $apcuPrefix : null; + } + + /** + * The APCu prefix in use, or null if APCu caching is not enabled. + * + * @return string|null + */ + public function getApcuPrefix() + { + return $this->apcuPrefix; + } + + /** + * Registers this instance as an autoloader. + * + * @param bool $prepend Whether to prepend the autoloader or not + * + * @return void + */ + public function register($prepend = false) + { + spl_autoload_register(array($this, 'loadClass'), true, $prepend); + + if (null === $this->vendorDir) { + return; + } + + if ($prepend) { + self::$registeredLoaders = array($this->vendorDir => $this) + self::$registeredLoaders; + } else { + unset(self::$registeredLoaders[$this->vendorDir]); + self::$registeredLoaders[$this->vendorDir] = $this; + } + } + + /** + * Unregisters this instance as an autoloader. + * + * @return void + */ + public function unregister() + { + spl_autoload_unregister(array($this, 'loadClass')); + + if (null !== $this->vendorDir) { + unset(self::$registeredLoaders[$this->vendorDir]); + } + } + + /** + * Loads the given class or interface. + * + * @param string $class The name of the class + * @return true|null True if loaded, null otherwise + */ + public function loadClass($class) + { + if ($file = $this->findFile($class)) { + includeFile($file); + + return true; + } + + return null; + } + + /** + * Finds the path to the file where the class is defined. + * + * @param string $class The name of the class + * + * @return string|false The path if found, false otherwise + */ + public function findFile($class) + { + // class map lookup + if (isset($this->classMap[$class])) { + return $this->classMap[$class]; + } + if ($this->classMapAuthoritative || isset($this->missingClasses[$class])) { + return false; + } + if (null !== $this->apcuPrefix) { + $file = apcu_fetch($this->apcuPrefix.$class, $hit); + if ($hit) { + return $file; + } + } + + $file = $this->findFileWithExtension($class, '.php'); + + // Search for Hack files if we are running on HHVM + if (false === $file && defined('HHVM_VERSION')) { + $file = $this->findFileWithExtension($class, '.hh'); + } + + if (null !== $this->apcuPrefix) { + apcu_add($this->apcuPrefix.$class, $file); + } + + if (false === $file) { + // Remember that this class does not exist. + $this->missingClasses[$class] = true; + } + + return $file; + } + + /** + * Returns the currently registered loaders indexed by their corresponding vendor directories. + * + * @return self[] + */ + public static function getRegisteredLoaders() + { + return self::$registeredLoaders; + } + + /** + * @param string $class + * @param string $ext + * @return string|false + */ + private function findFileWithExtension($class, $ext) + { + // PSR-4 lookup + $logicalPathPsr4 = strtr($class, '\\', DIRECTORY_SEPARATOR) . $ext; + + $first = $class[0]; + if (isset($this->prefixLengthsPsr4[$first])) { + $subPath = $class; + while (false !== $lastPos = strrpos($subPath, '\\')) { + $subPath = substr($subPath, 0, $lastPos); + $search = $subPath . '\\'; + if (isset($this->prefixDirsPsr4[$search])) { + $pathEnd = DIRECTORY_SEPARATOR . substr($logicalPathPsr4, $lastPos + 1); + foreach ($this->prefixDirsPsr4[$search] as $dir) { + if (file_exists($file = $dir . $pathEnd)) { + return $file; + } + } + } + } + } + + // PSR-4 fallback dirs + foreach ($this->fallbackDirsPsr4 as $dir) { + if (file_exists($file = $dir . DIRECTORY_SEPARATOR . $logicalPathPsr4)) { + return $file; + } + } + + // PSR-0 lookup + if (false !== $pos = strrpos($class, '\\')) { + // namespaced class name + $logicalPathPsr0 = substr($logicalPathPsr4, 0, $pos + 1) + . strtr(substr($logicalPathPsr4, $pos + 1), '_', DIRECTORY_SEPARATOR); + } else { + // PEAR-like class name + $logicalPathPsr0 = strtr($class, '_', DIRECTORY_SEPARATOR) . $ext; + } + + if (isset($this->prefixesPsr0[$first])) { + foreach ($this->prefixesPsr0[$first] as $prefix => $dirs) { + if (0 === strpos($class, $prefix)) { + foreach ($dirs as $dir) { + if (file_exists($file = $dir . DIRECTORY_SEPARATOR . $logicalPathPsr0)) { + return $file; + } + } + } + } + } + + // PSR-0 fallback dirs + foreach ($this->fallbackDirsPsr0 as $dir) { + if (file_exists($file = $dir . DIRECTORY_SEPARATOR . $logicalPathPsr0)) { + return $file; + } + } + + // PSR-0 include paths. + if ($this->useIncludePath && $file = stream_resolve_include_path($logicalPathPsr0)) { + return $file; + } + + return false; + } +} + +/** + * Scope isolated include. + * + * Prevents access to $this/self from included files. + * + * @param string $file + * @return void + * @private + */ +function includeFile($file) +{ + include $file; +} diff --git a/vendor/composer/InstalledVersions.php b/vendor/composer/InstalledVersions.php new file mode 100644 index 00000000..d50e0c9f --- /dev/null +++ b/vendor/composer/InstalledVersions.php @@ -0,0 +1,350 @@ + + * Jordi Boggiano + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Composer; + +use Composer\Autoload\ClassLoader; +use Composer\Semver\VersionParser; + +/** + * This class is copied in every Composer installed project and available to all + * + * See also https://getcomposer.org/doc/07-runtime.md#installed-versions + * + * To require its presence, you can require `composer-runtime-api ^2.0` + */ +class InstalledVersions +{ + /** + * @var mixed[]|null + * @psalm-var array{root: array{name: string, version: string, reference: string, pretty_version: string, aliases: string[], dev: bool, install_path: string, type: string}, versions: array}|array{}|null + */ + private static $installed; + + /** + * @var bool|null + */ + private static $canGetVendors; + + /** + * @var array[] + * @psalm-var array}> + */ + private static $installedByVendor = array(); + + /** + * Returns a list of all package names which are present, either by being installed, replaced or provided + * + * @return string[] + * @psalm-return list + */ + public static function getInstalledPackages() + { + $packages = array(); + foreach (self::getInstalled() as $installed) { + $packages[] = array_keys($installed['versions']); + } + + if (1 === \count($packages)) { + return $packages[0]; + } + + return array_keys(array_flip(\call_user_func_array('array_merge', $packages))); + } + + /** + * Returns a list of all package names with a specific type e.g. 'library' + * + * @param string $type + * @return string[] + * @psalm-return list + */ + public static function getInstalledPackagesByType($type) + { + $packagesByType = array(); + + foreach (self::getInstalled() as $installed) { + foreach ($installed['versions'] as $name => $package) { + if (isset($package['type']) && $package['type'] === $type) { + $packagesByType[] = $name; + } + } + } + + return $packagesByType; + } + + /** + * Checks whether the given package is installed + * + * This also returns true if the package name is provided or replaced by another package + * + * @param string $packageName + * @param bool $includeDevRequirements + * @return bool + */ + public static function isInstalled($packageName, $includeDevRequirements = true) + { + foreach (self::getInstalled() as $installed) { + if (isset($installed['versions'][$packageName])) { + return $includeDevRequirements || empty($installed['versions'][$packageName]['dev_requirement']); + } + } + + return false; + } + + /** + * Checks whether the given package satisfies a version constraint + * + * e.g. If you want to know whether version 2.3+ of package foo/bar is installed, you would call: + * + * Composer\InstalledVersions::satisfies(new VersionParser, 'foo/bar', '^2.3') + * + * @param VersionParser $parser Install composer/semver to have access to this class and functionality + * @param string $packageName + * @param string|null $constraint A version constraint to check for, if you pass one you have to make sure composer/semver is required by your package + * @return bool + */ + public static function satisfies(VersionParser $parser, $packageName, $constraint) + { + $constraint = $parser->parseConstraints($constraint); + $provided = $parser->parseConstraints(self::getVersionRanges($packageName)); + + return $provided->matches($constraint); + } + + /** + * Returns a version constraint representing all the range(s) which are installed for a given package + * + * It is easier to use this via isInstalled() with the $constraint argument if you need to check + * whether a given version of a package is installed, and not just whether it exists + * + * @param string $packageName + * @return string Version constraint usable with composer/semver + */ + public static function getVersionRanges($packageName) + { + foreach (self::getInstalled() as $installed) { + if (!isset($installed['versions'][$packageName])) { + continue; + } + + $ranges = array(); + if (isset($installed['versions'][$packageName]['pretty_version'])) { + $ranges[] = $installed['versions'][$packageName]['pretty_version']; + } + if (array_key_exists('aliases', $installed['versions'][$packageName])) { + $ranges = array_merge($ranges, $installed['versions'][$packageName]['aliases']); + } + if (array_key_exists('replaced', $installed['versions'][$packageName])) { + $ranges = array_merge($ranges, $installed['versions'][$packageName]['replaced']); + } + if (array_key_exists('provided', $installed['versions'][$packageName])) { + $ranges = array_merge($ranges, $installed['versions'][$packageName]['provided']); + } + + return implode(' || ', $ranges); + } + + throw new \OutOfBoundsException('Package "' . $packageName . '" is not installed'); + } + + /** + * @param string $packageName + * @return string|null If the package is being replaced or provided but is not really installed, null will be returned as version, use satisfies or getVersionRanges if you need to know if a given version is present + */ + public static function getVersion($packageName) + { + foreach (self::getInstalled() as $installed) { + if (!isset($installed['versions'][$packageName])) { + continue; + } + + if (!isset($installed['versions'][$packageName]['version'])) { + return null; + } + + return $installed['versions'][$packageName]['version']; + } + + throw new \OutOfBoundsException('Package "' . $packageName . '" is not installed'); + } + + /** + * @param string $packageName + * @return string|null If the package is being replaced or provided but is not really installed, null will be returned as version, use satisfies or getVersionRanges if you need to know if a given version is present + */ + public static function getPrettyVersion($packageName) + { + foreach (self::getInstalled() as $installed) { + if (!isset($installed['versions'][$packageName])) { + continue; + } + + if (!isset($installed['versions'][$packageName]['pretty_version'])) { + return null; + } + + return $installed['versions'][$packageName]['pretty_version']; + } + + throw new \OutOfBoundsException('Package "' . $packageName . '" is not installed'); + } + + /** + * @param string $packageName + * @return string|null If the package is being replaced or provided but is not really installed, null will be returned as reference + */ + public static function getReference($packageName) + { + foreach (self::getInstalled() as $installed) { + if (!isset($installed['versions'][$packageName])) { + continue; + } + + if (!isset($installed['versions'][$packageName]['reference'])) { + return null; + } + + return $installed['versions'][$packageName]['reference']; + } + + throw new \OutOfBoundsException('Package "' . $packageName . '" is not installed'); + } + + /** + * @param string $packageName + * @return string|null If the package is being replaced or provided but is not really installed, null will be returned as install path. Packages of type metapackages also have a null install path. + */ + public static function getInstallPath($packageName) + { + foreach (self::getInstalled() as $installed) { + if (!isset($installed['versions'][$packageName])) { + continue; + } + + return isset($installed['versions'][$packageName]['install_path']) ? $installed['versions'][$packageName]['install_path'] : null; + } + + throw new \OutOfBoundsException('Package "' . $packageName . '" is not installed'); + } + + /** + * @return array + * @psalm-return array{name: string, version: string, reference: string, pretty_version: string, aliases: string[], dev: bool, install_path: string, type: string} + */ + public static function getRootPackage() + { + $installed = self::getInstalled(); + + return $installed[0]['root']; + } + + /** + * Returns the raw installed.php data for custom implementations + * + * @deprecated Use getAllRawData() instead which returns all datasets for all autoloaders present in the process. getRawData only returns the first dataset loaded, which may not be what you expect. + * @return array[] + * @psalm-return array{root: array{name: string, version: string, reference: string, pretty_version: string, aliases: string[], dev: bool, install_path: string, type: string}, versions: array} + */ + public static function getRawData() + { + @trigger_error('getRawData only returns the first dataset loaded, which may not be what you expect. Use getAllRawData() instead which returns all datasets for all autoloaders present in the process.', E_USER_DEPRECATED); + + if (null === self::$installed) { + // only require the installed.php file if this file is loaded from its dumped location, + // and not from its source location in the composer/composer package, see https://github.com/composer/composer/issues/9937 + if (substr(__DIR__, -8, 1) !== 'C') { + self::$installed = include __DIR__ . '/installed.php'; + } else { + self::$installed = array(); + } + } + + return self::$installed; + } + + /** + * Returns the raw data of all installed.php which are currently loaded for custom implementations + * + * @return array[] + * @psalm-return list}> + */ + public static function getAllRawData() + { + return self::getInstalled(); + } + + /** + * Lets you reload the static array from another file + * + * This is only useful for complex integrations in which a project needs to use + * this class but then also needs to execute another project's autoloader in process, + * and wants to ensure both projects have access to their version of installed.php. + * + * A typical case would be PHPUnit, where it would need to make sure it reads all + * the data it needs from this class, then call reload() with + * `require $CWD/vendor/composer/installed.php` (or similar) as input to make sure + * the project in which it runs can then also use this class safely, without + * interference between PHPUnit's dependencies and the project's dependencies. + * + * @param array[] $data A vendor/composer/installed.php data set + * @return void + * + * @psalm-param array{root: array{name: string, version: string, reference: string, pretty_version: string, aliases: string[], dev: bool, install_path: string, type: string}, versions: array} $data + */ + public static function reload($data) + { + self::$installed = $data; + self::$installedByVendor = array(); + } + + /** + * @return array[] + * @psalm-return list}> + */ + private static function getInstalled() + { + if (null === self::$canGetVendors) { + self::$canGetVendors = method_exists('Composer\Autoload\ClassLoader', 'getRegisteredLoaders'); + } + + $installed = array(); + + if (self::$canGetVendors) { + foreach (ClassLoader::getRegisteredLoaders() as $vendorDir => $loader) { + if (isset(self::$installedByVendor[$vendorDir])) { + $installed[] = self::$installedByVendor[$vendorDir]; + } elseif (is_file($vendorDir.'/composer/installed.php')) { + $installed[] = self::$installedByVendor[$vendorDir] = require $vendorDir.'/composer/installed.php'; + if (null === self::$installed && strtr($vendorDir.'/composer', '\\', '/') === strtr(__DIR__, '\\', '/')) { + self::$installed = $installed[count($installed) - 1]; + } + } + } + } + + if (null === self::$installed) { + // only require the installed.php file if this file is loaded from its dumped location, + // and not from its source location in the composer/composer package, see https://github.com/composer/composer/issues/9937 + if (substr(__DIR__, -8, 1) !== 'C') { + self::$installed = require __DIR__ . '/installed.php'; + } else { + self::$installed = array(); + } + } + $installed[] = self::$installed; + + return $installed; + } +} diff --git a/vendor/composer/LICENSE b/vendor/composer/LICENSE new file mode 100644 index 00000000..f27399a0 --- /dev/null +++ b/vendor/composer/LICENSE @@ -0,0 +1,21 @@ + +Copyright (c) Nils Adermann, Jordi Boggiano + +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/vendor/composer/autoload_classmap.php b/vendor/composer/autoload_classmap.php new file mode 100644 index 00000000..b26f1b13 --- /dev/null +++ b/vendor/composer/autoload_classmap.php @@ -0,0 +1,10 @@ + $vendorDir . '/composer/InstalledVersions.php', +); diff --git a/vendor/composer/autoload_namespaces.php b/vendor/composer/autoload_namespaces.php new file mode 100644 index 00000000..b7fc0125 --- /dev/null +++ b/vendor/composer/autoload_namespaces.php @@ -0,0 +1,9 @@ += 50600 && !defined('HHVM_VERSION') && (!function_exists('zend_loader_file_encoded') || !zend_loader_file_encoded()); + if ($useStaticLoader) { + require __DIR__ . '/autoload_static.php'; + + call_user_func(\Composer\Autoload\ComposerStaticInit2afb397c23b894cf8072090b2d60ba6c::getInitializer($loader)); + } else { + $map = require __DIR__ . '/autoload_namespaces.php'; + foreach ($map as $namespace => $path) { + $loader->set($namespace, $path); + } + + $map = require __DIR__ . '/autoload_psr4.php'; + foreach ($map as $namespace => $path) { + $loader->setPsr4($namespace, $path); + } + + $classMap = require __DIR__ . '/autoload_classmap.php'; + if ($classMap) { + $loader->addClassMap($classMap); + } + } + + $loader->register(true); + + return $loader; + } +} diff --git a/vendor/composer/autoload_static.php b/vendor/composer/autoload_static.php new file mode 100644 index 00000000..90823317 --- /dev/null +++ b/vendor/composer/autoload_static.php @@ -0,0 +1,20 @@ + __DIR__ . '/..' . '/composer/InstalledVersions.php', + ); + + public static function getInitializer(ClassLoader $loader) + { + return \Closure::bind(function () use ($loader) { + $loader->classMap = ComposerStaticInit2afb397c23b894cf8072090b2d60ba6c::$classMap; + + }, null, ClassLoader::class); + } +} diff --git a/vendor/composer/installed.json b/vendor/composer/installed.json new file mode 100644 index 00000000..233e6aa8 --- /dev/null +++ b/vendor/composer/installed.json @@ -0,0 +1,67 @@ +{ + "packages": [ + { + "name": "squizlabs/php_codesniffer", + "version": "3.6.2", + "version_normalized": "3.6.2.0", + "source": { + "type": "git", + "url": "https://github.com/squizlabs/PHP_CodeSniffer.git", + "reference": "5e4e71592f69da17871dba6e80dd51bce74a351a" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/squizlabs/PHP_CodeSniffer/zipball/5e4e71592f69da17871dba6e80dd51bce74a351a", + "reference": "5e4e71592f69da17871dba6e80dd51bce74a351a", + "shasum": "" + }, + "require": { + "ext-simplexml": "*", + "ext-tokenizer": "*", + "ext-xmlwriter": "*", + "php": ">=5.4.0" + }, + "require-dev": { + "phpunit/phpunit": "^4.0 || ^5.0 || ^6.0 || ^7.0" + }, + "time": "2021-12-12T21:44:58+00:00", + "bin": [ + "bin/phpcs", + "bin/phpcbf" + ], + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "3.x-dev" + } + }, + "installation-source": "dist", + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Greg Sherwood", + "role": "lead" + } + ], + "description": "PHP_CodeSniffer tokenizes PHP, JavaScript and CSS files and detects violations of a defined set of coding standards.", + "homepage": "https://github.com/squizlabs/PHP_CodeSniffer", + "keywords": [ + "phpcs", + "standards" + ], + "support": { + "issues": "https://github.com/squizlabs/PHP_CodeSniffer/issues", + "source": "https://github.com/squizlabs/PHP_CodeSniffer", + "wiki": "https://github.com/squizlabs/PHP_CodeSniffer/wiki" + }, + "install-path": "../squizlabs/php_codesniffer" + } + ], + "dev": true, + "dev-package-names": [ + "squizlabs/php_codesniffer" + ] +} diff --git a/vendor/composer/installed.php b/vendor/composer/installed.php new file mode 100644 index 00000000..97d488e4 --- /dev/null +++ b/vendor/composer/installed.php @@ -0,0 +1,32 @@ + array( + 'pretty_version' => 'dev-master', + 'version' => 'dev-master', + 'type' => 'library', + 'install_path' => __DIR__ . '/../../', + 'aliases' => array(), + 'reference' => '880c3376674ee9f0405cee18123ad22735ee7fde', + 'name' => '__root__', + 'dev' => true, + ), + 'versions' => array( + '__root__' => array( + 'pretty_version' => 'dev-master', + 'version' => 'dev-master', + 'type' => 'library', + 'install_path' => __DIR__ . '/../../', + 'aliases' => array(), + 'reference' => '880c3376674ee9f0405cee18123ad22735ee7fde', + 'dev_requirement' => false, + ), + 'squizlabs/php_codesniffer' => array( + 'pretty_version' => '3.6.2', + 'version' => '3.6.2.0', + 'type' => 'library', + 'install_path' => __DIR__ . '/../squizlabs/php_codesniffer', + 'aliases' => array(), + 'reference' => '5e4e71592f69da17871dba6e80dd51bce74a351a', + 'dev_requirement' => true, + ), + ), +); diff --git a/vendor/squizlabs/php_codesniffer/CONTRIBUTING.md b/vendor/squizlabs/php_codesniffer/CONTRIBUTING.md new file mode 100644 index 00000000..5cc73635 --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/CONTRIBUTING.md @@ -0,0 +1,13 @@ +Contributing +------------- + +Before you contribute code to PHP\_CodeSniffer, please make sure it conforms to the PHPCS coding standard and that the PHP\_CodeSniffer unit tests still pass. The easiest way to contribute is to work on a checkout of the repository, or your own fork, rather than an installed PEAR version. If you do this, you can run the following commands to check if everything is ready to submit: + + cd PHP_CodeSniffer + php bin/phpcs + +Which should display no coding standard errors. And then: + + phpunit + +Which should give you no failures or errors. You can ignore any skipped tests as these are for external tools. diff --git a/vendor/squizlabs/php_codesniffer/CodeSniffer.conf.dist b/vendor/squizlabs/php_codesniffer/CodeSniffer.conf.dist new file mode 100644 index 00000000..62dc395c --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/CodeSniffer.conf.dist @@ -0,0 +1,9 @@ + 'PSR2', + 'report_format' => 'summary', + 'show_warnings' => '0', + 'show_progress' => '1', + 'report_width' => '120', +) +?> diff --git a/vendor/squizlabs/php_codesniffer/README.md b/vendor/squizlabs/php_codesniffer/README.md new file mode 100644 index 00000000..c0ea8e39 --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/README.md @@ -0,0 +1,133 @@ +## About + +PHP_CodeSniffer is a set of two PHP scripts; the main `phpcs` script that tokenizes PHP, JavaScript and CSS files to detect violations of a defined coding standard, and a second `phpcbf` script to automatically correct coding standard violations. PHP_CodeSniffer is an essential development tool that ensures your code remains clean and consistent. + +[![Build Status](https://github.com/squizlabs/PHP_CodeSniffer/workflows/Validate/badge.svg?branch=master)](https://github.com/squizlabs/PHP_CodeSniffer/actions) +[![Build Status](https://github.com/squizlabs/PHP_CodeSniffer/workflows/Test/badge.svg?branch=master)](https://github.com/squizlabs/PHP_CodeSniffer/actions) +[![Code consistency](http://squizlabs.github.io/PHP_CodeSniffer/analysis/squizlabs/PHP_CodeSniffer/grade.svg)](http://squizlabs.github.io/PHP_CodeSniffer/analysis/squizlabs/PHP_CodeSniffer) +[![Join the chat at https://gitter.im/squizlabs/PHP_CodeSniffer](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/squizlabs/PHP_CodeSniffer?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge) + +## Requirements + +PHP_CodeSniffer requires PHP version 5.4.0 or greater, although individual sniffs may have additional requirements such as external applications and scripts. See the [Configuration Options manual page](https://github.com/squizlabs/PHP_CodeSniffer/wiki/Configuration-Options) for a list of these requirements. + +If you're using PHP_CodeSniffer as part of a team, or you're running it on a [CI](https://en.wikipedia.org/wiki/Continuous_integration) server, you may want to configure your project's settings [using a configuration file](https://github.com/squizlabs/PHP_CodeSniffer/wiki/Advanced-Usage#using-a-default-configuration-file). + + +## Installation + +The easiest way to get started with PHP_CodeSniffer is to download the Phar files for each of the commands: +``` +# Download using curl +curl -OL https://squizlabs.github.io/PHP_CodeSniffer/phpcs.phar +curl -OL https://squizlabs.github.io/PHP_CodeSniffer/phpcbf.phar + +# Or download using wget +wget https://squizlabs.github.io/PHP_CodeSniffer/phpcs.phar +wget https://squizlabs.github.io/PHP_CodeSniffer/phpcbf.phar + +# Then test the downloaded PHARs +php phpcs.phar -h +php phpcbf.phar -h +``` + +### Composer +If you use Composer, you can install PHP_CodeSniffer system-wide with the following command: + + composer global require "squizlabs/php_codesniffer=*" + +Make sure you have the composer bin dir in your PATH. The default value is `~/.composer/vendor/bin/`, but you can check the value that you need to use by running `composer global config bin-dir --absolute`. + +Or alternatively, include a dependency for `squizlabs/php_codesniffer` in your `composer.json` file. For example: + +```json +{ + "require-dev": { + "squizlabs/php_codesniffer": "3.*" + } +} +``` + +You will then be able to run PHP_CodeSniffer from the vendor bin directory: + + ./vendor/bin/phpcs -h + ./vendor/bin/phpcbf -h + +### Phive +If you use Phive, you can install PHP_CodeSniffer as a project tool using the following commands: + + phive install phpcs + phive install phpcbf + +You will then be able to run PHP_CodeSniffer from the tools directory: + + ./tools/phpcs -h + ./tools/phpcbf -h + +### PEAR +If you use PEAR, you can install PHP_CodeSniffer using the PEAR installer. This will make the `phpcs` and `phpcbf` commands immediately available for use. To install PHP_CodeSniffer using the PEAR installer, first ensure you have [installed PEAR](http://pear.php.net/manual/en/installation.getting.php) and then run the following command: + + pear install PHP_CodeSniffer + +### Git Clone +You can also download the PHP_CodeSniffer source and run the `phpcs` and `phpcbf` commands directly from the Git clone: + + git clone https://github.com/squizlabs/PHP_CodeSniffer.git + cd PHP_CodeSniffer + php bin/phpcs -h + php bin/phpcbf -h + +## Getting Started + +The default coding standard used by PHP_CodeSniffer is the PEAR coding standard. To check a file against the PEAR coding standard, simply specify the file's location: + + $ phpcs /path/to/code/myfile.php + +Or if you wish to check an entire directory you can specify the directory location instead of a file. + + $ phpcs /path/to/code-directory + +If you wish to check your code against the PSR-12 coding standard, use the `--standard` command line argument: + + $ phpcs --standard=PSR12 /path/to/code-directory + +If PHP_CodeSniffer finds any coding standard errors, a report will be shown after running the command. + +Full usage information and example reports are available on the [usage page](https://github.com/squizlabs/PHP_CodeSniffer/wiki/Usage). + +## Documentation + +The documentation for PHP_CodeSniffer is available on the [Github wiki](https://github.com/squizlabs/PHP_CodeSniffer/wiki). + +## Issues + +Bug reports and feature requests can be submitted on the [Github Issue Tracker](https://github.com/squizlabs/PHP_CodeSniffer/issues). + +## Contributing + +See [CONTRIBUTING.md](CONTRIBUTING.md) for information. + +## Versioning + +PHP_CodeSniffer uses a `MAJOR.MINOR.PATCH` version number format. + +The `MAJOR` version is incremented when: +- backwards-incompatible changes are made to how the `phpcs` or `phpcbf` commands are used, or +- backwards-incompatible changes are made to the `ruleset.xml` format, or +- backwards-incompatible changes are made to the API used by sniff developers, or +- custom PHP_CodeSniffer token types are removed, or +- existing sniffs are removed from PHP_CodeSniffer entirely + +The `MINOR` version is incremented when: +- new backwards-compatible features are added to the `phpcs` and `phpcbf` commands, or +- backwards-compatible changes are made to the `ruleset.xml` format, or +- backwards-compatible changes are made to the API used by sniff developers, or +- new sniffs are added to an included standard, or +- existing sniffs are removed from an included standard + +> NOTE: Backwards-compatible changes to the API used by sniff developers will allow an existing sniff to continue running without producing fatal errors but may not result in the sniff reporting the same errors as it did previously without changes being required. + +The `PATCH` version is incremented when: +- backwards-compatible bug fixes are made + +> NOTE: As PHP_CodeSniffer exists to report and fix issues, most bugs are the result of coding standard errors being incorrectly reported or coding standard errors not being reported when they should be. This means that the messages produced by PHP_CodeSniffer, and the fixes it makes, are likely to be different between PATCH versions. diff --git a/vendor/squizlabs/php_codesniffer/autoload.php b/vendor/squizlabs/php_codesniffer/autoload.php new file mode 100644 index 00000000..0dcf1b4c --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/autoload.php @@ -0,0 +1,342 @@ + + * @copyright 2006-2015 Squiz Pty Ltd (ABN 77 084 670 600) + * @license https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence + */ + +namespace PHP_CodeSniffer; + +if (class_exists('PHP_CodeSniffer\Autoload', false) === false) { + class Autoload + { + + /** + * The composer autoloader. + * + * @var \Composer\Autoload\ClassLoader + */ + private static $composerAutoloader = null; + + /** + * A mapping of file names to class names. + * + * @var array + */ + private static $loadedClasses = []; + + /** + * A mapping of class names to file names. + * + * @var array + */ + private static $loadedFiles = []; + + /** + * A list of additional directories to search during autoloading. + * + * This is typically a list of coding standard directories. + * + * @var string[] + */ + private static $searchPaths = []; + + + /** + * Loads a class. + * + * This method only loads classes that exist in the PHP_CodeSniffer namespace. + * All other classes are ignored and loaded by subsequent autoloaders. + * + * @param string $class The name of the class to load. + * + * @return bool + */ + public static function load($class) + { + // Include the composer autoloader if there is one, but re-register it + // so this autoloader runs before the composer one as we need to include + // all files so we can figure out what the class/interface/trait name is. + if (self::$composerAutoloader === null) { + // Make sure we don't try to load any of Composer's classes + // while the autoloader is being setup. + if (strpos($class, 'Composer\\') === 0) { + return; + } + + if (strpos(__DIR__, 'phar://') !== 0 + && @file_exists(__DIR__.'/../../autoload.php') === true + ) { + self::$composerAutoloader = include __DIR__.'/../../autoload.php'; + if (self::$composerAutoloader instanceof \Composer\Autoload\ClassLoader) { + self::$composerAutoloader->unregister(); + self::$composerAutoloader->register(); + } else { + // Something went wrong, so keep going without the autoloader + // although namespaced sniffs might error. + self::$composerAutoloader = false; + } + } else { + self::$composerAutoloader = false; + } + }//end if + + $ds = DIRECTORY_SEPARATOR; + $path = false; + + if (substr($class, 0, 16) === 'PHP_CodeSniffer\\') { + if (substr($class, 0, 22) === 'PHP_CodeSniffer\Tests\\') { + $isInstalled = !is_dir(__DIR__.$ds.'tests'); + if ($isInstalled === false) { + $path = __DIR__.$ds.'tests'; + } else { + $path = '@test_dir@'.$ds.'PHP_CodeSniffer'.$ds.'CodeSniffer'; + } + + $path .= $ds.substr(str_replace('\\', $ds, $class), 22).'.php'; + } else { + $path = __DIR__.$ds.'src'.$ds.substr(str_replace('\\', $ds, $class), 16).'.php'; + } + } + + // See if the composer autoloader knows where the class is. + if ($path === false && self::$composerAutoloader !== false) { + $path = self::$composerAutoloader->findFile($class); + } + + // See if the class is inside one of our alternate search paths. + if ($path === false) { + foreach (self::$searchPaths as $searchPath => $nsPrefix) { + $className = $class; + if ($nsPrefix !== '' && substr($class, 0, strlen($nsPrefix)) === $nsPrefix) { + $className = substr($class, (strlen($nsPrefix) + 1)); + } + + $path = $searchPath.$ds.str_replace('\\', $ds, $className).'.php'; + if (is_file($path) === true) { + break; + } + + $path = false; + } + } + + if ($path !== false && is_file($path) === true) { + self::loadFile($path); + return true; + } + + return false; + + }//end load() + + + /** + * Includes a file and tracks what class or interface was loaded as a result. + * + * @param string $path The path of the file to load. + * + * @return string The fully qualified name of the class in the loaded file. + */ + public static function loadFile($path) + { + if (strpos(__DIR__, 'phar://') !== 0) { + $path = realpath($path); + if ($path === false) { + return false; + } + } + + if (isset(self::$loadedClasses[$path]) === true) { + return self::$loadedClasses[$path]; + } + + $classesBeforeLoad = [ + 'classes' => get_declared_classes(), + 'interfaces' => get_declared_interfaces(), + 'traits' => get_declared_traits(), + ]; + + include $path; + + $classesAfterLoad = [ + 'classes' => get_declared_classes(), + 'interfaces' => get_declared_interfaces(), + 'traits' => get_declared_traits(), + ]; + + $className = self::determineLoadedClass($classesBeforeLoad, $classesAfterLoad); + + self::$loadedClasses[$path] = $className; + self::$loadedFiles[$className] = $path; + return self::$loadedClasses[$path]; + + }//end loadFile() + + + /** + * Determine which class was loaded based on the before and after lists of loaded classes. + * + * @param array $classesBeforeLoad The classes/interfaces/traits before the file was included. + * @param array $classesAfterLoad The classes/interfaces/traits after the file was included. + * + * @return string The fully qualified name of the class in the loaded file. + */ + public static function determineLoadedClass($classesBeforeLoad, $classesAfterLoad) + { + $className = null; + + $newClasses = array_diff($classesAfterLoad['classes'], $classesBeforeLoad['classes']); + if (PHP_VERSION_ID < 70400) { + $newClasses = array_reverse($newClasses); + } + + // Since PHP 7.4 get_declared_classes() does not guarantee any order, making + // it impossible to use order to determine which is the parent an which is the child. + // Let's reduce the list of candidates by removing all the classes known to be "parents". + // That way, at the end, only the "main" class just included will remain. + $newClasses = array_reduce( + $newClasses, + function ($remaining, $current) { + return array_diff($remaining, class_parents($current)); + }, + $newClasses + ); + + foreach ($newClasses as $name) { + if (isset(self::$loadedFiles[$name]) === false) { + $className = $name; + break; + } + } + + if ($className === null) { + $newClasses = array_reverse(array_diff($classesAfterLoad['interfaces'], $classesBeforeLoad['interfaces'])); + foreach ($newClasses as $name) { + if (isset(self::$loadedFiles[$name]) === false) { + $className = $name; + break; + } + } + } + + if ($className === null) { + $newClasses = array_reverse(array_diff($classesAfterLoad['traits'], $classesBeforeLoad['traits'])); + foreach ($newClasses as $name) { + if (isset(self::$loadedFiles[$name]) === false) { + $className = $name; + break; + } + } + } + + return $className; + + }//end determineLoadedClass() + + + /** + * Adds a directory to search during autoloading. + * + * @param string $path The path to the directory to search. + * @param string $nsPrefix The namespace prefix used by files under this path. + * + * @return void + */ + public static function addSearchPath($path, $nsPrefix='') + { + self::$searchPaths[$path] = rtrim(trim((string) $nsPrefix), '\\'); + + }//end addSearchPath() + + + /** + * Retrieve the namespaces and paths registered by external standards. + * + * @return array + */ + public static function getSearchPaths() + { + return self::$searchPaths; + + }//end getSearchPaths() + + + /** + * Gets the class name for the given file path. + * + * @param string $path The name of the file. + * + * @throws \Exception If the file path has not been loaded. + * @return string + */ + public static function getLoadedClassName($path) + { + if (isset(self::$loadedClasses[$path]) === false) { + throw new \Exception("Cannot get class name for $path; file has not been included"); + } + + return self::$loadedClasses[$path]; + + }//end getLoadedClassName() + + + /** + * Gets the file path for the given class name. + * + * @param string $class The name of the class. + * + * @throws \Exception If the class name has not been loaded + * @return string + */ + public static function getLoadedFileName($class) + { + if (isset(self::$loadedFiles[$class]) === false) { + throw new \Exception("Cannot get file name for $class; class has not been included"); + } + + return self::$loadedFiles[$class]; + + }//end getLoadedFileName() + + + /** + * Gets the mapping of file names to class names. + * + * @return array + */ + public static function getLoadedClasses() + { + return self::$loadedClasses; + + }//end getLoadedClasses() + + + /** + * Gets the mapping of class names to file names. + * + * @return array + */ + public static function getLoadedFiles() + { + return self::$loadedFiles; + + }//end getLoadedFiles() + + + }//end class + + // Register the autoloader before any existing autoloaders to ensure + // it gets a chance to hear about every autoload request, and record + // the file and class name for it. + spl_autoload_register(__NAMESPACE__.'\Autoload::load', true, true); +}//end if diff --git a/vendor/squizlabs/php_codesniffer/bin/phpcbf b/vendor/squizlabs/php_codesniffer/bin/phpcbf new file mode 100755 index 00000000..45b43f43 --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/bin/phpcbf @@ -0,0 +1,19 @@ +#!/usr/bin/env php + + * @copyright 2006-2015 Squiz Pty Ltd (ABN 77 084 670 600) + * @license https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence + */ + +if (is_file(__DIR__.'/../autoload.php') === true) { + include_once __DIR__.'/../autoload.php'; +} else { + include_once 'PHP/CodeSniffer/autoload.php'; +} + +$runner = new PHP_CodeSniffer\Runner(); +$exitCode = $runner->runPHPCBF(); +exit($exitCode); diff --git a/vendor/squizlabs/php_codesniffer/bin/phpcbf.bat b/vendor/squizlabs/php_codesniffer/bin/phpcbf.bat new file mode 100644 index 00000000..5b07a7d9 --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/bin/phpcbf.bat @@ -0,0 +1,12 @@ +@echo off +REM PHP Code Beautifier and Fixer fixes violations of a defined coding standard. +REM +REM @author Greg Sherwood +REM @copyright 2006-2015 Squiz Pty Ltd (ABN 77 084 670 600) +REM @license https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence + +if "%PHP_PEAR_PHP_BIN%" neq "" ( + set PHPBIN=%PHP_PEAR_PHP_BIN% +) else set PHPBIN=php + +"%PHPBIN%" "%~dp0\phpcbf" %* diff --git a/vendor/squizlabs/php_codesniffer/bin/phpcs b/vendor/squizlabs/php_codesniffer/bin/phpcs new file mode 100755 index 00000000..52d28cdf --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/bin/phpcs @@ -0,0 +1,19 @@ +#!/usr/bin/env php + + * @copyright 2006-2015 Squiz Pty Ltd (ABN 77 084 670 600) + * @license https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence + */ + +if (is_file(__DIR__.'/../autoload.php') === true) { + include_once __DIR__.'/../autoload.php'; +} else { + include_once 'PHP/CodeSniffer/autoload.php'; +} + +$runner = new PHP_CodeSniffer\Runner(); +$exitCode = $runner->runPHPCS(); +exit($exitCode); diff --git a/vendor/squizlabs/php_codesniffer/bin/phpcs.bat b/vendor/squizlabs/php_codesniffer/bin/phpcs.bat new file mode 100755 index 00000000..9f9be720 --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/bin/phpcs.bat @@ -0,0 +1,12 @@ +@echo off +REM PHP_CodeSniffer detects violations of a defined coding standard. +REM +REM @author Greg Sherwood +REM @copyright 2006-2015 Squiz Pty Ltd (ABN 77 084 670 600) +REM @license https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence + +if "%PHP_PEAR_PHP_BIN%" neq "" ( + set PHPBIN=%PHP_PEAR_PHP_BIN% +) else set PHPBIN=php + +"%PHPBIN%" "%~dp0\phpcs" %* diff --git a/vendor/squizlabs/php_codesniffer/composer.json b/vendor/squizlabs/php_codesniffer/composer.json new file mode 100644 index 00000000..7605a5df --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/composer.json @@ -0,0 +1,40 @@ +{ + "name": "squizlabs/php_codesniffer", + "description": "PHP_CodeSniffer tokenizes PHP, JavaScript and CSS files and detects violations of a defined set of coding standards.", + "type": "library", + "keywords": [ + "phpcs", + "standards" + ], + "homepage": "https://github.com/squizlabs/PHP_CodeSniffer", + "license": "BSD-3-Clause", + "authors": [ + { + "name": "Greg Sherwood", + "role": "lead" + } + ], + "support": { + "issues": "https://github.com/squizlabs/PHP_CodeSniffer/issues", + "wiki": "https://github.com/squizlabs/PHP_CodeSniffer/wiki", + "source": "https://github.com/squizlabs/PHP_CodeSniffer" + }, + "extra": { + "branch-alias": { + "dev-master": "3.x-dev" + } + }, + "require": { + "php": ">=5.4.0", + "ext-tokenizer": "*", + "ext-xmlwriter": "*", + "ext-simplexml": "*" + }, + "require-dev": { + "phpunit/phpunit": "^4.0 || ^5.0 || ^6.0 || ^7.0" + }, + "bin": [ + "bin/phpcs", + "bin/phpcbf" + ] +} diff --git a/vendor/squizlabs/php_codesniffer/licence.txt b/vendor/squizlabs/php_codesniffer/licence.txt new file mode 100644 index 00000000..9f95b677 --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/licence.txt @@ -0,0 +1,24 @@ +Copyright (c) 2012, Squiz Pty Ltd (ABN 77 084 670 600) +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 the copyright holder 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/vendor/squizlabs/php_codesniffer/phpcs.xsd b/vendor/squizlabs/php_codesniffer/phpcs.xsd new file mode 100644 index 00000000..d93dd868 --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/phpcs.xsd @@ -0,0 +1,136 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/vendor/squizlabs/php_codesniffer/src/Config.php b/vendor/squizlabs/php_codesniffer/src/Config.php new file mode 100644 index 00000000..6bb5b329 --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Config.php @@ -0,0 +1,1704 @@ + + * @copyright 2006-2015 Squiz Pty Ltd (ABN 77 084 670 600) + * @license https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence + */ + +namespace PHP_CodeSniffer; + +use PHP_CodeSniffer\Exceptions\DeepExitException; +use PHP_CodeSniffer\Exceptions\RuntimeException; +use PHP_CodeSniffer\Util\Common; + +/** + * Stores the configuration used to run PHPCS and PHPCBF. + * + * @property string[] $files The files and directories to check. + * @property string[] $standards The standards being used for checking. + * @property int $verbosity How verbose the output should be. + * 0: no unnecessary output + * 1: basic output for files being checked + * 2: ruleset and file parsing output + * 3: sniff execution output + * @property bool $interactive Enable interactive checking mode. + * @property bool $parallel Check files in parallel. + * @property bool $cache Enable the use of the file cache. + * @property bool $cacheFile A file where the cache data should be written + * @property bool $colors Display colours in output. + * @property bool $explain Explain the coding standards. + * @property bool $local Process local files in directories only (no recursion). + * @property bool $showSources Show sniff source codes in report output. + * @property bool $showProgress Show basic progress information while running. + * @property bool $quiet Quiet mode; disables progress and verbose output. + * @property bool $annotations Process phpcs: annotations. + * @property int $tabWidth How many spaces each tab is worth. + * @property string $encoding The encoding of the files being checked. + * @property string[] $sniffs The sniffs that should be used for checking. + * If empty, all sniffs in the supplied standards will be used. + * @property string[] $exclude The sniffs that should be excluded from checking. + * If empty, all sniffs in the supplied standards will be used. + * @property string[] $ignored Regular expressions used to ignore files and folders during checking. + * @property string $reportFile A file where the report output should be written. + * @property string $generator The documentation generator to use. + * @property string $filter The filter to use for the run. + * @property string[] $bootstrap One of more files to include before the run begins. + * @property int $reportWidth The maximum number of columns that reports should use for output. + * Set to "auto" for have this value changed to the width of the terminal. + * @property int $errorSeverity The minimum severity an error must have to be displayed. + * @property int $warningSeverity The minimum severity a warning must have to be displayed. + * @property bool $recordErrors Record the content of error messages as well as error counts. + * @property string $suffix A suffix to add to fixed files. + * @property string $basepath A file system location to strip from the paths of files shown in reports. + * @property bool $stdin Read content from STDIN instead of supplied files. + * @property string $stdinContent Content passed directly to PHPCS on STDIN. + * @property string $stdinPath The path to use for content passed on STDIN. + * + * @property array $extensions File extensions that should be checked, and what tokenizer to use. + * E.g., array('inc' => 'PHP'); + * @property array $reports The reports to use for printing output after the run. + * The format of the array is: + * array( + * 'reportName1' => 'outputFile', + * 'reportName2' => null, + * ); + * If the array value is NULL, the report will be written to the screen. + * + * @property string[] $unknown Any arguments gathered on the command line that are unknown to us. + * E.g., using `phpcs -c` will give array('c'); + */ +class Config +{ + + /** + * The current version. + * + * @var string + */ + const VERSION = '3.6.2'; + + /** + * Package stability; either stable, beta or alpha. + * + * @var string + */ + const STABILITY = 'stable'; + + /** + * An array of settings that PHPCS and PHPCBF accept. + * + * This array is not meant to be accessed directly. Instead, use the settings + * as if they are class member vars so the __get() and __set() magic methods + * can be used to validate the values. For example, to set the verbosity level to + * level 2, use $this->verbosity = 2; instead of accessing this property directly. + * + * Each of these settings is described in the class comment property list. + * + * @var array + */ + private $settings = [ + 'files' => null, + 'standards' => null, + 'verbosity' => null, + 'interactive' => null, + 'parallel' => null, + 'cache' => null, + 'cacheFile' => null, + 'colors' => null, + 'explain' => null, + 'local' => null, + 'showSources' => null, + 'showProgress' => null, + 'quiet' => null, + 'annotations' => null, + 'tabWidth' => null, + 'encoding' => null, + 'extensions' => null, + 'sniffs' => null, + 'exclude' => null, + 'ignored' => null, + 'reportFile' => null, + 'generator' => null, + 'filter' => null, + 'bootstrap' => null, + 'reports' => null, + 'basepath' => null, + 'reportWidth' => null, + 'errorSeverity' => null, + 'warningSeverity' => null, + 'recordErrors' => null, + 'suffix' => null, + 'stdin' => null, + 'stdinContent' => null, + 'stdinPath' => null, + 'unknown' => null, + ]; + + /** + * Whether or not to kill the process when an unknown command line arg is found. + * + * If FALSE, arguments that are not command line options or file/directory paths + * will be ignored and execution will continue. These values will be stored in + * $this->unknown. + * + * @var boolean + */ + public $dieOnUnknownArg; + + /** + * The current command line arguments we are processing. + * + * @var string[] + */ + private $cliArgs = []; + + /** + * Command line values that the user has supplied directly. + * + * @var array + */ + private static $overriddenDefaults = []; + + /** + * Config file data that has been loaded for the run. + * + * @var array + */ + private static $configData = null; + + /** + * The full path to the config data file that has been loaded. + * + * @var string + */ + private static $configDataFile = null; + + /** + * Automatically discovered executable utility paths. + * + * @var array + */ + private static $executablePaths = []; + + + /** + * Get the value of an inaccessible property. + * + * @param string $name The name of the property. + * + * @return mixed + * @throws \PHP_CodeSniffer\Exceptions\RuntimeException If the setting name is invalid. + */ + public function __get($name) + { + if (array_key_exists($name, $this->settings) === false) { + throw new RuntimeException("ERROR: unable to get value of property \"$name\""); + } + + return $this->settings[$name]; + + }//end __get() + + + /** + * Set the value of an inaccessible property. + * + * @param string $name The name of the property. + * @param mixed $value The value of the property. + * + * @return void + * @throws \PHP_CodeSniffer\Exceptions\RuntimeException If the setting name is invalid. + */ + public function __set($name, $value) + { + if (array_key_exists($name, $this->settings) === false) { + throw new RuntimeException("Can't __set() $name; setting doesn't exist"); + } + + switch ($name) { + case 'reportWidth' : + // Support auto terminal width. + if ($value === 'auto' + && function_exists('shell_exec') === true + && preg_match('|\d+ (\d+)|', shell_exec('stty size 2>&1'), $matches) === 1 + ) { + $value = (int) $matches[1]; + } else { + $value = (int) $value; + } + break; + case 'standards' : + $cleaned = []; + + // Check if the standard name is valid, or if the case is invalid. + $installedStandards = Util\Standards::getInstalledStandards(); + foreach ($value as $standard) { + foreach ($installedStandards as $validStandard) { + if (strtolower($standard) === strtolower($validStandard)) { + $standard = $validStandard; + break; + } + } + + $cleaned[] = $standard; + } + + $value = $cleaned; + break; + default : + // No validation required. + break; + }//end switch + + $this->settings[$name] = $value; + + }//end __set() + + + /** + * Check if the value of an inaccessible property is set. + * + * @param string $name The name of the property. + * + * @return bool + */ + public function __isset($name) + { + return isset($this->settings[$name]); + + }//end __isset() + + + /** + * Unset the value of an inaccessible property. + * + * @param string $name The name of the property. + * + * @return void + */ + public function __unset($name) + { + $this->settings[$name] = null; + + }//end __unset() + + + /** + * Get the array of all config settings. + * + * @return array + */ + public function getSettings() + { + return $this->settings; + + }//end getSettings() + + + /** + * Set the array of all config settings. + * + * @param array $settings The array of config settings. + * + * @return void + */ + public function setSettings($settings) + { + return $this->settings = $settings; + + }//end setSettings() + + + /** + * Creates a Config object and populates it with command line values. + * + * @param array $cliArgs An array of values gathered from CLI args. + * @param bool $dieOnUnknownArg Whether or not to kill the process when an + * unknown command line arg is found. + * + * @return void + */ + public function __construct(array $cliArgs=[], $dieOnUnknownArg=true) + { + if (defined('PHP_CODESNIFFER_IN_TESTS') === true) { + // Let everything through during testing so that we can + // make use of PHPUnit command line arguments as well. + $this->dieOnUnknownArg = false; + } else { + $this->dieOnUnknownArg = $dieOnUnknownArg; + } + + if (empty($cliArgs) === true) { + $cliArgs = $_SERVER['argv']; + array_shift($cliArgs); + } + + $this->restoreDefaults(); + $this->setCommandLineValues($cliArgs); + + if (isset(self::$overriddenDefaults['standards']) === false) { + // They did not supply a standard to use. + // Look for a default ruleset in the current directory or higher. + $currentDir = getcwd(); + + $defaultFiles = [ + '.phpcs.xml', + 'phpcs.xml', + '.phpcs.xml.dist', + 'phpcs.xml.dist', + ]; + + do { + foreach ($defaultFiles as $defaultFilename) { + $default = $currentDir.DIRECTORY_SEPARATOR.$defaultFilename; + if (is_file($default) === true) { + $this->standards = [$default]; + break(2); + } + } + + $lastDir = $currentDir; + $currentDir = dirname($currentDir); + } while ($currentDir !== '.' && $currentDir !== $lastDir && Common::isReadable($currentDir) === true); + }//end if + + if (defined('STDIN') === false + || strtoupper(substr(PHP_OS, 0, 3)) === 'WIN' + ) { + return; + } + + $handle = fopen('php://stdin', 'r'); + + // Check for content on STDIN. + if ($this->stdin === true + || (Util\Common::isStdinATTY() === false + && feof($handle) === false) + ) { + $readStreams = [$handle]; + $writeSteams = null; + + $fileContents = ''; + while (is_resource($handle) === true && feof($handle) === false) { + // Set a timeout of 200ms. + if (stream_select($readStreams, $writeSteams, $writeSteams, 0, 200000) === 0) { + break; + } + + $fileContents .= fgets($handle); + } + + if (trim($fileContents) !== '') { + $this->stdin = true; + $this->stdinContent = $fileContents; + self::$overriddenDefaults['stdin'] = true; + self::$overriddenDefaults['stdinContent'] = true; + } + }//end if + + fclose($handle); + + }//end __construct() + + + /** + * Set the command line values. + * + * @param array $args An array of command line arguments to set. + * + * @return void + */ + public function setCommandLineValues($args) + { + $this->cliArgs = $args; + $numArgs = count($args); + + for ($i = 0; $i < $numArgs; $i++) { + $arg = $this->cliArgs[$i]; + if ($arg === '') { + continue; + } + + if ($arg[0] === '-') { + if ($arg === '-') { + // Asking to read from STDIN. + $this->stdin = true; + self::$overriddenDefaults['stdin'] = true; + continue; + } + + if ($arg === '--') { + // Empty argument, ignore it. + continue; + } + + if ($arg[1] === '-') { + $this->processLongArgument(substr($arg, 2), $i); + } else { + $switches = str_split($arg); + foreach ($switches as $switch) { + if ($switch === '-') { + continue; + } + + $this->processShortArgument($switch, $i); + } + } + } else { + $this->processUnknownArgument($arg, $i); + }//end if + }//end for + + }//end setCommandLineValues() + + + /** + * Restore default values for all possible command line arguments. + * + * @return void + */ + public function restoreDefaults() + { + $this->files = []; + $this->standards = ['PEAR']; + $this->verbosity = 0; + $this->interactive = false; + $this->cache = false; + $this->cacheFile = null; + $this->colors = false; + $this->explain = false; + $this->local = false; + $this->showSources = false; + $this->showProgress = false; + $this->quiet = false; + $this->annotations = true; + $this->parallel = 1; + $this->tabWidth = 0; + $this->encoding = 'utf-8'; + $this->extensions = [ + 'php' => 'PHP', + 'inc' => 'PHP', + 'js' => 'JS', + 'css' => 'CSS', + ]; + $this->sniffs = []; + $this->exclude = []; + $this->ignored = []; + $this->reportFile = null; + $this->generator = null; + $this->filter = null; + $this->bootstrap = []; + $this->basepath = null; + $this->reports = ['full' => null]; + $this->reportWidth = 'auto'; + $this->errorSeverity = 5; + $this->warningSeverity = 5; + $this->recordErrors = true; + $this->suffix = ''; + $this->stdin = false; + $this->stdinContent = null; + $this->stdinPath = null; + $this->unknown = []; + + $standard = self::getConfigData('default_standard'); + if ($standard !== null) { + $this->standards = explode(',', $standard); + } + + $reportFormat = self::getConfigData('report_format'); + if ($reportFormat !== null) { + $this->reports = [$reportFormat => null]; + } + + $tabWidth = self::getConfigData('tab_width'); + if ($tabWidth !== null) { + $this->tabWidth = (int) $tabWidth; + } + + $encoding = self::getConfigData('encoding'); + if ($encoding !== null) { + $this->encoding = strtolower($encoding); + } + + $severity = self::getConfigData('severity'); + if ($severity !== null) { + $this->errorSeverity = (int) $severity; + $this->warningSeverity = (int) $severity; + } + + $severity = self::getConfigData('error_severity'); + if ($severity !== null) { + $this->errorSeverity = (int) $severity; + } + + $severity = self::getConfigData('warning_severity'); + if ($severity !== null) { + $this->warningSeverity = (int) $severity; + } + + $showWarnings = self::getConfigData('show_warnings'); + if ($showWarnings !== null) { + $showWarnings = (bool) $showWarnings; + if ($showWarnings === false) { + $this->warningSeverity = 0; + } + } + + $reportWidth = self::getConfigData('report_width'); + if ($reportWidth !== null) { + $this->reportWidth = $reportWidth; + } + + $showProgress = self::getConfigData('show_progress'); + if ($showProgress !== null) { + $this->showProgress = (bool) $showProgress; + } + + $quiet = self::getConfigData('quiet'); + if ($quiet !== null) { + $this->quiet = (bool) $quiet; + } + + $colors = self::getConfigData('colors'); + if ($colors !== null) { + $this->colors = (bool) $colors; + } + + if (defined('PHP_CODESNIFFER_IN_TESTS') === false) { + $cache = self::getConfigData('cache'); + if ($cache !== null) { + $this->cache = (bool) $cache; + } + + $parallel = self::getConfigData('parallel'); + if ($parallel !== null) { + $this->parallel = max((int) $parallel, 1); + } + } + + }//end restoreDefaults() + + + /** + * Processes a short (-e) command line argument. + * + * @param string $arg The command line argument. + * @param int $pos The position of the argument on the command line. + * + * @return void + * @throws \PHP_CodeSniffer\Exceptions\DeepExitException + */ + public function processShortArgument($arg, $pos) + { + switch ($arg) { + case 'h': + case '?': + ob_start(); + $this->printUsage(); + $output = ob_get_contents(); + ob_end_clean(); + throw new DeepExitException($output, 0); + case 'i' : + ob_start(); + Util\Standards::printInstalledStandards(); + $output = ob_get_contents(); + ob_end_clean(); + throw new DeepExitException($output, 0); + case 'v' : + if ($this->quiet === true) { + // Ignore when quiet mode is enabled. + break; + } + + $this->verbosity++; + self::$overriddenDefaults['verbosity'] = true; + break; + case 'l' : + $this->local = true; + self::$overriddenDefaults['local'] = true; + break; + case 's' : + $this->showSources = true; + self::$overriddenDefaults['showSources'] = true; + break; + case 'a' : + $this->interactive = true; + self::$overriddenDefaults['interactive'] = true; + break; + case 'e': + $this->explain = true; + self::$overriddenDefaults['explain'] = true; + break; + case 'p' : + if ($this->quiet === true) { + // Ignore when quiet mode is enabled. + break; + } + + $this->showProgress = true; + self::$overriddenDefaults['showProgress'] = true; + break; + case 'q' : + // Quiet mode disables a few other settings as well. + $this->quiet = true; + $this->showProgress = false; + $this->verbosity = 0; + + self::$overriddenDefaults['quiet'] = true; + break; + case 'm' : + $this->recordErrors = false; + self::$overriddenDefaults['recordErrors'] = true; + break; + case 'd' : + $ini = explode('=', $this->cliArgs[($pos + 1)]); + $this->cliArgs[($pos + 1)] = ''; + if (isset($ini[1]) === true) { + ini_set($ini[0], $ini[1]); + } else { + ini_set($ini[0], true); + } + break; + case 'n' : + if (isset(self::$overriddenDefaults['warningSeverity']) === false) { + $this->warningSeverity = 0; + self::$overriddenDefaults['warningSeverity'] = true; + } + break; + case 'w' : + if (isset(self::$overriddenDefaults['warningSeverity']) === false) { + $this->warningSeverity = $this->errorSeverity; + self::$overriddenDefaults['warningSeverity'] = true; + } + break; + default: + if ($this->dieOnUnknownArg === false) { + $unknown = $this->unknown; + $unknown[] = $arg; + $this->unknown = $unknown; + } else { + $this->processUnknownArgument('-'.$arg, $pos); + } + }//end switch + + }//end processShortArgument() + + + /** + * Processes a long (--example) command line argument. + * + * @param string $arg The command line argument. + * @param int $pos The position of the argument on the command line. + * + * @return void + * @throws \PHP_CodeSniffer\Exceptions\DeepExitException + */ + public function processLongArgument($arg, $pos) + { + switch ($arg) { + case 'help': + ob_start(); + $this->printUsage(); + $output = ob_get_contents(); + ob_end_clean(); + throw new DeepExitException($output, 0); + case 'version': + $output = 'PHP_CodeSniffer version '.self::VERSION.' ('.self::STABILITY.') '; + $output .= 'by Squiz (http://www.squiz.net)'.PHP_EOL; + throw new DeepExitException($output, 0); + case 'colors': + if (isset(self::$overriddenDefaults['colors']) === true) { + break; + } + + $this->colors = true; + self::$overriddenDefaults['colors'] = true; + break; + case 'no-colors': + if (isset(self::$overriddenDefaults['colors']) === true) { + break; + } + + $this->colors = false; + self::$overriddenDefaults['colors'] = true; + break; + case 'cache': + if (isset(self::$overriddenDefaults['cache']) === true) { + break; + } + + if (defined('PHP_CODESNIFFER_IN_TESTS') === false) { + $this->cache = true; + self::$overriddenDefaults['cache'] = true; + } + break; + case 'no-cache': + if (isset(self::$overriddenDefaults['cache']) === true) { + break; + } + + $this->cache = false; + self::$overriddenDefaults['cache'] = true; + break; + case 'ignore-annotations': + if (isset(self::$overriddenDefaults['annotations']) === true) { + break; + } + + $this->annotations = false; + self::$overriddenDefaults['annotations'] = true; + break; + case 'config-set': + if (isset($this->cliArgs[($pos + 1)]) === false + || isset($this->cliArgs[($pos + 2)]) === false + ) { + $error = 'ERROR: Setting a config option requires a name and value'.PHP_EOL.PHP_EOL; + $error .= $this->printShortUsage(true); + throw new DeepExitException($error, 3); + } + + $key = $this->cliArgs[($pos + 1)]; + $value = $this->cliArgs[($pos + 2)]; + $current = self::getConfigData($key); + + try { + $this->setConfigData($key, $value); + } catch (\Exception $e) { + throw new DeepExitException($e->getMessage().PHP_EOL, 3); + } + + $output = 'Using config file: '.self::$configDataFile.PHP_EOL.PHP_EOL; + + if ($current === null) { + $output .= "Config value \"$key\" added successfully".PHP_EOL; + } else { + $output .= "Config value \"$key\" updated successfully; old value was \"$current\"".PHP_EOL; + } + throw new DeepExitException($output, 0); + case 'config-delete': + if (isset($this->cliArgs[($pos + 1)]) === false) { + $error = 'ERROR: Deleting a config option requires the name of the option'.PHP_EOL.PHP_EOL; + $error .= $this->printShortUsage(true); + throw new DeepExitException($error, 3); + } + + $output = 'Using config file: '.self::$configDataFile.PHP_EOL.PHP_EOL; + + $key = $this->cliArgs[($pos + 1)]; + $current = self::getConfigData($key); + if ($current === null) { + $output .= "Config value \"$key\" has not been set".PHP_EOL; + } else { + try { + $this->setConfigData($key, null); + } catch (\Exception $e) { + throw new DeepExitException($e->getMessage().PHP_EOL, 3); + } + + $output .= "Config value \"$key\" removed successfully; old value was \"$current\"".PHP_EOL; + } + throw new DeepExitException($output, 0); + case 'config-show': + ob_start(); + $data = self::getAllConfigData(); + echo 'Using config file: '.self::$configDataFile.PHP_EOL.PHP_EOL; + $this->printConfigData($data); + $output = ob_get_contents(); + ob_end_clean(); + throw new DeepExitException($output, 0); + case 'runtime-set': + if (isset($this->cliArgs[($pos + 1)]) === false + || isset($this->cliArgs[($pos + 2)]) === false + ) { + $error = 'ERROR: Setting a runtime config option requires a name and value'.PHP_EOL.PHP_EOL; + $error .= $this->printShortUsage(true); + throw new DeepExitException($error, 3); + } + + $key = $this->cliArgs[($pos + 1)]; + $value = $this->cliArgs[($pos + 2)]; + $this->cliArgs[($pos + 1)] = ''; + $this->cliArgs[($pos + 2)] = ''; + self::setConfigData($key, $value, true); + if (isset(self::$overriddenDefaults['runtime-set']) === false) { + self::$overriddenDefaults['runtime-set'] = []; + } + + self::$overriddenDefaults['runtime-set'][$key] = true; + break; + default: + if (substr($arg, 0, 7) === 'sniffs=') { + if (isset(self::$overriddenDefaults['sniffs']) === true) { + break; + } + + $sniffs = explode(',', substr($arg, 7)); + foreach ($sniffs as $sniff) { + if (substr_count($sniff, '.') !== 2) { + $error = 'ERROR: The specified sniff code "'.$sniff.'" is invalid'.PHP_EOL.PHP_EOL; + $error .= $this->printShortUsage(true); + throw new DeepExitException($error, 3); + } + } + + $this->sniffs = $sniffs; + self::$overriddenDefaults['sniffs'] = true; + } else if (substr($arg, 0, 8) === 'exclude=') { + if (isset(self::$overriddenDefaults['exclude']) === true) { + break; + } + + $sniffs = explode(',', substr($arg, 8)); + foreach ($sniffs as $sniff) { + if (substr_count($sniff, '.') !== 2) { + $error = 'ERROR: The specified sniff code "'.$sniff.'" is invalid'.PHP_EOL.PHP_EOL; + $error .= $this->printShortUsage(true); + throw new DeepExitException($error, 3); + } + } + + $this->exclude = $sniffs; + self::$overriddenDefaults['exclude'] = true; + } else if (defined('PHP_CODESNIFFER_IN_TESTS') === false + && substr($arg, 0, 6) === 'cache=' + ) { + if ((isset(self::$overriddenDefaults['cache']) === true + && $this->cache === false) + || isset(self::$overriddenDefaults['cacheFile']) === true + ) { + break; + } + + // Turn caching on. + $this->cache = true; + self::$overriddenDefaults['cache'] = true; + + $this->cacheFile = Util\Common::realpath(substr($arg, 6)); + + // It may not exist and return false instead. + if ($this->cacheFile === false) { + $this->cacheFile = substr($arg, 6); + + $dir = dirname($this->cacheFile); + if (is_dir($dir) === false) { + $error = 'ERROR: The specified cache file path "'.$this->cacheFile.'" points to a non-existent directory'.PHP_EOL.PHP_EOL; + $error .= $this->printShortUsage(true); + throw new DeepExitException($error, 3); + } + + if ($dir === '.') { + // Passed cache file is a file in the current directory. + $this->cacheFile = getcwd().'/'.basename($this->cacheFile); + } else { + if ($dir[0] === '/') { + // An absolute path. + $dir = Util\Common::realpath($dir); + } else { + $dir = Util\Common::realpath(getcwd().'/'.$dir); + } + + if ($dir !== false) { + // Cache file path is relative. + $this->cacheFile = $dir.'/'.basename($this->cacheFile); + } + } + }//end if + + self::$overriddenDefaults['cacheFile'] = true; + + if (is_dir($this->cacheFile) === true) { + $error = 'ERROR: The specified cache file path "'.$this->cacheFile.'" is a directory'.PHP_EOL.PHP_EOL; + $error .= $this->printShortUsage(true); + throw new DeepExitException($error, 3); + } + } else if (substr($arg, 0, 10) === 'bootstrap=') { + $files = explode(',', substr($arg, 10)); + $bootstrap = []; + foreach ($files as $file) { + $path = Util\Common::realpath($file); + if ($path === false) { + $error = 'ERROR: The specified bootstrap file "'.$file.'" does not exist'.PHP_EOL.PHP_EOL; + $error .= $this->printShortUsage(true); + throw new DeepExitException($error, 3); + } + + $bootstrap[] = $path; + } + + $this->bootstrap = array_merge($this->bootstrap, $bootstrap); + self::$overriddenDefaults['bootstrap'] = true; + } else if (substr($arg, 0, 10) === 'file-list=') { + $fileList = substr($arg, 10); + $path = Util\Common::realpath($fileList); + if ($path === false) { + $error = 'ERROR: The specified file list "'.$fileList.'" does not exist'.PHP_EOL.PHP_EOL; + $error .= $this->printShortUsage(true); + throw new DeepExitException($error, 3); + } + + $files = file($path); + foreach ($files as $inputFile) { + $inputFile = trim($inputFile); + + // Skip empty lines. + if ($inputFile === '') { + continue; + } + + $this->processFilePath($inputFile); + } + } else if (substr($arg, 0, 11) === 'stdin-path=') { + if (isset(self::$overriddenDefaults['stdinPath']) === true) { + break; + } + + $this->stdinPath = Util\Common::realpath(substr($arg, 11)); + + // It may not exist and return false instead, so use whatever they gave us. + if ($this->stdinPath === false) { + $this->stdinPath = trim(substr($arg, 11)); + } + + self::$overriddenDefaults['stdinPath'] = true; + } else if (PHP_CODESNIFFER_CBF === false && substr($arg, 0, 12) === 'report-file=') { + if (isset(self::$overriddenDefaults['reportFile']) === true) { + break; + } + + $this->reportFile = Util\Common::realpath(substr($arg, 12)); + + // It may not exist and return false instead. + if ($this->reportFile === false) { + $this->reportFile = substr($arg, 12); + + $dir = Util\Common::realpath(dirname($this->reportFile)); + if (is_dir($dir) === false) { + $error = 'ERROR: The specified report file path "'.$this->reportFile.'" points to a non-existent directory'.PHP_EOL.PHP_EOL; + $error .= $this->printShortUsage(true); + throw new DeepExitException($error, 3); + } + + $this->reportFile = $dir.'/'.basename($this->reportFile); + }//end if + + self::$overriddenDefaults['reportFile'] = true; + + if (is_dir($this->reportFile) === true) { + $error = 'ERROR: The specified report file path "'.$this->reportFile.'" is a directory'.PHP_EOL.PHP_EOL; + $error .= $this->printShortUsage(true); + throw new DeepExitException($error, 3); + } + } else if (substr($arg, 0, 13) === 'report-width=') { + if (isset(self::$overriddenDefaults['reportWidth']) === true) { + break; + } + + $this->reportWidth = substr($arg, 13); + self::$overriddenDefaults['reportWidth'] = true; + } else if (substr($arg, 0, 9) === 'basepath=') { + if (isset(self::$overriddenDefaults['basepath']) === true) { + break; + } + + self::$overriddenDefaults['basepath'] = true; + + if (substr($arg, 9) === '') { + $this->basepath = null; + break; + } + + $this->basepath = Util\Common::realpath(substr($arg, 9)); + + // It may not exist and return false instead. + if ($this->basepath === false) { + $this->basepath = substr($arg, 9); + } + + if (is_dir($this->basepath) === false) { + $error = 'ERROR: The specified basepath "'.$this->basepath.'" points to a non-existent directory'.PHP_EOL.PHP_EOL; + $error .= $this->printShortUsage(true); + throw new DeepExitException($error, 3); + } + } else if ((substr($arg, 0, 7) === 'report=' || substr($arg, 0, 7) === 'report-')) { + $reports = []; + + if ($arg[6] === '-') { + // This is a report with file output. + $split = strpos($arg, '='); + if ($split === false) { + $report = substr($arg, 7); + $output = null; + } else { + $report = substr($arg, 7, ($split - 7)); + $output = substr($arg, ($split + 1)); + if ($output === false) { + $output = null; + } else { + $dir = Util\Common::realpath(dirname($output)); + if (is_dir($dir) === false) { + $error = 'ERROR: The specified '.$report.' report file path "'.$output.'" points to a non-existent directory'.PHP_EOL.PHP_EOL; + $error .= $this->printShortUsage(true); + throw new DeepExitException($error, 3); + } + + $output = $dir.'/'.basename($output); + + if (is_dir($output) === true) { + $error = 'ERROR: The specified '.$report.' report file path "'.$output.'" is a directory'.PHP_EOL.PHP_EOL; + $error .= $this->printShortUsage(true); + throw new DeepExitException($error, 3); + } + }//end if + }//end if + + $reports[$report] = $output; + } else { + // This is a single report. + if (isset(self::$overriddenDefaults['reports']) === true) { + break; + } + + $reportNames = explode(',', substr($arg, 7)); + foreach ($reportNames as $report) { + $reports[$report] = null; + } + }//end if + + // Remove the default value so the CLI value overrides it. + if (isset(self::$overriddenDefaults['reports']) === false) { + $this->reports = $reports; + } else { + $this->reports = array_merge($this->reports, $reports); + } + + self::$overriddenDefaults['reports'] = true; + } else if (substr($arg, 0, 7) === 'filter=') { + if (isset(self::$overriddenDefaults['filter']) === true) { + break; + } + + $this->filter = substr($arg, 7); + self::$overriddenDefaults['filter'] = true; + } else if (substr($arg, 0, 9) === 'standard=') { + $standards = trim(substr($arg, 9)); + if ($standards !== '') { + $this->standards = explode(',', $standards); + } + + self::$overriddenDefaults['standards'] = true; + } else if (substr($arg, 0, 11) === 'extensions=') { + if (isset(self::$overriddenDefaults['extensions']) === true) { + break; + } + + $extensions = explode(',', substr($arg, 11)); + $newExtensions = []; + foreach ($extensions as $ext) { + $slash = strpos($ext, '/'); + if ($slash !== false) { + // They specified the tokenizer too. + list($ext, $tokenizer) = explode('/', $ext); + $newExtensions[$ext] = strtoupper($tokenizer); + continue; + } + + if (isset($this->extensions[$ext]) === true) { + $newExtensions[$ext] = $this->extensions[$ext]; + } else { + $newExtensions[$ext] = 'PHP'; + } + } + + $this->extensions = $newExtensions; + self::$overriddenDefaults['extensions'] = true; + } else if (substr($arg, 0, 7) === 'suffix=') { + if (isset(self::$overriddenDefaults['suffix']) === true) { + break; + } + + $this->suffix = substr($arg, 7); + self::$overriddenDefaults['suffix'] = true; + } else if (substr($arg, 0, 9) === 'parallel=') { + if (isset(self::$overriddenDefaults['parallel']) === true) { + break; + } + + $this->parallel = max((int) substr($arg, 9), 1); + self::$overriddenDefaults['parallel'] = true; + } else if (substr($arg, 0, 9) === 'severity=') { + $this->errorSeverity = (int) substr($arg, 9); + $this->warningSeverity = $this->errorSeverity; + if (isset(self::$overriddenDefaults['errorSeverity']) === false) { + self::$overriddenDefaults['errorSeverity'] = true; + } + + if (isset(self::$overriddenDefaults['warningSeverity']) === false) { + self::$overriddenDefaults['warningSeverity'] = true; + } + } else if (substr($arg, 0, 15) === 'error-severity=') { + if (isset(self::$overriddenDefaults['errorSeverity']) === true) { + break; + } + + $this->errorSeverity = (int) substr($arg, 15); + self::$overriddenDefaults['errorSeverity'] = true; + } else if (substr($arg, 0, 17) === 'warning-severity=') { + if (isset(self::$overriddenDefaults['warningSeverity']) === true) { + break; + } + + $this->warningSeverity = (int) substr($arg, 17); + self::$overriddenDefaults['warningSeverity'] = true; + } else if (substr($arg, 0, 7) === 'ignore=') { + if (isset(self::$overriddenDefaults['ignored']) === true) { + break; + } + + // Split the ignore string on commas, unless the comma is escaped + // using 1 or 3 slashes (\, or \\\,). + $patterns = preg_split( + '/(?<=(?ignored = $ignored; + self::$overriddenDefaults['ignored'] = true; + } else if (substr($arg, 0, 10) === 'generator=' + && PHP_CODESNIFFER_CBF === false + ) { + if (isset(self::$overriddenDefaults['generator']) === true) { + break; + } + + $this->generator = substr($arg, 10); + self::$overriddenDefaults['generator'] = true; + } else if (substr($arg, 0, 9) === 'encoding=') { + if (isset(self::$overriddenDefaults['encoding']) === true) { + break; + } + + $this->encoding = strtolower(substr($arg, 9)); + self::$overriddenDefaults['encoding'] = true; + } else if (substr($arg, 0, 10) === 'tab-width=') { + if (isset(self::$overriddenDefaults['tabWidth']) === true) { + break; + } + + $this->tabWidth = (int) substr($arg, 10); + self::$overriddenDefaults['tabWidth'] = true; + } else { + if ($this->dieOnUnknownArg === false) { + $eqPos = strpos($arg, '='); + try { + if ($eqPos === false) { + $this->values[$arg] = $arg; + } else { + $value = substr($arg, ($eqPos + 1)); + $arg = substr($arg, 0, $eqPos); + $this->values[$arg] = $value; + } + } catch (RuntimeException $e) { + // Value is not valid, so just ignore it. + } + } else { + $this->processUnknownArgument('--'.$arg, $pos); + } + }//end if + break; + }//end switch + + }//end processLongArgument() + + + /** + * Processes an unknown command line argument. + * + * Assumes all unknown arguments are files and folders to check. + * + * @param string $arg The command line argument. + * @param int $pos The position of the argument on the command line. + * + * @return void + * @throws \PHP_CodeSniffer\Exceptions\DeepExitException + */ + public function processUnknownArgument($arg, $pos) + { + // We don't know about any additional switches; just files. + if ($arg[0] === '-') { + if ($this->dieOnUnknownArg === false) { + return; + } + + $error = "ERROR: option \"$arg\" not known".PHP_EOL.PHP_EOL; + $error .= $this->printShortUsage(true); + throw new DeepExitException($error, 3); + } + + $this->processFilePath($arg); + + }//end processUnknownArgument() + + + /** + * Processes a file path and add it to the file list. + * + * @param string $path The path to the file to add. + * + * @return void + * @throws \PHP_CodeSniffer\Exceptions\DeepExitException + */ + public function processFilePath($path) + { + // If we are processing STDIN, don't record any files to check. + if ($this->stdin === true) { + return; + } + + $file = Util\Common::realpath($path); + if (file_exists($file) === false) { + if ($this->dieOnUnknownArg === false) { + return; + } + + $error = 'ERROR: The file "'.$path.'" does not exist.'.PHP_EOL.PHP_EOL; + $error .= $this->printShortUsage(true); + throw new DeepExitException($error, 3); + } else { + // Can't modify the files array directly because it's not a real + // class member, so need to use this little get/modify/set trick. + $files = $this->files; + $files[] = $file; + $this->files = $files; + self::$overriddenDefaults['files'] = true; + } + + }//end processFilePath() + + + /** + * Prints out the usage information for this script. + * + * @return void + */ + public function printUsage() + { + echo PHP_EOL; + + if (PHP_CODESNIFFER_CBF === true) { + $this->printPHPCBFUsage(); + } else { + $this->printPHPCSUsage(); + } + + echo PHP_EOL; + + }//end printUsage() + + + /** + * Prints out the short usage information for this script. + * + * @param bool $return If TRUE, the usage string is returned + * instead of output to screen. + * + * @return string|void + */ + public function printShortUsage($return=false) + { + if (PHP_CODESNIFFER_CBF === true) { + $usage = 'Run "phpcbf --help" for usage information'; + } else { + $usage = 'Run "phpcs --help" for usage information'; + } + + $usage .= PHP_EOL.PHP_EOL; + + if ($return === true) { + return $usage; + } + + echo $usage; + + }//end printShortUsage() + + + /** + * Prints out the usage information for PHPCS. + * + * @return void + */ + public function printPHPCSUsage() + { + echo 'Usage: phpcs [-nwlsaepqvi] [-d key[=value]] [--colors] [--no-colors]'.PHP_EOL; + echo ' [--cache[=]] [--no-cache] [--tab-width=]'.PHP_EOL; + echo ' [--report=] [--report-file=] [--report-=]'.PHP_EOL; + echo ' [--report-width=] [--basepath=] [--bootstrap=]'.PHP_EOL; + echo ' [--severity=] [--error-severity=] [--warning-severity=]'.PHP_EOL; + echo ' [--runtime-set key value] [--config-set key value] [--config-delete key] [--config-show]'.PHP_EOL; + echo ' [--standard=] [--sniffs=] [--exclude=]'.PHP_EOL; + echo ' [--encoding=] [--parallel=] [--generator=]'.PHP_EOL; + echo ' [--extensions=] [--ignore=] [--ignore-annotations]'.PHP_EOL; + echo ' [--stdin-path=] [--file-list=] [--filter=] - ...'.PHP_EOL; + echo PHP_EOL; + echo ' - Check STDIN instead of local files and directories'.PHP_EOL; + echo ' -n Do not print warnings (shortcut for --warning-severity=0)'.PHP_EOL; + echo ' -w Print both warnings and errors (this is the default)'.PHP_EOL; + echo ' -l Local directory only, no recursion'.PHP_EOL; + echo ' -s Show sniff codes in all reports'.PHP_EOL; + echo ' -a Run interactively'.PHP_EOL; + echo ' -e Explain a standard by showing the sniffs it includes'.PHP_EOL; + echo ' -p Show progress of the run'.PHP_EOL; + echo ' -q Quiet mode; disables progress and verbose output'.PHP_EOL; + echo ' -m Stop error messages from being recorded'.PHP_EOL; + echo ' (saves a lot of memory, but stops many reports from being used)'.PHP_EOL; + echo ' -v Print processed files'.PHP_EOL; + echo ' -vv Print ruleset and token output'.PHP_EOL; + echo ' -vvv Print sniff processing information'.PHP_EOL; + echo ' -i Show a list of installed coding standards'.PHP_EOL; + echo ' -d Set the [key] php.ini value to [value] or [true] if value is omitted'.PHP_EOL; + echo PHP_EOL; + echo ' --help Print this help message'.PHP_EOL; + echo ' --version Print version information'.PHP_EOL; + echo ' --colors Use colors in output'.PHP_EOL; + echo ' --no-colors Do not use colors in output (this is the default)'.PHP_EOL; + echo ' --cache Cache results between runs'.PHP_EOL; + echo ' --no-cache Do not cache results between runs (this is the default)'.PHP_EOL; + echo ' --ignore-annotations Ignore all phpcs: annotations in code comments'.PHP_EOL; + echo PHP_EOL; + echo ' Use a specific file for caching (uses a temporary file by default)'.PHP_EOL; + echo ' A path to strip from the front of file paths inside reports'.PHP_EOL; + echo ' A comma separated list of files to run before processing begins'.PHP_EOL; + echo ' The encoding of the files being checked (default is utf-8)'.PHP_EOL; + echo ' A comma separated list of file extensions to check'.PHP_EOL; + echo ' The type of the file can be specified using: ext/type'.PHP_EOL; + echo ' e.g., module/php,es/js'.PHP_EOL; + echo ' One or more files and/or directories to check'.PHP_EOL; + echo ' A file containing a list of files and/or directories to check (one per line)'.PHP_EOL; + echo ' Use either the "gitmodified" or "gitstaged" filter,'.PHP_EOL; + echo ' or specify the path to a custom filter class'.PHP_EOL; + echo ' Use either the "HTML", "Markdown" or "Text" generator'.PHP_EOL; + echo ' (forces documentation generation instead of checking)'.PHP_EOL; + echo ' A comma separated list of patterns to ignore files and directories'.PHP_EOL; + echo ' How many files should be checked simultaneously (default is 1)'.PHP_EOL; + echo ' Print either the "full", "xml", "checkstyle", "csv"'.PHP_EOL; + echo ' "json", "junit", "emacs", "source", "summary", "diff"'.PHP_EOL; + echo ' "svnblame", "gitblame", "hgblame" or "notifysend" report,'.PHP_EOL; + echo ' or specify the path to a custom report class'.PHP_EOL; + echo ' (the "full" report is printed by default)'.PHP_EOL; + echo ' Write the report to the specified file path'.PHP_EOL; + echo ' How many columns wide screen reports should be printed'.PHP_EOL; + echo ' or set to "auto" to use current screen width, where supported'.PHP_EOL; + echo ' The minimum severity required to display an error or warning'.PHP_EOL; + echo ' A comma separated list of sniff codes to include or exclude from checking'.PHP_EOL; + echo ' (all sniffs must be part of the specified standard)'.PHP_EOL; + echo ' The name or path of the coding standard to use'.PHP_EOL; + echo ' If processing STDIN, the file path that STDIN will be processed as'.PHP_EOL; + echo ' The number of spaces each tab represents'.PHP_EOL; + + }//end printPHPCSUsage() + + + /** + * Prints out the usage information for PHPCBF. + * + * @return void + */ + public function printPHPCBFUsage() + { + echo 'Usage: phpcbf [-nwli] [-d key[=value]] [--ignore-annotations] [--bootstrap=]'.PHP_EOL; + echo ' [--standard=] [--sniffs=] [--exclude=] [--suffix=]'.PHP_EOL; + echo ' [--severity=] [--error-severity=] [--warning-severity=]'.PHP_EOL; + echo ' [--tab-width=] [--encoding=] [--parallel=]'.PHP_EOL; + echo ' [--basepath=] [--extensions=] [--ignore=]'.PHP_EOL; + echo ' [--stdin-path=] [--file-list=] [--filter=] - ...'.PHP_EOL; + echo PHP_EOL; + echo ' - Fix STDIN instead of local files and directories'.PHP_EOL; + echo ' -n Do not fix warnings (shortcut for --warning-severity=0)'.PHP_EOL; + echo ' -w Fix both warnings and errors (on by default)'.PHP_EOL; + echo ' -l Local directory only, no recursion'.PHP_EOL; + echo ' -p Show progress of the run'.PHP_EOL; + echo ' -q Quiet mode; disables progress and verbose output'.PHP_EOL; + echo ' -v Print processed files'.PHP_EOL; + echo ' -vv Print ruleset and token output'.PHP_EOL; + echo ' -vvv Print sniff processing information'.PHP_EOL; + echo ' -i Show a list of installed coding standards'.PHP_EOL; + echo ' -d Set the [key] php.ini value to [value] or [true] if value is omitted'.PHP_EOL; + echo PHP_EOL; + echo ' --help Print this help message'.PHP_EOL; + echo ' --version Print version information'.PHP_EOL; + echo ' --ignore-annotations Ignore all phpcs: annotations in code comments'.PHP_EOL; + echo PHP_EOL; + echo ' A path to strip from the front of file paths inside reports'.PHP_EOL; + echo ' A comma separated list of files to run before processing begins'.PHP_EOL; + echo ' The encoding of the files being fixed (default is utf-8)'.PHP_EOL; + echo ' A comma separated list of file extensions to fix'.PHP_EOL; + echo ' The type of the file can be specified using: ext/type'.PHP_EOL; + echo ' e.g., module/php,es/js'.PHP_EOL; + echo ' One or more files and/or directories to fix'.PHP_EOL; + echo ' A file containing a list of files and/or directories to fix (one per line)'.PHP_EOL; + echo ' Use either the "gitmodified" or "gitstaged" filter,'.PHP_EOL; + echo ' or specify the path to a custom filter class'.PHP_EOL; + echo ' A comma separated list of patterns to ignore files and directories'.PHP_EOL; + echo ' How many files should be fixed simultaneously (default is 1)'.PHP_EOL; + echo ' The minimum severity required to fix an error or warning'.PHP_EOL; + echo ' A comma separated list of sniff codes to include or exclude from fixing'.PHP_EOL; + echo ' (all sniffs must be part of the specified standard)'.PHP_EOL; + echo ' The name or path of the coding standard to use'.PHP_EOL; + echo ' If processing STDIN, the file path that STDIN will be processed as'.PHP_EOL; + echo ' Write modified files to a filename using this suffix'.PHP_EOL; + echo ' ("diff" and "patch" are not used in this mode)'.PHP_EOL; + echo ' The number of spaces each tab represents'.PHP_EOL; + + }//end printPHPCBFUsage() + + + /** + * Get a single config value. + * + * @param string $key The name of the config value. + * + * @return string|null + * @see setConfigData() + * @see getAllConfigData() + */ + public static function getConfigData($key) + { + $phpCodeSnifferConfig = self::getAllConfigData(); + + if ($phpCodeSnifferConfig === null) { + return null; + } + + if (isset($phpCodeSnifferConfig[$key]) === false) { + return null; + } + + return $phpCodeSnifferConfig[$key]; + + }//end getConfigData() + + + /** + * Get the path to an executable utility. + * + * @param string $name The name of the executable utility. + * + * @return string|null + * @see getConfigData() + */ + public static function getExecutablePath($name) + { + $data = self::getConfigData($name.'_path'); + if ($data !== null) { + return $data; + } + + if ($name === "php") { + // For php, we know the executable path. There's no need to look it up. + return PHP_BINARY; + } + + if (array_key_exists($name, self::$executablePaths) === true) { + return self::$executablePaths[$name]; + } + + if (strtoupper(substr(PHP_OS, 0, 3)) === 'WIN') { + $cmd = 'where '.escapeshellarg($name).' 2> nul'; + } else { + $cmd = 'which '.escapeshellarg($name).' 2> /dev/null'; + } + + $result = exec($cmd, $output, $retVal); + if ($retVal !== 0) { + $result = null; + } + + self::$executablePaths[$name] = $result; + return $result; + + }//end getExecutablePath() + + + /** + * Set a single config value. + * + * @param string $key The name of the config value. + * @param string|null $value The value to set. If null, the config + * entry is deleted, reverting it to the + * default value. + * @param boolean $temp Set this config data temporarily for this + * script run. This will not write the config + * data to the config file. + * + * @return bool + * @see getConfigData() + * @throws \PHP_CodeSniffer\Exceptions\DeepExitException If the config file can not be written. + */ + public static function setConfigData($key, $value, $temp=false) + { + if (isset(self::$overriddenDefaults['runtime-set']) === true + && isset(self::$overriddenDefaults['runtime-set'][$key]) === true + ) { + return false; + } + + if ($temp === false) { + $path = ''; + if (is_callable('\Phar::running') === true) { + $path = \Phar::running(false); + } + + if ($path !== '') { + $configFile = dirname($path).DIRECTORY_SEPARATOR.'CodeSniffer.conf'; + } else { + $configFile = dirname(__DIR__).DIRECTORY_SEPARATOR.'CodeSniffer.conf'; + if (is_file($configFile) === false + && strpos('@data_dir@', '@data_dir') === false + ) { + // If data_dir was replaced, this is a PEAR install and we can + // use the PEAR data dir to store the conf file. + $configFile = '@data_dir@/PHP_CodeSniffer/CodeSniffer.conf'; + } + } + + if (is_file($configFile) === true + && is_writable($configFile) === false + ) { + $error = 'ERROR: Config file '.$configFile.' is not writable'.PHP_EOL.PHP_EOL; + throw new DeepExitException($error, 3); + } + }//end if + + $phpCodeSnifferConfig = self::getAllConfigData(); + + if ($value === null) { + if (isset($phpCodeSnifferConfig[$key]) === true) { + unset($phpCodeSnifferConfig[$key]); + } + } else { + $phpCodeSnifferConfig[$key] = $value; + } + + if ($temp === false) { + $output = '<'.'?php'."\n".' $phpCodeSnifferConfig = '; + $output .= var_export($phpCodeSnifferConfig, true); + $output .= "\n?".'>'; + + if (file_put_contents($configFile, $output) === false) { + $error = 'ERROR: Config file '.$configFile.' could not be written'.PHP_EOL.PHP_EOL; + throw new DeepExitException($error, 3); + } + + self::$configDataFile = $configFile; + } + + self::$configData = $phpCodeSnifferConfig; + + // If the installed paths are being set, make sure all known + // standards paths are added to the autoloader. + if ($key === 'installed_paths') { + $installedStandards = Util\Standards::getInstalledStandardDetails(); + foreach ($installedStandards as $name => $details) { + Autoload::addSearchPath($details['path'], $details['namespace']); + } + } + + return true; + + }//end setConfigData() + + + /** + * Get all config data. + * + * @return array + * @see getConfigData() + * @throws \PHP_CodeSniffer\Exceptions\DeepExitException If the config file could not be read. + */ + public static function getAllConfigData() + { + if (self::$configData !== null) { + return self::$configData; + } + + $path = ''; + if (is_callable('\Phar::running') === true) { + $path = \Phar::running(false); + } + + if ($path !== '') { + $configFile = dirname($path).DIRECTORY_SEPARATOR.'CodeSniffer.conf'; + } else { + $configFile = dirname(__DIR__).DIRECTORY_SEPARATOR.'CodeSniffer.conf'; + if (is_file($configFile) === false + && strpos('@data_dir@', '@data_dir') === false + ) { + $configFile = '@data_dir@/PHP_CodeSniffer/CodeSniffer.conf'; + } + } + + if (is_file($configFile) === false) { + self::$configData = []; + return []; + } + + if (Common::isReadable($configFile) === false) { + $error = 'ERROR: Config file '.$configFile.' is not readable'.PHP_EOL.PHP_EOL; + throw new DeepExitException($error, 3); + } + + include $configFile; + self::$configDataFile = $configFile; + self::$configData = $phpCodeSnifferConfig; + return self::$configData; + + }//end getAllConfigData() + + + /** + * Prints out the gathered config data. + * + * @param array $data The config data to print. + * + * @return void + */ + public function printConfigData($data) + { + $max = 0; + $keys = array_keys($data); + foreach ($keys as $key) { + $len = strlen($key); + if (strlen($key) > $max) { + $max = $len; + } + } + + if ($max === 0) { + return; + } + + $max += 2; + ksort($data); + foreach ($data as $name => $value) { + echo str_pad($name.': ', $max).$value.PHP_EOL; + } + + }//end printConfigData() + + +}//end class diff --git a/vendor/squizlabs/php_codesniffer/src/Exceptions/DeepExitException.php b/vendor/squizlabs/php_codesniffer/src/Exceptions/DeepExitException.php new file mode 100644 index 00000000..b1440944 --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Exceptions/DeepExitException.php @@ -0,0 +1,18 @@ + + * @copyright 2006-2015 Squiz Pty Ltd (ABN 77 084 670 600) + * @license https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence + */ + +namespace PHP_CodeSniffer\Exceptions; + +class DeepExitException extends \Exception +{ + +}//end class diff --git a/vendor/squizlabs/php_codesniffer/src/Exceptions/RuntimeException.php b/vendor/squizlabs/php_codesniffer/src/Exceptions/RuntimeException.php new file mode 100644 index 00000000..093bf13d --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Exceptions/RuntimeException.php @@ -0,0 +1,15 @@ + + * @copyright 2006-2015 Squiz Pty Ltd (ABN 77 084 670 600) + * @license https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence + */ + +namespace PHP_CodeSniffer\Exceptions; + +class RuntimeException extends \RuntimeException +{ + +}//end class diff --git a/vendor/squizlabs/php_codesniffer/src/Exceptions/TokenizerException.php b/vendor/squizlabs/php_codesniffer/src/Exceptions/TokenizerException.php new file mode 100644 index 00000000..ceba00cc --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Exceptions/TokenizerException.php @@ -0,0 +1,15 @@ + + * @copyright 2006-2015 Squiz Pty Ltd (ABN 77 084 670 600) + * @license https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence + */ + +namespace PHP_CodeSniffer\Exceptions; + +class TokenizerException extends \Exception +{ + +}//end class diff --git a/vendor/squizlabs/php_codesniffer/src/Files/DummyFile.php b/vendor/squizlabs/php_codesniffer/src/Files/DummyFile.php new file mode 100644 index 00000000..60143030 --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Files/DummyFile.php @@ -0,0 +1,82 @@ + + * @copyright 2006-2015 Squiz Pty Ltd (ABN 77 084 670 600) + * @license https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence + */ + +namespace PHP_CodeSniffer\Files; + +use PHP_CodeSniffer\Ruleset; +use PHP_CodeSniffer\Config; + +class DummyFile extends File +{ + + + /** + * Creates a DummyFile object and sets the content. + * + * @param string $content The content of the file. + * @param \PHP_CodeSniffer\Ruleset $ruleset The ruleset used for the run. + * @param \PHP_CodeSniffer\Config $config The config data for the run. + * + * @return void + */ + public function __construct($content, Ruleset $ruleset, Config $config) + { + $this->setContent($content); + + // See if a filename was defined in the content. + // This is done by including: phpcs_input_file: [file path] + // as the first line of content. + $path = 'STDIN'; + if ($content !== '') { + if (substr($content, 0, 17) === 'phpcs_input_file:') { + $eolPos = strpos($content, $this->eolChar); + $filename = trim(substr($content, 17, ($eolPos - 17))); + $content = substr($content, ($eolPos + strlen($this->eolChar))); + $path = $filename; + + $this->setContent($content); + } + } + + // The CLI arg overrides anything passed in the content. + if ($config->stdinPath !== null) { + $path = $config->stdinPath; + } + + parent::__construct($path, $ruleset, $config); + + }//end __construct() + + + /** + * Set the error, warning, and fixable counts for the file. + * + * @param int $errorCount The number of errors found. + * @param int $warningCount The number of warnings found. + * @param int $fixableCount The number of fixable errors found. + * @param int $fixedCount The number of errors that were fixed. + * + * @return void + */ + public function setErrorCounts($errorCount, $warningCount, $fixableCount, $fixedCount) + { + $this->errorCount = $errorCount; + $this->warningCount = $warningCount; + $this->fixableCount = $fixableCount; + $this->fixedCount = $fixedCount; + + }//end setErrorCounts() + + +}//end class diff --git a/vendor/squizlabs/php_codesniffer/src/Files/File.php b/vendor/squizlabs/php_codesniffer/src/Files/File.php new file mode 100644 index 00000000..e551dcbb --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Files/File.php @@ -0,0 +1,2799 @@ + + * @copyright 2006-2015 Squiz Pty Ltd (ABN 77 084 670 600) + * @license https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence + */ + +namespace PHP_CodeSniffer\Files; + +use PHP_CodeSniffer\Ruleset; +use PHP_CodeSniffer\Config; +use PHP_CodeSniffer\Fixer; +use PHP_CodeSniffer\Util; +use PHP_CodeSniffer\Exceptions\RuntimeException; +use PHP_CodeSniffer\Exceptions\TokenizerException; + +class File +{ + + /** + * The absolute path to the file associated with this object. + * + * @var string + */ + public $path = ''; + + /** + * The content of the file. + * + * @var string + */ + protected $content = ''; + + /** + * The config data for the run. + * + * @var \PHP_CodeSniffer\Config + */ + public $config = null; + + /** + * The ruleset used for the run. + * + * @var \PHP_CodeSniffer\Ruleset + */ + public $ruleset = null; + + /** + * If TRUE, the entire file is being ignored. + * + * @var boolean + */ + public $ignored = false; + + /** + * The EOL character this file uses. + * + * @var string + */ + public $eolChar = ''; + + /** + * The Fixer object to control fixing errors. + * + * @var \PHP_CodeSniffer\Fixer + */ + public $fixer = null; + + /** + * The tokenizer being used for this file. + * + * @var \PHP_CodeSniffer\Tokenizers\Tokenizer + */ + public $tokenizer = null; + + /** + * The name of the tokenizer being used for this file. + * + * @var string + */ + public $tokenizerType = 'PHP'; + + /** + * Was the file loaded from cache? + * + * If TRUE, the file was loaded from a local cache. + * If FALSE, the file was tokenized and processed fully. + * + * @var boolean + */ + public $fromCache = false; + + /** + * The number of tokens in this file. + * + * Stored here to save calling count() everywhere. + * + * @var integer + */ + public $numTokens = 0; + + /** + * The tokens stack map. + * + * @var array + */ + protected $tokens = []; + + /** + * The errors raised from sniffs. + * + * @var array + * @see getErrors() + */ + protected $errors = []; + + /** + * The warnings raised from sniffs. + * + * @var array + * @see getWarnings() + */ + protected $warnings = []; + + /** + * The metrics recorded by sniffs. + * + * @var array + * @see getMetrics() + */ + protected $metrics = []; + + /** + * The metrics recorded for each token. + * + * Stops the same metric being recorded for the same token twice. + * + * @var array + * @see getMetrics() + */ + private $metricTokens = []; + + /** + * The total number of errors raised. + * + * @var integer + */ + protected $errorCount = 0; + + /** + * The total number of warnings raised. + * + * @var integer + */ + protected $warningCount = 0; + + /** + * The total number of errors and warnings that can be fixed. + * + * @var integer + */ + protected $fixableCount = 0; + + /** + * The total number of errors and warnings that were fixed. + * + * @var integer + */ + protected $fixedCount = 0; + + /** + * TRUE if errors are being replayed from the cache. + * + * @var boolean + */ + protected $replayingErrors = false; + + /** + * An array of sniffs that are being ignored. + * + * @var array + */ + protected $ignoredListeners = []; + + /** + * An array of message codes that are being ignored. + * + * @var array + */ + protected $ignoredCodes = []; + + /** + * An array of sniffs listening to this file's processing. + * + * @var \PHP_CodeSniffer\Sniffs\Sniff[] + */ + protected $listeners = []; + + /** + * The class name of the sniff currently processing the file. + * + * @var string + */ + protected $activeListener = ''; + + /** + * An array of sniffs being processed and how long they took. + * + * @var array + */ + protected $listenerTimes = []; + + /** + * A cache of often used config settings to improve performance. + * + * Storing them here saves 10k+ calls to __get() in the Config class. + * + * @var array + */ + protected $configCache = []; + + + /** + * Constructs a file. + * + * @param string $path The absolute path to the file to process. + * @param \PHP_CodeSniffer\Ruleset $ruleset The ruleset used for the run. + * @param \PHP_CodeSniffer\Config $config The config data for the run. + * + * @return void + */ + public function __construct($path, Ruleset $ruleset, Config $config) + { + $this->path = $path; + $this->ruleset = $ruleset; + $this->config = $config; + $this->fixer = new Fixer(); + + $parts = explode('.', $path); + $extension = array_pop($parts); + if (isset($config->extensions[$extension]) === true) { + $this->tokenizerType = $config->extensions[$extension]; + } else { + // Revert to default. + $this->tokenizerType = 'PHP'; + } + + $this->configCache['cache'] = $this->config->cache; + $this->configCache['sniffs'] = array_map('strtolower', $this->config->sniffs); + $this->configCache['exclude'] = array_map('strtolower', $this->config->exclude); + $this->configCache['errorSeverity'] = $this->config->errorSeverity; + $this->configCache['warningSeverity'] = $this->config->warningSeverity; + $this->configCache['recordErrors'] = $this->config->recordErrors; + $this->configCache['ignorePatterns'] = $this->ruleset->ignorePatterns; + $this->configCache['includePatterns'] = $this->ruleset->includePatterns; + + }//end __construct() + + + /** + * Set the content of the file. + * + * Setting the content also calculates the EOL char being used. + * + * @param string $content The file content. + * + * @return void + */ + public function setContent($content) + { + $this->content = $content; + $this->tokens = []; + + try { + $this->eolChar = Util\Common::detectLineEndings($content); + } catch (RuntimeException $e) { + $this->addWarningOnLine($e->getMessage(), 1, 'Internal.DetectLineEndings'); + return; + } + + }//end setContent() + + + /** + * Reloads the content of the file. + * + * By default, we have no idea where our content comes from, + * so we can't do anything. + * + * @return void + */ + public function reloadContent() + { + + }//end reloadContent() + + + /** + * Disables caching of this file. + * + * @return void + */ + public function disableCaching() + { + $this->configCache['cache'] = false; + + }//end disableCaching() + + + /** + * Starts the stack traversal and tells listeners when tokens are found. + * + * @return void + */ + public function process() + { + if ($this->ignored === true) { + return; + } + + $this->errors = []; + $this->warnings = []; + $this->errorCount = 0; + $this->warningCount = 0; + $this->fixableCount = 0; + + $this->parse(); + + // Check if tokenizer errors cause this file to be ignored. + if ($this->ignored === true) { + return; + } + + $this->fixer->startFile($this); + + if (PHP_CODESNIFFER_VERBOSITY > 2) { + echo "\t*** START TOKEN PROCESSING ***".PHP_EOL; + } + + $foundCode = false; + $listenerIgnoreTo = []; + $inTests = defined('PHP_CODESNIFFER_IN_TESTS'); + $checkAnnotations = $this->config->annotations; + + // Foreach of the listeners that have registered to listen for this + // token, get them to process it. + foreach ($this->tokens as $stackPtr => $token) { + // Check for ignored lines. + if ($checkAnnotations === true + && ($token['code'] === T_COMMENT + || $token['code'] === T_PHPCS_IGNORE_FILE + || $token['code'] === T_PHPCS_SET + || $token['code'] === T_DOC_COMMENT_STRING + || $token['code'] === T_DOC_COMMENT_TAG + || ($inTests === true && $token['code'] === T_INLINE_HTML)) + ) { + $commentText = ltrim($this->tokens[$stackPtr]['content'], " \t/*#"); + $commentTextLower = strtolower($commentText); + if (strpos($commentText, '@codingStandards') !== false) { + if (strpos($commentText, '@codingStandardsIgnoreFile') !== false) { + // Ignoring the whole file, just a little late. + $this->errors = []; + $this->warnings = []; + $this->errorCount = 0; + $this->warningCount = 0; + $this->fixableCount = 0; + return; + } else if (strpos($commentText, '@codingStandardsChangeSetting') !== false) { + $start = strpos($commentText, '@codingStandardsChangeSetting'); + $comment = substr($commentText, ($start + 30)); + $parts = explode(' ', $comment); + if (count($parts) >= 2) { + $sniffParts = explode('.', $parts[0]); + if (count($sniffParts) >= 3) { + // If the sniff code is not known to us, it has not been registered in this run. + // But don't throw an error as it could be there for a different standard to use. + if (isset($this->ruleset->sniffCodes[$parts[0]]) === true) { + $listenerCode = array_shift($parts); + $propertyCode = array_shift($parts); + $propertyValue = rtrim(implode(' ', $parts), " */\r\n"); + $listenerClass = $this->ruleset->sniffCodes[$listenerCode]; + $this->ruleset->setSniffProperty($listenerClass, $propertyCode, $propertyValue); + } + } + } + }//end if + } else if (substr($commentTextLower, 0, 16) === 'phpcs:ignorefile' + || substr($commentTextLower, 0, 17) === '@phpcs:ignorefile' + ) { + // Ignoring the whole file, just a little late. + $this->errors = []; + $this->warnings = []; + $this->errorCount = 0; + $this->warningCount = 0; + $this->fixableCount = 0; + return; + } else if (substr($commentTextLower, 0, 9) === 'phpcs:set' + || substr($commentTextLower, 0, 10) === '@phpcs:set' + ) { + if (isset($token['sniffCode']) === true) { + $listenerCode = $token['sniffCode']; + if (isset($this->ruleset->sniffCodes[$listenerCode]) === true) { + $propertyCode = $token['sniffProperty']; + $propertyValue = $token['sniffPropertyValue']; + $listenerClass = $this->ruleset->sniffCodes[$listenerCode]; + $this->ruleset->setSniffProperty($listenerClass, $propertyCode, $propertyValue); + } + } + }//end if + }//end if + + if (PHP_CODESNIFFER_VERBOSITY > 2) { + $type = $token['type']; + $content = Util\Common::prepareForOutput($token['content']); + echo "\t\tProcess token $stackPtr: $type => $content".PHP_EOL; + } + + if ($token['code'] !== T_INLINE_HTML) { + $foundCode = true; + } + + if (isset($this->ruleset->tokenListeners[$token['code']]) === false) { + continue; + } + + foreach ($this->ruleset->tokenListeners[$token['code']] as $listenerData) { + if (isset($this->ignoredListeners[$listenerData['class']]) === true + || (isset($listenerIgnoreTo[$listenerData['class']]) === true + && $listenerIgnoreTo[$listenerData['class']] > $stackPtr) + ) { + // This sniff is ignoring past this token, or the whole file. + continue; + } + + // Make sure this sniff supports the tokenizer + // we are currently using. + $class = $listenerData['class']; + + if (isset($listenerData['tokenizers'][$this->tokenizerType]) === false) { + continue; + } + + if (trim($this->path, '\'"') !== 'STDIN') { + // If the file path matches one of our ignore patterns, skip it. + // While there is support for a type of each pattern + // (absolute or relative) we don't actually support it here. + foreach ($listenerData['ignore'] as $pattern) { + // We assume a / directory separator, as do the exclude rules + // most developers write, so we need a special case for any system + // that is different. + if (DIRECTORY_SEPARATOR === '\\') { + $pattern = str_replace('/', '\\\\', $pattern); + } + + $pattern = '`'.$pattern.'`i'; + if (preg_match($pattern, $this->path) === 1) { + $this->ignoredListeners[$class] = true; + continue(2); + } + } + + // If the file path does not match one of our include patterns, skip it. + // While there is support for a type of each pattern + // (absolute or relative) we don't actually support it here. + if (empty($listenerData['include']) === false) { + $included = false; + foreach ($listenerData['include'] as $pattern) { + // We assume a / directory separator, as do the exclude rules + // most developers write, so we need a special case for any system + // that is different. + if (DIRECTORY_SEPARATOR === '\\') { + $pattern = str_replace('/', '\\\\', $pattern); + } + + $pattern = '`'.$pattern.'`i'; + if (preg_match($pattern, $this->path) === 1) { + $included = true; + break; + } + } + + if ($included === false) { + $this->ignoredListeners[$class] = true; + continue; + } + }//end if + }//end if + + $this->activeListener = $class; + + if (PHP_CODESNIFFER_VERBOSITY > 2) { + $startTime = microtime(true); + echo "\t\t\tProcessing ".$this->activeListener.'... '; + } + + $ignoreTo = $this->ruleset->sniffs[$class]->process($this, $stackPtr); + if ($ignoreTo !== null) { + $listenerIgnoreTo[$this->activeListener] = $ignoreTo; + } + + if (PHP_CODESNIFFER_VERBOSITY > 2) { + $timeTaken = (microtime(true) - $startTime); + if (isset($this->listenerTimes[$this->activeListener]) === false) { + $this->listenerTimes[$this->activeListener] = 0; + } + + $this->listenerTimes[$this->activeListener] += $timeTaken; + + $timeTaken = round(($timeTaken), 4); + echo "DONE in $timeTaken seconds".PHP_EOL; + } + + $this->activeListener = ''; + }//end foreach + }//end foreach + + // If short open tags are off but the file being checked uses + // short open tags, the whole content will be inline HTML + // and nothing will be checked. So try and handle this case. + // We don't show this error for STDIN because we can't be sure the content + // actually came directly from the user. It could be something like + // refs from a Git pre-push hook. + if ($foundCode === false && $this->tokenizerType === 'PHP' && $this->path !== 'STDIN') { + $shortTags = (bool) ini_get('short_open_tag'); + if ($shortTags === false) { + $error = 'No PHP code was found in this file and short open tags are not allowed by this install of PHP. This file may be using short open tags but PHP does not allow them.'; + $this->addWarning($error, null, 'Internal.NoCodeFound'); + } + } + + if (PHP_CODESNIFFER_VERBOSITY > 2) { + echo "\t*** END TOKEN PROCESSING ***".PHP_EOL; + echo "\t*** START SNIFF PROCESSING REPORT ***".PHP_EOL; + + asort($this->listenerTimes, SORT_NUMERIC); + $this->listenerTimes = array_reverse($this->listenerTimes, true); + foreach ($this->listenerTimes as $listener => $timeTaken) { + echo "\t$listener: ".round(($timeTaken), 4).' secs'.PHP_EOL; + } + + echo "\t*** END SNIFF PROCESSING REPORT ***".PHP_EOL; + } + + $this->fixedCount += $this->fixer->getFixCount(); + + }//end process() + + + /** + * Tokenizes the file and prepares it for the test run. + * + * @return void + */ + public function parse() + { + if (empty($this->tokens) === false) { + // File has already been parsed. + return; + } + + try { + $tokenizerClass = 'PHP_CodeSniffer\Tokenizers\\'.$this->tokenizerType; + $this->tokenizer = new $tokenizerClass($this->content, $this->config, $this->eolChar); + $this->tokens = $this->tokenizer->getTokens(); + } catch (TokenizerException $e) { + $this->ignored = true; + $this->addWarning($e->getMessage(), null, 'Internal.Tokenizer.Exception'); + if (PHP_CODESNIFFER_VERBOSITY > 0) { + echo "[$this->tokenizerType => tokenizer error]... "; + if (PHP_CODESNIFFER_VERBOSITY > 1) { + echo PHP_EOL; + } + } + + return; + } + + $this->numTokens = count($this->tokens); + + // Check for mixed line endings as these can cause tokenizer errors and we + // should let the user know that the results they get may be incorrect. + // This is done by removing all backslashes, removing the newline char we + // detected, then converting newlines chars into text. If any backslashes + // are left at the end, we have additional newline chars in use. + $contents = str_replace('\\', '', $this->content); + $contents = str_replace($this->eolChar, '', $contents); + $contents = str_replace("\n", '\n', $contents); + $contents = str_replace("\r", '\r', $contents); + if (strpos($contents, '\\') !== false) { + $error = 'File has mixed line endings; this may cause incorrect results'; + $this->addWarningOnLine($error, 1, 'Internal.LineEndings.Mixed'); + } + + if (PHP_CODESNIFFER_VERBOSITY > 0) { + if ($this->numTokens === 0) { + $numLines = 0; + } else { + $numLines = $this->tokens[($this->numTokens - 1)]['line']; + } + + echo "[$this->tokenizerType => $this->numTokens tokens in $numLines lines]... "; + if (PHP_CODESNIFFER_VERBOSITY > 1) { + echo PHP_EOL; + } + } + + }//end parse() + + + /** + * Returns the token stack for this file. + * + * @return array + */ + public function getTokens() + { + return $this->tokens; + + }//end getTokens() + + + /** + * Remove vars stored in this file that are no longer required. + * + * @return void + */ + public function cleanUp() + { + $this->listenerTimes = null; + $this->content = null; + $this->tokens = null; + $this->metricTokens = null; + $this->tokenizer = null; + $this->fixer = null; + $this->config = null; + $this->ruleset = null; + + }//end cleanUp() + + + /** + * Records an error against a specific token in the file. + * + * @param string $error The error message. + * @param int $stackPtr The stack position where the error occurred. + * @param string $code A violation code unique to the sniff message. + * @param array $data Replacements for the error message. + * @param int $severity The severity level for this error. A value of 0 + * will be converted into the default severity level. + * @param boolean $fixable Can the error be fixed by the sniff? + * + * @return boolean + */ + public function addError( + $error, + $stackPtr, + $code, + $data=[], + $severity=0, + $fixable=false + ) { + if ($stackPtr === null) { + $line = 1; + $column = 1; + } else { + $line = $this->tokens[$stackPtr]['line']; + $column = $this->tokens[$stackPtr]['column']; + } + + return $this->addMessage(true, $error, $line, $column, $code, $data, $severity, $fixable); + + }//end addError() + + + /** + * Records a warning against a specific token in the file. + * + * @param string $warning The error message. + * @param int $stackPtr The stack position where the error occurred. + * @param string $code A violation code unique to the sniff message. + * @param array $data Replacements for the warning message. + * @param int $severity The severity level for this warning. A value of 0 + * will be converted into the default severity level. + * @param boolean $fixable Can the warning be fixed by the sniff? + * + * @return boolean + */ + public function addWarning( + $warning, + $stackPtr, + $code, + $data=[], + $severity=0, + $fixable=false + ) { + if ($stackPtr === null) { + $line = 1; + $column = 1; + } else { + $line = $this->tokens[$stackPtr]['line']; + $column = $this->tokens[$stackPtr]['column']; + } + + return $this->addMessage(false, $warning, $line, $column, $code, $data, $severity, $fixable); + + }//end addWarning() + + + /** + * Records an error against a specific line in the file. + * + * @param string $error The error message. + * @param int $line The line on which the error occurred. + * @param string $code A violation code unique to the sniff message. + * @param array $data Replacements for the error message. + * @param int $severity The severity level for this error. A value of 0 + * will be converted into the default severity level. + * + * @return boolean + */ + public function addErrorOnLine( + $error, + $line, + $code, + $data=[], + $severity=0 + ) { + return $this->addMessage(true, $error, $line, 1, $code, $data, $severity, false); + + }//end addErrorOnLine() + + + /** + * Records a warning against a specific token in the file. + * + * @param string $warning The error message. + * @param int $line The line on which the warning occurred. + * @param string $code A violation code unique to the sniff message. + * @param array $data Replacements for the warning message. + * @param int $severity The severity level for this warning. A value of 0 will + * will be converted into the default severity level. + * + * @return boolean + */ + public function addWarningOnLine( + $warning, + $line, + $code, + $data=[], + $severity=0 + ) { + return $this->addMessage(false, $warning, $line, 1, $code, $data, $severity, false); + + }//end addWarningOnLine() + + + /** + * Records a fixable error against a specific token in the file. + * + * Returns true if the error was recorded and should be fixed. + * + * @param string $error The error message. + * @param int $stackPtr The stack position where the error occurred. + * @param string $code A violation code unique to the sniff message. + * @param array $data Replacements for the error message. + * @param int $severity The severity level for this error. A value of 0 + * will be converted into the default severity level. + * + * @return boolean + */ + public function addFixableError( + $error, + $stackPtr, + $code, + $data=[], + $severity=0 + ) { + $recorded = $this->addError($error, $stackPtr, $code, $data, $severity, true); + if ($recorded === true && $this->fixer->enabled === true) { + return true; + } + + return false; + + }//end addFixableError() + + + /** + * Records a fixable warning against a specific token in the file. + * + * Returns true if the warning was recorded and should be fixed. + * + * @param string $warning The error message. + * @param int $stackPtr The stack position where the error occurred. + * @param string $code A violation code unique to the sniff message. + * @param array $data Replacements for the warning message. + * @param int $severity The severity level for this warning. A value of 0 + * will be converted into the default severity level. + * + * @return boolean + */ + public function addFixableWarning( + $warning, + $stackPtr, + $code, + $data=[], + $severity=0 + ) { + $recorded = $this->addWarning($warning, $stackPtr, $code, $data, $severity, true); + if ($recorded === true && $this->fixer->enabled === true) { + return true; + } + + return false; + + }//end addFixableWarning() + + + /** + * Adds an error to the error stack. + * + * @param boolean $error Is this an error message? + * @param string $message The text of the message. + * @param int $line The line on which the message occurred. + * @param int $column The column at which the message occurred. + * @param string $code A violation code unique to the sniff message. + * @param array $data Replacements for the message. + * @param int $severity The severity level for this message. A value of 0 + * will be converted into the default severity level. + * @param boolean $fixable Can the problem be fixed by the sniff? + * + * @return boolean + */ + protected function addMessage($error, $message, $line, $column, $code, $data, $severity, $fixable) + { + // Check if this line is ignoring all message codes. + if (isset($this->tokenizer->ignoredLines[$line]['.all']) === true) { + return false; + } + + // Work out which sniff generated the message. + $parts = explode('.', $code); + if ($parts[0] === 'Internal') { + // An internal message. + $listenerCode = Util\Common::getSniffCode($this->activeListener); + $sniffCode = $code; + $checkCodes = [$sniffCode]; + } else { + if ($parts[0] !== $code) { + // The full message code has been passed in. + $sniffCode = $code; + $listenerCode = substr($sniffCode, 0, strrpos($sniffCode, '.')); + } else { + $listenerCode = Util\Common::getSniffCode($this->activeListener); + $sniffCode = $listenerCode.'.'.$code; + $parts = explode('.', $sniffCode); + } + + $checkCodes = [ + $sniffCode, + $parts[0].'.'.$parts[1].'.'.$parts[2], + $parts[0].'.'.$parts[1], + $parts[0], + ]; + }//end if + + if (isset($this->tokenizer->ignoredLines[$line]) === true) { + // Check if this line is ignoring this specific message. + $ignored = false; + foreach ($checkCodes as $checkCode) { + if (isset($this->tokenizer->ignoredLines[$line][$checkCode]) === true) { + $ignored = true; + break; + } + } + + // If it is ignored, make sure it's not whitelisted. + if ($ignored === true + && isset($this->tokenizer->ignoredLines[$line]['.except']) === true + ) { + foreach ($checkCodes as $checkCode) { + if (isset($this->tokenizer->ignoredLines[$line]['.except'][$checkCode]) === true) { + $ignored = false; + break; + } + } + } + + if ($ignored === true) { + return false; + } + }//end if + + $includeAll = true; + if ($this->configCache['cache'] === false + || $this->configCache['recordErrors'] === false + ) { + $includeAll = false; + } + + // Filter out any messages for sniffs that shouldn't have run + // due to the use of the --sniffs command line argument. + if ($includeAll === false + && ((empty($this->configCache['sniffs']) === false + && in_array(strtolower($listenerCode), $this->configCache['sniffs'], true) === false) + || (empty($this->configCache['exclude']) === false + && in_array(strtolower($listenerCode), $this->configCache['exclude'], true) === true)) + ) { + return false; + } + + // If we know this sniff code is being ignored for this file, return early. + foreach ($checkCodes as $checkCode) { + if (isset($this->ignoredCodes[$checkCode]) === true) { + return false; + } + } + + $oppositeType = 'warning'; + if ($error === false) { + $oppositeType = 'error'; + } + + foreach ($checkCodes as $checkCode) { + // Make sure this message type has not been set to the opposite message type. + if (isset($this->ruleset->ruleset[$checkCode]['type']) === true + && $this->ruleset->ruleset[$checkCode]['type'] === $oppositeType + ) { + $error = !$error; + break; + } + } + + if ($error === true) { + $configSeverity = $this->configCache['errorSeverity']; + $messageCount = &$this->errorCount; + $messages = &$this->errors; + } else { + $configSeverity = $this->configCache['warningSeverity']; + $messageCount = &$this->warningCount; + $messages = &$this->warnings; + } + + if ($includeAll === false && $configSeverity === 0) { + // Don't bother doing any processing as these messages are just going to + // be hidden in the reports anyway. + return false; + } + + if ($severity === 0) { + $severity = 5; + } + + foreach ($checkCodes as $checkCode) { + // Make sure we are interested in this severity level. + if (isset($this->ruleset->ruleset[$checkCode]['severity']) === true) { + $severity = $this->ruleset->ruleset[$checkCode]['severity']; + break; + } + } + + if ($includeAll === false && $configSeverity > $severity) { + return false; + } + + // Make sure we are not ignoring this file. + $included = null; + if (trim($this->path, '\'"') === 'STDIN') { + $included = true; + } else { + foreach ($checkCodes as $checkCode) { + $patterns = null; + + if (isset($this->configCache['includePatterns'][$checkCode]) === true) { + $patterns = $this->configCache['includePatterns'][$checkCode]; + $excluding = false; + } else if (isset($this->configCache['ignorePatterns'][$checkCode]) === true) { + $patterns = $this->configCache['ignorePatterns'][$checkCode]; + $excluding = true; + } + + if ($patterns === null) { + continue; + } + + foreach ($patterns as $pattern => $type) { + // While there is support for a type of each pattern + // (absolute or relative) we don't actually support it here. + $replacements = [ + '\\,' => ',', + '*' => '.*', + ]; + + // We assume a / directory separator, as do the exclude rules + // most developers write, so we need a special case for any system + // that is different. + if (DIRECTORY_SEPARATOR === '\\') { + $replacements['/'] = '\\\\'; + } + + $pattern = '`'.strtr($pattern, $replacements).'`i'; + $matched = preg_match($pattern, $this->path); + + if ($matched === 0) { + if ($excluding === false && $included === null) { + // This file path is not being included. + $included = false; + } + + continue; + } + + if ($excluding === true) { + // This file path is being excluded. + $this->ignoredCodes[$checkCode] = true; + return false; + } + + // This file path is being included. + $included = true; + break; + }//end foreach + }//end foreach + }//end if + + if ($included === false) { + // There were include rules set, but this file + // path didn't match any of them. + return false; + } + + $messageCount++; + if ($fixable === true) { + $this->fixableCount++; + } + + if ($this->configCache['recordErrors'] === false + && $includeAll === false + ) { + return true; + } + + // See if there is a custom error message format to use. + // But don't do this if we are replaying errors because replayed + // errors have already used the custom format and have had their + // data replaced. + if ($this->replayingErrors === false + && isset($this->ruleset->ruleset[$sniffCode]['message']) === true + ) { + $message = $this->ruleset->ruleset[$sniffCode]['message']; + } + + if (empty($data) === false) { + $message = vsprintf($message, $data); + } + + if (isset($messages[$line]) === false) { + $messages[$line] = []; + } + + if (isset($messages[$line][$column]) === false) { + $messages[$line][$column] = []; + } + + $messages[$line][$column][] = [ + 'message' => $message, + 'source' => $sniffCode, + 'listener' => $this->activeListener, + 'severity' => $severity, + 'fixable' => $fixable, + ]; + + if (PHP_CODESNIFFER_VERBOSITY > 1 + && $this->fixer->enabled === true + && $fixable === true + ) { + @ob_end_clean(); + echo "\tE: [Line $line] $message ($sniffCode)".PHP_EOL; + ob_start(); + } + + return true; + + }//end addMessage() + + + /** + * Record a metric about the file being examined. + * + * @param int $stackPtr The stack position where the metric was recorded. + * @param string $metric The name of the metric being recorded. + * @param string $value The value of the metric being recorded. + * + * @return boolean + */ + public function recordMetric($stackPtr, $metric, $value) + { + if (isset($this->metrics[$metric]) === false) { + $this->metrics[$metric] = ['values' => [$value => 1]]; + $this->metricTokens[$metric][$stackPtr] = true; + } else if (isset($this->metricTokens[$metric][$stackPtr]) === false) { + $this->metricTokens[$metric][$stackPtr] = true; + if (isset($this->metrics[$metric]['values'][$value]) === false) { + $this->metrics[$metric]['values'][$value] = 1; + } else { + $this->metrics[$metric]['values'][$value]++; + } + } + + return true; + + }//end recordMetric() + + + /** + * Returns the number of errors raised. + * + * @return int + */ + public function getErrorCount() + { + return $this->errorCount; + + }//end getErrorCount() + + + /** + * Returns the number of warnings raised. + * + * @return int + */ + public function getWarningCount() + { + return $this->warningCount; + + }//end getWarningCount() + + + /** + * Returns the number of fixable errors/warnings raised. + * + * @return int + */ + public function getFixableCount() + { + return $this->fixableCount; + + }//end getFixableCount() + + + /** + * Returns the number of fixed errors/warnings. + * + * @return int + */ + public function getFixedCount() + { + return $this->fixedCount; + + }//end getFixedCount() + + + /** + * Returns the list of ignored lines. + * + * @return array + */ + public function getIgnoredLines() + { + return $this->tokenizer->ignoredLines; + + }//end getIgnoredLines() + + + /** + * Returns the errors raised from processing this file. + * + * @return array + */ + public function getErrors() + { + return $this->errors; + + }//end getErrors() + + + /** + * Returns the warnings raised from processing this file. + * + * @return array + */ + public function getWarnings() + { + return $this->warnings; + + }//end getWarnings() + + + /** + * Returns the metrics found while processing this file. + * + * @return array + */ + public function getMetrics() + { + return $this->metrics; + + }//end getMetrics() + + + /** + * Returns the absolute filename of this file. + * + * @return string + */ + public function getFilename() + { + return $this->path; + + }//end getFilename() + + + /** + * Returns the declaration names for classes, interfaces, traits, and functions. + * + * @param int $stackPtr The position of the declaration token which + * declared the class, interface, trait, or function. + * + * @return string|null The name of the class, interface, trait, or function; + * or NULL if the function or class is anonymous. + * @throws \PHP_CodeSniffer\Exceptions\RuntimeException If the specified token is not of type + * T_FUNCTION, T_CLASS, T_ANON_CLASS, + * T_CLOSURE, T_TRAIT, or T_INTERFACE. + */ + public function getDeclarationName($stackPtr) + { + $tokenCode = $this->tokens[$stackPtr]['code']; + + if ($tokenCode === T_ANON_CLASS || $tokenCode === T_CLOSURE) { + return null; + } + + if ($tokenCode !== T_FUNCTION + && $tokenCode !== T_CLASS + && $tokenCode !== T_INTERFACE + && $tokenCode !== T_TRAIT + ) { + throw new RuntimeException('Token type "'.$this->tokens[$stackPtr]['type'].'" is not T_FUNCTION, T_CLASS, T_INTERFACE or T_TRAIT'); + } + + if ($tokenCode === T_FUNCTION + && strtolower($this->tokens[$stackPtr]['content']) !== 'function' + ) { + // This is a function declared without the "function" keyword. + // So this token is the function name. + return $this->tokens[$stackPtr]['content']; + } + + $content = null; + for ($i = $stackPtr; $i < $this->numTokens; $i++) { + if ($this->tokens[$i]['code'] === T_STRING) { + $content = $this->tokens[$i]['content']; + break; + } + } + + return $content; + + }//end getDeclarationName() + + + /** + * Returns the method parameters for the specified function token. + * + * Also supports passing in a USE token for a closure use group. + * + * Each parameter is in the following format: + * + * + * 0 => array( + * 'name' => '$var', // The variable name. + * 'token' => integer, // The stack pointer to the variable name. + * 'content' => string, // The full content of the variable definition. + * 'has_attributes' => boolean, // Does the parameter have one or more attributes attached ? + * 'pass_by_reference' => boolean, // Is the variable passed by reference? + * 'reference_token' => integer, // The stack pointer to the reference operator + * // or FALSE if the param is not passed by reference. + * 'variable_length' => boolean, // Is the param of variable length through use of `...` ? + * 'variadic_token' => integer, // The stack pointer to the ... operator + * // or FALSE if the param is not variable length. + * 'type_hint' => string, // The type hint for the variable. + * 'type_hint_token' => integer, // The stack pointer to the start of the type hint + * // or FALSE if there is no type hint. + * 'type_hint_end_token' => integer, // The stack pointer to the end of the type hint + * // or FALSE if there is no type hint. + * 'nullable_type' => boolean, // TRUE if the type is preceded by the nullability + * // operator. + * 'comma_token' => integer, // The stack pointer to the comma after the param + * // or FALSE if this is the last param. + * ) + * + * + * Parameters with default values have additional array indexes of: + * 'default' => string, // The full content of the default value. + * 'default_token' => integer, // The stack pointer to the start of the default value. + * 'default_equal_token' => integer, // The stack pointer to the equals sign. + * + * Parameters declared using PHP 8 constructor property promotion, have these additional array indexes: + * 'property_visibility' => string, // The property visibility as declared. + * 'visibility_token' => integer, // The stack pointer to the visibility modifier token. + * + * @param int $stackPtr The position in the stack of the function token + * to acquire the parameters for. + * + * @return array + * @throws \PHP_CodeSniffer\Exceptions\RuntimeException If the specified $stackPtr is not of + * type T_FUNCTION, T_CLOSURE, T_USE, + * or T_FN. + */ + public function getMethodParameters($stackPtr) + { + if ($this->tokens[$stackPtr]['code'] !== T_FUNCTION + && $this->tokens[$stackPtr]['code'] !== T_CLOSURE + && $this->tokens[$stackPtr]['code'] !== T_USE + && $this->tokens[$stackPtr]['code'] !== T_FN + ) { + throw new RuntimeException('$stackPtr must be of type T_FUNCTION or T_CLOSURE or T_USE or T_FN'); + } + + if ($this->tokens[$stackPtr]['code'] === T_USE) { + $opener = $this->findNext(T_OPEN_PARENTHESIS, ($stackPtr + 1)); + if ($opener === false || isset($this->tokens[$opener]['parenthesis_owner']) === true) { + throw new RuntimeException('$stackPtr was not a valid T_USE'); + } + } else { + if (isset($this->tokens[$stackPtr]['parenthesis_opener']) === false) { + // Live coding or syntax error, so no params to find. + return []; + } + + $opener = $this->tokens[$stackPtr]['parenthesis_opener']; + } + + if (isset($this->tokens[$opener]['parenthesis_closer']) === false) { + // Live coding or syntax error, so no params to find. + return []; + } + + $closer = $this->tokens[$opener]['parenthesis_closer']; + + $vars = []; + $currVar = null; + $paramStart = ($opener + 1); + $defaultStart = null; + $equalToken = null; + $paramCount = 0; + $hasAttributes = false; + $passByReference = false; + $referenceToken = false; + $variableLength = false; + $variadicToken = false; + $typeHint = ''; + $typeHintToken = false; + $typeHintEndToken = false; + $nullableType = false; + $visibilityToken = null; + + for ($i = $paramStart; $i <= $closer; $i++) { + // Check to see if this token has a parenthesis or bracket opener. If it does + // it's likely to be an array which might have arguments in it. This + // could cause problems in our parsing below, so lets just skip to the + // end of it. + if (isset($this->tokens[$i]['parenthesis_opener']) === true) { + // Don't do this if it's the close parenthesis for the method. + if ($i !== $this->tokens[$i]['parenthesis_closer']) { + $i = $this->tokens[$i]['parenthesis_closer']; + continue; + } + } + + if (isset($this->tokens[$i]['bracket_opener']) === true) { + if ($i !== $this->tokens[$i]['bracket_closer']) { + $i = $this->tokens[$i]['bracket_closer']; + continue; + } + } + + switch ($this->tokens[$i]['code']) { + case T_ATTRIBUTE: + $hasAttributes = true; + + // Skip to the end of the attribute. + $i = $this->tokens[$i]['attribute_closer']; + break; + case T_BITWISE_AND: + if ($defaultStart === null) { + $passByReference = true; + $referenceToken = $i; + } + break; + case T_VARIABLE: + $currVar = $i; + break; + case T_ELLIPSIS: + $variableLength = true; + $variadicToken = $i; + break; + case T_CALLABLE: + if ($typeHintToken === false) { + $typeHintToken = $i; + } + + $typeHint .= $this->tokens[$i]['content']; + $typeHintEndToken = $i; + break; + case T_SELF: + case T_PARENT: + case T_STATIC: + // Self and parent are valid, static invalid, but was probably intended as type hint. + if (isset($defaultStart) === false) { + if ($typeHintToken === false) { + $typeHintToken = $i; + } + + $typeHint .= $this->tokens[$i]['content']; + $typeHintEndToken = $i; + } + break; + case T_STRING: + // This is a string, so it may be a type hint, but it could + // also be a constant used as a default value. + $prevComma = false; + for ($t = $i; $t >= $opener; $t--) { + if ($this->tokens[$t]['code'] === T_COMMA) { + $prevComma = $t; + break; + } + } + + if ($prevComma !== false) { + $nextEquals = false; + for ($t = $prevComma; $t < $i; $t++) { + if ($this->tokens[$t]['code'] === T_EQUAL) { + $nextEquals = $t; + break; + } + } + + if ($nextEquals !== false) { + break; + } + } + + if ($defaultStart === null) { + if ($typeHintToken === false) { + $typeHintToken = $i; + } + + $typeHint .= $this->tokens[$i]['content']; + $typeHintEndToken = $i; + } + break; + case T_NAMESPACE: + case T_NS_SEPARATOR: + case T_TYPE_UNION: + case T_FALSE: + case T_NULL: + // Part of a type hint or default value. + if ($defaultStart === null) { + if ($typeHintToken === false) { + $typeHintToken = $i; + } + + $typeHint .= $this->tokens[$i]['content']; + $typeHintEndToken = $i; + } + break; + case T_NULLABLE: + if ($defaultStart === null) { + $nullableType = true; + $typeHint .= $this->tokens[$i]['content']; + $typeHintEndToken = $i; + } + break; + case T_PUBLIC: + case T_PROTECTED: + case T_PRIVATE: + if ($defaultStart === null) { + $visibilityToken = $i; + } + break; + case T_CLOSE_PARENTHESIS: + case T_COMMA: + // If it's null, then there must be no parameters for this + // method. + if ($currVar === null) { + continue 2; + } + + $vars[$paramCount] = []; + $vars[$paramCount]['token'] = $currVar; + $vars[$paramCount]['name'] = $this->tokens[$currVar]['content']; + $vars[$paramCount]['content'] = trim($this->getTokensAsString($paramStart, ($i - $paramStart))); + + if ($defaultStart !== null) { + $vars[$paramCount]['default'] = trim($this->getTokensAsString($defaultStart, ($i - $defaultStart))); + $vars[$paramCount]['default_token'] = $defaultStart; + $vars[$paramCount]['default_equal_token'] = $equalToken; + } + + $vars[$paramCount]['has_attributes'] = $hasAttributes; + $vars[$paramCount]['pass_by_reference'] = $passByReference; + $vars[$paramCount]['reference_token'] = $referenceToken; + $vars[$paramCount]['variable_length'] = $variableLength; + $vars[$paramCount]['variadic_token'] = $variadicToken; + $vars[$paramCount]['type_hint'] = $typeHint; + $vars[$paramCount]['type_hint_token'] = $typeHintToken; + $vars[$paramCount]['type_hint_end_token'] = $typeHintEndToken; + $vars[$paramCount]['nullable_type'] = $nullableType; + + if ($visibilityToken !== null) { + $vars[$paramCount]['property_visibility'] = $this->tokens[$visibilityToken]['content']; + $vars[$paramCount]['visibility_token'] = $visibilityToken; + } + + if ($this->tokens[$i]['code'] === T_COMMA) { + $vars[$paramCount]['comma_token'] = $i; + } else { + $vars[$paramCount]['comma_token'] = false; + } + + // Reset the vars, as we are about to process the next parameter. + $currVar = null; + $paramStart = ($i + 1); + $defaultStart = null; + $equalToken = null; + $hasAttributes = false; + $passByReference = false; + $referenceToken = false; + $variableLength = false; + $variadicToken = false; + $typeHint = ''; + $typeHintToken = false; + $typeHintEndToken = false; + $nullableType = false; + $visibilityToken = null; + + $paramCount++; + break; + case T_EQUAL: + $defaultStart = $this->findNext(Util\Tokens::$emptyTokens, ($i + 1), null, true); + $equalToken = $i; + break; + }//end switch + }//end for + + return $vars; + + }//end getMethodParameters() + + + /** + * Returns the visibility and implementation properties of a method. + * + * The format of the return value is: + * + * array( + * 'scope' => 'public', // Public, private, or protected + * 'scope_specified' => true, // TRUE if the scope keyword was found. + * 'return_type' => '', // The return type of the method. + * 'return_type_token' => integer, // The stack pointer to the start of the return type + * // or FALSE if there is no return type. + * 'return_type_end_token' => integer, // The stack pointer to the end of the return type + * // or FALSE if there is no return type. + * 'nullable_return_type' => false, // TRUE if the return type is preceded by the + * // nullability operator. + * 'is_abstract' => false, // TRUE if the abstract keyword was found. + * 'is_final' => false, // TRUE if the final keyword was found. + * 'is_static' => false, // TRUE if the static keyword was found. + * 'has_body' => false, // TRUE if the method has a body + * ); + * + * + * @param int $stackPtr The position in the stack of the function token to + * acquire the properties for. + * + * @return array + * @throws \PHP_CodeSniffer\Exceptions\RuntimeException If the specified position is not a + * T_FUNCTION, T_CLOSURE, or T_FN token. + */ + public function getMethodProperties($stackPtr) + { + if ($this->tokens[$stackPtr]['code'] !== T_FUNCTION + && $this->tokens[$stackPtr]['code'] !== T_CLOSURE + && $this->tokens[$stackPtr]['code'] !== T_FN + ) { + throw new RuntimeException('$stackPtr must be of type T_FUNCTION or T_CLOSURE or T_FN'); + } + + if ($this->tokens[$stackPtr]['code'] === T_FUNCTION) { + $valid = [ + T_PUBLIC => T_PUBLIC, + T_PRIVATE => T_PRIVATE, + T_PROTECTED => T_PROTECTED, + T_STATIC => T_STATIC, + T_FINAL => T_FINAL, + T_ABSTRACT => T_ABSTRACT, + T_WHITESPACE => T_WHITESPACE, + T_COMMENT => T_COMMENT, + T_DOC_COMMENT => T_DOC_COMMENT, + ]; + } else { + $valid = [ + T_STATIC => T_STATIC, + T_WHITESPACE => T_WHITESPACE, + T_COMMENT => T_COMMENT, + T_DOC_COMMENT => T_DOC_COMMENT, + ]; + } + + $scope = 'public'; + $scopeSpecified = false; + $isAbstract = false; + $isFinal = false; + $isStatic = false; + + for ($i = ($stackPtr - 1); $i > 0; $i--) { + if (isset($valid[$this->tokens[$i]['code']]) === false) { + break; + } + + switch ($this->tokens[$i]['code']) { + case T_PUBLIC: + $scope = 'public'; + $scopeSpecified = true; + break; + case T_PRIVATE: + $scope = 'private'; + $scopeSpecified = true; + break; + case T_PROTECTED: + $scope = 'protected'; + $scopeSpecified = true; + break; + case T_ABSTRACT: + $isAbstract = true; + break; + case T_FINAL: + $isFinal = true; + break; + case T_STATIC: + $isStatic = true; + break; + }//end switch + }//end for + + $returnType = ''; + $returnTypeToken = false; + $returnTypeEndToken = false; + $nullableReturnType = false; + $hasBody = true; + + if (isset($this->tokens[$stackPtr]['parenthesis_closer']) === true) { + $scopeOpener = null; + if (isset($this->tokens[$stackPtr]['scope_opener']) === true) { + $scopeOpener = $this->tokens[$stackPtr]['scope_opener']; + } + + $valid = [ + T_STRING => T_STRING, + T_CALLABLE => T_CALLABLE, + T_SELF => T_SELF, + T_PARENT => T_PARENT, + T_STATIC => T_STATIC, + T_FALSE => T_FALSE, + T_NULL => T_NULL, + T_NAMESPACE => T_NAMESPACE, + T_NS_SEPARATOR => T_NS_SEPARATOR, + T_TYPE_UNION => T_TYPE_UNION, + ]; + + for ($i = $this->tokens[$stackPtr]['parenthesis_closer']; $i < $this->numTokens; $i++) { + if (($scopeOpener === null && $this->tokens[$i]['code'] === T_SEMICOLON) + || ($scopeOpener !== null && $i === $scopeOpener) + ) { + // End of function definition. + break; + } + + if ($this->tokens[$i]['code'] === T_NULLABLE) { + $nullableReturnType = true; + } + + if (isset($valid[$this->tokens[$i]['code']]) === true) { + if ($returnTypeToken === false) { + $returnTypeToken = $i; + } + + $returnType .= $this->tokens[$i]['content']; + $returnTypeEndToken = $i; + } + }//end for + + if ($this->tokens[$stackPtr]['code'] === T_FN) { + $bodyToken = T_FN_ARROW; + } else { + $bodyToken = T_OPEN_CURLY_BRACKET; + } + + $end = $this->findNext([$bodyToken, T_SEMICOLON], $this->tokens[$stackPtr]['parenthesis_closer']); + $hasBody = $this->tokens[$end]['code'] === $bodyToken; + }//end if + + if ($returnType !== '' && $nullableReturnType === true) { + $returnType = '?'.$returnType; + } + + return [ + 'scope' => $scope, + 'scope_specified' => $scopeSpecified, + 'return_type' => $returnType, + 'return_type_token' => $returnTypeToken, + 'return_type_end_token' => $returnTypeEndToken, + 'nullable_return_type' => $nullableReturnType, + 'is_abstract' => $isAbstract, + 'is_final' => $isFinal, + 'is_static' => $isStatic, + 'has_body' => $hasBody, + ]; + + }//end getMethodProperties() + + + /** + * Returns the visibility and implementation properties of a class member var. + * + * The format of the return value is: + * + * + * array( + * 'scope' => string, // Public, private, or protected. + * 'scope_specified' => boolean, // TRUE if the scope was explicitly specified. + * 'is_static' => boolean, // TRUE if the static keyword was found. + * 'type' => string, // The type of the var (empty if no type specified). + * 'type_token' => integer, // The stack pointer to the start of the type + * // or FALSE if there is no type. + * 'type_end_token' => integer, // The stack pointer to the end of the type + * // or FALSE if there is no type. + * 'nullable_type' => boolean, // TRUE if the type is preceded by the nullability + * // operator. + * ); + * + * + * @param int $stackPtr The position in the stack of the T_VARIABLE token to + * acquire the properties for. + * + * @return array + * @throws \PHP_CodeSniffer\Exceptions\RuntimeException If the specified position is not a + * T_VARIABLE token, or if the position is not + * a class member variable. + */ + public function getMemberProperties($stackPtr) + { + if ($this->tokens[$stackPtr]['code'] !== T_VARIABLE) { + throw new RuntimeException('$stackPtr must be of type T_VARIABLE'); + } + + $conditions = array_keys($this->tokens[$stackPtr]['conditions']); + $ptr = array_pop($conditions); + if (isset($this->tokens[$ptr]) === false + || ($this->tokens[$ptr]['code'] !== T_CLASS + && $this->tokens[$ptr]['code'] !== T_ANON_CLASS + && $this->tokens[$ptr]['code'] !== T_TRAIT) + ) { + if (isset($this->tokens[$ptr]) === true + && $this->tokens[$ptr]['code'] === T_INTERFACE + ) { + // T_VARIABLEs in interfaces can actually be method arguments + // but they wont be seen as being inside the method because there + // are no scope openers and closers for abstract methods. If it is in + // parentheses, we can be pretty sure it is a method argument. + if (isset($this->tokens[$stackPtr]['nested_parenthesis']) === false + || empty($this->tokens[$stackPtr]['nested_parenthesis']) === true + ) { + $error = 'Possible parse error: interfaces may not include member vars'; + $this->addWarning($error, $stackPtr, 'Internal.ParseError.InterfaceHasMemberVar'); + return []; + } + } else { + throw new RuntimeException('$stackPtr is not a class member var'); + } + } + + // Make sure it's not a method parameter. + if (empty($this->tokens[$stackPtr]['nested_parenthesis']) === false) { + $parenthesis = array_keys($this->tokens[$stackPtr]['nested_parenthesis']); + $deepestOpen = array_pop($parenthesis); + if ($deepestOpen > $ptr + && isset($this->tokens[$deepestOpen]['parenthesis_owner']) === true + && $this->tokens[$this->tokens[$deepestOpen]['parenthesis_owner']]['code'] === T_FUNCTION + ) { + throw new RuntimeException('$stackPtr is not a class member var'); + } + } + + $valid = [ + T_PUBLIC => T_PUBLIC, + T_PRIVATE => T_PRIVATE, + T_PROTECTED => T_PROTECTED, + T_STATIC => T_STATIC, + T_VAR => T_VAR, + ]; + + $valid += Util\Tokens::$emptyTokens; + + $scope = 'public'; + $scopeSpecified = false; + $isStatic = false; + + $startOfStatement = $this->findPrevious( + [ + T_SEMICOLON, + T_OPEN_CURLY_BRACKET, + T_CLOSE_CURLY_BRACKET, + T_ATTRIBUTE_END, + ], + ($stackPtr - 1) + ); + + for ($i = ($startOfStatement + 1); $i < $stackPtr; $i++) { + if (isset($valid[$this->tokens[$i]['code']]) === false) { + break; + } + + switch ($this->tokens[$i]['code']) { + case T_PUBLIC: + $scope = 'public'; + $scopeSpecified = true; + break; + case T_PRIVATE: + $scope = 'private'; + $scopeSpecified = true; + break; + case T_PROTECTED: + $scope = 'protected'; + $scopeSpecified = true; + break; + case T_STATIC: + $isStatic = true; + break; + } + }//end for + + $type = ''; + $typeToken = false; + $typeEndToken = false; + $nullableType = false; + + if ($i < $stackPtr) { + // We've found a type. + $valid = [ + T_STRING => T_STRING, + T_CALLABLE => T_CALLABLE, + T_SELF => T_SELF, + T_PARENT => T_PARENT, + T_FALSE => T_FALSE, + T_NULL => T_NULL, + T_NAMESPACE => T_NAMESPACE, + T_NS_SEPARATOR => T_NS_SEPARATOR, + T_TYPE_UNION => T_TYPE_UNION, + ]; + + for ($i; $i < $stackPtr; $i++) { + if ($this->tokens[$i]['code'] === T_VARIABLE) { + // Hit another variable in a group definition. + break; + } + + if ($this->tokens[$i]['code'] === T_NULLABLE) { + $nullableType = true; + } + + if (isset($valid[$this->tokens[$i]['code']]) === true) { + $typeEndToken = $i; + if ($typeToken === false) { + $typeToken = $i; + } + + $type .= $this->tokens[$i]['content']; + } + } + + if ($type !== '' && $nullableType === true) { + $type = '?'.$type; + } + }//end if + + return [ + 'scope' => $scope, + 'scope_specified' => $scopeSpecified, + 'is_static' => $isStatic, + 'type' => $type, + 'type_token' => $typeToken, + 'type_end_token' => $typeEndToken, + 'nullable_type' => $nullableType, + ]; + + }//end getMemberProperties() + + + /** + * Returns the visibility and implementation properties of a class. + * + * The format of the return value is: + * + * array( + * 'is_abstract' => false, // true if the abstract keyword was found. + * 'is_final' => false, // true if the final keyword was found. + * ); + * + * + * @param int $stackPtr The position in the stack of the T_CLASS token to + * acquire the properties for. + * + * @return array + * @throws \PHP_CodeSniffer\Exceptions\RuntimeException If the specified position is not a + * T_CLASS token. + */ + public function getClassProperties($stackPtr) + { + if ($this->tokens[$stackPtr]['code'] !== T_CLASS) { + throw new RuntimeException('$stackPtr must be of type T_CLASS'); + } + + $valid = [ + T_FINAL => T_FINAL, + T_ABSTRACT => T_ABSTRACT, + T_WHITESPACE => T_WHITESPACE, + T_COMMENT => T_COMMENT, + T_DOC_COMMENT => T_DOC_COMMENT, + ]; + + $isAbstract = false; + $isFinal = false; + + for ($i = ($stackPtr - 1); $i > 0; $i--) { + if (isset($valid[$this->tokens[$i]['code']]) === false) { + break; + } + + switch ($this->tokens[$i]['code']) { + case T_ABSTRACT: + $isAbstract = true; + break; + + case T_FINAL: + $isFinal = true; + break; + } + }//end for + + return [ + 'is_abstract' => $isAbstract, + 'is_final' => $isFinal, + ]; + + }//end getClassProperties() + + + /** + * Determine if the passed token is a reference operator. + * + * Returns true if the specified token position represents a reference. + * Returns false if the token represents a bitwise operator. + * + * @param int $stackPtr The position of the T_BITWISE_AND token. + * + * @return boolean + */ + public function isReference($stackPtr) + { + if ($this->tokens[$stackPtr]['code'] !== T_BITWISE_AND) { + return false; + } + + $tokenBefore = $this->findPrevious( + Util\Tokens::$emptyTokens, + ($stackPtr - 1), + null, + true + ); + + if ($this->tokens[$tokenBefore]['code'] === T_FUNCTION + || $this->tokens[$tokenBefore]['code'] === T_CLOSURE + || $this->tokens[$tokenBefore]['code'] === T_FN + ) { + // Function returns a reference. + return true; + } + + if ($this->tokens[$tokenBefore]['code'] === T_DOUBLE_ARROW) { + // Inside a foreach loop or array assignment, this is a reference. + return true; + } + + if ($this->tokens[$tokenBefore]['code'] === T_AS) { + // Inside a foreach loop, this is a reference. + return true; + } + + if (isset(Util\Tokens::$assignmentTokens[$this->tokens[$tokenBefore]['code']]) === true) { + // This is directly after an assignment. It's a reference. Even if + // it is part of an operation, the other tests will handle it. + return true; + } + + $tokenAfter = $this->findNext( + Util\Tokens::$emptyTokens, + ($stackPtr + 1), + null, + true + ); + + if ($this->tokens[$tokenAfter]['code'] === T_NEW) { + return true; + } + + if (isset($this->tokens[$stackPtr]['nested_parenthesis']) === true) { + $brackets = $this->tokens[$stackPtr]['nested_parenthesis']; + $lastBracket = array_pop($brackets); + if (isset($this->tokens[$lastBracket]['parenthesis_owner']) === true) { + $owner = $this->tokens[$this->tokens[$lastBracket]['parenthesis_owner']]; + if ($owner['code'] === T_FUNCTION + || $owner['code'] === T_CLOSURE + || $owner['code'] === T_FN + ) { + $params = $this->getMethodParameters($this->tokens[$lastBracket]['parenthesis_owner']); + foreach ($params as $param) { + if ($param['reference_token'] === $stackPtr) { + // Function parameter declared to be passed by reference. + return true; + } + } + }//end if + } else { + $prev = false; + for ($t = ($this->tokens[$lastBracket]['parenthesis_opener'] - 1); $t >= 0; $t--) { + if ($this->tokens[$t]['code'] !== T_WHITESPACE) { + $prev = $t; + break; + } + } + + if ($prev !== false && $this->tokens[$prev]['code'] === T_USE) { + // Closure use by reference. + return true; + } + }//end if + }//end if + + // Pass by reference in function calls and assign by reference in arrays. + if ($this->tokens[$tokenBefore]['code'] === T_OPEN_PARENTHESIS + || $this->tokens[$tokenBefore]['code'] === T_COMMA + || $this->tokens[$tokenBefore]['code'] === T_OPEN_SHORT_ARRAY + ) { + if ($this->tokens[$tokenAfter]['code'] === T_VARIABLE) { + return true; + } else { + $skip = Util\Tokens::$emptyTokens; + $skip[] = T_NS_SEPARATOR; + $skip[] = T_SELF; + $skip[] = T_PARENT; + $skip[] = T_STATIC; + $skip[] = T_STRING; + $skip[] = T_NAMESPACE; + $skip[] = T_DOUBLE_COLON; + + $nextSignificantAfter = $this->findNext( + $skip, + ($stackPtr + 1), + null, + true + ); + if ($this->tokens[$nextSignificantAfter]['code'] === T_VARIABLE) { + return true; + } + }//end if + }//end if + + return false; + + }//end isReference() + + + /** + * Returns the content of the tokens from the specified start position in + * the token stack for the specified length. + * + * @param int $start The position to start from in the token stack. + * @param int $length The length of tokens to traverse from the start pos. + * @param bool $origContent Whether the original content or the tab replaced + * content should be used. + * + * @return string The token contents. + * @throws \PHP_CodeSniffer\Exceptions\RuntimeException If the specified position does not exist. + */ + public function getTokensAsString($start, $length, $origContent=false) + { + if (is_int($start) === false || isset($this->tokens[$start]) === false) { + throw new RuntimeException('The $start position for getTokensAsString() must exist in the token stack'); + } + + if (is_int($length) === false || $length <= 0) { + return ''; + } + + $str = ''; + $end = ($start + $length); + if ($end > $this->numTokens) { + $end = $this->numTokens; + } + + for ($i = $start; $i < $end; $i++) { + // If tabs are being converted to spaces by the tokeniser, the + // original content should be used instead of the converted content. + if ($origContent === true && isset($this->tokens[$i]['orig_content']) === true) { + $str .= $this->tokens[$i]['orig_content']; + } else { + $str .= $this->tokens[$i]['content']; + } + } + + return $str; + + }//end getTokensAsString() + + + /** + * Returns the position of the previous specified token(s). + * + * If a value is specified, the previous token of the specified type(s) + * containing the specified value will be returned. + * + * Returns false if no token can be found. + * + * @param int|string|array $types The type(s) of tokens to search for. + * @param int $start The position to start searching from in the + * token stack. + * @param int|null $end The end position to fail if no token is found. + * if not specified or null, end will default to + * the start of the token stack. + * @param bool $exclude If true, find the previous token that is NOT of + * the types specified in $types. + * @param string|null $value The value that the token(s) must be equal to. + * If value is omitted, tokens with any value will + * be returned. + * @param bool $local If true, tokens outside the current statement + * will not be checked. IE. checking will stop + * at the previous semi-colon found. + * + * @return int|false + * @see findNext() + */ + public function findPrevious( + $types, + $start, + $end=null, + $exclude=false, + $value=null, + $local=false + ) { + $types = (array) $types; + + if ($end === null) { + $end = 0; + } + + for ($i = $start; $i >= $end; $i--) { + $found = (bool) $exclude; + foreach ($types as $type) { + if ($this->tokens[$i]['code'] === $type) { + $found = !$exclude; + break; + } + } + + if ($found === true) { + if ($value === null) { + return $i; + } else if ($this->tokens[$i]['content'] === $value) { + return $i; + } + } + + if ($local === true) { + if (isset($this->tokens[$i]['scope_opener']) === true + && $i === $this->tokens[$i]['scope_closer'] + ) { + $i = $this->tokens[$i]['scope_opener']; + } else if (isset($this->tokens[$i]['bracket_opener']) === true + && $i === $this->tokens[$i]['bracket_closer'] + ) { + $i = $this->tokens[$i]['bracket_opener']; + } else if (isset($this->tokens[$i]['parenthesis_opener']) === true + && $i === $this->tokens[$i]['parenthesis_closer'] + ) { + $i = $this->tokens[$i]['parenthesis_opener']; + } else if ($this->tokens[$i]['code'] === T_SEMICOLON) { + break; + } + } + }//end for + + return false; + + }//end findPrevious() + + + /** + * Returns the position of the next specified token(s). + * + * If a value is specified, the next token of the specified type(s) + * containing the specified value will be returned. + * + * Returns false if no token can be found. + * + * @param int|string|array $types The type(s) of tokens to search for. + * @param int $start The position to start searching from in the + * token stack. + * @param int|null $end The end position to fail if no token is found. + * if not specified or null, end will default to + * the end of the token stack. + * @param bool $exclude If true, find the next token that is NOT of + * a type specified in $types. + * @param string|null $value The value that the token(s) must be equal to. + * If value is omitted, tokens with any value will + * be returned. + * @param bool $local If true, tokens outside the current statement + * will not be checked. i.e., checking will stop + * at the next semi-colon found. + * + * @return int|false + * @see findPrevious() + */ + public function findNext( + $types, + $start, + $end=null, + $exclude=false, + $value=null, + $local=false + ) { + $types = (array) $types; + + if ($end === null || $end > $this->numTokens) { + $end = $this->numTokens; + } + + for ($i = $start; $i < $end; $i++) { + $found = (bool) $exclude; + foreach ($types as $type) { + if ($this->tokens[$i]['code'] === $type) { + $found = !$exclude; + break; + } + } + + if ($found === true) { + if ($value === null) { + return $i; + } else if ($this->tokens[$i]['content'] === $value) { + return $i; + } + } + + if ($local === true && $this->tokens[$i]['code'] === T_SEMICOLON) { + break; + } + }//end for + + return false; + + }//end findNext() + + + /** + * Returns the position of the first non-whitespace token in a statement. + * + * @param int $start The position to start searching from in the token stack. + * @param int|string|array $ignore Token types that should not be considered stop points. + * + * @return int + */ + public function findStartOfStatement($start, $ignore=null) + { + $startTokens = Util\Tokens::$blockOpeners; + $startTokens[T_OPEN_SHORT_ARRAY] = true; + $startTokens[T_OPEN_TAG] = true; + $startTokens[T_OPEN_TAG_WITH_ECHO] = true; + + $endTokens = [ + T_CLOSE_TAG => true, + T_COLON => true, + T_COMMA => true, + T_DOUBLE_ARROW => true, + T_MATCH_ARROW => true, + T_SEMICOLON => true, + ]; + + if ($ignore !== null) { + $ignore = (array) $ignore; + foreach ($ignore as $code) { + if (isset($startTokens[$code]) === true) { + unset($startTokens[$code]); + } + + if (isset($endTokens[$code]) === true) { + unset($endTokens[$code]); + } + } + } + + // If the start token is inside the case part of a match expression, + // find the start of the condition. If it's in the statement part, find + // the token that comes after the match arrow. + $matchExpression = $this->getCondition($start, T_MATCH); + if ($matchExpression !== false) { + for ($prevMatch = $start; $prevMatch > $this->tokens[$matchExpression]['scope_opener']; $prevMatch--) { + if ($prevMatch !== $start + && ($this->tokens[$prevMatch]['code'] === T_MATCH_ARROW + || $this->tokens[$prevMatch]['code'] === T_COMMA) + ) { + break; + } + + // Skip nested statements. + if (isset($this->tokens[$prevMatch]['bracket_opener']) === true + && $prevMatch === $this->tokens[$prevMatch]['bracket_closer'] + ) { + $prevMatch = $this->tokens[$prevMatch]['bracket_opener']; + } else if (isset($this->tokens[$prevMatch]['parenthesis_opener']) === true + && $prevMatch === $this->tokens[$prevMatch]['parenthesis_closer'] + ) { + $prevMatch = $this->tokens[$prevMatch]['parenthesis_opener']; + } + } + + if ($prevMatch <= $this->tokens[$matchExpression]['scope_opener']) { + // We're before the arrow in the first case. + $next = $this->findNext(Util\Tokens::$emptyTokens, ($this->tokens[$matchExpression]['scope_opener'] + 1), null, true); + if ($next === false) { + return $start; + } + + return $next; + } + + if ($this->tokens[$prevMatch]['code'] === T_COMMA) { + // We're before the arrow, but not in the first case. + $prevMatchArrow = $this->findPrevious(T_MATCH_ARROW, ($prevMatch - 1), $this->tokens[$matchExpression]['scope_opener']); + if ($prevMatchArrow === false) { + // We're before the arrow in the first case. + $next = $this->findNext(Util\Tokens::$emptyTokens, ($this->tokens[$matchExpression]['scope_opener'] + 1), null, true); + return $next; + } + + $end = $this->findEndOfStatement($prevMatchArrow); + $next = $this->findNext(Util\Tokens::$emptyTokens, ($end + 1), null, true); + return $next; + } + }//end if + + $lastNotEmpty = $start; + + // If we are starting at a token that ends a scope block, skip to + // the start and continue from there. + // If we are starting at a token that ends a statement, skip this + // token so we find the true start of the statement. + while (isset($endTokens[$this->tokens[$start]['code']]) === true + || (isset($this->tokens[$start]['scope_condition']) === true + && $start === $this->tokens[$start]['scope_closer']) + ) { + if (isset($this->tokens[$start]['scope_condition']) === true) { + $start = $this->tokens[$start]['scope_condition']; + } else { + $start--; + } + } + + for ($i = $start; $i >= 0; $i--) { + if (isset($startTokens[$this->tokens[$i]['code']]) === true + || isset($endTokens[$this->tokens[$i]['code']]) === true + ) { + // Found the end of the previous statement. + return $lastNotEmpty; + } + + if (isset($this->tokens[$i]['scope_opener']) === true + && $i === $this->tokens[$i]['scope_closer'] + && $this->tokens[$i]['code'] !== T_CLOSE_PARENTHESIS + && $this->tokens[$i]['code'] !== T_END_NOWDOC + && $this->tokens[$i]['code'] !== T_END_HEREDOC + && $this->tokens[$i]['code'] !== T_BREAK + && $this->tokens[$i]['code'] !== T_RETURN + && $this->tokens[$i]['code'] !== T_CONTINUE + && $this->tokens[$i]['code'] !== T_THROW + && $this->tokens[$i]['code'] !== T_EXIT + ) { + // Found the end of the previous scope block. + return $lastNotEmpty; + } + + // Skip nested statements. + if (isset($this->tokens[$i]['bracket_opener']) === true + && $i === $this->tokens[$i]['bracket_closer'] + ) { + $i = $this->tokens[$i]['bracket_opener']; + } else if (isset($this->tokens[$i]['parenthesis_opener']) === true + && $i === $this->tokens[$i]['parenthesis_closer'] + ) { + $i = $this->tokens[$i]['parenthesis_opener']; + } else if ($this->tokens[$i]['code'] === T_CLOSE_USE_GROUP) { + $start = $this->findPrevious(T_OPEN_USE_GROUP, ($i - 1)); + if ($start !== false) { + $i = $start; + } + }//end if + + if (isset(Util\Tokens::$emptyTokens[$this->tokens[$i]['code']]) === false) { + $lastNotEmpty = $i; + } + }//end for + + return 0; + + }//end findStartOfStatement() + + + /** + * Returns the position of the last non-whitespace token in a statement. + * + * @param int $start The position to start searching from in the token stack. + * @param int|string|array $ignore Token types that should not be considered stop points. + * + * @return int + */ + public function findEndOfStatement($start, $ignore=null) + { + $endTokens = [ + T_COLON => true, + T_COMMA => true, + T_DOUBLE_ARROW => true, + T_SEMICOLON => true, + T_CLOSE_PARENTHESIS => true, + T_CLOSE_SQUARE_BRACKET => true, + T_CLOSE_CURLY_BRACKET => true, + T_CLOSE_SHORT_ARRAY => true, + T_OPEN_TAG => true, + T_CLOSE_TAG => true, + ]; + + if ($ignore !== null) { + $ignore = (array) $ignore; + foreach ($ignore as $code) { + unset($endTokens[$code]); + } + } + + // If the start token is inside the case part of a match expression, + // advance to the match arrow and continue looking for the + // end of the statement from there so that we skip over commas. + if ($this->tokens[$start]['code'] !== T_MATCH_ARROW) { + $matchExpression = $this->getCondition($start, T_MATCH); + if ($matchExpression !== false) { + $beforeArrow = true; + $prevMatchArrow = $this->findPrevious(T_MATCH_ARROW, ($start - 1), $this->tokens[$matchExpression]['scope_opener']); + if ($prevMatchArrow !== false) { + $prevComma = $this->findNext(T_COMMA, ($prevMatchArrow + 1), $start); + if ($prevComma === false) { + // No comma between this token and the last match arrow, + // so this token exists after the arrow and we can continue + // checking as normal. + $beforeArrow = false; + } + } + + if ($beforeArrow === true) { + $nextMatchArrow = $this->findNext(T_MATCH_ARROW, ($start + 1), $this->tokens[$matchExpression]['scope_closer']); + if ($nextMatchArrow !== false) { + $start = $nextMatchArrow; + } + } + }//end if + }//end if + + $lastNotEmpty = $start; + for ($i = $start; $i < $this->numTokens; $i++) { + if ($i !== $start && isset($endTokens[$this->tokens[$i]['code']]) === true) { + // Found the end of the statement. + if ($this->tokens[$i]['code'] === T_CLOSE_PARENTHESIS + || $this->tokens[$i]['code'] === T_CLOSE_SQUARE_BRACKET + || $this->tokens[$i]['code'] === T_CLOSE_CURLY_BRACKET + || $this->tokens[$i]['code'] === T_CLOSE_SHORT_ARRAY + || $this->tokens[$i]['code'] === T_OPEN_TAG + || $this->tokens[$i]['code'] === T_CLOSE_TAG + ) { + return $lastNotEmpty; + } + + return $i; + } + + // Skip nested statements. + if (isset($this->tokens[$i]['scope_closer']) === true + && ($i === $this->tokens[$i]['scope_opener'] + || $i === $this->tokens[$i]['scope_condition']) + ) { + if ($this->tokens[$i]['code'] === T_FN) { + $lastNotEmpty = $this->tokens[$i]['scope_closer']; + $i = ($this->tokens[$i]['scope_closer'] - 1); + continue; + } + + if ($i === $start && isset(Util\Tokens::$scopeOpeners[$this->tokens[$i]['code']]) === true) { + return $this->tokens[$i]['scope_closer']; + } + + $i = $this->tokens[$i]['scope_closer']; + } else if (isset($this->tokens[$i]['bracket_closer']) === true + && $i === $this->tokens[$i]['bracket_opener'] + ) { + $i = $this->tokens[$i]['bracket_closer']; + } else if (isset($this->tokens[$i]['parenthesis_closer']) === true + && $i === $this->tokens[$i]['parenthesis_opener'] + ) { + $i = $this->tokens[$i]['parenthesis_closer']; + } else if ($this->tokens[$i]['code'] === T_OPEN_USE_GROUP) { + $end = $this->findNext(T_CLOSE_USE_GROUP, ($i + 1)); + if ($end !== false) { + $i = $end; + } + }//end if + + if (isset(Util\Tokens::$emptyTokens[$this->tokens[$i]['code']]) === false) { + $lastNotEmpty = $i; + } + }//end for + + return ($this->numTokens - 1); + + }//end findEndOfStatement() + + + /** + * Returns the position of the first token on a line, matching given type. + * + * Returns false if no token can be found. + * + * @param int|string|array $types The type(s) of tokens to search for. + * @param int $start The position to start searching from in the + * token stack. The first token matching on + * this line before this token will be returned. + * @param bool $exclude If true, find the token that is NOT of + * the types specified in $types. + * @param string $value The value that the token must be equal to. + * If value is omitted, tokens with any value will + * be returned. + * + * @return int|false + */ + public function findFirstOnLine($types, $start, $exclude=false, $value=null) + { + if (is_array($types) === false) { + $types = [$types]; + } + + $foundToken = false; + + for ($i = $start; $i >= 0; $i--) { + if ($this->tokens[$i]['line'] < $this->tokens[$start]['line']) { + break; + } + + $found = $exclude; + foreach ($types as $type) { + if ($exclude === false) { + if ($this->tokens[$i]['code'] === $type) { + $found = true; + break; + } + } else { + if ($this->tokens[$i]['code'] === $type) { + $found = false; + break; + } + } + } + + if ($found === true) { + if ($value === null) { + $foundToken = $i; + } else if ($this->tokens[$i]['content'] === $value) { + $foundToken = $i; + } + } + }//end for + + return $foundToken; + + }//end findFirstOnLine() + + + /** + * Determine if the passed token has a condition of one of the passed types. + * + * @param int $stackPtr The position of the token we are checking. + * @param int|string|array $types The type(s) of tokens to search for. + * + * @return boolean + */ + public function hasCondition($stackPtr, $types) + { + // Check for the existence of the token. + if (isset($this->tokens[$stackPtr]) === false) { + return false; + } + + // Make sure the token has conditions. + if (isset($this->tokens[$stackPtr]['conditions']) === false) { + return false; + } + + $types = (array) $types; + $conditions = $this->tokens[$stackPtr]['conditions']; + + foreach ($types as $type) { + if (in_array($type, $conditions, true) === true) { + // We found a token with the required type. + return true; + } + } + + return false; + + }//end hasCondition() + + + /** + * Return the position of the condition for the passed token. + * + * Returns FALSE if the token does not have the condition. + * + * @param int $stackPtr The position of the token we are checking. + * @param int|string $type The type of token to search for. + * @param bool $first If TRUE, will return the matched condition + * furthest away from the passed token. + * If FALSE, will return the matched condition + * closest to the passed token. + * + * @return int|false + */ + public function getCondition($stackPtr, $type, $first=true) + { + // Check for the existence of the token. + if (isset($this->tokens[$stackPtr]) === false) { + return false; + } + + // Make sure the token has conditions. + if (isset($this->tokens[$stackPtr]['conditions']) === false) { + return false; + } + + $conditions = $this->tokens[$stackPtr]['conditions']; + if ($first === false) { + $conditions = array_reverse($conditions, true); + } + + foreach ($conditions as $token => $condition) { + if ($condition === $type) { + return $token; + } + } + + return false; + + }//end getCondition() + + + /** + * Returns the name of the class that the specified class extends. + * (works for classes, anonymous classes and interfaces) + * + * Returns FALSE on error or if there is no extended class name. + * + * @param int $stackPtr The stack position of the class. + * + * @return string|false + */ + public function findExtendedClassName($stackPtr) + { + // Check for the existence of the token. + if (isset($this->tokens[$stackPtr]) === false) { + return false; + } + + if ($this->tokens[$stackPtr]['code'] !== T_CLASS + && $this->tokens[$stackPtr]['code'] !== T_ANON_CLASS + && $this->tokens[$stackPtr]['code'] !== T_INTERFACE + ) { + return false; + } + + if (isset($this->tokens[$stackPtr]['scope_opener']) === false) { + return false; + } + + $classOpenerIndex = $this->tokens[$stackPtr]['scope_opener']; + $extendsIndex = $this->findNext(T_EXTENDS, $stackPtr, $classOpenerIndex); + if ($extendsIndex === false) { + return false; + } + + $find = [ + T_NS_SEPARATOR, + T_STRING, + T_WHITESPACE, + ]; + + $end = $this->findNext($find, ($extendsIndex + 1), ($classOpenerIndex + 1), true); + $name = $this->getTokensAsString(($extendsIndex + 1), ($end - $extendsIndex - 1)); + $name = trim($name); + + if ($name === '') { + return false; + } + + return $name; + + }//end findExtendedClassName() + + + /** + * Returns the names of the interfaces that the specified class implements. + * + * Returns FALSE on error or if there are no implemented interface names. + * + * @param int $stackPtr The stack position of the class. + * + * @return array|false + */ + public function findImplementedInterfaceNames($stackPtr) + { + // Check for the existence of the token. + if (isset($this->tokens[$stackPtr]) === false) { + return false; + } + + if ($this->tokens[$stackPtr]['code'] !== T_CLASS + && $this->tokens[$stackPtr]['code'] !== T_ANON_CLASS + ) { + return false; + } + + if (isset($this->tokens[$stackPtr]['scope_closer']) === false) { + return false; + } + + $classOpenerIndex = $this->tokens[$stackPtr]['scope_opener']; + $implementsIndex = $this->findNext(T_IMPLEMENTS, $stackPtr, $classOpenerIndex); + if ($implementsIndex === false) { + return false; + } + + $find = [ + T_NS_SEPARATOR, + T_STRING, + T_WHITESPACE, + T_COMMA, + ]; + + $end = $this->findNext($find, ($implementsIndex + 1), ($classOpenerIndex + 1), true); + $name = $this->getTokensAsString(($implementsIndex + 1), ($end - $implementsIndex - 1)); + $name = trim($name); + + if ($name === '') { + return false; + } else { + $names = explode(',', $name); + $names = array_map('trim', $names); + return $names; + } + + }//end findImplementedInterfaceNames() + + +}//end class diff --git a/vendor/squizlabs/php_codesniffer/src/Files/FileList.php b/vendor/squizlabs/php_codesniffer/src/Files/FileList.php new file mode 100644 index 00000000..66833a3e --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Files/FileList.php @@ -0,0 +1,255 @@ + + * @copyright 2006-2015 Squiz Pty Ltd (ABN 77 084 670 600) + * @license https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence + */ + +namespace PHP_CodeSniffer\Files; + +use PHP_CodeSniffer\Autoload; +use PHP_CodeSniffer\Util; +use PHP_CodeSniffer\Ruleset; +use PHP_CodeSniffer\Config; +use PHP_CodeSniffer\Exceptions\DeepExitException; +use ReturnTypeWillChange; + +class FileList implements \Iterator, \Countable +{ + + /** + * A list of file paths that are included in the list. + * + * @var array + */ + private $files = []; + + /** + * The number of files in the list. + * + * @var integer + */ + private $numFiles = 0; + + /** + * The config data for the run. + * + * @var \PHP_CodeSniffer\Config + */ + public $config = null; + + /** + * The ruleset used for the run. + * + * @var \PHP_CodeSniffer\Ruleset + */ + public $ruleset = null; + + /** + * An array of patterns to use for skipping files. + * + * @var array + */ + protected $ignorePatterns = []; + + + /** + * Constructs a file list and loads in an array of file paths to process. + * + * @param \PHP_CodeSniffer\Config $config The config data for the run. + * @param \PHP_CodeSniffer\Ruleset $ruleset The ruleset used for the run. + * + * @return void + */ + public function __construct(Config $config, Ruleset $ruleset) + { + $this->ruleset = $ruleset; + $this->config = $config; + + $paths = $config->files; + foreach ($paths as $path) { + $isPharFile = Util\Common::isPharFile($path); + if (is_dir($path) === true || $isPharFile === true) { + if ($isPharFile === true) { + $path = 'phar://'.$path; + } + + $filterClass = $this->getFilterClass(); + + $di = new \RecursiveDirectoryIterator($path, (\RecursiveDirectoryIterator::SKIP_DOTS | \FilesystemIterator::FOLLOW_SYMLINKS)); + $filter = new $filterClass($di, $path, $config, $ruleset); + $iterator = new \RecursiveIteratorIterator($filter); + + foreach ($iterator as $file) { + $this->files[$file->getPathname()] = null; + $this->numFiles++; + } + } else { + $this->addFile($path); + }//end if + }//end foreach + + reset($this->files); + + }//end __construct() + + + /** + * Add a file to the list. + * + * If a file object has already been created, it can be passed here. + * If it is left NULL, it will be created when accessed. + * + * @param string $path The path to the file being added. + * @param \PHP_CodeSniffer\Files\File $file The file being added. + * + * @return void + */ + public function addFile($path, $file=null) + { + // No filtering is done for STDIN when the filename + // has not been specified. + if ($path === 'STDIN') { + $this->files[$path] = $file; + $this->numFiles++; + return; + } + + $filterClass = $this->getFilterClass(); + + $di = new \RecursiveArrayIterator([$path]); + $filter = new $filterClass($di, $path, $this->config, $this->ruleset); + $iterator = new \RecursiveIteratorIterator($filter); + + foreach ($iterator as $path) { + $this->files[$path] = $file; + $this->numFiles++; + } + + }//end addFile() + + + /** + * Get the class name of the filter being used for the run. + * + * @return string + * @throws \PHP_CodeSniffer\Exceptions\DeepExitException If the specified filter could not be found. + */ + private function getFilterClass() + { + $filterType = $this->config->filter; + + if ($filterType === null) { + $filterClass = '\PHP_CodeSniffer\Filters\Filter'; + } else { + if (strpos($filterType, '.') !== false) { + // This is a path to a custom filter class. + $filename = realpath($filterType); + if ($filename === false) { + $error = "ERROR: Custom filter \"$filterType\" not found".PHP_EOL; + throw new DeepExitException($error, 3); + } + + $filterClass = Autoload::loadFile($filename); + } else { + $filterClass = '\PHP_CodeSniffer\Filters\\'.$filterType; + } + } + + return $filterClass; + + }//end getFilterClass() + + + /** + * Rewind the iterator to the first file. + * + * @return void + */ + #[ReturnTypeWillChange] + public function rewind() + { + reset($this->files); + + }//end rewind() + + + /** + * Get the file that is currently being processed. + * + * @return \PHP_CodeSniffer\Files\File + */ + #[ReturnTypeWillChange] + public function current() + { + $path = key($this->files); + if (isset($this->files[$path]) === false) { + $this->files[$path] = new LocalFile($path, $this->ruleset, $this->config); + } + + return $this->files[$path]; + + }//end current() + + + /** + * Return the file path of the current file being processed. + * + * @return void + */ + #[ReturnTypeWillChange] + public function key() + { + return key($this->files); + + }//end key() + + + /** + * Move forward to the next file. + * + * @return void + */ + #[ReturnTypeWillChange] + public function next() + { + next($this->files); + + }//end next() + + + /** + * Checks if current position is valid. + * + * @return boolean + */ + #[ReturnTypeWillChange] + public function valid() + { + if (current($this->files) === false) { + return false; + } + + return true; + + }//end valid() + + + /** + * Return the number of files in the list. + * + * @return integer + */ + #[ReturnTypeWillChange] + public function count() + { + return $this->numFiles; + + }//end count() + + +}//end class diff --git a/vendor/squizlabs/php_codesniffer/src/Files/LocalFile.php b/vendor/squizlabs/php_codesniffer/src/Files/LocalFile.php new file mode 100644 index 00000000..ca2e74ad --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Files/LocalFile.php @@ -0,0 +1,219 @@ + + * @copyright 2006-2015 Squiz Pty Ltd (ABN 77 084 670 600) + * @license https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence + */ + +namespace PHP_CodeSniffer\Files; + +use PHP_CodeSniffer\Ruleset; +use PHP_CodeSniffer\Config; +use PHP_CodeSniffer\Util\Cache; +use PHP_CodeSniffer\Util\Common; + +class LocalFile extends File +{ + + + /** + * Creates a LocalFile object and sets the content. + * + * @param string $path The absolute path to the file. + * @param \PHP_CodeSniffer\Ruleset $ruleset The ruleset used for the run. + * @param \PHP_CodeSniffer\Config $config The config data for the run. + * + * @return void + */ + public function __construct($path, Ruleset $ruleset, Config $config) + { + $this->path = trim($path); + if (Common::isReadable($this->path) === false) { + parent::__construct($this->path, $ruleset, $config); + $error = 'Error opening file; file no longer exists or you do not have access to read the file'; + $this->addMessage(true, $error, 1, 1, 'Internal.LocalFile', [], 5, false); + $this->ignored = true; + return; + } + + // Before we go and spend time tokenizing this file, just check + // to see if there is a tag up top to indicate that the whole + // file should be ignored. It must be on one of the first two lines. + if ($config->annotations === true) { + $handle = fopen($this->path, 'r'); + if ($handle !== false) { + $firstContent = fgets($handle); + $firstContent .= fgets($handle); + fclose($handle); + + if (strpos($firstContent, '@codingStandardsIgnoreFile') !== false + || stripos($firstContent, 'phpcs:ignorefile') !== false + ) { + // We are ignoring the whole file. + $this->ignored = true; + return; + } + } + } + + $this->reloadContent(); + + parent::__construct($this->path, $ruleset, $config); + + }//end __construct() + + + /** + * Loads the latest version of the file's content from the file system. + * + * @return void + */ + public function reloadContent() + { + $this->setContent(file_get_contents($this->path)); + + }//end reloadContent() + + + /** + * Processes the file. + * + * @return void + */ + public function process() + { + if ($this->ignored === true) { + return; + } + + if ($this->configCache['cache'] === false) { + parent::process(); + return; + } + + $hash = md5_file($this->path); + $hash .= fileperms($this->path); + $cache = Cache::get($this->path); + if ($cache !== false && $cache['hash'] === $hash) { + // We can't filter metrics, so just load all of them. + $this->metrics = $cache['metrics']; + + if ($this->configCache['recordErrors'] === true) { + // Replay the cached errors and warnings to filter out the ones + // we don't need for this specific run. + $this->configCache['cache'] = false; + $this->replayErrors($cache['errors'], $cache['warnings']); + $this->configCache['cache'] = true; + } else { + $this->errorCount = $cache['errorCount']; + $this->warningCount = $cache['warningCount']; + $this->fixableCount = $cache['fixableCount']; + } + + if (PHP_CODESNIFFER_VERBOSITY > 0 + || (PHP_CODESNIFFER_CBF === true && empty($this->config->files) === false) + ) { + echo "[loaded from cache]... "; + } + + $this->numTokens = $cache['numTokens']; + $this->fromCache = true; + return; + }//end if + + if (PHP_CODESNIFFER_VERBOSITY > 1) { + echo PHP_EOL; + } + + parent::process(); + + $cache = [ + 'hash' => $hash, + 'errors' => $this->errors, + 'warnings' => $this->warnings, + 'metrics' => $this->metrics, + 'errorCount' => $this->errorCount, + 'warningCount' => $this->warningCount, + 'fixableCount' => $this->fixableCount, + 'numTokens' => $this->numTokens, + ]; + + Cache::set($this->path, $cache); + + // During caching, we don't filter out errors in any way, so + // we need to do that manually now by replaying them. + if ($this->configCache['recordErrors'] === true) { + $this->configCache['cache'] = false; + $this->replayErrors($this->errors, $this->warnings); + $this->configCache['cache'] = true; + } + + }//end process() + + + /** + * Clears and replays error and warnings for the file. + * + * Replaying errors and warnings allows for filtering rules to be changed + * and then errors and warnings to be reapplied with the new rules. This is + * particularly useful while caching. + * + * @param array $errors The list of errors to replay. + * @param array $warnings The list of warnings to replay. + * + * @return void + */ + private function replayErrors($errors, $warnings) + { + $this->errors = []; + $this->warnings = []; + $this->errorCount = 0; + $this->warningCount = 0; + $this->fixableCount = 0; + + $this->replayingErrors = true; + + foreach ($errors as $line => $lineErrors) { + foreach ($lineErrors as $column => $colErrors) { + foreach ($colErrors as $error) { + $this->activeListener = $error['listener']; + $this->addMessage( + true, + $error['message'], + $line, + $column, + $error['source'], + [], + $error['severity'], + $error['fixable'] + ); + } + } + } + + foreach ($warnings as $line => $lineErrors) { + foreach ($lineErrors as $column => $colErrors) { + foreach ($colErrors as $error) { + $this->activeListener = $error['listener']; + $this->addMessage( + false, + $error['message'], + $line, + $column, + $error['source'], + [], + $error['severity'], + $error['fixable'] + ); + } + } + } + + $this->replayingErrors = false; + + }//end replayErrors() + + +}//end class diff --git a/vendor/squizlabs/php_codesniffer/src/Filters/ExactMatch.php b/vendor/squizlabs/php_codesniffer/src/Filters/ExactMatch.php new file mode 100644 index 00000000..13af8ff2 --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Filters/ExactMatch.php @@ -0,0 +1,108 @@ + + * @copyright 2006-2015 Squiz Pty Ltd (ABN 77 084 670 600) + * @license https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence + */ + +namespace PHP_CodeSniffer\Filters; + +use PHP_CodeSniffer\Util; + +abstract class ExactMatch extends Filter +{ + + /** + * A list of files to exclude. + * + * @var array + */ + private $blacklist = null; + + /** + * A list of files to include. + * + * If the whitelist is empty, only files in the blacklist will be excluded. + * + * @var array + */ + private $whitelist = null; + + + /** + * Check whether the current element of the iterator is acceptable. + * + * If a file is both blacklisted and whitelisted, it will be deemed unacceptable. + * + * @return bool + */ + public function accept() + { + if (parent::accept() === false) { + return false; + } + + if ($this->blacklist === null) { + $this->blacklist = $this->getblacklist(); + } + + if ($this->whitelist === null) { + $this->whitelist = $this->getwhitelist(); + } + + $filePath = Util\Common::realpath($this->current()); + + // If file is both blacklisted and whitelisted, the blacklist takes precedence. + if (isset($this->blacklist[$filePath]) === true) { + return false; + } + + if (empty($this->whitelist) === true && empty($this->blacklist) === false) { + // We are only checking a blacklist, so everything else should be whitelisted. + return true; + } + + return isset($this->whitelist[$filePath]); + + }//end accept() + + + /** + * Returns an iterator for the current entry. + * + * Ensures that the blacklist and whitelist are preserved so they don't have + * to be generated each time. + * + * @return \RecursiveIterator + */ + public function getChildren() + { + $children = parent::getChildren(); + $children->blacklist = $this->blacklist; + $children->whitelist = $this->whitelist; + return $children; + + }//end getChildren() + + + /** + * Get a list of blacklisted file paths. + * + * @return array + */ + abstract protected function getBlacklist(); + + + /** + * Get a list of whitelisted file paths. + * + * @return array + */ + abstract protected function getWhitelist(); + + +}//end class diff --git a/vendor/squizlabs/php_codesniffer/src/Filters/Filter.php b/vendor/squizlabs/php_codesniffer/src/Filters/Filter.php new file mode 100644 index 00000000..a1246a2c --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Filters/Filter.php @@ -0,0 +1,285 @@ + + * @copyright 2006-2015 Squiz Pty Ltd (ABN 77 084 670 600) + * @license https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence + */ + +namespace PHP_CodeSniffer\Filters; + +use PHP_CodeSniffer\Util; +use PHP_CodeSniffer\Ruleset; +use PHP_CodeSniffer\Config; +use ReturnTypeWillChange; + +class Filter extends \RecursiveFilterIterator +{ + + /** + * The top-level path we are filtering. + * + * @var string + */ + protected $basedir = null; + + /** + * The config data for the run. + * + * @var \PHP_CodeSniffer\Config + */ + protected $config = null; + + /** + * The ruleset used for the run. + * + * @var \PHP_CodeSniffer\Ruleset + */ + protected $ruleset = null; + + /** + * A list of ignore patterns that apply to directories only. + * + * @var array + */ + protected $ignoreDirPatterns = null; + + /** + * A list of ignore patterns that apply to files only. + * + * @var array + */ + protected $ignoreFilePatterns = null; + + /** + * A list of file paths we've already accepted. + * + * Used to ensure we aren't following circular symlinks. + * + * @var array + */ + protected $acceptedPaths = []; + + + /** + * Constructs a filter. + * + * @param \RecursiveIterator $iterator The iterator we are using to get file paths. + * @param string $basedir The top-level path we are filtering. + * @param \PHP_CodeSniffer\Config $config The config data for the run. + * @param \PHP_CodeSniffer\Ruleset $ruleset The ruleset used for the run. + * + * @return void + */ + public function __construct($iterator, $basedir, Config $config, Ruleset $ruleset) + { + parent::__construct($iterator); + $this->basedir = $basedir; + $this->config = $config; + $this->ruleset = $ruleset; + + }//end __construct() + + + /** + * Check whether the current element of the iterator is acceptable. + * + * Files are checked for allowed extensions and ignore patterns. + * Directories are checked for ignore patterns only. + * + * @return bool + */ + #[ReturnTypeWillChange] + public function accept() + { + $filePath = $this->current(); + $realPath = Util\Common::realpath($filePath); + + if ($realPath !== false) { + // It's a real path somewhere, so record it + // to check for circular symlinks. + if (isset($this->acceptedPaths[$realPath]) === true) { + // We've been here before. + return false; + } + } + + $filePath = $this->current(); + if (is_dir($filePath) === true) { + if ($this->config->local === true) { + return false; + } + } else if ($this->shouldProcessFile($filePath) === false) { + return false; + } + + if ($this->shouldIgnorePath($filePath) === true) { + return false; + } + + $this->acceptedPaths[$realPath] = true; + return true; + + }//end accept() + + + /** + * Returns an iterator for the current entry. + * + * Ensures that the ignore patterns are preserved so they don't have + * to be generated each time. + * + * @return \RecursiveIterator + */ + #[ReturnTypeWillChange] + public function getChildren() + { + $filterClass = get_called_class(); + $children = new $filterClass( + new \RecursiveDirectoryIterator($this->current(), (\RecursiveDirectoryIterator::SKIP_DOTS | \FilesystemIterator::FOLLOW_SYMLINKS)), + $this->basedir, + $this->config, + $this->ruleset + ); + + // Set the ignore patterns so we don't have to generate them again. + $children->ignoreDirPatterns = $this->ignoreDirPatterns; + $children->ignoreFilePatterns = $this->ignoreFilePatterns; + $children->acceptedPaths = $this->acceptedPaths; + return $children; + + }//end getChildren() + + + /** + * Checks filtering rules to see if a file should be checked. + * + * Checks both file extension filters and path ignore filters. + * + * @param string $path The path to the file being checked. + * + * @return bool + */ + protected function shouldProcessFile($path) + { + // Check that the file's extension is one we are checking. + // We are strict about checking the extension and we don't + // let files through with no extension or that start with a dot. + $fileName = basename($path); + $fileParts = explode('.', $fileName); + if ($fileParts[0] === $fileName || $fileParts[0] === '') { + return false; + } + + // Checking multi-part file extensions, so need to create a + // complete extension list and make sure one is allowed. + $extensions = []; + array_shift($fileParts); + foreach ($fileParts as $part) { + $extensions[implode('.', $fileParts)] = 1; + array_shift($fileParts); + } + + $matches = array_intersect_key($extensions, $this->config->extensions); + if (empty($matches) === true) { + return false; + } + + return true; + + }//end shouldProcessFile() + + + /** + * Checks filtering rules to see if a path should be ignored. + * + * @param string $path The path to the file or directory being checked. + * + * @return bool + */ + protected function shouldIgnorePath($path) + { + if ($this->ignoreFilePatterns === null) { + $this->ignoreDirPatterns = []; + $this->ignoreFilePatterns = []; + + $ignorePatterns = $this->config->ignored; + $rulesetIgnorePatterns = $this->ruleset->getIgnorePatterns(); + foreach ($rulesetIgnorePatterns as $pattern => $type) { + // Ignore standard/sniff specific exclude rules. + if (is_array($type) === true) { + continue; + } + + $ignorePatterns[$pattern] = $type; + } + + foreach ($ignorePatterns as $pattern => $type) { + // If the ignore pattern ends with /* then it is ignoring an entire directory. + if (substr($pattern, -2) === '/*') { + // Need to check this pattern for dirs as well as individual file paths. + $this->ignoreFilePatterns[$pattern] = $type; + + $pattern = substr($pattern, 0, -2).'(?=/|$)'; + $this->ignoreDirPatterns[$pattern] = $type; + } else { + // This is a file-specific pattern, so only need to check this + // for individual file paths. + $this->ignoreFilePatterns[$pattern] = $type; + } + } + }//end if + + $relativePath = $path; + if (strpos($path, $this->basedir) === 0) { + // The +1 cuts off the directory separator as well. + $relativePath = substr($path, (strlen($this->basedir) + 1)); + } + + if (is_dir($path) === true) { + $ignorePatterns = $this->ignoreDirPatterns; + } else { + $ignorePatterns = $this->ignoreFilePatterns; + } + + foreach ($ignorePatterns as $pattern => $type) { + // Maintains backwards compatibility in case the ignore pattern does + // not have a relative/absolute value. + if (is_int($pattern) === true) { + $pattern = $type; + $type = 'absolute'; + } + + $replacements = [ + '\\,' => ',', + '*' => '.*', + ]; + + // We assume a / directory separator, as do the exclude rules + // most developers write, so we need a special case for any system + // that is different. + if (DIRECTORY_SEPARATOR === '\\') { + $replacements['/'] = '\\\\'; + } + + $pattern = strtr($pattern, $replacements); + + if ($type === 'relative') { + $testPath = $relativePath; + } else { + $testPath = $path; + } + + $pattern = '`'.$pattern.'`i'; + if (preg_match($pattern, $testPath) === 1) { + return true; + } + }//end foreach + + return false; + + }//end shouldIgnorePath() + + +}//end class diff --git a/vendor/squizlabs/php_codesniffer/src/Filters/GitModified.php b/vendor/squizlabs/php_codesniffer/src/Filters/GitModified.php new file mode 100644 index 00000000..4b6ef3fc --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Filters/GitModified.php @@ -0,0 +1,66 @@ + + * @copyright 2006-2015 Squiz Pty Ltd (ABN 77 084 670 600) + * @license https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence + */ + +namespace PHP_CodeSniffer\Filters; + +use PHP_CodeSniffer\Util; + +class GitModified extends ExactMatch +{ + + + /** + * Get a list of blacklisted file paths. + * + * @return array + */ + protected function getBlacklist() + { + return []; + + }//end getBlacklist() + + + /** + * Get a list of whitelisted file paths. + * + * @return array + */ + protected function getWhitelist() + { + $modified = []; + + $cmd = 'git ls-files -o -m --exclude-standard -- '.escapeshellarg($this->basedir); + $output = []; + exec($cmd, $output); + + $basedir = $this->basedir; + if (is_dir($basedir) === false) { + $basedir = dirname($basedir); + } + + foreach ($output as $path) { + $path = Util\Common::realpath($path); + + if ($path === false) { + continue; + } + + do { + $modified[$path] = true; + $path = dirname($path); + } while ($path !== $basedir); + } + + return $modified; + + }//end getWhitelist() + + +}//end class diff --git a/vendor/squizlabs/php_codesniffer/src/Filters/GitStaged.php b/vendor/squizlabs/php_codesniffer/src/Filters/GitStaged.php new file mode 100644 index 00000000..fcb92c3d --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Filters/GitStaged.php @@ -0,0 +1,68 @@ + + * @copyright 2018 Juliette Reinders Folmer. All rights reserved. + * @license https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence + */ + +namespace PHP_CodeSniffer\Filters; + +use PHP_CodeSniffer\Util; + +class GitStaged extends ExactMatch +{ + + + /** + * Get a list of blacklisted file paths. + * + * @return array + */ + protected function getBlacklist() + { + return []; + + }//end getBlacklist() + + + /** + * Get a list of whitelisted file paths. + * + * @return array + */ + protected function getWhitelist() + { + $modified = []; + + $cmd = 'git diff --cached --name-only -- '.escapeshellarg($this->basedir); + $output = []; + exec($cmd, $output); + + $basedir = $this->basedir; + if (is_dir($basedir) === false) { + $basedir = dirname($basedir); + } + + foreach ($output as $path) { + $path = Util\Common::realpath($path); + if ($path === false) { + // Skip deleted files. + continue; + } + + do { + $modified[$path] = true; + $path = dirname($path); + } while ($path !== $basedir); + } + + return $modified; + + }//end getWhitelist() + + +}//end class diff --git a/vendor/squizlabs/php_codesniffer/src/Fixer.php b/vendor/squizlabs/php_codesniffer/src/Fixer.php new file mode 100644 index 00000000..b8dc05b1 --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Fixer.php @@ -0,0 +1,806 @@ + + * @copyright 2006-2015 Squiz Pty Ltd (ABN 77 084 670 600) + * @license https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence + */ + +namespace PHP_CodeSniffer; + +use PHP_CodeSniffer\Files\File; +use PHP_CodeSniffer\Util\Common; + +class Fixer +{ + + /** + * Is the fixer enabled and fixing a file? + * + * Sniffs should check this value to ensure they are not + * doing extra processing to prepare for a fix when fixing is + * not required. + * + * @var boolean + */ + public $enabled = false; + + /** + * The number of times we have looped over a file. + * + * @var integer + */ + public $loops = 0; + + /** + * The file being fixed. + * + * @var \PHP_CodeSniffer\Files\File + */ + private $currentFile = null; + + /** + * The list of tokens that make up the file contents. + * + * This is a simplified list which just contains the token content and nothing + * else. This is the array that is updated as fixes are made, not the file's + * token array. Imploding this array will give you the file content back. + * + * @var array + */ + private $tokens = []; + + /** + * A list of tokens that have already been fixed. + * + * We don't allow the same token to be fixed more than once each time + * through a file as this can easily cause conflicts between sniffs. + * + * @var int[] + */ + private $fixedTokens = []; + + /** + * The last value of each fixed token. + * + * If a token is being "fixed" back to its last value, the fix is + * probably conflicting with another. + * + * @var array + */ + private $oldTokenValues = []; + + /** + * A list of tokens that have been fixed during a changeset. + * + * All changes in changeset must be able to be applied, or else + * the entire changeset is rejected. + * + * @var array + */ + private $changeset = []; + + /** + * Is there an open changeset. + * + * @var boolean + */ + private $inChangeset = false; + + /** + * Is the current fixing loop in conflict? + * + * @var boolean + */ + private $inConflict = false; + + /** + * The number of fixes that have been performed. + * + * @var integer + */ + private $numFixes = 0; + + + /** + * Starts fixing a new file. + * + * @param \PHP_CodeSniffer\Files\File $phpcsFile The file being fixed. + * + * @return void + */ + public function startFile(File $phpcsFile) + { + $this->currentFile = $phpcsFile; + $this->numFixes = 0; + $this->fixedTokens = []; + + $tokens = $phpcsFile->getTokens(); + $this->tokens = []; + foreach ($tokens as $index => $token) { + if (isset($token['orig_content']) === true) { + $this->tokens[$index] = $token['orig_content']; + } else { + $this->tokens[$index] = $token['content']; + } + } + + }//end startFile() + + + /** + * Attempt to fix the file by processing it until no fixes are made. + * + * @return boolean + */ + public function fixFile() + { + $fixable = $this->currentFile->getFixableCount(); + if ($fixable === 0) { + // Nothing to fix. + return false; + } + + $this->enabled = true; + + $this->loops = 0; + while ($this->loops < 50) { + ob_start(); + + // Only needed once file content has changed. + $contents = $this->getContents(); + + if (PHP_CODESNIFFER_VERBOSITY > 2) { + @ob_end_clean(); + echo '---START FILE CONTENT---'.PHP_EOL; + $lines = explode($this->currentFile->eolChar, $contents); + $max = strlen(count($lines)); + foreach ($lines as $lineNum => $line) { + $lineNum++; + echo str_pad($lineNum, $max, ' ', STR_PAD_LEFT).'|'.$line.PHP_EOL; + } + + echo '--- END FILE CONTENT ---'.PHP_EOL; + ob_start(); + } + + $this->inConflict = false; + $this->currentFile->ruleset->populateTokenListeners(); + $this->currentFile->setContent($contents); + $this->currentFile->process(); + ob_end_clean(); + + $this->loops++; + + if (PHP_CODESNIFFER_CBF === true && PHP_CODESNIFFER_VERBOSITY > 0) { + echo "\r".str_repeat(' ', 80)."\r"; + echo "\t=> Fixing file: $this->numFixes/$fixable violations remaining [made $this->loops pass"; + if ($this->loops > 1) { + echo 'es'; + } + + echo ']... '; + if (PHP_CODESNIFFER_VERBOSITY > 1) { + echo PHP_EOL; + } + } + + if ($this->numFixes === 0 && $this->inConflict === false) { + // Nothing left to do. + break; + } else if (PHP_CODESNIFFER_VERBOSITY > 1) { + echo "\t* fixed $this->numFixes violations, starting loop ".($this->loops + 1).' *'.PHP_EOL; + } + }//end while + + $this->enabled = false; + + if ($this->numFixes > 0) { + if (PHP_CODESNIFFER_VERBOSITY > 1) { + if (ob_get_level() > 0) { + ob_end_clean(); + } + + echo "\t*** Reached maximum number of loops with $this->numFixes violations left unfixed ***".PHP_EOL; + ob_start(); + } + + return false; + } + + return true; + + }//end fixFile() + + + /** + * Generates a text diff of the original file and the new content. + * + * @param string $filePath Optional file path to diff the file against. + * If not specified, the original version of the + * file will be used. + * @param boolean $colors Print coloured output or not. + * + * @return string + */ + public function generateDiff($filePath=null, $colors=true) + { + if ($filePath === null) { + $filePath = $this->currentFile->getFilename(); + } + + $cwd = getcwd().DIRECTORY_SEPARATOR; + if (strpos($filePath, $cwd) === 0) { + $filename = substr($filePath, strlen($cwd)); + } else { + $filename = $filePath; + } + + $contents = $this->getContents(); + + $tempName = tempnam(sys_get_temp_dir(), 'phpcs-fixer'); + $fixedFile = fopen($tempName, 'w'); + fwrite($fixedFile, $contents); + + // We must use something like shell_exec() because whitespace at the end + // of lines is critical to diff files. + $filename = escapeshellarg($filename); + $cmd = "diff -u -L$filename -LPHP_CodeSniffer $filename \"$tempName\""; + + $diff = shell_exec($cmd); + + fclose($fixedFile); + if (is_file($tempName) === true) { + unlink($tempName); + } + + if ($diff === null) { + return ''; + } + + if ($colors === false) { + return $diff; + } + + $diffLines = explode(PHP_EOL, $diff); + if (count($diffLines) === 1) { + // Seems to be required for cygwin. + $diffLines = explode("\n", $diff); + } + + $diff = []; + foreach ($diffLines as $line) { + if (isset($line[0]) === true) { + switch ($line[0]) { + case '-': + $diff[] = "\033[31m$line\033[0m"; + break; + case '+': + $diff[] = "\033[32m$line\033[0m"; + break; + default: + $diff[] = $line; + } + } + } + + $diff = implode(PHP_EOL, $diff); + + return $diff; + + }//end generateDiff() + + + /** + * Get a count of fixes that have been performed on the file. + * + * This value is reset every time a new file is started, or an existing + * file is restarted. + * + * @return int + */ + public function getFixCount() + { + return $this->numFixes; + + }//end getFixCount() + + + /** + * Get the current content of the file, as a string. + * + * @return string + */ + public function getContents() + { + $contents = implode($this->tokens); + return $contents; + + }//end getContents() + + + /** + * Get the current fixed content of a token. + * + * This function takes changesets into account so should be used + * instead of directly accessing the token array. + * + * @param int $stackPtr The position of the token in the token stack. + * + * @return string + */ + public function getTokenContent($stackPtr) + { + if ($this->inChangeset === true + && isset($this->changeset[$stackPtr]) === true + ) { + return $this->changeset[$stackPtr]; + } else { + return $this->tokens[$stackPtr]; + } + + }//end getTokenContent() + + + /** + * Start recording actions for a changeset. + * + * @return void + */ + public function beginChangeset() + { + if ($this->inConflict === true) { + return false; + } + + if (PHP_CODESNIFFER_VERBOSITY > 1) { + $bt = debug_backtrace(DEBUG_BACKTRACE_IGNORE_ARGS); + if ($bt[1]['class'] === __CLASS__) { + $sniff = 'Fixer'; + } else { + $sniff = Util\Common::getSniffCode($bt[1]['class']); + } + + $line = $bt[0]['line']; + + @ob_end_clean(); + echo "\t=> Changeset started by $sniff:$line".PHP_EOL; + ob_start(); + } + + $this->changeset = []; + $this->inChangeset = true; + + }//end beginChangeset() + + + /** + * Stop recording actions for a changeset, and apply logged changes. + * + * @return boolean + */ + public function endChangeset() + { + if ($this->inConflict === true) { + return false; + } + + $this->inChangeset = false; + + $success = true; + $applied = []; + foreach ($this->changeset as $stackPtr => $content) { + $success = $this->replaceToken($stackPtr, $content); + if ($success === false) { + break; + } else { + $applied[] = $stackPtr; + } + } + + if ($success === false) { + // Rolling back all changes. + foreach ($applied as $stackPtr) { + $this->revertToken($stackPtr); + } + + if (PHP_CODESNIFFER_VERBOSITY > 1) { + @ob_end_clean(); + echo "\t=> Changeset failed to apply".PHP_EOL; + ob_start(); + } + } else if (PHP_CODESNIFFER_VERBOSITY > 1) { + $fixes = count($this->changeset); + @ob_end_clean(); + echo "\t=> Changeset ended: $fixes changes applied".PHP_EOL; + ob_start(); + } + + $this->changeset = []; + return true; + + }//end endChangeset() + + + /** + * Stop recording actions for a changeset, and discard logged changes. + * + * @return void + */ + public function rollbackChangeset() + { + $this->inChangeset = false; + $this->inConflict = false; + + if (empty($this->changeset) === false) { + if (PHP_CODESNIFFER_VERBOSITY > 1) { + $bt = debug_backtrace(); + if ($bt[1]['class'] === 'PHP_CodeSniffer\Fixer') { + $sniff = $bt[2]['class']; + $line = $bt[1]['line']; + } else { + $sniff = $bt[1]['class']; + $line = $bt[0]['line']; + } + + $sniff = Util\Common::getSniffCode($sniff); + + $numChanges = count($this->changeset); + + @ob_end_clean(); + echo "\t\tR: $sniff:$line rolled back the changeset ($numChanges changes)".PHP_EOL; + echo "\t=> Changeset rolled back".PHP_EOL; + ob_start(); + } + + $this->changeset = []; + }//end if + + }//end rollbackChangeset() + + + /** + * Replace the entire contents of a token. + * + * @param int $stackPtr The position of the token in the token stack. + * @param string $content The new content of the token. + * + * @return bool If the change was accepted. + */ + public function replaceToken($stackPtr, $content) + { + if ($this->inConflict === true) { + return false; + } + + if ($this->inChangeset === false + && isset($this->fixedTokens[$stackPtr]) === true + ) { + $indent = "\t"; + if (empty($this->changeset) === false) { + $indent .= "\t"; + } + + if (PHP_CODESNIFFER_VERBOSITY > 1) { + @ob_end_clean(); + echo "$indent* token $stackPtr has already been modified, skipping *".PHP_EOL; + ob_start(); + } + + return false; + } + + if (PHP_CODESNIFFER_VERBOSITY > 1) { + $bt = debug_backtrace(DEBUG_BACKTRACE_IGNORE_ARGS); + if ($bt[1]['class'] === 'PHP_CodeSniffer\Fixer') { + $sniff = $bt[2]['class']; + $line = $bt[1]['line']; + } else { + $sniff = $bt[1]['class']; + $line = $bt[0]['line']; + } + + $sniff = Util\Common::getSniffCode($sniff); + + $tokens = $this->currentFile->getTokens(); + $type = $tokens[$stackPtr]['type']; + $tokenLine = $tokens[$stackPtr]['line']; + $oldContent = Common::prepareForOutput($this->tokens[$stackPtr]); + $newContent = Common::prepareForOutput($content); + if (trim($this->tokens[$stackPtr]) === '' && isset($this->tokens[($stackPtr + 1)]) === true) { + // Add some context for whitespace only changes. + $append = Common::prepareForOutput($this->tokens[($stackPtr + 1)]); + $oldContent .= $append; + $newContent .= $append; + } + }//end if + + if ($this->inChangeset === true) { + $this->changeset[$stackPtr] = $content; + + if (PHP_CODESNIFFER_VERBOSITY > 1) { + @ob_end_clean(); + echo "\t\tQ: $sniff:$line replaced token $stackPtr ($type on line $tokenLine) \"$oldContent\" => \"$newContent\"".PHP_EOL; + ob_start(); + } + + return true; + } + + if (isset($this->oldTokenValues[$stackPtr]) === false) { + $this->oldTokenValues[$stackPtr] = [ + 'curr' => $content, + 'prev' => $this->tokens[$stackPtr], + 'loop' => $this->loops, + ]; + } else { + if ($this->oldTokenValues[$stackPtr]['prev'] === $content + && $this->oldTokenValues[$stackPtr]['loop'] === ($this->loops - 1) + ) { + if (PHP_CODESNIFFER_VERBOSITY > 1) { + $indent = "\t"; + if (empty($this->changeset) === false) { + $indent .= "\t"; + } + + $loop = $this->oldTokenValues[$stackPtr]['loop']; + + @ob_end_clean(); + echo "$indent**** $sniff:$line has possible conflict with another sniff on loop $loop; caused by the following change ****".PHP_EOL; + echo "$indent**** replaced token $stackPtr ($type on line $tokenLine) \"$oldContent\" => \"$newContent\" ****".PHP_EOL; + } + + if ($this->oldTokenValues[$stackPtr]['loop'] >= ($this->loops - 1)) { + $this->inConflict = true; + if (PHP_CODESNIFFER_VERBOSITY > 1) { + echo "$indent**** ignoring all changes until next loop ****".PHP_EOL; + } + } + + if (PHP_CODESNIFFER_VERBOSITY > 1) { + ob_start(); + } + + return false; + }//end if + + $this->oldTokenValues[$stackPtr]['prev'] = $this->oldTokenValues[$stackPtr]['curr']; + $this->oldTokenValues[$stackPtr]['curr'] = $content; + $this->oldTokenValues[$stackPtr]['loop'] = $this->loops; + }//end if + + $this->fixedTokens[$stackPtr] = $this->tokens[$stackPtr]; + $this->tokens[$stackPtr] = $content; + $this->numFixes++; + + if (PHP_CODESNIFFER_VERBOSITY > 1) { + $indent = "\t"; + if (empty($this->changeset) === false) { + $indent .= "\tA: "; + } + + if (ob_get_level() > 0) { + ob_end_clean(); + } + + echo "$indent$sniff:$line replaced token $stackPtr ($type on line $tokenLine) \"$oldContent\" => \"$newContent\"".PHP_EOL; + ob_start(); + } + + return true; + + }//end replaceToken() + + + /** + * Reverts the previous fix made to a token. + * + * @param int $stackPtr The position of the token in the token stack. + * + * @return bool If a change was reverted. + */ + public function revertToken($stackPtr) + { + if (isset($this->fixedTokens[$stackPtr]) === false) { + return false; + } + + if (PHP_CODESNIFFER_VERBOSITY > 1) { + $bt = debug_backtrace(DEBUG_BACKTRACE_IGNORE_ARGS); + if ($bt[1]['class'] === 'PHP_CodeSniffer\Fixer') { + $sniff = $bt[2]['class']; + $line = $bt[1]['line']; + } else { + $sniff = $bt[1]['class']; + $line = $bt[0]['line']; + } + + $sniff = Util\Common::getSniffCode($sniff); + + $tokens = $this->currentFile->getTokens(); + $type = $tokens[$stackPtr]['type']; + $tokenLine = $tokens[$stackPtr]['line']; + $oldContent = Common::prepareForOutput($this->tokens[$stackPtr]); + $newContent = Common::prepareForOutput($this->fixedTokens[$stackPtr]); + if (trim($this->tokens[$stackPtr]) === '' && isset($tokens[($stackPtr + 1)]) === true) { + // Add some context for whitespace only changes. + $append = Common::prepareForOutput($this->tokens[($stackPtr + 1)]); + $oldContent .= $append; + $newContent .= $append; + } + }//end if + + $this->tokens[$stackPtr] = $this->fixedTokens[$stackPtr]; + unset($this->fixedTokens[$stackPtr]); + $this->numFixes--; + + if (PHP_CODESNIFFER_VERBOSITY > 1) { + $indent = "\t"; + if (empty($this->changeset) === false) { + $indent .= "\tR: "; + } + + @ob_end_clean(); + echo "$indent$sniff:$line reverted token $stackPtr ($type on line $tokenLine) \"$oldContent\" => \"$newContent\"".PHP_EOL; + ob_start(); + } + + return true; + + }//end revertToken() + + + /** + * Replace the content of a token with a part of its current content. + * + * @param int $stackPtr The position of the token in the token stack. + * @param int $start The first character to keep. + * @param int $length The number of characters to keep. If NULL, the content of + * the token from $start to the end of the content is kept. + * + * @return bool If the change was accepted. + */ + public function substrToken($stackPtr, $start, $length=null) + { + $current = $this->getTokenContent($stackPtr); + + if ($length === null) { + $newContent = substr($current, $start); + } else { + $newContent = substr($current, $start, $length); + } + + return $this->replaceToken($stackPtr, $newContent); + + }//end substrToken() + + + /** + * Adds a newline to end of a token's content. + * + * @param int $stackPtr The position of the token in the token stack. + * + * @return bool If the change was accepted. + */ + public function addNewline($stackPtr) + { + $current = $this->getTokenContent($stackPtr); + return $this->replaceToken($stackPtr, $current.$this->currentFile->eolChar); + + }//end addNewline() + + + /** + * Adds a newline to the start of a token's content. + * + * @param int $stackPtr The position of the token in the token stack. + * + * @return bool If the change was accepted. + */ + public function addNewlineBefore($stackPtr) + { + $current = $this->getTokenContent($stackPtr); + return $this->replaceToken($stackPtr, $this->currentFile->eolChar.$current); + + }//end addNewlineBefore() + + + /** + * Adds content to the end of a token's current content. + * + * @param int $stackPtr The position of the token in the token stack. + * @param string $content The content to add. + * + * @return bool If the change was accepted. + */ + public function addContent($stackPtr, $content) + { + $current = $this->getTokenContent($stackPtr); + return $this->replaceToken($stackPtr, $current.$content); + + }//end addContent() + + + /** + * Adds content to the start of a token's current content. + * + * @param int $stackPtr The position of the token in the token stack. + * @param string $content The content to add. + * + * @return bool If the change was accepted. + */ + public function addContentBefore($stackPtr, $content) + { + $current = $this->getTokenContent($stackPtr); + return $this->replaceToken($stackPtr, $content.$current); + + }//end addContentBefore() + + + /** + * Adjust the indent of a code block. + * + * @param int $start The position of the token in the token stack + * to start adjusting the indent from. + * @param int $end The position of the token in the token stack + * to end adjusting the indent. + * @param int $change The number of spaces to adjust the indent by + * (positive or negative). + * + * @return void + */ + public function changeCodeBlockIndent($start, $end, $change) + { + $tokens = $this->currentFile->getTokens(); + + $baseIndent = ''; + if ($change > 0) { + $baseIndent = str_repeat(' ', $change); + } + + $useChangeset = false; + if ($this->inChangeset === false) { + $this->beginChangeset(); + $useChangeset = true; + } + + for ($i = $start; $i <= $end; $i++) { + if ($tokens[$i]['column'] !== 1 + || $tokens[($i + 1)]['line'] !== $tokens[$i]['line'] + ) { + continue; + } + + $length = 0; + if ($tokens[$i]['code'] === T_WHITESPACE + || $tokens[$i]['code'] === T_DOC_COMMENT_WHITESPACE + ) { + $length = $tokens[$i]['length']; + + $padding = ($length + $change); + if ($padding > 0) { + $padding = str_repeat(' ', $padding); + } else { + $padding = ''; + } + + $newContent = $padding.ltrim($tokens[$i]['content']); + } else { + $newContent = $baseIndent.$tokens[$i]['content']; + } + + $this->replaceToken($i, $newContent); + }//end for + + if ($useChangeset === true) { + $this->endChangeset(); + } + + }//end changeCodeBlockIndent() + + +}//end class diff --git a/vendor/squizlabs/php_codesniffer/src/Generators/Generator.php b/vendor/squizlabs/php_codesniffer/src/Generators/Generator.php new file mode 100644 index 00000000..56049768 --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Generators/Generator.php @@ -0,0 +1,117 @@ + + * @copyright 2006-2015 Squiz Pty Ltd (ABN 77 084 670 600) + * @license https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence + */ + +namespace PHP_CodeSniffer\Generators; + +use PHP_CodeSniffer\Ruleset; +use PHP_CodeSniffer\Autoload; + +abstract class Generator +{ + + /** + * The ruleset used for the run. + * + * @var \PHP_CodeSniffer\Ruleset + */ + public $ruleset = null; + + /** + * XML documentation files used to produce the final output. + * + * @var string[] + */ + public $docFiles = []; + + + /** + * Constructs a doc generator. + * + * @param \PHP_CodeSniffer\Ruleset $ruleset The ruleset used for the run. + * + * @see generate() + */ + public function __construct(Ruleset $ruleset) + { + $this->ruleset = $ruleset; + + foreach ($ruleset->sniffs as $className => $sniffClass) { + $file = Autoload::getLoadedFileName($className); + $docFile = str_replace( + DIRECTORY_SEPARATOR.'Sniffs'.DIRECTORY_SEPARATOR, + DIRECTORY_SEPARATOR.'Docs'.DIRECTORY_SEPARATOR, + $file + ); + $docFile = str_replace('Sniff.php', 'Standard.xml', $docFile); + + if (is_file($docFile) === true) { + $this->docFiles[] = $docFile; + } + } + + }//end __construct() + + + /** + * Retrieves the title of the sniff from the DOMNode supplied. + * + * @param \DOMNode $doc The DOMNode object for the sniff. + * It represents the "documentation" tag in the XML + * standard file. + * + * @return string + */ + protected function getTitle(\DOMNode $doc) + { + return $doc->getAttribute('title'); + + }//end getTitle() + + + /** + * Generates the documentation for a standard. + * + * It's probably wise for doc generators to override this method so they + * have control over how the docs are produced. Otherwise, the processSniff + * method should be overridden to output content for each sniff. + * + * @return void + * @see processSniff() + */ + public function generate() + { + foreach ($this->docFiles as $file) { + $doc = new \DOMDocument(); + $doc->load($file); + $documentation = $doc->getElementsByTagName('documentation')->item(0); + $this->processSniff($documentation); + } + + }//end generate() + + + /** + * Process the documentation for a single sniff. + * + * Doc generators must implement this function to produce output. + * + * @param \DOMNode $doc The DOMNode object for the sniff. + * It represents the "documentation" tag in the XML + * standard file. + * + * @return void + * @see generate() + */ + abstract protected function processSniff(\DOMNode $doc); + + +}//end class diff --git a/vendor/squizlabs/php_codesniffer/src/Generators/HTML.php b/vendor/squizlabs/php_codesniffer/src/Generators/HTML.php new file mode 100644 index 00000000..db264684 --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Generators/HTML.php @@ -0,0 +1,270 @@ + + * @copyright 2006-2015 Squiz Pty Ltd (ABN 77 084 670 600) + * @license https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence + */ + +namespace PHP_CodeSniffer\Generators; + +use PHP_CodeSniffer\Config; + +class HTML extends Generator +{ + + + /** + * Generates the documentation for a standard. + * + * @return void + * @see processSniff() + */ + public function generate() + { + ob_start(); + $this->printHeader(); + $this->printToc(); + + foreach ($this->docFiles as $file) { + $doc = new \DOMDocument(); + $doc->load($file); + $documentation = $doc->getElementsByTagName('documentation')->item(0); + $this->processSniff($documentation); + } + + $this->printFooter(); + + $content = ob_get_contents(); + ob_end_clean(); + + echo $content; + + }//end generate() + + + /** + * Print the header of the HTML page. + * + * @return void + */ + protected function printHeader() + { + $standard = $this->ruleset->name; + echo ''.PHP_EOL; + echo ' '.PHP_EOL; + echo " $standard Coding Standards".PHP_EOL; + echo ' '.PHP_EOL; + echo ' '.PHP_EOL; + echo ' '.PHP_EOL; + echo "

    $standard Coding Standards

    ".PHP_EOL; + + }//end printHeader() + + + /** + * Print the table of contents for the standard. + * + * The TOC is just an unordered list of bookmarks to sniffs on the page. + * + * @return void + */ + protected function printToc() + { + echo '

    Table of Contents

    '.PHP_EOL; + echo '
      '.PHP_EOL; + + foreach ($this->docFiles as $file) { + $doc = new \DOMDocument(); + $doc->load($file); + $documentation = $doc->getElementsByTagName('documentation')->item(0); + $title = $this->getTitle($documentation); + echo '
    • $title
    • ".PHP_EOL; + } + + echo '
    '.PHP_EOL; + + }//end printToc() + + + /** + * Print the footer of the HTML page. + * + * @return void + */ + protected function printFooter() + { + // Turn off errors so we don't get timezone warnings if people + // don't have their timezone set. + $errorLevel = error_reporting(0); + echo '
    '; + echo 'Documentation generated on '.date('r'); + echo ' by PHP_CodeSniffer '.Config::VERSION.''; + echo '
    '.PHP_EOL; + error_reporting($errorLevel); + + echo ' '.PHP_EOL; + echo ''.PHP_EOL; + + }//end printFooter() + + + /** + * Process the documentation for a single sniff. + * + * @param \DOMNode $doc The DOMNode object for the sniff. + * It represents the "documentation" tag in the XML + * standard file. + * + * @return void + */ + public function processSniff(\DOMNode $doc) + { + $title = $this->getTitle($doc); + echo ' '.PHP_EOL; + echo "

    $title

    ".PHP_EOL; + + foreach ($doc->childNodes as $node) { + if ($node->nodeName === 'standard') { + $this->printTextBlock($node); + } else if ($node->nodeName === 'code_comparison') { + $this->printCodeComparisonBlock($node); + } + } + + }//end processSniff() + + + /** + * Print a text block found in a standard. + * + * @param \DOMNode $node The DOMNode object for the text block. + * + * @return void + */ + protected function printTextBlock(\DOMNode $node) + { + $content = trim($node->nodeValue); + $content = htmlspecialchars($content); + + // Allow em tags only. + $content = str_replace('<em>', '', $content); + $content = str_replace('</em>', '', $content); + + echo "

    $content

    ".PHP_EOL; + + }//end printTextBlock() + + + /** + * Print a code comparison block found in a standard. + * + * @param \DOMNode $node The DOMNode object for the code comparison block. + * + * @return void + */ + protected function printCodeComparisonBlock(\DOMNode $node) + { + $codeBlocks = $node->getElementsByTagName('code'); + + $firstTitle = $codeBlocks->item(0)->getAttribute('title'); + $first = trim($codeBlocks->item(0)->nodeValue); + $first = str_replace('', $first); + $first = str_replace(' ', ' ', $first); + $first = str_replace('', '', $first); + $first = str_replace('', '', $first); + + $secondTitle = $codeBlocks->item(1)->getAttribute('title'); + $second = trim($codeBlocks->item(1)->nodeValue); + $second = str_replace('', $second); + $second = str_replace(' ', ' ', $second); + $second = str_replace('', '', $second); + $second = str_replace('', '', $second); + + echo ' '.PHP_EOL; + echo ' '.PHP_EOL; + echo " ".PHP_EOL; + echo " ".PHP_EOL; + echo ' '.PHP_EOL; + echo ' '.PHP_EOL; + echo " ".PHP_EOL; + echo " ".PHP_EOL; + echo ' '.PHP_EOL; + echo '
    $firstTitle$secondTitle
    $first$second
    '.PHP_EOL; + + }//end printCodeComparisonBlock() + + +}//end class diff --git a/vendor/squizlabs/php_codesniffer/src/Generators/Markdown.php b/vendor/squizlabs/php_codesniffer/src/Generators/Markdown.php new file mode 100644 index 00000000..9756bcf1 --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Generators/Markdown.php @@ -0,0 +1,161 @@ + + * @copyright 2014 Arroba IT + * @license https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence + */ + +namespace PHP_CodeSniffer\Generators; + +use PHP_CodeSniffer\Config; + +class Markdown extends Generator +{ + + + /** + * Generates the documentation for a standard. + * + * @return void + * @see processSniff() + */ + public function generate() + { + ob_start(); + $this->printHeader(); + + foreach ($this->docFiles as $file) { + $doc = new \DOMDocument(); + $doc->load($file); + $documentation = $doc->getElementsByTagName('documentation')->item(0); + $this->processSniff($documentation); + } + + $this->printFooter(); + $content = ob_get_contents(); + ob_end_clean(); + + echo $content; + + }//end generate() + + + /** + * Print the markdown header. + * + * @return void + */ + protected function printHeader() + { + $standard = $this->ruleset->name; + + echo "# $standard Coding Standard".PHP_EOL; + + }//end printHeader() + + + /** + * Print the markdown footer. + * + * @return void + */ + protected function printFooter() + { + // Turn off errors so we don't get timezone warnings if people + // don't have their timezone set. + error_reporting(0); + echo 'Documentation generated on '.date('r'); + echo ' by [PHP_CodeSniffer '.Config::VERSION.'](https://github.com/squizlabs/PHP_CodeSniffer)'.PHP_EOL; + + }//end printFooter() + + + /** + * Process the documentation for a single sniff. + * + * @param \DOMNode $doc The DOMNode object for the sniff. + * It represents the "documentation" tag in the XML + * standard file. + * + * @return void + */ + protected function processSniff(\DOMNode $doc) + { + $title = $this->getTitle($doc); + echo PHP_EOL."## $title".PHP_EOL; + + foreach ($doc->childNodes as $node) { + if ($node->nodeName === 'standard') { + $this->printTextBlock($node); + } else if ($node->nodeName === 'code_comparison') { + $this->printCodeComparisonBlock($node); + } + } + + }//end processSniff() + + + /** + * Print a text block found in a standard. + * + * @param \DOMNode $node The DOMNode object for the text block. + * + * @return void + */ + protected function printTextBlock(\DOMNode $node) + { + $content = trim($node->nodeValue); + $content = htmlspecialchars($content); + + $content = str_replace('<em>', '*', $content); + $content = str_replace('</em>', '*', $content); + + echo $content.PHP_EOL; + + }//end printTextBlock() + + + /** + * Print a code comparison block found in a standard. + * + * @param \DOMNode $node The DOMNode object for the code comparison block. + * + * @return void + */ + protected function printCodeComparisonBlock(\DOMNode $node) + { + $codeBlocks = $node->getElementsByTagName('code'); + + $firstTitle = $codeBlocks->item(0)->getAttribute('title'); + $first = trim($codeBlocks->item(0)->nodeValue); + $first = str_replace("\n", "\n ", $first); + $first = str_replace('', '', $first); + $first = str_replace('', '', $first); + + $secondTitle = $codeBlocks->item(1)->getAttribute('title'); + $second = trim($codeBlocks->item(1)->nodeValue); + $second = str_replace("\n", "\n ", $second); + $second = str_replace('', '', $second); + $second = str_replace('', '', $second); + + echo ' '.PHP_EOL; + echo ' '.PHP_EOL; + echo " ".PHP_EOL; + echo " ".PHP_EOL; + echo ' '.PHP_EOL; + echo ' '.PHP_EOL; + echo ''.PHP_EOL; + echo ''.PHP_EOL; + echo ' '.PHP_EOL; + echo '
    $firstTitle$secondTitle
    '.PHP_EOL.PHP_EOL; + echo " $first".PHP_EOL.PHP_EOL; + echo ''.PHP_EOL.PHP_EOL; + echo " $second".PHP_EOL.PHP_EOL; + echo '
    '.PHP_EOL; + + }//end printCodeComparisonBlock() + + +}//end class diff --git a/vendor/squizlabs/php_codesniffer/src/Generators/Text.php b/vendor/squizlabs/php_codesniffer/src/Generators/Text.php new file mode 100644 index 00000000..ffff206a --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Generators/Text.php @@ -0,0 +1,253 @@ + + * @copyright 2006-2015 Squiz Pty Ltd (ABN 77 084 670 600) + * @license https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence + */ + +namespace PHP_CodeSniffer\Generators; + +class Text extends Generator +{ + + + /** + * Process the documentation for a single sniff. + * + * @param \DOMNode $doc The DOMNode object for the sniff. + * It represents the "documentation" tag in the XML + * standard file. + * + * @return void + */ + public function processSniff(\DOMNode $doc) + { + $this->printTitle($doc); + + foreach ($doc->childNodes as $node) { + if ($node->nodeName === 'standard') { + $this->printTextBlock($node); + } else if ($node->nodeName === 'code_comparison') { + $this->printCodeComparisonBlock($node); + } + } + + }//end processSniff() + + + /** + * Prints the title area for a single sniff. + * + * @param \DOMNode $doc The DOMNode object for the sniff. + * It represents the "documentation" tag in the XML + * standard file. + * + * @return void + */ + protected function printTitle(\DOMNode $doc) + { + $title = $this->getTitle($doc); + $standard = $this->ruleset->name; + + echo PHP_EOL; + echo str_repeat('-', (strlen("$standard CODING STANDARD: $title") + 4)); + echo strtoupper(PHP_EOL."| $standard CODING STANDARD: $title |".PHP_EOL); + echo str_repeat('-', (strlen("$standard CODING STANDARD: $title") + 4)); + echo PHP_EOL.PHP_EOL; + + }//end printTitle() + + + /** + * Print a text block found in a standard. + * + * @param \DOMNode $node The DOMNode object for the text block. + * + * @return void + */ + protected function printTextBlock(\DOMNode $node) + { + $text = trim($node->nodeValue); + $text = str_replace('', '*', $text); + $text = str_replace('', '*', $text); + + $nodeLines = explode("\n", $text); + $lines = []; + + foreach ($nodeLines as $currentLine) { + $currentLine = trim($currentLine); + if ($currentLine === '') { + // The text contained a blank line. Respect this. + $lines[] = ''; + continue; + } + + $tempLine = ''; + $words = explode(' ', $currentLine); + + foreach ($words as $word) { + $currentLength = strlen($tempLine.$word); + if ($currentLength < 99) { + $tempLine .= $word.' '; + continue; + } + + if ($currentLength === 99 || $currentLength === 100) { + // We are already at the edge, so we are done. + $lines[] = $tempLine.$word; + $tempLine = ''; + } else { + $lines[] = rtrim($tempLine); + $tempLine = $word.' '; + } + }//end foreach + + if ($tempLine !== '') { + $lines[] = rtrim($tempLine); + } + }//end foreach + + echo implode(PHP_EOL, $lines).PHP_EOL.PHP_EOL; + + }//end printTextBlock() + + + /** + * Print a code comparison block found in a standard. + * + * @param \DOMNode $node The DOMNode object for the code comparison block. + * + * @return void + */ + protected function printCodeComparisonBlock(\DOMNode $node) + { + $codeBlocks = $node->getElementsByTagName('code'); + $first = trim($codeBlocks->item(0)->nodeValue); + $firstTitle = $codeBlocks->item(0)->getAttribute('title'); + + $firstTitleLines = []; + $tempTitle = ''; + $words = explode(' ', $firstTitle); + + foreach ($words as $word) { + if (strlen($tempTitle.$word) >= 45) { + if (strlen($tempTitle.$word) === 45) { + // Adding the extra space will push us to the edge + // so we are done. + $firstTitleLines[] = $tempTitle.$word; + $tempTitle = ''; + } else if (strlen($tempTitle.$word) === 46) { + // We are already at the edge, so we are done. + $firstTitleLines[] = $tempTitle.$word; + $tempTitle = ''; + } else { + $firstTitleLines[] = $tempTitle; + $tempTitle = $word.' '; + } + } else { + $tempTitle .= $word.' '; + } + }//end foreach + + if ($tempTitle !== '') { + $firstTitleLines[] = $tempTitle; + } + + $first = str_replace('', '', $first); + $first = str_replace('', '', $first); + $firstLines = explode("\n", $first); + + $second = trim($codeBlocks->item(1)->nodeValue); + $secondTitle = $codeBlocks->item(1)->getAttribute('title'); + + $secondTitleLines = []; + $tempTitle = ''; + $words = explode(' ', $secondTitle); + + foreach ($words as $word) { + if (strlen($tempTitle.$word) >= 45) { + if (strlen($tempTitle.$word) === 45) { + // Adding the extra space will push us to the edge + // so we are done. + $secondTitleLines[] = $tempTitle.$word; + $tempTitle = ''; + } else if (strlen($tempTitle.$word) === 46) { + // We are already at the edge, so we are done. + $secondTitleLines[] = $tempTitle.$word; + $tempTitle = ''; + } else { + $secondTitleLines[] = $tempTitle; + $tempTitle = $word.' '; + } + } else { + $tempTitle .= $word.' '; + } + }//end foreach + + if ($tempTitle !== '') { + $secondTitleLines[] = $tempTitle; + } + + $second = str_replace('', '', $second); + $second = str_replace('', '', $second); + $secondLines = explode("\n", $second); + + $maxCodeLines = max(count($firstLines), count($secondLines)); + $maxTitleLines = max(count($firstTitleLines), count($secondTitleLines)); + + echo str_repeat('-', 41); + echo ' CODE COMPARISON '; + echo str_repeat('-', 42).PHP_EOL; + + for ($i = 0; $i < $maxTitleLines; $i++) { + if (isset($firstTitleLines[$i]) === true) { + $firstLineText = $firstTitleLines[$i]; + } else { + $firstLineText = ''; + } + + if (isset($secondTitleLines[$i]) === true) { + $secondLineText = $secondTitleLines[$i]; + } else { + $secondLineText = ''; + } + + echo '| '; + echo $firstLineText.str_repeat(' ', (46 - strlen($firstLineText))); + echo ' | '; + echo $secondLineText.str_repeat(' ', (47 - strlen($secondLineText))); + echo ' |'.PHP_EOL; + }//end for + + echo str_repeat('-', 100).PHP_EOL; + + for ($i = 0; $i < $maxCodeLines; $i++) { + if (isset($firstLines[$i]) === true) { + $firstLineText = $firstLines[$i]; + } else { + $firstLineText = ''; + } + + if (isset($secondLines[$i]) === true) { + $secondLineText = $secondLines[$i]; + } else { + $secondLineText = ''; + } + + echo '| '; + echo $firstLineText.str_repeat(' ', max(0, (47 - strlen($firstLineText)))); + echo '| '; + echo $secondLineText.str_repeat(' ', max(0, (48 - strlen($secondLineText)))); + echo '|'.PHP_EOL; + }//end for + + echo str_repeat('-', 100).PHP_EOL.PHP_EOL; + + }//end printCodeComparisonBlock() + + +}//end class diff --git a/vendor/squizlabs/php_codesniffer/src/Reporter.php b/vendor/squizlabs/php_codesniffer/src/Reporter.php new file mode 100644 index 00000000..e89a20ed --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Reporter.php @@ -0,0 +1,423 @@ + + * @copyright 2006-2015 Squiz Pty Ltd (ABN 77 084 670 600) + * @license https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence + */ + +namespace PHP_CodeSniffer; + +use PHP_CodeSniffer\Exceptions\DeepExitException; +use PHP_CodeSniffer\Exceptions\RuntimeException; +use PHP_CodeSniffer\Files\File; +use PHP_CodeSniffer\Reports\Report; +use PHP_CodeSniffer\Util\Common; + +class Reporter +{ + + /** + * The config data for the run. + * + * @var \PHP_CodeSniffer\Config + */ + public $config = null; + + /** + * Total number of files that contain errors or warnings. + * + * @var integer + */ + public $totalFiles = 0; + + /** + * Total number of errors found during the run. + * + * @var integer + */ + public $totalErrors = 0; + + /** + * Total number of warnings found during the run. + * + * @var integer + */ + public $totalWarnings = 0; + + /** + * Total number of errors/warnings that can be fixed. + * + * @var integer + */ + public $totalFixable = 0; + + /** + * Total number of errors/warnings that were fixed. + * + * @var integer + */ + public $totalFixed = 0; + + /** + * When the PHPCS run started. + * + * @var float + */ + public static $startTime = 0; + + /** + * A cache of report objects. + * + * @var array + */ + private $reports = []; + + /** + * A cache of opened temporary files. + * + * @var array + */ + private $tmpFiles = []; + + + /** + * Initialise the reporter. + * + * All reports specified in the config will be created and their + * output file (or a temp file if none is specified) initialised by + * clearing the current contents. + * + * @param \PHP_CodeSniffer\Config $config The config data for the run. + * + * @return void + * @throws \PHP_CodeSniffer\Exceptions\DeepExitException If a custom report class could not be found. + * @throws \PHP_CodeSniffer\Exceptions\RuntimeException If a report class is incorrectly set up. + */ + public function __construct(Config $config) + { + $this->config = $config; + + foreach ($config->reports as $type => $output) { + if ($output === null) { + $output = $config->reportFile; + } + + $reportClassName = ''; + if (strpos($type, '.') !== false) { + // This is a path to a custom report class. + $filename = realpath($type); + if ($filename === false) { + $error = "ERROR: Custom report \"$type\" not found".PHP_EOL; + throw new DeepExitException($error, 3); + } + + $reportClassName = Autoload::loadFile($filename); + } else if (class_exists('PHP_CodeSniffer\Reports\\'.ucfirst($type)) === true) { + // PHPCS native report. + $reportClassName = 'PHP_CodeSniffer\Reports\\'.ucfirst($type); + } else if (class_exists($type) === true) { + // FQN of a custom report. + $reportClassName = $type; + } else { + // OK, so not a FQN, try and find the report using the registered namespaces. + $registeredNamespaces = Autoload::getSearchPaths(); + $trimmedType = ltrim($type, '\\'); + + foreach ($registeredNamespaces as $nsPrefix) { + if ($nsPrefix === '') { + continue; + } + + if (class_exists($nsPrefix.'\\'.$trimmedType) === true) { + $reportClassName = $nsPrefix.'\\'.$trimmedType; + break; + } + } + }//end if + + if ($reportClassName === '') { + $error = "ERROR: Class file for report \"$type\" not found".PHP_EOL; + throw new DeepExitException($error, 3); + } + + $reportClass = new $reportClassName(); + if (($reportClass instanceof Report) === false) { + throw new RuntimeException('Class "'.$reportClassName.'" must implement the "PHP_CodeSniffer\Report" interface.'); + } + + $this->reports[$type] = [ + 'output' => $output, + 'class' => $reportClass, + ]; + + if ($output === null) { + // Using a temp file. + // This needs to be set in the constructor so that all + // child procs use the same report file when running in parallel. + $this->tmpFiles[$type] = tempnam(sys_get_temp_dir(), 'phpcs'); + file_put_contents($this->tmpFiles[$type], ''); + } else { + file_put_contents($output, ''); + } + }//end foreach + + }//end __construct() + + + /** + * Generates and prints final versions of all reports. + * + * Returns TRUE if any of the reports output content to the screen + * or FALSE if all reports were silently printed to a file. + * + * @return bool + */ + public function printReports() + { + $toScreen = false; + foreach ($this->reports as $type => $report) { + if ($report['output'] === null) { + $toScreen = true; + } + + $this->printReport($type); + } + + return $toScreen; + + }//end printReports() + + + /** + * Generates and prints a single final report. + * + * @param string $report The report type to print. + * + * @return void + */ + public function printReport($report) + { + $reportClass = $this->reports[$report]['class']; + $reportFile = $this->reports[$report]['output']; + + if ($reportFile !== null) { + $filename = $reportFile; + $toScreen = false; + } else { + if (isset($this->tmpFiles[$report]) === true) { + $filename = $this->tmpFiles[$report]; + } else { + $filename = null; + } + + $toScreen = true; + } + + $reportCache = ''; + if ($filename !== null) { + $reportCache = file_get_contents($filename); + } + + ob_start(); + $reportClass->generate( + $reportCache, + $this->totalFiles, + $this->totalErrors, + $this->totalWarnings, + $this->totalFixable, + $this->config->showSources, + $this->config->reportWidth, + $this->config->interactive, + $toScreen + ); + $generatedReport = ob_get_contents(); + ob_end_clean(); + + if ($this->config->colors !== true || $reportFile !== null) { + $generatedReport = preg_replace('`\033\[[0-9;]+m`', '', $generatedReport); + } + + if ($reportFile !== null) { + if (PHP_CODESNIFFER_VERBOSITY > 0) { + echo $generatedReport; + } + + file_put_contents($reportFile, $generatedReport.PHP_EOL); + } else { + echo $generatedReport; + if ($filename !== null && file_exists($filename) === true) { + unlink($filename); + unset($this->tmpFiles[$report]); + } + } + + }//end printReport() + + + /** + * Caches the result of a single processed file for all reports. + * + * The report content that is generated is appended to the output file + * assigned to each report. This content may be an intermediate report format + * and not reflect the final report output. + * + * @param \PHP_CodeSniffer\Files\File $phpcsFile The file that has been processed. + * + * @return void + */ + public function cacheFileReport(File $phpcsFile) + { + if (isset($this->config->reports) === false) { + // This happens during unit testing, or any time someone just wants + // the error data and not the printed report. + return; + } + + $reportData = $this->prepareFileReport($phpcsFile); + $errorsShown = false; + + foreach ($this->reports as $type => $report) { + $reportClass = $report['class']; + + ob_start(); + $result = $reportClass->generateFileReport($reportData, $phpcsFile, $this->config->showSources, $this->config->reportWidth); + if ($result === true) { + $errorsShown = true; + } + + $generatedReport = ob_get_contents(); + ob_end_clean(); + + if ($report['output'] === null) { + // Using a temp file. + if (isset($this->tmpFiles[$type]) === false) { + // When running in interactive mode, the reporter prints the full + // report many times, which will unlink the temp file. So we need + // to create a new one if it doesn't exist. + $this->tmpFiles[$type] = tempnam(sys_get_temp_dir(), 'phpcs'); + file_put_contents($this->tmpFiles[$type], ''); + } + + file_put_contents($this->tmpFiles[$type], $generatedReport, (FILE_APPEND | LOCK_EX)); + } else { + file_put_contents($report['output'], $generatedReport, (FILE_APPEND | LOCK_EX)); + }//end if + }//end foreach + + if ($errorsShown === true || PHP_CODESNIFFER_CBF === true) { + $this->totalFiles++; + $this->totalErrors += $reportData['errors']; + $this->totalWarnings += $reportData['warnings']; + + // When PHPCBF is running, we need to use the fixable error values + // after the report has run and fixed what it can. + if (PHP_CODESNIFFER_CBF === true) { + $this->totalFixable += $phpcsFile->getFixableCount(); + $this->totalFixed += $phpcsFile->getFixedCount(); + } else { + $this->totalFixable += $reportData['fixable']; + } + } + + }//end cacheFileReport() + + + /** + * Generate summary information to be used during report generation. + * + * @param \PHP_CodeSniffer\Files\File $phpcsFile The file that has been processed. + * + * @return array + */ + public function prepareFileReport(File $phpcsFile) + { + $report = [ + 'filename' => Common::stripBasepath($phpcsFile->getFilename(), $this->config->basepath), + 'errors' => $phpcsFile->getErrorCount(), + 'warnings' => $phpcsFile->getWarningCount(), + 'fixable' => $phpcsFile->getFixableCount(), + 'messages' => [], + ]; + + if ($report['errors'] === 0 && $report['warnings'] === 0) { + // Prefect score! + return $report; + } + + if ($this->config->recordErrors === false) { + $message = 'Errors are not being recorded but this report requires error messages. '; + $message .= 'This report will not show the correct information.'; + $report['messages'][1][1] = [ + [ + 'message' => $message, + 'source' => 'Internal.RecordErrors', + 'severity' => 5, + 'fixable' => false, + 'type' => 'ERROR', + ], + ]; + return $report; + } + + $errors = []; + + // Merge errors and warnings. + foreach ($phpcsFile->getErrors() as $line => $lineErrors) { + foreach ($lineErrors as $column => $colErrors) { + $newErrors = []; + foreach ($colErrors as $data) { + $newErrors[] = [ + 'message' => $data['message'], + 'source' => $data['source'], + 'severity' => $data['severity'], + 'fixable' => $data['fixable'], + 'type' => 'ERROR', + ]; + } + + $errors[$line][$column] = $newErrors; + } + + ksort($errors[$line]); + }//end foreach + + foreach ($phpcsFile->getWarnings() as $line => $lineWarnings) { + foreach ($lineWarnings as $column => $colWarnings) { + $newWarnings = []; + foreach ($colWarnings as $data) { + $newWarnings[] = [ + 'message' => $data['message'], + 'source' => $data['source'], + 'severity' => $data['severity'], + 'fixable' => $data['fixable'], + 'type' => 'WARNING', + ]; + } + + if (isset($errors[$line]) === false) { + $errors[$line] = []; + } + + if (isset($errors[$line][$column]) === true) { + $errors[$line][$column] = array_merge( + $newWarnings, + $errors[$line][$column] + ); + } else { + $errors[$line][$column] = $newWarnings; + } + }//end foreach + + ksort($errors[$line]); + }//end foreach + + ksort($errors); + $report['messages'] = $errors; + return $report; + + }//end prepareFileReport() + + +}//end class diff --git a/vendor/squizlabs/php_codesniffer/src/Reports/Cbf.php b/vendor/squizlabs/php_codesniffer/src/Reports/Cbf.php new file mode 100644 index 00000000..0ecde76e --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Reports/Cbf.php @@ -0,0 +1,253 @@ + + * @copyright 2006-2015 Squiz Pty Ltd (ABN 77 084 670 600) + * @license https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence + */ + +namespace PHP_CodeSniffer\Reports; + +use PHP_CodeSniffer\Exceptions\DeepExitException; +use PHP_CodeSniffer\Files\File; +use PHP_CodeSniffer\Util; + +class Cbf implements Report +{ + + + /** + * Generate a partial report for a single processed file. + * + * Function should return TRUE if it printed or stored data about the file + * and FALSE if it ignored the file. Returning TRUE indicates that the file and + * its data should be counted in the grand totals. + * + * @param array $report Prepared report data. + * @param \PHP_CodeSniffer\File $phpcsFile The file being reported on. + * @param bool $showSources Show sources? + * @param int $width Maximum allowed line width. + * + * @return bool + * @throws \PHP_CodeSniffer\Exceptions\DeepExitException + */ + public function generateFileReport($report, File $phpcsFile, $showSources=false, $width=80) + { + $errors = $phpcsFile->getFixableCount(); + if ($errors !== 0) { + if (PHP_CODESNIFFER_VERBOSITY > 0) { + ob_end_clean(); + $startTime = microtime(true); + echo "\t=> Fixing file: $errors/$errors violations remaining"; + if (PHP_CODESNIFFER_VERBOSITY > 1) { + echo PHP_EOL; + } + } + + $fixed = $phpcsFile->fixer->fixFile(); + } + + if ($phpcsFile->config->stdin === true) { + // Replacing STDIN, so output current file to STDOUT + // even if nothing was fixed. Exit here because we + // can't process any more than 1 file in this setup. + $fixedContent = $phpcsFile->fixer->getContents(); + throw new DeepExitException($fixedContent, 1); + } + + if ($errors === 0) { + return false; + } + + if (PHP_CODESNIFFER_VERBOSITY > 0) { + if ($fixed === false) { + echo 'ERROR'; + } else { + echo 'DONE'; + } + + $timeTaken = ((microtime(true) - $startTime) * 1000); + if ($timeTaken < 1000) { + $timeTaken = round($timeTaken); + echo " in {$timeTaken}ms".PHP_EOL; + } else { + $timeTaken = round(($timeTaken / 1000), 2); + echo " in $timeTaken secs".PHP_EOL; + } + } + + if ($fixed === true) { + // The filename in the report may be truncated due to a basepath setting + // but we are using it for writing here and not display, + // so find the correct path if basepath is in use. + $newFilename = $report['filename'].$phpcsFile->config->suffix; + if ($phpcsFile->config->basepath !== null) { + $newFilename = $phpcsFile->config->basepath.DIRECTORY_SEPARATOR.$newFilename; + } + + $newContent = $phpcsFile->fixer->getContents(); + file_put_contents($newFilename, $newContent); + + if (PHP_CODESNIFFER_VERBOSITY > 0) { + if ($newFilename === $report['filename']) { + echo "\t=> File was overwritten".PHP_EOL; + } else { + echo "\t=> Fixed file written to ".basename($newFilename).PHP_EOL; + } + } + } + + if (PHP_CODESNIFFER_VERBOSITY > 0) { + ob_start(); + } + + $errorCount = $phpcsFile->getErrorCount(); + $warningCount = $phpcsFile->getWarningCount(); + $fixableCount = $phpcsFile->getFixableCount(); + $fixedCount = ($errors - $fixableCount); + echo $report['filename'].">>$errorCount>>$warningCount>>$fixableCount>>$fixedCount".PHP_EOL; + + return $fixed; + + }//end generateFileReport() + + + /** + * Prints a summary of fixed files. + * + * @param string $cachedData Any partial report data that was returned from + * generateFileReport during the run. + * @param int $totalFiles Total number of files processed during the run. + * @param int $totalErrors Total number of errors found during the run. + * @param int $totalWarnings Total number of warnings found during the run. + * @param int $totalFixable Total number of problems that can be fixed. + * @param bool $showSources Show sources? + * @param int $width Maximum allowed line width. + * @param bool $interactive Are we running in interactive mode? + * @param bool $toScreen Is the report being printed to screen? + * + * @return void + */ + public function generate( + $cachedData, + $totalFiles, + $totalErrors, + $totalWarnings, + $totalFixable, + $showSources=false, + $width=80, + $interactive=false, + $toScreen=true + ) { + $lines = explode(PHP_EOL, $cachedData); + array_pop($lines); + + if (empty($lines) === true) { + echo PHP_EOL.'No fixable errors were found'.PHP_EOL; + return; + } + + $reportFiles = []; + $maxLength = 0; + $totalFixed = 0; + $failures = 0; + + foreach ($lines as $line) { + $parts = explode('>>', $line); + $fileLen = strlen($parts[0]); + $reportFiles[$parts[0]] = [ + 'errors' => $parts[1], + 'warnings' => $parts[2], + 'fixable' => $parts[3], + 'fixed' => $parts[4], + 'strlen' => $fileLen, + ]; + + $maxLength = max($maxLength, $fileLen); + + $totalFixed += $parts[4]; + + if ($parts[3] > 0) { + $failures++; + } + } + + $width = min($width, ($maxLength + 21)); + $width = max($width, 70); + + echo PHP_EOL."\033[1m".'PHPCBF RESULT SUMMARY'."\033[0m".PHP_EOL; + echo str_repeat('-', $width).PHP_EOL; + echo "\033[1m".'FILE'.str_repeat(' ', ($width - 20)).'FIXED REMAINING'."\033[0m".PHP_EOL; + echo str_repeat('-', $width).PHP_EOL; + + foreach ($reportFiles as $file => $data) { + $padding = ($width - 18 - $data['strlen']); + if ($padding < 0) { + $file = '...'.substr($file, (($padding * -1) + 3)); + $padding = 0; + } + + echo $file.str_repeat(' ', $padding).' '; + + if ($data['fixable'] > 0) { + echo "\033[31mFAILED TO FIX\033[0m".PHP_EOL; + continue; + } + + $remaining = ($data['errors'] + $data['warnings']); + + if ($data['fixed'] !== 0) { + echo $data['fixed']; + echo str_repeat(' ', (7 - strlen((string) $data['fixed']))); + } else { + echo '0 '; + } + + if ($remaining !== 0) { + echo $remaining; + } else { + echo '0'; + } + + echo PHP_EOL; + }//end foreach + + echo str_repeat('-', $width).PHP_EOL; + echo "\033[1mA TOTAL OF $totalFixed ERROR"; + if ($totalFixed !== 1) { + echo 'S'; + } + + $numFiles = count($reportFiles); + echo ' WERE FIXED IN '.$numFiles.' FILE'; + if ($numFiles !== 1) { + echo 'S'; + } + + echo "\033[0m"; + + if ($failures > 0) { + echo PHP_EOL.str_repeat('-', $width).PHP_EOL; + echo "\033[1mPHPCBF FAILED TO FIX $failures FILE"; + if ($failures !== 1) { + echo 'S'; + } + + echo "\033[0m"; + } + + echo PHP_EOL.str_repeat('-', $width).PHP_EOL.PHP_EOL; + + if ($toScreen === true && $interactive === false) { + Util\Timing::printRunTime(); + } + + }//end generate() + + +}//end class diff --git a/vendor/squizlabs/php_codesniffer/src/Reports/Checkstyle.php b/vendor/squizlabs/php_codesniffer/src/Reports/Checkstyle.php new file mode 100644 index 00000000..06a78e19 --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Reports/Checkstyle.php @@ -0,0 +1,109 @@ + + * @copyright 2006-2015 Squiz Pty Ltd (ABN 77 084 670 600) + * @license https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence + */ + +namespace PHP_CodeSniffer\Reports; + +use PHP_CodeSniffer\Config; +use PHP_CodeSniffer\Files\File; + +class Checkstyle implements Report +{ + + + /** + * Generate a partial report for a single processed file. + * + * Function should return TRUE if it printed or stored data about the file + * and FALSE if it ignored the file. Returning TRUE indicates that the file and + * its data should be counted in the grand totals. + * + * @param array $report Prepared report data. + * @param \PHP_CodeSniffer\File $phpcsFile The file being reported on. + * @param bool $showSources Show sources? + * @param int $width Maximum allowed line width. + * + * @return bool + */ + public function generateFileReport($report, File $phpcsFile, $showSources=false, $width=80) + { + $out = new \XMLWriter; + $out->openMemory(); + $out->setIndent(true); + + if ($report['errors'] === 0 && $report['warnings'] === 0) { + // Nothing to print. + return false; + } + + $out->startElement('file'); + $out->writeAttribute('name', $report['filename']); + + foreach ($report['messages'] as $line => $lineErrors) { + foreach ($lineErrors as $column => $colErrors) { + foreach ($colErrors as $error) { + $error['type'] = strtolower($error['type']); + if ($phpcsFile->config->encoding !== 'utf-8') { + $error['message'] = iconv($phpcsFile->config->encoding, 'utf-8', $error['message']); + } + + $out->startElement('error'); + $out->writeAttribute('line', $line); + $out->writeAttribute('column', $column); + $out->writeAttribute('severity', $error['type']); + $out->writeAttribute('message', $error['message']); + $out->writeAttribute('source', $error['source']); + $out->endElement(); + } + } + }//end foreach + + $out->endElement(); + echo $out->flush(); + + return true; + + }//end generateFileReport() + + + /** + * Prints all violations for processed files, in a Checkstyle format. + * + * @param string $cachedData Any partial report data that was returned from + * generateFileReport during the run. + * @param int $totalFiles Total number of files processed during the run. + * @param int $totalErrors Total number of errors found during the run. + * @param int $totalWarnings Total number of warnings found during the run. + * @param int $totalFixable Total number of problems that can be fixed. + * @param bool $showSources Show sources? + * @param int $width Maximum allowed line width. + * @param bool $interactive Are we running in interactive mode? + * @param bool $toScreen Is the report being printed to screen? + * + * @return void + */ + public function generate( + $cachedData, + $totalFiles, + $totalErrors, + $totalWarnings, + $totalFixable, + $showSources=false, + $width=80, + $interactive=false, + $toScreen=true + ) { + echo ''.PHP_EOL; + echo ''.PHP_EOL; + echo $cachedData; + echo ''.PHP_EOL; + + }//end generate() + + +}//end class diff --git a/vendor/squizlabs/php_codesniffer/src/Reports/Code.php b/vendor/squizlabs/php_codesniffer/src/Reports/Code.php new file mode 100644 index 00000000..c54c1e1a --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Reports/Code.php @@ -0,0 +1,362 @@ + + * @copyright 2006-2015 Squiz Pty Ltd (ABN 77 084 670 600) + * @license https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence + */ + +namespace PHP_CodeSniffer\Reports; + +use PHP_CodeSniffer\Files\File; +use PHP_CodeSniffer\Util; + +class Code implements Report +{ + + + /** + * Generate a partial report for a single processed file. + * + * Function should return TRUE if it printed or stored data about the file + * and FALSE if it ignored the file. Returning TRUE indicates that the file and + * its data should be counted in the grand totals. + * + * @param array $report Prepared report data. + * @param \PHP_CodeSniffer\File $phpcsFile The file being reported on. + * @param bool $showSources Show sources? + * @param int $width Maximum allowed line width. + * + * @return bool + */ + public function generateFileReport($report, File $phpcsFile, $showSources=false, $width=80) + { + if ($report['errors'] === 0 && $report['warnings'] === 0) { + // Nothing to print. + return false; + } + + // How many lines to show about and below the error line. + $surroundingLines = 2; + + $file = $report['filename']; + $tokens = $phpcsFile->getTokens(); + if (empty($tokens) === true) { + if (PHP_CODESNIFFER_VERBOSITY === 1) { + $startTime = microtime(true); + echo 'CODE report is parsing '.basename($file).' '; + } else if (PHP_CODESNIFFER_VERBOSITY > 1) { + echo "CODE report is forcing parse of $file".PHP_EOL; + } + + try { + $phpcsFile->parse(); + } catch (\Exception $e) { + // This is a second parse, so ignore exceptions. + // They would have been added to the file's error list already. + } + + if (PHP_CODESNIFFER_VERBOSITY === 1) { + $timeTaken = ((microtime(true) - $startTime) * 1000); + if ($timeTaken < 1000) { + $timeTaken = round($timeTaken); + echo "DONE in {$timeTaken}ms"; + } else { + $timeTaken = round(($timeTaken / 1000), 2); + echo "DONE in $timeTaken secs"; + } + + echo PHP_EOL; + } + + $tokens = $phpcsFile->getTokens(); + }//end if + + // Create an array that maps lines to the first token on the line. + $lineTokens = []; + $lastLine = 0; + $stackPtr = 0; + foreach ($tokens as $stackPtr => $token) { + if ($token['line'] !== $lastLine) { + if ($lastLine > 0) { + $lineTokens[$lastLine]['end'] = ($stackPtr - 1); + } + + $lastLine++; + $lineTokens[$lastLine] = [ + 'start' => $stackPtr, + 'end' => null, + ]; + } + } + + // Make sure the last token in the file sits on an imaginary + // last line so it is easier to generate code snippets at the + // end of the file. + $lineTokens[$lastLine]['end'] = $stackPtr; + + // Determine the longest code line we will be showing. + $maxSnippetLength = 0; + $eolLen = strlen($phpcsFile->eolChar); + foreach ($report['messages'] as $line => $lineErrors) { + $startLine = max(($line - $surroundingLines), 1); + $endLine = min(($line + $surroundingLines), $lastLine); + + $maxLineNumLength = strlen($endLine); + + for ($i = $startLine; $i <= $endLine; $i++) { + if ($i === 1) { + continue; + } + + $lineLength = ($tokens[($lineTokens[$i]['start'] - 1)]['column'] + $tokens[($lineTokens[$i]['start'] - 1)]['length'] - $eolLen); + $maxSnippetLength = max($lineLength, $maxSnippetLength); + } + } + + $maxSnippetLength += ($maxLineNumLength + 8); + + // Determine the longest error message we will be showing. + $maxErrorLength = 0; + foreach ($report['messages'] as $line => $lineErrors) { + foreach ($lineErrors as $column => $colErrors) { + foreach ($colErrors as $error) { + $length = strlen($error['message']); + if ($showSources === true) { + $length += (strlen($error['source']) + 3); + } + + $maxErrorLength = max($maxErrorLength, ($length + 1)); + } + } + } + + // The padding that all lines will require that are printing an error message overflow. + if ($report['warnings'] > 0) { + $typeLength = 7; + } else { + $typeLength = 5; + } + + $errorPadding = str_repeat(' ', ($maxLineNumLength + 7)); + $errorPadding .= str_repeat(' ', $typeLength); + $errorPadding .= ' '; + if ($report['fixable'] > 0) { + $errorPadding .= ' '; + } + + $errorPaddingLength = strlen($errorPadding); + + // The maximum amount of space an error message can use. + $maxErrorSpace = ($width - $errorPaddingLength); + if ($showSources === true) { + // Account for the chars used to print colors. + $maxErrorSpace += 8; + } + + // Figure out the max report width we need and can use. + $fileLength = strlen($file); + $maxWidth = max(($fileLength + 6), ($maxErrorLength + $errorPaddingLength)); + $width = max(min($width, $maxWidth), $maxSnippetLength); + if ($width < 70) { + $width = 70; + } + + // Print the file header. + echo PHP_EOL."\033[1mFILE: "; + if ($fileLength <= ($width - 6)) { + echo $file; + } else { + echo '...'.substr($file, ($fileLength - ($width - 6))); + } + + echo "\033[0m".PHP_EOL; + echo str_repeat('-', $width).PHP_EOL; + + echo "\033[1m".'FOUND '.$report['errors'].' ERROR'; + if ($report['errors'] !== 1) { + echo 'S'; + } + + if ($report['warnings'] > 0) { + echo ' AND '.$report['warnings'].' WARNING'; + if ($report['warnings'] !== 1) { + echo 'S'; + } + } + + echo ' AFFECTING '.count($report['messages']).' LINE'; + if (count($report['messages']) !== 1) { + echo 'S'; + } + + echo "\033[0m".PHP_EOL; + + foreach ($report['messages'] as $line => $lineErrors) { + $startLine = max(($line - $surroundingLines), 1); + $endLine = min(($line + $surroundingLines), $lastLine); + + $snippet = ''; + if (isset($lineTokens[$startLine]) === true) { + for ($i = $lineTokens[$startLine]['start']; $i <= $lineTokens[$endLine]['end']; $i++) { + $snippetLine = $tokens[$i]['line']; + if ($lineTokens[$snippetLine]['start'] === $i) { + // Starting a new line. + if ($snippetLine === $line) { + $snippet .= "\033[1m".'>> '; + } else { + $snippet .= ' '; + } + + $snippet .= str_repeat(' ', ($maxLineNumLength - strlen($snippetLine))); + $snippet .= $snippetLine.': '; + if ($snippetLine === $line) { + $snippet .= "\033[0m"; + } + } + + if (isset($tokens[$i]['orig_content']) === true) { + $tokenContent = $tokens[$i]['orig_content']; + } else { + $tokenContent = $tokens[$i]['content']; + } + + if (strpos($tokenContent, "\t") !== false) { + $token = $tokens[$i]; + $token['content'] = $tokenContent; + if (strtoupper(substr(PHP_OS, 0, 3)) === 'WIN') { + $tab = "\000"; + } else { + $tab = "\033[30;1m»\033[0m"; + } + + $phpcsFile->tokenizer->replaceTabsInToken($token, $tab, "\000"); + $tokenContent = $token['content']; + } + + $tokenContent = Util\Common::prepareForOutput($tokenContent, ["\r", "\n", "\t"]); + $tokenContent = str_replace("\000", ' ', $tokenContent); + + $underline = false; + if ($snippetLine === $line && isset($lineErrors[$tokens[$i]['column']]) === true) { + $underline = true; + } + + // Underline invisible characters as well. + if ($underline === true && trim($tokenContent) === '') { + $snippet .= "\033[4m".' '."\033[0m".$tokenContent; + } else { + if ($underline === true) { + $snippet .= "\033[4m"; + } + + $snippet .= $tokenContent; + + if ($underline === true) { + $snippet .= "\033[0m"; + } + } + }//end for + }//end if + + echo str_repeat('-', $width).PHP_EOL; + + foreach ($lineErrors as $column => $colErrors) { + foreach ($colErrors as $error) { + $padding = ($maxLineNumLength - strlen($line)); + echo 'LINE '.str_repeat(' ', $padding).$line.': '; + + if ($error['type'] === 'ERROR') { + echo "\033[31mERROR\033[0m"; + if ($report['warnings'] > 0) { + echo ' '; + } + } else { + echo "\033[33mWARNING\033[0m"; + } + + echo ' '; + if ($report['fixable'] > 0) { + echo '['; + if ($error['fixable'] === true) { + echo 'x'; + } else { + echo ' '; + } + + echo '] '; + } + + $message = $error['message']; + $message = str_replace("\n", "\n".$errorPadding, $message); + if ($showSources === true) { + $message = "\033[1m".$message."\033[0m".' ('.$error['source'].')'; + } + + $errorMsg = wordwrap( + $message, + $maxErrorSpace, + PHP_EOL.$errorPadding + ); + + echo $errorMsg.PHP_EOL; + }//end foreach + }//end foreach + + echo str_repeat('-', $width).PHP_EOL; + echo rtrim($snippet).PHP_EOL; + }//end foreach + + echo str_repeat('-', $width).PHP_EOL; + if ($report['fixable'] > 0) { + echo "\033[1m".'PHPCBF CAN FIX THE '.$report['fixable'].' MARKED SNIFF VIOLATIONS AUTOMATICALLY'."\033[0m".PHP_EOL; + echo str_repeat('-', $width).PHP_EOL; + } + + return true; + + }//end generateFileReport() + + + /** + * Prints all errors and warnings for each file processed. + * + * @param string $cachedData Any partial report data that was returned from + * generateFileReport during the run. + * @param int $totalFiles Total number of files processed during the run. + * @param int $totalErrors Total number of errors found during the run. + * @param int $totalWarnings Total number of warnings found during the run. + * @param int $totalFixable Total number of problems that can be fixed. + * @param bool $showSources Show sources? + * @param int $width Maximum allowed line width. + * @param bool $interactive Are we running in interactive mode? + * @param bool $toScreen Is the report being printed to screen? + * + * @return void + */ + public function generate( + $cachedData, + $totalFiles, + $totalErrors, + $totalWarnings, + $totalFixable, + $showSources=false, + $width=80, + $interactive=false, + $toScreen=true + ) { + if ($cachedData === '') { + return; + } + + echo $cachedData; + + if ($toScreen === true && $interactive === false) { + Util\Timing::printRunTime(); + } + + }//end generate() + + +}//end class diff --git a/vendor/squizlabs/php_codesniffer/src/Reports/Csv.php b/vendor/squizlabs/php_codesniffer/src/Reports/Csv.php new file mode 100644 index 00000000..6db7ecfc --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Reports/Csv.php @@ -0,0 +1,91 @@ + + * @copyright 2006-2015 Squiz Pty Ltd (ABN 77 084 670 600) + * @license https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence + */ + +namespace PHP_CodeSniffer\Reports; + +use PHP_CodeSniffer\Files\File; + +class Csv implements Report +{ + + + /** + * Generate a partial report for a single processed file. + * + * Function should return TRUE if it printed or stored data about the file + * and FALSE if it ignored the file. Returning TRUE indicates that the file and + * its data should be counted in the grand totals. + * + * @param array $report Prepared report data. + * @param \PHP_CodeSniffer\File $phpcsFile The file being reported on. + * @param bool $showSources Show sources? + * @param int $width Maximum allowed line width. + * + * @return bool + */ + public function generateFileReport($report, File $phpcsFile, $showSources=false, $width=80) + { + if ($report['errors'] === 0 && $report['warnings'] === 0) { + // Nothing to print. + return false; + } + + foreach ($report['messages'] as $line => $lineErrors) { + foreach ($lineErrors as $column => $colErrors) { + foreach ($colErrors as $error) { + $filename = str_replace('"', '\"', $report['filename']); + $message = str_replace('"', '\"', $error['message']); + $type = strtolower($error['type']); + $source = $error['source']; + $severity = $error['severity']; + $fixable = (int) $error['fixable']; + echo "\"$filename\",$line,$column,$type,\"$message\",$source,$severity,$fixable".PHP_EOL; + } + } + } + + return true; + + }//end generateFileReport() + + + /** + * Generates a csv report. + * + * @param string $cachedData Any partial report data that was returned from + * generateFileReport during the run. + * @param int $totalFiles Total number of files processed during the run. + * @param int $totalErrors Total number of errors found during the run. + * @param int $totalWarnings Total number of warnings found during the run. + * @param int $totalFixable Total number of problems that can be fixed. + * @param bool $showSources Show sources? + * @param int $width Maximum allowed line width. + * @param bool $interactive Are we running in interactive mode? + * @param bool $toScreen Is the report being printed to screen? + * + * @return void + */ + public function generate( + $cachedData, + $totalFiles, + $totalErrors, + $totalWarnings, + $totalFixable, + $showSources=false, + $width=80, + $interactive=false, + $toScreen=true + ) { + echo 'File,Line,Column,Type,Message,Source,Severity,Fixable'.PHP_EOL; + echo $cachedData; + + }//end generate() + + +}//end class diff --git a/vendor/squizlabs/php_codesniffer/src/Reports/Diff.php b/vendor/squizlabs/php_codesniffer/src/Reports/Diff.php new file mode 100644 index 00000000..ce4b31fc --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Reports/Diff.php @@ -0,0 +1,130 @@ + + * @copyright 2006-2015 Squiz Pty Ltd (ABN 77 084 670 600) + * @license https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence + */ + +namespace PHP_CodeSniffer\Reports; + +use PHP_CodeSniffer\Files\File; + +class Diff implements Report +{ + + + /** + * Generate a partial report for a single processed file. + * + * Function should return TRUE if it printed or stored data about the file + * and FALSE if it ignored the file. Returning TRUE indicates that the file and + * its data should be counted in the grand totals. + * + * @param array $report Prepared report data. + * @param \PHP_CodeSniffer\File $phpcsFile The file being reported on. + * @param bool $showSources Show sources? + * @param int $width Maximum allowed line width. + * + * @return bool + */ + public function generateFileReport($report, File $phpcsFile, $showSources=false, $width=80) + { + $errors = $phpcsFile->getFixableCount(); + if ($errors === 0) { + return false; + } + + $phpcsFile->disableCaching(); + $tokens = $phpcsFile->getTokens(); + if (empty($tokens) === true) { + if (PHP_CODESNIFFER_VERBOSITY === 1) { + $startTime = microtime(true); + echo 'DIFF report is parsing '.basename($report['filename']).' '; + } else if (PHP_CODESNIFFER_VERBOSITY > 1) { + echo 'DIFF report is forcing parse of '.$report['filename'].PHP_EOL; + } + + $phpcsFile->parse(); + + if (PHP_CODESNIFFER_VERBOSITY === 1) { + $timeTaken = ((microtime(true) - $startTime) * 1000); + if ($timeTaken < 1000) { + $timeTaken = round($timeTaken); + echo "DONE in {$timeTaken}ms"; + } else { + $timeTaken = round(($timeTaken / 1000), 2); + echo "DONE in $timeTaken secs"; + } + + echo PHP_EOL; + } + + $phpcsFile->fixer->startFile($phpcsFile); + }//end if + + if (PHP_CODESNIFFER_VERBOSITY > 1) { + ob_end_clean(); + echo "\t*** START FILE FIXING ***".PHP_EOL; + } + + $fixed = $phpcsFile->fixer->fixFile(); + + if (PHP_CODESNIFFER_VERBOSITY > 1) { + echo "\t*** END FILE FIXING ***".PHP_EOL; + ob_start(); + } + + if ($fixed === false) { + return false; + } + + $diff = $phpcsFile->fixer->generateDiff(); + if ($diff === '') { + // Nothing to print. + return false; + } + + echo $diff.PHP_EOL; + return true; + + }//end generateFileReport() + + + /** + * Prints all errors and warnings for each file processed. + * + * @param string $cachedData Any partial report data that was returned from + * generateFileReport during the run. + * @param int $totalFiles Total number of files processed during the run. + * @param int $totalErrors Total number of errors found during the run. + * @param int $totalWarnings Total number of warnings found during the run. + * @param int $totalFixable Total number of problems that can be fixed. + * @param bool $showSources Show sources? + * @param int $width Maximum allowed line width. + * @param bool $interactive Are we running in interactive mode? + * @param bool $toScreen Is the report being printed to screen? + * + * @return void + */ + public function generate( + $cachedData, + $totalFiles, + $totalErrors, + $totalWarnings, + $totalFixable, + $showSources=false, + $width=80, + $interactive=false, + $toScreen=true + ) { + echo $cachedData; + if ($toScreen === true && $cachedData !== '') { + echo PHP_EOL; + } + + }//end generate() + + +}//end class diff --git a/vendor/squizlabs/php_codesniffer/src/Reports/Emacs.php b/vendor/squizlabs/php_codesniffer/src/Reports/Emacs.php new file mode 100644 index 00000000..3555f554 --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Reports/Emacs.php @@ -0,0 +1,90 @@ + + * @copyright 2006-2015 Squiz Pty Ltd (ABN 77 084 670 600) + * @license https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence + */ + +namespace PHP_CodeSniffer\Reports; + +use PHP_CodeSniffer\Files\File; + +class Emacs implements Report +{ + + + /** + * Generate a partial report for a single processed file. + * + * Function should return TRUE if it printed or stored data about the file + * and FALSE if it ignored the file. Returning TRUE indicates that the file and + * its data should be counted in the grand totals. + * + * @param array $report Prepared report data. + * @param \PHP_CodeSniffer\File $phpcsFile The file being reported on. + * @param bool $showSources Show sources? + * @param int $width Maximum allowed line width. + * + * @return bool + */ + public function generateFileReport($report, File $phpcsFile, $showSources=false, $width=80) + { + if ($report['errors'] === 0 && $report['warnings'] === 0) { + // Nothing to print. + return false; + } + + foreach ($report['messages'] as $line => $lineErrors) { + foreach ($lineErrors as $column => $colErrors) { + foreach ($colErrors as $error) { + $message = $error['message']; + if ($showSources === true) { + $message .= ' ('.$error['source'].')'; + } + + $type = strtolower($error['type']); + echo $report['filename'].':'.$line.':'.$column.': '.$type.' - '.$message.PHP_EOL; + } + } + } + + return true; + + }//end generateFileReport() + + + /** + * Generates an emacs report. + * + * @param string $cachedData Any partial report data that was returned from + * generateFileReport during the run. + * @param int $totalFiles Total number of files processed during the run. + * @param int $totalErrors Total number of errors found during the run. + * @param int $totalWarnings Total number of warnings found during the run. + * @param int $totalFixable Total number of problems that can be fixed. + * @param bool $showSources Show sources? + * @param int $width Maximum allowed line width. + * @param bool $interactive Are we running in interactive mode? + * @param bool $toScreen Is the report being printed to screen? + * + * @return void + */ + public function generate( + $cachedData, + $totalFiles, + $totalErrors, + $totalWarnings, + $totalFixable, + $showSources=false, + $width=80, + $interactive=false, + $toScreen=true + ) { + echo $cachedData; + + }//end generate() + + +}//end class diff --git a/vendor/squizlabs/php_codesniffer/src/Reports/Full.php b/vendor/squizlabs/php_codesniffer/src/Reports/Full.php new file mode 100644 index 00000000..084bc8aa --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Reports/Full.php @@ -0,0 +1,231 @@ + + * @copyright 2006-2015 Squiz Pty Ltd (ABN 77 084 670 600) + * @license https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence + */ + +namespace PHP_CodeSniffer\Reports; + +use PHP_CodeSniffer\Files\File; +use PHP_CodeSniffer\Util; + +class Full implements Report +{ + + + /** + * Generate a partial report for a single processed file. + * + * Function should return TRUE if it printed or stored data about the file + * and FALSE if it ignored the file. Returning TRUE indicates that the file and + * its data should be counted in the grand totals. + * + * @param array $report Prepared report data. + * @param \PHP_CodeSniffer\File $phpcsFile The file being reported on. + * @param bool $showSources Show sources? + * @param int $width Maximum allowed line width. + * + * @return bool + */ + public function generateFileReport($report, File $phpcsFile, $showSources=false, $width=80) + { + if ($report['errors'] === 0 && $report['warnings'] === 0) { + // Nothing to print. + return false; + } + + // The length of the word ERROR or WARNING; used for padding. + if ($report['warnings'] > 0) { + $typeLength = 7; + } else { + $typeLength = 5; + } + + // Work out the max line number length for formatting. + $maxLineNumLength = max(array_map('strlen', array_keys($report['messages']))); + + // The padding that all lines will require that are + // printing an error message overflow. + $paddingLine2 = str_repeat(' ', ($maxLineNumLength + 1)); + $paddingLine2 .= ' | '; + $paddingLine2 .= str_repeat(' ', $typeLength); + $paddingLine2 .= ' | '; + if ($report['fixable'] > 0) { + $paddingLine2 .= ' '; + } + + $paddingLength = strlen($paddingLine2); + + // Make sure the report width isn't too big. + $maxErrorLength = 0; + foreach ($report['messages'] as $line => $lineErrors) { + foreach ($lineErrors as $column => $colErrors) { + foreach ($colErrors as $error) { + $length = strlen($error['message']); + if ($showSources === true) { + $length += (strlen($error['source']) + 3); + } + + $maxErrorLength = max($maxErrorLength, ($length + 1)); + } + } + } + + $file = $report['filename']; + $fileLength = strlen($file); + $maxWidth = max(($fileLength + 6), ($maxErrorLength + $paddingLength)); + $width = min($width, $maxWidth); + if ($width < 70) { + $width = 70; + } + + echo PHP_EOL."\033[1mFILE: "; + if ($fileLength <= ($width - 6)) { + echo $file; + } else { + echo '...'.substr($file, ($fileLength - ($width - 6))); + } + + echo "\033[0m".PHP_EOL; + echo str_repeat('-', $width).PHP_EOL; + + echo "\033[1m".'FOUND '.$report['errors'].' ERROR'; + if ($report['errors'] !== 1) { + echo 'S'; + } + + if ($report['warnings'] > 0) { + echo ' AND '.$report['warnings'].' WARNING'; + if ($report['warnings'] !== 1) { + echo 'S'; + } + } + + echo ' AFFECTING '.count($report['messages']).' LINE'; + if (count($report['messages']) !== 1) { + echo 'S'; + } + + echo "\033[0m".PHP_EOL; + echo str_repeat('-', $width).PHP_EOL; + + // The maximum amount of space an error message can use. + $maxErrorSpace = ($width - $paddingLength - 1); + + foreach ($report['messages'] as $line => $lineErrors) { + foreach ($lineErrors as $column => $colErrors) { + foreach ($colErrors as $error) { + $message = $error['message']; + $msgLines = [$message]; + if (strpos($message, "\n") !== false) { + $msgLines = explode("\n", $message); + } + + $errorMsg = ''; + $lastLine = (count($msgLines) - 1); + foreach ($msgLines as $k => $msgLine) { + if ($k === 0) { + if ($showSources === true) { + $errorMsg .= "\033[1m"; + } + } else { + $errorMsg .= PHP_EOL.$paddingLine2; + } + + if ($k === $lastLine && $showSources === true) { + $msgLine .= "\033[0m".' ('.$error['source'].')'; + } + + $errorMsg .= wordwrap( + $msgLine, + $maxErrorSpace, + PHP_EOL.$paddingLine2 + ); + } + + // The padding that goes on the front of the line. + $padding = ($maxLineNumLength - strlen($line)); + + echo ' '.str_repeat(' ', $padding).$line.' | '; + if ($error['type'] === 'ERROR') { + echo "\033[31mERROR\033[0m"; + if ($report['warnings'] > 0) { + echo ' '; + } + } else { + echo "\033[33mWARNING\033[0m"; + } + + echo ' | '; + if ($report['fixable'] > 0) { + echo '['; + if ($error['fixable'] === true) { + echo 'x'; + } else { + echo ' '; + } + + echo '] '; + } + + echo $errorMsg.PHP_EOL; + }//end foreach + }//end foreach + }//end foreach + + echo str_repeat('-', $width).PHP_EOL; + if ($report['fixable'] > 0) { + echo "\033[1m".'PHPCBF CAN FIX THE '.$report['fixable'].' MARKED SNIFF VIOLATIONS AUTOMATICALLY'."\033[0m".PHP_EOL; + echo str_repeat('-', $width).PHP_EOL; + } + + echo PHP_EOL; + return true; + + }//end generateFileReport() + + + /** + * Prints all errors and warnings for each file processed. + * + * @param string $cachedData Any partial report data that was returned from + * generateFileReport during the run. + * @param int $totalFiles Total number of files processed during the run. + * @param int $totalErrors Total number of errors found during the run. + * @param int $totalWarnings Total number of warnings found during the run. + * @param int $totalFixable Total number of problems that can be fixed. + * @param bool $showSources Show sources? + * @param int $width Maximum allowed line width. + * @param bool $interactive Are we running in interactive mode? + * @param bool $toScreen Is the report being printed to screen? + * + * @return void + */ + public function generate( + $cachedData, + $totalFiles, + $totalErrors, + $totalWarnings, + $totalFixable, + $showSources=false, + $width=80, + $interactive=false, + $toScreen=true + ) { + if ($cachedData === '') { + return; + } + + echo $cachedData; + + if ($toScreen === true && $interactive === false) { + Util\Timing::printRunTime(); + } + + }//end generate() + + +}//end class diff --git a/vendor/squizlabs/php_codesniffer/src/Reports/Gitblame.php b/vendor/squizlabs/php_codesniffer/src/Reports/Gitblame.php new file mode 100644 index 00000000..947f3d80 --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Reports/Gitblame.php @@ -0,0 +1,91 @@ + + * @author Greg Sherwood + * @copyright 2006-2015 Squiz Pty Ltd (ABN 77 084 670 600) + * @license https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence + */ + +namespace PHP_CodeSniffer\Reports; + +use PHP_CodeSniffer\Exceptions\DeepExitException; + +class Gitblame extends VersionControl +{ + + /** + * The name of the report we want in the output + * + * @var string + */ + protected $reportName = 'GIT'; + + + /** + * Extract the author from a blame line. + * + * @param string $line Line to parse. + * + * @return mixed string or false if impossible to recover. + */ + protected function getAuthor($line) + { + $blameParts = []; + $line = preg_replace('|\s+|', ' ', $line); + preg_match( + '|\(.+[0-9]{4}-[0-9]{2}-[0-9]{2}\s+[0-9]+\)|', + $line, + $blameParts + ); + + if (isset($blameParts[0]) === false) { + return false; + } + + $parts = explode(' ', $blameParts[0]); + + if (count($parts) < 2) { + return false; + } + + $parts = array_slice($parts, 0, (count($parts) - 2)); + $author = preg_replace('|\(|', '', implode(' ', $parts)); + return $author; + + }//end getAuthor() + + + /** + * Gets the blame output. + * + * @param string $filename File to blame. + * + * @return array + * @throws \PHP_CodeSniffer\Exceptions\DeepExitException + */ + protected function getBlameContent($filename) + { + $cwd = getcwd(); + + chdir(dirname($filename)); + $command = 'git blame --date=short "'.$filename.'" 2>&1'; + $handle = popen($command, 'r'); + if ($handle === false) { + $error = 'ERROR: Could not execute "'.$command.'"'.PHP_EOL.PHP_EOL; + throw new DeepExitException($error, 3); + } + + $rawContent = stream_get_contents($handle); + fclose($handle); + + $blames = explode("\n", $rawContent); + chdir($cwd); + + return $blames; + + }//end getBlameContent() + + +}//end class diff --git a/vendor/squizlabs/php_codesniffer/src/Reports/Hgblame.php b/vendor/squizlabs/php_codesniffer/src/Reports/Hgblame.php new file mode 100644 index 00000000..b0af6643 --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Reports/Hgblame.php @@ -0,0 +1,110 @@ + + * @author Greg Sherwood + * @copyright 2006-2015 Squiz Pty Ltd (ABN 77 084 670 600) + * @license https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence + */ + +namespace PHP_CodeSniffer\Reports; + +use PHP_CodeSniffer\Exceptions\DeepExitException; + +class Hgblame extends VersionControl +{ + + /** + * The name of the report we want in the output + * + * @var string + */ + protected $reportName = 'MERCURIAL'; + + + /** + * Extract the author from a blame line. + * + * @param string $line Line to parse. + * + * @return mixed string or false if impossible to recover. + */ + protected function getAuthor($line) + { + $blameParts = []; + $line = preg_replace('|\s+|', ' ', $line); + + preg_match( + '|(.+[0-9]{2}:[0-9]{2}:[0-9]{2}\s[0-9]{4}\s.[0-9]{4}:)|', + $line, + $blameParts + ); + + if (isset($blameParts[0]) === false) { + return false; + } + + $parts = explode(' ', $blameParts[0]); + + if (count($parts) < 6) { + return false; + } + + $parts = array_slice($parts, 0, (count($parts) - 6)); + + return trim(preg_replace('|<.+>|', '', implode(' ', $parts))); + + }//end getAuthor() + + + /** + * Gets the blame output. + * + * @param string $filename File to blame. + * + * @return array + * @throws \PHP_CodeSniffer\Exceptions\DeepExitException + */ + protected function getBlameContent($filename) + { + $cwd = getcwd(); + + $fileParts = explode(DIRECTORY_SEPARATOR, $filename); + $found = false; + $location = ''; + while (empty($fileParts) === false) { + array_pop($fileParts); + $location = implode(DIRECTORY_SEPARATOR, $fileParts); + if (is_dir($location.DIRECTORY_SEPARATOR.'.hg') === true) { + $found = true; + break; + } + } + + if ($found === true) { + chdir($location); + } else { + $error = 'ERROR: Could not locate .hg directory '.PHP_EOL.PHP_EOL; + throw new DeepExitException($error, 3); + } + + $command = 'hg blame -u -d -v "'.$filename.'" 2>&1'; + $handle = popen($command, 'r'); + if ($handle === false) { + $error = 'ERROR: Could not execute "'.$command.'"'.PHP_EOL.PHP_EOL; + throw new DeepExitException($error, 3); + } + + $rawContent = stream_get_contents($handle); + fclose($handle); + + $blames = explode("\n", $rawContent); + chdir($cwd); + + return $blames; + + }//end getBlameContent() + + +}//end class diff --git a/vendor/squizlabs/php_codesniffer/src/Reports/Info.php b/vendor/squizlabs/php_codesniffer/src/Reports/Info.php new file mode 100644 index 00000000..3181bcc5 --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Reports/Info.php @@ -0,0 +1,172 @@ + + * @copyright 2006-2015 Squiz Pty Ltd (ABN 77 084 670 600) + * @license https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence + */ + +namespace PHP_CodeSniffer\Reports; + +use PHP_CodeSniffer\Files\File; +use PHP_CodeSniffer\Util\Timing; + +class Info implements Report +{ + + + /** + * Generate a partial report for a single processed file. + * + * Function should return TRUE if it printed or stored data about the file + * and FALSE if it ignored the file. Returning TRUE indicates that the file and + * its data should be counted in the grand totals. + * + * @param array $report Prepared report data. + * @param \PHP_CodeSniffer\File $phpcsFile The file being reported on. + * @param bool $showSources Show sources? + * @param int $width Maximum allowed line width. + * + * @return bool + */ + public function generateFileReport($report, File $phpcsFile, $showSources=false, $width=80) + { + $metrics = $phpcsFile->getMetrics(); + foreach ($metrics as $metric => $data) { + foreach ($data['values'] as $value => $count) { + echo "$metric>>$value>>$count".PHP_EOL; + } + } + + return true; + + }//end generateFileReport() + + + /** + * Prints the source of all errors and warnings. + * + * @param string $cachedData Any partial report data that was returned from + * generateFileReport during the run. + * @param int $totalFiles Total number of files processed during the run. + * @param int $totalErrors Total number of errors found during the run. + * @param int $totalWarnings Total number of warnings found during the run. + * @param int $totalFixable Total number of problems that can be fixed. + * @param bool $showSources Show sources? + * @param int $width Maximum allowed line width. + * @param bool $interactive Are we running in interactive mode? + * @param bool $toScreen Is the report being printed to screen? + * + * @return void + */ + public function generate( + $cachedData, + $totalFiles, + $totalErrors, + $totalWarnings, + $totalFixable, + $showSources=false, + $width=80, + $interactive=false, + $toScreen=true + ) { + $lines = explode(PHP_EOL, $cachedData); + array_pop($lines); + + if (empty($lines) === true) { + return; + } + + $metrics = []; + foreach ($lines as $line) { + $parts = explode('>>', $line); + $metric = $parts[0]; + $value = $parts[1]; + $count = $parts[2]; + if (isset($metrics[$metric]) === false) { + $metrics[$metric] = []; + } + + if (isset($metrics[$metric][$value]) === false) { + $metrics[$metric][$value] = $count; + } else { + $metrics[$metric][$value] += $count; + } + } + + ksort($metrics); + + echo PHP_EOL."\033[1m".'PHP CODE SNIFFER INFORMATION REPORT'."\033[0m".PHP_EOL; + echo str_repeat('-', 70).PHP_EOL; + + foreach ($metrics as $metric => $values) { + if (count($values) === 1) { + $count = reset($values); + $value = key($values); + + echo "$metric: \033[4m$value\033[0m [$count/$count, 100%]".PHP_EOL; + } else { + $totalCount = 0; + $valueWidth = 0; + foreach ($values as $value => $count) { + $totalCount += $count; + $valueWidth = max($valueWidth, strlen($value)); + } + + // Length of the total string, plus however many + // thousands separators there are. + $countWidth = strlen($totalCount); + $thousandSeparatorCount = floor($countWidth / 3); + $countWidth += $thousandSeparatorCount; + + // Account for 'total' line. + $valueWidth = max(5, $valueWidth); + + echo "$metric:".PHP_EOL; + + ksort($values, SORT_NATURAL); + arsort($values); + + $percentPrefixWidth = 0; + $percentWidth = 6; + foreach ($values as $value => $count) { + $percent = round(($count / $totalCount * 100), 2); + $percentPrefix = ''; + if ($percent === 0.00) { + $percent = 0.01; + $percentPrefix = '<'; + $percentPrefixWidth = 2; + $percentWidth = 4; + } + + printf( + "\t%-{$valueWidth}s => %{$countWidth}s (%{$percentPrefixWidth}s%{$percentWidth}.2f%%)".PHP_EOL, + $value, + number_format($count), + $percentPrefix, + $percent + ); + } + + echo "\t".str_repeat('-', ($valueWidth + $countWidth + 15)).PHP_EOL; + printf( + "\t%-{$valueWidth}s => %{$countWidth}s (100.00%%)".PHP_EOL, + 'total', + number_format($totalCount) + ); + }//end if + + echo PHP_EOL; + }//end foreach + + echo str_repeat('-', 70).PHP_EOL; + + if ($toScreen === true && $interactive === false) { + Timing::printRunTime(); + } + + }//end generate() + + +}//end class diff --git a/vendor/squizlabs/php_codesniffer/src/Reports/Json.php b/vendor/squizlabs/php_codesniffer/src/Reports/Json.php new file mode 100644 index 00000000..59d8f305 --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Reports/Json.php @@ -0,0 +1,106 @@ + + * @author Greg Sherwood + * @copyright 2006-2015 Squiz Pty Ltd (ABN 77 084 670 600) + * @license https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence + */ + +namespace PHP_CodeSniffer\Reports; + +use PHP_CodeSniffer\Files\File; + +class Json implements Report +{ + + + /** + * Generate a partial report for a single processed file. + * + * Function should return TRUE if it printed or stored data about the file + * and FALSE if it ignored the file. Returning TRUE indicates that the file and + * its data should be counted in the grand totals. + * + * @param array $report Prepared report data. + * @param \PHP_CodeSniffer\File $phpcsFile The file being reported on. + * @param bool $showSources Show sources? + * @param int $width Maximum allowed line width. + * + * @return bool + */ + public function generateFileReport($report, File $phpcsFile, $showSources=false, $width=80) + { + $filename = str_replace('\\', '\\\\', $report['filename']); + $filename = str_replace('"', '\"', $filename); + $filename = str_replace('/', '\/', $filename); + echo '"'.$filename.'":{'; + echo '"errors":'.$report['errors'].',"warnings":'.$report['warnings'].',"messages":['; + + $messages = ''; + foreach ($report['messages'] as $line => $lineErrors) { + foreach ($lineErrors as $column => $colErrors) { + foreach ($colErrors as $error) { + $error['message'] = str_replace("\n", '\n', $error['message']); + $error['message'] = str_replace("\r", '\r', $error['message']); + $error['message'] = str_replace("\t", '\t', $error['message']); + + $fixable = false; + if ($error['fixable'] === true) { + $fixable = true; + } + + $messagesObject = (object) $error; + $messagesObject->line = $line; + $messagesObject->column = $column; + $messagesObject->fixable = $fixable; + + $messages .= json_encode($messagesObject).","; + } + } + }//end foreach + + echo rtrim($messages, ','); + echo ']},'; + + return true; + + }//end generateFileReport() + + + /** + * Generates a JSON report. + * + * @param string $cachedData Any partial report data that was returned from + * generateFileReport during the run. + * @param int $totalFiles Total number of files processed during the run. + * @param int $totalErrors Total number of errors found during the run. + * @param int $totalWarnings Total number of warnings found during the run. + * @param int $totalFixable Total number of problems that can be fixed. + * @param bool $showSources Show sources? + * @param int $width Maximum allowed line width. + * @param bool $interactive Are we running in interactive mode? + * @param bool $toScreen Is the report being printed to screen? + * + * @return void + */ + public function generate( + $cachedData, + $totalFiles, + $totalErrors, + $totalWarnings, + $totalFixable, + $showSources=false, + $width=80, + $interactive=false, + $toScreen=true + ) { + echo '{"totals":{"errors":'.$totalErrors.',"warnings":'.$totalWarnings.',"fixable":'.$totalFixable.'},"files":{'; + echo rtrim($cachedData, ','); + echo "}}".PHP_EOL; + + }//end generate() + + +}//end class diff --git a/vendor/squizlabs/php_codesniffer/src/Reports/Junit.php b/vendor/squizlabs/php_codesniffer/src/Reports/Junit.php new file mode 100644 index 00000000..d3ede61d --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Reports/Junit.php @@ -0,0 +1,131 @@ + + * @author Greg Sherwood + * @copyright 2006-2015 Squiz Pty Ltd (ABN 77 084 670 600) + * @license https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence + */ + +namespace PHP_CodeSniffer\Reports; + +use PHP_CodeSniffer\Config; +use PHP_CodeSniffer\Files\File; + +class Junit implements Report +{ + + + /** + * Generate a partial report for a single processed file. + * + * Function should return TRUE if it printed or stored data about the file + * and FALSE if it ignored the file. Returning TRUE indicates that the file and + * its data should be counted in the grand totals. + * + * @param array $report Prepared report data. + * @param \PHP_CodeSniffer\File $phpcsFile The file being reported on. + * @param bool $showSources Show sources? + * @param int $width Maximum allowed line width. + * + * @return bool + */ + public function generateFileReport($report, File $phpcsFile, $showSources=false, $width=80) + { + $out = new \XMLWriter; + $out->openMemory(); + $out->setIndent(true); + + $out->startElement('testsuite'); + $out->writeAttribute('name', $report['filename']); + $out->writeAttribute('errors', 0); + + if (count($report['messages']) === 0) { + $out->writeAttribute('tests', 1); + $out->writeAttribute('failures', 0); + + $out->startElement('testcase'); + $out->writeAttribute('name', $report['filename']); + $out->endElement(); + } else { + $failures = ($report['errors'] + $report['warnings']); + $out->writeAttribute('tests', $failures); + $out->writeAttribute('failures', $failures); + + foreach ($report['messages'] as $line => $lineErrors) { + foreach ($lineErrors as $column => $colErrors) { + foreach ($colErrors as $error) { + $out->startElement('testcase'); + $out->writeAttribute('name', $error['source'].' at '.$report['filename']." ($line:$column)"); + + $error['type'] = strtolower($error['type']); + if ($phpcsFile->config->encoding !== 'utf-8') { + $error['message'] = iconv($phpcsFile->config->encoding, 'utf-8', $error['message']); + } + + $out->startElement('failure'); + $out->writeAttribute('type', $error['type']); + $out->writeAttribute('message', $error['message']); + $out->endElement(); + + $out->endElement(); + } + } + } + }//end if + + $out->endElement(); + echo $out->flush(); + return true; + + }//end generateFileReport() + + + /** + * Prints all violations for processed files, in a proprietary XML format. + * + * @param string $cachedData Any partial report data that was returned from + * generateFileReport during the run. + * @param int $totalFiles Total number of files processed during the run. + * @param int $totalErrors Total number of errors found during the run. + * @param int $totalWarnings Total number of warnings found during the run. + * @param int $totalFixable Total number of problems that can be fixed. + * @param bool $showSources Show sources? + * @param int $width Maximum allowed line width. + * @param bool $interactive Are we running in interactive mode? + * @param bool $toScreen Is the report being printed to screen? + * + * @return void + */ + public function generate( + $cachedData, + $totalFiles, + $totalErrors, + $totalWarnings, + $totalFixable, + $showSources=false, + $width=80, + $interactive=false, + $toScreen=true + ) { + // Figure out the total number of tests. + $tests = 0; + $matches = []; + preg_match_all('/tests="([0-9]+)"/', $cachedData, $matches); + if (isset($matches[1]) === true) { + foreach ($matches[1] as $match) { + $tests += $match; + } + } + + $failures = ($totalErrors + $totalWarnings); + echo ''.PHP_EOL; + echo ''.PHP_EOL; + echo $cachedData; + echo ''.PHP_EOL; + + }//end generate() + + +}//end class diff --git a/vendor/squizlabs/php_codesniffer/src/Reports/Notifysend.php b/vendor/squizlabs/php_codesniffer/src/Reports/Notifysend.php new file mode 100644 index 00000000..08416622 --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Reports/Notifysend.php @@ -0,0 +1,242 @@ + + * @author Greg Sherwood + * @copyright 2012-2014 Christian Weiske + * @copyright 2006-2015 Squiz Pty Ltd (ABN 77 084 670 600) + * @license https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence + */ + +namespace PHP_CodeSniffer\Reports; + +use PHP_CodeSniffer\Config; +use PHP_CodeSniffer\Files\File; +use PHP_CodeSniffer\Util\Common; + +class Notifysend implements Report +{ + + /** + * Notification timeout in milliseconds. + * + * @var integer + */ + protected $timeout = 3000; + + /** + * Path to notify-send command. + * + * @var string + */ + protected $path = 'notify-send'; + + /** + * Show "ok, all fine" messages. + * + * @var boolean + */ + protected $showOk = true; + + /** + * Version of installed notify-send executable. + * + * @var string + */ + protected $version = null; + + + /** + * Load configuration data. + */ + public function __construct() + { + $path = Config::getExecutablePath('notifysend'); + if ($path !== null) { + $this->path = Common::escapeshellcmd($path); + } + + $timeout = Config::getConfigData('notifysend_timeout'); + if ($timeout !== null) { + $this->timeout = (int) $timeout; + } + + $showOk = Config::getConfigData('notifysend_showok'); + if ($showOk !== null) { + $this->showOk = (bool) $showOk; + } + + $this->version = str_replace( + 'notify-send ', + '', + exec($this->path.' --version') + ); + + }//end __construct() + + + /** + * Generate a partial report for a single processed file. + * + * Function should return TRUE if it printed or stored data about the file + * and FALSE if it ignored the file. Returning TRUE indicates that the file and + * its data should be counted in the grand totals. + * + * @param array $report Prepared report data. + * @param \PHP_CodeSniffer\File $phpcsFile The file being reported on. + * @param bool $showSources Show sources? + * @param int $width Maximum allowed line width. + * + * @return bool + */ + public function generateFileReport($report, File $phpcsFile, $showSources=false, $width=80) + { + echo $report['filename'].PHP_EOL; + + // We want this file counted in the total number + // of checked files even if it has no errors. + return true; + + }//end generateFileReport() + + + /** + * Generates a summary of errors and warnings for each file processed. + * + * @param string $cachedData Any partial report data that was returned from + * generateFileReport during the run. + * @param int $totalFiles Total number of files processed during the run. + * @param int $totalErrors Total number of errors found during the run. + * @param int $totalWarnings Total number of warnings found during the run. + * @param int $totalFixable Total number of problems that can be fixed. + * @param bool $showSources Show sources? + * @param int $width Maximum allowed line width. + * @param bool $interactive Are we running in interactive mode? + * @param bool $toScreen Is the report being printed to screen? + * + * @return void + */ + public function generate( + $cachedData, + $totalFiles, + $totalErrors, + $totalWarnings, + $totalFixable, + $showSources=false, + $width=80, + $interactive=false, + $toScreen=true + ) { + $checkedFiles = explode(PHP_EOL, trim($cachedData)); + + $msg = $this->generateMessage($checkedFiles, $totalErrors, $totalWarnings); + if ($msg === null) { + if ($this->showOk === true) { + $this->notifyAllFine(); + } + } else { + $this->notifyErrors($msg); + } + + }//end generate() + + + /** + * Generate the error message to show to the user. + * + * @param string[] $checkedFiles The files checked during the run. + * @param int $totalErrors Total number of errors found during the run. + * @param int $totalWarnings Total number of warnings found during the run. + * + * @return string Error message or NULL if no error/warning found. + */ + protected function generateMessage($checkedFiles, $totalErrors, $totalWarnings) + { + if ($totalErrors === 0 && $totalWarnings === 0) { + // Nothing to print. + return null; + } + + $totalFiles = count($checkedFiles); + + $msg = ''; + if ($totalFiles > 1) { + $msg .= 'Checked '.$totalFiles.' files'.PHP_EOL; + } else { + $msg .= $checkedFiles[0].PHP_EOL; + } + + if ($totalWarnings > 0) { + $msg .= $totalWarnings.' warnings'.PHP_EOL; + } + + if ($totalErrors > 0) { + $msg .= $totalErrors.' errors'.PHP_EOL; + } + + return $msg; + + }//end generateMessage() + + + /** + * Tell the user that all is fine and no error/warning has been found. + * + * @return void + */ + protected function notifyAllFine() + { + $cmd = $this->getBasicCommand(); + $cmd .= ' -i info'; + $cmd .= ' "PHP CodeSniffer: Ok"'; + $cmd .= ' "All fine"'; + exec($cmd); + + }//end notifyAllFine() + + + /** + * Tell the user that errors/warnings have been found. + * + * @param string $msg Message to display. + * + * @return void + */ + protected function notifyErrors($msg) + { + $cmd = $this->getBasicCommand(); + $cmd .= ' -i error'; + $cmd .= ' "PHP CodeSniffer: Error"'; + $cmd .= ' '.escapeshellarg(trim($msg)); + exec($cmd); + + }//end notifyErrors() + + + /** + * Generate and return the basic notify-send command string to execute. + * + * @return string Shell command with common parameters. + */ + protected function getBasicCommand() + { + $cmd = $this->path; + $cmd .= ' --category dev.validate'; + $cmd .= ' -h int:transient:1'; + $cmd .= ' -t '.(int) $this->timeout; + if (version_compare($this->version, '0.7.3', '>=') === true) { + $cmd .= ' -a phpcs'; + } + + return $cmd; + + }//end getBasicCommand() + + +}//end class diff --git a/vendor/squizlabs/php_codesniffer/src/Reports/Report.php b/vendor/squizlabs/php_codesniffer/src/Reports/Report.php new file mode 100644 index 00000000..38f8a629 --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Reports/Report.php @@ -0,0 +1,64 @@ + + * @copyright 2006-2015 Squiz Pty Ltd (ABN 77 084 670 600) + * @license https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence + */ + +namespace PHP_CodeSniffer\Reports; + +use PHP_CodeSniffer\Files\File; + +interface Report +{ + + + /** + * Generate a partial report for a single processed file. + * + * Function should return TRUE if it printed or stored data about the file + * and FALSE if it ignored the file. Returning TRUE indicates that the file and + * its data should be counted in the grand totals. + * + * @param array $report Prepared report data. + * @param \PHP_CodeSniffer\File $phpcsFile The file being reported on. + * @param bool $showSources Show sources? + * @param int $width Maximum allowed line width. + * + * @return bool + */ + public function generateFileReport($report, File $phpcsFile, $showSources=false, $width=80); + + + /** + * Generate the actual report. + * + * @param string $cachedData Any partial report data that was returned from + * generateFileReport during the run. + * @param int $totalFiles Total number of files processed during the run. + * @param int $totalErrors Total number of errors found during the run. + * @param int $totalWarnings Total number of warnings found during the run. + * @param int $totalFixable Total number of problems that can be fixed. + * @param bool $showSources Show sources? + * @param int $width Maximum allowed line width. + * @param bool $interactive Are we running in interactive mode? + * @param bool $toScreen Is the report being printed to screen? + * + * @return void + */ + public function generate( + $cachedData, + $totalFiles, + $totalErrors, + $totalWarnings, + $totalFixable, + $showSources=false, + $width=80, + $interactive=false, + $toScreen=true + ); + + +}//end interface diff --git a/vendor/squizlabs/php_codesniffer/src/Reports/Source.php b/vendor/squizlabs/php_codesniffer/src/Reports/Source.php new file mode 100644 index 00000000..ce8c3cfe --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Reports/Source.php @@ -0,0 +1,336 @@ + + * @copyright 2006-2015 Squiz Pty Ltd (ABN 77 084 670 600) + * @license https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence + */ + +namespace PHP_CodeSniffer\Reports; + +use PHP_CodeSniffer\Files\File; +use PHP_CodeSniffer\Util\Timing; + +class Source implements Report +{ + + + /** + * Generate a partial report for a single processed file. + * + * Function should return TRUE if it printed or stored data about the file + * and FALSE if it ignored the file. Returning TRUE indicates that the file and + * its data should be counted in the grand totals. + * + * @param array $report Prepared report data. + * @param \PHP_CodeSniffer\File $phpcsFile The file being reported on. + * @param bool $showSources Show sources? + * @param int $width Maximum allowed line width. + * + * @return bool + */ + public function generateFileReport($report, File $phpcsFile, $showSources=false, $width=80) + { + if ($report['errors'] === 0 && $report['warnings'] === 0) { + // Nothing to print. + return false; + } + + $sources = []; + + foreach ($report['messages'] as $line => $lineErrors) { + foreach ($lineErrors as $column => $colErrors) { + foreach ($colErrors as $error) { + $src = $error['source']; + if (isset($sources[$src]) === false) { + $sources[$src] = [ + 'fixable' => (int) $error['fixable'], + 'count' => 1, + ]; + } else { + $sources[$src]['count']++; + } + } + } + } + + foreach ($sources as $source => $data) { + echo $source.'>>'.$data['fixable'].'>>'.$data['count'].PHP_EOL; + } + + return true; + + }//end generateFileReport() + + + /** + * Prints the source of all errors and warnings. + * + * @param string $cachedData Any partial report data that was returned from + * generateFileReport during the run. + * @param int $totalFiles Total number of files processed during the run. + * @param int $totalErrors Total number of errors found during the run. + * @param int $totalWarnings Total number of warnings found during the run. + * @param int $totalFixable Total number of problems that can be fixed. + * @param bool $showSources Show sources? + * @param int $width Maximum allowed line width. + * @param bool $interactive Are we running in interactive mode? + * @param bool $toScreen Is the report being printed to screen? + * + * @return void + */ + public function generate( + $cachedData, + $totalFiles, + $totalErrors, + $totalWarnings, + $totalFixable, + $showSources=false, + $width=80, + $interactive=false, + $toScreen=true + ) { + $lines = explode(PHP_EOL, $cachedData); + array_pop($lines); + + if (empty($lines) === true) { + return; + } + + $sources = []; + $maxLength = 0; + + foreach ($lines as $line) { + $parts = explode('>>', $line); + $source = $parts[0]; + $fixable = (bool) $parts[1]; + $count = $parts[2]; + + if (isset($sources[$source]) === false) { + if ($showSources === true) { + $parts = null; + $sniff = $source; + } else { + $parts = explode('.', $source); + if ($parts[0] === 'Internal') { + $parts[2] = $parts[1]; + $parts[1] = ''; + } + + $parts[1] = $this->makeFriendlyName($parts[1]); + + $sniff = $this->makeFriendlyName($parts[2]); + if (isset($parts[3]) === true) { + $name = $this->makeFriendlyName($parts[3]); + $name[0] = strtolower($name[0]); + $sniff .= ' '.$name; + unset($parts[3]); + } + + $parts[2] = $sniff; + }//end if + + $maxLength = max($maxLength, strlen($sniff)); + + $sources[$source] = [ + 'count' => $count, + 'fixable' => $fixable, + 'parts' => $parts, + ]; + } else { + $sources[$source]['count'] += $count; + }//end if + }//end foreach + + if ($showSources === true) { + $width = min($width, ($maxLength + 11)); + } else { + $width = min($width, ($maxLength + 41)); + } + + $width = max($width, 70); + + // Sort the data based on counts and source code. + $sourceCodes = array_keys($sources); + $counts = []; + foreach ($sources as $source => $data) { + $counts[$source] = $data['count']; + } + + array_multisort($counts, SORT_DESC, $sourceCodes, SORT_ASC, SORT_NATURAL, $sources); + + echo PHP_EOL."\033[1mPHP CODE SNIFFER VIOLATION SOURCE SUMMARY\033[0m".PHP_EOL; + echo str_repeat('-', $width).PHP_EOL."\033[1m"; + if ($showSources === true) { + if ($totalFixable > 0) { + echo ' SOURCE'.str_repeat(' ', ($width - 15)).'COUNT'.PHP_EOL; + } else { + echo 'SOURCE'.str_repeat(' ', ($width - 11)).'COUNT'.PHP_EOL; + } + } else { + if ($totalFixable > 0) { + echo ' STANDARD CATEGORY SNIFF'.str_repeat(' ', ($width - 44)).'COUNT'.PHP_EOL; + } else { + echo 'STANDARD CATEGORY SNIFF'.str_repeat(' ', ($width - 40)).'COUNT'.PHP_EOL; + } + } + + echo "\033[0m".str_repeat('-', $width).PHP_EOL; + + $fixableSources = 0; + + if ($showSources === true) { + $maxSniffWidth = ($width - 7); + } else { + $maxSniffWidth = ($width - 37); + } + + if ($totalFixable > 0) { + $maxSniffWidth -= 4; + } + + foreach ($sources as $source => $sourceData) { + if ($totalFixable > 0) { + echo '['; + if ($sourceData['fixable'] === true) { + echo 'x'; + $fixableSources++; + } else { + echo ' '; + } + + echo '] '; + } + + if ($showSources === true) { + if (strlen($source) > $maxSniffWidth) { + $source = substr($source, 0, $maxSniffWidth); + } + + echo $source; + if ($totalFixable > 0) { + echo str_repeat(' ', ($width - 9 - strlen($source))); + } else { + echo str_repeat(' ', ($width - 5 - strlen($source))); + } + } else { + $parts = $sourceData['parts']; + + if (strlen($parts[0]) > 8) { + $parts[0] = substr($parts[0], 0, ((strlen($parts[0]) - 8) * -1)); + } + + echo $parts[0].str_repeat(' ', (10 - strlen($parts[0]))); + + $category = $parts[1]; + if (strlen($category) > 18) { + $category = substr($category, 0, ((strlen($category) - 18) * -1)); + } + + echo $category.str_repeat(' ', (20 - strlen($category))); + + $sniff = $parts[2]; + if (strlen($sniff) > $maxSniffWidth) { + $sniff = substr($sniff, 0, $maxSniffWidth); + } + + if ($totalFixable > 0) { + echo $sniff.str_repeat(' ', ($width - 39 - strlen($sniff))); + } else { + echo $sniff.str_repeat(' ', ($width - 35 - strlen($sniff))); + } + }//end if + + echo $sourceData['count'].PHP_EOL; + }//end foreach + + echo str_repeat('-', $width).PHP_EOL; + echo "\033[1m".'A TOTAL OF '.($totalErrors + $totalWarnings).' SNIFF VIOLATION'; + if (($totalErrors + $totalWarnings) > 1) { + echo 'S'; + } + + echo ' WERE FOUND IN '.count($sources).' SOURCE'; + if (count($sources) !== 1) { + echo 'S'; + } + + echo "\033[0m"; + + if ($totalFixable > 0) { + echo PHP_EOL.str_repeat('-', $width).PHP_EOL; + echo "\033[1mPHPCBF CAN FIX THE $fixableSources MARKED SOURCES AUTOMATICALLY ($totalFixable VIOLATIONS IN TOTAL)\033[0m"; + } + + echo PHP_EOL.str_repeat('-', $width).PHP_EOL.PHP_EOL; + + if ($toScreen === true && $interactive === false) { + Timing::printRunTime(); + } + + }//end generate() + + + /** + * Converts a camel caps name into a readable string. + * + * @param string $name The camel caps name to convert. + * + * @return string + */ + public function makeFriendlyName($name) + { + if (trim($name) === '') { + return ''; + } + + $friendlyName = ''; + $length = strlen($name); + + $lastWasUpper = false; + $lastWasNumeric = false; + for ($i = 0; $i < $length; $i++) { + if (is_numeric($name[$i]) === true) { + if ($lastWasNumeric === false) { + $friendlyName .= ' '; + } + + $lastWasUpper = false; + $lastWasNumeric = true; + } else { + $lastWasNumeric = false; + + $char = strtolower($name[$i]); + if ($char === $name[$i]) { + // Lowercase. + $lastWasUpper = false; + } else { + // Uppercase. + if ($lastWasUpper === false) { + $friendlyName .= ' '; + if ($i < ($length - 1)) { + $next = $name[($i + 1)]; + if (strtolower($next) === $next) { + // Next char is lowercase so it is a word boundary. + $name[$i] = strtolower($name[$i]); + } + } + } + + $lastWasUpper = true; + } + }//end if + + $friendlyName .= $name[$i]; + }//end for + + $friendlyName = trim($friendlyName); + $friendlyName[0] = strtoupper($friendlyName[0]); + + return $friendlyName; + + }//end makeFriendlyName() + + +}//end class diff --git a/vendor/squizlabs/php_codesniffer/src/Reports/Summary.php b/vendor/squizlabs/php_codesniffer/src/Reports/Summary.php new file mode 100644 index 00000000..8fe18e76 --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Reports/Summary.php @@ -0,0 +1,183 @@ + + * @copyright 2006-2015 Squiz Pty Ltd (ABN 77 084 670 600) + * @license https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence + */ + +namespace PHP_CodeSniffer\Reports; + +use PHP_CodeSniffer\Files\File; +use PHP_CodeSniffer\Util; + +class Summary implements Report +{ + + + /** + * Generate a partial report for a single processed file. + * + * Function should return TRUE if it printed or stored data about the file + * and FALSE if it ignored the file. Returning TRUE indicates that the file and + * its data should be counted in the grand totals. + * + * @param array $report Prepared report data. + * @param \PHP_CodeSniffer\File $phpcsFile The file being reported on. + * @param bool $showSources Show sources? + * @param int $width Maximum allowed line width. + * + * @return bool + */ + public function generateFileReport($report, File $phpcsFile, $showSources=false, $width=80) + { + if (PHP_CODESNIFFER_VERBOSITY === 0 + && $report['errors'] === 0 + && $report['warnings'] === 0 + ) { + // Nothing to print. + return false; + } + + echo $report['filename'].'>>'.$report['errors'].'>>'.$report['warnings'].PHP_EOL; + return true; + + }//end generateFileReport() + + + /** + * Generates a summary of errors and warnings for each file processed. + * + * @param string $cachedData Any partial report data that was returned from + * generateFileReport during the run. + * @param int $totalFiles Total number of files processed during the run. + * @param int $totalErrors Total number of errors found during the run. + * @param int $totalWarnings Total number of warnings found during the run. + * @param int $totalFixable Total number of problems that can be fixed. + * @param bool $showSources Show sources? + * @param int $width Maximum allowed line width. + * @param bool $interactive Are we running in interactive mode? + * @param bool $toScreen Is the report being printed to screen? + * + * @return void + */ + public function generate( + $cachedData, + $totalFiles, + $totalErrors, + $totalWarnings, + $totalFixable, + $showSources=false, + $width=80, + $interactive=false, + $toScreen=true + ) { + $lines = explode(PHP_EOL, $cachedData); + array_pop($lines); + + if (empty($lines) === true) { + return; + } + + $reportFiles = []; + $maxLength = 0; + + foreach ($lines as $line) { + $parts = explode('>>', $line); + $fileLen = strlen($parts[0]); + $reportFiles[$parts[0]] = [ + 'errors' => $parts[1], + 'warnings' => $parts[2], + 'strlen' => $fileLen, + ]; + + $maxLength = max($maxLength, $fileLen); + } + + uksort( + $reportFiles, + function ($keyA, $keyB) { + $pathPartsA = explode(DIRECTORY_SEPARATOR, $keyA); + $pathPartsB = explode(DIRECTORY_SEPARATOR, $keyB); + + do { + $partA = array_shift($pathPartsA); + $partB = array_shift($pathPartsB); + } while ($partA === $partB && empty($pathPartsA) === false && empty($pathPartsB) === false); + + if (empty($pathPartsA) === false && empty($pathPartsB) === true) { + return 1; + } else if (empty($pathPartsA) === true && empty($pathPartsB) === false) { + return -1; + } else { + return strcasecmp($partA, $partB); + } + } + ); + + $width = min($width, ($maxLength + 21)); + $width = max($width, 70); + + echo PHP_EOL."\033[1m".'PHP CODE SNIFFER REPORT SUMMARY'."\033[0m".PHP_EOL; + echo str_repeat('-', $width).PHP_EOL; + echo "\033[1m".'FILE'.str_repeat(' ', ($width - 20)).'ERRORS WARNINGS'."\033[0m".PHP_EOL; + echo str_repeat('-', $width).PHP_EOL; + + foreach ($reportFiles as $file => $data) { + $padding = ($width - 18 - $data['strlen']); + if ($padding < 0) { + $file = '...'.substr($file, (($padding * -1) + 3)); + $padding = 0; + } + + echo $file.str_repeat(' ', $padding).' '; + if ($data['errors'] !== 0) { + echo "\033[31m".$data['errors']."\033[0m"; + echo str_repeat(' ', (8 - strlen((string) $data['errors']))); + } else { + echo '0 '; + } + + if ($data['warnings'] !== 0) { + echo "\033[33m".$data['warnings']."\033[0m"; + } else { + echo '0'; + } + + echo PHP_EOL; + }//end foreach + + echo str_repeat('-', $width).PHP_EOL; + echo "\033[1mA TOTAL OF $totalErrors ERROR"; + if ($totalErrors !== 1) { + echo 'S'; + } + + echo ' AND '.$totalWarnings.' WARNING'; + if ($totalWarnings !== 1) { + echo 'S'; + } + + echo ' WERE FOUND IN '.$totalFiles.' FILE'; + if ($totalFiles !== 1) { + echo 'S'; + } + + echo "\033[0m"; + + if ($totalFixable > 0) { + echo PHP_EOL.str_repeat('-', $width).PHP_EOL; + echo "\033[1mPHPCBF CAN FIX $totalFixable OF THESE SNIFF VIOLATIONS AUTOMATICALLY\033[0m"; + } + + echo PHP_EOL.str_repeat('-', $width).PHP_EOL.PHP_EOL; + + if ($toScreen === true && $interactive === false) { + Util\Timing::printRunTime(); + } + + }//end generate() + + +}//end class diff --git a/vendor/squizlabs/php_codesniffer/src/Reports/Svnblame.php b/vendor/squizlabs/php_codesniffer/src/Reports/Svnblame.php new file mode 100644 index 00000000..f4719fe5 --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Reports/Svnblame.php @@ -0,0 +1,73 @@ + + * @copyright 2006-2015 Squiz Pty Ltd (ABN 77 084 670 600) + * @license https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence + */ + +namespace PHP_CodeSniffer\Reports; + +use PHP_CodeSniffer\Exceptions\DeepExitException; + +class Svnblame extends VersionControl +{ + + /** + * The name of the report we want in the output + * + * @var string + */ + protected $reportName = 'SVN'; + + + /** + * Extract the author from a blame line. + * + * @param string $line Line to parse. + * + * @return mixed string or false if impossible to recover. + */ + protected function getAuthor($line) + { + $blameParts = []; + preg_match('|\s*([^\s]+)\s+([^\s]+)|', $line, $blameParts); + + if (isset($blameParts[2]) === false) { + return false; + } + + return $blameParts[2]; + + }//end getAuthor() + + + /** + * Gets the blame output. + * + * @param string $filename File to blame. + * + * @return array + * @throws \PHP_CodeSniffer\Exceptions\DeepExitException + */ + protected function getBlameContent($filename) + { + $command = 'svn blame "'.$filename.'" 2>&1'; + $handle = popen($command, 'r'); + if ($handle === false) { + $error = 'ERROR: Could not execute "'.$command.'"'.PHP_EOL.PHP_EOL; + throw new DeepExitException($error, 3); + } + + $rawContent = stream_get_contents($handle); + fclose($handle); + + $blames = explode("\n", $rawContent); + + return $blames; + + }//end getBlameContent() + + +}//end class diff --git a/vendor/squizlabs/php_codesniffer/src/Reports/VersionControl.php b/vendor/squizlabs/php_codesniffer/src/Reports/VersionControl.php new file mode 100644 index 00000000..0f414567 --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Reports/VersionControl.php @@ -0,0 +1,376 @@ + + * @author Greg Sherwood + * @copyright 2006-2015 Squiz Pty Ltd (ABN 77 084 670 600) + * @license https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence + */ + +namespace PHP_CodeSniffer\Reports; + +use PHP_CodeSniffer\Files\File; +use PHP_CodeSniffer\Util\Timing; + +abstract class VersionControl implements Report +{ + + /** + * The name of the report we want in the output. + * + * @var string + */ + protected $reportName = 'VERSION CONTROL'; + + + /** + * Generate a partial report for a single processed file. + * + * Function should return TRUE if it printed or stored data about the file + * and FALSE if it ignored the file. Returning TRUE indicates that the file and + * its data should be counted in the grand totals. + * + * @param array $report Prepared report data. + * @param \PHP_CodeSniffer\File $phpcsFile The file being reported on. + * @param bool $showSources Show sources? + * @param int $width Maximum allowed line width. + * + * @return bool + */ + public function generateFileReport($report, File $phpcsFile, $showSources=false, $width=80) + { + $blames = $this->getBlameContent($report['filename']); + + $authorCache = []; + $praiseCache = []; + $sourceCache = []; + + foreach ($report['messages'] as $line => $lineErrors) { + $author = 'Unknown'; + if (isset($blames[($line - 1)]) === true) { + $blameAuthor = $this->getAuthor($blames[($line - 1)]); + if ($blameAuthor !== false) { + $author = $blameAuthor; + } + } + + if (isset($authorCache[$author]) === false) { + $authorCache[$author] = 0; + $praiseCache[$author] = [ + 'good' => 0, + 'bad' => 0, + ]; + } + + $praiseCache[$author]['bad']++; + + foreach ($lineErrors as $column => $colErrors) { + foreach ($colErrors as $error) { + $authorCache[$author]++; + + if ($showSources === true) { + $source = $error['source']; + if (isset($sourceCache[$author][$source]) === false) { + $sourceCache[$author][$source] = [ + 'count' => 1, + 'fixable' => $error['fixable'], + ]; + } else { + $sourceCache[$author][$source]['count']++; + } + } + } + } + + unset($blames[($line - 1)]); + }//end foreach + + // Now go through and give the authors some credit for + // all the lines that do not have errors. + foreach ($blames as $line) { + $author = $this->getAuthor($line); + if ($author === false) { + $author = 'Unknown'; + } + + if (isset($authorCache[$author]) === false) { + // This author doesn't have any errors. + if (PHP_CODESNIFFER_VERBOSITY === 0) { + continue; + } + + $authorCache[$author] = 0; + $praiseCache[$author] = [ + 'good' => 0, + 'bad' => 0, + ]; + } + + $praiseCache[$author]['good']++; + }//end foreach + + foreach ($authorCache as $author => $errors) { + echo "AUTHOR>>$author>>$errors".PHP_EOL; + } + + foreach ($praiseCache as $author => $praise) { + echo "PRAISE>>$author>>".$praise['good'].'>>'.$praise['bad'].PHP_EOL; + } + + foreach ($sourceCache as $author => $sources) { + foreach ($sources as $source => $sourceData) { + $count = $sourceData['count']; + $fixable = (int) $sourceData['fixable']; + echo "SOURCE>>$author>>$source>>$count>>$fixable".PHP_EOL; + } + } + + return true; + + }//end generateFileReport() + + + /** + * Prints the author of all errors and warnings, as given by "version control blame". + * + * @param string $cachedData Any partial report data that was returned from + * generateFileReport during the run. + * @param int $totalFiles Total number of files processed during the run. + * @param int $totalErrors Total number of errors found during the run. + * @param int $totalWarnings Total number of warnings found during the run. + * @param int $totalFixable Total number of problems that can be fixed. + * @param bool $showSources Show sources? + * @param int $width Maximum allowed line width. + * @param bool $interactive Are we running in interactive mode? + * @param bool $toScreen Is the report being printed to screen? + * + * @return void + */ + public function generate( + $cachedData, + $totalFiles, + $totalErrors, + $totalWarnings, + $totalFixable, + $showSources=false, + $width=80, + $interactive=false, + $toScreen=true + ) { + $errorsShown = ($totalErrors + $totalWarnings); + if ($errorsShown === 0) { + // Nothing to show. + return; + } + + $lines = explode(PHP_EOL, $cachedData); + array_pop($lines); + + if (empty($lines) === true) { + return; + } + + $authorCache = []; + $praiseCache = []; + $sourceCache = []; + + foreach ($lines as $line) { + $parts = explode('>>', $line); + switch ($parts[0]) { + case 'AUTHOR': + if (isset($authorCache[$parts[1]]) === false) { + $authorCache[$parts[1]] = $parts[2]; + } else { + $authorCache[$parts[1]] += $parts[2]; + } + break; + case 'PRAISE': + if (isset($praiseCache[$parts[1]]) === false) { + $praiseCache[$parts[1]] = [ + 'good' => $parts[2], + 'bad' => $parts[3], + ]; + } else { + $praiseCache[$parts[1]]['good'] += $parts[2]; + $praiseCache[$parts[1]]['bad'] += $parts[3]; + } + break; + case 'SOURCE': + if (isset($praiseCache[$parts[1]]) === false) { + $praiseCache[$parts[1]] = []; + } + + if (isset($sourceCache[$parts[1]][$parts[2]]) === false) { + $sourceCache[$parts[1]][$parts[2]] = [ + 'count' => $parts[3], + 'fixable' => (bool) $parts[4], + ]; + } else { + $sourceCache[$parts[1]][$parts[2]]['count'] += $parts[3]; + } + break; + default: + break; + }//end switch + }//end foreach + + // Make sure the report width isn't too big. + $maxLength = 0; + foreach ($authorCache as $author => $count) { + $maxLength = max($maxLength, strlen($author)); + if ($showSources === true && isset($sourceCache[$author]) === true) { + foreach ($sourceCache[$author] as $source => $sourceData) { + if ($source === 'count') { + continue; + } + + $maxLength = max($maxLength, (strlen($source) + 9)); + } + } + } + + $width = min($width, ($maxLength + 30)); + $width = max($width, 70); + arsort($authorCache); + + echo PHP_EOL."\033[1m".'PHP CODE SNIFFER '.$this->reportName.' BLAME SUMMARY'."\033[0m".PHP_EOL; + echo str_repeat('-', $width).PHP_EOL."\033[1m"; + if ($showSources === true) { + echo 'AUTHOR SOURCE'.str_repeat(' ', ($width - 43)).'(Author %) (Overall %) COUNT'.PHP_EOL; + echo str_repeat('-', $width).PHP_EOL; + } else { + echo 'AUTHOR'.str_repeat(' ', ($width - 34)).'(Author %) (Overall %) COUNT'.PHP_EOL; + echo str_repeat('-', $width).PHP_EOL; + } + + echo "\033[0m"; + + if ($showSources === true) { + $maxSniffWidth = ($width - 15); + + if ($totalFixable > 0) { + $maxSniffWidth -= 4; + } + } + + $fixableSources = 0; + + foreach ($authorCache as $author => $count) { + if ($praiseCache[$author]['good'] === 0) { + $percent = 0; + } else { + $total = ($praiseCache[$author]['bad'] + $praiseCache[$author]['good']); + $percent = round(($praiseCache[$author]['bad'] / $total * 100), 2); + } + + $overallPercent = '('.round((($count / $errorsShown) * 100), 2).')'; + $authorPercent = '('.$percent.')'; + $line = str_repeat(' ', (6 - strlen($count))).$count; + $line = str_repeat(' ', (12 - strlen($overallPercent))).$overallPercent.$line; + $line = str_repeat(' ', (11 - strlen($authorPercent))).$authorPercent.$line; + $line = $author.str_repeat(' ', ($width - strlen($author) - strlen($line))).$line; + + if ($showSources === true) { + $line = "\033[1m$line\033[0m"; + } + + echo $line.PHP_EOL; + + if ($showSources === true && isset($sourceCache[$author]) === true) { + $errors = $sourceCache[$author]; + asort($errors); + $errors = array_reverse($errors); + + foreach ($errors as $source => $sourceData) { + if ($source === 'count') { + continue; + } + + $count = $sourceData['count']; + + $srcLength = strlen($source); + if ($srcLength > $maxSniffWidth) { + $source = substr($source, 0, $maxSniffWidth); + } + + $line = str_repeat(' ', (5 - strlen($count))).$count; + + echo ' '; + if ($totalFixable > 0) { + echo '['; + if ($sourceData['fixable'] === true) { + echo 'x'; + $fixableSources++; + } else { + echo ' '; + } + + echo '] '; + } + + echo $source; + if ($totalFixable > 0) { + echo str_repeat(' ', ($width - 18 - strlen($source))); + } else { + echo str_repeat(' ', ($width - 14 - strlen($source))); + } + + echo $line.PHP_EOL; + }//end foreach + }//end if + }//end foreach + + echo str_repeat('-', $width).PHP_EOL; + echo "\033[1m".'A TOTAL OF '.$errorsShown.' SNIFF VIOLATION'; + if ($errorsShown !== 1) { + echo 'S'; + } + + echo ' WERE COMMITTED BY '.count($authorCache).' AUTHOR'; + if (count($authorCache) !== 1) { + echo 'S'; + } + + echo "\033[0m"; + + if ($totalFixable > 0) { + if ($showSources === true) { + echo PHP_EOL.str_repeat('-', $width).PHP_EOL; + echo "\033[1mPHPCBF CAN FIX THE $fixableSources MARKED SOURCES AUTOMATICALLY ($totalFixable VIOLATIONS IN TOTAL)\033[0m"; + } else { + echo PHP_EOL.str_repeat('-', $width).PHP_EOL; + echo "\033[1mPHPCBF CAN FIX $totalFixable OF THESE SNIFF VIOLATIONS AUTOMATICALLY\033[0m"; + } + } + + echo PHP_EOL.str_repeat('-', $width).PHP_EOL.PHP_EOL; + + if ($toScreen === true && $interactive === false) { + Timing::printRunTime(); + } + + }//end generate() + + + /** + * Extract the author from a blame line. + * + * @param string $line Line to parse. + * + * @return mixed string or false if impossible to recover. + */ + abstract protected function getAuthor($line); + + + /** + * Gets the blame output. + * + * @param string $filename File to blame. + * + * @return array + */ + abstract protected function getBlameContent($filename); + + +}//end class diff --git a/vendor/squizlabs/php_codesniffer/src/Reports/Xml.php b/vendor/squizlabs/php_codesniffer/src/Reports/Xml.php new file mode 100644 index 00000000..066383de --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Reports/Xml.php @@ -0,0 +1,126 @@ + + * @copyright 2006-2015 Squiz Pty Ltd (ABN 77 084 670 600) + * @license https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence + */ + +namespace PHP_CodeSniffer\Reports; + +use PHP_CodeSniffer\Config; +use PHP_CodeSniffer\Files\File; + +class Xml implements Report +{ + + + /** + * Generate a partial report for a single processed file. + * + * Function should return TRUE if it printed or stored data about the file + * and FALSE if it ignored the file. Returning TRUE indicates that the file and + * its data should be counted in the grand totals. + * + * @param array $report Prepared report data. + * @param \PHP_CodeSniffer\File $phpcsFile The file being reported on. + * @param bool $showSources Show sources? + * @param int $width Maximum allowed line width. + * + * @return bool + */ + public function generateFileReport($report, File $phpcsFile, $showSources=false, $width=80) + { + $out = new \XMLWriter; + $out->openMemory(); + $out->setIndent(true); + $out->setIndentString(' '); + $out->startDocument('1.0', 'UTF-8'); + + if ($report['errors'] === 0 && $report['warnings'] === 0) { + // Nothing to print. + return false; + } + + $out->startElement('file'); + $out->writeAttribute('name', $report['filename']); + $out->writeAttribute('errors', $report['errors']); + $out->writeAttribute('warnings', $report['warnings']); + $out->writeAttribute('fixable', $report['fixable']); + + foreach ($report['messages'] as $line => $lineErrors) { + foreach ($lineErrors as $column => $colErrors) { + foreach ($colErrors as $error) { + $error['type'] = strtolower($error['type']); + if ($phpcsFile->config->encoding !== 'utf-8') { + $error['message'] = iconv($phpcsFile->config->encoding, 'utf-8', $error['message']); + } + + $out->startElement($error['type']); + $out->writeAttribute('line', $line); + $out->writeAttribute('column', $column); + $out->writeAttribute('source', $error['source']); + $out->writeAttribute('severity', $error['severity']); + $out->writeAttribute('fixable', (int) $error['fixable']); + $out->text($error['message']); + $out->endElement(); + } + } + }//end foreach + + $out->endElement(); + + // Remove the start of the document because we will + // add that manually later. We only have it in here to + // properly set the encoding. + $content = $out->flush(); + if (strpos($content, PHP_EOL) !== false) { + $content = substr($content, (strpos($content, PHP_EOL) + strlen(PHP_EOL))); + } else if (strpos($content, "\n") !== false) { + $content = substr($content, (strpos($content, "\n") + 1)); + } + + echo $content; + + return true; + + }//end generateFileReport() + + + /** + * Prints all violations for processed files, in a proprietary XML format. + * + * @param string $cachedData Any partial report data that was returned from + * generateFileReport during the run. + * @param int $totalFiles Total number of files processed during the run. + * @param int $totalErrors Total number of errors found during the run. + * @param int $totalWarnings Total number of warnings found during the run. + * @param int $totalFixable Total number of problems that can be fixed. + * @param bool $showSources Show sources? + * @param int $width Maximum allowed line width. + * @param bool $interactive Are we running in interactive mode? + * @param bool $toScreen Is the report being printed to screen? + * + * @return void + */ + public function generate( + $cachedData, + $totalFiles, + $totalErrors, + $totalWarnings, + $totalFixable, + $showSources=false, + $width=80, + $interactive=false, + $toScreen=true + ) { + echo ''.PHP_EOL; + echo ''.PHP_EOL; + echo $cachedData; + echo ''.PHP_EOL; + + }//end generate() + + +}//end class diff --git a/vendor/squizlabs/php_codesniffer/src/Ruleset.php b/vendor/squizlabs/php_codesniffer/src/Ruleset.php new file mode 100644 index 00000000..7e659706 --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Ruleset.php @@ -0,0 +1,1383 @@ + + * @copyright 2006-2015 Squiz Pty Ltd (ABN 77 084 670 600) + * @license https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence + */ + +namespace PHP_CodeSniffer; + +use PHP_CodeSniffer\Exceptions\RuntimeException; +use PHP_CodeSniffer\Util; + +class Ruleset +{ + + /** + * The name of the coding standard being used. + * + * If a top-level standard includes other standards, or sniffs + * from other standards, only the name of the top-level standard + * will be stored in here. + * + * If multiple top-level standards are being loaded into + * a single ruleset object, this will store a comma separated list + * of the top-level standard names. + * + * @var string + */ + public $name = ''; + + /** + * A list of file paths for the ruleset files being used. + * + * @var string[] + */ + public $paths = []; + + /** + * A list of regular expressions used to ignore specific sniffs for files and folders. + * + * Is also used to set global exclude patterns. + * The key is the regular expression and the value is the type + * of ignore pattern (absolute or relative). + * + * @var array + */ + public $ignorePatterns = []; + + /** + * A list of regular expressions used to include specific sniffs for files and folders. + * + * The key is the sniff code and the value is an array with + * the key being a regular expression and the value is the type + * of ignore pattern (absolute or relative). + * + * @var array> + */ + public $includePatterns = []; + + /** + * An array of sniff objects that are being used to check files. + * + * The key is the fully qualified name of the sniff class + * and the value is the sniff object. + * + * @var array + */ + public $sniffs = []; + + /** + * A mapping of sniff codes to fully qualified class names. + * + * The key is the sniff code and the value + * is the fully qualified name of the sniff class. + * + * @var array + */ + public $sniffCodes = []; + + /** + * An array of token types and the sniffs that are listening for them. + * + * The key is the token name being listened for and the value + * is the sniff object. + * + * @var array + */ + public $tokenListeners = []; + + /** + * An array of rules from the ruleset.xml file. + * + * It may be empty, indicating that the ruleset does not override + * any of the default sniff settings. + * + * @var array + */ + public $ruleset = []; + + /** + * The directories that the processed rulesets are in. + * + * @var string[] + */ + protected $rulesetDirs = []; + + /** + * The config data for the run. + * + * @var \PHP_CodeSniffer\Config + */ + private $config = null; + + + /** + * Initialise the ruleset that the run will use. + * + * @param \PHP_CodeSniffer\Config $config The config data for the run. + * + * @return void + * @throws \PHP_CodeSniffer\Exceptions\RuntimeException If no sniffs were registered. + */ + public function __construct(Config $config) + { + $this->config = $config; + $restrictions = $config->sniffs; + $exclusions = $config->exclude; + $sniffs = []; + + $standardPaths = []; + foreach ($config->standards as $standard) { + $installed = Util\Standards::getInstalledStandardPath($standard); + if ($installed === null) { + $standard = Util\Common::realpath($standard); + if (is_dir($standard) === true + && is_file(Util\Common::realpath($standard.DIRECTORY_SEPARATOR.'ruleset.xml')) === true + ) { + $standard = Util\Common::realpath($standard.DIRECTORY_SEPARATOR.'ruleset.xml'); + } + } else { + $standard = $installed; + } + + $standardPaths[] = $standard; + } + + foreach ($standardPaths as $standard) { + $ruleset = @simplexml_load_string(file_get_contents($standard)); + if ($ruleset !== false) { + $standardName = (string) $ruleset['name']; + if ($this->name !== '') { + $this->name .= ', '; + } + + $this->name .= $standardName; + + // Allow autoloading of custom files inside this standard. + if (isset($ruleset['namespace']) === true) { + $namespace = (string) $ruleset['namespace']; + } else { + $namespace = basename(dirname($standard)); + } + + Autoload::addSearchPath(dirname($standard), $namespace); + } + + if (defined('PHP_CODESNIFFER_IN_TESTS') === true && empty($restrictions) === false) { + // In unit tests, only register the sniffs that the test wants and not the entire standard. + try { + foreach ($restrictions as $restriction) { + $sniffs = array_merge($sniffs, $this->expandRulesetReference($restriction, dirname($standard))); + } + } catch (RuntimeException $e) { + // Sniff reference could not be expanded, which probably means this + // is an installed standard. Let the unit test system take care of + // setting the correct sniff for testing. + return; + } + + break; + } + + if (PHP_CODESNIFFER_VERBOSITY === 1) { + echo "Registering sniffs in the $standardName standard... "; + if (count($config->standards) > 1 || PHP_CODESNIFFER_VERBOSITY > 2) { + echo PHP_EOL; + } + } + + $sniffs = array_merge($sniffs, $this->processRuleset($standard)); + }//end foreach + + // Ignore sniff restrictions if caching is on. + if ($config->cache === true) { + $restrictions = []; + $exclusions = []; + } + + $sniffRestrictions = []; + foreach ($restrictions as $sniffCode) { + $parts = explode('.', strtolower($sniffCode)); + $sniffName = $parts[0].'\sniffs\\'.$parts[1].'\\'.$parts[2].'sniff'; + $sniffRestrictions[$sniffName] = true; + } + + $sniffExclusions = []; + foreach ($exclusions as $sniffCode) { + $parts = explode('.', strtolower($sniffCode)); + $sniffName = $parts[0].'\sniffs\\'.$parts[1].'\\'.$parts[2].'sniff'; + $sniffExclusions[$sniffName] = true; + } + + $this->registerSniffs($sniffs, $sniffRestrictions, $sniffExclusions); + $this->populateTokenListeners(); + + $numSniffs = count($this->sniffs); + if (PHP_CODESNIFFER_VERBOSITY === 1) { + echo "DONE ($numSniffs sniffs registered)".PHP_EOL; + } + + if ($numSniffs === 0) { + throw new RuntimeException('No sniffs were registered'); + } + + }//end __construct() + + + /** + * Prints a report showing the sniffs contained in a standard. + * + * @return void + */ + public function explain() + { + $sniffs = array_keys($this->sniffCodes); + sort($sniffs); + + ob_start(); + + $lastStandard = null; + $lastCount = ''; + $sniffCount = count($sniffs); + + // Add a dummy entry to the end so we loop + // one last time and clear the output buffer. + $sniffs[] = ''; + + echo PHP_EOL."The $this->name standard contains $sniffCount sniffs".PHP_EOL; + + ob_start(); + + foreach ($sniffs as $i => $sniff) { + if ($i === $sniffCount) { + $currentStandard = null; + } else { + $currentStandard = substr($sniff, 0, strpos($sniff, '.')); + if ($lastStandard === null) { + $lastStandard = $currentStandard; + } + } + + if ($currentStandard !== $lastStandard) { + $sniffList = ob_get_contents(); + ob_end_clean(); + + echo PHP_EOL.$lastStandard.' ('.$lastCount.' sniff'; + if ($lastCount > 1) { + echo 's'; + } + + echo ')'.PHP_EOL; + echo str_repeat('-', (strlen($lastStandard.$lastCount) + 10)); + echo PHP_EOL; + echo $sniffList; + + $lastStandard = $currentStandard; + $lastCount = 0; + + if ($currentStandard === null) { + break; + } + + ob_start(); + }//end if + + echo ' '.$sniff.PHP_EOL; + $lastCount++; + }//end foreach + + }//end explain() + + + /** + * Processes a single ruleset and returns a list of the sniffs it represents. + * + * Rules founds within the ruleset are processed immediately, but sniff classes + * are not registered by this method. + * + * @param string $rulesetPath The path to a ruleset XML file. + * @param int $depth How many nested processing steps we are in. This + * is only used for debug output. + * + * @return string[] + * @throws \PHP_CodeSniffer\Exceptions\RuntimeException - If the ruleset path is invalid. + * - If a specified autoload file could not be found. + */ + public function processRuleset($rulesetPath, $depth=0) + { + $rulesetPath = Util\Common::realpath($rulesetPath); + if (PHP_CODESNIFFER_VERBOSITY > 1) { + echo str_repeat("\t", $depth); + echo 'Processing ruleset '.Util\Common::stripBasepath($rulesetPath, $this->config->basepath).PHP_EOL; + } + + libxml_use_internal_errors(true); + $ruleset = simplexml_load_string(file_get_contents($rulesetPath)); + if ($ruleset === false) { + $errorMsg = "Ruleset $rulesetPath is not valid".PHP_EOL; + $errors = libxml_get_errors(); + foreach ($errors as $error) { + $errorMsg .= '- On line '.$error->line.', column '.$error->column.': '.$error->message; + } + + libxml_clear_errors(); + throw new RuntimeException($errorMsg); + } + + libxml_use_internal_errors(false); + + $ownSniffs = []; + $includedSniffs = []; + $excludedSniffs = []; + + $this->paths[] = $rulesetPath; + $rulesetDir = dirname($rulesetPath); + $this->rulesetDirs[] = $rulesetDir; + + $sniffDir = $rulesetDir.DIRECTORY_SEPARATOR.'Sniffs'; + if (is_dir($sniffDir) === true) { + if (PHP_CODESNIFFER_VERBOSITY > 1) { + echo str_repeat("\t", $depth); + echo "\tAdding sniff files from ".Util\Common::stripBasepath($sniffDir, $this->config->basepath).' directory'.PHP_EOL; + } + + $ownSniffs = $this->expandSniffDirectory($sniffDir, $depth); + } + + // Include custom autoloaders. + foreach ($ruleset->{'autoload'} as $autoload) { + if ($this->shouldProcessElement($autoload) === false) { + continue; + } + + $autoloadPath = (string) $autoload; + + // Try relative autoload paths first. + $relativePath = Util\Common::realPath(dirname($rulesetPath).DIRECTORY_SEPARATOR.$autoloadPath); + + if ($relativePath !== false && is_file($relativePath) === true) { + $autoloadPath = $relativePath; + } else if (is_file($autoloadPath) === false) { + throw new RuntimeException('The specified autoload file "'.$autoload.'" does not exist'); + } + + include_once $autoloadPath; + + if (PHP_CODESNIFFER_VERBOSITY > 1) { + echo str_repeat("\t", $depth); + echo "\t=> included autoloader $autoloadPath".PHP_EOL; + } + }//end foreach + + // Process custom sniff config settings. + foreach ($ruleset->{'config'} as $config) { + if ($this->shouldProcessElement($config) === false) { + continue; + } + + Config::setConfigData((string) $config['name'], (string) $config['value'], true); + if (PHP_CODESNIFFER_VERBOSITY > 1) { + echo str_repeat("\t", $depth); + echo "\t=> set config value ".(string) $config['name'].': '.(string) $config['value'].PHP_EOL; + } + } + + foreach ($ruleset->rule as $rule) { + if (isset($rule['ref']) === false + || $this->shouldProcessElement($rule) === false + ) { + continue; + } + + if (PHP_CODESNIFFER_VERBOSITY > 1) { + echo str_repeat("\t", $depth); + echo "\tProcessing rule \"".$rule['ref'].'"'.PHP_EOL; + } + + $expandedSniffs = $this->expandRulesetReference((string) $rule['ref'], $rulesetDir, $depth); + $newSniffs = array_diff($expandedSniffs, $includedSniffs); + $includedSniffs = array_merge($includedSniffs, $expandedSniffs); + + $parts = explode('.', $rule['ref']); + if (count($parts) === 4 + && $parts[0] !== '' + && $parts[1] !== '' + && $parts[2] !== '' + ) { + $sniffCode = $parts[0].'.'.$parts[1].'.'.$parts[2]; + if (isset($this->ruleset[$sniffCode]['severity']) === true + && $this->ruleset[$sniffCode]['severity'] === 0 + ) { + // This sniff code has already been turned off, but now + // it is being explicitly included again, so turn it back on. + $this->ruleset[(string) $rule['ref']]['severity'] = 5; + if (PHP_CODESNIFFER_VERBOSITY > 1) { + echo str_repeat("\t", $depth); + echo "\t\t* disabling sniff exclusion for specific message code *".PHP_EOL; + echo str_repeat("\t", $depth); + echo "\t\t=> severity set to 5".PHP_EOL; + } + } else if (empty($newSniffs) === false) { + $newSniff = $newSniffs[0]; + if (in_array($newSniff, $ownSniffs, true) === false) { + // Including a sniff that hasn't been included higher up, but + // only including a single message from it. So turn off all messages in + // the sniff, except this one. + $this->ruleset[$sniffCode]['severity'] = 0; + $this->ruleset[(string) $rule['ref']]['severity'] = 5; + if (PHP_CODESNIFFER_VERBOSITY > 1) { + echo str_repeat("\t", $depth); + echo "\t\tExcluding sniff \"".$sniffCode.'" except for "'.$parts[3].'"'.PHP_EOL; + } + } + }//end if + }//end if + + if (isset($rule->exclude) === true) { + foreach ($rule->exclude as $exclude) { + if (isset($exclude['name']) === false) { + if (PHP_CODESNIFFER_VERBOSITY > 1) { + echo str_repeat("\t", $depth); + echo "\t\t* ignoring empty exclude rule *".PHP_EOL; + echo "\t\t\t=> ".$exclude->asXML().PHP_EOL; + } + + continue; + } + + if ($this->shouldProcessElement($exclude) === false) { + continue; + } + + if (PHP_CODESNIFFER_VERBOSITY > 1) { + echo str_repeat("\t", $depth); + echo "\t\tExcluding rule \"".$exclude['name'].'"'.PHP_EOL; + } + + // Check if a single code is being excluded, which is a shortcut + // for setting the severity of the message to 0. + $parts = explode('.', $exclude['name']); + if (count($parts) === 4) { + $this->ruleset[(string) $exclude['name']]['severity'] = 0; + if (PHP_CODESNIFFER_VERBOSITY > 1) { + echo str_repeat("\t", $depth); + echo "\t\t=> severity set to 0".PHP_EOL; + } + } else { + $excludedSniffs = array_merge( + $excludedSniffs, + $this->expandRulesetReference((string) $exclude['name'], $rulesetDir, ($depth + 1)) + ); + } + }//end foreach + }//end if + + $this->processRule($rule, $newSniffs, $depth); + }//end foreach + + // Process custom command line arguments. + $cliArgs = []; + foreach ($ruleset->{'arg'} as $arg) { + if ($this->shouldProcessElement($arg) === false) { + continue; + } + + if (isset($arg['name']) === true) { + $argString = '--'.(string) $arg['name']; + if (isset($arg['value']) === true) { + $argString .= '='.(string) $arg['value']; + } + } else { + $argString = '-'.(string) $arg['value']; + } + + $cliArgs[] = $argString; + + if (PHP_CODESNIFFER_VERBOSITY > 1) { + echo str_repeat("\t", $depth); + echo "\t=> set command line value $argString".PHP_EOL; + } + }//end foreach + + // Set custom php ini values as CLI args. + foreach ($ruleset->{'ini'} as $arg) { + if ($this->shouldProcessElement($arg) === false) { + continue; + } + + if (isset($arg['name']) === false) { + continue; + } + + $name = (string) $arg['name']; + $argString = $name; + if (isset($arg['value']) === true) { + $value = (string) $arg['value']; + $argString .= "=$value"; + } else { + $value = 'true'; + } + + $cliArgs[] = '-d'; + $cliArgs[] = $argString; + + if (PHP_CODESNIFFER_VERBOSITY > 1) { + echo str_repeat("\t", $depth); + echo "\t=> set PHP ini value $name to $value".PHP_EOL; + } + }//end foreach + + if (empty($this->config->files) === true) { + // Process hard-coded file paths. + foreach ($ruleset->{'file'} as $file) { + $file = (string) $file; + $cliArgs[] = $file; + if (PHP_CODESNIFFER_VERBOSITY > 1) { + echo str_repeat("\t", $depth); + echo "\t=> added \"$file\" to the file list".PHP_EOL; + } + } + } + + if (empty($cliArgs) === false) { + // Change the directory so all relative paths are worked + // out based on the location of the ruleset instead of + // the location of the user. + $inPhar = Util\Common::isPharFile($rulesetDir); + if ($inPhar === false) { + $currentDir = getcwd(); + chdir($rulesetDir); + } + + $this->config->setCommandLineValues($cliArgs); + + if ($inPhar === false) { + chdir($currentDir); + } + } + + // Process custom ignore pattern rules. + foreach ($ruleset->{'exclude-pattern'} as $pattern) { + if ($this->shouldProcessElement($pattern) === false) { + continue; + } + + if (isset($pattern['type']) === false) { + $pattern['type'] = 'absolute'; + } + + $this->ignorePatterns[(string) $pattern] = (string) $pattern['type']; + if (PHP_CODESNIFFER_VERBOSITY > 1) { + echo str_repeat("\t", $depth); + echo "\t=> added global ".(string) $pattern['type'].' ignore pattern: '.(string) $pattern.PHP_EOL; + } + } + + $includedSniffs = array_unique(array_merge($ownSniffs, $includedSniffs)); + $excludedSniffs = array_unique($excludedSniffs); + + if (PHP_CODESNIFFER_VERBOSITY > 1) { + $included = count($includedSniffs); + $excluded = count($excludedSniffs); + echo str_repeat("\t", $depth); + echo "=> Ruleset processing complete; included $included sniffs and excluded $excluded".PHP_EOL; + } + + // Merge our own sniff list with our externally included + // sniff list, but filter out any excluded sniffs. + $files = []; + foreach ($includedSniffs as $sniff) { + if (in_array($sniff, $excludedSniffs, true) === true) { + continue; + } else { + $files[] = Util\Common::realpath($sniff); + } + } + + return $files; + + }//end processRuleset() + + + /** + * Expands a directory into a list of sniff files within. + * + * @param string $directory The path to a directory. + * @param int $depth How many nested processing steps we are in. This + * is only used for debug output. + * + * @return array + */ + private function expandSniffDirectory($directory, $depth=0) + { + $sniffs = []; + + $rdi = new \RecursiveDirectoryIterator($directory, \RecursiveDirectoryIterator::FOLLOW_SYMLINKS); + $di = new \RecursiveIteratorIterator($rdi, 0, \RecursiveIteratorIterator::CATCH_GET_CHILD); + + $dirLen = strlen($directory); + + foreach ($di as $file) { + $filename = $file->getFilename(); + + // Skip hidden files. + if (substr($filename, 0, 1) === '.') { + continue; + } + + // We are only interested in PHP and sniff files. + $fileParts = explode('.', $filename); + if (array_pop($fileParts) !== 'php') { + continue; + } + + $basename = basename($filename, '.php'); + if (substr($basename, -5) !== 'Sniff') { + continue; + } + + $path = $file->getPathname(); + + // Skip files in hidden directories within the Sniffs directory of this + // standard. We use the offset with strpos() to allow hidden directories + // before, valid example: + // /home/foo/.composer/vendor/squiz/custom_tool/MyStandard/Sniffs/... + if (strpos($path, DIRECTORY_SEPARATOR.'.', $dirLen) !== false) { + continue; + } + + if (PHP_CODESNIFFER_VERBOSITY > 1) { + echo str_repeat("\t", $depth); + echo "\t\t=> ".Util\Common::stripBasepath($path, $this->config->basepath).PHP_EOL; + } + + $sniffs[] = $path; + }//end foreach + + return $sniffs; + + }//end expandSniffDirectory() + + + /** + * Expands a ruleset reference into a list of sniff files. + * + * @param string $ref The reference from the ruleset XML file. + * @param string $rulesetDir The directory of the ruleset XML file, used to + * evaluate relative paths. + * @param int $depth How many nested processing steps we are in. This + * is only used for debug output. + * + * @return array + * @throws \PHP_CodeSniffer\Exceptions\RuntimeException If the reference is invalid. + */ + private function expandRulesetReference($ref, $rulesetDir, $depth=0) + { + // Ignore internal sniffs codes as they are used to only + // hide and change internal messages. + if (substr($ref, 0, 9) === 'Internal.') { + if (PHP_CODESNIFFER_VERBOSITY > 1) { + echo str_repeat("\t", $depth); + echo "\t\t* ignoring internal sniff code *".PHP_EOL; + } + + return []; + } + + // As sniffs can't begin with a full stop, assume references in + // this format are relative paths and attempt to convert them + // to absolute paths. If this fails, let the reference run through + // the normal checks and have it fail as normal. + if (substr($ref, 0, 1) === '.') { + $realpath = Util\Common::realpath($rulesetDir.'/'.$ref); + if ($realpath !== false) { + $ref = $realpath; + if (PHP_CODESNIFFER_VERBOSITY > 1) { + echo str_repeat("\t", $depth); + echo "\t\t=> ".Util\Common::stripBasepath($ref, $this->config->basepath).PHP_EOL; + } + } + } + + // As sniffs can't begin with a tilde, assume references in + // this format are relative to the user's home directory. + if (substr($ref, 0, 2) === '~/') { + $realpath = Util\Common::realpath($ref); + if ($realpath !== false) { + $ref = $realpath; + if (PHP_CODESNIFFER_VERBOSITY > 1) { + echo str_repeat("\t", $depth); + echo "\t\t=> ".Util\Common::stripBasepath($ref, $this->config->basepath).PHP_EOL; + } + } + } + + if (is_file($ref) === true) { + if (substr($ref, -9) === 'Sniff.php') { + // A single external sniff. + $this->rulesetDirs[] = dirname(dirname(dirname($ref))); + return [$ref]; + } + } else { + // See if this is a whole standard being referenced. + $path = Util\Standards::getInstalledStandardPath($ref); + if ($path !== null && Util\Common::isPharFile($path) === true && strpos($path, 'ruleset.xml') === false) { + // If the ruleset exists inside the phar file, use it. + if (file_exists($path.DIRECTORY_SEPARATOR.'ruleset.xml') === true) { + $path .= DIRECTORY_SEPARATOR.'ruleset.xml'; + } else { + $path = null; + } + } + + if ($path !== null) { + $ref = $path; + if (PHP_CODESNIFFER_VERBOSITY > 1) { + echo str_repeat("\t", $depth); + echo "\t\t=> ".Util\Common::stripBasepath($ref, $this->config->basepath).PHP_EOL; + } + } else if (is_dir($ref) === false) { + // Work out the sniff path. + $sepPos = strpos($ref, DIRECTORY_SEPARATOR); + if ($sepPos !== false) { + $stdName = substr($ref, 0, $sepPos); + $path = substr($ref, $sepPos); + } else { + $parts = explode('.', $ref); + $stdName = $parts[0]; + if (count($parts) === 1) { + // A whole standard? + $path = ''; + } else if (count($parts) === 2) { + // A directory of sniffs? + $path = DIRECTORY_SEPARATOR.'Sniffs'.DIRECTORY_SEPARATOR.$parts[1]; + } else { + // A single sniff? + $path = DIRECTORY_SEPARATOR.'Sniffs'.DIRECTORY_SEPARATOR.$parts[1].DIRECTORY_SEPARATOR.$parts[2].'Sniff.php'; + } + } + + $newRef = false; + $stdPath = Util\Standards::getInstalledStandardPath($stdName); + if ($stdPath !== null && $path !== '') { + if (Util\Common::isPharFile($stdPath) === true + && strpos($stdPath, 'ruleset.xml') === false + ) { + // Phar files can only return the directory, + // since ruleset can be omitted if building one standard. + $newRef = Util\Common::realpath($stdPath.$path); + } else { + $newRef = Util\Common::realpath(dirname($stdPath).$path); + } + } + + if ($newRef === false) { + // The sniff is not locally installed, so check if it is being + // referenced as a remote sniff outside the install. We do this + // by looking through all directories where we have found ruleset + // files before, looking for ones for this particular standard, + // and seeing if it is in there. + foreach ($this->rulesetDirs as $dir) { + if (strtolower(basename($dir)) !== strtolower($stdName)) { + continue; + } + + $newRef = Util\Common::realpath($dir.$path); + + if ($newRef !== false) { + $ref = $newRef; + } + } + } else { + $ref = $newRef; + } + + if (PHP_CODESNIFFER_VERBOSITY > 1) { + echo str_repeat("\t", $depth); + echo "\t\t=> ".Util\Common::stripBasepath($ref, $this->config->basepath).PHP_EOL; + } + }//end if + }//end if + + if (is_dir($ref) === true) { + if (is_file($ref.DIRECTORY_SEPARATOR.'ruleset.xml') === true) { + // We are referencing an external coding standard. + if (PHP_CODESNIFFER_VERBOSITY > 1) { + echo str_repeat("\t", $depth); + echo "\t\t* rule is referencing a standard using directory name; processing *".PHP_EOL; + } + + return $this->processRuleset($ref.DIRECTORY_SEPARATOR.'ruleset.xml', ($depth + 2)); + } else { + // We are referencing a whole directory of sniffs. + if (PHP_CODESNIFFER_VERBOSITY > 1) { + echo str_repeat("\t", $depth); + echo "\t\t* rule is referencing a directory of sniffs *".PHP_EOL; + echo str_repeat("\t", $depth); + echo "\t\tAdding sniff files from directory".PHP_EOL; + } + + return $this->expandSniffDirectory($ref, ($depth + 1)); + } + } else { + if (is_file($ref) === false) { + $error = "Referenced sniff \"$ref\" does not exist"; + throw new RuntimeException($error); + } + + if (substr($ref, -9) === 'Sniff.php') { + // A single sniff. + return [$ref]; + } else { + // Assume an external ruleset.xml file. + if (PHP_CODESNIFFER_VERBOSITY > 1) { + echo str_repeat("\t", $depth); + echo "\t\t* rule is referencing a standard using ruleset path; processing *".PHP_EOL; + } + + return $this->processRuleset($ref, ($depth + 2)); + } + }//end if + + }//end expandRulesetReference() + + + /** + * Processes a rule from a ruleset XML file, overriding built-in defaults. + * + * @param \SimpleXMLElement $rule The rule object from a ruleset XML file. + * @param string[] $newSniffs An array of sniffs that got included by this rule. + * @param int $depth How many nested processing steps we are in. + * This is only used for debug output. + * + * @return void + * @throws \PHP_CodeSniffer\Exceptions\RuntimeException If rule settings are invalid. + */ + private function processRule($rule, $newSniffs, $depth=0) + { + $ref = (string) $rule['ref']; + $todo = [$ref]; + + $parts = explode('.', $ref); + $partsCount = count($parts); + if ($partsCount <= 2 + || $partsCount > count(array_filter($parts)) + || in_array($ref, $newSniffs) === true + ) { + // We are processing a standard, a category of sniffs or a relative path inclusion. + foreach ($newSniffs as $sniffFile) { + $parts = explode(DIRECTORY_SEPARATOR, $sniffFile); + if (count($parts) === 1 && DIRECTORY_SEPARATOR === '\\') { + // Path using forward slashes while running on Windows. + $parts = explode('/', $sniffFile); + } + + $sniffName = array_pop($parts); + $sniffCategory = array_pop($parts); + array_pop($parts); + $sniffStandard = array_pop($parts); + $todo[] = $sniffStandard.'.'.$sniffCategory.'.'.substr($sniffName, 0, -9); + } + } + + foreach ($todo as $code) { + // Custom severity. + if (isset($rule->severity) === true + && $this->shouldProcessElement($rule->severity) === true + ) { + if (isset($this->ruleset[$code]) === false) { + $this->ruleset[$code] = []; + } + + $this->ruleset[$code]['severity'] = (int) $rule->severity; + if (PHP_CODESNIFFER_VERBOSITY > 1) { + echo str_repeat("\t", $depth); + echo "\t\t=> severity set to ".(int) $rule->severity; + if ($code !== $ref) { + echo " for $code"; + } + + echo PHP_EOL; + } + } + + // Custom message type. + if (isset($rule->type) === true + && $this->shouldProcessElement($rule->type) === true + ) { + if (isset($this->ruleset[$code]) === false) { + $this->ruleset[$code] = []; + } + + $type = strtolower((string) $rule->type); + if ($type !== 'error' && $type !== 'warning') { + throw new RuntimeException("Message type \"$type\" is invalid; must be \"error\" or \"warning\""); + } + + $this->ruleset[$code]['type'] = $type; + if (PHP_CODESNIFFER_VERBOSITY > 1) { + echo str_repeat("\t", $depth); + echo "\t\t=> message type set to ".(string) $rule->type; + if ($code !== $ref) { + echo " for $code"; + } + + echo PHP_EOL; + } + }//end if + + // Custom message. + if (isset($rule->message) === true + && $this->shouldProcessElement($rule->message) === true + ) { + if (isset($this->ruleset[$code]) === false) { + $this->ruleset[$code] = []; + } + + $this->ruleset[$code]['message'] = (string) $rule->message; + if (PHP_CODESNIFFER_VERBOSITY > 1) { + echo str_repeat("\t", $depth); + echo "\t\t=> message set to ".(string) $rule->message; + if ($code !== $ref) { + echo " for $code"; + } + + echo PHP_EOL; + } + } + + // Custom properties. + if (isset($rule->properties) === true + && $this->shouldProcessElement($rule->properties) === true + ) { + foreach ($rule->properties->property as $prop) { + if ($this->shouldProcessElement($prop) === false) { + continue; + } + + if (isset($this->ruleset[$code]) === false) { + $this->ruleset[$code] = [ + 'properties' => [], + ]; + } else if (isset($this->ruleset[$code]['properties']) === false) { + $this->ruleset[$code]['properties'] = []; + } + + $name = (string) $prop['name']; + if (isset($prop['type']) === true + && (string) $prop['type'] === 'array' + ) { + $values = []; + if (isset($prop['extend']) === true + && (string) $prop['extend'] === 'true' + && isset($this->ruleset[$code]['properties'][$name]) === true + ) { + $values = $this->ruleset[$code]['properties'][$name]; + } + + if (isset($prop->element) === true) { + $printValue = ''; + foreach ($prop->element as $element) { + if ($this->shouldProcessElement($element) === false) { + continue; + } + + $value = (string) $element['value']; + if (isset($element['key']) === true) { + $key = (string) $element['key']; + $values[$key] = $value; + $printValue .= $key.'=>'.$value.','; + } else { + $values[] = $value; + $printValue .= $value.','; + } + } + + $printValue = rtrim($printValue, ','); + } else { + $value = (string) $prop['value']; + $printValue = $value; + foreach (explode(',', $value) as $val) { + list($k, $v) = explode('=>', $val.'=>'); + if ($v !== '') { + $values[trim($k)] = trim($v); + } else { + $values[] = trim($k); + } + } + }//end if + + $this->ruleset[$code]['properties'][$name] = $values; + if (PHP_CODESNIFFER_VERBOSITY > 1) { + echo str_repeat("\t", $depth); + echo "\t\t=> array property \"$name\" set to \"$printValue\""; + if ($code !== $ref) { + echo " for $code"; + } + + echo PHP_EOL; + } + } else { + $this->ruleset[$code]['properties'][$name] = (string) $prop['value']; + if (PHP_CODESNIFFER_VERBOSITY > 1) { + echo str_repeat("\t", $depth); + echo "\t\t=> property \"$name\" set to \"".(string) $prop['value'].'"'; + if ($code !== $ref) { + echo " for $code"; + } + + echo PHP_EOL; + } + }//end if + }//end foreach + }//end if + + // Ignore patterns. + foreach ($rule->{'exclude-pattern'} as $pattern) { + if ($this->shouldProcessElement($pattern) === false) { + continue; + } + + if (isset($this->ignorePatterns[$code]) === false) { + $this->ignorePatterns[$code] = []; + } + + if (isset($pattern['type']) === false) { + $pattern['type'] = 'absolute'; + } + + $this->ignorePatterns[$code][(string) $pattern] = (string) $pattern['type']; + if (PHP_CODESNIFFER_VERBOSITY > 1) { + echo str_repeat("\t", $depth); + echo "\t\t=> added rule-specific ".(string) $pattern['type'].' ignore pattern'; + if ($code !== $ref) { + echo " for $code"; + } + + echo ': '.(string) $pattern.PHP_EOL; + } + }//end foreach + + // Include patterns. + foreach ($rule->{'include-pattern'} as $pattern) { + if ($this->shouldProcessElement($pattern) === false) { + continue; + } + + if (isset($this->includePatterns[$code]) === false) { + $this->includePatterns[$code] = []; + } + + if (isset($pattern['type']) === false) { + $pattern['type'] = 'absolute'; + } + + $this->includePatterns[$code][(string) $pattern] = (string) $pattern['type']; + if (PHP_CODESNIFFER_VERBOSITY > 1) { + echo str_repeat("\t", $depth); + echo "\t\t=> added rule-specific ".(string) $pattern['type'].' include pattern'; + if ($code !== $ref) { + echo " for $code"; + } + + echo ': '.(string) $pattern.PHP_EOL; + } + }//end foreach + }//end foreach + + }//end processRule() + + + /** + * Determine if an element should be processed or ignored. + * + * @param \SimpleXMLElement $element An object from a ruleset XML file. + * + * @return bool + */ + private function shouldProcessElement($element) + { + if (isset($element['phpcbf-only']) === false + && isset($element['phpcs-only']) === false + ) { + // No exceptions are being made. + return true; + } + + if (PHP_CODESNIFFER_CBF === true + && isset($element['phpcbf-only']) === true + && (string) $element['phpcbf-only'] === 'true' + ) { + return true; + } + + if (PHP_CODESNIFFER_CBF === false + && isset($element['phpcs-only']) === true + && (string) $element['phpcs-only'] === 'true' + ) { + return true; + } + + return false; + + }//end shouldProcessElement() + + + /** + * Loads and stores sniffs objects used for sniffing files. + * + * @param array $files Paths to the sniff files to register. + * @param array $restrictions The sniff class names to restrict the allowed + * listeners to. + * @param array $exclusions The sniff class names to exclude from the + * listeners list. + * + * @return void + */ + public function registerSniffs($files, $restrictions, $exclusions) + { + $listeners = []; + + foreach ($files as $file) { + // Work out where the position of /StandardName/Sniffs/... is + // so we can determine what the class will be called. + $sniffPos = strrpos($file, DIRECTORY_SEPARATOR.'Sniffs'.DIRECTORY_SEPARATOR); + if ($sniffPos === false) { + continue; + } + + $slashPos = strrpos(substr($file, 0, $sniffPos), DIRECTORY_SEPARATOR); + if ($slashPos === false) { + continue; + } + + $className = Autoload::loadFile($file); + $compareName = Util\Common::cleanSniffClass($className); + + // If they have specified a list of sniffs to restrict to, check + // to see if this sniff is allowed. + if (empty($restrictions) === false + && isset($restrictions[$compareName]) === false + ) { + continue; + } + + // If they have specified a list of sniffs to exclude, check + // to see if this sniff is allowed. + if (empty($exclusions) === false + && isset($exclusions[$compareName]) === true + ) { + continue; + } + + // Skip abstract classes. + $reflection = new \ReflectionClass($className); + if ($reflection->isAbstract() === true) { + continue; + } + + $listeners[$className] = $className; + + if (PHP_CODESNIFFER_VERBOSITY > 2) { + echo "Registered $className".PHP_EOL; + } + }//end foreach + + $this->sniffs = $listeners; + + }//end registerSniffs() + + + /** + * Populates the array of PHP_CodeSniffer_Sniff objects for this file. + * + * @return void + * @throws \PHP_CodeSniffer\Exceptions\RuntimeException If sniff registration fails. + */ + public function populateTokenListeners() + { + // Construct a list of listeners indexed by token being listened for. + $this->tokenListeners = []; + + foreach ($this->sniffs as $sniffClass => $sniffObject) { + $this->sniffs[$sniffClass] = null; + $this->sniffs[$sniffClass] = new $sniffClass(); + + $sniffCode = Util\Common::getSniffCode($sniffClass); + $this->sniffCodes[$sniffCode] = $sniffClass; + + // Set custom properties. + if (isset($this->ruleset[$sniffCode]['properties']) === true) { + foreach ($this->ruleset[$sniffCode]['properties'] as $name => $value) { + $this->setSniffProperty($sniffClass, $name, $value); + } + } + + $tokenizers = []; + $vars = get_class_vars($sniffClass); + if (isset($vars['supportedTokenizers']) === true) { + foreach ($vars['supportedTokenizers'] as $tokenizer) { + $tokenizers[$tokenizer] = $tokenizer; + } + } else { + $tokenizers = ['PHP' => 'PHP']; + } + + $tokens = $this->sniffs[$sniffClass]->register(); + if (is_array($tokens) === false) { + $msg = "Sniff $sniffClass register() method must return an array"; + throw new RuntimeException($msg); + } + + $ignorePatterns = []; + $patterns = $this->getIgnorePatterns($sniffCode); + foreach ($patterns as $pattern => $type) { + $replacements = [ + '\\,' => ',', + '*' => '.*', + ]; + + $ignorePatterns[] = strtr($pattern, $replacements); + } + + $includePatterns = []; + $patterns = $this->getIncludePatterns($sniffCode); + foreach ($patterns as $pattern => $type) { + $replacements = [ + '\\,' => ',', + '*' => '.*', + ]; + + $includePatterns[] = strtr($pattern, $replacements); + } + + foreach ($tokens as $token) { + if (isset($this->tokenListeners[$token]) === false) { + $this->tokenListeners[$token] = []; + } + + if (isset($this->tokenListeners[$token][$sniffClass]) === false) { + $this->tokenListeners[$token][$sniffClass] = [ + 'class' => $sniffClass, + 'source' => $sniffCode, + 'tokenizers' => $tokenizers, + 'ignore' => $ignorePatterns, + 'include' => $includePatterns, + ]; + } + } + }//end foreach + + }//end populateTokenListeners() + + + /** + * Set a single property for a sniff. + * + * @param string $sniffClass The class name of the sniff. + * @param string $name The name of the property to change. + * @param string $value The new value of the property. + * + * @return void + */ + public function setSniffProperty($sniffClass, $name, $value) + { + // Setting a property for a sniff we are not using. + if (isset($this->sniffs[$sniffClass]) === false) { + return; + } + + $name = trim($name); + if (is_string($value) === true) { + $value = trim($value); + } + + if ($value === '') { + $value = null; + } + + // Special case for booleans. + if ($value === 'true') { + $value = true; + } else if ($value === 'false') { + $value = false; + } else if (substr($name, -2) === '[]') { + $name = substr($name, 0, -2); + $values = []; + if ($value !== null) { + foreach (explode(',', $value) as $val) { + list($k, $v) = explode('=>', $val.'=>'); + if ($v !== '') { + $values[trim($k)] = trim($v); + } else { + $values[] = trim($k); + } + } + } + + $value = $values; + } + + $this->sniffs[$sniffClass]->$name = $value; + + }//end setSniffProperty() + + + /** + * Gets the array of ignore patterns. + * + * Optionally takes a listener to get ignore patterns specified + * for that sniff only. + * + * @param string $listener The listener to get patterns for. If NULL, all + * patterns are returned. + * + * @return array + */ + public function getIgnorePatterns($listener=null) + { + if ($listener === null) { + return $this->ignorePatterns; + } + + if (isset($this->ignorePatterns[$listener]) === true) { + return $this->ignorePatterns[$listener]; + } + + return []; + + }//end getIgnorePatterns() + + + /** + * Gets the array of include patterns. + * + * Optionally takes a listener to get include patterns specified + * for that sniff only. + * + * @param string $listener The listener to get patterns for. If NULL, all + * patterns are returned. + * + * @return array + */ + public function getIncludePatterns($listener=null) + { + if ($listener === null) { + return $this->includePatterns; + } + + if (isset($this->includePatterns[$listener]) === true) { + return $this->includePatterns[$listener]; + } + + return []; + + }//end getIncludePatterns() + + +}//end class diff --git a/vendor/squizlabs/php_codesniffer/src/Runner.php b/vendor/squizlabs/php_codesniffer/src/Runner.php new file mode 100644 index 00000000..253ec91f --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Runner.php @@ -0,0 +1,890 @@ + + * @copyright 2006-2015 Squiz Pty Ltd (ABN 77 084 670 600) + * @license https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence + */ + +namespace PHP_CodeSniffer; + +use PHP_CodeSniffer\Exceptions\DeepExitException; +use PHP_CodeSniffer\Exceptions\RuntimeException; +use PHP_CodeSniffer\Files\DummyFile; +use PHP_CodeSniffer\Files\File; +use PHP_CodeSniffer\Files\FileList; +use PHP_CodeSniffer\Util\Cache; +use PHP_CodeSniffer\Util\Common; +use PHP_CodeSniffer\Util\Standards; + +class Runner +{ + + /** + * The config data for the run. + * + * @var \PHP_CodeSniffer\Config + */ + public $config = null; + + /** + * The ruleset used for the run. + * + * @var \PHP_CodeSniffer\Ruleset + */ + public $ruleset = null; + + /** + * The reporter used for generating reports after the run. + * + * @var \PHP_CodeSniffer\Reporter + */ + public $reporter = null; + + + /** + * Run the PHPCS script. + * + * @return array + */ + public function runPHPCS() + { + try { + Util\Timing::startTiming(); + Runner::checkRequirements(); + + if (defined('PHP_CODESNIFFER_CBF') === false) { + define('PHP_CODESNIFFER_CBF', false); + } + + // Creating the Config object populates it with all required settings + // based on the CLI arguments provided to the script and any config + // values the user has set. + $this->config = new Config(); + + // Init the run and load the rulesets to set additional config vars. + $this->init(); + + // Print a list of sniffs in each of the supplied standards. + // We fudge the config here so that each standard is explained in isolation. + if ($this->config->explain === true) { + $standards = $this->config->standards; + foreach ($standards as $standard) { + $this->config->standards = [$standard]; + $ruleset = new Ruleset($this->config); + $ruleset->explain(); + } + + return 0; + } + + // Generate documentation for each of the supplied standards. + if ($this->config->generator !== null) { + $standards = $this->config->standards; + foreach ($standards as $standard) { + $this->config->standards = [$standard]; + $ruleset = new Ruleset($this->config); + $class = 'PHP_CodeSniffer\Generators\\'.$this->config->generator; + $generator = new $class($ruleset); + $generator->generate(); + } + + return 0; + } + + // Other report formats don't really make sense in interactive mode + // so we hard-code the full report here and when outputting. + // We also ensure parallel processing is off because we need to do one file at a time. + if ($this->config->interactive === true) { + $this->config->reports = ['full' => null]; + $this->config->parallel = 1; + $this->config->showProgress = false; + } + + // Disable caching if we are processing STDIN as we can't be 100% + // sure where the file came from or if it will change in the future. + if ($this->config->stdin === true) { + $this->config->cache = false; + } + + $numErrors = $this->run(); + + // Print all the reports for this run. + $toScreen = $this->reporter->printReports(); + + // Only print timer output if no reports were + // printed to the screen so we don't put additional output + // in something like an XML report. If we are printing to screen, + // the report types would have already worked out who should + // print the timer info. + if ($this->config->interactive === false + && ($toScreen === false + || (($this->reporter->totalErrors + $this->reporter->totalWarnings) === 0 && $this->config->showProgress === true)) + ) { + Util\Timing::printRunTime(); + } + } catch (DeepExitException $e) { + echo $e->getMessage(); + return $e->getCode(); + }//end try + + if ($numErrors === 0) { + // No errors found. + return 0; + } else if ($this->reporter->totalFixable === 0) { + // Errors found, but none of them can be fixed by PHPCBF. + return 1; + } else { + // Errors found, and some can be fixed by PHPCBF. + return 2; + } + + }//end runPHPCS() + + + /** + * Run the PHPCBF script. + * + * @return array + */ + public function runPHPCBF() + { + if (defined('PHP_CODESNIFFER_CBF') === false) { + define('PHP_CODESNIFFER_CBF', true); + } + + try { + Util\Timing::startTiming(); + Runner::checkRequirements(); + + // Creating the Config object populates it with all required settings + // based on the CLI arguments provided to the script and any config + // values the user has set. + $this->config = new Config(); + + // When processing STDIN, we can't output anything to the screen + // or it will end up mixed in with the file output. + if ($this->config->stdin === true) { + $this->config->verbosity = 0; + } + + // Init the run and load the rulesets to set additional config vars. + $this->init(); + + // When processing STDIN, we only process one file at a time and + // we don't process all the way through, so we can't use the parallel + // running system. + if ($this->config->stdin === true) { + $this->config->parallel = 1; + } + + // Override some of the command line settings that might break the fixes. + $this->config->generator = null; + $this->config->explain = false; + $this->config->interactive = false; + $this->config->cache = false; + $this->config->showSources = false; + $this->config->recordErrors = false; + $this->config->reportFile = null; + $this->config->reports = ['cbf' => null]; + + // If a standard tries to set command line arguments itself, some + // may be blocked because PHPCBF is running, so stop the script + // dying if any are found. + $this->config->dieOnUnknownArg = false; + + $this->run(); + $this->reporter->printReports(); + + echo PHP_EOL; + Util\Timing::printRunTime(); + } catch (DeepExitException $e) { + echo $e->getMessage(); + return $e->getCode(); + }//end try + + if ($this->reporter->totalFixed === 0) { + // Nothing was fixed by PHPCBF. + if ($this->reporter->totalFixable === 0) { + // Nothing found that could be fixed. + return 0; + } else { + // Something failed to fix. + return 2; + } + } + + if ($this->reporter->totalFixable === 0) { + // PHPCBF fixed all fixable errors. + return 1; + } + + // PHPCBF fixed some fixable errors, but others failed to fix. + return 2; + + }//end runPHPCBF() + + + /** + * Exits if the minimum requirements of PHP_CodeSniffer are not met. + * + * @return void + * @throws \PHP_CodeSniffer\Exceptions\DeepExitException If the requirements are not met. + */ + public function checkRequirements() + { + // Check the PHP version. + if (PHP_VERSION_ID < 50400) { + $error = 'ERROR: PHP_CodeSniffer requires PHP version 5.4.0 or greater.'.PHP_EOL; + throw new DeepExitException($error, 3); + } + + $requiredExtensions = [ + 'tokenizer', + 'xmlwriter', + 'SimpleXML', + ]; + $missingExtensions = []; + + foreach ($requiredExtensions as $extension) { + if (extension_loaded($extension) === false) { + $missingExtensions[] = $extension; + } + } + + if (empty($missingExtensions) === false) { + $last = array_pop($requiredExtensions); + $required = implode(', ', $requiredExtensions); + $required .= ' and '.$last; + + if (count($missingExtensions) === 1) { + $missing = $missingExtensions[0]; + } else { + $last = array_pop($missingExtensions); + $missing = implode(', ', $missingExtensions); + $missing .= ' and '.$last; + } + + $error = 'ERROR: PHP_CodeSniffer requires the %s extensions to be enabled. Please enable %s.'.PHP_EOL; + $error = sprintf($error, $required, $missing); + throw new DeepExitException($error, 3); + } + + }//end checkRequirements() + + + /** + * Init the rulesets and other high-level settings. + * + * @return void + * @throws \PHP_CodeSniffer\Exceptions\DeepExitException If a referenced standard is not installed. + */ + public function init() + { + if (defined('PHP_CODESNIFFER_CBF') === false) { + define('PHP_CODESNIFFER_CBF', false); + } + + // Ensure this option is enabled or else line endings will not always + // be detected properly for files created on a Mac with the /r line ending. + @ini_set('auto_detect_line_endings', true); + + // Disable the PCRE JIT as this caused issues with parallel running. + ini_set('pcre.jit', false); + + // Check that the standards are valid. + foreach ($this->config->standards as $standard) { + if (Util\Standards::isInstalledStandard($standard) === false) { + // They didn't select a valid coding standard, so help them + // out by letting them know which standards are installed. + $error = 'ERROR: the "'.$standard.'" coding standard is not installed. '; + ob_start(); + Util\Standards::printInstalledStandards(); + $error .= ob_get_contents(); + ob_end_clean(); + throw new DeepExitException($error, 3); + } + } + + // Saves passing the Config object into other objects that only need + // the verbosity flag for debug output. + if (defined('PHP_CODESNIFFER_VERBOSITY') === false) { + define('PHP_CODESNIFFER_VERBOSITY', $this->config->verbosity); + } + + // Create this class so it is autoloaded and sets up a bunch + // of PHP_CodeSniffer-specific token type constants. + $tokens = new Util\Tokens(); + + // Allow autoloading of custom files inside installed standards. + $installedStandards = Standards::getInstalledStandardDetails(); + foreach ($installedStandards as $name => $details) { + Autoload::addSearchPath($details['path'], $details['namespace']); + } + + // The ruleset contains all the information about how the files + // should be checked and/or fixed. + try { + $this->ruleset = new Ruleset($this->config); + } catch (RuntimeException $e) { + $error = 'ERROR: '.$e->getMessage().PHP_EOL.PHP_EOL; + $error .= $this->config->printShortUsage(true); + throw new DeepExitException($error, 3); + } + + }//end init() + + + /** + * Performs the run. + * + * @return int The number of errors and warnings found. + * @throws \PHP_CodeSniffer\Exceptions\DeepExitException + * @throws \PHP_CodeSniffer\Exceptions\RuntimeException + */ + private function run() + { + // The class that manages all reporters for the run. + $this->reporter = new Reporter($this->config); + + // Include bootstrap files. + foreach ($this->config->bootstrap as $bootstrap) { + include $bootstrap; + } + + if ($this->config->stdin === true) { + $fileContents = $this->config->stdinContent; + if ($fileContents === null) { + $handle = fopen('php://stdin', 'r'); + stream_set_blocking($handle, true); + $fileContents = stream_get_contents($handle); + fclose($handle); + } + + $todo = new FileList($this->config, $this->ruleset); + $dummy = new DummyFile($fileContents, $this->ruleset, $this->config); + $todo->addFile($dummy->path, $dummy); + } else { + if (empty($this->config->files) === true) { + $error = 'ERROR: You must supply at least one file or directory to process.'.PHP_EOL.PHP_EOL; + $error .= $this->config->printShortUsage(true); + throw new DeepExitException($error, 3); + } + + if (PHP_CODESNIFFER_VERBOSITY > 0) { + echo 'Creating file list... '; + } + + $todo = new FileList($this->config, $this->ruleset); + + if (PHP_CODESNIFFER_VERBOSITY > 0) { + $numFiles = count($todo); + echo "DONE ($numFiles files in queue)".PHP_EOL; + } + + if ($this->config->cache === true) { + if (PHP_CODESNIFFER_VERBOSITY > 0) { + echo 'Loading cache... '; + } + + Cache::load($this->ruleset, $this->config); + + if (PHP_CODESNIFFER_VERBOSITY > 0) { + $size = Cache::getSize(); + echo "DONE ($size files in cache)".PHP_EOL; + } + } + }//end if + + // Turn all sniff errors into exceptions. + set_error_handler([$this, 'handleErrors']); + + // If verbosity is too high, turn off parallelism so the + // debug output is clean. + if (PHP_CODESNIFFER_VERBOSITY > 1) { + $this->config->parallel = 1; + } + + // If the PCNTL extension isn't installed, we can't fork. + if (function_exists('pcntl_fork') === false) { + $this->config->parallel = 1; + } + + $lastDir = ''; + $numFiles = count($todo); + + if ($this->config->parallel === 1) { + // Running normally. + $numProcessed = 0; + foreach ($todo as $path => $file) { + if ($file->ignored === false) { + $currDir = dirname($path); + if ($lastDir !== $currDir) { + if (PHP_CODESNIFFER_VERBOSITY > 0) { + echo 'Changing into directory '.Common::stripBasepath($currDir, $this->config->basepath).PHP_EOL; + } + + $lastDir = $currDir; + } + + $this->processFile($file); + } else if (PHP_CODESNIFFER_VERBOSITY > 0) { + echo 'Skipping '.basename($file->path).PHP_EOL; + } + + $numProcessed++; + $this->printProgress($file, $numFiles, $numProcessed); + } + } else { + // Batching and forking. + $childProcs = []; + $numPerBatch = ceil($numFiles / $this->config->parallel); + + for ($batch = 0; $batch < $this->config->parallel; $batch++) { + $startAt = ($batch * $numPerBatch); + if ($startAt >= $numFiles) { + break; + } + + $endAt = ($startAt + $numPerBatch); + if ($endAt > $numFiles) { + $endAt = $numFiles; + } + + $childOutFilename = tempnam(sys_get_temp_dir(), 'phpcs-child'); + $pid = pcntl_fork(); + if ($pid === -1) { + throw new RuntimeException('Failed to create child process'); + } else if ($pid !== 0) { + $childProcs[] = [ + 'pid' => $pid, + 'out' => $childOutFilename, + ]; + } else { + // Move forward to the start of the batch. + $todo->rewind(); + for ($i = 0; $i < $startAt; $i++) { + $todo->next(); + } + + // Reset the reporter to make sure only figures from this + // file batch are recorded. + $this->reporter->totalFiles = 0; + $this->reporter->totalErrors = 0; + $this->reporter->totalWarnings = 0; + $this->reporter->totalFixable = 0; + $this->reporter->totalFixed = 0; + + // Process the files. + $pathsProcessed = []; + ob_start(); + for ($i = $startAt; $i < $endAt; $i++) { + $path = $todo->key(); + $file = $todo->current(); + + if ($file->ignored === true) { + $todo->next(); + continue; + } + + $currDir = dirname($path); + if ($lastDir !== $currDir) { + if (PHP_CODESNIFFER_VERBOSITY > 0) { + echo 'Changing into directory '.Common::stripBasepath($currDir, $this->config->basepath).PHP_EOL; + } + + $lastDir = $currDir; + } + + $this->processFile($file); + + $pathsProcessed[] = $path; + $todo->next(); + }//end for + + $debugOutput = ob_get_contents(); + ob_end_clean(); + + // Write information about the run to the filesystem + // so it can be picked up by the main process. + $childOutput = [ + 'totalFiles' => $this->reporter->totalFiles, + 'totalErrors' => $this->reporter->totalErrors, + 'totalWarnings' => $this->reporter->totalWarnings, + 'totalFixable' => $this->reporter->totalFixable, + 'totalFixed' => $this->reporter->totalFixed, + ]; + + $output = '<'.'?php'."\n".' $childOutput = '; + $output .= var_export($childOutput, true); + $output .= ";\n\$debugOutput = "; + $output .= var_export($debugOutput, true); + + if ($this->config->cache === true) { + $childCache = []; + foreach ($pathsProcessed as $path) { + $childCache[$path] = Cache::get($path); + } + + $output .= ";\n\$childCache = "; + $output .= var_export($childCache, true); + } + + $output .= ";\n?".'>'; + file_put_contents($childOutFilename, $output); + exit($pid); + }//end if + }//end for + + $success = $this->processChildProcs($childProcs); + if ($success === false) { + throw new RuntimeException('One or more child processes failed to run'); + } + }//end if + + restore_error_handler(); + + if (PHP_CODESNIFFER_VERBOSITY === 0 + && $this->config->interactive === false + && $this->config->showProgress === true + ) { + echo PHP_EOL.PHP_EOL; + } + + if ($this->config->cache === true) { + Cache::save(); + } + + $ignoreWarnings = Config::getConfigData('ignore_warnings_on_exit'); + $ignoreErrors = Config::getConfigData('ignore_errors_on_exit'); + + $return = ($this->reporter->totalErrors + $this->reporter->totalWarnings); + if ($ignoreErrors !== null) { + $ignoreErrors = (bool) $ignoreErrors; + if ($ignoreErrors === true) { + $return -= $this->reporter->totalErrors; + } + } + + if ($ignoreWarnings !== null) { + $ignoreWarnings = (bool) $ignoreWarnings; + if ($ignoreWarnings === true) { + $return -= $this->reporter->totalWarnings; + } + } + + return $return; + + }//end run() + + + /** + * Converts all PHP errors into exceptions. + * + * This method forces a sniff to stop processing if it is not + * able to handle a specific piece of code, instead of continuing + * and potentially getting into a loop. + * + * @param int $code The level of error raised. + * @param string $message The error message. + * @param string $file The path of the file that raised the error. + * @param int $line The line number the error was raised at. + * + * @return void + * @throws \PHP_CodeSniffer\Exceptions\RuntimeException + */ + public function handleErrors($code, $message, $file, $line) + { + if ((error_reporting() & $code) === 0) { + // This type of error is being muted. + return true; + } + + throw new RuntimeException("$message in $file on line $line"); + + }//end handleErrors() + + + /** + * Processes a single file, including checking and fixing. + * + * @param \PHP_CodeSniffer\Files\File $file The file to be processed. + * + * @return void + * @throws \PHP_CodeSniffer\Exceptions\DeepExitException + */ + public function processFile($file) + { + if (PHP_CODESNIFFER_VERBOSITY > 0) { + $startTime = microtime(true); + echo 'Processing '.basename($file->path).' '; + if (PHP_CODESNIFFER_VERBOSITY > 1) { + echo PHP_EOL; + } + } + + try { + $file->process(); + + if (PHP_CODESNIFFER_VERBOSITY > 0) { + $timeTaken = ((microtime(true) - $startTime) * 1000); + if ($timeTaken < 1000) { + $timeTaken = round($timeTaken); + echo "DONE in {$timeTaken}ms"; + } else { + $timeTaken = round(($timeTaken / 1000), 2); + echo "DONE in $timeTaken secs"; + } + + if (PHP_CODESNIFFER_CBF === true) { + $errors = $file->getFixableCount(); + echo " ($errors fixable violations)".PHP_EOL; + } else { + $errors = $file->getErrorCount(); + $warnings = $file->getWarningCount(); + echo " ($errors errors, $warnings warnings)".PHP_EOL; + } + } + } catch (\Exception $e) { + $error = 'An error occurred during processing; checking has been aborted. The error message was: '.$e->getMessage(); + $file->addErrorOnLine($error, 1, 'Internal.Exception'); + }//end try + + $this->reporter->cacheFileReport($file, $this->config); + + if ($this->config->interactive === true) { + /* + Running interactively. + Print the error report for the current file and then wait for user input. + */ + + // Get current violations and then clear the list to make sure + // we only print violations for a single file each time. + $numErrors = null; + while ($numErrors !== 0) { + $numErrors = ($file->getErrorCount() + $file->getWarningCount()); + if ($numErrors === 0) { + continue; + } + + $this->reporter->printReport('full'); + + echo ' to recheck, [s] to skip or [q] to quit : '; + $input = fgets(STDIN); + $input = trim($input); + + switch ($input) { + case 's': + break(2); + case 'q': + throw new DeepExitException('', 0); + default: + // Repopulate the sniffs because some of them save their state + // and only clear it when the file changes, but we are rechecking + // the same file. + $file->ruleset->populateTokenListeners(); + $file->reloadContent(); + $file->process(); + $this->reporter->cacheFileReport($file, $this->config); + break; + } + }//end while + }//end if + + // Clean up the file to save (a lot of) memory. + $file->cleanUp(); + + }//end processFile() + + + /** + * Waits for child processes to complete and cleans up after them. + * + * The reporting information returned by each child process is merged + * into the main reporter class. + * + * @param array $childProcs An array of child processes to wait for. + * + * @return bool + */ + private function processChildProcs($childProcs) + { + $numProcessed = 0; + $totalBatches = count($childProcs); + + $success = true; + + while (count($childProcs) > 0) { + foreach ($childProcs as $key => $procData) { + $res = pcntl_waitpid($procData['pid'], $status, WNOHANG); + if ($res === $procData['pid']) { + if (file_exists($procData['out']) === true) { + include $procData['out']; + + unlink($procData['out']); + unset($childProcs[$key]); + + $numProcessed++; + + if (isset($childOutput) === false) { + // The child process died, so the run has failed. + $file = new DummyFile('', $this->ruleset, $this->config); + $file->setErrorCounts(1, 0, 0, 0); + $this->printProgress($file, $totalBatches, $numProcessed); + $success = false; + continue; + } + + $this->reporter->totalFiles += $childOutput['totalFiles']; + $this->reporter->totalErrors += $childOutput['totalErrors']; + $this->reporter->totalWarnings += $childOutput['totalWarnings']; + $this->reporter->totalFixable += $childOutput['totalFixable']; + $this->reporter->totalFixed += $childOutput['totalFixed']; + + if (isset($debugOutput) === true) { + echo $debugOutput; + } + + if (isset($childCache) === true) { + foreach ($childCache as $path => $cache) { + Cache::set($path, $cache); + } + } + + // Fake a processed file so we can print progress output for the batch. + $file = new DummyFile('', $this->ruleset, $this->config); + $file->setErrorCounts( + $childOutput['totalErrors'], + $childOutput['totalWarnings'], + $childOutput['totalFixable'], + $childOutput['totalFixed'] + ); + $this->printProgress($file, $totalBatches, $numProcessed); + }//end if + }//end if + }//end foreach + }//end while + + return $success; + + }//end processChildProcs() + + + /** + * Print progress information for a single processed file. + * + * @param \PHP_CodeSniffer\Files\File $file The file that was processed. + * @param int $numFiles The total number of files to process. + * @param int $numProcessed The number of files that have been processed, + * including this one. + * + * @return void + */ + public function printProgress(File $file, $numFiles, $numProcessed) + { + if (PHP_CODESNIFFER_VERBOSITY > 0 + || $this->config->showProgress === false + ) { + return; + } + + // Show progress information. + if ($file->ignored === true) { + echo 'S'; + } else { + $errors = $file->getErrorCount(); + $warnings = $file->getWarningCount(); + $fixable = $file->getFixableCount(); + $fixed = $file->getFixedCount(); + + if (PHP_CODESNIFFER_CBF === true) { + // Files with fixed errors or warnings are F (green). + // Files with unfixable errors or warnings are E (red). + // Files with no errors or warnings are . (black). + if ($fixable > 0) { + if ($this->config->colors === true) { + echo "\033[31m"; + } + + echo 'E'; + + if ($this->config->colors === true) { + echo "\033[0m"; + } + } else if ($fixed > 0) { + if ($this->config->colors === true) { + echo "\033[32m"; + } + + echo 'F'; + + if ($this->config->colors === true) { + echo "\033[0m"; + } + } else { + echo '.'; + }//end if + } else { + // Files with errors are E (red). + // Files with fixable errors are E (green). + // Files with warnings are W (yellow). + // Files with fixable warnings are W (green). + // Files with no errors or warnings are . (black). + if ($errors > 0) { + if ($this->config->colors === true) { + if ($fixable > 0) { + echo "\033[32m"; + } else { + echo "\033[31m"; + } + } + + echo 'E'; + + if ($this->config->colors === true) { + echo "\033[0m"; + } + } else if ($warnings > 0) { + if ($this->config->colors === true) { + if ($fixable > 0) { + echo "\033[32m"; + } else { + echo "\033[33m"; + } + } + + echo 'W'; + + if ($this->config->colors === true) { + echo "\033[0m"; + } + } else { + echo '.'; + }//end if + }//end if + }//end if + + $numPerLine = 60; + if ($numProcessed !== $numFiles && ($numProcessed % $numPerLine) !== 0) { + return; + } + + $percent = round(($numProcessed / $numFiles) * 100); + $padding = (strlen($numFiles) - strlen($numProcessed)); + if ($numProcessed === $numFiles + && $numFiles > $numPerLine + && ($numProcessed % $numPerLine) !== 0 + ) { + $padding += ($numPerLine - ($numFiles - (floor($numFiles / $numPerLine) * $numPerLine))); + } + + echo str_repeat(' ', $padding)." $numProcessed / $numFiles ($percent%)".PHP_EOL; + + }//end printProgress() + + +}//end class diff --git a/vendor/squizlabs/php_codesniffer/src/Sniffs/AbstractArraySniff.php b/vendor/squizlabs/php_codesniffer/src/Sniffs/AbstractArraySniff.php new file mode 100644 index 00000000..141b9a13 --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Sniffs/AbstractArraySniff.php @@ -0,0 +1,172 @@ + + * @copyright 2006-2015 Squiz Pty Ltd (ABN 77 084 670 600) + * @license https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence + */ + +namespace PHP_CodeSniffer\Sniffs; + +use PHP_CodeSniffer\Files\File; +use PHP_CodeSniffer\Util\Tokens; + +abstract class AbstractArraySniff implements Sniff +{ + + + /** + * Returns an array of tokens this test wants to listen for. + * + * @return array + */ + final public function register() + { + return [ + T_ARRAY, + T_OPEN_SHORT_ARRAY, + ]; + + }//end register() + + + /** + * Processes this sniff, when one of its tokens is encountered. + * + * @param \PHP_CodeSniffer\Files\File $phpcsFile The current file being checked. + * @param int $stackPtr The position of the current token in + * the stack passed in $tokens. + * + * @return void + */ + public function process(File $phpcsFile, $stackPtr) + { + $tokens = $phpcsFile->getTokens(); + + if ($tokens[$stackPtr]['code'] === T_ARRAY) { + $phpcsFile->recordMetric($stackPtr, 'Short array syntax used', 'no'); + + $arrayStart = $tokens[$stackPtr]['parenthesis_opener']; + if (isset($tokens[$arrayStart]['parenthesis_closer']) === false) { + // Incomplete array. + return; + } + + $arrayEnd = $tokens[$arrayStart]['parenthesis_closer']; + } else { + $phpcsFile->recordMetric($stackPtr, 'Short array syntax used', 'yes'); + $arrayStart = $stackPtr; + $arrayEnd = $tokens[$stackPtr]['bracket_closer']; + } + + $lastContent = $phpcsFile->findPrevious(Tokens::$emptyTokens, ($arrayEnd - 1), null, true); + if ($tokens[$lastContent]['code'] === T_COMMA) { + // Last array item ends with a comma. + $phpcsFile->recordMetric($stackPtr, 'Array end comma', 'yes'); + } else { + $phpcsFile->recordMetric($stackPtr, 'Array end comma', 'no'); + } + + $indices = []; + + $current = $arrayStart; + while (($next = $phpcsFile->findNext(Tokens::$emptyTokens, ($current + 1), $arrayEnd, true)) !== false) { + $end = $this->getNext($phpcsFile, $next, $arrayEnd); + + if ($tokens[$end]['code'] === T_DOUBLE_ARROW) { + $indexEnd = $phpcsFile->findPrevious(T_WHITESPACE, ($end - 1), null, true); + $valueStart = $phpcsFile->findNext(Tokens::$emptyTokens, ($end + 1), null, true); + + $indices[] = [ + 'index_start' => $next, + 'index_end' => $indexEnd, + 'arrow' => $end, + 'value_start' => $valueStart, + ]; + } else { + $valueStart = $next; + $indices[] = ['value_start' => $valueStart]; + } + + $current = $this->getNext($phpcsFile, $valueStart, $arrayEnd); + } + + if ($tokens[$arrayStart]['line'] === $tokens[$arrayEnd]['line']) { + $this->processSingleLineArray($phpcsFile, $stackPtr, $arrayStart, $arrayEnd, $indices); + } else { + $this->processMultiLineArray($phpcsFile, $stackPtr, $arrayStart, $arrayEnd, $indices); + } + + }//end process() + + + /** + * Find next separator in array - either: comma or double arrow. + * + * @param File $phpcsFile The current file being checked. + * @param int $ptr The position of current token. + * @param int $arrayEnd The token that ends the array definition. + * + * @return int + */ + private function getNext(File $phpcsFile, $ptr, $arrayEnd) + { + $tokens = $phpcsFile->getTokens(); + + while ($ptr < $arrayEnd) { + if (isset($tokens[$ptr]['scope_closer']) === true) { + $ptr = $tokens[$ptr]['scope_closer']; + } else if (isset($tokens[$ptr]['parenthesis_closer']) === true) { + $ptr = $tokens[$ptr]['parenthesis_closer']; + } else if (isset($tokens[$ptr]['bracket_closer']) === true) { + $ptr = $tokens[$ptr]['bracket_closer']; + } + + if ($tokens[$ptr]['code'] === T_COMMA + || $tokens[$ptr]['code'] === T_DOUBLE_ARROW + ) { + return $ptr; + } + + ++$ptr; + } + + return $ptr; + + }//end getNext() + + + /** + * Processes a single-line array definition. + * + * @param \PHP_CodeSniffer\Files\File $phpcsFile The current file being checked. + * @param int $stackPtr The position of the current token + * in the stack passed in $tokens. + * @param int $arrayStart The token that starts the array definition. + * @param int $arrayEnd The token that ends the array definition. + * @param array $indices An array of token positions for the array keys, + * double arrows, and values. + * + * @return void + */ + abstract protected function processSingleLineArray($phpcsFile, $stackPtr, $arrayStart, $arrayEnd, $indices); + + + /** + * Processes a multi-line array definition. + * + * @param \PHP_CodeSniffer\Files\File $phpcsFile The current file being checked. + * @param int $stackPtr The position of the current token + * in the stack passed in $tokens. + * @param int $arrayStart The token that starts the array definition. + * @param int $arrayEnd The token that ends the array definition. + * @param array $indices An array of token positions for the array keys, + * double arrows, and values. + * + * @return void + */ + abstract protected function processMultiLineArray($phpcsFile, $stackPtr, $arrayStart, $arrayEnd, $indices); + + +}//end class diff --git a/vendor/squizlabs/php_codesniffer/src/Sniffs/AbstractPatternSniff.php b/vendor/squizlabs/php_codesniffer/src/Sniffs/AbstractPatternSniff.php new file mode 100644 index 00000000..66bc2f52 --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Sniffs/AbstractPatternSniff.php @@ -0,0 +1,936 @@ + + * @copyright 2006-2015 Squiz Pty Ltd (ABN 77 084 670 600) + * @license https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence + */ + +namespace PHP_CodeSniffer\Sniffs; + +use PHP_CodeSniffer\Files\File; +use PHP_CodeSniffer\Util\Tokens; +use PHP_CodeSniffer\Tokenizers\PHP; +use PHP_CodeSniffer\Exceptions\RuntimeException; + +abstract class AbstractPatternSniff implements Sniff +{ + + /** + * If true, comments will be ignored if they are found in the code. + * + * @var boolean + */ + public $ignoreComments = false; + + /** + * The current file being checked. + * + * @var string + */ + protected $currFile = ''; + + /** + * The parsed patterns array. + * + * @var array + */ + private $parsedPatterns = []; + + /** + * Tokens that this sniff wishes to process outside of the patterns. + * + * @var int[] + * @see registerSupplementary() + * @see processSupplementary() + */ + private $supplementaryTokens = []; + + /** + * Positions in the stack where errors have occurred. + * + * @var array + */ + private $errorPos = []; + + + /** + * Constructs a AbstractPatternSniff. + * + * @param boolean $ignoreComments If true, comments will be ignored. + */ + public function __construct($ignoreComments=null) + { + // This is here for backwards compatibility. + if ($ignoreComments !== null) { + $this->ignoreComments = $ignoreComments; + } + + $this->supplementaryTokens = $this->registerSupplementary(); + + }//end __construct() + + + /** + * Registers the tokens to listen to. + * + * Classes extending AbstractPatternTest should implement the + * getPatterns() method to register the patterns they wish to test. + * + * @return int[] + * @see process() + */ + final public function register() + { + $listenTypes = []; + $patterns = $this->getPatterns(); + + foreach ($patterns as $pattern) { + $parsedPattern = $this->parse($pattern); + + // Find a token position in the pattern that we can use + // for a listener token. + $pos = $this->getListenerTokenPos($parsedPattern); + $tokenType = $parsedPattern[$pos]['token']; + $listenTypes[] = $tokenType; + + $patternArray = [ + 'listen_pos' => $pos, + 'pattern' => $parsedPattern, + 'pattern_code' => $pattern, + ]; + + if (isset($this->parsedPatterns[$tokenType]) === false) { + $this->parsedPatterns[$tokenType] = []; + } + + $this->parsedPatterns[$tokenType][] = $patternArray; + }//end foreach + + return array_unique(array_merge($listenTypes, $this->supplementaryTokens)); + + }//end register() + + + /** + * Returns the token types that the specified pattern is checking for. + * + * Returned array is in the format: + * + * array( + * T_WHITESPACE => 0, // 0 is the position where the T_WHITESPACE token + * // should occur in the pattern. + * ); + * + * + * @param array $pattern The parsed pattern to find the acquire the token + * types from. + * + * @return array + */ + private function getPatternTokenTypes($pattern) + { + $tokenTypes = []; + foreach ($pattern as $pos => $patternInfo) { + if ($patternInfo['type'] === 'token') { + if (isset($tokenTypes[$patternInfo['token']]) === false) { + $tokenTypes[$patternInfo['token']] = $pos; + } + } + } + + return $tokenTypes; + + }//end getPatternTokenTypes() + + + /** + * Returns the position in the pattern that this test should register as + * a listener for the pattern. + * + * @param array $pattern The pattern to acquire the listener for. + * + * @return int The position in the pattern that this test should register + * as the listener. + * @throws \PHP_CodeSniffer\Exceptions\RuntimeException If we could not determine a token to listen for. + */ + private function getListenerTokenPos($pattern) + { + $tokenTypes = $this->getPatternTokenTypes($pattern); + $tokenCodes = array_keys($tokenTypes); + $token = Tokens::getHighestWeightedToken($tokenCodes); + + // If we could not get a token. + if ($token === false) { + $error = 'Could not determine a token to listen for'; + throw new RuntimeException($error); + } + + return $tokenTypes[$token]; + + }//end getListenerTokenPos() + + + /** + * Processes the test. + * + * @param \PHP_CodeSniffer\Files\File $phpcsFile The PHP_CodeSniffer file where the + * token occurred. + * @param int $stackPtr The position in the tokens stack + * where the listening token type + * was found. + * + * @return void + * @see register() + */ + final public function process(File $phpcsFile, $stackPtr) + { + $file = $phpcsFile->getFilename(); + if ($this->currFile !== $file) { + // We have changed files, so clean up. + $this->errorPos = []; + $this->currFile = $file; + } + + $tokens = $phpcsFile->getTokens(); + + if (in_array($tokens[$stackPtr]['code'], $this->supplementaryTokens, true) === true) { + $this->processSupplementary($phpcsFile, $stackPtr); + } + + $type = $tokens[$stackPtr]['code']; + + // If the type is not set, then it must have been a token registered + // with registerSupplementary(). + if (isset($this->parsedPatterns[$type]) === false) { + return; + } + + $allErrors = []; + + // Loop over each pattern that is listening to the current token type + // that we are processing. + foreach ($this->parsedPatterns[$type] as $patternInfo) { + // If processPattern returns false, then the pattern that we are + // checking the code with must not be designed to check that code. + $errors = $this->processPattern($patternInfo, $phpcsFile, $stackPtr); + if ($errors === false) { + // The pattern didn't match. + continue; + } else if (empty($errors) === true) { + // The pattern matched, but there were no errors. + break; + } + + foreach ($errors as $stackPtr => $error) { + if (isset($this->errorPos[$stackPtr]) === false) { + $this->errorPos[$stackPtr] = true; + $allErrors[$stackPtr] = $error; + } + } + } + + foreach ($allErrors as $stackPtr => $error) { + $phpcsFile->addError($error, $stackPtr, 'Found'); + } + + }//end process() + + + /** + * Processes the pattern and verifies the code at $stackPtr. + * + * @param array $patternInfo Information about the pattern used + * for checking, which includes are + * parsed token representation of the + * pattern. + * @param \PHP_CodeSniffer\Files\File $phpcsFile The PHP_CodeSniffer file where the + * token occurred. + * @param int $stackPtr The position in the tokens stack where + * the listening token type was found. + * + * @return array + */ + protected function processPattern($patternInfo, File $phpcsFile, $stackPtr) + { + $tokens = $phpcsFile->getTokens(); + $pattern = $patternInfo['pattern']; + $patternCode = $patternInfo['pattern_code']; + $errors = []; + $found = ''; + + $ignoreTokens = [T_WHITESPACE => T_WHITESPACE]; + if ($this->ignoreComments === true) { + $ignoreTokens += Tokens::$commentTokens; + } + + $origStackPtr = $stackPtr; + $hasError = false; + + if ($patternInfo['listen_pos'] > 0) { + $stackPtr--; + + for ($i = ($patternInfo['listen_pos'] - 1); $i >= 0; $i--) { + if ($pattern[$i]['type'] === 'token') { + if ($pattern[$i]['token'] === T_WHITESPACE) { + if ($tokens[$stackPtr]['code'] === T_WHITESPACE) { + $found = $tokens[$stackPtr]['content'].$found; + } + + // Only check the size of the whitespace if this is not + // the first token. We don't care about the size of + // leading whitespace, just that there is some. + if ($i !== 0) { + if ($tokens[$stackPtr]['content'] !== $pattern[$i]['value']) { + $hasError = true; + } + } + } else { + // Check to see if this important token is the same as the + // previous important token in the pattern. If it is not, + // then the pattern cannot be for this piece of code. + $prev = $phpcsFile->findPrevious( + $ignoreTokens, + $stackPtr, + null, + true + ); + + if ($prev === false + || $tokens[$prev]['code'] !== $pattern[$i]['token'] + ) { + return false; + } + + // If we skipped past some whitespace tokens, then add them + // to the found string. + $tokenContent = $phpcsFile->getTokensAsString( + ($prev + 1), + ($stackPtr - $prev - 1) + ); + + $found = $tokens[$prev]['content'].$tokenContent.$found; + + if (isset($pattern[($i - 1)]) === true + && $pattern[($i - 1)]['type'] === 'skip' + ) { + $stackPtr = $prev; + } else { + $stackPtr = ($prev - 1); + } + }//end if + } else if ($pattern[$i]['type'] === 'skip') { + // Skip to next piece of relevant code. + if ($pattern[$i]['to'] === 'parenthesis_closer') { + $to = 'parenthesis_opener'; + } else { + $to = 'scope_opener'; + } + + // Find the previous opener. + $next = $phpcsFile->findPrevious( + $ignoreTokens, + $stackPtr, + null, + true + ); + + if ($next === false || isset($tokens[$next][$to]) === false) { + // If there was not opener, then we must be + // using the wrong pattern. + return false; + } + + if ($to === 'parenthesis_opener') { + $found = '{'.$found; + } else { + $found = '('.$found; + } + + $found = '...'.$found; + + // Skip to the opening token. + $stackPtr = ($tokens[$next][$to] - 1); + } else if ($pattern[$i]['type'] === 'string') { + $found = 'abc'; + } else if ($pattern[$i]['type'] === 'newline') { + if ($this->ignoreComments === true + && isset(Tokens::$commentTokens[$tokens[$stackPtr]['code']]) === true + ) { + $startComment = $phpcsFile->findPrevious( + Tokens::$commentTokens, + ($stackPtr - 1), + null, + true + ); + + if ($tokens[$startComment]['line'] !== $tokens[($startComment + 1)]['line']) { + $startComment++; + } + + $tokenContent = $phpcsFile->getTokensAsString( + $startComment, + ($stackPtr - $startComment + 1) + ); + + $found = $tokenContent.$found; + $stackPtr = ($startComment - 1); + } + + if ($tokens[$stackPtr]['code'] === T_WHITESPACE) { + if ($tokens[$stackPtr]['content'] !== $phpcsFile->eolChar) { + $found = $tokens[$stackPtr]['content'].$found; + + // This may just be an indent that comes after a newline + // so check the token before to make sure. If it is a newline, we + // can ignore the error here. + if (($tokens[($stackPtr - 1)]['content'] !== $phpcsFile->eolChar) + && ($this->ignoreComments === true + && isset(Tokens::$commentTokens[$tokens[($stackPtr - 1)]['code']]) === false) + ) { + $hasError = true; + } else { + $stackPtr--; + } + } else { + $found = 'EOL'.$found; + } + } else { + $found = $tokens[$stackPtr]['content'].$found; + $hasError = true; + }//end if + + if ($hasError === false && $pattern[($i - 1)]['type'] !== 'newline') { + // Make sure they only have 1 newline. + $prev = $phpcsFile->findPrevious($ignoreTokens, ($stackPtr - 1), null, true); + if ($prev !== false && $tokens[$prev]['line'] !== $tokens[$stackPtr]['line']) { + $hasError = true; + } + } + }//end if + }//end for + }//end if + + $stackPtr = $origStackPtr; + $lastAddedStackPtr = null; + $patternLen = count($pattern); + + for ($i = $patternInfo['listen_pos']; $i < $patternLen; $i++) { + if (isset($tokens[$stackPtr]) === false) { + break; + } + + if ($pattern[$i]['type'] === 'token') { + if ($pattern[$i]['token'] === T_WHITESPACE) { + if ($this->ignoreComments === true) { + // If we are ignoring comments, check to see if this current + // token is a comment. If so skip it. + if (isset(Tokens::$commentTokens[$tokens[$stackPtr]['code']]) === true) { + continue; + } + + // If the next token is a comment, the we need to skip the + // current token as we should allow a space before a + // comment for readability. + if (isset($tokens[($stackPtr + 1)]) === true + && isset(Tokens::$commentTokens[$tokens[($stackPtr + 1)]['code']]) === true + ) { + continue; + } + } + + $tokenContent = ''; + if ($tokens[$stackPtr]['code'] === T_WHITESPACE) { + if (isset($pattern[($i + 1)]) === false) { + // This is the last token in the pattern, so just compare + // the next token of content. + $tokenContent = $tokens[$stackPtr]['content']; + } else { + // Get all the whitespace to the next token. + $next = $phpcsFile->findNext( + Tokens::$emptyTokens, + $stackPtr, + null, + true + ); + + $tokenContent = $phpcsFile->getTokensAsString( + $stackPtr, + ($next - $stackPtr) + ); + + $lastAddedStackPtr = $stackPtr; + $stackPtr = $next; + }//end if + + if ($stackPtr !== $lastAddedStackPtr) { + $found .= $tokenContent; + } + } else { + if ($stackPtr !== $lastAddedStackPtr) { + $found .= $tokens[$stackPtr]['content']; + $lastAddedStackPtr = $stackPtr; + } + }//end if + + if (isset($pattern[($i + 1)]) === true + && $pattern[($i + 1)]['type'] === 'skip' + ) { + // The next token is a skip token, so we just need to make + // sure the whitespace we found has *at least* the + // whitespace required. + if (strpos($tokenContent, $pattern[$i]['value']) !== 0) { + $hasError = true; + } + } else { + if ($tokenContent !== $pattern[$i]['value']) { + $hasError = true; + } + } + } else { + // Check to see if this important token is the same as the + // next important token in the pattern. If it is not, then + // the pattern cannot be for this piece of code. + $next = $phpcsFile->findNext( + $ignoreTokens, + $stackPtr, + null, + true + ); + + if ($next === false + || $tokens[$next]['code'] !== $pattern[$i]['token'] + ) { + // The next important token did not match the pattern. + return false; + } + + if ($lastAddedStackPtr !== null) { + if (($tokens[$next]['code'] === T_OPEN_CURLY_BRACKET + || $tokens[$next]['code'] === T_CLOSE_CURLY_BRACKET) + && isset($tokens[$next]['scope_condition']) === true + && $tokens[$next]['scope_condition'] > $lastAddedStackPtr + ) { + // This is a brace, but the owner of it is after the current + // token, which means it does not belong to any token in + // our pattern. This means the pattern is not for us. + return false; + } + + if (($tokens[$next]['code'] === T_OPEN_PARENTHESIS + || $tokens[$next]['code'] === T_CLOSE_PARENTHESIS) + && isset($tokens[$next]['parenthesis_owner']) === true + && $tokens[$next]['parenthesis_owner'] > $lastAddedStackPtr + ) { + // This is a bracket, but the owner of it is after the current + // token, which means it does not belong to any token in + // our pattern. This means the pattern is not for us. + return false; + } + }//end if + + // If we skipped past some whitespace tokens, then add them + // to the found string. + if (($next - $stackPtr) > 0) { + $hasComment = false; + for ($j = $stackPtr; $j < $next; $j++) { + $found .= $tokens[$j]['content']; + if (isset(Tokens::$commentTokens[$tokens[$j]['code']]) === true) { + $hasComment = true; + } + } + + // If we are not ignoring comments, this additional + // whitespace or comment is not allowed. If we are + // ignoring comments, there needs to be at least one + // comment for this to be allowed. + if ($this->ignoreComments === false + || ($this->ignoreComments === true + && $hasComment === false) + ) { + $hasError = true; + } + + // Even when ignoring comments, we are not allowed to include + // newlines without the pattern specifying them, so + // everything should be on the same line. + if ($tokens[$next]['line'] !== $tokens[$stackPtr]['line']) { + $hasError = true; + } + }//end if + + if ($next !== $lastAddedStackPtr) { + $found .= $tokens[$next]['content']; + $lastAddedStackPtr = $next; + } + + if (isset($pattern[($i + 1)]) === true + && $pattern[($i + 1)]['type'] === 'skip' + ) { + $stackPtr = $next; + } else { + $stackPtr = ($next + 1); + } + }//end if + } else if ($pattern[$i]['type'] === 'skip') { + if ($pattern[$i]['to'] === 'unknown') { + $next = $phpcsFile->findNext( + $pattern[($i + 1)]['token'], + $stackPtr + ); + + if ($next === false) { + // Couldn't find the next token, so we must + // be using the wrong pattern. + return false; + } + + $found .= '...'; + $stackPtr = $next; + } else { + // Find the previous opener. + $next = $phpcsFile->findPrevious( + Tokens::$blockOpeners, + $stackPtr + ); + + if ($next === false + || isset($tokens[$next][$pattern[$i]['to']]) === false + ) { + // If there was not opener, then we must + // be using the wrong pattern. + return false; + } + + $found .= '...'; + if ($pattern[$i]['to'] === 'parenthesis_closer') { + $found .= ')'; + } else { + $found .= '}'; + } + + // Skip to the closing token. + $stackPtr = ($tokens[$next][$pattern[$i]['to']] + 1); + }//end if + } else if ($pattern[$i]['type'] === 'string') { + if ($tokens[$stackPtr]['code'] !== T_STRING) { + $hasError = true; + } + + if ($stackPtr !== $lastAddedStackPtr) { + $found .= 'abc'; + $lastAddedStackPtr = $stackPtr; + } + + $stackPtr++; + } else if ($pattern[$i]['type'] === 'newline') { + // Find the next token that contains a newline character. + $newline = 0; + for ($j = $stackPtr; $j < $phpcsFile->numTokens; $j++) { + if (strpos($tokens[$j]['content'], $phpcsFile->eolChar) !== false) { + $newline = $j; + break; + } + } + + if ($newline === 0) { + // We didn't find a newline character in the rest of the file. + $next = ($phpcsFile->numTokens - 1); + $hasError = true; + } else { + if ($this->ignoreComments === false) { + // The newline character cannot be part of a comment. + if (isset(Tokens::$commentTokens[$tokens[$newline]['code']]) === true) { + $hasError = true; + } + } + + if ($newline === $stackPtr) { + $next = ($stackPtr + 1); + } else { + // Check that there were no significant tokens that we + // skipped over to find our newline character. + $next = $phpcsFile->findNext( + $ignoreTokens, + $stackPtr, + null, + true + ); + + if ($next < $newline) { + // We skipped a non-ignored token. + $hasError = true; + } else { + $next = ($newline + 1); + } + } + }//end if + + if ($stackPtr !== $lastAddedStackPtr) { + $found .= $phpcsFile->getTokensAsString( + $stackPtr, + ($next - $stackPtr) + ); + + $lastAddedStackPtr = ($next - 1); + } + + $stackPtr = $next; + }//end if + }//end for + + if ($hasError === true) { + $error = $this->prepareError($found, $patternCode); + $errors[$origStackPtr] = $error; + } + + return $errors; + + }//end processPattern() + + + /** + * Prepares an error for the specified patternCode. + * + * @param string $found The actual found string in the code. + * @param string $patternCode The expected pattern code. + * + * @return string The error message. + */ + protected function prepareError($found, $patternCode) + { + $found = str_replace("\r\n", '\n', $found); + $found = str_replace("\n", '\n', $found); + $found = str_replace("\r", '\n', $found); + $found = str_replace("\t", '\t', $found); + $found = str_replace('EOL', '\n', $found); + $expected = str_replace('EOL', '\n', $patternCode); + + $error = "Expected \"$expected\"; found \"$found\""; + + return $error; + + }//end prepareError() + + + /** + * Returns the patterns that should be checked. + * + * @return string[] + */ + abstract protected function getPatterns(); + + + /** + * Registers any supplementary tokens that this test might wish to process. + * + * A sniff may wish to register supplementary tests when it wishes to group + * an arbitrary validation that cannot be performed using a pattern, with + * other pattern tests. + * + * @return int[] + * @see processSupplementary() + */ + protected function registerSupplementary() + { + return []; + + }//end registerSupplementary() + + + /** + * Processes any tokens registered with registerSupplementary(). + * + * @param \PHP_CodeSniffer\Files\File $phpcsFile The PHP_CodeSniffer file where to + * process the skip. + * @param int $stackPtr The position in the tokens stack to + * process. + * + * @return void + * @see registerSupplementary() + */ + protected function processSupplementary(File $phpcsFile, $stackPtr) + { + + }//end processSupplementary() + + + /** + * Parses a pattern string into an array of pattern steps. + * + * @param string $pattern The pattern to parse. + * + * @return array The parsed pattern array. + * @see createSkipPattern() + * @see createTokenPattern() + */ + private function parse($pattern) + { + $patterns = []; + $length = strlen($pattern); + $lastToken = 0; + $firstToken = 0; + + for ($i = 0; $i < $length; $i++) { + $specialPattern = false; + $isLastChar = ($i === ($length - 1)); + $oldFirstToken = $firstToken; + + if (substr($pattern, $i, 3) === '...') { + // It's a skip pattern. The skip pattern requires the + // content of the token in the "from" position and the token + // to skip to. + $specialPattern = $this->createSkipPattern($pattern, ($i - 1)); + $lastToken = ($i - $firstToken); + $firstToken = ($i + 3); + $i += 2; + + if ($specialPattern['to'] !== 'unknown') { + $firstToken++; + } + } else if (substr($pattern, $i, 3) === 'abc') { + $specialPattern = ['type' => 'string']; + $lastToken = ($i - $firstToken); + $firstToken = ($i + 3); + $i += 2; + } else if (substr($pattern, $i, 3) === 'EOL') { + $specialPattern = ['type' => 'newline']; + $lastToken = ($i - $firstToken); + $firstToken = ($i + 3); + $i += 2; + }//end if + + if ($specialPattern !== false || $isLastChar === true) { + // If we are at the end of the string, don't worry about a limit. + if ($isLastChar === true) { + // Get the string from the end of the last skip pattern, if any, + // to the end of the pattern string. + $str = substr($pattern, $oldFirstToken); + } else { + // Get the string from the end of the last special pattern, + // if any, to the start of this special pattern. + if ($lastToken === 0) { + // Note that if the last special token was zero characters ago, + // there will be nothing to process so we can skip this bit. + // This happens if you have something like: EOL... in your pattern. + $str = ''; + } else { + $str = substr($pattern, $oldFirstToken, $lastToken); + } + } + + if ($str !== '') { + $tokenPatterns = $this->createTokenPattern($str); + foreach ($tokenPatterns as $tokenPattern) { + $patterns[] = $tokenPattern; + } + } + + // Make sure we don't skip the last token. + if ($isLastChar === false && $i === ($length - 1)) { + $i--; + } + }//end if + + // Add the skip pattern *after* we have processed + // all the tokens from the end of the last skip pattern + // to the start of this skip pattern. + if ($specialPattern !== false) { + $patterns[] = $specialPattern; + } + }//end for + + return $patterns; + + }//end parse() + + + /** + * Creates a skip pattern. + * + * @param string $pattern The pattern being parsed. + * @param string $from The token content that the skip pattern starts from. + * + * @return array The pattern step. + * @see createTokenPattern() + * @see parse() + */ + private function createSkipPattern($pattern, $from) + { + $skip = ['type' => 'skip']; + + $nestedParenthesis = 0; + $nestedBraces = 0; + for ($start = $from; $start >= 0; $start--) { + switch ($pattern[$start]) { + case '(': + if ($nestedParenthesis === 0) { + $skip['to'] = 'parenthesis_closer'; + } + + $nestedParenthesis--; + break; + case '{': + if ($nestedBraces === 0) { + $skip['to'] = 'scope_closer'; + } + + $nestedBraces--; + break; + case '}': + $nestedBraces++; + break; + case ')': + $nestedParenthesis++; + break; + }//end switch + + if (isset($skip['to']) === true) { + break; + } + }//end for + + if (isset($skip['to']) === false) { + $skip['to'] = 'unknown'; + } + + return $skip; + + }//end createSkipPattern() + + + /** + * Creates a token pattern. + * + * @param string $str The tokens string that the pattern should match. + * + * @return array The pattern step. + * @see createSkipPattern() + * @see parse() + */ + private function createTokenPattern($str) + { + // Don't add a space after the closing php tag as it will add a new + // whitespace token. + $tokenizer = new PHP('', null); + + // Remove the getTokens(); + $tokens = array_slice($tokens, 1, (count($tokens) - 2)); + + $patterns = []; + foreach ($tokens as $patternInfo) { + $patterns[] = [ + 'type' => 'token', + 'token' => $patternInfo['code'], + 'value' => $patternInfo['content'], + ]; + } + + return $patterns; + + }//end createTokenPattern() + + +}//end class diff --git a/vendor/squizlabs/php_codesniffer/src/Sniffs/AbstractScopeSniff.php b/vendor/squizlabs/php_codesniffer/src/Sniffs/AbstractScopeSniff.php new file mode 100644 index 00000000..70d8720a --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Sniffs/AbstractScopeSniff.php @@ -0,0 +1,191 @@ + + * class ClassScopeTest extends PHP_CodeSniffer_Standards_AbstractScopeSniff + * { + * public function __construct() + * { + * parent::__construct(array(T_CLASS), array(T_FUNCTION)); + * } + * + * protected function processTokenWithinScope(\PHP_CodeSniffer\Files\File $phpcsFile, $stackPtr, $currScope) + * { + * $className = $phpcsFile->getDeclarationName($currScope); + * echo 'encountered a method within class '.$className; + * } + * } + * + * + * @author Greg Sherwood + * @copyright 2006-2015 Squiz Pty Ltd (ABN 77 084 670 600) + * @license https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence + */ + +namespace PHP_CodeSniffer\Sniffs; + +use PHP_CodeSniffer\Files\File; +use PHP_CodeSniffer\Exceptions\RuntimeException; + +abstract class AbstractScopeSniff implements Sniff +{ + + /** + * The token types that this test wishes to listen to within the scope. + * + * @var array + */ + private $tokens = []; + + /** + * The type of scope opener tokens that this test wishes to listen to. + * + * @var string + */ + private $scopeTokens = []; + + /** + * True if this test should fire on tokens outside of the scope. + * + * @var boolean + */ + private $listenOutside = false; + + + /** + * Constructs a new AbstractScopeTest. + * + * @param array $scopeTokens The type of scope the test wishes to listen to. + * @param array $tokens The tokens that the test wishes to listen to + * within the scope. + * @param boolean $listenOutside If true this test will also alert the + * extending class when a token is found outside + * the scope, by calling the + * processTokenOutsideScope method. + * + * @throws \PHP_CodeSniffer\Exceptions\RuntimeException If the specified tokens arrays are empty + * or invalid. + */ + public function __construct( + array $scopeTokens, + array $tokens, + $listenOutside=false + ) { + if (empty($scopeTokens) === true) { + $error = 'The scope tokens list cannot be empty'; + throw new RuntimeException($error); + } + + if (empty($tokens) === true) { + $error = 'The tokens list cannot be empty'; + throw new RuntimeException($error); + } + + $invalidScopeTokens = array_intersect($scopeTokens, $tokens); + if (empty($invalidScopeTokens) === false) { + $invalid = implode(', ', $invalidScopeTokens); + $error = "Scope tokens [$invalid] can't be in the tokens array"; + throw new RuntimeException($error); + } + + $this->listenOutside = $listenOutside; + $this->scopeTokens = array_flip($scopeTokens); + $this->tokens = $tokens; + + }//end __construct() + + + /** + * The method that is called to register the tokens this test wishes to + * listen to. + * + * DO NOT OVERRIDE THIS METHOD. Use the constructor of this class to register + * for the desired tokens and scope. + * + * @return int[] + * @see __constructor() + */ + final public function register() + { + return $this->tokens; + + }//end register() + + + /** + * Processes the tokens that this test is listening for. + * + * @param \PHP_CodeSniffer\Files\File $phpcsFile The file where this token was found. + * @param int $stackPtr The position in the stack where this + * token was found. + * + * @return void|int Optionally returns a stack pointer. The sniff will not be + * called again on the current file until the returned stack + * pointer is reached. Return ($phpcsFile->numTokens + 1) to skip + * the rest of the file. + * @see processTokenWithinScope() + */ + final public function process(File $phpcsFile, $stackPtr) + { + $tokens = $phpcsFile->getTokens(); + + $foundScope = false; + $skipTokens = []; + foreach ($tokens[$stackPtr]['conditions'] as $scope => $code) { + if (isset($this->scopeTokens[$code]) === true) { + $skipTokens[] = $this->processTokenWithinScope($phpcsFile, $stackPtr, $scope); + $foundScope = true; + } + } + + if ($this->listenOutside === true && $foundScope === false) { + $skipTokens[] = $this->processTokenOutsideScope($phpcsFile, $stackPtr); + } + + if (empty($skipTokens) === false) { + return min($skipTokens); + } + + return; + + }//end process() + + + /** + * Processes a token that is found within the scope that this test is + * listening to. + * + * @param \PHP_CodeSniffer\Files\File $phpcsFile The file where this token was found. + * @param int $stackPtr The position in the stack where this + * token was found. + * @param int $currScope The position in the tokens array that + * opened the scope that this test is + * listening for. + * + * @return void|int Optionally returns a stack pointer. The sniff will not be + * called again on the current file until the returned stack + * pointer is reached. Return ($phpcsFile->numTokens + 1) to skip + * the rest of the file. + */ + abstract protected function processTokenWithinScope(File $phpcsFile, $stackPtr, $currScope); + + + /** + * Processes a token that is found outside the scope that this test is + * listening to. + * + * @param \PHP_CodeSniffer\Files\File $phpcsFile The file where this token was found. + * @param int $stackPtr The position in the stack where this + * token was found. + * + * @return void|int Optionally returns a stack pointer. The sniff will not be + * called again on the current file until the returned stack + * pointer is reached. Return (count($tokens) + 1) to skip + * the rest of the file. + */ + abstract protected function processTokenOutsideScope(File $phpcsFile, $stackPtr); + + +}//end class diff --git a/vendor/squizlabs/php_codesniffer/src/Sniffs/AbstractVariableSniff.php b/vendor/squizlabs/php_codesniffer/src/Sniffs/AbstractVariableSniff.php new file mode 100644 index 00000000..5dc8ba55 --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Sniffs/AbstractVariableSniff.php @@ -0,0 +1,230 @@ + + * @copyright 2006-2015 Squiz Pty Ltd (ABN 77 084 670 600) + * @license https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence + */ + +namespace PHP_CodeSniffer\Sniffs; + +use PHP_CodeSniffer\Files\File; +use PHP_CodeSniffer\Util\Tokens; + +abstract class AbstractVariableSniff extends AbstractScopeSniff +{ + + /** + * List of PHP Reserved variables. + * + * Used by various naming convention sniffs. + * + * @var array + */ + protected $phpReservedVars = [ + '_SERVER' => true, + '_GET' => true, + '_POST' => true, + '_REQUEST' => true, + '_SESSION' => true, + '_ENV' => true, + '_COOKIE' => true, + '_FILES' => true, + 'GLOBALS' => true, + 'http_response_header' => true, + 'HTTP_RAW_POST_DATA' => true, + 'php_errormsg' => true, + ]; + + + /** + * Constructs an AbstractVariableTest. + */ + public function __construct() + { + $scopes = Tokens::$ooScopeTokens; + + $listen = [ + T_VARIABLE, + T_DOUBLE_QUOTED_STRING, + T_HEREDOC, + ]; + + parent::__construct($scopes, $listen, true); + + }//end __construct() + + + /** + * Processes the token in the specified PHP_CodeSniffer\Files\File. + * + * @param \PHP_CodeSniffer\Files\File $phpcsFile The PHP_CodeSniffer file where this + * token was found. + * @param int $stackPtr The position where the token was found. + * @param int $currScope The current scope opener token. + * + * @return void|int Optionally returns a stack pointer. The sniff will not be + * called again on the current file until the returned stack + * pointer is reached. Return ($phpcsFile->numTokens + 1) to skip + * the rest of the file. + */ + final protected function processTokenWithinScope(File $phpcsFile, $stackPtr, $currScope) + { + $tokens = $phpcsFile->getTokens(); + + if ($tokens[$stackPtr]['code'] === T_DOUBLE_QUOTED_STRING + || $tokens[$stackPtr]['code'] === T_HEREDOC + ) { + // Check to see if this string has a variable in it. + $pattern = '|(?processVariableInString($phpcsFile, $stackPtr); + } + + return; + } + + // If this token is nested inside a function at a deeper + // level than the current OO scope that was found, it's a normal + // variable and not a member var. + $conditions = array_reverse($tokens[$stackPtr]['conditions'], true); + $inFunction = false; + foreach ($conditions as $scope => $code) { + if (isset(Tokens::$ooScopeTokens[$code]) === true) { + break; + } + + if ($code === T_FUNCTION || $code === T_CLOSURE) { + $inFunction = true; + } + } + + if ($scope !== $currScope) { + // We found a closer scope to this token, so ignore + // this particular time through the sniff. We will process + // this token when this closer scope is found to avoid + // duplicate checks. + return; + } + + // Just make sure this isn't a variable in a function declaration. + if ($inFunction === false && isset($tokens[$stackPtr]['nested_parenthesis']) === true) { + foreach ($tokens[$stackPtr]['nested_parenthesis'] as $opener => $closer) { + if (isset($tokens[$opener]['parenthesis_owner']) === false) { + // Check if this is a USE statement for a closure. + $prev = $phpcsFile->findPrevious(Tokens::$emptyTokens, ($opener - 1), null, true); + if ($tokens[$prev]['code'] === T_USE) { + $inFunction = true; + break; + } + + continue; + } + + $owner = $tokens[$opener]['parenthesis_owner']; + if ($tokens[$owner]['code'] === T_FUNCTION + || $tokens[$owner]['code'] === T_CLOSURE + ) { + $inFunction = true; + break; + } + } + }//end if + + if ($inFunction === true) { + return $this->processVariable($phpcsFile, $stackPtr); + } else { + return $this->processMemberVar($phpcsFile, $stackPtr); + } + + }//end processTokenWithinScope() + + + /** + * Processes the token outside the scope in the file. + * + * @param \PHP_CodeSniffer\Files\File $phpcsFile The PHP_CodeSniffer file where this + * token was found. + * @param int $stackPtr The position where the token was found. + * + * @return void|int Optionally returns a stack pointer. The sniff will not be + * called again on the current file until the returned stack + * pointer is reached. Return ($phpcsFile->numTokens + 1) to skip + * the rest of the file. + */ + final protected function processTokenOutsideScope(File $phpcsFile, $stackPtr) + { + $tokens = $phpcsFile->getTokens(); + // These variables are not member vars. + if ($tokens[$stackPtr]['code'] === T_VARIABLE) { + return $this->processVariable($phpcsFile, $stackPtr); + } else if ($tokens[$stackPtr]['code'] === T_DOUBLE_QUOTED_STRING + || $tokens[$stackPtr]['code'] === T_HEREDOC + ) { + // Check to see if this string has a variable in it. + $pattern = '|(?processVariableInString($phpcsFile, $stackPtr); + } + } + + }//end processTokenOutsideScope() + + + /** + * Called to process class member vars. + * + * @param \PHP_CodeSniffer\Files\File $phpcsFile The PHP_CodeSniffer file where this + * token was found. + * @param int $stackPtr The position where the token was found. + * + * @return void|int Optionally returns a stack pointer. The sniff will not be + * called again on the current file until the returned stack + * pointer is reached. Return ($phpcsFile->numTokens + 1) to skip + * the rest of the file. + */ + abstract protected function processMemberVar(File $phpcsFile, $stackPtr); + + + /** + * Called to process normal member vars. + * + * @param \PHP_CodeSniffer\Files\File $phpcsFile The PHP_CodeSniffer file where this + * token was found. + * @param int $stackPtr The position where the token was found. + * + * @return void|int Optionally returns a stack pointer. The sniff will not be + * called again on the current file until the returned stack + * pointer is reached. Return ($phpcsFile->numTokens + 1) to skip + * the rest of the file. + */ + abstract protected function processVariable(File $phpcsFile, $stackPtr); + + + /** + * Called to process variables found in double quoted strings or heredocs. + * + * Note that there may be more than one variable in the string, which will + * result only in one call for the string or one call per line for heredocs. + * + * @param \PHP_CodeSniffer\Files\File $phpcsFile The PHP_CodeSniffer file where this + * token was found. + * @param int $stackPtr The position where the double quoted + * string was found. + * + * @return void|int Optionally returns a stack pointer. The sniff will not be + * called again on the current file until the returned stack + * pointer is reached. Return ($phpcsFile->numTokens + 1) to skip + * the rest of the file. + */ + abstract protected function processVariableInString(File $phpcsFile, $stackPtr); + + +}//end class diff --git a/vendor/squizlabs/php_codesniffer/src/Sniffs/Sniff.php b/vendor/squizlabs/php_codesniffer/src/Sniffs/Sniff.php new file mode 100644 index 00000000..c9d7daea --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Sniffs/Sniff.php @@ -0,0 +1,80 @@ + + * @copyright 2006-2015 Squiz Pty Ltd (ABN 77 084 670 600) + * @license https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence + */ + +namespace PHP_CodeSniffer\Sniffs; + +use PHP_CodeSniffer\Files\File; + +interface Sniff +{ + + + /** + * Registers the tokens that this sniff wants to listen for. + * + * An example return value for a sniff that wants to listen for whitespace + * and any comments would be: + * + * + * return array( + * T_WHITESPACE, + * T_DOC_COMMENT, + * T_COMMENT, + * ); + * + * + * @return mixed[] + * @see Tokens.php + */ + public function register(); + + + /** + * Called when one of the token types that this sniff is listening for + * is found. + * + * The stackPtr variable indicates where in the stack the token was found. + * A sniff can acquire information this token, along with all the other + * tokens within the stack by first acquiring the token stack: + * + * + * $tokens = $phpcsFile->getTokens(); + * echo 'Encountered a '.$tokens[$stackPtr]['type'].' token'; + * echo 'token information: '; + * print_r($tokens[$stackPtr]); + * + * + * If the sniff discovers an anomaly in the code, they can raise an error + * by calling addError() on the \PHP_CodeSniffer\Files\File object, specifying an error + * message and the position of the offending token: + * + * + * $phpcsFile->addError('Encountered an error', $stackPtr); + * + * + * @param \PHP_CodeSniffer\Files\File $phpcsFile The PHP_CodeSniffer file where the + * token was found. + * @param int $stackPtr The position in the PHP_CodeSniffer + * file's token stack where the token + * was found. + * + * @return void|int Optionally returns a stack pointer. The sniff will not be + * called again on the current file until the returned stack + * pointer is reached. Return (count($tokens) + 1) to skip + * the rest of the file. + */ + public function process(File $phpcsFile, $stackPtr); + + +}//end interface diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/Generic/Docs/Arrays/DisallowLongArraySyntaxStandard.xml b/vendor/squizlabs/php_codesniffer/src/Standards/Generic/Docs/Arrays/DisallowLongArraySyntaxStandard.xml new file mode 100644 index 00000000..21b0d27d --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/Generic/Docs/Arrays/DisallowLongArraySyntaxStandard.xml @@ -0,0 +1,23 @@ + + + + + + + [ + 'foo' => 'bar', +]; + ]]> + + + array( + 'foo' => 'bar', +); + ]]> + + + diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/Generic/Docs/Arrays/DisallowShortArraySyntaxStandard.xml b/vendor/squizlabs/php_codesniffer/src/Standards/Generic/Docs/Arrays/DisallowShortArraySyntaxStandard.xml new file mode 100644 index 00000000..f24767ca --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/Generic/Docs/Arrays/DisallowShortArraySyntaxStandard.xml @@ -0,0 +1,23 @@ + + + + + + + array( + 'foo' => 'bar', +); + ]]> + + + [ + 'foo' => 'bar', +]; + ]]> + + + diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/Generic/Docs/Classes/DuplicateClassNameStandard.xml b/vendor/squizlabs/php_codesniffer/src/Standards/Generic/Docs/Classes/DuplicateClassNameStandard.xml new file mode 100644 index 00000000..4b0ec96d --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/Generic/Docs/Classes/DuplicateClassNameStandard.xml @@ -0,0 +1,27 @@ + + + + + + + Foo +{ +} + ]]> + + + Foo +{ +} + +class Foo +{ +} + ]]> + + + diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/Generic/Docs/Classes/OpeningBraceSameLineStandard.xml b/vendor/squizlabs/php_codesniffer/src/Standards/Generic/Docs/Classes/OpeningBraceSameLineStandard.xml new file mode 100644 index 00000000..6226a3ff --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/Generic/Docs/Classes/OpeningBraceSameLineStandard.xml @@ -0,0 +1,28 @@ + + + + + + + { +} + ]]> + + + { +} + ]]> + + + // Start of class. +} + ]]> + + + diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/Generic/Docs/CodeAnalysis/AssignmentInConditionStandard.xml b/vendor/squizlabs/php_codesniffer/src/Standards/Generic/Docs/CodeAnalysis/AssignmentInConditionStandard.xml new file mode 100644 index 00000000..9961ea05 --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/Generic/Docs/CodeAnalysis/AssignmentInConditionStandard.xml @@ -0,0 +1,23 @@ + + + + + + + $test === 'abc') { + // Code. +} + ]]> + + + $test = 'abc') { + // Code. +} + ]]> + + + diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/Generic/Docs/CodeAnalysis/EmptyStatementStandard.xml b/vendor/squizlabs/php_codesniffer/src/Standards/Generic/Docs/CodeAnalysis/EmptyStatementStandard.xml new file mode 100644 index 00000000..c400d75e --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/Generic/Docs/CodeAnalysis/EmptyStatementStandard.xml @@ -0,0 +1,23 @@ + + + + + + + + + + // do nothing +} + ]]> + + + diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/Generic/Docs/CodeAnalysis/ForLoopShouldBeWhileLoopStandard.xml b/vendor/squizlabs/php_codesniffer/src/Standards/Generic/Docs/CodeAnalysis/ForLoopShouldBeWhileLoopStandard.xml new file mode 100644 index 00000000..06f0b7a5 --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/Generic/Docs/CodeAnalysis/ForLoopShouldBeWhileLoopStandard.xml @@ -0,0 +1,23 @@ + + + + + + + $i = 0; $i < 10; $i++) { + echo "{$i}\n"; +} + ]]> + + + ;$test;) { + $test = doSomething(); +} + ]]> + + + diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/Generic/Docs/CodeAnalysis/ForLoopWithTestFunctionCallStandard.xml b/vendor/squizlabs/php_codesniffer/src/Standards/Generic/Docs/CodeAnalysis/ForLoopWithTestFunctionCallStandard.xml new file mode 100644 index 00000000..f40d94bb --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/Generic/Docs/CodeAnalysis/ForLoopWithTestFunctionCallStandard.xml @@ -0,0 +1,24 @@ + + + + + + + $end = count($foo); +for ($i = 0; $i < $end; $i++) { + echo $foo[$i]."\n"; +} + ]]> + + + count($foo); $i++) { + echo $foo[$i]."\n"; +} + ]]> + + + diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/Generic/Docs/CodeAnalysis/JumbledIncrementerStandard.xml b/vendor/squizlabs/php_codesniffer/src/Standards/Generic/Docs/CodeAnalysis/JumbledIncrementerStandard.xml new file mode 100644 index 00000000..50f07828 --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/Generic/Docs/CodeAnalysis/JumbledIncrementerStandard.xml @@ -0,0 +1,25 @@ + + + + + + + $i++) { + for ($j = 0; $j < 10; $j++) { + } +} + ]]> + + + $i++) { + for ($j = 0; $j < 10; $i++) { + } +} + ]]> + + + diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/Generic/Docs/CodeAnalysis/UnconditionalIfStatementStandard.xml b/vendor/squizlabs/php_codesniffer/src/Standards/Generic/Docs/CodeAnalysis/UnconditionalIfStatementStandard.xml new file mode 100644 index 00000000..b2eaabe7 --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/Generic/Docs/CodeAnalysis/UnconditionalIfStatementStandard.xml @@ -0,0 +1,39 @@ + + + + + + + $test) { + $var = 1; +} + ]]> + + + true) { + $var = 1; +} + ]]> + + + + + $test) { + $var = 1; +} + ]]> + + + false) { + $var = 1; +} + ]]> + + + diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/Generic/Docs/CodeAnalysis/UnnecessaryFinalModifierStandard.xml b/vendor/squizlabs/php_codesniffer/src/Standards/Generic/Docs/CodeAnalysis/UnnecessaryFinalModifierStandard.xml new file mode 100644 index 00000000..89367407 --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/Generic/Docs/CodeAnalysis/UnnecessaryFinalModifierStandard.xml @@ -0,0 +1,29 @@ + + + + + + + + + + final function bar() + { + } +} + ]]> + + + diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/Generic/Docs/CodeAnalysis/UnusedFunctionParameterStandard.xml b/vendor/squizlabs/php_codesniffer/src/Standards/Generic/Docs/CodeAnalysis/UnusedFunctionParameterStandard.xml new file mode 100644 index 00000000..181dff4e --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/Generic/Docs/CodeAnalysis/UnusedFunctionParameterStandard.xml @@ -0,0 +1,25 @@ + + + + + + + $a + $b + $c; +} + ]]> + + + $a + $b; +} + ]]> + + + diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/Generic/Docs/CodeAnalysis/UselessOverridingMethodStandard.xml b/vendor/squizlabs/php_codesniffer/src/Standards/Generic/Docs/CodeAnalysis/UselessOverridingMethodStandard.xml new file mode 100644 index 00000000..ba8bd7e4 --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/Generic/Docs/CodeAnalysis/UselessOverridingMethodStandard.xml @@ -0,0 +1,32 @@ + + + + + + + $this->doSomethingElse(); + } +} + ]]> + + + parent::bar(); + } +} + ]]> + + + diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/Generic/Docs/Commenting/FixmeStandard.xml b/vendor/squizlabs/php_codesniffer/src/Standards/Generic/Docs/Commenting/FixmeStandard.xml new file mode 100644 index 00000000..174c6b0a --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/Generic/Docs/Commenting/FixmeStandard.xml @@ -0,0 +1,25 @@ + + + + + + + Handle strange case +if ($test) { + $var = 1; +} + ]]> + + + FIXME: This needs to be fixed! +if ($test) { + $var = 1; +} + ]]> + + + diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/Generic/Docs/Commenting/TodoStandard.xml b/vendor/squizlabs/php_codesniffer/src/Standards/Generic/Docs/Commenting/TodoStandard.xml new file mode 100644 index 00000000..c9c4fc06 --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/Generic/Docs/Commenting/TodoStandard.xml @@ -0,0 +1,25 @@ + + + + + + + Handle strange case +if ($test) { + $var = 1; +} + ]]> + + + TODO: This needs to be fixed! +if ($test) { + $var = 1; +} + ]]> + + + diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/Generic/Docs/ControlStructures/DisallowYodaConditionsStandard.xml b/vendor/squizlabs/php_codesniffer/src/Standards/Generic/Docs/ControlStructures/DisallowYodaConditionsStandard.xml new file mode 100644 index 00000000..570e4192 --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/Generic/Docs/ControlStructures/DisallowYodaConditionsStandard.xml @@ -0,0 +1,23 @@ + + + + + + + { + $var = 1; +} + ]]> + + + { + $var = 1; +} + ]]> + + + diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/Generic/Docs/ControlStructures/InlineControlStructureStandard.xml b/vendor/squizlabs/php_codesniffer/src/Standards/Generic/Docs/ControlStructures/InlineControlStructureStandard.xml new file mode 100644 index 00000000..06ae14b7 --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/Generic/Docs/ControlStructures/InlineControlStructureStandard.xml @@ -0,0 +1,22 @@ + + + + + + + { + $var = 1; +} + ]]> + + + + + + diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/Generic/Docs/Debug/CSSLintStandard.xml b/vendor/squizlabs/php_codesniffer/src/Standards/Generic/Docs/Debug/CSSLintStandard.xml new file mode 100644 index 00000000..b57a9706 --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/Generic/Docs/Debug/CSSLintStandard.xml @@ -0,0 +1,19 @@ + + + + + + + %; } + ]]> + + + %; } + ]]> + + + diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/Generic/Docs/Debug/ClosureLinterStandard.xml b/vendor/squizlabs/php_codesniffer/src/Standards/Generic/Docs/Debug/ClosureLinterStandard.xml new file mode 100644 index 00000000..9df9aec4 --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/Generic/Docs/Debug/ClosureLinterStandard.xml @@ -0,0 +1,19 @@ + + + + + + + ]; + ]]> + + + ,]; + ]]> + + + diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/Generic/Docs/Debug/JSHintStandard.xml b/vendor/squizlabs/php_codesniffer/src/Standards/Generic/Docs/Debug/JSHintStandard.xml new file mode 100644 index 00000000..7525e9e6 --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/Generic/Docs/Debug/JSHintStandard.xml @@ -0,0 +1,19 @@ + + + + + + + var foo = 5; + ]]> + + + foo = 5; + ]]> + + + diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/Generic/Docs/Files/ByteOrderMarkStandard.xml b/vendor/squizlabs/php_codesniffer/src/Standards/Generic/Docs/Files/ByteOrderMarkStandard.xml new file mode 100644 index 00000000..88591f92 --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/Generic/Docs/Files/ByteOrderMarkStandard.xml @@ -0,0 +1,7 @@ + + + + + diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/Generic/Docs/Files/EndFileNewlineStandard.xml b/vendor/squizlabs/php_codesniffer/src/Standards/Generic/Docs/Files/EndFileNewlineStandard.xml new file mode 100644 index 00000000..aa757edc --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/Generic/Docs/Files/EndFileNewlineStandard.xml @@ -0,0 +1,7 @@ + + + + + diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/Generic/Docs/Files/EndFileNoNewlineStandard.xml b/vendor/squizlabs/php_codesniffer/src/Standards/Generic/Docs/Files/EndFileNoNewlineStandard.xml new file mode 100644 index 00000000..227d5621 --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/Generic/Docs/Files/EndFileNoNewlineStandard.xml @@ -0,0 +1,7 @@ + + + + + diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/Generic/Docs/Files/ExecutableFileStandard.xml b/vendor/squizlabs/php_codesniffer/src/Standards/Generic/Docs/Files/ExecutableFileStandard.xml new file mode 100644 index 00000000..6114f24c --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/Generic/Docs/Files/ExecutableFileStandard.xml @@ -0,0 +1,7 @@ + + + + + diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/Generic/Docs/Files/InlineHTMLStandard.xml b/vendor/squizlabs/php_codesniffer/src/Standards/Generic/Docs/Files/InlineHTMLStandard.xml new file mode 100644 index 00000000..3fbf5024 --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/Generic/Docs/Files/InlineHTMLStandard.xml @@ -0,0 +1,24 @@ + + + + + + + + + + some string here + + + + diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/Generic/Docs/Files/LineEndingsStandard.xml b/vendor/squizlabs/php_codesniffer/src/Standards/Generic/Docs/Files/LineEndingsStandard.xml new file mode 100644 index 00000000..4554d0f3 --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/Generic/Docs/Files/LineEndingsStandard.xml @@ -0,0 +1,7 @@ + + + + + diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/Generic/Docs/Files/LineLengthStandard.xml b/vendor/squizlabs/php_codesniffer/src/Standards/Generic/Docs/Files/LineLengthStandard.xml new file mode 100644 index 00000000..31342e3c --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/Generic/Docs/Files/LineLengthStandard.xml @@ -0,0 +1,7 @@ + + + + + diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/Generic/Docs/Files/LowercasedFilenameStandard.xml b/vendor/squizlabs/php_codesniffer/src/Standards/Generic/Docs/Files/LowercasedFilenameStandard.xml new file mode 100644 index 00000000..a1be34cb --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/Generic/Docs/Files/LowercasedFilenameStandard.xml @@ -0,0 +1,7 @@ + + + + + diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/Generic/Docs/Files/OneClassPerFileStandard.xml b/vendor/squizlabs/php_codesniffer/src/Standards/Generic/Docs/Files/OneClassPerFileStandard.xml new file mode 100644 index 00000000..7b585763 --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/Generic/Docs/Files/OneClassPerFileStandard.xml @@ -0,0 +1,29 @@ + + + + + + + class Foo +{ +} + ]]> + + + class Foo +{ +} + +class Bar +{ +} + ]]> + + + diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/Generic/Docs/Files/OneInterfacePerFileStandard.xml b/vendor/squizlabs/php_codesniffer/src/Standards/Generic/Docs/Files/OneInterfacePerFileStandard.xml new file mode 100644 index 00000000..de975319 --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/Generic/Docs/Files/OneInterfacePerFileStandard.xml @@ -0,0 +1,29 @@ + + + + + + + interface Foo +{ +} + ]]> + + + interface Foo +{ +} + +interface Bar +{ +} + ]]> + + + diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/Generic/Docs/Files/OneObjectStructurePerFileStandard.xml b/vendor/squizlabs/php_codesniffer/src/Standards/Generic/Docs/Files/OneObjectStructurePerFileStandard.xml new file mode 100644 index 00000000..4d957e70 --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/Generic/Docs/Files/OneObjectStructurePerFileStandard.xml @@ -0,0 +1,29 @@ + + + + + + + trait Foo +{ +} + ]]> + + + trait Foo +{ +} + +class Bar +{ +} + ]]> + + + diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/Generic/Docs/Files/OneTraitPerFileStandard.xml b/vendor/squizlabs/php_codesniffer/src/Standards/Generic/Docs/Files/OneTraitPerFileStandard.xml new file mode 100644 index 00000000..58a6482f --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/Generic/Docs/Files/OneTraitPerFileStandard.xml @@ -0,0 +1,29 @@ + + + + + + + trait Foo +{ +} + ]]> + + + trait Foo +{ +} + +trait Bar +{ +} + ]]> + + + diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/Generic/Docs/Formatting/DisallowMultipleStatementsStandard.xml b/vendor/squizlabs/php_codesniffer/src/Standards/Generic/Docs/Formatting/DisallowMultipleStatementsStandard.xml new file mode 100644 index 00000000..f0d4490c --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/Generic/Docs/Formatting/DisallowMultipleStatementsStandard.xml @@ -0,0 +1,20 @@ + + + + + + + + + + + + + diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/Generic/Docs/Formatting/MultipleStatementAlignmentStandard.xml b/vendor/squizlabs/php_codesniffer/src/Standards/Generic/Docs/Formatting/MultipleStatementAlignmentStandard.xml new file mode 100644 index 00000000..4c33d763 --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/Generic/Docs/Formatting/MultipleStatementAlignmentStandard.xml @@ -0,0 +1,56 @@ + + + + + + + = (1 + 2); +$veryLongVarName = 'string'; +$var = foo($bar, $baz); + ]]> + + + = (1 + 2); +$veryLongVarName = 'string'; +$var = foo($bar, $baz); + ]]> + + + + + + + + += 1; +$veryLongVarName = 1; + ]]> + + + += 1; +$veryLongVarName = 1; + ]]> + + + + + = 1; +$veryLongVarName -= 1; + ]]> + + + = 1; +$veryLongVarName -= 1; + ]]> + + + diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/Generic/Docs/Formatting/NoSpaceAfterCastStandard.xml b/vendor/squizlabs/php_codesniffer/src/Standards/Generic/Docs/Formatting/NoSpaceAfterCastStandard.xml new file mode 100644 index 00000000..042e4f80 --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/Generic/Docs/Formatting/NoSpaceAfterCastStandard.xml @@ -0,0 +1,19 @@ + + + + + + + + + + 1; + ]]> + + + diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/Generic/Docs/Formatting/SpaceAfterCastStandard.xml b/vendor/squizlabs/php_codesniffer/src/Standards/Generic/Docs/Formatting/SpaceAfterCastStandard.xml new file mode 100644 index 00000000..75eba77c --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/Generic/Docs/Formatting/SpaceAfterCastStandard.xml @@ -0,0 +1,19 @@ + + + + + + + 1; + ]]> + + + 1; + ]]> + + + diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/Generic/Docs/Formatting/SpaceAfterNotStandard.xml b/vendor/squizlabs/php_codesniffer/src/Standards/Generic/Docs/Formatting/SpaceAfterNotStandard.xml new file mode 100644 index 00000000..dd3e7731 --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/Generic/Docs/Formatting/SpaceAfterNotStandard.xml @@ -0,0 +1,25 @@ + + + + + + + $someVar || ! $x instanceOf stdClass) {}; + ]]> + + + $someVar || !$x instanceOf stdClass) {}; + ]]> + + + $someVar || ! + $x instanceOf stdClass) {}; + ]]> + + + diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/Generic/Docs/Functions/CallTimePassByReferenceStandard.xml b/vendor/squizlabs/php_codesniffer/src/Standards/Generic/Docs/Functions/CallTimePassByReferenceStandard.xml new file mode 100644 index 00000000..738998d4 --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/Generic/Docs/Functions/CallTimePassByReferenceStandard.xml @@ -0,0 +1,31 @@ + + + + + + + &$bar) +{ + $bar++; +} + +$baz = 1; +foo($baz); + ]]> + + + &$baz); + ]]> + + + diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/Generic/Docs/Functions/FunctionCallArgumentSpacingStandard.xml b/vendor/squizlabs/php_codesniffer/src/Standards/Generic/Docs/Functions/FunctionCallArgumentSpacingStandard.xml new file mode 100644 index 00000000..9809844d --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/Generic/Docs/Functions/FunctionCallArgumentSpacingStandard.xml @@ -0,0 +1,39 @@ + + + + + + + $baz) +{ +} + ]]> + + + $baz) +{ +} + ]]> + + + + + = true) +{ +} + ]]> + + + =true) +{ +} + ]]> + + + diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/Generic/Docs/Functions/OpeningFunctionBraceBsdAllmanStandard.xml b/vendor/squizlabs/php_codesniffer/src/Standards/Generic/Docs/Functions/OpeningFunctionBraceBsdAllmanStandard.xml new file mode 100644 index 00000000..414dc289 --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/Generic/Docs/Functions/OpeningFunctionBraceBsdAllmanStandard.xml @@ -0,0 +1,24 @@ + + + + + + + { + ... +} + ]]> + + + { + ... +} + ]]> + + + diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/Generic/Docs/Functions/OpeningFunctionBraceKernighanRitchieStandard.xml b/vendor/squizlabs/php_codesniffer/src/Standards/Generic/Docs/Functions/OpeningFunctionBraceKernighanRitchieStandard.xml new file mode 100644 index 00000000..84c2bdd8 --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/Generic/Docs/Functions/OpeningFunctionBraceKernighanRitchieStandard.xml @@ -0,0 +1,24 @@ + + + + + + + { + ... +} + ]]> + + + { + ... +} + ]]> + + + diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/Generic/Docs/Metrics/CyclomaticComplexityStandard.xml b/vendor/squizlabs/php_codesniffer/src/Standards/Generic/Docs/Metrics/CyclomaticComplexityStandard.xml new file mode 100644 index 00000000..a928e7db --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/Generic/Docs/Metrics/CyclomaticComplexityStandard.xml @@ -0,0 +1,7 @@ + + + + + diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/Generic/Docs/Metrics/NestingLevelStandard.xml b/vendor/squizlabs/php_codesniffer/src/Standards/Generic/Docs/Metrics/NestingLevelStandard.xml new file mode 100644 index 00000000..f66cd92c --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/Generic/Docs/Metrics/NestingLevelStandard.xml @@ -0,0 +1,7 @@ + + + + + diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/Generic/Docs/NamingConventions/AbstractClassNamePrefixStandard.xml b/vendor/squizlabs/php_codesniffer/src/Standards/Generic/Docs/NamingConventions/AbstractClassNamePrefixStandard.xml new file mode 100644 index 00000000..c30d26e9 --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/Generic/Docs/NamingConventions/AbstractClassNamePrefixStandard.xml @@ -0,0 +1,23 @@ + + + + + + + AbstractBar +{ +} + ]]> + + + Bar +{ +} + ]]> + + + diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/Generic/Docs/NamingConventions/CamelCapsFunctionNameStandard.xml b/vendor/squizlabs/php_codesniffer/src/Standards/Generic/Docs/NamingConventions/CamelCapsFunctionNameStandard.xml new file mode 100644 index 00000000..f5345b71 --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/Generic/Docs/NamingConventions/CamelCapsFunctionNameStandard.xml @@ -0,0 +1,23 @@ + + + + + + + doSomething() +{ +} + ]]> + + + do_something() +{ +} + ]]> + + + diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/Generic/Docs/NamingConventions/ConstructorNameStandard.xml b/vendor/squizlabs/php_codesniffer/src/Standards/Generic/Docs/NamingConventions/ConstructorNameStandard.xml new file mode 100644 index 00000000..9dfc175f --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/Generic/Docs/NamingConventions/ConstructorNameStandard.xml @@ -0,0 +1,29 @@ + + + + + + + __construct() + { + } +} + ]]> + + + Foo() + { + } +} + ]]> + + + diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/Generic/Docs/NamingConventions/InterfaceNameSuffixStandard.xml b/vendor/squizlabs/php_codesniffer/src/Standards/Generic/Docs/NamingConventions/InterfaceNameSuffixStandard.xml new file mode 100644 index 00000000..0aa0c76e --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/Generic/Docs/NamingConventions/InterfaceNameSuffixStandard.xml @@ -0,0 +1,23 @@ + + + + + + + BarInterface +{ +} + ]]> + + + Bar +{ +} + ]]> + + + diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/Generic/Docs/NamingConventions/TraitNameSuffixStandard.xml b/vendor/squizlabs/php_codesniffer/src/Standards/Generic/Docs/NamingConventions/TraitNameSuffixStandard.xml new file mode 100644 index 00000000..711867e4 --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/Generic/Docs/NamingConventions/TraitNameSuffixStandard.xml @@ -0,0 +1,23 @@ + + + + + + + BarTrait +{ +} + ]]> + + + Bar +{ +} + ]]> + + + diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/Generic/Docs/NamingConventions/UpperCaseConstantNameStandard.xml b/vendor/squizlabs/php_codesniffer/src/Standards/Generic/Docs/NamingConventions/UpperCaseConstantNameStandard.xml new file mode 100644 index 00000000..6ef61b93 --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/Generic/Docs/NamingConventions/UpperCaseConstantNameStandard.xml @@ -0,0 +1,29 @@ + + + + + + + FOO_CONSTANT', 'foo'); + +class FooClass +{ + const FOO_CONSTANT = 'foo'; +} + ]]> + + + Foo_Constant', 'foo'); + +class FooClass +{ + const foo_constant = 'foo'; +} + ]]> + + + diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/Generic/Docs/PHP/BacktickOperatorStandard.xml b/vendor/squizlabs/php_codesniffer/src/Standards/Generic/Docs/PHP/BacktickOperatorStandard.xml new file mode 100644 index 00000000..4ebd6770 --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/Generic/Docs/PHP/BacktickOperatorStandard.xml @@ -0,0 +1,7 @@ + + + + + diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/Generic/Docs/PHP/CharacterBeforePHPOpeningTagStandard.xml b/vendor/squizlabs/php_codesniffer/src/Standards/Generic/Docs/PHP/CharacterBeforePHPOpeningTagStandard.xml new file mode 100644 index 00000000..df5a0eba --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/Generic/Docs/PHP/CharacterBeforePHPOpeningTagStandard.xml @@ -0,0 +1,22 @@ + + + + + + + + + + Beginning content + + + + diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/Generic/Docs/PHP/ClosingPHPTagStandard.xml b/vendor/squizlabs/php_codesniffer/src/Standards/Generic/Docs/PHP/ClosingPHPTagStandard.xml new file mode 100644 index 00000000..09afb2d7 --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/Generic/Docs/PHP/ClosingPHPTagStandard.xml @@ -0,0 +1,22 @@ + + + + + + + +echo 'Foo'; +?> + ]]> + + + +echo 'Foo'; + ]]> + + + diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/Generic/Docs/PHP/DeprecatedFunctionsStandard.xml b/vendor/squizlabs/php_codesniffer/src/Standards/Generic/Docs/PHP/DeprecatedFunctionsStandard.xml new file mode 100644 index 00000000..33b803a7 --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/Generic/Docs/PHP/DeprecatedFunctionsStandard.xml @@ -0,0 +1,19 @@ + + + + + + + explode('a', $bar); + ]]> + + + split('a', $bar); + ]]> + + + diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/Generic/Docs/PHP/DisallowAlternativePHPTagsStandard.xml b/vendor/squizlabs/php_codesniffer/src/Standards/Generic/Docs/PHP/DisallowAlternativePHPTagsStandard.xml new file mode 100644 index 00000000..bdfd5dc1 --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/Generic/Docs/PHP/DisallowAlternativePHPTagsStandard.xml @@ -0,0 +1,7 @@ + + + to delimit PHP code, do not use the ASP <% %> style tags nor the tags. This is the most portable way to include PHP code on differing operating systems and setups. + ]]> + + diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/Generic/Docs/PHP/DisallowRequestSuperglobalStandard.xml b/vendor/squizlabs/php_codesniffer/src/Standards/Generic/Docs/PHP/DisallowRequestSuperglobalStandard.xml new file mode 100644 index 00000000..f9476942 --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/Generic/Docs/PHP/DisallowRequestSuperglobalStandard.xml @@ -0,0 +1,7 @@ + + + + + diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/Generic/Docs/PHP/DisallowShortOpenTagStandard.xml b/vendor/squizlabs/php_codesniffer/src/Standards/Generic/Docs/PHP/DisallowShortOpenTagStandard.xml new file mode 100644 index 00000000..8086ea27 --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/Generic/Docs/PHP/DisallowShortOpenTagStandard.xml @@ -0,0 +1,7 @@ + + + to delimit PHP code, not the shorthand. This is the most portable way to include PHP code on differing operating systems and setups. + ]]> + + diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/Generic/Docs/PHP/DiscourageGotoStandard.xml b/vendor/squizlabs/php_codesniffer/src/Standards/Generic/Docs/PHP/DiscourageGotoStandard.xml new file mode 100644 index 00000000..83bceef4 --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/Generic/Docs/PHP/DiscourageGotoStandard.xml @@ -0,0 +1,7 @@ + + + + + diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/Generic/Docs/PHP/ForbiddenFunctionsStandard.xml b/vendor/squizlabs/php_codesniffer/src/Standards/Generic/Docs/PHP/ForbiddenFunctionsStandard.xml new file mode 100644 index 00000000..c0f18b55 --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/Generic/Docs/PHP/ForbiddenFunctionsStandard.xml @@ -0,0 +1,19 @@ + + + + + + + count($bar); + ]]> + + + sizeof($bar); + ]]> + + + diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/Generic/Docs/PHP/LowerCaseConstantStandard.xml b/vendor/squizlabs/php_codesniffer/src/Standards/Generic/Docs/PHP/LowerCaseConstantStandard.xml new file mode 100644 index 00000000..7dc30c10 --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/Generic/Docs/PHP/LowerCaseConstantStandard.xml @@ -0,0 +1,23 @@ + + + true, false and null constants must always be lowercase. + ]]> + + + + false || $var === null) { + $var = true; +} + ]]> + + + FALSE || $var === NULL) { + $var = TRUE; +} + ]]> + + + diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/Generic/Docs/PHP/LowerCaseKeywordStandard.xml b/vendor/squizlabs/php_codesniffer/src/Standards/Generic/Docs/PHP/LowerCaseKeywordStandard.xml new file mode 100644 index 00000000..965742d9 --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/Generic/Docs/PHP/LowerCaseKeywordStandard.xml @@ -0,0 +1,19 @@ + + + + + + + array(); + ]]> + + + Array(); + ]]> + + + diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/Generic/Docs/PHP/LowerCaseTypeStandard.xml b/vendor/squizlabs/php_codesniffer/src/Standards/Generic/Docs/PHP/LowerCaseTypeStandard.xml new file mode 100644 index 00000000..f38df3af --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/Generic/Docs/PHP/LowerCaseTypeStandard.xml @@ -0,0 +1,38 @@ + + + + + + + + + + Int $foo) : STRING { +} + ]]> + + + + + + + + + + + (BOOL) $isValid; + ]]> + + + diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/Generic/Docs/PHP/NoSilencedErrorsStandard.xml b/vendor/squizlabs/php_codesniffer/src/Standards/Generic/Docs/PHP/NoSilencedErrorsStandard.xml new file mode 100644 index 00000000..df698879 --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/Generic/Docs/PHP/NoSilencedErrorsStandard.xml @@ -0,0 +1,23 @@ + + + + + + + isset($foo) && $foo) { + echo "Hello\n"; +} + ]]> + + + @$foo) { + echo "Hello\n"; +} + ]]> + + + diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/Generic/Docs/PHP/SAPIUsageStandard.xml b/vendor/squizlabs/php_codesniffer/src/Standards/Generic/Docs/PHP/SAPIUsageStandard.xml new file mode 100644 index 00000000..e74005ad --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/Generic/Docs/PHP/SAPIUsageStandard.xml @@ -0,0 +1,23 @@ + + + + + + + PHP_SAPI === 'cli') { + echo "Hello, CLI user."; +} + ]]> + + + php_sapi_name() === 'cli') { + echo "Hello, CLI user."; +} + ]]> + + + diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/Generic/Docs/PHP/UpperCaseConstantStandard.xml b/vendor/squizlabs/php_codesniffer/src/Standards/Generic/Docs/PHP/UpperCaseConstantStandard.xml new file mode 100644 index 00000000..1f337f77 --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/Generic/Docs/PHP/UpperCaseConstantStandard.xml @@ -0,0 +1,23 @@ + + + true, false and null constants must always be uppercase. + ]]> + + + + FALSE || $var === NULL) { + $var = TRUE; +} + ]]> + + + false || $var === null) { + $var = true; +} + ]]> + + + diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/Generic/Docs/Strings/UnnecessaryStringConcatStandard.xml b/vendor/squizlabs/php_codesniffer/src/Standards/Generic/Docs/Strings/UnnecessaryStringConcatStandard.xml new file mode 100644 index 00000000..a4c9887b --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/Generic/Docs/Strings/UnnecessaryStringConcatStandard.xml @@ -0,0 +1,19 @@ + + + + + + + + + + + + + diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/Generic/Docs/VersionControl/SubversionPropertiesStandard.xml b/vendor/squizlabs/php_codesniffer/src/Standards/Generic/Docs/VersionControl/SubversionPropertiesStandard.xml new file mode 100644 index 00000000..f4f3e19c --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/Generic/Docs/VersionControl/SubversionPropertiesStandard.xml @@ -0,0 +1,7 @@ + + + + + diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/Generic/Docs/WhiteSpace/ArbitraryParenthesesSpacingStandard.xml b/vendor/squizlabs/php_codesniffer/src/Standards/Generic/Docs/WhiteSpace/ArbitraryParenthesesSpacingStandard.xml new file mode 100644 index 00000000..30e0def9 --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/Generic/Docs/WhiteSpace/ArbitraryParenthesesSpacingStandard.xml @@ -0,0 +1,26 @@ + + + + + + + + + + + + + + + + diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/Generic/Docs/WhiteSpace/DisallowSpaceIndentStandard.xml b/vendor/squizlabs/php_codesniffer/src/Standards/Generic/Docs/WhiteSpace/DisallowSpaceIndentStandard.xml new file mode 100644 index 00000000..2e399b34 --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/Generic/Docs/WhiteSpace/DisallowSpaceIndentStandard.xml @@ -0,0 +1,7 @@ + + + + + diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/Generic/Docs/WhiteSpace/DisallowTabIndentStandard.xml b/vendor/squizlabs/php_codesniffer/src/Standards/Generic/Docs/WhiteSpace/DisallowTabIndentStandard.xml new file mode 100644 index 00000000..7013ffd9 --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/Generic/Docs/WhiteSpace/DisallowTabIndentStandard.xml @@ -0,0 +1,7 @@ + + + + + diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/Generic/Docs/WhiteSpace/ScopeIndentStandard.xml b/vendor/squizlabs/php_codesniffer/src/Standards/Generic/Docs/WhiteSpace/ScopeIndentStandard.xml new file mode 100644 index 00000000..bdd36d49 --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/Generic/Docs/WhiteSpace/ScopeIndentStandard.xml @@ -0,0 +1,23 @@ + + + + + + + $var = 1; +} + ]]> + + + $var = 1; +} + ]]> + + + diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/Generic/Docs/WhiteSpace/SpreadOperatorSpacingAfterStandard.xml b/vendor/squizlabs/php_codesniffer/src/Standards/Generic/Docs/WhiteSpace/SpreadOperatorSpacingAfterStandard.xml new file mode 100644 index 00000000..d33b6051 --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/Generic/Docs/WhiteSpace/SpreadOperatorSpacingAfterStandard.xml @@ -0,0 +1,34 @@ + + + + + + + &...$spread) { + bar(...$spread); + + bar( + [...$foo], + ...array_values($keyedArray) + ); +} + ]]> + + + ... $spread) { + bar(... + $spread + ); + + bar( + [... $foo ],.../*comment*/array_values($keyedArray) + ); +} + ]]> + + + diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/Generic/Sniffs/Arrays/ArrayIndentSniff.php b/vendor/squizlabs/php_codesniffer/src/Standards/Generic/Sniffs/Arrays/ArrayIndentSniff.php new file mode 100644 index 00000000..adb74ec8 --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/Generic/Sniffs/Arrays/ArrayIndentSniff.php @@ -0,0 +1,177 @@ + + * @copyright 2006-2015 Squiz Pty Ltd (ABN 77 084 670 600) + * @license https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence + */ + +namespace PHP_CodeSniffer\Standards\Generic\Sniffs\Arrays; + +use PHP_CodeSniffer\Sniffs\AbstractArraySniff; +use PHP_CodeSniffer\Util\Tokens; + +class ArrayIndentSniff extends AbstractArraySniff +{ + + /** + * The number of spaces each array key should be indented. + * + * @var integer + */ + public $indent = 4; + + + /** + * Processes a single-line array definition. + * + * @param \PHP_CodeSniffer\Files\File $phpcsFile The current file being checked. + * @param int $stackPtr The position of the current token + * in the stack passed in $tokens. + * @param int $arrayStart The token that starts the array definition. + * @param int $arrayEnd The token that ends the array definition. + * @param array $indices An array of token positions for the array keys, + * double arrows, and values. + * + * @return void + */ + public function processSingleLineArray($phpcsFile, $stackPtr, $arrayStart, $arrayEnd, $indices) + { + + }//end processSingleLineArray() + + + /** + * Processes a multi-line array definition. + * + * @param \PHP_CodeSniffer\Files\File $phpcsFile The current file being checked. + * @param int $stackPtr The position of the current token + * in the stack passed in $tokens. + * @param int $arrayStart The token that starts the array definition. + * @param int $arrayEnd The token that ends the array definition. + * @param array $indices An array of token positions for the array keys, + * double arrows, and values. + * + * @return void + */ + public function processMultiLineArray($phpcsFile, $stackPtr, $arrayStart, $arrayEnd, $indices) + { + $tokens = $phpcsFile->getTokens(); + + // Determine how far indented the entire array declaration should be. + $ignore = Tokens::$emptyTokens; + $ignore[] = T_DOUBLE_ARROW; + $ignore[] = T_COMMA; + $prev = $phpcsFile->findPrevious($ignore, ($stackPtr - 1), null, true); + $start = $phpcsFile->findStartOfStatement($prev); + $first = $phpcsFile->findFirstOnLine(T_WHITESPACE, $start, true); + $baseIndent = ($tokens[$first]['column'] - 1); + + $first = $phpcsFile->findFirstOnLine(T_WHITESPACE, $stackPtr, true); + $startIndent = ($tokens[$first]['column'] - 1); + + // If the open brace is not indented to at least to the level of the start + // of the statement, the sniff will conflict with other sniffs trying to + // check indent levels because it's not valid. But we don't enforce exactly + // how far indented it should be. + if ($startIndent < $baseIndent) { + $error = 'Array open brace not indented correctly; expected at least %s spaces but found %s'; + $data = [ + $baseIndent, + $startIndent, + ]; + $fix = $phpcsFile->addFixableError($error, $stackPtr, 'OpenBraceIncorrect', $data); + if ($fix === true) { + $padding = str_repeat(' ', $baseIndent); + if ($startIndent === 0) { + $phpcsFile->fixer->addContentBefore($first, $padding); + } else { + $phpcsFile->fixer->replaceToken(($first - 1), $padding); + } + } + + return; + }//end if + + $expectedIndent = ($startIndent + $this->indent); + + foreach ($indices as $index) { + if (isset($index['index_start']) === true) { + $start = $index['index_start']; + } else { + $start = $index['value_start']; + } + + $prev = $phpcsFile->findPrevious(Tokens::$emptyTokens, ($start - 1), null, true); + if ($tokens[$prev]['line'] === $tokens[$start]['line']) { + // This index isn't the only content on the line + // so we can't check indent rules. + continue; + } + + $first = $phpcsFile->findFirstOnLine(T_WHITESPACE, $start, true); + + $foundIndent = ($tokens[$first]['column'] - 1); + if ($foundIndent === $expectedIndent) { + continue; + } + + $error = 'Array key not indented correctly; expected %s spaces but found %s'; + $data = [ + $expectedIndent, + $foundIndent, + ]; + $fix = $phpcsFile->addFixableError($error, $first, 'KeyIncorrect', $data); + if ($fix === false) { + continue; + } + + $padding = str_repeat(' ', $expectedIndent); + if ($foundIndent === 0) { + $phpcsFile->fixer->addContentBefore($first, $padding); + } else { + $phpcsFile->fixer->replaceToken(($first - 1), $padding); + } + }//end foreach + + $prev = $phpcsFile->findPrevious(T_WHITESPACE, ($arrayEnd - 1), null, true); + if ($tokens[$prev]['line'] === $tokens[$arrayEnd]['line']) { + $error = 'Closing brace of array declaration must be on a new line'; + $fix = $phpcsFile->addFixableError($error, $arrayEnd, 'CloseBraceNotNewLine'); + if ($fix === true) { + $padding = $phpcsFile->eolChar.str_repeat(' ', $expectedIndent); + $phpcsFile->fixer->addContentBefore($arrayEnd, $padding); + } + + return; + } + + // The close brace must be indented one stop less. + $expectedIndent -= $this->indent; + $foundIndent = ($tokens[$arrayEnd]['column'] - 1); + if ($foundIndent === $expectedIndent) { + return; + } + + $error = 'Array close brace not indented correctly; expected %s spaces but found %s'; + $data = [ + $expectedIndent, + $foundIndent, + ]; + $fix = $phpcsFile->addFixableError($error, $arrayEnd, 'CloseBraceIncorrect', $data); + if ($fix === false) { + return; + } + + $padding = str_repeat(' ', $expectedIndent); + if ($foundIndent === 0) { + $phpcsFile->fixer->addContentBefore($arrayEnd, $padding); + } else { + $phpcsFile->fixer->replaceToken(($arrayEnd - 1), $padding); + } + + }//end processMultiLineArray() + + +}//end class diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/Generic/Sniffs/Arrays/DisallowLongArraySyntaxSniff.php b/vendor/squizlabs/php_codesniffer/src/Standards/Generic/Sniffs/Arrays/DisallowLongArraySyntaxSniff.php new file mode 100644 index 00000000..bf7f3ed1 --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/Generic/Sniffs/Arrays/DisallowLongArraySyntaxSniff.php @@ -0,0 +1,78 @@ + + * @copyright 2006-2015 Squiz Pty Ltd (ABN 77 084 670 600) + * @license https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence + */ + +namespace PHP_CodeSniffer\Standards\Generic\Sniffs\Arrays; + +use PHP_CodeSniffer\Files\File; +use PHP_CodeSniffer\Sniffs\Sniff; + +class DisallowLongArraySyntaxSniff implements Sniff +{ + + + /** + * Registers the tokens that this sniff wants to listen for. + * + * @return int[] + */ + public function register() + { + return [T_ARRAY]; + + }//end register() + + + /** + * Processes this test, when one of its tokens is encountered. + * + * @param \PHP_CodeSniffer\Files\File $phpcsFile The file being scanned. + * @param int $stackPtr The position of the current token + * in the stack passed in $tokens. + * + * @return void + */ + public function process(File $phpcsFile, $stackPtr) + { + $tokens = $phpcsFile->getTokens(); + + $phpcsFile->recordMetric($stackPtr, 'Short array syntax used', 'no'); + + $error = 'Short array syntax must be used to define arrays'; + + if (isset($tokens[$stackPtr]['parenthesis_opener']) === false + || isset($tokens[$stackPtr]['parenthesis_closer']) === false + ) { + // Live coding/parse error, just show the error, don't try and fix it. + $phpcsFile->addError($error, $stackPtr, 'Found'); + return; + } + + $fix = $phpcsFile->addFixableError($error, $stackPtr, 'Found'); + + if ($fix === true) { + $opener = $tokens[$stackPtr]['parenthesis_opener']; + $closer = $tokens[$stackPtr]['parenthesis_closer']; + + $phpcsFile->fixer->beginChangeset(); + + if ($opener === null) { + $phpcsFile->fixer->replaceToken($stackPtr, '[]'); + } else { + $phpcsFile->fixer->replaceToken($stackPtr, ''); + $phpcsFile->fixer->replaceToken($opener, '['); + $phpcsFile->fixer->replaceToken($closer, ']'); + } + + $phpcsFile->fixer->endChangeset(); + } + + }//end process() + + +}//end class diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/Generic/Sniffs/Arrays/DisallowShortArraySyntaxSniff.php b/vendor/squizlabs/php_codesniffer/src/Standards/Generic/Sniffs/Arrays/DisallowShortArraySyntaxSniff.php new file mode 100644 index 00000000..2ba42d67 --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/Generic/Sniffs/Arrays/DisallowShortArraySyntaxSniff.php @@ -0,0 +1,61 @@ + + * @copyright 2006-2015 Squiz Pty Ltd (ABN 77 084 670 600) + * @license https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence + */ + +namespace PHP_CodeSniffer\Standards\Generic\Sniffs\Arrays; + +use PHP_CodeSniffer\Files\File; +use PHP_CodeSniffer\Sniffs\Sniff; + +class DisallowShortArraySyntaxSniff implements Sniff +{ + + + /** + * Registers the tokens that this sniff wants to listen for. + * + * @return int[] + */ + public function register() + { + return [T_OPEN_SHORT_ARRAY]; + + }//end register() + + + /** + * Processes this test, when one of its tokens is encountered. + * + * @param \PHP_CodeSniffer\Files\File $phpcsFile The file being scanned. + * @param int $stackPtr The position of the current token + * in the stack passed in $tokens. + * + * @return void + */ + public function process(File $phpcsFile, $stackPtr) + { + $phpcsFile->recordMetric($stackPtr, 'Short array syntax used', 'yes'); + + $error = 'Short array syntax is not allowed'; + $fix = $phpcsFile->addFixableError($error, $stackPtr, 'Found'); + + if ($fix === true) { + $tokens = $phpcsFile->getTokens(); + $opener = $tokens[$stackPtr]['bracket_opener']; + $closer = $tokens[$stackPtr]['bracket_closer']; + + $phpcsFile->fixer->beginChangeset(); + $phpcsFile->fixer->replaceToken($opener, 'array('); + $phpcsFile->fixer->replaceToken($closer, ')'); + $phpcsFile->fixer->endChangeset(); + } + + }//end process() + + +}//end class diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/Generic/Sniffs/Classes/DuplicateClassNameSniff.php b/vendor/squizlabs/php_codesniffer/src/Standards/Generic/Sniffs/Classes/DuplicateClassNameSniff.php new file mode 100644 index 00000000..8374bfd5 --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/Generic/Sniffs/Classes/DuplicateClassNameSniff.php @@ -0,0 +1,117 @@ + + * @copyright 2006-2015 Squiz Pty Ltd (ABN 77 084 670 600) + * @license https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence + */ + +namespace PHP_CodeSniffer\Standards\Generic\Sniffs\Classes; + +use PHP_CodeSniffer\Files\File; +use PHP_CodeSniffer\Sniffs\Sniff; + +class DuplicateClassNameSniff implements Sniff +{ + + /** + * List of classes that have been found during checking. + * + * @var array + */ + protected $foundClasses = []; + + + /** + * Registers the tokens that this sniff wants to listen for. + * + * @return int[] + */ + public function register() + { + return [T_OPEN_TAG]; + + }//end register() + + + /** + * Processes this test, when one of its tokens is encountered. + * + * @param \PHP_CodeSniffer\Files\File $phpcsFile The file being scanned. + * @param int $stackPtr The position of the current token + * in the stack passed in $tokens. + * + * @return void + */ + public function process(File $phpcsFile, $stackPtr) + { + $tokens = $phpcsFile->getTokens(); + + $namespace = ''; + $findTokens = [ + T_CLASS, + T_INTERFACE, + T_TRAIT, + T_NAMESPACE, + T_CLOSE_TAG, + ]; + + $stackPtr = $phpcsFile->findNext($findTokens, ($stackPtr + 1)); + while ($stackPtr !== false) { + if ($tokens[$stackPtr]['code'] === T_CLOSE_TAG) { + // We can stop here. The sniff will continue from the next open + // tag when PHPCS reaches that token, if there is one. + return; + } + + // Keep track of what namespace we are in. + if ($tokens[$stackPtr]['code'] === T_NAMESPACE) { + $nsEnd = $phpcsFile->findNext( + [ + T_NS_SEPARATOR, + T_STRING, + T_WHITESPACE, + ], + ($stackPtr + 1), + null, + true + ); + + $namespace = trim($phpcsFile->getTokensAsString(($stackPtr + 1), ($nsEnd - $stackPtr - 1))); + $stackPtr = $nsEnd; + } else { + $nameToken = $phpcsFile->findNext(T_STRING, $stackPtr); + $name = $tokens[$nameToken]['content']; + if ($namespace !== '') { + $name = $namespace.'\\'.$name; + } + + $compareName = strtolower($name); + if (isset($this->foundClasses[$compareName]) === true) { + $type = strtolower($tokens[$stackPtr]['content']); + $file = $this->foundClasses[$compareName]['file']; + $line = $this->foundClasses[$compareName]['line']; + $error = 'Duplicate %s name "%s" found; first defined in %s on line %s'; + $data = [ + $type, + $name, + $file, + $line, + ]; + $phpcsFile->addWarning($error, $stackPtr, 'Found', $data); + } else { + $this->foundClasses[$compareName] = [ + 'file' => $phpcsFile->getFilename(), + 'line' => $tokens[$stackPtr]['line'], + ]; + } + }//end if + + $stackPtr = $phpcsFile->findNext($findTokens, ($stackPtr + 1)); + }//end while + + }//end process() + + +}//end class diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/Generic/Sniffs/Classes/OpeningBraceSameLineSniff.php b/vendor/squizlabs/php_codesniffer/src/Standards/Generic/Sniffs/Classes/OpeningBraceSameLineSniff.php new file mode 100644 index 00000000..fb92d82c --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/Generic/Sniffs/Classes/OpeningBraceSameLineSniff.php @@ -0,0 +1,123 @@ + + * @copyright 2006-2015 Squiz Pty Ltd (ABN 77 084 670 600) + * @license https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence + */ + +namespace PHP_CodeSniffer\Standards\Generic\Sniffs\Classes; + +use PHP_CodeSniffer\Files\File; +use PHP_CodeSniffer\Sniffs\Sniff; + +class OpeningBraceSameLineSniff implements Sniff +{ + + + /** + * Returns an array of tokens this test wants to listen for. + * + * @return array + */ + public function register() + { + return [ + T_CLASS, + T_INTERFACE, + T_TRAIT, + ]; + + }//end register() + + + /** + * Processes this test, when one of its tokens is encountered. + * + * @param \PHP_CodeSniffer\Files\File $phpcsFile The file being scanned. + * @param int $stackPtr The position of the current token + * in the stack passed in $tokens. + * + * @return void + */ + public function process(File $phpcsFile, $stackPtr) + { + $tokens = $phpcsFile->getTokens(); + $scopeIdentifier = $phpcsFile->findNext(T_STRING, ($stackPtr + 1)); + $errorData = [strtolower($tokens[$stackPtr]['content']).' '.$tokens[$scopeIdentifier]['content']]; + + if (isset($tokens[$stackPtr]['scope_opener']) === false) { + $error = 'Possible parse error: %s missing opening or closing brace'; + $phpcsFile->addWarning($error, $stackPtr, 'MissingBrace', $errorData); + return; + } + + $openingBrace = $tokens[$stackPtr]['scope_opener']; + + // Is the brace on the same line as the class/interface/trait declaration ? + $lastClassLineToken = $phpcsFile->findPrevious(T_WHITESPACE, ($openingBrace - 1), $stackPtr, true); + $lastClassLine = $tokens[$lastClassLineToken]['line']; + $braceLine = $tokens[$openingBrace]['line']; + $lineDifference = ($braceLine - $lastClassLine); + + if ($lineDifference > 0) { + $phpcsFile->recordMetric($stackPtr, 'Class opening brace placement', 'new line'); + $error = 'Opening brace should be on the same line as the declaration for %s'; + $fix = $phpcsFile->addFixableError($error, $openingBrace, 'BraceOnNewLine', $errorData); + if ($fix === true) { + $phpcsFile->fixer->beginChangeset(); + $phpcsFile->fixer->addContent($lastClassLineToken, ' {'); + $phpcsFile->fixer->replaceToken($openingBrace, ''); + $phpcsFile->fixer->endChangeset(); + } + } else { + $phpcsFile->recordMetric($stackPtr, 'Class opening brace placement', 'same line'); + } + + // Is the opening brace the last thing on the line ? + $next = $phpcsFile->findNext(T_WHITESPACE, ($openingBrace + 1), null, true); + if ($tokens[$next]['line'] === $tokens[$openingBrace]['line']) { + if ($next === $tokens[$stackPtr]['scope_closer']) { + // Ignore empty classes. + return; + } + + $error = 'Opening brace must be the last content on the line'; + $fix = $phpcsFile->addFixableError($error, $openingBrace, 'ContentAfterBrace'); + if ($fix === true) { + $phpcsFile->fixer->addNewline($openingBrace); + } + } + + // Only continue checking if the opening brace looks good. + if ($lineDifference > 0) { + return; + } + + // Is there precisely one space before the opening brace ? + if ($tokens[($openingBrace - 1)]['code'] !== T_WHITESPACE) { + $length = 0; + } else if ($tokens[($openingBrace - 1)]['content'] === "\t") { + $length = '\t'; + } else { + $length = $tokens[($openingBrace - 1)]['length']; + } + + if ($length !== 1) { + $error = 'Expected 1 space before opening brace; found %s'; + $data = [$length]; + $fix = $phpcsFile->addFixableError($error, $openingBrace, 'SpaceBeforeBrace', $data); + if ($fix === true) { + if ($length === 0 || $length === '\t') { + $phpcsFile->fixer->addContentBefore($openingBrace, ' '); + } else { + $phpcsFile->fixer->replaceToken(($openingBrace - 1), ' '); + } + } + } + + }//end process() + + +}//end class diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/Generic/Sniffs/CodeAnalysis/AssignmentInConditionSniff.php b/vendor/squizlabs/php_codesniffer/src/Standards/Generic/Sniffs/CodeAnalysis/AssignmentInConditionSniff.php new file mode 100644 index 00000000..8788a912 --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/Generic/Sniffs/CodeAnalysis/AssignmentInConditionSniff.php @@ -0,0 +1,171 @@ + + * @copyright 2017 Juliette Reinders Folmer. All rights reserved. + * @license https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence + */ + +namespace PHP_CodeSniffer\Standards\Generic\Sniffs\CodeAnalysis; + +use PHP_CodeSniffer\Files\File; +use PHP_CodeSniffer\Sniffs\Sniff; +use PHP_CodeSniffer\Util\Tokens; + +class AssignmentInConditionSniff implements Sniff +{ + + /** + * Assignment tokens to trigger on. + * + * Set in the register() method. + * + * @var array + */ + protected $assignmentTokens = []; + + /** + * The tokens that indicate the start of a condition. + * + * @var array + */ + protected $conditionStartTokens = []; + + + /** + * Registers the tokens that this sniff wants to listen for. + * + * @return int[] + */ + public function register() + { + $this->assignmentTokens = Tokens::$assignmentTokens; + unset($this->assignmentTokens[T_DOUBLE_ARROW]); + + $starters = Tokens::$booleanOperators; + $starters[T_SEMICOLON] = T_SEMICOLON; + $starters[T_OPEN_PARENTHESIS] = T_OPEN_PARENTHESIS; + + $this->conditionStartTokens = $starters; + + return [ + T_IF, + T_ELSEIF, + T_FOR, + T_SWITCH, + T_CASE, + T_WHILE, + T_MATCH, + ]; + + }//end register() + + + /** + * Processes this test, when one of its tokens is encountered. + * + * @param \PHP_CodeSniffer\Files\File $phpcsFile The file being scanned. + * @param int $stackPtr The position of the current token + * in the stack passed in $tokens. + * + * @return void + */ + public function process(File $phpcsFile, $stackPtr) + { + $tokens = $phpcsFile->getTokens(); + $token = $tokens[$stackPtr]; + + // Find the condition opener/closer. + if ($token['code'] === T_FOR) { + if (isset($token['parenthesis_opener'], $token['parenthesis_closer']) === false) { + return; + } + + $semicolon = $phpcsFile->findNext(T_SEMICOLON, ($token['parenthesis_opener'] + 1), ($token['parenthesis_closer'])); + if ($semicolon === false) { + return; + } + + $opener = $semicolon; + + $semicolon = $phpcsFile->findNext(T_SEMICOLON, ($opener + 1), ($token['parenthesis_closer'])); + if ($semicolon === false) { + return; + } + + $closer = $semicolon; + unset($semicolon); + } else if ($token['code'] === T_CASE) { + if (isset($token['scope_opener']) === false) { + return; + } + + $opener = $stackPtr; + $closer = $token['scope_opener']; + } else { + if (isset($token['parenthesis_opener'], $token['parenthesis_closer']) === false) { + return; + } + + $opener = $token['parenthesis_opener']; + $closer = $token['parenthesis_closer']; + }//end if + + $startPos = $opener; + + do { + $hasAssignment = $phpcsFile->findNext($this->assignmentTokens, ($startPos + 1), $closer); + if ($hasAssignment === false) { + return; + } + + // Examine whether the left side is a variable. + $hasVariable = false; + $conditionStart = $startPos; + $altConditionStart = $phpcsFile->findPrevious($this->conditionStartTokens, ($hasAssignment - 1), $startPos); + if ($altConditionStart !== false) { + $conditionStart = $altConditionStart; + } + + for ($i = $hasAssignment; $i > $conditionStart; $i--) { + if (isset(Tokens::$emptyTokens[$tokens[$i]['code']]) === true) { + continue; + } + + // If this is a variable or array, we've seen all we need to see. + if ($tokens[$i]['code'] === T_VARIABLE || $tokens[$i]['code'] === T_CLOSE_SQUARE_BRACKET) { + $hasVariable = true; + break; + } + + // If this is a function call or something, we are OK. + if ($tokens[$i]['code'] === T_CLOSE_PARENTHESIS) { + break; + } + } + + if ($hasVariable === true) { + $errorCode = 'Found'; + if ($token['code'] === T_WHILE) { + $errorCode = 'FoundInWhileCondition'; + } + + $phpcsFile->addWarning( + 'Variable assignment found within a condition. Did you mean to do a comparison ?', + $hasAssignment, + $errorCode + ); + } + + $startPos = $hasAssignment; + } while ($startPos < $closer); + + }//end process() + + +}//end class diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/Generic/Sniffs/CodeAnalysis/EmptyPHPStatementSniff.php b/vendor/squizlabs/php_codesniffer/src/Standards/Generic/Sniffs/CodeAnalysis/EmptyPHPStatementSniff.php new file mode 100644 index 00000000..1c9e4000 --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/Generic/Sniffs/CodeAnalysis/EmptyPHPStatementSniff.php @@ -0,0 +1,162 @@ + + * @copyright 2017 Juliette Reinders Folmer. All rights reserved. + * @license https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence + */ + +namespace PHP_CodeSniffer\Standards\Generic\Sniffs\CodeAnalysis; + +use PHP_CodeSniffer\Files\File; +use PHP_CodeSniffer\Sniffs\Sniff; +use PHP_CodeSniffer\Util\Tokens; + +class EmptyPHPStatementSniff implements Sniff +{ + + + /** + * Returns an array of tokens this test wants to listen for. + * + * @return int[] + */ + public function register() + { + return [ + T_SEMICOLON, + T_CLOSE_TAG, + ]; + + }//end register() + + + /** + * Processes this test, when one of its tokens is encountered. + * + * @param \PHP_CodeSniffer\Files\File $phpcsFile The file being scanned. + * @param int $stackPtr The position of the current token + * in the stack passed in $tokens. + * + * @return void + */ + public function process(File $phpcsFile, $stackPtr) + { + $tokens = $phpcsFile->getTokens(); + + switch ($tokens[$stackPtr]['type']) { + // Detect `something();;`. + case 'T_SEMICOLON': + $prevNonEmpty = $phpcsFile->findPrevious(Tokens::$emptyTokens, ($stackPtr - 1), null, true); + + if ($prevNonEmpty === false) { + return; + } + + if ($tokens[$prevNonEmpty]['code'] !== T_SEMICOLON + && $tokens[$prevNonEmpty]['code'] !== T_OPEN_TAG + && $tokens[$prevNonEmpty]['code'] !== T_OPEN_TAG_WITH_ECHO + ) { + if (isset($tokens[$prevNonEmpty]['scope_condition']) === false) { + return; + } + + if ($tokens[$prevNonEmpty]['scope_opener'] !== $prevNonEmpty + && $tokens[$prevNonEmpty]['code'] !== T_CLOSE_CURLY_BRACKET + ) { + return; + } + + $scopeOwner = $tokens[$tokens[$prevNonEmpty]['scope_condition']]['code']; + if ($scopeOwner === T_CLOSURE || $scopeOwner === T_ANON_CLASS || $scopeOwner === T_MATCH) { + return; + } + + // Else, it's something like `if (foo) {};` and the semi-colon is not needed. + } + + if (isset($tokens[$stackPtr]['nested_parenthesis']) === true) { + $nested = $tokens[$stackPtr]['nested_parenthesis']; + $lastCloser = array_pop($nested); + if (isset($tokens[$lastCloser]['parenthesis_owner']) === true + && $tokens[$tokens[$lastCloser]['parenthesis_owner']]['code'] === T_FOR + ) { + // Empty for() condition. + return; + } + } + + $fix = $phpcsFile->addFixableWarning( + 'Empty PHP statement detected: superfluous semi-colon.', + $stackPtr, + 'SemicolonWithoutCodeDetected' + ); + if ($fix === true) { + $phpcsFile->fixer->beginChangeset(); + + if ($tokens[$prevNonEmpty]['code'] === T_OPEN_TAG + || $tokens[$prevNonEmpty]['code'] === T_OPEN_TAG_WITH_ECHO + ) { + // Check for superfluous whitespace after the semi-colon which will be + // removed as the `fixer->replaceToken(($stackPtr + 1), $replacement); + } + } + + for ($i = $stackPtr; $i > $prevNonEmpty; $i--) { + if ($tokens[$i]['code'] !== T_SEMICOLON + && $tokens[$i]['code'] !== T_WHITESPACE + ) { + break; + } + + $phpcsFile->fixer->replaceToken($i, ''); + } + + $phpcsFile->fixer->endChangeset(); + }//end if + break; + + // Detect ``. + case 'T_CLOSE_TAG': + $prevNonEmpty = $phpcsFile->findPrevious(T_WHITESPACE, ($stackPtr - 1), null, true); + + if ($prevNonEmpty === false + || ($tokens[$prevNonEmpty]['code'] !== T_OPEN_TAG + && $tokens[$prevNonEmpty]['code'] !== T_OPEN_TAG_WITH_ECHO) + ) { + return; + } + + $fix = $phpcsFile->addFixableWarning( + 'Empty PHP open/close tag combination detected.', + $prevNonEmpty, + 'EmptyPHPOpenCloseTagsDetected' + ); + if ($fix === true) { + $phpcsFile->fixer->beginChangeset(); + + for ($i = $prevNonEmpty; $i <= $stackPtr; $i++) { + $phpcsFile->fixer->replaceToken($i, ''); + } + + $phpcsFile->fixer->endChangeset(); + } + break; + + default: + // Deliberately left empty. + break; + }//end switch + + }//end process() + + +}//end class diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/Generic/Sniffs/CodeAnalysis/EmptyStatementSniff.php b/vendor/squizlabs/php_codesniffer/src/Standards/Generic/Sniffs/CodeAnalysis/EmptyStatementSniff.php new file mode 100644 index 00000000..574bb0ba --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/Generic/Sniffs/CodeAnalysis/EmptyStatementSniff.php @@ -0,0 +1,97 @@ + + * stmt { + * // foo + * } + * stmt (conditions) { + * // foo + * } + * + * + * @author Manuel Pichler + * @author Greg Sherwood + * @copyright 2007-2014 Manuel Pichler. All rights reserved. + * @license https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence + */ + +namespace PHP_CodeSniffer\Standards\Generic\Sniffs\CodeAnalysis; + +use PHP_CodeSniffer\Files\File; +use PHP_CodeSniffer\Sniffs\Sniff; +use PHP_CodeSniffer\Util\Tokens; + +class EmptyStatementSniff implements Sniff +{ + + + /** + * Registers the tokens that this sniff wants to listen for. + * + * @return int[] + */ + public function register() + { + return [ + T_TRY, + T_CATCH, + T_FINALLY, + T_DO, + T_ELSE, + T_ELSEIF, + T_FOR, + T_FOREACH, + T_IF, + T_SWITCH, + T_WHILE, + T_MATCH, + ]; + + }//end register() + + + /** + * Processes this test, when one of its tokens is encountered. + * + * @param \PHP_CodeSniffer\Files\File $phpcsFile The file being scanned. + * @param int $stackPtr The position of the current token + * in the stack passed in $tokens. + * + * @return void + */ + public function process(File $phpcsFile, $stackPtr) + { + $tokens = $phpcsFile->getTokens(); + $token = $tokens[$stackPtr]; + + // Skip statements without a body. + if (isset($token['scope_opener']) === false) { + return; + } + + $next = $phpcsFile->findNext( + Tokens::$emptyTokens, + ($token['scope_opener'] + 1), + ($token['scope_closer'] - 1), + true + ); + + if ($next !== false) { + return; + } + + // Get token identifier. + $name = strtoupper($token['content']); + $error = 'Empty %s statement detected'; + $phpcsFile->addError($error, $stackPtr, 'Detected'.ucfirst(strtolower($name)), [$name]); + + }//end process() + + +}//end class diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/Generic/Sniffs/CodeAnalysis/ForLoopShouldBeWhileLoopSniff.php b/vendor/squizlabs/php_codesniffer/src/Standards/Generic/Sniffs/CodeAnalysis/ForLoopShouldBeWhileLoopSniff.php new file mode 100644 index 00000000..f583e938 --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/Generic/Sniffs/CodeAnalysis/ForLoopShouldBeWhileLoopSniff.php @@ -0,0 +1,91 @@ + + * class Foo + * { + * public function bar($x) + * { + * for (;true;) true; // No Init or Update part, may as well be: while (true) + * } + * } + * + * + * @author Manuel Pichler + * @copyright 2007-2014 Manuel Pichler. All rights reserved. + * @license https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence + */ + +namespace PHP_CodeSniffer\Standards\Generic\Sniffs\CodeAnalysis; + +use PHP_CodeSniffer\Files\File; +use PHP_CodeSniffer\Sniffs\Sniff; +use PHP_CodeSniffer\Util\Tokens; + +class ForLoopShouldBeWhileLoopSniff implements Sniff +{ + + + /** + * Registers the tokens that this sniff wants to listen for. + * + * @return int[] + */ + public function register() + { + return [T_FOR]; + + }//end register() + + + /** + * Processes this test, when one of its tokens is encountered. + * + * @param \PHP_CodeSniffer\Files\File $phpcsFile The file being scanned. + * @param int $stackPtr The position of the current token + * in the stack passed in $tokens. + * + * @return void + */ + public function process(File $phpcsFile, $stackPtr) + { + $tokens = $phpcsFile->getTokens(); + $token = $tokens[$stackPtr]; + + // Skip invalid statement. + if (isset($token['parenthesis_opener']) === false) { + return; + } + + $next = ++$token['parenthesis_opener']; + $end = --$token['parenthesis_closer']; + + $parts = [ + 0, + 0, + 0, + ]; + $index = 0; + + for (; $next <= $end; ++$next) { + $code = $tokens[$next]['code']; + if ($code === T_SEMICOLON) { + ++$index; + } else if (isset(Tokens::$emptyTokens[$code]) === false) { + ++$parts[$index]; + } + } + + if ($parts[0] === 0 && $parts[2] === 0 && $parts[1] > 0) { + $error = 'This FOR loop can be simplified to a WHILE loop'; + $phpcsFile->addWarning($error, $stackPtr, 'CanSimplify'); + } + + }//end process() + + +}//end class diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/Generic/Sniffs/CodeAnalysis/ForLoopWithTestFunctionCallSniff.php b/vendor/squizlabs/php_codesniffer/src/Standards/Generic/Sniffs/CodeAnalysis/ForLoopWithTestFunctionCallSniff.php new file mode 100644 index 00000000..62a07b26 --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/Generic/Sniffs/CodeAnalysis/ForLoopWithTestFunctionCallSniff.php @@ -0,0 +1,101 @@ + + * class Foo + * { + * public function bar($x) + * { + * $a = array(1, 2, 3, 4); + * for ($i = 0; $i < count($a); $i++) { + * $a[$i] *= $i; + * } + * } + * } + * + * + * @author Greg Sherwood + * @author Manuel Pichler + * @copyright 2007-2014 Manuel Pichler. All rights reserved. + * @license https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence + */ + +namespace PHP_CodeSniffer\Standards\Generic\Sniffs\CodeAnalysis; + +use PHP_CodeSniffer\Files\File; +use PHP_CodeSniffer\Sniffs\Sniff; +use PHP_CodeSniffer\Util\Tokens; + +class ForLoopWithTestFunctionCallSniff implements Sniff +{ + + + /** + * Registers the tokens that this sniff wants to listen for. + * + * @return int[] + */ + public function register() + { + return [T_FOR]; + + }//end register() + + + /** + * Processes this test, when one of its tokens is encountered. + * + * @param \PHP_CodeSniffer\Files\File $phpcsFile The file being scanned. + * @param int $stackPtr The position of the current token + * in the stack passed in $tokens. + * + * @return void + */ + public function process(File $phpcsFile, $stackPtr) + { + $tokens = $phpcsFile->getTokens(); + $token = $tokens[$stackPtr]; + + // Skip invalid statement. + if (isset($token['parenthesis_opener']) === false) { + return; + } + + $next = ++$token['parenthesis_opener']; + $end = --$token['parenthesis_closer']; + + $position = 0; + + for (; $next <= $end; ++$next) { + $code = $tokens[$next]['code']; + if ($code === T_SEMICOLON) { + ++$position; + } + + if ($position < 1) { + continue; + } else if ($position > 1) { + break; + } else if ($code !== T_VARIABLE && $code !== T_STRING) { + continue; + } + + // Find next non empty token, if it is a open curly brace we have a + // function call. + $index = $phpcsFile->findNext(Tokens::$emptyTokens, ($next + 1), null, true); + + if ($tokens[$index]['code'] === T_OPEN_PARENTHESIS) { + $error = 'Avoid function calls in a FOR loop test part'; + $phpcsFile->addWarning($error, $stackPtr, 'NotAllowed'); + break; + } + }//end for + + }//end process() + + +}//end class diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/Generic/Sniffs/CodeAnalysis/JumbledIncrementerSniff.php b/vendor/squizlabs/php_codesniffer/src/Standards/Generic/Sniffs/CodeAnalysis/JumbledIncrementerSniff.php new file mode 100644 index 00000000..364658db --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/Generic/Sniffs/CodeAnalysis/JumbledIncrementerSniff.php @@ -0,0 +1,134 @@ + + * class Foo + * { + * public function bar($x) + * { + * for ($i = 0; $i < 10; $i++) + * { + * for ($k = 0; $k < 20; $i++) + * { + * echo 'Hello'; + * } + * } + * } + * } + * + * + * @author Manuel Pichler + * @copyright 2007-2014 Manuel Pichler. All rights reserved. + * @license https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence + */ + +namespace PHP_CodeSniffer\Standards\Generic\Sniffs\CodeAnalysis; + +use PHP_CodeSniffer\Files\File; +use PHP_CodeSniffer\Sniffs\Sniff; + +class JumbledIncrementerSniff implements Sniff +{ + + + /** + * Registers the tokens that this sniff wants to listen for. + * + * @return int[] + */ + public function register() + { + return [T_FOR]; + + }//end register() + + + /** + * Processes this test, when one of its tokens is encountered. + * + * @param \PHP_CodeSniffer\Files\File $phpcsFile The file being scanned. + * @param int $stackPtr The position of the current token + * in the stack passed in $tokens. + * + * @return void + */ + public function process(File $phpcsFile, $stackPtr) + { + $tokens = $phpcsFile->getTokens(); + $token = $tokens[$stackPtr]; + + // Skip for-loop without body. + if (isset($token['scope_opener']) === false) { + return; + } + + // Find incrementors for outer loop. + $outer = $this->findIncrementers($tokens, $token); + + // Skip if empty. + if (count($outer) === 0) { + return; + } + + // Find nested for loops. + $start = ++$token['scope_opener']; + $end = --$token['scope_closer']; + + for (; $start <= $end; ++$start) { + if ($tokens[$start]['code'] !== T_FOR) { + continue; + } + + $inner = $this->findIncrementers($tokens, $tokens[$start]); + $diff = array_intersect($outer, $inner); + + if (count($diff) !== 0) { + $error = 'Loop incrementor (%s) jumbling with inner loop'; + $data = [join(', ', $diff)]; + $phpcsFile->addWarning($error, $stackPtr, 'Found', $data); + } + } + + }//end process() + + + /** + * Get all used variables in the incrementer part of a for statement. + * + * @param array(integer=>array) $tokens Array with all code sniffer tokens. + * @param array(string=>mixed) $token Current for loop token + * + * @return string[] List of all found incrementer variables. + */ + protected function findIncrementers(array $tokens, array $token) + { + // Skip invalid statement. + if (isset($token['parenthesis_opener']) === false) { + return []; + } + + $start = ++$token['parenthesis_opener']; + $end = --$token['parenthesis_closer']; + + $incrementers = []; + $semicolons = 0; + for ($next = $start; $next <= $end; ++$next) { + $code = $tokens[$next]['code']; + if ($code === T_SEMICOLON) { + ++$semicolons; + } else if ($semicolons === 2 && $code === T_VARIABLE) { + $incrementers[] = $tokens[$next]['content']; + } + } + + return $incrementers; + + }//end findIncrementers() + + +}//end class diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/Generic/Sniffs/CodeAnalysis/UnconditionalIfStatementSniff.php b/vendor/squizlabs/php_codesniffer/src/Standards/Generic/Sniffs/CodeAnalysis/UnconditionalIfStatementSniff.php new file mode 100644 index 00000000..cc9958c5 --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/Generic/Sniffs/CodeAnalysis/UnconditionalIfStatementSniff.php @@ -0,0 +1,93 @@ +true or false + * + * + * class Foo + * { + * public function close() + * { + * if (true) + * { + * // ... + * } + * } + * } + * + * + * @author Manuel Pichler + * @copyright 2007-2014 Manuel Pichler. All rights reserved. + * @license https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence + */ + +namespace PHP_CodeSniffer\Standards\Generic\Sniffs\CodeAnalysis; + +use PHP_CodeSniffer\Files\File; +use PHP_CodeSniffer\Sniffs\Sniff; +use PHP_CodeSniffer\Util\Tokens; + +class UnconditionalIfStatementSniff implements Sniff +{ + + + /** + * Registers the tokens that this sniff wants to listen for. + * + * @return int[] + */ + public function register() + { + return [ + T_IF, + T_ELSEIF, + ]; + + }//end register() + + + /** + * Processes this test, when one of its tokens is encountered. + * + * @param \PHP_CodeSniffer\Files\File $phpcsFile The file being scanned. + * @param int $stackPtr The position of the current token + * in the stack passed in $tokens. + * + * @return void + */ + public function process(File $phpcsFile, $stackPtr) + { + $tokens = $phpcsFile->getTokens(); + $token = $tokens[$stackPtr]; + + // Skip if statement without body. + if (isset($token['parenthesis_opener']) === false) { + return; + } + + $next = ++$token['parenthesis_opener']; + $end = --$token['parenthesis_closer']; + + $goodCondition = false; + for (; $next <= $end; ++$next) { + $code = $tokens[$next]['code']; + + if (isset(Tokens::$emptyTokens[$code]) === true) { + continue; + } else if ($code !== T_TRUE && $code !== T_FALSE) { + $goodCondition = true; + } + } + + if ($goodCondition === false) { + $error = 'Avoid IF statements that are always true or false'; + $phpcsFile->addWarning($error, $stackPtr, 'Found'); + } + + }//end process() + + +}//end class diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/Generic/Sniffs/CodeAnalysis/UnnecessaryFinalModifierSniff.php b/vendor/squizlabs/php_codesniffer/src/Standards/Generic/Sniffs/CodeAnalysis/UnnecessaryFinalModifierSniff.php new file mode 100644 index 00000000..bed67c93 --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/Generic/Sniffs/CodeAnalysis/UnnecessaryFinalModifierSniff.php @@ -0,0 +1,85 @@ + + * final class Foo + * { + * public final function bar() + * { + * } + * } + * + * + * @author Manuel Pichler + * @copyright 2007-2014 Manuel Pichler. All rights reserved. + * @license https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence + */ + +namespace PHP_CodeSniffer\Standards\Generic\Sniffs\CodeAnalysis; + +use PHP_CodeSniffer\Files\File; +use PHP_CodeSniffer\Sniffs\Sniff; +use PHP_CodeSniffer\Util\Tokens; + +class UnnecessaryFinalModifierSniff implements Sniff +{ + + + /** + * Registers the tokens that this sniff wants to listen for. + * + * @return int[] + */ + public function register() + { + return [T_CLASS]; + + }//end register() + + + /** + * Processes this test, when one of its tokens is encountered. + * + * @param \PHP_CodeSniffer\Files\File $phpcsFile The file being scanned. + * @param int $stackPtr The position of the current token + * in the stack passed in $tokens. + * + * @return void + */ + public function process(File $phpcsFile, $stackPtr) + { + $tokens = $phpcsFile->getTokens(); + $token = $tokens[$stackPtr]; + + // Skip for-statements without body. + if (isset($token['scope_opener']) === false) { + return; + } + + // Fetch previous token. + $prev = $phpcsFile->findPrevious(Tokens::$emptyTokens, ($stackPtr - 1), null, true); + + // Skip for non final class. + if ($prev === false || $tokens[$prev]['code'] !== T_FINAL) { + return; + } + + $next = ++$token['scope_opener']; + $end = --$token['scope_closer']; + + for (; $next <= $end; ++$next) { + if ($tokens[$next]['code'] === T_FINAL) { + $error = 'Unnecessary FINAL modifier in FINAL class'; + $phpcsFile->addWarning($error, $next, 'Found'); + } + } + + }//end process() + + +}//end class diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/Generic/Sniffs/CodeAnalysis/UnusedFunctionParameterSniff.php b/vendor/squizlabs/php_codesniffer/src/Standards/Generic/Sniffs/CodeAnalysis/UnusedFunctionParameterSniff.php new file mode 100644 index 00000000..58aa29fe --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/Generic/Sniffs/CodeAnalysis/UnusedFunctionParameterSniff.php @@ -0,0 +1,265 @@ + + * @author Greg Sherwood + * @copyright 2007-2014 Manuel Pichler. All rights reserved. + * @license https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence + */ + +namespace PHP_CodeSniffer\Standards\Generic\Sniffs\CodeAnalysis; + +use PHP_CodeSniffer\Files\File; +use PHP_CodeSniffer\Sniffs\Sniff; +use PHP_CodeSniffer\Util\Tokens; + +class UnusedFunctionParameterSniff implements Sniff +{ + + /** + * The list of class type hints which will be ignored. + * + * @var array + */ + public $ignoreTypeHints = []; + + + /** + * Returns an array of tokens this test wants to listen for. + * + * @return array + */ + public function register() + { + return [ + T_FUNCTION, + T_CLOSURE, + T_FN, + ]; + + }//end register() + + + /** + * Processes this test, when one of its tokens is encountered. + * + * @param \PHP_CodeSniffer\Files\File $phpcsFile The file being scanned. + * @param int $stackPtr The position of the current token + * in the stack passed in $tokens. + * + * @return void + */ + public function process(File $phpcsFile, $stackPtr) + { + $tokens = $phpcsFile->getTokens(); + $token = $tokens[$stackPtr]; + + // Skip broken function declarations. + if (isset($token['scope_opener']) === false || isset($token['parenthesis_opener']) === false) { + return; + } + + $errorCode = 'Found'; + $implements = false; + $extends = false; + $classPtr = $phpcsFile->getCondition($stackPtr, T_CLASS); + if ($classPtr !== false) { + $implements = $phpcsFile->findImplementedInterfaceNames($classPtr); + $extends = $phpcsFile->findExtendedClassName($classPtr); + if ($extends !== false) { + $errorCode .= 'InExtendedClass'; + } else if ($implements !== false) { + $errorCode .= 'InImplementedInterface'; + } + } + + $params = []; + $methodParams = $phpcsFile->getMethodParameters($stackPtr); + + // Skip when no parameters found. + $methodParamsCount = count($methodParams); + if ($methodParamsCount === 0) { + return; + } + + foreach ($methodParams as $param) { + if (isset($param['property_visibility']) === true) { + // Ignore constructor property promotion. + continue; + } + + $params[$param['name']] = $stackPtr; + } + + $next = ++$token['scope_opener']; + $end = --$token['scope_closer']; + + // Check the end token for arrow functions as + // they can end at a content token due to not having + // a clearly defined closing token. + if ($token['code'] === T_FN) { + ++$end; + } + + $foundContent = false; + $validTokens = [ + T_HEREDOC => T_HEREDOC, + T_NOWDOC => T_NOWDOC, + T_END_HEREDOC => T_END_HEREDOC, + T_END_NOWDOC => T_END_NOWDOC, + T_DOUBLE_QUOTED_STRING => T_DOUBLE_QUOTED_STRING, + ]; + $validTokens += Tokens::$emptyTokens; + + for (; $next <= $end; ++$next) { + $token = $tokens[$next]; + $code = $token['code']; + + // Ignorable tokens. + if (isset(Tokens::$emptyTokens[$code]) === true) { + continue; + } + + if ($foundContent === false) { + // A throw statement as the first content indicates an interface method. + if ($code === T_THROW && $implements !== false) { + return; + } + + // A return statement as the first content indicates an interface method. + if ($code === T_RETURN) { + $tmp = $phpcsFile->findNext(Tokens::$emptyTokens, ($next + 1), null, true); + if ($tmp === false && $implements !== false) { + return; + } + + // There is a return. + if ($tokens[$tmp]['code'] === T_SEMICOLON && $implements !== false) { + return; + } + + $tmp = $phpcsFile->findNext(Tokens::$emptyTokens, ($tmp + 1), null, true); + if ($tmp !== false && $tokens[$tmp]['code'] === T_SEMICOLON && $implements !== false) { + // There is a return . + return; + } + }//end if + }//end if + + $foundContent = true; + + if ($code === T_VARIABLE && isset($params[$token['content']]) === true) { + unset($params[$token['content']]); + } else if ($code === T_DOLLAR) { + $nextToken = $phpcsFile->findNext(T_WHITESPACE, ($next + 1), null, true); + if ($tokens[$nextToken]['code'] === T_OPEN_CURLY_BRACKET) { + $nextToken = $phpcsFile->findNext(T_WHITESPACE, ($nextToken + 1), null, true); + if ($tokens[$nextToken]['code'] === T_STRING) { + $varContent = '$'.$tokens[$nextToken]['content']; + if (isset($params[$varContent]) === true) { + unset($params[$varContent]); + } + } + } + } else if ($code === T_DOUBLE_QUOTED_STRING + || $code === T_START_HEREDOC + || $code === T_START_NOWDOC + ) { + // Tokenize strings that can contain variables. + // Make sure the string is re-joined if it occurs over multiple lines. + $content = $token['content']; + for ($i = ($next + 1); $i <= $end; $i++) { + if (isset($validTokens[$tokens[$i]['code']]) === true) { + $content .= $tokens[$i]['content']; + $next++; + } else { + break; + } + } + + $stringTokens = token_get_all(sprintf('', $content)); + foreach ($stringTokens as $stringPtr => $stringToken) { + if (is_array($stringToken) === false) { + continue; + } + + $varContent = ''; + if ($stringToken[0] === T_DOLLAR_OPEN_CURLY_BRACES) { + $varContent = '$'.$stringTokens[($stringPtr + 1)][1]; + } else if ($stringToken[0] === T_VARIABLE) { + $varContent = $stringToken[1]; + } + + if ($varContent !== '' && isset($params[$varContent]) === true) { + unset($params[$varContent]); + } + } + }//end if + }//end for + + if ($foundContent === true && count($params) > 0) { + $error = 'The method parameter %s is never used'; + + // If there is only one parameter and it is unused, no need for additional errorcode toggling logic. + if ($methodParamsCount === 1) { + foreach ($params as $paramName => $position) { + if (in_array($methodParams[0]['type_hint'], $this->ignoreTypeHints, true) === true) { + continue; + } + + $data = [$paramName]; + $phpcsFile->addWarning($error, $position, $errorCode, $data); + } + + return; + } + + $foundLastUsed = false; + $lastIndex = ($methodParamsCount - 1); + $errorInfo = []; + for ($i = $lastIndex; $i >= 0; --$i) { + if ($foundLastUsed !== false) { + if (isset($params[$methodParams[$i]['name']]) === true) { + $errorInfo[$methodParams[$i]['name']] = [ + 'position' => $params[$methodParams[$i]['name']], + 'errorcode' => $errorCode.'BeforeLastUsed', + 'typehint' => $methodParams[$i]['type_hint'], + ]; + } + } else { + if (isset($params[$methodParams[$i]['name']]) === false) { + $foundLastUsed = true; + } else { + $errorInfo[$methodParams[$i]['name']] = [ + 'position' => $params[$methodParams[$i]['name']], + 'errorcode' => $errorCode.'AfterLastUsed', + 'typehint' => $methodParams[$i]['type_hint'], + ]; + } + } + }//end for + + if (count($errorInfo) > 0) { + $errorInfo = array_reverse($errorInfo); + foreach ($errorInfo as $paramName => $info) { + if (in_array($info['typehint'], $this->ignoreTypeHints, true) === true) { + continue; + } + + $data = [$paramName]; + $phpcsFile->addWarning($error, $info['position'], $info['errorcode'], $data); + } + } + }//end if + + }//end process() + + +}//end class diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/Generic/Sniffs/CodeAnalysis/UselessOverridingMethodSniff.php b/vendor/squizlabs/php_codesniffer/src/Standards/Generic/Sniffs/CodeAnalysis/UselessOverridingMethodSniff.php new file mode 100644 index 00000000..fded9295 --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/Generic/Sniffs/CodeAnalysis/UselessOverridingMethodSniff.php @@ -0,0 +1,161 @@ + + * class FooBar { + * public function __construct($a, $b) { + * parent::__construct($a, $b); + * } + * } + * + * + * @author Manuel Pichler + * @copyright 2007-2014 Manuel Pichler. All rights reserved. + * @license https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence + */ + +namespace PHP_CodeSniffer\Standards\Generic\Sniffs\CodeAnalysis; + +use PHP_CodeSniffer\Files\File; +use PHP_CodeSniffer\Sniffs\Sniff; +use PHP_CodeSniffer\Util\Tokens; + +class UselessOverridingMethodSniff implements Sniff +{ + + + /** + * Registers the tokens that this sniff wants to listen for. + * + * @return int[] + */ + public function register() + { + return [T_FUNCTION]; + + }//end register() + + + /** + * Processes this test, when one of its tokens is encountered. + * + * @param \PHP_CodeSniffer\Files\File $phpcsFile The file being scanned. + * @param int $stackPtr The position of the current token + * in the stack passed in $tokens. + * + * @return void + */ + public function process(File $phpcsFile, $stackPtr) + { + $tokens = $phpcsFile->getTokens(); + $token = $tokens[$stackPtr]; + + // Skip function without body. + if (isset($token['scope_opener']) === false) { + return; + } + + // Get function name. + $methodName = $phpcsFile->getDeclarationName($stackPtr); + + // Get all parameters from method signature. + $signature = []; + foreach ($phpcsFile->getMethodParameters($stackPtr) as $param) { + $signature[] = $param['name']; + } + + $next = ++$token['scope_opener']; + $end = --$token['scope_closer']; + + for (; $next <= $end; ++$next) { + $code = $tokens[$next]['code']; + + if (isset(Tokens::$emptyTokens[$code]) === true) { + continue; + } else if ($code === T_RETURN) { + continue; + } + + break; + } + + // Any token except 'parent' indicates correct code. + if ($tokens[$next]['code'] !== T_PARENT) { + return; + } + + // Find next non empty token index, should be double colon. + $next = $phpcsFile->findNext(Tokens::$emptyTokens, ($next + 1), null, true); + + // Skip for invalid code. + if ($next === false || $tokens[$next]['code'] !== T_DOUBLE_COLON) { + return; + } + + // Find next non empty token index, should be the function name. + $next = $phpcsFile->findNext(Tokens::$emptyTokens, ($next + 1), null, true); + + // Skip for invalid code or other method. + if ($next === false || $tokens[$next]['content'] !== $methodName) { + return; + } + + // Find next non empty token index, should be the open parenthesis. + $next = $phpcsFile->findNext(Tokens::$emptyTokens, ($next + 1), null, true); + + // Skip for invalid code. + if ($next === false || $tokens[$next]['code'] !== T_OPEN_PARENTHESIS) { + return; + } + + $parameters = ['']; + $parenthesisCount = 1; + $count = count($tokens); + for (++$next; $next < $count; ++$next) { + $code = $tokens[$next]['code']; + + if ($code === T_OPEN_PARENTHESIS) { + ++$parenthesisCount; + } else if ($code === T_CLOSE_PARENTHESIS) { + --$parenthesisCount; + } else if ($parenthesisCount === 1 && $code === T_COMMA) { + $parameters[] = ''; + } else if (isset(Tokens::$emptyTokens[$code]) === false) { + $parameters[(count($parameters) - 1)] .= $tokens[$next]['content']; + } + + if ($parenthesisCount === 0) { + break; + } + }//end for + + $next = $phpcsFile->findNext(Tokens::$emptyTokens, ($next + 1), null, true); + if ($next === false || $tokens[$next]['code'] !== T_SEMICOLON) { + return; + } + + // Check rest of the scope. + for (++$next; $next <= $end; ++$next) { + $code = $tokens[$next]['code']; + // Skip for any other content. + if (isset(Tokens::$emptyTokens[$code]) === false) { + return; + } + } + + $parameters = array_map('trim', $parameters); + $parameters = array_filter($parameters); + + if (count($parameters) === count($signature) && $parameters === $signature) { + $phpcsFile->addWarning('Possible useless method overriding detected', $stackPtr, 'Found'); + } + + }//end process() + + +}//end class diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/Generic/Sniffs/Commenting/DocCommentSniff.php b/vendor/squizlabs/php_codesniffer/src/Standards/Generic/Sniffs/Commenting/DocCommentSniff.php new file mode 100644 index 00000000..545319be --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/Generic/Sniffs/Commenting/DocCommentSniff.php @@ -0,0 +1,353 @@ + + * @copyright 2006-2015 Squiz Pty Ltd (ABN 77 084 670 600) + * @license https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence + */ + +namespace PHP_CodeSniffer\Standards\Generic\Sniffs\Commenting; + +use PHP_CodeSniffer\Files\File; +use PHP_CodeSniffer\Sniffs\Sniff; + +class DocCommentSniff implements Sniff +{ + + /** + * A list of tokenizers this sniff supports. + * + * @var array + */ + public $supportedTokenizers = [ + 'PHP', + 'JS', + ]; + + + /** + * Returns an array of tokens this test wants to listen for. + * + * @return array + */ + public function register() + { + return [T_DOC_COMMENT_OPEN_TAG]; + + }//end register() + + + /** + * Processes this test, when one of its tokens is encountered. + * + * @param \PHP_CodeSniffer\Files\File $phpcsFile The file being scanned. + * @param int $stackPtr The position of the current token + * in the stack passed in $tokens. + * + * @return void + */ + public function process(File $phpcsFile, $stackPtr) + { + $tokens = $phpcsFile->getTokens(); + + if (isset($tokens[$stackPtr]['comment_closer']) === false + || ($tokens[$tokens[$stackPtr]['comment_closer']]['content'] === '' + && $tokens[$stackPtr]['comment_closer'] === ($phpcsFile->numTokens - 1)) + ) { + // Don't process an unfinished comment during live coding. + return; + } + + $commentStart = $stackPtr; + $commentEnd = $tokens[$stackPtr]['comment_closer']; + + $empty = [ + T_DOC_COMMENT_WHITESPACE, + T_DOC_COMMENT_STAR, + ]; + + $short = $phpcsFile->findNext($empty, ($stackPtr + 1), $commentEnd, true); + if ($short === false) { + // No content at all. + $error = 'Doc comment is empty'; + $phpcsFile->addError($error, $stackPtr, 'Empty'); + return; + } + + // The first line of the comment should just be the /** code. + if ($tokens[$short]['line'] === $tokens[$stackPtr]['line']) { + $error = 'The open comment tag must be the only content on the line'; + $fix = $phpcsFile->addFixableError($error, $stackPtr, 'ContentAfterOpen'); + if ($fix === true) { + $phpcsFile->fixer->beginChangeset(); + $phpcsFile->fixer->addNewline($stackPtr); + $phpcsFile->fixer->addContentBefore($short, '* '); + $phpcsFile->fixer->endChangeset(); + } + } + + // The last line of the comment should just be the */ code. + $prev = $phpcsFile->findPrevious($empty, ($commentEnd - 1), $stackPtr, true); + if ($tokens[$prev]['line'] === $tokens[$commentEnd]['line']) { + $error = 'The close comment tag must be the only content on the line'; + $fix = $phpcsFile->addFixableError($error, $commentEnd, 'ContentBeforeClose'); + if ($fix === true) { + $phpcsFile->fixer->addNewlineBefore($commentEnd); + } + } + + // Check for additional blank lines at the end of the comment. + if ($tokens[$prev]['line'] < ($tokens[$commentEnd]['line'] - 1)) { + $error = 'Additional blank lines found at end of doc comment'; + $fix = $phpcsFile->addFixableError($error, $commentEnd, 'SpacingAfter'); + if ($fix === true) { + $phpcsFile->fixer->beginChangeset(); + for ($i = ($prev + 1); $i < $commentEnd; $i++) { + if ($tokens[($i + 1)]['line'] === $tokens[$commentEnd]['line']) { + break; + } + + $phpcsFile->fixer->replaceToken($i, ''); + } + + $phpcsFile->fixer->endChangeset(); + } + } + + // Check for a comment description. + if ($tokens[$short]['code'] !== T_DOC_COMMENT_STRING) { + $error = 'Missing short description in doc comment'; + $phpcsFile->addError($error, $stackPtr, 'MissingShort'); + } else { + // No extra newline before short description. + if ($tokens[$short]['line'] !== ($tokens[$stackPtr]['line'] + 1)) { + $error = 'Doc comment short description must be on the first line'; + $fix = $phpcsFile->addFixableError($error, $short, 'SpacingBeforeShort'); + if ($fix === true) { + $phpcsFile->fixer->beginChangeset(); + for ($i = $stackPtr; $i < $short; $i++) { + if ($tokens[$i]['line'] === $tokens[$stackPtr]['line']) { + continue; + } else if ($tokens[$i]['line'] === $tokens[$short]['line']) { + break; + } + + $phpcsFile->fixer->replaceToken($i, ''); + } + + $phpcsFile->fixer->endChangeset(); + } + } + + // Account for the fact that a short description might cover + // multiple lines. + $shortContent = $tokens[$short]['content']; + $shortEnd = $short; + for ($i = ($short + 1); $i < $commentEnd; $i++) { + if ($tokens[$i]['code'] === T_DOC_COMMENT_STRING) { + if ($tokens[$i]['line'] === ($tokens[$shortEnd]['line'] + 1)) { + $shortContent .= $tokens[$i]['content']; + $shortEnd = $i; + } else { + break; + } + } + } + + if (preg_match('/^\p{Ll}/u', $shortContent) === 1) { + $error = 'Doc comment short description must start with a capital letter'; + $phpcsFile->addError($error, $short, 'ShortNotCapital'); + } + + $long = $phpcsFile->findNext($empty, ($shortEnd + 1), ($commentEnd - 1), true); + if ($long !== false && $tokens[$long]['code'] === T_DOC_COMMENT_STRING) { + if ($tokens[$long]['line'] !== ($tokens[$shortEnd]['line'] + 2)) { + $error = 'There must be exactly one blank line between descriptions in a doc comment'; + $fix = $phpcsFile->addFixableError($error, $long, 'SpacingBetween'); + if ($fix === true) { + $phpcsFile->fixer->beginChangeset(); + for ($i = ($shortEnd + 1); $i < $long; $i++) { + if ($tokens[$i]['line'] === $tokens[$shortEnd]['line']) { + continue; + } else if ($tokens[$i]['line'] === ($tokens[$long]['line'] - 1)) { + break; + } + + $phpcsFile->fixer->replaceToken($i, ''); + } + + $phpcsFile->fixer->endChangeset(); + } + } + + if (preg_match('/^\p{Ll}/u', $tokens[$long]['content']) === 1) { + $error = 'Doc comment long description must start with a capital letter'; + $phpcsFile->addError($error, $long, 'LongNotCapital'); + } + }//end if + }//end if + + if (empty($tokens[$commentStart]['comment_tags']) === true) { + // No tags in the comment. + return; + } + + $firstTag = $tokens[$commentStart]['comment_tags'][0]; + $prev = $phpcsFile->findPrevious($empty, ($firstTag - 1), $stackPtr, true); + if ($tokens[$firstTag]['line'] !== ($tokens[$prev]['line'] + 2) + && $tokens[$prev]['code'] !== T_DOC_COMMENT_OPEN_TAG + ) { + $error = 'There must be exactly one blank line before the tags in a doc comment'; + $fix = $phpcsFile->addFixableError($error, $firstTag, 'SpacingBeforeTags'); + if ($fix === true) { + $phpcsFile->fixer->beginChangeset(); + for ($i = ($prev + 1); $i < $firstTag; $i++) { + if ($tokens[$i]['line'] === $tokens[$firstTag]['line']) { + break; + } + + $phpcsFile->fixer->replaceToken($i, ''); + } + + $indent = str_repeat(' ', $tokens[$stackPtr]['column']); + $phpcsFile->fixer->addContent($prev, $phpcsFile->eolChar.$indent.'*'.$phpcsFile->eolChar); + $phpcsFile->fixer->endChangeset(); + } + } + + // Break out the tags into groups and check alignment within each. + // A tag group is one where there are no blank lines between tags. + // The param tag group is special as it requires all @param tags to be inside. + $tagGroups = []; + $groupid = 0; + $paramGroupid = null; + foreach ($tokens[$commentStart]['comment_tags'] as $pos => $tag) { + if ($pos > 0) { + $prev = $phpcsFile->findPrevious( + T_DOC_COMMENT_STRING, + ($tag - 1), + $tokens[$commentStart]['comment_tags'][($pos - 1)] + ); + + if ($prev === false) { + $prev = $tokens[$commentStart]['comment_tags'][($pos - 1)]; + } + + if ($tokens[$prev]['line'] !== ($tokens[$tag]['line'] - 1)) { + $groupid++; + } + } + + if ($tokens[$tag]['content'] === '@param') { + if ($paramGroupid !== null + && $paramGroupid !== $groupid + ) { + $error = 'Parameter tags must be grouped together in a doc comment'; + $phpcsFile->addError($error, $tag, 'ParamGroup'); + } + + if ($paramGroupid === null) { + $paramGroupid = $groupid; + } + }//end if + + $tagGroups[$groupid][] = $tag; + }//end foreach + + foreach ($tagGroups as $groupid => $group) { + $maxLength = 0; + $paddings = []; + foreach ($group as $pos => $tag) { + if ($paramGroupid === $groupid + && $tokens[$tag]['content'] !== '@param' + ) { + $error = 'Tag %s cannot be grouped with parameter tags in a doc comment'; + $data = [$tokens[$tag]['content']]; + $phpcsFile->addError($error, $tag, 'NonParamGroup', $data); + } + + $tagLength = $tokens[$tag]['length']; + if ($tagLength > $maxLength) { + $maxLength = $tagLength; + } + + // Check for a value. No value means no padding needed. + $string = $phpcsFile->findNext(T_DOC_COMMENT_STRING, $tag, $commentEnd); + if ($string !== false && $tokens[$string]['line'] === $tokens[$tag]['line']) { + $paddings[$tag] = $tokens[($tag + 1)]['length']; + } + } + + // Check that there was single blank line after the tag block + // but account for a multi-line tag comments. + $lastTag = $group[$pos]; + $next = $phpcsFile->findNext(T_DOC_COMMENT_TAG, ($lastTag + 3), $commentEnd); + if ($next !== false) { + $prev = $phpcsFile->findPrevious([T_DOC_COMMENT_TAG, T_DOC_COMMENT_STRING], ($next - 1), $commentStart); + if ($tokens[$next]['line'] !== ($tokens[$prev]['line'] + 2)) { + $error = 'There must be a single blank line after a tag group'; + $fix = $phpcsFile->addFixableError($error, $lastTag, 'SpacingAfterTagGroup'); + if ($fix === true) { + $phpcsFile->fixer->beginChangeset(); + for ($i = ($prev + 1); $i < $next; $i++) { + if ($tokens[$i]['line'] === $tokens[$next]['line']) { + break; + } + + $phpcsFile->fixer->replaceToken($i, ''); + } + + $indent = str_repeat(' ', $tokens[$stackPtr]['column']); + $phpcsFile->fixer->addContent($prev, $phpcsFile->eolChar.$indent.'*'.$phpcsFile->eolChar); + $phpcsFile->fixer->endChangeset(); + } + } + }//end if + + // Now check paddings. + foreach ($paddings as $tag => $padding) { + $required = ($maxLength - $tokens[$tag]['length'] + 1); + + if ($padding !== $required) { + $error = 'Tag value for %s tag indented incorrectly; expected %s spaces but found %s'; + $data = [ + $tokens[$tag]['content'], + $required, + $padding, + ]; + + $fix = $phpcsFile->addFixableError($error, ($tag + 1), 'TagValueIndent', $data); + if ($fix === true) { + $phpcsFile->fixer->replaceToken(($tag + 1), str_repeat(' ', $required)); + } + } + } + }//end foreach + + // If there is a param group, it needs to be first. + if ($paramGroupid !== null && $paramGroupid !== 0) { + $error = 'Parameter tags must be defined first in a doc comment'; + $phpcsFile->addError($error, $tagGroups[$paramGroupid][0], 'ParamNotFirst'); + } + + $foundTags = []; + foreach ($tokens[$stackPtr]['comment_tags'] as $pos => $tag) { + $tagName = $tokens[$tag]['content']; + if (isset($foundTags[$tagName]) === true) { + $lastTag = $tokens[$stackPtr]['comment_tags'][($pos - 1)]; + if ($tokens[$lastTag]['content'] !== $tagName) { + $error = 'Tags must be grouped together in a doc comment'; + $phpcsFile->addError($error, $tag, 'TagsNotGrouped'); + } + + continue; + } + + $foundTags[$tagName] = true; + } + + }//end process() + + +}//end class diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/Generic/Sniffs/Commenting/FixmeSniff.php b/vendor/squizlabs/php_codesniffer/src/Standards/Generic/Sniffs/Commenting/FixmeSniff.php new file mode 100644 index 00000000..84385221 --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/Generic/Sniffs/Commenting/FixmeSniff.php @@ -0,0 +1,78 @@ + + * @author Sam Graham + * @copyright 2006-2015 Squiz Pty Ltd (ABN 77 084 670 600) + * @license https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence + */ + +namespace PHP_CodeSniffer\Standards\Generic\Sniffs\Commenting; + +use PHP_CodeSniffer\Files\File; +use PHP_CodeSniffer\Sniffs\Sniff; +use PHP_CodeSniffer\Util\Tokens; + +class FixmeSniff implements Sniff +{ + + /** + * A list of tokenizers this sniff supports. + * + * @var array + */ + public $supportedTokenizers = [ + 'PHP', + 'JS', + ]; + + + /** + * Returns an array of tokens this test wants to listen for. + * + * @return array + */ + public function register() + { + return array_diff(Tokens::$commentTokens, Tokens::$phpcsCommentTokens); + + }//end register() + + + /** + * Processes this sniff, when one of its tokens is encountered. + * + * @param \PHP_CodeSniffer\Files\File $phpcsFile The file being scanned. + * @param int $stackPtr The position of the current token + * in the stack passed in $tokens. + * + * @return void + */ + public function process(File $phpcsFile, $stackPtr) + { + $tokens = $phpcsFile->getTokens(); + + $content = $tokens[$stackPtr]['content']; + $matches = []; + preg_match('/(?:\A|[^\p{L}]+)fixme([^\p{L}]+(.*)|\Z)/ui', $content, $matches); + if (empty($matches) === false) { + // Clear whitespace and some common characters not required at + // the end of a fixme message to make the error more informative. + $type = 'CommentFound'; + $fixmeMessage = trim($matches[1]); + $fixmeMessage = trim($fixmeMessage, '-:[](). '); + $error = 'Comment refers to a FIXME task'; + $data = [$fixmeMessage]; + if ($fixmeMessage !== '') { + $type = 'TaskFound'; + $error .= ' "%s"'; + } + + $phpcsFile->addError($error, $stackPtr, $type, $data); + } + + }//end process() + + +}//end class diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/Generic/Sniffs/Commenting/TodoSniff.php b/vendor/squizlabs/php_codesniffer/src/Standards/Generic/Sniffs/Commenting/TodoSniff.php new file mode 100644 index 00000000..63968046 --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/Generic/Sniffs/Commenting/TodoSniff.php @@ -0,0 +1,77 @@ + + * @copyright 2006-2015 Squiz Pty Ltd (ABN 77 084 670 600) + * @license https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence + */ + +namespace PHP_CodeSniffer\Standards\Generic\Sniffs\Commenting; + +use PHP_CodeSniffer\Files\File; +use PHP_CodeSniffer\Sniffs\Sniff; +use PHP_CodeSniffer\Util\Tokens; + +class TodoSniff implements Sniff +{ + + /** + * A list of tokenizers this sniff supports. + * + * @var array + */ + public $supportedTokenizers = [ + 'PHP', + 'JS', + ]; + + + /** + * Returns an array of tokens this test wants to listen for. + * + * @return array + */ + public function register() + { + return array_diff(Tokens::$commentTokens, Tokens::$phpcsCommentTokens); + + }//end register() + + + /** + * Processes this sniff, when one of its tokens is encountered. + * + * @param \PHP_CodeSniffer\Files\File $phpcsFile The file being scanned. + * @param int $stackPtr The position of the current token + * in the stack passed in $tokens. + * + * @return void + */ + public function process(File $phpcsFile, $stackPtr) + { + $tokens = $phpcsFile->getTokens(); + + $content = $tokens[$stackPtr]['content']; + $matches = []; + preg_match('/(?:\A|[^\p{L}]+)todo([^\p{L}]+(.*)|\Z)/ui', $content, $matches); + if (empty($matches) === false) { + // Clear whitespace and some common characters not required at + // the end of a to-do message to make the warning more informative. + $type = 'CommentFound'; + $todoMessage = trim($matches[1]); + $todoMessage = trim($todoMessage, '-:[](). '); + $error = 'Comment refers to a TODO task'; + $data = [$todoMessage]; + if ($todoMessage !== '') { + $type = 'TaskFound'; + $error .= ' "%s"'; + } + + $phpcsFile->addWarning($error, $stackPtr, $type, $data); + } + + }//end process() + + +}//end class diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/Generic/Sniffs/ControlStructures/DisallowYodaConditionsSniff.php b/vendor/squizlabs/php_codesniffer/src/Standards/Generic/Sniffs/ControlStructures/DisallowYodaConditionsSniff.php new file mode 100644 index 00000000..f760fa1c --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/Generic/Sniffs/ControlStructures/DisallowYodaConditionsSniff.php @@ -0,0 +1,188 @@ + + * @author Mark Scherer + * @copyright 2006-2015 Squiz Pty Ltd (ABN 77 084 670 600) + * @license https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence + */ + +namespace PHP_CodeSniffer\Standards\Generic\Sniffs\ControlStructures; + +use PHP_CodeSniffer\Files\File; +use PHP_CodeSniffer\Sniffs\Sniff; +use PHP_CodeSniffer\Util\Tokens; + +class DisallowYodaConditionsSniff implements Sniff +{ + + + /** + * Returns an array of tokens this test wants to listen for. + * + * @return array + */ + public function register() + { + return Tokens::$comparisonTokens; + + }//end register() + + + /** + * Processes this test, when one of its tokens is encountered. + * + * @param \PHP_CodeSniffer\Files\File $phpcsFile The file being scanned. + * @param int $stackPtr The position of the current token in the + * stack passed in $tokens. + * + * @return void + */ + public function process(File $phpcsFile, $stackPtr) + { + $tokens = $phpcsFile->getTokens(); + $previousIndex = $phpcsFile->findPrevious(Tokens::$emptyTokens, ($stackPtr - 1), null, true); + $relevantTokens = [ + T_CLOSE_SHORT_ARRAY, + T_CLOSE_PARENTHESIS, + T_TRUE, + T_FALSE, + T_NULL, + T_LNUMBER, + T_DNUMBER, + T_CONSTANT_ENCAPSED_STRING, + ]; + + if ($previousIndex === false + || in_array($tokens[$previousIndex]['code'], $relevantTokens, true) === false + ) { + return; + } + + if ($tokens[$previousIndex]['code'] === T_CLOSE_SHORT_ARRAY) { + $previousIndex = $tokens[$previousIndex]['bracket_opener']; + if ($this->isArrayStatic($phpcsFile, $previousIndex) === false) { + return; + } + } + + $prevIndex = $phpcsFile->findPrevious(Tokens::$emptyTokens, ($previousIndex - 1), null, true); + if ($prevIndex === false) { + return; + } + + if (in_array($tokens[$prevIndex]['code'], Tokens::$arithmeticTokens, true) === true) { + return; + } + + if ($tokens[$prevIndex]['code'] === T_STRING_CONCAT) { + return; + } + + // Is it a parenthesis. + if ($tokens[$previousIndex]['code'] === T_CLOSE_PARENTHESIS) { + // Check what exists inside the parenthesis. + $closeParenthesisIndex = $phpcsFile->findPrevious( + Tokens::$emptyTokens, + ($tokens[$previousIndex]['parenthesis_opener'] - 1), + null, + true + ); + + if ($closeParenthesisIndex === false || $tokens[$closeParenthesisIndex]['code'] !== T_ARRAY) { + if ($tokens[$closeParenthesisIndex]['code'] === T_STRING) { + return; + } + + // If it is not an array check what is inside. + $found = $phpcsFile->findPrevious( + T_VARIABLE, + ($previousIndex - 1), + $tokens[$previousIndex]['parenthesis_opener'] + ); + + // If a variable exists, it is not Yoda. + if ($found !== false) { + return; + } + + // If there is nothing inside the parenthesis, it it not a Yoda. + $opener = $tokens[$previousIndex]['parenthesis_opener']; + $prev = $phpcsFile->findPrevious(Tokens::$emptyTokens, ($previousIndex - 1), ($opener + 1), true); + if ($prev === false) { + return; + } + } else if ($tokens[$closeParenthesisIndex]['code'] === T_ARRAY + && $this->isArrayStatic($phpcsFile, $closeParenthesisIndex) === false + ) { + return; + }//end if + }//end if + + $phpcsFile->addError( + 'Usage of Yoda conditions is not allowed; switch the expression order', + $stackPtr, + 'Found' + ); + + }//end process() + + + /** + * Determines if an array is a static definition. + * + * @param \PHP_CodeSniffer\Files\File $phpcsFile The file being scanned. + * @param int $arrayToken The position of the array token. + * + * @return bool + */ + public function isArrayStatic(File $phpcsFile, $arrayToken) + { + $tokens = $phpcsFile->getTokens(); + + $arrayEnd = null; + if ($tokens[$arrayToken]['code'] === T_OPEN_SHORT_ARRAY) { + $start = $arrayToken; + $end = $tokens[$arrayToken]['bracket_closer']; + } else if ($tokens[$arrayToken]['code'] === T_ARRAY) { + $start = $tokens[$arrayToken]['parenthesis_opener']; + $end = $tokens[$arrayToken]['parenthesis_closer']; + } else { + return true; + } + + $staticTokens = Tokens::$emptyTokens; + $staticTokens += Tokens::$textStringTokens; + $staticTokens += Tokens::$assignmentTokens; + $staticTokens += Tokens::$equalityTokens; + $staticTokens += Tokens::$comparisonTokens; + $staticTokens += Tokens::$arithmeticTokens; + $staticTokens += Tokens::$operators; + $staticTokens += Tokens::$booleanOperators; + $staticTokens += Tokens::$castTokens; + $staticTokens += Tokens::$bracketTokens; + $staticTokens += [ + T_DOUBLE_ARROW => T_DOUBLE_ARROW, + T_COMMA => T_COMMA, + T_TRUE => T_TRUE, + T_FALSE => T_FALSE, + ]; + + for ($i = ($start + 1); $i < $end; $i++) { + if (isset($tokens[$i]['scope_closer']) === true) { + $i = $tokens[$i]['scope_closer']; + continue; + } + + if (isset($staticTokens[$tokens[$i]['code']]) === false) { + return false; + } + } + + return true; + + }//end isArrayStatic() + + +}//end class diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/Generic/Sniffs/ControlStructures/InlineControlStructureSniff.php b/vendor/squizlabs/php_codesniffer/src/Standards/Generic/Sniffs/ControlStructures/InlineControlStructureSniff.php new file mode 100644 index 00000000..a67a6a79 --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/Generic/Sniffs/ControlStructures/InlineControlStructureSniff.php @@ -0,0 +1,381 @@ + + * @copyright 2006-2015 Squiz Pty Ltd (ABN 77 084 670 600) + * @license https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence + */ + +namespace PHP_CodeSniffer\Standards\Generic\Sniffs\ControlStructures; + +use PHP_CodeSniffer\Files\File; +use PHP_CodeSniffer\Sniffs\Sniff; +use PHP_CodeSniffer\Util\Tokens; + +class InlineControlStructureSniff implements Sniff +{ + + /** + * A list of tokenizers this sniff supports. + * + * @var array + */ + public $supportedTokenizers = [ + 'PHP', + 'JS', + ]; + + /** + * If true, an error will be thrown; otherwise a warning. + * + * @var boolean + */ + public $error = true; + + + /** + * Returns an array of tokens this test wants to listen for. + * + * @return array + */ + public function register() + { + return [ + T_IF, + T_ELSE, + T_ELSEIF, + T_FOREACH, + T_WHILE, + T_DO, + T_SWITCH, + T_FOR, + ]; + + }//end register() + + + /** + * Processes this test, when one of its tokens is encountered. + * + * @param \PHP_CodeSniffer\Files\File $phpcsFile The file being scanned. + * @param int $stackPtr The position of the current token in the + * stack passed in $tokens. + * + * @return void + */ + public function process(File $phpcsFile, $stackPtr) + { + $tokens = $phpcsFile->getTokens(); + + if (isset($tokens[$stackPtr]['scope_opener']) === true) { + $phpcsFile->recordMetric($stackPtr, 'Control structure defined inline', 'no'); + return; + } + + // Ignore the ELSE in ELSE IF. We'll process the IF part later. + if ($tokens[$stackPtr]['code'] === T_ELSE) { + $next = $phpcsFile->findNext(T_WHITESPACE, ($stackPtr + 1), null, true); + if ($tokens[$next]['code'] === T_IF) { + return; + } + } + + if ($tokens[$stackPtr]['code'] === T_WHILE || $tokens[$stackPtr]['code'] === T_FOR) { + // This could be from a DO WHILE, which doesn't have an opening brace or a while/for without body. + if (isset($tokens[$stackPtr]['parenthesis_closer']) === true) { + $afterParensCloser = $phpcsFile->findNext(Tokens::$emptyTokens, ($tokens[$stackPtr]['parenthesis_closer'] + 1), null, true); + if ($afterParensCloser === false) { + // Live coding. + return; + } + + if ($tokens[$afterParensCloser]['code'] === T_SEMICOLON) { + $phpcsFile->recordMetric($stackPtr, 'Control structure defined inline', 'no'); + return; + } + } + + // In Javascript DO WHILE loops without curly braces are legal. This + // is only valid if a single statement is present between the DO and + // the WHILE. We can detect this by checking only a single semicolon + // is present between them. + if ($tokens[$stackPtr]['code'] === T_WHILE && $phpcsFile->tokenizerType === 'JS') { + $lastDo = $phpcsFile->findPrevious(T_DO, ($stackPtr - 1)); + $lastSemicolon = $phpcsFile->findPrevious(T_SEMICOLON, ($stackPtr - 1)); + if ($lastDo !== false && $lastSemicolon !== false && $lastDo < $lastSemicolon) { + $precedingSemicolon = $phpcsFile->findPrevious(T_SEMICOLON, ($lastSemicolon - 1)); + if ($precedingSemicolon === false || $precedingSemicolon < $lastDo) { + return; + } + } + } + }//end if + + if (isset($tokens[$stackPtr]['parenthesis_opener'], $tokens[$stackPtr]['parenthesis_closer']) === false + && $tokens[$stackPtr]['code'] !== T_ELSE + ) { + if ($tokens[$stackPtr]['code'] !== T_DO) { + // Live coding or parse error. + return; + } + + $nextWhile = $phpcsFile->findNext(T_WHILE, ($stackPtr + 1)); + if ($nextWhile !== false + && isset($tokens[$nextWhile]['parenthesis_opener'], $tokens[$nextWhile]['parenthesis_closer']) === false + ) { + // Live coding or parse error. + return; + } + + unset($nextWhile); + } + + $start = $stackPtr; + if (isset($tokens[$stackPtr]['parenthesis_closer']) === true) { + $start = $tokens[$stackPtr]['parenthesis_closer']; + } + + $nextNonEmpty = $phpcsFile->findNext(Tokens::$emptyTokens, ($start + 1), null, true); + if ($nextNonEmpty === false) { + // Live coding or parse error. + return; + } + + if ($tokens[$nextNonEmpty]['code'] === T_OPEN_CURLY_BRACKET + || $tokens[$nextNonEmpty]['code'] === T_COLON + ) { + // T_CLOSE_CURLY_BRACKET missing, or alternative control structure with + // T_END... missing. Either live coding, parse error or end + // tag in short open tags and scan run with short_open_tag=Off. + // Bow out completely as any further detection will be unreliable + // and create incorrect fixes or cause fixer conflicts. + return ($phpcsFile->numTokens + 1); + } + + unset($nextNonEmpty, $start); + + // This is a control structure without an opening brace, + // so it is an inline statement. + if ($this->error === true) { + $fix = $phpcsFile->addFixableError('Inline control structures are not allowed', $stackPtr, 'NotAllowed'); + } else { + $fix = $phpcsFile->addFixableWarning('Inline control structures are discouraged', $stackPtr, 'Discouraged'); + } + + $phpcsFile->recordMetric($stackPtr, 'Control structure defined inline', 'yes'); + + // Stop here if we are not fixing the error. + if ($fix !== true) { + return; + } + + $phpcsFile->fixer->beginChangeset(); + if (isset($tokens[$stackPtr]['parenthesis_closer']) === true) { + $closer = $tokens[$stackPtr]['parenthesis_closer']; + } else { + $closer = $stackPtr; + } + + if ($tokens[($closer + 1)]['code'] === T_WHITESPACE + || $tokens[($closer + 1)]['code'] === T_SEMICOLON + ) { + $phpcsFile->fixer->addContent($closer, ' {'); + } else { + $phpcsFile->fixer->addContent($closer, ' { '); + } + + $fixableScopeOpeners = $this->register(); + + $lastNonEmpty = $closer; + for ($end = ($closer + 1); $end < $phpcsFile->numTokens; $end++) { + if ($tokens[$end]['code'] === T_SEMICOLON) { + break; + } + + if ($tokens[$end]['code'] === T_CLOSE_TAG) { + $end = $lastNonEmpty; + break; + } + + if (in_array($tokens[$end]['code'], $fixableScopeOpeners, true) === true + && isset($tokens[$end]['scope_opener']) === false + ) { + // The best way to fix nested inline scopes is middle-out. + // So skip this one. It will be detected and fixed on a future loop. + $phpcsFile->fixer->rollbackChangeset(); + return; + } + + if (isset($tokens[$end]['scope_opener']) === true) { + $type = $tokens[$end]['code']; + $end = $tokens[$end]['scope_closer']; + if ($type === T_DO + || $type === T_IF || $type === T_ELSEIF + || $type === T_TRY || $type === T_CATCH || $type === T_FINALLY + ) { + $next = $phpcsFile->findNext(Tokens::$emptyTokens, ($end + 1), null, true); + if ($next === false) { + break; + } + + $nextType = $tokens[$next]['code']; + + // Let additional conditions loop and find their ending. + if (($type === T_IF + || $type === T_ELSEIF) + && ($nextType === T_ELSEIF + || $nextType === T_ELSE) + ) { + continue; + } + + // Account for TRY... CATCH/FINALLY statements. + if (($type === T_TRY + || $type === T_CATCH + || $type === T_FINALLY) + && ($nextType === T_CATCH + || $nextType === T_FINALLY) + ) { + continue; + } + + // Account for DO... WHILE conditions. + if ($type === T_DO && $nextType === T_WHILE) { + $end = $phpcsFile->findNext(T_SEMICOLON, ($next + 1)); + } + } else if ($type === T_CLOSURE) { + // There should be a semicolon after the closing brace. + $next = $phpcsFile->findNext(Tokens::$emptyTokens, ($end + 1), null, true); + if ($next !== false && $tokens[$next]['code'] === T_SEMICOLON) { + $end = $next; + } + }//end if + + if ($tokens[$end]['code'] !== T_END_HEREDOC + && $tokens[$end]['code'] !== T_END_NOWDOC + ) { + break; + } + }//end if + + if (isset($tokens[$end]['parenthesis_closer']) === true) { + $end = $tokens[$end]['parenthesis_closer']; + $lastNonEmpty = $end; + continue; + } + + if ($tokens[$end]['code'] !== T_WHITESPACE) { + $lastNonEmpty = $end; + } + }//end for + + if ($end === $phpcsFile->numTokens) { + $end = $lastNonEmpty; + } + + $nextContent = $phpcsFile->findNext(Tokens::$emptyTokens, ($end + 1), null, true); + if ($nextContent === false || $tokens[$nextContent]['line'] !== $tokens[$end]['line']) { + // Looks for completely empty statements. + $next = $phpcsFile->findNext(T_WHITESPACE, ($closer + 1), ($end + 1), true); + } else { + $next = ($end + 1); + $endLine = $end; + } + + if ($next !== $end) { + if ($nextContent === false || $tokens[$nextContent]['line'] !== $tokens[$end]['line']) { + // Account for a comment on the end of the line. + for ($endLine = $end; $endLine < $phpcsFile->numTokens; $endLine++) { + if (isset($tokens[($endLine + 1)]) === false + || $tokens[$endLine]['line'] !== $tokens[($endLine + 1)]['line'] + ) { + break; + } + } + + if (isset(Tokens::$commentTokens[$tokens[$endLine]['code']]) === false + && ($tokens[$endLine]['code'] !== T_WHITESPACE + || isset(Tokens::$commentTokens[$tokens[($endLine - 1)]['code']]) === false) + ) { + $endLine = $end; + } + } + + if ($endLine !== $end) { + $endToken = $endLine; + $addedContent = ''; + } else { + $endToken = $end; + $addedContent = $phpcsFile->eolChar; + + if ($tokens[$end]['code'] !== T_SEMICOLON + && $tokens[$end]['code'] !== T_CLOSE_CURLY_BRACKET + ) { + $phpcsFile->fixer->addContent($end, '; '); + } + } + + $next = $phpcsFile->findNext(T_WHITESPACE, ($endToken + 1), null, true); + if ($next !== false + && ($tokens[$next]['code'] === T_ELSE + || $tokens[$next]['code'] === T_ELSEIF) + ) { + $phpcsFile->fixer->addContentBefore($next, '} '); + } else { + $indent = ''; + for ($first = $stackPtr; $first > 0; $first--) { + if ($tokens[$first]['column'] === 1) { + break; + } + } + + if ($tokens[$first]['code'] === T_WHITESPACE) { + $indent = $tokens[$first]['content']; + } else if ($tokens[$first]['code'] === T_INLINE_HTML + || $tokens[$first]['code'] === T_OPEN_TAG + ) { + $addedContent = ''; + } + + $addedContent .= $indent.'}'; + if ($next !== false && $tokens[$endToken]['code'] === T_COMMENT) { + $addedContent .= $phpcsFile->eolChar; + } + + $phpcsFile->fixer->addContent($endToken, $addedContent); + }//end if + } else { + if ($nextContent === false || $tokens[$nextContent]['line'] !== $tokens[$end]['line']) { + // Account for a comment on the end of the line. + for ($endLine = $end; $endLine < $phpcsFile->numTokens; $endLine++) { + if (isset($tokens[($endLine + 1)]) === false + || $tokens[$endLine]['line'] !== $tokens[($endLine + 1)]['line'] + ) { + break; + } + } + + if ($tokens[$endLine]['code'] !== T_COMMENT + && ($tokens[$endLine]['code'] !== T_WHITESPACE + || $tokens[($endLine - 1)]['code'] !== T_COMMENT) + ) { + $endLine = $end; + } + } + + if ($endLine !== $end) { + $phpcsFile->fixer->replaceToken($end, ''); + $phpcsFile->fixer->addNewlineBefore($endLine); + $phpcsFile->fixer->addContent($endLine, '}'); + } else { + $phpcsFile->fixer->replaceToken($end, '}'); + } + }//end if + + $phpcsFile->fixer->endChangeset(); + + }//end process() + + +}//end class diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/Generic/Sniffs/Debug/CSSLintSniff.php b/vendor/squizlabs/php_codesniffer/src/Standards/Generic/Sniffs/Debug/CSSLintSniff.php new file mode 100644 index 00000000..81284787 --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/Generic/Sniffs/Debug/CSSLintSniff.php @@ -0,0 +1,96 @@ + + * @copyright 2013-2014 Roman Levishchenko + * @license https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence + */ + +namespace PHP_CodeSniffer\Standards\Generic\Sniffs\Debug; + +use PHP_CodeSniffer\Config; +use PHP_CodeSniffer\Files\File; +use PHP_CodeSniffer\Sniffs\Sniff; +use PHP_CodeSniffer\Util\Common; + +class CSSLintSniff implements Sniff +{ + + /** + * A list of tokenizers this sniff supports. + * + * @var array + */ + public $supportedTokenizers = ['CSS']; + + + /** + * Returns the token types that this sniff is interested in. + * + * @return int[] + */ + public function register() + { + return [T_OPEN_TAG]; + + }//end register() + + + /** + * Processes the tokens that this sniff is interested in. + * + * @param \PHP_CodeSniffer\Files\File $phpcsFile The file where the token was found. + * @param int $stackPtr The position in the stack where + * the token was found. + * + * @return void + */ + public function process(File $phpcsFile, $stackPtr) + { + $csslintPath = Config::getExecutablePath('csslint'); + if ($csslintPath === null) { + return; + } + + $fileName = $phpcsFile->getFilename(); + + $cmd = Common::escapeshellcmd($csslintPath).' '.escapeshellarg($fileName).' 2>&1'; + exec($cmd, $output, $retval); + + if (is_array($output) === false) { + return; + } + + $count = count($output); + + for ($i = 0; $i < $count; $i++) { + $matches = []; + $numMatches = preg_match( + '/(error|warning) at line (\d+)/', + $output[$i], + $matches + ); + + if ($numMatches === 0) { + continue; + } + + $line = (int) $matches[2]; + $message = 'csslint says: '.$output[($i + 1)]; + // First line is message with error line and error code. + // Second is error message. + // Third is wrong line in file. + // Fourth is empty line. + $i += 4; + + $phpcsFile->addWarningOnLine($message, $line, 'ExternalTool'); + }//end for + + // Ignore the rest of the file. + return ($phpcsFile->numTokens + 1); + + }//end process() + + +}//end class diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/Generic/Sniffs/Debug/ClosureLinterSniff.php b/vendor/squizlabs/php_codesniffer/src/Standards/Generic/Sniffs/Debug/ClosureLinterSniff.php new file mode 100644 index 00000000..19204718 --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/Generic/Sniffs/Debug/ClosureLinterSniff.php @@ -0,0 +1,117 @@ + + * @copyright 2006-2015 Squiz Pty Ltd (ABN 77 084 670 600) + * @license https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence + */ + +namespace PHP_CodeSniffer\Standards\Generic\Sniffs\Debug; + +use PHP_CodeSniffer\Config; +use PHP_CodeSniffer\Files\File; +use PHP_CodeSniffer\Sniffs\Sniff; +use PHP_CodeSniffer\Util\Common; + +class ClosureLinterSniff implements Sniff +{ + + /** + * A list of error codes that should show errors. + * + * All other error codes will show warnings. + * + * @var integer + */ + public $errorCodes = []; + + /** + * A list of error codes to ignore. + * + * @var integer + */ + public $ignoreCodes = []; + + /** + * A list of tokenizers this sniff supports. + * + * @var array + */ + public $supportedTokenizers = ['JS']; + + + /** + * Returns the token types that this sniff is interested in. + * + * @return int[] + */ + public function register() + { + return [T_OPEN_TAG]; + + }//end register() + + + /** + * Processes the tokens that this sniff is interested in. + * + * @param \PHP_CodeSniffer\Files\File $phpcsFile The file where the token was found. + * @param int $stackPtr The position in the stack where + * the token was found. + * + * @return void + * @throws \PHP_CodeSniffer\Exceptions\RuntimeException If jslint.js could not be run + */ + public function process(File $phpcsFile, $stackPtr) + { + $lintPath = Config::getExecutablePath('gjslint'); + if ($lintPath === null) { + return; + } + + $fileName = $phpcsFile->getFilename(); + + $lintPath = Common::escapeshellcmd($lintPath); + $cmd = $lintPath.' --nosummary --notime --unix_mode '.escapeshellarg($fileName); + exec($cmd, $output, $retval); + + if (is_array($output) === false) { + return; + } + + foreach ($output as $finding) { + $matches = []; + $numMatches = preg_match('/^(.*):([0-9]+):\(.*?([0-9]+)\)(.*)$/', $finding, $matches); + if ($numMatches === 0) { + continue; + } + + // Skip error codes we are ignoring. + $code = $matches[3]; + if (in_array($code, $this->ignoreCodes) === true) { + continue; + } + + $line = (int) $matches[2]; + $error = trim($matches[4]); + + $message = 'gjslint says: (%s) %s'; + $data = [ + $code, + $error, + ]; + if (in_array($code, $this->errorCodes) === true) { + $phpcsFile->addErrorOnLine($message, $line, 'ExternalToolError', $data); + } else { + $phpcsFile->addWarningOnLine($message, $line, 'ExternalTool', $data); + } + }//end foreach + + // Ignore the rest of the file. + return ($phpcsFile->numTokens + 1); + + }//end process() + + +}//end class diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/Generic/Sniffs/Debug/ESLintSniff.php b/vendor/squizlabs/php_codesniffer/src/Standards/Generic/Sniffs/Debug/ESLintSniff.php new file mode 100644 index 00000000..d11d3470 --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/Generic/Sniffs/Debug/ESLintSniff.php @@ -0,0 +1,113 @@ + + * @copyright 2006-2015 Squiz Pty Ltd (ABN 77 084 670 600) + * @license https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence + */ + +namespace PHP_CodeSniffer\Standards\Generic\Sniffs\Debug; + +use PHP_CodeSniffer\Config; +use PHP_CodeSniffer\Files\File; +use PHP_CodeSniffer\Sniffs\Sniff; +use PHP_CodeSniffer\Util\Common; + +class ESLintSniff implements Sniff +{ + + /** + * A list of tokenizers this sniff supports. + * + * @var array + */ + public $supportedTokenizers = ['JS']; + + /** + * ESLint configuration file path. + * + * @var string|null Path to eslintrc. Null to autodetect. + */ + public $configFile = null; + + + /** + * Returns the token types that this sniff is interested in. + * + * @return int[] + */ + public function register() + { + return [T_OPEN_TAG]; + + }//end register() + + + /** + * Processes the tokens that this sniff is interested in. + * + * @param \PHP_CodeSniffer\Files\File $phpcsFile The file where the token was found. + * @param int $stackPtr The position in the stack where + * the token was found. + * + * @return void + * @throws \PHP_CodeSniffer\Exceptions\RuntimeException If jshint.js could not be run + */ + public function process(File $phpcsFile, $stackPtr) + { + $eslintPath = Config::getExecutablePath('eslint'); + if ($eslintPath === null) { + return; + } + + $filename = $phpcsFile->getFilename(); + + $configFile = $this->configFile; + if (empty($configFile) === true) { + // Attempt to autodetect. + $candidates = glob('.eslintrc{.js,.yaml,.yml,.json}', GLOB_BRACE); + if (empty($candidates) === false) { + $configFile = $candidates[0]; + } + } + + $eslintOptions = ['--format json']; + if (empty($configFile) === false) { + $eslintOptions[] = '--config '.escapeshellarg($configFile); + } + + $cmd = Common::escapeshellcmd(escapeshellarg($eslintPath).' '.implode(' ', $eslintOptions).' '.escapeshellarg($filename)); + + // Execute! + exec($cmd, $stdout, $code); + + if ($code <= 0) { + // No errors, continue. + return ($phpcsFile->numTokens + 1); + } + + $data = json_decode(implode("\n", $stdout)); + if (json_last_error() !== JSON_ERROR_NONE) { + // Ignore any errors. + return ($phpcsFile->numTokens + 1); + } + + // Data is a list of files, but we only pass a single one. + $messages = $data[0]->messages; + foreach ($messages as $error) { + $message = 'eslint says: '.$error->message; + if (empty($error->fatal) === false || $error->severity === 2) { + $phpcsFile->addErrorOnLine($message, $error->line, 'ExternalTool'); + } else { + $phpcsFile->addWarningOnLine($message, $error->line, 'ExternalTool'); + } + } + + // Ignore the rest of the file. + return ($phpcsFile->numTokens + 1); + + }//end process() + + +}//end class diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/Generic/Sniffs/Debug/JSHintSniff.php b/vendor/squizlabs/php_codesniffer/src/Standards/Generic/Sniffs/Debug/JSHintSniff.php new file mode 100644 index 00000000..06de3594 --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/Generic/Sniffs/Debug/JSHintSniff.php @@ -0,0 +1,95 @@ + + * @author Alexander Wei§ + * @copyright 2006-2015 Squiz Pty Ltd (ABN 77 084 670 600) + * @license https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence + */ + +namespace PHP_CodeSniffer\Standards\Generic\Sniffs\Debug; + +use PHP_CodeSniffer\Config; +use PHP_CodeSniffer\Files\File; +use PHP_CodeSniffer\Sniffs\Sniff; +use PHP_CodeSniffer\Util\Common; + +class JSHintSniff implements Sniff +{ + + /** + * A list of tokenizers this sniff supports. + * + * @var array + */ + public $supportedTokenizers = ['JS']; + + + /** + * Returns the token types that this sniff is interested in. + * + * @return int[] + */ + public function register() + { + return [T_OPEN_TAG]; + + }//end register() + + + /** + * Processes the tokens that this sniff is interested in. + * + * @param \PHP_CodeSniffer\Files\File $phpcsFile The file where the token was found. + * @param int $stackPtr The position in the stack where + * the token was found. + * + * @return void + * @throws \PHP_CodeSniffer\Exceptions\RuntimeException If jshint.js could not be run + */ + public function process(File $phpcsFile, $stackPtr) + { + $rhinoPath = Config::getExecutablePath('rhino'); + $jshintPath = Config::getExecutablePath('jshint'); + if ($rhinoPath === null && $jshintPath === null) { + return; + } + + $fileName = $phpcsFile->getFilename(); + $jshintPath = Common::escapeshellcmd($jshintPath); + + if ($rhinoPath !== null) { + $rhinoPath = Common::escapeshellcmd($rhinoPath); + $cmd = "$rhinoPath \"$jshintPath\" ".escapeshellarg($fileName); + exec($cmd, $output, $retval); + + $regex = '`^(?P.+)\(.+:(?P[0-9]+).*:[0-9]+\)$`'; + } else { + $cmd = "$jshintPath ".escapeshellarg($fileName); + exec($cmd, $output, $retval); + + $regex = '`^(.+?): line (?P[0-9]+), col [0-9]+, (?P.+)$`'; + } + + if (is_array($output) === true) { + foreach ($output as $finding) { + $matches = []; + $numMatches = preg_match($regex, $finding, $matches); + if ($numMatches === 0) { + continue; + } + + $line = (int) $matches['line']; + $message = 'jshint says: '.trim($matches['error']); + $phpcsFile->addWarningOnLine($message, $line, 'ExternalTool'); + } + } + + // Ignore the rest of the file. + return ($phpcsFile->numTokens + 1); + + }//end process() + + +}//end class diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/Generic/Sniffs/Files/ByteOrderMarkSniff.php b/vendor/squizlabs/php_codesniffer/src/Standards/Generic/Sniffs/Files/ByteOrderMarkSniff.php new file mode 100644 index 00000000..cee8ecc5 --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/Generic/Sniffs/Files/ByteOrderMarkSniff.php @@ -0,0 +1,80 @@ + + * @author Greg Sherwood + * @copyright 2010-2014 mediaSELF Sp. z o.o. + * @license https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence + */ + +namespace PHP_CodeSniffer\Standards\Generic\Sniffs\Files; + +use PHP_CodeSniffer\Files\File; +use PHP_CodeSniffer\Sniffs\Sniff; + +class ByteOrderMarkSniff implements Sniff +{ + + /** + * List of supported BOM definitions. + * + * Use encoding names as keys and hex BOM representations as values. + * + * @var array + */ + protected $bomDefinitions = [ + 'UTF-8' => 'efbbbf', + 'UTF-16 (BE)' => 'feff', + 'UTF-16 (LE)' => 'fffe', + ]; + + + /** + * Returns an array of tokens this test wants to listen for. + * + * @return array + */ + public function register() + { + return [T_INLINE_HTML]; + + }//end register() + + + /** + * Processes this sniff, when one of its tokens is encountered. + * + * @param \PHP_CodeSniffer\Files\File $phpcsFile The file being scanned. + * @param int $stackPtr The position of the current token in + * the stack passed in $tokens. + * + * @return void + */ + public function process(File $phpcsFile, $stackPtr) + { + // The BOM will be the very first token in the file. + if ($stackPtr !== 0) { + return; + } + + $tokens = $phpcsFile->getTokens(); + + foreach ($this->bomDefinitions as $bomName => $expectedBomHex) { + $bomByteLength = (strlen($expectedBomHex) / 2); + $htmlBomHex = bin2hex(substr($tokens[$stackPtr]['content'], 0, $bomByteLength)); + if ($htmlBomHex === $expectedBomHex) { + $errorData = [$bomName]; + $error = 'File contains %s byte order mark, which may corrupt your application'; + $phpcsFile->addError($error, $stackPtr, 'Found', $errorData); + $phpcsFile->recordMetric($stackPtr, 'Using byte order mark', 'yes'); + return; + } + } + + $phpcsFile->recordMetric($stackPtr, 'Using byte order mark', 'no'); + + }//end process() + + +}//end class diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/Generic/Sniffs/Files/EndFileNewlineSniff.php b/vendor/squizlabs/php_codesniffer/src/Standards/Generic/Sniffs/Files/EndFileNewlineSniff.php new file mode 100644 index 00000000..d5375dc5 --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/Generic/Sniffs/Files/EndFileNewlineSniff.php @@ -0,0 +1,84 @@ + + * @copyright 2006-2015 Squiz Pty Ltd (ABN 77 084 670 600) + * @license https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence + */ + +namespace PHP_CodeSniffer\Standards\Generic\Sniffs\Files; + +use PHP_CodeSniffer\Files\File; +use PHP_CodeSniffer\Sniffs\Sniff; + +class EndFileNewlineSniff implements Sniff +{ + + /** + * A list of tokenizers this sniff supports. + * + * @var array + */ + public $supportedTokenizers = [ + 'PHP', + 'JS', + 'CSS', + ]; + + + /** + * Returns an array of tokens this test wants to listen for. + * + * @return array + */ + public function register() + { + return [ + T_OPEN_TAG, + T_OPEN_TAG_WITH_ECHO, + ]; + + }//end register() + + + /** + * Processes this sniff, when one of its tokens is encountered. + * + * @param \PHP_CodeSniffer\Files\File $phpcsFile The file being scanned. + * @param int $stackPtr The position of the current token in + * the stack passed in $tokens. + * + * @return int + */ + public function process(File $phpcsFile, $stackPtr) + { + // Skip to the end of the file. + $tokens = $phpcsFile->getTokens(); + $stackPtr = ($phpcsFile->numTokens - 1); + + if ($tokens[$stackPtr]['content'] === '') { + $stackPtr--; + } + + $eolCharLen = strlen($phpcsFile->eolChar); + $lastChars = substr($tokens[$stackPtr]['content'], ($eolCharLen * -1)); + if ($lastChars !== $phpcsFile->eolChar) { + $phpcsFile->recordMetric($stackPtr, 'Newline at EOF', 'no'); + + $error = 'File must end with a newline character'; + $fix = $phpcsFile->addFixableError($error, $stackPtr, 'NotFound'); + if ($fix === true) { + $phpcsFile->fixer->addNewline($stackPtr); + } + } else { + $phpcsFile->recordMetric($stackPtr, 'Newline at EOF', 'yes'); + } + + // Ignore the rest of the file. + return ($phpcsFile->numTokens + 1); + + }//end process() + + +}//end class diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/Generic/Sniffs/Files/EndFileNoNewlineSniff.php b/vendor/squizlabs/php_codesniffer/src/Standards/Generic/Sniffs/Files/EndFileNoNewlineSniff.php new file mode 100644 index 00000000..41c9c749 --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/Generic/Sniffs/Files/EndFileNoNewlineSniff.php @@ -0,0 +1,91 @@ + + * @copyright 2006-2015 Squiz Pty Ltd (ABN 77 084 670 600) + * @license https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence + */ + +namespace PHP_CodeSniffer\Standards\Generic\Sniffs\Files; + +use PHP_CodeSniffer\Files\File; +use PHP_CodeSniffer\Sniffs\Sniff; + +class EndFileNoNewlineSniff implements Sniff +{ + + /** + * A list of tokenizers this sniff supports. + * + * @var array + */ + public $supportedTokenizers = [ + 'PHP', + 'JS', + 'CSS', + ]; + + + /** + * Returns an array of tokens this test wants to listen for. + * + * @return array + */ + public function register() + { + return [ + T_OPEN_TAG, + T_OPEN_TAG_WITH_ECHO, + ]; + + }//end register() + + + /** + * Processes this sniff, when one of its tokens is encountered. + * + * @param \PHP_CodeSniffer\Files\File $phpcsFile The file being scanned. + * @param int $stackPtr The position of the current token in + * the stack passed in $tokens. + * + * @return int + */ + public function process(File $phpcsFile, $stackPtr) + { + // Skip to the end of the file. + $tokens = $phpcsFile->getTokens(); + $stackPtr = ($phpcsFile->numTokens - 1); + + if ($tokens[$stackPtr]['content'] === '') { + --$stackPtr; + } + + $eolCharLen = strlen($phpcsFile->eolChar); + $lastChars = substr($tokens[$stackPtr]['content'], ($eolCharLen * -1)); + if ($lastChars === $phpcsFile->eolChar) { + $error = 'File must not end with a newline character'; + $fix = $phpcsFile->addFixableError($error, $stackPtr, 'Found'); + if ($fix === true) { + $phpcsFile->fixer->beginChangeset(); + + for ($i = $stackPtr; $i > 0; $i--) { + $newContent = rtrim($tokens[$i]['content'], $phpcsFile->eolChar); + $phpcsFile->fixer->replaceToken($i, $newContent); + + if ($newContent !== '') { + break; + } + } + + $phpcsFile->fixer->endChangeset(); + } + } + + // Ignore the rest of the file. + return ($phpcsFile->numTokens + 1); + + }//end process() + + +}//end class diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/Generic/Sniffs/Files/ExecutableFileSniff.php b/vendor/squizlabs/php_codesniffer/src/Standards/Generic/Sniffs/Files/ExecutableFileSniff.php new file mode 100644 index 00000000..e1213d5f --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/Generic/Sniffs/Files/ExecutableFileSniff.php @@ -0,0 +1,62 @@ + + * @copyright 2019 Matthew Peveler + * @license https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence + */ + +namespace PHP_CodeSniffer\Standards\Generic\Sniffs\Files; + +use PHP_CodeSniffer\Files\File; +use PHP_CodeSniffer\Sniffs\Sniff; + +class ExecutableFileSniff implements Sniff +{ + + + /** + * Returns an array of tokens this test wants to listen for. + * + * @return array + */ + public function register() + { + return [ + T_OPEN_TAG, + T_OPEN_TAG_WITH_ECHO, + ]; + + }//end register() + + + /** + * Processes this test, when one of its tokens is encountered. + * + * @param \PHP_CodeSniffer\Files\File $phpcsFile The file being scanned. + * @param int $stackPtr The position of the current token in the + * stack passed in $tokens. + * + * @return int + */ + public function process(File $phpcsFile, $stackPtr) + { + $filename = $phpcsFile->getFilename(); + + if ($filename !== 'STDIN') { + $perms = fileperms($phpcsFile->getFilename()); + if (($perms & 0x0040) !== 0 || ($perms & 0x0008) !== 0 || ($perms & 0x0001) !== 0) { + $error = 'A PHP file should not be executable; found file permissions set to %s'; + $data = [substr(sprintf('%o', $perms), -4)]; + $phpcsFile->addError($error, 0, 'Executable', $data); + } + } + + // Ignore the rest of the file. + return ($phpcsFile->numTokens + 1); + + }//end process() + + +}//end class diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/Generic/Sniffs/Files/InlineHTMLSniff.php b/vendor/squizlabs/php_codesniffer/src/Standards/Generic/Sniffs/Files/InlineHTMLSniff.php new file mode 100644 index 00000000..eb01da87 --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/Generic/Sniffs/Files/InlineHTMLSniff.php @@ -0,0 +1,79 @@ + + * @copyright 2006-2015 Squiz Pty Ltd (ABN 77 084 670 600) + * @license https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence + */ + +namespace PHP_CodeSniffer\Standards\Generic\Sniffs\Files; + +use PHP_CodeSniffer\Files\File; +use PHP_CodeSniffer\Sniffs\Sniff; + +class InlineHTMLSniff implements Sniff +{ + + /** + * List of supported BOM definitions. + * + * Use encoding names as keys and hex BOM representations as values. + * + * @var array + */ + protected $bomDefinitions = [ + 'UTF-8' => 'efbbbf', + 'UTF-16 (BE)' => 'feff', + 'UTF-16 (LE)' => 'fffe', + ]; + + + /** + * Returns an array of tokens this test wants to listen for. + * + * @return array + */ + public function register() + { + return [T_INLINE_HTML]; + + }//end register() + + + /** + * Processes this test, when one of its tokens is encountered. + * + * @param \PHP_CodeSniffer\Files\File $phpcsFile The file being scanned. + * @param int $stackPtr The position of the current token in + * the stack passed in $tokens. + * + * @return int|null + */ + public function process(File $phpcsFile, $stackPtr) + { + // Allow a byte-order mark. + $tokens = $phpcsFile->getTokens(); + foreach ($this->bomDefinitions as $bomName => $expectedBomHex) { + $bomByteLength = (strlen($expectedBomHex) / 2); + $htmlBomHex = bin2hex(substr($tokens[0]['content'], 0, $bomByteLength)); + if ($htmlBomHex === $expectedBomHex && strlen($tokens[0]['content']) === $bomByteLength) { + return; + } + } + + // Ignore shebang lines. + $tokens = $phpcsFile->getTokens(); + if (substr($tokens[$stackPtr]['content'], 0, 2) === '#!') { + return; + } + + $error = 'PHP files must only contain PHP code'; + $phpcsFile->addError($error, $stackPtr, 'Found'); + + return $phpcsFile->numTokens; + + }//end process() + + +}//end class diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/Generic/Sniffs/Files/LineEndingsSniff.php b/vendor/squizlabs/php_codesniffer/src/Standards/Generic/Sniffs/Files/LineEndingsSniff.php new file mode 100644 index 00000000..845e1bcf --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/Generic/Sniffs/Files/LineEndingsSniff.php @@ -0,0 +1,148 @@ + + * @copyright 2006-2015 Squiz Pty Ltd (ABN 77 084 670 600) + * @license https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence + */ + +namespace PHP_CodeSniffer\Standards\Generic\Sniffs\Files; + +use PHP_CodeSniffer\Files\File; +use PHP_CodeSniffer\Sniffs\Sniff; + +class LineEndingsSniff implements Sniff +{ + + /** + * A list of tokenizers this sniff supports. + * + * @var array + */ + public $supportedTokenizers = [ + 'PHP', + 'JS', + 'CSS', + ]; + + /** + * The valid EOL character. + * + * @var string + */ + public $eolChar = '\n'; + + + /** + * Returns an array of tokens this test wants to listen for. + * + * @return array + */ + public function register() + { + return [ + T_OPEN_TAG, + T_OPEN_TAG_WITH_ECHO, + ]; + + }//end register() + + + /** + * Processes this sniff, when one of its tokens is encountered. + * + * @param \PHP_CodeSniffer\Files\File $phpcsFile The file being scanned. + * @param int $stackPtr The position of the current token in + * the stack passed in $tokens. + * + * @return int + */ + public function process(File $phpcsFile, $stackPtr) + { + $found = $phpcsFile->eolChar; + $found = str_replace("\n", '\n', $found); + $found = str_replace("\r", '\r', $found); + + $phpcsFile->recordMetric($stackPtr, 'EOL char', $found); + + if ($found === $this->eolChar) { + // Ignore the rest of the file. + return ($phpcsFile->numTokens + 1); + } + + // Check for single line files without an EOL. This is a very special + // case and the EOL char is set to \n when this happens. + if ($found === '\n') { + $tokens = $phpcsFile->getTokens(); + $lastToken = ($phpcsFile->numTokens - 1); + if ($tokens[$lastToken]['line'] === 1 + && $tokens[$lastToken]['content'] !== "\n" + ) { + return; + } + } + + $error = 'End of line character is invalid; expected "%s" but found "%s"'; + $expected = $this->eolChar; + $expected = str_replace("\n", '\n', $expected); + $expected = str_replace("\r", '\r', $expected); + $data = [ + $expected, + $found, + ]; + + // Errors are always reported on line 1, no matter where the first PHP tag is. + $fix = $phpcsFile->addFixableError($error, 0, 'InvalidEOLChar', $data); + + if ($fix === true) { + $tokens = $phpcsFile->getTokens(); + switch ($this->eolChar) { + case '\n': + $eolChar = "\n"; + break; + case '\r': + $eolChar = "\r"; + break; + case '\r\n': + $eolChar = "\r\n"; + break; + default: + $eolChar = $this->eolChar; + break; + } + + for ($i = 0; $i < $phpcsFile->numTokens; $i++) { + if (isset($tokens[($i + 1)]) === true + && $tokens[($i + 1)]['line'] <= $tokens[$i]['line'] + ) { + continue; + } + + // Token is the last on a line. + if (isset($tokens[$i]['orig_content']) === true) { + $tokenContent = $tokens[$i]['orig_content']; + } else { + $tokenContent = $tokens[$i]['content']; + } + + if ($tokenContent === '') { + // Special case for JS/CSS close tag. + continue; + } + + $newContent = rtrim($tokenContent, "\r\n"); + $newContent .= $eolChar; + if ($tokenContent !== $newContent) { + $phpcsFile->fixer->replaceToken($i, $newContent); + } + }//end for + }//end if + + // Ignore the rest of the file. + return ($phpcsFile->numTokens + 1); + + }//end process() + + +}//end class diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/Generic/Sniffs/Files/LineLengthSniff.php b/vendor/squizlabs/php_codesniffer/src/Standards/Generic/Sniffs/Files/LineLengthSniff.php new file mode 100644 index 00000000..5aa45ea0 --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/Generic/Sniffs/Files/LineLengthSniff.php @@ -0,0 +1,201 @@ + + * @copyright 2006-2015 Squiz Pty Ltd (ABN 77 084 670 600) + * @license https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence + */ + +namespace PHP_CodeSniffer\Standards\Generic\Sniffs\Files; + +use PHP_CodeSniffer\Files\File; +use PHP_CodeSniffer\Sniffs\Sniff; +use PHP_CodeSniffer\Util\Tokens; + +class LineLengthSniff implements Sniff +{ + + /** + * The limit that the length of a line should not exceed. + * + * @var integer + */ + public $lineLimit = 80; + + /** + * The limit that the length of a line must not exceed. + * + * Set to zero (0) to disable. + * + * @var integer + */ + public $absoluteLineLimit = 100; + + /** + * Whether or not to ignore trailing comments. + * + * This has the effect of also ignoring all lines + * that only contain comments. + * + * @var boolean + */ + public $ignoreComments = false; + + + /** + * Returns an array of tokens this test wants to listen for. + * + * @return array + */ + public function register() + { + return [T_OPEN_TAG]; + + }//end register() + + + /** + * Processes this test, when one of its tokens is encountered. + * + * @param \PHP_CodeSniffer\Files\File $phpcsFile The file being scanned. + * @param int $stackPtr The position of the current token in + * the stack passed in $tokens. + * + * @return int + */ + public function process(File $phpcsFile, $stackPtr) + { + $tokens = $phpcsFile->getTokens(); + for ($i = 1; $i < $phpcsFile->numTokens; $i++) { + if ($tokens[$i]['column'] === 1) { + $this->checkLineLength($phpcsFile, $tokens, $i); + } + } + + $this->checkLineLength($phpcsFile, $tokens, $i); + + // Ignore the rest of the file. + return ($phpcsFile->numTokens + 1); + + }//end process() + + + /** + * Checks if a line is too long. + * + * @param \PHP_CodeSniffer\Files\File $phpcsFile The file being scanned. + * @param array $tokens The token stack. + * @param int $stackPtr The first token on the next line. + * + * @return void + */ + protected function checkLineLength($phpcsFile, $tokens, $stackPtr) + { + // The passed token is the first on the line. + $stackPtr--; + + if ($tokens[$stackPtr]['column'] === 1 + && $tokens[$stackPtr]['length'] === 0 + ) { + // Blank line. + return; + } + + if ($tokens[$stackPtr]['column'] !== 1 + && $tokens[$stackPtr]['content'] === $phpcsFile->eolChar + ) { + $stackPtr--; + } + + $onlyComment = false; + if (isset(Tokens::$commentTokens[$tokens[$stackPtr]['code']]) === true) { + $prevNonWhiteSpace = $phpcsFile->findPrevious(Tokens::$emptyTokens, ($stackPtr - 1), null, true); + if ($tokens[$stackPtr]['line'] !== $tokens[$prevNonWhiteSpace]['line']) { + $onlyComment = true; + } + } + + if ($onlyComment === true + && isset(Tokens::$phpcsCommentTokens[$tokens[$stackPtr]['code']]) === true + ) { + // Ignore PHPCS annotation comments that are on a line by themselves. + return; + } + + $lineLength = ($tokens[$stackPtr]['column'] + $tokens[$stackPtr]['length'] - 1); + + if ($this->ignoreComments === true + && isset(Tokens::$commentTokens[$tokens[$stackPtr]['code']]) === true + ) { + // Trailing comments are being ignored in line length calculations. + if ($onlyComment === true) { + // The comment is the only thing on the line, so no need to check length. + return; + } + + $lineLength -= $tokens[$stackPtr]['length']; + } + + // Record metrics for common line length groupings. + if ($lineLength <= 80) { + $phpcsFile->recordMetric($stackPtr, 'Line length', '80 or less'); + } else if ($lineLength <= 120) { + $phpcsFile->recordMetric($stackPtr, 'Line length', '81-120'); + } else if ($lineLength <= 150) { + $phpcsFile->recordMetric($stackPtr, 'Line length', '121-150'); + } else { + $phpcsFile->recordMetric($stackPtr, 'Line length', '151 or more'); + } + + if ($onlyComment === true) { + // If this is a long comment, check if it can be broken up onto multiple lines. + // Some comments contain unbreakable strings like URLs and so it makes sense + // to ignore the line length in these cases if the URL would be longer than the max + // line length once you indent it to the correct level. + if ($lineLength > $this->lineLimit) { + $oldLength = strlen($tokens[$stackPtr]['content']); + $newLength = strlen(ltrim($tokens[$stackPtr]['content'], "/#\t ")); + $indent = (($tokens[$stackPtr]['column'] - 1) + ($oldLength - $newLength)); + + $nonBreakingLength = $tokens[$stackPtr]['length']; + + $space = strrpos($tokens[$stackPtr]['content'], ' '); + if ($space !== false) { + $nonBreakingLength -= ($space + 1); + } + + if (($nonBreakingLength + $indent) > $this->lineLimit) { + return; + } + } + }//end if + + if ($this->absoluteLineLimit > 0 + && $lineLength > $this->absoluteLineLimit + ) { + $data = [ + $this->absoluteLineLimit, + $lineLength, + ]; + + $error = 'Line exceeds maximum limit of %s characters; contains %s characters'; + $phpcsFile->addError($error, $stackPtr, 'MaxExceeded', $data); + } else if ($lineLength > $this->lineLimit) { + $data = [ + $this->lineLimit, + $lineLength, + ]; + + $warning = 'Line exceeds %s characters; contains %s characters'; + $phpcsFile->addWarning($warning, $stackPtr, 'TooLong', $data); + } + + }//end checkLineLength() + + +}//end class diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/Generic/Sniffs/Files/LowercasedFilenameSniff.php b/vendor/squizlabs/php_codesniffer/src/Standards/Generic/Sniffs/Files/LowercasedFilenameSniff.php new file mode 100644 index 00000000..a9fd4c5d --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/Generic/Sniffs/Files/LowercasedFilenameSniff.php @@ -0,0 +1,70 @@ + + * @copyright 2010-2014 Andy Grunwald + * @license https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence + */ + +namespace PHP_CodeSniffer\Standards\Generic\Sniffs\Files; + +use PHP_CodeSniffer\Files\File; +use PHP_CodeSniffer\Sniffs\Sniff; + +class LowercasedFilenameSniff implements Sniff +{ + + + /** + * Returns an array of tokens this test wants to listen for. + * + * @return array + */ + public function register() + { + return [ + T_OPEN_TAG, + T_OPEN_TAG_WITH_ECHO, + ]; + + }//end register() + + + /** + * Processes this sniff, when one of its tokens is encountered. + * + * @param \PHP_CodeSniffer\Files\File $phpcsFile The file being scanned. + * @param int $stackPtr The position of the current token in + * the stack passed in $tokens. + * + * @return int + */ + public function process(File $phpcsFile, $stackPtr) + { + $filename = $phpcsFile->getFilename(); + if ($filename === 'STDIN') { + return; + } + + $filename = basename($filename); + $lowercaseFilename = strtolower($filename); + if ($filename !== $lowercaseFilename) { + $data = [ + $filename, + $lowercaseFilename, + ]; + $error = 'Filename "%s" doesn\'t match the expected filename "%s"'; + $phpcsFile->addError($error, $stackPtr, 'NotFound', $data); + $phpcsFile->recordMetric($stackPtr, 'Lowercase filename', 'no'); + } else { + $phpcsFile->recordMetric($stackPtr, 'Lowercase filename', 'yes'); + } + + // Ignore the rest of the file. + return ($phpcsFile->numTokens + 1); + + }//end process() + + +}//end class diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/Generic/Sniffs/Files/OneClassPerFileSniff.php b/vendor/squizlabs/php_codesniffer/src/Standards/Generic/Sniffs/Files/OneClassPerFileSniff.php new file mode 100644 index 00000000..9bcc00c1 --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/Generic/Sniffs/Files/OneClassPerFileSniff.php @@ -0,0 +1,51 @@ + + * @copyright 2010-2014 Andy Grunwald + * @license https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence + */ + +namespace PHP_CodeSniffer\Standards\Generic\Sniffs\Files; + +use PHP_CodeSniffer\Files\File; +use PHP_CodeSniffer\Sniffs\Sniff; + +class OneClassPerFileSniff implements Sniff +{ + + + /** + * Returns an array of tokens this test wants to listen for. + * + * @return array + */ + public function register() + { + return [T_CLASS]; + + }//end register() + + + /** + * Processes this sniff, when one of its tokens is encountered. + * + * @param \PHP_CodeSniffer\Files\File $phpcsFile The file being scanned. + * @param int $stackPtr The position of the current token in + * the stack passed in $tokens. + * + * @return void + */ + public function process(File $phpcsFile, $stackPtr) + { + $nextClass = $phpcsFile->findNext($this->register(), ($stackPtr + 1)); + if ($nextClass !== false) { + $error = 'Only one class is allowed in a file'; + $phpcsFile->addError($error, $nextClass, 'MultipleFound'); + } + + }//end process() + + +}//end class diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/Generic/Sniffs/Files/OneInterfacePerFileSniff.php b/vendor/squizlabs/php_codesniffer/src/Standards/Generic/Sniffs/Files/OneInterfacePerFileSniff.php new file mode 100644 index 00000000..f7cfa8d3 --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/Generic/Sniffs/Files/OneInterfacePerFileSniff.php @@ -0,0 +1,51 @@ + + * @copyright 2010-2014 Andy Grunwald + * @license https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence + */ + +namespace PHP_CodeSniffer\Standards\Generic\Sniffs\Files; + +use PHP_CodeSniffer\Files\File; +use PHP_CodeSniffer\Sniffs\Sniff; + +class OneInterfacePerFileSniff implements Sniff +{ + + + /** + * Returns an array of tokens this test wants to listen for. + * + * @return array + */ + public function register() + { + return [T_INTERFACE]; + + }//end register() + + + /** + * Processes this sniff, when one of its tokens is encountered. + * + * @param \PHP_CodeSniffer\Files\File $phpcsFile The file being scanned. + * @param int $stackPtr The position of the current token in + * the stack passed in $tokens. + * + * @return void + */ + public function process(File $phpcsFile, $stackPtr) + { + $nextInterface = $phpcsFile->findNext($this->register(), ($stackPtr + 1)); + if ($nextInterface !== false) { + $error = 'Only one interface is allowed in a file'; + $phpcsFile->addError($error, $nextInterface, 'MultipleFound'); + } + + }//end process() + + +}//end class diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/Generic/Sniffs/Files/OneObjectStructurePerFileSniff.php b/vendor/squizlabs/php_codesniffer/src/Standards/Generic/Sniffs/Files/OneObjectStructurePerFileSniff.php new file mode 100644 index 00000000..d9d71b69 --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/Generic/Sniffs/Files/OneObjectStructurePerFileSniff.php @@ -0,0 +1,55 @@ + + * @copyright 2006-2015 Squiz Pty Ltd (ABN 77 084 670 600) + * @license https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence + */ + +namespace PHP_CodeSniffer\Standards\Generic\Sniffs\Files; + +use PHP_CodeSniffer\Files\File; +use PHP_CodeSniffer\Sniffs\Sniff; + +class OneObjectStructurePerFileSniff implements Sniff +{ + + + /** + * Returns an array of tokens this test wants to listen for. + * + * @return array + */ + public function register() + { + return [ + T_CLASS, + T_INTERFACE, + T_TRAIT, + ]; + + }//end register() + + + /** + * Processes this sniff, when one of its tokens is encountered. + * + * @param \PHP_CodeSniffer\Files\File $phpcsFile The file being scanned. + * @param int $stackPtr The position of the current token in + * the stack passed in $tokens. + * + * @return void + */ + public function process(File $phpcsFile, $stackPtr) + { + $nextClass = $phpcsFile->findNext($this->register(), ($stackPtr + 1)); + if ($nextClass !== false) { + $error = 'Only one object structure is allowed in a file'; + $phpcsFile->addError($error, $nextClass, 'MultipleFound'); + } + + }//end process() + + +}//end class diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/Generic/Sniffs/Files/OneTraitPerFileSniff.php b/vendor/squizlabs/php_codesniffer/src/Standards/Generic/Sniffs/Files/OneTraitPerFileSniff.php new file mode 100644 index 00000000..dd97da85 --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/Generic/Sniffs/Files/OneTraitPerFileSniff.php @@ -0,0 +1,51 @@ + + * @copyright 2010-2014 Alexander Obuhovich + * @license https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence + */ + +namespace PHP_CodeSniffer\Standards\Generic\Sniffs\Files; + +use PHP_CodeSniffer\Files\File; +use PHP_CodeSniffer\Sniffs\Sniff; + +class OneTraitPerFileSniff implements Sniff +{ + + + /** + * Returns an array of tokens this test wants to listen for. + * + * @return array + */ + public function register() + { + return [T_TRAIT]; + + }//end register() + + + /** + * Processes this sniff, when one of its tokens is encountered. + * + * @param \PHP_CodeSniffer\Files\File $phpcsFile The file being scanned. + * @param int $stackPtr The position of the current token in + * the stack passed in $tokens. + * + * @return void + */ + public function process(File $phpcsFile, $stackPtr) + { + $nextClass = $phpcsFile->findNext($this->register(), ($stackPtr + 1)); + if ($nextClass !== false) { + $error = 'Only one trait is allowed in a file'; + $phpcsFile->addError($error, $nextClass, 'MultipleFound'); + } + + }//end process() + + +}//end class diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/Generic/Sniffs/Formatting/DisallowMultipleStatementsSniff.php b/vendor/squizlabs/php_codesniffer/src/Standards/Generic/Sniffs/Formatting/DisallowMultipleStatementsSniff.php new file mode 100644 index 00000000..6f9ff9f9 --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/Generic/Sniffs/Formatting/DisallowMultipleStatementsSniff.php @@ -0,0 +1,105 @@ + + * @copyright 2006-2015 Squiz Pty Ltd (ABN 77 084 670 600) + * @license https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence + */ + +namespace PHP_CodeSniffer\Standards\Generic\Sniffs\Formatting; + +use PHP_CodeSniffer\Files\File; +use PHP_CodeSniffer\Sniffs\Sniff; + +class DisallowMultipleStatementsSniff implements Sniff +{ + + + /** + * Returns an array of tokens this test wants to listen for. + * + * @return array + */ + public function register() + { + return [T_SEMICOLON]; + + }//end register() + + + /** + * Processes this test, when one of its tokens is encountered. + * + * @param \PHP_CodeSniffer\Files\File $phpcsFile The file being scanned. + * @param int $stackPtr The position of the current token in + * the stack passed in $tokens. + * + * @return void + */ + public function process(File $phpcsFile, $stackPtr) + { + $tokens = $phpcsFile->getTokens(); + $fixable = true; + $prev = $stackPtr; + + do { + $prev = $phpcsFile->findPrevious([T_SEMICOLON, T_OPEN_TAG, T_OPEN_TAG_WITH_ECHO, T_PHPCS_IGNORE], ($prev - 1)); + if ($prev === false + || $tokens[$prev]['code'] === T_OPEN_TAG + || $tokens[$prev]['code'] === T_OPEN_TAG_WITH_ECHO + ) { + $phpcsFile->recordMetric($stackPtr, 'Multiple statements on same line', 'no'); + return; + } + + if ($tokens[$prev]['code'] === T_PHPCS_IGNORE) { + $fixable = false; + } + } while ($tokens[$prev]['code'] === T_PHPCS_IGNORE); + + // Ignore multiple statements in a FOR condition. + foreach ([$stackPtr, $prev] as $checkToken) { + if (isset($tokens[$checkToken]['nested_parenthesis']) === true) { + foreach ($tokens[$checkToken]['nested_parenthesis'] as $bracket) { + if (isset($tokens[$bracket]['parenthesis_owner']) === false) { + // Probably a closure sitting inside a function call. + continue; + } + + $owner = $tokens[$bracket]['parenthesis_owner']; + if ($tokens[$owner]['code'] === T_FOR) { + return; + } + } + } + } + + if ($tokens[$prev]['line'] === $tokens[$stackPtr]['line']) { + $phpcsFile->recordMetric($stackPtr, 'Multiple statements on same line', 'yes'); + + $error = 'Each PHP statement must be on a line by itself'; + $code = 'SameLine'; + if ($fixable === false) { + $phpcsFile->addError($error, $stackPtr, $code); + return; + } + + $fix = $phpcsFile->addFixableError($error, $stackPtr, $code); + if ($fix === true) { + $phpcsFile->fixer->beginChangeset(); + $phpcsFile->fixer->addNewline($prev); + if ($tokens[($prev + 1)]['code'] === T_WHITESPACE) { + $phpcsFile->fixer->replaceToken(($prev + 1), ''); + } + + $phpcsFile->fixer->endChangeset(); + } + } else { + $phpcsFile->recordMetric($stackPtr, 'Multiple statements on same line', 'no'); + }//end if + + }//end process() + + +}//end class diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/Generic/Sniffs/Formatting/MultipleStatementAlignmentSniff.php b/vendor/squizlabs/php_codesniffer/src/Standards/Generic/Sniffs/Formatting/MultipleStatementAlignmentSniff.php new file mode 100644 index 00000000..802e5944 --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/Generic/Sniffs/Formatting/MultipleStatementAlignmentSniff.php @@ -0,0 +1,426 @@ + + * @copyright 2006-2015 Squiz Pty Ltd (ABN 77 084 670 600) + * @license https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence + */ + +namespace PHP_CodeSniffer\Standards\Generic\Sniffs\Formatting; + +use PHP_CodeSniffer\Files\File; +use PHP_CodeSniffer\Sniffs\Sniff; +use PHP_CodeSniffer\Util\Tokens; + +class MultipleStatementAlignmentSniff implements Sniff +{ + + /** + * A list of tokenizers this sniff supports. + * + * @var array + */ + public $supportedTokenizers = [ + 'PHP', + 'JS', + ]; + + /** + * If true, an error will be thrown; otherwise a warning. + * + * @var boolean + */ + public $error = false; + + /** + * The maximum amount of padding before the alignment is ignored. + * + * If the amount of padding required to align this assignment with the + * surrounding assignments exceeds this number, the assignment will be + * ignored and no errors or warnings will be thrown. + * + * @var integer + */ + public $maxPadding = 1000; + + /** + * Controls which side of the assignment token is used for alignment. + * + * @var boolean + */ + public $alignAtEnd = true; + + + /** + * Returns an array of tokens this test wants to listen for. + * + * @return array + */ + public function register() + { + $tokens = Tokens::$assignmentTokens; + unset($tokens[T_DOUBLE_ARROW]); + return $tokens; + + }//end register() + + + /** + * Processes this test, when one of its tokens is encountered. + * + * @param \PHP_CodeSniffer\Files\File $phpcsFile The file being scanned. + * @param int $stackPtr The position of the current token + * in the stack passed in $tokens. + * + * @return int + */ + public function process(File $phpcsFile, $stackPtr) + { + $lastAssign = $this->checkAlignment($phpcsFile, $stackPtr); + return ($lastAssign + 1); + + }//end process() + + + /** + * Processes this test, when one of its tokens is encountered. + * + * @param \PHP_CodeSniffer\Files\File $phpcsFile The file being scanned. + * @param int $stackPtr The position of the current token + * in the stack passed in $tokens. + * @param int $end The token where checking should end. + * If NULL, the entire file will be checked. + * + * @return int + */ + public function checkAlignment($phpcsFile, $stackPtr, $end=null) + { + $tokens = $phpcsFile->getTokens(); + + // Ignore assignments used in a condition, like an IF or FOR or closure param defaults. + if (isset($tokens[$stackPtr]['nested_parenthesis']) === true) { + // If the parenthesis is on the same line as the assignment, + // then it should be ignored as it is specifically being grouped. + $parens = $tokens[$stackPtr]['nested_parenthesis']; + $lastParen = array_pop($parens); + if ($tokens[$lastParen]['line'] === $tokens[$stackPtr]['line']) { + return $stackPtr; + } + + foreach ($tokens[$stackPtr]['nested_parenthesis'] as $start => $end) { + if (isset($tokens[$start]['parenthesis_owner']) === true) { + return $stackPtr; + } + } + } + + $assignments = []; + $prevAssign = null; + $lastLine = $tokens[$stackPtr]['line']; + $maxPadding = null; + $stopped = null; + $lastCode = $stackPtr; + $lastSemi = null; + $arrayEnd = null; + + if ($end === null) { + $end = $phpcsFile->numTokens; + } + + $find = Tokens::$assignmentTokens; + unset($find[T_DOUBLE_ARROW]); + + $scopes = Tokens::$scopeOpeners; + unset($scopes[T_CLOSURE]); + unset($scopes[T_ANON_CLASS]); + unset($scopes[T_OBJECT]); + + for ($assign = $stackPtr; $assign < $end; $assign++) { + if ($tokens[$assign]['level'] < $tokens[$stackPtr]['level']) { + // Statement is in a different context, so the block is over. + break; + } + + if (isset($tokens[$assign]['scope_opener']) === true + && $tokens[$assign]['level'] === $tokens[$stackPtr]['level'] + ) { + if (isset($scopes[$tokens[$assign]['code']]) === true) { + // This type of scope indicates that the assignment block is over. + break; + } + + // Skip over the scope block because it is seen as part of the assignment block, + // but also process any assignment blocks that are inside as well. + $nextAssign = $phpcsFile->findNext($find, ($assign + 1), ($tokens[$assign]['scope_closer'] - 1)); + if ($nextAssign !== false) { + $assign = $this->checkAlignment($phpcsFile, $nextAssign); + } else { + $assign = $tokens[$assign]['scope_closer']; + } + + $lastCode = $assign; + continue; + } + + if ($assign === $arrayEnd) { + $arrayEnd = null; + } + + if (isset($find[$tokens[$assign]['code']]) === false) { + // A blank line indicates that the assignment block has ended. + if (isset(Tokens::$emptyTokens[$tokens[$assign]['code']]) === false + && ($tokens[$assign]['line'] - $tokens[$lastCode]['line']) > 1 + && $tokens[$assign]['level'] === $tokens[$stackPtr]['level'] + && $arrayEnd === null + ) { + break; + } + + if ($tokens[$assign]['code'] === T_CLOSE_TAG) { + // Breaking out of PHP ends the assignment block. + break; + } + + if ($tokens[$assign]['code'] === T_OPEN_SHORT_ARRAY + && isset($tokens[$assign]['bracket_closer']) === true + ) { + $arrayEnd = $tokens[$assign]['bracket_closer']; + } + + if ($tokens[$assign]['code'] === T_ARRAY + && isset($tokens[$assign]['parenthesis_opener']) === true + && isset($tokens[$tokens[$assign]['parenthesis_opener']]['parenthesis_closer']) === true + ) { + $arrayEnd = $tokens[$tokens[$assign]['parenthesis_opener']]['parenthesis_closer']; + } + + if (isset(Tokens::$emptyTokens[$tokens[$assign]['code']]) === false) { + $lastCode = $assign; + + if ($tokens[$assign]['code'] === T_SEMICOLON) { + if ($tokens[$assign]['conditions'] === $tokens[$stackPtr]['conditions']) { + if ($lastSemi !== null && $prevAssign !== null && $lastSemi > $prevAssign) { + // This statement did not have an assignment operator in it. + break; + } else { + $lastSemi = $assign; + } + } else if ($tokens[$assign]['level'] < $tokens[$stackPtr]['level']) { + // Statement is in a different context, so the block is over. + break; + } + } + }//end if + + continue; + } else if ($assign !== $stackPtr && $tokens[$assign]['line'] === $lastLine) { + // Skip multiple assignments on the same line. We only need to + // try and align the first assignment. + continue; + }//end if + + if ($assign !== $stackPtr) { + if ($tokens[$assign]['level'] > $tokens[$stackPtr]['level']) { + // Has to be nested inside the same conditions as the first assignment. + // We've gone one level down, so process this new block. + $assign = $this->checkAlignment($phpcsFile, $assign); + $lastCode = $assign; + continue; + } else if ($tokens[$assign]['level'] < $tokens[$stackPtr]['level']) { + // We've gone one level up, so the block we are processing is done. + break; + } else if ($arrayEnd !== null) { + // Assignments inside arrays are not part of + // the original block, so process this new block. + $assign = ($this->checkAlignment($phpcsFile, $assign, $arrayEnd) - 1); + $arrayEnd = null; + $lastCode = $assign; + continue; + } + + // Make sure it is not assigned inside a condition (eg. IF, FOR). + if (isset($tokens[$assign]['nested_parenthesis']) === true) { + // If the parenthesis is on the same line as the assignment, + // then it should be ignored as it is specifically being grouped. + $parens = $tokens[$assign]['nested_parenthesis']; + $lastParen = array_pop($parens); + if ($tokens[$lastParen]['line'] === $tokens[$assign]['line']) { + break; + } + + foreach ($tokens[$assign]['nested_parenthesis'] as $start => $end) { + if (isset($tokens[$start]['parenthesis_owner']) === true) { + break(2); + } + } + } + }//end if + + $var = $phpcsFile->findPrevious( + Tokens::$emptyTokens, + ($assign - 1), + null, + true + ); + + // Make sure we wouldn't break our max padding length if we + // aligned with this statement, or they wouldn't break the max + // padding length if they aligned with us. + $varEnd = $tokens[($var + 1)]['column']; + $assignLen = $tokens[$assign]['length']; + if ($this->alignAtEnd !== true) { + $assignLen = 1; + } + + if ($assign !== $stackPtr) { + if ($prevAssign === null) { + // Processing an inner block but no assignments found. + break; + } + + if (($varEnd + 1) > $assignments[$prevAssign]['assign_col']) { + $padding = 1; + $assignColumn = ($varEnd + 1); + } else { + $padding = ($assignments[$prevAssign]['assign_col'] - $varEnd + $assignments[$prevAssign]['assign_len'] - $assignLen); + if ($padding <= 0) { + $padding = 1; + } + + if ($padding > $this->maxPadding) { + $stopped = $assign; + break; + } + + $assignColumn = ($varEnd + $padding); + }//end if + + if (($assignColumn + $assignLen) > ($assignments[$maxPadding]['assign_col'] + $assignments[$maxPadding]['assign_len'])) { + $newPadding = ($varEnd - $assignments[$maxPadding]['var_end'] + $assignLen - $assignments[$maxPadding]['assign_len'] + 1); + if ($newPadding > $this->maxPadding) { + $stopped = $assign; + break; + } else { + // New alignment settings for previous assignments. + foreach ($assignments as $i => $data) { + if ($i === $assign) { + break; + } + + $newPadding = ($varEnd - $data['var_end'] + $assignLen - $data['assign_len'] + 1); + $assignments[$i]['expected'] = $newPadding; + $assignments[$i]['assign_col'] = ($data['var_end'] + $newPadding); + } + + $padding = 1; + $assignColumn = ($varEnd + 1); + } + } else if ($padding > $assignments[$maxPadding]['expected']) { + $maxPadding = $assign; + }//end if + } else { + $padding = 1; + $assignColumn = ($varEnd + 1); + $maxPadding = $assign; + }//end if + + $found = 0; + if ($tokens[($var + 1)]['code'] === T_WHITESPACE) { + $found = $tokens[($var + 1)]['length']; + if ($found === 0) { + // This means a newline was found. + $found = 1; + } + } + + $assignments[$assign] = [ + 'var_end' => $varEnd, + 'assign_len' => $assignLen, + 'assign_col' => $assignColumn, + 'expected' => $padding, + 'found' => $found, + ]; + + $lastLine = $tokens[$assign]['line']; + $prevAssign = $assign; + }//end for + + if (empty($assignments) === true) { + return $stackPtr; + } + + $numAssignments = count($assignments); + + $errorGenerated = false; + foreach ($assignments as $assignment => $data) { + if ($data['found'] === $data['expected']) { + continue; + } + + $expectedText = $data['expected'].' space'; + if ($data['expected'] !== 1) { + $expectedText .= 's'; + } + + if ($data['found'] === null) { + $foundText = 'a new line'; + } else { + $foundText = $data['found'].' space'; + if ($data['found'] !== 1) { + $foundText .= 's'; + } + } + + if ($numAssignments === 1) { + $type = 'Incorrect'; + $error = 'Equals sign not aligned correctly; expected %s but found %s'; + } else { + $type = 'NotSame'; + $error = 'Equals sign not aligned with surrounding assignments; expected %s but found %s'; + } + + $errorData = [ + $expectedText, + $foundText, + ]; + + if ($this->error === true) { + $fix = $phpcsFile->addFixableError($error, $assignment, $type, $errorData); + } else { + $fix = $phpcsFile->addFixableWarning($error, $assignment, $type.'Warning', $errorData); + } + + $errorGenerated = true; + + if ($fix === true && $data['found'] !== null) { + $newContent = str_repeat(' ', $data['expected']); + if ($data['found'] === 0) { + $phpcsFile->fixer->addContentBefore($assignment, $newContent); + } else { + $phpcsFile->fixer->replaceToken(($assignment - 1), $newContent); + } + } + }//end foreach + + if ($numAssignments > 1) { + if ($errorGenerated === true) { + $phpcsFile->recordMetric($stackPtr, 'Adjacent assignments aligned', 'no'); + } else { + $phpcsFile->recordMetric($stackPtr, 'Adjacent assignments aligned', 'yes'); + } + } + + if ($stopped !== null) { + return $this->checkAlignment($phpcsFile, $stopped); + } else { + return $assign; + } + + }//end checkAlignment() + + +}//end class diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/Generic/Sniffs/Formatting/NoSpaceAfterCastSniff.php b/vendor/squizlabs/php_codesniffer/src/Standards/Generic/Sniffs/Formatting/NoSpaceAfterCastSniff.php new file mode 100644 index 00000000..f6a37daf --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/Generic/Sniffs/Formatting/NoSpaceAfterCastSniff.php @@ -0,0 +1,61 @@ + + * @copyright 2006-2015 Squiz Pty Ltd (ABN 77 084 670 600) + * @license https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence + * + * @deprecated 3.4.0 Use the Generic.Formatting.SpaceAfterCast sniff with + * the $spacing property set to 0 instead. + */ + +namespace PHP_CodeSniffer\Standards\Generic\Sniffs\Formatting; + +use PHP_CodeSniffer\Files\File; +use PHP_CodeSniffer\Sniffs\Sniff; +use PHP_CodeSniffer\Util\Tokens; + +class NoSpaceAfterCastSniff implements Sniff +{ + + + /** + * Returns an array of tokens this test wants to listen for. + * + * @return array + */ + public function register() + { + return Tokens::$castTokens; + + }//end register() + + + /** + * Processes this test, when one of its tokens is encountered. + * + * @param \PHP_CodeSniffer\Files\File $phpcsFile The file being scanned. + * @param int $stackPtr The position of the current token in + * the stack passed in $tokens. + * + * @return void + */ + public function process(File $phpcsFile, $stackPtr) + { + $tokens = $phpcsFile->getTokens(); + + if ($tokens[($stackPtr + 1)]['code'] !== T_WHITESPACE) { + return; + } + + $error = 'A cast statement must not be followed by a space'; + $fix = $phpcsFile->addFixableError($error, $stackPtr, 'SpaceFound'); + if ($fix === true) { + $phpcsFile->fixer->replaceToken(($stackPtr + 1), ''); + } + + }//end process() + + +}//end class diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/Generic/Sniffs/Formatting/SpaceAfterCastSniff.php b/vendor/squizlabs/php_codesniffer/src/Standards/Generic/Sniffs/Formatting/SpaceAfterCastSniff.php new file mode 100644 index 00000000..f19489e8 --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/Generic/Sniffs/Formatting/SpaceAfterCastSniff.php @@ -0,0 +1,153 @@ + + * @copyright 2006-2015 Squiz Pty Ltd (ABN 77 084 670 600) + * @license https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence + */ + +namespace PHP_CodeSniffer\Standards\Generic\Sniffs\Formatting; + +use PHP_CodeSniffer\Files\File; +use PHP_CodeSniffer\Sniffs\Sniff; +use PHP_CodeSniffer\Util\Tokens; + +class SpaceAfterCastSniff implements Sniff +{ + + /** + * The number of spaces desired after a cast token. + * + * @var integer + */ + public $spacing = 1; + + /** + * Allow newlines instead of spaces. + * + * @var boolean + */ + public $ignoreNewlines = false; + + + /** + * Returns an array of tokens this test wants to listen for. + * + * @return array + */ + public function register() + { + return Tokens::$castTokens; + + }//end register() + + + /** + * Processes this test, when one of its tokens is encountered. + * + * @param \PHP_CodeSniffer\Files\File $phpcsFile The file being scanned. + * @param int $stackPtr The position of the current token in + * the stack passed in $tokens. + * + * @return void + */ + public function process(File $phpcsFile, $stackPtr) + { + $tokens = $phpcsFile->getTokens(); + $this->spacing = (int) $this->spacing; + + if ($tokens[$stackPtr]['code'] === T_BINARY_CAST + && $tokens[$stackPtr]['content'] === 'b' + ) { + // You can't replace a space after this type of binary casting. + return; + } + + $nextNonEmpty = $phpcsFile->findNext(Tokens::$emptyTokens, ($stackPtr + 1), null, true); + if ($nextNonEmpty === false) { + return; + } + + if ($this->ignoreNewlines === true + && $tokens[$stackPtr]['line'] !== $tokens[$nextNonEmpty]['line'] + ) { + $phpcsFile->recordMetric($stackPtr, 'Spacing after cast statement', 'newline'); + return; + } + + if ($this->spacing === 0 && $nextNonEmpty === ($stackPtr + 1)) { + $phpcsFile->recordMetric($stackPtr, 'Spacing after cast statement', 0); + return; + } + + $nextNonWhitespace = $phpcsFile->findNext(T_WHITESPACE, ($stackPtr + 1), null, true); + if ($nextNonEmpty !== $nextNonWhitespace) { + $error = 'Expected %s space(s) after cast statement; comment found'; + $data = [$this->spacing]; + $phpcsFile->addError($error, $stackPtr, 'CommentFound', $data); + + if ($tokens[($stackPtr + 1)]['code'] === T_WHITESPACE) { + $phpcsFile->recordMetric($stackPtr, 'Spacing after cast statement', $tokens[($stackPtr + 1)]['length']); + } else { + $phpcsFile->recordMetric($stackPtr, 'Spacing after cast statement', 0); + } + + return; + } + + $found = 0; + if ($tokens[$stackPtr]['line'] !== $tokens[$nextNonEmpty]['line']) { + $found = 'newline'; + } else if ($tokens[($stackPtr + 1)]['code'] === T_WHITESPACE) { + $found = $tokens[($stackPtr + 1)]['length']; + } + + $phpcsFile->recordMetric($stackPtr, 'Spacing after cast statement', $found); + + if ($found === $this->spacing) { + return; + } + + $error = 'Expected %s space(s) after cast statement; %s found'; + $data = [ + $this->spacing, + $found, + ]; + + $errorCode = 'TooMuchSpace'; + if ($this->spacing !== 0) { + if ($found === 0) { + $errorCode = 'NoSpace'; + } else if ($found !== 'newline' && $found < $this->spacing) { + $errorCode = 'TooLittleSpace'; + } + } + + $fix = $phpcsFile->addFixableError($error, $stackPtr, $errorCode, $data); + + if ($fix === true) { + $padding = str_repeat(' ', $this->spacing); + if ($found === 0) { + $phpcsFile->fixer->addContent($stackPtr, $padding); + } else { + $phpcsFile->fixer->beginChangeset(); + $start = ($stackPtr + 1); + + if ($this->spacing > 0) { + $phpcsFile->fixer->replaceToken($start, $padding); + ++$start; + } + + for ($i = $start; $i < $nextNonWhitespace; $i++) { + $phpcsFile->fixer->replaceToken($i, ''); + } + + $phpcsFile->fixer->endChangeset(); + } + } + + }//end process() + + +}//end class diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/Generic/Sniffs/Formatting/SpaceAfterNotSniff.php b/vendor/squizlabs/php_codesniffer/src/Standards/Generic/Sniffs/Formatting/SpaceAfterNotSniff.php new file mode 100644 index 00000000..b74ca80e --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/Generic/Sniffs/Formatting/SpaceAfterNotSniff.php @@ -0,0 +1,135 @@ + + * @copyright 2006-2015 Squiz Pty Ltd (ABN 77 084 670 600) + * @license https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence + */ + +namespace PHP_CodeSniffer\Standards\Generic\Sniffs\Formatting; + +use PHP_CodeSniffer\Files\File; +use PHP_CodeSniffer\Sniffs\Sniff; +use PHP_CodeSniffer\Util\Tokens; + +class SpaceAfterNotSniff implements Sniff +{ + + /** + * A list of tokenizers this sniff supports. + * + * @var array + */ + public $supportedTokenizers = [ + 'PHP', + 'JS', + ]; + + /** + * The number of spaces desired after the NOT operator. + * + * @var integer + */ + public $spacing = 1; + + /** + * Allow newlines instead of spaces. + * + * @var boolean + */ + public $ignoreNewlines = false; + + + /** + * Returns an array of tokens this test wants to listen for. + * + * @return array + */ + public function register() + { + return [T_BOOLEAN_NOT]; + + }//end register() + + + /** + * Processes this test, when one of its tokens is encountered. + * + * @param \PHP_CodeSniffer\Files\File $phpcsFile The file being scanned. + * @param int $stackPtr The position of the current token in + * the stack passed in $tokens. + * + * @return void + */ + public function process(File $phpcsFile, $stackPtr) + { + $tokens = $phpcsFile->getTokens(); + $this->spacing = (int) $this->spacing; + + $nextNonEmpty = $phpcsFile->findNext(Tokens::$emptyTokens, ($stackPtr + 1), null, true); + if ($nextNonEmpty === false) { + return; + } + + if ($this->ignoreNewlines === true + && $tokens[$stackPtr]['line'] !== $tokens[$nextNonEmpty]['line'] + ) { + return; + } + + if ($this->spacing === 0 && $nextNonEmpty === ($stackPtr + 1)) { + return; + } + + $nextNonWhitespace = $phpcsFile->findNext(T_WHITESPACE, ($stackPtr + 1), null, true); + if ($nextNonEmpty !== $nextNonWhitespace) { + $error = 'Expected %s space(s) after NOT operator; comment found'; + $data = [$this->spacing]; + $phpcsFile->addError($error, $stackPtr, 'CommentFound', $data); + return; + } + + $found = 0; + if ($tokens[$stackPtr]['line'] !== $tokens[$nextNonEmpty]['line']) { + $found = 'newline'; + } else if ($tokens[($stackPtr + 1)]['code'] === T_WHITESPACE) { + $found = $tokens[($stackPtr + 1)]['length']; + } + + if ($found === $this->spacing) { + return; + } + + $error = 'Expected %s space(s) after NOT operator; %s found'; + $data = [ + $this->spacing, + $found, + ]; + + $fix = $phpcsFile->addFixableError($error, $stackPtr, 'Incorrect', $data); + if ($fix === true) { + $padding = str_repeat(' ', $this->spacing); + if ($found === 0) { + $phpcsFile->fixer->addContent($stackPtr, $padding); + } else { + $phpcsFile->fixer->beginChangeset(); + $start = ($stackPtr + 1); + + if ($this->spacing > 0) { + $phpcsFile->fixer->replaceToken($start, $padding); + ++$start; + } + + for ($i = $start; $i < $nextNonWhitespace; $i++) { + $phpcsFile->fixer->replaceToken($i, ''); + } + + $phpcsFile->fixer->endChangeset(); + } + } + + }//end process() + + +}//end class diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/Generic/Sniffs/Formatting/SpaceBeforeCastSniff.php b/vendor/squizlabs/php_codesniffer/src/Standards/Generic/Sniffs/Formatting/SpaceBeforeCastSniff.php new file mode 100644 index 00000000..a4f85aeb --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/Generic/Sniffs/Formatting/SpaceBeforeCastSniff.php @@ -0,0 +1,73 @@ + + * @copyright 2006-2015 Squiz Pty Ltd (ABN 77 084 670 600) + * @license https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence + */ + +namespace PHP_CodeSniffer\Standards\Generic\Sniffs\Formatting; + +use PHP_CodeSniffer\Files\File; +use PHP_CodeSniffer\Sniffs\Sniff; +use PHP_CodeSniffer\Util\Tokens; + +class SpaceBeforeCastSniff implements Sniff +{ + + + /** + * Returns an array of tokens this test wants to listen for. + * + * @return array + */ + public function register() + { + return Tokens::$castTokens; + + }//end register() + + + /** + * Processes this test, when one of its tokens is encountered. + * + * @param \PHP_CodeSniffer\Files\File $phpcsFile The file being scanned. + * @param int $stackPtr The position of the current token in + * the stack passed in $tokens. + * + * @return void + */ + public function process(File $phpcsFile, $stackPtr) + { + $tokens = $phpcsFile->getTokens(); + + if ($tokens[$stackPtr]['column'] === 1) { + return; + } + + if ($tokens[($stackPtr - 1)]['code'] !== T_WHITESPACE) { + $error = 'A cast statement must be preceded by a single space'; + $fix = $phpcsFile->addFixableError($error, $stackPtr, 'NoSpace'); + if ($fix === true) { + $phpcsFile->fixer->addContentBefore($stackPtr, ' '); + } + + $phpcsFile->recordMetric($stackPtr, 'Spacing before cast statement', 0); + return; + } + + $phpcsFile->recordMetric($stackPtr, 'Spacing before cast statement', $tokens[($stackPtr - 1)]['length']); + + if ($tokens[($stackPtr - 1)]['column'] !== 1 && $tokens[($stackPtr - 1)]['length'] !== 1) { + $error = 'A cast statement must be preceded by a single space'; + $fix = $phpcsFile->addFixableError($error, $stackPtr, 'TooMuchSpace'); + if ($fix === true) { + $phpcsFile->fixer->replaceToken(($stackPtr - 1), ' '); + } + } + + }//end process() + + +}//end class diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/Generic/Sniffs/Functions/CallTimePassByReferenceSniff.php b/vendor/squizlabs/php_codesniffer/src/Standards/Generic/Sniffs/Functions/CallTimePassByReferenceSniff.php new file mode 100644 index 00000000..425748ce --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/Generic/Sniffs/Functions/CallTimePassByReferenceSniff.php @@ -0,0 +1,141 @@ + + * @copyright 2009-2014 Florian Grandel + * @license https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence + */ + +namespace PHP_CodeSniffer\Standards\Generic\Sniffs\Functions; + +use PHP_CodeSniffer\Files\File; +use PHP_CodeSniffer\Sniffs\Sniff; +use PHP_CodeSniffer\Util\Tokens; + +class CallTimePassByReferenceSniff implements Sniff +{ + + + /** + * Returns an array of tokens this test wants to listen for. + * + * @return array + */ + public function register() + { + return [ + T_STRING, + T_VARIABLE, + ]; + + }//end register() + + + /** + * Processes this test, when one of its tokens is encountered. + * + * @param \PHP_CodeSniffer\Files\File $phpcsFile The file being scanned. + * @param int $stackPtr The position of the current token + * in the stack passed in $tokens. + * + * @return void + */ + public function process(File $phpcsFile, $stackPtr) + { + $tokens = $phpcsFile->getTokens(); + + $findTokens = Tokens::$emptyTokens; + $findTokens[] = T_BITWISE_AND; + + $prev = $phpcsFile->findPrevious($findTokens, ($stackPtr - 1), null, true); + + // Skip tokens that are the names of functions or classes + // within their definitions. For example: function myFunction... + // "myFunction" is T_STRING but we should skip because it is not a + // function or method *call*. + $prevCode = $tokens[$prev]['code']; + if ($prevCode === T_FUNCTION || $prevCode === T_CLASS) { + return; + } + + // If the next non-whitespace token after the function or method call + // is not an opening parenthesis then it cant really be a *call*. + $functionName = $stackPtr; + $openBracket = $phpcsFile->findNext( + Tokens::$emptyTokens, + ($functionName + 1), + null, + true + ); + + if ($tokens[$openBracket]['code'] !== T_OPEN_PARENTHESIS) { + return; + } + + if (isset($tokens[$openBracket]['parenthesis_closer']) === false) { + return; + } + + $closeBracket = $tokens[$openBracket]['parenthesis_closer']; + + $nextSeparator = $openBracket; + $find = [ + T_VARIABLE, + T_OPEN_SHORT_ARRAY, + ]; + + while (($nextSeparator = $phpcsFile->findNext($find, ($nextSeparator + 1), $closeBracket)) !== false) { + if (isset($tokens[$nextSeparator]['nested_parenthesis']) === false) { + continue; + } + + if ($tokens[$nextSeparator]['code'] === T_OPEN_SHORT_ARRAY) { + $nextSeparator = $tokens[$nextSeparator]['bracket_closer']; + continue; + } + + // Make sure the variable belongs directly to this function call + // and is not inside a nested function call or array. + $brackets = $tokens[$nextSeparator]['nested_parenthesis']; + $lastBracket = array_pop($brackets); + if ($lastBracket !== $closeBracket) { + continue; + } + + $tokenBefore = $phpcsFile->findPrevious( + Tokens::$emptyTokens, + ($nextSeparator - 1), + null, + true + ); + + if ($tokens[$tokenBefore]['code'] === T_BITWISE_AND) { + if ($phpcsFile->isReference($tokenBefore) === false) { + continue; + } + + // We also want to ignore references used in assignment + // operations passed as function arguments, but isReference() + // sees them as valid references (which they are). + $tokenBefore = $phpcsFile->findPrevious( + Tokens::$emptyTokens, + ($tokenBefore - 1), + null, + true + ); + + if (isset(Tokens::$assignmentTokens[$tokens[$tokenBefore]['code']]) === true) { + continue; + } + + // T_BITWISE_AND represents a pass-by-reference. + $error = 'Call-time pass-by-reference calls are prohibited'; + $phpcsFile->addError($error, $tokenBefore, 'NotAllowed'); + }//end if + }//end while + + }//end process() + + +}//end class diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/Generic/Sniffs/Functions/FunctionCallArgumentSpacingSniff.php b/vendor/squizlabs/php_codesniffer/src/Standards/Generic/Sniffs/Functions/FunctionCallArgumentSpacingSniff.php new file mode 100644 index 00000000..ca922381 --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/Generic/Sniffs/Functions/FunctionCallArgumentSpacingSniff.php @@ -0,0 +1,185 @@ + + * @copyright 2006-2015 Squiz Pty Ltd (ABN 77 084 670 600) + * @license https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence + */ + +namespace PHP_CodeSniffer\Standards\Generic\Sniffs\Functions; + +use PHP_CodeSniffer\Files\File; +use PHP_CodeSniffer\Sniffs\Sniff; +use PHP_CodeSniffer\Util\Tokens; + +class FunctionCallArgumentSpacingSniff implements Sniff +{ + + + /** + * Returns an array of tokens this test wants to listen for. + * + * @return array + */ + public function register() + { + return[ + T_STRING, + T_ISSET, + T_UNSET, + T_SELF, + T_STATIC, + T_VARIABLE, + T_CLOSE_CURLY_BRACKET, + T_CLOSE_PARENTHESIS, + ]; + + }//end register() + + + /** + * Processes this test, when one of its tokens is encountered. + * + * @param \PHP_CodeSniffer\Files\File $phpcsFile The file being scanned. + * @param int $stackPtr The position of the current token in the + * stack passed in $tokens. + * + * @return void + */ + public function process(File $phpcsFile, $stackPtr) + { + $tokens = $phpcsFile->getTokens(); + + // Skip tokens that are the names of functions or classes + // within their definitions. For example: + // function myFunction... + // "myFunction" is T_STRING but we should skip because it is not a + // function or method *call*. + $functionName = $stackPtr; + $ignoreTokens = Tokens::$emptyTokens; + $ignoreTokens[] = T_BITWISE_AND; + $functionKeyword = $phpcsFile->findPrevious($ignoreTokens, ($stackPtr - 1), null, true); + if ($tokens[$functionKeyword]['code'] === T_FUNCTION || $tokens[$functionKeyword]['code'] === T_CLASS) { + return; + } + + if ($tokens[$stackPtr]['code'] === T_CLOSE_CURLY_BRACKET + && isset($tokens[$stackPtr]['scope_condition']) === true + ) { + // Not a function call. + return; + } + + // If the next non-whitespace token after the function or method call + // is not an opening parenthesis then it can't really be a *call*. + $openBracket = $phpcsFile->findNext(Tokens::$emptyTokens, ($functionName + 1), null, true); + if ($tokens[$openBracket]['code'] !== T_OPEN_PARENTHESIS) { + return; + } + + if (isset($tokens[$openBracket]['parenthesis_closer']) === false) { + return; + } + + $this->checkSpacing($phpcsFile, $stackPtr, $openBracket); + + }//end process() + + + /** + * Checks the spacing around commas. + * + * @param \PHP_CodeSniffer\Files\File $phpcsFile The file being scanned. + * @param int $stackPtr The position of the current token in the + * stack passed in $tokens. + * @param int $openBracket The position of the opening bracket + * in the stack passed in $tokens. + * + * @return void + */ + public function checkSpacing(File $phpcsFile, $stackPtr, $openBracket) + { + $tokens = $phpcsFile->getTokens(); + + $closeBracket = $tokens[$openBracket]['parenthesis_closer']; + $nextSeparator = $openBracket; + + $find = [ + T_COMMA, + T_CLOSURE, + T_ANON_CLASS, + T_OPEN_SHORT_ARRAY, + ]; + + while (($nextSeparator = $phpcsFile->findNext($find, ($nextSeparator + 1), $closeBracket)) !== false) { + if ($tokens[$nextSeparator]['code'] === T_CLOSURE + || $tokens[$nextSeparator]['code'] === T_ANON_CLASS + ) { + // Skip closures. + $nextSeparator = $tokens[$nextSeparator]['scope_closer']; + continue; + } else if ($tokens[$nextSeparator]['code'] === T_OPEN_SHORT_ARRAY) { + // Skips arrays using short notation. + $nextSeparator = $tokens[$nextSeparator]['bracket_closer']; + continue; + } + + // Make sure the comma or variable belongs directly to this function call, + // and is not inside a nested function call or array. + $brackets = $tokens[$nextSeparator]['nested_parenthesis']; + $lastBracket = array_pop($brackets); + if ($lastBracket !== $closeBracket) { + continue; + } + + if ($tokens[$nextSeparator]['code'] === T_COMMA) { + if ($tokens[($nextSeparator - 1)]['code'] === T_WHITESPACE) { + $prev = $phpcsFile->findPrevious(Tokens::$emptyTokens, ($nextSeparator - 2), null, true); + if (isset(Tokens::$heredocTokens[$tokens[$prev]['code']]) === false) { + $error = 'Space found before comma in argument list'; + $fix = $phpcsFile->addFixableError($error, $nextSeparator, 'SpaceBeforeComma'); + if ($fix === true) { + $phpcsFile->fixer->beginChangeset(); + + if ($tokens[$prev]['line'] !== $tokens[$nextSeparator]['line']) { + $phpcsFile->fixer->addContent($prev, ','); + $phpcsFile->fixer->replaceToken($nextSeparator, ''); + } else { + $phpcsFile->fixer->replaceToken(($nextSeparator - 1), ''); + } + + $phpcsFile->fixer->endChangeset(); + } + }//end if + }//end if + + if ($tokens[($nextSeparator + 1)]['code'] !== T_WHITESPACE) { + $error = 'No space found after comma in argument list'; + $fix = $phpcsFile->addFixableError($error, $nextSeparator, 'NoSpaceAfterComma'); + if ($fix === true) { + $phpcsFile->fixer->addContent($nextSeparator, ' '); + } + } else { + // If there is a newline in the space, then they must be formatting + // each argument on a newline, which is valid, so ignore it. + $next = $phpcsFile->findNext(Tokens::$emptyTokens, ($nextSeparator + 1), null, true); + if ($tokens[$next]['line'] === $tokens[$nextSeparator]['line']) { + $space = $tokens[($nextSeparator + 1)]['length']; + if ($space > 1) { + $error = 'Expected 1 space after comma in argument list; %s found'; + $data = [$space]; + $fix = $phpcsFile->addFixableError($error, $nextSeparator, 'TooMuchSpaceAfterComma', $data); + if ($fix === true) { + $phpcsFile->fixer->replaceToken(($nextSeparator + 1), ' '); + } + } + } + }//end if + }//end if + }//end while + + }//end checkSpacing() + + +}//end class diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/Generic/Sniffs/Functions/OpeningFunctionBraceBsdAllmanSniff.php b/vendor/squizlabs/php_codesniffer/src/Standards/Generic/Sniffs/Functions/OpeningFunctionBraceBsdAllmanSniff.php new file mode 100644 index 00000000..ff19526a --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/Generic/Sniffs/Functions/OpeningFunctionBraceBsdAllmanSniff.php @@ -0,0 +1,227 @@ + + * @copyright 2006-2015 Squiz Pty Ltd (ABN 77 084 670 600) + * @license https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence + */ + +namespace PHP_CodeSniffer\Standards\Generic\Sniffs\Functions; + +use PHP_CodeSniffer\Files\File; +use PHP_CodeSniffer\Sniffs\Sniff; +use PHP_CodeSniffer\Util\Tokens; + +class OpeningFunctionBraceBsdAllmanSniff implements Sniff +{ + + /** + * Should this sniff check function braces? + * + * @var boolean + */ + public $checkFunctions = true; + + /** + * Should this sniff check closure braces? + * + * @var boolean + */ + public $checkClosures = false; + + + /** + * Registers the tokens that this sniff wants to listen for. + * + * @return int[] + */ + public function register() + { + return [ + T_FUNCTION, + T_CLOSURE, + ]; + + }//end register() + + + /** + * Processes this test, when one of its tokens is encountered. + * + * @param \PHP_CodeSniffer\Files\File $phpcsFile The file being scanned. + * @param int $stackPtr The position of the current token in the + * stack passed in $tokens. + * + * @return void + */ + public function process(File $phpcsFile, $stackPtr) + { + $tokens = $phpcsFile->getTokens(); + + if (isset($tokens[$stackPtr]['scope_opener']) === false) { + return; + } + + if (($tokens[$stackPtr]['code'] === T_FUNCTION + && (bool) $this->checkFunctions === false) + || ($tokens[$stackPtr]['code'] === T_CLOSURE + && (bool) $this->checkClosures === false) + ) { + return; + } + + $openingBrace = $tokens[$stackPtr]['scope_opener']; + $closeBracket = $tokens[$stackPtr]['parenthesis_closer']; + if ($tokens[$stackPtr]['code'] === T_CLOSURE) { + $use = $phpcsFile->findNext(T_USE, ($closeBracket + 1), $tokens[$stackPtr]['scope_opener']); + if ($use !== false) { + $openBracket = $phpcsFile->findNext(T_OPEN_PARENTHESIS, ($use + 1)); + $closeBracket = $tokens[$openBracket]['parenthesis_closer']; + } + } + + // Find the end of the function declaration. + $prev = $phpcsFile->findPrevious(Tokens::$emptyTokens, ($openingBrace - 1), $closeBracket, true); + + $functionLine = $tokens[$prev]['line']; + $braceLine = $tokens[$openingBrace]['line']; + + $lineDifference = ($braceLine - $functionLine); + + $metricType = 'Function'; + if ($tokens[$stackPtr]['code'] === T_CLOSURE) { + $metricType = 'Closure'; + } + + if ($lineDifference === 0) { + $error = 'Opening brace should be on a new line'; + $fix = $phpcsFile->addFixableError($error, $openingBrace, 'BraceOnSameLine'); + if ($fix === true) { + $hasTrailingAnnotation = false; + for ($nextLine = ($openingBrace + 1); $nextLine < $phpcsFile->numTokens; $nextLine++) { + if ($tokens[$openingBrace]['line'] !== $tokens[$nextLine]['line']) { + break; + } + + if (isset(Tokens::$phpcsCommentTokens[$tokens[$nextLine]['code']]) === true) { + $hasTrailingAnnotation = true; + } + } + + $phpcsFile->fixer->beginChangeset(); + $indent = $phpcsFile->findFirstOnLine([], $openingBrace); + + if ($hasTrailingAnnotation === false || $nextLine === false) { + if ($tokens[$indent]['code'] === T_WHITESPACE) { + $phpcsFile->fixer->addContentBefore($openingBrace, $tokens[$indent]['content']); + } + + if ($tokens[($openingBrace - 1)]['code'] === T_WHITESPACE) { + $phpcsFile->fixer->replaceToken(($openingBrace - 1), ''); + } + + $phpcsFile->fixer->addNewlineBefore($openingBrace); + } else { + $phpcsFile->fixer->replaceToken($openingBrace, ''); + $phpcsFile->fixer->addNewlineBefore($nextLine); + $phpcsFile->fixer->addContentBefore($nextLine, '{'); + + if ($tokens[$indent]['code'] === T_WHITESPACE) { + $phpcsFile->fixer->addContentBefore($nextLine, $tokens[$indent]['content']); + } + } + + $phpcsFile->fixer->endChangeset(); + }//end if + + $phpcsFile->recordMetric($stackPtr, "$metricType opening brace placement", 'same line'); + } else if ($lineDifference > 1) { + $error = 'Opening brace should be on the line after the declaration; found %s blank line(s)'; + $data = [($lineDifference - 1)]; + + $prevNonWs = $phpcsFile->findPrevious(T_WHITESPACE, ($openingBrace - 1), $closeBracket, true); + if ($prevNonWs !== $prev) { + // There must be a comment between the end of the function declaration and the open brace. + // Report, but don't fix. + $phpcsFile->addError($error, $openingBrace, 'BraceSpacing', $data); + } else { + $fix = $phpcsFile->addFixableError($error, $openingBrace, 'BraceSpacing', $data); + if ($fix === true) { + $phpcsFile->fixer->beginChangeset(); + for ($i = $openingBrace; $i > $prev; $i--) { + if ($tokens[$i]['line'] === $tokens[$openingBrace]['line']) { + if ($tokens[$i]['column'] === 1) { + $phpcsFile->fixer->addNewLineBefore($i); + } + + continue; + } + + $phpcsFile->fixer->replaceToken($i, ''); + } + + $phpcsFile->fixer->endChangeset(); + } + }//end if + }//end if + + $ignore = Tokens::$phpcsCommentTokens; + $ignore[] = T_WHITESPACE; + $next = $phpcsFile->findNext($ignore, ($openingBrace + 1), null, true); + if ($tokens[$next]['line'] === $tokens[$openingBrace]['line']) { + if ($next === $tokens[$stackPtr]['scope_closer']) { + // Ignore empty functions. + return; + } + + $error = 'Opening brace must be the last content on the line'; + $fix = $phpcsFile->addFixableError($error, $openingBrace, 'ContentAfterBrace'); + if ($fix === true) { + $phpcsFile->fixer->addNewline($openingBrace); + } + } + + // Only continue checking if the opening brace looks good. + if ($lineDifference !== 1) { + return; + } + + // We need to actually find the first piece of content on this line, + // as if this is a method with tokens before it (public, static etc) + // or an if with an else before it, then we need to start the scope + // checking from there, rather than the current token. + $lineStart = $phpcsFile->findFirstOnLine(T_WHITESPACE, $stackPtr, true); + + // The opening brace is on the correct line, now it needs to be + // checked to be correctly indented. + $startColumn = $tokens[$lineStart]['column']; + $braceIndent = $tokens[$openingBrace]['column']; + + if ($braceIndent !== $startColumn) { + $expected = ($startColumn - 1); + $found = ($braceIndent - 1); + + $error = 'Opening brace indented incorrectly; expected %s spaces, found %s'; + $data = [ + $expected, + $found, + ]; + + $fix = $phpcsFile->addFixableError($error, $openingBrace, 'BraceIndent', $data); + if ($fix === true) { + $indent = str_repeat(' ', $expected); + if ($found === 0) { + $phpcsFile->fixer->addContentBefore($openingBrace, $indent); + } else { + $phpcsFile->fixer->replaceToken(($openingBrace - 1), $indent); + } + } + }//end if + + $phpcsFile->recordMetric($stackPtr, "$metricType opening brace placement", 'new line'); + + }//end process() + + +}//end class diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/Generic/Sniffs/Functions/OpeningFunctionBraceKernighanRitchieSniff.php b/vendor/squizlabs/php_codesniffer/src/Standards/Generic/Sniffs/Functions/OpeningFunctionBraceKernighanRitchieSniff.php new file mode 100644 index 00000000..62eafc12 --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/Generic/Sniffs/Functions/OpeningFunctionBraceKernighanRitchieSniff.php @@ -0,0 +1,184 @@ + + * @copyright 2006-2015 Squiz Pty Ltd (ABN 77 084 670 600) + * @license https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence + */ + +namespace PHP_CodeSniffer\Standards\Generic\Sniffs\Functions; + +use PHP_CodeSniffer\Files\File; +use PHP_CodeSniffer\Sniffs\Sniff; +use PHP_CodeSniffer\Util\Tokens; + +class OpeningFunctionBraceKernighanRitchieSniff implements Sniff +{ + + /** + * Should this sniff check function braces? + * + * @var boolean + */ + public $checkFunctions = true; + + /** + * Should this sniff check closure braces? + * + * @var boolean + */ + public $checkClosures = false; + + + /** + * Registers the tokens that this sniff wants to listen for. + * + * @return void + */ + public function register() + { + return [ + T_FUNCTION, + T_CLOSURE, + ]; + + }//end register() + + + /** + * Processes this test, when one of its tokens is encountered. + * + * @param \PHP_CodeSniffer\Files\File $phpcsFile The file being scanned. + * @param int $stackPtr The position of the current token in the + * stack passed in $tokens. + * + * @return void + */ + public function process(File $phpcsFile, $stackPtr) + { + $tokens = $phpcsFile->getTokens(); + + if (isset($tokens[$stackPtr]['scope_opener']) === false) { + return; + } + + if (($tokens[$stackPtr]['code'] === T_FUNCTION + && (bool) $this->checkFunctions === false) + || ($tokens[$stackPtr]['code'] === T_CLOSURE + && (bool) $this->checkClosures === false) + ) { + return; + } + + $openingBrace = $tokens[$stackPtr]['scope_opener']; + $closeBracket = $tokens[$stackPtr]['parenthesis_closer']; + if ($tokens[$stackPtr]['code'] === T_CLOSURE) { + $use = $phpcsFile->findNext(T_USE, ($closeBracket + 1), $tokens[$stackPtr]['scope_opener']); + if ($use !== false) { + $openBracket = $phpcsFile->findNext(T_OPEN_PARENTHESIS, ($use + 1)); + $closeBracket = $tokens[$openBracket]['parenthesis_closer']; + } + } + + // Find the end of the function declaration. + $prev = $phpcsFile->findPrevious(Tokens::$emptyTokens, ($openingBrace - 1), $closeBracket, true); + + $functionLine = $tokens[$prev]['line']; + $braceLine = $tokens[$openingBrace]['line']; + + $lineDifference = ($braceLine - $functionLine); + + $metricType = 'Function'; + if ($tokens[$stackPtr]['code'] === T_CLOSURE) { + $metricType = 'Closure'; + } + + if ($lineDifference > 0) { + $phpcsFile->recordMetric($stackPtr, "$metricType opening brace placement", 'new line'); + $error = 'Opening brace should be on the same line as the declaration'; + $fix = $phpcsFile->addFixableError($error, $openingBrace, 'BraceOnNewLine'); + if ($fix === true) { + $prev = $phpcsFile->findPrevious(Tokens::$emptyTokens, ($openingBrace - 1), $closeBracket, true); + $phpcsFile->fixer->beginChangeset(); + $phpcsFile->fixer->addContent($prev, ' {'); + $phpcsFile->fixer->replaceToken($openingBrace, ''); + if ($tokens[($openingBrace + 1)]['code'] === T_WHITESPACE + && $tokens[($openingBrace + 2)]['line'] > $tokens[$openingBrace]['line'] + ) { + // Brace is followed by a new line, so remove it to ensure we don't + // leave behind a blank line at the top of the block. + $phpcsFile->fixer->replaceToken(($openingBrace + 1), ''); + + if ($tokens[($openingBrace - 1)]['code'] === T_WHITESPACE + && $tokens[($openingBrace - 1)]['line'] === $tokens[$openingBrace]['line'] + && $tokens[($openingBrace - 2)]['line'] < $tokens[$openingBrace]['line'] + ) { + // Brace is preceded by indent, so remove it to ensure we don't + // leave behind more indent than is required for the first line. + $phpcsFile->fixer->replaceToken(($openingBrace - 1), ''); + } + } + + $phpcsFile->fixer->endChangeset(); + }//end if + } else { + $phpcsFile->recordMetric($stackPtr, "$metricType opening brace placement", 'same line'); + }//end if + + $ignore = Tokens::$phpcsCommentTokens; + $ignore[] = T_WHITESPACE; + $next = $phpcsFile->findNext($ignore, ($openingBrace + 1), null, true); + if ($tokens[$next]['line'] === $tokens[$openingBrace]['line']) { + if ($next === $tokens[$stackPtr]['scope_closer'] + || $tokens[$next]['code'] === T_CLOSE_TAG + ) { + // Ignore empty functions. + return; + } + + $error = 'Opening brace must be the last content on the line'; + $fix = $phpcsFile->addFixableError($error, $openingBrace, 'ContentAfterBrace'); + if ($fix === true) { + $phpcsFile->fixer->addNewline($openingBrace); + } + } + + // Only continue checking if the opening brace looks good. + if ($lineDifference > 0) { + return; + } + + // We are looking for tabs, even if they have been replaced, because + // we enforce a space here. + if (isset($tokens[($openingBrace - 1)]['orig_content']) === true) { + $spacing = $tokens[($openingBrace - 1)]['orig_content']; + } else { + $spacing = $tokens[($openingBrace - 1)]['content']; + } + + if ($tokens[($openingBrace - 1)]['code'] !== T_WHITESPACE) { + $length = 0; + } else if ($spacing === "\t") { + $length = '\t'; + } else { + $length = strlen($spacing); + } + + if ($length !== 1) { + $error = 'Expected 1 space before opening brace; found %s'; + $data = [$length]; + $fix = $phpcsFile->addFixableError($error, $closeBracket, 'SpaceBeforeBrace', $data); + if ($fix === true) { + if ($length === 0 || $length === '\t') { + $phpcsFile->fixer->addContentBefore($openingBrace, ' '); + } else { + $phpcsFile->fixer->replaceToken(($openingBrace - 1), ' '); + } + } + } + + }//end process() + + +}//end class diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/Generic/Sniffs/Metrics/CyclomaticComplexitySniff.php b/vendor/squizlabs/php_codesniffer/src/Standards/Generic/Sniffs/Metrics/CyclomaticComplexitySniff.php new file mode 100644 index 00000000..18100c2d --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/Generic/Sniffs/Metrics/CyclomaticComplexitySniff.php @@ -0,0 +1,116 @@ + + * @author Greg Sherwood + * @copyright 2007-2014 Mayflower GmbH + * @license https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence + */ + +namespace PHP_CodeSniffer\Standards\Generic\Sniffs\Metrics; + +use PHP_CodeSniffer\Files\File; +use PHP_CodeSniffer\Sniffs\Sniff; + +class CyclomaticComplexitySniff implements Sniff +{ + + /** + * A complexity higher than this value will throw a warning. + * + * @var integer + */ + public $complexity = 10; + + /** + * A complexity higher than this value will throw an error. + * + * @var integer + */ + public $absoluteComplexity = 20; + + + /** + * Returns an array of tokens this test wants to listen for. + * + * @return array + */ + public function register() + { + return [T_FUNCTION]; + + }//end register() + + + /** + * Processes this test, when one of its tokens is encountered. + * + * @param \PHP_CodeSniffer\Files\File $phpcsFile The file being scanned. + * @param int $stackPtr The position of the current token + * in the stack passed in $tokens. + * + * @return void + */ + public function process(File $phpcsFile, $stackPtr) + { + $tokens = $phpcsFile->getTokens(); + + // Ignore abstract methods. + if (isset($tokens[$stackPtr]['scope_opener']) === false) { + return; + } + + // Detect start and end of this function definition. + $start = $tokens[$stackPtr]['scope_opener']; + $end = $tokens[$stackPtr]['scope_closer']; + + // Predicate nodes for PHP. + $find = [ + T_CASE => true, + T_DEFAULT => true, + T_CATCH => true, + T_IF => true, + T_FOR => true, + T_FOREACH => true, + T_WHILE => true, + T_ELSEIF => true, + T_INLINE_THEN => true, + T_COALESCE => true, + T_COALESCE_EQUAL => true, + T_MATCH_ARROW => true, + ]; + + $complexity = 1; + + // Iterate from start to end and count predicate nodes. + for ($i = ($start + 1); $i < $end; $i++) { + if (isset($find[$tokens[$i]['code']]) === true) { + $complexity++; + } + } + + if ($complexity > $this->absoluteComplexity) { + $error = 'Function\'s cyclomatic complexity (%s) exceeds allowed maximum of %s'; + $data = [ + $complexity, + $this->absoluteComplexity, + ]; + $phpcsFile->addError($error, $stackPtr, 'MaxExceeded', $data); + } else if ($complexity > $this->complexity) { + $warning = 'Function\'s cyclomatic complexity (%s) exceeds %s; consider refactoring the function'; + $data = [ + $complexity, + $this->complexity, + ]; + $phpcsFile->addWarning($warning, $stackPtr, 'TooHigh', $data); + } + + }//end process() + + +}//end class diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/Generic/Sniffs/Metrics/NestingLevelSniff.php b/vendor/squizlabs/php_codesniffer/src/Standards/Generic/Sniffs/Metrics/NestingLevelSniff.php new file mode 100644 index 00000000..d001deda --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/Generic/Sniffs/Metrics/NestingLevelSniff.php @@ -0,0 +1,100 @@ + + * @author Greg Sherwood + * @copyright 2007-2014 Mayflower GmbH + * @license https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence + */ + +namespace PHP_CodeSniffer\Standards\Generic\Sniffs\Metrics; + +use PHP_CodeSniffer\Files\File; +use PHP_CodeSniffer\Sniffs\Sniff; + +class NestingLevelSniff implements Sniff +{ + + /** + * A nesting level higher than this value will throw a warning. + * + * @var integer + */ + public $nestingLevel = 5; + + /** + * A nesting level higher than this value will throw an error. + * + * @var integer + */ + public $absoluteNestingLevel = 10; + + + /** + * Returns an array of tokens this test wants to listen for. + * + * @return array + */ + public function register() + { + return [T_FUNCTION]; + + }//end register() + + + /** + * Processes this test, when one of its tokens is encountered. + * + * @param \PHP_CodeSniffer\Files\File $phpcsFile The file being scanned. + * @param int $stackPtr The position of the current token + * in the stack passed in $tokens. + * + * @return void + */ + public function process(File $phpcsFile, $stackPtr) + { + $tokens = $phpcsFile->getTokens(); + + // Ignore abstract methods. + if (isset($tokens[$stackPtr]['scope_opener']) === false) { + return; + } + + // Detect start and end of this function definition. + $start = $tokens[$stackPtr]['scope_opener']; + $end = $tokens[$stackPtr]['scope_closer']; + + $nestingLevel = 0; + + // Find the maximum nesting level of any token in the function. + for ($i = ($start + 1); $i < $end; $i++) { + $level = $tokens[$i]['level']; + if ($nestingLevel < $level) { + $nestingLevel = $level; + } + } + + // We subtract the nesting level of the function itself. + $nestingLevel = ($nestingLevel - $tokens[$stackPtr]['level'] - 1); + + if ($nestingLevel > $this->absoluteNestingLevel) { + $error = 'Function\'s nesting level (%s) exceeds allowed maximum of %s'; + $data = [ + $nestingLevel, + $this->absoluteNestingLevel, + ]; + $phpcsFile->addError($error, $stackPtr, 'MaxExceeded', $data); + } else if ($nestingLevel > $this->nestingLevel) { + $warning = 'Function\'s nesting level (%s) exceeds %s; consider refactoring the function'; + $data = [ + $nestingLevel, + $this->nestingLevel, + ]; + $phpcsFile->addWarning($warning, $stackPtr, 'TooHigh', $data); + } + + }//end process() + + +}//end class diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/Generic/Sniffs/NamingConventions/AbstractClassNamePrefixSniff.php b/vendor/squizlabs/php_codesniffer/src/Standards/Generic/Sniffs/NamingConventions/AbstractClassNamePrefixSniff.php new file mode 100644 index 00000000..3e3af830 --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/Generic/Sniffs/NamingConventions/AbstractClassNamePrefixSniff.php @@ -0,0 +1,60 @@ + + * @license https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence + */ + +namespace PHP_CodeSniffer\Standards\Generic\Sniffs\NamingConventions; + +use PHP_CodeSniffer\Files\File; +use PHP_CodeSniffer\Sniffs\Sniff; + +class AbstractClassNamePrefixSniff implements Sniff +{ + + + /** + * Registers the tokens that this sniff wants to listen for. + * + * @return int[] + */ + public function register() + { + return [T_CLASS]; + + }//end register() + + + /** + * Processes this sniff, when one of its tokens is encountered. + * + * @param \PHP_CodeSniffer\Files\File $phpcsFile The file being scanned. + * @param int $stackPtr The position of the current token + * in the stack passed in $tokens. + * + * @return void + */ + public function process(File $phpcsFile, $stackPtr) + { + if ($phpcsFile->getClassProperties($stackPtr)['is_abstract'] === false) { + // This class is not abstract so we don't need to check it. + return; + } + + $className = $phpcsFile->getDeclarationName($stackPtr); + if ($className === null) { + // We are not interested in anonymous classes. + return; + } + + $prefix = substr($className, 0, 8); + if (strtolower($prefix) !== 'abstract') { + $phpcsFile->addError('Abstract class names must be prefixed with "Abstract"; found "%s"', $stackPtr, 'Missing', [$className]); + } + + }//end process() + + +}//end class diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/Generic/Sniffs/NamingConventions/CamelCapsFunctionNameSniff.php b/vendor/squizlabs/php_codesniffer/src/Standards/Generic/Sniffs/NamingConventions/CamelCapsFunctionNameSniff.php new file mode 100644 index 00000000..b4511203 --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/Generic/Sniffs/NamingConventions/CamelCapsFunctionNameSniff.php @@ -0,0 +1,223 @@ + + * @copyright 2006-2015 Squiz Pty Ltd (ABN 77 084 670 600) + * @license https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence + */ + +namespace PHP_CodeSniffer\Standards\Generic\Sniffs\NamingConventions; + +use PHP_CodeSniffer\Files\File; +use PHP_CodeSniffer\Sniffs\AbstractScopeSniff; +use PHP_CodeSniffer\Util\Common; +use PHP_CodeSniffer\Util\Tokens; + +class CamelCapsFunctionNameSniff extends AbstractScopeSniff +{ + + /** + * A list of all PHP magic methods. + * + * @var array + */ + protected $magicMethods = [ + 'construct' => true, + 'destruct' => true, + 'call' => true, + 'callstatic' => true, + 'get' => true, + 'set' => true, + 'isset' => true, + 'unset' => true, + 'sleep' => true, + 'wakeup' => true, + 'serialize' => true, + 'unserialize' => true, + 'tostring' => true, + 'invoke' => true, + 'set_state' => true, + 'clone' => true, + 'debuginfo' => true, + ]; + + /** + * A list of all PHP non-magic methods starting with a double underscore. + * + * These come from PHP modules such as SOAPClient. + * + * @var array + */ + protected $methodsDoubleUnderscore = [ + 'dorequest' => true, + 'getcookies' => true, + 'getfunctions' => true, + 'getlastrequest' => true, + 'getlastrequestheaders' => true, + 'getlastresponse' => true, + 'getlastresponseheaders' => true, + 'gettypes' => true, + 'setcookie' => true, + 'setlocation' => true, + 'setsoapheaders' => true, + 'soapcall' => true, + ]; + + /** + * A list of all PHP magic functions. + * + * @var array + */ + protected $magicFunctions = ['autoload' => true]; + + /** + * If TRUE, the string must not have two capital letters next to each other. + * + * @var boolean + */ + public $strict = true; + + + /** + * Constructs a Generic_Sniffs_NamingConventions_CamelCapsFunctionNameSniff. + */ + public function __construct() + { + parent::__construct(Tokens::$ooScopeTokens, [T_FUNCTION], true); + + }//end __construct() + + + /** + * Processes the tokens within the scope. + * + * @param \PHP_CodeSniffer\Files\File $phpcsFile The file being processed. + * @param int $stackPtr The position where this token was + * found. + * @param int $currScope The position of the current scope. + * + * @return void + */ + protected function processTokenWithinScope(File $phpcsFile, $stackPtr, $currScope) + { + $tokens = $phpcsFile->getTokens(); + + // Determine if this is a function which needs to be examined. + $conditions = $tokens[$stackPtr]['conditions']; + end($conditions); + $deepestScope = key($conditions); + if ($deepestScope !== $currScope) { + return; + } + + $methodName = $phpcsFile->getDeclarationName($stackPtr); + if ($methodName === null) { + // Ignore closures. + return; + } + + $className = $phpcsFile->getDeclarationName($currScope); + if (isset($className) === false) { + $className = '[Anonymous Class]'; + } + + $errorData = [$className.'::'.$methodName]; + + $methodNameLc = strtolower($methodName); + $classNameLc = strtolower($className); + + // Is this a magic method. i.e., is prefixed with "__" ? + if (preg_match('|^__[^_]|', $methodName) !== 0) { + $magicPart = substr($methodNameLc, 2); + if (isset($this->magicMethods[$magicPart]) === true + || isset($this->methodsDoubleUnderscore[$magicPart]) === true + ) { + return; + } + + $error = 'Method name "%s" is invalid; only PHP magic methods should be prefixed with a double underscore'; + $phpcsFile->addError($error, $stackPtr, 'MethodDoubleUnderscore', $errorData); + } + + // PHP4 constructors are allowed to break our rules. + if ($methodNameLc === $classNameLc) { + return; + } + + // PHP4 destructors are allowed to break our rules. + if ($methodNameLc === '_'.$classNameLc) { + return; + } + + // Ignore first underscore in methods prefixed with "_". + $methodName = ltrim($methodName, '_'); + + $methodProps = $phpcsFile->getMethodProperties($stackPtr); + if (Common::isCamelCaps($methodName, false, true, $this->strict) === false) { + if ($methodProps['scope_specified'] === true) { + $error = '%s method name "%s" is not in camel caps format'; + $data = [ + ucfirst($methodProps['scope']), + $errorData[0], + ]; + $phpcsFile->addError($error, $stackPtr, 'ScopeNotCamelCaps', $data); + } else { + $error = 'Method name "%s" is not in camel caps format'; + $phpcsFile->addError($error, $stackPtr, 'NotCamelCaps', $errorData); + } + + $phpcsFile->recordMetric($stackPtr, 'CamelCase method name', 'no'); + return; + } else { + $phpcsFile->recordMetric($stackPtr, 'CamelCase method name', 'yes'); + } + + }//end processTokenWithinScope() + + + /** + * Processes the tokens outside the scope. + * + * @param \PHP_CodeSniffer\Files\File $phpcsFile The file being processed. + * @param int $stackPtr The position where this token was + * found. + * + * @return void + */ + protected function processTokenOutsideScope(File $phpcsFile, $stackPtr) + { + $functionName = $phpcsFile->getDeclarationName($stackPtr); + if ($functionName === null) { + // Ignore closures. + return; + } + + $errorData = [$functionName]; + + // Is this a magic function. i.e., it is prefixed with "__". + if (preg_match('|^__[^_]|', $functionName) !== 0) { + $magicPart = strtolower(substr($functionName, 2)); + if (isset($this->magicFunctions[$magicPart]) === true) { + return; + } + + $error = 'Function name "%s" is invalid; only PHP magic methods should be prefixed with a double underscore'; + $phpcsFile->addError($error, $stackPtr, 'FunctionDoubleUnderscore', $errorData); + } + + // Ignore first underscore in functions prefixed with "_". + $functionName = ltrim($functionName, '_'); + + if (Common::isCamelCaps($functionName, false, true, $this->strict) === false) { + $error = 'Function name "%s" is not in camel caps format'; + $phpcsFile->addError($error, $stackPtr, 'NotCamelCaps', $errorData); + $phpcsFile->recordMetric($stackPtr, 'CamelCase function name', 'no'); + } else { + $phpcsFile->recordMetric($stackPtr, 'CamelCase method name', 'yes'); + } + + }//end processTokenOutsideScope() + + +}//end class diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/Generic/Sniffs/NamingConventions/ConstructorNameSniff.php b/vendor/squizlabs/php_codesniffer/src/Standards/Generic/Sniffs/NamingConventions/ConstructorNameSniff.php new file mode 100644 index 00000000..a4196063 --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/Generic/Sniffs/NamingConventions/ConstructorNameSniff.php @@ -0,0 +1,163 @@ + + * @author Leif Wickland + * @copyright 2006-2015 Squiz Pty Ltd (ABN 77 084 670 600) + * @license https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence + */ + +namespace PHP_CodeSniffer\Standards\Generic\Sniffs\NamingConventions; + +use PHP_CodeSniffer\Files\File; +use PHP_CodeSniffer\Sniffs\AbstractScopeSniff; + +class ConstructorNameSniff extends AbstractScopeSniff +{ + + /** + * The name of the class we are currently checking. + * + * @var string + */ + private $currentClass = ''; + + /** + * A list of functions in the current class. + * + * @var string[] + */ + private $functionList = []; + + + /** + * Constructs the test with the tokens it wishes to listen for. + */ + public function __construct() + { + parent::__construct([T_CLASS, T_ANON_CLASS], [T_FUNCTION], true); + + }//end __construct() + + + /** + * Processes this test when one of its tokens is encountered. + * + * @param \PHP_CodeSniffer\Files\File $phpcsFile The current file being scanned. + * @param int $stackPtr The position of the current token + * in the stack passed in $tokens. + * @param int $currScope A pointer to the start of the scope. + * + * @return void + */ + protected function processTokenWithinScope(File $phpcsFile, $stackPtr, $currScope) + { + $tokens = $phpcsFile->getTokens(); + + // Determine if this is a function which needs to be examined. + $conditions = $tokens[$stackPtr]['conditions']; + end($conditions); + $deepestScope = key($conditions); + if ($deepestScope !== $currScope) { + return; + } + + $className = $phpcsFile->getDeclarationName($currScope); + if (empty($className) === false) { + // Not an anonymous class. + $className = strtolower($className); + } + + if ($className !== $this->currentClass) { + $this->loadFunctionNamesInScope($phpcsFile, $currScope); + $this->currentClass = $className; + } + + $methodName = strtolower($phpcsFile->getDeclarationName($stackPtr)); + + if ($methodName === $className) { + if (in_array('__construct', $this->functionList, true) === false) { + $error = 'PHP4 style constructors are not allowed; use "__construct()" instead'; + $phpcsFile->addError($error, $stackPtr, 'OldStyle'); + } + } else if ($methodName !== '__construct') { + // Not a constructor. + return; + } + + // Stop if the constructor doesn't have a body, like when it is abstract. + if (isset($tokens[$stackPtr]['scope_closer']) === false) { + return; + } + + $parentClassName = strtolower($phpcsFile->findExtendedClassName($currScope)); + if ($parentClassName === false) { + return; + } + + $endFunctionIndex = $tokens[$stackPtr]['scope_closer']; + $startIndex = $stackPtr; + while (($doubleColonIndex = $phpcsFile->findNext(T_DOUBLE_COLON, $startIndex, $endFunctionIndex)) !== false) { + if ($tokens[($doubleColonIndex + 1)]['code'] === T_STRING + && strtolower($tokens[($doubleColonIndex + 1)]['content']) === $parentClassName + ) { + $error = 'PHP4 style calls to parent constructors are not allowed; use "parent::__construct()" instead'; + $phpcsFile->addError($error, ($doubleColonIndex + 1), 'OldStyleCall'); + } + + $startIndex = ($doubleColonIndex + 1); + } + + }//end processTokenWithinScope() + + + /** + * Processes a token that is found within the scope that this test is + * listening to. + * + * @param \PHP_CodeSniffer\Files\File $phpcsFile The file where this token was found. + * @param int $stackPtr The position in the stack where this + * token was found. + * + * @return void + */ + protected function processTokenOutsideScope(File $phpcsFile, $stackPtr) + { + + }//end processTokenOutsideScope() + + + /** + * Extracts all the function names found in the given scope. + * + * @param \PHP_CodeSniffer\Files\File $phpcsFile The current file being scanned. + * @param int $currScope A pointer to the start of the scope. + * + * @return void + */ + protected function loadFunctionNamesInScope(File $phpcsFile, $currScope) + { + $this->functionList = []; + $tokens = $phpcsFile->getTokens(); + + for ($i = ($tokens[$currScope]['scope_opener'] + 1); $i < $tokens[$currScope]['scope_closer']; $i++) { + if ($tokens[$i]['code'] !== T_FUNCTION) { + continue; + } + + $this->functionList[] = trim(strtolower($phpcsFile->getDeclarationName($i))); + + if (isset($tokens[$i]['scope_closer']) !== false) { + // Skip past nested functions and such. + $i = $tokens[$i]['scope_closer']; + } + } + + }//end loadFunctionNamesInScope() + + +}//end class diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/Generic/Sniffs/NamingConventions/InterfaceNameSuffixSniff.php b/vendor/squizlabs/php_codesniffer/src/Standards/Generic/Sniffs/NamingConventions/InterfaceNameSuffixSniff.php new file mode 100644 index 00000000..c5dc34d4 --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/Generic/Sniffs/NamingConventions/InterfaceNameSuffixSniff.php @@ -0,0 +1,54 @@ + + * @license https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence + */ + +namespace PHP_CodeSniffer\Standards\Generic\Sniffs\NamingConventions; + +use PHP_CodeSniffer\Files\File; +use PHP_CodeSniffer\Sniffs\Sniff; + +class InterfaceNameSuffixSniff implements Sniff +{ + + + /** + * Registers the tokens that this sniff wants to listen for. + * + * @return int[] + */ + public function register() + { + return [T_INTERFACE]; + + }//end register() + + + /** + * Processes this sniff, when one of its tokens is encountered. + * + * @param \PHP_CodeSniffer\Files\File $phpcsFile The file being scanned. + * @param int $stackPtr The position of the current token + * in the stack passed in $tokens. + * + * @return void + */ + public function process(File $phpcsFile, $stackPtr) + { + $interfaceName = $phpcsFile->getDeclarationName($stackPtr); + if ($interfaceName === null) { + return; + } + + $suffix = substr($interfaceName, -9); + if (strtolower($suffix) !== 'interface') { + $phpcsFile->addError('Interface names must be suffixed with "Interface"; found "%s"', $stackPtr, 'Missing', [$interfaceName]); + } + + }//end process() + + +}//end class diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/Generic/Sniffs/NamingConventions/TraitNameSuffixSniff.php b/vendor/squizlabs/php_codesniffer/src/Standards/Generic/Sniffs/NamingConventions/TraitNameSuffixSniff.php new file mode 100644 index 00000000..4e3b211d --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/Generic/Sniffs/NamingConventions/TraitNameSuffixSniff.php @@ -0,0 +1,54 @@ + + * @license https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence + */ + +namespace PHP_CodeSniffer\Standards\Generic\Sniffs\NamingConventions; + +use PHP_CodeSniffer\Files\File; +use PHP_CodeSniffer\Sniffs\Sniff; + +class TraitNameSuffixSniff implements Sniff +{ + + + /** + * Registers the tokens that this sniff wants to listen for. + * + * @return int[] + */ + public function register() + { + return [T_TRAIT]; + + }//end register() + + + /** + * Processes this sniff, when one of its tokens is encountered. + * + * @param \PHP_CodeSniffer\Files\File $phpcsFile The file being scanned. + * @param int $stackPtr The position of the current token + * in the stack passed in $tokens. + * + * @return void + */ + public function process(File $phpcsFile, $stackPtr) + { + $traitName = $phpcsFile->getDeclarationName($stackPtr); + if ($traitName === null) { + return; + } + + $suffix = substr($traitName, -5); + if (strtolower($suffix) !== 'trait') { + $phpcsFile->addError('Trait names must be suffixed with "Trait"; found "%s"', $stackPtr, 'Missing', [$traitName]); + } + + }//end process() + + +}//end class diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/Generic/Sniffs/NamingConventions/UpperCaseConstantNameSniff.php b/vendor/squizlabs/php_codesniffer/src/Standards/Generic/Sniffs/NamingConventions/UpperCaseConstantNameSniff.php new file mode 100644 index 00000000..db50eb56 --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/Generic/Sniffs/NamingConventions/UpperCaseConstantNameSniff.php @@ -0,0 +1,141 @@ + + * @copyright 2006-2015 Squiz Pty Ltd (ABN 77 084 670 600) + * @license https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence + */ + +namespace PHP_CodeSniffer\Standards\Generic\Sniffs\NamingConventions; + +use PHP_CodeSniffer\Files\File; +use PHP_CodeSniffer\Sniffs\Sniff; +use PHP_CodeSniffer\Util\Tokens; + +class UpperCaseConstantNameSniff implements Sniff +{ + + + /** + * Returns an array of tokens this test wants to listen for. + * + * @return array + */ + public function register() + { + return [ + T_STRING, + T_CONST, + ]; + + }//end register() + + + /** + * Processes this test, when one of its tokens is encountered. + * + * @param \PHP_CodeSniffer\Files\File $phpcsFile The file being scanned. + * @param int $stackPtr The position of the current token in the + * stack passed in $tokens. + * + * @return void + */ + public function process(File $phpcsFile, $stackPtr) + { + $tokens = $phpcsFile->getTokens(); + + if ($tokens[$stackPtr]['code'] === T_CONST) { + // This is a class constant. + $constant = $phpcsFile->findNext(Tokens::$emptyTokens, ($stackPtr + 1), null, true); + if ($constant === false) { + return; + } + + $constName = $tokens[$constant]['content']; + + if (strtoupper($constName) !== $constName) { + if (strtolower($constName) === $constName) { + $phpcsFile->recordMetric($constant, 'Constant name case', 'lower'); + } else { + $phpcsFile->recordMetric($constant, 'Constant name case', 'mixed'); + } + + $error = 'Class constants must be uppercase; expected %s but found %s'; + $data = [ + strtoupper($constName), + $constName, + ]; + $phpcsFile->addError($error, $constant, 'ClassConstantNotUpperCase', $data); + } else { + $phpcsFile->recordMetric($constant, 'Constant name case', 'upper'); + } + + return; + }//end if + + // Only interested in define statements now. + if (strtolower($tokens[$stackPtr]['content']) !== 'define') { + return; + } + + // Make sure this is not a method call. + $prev = $phpcsFile->findPrevious(T_WHITESPACE, ($stackPtr - 1), null, true); + if ($tokens[$prev]['code'] === T_OBJECT_OPERATOR + || $tokens[$prev]['code'] === T_DOUBLE_COLON + || $tokens[$prev]['code'] === T_NULLSAFE_OBJECT_OPERATOR + ) { + return; + } + + // If the next non-whitespace token after this token + // is not an opening parenthesis then it is not a function call. + $openBracket = $phpcsFile->findNext(Tokens::$emptyTokens, ($stackPtr + 1), null, true); + if ($openBracket === false) { + return; + } + + // The next non-whitespace token must be the constant name. + $constPtr = $phpcsFile->findNext(T_WHITESPACE, ($openBracket + 1), null, true); + if ($tokens[$constPtr]['code'] !== T_CONSTANT_ENCAPSED_STRING) { + return; + } + + $constName = $tokens[$constPtr]['content']; + + // Check for constants like self::CONSTANT. + $prefix = ''; + $splitPos = strpos($constName, '::'); + if ($splitPos !== false) { + $prefix = substr($constName, 0, ($splitPos + 2)); + $constName = substr($constName, ($splitPos + 2)); + } + + // Strip namespace from constant like /foo/bar/CONSTANT. + $splitPos = strrpos($constName, '\\'); + if ($splitPos !== false) { + $prefix = substr($constName, 0, ($splitPos + 1)); + $constName = substr($constName, ($splitPos + 1)); + } + + if (strtoupper($constName) !== $constName) { + if (strtolower($constName) === $constName) { + $phpcsFile->recordMetric($stackPtr, 'Constant name case', 'lower'); + } else { + $phpcsFile->recordMetric($stackPtr, 'Constant name case', 'mixed'); + } + + $error = 'Constants must be uppercase; expected %s but found %s'; + $data = [ + $prefix.strtoupper($constName), + $prefix.$constName, + ]; + $phpcsFile->addError($error, $stackPtr, 'ConstantNotUpperCase', $data); + } else { + $phpcsFile->recordMetric($stackPtr, 'Constant name case', 'upper'); + } + + }//end process() + + +}//end class diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/Generic/Sniffs/PHP/BacktickOperatorSniff.php b/vendor/squizlabs/php_codesniffer/src/Standards/Generic/Sniffs/PHP/BacktickOperatorSniff.php new file mode 100644 index 00000000..d455845b --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/Generic/Sniffs/PHP/BacktickOperatorSniff.php @@ -0,0 +1,48 @@ + + * @copyright 2006-2015 Squiz Pty Ltd (ABN 77 084 670 600) + * @license https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence + */ + +namespace PHP_CodeSniffer\Standards\Generic\Sniffs\PHP; + +use PHP_CodeSniffer\Files\File; +use PHP_CodeSniffer\Sniffs\Sniff; + +class BacktickOperatorSniff implements Sniff +{ + + + /** + * Returns an array of tokens this test wants to listen for. + * + * @return array + */ + public function register() + { + return [T_BACKTICK]; + + }//end register() + + + /** + * Processes this sniff, when one of its tokens is encountered. + * + * @param \PHP_CodeSniffer\Files\File $phpcsFile The file being scanned. + * @param int $stackPtr The position of the current token in + * the stack passed in $tokens. + * + * @return void + */ + public function process(File $phpcsFile, $stackPtr) + { + $error = 'Use of the backtick operator is forbidden'; + $phpcsFile->addError($error, $stackPtr, 'Found'); + + }//end process() + + +}//end class diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/Generic/Sniffs/PHP/CharacterBeforePHPOpeningTagSniff.php b/vendor/squizlabs/php_codesniffer/src/Standards/Generic/Sniffs/PHP/CharacterBeforePHPOpeningTagSniff.php new file mode 100644 index 00000000..f52180dd --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/Generic/Sniffs/PHP/CharacterBeforePHPOpeningTagSniff.php @@ -0,0 +1,86 @@ + + * @copyright 2010-2014 Andy Grunwald + * @license https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence + */ + +namespace PHP_CodeSniffer\Standards\Generic\Sniffs\PHP; + +use PHP_CodeSniffer\Files\File; +use PHP_CodeSniffer\Sniffs\Sniff; + +class CharacterBeforePHPOpeningTagSniff implements Sniff +{ + + /** + * List of supported BOM definitions. + * + * Use encoding names as keys and hex BOM representations as values. + * + * @var array + */ + protected $bomDefinitions = [ + 'UTF-8' => 'efbbbf', + 'UTF-16 (BE)' => 'feff', + 'UTF-16 (LE)' => 'fffe', + ]; + + + /** + * Returns an array of tokens this test wants to listen for. + * + * @return array + */ + public function register() + { + return [T_OPEN_TAG]; + + }//end register() + + + /** + * Processes this sniff, when one of its tokens is encountered. + * + * @param \PHP_CodeSniffer\Files\File $phpcsFile The file being scanned. + * @param int $stackPtr The position of the current token in + * the stack passed in $tokens. + * + * @return int + */ + public function process(File $phpcsFile, $stackPtr) + { + $expected = 0; + if ($stackPtr > 0) { + // Allow a byte-order mark. + $tokens = $phpcsFile->getTokens(); + foreach ($this->bomDefinitions as $bomName => $expectedBomHex) { + $bomByteLength = (strlen($expectedBomHex) / 2); + $htmlBomHex = bin2hex(substr($tokens[0]['content'], 0, $bomByteLength)); + if ($htmlBomHex === $expectedBomHex) { + $expected++; + break; + } + } + + // Allow a shebang line. + if (substr($tokens[0]['content'], 0, 2) === '#!') { + $expected++; + } + } + + if ($stackPtr !== $expected) { + $error = 'The opening PHP tag must be the first content in the file'; + $phpcsFile->addError($error, $stackPtr, 'Found'); + } + + // Skip the rest of the file so we don't pick up additional + // open tags, typically embedded in HTML. + return $phpcsFile->numTokens; + + }//end process() + + +}//end class diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/Generic/Sniffs/PHP/ClosingPHPTagSniff.php b/vendor/squizlabs/php_codesniffer/src/Standards/Generic/Sniffs/PHP/ClosingPHPTagSniff.php new file mode 100644 index 00000000..d03bf8ab --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/Generic/Sniffs/PHP/ClosingPHPTagSniff.php @@ -0,0 +1,54 @@ + + * @copyright 2010-2014 Stefano Kowalke + * @license https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence + */ + +namespace PHP_CodeSniffer\Standards\Generic\Sniffs\PHP; + +use PHP_CodeSniffer\Files\File; +use PHP_CodeSniffer\Sniffs\Sniff; + +class ClosingPHPTagSniff implements Sniff +{ + + + /** + * Returns an array of tokens this test wants to listen for. + * + * @return array + */ + public function register() + { + return [ + T_OPEN_TAG, + T_OPEN_TAG_WITH_ECHO, + ]; + + }//end register() + + + /** + * Processes this sniff, when one of its tokens is encountered. + * + * @param \PHP_CodeSniffer\Files\File $phpcsFile The file being scanned. + * @param int $stackPtr The position of the current token in + * the stack passed in $tokens. + * + * @return void + */ + public function process(File $phpcsFile, $stackPtr) + { + $closeTag = $phpcsFile->findNext(T_CLOSE_TAG, $stackPtr); + if ($closeTag === false) { + $error = 'The PHP open tag does not have a corresponding PHP close tag'; + $phpcsFile->addError($error, $stackPtr, 'NotFound'); + } + + }//end process() + + +}//end class diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/Generic/Sniffs/PHP/DeprecatedFunctionsSniff.php b/vendor/squizlabs/php_codesniffer/src/Standards/Generic/Sniffs/PHP/DeprecatedFunctionsSniff.php new file mode 100644 index 00000000..42eaa40f --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/Generic/Sniffs/PHP/DeprecatedFunctionsSniff.php @@ -0,0 +1,73 @@ + + * @author Greg Sherwood + * @copyright 2006-2015 Squiz Pty Ltd (ABN 77 084 670 600) + * @license https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence + */ + +namespace PHP_CodeSniffer\Standards\Generic\Sniffs\PHP; + +class DeprecatedFunctionsSniff extends ForbiddenFunctionsSniff +{ + + /** + * A list of forbidden functions with their alternatives. + * + * The value is NULL if no alternative exists. IE, the + * function should just not be used. + * + * @var array + */ + public $forbiddenFunctions = []; + + + /** + * Constructor. + * + * Uses the Reflection API to get a list of deprecated functions. + */ + public function __construct() + { + $functions = get_defined_functions(); + + foreach ($functions['internal'] as $functionName) { + $function = new \ReflectionFunction($functionName); + + if ($function->isDeprecated() === true) { + $this->forbiddenFunctions[$functionName] = null; + } + } + + }//end __construct() + + + /** + * Generates the error or warning for this sniff. + * + * @param \PHP_CodeSniffer\Files\File $phpcsFile The file being scanned. + * @param int $stackPtr The position of the forbidden function + * in the token array. + * @param string $function The name of the forbidden function. + * @param string $pattern The pattern used for the match. + * + * @return void + */ + protected function addError($phpcsFile, $stackPtr, $function, $pattern=null) + { + $data = [$function]; + $error = 'Function %s() has been deprecated'; + $type = 'Deprecated'; + + if ($this->error === true) { + $phpcsFile->addError($error, $stackPtr, $type, $data); + } else { + $phpcsFile->addWarning($error, $stackPtr, $type, $data); + } + + }//end addError() + + +}//end class diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/Generic/Sniffs/PHP/DisallowAlternativePHPTagsSniff.php b/vendor/squizlabs/php_codesniffer/src/Standards/Generic/Sniffs/PHP/DisallowAlternativePHPTagsSniff.php new file mode 100644 index 00000000..433750ad --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/Generic/Sniffs/PHP/DisallowAlternativePHPTagsSniff.php @@ -0,0 +1,253 @@ + + * @copyright 2006-2015 Squiz Pty Ltd (ABN 77 084 670 600) + * @license https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence + */ + +namespace PHP_CodeSniffer\Standards\Generic\Sniffs\PHP; + +use PHP_CodeSniffer\Config; +use PHP_CodeSniffer\Files\File; +use PHP_CodeSniffer\Sniffs\Sniff; + +class DisallowAlternativePHPTagsSniff implements Sniff +{ + + /** + * Whether ASP tags are enabled or not. + * + * @var boolean + */ + private $aspTags = false; + + /** + * The current PHP version. + * + * @var integer + */ + private $phpVersion = null; + + + /** + * Returns an array of tokens this test wants to listen for. + * + * @return array + */ + public function register() + { + if ($this->phpVersion === null) { + $this->phpVersion = Config::getConfigData('php_version'); + if ($this->phpVersion === null) { + $this->phpVersion = PHP_VERSION_ID; + } + } + + if ($this->phpVersion < 70000) { + $this->aspTags = (bool) ini_get('asp_tags'); + } + + return [ + T_OPEN_TAG, + T_OPEN_TAG_WITH_ECHO, + T_INLINE_HTML, + ]; + + }//end register() + + + /** + * Processes this test, when one of its tokens is encountered. + * + * @param \PHP_CodeSniffer\Files\File $phpcsFile The file being scanned. + * @param int $stackPtr The position of the current token + * in the stack passed in $tokens. + * + * @return void + */ + public function process(File $phpcsFile, $stackPtr) + { + $tokens = $phpcsFile->getTokens(); + $openTag = $tokens[$stackPtr]; + $content = $openTag['content']; + + if (trim($content) === '') { + return; + } + + if ($openTag['code'] === T_OPEN_TAG) { + if ($content === '<%') { + $error = 'ASP style opening tag used; expected "findClosingTag($phpcsFile, $tokens, $stackPtr, '%>'); + $errorCode = 'ASPOpenTagFound'; + } else if (strpos($content, ''); + $errorCode = 'ScriptOpenTagFound'; + } + + if (isset($error, $closer, $errorCode) === true) { + $data = [$content]; + + if ($closer === false) { + $phpcsFile->addError($error, $stackPtr, $errorCode, $data); + } else { + $fix = $phpcsFile->addFixableError($error, $stackPtr, $errorCode, $data); + if ($fix === true) { + $this->addChangeset($phpcsFile, $tokens, $stackPtr, $closer); + } + } + } + + return; + }//end if + + if ($openTag['code'] === T_OPEN_TAG_WITH_ECHO && $content === '<%=') { + $error = 'ASP style opening tag used with echo; expected "findNext(T_WHITESPACE, ($stackPtr + 1), null, true); + $snippet = $this->getSnippet($tokens[$nextVar]['content']); + $data = [ + $snippet, + $content, + $snippet, + ]; + + $closer = $this->findClosingTag($phpcsFile, $tokens, $stackPtr, '%>'); + + if ($closer === false) { + $phpcsFile->addError($error, $stackPtr, 'ASPShortOpenTagFound', $data); + } else { + $fix = $phpcsFile->addFixableError($error, $stackPtr, 'ASPShortOpenTagFound', $data); + if ($fix === true) { + $this->addChangeset($phpcsFile, $tokens, $stackPtr, $closer, true); + } + } + + return; + }//end if + + // Account for incorrect script open tags. + if ($openTag['code'] === T_INLINE_HTML + && preg_match('`( + + + + diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/PHP/DisallowAlternativePHPTagsUnitTest.1.inc.fixed b/vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/PHP/DisallowAlternativePHPTagsUnitTest.1.inc.fixed new file mode 100644 index 00000000..2a695c89 --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/PHP/DisallowAlternativePHPTagsUnitTest.1.inc.fixed @@ -0,0 +1,14 @@ +
    + +Some content here. + + + + +
    diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/PHP/DisallowAlternativePHPTagsUnitTest.2.inc b/vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/PHP/DisallowAlternativePHPTagsUnitTest.2.inc new file mode 100644 index 00000000..cd5a6620 --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/PHP/DisallowAlternativePHPTagsUnitTest.2.inc @@ -0,0 +1,6 @@ +
    +<% echo $var; %> +

    Some text <% echo $var; %> and some more text

    +<%= $var . ' and some more text to make sure the snippet works'; %> +

    Some text <%= $var %> and some more text

    +
    diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/PHP/DisallowAlternativePHPTagsUnitTest.2.inc.fixed b/vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/PHP/DisallowAlternativePHPTagsUnitTest.2.inc.fixed new file mode 100644 index 00000000..6eafb422 --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/PHP/DisallowAlternativePHPTagsUnitTest.2.inc.fixed @@ -0,0 +1,6 @@ +
    + +

    Some text and some more text

    + +

    Some text and some more text

    +
    diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/PHP/DisallowAlternativePHPTagsUnitTest.3.inc b/vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/PHP/DisallowAlternativePHPTagsUnitTest.3.inc new file mode 100644 index 00000000..ba86345a --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/PHP/DisallowAlternativePHPTagsUnitTest.3.inc @@ -0,0 +1,7 @@ + +
    +<% echo $var; %> +

    Some text <% echo $var; %> and some more text

    +<%= $var . ' and some more text to make sure the snippet works'; %> +

    Some text <%= $var %> and some more text

    +
    diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/PHP/DisallowAlternativePHPTagsUnitTest.php b/vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/PHP/DisallowAlternativePHPTagsUnitTest.php new file mode 100644 index 00000000..953e8ad9 --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/PHP/DisallowAlternativePHPTagsUnitTest.php @@ -0,0 +1,105 @@ + + * @copyright 2006-2015 Squiz Pty Ltd (ABN 77 084 670 600) + * @license https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence + */ + +namespace PHP_CodeSniffer\Standards\Generic\Tests\PHP; + +use PHP_CodeSniffer\Tests\Standards\AbstractSniffUnitTest; + +class DisallowAlternativePHPTagsUnitTest extends AbstractSniffUnitTest +{ + + + /** + * Get a list of all test files to check. + * + * @param string $testFileBase The base path that the unit tests files will have. + * + * @return string[] + */ + protected function getTestFiles($testFileBase) + { + $testFiles = [$testFileBase.'1.inc']; + + $aspTags = false; + if (PHP_VERSION_ID < 70000) { + $aspTags = (bool) ini_get('asp_tags'); + } + + if ($aspTags === true) { + $testFiles[] = $testFileBase.'2.inc'; + } else { + $testFiles[] = $testFileBase.'3.inc'; + } + + return $testFiles; + + }//end getTestFiles() + + + /** + * Returns the lines where errors should occur. + * + * The key of the array should represent the line number and the value + * should represent the number of errors that should occur on that line. + * + * @param string $testFile The name of the file being tested. + * + * @return array + */ + public function getErrorList($testFile='') + { + switch ($testFile) { + case 'DisallowAlternativePHPTagsUnitTest.1.inc': + return [ + 4 => 1, + 7 => 1, + 8 => 1, + 11 => 1, + ]; + case 'DisallowAlternativePHPTagsUnitTest.2.inc': + return [ + 2 => 1, + 3 => 1, + 4 => 1, + 5 => 1, + ]; + default: + return []; + }//end switch + + }//end getErrorList() + + + /** + * Returns the lines where warnings should occur. + * + * The key of the array should represent the line number and the value + * should represent the number of warnings that should occur on that line. + * + * @param string $testFile The name of the file being tested. + * + * @return array + */ + public function getWarningList($testFile='') + { + if ($testFile === 'DisallowAlternativePHPTagsUnitTest.3.inc') { + return [ + 3 => 1, + 4 => 1, + 5 => 1, + 6 => 1, + ]; + } + + return []; + + }//end getWarningList() + + +}//end class diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/PHP/DisallowRequestSuperglobalUnitTest.inc b/vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/PHP/DisallowRequestSuperglobalUnitTest.inc new file mode 100644 index 00000000..974e45c0 --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/PHP/DisallowRequestSuperglobalUnitTest.inc @@ -0,0 +1,16 @@ + diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/PHP/DisallowRequestSuperglobalUnitTest.php b/vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/PHP/DisallowRequestSuperglobalUnitTest.php new file mode 100644 index 00000000..7ece5512 --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/PHP/DisallowRequestSuperglobalUnitTest.php @@ -0,0 +1,51 @@ + + * @copyright 2006-2019 Squiz Pty Ltd (ABN 77 084 670 600) + * @license https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence + */ +namespace PHP_CodeSniffer\Standards\Generic\Tests\PHP; + +use PHP_CodeSniffer\Tests\Standards\AbstractSniffUnitTest; + +class DisallowRequestSuperglobalUnitTest extends AbstractSniffUnitTest +{ + + + /** + * Returns the lines where errors should occur. + * + * The key of the array should represent the line number and the value + * should represent the number of errors that should occur on that line. + * + * @return array + */ + protected function getErrorList() + { + return [ + 2 => 1, + 12 => 1, + 13 => 1, + ]; + + }//end getErrorList() + + + /** + * Returns the lines where warnings should occur. + * + * The key of the array should represent the line number and the value + * should represent the number of warnings that should occur on that line. + * + * @return array + */ + protected function getWarningList() + { + return []; + + }//end getWarningList() + + +}//end class diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/PHP/DisallowShortOpenTagUnitTest.1.inc b/vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/PHP/DisallowShortOpenTagUnitTest.1.inc new file mode 100644 index 00000000..040e62dc --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/PHP/DisallowShortOpenTagUnitTest.1.inc @@ -0,0 +1,11 @@ +
    + +Some content here. + + +Some content Some more content + + +
    diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/PHP/DisallowShortOpenTagUnitTest.1.inc.fixed b/vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/PHP/DisallowShortOpenTagUnitTest.1.inc.fixed new file mode 100644 index 00000000..1ea281a4 --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/PHP/DisallowShortOpenTagUnitTest.1.inc.fixed @@ -0,0 +1,11 @@ +
    + +Some content here. + + +Some content Some more content + + +
    diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/PHP/DisallowShortOpenTagUnitTest.2.inc b/vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/PHP/DisallowShortOpenTagUnitTest.2.inc new file mode 100644 index 00000000..85617ded --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/PHP/DisallowShortOpenTagUnitTest.2.inc @@ -0,0 +1,8 @@ +
    + +Some content Some more content + + +
    diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/PHP/DisallowShortOpenTagUnitTest.2.inc.fixed b/vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/PHP/DisallowShortOpenTagUnitTest.2.inc.fixed new file mode 100644 index 00000000..afe5d8f2 --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/PHP/DisallowShortOpenTagUnitTest.2.inc.fixed @@ -0,0 +1,8 @@ +
    + +Some content Some more content + + +
    diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/PHP/DisallowShortOpenTagUnitTest.3.inc b/vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/PHP/DisallowShortOpenTagUnitTest.3.inc new file mode 100644 index 00000000..9b7ccd6d --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/PHP/DisallowShortOpenTagUnitTest.3.inc @@ -0,0 +1,16 @@ +// Test warning for when short_open_tag is off. + +Some content Some more content + +// Test multi-line. +Some content Some more content + +// Make sure skipping works. +Some content Some more content + +// Only recognize closing tag after opener. +Some?> content + * @copyright 2006-2015 Squiz Pty Ltd (ABN 77 084 670 600) + * @license https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence + */ + +namespace PHP_CodeSniffer\Standards\Generic\Tests\PHP; + +use PHP_CodeSniffer\Tests\Standards\AbstractSniffUnitTest; + +class DisallowShortOpenTagUnitTest extends AbstractSniffUnitTest +{ + + + /** + * Get a list of all test files to check. + * + * @param string $testFileBase The base path that the unit tests files will have. + * + * @return string[] + */ + protected function getTestFiles($testFileBase) + { + $testFiles = [$testFileBase.'1.inc']; + + $option = (bool) ini_get('short_open_tag'); + if ($option === true) { + $testFiles[] = $testFileBase.'2.inc'; + } else { + $testFiles[] = $testFileBase.'3.inc'; + } + + return $testFiles; + + }//end getTestFiles() + + + /** + * Returns the lines where errors should occur. + * + * The key of the array should represent the line number and the value + * should represent the number of errors that should occur on that line. + * + * @param string $testFile The name of the file being tested. + * + * @return array + */ + public function getErrorList($testFile='') + { + switch ($testFile) { + case 'DisallowShortOpenTagUnitTest.1.inc': + return [ + 5 => 1, + 6 => 1, + 7 => 1, + 10 => 1, + ]; + case 'DisallowShortOpenTagUnitTest.2.inc': + return [ + 2 => 1, + 3 => 1, + 4 => 1, + 7 => 1, + ]; + default: + return []; + }//end switch + + }//end getErrorList() + + + /** + * Returns the lines where warnings should occur. + * + * The key of the array should represent the line number and the value + * should represent the number of warnings that should occur on that line. + * + * @param string $testFile The name of the file being tested. + * + * @return array + */ + public function getWarningList($testFile='') + { + switch ($testFile) { + case 'DisallowShortOpenTagUnitTest.1.inc': + return []; + case 'DisallowShortOpenTagUnitTest.3.inc': + return [ + 3 => 1, + 6 => 1, + 11 => 1, + ]; + default: + return []; + }//end switch + + }//end getWarningList() + + +}//end class diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/PHP/DiscourageGotoUnitTest.inc b/vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/PHP/DiscourageGotoUnitTest.inc new file mode 100644 index 00000000..f564215b --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/PHP/DiscourageGotoUnitTest.inc @@ -0,0 +1,18 @@ + + * @copyright 2006-2017 Squiz Pty Ltd (ABN 77 084 670 600) + * @license https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence + */ + +namespace PHP_CodeSniffer\Standards\Generic\Tests\PHP; + +use PHP_CodeSniffer\Tests\Standards\AbstractSniffUnitTest; + +class DiscourageGotoUnitTest extends AbstractSniffUnitTest +{ + + + /** + * Returns the lines where errors should occur. + * + * The key of the array should represent the line number and the value + * should represent the number of errors that should occur on that line. + * + * @return array + */ + public function getErrorList() + { + return []; + + }//end getErrorList() + + + /** + * Returns the lines where warnings should occur. + * + * The key of the array should represent the line number and the value + * should represent the number of warnings that should occur on that line. + * + * @return array + */ + public function getWarningList() + { + return [ + 3 => 1, + 6 => 1, + 11 => 1, + 16 => 1, + ]; + + }//end getWarningList() + + +}//end class diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/PHP/ForbiddenFunctionsUnitTest.inc b/vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/PHP/ForbiddenFunctionsUnitTest.inc new file mode 100644 index 00000000..b30f0dde --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/PHP/ForbiddenFunctionsUnitTest.inc @@ -0,0 +1,57 @@ +sizeof($array); +$size = $class->count($array); +$class->delete($filepath); +$class->unset($filepath); + +function delete() {} +function unset() {} +function sizeof() {} +function count() {} + +trait DelProvider { + public function delete() { + //irrelevant + } +} + +class LeftSideTest { + use DelProvider { + delete as protected unsetter; + } +} + +class RightSideTest { + use DelProvider { + delete as delete; + } +} + +class RightSideVisTest { + use DelProvider { + delete as protected delete; + DelProvider::delete insteadof delete; + } +} + +namespace Something\sizeof; +$var = new Sizeof(); +class SizeOf implements Something {} + +function mymodule_form_callback(SizeOf $sizeof) { +} + +$size = $class?->sizeof($array); diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/PHP/ForbiddenFunctionsUnitTest.php b/vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/PHP/ForbiddenFunctionsUnitTest.php new file mode 100644 index 00000000..760e8078 --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/PHP/ForbiddenFunctionsUnitTest.php @@ -0,0 +1,54 @@ + + * @copyright 2006-2015 Squiz Pty Ltd (ABN 77 084 670 600) + * @license https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence + */ + +namespace PHP_CodeSniffer\Standards\Generic\Tests\PHP; + +use PHP_CodeSniffer\Tests\Standards\AbstractSniffUnitTest; + +class ForbiddenFunctionsUnitTest extends AbstractSniffUnitTest +{ + + + /** + * Returns the lines where errors should occur. + * + * The key of the array should represent the line number and the value + * should represent the number of errors that should occur on that line. + * + * @return array + */ + public function getErrorList() + { + $errors = [ + 2 => 1, + 4 => 1, + 6 => 1, + ]; + + return $errors; + + }//end getErrorList() + + + /** + * Returns the lines where warnings should occur. + * + * The key of the array should represent the line number and the value + * should represent the number of warnings that should occur on that line. + * + * @return array + */ + public function getWarningList() + { + return []; + + }//end getWarningList() + + +}//end class diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/PHP/LowerCaseConstantUnitTest.inc b/vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/PHP/LowerCaseConstantUnitTest.inc new file mode 100644 index 00000000..63aea518 --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/PHP/LowerCaseConstantUnitTest.inc @@ -0,0 +1,83 @@ +NULL = 7; + +use Zend\Log\Writer\NULL as NullWriter; +new \Zend\Log\Writer\NULL(); + +namespace False; + +class True extends Null implements False {} + +use True\Something; +use Something\True; +class MyClass +{ + public function myFunction() + { + $var = array('foo' => new True()); + } +} + +$x = $f?FALSE:true; +$x = $f? FALSE:true; + +class MyClass +{ + // Spice things up a little. + const TRUE = false; +} + +var_dump(MyClass::TRUE); + +function tRUE() {} + +$input->getFilterChain()->attachByName('Null', ['type' => Null::TYPE_STRING]); diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/PHP/LowerCaseConstantUnitTest.inc.fixed b/vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/PHP/LowerCaseConstantUnitTest.inc.fixed new file mode 100644 index 00000000..b3c3d8a1 --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/PHP/LowerCaseConstantUnitTest.inc.fixed @@ -0,0 +1,83 @@ +NULL = 7; + +use Zend\Log\Writer\NULL as NullWriter; +new \Zend\Log\Writer\NULL(); + +namespace False; + +class True extends Null implements False {} + +use True\Something; +use Something\True; +class MyClass +{ + public function myFunction() + { + $var = array('foo' => new True()); + } +} + +$x = $f?false:true; +$x = $f? false:true; + +class MyClass +{ + // Spice things up a little. + const TRUE = false; +} + +var_dump(MyClass::TRUE); + +function tRUE() {} + +$input->getFilterChain()->attachByName('Null', ['type' => Null::TYPE_STRING]); diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/PHP/LowerCaseConstantUnitTest.js b/vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/PHP/LowerCaseConstantUnitTest.js new file mode 100644 index 00000000..87cfb820 --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/PHP/LowerCaseConstantUnitTest.js @@ -0,0 +1,14 @@ +if (variable === true) { } +if (variable === TRUE) { } +if (variable === True) { } +variable = True; + +if (variable === false) { } +if (variable === FALSE) { } +if (variable === False) { } +variable = false; + +if (variable === null) { } +if (variable === NULL) { } +if (variable === Null) { } +variable = NULL; diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/PHP/LowerCaseConstantUnitTest.js.fixed b/vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/PHP/LowerCaseConstantUnitTest.js.fixed new file mode 100644 index 00000000..7dbf3adf --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/PHP/LowerCaseConstantUnitTest.js.fixed @@ -0,0 +1,14 @@ +if (variable === true) { } +if (variable === true) { } +if (variable === true) { } +variable = true; + +if (variable === false) { } +if (variable === false) { } +if (variable === false) { } +variable = false; + +if (variable === null) { } +if (variable === null) { } +if (variable === null) { } +variable = null; diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/PHP/LowerCaseConstantUnitTest.php b/vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/PHP/LowerCaseConstantUnitTest.php new file mode 100644 index 00000000..85e8f701 --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/PHP/LowerCaseConstantUnitTest.php @@ -0,0 +1,84 @@ + + * @copyright 2006-2015 Squiz Pty Ltd (ABN 77 084 670 600) + * @license https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence + */ + +namespace PHP_CodeSniffer\Standards\Generic\Tests\PHP; + +use PHP_CodeSniffer\Tests\Standards\AbstractSniffUnitTest; + +class LowerCaseConstantUnitTest extends AbstractSniffUnitTest +{ + + + /** + * Returns the lines where errors should occur. + * + * The key of the array should represent the line number and the value + * should represent the number of errors that should occur on that line. + * + * @param string $testFile The name of the file being tested. + * + * @return array + */ + public function getErrorList($testFile='LowerCaseConstantUnitTest.inc') + { + switch ($testFile) { + case 'LowerCaseConstantUnitTest.inc': + return [ + 7 => 1, + 10 => 1, + 15 => 1, + 16 => 1, + 23 => 1, + 26 => 1, + 31 => 1, + 32 => 1, + 39 => 1, + 42 => 1, + 47 => 1, + 48 => 1, + 70 => 1, + 71 => 1, + ]; + break; + case 'LowerCaseConstantUnitTest.js': + return [ + 2 => 1, + 3 => 1, + 4 => 1, + 7 => 1, + 8 => 1, + 12 => 1, + 13 => 1, + 14 => 1, + ]; + break; + default: + return []; + break; + }//end switch + + }//end getErrorList() + + + /** + * Returns the lines where warnings should occur. + * + * The key of the array should represent the line number and the value + * should represent the number of warnings that should occur on that line. + * + * @return array + */ + public function getWarningList() + { + return []; + + }//end getWarningList() + + +}//end class diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/PHP/LowerCaseKeywordUnitTest.inc b/vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/PHP/LowerCaseKeywordUnitTest.inc new file mode 100644 index 00000000..8d003c3b --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/PHP/LowerCaseKeywordUnitTest.inc @@ -0,0 +1,39 @@ + $x; +$r = Match ($x) { + 1 => 1, + 2 => 2, + DEFAULT, => 3, +}; + +__HALT_COMPILER(); // An exception due to phar support. +function diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/PHP/LowerCaseKeywordUnitTest.inc.fixed b/vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/PHP/LowerCaseKeywordUnitTest.inc.fixed new file mode 100644 index 00000000..bbe76b9e --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/PHP/LowerCaseKeywordUnitTest.inc.fixed @@ -0,0 +1,39 @@ + $x; +$r = match ($x) { + 1 => 1, + 2 => 2, + default, => 3, +}; + +__HALT_COMPILER(); // An exception due to phar support. +function diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/PHP/LowerCaseKeywordUnitTest.php b/vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/PHP/LowerCaseKeywordUnitTest.php new file mode 100644 index 00000000..b272196b --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/PHP/LowerCaseKeywordUnitTest.php @@ -0,0 +1,63 @@ + + * @copyright 2006-2015 Squiz Pty Ltd (ABN 77 084 670 600) + * @license https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence + */ + +namespace PHP_CodeSniffer\Standards\Generic\Tests\PHP; + +use PHP_CodeSniffer\Tests\Standards\AbstractSniffUnitTest; + +class LowerCaseKeywordUnitTest extends AbstractSniffUnitTest +{ + + + /** + * Returns the lines where errors should occur. + * + * The key of the array should represent the line number and the value + * should represent the number of errors that should occur on that line. + * + * @return array + */ + public function getErrorList() + { + return [ + 10 => 3, + 11 => 4, + 12 => 1, + 13 => 3, + 14 => 7, + 15 => 1, + 19 => 1, + 20 => 1, + 21 => 1, + 25 => 1, + 28 => 1, + 31 => 1, + 32 => 1, + 35 => 1, + ]; + + }//end getErrorList() + + + /** + * Returns the lines where warnings should occur. + * + * The key of the array should represent the line number and the value + * should represent the number of warnings that should occur on that line. + * + * @return array + */ + public function getWarningList() + { + return []; + + }//end getWarningList() + + +}//end class diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/PHP/LowerCaseTypeUnitTest.inc b/vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/PHP/LowerCaseTypeUnitTest.inc new file mode 100644 index 00000000..8e2dca17 --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/PHP/LowerCaseTypeUnitTest.inc @@ -0,0 +1,83 @@ + + * @copyright 2006-2015 Squiz Pty Ltd (ABN 77 084 670 600) + * @license https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence + */ + +namespace PHP_CodeSniffer\Standards\Generic\Tests\PHP; + +use PHP_CodeSniffer\Tests\Standards\AbstractSniffUnitTest; + +class LowerCaseTypeUnitTest extends AbstractSniffUnitTest +{ + + + /** + * Returns the lines where errors should occur. + * + * The key of the array should represent the line number and the value + * should represent the number of errors that should occur on that line. + * + * @return array + */ + public function getErrorList() + { + return [ + 14 => 1, + 15 => 1, + 16 => 1, + 17 => 1, + 18 => 1, + 21 => 4, + 22 => 3, + 23 => 3, + 25 => 1, + 26 => 2, + 27 => 2, + 32 => 4, + 36 => 1, + 37 => 1, + 38 => 1, + 39 => 1, + 43 => 2, + 44 => 1, + 46 => 1, + 49 => 1, + 51 => 2, + 53 => 1, + 55 => 2, + 60 => 1, + 61 => 1, + 62 => 1, + 63 => 1, + 64 => 1, + 65 => 1, + 66 => 1, + 67 => 1, + 68 => 1, + 69 => 1, + 71 => 3, + 72 => 2, + 73 => 3, + 74 => 3, + 78 => 3, + 82 => 2, + ]; + + }//end getErrorList() + + + /** + * Returns the lines where warnings should occur. + * + * The key of the array should represent the line number and the value + * should represent the number of warnings that should occur on that line. + * + * @return array + */ + public function getWarningList() + { + return []; + + }//end getWarningList() + + +}//end class diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/PHP/NoSilencedErrorsUnitTest.inc b/vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/PHP/NoSilencedErrorsUnitTest.inc new file mode 100644 index 00000000..72bffe2c --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/PHP/NoSilencedErrorsUnitTest.inc @@ -0,0 +1,10 @@ + + * @copyright 2006-2015 Squiz Pty Ltd (ABN 77 084 670 600) + * @license https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence + */ + +namespace PHP_CodeSniffer\Standards\Generic\Tests\PHP; + +use PHP_CodeSniffer\Tests\Standards\AbstractSniffUnitTest; + +class NoSilencedErrorsUnitTest extends AbstractSniffUnitTest +{ + + + /** + * Returns the lines where errors should occur. + * + * The key of the array should represent the line number and the value + * should represent the number of errors that should occur on that line. + * + * @return array + */ + public function getErrorList() + { + return []; + + }//end getErrorList() + + + /** + * Returns the lines where warnings should occur. + * + * The key of the array should represent the line number and the value + * should represent the number of warnings that should occur on that line. + * + * @return array + */ + public function getWarningList() + { + return [ + 5 => 1, + 10 => 1, + ]; + + }//end getWarningList() + + +}//end class diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/PHP/RequireStrictTypesUnitTest.1.inc b/vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/PHP/RequireStrictTypesUnitTest.1.inc new file mode 100644 index 00000000..387cec24 --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/PHP/RequireStrictTypesUnitTest.1.inc @@ -0,0 +1,8 @@ + + * @copyright 2006-2019 Squiz Pty Ltd (ABN 77 084 670 600) + * @license https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence + */ + +namespace PHP_CodeSniffer\Standards\Generic\Tests\PHP; + +use PHP_CodeSniffer\Tests\Standards\AbstractSniffUnitTest; + +class RequireStrictTypesUnitTest extends AbstractSniffUnitTest +{ + + + /** + * Returns the lines where errors should occur. + * + * The key of the array should represent the line number and the value + * should represent the number of errors that should occur on that line. + * + * @param string $testFile The name of the file being tested. + * + * @return array + */ + public function getErrorList($testFile='') + { + switch ($testFile) { + case 'RequireStrictTypesUnitTest.1.inc': + return []; + break; + } + + return [1 => 1]; + + }//end getErrorList() + + + /** + * Returns the lines where warnings should occur. + * + * The key of the array should represent the line number and the value + * should represent the number of warnings that should occur on that line. + * + * @return array + */ + public function getWarningList() + { + return []; + + }//end getWarningList() + + +}//end class diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/PHP/SAPIUsageUnitTest.inc b/vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/PHP/SAPIUsageUnitTest.inc new file mode 100644 index 00000000..f0f350f3 --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/PHP/SAPIUsageUnitTest.inc @@ -0,0 +1,5 @@ +php_sapi_name() === true) {} +if ($object?->php_sapi_name() === true) {} diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/PHP/SAPIUsageUnitTest.php b/vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/PHP/SAPIUsageUnitTest.php new file mode 100644 index 00000000..08c0ccdc --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/PHP/SAPIUsageUnitTest.php @@ -0,0 +1,48 @@ + + * @copyright 2006-2015 Squiz Pty Ltd (ABN 77 084 670 600) + * @license https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence + */ + +namespace PHP_CodeSniffer\Standards\Generic\Tests\PHP; + +use PHP_CodeSniffer\Tests\Standards\AbstractSniffUnitTest; + +class SAPIUsageUnitTest extends AbstractSniffUnitTest +{ + + + /** + * Returns the lines where errors should occur. + * + * The key of the array should represent the line number and the value + * should represent the number of errors that should occur on that line. + * + * @return array + */ + public function getErrorList() + { + return [2 => 1]; + + }//end getErrorList() + + + /** + * Returns the lines where warnings should occur. + * + * The key of the array should represent the line number and the value + * should represent the number of warnings that should occur on that line. + * + * @return array + */ + public function getWarningList() + { + return []; + + }//end getWarningList() + + +}//end class diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/PHP/SyntaxUnitTest.1.inc b/vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/PHP/SyntaxUnitTest.1.inc new file mode 100644 index 00000000..4f0d9d84 --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/PHP/SyntaxUnitTest.1.inc @@ -0,0 +1,4 @@ + +
    text
    + diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/PHP/SyntaxUnitTest.php b/vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/PHP/SyntaxUnitTest.php new file mode 100644 index 00000000..98d205ce --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/PHP/SyntaxUnitTest.php @@ -0,0 +1,59 @@ + + * @author Blaine Schmeisser + * @copyright 2006-2015 Squiz Pty Ltd (ABN 77 084 670 600) + * @license https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence + */ + +namespace PHP_CodeSniffer\Standards\Generic\Tests\PHP; + +use PHP_CodeSniffer\Tests\Standards\AbstractSniffUnitTest; + +class SyntaxUnitTest extends AbstractSniffUnitTest +{ + + + /** + * Returns the lines where errors should occur. + * + * The key of the array should represent the line number and the value + * should represent the number of errors that should occur on that line. + * + * @param string $testFile The name of the file being tested. + * + * @return array + */ + public function getErrorList($testFile='') + { + switch ($testFile) { + case 'SyntaxUnitTest.1.inc': + case 'SyntaxUnitTest.2.inc': + return [3 => 1]; + break; + default: + return []; + break; + } + + }//end getErrorList() + + + /** + * Returns the lines where warnings should occur. + * + * The key of the array should represent the line number and the value + * should represent the number of warnings that should occur on that line. + * + * @return array + */ + public function getWarningList() + { + return []; + + }//end getWarningList() + + +}//end class diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/PHP/UpperCaseConstantUnitTest.inc b/vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/PHP/UpperCaseConstantUnitTest.inc new file mode 100644 index 00000000..965bf3b5 --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/PHP/UpperCaseConstantUnitTest.inc @@ -0,0 +1,81 @@ +null = 7; + +use Zend\Log\Writer\Null as NullWriter; +new \Zend\Log\Writer\Null(); + +namespace False; + +class True extends Null implements False {} + +use True\Something; +use Something\True; +class MyClass +{ + public function myFunction() + { + $var = array('foo' => new True()); + } +} + +$x = $f?false:TRUE; +$x = $f? false:TRUE; + +class MyClass +{ + // Spice things up a little. + const true = FALSE; +} + +var_dump(MyClass::true); + +function true() {} \ No newline at end of file diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/PHP/UpperCaseConstantUnitTest.inc.fixed b/vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/PHP/UpperCaseConstantUnitTest.inc.fixed new file mode 100644 index 00000000..ae83dc91 --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/PHP/UpperCaseConstantUnitTest.inc.fixed @@ -0,0 +1,81 @@ +null = 7; + +use Zend\Log\Writer\Null as NullWriter; +new \Zend\Log\Writer\Null(); + +namespace False; + +class True extends Null implements False {} + +use True\Something; +use Something\True; +class MyClass +{ + public function myFunction() + { + $var = array('foo' => new True()); + } +} + +$x = $f?FALSE:TRUE; +$x = $f? FALSE:TRUE; + +class MyClass +{ + // Spice things up a little. + const true = FALSE; +} + +var_dump(MyClass::true); + +function true() {} \ No newline at end of file diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/PHP/UpperCaseConstantUnitTest.php b/vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/PHP/UpperCaseConstantUnitTest.php new file mode 100644 index 00000000..0bdafe6a --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/PHP/UpperCaseConstantUnitTest.php @@ -0,0 +1,63 @@ + + * @copyright 2006-2015 Squiz Pty Ltd (ABN 77 084 670 600) + * @license https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence + */ + +namespace PHP_CodeSniffer\Standards\Generic\Tests\PHP; + +use PHP_CodeSniffer\Tests\Standards\AbstractSniffUnitTest; + +class UpperCaseConstantUnitTest extends AbstractSniffUnitTest +{ + + + /** + * Returns the lines where errors should occur. + * + * The key of the array should represent the line number and the value + * should represent the number of errors that should occur on that line. + * + * @return array + */ + public function getErrorList() + { + return [ + 7 => 1, + 10 => 1, + 15 => 1, + 16 => 1, + 23 => 1, + 26 => 1, + 31 => 1, + 32 => 1, + 39 => 1, + 42 => 1, + 47 => 1, + 48 => 1, + 70 => 1, + 71 => 1, + ]; + + }//end getErrorList() + + + /** + * Returns the lines where warnings should occur. + * + * The key of the array should represent the line number and the value + * should represent the number of warnings that should occur on that line. + * + * @return array + */ + public function getWarningList() + { + return []; + + }//end getWarningList() + + +}//end class diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/Strings/UnnecessaryStringConcatUnitTest.inc b/vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/Strings/UnnecessaryStringConcatUnitTest.inc new file mode 100644 index 00000000..43c05a11 --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/Strings/UnnecessaryStringConcatUnitTest.inc @@ -0,0 +1,21 @@ +'; +$code = '<'.'?php '; + +$string = 'This is a really long string. ' + . 'It is being used for errors. ' + . 'The message is not translated.'; +?> diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/Strings/UnnecessaryStringConcatUnitTest.js b/vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/Strings/UnnecessaryStringConcatUnitTest.js new file mode 100644 index 00000000..6be79008 --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/Strings/UnnecessaryStringConcatUnitTest.js @@ -0,0 +1,15 @@ +var x = 'My ' + 'string'; +var x = 'My ' + 1234; +var x = 'My ' + y + ' test'; + +this.errors['test'] = x; +this.errors['test' + 10] = x; +this.errors['test' + y] = x; +this.errors['test' + 'blah'] = x; +this.errors[y] = x; +this.errors[y + z] = x; +this.errors[y + z + 'My' + 'String'] = x; + +var long = 'This is a really long string. ' + + 'It is being used for errors. ' + + 'The message is not translated.'; diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/Strings/UnnecessaryStringConcatUnitTest.php b/vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/Strings/UnnecessaryStringConcatUnitTest.php new file mode 100644 index 00000000..6a928482 --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/Strings/UnnecessaryStringConcatUnitTest.php @@ -0,0 +1,73 @@ + + * @copyright 2006-2015 Squiz Pty Ltd (ABN 77 084 670 600) + * @license https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence + */ + +namespace PHP_CodeSniffer\Standards\Generic\Tests\Strings; + +use PHP_CodeSniffer\Tests\Standards\AbstractSniffUnitTest; + +class UnnecessaryStringConcatUnitTest extends AbstractSniffUnitTest +{ + + + /** + * Returns the lines where errors should occur. + * + * The key of the array should represent the line number and the value + * should represent the number of errors that should occur on that line. + * + * @param string $testFile The name of the file being tested. + * + * @return array + */ + public function getErrorList($testFile='UnnecessaryStringConcatUnitTest.inc') + { + switch ($testFile) { + case 'UnnecessaryStringConcatUnitTest.inc': + return [ + 2 => 1, + 6 => 1, + 9 => 1, + 12 => 1, + 19 => 1, + 20 => 1, + ]; + break; + case 'UnnecessaryStringConcatUnitTest.js': + return [ + 1 => 1, + 8 => 1, + 11 => 1, + 14 => 1, + 15 => 1, + ]; + break; + default: + return []; + break; + }//end switch + + }//end getErrorList() + + + /** + * Returns the lines where warnings should occur. + * + * The key of the array should represent the line number and the value + * should represent the number of warnings that should occur on that line. + * + * @return array + */ + public function getWarningList() + { + return []; + + }//end getWarningList() + + +}//end class diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/VersionControl/GitMergeConflictUnitTest.1.css b/vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/VersionControl/GitMergeConflictUnitTest.1.css new file mode 100644 index 00000000..de84a948 --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/VersionControl/GitMergeConflictUnitTest.1.css @@ -0,0 +1,35 @@ +/* + * This is a CSS comment. +<<<<<<< HEAD + * This is a merge conflict... +======= + * which should be detected. +>>>>>>> ref/heads/feature-branch + */ + +.SettingsTabPaneWidgetType-tab-mid { + background: transparent url(tab_inact_mid.png) repeat-x; +<<<<<<< HEAD + line-height: -25px; +======= + line-height: -20px; +>>>>>>> ref/heads/feature-branch + cursor: pointer; + -moz-user-select: none; +} + +/* + * The above tests are based on "normal" tokens. + * The below test checks that once the tokenizer breaks down because of + * unexpected merge conflict boundaries, subsequent boundaries will still + * be detected correctly. + */ + +/* + * This is a CSS comment. +<<<<<<< HEAD + * This is a merge conflict... +======= + * which should be detected. +>>>>>>> ref/heads/feature-branch + */ diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/VersionControl/GitMergeConflictUnitTest.1.inc b/vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/VersionControl/GitMergeConflictUnitTest.1.inc new file mode 100644 index 00000000..470c3b8f --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/VersionControl/GitMergeConflictUnitTest.1.inc @@ -0,0 +1,61 @@ +> -1); +var_dump( +1 +<< +-1 +); + +$string = +<< 'a' +<<<<<<< HEAD + 'b' => 'b' +======= + 'c' => 'c' +>>>>>>> master + ); + } + +/* + * The above tests are based on "normal" tokens. + * The below test checks that once the tokenizer breaks down because of + * unexpected merge conflict boundaries - i.e. after the first merge conflict + * opener in non-comment, non-heredoc/nowdoc, non-inline HTML code -, subsequent + * merge conflict boundaries will still be detected correctly. + */ + +/* + * Testing detecting subsequent merge conflicts. + * +<<<<<<< HEAD + * @var string $bar + */ +public function foo($bar){ } + +/** +============ +The above is not the boundary, the below is. +======= + * @var string $bar +>>>>>>> f19f8a5... Commit message +*/ + +// Test that stray boundaries, i.e. an opener without closer and such, are detected. +<<<<<<< HEAD +$a = 1; +======= diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/VersionControl/GitMergeConflictUnitTest.2.css b/vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/VersionControl/GitMergeConflictUnitTest.2.css new file mode 100644 index 00000000..6caa78d0 --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/VersionControl/GitMergeConflictUnitTest.2.css @@ -0,0 +1,32 @@ +/* + * This is a CSS comment. +<<<<<<< HEAD + * This is a merge conflict started in a comment, ending in a CSS block. + */ +.SettingsTabPaneWidgetType-tab-mid { + background: transparent url(tab_inact_mid.png) repeat-x; +======= + * which should be detected. + **/ +.SettingsTabPaneWidgetType-tab-start { + line-height: -25px; +>>>>>>> ref/heads/feature-branch + cursor: pointer; + -moz-user-select: none; +} + +/* + * The above tests are based on "normal" tokens. + * The below test checks that once the tokenizer breaks down because of + * unexpected merge conflict boundaries, subsequent boundaries will still + * be detected correctly. + */ + +/* + * This is a CSS comment. +<<<<<<< HEAD + * This is a merge conflict... +======= + * which should be detected. +>>>>>>> ref/heads/feature-branch + */ diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/VersionControl/GitMergeConflictUnitTest.2.inc b/vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/VersionControl/GitMergeConflictUnitTest.2.inc new file mode 100644 index 00000000..809b17d6 --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/VersionControl/GitMergeConflictUnitTest.2.inc @@ -0,0 +1,31 @@ +>>>>>> master + */ + +/* + * Testing detecting merge conflicts using different comment styles. + * +<<<<<<< HEAD + * @var string $bar + */ +public function foo($bar){ } + +/* +======= + * @var string $bar +>>>>>>> master +*/ + +// Comment +<<<<<<< HEAD +// Second comment line. NOTE: The above opener breaks the tokenizer. +======= +// New second comment line +>>>>>>> master +// Third comment line diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/VersionControl/GitMergeConflictUnitTest.3.inc b/vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/VersionControl/GitMergeConflictUnitTest.3.inc new file mode 100644 index 00000000..ce709412 --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/VersionControl/GitMergeConflictUnitTest.3.inc @@ -0,0 +1,43 @@ + +
    +<<<<<<< HEAD +

    Testing a merge conflict.

    +======= +

    Another text string.

    +>>>>>>> ref/heads/feature-branch +
    + + +
    +<<<<<<< HEAD +

    +======= +

    +>>>>>>> ref/heads/feature-branch +
    + +>>>>>> master + +/* + * The above tests are based on "normal" tokens. + * The below test checks that once the tokenizer breaks down because of + * unexpected merge conflict boundaries - i.e. after the first merge conflict + * opener in non-comment, non-heredoc/nowdoc, non-inline HTML code -, subsequent + * merge conflict boundaries will still be detected correctly. + */ +?> + +
    +<<<<<<< HEAD +

    Testing a merge conflict.

    +======= +

    Another text string.

    +>>>>>>> ref/heads/feature-branch +
    diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/VersionControl/GitMergeConflictUnitTest.4.inc b/vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/VersionControl/GitMergeConflictUnitTest.4.inc new file mode 100644 index 00000000..99c0b997 --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/VersionControl/GitMergeConflictUnitTest.4.inc @@ -0,0 +1,71 @@ +>>>>>> ref/heads/other-branchname +And now they are. +EOD; + +// Heredoc with a merge conflict starter, the closer is outside the heredoc. +$string = +<<>>>>>> ref/heads/other-branchname + +// Merge conflict starter outside with a closer inside of the heredoc. +// This breaks the tokenizer. +<<<<<<< HEAD +$string = +<<>>>>>> ref/heads/other-branchname +EOD; + +/* + * The above tests are based on "normal" tokens. + * The below test checks that once the tokenizer breaks down because of + * unexpected merge conflict boundaries - i.e. after the first merge conflict + * opener in non-comment, non-heredoc/nowdoc, non-inline HTML code -, subsequent + * merge conflict boundaries will still be detected correctly. + */ + +$string = +<<>>>>>> ref/heads/other-branchname +And now they are. +EOD; + +$string = +<<>>>>>> ref/heads/other-branchname diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/VersionControl/GitMergeConflictUnitTest.5.inc b/vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/VersionControl/GitMergeConflictUnitTest.5.inc new file mode 100644 index 00000000..7d55f6df --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/VersionControl/GitMergeConflictUnitTest.5.inc @@ -0,0 +1,34 @@ +>>>>>> ref/heads/other-branchname +And now they are. +EOD; + +// Break the tokenizer. +<<<<<<< HEAD + +/* + * The above tests are based on "normal" tokens. + * The below test checks that once the tokenizer breaks down because of + * unexpected merge conflict boundaries - i.e. after the first merge conflict + * opener in non-comment, non-heredoc/nowdoc, non-inline HTML code -, subsequent + * merge conflict boundaries will still be detected correctly. + */ + +$string = +<<<'EOD' +can be problematic. +<<<<<<< HEAD +were previously not detected. +======= +should also be detected. +>>>>>>> ref/heads/other-branchname +And now they are. +EOD; diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/VersionControl/GitMergeConflictUnitTest.6.inc b/vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/VersionControl/GitMergeConflictUnitTest.6.inc new file mode 100644 index 00000000..aaea3245 --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/VersionControl/GitMergeConflictUnitTest.6.inc @@ -0,0 +1,34 @@ +>>>>>> ref/heads/other-branchname + And now they are. + EOD; + +// Break the tokenizer. +>>>>>>> master + +/* + * The above tests are based on "normal" tokens. + * The below test checks that once the tokenizer breaks down because of + * unexpected merge conflict boundaries - i.e. after the first merge conflict + * opener in non-comment, non-heredoc/nowdoc, non-inline HTML code -, subsequent + * merge conflict boundaries will still be detected correctly. + */ + +$string = + <<<"EOD" + Merge conflicts in PHP 7.3 indented heredocs +<<<<<<< HEAD + can be problematic. +======= + should also be detected. +>>>>>>> ref/heads/other-branchname + And now they are. + EOD; diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/VersionControl/GitMergeConflictUnitTest.7.inc b/vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/VersionControl/GitMergeConflictUnitTest.7.inc new file mode 100644 index 00000000..85cae1fd --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/VersionControl/GitMergeConflictUnitTest.7.inc @@ -0,0 +1,19 @@ + +
    +<<<<<<< HEAD +

    Testing a merge conflict.

    +======= +

    Another text string.

    +>>>>>>> ref/heads/feature-branch +
    + + +
    +<<<<<<< HEAD +

    +======= +

    +>>>>>>> ref/heads/feature-branch +
    + + diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/VersionControl/GitMergeConflictUnitTest.js b/vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/VersionControl/GitMergeConflictUnitTest.js new file mode 100644 index 00000000..cd7bc760 --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/VersionControl/GitMergeConflictUnitTest.js @@ -0,0 +1,33 @@ + +result = x?y:z; +result = x ? y : z; + +<<<<<<< HEAD +if (something === true +======= +if (something === false +>>>>>>> develop + ^ somethingElse === true +) { +<<<<<<< HEAD + return true; +======= + return false; +>>>>>>> develop +} + +y = 1 + + 2 + - 3; + +/* +<<<<<<< HEAD + * @var string $bar + */ +if (something === true + +/** +======= + * @var string $foo +>>>>>>> master + */ diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/VersionControl/GitMergeConflictUnitTest.php b/vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/VersionControl/GitMergeConflictUnitTest.php new file mode 100644 index 00000000..50986f48 --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/VersionControl/GitMergeConflictUnitTest.php @@ -0,0 +1,170 @@ + + * @copyright 2017 Juliette Reinders Folmer. All rights reserved. + * @license https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence + */ + +namespace PHP_CodeSniffer\Standards\Generic\Tests\VersionControl; + +use PHP_CodeSniffer\Tests\Standards\AbstractSniffUnitTest; + +class GitMergeConflictUnitTest extends AbstractSniffUnitTest +{ + + + /** + * Returns the lines where errors should occur. + * + * The key of the array should represent the line number and the value + * should represent the number of errors that should occur on that line. + * + * @param string $testFile The name of the file being tested. + * + * @return array + */ + public function getErrorList($testFile='GitMergeConflictUnitTest.1.inc') + { + switch ($testFile) { + case 'GitMergeConflictUnitTest.1.inc': + return [ + 26 => 1, + 28 => 1, + 30 => 1, + 45 => 1, + 53 => 1, + 55 => 1, + 59 => 1, + 61 => 1, + ]; + + case 'GitMergeConflictUnitTest.2.inc': + return [ + 4 => 1, + 6 => 1, + 8 => 1, + 14 => 1, + 20 => 1, + 22 => 1, + 26 => 1, + 28 => 1, + 30 => 1, + ]; + + case 'GitMergeConflictUnitTest.3.inc': + return [ + 3 => 1, + 5 => 1, + 7 => 1, + 12 => 1, + 14 => 1, + 16 => 1, + 22 => 1, + 24 => 1, + 26 => 1, + 38 => 1, + 40 => 1, + 42 => 1, + ]; + + case 'GitMergeConflictUnitTest.4.inc': + return [ + 6 => 1, + 8 => 1, + 10 => 1, + 18 => 1, + 22 => 1, + 25 => 1, + 29 => 1, + 34 => 1, + 39 => 1, + 53 => 1, + 55 => 1, + 57 => 1, + 64 => 1, + 68 => 1, + 71 => 1, + ]; + case 'GitMergeConflictUnitTest.5.inc': + case 'GitMergeConflictUnitTest.6.inc': + return [ + 6 => 1, + 8 => 1, + 10 => 1, + 15 => 1, + 28 => 1, + 30 => 1, + 32 => 1, + ]; + + case 'GitMergeConflictUnitTest.7.inc': + return [ + 3 => 1, + 5 => 1, + 7 => 1, + 12 => 1, + 14 => 1, + 16 => 1, + ]; + + case 'GitMergeConflictUnitTest.1.css': + return [ + 3 => 1, + 5 => 1, + 7 => 1, + 12 => 1, + 14 => 1, + 16 => 1, + 30 => 1, + 32 => 1, + 34 => 1, + ]; + + case 'GitMergeConflictUnitTest.2.css': + return [ + 3 => 1, + 8 => 1, + 13 => 1, + 27 => 1, + 29 => 1, + 31 => 1, + ]; + + case 'GitMergeConflictUnitTest.js': + return [ + 5 => 1, + 7 => 1, + 9 => 1, + 12 => 1, + 14 => 1, + 16 => 1, + 24 => 1, + 30 => 1, + 32 => 1, + ]; + + default: + return []; + }//end switch + + }//end getErrorList() + + + /** + * Returns the lines where warnings should occur. + * + * The key of the array should represent the line number and the value + * should represent the number of warnings that should occur on that line. + * + * @return array + */ + public function getWarningList() + { + return []; + + }//end getWarningList() + + +}//end class diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/VersionControl/SubversionPropertiesUnitTest.inc b/vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/VersionControl/SubversionPropertiesUnitTest.inc new file mode 100644 index 00000000..e4110dee --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/VersionControl/SubversionPropertiesUnitTest.inc @@ -0,0 +1,3 @@ + + * @copyright 2019 Juliette Reinders Folmer. All rights reserved. + * @license https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence + */ + +namespace PHP_CodeSniffer\Standards\Generic\Tests\VersionControl; + +use PHP_CodeSniffer\Tests\Standards\AbstractSniffUnitTest; + +class SubversionPropertiesUnitTest extends AbstractSniffUnitTest +{ + + + /** + * Should this test be skipped for some reason. + * + * @return void + */ + protected function shouldSkipTest() + { + // This sniff cannot be tested as no SVN version control directory is available. + return true; + + }//end shouldSkipTest() + + + /** + * Returns the lines where errors should occur. + * + * The key of the array should represent the line number and the value + * should represent the number of errors that should occur on that line. + * + * @return array + */ + public function getErrorList() + { + return []; + + }//end getErrorList() + + + /** + * Returns the lines where warnings should occur. + * + * The key of the array should represent the line number and the value + * should represent the number of warnings that should occur on that line. + * + * @return array + */ + public function getWarningList() + { + return []; + + }//end getWarningList() + + +}//end class diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/WhiteSpace/ArbitraryParenthesesSpacingUnitTest.inc b/vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/WhiteSpace/ArbitraryParenthesesSpacingUnitTest.inc new file mode 100644 index 00000000..bad3998f --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/WhiteSpace/ArbitraryParenthesesSpacingUnitTest.inc @@ -0,0 +1,165 @@ +{$var}( $foo,$bar ); + +$bar(function( $a, $b ) { + return function( $c, $d ) use ( $a, $b ) { + echo $a, $b, $c, $d; + }; +})( 'a','b' )( 'c','d' ); + +$closure( $foo,$bar ); +$var = $closure() + $closure( $foo,$bar ) + self::$closure( $foo,$bar ); + +class Test { + public static function baz( $foo, $bar ) { + $a = new self( $foo,$bar ); + $b = new static( $foo,$bar ); + } +} + +/* + * Test warning for empty parentheses. + */ +$a = 4 + (); // Warning. +$a = 4 + ( ); // Warning. +$a = 4 + (/* Not empty */); + +/* + * Test the actual sniff. + */ +if ((null !== $extra) && ($row->extra !== $extra)) {} + +if (( null !== $extra ) && ( $row->extra !== $extra )) {} // Bad x 4. + +if (( null !== $extra // Bad x 1. + && is_int($extra)) + && ( $row->extra !== $extra // Bad x 1. + || $something ) // Bad x 1. +) {} + +if (( null !== $extra ) // Bad x 2. + && ( $row->extra !== $extra ) // Bad x 2. +) {} + +$a = (null !== $extra); +$a = ( null !== $extra ); // Bad x 2. + +$sx = $vert ? ($w - 1) : 0; + +$this->is_overloaded = ( ( ini_get("mbstring.func_overload") & 2 ) != 0 ) && function_exists('mb_substr'); // Bad x 4. + +$image->flip( ($operation->axis & 1) != 0, ($operation->axis & 2) != 0 ); + +if ( $success && ('nothumb' == $target || 'all' == $target) ) {} + +$directory = ('/' == $file[ strlen($file)-1 ]); + +// phpcs:set Generic.WhiteSpace.ArbitraryParenthesesSpacing spacing 1 +if ((null !== $extra) && ($row->extra !== $extra)) {} // Bad x 4. + +if (( null !== $extra ) && ( $row->extra !== $extra )) {} + +if (( null !== $extra // Bad x 1. + && is_int($extra)) // Bad x 1. + && ( $row->extra !== $extra + || $something ) // Bad x 1. +) {} + +if ((null !== $extra) // Bad x 2. + && ($row->extra !== $extra) // Bad x 2. +) {} + +$a = (null !== $extra); // Bad x 2. +$a = ( null !== $extra ); + +$sx = $vert ? ($w - 1) : 0; // Bad x 2. + +$this->is_overloaded = ((ini_get("mbstring.func_overload") & 2) != 0) && function_exists('mb_substr'); // Bad x 4. + +$image->flip( ($operation->axis & 1) != 0, ($operation->axis & 2) != 0 ); // Bad x 4. + +if ( $success && ('nothumb' == $target || 'all' == $target) ) {} // Bad x 2. + +$directory = ('/' == $file[ strlen($file)-1 ]); // Bad x 2. + +// phpcs:set Generic.WhiteSpace.ArbitraryParenthesesSpacing spacing 0 + +/* + * Test handling of ignoreNewlines. + */ +if ( + ( + null !== $extra + ) && ( + $row->extra !== $extra + ) +) {} // Bad x 4, 1 x line 123, 2 x line 125, 1 x line 127. + + +$a = ( + null !== $extra +); // Bad x 2, 1 x line 131, 1 x line 133. + +// phpcs:set Generic.WhiteSpace.ArbitraryParenthesesSpacing spacing 1 +if ( + ( + null !== $extra + ) && ( + $row->extra !== $extra + ) +) {} // Bad x 4, 1 x line 137, 2 x line 139, 1 x line 141. + +$a = ( + null !== $extra +); // Bad x 2, 1 x line 144, 1 x line 146. +// phpcs:set Generic.WhiteSpace.ArbitraryParenthesesSpacing spacing 0 + +// phpcs:set Generic.WhiteSpace.ArbitraryParenthesesSpacing ignoreNewlines true +if ( + ( + null !== $extra + ) && ( + $row->extra !== $extra + ) +) {} + +$a = ( + null !== $extra +); +// phpcs:set Generic.WhiteSpace.ArbitraryParenthesesSpacing ignoreNewlines false + +if (true) {} ( 1+2) === 3 ? $a = 1 : $a = 2; +class A {} ( 1+2) === 3 ? $a = 1 : $a = 2; +function foo() {} ( 1+2) === 3 ? $a = 1 : $a = 2; diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/WhiteSpace/ArbitraryParenthesesSpacingUnitTest.inc.fixed b/vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/WhiteSpace/ArbitraryParenthesesSpacingUnitTest.inc.fixed new file mode 100644 index 00000000..08fcd624 --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/WhiteSpace/ArbitraryParenthesesSpacingUnitTest.inc.fixed @@ -0,0 +1,153 @@ +{$var}( $foo,$bar ); + +$bar(function( $a, $b ) { + return function( $c, $d ) use ( $a, $b ) { + echo $a, $b, $c, $d; + }; +})( 'a','b' )( 'c','d' ); + +$closure( $foo,$bar ); +$var = $closure() + $closure( $foo,$bar ) + self::$closure( $foo,$bar ); + +class Test { + public static function baz( $foo, $bar ) { + $a = new self( $foo,$bar ); + $b = new static( $foo,$bar ); + } +} + +/* + * Test warning for empty parentheses. + */ +$a = 4 + (); // Warning. +$a = 4 + ( ); // Warning. +$a = 4 + (/* Not empty */); + +/* + * Test the actual sniff. + */ +if ((null !== $extra) && ($row->extra !== $extra)) {} + +if ((null !== $extra) && ($row->extra !== $extra)) {} // Bad x 4. + +if ((null !== $extra // Bad x 1. + && is_int($extra)) + && ($row->extra !== $extra // Bad x 1. + || $something) // Bad x 1. +) {} + +if ((null !== $extra) // Bad x 2. + && ($row->extra !== $extra) // Bad x 2. +) {} + +$a = (null !== $extra); +$a = (null !== $extra); // Bad x 2. + +$sx = $vert ? ($w - 1) : 0; + +$this->is_overloaded = ((ini_get("mbstring.func_overload") & 2) != 0) && function_exists('mb_substr'); // Bad x 4. + +$image->flip( ($operation->axis & 1) != 0, ($operation->axis & 2) != 0 ); + +if ( $success && ('nothumb' == $target || 'all' == $target) ) {} + +$directory = ('/' == $file[ strlen($file)-1 ]); + +// phpcs:set Generic.WhiteSpace.ArbitraryParenthesesSpacing spacing 1 +if (( null !== $extra ) && ( $row->extra !== $extra )) {} // Bad x 4. + +if (( null !== $extra ) && ( $row->extra !== $extra )) {} + +if (( null !== $extra // Bad x 1. + && is_int($extra) ) // Bad x 1. + && ( $row->extra !== $extra + || $something ) // Bad x 1. +) {} + +if (( null !== $extra ) // Bad x 2. + && ( $row->extra !== $extra ) // Bad x 2. +) {} + +$a = ( null !== $extra ); // Bad x 2. +$a = ( null !== $extra ); + +$sx = $vert ? ( $w - 1 ) : 0; // Bad x 2. + +$this->is_overloaded = ( ( ini_get("mbstring.func_overload") & 2 ) != 0 ) && function_exists('mb_substr'); // Bad x 4. + +$image->flip( ( $operation->axis & 1 ) != 0, ( $operation->axis & 2 ) != 0 ); // Bad x 4. + +if ( $success && ( 'nothumb' == $target || 'all' == $target ) ) {} // Bad x 2. + +$directory = ( '/' == $file[ strlen($file)-1 ] ); // Bad x 2. + +// phpcs:set Generic.WhiteSpace.ArbitraryParenthesesSpacing spacing 0 + +/* + * Test handling of ignoreNewlines. + */ +if ( + (null !== $extra) && ($row->extra !== $extra) +) {} // Bad x 4, 1 x line 123, 2 x line 125, 1 x line 127. + + +$a = (null !== $extra); // Bad x 2, 1 x line 131, 1 x line 133. + +// phpcs:set Generic.WhiteSpace.ArbitraryParenthesesSpacing spacing 1 +if ( + ( null !== $extra ) && ( $row->extra !== $extra ) +) {} // Bad x 4, 1 x line 137, 2 x line 139, 1 x line 141. + +$a = ( null !== $extra ); // Bad x 2, 1 x line 144, 1 x line 146. +// phpcs:set Generic.WhiteSpace.ArbitraryParenthesesSpacing spacing 0 + +// phpcs:set Generic.WhiteSpace.ArbitraryParenthesesSpacing ignoreNewlines true +if ( + ( + null !== $extra + ) && ( + $row->extra !== $extra + ) +) {} + +$a = ( + null !== $extra +); +// phpcs:set Generic.WhiteSpace.ArbitraryParenthesesSpacing ignoreNewlines false + +if (true) {} (1+2) === 3 ? $a = 1 : $a = 2; +class A {} (1+2) === 3 ? $a = 1 : $a = 2; +function foo() {} (1+2) === 3 ? $a = 1 : $a = 2; diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/WhiteSpace/ArbitraryParenthesesSpacingUnitTest.php b/vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/WhiteSpace/ArbitraryParenthesesSpacingUnitTest.php new file mode 100644 index 00000000..0f70e287 --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/WhiteSpace/ArbitraryParenthesesSpacingUnitTest.php @@ -0,0 +1,85 @@ + + * @copyright 2006-2017 Squiz Pty Ltd (ABN 77 084 670 600) + * @license https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence + */ + +namespace PHP_CodeSniffer\Standards\Generic\Tests\WhiteSpace; + +use PHP_CodeSniffer\Tests\Standards\AbstractSniffUnitTest; + +class ArbitraryParenthesesSpacingUnitTest extends AbstractSniffUnitTest +{ + + + /** + * Returns the lines where errors should occur. + * + * The key of the array should represent the line number and the value + * should represent the number of errors that should occur on that line. + * + * @return array + */ + public function getErrorList() + { + return [ + 64 => 4, + 66 => 1, + 68 => 1, + 69 => 1, + 72 => 2, + 73 => 2, + 77 => 2, + 81 => 4, + 90 => 4, + 94 => 1, + 95 => 1, + 97 => 1, + 100 => 2, + 101 => 2, + 104 => 2, + 107 => 2, + 109 => 4, + 111 => 4, + 113 => 2, + 115 => 2, + 123 => 1, + 125 => 2, + 127 => 1, + 131 => 1, + 133 => 1, + 137 => 1, + 139 => 2, + 141 => 1, + 144 => 1, + 146 => 1, + 163 => 1, + 164 => 1, + 165 => 1, + ]; + + }//end getErrorList() + + + /** + * Returns the lines where warnings should occur. + * + * The key of the array should represent the line number and the value + * should represent the number of warnings that should occur on that line. + * + * @return array + */ + public function getWarningList() + { + return [ + 55 => 1, + 56 => 1, + ]; + + }//end getWarningList() + + +}//end class diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/WhiteSpace/DisallowSpaceIndentUnitTest.1.inc b/vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/WhiteSpace/DisallowSpaceIndentUnitTest.1.inc new file mode 100644 index 00000000..1826b585 --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/WhiteSpace/DisallowSpaceIndentUnitTest.1.inc @@ -0,0 +1,118 @@ +"; + return "<$name$xmlns$type_str $atts xsi:nil=\"true\"/>"; +// [space][space][space][tab]return "<$name$xmlns$type_str $atts xsi:nil=\"true\"/>"; + return "<$name$xmlns$type_str $atts xsi:nil=\"true\"/>"; +// Doc comments are indent with tabs and one space +//[tab]/** +//[tab][space]* + /** + * CVS revision for HTTP headers. + * + * @var string + * @access private + */ + /** + * + */ + +$str = 'hello + there'; + +/** + * This PHP DocBlock should be fine, even though there is a single space at the beginning. + * + * @var int $x + */ +$x = 1; + +?> + + + Foo + + +
    +
    +
    +
    +
    +
    + + + +"; + return "<$name$xmlns$type_str $atts xsi:nil=\"true\"/>"; +// [space][space][space][tab]return "<$name$xmlns$type_str $atts xsi:nil=\"true\"/>"; + return "<$name$xmlns$type_str $atts xsi:nil=\"true\"/>"; +// Doc comments are indent with tabs and one space +//[tab]/** +//[tab][space]* + /** + * CVS revision for HTTP headers. + * + * @var string + * @access private + */ + /** + * + */ + +$str = 'hello + there'; + +/** + * This PHP DocBlock should be fine, even though there is a single space at the beginning. + * + * @var int $x + */ +$x = 1; + +?> + + + Foo + + +
    +
    +
    +
    +
    +
    + + + +"; + return "<$name$xmlns$type_str $atts xsi:nil=\"true\"/>"; +// [space][space][space][tab]return "<$name$xmlns$type_str $atts xsi:nil=\"true\"/>"; + return "<$name$xmlns$type_str $atts xsi:nil=\"true\"/>"; +// Doc comments are indent with tabs and one space +//[tab]/** +//[tab][space]* + /** + * CVS revision for HTTP headers. + * + * @var string + * @access private + */ + /** + * + */ + +$str = 'hello + there'; + +/** + * This PHP DocBlock should be fine, even though there is a single space at the beginning. + * + * @var int $x + */ +$x = 1; + +?> + + + Foo + + +
    +
    +
    +
    +
    +
    + + + +"; + return "<$name$xmlns$type_str $atts xsi:nil=\"true\"/>"; +// [space][space][space][tab]return "<$name$xmlns$type_str $atts xsi:nil=\"true\"/>"; + return "<$name$xmlns$type_str $atts xsi:nil=\"true\"/>"; +// Doc comments are indent with tabs and one space +//[tab]/** +//[tab][space]* + /** + * CVS revision for HTTP headers. + * + * @var string + * @access private + */ + /** + * + */ + +$str = 'hello + there'; + +/** + * This PHP DocBlock should be fine, even though there is a single space at the beginning. + * + * @var int $x + */ +$x = 1; + +?> + + + Foo + + +
    +
    +
    +
    +
    +
    + + + + + + + Foo + + +
    +
    +
    +
    +
    +
    + + + + + + + Foo + + +
    +
    +
    +
    +
    +
    + + + + + * @copyright 2006-2015 Squiz Pty Ltd (ABN 77 084 670 600) + * @license https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence + */ + +namespace PHP_CodeSniffer\Standards\Generic\Tests\WhiteSpace; + +use PHP_CodeSniffer\Tests\Standards\AbstractSniffUnitTest; + +class DisallowSpaceIndentUnitTest extends AbstractSniffUnitTest +{ + + + /** + * Get a list of CLI values to set before the file is tested. + * + * @param string $testFile The name of the file being tested. + * @param \PHP_CodeSniffer\Config $config The config data for the test run. + * + * @return void + */ + public function setCliValues($testFile, $config) + { + if ($testFile === 'DisallowSpaceIndentUnitTest.2.inc') { + return; + } + + $config->tabWidth = 4; + + }//end setCliValues() + + + /** + * Returns the lines where errors should occur. + * + * The key of the array should represent the line number and the value + * should represent the number of errors that should occur on that line. + * + * @param string $testFile The name of the file being tested. + * + * @return array + */ + public function getErrorList($testFile='DisallowSpaceIndentUnitTest.1.inc') + { + switch ($testFile) { + case 'DisallowSpaceIndentUnitTest.1.inc': + case 'DisallowSpaceIndentUnitTest.2.inc': + return [ + 5 => 1, + 9 => 1, + 15 => 1, + 22 => 1, + 24 => 1, + 30 => 1, + 35 => 1, + 50 => 1, + 55 => 1, + 57 => 1, + 58 => 1, + 59 => 1, + 60 => 1, + 65 => 1, + 66 => 1, + 67 => 1, + 68 => 1, + 69 => 1, + 70 => 1, + 73 => 1, + 77 => 1, + 81 => 1, + 104 => 1, + 105 => 1, + 106 => 1, + 107 => 1, + 108 => 1, + 110 => 1, + 111 => 1, + 112 => 1, + 114 => 1, + 115 => 1, + 117 => 1, + 118 => 1, + ]; + break; + case 'DisallowSpaceIndentUnitTest.3.inc': + return [ + 2 => 1, + 5 => 1, + 10 => 1, + 12 => 1, + 13 => 1, + 14 => 1, + 15 => 1, + ]; + break; + case 'DisallowSpaceIndentUnitTest.js': + return [3 => 1]; + break; + case 'DisallowSpaceIndentUnitTest.css': + return [2 => 1]; + break; + default: + return []; + break; + }//end switch + + }//end getErrorList() + + + /** + * Returns the lines where warnings should occur. + * + * The key of the array should represent the line number and the value + * should represent the number of warnings that should occur on that line. + * + * @return array + */ + public function getWarningList() + { + return []; + + }//end getWarningList() + + +}//end class diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/WhiteSpace/DisallowTabIndentUnitTest.1.inc b/vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/WhiteSpace/DisallowTabIndentUnitTest.1.inc new file mode 100644 index 00000000..cf61177e --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/WhiteSpace/DisallowTabIndentUnitTest.1.inc @@ -0,0 +1,93 @@ + 'Czech republic', + 'România' => 'Romania', + 'Magyarország' => 'Hungary', +); + +$var = "$hello $there"; + +?> + + + Foo + + +
    +
    +
    +
    +
    +
    + + + + 'Czech republic', + 'România' => 'Romania', + 'Magyarország' => 'Hungary', +); + +$var = "$hello $there"; + +?> + + + Foo + + +
    +
    +
    +
    +
    +
    + + + + + + + Foo + + +
    +
    +
    +
    +
    +
    + + + + + + + Foo + + +
    +
    +
    +
    +
    +
    + + + + + * @copyright 2006-2015 Squiz Pty Ltd (ABN 77 084 670 600) + * @license https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence + */ + +namespace PHP_CodeSniffer\Standards\Generic\Tests\WhiteSpace; + +use PHP_CodeSniffer\Tests\Standards\AbstractSniffUnitTest; + +class DisallowTabIndentUnitTest extends AbstractSniffUnitTest +{ + + + /** + * Get a list of CLI values to set before the file is tested. + * + * @param string $testFile The name of the file being tested. + * @param \PHP_CodeSniffer\Config $config The config data for the test run. + * + * @return void + */ + public function setCliValues($testFile, $config) + { + $config->tabWidth = 4; + + }//end setCliValues() + + + /** + * Returns the lines where errors should occur. + * + * The key of the array should represent the line number and the value + * should represent the number of errors that should occur on that line. + * + * @param string $testFile The name of the file being tested. + * + * @return array + */ + public function getErrorList($testFile='') + { + switch ($testFile) { + case 'DisallowTabIndentUnitTest.1.inc': + return [ + 5 => 2, + 9 => 1, + 15 => 1, + 20 => 2, + 21 => 1, + 22 => 2, + 23 => 1, + 24 => 2, + 31 => 1, + 32 => 2, + 33 => 2, + 41 => 1, + 42 => 1, + 43 => 1, + 44 => 1, + 45 => 1, + 46 => 1, + 47 => 1, + 48 => 1, + 54 => 1, + 55 => 1, + 56 => 1, + 57 => 1, + 58 => 1, + 59 => 1, + 79 => 1, + 80 => 1, + 81 => 1, + 82 => 1, + 83 => 1, + 85 => 1, + 86 => 1, + 87 => 1, + 89 => 1, + 90 => 1, + 92 => 1, + 93 => 1, + ]; + break; + case 'DisallowTabIndentUnitTest.2.inc': + return [ + 6 => 1, + 7 => 1, + 8 => 1, + 9 => 1, + 10 => 1, + 11 => 1, + 12 => 1, + 13 => 1, + 19 => 1, + ]; + break; + case 'DisallowTabIndentUnitTest.js': + return [ + 3 => 1, + 5 => 1, + 6 => 1, + ]; + break; + case 'DisallowTabIndentUnitTest.css': + return [ + 1 => 1, + 2 => 1, + ]; + break; + default: + return []; + break; + }//end switch + + }//end getErrorList() + + + /** + * Returns the lines where warnings should occur. + * + * The key of the array should represent the line number and the value + * should represent the number of warnings that should occur on that line. + * + * @return array + */ + public function getWarningList() + { + return []; + + }//end getWarningList() + + +}//end class diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/WhiteSpace/IncrementDecrementSpacingUnitTest.inc b/vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/WhiteSpace/IncrementDecrementSpacingUnitTest.inc new file mode 100644 index 00000000..22c611be --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/WhiteSpace/IncrementDecrementSpacingUnitTest.inc @@ -0,0 +1,17 @@ + + * @copyright 2018 Juliette Reinders Folmer. All rights reserved. + * @license https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence + */ + +namespace PHP_CodeSniffer\Standards\Generic\Tests\WhiteSpace; + +use PHP_CodeSniffer\Tests\Standards\AbstractSniffUnitTest; + +class IncrementDecrementSpacingUnitTest extends AbstractSniffUnitTest +{ + + + /** + * Returns the lines where errors should occur. + * + * The key of the array should represent the line number and the value + * should represent the number of errors that should occur on that line. + * + * @param string $testFile The name of the file being tested. + * + * @return array + */ + public function getErrorList($testFile='IncrementDecrementSpacingUnitTest.inc') + { + switch ($testFile) { + case 'IncrementDecrementSpacingUnitTest.inc': + case 'IncrementDecrementSpacingUnitTest.js': + return [ + 5 => 1, + 6 => 1, + 8 => 1, + 10 => 1, + 13 => 1, + 14 => 1, + 16 => 1, + 17 => 1, + ]; + + default: + return []; + }//end switch + + }//end getErrorList() + + + /** + * Returns the lines where warnings should occur. + * + * The key of the array should represent the line number and the value + * should represent the number of warnings that should occur on that line. + * + * @return array + */ + public function getWarningList() + { + return []; + + }//end getWarningList() + + +}//end class diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/WhiteSpace/LanguageConstructSpacingUnitTest.inc b/vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/WhiteSpace/LanguageConstructSpacingUnitTest.inc new file mode 100644 index 00000000..505cb6e4 --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/WhiteSpace/LanguageConstructSpacingUnitTest.inc @@ -0,0 +1,79 @@ + + * @copyright 2006-2017 Squiz Pty Ltd (ABN 77 084 670 600) + * @license https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence + */ + +namespace PHP_CodeSniffer\Standards\Generic\Tests\WhiteSpace; + +use PHP_CodeSniffer\Tests\Standards\AbstractSniffUnitTest; + +class LanguageConstructSpacingUnitTest extends AbstractSniffUnitTest +{ + + + /** + * Returns the lines where errors should occur. + * + * The key of the array should represent the line number and the value + * should represent the number of errors that should occur on that line. + * + * @return array + */ + public function getErrorList() + { + return [ + 3 => 1, + 7 => 1, + 11 => 1, + 15 => 1, + 19 => 1, + 23 => 1, + 27 => 1, + 30 => 1, + 33 => 1, + 34 => 1, + 35 => 1, + 36 => 1, + 38 => 1, + 44 => 1, + 45 => 1, + 46 => 2, + 49 => 1, + 51 => 1, + 59 => 1, + 61 => 1, + 63 => 1, + 67 => 1, + 70 => 1, + 71 => 1, + 75 => 1, + ]; + + }//end getErrorList() + + + /** + * Returns the lines where warnings should occur. + * + * The key of the array should represent the line number and the value + * should represent the number of warnings that should occur on that line. + * + * @return array + */ + public function getWarningList() + { + return []; + + }//end getWarningList() + + +}//end class diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/WhiteSpace/ScopeIndentUnitTest.1.inc b/vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/WhiteSpace/ScopeIndentUnitTest.1.inc new file mode 100644 index 00000000..6aadcc20 --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/WhiteSpace/ScopeIndentUnitTest.1.inc @@ -0,0 +1,1595 @@ +phpcs:set Generic.WhiteSpace.ScopeIndent tabIndent false + +hello(); + } + + function hello() + { + echo 'hello'; +}//end hello() + + function hello2() + { + if (TRUE) { + echo 'hello'; // no error here as its more than 4 spaces. + } else { + echo 'bye'; + } + + while (TRUE) { + echo 'hello'; + } + + do { + echo 'hello'; + } while (TRUE); + } + + function hello3() + { + switch ($hello) { + case 'hello': + break; + } + } + +} + +?> +
    +
    +
    +validate()) {
    +    $safe = $form->getSubmitValues();
    +}
    +?>
    +
    +open(); // error here + } + + public function open() + { + // Some inline stuff that shouldn't error + if (TRUE) echo 'hello'; + foreach ($tokens as $token) echo $token; + } + + /** + * This is a comment 1. + * This is a comment 2. + * This is a comment 3. + * This is a comment 4. + */ + public function close() + { + // All ok. + if (TRUE) { + if (TRUE) { + } else if (FALSE) { + foreach ($tokens as $token) { + switch ($token) { + case '1': + case '2': + if (true) { + if (false) { + if (false) { + if (false) { + echo 'hello'; + } + } + } + } + break; + case '5': + break; + } + do { + while (true) { + foreach ($tokens as $token) { + for ($i = 0; $i < $token; $i++) { + echo 'hello'; + } + } + } + } while (true); + } + } + } + } + + /* + This is another c style comment 1. + This is another c style comment 2. + This is another c style comment 3. + This is another c style comment 4. + This is another c style comment 5. + */ + + /* This is a T_COMMENT + * + * + * + */ + + /** This is a T_DOC_COMMENT + */ + + /* + This T_COMMENT has a newline in it. + + */ + + public function read() + { + echo 'hello'; + + // no errors below. + $array = array( + 'this', + 'that' => array( + 'hello', + 'hello again' => array( + 'hello', + ), + ), + ); + } +} + +abstract class Test3 +{ + public function parse() + { + + foreach ($t as $ndx => $token) { + if (is_array($token)) { + echo 'here'; + } else { + $ts[] = array("token" => $token, "value" => ''); + + $last = count($ts) - 1; + + switch ($token) { + case '(': + + if ($last >= 3 && + $ts[0]['token'] != T_CLASS && + $ts[$last - 2]['token'] == T_OBJECT_OPERATOR && + $ts[$last - 3]['token'] == T_VARIABLE ) { + + + if (true) { + echo 'hello'; + } + } + array_push($braces, $token); + break; + } + } + } + } +} + +function test() +{ + $o = << + + + + doSomething( + function () { + echo 123; + } + ); + } +} + +some_function( + function() { + $a = 403; + if ($a === 404) { + $a = 403; + } + } +); + +some_function( + function() { + $a = 403; + if ($a === 404) { + $a = 403; + } + } +); + +$myFunction = function() { + $a = 403; + if ($a === 404) { + $a = 403; + } +}; + +class Whatever +{ + protected $_protectedArray = array( + 'normalString' => 'That email address is already in use!', + 'offendingString' => <<<'STRING' +Each line of this string is always said to be at column 0, + no matter how many spaces are placed + at the beginning of each line +and the ending STRING on the next line is reported as having to be indented. +STRING + ); +} + +class MyClass +{ + public static function myFunction() + { + if (empty($keywords) === FALSE) { + $keywords = 'foo'; + $existing = 'foo'; + } + + return $keywords; + + }//end myFunction() + +}//end class + +$var = call_user_func( + $new_var = function () use (&$a) { + if ($a > 0) { + return $a++; + } else { + return $a--; + } + } +); + +class AnonymousFn +{ + public function getAnonFn() + { + return array( + 'functions' => Array( + 'function1' => function ($a, $b, $c) { + $a = $b + $c; + $b = $c / 2; + return Array($a, $b, $c); + }, + ), + ); + } +} +?> + +
    + +
    +
    + +
    +
    + +
    + + "") { + $test = true; + } else { + $test = true; + } + } + ?> + + + +
    +
    +
    + +
    +
    +
    + + +

    some text

    + function ($a) { + if ($a === true) { + echo 'hi'; + } + } +]; + +$list = [ + 'fn' => function ($a) { + if ($a === true) { + echo 'hi'; + } + } +]; + +if ($foo) { + foreach ($bar as $baz) { + if ($baz) { + ?> +
    +
    +
    + 1) { + echo '1'; + } + ?> +
    + 1) { + echo '1'; + } + ?> +
    + 1) { + echo '1'; + } + ?> +
    + +<?= CHtml::encode($this->pageTitle); ?> + +expects($this->at(2)) + ->with($this->callback( + function ($subject) + { + } + ) + ); + +/** @var Database $mockedDatabase */ +/** @var Container $mockedContainer */ + +echo $string->append('foo') + ->appaend('bar') + ->appaend('baz') + ->outputUsing( + function () + { + } + ); + +echo PHP_EOL; + +switch ($arg) { + case 1: + break; + case 2: + if ($arg2 == 'foo') { + } + case 3: + default: + echo 'default'; +} + +if ($tokens[$stackPtr]['content']{0} === '#') { +} else if ($tokens[$stackPtr]['content']{0} === '/' + && $tokens[$stackPtr]['content']{1} === '/' +) { +} + +$var = call_user_func( + function() { + if ($foo) { + $new_var = function() { + if ($a > 0) { + return $a++; + } else { + return $a--; + } + }; + } + } +); + +a( + function() { + $a = function() { + $b = false; + }; + true; + } +); + +$var = [ + [ + '1' => + function () { + return true; + }, + ], + [ + '1' => + function () { + return true; + }, + '2' => true, + ] +]; + +if ($foo) { + ?> +

    + self::_replaceKeywords($failingComment, $result), + 'screenshot' => Test::getScreenshotPath( + $projectid, + $result['class_name'], + ), + ); + +} + +$this->mockedDatabase + ->with( + $this->callback( + function () { + return; + } + ) + ); + +$this->subject->recordLogin(); + +function a() +{ + if (true) { + static::$a[$b] = + static::where($c) + ->where($c) + ->where( + function ($d) { + $d->whereNull(); + $d->orWhere(); + } + ) + ->first(); + + if (static::$a[$b] === null) { + static::$a[$b] = new static( + array( + 'a' => $a->id, + 'a' => $a->id, + ) + ); + } + } + + return static::$a[$b]; +} + +$foo->load( + array( + 'bar' => function ($baz) { + $baz->call(); + } + ) +); + +hello(); + +$foo = array_unique( + array_map( + function ($entry) { + return $entry * 2; + }, + array() + ) +); +bar($foo); + +class PHP_CodeSniffer_Tokenizers_JS +{ + + public $scopeOpeners = array( + T_CASE => array( + 'end' => array( + T_BREAK => T_BREAK, + T_RETURN => T_RETURN, + ), + 'strict' => true, + ), + ); +} + +echo $string-> + append('foo')-> + appaend('bar')-> + appaend('baz')-> + outputUsing( + function () + { + } + ); + +$str = 'the items I want to show are: ' . + implode( + ', ', + array('a', 'b', 'c') + ); + +echo $str; + +$str = 'foo' + . '1' + . '2'; + +echo $str; + +bar([ + 'foo' => foo(function () { + return 'foo'; + }) +]); + +$domains = array_unique( + array_map( + function ($url) { + $urlObject = new \Purl\Url($url); + return $urlObject->registerableDomain; + }, + $sites + ) +); + +return $domains; + +if ($a == 5) : + echo "a equals 5"; + echo "..."; +elseif ($a == 6) : + echo "a equals 6"; + echo "!!!"; +else : + echo "a is neither 5 nor 6"; +endif; + +if ($foo): +if ($bar) $foo = 1; +elseif ($baz) $foo = 2; +endif; + +$this + ->method(array( + 'foo' => 'bar', + ), 'arg', array( + 'foo' => 'bar', + )); + +class Foo +{ + use Bar { + myMethod as renamedMethod; + } +} + +class Foo +{ + use Bar { + myMethod as renamedMethod; + } +} + +foo(); + +array( + 'key1' => function ($bar) { + return $bar; + }, + 'key2' => function ($foo) { + return $foo; + }, +); + +?> + + 1, + ]; +$c = 2; + +class foo +{ + public function get() + { + $foo = ['b' => 'c', + 'd' => [ + ['e' => 'f'] + ]]; + echo '42'; + + $foo = array('b' => 'c', + 'd' => array( + array('e' => 'f') + )); + echo '42'; + } +} + +switch ($foo) { + case 1: + return array(); + case 2: + return ''; + case 3: + return $function(); + case 4: + return $functionCall($param[0]); + case 5: + return array() + array(); // Array Merge + case 6: + // String connect + return $functionReturningString('') . $functionReturningString(array()); + case 7: + return functionCall( + $withMultiLineParam[0], + array(), + $functionReturningString( + $withMultiLineParam[1] + ) + ); + case 8: + return $param[0][0]; +} + +class Test { + + public + $foo + ,$bar + ,$baz = [ ] + ; + + public function wtfindent() { + } +} + +switch ($x) { + case 1: + return [1]; + default: + return [2]; +} + +switch ($foo) { + case self::FOO: + return $this->bar($gfoo, function ($id) { + return FOO::bar($id); + }, $values); + case self::BAR: + $values = $this->bar($foo, $values); + break; +} + +$var = array( + 'long description' => + array(0, 'something'), + 'another long description' => + array(1, "something else") +); + +$services = array( + 'service 1' => + Mockery::mock('class 1') + ->shouldReceive('setFilter')->once() + ->shouldReceive('getNbResults')->atLeast()->once() + ->shouldReceive('getSlice')->once()->andReturn(array()) + ->getMock(), + 'service 2' => + Mockery::mock('class 2') + ->shouldReceive('__invoke')->once() + ->getMock() +); + +class Foo +{ + public function setUp() + { + $this->foo = new class { + public $name = 'Some value'; + }; + } +} + +try { + foo(); +} catch (\Exception $e) { + $foo = function() { + return 'foo'; + }; + + if (true) { + } +} + +if ($foo) { + foo(); +} else if ($e) { + $foo = function() { + return 'foo'; + }; + + if (true) { + } +} else { + $foo = function() { + return 'foo'; + }; + + if (true) { + } +} + +switch ($parameter) { + case null: + return [ + 'foo' => in_array( + 'foo', + [] + ), + ]; + + default: + return []; +} + +class SomeClass +{ + public function someFunc() + { + a(function () { + echo "a"; + })->b(function () { + echo "b"; + }); + + if (true) { + echo "c"; + } + echo "d"; + } +} + +$params = self::validate_parameters(self::read_competency_framework_parameters(), + array( + 'id' => $id, + )); + +$framework = api::read_framework($params['id']); +self::validate_context($framework->get_context()); +$output = $PAGE->get_renderer('tool_lp'); + +class Test123 +{ + protected static + $prop1 = [ + 'testA' => 123, + ], + $prop2 = [ + 'testB' => 456, + ]; + + protected static + $prop3 = array( + 'testA' => 123, + ), + $prop4 = array( + 'testB' => 456, + ); + + protected static $prop5; +} + +$foo = foo( + function () { + $foo->debug( + $a, + $b + ); + + if ($a) { + $b = $a; + } + } +); + +if (somethingIsTrue()) { + ?> +
    + +
    + bar(foo(function () { + }), foo(function () { + })); + +echo 'foo'; + +class Test { + + public function a() { + ?>adebug( + $a, + $b + ); + + if ($a) { + $b = $a; + } + } +); + +function test() +{ + $array = []; + foreach ($array as $data) { + [ + 'key1' => $var1, + 'key2' => $var2, + ] = $data; + foreach ($var1 as $method) { + echo $method . $var2; + } + } +} + +switch ($a) { + case 0: + $a = function () { + }; + case 1: + break; +} + +class Test +{ + public function __construct() + { +if (false) { +echo 0; + } + } +} + +return [ + 'veryLongKeySoIWantToMakeALineBreak' + => 'veryLonValueSoIWantToMakeALineBreak', + + 'someOtherKey' => [ + 'someValue' + ], + + 'arrayWithArraysInThere' => [ + ['Value1', 'Value1'] + ], +]; + +switch ($sContext) { + case 'SOMETHING': + case 'CONSTANT': + do_something(); + break; + case 'GLOBAL': + case 'GLOBAL1': + do_something(); + // Fall through + default: + { + do_something(); + } +} + +array_map( + static function ( $item ) { + echo $item; + }, + $some_array +); + +/** + * Comment. + */ +$a(function () use ($app) { + echo 'hi'; +})(); + +$app->run(); + +function foo() +{ + $foo('some + long description', function () { + }); + + $foo('some + long + description', function () { + }); + + $foo( +'some long description', function () { + }); +} + +switch ( $a ) { +case 'a': + $b = 2; + /** + * A comment. + */ + apply_filter( 'something', $b ); + break; + +case 'aa': + $b = 2; + /* + * A comment. + */ + apply_filter( 'something', $b ); + break; + +case 'b': + $b = 3; +?> + + + + + +
    + +
    + +
    + +
    + + +
    + + + +
    + [ + ], + 'b' => <<<'FOO' +foo; +FOO + ], + $a, +]; + +$query = Model::query() + ->when($a, function () { + static $b = ''; + }); + +$result = array_map( + static fn(int $number) : int => $number + 1, + $numbers +); + +$a = $a === true ? [ + 'a' => 1, + ] : [ + 'a' => 100, +]; + +return [ + Url::make('View Song', fn($song) => $song->url()) + ->onlyOnDetail(), + + new Panel('Information', [ + Text::make('Title') + ]), +]; + +echo $string?->append('foo') + ?->outputUsing(); + +// phpcs:set Generic.WhiteSpace.ScopeIndent exact true +echo $string?->append('foo') + ?->outputUsing(); +// phpcs:set Generic.WhiteSpace.ScopeIndent exact false + +if (true) { + ?> null, + false => false, + 1, 2, 3 => true, + default => $value, +}; + +$value = match ($value) { + '' => null, +false => false, + 1, 2, 3 => true, + default => $value, +}; + +$value = match ( + $value + ) { + '' => null, + false + => false, + 1, + 2, + 3 => true, + default => +$value, +}; + +function toString(): string +{ + return sprintf( + '%s', + match ($type) { + 'foo' => 'bar', + }, + ); +} + +$list = [ + 'fn' => function ($a) { + if ($a === true) { + echo 'hi'; + } + }, + 'fn' => function ($a) { + if ($a === true) { + echo 'hi'; + $list2 = [ + 'fn' => function ($a) { + if ($a === true) { + echo 'hi'; + } + } + ]; + } + } +]; + +$foo = match ($type) { + 'a' => [ + 'aa' => 'DESC', + 'ab' => 'DESC', + ], + 'b' => [ + 'ba' => 'DESC', + 'bb' => 'DESC', + ], + default => [ + 'da' => 'DESC', + ], +}; + +$a = [ + 'a' => [ + 'a' => fn () => foo() + ], + 'a' => [ + 'a' => 'a', + ] +]; + +/* ADD NEW TESTS ABOVE THIS LINE AND MAKE SURE THAT THE 1 (space-based) AND 2 (tab-based) FILES ARE IN SYNC! */ +?> + + + + + + + <<<'INTRO' + lorem ipsum + INTRO, + 'em' => [ + [ + '', + ], + ], + 'abc' => [ + 'a' => 'wop wop', + 'b' => 'ola ola.', + ], +]; + +echo "" diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/WhiteSpace/ScopeIndentUnitTest.1.inc.fixed b/vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/WhiteSpace/ScopeIndentUnitTest.1.inc.fixed new file mode 100644 index 00000000..7b076500 --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/WhiteSpace/ScopeIndentUnitTest.1.inc.fixed @@ -0,0 +1,1595 @@ +phpcs:set Generic.WhiteSpace.ScopeIndent tabIndent false + +hello(); + } + + function hello() + { + echo 'hello'; + }//end hello() + + function hello2() + { + if (TRUE) { + echo 'hello'; // no error here as its more than 4 spaces. + } else { + echo 'bye'; + } + + while (TRUE) { + echo 'hello'; + } + + do { + echo 'hello'; + } while (TRUE); + } + + function hello3() + { + switch ($hello) { + case 'hello': + break; + } + } + +} + +?> +
    +
    +
    +validate()) {
    +    $safe = $form->getSubmitValues();
    +}
    +?>
    +
    +open(); // error here + } + + public function open() + { + // Some inline stuff that shouldn't error + if (TRUE) echo 'hello'; + foreach ($tokens as $token) echo $token; + } + + /** + * This is a comment 1. + * This is a comment 2. + * This is a comment 3. + * This is a comment 4. + */ + public function close() + { + // All ok. + if (TRUE) { + if (TRUE) { + } else if (FALSE) { + foreach ($tokens as $token) { + switch ($token) { + case '1': + case '2': + if (true) { + if (false) { + if (false) { + if (false) { + echo 'hello'; + } + } + } + } + break; + case '5': + break; + } + do { + while (true) { + foreach ($tokens as $token) { + for ($i = 0; $i < $token; $i++) { + echo 'hello'; + } + } + } + } while (true); + } + } + } + } + + /* + This is another c style comment 1. + This is another c style comment 2. + This is another c style comment 3. + This is another c style comment 4. + This is another c style comment 5. + */ + + /* This is a T_COMMENT + * + * + * + */ + + /** This is a T_DOC_COMMENT + */ + + /* + This T_COMMENT has a newline in it. + + */ + + public function read() + { + echo 'hello'; + + // no errors below. + $array = array( + 'this', + 'that' => array( + 'hello', + 'hello again' => array( + 'hello', + ), + ), + ); + } +} + +abstract class Test3 +{ + public function parse() + { + + foreach ($t as $ndx => $token) { + if (is_array($token)) { + echo 'here'; + } else { + $ts[] = array("token" => $token, "value" => ''); + + $last = count($ts) - 1; + + switch ($token) { + case '(': + + if ($last >= 3 && + $ts[0]['token'] != T_CLASS && + $ts[$last - 2]['token'] == T_OBJECT_OPERATOR && + $ts[$last - 3]['token'] == T_VARIABLE ) { + + + if (true) { + echo 'hello'; + } + } + array_push($braces, $token); + break; + } + } + } + } +} + +function test() +{ + $o = << + + + + doSomething( + function () { + echo 123; + } + ); + } +} + +some_function( + function() { + $a = 403; + if ($a === 404) { + $a = 403; + } + } +); + +some_function( + function() { + $a = 403; + if ($a === 404) { + $a = 403; + } + } +); + +$myFunction = function() { + $a = 403; + if ($a === 404) { + $a = 403; + } +}; + +class Whatever +{ + protected $_protectedArray = array( + 'normalString' => 'That email address is already in use!', + 'offendingString' => <<<'STRING' +Each line of this string is always said to be at column 0, + no matter how many spaces are placed + at the beginning of each line +and the ending STRING on the next line is reported as having to be indented. +STRING + ); +} + +class MyClass +{ + public static function myFunction() + { + if (empty($keywords) === FALSE) { + $keywords = 'foo'; + $existing = 'foo'; + } + + return $keywords; + + }//end myFunction() + +}//end class + +$var = call_user_func( + $new_var = function () use (&$a) { + if ($a > 0) { + return $a++; + } else { + return $a--; + } + } +); + +class AnonymousFn +{ + public function getAnonFn() + { + return array( + 'functions' => Array( + 'function1' => function ($a, $b, $c) { + $a = $b + $c; + $b = $c / 2; + return Array($a, $b, $c); + }, + ), + ); + } +} +?> + +
    + +
    +
    + +
    +
    + +
    + + "") { + $test = true; + } else { + $test = true; + } + } + ?> + + + +
    +
    +
    + +
    +
    +
    + + +

    some text

    + function ($a) { + if ($a === true) { + echo 'hi'; + } + } +]; + +$list = [ + 'fn' => function ($a) { + if ($a === true) { + echo 'hi'; + } + } +]; + +if ($foo) { + foreach ($bar as $baz) { + if ($baz) { + ?> +
    +
    +
    + 1) { + echo '1'; + } + ?> +
    + 1) { + echo '1'; + } + ?> +
    + 1) { + echo '1'; + } + ?> +
    + +<?= CHtml::encode($this->pageTitle); ?> + +expects($this->at(2)) + ->with($this->callback( + function ($subject) + { + } + ) + ); + +/** @var Database $mockedDatabase */ +/** @var Container $mockedContainer */ + +echo $string->append('foo') + ->appaend('bar') + ->appaend('baz') + ->outputUsing( + function () + { + } + ); + +echo PHP_EOL; + +switch ($arg) { + case 1: + break; + case 2: + if ($arg2 == 'foo') { + } + case 3: + default: + echo 'default'; +} + +if ($tokens[$stackPtr]['content']{0} === '#') { +} else if ($tokens[$stackPtr]['content']{0} === '/' + && $tokens[$stackPtr]['content']{1} === '/' +) { +} + +$var = call_user_func( + function() { + if ($foo) { + $new_var = function() { + if ($a > 0) { + return $a++; + } else { + return $a--; + } + }; + } + } +); + +a( + function() { + $a = function() { + $b = false; + }; + true; + } +); + +$var = [ + [ + '1' => + function () { + return true; + }, + ], + [ + '1' => + function () { + return true; + }, + '2' => true, + ] +]; + +if ($foo) { + ?> +

    + self::_replaceKeywords($failingComment, $result), + 'screenshot' => Test::getScreenshotPath( + $projectid, + $result['class_name'], + ), + ); + +} + +$this->mockedDatabase + ->with( + $this->callback( + function () { + return; + } + ) + ); + +$this->subject->recordLogin(); + +function a() +{ + if (true) { + static::$a[$b] = + static::where($c) + ->where($c) + ->where( + function ($d) { + $d->whereNull(); + $d->orWhere(); + } + ) + ->first(); + + if (static::$a[$b] === null) { + static::$a[$b] = new static( + array( + 'a' => $a->id, + 'a' => $a->id, + ) + ); + } + } + + return static::$a[$b]; +} + +$foo->load( + array( + 'bar' => function ($baz) { + $baz->call(); + } + ) +); + +hello(); + +$foo = array_unique( + array_map( + function ($entry) { + return $entry * 2; + }, + array() + ) +); +bar($foo); + +class PHP_CodeSniffer_Tokenizers_JS +{ + + public $scopeOpeners = array( + T_CASE => array( + 'end' => array( + T_BREAK => T_BREAK, + T_RETURN => T_RETURN, + ), + 'strict' => true, + ), + ); +} + +echo $string-> + append('foo')-> + appaend('bar')-> + appaend('baz')-> + outputUsing( + function () + { + } + ); + +$str = 'the items I want to show are: ' . + implode( + ', ', + array('a', 'b', 'c') + ); + +echo $str; + +$str = 'foo' + . '1' + . '2'; + +echo $str; + +bar([ + 'foo' => foo(function () { + return 'foo'; + }) +]); + +$domains = array_unique( + array_map( + function ($url) { + $urlObject = new \Purl\Url($url); + return $urlObject->registerableDomain; + }, + $sites + ) +); + +return $domains; + +if ($a == 5) : + echo "a equals 5"; + echo "..."; +elseif ($a == 6) : + echo "a equals 6"; + echo "!!!"; +else : + echo "a is neither 5 nor 6"; +endif; + +if ($foo): + if ($bar) $foo = 1; + elseif ($baz) $foo = 2; +endif; + +$this + ->method(array( + 'foo' => 'bar', + ), 'arg', array( + 'foo' => 'bar', + )); + +class Foo +{ + use Bar { + myMethod as renamedMethod; + } +} + +class Foo +{ + use Bar { + myMethod as renamedMethod; + } +} + +foo(); + +array( + 'key1' => function ($bar) { + return $bar; + }, + 'key2' => function ($foo) { + return $foo; + }, +); + +?> + + 1, + ]; +$c = 2; + +class foo +{ + public function get() + { + $foo = ['b' => 'c', + 'd' => [ + ['e' => 'f'] + ]]; + echo '42'; + + $foo = array('b' => 'c', + 'd' => array( + array('e' => 'f') + )); + echo '42'; + } +} + +switch ($foo) { + case 1: + return array(); + case 2: + return ''; + case 3: + return $function(); + case 4: + return $functionCall($param[0]); + case 5: + return array() + array(); // Array Merge + case 6: + // String connect + return $functionReturningString('') . $functionReturningString(array()); + case 7: + return functionCall( + $withMultiLineParam[0], + array(), + $functionReturningString( + $withMultiLineParam[1] + ) + ); + case 8: + return $param[0][0]; +} + +class Test { + + public + $foo + ,$bar + ,$baz = [ ] + ; + + public function wtfindent() { + } +} + +switch ($x) { + case 1: + return [1]; + default: + return [2]; +} + +switch ($foo) { + case self::FOO: + return $this->bar($gfoo, function ($id) { + return FOO::bar($id); + }, $values); + case self::BAR: + $values = $this->bar($foo, $values); + break; +} + +$var = array( + 'long description' => + array(0, 'something'), + 'another long description' => + array(1, "something else") +); + +$services = array( + 'service 1' => + Mockery::mock('class 1') + ->shouldReceive('setFilter')->once() + ->shouldReceive('getNbResults')->atLeast()->once() + ->shouldReceive('getSlice')->once()->andReturn(array()) + ->getMock(), + 'service 2' => + Mockery::mock('class 2') + ->shouldReceive('__invoke')->once() + ->getMock() +); + +class Foo +{ + public function setUp() + { + $this->foo = new class { + public $name = 'Some value'; + }; + } +} + +try { + foo(); +} catch (\Exception $e) { + $foo = function() { + return 'foo'; + }; + + if (true) { + } +} + +if ($foo) { + foo(); +} else if ($e) { + $foo = function() { + return 'foo'; + }; + + if (true) { + } +} else { + $foo = function() { + return 'foo'; + }; + + if (true) { + } +} + +switch ($parameter) { + case null: + return [ + 'foo' => in_array( + 'foo', + [] + ), + ]; + + default: + return []; +} + +class SomeClass +{ + public function someFunc() + { + a(function () { + echo "a"; + })->b(function () { + echo "b"; + }); + + if (true) { + echo "c"; + } + echo "d"; + } +} + +$params = self::validate_parameters(self::read_competency_framework_parameters(), + array( + 'id' => $id, + )); + +$framework = api::read_framework($params['id']); +self::validate_context($framework->get_context()); +$output = $PAGE->get_renderer('tool_lp'); + +class Test123 +{ + protected static + $prop1 = [ + 'testA' => 123, + ], + $prop2 = [ + 'testB' => 456, + ]; + + protected static + $prop3 = array( + 'testA' => 123, + ), + $prop4 = array( + 'testB' => 456, + ); + + protected static $prop5; +} + +$foo = foo( + function () { + $foo->debug( + $a, + $b + ); + + if ($a) { + $b = $a; + } + } +); + +if (somethingIsTrue()) { + ?> +
    + +
    + bar(foo(function () { + }), foo(function () { + })); + +echo 'foo'; + +class Test { + + public function a() { + ?>adebug( + $a, + $b + ); + + if ($a) { + $b = $a; + } + } +); + +function test() +{ + $array = []; + foreach ($array as $data) { + [ + 'key1' => $var1, + 'key2' => $var2, + ] = $data; + foreach ($var1 as $method) { + echo $method . $var2; + } + } +} + +switch ($a) { + case 0: + $a = function () { + }; + case 1: + break; +} + +class Test +{ + public function __construct() + { + if (false) { + echo 0; + } + } +} + +return [ + 'veryLongKeySoIWantToMakeALineBreak' + => 'veryLonValueSoIWantToMakeALineBreak', + + 'someOtherKey' => [ + 'someValue' + ], + + 'arrayWithArraysInThere' => [ + ['Value1', 'Value1'] + ], +]; + +switch ($sContext) { + case 'SOMETHING': + case 'CONSTANT': + do_something(); + break; + case 'GLOBAL': + case 'GLOBAL1': + do_something(); + // Fall through + default: + { + do_something(); + } +} + +array_map( + static function ( $item ) { + echo $item; + }, + $some_array +); + +/** + * Comment. + */ +$a(function () use ($app) { + echo 'hi'; +})(); + +$app->run(); + +function foo() +{ + $foo('some + long description', function () { + }); + + $foo('some + long + description', function () { + }); + + $foo( + 'some long description', function () { + }); +} + +switch ( $a ) { + case 'a': + $b = 2; + /** + * A comment. + */ + apply_filter( 'something', $b ); + break; + + case 'aa': + $b = 2; + /* + * A comment. + */ + apply_filter( 'something', $b ); + break; + + case 'b': + $b = 3; + ?> + + + + + +
    + +
    + +
    + +
    + + +
    + + + +
    + [ + ], + 'b' => <<<'FOO' +foo; +FOO + ], + $a, +]; + +$query = Model::query() + ->when($a, function () { + static $b = ''; + }); + +$result = array_map( + static fn(int $number) : int => $number + 1, + $numbers +); + +$a = $a === true ? [ + 'a' => 1, + ] : [ + 'a' => 100, +]; + +return [ + Url::make('View Song', fn($song) => $song->url()) + ->onlyOnDetail(), + + new Panel('Information', [ + Text::make('Title') + ]), +]; + +echo $string?->append('foo') + ?->outputUsing(); + +// phpcs:set Generic.WhiteSpace.ScopeIndent exact true +echo $string?->append('foo') + ?->outputUsing(); +// phpcs:set Generic.WhiteSpace.ScopeIndent exact false + +if (true) { + ?> null, + false => false, + 1, 2, 3 => true, + default => $value, +}; + +$value = match ($value) { + '' => null, + false => false, + 1, 2, 3 => true, + default => $value, +}; + +$value = match ( + $value + ) { + '' => null, + false + => false, + 1, + 2, + 3 => true, + default => + $value, +}; + +function toString(): string +{ + return sprintf( + '%s', + match ($type) { + 'foo' => 'bar', + }, + ); +} + +$list = [ + 'fn' => function ($a) { + if ($a === true) { + echo 'hi'; + } + }, + 'fn' => function ($a) { + if ($a === true) { + echo 'hi'; + $list2 = [ + 'fn' => function ($a) { + if ($a === true) { + echo 'hi'; + } + } + ]; + } + } +]; + +$foo = match ($type) { + 'a' => [ + 'aa' => 'DESC', + 'ab' => 'DESC', + ], + 'b' => [ + 'ba' => 'DESC', + 'bb' => 'DESC', + ], + default => [ + 'da' => 'DESC', + ], +}; + +$a = [ + 'a' => [ + 'a' => fn () => foo() + ], + 'a' => [ + 'a' => 'a', + ] +]; + +/* ADD NEW TESTS ABOVE THIS LINE AND MAKE SURE THAT THE 1 (space-based) AND 2 (tab-based) FILES ARE IN SYNC! */ +?> + + + + + + + <<<'INTRO' + lorem ipsum + INTRO, + 'em' => [ + [ + '', + ], + ], + 'abc' => [ + 'a' => 'wop wop', + 'b' => 'ola ola.', + ], +]; + +echo "" diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/WhiteSpace/ScopeIndentUnitTest.1.js b/vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/WhiteSpace/ScopeIndentUnitTest.1.js new file mode 100644 index 00000000..2195bfb9 --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/WhiteSpace/ScopeIndentUnitTest.1.js @@ -0,0 +1,239 @@ +phpcs:set Generic.WhiteSpace.ScopeIndent tabIndent false +var script = document.createElement('script'); +script.onload = function() +{ + clearTimeout(t); + script456.onload = null; + script.onreadystatechange = null; + callback.call(this); + +}; + +this.callbacks[type] = { + namespaces: {}, +others: [] +}; + +blah = function() +{ + print something; + + } + +test(blah, function() { + print something; +}); + +var test = [{x: 10}]; +var test = [{ + x: 10, + y: { + b14h: 12, + 'b14h': 12 + }, + z: 23 +}]; + +Viper.prototype = { + + _removeEvents: function(elem) + { + if (!elem) { + elem = this.element; + } + + ViperUtil.removeEvent(elem, '.' + this.getEventNamespace()); + + } + +}; + +this.init = function(data) { + if (_pageListWdgt) { + GUI.getWidget('changedPagesList').addItemClickedCallback( + function(itemid, target) { + draftChangeTypeClicked( + itemid, + target, + { + reviewData: _reviewData, + pageid: itemid + } + ); + } + ); + }//end if + +}; + +a( + function() { + var _a = function() { + b = false; + + }; + true + } +); + +(function() { + a = function() { + a(function() { + if (true) { + a = true; + } + }); + + a( + function() { + if (true) { + if (true) { + a = true; + } + } + } + ); + + a( + function() { + if (true) { + a = true; + } + } + ); + + }; + +})(); + +a.prototype = { + + a: function() + { + var currentSize = null; + ViperUtil.addEvent( + header, + 'safedblclick', + function() {}, + ); + + if (topContent) { + ViperUtil.addClass(topContent, 'Viper-popup-top'); + main.appendChild(topContent); + } + + ViperUtil.addClass(midContent, 'Viper-popup-content'); + main.appendChild(midContent); + } + +}; + +a.prototype = { + + a: function() + { + ViperUtil.addClass(midContent, 'Viper-popup-content'); + main.appendChild(midContent); + + var mouseUpAction = function() {}; + var preventMouseUp = false; + var self = this; + if (clickAction) { + } + } + +}; + +a.prototype = { + + a: function() + { + var a = function() { + var a = 'foo'; + }; + + if (true) { + } + + }, + + b: function() + { + ViperUtil.addEvent( + function() { + if (fullScreen !== true) { + currentSize = { + }; + + showfullScreen(); + } + } + ); + + }, + + c: function() + { + this.a( + { + a: function() { + form.onsubmit = function() { + return false; + }; + + var a = true; + } + } + ); + + } + +}; + +a.prototype = { + init: function() + {}, + + _b: function() + { + } + +}; + +for (var i = 0; i < 10; i++) { + var foo = {foo:{'a':'b', + 'c':'d'}}; +} + +class TestOk +{ + destroy() + { + setTimeout(a, 1000); + + if (typeof self.callbackOnClose === "function") { + self.callbackOnClose(); + } + } +} + +class TestBad +{ + destroy() + { + setTimeout(function () { + return; + }, 1000); + + if (typeof self.callbackOnClose === "function") { + self.callbackOnClose(); + } + } +} + +( function( $ ) { + foo(function( value ) { + value.bind( function( newval ) { + $( '#bar' ).html( newval ); + } ); + } )( jQuery ); diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/WhiteSpace/ScopeIndentUnitTest.1.js.fixed b/vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/WhiteSpace/ScopeIndentUnitTest.1.js.fixed new file mode 100644 index 00000000..d4bf409b --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/WhiteSpace/ScopeIndentUnitTest.1.js.fixed @@ -0,0 +1,239 @@ +phpcs:set Generic.WhiteSpace.ScopeIndent tabIndent false +var script = document.createElement('script'); +script.onload = function() +{ + clearTimeout(t); + script456.onload = null; + script.onreadystatechange = null; + callback.call(this); + +}; + +this.callbacks[type] = { + namespaces: {}, + others: [] +}; + +blah = function() +{ + print something; + +} + +test(blah, function() { + print something; +}); + +var test = [{x: 10}]; +var test = [{ + x: 10, + y: { + b14h: 12, + 'b14h': 12 + }, + z: 23 +}]; + +Viper.prototype = { + + _removeEvents: function(elem) + { + if (!elem) { + elem = this.element; + } + + ViperUtil.removeEvent(elem, '.' + this.getEventNamespace()); + + } + +}; + +this.init = function(data) { + if (_pageListWdgt) { + GUI.getWidget('changedPagesList').addItemClickedCallback( + function(itemid, target) { + draftChangeTypeClicked( + itemid, + target, + { + reviewData: _reviewData, + pageid: itemid + } + ); + } + ); + }//end if + +}; + +a( + function() { + var _a = function() { + b = false; + + }; + true + } +); + +(function() { + a = function() { + a(function() { + if (true) { + a = true; + } + }); + + a( + function() { + if (true) { + if (true) { + a = true; + } + } + } + ); + + a( + function() { + if (true) { + a = true; + } + } + ); + + }; + +})(); + +a.prototype = { + + a: function() + { + var currentSize = null; + ViperUtil.addEvent( + header, + 'safedblclick', + function() {}, + ); + + if (topContent) { + ViperUtil.addClass(topContent, 'Viper-popup-top'); + main.appendChild(topContent); + } + + ViperUtil.addClass(midContent, 'Viper-popup-content'); + main.appendChild(midContent); + } + +}; + +a.prototype = { + + a: function() + { + ViperUtil.addClass(midContent, 'Viper-popup-content'); + main.appendChild(midContent); + + var mouseUpAction = function() {}; + var preventMouseUp = false; + var self = this; + if (clickAction) { + } + } + +}; + +a.prototype = { + + a: function() + { + var a = function() { + var a = 'foo'; + }; + + if (true) { + } + + }, + + b: function() + { + ViperUtil.addEvent( + function() { + if (fullScreen !== true) { + currentSize = { + }; + + showfullScreen(); + } + } + ); + + }, + + c: function() + { + this.a( + { + a: function() { + form.onsubmit = function() { + return false; + }; + + var a = true; + } + } + ); + + } + +}; + +a.prototype = { + init: function() + {}, + + _b: function() + { + } + +}; + +for (var i = 0; i < 10; i++) { + var foo = {foo:{'a':'b', + 'c':'d'}}; +} + +class TestOk +{ + destroy() + { + setTimeout(a, 1000); + + if (typeof self.callbackOnClose === "function") { + self.callbackOnClose(); + } + } +} + +class TestBad +{ + destroy() + { + setTimeout(function () { + return; + }, 1000); + + if (typeof self.callbackOnClose === "function") { + self.callbackOnClose(); + } + } +} + +( function( $ ) { + foo(function( value ) { + value.bind( function( newval ) { + $( '#bar' ).html( newval ); + } ); + } )( jQuery ); diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/WhiteSpace/ScopeIndentUnitTest.2.inc b/vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/WhiteSpace/ScopeIndentUnitTest.2.inc new file mode 100644 index 00000000..407fc8d1 --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/WhiteSpace/ScopeIndentUnitTest.2.inc @@ -0,0 +1,1595 @@ +phpcs:set Generic.WhiteSpace.ScopeIndent tabIndent true + +hello(); + } + + function hello() + { + echo 'hello'; +}//end hello() + + function hello2() + { + if (TRUE) { + echo 'hello'; // no error here as its more than 4 spaces. + } else { + echo 'bye'; + } + + while (TRUE) { + echo 'hello'; + } + + do { + echo 'hello'; + } while (TRUE); + } + + function hello3() + { + switch ($hello) { + case 'hello': + break; + } + } + +} + +?> +
    +
    +
    +validate()) {
    +	$safe = $form->getSubmitValues();
    +}
    +?>
    +
    +open(); // error here + } + + public function open() + { + // Some inline stuff that shouldn't error + if (TRUE) echo 'hello'; + foreach ($tokens as $token) echo $token; + } + + /** + * This is a comment 1. + * This is a comment 2. + * This is a comment 3. + * This is a comment 4. + */ + public function close() + { + // All ok. + if (TRUE) { + if (TRUE) { + } else if (FALSE) { + foreach ($tokens as $token) { + switch ($token) { + case '1': + case '2': + if (true) { + if (false) { + if (false) { + if (false) { + echo 'hello'; + } + } + } + } + break; + case '5': + break; + } + do { + while (true) { + foreach ($tokens as $token) { + for ($i = 0; $i < $token; $i++) { + echo 'hello'; + } + } + } + } while (true); + } + } + } + } + + /* + This is another c style comment 1. + This is another c style comment 2. + This is another c style comment 3. + This is another c style comment 4. + This is another c style comment 5. + */ + + /* This is a T_COMMENT + * + * + * + */ + + /** This is a T_DOC_COMMENT + */ + + /* + This T_COMMENT has a newline in it. + + */ + + public function read() + { + echo 'hello'; + + // no errors below. + $array = array( + 'this', + 'that' => array( + 'hello', + 'hello again' => array( + 'hello', + ), + ), + ); + } +} + +abstract class Test3 +{ + public function parse() + { + + foreach ($t as $ndx => $token) { + if (is_array($token)) { + echo 'here'; + } else { + $ts[] = array("token" => $token, "value" => ''); + + $last = count($ts) - 1; + + switch ($token) { + case '(': + + if ($last >= 3 && + $ts[0]['token'] != T_CLASS && + $ts[$last - 2]['token'] == T_OBJECT_OPERATOR && + $ts[$last - 3]['token'] == T_VARIABLE ) { + + + if (true) { + echo 'hello'; + } + } + array_push($braces, $token); + break; + } + } + } + } +} + +function test() +{ + $o = << + + + + doSomething( + function () { + echo 123; + } + ); + } +} + +some_function( + function() { + $a = 403; + if ($a === 404) { + $a = 403; + } + } +); + +some_function( + function() { + $a = 403; + if ($a === 404) { + $a = 403; + } + } +); + +$myFunction = function() { + $a = 403; + if ($a === 404) { + $a = 403; + } +}; + +class Whatever +{ + protected $_protectedArray = array( + 'normalString' => 'That email address is already in use!', + 'offendingString' => <<<'STRING' +Each line of this string is always said to be at column 0, + no matter how many spaces are placed + at the beginning of each line +and the ending STRING on the next line is reported as having to be indented. +STRING + ); +} + +class MyClass +{ + public static function myFunction() + { + if (empty($keywords) === FALSE) { + $keywords = 'foo'; + $existing = 'foo'; + } + + return $keywords; + + }//end myFunction() + +}//end class + +$var = call_user_func( + $new_var = function () use (&$a) { + if ($a > 0) { + return $a++; + } else { + return $a--; + } + } +); + +class AnonymousFn +{ + public function getAnonFn() + { + return array( + 'functions' => Array( + 'function1' => function ($a, $b, $c) { + $a = $b + $c; + $b = $c / 2; + return Array($a, $b, $c); + }, + ), + ); + } +} +?> + +
    + +
    +
    + +
    +
    + +
    + + "") { + $test = true; + } else { + $test = true; + } + } + ?> + + + +
    +
    +
    + +
    +
    +
    + + +

    some text

    + function ($a) { + if ($a === true) { + echo 'hi'; + } + } +]; + +$list = [ + 'fn' => function ($a) { + if ($a === true) { + echo 'hi'; + } + } +]; + +if ($foo) { + foreach ($bar as $baz) { + if ($baz) { + ?> +
    +
    +
    + 1) { + echo '1'; + } + ?> +
    + 1) { + echo '1'; + } + ?> +
    + 1) { + echo '1'; + } + ?> +
    + +<?= CHtml::encode($this->pageTitle); ?> + +expects($this->at(2)) + ->with($this->callback( + function ($subject) + { + } + ) + ); + +/** @var Database $mockedDatabase */ +/** @var Container $mockedContainer */ + +echo $string->append('foo') + ->appaend('bar') + ->appaend('baz') + ->outputUsing( + function () + { + } + ); + +echo PHP_EOL; + +switch ($arg) { + case 1: + break; + case 2: + if ($arg2 == 'foo') { + } + case 3: + default: + echo 'default'; +} + +if ($tokens[$stackPtr]['content']{0} === '#') { +} else if ($tokens[$stackPtr]['content']{0} === '/' + && $tokens[$stackPtr]['content']{1} === '/' +) { +} + +$var = call_user_func( + function() { + if ($foo) { + $new_var = function() { + if ($a > 0) { + return $a++; + } else { + return $a--; + } + }; + } + } +); + +a( + function() { + $a = function() { + $b = false; + }; + true; + } +); + +$var = [ + [ + '1' => + function () { + return true; + }, + ], + [ + '1' => + function () { + return true; + }, + '2' => true, + ] +]; + +if ($foo) { + ?> +

    + self::_replaceKeywords($failingComment, $result), + 'screenshot' => Test::getScreenshotPath( + $projectid, + $result['class_name'], + ), + ); + +} + +$this->mockedDatabase + ->with( + $this->callback( + function () { + return; + } + ) + ); + +$this->subject->recordLogin(); + +function a() +{ + if (true) { + static::$a[$b] = + static::where($c) + ->where($c) + ->where( + function ($d) { + $d->whereNull(); + $d->orWhere(); + } + ) + ->first(); + + if (static::$a[$b] === null) { + static::$a[$b] = new static( + array( + 'a' => $a->id, + 'a' => $a->id, + ) + ); + } + } + + return static::$a[$b]; +} + +$foo->load( + array( + 'bar' => function ($baz) { + $baz->call(); + } + ) +); + +hello(); + +$foo = array_unique( + array_map( + function ($entry) { + return $entry * 2; + }, + array() + ) +); +bar($foo); + +class PHP_CodeSniffer_Tokenizers_JS +{ + + public $scopeOpeners = array( + T_CASE => array( + 'end' => array( + T_BREAK => T_BREAK, + T_RETURN => T_RETURN, + ), + 'strict' => true, + ), + ); +} + +echo $string-> + append('foo')-> + appaend('bar')-> + appaend('baz')-> + outputUsing( + function () + { + } + ); + +$str = 'the items I want to show are: ' . + implode( + ', ', + array('a', 'b', 'c') + ); + +echo $str; + +$str = 'foo' + . '1' + . '2'; + +echo $str; + +bar([ + 'foo' => foo(function () { + return 'foo'; + }) +]); + +$domains = array_unique( + array_map( + function ($url) { + $urlObject = new \Purl\Url($url); + return $urlObject->registerableDomain; + }, + $sites + ) +); + +return $domains; + +if ($a == 5) : + echo "a equals 5"; + echo "..."; +elseif ($a == 6) : + echo "a equals 6"; + echo "!!!"; +else : + echo "a is neither 5 nor 6"; +endif; + +if ($foo): +if ($bar) $foo = 1; +elseif ($baz) $foo = 2; +endif; + +$this + ->method(array( + 'foo' => 'bar', + ), 'arg', array( + 'foo' => 'bar', + )); + +class Foo +{ + use Bar { + myMethod as renamedMethod; + } +} + +class Foo +{ + use Bar { + myMethod as renamedMethod; + } +} + +foo(); + +array( + 'key1' => function ($bar) { + return $bar; + }, + 'key2' => function ($foo) { + return $foo; + }, +); + +?> + + 1, + ]; +$c = 2; + +class foo +{ + public function get() + { + $foo = ['b' => 'c', + 'd' => [ + ['e' => 'f'] + ]]; + echo '42'; + + $foo = array('b' => 'c', + 'd' => array( + array('e' => 'f') + )); + echo '42'; + } +} + +switch ($foo) { + case 1: + return array(); + case 2: + return ''; + case 3: + return $function(); + case 4: + return $functionCall($param[0]); + case 5: + return array() + array(); // Array Merge + case 6: + // String connect + return $functionReturningString('') . $functionReturningString(array()); + case 7: + return functionCall( + $withMultiLineParam[0], + array(), + $functionReturningString( + $withMultiLineParam[1] + ) + ); + case 8: + return $param[0][0]; +} + +class Test { + + public + $foo + ,$bar + ,$baz = [ ] + ; + + public function wtfindent() { + } +} + +switch ($x) { + case 1: + return [1]; + default: + return [2]; +} + +switch ($foo) { + case self::FOO: + return $this->bar($gfoo, function ($id) { + return FOO::bar($id); + }, $values); + case self::BAR: + $values = $this->bar($foo, $values); + break; +} + +$var = array( + 'long description' => + array(0, 'something'), + 'another long description' => + array(1, "something else") +); + +$services = array( + 'service 1' => + Mockery::mock('class 1') + ->shouldReceive('setFilter')->once() + ->shouldReceive('getNbResults')->atLeast()->once() + ->shouldReceive('getSlice')->once()->andReturn(array()) + ->getMock(), + 'service 2' => + Mockery::mock('class 2') + ->shouldReceive('__invoke')->once() + ->getMock() +); + +class Foo +{ + public function setUp() + { + $this->foo = new class { + public $name = 'Some value'; + }; + } +} + +try { + foo(); +} catch (\Exception $e) { + $foo = function() { + return 'foo'; + }; + + if (true) { + } +} + +if ($foo) { + foo(); +} else if ($e) { + $foo = function() { + return 'foo'; + }; + + if (true) { + } +} else { + $foo = function() { + return 'foo'; + }; + + if (true) { + } +} + +switch ($parameter) { + case null: + return [ + 'foo' => in_array( + 'foo', + [] + ), + ]; + + default: + return []; +} + +class SomeClass +{ + public function someFunc() + { + a(function () { + echo "a"; + })->b(function () { + echo "b"; + }); + + if (true) { + echo "c"; + } + echo "d"; + } +} + +$params = self::validate_parameters(self::read_competency_framework_parameters(), + array( + 'id' => $id, + )); + +$framework = api::read_framework($params['id']); +self::validate_context($framework->get_context()); +$output = $PAGE->get_renderer('tool_lp'); + +class Test123 +{ + protected static + $prop1 = [ + 'testA' => 123, + ], + $prop2 = [ + 'testB' => 456, + ]; + + protected static + $prop3 = array( + 'testA' => 123, + ), + $prop4 = array( + 'testB' => 456, + ); + + protected static $prop5; +} + +$foo = foo( + function () { + $foo->debug( + $a, + $b + ); + + if ($a) { + $b = $a; + } + } +); + +if (somethingIsTrue()) { + ?> +
    + +
    + bar(foo(function () { + }), foo(function () { + })); + +echo 'foo'; + +class Test { + + public function a() { + ?>adebug( + $a, + $b + ); + + if ($a) { + $b = $a; + } + } +); + +function test() +{ + $array = []; + foreach ($array as $data) { + [ + 'key1' => $var1, + 'key2' => $var2, + ] = $data; + foreach ($var1 as $method) { + echo $method . $var2; + } + } +} + +switch ($a) { + case 0: + $a = function () { + }; + case 1: + break; +} + +class Test +{ + public function __construct() + { +if (false) { +echo 0; + } + } +} + +return [ + 'veryLongKeySoIWantToMakeALineBreak' + => 'veryLonValueSoIWantToMakeALineBreak', + + 'someOtherKey' => [ + 'someValue' + ], + + 'arrayWithArraysInThere' => [ + ['Value1', 'Value1'] + ], +]; + +switch ($sContext) { + case 'SOMETHING': + case 'CONSTANT': + do_something(); + break; + case 'GLOBAL': + case 'GLOBAL1': + do_something(); + // Fall through + default: + { + do_something(); + } +} + +array_map( + static function ( $item ) { + echo $item; + }, + $some_array +); + +/** + * Comment. + */ +$a(function () use ($app) { + echo 'hi'; +})(); + +$app->run(); + +function foo() +{ + $foo('some + long description', function () { + }); + + $foo('some + long + description', function () { + }); + + $foo( +'some long description', function () { + }); +} + +switch ( $a ) { +case 'a': + $b = 2; + /** + * A comment. + */ + apply_filter( 'something', $b ); + break; + +case 'aa': + $b = 2; + /* + * A comment. + */ + apply_filter( 'something', $b ); + break; + +case 'b': + $b = 3; +?> + + + + + +
    + +
    + +
    + +
    + + +
    + + + +
    + [ + ], + 'b' => <<<'FOO' +foo; +FOO + ], + $a, +]; + +$query = Model::query() + ->when($a, function () { + static $b = ''; + }); + +$result = array_map( + static fn(int $number) : int => $number + 1, + $numbers +); + +$a = $a === true ? [ + 'a' => 1, + ] : [ + 'a' => 100, +]; + +return [ + Url::make('View Song', fn($song) => $song->url()) + ->onlyOnDetail(), + + new Panel('Information', [ + Text::make('Title') + ]), +]; + +echo $string?->append('foo') + ?->outputUsing(); + +// phpcs:set Generic.WhiteSpace.ScopeIndent exact true +echo $string?->append('foo') + ?->outputUsing(); +// phpcs:set Generic.WhiteSpace.ScopeIndent exact false + +if (true) { + ?> null, + false => false, + 1, 2, 3 => true, + default => $value, +}; + +$value = match ($value) { + '' => null, +false => false, + 1, 2, 3 => true, + default => $value, +}; + +$value = match ( + $value + ) { + '' => null, + false + => false, + 1, + 2, + 3 => true, + default => +$value, +}; + +function toString(): string +{ + return sprintf( + '%s', + match ($type) { + 'foo' => 'bar', + }, + ); +} + +$list = [ + 'fn' => function ($a) { + if ($a === true) { + echo 'hi'; + } + }, + 'fn' => function ($a) { + if ($a === true) { + echo 'hi'; + $list2 = [ + 'fn' => function ($a) { + if ($a === true) { + echo 'hi'; + } + } + ]; + } + } +]; + +$foo = match ($type) { + 'a' => [ + 'aa' => 'DESC', + 'ab' => 'DESC', + ], + 'b' => [ + 'ba' => 'DESC', + 'bb' => 'DESC', + ], + default => [ + 'da' => 'DESC', + ], +}; + +$a = [ + 'a' => [ + 'a' => fn () => foo() + ], + 'a' => [ + 'a' => 'a', + ] +]; + +/* ADD NEW TESTS ABOVE THIS LINE AND MAKE SURE THAT THE 1 (space-based) AND 2 (tab-based) FILES ARE IN SYNC! */ +?> + + + + + + + <<<'INTRO' + lorem ipsum + INTRO, + 'em' => [ + [ + '', + ], + ], + 'abc' => [ + 'a' => 'wop wop', + 'b' => 'ola ola.', + ], +]; + +echo "" diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/WhiteSpace/ScopeIndentUnitTest.2.inc.fixed b/vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/WhiteSpace/ScopeIndentUnitTest.2.inc.fixed new file mode 100644 index 00000000..5821ab70 --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/WhiteSpace/ScopeIndentUnitTest.2.inc.fixed @@ -0,0 +1,1595 @@ +phpcs:set Generic.WhiteSpace.ScopeIndent tabIndent true + +hello(); + } + + function hello() + { + echo 'hello'; + }//end hello() + + function hello2() + { + if (TRUE) { + echo 'hello'; // no error here as its more than 4 spaces. + } else { + echo 'bye'; + } + + while (TRUE) { + echo 'hello'; + } + + do { + echo 'hello'; + } while (TRUE); + } + + function hello3() + { + switch ($hello) { + case 'hello': + break; + } + } + +} + +?> +
    +
    +
    +validate()) {
    +	$safe = $form->getSubmitValues();
    +}
    +?>
    +
    +open(); // error here + } + + public function open() + { + // Some inline stuff that shouldn't error + if (TRUE) echo 'hello'; + foreach ($tokens as $token) echo $token; + } + + /** + * This is a comment 1. + * This is a comment 2. + * This is a comment 3. + * This is a comment 4. + */ + public function close() + { + // All ok. + if (TRUE) { + if (TRUE) { + } else if (FALSE) { + foreach ($tokens as $token) { + switch ($token) { + case '1': + case '2': + if (true) { + if (false) { + if (false) { + if (false) { + echo 'hello'; + } + } + } + } + break; + case '5': + break; + } + do { + while (true) { + foreach ($tokens as $token) { + for ($i = 0; $i < $token; $i++) { + echo 'hello'; + } + } + } + } while (true); + } + } + } + } + + /* + This is another c style comment 1. + This is another c style comment 2. + This is another c style comment 3. + This is another c style comment 4. + This is another c style comment 5. + */ + + /* This is a T_COMMENT + * + * + * + */ + + /** This is a T_DOC_COMMENT + */ + + /* + This T_COMMENT has a newline in it. + + */ + + public function read() + { + echo 'hello'; + + // no errors below. + $array = array( + 'this', + 'that' => array( + 'hello', + 'hello again' => array( + 'hello', + ), + ), + ); + } +} + +abstract class Test3 +{ + public function parse() + { + + foreach ($t as $ndx => $token) { + if (is_array($token)) { + echo 'here'; + } else { + $ts[] = array("token" => $token, "value" => ''); + + $last = count($ts) - 1; + + switch ($token) { + case '(': + + if ($last >= 3 && + $ts[0]['token'] != T_CLASS && + $ts[$last - 2]['token'] == T_OBJECT_OPERATOR && + $ts[$last - 3]['token'] == T_VARIABLE ) { + + + if (true) { + echo 'hello'; + } + } + array_push($braces, $token); + break; + } + } + } + } +} + +function test() +{ + $o = << + + + + doSomething( + function () { + echo 123; + } + ); + } +} + +some_function( + function() { + $a = 403; + if ($a === 404) { + $a = 403; + } + } +); + +some_function( + function() { + $a = 403; + if ($a === 404) { + $a = 403; + } + } +); + +$myFunction = function() { + $a = 403; + if ($a === 404) { + $a = 403; + } +}; + +class Whatever +{ + protected $_protectedArray = array( + 'normalString' => 'That email address is already in use!', + 'offendingString' => <<<'STRING' +Each line of this string is always said to be at column 0, + no matter how many spaces are placed + at the beginning of each line +and the ending STRING on the next line is reported as having to be indented. +STRING + ); +} + +class MyClass +{ + public static function myFunction() + { + if (empty($keywords) === FALSE) { + $keywords = 'foo'; + $existing = 'foo'; + } + + return $keywords; + + }//end myFunction() + +}//end class + +$var = call_user_func( + $new_var = function () use (&$a) { + if ($a > 0) { + return $a++; + } else { + return $a--; + } + } +); + +class AnonymousFn +{ + public function getAnonFn() + { + return array( + 'functions' => Array( + 'function1' => function ($a, $b, $c) { + $a = $b + $c; + $b = $c / 2; + return Array($a, $b, $c); + }, + ), + ); + } +} +?> + +
    + +
    +
    + +
    +
    + +
    + + "") { + $test = true; + } else { + $test = true; + } + } + ?> + + + +
    +
    +
    + +
    +
    +
    + + +

    some text

    + function ($a) { + if ($a === true) { + echo 'hi'; + } + } +]; + +$list = [ + 'fn' => function ($a) { + if ($a === true) { + echo 'hi'; + } + } +]; + +if ($foo) { + foreach ($bar as $baz) { + if ($baz) { + ?> +
    +
    +
    + 1) { + echo '1'; + } + ?> +
    + 1) { + echo '1'; + } + ?> +
    + 1) { + echo '1'; + } + ?> +
    + +<?= CHtml::encode($this->pageTitle); ?> + +expects($this->at(2)) + ->with($this->callback( + function ($subject) + { + } + ) + ); + +/** @var Database $mockedDatabase */ +/** @var Container $mockedContainer */ + +echo $string->append('foo') + ->appaend('bar') + ->appaend('baz') + ->outputUsing( + function () + { + } + ); + +echo PHP_EOL; + +switch ($arg) { + case 1: + break; + case 2: + if ($arg2 == 'foo') { + } + case 3: + default: + echo 'default'; +} + +if ($tokens[$stackPtr]['content']{0} === '#') { +} else if ($tokens[$stackPtr]['content']{0} === '/' + && $tokens[$stackPtr]['content']{1} === '/' +) { +} + +$var = call_user_func( + function() { + if ($foo) { + $new_var = function() { + if ($a > 0) { + return $a++; + } else { + return $a--; + } + }; + } + } +); + +a( + function() { + $a = function() { + $b = false; + }; + true; + } +); + +$var = [ + [ + '1' => + function () { + return true; + }, + ], + [ + '1' => + function () { + return true; + }, + '2' => true, + ] +]; + +if ($foo) { + ?> +

    + self::_replaceKeywords($failingComment, $result), + 'screenshot' => Test::getScreenshotPath( + $projectid, + $result['class_name'], + ), + ); + +} + +$this->mockedDatabase + ->with( + $this->callback( + function () { + return; + } + ) + ); + +$this->subject->recordLogin(); + +function a() +{ + if (true) { + static::$a[$b] = + static::where($c) + ->where($c) + ->where( + function ($d) { + $d->whereNull(); + $d->orWhere(); + } + ) + ->first(); + + if (static::$a[$b] === null) { + static::$a[$b] = new static( + array( + 'a' => $a->id, + 'a' => $a->id, + ) + ); + } + } + + return static::$a[$b]; +} + +$foo->load( + array( + 'bar' => function ($baz) { + $baz->call(); + } + ) +); + +hello(); + +$foo = array_unique( + array_map( + function ($entry) { + return $entry * 2; + }, + array() + ) +); +bar($foo); + +class PHP_CodeSniffer_Tokenizers_JS +{ + + public $scopeOpeners = array( + T_CASE => array( + 'end' => array( + T_BREAK => T_BREAK, + T_RETURN => T_RETURN, + ), + 'strict' => true, + ), + ); +} + +echo $string-> + append('foo')-> + appaend('bar')-> + appaend('baz')-> + outputUsing( + function () + { + } + ); + +$str = 'the items I want to show are: ' . + implode( + ', ', + array('a', 'b', 'c') + ); + +echo $str; + +$str = 'foo' + . '1' + . '2'; + +echo $str; + +bar([ + 'foo' => foo(function () { + return 'foo'; + }) +]); + +$domains = array_unique( + array_map( + function ($url) { + $urlObject = new \Purl\Url($url); + return $urlObject->registerableDomain; + }, + $sites + ) +); + +return $domains; + +if ($a == 5) : + echo "a equals 5"; + echo "..."; +elseif ($a == 6) : + echo "a equals 6"; + echo "!!!"; +else : + echo "a is neither 5 nor 6"; +endif; + +if ($foo): + if ($bar) $foo = 1; + elseif ($baz) $foo = 2; +endif; + +$this + ->method(array( + 'foo' => 'bar', + ), 'arg', array( + 'foo' => 'bar', + )); + +class Foo +{ + use Bar { + myMethod as renamedMethod; + } +} + +class Foo +{ + use Bar { + myMethod as renamedMethod; + } +} + +foo(); + +array( + 'key1' => function ($bar) { + return $bar; + }, + 'key2' => function ($foo) { + return $foo; + }, +); + +?> + + 1, + ]; +$c = 2; + +class foo +{ + public function get() + { + $foo = ['b' => 'c', + 'd' => [ + ['e' => 'f'] + ]]; + echo '42'; + + $foo = array('b' => 'c', + 'd' => array( + array('e' => 'f') + )); + echo '42'; + } +} + +switch ($foo) { + case 1: + return array(); + case 2: + return ''; + case 3: + return $function(); + case 4: + return $functionCall($param[0]); + case 5: + return array() + array(); // Array Merge + case 6: + // String connect + return $functionReturningString('') . $functionReturningString(array()); + case 7: + return functionCall( + $withMultiLineParam[0], + array(), + $functionReturningString( + $withMultiLineParam[1] + ) + ); + case 8: + return $param[0][0]; +} + +class Test { + + public + $foo + ,$bar + ,$baz = [ ] + ; + + public function wtfindent() { + } +} + +switch ($x) { + case 1: + return [1]; + default: + return [2]; +} + +switch ($foo) { + case self::FOO: + return $this->bar($gfoo, function ($id) { + return FOO::bar($id); + }, $values); + case self::BAR: + $values = $this->bar($foo, $values); + break; +} + +$var = array( + 'long description' => + array(0, 'something'), + 'another long description' => + array(1, "something else") +); + +$services = array( + 'service 1' => + Mockery::mock('class 1') + ->shouldReceive('setFilter')->once() + ->shouldReceive('getNbResults')->atLeast()->once() + ->shouldReceive('getSlice')->once()->andReturn(array()) + ->getMock(), + 'service 2' => + Mockery::mock('class 2') + ->shouldReceive('__invoke')->once() + ->getMock() +); + +class Foo +{ + public function setUp() + { + $this->foo = new class { + public $name = 'Some value'; + }; + } +} + +try { + foo(); +} catch (\Exception $e) { + $foo = function() { + return 'foo'; + }; + + if (true) { + } +} + +if ($foo) { + foo(); +} else if ($e) { + $foo = function() { + return 'foo'; + }; + + if (true) { + } +} else { + $foo = function() { + return 'foo'; + }; + + if (true) { + } +} + +switch ($parameter) { + case null: + return [ + 'foo' => in_array( + 'foo', + [] + ), + ]; + + default: + return []; +} + +class SomeClass +{ + public function someFunc() + { + a(function () { + echo "a"; + })->b(function () { + echo "b"; + }); + + if (true) { + echo "c"; + } + echo "d"; + } +} + +$params = self::validate_parameters(self::read_competency_framework_parameters(), + array( + 'id' => $id, + )); + +$framework = api::read_framework($params['id']); +self::validate_context($framework->get_context()); +$output = $PAGE->get_renderer('tool_lp'); + +class Test123 +{ + protected static + $prop1 = [ + 'testA' => 123, + ], + $prop2 = [ + 'testB' => 456, + ]; + + protected static + $prop3 = array( + 'testA' => 123, + ), + $prop4 = array( + 'testB' => 456, + ); + + protected static $prop5; +} + +$foo = foo( + function () { + $foo->debug( + $a, + $b + ); + + if ($a) { + $b = $a; + } + } +); + +if (somethingIsTrue()) { + ?> +
    + +
    + bar(foo(function () { + }), foo(function () { + })); + +echo 'foo'; + +class Test { + + public function a() { + ?>adebug( + $a, + $b + ); + + if ($a) { + $b = $a; + } + } +); + +function test() +{ + $array = []; + foreach ($array as $data) { + [ + 'key1' => $var1, + 'key2' => $var2, + ] = $data; + foreach ($var1 as $method) { + echo $method . $var2; + } + } +} + +switch ($a) { + case 0: + $a = function () { + }; + case 1: + break; +} + +class Test +{ + public function __construct() + { + if (false) { + echo 0; + } + } +} + +return [ + 'veryLongKeySoIWantToMakeALineBreak' + => 'veryLonValueSoIWantToMakeALineBreak', + + 'someOtherKey' => [ + 'someValue' + ], + + 'arrayWithArraysInThere' => [ + ['Value1', 'Value1'] + ], +]; + +switch ($sContext) { + case 'SOMETHING': + case 'CONSTANT': + do_something(); + break; + case 'GLOBAL': + case 'GLOBAL1': + do_something(); + // Fall through + default: + { + do_something(); + } +} + +array_map( + static function ( $item ) { + echo $item; + }, + $some_array +); + +/** + * Comment. + */ +$a(function () use ($app) { + echo 'hi'; +})(); + +$app->run(); + +function foo() +{ + $foo('some + long description', function () { + }); + + $foo('some + long + description', function () { + }); + + $foo( + 'some long description', function () { + }); +} + +switch ( $a ) { + case 'a': + $b = 2; + /** + * A comment. + */ + apply_filter( 'something', $b ); + break; + + case 'aa': + $b = 2; + /* + * A comment. + */ + apply_filter( 'something', $b ); + break; + + case 'b': + $b = 3; + ?> + + + + + +
    + +
    + +
    + +
    + + +
    + + + +
    + [ + ], + 'b' => <<<'FOO' +foo; +FOO + ], + $a, +]; + +$query = Model::query() + ->when($a, function () { + static $b = ''; + }); + +$result = array_map( + static fn(int $number) : int => $number + 1, + $numbers +); + +$a = $a === true ? [ + 'a' => 1, + ] : [ + 'a' => 100, +]; + +return [ + Url::make('View Song', fn($song) => $song->url()) + ->onlyOnDetail(), + + new Panel('Information', [ + Text::make('Title') + ]), +]; + +echo $string?->append('foo') + ?->outputUsing(); + +// phpcs:set Generic.WhiteSpace.ScopeIndent exact true +echo $string?->append('foo') + ?->outputUsing(); +// phpcs:set Generic.WhiteSpace.ScopeIndent exact false + +if (true) { + ?> null, + false => false, + 1, 2, 3 => true, + default => $value, +}; + +$value = match ($value) { + '' => null, + false => false, + 1, 2, 3 => true, + default => $value, +}; + +$value = match ( + $value + ) { + '' => null, + false + => false, + 1, + 2, + 3 => true, + default => + $value, +}; + +function toString(): string +{ + return sprintf( + '%s', + match ($type) { + 'foo' => 'bar', + }, + ); +} + +$list = [ + 'fn' => function ($a) { + if ($a === true) { + echo 'hi'; + } + }, + 'fn' => function ($a) { + if ($a === true) { + echo 'hi'; + $list2 = [ + 'fn' => function ($a) { + if ($a === true) { + echo 'hi'; + } + } + ]; + } + } +]; + +$foo = match ($type) { + 'a' => [ + 'aa' => 'DESC', + 'ab' => 'DESC', + ], + 'b' => [ + 'ba' => 'DESC', + 'bb' => 'DESC', + ], + default => [ + 'da' => 'DESC', + ], +}; + +$a = [ + 'a' => [ + 'a' => fn () => foo() + ], + 'a' => [ + 'a' => 'a', + ] +]; + +/* ADD NEW TESTS ABOVE THIS LINE AND MAKE SURE THAT THE 1 (space-based) AND 2 (tab-based) FILES ARE IN SYNC! */ +?> + + + + + + + <<<'INTRO' + lorem ipsum + INTRO, + 'em' => [ + [ + '', + ], + ], + 'abc' => [ + 'a' => 'wop wop', + 'b' => 'ola ola.', + ], +]; + +echo "" diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/WhiteSpace/ScopeIndentUnitTest.3.inc b/vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/WhiteSpace/ScopeIndentUnitTest.3.inc new file mode 100644 index 00000000..55d1a06a --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/WhiteSpace/ScopeIndentUnitTest.3.inc @@ -0,0 +1,28 @@ +phpcs:set Generic.WhiteSpace.ScopeIndent tabIndent false +phpcs:set Generic.WhiteSpace.ScopeIndent exact true + $enabled, + 'compression' => $compression, + ] = $options; +} + +$this->foo() + ->bar() + ->baz(); diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/WhiteSpace/ScopeIndentUnitTest.3.inc.fixed b/vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/WhiteSpace/ScopeIndentUnitTest.3.inc.fixed new file mode 100644 index 00000000..e9ae5ff3 --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/WhiteSpace/ScopeIndentUnitTest.3.inc.fixed @@ -0,0 +1,28 @@ +phpcs:set Generic.WhiteSpace.ScopeIndent tabIndent false +phpcs:set Generic.WhiteSpace.ScopeIndent exact true + $enabled, + 'compression' => $compression, + ] = $options; +} + +$this->foo() + ->bar() + ->baz(); diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/WhiteSpace/ScopeIndentUnitTest.4.inc b/vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/WhiteSpace/ScopeIndentUnitTest.4.inc new file mode 100644 index 00000000..e58dc4de --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/WhiteSpace/ScopeIndentUnitTest.4.inc @@ -0,0 +1,6 @@ + + * @copyright 2006-2015 Squiz Pty Ltd (ABN 77 084 670 600) + * @license https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence + */ + +namespace PHP_CodeSniffer\Standards\Generic\Tests\WhiteSpace; + +use PHP_CodeSniffer\Tests\Standards\AbstractSniffUnitTest; + +class ScopeIndentUnitTest extends AbstractSniffUnitTest +{ + + + /** + * Get a list of CLI values to set before the file is tested. + * + * @param string $testFile The name of the file being tested. + * @param \PHP_CodeSniffer\Config $config The config data for the test run. + * + * @return void + */ + public function setCliValues($testFile, $config) + { + // Tab width setting is only needed for the tabbed file. + if ($testFile === 'ScopeIndentUnitTest.2.inc') { + $config->tabWidth = 4; + } else { + $config->tabWidth = 0; + } + + }//end setCliValues() + + + /** + * Returns the lines where errors should occur. + * + * The key of the array should represent the line number and the value + * should represent the number of errors that should occur on that line. + * + * @param string $testFile The name of the file being tested. + * + * @return array + */ + public function getErrorList($testFile='ScopeIndentUnitTest.inc') + { + if ($testFile === 'ScopeIndentUnitTest.1.js') { + return [ + 6 => 1, + 14 => 1, + 21 => 1, + 30 => 1, + 32 => 1, + 33 => 1, + 34 => 1, + 39 => 1, + 42 => 1, + 59 => 1, + 60 => 1, + 75 => 1, + 120 => 1, + 121 => 1, + 122 => 1, + 123 => 1, + 141 => 1, + 142 => 1, + 155 => 1, + 156 => 1, + 168 => 1, + 184 => 1, + ]; + }//end if + + if ($testFile === 'ScopeIndentUnitTest.3.inc') { + return [ + 6 => 1, + 7 => 1, + 10 => 1, + ]; + } + + if ($testFile === 'ScopeIndentUnitTest.4.inc') { + return []; + } + + return [ + 7 => 1, + 10 => 1, + 13 => 1, + 17 => 1, + 20 => 1, + 24 => 1, + 25 => 1, + 27 => 1, + 28 => 1, + 29 => 1, + 30 => 1, + 58 => 1, + 123 => 1, + 224 => 1, + 225 => 1, + 279 => 1, + 280 => 1, + 281 => 1, + 282 => 1, + 283 => 1, + 284 => 1, + 285 => 1, + 286 => 1, + 336 => 1, + 349 => 1, + 380 => 1, + 386 => 1, + 387 => 1, + 388 => 1, + 389 => 1, + 390 => 1, + 397 => 1, + 419 => 1, + 420 => 1, + 465 => 1, + 467 => 1, + 472 => 1, + 473 => 1, + 474 => 1, + 496 => 1, + 498 => 1, + 500 => 1, + 524 => 1, + 526 => 1, + 544 => 1, + 545 => 1, + 546 => 1, + 639 => 1, + 660 => 1, + 662 => 1, + 802 => 1, + 803 => 1, + 823 => 1, + 858 => 1, + 879 => 1, + 1163 => 1, + 1197 => 1, + 1198 => 1, + 1259 => 1, + 1264 => 1, + 1265 => 1, + 1266 => 1, + 1269 => 1, + 1272 => 1, + 1273 => 1, + 1274 => 1, + 1275 => 1, + 1276 => 1, + 1277 => 1, + 1280 => 1, + 1281 => 1, + 1282 => 1, + 1284 => 1, + 1285 => 1, + 1288 => 1, + 1289 => 1, + 1290 => 1, + 1292 => 1, + 1293 => 1, + 1310 => 1, + 1312 => 1, + 1327 => 1, + 1328 => 1, + 1329 => 1, + 1330 => 1, + 1331 => 1, + 1332 => 1, + 1335 => 1, + 1340 => 1, + 1342 => 1, + 1345 => 1, + 1488 => 1, + 1489 => 1, + 1500 => 1, + 1503 => 1, + 1518 => 1, + 1520 => 1, + 1527 => 1, + 1529 => 1, + 1530 => 1, + 1567 => 1, + 1568 => 1, + 1569 => 1, + 1570 => 1, + ]; + + }//end getErrorList() + + + /** + * Returns the lines where warnings should occur. + * + * The key of the array should represent the line number and the value + * should represent the number of warnings that should occur on that line. + * + * @return array + */ + public function getWarningList() + { + return []; + + }//end getWarningList() + + +}//end class diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/WhiteSpace/SpreadOperatorSpacingAfterUnitTest.inc b/vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/WhiteSpace/SpreadOperatorSpacingAfterUnitTest.inc new file mode 100644 index 00000000..edce4dcc --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/WhiteSpace/SpreadOperatorSpacingAfterUnitTest.inc @@ -0,0 +1,73 @@ + + * @copyright 2019 Juliette Reinders Folmer. All rights reserved. + * @license https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence + */ + +namespace PHP_CodeSniffer\Standards\Generic\Tests\WhiteSpace; + +use PHP_CodeSniffer\Tests\Standards\AbstractSniffUnitTest; + +class SpreadOperatorSpacingAfterUnitTest extends AbstractSniffUnitTest +{ + + + /** + * Returns the lines where errors should occur. + * + * The key of the array should represent the line number and the value + * should represent the number of errors that should occur on that line. + * + * @return array + */ + public function getErrorList() + { + return [ + 12 => 1, + 13 => 1, + 20 => 2, + 40 => 1, + 41 => 1, + 46 => 2, + 60 => 1, + 61 => 1, + 66 => 2, + ]; + + }//end getErrorList() + + + /** + * Returns the lines where warnings should occur. + * + * The key of the array should represent the line number and the value + * should represent the number of warnings that should occur on that line. + * + * @return array + */ + public function getWarningList() + { + return []; + + }//end getWarningList() + + +}//end class diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/Generic/ruleset.xml b/vendor/squizlabs/php_codesniffer/src/Standards/Generic/ruleset.xml new file mode 100644 index 00000000..728426e6 --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/Generic/ruleset.xml @@ -0,0 +1,4 @@ + + + A collection of generic sniffs. This standard is not designed to be used to check code. + diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/MySource/Sniffs/CSS/BrowserSpecificStylesSniff.php b/vendor/squizlabs/php_codesniffer/src/Standards/MySource/Sniffs/CSS/BrowserSpecificStylesSniff.php new file mode 100644 index 00000000..9575398a --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/MySource/Sniffs/CSS/BrowserSpecificStylesSniff.php @@ -0,0 +1,87 @@ + + * @copyright 2006-2015 Squiz Pty Ltd (ABN 77 084 670 600) + * @license https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence + */ + +namespace PHP_CodeSniffer\Standards\MySource\Sniffs\CSS; + +use PHP_CodeSniffer\Sniffs\Sniff; +use PHP_CodeSniffer\Files\File; + +class BrowserSpecificStylesSniff implements Sniff +{ + + /** + * A list of tokenizers this sniff supports. + * + * @var array + */ + public $supportedTokenizers = ['CSS']; + + /** + * A list of specific stylesheet suffixes we allow. + * + * These stylesheets contain browser specific styles + * so this sniff ignore them files in the form: + * *_moz.css and *_ie7.css etc. + * + * @var array + */ + protected $specificStylesheets = [ + 'moz' => true, + 'ie' => true, + 'ie7' => true, + 'ie8' => true, + 'webkit' => true, + ]; + + + /** + * Returns the token types that this sniff is interested in. + * + * @return int[] + */ + public function register() + { + return [T_STYLE]; + + }//end register() + + + /** + * Processes the tokens that this sniff is interested in. + * + * @param \PHP_CodeSniffer\Files\File $phpcsFile The file where the token was found. + * @param int $stackPtr The position in the stack where + * the token was found. + * + * @return void + */ + public function process(File $phpcsFile, $stackPtr) + { + // Ignore files with browser-specific suffixes. + $filename = $phpcsFile->getFilename(); + $breakChar = strrpos($filename, '_'); + if ($breakChar !== false && substr($filename, -4) === '.css') { + $specific = substr($filename, ($breakChar + 1), -4); + if (isset($this->specificStylesheets[$specific]) === true) { + return; + } + } + + $tokens = $phpcsFile->getTokens(); + $content = $tokens[$stackPtr]['content']; + + if ($content[0] === '-') { + $error = 'Browser-specific styles are not allowed'; + $phpcsFile->addError($error, $stackPtr, 'ForbiddenStyle'); + } + + }//end process() + + +}//end class diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/MySource/Sniffs/Channels/DisallowSelfActionsSniff.php b/vendor/squizlabs/php_codesniffer/src/Standards/MySource/Sniffs/Channels/DisallowSelfActionsSniff.php new file mode 100644 index 00000000..81b7f1b6 --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/MySource/Sniffs/Channels/DisallowSelfActionsSniff.php @@ -0,0 +1,125 @@ + + * @copyright 2006-2015 Squiz Pty Ltd (ABN 77 084 670 600) + * @license https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence + */ + +namespace PHP_CodeSniffer\Standards\MySource\Sniffs\Channels; + +use PHP_CodeSniffer\Sniffs\Sniff; +use PHP_CodeSniffer\Files\File; +use PHP_CodeSniffer\Util\Tokens; + +class DisallowSelfActionsSniff implements Sniff +{ + + + /** + * Returns an array of tokens this test wants to listen for. + * + * @return array + */ + public function register() + { + return [T_CLASS]; + + }//end register() + + + /** + * Processes this sniff, when one of its tokens is encountered. + * + * @param \PHP_CodeSniffer\Files\File $phpcsFile The file being scanned. + * @param int $stackPtr The position of the current token in + * the stack passed in $tokens. + * + * @return void + */ + public function process(File $phpcsFile, $stackPtr) + { + $tokens = $phpcsFile->getTokens(); + + // We are not interested in abstract classes. + $prev = $phpcsFile->findPrevious(T_WHITESPACE, ($stackPtr - 1), null, true); + if ($prev !== false && $tokens[$prev]['code'] === T_ABSTRACT) { + return; + } + + // We are only interested in Action classes. + $classNameToken = $phpcsFile->findNext(T_WHITESPACE, ($stackPtr + 1), null, true); + $className = $tokens[$classNameToken]['content']; + if (substr($className, -7) !== 'Actions') { + return; + } + + $foundFunctions = []; + $foundCalls = []; + + // Find all static method calls in the form self::method() in the class. + $classEnd = $tokens[$stackPtr]['scope_closer']; + for ($i = ($classNameToken + 1); $i < $classEnd; $i++) { + if ($tokens[$i]['code'] !== T_DOUBLE_COLON) { + if ($tokens[$i]['code'] === T_FUNCTION) { + // Cache the function information. + $funcName = $phpcsFile->findNext(T_STRING, ($i + 1)); + $funcScope = $phpcsFile->findPrevious(Tokens::$scopeModifiers, ($i - 1)); + + $foundFunctions[$tokens[$funcName]['content']] = strtolower($tokens[$funcScope]['content']); + } + + continue; + } + + $prevToken = $phpcsFile->findPrevious(T_WHITESPACE, ($i - 1), null, true); + if ($tokens[$prevToken]['content'] !== 'self' + && $tokens[$prevToken]['content'] !== 'static' + ) { + continue; + } + + $funcNameToken = $phpcsFile->findNext(T_WHITESPACE, ($i + 1), null, true); + if ($tokens[$funcNameToken]['code'] === T_VARIABLE) { + // We are only interested in function calls. + continue; + } + + $funcName = $tokens[$funcNameToken]['content']; + + // We've found the function, now we need to find it and see if it is + // public, private or protected. If it starts with an underscore we + // can assume it is private. + if ($funcName[0] === '_') { + continue; + } + + $foundCalls[$i] = [ + 'name' => $funcName, + 'type' => strtolower($tokens[$prevToken]['content']), + ]; + }//end for + + $errorClassName = substr($className, 0, -7); + + foreach ($foundCalls as $token => $funcData) { + if (isset($foundFunctions[$funcData['name']]) === false) { + // Function was not in this class, might have come from the parent. + // Either way, we can't really check this. + continue; + } else if ($foundFunctions[$funcData['name']] === 'public') { + $type = $funcData['type']; + $error = "Static calls to public methods in Action classes must not use the $type keyword; use %s::%s() instead"; + $data = [ + $errorClassName, + $funcName, + ]; + $phpcsFile->addError($error, $token, 'Found'.ucfirst($funcData['type']), $data); + } + } + + }//end process() + + +}//end class diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/MySource/Sniffs/Channels/IncludeOwnSystemSniff.php b/vendor/squizlabs/php_codesniffer/src/Standards/MySource/Sniffs/Channels/IncludeOwnSystemSniff.php new file mode 100644 index 00000000..2d56261c --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/MySource/Sniffs/Channels/IncludeOwnSystemSniff.php @@ -0,0 +1,98 @@ + + * @copyright 2006-2015 Squiz Pty Ltd (ABN 77 084 670 600) + * @license https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence + */ + +namespace PHP_CodeSniffer\Standards\MySource\Sniffs\Channels; + +use PHP_CodeSniffer\Sniffs\Sniff; +use PHP_CodeSniffer\Files\File; + +class IncludeOwnSystemSniff implements Sniff +{ + + + /** + * Returns an array of tokens this test wants to listen for. + * + * @return array + */ + public function register() + { + return [T_DOUBLE_COLON]; + + }//end register() + + + /** + * Processes this sniff, when one of its tokens is encountered. + * + * @param \PHP_CodeSniffer\Files\File $phpcsFile The file being scanned. + * @param int $stackPtr The position of the current token in + * the stack passed in $tokens. + * + * @return void + */ + public function process(File $phpcsFile, $stackPtr) + { + $fileName = $phpcsFile->getFilename(); + $matches = []; + if (preg_match('|/systems/(.*)/([^/]+)?actions.inc$|i', $fileName, $matches) === 0) { + // Not an actions file. + return; + } + + $ownClass = $matches[2]; + $tokens = $phpcsFile->getTokens(); + + $typeName = $phpcsFile->findNext(T_CONSTANT_ENCAPSED_STRING, ($stackPtr + 2), null, false, true); + $typeName = trim($tokens[$typeName]['content'], " '"); + switch (strtolower($tokens[($stackPtr + 1)]['content'])) { + case 'includesystem' : + $included = strtolower($typeName); + break; + case 'includeasset' : + $included = strtolower($typeName).'assettype'; + break; + case 'includewidget' : + $included = strtolower($typeName).'widgettype'; + break; + default: + return; + } + + if ($included === strtolower($ownClass)) { + $error = "You do not need to include \"%s\" from within the system's own actions file"; + $data = [$ownClass]; + $phpcsFile->addError($error, $stackPtr, 'NotRequired', $data); + } + + }//end process() + + + /** + * Determines the included class name from given token. + * + * @param \PHP_CodeSniffer\Files\File $phpcsFile The file where this token was found. + * @param array $tokens The array of file tokens. + * @param int $stackPtr The position in the tokens array of the + * potentially included class. + * + * @return string + */ + protected function getIncludedClassFromToken( + $phpcsFile, + array $tokens, + $stackPtr + ) { + + return false; + + }//end getIncludedClassFromToken() + + +}//end class diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/MySource/Sniffs/Channels/IncludeSystemSniff.php b/vendor/squizlabs/php_codesniffer/src/Standards/MySource/Sniffs/Channels/IncludeSystemSniff.php new file mode 100644 index 00000000..8bbd91e8 --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/MySource/Sniffs/Channels/IncludeSystemSniff.php @@ -0,0 +1,314 @@ + + * @copyright 2006-2015 Squiz Pty Ltd (ABN 77 084 670 600) + * @license https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence + */ + +namespace PHP_CodeSniffer\Standards\MySource\Sniffs\Channels; + +use PHP_CodeSniffer\Sniffs\AbstractScopeSniff; +use PHP_CodeSniffer\Files\File; +use PHP_CodeSniffer\Util\Tokens; + +class IncludeSystemSniff extends AbstractScopeSniff +{ + + /** + * A list of classes that don't need to be included. + * + * @var string[] + */ + private $ignore = [ + 'self' => true, + 'static' => true, + 'parent' => true, + 'channels' => true, + 'basesystem' => true, + 'dal' => true, + 'init' => true, + 'pdo' => true, + 'util' => true, + 'ziparchive' => true, + 'phpunit_framework_assert' => true, + 'abstractmysourceunittest' => true, + 'abstractdatacleanunittest' => true, + 'exception' => true, + 'abstractwidgetwidgettype' => true, + 'domdocument' => true, + ]; + + + /** + * Constructs an AbstractScopeSniff. + */ + public function __construct() + { + parent::__construct([T_FUNCTION], [T_DOUBLE_COLON, T_EXTENDS], true); + + }//end __construct() + + + /** + * Processes the function tokens within the class. + * + * @param \PHP_CodeSniffer\Files\File $phpcsFile The file where this token was found. + * @param integer $stackPtr The position where the token was found. + * @param integer $currScope The current scope opener token. + * + * @return void + */ + protected function processTokenWithinScope(File $phpcsFile, $stackPtr, $currScope) + { + $tokens = $phpcsFile->getTokens(); + + // Determine the name of the class that the static function + // is being called on. + $classNameToken = $phpcsFile->findPrevious( + T_WHITESPACE, + ($stackPtr - 1), + null, + true + ); + + // Don't process class names represented by variables as this can be + // an inexact science. + if ($tokens[$classNameToken]['code'] === T_VARIABLE) { + return; + } + + $className = $tokens[$classNameToken]['content']; + if (isset($this->ignore[strtolower($className)]) === true) { + return; + } + + $includedClasses = []; + + $fileName = strtolower($phpcsFile->getFilename()); + $matches = []; + if (preg_match('|/systems/(.*)/([^/]+)?actions.inc$|', $fileName, $matches) !== 0) { + // This is an actions file, which means we don't + // have to include the system in which it exists. + $includedClasses[$matches[2]] = true; + + // Or a system it implements. + $class = $phpcsFile->getCondition($stackPtr, T_CLASS); + $implements = $phpcsFile->findNext(T_IMPLEMENTS, $class, ($class + 10)); + if ($implements !== false) { + $implementsClass = $phpcsFile->findNext(T_STRING, $implements); + $implementsClassName = strtolower($tokens[$implementsClass]['content']); + if (substr($implementsClassName, -7) === 'actions') { + $includedClasses[substr($implementsClassName, 0, -7)] = true; + } + } + } + + // Go searching for includeSystem and includeAsset calls within this + // function, or the inclusion of .inc files, which + // would be library files. + for ($i = ($currScope + 1); $i < $stackPtr; $i++) { + $name = $this->getIncludedClassFromToken($phpcsFile, $tokens, $i); + if ($name !== false) { + $includedClasses[$name] = true; + // Special case for Widgets cause they are, well, special. + } else if (strtolower($tokens[$i]['content']) === 'includewidget') { + $typeName = $phpcsFile->findNext(T_CONSTANT_ENCAPSED_STRING, ($i + 1)); + $typeName = trim($tokens[$typeName]['content'], " '"); + $includedClasses[strtolower($typeName).'widgettype'] = true; + } + } + + // Now go searching for includeSystem, includeAsset or require/include + // calls outside our scope. If we are in a class, look outside the + // class. If we are not, look outside the function. + $condPtr = $currScope; + if ($phpcsFile->hasCondition($stackPtr, T_CLASS) === true) { + foreach ($tokens[$stackPtr]['conditions'] as $condPtr => $condType) { + if ($condType === T_CLASS) { + break; + } + } + } + + for ($i = 0; $i < $condPtr; $i++) { + // Skip other scopes. + if (isset($tokens[$i]['scope_closer']) === true) { + $i = $tokens[$i]['scope_closer']; + continue; + } + + $name = $this->getIncludedClassFromToken($phpcsFile, $tokens, $i); + if ($name !== false) { + $includedClasses[$name] = true; + } + } + + // If we are in a testing class, we might have also included + // some systems and classes in our setUp() method. + $setupFunction = null; + if ($phpcsFile->hasCondition($stackPtr, T_CLASS) === true) { + foreach ($tokens[$stackPtr]['conditions'] as $condPtr => $condType) { + if ($condType === T_CLASS) { + // Is this is a testing class? + $name = $phpcsFile->findNext(T_STRING, $condPtr); + $name = $tokens[$name]['content']; + if (substr($name, -8) === 'UnitTest') { + // Look for a method called setUp(). + $end = $tokens[$condPtr]['scope_closer']; + $function = $phpcsFile->findNext(T_FUNCTION, ($condPtr + 1), $end); + while ($function !== false) { + $name = $phpcsFile->findNext(T_STRING, $function); + if ($tokens[$name]['content'] === 'setUp') { + $setupFunction = $function; + break; + } + + $function = $phpcsFile->findNext(T_FUNCTION, ($function + 1), $end); + } + } + } + }//end foreach + }//end if + + if ($setupFunction !== null) { + $start = ($tokens[$setupFunction]['scope_opener'] + 1); + $end = $tokens[$setupFunction]['scope_closer']; + for ($i = $start; $i < $end; $i++) { + $name = $this->getIncludedClassFromToken($phpcsFile, $tokens, $i); + if ($name !== false) { + $includedClasses[$name] = true; + } + } + }//end if + + if (isset($includedClasses[strtolower($className)]) === false) { + $error = 'Static method called on non-included class or system "%s"; include system with Channels::includeSystem() or include class with require_once'; + $data = [$className]; + $phpcsFile->addError($error, $stackPtr, 'NotIncludedCall', $data); + } + + }//end processTokenWithinScope() + + + /** + * Processes a token within the scope that this test is listening to. + * + * @param \PHP_CodeSniffer\Files\File $phpcsFile The file where the token was found. + * @param int $stackPtr The position in the stack where + * this token was found. + * + * @return void + */ + protected function processTokenOutsideScope(File $phpcsFile, $stackPtr) + { + $tokens = $phpcsFile->getTokens(); + + if ($tokens[$stackPtr]['code'] === T_EXTENDS) { + // Find the class name. + $classNameToken = $phpcsFile->findNext(T_STRING, ($stackPtr + 1)); + $className = $tokens[$classNameToken]['content']; + } else { + // Determine the name of the class that the static function + // is being called on. But don't process class names represented by + // variables as this can be an inexact science. + $classNameToken = $phpcsFile->findPrevious(T_WHITESPACE, ($stackPtr - 1), null, true); + if ($tokens[$classNameToken]['code'] === T_VARIABLE) { + return; + } + + $className = $tokens[$classNameToken]['content']; + } + + // Some systems are always available. + if (isset($this->ignore[strtolower($className)]) === true) { + return; + } + + $includedClasses = []; + + $fileName = strtolower($phpcsFile->getFilename()); + $matches = []; + if (preg_match('|/systems/([^/]+)/([^/]+)?actions.inc$|', $fileName, $matches) !== 0) { + // This is an actions file, which means we don't + // have to include the system in which it exists + // We know the system from the path. + $includedClasses[$matches[1]] = true; + } + + // Go searching for includeSystem, includeAsset or require/include + // calls outside our scope. + for ($i = 0; $i < $stackPtr; $i++) { + // Skip classes and functions as will we never get + // into their scopes when including this file, although + // we have a chance of getting into IF, WHILE etc. + if (($tokens[$i]['code'] === T_CLASS + || $tokens[$i]['code'] === T_INTERFACE + || $tokens[$i]['code'] === T_FUNCTION) + && isset($tokens[$i]['scope_closer']) === true + ) { + $i = $tokens[$i]['scope_closer']; + continue; + } + + $name = $this->getIncludedClassFromToken($phpcsFile, $tokens, $i); + if ($name !== false) { + $includedClasses[$name] = true; + // Special case for Widgets cause they are, well, special. + } else if (strtolower($tokens[$i]['content']) === 'includewidget') { + $typeName = $phpcsFile->findNext(T_CONSTANT_ENCAPSED_STRING, ($i + 1)); + $typeName = trim($tokens[$typeName]['content'], " '"); + $includedClasses[strtolower($typeName).'widgettype'] = true; + } + }//end for + + if (isset($includedClasses[strtolower($className)]) === false) { + if ($tokens[$stackPtr]['code'] === T_EXTENDS) { + $error = 'Class extends non-included class or system "%s"; include system with Channels::includeSystem() or include class with require_once'; + $data = [$className]; + $phpcsFile->addError($error, $stackPtr, 'NotIncludedExtends', $data); + } else { + $error = 'Static method called on non-included class or system "%s"; include system with Channels::includeSystem() or include class with require_once'; + $data = [$className]; + $phpcsFile->addError($error, $stackPtr, 'NotIncludedCall', $data); + } + } + + }//end processTokenOutsideScope() + + + /** + * Determines the included class name from given token. + * + * @param \PHP_CodeSniffer\Files\File $phpcsFile The file where this token was found. + * @param array $tokens The array of file tokens. + * @param int $stackPtr The position in the tokens array of the + * potentially included class. + * + * @return string + */ + protected function getIncludedClassFromToken(File $phpcsFile, array $tokens, $stackPtr) + { + if (strtolower($tokens[$stackPtr]['content']) === 'includesystem') { + $systemName = $phpcsFile->findNext(T_CONSTANT_ENCAPSED_STRING, ($stackPtr + 1)); + $systemName = trim($tokens[$systemName]['content'], " '"); + return strtolower($systemName); + } else if (strtolower($tokens[$stackPtr]['content']) === 'includeasset') { + $typeName = $phpcsFile->findNext(T_CONSTANT_ENCAPSED_STRING, ($stackPtr + 1)); + $typeName = trim($tokens[$typeName]['content'], " '"); + return strtolower($typeName).'assettype'; + } else if (isset(Tokens::$includeTokens[$tokens[$stackPtr]['code']]) === true) { + $filePath = $phpcsFile->findNext(T_CONSTANT_ENCAPSED_STRING, ($stackPtr + 1)); + $filePath = $tokens[$filePath]['content']; + $filePath = trim($filePath, " '"); + $filePath = basename($filePath, '.inc'); + return strtolower($filePath); + } + + return false; + + }//end getIncludedClassFromToken() + + +}//end class diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/MySource/Sniffs/Channels/UnusedSystemSniff.php b/vendor/squizlabs/php_codesniffer/src/Standards/MySource/Sniffs/Channels/UnusedSystemSniff.php new file mode 100644 index 00000000..6b10cd3e --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/MySource/Sniffs/Channels/UnusedSystemSniff.php @@ -0,0 +1,141 @@ + + * @copyright 2006-2015 Squiz Pty Ltd (ABN 77 084 670 600) + * @license https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence + */ + +namespace PHP_CodeSniffer\Standards\MySource\Sniffs\Channels; + +use PHP_CodeSniffer\Sniffs\Sniff; +use PHP_CodeSniffer\Files\File; + +class UnusedSystemSniff implements Sniff +{ + + + /** + * Returns an array of tokens this test wants to listen for. + * + * @return array + */ + public function register() + { + return [T_DOUBLE_COLON]; + + }//end register() + + + /** + * Processes this sniff, when one of its tokens is encountered. + * + * @param \PHP_CodeSniffer\Files\File $phpcsFile The file being scanned. + * @param int $stackPtr The position of the current token in + * the stack passed in $tokens. + * + * @return void + */ + public function process(File $phpcsFile, $stackPtr) + { + $tokens = $phpcsFile->getTokens(); + + // Check if this is a call to includeSystem, includeAsset or includeWidget. + $methodName = strtolower($tokens[($stackPtr + 1)]['content']); + if ($methodName === 'includesystem' + || $methodName === 'includeasset' + || $methodName === 'includewidget' + ) { + $systemName = $phpcsFile->findNext(T_WHITESPACE, ($stackPtr + 3), null, true); + if ($systemName === false || $tokens[$systemName]['code'] !== T_CONSTANT_ENCAPSED_STRING) { + // Must be using a variable instead of a specific system name. + // We can't accurately check that. + return; + } + + $systemName = trim($tokens[$systemName]['content'], " '"); + } else { + return; + } + + if ($methodName === 'includeasset') { + $systemName .= 'assettype'; + } else if ($methodName === 'includewidget') { + $systemName .= 'widgettype'; + } + + $systemName = strtolower($systemName); + + // Now check if this system is used anywhere in this scope. + $level = $tokens[$stackPtr]['level']; + for ($i = ($stackPtr + 1); $i < $phpcsFile->numTokens; $i++) { + if ($tokens[$i]['level'] < $level) { + // We have gone out of scope. + // If the original include was inside an IF statement that + // is checking if the system exists, check the outer scope + // as well. + if ($tokens[$stackPtr]['level'] === $level) { + // We are still in the base level, so this is the first + // time we have got here. + $conditions = array_keys($tokens[$stackPtr]['conditions']); + if (empty($conditions) === false) { + $cond = array_pop($conditions); + if ($tokens[$cond]['code'] === T_IF) { + $i = $tokens[$cond]['scope_closer']; + $level--; + continue; + } + } + } + + break; + }//end if + + if ($tokens[$i]['code'] !== T_DOUBLE_COLON + && $tokens[$i]['code'] !== T_EXTENDS + && $tokens[$i]['code'] !== T_IMPLEMENTS + ) { + continue; + } + + switch ($tokens[$i]['code']) { + case T_DOUBLE_COLON: + $usedName = strtolower($tokens[($i - 1)]['content']); + if ($usedName === $systemName) { + // The included system was used, so it is fine. + return; + } + break; + case T_EXTENDS: + $classNameToken = $phpcsFile->findNext(T_STRING, ($i + 1)); + $className = strtolower($tokens[$classNameToken]['content']); + if ($className === $systemName) { + // The included system was used, so it is fine. + return; + } + break; + case T_IMPLEMENTS: + $endImplements = $phpcsFile->findNext([T_EXTENDS, T_OPEN_CURLY_BRACKET], ($i + 1)); + for ($x = ($i + 1); $x < $endImplements; $x++) { + if ($tokens[$x]['code'] === T_STRING) { + $className = strtolower($tokens[$x]['content']); + if ($className === $systemName) { + // The included system was used, so it is fine. + return; + } + } + } + break; + }//end switch + }//end for + + // If we get to here, the system was not use. + $error = 'Included system "%s" is never used'; + $data = [$systemName]; + $phpcsFile->addError($error, $stackPtr, 'Found', $data); + + }//end process() + + +}//end class diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/MySource/Sniffs/Commenting/FunctionCommentSniff.php b/vendor/squizlabs/php_codesniffer/src/Standards/MySource/Sniffs/Commenting/FunctionCommentSniff.php new file mode 100644 index 00000000..fd75bcb2 --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/MySource/Sniffs/Commenting/FunctionCommentSniff.php @@ -0,0 +1,84 @@ + + * @copyright 2006-2015 Squiz Pty Ltd (ABN 77 084 670 600) + * @license https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence + */ + +namespace PHP_CodeSniffer\Standards\MySource\Sniffs\Commenting; + +use PHP_CodeSniffer\Standards\Squiz\Sniffs\Commenting\FunctionCommentSniff as SquizFunctionCommentSniff; +use PHP_CodeSniffer\Util\Tokens; +use PHP_CodeSniffer\Files\File; + +class FunctionCommentSniff extends SquizFunctionCommentSniff +{ + + + /** + * Processes this test, when one of its tokens is encountered. + * + * @param \PHP_CodeSniffer\Files\File $phpcsFile The file being scanned. + * @param int $stackPtr The position of the current token + * in the stack passed in $tokens. + * + * @return void + */ + public function process(File $phpcsFile, $stackPtr) + { + parent::process($phpcsFile, $stackPtr); + + $tokens = $phpcsFile->getTokens(); + $find = Tokens::$methodPrefixes; + $find[] = T_WHITESPACE; + + $commentEnd = $phpcsFile->findPrevious($find, ($stackPtr - 1), null, true); + if ($tokens[$commentEnd]['code'] !== T_DOC_COMMENT_CLOSE_TAG) { + return; + } + + $commentStart = $tokens[$commentEnd]['comment_opener']; + $hasApiTag = false; + foreach ($tokens[$commentStart]['comment_tags'] as $tag) { + if ($tokens[$tag]['content'] === '@api') { + if ($hasApiTag === true) { + // We've come across an API tag already, which means + // we were not the first tag in the API list. + $error = 'The @api tag must come first in the @api tag list in a function comment'; + $phpcsFile->addError($error, $tag, 'ApiNotFirst'); + } + + $hasApiTag = true; + + // There needs to be a blank line before the @api tag. + $prev = $phpcsFile->findPrevious([T_DOC_COMMENT_STRING, T_DOC_COMMENT_TAG], ($tag - 1)); + if ($tokens[$prev]['line'] !== ($tokens[$tag]['line'] - 2)) { + $error = 'There must be one blank line before the @api tag in a function comment'; + $phpcsFile->addError($error, $tag, 'ApiSpacing'); + } + } else if (substr($tokens[$tag]['content'], 0, 5) === '@api-') { + $hasApiTag = true; + + $prev = $phpcsFile->findPrevious([T_DOC_COMMENT_STRING, T_DOC_COMMENT_TAG], ($tag - 1)); + if ($tokens[$prev]['line'] !== ($tokens[$tag]['line'] - 1)) { + $error = 'There must be no blank line before the @%s tag in a function comment'; + $data = [$tokens[$tag]['content']]; + $phpcsFile->addError($error, $tag, 'ApiTagSpacing', $data); + } + }//end if + }//end foreach + + if ($hasApiTag === true && substr($tokens[$tag]['content'], 0, 4) !== '@api') { + // API tags must be the last tags in a function comment. + $error = 'The @api tags must be the last tags in a function comment'; + $phpcsFile->addError($error, $commentEnd, 'ApiNotLast'); + } + + }//end process() + + +}//end class diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/MySource/Sniffs/Debug/DebugCodeSniff.php b/vendor/squizlabs/php_codesniffer/src/Standards/MySource/Sniffs/Debug/DebugCodeSniff.php new file mode 100644 index 00000000..eccf6fe4 --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/MySource/Sniffs/Debug/DebugCodeSniff.php @@ -0,0 +1,55 @@ + + * @copyright 2006-2015 Squiz Pty Ltd (ABN 77 084 670 600) + * @license https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence + */ + +namespace PHP_CodeSniffer\Standards\MySource\Sniffs\Debug; + +use PHP_CodeSniffer\Sniffs\Sniff; +use PHP_CodeSniffer\Files\File; + +class DebugCodeSniff implements Sniff +{ + + + /** + * Returns an array of tokens this test wants to listen for. + * + * @return array + */ + public function register() + { + return [T_DOUBLE_COLON]; + + }//end register() + + + /** + * Processes this sniff, when one of its tokens is encountered. + * + * @param \PHP_CodeSniffer\Files\File $phpcsFile The file being scanned. + * @param int $stackPtr The position of the current token in + * the stack passed in $tokens. + * + * @return void + */ + public function process(File $phpcsFile, $stackPtr) + { + $tokens = $phpcsFile->getTokens(); + + $className = $phpcsFile->findPrevious(T_WHITESPACE, ($stackPtr - 1), null, true); + if (strtolower($tokens[$className]['content']) === 'debug') { + $method = $phpcsFile->findNext(T_WHITESPACE, ($stackPtr + 1), null, true); + $error = 'Call to debug function Debug::%s() must be removed'; + $data = [$tokens[$method]['content']]; + $phpcsFile->addError($error, $stackPtr, 'Found', $data); + } + + }//end process() + + +}//end class diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/MySource/Sniffs/Debug/FirebugConsoleSniff.php b/vendor/squizlabs/php_codesniffer/src/Standards/MySource/Sniffs/Debug/FirebugConsoleSniff.php new file mode 100644 index 00000000..3115bac4 --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/MySource/Sniffs/Debug/FirebugConsoleSniff.php @@ -0,0 +1,64 @@ + + * @copyright 2006-2015 Squiz Pty Ltd (ABN 77 084 670 600) + * @license https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence + */ + +namespace PHP_CodeSniffer\Standards\MySource\Sniffs\Debug; + +use PHP_CodeSniffer\Sniffs\Sniff; +use PHP_CodeSniffer\Files\File; + +class FirebugConsoleSniff implements Sniff +{ + + /** + * A list of tokenizers this sniff supports. + * + * @var array + */ + public $supportedTokenizers = ['JS']; + + + /** + * Returns an array of tokens this test wants to listen for. + * + * @return array + */ + public function register() + { + return [ + T_STRING, + T_PROPERTY, + T_LABEL, + T_OBJECT, + ]; + + }//end register() + + + /** + * Processes this test, when one of its tokens is encountered. + * + * @param \PHP_CodeSniffer\Files\File $phpcsFile The file being scanned. + * @param int $stackPtr The position of the current token + * in the stack passed in $tokens. + * + * @return void + */ + public function process(File $phpcsFile, $stackPtr) + { + $tokens = $phpcsFile->getTokens(); + + if (strtolower($tokens[$stackPtr]['content']) === 'console') { + $error = 'Variables, functions and labels must not be named "console"; name may conflict with Firebug internal variable'; + $phpcsFile->addError($error, $stackPtr, 'ConflictFound'); + } + + }//end process() + + +}//end class diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/MySource/Sniffs/Objects/AssignThisSniff.php b/vendor/squizlabs/php_codesniffer/src/Standards/MySource/Sniffs/Objects/AssignThisSniff.php new file mode 100644 index 00000000..0a3c9cf2 --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/MySource/Sniffs/Objects/AssignThisSniff.php @@ -0,0 +1,81 @@ + + * @copyright 2006-2015 Squiz Pty Ltd (ABN 77 084 670 600) + * @license https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence + */ + +namespace PHP_CodeSniffer\Standards\MySource\Sniffs\Objects; + +use PHP_CodeSniffer\Sniffs\Sniff; +use PHP_CodeSniffer\Files\File; + +class AssignThisSniff implements Sniff +{ + + /** + * A list of tokenizers this sniff supports. + * + * @var array + */ + public $supportedTokenizers = ['JS']; + + + /** + * Returns an array of tokens this test wants to listen for. + * + * @return array + */ + public function register() + { + return [T_THIS]; + + }//end register() + + + /** + * Processes this test, when one of its tokens is encountered. + * + * @param \PHP_CodeSniffer\Files\File $phpcsFile The file being scanned. + * @param int $stackPtr The position of the current token + * in the stack passed in $tokens. + * + * @return void + */ + public function process(File $phpcsFile, $stackPtr) + { + $tokens = $phpcsFile->getTokens(); + + // Ignore this.something and other uses of "this" that are not + // direct assignments. + $next = $phpcsFile->findNext(T_WHITESPACE, ($stackPtr + 1), null, true); + if ($tokens[$next]['code'] !== T_SEMICOLON) { + if ($tokens[$next]['line'] === $tokens[$stackPtr]['line']) { + return; + } + } + + // Something must be assigned to "this". + $prev = $phpcsFile->findPrevious(T_WHITESPACE, ($stackPtr - 1), null, true); + if ($tokens[$prev]['code'] !== T_EQUAL) { + return; + } + + // A variable needs to be assigned to "this". + $prev = $phpcsFile->findPrevious(T_WHITESPACE, ($prev - 1), null, true); + if ($tokens[$prev]['code'] !== T_STRING) { + return; + } + + // We can only assign "this" to a var called "self". + if ($tokens[$prev]['content'] !== 'self' && $tokens[$prev]['content'] !== '_self') { + $error = 'Keyword "this" can only be assigned to a variable called "self" or "_self"'; + $phpcsFile->addError($error, $prev, 'NotSelf'); + } + + }//end process() + + +}//end class diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/MySource/Sniffs/Objects/CreateWidgetTypeCallbackSniff.php b/vendor/squizlabs/php_codesniffer/src/Standards/MySource/Sniffs/Objects/CreateWidgetTypeCallbackSniff.php new file mode 100644 index 00000000..8fb89376 --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/MySource/Sniffs/Objects/CreateWidgetTypeCallbackSniff.php @@ -0,0 +1,218 @@ + + * @copyright 2006-2015 Squiz Pty Ltd (ABN 77 084 670 600) + * @license https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence + */ + +namespace PHP_CodeSniffer\Standards\MySource\Sniffs\Objects; + +use PHP_CodeSniffer\Sniffs\Sniff; +use PHP_CodeSniffer\Files\File; +use PHP_CodeSniffer\Util\Tokens; + +class CreateWidgetTypeCallbackSniff implements Sniff +{ + + /** + * A list of tokenizers this sniff supports. + * + * @var array + */ + public $supportedTokenizers = ['JS']; + + + /** + * Returns an array of tokens this test wants to listen for. + * + * @return array + */ + public function register() + { + return [T_OBJECT]; + + }//end register() + + + /** + * Processes this test, when one of its tokens is encountered. + * + * @param \PHP_CodeSniffer\Files\File $phpcsFile The file being scanned. + * @param int $stackPtr The position of the current token + * in the stack passed in $tokens. + * + * @return void + */ + public function process(File $phpcsFile, $stackPtr) + { + $tokens = $phpcsFile->getTokens(); + + $className = $phpcsFile->findPrevious(T_STRING, ($stackPtr - 1)); + if (substr(strtolower($tokens[$className]['content']), -10) !== 'widgettype') { + return; + } + + // Search for a create method. + $create = $phpcsFile->findNext(T_PROPERTY, $stackPtr, $tokens[$stackPtr]['bracket_closer'], null, 'create'); + if ($create === false) { + return; + } + + $function = $phpcsFile->findNext([T_WHITESPACE, T_COLON], ($create + 1), null, true); + if ($tokens[$function]['code'] !== T_FUNCTION + && $tokens[$function]['code'] !== T_CLOSURE + ) { + return; + } + + $start = ($tokens[$function]['scope_opener'] + 1); + $end = ($tokens[$function]['scope_closer'] - 1); + + // Check that the first argument is called "callback". + $arg = $phpcsFile->findNext(T_WHITESPACE, ($tokens[$function]['parenthesis_opener'] + 1), null, true); + if ($tokens[$arg]['content'] !== 'callback') { + $error = 'The first argument of the create() method of a widget type must be called "callback"'; + $phpcsFile->addError($error, $arg, 'FirstArgNotCallback'); + } + + /* + Look for return statements within the function. They cannot return + anything and must be preceded by the callback.call() line. The + callback itself must contain "self" or "this" as the first argument + and there needs to be a call to the callback function somewhere + in the create method. All calls to the callback function must be + followed by a return statement or the end of the method. + */ + + $foundCallback = false; + $passedCallback = false; + $nestedFunction = null; + for ($i = $start; $i <= $end; $i++) { + // Keep track of nested functions. + if ($nestedFunction !== null) { + if ($i === $nestedFunction) { + $nestedFunction = null; + continue; + } + } else if (($tokens[$i]['code'] === T_FUNCTION + || $tokens[$i]['code'] === T_CLOSURE) + && isset($tokens[$i]['scope_closer']) === true + ) { + $nestedFunction = $tokens[$i]['scope_closer']; + continue; + } + + if ($nestedFunction === null && $tokens[$i]['code'] === T_RETURN) { + // Make sure return statements are not returning anything. + if ($tokens[($i + 1)]['code'] !== T_SEMICOLON) { + $error = 'The create() method of a widget type must not return a value'; + $phpcsFile->addError($error, $i, 'ReturnValue'); + } + + continue; + } else if ($tokens[$i]['code'] !== T_STRING + || $tokens[$i]['content'] !== 'callback' + ) { + continue; + } + + // If this is the form "callback.call(" then it is a call + // to the callback function. + if ($tokens[($i + 1)]['code'] !== T_OBJECT_OPERATOR + || $tokens[($i + 2)]['content'] !== 'call' + || $tokens[($i + 3)]['code'] !== T_OPEN_PARENTHESIS + ) { + // One last chance; this might be the callback function + // being passed to another function, like this + // "this.init(something, callback, something)". + if (isset($tokens[$i]['nested_parenthesis']) === false) { + continue; + } + + // Just make sure those brackets don't belong to anyone, + // like an IF or FOR statement. + foreach ($tokens[$i]['nested_parenthesis'] as $bracket) { + if (isset($tokens[$bracket]['parenthesis_owner']) === true) { + continue(2); + } + } + + // Note that we use this endBracket down further when checking + // for a RETURN statement. + $nestedParens = $tokens[$i]['nested_parenthesis']; + $endBracket = end($nestedParens); + $bracket = key($nestedParens); + + $prev = $phpcsFile->findPrevious( + Tokens::$emptyTokens, + ($bracket - 1), + null, + true + ); + + if ($tokens[$prev]['code'] !== T_STRING) { + // This is not a function passing the callback. + continue; + } + + $passedCallback = true; + }//end if + + $foundCallback = true; + + if ($passedCallback === false) { + // The first argument must be "this" or "self". + $arg = $phpcsFile->findNext(T_WHITESPACE, ($i + 4), null, true); + if ($tokens[$arg]['content'] !== 'this' + && $tokens[$arg]['content'] !== 'self' + ) { + $error = 'The first argument passed to the callback function must be "this" or "self"'; + $phpcsFile->addError($error, $arg, 'FirstArgNotSelf'); + } + } + + // Now it must be followed by a return statement or the end of the function. + if ($passedCallback === false) { + $endBracket = $tokens[($i + 3)]['parenthesis_closer']; + } + + for ($next = $endBracket; $next <= $end; $next++) { + // Skip whitespace so we find the next content after the call. + if (isset(Tokens::$emptyTokens[$tokens[$next]['code']]) === true) { + continue; + } + + // Skip closing braces like END IF because it is not executable code. + if ($tokens[$next]['code'] === T_CLOSE_CURLY_BRACKET) { + continue; + } + + // We don't care about anything on the current line, like a + // semicolon. It doesn't matter if there are other statements on the + // line because another sniff will check for those. + if ($tokens[$next]['line'] === $tokens[$endBracket]['line']) { + continue; + } + + break; + } + + if ($next !== $tokens[$function]['scope_closer'] + && $tokens[$next]['code'] !== T_RETURN + ) { + $error = 'The call to the callback function must be followed by a return statement if it is not the last statement in the create() method'; + $phpcsFile->addError($error, $i, 'NoReturn'); + } + }//end for + + if ($foundCallback === false) { + $error = 'The create() method of a widget type must call the callback function'; + $phpcsFile->addError($error, $create, 'CallbackNotCalled'); + } + + }//end process() + + +}//end class diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/MySource/Sniffs/Objects/DisallowNewWidgetSniff.php b/vendor/squizlabs/php_codesniffer/src/Standards/MySource/Sniffs/Objects/DisallowNewWidgetSniff.php new file mode 100644 index 00000000..cae7c08d --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/MySource/Sniffs/Objects/DisallowNewWidgetSniff.php @@ -0,0 +1,59 @@ + + * @copyright 2006-2015 Squiz Pty Ltd (ABN 77 084 670 600) + * @license https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence + */ + +namespace PHP_CodeSniffer\Standards\MySource\Sniffs\Objects; + +use PHP_CodeSniffer\Sniffs\Sniff; +use PHP_CodeSniffer\Files\File; + +class DisallowNewWidgetSniff implements Sniff +{ + + + /** + * Returns an array of tokens this test wants to listen for. + * + * @return array + */ + public function register() + { + return [T_NEW]; + + }//end register() + + + /** + * Processes this test, when one of its tokens is encountered. + * + * @param \PHP_CodeSniffer\Files\File $phpcsFile The file being scanned. + * @param int $stackPtr The position of the current token + * in the stack passed in $tokens. + * + * @return void + */ + public function process(File $phpcsFile, $stackPtr) + { + $tokens = $phpcsFile->getTokens(); + + $className = $phpcsFile->findNext(T_WHITESPACE, ($stackPtr + 1), null, true); + if ($tokens[$className]['code'] !== T_STRING) { + return; + } + + if (substr(strtolower($tokens[$className]['content']), -10) === 'widgettype') { + $widgetType = substr($tokens[$className]['content'], 0, -10); + $error = 'Manual creation of widget objects is banned; use Widget::getWidget(\'%s\'); instead'; + $data = [$widgetType]; + $phpcsFile->addError($error, $stackPtr, 'Found', $data); + } + + }//end process() + + +}//end class diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/MySource/Sniffs/PHP/AjaxNullComparisonSniff.php b/vendor/squizlabs/php_codesniffer/src/Standards/MySource/Sniffs/PHP/AjaxNullComparisonSniff.php new file mode 100644 index 00000000..3914b7b8 --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/MySource/Sniffs/PHP/AjaxNullComparisonSniff.php @@ -0,0 +1,103 @@ + + * @copyright 2006-2015 Squiz Pty Ltd (ABN 77 084 670 600) + * @license https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence + */ + +namespace PHP_CodeSniffer\Standards\MySource\Sniffs\PHP; + +use PHP_CodeSniffer\Sniffs\Sniff; +use PHP_CodeSniffer\Files\File; + +class AjaxNullComparisonSniff implements Sniff +{ + + + /** + * Returns an array of tokens this test wants to listen for. + * + * @return array + */ + public function register() + { + return [T_FUNCTION]; + + }//end register() + + + /** + * Processes this sniff, when one of its tokens is encountered. + * + * @param \PHP_CodeSniffer\Files\File $phpcsFile The file being scanned. + * @param int $stackPtr The position of the current token in + * the stack passed in $tokens. + * + * @return void + */ + public function process(File $phpcsFile, $stackPtr) + { + $tokens = $phpcsFile->getTokens(); + + // Make sure it is an API function. We know this by the doc comment. + $commentEnd = $phpcsFile->findPrevious(T_DOC_COMMENT_CLOSE_TAG, $stackPtr); + $commentStart = $phpcsFile->findPrevious(T_DOC_COMMENT_OPEN_TAG, ($commentEnd - 1)); + // If function doesn't contain any doc comments - skip it. + if ($commentEnd === false || $commentStart === false) { + return; + } + + $comment = $phpcsFile->getTokensAsString($commentStart, ($commentEnd - $commentStart)); + if (strpos($comment, '* @api') === false) { + return; + } + + // Find all the vars passed in as we are only interested in comparisons + // to NULL for these specific variables. + $foundVars = []; + $open = $tokens[$stackPtr]['parenthesis_opener']; + $close = $tokens[$stackPtr]['parenthesis_closer']; + for ($i = ($open + 1); $i < $close; $i++) { + if ($tokens[$i]['code'] === T_VARIABLE) { + $foundVars[$tokens[$i]['content']] = true; + } + } + + if (empty($foundVars) === true) { + return; + } + + $start = $tokens[$stackPtr]['scope_opener']; + $end = $tokens[$stackPtr]['scope_closer']; + for ($i = ($start + 1); $i < $end; $i++) { + if ($tokens[$i]['code'] !== T_VARIABLE + || isset($foundVars[$tokens[$i]['content']]) === false + ) { + continue; + } + + $operator = $phpcsFile->findNext(T_WHITESPACE, ($i + 1), null, true); + if ($tokens[$operator]['code'] !== T_IS_IDENTICAL + && $tokens[$operator]['code'] !== T_IS_NOT_IDENTICAL + ) { + continue; + } + + $nullValue = $phpcsFile->findNext(T_WHITESPACE, ($operator + 1), null, true); + if ($tokens[$nullValue]['code'] !== T_NULL) { + continue; + } + + $error = 'Values submitted via Ajax requests should not be compared directly to NULL; use empty() instead'; + $phpcsFile->addWarning($error, $nullValue, 'Found'); + }//end for + + }//end process() + + +}//end class diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/MySource/Sniffs/PHP/EvalObjectFactorySniff.php b/vendor/squizlabs/php_codesniffer/src/Standards/MySource/Sniffs/PHP/EvalObjectFactorySniff.php new file mode 100644 index 00000000..67b35723 --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/MySource/Sniffs/PHP/EvalObjectFactorySniff.php @@ -0,0 +1,114 @@ + + * @copyright 2006-2015 Squiz Pty Ltd (ABN 77 084 670 600) + * @license https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence + */ + +namespace PHP_CodeSniffer\Standards\MySource\Sniffs\PHP; + +use PHP_CodeSniffer\Sniffs\Sniff; +use PHP_CodeSniffer\Files\File; +use PHP_CodeSniffer\Util\Tokens; + +class EvalObjectFactorySniff implements Sniff +{ + + + /** + * Returns an array of tokens this test wants to listen for. + * + * @return array + */ + public function register() + { + return [T_EVAL]; + + }//end register() + + + /** + * Processes this sniff, when one of its tokens is encountered. + * + * @param \PHP_CodeSniffer\Files\File $phpcsFile The file being scanned. + * @param int $stackPtr The position of the current token in + * the stack passed in $tokens. + * + * @return void + */ + public function process(File $phpcsFile, $stackPtr) + { + $tokens = $phpcsFile->getTokens(); + + /* + We need to find all strings that will be in the eval + to determine if the "new" keyword is being used. + */ + + $openBracket = $phpcsFile->findNext(T_OPEN_PARENTHESIS, ($stackPtr + 1)); + $closeBracket = $tokens[$openBracket]['parenthesis_closer']; + + $strings = []; + $vars = []; + + for ($i = ($openBracket + 1); $i < $closeBracket; $i++) { + if (isset(Tokens::$stringTokens[$tokens[$i]['code']]) === true) { + $strings[$i] = $tokens[$i]['content']; + } else if ($tokens[$i]['code'] === T_VARIABLE) { + $vars[$i] = $tokens[$i]['content']; + } + } + + /* + We now have some variables that we need to expand into + the strings that were assigned to them, if any. + */ + + foreach ($vars as $varPtr => $varName) { + while (($prev = $phpcsFile->findPrevious(T_VARIABLE, ($varPtr - 1))) !== false) { + // Make sure this is an assignment of the variable. That means + // it will be the first thing on the line. + $prevContent = $phpcsFile->findPrevious(T_WHITESPACE, ($prev - 1), null, true); + if ($tokens[$prevContent]['line'] === $tokens[$prev]['line']) { + $varPtr = $prevContent; + continue; + } + + if ($tokens[$prev]['content'] !== $varName) { + // This variable has a different name. + $varPtr = $prevContent; + continue; + } + + // We found one. + break; + }//end while + + if ($prev !== false) { + // Find all strings on the line. + $lineEnd = $phpcsFile->findNext(T_SEMICOLON, ($prev + 1)); + for ($i = ($prev + 1); $i < $lineEnd; $i++) { + if (isset(Tokens::$stringTokens[$tokens[$i]['code']]) === true) { + $strings[$i] = $tokens[$i]['content']; + } + } + } + }//end foreach + + foreach ($strings as $string) { + // If the string has "new" in it, it is not allowed. + // We don't bother checking if the word "new" is printed to screen + // because that is unlikely to happen. We assume the use + // of "new" is for object instantiation. + if (strstr($string, ' new ') !== false) { + $error = 'Do not use eval() to create objects dynamically; use reflection instead'; + $phpcsFile->addWarning($error, $stackPtr, 'Found'); + } + } + + }//end process() + + +}//end class diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/MySource/Sniffs/PHP/GetRequestDataSniff.php b/vendor/squizlabs/php_codesniffer/src/Standards/MySource/Sniffs/PHP/GetRequestDataSniff.php new file mode 100644 index 00000000..82419fcb --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/MySource/Sniffs/PHP/GetRequestDataSniff.php @@ -0,0 +1,106 @@ + + * @copyright 2006-2015 Squiz Pty Ltd (ABN 77 084 670 600) + * @license https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence + */ + +namespace PHP_CodeSniffer\Standards\MySource\Sniffs\PHP; + +use PHP_CodeSniffer\Sniffs\Sniff; +use PHP_CodeSniffer\Files\File; + +class GetRequestDataSniff implements Sniff +{ + + + /** + * Returns an array of tokens this test wants to listen for. + * + * @return array + */ + public function register() + { + return [T_VARIABLE]; + + }//end register() + + + /** + * Processes this sniff, when one of its tokens is encountered. + * + * @param \PHP_CodeSniffer\Files\File $phpcsFile The file being scanned. + * @param int $stackPtr The position of the current token in + * the stack passed in $tokens. + * + * @return void + */ + public function process(File $phpcsFile, $stackPtr) + { + $tokens = $phpcsFile->getTokens(); + + $varName = $tokens[$stackPtr]['content']; + if ($varName !== '$_REQUEST' + && $varName !== '$_GET' + && $varName !== '$_POST' + && $varName !== '$_FILES' + ) { + return; + } + + // The only place these super globals can be accessed directly is + // in the getRequestData() method of the Security class. + $inClass = false; + foreach ($tokens[$stackPtr]['conditions'] as $i => $type) { + if ($tokens[$i]['code'] === T_CLASS) { + $className = $phpcsFile->findNext(T_STRING, $i); + $className = $tokens[$className]['content']; + if (strtolower($className) === 'security') { + $inClass = true; + } else { + // We don't have nested classes. + break; + } + } else if ($inClass === true && $tokens[$i]['code'] === T_FUNCTION) { + $funcName = $phpcsFile->findNext(T_STRING, $i); + $funcName = $tokens[$funcName]['content']; + if (strtolower($funcName) === 'getrequestdata') { + // This is valid. + return; + } else { + // We don't have nested functions. + break; + } + }//end if + }//end foreach + + // If we get to here, the super global was used incorrectly. + // First find out how it is being used. + $globalName = strtolower(substr($varName, 2)); + $usedVar = ''; + + $openBracket = $phpcsFile->findNext(T_WHITESPACE, ($stackPtr + 1), null, true); + if ($tokens[$openBracket]['code'] === T_OPEN_SQUARE_BRACKET) { + $closeBracket = $tokens[$openBracket]['bracket_closer']; + $usedVar = $phpcsFile->getTokensAsString(($openBracket + 1), ($closeBracket - $openBracket - 1)); + } + + $type = 'SuperglobalAccessed'; + $error = 'The %s super global must not be accessed directly; use Security::getRequestData('; + $data = [$varName]; + if ($usedVar !== '') { + $type .= 'WithVar'; + $error .= '%s, \'%s\''; + $data[] = $usedVar; + $data[] = $globalName; + } + + $error .= ') instead'; + $phpcsFile->addError($error, $stackPtr, $type, $data); + + }//end process() + + +}//end class diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/MySource/Sniffs/PHP/ReturnFunctionValueSniff.php b/vendor/squizlabs/php_codesniffer/src/Standards/MySource/Sniffs/PHP/ReturnFunctionValueSniff.php new file mode 100644 index 00000000..9b2029af --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/MySource/Sniffs/PHP/ReturnFunctionValueSniff.php @@ -0,0 +1,63 @@ + + * @copyright 2006-2015 Squiz Pty Ltd (ABN 77 084 670 600) + * @license https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence + */ + +namespace PHP_CodeSniffer\Standards\MySource\Sniffs\PHP; + +use PHP_CodeSniffer\Sniffs\Sniff; +use PHP_CodeSniffer\Files\File; + +class ReturnFunctionValueSniff implements Sniff +{ + + + /** + * Returns an array of tokens this test wants to listen for. + * + * @return array + */ + public function register() + { + return [T_RETURN]; + + }//end register() + + + /** + * Processes this sniff, when one of its tokens is encountered. + * + * @param \PHP_CodeSniffer\Files\File $phpcsFile The file being scanned. + * @param int $stackPtr The position of the current token in + * the stack passed in $tokens. + * + * @return void + */ + public function process(File $phpcsFile, $stackPtr) + { + $tokens = $phpcsFile->getTokens(); + + $functionName = $phpcsFile->findNext(T_STRING, ($stackPtr + 1), null, false, null, true); + + while ($functionName !== false) { + // Check if this is really a function. + $bracket = $phpcsFile->findNext(T_WHITESPACE, ($functionName + 1), null, true); + if ($tokens[$bracket]['code'] !== T_OPEN_PARENTHESIS) { + // Not a function call. + $functionName = $phpcsFile->findNext(T_STRING, ($functionName + 1), null, false, null, true); + continue; + } + + $error = 'The result of a function call should be assigned to a variable before being returned'; + $phpcsFile->addWarning($error, $stackPtr, 'NotAssigned'); + break; + } + + }//end process() + + +}//end class diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/MySource/Sniffs/Strings/JoinStringsSniff.php b/vendor/squizlabs/php_codesniffer/src/Standards/MySource/Sniffs/Strings/JoinStringsSniff.php new file mode 100644 index 00000000..311cf684 --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/MySource/Sniffs/Strings/JoinStringsSniff.php @@ -0,0 +1,76 @@ + + * @copyright 2006-2015 Squiz Pty Ltd (ABN 77 084 670 600) + * @license https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence + */ + +namespace PHP_CodeSniffer\Standards\MySource\Sniffs\Strings; + +use PHP_CodeSniffer\Sniffs\Sniff; +use PHP_CodeSniffer\Files\File; +use PHP_CodeSniffer\Util\Tokens; + +class JoinStringsSniff implements Sniff +{ + + /** + * A list of tokenizers this sniff supports. + * + * @var array + */ + public $supportedTokenizers = ['JS']; + + + /** + * Returns an array of tokens this test wants to listen for. + * + * @return array + */ + public function register() + { + return [T_STRING]; + + }//end register() + + + /** + * Processes this test, when one of its tokens is encountered. + * + * @param \PHP_CodeSniffer\Files\File $phpcsFile The file being scanned. + * @param integer $stackPtr The position of the current token + * in the stack passed in $tokens. + * + * @return void + */ + public function process(File $phpcsFile, $stackPtr) + { + $tokens = $phpcsFile->getTokens(); + + if ($tokens[$stackPtr]['content'] !== 'join') { + return; + } + + $prev = $phpcsFile->findPrevious(Tokens::$emptyTokens, ($stackPtr - 1), null, true); + if ($tokens[$prev]['code'] !== T_OBJECT_OPERATOR) { + return; + } + + $prev = $phpcsFile->findPrevious(Tokens::$emptyTokens, ($prev - 1), null, true); + if ($tokens[$prev]['code'] === T_CLOSE_SQUARE_BRACKET) { + $opener = $tokens[$prev]['bracket_opener']; + if ($tokens[($opener - 1)]['code'] !== T_STRING) { + // This means the array is declared inline, like x = [a,b,c].join() + // and not elsewhere, like x = y[a].join() + // The first is not allowed while the second is. + $error = 'Joining strings using inline arrays is not allowed; use the + operator instead'; + $phpcsFile->addError($error, $stackPtr, 'ArrayNotAllowed'); + } + } + + }//end process() + + +}//end class diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/MySource/Tests/CSS/BrowserSpecificStylesUnitTest.css b/vendor/squizlabs/php_codesniffer/src/Standards/MySource/Tests/CSS/BrowserSpecificStylesUnitTest.css new file mode 100644 index 00000000..339ee154 --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/MySource/Tests/CSS/BrowserSpecificStylesUnitTest.css @@ -0,0 +1,13 @@ +.SettingsTabPaneWidgetType-tab-mid { + background: transparent url(tab_inact_mid.png) repeat-x; + line-height: -25px; + cursor: pointer; + -moz-user-select: none; +} + +.AssetLineageWidgetType-item { + float: left; + list-style: none; + height: 22px; + cursor: pointer; +} diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/MySource/Tests/CSS/BrowserSpecificStylesUnitTest.php b/vendor/squizlabs/php_codesniffer/src/Standards/MySource/Tests/CSS/BrowserSpecificStylesUnitTest.php new file mode 100644 index 00000000..21353499 --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/MySource/Tests/CSS/BrowserSpecificStylesUnitTest.php @@ -0,0 +1,48 @@ + + * @copyright 2006-2015 Squiz Pty Ltd (ABN 77 084 670 600) + * @license https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence + */ + +namespace PHP_CodeSniffer\Standards\MySource\Tests\CSS; + +use PHP_CodeSniffer\Tests\Standards\AbstractSniffUnitTest; + +class BrowserSpecificStylesUnitTest extends AbstractSniffUnitTest +{ + + + /** + * Returns the lines where errors should occur. + * + * The key of the array should represent the line number and the value + * should represent the number of errors that should occur on that line. + * + * @return array + */ + public function getErrorList() + { + return [5 => 1]; + + }//end getErrorList() + + + /** + * Returns the lines where warnings should occur. + * + * The key of the array should represent the line number and the value + * should represent the number of warnings that should occur on that line. + * + * @return array + */ + public function getWarningList() + { + return []; + + }//end getWarningList() + + +}//end class diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/MySource/Tests/Channels/DisallowSelfActionsUnitTest.inc b/vendor/squizlabs/php_codesniffer/src/Standards/MySource/Tests/Channels/DisallowSelfActionsUnitTest.inc new file mode 100644 index 00000000..95fd04b7 --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/MySource/Tests/Channels/DisallowSelfActionsUnitTest.inc @@ -0,0 +1,51 @@ + diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/MySource/Tests/Channels/DisallowSelfActionsUnitTest.php b/vendor/squizlabs/php_codesniffer/src/Standards/MySource/Tests/Channels/DisallowSelfActionsUnitTest.php new file mode 100644 index 00000000..d29bf5c6 --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/MySource/Tests/Channels/DisallowSelfActionsUnitTest.php @@ -0,0 +1,53 @@ + + * @copyright 2006-2015 Squiz Pty Ltd (ABN 77 084 670 600) + * @license https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence + */ + +namespace PHP_CodeSniffer\Standards\MySource\Tests\Channels; + +use PHP_CodeSniffer\Tests\Standards\AbstractSniffUnitTest; + +class DisallowSelfActionsUnitTest extends AbstractSniffUnitTest +{ + + + /** + * Returns the lines where errors should occur. + * + * The key of the array should represent the line number and the value + * should represent the number of errors that should occur on that line. + * + * @return array + */ + public function getErrorList() + { + return [ + 12 => 1, + 13 => 1, + 28 => 1, + 29 => 1, + ]; + + }//end getErrorList() + + + /** + * Returns the lines where warnings should occur. + * + * The key of the array should represent the line number and the value + * should represent the number of warnings that should occur on that line. + * + * @return array + */ + public function getWarningList() + { + return []; + + }//end getWarningList() + + +}//end class diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/MySource/Tests/Channels/IncludeSystemUnitTest.inc b/vendor/squizlabs/php_codesniffer/src/Standards/MySource/Tests/Channels/IncludeSystemUnitTest.inc new file mode 100644 index 00000000..ccb0273e --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/MySource/Tests/Channels/IncludeSystemUnitTest.inc @@ -0,0 +1,112 @@ +fetch(PDO::FETCH_NUM) +BaseSystem::getDataDir(); +Util::getArrayIndex(array(), ''); + + +Channels::includeSystem('Widget'); +Widget::includeWidget('AbstractContainer'); +class MyWidget extends AbstractContainerWidgetType {} +class MyOtherWidget extends BookWidgetType {} + +$zip = new ZipArchive(); +$res = $zip->open($path, ZipArchive::CREATE); + +class AssetListingUnitTest extends AbstractMySourceUnitTest +{ + function setUp() { + parent::setUp(); + Channels::includeSystem('MySystem2'); + include_once 'Libs/FileSystem.inc'; + } + + function two() { + $siteid = MySystem2::getCurrentSiteId(); + $parserFiles = FileSystem::listDirectory(); + } + + function three() { + $siteid = MySystem3::getCurrentSiteId(); + $parserFiles = FileSystem::listDirectory(); + } +} + +if (Channels::systemExists('Log') === TRUE) { + Channels::includeSystem('Log'); +} else { + return; +} + +Log::addProjectLog('metadata.field.update', $msg); + +function two() { + Widget::includeWidget('CacheAdminScreen'); + $barChart = CacheAdminScreenWidgetType::constructBarchart($data); +} + +$adjustDialog->setOrientation(AbstractWidgetWidgetType::CENTER); + +$className = 'SquizPerspective'.ucfirst($property['type']).'PropertyType'; +Channels::includeSystem($className); +$className::setValue($assetid, $propertyid, $perspectives, $value, (array) $property['settings']); +?> diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/MySource/Tests/Channels/IncludeSystemUnitTest.php b/vendor/squizlabs/php_codesniffer/src/Standards/MySource/Tests/Channels/IncludeSystemUnitTest.php new file mode 100644 index 00000000..0320038e --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/MySource/Tests/Channels/IncludeSystemUnitTest.php @@ -0,0 +1,60 @@ + + * @copyright 2006-2015 Squiz Pty Ltd (ABN 77 084 670 600) + * @license https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence + */ + +namespace PHP_CodeSniffer\Standards\MySource\Tests\Channels; + +use PHP_CodeSniffer\Tests\Standards\AbstractSniffUnitTest; + +class IncludeSystemUnitTest extends AbstractSniffUnitTest +{ + + + /** + * Returns the lines where errors should occur. + * + * The key of the array should represent the line number and the value + * should represent the number of errors that should occur on that line. + * + * @return array + */ + public function getErrorList() + { + return [ + 9 => 1, + 14 => 1, + 24 => 1, + 27 => 1, + 28 => 1, + 31 => 1, + 36 => 1, + 41 => 1, + 61 => 1, + 70 => 1, + 89 => 1, + ]; + + }//end getErrorList() + + + /** + * Returns the lines where warnings should occur. + * + * The key of the array should represent the line number and the value + * should represent the number of warnings that should occur on that line. + * + * @return array + */ + public function getWarningList() + { + return []; + + }//end getWarningList() + + +}//end class diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/MySource/Tests/Channels/UnusedSystemUnitTest.inc b/vendor/squizlabs/php_codesniffer/src/Standards/MySource/Tests/Channels/UnusedSystemUnitTest.inc new file mode 100644 index 00000000..c7bd4738 --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/MySource/Tests/Channels/UnusedSystemUnitTest.inc @@ -0,0 +1,67 @@ + \ No newline at end of file diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/MySource/Tests/Channels/UnusedSystemUnitTest.php b/vendor/squizlabs/php_codesniffer/src/Standards/MySource/Tests/Channels/UnusedSystemUnitTest.php new file mode 100644 index 00000000..fbc0ac70 --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/MySource/Tests/Channels/UnusedSystemUnitTest.php @@ -0,0 +1,55 @@ + + * @copyright 2006-2015 Squiz Pty Ltd (ABN 77 084 670 600) + * @license https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence + */ + +namespace PHP_CodeSniffer\Standards\MySource\Tests\Channels; + +use PHP_CodeSniffer\Tests\Standards\AbstractSniffUnitTest; + +class UnusedSystemUnitTest extends AbstractSniffUnitTest +{ + + + /** + * Returns the lines where errors should occur. + * + * The key of the array should represent the line number and the value + * should represent the number of errors that should occur on that line. + * + * @return array + */ + public function getErrorList() + { + return [ + 2 => 1, + 5 => 1, + 8 => 1, + 24 => 1, + 34 => 1, + 54 => 1, + ]; + + }//end getErrorList() + + + /** + * Returns the lines where warnings should occur. + * + * The key of the array should represent the line number and the value + * should represent the number of warnings that should occur on that line. + * + * @return array + */ + public function getWarningList() + { + return []; + + }//end getWarningList() + + +}//end class diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/MySource/Tests/Commenting/FunctionCommentUnitTest.inc b/vendor/squizlabs/php_codesniffer/src/Standards/MySource/Tests/Commenting/FunctionCommentUnitTest.inc new file mode 100644 index 00000000..19d5c5d4 --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/MySource/Tests/Commenting/FunctionCommentUnitTest.inc @@ -0,0 +1,101 @@ + diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/MySource/Tests/Commenting/FunctionCommentUnitTest.php b/vendor/squizlabs/php_codesniffer/src/Standards/MySource/Tests/Commenting/FunctionCommentUnitTest.php new file mode 100644 index 00000000..5cc43b64 --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/MySource/Tests/Commenting/FunctionCommentUnitTest.php @@ -0,0 +1,54 @@ + + * @copyright 2006-2015 Squiz Pty Ltd (ABN 77 084 670 600) + * @license https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence + */ + +namespace PHP_CodeSniffer\Standards\MySource\Tests\Commenting; + +use PHP_CodeSniffer\Tests\Standards\AbstractSniffUnitTest; + +class FunctionCommentUnitTest extends AbstractSniffUnitTest +{ + + + /** + * Returns the lines where errors should occur. + * + * The key of the array should represent the line number and the value + * should represent the number of errors that should occur on that line. + * + * @return array + */ + public function getErrorList() + { + return [ + 28 => 1, + 36 => 1, + 37 => 2, + 49 => 1, + 58 => 1, + ]; + + }//end getErrorList() + + + /** + * Returns the lines where warnings should occur. + * + * The key of the array should represent the line number and the value + * should represent the number of warnings that should occur on that line. + * + * @return array + */ + public function getWarningList() + { + return []; + + }//end getWarningList() + + +}//end class diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/MySource/Tests/Debug/DebugCodeUnitTest.inc b/vendor/squizlabs/php_codesniffer/src/Standards/MySource/Tests/Debug/DebugCodeUnitTest.inc new file mode 100644 index 00000000..34901610 --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/MySource/Tests/Debug/DebugCodeUnitTest.inc @@ -0,0 +1,4 @@ + diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/MySource/Tests/Debug/DebugCodeUnitTest.php b/vendor/squizlabs/php_codesniffer/src/Standards/MySource/Tests/Debug/DebugCodeUnitTest.php new file mode 100644 index 00000000..78da9c94 --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/MySource/Tests/Debug/DebugCodeUnitTest.php @@ -0,0 +1,51 @@ + + * @copyright 2006-2015 Squiz Pty Ltd (ABN 77 084 670 600) + * @license https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence + */ + +namespace PHP_CodeSniffer\Standards\MySource\Tests\Debug; + +use PHP_CodeSniffer\Tests\Standards\AbstractSniffUnitTest; + +class DebugCodeUnitTest extends AbstractSniffUnitTest +{ + + + /** + * Returns the lines where errors should occur. + * + * The key of the array should represent the line number and the value + * should represent the number of errors that should occur on that line. + * + * @return array + */ + public function getErrorList() + { + return [ + 2 => 1, + 3 => 1, + ]; + + }//end getErrorList() + + + /** + * Returns the lines where warnings should occur. + * + * The key of the array should represent the line number and the value + * should represent the number of warnings that should occur on that line. + * + * @return array + */ + public function getWarningList() + { + return []; + + }//end getWarningList() + + +}//end class diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/MySource/Tests/Debug/FirebugConsoleUnitTest.js b/vendor/squizlabs/php_codesniffer/src/Standards/MySource/Tests/Debug/FirebugConsoleUnitTest.js new file mode 100644 index 00000000..d5e3df57 --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/MySource/Tests/Debug/FirebugConsoleUnitTest.js @@ -0,0 +1,8 @@ +console.info(); +console.warn(); +console.test(); +con.sole(); +var console = { + console: 'string'; +}; +function console() {} \ No newline at end of file diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/MySource/Tests/Debug/FirebugConsoleUnitTest.php b/vendor/squizlabs/php_codesniffer/src/Standards/MySource/Tests/Debug/FirebugConsoleUnitTest.php new file mode 100644 index 00000000..3a9c2358 --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/MySource/Tests/Debug/FirebugConsoleUnitTest.php @@ -0,0 +1,61 @@ + + * @copyright 2006-2015 Squiz Pty Ltd (ABN 77 084 670 600) + * @license https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence + */ + +namespace PHP_CodeSniffer\Standards\MySource\Tests\Debug; + +use PHP_CodeSniffer\Tests\Standards\AbstractSniffUnitTest; + +class FirebugConsoleUnitTest extends AbstractSniffUnitTest +{ + + + /** + * Returns the lines where errors should occur. + * + * The key of the array should represent the line number and the value + * should represent the number of errors that should occur on that line. + * + * @param string $testFile The name of the file being tested. + * + * @return array + */ + public function getErrorList($testFile='FirebugConsoleUnitTest.js') + { + if ($testFile !== 'FirebugConsoleUnitTest.js') { + return []; + } + + return [ + 1 => 1, + 2 => 1, + 3 => 1, + 5 => 1, + 6 => 1, + 8 => 1, + ]; + + }//end getErrorList() + + + /** + * Returns the lines where warnings should occur. + * + * The key of the array should represent the line number and the value + * should represent the number of warnings that should occur on that line. + * + * @return array + */ + public function getWarningList() + { + return []; + + }//end getWarningList() + + +}//end class diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/MySource/Tests/Objects/AssignThisUnitTest.js b/vendor/squizlabs/php_codesniffer/src/Standards/MySource/Tests/Objects/AssignThisUnitTest.js new file mode 100644 index 00000000..747a1008 --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/MySource/Tests/Objects/AssignThisUnitTest.js @@ -0,0 +1,20 @@ +var self = this; +buttonWidget.addClickEvent(function() { + self.addDynamicSouce(); +}); + +var x = self; +var y = this; + +var test = ''; +if (true) { + test = this +} + +var itemid = this.items[i].getAttribute('itemid'); + +for (var x = this; y < 10; y++) { + var x = this + 1; +} + +var _self = this; \ No newline at end of file diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/MySource/Tests/Objects/AssignThisUnitTest.php b/vendor/squizlabs/php_codesniffer/src/Standards/MySource/Tests/Objects/AssignThisUnitTest.php new file mode 100644 index 00000000..f28dff19 --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/MySource/Tests/Objects/AssignThisUnitTest.php @@ -0,0 +1,58 @@ + + * @copyright 2006-2015 Squiz Pty Ltd (ABN 77 084 670 600) + * @license https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence + */ + +namespace PHP_CodeSniffer\Standards\MySource\Tests\Objects; + +use PHP_CodeSniffer\Tests\Standards\AbstractSniffUnitTest; + +class AssignThisUnitTest extends AbstractSniffUnitTest +{ + + + /** + * Returns the lines where errors should occur. + * + * The key of the array should represent the line number and the value + * should represent the number of errors that should occur on that line. + * + * @param string $testFile The name of the file being tested. + * + * @return array + */ + public function getErrorList($testFile='AssignThisUnitTest.js') + { + if ($testFile !== 'AssignThisUnitTest.js') { + return []; + } + + return [ + 7 => 1, + 11 => 1, + 16 => 1, + ]; + + }//end getErrorList() + + + /** + * Returns the lines where warnings should occur. + * + * The key of the array should represent the line number and the value + * should represent the number of warnings that should occur on that line. + * + * @return array + */ + public function getWarningList() + { + return []; + + }//end getWarningList() + + +}//end class diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/MySource/Tests/Objects/CreateWidgetTypeCallbackUnitTest.js b/vendor/squizlabs/php_codesniffer/src/Standards/MySource/Tests/Objects/CreateWidgetTypeCallbackUnitTest.js new file mode 100644 index 00000000..22822d32 --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/MySource/Tests/Objects/CreateWidgetTypeCallbackUnitTest.js @@ -0,0 +1,186 @@ +SampleWidgetType.prototype = { + + create: function(callback) + { + if (x === 1) { + return; + } + + if (y === 1) { + callback.call(this); + // A comment here to explain the return is okay. + return; + } + + if (a === 1) { + // Cant return value even after calling callback. + callback.call(this); + return something; + } + + if (a === 1) { + // Need to pass self or this to callback function. + callback.call(a); + } + + callback.call(self); + + var self = this; + this.createChildren(null, function() { + callback.call(self, div); + }); + + // Never good to return a value. + return something; + + callback.call(self); + } + +}; + +AnotherSampleWidgetType.prototype = { + + create: function(input) + { + return; + } + + getSomething: function(input) + { + return 1; + } + +}; + + +NoCreateWidgetType.prototype = { + + getSomething: function(input) + { + return; + } + +}; + + +SomeRandom.prototype = { + + create: function(input) + { + return; + } + +}; + +SampleWidgetType.prototype = { + + create: function(callback) + { + if (a === 1) { + // This is ok because it is the last statement, + // even though it is conditional. + callback.call(self); + } + + } + +}; + +SampleWidgetType.prototype = { + + create: function(callback) + { + var something = callback; + + } + +}; + +SampleWidgetType.prototype = { + + create: function(callback) + { + // Also valid because we are passing the callback to + // someone else to call. + if (y === 1) { + this.something(callback); + return; + } + + this.init(callback); + + } + +}; + +SampleWidgetType.prototype = { + + create: function(callback) + { + // Also valid because we are passing the callback to + // someone else to call. + if (y === 1) { + this.something(callback); + } + + this.init(callback); + + } + +}; + +SampleWidgetType.prototype = { + + create: function(callback) + { + if (a === 1) { + // This is ok because it is the last statement, + // even though it is conditional. + this.something(callback); + } + + } + +}; + + +SampleWidgetType.prototype = { + + create: function(callback) + { + if (dfx.isFn(callback) === true) { + callback.call(this, cont); + return; + } + } + +}; + + +SampleWidgetType.prototype = { + + create: function(callback) + { + dfx.foreach(items, function(item) { + return true; + }); + + if (dfx.isFn(callback) === true) { + callback.call(this); + } + } + +}; + +SampleWidgetType.prototype = { + + create: function(callback) + { + var self = this; + this.createChildren(null, function() { + callback.call(self, div); + return; + }); + } + +}; \ No newline at end of file diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/MySource/Tests/Objects/CreateWidgetTypeCallbackUnitTest.php b/vendor/squizlabs/php_codesniffer/src/Standards/MySource/Tests/Objects/CreateWidgetTypeCallbackUnitTest.php new file mode 100644 index 00000000..a3c55bf3 --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/MySource/Tests/Objects/CreateWidgetTypeCallbackUnitTest.php @@ -0,0 +1,59 @@ + + * @copyright 2006-2015 Squiz Pty Ltd (ABN 77 084 670 600) + * @license https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence + */ + +namespace PHP_CodeSniffer\Standards\MySource\Tests\Objects; + +use PHP_CodeSniffer\Tests\Standards\AbstractSniffUnitTest; + +class CreateWidgetTypeCallbackUnitTest extends AbstractSniffUnitTest +{ + + + /** + * Returns the lines where errors should occur. + * + * The key of the array should represent the line number and the value + * should represent the number of errors that should occur on that line. + * + * @param string $testFile The name of the file being tested. + * + * @return array + */ + public function getErrorList($testFile='CreateWidgetTypeCallbackUnitTest.js') + { + return [ + 18 => 1, + 23 => 2, + 26 => 1, + 30 => 1, + 34 => 1, + 43 => 2, + 91 => 1, + 123 => 1, + ]; + + }//end getErrorList() + + + /** + * Returns the lines where warnings should occur. + * + * The key of the array should represent the line number and the value + * should represent the number of warnings that should occur on that line. + * + * @return array + */ + public function getWarningList() + { + return []; + + }//end getWarningList() + + +}//end class diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/MySource/Tests/Objects/DisallowNewWidgetUnitTest.inc b/vendor/squizlabs/php_codesniffer/src/Standards/MySource/Tests/Objects/DisallowNewWidgetUnitTest.inc new file mode 100644 index 00000000..acf9baf7 --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/MySource/Tests/Objects/DisallowNewWidgetUnitTest.inc @@ -0,0 +1,6 @@ + diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/MySource/Tests/Objects/DisallowNewWidgetUnitTest.php b/vendor/squizlabs/php_codesniffer/src/Standards/MySource/Tests/Objects/DisallowNewWidgetUnitTest.php new file mode 100644 index 00000000..333952f6 --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/MySource/Tests/Objects/DisallowNewWidgetUnitTest.php @@ -0,0 +1,48 @@ + + * @copyright 2006-2015 Squiz Pty Ltd (ABN 77 084 670 600) + * @license https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence + */ + +namespace PHP_CodeSniffer\Standards\MySource\Tests\Objects; + +use PHP_CodeSniffer\Tests\Standards\AbstractSniffUnitTest; + +class DisallowNewWidgetUnitTest extends AbstractSniffUnitTest +{ + + + /** + * Returns the lines where errors should occur. + * + * The key of the array should represent the line number and the value + * should represent the number of errors that should occur on that line. + * + * @return array + */ + public function getErrorList() + { + return [4 => 1]; + + }//end getErrorList() + + + /** + * Returns the lines where warnings should occur. + * + * The key of the array should represent the line number and the value + * should represent the number of warnings that should occur on that line. + * + * @return array + */ + public function getWarningList() + { + return []; + + }//end getWarningList() + + +}//end class diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/MySource/Tests/PHP/AjaxNullComparisonUnitTest.inc b/vendor/squizlabs/php_codesniffer/src/Standards/MySource/Tests/PHP/AjaxNullComparisonUnitTest.inc new file mode 100644 index 00000000..337914a8 --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/MySource/Tests/PHP/AjaxNullComparisonUnitTest.inc @@ -0,0 +1,182 @@ +getMessage()); + }//end try + + if ($something === NULL) { + if ($bar !== NULL) { + } + } + + return $issueid; + +}//end addIssue() + +/** + * Adds a new issue. + * + * Returns the new issue id. + * + * @param string $title Title of the new issue. + * @param string $description The description of the issue. + * @param string $reporter Asset id of the reporter. + * @param integer $projectid Id of the project that the issue belongs to. + * @param array $tags Array of tags. + * @param string $status The status of the issue. + * @param string $assignedTo The asset id of the user that the issue is + * assigned to. + * @param string $reportedDate If set then this date will be used instead of the + * current date and time. + * @param integer $reportedMilestone Reported milestone. + * + * @return integer + * @throws ChannelException If there is an error. + * + */ +public static function addIssue( + $title, + $description, + $reporter=NULL, + $projectid=NULL, + array $tags=array(), + $status=NULL, + $assignedTo=NULL, + $reportedDate=NULL, + $reportedMilestone=NULL +) { + // Get current projectid if not specified. + if ($projectid === NULL) { + Channels::includeSystem('Project'); + $projectid = Project::getCurrentProjectId(); + Channels::modifyBasket('project', $projectid); + } + +}//end addIssue() diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/MySource/Tests/PHP/AjaxNullComparisonUnitTest.php b/vendor/squizlabs/php_codesniffer/src/Standards/MySource/Tests/PHP/AjaxNullComparisonUnitTest.php new file mode 100644 index 00000000..315808bd --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/MySource/Tests/PHP/AjaxNullComparisonUnitTest.php @@ -0,0 +1,55 @@ + + * @copyright 2006-2015 Squiz Pty Ltd (ABN 77 084 670 600) + * @license https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence + */ + +namespace PHP_CodeSniffer\Standards\MySource\Tests\PHP; + +use PHP_CodeSniffer\Tests\Standards\AbstractSniffUnitTest; + +class AjaxNullComparisonUnitTest extends AbstractSniffUnitTest +{ + + + /** + * Returns the lines where errors should occur. + * + * The key of the array should represent the line number and the value + * should represent the number of errors that should occur on that line. + * + * @return array + */ + public function getErrorList() + { + return []; + + }//end getErrorList() + + + /** + * Returns the lines where warnings should occur. + * + * The key of the array should represent the line number and the value + * should represent the number of warnings that should occur on that line. + * + * @return array + */ + public function getWarningList() + { + return [ + 41 => 1, + 53 => 1, + 64 => 1, + 77 => 1, + 92 => 1, + 122 => 1, + ]; + + }//end getWarningList() + + +}//end class diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/MySource/Tests/PHP/EvalObjectFactoryUnitTest.inc b/vendor/squizlabs/php_codesniffer/src/Standards/MySource/Tests/PHP/EvalObjectFactoryUnitTest.inc new file mode 100644 index 00000000..992a7dc1 --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/MySource/Tests/PHP/EvalObjectFactoryUnitTest.inc @@ -0,0 +1,26 @@ + \ No newline at end of file diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/MySource/Tests/PHP/EvalObjectFactoryUnitTest.php b/vendor/squizlabs/php_codesniffer/src/Standards/MySource/Tests/PHP/EvalObjectFactoryUnitTest.php new file mode 100644 index 00000000..423f242d --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/MySource/Tests/PHP/EvalObjectFactoryUnitTest.php @@ -0,0 +1,52 @@ + + * @copyright 2006-2015 Squiz Pty Ltd (ABN 77 084 670 600) + * @license https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence + */ + +namespace PHP_CodeSniffer\Standards\MySource\Tests\PHP; + +use PHP_CodeSniffer\Tests\Standards\AbstractSniffUnitTest; + +class EvalObjectFactoryUnitTest extends AbstractSniffUnitTest +{ + + + /** + * Returns the lines where errors should occur. + * + * The key of the array should represent the line number and the value + * should represent the number of errors that should occur on that line. + * + * @return array + */ + public function getErrorList() + { + return []; + + }//end getErrorList() + + + /** + * Returns the lines where warnings should occur. + * + * The key of the array should represent the line number and the value + * should represent the number of warnings that should occur on that line. + * + * @return array + */ + public function getWarningList() + { + return [ + 4 => 1, + 12 => 1, + 21 => 1, + ]; + + }//end getWarningList() + + +}//end class diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/MySource/Tests/PHP/GetRequestDataUnitTest.inc b/vendor/squizlabs/php_codesniffer/src/Standards/MySource/Tests/PHP/GetRequestDataUnitTest.inc new file mode 100644 index 00000000..7999763f --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/MySource/Tests/PHP/GetRequestDataUnitTest.inc @@ -0,0 +1,30 @@ + \ No newline at end of file diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/MySource/Tests/PHP/GetRequestDataUnitTest.php b/vendor/squizlabs/php_codesniffer/src/Standards/MySource/Tests/PHP/GetRequestDataUnitTest.php new file mode 100644 index 00000000..16e4cfb2 --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/MySource/Tests/PHP/GetRequestDataUnitTest.php @@ -0,0 +1,56 @@ + + * @copyright 2006-2015 Squiz Pty Ltd (ABN 77 084 670 600) + * @license https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence + */ + +namespace PHP_CodeSniffer\Standards\MySource\Tests\PHP; + +use PHP_CodeSniffer\Tests\Standards\AbstractSniffUnitTest; + +class GetRequestDataUnitTest extends AbstractSniffUnitTest +{ + + + /** + * Returns the lines where errors should occur. + * + * The key of the array should represent the line number and the value + * should represent the number of errors that should occur on that line. + * + * @return array + */ + public function getErrorList() + { + return [ + 2 => 1, + 5 => 1, + 8 => 1, + 21 => 1, + 26 => 1, + 27 => 1, + 28 => 1, + ]; + + }//end getErrorList() + + + /** + * Returns the lines where warnings should occur. + * + * The key of the array should represent the line number and the value + * should represent the number of warnings that should occur on that line. + * + * @return array + */ + public function getWarningList() + { + return []; + + }//end getWarningList() + + +}//end class diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/MySource/Tests/PHP/ReturnFunctionValueUnitTest.inc b/vendor/squizlabs/php_codesniffer/src/Standards/MySource/Tests/PHP/ReturnFunctionValueUnitTest.inc new file mode 100644 index 00000000..f9148a78 --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/MySource/Tests/PHP/ReturnFunctionValueUnitTest.inc @@ -0,0 +1,9 @@ +myFunction(); +return $obj->variable; +return MyClass::VARIABLE; +return $variable; +return ($var + 1); +?> \ No newline at end of file diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/MySource/Tests/PHP/ReturnFunctionValueUnitTest.php b/vendor/squizlabs/php_codesniffer/src/Standards/MySource/Tests/PHP/ReturnFunctionValueUnitTest.php new file mode 100644 index 00000000..32363786 --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/MySource/Tests/PHP/ReturnFunctionValueUnitTest.php @@ -0,0 +1,52 @@ + + * @copyright 2006-2015 Squiz Pty Ltd (ABN 77 084 670 600) + * @license https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence + */ + +namespace PHP_CodeSniffer\Standards\MySource\Tests\PHP; + +use PHP_CodeSniffer\Tests\Standards\AbstractSniffUnitTest; + +class ReturnFunctionValueUnitTest extends AbstractSniffUnitTest +{ + + + /** + * Returns the lines where errors should occur. + * + * The key of the array should represent the line number and the value + * should represent the number of errors that should occur on that line. + * + * @return array + */ + public function getErrorList() + { + return []; + + }//end getErrorList() + + + /** + * Returns the lines where warnings should occur. + * + * The key of the array should represent the line number and the value + * should represent the number of warnings that should occur on that line. + * + * @return array + */ + public function getWarningList() + { + return [ + 2 => 1, + 3 => 1, + 4 => 1, + ]; + + }//end getWarningList() + + +}//end class diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/MySource/Tests/Strings/JoinStringsUnitTest.js b/vendor/squizlabs/php_codesniffer/src/Standards/MySource/Tests/Strings/JoinStringsUnitTest.js new file mode 100644 index 00000000..46d90cf9 --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/MySource/Tests/Strings/JoinStringsUnitTest.js @@ -0,0 +1,18 @@ +one = (1 + 2); +two = (one + 2); +two = (one + one); +three = ('1' + 2); + +four = ['1', two].join(); +four = ['1', two].join(''); +four = ['1', [one, two].join(',')].join(' '); +four = ['1', [one, two].join()].join(' '); +four = ['1', [one, two].join()].join(); + +five = 'string' + ['1', [one, two].join()].join() + 'string'; + +six = myArray.join(' '); +six = [arrayOne, arrayTwo].join(); + +// This is fine because the array is not created inline. +var x = 'x' + test[x].join('p') + 't'; \ No newline at end of file diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/MySource/Tests/Strings/JoinStringsUnitTest.php b/vendor/squizlabs/php_codesniffer/src/Standards/MySource/Tests/Strings/JoinStringsUnitTest.php new file mode 100644 index 00000000..ecd490a4 --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/MySource/Tests/Strings/JoinStringsUnitTest.php @@ -0,0 +1,62 @@ + + * @copyright 2006-2015 Squiz Pty Ltd (ABN 77 084 670 600) + * @license https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence + */ + +namespace PHP_CodeSniffer\Standards\MySource\Tests\Strings; + +use PHP_CodeSniffer\Tests\Standards\AbstractSniffUnitTest; + +class JoinStringsUnitTest extends AbstractSniffUnitTest +{ + + + /** + * Returns the lines where errors should occur. + * + * The key of the array should represent the line number and the value + * should represent the number of errors that should occur on that line. + * + * @param string $testFile The name of the file being tested. + * + * @return array + */ + public function getErrorList($testFile='JoinStringsUnitTest.js') + { + if ($testFile !== 'JoinStringsUnitTest.js') { + return []; + } + + return [ + 6 => 1, + 7 => 1, + 8 => 2, + 9 => 2, + 10 => 2, + 12 => 2, + 15 => 1, + ]; + + }//end getErrorList() + + + /** + * Returns the lines where warnings should occur. + * + * The key of the array should represent the line number and the value + * should represent the number of warnings that should occur on that line. + * + * @return array + */ + public function getWarningList() + { + return []; + + }//end getWarningList() + + +}//end class diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/MySource/ruleset.xml b/vendor/squizlabs/php_codesniffer/src/Standards/MySource/ruleset.xml new file mode 100644 index 00000000..92407957 --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/MySource/ruleset.xml @@ -0,0 +1,18 @@ + + + The MySource coding standard builds on the Squiz coding standard. Currently used for MySource Mini development. + + */Tests/* + */Oven/* + */data/* + */jquery.js + */jquery.*.js + */viper/* + DALConf.inc + + + + + + + diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/PEAR/Docs/Classes/ClassDeclarationStandard.xml b/vendor/squizlabs/php_codesniffer/src/Standards/PEAR/Docs/Classes/ClassDeclarationStandard.xml new file mode 100644 index 00000000..b5d53fdf --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/PEAR/Docs/Classes/ClassDeclarationStandard.xml @@ -0,0 +1,22 @@ + + + + + + + { +} + ]]> + + + { +} + ]]> + + + diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/PEAR/Docs/Commenting/ClassCommentStandard.xml b/vendor/squizlabs/php_codesniffer/src/Standards/PEAR/Docs/Commenting/ClassCommentStandard.xml new file mode 100644 index 00000000..fe816200 --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/PEAR/Docs/Commenting/ClassCommentStandard.xml @@ -0,0 +1,177 @@ + + + + + + + /** + * The Foo class. + */ +class Foo +{ +} + ]]> + + + + + + + + /** + * The Foo class. + */ +class Foo +{ +} + ]]> + + + + + + + + /** + * The Foo class. + */ +class Foo +{ +} + ]]> + + + /** + * The Foo class. + */ + +class Foo +{ +} + ]]> + + + + + The Foo class. + */ +class Foo +{ +} + ]]> + + + The Foo class. + */ +class Foo +{ +} + ]]> + + + + + + * A helper for the Bar class. + * + * @see Bar + */ +class Foo +{ +} + ]]> + + + + * + * A helper for the Bar class. + * + * + * @see Bar + */ +class Foo +{ +} + ]]> + + + + + + * @see Bar + */ +class Foo +{ +} + ]]> + + + + * + * @see Bar + */ +class Foo +{ +} + ]]> + + + + + Release: 1.0 + */ +class Foo +{ +} + ]]> + + + 1.0 + */ +class Foo +{ +} + ]]> + + + diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/PEAR/Docs/Commenting/FileCommentStandard.xml b/vendor/squizlabs/php_codesniffer/src/Standards/PEAR/Docs/Commenting/FileCommentStandard.xml new file mode 100644 index 00000000..eef0b4e3 --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/PEAR/Docs/Commenting/FileCommentStandard.xml @@ -0,0 +1,286 @@ + + + + + + + /** + * Short description here. + * + * PHP version 5 + * + * @category Foo + * @package Foo_Helpers + * @author Marty McFly + * @copyright 2013-2014 Foo Inc. + * @license MIT License + * @link http://example.com + */ + ]]> + + + + ]]> + + + + + Short description here. + * + * PHP version 5 + * + * @category Foo + * @package Foo_Helpers + * @author Marty McFly + * @copyright 2013-2014 Foo Inc. + * @license MIT License + * @link http://example.com + */ + ]]> + + + + * Short description here. + * + * PHP version 5 + * + * @category Foo + * @package Foo_Helpers + * @author Marty McFly + * @copyright 2013-2014 Foo Inc. + * @license MIT License + * @link http://example.com + */ + ]]> + + + + + + * PHP version 5 + * + * @category Foo + * @package Foo_Helpers + * @author Marty McFly + * @copyright 2013-2014 Foo Inc. + * @license MIT License + * @link http://example.com + */ + ]]> + + + + * + * PHP version 5 + * + * + * @category Foo + * @package Foo_Helpers + * @author Marty McFly + * @copyright 2013-2014 Foo Inc. + * @license MIT License + * @link http://example.com + */ + ]]> + + + + + + * @category Foo + * @package Foo_Helpers + * @author Marty McFly + * @copyright 2013-2014 Foo Inc. + * @license MIT License + * @link http://example.com + */ + ]]> + + + + * + * @category Foo + * @package Foo_Helpers + * @author Marty McFly + * @copyright 2013-2014 Foo Inc. + * @license MIT License + * @link http://example.com + */ + ]]> + + + + + @category Foo + * @package Foo_Helpers + * @author Marty McFly + * @copyright 2013-2014 Foo Inc. + * @license MIT License + * @link http://example.com + */ + ]]> + + + + + + + + @category Foo + * @package Foo_Helpers + * @author Marty McFly + * @copyright 2013-2014 Foo Inc. + * @license MIT License + * @link http://example.com + */ + ]]> + + + @category Foo + * @category Bar + * @package Foo_Helpers + * @author Marty McFly + * @copyright 2013-2014 Foo Inc. + * @license MIT License + * @link http://example.com + */ + ]]> + + + + + PHP version 5 + * + * @category Foo + * @package Foo_Helpers + * @author Marty McFly + * @copyright 2013-2014 Foo Inc. + * @license MIT License + * @link http://example.com + */ + ]]> + + + @package Foo_Helpers + * @category Foo + * @author Marty McFly + * @copyright 2013-2014 Foo Inc. + * @license MIT License + * @link http://example.com + */ + ]]> + + + + + + * @copyright 2013-2014 Foo Inc. + * @license MIT License + * @link http://example.com + */ + ]]> + + + + * @copyright 2013-2014 Foo Inc. + * @license MIT License + * @link http://example.com + */ + ]]> + + + diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/PEAR/Docs/Commenting/FunctionCommentStandard.xml b/vendor/squizlabs/php_codesniffer/src/Standards/PEAR/Docs/Commenting/FunctionCommentStandard.xml new file mode 100644 index 00000000..621649f2 --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/PEAR/Docs/Commenting/FunctionCommentStandard.xml @@ -0,0 +1,230 @@ + + + + + + + /** + * Short description here. + * + * @return void + */ + function foo() + { + } + ]]> + + + + + + + + Short description here. + * + * @return void + */ + function foo() + { + } + ]]> + + + + * Short description here. + * + * @return void + */ + function foo() + { + } + ]]> + + + + + + * Long description here. + * + * @return void + */ + function foo() + { + } + ]]> + + + + * + * Long description here. + * + * + * @return void + */ + function foo() + { + } + ]]> + + + + + + * @return void + */ + function foo() + { + } + ]]> + + + + * + * @return void + */ + function foo() + { + } + ]]> + + + + + FooException + */ + function foo() + { + } + ]]> + + + @throws + */ + function foo() + { + } + ]]> + + + + + @return void + */ + function foo() + { + } + ]]> + + + + + + + + $foo Foo parameter + * @param string $bar Bar parameter + * @return void + */ + function foo($foo, $bar) + { + } + ]]> + + + $qux Bar parameter + * @return void + */ + function foo($foo, $bar) + { + } + ]]> + + + + + $foo Foo parameter + * @param string $bar Bar parameter + * @return void + */ + function foo($foo, $bar) + { + } + ]]> + + + $bar Bar parameter + * @param string $foo Foo parameter + * @return void + */ + function foo($foo, $bar) + { + } + ]]> + + + diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/PEAR/Docs/Commenting/InlineCommentStandard.xml b/vendor/squizlabs/php_codesniffer/src/Standards/PEAR/Docs/Commenting/InlineCommentStandard.xml new file mode 100644 index 00000000..53056e2a --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/PEAR/Docs/Commenting/InlineCommentStandard.xml @@ -0,0 +1,19 @@ + + + + + + + // A comment. + ]]> + + + # A comment. + ]]> + + + diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/PEAR/Docs/ControlStructures/ControlSignatureStandard.xml b/vendor/squizlabs/php_codesniffer/src/Standards/PEAR/Docs/ControlStructures/ControlSignatureStandard.xml new file mode 100644 index 00000000..ce430fb1 --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/PEAR/Docs/ControlStructures/ControlSignatureStandard.xml @@ -0,0 +1,36 @@ + + + + + + + ($foo) { +} + ]]> + + + ($foo){ +} + ]]> + + + + + { +} + ]]> + + + { +} + ]]> + + + diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/PEAR/Docs/ControlStructures/MultiLineConditionStandard.xml b/vendor/squizlabs/php_codesniffer/src/Standards/PEAR/Docs/ControlStructures/MultiLineConditionStandard.xml new file mode 100644 index 00000000..96d451dc --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/PEAR/Docs/ControlStructures/MultiLineConditionStandard.xml @@ -0,0 +1,60 @@ + + + + + + + && $bar +) { +} + ]]> + + + && $bar +) { +} + ]]> + + + + + && $bar +) { +} + ]]> + + + && + $bar +) { +} + ]]> + + + + + ) { +} + ]]> + + + ) { +} + ]]> + + + diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/PEAR/Docs/Files/IncludingFileStandard.xml b/vendor/squizlabs/php_codesniffer/src/Standards/PEAR/Docs/Files/IncludingFileStandard.xml new file mode 100644 index 00000000..6d115be7 --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/PEAR/Docs/Files/IncludingFileStandard.xml @@ -0,0 +1,24 @@ + + + require_once. Anywhere you are conditionally including a class file (for example, factory methods), use include_once. Either of these will ensure that class files are included only once. They share the same file list, so you don't need to worry about mixing them - a file included with require_once will not be included again by include_once. + ]]> + + + include_once and require_once are statements, not functions. Parentheses should not surround the subject filename. + ]]> + + + + + + + ('PHP/CodeSniffer.php'); + ]]> + + + diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/PEAR/Docs/Files/LineLengthStandard.xml b/vendor/squizlabs/php_codesniffer/src/Standards/PEAR/Docs/Files/LineLengthStandard.xml new file mode 100644 index 00000000..e4911ef3 --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/PEAR/Docs/Files/LineLengthStandard.xml @@ -0,0 +1,7 @@ + + + + + diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/PEAR/Docs/Formatting/MultiLineAssignmentStandard.xml b/vendor/squizlabs/php_codesniffer/src/Standards/PEAR/Docs/Formatting/MultiLineAssignmentStandard.xml new file mode 100644 index 00000000..e825c553 --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/PEAR/Docs/Formatting/MultiLineAssignmentStandard.xml @@ -0,0 +1,35 @@ + + + + + + + = $bar; + ]]> + + + = + $bar; + ]]> + + + + + = $bar; + ]]> + + + = $bar; + ]]> + + + diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/PEAR/Docs/Functions/FunctionCallSignatureStandard.xml b/vendor/squizlabs/php_codesniffer/src/Standards/PEAR/Docs/Functions/FunctionCallSignatureStandard.xml new file mode 100644 index 00000000..f8742277 --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/PEAR/Docs/Functions/FunctionCallSignatureStandard.xml @@ -0,0 +1,19 @@ + + + + + + + + + + ( $bar, $baz, $quux ) ; + ]]> + + + diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/PEAR/Docs/Functions/FunctionDeclarationStandard.xml b/vendor/squizlabs/php_codesniffer/src/Standards/PEAR/Docs/Functions/FunctionDeclarationStandard.xml new file mode 100644 index 00000000..ced9ae2e --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/PEAR/Docs/Functions/FunctionDeclarationStandard.xml @@ -0,0 +1,41 @@ + + + + + + + () use ($bar) { +}; + ]]> + + + ()use($bar){ +}; + ]]> + + + + + $bar, + $baz +) { +}; + ]]> + + + $bar, +$baz) +{ +}; + ]]> + + + diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/PEAR/Docs/Functions/ValidDefaultValueStandard.xml b/vendor/squizlabs/php_codesniffer/src/Standards/PEAR/Docs/Functions/ValidDefaultValueStandard.xml new file mode 100644 index 00000000..56196cb6 --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/PEAR/Docs/Functions/ValidDefaultValueStandard.xml @@ -0,0 +1,25 @@ + + + + + + + $persistent = false) +{ + ... +} + ]]> + + + $persistent = false, $dsn) +{ + ... +} + ]]> + + + diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/PEAR/Docs/NamingConventions/ValidClassNameStandard.xml b/vendor/squizlabs/php_codesniffer/src/Standards/PEAR/Docs/NamingConventions/ValidClassNameStandard.xml new file mode 100644 index 00000000..d1608791 --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/PEAR/Docs/NamingConventions/ValidClassNameStandard.xml @@ -0,0 +1,23 @@ + + + + + + + + + + + + + diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/PEAR/Docs/NamingConventions/ValidFunctionNameStandard.xml b/vendor/squizlabs/php_codesniffer/src/Standards/PEAR/Docs/NamingConventions/ValidFunctionNameStandard.xml new file mode 100644 index 00000000..60841dd4 --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/PEAR/Docs/NamingConventions/ValidFunctionNameStandard.xml @@ -0,0 +1,23 @@ + + + + + + + + + + + + + diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/PEAR/Docs/NamingConventions/ValidVariableNameStandard.xml b/vendor/squizlabs/php_codesniffer/src/Standards/PEAR/Docs/NamingConventions/ValidVariableNameStandard.xml new file mode 100644 index 00000000..4c707bdd --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/PEAR/Docs/NamingConventions/ValidVariableNameStandard.xml @@ -0,0 +1,29 @@ + + + + + + + publicVar; + protected $protectedVar; + private $_privateVar; +} + ]]> + + + _publicVar; + protected $_protectedVar; + private $privateVar; +} + ]]> + + + diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/PEAR/Docs/WhiteSpace/ObjectOperatorIndentStandard.xml b/vendor/squizlabs/php_codesniffer/src/Standards/PEAR/Docs/WhiteSpace/ObjectOperatorIndentStandard.xml new file mode 100644 index 00000000..9dee905d --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/PEAR/Docs/WhiteSpace/ObjectOperatorIndentStandard.xml @@ -0,0 +1,39 @@ + + + + + + + ->bar() + ->baz(); + ]]> + + + -> + bar()-> + baz(); + ]]> + + + + + ->bar() + ->baz(); + ]]> + + + ->bar() +->baz(); + ]]> + + + diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/PEAR/Docs/WhiteSpace/ScopeClosingBraceStandard.xml b/vendor/squizlabs/php_codesniffer/src/Standards/PEAR/Docs/WhiteSpace/ScopeClosingBraceStandard.xml new file mode 100644 index 00000000..c8d6e274 --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/PEAR/Docs/WhiteSpace/ScopeClosingBraceStandard.xml @@ -0,0 +1,23 @@ + + + + + + + + + + } + ]]> + + + diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/PEAR/Docs/WhiteSpace/ScopeIndentStandard.xml b/vendor/squizlabs/php_codesniffer/src/Standards/PEAR/Docs/WhiteSpace/ScopeIndentStandard.xml new file mode 100644 index 00000000..fafa07ac --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/PEAR/Docs/WhiteSpace/ScopeIndentStandard.xml @@ -0,0 +1,29 @@ + + + + + + + if ($test) { + $var = 1; + } +} + ]]> + + + if ($test) { +$var = 1; +} +} + ]]> + + + diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/PEAR/Sniffs/Classes/ClassDeclarationSniff.php b/vendor/squizlabs/php_codesniffer/src/Standards/PEAR/Sniffs/Classes/ClassDeclarationSniff.php new file mode 100644 index 00000000..a5b07a9e --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/PEAR/Sniffs/Classes/ClassDeclarationSniff.php @@ -0,0 +1,149 @@ + + * @copyright 2006-2015 Squiz Pty Ltd (ABN 77 084 670 600) + * @license https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence + */ + +namespace PHP_CodeSniffer\Standards\PEAR\Sniffs\Classes; + +use PHP_CodeSniffer\Files\File; +use PHP_CodeSniffer\Sniffs\Sniff; + +class ClassDeclarationSniff implements Sniff +{ + + + /** + * Returns an array of tokens this test wants to listen for. + * + * @return array + */ + public function register() + { + return [ + T_CLASS, + T_INTERFACE, + T_TRAIT, + ]; + + }//end register() + + + /** + * Processes this test, when one of its tokens is encountered. + * + * @param \PHP_CodeSniffer\Files\File $phpcsFile The file being scanned. + * @param integer $stackPtr The position of the current token in the + * stack passed in $tokens. + * + * @return void + */ + public function process(File $phpcsFile, $stackPtr) + { + $tokens = $phpcsFile->getTokens(); + $errorData = [strtolower($tokens[$stackPtr]['content'])]; + + if (isset($tokens[$stackPtr]['scope_opener']) === false) { + $error = 'Possible parse error: %s missing opening or closing brace'; + $phpcsFile->addWarning($error, $stackPtr, 'MissingBrace', $errorData); + return; + } + + $curlyBrace = $tokens[$stackPtr]['scope_opener']; + $lastContent = $phpcsFile->findPrevious(T_WHITESPACE, ($curlyBrace - 1), $stackPtr, true); + $classLine = $tokens[$lastContent]['line']; + $braceLine = $tokens[$curlyBrace]['line']; + if ($braceLine === $classLine) { + $phpcsFile->recordMetric($stackPtr, 'Class opening brace placement', 'same line'); + $error = 'Opening brace of a %s must be on the line after the definition'; + $fix = $phpcsFile->addFixableError($error, $curlyBrace, 'OpenBraceNewLine', $errorData); + if ($fix === true) { + $phpcsFile->fixer->beginChangeset(); + if ($tokens[($curlyBrace - 1)]['code'] === T_WHITESPACE) { + $phpcsFile->fixer->replaceToken(($curlyBrace - 1), ''); + } + + $phpcsFile->fixer->addNewlineBefore($curlyBrace); + $phpcsFile->fixer->endChangeset(); + } + + return; + } else { + $phpcsFile->recordMetric($stackPtr, 'Class opening brace placement', 'new line'); + + if ($braceLine > ($classLine + 1)) { + $error = 'Opening brace of a %s must be on the line following the %s declaration; found %s line(s)'; + $data = [ + $tokens[$stackPtr]['content'], + $tokens[$stackPtr]['content'], + ($braceLine - $classLine - 1), + ]; + $fix = $phpcsFile->addFixableError($error, $curlyBrace, 'OpenBraceWrongLine', $data); + if ($fix === true) { + $phpcsFile->fixer->beginChangeset(); + for ($i = ($curlyBrace - 1); $i > $lastContent; $i--) { + if ($tokens[$i]['line'] === ($tokens[$curlyBrace]['line'] + 1)) { + break; + } + + $phpcsFile->fixer->replaceToken($i, ''); + } + + $phpcsFile->fixer->endChangeset(); + } + + return; + }//end if + }//end if + + if ($tokens[($curlyBrace + 1)]['content'] !== $phpcsFile->eolChar) { + $error = 'Opening %s brace must be on a line by itself'; + + $nextNonWhitespace = $phpcsFile->findNext(T_WHITESPACE, ($curlyBrace + 1), null, true); + if ($tokens[$nextNonWhitespace]['code'] === T_PHPCS_IGNORE) { + // Don't auto-fix if the next thing is a PHPCS ignore annotation. + $phpcsFile->addError($error, $curlyBrace, 'OpenBraceNotAlone', $errorData); + } else { + $fix = $phpcsFile->addFixableError($error, $curlyBrace, 'OpenBraceNotAlone', $errorData); + if ($fix === true) { + $phpcsFile->fixer->addNewline($curlyBrace); + } + } + } + + if ($tokens[($curlyBrace - 1)]['code'] === T_WHITESPACE) { + $prevContent = $tokens[($curlyBrace - 1)]['content']; + if ($prevContent === $phpcsFile->eolChar) { + $spaces = 0; + } else { + $spaces = $tokens[($curlyBrace - 1)]['length']; + } + + $first = $phpcsFile->findFirstOnLine(T_WHITESPACE, $stackPtr, true); + $expected = ($tokens[$first]['column'] - 1); + if ($spaces !== $expected) { + $error = 'Expected %s spaces before opening brace; %s found'; + $data = [ + $expected, + $spaces, + ]; + + $fix = $phpcsFile->addFixableError($error, $curlyBrace, 'SpaceBeforeBrace', $data); + if ($fix === true) { + $indent = str_repeat(' ', $expected); + if ($spaces === 0) { + $phpcsFile->fixer->addContentBefore($curlyBrace, $indent); + } else { + $phpcsFile->fixer->replaceToken(($curlyBrace - 1), $indent); + } + } + } + }//end if + + }//end process() + + +}//end class diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/PEAR/Sniffs/Commenting/ClassCommentSniff.php b/vendor/squizlabs/php_codesniffer/src/Standards/PEAR/Sniffs/Commenting/ClassCommentSniff.php new file mode 100644 index 00000000..ac3351e0 --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/PEAR/Sniffs/Commenting/ClassCommentSniff.php @@ -0,0 +1,118 @@ + + * @copyright 2006-2015 Squiz Pty Ltd (ABN 77 084 670 600) + * @license https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence + */ + +namespace PHP_CodeSniffer\Standards\PEAR\Sniffs\Commenting; + +use PHP_CodeSniffer\Files\File; +use PHP_CodeSniffer\Util\Tokens; + +class ClassCommentSniff extends FileCommentSniff +{ + + + /** + * Returns an array of tokens this test wants to listen for. + * + * @return array + */ + public function register() + { + return [ + T_CLASS, + T_INTERFACE, + T_TRAIT, + ]; + + }//end register() + + + /** + * Processes this test, when one of its tokens is encountered. + * + * @param \PHP_CodeSniffer\Files\File $phpcsFile The file being scanned. + * @param int $stackPtr The position of the current token + * in the stack passed in $tokens. + * + * @return void + */ + public function process(File $phpcsFile, $stackPtr) + { + $tokens = $phpcsFile->getTokens(); + $type = strtolower($tokens[$stackPtr]['content']); + $errorData = [$type]; + + $find = Tokens::$methodPrefixes; + $find[T_WHITESPACE] = T_WHITESPACE; + + for ($commentEnd = ($stackPtr - 1); $commentEnd >= 0; $commentEnd--) { + if (isset($find[$tokens[$commentEnd]['code']]) === true) { + continue; + } + + if ($tokens[$commentEnd]['code'] === T_ATTRIBUTE_END + && isset($tokens[$commentEnd]['attribute_opener']) === true + ) { + $commentEnd = $tokens[$commentEnd]['attribute_opener']; + continue; + } + + break; + } + + if ($tokens[$commentEnd]['code'] !== T_DOC_COMMENT_CLOSE_TAG + && $tokens[$commentEnd]['code'] !== T_COMMENT + ) { + $errorData[] = $phpcsFile->getDeclarationName($stackPtr); + $phpcsFile->addError('Missing doc comment for %s %s', $stackPtr, 'Missing', $errorData); + $phpcsFile->recordMetric($stackPtr, 'Class has doc comment', 'no'); + return; + } + + $phpcsFile->recordMetric($stackPtr, 'Class has doc comment', 'yes'); + + if ($tokens[$commentEnd]['code'] === T_COMMENT) { + $phpcsFile->addError('You must use "/**" style comments for a %s comment', $stackPtr, 'WrongStyle', $errorData); + return; + } + + // Check each tag. + $this->processTags($phpcsFile, $stackPtr, $tokens[$commentEnd]['comment_opener']); + + }//end process() + + + /** + * Process the version tag. + * + * @param \PHP_CodeSniffer\Files\File $phpcsFile The file being scanned. + * @param array $tags The tokens for these tags. + * + * @return void + */ + protected function processVersion($phpcsFile, array $tags) + { + $tokens = $phpcsFile->getTokens(); + foreach ($tags as $tag) { + if ($tokens[($tag + 2)]['code'] !== T_DOC_COMMENT_STRING) { + // No content. + continue; + } + + $content = $tokens[($tag + 2)]['content']; + if ((strstr($content, 'Release:') === false)) { + $error = 'Invalid version "%s" in doc comment; consider "Release: " instead'; + $data = [$content]; + $phpcsFile->addWarning($error, $tag, 'InvalidVersion', $data); + } + } + + }//end processVersion() + + +}//end class diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/PEAR/Sniffs/Commenting/FileCommentSniff.php b/vendor/squizlabs/php_codesniffer/src/Standards/PEAR/Sniffs/Commenting/FileCommentSniff.php new file mode 100644 index 00000000..e0672ffe --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/PEAR/Sniffs/Commenting/FileCommentSniff.php @@ -0,0 +1,581 @@ + + * @copyright 2006-2015 Squiz Pty Ltd (ABN 77 084 670 600) + * @license https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence + */ + +namespace PHP_CodeSniffer\Standards\PEAR\Sniffs\Commenting; + +use PHP_CodeSniffer\Files\File; +use PHP_CodeSniffer\Sniffs\Sniff; +use PHP_CodeSniffer\Util\Common; + +class FileCommentSniff implements Sniff +{ + + /** + * Tags in correct order and related info. + * + * @var array + */ + protected $tags = [ + '@category' => [ + 'required' => true, + 'allow_multiple' => false, + ], + '@package' => [ + 'required' => true, + 'allow_multiple' => false, + ], + '@subpackage' => [ + 'required' => false, + 'allow_multiple' => false, + ], + '@author' => [ + 'required' => true, + 'allow_multiple' => true, + ], + '@copyright' => [ + 'required' => false, + 'allow_multiple' => true, + ], + '@license' => [ + 'required' => true, + 'allow_multiple' => false, + ], + '@version' => [ + 'required' => false, + 'allow_multiple' => false, + ], + '@link' => [ + 'required' => true, + 'allow_multiple' => true, + ], + '@see' => [ + 'required' => false, + 'allow_multiple' => true, + ], + '@since' => [ + 'required' => false, + 'allow_multiple' => false, + ], + '@deprecated' => [ + 'required' => false, + 'allow_multiple' => false, + ], + ]; + + + /** + * Returns an array of tokens this test wants to listen for. + * + * @return array + */ + public function register() + { + return [T_OPEN_TAG]; + + }//end register() + + + /** + * Processes this test, when one of its tokens is encountered. + * + * @param \PHP_CodeSniffer\Files\File $phpcsFile The file being scanned. + * @param int $stackPtr The position of the current token + * in the stack passed in $tokens. + * + * @return int + */ + public function process(File $phpcsFile, $stackPtr) + { + $tokens = $phpcsFile->getTokens(); + + // Find the next non whitespace token. + $commentStart = $phpcsFile->findNext(T_WHITESPACE, ($stackPtr + 1), null, true); + + // Allow declare() statements at the top of the file. + if ($tokens[$commentStart]['code'] === T_DECLARE) { + $semicolon = $phpcsFile->findNext(T_SEMICOLON, ($commentStart + 1)); + $commentStart = $phpcsFile->findNext(T_WHITESPACE, ($semicolon + 1), null, true); + } + + // Ignore vim header. + if ($tokens[$commentStart]['code'] === T_COMMENT) { + if (strstr($tokens[$commentStart]['content'], 'vim:') !== false) { + $commentStart = $phpcsFile->findNext( + T_WHITESPACE, + ($commentStart + 1), + null, + true + ); + } + } + + $errorToken = ($stackPtr + 1); + if (isset($tokens[$errorToken]) === false) { + $errorToken--; + } + + if ($tokens[$commentStart]['code'] === T_CLOSE_TAG) { + // We are only interested if this is the first open tag. + return ($phpcsFile->numTokens + 1); + } else if ($tokens[$commentStart]['code'] === T_COMMENT) { + $error = 'You must use "/**" style comments for a file comment'; + $phpcsFile->addError($error, $errorToken, 'WrongStyle'); + $phpcsFile->recordMetric($stackPtr, 'File has doc comment', 'yes'); + return ($phpcsFile->numTokens + 1); + } else if ($commentStart === false + || $tokens[$commentStart]['code'] !== T_DOC_COMMENT_OPEN_TAG + ) { + $phpcsFile->addError('Missing file doc comment', $errorToken, 'Missing'); + $phpcsFile->recordMetric($stackPtr, 'File has doc comment', 'no'); + return ($phpcsFile->numTokens + 1); + } + + $commentEnd = $tokens[$commentStart]['comment_closer']; + + for ($nextToken = ($commentEnd + 1); $nextToken < $phpcsFile->numTokens; $nextToken++) { + if ($tokens[$nextToken]['code'] === T_WHITESPACE) { + continue; + } + + if ($tokens[$nextToken]['code'] === T_ATTRIBUTE + && isset($tokens[$nextToken]['attribute_closer']) === true + ) { + $nextToken = $tokens[$nextToken]['attribute_closer']; + continue; + } + + break; + } + + if ($nextToken === $phpcsFile->numTokens) { + $nextToken--; + } + + $ignore = [ + T_CLASS, + T_INTERFACE, + T_TRAIT, + T_FUNCTION, + T_CLOSURE, + T_PUBLIC, + T_PRIVATE, + T_PROTECTED, + T_FINAL, + T_STATIC, + T_ABSTRACT, + T_CONST, + T_PROPERTY, + ]; + + if (in_array($tokens[$nextToken]['code'], $ignore, true) === true) { + $phpcsFile->addError('Missing file doc comment', $stackPtr, 'Missing'); + $phpcsFile->recordMetric($stackPtr, 'File has doc comment', 'no'); + return ($phpcsFile->numTokens + 1); + } + + $phpcsFile->recordMetric($stackPtr, 'File has doc comment', 'yes'); + + // Check the PHP Version, which should be in some text before the first tag. + $found = false; + for ($i = ($commentStart + 1); $i < $commentEnd; $i++) { + if ($tokens[$i]['code'] === T_DOC_COMMENT_TAG) { + break; + } else if ($tokens[$i]['code'] === T_DOC_COMMENT_STRING + && strstr(strtolower($tokens[$i]['content']), 'php version') !== false + ) { + $found = true; + break; + } + } + + if ($found === false) { + $error = 'PHP version not specified'; + $phpcsFile->addWarning($error, $commentEnd, 'MissingVersion'); + } + + // Check each tag. + $this->processTags($phpcsFile, $stackPtr, $commentStart); + + // Ignore the rest of the file. + return ($phpcsFile->numTokens + 1); + + }//end process() + + + /** + * Processes each required or optional tag. + * + * @param \PHP_CodeSniffer\Files\File $phpcsFile The file being scanned. + * @param int $stackPtr The position of the current token + * in the stack passed in $tokens. + * @param int $commentStart Position in the stack where the comment started. + * + * @return void + */ + protected function processTags($phpcsFile, $stackPtr, $commentStart) + { + $tokens = $phpcsFile->getTokens(); + + if (get_class($this) === 'PHP_CodeSniffer\Standards\PEAR\Sniffs\Commenting\FileCommentSniff') { + $docBlock = 'file'; + } else { + $docBlock = 'class'; + } + + $commentEnd = $tokens[$commentStart]['comment_closer']; + + $foundTags = []; + $tagTokens = []; + foreach ($tokens[$commentStart]['comment_tags'] as $tag) { + $name = $tokens[$tag]['content']; + if (isset($this->tags[$name]) === false) { + continue; + } + + if ($this->tags[$name]['allow_multiple'] === false && isset($tagTokens[$name]) === true) { + $error = 'Only one %s tag is allowed in a %s comment'; + $data = [ + $name, + $docBlock, + ]; + $phpcsFile->addError($error, $tag, 'Duplicate'.ucfirst(substr($name, 1)).'Tag', $data); + } + + $foundTags[] = $name; + $tagTokens[$name][] = $tag; + + $string = $phpcsFile->findNext(T_DOC_COMMENT_STRING, $tag, $commentEnd); + if ($string === false || $tokens[$string]['line'] !== $tokens[$tag]['line']) { + $error = 'Content missing for %s tag in %s comment'; + $data = [ + $name, + $docBlock, + ]; + $phpcsFile->addError($error, $tag, 'Empty'.ucfirst(substr($name, 1)).'Tag', $data); + continue; + } + }//end foreach + + // Check if the tags are in the correct position. + $pos = 0; + foreach ($this->tags as $tag => $tagData) { + if (isset($tagTokens[$tag]) === false) { + if ($tagData['required'] === true) { + $error = 'Missing %s tag in %s comment'; + $data = [ + $tag, + $docBlock, + ]; + $phpcsFile->addError($error, $commentEnd, 'Missing'.ucfirst(substr($tag, 1)).'Tag', $data); + } + + continue; + } else { + $method = 'process'.substr($tag, 1); + if (method_exists($this, $method) === true) { + // Process each tag if a method is defined. + call_user_func([$this, $method], $phpcsFile, $tagTokens[$tag]); + } + } + + if (isset($foundTags[$pos]) === false) { + break; + } + + if ($foundTags[$pos] !== $tag) { + $error = 'The tag in position %s should be the %s tag'; + $data = [ + ($pos + 1), + $tag, + ]; + $phpcsFile->addError($error, $tokens[$commentStart]['comment_tags'][$pos], ucfirst(substr($tag, 1)).'TagOrder', $data); + } + + // Account for multiple tags. + $pos++; + while (isset($foundTags[$pos]) === true && $foundTags[$pos] === $tag) { + $pos++; + } + }//end foreach + + }//end processTags() + + + /** + * Process the category tag. + * + * @param \PHP_CodeSniffer\Files\File $phpcsFile The file being scanned. + * @param array $tags The tokens for these tags. + * + * @return void + */ + protected function processCategory($phpcsFile, array $tags) + { + $tokens = $phpcsFile->getTokens(); + foreach ($tags as $tag) { + if ($tokens[($tag + 2)]['code'] !== T_DOC_COMMENT_STRING) { + // No content. + continue; + } + + $content = $tokens[($tag + 2)]['content']; + if (Common::isUnderscoreName($content) !== true) { + $newContent = str_replace(' ', '_', $content); + $nameBits = explode('_', $newContent); + $firstBit = array_shift($nameBits); + $newName = ucfirst($firstBit).'_'; + foreach ($nameBits as $bit) { + if ($bit !== '') { + $newName .= ucfirst($bit).'_'; + } + } + + $error = 'Category name "%s" is not valid; consider "%s" instead'; + $validName = trim($newName, '_'); + $data = [ + $content, + $validName, + ]; + $phpcsFile->addError($error, $tag, 'InvalidCategory', $data); + } + }//end foreach + + }//end processCategory() + + + /** + * Process the package tag. + * + * @param \PHP_CodeSniffer\Files\File $phpcsFile The file being scanned. + * @param array $tags The tokens for these tags. + * + * @return void + */ + protected function processPackage($phpcsFile, array $tags) + { + $tokens = $phpcsFile->getTokens(); + foreach ($tags as $tag) { + if ($tokens[($tag + 2)]['code'] !== T_DOC_COMMENT_STRING) { + // No content. + continue; + } + + $content = $tokens[($tag + 2)]['content']; + if (Common::isUnderscoreName($content) === true) { + continue; + } + + $newContent = str_replace(' ', '_', $content); + $newContent = trim($newContent, '_'); + $newContent = preg_replace('/[^A-Za-z_]/', '', $newContent); + + if ($newContent === '') { + $error = 'Package name "%s" is not valid'; + $data = [$content]; + $phpcsFile->addError($error, $tag, 'InvalidPackageValue', $data); + } else { + $nameBits = explode('_', $newContent); + $firstBit = array_shift($nameBits); + $newName = strtoupper($firstBit[0]).substr($firstBit, 1).'_'; + foreach ($nameBits as $bit) { + if ($bit !== '') { + $newName .= strtoupper($bit[0]).substr($bit, 1).'_'; + } + } + + $error = 'Package name "%s" is not valid; consider "%s" instead'; + $validName = trim($newName, '_'); + $data = [ + $content, + $validName, + ]; + $phpcsFile->addError($error, $tag, 'InvalidPackage', $data); + }//end if + }//end foreach + + }//end processPackage() + + + /** + * Process the subpackage tag. + * + * @param \PHP_CodeSniffer\Files\File $phpcsFile The file being scanned. + * @param array $tags The tokens for these tags. + * + * @return void + */ + protected function processSubpackage($phpcsFile, array $tags) + { + $tokens = $phpcsFile->getTokens(); + foreach ($tags as $tag) { + if ($tokens[($tag + 2)]['code'] !== T_DOC_COMMENT_STRING) { + // No content. + continue; + } + + $content = $tokens[($tag + 2)]['content']; + if (Common::isUnderscoreName($content) === true) { + continue; + } + + $newContent = str_replace(' ', '_', $content); + $nameBits = explode('_', $newContent); + $firstBit = array_shift($nameBits); + $newName = strtoupper($firstBit[0]).substr($firstBit, 1).'_'; + foreach ($nameBits as $bit) { + if ($bit !== '') { + $newName .= strtoupper($bit[0]).substr($bit, 1).'_'; + } + } + + $error = 'Subpackage name "%s" is not valid; consider "%s" instead'; + $validName = trim($newName, '_'); + $data = [ + $content, + $validName, + ]; + $phpcsFile->addError($error, $tag, 'InvalidSubpackage', $data); + }//end foreach + + }//end processSubpackage() + + + /** + * Process the author tag(s) that this header comment has. + * + * @param \PHP_CodeSniffer\Files\File $phpcsFile The file being scanned. + * @param array $tags The tokens for these tags. + * + * @return void + */ + protected function processAuthor($phpcsFile, array $tags) + { + $tokens = $phpcsFile->getTokens(); + foreach ($tags as $tag) { + if ($tokens[($tag + 2)]['code'] !== T_DOC_COMMENT_STRING) { + // No content. + continue; + } + + $content = $tokens[($tag + 2)]['content']; + $local = '\da-zA-Z-_+'; + // Dot character cannot be the first or last character in the local-part. + $localMiddle = $local.'.\w'; + if (preg_match('/^([^<]*)\s+<(['.$local.'](['.$localMiddle.']*['.$local.'])*@[\da-zA-Z][-.\w]*[\da-zA-Z]\.[a-zA-Z]{2,})>$/', $content) === 0) { + $error = 'Content of the @author tag must be in the form "Display Name "'; + $phpcsFile->addError($error, $tag, 'InvalidAuthors'); + } + } + + }//end processAuthor() + + + /** + * Process the copyright tags. + * + * @param \PHP_CodeSniffer\Files\File $phpcsFile The file being scanned. + * @param array $tags The tokens for these tags. + * + * @return void + */ + protected function processCopyright($phpcsFile, array $tags) + { + $tokens = $phpcsFile->getTokens(); + foreach ($tags as $tag) { + if ($tokens[($tag + 2)]['code'] !== T_DOC_COMMENT_STRING) { + // No content. + continue; + } + + $content = $tokens[($tag + 2)]['content']; + $matches = []; + if (preg_match('/^([0-9]{4})((.{1})([0-9]{4}))? (.+)$/', $content, $matches) !== 0) { + // Check earliest-latest year order. + if ($matches[3] !== '' && $matches[3] !== null) { + if ($matches[3] !== '-') { + $error = 'A hyphen must be used between the earliest and latest year'; + $phpcsFile->addError($error, $tag, 'CopyrightHyphen'); + } + + if ($matches[4] !== '' && $matches[4] !== null && $matches[4] < $matches[1]) { + $error = "Invalid year span \"$matches[1]$matches[3]$matches[4]\" found; consider \"$matches[4]-$matches[1]\" instead"; + $phpcsFile->addWarning($error, $tag, 'InvalidCopyright'); + } + } + } else { + $error = '@copyright tag must contain a year and the name of the copyright holder'; + $phpcsFile->addError($error, $tag, 'IncompleteCopyright'); + } + }//end foreach + + }//end processCopyright() + + + /** + * Process the license tag. + * + * @param \PHP_CodeSniffer\Files\File $phpcsFile The file being scanned. + * @param array $tags The tokens for these tags. + * + * @return void + */ + protected function processLicense($phpcsFile, array $tags) + { + $tokens = $phpcsFile->getTokens(); + foreach ($tags as $tag) { + if ($tokens[($tag + 2)]['code'] !== T_DOC_COMMENT_STRING) { + // No content. + continue; + } + + $content = $tokens[($tag + 2)]['content']; + $matches = []; + preg_match('/^([^\s]+)\s+(.*)/', $content, $matches); + if (count($matches) !== 3) { + $error = '@license tag must contain a URL and a license name'; + $phpcsFile->addError($error, $tag, 'IncompleteLicense'); + } + } + + }//end processLicense() + + + /** + * Process the version tag. + * + * @param \PHP_CodeSniffer\Files\File $phpcsFile The file being scanned. + * @param array $tags The tokens for these tags. + * + * @return void + */ + protected function processVersion($phpcsFile, array $tags) + { + $tokens = $phpcsFile->getTokens(); + foreach ($tags as $tag) { + if ($tokens[($tag + 2)]['code'] !== T_DOC_COMMENT_STRING) { + // No content. + continue; + } + + $content = $tokens[($tag + 2)]['content']; + if (strstr($content, 'CVS:') === false + && strstr($content, 'SVN:') === false + && strstr($content, 'GIT:') === false + && strstr($content, 'HG:') === false + ) { + $error = 'Invalid version "%s" in file comment; consider "CVS: " or "SVN: " or "GIT: " or "HG: " instead'; + $data = [$content]; + $phpcsFile->addWarning($error, $tag, 'InvalidVersion', $data); + } + } + + }//end processVersion() + + +}//end class diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/PEAR/Sniffs/Commenting/FunctionCommentSniff.php b/vendor/squizlabs/php_codesniffer/src/Standards/PEAR/Sniffs/Commenting/FunctionCommentSniff.php new file mode 100644 index 00000000..408856fc --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/PEAR/Sniffs/Commenting/FunctionCommentSniff.php @@ -0,0 +1,525 @@ + + * @copyright 2006-2015 Squiz Pty Ltd (ABN 77 084 670 600) + * @license https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence + */ + +namespace PHP_CodeSniffer\Standards\PEAR\Sniffs\Commenting; + +use PHP_CodeSniffer\Files\File; +use PHP_CodeSniffer\Sniffs\Sniff; +use PHP_CodeSniffer\Util\Tokens; + +class FunctionCommentSniff implements Sniff +{ + + /** + * Disable the check for functions with a lower visibility than the value given. + * + * Allowed values are public, protected, and private. + * + * @var string + */ + public $minimumVisibility = 'private'; + + /** + * Array of methods which do not require a return type. + * + * @var array + */ + public $specialMethods = [ + '__construct', + '__destruct', + ]; + + + /** + * Returns an array of tokens this test wants to listen for. + * + * @return array + */ + public function register() + { + return [T_FUNCTION]; + + }//end register() + + + /** + * Processes this test, when one of its tokens is encountered. + * + * @param \PHP_CodeSniffer\Files\File $phpcsFile The file being scanned. + * @param int $stackPtr The position of the current token + * in the stack passed in $tokens. + * + * @return void + */ + public function process(File $phpcsFile, $stackPtr) + { + $scopeModifier = $phpcsFile->getMethodProperties($stackPtr)['scope']; + if ($scopeModifier === 'protected' + && $this->minimumVisibility === 'public' + || $scopeModifier === 'private' + && ($this->minimumVisibility === 'public' || $this->minimumVisibility === 'protected') + ) { + return; + } + + $tokens = $phpcsFile->getTokens(); + $ignore = Tokens::$methodPrefixes; + $ignore[T_WHITESPACE] = T_WHITESPACE; + + for ($commentEnd = ($stackPtr - 1); $commentEnd >= 0; $commentEnd--) { + if (isset($ignore[$tokens[$commentEnd]['code']]) === true) { + continue; + } + + if ($tokens[$commentEnd]['code'] === T_ATTRIBUTE_END + && isset($tokens[$commentEnd]['attribute_opener']) === true + ) { + $commentEnd = $tokens[$commentEnd]['attribute_opener']; + continue; + } + + break; + } + + if ($tokens[$commentEnd]['code'] === T_COMMENT) { + // Inline comments might just be closing comments for + // control structures or functions instead of function comments + // using the wrong comment type. If there is other code on the line, + // assume they relate to that code. + $prev = $phpcsFile->findPrevious($ignore, ($commentEnd - 1), null, true); + if ($prev !== false && $tokens[$prev]['line'] === $tokens[$commentEnd]['line']) { + $commentEnd = $prev; + } + } + + if ($tokens[$commentEnd]['code'] !== T_DOC_COMMENT_CLOSE_TAG + && $tokens[$commentEnd]['code'] !== T_COMMENT + ) { + $function = $phpcsFile->getDeclarationName($stackPtr); + $phpcsFile->addError( + 'Missing doc comment for function %s()', + $stackPtr, + 'Missing', + [$function] + ); + $phpcsFile->recordMetric($stackPtr, 'Function has doc comment', 'no'); + return; + } else { + $phpcsFile->recordMetric($stackPtr, 'Function has doc comment', 'yes'); + } + + if ($tokens[$commentEnd]['code'] === T_COMMENT) { + $phpcsFile->addError('You must use "/**" style comments for a function comment', $stackPtr, 'WrongStyle'); + return; + } + + if ($tokens[$commentEnd]['line'] !== ($tokens[$stackPtr]['line'] - 1)) { + for ($i = ($commentEnd + 1); $i < $stackPtr; $i++) { + if ($tokens[$i]['column'] !== 1) { + continue; + } + + if ($tokens[$i]['code'] === T_WHITESPACE + && $tokens[$i]['line'] !== $tokens[($i + 1)]['line'] + ) { + $error = 'There must be no blank lines after the function comment'; + $phpcsFile->addError($error, $commentEnd, 'SpacingAfter'); + break; + } + } + } + + $commentStart = $tokens[$commentEnd]['comment_opener']; + foreach ($tokens[$commentStart]['comment_tags'] as $tag) { + if ($tokens[$tag]['content'] === '@see') { + // Make sure the tag isn't empty. + $string = $phpcsFile->findNext(T_DOC_COMMENT_STRING, $tag, $commentEnd); + if ($string === false || $tokens[$string]['line'] !== $tokens[$tag]['line']) { + $error = 'Content missing for @see tag in function comment'; + $phpcsFile->addError($error, $tag, 'EmptySees'); + } + } + } + + $this->processReturn($phpcsFile, $stackPtr, $commentStart); + $this->processThrows($phpcsFile, $stackPtr, $commentStart); + $this->processParams($phpcsFile, $stackPtr, $commentStart); + + }//end process() + + + /** + * Process the return comment of this function comment. + * + * @param \PHP_CodeSniffer\Files\File $phpcsFile The file being scanned. + * @param int $stackPtr The position of the current token + * in the stack passed in $tokens. + * @param int $commentStart The position in the stack where the comment started. + * + * @return void + */ + protected function processReturn(File $phpcsFile, $stackPtr, $commentStart) + { + $tokens = $phpcsFile->getTokens(); + + // Skip constructor and destructor. + $methodName = $phpcsFile->getDeclarationName($stackPtr); + $isSpecialMethod = in_array($methodName, $this->specialMethods, true); + + $return = null; + foreach ($tokens[$commentStart]['comment_tags'] as $tag) { + if ($tokens[$tag]['content'] === '@return') { + if ($return !== null) { + $error = 'Only 1 @return tag is allowed in a function comment'; + $phpcsFile->addError($error, $tag, 'DuplicateReturn'); + return; + } + + $return = $tag; + } + } + + if ($return !== null) { + $content = $tokens[($return + 2)]['content']; + if (empty($content) === true || $tokens[($return + 2)]['code'] !== T_DOC_COMMENT_STRING) { + $error = 'Return type missing for @return tag in function comment'; + $phpcsFile->addError($error, $return, 'MissingReturnType'); + } + } else { + if ($isSpecialMethod === true) { + return; + } + + $error = 'Missing @return tag in function comment'; + $phpcsFile->addError($error, $tokens[$commentStart]['comment_closer'], 'MissingReturn'); + }//end if + + }//end processReturn() + + + /** + * Process any throw tags that this function comment has. + * + * @param \PHP_CodeSniffer\Files\File $phpcsFile The file being scanned. + * @param int $stackPtr The position of the current token + * in the stack passed in $tokens. + * @param int $commentStart The position in the stack where the comment started. + * + * @return void + */ + protected function processThrows(File $phpcsFile, $stackPtr, $commentStart) + { + $tokens = $phpcsFile->getTokens(); + + foreach ($tokens[$commentStart]['comment_tags'] as $tag) { + if ($tokens[$tag]['content'] !== '@throws') { + continue; + } + + $exception = null; + if ($tokens[($tag + 2)]['code'] === T_DOC_COMMENT_STRING) { + $matches = []; + preg_match('/([^\s]+)(?:\s+(.*))?/', $tokens[($tag + 2)]['content'], $matches); + $exception = $matches[1]; + } + + if ($exception === null) { + $error = 'Exception type missing for @throws tag in function comment'; + $phpcsFile->addError($error, $tag, 'InvalidThrows'); + } + }//end foreach + + }//end processThrows() + + + /** + * Process the function parameter comments. + * + * @param \PHP_CodeSniffer\Files\File $phpcsFile The file being scanned. + * @param int $stackPtr The position of the current token + * in the stack passed in $tokens. + * @param int $commentStart The position in the stack where the comment started. + * + * @return void + */ + protected function processParams(File $phpcsFile, $stackPtr, $commentStart) + { + $tokens = $phpcsFile->getTokens(); + + $params = []; + $maxType = 0; + $maxVar = 0; + foreach ($tokens[$commentStart]['comment_tags'] as $pos => $tag) { + if ($tokens[$tag]['content'] !== '@param') { + continue; + } + + $type = ''; + $typeSpace = 0; + $var = ''; + $varSpace = 0; + $comment = ''; + $commentEnd = 0; + $commentTokens = []; + + if ($tokens[($tag + 2)]['code'] === T_DOC_COMMENT_STRING) { + $matches = []; + preg_match('/((?:(?![$.]|&(?=\$)).)*)(?:((?:\.\.\.)?(?:\$|&)[^\s]+)(?:(\s+)(.*))?)?/', $tokens[($tag + 2)]['content'], $matches); + + if (empty($matches) === false) { + $typeLen = strlen($matches[1]); + $type = trim($matches[1]); + $typeSpace = ($typeLen - strlen($type)); + $typeLen = strlen($type); + if ($typeLen > $maxType) { + $maxType = $typeLen; + } + } + + if (isset($matches[2]) === true) { + $var = $matches[2]; + $varLen = strlen($var); + if ($varLen > $maxVar) { + $maxVar = $varLen; + } + + if (isset($matches[4]) === true) { + $varSpace = strlen($matches[3]); + $comment = $matches[4]; + + // Any strings until the next tag belong to this comment. + if (isset($tokens[$commentStart]['comment_tags'][($pos + 1)]) === true) { + $end = $tokens[$commentStart]['comment_tags'][($pos + 1)]; + } else { + $end = $tokens[$commentStart]['comment_closer']; + } + + for ($i = ($tag + 3); $i < $end; $i++) { + if ($tokens[$i]['code'] === T_DOC_COMMENT_STRING) { + $comment .= ' '.$tokens[$i]['content']; + $commentEnd = $i; + $commentTokens[] = $i; + } + } + } else { + $error = 'Missing parameter comment'; + $phpcsFile->addError($error, $tag, 'MissingParamComment'); + }//end if + } else { + $error = 'Missing parameter name'; + $phpcsFile->addError($error, $tag, 'MissingParamName'); + }//end if + } else { + $error = 'Missing parameter type'; + $phpcsFile->addError($error, $tag, 'MissingParamType'); + }//end if + + $params[] = [ + 'tag' => $tag, + 'type' => $type, + 'var' => $var, + 'comment' => $comment, + 'comment_end' => $commentEnd, + 'comment_tokens' => $commentTokens, + 'type_space' => $typeSpace, + 'var_space' => $varSpace, + ]; + }//end foreach + + $realParams = $phpcsFile->getMethodParameters($stackPtr); + $foundParams = []; + + // We want to use ... for all variable length arguments, so add + // this prefix to the variable name so comparisons are easier. + foreach ($realParams as $pos => $param) { + if ($param['variable_length'] === true) { + $realParams[$pos]['name'] = '...'.$realParams[$pos]['name']; + } + } + + foreach ($params as $pos => $param) { + if ($param['var'] === '') { + continue; + } + + $foundParams[] = $param['var']; + + if (trim($param['type']) !== '') { + // Check number of spaces after the type. + $spaces = ($maxType - strlen($param['type']) + 1); + if ($param['type_space'] !== $spaces) { + $error = 'Expected %s spaces after parameter type; %s found'; + $data = [ + $spaces, + $param['type_space'], + ]; + + $fix = $phpcsFile->addFixableError($error, $param['tag'], 'SpacingAfterParamType', $data); + if ($fix === true) { + $commentToken = ($param['tag'] + 2); + + $content = $param['type']; + $content .= str_repeat(' ', $spaces); + $content .= $param['var']; + $content .= str_repeat(' ', $param['var_space']); + + $wrapLength = ($tokens[$commentToken]['length'] - $param['type_space'] - $param['var_space'] - strlen($param['type']) - strlen($param['var'])); + + $star = $phpcsFile->findPrevious(T_DOC_COMMENT_STAR, $param['tag']); + $spaceLength = (strlen($content) + $tokens[($commentToken - 1)]['length'] + $tokens[($commentToken - 2)]['length']); + + $padding = str_repeat(' ', ($tokens[$star]['column'] - 1)); + $padding .= '* '; + $padding .= str_repeat(' ', $spaceLength); + + $content .= wordwrap( + $param['comment'], + $wrapLength, + $phpcsFile->eolChar.$padding + ); + + $phpcsFile->fixer->replaceToken($commentToken, $content); + for ($i = ($commentToken + 1); $i <= $param['comment_end']; $i++) { + $phpcsFile->fixer->replaceToken($i, ''); + } + }//end if + }//end if + }//end if + + // Make sure the param name is correct. + if (isset($realParams[$pos]) === true) { + $realName = $realParams[$pos]['name']; + if ($realName !== $param['var']) { + $code = 'ParamNameNoMatch'; + $data = [ + $param['var'], + $realName, + ]; + + $error = 'Doc comment for parameter %s does not match '; + if (strtolower($param['var']) === strtolower($realName)) { + $error .= 'case of '; + $code = 'ParamNameNoCaseMatch'; + } + + $error .= 'actual variable name %s'; + + $phpcsFile->addError($error, $param['tag'], $code, $data); + } + } else if (substr($param['var'], -4) !== ',...') { + // We must have an extra parameter comment. + $error = 'Superfluous parameter comment'; + $phpcsFile->addError($error, $param['tag'], 'ExtraParamComment'); + }//end if + + if ($param['comment'] === '') { + continue; + } + + // Check number of spaces after the param name. + $spaces = ($maxVar - strlen($param['var']) + 1); + if ($param['var_space'] !== $spaces) { + $error = 'Expected %s spaces after parameter name; %s found'; + $data = [ + $spaces, + $param['var_space'], + ]; + + $fix = $phpcsFile->addFixableError($error, $param['tag'], 'SpacingAfterParamName', $data); + if ($fix === true) { + $commentToken = ($param['tag'] + 2); + + $content = $param['type']; + $content .= str_repeat(' ', $param['type_space']); + $content .= $param['var']; + $content .= str_repeat(' ', $spaces); + + $wrapLength = ($tokens[$commentToken]['length'] - $param['type_space'] - $param['var_space'] - strlen($param['type']) - strlen($param['var'])); + + $star = $phpcsFile->findPrevious(T_DOC_COMMENT_STAR, $param['tag']); + $spaceLength = (strlen($content) + $tokens[($commentToken - 1)]['length'] + $tokens[($commentToken - 2)]['length']); + + $padding = str_repeat(' ', ($tokens[$star]['column'] - 1)); + $padding .= '* '; + $padding .= str_repeat(' ', $spaceLength); + + $content .= wordwrap( + $param['comment'], + $wrapLength, + $phpcsFile->eolChar.$padding + ); + + $phpcsFile->fixer->replaceToken($commentToken, $content); + for ($i = ($commentToken + 1); $i <= $param['comment_end']; $i++) { + $phpcsFile->fixer->replaceToken($i, ''); + } + }//end if + }//end if + + // Check the alignment of multi-line param comments. + if ($param['tag'] !== $param['comment_end']) { + $wrapLength = ($tokens[($param['tag'] + 2)]['length'] - $param['type_space'] - $param['var_space'] - strlen($param['type']) - strlen($param['var'])); + + $startColumn = ($tokens[($param['tag'] + 2)]['column'] + $tokens[($param['tag'] + 2)]['length'] - $wrapLength); + + $star = $phpcsFile->findPrevious(T_DOC_COMMENT_STAR, $param['tag']); + $expected = ($startColumn - $tokens[$star]['column'] - 1); + + foreach ($param['comment_tokens'] as $commentToken) { + if ($tokens[$commentToken]['column'] === $startColumn) { + continue; + } + + $found = 0; + if ($tokens[($commentToken - 1)]['code'] === T_DOC_COMMENT_WHITESPACE) { + $found = $tokens[($commentToken - 1)]['length']; + } + + $error = 'Parameter comment not aligned correctly; expected %s spaces but found %s'; + $data = [ + $expected, + $found, + ]; + + if ($found < $expected) { + $code = 'ParamCommentAlignment'; + } else { + $code = 'ParamCommentAlignmentExceeded'; + } + + $fix = $phpcsFile->addFixableError($error, $commentToken, $code, $data); + if ($fix === true) { + $padding = str_repeat(' ', $expected); + if ($tokens[($commentToken - 1)]['code'] === T_DOC_COMMENT_WHITESPACE) { + $phpcsFile->fixer->replaceToken(($commentToken - 1), $padding); + } else { + $phpcsFile->fixer->addContentBefore($commentToken, $padding); + } + } + }//end foreach + }//end if + }//end foreach + + $realNames = []; + foreach ($realParams as $realParam) { + $realNames[] = $realParam['name']; + } + + // Report missing comments. + $diff = array_diff($realNames, $foundParams); + foreach ($diff as $neededParam) { + $error = 'Doc comment for parameter "%s" missing'; + $data = [$neededParam]; + $phpcsFile->addError($error, $commentStart, 'MissingParamTag', $data); + } + + }//end processParams() + + +}//end class diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/PEAR/Sniffs/Commenting/InlineCommentSniff.php b/vendor/squizlabs/php_codesniffer/src/Standards/PEAR/Sniffs/Commenting/InlineCommentSniff.php new file mode 100644 index 00000000..aa9f3753 --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/PEAR/Sniffs/Commenting/InlineCommentSniff.php @@ -0,0 +1,68 @@ + + * @copyright 2006-2015 Squiz Pty Ltd (ABN 77 084 670 600) + * @license https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence + */ + +namespace PHP_CodeSniffer\Standards\PEAR\Sniffs\Commenting; + +use PHP_CodeSniffer\Files\File; +use PHP_CodeSniffer\Sniffs\Sniff; + +class InlineCommentSniff implements Sniff +{ + + + /** + * Returns an array of tokens this test wants to listen for. + * + * @return array + */ + public function register() + { + return [T_COMMENT]; + + }//end register() + + + /** + * Processes this test, when one of its tokens is encountered. + * + * @param \PHP_CodeSniffer\Files\File $phpcsFile The file being scanned. + * @param int $stackPtr The position of the current token + * in the stack passed in $tokens. + * + * @return void + */ + public function process(File $phpcsFile, $stackPtr) + { + $tokens = $phpcsFile->getTokens(); + + if ($tokens[$stackPtr]['content'][0] === '#') { + $phpcsFile->recordMetric($stackPtr, 'Inline comment style', '# ...'); + + $error = 'Perl-style comments are not allowed. Use "// Comment."'; + $error .= ' or "/* comment */" instead.'; + $fix = $phpcsFile->addFixableError($error, $stackPtr, 'WrongStyle'); + if ($fix === true) { + $newComment = ltrim($tokens[$stackPtr]['content'], '# '); + $newComment = '// '.$newComment; + $phpcsFile->fixer->replaceToken($stackPtr, $newComment); + } + } else if ($tokens[$stackPtr]['content'][0] === '/' + && $tokens[$stackPtr]['content'][1] === '/' + ) { + $phpcsFile->recordMetric($stackPtr, 'Inline comment style', '// ...'); + } else if ($tokens[$stackPtr]['content'][0] === '/' + && $tokens[$stackPtr]['content'][1] === '*' + ) { + $phpcsFile->recordMetric($stackPtr, 'Inline comment style', '/* ... */'); + } + + }//end process() + + +}//end class diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/PEAR/Sniffs/ControlStructures/ControlSignatureSniff.php b/vendor/squizlabs/php_codesniffer/src/Standards/PEAR/Sniffs/ControlStructures/ControlSignatureSniff.php new file mode 100644 index 00000000..edd2d6be --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/PEAR/Sniffs/ControlStructures/ControlSignatureSniff.php @@ -0,0 +1,48 @@ + + * @copyright 2006-2015 Squiz Pty Ltd (ABN 77 084 670 600) + * @license https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence + */ + +namespace PHP_CodeSniffer\Standards\PEAR\Sniffs\ControlStructures; + +use PHP_CodeSniffer\Sniffs\AbstractPatternSniff; + +class ControlSignatureSniff extends AbstractPatternSniff +{ + + /** + * If true, comments will be ignored if they are found in the code. + * + * @var boolean + */ + public $ignoreComments = true; + + + /** + * Returns the patterns that this test wishes to verify. + * + * @return string[] + */ + protected function getPatterns() + { + return [ + 'do {EOL...} while (...);EOL', + 'while (...) {EOL', + 'for (...) {EOL', + 'if (...) {EOL', + 'foreach (...) {EOL', + '} else if (...) {EOL', + '} elseif (...) {EOL', + '} else {EOL', + 'do {EOL', + 'match (...) {EOL', + ]; + + }//end getPatterns() + + +}//end class diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/PEAR/Sniffs/ControlStructures/MultiLineConditionSniff.php b/vendor/squizlabs/php_codesniffer/src/Standards/PEAR/Sniffs/ControlStructures/MultiLineConditionSniff.php new file mode 100644 index 00000000..fff62bb1 --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/PEAR/Sniffs/ControlStructures/MultiLineConditionSniff.php @@ -0,0 +1,283 @@ + + * @copyright 2006-2015 Squiz Pty Ltd (ABN 77 084 670 600) + * @license https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence + */ + +namespace PHP_CodeSniffer\Standards\PEAR\Sniffs\ControlStructures; + +use PHP_CodeSniffer\Files\File; +use PHP_CodeSniffer\Sniffs\Sniff; +use PHP_CodeSniffer\Util\Tokens; + +class MultiLineConditionSniff implements Sniff +{ + + /** + * A list of tokenizers this sniff supports. + * + * @var array + */ + public $supportedTokenizers = [ + 'PHP', + 'JS', + ]; + + /** + * The number of spaces code should be indented. + * + * @var integer + */ + public $indent = 4; + + + /** + * Returns an array of tokens this test wants to listen for. + * + * @return array + */ + public function register() + { + return [ + T_IF, + T_ELSEIF, + ]; + + }//end register() + + + /** + * Processes this test, when one of its tokens is encountered. + * + * @param \PHP_CodeSniffer\Files\File $phpcsFile The file being scanned. + * @param int $stackPtr The position of the current token + * in the stack passed in $tokens. + * + * @return void + */ + public function process(File $phpcsFile, $stackPtr) + { + $tokens = $phpcsFile->getTokens(); + + if (isset($tokens[$stackPtr]['parenthesis_opener']) === false) { + return; + } + + $openBracket = $tokens[$stackPtr]['parenthesis_opener']; + $closeBracket = $tokens[$stackPtr]['parenthesis_closer']; + $spaceAfterOpen = 0; + if ($tokens[($openBracket + 1)]['code'] === T_WHITESPACE) { + if (strpos($tokens[($openBracket + 1)]['content'], $phpcsFile->eolChar) !== false) { + $spaceAfterOpen = 'newline'; + } else { + $spaceAfterOpen = $tokens[($openBracket + 1)]['length']; + } + } + + if ($spaceAfterOpen !== 0) { + $error = 'First condition of a multi-line IF statement must directly follow the opening parenthesis'; + $fix = $phpcsFile->addFixableError($error, ($openBracket + 1), 'SpacingAfterOpenBrace'); + if ($fix === true) { + if ($spaceAfterOpen === 'newline') { + $phpcsFile->fixer->replaceToken(($openBracket + 1), ''); + } else { + $phpcsFile->fixer->replaceToken(($openBracket + 1), ''); + } + } + } + + // We need to work out how far indented the if statement + // itself is, so we can work out how far to indent conditions. + $statementIndent = 0; + for ($i = ($stackPtr - 1); $i >= 0; $i--) { + if ($tokens[$i]['line'] !== $tokens[$stackPtr]['line']) { + $i++; + break; + } + } + + if ($i >= 0 && $tokens[$i]['code'] === T_WHITESPACE) { + $statementIndent = $tokens[$i]['length']; + } + + // Each line between the parenthesis should be indented 4 spaces + // and start with an operator, unless the line is inside a + // function call, in which case it is ignored. + $prevLine = $tokens[$openBracket]['line']; + for ($i = ($openBracket + 1); $i <= $closeBracket; $i++) { + if ($i === $closeBracket && $tokens[$openBracket]['line'] !== $tokens[$i]['line']) { + $prev = $phpcsFile->findPrevious(T_WHITESPACE, ($i - 1), null, true); + if ($tokens[$prev]['line'] === $tokens[$i]['line']) { + // Closing bracket is on the same line as a condition. + $error = 'Closing parenthesis of a multi-line IF statement must be on a new line'; + $fix = $phpcsFile->addFixableError($error, $closeBracket, 'CloseBracketNewLine'); + if ($fix === true) { + // Account for a comment at the end of the line. + $next = $phpcsFile->findNext(T_WHITESPACE, ($closeBracket + 1), null, true); + if ($tokens[$next]['code'] !== T_COMMENT + && isset(Tokens::$phpcsCommentTokens[$tokens[$next]['code']]) === false + ) { + $phpcsFile->fixer->addNewlineBefore($closeBracket); + } else { + $next = $phpcsFile->findNext(Tokens::$emptyTokens, ($next + 1), null, true); + $phpcsFile->fixer->beginChangeset(); + $phpcsFile->fixer->replaceToken($closeBracket, ''); + $phpcsFile->fixer->addContentBefore($next, ')'); + $phpcsFile->fixer->endChangeset(); + } + } + } + }//end if + + if ($tokens[$i]['line'] !== $prevLine) { + if ($tokens[$i]['line'] === $tokens[$closeBracket]['line']) { + $next = $phpcsFile->findNext(T_WHITESPACE, $i, null, true); + if ($next !== $closeBracket) { + $expectedIndent = ($statementIndent + $this->indent); + } else { + // Closing brace needs to be indented to the same level + // as the statement. + $expectedIndent = $statementIndent; + }//end if + } else { + $expectedIndent = ($statementIndent + $this->indent); + }//end if + + if ($tokens[$i]['code'] === T_COMMENT + || isset(Tokens::$phpcsCommentTokens[$tokens[$i]['code']]) === true + ) { + $prevLine = $tokens[$i]['line']; + continue; + } + + // We changed lines, so this should be a whitespace indent token. + if ($tokens[$i]['code'] !== T_WHITESPACE) { + $foundIndent = 0; + } else { + $foundIndent = $tokens[$i]['length']; + } + + if ($expectedIndent !== $foundIndent) { + $error = 'Multi-line IF statement not indented correctly; expected %s spaces but found %s'; + $data = [ + $expectedIndent, + $foundIndent, + ]; + + $fix = $phpcsFile->addFixableError($error, $i, 'Alignment', $data); + if ($fix === true) { + $spaces = str_repeat(' ', $expectedIndent); + if ($foundIndent === 0) { + $phpcsFile->fixer->addContentBefore($i, $spaces); + } else { + $phpcsFile->fixer->replaceToken($i, $spaces); + } + } + } + + $next = $phpcsFile->findNext(Tokens::$emptyTokens, $i, null, true); + if ($next !== $closeBracket && $tokens[$next]['line'] === $tokens[$i]['line']) { + if (isset(Tokens::$booleanOperators[$tokens[$next]['code']]) === false) { + $prev = $phpcsFile->findPrevious(Tokens::$emptyTokens, ($i - 1), $openBracket, true); + $fixable = true; + if (isset(Tokens::$booleanOperators[$tokens[$prev]['code']]) === false + && $phpcsFile->findNext(T_WHITESPACE, ($prev + 1), $next, true) !== false + ) { + // Condition spread over multi-lines interspersed with comments. + $fixable = false; + } + + $error = 'Each line in a multi-line IF statement must begin with a boolean operator'; + if ($fixable === false) { + $phpcsFile->addError($error, $next, 'StartWithBoolean'); + } else { + $fix = $phpcsFile->addFixableError($error, $next, 'StartWithBoolean'); + if ($fix === true) { + if (isset(Tokens::$booleanOperators[$tokens[$prev]['code']]) === true) { + $phpcsFile->fixer->beginChangeset(); + $phpcsFile->fixer->replaceToken($prev, ''); + $phpcsFile->fixer->addContentBefore($next, $tokens[$prev]['content'].' '); + $phpcsFile->fixer->endChangeset(); + } else { + for ($x = ($prev + 1); $x < $next; $x++) { + $phpcsFile->fixer->replaceToken($x, ''); + } + } + } + } + }//end if + }//end if + + $prevLine = $tokens[$i]['line']; + }//end if + + if ($tokens[$i]['code'] === T_STRING) { + $next = $phpcsFile->findNext(T_WHITESPACE, ($i + 1), null, true); + if ($tokens[$next]['code'] === T_OPEN_PARENTHESIS) { + // This is a function call, so skip to the end as they + // have their own indentation rules. + $i = $tokens[$next]['parenthesis_closer']; + $prevLine = $tokens[$i]['line']; + continue; + } + } + }//end for + + // From here on, we are checking the spacing of the opening and closing + // braces. If this IF statement does not use braces, we end here. + if (isset($tokens[$stackPtr]['scope_opener']) === false) { + return; + } + + // The opening brace needs to be one space away from the closing parenthesis. + $openBrace = $tokens[$stackPtr]['scope_opener']; + $next = $phpcsFile->findNext(T_WHITESPACE, ($closeBracket + 1), $openBrace, true); + if ($next !== false) { + // Probably comments in between tokens, so don't check. + return; + } + + if ($tokens[$openBrace]['line'] > $tokens[$closeBracket]['line']) { + $length = -1; + } else if ($openBrace === ($closeBracket + 1)) { + $length = 0; + } else if ($openBrace === ($closeBracket + 2) + && $tokens[($closeBracket + 1)]['code'] === T_WHITESPACE + ) { + $length = $tokens[($closeBracket + 1)]['length']; + } else { + // Confused, so don't check. + $length = 1; + } + + if ($length === 1) { + return; + } + + $data = [$length]; + $code = 'SpaceBeforeOpenBrace'; + + $error = 'There must be a single space between the closing parenthesis and the opening brace of a multi-line IF statement; found '; + if ($length === -1) { + $error .= 'newline'; + $code = 'NewlineBeforeOpenBrace'; + } else { + $error .= '%s spaces'; + } + + $fix = $phpcsFile->addFixableError($error, ($closeBracket + 1), $code, $data); + if ($fix === true) { + if ($length === 0) { + $phpcsFile->fixer->addContent($closeBracket, ' '); + } else { + $phpcsFile->fixer->replaceToken(($closeBracket + 1), ' '); + } + } + + }//end process() + + +}//end class diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/PEAR/Sniffs/Files/IncludingFileSniff.php b/vendor/squizlabs/php_codesniffer/src/Standards/PEAR/Sniffs/Files/IncludingFileSniff.php new file mode 100644 index 00000000..04f208de --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/PEAR/Sniffs/Files/IncludingFileSniff.php @@ -0,0 +1,136 @@ + + * @copyright 2006-2015 Squiz Pty Ltd (ABN 77 084 670 600) + * @license https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence + */ + +namespace PHP_CodeSniffer\Standards\PEAR\Sniffs\Files; + +use PHP_CodeSniffer\Files\File; +use PHP_CodeSniffer\Sniffs\Sniff; +use PHP_CodeSniffer\Util\Tokens; + +class IncludingFileSniff implements Sniff +{ + + + /** + * Returns an array of tokens this test wants to listen for. + * + * @return array + */ + public function register() + { + return [ + T_INCLUDE_ONCE, + T_REQUIRE_ONCE, + T_REQUIRE, + T_INCLUDE, + ]; + + }//end register() + + + /** + * Processes this test, when one of its tokens is encountered. + * + * @param \PHP_CodeSniffer\Files\File $phpcsFile The file being scanned. + * @param int $stackPtr The position of the current token in the + * stack passed in $tokens. + * + * @return void + */ + public function process(File $phpcsFile, $stackPtr) + { + $tokens = $phpcsFile->getTokens(); + + $nextToken = $phpcsFile->findNext(Tokens::$emptyTokens, ($stackPtr + 1), null, true); + if ($tokens[$nextToken]['code'] === T_OPEN_PARENTHESIS) { + $error = '"%s" is a statement not a function; no parentheses are required'; + $data = [$tokens[$stackPtr]['content']]; + $fix = $phpcsFile->addFixableError($error, $stackPtr, 'BracketsNotRequired', $data); + if ($fix === true) { + $phpcsFile->fixer->beginChangeset(); + $phpcsFile->fixer->replaceToken($tokens[$nextToken]['parenthesis_closer'], ''); + if ($tokens[($nextToken - 1)]['code'] !== T_WHITESPACE) { + $phpcsFile->fixer->replaceToken($nextToken, ' '); + } else { + $phpcsFile->fixer->replaceToken($nextToken, ''); + } + + $phpcsFile->fixer->endChangeset(); + } + } + + if (count($tokens[$stackPtr]['conditions']) !== 0) { + $inCondition = true; + } else { + $inCondition = false; + } + + // Check to see if this including statement is within the parenthesis + // of a condition. If that's the case then we need to process it as being + // within a condition, as they are checking the return value. + if (isset($tokens[$stackPtr]['nested_parenthesis']) === true) { + foreach ($tokens[$stackPtr]['nested_parenthesis'] as $left => $right) { + if (isset($tokens[$left]['parenthesis_owner']) === true) { + $inCondition = true; + } + } + } + + // Check to see if they are assigning the return value of this + // including call. If they are then they are probably checking it, so + // it's conditional. + $previous = $phpcsFile->findPrevious(Tokens::$emptyTokens, ($stackPtr - 1), null, true); + if (isset(Tokens::$assignmentTokens[$tokens[$previous]['code']]) === true) { + // The have assigned the return value to it, so its conditional. + $inCondition = true; + } + + $tokenCode = $tokens[$stackPtr]['code']; + if ($inCondition === true) { + // We are inside a conditional statement. We need an include_once. + if ($tokenCode === T_REQUIRE_ONCE) { + $error = 'File is being conditionally included; '; + $error .= 'use "include_once" instead'; + $fix = $phpcsFile->addFixableError($error, $stackPtr, 'UseIncludeOnce'); + if ($fix === true) { + $phpcsFile->fixer->replaceToken($stackPtr, 'include_once'); + } + } else if ($tokenCode === T_REQUIRE) { + $error = 'File is being conditionally included; '; + $error .= 'use "include" instead'; + $fix = $phpcsFile->addFixableError($error, $stackPtr, 'UseInclude'); + if ($fix === true) { + $phpcsFile->fixer->replaceToken($stackPtr, 'include'); + } + } + } else { + // We are unconditionally including, we need a require_once. + if ($tokenCode === T_INCLUDE_ONCE) { + $error = 'File is being unconditionally included; '; + $error .= 'use "require_once" instead'; + $fix = $phpcsFile->addFixableError($error, $stackPtr, 'UseRequireOnce'); + if ($fix === true) { + $phpcsFile->fixer->replaceToken($stackPtr, 'require_once'); + } + } else if ($tokenCode === T_INCLUDE) { + $error = 'File is being unconditionally included; '; + $error .= 'use "require" instead'; + $fix = $phpcsFile->addFixableError($error, $stackPtr, 'UseRequire'); + if ($fix === true) { + $phpcsFile->fixer->replaceToken($stackPtr, 'require'); + } + } + }//end if + + }//end process() + + +}//end class diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/PEAR/Sniffs/Formatting/MultiLineAssignmentSniff.php b/vendor/squizlabs/php_codesniffer/src/Standards/PEAR/Sniffs/Formatting/MultiLineAssignmentSniff.php new file mode 100644 index 00000000..0a7ff7db --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/PEAR/Sniffs/Formatting/MultiLineAssignmentSniff.php @@ -0,0 +1,106 @@ + + * @copyright 2006-2015 Squiz Pty Ltd (ABN 77 084 670 600) + * @license https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence + */ + +namespace PHP_CodeSniffer\Standards\PEAR\Sniffs\Formatting; + +use PHP_CodeSniffer\Files\File; +use PHP_CodeSniffer\Sniffs\Sniff; + +class MultiLineAssignmentSniff implements Sniff +{ + + /** + * The number of spaces code should be indented. + * + * @var integer + */ + public $indent = 4; + + + /** + * Returns an array of tokens this test wants to listen for. + * + * @return array + */ + public function register() + { + return [T_EQUAL]; + + }//end register() + + + /** + * Processes this test, when one of its tokens is encountered. + * + * @param \PHP_CodeSniffer\Files\File $phpcsFile The file being scanned. + * @param int $stackPtr The position of the current token + * in the stack passed in $tokens. + * + * @return void + */ + public function process(File $phpcsFile, $stackPtr) + { + $tokens = $phpcsFile->getTokens(); + + // Equal sign can't be the last thing on the line. + $next = $phpcsFile->findNext(T_WHITESPACE, ($stackPtr + 1), null, true); + if ($next === false) { + // Bad assignment. + return; + } + + if ($tokens[$next]['line'] !== $tokens[$stackPtr]['line']) { + $error = 'Multi-line assignments must have the equal sign on the second line'; + $phpcsFile->addError($error, $stackPtr, 'EqualSignLine'); + return; + } + + // Make sure it is the first thing on the line, otherwise we ignore it. + $prev = $phpcsFile->findPrevious(T_WHITESPACE, ($stackPtr - 1), false, true); + if ($prev === false) { + // Bad assignment. + return; + } + + if ($tokens[$prev]['line'] === $tokens[$stackPtr]['line']) { + return; + } + + // Find the required indent based on the ident of the previous line. + $assignmentIndent = 0; + $prevLine = $tokens[$prev]['line']; + for ($i = ($prev - 1); $i >= 0; $i--) { + if ($tokens[$i]['line'] !== $prevLine) { + $i++; + break; + } + } + + if ($tokens[$i]['code'] === T_WHITESPACE) { + $assignmentIndent = $tokens[$i]['length']; + } + + // Find the actual indent. + $prev = $phpcsFile->findPrevious(T_WHITESPACE, ($stackPtr - 1)); + + $expectedIndent = ($assignmentIndent + $this->indent); + $foundIndent = $tokens[$prev]['length']; + if ($foundIndent !== $expectedIndent) { + $error = 'Multi-line assignment not indented correctly; expected %s spaces but found %s'; + $data = [ + $expectedIndent, + $foundIndent, + ]; + $phpcsFile->addError($error, $stackPtr, 'Indent', $data); + } + + }//end process() + + +}//end class diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/PEAR/Sniffs/Functions/FunctionCallSignatureSniff.php b/vendor/squizlabs/php_codesniffer/src/Standards/PEAR/Sniffs/Functions/FunctionCallSignatureSniff.php new file mode 100644 index 00000000..3a339abe --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/PEAR/Sniffs/Functions/FunctionCallSignatureSniff.php @@ -0,0 +1,628 @@ + + * @copyright 2006-2015 Squiz Pty Ltd (ABN 77 084 670 600) + * @license https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence + */ + +namespace PHP_CodeSniffer\Standards\PEAR\Sniffs\Functions; + +use PHP_CodeSniffer\Files\File; +use PHP_CodeSniffer\Sniffs\Sniff; +use PHP_CodeSniffer\Util\Tokens; + +class FunctionCallSignatureSniff implements Sniff +{ + + /** + * A list of tokenizers this sniff supports. + * + * @var array + */ + public $supportedTokenizers = [ + 'PHP', + 'JS', + ]; + + /** + * The number of spaces code should be indented. + * + * @var integer + */ + public $indent = 4; + + /** + * If TRUE, multiple arguments can be defined per line in a multi-line call. + * + * @var boolean + */ + public $allowMultipleArguments = true; + + /** + * How many spaces should follow the opening bracket. + * + * @var integer + */ + public $requiredSpacesAfterOpen = 0; + + /** + * How many spaces should precede the closing bracket. + * + * @var integer + */ + public $requiredSpacesBeforeClose = 0; + + + /** + * Returns an array of tokens this test wants to listen for. + * + * @return array + */ + public function register() + { + $tokens = Tokens::$functionNameTokens; + + $tokens[] = T_VARIABLE; + $tokens[] = T_CLOSE_CURLY_BRACKET; + $tokens[] = T_CLOSE_SQUARE_BRACKET; + $tokens[] = T_CLOSE_PARENTHESIS; + + return $tokens; + + }//end register() + + + /** + * Processes this test, when one of its tokens is encountered. + * + * @param \PHP_CodeSniffer\Files\File $phpcsFile The file being scanned. + * @param int $stackPtr The position of the current token + * in the stack passed in $tokens. + * + * @return void + */ + public function process(File $phpcsFile, $stackPtr) + { + $this->requiredSpacesAfterOpen = (int) $this->requiredSpacesAfterOpen; + $this->requiredSpacesBeforeClose = (int) $this->requiredSpacesBeforeClose; + $tokens = $phpcsFile->getTokens(); + + if ($tokens[$stackPtr]['code'] === T_CLOSE_CURLY_BRACKET + && isset($tokens[$stackPtr]['scope_condition']) === true + ) { + // Not a function call. + return; + } + + // Find the next non-empty token. + $openBracket = $phpcsFile->findNext(Tokens::$emptyTokens, ($stackPtr + 1), null, true); + + if ($tokens[$openBracket]['code'] !== T_OPEN_PARENTHESIS) { + // Not a function call. + return; + } + + if (isset($tokens[$openBracket]['parenthesis_closer']) === false) { + // Not a function call. + return; + } + + // Find the previous non-empty token. + $search = Tokens::$emptyTokens; + $search[] = T_BITWISE_AND; + $previous = $phpcsFile->findPrevious($search, ($stackPtr - 1), null, true); + if ($tokens[$previous]['code'] === T_FUNCTION) { + // It's a function definition, not a function call. + return; + } + + $closeBracket = $tokens[$openBracket]['parenthesis_closer']; + + if (($stackPtr + 1) !== $openBracket) { + // Checking this: $value = my_function[*](...). + $error = 'Space before opening parenthesis of function call prohibited'; + $fix = $phpcsFile->addFixableError($error, $stackPtr, 'SpaceBeforeOpenBracket'); + if ($fix === true) { + $phpcsFile->fixer->beginChangeset(); + for ($i = ($stackPtr + 1); $i < $openBracket; $i++) { + $phpcsFile->fixer->replaceToken($i, ''); + } + + // Modify the bracket as well to ensure a conflict if the bracket + // has been changed in some way by another sniff. + $phpcsFile->fixer->replaceToken($openBracket, '('); + $phpcsFile->fixer->endChangeset(); + } + } + + $next = $phpcsFile->findNext(T_WHITESPACE, ($closeBracket + 1), null, true); + if ($tokens[$next]['code'] === T_SEMICOLON) { + if (isset(Tokens::$emptyTokens[$tokens[($closeBracket + 1)]['code']]) === true) { + $error = 'Space after closing parenthesis of function call prohibited'; + $fix = $phpcsFile->addFixableError($error, $closeBracket, 'SpaceAfterCloseBracket'); + if ($fix === true) { + $phpcsFile->fixer->beginChangeset(); + for ($i = ($closeBracket + 1); $i < $next; $i++) { + $phpcsFile->fixer->replaceToken($i, ''); + } + + // Modify the bracket as well to ensure a conflict if the bracket + // has been changed in some way by another sniff. + $phpcsFile->fixer->replaceToken($closeBracket, ')'); + $phpcsFile->fixer->endChangeset(); + } + } + } + + // Check if this is a single line or multi-line function call. + if ($this->isMultiLineCall($phpcsFile, $stackPtr, $openBracket, $tokens) === true) { + $this->processMultiLineCall($phpcsFile, $stackPtr, $openBracket, $tokens); + } else { + $this->processSingleLineCall($phpcsFile, $stackPtr, $openBracket, $tokens); + } + + }//end process() + + + /** + * Determine if this is a multi-line function call. + * + * @param \PHP_CodeSniffer\Files\File $phpcsFile The file being scanned. + * @param int $stackPtr The position of the current token + * in the stack passed in $tokens. + * @param int $openBracket The position of the opening bracket + * in the stack passed in $tokens. + * @param array $tokens The stack of tokens that make up + * the file. + * + * @return bool + */ + public function isMultiLineCall(File $phpcsFile, $stackPtr, $openBracket, $tokens) + { + $closeBracket = $tokens[$openBracket]['parenthesis_closer']; + if ($tokens[$openBracket]['line'] !== $tokens[$closeBracket]['line']) { + return true; + } + + return false; + + }//end isMultiLineCall() + + + /** + * Processes single-line calls. + * + * @param \PHP_CodeSniffer\Files\File $phpcsFile The file being scanned. + * @param int $stackPtr The position of the current token + * in the stack passed in $tokens. + * @param int $openBracket The position of the opening bracket + * in the stack passed in $tokens. + * @param array $tokens The stack of tokens that make up + * the file. + * + * @return void + */ + public function processSingleLineCall(File $phpcsFile, $stackPtr, $openBracket, $tokens) + { + $closer = $tokens[$openBracket]['parenthesis_closer']; + if ($openBracket === ($closer - 1)) { + return; + } + + // If the function call has no arguments or comments, enforce 0 spaces. + $next = $phpcsFile->findNext(T_WHITESPACE, ($openBracket + 1), $closer, true); + if ($next === false) { + $requiredSpacesAfterOpen = 0; + $requiredSpacesBeforeClose = 0; + } else { + $requiredSpacesAfterOpen = $this->requiredSpacesAfterOpen; + $requiredSpacesBeforeClose = $this->requiredSpacesBeforeClose; + } + + if ($requiredSpacesAfterOpen === 0 && $tokens[($openBracket + 1)]['code'] === T_WHITESPACE) { + // Checking this: $value = my_function([*]...). + $error = 'Space after opening parenthesis of function call prohibited'; + $fix = $phpcsFile->addFixableError($error, $stackPtr, 'SpaceAfterOpenBracket'); + if ($fix === true) { + $phpcsFile->fixer->replaceToken(($openBracket + 1), ''); + } + } else if ($requiredSpacesAfterOpen > 0) { + $spaceAfterOpen = 0; + if ($tokens[($openBracket + 1)]['code'] === T_WHITESPACE) { + $spaceAfterOpen = $tokens[($openBracket + 1)]['length']; + } + + if ($spaceAfterOpen !== $requiredSpacesAfterOpen) { + $error = 'Expected %s spaces after opening parenthesis; %s found'; + $data = [ + $requiredSpacesAfterOpen, + $spaceAfterOpen, + ]; + $fix = $phpcsFile->addFixableError($error, $stackPtr, 'SpaceAfterOpenBracket', $data); + if ($fix === true) { + $padding = str_repeat(' ', $requiredSpacesAfterOpen); + if ($spaceAfterOpen === 0) { + $phpcsFile->fixer->addContent($openBracket, $padding); + } else { + $phpcsFile->fixer->replaceToken(($openBracket + 1), $padding); + } + } + } + }//end if + + // Checking this: $value = my_function(...[*]). + $spaceBeforeClose = 0; + $prev = $phpcsFile->findPrevious(T_WHITESPACE, ($closer - 1), $openBracket, true); + if ($tokens[$prev]['code'] === T_END_HEREDOC || $tokens[$prev]['code'] === T_END_NOWDOC) { + // Need a newline after these tokens, so ignore this rule. + return; + } + + if ($tokens[$prev]['line'] !== $tokens[$closer]['line']) { + $spaceBeforeClose = 'newline'; + } else if ($tokens[($closer - 1)]['code'] === T_WHITESPACE) { + $spaceBeforeClose = $tokens[($closer - 1)]['length']; + } + + if ($spaceBeforeClose !== $requiredSpacesBeforeClose) { + $error = 'Expected %s spaces before closing parenthesis; %s found'; + $data = [ + $requiredSpacesBeforeClose, + $spaceBeforeClose, + ]; + $fix = $phpcsFile->addFixableError($error, $closer, 'SpaceBeforeCloseBracket', $data); + if ($fix === true) { + $padding = str_repeat(' ', $requiredSpacesBeforeClose); + + if ($spaceBeforeClose === 0) { + $phpcsFile->fixer->addContentBefore($closer, $padding); + } else if ($spaceBeforeClose === 'newline') { + $phpcsFile->fixer->beginChangeset(); + + $closingContent = ')'; + + $next = $phpcsFile->findNext(T_WHITESPACE, ($closer + 1), null, true); + if ($tokens[$next]['code'] === T_SEMICOLON) { + $closingContent .= ';'; + for ($i = ($closer + 1); $i <= $next; $i++) { + $phpcsFile->fixer->replaceToken($i, ''); + } + } + + // We want to jump over any whitespace or inline comment and + // move the closing parenthesis after any other token. + $prev = ($closer - 1); + while (isset(Tokens::$emptyTokens[$tokens[$prev]['code']]) === true) { + if (($tokens[$prev]['code'] === T_COMMENT) + && (strpos($tokens[$prev]['content'], '*/') !== false) + ) { + break; + } + + $prev--; + } + + $phpcsFile->fixer->addContent($prev, $padding.$closingContent); + + $prevNonWhitespace = $phpcsFile->findPrevious(T_WHITESPACE, ($closer - 1), null, true); + for ($i = ($prevNonWhitespace + 1); $i <= $closer; $i++) { + $phpcsFile->fixer->replaceToken($i, ''); + } + + $phpcsFile->fixer->endChangeset(); + } else { + $phpcsFile->fixer->replaceToken(($closer - 1), $padding); + }//end if + }//end if + }//end if + + }//end processSingleLineCall() + + + /** + * Processes multi-line calls. + * + * @param \PHP_CodeSniffer\Files\File $phpcsFile The file being scanned. + * @param int $stackPtr The position of the current token + * in the stack passed in $tokens. + * @param int $openBracket The position of the opening bracket + * in the stack passed in $tokens. + * @param array $tokens The stack of tokens that make up + * the file. + * + * @return void + */ + public function processMultiLineCall(File $phpcsFile, $stackPtr, $openBracket, $tokens) + { + // We need to work out how far indented the function + // call itself is, so we can work out how far to + // indent the arguments. + $first = $phpcsFile->findFirstOnLine(T_WHITESPACE, $stackPtr, true); + if ($tokens[$first]['code'] === T_CONSTANT_ENCAPSED_STRING + && $tokens[($first - 1)]['code'] === T_CONSTANT_ENCAPSED_STRING + ) { + // We are in a multi-line string, so find the start and use + // the indent from there. + $prev = $phpcsFile->findPrevious(T_CONSTANT_ENCAPSED_STRING, ($first - 2), null, true); + $first = $phpcsFile->findFirstOnLine(Tokens::$emptyTokens, $prev, true); + if ($first === false) { + $first = ($prev + 1); + } + } + + $foundFunctionIndent = 0; + if ($first !== false) { + if ($tokens[$first]['code'] === T_INLINE_HTML + || ($tokens[$first]['code'] === T_CONSTANT_ENCAPSED_STRING + && $tokens[($first - 1)]['code'] === T_CONSTANT_ENCAPSED_STRING) + ) { + $trimmed = ltrim($tokens[$first]['content']); + if ($trimmed === '') { + $foundFunctionIndent = strlen($tokens[$first]['content']); + } else { + $foundFunctionIndent = (strlen($tokens[$first]['content']) - strlen($trimmed)); + } + } else { + $foundFunctionIndent = ($tokens[$first]['column'] - 1); + } + } + + // Make sure the function indent is divisible by the indent size. + // We round down here because this accounts for times when the + // surrounding code is indented a little too far in, and not correctly + // at a tab stop. Without this, the function will be indented a further + // $indent spaces to the right. + $functionIndent = (int) (floor($foundFunctionIndent / $this->indent) * $this->indent); + $adjustment = 0; + + if ($foundFunctionIndent !== $functionIndent) { + $error = 'Opening statement of multi-line function call not indented correctly; expected %s spaces but found %s'; + $data = [ + $functionIndent, + $foundFunctionIndent, + ]; + + $fix = $phpcsFile->addFixableError($error, $first, 'OpeningIndent', $data); + if ($fix === true) { + $adjustment = ($functionIndent - $foundFunctionIndent); + $padding = str_repeat(' ', $functionIndent); + if ($foundFunctionIndent === 0) { + $phpcsFile->fixer->addContentBefore($first, $padding); + } else { + $phpcsFile->fixer->replaceToken(($first - 1), $padding); + } + } + } + + $next = $phpcsFile->findNext(Tokens::$emptyTokens, ($openBracket + 1), null, true); + if ($tokens[$next]['line'] === $tokens[$openBracket]['line']) { + $error = 'Opening parenthesis of a multi-line function call must be the last content on the line'; + $fix = $phpcsFile->addFixableError($error, $stackPtr, 'ContentAfterOpenBracket'); + if ($fix === true) { + $phpcsFile->fixer->addContent( + $openBracket, + $phpcsFile->eolChar.str_repeat(' ', ($foundFunctionIndent + $this->indent)) + ); + } + } + + $closeBracket = $tokens[$openBracket]['parenthesis_closer']; + $prev = $phpcsFile->findPrevious(T_WHITESPACE, ($closeBracket - 1), null, true); + if ($tokens[$prev]['line'] === $tokens[$closeBracket]['line']) { + $error = 'Closing parenthesis of a multi-line function call must be on a line by itself'; + $fix = $phpcsFile->addFixableError($error, $closeBracket, 'CloseBracketLine'); + if ($fix === true) { + $phpcsFile->fixer->addContentBefore( + $closeBracket, + $phpcsFile->eolChar.str_repeat(' ', ($foundFunctionIndent + $this->indent)) + ); + } + } + + // Each line between the parenthesis should be indented n spaces. + $lastLine = ($tokens[$openBracket]['line'] - 1); + $argStart = null; + $argEnd = null; + + // Start processing at the first argument. + $i = $phpcsFile->findNext(T_WHITESPACE, ($openBracket + 1), null, true); + + if ($tokens[$i]['line'] > ($tokens[$openBracket]['line'] + 1)) { + $error = 'The first argument in a multi-line function call must be on the line after the opening parenthesis'; + $fix = $phpcsFile->addFixableError($error, $i, 'FirstArgumentPosition'); + if ($fix === true) { + $phpcsFile->fixer->beginChangeset(); + for ($x = ($openBracket + 1); $x < $i; $x++) { + if ($tokens[$x]['line'] === $tokens[$openBracket]['line']) { + continue; + } + + if ($tokens[$x]['line'] === $tokens[$i]['line']) { + break; + } + + $phpcsFile->fixer->replaceToken($x, ''); + } + + $phpcsFile->fixer->endChangeset(); + } + }//end if + + $i = $phpcsFile->findNext(Tokens::$emptyTokens, ($openBracket + 1), null, true); + + if ($tokens[($i - 1)]['code'] === T_WHITESPACE + && $tokens[($i - 1)]['line'] === $tokens[$i]['line'] + ) { + // Make sure we check the indent. + $i--; + } + + for ($i; $i < $closeBracket; $i++) { + if ($i > $argStart && $i < $argEnd) { + $inArg = true; + } else { + $inArg = false; + } + + if ($tokens[$i]['line'] !== $lastLine) { + $lastLine = $tokens[$i]['line']; + + // Ignore heredoc indentation. + if (isset(Tokens::$heredocTokens[$tokens[$i]['code']]) === true) { + continue; + } + + // Ignore multi-line string indentation. + if (isset(Tokens::$stringTokens[$tokens[$i]['code']]) === true + && $tokens[$i]['code'] === $tokens[($i - 1)]['code'] + ) { + continue; + } + + // Ignore inline HTML. + if ($tokens[$i]['code'] === T_INLINE_HTML) { + continue; + } + + if ($tokens[$i]['line'] !== $tokens[$openBracket]['line']) { + // We changed lines, so this should be a whitespace indent token, but first make + // sure it isn't a blank line because we don't need to check indent unless there + // is actually some code to indent. + if ($tokens[$i]['code'] === T_WHITESPACE) { + $nextCode = $phpcsFile->findNext(T_WHITESPACE, ($i + 1), ($closeBracket + 1), true); + if ($tokens[$nextCode]['line'] !== $lastLine) { + if ($inArg === false) { + $error = 'Empty lines are not allowed in multi-line function calls'; + $fix = $phpcsFile->addFixableError($error, $i, 'EmptyLine'); + if ($fix === true) { + $phpcsFile->fixer->replaceToken($i, ''); + } + } + + continue; + } + } else { + $nextCode = $i; + } + + if ($tokens[$nextCode]['line'] === $tokens[$closeBracket]['line']) { + // Closing brace needs to be indented to the same level + // as the function call. + $inArg = false; + $expectedIndent = ($foundFunctionIndent + $adjustment); + } else { + $expectedIndent = ($foundFunctionIndent + $this->indent + $adjustment); + } + + if ($tokens[$i]['code'] !== T_WHITESPACE + && $tokens[$i]['code'] !== T_DOC_COMMENT_WHITESPACE + ) { + // Just check if it is a multi-line block comment. If so, we can + // calculate the indent from the whitespace before the content. + if ($tokens[$i]['code'] === T_COMMENT + && $tokens[($i - 1)]['code'] === T_COMMENT + ) { + $trimmedLength = strlen(ltrim($tokens[$i]['content'])); + if ($trimmedLength === 0) { + // This is a blank comment line, so indenting it is + // pointless. + continue; + } + + $foundIndent = (strlen($tokens[$i]['content']) - $trimmedLength); + } else { + $foundIndent = 0; + } + } else { + $foundIndent = $tokens[$i]['length']; + } + + if ($foundIndent < $expectedIndent + || ($inArg === false + && $expectedIndent !== $foundIndent) + ) { + $error = 'Multi-line function call not indented correctly; expected %s spaces but found %s'; + $data = [ + $expectedIndent, + $foundIndent, + ]; + + $fix = $phpcsFile->addFixableError($error, $i, 'Indent', $data); + if ($fix === true) { + $phpcsFile->fixer->beginChangeset(); + + $padding = str_repeat(' ', $expectedIndent); + if ($foundIndent === 0) { + $phpcsFile->fixer->addContentBefore($i, $padding); + if (isset($tokens[$i]['scope_opener']) === true) { + $phpcsFile->fixer->changeCodeBlockIndent($i, $tokens[$i]['scope_closer'], $expectedIndent); + } + } else { + if ($tokens[$i]['code'] === T_COMMENT) { + $comment = $padding.ltrim($tokens[$i]['content']); + $phpcsFile->fixer->replaceToken($i, $comment); + } else { + $phpcsFile->fixer->replaceToken($i, $padding); + } + + if (isset($tokens[($i + 1)]['scope_opener']) === true) { + $phpcsFile->fixer->changeCodeBlockIndent(($i + 1), $tokens[($i + 1)]['scope_closer'], ($expectedIndent - $foundIndent)); + } + } + + $phpcsFile->fixer->endChangeset(); + }//end if + }//end if + } else { + $nextCode = $i; + }//end if + + if ($inArg === false) { + $argStart = $nextCode; + $argEnd = $phpcsFile->findEndOfStatement($nextCode, [T_COLON]); + } + }//end if + + // If we are within an argument we should be ignoring commas + // as these are not signalling the end of an argument. + if ($inArg === false && $tokens[$i]['code'] === T_COMMA) { + $next = $phpcsFile->findNext(Tokens::$emptyTokens, ($i + 1), $closeBracket, true); + if ($next === false) { + continue; + } + + if ($this->allowMultipleArguments === false) { + // Comma has to be the last token on the line. + if ($tokens[$i]['line'] === $tokens[$next]['line']) { + $error = 'Only one argument is allowed per line in a multi-line function call'; + $fix = $phpcsFile->addFixableError($error, $next, 'MultipleArguments'); + if ($fix === true) { + $phpcsFile->fixer->beginChangeset(); + for ($x = ($next - 1); $x > $i; $x--) { + if ($tokens[$x]['code'] !== T_WHITESPACE) { + break; + } + + $phpcsFile->fixer->replaceToken($x, ''); + } + + $phpcsFile->fixer->addContentBefore( + $next, + $phpcsFile->eolChar.str_repeat(' ', ($foundFunctionIndent + $this->indent)) + ); + $phpcsFile->fixer->endChangeset(); + } + } + }//end if + + $argStart = $next; + $argEnd = $phpcsFile->findEndOfStatement($next, [T_COLON]); + }//end if + }//end for + + }//end processMultiLineCall() + + +}//end class diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/PEAR/Sniffs/Functions/FunctionDeclarationSniff.php b/vendor/squizlabs/php_codesniffer/src/Standards/PEAR/Sniffs/Functions/FunctionDeclarationSniff.php new file mode 100644 index 00000000..bd59a7cd --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/PEAR/Sniffs/Functions/FunctionDeclarationSniff.php @@ -0,0 +1,522 @@ + + * @copyright 2006-2015 Squiz Pty Ltd (ABN 77 084 670 600) + * @license https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence + */ + +namespace PHP_CodeSniffer\Standards\PEAR\Sniffs\Functions; + +use PHP_CodeSniffer\Files\File; +use PHP_CodeSniffer\Sniffs\Sniff; +use PHP_CodeSniffer\Standards\Generic\Sniffs\Functions\OpeningFunctionBraceBsdAllmanSniff; +use PHP_CodeSniffer\Standards\Generic\Sniffs\Functions\OpeningFunctionBraceKernighanRitchieSniff; +use PHP_CodeSniffer\Util\Tokens; + +class FunctionDeclarationSniff implements Sniff +{ + + /** + * A list of tokenizers this sniff supports. + * + * @var array + */ + public $supportedTokenizers = [ + 'PHP', + 'JS', + ]; + + /** + * The number of spaces code should be indented. + * + * @var integer + */ + public $indent = 4; + + + /** + * Returns an array of tokens this test wants to listen for. + * + * @return array + */ + public function register() + { + return [ + T_FUNCTION, + T_CLOSURE, + ]; + + }//end register() + + + /** + * Processes this test, when one of its tokens is encountered. + * + * @param \PHP_CodeSniffer\Files\File $phpcsFile The file being scanned. + * @param int $stackPtr The position of the current token + * in the stack passed in $tokens. + * + * @return void + */ + public function process(File $phpcsFile, $stackPtr) + { + $tokens = $phpcsFile->getTokens(); + + if (isset($tokens[$stackPtr]['parenthesis_opener']) === false + || isset($tokens[$stackPtr]['parenthesis_closer']) === false + || $tokens[$stackPtr]['parenthesis_opener'] === null + || $tokens[$stackPtr]['parenthesis_closer'] === null + ) { + return; + } + + $openBracket = $tokens[$stackPtr]['parenthesis_opener']; + $closeBracket = $tokens[$stackPtr]['parenthesis_closer']; + + if (strtolower($tokens[$stackPtr]['content']) === 'function') { + // Must be one space after the FUNCTION keyword. + if ($tokens[($stackPtr + 1)]['content'] === $phpcsFile->eolChar) { + $spaces = 'newline'; + } else if ($tokens[($stackPtr + 1)]['code'] === T_WHITESPACE) { + $spaces = $tokens[($stackPtr + 1)]['length']; + } else { + $spaces = 0; + } + + if ($spaces !== 1) { + $error = 'Expected 1 space after FUNCTION keyword; %s found'; + $data = [$spaces]; + $fix = $phpcsFile->addFixableError($error, $stackPtr, 'SpaceAfterFunction', $data); + if ($fix === true) { + if ($spaces === 0) { + $phpcsFile->fixer->addContent($stackPtr, ' '); + } else { + $phpcsFile->fixer->replaceToken(($stackPtr + 1), ' '); + } + } + } + }//end if + + // Must be no space before the opening parenthesis. For closures, this is + // enforced by the previous check because there is no content between the keywords + // and the opening parenthesis. + // Unfinished closures are tokenized as T_FUNCTION however, and can be excluded + // by checking for the scope_opener. + if ($tokens[$stackPtr]['code'] === T_FUNCTION + && (isset($tokens[$stackPtr]['scope_opener']) === true || $phpcsFile->getMethodProperties($stackPtr)['has_body'] === false) + ) { + if ($tokens[($openBracket - 1)]['content'] === $phpcsFile->eolChar) { + $spaces = 'newline'; + } else if ($tokens[($openBracket - 1)]['code'] === T_WHITESPACE) { + $spaces = $tokens[($openBracket - 1)]['length']; + } else { + $spaces = 0; + } + + if ($spaces !== 0) { + $error = 'Expected 0 spaces before opening parenthesis; %s found'; + $data = [$spaces]; + $fix = $phpcsFile->addFixableError($error, $openBracket, 'SpaceBeforeOpenParen', $data); + if ($fix === true) { + $phpcsFile->fixer->replaceToken(($openBracket - 1), ''); + } + } + + // Must be no space before semicolon in abstract/interface methods. + if ($phpcsFile->getMethodProperties($stackPtr)['has_body'] === false) { + $end = $phpcsFile->findNext(T_SEMICOLON, $closeBracket); + if ($tokens[($end - 1)]['content'] === $phpcsFile->eolChar) { + $spaces = 'newline'; + } else if ($tokens[($end - 1)]['code'] === T_WHITESPACE) { + $spaces = $tokens[($end - 1)]['length']; + } else { + $spaces = 0; + } + + if ($spaces !== 0) { + $error = 'Expected 0 spaces before semicolon; %s found'; + $data = [$spaces]; + $fix = $phpcsFile->addFixableError($error, $end, 'SpaceBeforeSemicolon', $data); + if ($fix === true) { + $phpcsFile->fixer->replaceToken(($end - 1), ''); + } + } + } + }//end if + + // Must be one space before and after USE keyword for closures. + if ($tokens[$stackPtr]['code'] === T_CLOSURE) { + $use = $phpcsFile->findNext(T_USE, ($closeBracket + 1), $tokens[$stackPtr]['scope_opener']); + if ($use !== false) { + if ($tokens[($use + 1)]['code'] !== T_WHITESPACE) { + $length = 0; + } else if ($tokens[($use + 1)]['content'] === "\t") { + $length = '\t'; + } else { + $length = $tokens[($use + 1)]['length']; + } + + if ($length !== 1) { + $error = 'Expected 1 space after USE keyword; found %s'; + $data = [$length]; + $fix = $phpcsFile->addFixableError($error, $use, 'SpaceAfterUse', $data); + if ($fix === true) { + if ($length === 0) { + $phpcsFile->fixer->addContent($use, ' '); + } else { + $phpcsFile->fixer->replaceToken(($use + 1), ' '); + } + } + } + + if ($tokens[($use - 1)]['code'] !== T_WHITESPACE) { + $length = 0; + } else if ($tokens[($use - 1)]['content'] === "\t") { + $length = '\t'; + } else { + $length = $tokens[($use - 1)]['length']; + } + + if ($length !== 1) { + $error = 'Expected 1 space before USE keyword; found %s'; + $data = [$length]; + $fix = $phpcsFile->addFixableError($error, $use, 'SpaceBeforeUse', $data); + if ($fix === true) { + if ($length === 0) { + $phpcsFile->fixer->addContentBefore($use, ' '); + } else { + $phpcsFile->fixer->replaceToken(($use - 1), ' '); + } + } + } + }//end if + }//end if + + if ($this->isMultiLineDeclaration($phpcsFile, $stackPtr, $openBracket, $tokens) === true) { + $this->processMultiLineDeclaration($phpcsFile, $stackPtr, $tokens); + } else { + $this->processSingleLineDeclaration($phpcsFile, $stackPtr, $tokens); + } + + }//end process() + + + /** + * Determine if this is a multi-line function declaration. + * + * @param \PHP_CodeSniffer\Files\File $phpcsFile The file being scanned. + * @param int $stackPtr The position of the current token + * in the stack passed in $tokens. + * @param int $openBracket The position of the opening bracket + * in the stack passed in $tokens. + * @param array $tokens The stack of tokens that make up + * the file. + * + * @return bool + */ + public function isMultiLineDeclaration($phpcsFile, $stackPtr, $openBracket, $tokens) + { + $closeBracket = $tokens[$openBracket]['parenthesis_closer']; + if ($tokens[$openBracket]['line'] !== $tokens[$closeBracket]['line']) { + return true; + } + + // Closures may use the USE keyword and so be multi-line in this way. + if ($tokens[$stackPtr]['code'] === T_CLOSURE) { + $use = $phpcsFile->findNext(T_USE, ($closeBracket + 1), $tokens[$stackPtr]['scope_opener']); + if ($use !== false) { + // If the opening and closing parenthesis of the use statement + // are also on the same line, this is a single line declaration. + $open = $phpcsFile->findNext(T_OPEN_PARENTHESIS, ($use + 1)); + $close = $tokens[$open]['parenthesis_closer']; + if ($tokens[$open]['line'] !== $tokens[$close]['line']) { + return true; + } + } + } + + return false; + + }//end isMultiLineDeclaration() + + + /** + * Processes single-line declarations. + * + * Just uses the Generic BSD-Allman brace sniff. + * + * @param \PHP_CodeSniffer\Files\File $phpcsFile The file being scanned. + * @param int $stackPtr The position of the current token + * in the stack passed in $tokens. + * @param array $tokens The stack of tokens that make up + * the file. + * + * @return void + */ + public function processSingleLineDeclaration($phpcsFile, $stackPtr, $tokens) + { + if ($tokens[$stackPtr]['code'] === T_CLOSURE) { + $sniff = new OpeningFunctionBraceKernighanRitchieSniff(); + } else { + $sniff = new OpeningFunctionBraceBsdAllmanSniff(); + } + + $sniff->checkClosures = true; + $sniff->process($phpcsFile, $stackPtr); + + }//end processSingleLineDeclaration() + + + /** + * Processes multi-line declarations. + * + * @param \PHP_CodeSniffer\Files\File $phpcsFile The file being scanned. + * @param int $stackPtr The position of the current token + * in the stack passed in $tokens. + * @param array $tokens The stack of tokens that make up + * the file. + * + * @return void + */ + public function processMultiLineDeclaration($phpcsFile, $stackPtr, $tokens) + { + $this->processArgumentList($phpcsFile, $stackPtr, $this->indent); + + $closeBracket = $tokens[$stackPtr]['parenthesis_closer']; + if ($tokens[$stackPtr]['code'] === T_CLOSURE) { + $use = $phpcsFile->findNext(T_USE, ($closeBracket + 1), $tokens[$stackPtr]['scope_opener']); + if ($use !== false) { + $open = $phpcsFile->findNext(T_OPEN_PARENTHESIS, ($use + 1)); + $closeBracket = $tokens[$open]['parenthesis_closer']; + } + } + + if (isset($tokens[$stackPtr]['scope_opener']) === false) { + return; + } + + // The opening brace needs to be one space away from the closing parenthesis. + $opener = $tokens[$stackPtr]['scope_opener']; + if ($tokens[$opener]['line'] !== $tokens[$closeBracket]['line']) { + $error = 'The closing parenthesis and the opening brace of a multi-line function declaration must be on the same line'; + $fix = $phpcsFile->addFixableError($error, $opener, 'NewlineBeforeOpenBrace'); + if ($fix === true) { + $prev = $phpcsFile->findPrevious(Tokens::$emptyTokens, ($opener - 1), $closeBracket, true); + $phpcsFile->fixer->beginChangeset(); + $phpcsFile->fixer->addContent($prev, ' {'); + + // If the opener is on a line by itself, removing it will create + // an empty line, so just remove the entire line instead. + $prev = $phpcsFile->findPrevious(T_WHITESPACE, ($opener - 1), $closeBracket, true); + $next = $phpcsFile->findNext(T_WHITESPACE, ($opener + 1), null, true); + + if ($tokens[$prev]['line'] < $tokens[$opener]['line'] + && $tokens[$next]['line'] > $tokens[$opener]['line'] + ) { + // Clear the whole line. + for ($i = ($prev + 1); $i < $next; $i++) { + if ($tokens[$i]['line'] === $tokens[$opener]['line']) { + $phpcsFile->fixer->replaceToken($i, ''); + } + } + } else { + // Just remove the opener. + $phpcsFile->fixer->replaceToken($opener, ''); + if ($tokens[$next]['line'] === $tokens[$opener]['line']) { + $phpcsFile->fixer->replaceToken(($opener + 1), ''); + } + } + + $phpcsFile->fixer->endChangeset(); + }//end if + } else { + $prev = $tokens[($opener - 1)]; + if ($prev['code'] !== T_WHITESPACE) { + $length = 0; + } else { + $length = strlen($prev['content']); + } + + if ($length !== 1) { + $error = 'There must be a single space between the closing parenthesis and the opening brace of a multi-line function declaration; found %s spaces'; + $fix = $phpcsFile->addFixableError($error, ($opener - 1), 'SpaceBeforeOpenBrace', [$length]); + if ($fix === true) { + if ($length === 0) { + $phpcsFile->fixer->addContentBefore($opener, ' '); + } else { + $phpcsFile->fixer->replaceToken(($opener - 1), ' '); + } + } + + return; + }//end if + }//end if + + }//end processMultiLineDeclaration() + + + /** + * Processes multi-line argument list declarations. + * + * @param \PHP_CodeSniffer\Files\File $phpcsFile The file being scanned. + * @param int $stackPtr The position of the current token + * in the stack passed in $tokens. + * @param int $indent The number of spaces code should be indented. + * @param string $type The type of the token the brackets + * belong to. + * + * @return void + */ + public function processArgumentList($phpcsFile, $stackPtr, $indent, $type='function') + { + $tokens = $phpcsFile->getTokens(); + + // We need to work out how far indented the function + // declaration itself is, so we can work out how far to + // indent parameters. + $functionIndent = 0; + for ($i = ($stackPtr - 1); $i >= 0; $i--) { + if ($tokens[$i]['line'] !== $tokens[$stackPtr]['line']) { + break; + } + } + + // Move $i back to the line the function is or to 0. + $i++; + + if ($tokens[$i]['code'] === T_WHITESPACE) { + $functionIndent = $tokens[$i]['length']; + } + + // The closing parenthesis must be on a new line, even + // when checking abstract function definitions. + $closeBracket = $tokens[$stackPtr]['parenthesis_closer']; + $prev = $phpcsFile->findPrevious( + T_WHITESPACE, + ($closeBracket - 1), + null, + true + ); + + if ($tokens[$closeBracket]['line'] !== $tokens[$tokens[$closeBracket]['parenthesis_opener']]['line'] + && $tokens[$prev]['line'] === $tokens[$closeBracket]['line'] + ) { + $error = 'The closing parenthesis of a multi-line '.$type.' declaration must be on a new line'; + $fix = $phpcsFile->addFixableError($error, $closeBracket, 'CloseBracketLine'); + if ($fix === true) { + $phpcsFile->fixer->addNewlineBefore($closeBracket); + } + } + + // If this is a closure and is using a USE statement, the closing + // parenthesis we need to look at from now on is the closing parenthesis + // of the USE statement. + if ($tokens[$stackPtr]['code'] === T_CLOSURE) { + $use = $phpcsFile->findNext(T_USE, ($closeBracket + 1), $tokens[$stackPtr]['scope_opener']); + if ($use !== false) { + $open = $phpcsFile->findNext(T_OPEN_PARENTHESIS, ($use + 1)); + $closeBracket = $tokens[$open]['parenthesis_closer']; + + $prev = $phpcsFile->findPrevious( + T_WHITESPACE, + ($closeBracket - 1), + null, + true + ); + + if ($tokens[$closeBracket]['line'] !== $tokens[$tokens[$closeBracket]['parenthesis_opener']]['line'] + && $tokens[$prev]['line'] === $tokens[$closeBracket]['line'] + ) { + $error = 'The closing parenthesis of a multi-line use declaration must be on a new line'; + $fix = $phpcsFile->addFixableError($error, $closeBracket, 'UseCloseBracketLine'); + if ($fix === true) { + $phpcsFile->fixer->addNewlineBefore($closeBracket); + } + } + }//end if + }//end if + + // Each line between the parenthesis should be indented 4 spaces. + $openBracket = $tokens[$stackPtr]['parenthesis_opener']; + $lastLine = $tokens[$openBracket]['line']; + for ($i = ($openBracket + 1); $i < $closeBracket; $i++) { + if ($tokens[$i]['line'] !== $lastLine) { + if ($i === $tokens[$stackPtr]['parenthesis_closer'] + || ($tokens[$i]['code'] === T_WHITESPACE + && (($i + 1) === $closeBracket + || ($i + 1) === $tokens[$stackPtr]['parenthesis_closer'])) + ) { + // Closing braces need to be indented to the same level + // as the function. + $expectedIndent = $functionIndent; + } else { + $expectedIndent = ($functionIndent + $indent); + } + + // We changed lines, so this should be a whitespace indent token. + $foundIndent = 0; + if ($tokens[$i]['code'] === T_WHITESPACE + && $tokens[$i]['line'] !== $tokens[($i + 1)]['line'] + ) { + $error = 'Blank lines are not allowed in a multi-line '.$type.' declaration'; + $fix = $phpcsFile->addFixableError($error, $i, 'EmptyLine'); + if ($fix === true) { + $phpcsFile->fixer->replaceToken($i, ''); + } + + // This is an empty line, so don't check the indent. + continue; + } else if ($tokens[$i]['code'] === T_WHITESPACE) { + $foundIndent = $tokens[$i]['length']; + } else if ($tokens[$i]['code'] === T_DOC_COMMENT_WHITESPACE) { + $foundIndent = $tokens[$i]['length']; + ++$expectedIndent; + } + + if ($expectedIndent !== $foundIndent) { + $error = 'Multi-line '.$type.' declaration not indented correctly; expected %s spaces but found %s'; + $data = [ + $expectedIndent, + $foundIndent, + ]; + + $fix = $phpcsFile->addFixableError($error, $i, 'Indent', $data); + if ($fix === true) { + $spaces = str_repeat(' ', $expectedIndent); + if ($foundIndent === 0) { + $phpcsFile->fixer->addContentBefore($i, $spaces); + } else { + $phpcsFile->fixer->replaceToken($i, $spaces); + } + } + } + + $lastLine = $tokens[$i]['line']; + }//end if + + if ($tokens[$i]['code'] === T_ARRAY || $tokens[$i]['code'] === T_OPEN_SHORT_ARRAY) { + // Skip arrays as they have their own indentation rules. + if ($tokens[$i]['code'] === T_OPEN_SHORT_ARRAY) { + $i = $tokens[$i]['bracket_closer']; + } else { + $i = $tokens[$i]['parenthesis_closer']; + } + + $lastLine = $tokens[$i]['line']; + continue; + } + + if ($tokens[$i]['code'] === T_ATTRIBUTE) { + // Skip attributes as they have their own indentation rules. + $i = $tokens[$i]['attribute_closer']; + $lastLine = $tokens[$i]['line']; + continue; + } + }//end for + + }//end processArgumentList() + + +}//end class diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/PEAR/Sniffs/Functions/ValidDefaultValueSniff.php b/vendor/squizlabs/php_codesniffer/src/Standards/PEAR/Sniffs/Functions/ValidDefaultValueSniff.php new file mode 100644 index 00000000..f1347078 --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/PEAR/Sniffs/Functions/ValidDefaultValueSniff.php @@ -0,0 +1,78 @@ + + * @copyright 2006-2015 Squiz Pty Ltd (ABN 77 084 670 600) + * @license https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence + */ + +namespace PHP_CodeSniffer\Standards\PEAR\Sniffs\Functions; + +use PHP_CodeSniffer\Files\File; +use PHP_CodeSniffer\Sniffs\Sniff; + +class ValidDefaultValueSniff implements Sniff +{ + + + /** + * Returns an array of tokens this test wants to listen for. + * + * @return int[] + */ + public function register() + { + return [ + T_FUNCTION, + T_CLOSURE, + T_FN, + ]; + + }//end register() + + + /** + * Processes this test, when one of its tokens is encountered. + * + * @param \PHP_CodeSniffer\Files\File $phpcsFile The file being scanned. + * @param int $stackPtr The position of the current token in the + * stack passed in $tokens. + * + * @return void + */ + public function process(File $phpcsFile, $stackPtr) + { + // Flag for when we have found a default in our arg list. + // If there is a value without a default after this, it is an error. + $defaultFound = false; + + $params = $phpcsFile->getMethodParameters($stackPtr); + foreach ($params as $param) { + if ($param['variable_length'] === true) { + continue; + } + + if (array_key_exists('default', $param) === true) { + $defaultFound = true; + // Check if the arg is type hinted and using NULL for the default. + // This does not make the argument optional - it just allows NULL + // to be passed in. + if ($param['type_hint'] !== '' && strtolower($param['default']) === 'null') { + $defaultFound = false; + } + + continue; + } + + if ($defaultFound === true) { + $error = 'Arguments with default values must be at the end of the argument list'; + $phpcsFile->addError($error, $param['token'], 'NotAtEnd'); + return; + } + }//end foreach + + }//end process() + + +}//end class diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/PEAR/Sniffs/NamingConventions/ValidClassNameSniff.php b/vendor/squizlabs/php_codesniffer/src/Standards/PEAR/Sniffs/NamingConventions/ValidClassNameSniff.php new file mode 100644 index 00000000..34ca2830 --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/PEAR/Sniffs/NamingConventions/ValidClassNameSniff.php @@ -0,0 +1,97 @@ + + * @copyright 2006-2015 Squiz Pty Ltd (ABN 77 084 670 600) + * @license https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence + */ + +namespace PHP_CodeSniffer\Standards\PEAR\Sniffs\NamingConventions; + +use PHP_CodeSniffer\Files\File; +use PHP_CodeSniffer\Sniffs\Sniff; + +class ValidClassNameSniff implements Sniff +{ + + + /** + * Returns an array of tokens this test wants to listen for. + * + * @return array + */ + public function register() + { + return [ + T_CLASS, + T_INTERFACE, + T_TRAIT, + ]; + + }//end register() + + + /** + * Processes this test, when one of its tokens is encountered. + * + * @param \PHP_CodeSniffer\Files\File $phpcsFile The current file being processed. + * @param int $stackPtr The position of the current token + * in the stack passed in $tokens. + * + * @return void + */ + public function process(File $phpcsFile, $stackPtr) + { + $tokens = $phpcsFile->getTokens(); + + $className = $phpcsFile->findNext(T_STRING, $stackPtr); + $name = trim($tokens[$className]['content']); + $errorData = [ucfirst($tokens[$stackPtr]['content'])]; + + // Make sure the first letter is a capital. + if (preg_match('|^[A-Z]|', $name) === 0) { + $error = '%s name must begin with a capital letter'; + $phpcsFile->addError($error, $stackPtr, 'StartWithCapital', $errorData); + } + + // Check that each new word starts with a capital as well, but don't + // check the first word, as it is checked above. + $validName = true; + $nameBits = explode('_', $name); + $firstBit = array_shift($nameBits); + foreach ($nameBits as $bit) { + if ($bit === '' || $bit[0] !== strtoupper($bit[0])) { + $validName = false; + break; + } + } + + if ($validName === false) { + // Strip underscores because they cause the suggested name + // to be incorrect. + $nameBits = explode('_', trim($name, '_')); + $firstBit = array_shift($nameBits); + if ($firstBit === '') { + $error = '%s name is not valid'; + $phpcsFile->addError($error, $stackPtr, 'Invalid', $errorData); + } else { + $newName = strtoupper($firstBit[0]).substr($firstBit, 1).'_'; + foreach ($nameBits as $bit) { + if ($bit !== '') { + $newName .= strtoupper($bit[0]).substr($bit, 1).'_'; + } + } + + $newName = rtrim($newName, '_'); + $error = '%s name is not valid; consider %s instead'; + $data = $errorData; + $data[] = $newName; + $phpcsFile->addError($error, $stackPtr, 'Invalid', $data); + } + }//end if + + }//end process() + + +}//end class diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/PEAR/Sniffs/NamingConventions/ValidFunctionNameSniff.php b/vendor/squizlabs/php_codesniffer/src/Standards/PEAR/Sniffs/NamingConventions/ValidFunctionNameSniff.php new file mode 100644 index 00000000..e7f87d44 --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/PEAR/Sniffs/NamingConventions/ValidFunctionNameSniff.php @@ -0,0 +1,284 @@ + + * @copyright 2006-2015 Squiz Pty Ltd (ABN 77 084 670 600) + * @license https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence + */ + +namespace PHP_CodeSniffer\Standards\PEAR\Sniffs\NamingConventions; + +use PHP_CodeSniffer\Files\File; +use PHP_CodeSniffer\Sniffs\AbstractScopeSniff; +use PHP_CodeSniffer\Util\Common; +use PHP_CodeSniffer\Util\Tokens; + +class ValidFunctionNameSniff extends AbstractScopeSniff +{ + + /** + * A list of all PHP magic methods. + * + * @var array + */ + protected $magicMethods = [ + 'construct' => true, + 'destruct' => true, + 'call' => true, + 'callstatic' => true, + 'get' => true, + 'set' => true, + 'isset' => true, + 'unset' => true, + 'sleep' => true, + 'wakeup' => true, + 'serialize' => true, + 'unserialize' => true, + 'tostring' => true, + 'invoke' => true, + 'set_state' => true, + 'clone' => true, + 'debuginfo' => true, + ]; + + /** + * A list of all PHP magic functions. + * + * @var array + */ + protected $magicFunctions = ['autoload' => true]; + + + /** + * Constructs a PEAR_Sniffs_NamingConventions_ValidFunctionNameSniff. + */ + public function __construct() + { + parent::__construct(Tokens::$ooScopeTokens, [T_FUNCTION], true); + + }//end __construct() + + + /** + * Processes the tokens within the scope. + * + * @param \PHP_CodeSniffer\Files\File $phpcsFile The file being processed. + * @param int $stackPtr The position where this token was + * found. + * @param int $currScope The position of the current scope. + * + * @return void + */ + protected function processTokenWithinScope(File $phpcsFile, $stackPtr, $currScope) + { + $tokens = $phpcsFile->getTokens(); + + // Determine if this is a function which needs to be examined. + $conditions = $tokens[$stackPtr]['conditions']; + end($conditions); + $deepestScope = key($conditions); + if ($deepestScope !== $currScope) { + return; + } + + $methodName = $phpcsFile->getDeclarationName($stackPtr); + if ($methodName === null) { + // Ignore closures. + return; + } + + $className = $phpcsFile->getDeclarationName($currScope); + if (isset($className) === false) { + $className = '[Anonymous Class]'; + } + + $errorData = [$className.'::'.$methodName]; + + $methodNameLc = strtolower($methodName); + $classNameLc = strtolower($className); + + // Is this a magic method. i.e., is prefixed with "__" ? + if (preg_match('|^__[^_]|', $methodName) !== 0) { + $magicPart = substr($methodNameLc, 2); + if (isset($this->magicMethods[$magicPart]) === true) { + return; + } + + $error = 'Method name "%s" is invalid; only PHP magic methods should be prefixed with a double underscore'; + $phpcsFile->addError($error, $stackPtr, 'MethodDoubleUnderscore', $errorData); + } + + // PHP4 constructors are allowed to break our rules. + if ($methodNameLc === $classNameLc) { + return; + } + + // PHP4 destructors are allowed to break our rules. + if ($methodNameLc === '_'.$classNameLc) { + return; + } + + $methodProps = $phpcsFile->getMethodProperties($stackPtr); + $scope = $methodProps['scope']; + $scopeSpecified = $methodProps['scope_specified']; + + if ($methodProps['scope'] === 'private') { + $isPublic = false; + } else { + $isPublic = true; + } + + // If it's a private method, it must have an underscore on the front. + if ($isPublic === false) { + if ($methodName[0] !== '_') { + $error = 'Private method name "%s" must be prefixed with an underscore'; + $phpcsFile->addError($error, $stackPtr, 'PrivateNoUnderscore', $errorData); + $phpcsFile->recordMetric($stackPtr, 'Private method prefixed with underscore', 'no'); + } else { + $phpcsFile->recordMetric($stackPtr, 'Private method prefixed with underscore', 'yes'); + } + } + + // If it's not a private method, it must not have an underscore on the front. + if ($isPublic === true && $scopeSpecified === true && $methodName[0] === '_') { + $error = '%s method name "%s" must not be prefixed with an underscore'; + $data = [ + ucfirst($scope), + $errorData[0], + ]; + $phpcsFile->addError($error, $stackPtr, 'PublicUnderscore', $data); + } + + $testMethodName = ltrim($methodName, '_'); + + if (Common::isCamelCaps($testMethodName, false, true, false) === false) { + if ($scopeSpecified === true) { + $error = '%s method name "%s" is not in camel caps format'; + $data = [ + ucfirst($scope), + $errorData[0], + ]; + $phpcsFile->addError($error, $stackPtr, 'ScopeNotCamelCaps', $data); + } else { + $error = 'Method name "%s" is not in camel caps format'; + $phpcsFile->addError($error, $stackPtr, 'NotCamelCaps', $errorData); + } + } + + }//end processTokenWithinScope() + + + /** + * Processes the tokens outside the scope. + * + * @param \PHP_CodeSniffer\Files\File $phpcsFile The file being processed. + * @param int $stackPtr The position where this token was + * found. + * + * @return void + */ + protected function processTokenOutsideScope(File $phpcsFile, $stackPtr) + { + $functionName = $phpcsFile->getDeclarationName($stackPtr); + if ($functionName === null) { + // Ignore closures. + return; + } + + if (ltrim($functionName, '_') === '') { + // Ignore special functions. + return; + } + + $errorData = [$functionName]; + + // Is this a magic function. i.e., it is prefixed with "__". + if (preg_match('|^__[^_]|', $functionName) !== 0) { + $magicPart = strtolower(substr($functionName, 2)); + if (isset($this->magicFunctions[$magicPart]) === true) { + return; + } + + $error = 'Function name "%s" is invalid; only PHP magic methods should be prefixed with a double underscore'; + $phpcsFile->addError($error, $stackPtr, 'FunctionDoubleUnderscore', $errorData); + } + + // Function names can be in two parts; the package name and + // the function name. + $packagePart = ''; + $underscorePos = strrpos($functionName, '_'); + if ($underscorePos === false) { + $camelCapsPart = $functionName; + } else { + $packagePart = substr($functionName, 0, $underscorePos); + $camelCapsPart = substr($functionName, ($underscorePos + 1)); + + // We don't care about _'s on the front. + $packagePart = ltrim($packagePart, '_'); + } + + // If it has a package part, make sure the first letter is a capital. + if ($packagePart !== '') { + if ($functionName[0] === '_') { + $error = 'Function name "%s" is invalid; only private methods should be prefixed with an underscore'; + $phpcsFile->addError($error, $stackPtr, 'FunctionUnderscore', $errorData); + } + + if ($functionName[0] !== strtoupper($functionName[0])) { + $error = 'Function name "%s" is prefixed with a package name but does not begin with a capital letter'; + $phpcsFile->addError($error, $stackPtr, 'FunctionNoCapital', $errorData); + } + } + + // If it doesn't have a camel caps part, it's not valid. + if (trim($camelCapsPart) === '') { + $error = 'Function name "%s" is not valid; name appears incomplete'; + $phpcsFile->addError($error, $stackPtr, 'FunctionInvalid', $errorData); + return; + } + + $validName = true; + $newPackagePart = $packagePart; + $newCamelCapsPart = $camelCapsPart; + + // Every function must have a camel caps part, so check that first. + if (Common::isCamelCaps($camelCapsPart, false, true, false) === false) { + $validName = false; + $newCamelCapsPart = strtolower($camelCapsPart[0]).substr($camelCapsPart, 1); + } + + if ($packagePart !== '') { + // Check that each new word starts with a capital. + $nameBits = explode('_', $packagePart); + $nameBits = array_filter($nameBits); + foreach ($nameBits as $bit) { + if ($bit[0] !== strtoupper($bit[0])) { + $newPackagePart = ''; + foreach ($nameBits as $bit) { + $newPackagePart .= strtoupper($bit[0]).substr($bit, 1).'_'; + } + + $validName = false; + break; + } + } + } + + if ($validName === false) { + if ($newPackagePart === '') { + $newName = $newCamelCapsPart; + } else { + $newName = rtrim($newPackagePart, '_').'_'.$newCamelCapsPart; + } + + $error = 'Function name "%s" is invalid; consider "%s" instead'; + $data = $errorData; + $data[] = $newName; + $phpcsFile->addError($error, $stackPtr, 'FunctionNameInvalid', $data); + } + + }//end processTokenOutsideScope() + + +}//end class diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/PEAR/Sniffs/NamingConventions/ValidVariableNameSniff.php b/vendor/squizlabs/php_codesniffer/src/Standards/PEAR/Sniffs/NamingConventions/ValidVariableNameSniff.php new file mode 100644 index 00000000..89af5df8 --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/PEAR/Sniffs/NamingConventions/ValidVariableNameSniff.php @@ -0,0 +1,103 @@ + + * @copyright 2006-2015 Squiz Pty Ltd (ABN 77 084 670 600) + * @license https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence + */ + +namespace PHP_CodeSniffer\Standards\PEAR\Sniffs\NamingConventions; + +use PHP_CodeSniffer\Files\File; +use PHP_CodeSniffer\Sniffs\AbstractVariableSniff; + +class ValidVariableNameSniff extends AbstractVariableSniff +{ + + + /** + * Processes class member variables. + * + * @param \PHP_CodeSniffer\Files\File $phpcsFile The file being scanned. + * @param int $stackPtr The position of the current token + * in the stack passed in $tokens. + * + * @return void + */ + protected function processMemberVar(File $phpcsFile, $stackPtr) + { + $tokens = $phpcsFile->getTokens(); + + $memberProps = $phpcsFile->getMemberProperties($stackPtr); + if (empty($memberProps) === true) { + return; + } + + $memberName = ltrim($tokens[$stackPtr]['content'], '$'); + $scope = $memberProps['scope']; + $scopeSpecified = $memberProps['scope_specified']; + + if ($memberProps['scope'] === 'private') { + $isPublic = false; + } else { + $isPublic = true; + } + + // If it's a private member, it must have an underscore on the front. + if ($isPublic === false && $memberName[0] !== '_') { + $error = 'Private member variable "%s" must be prefixed with an underscore'; + $data = [$memberName]; + $phpcsFile->addError($error, $stackPtr, 'PrivateNoUnderscore', $data); + return; + } + + // If it's not a private member, it must not have an underscore on the front. + if ($isPublic === true && $scopeSpecified === true && $memberName[0] === '_') { + $error = '%s member variable "%s" must not be prefixed with an underscore'; + $data = [ + ucfirst($scope), + $memberName, + ]; + $phpcsFile->addError($error, $stackPtr, 'PublicUnderscore', $data); + return; + } + + }//end processMemberVar() + + + /** + * Processes normal variables. + * + * @param \PHP_CodeSniffer\Files\File $phpcsFile The file where this token was found. + * @param int $stackPtr The position where the token was found. + * + * @return void + */ + protected function processVariable(File $phpcsFile, $stackPtr) + { + /* + We don't care about normal variables. + */ + + }//end processVariable() + + + /** + * Processes variables in double quoted strings. + * + * @param \PHP_CodeSniffer\Files\File $phpcsFile The file where this token was found. + * @param int $stackPtr The position where the token was found. + * + * @return void + */ + protected function processVariableInString(File $phpcsFile, $stackPtr) + { + /* + We don't care about normal variables. + */ + + }//end processVariableInString() + + +}//end class diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/PEAR/Sniffs/WhiteSpace/ObjectOperatorIndentSniff.php b/vendor/squizlabs/php_codesniffer/src/Standards/PEAR/Sniffs/WhiteSpace/ObjectOperatorIndentSniff.php new file mode 100644 index 00000000..fb1b79a3 --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/PEAR/Sniffs/WhiteSpace/ObjectOperatorIndentSniff.php @@ -0,0 +1,204 @@ + + * @copyright 2006-2015 Squiz Pty Ltd (ABN 77 084 670 600) + * @license https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence + */ + +namespace PHP_CodeSniffer\Standards\PEAR\Sniffs\WhiteSpace; + +use PHP_CodeSniffer\Files\File; +use PHP_CodeSniffer\Sniffs\Sniff; + +class ObjectOperatorIndentSniff implements Sniff +{ + + /** + * The number of spaces code should be indented. + * + * @var integer + */ + public $indent = 4; + + /** + * Indicates whether multilevel indenting is allowed. + * + * @var boolean + */ + public $multilevel = false; + + /** + * Tokens to listen for. + * + * @var array + */ + private $targets = [ + T_OBJECT_OPERATOR, + T_NULLSAFE_OBJECT_OPERATOR, + ]; + + + /** + * Returns an array of tokens this test wants to listen for. + * + * @return int[] + */ + public function register() + { + return $this->targets; + + }//end register() + + + /** + * Processes this test, when one of its tokens is encountered. + * + * @param \PHP_CodeSniffer\Files\File $phpcsFile All the tokens found in the document. + * @param int $stackPtr The position of the current token + * in the stack passed in $tokens. + * + * @return void + */ + public function process(File $phpcsFile, $stackPtr) + { + $tokens = $phpcsFile->getTokens(); + + // Make sure this is the first object operator in a chain of them. + $start = $phpcsFile->findStartOfStatement($stackPtr); + $prev = $phpcsFile->findPrevious($this->targets, ($stackPtr - 1), $start); + if ($prev !== false) { + return; + } + + // Make sure this is a chained call. + $end = $phpcsFile->findEndOfStatement($stackPtr); + $next = $phpcsFile->findNext($this->targets, ($stackPtr + 1), $end); + if ($next === false) { + // Not a chained call. + return; + } + + // Determine correct indent. + for ($i = ($start - 1); $i >= 0; $i--) { + if ($tokens[$i]['line'] !== $tokens[$start]['line']) { + $i++; + break; + } + } + + $baseIndent = 0; + if ($i >= 0 && $tokens[$i]['code'] === T_WHITESPACE) { + $baseIndent = $tokens[$i]['length']; + } + + $baseIndent += $this->indent; + + // Determine the scope of the original object operator. + $origBrackets = null; + if (isset($tokens[$stackPtr]['nested_parenthesis']) === true) { + $origBrackets = $tokens[$stackPtr]['nested_parenthesis']; + } + + $origConditions = null; + if (isset($tokens[$stackPtr]['conditions']) === true) { + $origConditions = $tokens[$stackPtr]['conditions']; + } + + // Check indentation of each object operator in the chain. + // If the first object operator is on a different line than + // the variable, make sure we check its indentation too. + if ($tokens[$stackPtr]['line'] > $tokens[$start]['line']) { + $next = $stackPtr; + } + + $previousIndent = $baseIndent; + + while ($next !== false) { + // Make sure it is in the same scope, otherwise don't check indent. + $brackets = null; + if (isset($tokens[$next]['nested_parenthesis']) === true) { + $brackets = $tokens[$next]['nested_parenthesis']; + } + + $conditions = null; + if (isset($tokens[$next]['conditions']) === true) { + $conditions = $tokens[$next]['conditions']; + } + + if ($origBrackets === $brackets && $origConditions === $conditions) { + // Make sure it starts a line, otherwise don't check indent. + $prev = $phpcsFile->findPrevious(T_WHITESPACE, ($next - 1), $stackPtr, true); + $indent = $tokens[($next - 1)]; + if ($tokens[$prev]['line'] !== $tokens[$next]['line'] + && $indent['code'] === T_WHITESPACE + ) { + if ($indent['line'] === $tokens[$next]['line']) { + $foundIndent = strlen($indent['content']); + } else { + $foundIndent = 0; + } + + $minIndent = $previousIndent; + $maxIndent = $previousIndent; + $expectedIndent = $previousIndent; + + if ($this->multilevel === true) { + $minIndent = max(($previousIndent - $this->indent), $baseIndent); + $maxIndent = ($previousIndent + $this->indent); + $expectedIndent = min(max($foundIndent, $minIndent), $maxIndent); + } + + if ($foundIndent < $minIndent || $foundIndent > $maxIndent) { + $error = 'Object operator not indented correctly; expected %s spaces but found %s'; + $data = [ + $expectedIndent, + $foundIndent, + ]; + + $fix = $phpcsFile->addFixableError($error, $next, 'Incorrect', $data); + if ($fix === true) { + $spaces = str_repeat(' ', $expectedIndent); + if ($foundIndent === 0) { + $phpcsFile->fixer->addContentBefore($next, $spaces); + } else { + $phpcsFile->fixer->replaceToken(($next - 1), $spaces); + } + } + } + + $previousIndent = $expectedIndent; + }//end if + + // It cant be the last thing on the line either. + $content = $phpcsFile->findNext(T_WHITESPACE, ($next + 1), null, true); + if ($tokens[$content]['line'] !== $tokens[$next]['line']) { + $error = 'Object operator must be at the start of the line, not the end'; + $fix = $phpcsFile->addFixableError($error, $next, 'StartOfLine'); + if ($fix === true) { + $phpcsFile->fixer->beginChangeset(); + for ($x = ($next + 1); $x < $content; $x++) { + $phpcsFile->fixer->replaceToken($x, ''); + } + + $phpcsFile->fixer->addNewlineBefore($next); + $phpcsFile->fixer->endChangeset(); + } + } + }//end if + + $next = $phpcsFile->findNext( + $this->targets, + ($next + 1), + null, + false, + null, + true + ); + }//end while + + }//end process() + + +}//end class diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/PEAR/Sniffs/WhiteSpace/ScopeClosingBraceSniff.php b/vendor/squizlabs/php_codesniffer/src/Standards/PEAR/Sniffs/WhiteSpace/ScopeClosingBraceSniff.php new file mode 100644 index 00000000..097754e5 --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/PEAR/Sniffs/WhiteSpace/ScopeClosingBraceSniff.php @@ -0,0 +1,179 @@ + + * @copyright 2006-2015 Squiz Pty Ltd (ABN 77 084 670 600) + * @license https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence + */ + +namespace PHP_CodeSniffer\Standards\PEAR\Sniffs\WhiteSpace; + +use PHP_CodeSniffer\Files\File; +use PHP_CodeSniffer\Sniffs\Sniff; +use PHP_CodeSniffer\Util\Tokens; + +class ScopeClosingBraceSniff implements Sniff +{ + + /** + * The number of spaces code should be indented. + * + * @var integer + */ + public $indent = 4; + + + /** + * Returns an array of tokens this test wants to listen for. + * + * @return int[] + */ + public function register() + { + return Tokens::$scopeOpeners; + + }//end register() + + + /** + * Processes this test, when one of its tokens is encountered. + * + * @param \PHP_CodeSniffer\Files\File $phpcsFile All the tokens found in the document. + * @param int $stackPtr The position of the current token + * in the stack passed in $tokens. + * + * @return void + */ + public function process(File $phpcsFile, $stackPtr) + { + $tokens = $phpcsFile->getTokens(); + + // If this is an inline condition (ie. there is no scope opener), then + // return, as this is not a new scope. + if (isset($tokens[$stackPtr]['scope_closer']) === false) { + return; + } + + $scopeStart = $tokens[$stackPtr]['scope_opener']; + $scopeEnd = $tokens[$stackPtr]['scope_closer']; + + // If the scope closer doesn't think it belongs to this scope opener + // then the opener is sharing its closer with other tokens. We only + // want to process the closer once, so skip this one. + if (isset($tokens[$scopeEnd]['scope_condition']) === false + || $tokens[$scopeEnd]['scope_condition'] !== $stackPtr + ) { + return; + } + + // We need to actually find the first piece of content on this line, + // because if this is a method with tokens before it (public, static etc) + // or an if with an else before it, then we need to start the scope + // checking from there, rather than the current token. + $lineStart = ($stackPtr - 1); + for ($lineStart; $lineStart > 0; $lineStart--) { + if (strpos($tokens[$lineStart]['content'], $phpcsFile->eolChar) !== false) { + break; + } + } + + $lineStart++; + + $startColumn = 1; + if ($tokens[$lineStart]['code'] === T_WHITESPACE) { + $startColumn = $tokens[($lineStart + 1)]['column']; + } else if ($tokens[$lineStart]['code'] === T_INLINE_HTML) { + $trimmed = ltrim($tokens[$lineStart]['content']); + if ($trimmed === '') { + $startColumn = $tokens[($lineStart + 1)]['column']; + } else { + $startColumn = (strlen($tokens[$lineStart]['content']) - strlen($trimmed)); + } + } + + // Check that the closing brace is on it's own line. + $lastContent = $phpcsFile->findPrevious( + [ + T_WHITESPACE, + T_INLINE_HTML, + T_OPEN_TAG, + ], + ($scopeEnd - 1), + $scopeStart, + true + ); + + if ($tokens[$lastContent]['line'] === $tokens[$scopeEnd]['line']) { + $error = 'Closing brace must be on a line by itself'; + $fix = $phpcsFile->addFixableError($error, $scopeEnd, 'Line'); + if ($fix === true) { + $phpcsFile->fixer->addNewlineBefore($scopeEnd); + } + + return; + } + + // Check now that the closing brace is lined up correctly. + $lineStart = ($scopeEnd - 1); + for ($lineStart; $lineStart > 0; $lineStart--) { + if (strpos($tokens[$lineStart]['content'], $phpcsFile->eolChar) !== false) { + break; + } + } + + $lineStart++; + + $braceIndent = 0; + if ($tokens[$lineStart]['code'] === T_WHITESPACE) { + $braceIndent = ($tokens[($lineStart + 1)]['column'] - 1); + } else if ($tokens[$lineStart]['code'] === T_INLINE_HTML) { + $trimmed = ltrim($tokens[$lineStart]['content']); + if ($trimmed === '') { + $braceIndent = ($tokens[($lineStart + 1)]['column'] - 1); + } else { + $braceIndent = (strlen($tokens[$lineStart]['content']) - strlen($trimmed) - 1); + } + } + + $fix = false; + if ($tokens[$stackPtr]['code'] === T_CASE + || $tokens[$stackPtr]['code'] === T_DEFAULT + ) { + // BREAK statements should be indented n spaces from the + // CASE or DEFAULT statement. + $expectedIndent = ($startColumn + $this->indent - 1); + if ($braceIndent !== $expectedIndent) { + $error = 'Case breaking statement indented incorrectly; expected %s spaces, found %s'; + $data = [ + $expectedIndent, + $braceIndent, + ]; + $fix = $phpcsFile->addFixableError($error, $scopeEnd, 'BreakIndent', $data); + } + } else { + $expectedIndent = max(0, ($startColumn - 1)); + if ($braceIndent !== $expectedIndent) { + $error = 'Closing brace indented incorrectly; expected %s spaces, found %s'; + $data = [ + $expectedIndent, + $braceIndent, + ]; + $fix = $phpcsFile->addFixableError($error, $scopeEnd, 'Indent', $data); + } + }//end if + + if ($fix === true) { + $spaces = str_repeat(' ', $expectedIndent); + if ($braceIndent === 0) { + $phpcsFile->fixer->addContentBefore($lineStart, $spaces); + } else { + $phpcsFile->fixer->replaceToken($lineStart, ltrim($tokens[$lineStart]['content'])); + $phpcsFile->fixer->addContentBefore($lineStart, $spaces); + } + } + + }//end process() + + +}//end class diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/PEAR/Sniffs/WhiteSpace/ScopeIndentSniff.php b/vendor/squizlabs/php_codesniffer/src/Standards/PEAR/Sniffs/WhiteSpace/ScopeIndentSniff.php new file mode 100644 index 00000000..2620d20f --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/PEAR/Sniffs/WhiteSpace/ScopeIndentSniff.php @@ -0,0 +1,24 @@ + + * @copyright 2006-2015 Squiz Pty Ltd (ABN 77 084 670 600) + * @license https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence + */ + +namespace PHP_CodeSniffer\Standards\PEAR\Sniffs\WhiteSpace; + +use PHP_CodeSniffer\Standards\Generic\Sniffs\WhiteSpace\ScopeIndentSniff as GenericScopeIndentSniff; + +class ScopeIndentSniff extends GenericScopeIndentSniff +{ + + /** + * Any scope openers that should not cause an indent. + * + * @var int[] + */ + protected $nonIndentingScopes = [T_SWITCH]; + +}//end class diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/PEAR/Tests/Classes/ClassDeclarationUnitTest.1.inc b/vendor/squizlabs/php_codesniffer/src/Standards/PEAR/Tests/Classes/ClassDeclarationUnitTest.1.inc new file mode 100644 index 00000000..d97ef4d2 --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/PEAR/Tests/Classes/ClassDeclarationUnitTest.1.inc @@ -0,0 +1,112 @@ +setLogger(new class {}); + +var_dump(new class(10) extends SomeClass implements SomeInterface { + private $num; + + public function __construct($num) + { + $this->num = $num; + } + + use SomeTrait; +}); + +class IncorrectClassDeclarationWithCommentAtEnd extends correctClassDeclaration /* Comment */ { +} + +class CorrectClassDeclarationWithCommentAtEnd extends correctClassDeclaration +/* Comment */ +{ +} + +// Don't move phpcs:ignore comments. +class PHPCSIgnoreAnnotationAfterOpeningBrace +{ // phpcs:ignore Standard.Cat.Sniff -- for reasons. +} + +// Moving any of the other trailing phpcs: comments is ok. +class PHPCSAnnotationAfterOpeningBrace +{ // phpcs:disable Standard.Cat.Sniff -- for reasons. +} + +if (!class_exists('ClassOpeningBraceShouldBeIndented')) { + abstract class ClassOpeningBraceShouldBeIndented +{ +} +} + +if (!class_exists('ClassOpeningBraceTooMuchIndentation')) { + final class ClassOpeningBraceTooMuchIndentation + { + } +} diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/PEAR/Tests/Classes/ClassDeclarationUnitTest.1.inc.fixed b/vendor/squizlabs/php_codesniffer/src/Standards/PEAR/Tests/Classes/ClassDeclarationUnitTest.1.inc.fixed new file mode 100644 index 00000000..5b0a2f93 --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/PEAR/Tests/Classes/ClassDeclarationUnitTest.1.inc.fixed @@ -0,0 +1,121 @@ +setLogger(new class {}); + +var_dump(new class(10) extends SomeClass implements SomeInterface { + private $num; + + public function __construct($num) + { + $this->num = $num; + } + + use SomeTrait; +}); + +class IncorrectClassDeclarationWithCommentAtEnd extends correctClassDeclaration /* Comment */ +{ +} + +class CorrectClassDeclarationWithCommentAtEnd extends correctClassDeclaration +/* Comment */ +{ +} + +// Don't move phpcs:ignore comments. +class PHPCSIgnoreAnnotationAfterOpeningBrace +{ // phpcs:ignore Standard.Cat.Sniff -- for reasons. +} + +// Moving any of the other trailing phpcs: comments is ok. +class PHPCSAnnotationAfterOpeningBrace +{ + // phpcs:disable Standard.Cat.Sniff -- for reasons. +} + +if (!class_exists('ClassOpeningBraceShouldBeIndented')) { + abstract class ClassOpeningBraceShouldBeIndented + { +} +} + +if (!class_exists('ClassOpeningBraceTooMuchIndentation')) { + final class ClassOpeningBraceTooMuchIndentation + { + } +} diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/PEAR/Tests/Classes/ClassDeclarationUnitTest.2.inc b/vendor/squizlabs/php_codesniffer/src/Standards/PEAR/Tests/Classes/ClassDeclarationUnitTest.2.inc new file mode 100644 index 00000000..ac71fc9f --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/PEAR/Tests/Classes/ClassDeclarationUnitTest.2.inc @@ -0,0 +1,11 @@ + + * @copyright 2006-2015 Squiz Pty Ltd (ABN 77 084 670 600) + * @license https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence + */ + +namespace PHP_CodeSniffer\Standards\PEAR\Tests\Classes; + +use PHP_CodeSniffer\Tests\Standards\AbstractSniffUnitTest; + +class ClassDeclarationUnitTest extends AbstractSniffUnitTest +{ + + + /** + * Get a list of CLI values to set before the file is tested. + * + * @param string $testFile The name of the file being tested. + * @param \PHP_CodeSniffer\Config $config The config data for the test run. + * + * @return void + */ + public function setCliValues($testFile, $config) + { + if ($testFile === 'ClassDeclarationUnitTest.1.inc') { + return; + } + + $config->tabWidth = 4; + + }//end setCliValues() + + + /** + * Returns the lines where errors should occur. + * + * The key of the array should represent the line number and the value + * should represent the number of errors that should occur on that line. + * + * @param string $testFile The name of the file being tested. + * + * @return array + */ + public function getErrorList($testFile='') + { + switch ($testFile) { + case 'ClassDeclarationUnitTest.1.inc': + return [ + 21 => 1, + 22 => 1, + 23 => 1, + 27 => 1, + 33 => 1, + 38 => 1, + 49 => 1, + 84 => 1, + 94 => 1, + 99 => 1, + 104 => 1, + 110 => 1, + ]; + + default: + return []; + }//end switch + + }//end getErrorList() + + + /** + * Returns the lines where warnings should occur. + * + * The key of the array should represent the line number and the value + * should represent the number of warnings that should occur on that line. + * + * @param string $testFile The name of the file being tested. + * + * @return array + */ + public function getWarningList($testFile='') + { + if ($testFile === 'ClassDeclarationUnitTest.2.inc') { + return [11 => 1]; + } + + return[]; + + }//end getWarningList() + + +}//end class diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/PEAR/Tests/Commenting/ClassCommentUnitTest.inc b/vendor/squizlabs/php_codesniffer/src/Standards/PEAR/Tests/Commenting/ClassCommentUnitTest.inc new file mode 100644 index 00000000..8414efbe --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/PEAR/Tests/Commenting/ClassCommentUnitTest.inc @@ -0,0 +1,135 @@ + + * @copyright 2006-2014 Squiz Pty Ltd (ABN 77 084 670 600) + * @license https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence + * @version Release: 1.0 + * @link http://pear.php.net/package/PHP_CodeSniffer + */ +class Extra_Description_Newlines +{ + +}//end class + + +/** + * Sample class comment + * @category PHP + * @package PHP_CodeSniffer + * @author Greg Sherwood + * @copyright 2006-2014 Squiz Pty Ltd (ABN 77 084 670 600) + * @license https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence + * @version + * @link http://pear.php.net/package/PHP_CodeSniffer + */ +class Missing_Newlines_Before_Tags +{ + +}//end class + + +/** + * Simple class comment + * + * @category _wrong_category + * @package PHP_CodeSniffer + * @package ADDITIONAL PACKAGE TAG + * @subpackage SUBPACKAGE TAG + * @author Original Author + * @author Greg Sherwood gsherwood@squiz.net + * @author Mr T + * @author + * @copyright 1997~1994 The PHP Group + * @license http://www.php.net/license/3_0.txt + * @version INVALID VERSION CONTENT + * @see + * @see + * @link sdfsdf + * @see Net_Sample::Net_Sample() + * @see Net_Other + * @deprecated asd + * @unknown Unknown tag + * @since Class available since Release 1.2.0 + */ +class Checking_Tags +{ + class Sub_Class { + + }//end class + + +}//end class + + +/** + * + * + */ +class Empty_Class_Doc +{ + +}//end class + + +/** + * + * + */ +interface Empty_Interface_Doc +{ + +}//end interface + + +/** + * + * + */ +trait Empty_Trait_Doc +{ + +}//end trait + + +/** + * Sample class comment + * + * @category PHP + * @package PHP_CodeSniffer + * @author Greg Sherwood + * @license https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence + * @link http://pear.php.net/package/PHP_CodeSniffer + */ +#[Authenticate('admin_logged_in')] +class TodoController extends AbstractController implements MustBeLoggedInInterface +{ +} diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/PEAR/Tests/Commenting/ClassCommentUnitTest.php b/vendor/squizlabs/php_codesniffer/src/Standards/PEAR/Tests/Commenting/ClassCommentUnitTest.php new file mode 100644 index 00000000..9a4bcf7d --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/PEAR/Tests/Commenting/ClassCommentUnitTest.php @@ -0,0 +1,70 @@ + + * @copyright 2006-2015 Squiz Pty Ltd (ABN 77 084 670 600) + * @license https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence + */ + +namespace PHP_CodeSniffer\Standards\PEAR\Tests\Commenting; + +use PHP_CodeSniffer\Tests\Standards\AbstractSniffUnitTest; + +class ClassCommentUnitTest extends AbstractSniffUnitTest +{ + + + /** + * Returns the lines where errors should occur. + * + * The key of the array should represent the line number and the value + * should represent the number of errors that should occur on that line. + * + * @return array + */ + public function getErrorList() + { + return [ + 4 => 1, + 15 => 1, + 51 => 1, + 63 => 1, + 65 => 2, + 66 => 1, + 68 => 1, + 70 => 1, + 71 => 1, + 72 => 1, + 74 => 2, + 75 => 1, + 76 => 1, + 77 => 1, + 85 => 1, + 96 => 5, + 106 => 5, + 116 => 5, + ]; + + }//end getErrorList() + + + /** + * Returns the lines where warnings should occur. + * + * The key of the array should represent the line number and the value + * should represent the number of warnings that should occur on that line. + * + * @return array + */ + public function getWarningList() + { + return [ + 71 => 1, + 73 => 1, + ]; + + }//end getWarningList() + + +}//end class diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/PEAR/Tests/Commenting/FileCommentUnitTest.1.inc b/vendor/squizlabs/php_codesniffer/src/Standards/PEAR/Tests/Commenting/FileCommentUnitTest.1.inc new file mode 100644 index 00000000..0b18fa38 --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/PEAR/Tests/Commenting/FileCommentUnitTest.1.inc @@ -0,0 +1,53 @@ + +* @author Greg Sherwood gsherwood@squiz.net +* @author Mr T +* @author +* @copyright 1997~1994 The PHP Group +* @copyright 1997~1994 The PHP Group +* @license http://www.php.net/license/3_0.txt +* @see +* @see +* @version INVALID VERSION CONTENT +* @see Net_Sample::Net_Sample() +* @see Net_Other +* @deprecated asd +* @since Class available since Release 1.2.0 +* @summary An unknown summary tag +* @package '' +* @subpackage !! +* @author Code AUthor +*/ +require_once '/some/path.php'; +?> + diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/PEAR/Tests/Commenting/FileCommentUnitTest.2.inc b/vendor/squizlabs/php_codesniffer/src/Standards/PEAR/Tests/Commenting/FileCommentUnitTest.2.inc new file mode 100644 index 00000000..8845eb19 --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/PEAR/Tests/Commenting/FileCommentUnitTest.2.inc @@ -0,0 +1,9 @@ + + * @copyright 2006-2015 Squiz Pty Ltd (ABN 77 084 670 600) + * @license https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence + */ + +namespace PHP_CodeSniffer\Standards\PEAR\Tests\Commenting; + +use PHP_CodeSniffer\Tests\Standards\AbstractSniffUnitTest; + +class FileCommentUnitTest extends AbstractSniffUnitTest +{ + + + /** + * Returns the lines where errors should occur. + * + * The key of the array should represent the line number and the value + * should represent the number of errors that should occur on that line. + * + * @param string $testFile The name of the file being tested. + * + * @return array + */ + public function getErrorList($testFile='FileCommentUnitTest.inc') + { + switch ($testFile) { + case 'FileCommentUnitTest.1.inc': + return [ + 21 => 1, + 23 => 2, + 24 => 1, + 26 => 1, + 28 => 1, + 29 => 1, + 30 => 1, + 31 => 1, + 32 => 2, + 33 => 1, + 34 => 1, + 35 => 1, + 40 => 2, + 41 => 2, + 43 => 1, + ]; + + case 'FileCommentUnitTest.2.inc': + return [1 => 1]; + + default: + return []; + }//end switch + + }//end getErrorList() + + + /** + * Returns the lines where warnings should occur. + * + * The key of the array should represent the line number and the value + * should represent the number of warnings that should occur on that line. + * + * @param string $testFile The name of the file being tested. + * + * @return array + */ + public function getWarningList($testFile='FileCommentUnitTest.inc') + { + switch ($testFile) { + case 'FileCommentUnitTest.1.inc': + return [ + 29 => 1, + 30 => 1, + 34 => 1, + 43 => 1, + ]; + + default: + return []; + }//end switch + + }//end getWarningList() + + +}//end class diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/PEAR/Tests/Commenting/FunctionCommentUnitTest.inc b/vendor/squizlabs/php_codesniffer/src/Standards/PEAR/Tests/Commenting/FunctionCommentUnitTest.inc new file mode 100644 index 00000000..5c3295fd --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/PEAR/Tests/Commenting/FunctionCommentUnitTest.inc @@ -0,0 +1,478 @@ + line numbers for each token. + * + * @param array $tokens The array of tokens to process. + * @param object $tokenizer The tokenizer being used to process this file. + * @param string $eolChar The EOL character to use for splitting strings. + * + * @return void + */ +function foo(&$tokens, $tokenizer, $eolChar) +{ + +}//end foo() + +/** + * Gettext. + * + */ +function _() { + return $foo; +} + +class Baz { + /** + * The PHP5 constructor + * + * No return tag + */ + public function __construct() { + + } +} + +/** + * Complete a step. + * + * @param string $status Status of step to complete. + * @param array $array Array. + * @param string $note Optional note. + * + * @return void + */ +function completeStep($status, array $array = [Class1::class, 'test'], $note = '') { + echo 'foo'; +} + +/** + * Variadic function. + * + * @param string $name1 Comment. + * @param string ...$name2 Comment. + * + * @return void + */ +function myFunction(string $name1, string ...$name2) { +} + + +/** + * Variadic function. + * + * @param string $name1 Comment. + * @param string $name2 Comment. + * + * @return void + */ +function myFunction(string $name1, string ...$name2) { +} + +/** + * Completely invalid format, but should not cause PHP notices. + * + * @param $bar + * Comment here. + * @param ... + * Additional arguments here. + * + * @return + * Return value + * + */ +function foo($bar) { +} + +/** + * Processes the test. + * + * @param PHP_CodeSniffer\Files\File $phpcsFile The PHP_CodeSniffer file where the + * token occurred. + * @param int $stackPtr The position in the tokens stack + * where the listening token type + * was found. + * + * @return void + * @see register() + */ +function process(File $phpcsFile, $stackPtr) +{ + +}//end process() + +/** + * Processes the test. + * + * @param int $phpcsFile The PHP_CodeSniffer + * file where the + * token occurred. + * @param int $stackPtr The position in the tokens stack + * where the listening token type + * was found. + * + * @return void + * @see register() + */ +function process(File $phpcsFile, $stackPtr) +{ + +}//end process() + +/** + * @param (Foo&Bar)|null $a Comment. + * @param string $b Comment. + * + * @return void + */ +public function setTranslator($a, &$b): void +{ + $this->translator = $translator; +} + +// phpcs:set PEAR.Commenting.FunctionComment minimumVisibility protected +private function setTranslator2($a, &$b): void +{ + $this->translator = $translator; +} + +// phpcs:set PEAR.Commenting.FunctionComment minimumVisibility public +protected function setTranslator3($a, &$b): void +{ + $this->translator = $translator; +} + +private function setTranslator4($a, &$b): void +{ + $this->translator = $translator; +} + +class Bar { + /** + * The PHP5 constructor + * + * @return + */ + public function __construct() { + + } +} + +// phpcs:set PEAR.Commenting.FunctionComment specialMethods[] +class Bar { + /** + * The PHP5 constructor + */ + public function __construct() { + + } +} + +// phpcs:set PEAR.Commenting.FunctionComment specialMethods[] ignored +/** + * Should be ok + */ +public function ignored() { + +} + +// phpcs:set PEAR.Commenting.FunctionComment specialMethods[] __construct,__destruct + +class Something implements JsonSerializable { + /** + * Single attribute. + * + * @return mixed + */ + #[ReturnTypeWillChange] + public function jsonSerialize() {} + + /** + * Multiple attributes. + * + * @return Something + */ + #[AttributeA] + #[AttributeB] + public function methodName() {} + + /** + * Blank line between docblock and attribute. + * + * @return mixed + */ + + #[ReturnTypeWillChange] + public function blankLineDetectionA() {} + + /** + * Blank line between attribute and function declaration. + * + * @return mixed + */ + #[ReturnTypeWillChange] + + public function blankLineDetectionB() {} + + /** + * Blank line between both docblock and attribute and attribute and function declaration. + * + * @return mixed + */ + + #[ReturnTypeWillChange] + + public function blankLineDetectionC() {} +} diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/PEAR/Tests/Commenting/FunctionCommentUnitTest.inc.fixed b/vendor/squizlabs/php_codesniffer/src/Standards/PEAR/Tests/Commenting/FunctionCommentUnitTest.inc.fixed new file mode 100644 index 00000000..751b09c6 --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/PEAR/Tests/Commenting/FunctionCommentUnitTest.inc.fixed @@ -0,0 +1,478 @@ + line numbers for each token. + * + * @param array $tokens The array of tokens to process. + * @param object $tokenizer The tokenizer being used to process this file. + * @param string $eolChar The EOL character to use for splitting strings. + * + * @return void + */ +function foo(&$tokens, $tokenizer, $eolChar) +{ + +}//end foo() + +/** + * Gettext. + * + */ +function _() { + return $foo; +} + +class Baz { + /** + * The PHP5 constructor + * + * No return tag + */ + public function __construct() { + + } +} + +/** + * Complete a step. + * + * @param string $status Status of step to complete. + * @param array $array Array. + * @param string $note Optional note. + * + * @return void + */ +function completeStep($status, array $array = [Class1::class, 'test'], $note = '') { + echo 'foo'; +} + +/** + * Variadic function. + * + * @param string $name1 Comment. + * @param string ...$name2 Comment. + * + * @return void + */ +function myFunction(string $name1, string ...$name2) { +} + + +/** + * Variadic function. + * + * @param string $name1 Comment. + * @param string $name2 Comment. + * + * @return void + */ +function myFunction(string $name1, string ...$name2) { +} + +/** + * Completely invalid format, but should not cause PHP notices. + * + * @param $bar + * Comment here. + * @param ... + * Additional arguments here. + * + * @return + * Return value + * + */ +function foo($bar) { +} + +/** + * Processes the test. + * + * @param PHP_CodeSniffer\Files\File $phpcsFile The PHP_CodeSniffer file where the + * token occurred. + * @param int $stackPtr The position in the tokens stack + * where the listening token type + * was found. + * + * @return void + * @see register() + */ +function process(File $phpcsFile, $stackPtr) +{ + +}//end process() + +/** + * Processes the test. + * + * @param int $phpcsFile The PHP_CodeSniffer + * file where the + * token occurred. + * @param int $stackPtr The position in the tokens stack + * where the listening token type + * was found. + * + * @return void + * @see register() + */ +function process(File $phpcsFile, $stackPtr) +{ + +}//end process() + +/** + * @param (Foo&Bar)|null $a Comment. + * @param string $b Comment. + * + * @return void + */ +public function setTranslator($a, &$b): void +{ + $this->translator = $translator; +} + +// phpcs:set PEAR.Commenting.FunctionComment minimumVisibility protected +private function setTranslator2($a, &$b): void +{ + $this->translator = $translator; +} + +// phpcs:set PEAR.Commenting.FunctionComment minimumVisibility public +protected function setTranslator3($a, &$b): void +{ + $this->translator = $translator; +} + +private function setTranslator4($a, &$b): void +{ + $this->translator = $translator; +} + +class Bar { + /** + * The PHP5 constructor + * + * @return + */ + public function __construct() { + + } +} + +// phpcs:set PEAR.Commenting.FunctionComment specialMethods[] +class Bar { + /** + * The PHP5 constructor + */ + public function __construct() { + + } +} + +// phpcs:set PEAR.Commenting.FunctionComment specialMethods[] ignored +/** + * Should be ok + */ +public function ignored() { + +} + +// phpcs:set PEAR.Commenting.FunctionComment specialMethods[] __construct,__destruct + +class Something implements JsonSerializable { + /** + * Single attribute. + * + * @return mixed + */ + #[ReturnTypeWillChange] + public function jsonSerialize() {} + + /** + * Multiple attributes. + * + * @return Something + */ + #[AttributeA] + #[AttributeB] + public function methodName() {} + + /** + * Blank line between docblock and attribute. + * + * @return mixed + */ + + #[ReturnTypeWillChange] + public function blankLineDetectionA() {} + + /** + * Blank line between attribute and function declaration. + * + * @return mixed + */ + #[ReturnTypeWillChange] + + public function blankLineDetectionB() {} + + /** + * Blank line between both docblock and attribute and attribute and function declaration. + * + * @return mixed + */ + + #[ReturnTypeWillChange] + + public function blankLineDetectionC() {} +} diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/PEAR/Tests/Commenting/FunctionCommentUnitTest.php b/vendor/squizlabs/php_codesniffer/src/Standards/PEAR/Tests/Commenting/FunctionCommentUnitTest.php new file mode 100644 index 00000000..734ff73e --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/PEAR/Tests/Commenting/FunctionCommentUnitTest.php @@ -0,0 +1,96 @@ + + * @copyright 2006-2015 Squiz Pty Ltd (ABN 77 084 670 600) + * @license https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence + */ + +namespace PHP_CodeSniffer\Standards\PEAR\Tests\Commenting; + +use PHP_CodeSniffer\Tests\Standards\AbstractSniffUnitTest; + +class FunctionCommentUnitTest extends AbstractSniffUnitTest +{ + + + /** + * Returns the lines where errors should occur. + * + * The key of the array should represent the line number and the value + * should represent the number of errors that should occur on that line. + * + * @return array + */ + public function getErrorList() + { + return [ + 5 => 1, + 10 => 1, + 12 => 1, + 13 => 1, + 14 => 1, + 15 => 1, + 28 => 1, + 76 => 1, + 87 => 1, + 103 => 1, + 109 => 1, + 112 => 1, + 122 => 1, + 123 => 2, + 124 => 2, + 125 => 1, + 126 => 1, + 137 => 1, + 138 => 1, + 139 => 1, + 152 => 1, + 155 => 1, + 165 => 1, + 172 => 1, + 183 => 1, + 190 => 2, + 206 => 1, + 234 => 1, + 272 => 1, + 313 => 1, + 317 => 1, + 327 => 1, + 329 => 1, + 332 => 1, + 344 => 1, + 343 => 1, + 345 => 1, + 346 => 1, + 360 => 1, + 361 => 1, + 363 => 1, + 364 => 1, + 406 => 1, + 417 => 1, + 455 => 1, + 464 => 1, + 473 => 1, + ]; + + }//end getErrorList() + + + /** + * Returns the lines where warnings should occur. + * + * The key of the array should represent the line number and the value + * should represent the number of warnings that should occur on that line. + * + * @return array + */ + public function getWarningList() + { + return []; + + }//end getWarningList() + + +}//end class diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/PEAR/Tests/Commenting/InlineCommentUnitTest.inc b/vendor/squizlabs/php_codesniffer/src/Standards/PEAR/Tests/Commenting/InlineCommentUnitTest.inc new file mode 100644 index 00000000..187228c2 --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/PEAR/Tests/Commenting/InlineCommentUnitTest.inc @@ -0,0 +1,29 @@ + + * @copyright 2006-2015 Squiz Pty Ltd (ABN 77 084 670 600) + * @license https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence + */ + +namespace PHP_CodeSniffer\Standards\PEAR\Tests\Commenting; + +use PHP_CodeSniffer\Tests\Standards\AbstractSniffUnitTest; + +class InlineCommentUnitTest extends AbstractSniffUnitTest +{ + + + /** + * Returns the lines where errors should occur. + * + * The key of the array should represent the line number and the value + * should represent the number of errors that should occur on that line. + * + * @return array + */ + public function getErrorList() + { + return [ + 15 => 1, + 24 => 1, + 25 => 1, + 27 => 1, + 28 => 1, + 29 => 1, + ]; + + }//end getErrorList() + + + /** + * Returns the lines where warnings should occur. + * + * The key of the array should represent the line number and the value + * should represent the number of warnings that should occur on that line. + * + * @return array + */ + public function getWarningList() + { + return []; + + }//end getWarningList() + + +}//end class diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/PEAR/Tests/ControlStructures/ControlSignatureUnitTest.inc b/vendor/squizlabs/php_codesniffer/src/Standards/PEAR/Tests/ControlStructures/ControlSignatureUnitTest.inc new file mode 100644 index 00000000..cc9903aa --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/PEAR/Tests/ControlStructures/ControlSignatureUnitTest.inc @@ -0,0 +1,165 @@ + 0); + +do +{ + echo $i; +} while ($i > 0); + +do +{ + echo $i; +} +while ($i > 0); + +do { echo $i; } while ($i > 0); + +do{ + echo $i; +}while($i > 0); + + +// while +while ($i < 1) { + echo $i; +} + +while($i < 1){ + echo $i; +} + +while ($i < 1) { echo $i; } + + +// for +for ($i = 1; $i < 1; $i++) { + echo $i; +} + +for($i = 1; $i < 1; $i++){ + echo $i; +} + +for ($i = 1; $i < 1; $i++) { echo $i; } + + +// foreach +foreach ($items as $item) { + echo $item; +} + +foreach($items as $item){ + echo $item; +} + +foreach ($items as $item) { echo $item; } + + +// if +if ($i == 0) { + $i = 1; +} + +if($i == 0){ + $i = 1; +} + +if ($i == 0) { $i = 1; } + + +// else +if ($i == 0) { + $i = 1; +} else { + $i = 0; +} + +if ($i == 0) { + $i = 1; +}else{ + $i = 0; +} + +if ($i == 0) { $i = 1; } else { $i = 0; } + + +// else +if ($i == 0) { + $i = 1; +} else { + $i = 0; +} + +if ($i == 0) { + $i = 1; +}else{ + $i = 0; +} + +if ($i == 0) { $i = 1; } else { $i = 0; } + + +// else if +if ($i == 0) { + $i = 1; +} else if ($i == 2) { + $i = 0; +} + +if ($i == 0) { + $i = 1; +} elseif ($i == 2) { + $i = 0; +} + +if ($i == 0) { + $i = 1; +}else if($i == 2){ + $i = 0; +} + +if ($i == 0) { + $i = 1; +}elseif($i == 2){ + $i = 0; +} + +if ($i == 0) { $i = 1; } else if ($i == 2) { $i = 0; } +if ($i == 0) { $i = 1; } elseif ($i == 2) { $i = 0; } + +if ($i == 0) { // this is ok because comments are allowed + $i = 1; +} + +if ($i == 0) {// this is ok because comments are allowed + $i = 1; +} + +if ($i == 0) { /* this is ok because comments are allowed*/ + $i = 1; +} + +if ($i == 0) +{ // this is not ok + $i = 1; +} + +if ($i == 0) /* this is ok */ { +} + +if ($i == 0) { +} +else { +} + +// match +$r = match ($x) { + 1 => 1, +}; + +$r = match( $x ){ 1 => 1 }; diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/PEAR/Tests/ControlStructures/ControlSignatureUnitTest.php b/vendor/squizlabs/php_codesniffer/src/Standards/PEAR/Tests/ControlStructures/ControlSignatureUnitTest.php new file mode 100644 index 00000000..98c3463b --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/PEAR/Tests/ControlStructures/ControlSignatureUnitTest.php @@ -0,0 +1,72 @@ + + * @copyright 2006-2015 Squiz Pty Ltd (ABN 77 084 670 600) + * @license https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence + */ + +namespace PHP_CodeSniffer\Standards\PEAR\Tests\ControlStructures; + +use PHP_CodeSniffer\Tests\Standards\AbstractSniffUnitTest; + +class ControlSignatureUnitTest extends AbstractSniffUnitTest +{ + + + /** + * Returns the lines where errors should occur. + * + * The key of the array should represent the line number and the value + * should represent the number of errors that should occur on that line. + * + * @return array + */ + public function getErrorList() + { + return [ + 9 => 1, + 14 => 1, + 20 => 1, + 22 => 1, + 32 => 1, + 36 => 1, + 44 => 1, + 48 => 1, + 56 => 1, + 60 => 1, + 68 => 1, + 72 => 1, + 84 => 1, + 88 => 2, + 100 => 1, + 104 => 2, + 122 => 2, + 128 => 1, + 132 => 3, + 133 => 2, + 147 => 1, + 157 => 1, + 165 => 1, + ]; + + }//end getErrorList() + + + /** + * Returns the lines where warnings should occur. + * + * The key of the array should represent the line number and the value + * should represent the number of warnings that should occur on that line. + * + * @return array + */ + public function getWarningList() + { + return []; + + }//end getWarningList() + + +}//end class diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/PEAR/Tests/ControlStructures/MultiLineConditionUnitTest.inc b/vendor/squizlabs/php_codesniffer/src/Standards/PEAR/Tests/ControlStructures/MultiLineConditionUnitTest.inc new file mode 100644 index 00000000..a7a3c69d --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/PEAR/Tests/ControlStructures/MultiLineConditionUnitTest.inc @@ -0,0 +1,251 @@ + +

    some text

    +errorCode() == 401 || // comment + $IPP->errorCode() == 3200) /* long comment + here + */ +{ + return false; +} + +if ($IPP->errorCode() == 401 || // comment + $IPP->errorCode() == 3200) // long comment here +{ + return false; +} + +if ($IPP->errorCode() == 401 + // Comment explaining the next condition here. + || $IPP->errorCode() == 3200 +) { + return false; +} + +function bar() { + if ($a + && $b +) { + return false; + } +} + +if ($a + && foo( + 'a', + 'b' + )) { + return false; +} + +?> + + + + + +errorCode() == 401 || // phpcs:ignore Standard.Category.Sniff -- for reasons. + $IPP->errorCode() == 3200) /* + phpcs:ignore Standard.Category.Sniff -- for reasons. + */ +{ + return false; +} + +if ($IPP->errorCode() == 401 || // phpcs:disable Standard.Category.Sniff -- for reasons. + $IPP->errorCode() == 3200) // phpcs:enable +{ + return false; +} + +if ($IPP->errorCode() == 401 + // phpcs:ignore Standard.Category.Sniff -- for reasons. + || $IPP->errorCode() == 3200 +) { + return false; +} + + if ($IPP->errorCode() == 401 || + /* + * phpcs:disable Standard.Category.Sniff -- for reasons. + */ + $IPP->errorCode() == 3200 + ) { + return false; + } + +if ($IPP->errorCode() == 401 + || $IPP->errorCode() == 3200 + // phpcs:ignore Standard.Category.Sniff -- for reasons. +) { + return false; +} + +if ($IPP->errorCode() == 401 + || $IPP->errorCode() + === 'someverylongexpectedoutput' +) { + return false; +} + +if ($IPP->errorCode() == 401 + || $IPP->errorCode() + // A comment. + === 'someverylongexpectedoutput' +) { + return false; +} + +if ($IPP->errorCode() == 401 + || $IPP->errorCode() + // phpcs:ignore Standard.Category.Sniff -- for reasons. + === 'someverylongexpectedoutput' +) { + return false; +} diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/PEAR/Tests/ControlStructures/MultiLineConditionUnitTest.inc.fixed b/vendor/squizlabs/php_codesniffer/src/Standards/PEAR/Tests/ControlStructures/MultiLineConditionUnitTest.inc.fixed new file mode 100644 index 00000000..7d56c461 --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/PEAR/Tests/ControlStructures/MultiLineConditionUnitTest.inc.fixed @@ -0,0 +1,247 @@ + +

    some text

    +errorCode() == 401 // comment + || $IPP->errorCode() == 3200 /* long comment + here + */ +) { + return false; +} + +if ($IPP->errorCode() == 401 // comment + || $IPP->errorCode() == 3200 // long comment here +) { + return false; +} + +if ($IPP->errorCode() == 401 + // Comment explaining the next condition here. + || $IPP->errorCode() == 3200 +) { + return false; +} + +function bar() { + if ($a + && $b + ) { + return false; + } +} + +if ($a + && foo( + 'a', + 'b' + ) +) { + return false; +} + +?> + + + + + +errorCode() == 401 // phpcs:ignore Standard.Category.Sniff -- for reasons. + || $IPP->errorCode() == 3200 /* + phpcs:ignore Standard.Category.Sniff -- for reasons. + */ +) { + return false; +} + +if ($IPP->errorCode() == 401 // phpcs:disable Standard.Category.Sniff -- for reasons. + || $IPP->errorCode() == 3200 // phpcs:enable +) { + return false; +} + +if ($IPP->errorCode() == 401 + // phpcs:ignore Standard.Category.Sniff -- for reasons. + || $IPP->errorCode() == 3200 +) { + return false; +} + + if ($IPP->errorCode() == 401 + /* + * phpcs:disable Standard.Category.Sniff -- for reasons. + */ + || $IPP->errorCode() == 3200 + ) { + return false; + } + +if ($IPP->errorCode() == 401 + || $IPP->errorCode() == 3200 + // phpcs:ignore Standard.Category.Sniff -- for reasons. +) { + return false; +} + +if ($IPP->errorCode() == 401 + || $IPP->errorCode() === 'someverylongexpectedoutput' +) { + return false; +} + +if ($IPP->errorCode() == 401 + || $IPP->errorCode() + // A comment. + === 'someverylongexpectedoutput' +) { + return false; +} + +if ($IPP->errorCode() == 401 + || $IPP->errorCode() + // phpcs:ignore Standard.Category.Sniff -- for reasons. + === 'someverylongexpectedoutput' +) { + return false; +} diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/PEAR/Tests/ControlStructures/MultiLineConditionUnitTest.js b/vendor/squizlabs/php_codesniffer/src/Standards/PEAR/Tests/ControlStructures/MultiLineConditionUnitTest.js new file mode 100644 index 00000000..064d7ff7 --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/PEAR/Tests/ControlStructures/MultiLineConditionUnitTest.js @@ -0,0 +1,251 @@ +if (blah(param)) { + +} + +if ((condition1 + || condition2) + && condition3 + && condition4 + && condition5 +) { +} + +if ((condition1 || condition2) && condition3 && condition4 && condition5) { +} + +if ((condition1 || condition2) + && condition3 +) { +} + +if ( + (condition1 || condition2) + && condition3 +) { +} + +if ((condition1 + || condition2) +) { +} + +if ((condition1 + || condition2) + && condition3 && + condition4 +) { +} + +if ((condition1 + || condition2) + && condition3 + && condition4 + && condition5 +) { +} + +if (($condition1 + || $condition2) +) { +} + +if ((condition1 + || condition2) + ) { +} + +if ( + ( + condition1 + || condition2 + ) + && condition3 +) { +} + + +if ( condition1 + || condition2 + || condition3 +) { +} + +if (condition1 + || condition2 + || condition3 +) { +} else if (condition1 + || condition2 + || condition3 +) { +} + +if (condition1 + || condition2 + || condition3 +) { +} else if ( + condition1 + || condition2 && + condition3 +) { +} + +if (condition1 + || condition2 +|| condition3) { +} + +if (condition1 + || condition2 || condition3 +){ +} + +if (condition1) + console.info('bar'); + +if (condition1 + || condition2 +|| condition3) + console.info('bar'); + + +if (condition1 + || condition2 || condition3 +) + console.info('bar'); + +if (!a(post) + && (!a(context.header) + ^ a(context.header, 'Content-Type')) +) { +// ... +} + +if (foo) +{ + console.info('bar'); +} + +// Should be no errors even though lines are +// not exactly aligned together. Multi-line function +// call takes precedence. +if (array_key_exists(key, value) + && foo.bar.baz( + key, value2 + ) +) { +} + +if (true) { + foo = true; +}; + +if (foo == 401 || // comment + bar == 3200) /* long comment + here + */ +{ + return false; +} + +if (foo == 401 || // comment + bar == 3200) // long comment here +{ + return false; +} + +if (IPP.errorCode() == 401 + // Comment explaining the next condition here. + || IPP.errorCode() == 3200 +) { + return false; +} + +function bar() { + if (a + && b +) { + return false; + } +} + +if (a + && foo( + 'a', + 'b' + )) { + return false; +} + + + + + + + + + + + + + +if (foo == 401 || // phpcs:ignore Standard.Category.Sniff -- for reasons. + bar == 3200) /* + phpcs:ignore Standard.Category.Sniff -- for reasons. + */ +{ + return false; +} + +if (foo == 401 || // phpcs:disable Standard.Category.Sniff -- for reasons. + bar == 3200) // phpcs:enable +{ + return false; +} + +if (IPP.errorCode() == 401 + // phpcs:ignore Standard.Category.Sniff -- for reasons. + || IPP.errorCode() == 3200 +) { + return false; +} + + if (foo == 401 || + /* + * phpcs:disable Standard.Category.Sniff -- for reasons. + */ + bar == 3200 + ) { + return false; + } + +if (IPP.errorCode() == 401 + || IPP.errorCode() == 3200 + // phpcs:ignore Standard.Category.Sniff -- for reasons. +) { + return false; +} + +if (foo == 401 + || bar + == 'someverylongexpectedoutput' +) { + return false; +} + +if (IPP.errorCode() == 401 + || bar + // A comment. + == 'someverylongexpectedoutput' +) { + return false; +} + +if (foo == 401 + || IPP.errorCode() + // phpcs:ignore Standard.Category.Sniff -- for reasons. + == 'someverylongexpectedoutput' +) { + return false; +} diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/PEAR/Tests/ControlStructures/MultiLineConditionUnitTest.js.fixed b/vendor/squizlabs/php_codesniffer/src/Standards/PEAR/Tests/ControlStructures/MultiLineConditionUnitTest.js.fixed new file mode 100644 index 00000000..cfde75d7 --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/PEAR/Tests/ControlStructures/MultiLineConditionUnitTest.js.fixed @@ -0,0 +1,247 @@ +if (blah(param)) { + +} + +if ((condition1 + || condition2) + && condition3 + && condition4 + && condition5 +) { +} + +if ((condition1 || condition2) && condition3 && condition4 && condition5) { +} + +if ((condition1 || condition2) + && condition3 +) { +} + +if ((condition1 || condition2) + && condition3 +) { +} + +if ((condition1 + || condition2) +) { +} + +if ((condition1 + || condition2) + && condition3 + && condition4 +) { +} + +if ((condition1 + || condition2) + && condition3 + && condition4 + && condition5 +) { +} + +if (($condition1 + || $condition2) +) { +} + +if ((condition1 + || condition2) +) { +} + +if ((condition1 + || condition2) + && condition3 +) { +} + + +if (condition1 + || condition2 + || condition3 +) { +} + +if (condition1 + || condition2 + || condition3 +) { +} else if (condition1 + || condition2 + || condition3 +) { +} + +if (condition1 + || condition2 + || condition3 +) { +} else if (condition1 + || condition2 + && condition3 +) { +} + +if (condition1 + || condition2 + || condition3 +) { +} + +if (condition1 + || condition2 || condition3 +) { +} + +if (condition1) + console.info('bar'); + +if (condition1 + || condition2 + || condition3 +) + console.info('bar'); + + +if (condition1 + || condition2 || condition3 +) + console.info('bar'); + +if (!a(post) + && (!a(context.header) + ^ a(context.header, 'Content-Type')) +) { +// ... +} + +if (foo) { + console.info('bar'); +} + +// Should be no errors even though lines are +// not exactly aligned together. Multi-line function +// call takes precedence. +if (array_key_exists(key, value) + && foo.bar.baz( + key, value2 + ) +) { +} + +if (true) { + foo = true; +}; + +if (foo == 401 // comment + || bar == 3200 /* long comment + here + */ +) { + return false; +} + +if (foo == 401 // comment + || bar == 3200 // long comment here +) { + return false; +} + +if (IPP.errorCode() == 401 + // Comment explaining the next condition here. + || IPP.errorCode() == 3200 +) { + return false; +} + +function bar() { + if (a + && b + ) { + return false; + } +} + +if (a + && foo( + 'a', + 'b' + ) +) { + return false; +} + + + + + + + + + + + + + +if (foo == 401 // phpcs:ignore Standard.Category.Sniff -- for reasons. + || bar == 3200 /* + phpcs:ignore Standard.Category.Sniff -- for reasons. + */ +) { + return false; +} + +if (foo == 401 // phpcs:disable Standard.Category.Sniff -- for reasons. + || bar == 3200 // phpcs:enable +) { + return false; +} + +if (IPP.errorCode() == 401 + // phpcs:ignore Standard.Category.Sniff -- for reasons. + || IPP.errorCode() == 3200 +) { + return false; +} + + if (foo == 401 + /* + * phpcs:disable Standard.Category.Sniff -- for reasons. + */ + || bar == 3200 + ) { + return false; + } + +if (IPP.errorCode() == 401 + || IPP.errorCode() == 3200 + // phpcs:ignore Standard.Category.Sniff -- for reasons. +) { + return false; +} + +if (foo == 401 + || bar == 'someverylongexpectedoutput' +) { + return false; +} + +if (IPP.errorCode() == 401 + || bar + // A comment. + == 'someverylongexpectedoutput' +) { + return false; +} + +if (foo == 401 + || IPP.errorCode() + // phpcs:ignore Standard.Category.Sniff -- for reasons. + == 'someverylongexpectedoutput' +) { + return false; +} diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/PEAR/Tests/ControlStructures/MultiLineConditionUnitTest.php b/vendor/squizlabs/php_codesniffer/src/Standards/PEAR/Tests/ControlStructures/MultiLineConditionUnitTest.php new file mode 100644 index 00000000..f78b4e3f --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/PEAR/Tests/ControlStructures/MultiLineConditionUnitTest.php @@ -0,0 +1,91 @@ + + * @copyright 2006-2015 Squiz Pty Ltd (ABN 77 084 670 600) + * @license https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence + */ + +namespace PHP_CodeSniffer\Standards\PEAR\Tests\ControlStructures; + +use PHP_CodeSniffer\Tests\Standards\AbstractSniffUnitTest; + +class MultiLineConditionUnitTest extends AbstractSniffUnitTest +{ + + + /** + * Returns the lines where errors should occur. + * + * The key of the array should represent the line number and the value + * should represent the number of errors that should occur on that line. + * + * @param string $testFile The name of the file being tested. + * + * @return array + */ + public function getErrorList($testFile='MultiLineConditionUnitTest.inc') + { + $errors = [ + 21 => 1, + 22 => 1, + 35 => 1, + 40 => 1, + 41 => 1, + 42 => 1, + 43 => 1, + 49 => 1, + 54 => 1, + 57 => 1, + 58 => 1, + 59 => 1, + 61 => 1, + 67 => 1, + 87 => 1, + 88 => 1, + 89 => 1, + 90 => 1, + 96 => 2, + 101 => 1, + 109 => 2, + 125 => 1, + 145 => 2, + 153 => 2, + 168 => 1, + 177 => 1, + 194 => 2, + 202 => 2, + 215 => 1, + 218 => 2, + 232 => 2, + 239 => 1, + 240 => 2, + 248 => 2, + ]; + + if ($testFile === 'MultiLineConditionUnitTest.inc') { + $errors[183] = 1; + } + + return $errors; + + }//end getErrorList() + + + /** + * Returns the lines where warnings should occur. + * + * The key of the array should represent the line number and the value + * should represent the number of warnings that should occur on that line. + * + * @return array + */ + public function getWarningList() + { + return []; + + }//end getWarningList() + + +}//end class diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/PEAR/Tests/Files/IncludingFileUnitTest.inc b/vendor/squizlabs/php_codesniffer/src/Standards/PEAR/Tests/Files/IncludingFileUnitTest.inc new file mode 100644 index 00000000..dadfe923 --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/PEAR/Tests/Files/IncludingFileUnitTest.inc @@ -0,0 +1,99 @@ + +
    +Some content goes here.
    +
    +
    + +
    +    Some content goes here.
    +    
    +    
    + +
    +Some content goes here.
    +
    +
    + +
    +    Some content goes here.
    +    
    +    
    + + * @copyright 2006-2015 Squiz Pty Ltd (ABN 77 084 670 600) + * @license https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence + */ + +namespace PHP_CodeSniffer\Standards\PEAR\Tests\Files; + +use PHP_CodeSniffer\Tests\Standards\AbstractSniffUnitTest; + +class IncludingFileUnitTest extends AbstractSniffUnitTest +{ + + + /** + * Returns the lines where errors should occur. + * + * The key of the array should represent the line number and the value + * should represent the number of errors that should occur on that line. + * + * @return array + */ + public function getErrorList() + { + return [ + 4 => 1, + 5 => 1, + 11 => 1, + 12 => 1, + 16 => 1, + 17 => 1, + 33 => 1, + 34 => 1, + 47 => 1, + 48 => 1, + 64 => 1, + 65 => 1, + 73 => 1, + 74 => 1, + 85 => 1, + 86 => 1, + 98 => 1, + 99 => 2, + ]; + + }//end getErrorList() + + + /** + * Returns the lines where warnings should occur. + * + * The key of the array should represent the line number and the value + * should represent the number of warnings that should occur on that line. + * + * @return array + */ + public function getWarningList() + { + return []; + + }//end getWarningList() + + +}//end class diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/PEAR/Tests/Formatting/MultiLineAssignmentUnitTest.inc b/vendor/squizlabs/php_codesniffer/src/Standards/PEAR/Tests/Formatting/MultiLineAssignmentUnitTest.inc new file mode 100644 index 00000000..fc6aea00 --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/PEAR/Tests/Formatting/MultiLineAssignmentUnitTest.inc @@ -0,0 +1,22 @@ +additionalHeaderData[$this->strApplicationName] + = $this->xajax->getJavascript(t3lib_extMgm::siteRelPath('nr_xajax')); + +$GLOBALS['TSFE']->additionalHeaderData[$this->strApplicationName] + = $this->xajax->getJavascript(t3lib_extMgm::siteRelPath('nr_xajax')); + +$GLOBALS['TSFE']->additionalHeaderData[$this->strApplicationName] = + $this->xajax->getJavascript(t3lib_extMgm::siteRelPath('nr_xajax')); + +$GLOBALS['TSFE']->additionalHeaderData[$this->strApplicationName] + = $this->xajax->getJavascript(t3lib_extMgm::siteRelPath('nr_xajax')); +$GLOBALS['TSFE']->additionalHeaderData[$this->strApplicationName] = 'boo'; + +$var='string'; + +function getInstalledStandards( + $includeGeneric=false, + $standardsDir='' +) { +} +?> diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/PEAR/Tests/Formatting/MultiLineAssignmentUnitTest.php b/vendor/squizlabs/php_codesniffer/src/Standards/PEAR/Tests/Formatting/MultiLineAssignmentUnitTest.php new file mode 100644 index 00000000..734d4fce --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/PEAR/Tests/Formatting/MultiLineAssignmentUnitTest.php @@ -0,0 +1,52 @@ + + * @copyright 2006-2015 Squiz Pty Ltd (ABN 77 084 670 600) + * @license https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence + */ + +namespace PHP_CodeSniffer\Standards\PEAR\Tests\Formatting; + +use PHP_CodeSniffer\Tests\Standards\AbstractSniffUnitTest; + +class MultiLineAssignmentUnitTest extends AbstractSniffUnitTest +{ + + + /** + * Returns the lines where errors should occur. + * + * The key of the array should represent the line number and the value + * should represent the number of errors that should occur on that line. + * + * @return array + */ + public function getErrorList() + { + return [ + 3 => 1, + 6 => 1, + 8 => 1, + ]; + + }//end getErrorList() + + + /** + * Returns the lines where warnings should occur. + * + * The key of the array should represent the line number and the value + * should represent the number of warnings that should occur on that line. + * + * @return array + */ + public function getWarningList() + { + return []; + + }//end getWarningList() + + +}//end class diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/PEAR/Tests/Functions/FunctionCallSignatureUnitTest.inc b/vendor/squizlabs/php_codesniffer/src/Standards/PEAR/Tests/Functions/FunctionCallSignatureUnitTest.inc new file mode 100644 index 00000000..ed3d2c43 --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/PEAR/Tests/Functions/FunctionCallSignatureUnitTest.inc @@ -0,0 +1,550 @@ +getFoo() + ->doBar( + $this->getX() // no comma here + ->doY() // this is still the first method argument + ->doZ() // this is still the first method argument + ); +} + +$var = myFunction( +$foo, +$bar +); + +// phpcs:set PEAR.Functions.FunctionCallSignature allowMultipleArguments false + +fputs( + STDOUT, + "Examples: + $ {$app} , --all + $ {$app} --all", $something +); + +$array = array(); +array_map( + function($x) + { + return trim($x, $y); + }, $foo, + $array +); + +$bar = new stdClass( + 4, /* thanks */ 5, /* PSR-2 */ 6 +); + +function doSomething() +{ + return $this->getFoo() + ->doBar( + $this->getX() // no comma here + ->doY() // this is still the first method argument + ->doZ() // this is still the first method argument + ); +} + +doError( + 404, // status code + 'Not Found', // error name + 'Check your id' // fix +); + +// phpcs:set PEAR.Functions.FunctionCallSignature allowMultipleArguments true + +// Don't report errors for closing braces. Leave that to other sniffs. +foo( + [ + 'this', + 'is', + 'an', + 'array' + ], +[ + 'this', + 'is', + 'an', + 'array' + ], + array( + 'this', + 'is', +'an', +'array' + ), + array( + 'this', + 'is', + 'an', + 'array' + ), + function($x) + { + echo 'wee'; + + return trim($x); + } +); + +function foo() +{ + myFunction( + 'string'. + // comment + // comment + 'string'. + /* comment + * comment + */ + 'string' + ); +} + +// phpcs:set PEAR.Functions.FunctionCallSignature requiredSpacesAfterOpen 1 +// phpcs:set PEAR.Functions.FunctionCallSignature requiredSpacesBeforeClose 1 +test($arg, $arg2); +test( $arg, $arg2 ); +test( $arg, $arg2 ); +test(); +test( ); +test( ); +// phpcs:set PEAR.Functions.FunctionCallSignature requiredSpacesAfterOpen 0 +// phpcs:set PEAR.Functions.FunctionCallSignature requiredSpacesBeforeClose 0 + +?> + + + +
  • + log(// ... + 'error', + sprintf( + 'Message: %s', + isset($e->getData()['object']['evidence_details']) + ? $e->getData()['object']['evidence_details']['due_by'] + : '' + ), + array($e->getData()['object']) +); + +?> +
    + $class + ] + ); ?> +
    + + function ($x) { + return true; + }, + 'baz' => false + ) +); +$qux = array_filter( + $quux, function ($x) { + return $x; + } +); + +array_filter( + [1, 2], + function ($i) : bool { + return $i === 0; + } +); + +foo(array( + 'callback' => function () { + $foo = 'foo'; + return; + }, +)); + +foo( + $a, + /* + $c, + + $d, + */ + $e +); + +test( + 1,2,3,4 + ); + +class Test +{ + public function getInstance() + { + return new static( + 'arg', + 'foo' + ); + } + + public function getSelf() + { + return new self( + 'a','b', 'c' + ); + } +} + +$x = $var('y', +'x'); + +$obj->{$x}(1, + 2); + +return (function ($a, $b) { + return function ($c, $d) use ($a, $b) { + echo $a, $b, $c, $d; + }; +})( + 'a','b' +)('c', + 'd'); + +class Foo +{ + public function bar($a, $b) + { + if (!$a || !$b) { + return; + } + + (new stdClass())->a = $a; + } +} + +return (function ($a, $b) { + return function ($c, $d) use ($a, $b) { + echo $a, $b, $c, $d; + }; +})('a','b')('c','d'); + +function foo() +{ + Bar( + function () { + } + ); +} + +$deprecated_functions = [ + 'the_category_ID' + => function_call( // 7 spaces, not 8. This is the problem line. + $a, + $b + ), +]; + +$deprecated_functions = [ + 'the_category_ID' + => function_call( // 9 spaces, not 8. This is the problem line. + $a, + $b + ), +]; + +// phpcs:set PEAR.Functions.FunctionCallSignature allowMultipleArguments false + +printf( + '', + $obj->getName(), // Trailing comment. + $obj->getID(), // phpcs:ignore Standard.Category.SniffName -- for reasons. + $option +); + +// Handling of PHP 7.3 trailing comma's. +functionCall($args, $foo,); +functionCall( + $args, $foo, +); +functionCall( + $args, + $foo, +); + +// phpcs:set PEAR.Functions.FunctionCallSignature allowMultipleArguments true + +$this->foo( + + ['a','b'], + true + +); + +$this->foo( + + // Comment + ['a','b'], + true + +); + +function m() +{ + $t = ' + ' . (empty(true) ? ' + ' . f( + '1', + '2', + ) . ' + ' : ''); +} + +class C +{ + + public function m() + { + $a = []; + $t = + "SELECT * FROM t +WHERE f IN(" . implode( + ",", + $a + ) . ")"; + } +} + +$notices = array( + 'index' => sprintf( + translation_function('a text string with %s placeholder'), + 'replacement' + ), +); + +$componentType = $this->componentTypeRepository->findByType($this->identifier) ?: + $this->componentTypeFactory->createForType( + $this->identifier, + $this->className, + true, + $this->isPrototypal + ); + +return [ + 'export-path' => 'exports/database/' + . env( + 'APP_CUSTOMER', + 'not-configured' + ) + . '/' . env( + 'APP_IDENTIFIER', + 'not-configured' + ), +]; + +$methods .= + str_replace( + array_keys($replacements), + array_values($replacements), + $methodTemplate + ) + . PHP_EOL . PHP_EOL . str_repeat(' ', 4); + +$rangeValues['min'] = + $this->adjustLowerThreshold( + $this->normalizeRatingForFilter($rangeValues['min']) + ); + +$salesOrderThresholdTransfer->fromArray($salesOrderThresholdEntity->toArray(), true) + ->setSalesOrderThresholdValue( + $this->mapSalesOrderThresholdValueTransfer($salesOrderThresholdTransfer, $salesOrderThresholdEntity) + )->setCurrency( + (new CurrencyTransfer())->fromArray($salesOrderThresholdEntity->getCurrency()->toArray(), true) + )->setStore( + (new StoreTransfer())->fromArray($salesOrderThresholdEntity->getStore()->toArray(), true) + ); + +return trim(preg_replace_callback( + // sprintf replaces IGNORED_CHARS multiple times: for %s as well as %1$s (argument numbering) + // /[%s]*([^%1$s]+)/ results in /[IGNORED_CHARS]*([^IGNORED_CHARS]+)/ + sprintf('/[%s]*([^%1$s]+)/', self::IGNORED_CHARS), + function (array $term) use ($mode): string { + // query pieces have to bigger than one char, otherwise they are too expensive for the search + if (mb_strlen($term[1], 'UTF-8') > 1) { + // in boolean search mode '' (empty) means OR, '-' means NOT + return sprintf('%s%s ', $mode === 'AND' ? '+' : '', self::extractUmlauts($term[1])); + } + + return ''; + }, + $search + )); + +$a = ['a' => function ($b) { return $b; }]; +$a['a']( 1 ); + +// PHP 8.0 named parameters. +array_fill_keys( + keys: range( + 1, + 12, + ), + value: true, +); + +array_fill_keys( + keys: range( 1, + 12, + ), value: true, +); + +// phpcs:set PEAR.Functions.FunctionCallSignature allowMultipleArguments false +array_fill_keys( + keys: range( 1, + 12, + ), value: true, +); +// phpcs:set PEAR.Functions.FunctionCallSignature allowMultipleArguments true diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/PEAR/Tests/Functions/FunctionCallSignatureUnitTest.inc.fixed b/vendor/squizlabs/php_codesniffer/src/Standards/PEAR/Tests/Functions/FunctionCallSignatureUnitTest.inc.fixed new file mode 100644 index 00000000..8d02e746 --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/PEAR/Tests/Functions/FunctionCallSignatureUnitTest.inc.fixed @@ -0,0 +1,565 @@ +getFoo() + ->doBar( + $this->getX() // no comma here + ->doY() // this is still the first method argument + ->doZ() // this is still the first method argument + ); +} + +$var = myFunction( + $foo, + $bar +); + +// phpcs:set PEAR.Functions.FunctionCallSignature allowMultipleArguments false + +fputs( + STDOUT, + "Examples: + $ {$app} , --all + $ {$app} --all", + $something +); + +$array = array(); +array_map( + function($x) + { + return trim($x, $y); + }, + $foo, + $array +); + +$bar = new stdClass( + 4, /* thanks */ + 5, /* PSR-2 */ + 6 +); + +function doSomething() +{ + return $this->getFoo() + ->doBar( + $this->getX() // no comma here + ->doY() // this is still the first method argument + ->doZ() // this is still the first method argument + ); +} + +doError( + 404, // status code + 'Not Found', // error name + 'Check your id' // fix +); + +// phpcs:set PEAR.Functions.FunctionCallSignature allowMultipleArguments true + +// Don't report errors for closing braces. Leave that to other sniffs. +foo( + [ + 'this', + 'is', + 'an', + 'array' + ], + [ + 'this', + 'is', + 'an', + 'array' + ], + array( + 'this', + 'is', + 'an', + 'array' + ), + array( + 'this', + 'is', + 'an', + 'array' + ), + function($x) + { + echo 'wee'; + + return trim($x); + } +); + +function foo() +{ + myFunction( + 'string'. + // comment + // comment + 'string'. + /* comment + * comment + */ + 'string' + ); +} + +// phpcs:set PEAR.Functions.FunctionCallSignature requiredSpacesAfterOpen 1 +// phpcs:set PEAR.Functions.FunctionCallSignature requiredSpacesBeforeClose 1 +test( $arg, $arg2 ); +test( $arg, $arg2 ); +test( $arg, $arg2 ); +test(); +test(); +test(); +// phpcs:set PEAR.Functions.FunctionCallSignature requiredSpacesAfterOpen 0 +// phpcs:set PEAR.Functions.FunctionCallSignature requiredSpacesBeforeClose 0 + +?> + + + +
  • + log(// ... + 'error', + sprintf( + 'Message: %s', + isset($e->getData()['object']['evidence_details']) + ? $e->getData()['object']['evidence_details']['due_by'] + : '' + ), + array($e->getData()['object']) +); + +?> +
    + $class + ] + ); ?> +
    + + function ($x) { + return true; + }, + 'baz' => false + ) +); +$qux = array_filter( + $quux, function ($x) { + return $x; + } +); + +array_filter( + [1, 2], + function ($i) : bool { + return $i === 0; + } +); + +foo( + array( + 'callback' => function () { + $foo = 'foo'; + return; + }, + ) +); + +foo( + $a, + /* + $c, + + $d, + */ + $e +); + +test( + 1,2,3,4 +); + +class Test +{ + public function getInstance() + { + return new static( + 'arg', + 'foo' + ); + } + + public function getSelf() + { + return new self( + 'a','b', 'c' + ); + } +} + +$x = $var( + 'y', + 'x' +); + +$obj->{$x}( + 1, + 2 +); + +return (function ($a, $b) { + return function ($c, $d) use ($a, $b) { + echo $a, $b, $c, $d; + }; +})( + 'a','b' +)( + 'c', + 'd' +); + +class Foo +{ + public function bar($a, $b) + { + if (!$a || !$b) { + return; + } + + (new stdClass())->a = $a; + } +} + +return (function ($a, $b) { + return function ($c, $d) use ($a, $b) { + echo $a, $b, $c, $d; + }; +})('a','b')('c','d'); + +function foo() +{ + Bar( + function () { + } + ); +} + +$deprecated_functions = [ + 'the_category_ID' + => function_call( // 7 spaces, not 8. This is the problem line. + $a, + $b + ), +]; + +$deprecated_functions = [ + 'the_category_ID' + => function_call( // 9 spaces, not 8. This is the problem line. + $a, + $b + ), +]; + +// phpcs:set PEAR.Functions.FunctionCallSignature allowMultipleArguments false + +printf( + '', + $obj->getName(), // Trailing comment. + $obj->getID(), // phpcs:ignore Standard.Category.SniffName -- for reasons. + $option +); + +// Handling of PHP 7.3 trailing comma's. +functionCall($args, $foo,); +functionCall( + $args, + $foo, +); +functionCall( + $args, + $foo, +); + +// phpcs:set PEAR.Functions.FunctionCallSignature allowMultipleArguments true + +$this->foo( + ['a','b'], + true +); + +$this->foo( + // Comment + ['a','b'], + true +); + +function m() +{ + $t = ' + ' . (empty(true) ? ' + ' . f( + '1', + '2', + ) . ' + ' : ''); +} + +class C +{ + + public function m() + { + $a = []; + $t = + "SELECT * FROM t +WHERE f IN(" . implode( + ",", + $a + ) . ")"; + } +} + +$notices = array( + 'index' => sprintf( + translation_function('a text string with %s placeholder'), + 'replacement' + ), +); + +$componentType = $this->componentTypeRepository->findByType($this->identifier) ?: + $this->componentTypeFactory->createForType( + $this->identifier, + $this->className, + true, + $this->isPrototypal + ); + +return [ + 'export-path' => 'exports/database/' + . env( + 'APP_CUSTOMER', + 'not-configured' + ) + . '/' . env( + 'APP_IDENTIFIER', + 'not-configured' + ), +]; + +$methods .= + str_replace( + array_keys($replacements), + array_values($replacements), + $methodTemplate + ) + . PHP_EOL . PHP_EOL . str_repeat(' ', 4); + +$rangeValues['min'] = + $this->adjustLowerThreshold( + $this->normalizeRatingForFilter($rangeValues['min']) + ); + +$salesOrderThresholdTransfer->fromArray($salesOrderThresholdEntity->toArray(), true) + ->setSalesOrderThresholdValue( + $this->mapSalesOrderThresholdValueTransfer($salesOrderThresholdTransfer, $salesOrderThresholdEntity) + )->setCurrency( + (new CurrencyTransfer())->fromArray($salesOrderThresholdEntity->getCurrency()->toArray(), true) + )->setStore( + (new StoreTransfer())->fromArray($salesOrderThresholdEntity->getStore()->toArray(), true) + ); + +return trim( + preg_replace_callback( + // sprintf replaces IGNORED_CHARS multiple times: for %s as well as %1$s (argument numbering) + // /[%s]*([^%1$s]+)/ results in /[IGNORED_CHARS]*([^IGNORED_CHARS]+)/ + sprintf('/[%s]*([^%1$s]+)/', self::IGNORED_CHARS), + function (array $term) use ($mode): string { + // query pieces have to bigger than one char, otherwise they are too expensive for the search + if (mb_strlen($term[1], 'UTF-8') > 1) { + // in boolean search mode '' (empty) means OR, '-' means NOT + return sprintf('%s%s ', $mode === 'AND' ? '+' : '', self::extractUmlauts($term[1])); + } + + return ''; + }, + $search + ) +); + +$a = ['a' => function ($b) { return $b; }]; +$a['a'](1); + +// PHP 8.0 named parameters. +array_fill_keys( + keys: range( + 1, + 12, + ), + value: true, +); + +array_fill_keys( + keys: range( + 1, + 12, + ), value: true, +); + +// phpcs:set PEAR.Functions.FunctionCallSignature allowMultipleArguments false +array_fill_keys( + keys: range( + 1, + 12, + ), + value: true, +); +// phpcs:set PEAR.Functions.FunctionCallSignature allowMultipleArguments true diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/PEAR/Tests/Functions/FunctionCallSignatureUnitTest.js b/vendor/squizlabs/php_codesniffer/src/Standards/PEAR/Tests/Functions/FunctionCallSignatureUnitTest.js new file mode 100644 index 00000000..5e77e57a --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/PEAR/Tests/Functions/FunctionCallSignatureUnitTest.js @@ -0,0 +1,80 @@ +test( +); +test(); +test(arg, arg2); +test (); +test( ); +test() ; +test( arg); +test( arg ); +test ( arg ); + +if (foo(arg) === true) { + +} + +var something = get(arg1, arg2); +var something = get(arg1, arg2) ; +var something = get(arg1, arg2) ; + +make_foo(string/*the string*/, true/*test*/); +make_foo(string/*the string*/, true/*test*/ ); +make_foo(string /*the string*/, true /*test*/); +make_foo(/*the string*/string, /*test*/true); +make_foo( /*the string*/string, /*test*/true); + +// phpcs:set PEAR.Functions.FunctionCallSignature requiredSpacesAfterOpen 1 +// phpcs:set PEAR.Functions.FunctionCallSignature requiredSpacesBeforeClose 1 +test(arg, arg2); +test( arg, arg2 ); +test( arg, arg2 ); +// phpcs:set PEAR.Functions.FunctionCallSignature requiredSpacesAfterOpen 0 +// phpcs:set PEAR.Functions.FunctionCallSignature requiredSpacesBeforeClose 0 + +this.init = function(data) { + a.b('').a(function(itemid, target) { + b( + itemid, + target, + { + reviewData: _reviewData, + pageid: itemid + }, + '', + function() { + var _showAspectItems = function(itemid) { + a.a(a.c(''), ''); + a.b(a.c('-' + itemid), ''); + }; + a.foo(function(itemid, target) { + _foo(itemid); + }); + } + ); + }); +}; + +a.prototype = { + + a: function() + { + this.addItem( + { + /** + * @return void + */ + a: function() + { + + }, + /** + * @return void + */ + a: function() + { + + }, + } + ); + } +}; diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/PEAR/Tests/Functions/FunctionCallSignatureUnitTest.js.fixed b/vendor/squizlabs/php_codesniffer/src/Standards/PEAR/Tests/Functions/FunctionCallSignatureUnitTest.js.fixed new file mode 100644 index 00000000..7855ac67 --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/PEAR/Tests/Functions/FunctionCallSignatureUnitTest.js.fixed @@ -0,0 +1,84 @@ +test( +); +test(); +test(arg, arg2); +test(); +test(); +test(); +test(arg); +test(arg); +test(arg); + +if (foo(arg) === true) { + +} + +var something = get(arg1, arg2); +var something = get(arg1, arg2); +var something = get(arg1, arg2); + +make_foo(string/*the string*/, true/*test*/); +make_foo(string/*the string*/, true/*test*/); +make_foo(string /*the string*/, true /*test*/); +make_foo(/*the string*/string, /*test*/true); +make_foo(/*the string*/string, /*test*/true); + +// phpcs:set PEAR.Functions.FunctionCallSignature requiredSpacesAfterOpen 1 +// phpcs:set PEAR.Functions.FunctionCallSignature requiredSpacesBeforeClose 1 +test( arg, arg2 ); +test( arg, arg2 ); +test( arg, arg2 ); +// phpcs:set PEAR.Functions.FunctionCallSignature requiredSpacesAfterOpen 0 +// phpcs:set PEAR.Functions.FunctionCallSignature requiredSpacesBeforeClose 0 + +this.init = function(data) { + a.b('').a( + function(itemid, target) { + b( + itemid, + target, + { + reviewData: _reviewData, + pageid: itemid + }, + '', + function() { + var _showAspectItems = function(itemid) { + a.a(a.c(''), ''); + a.b(a.c('-' + itemid), ''); + }; + a.foo( + function(itemid, target) { + _foo(itemid); + } + ); + } + ); + } + ); +}; + +a.prototype = { + + a: function() + { + this.addItem( + { + /** + * @return void + */ + a: function() + { + + }, + /** + * @return void + */ + a: function() + { + + }, + } + ); + } +}; diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/PEAR/Tests/Functions/FunctionCallSignatureUnitTest.php b/vendor/squizlabs/php_codesniffer/src/Standards/PEAR/Tests/Functions/FunctionCallSignatureUnitTest.php new file mode 100644 index 00000000..1dd59188 --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/PEAR/Tests/Functions/FunctionCallSignatureUnitTest.php @@ -0,0 +1,154 @@ + + * @copyright 2006-2015 Squiz Pty Ltd (ABN 77 084 670 600) + * @license https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence + */ + +namespace PHP_CodeSniffer\Standards\PEAR\Tests\Functions; + +use PHP_CodeSniffer\Tests\Standards\AbstractSniffUnitTest; + +class FunctionCallSignatureUnitTest extends AbstractSniffUnitTest +{ + + + /** + * Returns the lines where errors should occur. + * + * The key of the array should represent the line number and the value + * should represent the number of errors that should occur on that line. + * + * @param string $testFile The name of the file being tested. + * + * @return array + */ + public function getErrorList($testFile='FunctionCallSignatureUnitTest.inc') + { + if ($testFile === 'FunctionCallSignatureUnitTest.js') { + return [ + 5 => 1, + 6 => 2, + 7 => 1, + 8 => 1, + 9 => 2, + 10 => 3, + 17 => 1, + 18 => 1, + 21 => 1, + 24 => 1, + 28 => 2, + 30 => 2, + 35 => 1, + 49 => 1, + 51 => 1, + 54 => 1, + 70 => 1, + 71 => 1, + ]; + }//end if + + return [ + 5 => 1, + 6 => 2, + 7 => 1, + 8 => 1, + 9 => 2, + 10 => 3, + 17 => 1, + 18 => 1, + 31 => 1, + 34 => 1, + 43 => 2, + 57 => 1, + 59 => 1, + 63 => 1, + 64 => 1, + 82 => 1, + 93 => 1, + 100 => 1, + 106 => 2, + 119 => 1, + 120 => 1, + 129 => 1, + 137 => 1, + 142 => 2, + 171 => 1, + 180 => 1, + 181 => 1, + 194 => 1, + 213 => 2, + 215 => 2, + 217 => 2, + 218 => 2, + 277 => 1, + 278 => 1, + 303 => 1, + 308 => 1, + 321 => 1, + 322 => 1, + 329 => 1, + 330 => 1, + 337 => 1, + 342 => 1, + 343 => 1, + 345 => 1, + 346 => 2, + 353 => 1, + 354 => 1, + 355 => 2, + 377 => 1, + 378 => 1, + 379 => 1, + 380 => 1, + 385 => 1, + 386 => 1, + 387 => 1, + 388 => 1, + 393 => 1, + 394 => 1, + 395 => 1, + 396 => 1, + 411 => 1, + 422 => 1, + 424 => 1, + 429 => 1, + 432 => 1, + 440 => 1, + 441 => 1, + 442 => 1, + 464 => 1, + 510 => 1, + 513 => 1, + 514 => 1, + 523 => 1, + 524 => 3, + 527 => 2, + 539 => 1, + 540 => 1, + 546 => 1, + 547 => 1, + 548 => 1, + ]; + + }//end getErrorList() + + + /** + * Returns the lines where warnings should occur. + * + * The key of the array should represent the line number and the value + * should represent the number of warnings that should occur on that line. + * + * @return array + */ + public function getWarningList() + { + return []; + + }//end getWarningList() + + +}//end class diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/PEAR/Tests/Functions/FunctionDeclarationUnitTest.inc b/vendor/squizlabs/php_codesniffer/src/Standards/PEAR/Tests/Functions/FunctionDeclarationUnitTest.inc new file mode 100644 index 00000000..02e0a20d --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/PEAR/Tests/Functions/FunctionDeclarationUnitTest.inc @@ -0,0 +1,420 @@ + + * @copyright 2006-2015 Squiz Pty Ltd (ABN 77 084 670 600) + * @license https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence + */ + +namespace PHP_CodeSniffer\Standards\PEAR\Tests\Functions; + +use PHP_CodeSniffer\Tests\Standards\AbstractSniffUnitTest; + +class FunctionDeclarationUnitTest extends AbstractSniffUnitTest +{ + + + /** + * Returns the lines where errors should occur. + * + * The key of the array should represent the line number and the value + * should represent the number of errors that should occur on that line. + * + * @param string $testFile The name of the file being tested. + * + * @return array + */ + public function getErrorList($testFile='FunctionDeclarationUnitTest.inc') + { + if ($testFile === 'FunctionDeclarationUnitTest.inc') { + $errors = [ + 3 => 1, + 4 => 1, + 5 => 1, + 9 => 1, + 10 => 1, + 11 => 1, + 14 => 1, + 17 => 1, + 44 => 1, + 52 => 1, + 61 => 2, + 98 => 1, + 110 => 2, + 120 => 3, + 121 => 1, + 140 => 1, + 145 => 1, + 161 => 2, + 162 => 2, + 164 => 2, + 167 => 2, + 171 => 1, + 173 => 1, + 201 => 1, + 206 => 1, + 208 => 1, + 216 => 1, + 223 => 1, + 230 => 1, + 237 => 1, + 243 => 1, + 247 => 1, + 251 => 2, + 253 => 2, + 257 => 2, + 259 => 1, + 263 => 1, + 265 => 1, + 269 => 1, + 273 => 1, + 277 => 1, + 278 => 1, + 283 => 1, + 287 => 2, + 289 => 2, + 293 => 2, + 295 => 1, + 299 => 1, + 301 => 1, + 305 => 1, + 309 => 1, + 313 => 1, + 314 => 1, + 350 => 1, + 351 => 1, + 352 => 1, + 353 => 1, + 361 => 1, + 362 => 1, + 363 => 1, + 364 => 1, + 365 => 1, + 366 => 1, + 367 => 1, + 368 => 1, + 369 => 1, + 370 => 1, + 371 => 1, + 402 => 1, + 406 => 1, + ]; + } else { + $errors = [ + 3 => 1, + 4 => 1, + 5 => 1, + 9 => 1, + 10 => 1, + 11 => 1, + 14 => 1, + 17 => 1, + 41 => 1, + 48 => 1, + ]; + }//end if + + return $errors; + + }//end getErrorList() + + + /** + * Returns the lines where warnings should occur. + * + * The key of the array should represent the line number and the value + * should represent the number of warnings that should occur on that line. + * + * @return array + */ + public function getWarningList() + { + return []; + + }//end getWarningList() + + +}//end class diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/PEAR/Tests/Functions/ValidDefaultValueUnitTest.inc b/vendor/squizlabs/php_codesniffer/src/Standards/PEAR/Tests/Functions/ValidDefaultValueUnitTest.inc new file mode 100644 index 00000000..8f8d64ab --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/PEAR/Tests/Functions/ValidDefaultValueUnitTest.inc @@ -0,0 +1,119 @@ + $a[] = $b; + +class OnlyConstructorPropertyPromotion { + public function __construct( + public string $name = '', + protected $bar + ) {} +} + +class ConstructorPropertyPromotionMixedWithNormalParams { + public function __construct( + public string $name = '', + ?int $optionalParam = 0, + mixed $requiredParam, + ) {} +} + +// Intentional syntax error. Must be last thing in the file. +function diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/PEAR/Tests/Functions/ValidDefaultValueUnitTest.php b/vendor/squizlabs/php_codesniffer/src/Standards/PEAR/Tests/Functions/ValidDefaultValueUnitTest.php new file mode 100644 index 00000000..60d261cb --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/PEAR/Tests/Functions/ValidDefaultValueUnitTest.php @@ -0,0 +1,60 @@ + + * @copyright 2006-2015 Squiz Pty Ltd (ABN 77 084 670 600) + * @license https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence + */ + +namespace PHP_CodeSniffer\Standards\PEAR\Tests\Functions; + +use PHP_CodeSniffer\Tests\Standards\AbstractSniffUnitTest; + +class ValidDefaultValueUnitTest extends AbstractSniffUnitTest +{ + + + /** + * Returns the lines where errors should occur. + * + * The key of the array should represent the line number and the value + * should represent the number of errors that should occur on that line. + * + * @return array + */ + public function getErrorList() + { + return [ + 29 => 1, + 34 => 1, + 39 => 1, + 71 => 1, + 76 => 1, + 81 => 1, + 91 => 1, + 99 => 1, + 101 => 1, + 106 => 1, + 114 => 1, + ]; + + }//end getErrorList() + + + /** + * Returns the lines where warnings should occur. + * + * The key of the array should represent the line number and the value + * should represent the number of warnings that should occur on that line. + * + * @return array + */ + public function getWarningList() + { + return []; + + }//end getWarningList() + + +}//end class diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/PEAR/Tests/NamingConventions/ValidClassNameUnitTest.inc b/vendor/squizlabs/php_codesniffer/src/Standards/PEAR/Tests/NamingConventions/ValidClassNameUnitTest.inc new file mode 100644 index 00000000..c6d15df7 --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/PEAR/Tests/NamingConventions/ValidClassNameUnitTest.inc @@ -0,0 +1,68 @@ + + * @copyright 2006-2015 Squiz Pty Ltd (ABN 77 084 670 600) + * @license https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence + */ + +namespace PHP_CodeSniffer\Standards\PEAR\Tests\NamingConventions; + +use PHP_CodeSniffer\Tests\Standards\AbstractSniffUnitTest; + +class ValidClassNameUnitTest extends AbstractSniffUnitTest +{ + + + /** + * Returns the lines where errors should occur. + * + * The key of the array should represent the line number and the value + * should represent the number of errors that should occur on that line. + * + * @return array + */ + public function getErrorList() + { + return [ + 5 => 1, + 7 => 2, + 9 => 1, + 19 => 1, + 24 => 1, + 26 => 2, + 28 => 1, + 38 => 1, + 40 => 2, + 42 => 2, + 44 => 1, + 46 => 1, + 50 => 1, + 52 => 2, + 54 => 1, + 64 => 1, + 66 => 2, + 68 => 1, + ]; + + }//end getErrorList() + + + /** + * Returns the lines where warnings should occur. + * + * The key of the array should represent the line number and the value + * should represent the number of warnings that should occur on that line. + * + * @return array + */ + public function getWarningList() + { + return []; + + }//end getWarningList() + + +}//end class diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/PEAR/Tests/NamingConventions/ValidFunctionNameUnitTest.inc b/vendor/squizlabs/php_codesniffer/src/Standards/PEAR/Tests/NamingConventions/ValidFunctionNameUnitTest.inc new file mode 100644 index 00000000..78280cdd --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/PEAR/Tests/NamingConventions/ValidFunctionNameUnitTest.inc @@ -0,0 +1,222 @@ + + * @copyright 2006-2015 Squiz Pty Ltd (ABN 77 084 670 600) + * @license https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence + */ + +namespace PHP_CodeSniffer\Standards\PEAR\Tests\NamingConventions; + +use PHP_CodeSniffer\Tests\Standards\AbstractSniffUnitTest; + +class ValidFunctionNameUnitTest extends AbstractSniffUnitTest +{ + + + /** + * Returns the lines where errors should occur. + * + * The key of the array should represent the line number and the value + * should represent the number of errors that should occur on that line. + * + * @return array + */ + public function getErrorList() + { + return [ + 11 => 1, + 12 => 1, + 13 => 1, + 14 => 1, + 15 => 1, + 16 => 1, + 17 => 2, + 18 => 2, + 19 => 2, + 20 => 2, + 24 => 1, + 25 => 1, + 26 => 1, + 27 => 1, + 28 => 1, + 29 => 1, + 30 => 2, + 31 => 2, + 32 => 2, + 33 => 2, + 35 => 1, + 36 => 1, + 37 => 2, + 38 => 2, + 39 => 2, + 40 => 2, + 43 => 1, + 44 => 1, + 45 => 1, + 46 => 1, + 50 => 1, + 51 => 1, + 52 => 1, + 53 => 1, + 56 => 1, + 57 => 1, + 58 => 1, + 59 => 1, + 67 => 1, + 68 => 1, + 69 => 1, + 70 => 1, + 71 => 1, + 72 => 1, + 73 => 2, + 74 => 2, + 75 => 2, + 76 => 2, + 80 => 1, + 81 => 1, + 82 => 1, + 83 => 1, + 86 => 1, + 87 => 1, + 88 => 1, + 89 => 1, + 95 => 1, + 96 => 1, + 97 => 1, + 98 => 1, + 99 => 1, + 100 => 1, + 101 => 2, + 102 => 2, + 103 => 2, + 104 => 2, + 123 => 1, + 125 => 1, + 126 => 2, + 129 => 1, + 130 => 1, + 131 => 1, + 132 => 1, + 133 => 1, + 134 => 1, + 135 => 1, + 136 => 1, + 137 => 1, + 138 => 1, + 139 => 1, + 140 => 3, + 141 => 1, + 143 => 1, + 144 => 1, + 145 => 3, + 147 => 2, + 148 => 1, + 149 => 1, + 181 => 1, + 201 => 1, + 203 => 1, + 204 => 2, + 207 => 2, + 212 => 1, + 213 => 1, + 214 => 1, + ]; + + }//end getErrorList() + + + /** + * Returns the lines where warnings should occur. + * + * The key of the array should represent the line number and the value + * should represent the number of warnings that should occur on that line. + * + * @return array + */ + public function getWarningList() + { + return []; + + }//end getWarningList() + + +}//end class diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/PEAR/Tests/NamingConventions/ValidVariableNameUnitTest.inc b/vendor/squizlabs/php_codesniffer/src/Standards/PEAR/Tests/NamingConventions/ValidVariableNameUnitTest.inc new file mode 100644 index 00000000..3c03da3f --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/PEAR/Tests/NamingConventions/ValidVariableNameUnitTest.inc @@ -0,0 +1,101 @@ +def["POP_{$cc}_A"]}' + and POP_{$cc}_B = +'{$this->def["POP_{$cc}_B"]}')"; + } +} + +class mpgResponse{ + var $term_id; + var $currentTag; + function characterHandler($parser,$data){ + switch($this->currentTag) + { + case "term_id": { + $this->term_id=$data; + break; + } + } + }//end characterHandler +}//end class mpgResponse + +class foo +{ + const bar = <<setLogger( + new class { + private $varName = 'hello'; + private $_varName = 'hello'; +}); diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/PEAR/Tests/NamingConventions/ValidVariableNameUnitTest.php b/vendor/squizlabs/php_codesniffer/src/Standards/PEAR/Tests/NamingConventions/ValidVariableNameUnitTest.php new file mode 100644 index 00000000..834852c3 --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/PEAR/Tests/NamingConventions/ValidVariableNameUnitTest.php @@ -0,0 +1,56 @@ + + * @copyright 2006-2015 Squiz Pty Ltd (ABN 77 084 670 600) + * @license https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence + */ + +namespace PHP_CodeSniffer\Standards\PEAR\Tests\NamingConventions; + +use PHP_CodeSniffer\Tests\Standards\AbstractSniffUnitTest; + +class ValidVariableNameUnitTest extends AbstractSniffUnitTest +{ + + + /** + * Returns the lines where errors should occur. + * + * The key of the array should represent the line number and the value + * should represent the number of errors that should occur on that line. + * + * @return array + */ + public function getErrorList() + { + return [ + 12 => 1, + 17 => 1, + 22 => 1, + 92 => 1, + 93 => 1, + 94 => 1, + 99 => 1, + ]; + + }//end getErrorList() + + + /** + * Returns the lines where warnings should occur. + * + * The key of the array should represent the line number and the value + * should represent the number of warnings that should occur on that line. + * + * @return array + */ + public function getWarningList() + { + return []; + + }//end getWarningList() + + +}//end class diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/PEAR/Tests/WhiteSpace/ObjectOperatorIndentUnitTest.inc b/vendor/squizlabs/php_codesniffer/src/Standards/PEAR/Tests/WhiteSpace/ObjectOperatorIndentUnitTest.inc new file mode 100644 index 00000000..b1b09d93 --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/PEAR/Tests/WhiteSpace/ObjectOperatorIndentUnitTest.inc @@ -0,0 +1,142 @@ +someFunction("some", "parameter") +->someOtherFunc(23, 42)-> + someOtherFunc2($one, $two) + + ->someOtherFunc3(23, 42) + ->andAThirdFunction(); + + $someObject->someFunction("some", "parameter") + ->someOtherFunc(23, 42); + +$someObject->someFunction("some", "parameter")->someOtherFunc(23, 42); + +$someObject->someFunction("some", "parameter") + ->someOtherFunc(23, 42); + +func( + $bar->foo() +) + ->bar(); + +func( + $bar->foo() +) + ->bar( + $bar->foo() + ->bar() + ->func() + ); + +$object + ->setBar($foo) + ->setFoo($bar); + +if ($bar) { + $object + ->setBar($foo) + ->setFoo($bar); +} + +$response -> CompletedTrackDetails -> TrackDetails -> Events; +$response + -> CompletedTrackDetails + -> TrackDetails + -> Events; + +$response + -> CompletedTrackDetails +-> TrackDetails + -> Events; + +$var = get_object( + $foo->something() + ->query() +)->two() + ->three(); + +$foo->one( + $foo + ->two() +); + +get_object()->one() + ->two() + ->three(); + +someclass::one() + ->two() + ->three(); + +(new someclass())->one() + ->two() + ->three(); + +// phpcs:set PEAR.WhiteSpace.ObjectOperatorIndent multilevel true + +$someObject + ->startSomething() + ->someOtherFunc(23, 42) +->endSomething() +->doSomething(23, 42) +->endEverything(); + +$rootNode + ->one() + ->two() + ->three() + ->four() + ->five(); + +$rootNode + ->one() + ->two() + ->three() + ->four() + ->five(); + +$rootNode + ->one() + ->two() + ->three() + ->four() +->five(); + +$rootNode + ->one() + ->two() + ->three() + ->four() + ->five(); + +// phpcs:set PEAR.WhiteSpace.ObjectOperatorIndent multilevel false + +$object + ?->setBar($foo) + ?->setFoo($bar); + +$someObject?->someFunction("some", "parameter") +->someOtherFunc(23, 42)?-> + someOtherFunc2($one, $two) + +->someOtherFunc3(23, 42) + ?->andAThirdFunction(); + +// phpcs:set PEAR.WhiteSpace.ObjectOperatorIndent multilevel true +$object + ?->setBar($foo) + ?->setFoo($bar); + +$someObject?->someFunction("some", "parameter") +->someOtherFunc(23, 42) + ?->someOtherFunc2($one, $two) + +->someOtherFunc3(23, 42) + ?->andAThirdFunction(); +// phpcs:set PEAR.WhiteSpace.ObjectOperatorIndent multilevel false + +$someObject + ->startSomething(paramName: $value) + ->someOtherFunc(nameA: 23, nameB: 42) +->endSomething($value, name: $value) +->endEverything(); diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/PEAR/Tests/WhiteSpace/ObjectOperatorIndentUnitTest.inc.fixed b/vendor/squizlabs/php_codesniffer/src/Standards/PEAR/Tests/WhiteSpace/ObjectOperatorIndentUnitTest.inc.fixed new file mode 100644 index 00000000..5d5b77be --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/PEAR/Tests/WhiteSpace/ObjectOperatorIndentUnitTest.inc.fixed @@ -0,0 +1,142 @@ +someFunction("some", "parameter") + ->someOtherFunc(23, 42) + ->someOtherFunc2($one, $two) + + ->someOtherFunc3(23, 42) + ->andAThirdFunction(); + + $someObject->someFunction("some", "parameter") + ->someOtherFunc(23, 42); + +$someObject->someFunction("some", "parameter")->someOtherFunc(23, 42); + +$someObject->someFunction("some", "parameter") + ->someOtherFunc(23, 42); + +func( + $bar->foo() +) + ->bar(); + +func( + $bar->foo() +) + ->bar( + $bar->foo() + ->bar() + ->func() + ); + +$object + ->setBar($foo) + ->setFoo($bar); + +if ($bar) { + $object + ->setBar($foo) + ->setFoo($bar); +} + +$response -> CompletedTrackDetails -> TrackDetails -> Events; +$response + -> CompletedTrackDetails + -> TrackDetails + -> Events; + +$response + -> CompletedTrackDetails + -> TrackDetails + -> Events; + +$var = get_object( + $foo->something() + ->query() +)->two() + ->three(); + +$foo->one( + $foo + ->two() +); + +get_object()->one() + ->two() + ->three(); + +someclass::one() + ->two() + ->three(); + +(new someclass())->one() + ->two() + ->three(); + +// phpcs:set PEAR.WhiteSpace.ObjectOperatorIndent multilevel true + +$someObject + ->startSomething() + ->someOtherFunc(23, 42) + ->endSomething() + ->doSomething(23, 42) + ->endEverything(); + +$rootNode + ->one() + ->two() + ->three() + ->four() + ->five(); + +$rootNode + ->one() + ->two() + ->three() + ->four() + ->five(); + +$rootNode + ->one() + ->two() + ->three() + ->four() + ->five(); + +$rootNode + ->one() + ->two() + ->three() + ->four() + ->five(); + +// phpcs:set PEAR.WhiteSpace.ObjectOperatorIndent multilevel false + +$object + ?->setBar($foo) + ?->setFoo($bar); + +$someObject?->someFunction("some", "parameter") + ->someOtherFunc(23, 42) + ?->someOtherFunc2($one, $two) + + ->someOtherFunc3(23, 42) + ?->andAThirdFunction(); + +// phpcs:set PEAR.WhiteSpace.ObjectOperatorIndent multilevel true +$object + ?->setBar($foo) + ?->setFoo($bar); + +$someObject?->someFunction("some", "parameter") + ->someOtherFunc(23, 42) + ?->someOtherFunc2($one, $two) + + ->someOtherFunc3(23, 42) + ?->andAThirdFunction(); +// phpcs:set PEAR.WhiteSpace.ObjectOperatorIndent multilevel false + +$someObject + ->startSomething(paramName: $value) + ->someOtherFunc(nameA: 23, nameB: 42) + ->endSomething($value, name: $value) + ->endEverything(); diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/PEAR/Tests/WhiteSpace/ObjectOperatorIndentUnitTest.php b/vendor/squizlabs/php_codesniffer/src/Standards/PEAR/Tests/WhiteSpace/ObjectOperatorIndentUnitTest.php new file mode 100644 index 00000000..0cad3efc --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/PEAR/Tests/WhiteSpace/ObjectOperatorIndentUnitTest.php @@ -0,0 +1,74 @@ + + * @copyright 2006-2015 Squiz Pty Ltd (ABN 77 084 670 600) + * @license https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence + */ + +namespace PHP_CodeSniffer\Standards\PEAR\Tests\WhiteSpace; + +use PHP_CodeSniffer\Tests\Standards\AbstractSniffUnitTest; + +class ObjectOperatorIndentUnitTest extends AbstractSniffUnitTest +{ + + + /** + * Returns the lines where errors should occur. + * + * The key of the array should represent the line number and the value + * should represent the number of errors that should occur on that line. + * + * @return array + */ + public function getErrorList() + { + return [ + 3 => 2, + 6 => 1, + 15 => 1, + 27 => 1, + 37 => 1, + 38 => 1, + 48 => 1, + 49 => 1, + 50 => 1, + 65 => 1, + 69 => 1, + 73 => 1, + 79 => 1, + 80 => 1, + 81 => 1, + 82 => 1, + 95 => 1, + 103 => 1, + 119 => 2, + 122 => 1, + 131 => 1, + 134 => 1, + 140 => 1, + 141 => 1, + 142 => 1, + ]; + + }//end getErrorList() + + + /** + * Returns the lines where warnings should occur. + * + * The key of the array should represent the line number and the value + * should represent the number of warnings that should occur on that line. + * + * @return array + */ + public function getWarningList() + { + return []; + + }//end getWarningList() + + +}//end class diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/PEAR/Tests/WhiteSpace/ScopeClosingBraceUnitTest.inc b/vendor/squizlabs/php_codesniffer/src/Standards/PEAR/Tests/WhiteSpace/ScopeClosingBraceUnitTest.inc new file mode 100644 index 00000000..c5202378 --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/PEAR/Tests/WhiteSpace/ScopeClosingBraceUnitTest.inc @@ -0,0 +1,154 @@ +{$property} =& new $class_name($this->db_index); + $this->modules[$module] =& $this->{$property}; +} + +foreach ($elements as $element) { + if ($something) { + // Do IF. + } else if ($somethingElse) { + // Do ELSE. + } +} + +switch ($foo) { +case 1: + switch ($bar) { + default: + if ($something) { + echo $string{1}; + } else if ($else) { + switch ($else) { + case 1: + // Do something. + break; + default: + // Do something. + break; + } + } + } +break; +case 2: + // Do something; + break; +} + +switch ($httpResponseCode) { + case 100: + case 101: + case 102: + default: + return 'Unknown'; +} + +switch ($httpResponseCode) { + case 100: + case 101: + case 102: + return 'Processing.'; + default: + return 'Unknown'; +} + +switch($i) { +case 1: {} +} + +switch ($httpResponseCode) { + case 100: + case 101: + case 102: + exit; + default: + exit; +} + +if ($foo): + if ($bar): + $foo = 1; + elseif ($baz): + $foo = 2; + endif; +endif; + +if ($foo): +elseif ($baz): $foo = 2; +endif; + +?> +
      + +
    • + +
    +
      + +
    • + +
    +
      + +
    • + +
    + +getSummaryCount(); ?> +
    class="empty"> + + 'a', 2 => 'b' }; + +$match = match ($test) { + 1 => 'a', + 2 => 'b' + }; diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/PEAR/Tests/WhiteSpace/ScopeClosingBraceUnitTest.inc.fixed b/vendor/squizlabs/php_codesniffer/src/Standards/PEAR/Tests/WhiteSpace/ScopeClosingBraceUnitTest.inc.fixed new file mode 100644 index 00000000..23156e41 --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/PEAR/Tests/WhiteSpace/ScopeClosingBraceUnitTest.inc.fixed @@ -0,0 +1,159 @@ +{$property} =& new $class_name($this->db_index); + $this->modules[$module] =& $this->{$property}; +} + +foreach ($elements as $element) { + if ($something) { + // Do IF. + } else if ($somethingElse) { + // Do ELSE. + } +} + +switch ($foo) { +case 1: + switch ($bar) { + default: + if ($something) { + echo $string{1}; + } else if ($else) { + switch ($else) { + case 1: + // Do something. + break; + default: + // Do something. + break; + } + } + } + break; +case 2: + // Do something; + break; +} + +switch ($httpResponseCode) { + case 100: + case 101: + case 102: + default: + return 'Unknown'; +} + +switch ($httpResponseCode) { + case 100: + case 101: + case 102: + return 'Processing.'; + default: + return 'Unknown'; +} + +switch($i) { +case 1: { + } +} + +switch ($httpResponseCode) { + case 100: + case 101: + case 102: + exit; + default: + exit; +} + +if ($foo): + if ($bar): + $foo = 1; + elseif ($baz): + $foo = 2; + endif; +endif; + +if ($foo): +elseif ($baz): $foo = 2; +endif; + +?> +
      + +
    • + +
    +
      + +
    • + +
    +
      + +
    • + +
    + +getSummaryCount(); ?> +
    class="empty"> + + 'a', 2 => 'b' +}; + +$match = match ($test) { + 1 => 'a', + 2 => 'b' +}; diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/PEAR/Tests/WhiteSpace/ScopeClosingBraceUnitTest.php b/vendor/squizlabs/php_codesniffer/src/Standards/PEAR/Tests/WhiteSpace/ScopeClosingBraceUnitTest.php new file mode 100644 index 00000000..1b01ee9d --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/PEAR/Tests/WhiteSpace/ScopeClosingBraceUnitTest.php @@ -0,0 +1,65 @@ + + * @copyright 2006-2015 Squiz Pty Ltd (ABN 77 084 670 600) + * @license https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence + */ + +namespace PHP_CodeSniffer\Standards\PEAR\Tests\WhiteSpace; + +use PHP_CodeSniffer\Tests\Standards\AbstractSniffUnitTest; + +class ScopeClosingBraceUnitTest extends AbstractSniffUnitTest +{ + + + /** + * Returns the lines where errors should occur. + * + * The key of the array should represent the line number and the value + * should represent the number of errors that should occur on that line. + * + * @return array + */ + public function getErrorList() + { + return [ + 11 => 1, + 13 => 1, + 24 => 1, + 30 => 1, + 61 => 1, + 65 => 1, + 85 => 1, + 89 => 1, + 98 => 1, + 122 => 1, + 127 => 1, + 135 => 1, + 141 => 1, + 146 => 1, + 149 => 1, + 154 => 1, + ]; + + }//end getErrorList() + + + /** + * Returns the lines where warnings should occur. + * + * The key of the array should represent the line number and the value + * should represent the number of warnings that should occur on that line. + * + * @return array + */ + public function getWarningList() + { + return []; + + }//end getWarningList() + + +}//end class diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/PEAR/Tests/WhiteSpace/ScopeIndentUnitTest.inc b/vendor/squizlabs/php_codesniffer/src/Standards/PEAR/Tests/WhiteSpace/ScopeIndentUnitTest.inc new file mode 100644 index 00000000..b122a147 --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/PEAR/Tests/WhiteSpace/ScopeIndentUnitTest.inc @@ -0,0 +1,314 @@ +hello(); // error here + } + + function hello() // error here + { // no error here as brackets can be put anywhere in the pear standard + echo 'hello'; + } + + function hello2() + { + if (TRUE) { // error here + echo 'hello'; // no error here as its more than 4 spaces. + } else { + echo 'bye'; // error here + } + + while (TRUE) { + echo 'hello'; // error here + } + + do { // error here + echo 'hello'; // error here + } while (TRUE); + } + + function hello3() + { + switch ($hello) { + case 'hello': + break; + } + } + +} + +?> +
    +
    +
    +validate()) {
    +    $safe = $form->getSubmitValues();
    +}
    +?>
    +
    +open(); // error here + } + + public function open() + { + // Some inline stuff that shouldn't error + if (TRUE) echo 'hello'; + foreach ($tokens as $token) echo $token; + } + + /** + * This is a comment 1. + * This is a comment 2. + * This is a comment 3. + * This is a comment 4. + */ + public function close() + { + // All ok. + if (TRUE) { + if (TRUE) { + } else if (FALSE) { + foreach ($tokens as $token) { + switch ($token) { + case '1': + case '2': + if (true) { + if (false) { + if (false) { + if (false) { + echo 'hello'; + } + } + } + } + break; + case '5': + break; + } + do { + while (true) { + foreach ($tokens as $token) { + for ($i = 0; $i < $token; $i++) { + echo 'hello'; + } + } + } + } while (true); + } + } + } + } + + /* + This is another c style comment 1. + This is another c style comment 2. + This is another c style comment 3. + This is another c style comment 4. + This is another c style comment 5. + */ + + /* + * + * + * + */ + + /** + */ + + /* + This comment has a newline in it. + + */ + + public function read() + { + echo 'hello'; + + // no errors below. + $array = array( + 'this', + 'that' => array( + 'hello', + 'hello again' => array( + 'hello', + ), + ), + ); + } +} + +abstract class Test3 +{ + public function parse() + { + + foreach ($t as $ndx => $token) { + if (is_array($token)) { + echo 'here'; + } else { + $ts[] = array("token" => $token, "value" => ''); + + $last = count($ts) - 1; + + switch ($token) { + case '(': + + if ($last >= 3 && + $ts[0]['token'] != T_CLASS && + $ts[$last - 2]['token'] == T_OBJECT_OPERATOR && + $ts[$last - 3]['token'] == T_VARIABLE ) { + + + if (true) { + echo 'hello'; + } + } + array_push($braces, $token); + break; + } + } + } + } +} + +function test() +{ + $o = << + * @copyright 2006-2015 Squiz Pty Ltd (ABN 77 084 670 600) + * @license https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence + */ + +namespace PHP_CodeSniffer\Standards\PEAR\Tests\WhiteSpace; + +use PHP_CodeSniffer\Tests\Standards\AbstractSniffUnitTest; + +class ScopeIndentUnitTest extends AbstractSniffUnitTest +{ + + + /** + * Returns the lines where errors should occur. + * + * The key of the array should represent the line number and the value + * should represent the number of errors that should occur on that line. + * + * @return array + */ + public function getErrorList() + { + return [ + 7 => 1, + 10 => 1, + 17 => 1, + 20 => 1, + 24 => 1, + 25 => 1, + 27 => 1, + 28 => 1, + 29 => 1, + 30 => 1, + 58 => 1, + 123 => 1, + 224 => 1, + 225 => 1, + 279 => 1, + 284 => 1, + 311 => 1, + ]; + + }//end getErrorList() + + + /** + * Returns the lines where warnings should occur. + * + * The key of the array should represent the line number and the value + * should represent the number of warnings that should occur on that line. + * + * @return array + */ + public function getWarningList() + { + return []; + + }//end getWarningList() + + +}//end class diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/PEAR/ruleset.xml b/vendor/squizlabs/php_codesniffer/src/Standards/PEAR/ruleset.xml new file mode 100644 index 00000000..1bf94ca5 --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/PEAR/ruleset.xml @@ -0,0 +1,41 @@ + + + The PEAR coding standard. + + + + + + + + + + + + + + + + + + + + + + + + + + + + 0 + + + + + + + + + + diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/PSR1/Docs/Classes/ClassDeclarationStandard.xml b/vendor/squizlabs/php_codesniffer/src/Standards/PSR1/Docs/Classes/ClassDeclarationStandard.xml new file mode 100644 index 00000000..eaae99b2 --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/PSR1/Docs/Classes/ClassDeclarationStandard.xml @@ -0,0 +1,48 @@ + + + + + + + class Bar { +} + ]]> + + + class Bar { +} + +class Baz { +} + ]]> + + + + + namespace Foo; + +class Bar { +} + ]]> + + + + + + diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/PSR1/Docs/Files/SideEffectsStandard.xml b/vendor/squizlabs/php_codesniffer/src/Standards/PSR1/Docs/Files/SideEffectsStandard.xml new file mode 100644 index 00000000..0ed04a07 --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/PSR1/Docs/Files/SideEffectsStandard.xml @@ -0,0 +1,27 @@ + + + + + + + + + + echo "Class Foo loaded." + ]]> + + + diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/PSR1/Docs/Methods/CamelCapsMethodNameStandard.xml b/vendor/squizlabs/php_codesniffer/src/Standards/PSR1/Docs/Methods/CamelCapsMethodNameStandard.xml new file mode 100644 index 00000000..8db899d6 --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/PSR1/Docs/Methods/CamelCapsMethodNameStandard.xml @@ -0,0 +1,29 @@ + + + + + + + doBar() + { + } +} + ]]> + + + do_bar() + { + } +} + ]]> + + + diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/PSR1/Sniffs/Classes/ClassDeclarationSniff.php b/vendor/squizlabs/php_codesniffer/src/Standards/PSR1/Sniffs/Classes/ClassDeclarationSniff.php new file mode 100644 index 00000000..ac6407d6 --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/PSR1/Sniffs/Classes/ClassDeclarationSniff.php @@ -0,0 +1,74 @@ + + * @copyright 2006-2015 Squiz Pty Ltd (ABN 77 084 670 600) + * @license https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence + */ + +namespace PHP_CodeSniffer\Standards\PSR1\Sniffs\Classes; + +use PHP_CodeSniffer\Files\File; +use PHP_CodeSniffer\Sniffs\Sniff; + +class ClassDeclarationSniff implements Sniff +{ + + + /** + * Returns an array of tokens this test wants to listen for. + * + * @return array + */ + public function register() + { + return [ + T_CLASS, + T_INTERFACE, + T_TRAIT, + ]; + + }//end register() + + + /** + * Processes this test, when one of its tokens is encountered. + * + * @param \PHP_CodeSniffer\Files\File $phpcsFile The file being scanned. + * @param integer $stackPtr The position of the current token in + * the token stack. + * + * @return void + */ + public function process(File $phpcsFile, $stackPtr) + { + $tokens = $phpcsFile->getTokens(); + if (isset($tokens[$stackPtr]['scope_closer']) === false) { + return; + } + + $errorData = [strtolower($tokens[$stackPtr]['content'])]; + + $nextClass = $phpcsFile->findNext([T_CLASS, T_INTERFACE, T_TRAIT], ($tokens[$stackPtr]['scope_closer'] + 1)); + if ($nextClass !== false) { + $error = 'Each %s must be in a file by itself'; + $phpcsFile->addError($error, $nextClass, 'MultipleClasses', $errorData); + $phpcsFile->recordMetric($stackPtr, 'One class per file', 'no'); + } else { + $phpcsFile->recordMetric($stackPtr, 'One class per file', 'yes'); + } + + $namespace = $phpcsFile->findNext([T_NAMESPACE, T_CLASS, T_INTERFACE, T_TRAIT], 0); + if ($tokens[$namespace]['code'] !== T_NAMESPACE) { + $error = 'Each %s must be in a namespace of at least one level (a top-level vendor name)'; + $phpcsFile->addError($error, $stackPtr, 'MissingNamespace', $errorData); + $phpcsFile->recordMetric($stackPtr, 'Class defined in namespace', 'no'); + } else { + $phpcsFile->recordMetric($stackPtr, 'Class defined in namespace', 'yes'); + } + + }//end process() + + +}//end class diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/PSR1/Sniffs/Files/SideEffectsSniff.php b/vendor/squizlabs/php_codesniffer/src/Standards/PSR1/Sniffs/Files/SideEffectsSniff.php new file mode 100644 index 00000000..27454cc1 --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/PSR1/Sniffs/Files/SideEffectsSniff.php @@ -0,0 +1,298 @@ + + * @copyright 2006-2015 Squiz Pty Ltd (ABN 77 084 670 600) + * @license https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence + */ + +namespace PHP_CodeSniffer\Standards\PSR1\Sniffs\Files; + +use PHP_CodeSniffer\Files\File; +use PHP_CodeSniffer\Sniffs\Sniff; +use PHP_CodeSniffer\Util\Tokens; + +class SideEffectsSniff implements Sniff +{ + + + /** + * Returns an array of tokens this test wants to listen for. + * + * @return array + */ + public function register() + { + return [T_OPEN_TAG]; + + }//end register() + + + /** + * Processes this sniff, when one of its tokens is encountered. + * + * @param \PHP_CodeSniffer\Files\File $phpcsFile The file being scanned. + * @param int $stackPtr The position of the current token in + * the token stack. + * + * @return void + */ + public function process(File $phpcsFile, $stackPtr) + { + $tokens = $phpcsFile->getTokens(); + $result = $this->searchForConflict($phpcsFile, 0, ($phpcsFile->numTokens - 1), $tokens); + + if ($result['symbol'] !== null && $result['effect'] !== null) { + $error = 'A file should declare new symbols (classes, functions, constants, etc.) and cause no other side effects, or it should execute logic with side effects, but should not do both. The first symbol is defined on line %s and the first side effect is on line %s.'; + $data = [ + $tokens[$result['symbol']]['line'], + $tokens[$result['effect']]['line'], + ]; + $phpcsFile->addWarning($error, 0, 'FoundWithSymbols', $data); + $phpcsFile->recordMetric($stackPtr, 'Declarations and side effects mixed', 'yes'); + } else { + $phpcsFile->recordMetric($stackPtr, 'Declarations and side effects mixed', 'no'); + } + + // Ignore the rest of the file. + return ($phpcsFile->numTokens + 1); + + }//end process() + + + /** + * Searches for symbol declarations and side effects. + * + * Returns the positions of both the first symbol declared and the first + * side effect in the file. A NULL value for either indicates nothing was + * found. + * + * @param \PHP_CodeSniffer\Files\File $phpcsFile The file being scanned. + * @param int $start The token to start searching from. + * @param int $end The token to search to. + * @param array $tokens The stack of tokens that make up + * the file. + * + * @return array + */ + private function searchForConflict($phpcsFile, $start, $end, $tokens) + { + $symbols = [ + T_CLASS => T_CLASS, + T_INTERFACE => T_INTERFACE, + T_TRAIT => T_TRAIT, + T_FUNCTION => T_FUNCTION, + ]; + + $conditions = [ + T_IF => T_IF, + T_ELSE => T_ELSE, + T_ELSEIF => T_ELSEIF, + ]; + + $checkAnnotations = $phpcsFile->config->annotations; + + $firstSymbol = null; + $firstEffect = null; + for ($i = $start; $i <= $end; $i++) { + // Respect phpcs:disable comments. + if ($checkAnnotations === true + && $tokens[$i]['code'] === T_PHPCS_DISABLE + && (empty($tokens[$i]['sniffCodes']) === true + || isset($tokens[$i]['sniffCodes']['PSR1']) === true + || isset($tokens[$i]['sniffCodes']['PSR1.Files']) === true + || isset($tokens[$i]['sniffCodes']['PSR1.Files.SideEffects']) === true) + ) { + do { + $i = $phpcsFile->findNext(T_PHPCS_ENABLE, ($i + 1)); + } while ($i !== false + && empty($tokens[$i]['sniffCodes']) === false + && isset($tokens[$i]['sniffCodes']['PSR1']) === false + && isset($tokens[$i]['sniffCodes']['PSR1.Files']) === false + && isset($tokens[$i]['sniffCodes']['PSR1.Files.SideEffects']) === false); + + if ($i === false) { + // The entire rest of the file is disabled, + // so return what we have so far. + break; + } + + continue; + } + + // Ignore whitespace and comments. + if (isset(Tokens::$emptyTokens[$tokens[$i]['code']]) === true) { + continue; + } + + // Ignore PHP tags. + if ($tokens[$i]['code'] === T_OPEN_TAG + || $tokens[$i]['code'] === T_CLOSE_TAG + ) { + continue; + } + + // Ignore shebang. + if (substr($tokens[$i]['content'], 0, 2) === '#!') { + continue; + } + + // Ignore logical operators. + if (isset(Tokens::$booleanOperators[$tokens[$i]['code']]) === true) { + continue; + } + + // Ignore entire namespace, declare, const and use statements. + if ($tokens[$i]['code'] === T_NAMESPACE + || $tokens[$i]['code'] === T_USE + || $tokens[$i]['code'] === T_DECLARE + || $tokens[$i]['code'] === T_CONST + ) { + if (isset($tokens[$i]['scope_opener']) === true) { + $i = $tokens[$i]['scope_closer']; + if ($tokens[$i]['code'] === T_ENDDECLARE) { + $semicolon = $phpcsFile->findNext(Tokens::$emptyTokens, ($i + 1), null, true); + if ($semicolon !== false && $tokens[$semicolon]['code'] === T_SEMICOLON) { + $i = $semicolon; + } + } + } else { + $semicolon = $phpcsFile->findNext(T_SEMICOLON, ($i + 1)); + if ($semicolon !== false) { + $i = $semicolon; + } + } + + continue; + } + + // Ignore function/class prefixes. + if (isset(Tokens::$methodPrefixes[$tokens[$i]['code']]) === true) { + continue; + } + + // Ignore anon classes. + if ($tokens[$i]['code'] === T_ANON_CLASS) { + $i = $tokens[$i]['scope_closer']; + continue; + } + + // Ignore attributes. + if ($tokens[$i]['code'] === T_ATTRIBUTE + && isset($tokens[$i]['attribute_closer']) === true + ) { + $i = $tokens[$i]['attribute_closer']; + continue; + } + + // Detect and skip over symbols. + if (isset($symbols[$tokens[$i]['code']]) === true + && isset($tokens[$i]['scope_closer']) === true + ) { + if ($firstSymbol === null) { + $firstSymbol = $i; + } + + $i = $tokens[$i]['scope_closer']; + continue; + } else if ($tokens[$i]['code'] === T_STRING + && strtolower($tokens[$i]['content']) === 'define' + ) { + $prev = $phpcsFile->findPrevious(Tokens::$emptyTokens, ($i - 1), null, true); + if ($tokens[$prev]['code'] !== T_OBJECT_OPERATOR + && $tokens[$prev]['code'] !== T_NULLSAFE_OBJECT_OPERATOR + && $tokens[$prev]['code'] !== T_DOUBLE_COLON + && $tokens[$prev]['code'] !== T_FUNCTION + ) { + if ($firstSymbol === null) { + $firstSymbol = $i; + } + + $semicolon = $phpcsFile->findNext(T_SEMICOLON, ($i + 1)); + if ($semicolon !== false) { + $i = $semicolon; + } + + continue; + } + }//end if + + // Special case for defined() as it can be used to see + // if a constant (a symbol) should be defined or not and + // doesn't need to use a full conditional block. + if ($tokens[$i]['code'] === T_STRING + && strtolower($tokens[$i]['content']) === 'defined' + ) { + $openBracket = $phpcsFile->findNext(Tokens::$emptyTokens, ($i + 1), null, true); + if ($openBracket !== false + && $tokens[$openBracket]['code'] === T_OPEN_PARENTHESIS + && isset($tokens[$openBracket]['parenthesis_closer']) === true + ) { + $prev = $phpcsFile->findPrevious(Tokens::$emptyTokens, ($i - 1), null, true); + if ($tokens[$prev]['code'] !== T_OBJECT_OPERATOR + && $tokens[$prev]['code'] !== T_NULLSAFE_OBJECT_OPERATOR + && $tokens[$prev]['code'] !== T_DOUBLE_COLON + && $tokens[$prev]['code'] !== T_FUNCTION + ) { + $i = $tokens[$openBracket]['parenthesis_closer']; + continue; + } + } + }//end if + + // Conditional statements are allowed in symbol files as long as the + // contents is only a symbol definition. So don't count these as effects + // in this case. + if (isset($conditions[$tokens[$i]['code']]) === true) { + if (isset($tokens[$i]['scope_opener']) === false) { + // Probably an "else if", so just ignore. + continue; + } + + $result = $this->searchForConflict( + $phpcsFile, + ($tokens[$i]['scope_opener'] + 1), + ($tokens[$i]['scope_closer'] - 1), + $tokens + ); + + if ($result['symbol'] !== null) { + if ($firstSymbol === null) { + $firstSymbol = $result['symbol']; + } + + if ($result['effect'] !== null) { + // Found a conflict. + $firstEffect = $result['effect']; + break; + } + } + + if ($firstEffect === null) { + $firstEffect = $result['effect']; + } + + $i = $tokens[$i]['scope_closer']; + continue; + }//end if + + if ($firstEffect === null) { + $firstEffect = $i; + } + + if ($firstSymbol !== null) { + // We have a conflict we have to report, so no point continuing. + break; + } + }//end for + + return [ + 'symbol' => $firstSymbol, + 'effect' => $firstEffect, + ]; + + }//end searchForConflict() + + +}//end class diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/PSR1/Sniffs/Methods/CamelCapsMethodNameSniff.php b/vendor/squizlabs/php_codesniffer/src/Standards/PSR1/Sniffs/Methods/CamelCapsMethodNameSniff.php new file mode 100644 index 00000000..2d138146 --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/PSR1/Sniffs/Methods/CamelCapsMethodNameSniff.php @@ -0,0 +1,91 @@ + + * @copyright 2006-2015 Squiz Pty Ltd (ABN 77 084 670 600) + * @license https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence + */ + +namespace PHP_CodeSniffer\Standards\PSR1\Sniffs\Methods; + +use PHP_CodeSniffer\Files\File; +use PHP_CodeSniffer\Standards\Generic\Sniffs\NamingConventions\CamelCapsFunctionNameSniff as GenericCamelCapsFunctionNameSniff; +use PHP_CodeSniffer\Util\Common; + +class CamelCapsMethodNameSniff extends GenericCamelCapsFunctionNameSniff +{ + + + /** + * Processes the tokens within the scope. + * + * @param \PHP_CodeSniffer\Files\File $phpcsFile The file being processed. + * @param int $stackPtr The position where this token was + * found. + * @param int $currScope The position of the current scope. + * + * @return void + */ + protected function processTokenWithinScope(File $phpcsFile, $stackPtr, $currScope) + { + $tokens = $phpcsFile->getTokens(); + + // Determine if this is a function which needs to be examined. + $conditions = $tokens[$stackPtr]['conditions']; + end($conditions); + $deepestScope = key($conditions); + if ($deepestScope !== $currScope) { + return; + } + + $methodName = $phpcsFile->getDeclarationName($stackPtr); + if ($methodName === null) { + // Ignore closures. + return; + } + + // Ignore magic methods. + if (preg_match('|^__[^_]|', $methodName) !== 0) { + $magicPart = strtolower(substr($methodName, 2)); + if (isset($this->magicMethods[$magicPart]) === true + || isset($this->methodsDoubleUnderscore[$magicPart]) === true + ) { + return; + } + } + + $testName = ltrim($methodName, '_'); + if ($testName !== '' && Common::isCamelCaps($testName, false, true, false) === false) { + $error = 'Method name "%s" is not in camel caps format'; + $className = $phpcsFile->getDeclarationName($currScope); + if (isset($className) === false) { + $className = '[Anonymous Class]'; + } + + $errorData = [$className.'::'.$methodName]; + $phpcsFile->addError($error, $stackPtr, 'NotCamelCaps', $errorData); + $phpcsFile->recordMetric($stackPtr, 'CamelCase method name', 'no'); + } else { + $phpcsFile->recordMetric($stackPtr, 'CamelCase method name', 'yes'); + } + + }//end processTokenWithinScope() + + + /** + * Processes the tokens outside the scope. + * + * @param \PHP_CodeSniffer\Files\File $phpcsFile The file being processed. + * @param int $stackPtr The position where this token was + * found. + * + * @return void + */ + protected function processTokenOutsideScope(File $phpcsFile, $stackPtr) + { + + }//end processTokenOutsideScope() + + +}//end class diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/PSR1/Tests/Classes/ClassDeclarationUnitTest.1.inc b/vendor/squizlabs/php_codesniffer/src/Standards/PSR1/Tests/Classes/ClassDeclarationUnitTest.1.inc new file mode 100644 index 00000000..58cb85e3 --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/PSR1/Tests/Classes/ClassDeclarationUnitTest.1.inc @@ -0,0 +1,3 @@ + + * @copyright 2006-2015 Squiz Pty Ltd (ABN 77 084 670 600) + * @license https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence + */ + +namespace PHP_CodeSniffer\Standards\PSR1\Tests\Classes; + +use PHP_CodeSniffer\Tests\Standards\AbstractSniffUnitTest; + +class ClassDeclarationUnitTest extends AbstractSniffUnitTest +{ + + + /** + * Returns the lines where errors should occur. + * + * The key of the array should represent the line number and the value + * should represent the number of errors that should occur on that line. + * + * @param string $testFile The name of the file being tested. + * + * @return array + */ + public function getErrorList($testFile='') + { + if ($testFile === 'ClassDeclarationUnitTest.2.inc') { + return []; + } + + return [ + 2 => 1, + 3 => 2, + ]; + + }//end getErrorList() + + + /** + * Returns the lines where warnings should occur. + * + * The key of the array should represent the line number and the value + * should represent the number of warnings that should occur on that line. + * + * @return array + */ + public function getWarningList() + { + return []; + + }//end getWarningList() + + +}//end class diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/PSR1/Tests/Files/SideEffectsUnitTest.1.inc b/vendor/squizlabs/php_codesniffer/src/Standards/PSR1/Tests/Files/SideEffectsUnitTest.1.inc new file mode 100644 index 00000000..596d6cf9 --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/PSR1/Tests/Files/SideEffectsUnitTest.1.inc @@ -0,0 +1,73 @@ + diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/PSR1/Tests/Files/SideEffectsUnitTest.10.inc b/vendor/squizlabs/php_codesniffer/src/Standards/PSR1/Tests/Files/SideEffectsUnitTest.10.inc new file mode 100644 index 00000000..63f256d4 --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/PSR1/Tests/Files/SideEffectsUnitTest.10.inc @@ -0,0 +1,8 @@ +define("MAXSIZE", 100); diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/PSR1/Tests/Files/SideEffectsUnitTest.14.inc b/vendor/squizlabs/php_codesniffer/src/Standards/PSR1/Tests/Files/SideEffectsUnitTest.14.inc new file mode 100644 index 00000000..9499885b --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/PSR1/Tests/Files/SideEffectsUnitTest.14.inc @@ -0,0 +1,2 @@ +define("MAXSIZE", 100); diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/PSR1/Tests/Files/SideEffectsUnitTest.15.inc b/vendor/squizlabs/php_codesniffer/src/Standards/PSR1/Tests/Files/SideEffectsUnitTest.15.inc new file mode 100644 index 00000000..0500d10e --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/PSR1/Tests/Files/SideEffectsUnitTest.15.inc @@ -0,0 +1,2 @@ +defined('MINSIZE') or define("MAXSIZE", 100); diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/PSR1/Tests/Files/SideEffectsUnitTest.16.inc b/vendor/squizlabs/php_codesniffer/src/Standards/PSR1/Tests/Files/SideEffectsUnitTest.16.inc new file mode 100644 index 00000000..588ece58 --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/PSR1/Tests/Files/SideEffectsUnitTest.16.inc @@ -0,0 +1,2 @@ +defined('MINSIZE') or define("MAXSIZE", 100); diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/PSR1/Tests/Files/SideEffectsUnitTest.2.inc b/vendor/squizlabs/php_codesniffer/src/Standards/PSR1/Tests/Files/SideEffectsUnitTest.2.inc new file mode 100644 index 00000000..4c9b8e66 --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/PSR1/Tests/Files/SideEffectsUnitTest.2.inc @@ -0,0 +1,24 @@ +define(); +echo $object -> define(); +Foo::define(); + +$c = new class extends Something{ + + public function someMethod() + { + // ... + } + +}; diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/PSR1/Tests/Files/SideEffectsUnitTest.3.inc b/vendor/squizlabs/php_codesniffer/src/Standards/PSR1/Tests/Files/SideEffectsUnitTest.3.inc new file mode 100644 index 00000000..d4ae77ee --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/PSR1/Tests/Files/SideEffectsUnitTest.3.inc @@ -0,0 +1,6 @@ + +'; +} + +printHead(); +?> + + diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/PSR1/Tests/Files/SideEffectsUnitTest.5.inc b/vendor/squizlabs/php_codesniffer/src/Standards/PSR1/Tests/Files/SideEffectsUnitTest.5.inc new file mode 100644 index 00000000..7265c637 --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/PSR1/Tests/Files/SideEffectsUnitTest.5.inc @@ -0,0 +1,2 @@ + diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/PSR1/Tests/Files/SideEffectsUnitTest.6.inc b/vendor/squizlabs/php_codesniffer/src/Standards/PSR1/Tests/Files/SideEffectsUnitTest.6.inc new file mode 100644 index 00000000..e02fed4b --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/PSR1/Tests/Files/SideEffectsUnitTest.6.inc @@ -0,0 +1,9 @@ + + * @copyright 2006-2015 Squiz Pty Ltd (ABN 77 084 670 600) + * @license https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence + */ + +namespace PHP_CodeSniffer\Standards\PSR1\Tests\Files; + +use PHP_CodeSniffer\Tests\Standards\AbstractSniffUnitTest; + +class SideEffectsUnitTest extends AbstractSniffUnitTest +{ + + + /** + * Set CLI values before the file is tested. + * + * @param string $testFile The name of the file being tested. + * @param \PHP_CodeSniffer\Config $config The config data for the test run. + * + * @return void + */ + public function setCliValues($testFile, $config) + { + if ($testFile === 'SideEffectsUnitTest.12.inc') { + $config->annotations = false; + } + + }//end setCliValues() + + + /** + * Returns the lines where errors should occur. + * + * The key of the array should represent the line number and the value + * should represent the number of errors that should occur on that line. + * + * @param string $testFile The name of the file being tested. + * + * @return array + */ + public function getErrorList($testFile='') + { + return []; + + }//end getErrorList() + + + /** + * Returns the lines where warnings should occur. + * + * The key of the array should represent the line number and the value + * should represent the number of warnings that should occur on that line. + * + * @param string $testFile The name of the file being tested. + * + * @return array + */ + public function getWarningList($testFile='') + { + switch ($testFile) { + case 'SideEffectsUnitTest.3.inc': + case 'SideEffectsUnitTest.4.inc': + case 'SideEffectsUnitTest.5.inc': + case 'SideEffectsUnitTest.10.inc': + case 'SideEffectsUnitTest.12.inc': + case 'SideEffectsUnitTest.15.inc': + case 'SideEffectsUnitTest.16.inc': + return [1 => 1]; + default: + return []; + }//end switch + + }//end getWarningList() + + +}//end class diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/PSR1/Tests/Methods/CamelCapsMethodNameUnitTest.inc b/vendor/squizlabs/php_codesniffer/src/Standards/PSR1/Tests/Methods/CamelCapsMethodNameUnitTest.inc new file mode 100644 index 00000000..7381517f --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/PSR1/Tests/Methods/CamelCapsMethodNameUnitTest.inc @@ -0,0 +1,81 @@ + + * @copyright 2006-2015 Squiz Pty Ltd (ABN 77 084 670 600) + * @license https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence + */ + +namespace PHP_CodeSniffer\Standards\PSR1\Tests\Methods; + +use PHP_CodeSniffer\Tests\Standards\AbstractSniffUnitTest; + +class CamelCapsMethodNameUnitTest extends AbstractSniffUnitTest +{ + + + /** + * Returns the lines where errors should occur. + * + * The key of the array should represent the line number and the value + * should represent the number of errors that should occur on that line. + * + * @return array + */ + public function getErrorList() + { + return [ + 6 => 1, + 7 => 1, + 11 => 1, + 12 => 1, + 13 => 1, + 17 => 1, + 21 => 1, + 25 => 1, + 26 => 1, + 77 => 1, + ]; + + }//end getErrorList() + + + /** + * Returns the lines where warnings should occur. + * + * The key of the array should represent the line number and the value + * should represent the number of warnings that should occur on that line. + * + * @return array + */ + public function getWarningList() + { + return []; + + }//end getWarningList() + + +}//end class diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/PSR1/ruleset.xml b/vendor/squizlabs/php_codesniffer/src/Standards/PSR1/ruleset.xml new file mode 100644 index 00000000..65cbe20e --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/PSR1/ruleset.xml @@ -0,0 +1,47 @@ + + + The PSR1 coding standard. + + + + + + + + + + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/PSR12/Docs/Classes/ClassInstantiationStandard.xml b/vendor/squizlabs/php_codesniffer/src/Standards/PSR12/Docs/Classes/ClassInstantiationStandard.xml new file mode 100644 index 00000000..ae24611d --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/PSR12/Docs/Classes/ClassInstantiationStandard.xml @@ -0,0 +1,19 @@ + + + + + + + + + + + + + diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/PSR12/Docs/Functions/NullableTypeDeclarationStandard.xml b/vendor/squizlabs/php_codesniffer/src/Standards/PSR12/Docs/Functions/NullableTypeDeclarationStandard.xml new file mode 100644 index 00000000..2032c9a6 --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/PSR12/Docs/Functions/NullableTypeDeclarationStandard.xml @@ -0,0 +1,45 @@ + + + + + + + + + + + + + + + + + + + + + diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/PSR12/Docs/Keywords/ShortFormTypeKeywordsStandard.xml b/vendor/squizlabs/php_codesniffer/src/Standards/PSR12/Docs/Keywords/ShortFormTypeKeywordsStandard.xml new file mode 100644 index 00000000..9bb5a8a5 --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/PSR12/Docs/Keywords/ShortFormTypeKeywordsStandard.xml @@ -0,0 +1,19 @@ + + + + + + + + + + (boolean) $isValid; + ]]> + + + diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/PSR12/Docs/Namespaces/CompoundNamespaceDepthStandard.xml b/vendor/squizlabs/php_codesniffer/src/Standards/PSR12/Docs/Namespaces/CompoundNamespaceDepthStandard.xml new file mode 100644 index 00000000..b74e8b42 --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/PSR12/Docs/Namespaces/CompoundNamespaceDepthStandard.xml @@ -0,0 +1,28 @@ + + + + + + + + + + SubnamespaceOne\AnotherNamespace\ClassA, + SubnamespaceOne\ClassB, + ClassZ, +}; + ]]> + + + diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/PSR12/Docs/Operators/OperatorSpacingStandard.xml b/vendor/squizlabs/php_codesniffer/src/Standards/PSR12/Docs/Operators/OperatorSpacingStandard.xml new file mode 100644 index 00000000..981b1d97 --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/PSR12/Docs/Operators/OperatorSpacingStandard.xml @@ -0,0 +1,27 @@ + + + + + + + $b) { + $variable = $foo ? 'foo' : 'bar'; +} + ]]> + + + $b) { + $variable=$foo?'foo':'bar'; +} + ]]> + + + diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/PSR12/Sniffs/Classes/AnonClassDeclarationSniff.php b/vendor/squizlabs/php_codesniffer/src/Standards/PSR12/Sniffs/Classes/AnonClassDeclarationSniff.php new file mode 100644 index 00000000..7a33bd94 --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/PSR12/Sniffs/Classes/AnonClassDeclarationSniff.php @@ -0,0 +1,242 @@ + + * @copyright 2006-2019 Squiz Pty Ltd (ABN 77 084 670 600) + * @license https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence + */ + +namespace PHP_CodeSniffer\Standards\PSR12\Sniffs\Classes; + +use PHP_CodeSniffer\Files\File; +use PHP_CodeSniffer\Standards\Generic\Sniffs\Functions\FunctionCallArgumentSpacingSniff; +use PHP_CodeSniffer\Standards\PSR2\Sniffs\Classes\ClassDeclarationSniff; +use PHP_CodeSniffer\Standards\Squiz\Sniffs\Functions\MultiLineFunctionDeclarationSniff; +use PHP_CodeSniffer\Util\Tokens; + +class AnonClassDeclarationSniff extends ClassDeclarationSniff +{ + + /** + * The PSR2 MultiLineFunctionDeclarations sniff. + * + * @var MultiLineFunctionDeclarationSniff + */ + private $multiLineSniff = null; + + /** + * The Generic FunctionCallArgumentSpacing sniff. + * + * @var FunctionCallArgumentSpacingSniff + */ + private $functionCallSniff = null; + + + /** + * Returns an array of tokens this test wants to listen for. + * + * @return array + */ + public function register() + { + return [T_ANON_CLASS]; + + }//end register() + + + /** + * Processes this test, when one of its tokens is encountered. + * + * @param \PHP_CodeSniffer\Files\File $phpcsFile The file being scanned. + * @param int $stackPtr The position of the current token + * in the stack passed in $tokens. + * + * @return void + */ + public function process(File $phpcsFile, $stackPtr) + { + $tokens = $phpcsFile->getTokens(); + if (isset($tokens[$stackPtr]['scope_opener']) === false) { + return; + } + + $this->multiLineSniff = new MultiLineFunctionDeclarationSniff(); + $this->functionCallSniff = new FunctionCallArgumentSpacingSniff(); + + $this->processOpen($phpcsFile, $stackPtr); + $this->processClose($phpcsFile, $stackPtr); + + if (isset($tokens[$stackPtr]['parenthesis_opener']) === true) { + $openBracket = $tokens[$stackPtr]['parenthesis_opener']; + if ($this->multiLineSniff->isMultiLineDeclaration($phpcsFile, $stackPtr, $openBracket, $tokens) === true) { + $this->processMultiLineArgumentList($phpcsFile, $stackPtr); + } else { + $this->processSingleLineArgumentList($phpcsFile, $stackPtr); + } + + $this->functionCallSniff->checkSpacing($phpcsFile, $stackPtr, $openBracket); + } + + $opener = $tokens[$stackPtr]['scope_opener']; + if ($tokens[$opener]['line'] === $tokens[$stackPtr]['line']) { + return; + } + + $prev = $phpcsFile->findPrevious(T_WHITESPACE, ($opener - 1), $stackPtr, true); + + $implements = $phpcsFile->findPrevious(T_IMPLEMENTS, ($opener - 1), $stackPtr); + if ($implements !== false + && $tokens[$opener]['line'] !== $tokens[$implements]['line'] + && $tokens[$opener]['line'] === $tokens[$prev]['line'] + ) { + // Opening brace must be on a new line as implements list wraps. + $error = 'Opening brace must be on the line after the last implemented interface'; + $fix = $phpcsFile->addFixableError($error, $opener, 'OpenBraceSameLine'); + if ($fix === true) { + $first = $phpcsFile->findFirstOnLine(T_WHITESPACE, $stackPtr, true); + $indent = str_repeat(' ', ($tokens[$first]['column'] - 1)); + $phpcsFile->fixer->beginChangeset(); + $phpcsFile->fixer->replaceToken(($prev + 1), ''); + $phpcsFile->fixer->addNewline($prev); + $phpcsFile->fixer->addContentBefore($opener, $indent); + $phpcsFile->fixer->endChangeset(); + } + } + + if ($tokens[$opener]['line'] > ($tokens[$prev]['line'] + 1)) { + // Opening brace is on a new line, so there must be no blank line before it. + $error = 'Opening brace must not be preceded by a blank line'; + $fix = $phpcsFile->addFixableError($error, $opener, 'OpenBraceLine'); + if ($fix === true) { + $phpcsFile->fixer->beginChangeset(); + for ($x = ($prev + 1); $x < $opener; $x++) { + if ($tokens[$x]['line'] === $tokens[$prev]['line']) { + // Maintain existing newline. + continue; + } + + if ($tokens[$x]['line'] === $tokens[$opener]['line']) { + // Maintain existing indent. + break; + } + + $phpcsFile->fixer->replaceToken($x, ''); + } + + $phpcsFile->fixer->endChangeset(); + } + }//end if + + }//end process() + + + /** + * Processes this test, when one of its tokens is encountered. + * + * @param \PHP_CodeSniffer\Files\File $phpcsFile The file being scanned. + * @param int $stackPtr The position of the current token + * in the stack passed in $tokens. + * + * @return void + */ + public function processSingleLineArgumentList(File $phpcsFile, $stackPtr) + { + $tokens = $phpcsFile->getTokens(); + + $openBracket = $tokens[$stackPtr]['parenthesis_opener']; + $closeBracket = $tokens[$openBracket]['parenthesis_closer']; + if ($openBracket === ($closeBracket - 1)) { + return; + } + + if ($tokens[($openBracket + 1)]['code'] === T_WHITESPACE) { + $error = 'Space after opening parenthesis of single-line argument list prohibited'; + $fix = $phpcsFile->addFixableError($error, $stackPtr, 'SpaceAfterOpenBracket'); + if ($fix === true) { + $phpcsFile->fixer->replaceToken(($openBracket + 1), ''); + } + } + + $spaceBeforeClose = 0; + $prev = $phpcsFile->findPrevious(T_WHITESPACE, ($closeBracket - 1), $openBracket, true); + if ($tokens[$prev]['code'] === T_END_HEREDOC || $tokens[$prev]['code'] === T_END_NOWDOC) { + // Need a newline after these tokens, so ignore this rule. + return; + } + + if ($tokens[$prev]['line'] !== $tokens[$closeBracket]['line']) { + $spaceBeforeClose = 'newline'; + } else if ($tokens[($closeBracket - 1)]['code'] === T_WHITESPACE) { + $spaceBeforeClose = $tokens[($closeBracket - 1)]['length']; + } + + if ($spaceBeforeClose !== 0) { + $error = 'Space before closing parenthesis of single-line argument list prohibited'; + $fix = $phpcsFile->addFixableError($error, $stackPtr, 'SpaceBeforeCloseBracket'); + if ($fix === true) { + if ($spaceBeforeClose === 'newline') { + $phpcsFile->fixer->beginChangeset(); + + $closingContent = ')'; + + $next = $phpcsFile->findNext(T_WHITESPACE, ($closeBracket + 1), null, true); + if ($tokens[$next]['code'] === T_SEMICOLON) { + $closingContent .= ';'; + for ($i = ($closeBracket + 1); $i <= $next; $i++) { + $phpcsFile->fixer->replaceToken($i, ''); + } + } + + // We want to jump over any whitespace or inline comment and + // move the closing parenthesis after any other token. + $prev = ($closeBracket - 1); + while (isset(Tokens::$emptyTokens[$tokens[$prev]['code']]) === true) { + if (($tokens[$prev]['code'] === T_COMMENT) + && (strpos($tokens[$prev]['content'], '*/') !== false) + ) { + break; + } + + $prev--; + } + + $phpcsFile->fixer->addContent($prev, $closingContent); + + $prevNonWhitespace = $phpcsFile->findPrevious(T_WHITESPACE, ($closeBracket - 1), null, true); + for ($i = ($prevNonWhitespace + 1); $i <= $closeBracket; $i++) { + $phpcsFile->fixer->replaceToken($i, ''); + } + + $phpcsFile->fixer->endChangeset(); + } else { + $phpcsFile->fixer->replaceToken(($closeBracket - 1), ''); + }//end if + }//end if + }//end if + + }//end processSingleLineArgumentList() + + + /** + * Processes this test, when one of its tokens is encountered. + * + * @param \PHP_CodeSniffer\Files\File $phpcsFile The file being scanned. + * @param int $stackPtr The position of the current token + * in the stack passed in $tokens. + * + * @return void + */ + public function processMultiLineArgumentList(File $phpcsFile, $stackPtr) + { + $tokens = $phpcsFile->getTokens(); + + $openBracket = $tokens[$stackPtr]['parenthesis_opener']; + + $this->multiLineSniff->processBracket($phpcsFile, $openBracket, $tokens, 'argument'); + $this->multiLineSniff->processArgumentList($phpcsFile, $stackPtr, $this->indent, 'argument'); + + }//end processMultiLineArgumentList() + + +}//end class diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/PSR12/Sniffs/Classes/ClassInstantiationSniff.php b/vendor/squizlabs/php_codesniffer/src/Standards/PSR12/Sniffs/Classes/ClassInstantiationSniff.php new file mode 100644 index 00000000..e4ebd576 --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/PSR12/Sniffs/Classes/ClassInstantiationSniff.php @@ -0,0 +1,114 @@ + + * @copyright 2006-2015 Squiz Pty Ltd (ABN 77 084 670 600) + * @license https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence + */ + +namespace PHP_CodeSniffer\Standards\PSR12\Sniffs\Classes; + +use PHP_CodeSniffer\Files\File; +use PHP_CodeSniffer\Sniffs\Sniff; +use PHP_CodeSniffer\Util\Tokens; + +class ClassInstantiationSniff implements Sniff +{ + + + /** + * Returns an array of tokens this test wants to listen for. + * + * @return array + */ + public function register() + { + return [T_NEW]; + + }//end register() + + + /** + * Processes this test, when one of its tokens is encountered. + * + * @param \PHP_CodeSniffer\Files\File $phpcsFile The file being scanned. + * @param int $stackPtr The position of the current token in the + * stack passed in $tokens. + * + * @return void + */ + public function process(File $phpcsFile, $stackPtr) + { + $tokens = $phpcsFile->getTokens(); + + // Find the class name. + $allowed = [ + T_STRING => T_STRING, + T_NS_SEPARATOR => T_NS_SEPARATOR, + T_SELF => T_SELF, + T_STATIC => T_STATIC, + T_VARIABLE => T_VARIABLE, + T_DOLLAR => T_DOLLAR, + T_OBJECT_OPERATOR => T_OBJECT_OPERATOR, + T_NULLSAFE_OBJECT_OPERATOR => T_NULLSAFE_OBJECT_OPERATOR, + T_DOUBLE_COLON => T_DOUBLE_COLON, + ]; + + $allowed += Tokens::$emptyTokens; + + $classNameEnd = null; + for ($i = ($stackPtr + 1); $i < $phpcsFile->numTokens; $i++) { + if (isset($allowed[$tokens[$i]['code']]) === true) { + continue; + } + + // Skip over potential attributes for anonymous classes. + if ($tokens[$i]['code'] === T_ATTRIBUTE + && isset($tokens[$i]['attribute_closer']) === true + ) { + $i = $tokens[$i]['attribute_closer']; + continue; + } + + if ($tokens[$i]['code'] === T_OPEN_SQUARE_BRACKET + || $tokens[$i]['code'] === T_OPEN_CURLY_BRACKET + ) { + $i = $tokens[$i]['bracket_closer']; + continue; + } + + $classNameEnd = $i; + break; + }//end for + + if ($classNameEnd === null) { + return; + } + + if ($tokens[$classNameEnd]['code'] === T_ANON_CLASS) { + // Ignore anon classes. + return; + } + + if ($tokens[$classNameEnd]['code'] === T_OPEN_PARENTHESIS) { + // Using parenthesis. + return; + } + + if ($classNameEnd === $stackPtr) { + // Failed to find the class name. + return; + } + + $error = 'Parentheses must be used when instantiating a new class'; + $fix = $phpcsFile->addFixableError($error, $stackPtr, 'MissingParentheses'); + if ($fix === true) { + $prev = $phpcsFile->findPrevious(Tokens::$emptyTokens, ($classNameEnd - 1), null, true); + $phpcsFile->fixer->addContent($prev, '()'); + } + + }//end process() + + +}//end class diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/PSR12/Sniffs/Classes/ClosingBraceSniff.php b/vendor/squizlabs/php_codesniffer/src/Standards/PSR12/Sniffs/Classes/ClosingBraceSniff.php new file mode 100644 index 00000000..0f9752b1 --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/PSR12/Sniffs/Classes/ClosingBraceSniff.php @@ -0,0 +1,66 @@ + + * @copyright 2006-2019 Squiz Pty Ltd (ABN 77 084 670 600) + * @license https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence + */ + +namespace PHP_CodeSniffer\Standards\PSR12\Sniffs\Classes; + +use PHP_CodeSniffer\Files\File; +use PHP_CodeSniffer\Sniffs\Sniff; + +class ClosingBraceSniff implements Sniff +{ + + + /** + * Returns an array of tokens this test wants to listen for. + * + * @return array + */ + public function register() + { + return [ + T_CLASS, + T_INTERFACE, + T_TRAIT, + T_FUNCTION, + ]; + + }//end register() + + + /** + * Processes this test, when one of its tokens is encountered. + * + * @param \PHP_CodeSniffer\Files\File $phpcsFile The file being scanned. + * @param int $stackPtr The position of the current token in the + * stack passed in $tokens. + * + * @return void + */ + public function process(File $phpcsFile, $stackPtr) + { + $tokens = $phpcsFile->getTokens(); + if (isset($tokens[$stackPtr]['scope_closer']) === false) { + return; + } + + $closer = $tokens[$stackPtr]['scope_closer']; + $next = $phpcsFile->findNext(T_WHITESPACE, ($closer + 1), null, true); + if ($next === false + || $tokens[$next]['line'] !== $tokens[$closer]['line'] + ) { + return; + } + + $error = 'Closing brace must not be followed by any comment or statement on the same line'; + $phpcsFile->addError($error, $closer, 'StatementAfter'); + + }//end process() + + +}//end class diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/PSR12/Sniffs/Classes/OpeningBraceSpaceSniff.php b/vendor/squizlabs/php_codesniffer/src/Standards/PSR12/Sniffs/Classes/OpeningBraceSpaceSniff.php new file mode 100644 index 00000000..83ffda4d --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/PSR12/Sniffs/Classes/OpeningBraceSpaceSniff.php @@ -0,0 +1,80 @@ + + * @copyright 2006-2019 Squiz Pty Ltd (ABN 77 084 670 600) + * @license https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence + */ + +namespace PHP_CodeSniffer\Standards\PSR12\Sniffs\Classes; + +use PHP_CodeSniffer\Files\File; +use PHP_CodeSniffer\Sniffs\Sniff; +use PHP_CodeSniffer\Util\Tokens; + +class OpeningBraceSpaceSniff implements Sniff +{ + + + /** + * Returns an array of tokens this test wants to listen for. + * + * @return array + */ + public function register() + { + return Tokens::$ooScopeTokens; + + }//end register() + + + /** + * Processes this test, when one of its tokens is encountered. + * + * @param \PHP_CodeSniffer\Files\File $phpcsFile The file being scanned. + * @param int $stackPtr The position of the current token in the + * stack passed in $tokens. + * + * @return void + */ + public function process(File $phpcsFile, $stackPtr) + { + $tokens = $phpcsFile->getTokens(); + if (isset($tokens[$stackPtr]['scope_opener']) === false) { + return; + } + + $opener = $tokens[$stackPtr]['scope_opener']; + $next = $phpcsFile->findNext(T_WHITESPACE, ($opener + 1), null, true); + if ($next === false + || $tokens[$next]['line'] <= ($tokens[$opener]['line'] + 1) + ) { + return; + } + + $error = 'Opening brace must not be followed by a blank line'; + $fix = $phpcsFile->addFixableError($error, $opener, 'Found'); + if ($fix === false) { + return; + } + + $phpcsFile->fixer->beginChangeset(); + for ($i = ($opener + 1); $i < $next; $i++) { + if ($tokens[$i]['line'] === $tokens[$opener]['line']) { + continue; + } + + if ($tokens[$i]['line'] === $tokens[$next]['line']) { + break; + } + + $phpcsFile->fixer->replaceToken($i, ''); + } + + $phpcsFile->fixer->endChangeset(); + + }//end process() + + +}//end class diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/PSR12/Sniffs/ControlStructures/BooleanOperatorPlacementSniff.php b/vendor/squizlabs/php_codesniffer/src/Standards/PSR12/Sniffs/ControlStructures/BooleanOperatorPlacementSniff.php new file mode 100644 index 00000000..b87c3391 --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/PSR12/Sniffs/ControlStructures/BooleanOperatorPlacementSniff.php @@ -0,0 +1,229 @@ + + * @copyright 2006-2019 Squiz Pty Ltd (ABN 77 084 670 600) + * @license https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence + */ + +namespace PHP_CodeSniffer\Standards\PSR12\Sniffs\ControlStructures; + +use PHP_CodeSniffer\Files\File; +use PHP_CodeSniffer\Sniffs\Sniff; + +class BooleanOperatorPlacementSniff implements Sniff +{ + + /** + * Used to restrict the placement of the boolean operator. + * + * Allowed value are "first" or "last". + * + * @var string|null + */ + public $allowOnly = null; + + + /** + * Returns an array of tokens this test wants to listen for. + * + * @return array + */ + public function register() + { + return [ + T_IF, + T_WHILE, + T_SWITCH, + T_ELSEIF, + T_MATCH, + ]; + + }//end register() + + + /** + * Processes this test, when one of its tokens is encountered. + * + * @param \PHP_CodeSniffer\Files\File $phpcsFile The file being scanned. + * @param int $stackPtr The position of the current token + * in the stack passed in $tokens. + * + * @return void + */ + public function process(File $phpcsFile, $stackPtr) + { + $tokens = $phpcsFile->getTokens(); + + if (isset($tokens[$stackPtr]['parenthesis_opener']) === false + || isset($tokens[$stackPtr]['parenthesis_closer']) === false + ) { + return; + } + + $parenOpener = $tokens[$stackPtr]['parenthesis_opener']; + $parenCloser = $tokens[$stackPtr]['parenthesis_closer']; + + if ($tokens[$parenOpener]['line'] === $tokens[$parenCloser]['line']) { + // Conditions are all on the same line. + return; + } + + $find = [ + T_BOOLEAN_AND, + T_BOOLEAN_OR, + ]; + + if ($this->allowOnly === 'first' || $this->allowOnly === 'last') { + $position = $this->allowOnly; + } else { + $position = null; + } + + $operator = $parenOpener; + $error = false; + $operators = []; + + do { + $operator = $phpcsFile->findNext($find, ($operator + 1), $parenCloser); + if ($operator === false) { + break; + } + + $prev = $phpcsFile->findPrevious(T_WHITESPACE, ($operator - 1), $parenOpener, true); + if ($prev === false) { + // Parse error. + return; + } + + $next = $phpcsFile->findNext(T_WHITESPACE, ($operator + 1), $parenCloser, true); + if ($next === false) { + // Parse error. + return; + } + + $firstOnLine = false; + $lastOnLine = false; + + if ($tokens[$prev]['line'] < $tokens[$operator]['line']) { + // The boolean operator is the first content on the line. + $firstOnLine = true; + } + + if ($tokens[$next]['line'] > $tokens[$operator]['line']) { + // The boolean operator is the last content on the line. + $lastOnLine = true; + } + + if ($firstOnLine === true && $lastOnLine === true) { + // The operator is the only content on the line. + // Don't record it because we can't determine + // placement information from looking at it. + continue; + } + + $operators[] = $operator; + + if ($firstOnLine === false && $lastOnLine === false) { + // It's in the middle of content, so we can't determine + // placement information from looking at it, but we may + // still need to process it. + continue; + } + + if ($firstOnLine === true) { + if ($position === null) { + $position = 'first'; + } + + if ($position !== 'first') { + $error = true; + } + } else { + if ($position === null) { + $position = 'last'; + } + + if ($position !== 'last') { + $error = true; + } + } + } while ($operator !== false); + + if ($error === false) { + return; + } + + switch ($this->allowOnly) { + case 'first': + $error = 'Boolean operators between conditions must be at the beginning of the line'; + break; + case 'last': + $error = 'Boolean operators between conditions must be at the end of the line'; + break; + default: + $error = 'Boolean operators between conditions must be at the beginning or end of the line, but not both'; + } + + $fix = $phpcsFile->addFixableError($error, $stackPtr, 'FoundMixed'); + if ($fix === false) { + return; + } + + $phpcsFile->fixer->beginChangeset(); + foreach ($operators as $operator) { + $prev = $phpcsFile->findPrevious(T_WHITESPACE, ($operator - 1), $parenOpener, true); + $next = $phpcsFile->findNext(T_WHITESPACE, ($operator + 1), $parenCloser, true); + + if ($position === 'last') { + if ($tokens[$next]['line'] === $tokens[$operator]['line']) { + if ($tokens[$prev]['line'] === $tokens[$operator]['line']) { + // Move the content after the operator to the next line. + if ($tokens[($operator + 1)]['code'] === T_WHITESPACE) { + $phpcsFile->fixer->replaceToken(($operator + 1), ''); + } + + $first = $phpcsFile->findFirstOnLine(T_WHITESPACE, $operator, true); + $padding = str_repeat(' ', ($tokens[$first]['column'] - 1)); + $phpcsFile->fixer->addContent($operator, $phpcsFile->eolChar.$padding); + } else { + // Move the operator to the end of the previous line. + if ($tokens[($operator + 1)]['code'] === T_WHITESPACE) { + $phpcsFile->fixer->replaceToken(($operator + 1), ''); + } + + $phpcsFile->fixer->addContent($prev, ' '.$tokens[$operator]['content']); + $phpcsFile->fixer->replaceToken($operator, ''); + } + }//end if + } else { + if ($tokens[$prev]['line'] === $tokens[$operator]['line']) { + if ($tokens[$next]['line'] === $tokens[$operator]['line']) { + // Move the operator, and the rest of the expression, to the next line. + if ($tokens[($operator - 1)]['code'] === T_WHITESPACE) { + $phpcsFile->fixer->replaceToken(($operator - 1), ''); + } + + $first = $phpcsFile->findFirstOnLine(T_WHITESPACE, $operator, true); + $padding = str_repeat(' ', ($tokens[$first]['column'] - 1)); + $phpcsFile->fixer->addContentBefore($operator, $phpcsFile->eolChar.$padding); + } else { + // Move the operator to the start of the next line. + if ($tokens[($operator - 1)]['code'] === T_WHITESPACE) { + $phpcsFile->fixer->replaceToken(($operator - 1), ''); + } + + $phpcsFile->fixer->addContentBefore($next, $tokens[$operator]['content'].' '); + $phpcsFile->fixer->replaceToken($operator, ''); + } + }//end if + }//end if + }//end foreach + + $phpcsFile->fixer->endChangeset(); + + }//end process() + + +}//end class diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/PSR12/Sniffs/ControlStructures/ControlStructureSpacingSniff.php b/vendor/squizlabs/php_codesniffer/src/Standards/PSR12/Sniffs/ControlStructures/ControlStructureSpacingSniff.php new file mode 100644 index 00000000..3d29c4ac --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/PSR12/Sniffs/ControlStructures/ControlStructureSpacingSniff.php @@ -0,0 +1,192 @@ + + * @copyright 2006-2019 Squiz Pty Ltd (ABN 77 084 670 600) + * @license https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence + */ + +namespace PHP_CodeSniffer\Standards\PSR12\Sniffs\ControlStructures; + +use PHP_CodeSniffer\Files\File; +use PHP_CodeSniffer\Sniffs\Sniff; +use PHP_CodeSniffer\Standards\PSR2\Sniffs\ControlStructures\ControlStructureSpacingSniff as PSR2Spacing; +use PHP_CodeSniffer\Util\Tokens; + +class ControlStructureSpacingSniff implements Sniff +{ + + /** + * The number of spaces code should be indented. + * + * @var integer + */ + public $indent = 4; + + + /** + * Returns an array of tokens this test wants to listen for. + * + * @return array + */ + public function register() + { + return [ + T_IF, + T_WHILE, + T_FOREACH, + T_FOR, + T_SWITCH, + T_ELSE, + T_ELSEIF, + T_CATCH, + T_MATCH, + ]; + + }//end register() + + + /** + * Processes this test, when one of its tokens is encountered. + * + * @param \PHP_CodeSniffer\Files\File $phpcsFile The file being scanned. + * @param int $stackPtr The position of the current token + * in the stack passed in $tokens. + * + * @return void + */ + public function process(File $phpcsFile, $stackPtr) + { + $tokens = $phpcsFile->getTokens(); + + if (isset($tokens[$stackPtr]['parenthesis_opener']) === false + || isset($tokens[$stackPtr]['parenthesis_closer']) === false + ) { + return; + } + + $parenOpener = $tokens[$stackPtr]['parenthesis_opener']; + $parenCloser = $tokens[$stackPtr]['parenthesis_closer']; + + if ($tokens[$parenOpener]['line'] === $tokens[$parenCloser]['line']) { + // Conditions are all on the same line, so follow PSR2. + $sniff = new PSR2Spacing(); + return $sniff->process($phpcsFile, $stackPtr); + } + + $next = $phpcsFile->findNext(T_WHITESPACE, ($parenOpener + 1), $parenCloser, true); + if ($next === false) { + // No conditions; parse error. + return; + } + + // Check the first expression. + if ($tokens[$next]['line'] !== ($tokens[$parenOpener]['line'] + 1)) { + $error = 'The first expression of a multi-line control structure must be on the line after the opening parenthesis'; + $fix = $phpcsFile->addFixableError($error, $next, 'FirstExpressionLine'); + if ($fix === true) { + $phpcsFile->fixer->addNewline($parenOpener); + } + } + + // Check the indent of each line. + $first = $phpcsFile->findFirstOnLine(T_WHITESPACE, $stackPtr, true); + $requiredIndent = ($tokens[$first]['column'] + $this->indent - 1); + for ($i = $parenOpener; $i < $parenCloser; $i++) { + if ($tokens[$i]['column'] !== 1 + || $tokens[($i + 1)]['line'] > $tokens[$i]['line'] + || isset(Tokens::$commentTokens[$tokens[$i]['code']]) === true + ) { + continue; + } + + if (($i + 1) === $parenCloser) { + break; + } + + // Leave indentation inside multi-line strings. + if (isset(Tokens::$textStringTokens[$tokens[$i]['code']]) === true + || isset(Tokens::$heredocTokens[$tokens[$i]['code']]) === true + ) { + continue; + } + + if ($tokens[$i]['code'] !== T_WHITESPACE) { + $foundIndent = 0; + } else { + $foundIndent = $tokens[$i]['length']; + } + + if ($foundIndent < $requiredIndent) { + $error = 'Each line in a multi-line control structure must be indented at least once; expected at least %s spaces, but found %s'; + $data = [ + $requiredIndent, + $foundIndent, + ]; + $fix = $phpcsFile->addFixableError($error, $i, 'LineIndent', $data); + if ($fix === true) { + $padding = str_repeat(' ', $requiredIndent); + if ($foundIndent === 0) { + $phpcsFile->fixer->addContentBefore($i, $padding); + } else { + $phpcsFile->fixer->replaceToken($i, $padding); + } + } + } + }//end for + + // Check the closing parenthesis. + $prev = $phpcsFile->findPrevious(T_WHITESPACE, ($parenCloser - 1), $parenOpener, true); + if ($tokens[$parenCloser]['line'] !== ($tokens[$prev]['line'] + 1)) { + $error = 'The closing parenthesis of a multi-line control structure must be on the line after the last expression'; + $fix = $phpcsFile->addFixableError($error, $parenCloser, 'CloseParenthesisLine'); + if ($fix === true) { + if ($tokens[$parenCloser]['line'] === $tokens[$prev]['line']) { + $phpcsFile->fixer->addNewlineBefore($parenCloser); + } else { + $phpcsFile->fixer->beginChangeset(); + for ($i = ($prev + 1); $i < $parenCloser; $i++) { + // Maintain existing newline. + if ($tokens[$i]['line'] === $tokens[$prev]['line']) { + continue; + } + + // Maintain existing indent. + if ($tokens[$i]['line'] === $tokens[$parenCloser]['line']) { + break; + } + + $phpcsFile->fixer->replaceToken($i, ''); + } + + $phpcsFile->fixer->endChangeset(); + } + }//end if + }//end if + + if ($tokens[$parenCloser]['line'] !== $tokens[$prev]['line']) { + $requiredIndent = ($tokens[$first]['column'] - 1); + $foundIndent = ($tokens[$parenCloser]['column'] - 1); + if ($foundIndent !== $requiredIndent) { + $error = 'The closing parenthesis of a multi-line control structure must be indented to the same level as start of the control structure; expected %s spaces but found %s'; + $data = [ + $requiredIndent, + $foundIndent, + ]; + $fix = $phpcsFile->addFixableError($error, $parenCloser, 'CloseParenthesisIndent', $data); + if ($fix === true) { + $padding = str_repeat(' ', $requiredIndent); + if ($foundIndent === 0) { + $phpcsFile->fixer->addContentBefore($parenCloser, $padding); + } else { + $phpcsFile->fixer->replaceToken(($parenCloser - 1), $padding); + } + } + } + } + + }//end process() + + +}//end class diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/PSR12/Sniffs/Files/DeclareStatementSniff.php b/vendor/squizlabs/php_codesniffer/src/Standards/PSR12/Sniffs/Files/DeclareStatementSniff.php new file mode 100644 index 00000000..67776c33 --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/PSR12/Sniffs/Files/DeclareStatementSniff.php @@ -0,0 +1,256 @@ + + * @copyright 2006-2019 Squiz Pty Ltd (ABN 77 084 670 600) + * @license https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence + */ + +namespace PHP_CodeSniffer\Standards\PSR12\Sniffs\Files; + +use PHP_CodeSniffer\Files\File; +use PHP_CodeSniffer\Sniffs\Sniff; +use PHP_CodeSniffer\Util\Tokens; + +class DeclareStatementSniff implements Sniff +{ + + + /** + * Returns an array of tokens this test wants to listen for. + * + * @return array + */ + public function register() + { + return [T_DECLARE]; + + }//end register() + + + /** + * Processes this sniff, when one of its tokens is encountered. + * + * @param \PHP_CodeSniffer\Files\File $phpcsFile The file being scanned. + * @param int $stackPtr The position of the current token in + * the stack passed in $tokens. + * + * @return void + */ + public function process(File $phpcsFile, $stackPtr) + { + // Allow a byte-order mark. + $tokens = $phpcsFile->getTokens(); + + // There should be no space between declare keyword and opening parenthesis. + $parenthesis = ($stackPtr + 1); + if ($tokens[($stackPtr + 1)]['type'] !== 'T_OPEN_PARENTHESIS') { + $parenthesis = $phpcsFile->findNext(T_WHITESPACE, ($stackPtr + 1), null, true); + $error = 'Expected no space between declare keyword and opening parenthesis in a declare statement'; + + if ($tokens[$parenthesis]['type'] === 'T_OPEN_PARENTHESIS') { + $fix = $phpcsFile->addFixableError($error, $stackPtr, 'SpaceFoundAfterDeclare'); + + if ($fix === true) { + $phpcsFile->fixer->replaceToken(($stackPtr + 1), ''); + } + } else { + $phpcsFile->addError($error, $parenthesis, 'SpaceFoundAfterDeclare'); + $parenthesis = $phpcsFile->findNext(T_OPEN_PARENTHESIS, ($parenthesis + 1)); + } + } + + // There should be no space between open parenthesis and the directive. + $string = $phpcsFile->findNext(T_WHITESPACE, ($parenthesis + 1), null, true); + if ($parenthesis !== false) { + if ($tokens[($parenthesis + 1)]['type'] !== 'T_STRING') { + $error = 'Expected no space between opening parenthesis and directive in a declare statement'; + + if ($tokens[$string]['type'] === 'T_STRING') { + $fix = $phpcsFile->addFixableError($error, $parenthesis, 'SpaceFoundBeforeDirective'); + + if ($fix === true) { + $phpcsFile->fixer->replaceToken(($parenthesis + 1), ''); + } + } else { + $phpcsFile->addError($error, $string, 'SpaceFoundBeforeDirective'); + $string = $phpcsFile->findNext(T_STRING, ($string + 1)); + } + } + } + + // There should be no space between directive and the equal sign. + $equals = $phpcsFile->findNext(T_WHITESPACE, ($string + 1), null, true); + if ($string !== false) { + // The directive must be in lowercase. + if ($tokens[$string]['content'] !== strtolower($tokens[$string]['content'])) { + $error = 'The directive of a declare statement must be in lowercase'; + $fix = $phpcsFile->addFixableError($error, $string, 'DirectiveNotLowercase'); + if ($fix === true) { + $phpcsFile->fixer->replaceToken($string, strtolower($tokens[$string]['content'])); + } + } + + if ($tokens[($string + 1)]['type'] !== 'T_EQUAL') { + $error = 'Expected no space between directive and the equals sign in a declare statement'; + + if ($tokens[$equals]['type'] === 'T_EQUAL') { + $fix = $phpcsFile->addFixableError($error, $equals, 'SpaceFoundAfterDirective'); + + if ($fix === true) { + $phpcsFile->fixer->replaceToken(($string + 1), ''); + } + } else { + $phpcsFile->addError($error, $equals, 'SpaceFoundAfterDirective'); + $equals = $phpcsFile->findNext(T_EQUAL, ($equals + 1)); + } + } + }//end if + + // There should be no space between equal sign and directive value. + $value = $phpcsFile->findNext(T_WHITESPACE, ($equals + 1), null, true); + if ($equals !== false) { + if ($tokens[($equals + 1)]['type'] !== 'T_LNUMBER') { + $error = 'Expected no space between equal sign and the directive value in a declare statement'; + + if ($tokens[$value]['type'] === 'T_LNUMBER') { + $fix = $phpcsFile->addFixableError($error, $value, 'SpaceFoundBeforeDirectiveValue'); + + if ($fix === true) { + $phpcsFile->fixer->replaceToken(($equals + 1), ''); + } + } else { + $phpcsFile->addError($error, $value, 'SpaceFoundBeforeDirectiveValue'); + $value = $phpcsFile->findNext(T_LNUMBER, ($value + 1)); + } + } + } + + $parenthesis = $phpcsFile->findNext(T_WHITESPACE, ($value + 1), null, true); + if ($value !== false) { + if ($tokens[($value + 1)]['type'] !== 'T_CLOSE_PARENTHESIS') { + $error = 'Expected no space between the directive value and closing parenthesis in a declare statement'; + + if ($tokens[$parenthesis]['type'] === 'T_CLOSE_PARENTHESIS') { + $fix = $phpcsFile->addFixableError($error, $parenthesis, 'SpaceFoundAfterDirectiveValue'); + + if ($fix === true) { + $phpcsFile->fixer->replaceToken(($value + 1), ''); + } + } else { + $phpcsFile->addError($error, $parenthesis, 'SpaceFoundAfterDirectiveValue'); + $parenthesis = $phpcsFile->findNext(T_CLOSE_PARENTHESIS, ($parenthesis + 1)); + } + } + } + + // Check for semicolon. + $curlyBracket = false; + if ($tokens[($parenthesis + 1)]['type'] !== 'T_SEMICOLON') { + $token = $phpcsFile->findNext(T_WHITESPACE, ($parenthesis + 1), null, true); + + if ($tokens[$token]['type'] === 'T_OPEN_CURLY_BRACKET') { + // Block declaration. + $curlyBracket = $token; + } else if ($tokens[$token]['type'] === 'T_SEMICOLON') { + $error = 'Expected no space between the closing parenthesis and the semicolon in a declare statement'; + $fix = $phpcsFile->addFixableError($error, $parenthesis, 'SpaceFoundBeforeSemicolon'); + if ($fix === true) { + $phpcsFile->fixer->replaceToken(($parenthesis + 1), ''); + } + } else if ($tokens[$token]['type'] === 'T_CLOSE_TAG') { + if ($tokens[($parenthesis)]['line'] !== $tokens[$token]['line']) { + // Close tag must be on the same line.. + $error = 'The close tag must be on the same line as the declare statement'; + $fix = $phpcsFile->addFixableError($error, $parenthesis, 'CloseTagOnNewLine'); + if ($fix === true) { + $phpcsFile->fixer->replaceToken(($parenthesis + 1), ' '); + } + } + } else { + $error = 'Expected no space between the closing parenthesis and the semicolon in a declare statement'; + $phpcsFile->addError($error, $parenthesis, 'SpaceFoundBeforeSemicolon'); + + // See if there is a semicolon or curly bracket after this token. + $token = $phpcsFile->findNext([T_WHITESPACE, T_COMMENT], ($token + 1), null, true); + if ($tokens[$token]['type'] === 'T_OPEN_CURLY_BRACKET') { + $curlyBracket = $token; + } + }//end if + }//end if + + if ($curlyBracket !== false) { + $prevToken = $phpcsFile->findPrevious(T_WHITESPACE, ($curlyBracket - 1), null, true); + $error = 'Expected one space between closing parenthesis and opening curly bracket in a declare statement'; + + // The opening curly bracket must on the same line with a single space between closing bracket. + if ($tokens[$prevToken]['type'] !== 'T_CLOSE_PARENTHESIS') { + $phpcsFile->addError($error, $curlyBracket, 'ExtraSpaceFoundAfterBracket'); + } else if ($phpcsFile->getTokensAsString(($prevToken + 1), ($curlyBracket - $prevToken - 1)) !== ' ') { + $fix = $phpcsFile->addFixableError($error, $curlyBracket, 'ExtraSpaceFoundAfterBracket'); + if ($fix === true) { + $phpcsFile->fixer->beginChangeset(); + $phpcsFile->fixer->replaceToken(($prevToken + 1), ' '); + $nextToken = ($prevToken + 2); + while ($nextToken !== $curlyBracket) { + $phpcsFile->fixer->replaceToken($nextToken, ''); + $nextToken++; + } + + $phpcsFile->fixer->endChangeset(); + } + }//end if + + $closeCurlyBracket = $tokens[$curlyBracket]['bracket_closer']; + + $prevToken = $phpcsFile->findPrevious(T_WHITESPACE, ($closeCurlyBracket - 1), null, true); + $nextToken = $phpcsFile->findNext([T_WHITESPACE, T_COMMENT], ($closeCurlyBracket + 1), null, true); + $line = $tokens[$closeCurlyBracket]['line']; + + // The closing curly bracket must be on a new line. + if ($tokens[$prevToken]['line'] === $line || $tokens[$nextToken]['line'] === $line) { + if ($tokens[$prevToken]['line'] === $line) { + $error = 'The closing curly bracket of a declare statement must be on a new line'; + $fix = $phpcsFile->addFixableError($error, $prevToken, 'CurlyBracketNotOnNewLine'); + if ($fix === true) { + $phpcsFile->fixer->addNewline($prevToken); + } + } + }//end if + + // Closing curly bracket must align with the declare keyword. + if ($tokens[$stackPtr]['column'] !== $tokens[$closeCurlyBracket]['column']) { + $error = 'The closing curly bracket of a declare statements must be aligned with the declare keyword'; + + $fix = $phpcsFile->addFixableError($error, $closeCurlyBracket, 'CloseBracketNotAligned'); + if ($fix === true) { + $phpcsFile->fixer->replaceToken(($closeCurlyBracket - 1), str_repeat(' ', ($tokens[$stackPtr]['column'] - 1))); + } + } + + // The open curly bracket must be the last code on the line. + $token = $phpcsFile->findNext(Tokens::$emptyTokens, ($curlyBracket + 1), null, true); + if ($tokens[$curlyBracket]['line'] === $tokens[$token]['line']) { + $error = 'The open curly bracket of a declare statement must be the last code on the line'; + $fix = $phpcsFile->addFixableError($error, $token, 'CodeFoundAfterCurlyBracket'); + + if ($fix === true) { + $phpcsFile->fixer->beginChangeset(); + $prevToken = $phpcsFile->findPrevious(T_WHITESPACE, ($token - 1), null, true); + + for ($i = ($prevToken + 1); $i < $token; $i++) { + $phpcsFile->fixer->replaceToken($i, ''); + } + + $phpcsFile->fixer->addNewLineBefore($token); + + $phpcsFile->fixer->endChangeset(); + } + } + }//end if + + }//end process() + + +}//end class diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/PSR12/Sniffs/Files/FileHeaderSniff.php b/vendor/squizlabs/php_codesniffer/src/Standards/PSR12/Sniffs/Files/FileHeaderSniff.php new file mode 100644 index 00000000..8a8255cf --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/PSR12/Sniffs/Files/FileHeaderSniff.php @@ -0,0 +1,428 @@ + + * @copyright 2006-2019 Squiz Pty Ltd (ABN 77 084 670 600) + * @license https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence + */ + +namespace PHP_CodeSniffer\Standards\PSR12\Sniffs\Files; + +use PHP_CodeSniffer\Files\File; +use PHP_CodeSniffer\Sniffs\Sniff; +use PHP_CodeSniffer\Util\Tokens; + +class FileHeaderSniff implements Sniff +{ + + + /** + * Returns an array of tokens this test wants to listen for. + * + * @return array + */ + public function register() + { + return [T_OPEN_TAG]; + + }//end register() + + + /** + * Processes this sniff when one of its tokens is encountered. + * + * @param \PHP_CodeSniffer\Files\File $phpcsFile The file being scanned. + * @param int $stackPtr The position of the current + * token in the stack. + * + * @return int|null + */ + public function process(File $phpcsFile, $stackPtr) + { + $tokens = $phpcsFile->getTokens(); + + $possibleHeaders = []; + + $searchFor = Tokens::$ooScopeTokens; + $searchFor[T_OPEN_TAG] = T_OPEN_TAG; + + $openTag = $stackPtr; + do { + $headerLines = $this->getHeaderLines($phpcsFile, $openTag); + if (empty($headerLines) === true && $openTag === $stackPtr) { + // No content in the file. + return; + } + + $possibleHeaders[$openTag] = $headerLines; + if (count($headerLines) > 1) { + break; + } + + $next = $phpcsFile->findNext($searchFor, ($openTag + 1)); + if (isset(Tokens::$ooScopeTokens[$tokens[$next]['code']]) === true) { + // Once we find an OO token, the file content has + // definitely started. + break; + } + + $openTag = $next; + } while ($openTag !== false); + + if ($openTag === false) { + // We never found a proper file header. + // If the file has multiple PHP open tags, we know + // that it must be a mix of PHP and HTML (or similar) + // so the header rules do not apply. + if (count($possibleHeaders) > 1) { + return $phpcsFile->numTokens; + } + + // There is only one possible header. + // If it is the first content in the file, it technically + // serves as the file header, and the open tag needs to + // have a newline after it. Otherwise, ignore it. + if ($stackPtr > 0) { + return $phpcsFile->numTokens; + } + + $openTag = $stackPtr; + } else if (count($possibleHeaders) > 1) { + // There are other PHP blocks before the file header. + $error = 'The file header must be the first content in the file'; + $phpcsFile->addError($error, $openTag, 'HeaderPosition'); + } else { + // The first possible header was the file header block, + // so make sure it is the first content in the file. + if ($openTag !== 0) { + // Allow for hashbang lines. + $hashbang = false; + if ($tokens[($openTag - 1)]['code'] === T_INLINE_HTML) { + $content = trim($tokens[($openTag - 1)]['content']); + if (substr($content, 0, 2) === '#!') { + $hashbang = true; + } + } + + if ($hashbang === false) { + $error = 'The file header must be the first content in the file'; + $phpcsFile->addError($error, $openTag, 'HeaderPosition'); + } + } + }//end if + + $this->processHeaderLines($phpcsFile, $possibleHeaders[$openTag]); + + return $phpcsFile->numTokens; + + }//end process() + + + /** + * Gather information about the statements inside a possible file header. + * + * @param \PHP_CodeSniffer\Files\File $phpcsFile The file being scanned. + * @param int $stackPtr The position of the current + * token in the stack. + * + * @return array + */ + public function getHeaderLines(File $phpcsFile, $stackPtr) + { + $tokens = $phpcsFile->getTokens(); + + $next = $phpcsFile->findNext(T_WHITESPACE, ($stackPtr + 1), null, true); + if ($next === false) { + return []; + } + + $headerLines = []; + $headerLines[] = [ + 'type' => 'tag', + 'start' => $stackPtr, + 'end' => $stackPtr, + ]; + + $foundDocblock = false; + + $commentOpeners = Tokens::$scopeOpeners; + unset($commentOpeners[T_NAMESPACE]); + unset($commentOpeners[T_DECLARE]); + unset($commentOpeners[T_USE]); + unset($commentOpeners[T_IF]); + unset($commentOpeners[T_WHILE]); + unset($commentOpeners[T_FOR]); + unset($commentOpeners[T_FOREACH]); + unset($commentOpeners[T_DO]); + unset($commentOpeners[T_TRY]); + + do { + switch ($tokens[$next]['code']) { + case T_DOC_COMMENT_OPEN_TAG: + if ($foundDocblock === true) { + // Found a second docblock, so start of code. + break(2); + } + + // Make sure this is not a code-level docblock. + $end = $tokens[$next]['comment_closer']; + for ($docToken = ($end + 1); $docToken < $phpcsFile->numTokens; $docToken++) { + if (isset(Tokens::$emptyTokens[$tokens[$docToken]['code']]) === true) { + continue; + } + + if ($tokens[$docToken]['code'] === T_ATTRIBUTE + && isset($tokens[$docToken]['attribute_closer']) === true + ) { + $docToken = $tokens[$docToken]['attribute_closer']; + continue; + } + + break; + } + + if ($docToken === $phpcsFile->numTokens) { + $docToken--; + } + + if (isset($commentOpeners[$tokens[$docToken]['code']]) === false + && isset(Tokens::$methodPrefixes[$tokens[$docToken]['code']]) === false + ) { + // Check for an @var annotation. + $annotation = false; + for ($i = $next; $i < $end; $i++) { + if ($tokens[$i]['code'] === T_DOC_COMMENT_TAG + && strtolower($tokens[$i]['content']) === '@var' + ) { + $annotation = true; + break; + } + } + + if ($annotation === false) { + $foundDocblock = true; + $headerLines[] = [ + 'type' => 'docblock', + 'start' => $next, + 'end' => $end, + ]; + } + }//end if + + $next = $end; + break; + case T_DECLARE: + case T_NAMESPACE: + if (isset($tokens[$next]['scope_opener']) === true) { + // If this statement is using bracketed syntax, it doesn't + // apply to the entire files and so is not part of header. + // The header has now ended and the main code block begins. + break(2); + } + + $end = $phpcsFile->findEndOfStatement($next); + + $headerLines[] = [ + 'type' => substr(strtolower($tokens[$next]['type']), 2), + 'start' => $next, + 'end' => $end, + ]; + + $next = $end; + break; + case T_USE: + $type = 'use'; + $useType = $phpcsFile->findNext(Tokens::$emptyTokens, ($next + 1), null, true); + if ($useType !== false && $tokens[$useType]['code'] === T_STRING) { + $content = strtolower($tokens[$useType]['content']); + if ($content === 'function' || $content === 'const') { + $type .= ' '.$content; + } + } + + $end = $phpcsFile->findEndOfStatement($next); + + $headerLines[] = [ + 'type' => $type, + 'start' => $next, + 'end' => $end, + ]; + + $next = $end; + break; + default: + // Skip comments as PSR-12 doesn't say if these are allowed or not. + if (isset(Tokens::$commentTokens[$tokens[$next]['code']]) === true) { + $next = $phpcsFile->findNext(Tokens::$commentTokens, ($next + 1), null, true); + if ($next === false) { + // We reached the end of the file. + break(2); + } + + $next--; + break; + } + + // We found the start of the main code block. + break(2); + }//end switch + + $next = $phpcsFile->findNext(T_WHITESPACE, ($next + 1), null, true); + } while ($next !== false); + + return $headerLines; + + }//end getHeaderLines() + + + /** + * Check the spacing and grouping of the statements inside each header block. + * + * @param \PHP_CodeSniffer\Files\File $phpcsFile The file being scanned. + * @param array $headerLines Header information, as sourced + * from getHeaderLines(). + * + * @return int|null + */ + public function processHeaderLines(File $phpcsFile, $headerLines) + { + $tokens = $phpcsFile->getTokens(); + + $found = []; + + foreach ($headerLines as $i => $line) { + if (isset($headerLines[($i + 1)]) === false + || $headerLines[($i + 1)]['type'] !== $line['type'] + ) { + // We're at the end of the current header block. + // Make sure there is a single blank line after + // this block. + $next = $phpcsFile->findNext(T_WHITESPACE, ($line['end'] + 1), null, true); + if ($next !== false && $tokens[$next]['line'] !== ($tokens[$line['end']]['line'] + 2)) { + $error = 'Header blocks must be separated by a single blank line'; + $fix = $phpcsFile->addFixableError($error, $line['end'], 'SpacingAfterBlock'); + if ($fix === true) { + if ($tokens[$next]['line'] === $tokens[$line['end']]['line']) { + $phpcsFile->fixer->addContentBefore($next, $phpcsFile->eolChar.$phpcsFile->eolChar); + } else if ($tokens[$next]['line'] === ($tokens[$line['end']]['line'] + 1)) { + $phpcsFile->fixer->addNewline($line['end']); + } else { + $phpcsFile->fixer->beginChangeset(); + for ($i = ($line['end'] + 1); $i < $next; $i++) { + if ($tokens[$i]['line'] === ($tokens[$line['end']]['line'] + 2)) { + break; + } + + $phpcsFile->fixer->replaceToken($i, ''); + } + + $phpcsFile->fixer->endChangeset(); + } + }//end if + }//end if + + // Make sure we haven't seen this next block before. + if (isset($headerLines[($i + 1)]) === true + && isset($found[$headerLines[($i + 1)]['type']]) === true + ) { + $error = 'Similar statements must be grouped together inside header blocks; '; + $error .= 'the first "%s" statement was found on line %s'; + $data = [ + $headerLines[($i + 1)]['type'], + $tokens[$found[$headerLines[($i + 1)]['type']]['start']]['line'], + ]; + $phpcsFile->addError($error, $headerLines[($i + 1)]['start'], 'IncorrectGrouping', $data); + } + } else if ($headerLines[($i + 1)]['type'] === $line['type']) { + // Still in the same block, so make sure there is no + // blank line after this statement. + $next = $phpcsFile->findNext(T_WHITESPACE, ($line['end'] + 1), null, true); + if ($tokens[$next]['line'] > ($tokens[$line['end']]['line'] + 1)) { + $error = 'Header blocks must not contain blank lines'; + $fix = $phpcsFile->addFixableError($error, $line['end'], 'SpacingInsideBlock'); + if ($fix === true) { + $phpcsFile->fixer->beginChangeset(); + for ($i = ($line['end'] + 1); $i < $next; $i++) { + if ($tokens[$i]['line'] === $tokens[$line['end']]['line']) { + continue; + } + + if ($tokens[$i]['line'] === $tokens[$next]['line']) { + break; + } + + $phpcsFile->fixer->replaceToken($i, ''); + } + + $phpcsFile->fixer->endChangeset(); + } + } + }//end if + + if (isset($found[$line['type']]) === false) { + $found[$line['type']] = $line; + } + }//end foreach + + /* + Next, check that the order of the header blocks + is correct: + Opening php tag. + File-level docblock. + One or more declare statements. + The namespace declaration of the file. + One or more class-based use import statements. + One or more function-based use import statements. + One or more constant-based use import statements. + */ + + $blockOrder = [ + 'tag' => 'opening PHP tag', + 'docblock' => 'file-level docblock', + 'declare' => 'declare statements', + 'namespace' => 'namespace declaration', + 'use' => 'class-based use imports', + 'use function' => 'function-based use imports', + 'use const' => 'constant-based use imports', + ]; + + foreach (array_keys($found) as $type) { + if ($type === 'tag') { + // The opening tag is always in the correct spot. + continue; + } + + do { + $orderedType = next($blockOrder); + } while ($orderedType !== false && key($blockOrder) !== $type); + + if ($orderedType === false) { + // We didn't find the block type in the rest of the + // ordered array, so it is out of place. + // Error and reset the array to the correct position + // so we can check the next block. + reset($blockOrder); + $prevValidType = 'tag'; + do { + $orderedType = next($blockOrder); + if (isset($found[key($blockOrder)]) === true + && key($blockOrder) !== $type + ) { + $prevValidType = key($blockOrder); + } + } while ($orderedType !== false && key($blockOrder) !== $type); + + $error = 'The %s must follow the %s in the file header'; + $data = [ + $blockOrder[$type], + $blockOrder[$prevValidType], + ]; + $phpcsFile->addError($error, $found[$type]['start'], 'IncorrectOrder', $data); + }//end if + }//end foreach + + }//end processHeaderLines() + + +}//end class diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/PSR12/Sniffs/Files/ImportStatementSniff.php b/vendor/squizlabs/php_codesniffer/src/Standards/PSR12/Sniffs/Files/ImportStatementSniff.php new file mode 100644 index 00000000..176aef00 --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/PSR12/Sniffs/Files/ImportStatementSniff.php @@ -0,0 +1,77 @@ + + * @copyright 2006-2015 Squiz Pty Ltd (ABN 77 084 670 600) + * @license https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence + */ + +namespace PHP_CodeSniffer\Standards\PSR12\Sniffs\Files; + +use PHP_CodeSniffer\Files\File; +use PHP_CodeSniffer\Sniffs\Sniff; +use PHP_CodeSniffer\Util\Tokens; + +class ImportStatementSniff implements Sniff +{ + + + /** + * Returns an array of tokens this test wants to listen for. + * + * @return array + */ + public function register() + { + return [T_USE]; + + }//end register() + + + /** + * Processes this test, when one of its tokens is encountered. + * + * @param \PHP_CodeSniffer\Files\File $phpcsFile The file being scanned. + * @param int $stackPtr The position of the current token in the + * stack passed in $tokens. + * + * @return void + */ + public function process(File $phpcsFile, $stackPtr) + { + $tokens = $phpcsFile->getTokens(); + + // Make sure this is not a closure USE group. + $next = $phpcsFile->findNext(Tokens::$emptyTokens, ($stackPtr + 1), null, true); + if ($tokens[$next]['code'] === T_OPEN_PARENTHESIS) { + return; + } + + if ($phpcsFile->hasCondition($stackPtr, Tokens::$ooScopeTokens) === true) { + // This rule only applies to import statements. + return; + } + + if ($tokens[$next]['code'] === T_STRING + && (strtolower($tokens[$next]['content']) === 'function' + || strtolower($tokens[$next]['content']) === 'const') + ) { + $next = $phpcsFile->findNext(Tokens::$emptyTokens, ($next + 1), null, true); + } + + if ($tokens[$next]['code'] !== T_NS_SEPARATOR) { + return; + } + + $error = 'Import statements must not begin with a leading backslash'; + $fix = $phpcsFile->addFixableError($error, $next, 'LeadingSlash'); + + if ($fix === true) { + $phpcsFile->fixer->replaceToken($next, ''); + } + + }//end process() + + +}//end class diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/PSR12/Sniffs/Files/OpenTagSniff.php b/vendor/squizlabs/php_codesniffer/src/Standards/PSR12/Sniffs/Files/OpenTagSniff.php new file mode 100644 index 00000000..4371bee1 --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/PSR12/Sniffs/Files/OpenTagSniff.php @@ -0,0 +1,73 @@ + + * @copyright 2006-2019 Squiz Pty Ltd (ABN 77 084 670 600) + * @license https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence + */ + +namespace PHP_CodeSniffer\Standards\PSR12\Sniffs\Files; + +use PHP_CodeSniffer\Files\File; +use PHP_CodeSniffer\Sniffs\Sniff; + +class OpenTagSniff implements Sniff +{ + + + /** + * Returns an array of tokens this test wants to listen for. + * + * @return array + */ + public function register() + { + return [T_OPEN_TAG]; + + }//end register() + + + /** + * Processes this sniff when one of its tokens is encountered. + * + * @param \PHP_CodeSniffer\Files\File $phpcsFile The file being scanned. + * @param int $stackPtr The position of the current + * token in the stack. + * + * @return int + */ + public function process(File $phpcsFile, $stackPtr) + { + if ($stackPtr !== 0) { + // This rule only applies if the open tag is on the first line of the file. + return $phpcsFile->numTokens; + } + + $next = $phpcsFile->findNext(T_INLINE_HTML, 0); + if ($next !== false) { + // This rule only applies to PHP-only files. + return $phpcsFile->numTokens; + } + + $tokens = $phpcsFile->getTokens(); + $next = $phpcsFile->findNext(T_WHITESPACE, ($stackPtr + 1), null, true); + if ($next === false) { + // Empty file. + return; + } + + if ($tokens[$next]['line'] === $tokens[$stackPtr]['line']) { + $error = 'Opening PHP tag must be on a line by itself'; + $fix = $phpcsFile->addFixableError($error, $stackPtr, 'NotAlone'); + if ($fix === true) { + $phpcsFile->fixer->addNewline($stackPtr); + } + } + + return $phpcsFile->numTokens; + + }//end process() + + +}//end class diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/PSR12/Sniffs/Functions/NullableTypeDeclarationSniff.php b/vendor/squizlabs/php_codesniffer/src/Standards/PSR12/Sniffs/Functions/NullableTypeDeclarationSniff.php new file mode 100644 index 00000000..8d907343 --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/PSR12/Sniffs/Functions/NullableTypeDeclarationSniff.php @@ -0,0 +1,91 @@ + + * @copyright 2006-2018 Squiz Pty Ltd (ABN 77 084 670 600) + * @license https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence + */ + +namespace PHP_CodeSniffer\Standards\PSR12\Sniffs\Functions; + +use PHP_CodeSniffer\Files\File; +use PHP_CodeSniffer\Sniffs\Sniff; + +class NullableTypeDeclarationSniff implements Sniff +{ + + /** + * An array of valid tokens after `T_NULLABLE` occurrences. + * + * @var array + */ + private $validTokens = [ + T_STRING => true, + T_NS_SEPARATOR => true, + T_CALLABLE => true, + T_SELF => true, + T_PARENT => true, + T_STATIC => true, + ]; + + + /** + * Returns an array of tokens this test wants to listen for. + * + * @return array + */ + public function register() + { + return [T_NULLABLE]; + + }//end register() + + + /** + * Processes this test, when one of its tokens is encountered. + * + * @param \PHP_CodeSniffer\Files\File $phpcsFile The file being scanned. + * @param int $stackPtr The position of the current token in the + * stack passed in $tokens. + * + * @return void + */ + public function process(File $phpcsFile, $stackPtr) + { + $nextNonEmptyPtr = $phpcsFile->findNext([T_WHITESPACE], ($stackPtr + 1), null, true); + if ($nextNonEmptyPtr === false) { + // Parse error or live coding. + return; + } + + $tokens = $phpcsFile->getTokens(); + $nextNonEmptyCode = $tokens[$nextNonEmptyPtr]['code']; + $validTokenFound = isset($this->validTokens[$nextNonEmptyCode]); + + if ($validTokenFound === true && $nextNonEmptyPtr === ($stackPtr + 1)) { + // Valid structure. + return; + } + + $error = 'There must not be a space between the question mark and the type in nullable type declarations'; + + if ($validTokenFound === true) { + // No other tokens then whitespace tokens found; fixable. + $fix = $phpcsFile->addFixableError($error, $stackPtr, 'WhitespaceFound'); + if ($fix === true) { + for ($i = ($stackPtr + 1); $i < $nextNonEmptyPtr; $i++) { + $phpcsFile->fixer->replaceToken($i, ''); + } + } + + return; + } + + // Non-whitespace tokens found; trigger error but don't fix. + $phpcsFile->addError($error, $stackPtr, 'UnexpectedCharactersFound'); + + }//end process() + + +}//end class diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/PSR12/Sniffs/Functions/ReturnTypeDeclarationSniff.php b/vendor/squizlabs/php_codesniffer/src/Standards/PSR12/Sniffs/Functions/ReturnTypeDeclarationSniff.php new file mode 100644 index 00000000..14d91e2e --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/PSR12/Sniffs/Functions/ReturnTypeDeclarationSniff.php @@ -0,0 +1,110 @@ + + * @copyright 2006-2019 Squiz Pty Ltd (ABN 77 084 670 600) + * @license https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence + */ + +namespace PHP_CodeSniffer\Standards\PSR12\Sniffs\Functions; + +use PHP_CodeSniffer\Files\File; +use PHP_CodeSniffer\Sniffs\Sniff; + +class ReturnTypeDeclarationSniff implements Sniff +{ + + + /** + * Returns an array of tokens this test wants to listen for. + * + * @return array + */ + public function register() + { + return [ + T_FUNCTION, + T_CLOSURE, + T_FN, + ]; + + }//end register() + + + /** + * Processes this test when one of its tokens is encountered. + * + * @param \PHP_CodeSniffer\Files\File $phpcsFile The file being scanned. + * @param int $stackPtr The position of the current token + * in the stack passed in $tokens. + * + * @return void + */ + public function process(File $phpcsFile, $stackPtr) + { + $tokens = $phpcsFile->getTokens(); + + if (isset($tokens[$stackPtr]['parenthesis_opener']) === false + || isset($tokens[$stackPtr]['parenthesis_closer']) === false + || $tokens[$stackPtr]['parenthesis_opener'] === null + || $tokens[$stackPtr]['parenthesis_closer'] === null + ) { + return; + } + + $methodProperties = $phpcsFile->getMethodProperties($stackPtr); + if ($methodProperties['return_type'] === '') { + return; + } + + $returnType = $methodProperties['return_type_token']; + if ($methodProperties['nullable_return_type'] === true) { + $returnType = $phpcsFile->findPrevious(T_NULLABLE, ($returnType - 1)); + } + + if ($tokens[($returnType - 1)]['code'] !== T_WHITESPACE + || $tokens[($returnType - 1)]['content'] !== ' ' + || $tokens[($returnType - 2)]['code'] !== T_COLON + ) { + $error = 'There must be a single space between the colon and type in a return type declaration'; + if ($tokens[($returnType - 1)]['code'] === T_WHITESPACE + && $tokens[($returnType - 2)]['code'] === T_COLON + ) { + $fix = $phpcsFile->addFixableError($error, $returnType, 'SpaceBeforeReturnType'); + if ($fix === true) { + $phpcsFile->fixer->replaceToken(($returnType - 1), ' '); + } + } else if ($tokens[($returnType - 1)]['code'] === T_COLON) { + $fix = $phpcsFile->addFixableError($error, $returnType, 'SpaceBeforeReturnType'); + if ($fix === true) { + $phpcsFile->fixer->addContentBefore($returnType, ' '); + } + } else { + $phpcsFile->addError($error, $returnType, 'SpaceBeforeReturnType'); + } + } + + $colon = $phpcsFile->findPrevious(T_COLON, $returnType); + if ($tokens[($colon - 1)]['code'] !== T_CLOSE_PARENTHESIS) { + $error = 'There must not be a space before the colon in a return type declaration'; + $prev = $phpcsFile->findPrevious(T_WHITESPACE, ($colon - 1), null, true); + if ($tokens[$prev]['code'] === T_CLOSE_PARENTHESIS) { + $fix = $phpcsFile->addFixableError($error, $colon, 'SpaceBeforeColon'); + if ($fix === true) { + $phpcsFile->fixer->beginChangeset(); + for ($x = ($prev + 1); $x < $colon; $x++) { + $phpcsFile->fixer->replaceToken($x, ''); + } + + $phpcsFile->fixer->endChangeset(); + } + } else { + $phpcsFile->addError($error, $colon, 'SpaceBeforeColon'); + } + } + + }//end process() + + +}//end class diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/PSR12/Sniffs/Keywords/ShortFormTypeKeywordsSniff.php b/vendor/squizlabs/php_codesniffer/src/Standards/PSR12/Sniffs/Keywords/ShortFormTypeKeywordsSniff.php new file mode 100644 index 00000000..adf04d90 --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/PSR12/Sniffs/Keywords/ShortFormTypeKeywordsSniff.php @@ -0,0 +1,75 @@ + + * @copyright 2006-2015 Squiz Pty Ltd (ABN 77 084 670 600) + * @license https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence + */ + +namespace PHP_CodeSniffer\Standards\PSR12\Sniffs\Keywords; + +use PHP_CodeSniffer\Files\File; +use PHP_CodeSniffer\Sniffs\Sniff; + +class ShortFormTypeKeywordsSniff implements Sniff +{ + + + /** + * Returns an array of tokens this test wants to listen for. + * + * @return array + */ + public function register() + { + return [ + T_BOOL_CAST, + T_INT_CAST, + ]; + + }//end register() + + + /** + * Processes this test, when one of its tokens is encountered. + * + * @param \PHP_CodeSniffer\Files\File $phpcsFile The file being scanned. + * @param int $stackPtr The position of the current token in the + * stack passed in $tokens. + * + * @return void + */ + public function process(File $phpcsFile, $stackPtr) + { + $tokens = $phpcsFile->getTokens(); + $typecast = str_replace(' ', '', $tokens[$stackPtr]['content']); + $typecast = str_replace("\t", '', $typecast); + $typecast = trim($typecast, '()'); + $typecastLc = strtolower($typecast); + + if (($tokens[$stackPtr]['code'] === T_BOOL_CAST + && $typecastLc === 'bool') + || ($tokens[$stackPtr]['code'] === T_INT_CAST + && $typecastLc === 'int') + ) { + return; + } + + $error = 'Short form type keywords must be used. Found: %s'; + $data = [$tokens[$stackPtr]['content']]; + $fix = $phpcsFile->addFixableError($error, $stackPtr, 'LongFound', $data); + if ($fix === true) { + if ($tokens[$stackPtr]['code'] === T_BOOL_CAST) { + $replacement = str_replace($typecast, 'bool', $tokens[$stackPtr]['content']); + } else { + $replacement = str_replace($typecast, 'int', $tokens[$stackPtr]['content']); + } + + $phpcsFile->fixer->replaceToken($stackPtr, $replacement); + } + + }//end process() + + +}//end class diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/PSR12/Sniffs/Namespaces/CompoundNamespaceDepthSniff.php b/vendor/squizlabs/php_codesniffer/src/Standards/PSR12/Sniffs/Namespaces/CompoundNamespaceDepthSniff.php new file mode 100644 index 00000000..725fbde3 --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/PSR12/Sniffs/Namespaces/CompoundNamespaceDepthSniff.php @@ -0,0 +1,80 @@ + + * @copyright 2006-2015 Squiz Pty Ltd (ABN 77 084 670 600) + * @license https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence + */ + +namespace PHP_CodeSniffer\Standards\PSR12\Sniffs\Namespaces; + +use PHP_CodeSniffer\Files\File; +use PHP_CodeSniffer\Sniffs\Sniff; + +class CompoundNamespaceDepthSniff implements Sniff +{ + + /** + * The max depth for compound namespaces. + * + * @var integer + */ + public $maxDepth = 2; + + + /** + * Returns an array of tokens this test wants to listen for. + * + * @return array + */ + public function register() + { + return [T_OPEN_USE_GROUP]; + + }//end register() + + + /** + * Processes this test, when one of its tokens is encountered. + * + * @param \PHP_CodeSniffer\Files\File $phpcsFile The file being scanned. + * @param int $stackPtr The position of the current token in the + * stack passed in $tokens. + * + * @return void + */ + public function process(File $phpcsFile, $stackPtr) + { + $this->maxDepth = (int) $this->maxDepth; + + $tokens = $phpcsFile->getTokens(); + + $end = $phpcsFile->findNext(T_CLOSE_USE_GROUP, ($stackPtr + 1)); + if ($end === false) { + return; + } + + $depth = 1; + for ($i = ($stackPtr + 1); $i <= $end; $i++) { + if ($tokens[$i]['code'] === T_NS_SEPARATOR) { + $depth++; + continue; + } + + if ($i === $end || $tokens[$i]['code'] === T_COMMA) { + // End of a namespace. + if ($depth > $this->maxDepth) { + $error = 'Compound namespaces cannot have a depth more than %s'; + $data = [$this->maxDepth]; + $phpcsFile->addError($error, $i, 'TooDeep', $data); + } + + $depth = 1; + } + } + + }//end process() + + +}//end class diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/PSR12/Sniffs/Operators/OperatorSpacingSniff.php b/vendor/squizlabs/php_codesniffer/src/Standards/PSR12/Sniffs/Operators/OperatorSpacingSniff.php new file mode 100644 index 00000000..8757e05a --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/PSR12/Sniffs/Operators/OperatorSpacingSniff.php @@ -0,0 +1,112 @@ + + * @copyright 2006-2015 Squiz Pty Ltd (ABN 77 084 670 600) + * @license https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence + */ + +namespace PHP_CodeSniffer\Standards\PSR12\Sniffs\Operators; + +use PHP_CodeSniffer\Files\File; +use PHP_CodeSniffer\Standards\Squiz\Sniffs\WhiteSpace\OperatorSpacingSniff as SquizOperatorSpacingSniff; +use PHP_CodeSniffer\Util\Tokens; + +class OperatorSpacingSniff extends SquizOperatorSpacingSniff +{ + + + /** + * Returns an array of tokens this test wants to listen for. + * + * @return array + */ + public function register() + { + parent::register(); + + $targets = Tokens::$comparisonTokens; + $targets += Tokens::$operators; + $targets += Tokens::$assignmentTokens; + $targets += Tokens::$booleanOperators; + $targets[] = T_INLINE_THEN; + $targets[] = T_INLINE_ELSE; + $targets[] = T_STRING_CONCAT; + $targets[] = T_INSTANCEOF; + + return $targets; + + }//end register() + + + /** + * Processes this sniff, when one of its tokens is encountered. + * + * @param \PHP_CodeSniffer\Files\File $phpcsFile The current file being checked. + * @param int $stackPtr The position of the current token in + * the stack passed in $tokens. + * + * @return void + */ + public function process(File $phpcsFile, $stackPtr) + { + $tokens = $phpcsFile->getTokens(); + + if ($this->isOperator($phpcsFile, $stackPtr) === false) { + return; + } + + $operator = $tokens[$stackPtr]['content']; + + $checkBefore = true; + $checkAfter = true; + + // Skip short ternary. + if ($tokens[($stackPtr)]['code'] === T_INLINE_ELSE + && $tokens[($stackPtr - 1)]['code'] === T_INLINE_THEN + ) { + $checkBefore = false; + } + + // Skip operator with comment on previous line. + if ($tokens[($stackPtr - 1)]['code'] === T_COMMENT + && $tokens[($stackPtr - 1)]['line'] < $tokens[$stackPtr]['line'] + ) { + $checkBefore = false; + } + + if (isset($tokens[($stackPtr + 1)]) === true) { + // Skip short ternary. + if ($tokens[$stackPtr]['code'] === T_INLINE_THEN + && $tokens[($stackPtr + 1)]['code'] === T_INLINE_ELSE + ) { + $checkAfter = false; + } + } else { + // Skip partial files. + $checkAfter = false; + } + + if ($checkBefore === true && $tokens[($stackPtr - 1)]['code'] !== T_WHITESPACE) { + $error = 'Expected at least 1 space before "%s"; 0 found'; + $data = [$operator]; + $fix = $phpcsFile->addFixableError($error, $stackPtr, 'NoSpaceBefore', $data); + if ($fix === true) { + $phpcsFile->fixer->addContentBefore($stackPtr, ' '); + } + } + + if ($checkAfter === true && $tokens[($stackPtr + 1)]['code'] !== T_WHITESPACE) { + $error = 'Expected at least 1 space after "%s"; 0 found'; + $data = [$operator]; + $fix = $phpcsFile->addFixableError($error, $stackPtr, 'NoSpaceAfter', $data); + if ($fix === true) { + $phpcsFile->fixer->addContent($stackPtr, ' '); + } + } + + }//end process() + + +}//end class diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/PSR12/Sniffs/Properties/ConstantVisibilitySniff.php b/vendor/squizlabs/php_codesniffer/src/Standards/PSR12/Sniffs/Properties/ConstantVisibilitySniff.php new file mode 100644 index 00000000..8a1000f7 --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/PSR12/Sniffs/Properties/ConstantVisibilitySniff.php @@ -0,0 +1,61 @@ + + * @copyright 2006-2019 Squiz Pty Ltd (ABN 77 084 670 600) + * @license https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence + */ + +namespace PHP_CodeSniffer\Standards\PSR12\Sniffs\Properties; + +use PHP_CodeSniffer\Files\File; +use PHP_CodeSniffer\Sniffs\Sniff; +use PHP_CodeSniffer\Util\Tokens; + +class ConstantVisibilitySniff implements Sniff +{ + + + /** + * Returns an array of tokens this test wants to listen for. + * + * @return array + */ + public function register() + { + return [T_CONST]; + + }//end register() + + + /** + * Processes this test, when one of its tokens is encountered. + * + * @param \PHP_CodeSniffer\Files\File $phpcsFile The file being scanned. + * @param int $stackPtr The position of the current token in the + * stack passed in $tokens. + * + * @return void + */ + public function process(File $phpcsFile, $stackPtr) + { + $tokens = $phpcsFile->getTokens(); + + // Make sure this is a class constant. + if ($phpcsFile->hasCondition($stackPtr, Tokens::$ooScopeTokens) === false) { + return; + } + + $prev = $phpcsFile->findPrevious(Tokens::$emptyTokens, ($stackPtr - 1), null, true); + if (isset(Tokens::$scopeModifiers[$tokens[$prev]['code']]) === true) { + return; + } + + $error = 'Visibility must be declared on all constants if your project supports PHP 7.1 or later'; + $phpcsFile->addWarning($error, $stackPtr, 'NotFound'); + + }//end process() + + +}//end class diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/PSR12/Sniffs/Traits/UseDeclarationSniff.php b/vendor/squizlabs/php_codesniffer/src/Standards/PSR12/Sniffs/Traits/UseDeclarationSniff.php new file mode 100644 index 00000000..113e8b9f --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/PSR12/Sniffs/Traits/UseDeclarationSniff.php @@ -0,0 +1,700 @@ + + * @copyright 2006-2015 Squiz Pty Ltd (ABN 77 084 670 600) + * @license https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence + */ + +namespace PHP_CodeSniffer\Standards\PSR12\Sniffs\Traits; + +use PHP_CodeSniffer\Files\File; +use PHP_CodeSniffer\Sniffs\Sniff; +use PHP_CodeSniffer\Util\Tokens; + +class UseDeclarationSniff implements Sniff +{ + + + /** + * Returns an array of tokens this test wants to listen for. + * + * @return array + */ + public function register() + { + return [T_USE]; + + }//end register() + + + /** + * Processes this test, when one of its tokens is encountered. + * + * @param \PHP_CodeSniffer\Files\File $phpcsFile The file being scanned. + * @param int $stackPtr The position of the current token in the + * stack passed in $tokens. + * + * @return void + */ + public function process(File $phpcsFile, $stackPtr) + { + $tokens = $phpcsFile->getTokens(); + + // Needs to be a use statement directly inside a class. + $conditions = $tokens[$stackPtr]['conditions']; + end($conditions); + if (isset(Tokens::$ooScopeTokens[current($conditions)]) === false) { + return; + } + + $ooToken = key($conditions); + $opener = $tokens[$ooToken]['scope_opener']; + + // Figure out where all the use statements are. + $useTokens = [$stackPtr]; + for ($i = ($stackPtr + 1); $i < $tokens[$ooToken]['scope_closer']; $i++) { + if ($tokens[$i]['code'] === T_USE) { + $useTokens[] = $i; + } + + if (isset($tokens[$i]['scope_closer']) === true) { + $i = $tokens[$i]['scope_closer']; + } + } + + $numUseTokens = count($useTokens); + foreach ($useTokens as $usePos => $useToken) { + if ($usePos === 0) { + /* + This is the first use statement. + */ + + // The first non-comment line must be the use line. + $lastValidContent = $useToken; + for ($i = ($useToken - 1); $i > $opener; $i--) { + if ($tokens[$i]['code'] === T_WHITESPACE + && ($tokens[($i - 1)]['line'] === $tokens[$i]['line'] + || $tokens[($i + 1)]['line'] === $tokens[$i]['line']) + ) { + continue; + } + + if (isset(Tokens::$commentTokens[$tokens[$i]['code']]) === true) { + if ($tokens[$i]['code'] === T_DOC_COMMENT_CLOSE_TAG) { + // Skip past the comment. + $i = $tokens[$i]['comment_opener']; + } + + $lastValidContent = $i; + + continue; + } + + break; + }//end for + + if ($tokens[$lastValidContent]['line'] !== ($tokens[$opener]['line'] + 1)) { + $error = 'The first trait import statement must be declared on the first non-comment line after the %s opening brace'; + $data = [strtolower($tokens[$ooToken]['content'])]; + + // Figure out if we can fix this error. + $prev = $phpcsFile->findPrevious(Tokens::$emptyTokens, ($useToken - 1), ($opener - 1), true); + if ($tokens[$prev]['line'] === $tokens[$opener]['line']) { + $fix = $phpcsFile->addFixableError($error, $useToken, 'UseAfterBrace', $data); + if ($fix === true) { + // We know that the USE statements is the first non-comment content + // in the class, so we just need to remove blank lines. + $phpcsFile->fixer->beginChangeset(); + for ($i = ($useToken - 1); $i > $opener; $i--) { + if ($tokens[$i]['line'] === $tokens[$opener]['line']) { + break; + } + + if ($tokens[$i]['line'] === $tokens[$useToken]['line']) { + continue; + } + + if ($tokens[$i]['code'] === T_WHITESPACE + && $tokens[($i - 1)]['line'] !== $tokens[$i]['line'] + && $tokens[($i + 1)]['line'] !== $tokens[$i]['line'] + ) { + $phpcsFile->fixer->replaceToken($i, ''); + } + + if (isset(Tokens::$commentTokens[$tokens[$i]['code']]) === true) { + if ($tokens[$i]['code'] === T_DOC_COMMENT_CLOSE_TAG) { + // Skip past the comment. + $i = $tokens[$i]['comment_opener']; + } + + $lastValidContent = $i; + } + }//end for + + $phpcsFile->fixer->endChangeset(); + }//end if + } else { + $phpcsFile->addError($error, $useToken, 'UseAfterBrace', $data); + }//end if + }//end if + } else { + // Make sure this use statement is not on the same line as the previous one. + $prev = $phpcsFile->findPrevious(Tokens::$emptyTokens, ($useToken - 1), null, true); + if ($prev !== false && $tokens[$prev]['line'] === $tokens[$useToken]['line']) { + $error = 'Each imported trait must be on its own line'; + $prevNonWs = $phpcsFile->findPrevious(T_WHITESPACE, ($useToken - 1), null, true); + if ($prevNonWs !== $prev) { + $phpcsFile->addError($error, $useToken, 'SpacingBeforeImport'); + } else { + $fix = $phpcsFile->addFixableError($error, $useToken, 'SpacingBeforeImport'); + if ($fix === true) { + $phpcsFile->fixer->beginChangeset(); + for ($x = ($useToken - 1); $x > $prev; $x--) { + if ($tokens[$x]['line'] === $tokens[$useToken]['line'] + ) { + // Preserve indent. + continue; + } + + $phpcsFile->fixer->replaceToken($x, ''); + } + + $phpcsFile->fixer->addNewline($prev); + if ($tokens[$prev]['line'] === $tokens[$useToken]['line']) { + if ($tokens[($useToken - 1)]['code'] === T_WHITESPACE) { + $phpcsFile->fixer->replaceToken(($useToken - 1), ''); + } + + $padding = str_repeat(' ', ($tokens[$useTokens[0]]['column'] - 1)); + $phpcsFile->fixer->addContent($prev, $padding); + } + + $phpcsFile->fixer->endChangeset(); + }//end if + }//end if + }//end if + }//end if + + // Check the formatting of the statement. + if (isset($tokens[$useToken]['scope_opener']) === true) { + $this->processUseGroup($phpcsFile, $useToken); + $end = $tokens[$useToken]['scope_closer']; + } else { + $this->processUseStatement($phpcsFile, $useToken); + $end = $phpcsFile->findNext(T_SEMICOLON, ($useToken + 1)); + if ($end === false) { + // Syntax error. + return; + } + } + + if ($usePos === ($numUseTokens - 1)) { + /* + This is the last use statement. + */ + + $next = $phpcsFile->findNext(T_WHITESPACE, ($end + 1), null, true); + if ($next === $tokens[$ooToken]['scope_closer']) { + // Last content in the class. + $closer = $tokens[$ooToken]['scope_closer']; + if ($tokens[$closer]['line'] > ($tokens[$end]['line'] + 1)) { + $error = 'There must be no blank line after the last trait import statement at the bottom of a %s'; + $data = [strtolower($tokens[$ooToken]['content'])]; + $fix = $phpcsFile->addFixableError($error, $end, 'BlankLineAfterLastUse', $data); + if ($fix === true) { + $phpcsFile->fixer->beginChangeset(); + for ($i = ($end + 1); $i < $closer; $i++) { + if ($tokens[$i]['line'] === $tokens[$end]['line']) { + continue; + } + + if ($tokens[$i]['line'] === $tokens[$closer]['line']) { + // Don't remove indents. + break; + } + + $phpcsFile->fixer->replaceToken($i, ''); + } + + $phpcsFile->fixer->endChangeset(); + } + }//end if + } else if ($tokens[$next]['code'] !== T_USE) { + // Comments are allowed on the same line as the use statement, so make sure + // we don't error for those. + for ($next = ($end + 1); $next < $tokens[$ooToken]['scope_closer']; $next++) { + if ($tokens[$next]['code'] === T_WHITESPACE) { + continue; + } + + if (isset(Tokens::$commentTokens[$tokens[$next]['code']]) === true + && $tokens[$next]['line'] === $tokens[$end]['line'] + ) { + continue; + } + + break; + } + + if ($tokens[$next]['line'] <= ($tokens[$end]['line'] + 1)) { + $error = 'There must be a blank line following the last trait import statement'; + $fix = $phpcsFile->addFixableError($error, $end, 'NoBlankLineAfterUse'); + if ($fix === true) { + if ($tokens[$next]['line'] === $tokens[$useToken]['line']) { + $phpcsFile->fixer->addContentBefore($next, $phpcsFile->eolChar.$phpcsFile->eolChar); + } else { + for ($i = ($next - 1); $i > $end; $i--) { + if ($tokens[$i]['line'] !== $tokens[$next]['line']) { + break; + } + } + + $phpcsFile->fixer->addNewlineBefore(($i + 1)); + } + } + } + }//end if + } else { + // Ensure use statements are grouped. + $next = $phpcsFile->findNext(Tokens::$emptyTokens, ($end + 1), null, true); + if ($next !== $useTokens[($usePos + 1)]) { + $error = 'Imported traits must be grouped together'; + $phpcsFile->addError($error, $useTokens[($usePos + 1)], 'NotGrouped'); + } + }//end if + }//end foreach + + return $tokens[$ooToken]['scope_closer']; + + }//end process() + + + /** + * Processes a group use statement. + * + * @param \PHP_CodeSniffer\Files\File $phpcsFile The file being scanned. + * @param int $stackPtr The position of the current token in the + * stack passed in $tokens. + * + * @return void + */ + protected function processUseGroup(File $phpcsFile, $stackPtr) + { + $tokens = $phpcsFile->getTokens(); + + $opener = $tokens[$stackPtr]['scope_opener']; + $closer = $tokens[$stackPtr]['scope_closer']; + + if ($tokens[$opener]['line'] !== $tokens[$stackPtr]['line']) { + $error = 'The opening brace of a trait import statement must be on the same line as the USE keyword'; + // Figure out if we can fix this error. + $canFix = true; + for ($i = ($stackPtr + 1); $i < $opener; $i++) { + if ($tokens[$i]['line'] !== $tokens[($i + 1)]['line'] + && $tokens[$i]['code'] !== T_WHITESPACE + ) { + $canFix = false; + break; + } + } + + if ($canFix === true) { + $fix = $phpcsFile->addFixableError($error, $opener, 'OpenBraceNewLine'); + if ($fix === true) { + $phpcsFile->fixer->beginChangeset(); + for ($i = ($stackPtr + 1); $i < $opener; $i++) { + if ($tokens[$i]['line'] !== $tokens[($i + 1)]['line']) { + // Everything should have a single space around it. + $phpcsFile->fixer->replaceToken($i, ' '); + } + } + + $phpcsFile->fixer->endChangeset(); + } + } else { + $phpcsFile->addError($error, $opener, 'OpenBraceNewLine'); + } + }//end if + + $error = 'Expected 1 space before opening brace in trait import statement; %s found'; + if ($tokens[($opener - 1)]['code'] !== T_WHITESPACE) { + $data = ['0']; + $fix = $phpcsFile->addFixableError($error, $opener, 'SpaceBeforeOpeningBrace', $data); + if ($fix === true) { + $phpcsFile->fixer->addContentBefore($opener, ' '); + } + } else if ($tokens[($opener - 1)]['content'] !== ' ') { + $prev = $phpcsFile->findPrevious(T_WHITESPACE, ($opener - 1), null, true); + if ($tokens[$prev]['line'] !== $tokens[$opener]['line']) { + $found = 'newline'; + } else { + $found = $tokens[($opener - 1)]['length']; + } + + $data = [$found]; + $fix = $phpcsFile->addFixableError($error, $opener, 'SpaceBeforeOpeningBrace', $data); + if ($fix === true) { + if ($found === 'newline') { + $phpcsFile->fixer->beginChangeset(); + for ($x = ($opener - 1); $x > $prev; $x--) { + $phpcsFile->fixer->replaceToken($x, ''); + } + + $phpcsFile->fixer->addContentBefore($opener, ' '); + $phpcsFile->fixer->endChangeset(); + } else { + $phpcsFile->fixer->replaceToken(($opener - 1), ' '); + } + } + }//end if + + $next = $phpcsFile->findNext(Tokens::$emptyTokens, ($opener + 1), ($closer - 1), true); + if ($next !== false && $tokens[$next]['line'] !== ($tokens[$opener]['line'] + 1)) { + $error = 'First trait conflict resolution statement must be on the line after the opening brace'; + $nextNonWs = $phpcsFile->findNext(T_WHITESPACE, ($opener + 1), ($closer - 1), true); + if ($nextNonWs !== $next) { + $phpcsFile->addError($error, $opener, 'SpaceAfterOpeningBrace'); + } else { + $fix = $phpcsFile->addFixableError($error, $opener, 'SpaceAfterOpeningBrace'); + if ($fix === true) { + $phpcsFile->fixer->beginChangeset(); + for ($x = ($opener + 1); $x < $next; $x++) { + if ($tokens[$x]['line'] === $tokens[$next]['line']) { + // Preserve indent. + break; + } + + $phpcsFile->fixer->replaceToken($x, ''); + } + + $phpcsFile->fixer->addNewline($opener); + $phpcsFile->fixer->endChangeset(); + } + } + }//end if + + for ($i = ($stackPtr + 1); $i < $opener; $i++) { + if ($tokens[$i]['code'] !== T_COMMA) { + continue; + } + + if ($tokens[($i - 1)]['code'] === T_WHITESPACE) { + $error = 'Expected no space before comma in trait import statement; %s found'; + $data = [$tokens[($i - 1)]['length']]; + $fix = $phpcsFile->addFixableError($error, $i, 'SpaceBeforeComma', $data); + if ($fix === true) { + $phpcsFile->fixer->replaceToken(($i - 1), ''); + } + } + + $error = 'Expected 1 space after comma in trait import statement; %s found'; + if ($tokens[($i + 1)]['code'] !== T_WHITESPACE) { + $data = ['0']; + $fix = $phpcsFile->addFixableError($error, $i, 'SpaceAfterComma', $data); + if ($fix === true) { + $phpcsFile->fixer->addContent($i, ' '); + } + } else if ($tokens[($i + 1)]['content'] !== ' ') { + $next = $phpcsFile->findNext(T_WHITESPACE, ($i + 1), $opener, true); + if ($tokens[$next]['line'] !== $tokens[$i]['line']) { + $found = 'newline'; + } else { + $found = $tokens[($i + 1)]['length']; + } + + $data = [$found]; + $fix = $phpcsFile->addFixableError($error, $i, 'SpaceAfterComma', $data); + if ($fix === true) { + if ($found === 'newline') { + $phpcsFile->fixer->beginChangeset(); + for ($x = ($i + 1); $x < $next; $x++) { + $phpcsFile->fixer->replaceToken($x, ''); + } + + $phpcsFile->fixer->addContent($i, ' '); + $phpcsFile->fixer->endChangeset(); + } else { + $phpcsFile->fixer->replaceToken(($i + 1), ' '); + } + } + }//end if + }//end for + + for ($i = ($opener + 1); $i < $closer; $i++) { + if ($tokens[$i]['code'] === T_INSTEADOF) { + $error = 'Expected 1 space before INSTEADOF in trait import statement; %s found'; + if ($tokens[($i - 1)]['code'] !== T_WHITESPACE) { + $data = ['0']; + $fix = $phpcsFile->addFixableError($error, $i, 'SpaceBeforeInsteadof', $data); + if ($fix === true) { + $phpcsFile->fixer->addContentBefore($i, ' '); + } + } else if ($tokens[($i - 1)]['content'] !== ' ') { + $prev = $phpcsFile->findPrevious(T_WHITESPACE, ($i - 1), $opener, true); + if ($tokens[$prev]['line'] !== $tokens[$i]['line']) { + $found = 'newline'; + } else { + $found = $tokens[($i - 1)]['length']; + } + + $data = [$found]; + + $prevNonWs = $phpcsFile->findPrevious(Tokens::$emptyTokens, ($i - 1), $opener, true); + if ($prevNonWs !== $prev) { + $phpcsFile->addError($error, $i, 'SpaceBeforeInsteadof', $data); + } else { + $fix = $phpcsFile->addFixableError($error, $i, 'SpaceBeforeInsteadof', $data); + if ($fix === true) { + if ($found === 'newline') { + $phpcsFile->fixer->beginChangeset(); + for ($x = ($i - 1); $x > $prev; $x--) { + $phpcsFile->fixer->replaceToken($x, ''); + } + + $phpcsFile->fixer->addContentBefore($i, ' '); + $phpcsFile->fixer->endChangeset(); + } else { + $phpcsFile->fixer->replaceToken(($i - 1), ' '); + } + } + } + }//end if + + $error = 'Expected 1 space after INSTEADOF in trait import statement; %s found'; + if ($tokens[($i + 1)]['code'] !== T_WHITESPACE) { + $data = ['0']; + $fix = $phpcsFile->addFixableError($error, $i, 'SpaceAfterInsteadof', $data); + if ($fix === true) { + $phpcsFile->fixer->addContent($i, ' '); + } + } else if ($tokens[($i + 1)]['content'] !== ' ') { + $next = $phpcsFile->findNext(T_WHITESPACE, ($i + 1), $closer, true); + if ($tokens[$next]['line'] !== $tokens[$i]['line']) { + $found = 'newline'; + } else { + $found = $tokens[($i + 1)]['length']; + } + + $data = [$found]; + + $nextNonWs = $phpcsFile->findNext(Tokens::$emptyTokens, ($i + 1), $closer, true); + if ($nextNonWs !== $next) { + $phpcsFile->addError($error, $i, 'SpaceAfterInsteadof', $data); + } else { + $fix = $phpcsFile->addFixableError($error, $i, 'SpaceAfterInsteadof', $data); + if ($fix === true) { + if ($found === 'newline') { + $phpcsFile->fixer->beginChangeset(); + for ($x = ($i + 1); $x < $next; $x++) { + $phpcsFile->fixer->replaceToken($x, ''); + } + + $phpcsFile->fixer->addContent($i, ' '); + $phpcsFile->fixer->endChangeset(); + } else { + $phpcsFile->fixer->replaceToken(($i + 1), ' '); + } + } + } + }//end if + }//end if + + if ($tokens[$i]['code'] === T_AS) { + $error = 'Expected 1 space before AS in trait import statement; %s found'; + if ($tokens[($i - 1)]['code'] !== T_WHITESPACE) { + $data = ['0']; + $fix = $phpcsFile->addFixableError($error, $i, 'SpaceBeforeAs', $data); + if ($fix === true) { + $phpcsFile->fixer->addContentBefore($i, ' '); + } + } else if ($tokens[($i - 1)]['content'] !== ' ') { + $prev = $phpcsFile->findPrevious(T_WHITESPACE, ($i - 1), $opener, true); + if ($tokens[$prev]['line'] !== $tokens[$i]['line']) { + $found = 'newline'; + } else { + $found = $tokens[($i - 1)]['length']; + } + + $data = [$found]; + + $prevNonWs = $phpcsFile->findPrevious(Tokens::$emptyTokens, ($i - 1), $opener, true); + if ($prevNonWs !== $prev) { + $phpcsFile->addError($error, $i, 'SpaceBeforeAs', $data); + } else { + $fix = $phpcsFile->addFixableError($error, $i, 'SpaceBeforeAs', $data); + if ($fix === true) { + if ($found === 'newline') { + $phpcsFile->fixer->beginChangeset(); + for ($x = ($i - 1); $x > $prev; $x--) { + $phpcsFile->fixer->replaceToken($x, ''); + } + + $phpcsFile->fixer->addContentBefore($i, ' '); + $phpcsFile->fixer->endChangeset(); + } else { + $phpcsFile->fixer->replaceToken(($i - 1), ' '); + } + } + } + }//end if + + $error = 'Expected 1 space after AS in trait import statement; %s found'; + if ($tokens[($i + 1)]['code'] !== T_WHITESPACE) { + $data = ['0']; + $fix = $phpcsFile->addFixableError($error, $i, 'SpaceAfterAs', $data); + if ($fix === true) { + $phpcsFile->fixer->addContent($i, ' '); + } + } else if ($tokens[($i + 1)]['content'] !== ' ') { + $next = $phpcsFile->findNext(T_WHITESPACE, ($i + 1), $closer, true); + if ($tokens[$next]['line'] !== $tokens[$i]['line']) { + $found = 'newline'; + } else { + $found = $tokens[($i + 1)]['length']; + } + + $data = [$found]; + + $nextNonWs = $phpcsFile->findNext(Tokens::$emptyTokens, ($i + 1), $closer, true); + if ($nextNonWs !== $next) { + $phpcsFile->addError($error, $i, 'SpaceAfterAs', $data); + } else { + $fix = $phpcsFile->addFixableError($error, $i, 'SpaceAfterAs', $data); + if ($fix === true) { + if ($found === 'newline') { + $phpcsFile->fixer->beginChangeset(); + for ($x = ($i + 1); $x < $next; $x++) { + $phpcsFile->fixer->replaceToken($x, ''); + } + + $phpcsFile->fixer->addContent($i, ' '); + $phpcsFile->fixer->endChangeset(); + } else { + $phpcsFile->fixer->replaceToken(($i + 1), ' '); + } + } + } + }//end if + }//end if + + if ($tokens[$i]['code'] === T_SEMICOLON) { + if ($tokens[($i - 1)]['code'] === T_WHITESPACE) { + $error = 'Expected no space before semicolon in trait import statement; %s found'; + $data = [$tokens[($i - 1)]['length']]; + $fix = $phpcsFile->addFixableError($error, $i, 'SpaceBeforeSemicolon', $data); + if ($fix === true) { + $phpcsFile->fixer->replaceToken(($i - 1), ''); + } + } + + $next = $phpcsFile->findNext(Tokens::$emptyTokens, ($i + 1), ($closer - 1), true); + if ($next !== false && $tokens[$next]['line'] === $tokens[$i]['line']) { + $error = 'Each trait conflict resolution statement must be on a line by itself'; + $nextNonWs = $phpcsFile->findNext(T_WHITESPACE, ($i + 1), ($closer - 1), true); + if ($nextNonWs !== $next) { + $phpcsFile->addError($error, $i, 'ConflictSameLine'); + } else { + $fix = $phpcsFile->addFixableError($error, $i, 'ConflictSameLine'); + if ($fix === true) { + $phpcsFile->fixer->beginChangeset(); + if ($tokens[($i + 1)]['code'] === T_WHITESPACE) { + $phpcsFile->fixer->replaceToken(($i + 1), ''); + } + + $phpcsFile->fixer->addNewline($i); + $phpcsFile->fixer->endChangeset(); + } + } + } + }//end if + }//end for + + $prev = $phpcsFile->findPrevious(Tokens::$emptyTokens, ($closer - 1), ($opener + 1), true); + if ($prev !== false && $tokens[$prev]['line'] !== ($tokens[$closer]['line'] - 1)) { + $error = 'Closing brace must be on the line after the last trait conflict resolution statement'; + $prevNonWs = $phpcsFile->findPrevious(T_WHITESPACE, ($closer - 1), ($opener + 1), true); + if ($prevNonWs !== $prev) { + $phpcsFile->addError($error, $closer, 'SpaceBeforeClosingBrace'); + } else { + $fix = $phpcsFile->addFixableError($error, $closer, 'SpaceBeforeClosingBrace'); + if ($fix === true) { + $phpcsFile->fixer->beginChangeset(); + for ($x = ($closer - 1); $x > $prev; $x--) { + if ($tokens[$x]['line'] === $tokens[$closer]['line']) { + // Preserve indent. + continue; + } + + $phpcsFile->fixer->replaceToken($x, ''); + } + + $phpcsFile->fixer->addNewline($prev); + $phpcsFile->fixer->endChangeset(); + } + } + }//end if + + }//end processUseGroup() + + + /** + * Processes a single use statement. + * + * @param \PHP_CodeSniffer\Files\File $phpcsFile The file being scanned. + * @param int $stackPtr The position of the current token in the + * stack passed in $tokens. + * + * @return void + */ + protected function processUseStatement(File $phpcsFile, $stackPtr) + { + $tokens = $phpcsFile->getTokens(); + + $error = 'Expected 1 space after USE in trait import statement; %s found'; + if ($tokens[($stackPtr + 1)]['code'] !== T_WHITESPACE) { + $data = ['0']; + $fix = $phpcsFile->addFixableError($error, $stackPtr, 'SpaceAfterAs', $data); + if ($fix === true) { + $phpcsFile->fixer->addContent($stackPtr, ' '); + } + } else if ($tokens[($stackPtr + 1)]['content'] !== ' ') { + $next = $phpcsFile->findNext(T_WHITESPACE, ($stackPtr + 1), null, true); + if ($tokens[$next]['line'] !== $tokens[$stackPtr]['line']) { + $found = 'newline'; + } else { + $found = $tokens[($stackPtr + 1)]['length']; + } + + $data = [$found]; + $fix = $phpcsFile->addFixableError($error, $stackPtr, 'SpaceAfterAs', $data); + if ($fix === true) { + if ($found === 'newline') { + $phpcsFile->fixer->beginChangeset(); + for ($x = ($stackPtr + 1); $x < $next; $x++) { + $phpcsFile->fixer->replaceToken($x, ''); + } + + $phpcsFile->fixer->addContent($stackPtr, ' '); + $phpcsFile->fixer->endChangeset(); + } else { + $phpcsFile->fixer->replaceToken(($stackPtr + 1), ' '); + } + } + }//end if + + $next = $phpcsFile->findNext([T_COMMA, T_SEMICOLON], ($stackPtr + 1)); + if ($next !== false && $tokens[$next]['code'] === T_COMMA) { + $error = 'Each imported trait must have its own "use" import statement'; + $fix = $phpcsFile->addFixableError($error, $next, 'MultipleImport'); + if ($fix === true) { + $padding = str_repeat(' ', ($tokens[$stackPtr]['column'] - 1)); + $phpcsFile->fixer->replaceToken($next, ';'.$phpcsFile->eolChar.$padding.'use '); + } + } + + }//end processUseStatement() + + +}//end class diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/PSR12/Tests/Classes/AnonClassDeclarationUnitTest.inc b/vendor/squizlabs/php_codesniffer/src/Standards/PSR12/Tests/Classes/AnonClassDeclarationUnitTest.inc new file mode 100644 index 00000000..e132b54d --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/PSR12/Tests/Classes/AnonClassDeclarationUnitTest.inc @@ -0,0 +1,84 @@ +bar( + new class implements Bar { + // ... + }, +); + +foo(new class { +}); diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/PSR12/Tests/Classes/AnonClassDeclarationUnitTest.inc.fixed b/vendor/squizlabs/php_codesniffer/src/Standards/PSR12/Tests/Classes/AnonClassDeclarationUnitTest.inc.fixed new file mode 100644 index 00000000..921dcc02 --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/PSR12/Tests/Classes/AnonClassDeclarationUnitTest.inc.fixed @@ -0,0 +1,86 @@ +bar( + new class implements Bar { + // ... + }, +); + +foo(new class { +}); diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/PSR12/Tests/Classes/AnonClassDeclarationUnitTest.php b/vendor/squizlabs/php_codesniffer/src/Standards/PSR12/Tests/Classes/AnonClassDeclarationUnitTest.php new file mode 100644 index 00000000..cc162b29 --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/PSR12/Tests/Classes/AnonClassDeclarationUnitTest.php @@ -0,0 +1,71 @@ + + * @copyright 2006-2019 Squiz Pty Ltd (ABN 77 084 670 600) + * @license https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence + */ + +namespace PHP_CodeSniffer\Standards\PSR12\Tests\Classes; + +use PHP_CodeSniffer\Tests\Standards\AbstractSniffUnitTest; + +class AnonClassDeclarationUnitTest extends AbstractSniffUnitTest +{ + + + /** + * Returns the lines where errors should occur. + * + * The key of the array should represent the line number and the value + * should represent the number of errors that should occur on that line. + * + * @return array + */ + public function getErrorList() + { + return [ + 28 => 3, + 30 => 1, + 31 => 4, + 32 => 1, + 33 => 1, + 34 => 1, + 35 => 1, + 36 => 1, + 37 => 3, + 39 => 1, + 40 => 1, + 43 => 3, + 44 => 4, + 45 => 1, + 48 => 1, + 52 => 3, + 53 => 1, + 54 => 1, + 55 => 1, + 56 => 2, + 63 => 1, + 75 => 1, + ]; + + }//end getErrorList() + + + /** + * Returns the lines where warnings should occur. + * + * The key of the array should represent the line number and the value + * should represent the number of warnings that should occur on that line. + * + * @return array + */ + public function getWarningList() + { + return []; + + }//end getWarningList() + + +}//end class diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/PSR12/Tests/Classes/ClassInstantiationUnitTest.inc b/vendor/squizlabs/php_codesniffer/src/Standards/PSR12/Tests/Classes/ClassInstantiationUnitTest.inc new file mode 100644 index 00000000..d933ee27 --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/PSR12/Tests/Classes/ClassInstantiationUnitTest.inc @@ -0,0 +1,44 @@ +bar(); +echo (new Foo)->bar(); +echo (new Foo((new Bar)->getBaz()))->bar(); +$foo = (new Foo)::$bar; + +echo (new Foo((new Bar//comment +)->getBaz(new Baz /* comment */)))->bar(); + +$foo = new $bar['a'](); +$foo = new $bar['a']['b'](); +$foo = new $bar['a'][$baz['a']['b']]['b'](); +$foo = new $bar['a'] [$baz['a']/* comment */ ['b']]['b']; + +$a = new self::$transport[$cap_string]; +$renderer = new $this->inline_diff_renderer; +$a = new ${$varHoldingClassName}; + +$class = new $obj?->classname(); +$class = new $obj?->classname; +$class = new ${$obj?->classname}; + +// Issue 3456. +// Anon classes should be skipped, even when there is an attribute between the new and the class keywords. +$anonWithAttribute = new #[SomeAttribute('summary')] class { + public const SOME_STUFF = 'foo'; +}; diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/PSR12/Tests/Classes/ClassInstantiationUnitTest.inc.fixed b/vendor/squizlabs/php_codesniffer/src/Standards/PSR12/Tests/Classes/ClassInstantiationUnitTest.inc.fixed new file mode 100644 index 00000000..02e3544f --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/PSR12/Tests/Classes/ClassInstantiationUnitTest.inc.fixed @@ -0,0 +1,44 @@ +bar(); +echo (new Foo())->bar(); +echo (new Foo((new Bar())->getBaz()))->bar(); +$foo = (new Foo())::$bar; + +echo (new Foo((new Bar()//comment +)->getBaz(new Baz() /* comment */)))->bar(); + +$foo = new $bar['a'](); +$foo = new $bar['a']['b'](); +$foo = new $bar['a'][$baz['a']['b']]['b'](); +$foo = new $bar['a'] [$baz['a']/* comment */ ['b']]['b'](); + +$a = new self::$transport[$cap_string](); +$renderer = new $this->inline_diff_renderer(); +$a = new ${$varHoldingClassName}(); + +$class = new $obj?->classname(); +$class = new $obj?->classname(); +$class = new ${$obj?->classname}(); + +// Issue 3456. +// Anon classes should be skipped, even when there is an attribute between the new and the class keywords. +$anonWithAttribute = new #[SomeAttribute('summary')] class { + public const SOME_STUFF = 'foo'; +}; diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/PSR12/Tests/Classes/ClassInstantiationUnitTest.php b/vendor/squizlabs/php_codesniffer/src/Standards/PSR12/Tests/Classes/ClassInstantiationUnitTest.php new file mode 100644 index 00000000..3fb1ab99 --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/PSR12/Tests/Classes/ClassInstantiationUnitTest.php @@ -0,0 +1,66 @@ + + * @copyright 2006-2015 Squiz Pty Ltd (ABN 77 084 670 600) + * @license https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence + */ + +namespace PHP_CodeSniffer\Standards\PSR12\Tests\Classes; + +use PHP_CodeSniffer\Tests\Standards\AbstractSniffUnitTest; + +class ClassInstantiationUnitTest extends AbstractSniffUnitTest +{ + + + /** + * Returns the lines where errors should occur. + * + * The key of the array should represent the line number and the value + * should represent the number of errors that should occur on that line. + * + * @return array + */ + public function getErrorList() + { + return [ + 3 => 1, + 4 => 1, + 9 => 1, + 11 => 1, + 14 => 1, + 16 => 1, + 20 => 1, + 21 => 1, + 22 => 1, + 24 => 1, + 25 => 1, + 30 => 1, + 32 => 1, + 33 => 1, + 34 => 1, + 37 => 1, + 38 => 1, + ]; + + }//end getErrorList() + + + /** + * Returns the lines where warnings should occur. + * + * The key of the array should represent the line number and the value + * should represent the number of warnings that should occur on that line. + * + * @return array + */ + public function getWarningList() + { + return []; + + }//end getWarningList() + + +}//end class diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/PSR12/Tests/Classes/ClosingBraceUnitTest.inc b/vendor/squizlabs/php_codesniffer/src/Standards/PSR12/Tests/Classes/ClosingBraceUnitTest.inc new file mode 100644 index 00000000..1d2e92c9 --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/PSR12/Tests/Classes/ClosingBraceUnitTest.inc @@ -0,0 +1,47 @@ +bar( + $arg1, + function ($arg2) use ($var1) { + // body + }, + $arg3 +); + +$instance = new class extends \Foo implements \HandleableInterface { + // Class content +}; + +$app->get('/hello/{name}', function ($name) use ($app) { + return 'Hello ' . $app->escape($name); +}); diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/PSR12/Tests/Classes/ClosingBraceUnitTest.php b/vendor/squizlabs/php_codesniffer/src/Standards/PSR12/Tests/Classes/ClosingBraceUnitTest.php new file mode 100644 index 00000000..1deac1cd --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/PSR12/Tests/Classes/ClosingBraceUnitTest.php @@ -0,0 +1,54 @@ + + * @copyright 2006-2015 Squiz Pty Ltd (ABN 77 084 670 600) + * @license https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence + */ + +namespace PHP_CodeSniffer\Standards\PSR12\Tests\Classes; + +use PHP_CodeSniffer\Tests\Standards\AbstractSniffUnitTest; + +class ClosingBraceUnitTest extends AbstractSniffUnitTest +{ + + + /** + * Returns the lines where errors should occur. + * + * The key of the array should represent the line number and the value + * should represent the number of errors that should occur on that line. + * + * @return array + */ + public function getErrorList() + { + return [ + 13 => 1, + 14 => 1, + 19 => 1, + 24 => 1, + 31 => 1, + ]; + + }//end getErrorList() + + + /** + * Returns the lines where warnings should occur. + * + * The key of the array should represent the line number and the value + * should represent the number of warnings that should occur on that line. + * + * @return array + */ + public function getWarningList() + { + return []; + + }//end getWarningList() + + +}//end class diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/PSR12/Tests/Classes/OpeningBraceSpaceUnitTest.inc b/vendor/squizlabs/php_codesniffer/src/Standards/PSR12/Tests/Classes/OpeningBraceSpaceUnitTest.inc new file mode 100644 index 00000000..509c48c3 --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/PSR12/Tests/Classes/OpeningBraceSpaceUnitTest.inc @@ -0,0 +1,49 @@ + + * @copyright 2006-2015 Squiz Pty Ltd (ABN 77 084 670 600) + * @license https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence + */ + +namespace PHP_CodeSniffer\Standards\PSR12\Tests\Classes; + +use PHP_CodeSniffer\Tests\Standards\AbstractSniffUnitTest; + +class OpeningBraceSpaceUnitTest extends AbstractSniffUnitTest +{ + + + /** + * Returns the lines where errors should occur. + * + * The key of the array should represent the line number and the value + * should represent the number of errors that should occur on that line. + * + * @return array + */ + public function getErrorList() + { + return [ + 10 => 1, + 18 => 1, + 24 => 1, + 34 => 1, + 41 => 1, + ]; + + }//end getErrorList() + + + /** + * Returns the lines where warnings should occur. + * + * The key of the array should represent the line number and the value + * should represent the number of warnings that should occur on that line. + * + * @return array + */ + public function getWarningList() + { + return []; + + }//end getWarningList() + + +}//end class diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/PSR12/Tests/ControlStructures/BooleanOperatorPlacementUnitTest.inc b/vendor/squizlabs/php_codesniffer/src/Standards/PSR12/Tests/ControlStructures/BooleanOperatorPlacementUnitTest.inc new file mode 100644 index 00000000..4bc2eceb --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/PSR12/Tests/ControlStructures/BooleanOperatorPlacementUnitTest.inc @@ -0,0 +1,131 @@ + 0 && $n < 10) + || ($n > 10 && $n < 20) + || ($n > 20 && $n < 30) +) { + return $n; +} + +if ( + ( + $expr1 + && $expr2 + && $expr3 + && $expr4 + && $expr5 + && $expr6 + ) + || ($n > 100 && $n < 200) + || ($n > 200 && $n < 300) +) { + return $n; +} + +// phpcs:set PSR12.ControlStructures.BooleanOperatorPlacement allowOnly first +if ( + $expr1 + && $expr2 + && ($expr3 + || $expr4) + && $expr5 +) { + // if body +} elseif ( + $expr1 && + ($expr3 || $expr4) + && $expr5 +) { + // elseif body +} elseif ( + $expr1 + && ($expr3 || $expr4) && + $expr5 +) { + // elseif body +} + +// phpcs:set PSR12.ControlStructures.BooleanOperatorPlacement allowOnly last +if ( + $expr1 + && $expr2 + && ($expr3 + || $expr4) + && $expr5 +) { + // if body +} elseif ( + $expr1 && + ($expr3 || $expr4) + && $expr5 +) { + // elseif body +} elseif ( + $expr1 + && ($expr3 || $expr4) && + $expr5 +) { + // elseif body +} + +if ( + ($value == 1 || + $value == 2) + && + ($value == 3 || + $value == 4) +) { + return 5; +} + +// Reset to default. +// phpcs:set PSR12.ControlStructures.BooleanOperatorPlacement allowOnly + +match ( + $expr1 + && $expr2 && + $expr3 +) { + // structure body +}; diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/PSR12/Tests/ControlStructures/BooleanOperatorPlacementUnitTest.inc.fixed b/vendor/squizlabs/php_codesniffer/src/Standards/PSR12/Tests/ControlStructures/BooleanOperatorPlacementUnitTest.inc.fixed new file mode 100644 index 00000000..5f4d223e --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/PSR12/Tests/ControlStructures/BooleanOperatorPlacementUnitTest.inc.fixed @@ -0,0 +1,141 @@ + 0 && $n < 10) + || ($n > 10 && $n < 20) + || ($n > 20 && $n < 30) +) { + return $n; +} + +if ( + ( + $expr1 + && $expr2 + && $expr3 + && $expr4 + && $expr5 + && $expr6 + ) + || ($n > 100 && $n < 200) + || ($n > 200 && $n < 300) +) { + return $n; +} + +// phpcs:set PSR12.ControlStructures.BooleanOperatorPlacement allowOnly first +if ( + $expr1 + && $expr2 + && ($expr3 + || $expr4) + && $expr5 +) { + // if body +} elseif ( + $expr1 + && ($expr3 + || $expr4) + && $expr5 +) { + // elseif body +} elseif ( + $expr1 + && ($expr3 + || $expr4) + && $expr5 +) { + // elseif body +} + +// phpcs:set PSR12.ControlStructures.BooleanOperatorPlacement allowOnly last +if ( + $expr1 && + $expr2 && + ($expr3 || + $expr4) && + $expr5 +) { + // if body +} elseif ( + $expr1 && + ($expr3 || + $expr4) && + $expr5 +) { + // elseif body +} elseif ( + $expr1 && + ($expr3 || + $expr4) && + $expr5 +) { + // elseif body +} + +if ( + ($value == 1 || + $value == 2) + && + ($value == 3 || + $value == 4) +) { + return 5; +} + +// Reset to default. +// phpcs:set PSR12.ControlStructures.BooleanOperatorPlacement allowOnly + +match ( + $expr1 + && $expr2 + && $expr3 +) { + // structure body +}; diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/PSR12/Tests/ControlStructures/BooleanOperatorPlacementUnitTest.php b/vendor/squizlabs/php_codesniffer/src/Standards/PSR12/Tests/ControlStructures/BooleanOperatorPlacementUnitTest.php new file mode 100644 index 00000000..3eeaeebc --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/PSR12/Tests/ControlStructures/BooleanOperatorPlacementUnitTest.php @@ -0,0 +1,59 @@ + + * @copyright 2006-2019 Squiz Pty Ltd (ABN 77 084 670 600) + * @license https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence + */ + +namespace PHP_CodeSniffer\Standards\PSR12\Tests\ControlStructures; + +use PHP_CodeSniffer\Tests\Standards\AbstractSniffUnitTest; + +class BooleanOperatorPlacementUnitTest extends AbstractSniffUnitTest +{ + + + /** + * Returns the lines where errors should occur. + * + * The key of the array should represent the line number and the value + * should represent the number of errors that should occur on that line. + * + * @return array + */ + public function getErrorList() + { + return [ + 10 => 1, + 16 => 1, + 28 => 1, + 34 => 1, + 75 => 1, + 81 => 1, + 90 => 1, + 98 => 1, + 104 => 1, + 125 => 1, + ]; + + }//end getErrorList() + + + /** + * Returns the lines where warnings should occur. + * + * The key of the array should represent the line number and the value + * should represent the number of warnings that should occur on that line. + * + * @return array + */ + public function getWarningList() + { + return []; + + }//end getWarningList() + + +}//end class diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/PSR12/Tests/ControlStructures/ControlStructureSpacingUnitTest.inc b/vendor/squizlabs/php_codesniffer/src/Standards/PSR12/Tests/ControlStructures/ControlStructureSpacingUnitTest.inc new file mode 100644 index 00000000..9c037d6c --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/PSR12/Tests/ControlStructures/ControlStructureSpacingUnitTest.inc @@ -0,0 +1,100 @@ + $foo + /* + * A multi-line comment. + */ + && $foo === true + ) { + break; + } + +match ( + $expr1 && + $expr2 && + $expr3 + ) { + // structure body +}; + +match ($expr1 && +$expr2 && + $expr3) { + // structure body +}; diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/PSR12/Tests/ControlStructures/ControlStructureSpacingUnitTest.inc.fixed b/vendor/squizlabs/php_codesniffer/src/Standards/PSR12/Tests/ControlStructures/ControlStructureSpacingUnitTest.inc.fixed new file mode 100644 index 00000000..7ea61b1e --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/PSR12/Tests/ControlStructures/ControlStructureSpacingUnitTest.inc.fixed @@ -0,0 +1,103 @@ + $foo + /* + * A multi-line comment. + */ + && $foo === true + ) { + break; + } + +match ( + $expr1 && + $expr2 && + $expr3 +) { + // structure body +}; + +match ( + $expr1 && + $expr2 && + $expr3 +) { + // structure body +}; diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/PSR12/Tests/ControlStructures/ControlStructureSpacingUnitTest.php b/vendor/squizlabs/php_codesniffer/src/Standards/PSR12/Tests/ControlStructures/ControlStructureSpacingUnitTest.php new file mode 100644 index 00000000..6ee076f2 --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/PSR12/Tests/ControlStructures/ControlStructureSpacingUnitTest.php @@ -0,0 +1,68 @@ + + * @copyright 2006-2019 Squiz Pty Ltd (ABN 77 084 670 600) + * @license https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence + */ + +namespace PHP_CodeSniffer\Standards\PSR12\Tests\ControlStructures; + +use PHP_CodeSniffer\Tests\Standards\AbstractSniffUnitTest; + +class ControlStructureSpacingUnitTest extends AbstractSniffUnitTest +{ + + + /** + * Returns the lines where errors should occur. + * + * The key of the array should represent the line number and the value + * should represent the number of errors that should occur on that line. + * + * @return array + */ + public function getErrorList() + { + return [ + 2 => 2, + 16 => 1, + 17 => 1, + 18 => 1, + 22 => 1, + 23 => 1, + 32 => 1, + 33 => 1, + 34 => 1, + 37 => 1, + 38 => 1, + 39 => 1, + 48 => 2, + 58 => 1, + 59 => 1, + 92 => 1, + 96 => 1, + 97 => 1, + 98 => 2, + ]; + + }//end getErrorList() + + + /** + * Returns the lines where warnings should occur. + * + * The key of the array should represent the line number and the value + * should represent the number of warnings that should occur on that line. + * + * @return array + */ + public function getWarningList() + { + return []; + + }//end getWarningList() + + +}//end class diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/PSR12/Tests/Files/DeclareStatementUnitTest.inc b/vendor/squizlabs/php_codesniffer/src/Standards/PSR12/Tests/Files/DeclareStatementUnitTest.inc new file mode 100644 index 00000000..f21daaff --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/PSR12/Tests/Files/DeclareStatementUnitTest.inc @@ -0,0 +1,50 @@ + + * @copyright 2006-2015 Squiz Pty Ltd (ABN 77 084 670 600) + * @license https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence + */ + +namespace PHP_CodeSniffer\Standards\PSR12\Tests\Files; + +use PHP_CodeSniffer\Tests\Standards\AbstractSniffUnitTest; + +class DeclareStatementUnitTest extends AbstractSniffUnitTest +{ + + + /** + * Returns the lines where errors should occur. + * + * The key of the array should represent the line number and the value + * should represent the number of errors that should occur on that line. + * + * @return array + */ + public function getErrorList() + { + return [ + 2 => 1, + 3 => 1, + 4 => 1, + 5 => 2, + 6 => 1, + 7 => 1, + 9 => 2, + 10 => 1, + 11 => 3, + 12 => 2, + 13 => 1, + 14 => 2, + 16 => 3, + 19 => 3, + 22 => 1, + 24 => 1, + 26 => 3, + 28 => 3, + 34 => 2, + 43 => 1, + 46 => 1, + 47 => 1, + 49 => 1, + ]; + + }//end getErrorList() + + + /** + * Returns the lines where warnings should occur. + * + * The key of the array should represent the line number and the value + * should represent the number of warnings that should occur on that line. + * + * @return array + */ + public function getWarningList() + { + return []; + + }//end getWarningList() + + +}//end class diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/PSR12/Tests/Files/FileHeaderUnitTest.1.inc b/vendor/squizlabs/php_codesniffer/src/Standards/PSR12/Tests/Files/FileHeaderUnitTest.1.inc new file mode 100644 index 00000000..1298ed71 --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/PSR12/Tests/Files/FileHeaderUnitTest.1.inc @@ -0,0 +1,29 @@ + + +

    + + + +

    + + + + +

    Demo

    + + +
  • My page
  • +
  • Write
  • +
  • Sign out
  • + +
  • Sign in
  • + diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/PSR12/Tests/Files/FileHeaderUnitTest.15.inc b/vendor/squizlabs/php_codesniffer/src/Standards/PSR12/Tests/Files/FileHeaderUnitTest.15.inc new file mode 100644 index 00000000..11102beb --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/PSR12/Tests/Files/FileHeaderUnitTest.15.inc @@ -0,0 +1,5 @@ + + + diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/PSR12/Tests/Files/FileHeaderUnitTest.16.inc b/vendor/squizlabs/php_codesniffer/src/Standards/PSR12/Tests/Files/FileHeaderUnitTest.16.inc new file mode 100644 index 00000000..5c3df1f3 --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/PSR12/Tests/Files/FileHeaderUnitTest.16.inc @@ -0,0 +1,13 @@ + + + * @copyright 2006-2019 Squiz Pty Ltd (ABN 77 084 670 600) + * @license https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence + */ + +namespace PHP_CodeSniffer\Standards\PSR12\Tests\Files; + +use PHP_CodeSniffer\Tests\Standards\AbstractSniffUnitTest; + +class FileHeaderUnitTest extends AbstractSniffUnitTest +{ + + + /** + * Returns the lines where errors should occur. + * + * The key of the array should represent the line number and the value + * should represent the number of errors that should occur on that line. + * + * @param string $testFile The name of the file being tested. + * + * @return array + */ + public function getErrorList($testFile='') + { + switch ($testFile) { + case 'FileHeaderUnitTest.2.inc': + return [ + 1 => 1, + 6 => 1, + 7 => 1, + 18 => 1, + 20 => 1, + 24 => 1, + ]; + case 'FileHeaderUnitTest.3.inc': + return [ + 9 => 1, + 18 => 1, + ]; + case 'FileHeaderUnitTest.4.inc': + return [ + 1 => 1, + 2 => 1, + 3 => 1, + 7 => 1, + ]; + case 'FileHeaderUnitTest.5.inc': + return [4 => 1]; + case 'FileHeaderUnitTest.7.inc': + case 'FileHeaderUnitTest.10.inc': + case 'FileHeaderUnitTest.11.inc': + return [1 => 1]; + case 'FileHeaderUnitTest.12.inc': + return [4 => 2]; + default: + return []; + }//end switch + + }//end getErrorList() + + + /** + * Returns the lines where warnings should occur. + * + * The key of the array should represent the line number and the value + * should represent the number of warnings that should occur on that line. + * + * @return array + */ + public function getWarningList() + { + return []; + + }//end getWarningList() + + +}//end class diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/PSR12/Tests/Files/ImportStatementUnitTest.inc b/vendor/squizlabs/php_codesniffer/src/Standards/PSR12/Tests/Files/ImportStatementUnitTest.inc new file mode 100644 index 00000000..904e3f40 --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/PSR12/Tests/Files/ImportStatementUnitTest.inc @@ -0,0 +1,19 @@ + + * @copyright 2006-2019 Squiz Pty Ltd (ABN 77 084 670 600) + * @license https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence + */ + +namespace PHP_CodeSniffer\Standards\PSR12\Tests\Files; + +use PHP_CodeSniffer\Tests\Standards\AbstractSniffUnitTest; + +class ImportStatementUnitTest extends AbstractSniffUnitTest +{ + + + /** + * Returns the lines where errors should occur. + * + * The key of the array should represent the line number and the value + * should represent the number of errors that should occur on that line. + * + * @return array + */ + public function getErrorList() + { + return [ + 2 => 1, + 4 => 1, + 7 => 1, + ]; + + }//end getErrorList() + + + /** + * Returns the lines where warnings should occur. + * + * The key of the array should represent the line number and the value + * should represent the number of warnings that should occur on that line. + * + * @return array + */ + public function getWarningList() + { + return []; + + }//end getWarningList() + + +}//end class diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/PSR12/Tests/Files/OpenTagUnitTest.1.inc b/vendor/squizlabs/php_codesniffer/src/Standards/PSR12/Tests/Files/OpenTagUnitTest.1.inc new file mode 100644 index 00000000..0dbdf010 --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/PSR12/Tests/Files/OpenTagUnitTest.1.inc @@ -0,0 +1,3 @@ + +hi diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/PSR12/Tests/Files/OpenTagUnitTest.4.inc b/vendor/squizlabs/php_codesniffer/src/Standards/PSR12/Tests/Files/OpenTagUnitTest.4.inc new file mode 100644 index 00000000..09be8fbe --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/PSR12/Tests/Files/OpenTagUnitTest.4.inc @@ -0,0 +1,2 @@ + + + * @copyright 2006-2019 Squiz Pty Ltd (ABN 77 084 670 600) + * @license https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence + */ + +namespace PHP_CodeSniffer\Standards\PSR12\Tests\Files; + +use PHP_CodeSniffer\Tests\Standards\AbstractSniffUnitTest; + +class OpenTagUnitTest extends AbstractSniffUnitTest +{ + + + /** + * Returns the lines where errors should occur. + * + * The key of the array should represent the line number and the value + * should represent the number of errors that should occur on that line. + * + * @param string $testFile The name of the file being tested. + * + * @return array + */ + public function getErrorList($testFile='') + { + switch ($testFile) { + case 'OpenTagUnitTest.2.inc': + return [1 => 1]; + default: + return []; + }//end switch + + }//end getErrorList() + + + /** + * Returns the lines where warnings should occur. + * + * The key of the array should represent the line number and the value + * should represent the number of warnings that should occur on that line. + * + * @return array + */ + public function getWarningList() + { + return []; + + }//end getWarningList() + + +}//end class diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/PSR12/Tests/Functions/NullableTypeDeclarationUnitTest.inc b/vendor/squizlabs/php_codesniffer/src/Standards/PSR12/Tests/Functions/NullableTypeDeclarationUnitTest.inc new file mode 100644 index 00000000..e3a5a775 --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/PSR12/Tests/Functions/NullableTypeDeclarationUnitTest.inc @@ -0,0 +1,87 @@ + + * @copyright 2006-2018 Squiz Pty Ltd (ABN 77 084 670 600) + * @license https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence + */ + +namespace PHP_CodeSniffer\Standards\PSR12\Tests\Functions; + +use PHP_CodeSniffer\Tests\Standards\AbstractSniffUnitTest; + +class NullableTypeDeclarationUnitTest extends AbstractSniffUnitTest +{ + + + /** + * Returns the lines where errors should occur. + * + * The key of the array should represent the line number and the value + * should represent the number of errors that should occur on that line. + * + * @return array + */ + protected function getErrorList() + { + return [ + 23 => 1, + 24 => 1, + 25 => 1, + 30 => 1, + 31 => 1, + 32 => 1, + 43 => 2, + 48 => 1, + 50 => 1, + 51 => 1, + 53 => 1, + 57 => 2, + 58 => 2, + 59 => 2, + 87 => 1, + ]; + + }//end getErrorList() + + + /** + * Returns the lines where warnings should occur. + * + * The key of the array should represent the line number and the value + * should represent the number of warnings that should occur on that line. + * + * @return array + */ + protected function getWarningList() + { + return []; + + }//end getWarningList() + + +}//end class diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/PSR12/Tests/Functions/ReturnTypeDeclarationUnitTest.inc b/vendor/squizlabs/php_codesniffer/src/Standards/PSR12/Tests/Functions/ReturnTypeDeclarationUnitTest.inc new file mode 100644 index 00000000..59ab1aa7 --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/PSR12/Tests/Functions/ReturnTypeDeclarationUnitTest.inc @@ -0,0 +1,66 @@ + $arg; + +return (!$a ? [ new class { public function b(): c {} } ] : []); diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/PSR12/Tests/Functions/ReturnTypeDeclarationUnitTest.inc.fixed b/vendor/squizlabs/php_codesniffer/src/Standards/PSR12/Tests/Functions/ReturnTypeDeclarationUnitTest.inc.fixed new file mode 100644 index 00000000..cd79f781 --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/PSR12/Tests/Functions/ReturnTypeDeclarationUnitTest.inc.fixed @@ -0,0 +1,62 @@ + $arg; + +return (!$a ? [ new class { public function b(): c {} } ] : []); diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/PSR12/Tests/Functions/ReturnTypeDeclarationUnitTest.php b/vendor/squizlabs/php_codesniffer/src/Standards/PSR12/Tests/Functions/ReturnTypeDeclarationUnitTest.php new file mode 100644 index 00000000..fc6b5e19 --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/PSR12/Tests/Functions/ReturnTypeDeclarationUnitTest.php @@ -0,0 +1,61 @@ + + * @copyright 2006-2018 Squiz Pty Ltd (ABN 77 084 670 600) + * @license https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence + */ + +namespace PHP_CodeSniffer\Standards\PSR12\Tests\Functions; + +use PHP_CodeSniffer\Tests\Standards\AbstractSniffUnitTest; + +class ReturnTypeDeclarationUnitTest extends AbstractSniffUnitTest +{ + + + /** + * Returns the lines where errors should occur. + * + * The key of the array should represent the line number and the value + * should represent the number of errors that should occur on that line. + * + * @return array + */ + protected function getErrorList() + { + return [ + 27 => 1, + 28 => 1, + 35 => 2, + 41 => 2, + 48 => 2, + 52 => 1, + 55 => 1, + 56 => 1, + 59 => 1, + 60 => 1, + 62 => 1, + 64 => 1, + ]; + + }//end getErrorList() + + + /** + * Returns the lines where warnings should occur. + * + * The key of the array should represent the line number and the value + * should represent the number of warnings that should occur on that line. + * + * @return array + */ + protected function getWarningList() + { + return []; + + }//end getWarningList() + + +}//end class diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/PSR12/Tests/Keywords/ShortFormTypeKeywordsUnitTest.inc b/vendor/squizlabs/php_codesniffer/src/Standards/PSR12/Tests/Keywords/ShortFormTypeKeywordsUnitTest.inc new file mode 100644 index 00000000..6ce930d9 --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/PSR12/Tests/Keywords/ShortFormTypeKeywordsUnitTest.inc @@ -0,0 +1,14 @@ + + * @copyright 2006-2015 Squiz Pty Ltd (ABN 77 084 670 600) + * @license https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence + */ + +namespace PHP_CodeSniffer\Standards\PSR12\Tests\Keywords; + +use PHP_CodeSniffer\Tests\Standards\AbstractSniffUnitTest; + +class ShortFormTypeKeywordsUnitTest extends AbstractSniffUnitTest +{ + + + /** + * Returns the lines where errors should occur. + * + * The key of the array should represent the line number and the value + * should represent the number of errors that should occur on that line. + * + * @return array + */ + public function getErrorList() + { + return [ + 3 => 1, + 5 => 1, + 7 => 1, + 13 => 1, + 14 => 1, + ]; + + }//end getErrorList() + + + /** + * Returns the lines where warnings should occur. + * + * The key of the array should represent the line number and the value + * should represent the number of warnings that should occur on that line. + * + * @return array + */ + public function getWarningList() + { + return []; + + }//end getWarningList() + + +}//end class diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/PSR12/Tests/Namespaces/CompoundNamespaceDepthUnitTest.inc b/vendor/squizlabs/php_codesniffer/src/Standards/PSR12/Tests/Namespaces/CompoundNamespaceDepthUnitTest.inc new file mode 100644 index 00000000..3336fc2d --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/PSR12/Tests/Namespaces/CompoundNamespaceDepthUnitTest.inc @@ -0,0 +1,31 @@ + + * @copyright 2006-2015 Squiz Pty Ltd (ABN 77 084 670 600) + * @license https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence + */ + +namespace PHP_CodeSniffer\Standards\PSR12\Tests\Namespaces; + +use PHP_CodeSniffer\Tests\Standards\AbstractSniffUnitTest; + +class CompoundNamespaceDepthUnitTest extends AbstractSniffUnitTest +{ + + + /** + * Returns the lines where errors should occur. + * + * The key of the array should represent the line number and the value + * should represent the number of errors that should occur on that line. + * + * @return array + */ + public function getErrorList() + { + return [ + 10 => 1, + 18 => 1, + 21 => 1, + ]; + + }//end getErrorList() + + + /** + * Returns the lines where warnings should occur. + * + * The key of the array should represent the line number and the value + * should represent the number of warnings that should occur on that line. + * + * @return array + */ + public function getWarningList() + { + return []; + + }//end getWarningList() + + +}//end class diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/PSR12/Tests/Operators/OperatorSpacingUnitTest.inc b/vendor/squizlabs/php_codesniffer/src/Standards/PSR12/Tests/Operators/OperatorSpacingUnitTest.inc new file mode 100644 index 00000000..c067e6a2 --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/PSR12/Tests/Operators/OperatorSpacingUnitTest.inc @@ -0,0 +1,77 @@ + $b) { + $variable =$foo ? 'foo' :'bar'; + $variable.='text'.'text'; +} + +$foo+= $a&$b; +$foo = $a|$b; +$foo =$a^$b; +$foo = ~$a; +$foo *=$a<<$b; +$foo = $a>>$b; + +function foo(&$a,& $b) {} + +$foo = $a and$b; +$foo = $a or $b; +$foo = $a xor$b; +$foo = !$a; +$foo = $a&&$b; +$foo = $a||$b; + +$foo = $a instanceof Foo; +$foo = $a instanceof$b; + +$foo .= 'hi' + .= 'there'; + +$foo .= 'hi' +.= 'there'; + +$foo .= 'hi' // comment +.= 'there'; + +$foo/*comment*/=/*comment*/$a/*comment*/and/*comment*/$b; + +$foo .=//comment +'string' .=/*comment*/ +'string'; + +$foo = $foo ?: 'bar'; +$foo = $foo?:'bar'; + +try { +} catch (ExceptionType1|ExceptionType2 $e) { +} + +if (strpos($tokenContent, 'b"') === 0 && substr($tokenContent, -1) === '"') {} + +$oldConstructorPos = +1; +return -$content; + +function name($a = -1) {} + +$a =& $ref; +$a = [ 'a' => &$something ]; + +$fn = fn(array &$one) => 1; +$fn = fn(array & $one) => 1; + +$fn = static fn(DateTime $a, DateTime $b): int => -($a->getTimestamp() <=> $b->getTimestamp()); + +function issue3267(string|int ...$values) {} + +function setDefault(#[ImportValue( + constraints: [ + [ + Assert\Type::class, + ['type' => 'bool'], + ], + ] + )] ?bool $value = null): void + { + // Do something + } diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/PSR12/Tests/Operators/OperatorSpacingUnitTest.inc.fixed b/vendor/squizlabs/php_codesniffer/src/Standards/PSR12/Tests/Operators/OperatorSpacingUnitTest.inc.fixed new file mode 100644 index 00000000..76764291 --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/PSR12/Tests/Operators/OperatorSpacingUnitTest.inc.fixed @@ -0,0 +1,77 @@ + $b) { + $variable = $foo ? 'foo' : 'bar'; + $variable .= 'text' . 'text'; +} + +$foo += $a & $b; +$foo = $a | $b; +$foo = $a ^ $b; +$foo = ~$a; +$foo *= $a << $b; +$foo = $a >> $b; + +function foo(&$a,& $b) {} + +$foo = $a and $b; +$foo = $a or $b; +$foo = $a xor $b; +$foo = !$a; +$foo = $a && $b; +$foo = $a || $b; + +$foo = $a instanceof Foo; +$foo = $a instanceof $b; + +$foo .= 'hi' + .= 'there'; + +$foo .= 'hi' +.= 'there'; + +$foo .= 'hi' // comment +.= 'there'; + +$foo/*comment*/ = /*comment*/$a/*comment*/ and /*comment*/$b; + +$foo .= //comment +'string' .= /*comment*/ +'string'; + +$foo = $foo ?: 'bar'; +$foo = $foo ?: 'bar'; + +try { +} catch (ExceptionType1 | ExceptionType2 $e) { +} + +if (strpos($tokenContent, 'b"') === 0 && substr($tokenContent, -1) === '"') {} + +$oldConstructorPos = +1; +return -$content; + +function name($a = -1) {} + +$a =& $ref; +$a = [ 'a' => &$something ]; + +$fn = fn(array &$one) => 1; +$fn = fn(array & $one) => 1; + +$fn = static fn(DateTime $a, DateTime $b): int => -($a->getTimestamp() <=> $b->getTimestamp()); + +function issue3267(string|int ...$values) {} + +function setDefault(#[ImportValue( + constraints: [ + [ + Assert\Type::class, + ['type' => 'bool'], + ], + ] + )] ?bool $value = null): void + { + // Do something + } diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/PSR12/Tests/Operators/OperatorSpacingUnitTest.php b/vendor/squizlabs/php_codesniffer/src/Standards/PSR12/Tests/Operators/OperatorSpacingUnitTest.php new file mode 100644 index 00000000..e23fd968 --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/PSR12/Tests/Operators/OperatorSpacingUnitTest.php @@ -0,0 +1,69 @@ + + * @copyright 2006-2015 Squiz Pty Ltd (ABN 77 084 670 600) + * @license https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence + */ + +namespace PHP_CodeSniffer\Standards\PSR12\Tests\Operators; + +use PHP_CodeSniffer\Tests\Standards\AbstractSniffUnitTest; + +class OperatorSpacingUnitTest extends AbstractSniffUnitTest +{ + + + /** + * Returns the lines where errors should occur. + * + * The key of the array should represent the line number and the value + * should represent the number of errors that should occur on that line. + * + * @return array + */ + public function getErrorList() + { + return [ + 2 => 1, + 3 => 2, + 4 => 1, + 5 => 2, + 6 => 4, + 9 => 3, + 10 => 2, + 11 => 3, + 13 => 3, + 14 => 2, + 18 => 1, + 20 => 1, + 22 => 2, + 23 => 2, + 26 => 1, + 37 => 4, + 39 => 1, + 40 => 1, + 44 => 2, + 47 => 2, + ]; + + }//end getErrorList() + + + /** + * Returns the lines where warnings should occur. + * + * The key of the array should represent the line number and the value + * should represent the number of warnings that should occur on that line. + * + * @return array + */ + public function getWarningList() + { + return []; + + }//end getWarningList() + + +}//end class diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/PSR12/Tests/Properties/ConstantVisibilityUnitTest.inc b/vendor/squizlabs/php_codesniffer/src/Standards/PSR12/Tests/Properties/ConstantVisibilityUnitTest.inc new file mode 100644 index 00000000..c07b1b91 --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/PSR12/Tests/Properties/ConstantVisibilityUnitTest.inc @@ -0,0 +1,7 @@ + + * @copyright 2006-2019 Squiz Pty Ltd (ABN 77 084 670 600) + * @license https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence + */ + +namespace PHP_CodeSniffer\Standards\PSR12\Tests\Properties; + +use PHP_CodeSniffer\Tests\Standards\AbstractSniffUnitTest; + +class ConstantVisibilityUnitTest extends AbstractSniffUnitTest +{ + + + /** + * Returns the lines where errors should occur. + * + * The key of the array should represent the line number and the value + * should represent the number of errors that should occur on that line. + * + * @return array + */ + public function getErrorList() + { + return []; + + }//end getErrorList() + + + /** + * Returns the lines where warnings should occur. + * + * The key of the array should represent the line number and the value + * should represent the number of warnings that should occur on that line. + * + * @return array + */ + public function getWarningList() + { + return [4 => 1]; + + }//end getWarningList() + + +}//end class diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/PSR12/Tests/Traits/UseDeclarationUnitTest.inc b/vendor/squizlabs/php_codesniffer/src/Standards/PSR12/Tests/Traits/UseDeclarationUnitTest.inc new file mode 100644 index 00000000..e62489fe --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/PSR12/Tests/Traits/UseDeclarationUnitTest.inc @@ -0,0 +1,209 @@ + + * @copyright 2006-2019 Squiz Pty Ltd (ABN 77 084 670 600) + * @license https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence + */ + +namespace PHP_CodeSniffer\Standards\PSR12\Tests\Traits; + +use PHP_CodeSniffer\Tests\Standards\AbstractSniffUnitTest; + +class UseDeclarationUnitTest extends AbstractSniffUnitTest +{ + + + /** + * Returns the lines where errors should occur. + * + * The key of the array should represent the line number and the value + * should represent the number of errors that should occur on that line. + * + * @return array + */ + public function getErrorList() + { + return [ + 15 => 1, + 29 => 2, + 30 => 1, + 42 => 1, + 57 => 3, + 59 => 3, + 61 => 1, + 63 => 5, + 65 => 1, + 71 => 1, + 73 => 2, + 76 => 1, + 86 => 2, + 103 => 1, + 112 => 1, + 122 => 1, + 132 => 1, + 157 => 1, + 165 => 1, + 170 => 1, + 208 => 1, + ]; + + }//end getErrorList() + + + /** + * Returns the lines where warnings should occur. + * + * The key of the array should represent the line number and the value + * should represent the number of warnings that should occur on that line. + * + * @return array + */ + public function getWarningList() + { + return []; + + }//end getWarningList() + + +}//end class diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/PSR12/ruleset.xml b/vendor/squizlabs/php_codesniffer/src/Standards/PSR12/ruleset.xml new file mode 100644 index 00000000..ce8b71a7 --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/PSR12/ruleset.xml @@ -0,0 +1,347 @@ + + + The PSR-12 coding standard. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 0 + + + 0 + + + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + error + Method name "%s" must not be prefixed with an underscore to indicate visibility + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 0 + + + 0 + + + + + + + + + + + + + + + + + 0 + + + 0 + + + + + + + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 0 + + + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/PSR2/Docs/Classes/ClassDeclarationStandard.xml b/vendor/squizlabs/php_codesniffer/src/Standards/PSR2/Docs/Classes/ClassDeclarationStandard.xml new file mode 100644 index 00000000..4e56bc04 --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/PSR2/Docs/Classes/ClassDeclarationStandard.xml @@ -0,0 +1,23 @@ + + + + + + + class Foo +{ +} + ]]> + + + class Foo +{ +} + ]]> + + + diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/PSR2/Docs/Classes/PropertyDeclarationStandard.xml b/vendor/squizlabs/php_codesniffer/src/Standards/PSR2/Docs/Classes/PropertyDeclarationStandard.xml new file mode 100644 index 00000000..042c0c6c --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/PSR2/Docs/Classes/PropertyDeclarationStandard.xml @@ -0,0 +1,81 @@ + + + + + + + bar; +} + ]]> + + + _bar; +} + ]]> + + + + + private $bar; +} + ]]> + + + var $bar; +} + ]]> + + + + + + + + $bar, $baz; +} + ]]> + + + + + static $bar; + private $baz; +} + ]]> + + + static protected $bar; +} + ]]> + + + diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/PSR2/Docs/ControlStructures/ControlStructureSpacingStandard.xml b/vendor/squizlabs/php_codesniffer/src/Standards/PSR2/Docs/ControlStructures/ControlStructureSpacingStandard.xml new file mode 100644 index 00000000..dcbe98f5 --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/PSR2/Docs/ControlStructures/ControlStructureSpacingStandard.xml @@ -0,0 +1,23 @@ + + + + + + + $foo) { + $var = 1; +} + ]]> + + + $foo ) { + $var = 1; +} + ]]> + + + diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/PSR2/Docs/ControlStructures/ElseIfDeclarationStandard.xml b/vendor/squizlabs/php_codesniffer/src/Standards/PSR2/Docs/ControlStructures/ElseIfDeclarationStandard.xml new file mode 100644 index 00000000..a22dd179 --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/PSR2/Docs/ControlStructures/ElseIfDeclarationStandard.xml @@ -0,0 +1,27 @@ + + + + + + + elseif ($bar) { + $var = 2; +} + ]]> + + + else if ($bar) { + $var = 2; +} + ]]> + + + diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/PSR2/Docs/ControlStructures/SwitchDeclarationStandard.xml b/vendor/squizlabs/php_codesniffer/src/Standards/PSR2/Docs/ControlStructures/SwitchDeclarationStandard.xml new file mode 100644 index 00000000..1d6d053d --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/PSR2/Docs/ControlStructures/SwitchDeclarationStandard.xml @@ -0,0 +1,104 @@ + + + + + + + case 'bar': + break; +} + ]]> + + + case 'bar': + break; +} + ]]> + + + + + 'bar': + break; +} + ]]> + + + 'bar': + break; +} + ]]> + + + + + : + break; + default: + break; +} + ]]> + + + : + break; + default : + break; +} + ]]> + + + + + break; +} + ]]> + + + break; +} + ]]> + + + + + // no break + default: + break; +} + ]]> + + + : + break; +} + ]]> + + + diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/PSR2/Docs/Files/EndFileNewlineStandard.xml b/vendor/squizlabs/php_codesniffer/src/Standards/PSR2/Docs/Files/EndFileNewlineStandard.xml new file mode 100644 index 00000000..d6d3aad1 --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/PSR2/Docs/Files/EndFileNewlineStandard.xml @@ -0,0 +1,7 @@ + + + + + diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/PSR2/Docs/Methods/MethodDeclarationStandard.xml b/vendor/squizlabs/php_codesniffer/src/Standards/PSR2/Docs/Methods/MethodDeclarationStandard.xml new file mode 100644 index 00000000..e45469e8 --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/PSR2/Docs/Methods/MethodDeclarationStandard.xml @@ -0,0 +1,51 @@ + + + + + + + bar() + { + } +} + ]]> + + + _bar() + { + } +} + ]]> + + + + + final public static function bar() + { + } +} + ]]> + + + static public final function bar() + { + } +} + ]]> + + + diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/PSR2/Docs/Namespaces/NamespaceDeclarationStandard.xml b/vendor/squizlabs/php_codesniffer/src/Standards/PSR2/Docs/Namespaces/NamespaceDeclarationStandard.xml new file mode 100644 index 00000000..1f4d389a --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/PSR2/Docs/Namespaces/NamespaceDeclarationStandard.xml @@ -0,0 +1,22 @@ + + + + + + + +use \Baz; + ]]> + + + + + + diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/PSR2/Docs/Namespaces/UseDeclarationStandard.xml b/vendor/squizlabs/php_codesniffer/src/Standards/PSR2/Docs/Namespaces/UseDeclarationStandard.xml new file mode 100644 index 00000000..4082603c --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/PSR2/Docs/Namespaces/UseDeclarationStandard.xml @@ -0,0 +1,57 @@ + + + + + + + + + + \Foo, \Bar; + ]]> + + + + + + + + + + + + + +class Baz +{ +} + ]]> + + + + + + diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/PSR2/Sniffs/Classes/ClassDeclarationSniff.php b/vendor/squizlabs/php_codesniffer/src/Standards/PSR2/Sniffs/Classes/ClassDeclarationSniff.php new file mode 100644 index 00000000..f96b0049 --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/PSR2/Sniffs/Classes/ClassDeclarationSniff.php @@ -0,0 +1,528 @@ + + * @copyright 2006-2015 Squiz Pty Ltd (ABN 77 084 670 600) + * @license https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence + */ + +namespace PHP_CodeSniffer\Standards\PSR2\Sniffs\Classes; + +use PHP_CodeSniffer\Files\File; +use PHP_CodeSniffer\Standards\PEAR\Sniffs\Classes\ClassDeclarationSniff as PEARClassDeclarationSniff; +use PHP_CodeSniffer\Util\Tokens; + +class ClassDeclarationSniff extends PEARClassDeclarationSniff +{ + + /** + * The number of spaces code should be indented. + * + * @var integer + */ + public $indent = 4; + + + /** + * Processes this test, when one of its tokens is encountered. + * + * @param \PHP_CodeSniffer\Files\File $phpcsFile The file being scanned. + * @param int $stackPtr The position of the current token + * in the stack passed in $tokens. + * + * @return void + */ + public function process(File $phpcsFile, $stackPtr) + { + // We want all the errors from the PEAR standard, plus some of our own. + parent::process($phpcsFile, $stackPtr); + + // Just in case. + $tokens = $phpcsFile->getTokens(); + if (isset($tokens[$stackPtr]['scope_opener']) === false) { + return; + } + + $this->processOpen($phpcsFile, $stackPtr); + $this->processClose($phpcsFile, $stackPtr); + + }//end process() + + + /** + * Processes the opening section of a class declaration. + * + * @param \PHP_CodeSniffer\Files\File $phpcsFile The file being scanned. + * @param int $stackPtr The position of the current token + * in the stack passed in $tokens. + * + * @return void + */ + public function processOpen(File $phpcsFile, $stackPtr) + { + $tokens = $phpcsFile->getTokens(); + $stackPtrType = strtolower($tokens[$stackPtr]['content']); + + // Check alignment of the keyword and braces. + if ($tokens[($stackPtr - 1)]['code'] === T_WHITESPACE) { + $prevContent = $tokens[($stackPtr - 1)]['content']; + if ($prevContent !== $phpcsFile->eolChar) { + $blankSpace = substr($prevContent, strpos($prevContent, $phpcsFile->eolChar)); + $spaces = strlen($blankSpace); + + if (in_array($tokens[($stackPtr - 2)]['code'], [T_ABSTRACT, T_FINAL], true) === true + && $spaces !== 1 + ) { + $prevContent = strtolower($tokens[($stackPtr - 2)]['content']); + $error = 'Expected 1 space between %s and %s keywords; %s found'; + $data = [ + $prevContent, + $stackPtrType, + $spaces, + ]; + + $fix = $phpcsFile->addFixableError($error, $stackPtr, 'SpaceBeforeKeyword', $data); + if ($fix === true) { + $phpcsFile->fixer->replaceToken(($stackPtr - 1), ' '); + } + } + } else if ($tokens[($stackPtr - 2)]['code'] === T_ABSTRACT + || $tokens[($stackPtr - 2)]['code'] === T_FINAL + ) { + $prevContent = strtolower($tokens[($stackPtr - 2)]['content']); + $error = 'Expected 1 space between %s and %s keywords; newline found'; + $data = [ + $prevContent, + $stackPtrType, + ]; + + $fix = $phpcsFile->addFixableError($error, $stackPtr, 'NewlineBeforeKeyword', $data); + if ($fix === true) { + $phpcsFile->fixer->replaceToken(($stackPtr - 1), ' '); + } + }//end if + }//end if + + // We'll need the indent of the class/interface declaration for later. + $classIndent = 0; + for ($i = ($stackPtr - 1); $i > 0; $i--) { + if ($tokens[$i]['line'] === $tokens[$stackPtr]['line']) { + continue; + } + + // We changed lines. + if ($tokens[($i + 1)]['code'] === T_WHITESPACE) { + $classIndent = $tokens[($i + 1)]['length']; + } + + break; + } + + $className = null; + $checkSpacing = true; + + if ($tokens[$stackPtr]['code'] !== T_ANON_CLASS) { + $className = $phpcsFile->findNext(T_STRING, $stackPtr); + } else { + // Ignore the spacing check if this is a simple anon class. + $next = $phpcsFile->findNext(T_WHITESPACE, ($stackPtr + 1), null, true); + if ($next === $tokens[$stackPtr]['scope_opener'] + && $tokens[$next]['line'] > $tokens[$stackPtr]['line'] + ) { + $checkSpacing = false; + } + } + + if ($checkSpacing === true) { + // Spacing of the keyword. + if ($tokens[($stackPtr + 1)]['code'] !== T_WHITESPACE) { + $gap = 0; + } else if ($tokens[($stackPtr + 2)]['line'] !== $tokens[$stackPtr]['line']) { + $gap = 'newline'; + } else { + $gap = $tokens[($stackPtr + 1)]['length']; + } + + if ($gap !== 1) { + $error = 'Expected 1 space after %s keyword; %s found'; + $data = [ + $stackPtrType, + $gap, + ]; + + $fix = $phpcsFile->addFixableError($error, $stackPtr, 'SpaceAfterKeyword', $data); + if ($fix === true) { + if ($gap === 0) { + $phpcsFile->fixer->addContent($stackPtr, ' '); + } else { + $phpcsFile->fixer->replaceToken(($stackPtr + 1), ' '); + } + } + } + }//end if + + // Check after the class/interface name. + if ($className !== null + && $tokens[($className + 2)]['line'] === $tokens[$className]['line'] + ) { + $gap = $tokens[($className + 1)]['content']; + if (strlen($gap) !== 1) { + $found = strlen($gap); + $error = 'Expected 1 space after %s name; %s found'; + $data = [ + $stackPtrType, + $found, + ]; + + $fix = $phpcsFile->addFixableError($error, $className, 'SpaceAfterName', $data); + if ($fix === true) { + $phpcsFile->fixer->replaceToken(($className + 1), ' '); + } + } + } + + $openingBrace = $tokens[$stackPtr]['scope_opener']; + + // Check positions of the extends and implements keywords. + $compareToken = $stackPtr; + $compareType = 'name'; + if ($tokens[$stackPtr]['code'] === T_ANON_CLASS) { + if (isset($tokens[$stackPtr]['parenthesis_opener']) === true) { + $compareToken = $tokens[$stackPtr]['parenthesis_closer']; + $compareType = 'closing parenthesis'; + } else { + $compareType = 'keyword'; + } + } + + foreach (['extends', 'implements'] as $keywordType) { + $keyword = $phpcsFile->findNext(constant('T_'.strtoupper($keywordType)), ($compareToken + 1), $openingBrace); + if ($keyword !== false) { + if ($tokens[$keyword]['line'] !== $tokens[$compareToken]['line']) { + $error = 'The '.$keywordType.' keyword must be on the same line as the %s '.$compareType; + $data = [$stackPtrType]; + $fix = $phpcsFile->addFixableError($error, $keyword, ucfirst($keywordType).'Line', $data); + if ($fix === true) { + $phpcsFile->fixer->beginChangeset(); + $comments = []; + + for ($i = ($compareToken + 1); $i < $keyword; ++$i) { + if ($tokens[$i]['code'] === T_COMMENT) { + $comments[] = trim($tokens[$i]['content']); + } + + if ($tokens[$i]['code'] === T_WHITESPACE + || $tokens[$i]['code'] === T_COMMENT + ) { + $phpcsFile->fixer->replaceToken($i, ' '); + } + } + + $phpcsFile->fixer->addContent($compareToken, ' '); + if (empty($comments) === false) { + $i = $keyword; + while ($tokens[($i + 1)]['line'] === $tokens[$keyword]['line']) { + ++$i; + } + + $phpcsFile->fixer->addContentBefore($i, ' '.implode(' ', $comments)); + } + + $phpcsFile->fixer->endChangeset(); + }//end if + } else { + // Check the whitespace before. Whitespace after is checked + // later by looking at the whitespace before the first class name + // in the list. + $gap = $tokens[($keyword - 1)]['length']; + if ($gap !== 1) { + $error = 'Expected 1 space before '.$keywordType.' keyword; %s found'; + $data = [$gap]; + $fix = $phpcsFile->addFixableError($error, $keyword, 'SpaceBefore'.ucfirst($keywordType), $data); + if ($fix === true) { + $phpcsFile->fixer->replaceToken(($keyword - 1), ' '); + } + } + }//end if + }//end if + }//end foreach + + // Check each of the extends/implements class names. If the extends/implements + // keyword is the last content on the line, it means we need to check for + // the multi-line format, so we do not include the class names + // from the extends/implements list in the following check. + // Note that classes can only extend one other class, so they can't use a + // multi-line extends format, whereas an interface can extend multiple + // other interfaces, and so uses a multi-line extends format. + if ($tokens[$stackPtr]['code'] === T_INTERFACE) { + $keywordTokenType = T_EXTENDS; + } else { + $keywordTokenType = T_IMPLEMENTS; + } + + $implements = $phpcsFile->findNext($keywordTokenType, ($stackPtr + 1), $openingBrace); + $multiLineImplements = false; + if ($implements !== false) { + $prev = $phpcsFile->findPrevious(Tokens::$emptyTokens, ($openingBrace - 1), $implements, true); + if ($tokens[$prev]['line'] !== $tokens[$implements]['line']) { + $multiLineImplements = true; + } + } + + $find = [ + T_STRING, + $keywordTokenType, + ]; + + if ($className !== null) { + $start = $className; + } else if (isset($tokens[$stackPtr]['parenthesis_closer']) === true) { + $start = $tokens[$stackPtr]['parenthesis_closer']; + } else { + $start = $stackPtr; + } + + $classNames = []; + $nextClass = $phpcsFile->findNext($find, ($start + 2), ($openingBrace - 1)); + while ($nextClass !== false) { + $classNames[] = $nextClass; + $nextClass = $phpcsFile->findNext($find, ($nextClass + 1), ($openingBrace - 1)); + } + + $classCount = count($classNames); + $checkingImplements = false; + $implementsToken = null; + foreach ($classNames as $n => $className) { + if ($tokens[$className]['code'] === $keywordTokenType) { + $checkingImplements = true; + $implementsToken = $className; + + continue; + } + + if ($checkingImplements === true + && $multiLineImplements === true + && ($tokens[($className - 1)]['code'] !== T_NS_SEPARATOR + || $tokens[($className - 2)]['code'] !== T_STRING) + ) { + $prev = $phpcsFile->findPrevious( + [ + T_NS_SEPARATOR, + T_WHITESPACE, + ], + ($className - 1), + $implements, + true + ); + + if ($prev === $implementsToken && $tokens[$className]['line'] !== ($tokens[$prev]['line'] + 1)) { + if ($keywordTokenType === T_EXTENDS) { + $error = 'The first item in a multi-line extends list must be on the line following the extends keyword'; + $fix = $phpcsFile->addFixableError($error, $className, 'FirstExtendsInterfaceSameLine'); + } else { + $error = 'The first item in a multi-line implements list must be on the line following the implements keyword'; + $fix = $phpcsFile->addFixableError($error, $className, 'FirstInterfaceSameLine'); + } + + if ($fix === true) { + $phpcsFile->fixer->beginChangeset(); + for ($i = ($prev + 1); $i < $className; $i++) { + if ($tokens[$i]['code'] !== T_WHITESPACE) { + break; + } + + $phpcsFile->fixer->replaceToken($i, ''); + } + + $phpcsFile->fixer->addNewline($prev); + $phpcsFile->fixer->endChangeset(); + } + } else if ($tokens[$prev]['line'] !== ($tokens[$className]['line'] - 1)) { + if ($keywordTokenType === T_EXTENDS) { + $error = 'Only one interface may be specified per line in a multi-line extends declaration'; + $fix = $phpcsFile->addFixableError($error, $className, 'ExtendsInterfaceSameLine'); + } else { + $error = 'Only one interface may be specified per line in a multi-line implements declaration'; + $fix = $phpcsFile->addFixableError($error, $className, 'InterfaceSameLine'); + } + + if ($fix === true) { + $phpcsFile->fixer->beginChangeset(); + for ($i = ($prev + 1); $i < $className; $i++) { + if ($tokens[$i]['code'] !== T_WHITESPACE) { + break; + } + + $phpcsFile->fixer->replaceToken($i, ''); + } + + $phpcsFile->fixer->addNewline($prev); + $phpcsFile->fixer->endChangeset(); + } + } else { + $prev = $phpcsFile->findPrevious(T_WHITESPACE, ($className - 1), $implements); + if ($tokens[$prev]['line'] !== $tokens[$className]['line']) { + $found = 0; + } else { + $found = $tokens[$prev]['length']; + } + + $expected = ($classIndent + $this->indent); + if ($found !== $expected) { + $error = 'Expected %s spaces before interface name; %s found'; + $data = [ + $expected, + $found, + ]; + $fix = $phpcsFile->addFixableError($error, $className, 'InterfaceWrongIndent', $data); + if ($fix === true) { + $padding = str_repeat(' ', $expected); + if ($found === 0) { + $phpcsFile->fixer->addContent($prev, $padding); + } else { + $phpcsFile->fixer->replaceToken($prev, $padding); + } + } + } + }//end if + } else if ($tokens[($className - 1)]['code'] !== T_NS_SEPARATOR + || $tokens[($className - 2)]['code'] !== T_STRING + ) { + // Not part of a longer fully qualified class name. + if ($tokens[($className - 1)]['code'] === T_COMMA + || ($tokens[($className - 1)]['code'] === T_NS_SEPARATOR + && $tokens[($className - 2)]['code'] === T_COMMA) + ) { + $error = 'Expected 1 space before "%s"; 0 found'; + $data = [$tokens[$className]['content']]; + $fix = $phpcsFile->addFixableError($error, ($nextComma + 1), 'NoSpaceBeforeName', $data); + if ($fix === true) { + $phpcsFile->fixer->addContentBefore(($nextComma + 1), ' '); + } + } else { + if ($tokens[($className - 1)]['code'] === T_NS_SEPARATOR) { + $prev = ($className - 2); + } else { + $prev = ($className - 1); + } + + $last = $phpcsFile->findPrevious(T_WHITESPACE, $prev, null, true); + $content = $phpcsFile->getTokensAsString(($last + 1), ($prev - $last)); + if ($content !== ' ') { + $found = strlen($content); + + $error = 'Expected 1 space before "%s"; %s found'; + $data = [ + $tokens[$className]['content'], + $found, + ]; + + $fix = $phpcsFile->addFixableError($error, $className, 'SpaceBeforeName', $data); + if ($fix === true) { + if ($tokens[$prev]['code'] === T_WHITESPACE) { + $phpcsFile->fixer->beginChangeset(); + $phpcsFile->fixer->replaceToken($prev, ' '); + while ($tokens[--$prev]['code'] === T_WHITESPACE) { + $phpcsFile->fixer->replaceToken($prev, ' '); + } + + $phpcsFile->fixer->endChangeset(); + } else { + $phpcsFile->fixer->addContent($prev, ' '); + } + } + }//end if + }//end if + }//end if + + if ($checkingImplements === true + && $tokens[($className + 1)]['code'] !== T_NS_SEPARATOR + && $tokens[($className + 1)]['code'] !== T_COMMA + ) { + if ($n !== ($classCount - 1)) { + // This is not the last class name, and the comma + // is not where we expect it to be. + if ($tokens[($className + 2)]['code'] !== $keywordTokenType) { + $error = 'Expected 0 spaces between "%s" and comma; %s found'; + $data = [ + $tokens[$className]['content'], + $tokens[($className + 1)]['length'], + ]; + + $fix = $phpcsFile->addFixableError($error, $className, 'SpaceBeforeComma', $data); + if ($fix === true) { + $phpcsFile->fixer->replaceToken(($className + 1), ''); + } + } + } + + $nextComma = $phpcsFile->findNext(T_COMMA, $className); + } else { + $nextComma = ($className + 1); + }//end if + }//end foreach + + }//end processOpen() + + + /** + * Processes the closing section of a class declaration. + * + * @param \PHP_CodeSniffer\Files\File $phpcsFile The file being scanned. + * @param int $stackPtr The position of the current token + * in the stack passed in $tokens. + * + * @return void + */ + public function processClose(File $phpcsFile, $stackPtr) + { + $tokens = $phpcsFile->getTokens(); + + // Check that the closing brace comes right after the code body. + $closeBrace = $tokens[$stackPtr]['scope_closer']; + $prevContent = $phpcsFile->findPrevious(T_WHITESPACE, ($closeBrace - 1), null, true); + if ($prevContent !== $tokens[$stackPtr]['scope_opener'] + && $tokens[$prevContent]['line'] !== ($tokens[$closeBrace]['line'] - 1) + ) { + $error = 'The closing brace for the %s must go on the next line after the body'; + $data = [$tokens[$stackPtr]['content']]; + $fix = $phpcsFile->addFixableError($error, $closeBrace, 'CloseBraceAfterBody', $data); + + if ($fix === true) { + $phpcsFile->fixer->beginChangeset(); + for ($i = ($prevContent + 1); $i < $closeBrace; $i++) { + $phpcsFile->fixer->replaceToken($i, ''); + } + + if (strpos($tokens[$prevContent]['content'], $phpcsFile->eolChar) === false) { + $phpcsFile->fixer->replaceToken($closeBrace, $phpcsFile->eolChar.$tokens[$closeBrace]['content']); + } + + $phpcsFile->fixer->endChangeset(); + } + }//end if + + if ($tokens[$stackPtr]['code'] !== T_ANON_CLASS) { + // Check the closing brace is on it's own line, but allow + // for comments like "//end class". + $ignoreTokens = Tokens::$phpcsCommentTokens; + $ignoreTokens[] = T_WHITESPACE; + $ignoreTokens[] = T_COMMENT; + $ignoreTokens[] = T_SEMICOLON; + $ignoreTokens[] = T_COMMA; + $nextContent = $phpcsFile->findNext($ignoreTokens, ($closeBrace + 1), null, true); + if ($tokens[$nextContent]['content'] !== $phpcsFile->eolChar + && $tokens[$nextContent]['line'] === $tokens[$closeBrace]['line'] + ) { + $type = strtolower($tokens[$stackPtr]['content']); + $error = 'Closing %s brace must be on a line by itself'; + $data = [$type]; + $phpcsFile->addError($error, $closeBrace, 'CloseBraceSameLine', $data); + } + } + + }//end processClose() + + +}//end class diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/PSR2/Sniffs/Classes/PropertyDeclarationSniff.php b/vendor/squizlabs/php_codesniffer/src/Standards/PSR2/Sniffs/Classes/PropertyDeclarationSniff.php new file mode 100644 index 00000000..8a158d96 --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/PSR2/Sniffs/Classes/PropertyDeclarationSniff.php @@ -0,0 +1,184 @@ + + * @copyright 2006-2015 Squiz Pty Ltd (ABN 77 084 670 600) + * @license https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence + */ + +namespace PHP_CodeSniffer\Standards\PSR2\Sniffs\Classes; + +use PHP_CodeSniffer\Files\File; +use PHP_CodeSniffer\Sniffs\AbstractVariableSniff; +use PHP_CodeSniffer\Util\Tokens; + +class PropertyDeclarationSniff extends AbstractVariableSniff +{ + + + /** + * Processes the function tokens within the class. + * + * @param \PHP_CodeSniffer\Files\File $phpcsFile The file where this token was found. + * @param int $stackPtr The position where the token was found. + * + * @return void + */ + protected function processMemberVar(File $phpcsFile, $stackPtr) + { + $tokens = $phpcsFile->getTokens(); + + if ($tokens[$stackPtr]['content'][1] === '_') { + $error = 'Property name "%s" should not be prefixed with an underscore to indicate visibility'; + $data = [$tokens[$stackPtr]['content']]; + $phpcsFile->addWarning($error, $stackPtr, 'Underscore', $data); + } + + // Detect multiple properties defined at the same time. Throw an error + // for this, but also only process the first property in the list so we don't + // repeat errors. + $find = Tokens::$scopeModifiers; + $find[] = T_VARIABLE; + $find[] = T_VAR; + $find[] = T_SEMICOLON; + $find[] = T_OPEN_CURLY_BRACKET; + + $prev = $phpcsFile->findPrevious($find, ($stackPtr - 1)); + if ($tokens[$prev]['code'] === T_VARIABLE) { + return; + } + + if ($tokens[$prev]['code'] === T_VAR) { + $error = 'The var keyword must not be used to declare a property'; + $phpcsFile->addError($error, $stackPtr, 'VarUsed'); + } + + $next = $phpcsFile->findNext([T_VARIABLE, T_SEMICOLON], ($stackPtr + 1)); + if ($next !== false && $tokens[$next]['code'] === T_VARIABLE) { + $error = 'There must not be more than one property declared per statement'; + $phpcsFile->addError($error, $stackPtr, 'Multiple'); + } + + try { + $propertyInfo = $phpcsFile->getMemberProperties($stackPtr); + if (empty($propertyInfo) === true) { + return; + } + } catch (\Exception $e) { + // Turns out not to be a property after all. + return; + } + + if ($propertyInfo['type'] !== '') { + $typeToken = $propertyInfo['type_end_token']; + $error = 'There must be 1 space after the property type declaration; %s found'; + if ($tokens[($typeToken + 1)]['code'] !== T_WHITESPACE) { + $data = ['0']; + $fix = $phpcsFile->addFixableError($error, $typeToken, 'SpacingAfterType', $data); + if ($fix === true) { + $phpcsFile->fixer->addContent($typeToken, ' '); + } + } else if ($tokens[($typeToken + 1)]['content'] !== ' ') { + $next = $phpcsFile->findNext(T_WHITESPACE, ($typeToken + 1), null, true); + if ($tokens[$next]['line'] !== $tokens[$typeToken]['line']) { + $found = 'newline'; + } else { + $found = $tokens[($typeToken + 1)]['length']; + } + + $data = [$found]; + + $nextNonWs = $phpcsFile->findNext(Tokens::$emptyTokens, ($typeToken + 1), null, true); + if ($nextNonWs !== $next) { + $phpcsFile->addError($error, $typeToken, 'SpacingAfterType', $data); + } else { + $fix = $phpcsFile->addFixableError($error, $typeToken, 'SpacingAfterType', $data); + if ($fix === true) { + if ($found === 'newline') { + $phpcsFile->fixer->beginChangeset(); + for ($x = ($typeToken + 1); $x < $next; $x++) { + $phpcsFile->fixer->replaceToken($x, ''); + } + + $phpcsFile->fixer->addContent($typeToken, ' '); + $phpcsFile->fixer->endChangeset(); + } else { + $phpcsFile->fixer->replaceToken(($typeToken + 1), ' '); + } + } + } + }//end if + }//end if + + if ($propertyInfo['scope_specified'] === false) { + $error = 'Visibility must be declared on property "%s"'; + $data = [$tokens[$stackPtr]['content']]; + $phpcsFile->addError($error, $stackPtr, 'ScopeMissing', $data); + } + + if ($propertyInfo['scope_specified'] === true && $propertyInfo['is_static'] === true) { + $scopePtr = $phpcsFile->findPrevious(Tokens::$scopeModifiers, ($stackPtr - 1)); + $staticPtr = $phpcsFile->findPrevious(T_STATIC, ($stackPtr - 1)); + if ($scopePtr < $staticPtr) { + return; + } + + $error = 'The static declaration must come after the visibility declaration'; + $fix = $phpcsFile->addFixableError($error, $stackPtr, 'StaticBeforeVisibility'); + if ($fix === true) { + $phpcsFile->fixer->beginChangeset(); + + for ($i = ($scopePtr + 1); $scopePtr < $stackPtr; $i++) { + if ($tokens[$i]['code'] !== T_WHITESPACE) { + break; + } + + $phpcsFile->fixer->replaceToken($i, ''); + } + + $phpcsFile->fixer->replaceToken($scopePtr, ''); + $phpcsFile->fixer->addContentBefore($staticPtr, $propertyInfo['scope'].' '); + + $phpcsFile->fixer->endChangeset(); + } + }//end if + + }//end processMemberVar() + + + /** + * Processes normal variables. + * + * @param \PHP_CodeSniffer\Files\File $phpcsFile The file where this token was found. + * @param int $stackPtr The position where the token was found. + * + * @return void + */ + protected function processVariable(File $phpcsFile, $stackPtr) + { + /* + We don't care about normal variables. + */ + + }//end processVariable() + + + /** + * Processes variables in double quoted strings. + * + * @param \PHP_CodeSniffer\Files\File $phpcsFile The file where this token was found. + * @param int $stackPtr The position where the token was found. + * + * @return void + */ + protected function processVariableInString(File $phpcsFile, $stackPtr) + { + /* + We don't care about normal variables. + */ + + }//end processVariableInString() + + +}//end class diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/PSR2/Sniffs/ControlStructures/ControlStructureSpacingSniff.php b/vendor/squizlabs/php_codesniffer/src/Standards/PSR2/Sniffs/ControlStructures/ControlStructureSpacingSniff.php new file mode 100644 index 00000000..09d2c14a --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/PSR2/Sniffs/ControlStructures/ControlStructureSpacingSniff.php @@ -0,0 +1,142 @@ + + * @copyright 2006-2015 Squiz Pty Ltd (ABN 77 084 670 600) + * @license https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence + */ + +namespace PHP_CodeSniffer\Standards\PSR2\Sniffs\ControlStructures; + +use PHP_CodeSniffer\Files\File; +use PHP_CodeSniffer\Sniffs\Sniff; +use PHP_CodeSniffer\Util\Tokens; + +class ControlStructureSpacingSniff implements Sniff +{ + + /** + * How many spaces should follow the opening bracket. + * + * @var integer + */ + public $requiredSpacesAfterOpen = 0; + + /** + * How many spaces should precede the closing bracket. + * + * @var integer + */ + public $requiredSpacesBeforeClose = 0; + + + /** + * Returns an array of tokens this test wants to listen for. + * + * @return array + */ + public function register() + { + return [ + T_IF, + T_WHILE, + T_FOREACH, + T_FOR, + T_SWITCH, + T_ELSE, + T_ELSEIF, + T_CATCH, + T_MATCH, + ]; + + }//end register() + + + /** + * Processes this test, when one of its tokens is encountered. + * + * @param \PHP_CodeSniffer\Files\File $phpcsFile The file being scanned. + * @param int $stackPtr The position of the current token + * in the stack passed in $tokens. + * + * @return void + */ + public function process(File $phpcsFile, $stackPtr) + { + $this->requiredSpacesAfterOpen = (int) $this->requiredSpacesAfterOpen; + $this->requiredSpacesBeforeClose = (int) $this->requiredSpacesBeforeClose; + $tokens = $phpcsFile->getTokens(); + + if (isset($tokens[$stackPtr]['parenthesis_opener']) === false + || isset($tokens[$stackPtr]['parenthesis_closer']) === false + ) { + return; + } + + $parenOpener = $tokens[$stackPtr]['parenthesis_opener']; + $parenCloser = $tokens[$stackPtr]['parenthesis_closer']; + $nextContent = $phpcsFile->findNext(T_WHITESPACE, ($parenOpener + 1), null, true); + if (in_array($tokens[$nextContent]['code'], Tokens::$commentTokens, true) === false) { + $spaceAfterOpen = 0; + if ($tokens[($parenOpener + 1)]['code'] === T_WHITESPACE) { + if (strpos($tokens[($parenOpener + 1)]['content'], $phpcsFile->eolChar) !== false) { + $spaceAfterOpen = 'newline'; + } else { + $spaceAfterOpen = $tokens[($parenOpener + 1)]['length']; + } + } + + $phpcsFile->recordMetric($stackPtr, 'Spaces after control structure open parenthesis', $spaceAfterOpen); + + if ($spaceAfterOpen !== $this->requiredSpacesAfterOpen) { + $error = 'Expected %s spaces after opening bracket; %s found'; + $data = [ + $this->requiredSpacesAfterOpen, + $spaceAfterOpen, + ]; + $fix = $phpcsFile->addFixableError($error, ($parenOpener + 1), 'SpacingAfterOpenBrace', $data); + if ($fix === true) { + $padding = str_repeat(' ', $this->requiredSpacesAfterOpen); + if ($spaceAfterOpen === 0) { + $phpcsFile->fixer->addContent($parenOpener, $padding); + } else if ($spaceAfterOpen === 'newline') { + $phpcsFile->fixer->replaceToken(($parenOpener + 1), ''); + } else { + $phpcsFile->fixer->replaceToken(($parenOpener + 1), $padding); + } + } + } + }//end if + + $prev = $phpcsFile->findPrevious(T_WHITESPACE, ($parenCloser - 1), $parenOpener, true); + if ($tokens[$prev]['line'] === $tokens[$parenCloser]['line']) { + $spaceBeforeClose = 0; + if ($tokens[($parenCloser - 1)]['code'] === T_WHITESPACE) { + $spaceBeforeClose = strlen(ltrim($tokens[($parenCloser - 1)]['content'], $phpcsFile->eolChar)); + } + + $phpcsFile->recordMetric($stackPtr, 'Spaces before control structure close parenthesis', $spaceBeforeClose); + + if ($spaceBeforeClose !== $this->requiredSpacesBeforeClose) { + $error = 'Expected %s spaces before closing bracket; %s found'; + $data = [ + $this->requiredSpacesBeforeClose, + $spaceBeforeClose, + ]; + $fix = $phpcsFile->addFixableError($error, ($parenCloser - 1), 'SpaceBeforeCloseBrace', $data); + if ($fix === true) { + $padding = str_repeat(' ', $this->requiredSpacesBeforeClose); + if ($spaceBeforeClose === 0) { + $phpcsFile->fixer->addContentBefore($parenCloser, $padding); + } else { + $phpcsFile->fixer->replaceToken(($parenCloser - 1), $padding); + } + } + } + }//end if + + }//end process() + + +}//end class diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/PSR2/Sniffs/ControlStructures/ElseIfDeclarationSniff.php b/vendor/squizlabs/php_codesniffer/src/Standards/PSR2/Sniffs/ControlStructures/ElseIfDeclarationSniff.php new file mode 100644 index 00000000..9f97684a --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/PSR2/Sniffs/ControlStructures/ElseIfDeclarationSniff.php @@ -0,0 +1,72 @@ + + * @copyright 2006-2015 Squiz Pty Ltd (ABN 77 084 670 600) + * @license https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence + */ + +namespace PHP_CodeSniffer\Standards\PSR2\Sniffs\ControlStructures; + +use PHP_CodeSniffer\Files\File; +use PHP_CodeSniffer\Sniffs\Sniff; + +class ElseIfDeclarationSniff implements Sniff +{ + + + /** + * Returns an array of tokens this test wants to listen for. + * + * @return array + */ + public function register() + { + return [ + T_ELSE, + T_ELSEIF, + ]; + + }//end register() + + + /** + * Processes this test, when one of its tokens is encountered. + * + * @param \PHP_CodeSniffer\Files\File $phpcsFile The file being scanned. + * @param int $stackPtr The position of the current token in the + * stack passed in $tokens. + * + * @return void + */ + public function process(File $phpcsFile, $stackPtr) + { + $tokens = $phpcsFile->getTokens(); + + if ($tokens[$stackPtr]['code'] === T_ELSEIF) { + $phpcsFile->recordMetric($stackPtr, 'Use of ELSE IF or ELSEIF', 'elseif'); + return; + } + + $next = $phpcsFile->findNext(T_WHITESPACE, ($stackPtr + 1), null, true); + if ($tokens[$next]['code'] === T_IF) { + $phpcsFile->recordMetric($stackPtr, 'Use of ELSE IF or ELSEIF', 'else if'); + $error = 'Usage of ELSE IF is discouraged; use ELSEIF instead'; + $fix = $phpcsFile->addFixableWarning($error, $stackPtr, 'NotAllowed'); + + if ($fix === true) { + $phpcsFile->fixer->beginChangeset(); + $phpcsFile->fixer->replaceToken($stackPtr, 'elseif'); + for ($i = ($stackPtr + 1); $i <= $next; $i++) { + $phpcsFile->fixer->replaceToken($i, ''); + } + + $phpcsFile->fixer->endChangeset(); + } + } + + }//end process() + + +}//end class diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/PSR2/Sniffs/ControlStructures/SwitchDeclarationSniff.php b/vendor/squizlabs/php_codesniffer/src/Standards/PSR2/Sniffs/ControlStructures/SwitchDeclarationSniff.php new file mode 100644 index 00000000..e36b1342 --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/PSR2/Sniffs/ControlStructures/SwitchDeclarationSniff.php @@ -0,0 +1,396 @@ + + * @copyright 2006-2015 Squiz Pty Ltd (ABN 77 084 670 600) + * @license https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence + */ + +namespace PHP_CodeSniffer\Standards\PSR2\Sniffs\ControlStructures; + +use PHP_CodeSniffer\Files\File; +use PHP_CodeSniffer\Sniffs\Sniff; +use PHP_CodeSniffer\Util\Tokens; + +class SwitchDeclarationSniff implements Sniff +{ + + /** + * The number of spaces code should be indented. + * + * @var integer + */ + public $indent = 4; + + + /** + * Returns an array of tokens this test wants to listen for. + * + * @return array + */ + public function register() + { + return [T_SWITCH]; + + }//end register() + + + /** + * Processes this test, when one of its tokens is encountered. + * + * @param \PHP_CodeSniffer\Files\File $phpcsFile The file being scanned. + * @param int $stackPtr The position of the current token in the + * stack passed in $tokens. + * + * @return void + */ + public function process(File $phpcsFile, $stackPtr) + { + $tokens = $phpcsFile->getTokens(); + + // We can't process SWITCH statements unless we know where they start and end. + if (isset($tokens[$stackPtr]['scope_opener']) === false + || isset($tokens[$stackPtr]['scope_closer']) === false + ) { + return; + } + + $switch = $tokens[$stackPtr]; + $nextCase = $stackPtr; + $caseAlignment = ($switch['column'] + $this->indent); + + while (($nextCase = $this->findNextCase($phpcsFile, ($nextCase + 1), $switch['scope_closer'])) !== false) { + if ($tokens[$nextCase]['code'] === T_DEFAULT) { + $type = 'default'; + } else { + $type = 'case'; + } + + if ($tokens[$nextCase]['content'] !== strtolower($tokens[$nextCase]['content'])) { + $expected = strtolower($tokens[$nextCase]['content']); + $error = strtoupper($type).' keyword must be lowercase; expected "%s" but found "%s"'; + $data = [ + $expected, + $tokens[$nextCase]['content'], + ]; + + $fix = $phpcsFile->addFixableError($error, $nextCase, $type.'NotLower', $data); + if ($fix === true) { + $phpcsFile->fixer->replaceToken($nextCase, $expected); + } + } + + if ($type === 'case' + && ($tokens[($nextCase + 1)]['code'] !== T_WHITESPACE + || $tokens[($nextCase + 1)]['content'] !== ' ') + ) { + $error = 'CASE keyword must be followed by a single space'; + $fix = $phpcsFile->addFixableError($error, $nextCase, 'SpacingAfterCase'); + if ($fix === true) { + if ($tokens[($nextCase + 1)]['code'] !== T_WHITESPACE) { + $phpcsFile->fixer->addContent($nextCase, ' '); + } else { + $phpcsFile->fixer->replaceToken(($nextCase + 1), ' '); + } + } + } + + $opener = $tokens[$nextCase]['scope_opener']; + $nextCloser = $tokens[$nextCase]['scope_closer']; + if ($tokens[$opener]['code'] === T_COLON) { + if ($tokens[($opener - 1)]['code'] === T_WHITESPACE) { + $error = 'There must be no space before the colon in a '.strtoupper($type).' statement'; + $fix = $phpcsFile->addFixableError($error, $nextCase, 'SpaceBeforeColon'.strtoupper($type)); + if ($fix === true) { + $phpcsFile->fixer->replaceToken(($opener - 1), ''); + } + } + + for ($next = ($opener + 1); $next < $nextCloser; $next++) { + if (isset(Tokens::$emptyTokens[$tokens[$next]['code']]) === false + || (isset(Tokens::$commentTokens[$tokens[$next]['code']]) === true + && $tokens[$next]['line'] !== $tokens[$opener]['line']) + ) { + break; + } + } + + if ($tokens[$next]['line'] !== ($tokens[$opener]['line'] + 1)) { + $error = 'The '.strtoupper($type).' body must start on the line following the statement'; + $fix = $phpcsFile->addFixableError($error, $nextCase, 'BodyOnNextLine'.strtoupper($type)); + if ($fix === true) { + if ($tokens[$next]['line'] === $tokens[$opener]['line']) { + $padding = str_repeat(' ', ($caseAlignment + $this->indent - 1)); + $phpcsFile->fixer->addContentBefore($next, $phpcsFile->eolChar.$padding); + } else { + $phpcsFile->fixer->beginChangeset(); + for ($i = ($opener + 1); $i < $next; $i++) { + if ($tokens[$i]['line'] === $tokens[$opener]['line']) { + // Ignore trailing comments. + continue; + } + + if ($tokens[$i]['line'] === $tokens[$next]['line']) { + break; + } + + $phpcsFile->fixer->replaceToken($i, ''); + } + + $phpcsFile->fixer->endChangeset(); + } + }//end if + }//end if + + if ($tokens[$nextCloser]['scope_condition'] === $nextCase) { + // Only need to check some things once, even if the + // closer is shared between multiple case statements, or even + // the default case. + $prev = $phpcsFile->findPrevious(T_WHITESPACE, ($nextCloser - 1), $nextCase, true); + if ($tokens[$prev]['line'] === $tokens[$nextCloser]['line']) { + $error = 'Terminating statement must be on a line by itself'; + $fix = $phpcsFile->addFixableError($error, $nextCloser, 'BreakNotNewLine'); + if ($fix === true) { + $phpcsFile->fixer->addNewLine($prev); + $phpcsFile->fixer->replaceToken($nextCloser, trim($tokens[$nextCloser]['content'])); + } + } else { + $diff = ($tokens[$nextCase]['column'] + $this->indent - $tokens[$nextCloser]['column']); + if ($diff !== 0) { + $error = 'Terminating statement must be indented to the same level as the CASE body'; + $fix = $phpcsFile->addFixableError($error, $nextCloser, 'BreakIndent'); + if ($fix === true) { + if ($diff > 0) { + $phpcsFile->fixer->addContentBefore($nextCloser, str_repeat(' ', $diff)); + } else { + $phpcsFile->fixer->substrToken(($nextCloser - 1), 0, $diff); + } + } + } + }//end if + }//end if + } else { + $error = strtoupper($type).' statements must be defined using a colon'; + $phpcsFile->addError($error, $nextCase, 'WrongOpener'.$type); + }//end if + + // We only want cases from here on in. + if ($type !== 'case') { + continue; + } + + $nextCode = $phpcsFile->findNext(T_WHITESPACE, ($opener + 1), $nextCloser, true); + + if ($tokens[$nextCode]['code'] !== T_CASE && $tokens[$nextCode]['code'] !== T_DEFAULT) { + // This case statement has content. If the next case or default comes + // before the closer, it means we don't have an obvious terminating + // statement and need to make some more effort to find one. If we + // don't, we do need a comment. + $nextCode = $this->findNextCase($phpcsFile, ($opener + 1), $nextCloser); + if ($nextCode !== false) { + $prevCode = $phpcsFile->findPrevious(T_WHITESPACE, ($nextCode - 1), $nextCase, true); + if (isset(Tokens::$commentTokens[$tokens[$prevCode]['code']]) === false + && $this->findNestedTerminator($phpcsFile, ($opener + 1), $nextCode) === false + ) { + $error = 'There must be a comment when fall-through is intentional in a non-empty case body'; + $phpcsFile->addError($error, $nextCase, 'TerminatingComment'); + } + } + } + }//end while + + }//end process() + + + /** + * Find the next CASE or DEFAULT statement from a point in the file. + * + * Note that nested switches are ignored. + * + * @param \PHP_CodeSniffer\Files\File $phpcsFile The file being scanned. + * @param int $stackPtr The position to start looking at. + * @param int $end The position to stop looking at. + * + * @return int|false + */ + private function findNextCase($phpcsFile, $stackPtr, $end) + { + $tokens = $phpcsFile->getTokens(); + while (($stackPtr = $phpcsFile->findNext([T_CASE, T_DEFAULT, T_SWITCH], $stackPtr, $end)) !== false) { + // Skip nested SWITCH statements; they are handled on their own. + if ($tokens[$stackPtr]['code'] === T_SWITCH) { + $stackPtr = $tokens[$stackPtr]['scope_closer']; + continue; + } + + break; + } + + return $stackPtr; + + }//end findNextCase() + + + /** + * Returns the position of the nested terminating statement. + * + * Returns false if no terminating statement was found. + * + * @param \PHP_CodeSniffer\Files\File $phpcsFile The file being scanned. + * @param int $stackPtr The position to start looking at. + * @param int $end The position to stop looking at. + * + * @return int|false + */ + private function findNestedTerminator($phpcsFile, $stackPtr, $end) + { + $tokens = $phpcsFile->getTokens(); + + $lastToken = $phpcsFile->findPrevious(T_WHITESPACE, ($end - 1), $stackPtr, true); + if ($lastToken === false) { + return false; + } + + if ($tokens[$lastToken]['code'] === T_CLOSE_CURLY_BRACKET) { + // We found a closing curly bracket and want to check if its block + // belongs to a SWITCH, IF, ELSEIF or ELSE, TRY, CATCH OR FINALLY clause. + // If yes, we continue searching for a terminating statement within that + // block. Note that we have to make sure that every block of + // the entire if/else/switch statement has a terminating statement. + // For a try/catch/finally statement, either the finally block has + // to have a terminating statement or every try/catch block has to have one. + $currentCloser = $lastToken; + $hasElseBlock = false; + $hasCatchWithoutTerminator = false; + do { + $scopeOpener = $tokens[$currentCloser]['scope_opener']; + $scopeCloser = $tokens[$currentCloser]['scope_closer']; + + $prevToken = $phpcsFile->findPrevious(Tokens::$emptyTokens, ($scopeOpener - 1), $stackPtr, true); + if ($prevToken === false) { + return false; + } + + // SWITCH, IF, ELSEIF, CATCH clauses possess a condition we have to account for. + if ($tokens[$prevToken]['code'] === T_CLOSE_PARENTHESIS) { + $prevToken = $tokens[$prevToken]['parenthesis_owner']; + } + + if ($tokens[$prevToken]['code'] === T_IF) { + // If we have not encountered an ELSE clause by now, we cannot + // be sure that the whole statement terminates in every case. + if ($hasElseBlock === false) { + return false; + } + + return $this->findNestedTerminator($phpcsFile, ($scopeOpener + 1), $scopeCloser); + } else if ($tokens[$prevToken]['code'] === T_ELSEIF + || $tokens[$prevToken]['code'] === T_ELSE + ) { + // If we find a terminating statement within this block, + // we continue with the previous ELSEIF or IF clause. + $hasTerminator = $this->findNestedTerminator($phpcsFile, ($scopeOpener + 1), $scopeCloser); + if ($hasTerminator === false) { + return false; + } + + $currentCloser = $phpcsFile->findPrevious(Tokens::$emptyTokens, ($prevToken - 1), $stackPtr, true); + if ($tokens[$prevToken]['code'] === T_ELSE) { + $hasElseBlock = true; + } + } else if ($tokens[$prevToken]['code'] === T_FINALLY) { + // If we find a terminating statement within this block, + // the whole try/catch/finally statement is covered. + $hasTerminator = $this->findNestedTerminator($phpcsFile, ($scopeOpener + 1), $scopeCloser); + if ($hasTerminator !== false) { + return $hasTerminator; + } + + // Otherwise, we continue with the previous TRY or CATCH clause. + $currentCloser = $phpcsFile->findPrevious(Tokens::$emptyTokens, ($prevToken - 1), $stackPtr, true); + } else if ($tokens[$prevToken]['code'] === T_TRY) { + // If we've seen CATCH blocks without terminator statement and + // have not seen a FINALLY *with* a terminator statement, we + // don't even need to bother checking the TRY. + if ($hasCatchWithoutTerminator === true) { + return false; + } + + return $this->findNestedTerminator($phpcsFile, ($scopeOpener + 1), $scopeCloser); + } else if ($tokens[$prevToken]['code'] === T_CATCH) { + // Keep track of seen catch statements without terminating statement, + // but don't bow out yet as there may still be a FINALLY clause + // with a terminating statement before the CATCH. + $hasTerminator = $this->findNestedTerminator($phpcsFile, ($scopeOpener + 1), $scopeCloser); + if ($hasTerminator === false) { + $hasCatchWithoutTerminator = true; + } + + $currentCloser = $phpcsFile->findPrevious(Tokens::$emptyTokens, ($prevToken - 1), $stackPtr, true); + } else if ($tokens[$prevToken]['code'] === T_SWITCH) { + $hasDefaultBlock = false; + $endOfSwitch = $tokens[$prevToken]['scope_closer']; + $nextCase = $prevToken; + + // We look for a terminating statement within every blocks. + while (($nextCase = $this->findNextCase($phpcsFile, ($nextCase + 1), $endOfSwitch)) !== false) { + if ($tokens[$nextCase]['code'] === T_DEFAULT) { + $hasDefaultBlock = true; + } + + $opener = $tokens[$nextCase]['scope_opener']; + + $nextCode = $phpcsFile->findNext(Tokens::$emptyTokens, ($opener + 1), $endOfSwitch, true); + if ($tokens[$nextCode]['code'] === T_CASE || $tokens[$nextCode]['code'] === T_DEFAULT) { + // This case statement has no content, so skip it. + continue; + } + + $endOfCase = $this->findNextCase($phpcsFile, ($opener + 1), $endOfSwitch); + if ($endOfCase === false) { + $endOfCase = $endOfSwitch; + } + + $hasTerminator = $this->findNestedTerminator($phpcsFile, ($opener + 1), $endOfCase); + if ($hasTerminator === false) { + return false; + } + }//end while + + // If we have not encountered a DEFAULT block by now, we cannot + // be sure that the whole statement terminates in every case. + if ($hasDefaultBlock === false) { + return false; + } + + return $hasTerminator; + } else { + return false; + }//end if + } while ($currentCloser !== false && $tokens[$currentCloser]['code'] === T_CLOSE_CURLY_BRACKET); + + return true; + } else if ($tokens[$lastToken]['code'] === T_SEMICOLON) { + // We found the last statement of the CASE. Now we want to + // check whether it is a terminating one. + $terminators = [ + T_RETURN => T_RETURN, + T_BREAK => T_BREAK, + T_CONTINUE => T_CONTINUE, + T_THROW => T_THROW, + T_EXIT => T_EXIT, + ]; + + $terminator = $phpcsFile->findStartOfStatement(($lastToken - 1)); + if (isset($terminators[$tokens[$terminator]['code']]) === true) { + return $terminator; + } + }//end if + + return false; + + }//end findNestedTerminator() + + +}//end class diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/PSR2/Sniffs/Files/ClosingTagSniff.php b/vendor/squizlabs/php_codesniffer/src/Standards/PSR2/Sniffs/Files/ClosingTagSniff.php new file mode 100644 index 00000000..39834b38 --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/PSR2/Sniffs/Files/ClosingTagSniff.php @@ -0,0 +1,89 @@ + + * @copyright 2006-2015 Squiz Pty Ltd (ABN 77 084 670 600) + * @license https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence + */ + +namespace PHP_CodeSniffer\Standards\PSR2\Sniffs\Files; + +use PHP_CodeSniffer\Files\File; +use PHP_CodeSniffer\Sniffs\Sniff; +use PHP_CodeSniffer\Util\Tokens; + +class ClosingTagSniff implements Sniff +{ + + + /** + * Returns an array of tokens this test wants to listen for. + * + * @return array + */ + public function register() + { + return [T_OPEN_TAG]; + + }//end register() + + + /** + * Processes this sniff, when one of its tokens is encountered. + * + * @param \PHP_CodeSniffer\Files\File $phpcsFile The file being scanned. + * @param int $stackPtr The position of the current token in + * the stack passed in $tokens. + * + * @return int + */ + public function process(File $phpcsFile, $stackPtr) + { + $tokens = $phpcsFile->getTokens(); + + // Make sure this file only contains PHP code. + for ($i = 0; $i < $phpcsFile->numTokens; $i++) { + if ($tokens[$i]['code'] === T_INLINE_HTML + && trim($tokens[$i]['content']) !== '' + ) { + return $phpcsFile->numTokens; + } + } + + // Find the last non-empty token. + for ($last = ($phpcsFile->numTokens - 1); $last > 0; $last--) { + if (trim($tokens[$last]['content']) !== '') { + break; + } + } + + if ($tokens[$last]['code'] === T_CLOSE_TAG) { + $error = 'A closing tag is not permitted at the end of a PHP file'; + $fix = $phpcsFile->addFixableError($error, $last, 'NotAllowed'); + if ($fix === true) { + $phpcsFile->fixer->beginChangeset(); + $phpcsFile->fixer->replaceToken($last, $phpcsFile->eolChar); + $prev = $phpcsFile->findPrevious(Tokens::$emptyTokens, ($last - 1), null, true); + if ($tokens[$prev]['code'] !== T_SEMICOLON + && $tokens[$prev]['code'] !== T_CLOSE_CURLY_BRACKET + && $tokens[$prev]['code'] !== T_OPEN_TAG + ) { + $phpcsFile->fixer->addContent($prev, ';'); + } + + $phpcsFile->fixer->endChangeset(); + } + + $phpcsFile->recordMetric($stackPtr, 'PHP closing tag at end of PHP-only file', 'yes'); + } else { + $phpcsFile->recordMetric($stackPtr, 'PHP closing tag at end of PHP-only file', 'no'); + }//end if + + // Ignore the rest of the file. + return $phpcsFile->numTokens; + + }//end process() + + +}//end class diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/PSR2/Sniffs/Files/EndFileNewlineSniff.php b/vendor/squizlabs/php_codesniffer/src/Standards/PSR2/Sniffs/Files/EndFileNewlineSniff.php new file mode 100644 index 00000000..aed461f8 --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/PSR2/Sniffs/Files/EndFileNewlineSniff.php @@ -0,0 +1,107 @@ + + * @copyright 2006-2015 Squiz Pty Ltd (ABN 77 084 670 600) + * @license https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence + */ + +namespace PHP_CodeSniffer\Standards\PSR2\Sniffs\Files; + +use PHP_CodeSniffer\Files\File; +use PHP_CodeSniffer\Sniffs\Sniff; + +class EndFileNewlineSniff implements Sniff +{ + + + /** + * Returns an array of tokens this test wants to listen for. + * + * @return array + */ + public function register() + { + return [ + T_OPEN_TAG, + T_OPEN_TAG_WITH_ECHO, + ]; + + }//end register() + + + /** + * Processes this sniff, when one of its tokens is encountered. + * + * @param \PHP_CodeSniffer\Files\File $phpcsFile The file being scanned. + * @param int $stackPtr The position of the current token in + * the stack passed in $tokens. + * + * @return void + */ + public function process(File $phpcsFile, $stackPtr) + { + if ($phpcsFile->findNext(T_INLINE_HTML, ($stackPtr + 1)) !== false) { + return ($phpcsFile->numTokens + 1); + } + + // Skip to the end of the file. + $tokens = $phpcsFile->getTokens(); + $lastToken = ($phpcsFile->numTokens - 1); + + if ($tokens[$lastToken]['content'] === '') { + $lastToken--; + } + + // Hard-coding the expected \n in this sniff as it is PSR-2 specific and + // PSR-2 enforces the use of unix style newlines. + if (substr($tokens[$lastToken]['content'], -1) !== "\n") { + $error = 'Expected 1 newline at end of file; 0 found'; + $fix = $phpcsFile->addFixableError($error, $lastToken, 'NoneFound'); + if ($fix === true) { + $phpcsFile->fixer->addNewline($lastToken); + } + + $phpcsFile->recordMetric($stackPtr, 'Number of newlines at EOF', '0'); + return ($phpcsFile->numTokens + 1); + } + + // Go looking for the last non-empty line. + $lastLine = $tokens[$lastToken]['line']; + if ($tokens[$lastToken]['code'] === T_WHITESPACE + || $tokens[$lastToken]['code'] === T_DOC_COMMENT_WHITESPACE + ) { + $lastCode = $phpcsFile->findPrevious([T_WHITESPACE, T_DOC_COMMENT_WHITESPACE], ($lastToken - 1), null, true); + } else { + $lastCode = $lastToken; + } + + $lastCodeLine = $tokens[$lastCode]['line']; + $blankLines = ($lastLine - $lastCodeLine + 1); + $phpcsFile->recordMetric($stackPtr, 'Number of newlines at EOF', $blankLines); + + if ($blankLines > 1) { + $error = 'Expected 1 blank line at end of file; %s found'; + $data = [$blankLines]; + $fix = $phpcsFile->addFixableError($error, $lastCode, 'TooMany', $data); + + if ($fix === true) { + $phpcsFile->fixer->beginChangeset(); + $phpcsFile->fixer->replaceToken($lastCode, rtrim($tokens[$lastCode]['content'])); + for ($i = ($lastCode + 1); $i < $lastToken; $i++) { + $phpcsFile->fixer->replaceToken($i, ''); + } + + $phpcsFile->fixer->replaceToken($lastToken, $phpcsFile->eolChar); + $phpcsFile->fixer->endChangeset(); + } + } + + // Skip the rest of the file. + return ($phpcsFile->numTokens + 1); + + }//end process() + + +}//end class diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/PSR2/Sniffs/Methods/FunctionCallSignatureSniff.php b/vendor/squizlabs/php_codesniffer/src/Standards/PSR2/Sniffs/Methods/FunctionCallSignatureSniff.php new file mode 100644 index 00000000..406f2794 --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/PSR2/Sniffs/Methods/FunctionCallSignatureSniff.php @@ -0,0 +1,79 @@ + + * @copyright 2006-2015 Squiz Pty Ltd (ABN 77 084 670 600) + * @license https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence + */ + +namespace PHP_CodeSniffer\Standards\PSR2\Sniffs\Methods; + +use PHP_CodeSniffer\Files\File; +use PHP_CodeSniffer\Standards\PEAR\Sniffs\Functions\FunctionCallSignatureSniff as PEARFunctionCallSignatureSniff; +use PHP_CodeSniffer\Util\Tokens; + +class FunctionCallSignatureSniff extends PEARFunctionCallSignatureSniff +{ + + /** + * If TRUE, multiple arguments can be defined per line in a multi-line call. + * + * @var boolean + */ + public $allowMultipleArguments = false; + + + /** + * Processes single-line calls. + * + * @param \PHP_CodeSniffer\Files\File $phpcsFile The file being scanned. + * @param int $stackPtr The position of the current token + * in the stack passed in $tokens. + * @param int $openBracket The position of the opening bracket + * in the stack passed in $tokens. + * @param array $tokens The stack of tokens that make up + * the file. + * + * @return void + */ + public function isMultiLineCall(File $phpcsFile, $stackPtr, $openBracket, $tokens) + { + // If the first argument is on a new line, this is a multi-line + // function call, even if there is only one argument. + $next = $phpcsFile->findNext(Tokens::$emptyTokens, ($openBracket + 1), null, true); + if ($tokens[$next]['line'] !== $tokens[$stackPtr]['line']) { + return true; + } + + $closeBracket = $tokens[$openBracket]['parenthesis_closer']; + + $end = $phpcsFile->findEndOfStatement(($openBracket + 1), [T_COLON]); + while ($tokens[$end]['code'] === T_COMMA) { + // If the next bit of code is not on the same line, this is a + // multi-line function call. + $next = $phpcsFile->findNext(Tokens::$emptyTokens, ($end + 1), $closeBracket, true); + if ($next === false) { + return false; + } + + if ($tokens[$next]['line'] !== $tokens[$end]['line']) { + return true; + } + + $end = $phpcsFile->findEndOfStatement($next, [T_COLON]); + } + + // We've reached the last argument, so see if the next content + // (should be the close bracket) is also on the same line. + $next = $phpcsFile->findNext(Tokens::$emptyTokens, ($end + 1), $closeBracket, true); + if ($next !== false && $tokens[$next]['line'] !== $tokens[$end]['line']) { + return true; + } + + return false; + + }//end isMultiLineCall() + + +}//end class diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/PSR2/Sniffs/Methods/FunctionClosingBraceSniff.php b/vendor/squizlabs/php_codesniffer/src/Standards/PSR2/Sniffs/Methods/FunctionClosingBraceSniff.php new file mode 100644 index 00000000..1e11f02f --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/PSR2/Sniffs/Methods/FunctionClosingBraceSniff.php @@ -0,0 +1,91 @@ + + * @copyright 2006-2015 Squiz Pty Ltd (ABN 77 084 670 600) + * @license https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence + */ + +namespace PHP_CodeSniffer\Standards\PSR2\Sniffs\Methods; + +use PHP_CodeSniffer\Files\File; +use PHP_CodeSniffer\Sniffs\Sniff; + +class FunctionClosingBraceSniff implements Sniff +{ + + + /** + * Returns an array of tokens this test wants to listen for. + * + * @return array + */ + public function register() + { + return [ + T_FUNCTION, + T_CLOSURE, + ]; + + }//end register() + + + /** + * Processes this sniff, when one of its tokens is encountered. + * + * @param \PHP_CodeSniffer\Files\File $phpcsFile The file being scanned. + * @param int $stackPtr The position of the current token in + * the stack passed in $tokens. + * + * @return void + */ + public function process(File $phpcsFile, $stackPtr) + { + $tokens = $phpcsFile->getTokens(); + + if (isset($tokens[$stackPtr]['scope_closer']) === false) { + // Probably an interface method. + return; + } + + $closeBrace = $tokens[$stackPtr]['scope_closer']; + $prevContent = $phpcsFile->findPrevious(T_WHITESPACE, ($closeBrace - 1), null, true); + $found = ($tokens[$closeBrace]['line'] - $tokens[$prevContent]['line'] - 1); + + if ($found < 0) { + // Brace isn't on a new line, so not handled by us. + return; + } + + if ($found === 0) { + // All is good. + return; + } + + $error = 'Function closing brace must go on the next line following the body; found %s blank lines before brace'; + $data = [$found]; + $fix = $phpcsFile->addFixableError($error, $closeBrace, 'SpacingBeforeClose', $data); + + if ($fix === true) { + $phpcsFile->fixer->beginChangeset(); + for ($i = ($prevContent + 1); $i < $closeBrace; $i++) { + if ($tokens[$i]['line'] === $tokens[$prevContent]['line']) { + continue; + } + + // Don't remove any indentation before the brace. + if ($tokens[$i]['line'] === $tokens[$closeBrace]['line']) { + break; + } + + $phpcsFile->fixer->replaceToken($i, ''); + } + + $phpcsFile->fixer->endChangeset(); + } + + }//end process() + + +}//end class diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/PSR2/Sniffs/Methods/MethodDeclarationSniff.php b/vendor/squizlabs/php_codesniffer/src/Standards/PSR2/Sniffs/Methods/MethodDeclarationSniff.php new file mode 100644 index 00000000..d23b8bee --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/PSR2/Sniffs/Methods/MethodDeclarationSniff.php @@ -0,0 +1,162 @@ + + * @copyright 2006-2015 Squiz Pty Ltd (ABN 77 084 670 600) + * @license https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence + */ + +namespace PHP_CodeSniffer\Standards\PSR2\Sniffs\Methods; + +use PHP_CodeSniffer\Files\File; +use PHP_CodeSniffer\Sniffs\AbstractScopeSniff; +use PHP_CodeSniffer\Util\Tokens; + +class MethodDeclarationSniff extends AbstractScopeSniff +{ + + + /** + * Constructs a Squiz_Sniffs_Scope_MethodScopeSniff. + */ + public function __construct() + { + parent::__construct(Tokens::$ooScopeTokens, [T_FUNCTION]); + + }//end __construct() + + + /** + * Processes the function tokens within the class. + * + * @param \PHP_CodeSniffer\Files\File $phpcsFile The file where this token was found. + * @param int $stackPtr The position where the token was found. + * @param int $currScope The current scope opener token. + * + * @return void + */ + protected function processTokenWithinScope(File $phpcsFile, $stackPtr, $currScope) + { + $tokens = $phpcsFile->getTokens(); + + // Determine if this is a function which needs to be examined. + $conditions = $tokens[$stackPtr]['conditions']; + end($conditions); + $deepestScope = key($conditions); + if ($deepestScope !== $currScope) { + return; + } + + $methodName = $phpcsFile->getDeclarationName($stackPtr); + if ($methodName === null) { + // Ignore closures. + return; + } + + if ($methodName[0] === '_' && isset($methodName[1]) === true && $methodName[1] !== '_') { + $error = 'Method name "%s" should not be prefixed with an underscore to indicate visibility'; + $data = [$methodName]; + $phpcsFile->addWarning($error, $stackPtr, 'Underscore', $data); + } + + $visibility = 0; + $static = 0; + $abstract = 0; + $final = 0; + + $find = (Tokens::$methodPrefixes + Tokens::$emptyTokens); + $prev = $phpcsFile->findPrevious($find, ($stackPtr - 1), null, true); + + $prefix = $stackPtr; + while (($prefix = $phpcsFile->findPrevious(Tokens::$methodPrefixes, ($prefix - 1), $prev)) !== false) { + switch ($tokens[$prefix]['code']) { + case T_STATIC: + $static = $prefix; + break; + case T_ABSTRACT: + $abstract = $prefix; + break; + case T_FINAL: + $final = $prefix; + break; + default: + $visibility = $prefix; + break; + } + } + + $fixes = []; + + if ($visibility !== 0 && $final > $visibility) { + $error = 'The final declaration must precede the visibility declaration'; + $fix = $phpcsFile->addFixableError($error, $final, 'FinalAfterVisibility'); + if ($fix === true) { + $fixes[$final] = ''; + $fixes[($final + 1)] = ''; + if (isset($fixes[$visibility]) === true) { + $fixes[$visibility] = 'final '.$fixes[$visibility]; + } else { + $fixes[$visibility] = 'final '.$tokens[$visibility]['content']; + } + } + } + + if ($visibility !== 0 && $abstract > $visibility) { + $error = 'The abstract declaration must precede the visibility declaration'; + $fix = $phpcsFile->addFixableError($error, $abstract, 'AbstractAfterVisibility'); + if ($fix === true) { + $fixes[$abstract] = ''; + $fixes[($abstract + 1)] = ''; + if (isset($fixes[$visibility]) === true) { + $fixes[$visibility] = 'abstract '.$fixes[$visibility]; + } else { + $fixes[$visibility] = 'abstract '.$tokens[$visibility]['content']; + } + } + } + + if ($static !== 0 && $static < $visibility) { + $error = 'The static declaration must come after the visibility declaration'; + $fix = $phpcsFile->addFixableError($error, $static, 'StaticBeforeVisibility'); + if ($fix === true) { + $fixes[$static] = ''; + $fixes[($static + 1)] = ''; + if (isset($fixes[$visibility]) === true) { + $fixes[$visibility] .= ' static'; + } else { + $fixes[$visibility] = $tokens[$visibility]['content'].' static'; + } + } + } + + // Batch all the fixes together to reduce the possibility of conflicts. + if (empty($fixes) === false) { + $phpcsFile->fixer->beginChangeset(); + foreach ($fixes as $stackPtr => $content) { + $phpcsFile->fixer->replaceToken($stackPtr, $content); + } + + $phpcsFile->fixer->endChangeset(); + } + + }//end processTokenWithinScope() + + + /** + * Processes a token that is found within the scope that this test is + * listening to. + * + * @param \PHP_CodeSniffer\Files\File $phpcsFile The file where this token was found. + * @param int $stackPtr The position in the stack where this + * token was found. + * + * @return void + */ + protected function processTokenOutsideScope(File $phpcsFile, $stackPtr) + { + + }//end processTokenOutsideScope() + + +}//end class diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/PSR2/Sniffs/Namespaces/NamespaceDeclarationSniff.php b/vendor/squizlabs/php_codesniffer/src/Standards/PSR2/Sniffs/Namespaces/NamespaceDeclarationSniff.php new file mode 100644 index 00000000..bf37af09 --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/PSR2/Sniffs/Namespaces/NamespaceDeclarationSniff.php @@ -0,0 +1,100 @@ + + * @copyright 2006-2015 Squiz Pty Ltd (ABN 77 084 670 600) + * @license https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence + */ + +namespace PHP_CodeSniffer\Standards\PSR2\Sniffs\Namespaces; + +use PHP_CodeSniffer\Files\File; +use PHP_CodeSniffer\Sniffs\Sniff; +use PHP_CodeSniffer\Util\Tokens; + +class NamespaceDeclarationSniff implements Sniff +{ + + + /** + * Returns an array of tokens this test wants to listen for. + * + * @return array + */ + public function register() + { + return [T_NAMESPACE]; + + }//end register() + + + /** + * Processes this test, when one of its tokens is encountered. + * + * @param \PHP_CodeSniffer\Files\File $phpcsFile The file being scanned. + * @param int $stackPtr The position of the current token in + * the stack passed in $tokens. + * + * @return void + */ + public function process(File $phpcsFile, $stackPtr) + { + $tokens = $phpcsFile->getTokens(); + + $nextNonEmpty = $phpcsFile->findNext(Tokens::$emptyTokens, ($stackPtr + 1), null, true); + if ($tokens[$nextNonEmpty]['code'] === T_NS_SEPARATOR) { + // Namespace keyword as operator. Not a declaration. + return; + } + + $end = $phpcsFile->findEndOfStatement($stackPtr); + for ($i = ($end + 1); $i < ($phpcsFile->numTokens - 1); $i++) { + if ($tokens[$i]['line'] === $tokens[$end]['line']) { + continue; + } + + break; + } + + // The $i var now points to the first token on the line after the + // namespace declaration, which must be a blank line. + $next = $phpcsFile->findNext(T_WHITESPACE, $i, $phpcsFile->numTokens, true); + if ($next === false) { + return; + } + + $diff = ($tokens[$next]['line'] - $tokens[$i]['line']); + if ($diff === 1) { + return; + } + + if ($diff < 0) { + $diff = 0; + } + + $error = 'There must be one blank line after the namespace declaration'; + $fix = $phpcsFile->addFixableError($error, $stackPtr, 'BlankLineAfter'); + + if ($fix === true) { + if ($diff === 0) { + $phpcsFile->fixer->addNewlineBefore($i); + } else { + $phpcsFile->fixer->beginChangeset(); + for ($x = $i; $x < $next; $x++) { + if ($tokens[$x]['line'] === $tokens[$next]['line']) { + break; + } + + $phpcsFile->fixer->replaceToken($x, ''); + } + + $phpcsFile->fixer->addNewline($i); + $phpcsFile->fixer->endChangeset(); + } + } + + }//end process() + + +}//end class diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/PSR2/Sniffs/Namespaces/UseDeclarationSniff.php b/vendor/squizlabs/php_codesniffer/src/Standards/PSR2/Sniffs/Namespaces/UseDeclarationSniff.php new file mode 100644 index 00000000..21a9dbe9 --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/PSR2/Sniffs/Namespaces/UseDeclarationSniff.php @@ -0,0 +1,297 @@ + + * @copyright 2006-2015 Squiz Pty Ltd (ABN 77 084 670 600) + * @license https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence + */ + +namespace PHP_CodeSniffer\Standards\PSR2\Sniffs\Namespaces; + +use PHP_CodeSniffer\Files\File; +use PHP_CodeSniffer\Sniffs\Sniff; +use PHP_CodeSniffer\Util\Tokens; + +class UseDeclarationSniff implements Sniff +{ + + + /** + * Returns an array of tokens this test wants to listen for. + * + * @return array + */ + public function register() + { + return [T_USE]; + + }//end register() + + + /** + * Processes this test, when one of its tokens is encountered. + * + * @param \PHP_CodeSniffer\Files\File $phpcsFile The file being scanned. + * @param int $stackPtr The position of the current token in + * the stack passed in $tokens. + * + * @return void + */ + public function process(File $phpcsFile, $stackPtr) + { + if ($this->shouldIgnoreUse($phpcsFile, $stackPtr) === true) { + return; + } + + $tokens = $phpcsFile->getTokens(); + + // One space after the use keyword. + if ($tokens[($stackPtr + 1)]['content'] !== ' ') { + $error = 'There must be a single space after the USE keyword'; + $fix = $phpcsFile->addFixableError($error, $stackPtr, 'SpaceAfterUse'); + if ($fix === true) { + $phpcsFile->fixer->replaceToken(($stackPtr + 1), ' '); + } + } + + // Only one USE declaration allowed per statement. + $next = $phpcsFile->findNext([T_COMMA, T_SEMICOLON, T_OPEN_USE_GROUP, T_CLOSE_TAG], ($stackPtr + 1)); + if ($next !== false + && $tokens[$next]['code'] !== T_SEMICOLON + && $tokens[$next]['code'] !== T_CLOSE_TAG + ) { + $error = 'There must be one USE keyword per declaration'; + + if ($tokens[$next]['code'] === T_COMMA) { + $fix = $phpcsFile->addFixableError($error, $stackPtr, 'MultipleDeclarations'); + if ($fix === true) { + switch ($tokens[($stackPtr + 2)]['content']) { + case 'const': + $baseUse = 'use const'; + break; + case 'function': + $baseUse = 'use function'; + break; + default: + $baseUse = 'use'; + } + + if ($tokens[($next + 1)]['code'] !== T_WHITESPACE) { + $baseUse .= ' '; + } + + $phpcsFile->fixer->replaceToken($next, ';'.$phpcsFile->eolChar.$baseUse); + } + } else { + $closingCurly = $phpcsFile->findNext(T_CLOSE_USE_GROUP, ($next + 1)); + if ($closingCurly === false) { + // Parse error or live coding. Not auto-fixable. + $phpcsFile->addError($error, $stackPtr, 'MultipleDeclarations'); + } else { + $fix = $phpcsFile->addFixableError($error, $stackPtr, 'MultipleDeclarations'); + if ($fix === true) { + $baseUse = rtrim($phpcsFile->getTokensAsString($stackPtr, ($next - $stackPtr))); + $lastNonWhitespace = $phpcsFile->findPrevious(T_WHITESPACE, ($closingCurly - 1), null, true); + + $phpcsFile->fixer->beginChangeset(); + + // Remove base use statement. + for ($i = $stackPtr; $i <= $next; $i++) { + $phpcsFile->fixer->replaceToken($i, ''); + } + + if (preg_match('`^[\r\n]+$`', $tokens[($next + 1)]['content']) === 1) { + $phpcsFile->fixer->replaceToken(($next + 1), ''); + } + + // Convert grouped use statements into full use statements. + do { + $next = $phpcsFile->findNext(Tokens::$emptyTokens, ($next + 1), $closingCurly, true); + if ($next === false) { + // Group use statement with trailing comma after last item. + break; + } + + $nonWhitespace = $phpcsFile->findPrevious(T_WHITESPACE, ($next - 1), null, true); + for ($i = ($nonWhitespace + 1); $i < $next; $i++) { + if (preg_match('`^[\r\n]+$`', $tokens[$i]['content']) === 1) { + // Preserve new lines. + continue; + } + + $phpcsFile->fixer->replaceToken($i, ''); + } + + if ($tokens[$next]['content'] === 'const' || $tokens[$next]['content'] === 'function') { + $phpcsFile->fixer->addContentBefore($next, 'use '); + $next = $phpcsFile->findNext(Tokens::$emptyTokens, ($next + 1), $closingCurly, true); + $phpcsFile->fixer->addContentBefore($next, str_replace('use ', '', $baseUse)); + } else { + $phpcsFile->fixer->addContentBefore($next, $baseUse); + } + + $next = $phpcsFile->findNext(T_COMMA, ($next + 1), $closingCurly); + if ($next !== false) { + $nextNonEmpty = $phpcsFile->findNext(Tokens::$emptyTokens, ($next + 1), $closingCurly, true); + if ($nextNonEmpty !== false && $tokens[$nextNonEmpty]['line'] === $tokens[$next]['line']) { + $prevNonWhitespace = $phpcsFile->findPrevious(T_WHITESPACE, ($nextNonEmpty - 1), $next, true); + if ($prevNonWhitespace === $next) { + $phpcsFile->fixer->replaceToken($next, ';'.$phpcsFile->eolChar); + } else { + $phpcsFile->fixer->replaceToken($next, ';'); + $phpcsFile->fixer->addNewline($prevNonWhitespace); + } + } else { + // Last item with trailing comma or next item already on new line. + $phpcsFile->fixer->replaceToken($next, ';'); + } + } else { + // Last item without trailing comma. + $phpcsFile->fixer->addContent($lastNonWhitespace, ';'); + } + } while ($next !== false); + + // Remove closing curly,semi-colon and any whitespace between last child and closing curly. + $next = $phpcsFile->findNext(Tokens::$emptyTokens, ($closingCurly + 1), null, true); + if ($next === false || $tokens[$next]['code'] !== T_SEMICOLON) { + // Parse error, forgotten semi-colon. + $next = $closingCurly; + } + + for ($i = ($lastNonWhitespace + 1); $i <= $next; $i++) { + $phpcsFile->fixer->replaceToken($i, ''); + } + + $phpcsFile->fixer->endChangeset(); + }//end if + }//end if + }//end if + }//end if + + // Make sure this USE comes after the first namespace declaration. + $prev = $phpcsFile->findPrevious(T_NAMESPACE, ($stackPtr - 1)); + if ($prev === false) { + $next = $phpcsFile->findNext(T_NAMESPACE, ($stackPtr + 1)); + if ($next !== false) { + $error = 'USE declarations must go after the namespace declaration'; + $phpcsFile->addError($error, $stackPtr, 'UseBeforeNamespace'); + } + } + + // Only interested in the last USE statement from here onwards. + $nextUse = $phpcsFile->findNext(T_USE, ($stackPtr + 1)); + while ($this->shouldIgnoreUse($phpcsFile, $nextUse) === true) { + $nextUse = $phpcsFile->findNext(T_USE, ($nextUse + 1)); + if ($nextUse === false) { + break; + } + } + + if ($nextUse !== false) { + return; + } + + $end = $phpcsFile->findNext([T_SEMICOLON, T_CLOSE_USE_GROUP, T_CLOSE_TAG], ($stackPtr + 1)); + if ($end === false) { + return; + } + + if ($tokens[$end]['code'] === T_CLOSE_USE_GROUP) { + $nextNonEmpty = $phpcsFile->findNext(Tokens::$emptyTokens, ($end + 1), null, true); + if ($tokens[$nextNonEmpty]['code'] === T_SEMICOLON) { + $end = $nextNonEmpty; + } + } + + // Find either the start of the next line or the beginning of the next statement, + // whichever comes first. + for ($end = ++$end; $end < $phpcsFile->numTokens; $end++) { + if (isset(Tokens::$emptyTokens[$tokens[$end]['code']]) === false) { + break; + } + + if ($tokens[$end]['column'] === 1) { + // Reached the next line. + break; + } + } + + --$end; + + if (($tokens[$end]['code'] === T_COMMENT + || isset(Tokens::$phpcsCommentTokens[$tokens[$end]['code']]) === true) + && substr($tokens[$end]['content'], 0, 2) === '/*' + && substr($tokens[$end]['content'], -2) !== '*/' + ) { + // Multi-line block comments are not allowed as trailing comment after a use statement. + --$end; + } + + $next = $phpcsFile->findNext(T_WHITESPACE, ($end + 1), null, true); + + if ($next === false || $tokens[$next]['code'] === T_CLOSE_TAG) { + return; + } + + $diff = ($tokens[$next]['line'] - $tokens[$end]['line'] - 1); + if ($diff !== 1) { + if ($diff < 0) { + $diff = 0; + } + + $error = 'There must be one blank line after the last USE statement; %s found;'; + $data = [$diff]; + $fix = $phpcsFile->addFixableError($error, $stackPtr, 'SpaceAfterLastUse', $data); + if ($fix === true) { + if ($diff === 0) { + $phpcsFile->fixer->addNewline($end); + } else { + $phpcsFile->fixer->beginChangeset(); + for ($i = ($end + 1); $i < $next; $i++) { + if ($tokens[$i]['line'] === $tokens[$next]['line']) { + break; + } + + $phpcsFile->fixer->replaceToken($i, ''); + } + + $phpcsFile->fixer->addNewline($end); + $phpcsFile->fixer->endChangeset(); + } + } + }//end if + + }//end process() + + + /** + * Check if this use statement is part of the namespace block. + * + * @param \PHP_CodeSniffer\Files\File $phpcsFile The file being scanned. + * @param int $stackPtr The position of the current token in + * the stack passed in $tokens. + * + * @return bool + */ + private function shouldIgnoreUse($phpcsFile, $stackPtr) + { + $tokens = $phpcsFile->getTokens(); + + // Ignore USE keywords inside closures and during live coding. + $next = $phpcsFile->findNext(Tokens::$emptyTokens, ($stackPtr + 1), null, true); + if ($next === false || $tokens[$next]['code'] === T_OPEN_PARENTHESIS) { + return true; + } + + // Ignore USE keywords for traits. + if ($phpcsFile->hasCondition($stackPtr, [T_CLASS, T_TRAIT]) === true) { + return true; + } + + return false; + + }//end shouldIgnoreUse() + + +}//end class diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/PSR2/Tests/Classes/ClassDeclarationUnitTest.inc b/vendor/squizlabs/php_codesniffer/src/Standards/PSR2/Tests/Classes/ClassDeclarationUnitTest.inc new file mode 100644 index 00000000..13e596e1 --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/PSR2/Tests/Classes/ClassDeclarationUnitTest.inc @@ -0,0 +1,241 @@ +anonymous = new class extends ArrayObject + { + public function __construct() + { + parent::__construct(['a' => 1, 'b' => 2]); + } + }; + } +} + +class A extends B + implements C +{ +} + +class C2 +{ + +} // phpcs:ignore Standard.Category.Sniff + +interface I1 extends + Foo +{ +} + +interface I2 extends + Bar +{ +} + +interface I3 extends + Foo, + Bar +{ +} + +class C1 extends + Foo +{ +} + +class C2 extends + Bar +{ +} + +class C3 extends Foo implements + Bar +{ +} + +class C4 extends Foo implements + Bar +{ +} + +class C5 extends Foo implements + Bar, + Baz +{ +} + +class C6 extends \Foo\Bar implements + \Baz\Bar +{ +} + +interface I4 extends + \Baz + \Bar +{ +} + +interface I5 extends /* comment */ + \Foo\Bar +{ +} + +interface I6 extends // comment + \Foo\Bar +{ +} + +class C7 extends // comment + \Foo\Bar implements \Baz\Bar +{ +} + +class +C8 +{ +} + +foo(new class { +}); diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/PSR2/Tests/Classes/ClassDeclarationUnitTest.inc.fixed b/vendor/squizlabs/php_codesniffer/src/Standards/PSR2/Tests/Classes/ClassDeclarationUnitTest.inc.fixed new file mode 100644 index 00000000..3ee394e7 --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/PSR2/Tests/Classes/ClassDeclarationUnitTest.inc.fixed @@ -0,0 +1,234 @@ +anonymous = new class extends ArrayObject + { + public function __construct() + { + parent::__construct(['a' => 1, 'b' => 2]); + } + }; + } +} + +class A extends B implements C +{ +} + +class C2 +{ + +} // phpcs:ignore Standard.Category.Sniff + +interface I1 extends + Foo +{ +} + +interface I2 extends + Bar +{ +} + +interface I3 extends + Foo, + Bar +{ +} + +class C1 extends Foo +{ +} + +class C2 extends Bar +{ +} + +class C3 extends Foo implements + Bar +{ +} + +class C4 extends Foo implements + Bar +{ +} + +class C5 extends Foo implements + Bar, + Baz +{ +} + +class C6 extends \Foo\Bar implements + \Baz\Bar +{ +} + +interface I4 extends + \Baz\Bar +{ +} + +interface I5 extends /* comment */ + \Foo\Bar +{ +} + +interface I6 extends // comment + \Foo\Bar +{ +} + +class C7 extends \Foo\Bar implements \Baz\Bar // comment +{ +} + +class C8 +{ +} + +foo(new class { +}); diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/PSR2/Tests/Classes/ClassDeclarationUnitTest.php b/vendor/squizlabs/php_codesniffer/src/Standards/PSR2/Tests/Classes/ClassDeclarationUnitTest.php new file mode 100644 index 00000000..635ac710 --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/PSR2/Tests/Classes/ClassDeclarationUnitTest.php @@ -0,0 +1,86 @@ + + * @copyright 2006-2015 Squiz Pty Ltd (ABN 77 084 670 600) + * @license https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence + */ + +namespace PHP_CodeSniffer\Standards\PSR2\Tests\Classes; + +use PHP_CodeSniffer\Tests\Standards\AbstractSniffUnitTest; + +class ClassDeclarationUnitTest extends AbstractSniffUnitTest +{ + + + /** + * Returns the lines where errors should occur. + * + * The key of the array should represent the line number and the value + * should represent the number of errors that should occur on that line. + * + * @return array + */ + public function getErrorList() + { + return [ + 2 => 1, + 7 => 3, + 12 => 1, + 13 => 1, + 17 => 1, + 19 => 2, + 20 => 1, + 21 => 1, + 22 => 1, + 25 => 1, + 27 => 2, + 34 => 1, + 35 => 2, + 44 => 1, + 45 => 1, + 63 => 1, + 95 => 1, + 116 => 1, + 118 => 1, + 119 => 1, + 124 => 1, + 130 => 2, + 131 => 1, + 158 => 1, + 168 => 1, + 178 => 1, + 179 => 1, + 184 => 1, + 189 => 1, + 194 => 1, + 204 => 1, + 205 => 1, + 210 => 1, + 215 => 2, + 216 => 1, + 231 => 2, + 235 => 1, + ]; + + }//end getErrorList() + + + /** + * Returns the lines where warnings should occur. + * + * The key of the array should represent the line number and the value + * should represent the number of warnings that should occur on that line. + * + * @return array + */ + public function getWarningList() + { + return []; + + }//end getWarningList() + + +}//end class diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/PSR2/Tests/Classes/PropertyDeclarationUnitTest.inc b/vendor/squizlabs/php_codesniffer/src/Standards/PSR2/Tests/Classes/PropertyDeclarationUnitTest.inc new file mode 100644 index 00000000..031d2a83 --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/PSR2/Tests/Classes/PropertyDeclarationUnitTest.inc @@ -0,0 +1,73 @@ + + * @copyright 2006-2015 Squiz Pty Ltd (ABN 77 084 670 600) + * @license https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence + */ + +namespace PHP_CodeSniffer\Standards\PSR2\Tests\Classes; + +use PHP_CodeSniffer\Tests\Standards\AbstractSniffUnitTest; + +class PropertyDeclarationUnitTest extends AbstractSniffUnitTest +{ + + + /** + * Returns the lines where errors should occur. + * + * The key of the array should represent the line number and the value + * should represent the number of errors that should occur on that line. + * + * @return array + */ + public function getErrorList() + { + return [ + 7 => 1, + 9 => 2, + 10 => 1, + 11 => 1, + 17 => 1, + 18 => 1, + 23 => 1, + 38 => 1, + 41 => 1, + 42 => 1, + 50 => 2, + 51 => 1, + 55 => 1, + 56 => 1, + 61 => 1, + 62 => 1, + 68 => 1, + 69 => 1, + 71 => 1, + 72 => 1, + ]; + + }//end getErrorList() + + + /** + * Returns the lines where warnings should occur. + * + * The key of the array should represent the line number and the value + * should represent the number of warnings that should occur on that line. + * + * @return array + */ + public function getWarningList() + { + return [ + 13 => 1, + 14 => 1, + 15 => 1, + 53 => 1, + ]; + + }//end getWarningList() + + +}//end class diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/PSR2/Tests/ControlStructures/ControlStructureSpacingUnitTest.inc b/vendor/squizlabs/php_codesniffer/src/Standards/PSR2/Tests/ControlStructures/ControlStructureSpacingUnitTest.inc new file mode 100644 index 00000000..542ab3cf --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/PSR2/Tests/ControlStructures/ControlStructureSpacingUnitTest.inc @@ -0,0 +1,81 @@ + $that) {} +foreach ( $something as $blah => $that ) {} +foreach ( $something as $blah => $that ) {} +// phpcs:set PSR2.ControlStructures.ControlStructureSpacing requiredSpacesAfterOpen 0 +// phpcs:set PSR2.ControlStructures.ControlStructureSpacing requiredSpacesBeforeClose 0 + +$binary = b"binary string"; + +if ($expr1 + && $expr2 ) { +} + +if ($expr1 + && $expr2 /* comment */ ) { +} + +if ($expr1 + && $expr2 + /* comment */ ) { +} + +$r = match ($x) {}; +$r = match ( $x ) {}; + +// phpcs:set PSR2.ControlStructures.ControlStructureSpacing requiredSpacesAfterOpen 1 +// phpcs:set PSR2.ControlStructures.ControlStructureSpacing requiredSpacesBeforeClose 1 +$r = match ($x) {}; +$r = match ( $x ) {}; +$r = match ( $x ) {}; +// phpcs:set PSR2.ControlStructures.ControlStructureSpacing requiredSpacesAfterOpen 0 +// phpcs:set PSR2.ControlStructures.ControlStructureSpacing requiredSpacesBeforeClose 0 diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/PSR2/Tests/ControlStructures/ControlStructureSpacingUnitTest.inc.fixed b/vendor/squizlabs/php_codesniffer/src/Standards/PSR2/Tests/ControlStructures/ControlStructureSpacingUnitTest.inc.fixed new file mode 100644 index 00000000..a29534be --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/PSR2/Tests/ControlStructures/ControlStructureSpacingUnitTest.inc.fixed @@ -0,0 +1,80 @@ + $that ) {} +foreach ( $something as $blah => $that ) {} +foreach ( $something as $blah => $that ) {} +// phpcs:set PSR2.ControlStructures.ControlStructureSpacing requiredSpacesAfterOpen 0 +// phpcs:set PSR2.ControlStructures.ControlStructureSpacing requiredSpacesBeforeClose 0 + +$binary = b"binary string"; + +if ($expr1 + && $expr2) { +} + +if ($expr1 + && $expr2 /* comment */) { +} + +if ($expr1 + && $expr2 + /* comment */) { +} + +$r = match ($x) {}; +$r = match ($x) {}; + +// phpcs:set PSR2.ControlStructures.ControlStructureSpacing requiredSpacesAfterOpen 1 +// phpcs:set PSR2.ControlStructures.ControlStructureSpacing requiredSpacesBeforeClose 1 +$r = match ( $x ) {}; +$r = match ( $x ) {}; +$r = match ( $x ) {}; +// phpcs:set PSR2.ControlStructures.ControlStructureSpacing requiredSpacesAfterOpen 0 +// phpcs:set PSR2.ControlStructures.ControlStructureSpacing requiredSpacesBeforeClose 0 diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/PSR2/Tests/ControlStructures/ControlStructureSpacingUnitTest.php b/vendor/squizlabs/php_codesniffer/src/Standards/PSR2/Tests/ControlStructures/ControlStructureSpacingUnitTest.php new file mode 100644 index 00000000..35d5e515 --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/PSR2/Tests/ControlStructures/ControlStructureSpacingUnitTest.php @@ -0,0 +1,62 @@ + + * @copyright 2006-2015 Squiz Pty Ltd (ABN 77 084 670 600) + * @license https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence + */ + +namespace PHP_CodeSniffer\Standards\PSR2\Tests\ControlStructures; + +use PHP_CodeSniffer\Tests\Standards\AbstractSniffUnitTest; + +class ControlStructureSpacingUnitTest extends AbstractSniffUnitTest +{ + + + /** + * Returns the lines where errors should occur. + * + * The key of the array should represent the line number and the value + * should represent the number of errors that should occur on that line. + * + * @return array + */ + public function getErrorList() + { + return [ + 4 => 1, + 14 => 2, + 26 => 2, + 27 => 2, + 31 => 1, + 51 => 2, + 53 => 2, + 60 => 1, + 64 => 1, + 69 => 1, + 73 => 2, + 77 => 2, + 79 => 2, + ]; + + }//end getErrorList() + + + /** + * Returns the lines where warnings should occur. + * + * The key of the array should represent the line number and the value + * should represent the number of warnings that should occur on that line. + * + * @return array + */ + public function getWarningList() + { + return []; + + }//end getWarningList() + + +}//end class diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/PSR2/Tests/ControlStructures/ElseIfDeclarationUnitTest.inc b/vendor/squizlabs/php_codesniffer/src/Standards/PSR2/Tests/ControlStructures/ElseIfDeclarationUnitTest.inc new file mode 100644 index 00000000..778659c8 --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/PSR2/Tests/ControlStructures/ElseIfDeclarationUnitTest.inc @@ -0,0 +1,17 @@ + \ No newline at end of file diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/PSR2/Tests/ControlStructures/ElseIfDeclarationUnitTest.inc.fixed b/vendor/squizlabs/php_codesniffer/src/Standards/PSR2/Tests/ControlStructures/ElseIfDeclarationUnitTest.inc.fixed new file mode 100644 index 00000000..4a7bfdc2 --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/PSR2/Tests/ControlStructures/ElseIfDeclarationUnitTest.inc.fixed @@ -0,0 +1,17 @@ + \ No newline at end of file diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/PSR2/Tests/ControlStructures/ElseIfDeclarationUnitTest.php b/vendor/squizlabs/php_codesniffer/src/Standards/PSR2/Tests/ControlStructures/ElseIfDeclarationUnitTest.php new file mode 100644 index 00000000..935205b4 --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/PSR2/Tests/ControlStructures/ElseIfDeclarationUnitTest.php @@ -0,0 +1,51 @@ + + * @copyright 2006-2015 Squiz Pty Ltd (ABN 77 084 670 600) + * @license https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence + */ + +namespace PHP_CodeSniffer\Standards\PSR2\Tests\ControlStructures; + +use PHP_CodeSniffer\Tests\Standards\AbstractSniffUnitTest; + +class ElseIfDeclarationUnitTest extends AbstractSniffUnitTest +{ + + + /** + * Returns the lines where errors should occur. + * + * The key of the array should represent the line number and the value + * should represent the number of errors that should occur on that line. + * + * @return array + */ + public function getErrorList() + { + return []; + + }//end getErrorList() + + + /** + * Returns the lines where warnings should occur. + * + * The key of the array should represent the line number and the value + * should represent the number of warnings that should occur on that line. + * + * @return array + */ + public function getWarningList() + { + return [ + 4 => 1, + 12 => 1, + ]; + + }//end getWarningList() + + +}//end class diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/PSR2/Tests/ControlStructures/SwitchDeclarationUnitTest.inc b/vendor/squizlabs/php_codesniffer/src/Standards/PSR2/Tests/ControlStructures/SwitchDeclarationUnitTest.inc new file mode 100644 index 00000000..c425a1f2 --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/PSR2/Tests/ControlStructures/SwitchDeclarationUnitTest.inc @@ -0,0 +1,586 @@ + 0) { + return 0; + } else { + return 1; + } + case 2: + return 2; +} + +// ERROR: No else clause +switch ($foo) { + case 1: + if ($bar > 0) { + return 0; + } elseif ($bar < 0) { + return 1; + } + case 2: + return 2; +} + +// OK: No fall-through present +switch ($foo) { + case 1: + if ($bar > 0) { + return 0; + } elseif ($bar < 0) { + return 1; + } +} + +// ERROR: No else clause (nested) +switch ($foo) { + case 1: + if ($bar > 0) { + return 0; + } else { + if ($foo > $bar) { + continue; + } + } + case 2: + return 2; +} + +// OK: Every clause terminates +switch ($foo) { + case 1: + if ($bar > 0) { + return 0; + } else { + if ($foo > $bar) { + continue; + } else { + break; + } + } + case 2: + return 2; +} + +// ERROR: Non-termination IF clause +switch ($foo) { + case 1: + if ($bar > 0) { + $offset = 0; + } else { + break; + } + case 2: + return 2; +} + +// ERROR: Non-termination IF clause (nested) +switch ($foo) { + case 1: + if ($bar > 0) { + continue; + } else { + if ($foo > $bar) { + $offset = 0; + } else { + break; + } + } + case 2: + return 2; +} + +switch ($sContext) +{ + case 'SOMETHING': + case 'CONSTANT': + do_something(); + break; + case 'GLOBAL': + case 'GLOBAL1': + do_something(); + // Fall through + default: + { + do_something(); + } +} + +$foo = $foo ? + function () { + switch ($a) { + case 'a': + break; + } + } : + null; + +switch ($foo) { +case Foo::INTERFACE: + echo '1'; + return self::INTERFACE; +case Foo::TRAIT: +case Foo::ARRAY: + echo '1'; + return self::VALUE; +} + +// OK: Every clause terminates +switch ($foo) { + case 1: + switch ($bar) { + case 1: + return 1; + default: + return 3; + } + case 2: + return 2; +} + +// KO: Not every clause terminates +switch ($foo) { + case 1: + switch ($bar) { + case 1: + return; + } + case 2: + return 2; +} + +// KO: Not every clause terminates +switch ($foo) { + case 1: + switch ($bar) { + case 1: + return; + default: + $a = 1; + } + case 2: + return 2; +} + +// OK: Every clause terminates +switch ($foo) { + case 1: + switch ($bar) { + case 1: + return 1; + default: + throw new \Exception(); + } + case 2: + return 2; +} + +switch ($foo) { + case 1: + // phpcs:ignore + case 2: + return 1; + case 3: + return 2; +} + +// Issue 3352. +switch ( $test ) { + case 2: // comment followed by empty line + + break; + + case 3: /* phpcs:ignore Stnd.Cat.SniffName -- Verify correct handling of ignore comments. */ + + + + break; + + case 4: /** inline docblock */ + + + + break; + + case 5: /* checking how it handles */ /* two trailing comments */ + + break; + + case 6: + // Comment as first content of the body. + + break; + + case 7: + /* phpcs:ignore Stnd.Cat.SniffName -- Verify correct handling of ignore comments at start of body. */ + + break; + + case 8: + /** inline docblock */ + + break; +} + +// Handle comments correctly. +switch ($foo) { + case 1: + if ($bar > 0) { + doSomething(); + } + // Comment + else { + return 1; + } + case 2: + return 2; +} + +switch ($foo) { + case 1: + if ($bar > 0) /*comment*/ { + return doSomething(); + } + else { + return 1; + } + case 2: + return 2; +} + +// Issue #3297. +// Okay - finally will always be executed, so all branches are covered by the `return` in finally. +switch ( $a ) { + case 1: + try { + doSomething(); + } catch (Exception $e) { + doSomething(); + } catch (AnotherException $e) { + doSomething(); + } finally { + return true; + } + default: + $other = $code; + break; +} + +// Okay - all - non-finally - branches have a terminating statement. +switch ( $a ) { + case 1: + try { + return false; + } catch (Exception $e) /*comment*/ { + return true; + } + // Comment + catch (AnotherException $e) { + return true; + } finally { + doSomething(); + } + default: + $other = $code; + break; +} + +// Okay - finally will always be executed, so all branches are covered by the `return` in finally. +// Non-standard structure order. +switch ( $a ) { + case 1: + try { + doSomething(); + } catch (Exception $e) { + doSomething(); + } finally { + return true; + } catch (AnotherException $e) { + doSomething(); + } + default: + $other = $code; + break; +} + +// Okay - all - non-finally - branches have a terminating statement. +// Non-standard structure order. +switch ( $a ) { + case 1: + try { + return false; + } finally { + doSomething(); + } catch (MyException $e) { + return true; + } catch (AnotherException $e) { + return true; + } + default: + $other = $code; + break; +} + +// All okay, no finally. Any exception still uncaught will terminate the case anyhow, so we're good. +switch ( $a ) { + case 1: + try { + return false; + } catch (MyException $e) { + return true; + } catch (AnotherException $e) { + return true; + } + default: + $other = $code; + break; +} + +// All okay, no catch +switch ( $a ) { + case 1: + try { + return true; + } finally { + doSomething(); + } + case 2: + $other = $code; + break; +} + +// All okay, try-catch nested in if. +switch ( $a ) { + case 1: + if ($a) { + try { + return true; + } catch (MyException $e) { + throw new Exception($e->getMessage()); + } + } else { + return true; + } + case 2: + $other = $code; + break; +} + +// Missing fall-through comment. +switch ( $a ) { + case 1: + try { + doSomething(); + } finally { + doSomething(); + } + case 2: + $other = $code; + break; +} + +// Missing fall-through comment. One of the catches does not have a terminating statement. +switch ( $a ) { + case 1: + try { + return false; + } catch (Exception $e) { + doSomething(); + } catch (AnotherException $e) { + return true; + } finally { + doSomething(); + } + default: + $other = $code; + break; +} + +// Missing fall-through comment. Try does not have a terminating statement. +switch ( $a ) { + case 1: + try { + doSomething(); + } finally { + doSomething(); + } catch (Exception $e) { + return true; + } catch (AnotherException $e) { + return true; + } + default: + $other = $code; + break; +} + +// Missing fall-through comment. One of the catches does not have a terminating statement. +switch ( $a ) { + case 1: + try { + return false; + } catch (Exception $e) { + doSomething(); + } catch (AnotherException $e) { + return true; + } + default: + $other = $code; + break; +} diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/PSR2/Tests/ControlStructures/SwitchDeclarationUnitTest.inc.fixed b/vendor/squizlabs/php_codesniffer/src/Standards/PSR2/Tests/ControlStructures/SwitchDeclarationUnitTest.inc.fixed new file mode 100644 index 00000000..47ae8d3d --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/PSR2/Tests/ControlStructures/SwitchDeclarationUnitTest.inc.fixed @@ -0,0 +1,581 @@ + 0) { + return 0; + } else { + return 1; + } + case 2: + return 2; +} + +// ERROR: No else clause +switch ($foo) { + case 1: + if ($bar > 0) { + return 0; + } elseif ($bar < 0) { + return 1; + } + case 2: + return 2; +} + +// OK: No fall-through present +switch ($foo) { + case 1: + if ($bar > 0) { + return 0; + } elseif ($bar < 0) { + return 1; + } +} + +// ERROR: No else clause (nested) +switch ($foo) { + case 1: + if ($bar > 0) { + return 0; + } else { + if ($foo > $bar) { + continue; + } + } + case 2: + return 2; +} + +// OK: Every clause terminates +switch ($foo) { + case 1: + if ($bar > 0) { + return 0; + } else { + if ($foo > $bar) { + continue; + } else { + break; + } + } + case 2: + return 2; +} + +// ERROR: Non-termination IF clause +switch ($foo) { + case 1: + if ($bar > 0) { + $offset = 0; + } else { + break; + } + case 2: + return 2; +} + +// ERROR: Non-termination IF clause (nested) +switch ($foo) { + case 1: + if ($bar > 0) { + continue; + } else { + if ($foo > $bar) { + $offset = 0; + } else { + break; + } + } + case 2: + return 2; +} + +switch ($sContext) +{ + case 'SOMETHING': + case 'CONSTANT': + do_something(); + break; + case 'GLOBAL': + case 'GLOBAL1': + do_something(); + // Fall through + default: + { + do_something(); + } +} + +$foo = $foo ? + function () { + switch ($a) { + case 'a': + break; + } + } : + null; + +switch ($foo) { +case Foo::INTERFACE: + echo '1'; + return self::INTERFACE; +case Foo::TRAIT: +case Foo::ARRAY: + echo '1'; + return self::VALUE; +} + +// OK: Every clause terminates +switch ($foo) { + case 1: + switch ($bar) { + case 1: + return 1; + default: + return 3; + } + case 2: + return 2; +} + +// KO: Not every clause terminates +switch ($foo) { + case 1: + switch ($bar) { + case 1: + return; + } + case 2: + return 2; +} + +// KO: Not every clause terminates +switch ($foo) { + case 1: + switch ($bar) { + case 1: + return; + default: + $a = 1; + } + case 2: + return 2; +} + +// OK: Every clause terminates +switch ($foo) { + case 1: + switch ($bar) { + case 1: + return 1; + default: + throw new \Exception(); + } + case 2: + return 2; +} + +switch ($foo) { + case 1: + // phpcs:ignore + case 2: + return 1; + case 3: + return 2; +} + +// Issue 3352. +switch ( $test ) { + case 2: // comment followed by empty line + break; + + case 3: /* phpcs:ignore Stnd.Cat.SniffName -- Verify correct handling of ignore comments. */ + break; + + case 4: /** inline docblock */ + break; + + case 5: /* checking how it handles */ /* two trailing comments */ + break; + + case 6: + // Comment as first content of the body. + + break; + + case 7: + /* phpcs:ignore Stnd.Cat.SniffName -- Verify correct handling of ignore comments at start of body. */ + + break; + + case 8: + /** inline docblock */ + + break; +} + +// Handle comments correctly. +switch ($foo) { + case 1: + if ($bar > 0) { + doSomething(); + } + // Comment + else { + return 1; + } + case 2: + return 2; +} + +switch ($foo) { + case 1: + if ($bar > 0) /*comment*/ { + return doSomething(); + } + else { + return 1; + } + case 2: + return 2; +} + +// Issue #3297. +// Okay - finally will always be executed, so all branches are covered by the `return` in finally. +switch ( $a ) { + case 1: + try { + doSomething(); + } catch (Exception $e) { + doSomething(); + } catch (AnotherException $e) { + doSomething(); + } finally { + return true; + } + default: + $other = $code; + break; +} + +// Okay - all - non-finally - branches have a terminating statement. +switch ( $a ) { + case 1: + try { + return false; + } catch (Exception $e) /*comment*/ { + return true; + } + // Comment + catch (AnotherException $e) { + return true; + } finally { + doSomething(); + } + default: + $other = $code; + break; +} + +// Okay - finally will always be executed, so all branches are covered by the `return` in finally. +// Non-standard structure order. +switch ( $a ) { + case 1: + try { + doSomething(); + } catch (Exception $e) { + doSomething(); + } finally { + return true; + } catch (AnotherException $e) { + doSomething(); + } + default: + $other = $code; + break; +} + +// Okay - all - non-finally - branches have a terminating statement. +// Non-standard structure order. +switch ( $a ) { + case 1: + try { + return false; + } finally { + doSomething(); + } catch (MyException $e) { + return true; + } catch (AnotherException $e) { + return true; + } + default: + $other = $code; + break; +} + +// All okay, no finally. Any exception still uncaught will terminate the case anyhow, so we're good. +switch ( $a ) { + case 1: + try { + return false; + } catch (MyException $e) { + return true; + } catch (AnotherException $e) { + return true; + } + default: + $other = $code; + break; +} + +// All okay, no catch +switch ( $a ) { + case 1: + try { + return true; + } finally { + doSomething(); + } + case 2: + $other = $code; + break; +} + +// All okay, try-catch nested in if. +switch ( $a ) { + case 1: + if ($a) { + try { + return true; + } catch (MyException $e) { + throw new Exception($e->getMessage()); + } + } else { + return true; + } + case 2: + $other = $code; + break; +} + +// Missing fall-through comment. +switch ( $a ) { + case 1: + try { + doSomething(); + } finally { + doSomething(); + } + case 2: + $other = $code; + break; +} + +// Missing fall-through comment. One of the catches does not have a terminating statement. +switch ( $a ) { + case 1: + try { + return false; + } catch (Exception $e) { + doSomething(); + } catch (AnotherException $e) { + return true; + } finally { + doSomething(); + } + default: + $other = $code; + break; +} + +// Missing fall-through comment. Try does not have a terminating statement. +switch ( $a ) { + case 1: + try { + doSomething(); + } finally { + doSomething(); + } catch (Exception $e) { + return true; + } catch (AnotherException $e) { + return true; + } + default: + $other = $code; + break; +} + +// Missing fall-through comment. One of the catches does not have a terminating statement. +switch ( $a ) { + case 1: + try { + return false; + } catch (Exception $e) { + doSomething(); + } catch (AnotherException $e) { + return true; + } + default: + $other = $code; + break; +} diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/PSR2/Tests/ControlStructures/SwitchDeclarationUnitTest.php b/vendor/squizlabs/php_codesniffer/src/Standards/PSR2/Tests/ControlStructures/SwitchDeclarationUnitTest.php new file mode 100644 index 00000000..0cd946d8 --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/PSR2/Tests/ControlStructures/SwitchDeclarationUnitTest.php @@ -0,0 +1,81 @@ + + * @copyright 2006-2015 Squiz Pty Ltd (ABN 77 084 670 600) + * @license https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence + */ + +namespace PHP_CodeSniffer\Standards\PSR2\Tests\ControlStructures; + +use PHP_CodeSniffer\Tests\Standards\AbstractSniffUnitTest; + +class SwitchDeclarationUnitTest extends AbstractSniffUnitTest +{ + + + /** + * Returns the lines where errors should occur. + * + * The key of the array should represent the line number and the value + * should represent the number of errors that should occur on that line. + * + * @return array + */ + public function getErrorList() + { + return [ + 10 => 1, + 11 => 1, + 14 => 1, + 16 => 1, + 20 => 1, + 23 => 1, + 29 => 1, + 33 => 1, + 37 => 2, + 108 => 2, + 109 => 1, + 111 => 1, + 113 => 2, + 114 => 1, + 128 => 1, + 141 => 1, + 172 => 1, + 194 => 1, + 224 => 1, + 236 => 1, + 260 => 1, + 300 => 1, + 311 => 1, + 346 => 1, + 350 => 1, + 356 => 1, + 362 => 1, + 384 => 1, + 528 => 1, + 541 => 1, + 558 => 1, + 575 => 1, + ]; + + }//end getErrorList() + + + /** + * Returns the lines where warnings should occur. + * + * The key of the array should represent the line number and the value + * should represent the number of warnings that should occur on that line. + * + * @return array + */ + public function getWarningList() + { + return []; + + }//end getWarningList() + + +}//end class diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/PSR2/Tests/Files/ClosingTagUnitTest.1.inc b/vendor/squizlabs/php_codesniffer/src/Standards/PSR2/Tests/Files/ClosingTagUnitTest.1.inc new file mode 100644 index 00000000..738e70e9 --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/PSR2/Tests/Files/ClosingTagUnitTest.1.inc @@ -0,0 +1,12 @@ + + + + diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/PSR2/Tests/Files/ClosingTagUnitTest.1.inc.fixed b/vendor/squizlabs/php_codesniffer/src/Standards/PSR2/Tests/Files/ClosingTagUnitTest.1.inc.fixed new file mode 100644 index 00000000..f70b9eba --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/PSR2/Tests/Files/ClosingTagUnitTest.1.inc.fixed @@ -0,0 +1,12 @@ + + +
    + +
    \ No newline at end of file diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/PSR2/Tests/Files/ClosingTagUnitTest.3.inc b/vendor/squizlabs/php_codesniffer/src/Standards/PSR2/Tests/Files/ClosingTagUnitTest.3.inc new file mode 100644 index 00000000..d6a86175 --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/PSR2/Tests/Files/ClosingTagUnitTest.3.inc @@ -0,0 +1,7 @@ + + +A: +B: +C: \ No newline at end of file diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/PSR2/Tests/Files/ClosingTagUnitTest.4.inc b/vendor/squizlabs/php_codesniffer/src/Standards/PSR2/Tests/Files/ClosingTagUnitTest.4.inc new file mode 100644 index 00000000..dd103cde --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/PSR2/Tests/Files/ClosingTagUnitTest.4.inc @@ -0,0 +1 @@ + diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/PSR2/Tests/Files/ClosingTagUnitTest.4.inc.fixed b/vendor/squizlabs/php_codesniffer/src/Standards/PSR2/Tests/Files/ClosingTagUnitTest.4.inc.fixed new file mode 100644 index 00000000..1058f1f3 --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/PSR2/Tests/Files/ClosingTagUnitTest.4.inc.fixed @@ -0,0 +1 @@ + diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/PSR2/Tests/Files/ClosingTagUnitTest.5.inc.fixed b/vendor/squizlabs/php_codesniffer/src/Standards/PSR2/Tests/Files/ClosingTagUnitTest.5.inc.fixed new file mode 100644 index 00000000..93d55fbd --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/PSR2/Tests/Files/ClosingTagUnitTest.5.inc.fixed @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/PSR2/Tests/Files/ClosingTagUnitTest.6.inc.fixed b/vendor/squizlabs/php_codesniffer/src/Standards/PSR2/Tests/Files/ClosingTagUnitTest.6.inc.fixed new file mode 100644 index 00000000..534574d4 --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/PSR2/Tests/Files/ClosingTagUnitTest.6.inc.fixed @@ -0,0 +1,5 @@ + diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/PSR2/Tests/Files/ClosingTagUnitTest.7.inc.fixed b/vendor/squizlabs/php_codesniffer/src/Standards/PSR2/Tests/Files/ClosingTagUnitTest.7.inc.fixed new file mode 100644 index 00000000..68e7d8ce --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/PSR2/Tests/Files/ClosingTagUnitTest.7.inc.fixed @@ -0,0 +1,5 @@ + + * @copyright 2006-2015 Squiz Pty Ltd (ABN 77 084 670 600) + * @license https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence + */ + +namespace PHP_CodeSniffer\Standards\PSR2\Tests\Files; + +use PHP_CodeSniffer\Tests\Standards\AbstractSniffUnitTest; + +class ClosingTagUnitTest extends AbstractSniffUnitTest +{ + + + /** + * Returns the lines where errors should occur. + * + * The key of the array should represent the line number and the value + * should represent the number of errors that should occur on that line. + * + * @param string $testFile The name of the file being tested. + * + * @return array + */ + public function getErrorList($testFile='') + { + switch ($testFile) { + case 'ClosingTagUnitTest.1.inc': + return [11 => 1]; + + case 'ClosingTagUnitTest.4.inc': + case 'ClosingTagUnitTest.5.inc': + return [1 => 1]; + + case 'ClosingTagUnitTest.6.inc': + case 'ClosingTagUnitTest.7.inc': + return [5 => 1]; + + default: + return []; + } + + }//end getErrorList() + + + /** + * Returns the lines where warnings should occur. + * + * The key of the array should represent the line number and the value + * should represent the number of warnings that should occur on that line. + * + * @return array + */ + public function getWarningList() + { + return []; + + }//end getWarningList() + + +}//end class diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/PSR2/Tests/Files/EndFileNewlineUnitTest.1.inc b/vendor/squizlabs/php_codesniffer/src/Standards/PSR2/Tests/Files/EndFileNewlineUnitTest.1.inc new file mode 100644 index 00000000..ca2a7493 --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/PSR2/Tests/Files/EndFileNewlineUnitTest.1.inc @@ -0,0 +1,3 @@ + \ No newline at end of file diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/PSR2/Tests/Files/EndFileNewlineUnitTest.12.inc.fixed b/vendor/squizlabs/php_codesniffer/src/Standards/PSR2/Tests/Files/EndFileNewlineUnitTest.12.inc.fixed new file mode 100644 index 00000000..d3c19fee --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/PSR2/Tests/Files/EndFileNewlineUnitTest.12.inc.fixed @@ -0,0 +1 @@ + diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/PSR2/Tests/Files/EndFileNewlineUnitTest.13.inc b/vendor/squizlabs/php_codesniffer/src/Standards/PSR2/Tests/Files/EndFileNewlineUnitTest.13.inc new file mode 100644 index 00000000..fa2f476a --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/PSR2/Tests/Files/EndFileNewlineUnitTest.13.inc @@ -0,0 +1,5 @@ + diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/PSR2/Tests/Files/EndFileNewlineUnitTest.2.inc b/vendor/squizlabs/php_codesniffer/src/Standards/PSR2/Tests/Files/EndFileNewlineUnitTest.2.inc new file mode 100644 index 00000000..1254e4a5 --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/PSR2/Tests/Files/EndFileNewlineUnitTest.2.inc @@ -0,0 +1,2 @@ + + diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/PSR2/Tests/Files/EndFileNewlineUnitTest.5.inc b/vendor/squizlabs/php_codesniffer/src/Standards/PSR2/Tests/Files/EndFileNewlineUnitTest.5.inc new file mode 100644 index 00000000..c3a59b67 --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/PSR2/Tests/Files/EndFileNewlineUnitTest.5.inc @@ -0,0 +1,6 @@ + + + + * @copyright 2006-2015 Squiz Pty Ltd (ABN 77 084 670 600) + * @license https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence + */ + +namespace PHP_CodeSniffer\Standards\PSR2\Tests\Files; + +use PHP_CodeSniffer\Tests\Standards\AbstractSniffUnitTest; + +class EndFileNewlineUnitTest extends AbstractSniffUnitTest +{ + + + /** + * Returns the lines where errors should occur. + * + * The key of the array should represent the line number and the value + * should represent the number of errors that should occur on that line. + * + * @param string $testFile The name of the file being tested. + * + * @return array + */ + public function getErrorList($testFile='') + { + switch ($testFile) { + case 'EndFileNewlineUnitTest.1.inc': + case 'EndFileNewlineUnitTest.3.inc': + case 'EndFileNewlineUnitTest.6.inc': + case 'EndFileNewlineUnitTest.7.inc': + case 'EndFileNewlineUnitTest.9.inc': + case 'EndFileNewlineUnitTest.10.inc': + return [2 => 1]; + case 'EndFileNewlineUnitTest.11.inc': + case 'EndFileNewlineUnitTest.12.inc': + case 'EndFileNewlineUnitTest.13.inc': + return [1 => 1]; + default: + return []; + }//end switch + + }//end getErrorList() + + + /** + * Returns the lines where warnings should occur. + * + * The key of the array should represent the line number and the value + * should represent the number of warnings that should occur on that line. + * + * @param string $testFile The name of the file being tested. + * + * @return array + */ + public function getWarningList($testFile='') + { + return []; + + }//end getWarningList() + + +}//end class diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/PSR2/Tests/Methods/FunctionCallSignatureUnitTest.inc b/vendor/squizlabs/php_codesniffer/src/Standards/PSR2/Tests/Methods/FunctionCallSignatureUnitTest.inc new file mode 100644 index 00000000..1ca477d0 --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/PSR2/Tests/Methods/FunctionCallSignatureUnitTest.inc @@ -0,0 +1,267 @@ +get('/hello/{name}', function ($name) use ($app) { + return 'Hello '.$app->escape($name); +}, array( + '1', + '2', + '3', +)); + +// error +somefunction2($foo, $bar, [ + // ... + ], +$baz); + +// ok +somefunction3(// ... + $foo, + $bar, + [ + // ... + ], + $baz +); + +// ok +somefunction4(' + this should not + give an error + because it\'s actually + one line call + with multi-line string +'); + +// ok +somefunction5("hey, +multi-line string with some +extra args", $foo, 12); + +// error +somefunction6(' + but args in a new line + are not ok… + ', + $foo +); + +$this->setFoo(true + ? 1 + : 2, false, array( + 'value', + 'more')); + +$this->setFoo('some' + . 'long' + . 'text', 'string'); + +foo(bar(), $a); +foo();bar(); + +foo( + true +); + +myFunction(<< function ($x) { + return true; + }, + 'baz' => false + ) +); +$qux = array_filter( + $quux, function ($x) { + return $x; + } +); + +$this->listeners[] = $events->getSharedManager()->attach( + 'Zend\Mvc\Application', MvcEvent::EVENT_DISPATCH, [$this, 'selectLayout'], 100 +); + +// phpcs:set PSR2.Methods.FunctionCallSignature requiredSpacesBeforeClose 1 +foo('Testing + multiline text' + ); + +foo('Testing + multiline text: ' // . $text + ); + +foo('Testing + multiline text: ' /* . $text */ + ); + +foo('Testing + multiline text: ' /* . $text */ + // . $other_text + ); + +foo('Testing + multiline text: ' /* + . $text +// . $text2 + */ + ); +// phpcs:set PSR2.Methods.FunctionCallSignature requiredSpacesBeforeClose 0 + +foo('Testing + multiline text' +); + +foo('Testing + multiline text' + ); + +foo('Testing + multiline text' // hello +); + +foo('Testing + multiline text' /* hello */ +); + +foo('Testing + multiline text' + // hello +); + +foo('Testing + multiline text' + /* hello */ +); + +$var = foo('Testing + multiline' + // hi + ) + foo('Testing + multiline' + // hi + ) +; + +class Test +{ + public function getInstance() + { + return new static( + 'arg', + 'foo' + ); + } + + public function getSelf() + { + return new self( + 'a', 'b', 'c' + ); + } +} + +$x = $var('y', + 'x'); + +$obj->{$x}(1, +2); + +(function ($a, $b) { + return function ($c, $d) use ($a, $b) { + echo $a, $b, $c, $d; + }; +})( + 'a','b' +)('c', + 'd'); + +return trim(preg_replace_callback( + // sprintf replaces IGNORED_CHARS multiple times: for %s as well as %1$s (argument numbering) + // /[%s]*([^%1$s]+)/ results in /[IGNORED_CHARS]*([^IGNORED_CHARS]+)/ + sprintf('/[%s]*([^%1$s]+)/', self::IGNORED_CHARS), + function (array $term) use ($mode): string { + // query pieces have to bigger than one char, otherwise they are too expensive for the search + if (mb_strlen($term[1], 'UTF-8') > 1) { + // in boolean search mode '' (empty) means OR, '-' means NOT + return sprintf('%s%s ', $mode === 'AND' ? '+' : '', self::extractUmlauts($term[1])); + } + + return ''; + }, + $search + )); + +return trim(preg_replace_callback( +// sprintf replaces IGNORED_CHARS multiple times: for %s as well as %1$s (argument numbering) +// /[%s]*([^%1$s]+)/ results in /[IGNORED_CHARS]*([^IGNORED_CHARS]+)/ +sprintf('/[%s]*([^%1$s]+)/', self::IGNORED_CHARS), +function (array $term) use ($mode): string { + // query pieces have to bigger than one char, otherwise they are too expensive for the search + if (mb_strlen($term[1], 'UTF-8') > 1) { + // in boolean search mode '' (empty) means OR, '-' means NOT + return sprintf('%s%s ', $mode === 'AND' ? '+' : '', self::extractUmlauts($term[1])); + } + + return ''; +}, +$search +)); + +// PHP 8.0 named parameters. +array_fill_keys( + keys: range( + 1, + 12, + ), + value: true, +); + +array_fill_keys( + keys: range( 1, + 12, + ), value: true, +); + +// phpcs:set PSR2.Methods.FunctionCallSignature allowMultipleArguments true +array_fill_keys( + keys: range( 1, + 12, + ), value: true, +); +// phpcs:set PSR2.Methods.FunctionCallSignature allowMultipleArguments false diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/PSR2/Tests/Methods/FunctionCallSignatureUnitTest.inc.fixed b/vendor/squizlabs/php_codesniffer/src/Standards/PSR2/Tests/Methods/FunctionCallSignatureUnitTest.inc.fixed new file mode 100644 index 00000000..dc383ed2 --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/PSR2/Tests/Methods/FunctionCallSignatureUnitTest.inc.fixed @@ -0,0 +1,283 @@ +get('/hello/{name}', function ($name) use ($app) { + return 'Hello '.$app->escape($name); +}, array( + '1', + '2', + '3', +)); + +// error +somefunction2( + $foo, + $bar, + [ + // ... + ], + $baz +); + +// ok +somefunction3(// ... + $foo, + $bar, + [ + // ... + ], + $baz +); + +// ok +somefunction4(' + this should not + give an error + because it\'s actually + one line call + with multi-line string +'); + +// ok +somefunction5("hey, +multi-line string with some +extra args", $foo, 12); + +// error +somefunction6( + ' + but args in a new line + are not ok… + ', + $foo +); + +$this->setFoo(true + ? 1 + : 2, false, array( + 'value', + 'more')); + +$this->setFoo('some' + . 'long' + . 'text', 'string'); + +foo(bar(), $a); +foo();bar(); + +foo( + true +); + +myFunction(<< function ($x) { + return true; + }, + 'baz' => false + ) +); +$qux = array_filter( + $quux, + function ($x) { + return $x; + } +); + +$this->listeners[] = $events->getSharedManager()->attach( + 'Zend\Mvc\Application', + MvcEvent::EVENT_DISPATCH, + [$this, 'selectLayout'], + 100 +); + +// phpcs:set PSR2.Methods.FunctionCallSignature requiredSpacesBeforeClose 1 +foo('Testing + multiline text' ); + +foo('Testing + multiline text: ' ); // . $text + + +foo('Testing + multiline text: ' /* . $text */ ); + +foo('Testing + multiline text: ' /* . $text */ ); + // . $other_text + + +foo('Testing + multiline text: ' /* + . $text +// . $text2 + */ ); +// phpcs:set PSR2.Methods.FunctionCallSignature requiredSpacesBeforeClose 0 + +foo('Testing + multiline text'); + +foo('Testing + multiline text'); + +foo('Testing + multiline text'); // hello + + +foo('Testing + multiline text' /* hello */); + +foo('Testing + multiline text'); + // hello + + +foo('Testing + multiline text' + /* hello */); + +$var = foo('Testing + multiline') + // hi + + foo('Testing + multiline'); + // hi + + +class Test +{ + public function getInstance() + { + return new static( + 'arg', + 'foo' + ); + } + + public function getSelf() + { + return new self( + 'a', + 'b', + 'c' + ); + } +} + +$x = $var( + 'y', + 'x' +); + +$obj->{$x}( + 1, + 2 +); + +(function ($a, $b) { + return function ($c, $d) use ($a, $b) { + echo $a, $b, $c, $d; + }; +})( + 'a', + 'b' +)( + 'c', + 'd' +); + +return trim(preg_replace_callback( + // sprintf replaces IGNORED_CHARS multiple times: for %s as well as %1$s (argument numbering) + // /[%s]*([^%1$s]+)/ results in /[IGNORED_CHARS]*([^IGNORED_CHARS]+)/ + sprintf('/[%s]*([^%1$s]+)/', self::IGNORED_CHARS), + function (array $term) use ($mode): string { + // query pieces have to bigger than one char, otherwise they are too expensive for the search + if (mb_strlen($term[1], 'UTF-8') > 1) { + // in boolean search mode '' (empty) means OR, '-' means NOT + return sprintf('%s%s ', $mode === 'AND' ? '+' : '', self::extractUmlauts($term[1])); + } + + return ''; + }, + $search +)); + +return trim(preg_replace_callback( +// sprintf replaces IGNORED_CHARS multiple times: for %s as well as %1$s (argument numbering) +// /[%s]*([^%1$s]+)/ results in /[IGNORED_CHARS]*([^IGNORED_CHARS]+)/ + sprintf('/[%s]*([^%1$s]+)/', self::IGNORED_CHARS), + function (array $term) use ($mode): string { + // query pieces have to bigger than one char, otherwise they are too expensive for the search + if (mb_strlen($term[1], 'UTF-8') > 1) { + // in boolean search mode '' (empty) means OR, '-' means NOT + return sprintf('%s%s ', $mode === 'AND' ? '+' : '', self::extractUmlauts($term[1])); + } + + return ''; + }, + $search +)); + +// PHP 8.0 named parameters. +array_fill_keys( + keys: range( + 1, + 12, + ), + value: true, +); + +array_fill_keys( + keys: range( + 1, + 12, + ), + value: true, +); + +// phpcs:set PSR2.Methods.FunctionCallSignature allowMultipleArguments true +array_fill_keys( + keys: range( + 1, + 12, + ), value: true, +); +// phpcs:set PSR2.Methods.FunctionCallSignature allowMultipleArguments false diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/PSR2/Tests/Methods/FunctionCallSignatureUnitTest.php b/vendor/squizlabs/php_codesniffer/src/Standards/PSR2/Tests/Methods/FunctionCallSignatureUnitTest.php new file mode 100644 index 00000000..1d878258 --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/PSR2/Tests/Methods/FunctionCallSignatureUnitTest.php @@ -0,0 +1,94 @@ + + * @copyright 2006-2015 Squiz Pty Ltd (ABN 77 084 670 600) + * @license https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence + */ + +namespace PHP_CodeSniffer\Standards\PSR2\Tests\Methods; + +use PHP_CodeSniffer\Tests\Standards\AbstractSniffUnitTest; + +class FunctionCallSignatureUnitTest extends AbstractSniffUnitTest +{ + + + /** + * Returns the lines where errors should occur. + * + * The key of the array should represent the line number and the value + * should represent the number of errors that should occur on that line. + * + * @return array + */ + public function getErrorList() + { + return [ + 18 => 3, + 21 => 1, + 48 => 1, + 87 => 1, + 90 => 1, + 91 => 1, + 103 => 1, + 111 => 1, + 117 => 4, + 123 => 1, + 127 => 1, + 131 => 1, + 136 => 1, + 143 => 1, + 148 => 1, + 152 => 1, + 156 => 1, + 160 => 1, + 165 => 1, + 170 => 1, + 175 => 1, + 178 => 2, + 186 => 1, + 187 => 1, + 194 => 3, + 199 => 1, + 200 => 2, + 202 => 1, + 203 => 1, + 210 => 2, + 211 => 1, + 212 => 2, + 217 => 1, + 218 => 1, + 227 => 1, + 228 => 1, + 233 => 1, + 234 => 1, + 242 => 1, + 243 => 1, + 256 => 1, + 257 => 1, + 258 => 1, + 263 => 1, + 264 => 1, + ]; + + }//end getErrorList() + + + /** + * Returns the lines where warnings should occur. + * + * The key of the array should represent the line number and the value + * should represent the number of warnings that should occur on that line. + * + * @return array + */ + public function getWarningList() + { + return []; + + }//end getWarningList() + + +}//end class diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/PSR2/Tests/Methods/FunctionClosingBraceUnitTest.inc b/vendor/squizlabs/php_codesniffer/src/Standards/PSR2/Tests/Methods/FunctionClosingBraceUnitTest.inc new file mode 100644 index 00000000..7bf667e6 --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/PSR2/Tests/Methods/FunctionClosingBraceUnitTest.inc @@ -0,0 +1,70 @@ + + * @copyright 2006-2015 Squiz Pty Ltd (ABN 77 084 670 600) + * @license https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence + */ + +namespace PHP_CodeSniffer\Standards\PSR2\Tests\Methods; + +use PHP_CodeSniffer\Tests\Standards\AbstractSniffUnitTest; + +class FunctionClosingBraceUnitTest extends AbstractSniffUnitTest +{ + + + /** + * Returns the lines where errors should occur. + * + * The key of the array should represent the line number and the value + * should represent the number of errors that should occur on that line. + * + * @return array + */ + public function getErrorList() + { + return [ + 16 => 1, + 23 => 1, + 40 => 1, + 47 => 1, + 63 => 1, + 70 => 1, + ]; + + }//end getErrorList() + + + /** + * Returns the lines where warnings should occur. + * + * The key of the array should represent the line number and the value + * should represent the number of warnings that should occur on that line. + * + * @return array + */ + public function getWarningList() + { + return []; + + }//end getWarningList() + + +}//end class diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/PSR2/Tests/Methods/MethodDeclarationUnitTest.inc b/vendor/squizlabs/php_codesniffer/src/Standards/PSR2/Tests/Methods/MethodDeclarationUnitTest.inc new file mode 100644 index 00000000..21c03119 --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/PSR2/Tests/Methods/MethodDeclarationUnitTest.inc @@ -0,0 +1,66 @@ + + * @copyright 2006-2015 Squiz Pty Ltd (ABN 77 084 670 600) + * @license https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence + */ + +namespace PHP_CodeSniffer\Standards\PSR2\Tests\Methods; + +use PHP_CodeSniffer\Tests\Standards\AbstractSniffUnitTest; + +class MethodDeclarationUnitTest extends AbstractSniffUnitTest +{ + + + /** + * Returns the lines where errors should occur. + * + * The key of the array should represent the line number and the value + * should represent the number of errors that should occur on that line. + * + * @return array + */ + public function getErrorList() + { + return [ + 9 => 1, + 11 => 1, + 13 => 1, + 15 => 3, + 24 => 1, + 34 => 1, + 36 => 1, + 38 => 1, + 40 => 3, + 50 => 1, + 52 => 1, + 54 => 1, + 56 => 3, + 63 => 2, + ]; + + }//end getErrorList() + + + /** + * Returns the lines where warnings should occur. + * + * The key of the array should represent the line number and the value + * should represent the number of warnings that should occur on that line. + * + * @return array + */ + public function getWarningList() + { + return [ + 5 => 1, + 21 => 1, + 30 => 1, + 46 => 1, + 63 => 1, + ]; + + }//end getWarningList() + + +}//end class diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/PSR2/Tests/Namespaces/NamespaceDeclarationUnitTest.inc b/vendor/squizlabs/php_codesniffer/src/Standards/PSR2/Tests/Namespaces/NamespaceDeclarationUnitTest.inc new file mode 100644 index 00000000..70339339 --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/PSR2/Tests/Namespaces/NamespaceDeclarationUnitTest.inc @@ -0,0 +1,26 @@ + + * @copyright 2006-2015 Squiz Pty Ltd (ABN 77 084 670 600) + * @license https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence + */ + +namespace PHP_CodeSniffer\Standards\PSR2\Tests\Namespaces; + +use PHP_CodeSniffer\Tests\Standards\AbstractSniffUnitTest; + +class NamespaceDeclarationUnitTest extends AbstractSniffUnitTest +{ + + + /** + * Returns the lines where errors should occur. + * + * The key of the array should represent the line number and the value + * should represent the number of errors that should occur on that line. + * + * @return array + */ + public function getErrorList() + { + return [ + 6 => 1, + 9 => 1, + 17 => 1, + 19 => 1, + ]; + + }//end getErrorList() + + + /** + * Returns the lines where warnings should occur. + * + * The key of the array should represent the line number and the value + * should represent the number of warnings that should occur on that line. + * + * @return array + */ + public function getWarningList() + { + return []; + + }//end getWarningList() + + +}//end class diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/PSR2/Tests/Namespaces/UseDeclarationUnitTest.1.inc b/vendor/squizlabs/php_codesniffer/src/Standards/PSR2/Tests/Namespaces/UseDeclarationUnitTest.1.inc new file mode 100644 index 00000000..c4e83da4 --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/PSR2/Tests/Namespaces/UseDeclarationUnitTest.1.inc @@ -0,0 +1,38 @@ + diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/PSR2/Tests/Namespaces/UseDeclarationUnitTest.2.inc.fixed b/vendor/squizlabs/php_codesniffer/src/Standards/PSR2/Tests/Namespaces/UseDeclarationUnitTest.2.inc.fixed new file mode 100644 index 00000000..6579613b --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/PSR2/Tests/Namespaces/UseDeclarationUnitTest.2.inc.fixed @@ -0,0 +1,27 @@ + diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/PSR2/Tests/Namespaces/UseDeclarationUnitTest.3.inc b/vendor/squizlabs/php_codesniffer/src/Standards/PSR2/Tests/Namespaces/UseDeclarationUnitTest.3.inc new file mode 100644 index 00000000..8b290950 --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/PSR2/Tests/Namespaces/UseDeclarationUnitTest.3.inc @@ -0,0 +1,16 @@ + +

    diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/PSR2/Tests/Namespaces/UseDeclarationUnitTest.5.inc b/vendor/squizlabs/php_codesniffer/src/Standards/PSR2/Tests/Namespaces/UseDeclarationUnitTest.5.inc new file mode 100644 index 00000000..1fdaccd3 --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/PSR2/Tests/Namespaces/UseDeclarationUnitTest.5.inc @@ -0,0 +1,47 @@ + diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/PSR2/Tests/Namespaces/UseDeclarationUnitTest.7.inc b/vendor/squizlabs/php_codesniffer/src/Standards/PSR2/Tests/Namespaces/UseDeclarationUnitTest.7.inc new file mode 100644 index 00000000..dee56869 --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/PSR2/Tests/Namespaces/UseDeclarationUnitTest.7.inc @@ -0,0 +1 @@ + + * @copyright 2006-2015 Squiz Pty Ltd (ABN 77 084 670 600) + * @license https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence + */ + +namespace PHP_CodeSniffer\Standards\PSR2\Tests\Namespaces; + +use PHP_CodeSniffer\Tests\Standards\AbstractSniffUnitTest; + +class UseDeclarationUnitTest extends AbstractSniffUnitTest +{ + + + /** + * Returns the lines where errors should occur. + * + * The key of the array should represent the line number and the value + * should represent the number of errors that should occur on that line. + * + * @param string $testFile The name of the file being tested. + * + * @return array + */ + public function getErrorList($testFile='') + { + switch ($testFile) { + case 'UseDeclarationUnitTest.2.inc': + return [ + 4 => 1, + 5 => 1, + 6 => 1, + 7 => 1, + 9 => 1, + 10 => 1, + 11 => 1, + 16 => 1, + ]; + case 'UseDeclarationUnitTest.3.inc': + return [ + 4 => 1, + 6 => 1, + ]; + case 'UseDeclarationUnitTest.5.inc': + return [ + 5 => 1, + 6 => 1, + 8 => 1, + 14 => 1, + 17 => 1, + 18 => 1, + 19 => 1, + 21 => 1, + 28 => 1, + 30 => 1, + 35 => 1, + ]; + case 'UseDeclarationUnitTest.10.inc': + case 'UseDeclarationUnitTest.11.inc': + case 'UseDeclarationUnitTest.12.inc': + case 'UseDeclarationUnitTest.13.inc': + case 'UseDeclarationUnitTest.14.inc': + case 'UseDeclarationUnitTest.16.inc': + case 'UseDeclarationUnitTest.17.inc': + return [2 => 1]; + case 'UseDeclarationUnitTest.15.inc': + return [ + 3 => 1, + 4 => 1, + 5 => 1, + ]; + default: + return []; + }//end switch + + }//end getErrorList() + + + /** + * Returns the lines where warnings should occur. + * + * The key of the array should represent the line number and the value + * should represent the number of warnings that should occur on that line. + * + * @return array + */ + public function getWarningList() + { + return []; + + }//end getWarningList() + + +}//end class diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/PSR2/ruleset.xml b/vendor/squizlabs/php_codesniffer/src/Standards/PSR2/ruleset.xml new file mode 100644 index 00000000..ba5bd4e0 --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/PSR2/ruleset.xml @@ -0,0 +1,218 @@ + + + The PSR-2 coding standard. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 0 + + + 0 + + + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + 0 + + + + + + + + + + + + + + + + + + + 0 + + + 0 + + + + + + + + + + + + + 0 + + + 0 + + + + + + + 0 + + + + + 0 + + + 0 + + + + + + + + + + + + + + + + + + + + diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Docs/Arrays/ArrayBracketSpacingStandard.xml b/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Docs/Arrays/ArrayBracketSpacingStandard.xml new file mode 100644 index 00000000..fc6ccbd6 --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Docs/Arrays/ArrayBracketSpacingStandard.xml @@ -0,0 +1,19 @@ + + + + + + + ['bar']; +]]> + + + [ 'bar' ]; +]]> + + + diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Docs/Arrays/ArrayDeclarationStandard.xml b/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Docs/Arrays/ArrayDeclarationStandard.xml new file mode 100644 index 00000000..ce4b9ae6 --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Docs/Arrays/ArrayDeclarationStandard.xml @@ -0,0 +1,117 @@ + + + + + + array keyword must be lowercase. + ]]> + + + + + + + + + + + array keyword. + ]]> + + + + 'value1', + 'key2' => 'value2', + ); + ]]> + + + 'value1', + 'key2' => 'value2', + ); + ]]> + + + + array keyword. The closing parenthesis must be aligned with the start of the array keyword. + ]]> + + + + 'key1' => 'value1', + 'key2' => 'value2', + ); + ]]> + + + 'key1' => 'value1', + 'key2' => 'value2', +); + ]]> + + + + + + + + => 'ValueTen', + 'keyTwenty' => 'ValueTwenty', + ); + ]]> + + + => 'ValueTen', + 'keyTwenty' => 'ValueTwenty', + ); + ]]> + + + + + + + + 'value1', + 'key2' => 'value2', + 'key3' => 'value3', + ); + ]]> + + + 'value1', + 'key2' => 'value2', + 'key3' => 'value3' + ); + ]]> + + + diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Docs/Classes/LowercaseClassKeywordsStandard.xml b/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Docs/Classes/LowercaseClassKeywordsStandard.xml new file mode 100644 index 00000000..89fcb5de --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Docs/Classes/LowercaseClassKeywordsStandard.xml @@ -0,0 +1,23 @@ + + + + + + + final class Foo extends Bar +{ +} +]]> + + + Final Class Foo Extends Bar +{ +} +]]> + + + diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Docs/Classes/SelfMemberReferenceStandard.xml b/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Docs/Classes/SelfMemberReferenceStandard.xml new file mode 100644 index 00000000..59d193ff --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Docs/Classes/SelfMemberReferenceStandard.xml @@ -0,0 +1,63 @@ + + + + + + + self::foo(); +]]> + + + SELF::foo(); +]]> + + + + + ::foo(); +]]> + + + :: foo(); +]]> + + + + + self::bar(); + } +} +]]> + + + Foo +{ + public static function bar() + { + } + + public static function baz() + { + Foo::bar(); + } +} +]]> + + + diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Docs/Commenting/DocCommentAlignmentStandard.xml b/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Docs/Commenting/DocCommentAlignmentStandard.xml new file mode 100644 index 00000000..414b89a3 --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Docs/Commenting/DocCommentAlignmentStandard.xml @@ -0,0 +1,39 @@ + + + + + + + * @see foo() + */ +]]> + + + * @see foo() +*/ +]]> + + + + + @see foo() + */ +]]> + + + @see foo() + */ +]]> + + + diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Docs/Commenting/FunctionCommentThrowTagStandard.xml b/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Docs/Commenting/FunctionCommentThrowTagStandard.xml new file mode 100644 index 00000000..81df2e3f --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Docs/Commenting/FunctionCommentThrowTagStandard.xml @@ -0,0 +1,32 @@ + + + + + + + @throws Exception all the time + * @return void + */ +function foo() +{ + throw new Exception('Danger!'); +} +]]> + + + + + + diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Docs/ControlStructures/ForEachLoopDeclarationStandard.xml b/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Docs/ControlStructures/ForEachLoopDeclarationStandard.xml new file mode 100644 index 00000000..87c61813 --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Docs/ControlStructures/ForEachLoopDeclarationStandard.xml @@ -0,0 +1,39 @@ + + + + + + + $foo as $bar => $baz) { + echo $baz; +} +]]> + + + $foo as $bar=>$baz ) { + echo $baz; +} +]]> + + + + + as $bar => $baz) { + echo $baz; +} +]]> + + + AS $bar => $baz) { + echo $baz; +} +]]> + + + diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Docs/ControlStructures/ForLoopDeclarationStandard.xml b/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Docs/ControlStructures/ForLoopDeclarationStandard.xml new file mode 100644 index 00000000..bbc43923 --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Docs/ControlStructures/ForLoopDeclarationStandard.xml @@ -0,0 +1,55 @@ + + + + + + + $i = 0; $i < 10; $i++) { + echo $i; +} +]]> + + + $i = 0; $i < 10; $i++ ) { + echo $i; +} +]]> + + + + + ; $i < 10; $i++) { + echo $i; +} +]]> + + + ; $i < 10 ; $i++) { + echo $i; +} +]]> + + + + + $i < 10; $i++) { + echo $i; +} +]]> + + + $i < 10;$i++) { + echo $i; +} +]]> + + + diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Docs/ControlStructures/LowercaseDeclarationStandard.xml b/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Docs/ControlStructures/LowercaseDeclarationStandard.xml new file mode 100644 index 00000000..699f1f09 --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Docs/ControlStructures/LowercaseDeclarationStandard.xml @@ -0,0 +1,23 @@ + + + + + + + if ($foo) { + $bar = true; +} +]]> + + + IF ($foo) { + $bar = true; +} +]]> + + + diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Docs/Functions/FunctionDuplicateArgumentStandard.xml b/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Docs/Functions/FunctionDuplicateArgumentStandard.xml new file mode 100644 index 00000000..a890aba6 --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Docs/Functions/FunctionDuplicateArgumentStandard.xml @@ -0,0 +1,23 @@ + + + + + + + isset($foo)) { + echo $foo; +} +]]> + + + isSet($foo)) { + echo $foo; +} +]]> + + + diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Docs/Functions/LowercaseFunctionKeywordsStandard.xml b/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Docs/Functions/LowercaseFunctionKeywordsStandard.xml new file mode 100644 index 00000000..46e8a8f3 --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Docs/Functions/LowercaseFunctionKeywordsStandard.xml @@ -0,0 +1,25 @@ + + + + + + + function foo() +{ + return true; +} +]]> + + + FUNCTION foo() +{ + return true; +} +]]> + + + diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Docs/Scope/StaticThisUsageStandard.xml b/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Docs/Scope/StaticThisUsageStandard.xml new file mode 100644 index 00000000..3c97f54e --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Docs/Scope/StaticThisUsageStandard.xml @@ -0,0 +1,31 @@ + + + + + + + static function bar() + { + return self::$staticMember; + } +} +]]> + + + static function bar() + { + return $this->$staticMember; + } +} +]]> + + + diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Docs/Strings/EchoedStringsStandard.xml b/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Docs/Strings/EchoedStringsStandard.xml new file mode 100644 index 00000000..030f2a68 --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Docs/Strings/EchoedStringsStandard.xml @@ -0,0 +1,19 @@ + + + + + + + "Hello"; +]]> + + + ("Hello"); +]]> + + + diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Docs/WhiteSpace/CastSpacingStandard.xml b/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Docs/WhiteSpace/CastSpacingStandard.xml new file mode 100644 index 00000000..0fb195cb --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Docs/WhiteSpace/CastSpacingStandard.xml @@ -0,0 +1,19 @@ + + + + + + + int)'42'; +]]> + + + int )'42'; +]]> + + + diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Docs/WhiteSpace/FunctionOpeningBraceStandard.xml b/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Docs/WhiteSpace/FunctionOpeningBraceStandard.xml new file mode 100644 index 00000000..d2bc2647 --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Docs/WhiteSpace/FunctionOpeningBraceStandard.xml @@ -0,0 +1,41 @@ + + + + + + + { +} +]]> + + + { +} +]]> + + + + + return 42; +} +]]> + + + + return 42; +} +]]> + + + diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Docs/WhiteSpace/LanguageConstructSpacingStandard.xml b/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Docs/WhiteSpace/LanguageConstructSpacingStandard.xml new file mode 100644 index 00000000..608bed0b --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Docs/WhiteSpace/LanguageConstructSpacingStandard.xml @@ -0,0 +1,19 @@ + + + + + + + "hi"; +]]> + + + "hi"; +]]> + + + diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Docs/WhiteSpace/ObjectOperatorSpacingStandard.xml b/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Docs/WhiteSpace/ObjectOperatorSpacingStandard.xml new file mode 100644 index 00000000..c6194d71 --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Docs/WhiteSpace/ObjectOperatorSpacingStandard.xml @@ -0,0 +1,19 @@ + + + ) should not have any space around it. + ]]> + + + + ->bar(); +]]> + + + -> bar(); +]]> + + + diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Docs/WhiteSpace/ScopeKeywordSpacingStandard.xml b/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Docs/WhiteSpace/ScopeKeywordSpacingStandard.xml new file mode 100644 index 00000000..8cadf669 --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Docs/WhiteSpace/ScopeKeywordSpacingStandard.xml @@ -0,0 +1,23 @@ + + + + + + + static function foo() +{ +} +]]> + + + static function foo() +{ +} +]]> + + + diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Docs/WhiteSpace/SemicolonSpacingStandard.xml b/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Docs/WhiteSpace/SemicolonSpacingStandard.xml new file mode 100644 index 00000000..7b227952 --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Docs/WhiteSpace/SemicolonSpacingStandard.xml @@ -0,0 +1,19 @@ + + + + + + + ; +]]> + + + ; +]]> + + + diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Sniffs/Arrays/ArrayBracketSpacingSniff.php b/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Sniffs/Arrays/ArrayBracketSpacingSniff.php new file mode 100644 index 00000000..ee63dead --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Sniffs/Arrays/ArrayBracketSpacingSniff.php @@ -0,0 +1,95 @@ + + * @copyright 2006-2015 Squiz Pty Ltd (ABN 77 084 670 600) + * @license https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence + */ + +namespace PHP_CodeSniffer\Standards\Squiz\Sniffs\Arrays; + +use PHP_CodeSniffer\Files\File; +use PHP_CodeSniffer\Sniffs\Sniff; + +class ArrayBracketSpacingSniff implements Sniff +{ + + + /** + * Returns an array of tokens this test wants to listen for. + * + * @return array + */ + public function register() + { + return [ + T_OPEN_SQUARE_BRACKET, + T_CLOSE_SQUARE_BRACKET, + ]; + + }//end register() + + + /** + * Processes this sniff, when one of its tokens is encountered. + * + * @param \PHP_CodeSniffer\Files\File $phpcsFile The current file being checked. + * @param int $stackPtr The position of the current token in the + * stack passed in $tokens. + * + * @return void + */ + public function process(File $phpcsFile, $stackPtr) + { + $tokens = $phpcsFile->getTokens(); + + if (($tokens[$stackPtr]['code'] === T_OPEN_SQUARE_BRACKET + && isset($tokens[$stackPtr]['bracket_closer']) === false) + || ($tokens[$stackPtr]['code'] === T_CLOSE_SQUARE_BRACKET + && isset($tokens[$stackPtr]['bracket_opener']) === false) + ) { + // Bow out for parse error/during live coding. + return; + } + + // Square brackets can not have a space before them. + $prevType = $tokens[($stackPtr - 1)]['code']; + if ($prevType === T_WHITESPACE) { + $nonSpace = $phpcsFile->findPrevious(T_WHITESPACE, ($stackPtr - 2), null, true); + $expected = $tokens[$nonSpace]['content'].$tokens[$stackPtr]['content']; + $found = $phpcsFile->getTokensAsString($nonSpace, ($stackPtr - $nonSpace)).$tokens[$stackPtr]['content']; + $error = 'Space found before square bracket; expected "%s" but found "%s"'; + $data = [ + $expected, + $found, + ]; + $fix = $phpcsFile->addFixableError($error, $stackPtr, 'SpaceBeforeBracket', $data); + if ($fix === true) { + $phpcsFile->fixer->replaceToken(($stackPtr - 1), ''); + } + } + + // Open square brackets can't ever have spaces after them. + if ($tokens[$stackPtr]['code'] === T_OPEN_SQUARE_BRACKET) { + $nextType = $tokens[($stackPtr + 1)]['code']; + if ($nextType === T_WHITESPACE) { + $nonSpace = $phpcsFile->findNext(T_WHITESPACE, ($stackPtr + 2), null, true); + $expected = $tokens[$stackPtr]['content'].$tokens[$nonSpace]['content']; + $found = $phpcsFile->getTokensAsString($stackPtr, ($nonSpace - $stackPtr + 1)); + $error = 'Space found after square bracket; expected "%s" but found "%s"'; + $data = [ + $expected, + $found, + ]; + $fix = $phpcsFile->addFixableError($error, $stackPtr, 'SpaceAfterBracket', $data); + if ($fix === true) { + $phpcsFile->fixer->replaceToken(($stackPtr + 1), ''); + } + } + } + + }//end process() + + +}//end class diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Sniffs/Arrays/ArrayDeclarationSniff.php b/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Sniffs/Arrays/ArrayDeclarationSniff.php new file mode 100644 index 00000000..17991bd7 --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Sniffs/Arrays/ArrayDeclarationSniff.php @@ -0,0 +1,894 @@ + + * @copyright 2006-2015 Squiz Pty Ltd (ABN 77 084 670 600) + * @license https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence + */ + +namespace PHP_CodeSniffer\Standards\Squiz\Sniffs\Arrays; + +use PHP_CodeSniffer\Files\File; +use PHP_CodeSniffer\Sniffs\Sniff; +use PHP_CodeSniffer\Util\Tokens; + +class ArrayDeclarationSniff implements Sniff +{ + + + /** + * Returns an array of tokens this test wants to listen for. + * + * @return array + */ + public function register() + { + return [ + T_ARRAY, + T_OPEN_SHORT_ARRAY, + ]; + + }//end register() + + + /** + * Processes this sniff, when one of its tokens is encountered. + * + * @param \PHP_CodeSniffer\Files\File $phpcsFile The current file being checked. + * @param int $stackPtr The position of the current token in + * the stack passed in $tokens. + * + * @return void + */ + public function process(File $phpcsFile, $stackPtr) + { + $tokens = $phpcsFile->getTokens(); + + if ($tokens[$stackPtr]['code'] === T_ARRAY) { + $phpcsFile->recordMetric($stackPtr, 'Short array syntax used', 'no'); + + // Array keyword should be lower case. + if ($tokens[$stackPtr]['content'] !== strtolower($tokens[$stackPtr]['content'])) { + if ($tokens[$stackPtr]['content'] === strtoupper($tokens[$stackPtr]['content'])) { + $phpcsFile->recordMetric($stackPtr, 'Array keyword case', 'upper'); + } else { + $phpcsFile->recordMetric($stackPtr, 'Array keyword case', 'mixed'); + } + + $error = 'Array keyword should be lower case; expected "array" but found "%s"'; + $data = [$tokens[$stackPtr]['content']]; + $fix = $phpcsFile->addFixableError($error, $stackPtr, 'NotLowerCase', $data); + if ($fix === true) { + $phpcsFile->fixer->replaceToken($stackPtr, 'array'); + } + } else { + $phpcsFile->recordMetric($stackPtr, 'Array keyword case', 'lower'); + } + + $arrayStart = $tokens[$stackPtr]['parenthesis_opener']; + if (isset($tokens[$arrayStart]['parenthesis_closer']) === false) { + return; + } + + $arrayEnd = $tokens[$arrayStart]['parenthesis_closer']; + + if ($arrayStart !== ($stackPtr + 1)) { + $error = 'There must be no space between the "array" keyword and the opening parenthesis'; + + $next = $phpcsFile->findNext(T_WHITESPACE, ($stackPtr + 1), $arrayStart, true); + if (isset(Tokens::$commentTokens[$tokens[$next]['code']]) === true) { + // We don't have anywhere to put the comment, so don't attempt to fix it. + $phpcsFile->addError($error, $stackPtr, 'SpaceAfterKeyword'); + } else { + $fix = $phpcsFile->addFixableError($error, $stackPtr, 'SpaceAfterKeyword'); + if ($fix === true) { + $phpcsFile->fixer->beginChangeset(); + for ($i = ($stackPtr + 1); $i < $arrayStart; $i++) { + $phpcsFile->fixer->replaceToken($i, ''); + } + + $phpcsFile->fixer->endChangeset(); + } + } + } + } else { + $phpcsFile->recordMetric($stackPtr, 'Short array syntax used', 'yes'); + $arrayStart = $stackPtr; + $arrayEnd = $tokens[$stackPtr]['bracket_closer']; + }//end if + + // Check for empty arrays. + $content = $phpcsFile->findNext(T_WHITESPACE, ($arrayStart + 1), ($arrayEnd + 1), true); + if ($content === $arrayEnd) { + // Empty array, but if the brackets aren't together, there's a problem. + if (($arrayEnd - $arrayStart) !== 1) { + $error = 'Empty array declaration must have no space between the parentheses'; + $fix = $phpcsFile->addFixableError($error, $stackPtr, 'SpaceInEmptyArray'); + + if ($fix === true) { + $phpcsFile->fixer->beginChangeset(); + for ($i = ($arrayStart + 1); $i < $arrayEnd; $i++) { + $phpcsFile->fixer->replaceToken($i, ''); + } + + $phpcsFile->fixer->endChangeset(); + } + } + + // We can return here because there is nothing else to check. All code + // below can assume that the array is not empty. + return; + } + + if ($tokens[$arrayStart]['line'] === $tokens[$arrayEnd]['line']) { + $this->processSingleLineArray($phpcsFile, $stackPtr, $arrayStart, $arrayEnd); + } else { + $this->processMultiLineArray($phpcsFile, $stackPtr, $arrayStart, $arrayEnd); + } + + }//end process() + + + /** + * Processes a single-line array definition. + * + * @param \PHP_CodeSniffer\Files\File $phpcsFile The current file being checked. + * @param int $stackPtr The position of the current token + * in the stack passed in $tokens. + * @param int $arrayStart The token that starts the array definition. + * @param int $arrayEnd The token that ends the array definition. + * + * @return void + */ + public function processSingleLineArray($phpcsFile, $stackPtr, $arrayStart, $arrayEnd) + { + $tokens = $phpcsFile->getTokens(); + + // Check if there are multiple values. If so, then it has to be multiple lines + // unless it is contained inside a function call or condition. + $valueCount = 0; + $commas = []; + for ($i = ($arrayStart + 1); $i < $arrayEnd; $i++) { + // Skip bracketed statements, like function calls. + if ($tokens[$i]['code'] === T_OPEN_PARENTHESIS) { + $i = $tokens[$i]['parenthesis_closer']; + continue; + } + + if ($tokens[$i]['code'] === T_COMMA) { + // Before counting this comma, make sure we are not + // at the end of the array. + $next = $phpcsFile->findNext(T_WHITESPACE, ($i + 1), $arrayEnd, true); + if ($next !== false) { + $valueCount++; + $commas[] = $i; + } else { + // There is a comma at the end of a single line array. + $error = 'Comma not allowed after last value in single-line array declaration'; + $fix = $phpcsFile->addFixableError($error, $i, 'CommaAfterLast'); + if ($fix === true) { + $phpcsFile->fixer->replaceToken($i, ''); + } + } + } + }//end for + + // Now check each of the double arrows (if any). + $nextArrow = $arrayStart; + while (($nextArrow = $phpcsFile->findNext(T_DOUBLE_ARROW, ($nextArrow + 1), $arrayEnd)) !== false) { + if ($tokens[($nextArrow - 1)]['code'] !== T_WHITESPACE) { + $content = $tokens[($nextArrow - 1)]['content']; + $error = 'Expected 1 space between "%s" and double arrow; 0 found'; + $data = [$content]; + $fix = $phpcsFile->addFixableError($error, $nextArrow, 'NoSpaceBeforeDoubleArrow', $data); + if ($fix === true) { + $phpcsFile->fixer->addContentBefore($nextArrow, ' '); + } + } else { + $spaceLength = $tokens[($nextArrow - 1)]['length']; + if ($spaceLength !== 1) { + $content = $tokens[($nextArrow - 2)]['content']; + $error = 'Expected 1 space between "%s" and double arrow; %s found'; + $data = [ + $content, + $spaceLength, + ]; + + $fix = $phpcsFile->addFixableError($error, $nextArrow, 'SpaceBeforeDoubleArrow', $data); + if ($fix === true) { + $phpcsFile->fixer->replaceToken(($nextArrow - 1), ' '); + } + } + }//end if + + if ($tokens[($nextArrow + 1)]['code'] !== T_WHITESPACE) { + $content = $tokens[($nextArrow + 1)]['content']; + $error = 'Expected 1 space between double arrow and "%s"; 0 found'; + $data = [$content]; + $fix = $phpcsFile->addFixableError($error, $nextArrow, 'NoSpaceAfterDoubleArrow', $data); + if ($fix === true) { + $phpcsFile->fixer->addContent($nextArrow, ' '); + } + } else { + $spaceLength = $tokens[($nextArrow + 1)]['length']; + if ($spaceLength !== 1) { + $content = $tokens[($nextArrow + 2)]['content']; + $error = 'Expected 1 space between double arrow and "%s"; %s found'; + $data = [ + $content, + $spaceLength, + ]; + + $fix = $phpcsFile->addFixableError($error, $nextArrow, 'SpaceAfterDoubleArrow', $data); + if ($fix === true) { + $phpcsFile->fixer->replaceToken(($nextArrow + 1), ' '); + } + } + }//end if + }//end while + + if ($valueCount > 0) { + $nestedParenthesis = false; + if (isset($tokens[$stackPtr]['nested_parenthesis']) === true) { + $nested = $tokens[$stackPtr]['nested_parenthesis']; + $nestedParenthesis = array_pop($nested); + } + + if ($nestedParenthesis === false + || $tokens[$nestedParenthesis]['line'] !== $tokens[$stackPtr]['line'] + ) { + $error = 'Array with multiple values cannot be declared on a single line'; + $fix = $phpcsFile->addFixableError($error, $stackPtr, 'SingleLineNotAllowed'); + if ($fix === true) { + $phpcsFile->fixer->beginChangeset(); + $phpcsFile->fixer->addNewline($arrayStart); + + if ($tokens[($arrayEnd - 1)]['code'] === T_WHITESPACE) { + $phpcsFile->fixer->replaceToken(($arrayEnd - 1), $phpcsFile->eolChar); + } else { + $phpcsFile->fixer->addNewlineBefore($arrayEnd); + } + + $phpcsFile->fixer->endChangeset(); + } + + return; + } + + // We have a multiple value array that is inside a condition or + // function. Check its spacing is correct. + foreach ($commas as $comma) { + if ($tokens[($comma + 1)]['code'] !== T_WHITESPACE) { + $content = $tokens[($comma + 1)]['content']; + $error = 'Expected 1 space between comma and "%s"; 0 found'; + $data = [$content]; + $fix = $phpcsFile->addFixableError($error, $comma, 'NoSpaceAfterComma', $data); + if ($fix === true) { + $phpcsFile->fixer->addContent($comma, ' '); + } + } else { + $spaceLength = $tokens[($comma + 1)]['length']; + if ($spaceLength !== 1) { + $content = $tokens[($comma + 2)]['content']; + $error = 'Expected 1 space between comma and "%s"; %s found'; + $data = [ + $content, + $spaceLength, + ]; + + $fix = $phpcsFile->addFixableError($error, $comma, 'SpaceAfterComma', $data); + if ($fix === true) { + $phpcsFile->fixer->replaceToken(($comma + 1), ' '); + } + } + }//end if + + if ($tokens[($comma - 1)]['code'] === T_WHITESPACE) { + $content = $tokens[($comma - 2)]['content']; + $spaceLength = $tokens[($comma - 1)]['length']; + $error = 'Expected 0 spaces between "%s" and comma; %s found'; + $data = [ + $content, + $spaceLength, + ]; + + $fix = $phpcsFile->addFixableError($error, $comma, 'SpaceBeforeComma', $data); + if ($fix === true) { + $phpcsFile->fixer->replaceToken(($comma - 1), ''); + } + } + }//end foreach + }//end if + + }//end processSingleLineArray() + + + /** + * Processes a multi-line array definition. + * + * @param \PHP_CodeSniffer\Files\File $phpcsFile The current file being checked. + * @param int $stackPtr The position of the current token + * in the stack passed in $tokens. + * @param int $arrayStart The token that starts the array definition. + * @param int $arrayEnd The token that ends the array definition. + * + * @return void + */ + public function processMultiLineArray($phpcsFile, $stackPtr, $arrayStart, $arrayEnd) + { + $tokens = $phpcsFile->getTokens(); + $keywordStart = $tokens[$stackPtr]['column']; + + // Check the closing bracket is on a new line. + $lastContent = $phpcsFile->findPrevious(T_WHITESPACE, ($arrayEnd - 1), $arrayStart, true); + if ($tokens[$lastContent]['line'] === $tokens[$arrayEnd]['line']) { + $error = 'Closing parenthesis of array declaration must be on a new line'; + $fix = $phpcsFile->addFixableError($error, $arrayEnd, 'CloseBraceNewLine'); + if ($fix === true) { + $phpcsFile->fixer->addNewlineBefore($arrayEnd); + } + } else if ($tokens[$arrayEnd]['column'] !== $keywordStart) { + // Check the closing bracket is lined up under the "a" in array. + $expected = ($keywordStart - 1); + $found = ($tokens[$arrayEnd]['column'] - 1); + $error = 'Closing parenthesis not aligned correctly; expected %s space(s) but found %s'; + $data = [ + $expected, + $found, + ]; + + $fix = $phpcsFile->addFixableError($error, $arrayEnd, 'CloseBraceNotAligned', $data); + if ($fix === true) { + if ($found === 0) { + $phpcsFile->fixer->addContent(($arrayEnd - 1), str_repeat(' ', $expected)); + } else { + $phpcsFile->fixer->replaceToken(($arrayEnd - 1), str_repeat(' ', $expected)); + } + } + }//end if + + $keyUsed = false; + $singleUsed = false; + $indices = []; + $maxLength = 0; + + if ($tokens[$stackPtr]['code'] === T_ARRAY) { + $lastToken = $tokens[$stackPtr]['parenthesis_opener']; + } else { + $lastToken = $stackPtr; + } + + // Find all the double arrows that reside in this scope. + for ($nextToken = ($stackPtr + 1); $nextToken < $arrayEnd; $nextToken++) { + // Skip bracketed statements, like function calls. + if ($tokens[$nextToken]['code'] === T_OPEN_PARENTHESIS + && (isset($tokens[$nextToken]['parenthesis_owner']) === false + || $tokens[$nextToken]['parenthesis_owner'] !== $stackPtr) + ) { + $nextToken = $tokens[$nextToken]['parenthesis_closer']; + continue; + } + + if ($tokens[$nextToken]['code'] === T_ARRAY + || $tokens[$nextToken]['code'] === T_OPEN_SHORT_ARRAY + || $tokens[$nextToken]['code'] === T_CLOSURE + || $tokens[$nextToken]['code'] === T_FN + ) { + // Let subsequent calls of this test handle nested arrays. + if ($tokens[$lastToken]['code'] !== T_DOUBLE_ARROW) { + $indices[] = ['value' => $nextToken]; + $lastToken = $nextToken; + } + + if ($tokens[$nextToken]['code'] === T_ARRAY) { + $nextToken = $tokens[$tokens[$nextToken]['parenthesis_opener']]['parenthesis_closer']; + } else if ($tokens[$nextToken]['code'] === T_OPEN_SHORT_ARRAY) { + $nextToken = $tokens[$nextToken]['bracket_closer']; + } else { + // T_CLOSURE. + $nextToken = $tokens[$nextToken]['scope_closer']; + } + + $nextToken = $phpcsFile->findNext(T_WHITESPACE, ($nextToken + 1), null, true); + if ($tokens[$nextToken]['code'] !== T_COMMA) { + $nextToken--; + } else { + $lastToken = $nextToken; + } + + continue; + }//end if + + if ($tokens[$nextToken]['code'] !== T_DOUBLE_ARROW && $tokens[$nextToken]['code'] !== T_COMMA) { + continue; + } + + $currentEntry = []; + + if ($tokens[$nextToken]['code'] === T_COMMA) { + $stackPtrCount = 0; + if (isset($tokens[$stackPtr]['nested_parenthesis']) === true) { + $stackPtrCount = count($tokens[$stackPtr]['nested_parenthesis']); + } + + $commaCount = 0; + if (isset($tokens[$nextToken]['nested_parenthesis']) === true) { + $commaCount = count($tokens[$nextToken]['nested_parenthesis']); + if ($tokens[$stackPtr]['code'] === T_ARRAY) { + // Remove parenthesis that are used to define the array. + $commaCount--; + } + } + + if ($commaCount > $stackPtrCount) { + // This comma is inside more parenthesis than the ARRAY keyword, + // then there it is actually a comma used to separate arguments + // in a function call. + continue; + } + + if ($keyUsed === true && $tokens[$lastToken]['code'] === T_COMMA) { + $error = 'No key specified for array entry; first entry specifies key'; + $phpcsFile->addError($error, $nextToken, 'NoKeySpecified'); + return; + } + + if ($keyUsed === false) { + if ($tokens[($nextToken - 1)]['code'] === T_WHITESPACE) { + $prev = $phpcsFile->findPrevious(Tokens::$emptyTokens, ($nextToken - 1), null, true); + if (($tokens[$prev]['code'] !== T_END_HEREDOC + && $tokens[$prev]['code'] !== T_END_NOWDOC) + || $tokens[($nextToken - 1)]['line'] === $tokens[$nextToken]['line'] + ) { + if ($tokens[($nextToken - 1)]['content'] === $phpcsFile->eolChar) { + $spaceLength = 'newline'; + } else { + $spaceLength = $tokens[($nextToken - 1)]['length']; + } + + $error = 'Expected 0 spaces before comma; %s found'; + $data = [$spaceLength]; + + // The error is only fixable if there is only whitespace between the tokens. + if ($prev === $phpcsFile->findPrevious(T_WHITESPACE, ($nextToken - 1), null, true)) { + $fix = $phpcsFile->addFixableError($error, $nextToken, 'SpaceBeforeComma', $data); + if ($fix === true) { + $phpcsFile->fixer->replaceToken(($nextToken - 1), ''); + } + } else { + $phpcsFile->addError($error, $nextToken, 'SpaceBeforeComma', $data); + } + } + }//end if + + $valueContent = $phpcsFile->findNext( + Tokens::$emptyTokens, + ($lastToken + 1), + $nextToken, + true + ); + + $indices[] = ['value' => $valueContent]; + $singleUsed = true; + }//end if + + $lastToken = $nextToken; + continue; + }//end if + + if ($tokens[$nextToken]['code'] === T_DOUBLE_ARROW) { + if ($singleUsed === true) { + $error = 'Key specified for array entry; first entry has no key'; + $phpcsFile->addError($error, $nextToken, 'KeySpecified'); + return; + } + + $currentEntry['arrow'] = $nextToken; + $keyUsed = true; + + // Find the start of index that uses this double arrow. + $indexEnd = $phpcsFile->findPrevious(T_WHITESPACE, ($nextToken - 1), $arrayStart, true); + $indexStart = $phpcsFile->findStartOfStatement($indexEnd); + + if ($indexStart === $indexEnd) { + $currentEntry['index'] = $indexEnd; + $currentEntry['index_content'] = $tokens[$indexEnd]['content']; + $currentEntry['index_length'] = $tokens[$indexEnd]['length']; + } else { + $currentEntry['index'] = $indexStart; + $currentEntry['index_content'] = ''; + $currentEntry['index_length'] = 0; + for ($i = $indexStart; $i <= $indexEnd; $i++) { + $currentEntry['index_content'] .= $tokens[$i]['content']; + $currentEntry['index_length'] += $tokens[$i]['length']; + } + } + + if ($maxLength < $currentEntry['index_length']) { + $maxLength = $currentEntry['index_length']; + } + + // Find the value of this index. + $nextContent = $phpcsFile->findNext( + Tokens::$emptyTokens, + ($nextToken + 1), + $arrayEnd, + true + ); + + $currentEntry['value'] = $nextContent; + $indices[] = $currentEntry; + $lastToken = $nextToken; + }//end if + }//end for + + // Check for multi-line arrays that should be single-line. + $singleValue = false; + + if (empty($indices) === true) { + $singleValue = true; + } else if (count($indices) === 1 && $tokens[$lastToken]['code'] === T_COMMA) { + // There may be another array value without a comma. + $exclude = Tokens::$emptyTokens; + $exclude[] = T_COMMA; + $nextContent = $phpcsFile->findNext($exclude, ($indices[0]['value'] + 1), $arrayEnd, true); + if ($nextContent === false) { + $singleValue = true; + } + } + + if ($singleValue === true) { + // Before we complain, make sure the single value isn't a here/nowdoc. + $next = $phpcsFile->findNext(Tokens::$heredocTokens, ($arrayStart + 1), ($arrayEnd - 1)); + if ($next === false) { + // Array cannot be empty, so this is a multi-line array with + // a single value. It should be defined on single line. + $error = 'Multi-line array contains a single value; use single-line array instead'; + $errorCode = 'MultiLineNotAllowed'; + + $find = Tokens::$phpcsCommentTokens; + $find[] = T_COMMENT; + $comment = $phpcsFile->findNext($find, ($arrayStart + 1), $arrayEnd); + if ($comment === false) { + $fix = $phpcsFile->addFixableError($error, $stackPtr, $errorCode); + } else { + $fix = false; + $phpcsFile->addError($error, $stackPtr, $errorCode); + } + + if ($fix === true) { + $phpcsFile->fixer->beginChangeset(); + for ($i = ($arrayStart + 1); $i < $arrayEnd; $i++) { + if ($tokens[$i]['code'] !== T_WHITESPACE) { + break; + } + + $phpcsFile->fixer->replaceToken($i, ''); + } + + for ($i = ($arrayEnd - 1); $i > $arrayStart; $i--) { + if ($tokens[$i]['code'] !== T_WHITESPACE) { + break; + } + + $phpcsFile->fixer->replaceToken($i, ''); + } + + $phpcsFile->fixer->endChangeset(); + } + + return; + }//end if + }//end if + + /* + This section checks for arrays that don't specify keys. + + Arrays such as: + array( + 'aaa', + 'bbb', + 'd', + ); + */ + + if ($keyUsed === false && empty($indices) === false) { + $count = count($indices); + $lastIndex = $indices[($count - 1)]['value']; + + $trailingContent = $phpcsFile->findPrevious( + Tokens::$emptyTokens, + ($arrayEnd - 1), + $lastIndex, + true + ); + + if ($tokens[$trailingContent]['code'] !== T_COMMA) { + $phpcsFile->recordMetric($stackPtr, 'Array end comma', 'no'); + $error = 'Comma required after last value in array declaration'; + $fix = $phpcsFile->addFixableError($error, $trailingContent, 'NoCommaAfterLast'); + if ($fix === true) { + $phpcsFile->fixer->addContent($trailingContent, ','); + } + } else { + $phpcsFile->recordMetric($stackPtr, 'Array end comma', 'yes'); + } + + foreach ($indices as $valuePosition => $value) { + if (empty($value['value']) === true) { + // Array was malformed and we couldn't figure out + // the array value correctly, so we have to ignore it. + // Other parts of this sniff will correct the error. + continue; + } + + $valuePointer = $value['value']; + + $ignoreTokens = [ + T_WHITESPACE => T_WHITESPACE, + T_COMMA => T_COMMA, + ]; + $ignoreTokens += Tokens::$castTokens; + + if ($tokens[$valuePointer]['code'] === T_CLOSURE + || $tokens[$valuePointer]['code'] === T_FN + ) { + $ignoreTokens += [T_STATIC => T_STATIC]; + } + + $previous = $phpcsFile->findPrevious($ignoreTokens, ($valuePointer - 1), ($arrayStart + 1), true); + if ($previous === false) { + $previous = $stackPtr; + } + + $previousIsWhitespace = $tokens[($valuePointer - 1)]['code'] === T_WHITESPACE; + if ($tokens[$previous]['line'] === $tokens[$valuePointer]['line']) { + $error = 'Each value in a multi-line array must be on a new line'; + if ($valuePosition === 0) { + $error = 'The first value in a multi-value array must be on a new line'; + } + + $fix = $phpcsFile->addFixableError($error, $valuePointer, 'ValueNoNewline'); + if ($fix === true) { + if ($previousIsWhitespace === true) { + $phpcsFile->fixer->replaceToken(($valuePointer - 1), $phpcsFile->eolChar); + } else { + $phpcsFile->fixer->addNewlineBefore($valuePointer); + } + } + } else if ($previousIsWhitespace === true) { + $expected = $keywordStart; + + $first = $phpcsFile->findFirstOnLine(T_WHITESPACE, $valuePointer, true); + $found = ($tokens[$first]['column'] - 1); + if ($found !== $expected) { + $error = 'Array value not aligned correctly; expected %s spaces but found %s'; + $data = [ + $expected, + $found, + ]; + + $fix = $phpcsFile->addFixableError($error, $first, 'ValueNotAligned', $data); + if ($fix === true) { + if ($found === 0) { + $phpcsFile->fixer->addContent(($first - 1), str_repeat(' ', $expected)); + } else { + $phpcsFile->fixer->replaceToken(($first - 1), str_repeat(' ', $expected)); + } + } + } + }//end if + }//end foreach + }//end if + + /* + Below the actual indentation of the array is checked. + Errors will be thrown when a key is not aligned, when + a double arrow is not aligned, and when a value is not + aligned correctly. + If an error is found in one of the above areas, then errors + are not reported for the rest of the line to avoid reporting + spaces and columns incorrectly. Often fixing the first + problem will fix the other 2 anyway. + + For example: + + $a = array( + 'index' => '2', + ); + + or + + $a = [ + 'index' => '2', + ]; + + In this array, the double arrow is indented too far, but this + will also cause an error in the value's alignment. If the arrow were + to be moved back one space however, then both errors would be fixed. + */ + + $indicesStart = ($keywordStart + 1); + foreach ($indices as $valuePosition => $index) { + $valuePointer = $index['value']; + if ($valuePointer === false) { + // Syntax error or live coding. + continue; + } + + if (isset($index['index']) === false) { + // Array value only. + continue; + } + + $indexPointer = $index['index']; + $indexLine = $tokens[$indexPointer]['line']; + + $previous = $phpcsFile->findPrevious([T_WHITESPACE, T_COMMA], ($indexPointer - 1), ($arrayStart + 1), true); + if ($previous === false) { + $previous = $stackPtr; + } + + if ($tokens[$previous]['line'] === $indexLine) { + $error = 'Each index in a multi-line array must be on a new line'; + if ($valuePosition === 0) { + $error = 'The first index in a multi-value array must be on a new line'; + } + + $fix = $phpcsFile->addFixableError($error, $indexPointer, 'IndexNoNewline'); + if ($fix === true) { + if ($tokens[($indexPointer - 1)]['code'] === T_WHITESPACE) { + $phpcsFile->fixer->replaceToken(($indexPointer - 1), $phpcsFile->eolChar); + } else { + $phpcsFile->fixer->addNewlineBefore($indexPointer); + } + } + + continue; + } + + if ($tokens[$indexPointer]['column'] !== $indicesStart && ($indexPointer - 1) !== $arrayStart) { + $expected = ($indicesStart - 1); + $found = ($tokens[$indexPointer]['column'] - 1); + $error = 'Array key not aligned correctly; expected %s spaces but found %s'; + $data = [ + $expected, + $found, + ]; + + $fix = $phpcsFile->addFixableError($error, $indexPointer, 'KeyNotAligned', $data); + if ($fix === true) { + if ($found === 0 || $tokens[($indexPointer - 1)]['code'] !== T_WHITESPACE) { + $phpcsFile->fixer->addContent(($indexPointer - 1), str_repeat(' ', $expected)); + } else { + $phpcsFile->fixer->replaceToken(($indexPointer - 1), str_repeat(' ', $expected)); + } + } + } + + $arrowStart = ($tokens[$indexPointer]['column'] + $maxLength + 1); + if ($tokens[$index['arrow']]['column'] !== $arrowStart) { + $expected = ($arrowStart - ($index['index_length'] + $tokens[$indexPointer]['column'])); + $found = ($tokens[$index['arrow']]['column'] - ($index['index_length'] + $tokens[$indexPointer]['column'])); + $error = 'Array double arrow not aligned correctly; expected %s space(s) but found %s'; + $data = [ + $expected, + $found, + ]; + + $fix = $phpcsFile->addFixableError($error, $index['arrow'], 'DoubleArrowNotAligned', $data); + if ($fix === true) { + if ($found === 0) { + $phpcsFile->fixer->addContent(($index['arrow'] - 1), str_repeat(' ', $expected)); + } else { + $phpcsFile->fixer->replaceToken(($index['arrow'] - 1), str_repeat(' ', $expected)); + } + } + + continue; + } + + $valueStart = ($arrowStart + 3); + if ($tokens[$valuePointer]['column'] !== $valueStart) { + $expected = ($valueStart - ($tokens[$index['arrow']]['length'] + $tokens[$index['arrow']]['column'])); + $found = ($tokens[$valuePointer]['column'] - ($tokens[$index['arrow']]['length'] + $tokens[$index['arrow']]['column'])); + if ($found < 0) { + $found = 'newline'; + } + + $error = 'Array value not aligned correctly; expected %s space(s) but found %s'; + $data = [ + $expected, + $found, + ]; + + $fix = $phpcsFile->addFixableError($error, $index['arrow'], 'ValueNotAligned', $data); + if ($fix === true) { + if ($found === 'newline') { + $prev = $phpcsFile->findPrevious(T_WHITESPACE, ($valuePointer - 1), null, true); + $phpcsFile->fixer->beginChangeset(); + for ($i = ($prev + 1); $i < $valuePointer; $i++) { + $phpcsFile->fixer->replaceToken($i, ''); + } + + $phpcsFile->fixer->replaceToken(($valuePointer - 1), str_repeat(' ', $expected)); + $phpcsFile->fixer->endChangeset(); + } else if ($found === 0) { + $phpcsFile->fixer->addContent(($valuePointer - 1), str_repeat(' ', $expected)); + } else { + $phpcsFile->fixer->replaceToken(($valuePointer - 1), str_repeat(' ', $expected)); + } + } + }//end if + + // Check each line ends in a comma. + $valueStart = $valuePointer; + $nextComma = false; + + $end = $phpcsFile->findEndOfStatement($valueStart); + if ($end === false) { + $valueEnd = $valueStart; + } else if ($tokens[$end]['code'] === T_COMMA) { + $valueEnd = $phpcsFile->findPrevious(Tokens::$emptyTokens, ($end - 1), $valueStart, true); + $nextComma = $end; + } else { + $valueEnd = $end; + $next = $phpcsFile->findNext(Tokens::$emptyTokens, ($end + 1), $arrayEnd, true); + if ($next !== false && $tokens[$next]['code'] === T_COMMA) { + $nextComma = $next; + } + } + + $valueLine = $tokens[$valueEnd]['line']; + if ($tokens[$valueEnd]['code'] === T_END_HEREDOC || $tokens[$valueEnd]['code'] === T_END_NOWDOC) { + $valueLine++; + } + + if ($nextComma === false || ($tokens[$nextComma]['line'] !== $valueLine)) { + $error = 'Each line in an array declaration must end in a comma'; + $fix = $phpcsFile->addFixableError($error, $valuePointer, 'NoComma'); + + if ($fix === true) { + // Find the end of the line and put a comma there. + for ($i = ($valuePointer + 1); $i <= $arrayEnd; $i++) { + if ($tokens[$i]['line'] > $valueLine) { + break; + } + } + + $phpcsFile->fixer->beginChangeset(); + $phpcsFile->fixer->addContentBefore(($i - 1), ','); + if ($nextComma !== false) { + $phpcsFile->fixer->replaceToken($nextComma, ''); + } + + $phpcsFile->fixer->endChangeset(); + } + }//end if + + // Check that there is no space before the comma. + if ($nextComma !== false && $tokens[($nextComma - 1)]['code'] === T_WHITESPACE) { + // Here/nowdoc closing tags must have the comma on the next line. + $prev = $phpcsFile->findPrevious(Tokens::$emptyTokens, ($nextComma - 1), null, true); + if ($tokens[$prev]['code'] !== T_END_HEREDOC && $tokens[$prev]['code'] !== T_END_NOWDOC) { + $content = $tokens[($nextComma - 2)]['content']; + $spaceLength = $tokens[($nextComma - 1)]['length']; + $error = 'Expected 0 spaces between "%s" and comma; %s found'; + $data = [ + $content, + $spaceLength, + ]; + + $fix = $phpcsFile->addFixableError($error, $nextComma, 'SpaceBeforeComma', $data); + if ($fix === true) { + $phpcsFile->fixer->replaceToken(($nextComma - 1), ''); + } + } + } + }//end foreach + + }//end processMultiLineArray() + + +}//end class diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Sniffs/CSS/ClassDefinitionClosingBraceSpaceSniff.php b/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Sniffs/CSS/ClassDefinitionClosingBraceSpaceSniff.php new file mode 100644 index 00000000..a9a55fa8 --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Sniffs/CSS/ClassDefinitionClosingBraceSpaceSniff.php @@ -0,0 +1,134 @@ + + * @copyright 2006-2015 Squiz Pty Ltd (ABN 77 084 670 600) + * @license https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence + */ + +namespace PHP_CodeSniffer\Standards\Squiz\Sniffs\CSS; + +use PHP_CodeSniffer\Files\File; +use PHP_CodeSniffer\Sniffs\Sniff; +use PHP_CodeSniffer\Util\Tokens; + +class ClassDefinitionClosingBraceSpaceSniff implements Sniff +{ + + /** + * A list of tokenizers this sniff supports. + * + * @var array + */ + public $supportedTokenizers = ['CSS']; + + + /** + * Returns the token types that this sniff is interested in. + * + * @return int[] + */ + public function register() + { + return [T_CLOSE_CURLY_BRACKET]; + + }//end register() + + + /** + * Processes the tokens that this sniff is interested in. + * + * @param \PHP_CodeSniffer\Files\File $phpcsFile The file where the token was found. + * @param int $stackPtr The position in the stack where + * the token was found. + * + * @return void + */ + public function process(File $phpcsFile, $stackPtr) + { + $tokens = $phpcsFile->getTokens(); + $next = $stackPtr; + while (true) { + $next = $phpcsFile->findNext(T_WHITESPACE, ($next + 1), null, true); + if ($next === false) { + return; + } + + if (isset(Tokens::$emptyTokens[$tokens[$next]['code']]) === true + && $tokens[$next]['line'] === $tokens[$stackPtr]['line'] + ) { + // Trailing comment. + continue; + } + + break; + } + + if ($tokens[$next]['code'] !== T_CLOSE_TAG) { + $found = (($tokens[$next]['line'] - $tokens[$stackPtr]['line']) - 1); + if ($found !== 1) { + $error = 'Expected one blank line after closing brace of class definition; %s found'; + $data = [max(0, $found)]; + $fix = $phpcsFile->addFixableError($error, $stackPtr, 'SpacingAfterClose', $data); + + if ($fix === true) { + $firstOnLine = $next; + while ($tokens[$firstOnLine]['column'] !== 1) { + --$firstOnLine; + } + + if ($found < 0) { + // Next statement on same line as the closing brace. + $phpcsFile->fixer->addContentBefore($next, $phpcsFile->eolChar.$phpcsFile->eolChar); + } else if ($found === 0) { + // Next statement on next line, no blank line. + $phpcsFile->fixer->addContentBefore($firstOnLine, $phpcsFile->eolChar); + } else { + // Too many blank lines. + $phpcsFile->fixer->beginChangeset(); + for ($i = ($firstOnLine - 1); $i > $stackPtr; $i--) { + if ($tokens[$i]['code'] !== T_WHITESPACE) { + break; + } + + $phpcsFile->fixer->replaceToken($i, ''); + } + + $phpcsFile->fixer->addContentBefore($firstOnLine, $phpcsFile->eolChar.$phpcsFile->eolChar); + $phpcsFile->fixer->endChangeset(); + } + }//end if + }//end if + }//end if + + // Ignore nested style definitions from here on. The spacing before the closing brace + // (a single blank line) will be enforced by the above check, which ensures there is a + // blank line after the last nested class. + $found = $phpcsFile->findPrevious( + T_CLOSE_CURLY_BRACKET, + ($stackPtr - 1), + $tokens[$stackPtr]['bracket_opener'] + ); + + if ($found !== false) { + return; + } + + $prev = $phpcsFile->findPrevious(Tokens::$emptyTokens, ($stackPtr - 1), null, true); + if ($prev === false) { + return; + } + + if ($tokens[$prev]['line'] === $tokens[$stackPtr]['line']) { + $error = 'Closing brace of class definition must be on new line'; + $fix = $phpcsFile->addFixableError($error, $stackPtr, 'ContentBeforeClose'); + if ($fix === true) { + $phpcsFile->fixer->addNewlineBefore($stackPtr); + } + } + + }//end process() + + +}//end class diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Sniffs/CSS/ClassDefinitionNameSpacingSniff.php b/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Sniffs/CSS/ClassDefinitionNameSpacingSniff.php new file mode 100644 index 00000000..4b7efd99 --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Sniffs/CSS/ClassDefinitionNameSpacingSniff.php @@ -0,0 +1,111 @@ + + * @copyright 2006-2015 Squiz Pty Ltd (ABN 77 084 670 600) + * @license https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence + */ + +namespace PHP_CodeSniffer\Standards\Squiz\Sniffs\CSS; + +use PHP_CodeSniffer\Files\File; +use PHP_CodeSniffer\Sniffs\Sniff; +use PHP_CodeSniffer\Util\Tokens; + +class ClassDefinitionNameSpacingSniff implements Sniff +{ + + /** + * A list of tokenizers this sniff supports. + * + * @var array + */ + public $supportedTokenizers = ['CSS']; + + + /** + * Returns the token types that this sniff is interested in. + * + * @return int[] + */ + public function register() + { + return [T_OPEN_CURLY_BRACKET]; + + }//end register() + + + /** + * Processes the tokens that this sniff is interested in. + * + * @param \PHP_CodeSniffer\Files\File $phpcsFile The file where the token was found. + * @param int $stackPtr The position in the stack where + * the token was found. + * + * @return void + */ + public function process(File $phpcsFile, $stackPtr) + { + $tokens = $phpcsFile->getTokens(); + + if (isset($tokens[$stackPtr]['bracket_closer']) === false) { + // Syntax error or live coding, bow out. + return; + } + + // Do not check nested style definitions as, for example, in @media style rules. + $nested = $phpcsFile->findNext(T_OPEN_CURLY_BRACKET, ($stackPtr + 1), $tokens[$stackPtr]['bracket_closer']); + if ($nested !== false) { + return; + } + + // Find the first blank line before this opening brace, unless we get + // to another style definition, comment or the start of the file. + $endTokens = [ + T_OPEN_CURLY_BRACKET => T_OPEN_CURLY_BRACKET, + T_CLOSE_CURLY_BRACKET => T_CLOSE_CURLY_BRACKET, + T_OPEN_TAG => T_OPEN_TAG, + ]; + $endTokens += Tokens::$commentTokens; + + $prev = $phpcsFile->findPrevious(Tokens::$emptyTokens, ($stackPtr - 1), null, true); + + $foundContent = false; + $currentLine = $tokens[$prev]['line']; + for ($i = ($stackPtr - 1); $i >= 0; $i--) { + if (isset($endTokens[$tokens[$i]['code']]) === true) { + break; + } + + if ($tokens[$i]['line'] === $currentLine) { + if ($tokens[$i]['code'] !== T_WHITESPACE) { + $foundContent = true; + } + + continue; + } + + // We changed lines. + if ($foundContent === false) { + // Before we throw an error, make sure we are not looking + // at a gap before the style definition. + $prev = $phpcsFile->findPrevious(T_WHITESPACE, $i, null, true); + if ($prev !== false + && isset($endTokens[$tokens[$prev]['code']]) === false + ) { + $error = 'Blank lines are not allowed between class names'; + $phpcsFile->addError($error, ($i + 1), 'BlankLinesFound'); + } + + break; + } + + $foundContent = false; + $currentLine = $tokens[$i]['line']; + }//end for + + }//end process() + + +}//end class diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Sniffs/CSS/ClassDefinitionOpeningBraceSpaceSniff.php b/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Sniffs/CSS/ClassDefinitionOpeningBraceSpaceSniff.php new file mode 100644 index 00000000..e56dad73 --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Sniffs/CSS/ClassDefinitionOpeningBraceSpaceSniff.php @@ -0,0 +1,176 @@ + + * @copyright 2006-2015 Squiz Pty Ltd (ABN 77 084 670 600) + * @license https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence + */ + +namespace PHP_CodeSniffer\Standards\Squiz\Sniffs\CSS; + +use PHP_CodeSniffer\Files\File; +use PHP_CodeSniffer\Sniffs\Sniff; +use PHP_CodeSniffer\Util\Tokens; + +class ClassDefinitionOpeningBraceSpaceSniff implements Sniff +{ + + /** + * A list of tokenizers this sniff supports. + * + * @var array + */ + public $supportedTokenizers = ['CSS']; + + + /** + * Returns the token types that this sniff is interested in. + * + * @return int[] + */ + public function register() + { + return [T_OPEN_CURLY_BRACKET]; + + }//end register() + + + /** + * Processes the tokens that this sniff is interested in. + * + * @param \PHP_CodeSniffer\Files\File $phpcsFile The file where the token was found. + * @param int $stackPtr The position in the stack where + * the token was found. + * + * @return void + */ + public function process(File $phpcsFile, $stackPtr) + { + $tokens = $phpcsFile->getTokens(); + $prevNonWhitespace = $phpcsFile->findPrevious(T_WHITESPACE, ($stackPtr - 1), null, true); + + if ($prevNonWhitespace !== false) { + $length = 0; + if ($tokens[$stackPtr]['line'] !== $tokens[$prevNonWhitespace]['line']) { + $length = 'newline'; + } else if ($tokens[($stackPtr - 1)]['code'] === T_WHITESPACE) { + if (strpos($tokens[($stackPtr - 1)]['content'], "\t") !== false) { + $length = 'tab'; + } else { + $length = $tokens[($stackPtr - 1)]['length']; + } + } + + if ($length === 0) { + $error = 'Expected 1 space before opening brace of class definition; 0 found'; + $fix = $phpcsFile->addFixableError($error, $stackPtr, 'NoneBefore'); + if ($fix === true) { + $phpcsFile->fixer->addContentBefore($stackPtr, ' '); + } + } else if ($length !== 1) { + $error = 'Expected 1 space before opening brace of class definition; %s found'; + $data = [$length]; + $fix = $phpcsFile->addFixableError($error, $stackPtr, 'Before', $data); + if ($fix === true) { + $phpcsFile->fixer->beginChangeset(); + + for ($i = ($stackPtr - 1); $i > $prevNonWhitespace; $i--) { + $phpcsFile->fixer->replaceToken($i, ''); + } + + $phpcsFile->fixer->addContentBefore($stackPtr, ' '); + $phpcsFile->fixer->endChangeset(); + } + }//end if + }//end if + + $nextNonEmpty = $phpcsFile->findNext(Tokens::$emptyTokens, ($stackPtr + 1), null, true); + if ($nextNonEmpty === false) { + return; + } + + if ($tokens[$nextNonEmpty]['line'] === $tokens[$stackPtr]['line']) { + $error = 'Opening brace should be the last content on the line'; + $fix = $phpcsFile->addFixableError($error, $stackPtr, 'ContentBefore'); + if ($fix === true) { + $phpcsFile->fixer->beginChangeset(); + $phpcsFile->fixer->addNewline($stackPtr); + + // Remove potentially left over trailing whitespace. + if ($tokens[($stackPtr + 1)]['code'] === T_WHITESPACE) { + $phpcsFile->fixer->replaceToken(($stackPtr + 1), ''); + } + + $phpcsFile->fixer->endChangeset(); + } + } else { + if (isset($tokens[$stackPtr]['bracket_closer']) === false) { + // Syntax error or live coding, bow out. + return; + } + + // Check for nested class definitions. + $found = $phpcsFile->findNext( + T_OPEN_CURLY_BRACKET, + ($stackPtr + 1), + $tokens[$stackPtr]['bracket_closer'] + ); + + if ($found === false) { + // Not nested. + return; + } + + $lastOnLine = $stackPtr; + for ($lastOnLine; $lastOnLine < $tokens[$stackPtr]['bracket_closer']; $lastOnLine++) { + if ($tokens[$lastOnLine]['line'] !== $tokens[($lastOnLine + 1)]['line']) { + break; + } + } + + $nextNonWhiteSpace = $phpcsFile->findNext(T_WHITESPACE, ($lastOnLine + 1), null, true); + if ($nextNonWhiteSpace === false) { + return; + } + + $foundLines = ($tokens[$nextNonWhiteSpace]['line'] - $tokens[$stackPtr]['line'] - 1); + if ($foundLines !== 1) { + $error = 'Expected 1 blank line after opening brace of nesting class definition; %s found'; + $data = [max(0, $foundLines)]; + $fix = $phpcsFile->addFixableError($error, $stackPtr, 'AfterNesting', $data); + + if ($fix === true) { + $firstOnNextLine = $nextNonWhiteSpace; + while ($tokens[$firstOnNextLine]['column'] !== 1) { + --$firstOnNextLine; + } + + if ($found < 0) { + // First statement on same line as the opening brace. + $phpcsFile->fixer->addContentBefore($nextNonWhiteSpace, $phpcsFile->eolChar.$phpcsFile->eolChar); + } else if ($found === 0) { + // Next statement on next line, no blank line. + $phpcsFile->fixer->addNewlineBefore($firstOnNextLine); + } else { + // Too many blank lines. + $phpcsFile->fixer->beginChangeset(); + for ($i = ($firstOnNextLine - 1); $i > $stackPtr; $i--) { + if ($tokens[$i]['code'] !== T_WHITESPACE) { + break; + } + + $phpcsFile->fixer->replaceToken($i, ''); + } + + $phpcsFile->fixer->addContentBefore($firstOnNextLine, $phpcsFile->eolChar.$phpcsFile->eolChar); + $phpcsFile->fixer->endChangeset(); + } + }//end if + }//end if + }//end if + + }//end process() + + +}//end class diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Sniffs/CSS/ColonSpacingSniff.php b/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Sniffs/CSS/ColonSpacingSniff.php new file mode 100644 index 00000000..8548a721 --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Sniffs/CSS/ColonSpacingSniff.php @@ -0,0 +1,107 @@ + + * @copyright 2006-2015 Squiz Pty Ltd (ABN 77 084 670 600) + * @license https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence + */ + +namespace PHP_CodeSniffer\Standards\Squiz\Sniffs\CSS; + +use PHP_CodeSniffer\Files\File; +use PHP_CodeSniffer\Sniffs\Sniff; +use PHP_CodeSniffer\Util\Tokens; + +class ColonSpacingSniff implements Sniff +{ + + /** + * A list of tokenizers this sniff supports. + * + * @var array + */ + public $supportedTokenizers = ['CSS']; + + + /** + * Returns the token types that this sniff is interested in. + * + * @return int[] + */ + public function register() + { + return [T_COLON]; + + }//end register() + + + /** + * Processes the tokens that this sniff is interested in. + * + * @param \PHP_CodeSniffer\Files\File $phpcsFile The file where the token was found. + * @param int $stackPtr The position in the stack where + * the token was found. + * + * @return void + */ + public function process(File $phpcsFile, $stackPtr) + { + $tokens = $phpcsFile->getTokens(); + + $prev = $phpcsFile->findPrevious(Tokens::$emptyTokens, ($stackPtr - 1), null, true); + if ($tokens[$prev]['code'] !== T_STYLE) { + // The colon is not part of a style definition. + return; + } + + if ($tokens[$prev]['content'] === 'progid') { + // Special case for IE filters. + return; + } + + if ($tokens[($stackPtr - 1)]['code'] === T_WHITESPACE) { + $error = 'There must be no space before a colon in a style definition'; + $fix = $phpcsFile->addFixableError($error, $stackPtr, 'Before'); + if ($fix === true) { + $phpcsFile->fixer->replaceToken(($stackPtr - 1), ''); + } + } + + $next = $phpcsFile->findNext(T_WHITESPACE, ($stackPtr + 1), null, true); + if ($tokens[$next]['code'] === T_SEMICOLON || $tokens[$next]['code'] === T_STYLE) { + // Empty style definition, ignore it. + return; + } + + if ($tokens[($stackPtr + 1)]['code'] !== T_WHITESPACE) { + $error = 'Expected 1 space after colon in style definition; 0 found'; + $fix = $phpcsFile->addFixableError($error, $stackPtr, 'NoneAfter'); + if ($fix === true) { + $phpcsFile->fixer->addContent($stackPtr, ' '); + } + } else { + $content = $tokens[($stackPtr + 1)]['content']; + if (strpos($content, $phpcsFile->eolChar) === false) { + $length = strlen($content); + if ($length !== 1) { + $error = 'Expected 1 space after colon in style definition; %s found'; + $data = [$length]; + $fix = $phpcsFile->addFixableError($error, $stackPtr, 'After', $data); + if ($fix === true) { + $phpcsFile->fixer->replaceToken(($stackPtr + 1), ' '); + } + } + } else { + $error = 'Expected 1 space after colon in style definition; newline found'; + $fix = $phpcsFile->addFixableError($error, $stackPtr, 'AfterNewline'); + if ($fix === true) { + $phpcsFile->fixer->replaceToken(($stackPtr + 1), ' '); + } + } + }//end if + + }//end process() + + +}//end class diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Sniffs/CSS/ColourDefinitionSniff.php b/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Sniffs/CSS/ColourDefinitionSniff.php new file mode 100644 index 00000000..6b071ea7 --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Sniffs/CSS/ColourDefinitionSniff.php @@ -0,0 +1,88 @@ + + * @copyright 2006-2015 Squiz Pty Ltd (ABN 77 084 670 600) + * @license https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence + */ + +namespace PHP_CodeSniffer\Standards\Squiz\Sniffs\CSS; + +use PHP_CodeSniffer\Files\File; +use PHP_CodeSniffer\Sniffs\Sniff; + +class ColourDefinitionSniff implements Sniff +{ + + /** + * A list of tokenizers this sniff supports. + * + * @var array + */ + public $supportedTokenizers = ['CSS']; + + + /** + * Returns the token types that this sniff is interested in. + * + * @return int[] + */ + public function register() + { + return [T_COLOUR]; + + }//end register() + + + /** + * Processes the tokens that this sniff is interested in. + * + * @param \PHP_CodeSniffer\Files\File $phpcsFile The file where the token was found. + * @param int $stackPtr The position in the stack where + * the token was found. + * + * @return void + */ + public function process(File $phpcsFile, $stackPtr) + { + $tokens = $phpcsFile->getTokens(); + $colour = $tokens[$stackPtr]['content']; + + $expected = strtoupper($colour); + if ($colour !== $expected) { + $error = 'CSS colours must be defined in uppercase; expected %s but found %s'; + $data = [ + $expected, + $colour, + ]; + + $fix = $phpcsFile->addFixableError($error, $stackPtr, 'NotUpper', $data); + if ($fix === true) { + $phpcsFile->fixer->replaceToken($stackPtr, $expected); + } + } + + // Now check if shorthand can be used. + if (strlen($colour) !== 7) { + return; + } + + if ($colour[1] === $colour[2] && $colour[3] === $colour[4] && $colour[5] === $colour[6]) { + $expected = '#'.$colour[1].$colour[3].$colour[5]; + $error = 'CSS colours must use shorthand if available; expected %s but found %s'; + $data = [ + $expected, + $colour, + ]; + + $fix = $phpcsFile->addFixableError($error, $stackPtr, 'Shorthand', $data); + if ($fix === true) { + $phpcsFile->fixer->replaceToken($stackPtr, $expected); + } + } + + }//end process() + + +}//end class diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Sniffs/CSS/DisallowMultipleStyleDefinitionsSniff.php b/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Sniffs/CSS/DisallowMultipleStyleDefinitionsSniff.php new file mode 100644 index 00000000..def95c1e --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Sniffs/CSS/DisallowMultipleStyleDefinitionsSniff.php @@ -0,0 +1,71 @@ + + * @copyright 2006-2015 Squiz Pty Ltd (ABN 77 084 670 600) + * @license https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence + */ + +namespace PHP_CodeSniffer\Standards\Squiz\Sniffs\CSS; + +use PHP_CodeSniffer\Files\File; +use PHP_CodeSniffer\Sniffs\Sniff; + +class DisallowMultipleStyleDefinitionsSniff implements Sniff +{ + + /** + * A list of tokenizers this sniff supports. + * + * @var array + */ + public $supportedTokenizers = ['CSS']; + + + /** + * Returns the token types that this sniff is interested in. + * + * @return int[] + */ + public function register() + { + return [T_STYLE]; + + }//end register() + + + /** + * Processes the tokens that this sniff is interested in. + * + * @param \PHP_CodeSniffer\Files\File $phpcsFile The file where the token was found. + * @param int $stackPtr The position in the stack where + * the token was found. + * + * @return void + */ + public function process(File $phpcsFile, $stackPtr) + { + $tokens = $phpcsFile->getTokens(); + $next = $phpcsFile->findNext(T_STYLE, ($stackPtr + 1)); + if ($next === false) { + return; + } + + if ($tokens[$next]['content'] === 'progid') { + // Special case for IE filters. + return; + } + + if ($tokens[$next]['line'] === $tokens[$stackPtr]['line']) { + $error = 'Each style definition must be on a line by itself'; + $fix = $phpcsFile->addFixableError($error, $next, 'Found'); + if ($fix === true) { + $phpcsFile->fixer->addNewlineBefore($next); + } + } + + }//end process() + + +}//end class diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Sniffs/CSS/DuplicateClassDefinitionSniff.php b/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Sniffs/CSS/DuplicateClassDefinitionSniff.php new file mode 100644 index 00000000..d489cb1b --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Sniffs/CSS/DuplicateClassDefinitionSniff.php @@ -0,0 +1,116 @@ + + * @copyright 2006-2015 Squiz Pty Ltd (ABN 77 084 670 600) + * @license https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence + */ + +namespace PHP_CodeSniffer\Standards\Squiz\Sniffs\CSS; + +use PHP_CodeSniffer\Files\File; +use PHP_CodeSniffer\Sniffs\Sniff; +use PHP_CodeSniffer\Util\Tokens; + +class DuplicateClassDefinitionSniff implements Sniff +{ + + /** + * A list of tokenizers this sniff supports. + * + * @var array + */ + public $supportedTokenizers = ['CSS']; + + + /** + * Returns the token types that this sniff is interested in. + * + * @return int[] + */ + public function register() + { + return [T_OPEN_TAG]; + + }//end register() + + + /** + * Processes the tokens that this sniff is interested in. + * + * @param \PHP_CodeSniffer\Files\File $phpcsFile The file where the token was found. + * @param int $stackPtr The position in the stack where + * the token was found. + * + * @return void + */ + public function process(File $phpcsFile, $stackPtr) + { + $tokens = $phpcsFile->getTokens(); + + // Find the content of each class definition name. + $classNames = []; + $next = $phpcsFile->findNext(T_OPEN_CURLY_BRACKET, ($stackPtr + 1)); + if ($next === false) { + // No class definitions in the file. + return; + } + + // Save the class names in a "scope", + // to prevent false positives with @media blocks. + $scope = 'main'; + + $find = [ + T_CLOSE_CURLY_BRACKET, + T_OPEN_CURLY_BRACKET, + T_OPEN_TAG, + ]; + + while ($next !== false) { + $prev = $phpcsFile->findPrevious($find, ($next - 1)); + + // Check if an inner block was closed. + $beforePrev = $phpcsFile->findPrevious(Tokens::$emptyTokens, ($prev - 1), null, true); + if ($beforePrev !== false + && $tokens[$beforePrev]['code'] === T_CLOSE_CURLY_BRACKET + ) { + $scope = 'main'; + } + + // Create a sorted name for the class so we can compare classes + // even when the individual names are all over the place. + $name = ''; + for ($i = ($prev + 1); $i < $next; $i++) { + $name .= $tokens[$i]['content']; + } + + $name = trim($name); + $name = str_replace("\n", ' ', $name); + $name = preg_replace('|[\s]+|', ' ', $name); + $name = preg_replace('|\s*/\*.*\*/\s*|', '', $name); + $name = str_replace(', ', ',', $name); + + $names = explode(',', $name); + sort($names); + $name = implode(',', $names); + + if ($name[0] === '@') { + // Media block has its own "scope". + $scope = $name; + } else if (isset($classNames[$scope][$name]) === true) { + $first = $classNames[$scope][$name]; + $error = 'Duplicate class definition found; first defined on line %s'; + $data = [$tokens[$first]['line']]; + $phpcsFile->addError($error, $next, 'Found', $data); + } else { + $classNames[$scope][$name] = $next; + } + + $next = $phpcsFile->findNext(T_OPEN_CURLY_BRACKET, ($next + 1)); + }//end while + + }//end process() + + +}//end class diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Sniffs/CSS/DuplicateStyleDefinitionSniff.php b/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Sniffs/CSS/DuplicateStyleDefinitionSniff.php new file mode 100644 index 00000000..c7479759 --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Sniffs/CSS/DuplicateStyleDefinitionSniff.php @@ -0,0 +1,88 @@ + + * @copyright 2006-2015 Squiz Pty Ltd (ABN 77 084 670 600) + * @license https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence + */ + +namespace PHP_CodeSniffer\Standards\Squiz\Sniffs\CSS; + +use PHP_CodeSniffer\Files\File; +use PHP_CodeSniffer\Sniffs\Sniff; + +class DuplicateStyleDefinitionSniff implements Sniff +{ + + /** + * A list of tokenizers this sniff supports. + * + * @var array + */ + public $supportedTokenizers = ['CSS']; + + + /** + * Returns the token types that this sniff is interested in. + * + * @return int[] + */ + public function register() + { + return [T_OPEN_CURLY_BRACKET]; + + }//end register() + + + /** + * Processes the tokens that this sniff is interested in. + * + * @param \PHP_CodeSniffer\Files\File $phpcsFile The file where the token was found. + * @param int $stackPtr The position in the stack where + * the token was found. + * + * @return void + */ + public function process(File $phpcsFile, $stackPtr) + { + $tokens = $phpcsFile->getTokens(); + + if (isset($tokens[$stackPtr]['bracket_closer']) === false) { + // Syntax error or live coding, bow out. + return; + } + + // Find the content of each style definition name. + $styleNames = []; + + $next = $stackPtr; + $end = $tokens[$stackPtr]['bracket_closer']; + + do { + $next = $phpcsFile->findNext([T_STYLE, T_OPEN_CURLY_BRACKET], ($next + 1), $end); + if ($next === false) { + // Class definition is empty. + break; + } + + if ($tokens[$next]['code'] === T_OPEN_CURLY_BRACKET) { + $next = $tokens[$next]['bracket_closer']; + continue; + } + + $name = $tokens[$next]['content']; + if (isset($styleNames[$name]) === true) { + $first = $styleNames[$name]; + $error = 'Duplicate style definition found; first defined on line %s'; + $data = [$tokens[$first]['line']]; + $phpcsFile->addError($error, $next, 'Found', $data); + } else { + $styleNames[$name] = $next; + } + } while ($next !== false); + + }//end process() + + +}//end class diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Sniffs/CSS/EmptyClassDefinitionSniff.php b/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Sniffs/CSS/EmptyClassDefinitionSniff.php new file mode 100644 index 00000000..d3bb9696 --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Sniffs/CSS/EmptyClassDefinitionSniff.php @@ -0,0 +1,61 @@ + + * @copyright 2006-2015 Squiz Pty Ltd (ABN 77 084 670 600) + * @license https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence + */ + +namespace PHP_CodeSniffer\Standards\Squiz\Sniffs\CSS; + +use PHP_CodeSniffer\Files\File; +use PHP_CodeSniffer\Sniffs\Sniff; +use PHP_CodeSniffer\Util\Tokens; + +class EmptyClassDefinitionSniff implements Sniff +{ + + /** + * A list of tokenizers this sniff supports. + * + * @var array + */ + public $supportedTokenizers = ['CSS']; + + + /** + * Returns the token types that this sniff is interested in. + * + * @return int[] + */ + public function register() + { + return [T_OPEN_CURLY_BRACKET]; + + }//end register() + + + /** + * Processes the tokens that this sniff is interested in. + * + * @param \PHP_CodeSniffer\Files\File $phpcsFile The file where the token was found. + * @param int $stackPtr The position in the stack where + * the token was found. + * + * @return void + */ + public function process(File $phpcsFile, $stackPtr) + { + $tokens = $phpcsFile->getTokens(); + $next = $phpcsFile->findNext(Tokens::$emptyTokens, ($stackPtr + 1), null, true); + + if ($next === false || $tokens[$next]['code'] === T_CLOSE_CURLY_BRACKET) { + $error = 'Class definition is empty'; + $phpcsFile->addError($error, $stackPtr, 'Found'); + } + + }//end process() + + +}//end class diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Sniffs/CSS/EmptyStyleDefinitionSniff.php b/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Sniffs/CSS/EmptyStyleDefinitionSniff.php new file mode 100644 index 00000000..05f2e515 --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Sniffs/CSS/EmptyStyleDefinitionSniff.php @@ -0,0 +1,64 @@ + + * @copyright 2006-2015 Squiz Pty Ltd (ABN 77 084 670 600) + * @license https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence + */ + +namespace PHP_CodeSniffer\Standards\Squiz\Sniffs\CSS; + +use PHP_CodeSniffer\Files\File; +use PHP_CodeSniffer\Sniffs\Sniff; +use PHP_CodeSniffer\Util\Tokens; + +class EmptyStyleDefinitionSniff implements Sniff +{ + + /** + * A list of tokenizers this sniff supports. + * + * @var array + */ + public $supportedTokenizers = ['CSS']; + + + /** + * Returns the token types that this sniff is interested in. + * + * @return int[] + */ + public function register() + { + return [T_STYLE]; + + }//end register() + + + /** + * Processes the tokens that this sniff is interested in. + * + * @param \PHP_CodeSniffer\Files\File $phpcsFile The file where the token was found. + * @param int $stackPtr The position in the stack where + * the token was found. + * + * @return void + */ + public function process(File $phpcsFile, $stackPtr) + { + $tokens = $phpcsFile->getTokens(); + + $ignore = Tokens::$emptyTokens; + $ignore[] = T_COLON; + + $next = $phpcsFile->findNext($ignore, ($stackPtr + 1), null, true); + if ($next === false || $tokens[$next]['code'] === T_SEMICOLON || $tokens[$next]['line'] !== $tokens[$stackPtr]['line']) { + $error = 'Style definition is empty'; + $phpcsFile->addError($error, $stackPtr, 'Found'); + } + + }//end process() + + +}//end class diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Sniffs/CSS/ForbiddenStylesSniff.php b/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Sniffs/CSS/ForbiddenStylesSniff.php new file mode 100644 index 00000000..d8585dc8 --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Sniffs/CSS/ForbiddenStylesSniff.php @@ -0,0 +1,177 @@ + + * @copyright 2006-2015 Squiz Pty Ltd (ABN 77 084 670 600) + * @license https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence + */ + +namespace PHP_CodeSniffer\Standards\Squiz\Sniffs\CSS; + +use PHP_CodeSniffer\Files\File; +use PHP_CodeSniffer\Sniffs\Sniff; + +class ForbiddenStylesSniff implements Sniff +{ + + /** + * A list of tokenizers this sniff supports. + * + * @var array + */ + public $supportedTokenizers = ['CSS']; + + /** + * A list of forbidden styles with their alternatives. + * + * The value is NULL if no alternative exists. i.e., the + * style should just not be used. + * + * @var array + */ + protected $forbiddenStyles = [ + '-moz-border-radius' => 'border-radius', + '-webkit-border-radius' => 'border-radius', + '-moz-border-radius-topleft' => 'border-top-left-radius', + '-moz-border-radius-topright' => 'border-top-right-radius', + '-moz-border-radius-bottomright' => 'border-bottom-right-radius', + '-moz-border-radius-bottomleft' => 'border-bottom-left-radius', + '-moz-box-shadow' => 'box-shadow', + '-webkit-box-shadow' => 'box-shadow', + ]; + + /** + * A cache of forbidden style names, for faster lookups. + * + * @var string[] + */ + protected $forbiddenStyleNames = []; + + /** + * If true, forbidden styles will be considered regular expressions. + * + * @var boolean + */ + protected $patternMatch = false; + + /** + * If true, an error will be thrown; otherwise a warning. + * + * @var boolean + */ + public $error = true; + + + /** + * Returns an array of tokens this test wants to listen for. + * + * @return array + */ + public function register() + { + $this->forbiddenStyleNames = array_keys($this->forbiddenStyles); + + if ($this->patternMatch === true) { + foreach ($this->forbiddenStyleNames as $i => $name) { + $this->forbiddenStyleNames[$i] = '/'.$name.'/i'; + } + } + + return [T_STYLE]; + + }//end register() + + + /** + * Processes this test, when one of its tokens is encountered. + * + * @param \PHP_CodeSniffer\Files\File $phpcsFile The file being scanned. + * @param int $stackPtr The position of the current token in + * the stack passed in $tokens. + * + * @return void + */ + public function process(File $phpcsFile, $stackPtr) + { + $tokens = $phpcsFile->getTokens(); + $style = strtolower($tokens[$stackPtr]['content']); + $pattern = null; + + if ($this->patternMatch === true) { + $count = 0; + $pattern = preg_replace( + $this->forbiddenStyleNames, + $this->forbiddenStyleNames, + $style, + 1, + $count + ); + + if ($count === 0) { + return; + } + + // Remove the pattern delimiters and modifier. + $pattern = substr($pattern, 1, -2); + } else { + if (in_array($style, $this->forbiddenStyleNames, true) === false) { + return; + } + }//end if + + $this->addError($phpcsFile, $stackPtr, $style, $pattern); + + }//end process() + + + /** + * Generates the error or warning for this sniff. + * + * @param \PHP_CodeSniffer\Files\File $phpcsFile The file being scanned. + * @param int $stackPtr The position of the forbidden style + * in the token array. + * @param string $style The name of the forbidden style. + * @param string $pattern The pattern used for the match. + * + * @return void + */ + protected function addError($phpcsFile, $stackPtr, $style, $pattern=null) + { + $data = [$style]; + $error = 'The use of style %s is '; + if ($this->error === true) { + $type = 'Found'; + $error .= 'forbidden'; + } else { + $type = 'Discouraged'; + $error .= 'discouraged'; + } + + if ($pattern === null) { + $pattern = $style; + } + + if ($this->forbiddenStyles[$pattern] !== null) { + $data[] = $this->forbiddenStyles[$pattern]; + if ($this->error === true) { + $fix = $phpcsFile->addFixableError($error.'; use %s instead', $stackPtr, $type.'WithAlternative', $data); + } else { + $fix = $phpcsFile->addFixableWarning($error.'; use %s instead', $stackPtr, $type.'WithAlternative', $data); + } + + if ($fix === true) { + $phpcsFile->fixer->replaceToken($stackPtr, $this->forbiddenStyles[$pattern]); + } + } else { + if ($this->error === true) { + $phpcsFile->addError($error, $stackPtr, $type, $data); + } else { + $phpcsFile->addWarning($error, $stackPtr, $type, $data); + } + } + + }//end addError() + + +}//end class diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Sniffs/CSS/IndentationSniff.php b/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Sniffs/CSS/IndentationSniff.php new file mode 100644 index 00000000..5e35f4e9 --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Sniffs/CSS/IndentationSniff.php @@ -0,0 +1,150 @@ + + * @copyright 2006-2015 Squiz Pty Ltd (ABN 77 084 670 600) + * @license https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence + */ + +namespace PHP_CodeSniffer\Standards\Squiz\Sniffs\CSS; + +use PHP_CodeSniffer\Files\File; +use PHP_CodeSniffer\Sniffs\Sniff; +use PHP_CodeSniffer\Util\Tokens; + +class IndentationSniff implements Sniff +{ + + /** + * A list of tokenizers this sniff supports. + * + * @var array + */ + public $supportedTokenizers = ['CSS']; + + /** + * The number of spaces code should be indented. + * + * @var integer + */ + public $indent = 4; + + + /** + * Returns the token types that this sniff is interested in. + * + * @return int[] + */ + public function register() + { + return [T_OPEN_TAG]; + + }//end register() + + + /** + * Processes the tokens that this sniff is interested in. + * + * @param \PHP_CodeSniffer\Files\File $phpcsFile The file where the token was found. + * @param int $stackPtr The position in the stack where + * the token was found. + * + * @return void + */ + public function process(File $phpcsFile, $stackPtr) + { + $tokens = $phpcsFile->getTokens(); + + $numTokens = (count($tokens) - 2); + $indentLevel = 0; + $nestingLevel = 0; + for ($i = 1; $i < $numTokens; $i++) { + if ($tokens[$i]['code'] === T_COMMENT + || isset(Tokens::$phpcsCommentTokens[$tokens[$i]['code']]) === true + ) { + // Don't check the indent of comments. + continue; + } + + if ($tokens[$i]['code'] === T_OPEN_CURLY_BRACKET) { + $indentLevel++; + + if (isset($tokens[$i]['bracket_closer']) === false) { + // Syntax error or live coding. + // Anything after this would receive incorrect fixes, so bow out. + return; + } + + // Check for nested class definitions. + $found = $phpcsFile->findNext( + T_OPEN_CURLY_BRACKET, + ($i + 1), + $tokens[$i]['bracket_closer'] + ); + + if ($found !== false) { + $nestingLevel = $indentLevel; + } + } + + if (($tokens[$i]['code'] === T_CLOSE_CURLY_BRACKET + && $tokens[$i]['line'] !== $tokens[($i - 1)]['line']) + || ($tokens[($i + 1)]['code'] === T_CLOSE_CURLY_BRACKET + && $tokens[$i]['line'] === $tokens[($i + 1)]['line']) + ) { + $indentLevel--; + if ($indentLevel === 0) { + $nestingLevel = 0; + } + } + + if ($tokens[$i]['column'] !== 1 + || $tokens[$i]['code'] === T_OPEN_CURLY_BRACKET + || $tokens[$i]['code'] === T_CLOSE_CURLY_BRACKET + ) { + continue; + } + + // We started a new line, so check indent. + if ($tokens[$i]['code'] === T_WHITESPACE) { + $content = str_replace($phpcsFile->eolChar, '', $tokens[$i]['content']); + $foundIndent = strlen($content); + } else { + $foundIndent = 0; + } + + $expectedIndent = ($indentLevel * $this->indent); + if ($expectedIndent > 0 + && strpos($tokens[$i]['content'], $phpcsFile->eolChar) !== false + ) { + if ($nestingLevel !== $indentLevel) { + $error = 'Blank lines are not allowed in class definitions'; + $fix = $phpcsFile->addFixableError($error, $i, 'BlankLine'); + if ($fix === true) { + $phpcsFile->fixer->replaceToken($i, ''); + } + } + } else if ($foundIndent !== $expectedIndent) { + $error = 'Line indented incorrectly; expected %s spaces, found %s'; + $data = [ + $expectedIndent, + $foundIndent, + ]; + + $fix = $phpcsFile->addFixableError($error, $i, 'Incorrect', $data); + if ($fix === true) { + $indent = str_repeat(' ', $expectedIndent); + if ($foundIndent === 0) { + $phpcsFile->fixer->addContentBefore($i, $indent); + } else { + $phpcsFile->fixer->replaceToken($i, $indent); + } + } + }//end if + }//end for + + }//end process() + + +}//end class diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Sniffs/CSS/LowercaseStyleDefinitionSniff.php b/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Sniffs/CSS/LowercaseStyleDefinitionSniff.php new file mode 100644 index 00000000..c80a639c --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Sniffs/CSS/LowercaseStyleDefinitionSniff.php @@ -0,0 +1,97 @@ + + * @copyright 2006-2015 Squiz Pty Ltd (ABN 77 084 670 600) + * @license https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence + */ + +namespace PHP_CodeSniffer\Standards\Squiz\Sniffs\CSS; + +use PHP_CodeSniffer\Files\File; +use PHP_CodeSniffer\Sniffs\Sniff; + +class LowercaseStyleDefinitionSniff implements Sniff +{ + + /** + * A list of tokenizers this sniff supports. + * + * @var array + */ + public $supportedTokenizers = ['CSS']; + + + /** + * Returns the token types that this sniff is interested in. + * + * @return int[] + */ + public function register() + { + return [T_OPEN_CURLY_BRACKET]; + + }//end register() + + + /** + * Processes the tokens that this sniff is interested in. + * + * @param \PHP_CodeSniffer\Files\File $phpcsFile The file where the token was found. + * @param int $stackPtr The position in the stack where + * the token was found. + * + * @return void + */ + public function process(File $phpcsFile, $stackPtr) + { + $tokens = $phpcsFile->getTokens(); + $start = ($stackPtr + 1); + $end = ($tokens[$stackPtr]['bracket_closer'] - 1); + $inStyle = null; + + for ($i = $start; $i <= $end; $i++) { + // Skip nested definitions as they are checked individually. + if ($tokens[$i]['code'] === T_OPEN_CURLY_BRACKET) { + $i = $tokens[$i]['bracket_closer']; + continue; + } + + if ($tokens[$i]['code'] === T_STYLE) { + $inStyle = $tokens[$i]['content']; + } + + if ($tokens[$i]['code'] === T_SEMICOLON) { + $inStyle = null; + } + + if ($inStyle === 'progid') { + // Special case for IE filters. + continue; + } + + if ($tokens[$i]['code'] === T_STYLE + || ($inStyle !== null + && $tokens[$i]['code'] === T_STRING) + ) { + $expected = strtolower($tokens[$i]['content']); + if ($expected !== $tokens[$i]['content']) { + $error = 'Style definitions must be lowercase; expected %s but found %s'; + $data = [ + $expected, + $tokens[$i]['content'], + ]; + + $fix = $phpcsFile->addFixableError($error, $i, 'FoundUpper', $data); + if ($fix === true) { + $phpcsFile->fixer->replaceToken($i, $expected); + } + } + } + }//end for + + }//end process() + + +}//end class diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Sniffs/CSS/MissingColonSniff.php b/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Sniffs/CSS/MissingColonSniff.php new file mode 100644 index 00000000..dbf7d6c9 --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Sniffs/CSS/MissingColonSniff.php @@ -0,0 +1,91 @@ + + * @copyright 2006-2015 Squiz Pty Ltd (ABN 77 084 670 600) + * @license https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence + */ + +namespace PHP_CodeSniffer\Standards\Squiz\Sniffs\CSS; + +use PHP_CodeSniffer\Files\File; +use PHP_CodeSniffer\Sniffs\Sniff; + +class MissingColonSniff implements Sniff +{ + + /** + * A list of tokenizers this sniff supports. + * + * @var array + */ + public $supportedTokenizers = ['CSS']; + + + /** + * Returns the token types that this sniff is interested in. + * + * @return int[] + */ + public function register() + { + return [T_OPEN_CURLY_BRACKET]; + + }//end register() + + + /** + * Processes the tokens that this sniff is interested in. + * + * @param \PHP_CodeSniffer\Files\File $phpcsFile The file where the token was found. + * @param int $stackPtr The position in the stack where + * the token was found. + * + * @return void + */ + public function process(File $phpcsFile, $stackPtr) + { + $tokens = $phpcsFile->getTokens(); + + if (isset($tokens[$stackPtr]['bracket_closer']) === false) { + // Syntax error or live coding, bow out. + return; + } + + $lastLine = $tokens[$stackPtr]['line']; + $end = $tokens[$stackPtr]['bracket_closer']; + + // Do not check nested style definitions as, for example, in @media style rules. + $nested = $phpcsFile->findNext(T_OPEN_CURLY_BRACKET, ($stackPtr + 1), $end); + if ($nested !== false) { + return; + } + + $foundColon = false; + $foundString = false; + for ($i = ($stackPtr + 1); $i <= $end; $i++) { + if ($tokens[$i]['line'] !== $lastLine) { + // We changed lines. + if ($foundColon === false && $foundString !== false) { + // We didn't find a colon on the previous line. + $error = 'No style definition found on line; check for missing colon'; + $phpcsFile->addError($error, $foundString, 'Found'); + } + + $foundColon = false; + $foundString = false; + $lastLine = $tokens[$i]['line']; + } + + if ($tokens[$i]['code'] === T_STRING) { + $foundString = $i; + } else if ($tokens[$i]['code'] === T_COLON) { + $foundColon = $i; + } + }//end for + + }//end process() + + +}//end class diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Sniffs/CSS/NamedColoursSniff.php b/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Sniffs/CSS/NamedColoursSniff.php new file mode 100644 index 00000000..0a51f501 --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Sniffs/CSS/NamedColoursSniff.php @@ -0,0 +1,93 @@ + + * @copyright 2006-2015 Squiz Pty Ltd (ABN 77 084 670 600) + * @license https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence + */ + +namespace PHP_CodeSniffer\Standards\Squiz\Sniffs\CSS; + +use PHP_CodeSniffer\Files\File; +use PHP_CodeSniffer\Sniffs\Sniff; + +class NamedColoursSniff implements Sniff +{ + + /** + * A list of tokenizers this sniff supports. + * + * @var array + */ + public $supportedTokenizers = ['CSS']; + + /** + * A list of named colours. + * + * This is the list of standard colours defined in the CSS specification. + * + * @var array + */ + protected $colourNames = [ + 'aqua' => 'aqua', + 'black' => 'black', + 'blue' => 'blue', + 'fuchsia' => 'fuchsia', + 'gray' => 'gray', + 'green' => 'green', + 'lime' => 'lime', + 'maroon' => 'maroon', + 'navy' => 'navy', + 'olive' => 'olive', + 'orange' => 'orange', + 'purple' => 'purple', + 'red' => 'red', + 'silver' => 'silver', + 'teal' => 'teal', + 'white' => 'white', + 'yellow' => 'yellow', + ]; + + + /** + * Returns the token types that this sniff is interested in. + * + * @return int[] + */ + public function register() + { + return [T_STRING]; + + }//end register() + + + /** + * Processes the tokens that this sniff is interested in. + * + * @param \PHP_CodeSniffer\Files\File $phpcsFile The file where the token was found. + * @param int $stackPtr The position in the stack where + * the token was found. + * + * @return void + */ + public function process(File $phpcsFile, $stackPtr) + { + $tokens = $phpcsFile->getTokens(); + + if ($tokens[($stackPtr - 1)]['code'] === T_HASH + || $tokens[($stackPtr - 1)]['code'] === T_STRING_CONCAT + ) { + // Class name. + return; + } + + if (isset($this->colourNames[strtolower($tokens[$stackPtr]['content'])]) === true) { + $error = 'Named colours are forbidden; use hex, rgb, or rgba values instead'; + $phpcsFile->addError($error, $stackPtr, 'Forbidden'); + } + + }//end process() + + +}//end class diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Sniffs/CSS/OpacitySniff.php b/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Sniffs/CSS/OpacitySniff.php new file mode 100644 index 00000000..1dfbcf67 --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Sniffs/CSS/OpacitySniff.php @@ -0,0 +1,101 @@ + + * @copyright 2006-2015 Squiz Pty Ltd (ABN 77 084 670 600) + * @license https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence + */ + +namespace PHP_CodeSniffer\Standards\Squiz\Sniffs\CSS; + +use PHP_CodeSniffer\Files\File; +use PHP_CodeSniffer\Sniffs\Sniff; +use PHP_CodeSniffer\Util\Tokens; + +class OpacitySniff implements Sniff +{ + + /** + * A list of tokenizers this sniff supports. + * + * @var array + */ + public $supportedTokenizers = ['CSS']; + + + /** + * Returns the token types that this sniff is interested in. + * + * @return int[] + */ + public function register() + { + return [T_STYLE]; + + }//end register() + + + /** + * Processes the tokens that this sniff is interested in. + * + * @param \PHP_CodeSniffer\Files\File $phpcsFile The file where the token was found. + * @param int $stackPtr The position in the stack where + * the token was found. + * + * @return void + */ + public function process(File $phpcsFile, $stackPtr) + { + $tokens = $phpcsFile->getTokens(); + + if ($tokens[$stackPtr]['content'] !== 'opacity') { + return; + } + + $ignore = Tokens::$emptyTokens; + $ignore[] = T_COLON; + + $next = $phpcsFile->findNext($ignore, ($stackPtr + 1), null, true); + + if ($next === false + || ($tokens[$next]['code'] !== T_DNUMBER + && $tokens[$next]['code'] !== T_LNUMBER) + ) { + return; + } + + $value = $tokens[$next]['content']; + if ($tokens[$next]['code'] === T_LNUMBER) { + if ($value !== '0' && $value !== '1') { + $error = 'Opacity values must be between 0 and 1'; + $phpcsFile->addError($error, $next, 'Invalid'); + } + } else { + if (strlen($value) > 3) { + $error = 'Opacity values must have a single value after the decimal point'; + $phpcsFile->addError($error, $next, 'DecimalPrecision'); + } else if ($value === '0.0' || $value === '1.0') { + $error = 'Opacity value does not require decimal point; use %s instead'; + $data = [$value[0]]; + $fix = $phpcsFile->addFixableError($error, $next, 'PointNotRequired', $data); + if ($fix === true) { + $phpcsFile->fixer->replaceToken($next, $value[0]); + } + } else if ($value[0] === '.') { + $error = 'Opacity values must not start with a decimal point; use 0%s instead'; + $data = [$value]; + $fix = $phpcsFile->addFixableError($error, $next, 'StartWithPoint', $data); + if ($fix === true) { + $phpcsFile->fixer->replaceToken($next, '0'.$value); + } + } else if ($value[0] !== '0') { + $error = 'Opacity values must be between 0 and 1'; + $phpcsFile->addError($error, $next, 'Invalid'); + }//end if + }//end if + + }//end process() + + +}//end class diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Sniffs/CSS/SemicolonSpacingSniff.php b/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Sniffs/CSS/SemicolonSpacingSniff.php new file mode 100644 index 00000000..fdc168e2 --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Sniffs/CSS/SemicolonSpacingSniff.php @@ -0,0 +1,103 @@ + + * @copyright 2006-2015 Squiz Pty Ltd (ABN 77 084 670 600) + * @license https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence + */ + +namespace PHP_CodeSniffer\Standards\Squiz\Sniffs\CSS; + +use PHP_CodeSniffer\Files\File; +use PHP_CodeSniffer\Sniffs\Sniff; +use PHP_CodeSniffer\Util\Tokens; + +class SemicolonSpacingSniff implements Sniff +{ + + /** + * A list of tokenizers this sniff supports. + * + * @var array + */ + public $supportedTokenizers = ['CSS']; + + + /** + * Returns the token types that this sniff is interested in. + * + * @return int[] + */ + public function register() + { + return [T_STYLE]; + + }//end register() + + + /** + * Processes the tokens that this sniff is interested in. + * + * @param \PHP_CodeSniffer\Files\File $phpcsFile The file where the token was found. + * @param int $stackPtr The position in the stack where + * the token was found. + * + * @return void + */ + public function process(File $phpcsFile, $stackPtr) + { + $tokens = $phpcsFile->getTokens(); + + $nextStatement = $phpcsFile->findNext([T_STYLE, T_CLOSE_CURLY_BRACKET], ($stackPtr + 1)); + if ($nextStatement === false) { + return; + } + + $ignore = Tokens::$emptyTokens; + if ($tokens[$nextStatement]['code'] === T_STYLE) { + // Allow for star-prefix hack. + $ignore[] = T_MULTIPLY; + } + + $endOfThisStatement = $phpcsFile->findPrevious($ignore, ($nextStatement - 1), null, true); + if ($tokens[$endOfThisStatement]['code'] !== T_SEMICOLON) { + $error = 'Style definitions must end with a semicolon'; + $phpcsFile->addError($error, $endOfThisStatement, 'NotAtEnd'); + return; + } + + if ($tokens[($endOfThisStatement - 1)]['code'] !== T_WHITESPACE) { + return; + } + + // There is a semi-colon, so now find the last token in the statement. + $prevNonEmpty = $phpcsFile->findPrevious(Tokens::$emptyTokens, ($endOfThisStatement - 1), null, true); + $found = $tokens[($endOfThisStatement - 1)]['length']; + if ($tokens[$prevNonEmpty]['line'] !== $tokens[$endOfThisStatement]['line']) { + $found = 'newline'; + } + + $error = 'Expected 0 spaces before semicolon in style definition; %s found'; + $data = [$found]; + $fix = $phpcsFile->addFixableError($error, $prevNonEmpty, 'SpaceFound', $data); + if ($fix === true) { + $phpcsFile->fixer->beginChangeset(); + $phpcsFile->fixer->addContent($prevNonEmpty, ';'); + $phpcsFile->fixer->replaceToken($endOfThisStatement, ''); + + for ($i = ($endOfThisStatement - 1); $i > $prevNonEmpty; $i--) { + if ($tokens[$i]['code'] !== T_WHITESPACE) { + break; + } + + $phpcsFile->fixer->replaceToken($i, ''); + } + + $phpcsFile->fixer->endChangeset(); + } + + }//end process() + + +}//end class diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Sniffs/CSS/ShorthandSizeSniff.php b/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Sniffs/CSS/ShorthandSizeSniff.php new file mode 100644 index 00000000..8f2d9aa8 --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Sniffs/CSS/ShorthandSizeSniff.php @@ -0,0 +1,181 @@ + + * @copyright 2006-2015 Squiz Pty Ltd (ABN 77 084 670 600) + * @license https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence + */ + +namespace PHP_CodeSniffer\Standards\Squiz\Sniffs\CSS; + +use PHP_CodeSniffer\Files\File; +use PHP_CodeSniffer\Sniffs\Sniff; + +class ShorthandSizeSniff implements Sniff +{ + + /** + * A list of tokenizers this sniff supports. + * + * @var array + */ + public $supportedTokenizers = ['CSS']; + + /** + * A list of styles that we shouldn't check. + * + * These have values that looks like sizes, but are not. + * + * @var array + */ + protected $excludeStyles = [ + 'background-position' => 'background-position', + 'box-shadow' => 'box-shadow', + 'transform-origin' => 'transform-origin', + '-webkit-transform-origin' => '-webkit-transform-origin', + '-ms-transform-origin' => '-ms-transform-origin', + ]; + + + /** + * Returns the token types that this sniff is interested in. + * + * @return int[] + */ + public function register() + { + return [T_STYLE]; + + }//end register() + + + /** + * Processes the tokens that this sniff is interested in. + * + * @param \PHP_CodeSniffer\Files\File $phpcsFile The file where the token was found. + * @param int $stackPtr The position in the stack where + * the token was found. + * + * @return void + */ + public function process(File $phpcsFile, $stackPtr) + { + $tokens = $phpcsFile->getTokens(); + + // Some styles look like shorthand but are not actually a set of 4 sizes. + $style = strtolower($tokens[$stackPtr]['content']); + if (isset($this->excludeStyles[$style]) === true) { + return; + } + + $end = $phpcsFile->findNext(T_SEMICOLON, ($stackPtr + 1)); + if ($end === false) { + // Live coding or parse error. + return; + } + + // Get the whole style content. + $origContent = $phpcsFile->getTokensAsString(($stackPtr + 1), ($end - $stackPtr - 1)); + $origContent = trim($origContent, ':'); + $origContent = trim($origContent); + + // Account for a !important annotation. + $content = $origContent; + if (substr($content, -10) === '!important') { + $content = substr($content, 0, -10); + $content = trim($content); + } + + // Check if this style value is a set of numbers with optional prefixes. + $content = preg_replace('/\s+/', ' ', $content); + $values = []; + $num = preg_match_all( + '/(?:[0-9]+)(?:[a-zA-Z]{2}\s+|%\s+|\s+)/', + $content.' ', + $values, + PREG_SET_ORDER + ); + + // Only interested in styles that have multiple sizes defined. + if ($num < 2) { + return; + } + + // Rebuild the content we matched to ensure we got everything. + $matched = ''; + foreach ($values as $value) { + $matched .= $value[0]; + } + + if ($content !== trim($matched)) { + return; + } + + if ($num === 3) { + $expected = trim($content.' '.$values[1][0]); + $error = 'Shorthand syntax not allowed here; use %s instead'; + $data = [$expected]; + $fix = $phpcsFile->addFixableError($error, $stackPtr, 'NotAllowed', $data); + + if ($fix === true) { + $phpcsFile->fixer->beginChangeset(); + if (substr($origContent, -10) === '!important') { + $expected .= ' !important'; + } + + $next = $phpcsFile->findNext(T_WHITESPACE, ($stackPtr + 2), null, true); + $phpcsFile->fixer->replaceToken($next, $expected); + for ($next++; $next < $end; $next++) { + $phpcsFile->fixer->replaceToken($next, ''); + } + + $phpcsFile->fixer->endChangeset(); + } + + return; + }//end if + + if ($num === 2) { + if ($values[0][0] !== $values[1][0]) { + // Both values are different, so it is already shorthand. + return; + } + } else if ($values[0][0] !== $values[2][0] || $values[1][0] !== $values[3][0]) { + // Can't shorthand this. + return; + } + + if ($values[0][0] === $values[1][0]) { + // All values are the same. + $expected = trim($values[0][0]); + } else { + $expected = trim($values[0][0]).' '.trim($values[1][0]); + } + + $error = 'Size definitions must use shorthand if available; expected "%s" but found "%s"'; + $data = [ + $expected, + $content, + ]; + + $fix = $phpcsFile->addFixableError($error, $stackPtr, 'NotUsed', $data); + if ($fix === true) { + $phpcsFile->fixer->beginChangeset(); + if (substr($origContent, -10) === '!important') { + $expected .= ' !important'; + } + + $next = $phpcsFile->findNext(T_COLON, ($stackPtr + 1)); + $phpcsFile->fixer->addContent($next, ' '.$expected); + for ($next++; $next < $end; $next++) { + $phpcsFile->fixer->replaceToken($next, ''); + } + + $phpcsFile->fixer->endChangeset(); + } + + }//end process() + + +}//end class diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Sniffs/Classes/ClassDeclarationSniff.php b/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Sniffs/Classes/ClassDeclarationSniff.php new file mode 100644 index 00000000..3d2c4db1 --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Sniffs/Classes/ClassDeclarationSniff.php @@ -0,0 +1,206 @@ + + * @copyright 2006-2015 Squiz Pty Ltd (ABN 77 084 670 600) + * @license https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence + */ + +namespace PHP_CodeSniffer\Standards\Squiz\Sniffs\Classes; + +use PHP_CodeSniffer\Files\File; +use PHP_CodeSniffer\Standards\PSR2\Sniffs\Classes\ClassDeclarationSniff as PSR2ClassDeclarationSniff; +use PHP_CodeSniffer\Util\Tokens; + +class ClassDeclarationSniff extends PSR2ClassDeclarationSniff +{ + + + /** + * Processes this test, when one of its tokens is encountered. + * + * @param \PHP_CodeSniffer\Files\File $phpcsFile The file being scanned. + * @param int $stackPtr The position of the current token + * in the stack passed in $tokens. + * + * @return void + */ + public function process(File $phpcsFile, $stackPtr) + { + // We want all the errors from the PSR2 standard, plus some of our own. + parent::process($phpcsFile, $stackPtr); + + // Check that this is the only class or interface in the file. + $nextClass = $phpcsFile->findNext([T_CLASS, T_INTERFACE], ($stackPtr + 1)); + if ($nextClass !== false) { + // We have another, so an error is thrown. + $error = 'Only one interface or class is allowed in a file'; + $phpcsFile->addError($error, $nextClass, 'MultipleClasses'); + } + + }//end process() + + + /** + * Processes the opening section of a class declaration. + * + * @param \PHP_CodeSniffer\Files\File $phpcsFile The file being scanned. + * @param int $stackPtr The position of the current token + * in the stack passed in $tokens. + * + * @return void + */ + public function processOpen(File $phpcsFile, $stackPtr) + { + parent::processOpen($phpcsFile, $stackPtr); + + $tokens = $phpcsFile->getTokens(); + + if ($tokens[($stackPtr - 1)]['code'] === T_WHITESPACE) { + $prevContent = $tokens[($stackPtr - 1)]['content']; + if ($prevContent !== $phpcsFile->eolChar) { + $blankSpace = substr($prevContent, strpos($prevContent, $phpcsFile->eolChar)); + $spaces = strlen($blankSpace); + + if ($tokens[($stackPtr - 2)]['code'] !== T_ABSTRACT + && $tokens[($stackPtr - 2)]['code'] !== T_FINAL + ) { + if ($spaces !== 0) { + $type = strtolower($tokens[$stackPtr]['content']); + $error = 'Expected 0 spaces before %s keyword; %s found'; + $data = [ + $type, + $spaces, + ]; + + $fix = $phpcsFile->addFixableError($error, $stackPtr, 'SpaceBeforeKeyword', $data); + if ($fix === true) { + $phpcsFile->fixer->replaceToken(($stackPtr - 1), ''); + } + } + } + }//end if + }//end if + + }//end processOpen() + + + /** + * Processes the closing section of a class declaration. + * + * @param \PHP_CodeSniffer\Files\File $phpcsFile The file being scanned. + * @param int $stackPtr The position of the current token + * in the stack passed in $tokens. + * + * @return void + */ + public function processClose(File $phpcsFile, $stackPtr) + { + $tokens = $phpcsFile->getTokens(); + if (isset($tokens[$stackPtr]['scope_closer']) === false) { + return; + } + + $closeBrace = $tokens[$stackPtr]['scope_closer']; + + // Check that the closing brace has one blank line after it. + for ($nextContent = ($closeBrace + 1); $nextContent < $phpcsFile->numTokens; $nextContent++) { + // Ignore comments on the same line as the brace. + if ($tokens[$nextContent]['line'] === $tokens[$closeBrace]['line'] + && ($tokens[$nextContent]['code'] === T_WHITESPACE + || $tokens[$nextContent]['code'] === T_COMMENT + || isset(Tokens::$phpcsCommentTokens[$tokens[$nextContent]['code']]) === true) + ) { + continue; + } + + if ($tokens[$nextContent]['code'] !== T_WHITESPACE) { + break; + } + } + + if ($nextContent === $phpcsFile->numTokens) { + // Ignore the line check as this is the very end of the file. + $difference = 1; + } else { + $difference = ($tokens[$nextContent]['line'] - $tokens[$closeBrace]['line'] - 1); + } + + $lastContent = $phpcsFile->findPrevious(T_WHITESPACE, ($closeBrace - 1), $stackPtr, true); + + if ($difference === -1 + || $tokens[$lastContent]['line'] === $tokens[$closeBrace]['line'] + ) { + $error = 'Closing %s brace must be on a line by itself'; + $data = [$tokens[$stackPtr]['content']]; + $fix = $phpcsFile->addFixableError($error, $closeBrace, 'CloseBraceSameLine', $data); + if ($fix === true) { + if ($difference === -1) { + $phpcsFile->fixer->addNewlineBefore($nextContent); + } + + if ($tokens[$lastContent]['line'] === $tokens[$closeBrace]['line']) { + $phpcsFile->fixer->addNewlineBefore($closeBrace); + } + } + } else if ($tokens[($closeBrace - 1)]['code'] === T_WHITESPACE) { + $prevContent = $tokens[($closeBrace - 1)]['content']; + if ($prevContent !== $phpcsFile->eolChar) { + $blankSpace = substr($prevContent, strpos($prevContent, $phpcsFile->eolChar)); + $spaces = strlen($blankSpace); + if ($spaces !== 0) { + if ($tokens[($closeBrace - 1)]['line'] !== $tokens[$closeBrace]['line']) { + $error = 'Expected 0 spaces before closing brace; newline found'; + $phpcsFile->addError($error, $closeBrace, 'NewLineBeforeCloseBrace'); + } else { + $error = 'Expected 0 spaces before closing brace; %s found'; + $data = [$spaces]; + $fix = $phpcsFile->addFixableError($error, $closeBrace, 'SpaceBeforeCloseBrace', $data); + if ($fix === true) { + $phpcsFile->fixer->replaceToken(($closeBrace - 1), ''); + } + } + } + } + }//end if + + if ($difference !== -1 && $difference !== 1) { + if ($tokens[$nextContent]['code'] === T_DOC_COMMENT_OPEN_TAG) { + $next = $phpcsFile->findNext(T_WHITESPACE, ($tokens[$nextContent]['comment_closer'] + 1), null, true); + if ($next !== false && $tokens[$next]['code'] === T_FUNCTION) { + return; + } + } + + $error = 'Closing brace of a %s must be followed by a single blank line; found %s'; + $data = [ + $tokens[$stackPtr]['content'], + $difference, + ]; + $fix = $phpcsFile->addFixableError($error, $closeBrace, 'NewlinesAfterCloseBrace', $data); + if ($fix === true) { + if ($difference === 0) { + $first = $phpcsFile->findFirstOnLine([], $nextContent, true); + $phpcsFile->fixer->addNewlineBefore($first); + } else { + $phpcsFile->fixer->beginChangeset(); + for ($i = ($closeBrace + 1); $i < $nextContent; $i++) { + if ($tokens[$i]['line'] <= ($tokens[$closeBrace]['line'] + 1)) { + continue; + } else if ($tokens[$i]['line'] === $tokens[$nextContent]['line']) { + break; + } + + $phpcsFile->fixer->replaceToken($i, ''); + } + + $phpcsFile->fixer->endChangeset(); + } + } + }//end if + + }//end processClose() + + +}//end class diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Sniffs/Classes/ClassFileNameSniff.php b/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Sniffs/Classes/ClassFileNameSniff.php new file mode 100644 index 00000000..afbec4fa --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Sniffs/Classes/ClassFileNameSniff.php @@ -0,0 +1,69 @@ + + * @copyright 2006-2015 Squiz Pty Ltd (ABN 77 084 670 600) + * @license https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence + */ + +namespace PHP_CodeSniffer\Standards\Squiz\Sniffs\Classes; + +use PHP_CodeSniffer\Files\File; +use PHP_CodeSniffer\Sniffs\Sniff; + +class ClassFileNameSniff implements Sniff +{ + + + /** + * Returns an array of tokens this test wants to listen for. + * + * @return array + */ + public function register() + { + return [ + T_CLASS, + T_INTERFACE, + T_TRAIT, + ]; + + }//end register() + + + /** + * Processes this test, when one of its tokens is encountered. + * + * @param \PHP_CodeSniffer\Files\File $phpcsFile The file being scanned. + * @param int $stackPtr The position of the current token in + * the stack passed in $tokens. + * + * @return void + */ + public function process(File $phpcsFile, $stackPtr) + { + $fullPath = basename($phpcsFile->getFilename()); + $fileName = substr($fullPath, 0, strrpos($fullPath, '.')); + if ($fileName === '') { + // No filename probably means STDIN, so we can't do this check. + return; + } + + $tokens = $phpcsFile->getTokens(); + $decName = $phpcsFile->findNext(T_STRING, $stackPtr); + + if ($tokens[$decName]['content'] !== $fileName) { + $error = '%s name doesn\'t match filename; expected "%s %s"'; + $data = [ + ucfirst($tokens[$stackPtr]['content']), + $tokens[$stackPtr]['content'], + $fileName, + ]; + $phpcsFile->addError($error, $stackPtr, 'NoMatch', $data); + } + + }//end process() + + +}//end class diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Sniffs/Classes/DuplicatePropertySniff.php b/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Sniffs/Classes/DuplicatePropertySniff.php new file mode 100644 index 00000000..a632f81e --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Sniffs/Classes/DuplicatePropertySniff.php @@ -0,0 +1,82 @@ + + * @copyright 2006-2015 Squiz Pty Ltd (ABN 77 084 670 600) + * @license https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence + */ + +namespace PHP_CodeSniffer\Standards\Squiz\Sniffs\Classes; + +use PHP_CodeSniffer\Files\File; +use PHP_CodeSniffer\Sniffs\Sniff; + +class DuplicatePropertySniff implements Sniff +{ + + /** + * A list of tokenizers this sniff supports. + * + * @var array + */ + public $supportedTokenizers = ['JS']; + + + /** + * Returns an array of tokens this test wants to listen for. + * + * @return array + */ + public function register() + { + return [T_OBJECT]; + + }//end register() + + + /** + * Processes this test, when one of its tokens is encountered. + * + * @param \PHP_CodeSniffer\Files\File $phpcsFile The current file being processed. + * @param int $stackPtr The position of the current token in the + * stack passed in $tokens. + * + * @return void + */ + public function process(File $phpcsFile, $stackPtr) + { + $tokens = $phpcsFile->getTokens(); + + $properties = []; + $wantedTokens = [ + T_PROPERTY, + T_OBJECT, + ]; + + $next = $phpcsFile->findNext($wantedTokens, ($stackPtr + 1), $tokens[$stackPtr]['bracket_closer']); + while ($next !== false && $next < $tokens[$stackPtr]['bracket_closer']) { + if ($tokens[$next]['code'] === T_OBJECT) { + // Skip nested objects. + $next = $tokens[$next]['bracket_closer']; + } else { + $propName = $tokens[$next]['content']; + if (isset($properties[$propName]) === true) { + $error = 'Duplicate property definition found for "%s"; previously defined on line %s'; + $data = [ + $propName, + $tokens[$properties[$propName]]['line'], + ]; + $phpcsFile->addError($error, $next, 'Found', $data); + } + + $properties[$propName] = $next; + }//end if + + $next = $phpcsFile->findNext($wantedTokens, ($next + 1), $tokens[$stackPtr]['bracket_closer']); + }//end while + + }//end process() + + +}//end class diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Sniffs/Classes/LowercaseClassKeywordsSniff.php b/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Sniffs/Classes/LowercaseClassKeywordsSniff.php new file mode 100644 index 00000000..5f4f78c0 --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Sniffs/Classes/LowercaseClassKeywordsSniff.php @@ -0,0 +1,72 @@ + + * @copyright 2006-2015 Squiz Pty Ltd (ABN 77 084 670 600) + * @license https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence + */ + +namespace PHP_CodeSniffer\Standards\Squiz\Sniffs\Classes; + +use PHP_CodeSniffer\Files\File; +use PHP_CodeSniffer\Sniffs\Sniff; +use PHP_CodeSniffer\Util\Tokens; + +class LowercaseClassKeywordsSniff implements Sniff +{ + + + /** + * Returns an array of tokens this test wants to listen for. + * + * @return array + */ + public function register() + { + $targets = Tokens::$ooScopeTokens; + $targets[] = T_EXTENDS; + $targets[] = T_IMPLEMENTS; + $targets[] = T_ABSTRACT; + $targets[] = T_FINAL; + $targets[] = T_VAR; + $targets[] = T_CONST; + + return $targets; + + }//end register() + + + /** + * Processes this test, when one of its tokens is encountered. + * + * @param \PHP_CodeSniffer\Files\File $phpcsFile The file being scanned. + * @param int $stackPtr The position of the current token in + * the stack passed in $tokens. + * + * @return void + */ + public function process(File $phpcsFile, $stackPtr) + { + $tokens = $phpcsFile->getTokens(); + + $content = $tokens[$stackPtr]['content']; + $contentLc = strtolower($content); + if ($content !== $contentLc) { + $error = '%s keyword must be lowercase; expected "%s" but found "%s"'; + $data = [ + strtoupper($content), + $contentLc, + $content, + ]; + + $fix = $phpcsFile->addFixableError($error, $stackPtr, 'FoundUppercase', $data); + if ($fix === true) { + $phpcsFile->fixer->replaceToken($stackPtr, $contentLc); + } + } + + }//end process() + + +}//end class diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Sniffs/Classes/SelfMemberReferenceSniff.php b/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Sniffs/Classes/SelfMemberReferenceSniff.php new file mode 100644 index 00000000..d17ca44c --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Sniffs/Classes/SelfMemberReferenceSniff.php @@ -0,0 +1,240 @@ + + * @copyright 2006-2015 Squiz Pty Ltd (ABN 77 084 670 600) + * @license https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence + */ + +namespace PHP_CodeSniffer\Standards\Squiz\Sniffs\Classes; + +use PHP_CodeSniffer\Files\File; +use PHP_CodeSniffer\Sniffs\AbstractScopeSniff; +use PHP_CodeSniffer\Util\Tokens; + +class SelfMemberReferenceSniff extends AbstractScopeSniff +{ + + + /** + * Constructs a Squiz_Sniffs_Classes_SelfMemberReferenceSniff. + */ + public function __construct() + { + parent::__construct([T_CLASS], [T_DOUBLE_COLON]); + + }//end __construct() + + + /** + * Processes the function tokens within the class. + * + * @param \PHP_CodeSniffer\Files\File $phpcsFile The file where this token was found. + * @param int $stackPtr The position where the token was found. + * @param int $currScope The current scope opener token. + * + * @return void + */ + protected function processTokenWithinScope(File $phpcsFile, $stackPtr, $currScope) + { + $tokens = $phpcsFile->getTokens(); + + // Determine if this is a double colon which needs to be examined. + $conditions = $tokens[$stackPtr]['conditions']; + $conditions = array_reverse($conditions, true); + foreach ($conditions as $conditionToken => $tokenCode) { + if ($tokenCode === T_CLASS || $tokenCode === T_ANON_CLASS || $tokenCode === T_CLOSURE) { + break; + } + } + + if ($conditionToken !== $currScope) { + return; + } + + $calledClassName = $phpcsFile->findPrevious(Tokens::$emptyTokens, ($stackPtr - 1), null, true); + if ($calledClassName === false) { + // Parse error. + return; + } + + if ($tokens[$calledClassName]['code'] === T_SELF) { + if ($tokens[$calledClassName]['content'] !== 'self') { + $error = 'Must use "self::" for local static member reference; found "%s::"'; + $data = [$tokens[$calledClassName]['content']]; + $fix = $phpcsFile->addFixableError($error, $calledClassName, 'IncorrectCase', $data); + if ($fix === true) { + $phpcsFile->fixer->replaceToken($calledClassName, 'self'); + } + + return; + } + } else if ($tokens[$calledClassName]['code'] === T_STRING) { + // If the class is called with a namespace prefix, build fully qualified + // namespace calls for both current scope class and requested class. + $prevNonEmpty = $phpcsFile->findPrevious(Tokens::$emptyTokens, ($calledClassName - 1), null, true); + if ($prevNonEmpty !== false && $tokens[$prevNonEmpty]['code'] === T_NS_SEPARATOR) { + $declarationName = $this->getDeclarationNameWithNamespace($tokens, $calledClassName); + $declarationName = ltrim($declarationName, '\\'); + $fullQualifiedClassName = $this->getNamespaceOfScope($phpcsFile, $currScope); + if ($fullQualifiedClassName === '\\') { + $fullQualifiedClassName = ''; + } else { + $fullQualifiedClassName .= '\\'; + } + + $fullQualifiedClassName .= $phpcsFile->getDeclarationName($currScope); + } else { + $declarationName = $phpcsFile->getDeclarationName($currScope); + $fullQualifiedClassName = $tokens[$calledClassName]['content']; + } + + if ($declarationName === $fullQualifiedClassName) { + // Class name is the same as the current class, which is not allowed. + $error = 'Must use "self::" for local static member reference'; + $fix = $phpcsFile->addFixableError($error, $calledClassName, 'NotUsed'); + + if ($fix === true) { + $phpcsFile->fixer->beginChangeset(); + + $currentPointer = ($stackPtr - 1); + while ($tokens[$currentPointer]['code'] === T_NS_SEPARATOR + || $tokens[$currentPointer]['code'] === T_STRING + || isset(Tokens::$emptyTokens[$tokens[$currentPointer]['code']]) === true + ) { + if (isset(Tokens::$emptyTokens[$tokens[$currentPointer]['code']]) === true) { + --$currentPointer; + continue; + } + + $phpcsFile->fixer->replaceToken($currentPointer, ''); + --$currentPointer; + } + + $phpcsFile->fixer->replaceToken($stackPtr, 'self::'); + $phpcsFile->fixer->endChangeset(); + + // Fix potential whitespace issues in the next loop. + return; + }//end if + }//end if + }//end if + + if ($tokens[($stackPtr - 1)]['code'] === T_WHITESPACE) { + $found = $tokens[($stackPtr - 1)]['length']; + $error = 'Expected 0 spaces before double colon; %s found'; + $data = [$found]; + $fix = $phpcsFile->addFixableError($error, ($stackPtr - 1), 'SpaceBefore', $data); + + if ($fix === true) { + $phpcsFile->fixer->beginChangeset(); + + for ($i = ($stackPtr - 1); $tokens[$i]['code'] === T_WHITESPACE; $i--) { + $phpcsFile->fixer->replaceToken($i, ''); + } + + $phpcsFile->fixer->endChangeset(); + } + } + + if ($tokens[($stackPtr + 1)]['code'] === T_WHITESPACE) { + $found = $tokens[($stackPtr + 1)]['length']; + $error = 'Expected 0 spaces after double colon; %s found'; + $data = [$found]; + $fix = $phpcsFile->addFixableError($error, ($stackPtr - 1), 'SpaceAfter', $data); + + if ($fix === true) { + $phpcsFile->fixer->beginChangeset(); + + for ($i = ($stackPtr + 1); $tokens[$i]['code'] === T_WHITESPACE; $i++) { + $phpcsFile->fixer->replaceToken($i, ''); + } + + $phpcsFile->fixer->endChangeset(); + } + } + + }//end processTokenWithinScope() + + + /** + * Processes a token that is found within the scope that this test is + * listening to. + * + * @param \PHP_CodeSniffer\Files\File $phpcsFile The file where this token was found. + * @param int $stackPtr The position in the stack where this + * token was found. + * + * @return void + */ + protected function processTokenOutsideScope(File $phpcsFile, $stackPtr) + { + + }//end processTokenOutsideScope() + + + /** + * Returns the declaration names for classes/interfaces/functions with a namespace. + * + * @param array $tokens Token stack for this file + * @param int $stackPtr The position where the namespace building will start. + * + * @return string + */ + protected function getDeclarationNameWithNamespace(array $tokens, $stackPtr) + { + $nameParts = []; + $currentPointer = $stackPtr; + while ($tokens[$currentPointer]['code'] === T_NS_SEPARATOR + || $tokens[$currentPointer]['code'] === T_STRING + || isset(Tokens::$emptyTokens[$tokens[$currentPointer]['code']]) === true + ) { + if (isset(Tokens::$emptyTokens[$tokens[$currentPointer]['code']]) === true) { + --$currentPointer; + continue; + } + + $nameParts[] = $tokens[$currentPointer]['content']; + --$currentPointer; + } + + $nameParts = array_reverse($nameParts); + return implode('', $nameParts); + + }//end getDeclarationNameWithNamespace() + + + /** + * Returns the namespace declaration of a file. + * + * @param \PHP_CodeSniffer\Files\File $phpcsFile The file where this token was found. + * @param int $stackPtr The position where the search for the + * namespace declaration will start. + * + * @return string + */ + protected function getNamespaceOfScope(File $phpcsFile, $stackPtr) + { + $namespace = '\\'; + $namespaceDeclaration = $phpcsFile->findPrevious(T_NAMESPACE, $stackPtr); + + if ($namespaceDeclaration !== false) { + $endOfNamespaceDeclaration = $phpcsFile->findNext([T_SEMICOLON, T_OPEN_CURLY_BRACKET], $namespaceDeclaration); + $namespace = $this->getDeclarationNameWithNamespace( + $phpcsFile->getTokens(), + ($endOfNamespaceDeclaration - 1) + ); + } + + return $namespace; + + }//end getNamespaceOfScope() + + +}//end class diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Sniffs/Classes/ValidClassNameSniff.php b/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Sniffs/Classes/ValidClassNameSniff.php new file mode 100644 index 00000000..10de719d --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Sniffs/Classes/ValidClassNameSniff.php @@ -0,0 +1,86 @@ + + * @copyright 2006-2015 Squiz Pty Ltd (ABN 77 084 670 600) + * @license https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence + */ + +namespace PHP_CodeSniffer\Standards\Squiz\Sniffs\Classes; + +use PHP_CodeSniffer\Files\File; +use PHP_CodeSniffer\Sniffs\Sniff; +use PHP_CodeSniffer\Util\Common; + +class ValidClassNameSniff implements Sniff +{ + + + /** + * Returns an array of tokens this test wants to listen for. + * + * @return array + */ + public function register() + { + return [ + T_CLASS, + T_INTERFACE, + T_TRAIT, + ]; + + }//end register() + + + /** + * Processes this test, when one of its tokens is encountered. + * + * @param \PHP_CodeSniffer\Files\File $phpcsFile The current file being processed. + * @param int $stackPtr The position of the current token in the + * stack passed in $tokens. + * + * @return void + */ + public function process(File $phpcsFile, $stackPtr) + { + $tokens = $phpcsFile->getTokens(); + + if (isset($tokens[$stackPtr]['scope_opener']) === false) { + $error = 'Possible parse error: %s missing opening or closing brace'; + $data = [$tokens[$stackPtr]['content']]; + $phpcsFile->addWarning($error, $stackPtr, 'MissingBrace', $data); + return; + } + + // Determine the name of the class or interface. Note that we cannot + // simply look for the first T_STRING because a class name + // starting with the number will be multiple tokens. + $opener = $tokens[$stackPtr]['scope_opener']; + $nameStart = $phpcsFile->findNext(T_WHITESPACE, ($stackPtr + 1), $opener, true); + $nameEnd = $phpcsFile->findNext(T_WHITESPACE, $nameStart, $opener); + if ($nameEnd === false) { + $name = $tokens[$nameStart]['content']; + } else { + $name = trim($phpcsFile->getTokensAsString($nameStart, ($nameEnd - $nameStart))); + } + + // Check for PascalCase format. + $valid = Common::isCamelCaps($name, true, true, false); + if ($valid === false) { + $type = ucfirst($tokens[$stackPtr]['content']); + $error = '%s name "%s" is not in PascalCase format'; + $data = [ + $type, + $name, + ]; + $phpcsFile->addError($error, $stackPtr, 'NotCamelCaps', $data); + $phpcsFile->recordMetric($stackPtr, 'PascalCase class name', 'no'); + } else { + $phpcsFile->recordMetric($stackPtr, 'PascalCase class name', 'yes'); + } + + }//end process() + + +}//end class diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Sniffs/Commenting/BlockCommentSniff.php b/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Sniffs/Commenting/BlockCommentSniff.php new file mode 100644 index 00000000..6a12bb73 --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Sniffs/Commenting/BlockCommentSniff.php @@ -0,0 +1,399 @@ + + * @copyright 2006-2015 Squiz Pty Ltd (ABN 77 084 670 600) + * @license https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence + */ + +namespace PHP_CodeSniffer\Standards\Squiz\Sniffs\Commenting; + +use PHP_CodeSniffer\Files\File; +use PHP_CodeSniffer\Sniffs\Sniff; +use PHP_CodeSniffer\Util\Tokens; + +class BlockCommentSniff implements Sniff +{ + + /** + * The --tab-width CLI value that is being used. + * + * @var integer + */ + private $tabWidth = null; + + + /** + * Returns an array of tokens this test wants to listen for. + * + * @return array + */ + public function register() + { + return [ + T_COMMENT, + T_DOC_COMMENT_OPEN_TAG, + ]; + + }//end register() + + + /** + * Processes this test, when one of its tokens is encountered. + * + * @param \PHP_CodeSniffer\Files\File $phpcsFile The current file being scanned. + * @param int $stackPtr The position of the current token in the + * stack passed in $tokens. + * + * @return void + */ + public function process(File $phpcsFile, $stackPtr) + { + if ($this->tabWidth === null) { + if (isset($phpcsFile->config->tabWidth) === false || $phpcsFile->config->tabWidth === 0) { + // We have no idea how wide tabs are, so assume 4 spaces for fixing. + $this->tabWidth = 4; + } else { + $this->tabWidth = $phpcsFile->config->tabWidth; + } + } + + $tokens = $phpcsFile->getTokens(); + + // If it's an inline comment, return. + if (substr($tokens[$stackPtr]['content'], 0, 2) !== '/*') { + return; + } + + // If this is a function/class/interface doc block comment, skip it. + // We are only interested in inline doc block comments. + if ($tokens[$stackPtr]['code'] === T_DOC_COMMENT_OPEN_TAG) { + $nextToken = $stackPtr; + do { + $nextToken = $phpcsFile->findNext(Tokens::$emptyTokens, ($nextToken + 1), null, true); + if ($tokens[$nextToken]['code'] === T_ATTRIBUTE) { + $nextToken = $tokens[$nextToken]['attribute_closer']; + continue; + } + + break; + } while (true); + + $ignore = [ + T_CLASS => true, + T_INTERFACE => true, + T_TRAIT => true, + T_FUNCTION => true, + T_PUBLIC => true, + T_PRIVATE => true, + T_FINAL => true, + T_PROTECTED => true, + T_STATIC => true, + T_ABSTRACT => true, + T_CONST => true, + T_VAR => true, + ]; + if (isset($ignore[$tokens[$nextToken]['code']]) === true) { + return; + } + + $prevToken = $phpcsFile->findPrevious(Tokens::$emptyTokens, ($stackPtr - 1), null, true); + if ($tokens[$prevToken]['code'] === T_OPEN_TAG) { + return; + } + + $error = 'Block comments must be started with /*'; + $fix = $phpcsFile->addFixableError($error, $stackPtr, 'WrongStart'); + if ($fix === true) { + $phpcsFile->fixer->replaceToken($stackPtr, '/*'); + } + + $end = $tokens[$stackPtr]['comment_closer']; + if ($tokens[$end]['content'] !== '*/') { + $error = 'Block comments must be ended with */'; + $fix = $phpcsFile->addFixableError($error, $end, 'WrongEnd'); + if ($fix === true) { + $phpcsFile->fixer->replaceToken($end, '*/'); + } + } + + return; + }//end if + + $commentLines = [$stackPtr]; + $nextComment = $stackPtr; + $lastLine = $tokens[$stackPtr]['line']; + $commentString = $tokens[$stackPtr]['content']; + + // Construct the comment into an array. + while (($nextComment = $phpcsFile->findNext(T_WHITESPACE, ($nextComment + 1), null, true)) !== false) { + if ($tokens[$nextComment]['code'] !== $tokens[$stackPtr]['code'] + && isset(Tokens::$phpcsCommentTokens[$tokens[$nextComment]['code']]) === false + ) { + // Found the next bit of code. + break; + } + + if (($tokens[$nextComment]['line'] - 1) !== $lastLine) { + // Not part of the block. + break; + } + + $lastLine = $tokens[$nextComment]['line']; + $commentLines[] = $nextComment; + $commentString .= $tokens[$nextComment]['content']; + if ($tokens[$nextComment]['code'] === T_DOC_COMMENT_CLOSE_TAG + || substr($tokens[$nextComment]['content'], -2) === '*/' + ) { + break; + } + }//end while + + $commentText = str_replace($phpcsFile->eolChar, '', $commentString); + $commentText = trim($commentText, "/* \t"); + if ($commentText === '') { + $error = 'Empty block comment not allowed'; + $fix = $phpcsFile->addFixableError($error, $stackPtr, 'Empty'); + if ($fix === true) { + $phpcsFile->fixer->beginChangeset(); + $phpcsFile->fixer->replaceToken($stackPtr, ''); + $lastToken = array_pop($commentLines); + for ($i = ($stackPtr + 1); $i <= $lastToken; $i++) { + $phpcsFile->fixer->replaceToken($i, ''); + } + + $phpcsFile->fixer->endChangeset(); + } + + return; + } + + if (count($commentLines) === 1) { + $error = 'Single line block comment not allowed; use inline ("// text") comment instead'; + + // Only fix comments when they are the last token on a line. + $nextNonEmpty = $phpcsFile->findNext(Tokens::$emptyTokens, ($stackPtr + 1), null, true); + if ($tokens[$stackPtr]['line'] !== $tokens[$nextNonEmpty]['line']) { + $fix = $phpcsFile->addFixableError($error, $stackPtr, 'SingleLine'); + if ($fix === true) { + $comment = '// '.$commentText.$phpcsFile->eolChar; + $phpcsFile->fixer->replaceToken($stackPtr, $comment); + } + } else { + $phpcsFile->addError($error, $stackPtr, 'SingleLine'); + } + + return; + } + + $content = trim($tokens[$stackPtr]['content']); + if ($content !== '/*' && $content !== '/**') { + $error = 'Block comment text must start on a new line'; + $fix = $phpcsFile->addFixableError($error, $stackPtr, 'NoNewLine'); + if ($fix === true) { + $indent = ''; + if ($tokens[($stackPtr - 1)]['code'] === T_WHITESPACE) { + if (isset($tokens[($stackPtr - 1)]['orig_content']) === true) { + $indent = $tokens[($stackPtr - 1)]['orig_content']; + } else { + $indent = $tokens[($stackPtr - 1)]['content']; + } + } + + $comment = preg_replace( + '/^(\s*\/\*\*?)/', + '$1'.$phpcsFile->eolChar.$indent, + $tokens[$stackPtr]['content'], + 1 + ); + $phpcsFile->fixer->replaceToken($stackPtr, $comment); + } + + return; + }//end if + + $starColumn = $tokens[$stackPtr]['column']; + $hasStars = false; + + // Make sure first line isn't blank. + if (trim($tokens[$commentLines[1]]['content']) === '') { + $error = 'Empty line not allowed at start of comment'; + $fix = $phpcsFile->addFixableError($error, $commentLines[1], 'HasEmptyLine'); + if ($fix === true) { + $phpcsFile->fixer->replaceToken($commentLines[1], ''); + } + } else { + // Check indentation of first line. + $content = $tokens[$commentLines[1]]['content']; + $commentText = ltrim($content); + $leadingSpace = (strlen($content) - strlen($commentText)); + + $expected = ($starColumn + 3); + if ($commentText[0] === '*') { + $expected = $starColumn; + $hasStars = true; + } + + if ($leadingSpace !== $expected) { + $expectedTxt = $expected.' space'; + if ($expected !== 1) { + $expectedTxt .= 's'; + } + + $data = [ + $expectedTxt, + $leadingSpace, + ]; + + $error = 'First line of comment not aligned correctly; expected %s but found %s'; + $fix = $phpcsFile->addFixableError($error, $commentLines[1], 'FirstLineIndent', $data); + if ($fix === true) { + if (isset($tokens[$commentLines[1]]['orig_content']) === true + && $tokens[$commentLines[1]]['orig_content'][0] === "\t" + ) { + // Line is indented using tabs. + $padding = str_repeat("\t", floor($expected / $this->tabWidth)); + $padding .= str_repeat(' ', ($expected % $this->tabWidth)); + } else { + $padding = str_repeat(' ', $expected); + } + + $phpcsFile->fixer->replaceToken($commentLines[1], $padding.$commentText); + } + }//end if + + if (preg_match('/^\p{Ll}/u', $commentText) === 1) { + $error = 'Block comments must start with a capital letter'; + $phpcsFile->addError($error, $commentLines[1], 'NoCapital'); + } + }//end if + + // Check that each line of the comment is indented past the star. + foreach ($commentLines as $line) { + // First and last lines (comment opener and closer) are handled separately. + if ($line === $commentLines[(count($commentLines) - 1)] || $line === $commentLines[0]) { + continue; + } + + // First comment line was handled above. + if ($line === $commentLines[1]) { + continue; + } + + // If it's empty, continue. + if (trim($tokens[$line]['content']) === '') { + continue; + } + + $commentText = ltrim($tokens[$line]['content']); + $leadingSpace = (strlen($tokens[$line]['content']) - strlen($commentText)); + + $expected = ($starColumn + 3); + if ($commentText[0] === '*') { + $expected = $starColumn; + $hasStars = true; + } + + if ($leadingSpace < $expected) { + $expectedTxt = $expected.' space'; + if ($expected !== 1) { + $expectedTxt .= 's'; + } + + $data = [ + $expectedTxt, + $leadingSpace, + ]; + + $error = 'Comment line indented incorrectly; expected at least %s but found %s'; + $fix = $phpcsFile->addFixableError($error, $line, 'LineIndent', $data); + if ($fix === true) { + if (isset($tokens[$line]['orig_content']) === true + && $tokens[$line]['orig_content'][0] === "\t" + ) { + // Line is indented using tabs. + $padding = str_repeat("\t", floor($expected / $this->tabWidth)); + $padding .= str_repeat(' ', ($expected % $this->tabWidth)); + } else { + $padding = str_repeat(' ', $expected); + } + + $phpcsFile->fixer->replaceToken($line, $padding.$commentText); + } + }//end if + }//end foreach + + // Finally, test the last line is correct. + $lastIndex = (count($commentLines) - 1); + $content = $tokens[$commentLines[$lastIndex]]['content']; + $commentText = ltrim($content); + if ($commentText !== '*/' && $commentText !== '**/') { + $error = 'Comment closer must be on a new line'; + $phpcsFile->addError($error, $commentLines[$lastIndex], 'CloserSameLine'); + } else { + $leadingSpace = (strlen($content) - strlen($commentText)); + + $expected = ($starColumn - 1); + if ($hasStars === true) { + $expected = $starColumn; + } + + if ($leadingSpace !== $expected) { + $expectedTxt = $expected.' space'; + if ($expected !== 1) { + $expectedTxt .= 's'; + } + + $data = [ + $expectedTxt, + $leadingSpace, + ]; + + $error = 'Last line of comment aligned incorrectly; expected %s but found %s'; + $fix = $phpcsFile->addFixableError($error, $commentLines[$lastIndex], 'LastLineIndent', $data); + if ($fix === true) { + if (isset($tokens[$line]['orig_content']) === true + && $tokens[$line]['orig_content'][0] === "\t" + ) { + // Line is indented using tabs. + $padding = str_repeat("\t", floor($expected / $this->tabWidth)); + $padding .= str_repeat(' ', ($expected % $this->tabWidth)); + } else { + $padding = str_repeat(' ', $expected); + } + + $phpcsFile->fixer->replaceToken($commentLines[$lastIndex], $padding.$commentText); + } + }//end if + }//end if + + // Check that the lines before and after this comment are blank. + $contentBefore = $phpcsFile->findPrevious(T_WHITESPACE, ($stackPtr - 1), null, true); + if ((isset($tokens[$contentBefore]['scope_closer']) === true + && $tokens[$contentBefore]['scope_opener'] === $contentBefore) + || $tokens[$contentBefore]['code'] === T_OPEN_TAG + || $tokens[$contentBefore]['code'] === T_OPEN_TAG_WITH_ECHO + ) { + if (($tokens[$stackPtr]['line'] - $tokens[$contentBefore]['line']) !== 1) { + $error = 'Empty line not required before block comment'; + $phpcsFile->addError($error, $stackPtr, 'HasEmptyLineBefore'); + } + } else { + if (($tokens[$stackPtr]['line'] - $tokens[$contentBefore]['line']) < 2) { + $error = 'Empty line required before block comment'; + $phpcsFile->addError($error, $stackPtr, 'NoEmptyLineBefore'); + } + } + + $commentCloser = $commentLines[$lastIndex]; + $contentAfter = $phpcsFile->findNext(T_WHITESPACE, ($commentCloser + 1), null, true); + if ($contentAfter !== false && ($tokens[$contentAfter]['line'] - $tokens[$commentCloser]['line']) < 2) { + $error = 'Empty line required after block comment'; + $phpcsFile->addError($error, $commentCloser, 'NoEmptyLineAfter'); + } + + }//end process() + + +}//end class diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Sniffs/Commenting/ClassCommentSniff.php b/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Sniffs/Commenting/ClassCommentSniff.php new file mode 100644 index 00000000..0da4ef24 --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Sniffs/Commenting/ClassCommentSniff.php @@ -0,0 +1,106 @@ + + *
  • A class doc comment exists.
  • + *
  • The comment uses the correct docblock style.
  • + *
  • There are no blank lines after the class comment.
  • + *
  • No tags are used in the docblock.
  • + * + * + * @author Greg Sherwood + * @copyright 2006-2015 Squiz Pty Ltd (ABN 77 084 670 600) + * @license https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence + */ + +namespace PHP_CodeSniffer\Standards\Squiz\Sniffs\Commenting; + +use PHP_CodeSniffer\Files\File; +use PHP_CodeSniffer\Sniffs\Sniff; +use PHP_CodeSniffer\Util\Tokens; + +class ClassCommentSniff implements Sniff +{ + + + /** + * Returns an array of tokens this test wants to listen for. + * + * @return array + */ + public function register() + { + return [T_CLASS]; + + }//end register() + + + /** + * Processes this test, when one of its tokens is encountered. + * + * @param \PHP_CodeSniffer\Files\File $phpcsFile The file being scanned. + * @param int $stackPtr The position of the current token + * in the stack passed in $tokens. + * + * @return void + */ + public function process(File $phpcsFile, $stackPtr) + { + $tokens = $phpcsFile->getTokens(); + $find = Tokens::$methodPrefixes; + $find[T_WHITESPACE] = T_WHITESPACE; + + $previousContent = null; + for ($commentEnd = ($stackPtr - 1); $commentEnd >= 0; $commentEnd--) { + if (isset($find[$tokens[$commentEnd]['code']]) === true) { + continue; + } + + if ($previousContent === null) { + $previousContent = $commentEnd; + } + + if ($tokens[$commentEnd]['code'] === T_ATTRIBUTE_END + && isset($tokens[$commentEnd]['attribute_opener']) === true + ) { + $commentEnd = $tokens[$commentEnd]['attribute_opener']; + continue; + } + + break; + } + + if ($tokens[$commentEnd]['code'] !== T_DOC_COMMENT_CLOSE_TAG + && $tokens[$commentEnd]['code'] !== T_COMMENT + ) { + $class = $phpcsFile->getDeclarationName($stackPtr); + $phpcsFile->addError('Missing doc comment for class %s', $stackPtr, 'Missing', [$class]); + $phpcsFile->recordMetric($stackPtr, 'Class has doc comment', 'no'); + return; + } + + $phpcsFile->recordMetric($stackPtr, 'Class has doc comment', 'yes'); + + if ($tokens[$commentEnd]['code'] === T_COMMENT) { + $phpcsFile->addError('You must use "/**" style comments for a class comment', $stackPtr, 'WrongStyle'); + return; + } + + if ($tokens[$previousContent]['line'] !== ($tokens[$stackPtr]['line'] - 1)) { + $error = 'There must be no blank lines after the class comment'; + $phpcsFile->addError($error, $commentEnd, 'SpacingAfter'); + } + + $commentStart = $tokens[$commentEnd]['comment_opener']; + foreach ($tokens[$commentStart]['comment_tags'] as $tag) { + $error = '%s tag is not allowed in class comment'; + $data = [$tokens[$tag]['content']]; + $phpcsFile->addWarning($error, $tag, 'TagNotAllowed', $data); + } + + }//end process() + + +}//end class diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Sniffs/Commenting/ClosingDeclarationCommentSniff.php b/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Sniffs/Commenting/ClosingDeclarationCommentSniff.php new file mode 100644 index 00000000..6ab6280f --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Sniffs/Commenting/ClosingDeclarationCommentSniff.php @@ -0,0 +1,129 @@ + + * @copyright 2006-2015 Squiz Pty Ltd (ABN 77 084 670 600) + * @license https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence + */ + +namespace PHP_CodeSniffer\Standards\Squiz\Sniffs\Commenting; + +use PHP_CodeSniffer\Files\File; +use PHP_CodeSniffer\Sniffs\Sniff; + +class ClosingDeclarationCommentSniff implements Sniff +{ + + + /** + * Returns an array of tokens this test wants to listen for. + * + * @return array + */ + public function register() + { + return [ + T_FUNCTION, + T_CLASS, + T_INTERFACE, + ]; + + }//end register() + + + /** + * Processes this test, when one of its tokens is encountered. + * + * @param \PHP_CodeSniffer\Files\File $phpcsFile The file being scanned. + * @param int $stackPtr The position of the current token in the + * stack passed in $tokens.. + * + * @return void + */ + public function process(File $phpcsFile, $stackPtr) + { + $tokens = $phpcsFile->getTokens(); + + if ($tokens[$stackPtr]['code'] === T_FUNCTION) { + $methodProps = $phpcsFile->getMethodProperties($stackPtr); + + // Abstract methods do not require a closing comment. + if ($methodProps['is_abstract'] === true) { + return; + } + + // If this function is in an interface then we don't require + // a closing comment. + if ($phpcsFile->hasCondition($stackPtr, T_INTERFACE) === true) { + return; + } + + if (isset($tokens[$stackPtr]['scope_closer']) === false) { + $error = 'Possible parse error: non-abstract method defined as abstract'; + $phpcsFile->addWarning($error, $stackPtr, 'Abstract'); + return; + } + + $decName = $phpcsFile->getDeclarationName($stackPtr); + $comment = '//end '.$decName.'()'; + } else if ($tokens[$stackPtr]['code'] === T_CLASS) { + $comment = '//end class'; + } else { + $comment = '//end interface'; + }//end if + + if (isset($tokens[$stackPtr]['scope_closer']) === false) { + $error = 'Possible parse error: %s missing opening or closing brace'; + $data = [$tokens[$stackPtr]['content']]; + $phpcsFile->addWarning($error, $stackPtr, 'MissingBrace', $data); + return; + } + + $closingBracket = $tokens[$stackPtr]['scope_closer']; + + if ($closingBracket === null) { + // Possible inline structure. Other tests will handle it. + return; + } + + $data = [$comment]; + if (isset($tokens[($closingBracket + 1)]) === false || $tokens[($closingBracket + 1)]['code'] !== T_COMMENT) { + $next = $phpcsFile->findNext(T_WHITESPACE, ($closingBracket + 1), null, true); + if (rtrim($tokens[$next]['content']) === $comment) { + // The comment isn't really missing; it is just in the wrong place. + $fix = $phpcsFile->addFixableError('Expected %s directly after closing brace', $closingBracket, 'Misplaced', $data); + if ($fix === true) { + $phpcsFile->fixer->beginChangeset(); + for ($i = ($closingBracket + 1); $i < $next; $i++) { + $phpcsFile->fixer->replaceToken($i, ''); + } + + // Just in case, because indentation fixes can add indents onto + // these comments and cause us to be unable to fix them. + $phpcsFile->fixer->replaceToken($next, $comment.$phpcsFile->eolChar); + $phpcsFile->fixer->endChangeset(); + } + } else { + $fix = $phpcsFile->addFixableError('Expected %s', $closingBracket, 'Missing', $data); + if ($fix === true) { + $phpcsFile->fixer->replaceToken($closingBracket, '}'.$comment.$phpcsFile->eolChar); + } + } + + return; + }//end if + + if (rtrim($tokens[($closingBracket + 1)]['content']) !== $comment) { + $fix = $phpcsFile->addFixableError('Expected %s', $closingBracket, 'Incorrect', $data); + if ($fix === true) { + $phpcsFile->fixer->replaceToken(($closingBracket + 1), $comment.$phpcsFile->eolChar); + } + + return; + } + + }//end process() + + +}//end class diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Sniffs/Commenting/DocCommentAlignmentSniff.php b/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Sniffs/Commenting/DocCommentAlignmentSniff.php new file mode 100644 index 00000000..2624bc22 --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Sniffs/Commenting/DocCommentAlignmentSniff.php @@ -0,0 +1,158 @@ + + * @copyright 2006-2015 Squiz Pty Ltd (ABN 77 084 670 600) + * @license https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence + */ + +namespace PHP_CodeSniffer\Standards\Squiz\Sniffs\Commenting; + +use PHP_CodeSniffer\Files\File; +use PHP_CodeSniffer\Sniffs\Sniff; +use PHP_CodeSniffer\Util\Tokens; + +class DocCommentAlignmentSniff implements Sniff +{ + + /** + * A list of tokenizers this sniff supports. + * + * @var array + */ + public $supportedTokenizers = [ + 'PHP', + 'JS', + ]; + + + /** + * Returns an array of tokens this test wants to listen for. + * + * @return array + */ + public function register() + { + return [T_DOC_COMMENT_OPEN_TAG]; + + }//end register() + + + /** + * Processes this test, when one of its tokens is encountered. + * + * @param \PHP_CodeSniffer\Files\File $phpcsFile The file being scanned. + * @param int $stackPtr The position of the current token + * in the stack passed in $tokens. + * + * @return void + */ + public function process(File $phpcsFile, $stackPtr) + { + $tokens = $phpcsFile->getTokens(); + + // We are only interested in function/class/interface doc block comments. + $ignore = Tokens::$emptyTokens; + if ($phpcsFile->tokenizerType === 'JS') { + $ignore[] = T_EQUAL; + $ignore[] = T_STRING; + $ignore[] = T_OBJECT_OPERATOR; + } + + $nextToken = $phpcsFile->findNext($ignore, ($stackPtr + 1), null, true); + $ignore = [ + T_CLASS => true, + T_INTERFACE => true, + T_FUNCTION => true, + T_PUBLIC => true, + T_PRIVATE => true, + T_PROTECTED => true, + T_STATIC => true, + T_ABSTRACT => true, + T_PROPERTY => true, + T_OBJECT => true, + T_PROTOTYPE => true, + T_VAR => true, + ]; + + if ($nextToken === false || isset($ignore[$tokens[$nextToken]['code']]) === false) { + // Could be a file comment. + $prevToken = $phpcsFile->findPrevious(Tokens::$emptyTokens, ($stackPtr - 1), null, true); + if ($tokens[$prevToken]['code'] !== T_OPEN_TAG) { + return; + } + } + + // There must be one space after each star (unless it is an empty comment line) + // and all the stars must be aligned correctly. + $requiredColumn = ($tokens[$stackPtr]['column'] + 1); + $endComment = $tokens[$stackPtr]['comment_closer']; + for ($i = ($stackPtr + 1); $i <= $endComment; $i++) { + if ($tokens[$i]['code'] !== T_DOC_COMMENT_STAR + && $tokens[$i]['code'] !== T_DOC_COMMENT_CLOSE_TAG + ) { + continue; + } + + if ($tokens[$i]['code'] === T_DOC_COMMENT_CLOSE_TAG) { + if (trim($tokens[$i]['content']) === '') { + // Don't process an unfinished docblock close tag during live coding. + continue; + } + + // Can't process the close tag if it is not the first thing on the line. + $prev = $phpcsFile->findPrevious(T_DOC_COMMENT_WHITESPACE, ($i - 1), $stackPtr, true); + if ($tokens[$prev]['line'] === $tokens[$i]['line']) { + continue; + } + } + + if ($tokens[$i]['column'] !== $requiredColumn) { + $error = 'Expected %s space(s) before asterisk; %s found'; + $data = [ + ($requiredColumn - 1), + ($tokens[$i]['column'] - 1), + ]; + $fix = $phpcsFile->addFixableError($error, $i, 'SpaceBeforeStar', $data); + if ($fix === true) { + $padding = str_repeat(' ', ($requiredColumn - 1)); + if ($tokens[$i]['column'] === 1) { + $phpcsFile->fixer->addContentBefore($i, $padding); + } else { + $phpcsFile->fixer->replaceToken(($i - 1), $padding); + } + } + } + + if ($tokens[$i]['code'] !== T_DOC_COMMENT_STAR) { + continue; + } + + if ($tokens[($i + 2)]['line'] !== $tokens[$i]['line']) { + // Line is empty. + continue; + } + + if ($tokens[($i + 1)]['code'] !== T_DOC_COMMENT_WHITESPACE) { + $error = 'Expected 1 space after asterisk; 0 found'; + $fix = $phpcsFile->addFixableError($error, $i, 'NoSpaceAfterStar'); + if ($fix === true) { + $phpcsFile->fixer->addContent($i, ' '); + } + } else if ($tokens[($i + 2)]['code'] === T_DOC_COMMENT_TAG + && $tokens[($i + 1)]['content'] !== ' ' + ) { + $error = 'Expected 1 space after asterisk; %s found'; + $data = [$tokens[($i + 1)]['length']]; + $fix = $phpcsFile->addFixableError($error, $i, 'SpaceAfterStar', $data); + if ($fix === true) { + $phpcsFile->fixer->replaceToken(($i + 1), ' '); + } + } + }//end for + + }//end process() + + +}//end class diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Sniffs/Commenting/EmptyCatchCommentSniff.php b/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Sniffs/Commenting/EmptyCatchCommentSniff.php new file mode 100644 index 00000000..4fc25219 --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Sniffs/Commenting/EmptyCatchCommentSniff.php @@ -0,0 +1,55 @@ + + * @copyright 2006-2015 Squiz Pty Ltd (ABN 77 084 670 600) + * @license https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence + */ + +namespace PHP_CodeSniffer\Standards\Squiz\Sniffs\Commenting; + +use PHP_CodeSniffer\Files\File; +use PHP_CodeSniffer\Sniffs\Sniff; + +class EmptyCatchCommentSniff implements Sniff +{ + + + /** + * Returns an array of tokens this test wants to listen for. + * + * @return array + */ + public function register() + { + return [T_CATCH]; + + }//end register() + + + /** + * Processes this test, when one of its tokens is encountered. + * + * @param \PHP_CodeSniffer\Files\File $phpcsFile All the tokens found in the document. + * @param int $stackPtr The position of the current token in the + * stack passed in $tokens. + * + * @return void + */ + public function process(File $phpcsFile, $stackPtr) + { + $tokens = $phpcsFile->getTokens(); + + $scopeStart = $tokens[$stackPtr]['scope_opener']; + $firstContent = $phpcsFile->findNext(T_WHITESPACE, ($scopeStart + 1), $tokens[$stackPtr]['scope_closer'], true); + + if ($firstContent === false) { + $error = 'Empty CATCH statement must have a comment to explain why the exception is not handled'; + $phpcsFile->addError($error, $scopeStart, 'Missing'); + } + + }//end process() + + +}//end class diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Sniffs/Commenting/FileCommentSniff.php b/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Sniffs/Commenting/FileCommentSniff.php new file mode 100644 index 00000000..26858547 --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Sniffs/Commenting/FileCommentSniff.php @@ -0,0 +1,226 @@ + + * @copyright 2006-2015 Squiz Pty Ltd (ABN 77 084 670 600) + * @license https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence + */ + +namespace PHP_CodeSniffer\Standards\Squiz\Sniffs\Commenting; + +use PHP_CodeSniffer\Files\File; +use PHP_CodeSniffer\Sniffs\Sniff; + +class FileCommentSniff implements Sniff +{ + + /** + * A list of tokenizers this sniff supports. + * + * @var array + */ + public $supportedTokenizers = [ + 'PHP', + 'JS', + ]; + + + /** + * Returns an array of tokens this test wants to listen for. + * + * @return array + */ + public function register() + { + return [T_OPEN_TAG]; + + }//end register() + + + /** + * Processes this test, when one of its tokens is encountered. + * + * @param \PHP_CodeSniffer\Files\File $phpcsFile The file being scanned. + * @param int $stackPtr The position of the current token + * in the stack passed in $tokens. + * + * @return int + */ + public function process(File $phpcsFile, $stackPtr) + { + $tokens = $phpcsFile->getTokens(); + $commentStart = $phpcsFile->findNext(T_WHITESPACE, ($stackPtr + 1), null, true); + + if ($tokens[$commentStart]['code'] === T_COMMENT) { + $phpcsFile->addError('You must use "/**" style comments for a file comment', $commentStart, 'WrongStyle'); + $phpcsFile->recordMetric($stackPtr, 'File has doc comment', 'yes'); + return ($phpcsFile->numTokens + 1); + } else if ($commentStart === false || $tokens[$commentStart]['code'] !== T_DOC_COMMENT_OPEN_TAG) { + $phpcsFile->addError('Missing file doc comment', $stackPtr, 'Missing'); + $phpcsFile->recordMetric($stackPtr, 'File has doc comment', 'no'); + return ($phpcsFile->numTokens + 1); + } + + if (isset($tokens[$commentStart]['comment_closer']) === false + || ($tokens[$tokens[$commentStart]['comment_closer']]['content'] === '' + && $tokens[$commentStart]['comment_closer'] === ($phpcsFile->numTokens - 1)) + ) { + // Don't process an unfinished file comment during live coding. + return ($phpcsFile->numTokens + 1); + } + + $commentEnd = $tokens[$commentStart]['comment_closer']; + + for ($nextToken = ($commentEnd + 1); $nextToken < $phpcsFile->numTokens; $nextToken++) { + if ($tokens[$nextToken]['code'] === T_WHITESPACE) { + continue; + } + + if ($tokens[$nextToken]['code'] === T_ATTRIBUTE + && isset($tokens[$nextToken]['attribute_closer']) === true + ) { + $nextToken = $tokens[$nextToken]['attribute_closer']; + continue; + } + + break; + } + + if ($nextToken === $phpcsFile->numTokens) { + $nextToken--; + } + + $ignore = [ + T_CLASS, + T_INTERFACE, + T_TRAIT, + T_FUNCTION, + T_CLOSURE, + T_PUBLIC, + T_PRIVATE, + T_PROTECTED, + T_FINAL, + T_STATIC, + T_ABSTRACT, + T_CONST, + T_PROPERTY, + T_INCLUDE, + T_INCLUDE_ONCE, + T_REQUIRE, + T_REQUIRE_ONCE, + ]; + + if (in_array($tokens[$nextToken]['code'], $ignore, true) === true) { + $phpcsFile->addError('Missing file doc comment', $stackPtr, 'Missing'); + $phpcsFile->recordMetric($stackPtr, 'File has doc comment', 'no'); + return ($phpcsFile->numTokens + 1); + } + + $phpcsFile->recordMetric($stackPtr, 'File has doc comment', 'yes'); + + // No blank line between the open tag and the file comment. + if ($tokens[$commentStart]['line'] > ($tokens[$stackPtr]['line'] + 1)) { + $error = 'There must be no blank lines before the file comment'; + $phpcsFile->addError($error, $stackPtr, 'SpacingAfterOpen'); + } + + // Exactly one blank line after the file comment. + $next = $phpcsFile->findNext(T_WHITESPACE, ($commentEnd + 1), null, true); + if ($next !== false && $tokens[$next]['line'] !== ($tokens[$commentEnd]['line'] + 2)) { + $error = 'There must be exactly one blank line after the file comment'; + $phpcsFile->addError($error, $commentEnd, 'SpacingAfterComment'); + } + + // Required tags in correct order. + $required = [ + '@package' => true, + '@subpackage' => true, + '@author' => true, + '@copyright' => true, + ]; + + $foundTags = []; + foreach ($tokens[$commentStart]['comment_tags'] as $tag) { + $name = $tokens[$tag]['content']; + $isRequired = isset($required[$name]); + + if ($isRequired === true && in_array($name, $foundTags, true) === true) { + $error = 'Only one %s tag is allowed in a file comment'; + $data = [$name]; + $phpcsFile->addError($error, $tag, 'Duplicate'.ucfirst(substr($name, 1)).'Tag', $data); + } + + $foundTags[] = $name; + + if ($isRequired === false) { + continue; + } + + $string = $phpcsFile->findNext(T_DOC_COMMENT_STRING, $tag, $commentEnd); + if ($string === false || $tokens[$string]['line'] !== $tokens[$tag]['line']) { + $error = 'Content missing for %s tag in file comment'; + $data = [$name]; + $phpcsFile->addError($error, $tag, 'Empty'.ucfirst(substr($name, 1)).'Tag', $data); + continue; + } + + if ($name === '@author') { + if ($tokens[$string]['content'] !== 'Squiz Pty Ltd ') { + $error = 'Expected "Squiz Pty Ltd " for author tag'; + $fix = $phpcsFile->addFixableError($error, $tag, 'IncorrectAuthor'); + if ($fix === true) { + $expected = 'Squiz Pty Ltd '; + $phpcsFile->fixer->replaceToken($string, $expected); + } + } + } else if ($name === '@copyright') { + if (preg_match('/^([0-9]{4})(-[0-9]{4})? (Squiz Pty Ltd \(ABN 77 084 670 600\))$/', $tokens[$string]['content']) === 0) { + $error = 'Expected "xxxx-xxxx Squiz Pty Ltd (ABN 77 084 670 600)" for copyright declaration'; + $fix = $phpcsFile->addFixableError($error, $tag, 'IncorrectCopyright'); + if ($fix === true) { + $matches = []; + preg_match('/^(([0-9]{4})(-[0-9]{4})?)?.*$/', $tokens[$string]['content'], $matches); + if (isset($matches[1]) === false) { + $matches[1] = date('Y'); + } + + $expected = $matches[1].' Squiz Pty Ltd (ABN 77 084 670 600)'; + $phpcsFile->fixer->replaceToken($string, $expected); + } + } + }//end if + }//end foreach + + // Check if the tags are in the correct position. + $pos = 0; + foreach ($required as $tag => $true) { + if (in_array($tag, $foundTags, true) === false) { + $error = 'Missing %s tag in file comment'; + $data = [$tag]; + $phpcsFile->addError($error, $commentEnd, 'Missing'.ucfirst(substr($tag, 1)).'Tag', $data); + } + + if (isset($foundTags[$pos]) === false) { + break; + } + + if ($foundTags[$pos] !== $tag) { + $error = 'The tag in position %s should be the %s tag'; + $data = [ + ($pos + 1), + $tag, + ]; + $phpcsFile->addError($error, $tokens[$commentStart]['comment_tags'][$pos], ucfirst(substr($tag, 1)).'TagOrder', $data); + } + + $pos++; + }//end foreach + + // Ignore the rest of the file. + return ($phpcsFile->numTokens + 1); + + }//end process() + + +}//end class diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Sniffs/Commenting/FunctionCommentSniff.php b/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Sniffs/Commenting/FunctionCommentSniff.php new file mode 100644 index 00000000..a23032e2 --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Sniffs/Commenting/FunctionCommentSniff.php @@ -0,0 +1,766 @@ + + * @copyright 2006-2015 Squiz Pty Ltd (ABN 77 084 670 600) + * @license https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence + */ + +namespace PHP_CodeSniffer\Standards\Squiz\Sniffs\Commenting; + +use PHP_CodeSniffer\Config; +use PHP_CodeSniffer\Files\File; +use PHP_CodeSniffer\Standards\PEAR\Sniffs\Commenting\FunctionCommentSniff as PEARFunctionCommentSniff; +use PHP_CodeSniffer\Util\Common; + +class FunctionCommentSniff extends PEARFunctionCommentSniff +{ + + /** + * Whether to skip inheritdoc comments. + * + * @var boolean + */ + public $skipIfInheritdoc = false; + + /** + * The current PHP version. + * + * @var integer + */ + private $phpVersion = null; + + + /** + * Process the return comment of this function comment. + * + * @param \PHP_CodeSniffer\Files\File $phpcsFile The file being scanned. + * @param int $stackPtr The position of the current token + * in the stack passed in $tokens. + * @param int $commentStart The position in the stack where the comment started. + * + * @return void + */ + protected function processReturn(File $phpcsFile, $stackPtr, $commentStart) + { + $tokens = $phpcsFile->getTokens(); + $return = null; + + if ($this->skipIfInheritdoc === true) { + if ($this->checkInheritdoc($phpcsFile, $stackPtr, $commentStart) === true) { + return; + } + } + + foreach ($tokens[$commentStart]['comment_tags'] as $tag) { + if ($tokens[$tag]['content'] === '@return') { + if ($return !== null) { + $error = 'Only 1 @return tag is allowed in a function comment'; + $phpcsFile->addError($error, $tag, 'DuplicateReturn'); + return; + } + + $return = $tag; + } + } + + // Skip constructor and destructor. + $methodName = $phpcsFile->getDeclarationName($stackPtr); + $isSpecialMethod = in_array($methodName, $this->specialMethods, true); + + if ($return !== null) { + $content = $tokens[($return + 2)]['content']; + if (empty($content) === true || $tokens[($return + 2)]['code'] !== T_DOC_COMMENT_STRING) { + $error = 'Return type missing for @return tag in function comment'; + $phpcsFile->addError($error, $return, 'MissingReturnType'); + } else { + // Support both a return type and a description. + preg_match('`^((?:\|?(?:array\([^\)]*\)|[\\\\a-z0-9\[\]]+))*)( .*)?`i', $content, $returnParts); + if (isset($returnParts[1]) === false) { + return; + } + + $returnType = $returnParts[1]; + + // Check return type (can be multiple, separated by '|'). + $typeNames = explode('|', $returnType); + $suggestedNames = []; + foreach ($typeNames as $i => $typeName) { + $suggestedName = Common::suggestType($typeName); + if (in_array($suggestedName, $suggestedNames, true) === false) { + $suggestedNames[] = $suggestedName; + } + } + + $suggestedType = implode('|', $suggestedNames); + if ($returnType !== $suggestedType) { + $error = 'Expected "%s" but found "%s" for function return type'; + $data = [ + $suggestedType, + $returnType, + ]; + $fix = $phpcsFile->addFixableError($error, $return, 'InvalidReturn', $data); + if ($fix === true) { + $replacement = $suggestedType; + if (empty($returnParts[2]) === false) { + $replacement .= $returnParts[2]; + } + + $phpcsFile->fixer->replaceToken(($return + 2), $replacement); + unset($replacement); + } + } + + // If the return type is void, make sure there is + // no return statement in the function. + if ($returnType === 'void') { + if (isset($tokens[$stackPtr]['scope_closer']) === true) { + $endToken = $tokens[$stackPtr]['scope_closer']; + for ($returnToken = $stackPtr; $returnToken < $endToken; $returnToken++) { + if ($tokens[$returnToken]['code'] === T_CLOSURE + || $tokens[$returnToken]['code'] === T_ANON_CLASS + ) { + $returnToken = $tokens[$returnToken]['scope_closer']; + continue; + } + + if ($tokens[$returnToken]['code'] === T_RETURN + || $tokens[$returnToken]['code'] === T_YIELD + || $tokens[$returnToken]['code'] === T_YIELD_FROM + ) { + break; + } + } + + if ($returnToken !== $endToken) { + // If the function is not returning anything, just + // exiting, then there is no problem. + $semicolon = $phpcsFile->findNext(T_WHITESPACE, ($returnToken + 1), null, true); + if ($tokens[$semicolon]['code'] !== T_SEMICOLON) { + $error = 'Function return type is void, but function contains return statement'; + $phpcsFile->addError($error, $return, 'InvalidReturnVoid'); + } + } + }//end if + } else if ($returnType !== 'mixed' && in_array('void', $typeNames, true) === false) { + // If return type is not void, there needs to be a return statement + // somewhere in the function that returns something. + if (isset($tokens[$stackPtr]['scope_closer']) === true) { + $endToken = $tokens[$stackPtr]['scope_closer']; + for ($returnToken = $stackPtr; $returnToken < $endToken; $returnToken++) { + if ($tokens[$returnToken]['code'] === T_CLOSURE + || $tokens[$returnToken]['code'] === T_ANON_CLASS + ) { + $returnToken = $tokens[$returnToken]['scope_closer']; + continue; + } + + if ($tokens[$returnToken]['code'] === T_RETURN + || $tokens[$returnToken]['code'] === T_YIELD + || $tokens[$returnToken]['code'] === T_YIELD_FROM + ) { + break; + } + } + + if ($returnToken === $endToken) { + $error = 'Function return type is not void, but function has no return statement'; + $phpcsFile->addError($error, $return, 'InvalidNoReturn'); + } else { + $semicolon = $phpcsFile->findNext(T_WHITESPACE, ($returnToken + 1), null, true); + if ($tokens[$semicolon]['code'] === T_SEMICOLON) { + $error = 'Function return type is not void, but function is returning void here'; + $phpcsFile->addError($error, $returnToken, 'InvalidReturnNotVoid'); + } + } + }//end if + }//end if + }//end if + } else { + if ($isSpecialMethod === true) { + return; + } + + $error = 'Missing @return tag in function comment'; + $phpcsFile->addError($error, $tokens[$commentStart]['comment_closer'], 'MissingReturn'); + }//end if + + }//end processReturn() + + + /** + * Process any throw tags that this function comment has. + * + * @param \PHP_CodeSniffer\Files\File $phpcsFile The file being scanned. + * @param int $stackPtr The position of the current token + * in the stack passed in $tokens. + * @param int $commentStart The position in the stack where the comment started. + * + * @return void + */ + protected function processThrows(File $phpcsFile, $stackPtr, $commentStart) + { + $tokens = $phpcsFile->getTokens(); + + if ($this->skipIfInheritdoc === true) { + if ($this->checkInheritdoc($phpcsFile, $stackPtr, $commentStart) === true) { + return; + } + } + + foreach ($tokens[$commentStart]['comment_tags'] as $pos => $tag) { + if ($tokens[$tag]['content'] !== '@throws') { + continue; + } + + $exception = null; + $comment = null; + if ($tokens[($tag + 2)]['code'] === T_DOC_COMMENT_STRING) { + $matches = []; + preg_match('/([^\s]+)(?:\s+(.*))?/', $tokens[($tag + 2)]['content'], $matches); + $exception = $matches[1]; + if (isset($matches[2]) === true && trim($matches[2]) !== '') { + $comment = $matches[2]; + } + } + + if ($exception === null) { + $error = 'Exception type and comment missing for @throws tag in function comment'; + $phpcsFile->addError($error, $tag, 'InvalidThrows'); + } else if ($comment === null) { + $error = 'Comment missing for @throws tag in function comment'; + $phpcsFile->addError($error, $tag, 'EmptyThrows'); + } else { + // Any strings until the next tag belong to this comment. + if (isset($tokens[$commentStart]['comment_tags'][($pos + 1)]) === true) { + $end = $tokens[$commentStart]['comment_tags'][($pos + 1)]; + } else { + $end = $tokens[$commentStart]['comment_closer']; + } + + for ($i = ($tag + 3); $i < $end; $i++) { + if ($tokens[$i]['code'] === T_DOC_COMMENT_STRING) { + $comment .= ' '.$tokens[$i]['content']; + } + } + + // Starts with a capital letter and ends with a fullstop. + $firstChar = $comment[0]; + if (strtoupper($firstChar) !== $firstChar) { + $error = '@throws tag comment must start with a capital letter'; + $phpcsFile->addError($error, ($tag + 2), 'ThrowsNotCapital'); + } + + $lastChar = substr($comment, -1); + if ($lastChar !== '.') { + $error = '@throws tag comment must end with a full stop'; + $phpcsFile->addError($error, ($tag + 2), 'ThrowsNoFullStop'); + } + }//end if + }//end foreach + + }//end processThrows() + + + /** + * Process the function parameter comments. + * + * @param \PHP_CodeSniffer\Files\File $phpcsFile The file being scanned. + * @param int $stackPtr The position of the current token + * in the stack passed in $tokens. + * @param int $commentStart The position in the stack where the comment started. + * + * @return void + */ + protected function processParams(File $phpcsFile, $stackPtr, $commentStart) + { + if ($this->phpVersion === null) { + $this->phpVersion = Config::getConfigData('php_version'); + if ($this->phpVersion === null) { + $this->phpVersion = PHP_VERSION_ID; + } + } + + $tokens = $phpcsFile->getTokens(); + + if ($this->skipIfInheritdoc === true) { + if ($this->checkInheritdoc($phpcsFile, $stackPtr, $commentStart) === true) { + return; + } + } + + $params = []; + $maxType = 0; + $maxVar = 0; + foreach ($tokens[$commentStart]['comment_tags'] as $pos => $tag) { + if ($tokens[$tag]['content'] !== '@param') { + continue; + } + + $type = ''; + $typeSpace = 0; + $var = ''; + $varSpace = 0; + $comment = ''; + $commentLines = []; + if ($tokens[($tag + 2)]['code'] === T_DOC_COMMENT_STRING) { + $matches = []; + preg_match('/([^$&.]+)(?:((?:\.\.\.)?(?:\$|&)[^\s]+)(?:(\s+)(.*))?)?/', $tokens[($tag + 2)]['content'], $matches); + + if (empty($matches) === false) { + $typeLen = strlen($matches[1]); + $type = trim($matches[1]); + $typeSpace = ($typeLen - strlen($type)); + $typeLen = strlen($type); + if ($typeLen > $maxType) { + $maxType = $typeLen; + } + } + + if (isset($matches[2]) === true) { + $var = $matches[2]; + $varLen = strlen($var); + if ($varLen > $maxVar) { + $maxVar = $varLen; + } + + if (isset($matches[4]) === true) { + $varSpace = strlen($matches[3]); + $comment = $matches[4]; + $commentLines[] = [ + 'comment' => $comment, + 'token' => ($tag + 2), + 'indent' => $varSpace, + ]; + + // Any strings until the next tag belong to this comment. + if (isset($tokens[$commentStart]['comment_tags'][($pos + 1)]) === true) { + $end = $tokens[$commentStart]['comment_tags'][($pos + 1)]; + } else { + $end = $tokens[$commentStart]['comment_closer']; + } + + for ($i = ($tag + 3); $i < $end; $i++) { + if ($tokens[$i]['code'] === T_DOC_COMMENT_STRING) { + $indent = 0; + if ($tokens[($i - 1)]['code'] === T_DOC_COMMENT_WHITESPACE) { + $indent = $tokens[($i - 1)]['length']; + } + + $comment .= ' '.$tokens[$i]['content']; + $commentLines[] = [ + 'comment' => $tokens[$i]['content'], + 'token' => $i, + 'indent' => $indent, + ]; + } + } + } else { + $error = 'Missing parameter comment'; + $phpcsFile->addError($error, $tag, 'MissingParamComment'); + $commentLines[] = ['comment' => '']; + }//end if + } else { + $error = 'Missing parameter name'; + $phpcsFile->addError($error, $tag, 'MissingParamName'); + }//end if + } else { + $error = 'Missing parameter type'; + $phpcsFile->addError($error, $tag, 'MissingParamType'); + }//end if + + $params[] = [ + 'tag' => $tag, + 'type' => $type, + 'var' => $var, + 'comment' => $comment, + 'commentLines' => $commentLines, + 'type_space' => $typeSpace, + 'var_space' => $varSpace, + ]; + }//end foreach + + $realParams = $phpcsFile->getMethodParameters($stackPtr); + $foundParams = []; + + // We want to use ... for all variable length arguments, so added + // this prefix to the variable name so comparisons are easier. + foreach ($realParams as $pos => $param) { + if ($param['variable_length'] === true) { + $realParams[$pos]['name'] = '...'.$realParams[$pos]['name']; + } + } + + foreach ($params as $pos => $param) { + // If the type is empty, the whole line is empty. + if ($param['type'] === '') { + continue; + } + + // Check the param type value. + $typeNames = explode('|', $param['type']); + $suggestedTypeNames = []; + + foreach ($typeNames as $typeName) { + // Strip nullable operator. + if ($typeName[0] === '?') { + $typeName = substr($typeName, 1); + } + + $suggestedName = Common::suggestType($typeName); + $suggestedTypeNames[] = $suggestedName; + + if (count($typeNames) > 1) { + continue; + } + + // Check type hint for array and custom type. + $suggestedTypeHint = ''; + if (strpos($suggestedName, 'array') !== false || substr($suggestedName, -2) === '[]') { + $suggestedTypeHint = 'array'; + } else if (strpos($suggestedName, 'callable') !== false) { + $suggestedTypeHint = 'callable'; + } else if (strpos($suggestedName, 'callback') !== false) { + $suggestedTypeHint = 'callable'; + } else if (in_array($suggestedName, Common::$allowedTypes, true) === false) { + $suggestedTypeHint = $suggestedName; + } + + if ($this->phpVersion >= 70000) { + if ($suggestedName === 'string') { + $suggestedTypeHint = 'string'; + } else if ($suggestedName === 'int' || $suggestedName === 'integer') { + $suggestedTypeHint = 'int'; + } else if ($suggestedName === 'float') { + $suggestedTypeHint = 'float'; + } else if ($suggestedName === 'bool' || $suggestedName === 'boolean') { + $suggestedTypeHint = 'bool'; + } + } + + if ($this->phpVersion >= 70200) { + if ($suggestedName === 'object') { + $suggestedTypeHint = 'object'; + } + } + + if ($this->phpVersion >= 80000) { + if ($suggestedName === 'mixed') { + $suggestedTypeHint = 'mixed'; + } + } + + if ($suggestedTypeHint !== '' && isset($realParams[$pos]) === true) { + $typeHint = $realParams[$pos]['type_hint']; + + // Remove namespace prefixes when comparing. + $compareTypeHint = substr($suggestedTypeHint, (strlen($typeHint) * -1)); + + if ($typeHint === '') { + $error = 'Type hint "%s" missing for %s'; + $data = [ + $suggestedTypeHint, + $param['var'], + ]; + + $errorCode = 'TypeHintMissing'; + if ($suggestedTypeHint === 'string' + || $suggestedTypeHint === 'int' + || $suggestedTypeHint === 'float' + || $suggestedTypeHint === 'bool' + ) { + $errorCode = 'Scalar'.$errorCode; + } + + $phpcsFile->addError($error, $stackPtr, $errorCode, $data); + } else if ($typeHint !== $compareTypeHint && $typeHint !== '?'.$compareTypeHint) { + $error = 'Expected type hint "%s"; found "%s" for %s'; + $data = [ + $suggestedTypeHint, + $typeHint, + $param['var'], + ]; + $phpcsFile->addError($error, $stackPtr, 'IncorrectTypeHint', $data); + }//end if + } else if ($suggestedTypeHint === '' && isset($realParams[$pos]) === true) { + $typeHint = $realParams[$pos]['type_hint']; + if ($typeHint !== '') { + $error = 'Unknown type hint "%s" found for %s'; + $data = [ + $typeHint, + $param['var'], + ]; + $phpcsFile->addError($error, $stackPtr, 'InvalidTypeHint', $data); + } + }//end if + }//end foreach + + $suggestedType = implode('|', $suggestedTypeNames); + if ($param['type'] !== $suggestedType) { + $error = 'Expected "%s" but found "%s" for parameter type'; + $data = [ + $suggestedType, + $param['type'], + ]; + + $fix = $phpcsFile->addFixableError($error, $param['tag'], 'IncorrectParamVarName', $data); + if ($fix === true) { + $phpcsFile->fixer->beginChangeset(); + + $content = $suggestedType; + $content .= str_repeat(' ', $param['type_space']); + $content .= $param['var']; + $content .= str_repeat(' ', $param['var_space']); + if (isset($param['commentLines'][0]) === true) { + $content .= $param['commentLines'][0]['comment']; + } + + $phpcsFile->fixer->replaceToken(($param['tag'] + 2), $content); + + // Fix up the indent of additional comment lines. + foreach ($param['commentLines'] as $lineNum => $line) { + if ($lineNum === 0 + || $param['commentLines'][$lineNum]['indent'] === 0 + ) { + continue; + } + + $diff = (strlen($param['type']) - strlen($suggestedType)); + $newIndent = ($param['commentLines'][$lineNum]['indent'] - $diff); + $phpcsFile->fixer->replaceToken( + ($param['commentLines'][$lineNum]['token'] - 1), + str_repeat(' ', $newIndent) + ); + } + + $phpcsFile->fixer->endChangeset(); + }//end if + }//end if + + if ($param['var'] === '') { + continue; + } + + $foundParams[] = $param['var']; + + // Check number of spaces after the type. + $this->checkSpacingAfterParamType($phpcsFile, $param, $maxType); + + // Make sure the param name is correct. + if (isset($realParams[$pos]) === true) { + $realName = $realParams[$pos]['name']; + if ($realName !== $param['var']) { + $code = 'ParamNameNoMatch'; + $data = [ + $param['var'], + $realName, + ]; + + $error = 'Doc comment for parameter %s does not match '; + if (strtolower($param['var']) === strtolower($realName)) { + $error .= 'case of '; + $code = 'ParamNameNoCaseMatch'; + } + + $error .= 'actual variable name %s'; + + $phpcsFile->addError($error, $param['tag'], $code, $data); + } + } else if (substr($param['var'], -4) !== ',...') { + // We must have an extra parameter comment. + $error = 'Superfluous parameter comment'; + $phpcsFile->addError($error, $param['tag'], 'ExtraParamComment'); + }//end if + + if ($param['comment'] === '') { + continue; + } + + // Check number of spaces after the var name. + $this->checkSpacingAfterParamName($phpcsFile, $param, $maxVar); + + // Param comments must start with a capital letter and end with a full stop. + if (preg_match('/^(\p{Ll}|\P{L})/u', $param['comment']) === 1) { + $error = 'Parameter comment must start with a capital letter'; + $phpcsFile->addError($error, $param['tag'], 'ParamCommentNotCapital'); + } + + $lastChar = substr($param['comment'], -1); + if ($lastChar !== '.') { + $error = 'Parameter comment must end with a full stop'; + $phpcsFile->addError($error, $param['tag'], 'ParamCommentFullStop'); + } + }//end foreach + + $realNames = []; + foreach ($realParams as $realParam) { + $realNames[] = $realParam['name']; + } + + // Report missing comments. + $diff = array_diff($realNames, $foundParams); + foreach ($diff as $neededParam) { + $error = 'Doc comment for parameter "%s" missing'; + $data = [$neededParam]; + $phpcsFile->addError($error, $commentStart, 'MissingParamTag', $data); + } + + }//end processParams() + + + /** + * Check the spacing after the type of a parameter. + * + * @param \PHP_CodeSniffer\Files\File $phpcsFile The file being scanned. + * @param array $param The parameter to be checked. + * @param int $maxType The maxlength of the longest parameter type. + * @param int $spacing The number of spaces to add after the type. + * + * @return void + */ + protected function checkSpacingAfterParamType(File $phpcsFile, $param, $maxType, $spacing=1) + { + // Check number of spaces after the type. + $spaces = ($maxType - strlen($param['type']) + $spacing); + if ($param['type_space'] !== $spaces) { + $error = 'Expected %s spaces after parameter type; %s found'; + $data = [ + $spaces, + $param['type_space'], + ]; + + $fix = $phpcsFile->addFixableError($error, $param['tag'], 'SpacingAfterParamType', $data); + if ($fix === true) { + $phpcsFile->fixer->beginChangeset(); + + $content = $param['type']; + $content .= str_repeat(' ', $spaces); + $content .= $param['var']; + $content .= str_repeat(' ', $param['var_space']); + $content .= $param['commentLines'][0]['comment']; + $phpcsFile->fixer->replaceToken(($param['tag'] + 2), $content); + + // Fix up the indent of additional comment lines. + $diff = ($param['type_space'] - $spaces); + foreach ($param['commentLines'] as $lineNum => $line) { + if ($lineNum === 0 + || $param['commentLines'][$lineNum]['indent'] === 0 + ) { + continue; + } + + $newIndent = ($param['commentLines'][$lineNum]['indent'] - $diff); + if ($newIndent <= 0) { + continue; + } + + $phpcsFile->fixer->replaceToken( + ($param['commentLines'][$lineNum]['token'] - 1), + str_repeat(' ', $newIndent) + ); + } + + $phpcsFile->fixer->endChangeset(); + }//end if + }//end if + + }//end checkSpacingAfterParamType() + + + /** + * Check the spacing after the name of a parameter. + * + * @param \PHP_CodeSniffer\Files\File $phpcsFile The file being scanned. + * @param array $param The parameter to be checked. + * @param int $maxVar The maxlength of the longest parameter name. + * @param int $spacing The number of spaces to add after the type. + * + * @return void + */ + protected function checkSpacingAfterParamName(File $phpcsFile, $param, $maxVar, $spacing=1) + { + // Check number of spaces after the var name. + $spaces = ($maxVar - strlen($param['var']) + $spacing); + if ($param['var_space'] !== $spaces) { + $error = 'Expected %s spaces after parameter name; %s found'; + $data = [ + $spaces, + $param['var_space'], + ]; + + $fix = $phpcsFile->addFixableError($error, $param['tag'], 'SpacingAfterParamName', $data); + if ($fix === true) { + $phpcsFile->fixer->beginChangeset(); + + $content = $param['type']; + $content .= str_repeat(' ', $param['type_space']); + $content .= $param['var']; + $content .= str_repeat(' ', $spaces); + $content .= $param['commentLines'][0]['comment']; + $phpcsFile->fixer->replaceToken(($param['tag'] + 2), $content); + + // Fix up the indent of additional comment lines. + foreach ($param['commentLines'] as $lineNum => $line) { + if ($lineNum === 0 + || $param['commentLines'][$lineNum]['indent'] === 0 + ) { + continue; + } + + $diff = ($param['var_space'] - $spaces); + $newIndent = ($param['commentLines'][$lineNum]['indent'] - $diff); + if ($newIndent <= 0) { + continue; + } + + $phpcsFile->fixer->replaceToken( + ($param['commentLines'][$lineNum]['token'] - 1), + str_repeat(' ', $newIndent) + ); + } + + $phpcsFile->fixer->endChangeset(); + }//end if + }//end if + + }//end checkSpacingAfterParamName() + + + /** + * Determines whether the whole comment is an inheritdoc comment. + * + * @param \PHP_CodeSniffer\Files\File $phpcsFile The file being scanned. + * @param int $stackPtr The position of the current token + * in the stack passed in $tokens. + * @param int $commentStart The position in the stack where the comment started. + * + * @return boolean TRUE if the docblock contains only {@inheritdoc} (case-insensitive). + */ + protected function checkInheritdoc(File $phpcsFile, $stackPtr, $commentStart) + { + $tokens = $phpcsFile->getTokens(); + + $allowedTokens = [ + T_DOC_COMMENT_OPEN_TAG, + T_DOC_COMMENT_WHITESPACE, + T_DOC_COMMENT_STAR, + ]; + for ($i = $commentStart; $i <= $tokens[$commentStart]['comment_closer']; $i++) { + if (in_array($tokens[$i]['code'], $allowedTokens) === false) { + $trimmedContent = strtolower(trim($tokens[$i]['content'])); + + if ($trimmedContent === '{@inheritdoc}') { + return true; + } else { + return false; + } + } + } + + return false; + + }//end checkInheritdoc() + + +}//end class diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Sniffs/Commenting/FunctionCommentThrowTagSniff.php b/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Sniffs/Commenting/FunctionCommentThrowTagSniff.php new file mode 100644 index 00000000..a168bfe6 --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Sniffs/Commenting/FunctionCommentThrowTagSniff.php @@ -0,0 +1,233 @@ + + * @copyright 2006-2015 Squiz Pty Ltd (ABN 77 084 670 600) + * @license https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence + */ + +namespace PHP_CodeSniffer\Standards\Squiz\Sniffs\Commenting; + +use PHP_CodeSniffer\Files\File; +use PHP_CodeSniffer\Sniffs\Sniff; +use PHP_CodeSniffer\Util\Tokens; + +class FunctionCommentThrowTagSniff implements Sniff +{ + + + /** + * Returns an array of tokens this test wants to listen for. + * + * @return array + */ + public function register() + { + return [T_FUNCTION]; + + }//end register() + + + /** + * Processes this test, when one of its tokens is encountered. + * + * @param \PHP_CodeSniffer\Files\File $phpcsFile The file being scanned. + * @param int $stackPtr The position of the current token + * in the stack passed in $tokens. + * + * @return void + */ + public function process(File $phpcsFile, $stackPtr) + { + $tokens = $phpcsFile->getTokens(); + + if (isset($tokens[$stackPtr]['scope_closer']) === false) { + // Abstract or incomplete. + return; + } + + $find = Tokens::$methodPrefixes; + $find[] = T_WHITESPACE; + + $commentEnd = $phpcsFile->findPrevious($find, ($stackPtr - 1), null, true); + if ($tokens[$commentEnd]['code'] !== T_DOC_COMMENT_CLOSE_TAG) { + // Function doesn't have a doc comment or is using the wrong type of comment. + return; + } + + $stackPtrEnd = $tokens[$stackPtr]['scope_closer']; + + // Find all the exception type tokens within the current scope. + $thrownExceptions = []; + $currPos = $stackPtr; + $foundThrows = false; + $unknownCount = 0; + do { + $currPos = $phpcsFile->findNext([T_THROW, T_ANON_CLASS, T_CLOSURE], ($currPos + 1), $stackPtrEnd); + if ($currPos === false) { + break; + } + + if ($tokens[$currPos]['code'] !== T_THROW) { + $currPos = $tokens[$currPos]['scope_closer']; + continue; + } + + $foundThrows = true; + + /* + If we can't find a NEW, we are probably throwing + a variable or calling a method. + + If we're throwing a variable, and it's the same variable as the + exception container from the nearest 'catch' block, we take that exception + as it is likely to be a re-throw. + + If we can't find a matching catch block, or the variable name + is different, it's probably a different variable, so we ignore it, + but they still need to provide at least one @throws tag, even through we + don't know the exception class. + */ + + $nextToken = $phpcsFile->findNext(T_WHITESPACE, ($currPos + 1), null, true); + if ($tokens[$nextToken]['code'] === T_NEW + || $tokens[$nextToken]['code'] === T_NS_SEPARATOR + || $tokens[$nextToken]['code'] === T_STRING + ) { + if ($tokens[$nextToken]['code'] === T_NEW) { + $currException = $phpcsFile->findNext( + [ + T_NS_SEPARATOR, + T_STRING, + ], + $currPos, + $stackPtrEnd, + false, + null, + true + ); + } else { + $currException = $nextToken; + } + + if ($currException !== false) { + $endException = $phpcsFile->findNext( + [ + T_NS_SEPARATOR, + T_STRING, + ], + ($currException + 1), + $stackPtrEnd, + true, + null, + true + ); + + if ($endException === false) { + $thrownExceptions[] = $tokens[$currException]['content']; + } else { + $thrownExceptions[] = $phpcsFile->getTokensAsString($currException, ($endException - $currException)); + } + }//end if + } else if ($tokens[$nextToken]['code'] === T_VARIABLE) { + // Find the nearest catch block in this scope and, if the caught var + // matches our re-thrown var, use the exception types being caught as + // exception types that are being thrown as well. + $catch = $phpcsFile->findPrevious( + T_CATCH, + $currPos, + $tokens[$stackPtr]['scope_opener'], + false, + null, + false + ); + + if ($catch !== false) { + $thrownVar = $phpcsFile->findPrevious( + T_VARIABLE, + ($tokens[$catch]['parenthesis_closer'] - 1), + $tokens[$catch]['parenthesis_opener'] + ); + + if ($tokens[$thrownVar]['content'] === $tokens[$nextToken]['content']) { + $exceptions = explode('|', $phpcsFile->getTokensAsString(($tokens[$catch]['parenthesis_opener'] + 1), ($thrownVar - $tokens[$catch]['parenthesis_opener'] - 1))); + foreach ($exceptions as $exception) { + $thrownExceptions[] = trim($exception); + } + } + } + } else { + ++$unknownCount; + }//end if + } while ($currPos < $stackPtrEnd && $currPos !== false); + + if ($foundThrows === false) { + return; + } + + // Only need one @throws tag for each type of exception thrown. + $thrownExceptions = array_unique($thrownExceptions); + + $throwTags = []; + $commentStart = $tokens[$commentEnd]['comment_opener']; + foreach ($tokens[$commentStart]['comment_tags'] as $tag) { + if ($tokens[$tag]['content'] !== '@throws') { + continue; + } + + if ($tokens[($tag + 2)]['code'] === T_DOC_COMMENT_STRING) { + $exception = $tokens[($tag + 2)]['content']; + $space = strpos($exception, ' '); + if ($space !== false) { + $exception = substr($exception, 0, $space); + } + + $throwTags[$exception] = true; + } + } + + if (empty($throwTags) === true) { + $error = 'Missing @throws tag in function comment'; + $phpcsFile->addError($error, $commentEnd, 'Missing'); + return; + } else if (empty($thrownExceptions) === true) { + // If token count is zero, it means that only variables are being + // thrown, so we need at least one @throws tag (checked above). + // Nothing more to do. + return; + } + + // Make sure @throws tag count matches thrown count. + $thrownCount = (count($thrownExceptions) + $unknownCount); + $tagCount = count($throwTags); + if ($thrownCount !== $tagCount) { + $error = 'Expected %s @throws tag(s) in function comment; %s found'; + $data = [ + $thrownCount, + $tagCount, + ]; + $phpcsFile->addError($error, $commentEnd, 'WrongNumber', $data); + return; + } + + foreach ($thrownExceptions as $throw) { + if (isset($throwTags[$throw]) === true) { + continue; + } + + foreach ($throwTags as $tag => $ignore) { + if (strrpos($tag, $throw) === (strlen($tag) - strlen($throw))) { + continue 2; + } + } + + $error = 'Missing @throws tag for "%s" exception'; + $data = [$throw]; + $phpcsFile->addError($error, $commentEnd, 'Missing', $data); + } + + }//end process() + + +}//end class diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Sniffs/Commenting/InlineCommentSniff.php b/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Sniffs/Commenting/InlineCommentSniff.php new file mode 100644 index 00000000..7d7ee40e --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Sniffs/Commenting/InlineCommentSniff.php @@ -0,0 +1,347 @@ + + * @copyright 2006-2015 Squiz Pty Ltd (ABN 77 084 670 600) + * @license https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence + */ + +namespace PHP_CodeSniffer\Standards\Squiz\Sniffs\Commenting; + +use PHP_CodeSniffer\Files\File; +use PHP_CodeSniffer\Sniffs\Sniff; +use PHP_CodeSniffer\Util\Tokens; + +class InlineCommentSniff implements Sniff +{ + + /** + * A list of tokenizers this sniff supports. + * + * @var array + */ + public $supportedTokenizers = [ + 'PHP', + 'JS', + ]; + + + /** + * Returns an array of tokens this test wants to listen for. + * + * @return array + */ + public function register() + { + return [ + T_COMMENT, + T_DOC_COMMENT_OPEN_TAG, + ]; + + }//end register() + + + /** + * Processes this test, when one of its tokens is encountered. + * + * @param \PHP_CodeSniffer\Files\File $phpcsFile The file being scanned. + * @param int $stackPtr The position of the current token in the + * stack passed in $tokens. + * + * @return void + */ + public function process(File $phpcsFile, $stackPtr) + { + $tokens = $phpcsFile->getTokens(); + + // If this is a function/class/interface doc block comment, skip it. + // We are only interested in inline doc block comments, which are + // not allowed. + if ($tokens[$stackPtr]['code'] === T_DOC_COMMENT_OPEN_TAG) { + $nextToken = $stackPtr; + do { + $nextToken = $phpcsFile->findNext(Tokens::$emptyTokens, ($nextToken + 1), null, true); + if ($tokens[$nextToken]['code'] === T_ATTRIBUTE) { + $nextToken = $tokens[$nextToken]['attribute_closer']; + continue; + } + + break; + } while (true); + + $ignore = [ + T_CLASS, + T_INTERFACE, + T_TRAIT, + T_FUNCTION, + T_CLOSURE, + T_PUBLIC, + T_PRIVATE, + T_PROTECTED, + T_FINAL, + T_STATIC, + T_ABSTRACT, + T_CONST, + T_PROPERTY, + T_INCLUDE, + T_INCLUDE_ONCE, + T_REQUIRE, + T_REQUIRE_ONCE, + ]; + + if (in_array($tokens[$nextToken]['code'], $ignore, true) === true) { + return; + } + + if ($phpcsFile->tokenizerType === 'JS') { + // We allow block comments if a function or object + // is being assigned to a variable. + $ignore = Tokens::$emptyTokens; + $ignore[] = T_EQUAL; + $ignore[] = T_STRING; + $ignore[] = T_OBJECT_OPERATOR; + $nextToken = $phpcsFile->findNext($ignore, ($nextToken + 1), null, true); + if ($tokens[$nextToken]['code'] === T_FUNCTION + || $tokens[$nextToken]['code'] === T_CLOSURE + || $tokens[$nextToken]['code'] === T_OBJECT + || $tokens[$nextToken]['code'] === T_PROTOTYPE + ) { + return; + } + } + + $prevToken = $phpcsFile->findPrevious( + Tokens::$emptyTokens, + ($stackPtr - 1), + null, + true + ); + + if ($tokens[$prevToken]['code'] === T_OPEN_TAG) { + return; + } + + if ($tokens[$stackPtr]['content'] === '/**') { + $error = 'Inline doc block comments are not allowed; use "/* Comment */" or "// Comment" instead'; + $phpcsFile->addError($error, $stackPtr, 'DocBlock'); + } + }//end if + + if ($tokens[$stackPtr]['content'][0] === '#') { + $error = 'Perl-style comments are not allowed; use "// Comment" instead'; + $fix = $phpcsFile->addFixableError($error, $stackPtr, 'WrongStyle'); + if ($fix === true) { + $comment = ltrim($tokens[$stackPtr]['content'], "# \t"); + $phpcsFile->fixer->replaceToken($stackPtr, "// $comment"); + } + } + + // We don't want end of block comments. Check if the last token before the + // comment is a closing curly brace. + $previousContent = $phpcsFile->findPrevious(T_WHITESPACE, ($stackPtr - 1), null, true); + if ($tokens[$previousContent]['line'] === $tokens[$stackPtr]['line']) { + if ($tokens[$previousContent]['code'] === T_CLOSE_CURLY_BRACKET) { + return; + } + + // Special case for JS files. + if ($tokens[$previousContent]['code'] === T_COMMA + || $tokens[$previousContent]['code'] === T_SEMICOLON + ) { + $lastContent = $phpcsFile->findPrevious(T_WHITESPACE, ($previousContent - 1), null, true); + if ($tokens[$lastContent]['code'] === T_CLOSE_CURLY_BRACKET) { + return; + } + } + } + + // Only want inline comments. + if (substr($tokens[$stackPtr]['content'], 0, 2) !== '//') { + return; + } + + $commentTokens = [$stackPtr]; + + $nextComment = $stackPtr; + $lastComment = $stackPtr; + while (($nextComment = $phpcsFile->findNext(T_COMMENT, ($nextComment + 1), null, false)) !== false) { + if ($tokens[$nextComment]['line'] !== ($tokens[$lastComment]['line'] + 1)) { + break; + } + + // Only want inline comments. + if (substr($tokens[$nextComment]['content'], 0, 2) !== '//') { + break; + } + + // There is a comment on the very next line. If there is + // no code between the comments, they are part of the same + // comment block. + $prevNonWhitespace = $phpcsFile->findPrevious(T_WHITESPACE, ($nextComment - 1), $lastComment, true); + if ($prevNonWhitespace !== $lastComment) { + break; + } + + $commentTokens[] = $nextComment; + $lastComment = $nextComment; + }//end while + + $commentText = ''; + foreach ($commentTokens as $lastCommentToken) { + $comment = rtrim($tokens[$lastCommentToken]['content']); + + if (trim(substr($comment, 2)) === '') { + continue; + } + + $spaceCount = 0; + $tabFound = false; + + $commentLength = strlen($comment); + for ($i = 2; $i < $commentLength; $i++) { + if ($comment[$i] === "\t") { + $tabFound = true; + break; + } + + if ($comment[$i] !== ' ') { + break; + } + + $spaceCount++; + } + + $fix = false; + if ($tabFound === true) { + $error = 'Tab found before comment text; expected "// %s" but found "%s"'; + $data = [ + ltrim(substr($comment, 2)), + $comment, + ]; + $fix = $phpcsFile->addFixableError($error, $lastCommentToken, 'TabBefore', $data); + } else if ($spaceCount === 0) { + $error = 'No space found before comment text; expected "// %s" but found "%s"'; + $data = [ + substr($comment, 2), + $comment, + ]; + $fix = $phpcsFile->addFixableError($error, $lastCommentToken, 'NoSpaceBefore', $data); + } else if ($spaceCount > 1) { + $error = 'Expected 1 space before comment text but found %s; use block comment if you need indentation'; + $data = [ + $spaceCount, + substr($comment, (2 + $spaceCount)), + $comment, + ]; + $fix = $phpcsFile->addFixableError($error, $lastCommentToken, 'SpacingBefore', $data); + }//end if + + if ($fix === true) { + $newComment = '// '.ltrim($tokens[$lastCommentToken]['content'], "/\t "); + $phpcsFile->fixer->replaceToken($lastCommentToken, $newComment); + } + + $commentText .= trim(substr($tokens[$lastCommentToken]['content'], 2)); + }//end foreach + + if ($commentText === '') { + $error = 'Blank comments are not allowed'; + $fix = $phpcsFile->addFixableError($error, $stackPtr, 'Empty'); + if ($fix === true) { + $phpcsFile->fixer->replaceToken($stackPtr, ''); + } + + return ($lastCommentToken + 1); + } + + if (preg_match('/^\p{Ll}/u', $commentText) === 1) { + $error = 'Inline comments must start with a capital letter'; + $phpcsFile->addError($error, $stackPtr, 'NotCapital'); + } + + // Only check the end of comment character if the start of the comment + // is a letter, indicating that the comment is just standard text. + if (preg_match('/^\p{L}/u', $commentText) === 1) { + $commentCloser = $commentText[(strlen($commentText) - 1)]; + $acceptedClosers = [ + 'full-stops' => '.', + 'exclamation marks' => '!', + 'or question marks' => '?', + ]; + + if (in_array($commentCloser, $acceptedClosers, true) === false) { + $error = 'Inline comments must end in %s'; + $ender = ''; + foreach ($acceptedClosers as $closerName => $symbol) { + $ender .= ' '.$closerName.','; + } + + $ender = trim($ender, ' ,'); + $data = [$ender]; + $phpcsFile->addError($error, $lastCommentToken, 'InvalidEndChar', $data); + } + } + + // Finally, the line below the last comment cannot be empty if this inline + // comment is on a line by itself. + if ($tokens[$previousContent]['line'] < $tokens[$stackPtr]['line']) { + $next = $phpcsFile->findNext(T_WHITESPACE, ($lastCommentToken + 1), null, true); + if ($next === false) { + // Ignore if the comment is the last non-whitespace token in a file. + return ($lastCommentToken + 1); + } + + if ($tokens[$next]['code'] === T_DOC_COMMENT_OPEN_TAG) { + // If this inline comment is followed by a docblock, + // ignore spacing as docblock/function etc spacing rules + // are likely to conflict with our rules. + return ($lastCommentToken + 1); + } + + $errorCode = 'SpacingAfter'; + + if (isset($tokens[$stackPtr]['conditions']) === true) { + $conditions = $tokens[$stackPtr]['conditions']; + $type = end($conditions); + $conditionPtr = key($conditions); + + if (($type === T_FUNCTION || $type === T_CLOSURE) + && $tokens[$conditionPtr]['scope_closer'] === $next + ) { + $errorCode = 'SpacingAfterAtFunctionEnd'; + } + } + + for ($i = ($lastCommentToken + 1); $i < $phpcsFile->numTokens; $i++) { + if ($tokens[$i]['line'] === ($tokens[$lastCommentToken]['line'] + 1)) { + if ($tokens[$i]['code'] !== T_WHITESPACE) { + return ($lastCommentToken + 1); + } + } else if ($tokens[$i]['line'] > ($tokens[$lastCommentToken]['line'] + 1)) { + break; + } + } + + $error = 'There must be no blank line following an inline comment'; + $fix = $phpcsFile->addFixableError($error, $lastCommentToken, $errorCode); + if ($fix === true) { + $phpcsFile->fixer->beginChangeset(); + for ($i = ($lastCommentToken + 1); $i < $next; $i++) { + if ($tokens[$i]['line'] === $tokens[$next]['line']) { + break; + } + + $phpcsFile->fixer->replaceToken($i, ''); + } + + $phpcsFile->fixer->endChangeset(); + } + }//end if + + return ($lastCommentToken + 1); + + }//end process() + + +}//end class diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Sniffs/Commenting/LongConditionClosingCommentSniff.php b/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Sniffs/Commenting/LongConditionClosingCommentSniff.php new file mode 100644 index 00000000..103d90ff --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Sniffs/Commenting/LongConditionClosingCommentSniff.php @@ -0,0 +1,218 @@ + + * @copyright 2006-2015 Squiz Pty Ltd (ABN 77 084 670 600) + * @license https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence + */ + +namespace PHP_CodeSniffer\Standards\Squiz\Sniffs\Commenting; + +use PHP_CodeSniffer\Files\File; +use PHP_CodeSniffer\Sniffs\Sniff; + +class LongConditionClosingCommentSniff implements Sniff +{ + + /** + * A list of tokenizers this sniff supports. + * + * @var array + */ + public $supportedTokenizers = [ + 'PHP', + 'JS', + ]; + + /** + * The openers that we are interested in. + * + * @var integer[] + */ + private static $openers = [ + T_SWITCH, + T_IF, + T_FOR, + T_FOREACH, + T_WHILE, + T_TRY, + T_CASE, + T_MATCH, + ]; + + /** + * The length that a code block must be before + * requiring a closing comment. + * + * @var integer + */ + public $lineLimit = 20; + + /** + * The format the end comment should be in. + * + * The placeholder %s will be replaced with the type of condition opener. + * + * @var string + */ + public $commentFormat = '//end %s'; + + + /** + * Returns an array of tokens this test wants to listen for. + * + * @return array + */ + public function register() + { + return [T_CLOSE_CURLY_BRACKET]; + + }//end register() + + + /** + * Processes this test, when one of its tokens is encountered. + * + * @param \PHP_CodeSniffer\Files\File $phpcsFile The file being scanned. + * @param int $stackPtr The position of the current token in the + * stack passed in $tokens. + * + * @return void + */ + public function process(File $phpcsFile, $stackPtr) + { + $tokens = $phpcsFile->getTokens(); + + if (isset($tokens[$stackPtr]['scope_condition']) === false) { + // No scope condition. It is a function closer. + return; + } + + $startCondition = $tokens[$tokens[$stackPtr]['scope_condition']]; + $startBrace = $tokens[$tokens[$stackPtr]['scope_opener']]; + $endBrace = $tokens[$stackPtr]; + + // We are only interested in some code blocks. + if (in_array($startCondition['code'], self::$openers, true) === false) { + return; + } + + if ($startCondition['code'] === T_IF) { + // If this is actually an ELSE IF, skip it as the brace + // will be checked by the original IF. + $else = $phpcsFile->findPrevious(T_WHITESPACE, ($tokens[$stackPtr]['scope_condition'] - 1), null, true); + if ($tokens[$else]['code'] === T_ELSE) { + return; + } + + // IF statements that have an ELSE block need to use + // "end if" rather than "end else" or "end elseif". + do { + $nextToken = $phpcsFile->findNext(T_WHITESPACE, ($stackPtr + 1), null, true); + if ($tokens[$nextToken]['code'] === T_ELSE || $tokens[$nextToken]['code'] === T_ELSEIF) { + // Check for ELSE IF (2 tokens) as opposed to ELSEIF (1 token). + if ($tokens[$nextToken]['code'] === T_ELSE + && isset($tokens[$nextToken]['scope_closer']) === false + ) { + $nextToken = $phpcsFile->findNext(T_WHITESPACE, ($nextToken + 1), null, true); + if ($tokens[$nextToken]['code'] !== T_IF + || isset($tokens[$nextToken]['scope_closer']) === false + ) { + // Not an ELSE IF or is an inline ELSE IF. + break; + } + } + + if (isset($tokens[$nextToken]['scope_closer']) === false) { + // There isn't going to be anywhere to print the "end if" comment + // because there is no closer. + return; + } + + // The end brace becomes the ELSE's end brace. + $stackPtr = $tokens[$nextToken]['scope_closer']; + $endBrace = $tokens[$stackPtr]; + } else { + break; + }//end if + } while (isset($tokens[$nextToken]['scope_closer']) === true); + }//end if + + if ($startCondition['code'] === T_TRY) { + // TRY statements need to check until the end of all CATCH statements. + do { + $nextToken = $phpcsFile->findNext(T_WHITESPACE, ($stackPtr + 1), null, true); + if ($tokens[$nextToken]['code'] === T_CATCH + || $tokens[$nextToken]['code'] === T_FINALLY + ) { + // The end brace becomes the CATCH end brace. + $stackPtr = $tokens[$nextToken]['scope_closer']; + $endBrace = $tokens[$stackPtr]; + } else { + break; + } + } while (isset($tokens[$nextToken]['scope_closer']) === true); + } + + if ($startCondition['code'] === T_MATCH) { + // Move the stackPtr to after the semi-colon/comma if there is one. + $nextToken = $phpcsFile->findNext(T_WHITESPACE, ($stackPtr + 1), null, true); + if ($nextToken !== false + && ($tokens[$nextToken]['code'] === T_SEMICOLON + || $tokens[$nextToken]['code'] === T_COMMA) + ) { + $stackPtr = $nextToken; + } + } + + $lineDifference = ($endBrace['line'] - $startBrace['line']); + + $expected = sprintf($this->commentFormat, $startCondition['content']); + $comment = $phpcsFile->findNext([T_COMMENT], $stackPtr, null, false); + + if (($comment === false) || ($tokens[$comment]['line'] !== $endBrace['line'])) { + if ($lineDifference >= $this->lineLimit) { + $error = 'End comment for long condition not found; expected "%s"'; + $data = [$expected]; + $fix = $phpcsFile->addFixableError($error, $stackPtr, 'Missing', $data); + + if ($fix === true) { + $next = $phpcsFile->findNext(T_WHITESPACE, ($stackPtr + 1), null, true); + if ($next !== false && $tokens[$next]['line'] === $tokens[$stackPtr]['line']) { + $expected .= $phpcsFile->eolChar; + } + + $phpcsFile->fixer->addContent($stackPtr, $expected); + } + } + + return; + } + + if (($comment - $stackPtr) !== 1) { + $error = 'Space found before closing comment; expected "%s"'; + $data = [$expected]; + $phpcsFile->addError($error, $stackPtr, 'SpacingBefore', $data); + } + + if (trim($tokens[$comment]['content']) !== $expected) { + $found = trim($tokens[$comment]['content']); + $error = 'Incorrect closing comment; expected "%s" but found "%s"'; + $data = [ + $expected, + $found, + ]; + + $fix = $phpcsFile->addFixableError($error, $stackPtr, 'Invalid', $data); + if ($fix === true) { + $phpcsFile->fixer->replaceToken($comment, $expected.$phpcsFile->eolChar); + } + + return; + } + + }//end process() + + +}//end class diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Sniffs/Commenting/PostStatementCommentSniff.php b/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Sniffs/Commenting/PostStatementCommentSniff.php new file mode 100644 index 00000000..ce19d5c1 --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Sniffs/Commenting/PostStatementCommentSniff.php @@ -0,0 +1,121 @@ + + * @copyright 2006-2015 Squiz Pty Ltd (ABN 77 084 670 600) + * @license https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence + */ + +namespace PHP_CodeSniffer\Standards\Squiz\Sniffs\Commenting; + +use PHP_CodeSniffer\Files\File; +use PHP_CodeSniffer\Sniffs\Sniff; + +class PostStatementCommentSniff implements Sniff +{ + + /** + * A list of tokenizers this sniff supports. + * + * @var array + */ + public $supportedTokenizers = [ + 'PHP', + 'JS', + ]; + + /** + * Exceptions to the rule. + * + * If post statement comments are found within the condition + * parenthesis of these structures, leave them alone. + * + * @var array + */ + private $controlStructureExceptions = [ + T_IF => true, + T_ELSEIF => true, + T_SWITCH => true, + T_WHILE => true, + T_FOR => true, + T_FOREACH => true, + T_MATCH => true, + ]; + + + /** + * Returns an array of tokens this test wants to listen for. + * + * @return array + */ + public function register() + { + return [T_COMMENT]; + + }//end register() + + + /** + * Processes this sniff, when one of its tokens is encountered. + * + * @param \PHP_CodeSniffer\Files\File $phpcsFile The file being scanned. + * @param int $stackPtr The position of the current token in the + * stack passed in $tokens. + * + * @return void + */ + public function process(File $phpcsFile, $stackPtr) + { + $tokens = $phpcsFile->getTokens(); + + if (substr($tokens[$stackPtr]['content'], 0, 2) !== '//') { + return; + } + + $commentLine = $tokens[$stackPtr]['line']; + $lastContent = $phpcsFile->findPrevious(T_WHITESPACE, ($stackPtr - 1), null, true); + + if ($lastContent === false + || $tokens[$lastContent]['line'] !== $commentLine + || $tokens[$stackPtr]['column'] === 1 + ) { + return; + } + + if ($tokens[$lastContent]['code'] === T_CLOSE_CURLY_BRACKET) { + return; + } + + // Special case for JS files and PHP closures. + if ($tokens[$lastContent]['code'] === T_COMMA + || $tokens[$lastContent]['code'] === T_SEMICOLON + ) { + $lastContent = $phpcsFile->findPrevious(T_WHITESPACE, ($lastContent - 1), null, true); + if ($lastContent === false || $tokens[$lastContent]['code'] === T_CLOSE_CURLY_BRACKET) { + return; + } + } + + // Special case for (trailing) comments within multi-line control structures. + if (isset($tokens[$stackPtr]['nested_parenthesis']) === true) { + $nestedParens = $tokens[$stackPtr]['nested_parenthesis']; + foreach ($nestedParens as $open => $close) { + if (isset($tokens[$open]['parenthesis_owner']) === true + && isset($this->controlStructureExceptions[$tokens[$tokens[$open]['parenthesis_owner']]['code']]) === true + ) { + return; + } + } + } + + $error = 'Comments may not appear after statements'; + $fix = $phpcsFile->addFixableError($error, $stackPtr, 'Found'); + if ($fix === true) { + $phpcsFile->fixer->addNewlineBefore($stackPtr); + } + + }//end process() + + +}//end class diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Sniffs/Commenting/VariableCommentSniff.php b/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Sniffs/Commenting/VariableCommentSniff.php new file mode 100644 index 00000000..a7731bb6 --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Sniffs/Commenting/VariableCommentSniff.php @@ -0,0 +1,192 @@ + + * @copyright 2006-2015 Squiz Pty Ltd (ABN 77 084 670 600) + * @license https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence + */ + +namespace PHP_CodeSniffer\Standards\Squiz\Sniffs\Commenting; + +use PHP_CodeSniffer\Files\File; +use PHP_CodeSniffer\Sniffs\AbstractVariableSniff; +use PHP_CodeSniffer\Util\Common; + +class VariableCommentSniff extends AbstractVariableSniff +{ + + + /** + * Called to process class member vars. + * + * @param \PHP_CodeSniffer\Files\File $phpcsFile The file being scanned. + * @param int $stackPtr The position of the current token + * in the stack passed in $tokens. + * + * @return void + */ + public function processMemberVar(File $phpcsFile, $stackPtr) + { + $tokens = $phpcsFile->getTokens(); + $ignore = [ + T_PUBLIC => T_PUBLIC, + T_PRIVATE => T_PRIVATE, + T_PROTECTED => T_PROTECTED, + T_VAR => T_VAR, + T_STATIC => T_STATIC, + T_WHITESPACE => T_WHITESPACE, + T_STRING => T_STRING, + T_NS_SEPARATOR => T_NS_SEPARATOR, + T_NULLABLE => T_NULLABLE, + ]; + + for ($commentEnd = ($stackPtr - 1); $commentEnd >= 0; $commentEnd--) { + if (isset($ignore[$tokens[$commentEnd]['code']]) === true) { + continue; + } + + if ($tokens[$commentEnd]['code'] === T_ATTRIBUTE_END + && isset($tokens[$commentEnd]['attribute_opener']) === true + ) { + $commentEnd = $tokens[$commentEnd]['attribute_opener']; + continue; + } + + break; + } + + if ($commentEnd === false + || ($tokens[$commentEnd]['code'] !== T_DOC_COMMENT_CLOSE_TAG + && $tokens[$commentEnd]['code'] !== T_COMMENT) + ) { + $phpcsFile->addError('Missing member variable doc comment', $stackPtr, 'Missing'); + return; + } + + if ($tokens[$commentEnd]['code'] === T_COMMENT) { + $phpcsFile->addError('You must use "/**" style comments for a member variable comment', $stackPtr, 'WrongStyle'); + return; + } + + $commentStart = $tokens[$commentEnd]['comment_opener']; + + $foundVar = null; + foreach ($tokens[$commentStart]['comment_tags'] as $tag) { + if ($tokens[$tag]['content'] === '@var') { + if ($foundVar !== null) { + $error = 'Only one @var tag is allowed in a member variable comment'; + $phpcsFile->addError($error, $tag, 'DuplicateVar'); + } else { + $foundVar = $tag; + } + } else if ($tokens[$tag]['content'] === '@see') { + // Make sure the tag isn't empty. + $string = $phpcsFile->findNext(T_DOC_COMMENT_STRING, $tag, $commentEnd); + if ($string === false || $tokens[$string]['line'] !== $tokens[$tag]['line']) { + $error = 'Content missing for @see tag in member variable comment'; + $phpcsFile->addError($error, $tag, 'EmptySees'); + } + } else { + $error = '%s tag is not allowed in member variable comment'; + $data = [$tokens[$tag]['content']]; + $phpcsFile->addWarning($error, $tag, 'TagNotAllowed', $data); + }//end if + }//end foreach + + // The @var tag is the only one we require. + if ($foundVar === null) { + $error = 'Missing @var tag in member variable comment'; + $phpcsFile->addError($error, $commentEnd, 'MissingVar'); + return; + } + + $firstTag = $tokens[$commentStart]['comment_tags'][0]; + if ($foundVar !== null && $tokens[$firstTag]['content'] !== '@var') { + $error = 'The @var tag must be the first tag in a member variable comment'; + $phpcsFile->addError($error, $foundVar, 'VarOrder'); + } + + // Make sure the tag isn't empty and has the correct padding. + $string = $phpcsFile->findNext(T_DOC_COMMENT_STRING, $foundVar, $commentEnd); + if ($string === false || $tokens[$string]['line'] !== $tokens[$foundVar]['line']) { + $error = 'Content missing for @var tag in member variable comment'; + $phpcsFile->addError($error, $foundVar, 'EmptyVar'); + return; + } + + // Support both a var type and a description. + preg_match('`^((?:\|?(?:array\([^\)]*\)|[\\\\a-z0-9\[\]]+))*)( .*)?`i', $tokens[($foundVar + 2)]['content'], $varParts); + if (isset($varParts[1]) === false) { + return; + } + + $varType = $varParts[1]; + + // Check var type (can be multiple, separated by '|'). + $typeNames = explode('|', $varType); + $suggestedNames = []; + foreach ($typeNames as $i => $typeName) { + $suggestedName = Common::suggestType($typeName); + if (in_array($suggestedName, $suggestedNames, true) === false) { + $suggestedNames[] = $suggestedName; + } + } + + $suggestedType = implode('|', $suggestedNames); + if ($varType !== $suggestedType) { + $error = 'Expected "%s" but found "%s" for @var tag in member variable comment'; + $data = [ + $suggestedType, + $varType, + ]; + $fix = $phpcsFile->addFixableError($error, $foundVar, 'IncorrectVarType', $data); + if ($fix === true) { + $replacement = $suggestedType; + if (empty($varParts[2]) === false) { + $replacement .= $varParts[2]; + } + + $phpcsFile->fixer->replaceToken(($foundVar + 2), $replacement); + unset($replacement); + } + } + + }//end processMemberVar() + + + /** + * Called to process a normal variable. + * + * Not required for this sniff. + * + * @param \PHP_CodeSniffer\Files\File $phpcsFile The PHP_CodeSniffer file where this token was found. + * @param int $stackPtr The position where the double quoted + * string was found. + * + * @return void + */ + protected function processVariable(File $phpcsFile, $stackPtr) + { + + }//end processVariable() + + + /** + * Called to process variables found in double quoted strings. + * + * Not required for this sniff. + * + * @param \PHP_CodeSniffer\Files\File $phpcsFile The PHP_CodeSniffer file where this token was found. + * @param int $stackPtr The position where the double quoted + * string was found. + * + * @return void + */ + protected function processVariableInString(File $phpcsFile, $stackPtr) + { + + }//end processVariableInString() + + +}//end class diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Sniffs/ControlStructures/ControlSignatureSniff.php b/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Sniffs/ControlStructures/ControlSignatureSniff.php new file mode 100644 index 00000000..8a56b23f --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Sniffs/ControlStructures/ControlSignatureSniff.php @@ -0,0 +1,325 @@ + + * @copyright 2006-2015 Squiz Pty Ltd (ABN 77 084 670 600) + * @license https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence + */ + +namespace PHP_CodeSniffer\Standards\Squiz\Sniffs\ControlStructures; + +use PHP_CodeSniffer\Files\File; +use PHP_CodeSniffer\Sniffs\Sniff; +use PHP_CodeSniffer\Util\Tokens; + +class ControlSignatureSniff implements Sniff +{ + + /** + * How many spaces should precede the colon if using alternative syntax. + * + * @var integer + */ + public $requiredSpacesBeforeColon = 1; + + /** + * A list of tokenizers this sniff supports. + * + * @var array + */ + public $supportedTokenizers = [ + 'PHP', + 'JS', + ]; + + + /** + * Returns an array of tokens this test wants to listen for. + * + * @return int[] + */ + public function register() + { + return [ + T_TRY, + T_CATCH, + T_FINALLY, + T_DO, + T_WHILE, + T_FOR, + T_IF, + T_FOREACH, + T_ELSE, + T_ELSEIF, + T_SWITCH, + T_MATCH, + ]; + + }//end register() + + + /** + * Processes this test, when one of its tokens is encountered. + * + * @param \PHP_CodeSniffer\Files\File $phpcsFile The file being scanned. + * @param int $stackPtr The position of the current token in the + * stack passed in $tokens. + * + * @return void + */ + public function process(File $phpcsFile, $stackPtr) + { + $tokens = $phpcsFile->getTokens(); + + $nextNonEmpty = $phpcsFile->findNext(Tokens::$emptyTokens, ($stackPtr + 1), null, true); + if ($nextNonEmpty === false) { + return; + } + + $isAlternative = false; + if (isset($tokens[$stackPtr]['scope_opener']) === true + && $tokens[$tokens[$stackPtr]['scope_opener']]['code'] === T_COLON + ) { + $isAlternative = true; + } + + // Single space after the keyword. + $expected = 1; + if (isset($tokens[$stackPtr]['parenthesis_closer']) === false && $isAlternative === true) { + // Catching cases like: + // if (condition) : ... else: ... endif + // where there is no condition. + $expected = (int) $this->requiredSpacesBeforeColon; + } + + $found = 1; + if ($tokens[($stackPtr + 1)]['code'] !== T_WHITESPACE) { + $found = 0; + } else if ($tokens[($stackPtr + 1)]['content'] !== ' ') { + if (strpos($tokens[($stackPtr + 1)]['content'], $phpcsFile->eolChar) !== false) { + $found = 'newline'; + } else { + $found = $tokens[($stackPtr + 1)]['length']; + } + } + + if ($found !== $expected) { + $error = 'Expected %s space(s) after %s keyword; %s found'; + $data = [ + $expected, + strtoupper($tokens[$stackPtr]['content']), + $found, + ]; + + $fix = $phpcsFile->addFixableError($error, $stackPtr, 'SpaceAfterKeyword', $data); + if ($fix === true) { + if ($found === 0) { + $phpcsFile->fixer->addContent($stackPtr, str_repeat(' ', $expected)); + } else { + $phpcsFile->fixer->replaceToken(($stackPtr + 1), str_repeat(' ', $expected)); + } + } + } + + // Single space after closing parenthesis. + if (isset($tokens[$stackPtr]['parenthesis_closer']) === true + && isset($tokens[$stackPtr]['scope_opener']) === true + ) { + $expected = 1; + if ($isAlternative === true) { + $expected = (int) $this->requiredSpacesBeforeColon; + } + + $closer = $tokens[$stackPtr]['parenthesis_closer']; + $opener = $tokens[$stackPtr]['scope_opener']; + $content = $phpcsFile->getTokensAsString(($closer + 1), ($opener - $closer - 1)); + + if (trim($content) === '') { + if (strpos($content, $phpcsFile->eolChar) !== false) { + $found = 'newline'; + } else { + $found = strlen($content); + } + } else { + $found = '"'.str_replace($phpcsFile->eolChar, '\n', $content).'"'; + } + + if ($found !== $expected) { + $error = 'Expected %s space(s) after closing parenthesis; found %s'; + $data = [ + $expected, + $found, + ]; + + $fix = $phpcsFile->addFixableError($error, $closer, 'SpaceAfterCloseParenthesis', $data); + if ($fix === true) { + $padding = str_repeat(' ', $expected); + if ($closer === ($opener - 1)) { + $phpcsFile->fixer->addContent($closer, $padding); + } else { + $phpcsFile->fixer->beginChangeset(); + if (trim($content) === '') { + $phpcsFile->fixer->addContent($closer, $padding); + if ($found !== 0) { + for ($i = ($closer + 1); $i < $opener; $i++) { + $phpcsFile->fixer->replaceToken($i, ''); + } + } + } else { + $phpcsFile->fixer->addContent($closer, $padding.$tokens[$opener]['content']); + $phpcsFile->fixer->replaceToken($opener, ''); + + if ($tokens[$opener]['line'] !== $tokens[$closer]['line']) { + $next = $phpcsFile->findNext(T_WHITESPACE, ($opener + 1), null, true); + if ($tokens[$next]['line'] !== $tokens[$opener]['line']) { + for ($i = ($opener + 1); $i < $next; $i++) { + $phpcsFile->fixer->replaceToken($i, ''); + } + } + } + } + + $phpcsFile->fixer->endChangeset(); + }//end if + }//end if + }//end if + }//end if + + // Single newline after opening brace. + if (isset($tokens[$stackPtr]['scope_opener']) === true) { + $opener = $tokens[$stackPtr]['scope_opener']; + for ($next = ($opener + 1); $next < $phpcsFile->numTokens; $next++) { + $code = $tokens[$next]['code']; + + if ($code === T_WHITESPACE + || ($code === T_INLINE_HTML + && trim($tokens[$next]['content']) === '') + ) { + continue; + } + + // Skip all empty tokens on the same line as the opener. + if ($tokens[$next]['line'] === $tokens[$opener]['line'] + && (isset(Tokens::$emptyTokens[$code]) === true + || $code === T_CLOSE_TAG) + ) { + continue; + } + + // We found the first bit of a code, or a comment on the + // following line. + break; + }//end for + + if ($tokens[$next]['line'] === $tokens[$opener]['line']) { + $error = 'Newline required after opening brace'; + $fix = $phpcsFile->addFixableError($error, $opener, 'NewlineAfterOpenBrace'); + if ($fix === true) { + $phpcsFile->fixer->beginChangeset(); + for ($i = ($opener + 1); $i < $next; $i++) { + if (trim($tokens[$i]['content']) !== '') { + break; + } + + // Remove whitespace. + $phpcsFile->fixer->replaceToken($i, ''); + } + + $phpcsFile->fixer->addContent($opener, $phpcsFile->eolChar); + $phpcsFile->fixer->endChangeset(); + } + }//end if + } else if ($tokens[$stackPtr]['code'] === T_WHILE) { + // Zero spaces after parenthesis closer, but only if followed by a semicolon. + $closer = $tokens[$stackPtr]['parenthesis_closer']; + $nextNonEmpty = $phpcsFile->findNext(Tokens::$emptyTokens, ($closer + 1), null, true); + if ($nextNonEmpty !== false && $tokens[$nextNonEmpty]['code'] === T_SEMICOLON) { + $found = 0; + if ($tokens[($closer + 1)]['code'] === T_WHITESPACE) { + if (strpos($tokens[($closer + 1)]['content'], $phpcsFile->eolChar) !== false) { + $found = 'newline'; + } else { + $found = $tokens[($closer + 1)]['length']; + } + } + + if ($found !== 0) { + $error = 'Expected 0 spaces before semicolon; %s found'; + $data = [$found]; + $fix = $phpcsFile->addFixableError($error, $closer, 'SpaceBeforeSemicolon', $data); + if ($fix === true) { + $phpcsFile->fixer->replaceToken(($closer + 1), ''); + } + } + } + }//end if + + // Only want to check multi-keyword structures from here on. + if ($tokens[$stackPtr]['code'] === T_WHILE) { + if (isset($tokens[$stackPtr]['scope_closer']) !== false) { + return; + } + + $closer = $phpcsFile->findPrevious(Tokens::$emptyTokens, ($stackPtr - 1), null, true); + if ($closer === false + || $tokens[$closer]['code'] !== T_CLOSE_CURLY_BRACKET + || $tokens[$tokens[$closer]['scope_condition']]['code'] !== T_DO + ) { + return; + } + } else if ($tokens[$stackPtr]['code'] === T_ELSE + || $tokens[$stackPtr]['code'] === T_ELSEIF + || $tokens[$stackPtr]['code'] === T_CATCH + || $tokens[$stackPtr]['code'] === T_FINALLY + ) { + if (isset($tokens[$stackPtr]['scope_opener']) === true + && $tokens[$tokens[$stackPtr]['scope_opener']]['code'] === T_COLON + ) { + // Special case for alternate syntax, where this token is actually + // the closer for the previous block, so there is no spacing to check. + return; + } + + $closer = $phpcsFile->findPrevious(Tokens::$emptyTokens, ($stackPtr - 1), null, true); + if ($closer === false || $tokens[$closer]['code'] !== T_CLOSE_CURLY_BRACKET) { + return; + } + } else { + return; + }//end if + + // Single space after closing brace. + $found = 1; + if ($tokens[($closer + 1)]['code'] !== T_WHITESPACE) { + $found = 0; + } else if ($tokens[$closer]['line'] !== $tokens[$stackPtr]['line']) { + $found = 'newline'; + } else if ($tokens[($closer + 1)]['content'] !== ' ') { + $found = $tokens[($closer + 1)]['length']; + } + + if ($found !== 1) { + $error = 'Expected 1 space after closing brace; %s found'; + $data = [$found]; + + if ($phpcsFile->findNext(Tokens::$commentTokens, ($closer + 1), $stackPtr) !== false) { + // Comment found between closing brace and keyword, don't auto-fix. + $phpcsFile->addError($error, $closer, 'SpaceAfterCloseBrace', $data); + return; + } + + $fix = $phpcsFile->addFixableError($error, $closer, 'SpaceAfterCloseBrace', $data); + if ($fix === true) { + if ($found === 0) { + $phpcsFile->fixer->addContent($closer, ' '); + } else { + $phpcsFile->fixer->replaceToken(($closer + 1), ' '); + } + } + } + + }//end process() + + +}//end class diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Sniffs/ControlStructures/ElseIfDeclarationSniff.php b/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Sniffs/ControlStructures/ElseIfDeclarationSniff.php new file mode 100644 index 00000000..8abb8fb3 --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Sniffs/ControlStructures/ElseIfDeclarationSniff.php @@ -0,0 +1,51 @@ + + * @copyright 2006-2015 Squiz Pty Ltd (ABN 77 084 670 600) + * @license https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence + */ + +namespace PHP_CodeSniffer\Standards\Squiz\Sniffs\ControlStructures; + +use PHP_CodeSniffer\Files\File; +use PHP_CodeSniffer\Sniffs\Sniff; + +class ElseIfDeclarationSniff implements Sniff +{ + + + /** + * Returns an array of tokens this test wants to listen for. + * + * @return array + */ + public function register() + { + return [T_ELSEIF]; + + }//end register() + + + /** + * Processes this test, when one of its tokens is encountered. + * + * @param \PHP_CodeSniffer\Files\File $phpcsFile The file being scanned. + * @param int $stackPtr The position of the current token in the + * stack passed in $tokens. + * + * @return void + */ + public function process(File $phpcsFile, $stackPtr) + { + $error = 'Usage of ELSEIF not allowed; use ELSE IF instead'; + $fix = $phpcsFile->addFixableError($error, $stackPtr, 'NotAllowed'); + if ($fix === true) { + $phpcsFile->fixer->replaceToken($stackPtr, 'else if'); + } + + }//end process() + + +}//end class diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Sniffs/ControlStructures/ForEachLoopDeclarationSniff.php b/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Sniffs/ControlStructures/ForEachLoopDeclarationSniff.php new file mode 100644 index 00000000..c5f22e23 --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Sniffs/ControlStructures/ForEachLoopDeclarationSniff.php @@ -0,0 +1,236 @@ + + * @copyright 2006-2015 Squiz Pty Ltd (ABN 77 084 670 600) + * @license https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence + */ + +namespace PHP_CodeSniffer\Standards\Squiz\Sniffs\ControlStructures; + +use PHP_CodeSniffer\Files\File; +use PHP_CodeSniffer\Sniffs\Sniff; + +class ForEachLoopDeclarationSniff implements Sniff +{ + + /** + * How many spaces should follow the opening bracket. + * + * @var integer + */ + public $requiredSpacesAfterOpen = 0; + + /** + * How many spaces should precede the closing bracket. + * + * @var integer + */ + public $requiredSpacesBeforeClose = 0; + + + /** + * Returns an array of tokens this test wants to listen for. + * + * @return array + */ + public function register() + { + return [T_FOREACH]; + + }//end register() + + + /** + * Processes this test, when one of its tokens is encountered. + * + * @param \PHP_CodeSniffer\Files\File $phpcsFile The file being scanned. + * @param int $stackPtr The position of the current token in the + * stack passed in $tokens. + * + * @return void + */ + public function process(File $phpcsFile, $stackPtr) + { + $this->requiredSpacesAfterOpen = (int) $this->requiredSpacesAfterOpen; + $this->requiredSpacesBeforeClose = (int) $this->requiredSpacesBeforeClose; + $tokens = $phpcsFile->getTokens(); + + $openingBracket = $phpcsFile->findNext(T_OPEN_PARENTHESIS, $stackPtr); + if ($openingBracket === false) { + $error = 'Possible parse error: FOREACH has no opening parenthesis'; + $phpcsFile->addWarning($error, $stackPtr, 'MissingOpenParenthesis'); + return; + } + + if (isset($tokens[$openingBracket]['parenthesis_closer']) === false) { + $error = 'Possible parse error: FOREACH has no closing parenthesis'; + $phpcsFile->addWarning($error, $stackPtr, 'MissingCloseParenthesis'); + return; + } + + $closingBracket = $tokens[$openingBracket]['parenthesis_closer']; + + if ($this->requiredSpacesAfterOpen === 0 && $tokens[($openingBracket + 1)]['code'] === T_WHITESPACE) { + $error = 'Space found after opening bracket of FOREACH loop'; + $fix = $phpcsFile->addFixableError($error, $stackPtr, 'SpaceAfterOpen'); + if ($fix === true) { + $phpcsFile->fixer->replaceToken(($openingBracket + 1), ''); + } + } else if ($this->requiredSpacesAfterOpen > 0) { + $spaceAfterOpen = 0; + if ($tokens[($openingBracket + 1)]['code'] === T_WHITESPACE) { + $spaceAfterOpen = $tokens[($openingBracket + 1)]['length']; + } + + if ($spaceAfterOpen !== $this->requiredSpacesAfterOpen) { + $error = 'Expected %s spaces after opening bracket; %s found'; + $data = [ + $this->requiredSpacesAfterOpen, + $spaceAfterOpen, + ]; + $fix = $phpcsFile->addFixableError($error, $stackPtr, 'SpacingAfterOpen', $data); + if ($fix === true) { + $padding = str_repeat(' ', $this->requiredSpacesAfterOpen); + if ($spaceAfterOpen === 0) { + $phpcsFile->fixer->addContent($openingBracket, $padding); + } else { + $phpcsFile->fixer->replaceToken(($openingBracket + 1), $padding); + } + } + } + }//end if + + if ($this->requiredSpacesBeforeClose === 0 && $tokens[($closingBracket - 1)]['code'] === T_WHITESPACE) { + $error = 'Space found before closing bracket of FOREACH loop'; + $fix = $phpcsFile->addFixableError($error, $stackPtr, 'SpaceBeforeClose'); + if ($fix === true) { + $phpcsFile->fixer->replaceToken(($closingBracket - 1), ''); + } + } else if ($this->requiredSpacesBeforeClose > 0) { + $spaceBeforeClose = 0; + if ($tokens[($closingBracket - 1)]['code'] === T_WHITESPACE) { + $spaceBeforeClose = $tokens[($closingBracket - 1)]['length']; + } + + if ($spaceBeforeClose !== $this->requiredSpacesBeforeClose) { + $error = 'Expected %s spaces before closing bracket; %s found'; + $data = [ + $this->requiredSpacesBeforeClose, + $spaceBeforeClose, + ]; + $fix = $phpcsFile->addFixableError($error, $stackPtr, 'SpaceBeforeClose', $data); + if ($fix === true) { + $padding = str_repeat(' ', $this->requiredSpacesBeforeClose); + if ($spaceBeforeClose === 0) { + $phpcsFile->fixer->addContentBefore($closingBracket, $padding); + } else { + $phpcsFile->fixer->replaceToken(($closingBracket - 1), $padding); + } + } + } + }//end if + + $asToken = $phpcsFile->findNext(T_AS, $openingBracket); + if ($asToken === false) { + $error = 'Possible parse error: FOREACH has no AS statement'; + $phpcsFile->addWarning($error, $stackPtr, 'MissingAs'); + return; + } + + $content = $tokens[$asToken]['content']; + if ($content !== strtolower($content)) { + $expected = strtolower($content); + $error = 'AS keyword must be lowercase; expected "%s" but found "%s"'; + $data = [ + $expected, + $content, + ]; + + $fix = $phpcsFile->addFixableError($error, $asToken, 'AsNotLower', $data); + if ($fix === true) { + $phpcsFile->fixer->replaceToken($asToken, $expected); + } + } + + $doubleArrow = $phpcsFile->findNext(T_DOUBLE_ARROW, $asToken, $closingBracket); + + if ($doubleArrow !== false) { + if ($tokens[($doubleArrow - 1)]['code'] !== T_WHITESPACE) { + $error = 'Expected 1 space before "=>"; 0 found'; + $fix = $phpcsFile->addFixableError($error, $stackPtr, 'NoSpaceBeforeArrow'); + if ($fix === true) { + $phpcsFile->fixer->addContentBefore($doubleArrow, ' '); + } + } else { + if ($tokens[($doubleArrow - 1)]['length'] !== 1) { + $spaces = $tokens[($doubleArrow - 1)]['length']; + $error = 'Expected 1 space before "=>"; %s found'; + $data = [$spaces]; + $fix = $phpcsFile->addFixableError($error, $stackPtr, 'SpacingBeforeArrow', $data); + if ($fix === true) { + $phpcsFile->fixer->replaceToken(($doubleArrow - 1), ' '); + } + } + } + + if ($tokens[($doubleArrow + 1)]['code'] !== T_WHITESPACE) { + $error = 'Expected 1 space after "=>"; 0 found'; + $fix = $phpcsFile->addFixableError($error, $stackPtr, 'NoSpaceAfterArrow'); + if ($fix === true) { + $phpcsFile->fixer->addContent($doubleArrow, ' '); + } + } else { + if ($tokens[($doubleArrow + 1)]['length'] !== 1) { + $spaces = $tokens[($doubleArrow + 1)]['length']; + $error = 'Expected 1 space after "=>"; %s found'; + $data = [$spaces]; + $fix = $phpcsFile->addFixableError($error, $stackPtr, 'SpacingAfterArrow', $data); + if ($fix === true) { + $phpcsFile->fixer->replaceToken(($doubleArrow + 1), ' '); + } + } + } + }//end if + + if ($tokens[($asToken - 1)]['code'] !== T_WHITESPACE) { + $error = 'Expected 1 space before "as"; 0 found'; + $fix = $phpcsFile->addFixableError($error, $stackPtr, 'NoSpaceBeforeAs'); + if ($fix === true) { + $phpcsFile->fixer->addContentBefore($asToken, ' '); + } + } else { + if ($tokens[($asToken - 1)]['length'] !== 1) { + $spaces = $tokens[($asToken - 1)]['length']; + $error = 'Expected 1 space before "as"; %s found'; + $data = [$spaces]; + $fix = $phpcsFile->addFixableError($error, $stackPtr, 'SpacingBeforeAs', $data); + if ($fix === true) { + $phpcsFile->fixer->replaceToken(($asToken - 1), ' '); + } + } + } + + if ($tokens[($asToken + 1)]['code'] !== T_WHITESPACE) { + $error = 'Expected 1 space after "as"; 0 found'; + $fix = $phpcsFile->addFixableError($error, $stackPtr, 'NoSpaceAfterAs'); + if ($fix === true) { + $phpcsFile->fixer->addContent($asToken, ' '); + } + } else { + if ($tokens[($asToken + 1)]['length'] !== 1) { + $spaces = $tokens[($asToken + 1)]['length']; + $error = 'Expected 1 space after "as"; %s found'; + $data = [$spaces]; + $fix = $phpcsFile->addFixableError($error, $stackPtr, 'SpacingAfterAs', $data); + if ($fix === true) { + $phpcsFile->fixer->replaceToken(($asToken + 1), ' '); + } + } + } + + }//end process() + + +}//end class diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Sniffs/ControlStructures/ForLoopDeclarationSniff.php b/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Sniffs/ControlStructures/ForLoopDeclarationSniff.php new file mode 100644 index 00000000..6803f9ab --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Sniffs/ControlStructures/ForLoopDeclarationSniff.php @@ -0,0 +1,316 @@ + + * @copyright 2006-2015 Squiz Pty Ltd (ABN 77 084 670 600) + * @license https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence + */ + +namespace PHP_CodeSniffer\Standards\Squiz\Sniffs\ControlStructures; + +use PHP_CodeSniffer\Files\File; +use PHP_CodeSniffer\Sniffs\Sniff; +use PHP_CodeSniffer\Util\Tokens; + +class ForLoopDeclarationSniff implements Sniff +{ + + /** + * How many spaces should follow the opening bracket. + * + * @var integer + */ + public $requiredSpacesAfterOpen = 0; + + /** + * How many spaces should precede the closing bracket. + * + * @var integer + */ + public $requiredSpacesBeforeClose = 0; + + /** + * Allow newlines instead of spaces. + * + * @var boolean + */ + public $ignoreNewlines = false; + + /** + * A list of tokenizers this sniff supports. + * + * @var array + */ + public $supportedTokenizers = [ + 'PHP', + 'JS', + ]; + + + /** + * Returns an array of tokens this test wants to listen for. + * + * @return array + */ + public function register() + { + return [T_FOR]; + + }//end register() + + + /** + * Processes this test, when one of its tokens is encountered. + * + * @param \PHP_CodeSniffer\Files\File $phpcsFile The file being scanned. + * @param int $stackPtr The position of the current token in the + * stack passed in $tokens. + * + * @return void + */ + public function process(File $phpcsFile, $stackPtr) + { + $this->requiredSpacesAfterOpen = (int) $this->requiredSpacesAfterOpen; + $this->requiredSpacesBeforeClose = (int) $this->requiredSpacesBeforeClose; + $tokens = $phpcsFile->getTokens(); + + $openingBracket = $phpcsFile->findNext(T_OPEN_PARENTHESIS, $stackPtr); + if ($openingBracket === false) { + $error = 'Possible parse error: no opening parenthesis for FOR keyword'; + $phpcsFile->addWarning($error, $stackPtr, 'NoOpenBracket'); + return; + } + + $closingBracket = $tokens[$openingBracket]['parenthesis_closer']; + + if ($this->requiredSpacesAfterOpen === 0 + && $tokens[($openingBracket + 1)]['code'] === T_WHITESPACE + ) { + $nextNonWhiteSpace = $phpcsFile->findNext(T_WHITESPACE, ($openingBracket + 1), $closingBracket, true); + if ($this->ignoreNewlines === false + || $tokens[$nextNonWhiteSpace]['line'] === $tokens[$openingBracket]['line'] + ) { + $error = 'Whitespace found after opening bracket of FOR loop'; + $fix = $phpcsFile->addFixableError($error, $openingBracket, 'SpacingAfterOpen'); + if ($fix === true) { + $phpcsFile->fixer->beginChangeset(); + for ($i = ($openingBracket + 1); $i < $closingBracket; $i++) { + if ($tokens[$i]['code'] !== T_WHITESPACE) { + break; + } + + $phpcsFile->fixer->replaceToken($i, ''); + } + + $phpcsFile->fixer->endChangeset(); + } + } + } else if ($this->requiredSpacesAfterOpen > 0) { + $nextNonWhiteSpace = $phpcsFile->findNext(T_WHITESPACE, ($openingBracket + 1), $closingBracket, true); + $spaceAfterOpen = 0; + if ($tokens[$openingBracket]['line'] !== $tokens[$nextNonWhiteSpace]['line']) { + $spaceAfterOpen = 'newline'; + } else if ($tokens[($openingBracket + 1)]['code'] === T_WHITESPACE) { + $spaceAfterOpen = $tokens[($openingBracket + 1)]['length']; + } + + if ($spaceAfterOpen !== $this->requiredSpacesAfterOpen + && ($this->ignoreNewlines === false + || $spaceAfterOpen !== 'newline') + ) { + $error = 'Expected %s spaces after opening bracket; %s found'; + $data = [ + $this->requiredSpacesAfterOpen, + $spaceAfterOpen, + ]; + $fix = $phpcsFile->addFixableError($error, $openingBracket, 'SpacingAfterOpen', $data); + if ($fix === true) { + $padding = str_repeat(' ', $this->requiredSpacesAfterOpen); + if ($spaceAfterOpen === 0) { + $phpcsFile->fixer->addContent($openingBracket, $padding); + } else { + $phpcsFile->fixer->beginChangeset(); + $phpcsFile->fixer->replaceToken(($openingBracket + 1), $padding); + for ($i = ($openingBracket + 2); $i < $nextNonWhiteSpace; $i++) { + $phpcsFile->fixer->replaceToken($i, ''); + } + + $phpcsFile->fixer->endChangeset(); + } + } + }//end if + }//end if + + $prevNonWhiteSpace = $phpcsFile->findPrevious(T_WHITESPACE, ($closingBracket - 1), $openingBracket, true); + $beforeClosefixable = true; + if ($tokens[$prevNonWhiteSpace]['line'] !== $tokens[$closingBracket]['line'] + && isset(Tokens::$emptyTokens[$tokens[$prevNonWhiteSpace]['code']]) === true + ) { + $beforeClosefixable = false; + } + + if ($this->requiredSpacesBeforeClose === 0 + && $tokens[($closingBracket - 1)]['code'] === T_WHITESPACE + && ($this->ignoreNewlines === false + || $tokens[$prevNonWhiteSpace]['line'] === $tokens[$closingBracket]['line']) + ) { + $error = 'Whitespace found before closing bracket of FOR loop'; + + if ($beforeClosefixable === false) { + $phpcsFile->addError($error, $closingBracket, 'SpacingBeforeClose'); + } else { + $fix = $phpcsFile->addFixableError($error, $closingBracket, 'SpacingBeforeClose'); + if ($fix === true) { + $phpcsFile->fixer->beginChangeset(); + for ($i = ($closingBracket - 1); $i > $openingBracket; $i--) { + if ($tokens[$i]['code'] !== T_WHITESPACE) { + break; + } + + $phpcsFile->fixer->replaceToken($i, ''); + } + + $phpcsFile->fixer->endChangeset(); + } + } + } else if ($this->requiredSpacesBeforeClose > 0) { + $spaceBeforeClose = 0; + if ($tokens[$closingBracket]['line'] !== $tokens[$prevNonWhiteSpace]['line']) { + $spaceBeforeClose = 'newline'; + } else if ($tokens[($closingBracket - 1)]['code'] === T_WHITESPACE) { + $spaceBeforeClose = $tokens[($closingBracket - 1)]['length']; + } + + if ($this->requiredSpacesBeforeClose !== $spaceBeforeClose + && ($this->ignoreNewlines === false + || $spaceBeforeClose !== 'newline') + ) { + $error = 'Expected %s spaces before closing bracket; %s found'; + $data = [ + $this->requiredSpacesBeforeClose, + $spaceBeforeClose, + ]; + + if ($beforeClosefixable === false) { + $phpcsFile->addError($error, $closingBracket, 'SpacingBeforeClose', $data); + } else { + $fix = $phpcsFile->addFixableError($error, $closingBracket, 'SpacingBeforeClose', $data); + if ($fix === true) { + $padding = str_repeat(' ', $this->requiredSpacesBeforeClose); + if ($spaceBeforeClose === 0) { + $phpcsFile->fixer->addContentBefore($closingBracket, $padding); + } else { + $phpcsFile->fixer->beginChangeset(); + $phpcsFile->fixer->replaceToken(($closingBracket - 1), $padding); + for ($i = ($closingBracket - 2); $i > $prevNonWhiteSpace; $i--) { + $phpcsFile->fixer->replaceToken($i, ''); + } + + $phpcsFile->fixer->endChangeset(); + } + } + } + }//end if + }//end if + + /* + * Check whitespace around each of the semicolon tokens. + */ + + $semicolonCount = 0; + $semicolon = $openingBracket; + $targetNestinglevel = 0; + if (isset($tokens[$openingBracket]['conditions']) === true) { + $targetNestinglevel += count($tokens[$openingBracket]['conditions']); + } + + do { + $semicolon = $phpcsFile->findNext(T_SEMICOLON, ($semicolon + 1), $closingBracket); + if ($semicolon === false) { + break; + } + + if (isset($tokens[$semicolon]['conditions']) === true + && count($tokens[$semicolon]['conditions']) > $targetNestinglevel + ) { + // Semicolon doesn't belong to the for(). + continue; + } + + ++$semicolonCount; + + $humanReadableCount = 'first'; + if ($semicolonCount !== 1) { + $humanReadableCount = 'second'; + } + + $humanReadableCode = ucfirst($humanReadableCount); + $data = [$humanReadableCount]; + + // Only examine the space before the first semicolon if the first expression is not empty. + // If it *is* empty, leave it up to the `SpacingAfterOpen` logic. + $prevNonWhiteSpace = $phpcsFile->findPrevious(T_WHITESPACE, ($semicolon - 1), $openingBracket, true); + if ($semicolonCount !== 1 || $prevNonWhiteSpace !== $openingBracket) { + if ($tokens[($semicolon - 1)]['code'] === T_WHITESPACE) { + $error = 'Whitespace found before %s semicolon of FOR loop'; + $errorCode = 'SpacingBefore'.$humanReadableCode; + $fix = $phpcsFile->addFixableError($error, $semicolon, $errorCode, $data); + if ($fix === true) { + $phpcsFile->fixer->beginChangeset(); + for ($i = ($semicolon - 1); $i > $prevNonWhiteSpace; $i--) { + $phpcsFile->fixer->replaceToken($i, ''); + } + + $phpcsFile->fixer->endChangeset(); + } + } + } + + // Only examine the space after the second semicolon if the last expression is not empty. + // If it *is* empty, leave it up to the `SpacingBeforeClose` logic. + $nextNonWhiteSpace = $phpcsFile->findNext(T_WHITESPACE, ($semicolon + 1), ($closingBracket + 1), true); + if ($semicolonCount !== 2 || $nextNonWhiteSpace !== $closingBracket) { + if ($tokens[($semicolon + 1)]['code'] !== T_WHITESPACE + && $tokens[($semicolon + 1)]['code'] !== T_SEMICOLON + ) { + $error = 'Expected 1 space after %s semicolon of FOR loop; 0 found'; + $errorCode = 'NoSpaceAfter'.$humanReadableCode; + $fix = $phpcsFile->addFixableError($error, $semicolon, $errorCode, $data); + if ($fix === true) { + $phpcsFile->fixer->addContent($semicolon, ' '); + } + } else if ($tokens[($semicolon + 1)]['code'] === T_WHITESPACE + && $tokens[$nextNonWhiteSpace]['code'] !== T_SEMICOLON + ) { + $spaces = $tokens[($semicolon + 1)]['length']; + if ($tokens[$semicolon]['line'] !== $tokens[$nextNonWhiteSpace]['line']) { + $spaces = 'newline'; + } + + if ($spaces !== 1 + && ($this->ignoreNewlines === false + || $spaces !== 'newline') + ) { + $error = 'Expected 1 space after %s semicolon of FOR loop; %s found'; + $errorCode = 'SpacingAfter'.$humanReadableCode; + $data[] = $spaces; + $fix = $phpcsFile->addFixableError($error, $semicolon, $errorCode, $data); + if ($fix === true) { + $phpcsFile->fixer->beginChangeset(); + $phpcsFile->fixer->replaceToken(($semicolon + 1), ' '); + for ($i = ($semicolon + 2); $i < $nextNonWhiteSpace; $i++) { + $phpcsFile->fixer->replaceToken($i, ''); + } + + $phpcsFile->fixer->endChangeset(); + } + } + }//end if + }//end if + } while ($semicolonCount < 2); + + }//end process() + + +}//end class diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Sniffs/ControlStructures/InlineIfDeclarationSniff.php b/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Sniffs/ControlStructures/InlineIfDeclarationSniff.php new file mode 100644 index 00000000..28443794 --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Sniffs/ControlStructures/InlineIfDeclarationSniff.php @@ -0,0 +1,155 @@ + + * @copyright 2006-2015 Squiz Pty Ltd (ABN 77 084 670 600) + * @license https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence + */ + +namespace PHP_CodeSniffer\Standards\Squiz\Sniffs\ControlStructures; + +use PHP_CodeSniffer\Files\File; +use PHP_CodeSniffer\Sniffs\Sniff; + +class InlineIfDeclarationSniff implements Sniff +{ + + + /** + * Returns an array of tokens this test wants to listen for. + * + * @return array + */ + public function register() + { + return [T_INLINE_THEN]; + + }//end register() + + + /** + * Processes this sniff, when one of its tokens is encountered. + * + * @param \PHP_CodeSniffer\Files\File $phpcsFile The file being scanned. + * @param int $stackPtr The position of the current token in the + * stack passed in $tokens. + * + * @return void + */ + public function process(File $phpcsFile, $stackPtr) + { + $tokens = $phpcsFile->getTokens(); + + $openBracket = null; + $closeBracket = null; + if (isset($tokens[$stackPtr]['nested_parenthesis']) === true) { + $parens = $tokens[$stackPtr]['nested_parenthesis']; + $openBracket = array_pop($parens); + $closeBracket = $tokens[$openBracket]['parenthesis_closer']; + } + + // Find the beginning of the statement. If we don't find a + // semicolon (end of statement) or comma (end of array value) + // then assume the content before the closing parenthesis is the end. + $else = $phpcsFile->findNext(T_INLINE_ELSE, ($stackPtr + 1)); + $statementEnd = $phpcsFile->findNext([T_SEMICOLON, T_COMMA], ($else + 1), $closeBracket); + if ($statementEnd === false) { + $statementEnd = $phpcsFile->findPrevious(T_WHITESPACE, ($closeBracket - 1), null, true); + } + + // Make sure it's all on the same line. + if ($tokens[$statementEnd]['line'] !== $tokens[$stackPtr]['line']) { + $error = 'Inline shorthand IF statement must be declared on a single line'; + $phpcsFile->addError($error, $stackPtr, 'NotSingleLine'); + return; + } + + // Make sure there are spaces around the question mark. + $contentBefore = $phpcsFile->findPrevious(T_WHITESPACE, ($stackPtr - 1), null, true); + $contentAfter = $phpcsFile->findNext(T_WHITESPACE, ($stackPtr + 1), null, true); + if ($tokens[$contentBefore]['code'] !== T_CLOSE_PARENTHESIS) { + $error = 'Inline shorthand IF statement requires brackets around comparison'; + $phpcsFile->addError($error, $stackPtr, 'NoBrackets'); + } + + $spaceBefore = ($tokens[$stackPtr]['column'] - ($tokens[$contentBefore]['column'] + $tokens[$contentBefore]['length'])); + if ($spaceBefore !== 1) { + $error = 'Inline shorthand IF statement requires 1 space before THEN; %s found'; + $data = [$spaceBefore]; + $fix = $phpcsFile->addFixableError($error, $stackPtr, 'SpacingBeforeThen', $data); + if ($fix === true) { + if ($spaceBefore === 0) { + $phpcsFile->fixer->addContentBefore($stackPtr, ' '); + } else { + $phpcsFile->fixer->replaceToken(($stackPtr - 1), ' '); + } + } + } + + // If there is no content between the ? and the : operators, then they are + // trying to replicate an elvis operator, even though PHP doesn't have one. + // In this case, we want no spaces between the two operators so ?: looks like + // an operator itself. + $next = $phpcsFile->findNext(T_WHITESPACE, ($stackPtr + 1), null, true); + if ($tokens[$next]['code'] === T_INLINE_ELSE) { + $inlineElse = $next; + if ($inlineElse !== ($stackPtr + 1)) { + $error = 'Inline shorthand IF statement without THEN statement requires 0 spaces between THEN and ELSE'; + $fix = $phpcsFile->addFixableError($error, $stackPtr, 'ElvisSpacing'); + if ($fix === true) { + $phpcsFile->fixer->replaceToken(($stackPtr + 1), ''); + } + } + } else { + $spaceAfter = (($tokens[$contentAfter]['column']) - ($tokens[$stackPtr]['column'] + 1)); + if ($spaceAfter !== 1) { + $error = 'Inline shorthand IF statement requires 1 space after THEN; %s found'; + $data = [$spaceAfter]; + $fix = $phpcsFile->addFixableError($error, $stackPtr, 'SpacingAfterThen', $data); + if ($fix === true) { + if ($spaceAfter === 0) { + $phpcsFile->fixer->addContent($stackPtr, ' '); + } else { + $phpcsFile->fixer->replaceToken(($stackPtr + 1), ' '); + } + } + } + + // Make sure the ELSE has the correct spacing. + $inlineElse = $phpcsFile->findNext(T_INLINE_ELSE, ($stackPtr + 1), $statementEnd, false); + $contentBefore = $phpcsFile->findPrevious(T_WHITESPACE, ($inlineElse - 1), null, true); + $spaceBefore = ($tokens[$inlineElse]['column'] - ($tokens[$contentBefore]['column'] + $tokens[$contentBefore]['length'])); + if ($spaceBefore !== 1) { + $error = 'Inline shorthand IF statement requires 1 space before ELSE; %s found'; + $data = [$spaceBefore]; + $fix = $phpcsFile->addFixableError($error, $inlineElse, 'SpacingBeforeElse', $data); + if ($fix === true) { + if ($spaceBefore === 0) { + $phpcsFile->fixer->addContentBefore($inlineElse, ' '); + } else { + $phpcsFile->fixer->replaceToken(($inlineElse - 1), ' '); + } + } + } + }//end if + + $contentAfter = $phpcsFile->findNext(T_WHITESPACE, ($inlineElse + 1), null, true); + $spaceAfter = (($tokens[$contentAfter]['column']) - ($tokens[$inlineElse]['column'] + 1)); + if ($spaceAfter !== 1) { + $error = 'Inline shorthand IF statement requires 1 space after ELSE; %s found'; + $data = [$spaceAfter]; + $fix = $phpcsFile->addFixableError($error, $inlineElse, 'SpacingAfterElse', $data); + if ($fix === true) { + if ($spaceAfter === 0) { + $phpcsFile->fixer->addContent($inlineElse, ' '); + } else { + $phpcsFile->fixer->replaceToken(($inlineElse + 1), ' '); + } + } + } + + }//end process() + + +}//end class diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Sniffs/ControlStructures/LowercaseDeclarationSniff.php b/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Sniffs/ControlStructures/LowercaseDeclarationSniff.php new file mode 100644 index 00000000..cba07684 --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Sniffs/ControlStructures/LowercaseDeclarationSniff.php @@ -0,0 +1,75 @@ + + * @copyright 2006-2015 Squiz Pty Ltd (ABN 77 084 670 600) + * @license https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence + */ + +namespace PHP_CodeSniffer\Standards\Squiz\Sniffs\ControlStructures; + +use PHP_CodeSniffer\Files\File; +use PHP_CodeSniffer\Sniffs\Sniff; + +class LowercaseDeclarationSniff implements Sniff +{ + + + /** + * Returns an array of tokens this test wants to listen for. + * + * @return array + */ + public function register() + { + return [ + T_IF, + T_ELSE, + T_ELSEIF, + T_FOREACH, + T_FOR, + T_DO, + T_SWITCH, + T_WHILE, + T_TRY, + T_CATCH, + T_MATCH, + ]; + + }//end register() + + + /** + * Processes this test, when one of its tokens is encountered. + * + * @param \PHP_CodeSniffer\Files\File $phpcsFile The file being scanned. + * @param int $stackPtr The position of the current token in + * the stack passed in $tokens. + * + * @return void + */ + public function process(File $phpcsFile, $stackPtr) + { + $tokens = $phpcsFile->getTokens(); + + $content = $tokens[$stackPtr]['content']; + $contentLc = strtolower($content); + if ($content !== $contentLc) { + $error = '%s keyword must be lowercase; expected "%s" but found "%s"'; + $data = [ + strtoupper($content), + $contentLc, + $content, + ]; + + $fix = $phpcsFile->addFixableError($error, $stackPtr, 'FoundUppercase', $data); + if ($fix === true) { + $phpcsFile->fixer->replaceToken($stackPtr, $contentLc); + } + } + + }//end process() + + +}//end class diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Sniffs/ControlStructures/SwitchDeclarationSniff.php b/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Sniffs/ControlStructures/SwitchDeclarationSniff.php new file mode 100644 index 00000000..a5f3769d --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Sniffs/ControlStructures/SwitchDeclarationSniff.php @@ -0,0 +1,304 @@ + + * @copyright 2006-2015 Squiz Pty Ltd (ABN 77 084 670 600) + * @license https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence + */ + +namespace PHP_CodeSniffer\Standards\Squiz\Sniffs\ControlStructures; + +use PHP_CodeSniffer\Files\File; +use PHP_CodeSniffer\Sniffs\Sniff; +use PHP_CodeSniffer\Util\Tokens; + +class SwitchDeclarationSniff implements Sniff +{ + + /** + * A list of tokenizers this sniff supports. + * + * @var array + */ + public $supportedTokenizers = [ + 'PHP', + 'JS', + ]; + + /** + * The number of spaces code should be indented. + * + * @var integer + */ + public $indent = 4; + + + /** + * Returns an array of tokens this test wants to listen for. + * + * @return array + */ + public function register() + { + return [T_SWITCH]; + + }//end register() + + + /** + * Processes this test, when one of its tokens is encountered. + * + * @param \PHP_CodeSniffer\Files\File $phpcsFile The file being scanned. + * @param int $stackPtr The position of the current token in the + * stack passed in $tokens. + * + * @return void + */ + public function process(File $phpcsFile, $stackPtr) + { + $tokens = $phpcsFile->getTokens(); + + // We can't process SWITCH statements unless we know where they start and end. + if (isset($tokens[$stackPtr]['scope_opener']) === false + || isset($tokens[$stackPtr]['scope_closer']) === false + ) { + return; + } + + $switch = $tokens[$stackPtr]; + $nextCase = $stackPtr; + $caseAlignment = ($switch['column'] + $this->indent); + $caseCount = 0; + $foundDefault = false; + + while (($nextCase = $phpcsFile->findNext([T_CASE, T_DEFAULT, T_SWITCH], ($nextCase + 1), $switch['scope_closer'])) !== false) { + // Skip nested SWITCH statements; they are handled on their own. + if ($tokens[$nextCase]['code'] === T_SWITCH) { + $nextCase = $tokens[$nextCase]['scope_closer']; + continue; + } + + if ($tokens[$nextCase]['code'] === T_DEFAULT) { + $type = 'Default'; + $foundDefault = true; + } else { + $type = 'Case'; + $caseCount++; + } + + if ($tokens[$nextCase]['content'] !== strtolower($tokens[$nextCase]['content'])) { + $expected = strtolower($tokens[$nextCase]['content']); + $error = strtoupper($type).' keyword must be lowercase; expected "%s" but found "%s"'; + $data = [ + $expected, + $tokens[$nextCase]['content'], + ]; + + $fix = $phpcsFile->addFixableError($error, $nextCase, $type.'NotLower', $data); + if ($fix === true) { + $phpcsFile->fixer->replaceToken($nextCase, $expected); + } + } + + if ($tokens[$nextCase]['column'] !== $caseAlignment) { + $error = strtoupper($type).' keyword must be indented '.$this->indent.' spaces from SWITCH keyword'; + $fix = $phpcsFile->addFixableError($error, $nextCase, $type.'Indent'); + + if ($fix === true) { + $padding = str_repeat(' ', ($caseAlignment - 1)); + if ($tokens[$nextCase]['column'] === 1 + || $tokens[($nextCase - 1)]['code'] !== T_WHITESPACE + ) { + $phpcsFile->fixer->addContentBefore($nextCase, $padding); + } else { + $phpcsFile->fixer->replaceToken(($nextCase - 1), $padding); + } + } + } + + if ($type === 'Case' + && ($tokens[($nextCase + 1)]['type'] !== 'T_WHITESPACE' + || $tokens[($nextCase + 1)]['content'] !== ' ') + ) { + $error = 'CASE keyword must be followed by a single space'; + $fix = $phpcsFile->addFixableError($error, $nextCase, 'SpacingAfterCase'); + if ($fix === true) { + if ($tokens[($nextCase + 1)]['type'] !== 'T_WHITESPACE') { + $phpcsFile->fixer->addContent($nextCase, ' '); + } else { + $phpcsFile->fixer->replaceToken(($nextCase + 1), ' '); + } + } + } + + if (isset($tokens[$nextCase]['scope_opener']) === false) { + $error = 'Possible parse error: CASE missing opening colon'; + $phpcsFile->addWarning($error, $nextCase, 'MissingColon'); + continue; + } + + $opener = $tokens[$nextCase]['scope_opener']; + if ($tokens[($opener - 1)]['type'] === 'T_WHITESPACE') { + $error = 'There must be no space before the colon in a '.strtoupper($type).' statement'; + $fix = $phpcsFile->addFixableError($error, $nextCase, 'SpaceBeforeColon'.$type); + if ($fix === true) { + $phpcsFile->fixer->replaceToken(($opener - 1), ''); + } + } + + $nextBreak = $tokens[$nextCase]['scope_closer']; + if ($tokens[$nextBreak]['code'] === T_BREAK + || $tokens[$nextBreak]['code'] === T_RETURN + || $tokens[$nextBreak]['code'] === T_CONTINUE + || $tokens[$nextBreak]['code'] === T_THROW + || $tokens[$nextBreak]['code'] === T_EXIT + ) { + if ($tokens[$nextBreak]['scope_condition'] === $nextCase) { + // Only need to check a couple of things once, even if the + // break is shared between multiple case statements, or even + // the default case. + if ($tokens[$nextBreak]['column'] !== $caseAlignment) { + $error = 'Case breaking statement must be indented '.$this->indent.' spaces from SWITCH keyword'; + $fix = $phpcsFile->addFixableError($error, $nextBreak, 'BreakIndent'); + + if ($fix === true) { + $padding = str_repeat(' ', ($caseAlignment - 1)); + if ($tokens[$nextBreak]['column'] === 1 + || $tokens[($nextBreak - 1)]['code'] !== T_WHITESPACE + ) { + $phpcsFile->fixer->addContentBefore($nextBreak, $padding); + } else { + $phpcsFile->fixer->replaceToken(($nextBreak - 1), $padding); + } + } + } + + $prev = $phpcsFile->findPrevious(T_WHITESPACE, ($nextBreak - 1), $stackPtr, true); + if ($tokens[$prev]['line'] !== ($tokens[$nextBreak]['line'] - 1)) { + $error = 'Blank lines are not allowed before case breaking statements'; + $phpcsFile->addError($error, $nextBreak, 'SpacingBeforeBreak'); + } + + $nextLine = $tokens[$tokens[$stackPtr]['scope_closer']]['line']; + $semicolon = $phpcsFile->findEndOfStatement($nextBreak); + for ($i = ($semicolon + 1); $i < $tokens[$stackPtr]['scope_closer']; $i++) { + if ($tokens[$i]['type'] !== 'T_WHITESPACE') { + $nextLine = $tokens[$i]['line']; + break; + } + } + + if ($type === 'Case') { + // Ensure the BREAK statement is followed by + // a single blank line, or the end switch brace. + if ($nextLine !== ($tokens[$semicolon]['line'] + 2) && $i !== $tokens[$stackPtr]['scope_closer']) { + $error = 'Case breaking statements must be followed by a single blank line'; + $fix = $phpcsFile->addFixableError($error, $nextBreak, 'SpacingAfterBreak'); + if ($fix === true) { + $phpcsFile->fixer->beginChangeset(); + for ($i = ($semicolon + 1); $i <= $tokens[$stackPtr]['scope_closer']; $i++) { + if ($tokens[$i]['line'] === $nextLine) { + $phpcsFile->fixer->addNewlineBefore($i); + break; + } + + if ($tokens[$i]['line'] === $tokens[$semicolon]['line']) { + continue; + } + + $phpcsFile->fixer->replaceToken($i, ''); + } + + $phpcsFile->fixer->endChangeset(); + } + }//end if + } else { + // Ensure the BREAK statement is not followed by a blank line. + if ($nextLine !== ($tokens[$semicolon]['line'] + 1)) { + $error = 'Blank lines are not allowed after the DEFAULT case\'s breaking statement'; + $phpcsFile->addError($error, $nextBreak, 'SpacingAfterDefaultBreak'); + } + }//end if + + $caseLine = $tokens[$nextCase]['line']; + $nextLine = $tokens[$nextBreak]['line']; + for ($i = ($opener + 1); $i < $nextBreak; $i++) { + if ($tokens[$i]['type'] !== 'T_WHITESPACE') { + $nextLine = $tokens[$i]['line']; + break; + } + } + + if ($nextLine !== ($caseLine + 1)) { + $error = 'Blank lines are not allowed after '.strtoupper($type).' statements'; + $phpcsFile->addError($error, $nextCase, 'SpacingAfter'.$type); + } + }//end if + + if ($tokens[$nextBreak]['code'] === T_BREAK) { + if ($type === 'Case') { + // Ensure empty CASE statements are not allowed. + // They must have some code content in them. A comment is not enough. + // But count RETURN statements as valid content if they also + // happen to close the CASE statement. + $foundContent = false; + for ($i = ($tokens[$nextCase]['scope_opener'] + 1); $i < $nextBreak; $i++) { + if ($tokens[$i]['code'] === T_CASE) { + $i = $tokens[$i]['scope_opener']; + continue; + } + + if (isset(Tokens::$emptyTokens[$tokens[$i]['code']]) === false) { + $foundContent = true; + break; + } + } + + if ($foundContent === false) { + $error = 'Empty CASE statements are not allowed'; + $phpcsFile->addError($error, $nextCase, 'EmptyCase'); + } + } else { + // Ensure empty DEFAULT statements are not allowed. + // They must (at least) have a comment describing why + // the default case is being ignored. + $foundContent = false; + for ($i = ($tokens[$nextCase]['scope_opener'] + 1); $i < $nextBreak; $i++) { + if ($tokens[$i]['type'] !== 'T_WHITESPACE') { + $foundContent = true; + break; + } + } + + if ($foundContent === false) { + $error = 'Comment required for empty DEFAULT case'; + $phpcsFile->addError($error, $nextCase, 'EmptyDefault'); + } + }//end if + }//end if + } else if ($type === 'Default') { + $error = 'DEFAULT case must have a breaking statement'; + $phpcsFile->addError($error, $nextCase, 'DefaultNoBreak'); + }//end if + }//end while + + if ($foundDefault === false) { + $error = 'All SWITCH statements must contain a DEFAULT case'; + $phpcsFile->addError($error, $stackPtr, 'MissingDefault'); + } + + if ($tokens[$switch['scope_closer']]['column'] !== $switch['column']) { + $error = 'Closing brace of SWITCH statement must be aligned with SWITCH keyword'; + $phpcsFile->addError($error, $switch['scope_closer'], 'CloseBraceAlign'); + } + + if ($caseCount === 0) { + $error = 'SWITCH statements must contain at least one CASE statement'; + $phpcsFile->addError($error, $stackPtr, 'MissingCase'); + } + + }//end process() + + +}//end class diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Sniffs/Debug/JSLintSniff.php b/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Sniffs/Debug/JSLintSniff.php new file mode 100644 index 00000000..49dfc2c4 --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Sniffs/Debug/JSLintSniff.php @@ -0,0 +1,86 @@ + + * @copyright 2006-2015 Squiz Pty Ltd (ABN 77 084 670 600) + * @license https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence + */ + +namespace PHP_CodeSniffer\Standards\Squiz\Sniffs\Debug; + +use PHP_CodeSniffer\Config; +use PHP_CodeSniffer\Files\File; +use PHP_CodeSniffer\Sniffs\Sniff; +use PHP_CodeSniffer\Util\Common; + +class JSLintSniff implements Sniff +{ + + /** + * A list of tokenizers this sniff supports. + * + * @var array + */ + public $supportedTokenizers = ['JS']; + + + /** + * Returns the token types that this sniff is interested in. + * + * @return int[] + */ + public function register() + { + return [T_OPEN_TAG]; + + }//end register() + + + /** + * Processes the tokens that this sniff is interested in. + * + * @param \PHP_CodeSniffer\Files\File $phpcsFile The file where the token was found. + * @param int $stackPtr The position in the stack where + * the token was found. + * + * @return void + * @throws \PHP_CodeSniffer\Exceptions\RuntimeException If jslint.js could not be run + */ + public function process(File $phpcsFile, $stackPtr) + { + $rhinoPath = Config::getExecutablePath('rhino'); + $jslintPath = Config::getExecutablePath('jslint'); + if ($rhinoPath === null || $jslintPath === null) { + return; + } + + $fileName = $phpcsFile->getFilename(); + + $rhinoPath = Common::escapeshellcmd($rhinoPath); + $jslintPath = Common::escapeshellcmd($jslintPath); + + $cmd = "$rhinoPath \"$jslintPath\" ".escapeshellarg($fileName); + exec($cmd, $output, $retval); + + if (is_array($output) === true) { + foreach ($output as $finding) { + $matches = []; + $numMatches = preg_match('/Lint at line ([0-9]+).*:(.*)$/', $finding, $matches); + if ($numMatches === 0) { + continue; + } + + $line = (int) $matches[1]; + $message = 'jslint says: '.trim($matches[2]); + $phpcsFile->addWarningOnLine($message, $line, 'ExternalTool'); + } + } + + // Ignore the rest of the file. + return ($phpcsFile->numTokens + 1); + + }//end process() + + +}//end class diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Sniffs/Debug/JavaScriptLintSniff.php b/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Sniffs/Debug/JavaScriptLintSniff.php new file mode 100644 index 00000000..30dca672 --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Sniffs/Debug/JavaScriptLintSniff.php @@ -0,0 +1,89 @@ + + * @copyright 2006-2015 Squiz Pty Ltd (ABN 77 084 670 600) + * @license https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence + */ + +namespace PHP_CodeSniffer\Standards\Squiz\Sniffs\Debug; + +use PHP_CodeSniffer\Config; +use PHP_CodeSniffer\Exceptions\RuntimeException; +use PHP_CodeSniffer\Files\File; +use PHP_CodeSniffer\Sniffs\Sniff; +use PHP_CodeSniffer\Util\Common; + +class JavaScriptLintSniff implements Sniff +{ + + /** + * A list of tokenizers this sniff supports. + * + * @var array + */ + public $supportedTokenizers = ['JS']; + + + /** + * Returns the token types that this sniff is interested in. + * + * @return int[] + */ + public function register() + { + return [T_OPEN_TAG]; + + }//end register() + + + /** + * Processes the tokens that this sniff is interested in. + * + * @param \PHP_CodeSniffer\Files\File $phpcsFile The file where the token was found. + * @param int $stackPtr The position in the stack where + * the token was found. + * + * @return void + * @throws \PHP_CodeSniffer\Exceptions\RuntimeException If Javascript Lint ran into trouble. + */ + public function process(File $phpcsFile, $stackPtr) + { + $jslPath = Config::getExecutablePath('jsl'); + if ($jslPath === null) { + return; + } + + $fileName = $phpcsFile->getFilename(); + + $cmd = '"'.Common::escapeshellcmd($jslPath).'" -nologo -nofilelisting -nocontext -nosummary -output-format __LINE__:__ERROR__ -process '.escapeshellarg($fileName); + $msg = exec($cmd, $output, $retval); + + // Variable $exitCode is the last line of $output if no error occurs, on + // error it is numeric. Try to handle various error conditions and + // provide useful error reporting. + if ($retval === 2 || $retval === 4) { + if (is_array($output) === true) { + $msg = join('\n', $output); + } + + throw new RuntimeException("Failed invoking JavaScript Lint, retval was [$retval], output was [$msg]"); + } + + if (is_array($output) === true) { + foreach ($output as $finding) { + $split = strpos($finding, ':'); + $line = substr($finding, 0, $split); + $message = substr($finding, ($split + 1)); + $phpcsFile->addWarningOnLine(trim($message), $line, 'ExternalTool'); + } + } + + // Ignore the rest of the file. + return ($phpcsFile->numTokens + 1); + + }//end process() + + +}//end class diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Sniffs/Files/FileExtensionSniff.php b/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Sniffs/Files/FileExtensionSniff.php new file mode 100644 index 00000000..bae88214 --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Sniffs/Files/FileExtensionSniff.php @@ -0,0 +1,68 @@ + + * @copyright 2006-2015 Squiz Pty Ltd (ABN 77 084 670 600) + * @license https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence + */ + +namespace PHP_CodeSniffer\Standards\Squiz\Sniffs\Files; + +use PHP_CodeSniffer\Files\File; +use PHP_CodeSniffer\Sniffs\Sniff; + +class FileExtensionSniff implements Sniff +{ + + + /** + * Returns an array of tokens this test wants to listen for. + * + * @return array + */ + public function register() + { + return [T_OPEN_TAG]; + + }//end register() + + + /** + * Processes this test, when one of its tokens is encountered. + * + * @param \PHP_CodeSniffer\Files\File $phpcsFile The file being scanned. + * @param int $stackPtr The position of the current token in the + * stack passed in $tokens. + * + * @return int + */ + public function process(File $phpcsFile, $stackPtr) + { + $tokens = $phpcsFile->getTokens(); + $fileName = $phpcsFile->getFilename(); + $extension = substr($fileName, strrpos($fileName, '.')); + $nextClass = $phpcsFile->findNext([T_CLASS, T_INTERFACE, T_TRAIT], $stackPtr); + + if ($nextClass !== false) { + $phpcsFile->recordMetric($stackPtr, 'File extension for class files', $extension); + if ($extension === '.php') { + $error = '%s found in ".php" file; use ".inc" extension instead'; + $data = [ucfirst($tokens[$nextClass]['content'])]; + $phpcsFile->addError($error, $stackPtr, 'ClassFound', $data); + } + } else { + $phpcsFile->recordMetric($stackPtr, 'File extension for non-class files', $extension); + if ($extension === '.inc') { + $error = 'No interface or class found in ".inc" file; use ".php" extension instead'; + $phpcsFile->addError($error, $stackPtr, 'NoClass'); + } + } + + // Ignore the rest of the file. + return ($phpcsFile->numTokens + 1); + + }//end process() + + +}//end class diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Sniffs/Formatting/OperatorBracketSniff.php b/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Sniffs/Formatting/OperatorBracketSniff.php new file mode 100644 index 00000000..60b113d3 --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Sniffs/Formatting/OperatorBracketSniff.php @@ -0,0 +1,393 @@ + + * @copyright 2006-2015 Squiz Pty Ltd (ABN 77 084 670 600) + * @license https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence + */ + +namespace PHP_CodeSniffer\Standards\Squiz\Sniffs\Formatting; + +use PHP_CodeSniffer\Files\File; +use PHP_CodeSniffer\Sniffs\Sniff; +use PHP_CodeSniffer\Util\Tokens; + +class OperatorBracketSniff implements Sniff +{ + + /** + * A list of tokenizers this sniff supports. + * + * @var array + */ + public $supportedTokenizers = [ + 'PHP', + 'JS', + ]; + + + /** + * Returns an array of tokens this test wants to listen for. + * + * @return array + */ + public function register() + { + return Tokens::$operators; + + }//end register() + + + /** + * Processes this test, when one of its tokens is encountered. + * + * @param \PHP_CodeSniffer\Files\File $phpcsFile The file being scanned. + * @param int $stackPtr The position of the current token in the + * stack passed in $tokens. + * + * @return void + */ + public function process(File $phpcsFile, $stackPtr) + { + $tokens = $phpcsFile->getTokens(); + + if ($phpcsFile->tokenizerType === 'JS' && $tokens[$stackPtr]['code'] === T_PLUS) { + // JavaScript uses the plus operator for string concatenation as well + // so we cannot accurately determine if it is a string concat or addition. + // So just ignore it. + return; + } + + // If the & is a reference, then we don't want to check for brackets. + if ($tokens[$stackPtr]['code'] === T_BITWISE_AND && $phpcsFile->isReference($stackPtr) === true) { + return; + } + + // There is one instance where brackets aren't needed, which involves + // the minus sign being used to assign a negative number to a variable. + if ($tokens[$stackPtr]['code'] === T_MINUS) { + // Check to see if we are trying to return -n. + $prev = $phpcsFile->findPrevious(Tokens::$emptyTokens, ($stackPtr - 1), null, true); + if ($tokens[$prev]['code'] === T_RETURN) { + return; + } + + $number = $phpcsFile->findNext(T_WHITESPACE, ($stackPtr + 1), null, true); + if ($tokens[$number]['code'] === T_LNUMBER || $tokens[$number]['code'] === T_DNUMBER) { + $previous = $phpcsFile->findPrevious(T_WHITESPACE, ($stackPtr - 1), null, true); + if ($previous !== false) { + $isAssignment = isset(Tokens::$assignmentTokens[$tokens[$previous]['code']]); + $isEquality = isset(Tokens::$equalityTokens[$tokens[$previous]['code']]); + $isComparison = isset(Tokens::$comparisonTokens[$tokens[$previous]['code']]); + $isUnary = isset(Tokens::$operators[$tokens[$previous]['code']]); + if ($isAssignment === true || $isEquality === true || $isComparison === true || $isUnary === true) { + // This is a negative assignment or comparison. + // We need to check that the minus and the number are + // adjacent. + if (($number - $stackPtr) !== 1) { + $error = 'No space allowed between minus sign and number'; + $phpcsFile->addError($error, $stackPtr, 'SpacingAfterMinus'); + } + + return; + } + } + } + }//end if + + $previousToken = $phpcsFile->findPrevious(T_WHITESPACE, ($stackPtr - 1), null, true, null, true); + if ($previousToken !== false) { + // A list of tokens that indicate that the token is not + // part of an arithmetic operation. + $invalidTokens = [ + T_COMMA => true, + T_COLON => true, + T_OPEN_PARENTHESIS => true, + T_OPEN_SQUARE_BRACKET => true, + T_OPEN_CURLY_BRACKET => true, + T_OPEN_SHORT_ARRAY => true, + T_CASE => true, + T_EXIT => true, + ]; + + if (isset($invalidTokens[$tokens[$previousToken]['code']]) === true) { + return; + } + } + + if ($tokens[$stackPtr]['code'] === T_BITWISE_OR + && isset($tokens[$stackPtr]['nested_parenthesis']) === true + ) { + $brackets = $tokens[$stackPtr]['nested_parenthesis']; + $lastBracket = array_pop($brackets); + if (isset($tokens[$lastBracket]['parenthesis_owner']) === true + && $tokens[$tokens[$lastBracket]['parenthesis_owner']]['code'] === T_CATCH + ) { + // This is a pipe character inside a catch statement, so it is acting + // as an exception type separator and not an arithmetic operation. + return; + } + } + + // Tokens that are allowed inside a bracketed operation. + $allowed = [ + T_VARIABLE, + T_LNUMBER, + T_DNUMBER, + T_STRING, + T_WHITESPACE, + T_NS_SEPARATOR, + T_THIS, + T_SELF, + T_STATIC, + T_OBJECT_OPERATOR, + T_NULLSAFE_OBJECT_OPERATOR, + T_DOUBLE_COLON, + T_OPEN_SQUARE_BRACKET, + T_CLOSE_SQUARE_BRACKET, + T_MODULUS, + T_NONE, + T_BITWISE_NOT, + ]; + + $allowed += Tokens::$operators; + + $lastBracket = false; + if (isset($tokens[$stackPtr]['nested_parenthesis']) === true) { + $parenthesis = array_reverse($tokens[$stackPtr]['nested_parenthesis'], true); + foreach ($parenthesis as $bracket => $endBracket) { + $prevToken = $phpcsFile->findPrevious(T_WHITESPACE, ($bracket - 1), null, true); + $prevCode = $tokens[$prevToken]['code']; + + if ($prevCode === T_ISSET) { + // This operation is inside an isset() call, but has + // no bracket of it's own. + break; + } + + if ($prevCode === T_STRING || $prevCode === T_SWITCH || $prevCode === T_MATCH) { + // We allow simple operations to not be bracketed. + // For example, ceil($one / $two). + for ($prev = ($stackPtr - 1); $prev > $bracket; $prev--) { + if (in_array($tokens[$prev]['code'], $allowed, true) === true) { + continue; + } + + if ($tokens[$prev]['code'] === T_CLOSE_PARENTHESIS) { + $prev = $tokens[$prev]['parenthesis_opener']; + } else { + break; + } + } + + if ($prev !== $bracket) { + break; + } + + for ($next = ($stackPtr + 1); $next < $endBracket; $next++) { + if (in_array($tokens[$next]['code'], $allowed, true) === true) { + continue; + } + + if ($tokens[$next]['code'] === T_OPEN_PARENTHESIS) { + $next = $tokens[$next]['parenthesis_closer']; + } else { + break; + } + } + + if ($next !== $endBracket) { + break; + } + }//end if + + if (in_array($prevCode, Tokens::$scopeOpeners, true) === true) { + // This operation is inside a control structure like FOREACH + // or IF, but has no bracket of it's own. + // The only control structures allowed to do this are SWITCH and MATCH. + if ($prevCode !== T_SWITCH && $prevCode !== T_MATCH) { + break; + } + } + + if ($prevCode === T_OPEN_PARENTHESIS) { + // These are two open parenthesis in a row. If the current + // one doesn't enclose the operator, go to the previous one. + if ($endBracket < $stackPtr) { + continue; + } + } + + $lastBracket = $bracket; + break; + }//end foreach + }//end if + + if ($lastBracket === false) { + // It is not in a bracketed statement at all. + $this->addMissingBracketsError($phpcsFile, $stackPtr); + return; + } else if ($tokens[$lastBracket]['parenthesis_closer'] < $stackPtr) { + // There are a set of brackets in front of it that don't include it. + $this->addMissingBracketsError($phpcsFile, $stackPtr); + return; + } else { + // We are enclosed in a set of bracket, so the last thing to + // check is that we are not also enclosed in square brackets + // like this: ($array[$index + 1]), which is invalid. + $brackets = [ + T_OPEN_SQUARE_BRACKET, + T_CLOSE_SQUARE_BRACKET, + ]; + + $squareBracket = $phpcsFile->findPrevious($brackets, ($stackPtr - 1), $lastBracket); + if ($squareBracket !== false && $tokens[$squareBracket]['code'] === T_OPEN_SQUARE_BRACKET) { + $closeSquareBracket = $phpcsFile->findNext($brackets, ($stackPtr + 1)); + if ($closeSquareBracket !== false && $tokens[$closeSquareBracket]['code'] === T_CLOSE_SQUARE_BRACKET) { + $this->addMissingBracketsError($phpcsFile, $stackPtr); + } + } + + return; + }//end if + + $lastAssignment = $phpcsFile->findPrevious(Tokens::$assignmentTokens, $stackPtr, null, false, null, true); + if ($lastAssignment !== false && $lastAssignment > $lastBracket) { + $this->addMissingBracketsError($phpcsFile, $stackPtr); + } + + }//end process() + + + /** + * Add and fix the missing brackets error. + * + * @param \PHP_CodeSniffer\Files\File $phpcsFile The file being scanned. + * @param int $stackPtr The position of the current token in the + * stack passed in $tokens. + * + * @return void + */ + public function addMissingBracketsError($phpcsFile, $stackPtr) + { + $tokens = $phpcsFile->getTokens(); + + $allowed = [ + T_VARIABLE => true, + T_LNUMBER => true, + T_DNUMBER => true, + T_STRING => true, + T_CONSTANT_ENCAPSED_STRING => true, + T_DOUBLE_QUOTED_STRING => true, + T_WHITESPACE => true, + T_NS_SEPARATOR => true, + T_THIS => true, + T_SELF => true, + T_STATIC => true, + T_OBJECT_OPERATOR => true, + T_NULLSAFE_OBJECT_OPERATOR => true, + T_DOUBLE_COLON => true, + T_MODULUS => true, + T_ISSET => true, + T_ARRAY => true, + T_NONE => true, + T_BITWISE_NOT => true, + ]; + + // Find the first token in the expression. + for ($before = ($stackPtr - 1); $before > 0; $before--) { + // Special case for plus operators because we can't tell if they are used + // for addition or string contact. So assume string concat to be safe. + if ($phpcsFile->tokenizerType === 'JS' && $tokens[$before]['code'] === T_PLUS) { + break; + } + + if (isset(Tokens::$emptyTokens[$tokens[$before]['code']]) === true + || isset(Tokens::$operators[$tokens[$before]['code']]) === true + || isset(Tokens::$castTokens[$tokens[$before]['code']]) === true + || isset($allowed[$tokens[$before]['code']]) === true + ) { + continue; + } + + if ($tokens[$before]['code'] === T_CLOSE_PARENTHESIS) { + $before = $tokens[$before]['parenthesis_opener']; + continue; + } + + if ($tokens[$before]['code'] === T_CLOSE_SQUARE_BRACKET) { + $before = $tokens[$before]['bracket_opener']; + continue; + } + + if ($tokens[$before]['code'] === T_CLOSE_SHORT_ARRAY) { + $before = $tokens[$before]['bracket_opener']; + continue; + } + + break; + }//end for + + $before = $phpcsFile->findNext(Tokens::$emptyTokens, ($before + 1), null, true); + + // A few extra tokens are allowed to be on the right side of the expression. + $allowed[T_EQUAL] = true; + $allowed[T_NEW] = true; + + // Find the last token in the expression. + for ($after = ($stackPtr + 1); $after < $phpcsFile->numTokens; $after++) { + // Special case for plus operators because we can't tell if they are used + // for addition or string concat. So assume string concat to be safe. + if ($phpcsFile->tokenizerType === 'JS' && $tokens[$after]['code'] === T_PLUS) { + break; + } + + if (isset(Tokens::$emptyTokens[$tokens[$after]['code']]) === true + || isset(Tokens::$operators[$tokens[$after]['code']]) === true + || isset(Tokens::$castTokens[$tokens[$after]['code']]) === true + || isset($allowed[$tokens[$after]['code']]) === true + ) { + continue; + } + + if ($tokens[$after]['code'] === T_OPEN_PARENTHESIS) { + $after = $tokens[$after]['parenthesis_closer']; + continue; + } + + if ($tokens[$after]['code'] === T_OPEN_SQUARE_BRACKET) { + $after = $tokens[$after]['bracket_closer']; + continue; + } + + if ($tokens[$after]['code'] === T_OPEN_SHORT_ARRAY) { + $after = $tokens[$after]['bracket_closer']; + continue; + } + + break; + }//end for + + $after = $phpcsFile->findPrevious(Tokens::$emptyTokens, ($after - 1), null, true); + + $error = 'Operation must be bracketed'; + if ($before === $after || $before === $stackPtr || $after === $stackPtr) { + $phpcsFile->addError($error, $stackPtr, 'MissingBrackets'); + return; + } + + $fix = $phpcsFile->addFixableError($error, $stackPtr, 'MissingBrackets'); + if ($fix === true) { + // Can only fix this error if both tokens are available for fixing. + // Adding one bracket without the other will create parse errors. + $phpcsFile->fixer->beginChangeset(); + $phpcsFile->fixer->replaceToken($before, '('.$tokens[$before]['content']); + $phpcsFile->fixer->replaceToken($after, $tokens[$after]['content'].')'); + $phpcsFile->fixer->endChangeset(); + } + + }//end addMissingBracketsError() + + +}//end class diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Sniffs/Functions/FunctionDeclarationArgumentSpacingSniff.php b/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Sniffs/Functions/FunctionDeclarationArgumentSpacingSniff.php new file mode 100644 index 00000000..e696d800 --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Sniffs/Functions/FunctionDeclarationArgumentSpacingSniff.php @@ -0,0 +1,398 @@ + + * @copyright 2006-2015 Squiz Pty Ltd (ABN 77 084 670 600) + * @license https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence + */ + +namespace PHP_CodeSniffer\Standards\Squiz\Sniffs\Functions; + +use PHP_CodeSniffer\Files\File; +use PHP_CodeSniffer\Sniffs\Sniff; +use PHP_CodeSniffer\Util\Tokens; + +class FunctionDeclarationArgumentSpacingSniff implements Sniff +{ + + /** + * How many spaces should surround the equals signs. + * + * @var integer + */ + public $equalsSpacing = 0; + + /** + * How many spaces should follow the opening bracket. + * + * @var integer + */ + public $requiredSpacesAfterOpen = 0; + + /** + * How many spaces should precede the closing bracket. + * + * @var integer + */ + public $requiredSpacesBeforeClose = 0; + + + /** + * Returns an array of tokens this test wants to listen for. + * + * @return array + */ + public function register() + { + return [ + T_FUNCTION, + T_CLOSURE, + T_FN, + ]; + + }//end register() + + + /** + * Processes this test, when one of its tokens is encountered. + * + * @param \PHP_CodeSniffer\Files\File $phpcsFile The file being scanned. + * @param int $stackPtr The position of the current token + * in the stack. + * + * @return void + */ + public function process(File $phpcsFile, $stackPtr) + { + $tokens = $phpcsFile->getTokens(); + + if (isset($tokens[$stackPtr]['parenthesis_opener']) === false + || isset($tokens[$stackPtr]['parenthesis_closer']) === false + || $tokens[$stackPtr]['parenthesis_opener'] === null + || $tokens[$stackPtr]['parenthesis_closer'] === null + ) { + return; + } + + $this->equalsSpacing = (int) $this->equalsSpacing; + $this->requiredSpacesAfterOpen = (int) $this->requiredSpacesAfterOpen; + $this->requiredSpacesBeforeClose = (int) $this->requiredSpacesBeforeClose; + + $this->processBracket($phpcsFile, $tokens[$stackPtr]['parenthesis_opener']); + + if ($tokens[$stackPtr]['code'] === T_CLOSURE) { + $use = $phpcsFile->findNext(T_USE, ($tokens[$stackPtr]['parenthesis_closer'] + 1), $tokens[$stackPtr]['scope_opener']); + if ($use !== false) { + $openBracket = $phpcsFile->findNext(T_OPEN_PARENTHESIS, ($use + 1), null); + $this->processBracket($phpcsFile, $openBracket); + } + } + + }//end process() + + + /** + * Processes the contents of a single set of brackets. + * + * @param \PHP_CodeSniffer\Files\File $phpcsFile The file being scanned. + * @param int $openBracket The position of the open bracket + * in the stack. + * + * @return void + */ + public function processBracket($phpcsFile, $openBracket) + { + $tokens = $phpcsFile->getTokens(); + $closeBracket = $tokens[$openBracket]['parenthesis_closer']; + $multiLine = ($tokens[$openBracket]['line'] !== $tokens[$closeBracket]['line']); + + if (isset($tokens[$openBracket]['parenthesis_owner']) === true) { + $stackPtr = $tokens[$openBracket]['parenthesis_owner']; + } else { + $stackPtr = $phpcsFile->findPrevious(T_USE, ($openBracket - 1)); + } + + $params = $phpcsFile->getMethodParameters($stackPtr); + + if (empty($params) === true) { + // Check spacing around parenthesis. + $next = $phpcsFile->findNext(T_WHITESPACE, ($openBracket + 1), $closeBracket, true); + if ($next === false) { + if (($closeBracket - $openBracket) !== 1) { + if ($tokens[$openBracket]['line'] !== $tokens[$closeBracket]['line']) { + $found = 'newline'; + } else { + $found = $tokens[($openBracket + 1)]['length']; + } + + $error = 'Expected 0 spaces between parenthesis of function declaration; %s found'; + $data = [$found]; + $fix = $phpcsFile->addFixableError($error, $openBracket, 'SpacingBetween', $data); + if ($fix === true) { + $phpcsFile->fixer->replaceToken(($openBracket + 1), ''); + } + } + + // No params, so we don't check normal spacing rules. + return; + } + }//end if + + foreach ($params as $paramNumber => $param) { + if ($param['pass_by_reference'] === true) { + $refToken = $param['reference_token']; + + $gap = 0; + if ($tokens[($refToken + 1)]['code'] === T_WHITESPACE) { + $gap = $tokens[($refToken + 1)]['length']; + } + + if ($gap !== 0) { + $error = 'Expected 0 spaces after reference operator for argument "%s"; %s found'; + $data = [ + $param['name'], + $gap, + ]; + $fix = $phpcsFile->addFixableError($error, $refToken, 'SpacingAfterReference', $data); + if ($fix === true) { + $phpcsFile->fixer->replaceToken(($refToken + 1), ''); + } + } + }//end if + + if ($param['variable_length'] === true) { + $variadicToken = $param['variadic_token']; + + $gap = 0; + if ($tokens[($variadicToken + 1)]['code'] === T_WHITESPACE) { + $gap = $tokens[($variadicToken + 1)]['length']; + } + + if ($gap !== 0) { + $error = 'Expected 0 spaces after variadic operator for argument "%s"; %s found'; + $data = [ + $param['name'], + $gap, + ]; + $fix = $phpcsFile->addFixableError($error, $variadicToken, 'SpacingAfterVariadic', $data); + if ($fix === true) { + $phpcsFile->fixer->replaceToken(($variadicToken + 1), ''); + } + } + }//end if + + if (isset($param['default_equal_token']) === true) { + $equalToken = $param['default_equal_token']; + + $spacesBefore = 0; + if (($equalToken - $param['token']) > 1) { + $spacesBefore = $tokens[($param['token'] + 1)]['length']; + } + + if ($spacesBefore !== $this->equalsSpacing) { + $error = 'Incorrect spacing between argument "%s" and equals sign; expected '.$this->equalsSpacing.' but found %s'; + $data = [ + $param['name'], + $spacesBefore, + ]; + + $fix = $phpcsFile->addFixableError($error, $equalToken, 'SpaceBeforeEquals', $data); + if ($fix === true) { + $padding = str_repeat(' ', $this->equalsSpacing); + if ($spacesBefore === 0) { + $phpcsFile->fixer->addContentBefore($equalToken, $padding); + } else { + $phpcsFile->fixer->replaceToken(($equalToken - 1), $padding); + } + } + }//end if + + $spacesAfter = 0; + if ($tokens[($equalToken + 1)]['code'] === T_WHITESPACE) { + $spacesAfter = $tokens[($equalToken + 1)]['length']; + } + + if ($spacesAfter !== $this->equalsSpacing) { + $error = 'Incorrect spacing between default value and equals sign for argument "%s"; expected '.$this->equalsSpacing.' but found %s'; + $data = [ + $param['name'], + $spacesAfter, + ]; + + $fix = $phpcsFile->addFixableError($error, $equalToken, 'SpaceAfterEquals', $data); + if ($fix === true) { + $padding = str_repeat(' ', $this->equalsSpacing); + if ($spacesAfter === 0) { + $phpcsFile->fixer->addContent($equalToken, $padding); + } else { + $phpcsFile->fixer->replaceToken(($equalToken + 1), $padding); + } + } + }//end if + }//end if + + if ($param['type_hint_token'] !== false) { + $typeHintToken = $param['type_hint_end_token']; + + $gap = 0; + if ($tokens[($typeHintToken + 1)]['code'] === T_WHITESPACE) { + $gap = $tokens[($typeHintToken + 1)]['length']; + } + + if ($gap !== 1) { + $error = 'Expected 1 space between type hint and argument "%s"; %s found'; + $data = [ + $param['name'], + $gap, + ]; + $fix = $phpcsFile->addFixableError($error, $typeHintToken, 'SpacingAfterHint', $data); + if ($fix === true) { + if ($gap === 0) { + $phpcsFile->fixer->addContent($typeHintToken, ' '); + } else { + $phpcsFile->fixer->replaceToken(($typeHintToken + 1), ' '); + } + } + } + }//end if + + $commaToken = false; + if ($paramNumber > 0 && $params[($paramNumber - 1)]['comma_token'] !== false) { + $commaToken = $params[($paramNumber - 1)]['comma_token']; + } + + if ($commaToken !== false) { + if ($tokens[($commaToken - 1)]['code'] === T_WHITESPACE) { + $error = 'Expected 0 spaces between argument "%s" and comma; %s found'; + $data = [ + $params[($paramNumber - 1)]['name'], + $tokens[($commaToken - 1)]['length'], + ]; + + $fix = $phpcsFile->addFixableError($error, $commaToken, 'SpaceBeforeComma', $data); + if ($fix === true) { + $phpcsFile->fixer->replaceToken(($commaToken - 1), ''); + } + } + + // Don't check spacing after the comma if it is the last content on the line. + $checkComma = true; + if ($multiLine === true) { + $next = $phpcsFile->findNext(Tokens::$emptyTokens, ($commaToken + 1), $closeBracket, true); + if ($tokens[$next]['line'] !== $tokens[$commaToken]['line']) { + $checkComma = false; + } + } + + if ($checkComma === true) { + if ($param['type_hint_token'] === false) { + $spacesAfter = 0; + if ($tokens[($commaToken + 1)]['code'] === T_WHITESPACE) { + $spacesAfter = $tokens[($commaToken + 1)]['length']; + } + + if ($spacesAfter === 0) { + $error = 'Expected 1 space between comma and argument "%s"; 0 found'; + $data = [$param['name']]; + $fix = $phpcsFile->addFixableError($error, $commaToken, 'NoSpaceBeforeArg', $data); + if ($fix === true) { + $phpcsFile->fixer->addContent($commaToken, ' '); + } + } else if ($spacesAfter !== 1) { + $error = 'Expected 1 space between comma and argument "%s"; %s found'; + $data = [ + $param['name'], + $spacesAfter, + ]; + + $fix = $phpcsFile->addFixableError($error, $commaToken, 'SpacingBeforeArg', $data); + if ($fix === true) { + $phpcsFile->fixer->replaceToken(($commaToken + 1), ' '); + } + }//end if + } else { + $hint = $phpcsFile->getTokensAsString($param['type_hint_token'], (($param['type_hint_end_token'] - $param['type_hint_token']) + 1)); + if ($param['nullable_type'] === true) { + $hint = '?'.$hint; + } + + if ($tokens[($commaToken + 1)]['code'] !== T_WHITESPACE) { + $error = 'Expected 1 space between comma and type hint "%s"; 0 found'; + $data = [$hint]; + $fix = $phpcsFile->addFixableError($error, $commaToken, 'NoSpaceBeforeHint', $data); + if ($fix === true) { + $phpcsFile->fixer->addContent($commaToken, ' '); + } + } else { + $gap = $tokens[($commaToken + 1)]['length']; + if ($gap !== 1) { + $error = 'Expected 1 space between comma and type hint "%s"; %s found'; + $data = [ + $hint, + $gap, + ]; + $fix = $phpcsFile->addFixableError($error, $commaToken, 'SpacingBeforeHint', $data); + if ($fix === true) { + $phpcsFile->fixer->replaceToken(($commaToken + 1), ' '); + } + } + }//end if + }//end if + }//end if + }//end if + }//end foreach + + // Only check spacing around parenthesis for single line definitions. + if ($multiLine === true) { + return; + } + + $gap = 0; + if ($tokens[($closeBracket - 1)]['code'] === T_WHITESPACE) { + $gap = $tokens[($closeBracket - 1)]['length']; + } + + if ($gap !== $this->requiredSpacesBeforeClose) { + $error = 'Expected %s spaces before closing parenthesis; %s found'; + $data = [ + $this->requiredSpacesBeforeClose, + $gap, + ]; + $fix = $phpcsFile->addFixableError($error, $closeBracket, 'SpacingBeforeClose', $data); + if ($fix === true) { + $padding = str_repeat(' ', $this->requiredSpacesBeforeClose); + if ($gap === 0) { + $phpcsFile->fixer->addContentBefore($closeBracket, $padding); + } else { + $phpcsFile->fixer->replaceToken(($closeBracket - 1), $padding); + } + } + } + + $gap = 0; + if ($tokens[($openBracket + 1)]['code'] === T_WHITESPACE) { + $gap = $tokens[($openBracket + 1)]['length']; + } + + if ($gap !== $this->requiredSpacesAfterOpen) { + $error = 'Expected %s spaces after opening parenthesis; %s found'; + $data = [ + $this->requiredSpacesAfterOpen, + $gap, + ]; + $fix = $phpcsFile->addFixableError($error, $openBracket, 'SpacingAfterOpen', $data); + if ($fix === true) { + $padding = str_repeat(' ', $this->requiredSpacesAfterOpen); + if ($gap === 0) { + $phpcsFile->fixer->addContent($openBracket, $padding); + } else { + $phpcsFile->fixer->replaceToken(($openBracket + 1), $padding); + } + } + } + + }//end processBracket() + + +}//end class diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Sniffs/Functions/FunctionDeclarationSniff.php b/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Sniffs/Functions/FunctionDeclarationSniff.php new file mode 100644 index 00000000..4b6a6acf --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Sniffs/Functions/FunctionDeclarationSniff.php @@ -0,0 +1,34 @@ + + * @copyright 2006-2015 Squiz Pty Ltd (ABN 77 084 670 600) + * @license https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence + */ + +namespace PHP_CodeSniffer\Standards\Squiz\Sniffs\Functions; + +use PHP_CodeSniffer\Sniffs\AbstractPatternSniff; + +class FunctionDeclarationSniff extends AbstractPatternSniff +{ + + + /** + * Returns an array of patterns to check are correct. + * + * @return array + */ + protected function getPatterns() + { + return [ + 'function abc(...);', + 'function abc(...)', + 'abstract function abc(...);', + ]; + + }//end getPatterns() + + +}//end class diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Sniffs/Functions/FunctionDuplicateArgumentSniff.php b/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Sniffs/Functions/FunctionDuplicateArgumentSniff.php new file mode 100644 index 00000000..f6fc383a --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Sniffs/Functions/FunctionDuplicateArgumentSniff.php @@ -0,0 +1,64 @@ + + * @copyright 2006-2015 Squiz Pty Ltd (ABN 77 084 670 600) + * @license https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence + */ + +namespace PHP_CodeSniffer\Standards\Squiz\Sniffs\Functions; + +use PHP_CodeSniffer\Files\File; +use PHP_CodeSniffer\Sniffs\Sniff; + +class FunctionDuplicateArgumentSniff implements Sniff +{ + + + /** + * Returns an array of tokens this test wants to listen for. + * + * @return array + */ + public function register() + { + return [T_FUNCTION]; + + }//end register() + + + /** + * Processes this test, when one of its tokens is encountered. + * + * @param \PHP_CodeSniffer\Files\File $phpcsFile The file being scanned. + * @param int $stackPtr The position of the current token + * in the stack passed in $tokens. + * + * @return void + */ + public function process(File $phpcsFile, $stackPtr) + { + $tokens = $phpcsFile->getTokens(); + + $openBracket = $tokens[$stackPtr]['parenthesis_opener']; + $closeBracket = $tokens[$stackPtr]['parenthesis_closer']; + + $foundVariables = []; + for ($i = ($openBracket + 1); $i < $closeBracket; $i++) { + if ($tokens[$i]['code'] === T_VARIABLE) { + $variable = $tokens[$i]['content']; + if (in_array($variable, $foundVariables, true) === true) { + $error = 'Variable "%s" appears more than once in function declaration'; + $data = [$variable]; + $phpcsFile->addError($error, $i, 'Found', $data); + } else { + $foundVariables[] = $variable; + } + } + } + + }//end process() + + +}//end class diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Sniffs/Functions/GlobalFunctionSniff.php b/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Sniffs/Functions/GlobalFunctionSniff.php new file mode 100644 index 00000000..24588a91 --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Sniffs/Functions/GlobalFunctionSniff.php @@ -0,0 +1,61 @@ + + * @copyright 2006-2015 Squiz Pty Ltd (ABN 77 084 670 600) + * @license https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence + */ + +namespace PHP_CodeSniffer\Standards\Squiz\Sniffs\Functions; + +use PHP_CodeSniffer\Files\File; +use PHP_CodeSniffer\Sniffs\Sniff; + +class GlobalFunctionSniff implements Sniff +{ + + + /** + * Returns an array of tokens this test wants to listen for. + * + * @return array + */ + public function register() + { + return [T_FUNCTION]; + + }//end register() + + + /** + * Processes this test, when one of its tokens is encountered. + * + * @param \PHP_CodeSniffer\Files\File $phpcsFile The file being scanned. + * @param int $stackPtr The position of the current token in the + * stack passed in $tokens. + * + * @return void + */ + public function process(File $phpcsFile, $stackPtr) + { + $tokens = $phpcsFile->getTokens(); + + if (empty($tokens[$stackPtr]['conditions']) === true) { + $functionName = $phpcsFile->getDeclarationName($stackPtr); + if ($functionName === null) { + return; + } + + // Special exception for __autoload as it needs to be global. + if ($functionName !== '__autoload') { + $error = 'Consider putting global function "%s" in a static class'; + $data = [$functionName]; + $phpcsFile->addWarning($error, $stackPtr, 'Found', $data); + } + } + + }//end process() + + +}//end class diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Sniffs/Functions/LowercaseFunctionKeywordsSniff.php b/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Sniffs/Functions/LowercaseFunctionKeywordsSniff.php new file mode 100644 index 00000000..2357960c --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Sniffs/Functions/LowercaseFunctionKeywordsSniff.php @@ -0,0 +1,69 @@ + + * @copyright 2006-2015 Squiz Pty Ltd (ABN 77 084 670 600) + * @license https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence + */ + +namespace PHP_CodeSniffer\Standards\Squiz\Sniffs\Functions; + +use PHP_CodeSniffer\Files\File; +use PHP_CodeSniffer\Sniffs\Sniff; +use PHP_CodeSniffer\Util\Tokens; + +class LowercaseFunctionKeywordsSniff implements Sniff +{ + + + /** + * Returns an array of tokens this test wants to listen for. + * + * @return array + */ + public function register() + { + $tokens = Tokens::$methodPrefixes; + $tokens[] = T_FUNCTION; + $tokens[] = T_CLOSURE; + $tokens[] = T_FN; + + return $tokens; + + }//end register() + + + /** + * Processes this test, when one of its tokens is encountered. + * + * @param \PHP_CodeSniffer\Files\File $phpcsFile The file being scanned. + * @param int $stackPtr The position of the current token in + * the stack passed in $tokens. + * + * @return void + */ + public function process(File $phpcsFile, $stackPtr) + { + $tokens = $phpcsFile->getTokens(); + + $content = $tokens[$stackPtr]['content']; + $contentLc = strtolower($content); + if ($content !== $contentLc) { + $error = '%s keyword must be lowercase; expected "%s" but found "%s"'; + $data = [ + strtoupper($content), + $contentLc, + $content, + ]; + + $fix = $phpcsFile->addFixableError($error, $stackPtr, 'FoundUppercase', $data); + if ($fix === true) { + $phpcsFile->fixer->replaceToken($stackPtr, $contentLc); + } + } + + }//end process() + + +}//end class diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Sniffs/Functions/MultiLineFunctionDeclarationSniff.php b/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Sniffs/Functions/MultiLineFunctionDeclarationSniff.php new file mode 100644 index 00000000..c12bd0c4 --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Sniffs/Functions/MultiLineFunctionDeclarationSniff.php @@ -0,0 +1,258 @@ + + * @copyright 2006-2015 Squiz Pty Ltd (ABN 77 084 670 600) + * @license https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence + */ + +namespace PHP_CodeSniffer\Standards\Squiz\Sniffs\Functions; + +use PHP_CodeSniffer\Standards\PEAR\Sniffs\Functions\FunctionDeclarationSniff as PEARFunctionDeclarationSniff; +use PHP_CodeSniffer\Util\Tokens; + +class MultiLineFunctionDeclarationSniff extends PEARFunctionDeclarationSniff +{ + + /** + * A list of tokenizers this sniff supports. + * + * @var array + */ + public $supportedTokenizers = [ + 'PHP', + 'JS', + ]; + + + /** + * Determine if this is a multi-line function declaration. + * + * @param \PHP_CodeSniffer\Files\File $phpcsFile The file being scanned. + * @param int $stackPtr The position of the current token + * in the stack passed in $tokens. + * @param int $openBracket The position of the opening bracket + * in the stack passed in $tokens. + * @param array $tokens The stack of tokens that make up + * the file. + * + * @return void + */ + public function isMultiLineDeclaration($phpcsFile, $stackPtr, $openBracket, $tokens) + { + $bracketsToCheck = [$stackPtr => $openBracket]; + + // Closures may use the USE keyword and so be multi-line in this way. + if ($tokens[$stackPtr]['code'] === T_CLOSURE) { + $use = $phpcsFile->findNext(T_USE, ($tokens[$openBracket]['parenthesis_closer'] + 1), $tokens[$stackPtr]['scope_opener']); + if ($use !== false) { + $open = $phpcsFile->findNext(T_OPEN_PARENTHESIS, ($use + 1)); + if ($open !== false) { + $bracketsToCheck[$use] = $open; + } + } + } + + foreach ($bracketsToCheck as $stackPtr => $openBracket) { + // If the first argument is on a new line, this is a multi-line + // function declaration, even if there is only one argument. + $next = $phpcsFile->findNext(Tokens::$emptyTokens, ($openBracket + 1), null, true); + if ($tokens[$next]['line'] !== $tokens[$stackPtr]['line']) { + return true; + } + + $closeBracket = $tokens[$openBracket]['parenthesis_closer']; + + $end = $phpcsFile->findEndOfStatement($openBracket + 1); + while ($tokens[$end]['code'] === T_COMMA) { + // If the next bit of code is not on the same line, this is a + // multi-line function declaration. + $next = $phpcsFile->findNext(Tokens::$emptyTokens, ($end + 1), $closeBracket, true); + if ($next === false) { + continue(2); + } + + if ($tokens[$next]['line'] !== $tokens[$end]['line']) { + return true; + } + + $end = $phpcsFile->findEndOfStatement($next); + } + + // We've reached the last argument, so see if the next content + // (should be the close bracket) is also on the same line. + $next = $phpcsFile->findNext(Tokens::$emptyTokens, ($end + 1), $closeBracket, true); + if ($next !== false && $tokens[$next]['line'] !== $tokens[$end]['line']) { + return true; + } + }//end foreach + + return false; + + }//end isMultiLineDeclaration() + + + /** + * Processes single-line declarations. + * + * Just uses the Generic BSD-Allman brace sniff. + * + * @param \PHP_CodeSniffer\Files\File $phpcsFile The file being scanned. + * @param int $stackPtr The position of the current token + * in the stack passed in $tokens. + * @param array $tokens The stack of tokens that make up + * the file. + * + * @return void + */ + public function processSingleLineDeclaration($phpcsFile, $stackPtr, $tokens) + { + // We do everything the parent sniff does, and a bit more because we + // define multi-line declarations a bit differently. + parent::processSingleLineDeclaration($phpcsFile, $stackPtr, $tokens); + + $openingBracket = $tokens[$stackPtr]['parenthesis_opener']; + $closingBracket = $tokens[$stackPtr]['parenthesis_closer']; + + $prevNonWhiteSpace = $phpcsFile->findPrevious(T_WHITESPACE, ($closingBracket - 1), $openingBracket, true); + if ($tokens[$prevNonWhiteSpace]['line'] !== $tokens[$closingBracket]['line']) { + $error = 'There must not be a newline before the closing parenthesis of a single-line function declaration'; + + if (isset(Tokens::$emptyTokens[$tokens[$prevNonWhiteSpace]['code']]) === true) { + $phpcsFile->addError($error, $closingBracket, 'CloseBracketNewLine'); + } else { + $fix = $phpcsFile->addFixableError($error, $closingBracket, 'CloseBracketNewLine'); + if ($fix === true) { + $phpcsFile->fixer->beginChangeset(); + for ($i = ($closingBracket - 1); $i > $openingBracket; $i--) { + if ($tokens[$i]['code'] !== T_WHITESPACE) { + break; + } + + $phpcsFile->fixer->replaceToken($i, ''); + } + + $phpcsFile->fixer->endChangeset(); + } + } + }//end if + + }//end processSingleLineDeclaration() + + + /** + * Processes multi-line declarations. + * + * @param \PHP_CodeSniffer\Files\File $phpcsFile The file being scanned. + * @param int $stackPtr The position of the current token + * in the stack passed in $tokens. + * @param array $tokens The stack of tokens that make up + * the file. + * + * @return void + */ + public function processMultiLineDeclaration($phpcsFile, $stackPtr, $tokens) + { + // We do everything the parent sniff does, and a bit more. + parent::processMultiLineDeclaration($phpcsFile, $stackPtr, $tokens); + + $openBracket = $tokens[$stackPtr]['parenthesis_opener']; + $this->processBracket($phpcsFile, $openBracket, $tokens, 'function'); + + if ($tokens[$stackPtr]['code'] !== T_CLOSURE) { + return; + } + + $use = $phpcsFile->findNext(T_USE, ($tokens[$stackPtr]['parenthesis_closer'] + 1), $tokens[$stackPtr]['scope_opener']); + if ($use === false) { + return; + } + + $openBracket = $phpcsFile->findNext(T_OPEN_PARENTHESIS, ($use + 1), null); + $this->processBracket($phpcsFile, $openBracket, $tokens, 'use'); + + }//end processMultiLineDeclaration() + + + /** + * Processes the contents of a single set of brackets. + * + * @param \PHP_CodeSniffer\Files\File $phpcsFile The file being scanned. + * @param int $openBracket The position of the open bracket + * in the stack passed in $tokens. + * @param array $tokens The stack of tokens that make up + * the file. + * @param string $type The type of the token the brackets + * belong to (function or use). + * + * @return void + */ + public function processBracket($phpcsFile, $openBracket, $tokens, $type='function') + { + $errorPrefix = ''; + if ($type === 'use') { + $errorPrefix = 'Use'; + } + + $closeBracket = $tokens[$openBracket]['parenthesis_closer']; + + // The open bracket should be the last thing on the line. + if ($tokens[$openBracket]['line'] !== $tokens[$closeBracket]['line']) { + $next = $phpcsFile->findNext(Tokens::$emptyTokens, ($openBracket + 1), null, true); + if ($tokens[$next]['line'] === $tokens[$openBracket]['line']) { + $error = 'The first parameter of a multi-line '.$type.' declaration must be on the line after the opening bracket'; + $fix = $phpcsFile->addFixableError($error, $next, $errorPrefix.'FirstParamSpacing'); + if ($fix === true) { + if ($tokens[$next]['line'] === $tokens[$openBracket]['line']) { + $phpcsFile->fixer->addNewline($openBracket); + } else { + $phpcsFile->fixer->beginChangeset(); + for ($x = $openBracket; $x < $next; $x++) { + if ($tokens[$x]['line'] === $tokens[$openBracket]['line']) { + continue; + } + + if ($tokens[$x]['line'] === $tokens[$next]['line']) { + break; + } + } + + $phpcsFile->fixer->endChangeset(); + } + } + }//end if + }//end if + + // Each line between the brackets should contain a single parameter. + $lastComma = null; + for ($i = ($openBracket + 1); $i < $closeBracket; $i++) { + // Skip brackets, like arrays, as they can contain commas. + if (isset($tokens[$i]['bracket_opener']) === true) { + $i = $tokens[$i]['bracket_closer']; + continue; + } + + if (isset($tokens[$i]['parenthesis_opener']) === true) { + $i = $tokens[$i]['parenthesis_closer']; + continue; + } + + if ($tokens[$i]['code'] !== T_COMMA) { + continue; + } + + $next = $phpcsFile->findNext(Tokens::$emptyTokens, ($i + 1), null, true); + if ($tokens[$next]['line'] === $tokens[$i]['line']) { + $error = 'Multi-line '.$type.' declarations must define one parameter per line'; + $fix = $phpcsFile->addFixableError($error, $next, $errorPrefix.'OneParamPerLine'); + if ($fix === true) { + $phpcsFile->fixer->addNewline($i); + } + } + }//end for + + }//end processBracket() + + +}//end class diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Sniffs/NamingConventions/ValidFunctionNameSniff.php b/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Sniffs/NamingConventions/ValidFunctionNameSniff.php new file mode 100644 index 00000000..878035e6 --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Sniffs/NamingConventions/ValidFunctionNameSniff.php @@ -0,0 +1,54 @@ + + * @copyright 2006-2015 Squiz Pty Ltd (ABN 77 084 670 600) + * @license https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence + */ + +namespace PHP_CodeSniffer\Standards\Squiz\Sniffs\NamingConventions; + +use PHP_CodeSniffer\Files\File; +use PHP_CodeSniffer\Standards\PEAR\Sniffs\NamingConventions\ValidFunctionNameSniff as PEARValidFunctionNameSniff; +use PHP_CodeSniffer\Util\Common; + +class ValidFunctionNameSniff extends PEARValidFunctionNameSniff +{ + + + /** + * Processes the tokens outside the scope. + * + * @param \PHP_CodeSniffer\Files\File $phpcsFile The file being processed. + * @param int $stackPtr The position where this token was + * found. + * + * @return void + */ + protected function processTokenOutsideScope(File $phpcsFile, $stackPtr) + { + $functionName = $phpcsFile->getDeclarationName($stackPtr); + if ($functionName === null) { + return; + } + + $errorData = [$functionName]; + + // Does this function claim to be magical? + if (preg_match('|^__[^_]|', $functionName) !== 0) { + $error = 'Function name "%s" is invalid; only PHP magic methods should be prefixed with a double underscore'; + $phpcsFile->addError($error, $stackPtr, 'DoubleUnderscore', $errorData); + + $functionName = ltrim($functionName, '_'); + } + + if (Common::isCamelCaps($functionName, false, true, false) === false) { + $error = 'Function name "%s" is not in camel caps format'; + $phpcsFile->addError($error, $stackPtr, 'NotCamelCaps', $errorData); + } + + }//end processTokenOutsideScope() + + +}//end class diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Sniffs/NamingConventions/ValidVariableNameSniff.php b/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Sniffs/NamingConventions/ValidVariableNameSniff.php new file mode 100644 index 00000000..5c3a7493 --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Sniffs/NamingConventions/ValidVariableNameSniff.php @@ -0,0 +1,190 @@ + + * @copyright 2006-2015 Squiz Pty Ltd (ABN 77 084 670 600) + * @license https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence + */ + +namespace PHP_CodeSniffer\Standards\Squiz\Sniffs\NamingConventions; + +use PHP_CodeSniffer\Files\File; +use PHP_CodeSniffer\Sniffs\AbstractVariableSniff; +use PHP_CodeSniffer\Util\Common; +use PHP_CodeSniffer\Util\Tokens; + +class ValidVariableNameSniff extends AbstractVariableSniff +{ + + + /** + * Processes this test, when one of its tokens is encountered. + * + * @param \PHP_CodeSniffer\Files\File $phpcsFile The file being scanned. + * @param int $stackPtr The position of the current token in the + * stack passed in $tokens. + * + * @return void + */ + protected function processVariable(File $phpcsFile, $stackPtr) + { + $tokens = $phpcsFile->getTokens(); + $varName = ltrim($tokens[$stackPtr]['content'], '$'); + + // If it's a php reserved var, then its ok. + if (isset($this->phpReservedVars[$varName]) === true) { + return; + } + + $objOperator = $phpcsFile->findNext([T_WHITESPACE], ($stackPtr + 1), null, true); + if ($tokens[$objOperator]['code'] === T_OBJECT_OPERATOR + || $tokens[$objOperator]['code'] === T_NULLSAFE_OBJECT_OPERATOR + ) { + // Check to see if we are using a variable from an object. + $var = $phpcsFile->findNext([T_WHITESPACE], ($objOperator + 1), null, true); + if ($tokens[$var]['code'] === T_STRING) { + $bracket = $phpcsFile->findNext([T_WHITESPACE], ($var + 1), null, true); + if ($tokens[$bracket]['code'] !== T_OPEN_PARENTHESIS) { + $objVarName = $tokens[$var]['content']; + + // There is no way for us to know if the var is public or + // private, so we have to ignore a leading underscore if there is + // one and just check the main part of the variable name. + $originalVarName = $objVarName; + if (substr($objVarName, 0, 1) === '_') { + $objVarName = substr($objVarName, 1); + } + + if (Common::isCamelCaps($objVarName, false, true, false) === false) { + $error = 'Member variable "%s" is not in valid camel caps format'; + $data = [$originalVarName]; + $phpcsFile->addError($error, $var, 'MemberNotCamelCaps', $data); + } + }//end if + }//end if + }//end if + + $objOperator = $phpcsFile->findPrevious(T_WHITESPACE, ($stackPtr - 1), null, true); + if ($tokens[$objOperator]['code'] === T_DOUBLE_COLON) { + // The variable lives within a class, and is referenced like + // this: MyClass::$_variable, so we don't know its scope. + $objVarName = $varName; + if (substr($objVarName, 0, 1) === '_') { + $objVarName = substr($objVarName, 1); + } + + if (Common::isCamelCaps($objVarName, false, true, false) === false) { + $error = 'Member variable "%s" is not in valid camel caps format'; + $data = [$tokens[$stackPtr]['content']]; + $phpcsFile->addError($error, $stackPtr, 'MemberNotCamelCaps', $data); + } + + return; + } + + // There is no way for us to know if the var is public or private, + // so we have to ignore a leading underscore if there is one and just + // check the main part of the variable name. + $originalVarName = $varName; + if (substr($varName, 0, 1) === '_') { + $inClass = $phpcsFile->hasCondition($stackPtr, Tokens::$ooScopeTokens); + if ($inClass === true) { + $varName = substr($varName, 1); + } + } + + if (Common::isCamelCaps($varName, false, true, false) === false) { + $error = 'Variable "%s" is not in valid camel caps format'; + $data = [$originalVarName]; + $phpcsFile->addError($error, $stackPtr, 'NotCamelCaps', $data); + } + + }//end processVariable() + + + /** + * Processes class member variables. + * + * @param \PHP_CodeSniffer\Files\File $phpcsFile The file being scanned. + * @param int $stackPtr The position of the current token in the + * stack passed in $tokens. + * + * @return void + */ + protected function processMemberVar(File $phpcsFile, $stackPtr) + { + $tokens = $phpcsFile->getTokens(); + + $varName = ltrim($tokens[$stackPtr]['content'], '$'); + $memberProps = $phpcsFile->getMemberProperties($stackPtr); + if (empty($memberProps) === true) { + // Couldn't get any info about this variable, which + // generally means it is invalid or possibly has a parse + // error. Any errors will be reported by the core, so + // we can ignore it. + return; + } + + $public = ($memberProps['scope'] !== 'private'); + $errorData = [$varName]; + + if ($public === true) { + if (substr($varName, 0, 1) === '_') { + $error = '%s member variable "%s" must not contain a leading underscore'; + $data = [ + ucfirst($memberProps['scope']), + $errorData[0], + ]; + $phpcsFile->addError($error, $stackPtr, 'PublicHasUnderscore', $data); + } + } else { + if (substr($varName, 0, 1) !== '_') { + $error = 'Private member variable "%s" must contain a leading underscore'; + $phpcsFile->addError($error, $stackPtr, 'PrivateNoUnderscore', $errorData); + } + } + + // Remove a potential underscore prefix for testing CamelCaps. + $varName = ltrim($varName, '_'); + + if (Common::isCamelCaps($varName, false, true, false) === false) { + $error = 'Member variable "%s" is not in valid camel caps format'; + $phpcsFile->addError($error, $stackPtr, 'MemberNotCamelCaps', $errorData); + } + + }//end processMemberVar() + + + /** + * Processes the variable found within a double quoted string. + * + * @param \PHP_CodeSniffer\Files\File $phpcsFile The file being scanned. + * @param int $stackPtr The position of the double quoted + * string. + * + * @return void + */ + protected function processVariableInString(File $phpcsFile, $stackPtr) + { + $tokens = $phpcsFile->getTokens(); + + if (preg_match_all('|[^\\\]\${?([a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*)|', $tokens[$stackPtr]['content'], $matches) !== 0) { + foreach ($matches[1] as $varName) { + // If it's a php reserved var, then its ok. + if (isset($this->phpReservedVars[$varName]) === true) { + continue; + } + + if (Common::isCamelCaps($varName, false, true, false) === false) { + $error = 'Variable "%s" is not in valid camel caps format'; + $data = [$varName]; + $phpcsFile->addError($error, $stackPtr, 'StringNotCamelCaps', $data); + } + } + } + + }//end processVariableInString() + + +}//end class diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Sniffs/Objects/DisallowObjectStringIndexSniff.php b/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Sniffs/Objects/DisallowObjectStringIndexSniff.php new file mode 100644 index 00000000..c324e205 --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Sniffs/Objects/DisallowObjectStringIndexSniff.php @@ -0,0 +1,85 @@ + + * @copyright 2006-2015 Squiz Pty Ltd (ABN 77 084 670 600) + * @license https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence + */ + +namespace PHP_CodeSniffer\Standards\Squiz\Sniffs\Objects; + +use PHP_CodeSniffer\Files\File; +use PHP_CodeSniffer\Sniffs\Sniff; + +class DisallowObjectStringIndexSniff implements Sniff +{ + + /** + * A list of tokenizers this sniff supports. + * + * @var array + */ + public $supportedTokenizers = ['JS']; + + + /** + * Returns an array of tokens this test wants to listen for. + * + * @return array + */ + public function register() + { + return [T_OPEN_SQUARE_BRACKET]; + + }//end register() + + + /** + * Processes this test, when one of its tokens is encountered. + * + * @param \PHP_CodeSniffer\Files\File $phpcsFile The file being scanned. + * @param int $stackPtr The position of the current token + * in the stack passed in $tokens. + * + * @return void + */ + public function process(File $phpcsFile, $stackPtr) + { + $tokens = $phpcsFile->getTokens(); + + // Check if the next non whitespace token is a string. + $index = $phpcsFile->findNext(T_WHITESPACE, ($stackPtr + 1), null, true); + if ($tokens[$index]['code'] !== T_CONSTANT_ENCAPSED_STRING) { + return; + } + + // Make sure it is the only thing in the square brackets. + $next = $phpcsFile->findNext(T_WHITESPACE, ($index + 1), null, true); + if ($tokens[$next]['code'] !== T_CLOSE_SQUARE_BRACKET) { + return; + } + + // Allow indexes that have dots in them because we can't write + // them in dot notation. + $content = trim($tokens[$index]['content'], '"\' '); + if (strpos($content, '.') !== false) { + return; + } + + // Also ignore reserved words. + if ($content === 'super') { + return; + } + + // Token before the opening square bracket cannot be a var name. + $prev = $phpcsFile->findPrevious(T_WHITESPACE, ($stackPtr - 1), null, true); + if ($tokens[$prev]['code'] === T_STRING) { + $error = 'Object indexes must be written in dot notation'; + $phpcsFile->addError($error, $prev, 'Found'); + } + + }//end process() + + +}//end class diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Sniffs/Objects/ObjectInstantiationSniff.php b/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Sniffs/Objects/ObjectInstantiationSniff.php new file mode 100644 index 00000000..84facf05 --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Sniffs/Objects/ObjectInstantiationSniff.php @@ -0,0 +1,85 @@ + + * @copyright 2006-2015 Squiz Pty Ltd (ABN 77 084 670 600) + * @license https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence + */ + +namespace PHP_CodeSniffer\Standards\Squiz\Sniffs\Objects; + +use PHP_CodeSniffer\Files\File; +use PHP_CodeSniffer\Sniffs\Sniff; +use PHP_CodeSniffer\Util\Tokens; + +class ObjectInstantiationSniff implements Sniff +{ + + + /** + * Registers the token types that this sniff wishes to listen to. + * + * @return array + */ + public function register() + { + return [T_NEW]; + + }//end register() + + + /** + * Process the tokens that this sniff is listening for. + * + * @param \PHP_CodeSniffer\Files\File $phpcsFile The file where the token was found. + * @param int $stackPtr The position in the stack where + * the token was found. + * + * @return void + */ + public function process(File $phpcsFile, $stackPtr) + { + $tokens = $phpcsFile->getTokens(); + + $allowedTokens = Tokens::$emptyTokens; + $allowedTokens[] = T_BITWISE_AND; + + $prev = $phpcsFile->findPrevious($allowedTokens, ($stackPtr - 1), null, true); + + $allowedTokens = [ + T_EQUAL => T_EQUAL, + T_COALESCE_EQUAL => T_COALESCE_EQUAL, + T_DOUBLE_ARROW => T_DOUBLE_ARROW, + T_FN_ARROW => T_FN_ARROW, + T_MATCH_ARROW => T_MATCH_ARROW, + T_THROW => T_THROW, + T_RETURN => T_RETURN, + ]; + + if (isset($allowedTokens[$tokens[$prev]['code']]) === true) { + return; + } + + $ternaryLikeTokens = [ + T_COALESCE => true, + T_INLINE_THEN => true, + T_INLINE_ELSE => true, + ]; + + // For ternary like tokens, walk a little further back to see if it is preceded by + // one of the allowed tokens (within the same statement). + if (isset($ternaryLikeTokens[$tokens[$prev]['code']]) === true) { + $hasAllowedBefore = $phpcsFile->findPrevious($allowedTokens, ($prev - 1), null, false, null, true); + if ($hasAllowedBefore !== false) { + return; + } + } + + $error = 'New objects must be assigned to a variable'; + $phpcsFile->addError($error, $stackPtr, 'NotAssigned'); + + }//end process() + + +}//end class diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Sniffs/Objects/ObjectMemberCommaSniff.php b/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Sniffs/Objects/ObjectMemberCommaSniff.php new file mode 100644 index 00000000..787d3fc8 --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Sniffs/Objects/ObjectMemberCommaSniff.php @@ -0,0 +1,64 @@ + + * @copyright 2006-2015 Squiz Pty Ltd (ABN 77 084 670 600) + * @license https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence + */ + +namespace PHP_CodeSniffer\Standards\Squiz\Sniffs\Objects; + +use PHP_CodeSniffer\Files\File; +use PHP_CodeSniffer\Sniffs\Sniff; +use PHP_CodeSniffer\Util\Tokens; + +class ObjectMemberCommaSniff implements Sniff +{ + + /** + * A list of tokenizers this sniff supports. + * + * @var array + */ + public $supportedTokenizers = ['JS']; + + + /** + * Registers the token types that this sniff wishes to listen to. + * + * @return array + */ + public function register() + { + return [T_CLOSE_OBJECT]; + + }//end register() + + + /** + * Process the tokens that this sniff is listening for. + * + * @param \PHP_CodeSniffer\Files\File $phpcsFile The file where the token was found. + * @param int $stackPtr The position in the stack where + * the token was found. + * + * @return void + */ + public function process(File $phpcsFile, $stackPtr) + { + $tokens = $phpcsFile->getTokens(); + + $prev = $phpcsFile->findPrevious(Tokens::$emptyTokens, ($stackPtr - 1), null, true); + if ($tokens[$prev]['code'] === T_COMMA) { + $error = 'Last member of object must not be followed by a comma'; + $fix = $phpcsFile->addFixableError($error, $prev, 'Found'); + if ($fix === true) { + $phpcsFile->fixer->replaceToken($prev, ''); + } + } + + }//end process() + + +}//end class diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Sniffs/Operators/ComparisonOperatorUsageSniff.php b/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Sniffs/Operators/ComparisonOperatorUsageSniff.php new file mode 100644 index 00000000..85e9825f --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Sniffs/Operators/ComparisonOperatorUsageSniff.php @@ -0,0 +1,235 @@ + + * @copyright 2006-2015 Squiz Pty Ltd (ABN 77 084 670 600) + * @license https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence + */ + +namespace PHP_CodeSniffer\Standards\Squiz\Sniffs\Operators; + +use PHP_CodeSniffer\Files\File; +use PHP_CodeSniffer\Sniffs\Sniff; +use PHP_CodeSniffer\Util\Tokens; + +class ComparisonOperatorUsageSniff implements Sniff +{ + + /** + * A list of tokenizers this sniff supports. + * + * @var array + */ + public $supportedTokenizers = [ + 'PHP', + 'JS', + ]; + + /** + * A list of valid comparison operators. + * + * @var array + */ + private static $validOps = [ + T_IS_IDENTICAL => true, + T_IS_NOT_IDENTICAL => true, + T_LESS_THAN => true, + T_GREATER_THAN => true, + T_IS_GREATER_OR_EQUAL => true, + T_IS_SMALLER_OR_EQUAL => true, + T_INSTANCEOF => true, + ]; + + /** + * A list of invalid operators with their alternatives. + * + * @var array + */ + private static $invalidOps = [ + 'PHP' => [ + T_IS_EQUAL => '===', + T_IS_NOT_EQUAL => '!==', + T_BOOLEAN_NOT => '=== FALSE', + ], + 'JS' => [ + T_IS_EQUAL => '===', + T_IS_NOT_EQUAL => '!==', + ], + ]; + + + /** + * Registers the token types that this sniff wishes to listen to. + * + * @return array + */ + public function register() + { + return [ + T_IF, + T_ELSEIF, + T_INLINE_THEN, + T_WHILE, + T_FOR, + ]; + + }//end register() + + + /** + * Process the tokens that this sniff is listening for. + * + * @param \PHP_CodeSniffer\Files\File $phpcsFile The file where the token was found. + * @param int $stackPtr The position in the stack where the token + * was found. + * + * @return void + */ + public function process(File $phpcsFile, $stackPtr) + { + $tokens = $phpcsFile->getTokens(); + $tokenizer = $phpcsFile->tokenizerType; + + if ($tokens[$stackPtr]['code'] === T_INLINE_THEN) { + $end = $phpcsFile->findPrevious(Tokens::$emptyTokens, ($stackPtr - 1), null, true); + if ($tokens[$end]['code'] !== T_CLOSE_PARENTHESIS) { + // This inline IF statement does not have its condition + // bracketed, so we need to guess where it starts. + for ($i = ($end - 1); $i >= 0; $i--) { + if ($tokens[$i]['code'] === T_SEMICOLON) { + // Stop here as we assume it is the end + // of the previous statement. + break; + } else if ($tokens[$i]['code'] === T_OPEN_TAG) { + // Stop here as this is the start of the file. + break; + } else if ($tokens[$i]['code'] === T_CLOSE_CURLY_BRACKET) { + // Stop if this is the closing brace of + // a code block. + if (isset($tokens[$i]['scope_opener']) === true) { + break; + } + } else if ($tokens[$i]['code'] === T_OPEN_CURLY_BRACKET) { + // Stop if this is the opening brace of + // a code block. + if (isset($tokens[$i]['scope_closer']) === true) { + break; + } + } else if ($tokens[$i]['code'] === T_OPEN_PARENTHESIS) { + // Stop if this is the start of a pair of + // parentheses that surrounds the inline + // IF statement. + if (isset($tokens[$i]['parenthesis_closer']) === true + && $tokens[$i]['parenthesis_closer'] >= $stackPtr + ) { + break; + } + }//end if + }//end for + + $start = $phpcsFile->findNext(Tokens::$emptyTokens, ($i + 1), null, true); + } else { + if (isset($tokens[$end]['parenthesis_opener']) === false) { + return; + } + + $start = $tokens[$end]['parenthesis_opener']; + }//end if + } else if ($tokens[$stackPtr]['code'] === T_FOR) { + if (isset($tokens[$stackPtr]['parenthesis_opener']) === false) { + return; + } + + $openingBracket = $tokens[$stackPtr]['parenthesis_opener']; + $closingBracket = $tokens[$stackPtr]['parenthesis_closer']; + + $start = $phpcsFile->findNext(T_SEMICOLON, $openingBracket, $closingBracket); + $end = $phpcsFile->findNext(T_SEMICOLON, ($start + 1), $closingBracket); + if ($start === false || $end === false) { + return; + } + } else { + if (isset($tokens[$stackPtr]['parenthesis_opener']) === false) { + return; + } + + $start = $tokens[$stackPtr]['parenthesis_opener']; + $end = $tokens[$stackPtr]['parenthesis_closer']; + }//end if + + $requiredOps = 0; + $foundOps = 0; + $foundBooleans = 0; + + $lastNonEmpty = $start; + + for ($i = $start; $i <= $end; $i++) { + $type = $tokens[$i]['code']; + if (isset(self::$invalidOps[$tokenizer][$type]) === true) { + $error = 'Operator %s prohibited; use %s instead'; + $data = [ + $tokens[$i]['content'], + self::$invalidOps[$tokenizer][$type], + ]; + $phpcsFile->addError($error, $i, 'NotAllowed', $data); + $foundOps++; + } else if (isset(self::$validOps[$type]) === true) { + $foundOps++; + } + + if ($type === T_OPEN_PARENTHESIS + && isset($tokens[$i]['parenthesis_closer']) === true + && isset(Tokens::$functionNameTokens[$tokens[$lastNonEmpty]['code']]) === true + ) { + $i = $tokens[$i]['parenthesis_closer']; + $lastNonEmpty = $i; + continue; + } + + if ($tokens[$i]['code'] === T_TRUE || $tokens[$i]['code'] === T_FALSE) { + $foundBooleans++; + } + + if ($phpcsFile->tokenizerType !== 'JS' + && ($tokens[$i]['code'] === T_BOOLEAN_AND + || $tokens[$i]['code'] === T_BOOLEAN_OR) + ) { + $requiredOps++; + + // When the instanceof operator is used with another operator + // like ===, you can get more ops than are required. + if ($foundOps > $requiredOps) { + $foundOps = $requiredOps; + } + + // If we get to here and we have not found the right number of + // comparison operators, then we must have had an implicit + // true operation i.e., if ($a) instead of the required + // if ($a === true), so let's add an error. + if ($requiredOps !== $foundOps) { + $error = 'Implicit true comparisons prohibited; use === TRUE instead'; + $phpcsFile->addError($error, $stackPtr, 'ImplicitTrue'); + $foundOps++; + } + } + + if (isset(Tokens::$emptyTokens[$type]) === false) { + $lastNonEmpty = $i; + } + }//end for + + $requiredOps++; + + if ($phpcsFile->tokenizerType !== 'JS' + && $foundOps < $requiredOps + && ($requiredOps !== $foundBooleans) + ) { + $error = 'Implicit true comparisons prohibited; use === TRUE instead'; + $phpcsFile->addError($error, $stackPtr, 'ImplicitTrue'); + } + + }//end process() + + +}//end class diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Sniffs/Operators/IncrementDecrementUsageSniff.php b/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Sniffs/Operators/IncrementDecrementUsageSniff.php new file mode 100644 index 00000000..cb377845 --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Sniffs/Operators/IncrementDecrementUsageSniff.php @@ -0,0 +1,225 @@ + + * @copyright 2006-2015 Squiz Pty Ltd (ABN 77 084 670 600) + * @license https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence + */ + +namespace PHP_CodeSniffer\Standards\Squiz\Sniffs\Operators; + +use PHP_CodeSniffer\Files\File; +use PHP_CodeSniffer\Sniffs\Sniff; +use PHP_CodeSniffer\Util\Tokens; + +class IncrementDecrementUsageSniff implements Sniff +{ + + + /** + * Returns an array of tokens this test wants to listen for. + * + * @return array + */ + public function register() + { + return [ + T_EQUAL, + T_PLUS_EQUAL, + T_MINUS_EQUAL, + T_INC, + T_DEC, + ]; + + }//end register() + + + /** + * Processes this test, when one of its tokens is encountered. + * + * @param \PHP_CodeSniffer\Files\File $phpcsFile The file being scanned. + * @param int $stackPtr The position of the current token + * in the stack passed in $tokens. + * + * @return void + */ + public function process(File $phpcsFile, $stackPtr) + { + $tokens = $phpcsFile->getTokens(); + + if ($tokens[$stackPtr]['code'] === T_INC || $tokens[$stackPtr]['code'] === T_DEC) { + $this->processIncDec($phpcsFile, $stackPtr); + } else { + $this->processAssignment($phpcsFile, $stackPtr); + } + + }//end process() + + + /** + * Checks to ensure increment and decrement operators are not confusing. + * + * @param \PHP_CodeSniffer\Files\File $phpcsFile The file being scanned. + * @param int $stackPtr The position of the current token + * in the stack passed in $tokens. + * + * @return void + */ + protected function processIncDec($phpcsFile, $stackPtr) + { + $tokens = $phpcsFile->getTokens(); + + // Work out where the variable is so we know where to + // start looking for other operators. + if ($tokens[($stackPtr - 1)]['code'] === T_VARIABLE + || ($tokens[($stackPtr - 1)]['code'] === T_STRING + && ($tokens[($stackPtr - 2)]['code'] === T_OBJECT_OPERATOR + || $tokens[($stackPtr - 2)]['code'] === T_NULLSAFE_OBJECT_OPERATOR)) + ) { + $start = ($stackPtr + 1); + } else { + $start = ($stackPtr + 2); + } + + $next = $phpcsFile->findNext(Tokens::$emptyTokens, $start, null, true); + if ($next === false) { + return; + } + + if (isset(Tokens::$arithmeticTokens[$tokens[$next]['code']]) === true) { + $error = 'Increment and decrement operators cannot be used in an arithmetic operation'; + $phpcsFile->addError($error, $stackPtr, 'NotAllowed'); + return; + } + + $prev = $phpcsFile->findPrevious(Tokens::$emptyTokens, ($start - 3), null, true); + if ($prev === false) { + return; + } + + // Check if this is in a string concat. + if ($tokens[$next]['code'] === T_STRING_CONCAT || $tokens[$prev]['code'] === T_STRING_CONCAT) { + $error = 'Increment and decrement operators must be bracketed when used in string concatenation'; + $phpcsFile->addError($error, $stackPtr, 'NoBrackets'); + } + + }//end processIncDec() + + + /** + * Checks to ensure increment and decrement operators are used. + * + * @param \PHP_CodeSniffer\Files\File $phpcsFile The file being scanned. + * @param int $stackPtr The position of the current token + * in the stack passed in $tokens. + * + * @return void + */ + protected function processAssignment($phpcsFile, $stackPtr) + { + $tokens = $phpcsFile->getTokens(); + + $assignedVar = $phpcsFile->findPrevious(T_WHITESPACE, ($stackPtr - 1), null, true); + // Not an assignment, return. + if ($tokens[$assignedVar]['code'] !== T_VARIABLE) { + return; + } + + $statementEnd = $phpcsFile->findNext([T_SEMICOLON, T_CLOSE_PARENTHESIS, T_CLOSE_SQUARE_BRACKET, T_CLOSE_CURLY_BRACKET], $stackPtr); + + // If there is anything other than variables, numbers, spaces or operators we need to return. + $noiseTokens = $phpcsFile->findNext([T_LNUMBER, T_VARIABLE, T_WHITESPACE, T_PLUS, T_MINUS, T_OPEN_PARENTHESIS], ($stackPtr + 1), $statementEnd, true); + + if ($noiseTokens !== false) { + return; + } + + // If we are already using += or -=, we need to ignore + // the statement if a variable is being used. + if ($tokens[$stackPtr]['code'] !== T_EQUAL) { + $nextVar = $phpcsFile->findNext(T_VARIABLE, ($stackPtr + 1), $statementEnd); + if ($nextVar !== false) { + return; + } + } + + if ($tokens[$stackPtr]['code'] === T_EQUAL) { + $nextVar = ($stackPtr + 1); + $previousVariable = ($stackPtr + 1); + $variableCount = 0; + while (($nextVar = $phpcsFile->findNext(T_VARIABLE, ($nextVar + 1), $statementEnd)) !== false) { + $previousVariable = $nextVar; + $variableCount++; + } + + if ($variableCount !== 1) { + return; + } + + $nextVar = $previousVariable; + if ($tokens[$nextVar]['content'] !== $tokens[$assignedVar]['content']) { + return; + } + } + + // We have only one variable, and it's the same as what is being assigned, + // so we need to check what is being added or subtracted. + $nextNumber = ($stackPtr + 1); + $previousNumber = ($stackPtr + 1); + $numberCount = 0; + while (($nextNumber = $phpcsFile->findNext([T_LNUMBER], ($nextNumber + 1), $statementEnd, false)) !== false) { + $previousNumber = $nextNumber; + $numberCount++; + } + + if ($numberCount !== 1) { + return; + } + + $nextNumber = $previousNumber; + if ($tokens[$nextNumber]['content'] === '1') { + if ($tokens[$stackPtr]['code'] === T_EQUAL) { + $opToken = $phpcsFile->findNext([T_PLUS, T_MINUS], ($nextVar + 1), $statementEnd); + if ($opToken === false) { + // Operator was before the variable, like: + // $var = 1 + $var; + // So we ignore it. + return; + } + + $operator = $tokens[$opToken]['content']; + } else { + $operator = substr($tokens[$stackPtr]['content'], 0, 1); + } + + // If we are adding or subtracting negative value, the operator + // needs to be reversed. + if ($tokens[$stackPtr]['code'] !== T_EQUAL) { + $negative = $phpcsFile->findPrevious(T_MINUS, ($nextNumber - 1), $stackPtr); + if ($negative !== false) { + if ($operator === '+') { + $operator = '-'; + } else { + $operator = '+'; + } + } + } + + $expected = $operator.$operator.$tokens[$assignedVar]['content']; + $found = $phpcsFile->getTokensAsString($assignedVar, ($statementEnd - $assignedVar + 1)); + + if ($operator === '+') { + $error = 'Increment'; + } else { + $error = 'Decrement'; + } + + $error .= " operators should be used where possible; found \"$found\" but expected \"$expected\""; + $phpcsFile->addError($error, $stackPtr, 'Found'); + }//end if + + }//end processAssignment() + + +}//end class diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Sniffs/Operators/ValidLogicalOperatorsSniff.php b/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Sniffs/Operators/ValidLogicalOperatorsSniff.php new file mode 100644 index 00000000..f9ea6202 --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Sniffs/Operators/ValidLogicalOperatorsSniff.php @@ -0,0 +1,67 @@ + + * @copyright 2006-2015 Squiz Pty Ltd (ABN 77 084 670 600) + * @license https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence + */ + +namespace PHP_CodeSniffer\Standards\Squiz\Sniffs\Operators; + +use PHP_CodeSniffer\Files\File; +use PHP_CodeSniffer\Sniffs\Sniff; + +class ValidLogicalOperatorsSniff implements Sniff +{ + + + /** + * Returns an array of tokens this test wants to listen for. + * + * @return array + */ + public function register() + { + return [ + T_LOGICAL_AND, + T_LOGICAL_OR, + ]; + + }//end register() + + + /** + * Processes this test, when one of its tokens is encountered. + * + * @param \PHP_CodeSniffer\Files\File $phpcsFile The current file being scanned. + * @param int $stackPtr The position of the current token in the + * stack passed in $tokens. + * + * @return void + */ + public function process(File $phpcsFile, $stackPtr) + { + $tokens = $phpcsFile->getTokens(); + + $replacements = [ + 'and' => '&&', + 'or' => '||', + ]; + + $operator = strtolower($tokens[$stackPtr]['content']); + if (isset($replacements[$operator]) === false) { + return; + } + + $error = 'Logical operator "%s" is prohibited; use "%s" instead'; + $data = [ + $operator, + $replacements[$operator], + ]; + $phpcsFile->addError($error, $stackPtr, 'NotAllowed', $data); + + }//end process() + + +}//end class diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Sniffs/PHP/CommentedOutCodeSniff.php b/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Sniffs/PHP/CommentedOutCodeSniff.php new file mode 100644 index 00000000..04d06338 --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Sniffs/PHP/CommentedOutCodeSniff.php @@ -0,0 +1,288 @@ + + * @copyright 2006-2015 Squiz Pty Ltd (ABN 77 084 670 600) + * @license https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence + */ + +namespace PHP_CodeSniffer\Standards\Squiz\Sniffs\PHP; + +use PHP_CodeSniffer\Exceptions\TokenizerException; +use PHP_CodeSniffer\Files\File; +use PHP_CodeSniffer\Sniffs\Sniff; +use PHP_CodeSniffer\Util\Tokens; + +class CommentedOutCodeSniff implements Sniff +{ + + /** + * A list of tokenizers this sniff supports. + * + * @var array + */ + public $supportedTokenizers = [ + 'PHP', + 'CSS', + ]; + + /** + * If a comment is more than $maxPercentage% code, a warning will be shown. + * + * @var integer + */ + public $maxPercentage = 35; + + + /** + * Returns an array of tokens this test wants to listen for. + * + * @return array + */ + public function register() + { + return [T_COMMENT]; + + }//end register() + + + /** + * Processes this test, when one of its tokens is encountered. + * + * @param \PHP_CodeSniffer\Files\File $phpcsFile The file being scanned. + * @param int $stackPtr The position of the current token + * in the stack passed in $tokens. + * + * @return int|void Integer stack pointer to skip forward or void to continue + * normal file processing. + */ + public function process(File $phpcsFile, $stackPtr) + { + $tokens = $phpcsFile->getTokens(); + + // Ignore comments at the end of code blocks. + if (substr($tokens[$stackPtr]['content'], 0, 6) === '//end ') { + return; + } + + $content = ''; + $lastLineSeen = $tokens[$stackPtr]['line']; + $commentStyle = 'line'; + if (strpos($tokens[$stackPtr]['content'], '/*') === 0) { + $commentStyle = 'block'; + } + + $lastCommentBlockToken = $stackPtr; + for ($i = $stackPtr; $i < $phpcsFile->numTokens; $i++) { + if (isset(Tokens::$emptyTokens[$tokens[$i]['code']]) === false) { + break; + } + + if ($tokens[$i]['code'] === T_WHITESPACE) { + continue; + } + + if (isset(Tokens::$phpcsCommentTokens[$tokens[$i]['code']]) === true) { + $lastLineSeen = $tokens[$i]['line']; + continue; + } + + if ($commentStyle === 'line' + && ($lastLineSeen + 1) <= $tokens[$i]['line'] + && strpos($tokens[$i]['content'], '/*') === 0 + ) { + // First non-whitespace token on a new line is start of a different style comment. + break; + } + + if ($commentStyle === 'line' + && ($lastLineSeen + 1) < $tokens[$i]['line'] + ) { + // Blank line breaks a '//' style comment block. + break; + } + + /* + Trim as much off the comment as possible so we don't + have additional whitespace tokens or comment tokens + */ + + $tokenContent = trim($tokens[$i]['content']); + $break = false; + + if ($commentStyle === 'line') { + if (substr($tokenContent, 0, 2) === '//') { + $tokenContent = substr($tokenContent, 2); + } + + if (substr($tokenContent, 0, 1) === '#') { + $tokenContent = substr($tokenContent, 1); + } + } else { + if (substr($tokenContent, 0, 3) === '/**') { + $tokenContent = substr($tokenContent, 3); + } + + if (substr($tokenContent, 0, 2) === '/*') { + $tokenContent = substr($tokenContent, 2); + } + + if (substr($tokenContent, -2) === '*/') { + $tokenContent = substr($tokenContent, 0, -2); + $break = true; + } + + if (substr($tokenContent, 0, 1) === '*') { + $tokenContent = substr($tokenContent, 1); + } + }//end if + + $content .= $tokenContent.$phpcsFile->eolChar; + $lastLineSeen = $tokens[$i]['line']; + + $lastCommentBlockToken = $i; + + if ($break === true) { + // Closer of a block comment found. + break; + } + }//end for + + // Ignore typical warning suppression annotations from other tools. + if (preg_match('`^\s*@[A-Za-z()\._-]+\s*$`', $content) === 1) { + return ($lastCommentBlockToken + 1); + } + + // Quite a few comments use multiple dashes, equals signs etc + // to frame comments and licence headers. + $content = preg_replace('/[-=#*]{2,}/', '-', $content); + + // Random numbers sitting inside the content can throw parse errors + // for invalid literals in PHP7+, so strip those. + $content = preg_replace('/\d+/', '', $content); + + $content = trim($content); + + if ($content === '') { + return ($lastCommentBlockToken + 1); + } + + if ($phpcsFile->tokenizerType === 'PHP') { + $content = ''; + } + + // Because we are not really parsing code, the tokenizer can throw all sorts + // of errors that don't mean anything, so ignore them. + $oldErrors = ini_get('error_reporting'); + ini_set('error_reporting', 0); + try { + $tokenizerClass = get_class($phpcsFile->tokenizer); + $tokenizer = new $tokenizerClass($content, $phpcsFile->config, $phpcsFile->eolChar); + $stringTokens = $tokenizer->getTokens(); + } catch (TokenizerException $e) { + // We couldn't check the comment, so ignore it. + ini_set('error_reporting', $oldErrors); + return ($lastCommentBlockToken + 1); + } + + ini_set('error_reporting', $oldErrors); + + $numTokens = count($stringTokens); + + /* + We know what the first two and last two tokens should be + (because we put them there) so ignore this comment if those + tokens were not parsed correctly. It obviously means this is not + valid code. + */ + + // First token is always the opening tag. + if ($stringTokens[0]['code'] !== T_OPEN_TAG) { + return ($lastCommentBlockToken + 1); + } else { + array_shift($stringTokens); + --$numTokens; + } + + // Last token is always the closing tag, unless something went wrong. + if (isset($stringTokens[($numTokens - 1)]) === false + || $stringTokens[($numTokens - 1)]['code'] !== T_CLOSE_TAG + ) { + return ($lastCommentBlockToken + 1); + } else { + array_pop($stringTokens); + --$numTokens; + } + + // Second last token is always whitespace or a comment, depending + // on the code inside the comment. + if ($phpcsFile->tokenizerType === 'PHP') { + if (isset(Tokens::$emptyTokens[$stringTokens[($numTokens - 1)]['code']]) === false) { + return ($lastCommentBlockToken + 1); + } + + if ($stringTokens[($numTokens - 1)]['code'] === T_WHITESPACE) { + array_pop($stringTokens); + --$numTokens; + } + } + + $emptyTokens = [ + T_WHITESPACE => true, + T_STRING => true, + T_STRING_CONCAT => true, + T_ENCAPSED_AND_WHITESPACE => true, + T_NONE => true, + T_COMMENT => true, + ]; + $emptyTokens += Tokens::$phpcsCommentTokens; + + $numComment = 0; + $numPossible = 0; + $numCode = 0; + $numNonWhitespace = 0; + + for ($i = 0; $i < $numTokens; $i++) { + if (isset($emptyTokens[$stringTokens[$i]['code']]) === true) { + // Looks like comment. + $numComment++; + } else if (isset(Tokens::$comparisonTokens[$stringTokens[$i]['code']]) === true + || isset(Tokens::$arithmeticTokens[$stringTokens[$i]['code']]) === true + || $stringTokens[$i]['code'] === T_GOTO_LABEL + ) { + // Commented out HTML/XML and other docs contain a lot of these + // characters, so it is best to not use them directly. + $numPossible++; + } else { + // Looks like code. + $numCode++; + } + + if ($stringTokens[$i]['code'] !== T_WHITESPACE) { + ++$numNonWhitespace; + } + } + + // Ignore comments with only two or less non-whitespace tokens. + // Sample size too small for a reliably determination. + if ($numNonWhitespace <= 2) { + return ($lastCommentBlockToken + 1); + } + + $percentCode = ceil((($numCode / $numTokens) * 100)); + if ($percentCode > $this->maxPercentage) { + // Just in case. + $percentCode = min(100, $percentCode); + + $error = 'This comment is %s%% valid code; is this commented out code?'; + $data = [$percentCode]; + $phpcsFile->addWarning($error, $stackPtr, 'Found', $data); + } + + return ($lastCommentBlockToken + 1); + + }//end process() + + +}//end class diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Sniffs/PHP/DisallowBooleanStatementSniff.php b/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Sniffs/PHP/DisallowBooleanStatementSniff.php new file mode 100644 index 00000000..9d8077f5 --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Sniffs/PHP/DisallowBooleanStatementSniff.php @@ -0,0 +1,59 @@ + + * @copyright 2006-2015 Squiz Pty Ltd (ABN 77 084 670 600) + * @license https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence + */ + +namespace PHP_CodeSniffer\Standards\Squiz\Sniffs\PHP; + +use PHP_CodeSniffer\Files\File; +use PHP_CodeSniffer\Sniffs\Sniff; +use PHP_CodeSniffer\Util\Tokens; + +class DisallowBooleanStatementSniff implements Sniff +{ + + + /** + * Returns an array of tokens this test wants to listen for. + * + * @return array + */ + public function register() + { + return Tokens::$booleanOperators; + + }//end register() + + + /** + * Processes this test, when one of its tokens is encountered. + * + * @param \PHP_CodeSniffer\Files\File $phpcsFile The file being scanned. + * @param int $stackPtr The position of the current token + * in the stack passed in $tokens. + * + * @return void + */ + public function process(File $phpcsFile, $stackPtr) + { + $tokens = $phpcsFile->getTokens(); + if (isset($tokens[$stackPtr]['nested_parenthesis']) === true) { + foreach ($tokens[$stackPtr]['nested_parenthesis'] as $open => $close) { + if (isset($tokens[$open]['parenthesis_owner']) === true) { + // Any owner means we are not just a simple statement. + return; + } + } + } + + $error = 'Boolean operators are not allowed outside of control structure conditions'; + $phpcsFile->addError($error, $stackPtr, 'Found'); + + }//end process() + + +}//end class diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Sniffs/PHP/DisallowComparisonAssignmentSniff.php b/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Sniffs/PHP/DisallowComparisonAssignmentSniff.php new file mode 100644 index 00000000..7c7e2246 --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Sniffs/PHP/DisallowComparisonAssignmentSniff.php @@ -0,0 +1,111 @@ + + * @copyright 2006-2015 Squiz Pty Ltd (ABN 77 084 670 600) + * @license https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence + */ + +namespace PHP_CodeSniffer\Standards\Squiz\Sniffs\PHP; + +use PHP_CodeSniffer\Files\File; +use PHP_CodeSniffer\Sniffs\Sniff; +use PHP_CodeSniffer\Util\Tokens; + +class DisallowComparisonAssignmentSniff implements Sniff +{ + + + /** + * Returns an array of tokens this test wants to listen for. + * + * @return array + */ + public function register() + { + return [T_EQUAL]; + + }//end register() + + + /** + * Processes this test, when one of its tokens is encountered. + * + * @param \PHP_CodeSniffer\Files\File $phpcsFile The file being scanned. + * @param int $stackPtr The position of the current token + * in the stack passed in $tokens. + * + * @return void + */ + public function process(File $phpcsFile, $stackPtr) + { + $tokens = $phpcsFile->getTokens(); + + // Ignore default value assignments in function definitions. + $function = $phpcsFile->findPrevious(T_FUNCTION, ($stackPtr - 1), null, false, null, true); + if ($function !== false) { + $opener = $tokens[$function]['parenthesis_opener']; + $closer = $tokens[$function]['parenthesis_closer']; + if ($opener < $stackPtr && $closer > $stackPtr) { + return; + } + } + + // Ignore values in array definitions. + $array = $phpcsFile->findNext( + T_ARRAY, + ($stackPtr + 1), + null, + false, + null, + true + ); + + if ($array !== false) { + return; + } + + // Ignore function calls. + $ignore = [ + T_NULLSAFE_OBJECT_OPERATOR, + T_OBJECT_OPERATOR, + T_STRING, + T_VARIABLE, + T_WHITESPACE, + ]; + + $next = $phpcsFile->findNext($ignore, ($stackPtr + 1), null, true); + if ($tokens[$next]['code'] === T_CLOSURE + || ($tokens[$next]['code'] === T_OPEN_PARENTHESIS + && $tokens[($next - 1)]['code'] === T_STRING) + ) { + // Code will look like: $var = myFunction( + // and will be ignored. + return; + } + + $endStatement = $phpcsFile->findEndOfStatement($stackPtr); + for ($i = ($stackPtr + 1); $i < $endStatement; $i++) { + if ((isset(Tokens::$comparisonTokens[$tokens[$i]['code']]) === true + && $tokens[$i]['code'] !== T_COALESCE) + || $tokens[$i]['code'] === T_INLINE_THEN + ) { + $error = 'The value of a comparison must not be assigned to a variable'; + $phpcsFile->addError($error, $stackPtr, 'AssignedComparison'); + break; + } + + if (isset(Tokens::$booleanOperators[$tokens[$i]['code']]) === true + || $tokens[$i]['code'] === T_BOOLEAN_NOT + ) { + $error = 'The value of a boolean operation must not be assigned to a variable'; + $phpcsFile->addError($error, $stackPtr, 'AssignedBool'); + break; + } + } + + }//end process() + + +}//end class diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Sniffs/PHP/DisallowInlineIfSniff.php b/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Sniffs/PHP/DisallowInlineIfSniff.php new file mode 100644 index 00000000..60b0c370 --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Sniffs/PHP/DisallowInlineIfSniff.php @@ -0,0 +1,57 @@ + + * @copyright 2006-2015 Squiz Pty Ltd (ABN 77 084 670 600) + * @license https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence + */ + +namespace PHP_CodeSniffer\Standards\Squiz\Sniffs\PHP; + +use PHP_CodeSniffer\Files\File; +use PHP_CodeSniffer\Sniffs\Sniff; + +class DisallowInlineIfSniff implements Sniff +{ + + /** + * A list of tokenizers this sniff supports. + * + * @var array + */ + public $supportedTokenizers = [ + 'PHP', + 'JS', + ]; + + + /** + * Returns an array of tokens this test wants to listen for. + * + * @return array + */ + public function register() + { + return [T_INLINE_THEN]; + + }//end register() + + + /** + * Processes this test, when one of its tokens is encountered. + * + * @param \PHP_CodeSniffer\Files\File $phpcsFile The file being scanned. + * @param int $stackPtr The position of the current token + * in the stack passed in $tokens. + * + * @return void + */ + public function process(File $phpcsFile, $stackPtr) + { + $phpcsFile->addError('Inline IF statements are not allowed', $stackPtr, 'Found'); + + }//end process() + + +}//end class diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Sniffs/PHP/DisallowMultipleAssignmentsSniff.php b/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Sniffs/PHP/DisallowMultipleAssignmentsSniff.php new file mode 100644 index 00000000..4448d244 --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Sniffs/PHP/DisallowMultipleAssignmentsSniff.php @@ -0,0 +1,186 @@ + + * @copyright 2006-2015 Squiz Pty Ltd (ABN 77 084 670 600) + * @license https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence + */ + +namespace PHP_CodeSniffer\Standards\Squiz\Sniffs\PHP; + +use PHP_CodeSniffer\Files\File; +use PHP_CodeSniffer\Sniffs\Sniff; +use PHP_CodeSniffer\Util\Tokens; + +class DisallowMultipleAssignmentsSniff implements Sniff +{ + + + /** + * Returns an array of tokens this test wants to listen for. + * + * @return array + */ + public function register() + { + return [T_EQUAL]; + + }//end register() + + + /** + * Processes this test, when one of its tokens is encountered. + * + * @param \PHP_CodeSniffer\Files\File $phpcsFile The file being scanned. + * @param int $stackPtr The position of the current token in the + * stack passed in $tokens. + * + * @return void + */ + public function process(File $phpcsFile, $stackPtr) + { + $tokens = $phpcsFile->getTokens(); + + // Ignore default value assignments in function definitions. + $function = $phpcsFile->findPrevious([T_FUNCTION, T_CLOSURE, T_FN], ($stackPtr - 1), null, false, null, true); + if ($function !== false) { + $opener = $tokens[$function]['parenthesis_opener']; + $closer = $tokens[$function]['parenthesis_closer']; + if ($opener < $stackPtr && $closer > $stackPtr) { + return; + } + } + + // Ignore assignments in WHILE loop conditions. + if (isset($tokens[$stackPtr]['nested_parenthesis']) === true) { + $nested = $tokens[$stackPtr]['nested_parenthesis']; + foreach ($nested as $opener => $closer) { + if (isset($tokens[$opener]['parenthesis_owner']) === true + && $tokens[$tokens[$opener]['parenthesis_owner']]['code'] === T_WHILE + ) { + return; + } + } + } + + // Ignore member var definitions. + if (empty($tokens[$stackPtr]['conditions']) === false) { + $conditions = $tokens[$stackPtr]['conditions']; + end($conditions); + $deepestScope = key($conditions); + if (isset(Tokens::$ooScopeTokens[$tokens[$deepestScope]['code']]) === true) { + return; + } + } + + /* + The general rule is: + Find an equal sign and go backwards along the line. If you hit an + end bracket, skip to the opening bracket. When you find a variable, + stop. That variable must be the first non-empty token on the line + or in the statement. If not, throw an error. + */ + + for ($varToken = ($stackPtr - 1); $varToken >= 0; $varToken--) { + if (in_array($tokens[$varToken]['code'], [T_SEMICOLON, T_OPEN_CURLY_BRACKET], true) === true) { + // We've reached the next statement, so we + // didn't find a variable. + return; + } + + // Skip brackets. + if (isset($tokens[$varToken]['parenthesis_opener']) === true && $tokens[$varToken]['parenthesis_opener'] < $varToken) { + $varToken = $tokens[$varToken]['parenthesis_opener']; + continue; + } + + if (isset($tokens[$varToken]['bracket_opener']) === true) { + $varToken = $tokens[$varToken]['bracket_opener']; + continue; + } + + if ($tokens[$varToken]['code'] === T_VARIABLE) { + // We found our variable. + break; + } + }//end for + + if ($varToken <= 0) { + // Didn't find a variable. + return; + } + + $start = $phpcsFile->findStartOfStatement($varToken); + + $allowed = Tokens::$emptyTokens; + + $allowed[T_STRING] = T_STRING; + $allowed[T_NS_SEPARATOR] = T_NS_SEPARATOR; + $allowed[T_DOUBLE_COLON] = T_DOUBLE_COLON; + $allowed[T_OBJECT_OPERATOR] = T_OBJECT_OPERATOR; + $allowed[T_ASPERAND] = T_ASPERAND; + $allowed[T_DOLLAR] = T_DOLLAR; + $allowed[T_SELF] = T_SELF; + $allowed[T_PARENT] = T_PARENT; + $allowed[T_STATIC] = T_STATIC; + + $varToken = $phpcsFile->findPrevious($allowed, ($varToken - 1), null, true); + + if ($varToken < $start + && $tokens[$varToken]['code'] !== T_OPEN_PARENTHESIS + && $tokens[$varToken]['code'] !== T_OPEN_SQUARE_BRACKET + ) { + $varToken = $start; + } + + // Ignore the first part of FOR loops as we are allowed to + // assign variables there even though the variable is not the + // first thing on the line. + if ($tokens[$varToken]['code'] === T_OPEN_PARENTHESIS && isset($tokens[$varToken]['parenthesis_owner']) === true) { + $owner = $tokens[$varToken]['parenthesis_owner']; + if ($tokens[$owner]['code'] === T_FOR) { + return; + } + } + + if ($tokens[$varToken]['code'] === T_VARIABLE + || $tokens[$varToken]['code'] === T_OPEN_TAG + || $tokens[$varToken]['code'] === T_GOTO_LABEL + || $tokens[$varToken]['code'] === T_INLINE_THEN + || $tokens[$varToken]['code'] === T_INLINE_ELSE + || $tokens[$varToken]['code'] === T_SEMICOLON + || $tokens[$varToken]['code'] === T_CLOSE_PARENTHESIS + || isset($allowed[$tokens[$varToken]['code']]) === true + ) { + return; + } + + $error = 'Assignments must be the first block of code on a line'; + $errorCode = 'Found'; + + if (isset($nested) === true) { + $controlStructures = [ + T_IF => T_IF, + T_ELSEIF => T_ELSEIF, + T_SWITCH => T_SWITCH, + T_CASE => T_CASE, + T_FOR => T_FOR, + T_MATCH => T_MATCH, + ]; + foreach ($nested as $opener => $closer) { + if (isset($tokens[$opener]['parenthesis_owner']) === true + && isset($controlStructures[$tokens[$tokens[$opener]['parenthesis_owner']]['code']]) === true + ) { + $errorCode .= 'InControlStructure'; + break; + } + } + } + + $phpcsFile->addError($error, $stackPtr, $errorCode); + + }//end process() + + +}//end class diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Sniffs/PHP/DisallowSizeFunctionsInLoopsSniff.php b/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Sniffs/PHP/DisallowSizeFunctionsInLoopsSniff.php new file mode 100644 index 00000000..a0f1161c --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Sniffs/PHP/DisallowSizeFunctionsInLoopsSniff.php @@ -0,0 +1,116 @@ + + * @copyright 2006-2015 Squiz Pty Ltd (ABN 77 084 670 600) + * @license https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence + */ + +namespace PHP_CodeSniffer\Standards\Squiz\Sniffs\PHP; + +use PHP_CodeSniffer\Files\File; +use PHP_CodeSniffer\Sniffs\Sniff; + +class DisallowSizeFunctionsInLoopsSniff implements Sniff +{ + + /** + * A list of tokenizers this sniff supports. + * + * @var array + */ + public $supportedTokenizers = [ + 'PHP', + 'JS', + ]; + + /** + * An array of functions we don't want in the condition of loops. + * + * @var array + */ + protected $forbiddenFunctions = [ + 'PHP' => [ + 'sizeof' => true, + 'strlen' => true, + 'count' => true, + ], + 'JS' => ['length' => true], + ]; + + + /** + * Returns an array of tokens this test wants to listen for. + * + * @return array + */ + public function register() + { + return [ + T_WHILE, + T_FOR, + ]; + + }//end register() + + + /** + * Processes this test, when one of its tokens is encountered. + * + * @param \PHP_CodeSniffer\Files\File $phpcsFile The file being scanned. + * @param int $stackPtr The position of the current token + * in the stack passed in $tokens. + * + * @return void + */ + public function process(File $phpcsFile, $stackPtr) + { + $tokens = $phpcsFile->getTokens(); + $tokenizer = $phpcsFile->tokenizerType; + $openBracket = $tokens[$stackPtr]['parenthesis_opener']; + $closeBracket = $tokens[$stackPtr]['parenthesis_closer']; + + if ($tokens[$stackPtr]['code'] === T_FOR) { + // We only want to check the condition in FOR loops. + $start = $phpcsFile->findNext(T_SEMICOLON, ($openBracket + 1)); + $end = $phpcsFile->findPrevious(T_SEMICOLON, ($closeBracket - 1)); + } else { + $start = $openBracket; + $end = $closeBracket; + } + + for ($i = ($start + 1); $i < $end; $i++) { + if ($tokens[$i]['code'] === T_STRING + && isset($this->forbiddenFunctions[$tokenizer][$tokens[$i]['content']]) === true + ) { + $functionName = $tokens[$i]['content']; + if ($tokenizer === 'JS') { + // Needs to be in the form object.function to be valid. + $prev = $phpcsFile->findPrevious(T_WHITESPACE, ($i - 1), null, true); + if ($prev === false || $tokens[$prev]['code'] !== T_OBJECT_OPERATOR) { + continue; + } + + $functionName = 'object.'.$functionName; + } else { + // Make sure it isn't a member var. + if ($tokens[($i - 1)]['code'] === T_OBJECT_OPERATOR + || $tokens[($i - 1)]['code'] === T_NULLSAFE_OBJECT_OPERATOR + ) { + continue; + } + + $functionName .= '()'; + } + + $error = 'The use of %s inside a loop condition is not allowed; assign the return value to a variable and use the variable in the loop condition instead'; + $data = [$functionName]; + $phpcsFile->addError($error, $i, 'Found', $data); + }//end if + }//end for + + }//end process() + + +}//end class diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Sniffs/PHP/DiscouragedFunctionsSniff.php b/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Sniffs/PHP/DiscouragedFunctionsSniff.php new file mode 100644 index 00000000..9f86a179 --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Sniffs/PHP/DiscouragedFunctionsSniff.php @@ -0,0 +1,38 @@ + + * @copyright 2006-2015 Squiz Pty Ltd (ABN 77 084 670 600) + * @license https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence + */ + +namespace PHP_CodeSniffer\Standards\Squiz\Sniffs\PHP; + +use PHP_CodeSniffer\Standards\Generic\Sniffs\PHP\ForbiddenFunctionsSniff as GenericForbiddenFunctionsSniff; + +class DiscouragedFunctionsSniff extends GenericForbiddenFunctionsSniff +{ + + /** + * A list of forbidden functions with their alternatives. + * + * The value is NULL if no alternative exists. IE, the + * function should just not be used. + * + * @var array + */ + public $forbiddenFunctions = [ + 'error_log' => null, + 'print_r' => null, + 'var_dump' => null, + ]; + + /** + * If true, an error will be thrown; otherwise a warning. + * + * @var boolean + */ + public $error = false; + +}//end class diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Sniffs/PHP/EmbeddedPhpSniff.php b/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Sniffs/PHP/EmbeddedPhpSniff.php new file mode 100644 index 00000000..ef11aa6c --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Sniffs/PHP/EmbeddedPhpSniff.php @@ -0,0 +1,402 @@ + + * @copyright 2006-2015 Squiz Pty Ltd (ABN 77 084 670 600) + * @license https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence + */ + +namespace PHP_CodeSniffer\Standards\Squiz\Sniffs\PHP; + +use PHP_CodeSniffer\Files\File; +use PHP_CodeSniffer\Sniffs\Sniff; +use PHP_CodeSniffer\Util\Tokens; + +class EmbeddedPhpSniff implements Sniff +{ + + + /** + * Returns an array of tokens this test wants to listen for. + * + * @return array + */ + public function register() + { + return [T_OPEN_TAG]; + + }//end register() + + + /** + * Processes this test, when one of its tokens is encountered. + * + * @param \PHP_CodeSniffer\Files\File $phpcsFile The file being scanned. + * @param int $stackPtr The position of the current token in the + * stack passed in $tokens. + * + * @return void + */ + public function process(File $phpcsFile, $stackPtr) + { + $tokens = $phpcsFile->getTokens(); + + // If the close php tag is on the same line as the opening + // then we have an inline embedded PHP block. + $closeTag = $phpcsFile->findNext(T_CLOSE_TAG, $stackPtr); + if ($closeTag === false || $tokens[$stackPtr]['line'] !== $tokens[$closeTag]['line']) { + $this->validateMultilineEmbeddedPhp($phpcsFile, $stackPtr); + } else { + $this->validateInlineEmbeddedPhp($phpcsFile, $stackPtr); + } + + }//end process() + + + /** + * Validates embedded PHP that exists on multiple lines. + * + * @param \PHP_CodeSniffer\Files\File $phpcsFile The file being scanned. + * @param int $stackPtr The position of the current token in the + * stack passed in $tokens. + * + * @return void + */ + private function validateMultilineEmbeddedPhp($phpcsFile, $stackPtr) + { + $tokens = $phpcsFile->getTokens(); + + $prevTag = $phpcsFile->findPrevious(T_OPEN_TAG, ($stackPtr - 1)); + if ($prevTag === false) { + // This is the first open tag. + return; + } + + $firstContent = $phpcsFile->findNext(T_WHITESPACE, ($stackPtr + 1), null, true); + $closingTag = $phpcsFile->findNext(T_CLOSE_TAG, $stackPtr); + if ($closingTag !== false) { + $nextContent = $phpcsFile->findNext(T_WHITESPACE, ($closingTag + 1), $phpcsFile->numTokens, true); + if ($nextContent === false) { + // Final closing tag. It will be handled elsewhere. + return; + } + + // We have an opening and a closing tag, that lie within other content. + if ($firstContent === $closingTag) { + $error = 'Empty embedded PHP tag found'; + $fix = $phpcsFile->addFixableError($error, $stackPtr, 'Empty'); + if ($fix === true) { + $phpcsFile->fixer->beginChangeset(); + for ($i = $stackPtr; $i <= $closingTag; $i++) { + $phpcsFile->fixer->replaceToken($i, ''); + } + + $phpcsFile->fixer->endChangeset(); + } + + return; + } + }//end if + + if ($tokens[$firstContent]['line'] === $tokens[$stackPtr]['line']) { + $error = 'Opening PHP tag must be on a line by itself'; + $fix = $phpcsFile->addFixableError($error, $stackPtr, 'ContentAfterOpen'); + if ($fix === true) { + $first = $phpcsFile->findFirstOnLine(T_WHITESPACE, $stackPtr, true); + $padding = (strlen($tokens[$first]['content']) - strlen(ltrim($tokens[$first]['content']))); + $phpcsFile->fixer->beginChangeset(); + $phpcsFile->fixer->addNewline($stackPtr); + $phpcsFile->fixer->addContent($stackPtr, str_repeat(' ', $padding)); + $phpcsFile->fixer->endChangeset(); + } + } else { + // Check the indent of the first line, except if it is a scope closer. + if (isset($tokens[$firstContent]['scope_closer']) === false + || $tokens[$firstContent]['scope_closer'] !== $firstContent + ) { + // Check for a blank line at the top. + if ($tokens[$firstContent]['line'] > ($tokens[$stackPtr]['line'] + 1)) { + // Find a token on the blank line to throw the error on. + $i = $stackPtr; + do { + $i++; + } while ($tokens[$i]['line'] !== ($tokens[$stackPtr]['line'] + 1)); + + $error = 'Blank line found at start of embedded PHP content'; + $fix = $phpcsFile->addFixableError($error, $i, 'SpacingBefore'); + if ($fix === true) { + $phpcsFile->fixer->beginChangeset(); + for ($i = ($stackPtr + 1); $i < $firstContent; $i++) { + if ($tokens[$i]['line'] === $tokens[$firstContent]['line'] + || $tokens[$i]['line'] === $tokens[$stackPtr]['line'] + ) { + continue; + } + + $phpcsFile->fixer->replaceToken($i, ''); + } + + $phpcsFile->fixer->endChangeset(); + } + }//end if + + $first = $phpcsFile->findFirstOnLine(T_WHITESPACE, $stackPtr); + if ($first === false) { + $first = $phpcsFile->findFirstOnLine(T_INLINE_HTML, $stackPtr); + $indent = (strlen($tokens[$first]['content']) - strlen(ltrim($tokens[$first]['content']))); + } else { + $indent = ($tokens[($first + 1)]['column'] - 1); + } + + $contentColumn = ($tokens[$firstContent]['column'] - 1); + if ($contentColumn !== $indent) { + $error = 'First line of embedded PHP code must be indented %s spaces; %s found'; + $data = [ + $indent, + $contentColumn, + ]; + $fix = $phpcsFile->addFixableError($error, $firstContent, 'Indent', $data); + if ($fix === true) { + $padding = str_repeat(' ', $indent); + if ($contentColumn === 0) { + $phpcsFile->fixer->addContentBefore($firstContent, $padding); + } else { + $phpcsFile->fixer->replaceToken(($firstContent - 1), $padding); + } + } + } + }//end if + }//end if + + $lastContent = $phpcsFile->findPrevious(T_WHITESPACE, ($stackPtr - 1), null, true); + if ($tokens[$lastContent]['line'] === $tokens[$stackPtr]['line'] + && trim($tokens[$lastContent]['content']) !== '' + ) { + $error = 'Opening PHP tag must be on a line by itself'; + $fix = $phpcsFile->addFixableError($error, $stackPtr, 'ContentBeforeOpen'); + if ($fix === true) { + $first = $phpcsFile->findFirstOnLine(T_WHITESPACE, $stackPtr); + if ($first === false) { + $first = $phpcsFile->findFirstOnLine(T_INLINE_HTML, $stackPtr); + $padding = (strlen($tokens[$first]['content']) - strlen(ltrim($tokens[$first]['content']))); + } else { + $padding = ($tokens[($first + 1)]['column'] - 1); + } + + $phpcsFile->fixer->addContentBefore($stackPtr, $phpcsFile->eolChar.str_repeat(' ', $padding)); + } + } else { + // Find the first token on the first non-empty line we find. + for ($first = ($stackPtr - 1); $first > 0; $first--) { + if ($tokens[$first]['line'] === $tokens[$stackPtr]['line']) { + continue; + } else if (trim($tokens[$first]['content']) !== '') { + $first = $phpcsFile->findFirstOnLine([], $first, true); + break; + } + } + + $expected = 0; + if ($tokens[$first]['code'] === T_INLINE_HTML + && trim($tokens[$first]['content']) !== '' + ) { + $expected = (strlen($tokens[$first]['content']) - strlen(ltrim($tokens[$first]['content']))); + } else if ($tokens[$first]['code'] === T_WHITESPACE) { + $expected = ($tokens[($first + 1)]['column'] - 1); + } + + $expected += 4; + $found = ($tokens[$stackPtr]['column'] - 1); + if ($found > $expected) { + $error = 'Opening PHP tag indent incorrect; expected no more than %s spaces but found %s'; + $data = [ + $expected, + $found, + ]; + $fix = $phpcsFile->addFixableError($error, $stackPtr, 'OpenTagIndent', $data); + if ($fix === true) { + $phpcsFile->fixer->replaceToken(($stackPtr - 1), str_repeat(' ', $expected)); + } + } + }//end if + + if ($closingTag === false) { + return; + } + + $lastContent = $phpcsFile->findPrevious(T_WHITESPACE, ($closingTag - 1), ($stackPtr + 1), true); + $nextContent = $phpcsFile->findNext(T_WHITESPACE, ($closingTag + 1), null, true); + + if ($tokens[$lastContent]['line'] === $tokens[$closingTag]['line']) { + $error = 'Closing PHP tag must be on a line by itself'; + $fix = $phpcsFile->addFixableError($error, $closingTag, 'ContentBeforeEnd'); + if ($fix === true) { + $first = $phpcsFile->findFirstOnLine(T_WHITESPACE, $closingTag, true); + $phpcsFile->fixer->beginChangeset(); + $phpcsFile->fixer->addContentBefore($closingTag, str_repeat(' ', ($tokens[$first]['column'] - 1))); + $phpcsFile->fixer->addNewlineBefore($closingTag); + $phpcsFile->fixer->endChangeset(); + } + } else if ($tokens[$nextContent]['line'] === $tokens[$closingTag]['line']) { + $error = 'Closing PHP tag must be on a line by itself'; + $fix = $phpcsFile->addFixableError($error, $closingTag, 'ContentAfterEnd'); + if ($fix === true) { + $first = $phpcsFile->findFirstOnLine(T_WHITESPACE, $closingTag, true); + $phpcsFile->fixer->beginChangeset(); + $phpcsFile->fixer->addNewline($closingTag); + $phpcsFile->fixer->addContent($closingTag, str_repeat(' ', ($tokens[$first]['column'] - 1))); + $phpcsFile->fixer->endChangeset(); + } + }//end if + + $next = $phpcsFile->findNext(T_OPEN_TAG, ($closingTag + 1)); + if ($next === false) { + return; + } + + // Check for a blank line at the bottom. + if ((isset($tokens[$lastContent]['scope_closer']) === false + || $tokens[$lastContent]['scope_closer'] !== $lastContent) + && $tokens[$lastContent]['line'] < ($tokens[$closingTag]['line'] - 1) + ) { + // Find a token on the blank line to throw the error on. + $i = $closingTag; + do { + $i--; + } while ($tokens[$i]['line'] !== ($tokens[$closingTag]['line'] - 1)); + + $error = 'Blank line found at end of embedded PHP content'; + $fix = $phpcsFile->addFixableError($error, $i, 'SpacingAfter'); + if ($fix === true) { + $phpcsFile->fixer->beginChangeset(); + for ($i = ($lastContent + 1); $i < $closingTag; $i++) { + if ($tokens[$i]['line'] === $tokens[$lastContent]['line'] + || $tokens[$i]['line'] === $tokens[$closingTag]['line'] + ) { + continue; + } + + $phpcsFile->fixer->replaceToken($i, ''); + } + + $phpcsFile->fixer->endChangeset(); + } + }//end if + + }//end validateMultilineEmbeddedPhp() + + + /** + * Validates embedded PHP that exists on one line. + * + * @param \PHP_CodeSniffer\Files\File $phpcsFile The file being scanned. + * @param int $stackPtr The position of the current token in the + * stack passed in $tokens. + * + * @return void + */ + private function validateInlineEmbeddedPhp($phpcsFile, $stackPtr) + { + $tokens = $phpcsFile->getTokens(); + + // We only want one line PHP sections, so return if the closing tag is + // on the next line. + $closeTag = $phpcsFile->findNext(T_CLOSE_TAG, $stackPtr, null, false); + if ($tokens[$stackPtr]['line'] !== $tokens[$closeTag]['line']) { + return; + } + + // Check that there is one, and only one space at the start of the statement. + $firstContent = $phpcsFile->findNext(T_WHITESPACE, ($stackPtr + 1), $closeTag, true); + + if ($firstContent === false) { + $error = 'Empty embedded PHP tag found'; + $fix = $phpcsFile->addFixableError($error, $stackPtr, 'Empty'); + if ($fix === true) { + $phpcsFile->fixer->beginChangeset(); + for ($i = $stackPtr; $i <= $closeTag; $i++) { + $phpcsFile->fixer->replaceToken($i, ''); + } + + $phpcsFile->fixer->endChangeset(); + } + + return; + } + + // The open tag token always contains a single space after it. + $leadingSpace = 1; + if ($tokens[($stackPtr + 1)]['code'] === T_WHITESPACE) { + $leadingSpace = ($tokens[($stackPtr + 1)]['length'] + 1); + } + + if ($leadingSpace !== 1) { + $error = 'Expected 1 space after opening PHP tag; %s found'; + $data = [$leadingSpace]; + $fix = $phpcsFile->addFixableError($error, $stackPtr, 'SpacingAfterOpen', $data); + if ($fix === true) { + $phpcsFile->fixer->replaceToken(($stackPtr + 1), ''); + } + } + + $prev = $phpcsFile->findPrevious(Tokens::$emptyTokens, ($closeTag - 1), $stackPtr, true); + if ($prev !== $stackPtr) { + if ((isset($tokens[$prev]['scope_opener']) === false + || $tokens[$prev]['scope_opener'] !== $prev) + && (isset($tokens[$prev]['scope_closer']) === false + || $tokens[$prev]['scope_closer'] !== $prev) + && $tokens[$prev]['code'] !== T_SEMICOLON + ) { + $error = 'Inline PHP statement must end with a semicolon'; + $fix = $phpcsFile->addFixableError($error, $stackPtr, 'NoSemicolon'); + if ($fix === true) { + $phpcsFile->fixer->addContent($prev, ';'); + } + } else if ($tokens[$prev]['code'] === T_SEMICOLON) { + $statementCount = 1; + for ($i = ($stackPtr + 1); $i < $prev; $i++) { + if ($tokens[$i]['code'] === T_SEMICOLON) { + $statementCount++; + } + } + + if ($statementCount > 1) { + $error = 'Inline PHP statement must contain a single statement; %s found'; + $data = [$statementCount]; + $phpcsFile->addError($error, $stackPtr, 'MultipleStatements', $data); + } + } + }//end if + + $trailingSpace = 0; + if ($tokens[($closeTag - 1)]['code'] === T_WHITESPACE) { + $trailingSpace = $tokens[($closeTag - 1)]['length']; + } else if (($tokens[($closeTag - 1)]['code'] === T_COMMENT + || isset(Tokens::$phpcsCommentTokens[$tokens[($closeTag - 1)]['code']]) === true) + && substr($tokens[($closeTag - 1)]['content'], -1) === ' ' + ) { + $trailingSpace = (strlen($tokens[($closeTag - 1)]['content']) - strlen(rtrim($tokens[($closeTag - 1)]['content']))); + } + + if ($trailingSpace !== 1) { + $error = 'Expected 1 space before closing PHP tag; %s found'; + $data = [$trailingSpace]; + $fix = $phpcsFile->addFixableError($error, $stackPtr, 'SpacingBeforeClose', $data); + if ($fix === true) { + if ($trailingSpace === 0) { + $phpcsFile->fixer->addContentBefore($closeTag, ' '); + } else if ($tokens[($closeTag - 1)]['code'] === T_COMMENT + || isset(Tokens::$phpcsCommentTokens[$tokens[($closeTag - 1)]['code']]) === true + ) { + $phpcsFile->fixer->replaceToken(($closeTag - 1), rtrim($tokens[($closeTag - 1)]['content']).' '); + } else { + $phpcsFile->fixer->replaceToken(($closeTag - 1), ' '); + } + } + } + + }//end validateInlineEmbeddedPhp() + + +}//end class diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Sniffs/PHP/EvalSniff.php b/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Sniffs/PHP/EvalSniff.php new file mode 100644 index 00000000..3162c14b --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Sniffs/PHP/EvalSniff.php @@ -0,0 +1,48 @@ + + * @copyright 2006-2015 Squiz Pty Ltd (ABN 77 084 670 600) + * @license https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence + */ + +namespace PHP_CodeSniffer\Standards\Squiz\Sniffs\PHP; + +use PHP_CodeSniffer\Files\File; +use PHP_CodeSniffer\Sniffs\Sniff; + +class EvalSniff implements Sniff +{ + + + /** + * Returns an array of tokens this test wants to listen for. + * + * @return array + */ + public function register() + { + return [T_EVAL]; + + }//end register() + + + /** + * Processes this test, when one of its tokens is encountered. + * + * @param \PHP_CodeSniffer\Files\File $phpcsFile The file being scanned. + * @param int $stackPtr The position of the current token in + * the stack passed in $tokens. + * + * @return void + */ + public function process(File $phpcsFile, $stackPtr) + { + $error = 'Use of eval() is discouraged'; + $phpcsFile->addWarning($error, $stackPtr, 'Discouraged'); + + }//end process() + + +}//end class diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Sniffs/PHP/GlobalKeywordSniff.php b/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Sniffs/PHP/GlobalKeywordSniff.php new file mode 100644 index 00000000..024eff8a --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Sniffs/PHP/GlobalKeywordSniff.php @@ -0,0 +1,53 @@ + + * @copyright 2006-2015 Squiz Pty Ltd (ABN 77 084 670 600) + * @license https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence + */ + +namespace PHP_CodeSniffer\Standards\Squiz\Sniffs\PHP; + +use PHP_CodeSniffer\Files\File; +use PHP_CodeSniffer\Sniffs\Sniff; + +class GlobalKeywordSniff implements Sniff +{ + + + /** + * Returns an array of tokens this test wants to listen for. + * + * @return array + */ + public function register() + { + return [T_GLOBAL]; + + }//end register() + + + /** + * Processes this test, when one of its tokens is encountered. + * + * @param \PHP_CodeSniffer\Files\File $phpcsFile The file being scanned. + * @param int $stackPtr The position of the current token in the + * stack passed in $tokens. + * + * @return void + */ + public function process(File $phpcsFile, $stackPtr) + { + $tokens = $phpcsFile->getTokens(); + + $nextVar = $tokens[$phpcsFile->findNext([T_VARIABLE], $stackPtr)]; + $varName = str_replace('$', '', $nextVar['content']); + $error = 'Use of the "global" keyword is forbidden; use "$GLOBALS[\'%s\']" instead'; + $data = [$varName]; + $phpcsFile->addError($error, $stackPtr, 'NotAllowed', $data); + + }//end process() + + +}//end class diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Sniffs/PHP/HeredocSniff.php b/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Sniffs/PHP/HeredocSniff.php new file mode 100644 index 00000000..67369cb2 --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Sniffs/PHP/HeredocSniff.php @@ -0,0 +1,51 @@ + + * @copyright 2006-2015 Squiz Pty Ltd (ABN 77 084 670 600) + * @license https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence + */ + +namespace PHP_CodeSniffer\Standards\Squiz\Sniffs\PHP; + +use PHP_CodeSniffer\Files\File; +use PHP_CodeSniffer\Sniffs\Sniff; + +class HeredocSniff implements Sniff +{ + + + /** + * Returns an array of tokens this test wants to listen for. + * + * @return array + */ + public function register() + { + return [ + T_START_HEREDOC, + T_START_NOWDOC, + ]; + + }//end register() + + + /** + * Processes this test, when one of its tokens is encountered. + * + * @param \PHP_CodeSniffer\Files\File $phpcsFile The file being scanned. + * @param int $stackPtr The position of the current token in the + * stack passed in $tokens. + * + * @return void + */ + public function process(File $phpcsFile, $stackPtr) + { + $error = 'Use of heredoc and nowdoc syntax ("<<<") is not allowed; use standard strings or inline HTML instead'; + $phpcsFile->addError($error, $stackPtr, 'NotAllowed'); + + }//end process() + + +}//end class diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Sniffs/PHP/InnerFunctionsSniff.php b/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Sniffs/PHP/InnerFunctionsSniff.php new file mode 100644 index 00000000..4e3ee215 --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Sniffs/PHP/InnerFunctionsSniff.php @@ -0,0 +1,68 @@ + + * @copyright 2006-2015 Squiz Pty Ltd (ABN 77 084 670 600) + * @license https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence + */ + +namespace PHP_CodeSniffer\Standards\Squiz\Sniffs\PHP; + +use PHP_CodeSniffer\Files\File; +use PHP_CodeSniffer\Sniffs\Sniff; + +class InnerFunctionsSniff implements Sniff +{ + + + /** + * Returns an array of tokens this test wants to listen for. + * + * @return array + */ + public function register() + { + return [T_FUNCTION]; + + }//end register() + + + /** + * Processes this test, when one of its tokens is encountered. + * + * @param \PHP_CodeSniffer\Files\File $phpcsFile The file being scanned. + * @param int $stackPtr The position of the current token in the + * stack passed in $tokens. + * + * @return void + */ + public function process(File $phpcsFile, $stackPtr) + { + $tokens = $phpcsFile->getTokens(); + + $function = $phpcsFile->getCondition($stackPtr, T_FUNCTION); + if ($function === false) { + // Not a nested function. + return; + } + + $class = $phpcsFile->getCondition($stackPtr, T_ANON_CLASS, false); + if ($class !== false && $class > $function) { + // Ignore methods in anon classes. + return; + } + + $prev = $phpcsFile->findPrevious(T_WHITESPACE, ($stackPtr - 1), null, true); + if ($tokens[$prev]['code'] === T_EQUAL) { + // Ignore closures. + return; + } + + $error = 'The use of inner functions is forbidden'; + $phpcsFile->addError($error, $stackPtr, 'NotAllowed'); + + }//end process() + + +}//end class diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Sniffs/PHP/LowercasePHPFunctionsSniff.php b/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Sniffs/PHP/LowercasePHPFunctionsSniff.php new file mode 100644 index 00000000..519b7f6c --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Sniffs/PHP/LowercasePHPFunctionsSniff.php @@ -0,0 +1,162 @@ + + * @copyright 2006-2015 Squiz Pty Ltd (ABN 77 084 670 600) + * @license https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence + */ + +namespace PHP_CodeSniffer\Standards\Squiz\Sniffs\PHP; + +use PHP_CodeSniffer\Files\File; +use PHP_CodeSniffer\Sniffs\Sniff; +use PHP_CodeSniffer\Util\Tokens; + +class LowercasePHPFunctionsSniff implements Sniff +{ + + /** + * String -> int hash map of all php built in function names + * + * @var array + */ + private $builtInFunctions; + + + /** + * Construct the LowercasePHPFunctionSniff + */ + public function __construct() + { + + $allFunctions = get_defined_functions(); + $this->builtInFunctions = array_flip($allFunctions['internal']); + + }//end __construct() + + + /** + * Returns an array of tokens this test wants to listen for. + * + * @return array + */ + public function register() + { + return [T_STRING]; + + }//end register() + + + /** + * Processes this test, when one of its tokens is encountered. + * + * @param \PHP_CodeSniffer\Files\File $phpcsFile The file being scanned. + * @param int $stackPtr The position of the current token in + * the stack passed in $tokens. + * + * @return void + */ + public function process(File $phpcsFile, $stackPtr) + { + $tokens = $phpcsFile->getTokens(); + + $content = $tokens[$stackPtr]['content']; + $contentLc = strtolower($content); + if ($content === $contentLc) { + return; + } + + // Make sure it is an inbuilt PHP function. + // PHP_CodeSniffer can possibly include user defined functions + // through the use of vendor/autoload.php. + if (isset($this->builtInFunctions[$contentLc]) === false) { + return; + } + + // Make sure this is a function call or a use statement. + $next = $phpcsFile->findNext(Tokens::$emptyTokens, ($stackPtr + 1), null, true); + if ($next === false) { + // Not a function call. + return; + } + + $ignore = Tokens::$emptyTokens; + $ignore[] = T_BITWISE_AND; + $prev = $phpcsFile->findPrevious($ignore, ($stackPtr - 1), null, true); + $prevPrev = $phpcsFile->findPrevious(Tokens::$emptyTokens, ($prev - 1), null, true); + + if ($tokens[$next]['code'] !== T_OPEN_PARENTHESIS) { + // Is this a use statement importing a PHP native function ? + if ($tokens[$next]['code'] !== T_NS_SEPARATOR + && $tokens[$prev]['code'] === T_STRING + && $tokens[$prev]['content'] === 'function' + && $prevPrev !== false + && $tokens[$prevPrev]['code'] === T_USE + ) { + $error = 'Use statements for PHP native functions must be lowercase; expected "%s" but found "%s"'; + $data = [ + $contentLc, + $content, + ]; + + $fix = $phpcsFile->addFixableError($error, $stackPtr, 'UseStatementUppercase', $data); + if ($fix === true) { + $phpcsFile->fixer->replaceToken($stackPtr, $contentLc); + } + } + + // No open parenthesis; not a "use function" statement nor a function call. + return; + }//end if + + if ($tokens[$prev]['code'] === T_FUNCTION) { + // Function declaration, not a function call. + return; + } + + if ($tokens[$prev]['code'] === T_NS_SEPARATOR) { + if ($prevPrev !== false + && ($tokens[$prevPrev]['code'] === T_STRING + || $tokens[$prevPrev]['code'] === T_NAMESPACE + || $tokens[$prevPrev]['code'] === T_NEW) + ) { + // Namespaced class/function, not an inbuilt function. + // Could potentially give false negatives for non-namespaced files + // when namespace\functionName() is encountered. + return; + } + } + + if ($tokens[$prev]['code'] === T_NEW) { + // Object creation, not an inbuilt function. + return; + } + + if ($tokens[$prev]['code'] === T_OBJECT_OPERATOR + || $tokens[$prev]['code'] === T_NULLSAFE_OBJECT_OPERATOR + ) { + // Not an inbuilt function. + return; + } + + if ($tokens[$prev]['code'] === T_DOUBLE_COLON) { + // Not an inbuilt function. + return; + } + + $error = 'Calls to PHP native functions must be lowercase; expected "%s" but found "%s"'; + $data = [ + $contentLc, + $content, + ]; + + $fix = $phpcsFile->addFixableError($error, $stackPtr, 'CallUppercase', $data); + if ($fix === true) { + $phpcsFile->fixer->replaceToken($stackPtr, $contentLc); + } + + }//end process() + + +}//end class diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Sniffs/PHP/NonExecutableCodeSniff.php b/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Sniffs/PHP/NonExecutableCodeSniff.php new file mode 100644 index 00000000..343d9b29 --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Sniffs/PHP/NonExecutableCodeSniff.php @@ -0,0 +1,277 @@ + + * @copyright 2006-2015 Squiz Pty Ltd (ABN 77 084 670 600) + * @license https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence + */ + +namespace PHP_CodeSniffer\Standards\Squiz\Sniffs\PHP; + +use PHP_CodeSniffer\Files\File; +use PHP_CodeSniffer\Sniffs\Sniff; +use PHP_CodeSniffer\Util\Tokens; + +class NonExecutableCodeSniff implements Sniff +{ + + + /** + * Returns an array of tokens this test wants to listen for. + * + * @return array + */ + public function register() + { + return [ + T_BREAK, + T_CONTINUE, + T_RETURN, + T_THROW, + T_EXIT, + T_GOTO, + ]; + + }//end register() + + + /** + * Processes this test, when one of its tokens is encountered. + * + * @param \PHP_CodeSniffer\Files\File $phpcsFile The file being scanned. + * @param int $stackPtr The position of the current token in + * the stack passed in $tokens. + * + * @return void + */ + public function process(File $phpcsFile, $stackPtr) + { + $tokens = $phpcsFile->getTokens(); + + // If this token is preceded with an "or", it only relates to one line + // and should be ignored. For example: fopen() or die(). + $prev = $phpcsFile->findPrevious(Tokens::$emptyTokens, ($stackPtr - 1), null, true); + if ($tokens[$prev]['code'] === T_LOGICAL_OR || $tokens[$prev]['code'] === T_BOOLEAN_OR) { + return; + } + + // Check if this token is actually part of a one-line IF or ELSE statement. + for ($i = ($stackPtr - 1); $i > 0; $i--) { + if ($tokens[$i]['code'] === T_CLOSE_PARENTHESIS) { + $i = $tokens[$i]['parenthesis_opener']; + continue; + } else if (isset(Tokens::$emptyTokens[$tokens[$i]['code']]) === true) { + continue; + } + + break; + } + + if ($tokens[$i]['code'] === T_IF + || $tokens[$i]['code'] === T_ELSE + || $tokens[$i]['code'] === T_ELSEIF + ) { + return; + } + + if ($tokens[$stackPtr]['code'] === T_RETURN) { + $next = $phpcsFile->findNext(T_WHITESPACE, ($stackPtr + 1), null, true); + if ($tokens[$next]['code'] === T_SEMICOLON) { + $next = $phpcsFile->findNext(T_WHITESPACE, ($next + 1), null, true); + if ($tokens[$next]['code'] === T_CLOSE_CURLY_BRACKET) { + // If this is the closing brace of a function + // then this return statement doesn't return anything + // and is not required anyway. + $owner = $tokens[$next]['scope_condition']; + if ($tokens[$owner]['code'] === T_FUNCTION) { + $warning = 'Empty return statement not required here'; + $phpcsFile->addWarning($warning, $stackPtr, 'ReturnNotRequired'); + return; + } + } + } + } + + if (isset($tokens[$stackPtr]['scope_opener']) === true) { + $owner = $tokens[$stackPtr]['scope_condition']; + if ($tokens[$owner]['code'] === T_CASE || $tokens[$owner]['code'] === T_DEFAULT) { + // This token closes the scope of a CASE or DEFAULT statement + // so any code between this statement and the next CASE, DEFAULT or + // end of SWITCH token will not be executable. + $end = $phpcsFile->findEndOfStatement($stackPtr); + $next = $phpcsFile->findNext( + [ + T_CASE, + T_DEFAULT, + T_CLOSE_CURLY_BRACKET, + T_ENDSWITCH, + ], + ($end + 1) + ); + + if ($next !== false) { + $lastLine = $tokens[$end]['line']; + for ($i = ($stackPtr + 1); $i < $next; $i++) { + if (isset(Tokens::$emptyTokens[$tokens[$i]['code']]) === true) { + continue; + } + + $line = $tokens[$i]['line']; + if ($line > $lastLine) { + $type = substr($tokens[$stackPtr]['type'], 2); + $warning = 'Code after the %s statement on line %s cannot be executed'; + $data = [ + $type, + $tokens[$stackPtr]['line'], + ]; + $phpcsFile->addWarning($warning, $i, 'Unreachable', $data); + $lastLine = $line; + } + } + }//end if + + // That's all we have to check for these types of statements. + return; + }//end if + }//end if + + // This token may be part of an inline condition. + // If we find a closing parenthesis that belongs to a condition + // we should ignore this token. + $prev = $phpcsFile->findPrevious(Tokens::$emptyTokens, ($stackPtr - 1), null, true); + if (isset($tokens[$prev]['parenthesis_owner']) === true) { + $owner = $tokens[$prev]['parenthesis_owner']; + $ignore = [ + T_IF => true, + T_ELSE => true, + T_ELSEIF => true, + ]; + if (isset($ignore[$tokens[$owner]['code']]) === true) { + return; + } + } + + $ourConditions = array_keys($tokens[$stackPtr]['conditions']); + + if (empty($ourConditions) === false) { + $condition = array_pop($ourConditions); + + if (isset($tokens[$condition]['scope_closer']) === false) { + return; + } + + // Special case for BREAK statements sitting directly inside SWITCH + // statements. If we get to this point, we know the BREAK is not being + // used to close a CASE statement, so it is most likely non-executable + // code itself (as is the case when you put return; break; at the end of + // a case). So we need to ignore this token. + if ($tokens[$condition]['code'] === T_SWITCH + && $tokens[$stackPtr]['code'] === T_BREAK + ) { + return; + } + + $closer = $tokens[$condition]['scope_closer']; + + // If the closer for our condition is shared with other openers, + // we will need to throw errors from this token to the next + // shared opener (if there is one), not to the scope closer. + $nextOpener = null; + for ($i = ($stackPtr + 1); $i < $closer; $i++) { + if (isset($tokens[$i]['scope_closer']) === true) { + if ($tokens[$i]['scope_closer'] === $closer) { + // We found an opener that shares the same + // closing token as us. + $nextOpener = $i; + break; + } + } + }//end for + + if ($nextOpener === null) { + $end = $closer; + } else { + $end = ($nextOpener - 1); + } + } else { + // This token is in the global scope. + if ($tokens[$stackPtr]['code'] === T_BREAK) { + return; + } + + // Throw an error for all lines until the end of the file. + $end = ($phpcsFile->numTokens - 1); + }//end if + + // Find the semicolon that ends this statement, skipping + // nested statements like FOR loops and closures. + for ($start = ($stackPtr + 1); $start < $phpcsFile->numTokens; $start++) { + if ($start === $end) { + break; + } + + if (isset($tokens[$start]['parenthesis_closer']) === true + && $tokens[$start]['code'] === T_OPEN_PARENTHESIS + ) { + $start = $tokens[$start]['parenthesis_closer']; + continue; + } + + if (isset($tokens[$start]['bracket_closer']) === true + && $tokens[$start]['code'] === T_OPEN_CURLY_BRACKET + ) { + $start = $tokens[$start]['bracket_closer']; + continue; + } + + if ($tokens[$start]['code'] === T_SEMICOLON) { + break; + } + }//end for + + if (isset($tokens[$start]) === false) { + return; + } + + $lastLine = $tokens[$start]['line']; + for ($i = ($start + 1); $i < $end; $i++) { + if (isset(Tokens::$emptyTokens[$tokens[$i]['code']]) === true + || isset(Tokens::$bracketTokens[$tokens[$i]['code']]) === true + || $tokens[$i]['code'] === T_SEMICOLON + ) { + continue; + } + + // Skip whole functions and classes/interfaces because they are not + // technically executed code, but rather declarations that may be used. + if (isset(Tokens::$ooScopeTokens[$tokens[$i]['code']]) === true + || $tokens[$i]['code'] === T_FUNCTION + || $tokens[$i]['code'] === T_CLOSURE + ) { + if (isset($tokens[$i]['scope_closer']) === false) { + // Parse error/Live coding. + return; + } + + $i = $tokens[$i]['scope_closer']; + continue; + } + + $line = $tokens[$i]['line']; + if ($line > $lastLine) { + $type = substr($tokens[$stackPtr]['type'], 2); + $warning = 'Code after the %s statement on line %s cannot be executed'; + $data = [ + $type, + $tokens[$stackPtr]['line'], + ]; + $phpcsFile->addWarning($warning, $i, 'Unreachable', $data); + $lastLine = $line; + } + }//end for + + }//end process() + + +}//end class diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Sniffs/Scope/MemberVarScopeSniff.php b/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Sniffs/Scope/MemberVarScopeSniff.php new file mode 100644 index 00000000..5239b644 --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Sniffs/Scope/MemberVarScopeSniff.php @@ -0,0 +1,77 @@ + + * @copyright 2006-2015 Squiz Pty Ltd (ABN 77 084 670 600) + * @license https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence + */ + +namespace PHP_CodeSniffer\Standards\Squiz\Sniffs\Scope; + +use PHP_CodeSniffer\Files\File; +use PHP_CodeSniffer\Sniffs\AbstractVariableSniff; + +class MemberVarScopeSniff extends AbstractVariableSniff +{ + + + /** + * Processes the function tokens within the class. + * + * @param \PHP_CodeSniffer\Files\File $phpcsFile The file where this token was found. + * @param int $stackPtr The position where the token was found. + * + * @return void + */ + protected function processMemberVar(File $phpcsFile, $stackPtr) + { + $tokens = $phpcsFile->getTokens(); + $properties = $phpcsFile->getMemberProperties($stackPtr); + + if ($properties === [] || $properties['scope_specified'] !== false) { + return; + } + + $error = 'Scope modifier not specified for member variable "%s"'; + $data = [$tokens[$stackPtr]['content']]; + $phpcsFile->addError($error, $stackPtr, 'Missing', $data); + + }//end processMemberVar() + + + /** + * Processes normal variables. + * + * @param \PHP_CodeSniffer\Files\File $phpcsFile The file where this token was found. + * @param int $stackPtr The position where the token was found. + * + * @return void + */ + protected function processVariable(File $phpcsFile, $stackPtr) + { + /* + We don't care about normal variables. + */ + + }//end processVariable() + + + /** + * Processes variables in double quoted strings. + * + * @param \PHP_CodeSniffer\Files\File $phpcsFile The file where this token was found. + * @param int $stackPtr The position where the token was found. + * + * @return void + */ + protected function processVariableInString(File $phpcsFile, $stackPtr) + { + /* + We don't care about normal variables. + */ + + }//end processVariableInString() + + +}//end class diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Sniffs/Scope/MethodScopeSniff.php b/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Sniffs/Scope/MethodScopeSniff.php new file mode 100644 index 00000000..8c60208c --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Sniffs/Scope/MethodScopeSniff.php @@ -0,0 +1,92 @@ + + * @copyright 2006-2015 Squiz Pty Ltd (ABN 77 084 670 600) + * @license https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence + */ + +namespace PHP_CodeSniffer\Standards\Squiz\Sniffs\Scope; + +use PHP_CodeSniffer\Files\File; +use PHP_CodeSniffer\Sniffs\AbstractScopeSniff; +use PHP_CodeSniffer\Util\Tokens; + +class MethodScopeSniff extends AbstractScopeSniff +{ + + + /** + * Constructs a Squiz_Sniffs_Scope_MethodScopeSniff. + */ + public function __construct() + { + parent::__construct(Tokens::$ooScopeTokens, [T_FUNCTION]); + + }//end __construct() + + + /** + * Processes the function tokens within the class. + * + * @param \PHP_CodeSniffer\Files\File $phpcsFile The file where this token was found. + * @param int $stackPtr The position where the token was found. + * @param int $currScope The current scope opener token. + * + * @return void + */ + protected function processTokenWithinScope(File $phpcsFile, $stackPtr, $currScope) + { + $tokens = $phpcsFile->getTokens(); + + // Determine if this is a function which needs to be examined. + $conditions = $tokens[$stackPtr]['conditions']; + end($conditions); + $deepestScope = key($conditions); + if ($deepestScope !== $currScope) { + return; + } + + $methodName = $phpcsFile->getDeclarationName($stackPtr); + if ($methodName === null) { + // Ignore closures. + return; + } + + $modifier = null; + for ($i = ($stackPtr - 1); $i > 0; $i--) { + if ($tokens[$i]['line'] < $tokens[$stackPtr]['line']) { + break; + } else if (isset(Tokens::$scopeModifiers[$tokens[$i]['code']]) === true) { + $modifier = $i; + break; + } + } + + if ($modifier === null) { + $error = 'Visibility must be declared on method "%s"'; + $data = [$methodName]; + $phpcsFile->addError($error, $stackPtr, 'Missing', $data); + } + + }//end processTokenWithinScope() + + + /** + * Processes a token that is found within the scope that this test is + * listening to. + * + * @param \PHP_CodeSniffer\Files\File $phpcsFile The file where this token was found. + * @param int $stackPtr The position in the stack where this + * token was found. + * + * @return void + */ + protected function processTokenOutsideScope(File $phpcsFile, $stackPtr) + { + + }//end processTokenOutsideScope() + + +}//end class diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Sniffs/Scope/StaticThisUsageSniff.php b/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Sniffs/Scope/StaticThisUsageSniff.php new file mode 100644 index 00000000..0bafbf4d --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Sniffs/Scope/StaticThisUsageSniff.php @@ -0,0 +1,128 @@ + + * @copyright 2006-2015 Squiz Pty Ltd (ABN 77 084 670 600) + * @license https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence + */ + +namespace PHP_CodeSniffer\Standards\Squiz\Sniffs\Scope; + +use PHP_CodeSniffer\Files\File; +use PHP_CodeSniffer\Sniffs\AbstractScopeSniff; +use PHP_CodeSniffer\Util\Tokens; + +class StaticThisUsageSniff extends AbstractScopeSniff +{ + + + /** + * Constructs the test with the tokens it wishes to listen for. + */ + public function __construct() + { + parent::__construct([T_CLASS, T_TRAIT, T_ANON_CLASS], [T_FUNCTION]); + + }//end __construct() + + + /** + * Processes this test, when one of its tokens is encountered. + * + * @param \PHP_CodeSniffer\Files\File $phpcsFile The current file being scanned. + * @param int $stackPtr The position of the current token in the + * stack passed in $tokens. + * @param int $currScope A pointer to the start of the scope. + * + * @return void + */ + public function processTokenWithinScope(File $phpcsFile, $stackPtr, $currScope) + { + $tokens = $phpcsFile->getTokens(); + + // Determine if this is a function which needs to be examined. + $conditions = $tokens[$stackPtr]['conditions']; + end($conditions); + $deepestScope = key($conditions); + if ($deepestScope !== $currScope) { + return; + } + + // Ignore abstract functions. + if (isset($tokens[$stackPtr]['scope_closer']) === false) { + return; + } + + $next = $phpcsFile->findNext(Tokens::$emptyTokens, ($stackPtr + 1), null, true); + if ($next === false || $tokens[$next]['code'] !== T_STRING) { + // Not a function declaration, or incomplete. + return; + } + + $methodProps = $phpcsFile->getMethodProperties($stackPtr); + if ($methodProps['is_static'] === false) { + return; + } + + $next = $stackPtr; + $end = $tokens[$stackPtr]['scope_closer']; + + $this->checkThisUsage($phpcsFile, $next, $end); + + }//end processTokenWithinScope() + + + /** + * Check for $this variable usage between $next and $end tokens. + * + * @param File $phpcsFile The current file being scanned. + * @param int $next The position of the next token to check. + * @param int $end The position of the last token to check. + * + * @return void + */ + private function checkThisUsage(File $phpcsFile, $next, $end) + { + $tokens = $phpcsFile->getTokens(); + + do { + $next = $phpcsFile->findNext([T_VARIABLE, T_ANON_CLASS], ($next + 1), $end); + if ($next === false) { + continue; + } + + if ($tokens[$next]['code'] === T_ANON_CLASS) { + $this->checkThisUsage($phpcsFile, $next, $tokens[$next]['scope_opener']); + $next = $tokens[$next]['scope_closer']; + continue; + } + + if ($tokens[$next]['content'] !== '$this') { + continue; + } + + $error = 'Usage of "$this" in static methods will cause runtime errors'; + $phpcsFile->addError($error, $next, 'Found'); + } while ($next !== false); + + }//end checkThisUsage() + + + /** + * Processes a token that is found within the scope that this test is + * listening to. + * + * @param \PHP_CodeSniffer\Files\File $phpcsFile The file where this token was found. + * @param int $stackPtr The position in the stack where this + * token was found. + * + * @return void + */ + protected function processTokenOutsideScope(File $phpcsFile, $stackPtr) + { + + }//end processTokenOutsideScope() + + +}//end class diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Sniffs/Strings/ConcatenationSpacingSniff.php b/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Sniffs/Strings/ConcatenationSpacingSniff.php new file mode 100644 index 00000000..9d32e54a --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Sniffs/Strings/ConcatenationSpacingSniff.php @@ -0,0 +1,164 @@ + + * @copyright 2006-2015 Squiz Pty Ltd (ABN 77 084 670 600) + * @license https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence + */ + +namespace PHP_CodeSniffer\Standards\Squiz\Sniffs\Strings; + +use PHP_CodeSniffer\Files\File; +use PHP_CodeSniffer\Sniffs\Sniff; +use PHP_CodeSniffer\Util\Tokens; + +class ConcatenationSpacingSniff implements Sniff +{ + + /** + * The number of spaces before and after a string concat. + * + * @var integer + */ + public $spacing = 0; + + /** + * Allow newlines instead of spaces. + * + * @var boolean + */ + public $ignoreNewlines = false; + + + /** + * Returns an array of tokens this test wants to listen for. + * + * @return array + */ + public function register() + { + return [T_STRING_CONCAT]; + + }//end register() + + + /** + * Processes this test, when one of its tokens is encountered. + * + * @param \PHP_CodeSniffer\Files\File $phpcsFile The file being scanned. + * @param int $stackPtr The position of the current token in the + * stack passed in $tokens. + * + * @return void + */ + public function process(File $phpcsFile, $stackPtr) + { + $tokens = $phpcsFile->getTokens(); + if (isset($tokens[($stackPtr + 2)]) === false) { + // Syntax error or live coding, bow out. + return; + } + + $ignoreBefore = false; + $prev = $phpcsFile->findPrevious(Tokens::$emptyTokens, ($stackPtr - 1), null, true); + if ($tokens[$prev]['code'] === T_END_HEREDOC || $tokens[$prev]['code'] === T_END_NOWDOC) { + // Spacing before must be preserved due to the here/nowdoc closing tag. + $ignoreBefore = true; + } + + $this->spacing = (int) $this->spacing; + + if ($ignoreBefore === false) { + if ($tokens[($stackPtr - 1)]['code'] !== T_WHITESPACE) { + $before = 0; + } else { + if ($tokens[($stackPtr - 2)]['line'] !== $tokens[$stackPtr]['line']) { + $before = 'newline'; + } else { + $before = $tokens[($stackPtr - 1)]['length']; + } + } + + $phpcsFile->recordMetric($stackPtr, 'Spacing before string concat', $before); + } + + if ($tokens[($stackPtr + 1)]['code'] !== T_WHITESPACE) { + $after = 0; + } else { + if ($tokens[($stackPtr + 2)]['line'] !== $tokens[$stackPtr]['line']) { + $after = 'newline'; + } else { + $after = $tokens[($stackPtr + 1)]['length']; + } + } + + $phpcsFile->recordMetric($stackPtr, 'Spacing after string concat', $after); + + if (($ignoreBefore === true + || $before === $this->spacing + || ($before === 'newline' + && $this->ignoreNewlines === true)) + && ($after === $this->spacing + || ($after === 'newline' + && $this->ignoreNewlines === true)) + ) { + return; + } + + if ($this->spacing === 0) { + $message = 'Concat operator must not be surrounded by spaces'; + $data = []; + } else { + if ($this->spacing > 1) { + $message = 'Concat operator must be surrounded by %s spaces'; + } else { + $message = 'Concat operator must be surrounded by a single space'; + } + + $data = [$this->spacing]; + } + + $fix = $phpcsFile->addFixableError($message, $stackPtr, 'PaddingFound', $data); + + if ($fix === true) { + $padding = str_repeat(' ', $this->spacing); + if ($ignoreBefore === false && ($before !== 'newline' || $this->ignoreNewlines === false)) { + if ($tokens[($stackPtr - 1)]['code'] === T_WHITESPACE) { + $phpcsFile->fixer->beginChangeset(); + $phpcsFile->fixer->replaceToken(($stackPtr - 1), $padding); + if ($this->spacing === 0 + && ($tokens[($stackPtr - 2)]['code'] === T_LNUMBER + || $tokens[($stackPtr - 2)]['code'] === T_DNUMBER) + ) { + $phpcsFile->fixer->replaceToken(($stackPtr - 2), '('.$tokens[($stackPtr - 2)]['content'].')'); + } + + $phpcsFile->fixer->endChangeset(); + } else if ($this->spacing > 0) { + $phpcsFile->fixer->addContent(($stackPtr - 1), $padding); + } + } + + if ($after !== 'newline' || $this->ignoreNewlines === false) { + if ($tokens[($stackPtr + 1)]['code'] === T_WHITESPACE) { + $phpcsFile->fixer->beginChangeset(); + $phpcsFile->fixer->replaceToken(($stackPtr + 1), $padding); + if ($this->spacing === 0 + && ($tokens[($stackPtr + 2)]['code'] === T_LNUMBER + || $tokens[($stackPtr + 2)]['code'] === T_DNUMBER) + ) { + $phpcsFile->fixer->replaceToken(($stackPtr + 2), '('.$tokens[($stackPtr + 2)]['content'].')'); + } + + $phpcsFile->fixer->endChangeset(); + } else if ($this->spacing > 0) { + $phpcsFile->fixer->addContent($stackPtr, $padding); + } + } + }//end if + + }//end process() + + +}//end class diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Sniffs/Strings/DoubleQuoteUsageSniff.php b/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Sniffs/Strings/DoubleQuoteUsageSniff.php new file mode 100644 index 00000000..1ff99b9c --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Sniffs/Strings/DoubleQuoteUsageSniff.php @@ -0,0 +1,144 @@ + + * @copyright 2006-2015 Squiz Pty Ltd (ABN 77 084 670 600) + * @license https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence + */ + +namespace PHP_CodeSniffer\Standards\Squiz\Sniffs\Strings; + +use PHP_CodeSniffer\Files\File; +use PHP_CodeSniffer\Sniffs\Sniff; + +class DoubleQuoteUsageSniff implements Sniff +{ + + + /** + * Returns an array of tokens this test wants to listen for. + * + * @return array + */ + public function register() + { + return [ + T_CONSTANT_ENCAPSED_STRING, + T_DOUBLE_QUOTED_STRING, + ]; + + }//end register() + + + /** + * Processes this test, when one of its tokens is encountered. + * + * @param \PHP_CodeSniffer\Files\File $phpcsFile The file being scanned. + * @param int $stackPtr The position of the current token + * in the stack passed in $tokens. + * + * @return void + */ + public function process(File $phpcsFile, $stackPtr) + { + $tokens = $phpcsFile->getTokens(); + + // If tabs are being converted to spaces by the tokeniser, the + // original content should be used instead of the converted content. + if (isset($tokens[$stackPtr]['orig_content']) === true) { + $workingString = $tokens[$stackPtr]['orig_content']; + } else { + $workingString = $tokens[$stackPtr]['content']; + } + + $lastStringToken = $stackPtr; + + $i = ($stackPtr + 1); + if (isset($tokens[$i]) === true) { + while ($i < $phpcsFile->numTokens + && $tokens[$i]['code'] === $tokens[$stackPtr]['code'] + ) { + if (isset($tokens[$i]['orig_content']) === true) { + $workingString .= $tokens[$i]['orig_content']; + } else { + $workingString .= $tokens[$i]['content']; + } + + $lastStringToken = $i; + $i++; + } + } + + $skipTo = ($lastStringToken + 1); + + // Check if it's a double quoted string. + if ($workingString[0] !== '"' || substr($workingString, -1) !== '"') { + return $skipTo; + } + + // The use of variables in double quoted strings is not allowed. + if ($tokens[$stackPtr]['code'] === T_DOUBLE_QUOTED_STRING) { + $stringTokens = token_get_all('addError($error, $stackPtr, 'ContainsVar', $data); + } + } + + return $skipTo; + }//end if + + $allowedChars = [ + '\0', + '\1', + '\2', + '\3', + '\4', + '\5', + '\6', + '\7', + '\n', + '\r', + '\f', + '\t', + '\v', + '\x', + '\b', + '\e', + '\u', + '\'', + ]; + + foreach ($allowedChars as $testChar) { + if (strpos($workingString, $testChar) !== false) { + return $skipTo; + } + } + + $error = 'String %s does not require double quotes; use single quotes instead'; + $data = [str_replace(["\r", "\n"], ['\r', '\n'], $workingString)]; + $fix = $phpcsFile->addFixableError($error, $stackPtr, 'NotRequired', $data); + + if ($fix === true) { + $phpcsFile->fixer->beginChangeset(); + $innerContent = substr($workingString, 1, -1); + $innerContent = str_replace('\"', '"', $innerContent); + $innerContent = str_replace('\\$', '$', $innerContent); + $phpcsFile->fixer->replaceToken($stackPtr, "'$innerContent'"); + while ($lastStringToken !== $stackPtr) { + $phpcsFile->fixer->replaceToken($lastStringToken, ''); + $lastStringToken--; + } + + $phpcsFile->fixer->endChangeset(); + } + + return $skipTo; + + }//end process() + + +}//end class diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Sniffs/Strings/EchoedStringsSniff.php b/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Sniffs/Strings/EchoedStringsSniff.php new file mode 100644 index 00000000..512d878a --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Sniffs/Strings/EchoedStringsSniff.php @@ -0,0 +1,88 @@ + + * @copyright 2006-2015 Squiz Pty Ltd (ABN 77 084 670 600) + * @license https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence + */ + +namespace PHP_CodeSniffer\Standards\Squiz\Sniffs\Strings; + +use PHP_CodeSniffer\Files\File; +use PHP_CodeSniffer\Sniffs\Sniff; +use PHP_CodeSniffer\Util\Tokens; + +class EchoedStringsSniff implements Sniff +{ + + + /** + * Returns an array of tokens this test wants to listen for. + * + * @return array + */ + public function register() + { + return [T_ECHO]; + + }//end register() + + + /** + * Processes this test, when one of its tokens is encountered. + * + * @param \PHP_CodeSniffer\Files\File $phpcsFile The file being scanned. + * @param int $stackPtr The position of the current token in the + * stack passed in $tokens. + * + * @return void + */ + public function process(File $phpcsFile, $stackPtr) + { + $tokens = $phpcsFile->getTokens(); + + $firstContent = $phpcsFile->findNext(T_WHITESPACE, ($stackPtr + 1), null, true); + // If the first non-whitespace token is not an opening parenthesis, then we are not concerned. + if ($tokens[$firstContent]['code'] !== T_OPEN_PARENTHESIS) { + $phpcsFile->recordMetric($stackPtr, 'Brackets around echoed strings', 'no'); + return; + } + + $end = $phpcsFile->findNext([T_SEMICOLON, T_CLOSE_TAG], $stackPtr, null, false); + + // If the token before the semi-colon is not a closing parenthesis, then we are not concerned. + $prev = $phpcsFile->findPrevious(T_WHITESPACE, ($end - 1), null, true); + if ($tokens[$prev]['code'] !== T_CLOSE_PARENTHESIS) { + $phpcsFile->recordMetric($stackPtr, 'Brackets around echoed strings', 'no'); + return; + } + + // If the parenthesis don't match, then we are not concerned. + if ($tokens[$firstContent]['parenthesis_closer'] !== $prev) { + $phpcsFile->recordMetric($stackPtr, 'Brackets around echoed strings', 'no'); + return; + } + + $phpcsFile->recordMetric($stackPtr, 'Brackets around echoed strings', 'yes'); + + if (($phpcsFile->findNext(Tokens::$operators, $stackPtr, $end, false)) === false) { + // There are no arithmetic operators in this. + $error = 'Echoed strings should not be bracketed'; + $fix = $phpcsFile->addFixableError($error, $stackPtr, 'HasBracket'); + if ($fix === true) { + $phpcsFile->fixer->beginChangeset(); + $phpcsFile->fixer->replaceToken($firstContent, ''); + if ($tokens[($firstContent - 1)]['code'] !== T_WHITESPACE) { + $phpcsFile->fixer->addContent(($firstContent - 1), ' '); + } + + $phpcsFile->fixer->replaceToken($prev, ''); + $phpcsFile->fixer->endChangeset(); + } + } + + }//end process() + + +}//end class diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Sniffs/WhiteSpace/CastSpacingSniff.php b/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Sniffs/WhiteSpace/CastSpacingSniff.php new file mode 100644 index 00000000..95f95ed6 --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Sniffs/WhiteSpace/CastSpacingSniff.php @@ -0,0 +1,65 @@ + + * @copyright 2006-2015 Squiz Pty Ltd (ABN 77 084 670 600) + * @license https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence + */ + +namespace PHP_CodeSniffer\Standards\Squiz\Sniffs\WhiteSpace; + +use PHP_CodeSniffer\Files\File; +use PHP_CodeSniffer\Sniffs\Sniff; +use PHP_CodeSniffer\Util\Tokens; + +class CastSpacingSniff implements Sniff +{ + + + /** + * Returns an array of tokens this test wants to listen for. + * + * @return array + */ + public function register() + { + return Tokens::$castTokens; + + }//end register() + + + /** + * Processes this test, when one of its tokens is encountered. + * + * @param \PHP_CodeSniffer\Files\File $phpcsFile The file being scanned. + * @param int $stackPtr The position of the current token in the + * stack passed in $tokens. + * + * @return void + */ + public function process(File $phpcsFile, $stackPtr) + { + $tokens = $phpcsFile->getTokens(); + + $content = $tokens[$stackPtr]['content']; + $expected = str_replace(' ', '', $content); + $expected = str_replace("\t", '', $expected); + + if ($content !== $expected) { + $error = 'Cast statements must not contain whitespace; expected "%s" but found "%s"'; + $data = [ + $expected, + $content, + ]; + + $fix = $phpcsFile->addFixableError($error, $stackPtr, 'ContainsWhiteSpace', $data); + if ($fix === true) { + $phpcsFile->fixer->replaceToken($stackPtr, $expected); + } + } + + }//end process() + + +}//end class diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Sniffs/WhiteSpace/ControlStructureSpacingSniff.php b/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Sniffs/WhiteSpace/ControlStructureSpacingSniff.php new file mode 100644 index 00000000..f38fd0e8 --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Sniffs/WhiteSpace/ControlStructureSpacingSniff.php @@ -0,0 +1,358 @@ + + * @copyright 2006-2015 Squiz Pty Ltd (ABN 77 084 670 600) + * @license https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence + */ + +namespace PHP_CodeSniffer\Standards\Squiz\Sniffs\WhiteSpace; + +use PHP_CodeSniffer\Files\File; +use PHP_CodeSniffer\Sniffs\Sniff; +use PHP_CodeSniffer\Util\Tokens; + +class ControlStructureSpacingSniff implements Sniff +{ + + /** + * A list of tokenizers this sniff supports. + * + * @var array + */ + public $supportedTokenizers = [ + 'PHP', + 'JS', + ]; + + + /** + * Returns an array of tokens this test wants to listen for. + * + * @return array + */ + public function register() + { + return [ + T_IF, + T_WHILE, + T_FOREACH, + T_FOR, + T_SWITCH, + T_DO, + T_ELSE, + T_ELSEIF, + T_TRY, + T_CATCH, + T_FINALLY, + T_MATCH, + ]; + + }//end register() + + + /** + * Processes this test, when one of its tokens is encountered. + * + * @param \PHP_CodeSniffer\Files\File $phpcsFile The file being scanned. + * @param int $stackPtr The position of the current token + * in the stack passed in $tokens. + * + * @return void + */ + public function process(File $phpcsFile, $stackPtr) + { + $tokens = $phpcsFile->getTokens(); + + if (isset($tokens[$stackPtr]['parenthesis_opener']) === true + && isset($tokens[$stackPtr]['parenthesis_closer']) === true + ) { + $parenOpener = $tokens[$stackPtr]['parenthesis_opener']; + $parenCloser = $tokens[$stackPtr]['parenthesis_closer']; + if ($tokens[($parenOpener + 1)]['code'] === T_WHITESPACE) { + $gap = $tokens[($parenOpener + 1)]['length']; + + if ($gap === 0) { + $phpcsFile->recordMetric($stackPtr, 'Spaces after control structure open parenthesis', 'newline'); + $gap = 'newline'; + } else { + $phpcsFile->recordMetric($stackPtr, 'Spaces after control structure open parenthesis', $gap); + } + + $error = 'Expected 0 spaces after opening bracket; %s found'; + $data = [$gap]; + $fix = $phpcsFile->addFixableError($error, ($parenOpener + 1), 'SpacingAfterOpenBrace', $data); + if ($fix === true) { + $phpcsFile->fixer->replaceToken(($parenOpener + 1), ''); + } + } else { + $phpcsFile->recordMetric($stackPtr, 'Spaces after control structure open parenthesis', 0); + } + + if ($tokens[$parenOpener]['line'] === $tokens[$parenCloser]['line'] + && $tokens[($parenCloser - 1)]['code'] === T_WHITESPACE + ) { + $gap = $tokens[($parenCloser - 1)]['length']; + $error = 'Expected 0 spaces before closing bracket; %s found'; + $data = [$gap]; + $fix = $phpcsFile->addFixableError($error, ($parenCloser - 1), 'SpaceBeforeCloseBrace', $data); + if ($fix === true) { + $phpcsFile->fixer->replaceToken(($parenCloser - 1), ''); + } + + if ($gap === 0) { + $phpcsFile->recordMetric($stackPtr, 'Spaces before control structure close parenthesis', 'newline'); + } else { + $phpcsFile->recordMetric($stackPtr, 'Spaces before control structure close parenthesis', $gap); + } + } else { + $phpcsFile->recordMetric($stackPtr, 'Spaces before control structure close parenthesis', 0); + } + }//end if + + if (isset($tokens[$stackPtr]['scope_closer']) === false) { + return; + } + + $scopeOpener = $tokens[$stackPtr]['scope_opener']; + $scopeCloser = $tokens[$stackPtr]['scope_closer']; + + for ($firstContent = ($scopeOpener + 1); $firstContent < $phpcsFile->numTokens; $firstContent++) { + $code = $tokens[$firstContent]['code']; + + if ($code === T_WHITESPACE + || ($code === T_INLINE_HTML + && trim($tokens[$firstContent]['content']) === '') + ) { + continue; + } + + // Skip all empty tokens on the same line as the opener. + if ($tokens[$firstContent]['line'] === $tokens[$scopeOpener]['line'] + && (isset(Tokens::$emptyTokens[$code]) === true + || $code === T_CLOSE_TAG) + ) { + continue; + } + + break; + } + + // We ignore spacing for some structures that tend to have their own rules. + $ignore = [ + T_FUNCTION => true, + T_CLASS => true, + T_INTERFACE => true, + T_TRAIT => true, + T_DOC_COMMENT_OPEN_TAG => true, + ]; + + if (isset($ignore[$tokens[$firstContent]['code']]) === false + && $tokens[$firstContent]['line'] >= ($tokens[$scopeOpener]['line'] + 2) + ) { + $gap = ($tokens[$firstContent]['line'] - $tokens[$scopeOpener]['line'] - 1); + $phpcsFile->recordMetric($stackPtr, 'Blank lines at start of control structure', $gap); + + $error = 'Blank line found at start of control structure'; + $fix = $phpcsFile->addFixableError($error, $scopeOpener, 'SpacingAfterOpen'); + + if ($fix === true) { + $phpcsFile->fixer->beginChangeset(); + $i = ($scopeOpener + 1); + while ($tokens[$i]['line'] !== $tokens[$firstContent]['line']) { + // Start removing content from the line after the opener. + if ($tokens[$i]['line'] !== $tokens[$scopeOpener]['line']) { + $phpcsFile->fixer->replaceToken($i, ''); + } + + $i++; + } + + $phpcsFile->fixer->endChangeset(); + } + } else { + $phpcsFile->recordMetric($stackPtr, 'Blank lines at start of control structure', 0); + }//end if + + if ($firstContent !== $scopeCloser) { + $lastContent = $phpcsFile->findPrevious( + T_WHITESPACE, + ($scopeCloser - 1), + null, + true + ); + + $lastNonEmptyContent = $phpcsFile->findPrevious( + Tokens::$emptyTokens, + ($scopeCloser - 1), + null, + true + ); + + $checkToken = $lastContent; + if (isset($tokens[$lastNonEmptyContent]['scope_condition']) === true) { + $checkToken = $tokens[$lastNonEmptyContent]['scope_condition']; + } + + if (isset($ignore[$tokens[$checkToken]['code']]) === false + && $tokens[$lastContent]['line'] <= ($tokens[$scopeCloser]['line'] - 2) + ) { + $errorToken = $scopeCloser; + for ($i = ($scopeCloser - 1); $i > $lastContent; $i--) { + if ($tokens[$i]['line'] < $tokens[$scopeCloser]['line']) { + $errorToken = $i; + break; + } + } + + $gap = ($tokens[$scopeCloser]['line'] - $tokens[$lastContent]['line'] - 1); + $phpcsFile->recordMetric($stackPtr, 'Blank lines at end of control structure', $gap); + + $error = 'Blank line found at end of control structure'; + $fix = $phpcsFile->addFixableError($error, $errorToken, 'SpacingBeforeClose'); + + if ($fix === true) { + $phpcsFile->fixer->beginChangeset(); + for ($i = ($scopeCloser - 1); $i > $lastContent; $i--) { + if ($tokens[$i]['line'] === $tokens[$scopeCloser]['line']) { + continue; + } + + if ($tokens[$i]['line'] === $tokens[$lastContent]['line']) { + break; + } + + $phpcsFile->fixer->replaceToken($i, ''); + } + + $phpcsFile->fixer->endChangeset(); + } + } else { + $phpcsFile->recordMetric($stackPtr, 'Blank lines at end of control structure', 0); + }//end if + }//end if + + if ($tokens[$stackPtr]['code'] === T_MATCH) { + // Move the scope closer to the semicolon/comma. + $next = $phpcsFile->findNext(Tokens::$emptyTokens, ($scopeCloser + 1), null, true); + if ($next !== false + && ($tokens[$next]['code'] === T_SEMICOLON || $tokens[$next]['code'] === T_COMMA) + ) { + $scopeCloser = $next; + } + } + + $trailingContent = $phpcsFile->findNext( + T_WHITESPACE, + ($scopeCloser + 1), + null, + true + ); + + if ($tokens[$trailingContent]['code'] === T_COMMENT + || isset(Tokens::$phpcsCommentTokens[$tokens[$trailingContent]['code']]) === true + ) { + // Special exception for code where the comment about + // an ELSE or ELSEIF is written between the control structures. + $nextCode = $phpcsFile->findNext( + Tokens::$emptyTokens, + ($scopeCloser + 1), + null, + true + ); + + if ($tokens[$nextCode]['code'] === T_ELSE + || $tokens[$nextCode]['code'] === T_ELSEIF + || $tokens[$trailingContent]['line'] === $tokens[$scopeCloser]['line'] + ) { + $trailingContent = $nextCode; + } + }//end if + + if ($tokens[$trailingContent]['code'] === T_ELSE) { + if ($tokens[$stackPtr]['code'] === T_IF) { + // IF with ELSE. + return; + } + } + + if ($tokens[$trailingContent]['code'] === T_WHILE + && $tokens[$stackPtr]['code'] === T_DO + ) { + // DO with WHILE. + return; + } + + if ($tokens[$trailingContent]['code'] === T_CLOSE_TAG) { + // At the end of the script or embedded code. + return; + } + + if (isset($tokens[$trailingContent]['scope_condition']) === true + && $tokens[$trailingContent]['scope_condition'] !== $trailingContent + && isset($tokens[$trailingContent]['scope_opener']) === true + && $tokens[$trailingContent]['scope_opener'] !== $trailingContent + ) { + // Another control structure's closing brace. + $owner = $tokens[$trailingContent]['scope_condition']; + if ($tokens[$owner]['code'] === T_FUNCTION) { + // The next content is the closing brace of a function + // so normal function rules apply and we can ignore it. + return; + } + + if ($tokens[$owner]['code'] === T_CLOSURE + && ($phpcsFile->hasCondition($stackPtr, [T_FUNCTION, T_CLOSURE]) === true + || isset($tokens[$stackPtr]['nested_parenthesis']) === true) + ) { + return; + } + + if ($tokens[$trailingContent]['line'] !== ($tokens[$scopeCloser]['line'] + 1)) { + $error = 'Blank line found after control structure'; + $fix = $phpcsFile->addFixableError($error, $scopeCloser, 'LineAfterClose'); + + if ($fix === true) { + $phpcsFile->fixer->beginChangeset(); + $i = ($scopeCloser + 1); + while ($tokens[$i]['line'] !== $tokens[$trailingContent]['line']) { + $phpcsFile->fixer->replaceToken($i, ''); + $i++; + } + + $phpcsFile->fixer->addNewline($scopeCloser); + $phpcsFile->fixer->endChangeset(); + } + } + } else if ($tokens[$trailingContent]['code'] !== T_ELSE + && $tokens[$trailingContent]['code'] !== T_ELSEIF + && $tokens[$trailingContent]['code'] !== T_CATCH + && $tokens[$trailingContent]['code'] !== T_FINALLY + && $tokens[$trailingContent]['line'] === ($tokens[$scopeCloser]['line'] + 1) + ) { + $error = 'No blank line found after control structure'; + $fix = $phpcsFile->addFixableError($error, $scopeCloser, 'NoLineAfterClose'); + if ($fix === true) { + $trailingContent = $phpcsFile->findNext( + T_WHITESPACE, + ($scopeCloser + 1), + null, + true + ); + + if (($tokens[$trailingContent]['code'] === T_COMMENT + || isset(Tokens::$phpcsCommentTokens[$tokens[$trailingContent]['code']]) === true) + && $tokens[$trailingContent]['line'] === $tokens[$scopeCloser]['line'] + ) { + $phpcsFile->fixer->addNewline($trailingContent); + } else { + $phpcsFile->fixer->addNewline($scopeCloser); + } + } + }//end if + + }//end process() + + +}//end class diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Sniffs/WhiteSpace/FunctionClosingBraceSpaceSniff.php b/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Sniffs/WhiteSpace/FunctionClosingBraceSpaceSniff.php new file mode 100644 index 00000000..68871990 --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Sniffs/WhiteSpace/FunctionClosingBraceSpaceSniff.php @@ -0,0 +1,164 @@ + + * @copyright 2006-2015 Squiz Pty Ltd (ABN 77 084 670 600) + * @license https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence + */ + +namespace PHP_CodeSniffer\Standards\Squiz\Sniffs\WhiteSpace; + +use PHP_CodeSniffer\Files\File; +use PHP_CodeSniffer\Sniffs\Sniff; + +class FunctionClosingBraceSpaceSniff implements Sniff +{ + + /** + * A list of tokenizers this sniff supports. + * + * @var array + */ + public $supportedTokenizers = [ + 'PHP', + 'JS', + ]; + + + /** + * Returns an array of tokens this test wants to listen for. + * + * @return array + */ + public function register() + { + return [ + T_FUNCTION, + T_CLOSURE, + ]; + + }//end register() + + + /** + * Processes this test, when one of its tokens is encountered. + * + * @param \PHP_CodeSniffer\Files\File $phpcsFile The file being scanned. + * @param int $stackPtr The position of the current token + * in the stack passed in $tokens. + * + * @return void + */ + public function process(File $phpcsFile, $stackPtr) + { + $tokens = $phpcsFile->getTokens(); + + if (isset($tokens[$stackPtr]['scope_closer']) === false) { + // Probably an interface method. + return; + } + + $closeBrace = $tokens[$stackPtr]['scope_closer']; + $prevContent = $phpcsFile->findPrevious(T_WHITESPACE, ($closeBrace - 1), null, true); + + // Special case for empty JS functions. + if ($phpcsFile->tokenizerType === 'JS' && $prevContent === $tokens[$stackPtr]['scope_opener']) { + // In this case, the opening and closing brace must be + // right next to each other. + if ($tokens[$stackPtr]['scope_closer'] !== ($tokens[$stackPtr]['scope_opener'] + 1)) { + $error = 'The opening and closing braces of empty functions must be directly next to each other; e.g., function () {}'; + $fix = $phpcsFile->addFixableError($error, $closeBrace, 'SpacingBetween'); + if ($fix === true) { + $phpcsFile->fixer->beginChangeset(); + for ($i = ($tokens[$stackPtr]['scope_opener'] + 1); $i < $closeBrace; $i++) { + $phpcsFile->fixer->replaceToken($i, ''); + } + + $phpcsFile->fixer->endChangeset(); + } + } + + return; + } + + $nestedFunction = false; + if ($phpcsFile->hasCondition($stackPtr, [T_FUNCTION, T_CLOSURE]) === true + || isset($tokens[$stackPtr]['nested_parenthesis']) === true + ) { + $nestedFunction = true; + } + + $braceLine = $tokens[$closeBrace]['line']; + $prevLine = $tokens[$prevContent]['line']; + $found = ($braceLine - $prevLine - 1); + + if ($nestedFunction === true) { + if ($found < 0) { + $error = 'Closing brace of nested function must be on a new line'; + $fix = $phpcsFile->addFixableError($error, $closeBrace, 'ContentBeforeClose'); + if ($fix === true) { + $phpcsFile->fixer->addNewlineBefore($closeBrace); + } + } else if ($found > 0) { + $error = 'Expected 0 blank lines before closing brace of nested function; %s found'; + $data = [$found]; + $fix = $phpcsFile->addFixableError($error, $closeBrace, 'SpacingBeforeNestedClose', $data); + + if ($fix === true) { + $phpcsFile->fixer->beginChangeset(); + $changeMade = false; + for ($i = ($prevContent + 1); $i < $closeBrace; $i++) { + // Try and maintain indentation. + if ($tokens[$i]['line'] === ($braceLine - 1)) { + break; + } + + $phpcsFile->fixer->replaceToken($i, ''); + $changeMade = true; + } + + // Special case for when the last content contains the newline + // token as well, like with a comment. + if ($changeMade === false) { + $phpcsFile->fixer->replaceToken(($prevContent + 1), ''); + } + + $phpcsFile->fixer->endChangeset(); + }//end if + }//end if + } else { + if ($found !== 1) { + if ($found < 0) { + $found = 0; + } + + $error = 'Expected 1 blank line before closing function brace; %s found'; + $data = [$found]; + $fix = $phpcsFile->addFixableError($error, $closeBrace, 'SpacingBeforeClose', $data); + + if ($fix === true) { + if ($found > 1) { + $phpcsFile->fixer->beginChangeset(); + for ($i = ($prevContent + 1); $i < ($closeBrace - 1); $i++) { + $phpcsFile->fixer->replaceToken($i, ''); + } + + $phpcsFile->fixer->replaceToken($i, $phpcsFile->eolChar); + $phpcsFile->fixer->endChangeset(); + } else { + // Try and maintain indentation. + if ($tokens[($closeBrace - 1)]['code'] === T_WHITESPACE) { + $phpcsFile->fixer->addNewlineBefore($closeBrace - 1); + } else { + $phpcsFile->fixer->addNewlineBefore($closeBrace); + } + } + } + }//end if + }//end if + + }//end process() + + +}//end class diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Sniffs/WhiteSpace/FunctionOpeningBraceSpaceSniff.php b/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Sniffs/WhiteSpace/FunctionOpeningBraceSpaceSniff.php new file mode 100644 index 00000000..09c5a48a --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Sniffs/WhiteSpace/FunctionOpeningBraceSpaceSniff.php @@ -0,0 +1,98 @@ + + * @copyright 2006-2015 Squiz Pty Ltd (ABN 77 084 670 600) + * @license https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence + */ + +namespace PHP_CodeSniffer\Standards\Squiz\Sniffs\WhiteSpace; + +use PHP_CodeSniffer\Files\File; +use PHP_CodeSniffer\Sniffs\Sniff; + +class FunctionOpeningBraceSpaceSniff implements Sniff +{ + + /** + * A list of tokenizers this sniff supports. + * + * @var array + */ + public $supportedTokenizers = [ + 'PHP', + 'JS', + ]; + + + /** + * Returns an array of tokens this test wants to listen for. + * + * @return array + */ + public function register() + { + return [ + T_FUNCTION, + T_CLOSURE, + ]; + + }//end register() + + + /** + * Processes this test, when one of its tokens is encountered. + * + * @param \PHP_CodeSniffer\Files\File $phpcsFile The file being scanned. + * @param int $stackPtr The position of the current token + * in the stack passed in $tokens. + * + * @return void + */ + public function process(File $phpcsFile, $stackPtr) + { + $tokens = $phpcsFile->getTokens(); + + if (isset($tokens[$stackPtr]['scope_opener']) === false) { + // Probably an interface or abstract method. + return; + } + + $openBrace = $tokens[$stackPtr]['scope_opener']; + $nextContent = $phpcsFile->findNext(T_WHITESPACE, ($openBrace + 1), null, true); + + if ($nextContent === $tokens[$stackPtr]['scope_closer']) { + // The next bit of content is the closing brace, so this + // is an empty function and should have a blank line + // between the opening and closing braces. + return; + } + + $braceLine = $tokens[$openBrace]['line']; + $nextLine = $tokens[$nextContent]['line']; + + $found = ($nextLine - $braceLine - 1); + if ($found > 0) { + $error = 'Expected 0 blank lines after opening function brace; %s found'; + $data = [$found]; + $fix = $phpcsFile->addFixableError($error, $openBrace, 'SpacingAfter', $data); + if ($fix === true) { + $phpcsFile->fixer->beginChangeset(); + for ($i = ($openBrace + 1); $i < $nextContent; $i++) { + if ($tokens[$i]['line'] === $nextLine) { + break; + } + + $phpcsFile->fixer->replaceToken($i, ''); + } + + $phpcsFile->fixer->addNewline($openBrace); + $phpcsFile->fixer->endChangeset(); + } + } + + }//end process() + + +}//end class diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Sniffs/WhiteSpace/FunctionSpacingSniff.php b/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Sniffs/WhiteSpace/FunctionSpacingSniff.php new file mode 100644 index 00000000..1f4704b9 --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Sniffs/WhiteSpace/FunctionSpacingSniff.php @@ -0,0 +1,367 @@ + + * @copyright 2006-2015 Squiz Pty Ltd (ABN 77 084 670 600) + * @license https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence + */ + +namespace PHP_CodeSniffer\Standards\Squiz\Sniffs\WhiteSpace; + +use PHP_CodeSniffer\Files\File; +use PHP_CodeSniffer\Sniffs\Sniff; +use PHP_CodeSniffer\Util\Tokens; + +class FunctionSpacingSniff implements Sniff +{ + + /** + * The number of blank lines between functions. + * + * @var integer + */ + public $spacing = 2; + + /** + * The number of blank lines before the first function in a class. + * + * @var integer + */ + public $spacingBeforeFirst = 2; + + /** + * The number of blank lines after the last function in a class. + * + * @var integer + */ + public $spacingAfterLast = 2; + + /** + * Original properties as set in a custom ruleset (if any). + * + * @var array|null + */ + private $rulesetProperties = null; + + + /** + * Returns an array of tokens this test wants to listen for. + * + * @return array + */ + public function register() + { + return [T_FUNCTION]; + + }//end register() + + + /** + * Processes this sniff when one of its tokens is encountered. + * + * @param \PHP_CodeSniffer\Files\File $phpcsFile The file being scanned. + * @param int $stackPtr The position of the current token + * in the stack passed in $tokens. + * + * @return void + */ + public function process(File $phpcsFile, $stackPtr) + { + $tokens = $phpcsFile->getTokens(); + $previousNonEmpty = $phpcsFile->findPrevious(Tokens::$emptyTokens, ($stackPtr - 1), null, true); + if ($previousNonEmpty !== false + && $tokens[$previousNonEmpty]['code'] === T_OPEN_TAG + && $tokens[$previousNonEmpty]['line'] !== 1 + ) { + // Ignore functions at the start of an embedded PHP block. + return; + } + + // If the ruleset has only overridden the spacing property, use + // that value for all spacing rules. + if ($this->rulesetProperties === null) { + $this->rulesetProperties = []; + if (isset($phpcsFile->ruleset->ruleset['Squiz.WhiteSpace.FunctionSpacing']) === true + && isset($phpcsFile->ruleset->ruleset['Squiz.WhiteSpace.FunctionSpacing']['properties']) === true + ) { + $this->rulesetProperties = $phpcsFile->ruleset->ruleset['Squiz.WhiteSpace.FunctionSpacing']['properties']; + if (isset($this->rulesetProperties['spacing']) === true) { + if (isset($this->rulesetProperties['spacingBeforeFirst']) === false) { + $this->spacingBeforeFirst = $this->spacing; + } + + if (isset($this->rulesetProperties['spacingAfterLast']) === false) { + $this->spacingAfterLast = $this->spacing; + } + } + } + } + + $this->spacing = (int) $this->spacing; + $this->spacingBeforeFirst = (int) $this->spacingBeforeFirst; + $this->spacingAfterLast = (int) $this->spacingAfterLast; + + if (isset($tokens[$stackPtr]['scope_closer']) === false) { + // Must be an interface method, so the closer is the semicolon. + $closer = $phpcsFile->findNext(T_SEMICOLON, $stackPtr); + } else { + $closer = $tokens[$stackPtr]['scope_closer']; + } + + $isFirst = false; + $isLast = false; + + $ignore = ([T_WHITESPACE => T_WHITESPACE] + Tokens::$methodPrefixes); + + $prev = $phpcsFile->findPrevious($ignore, ($stackPtr - 1), null, true); + + while ($tokens[$prev]['code'] === T_ATTRIBUTE_END) { + // Skip past function attributes. + $prev = $phpcsFile->findPrevious($ignore, ($tokens[$prev]['attribute_opener'] - 1), null, true); + } + + if ($tokens[$prev]['code'] === T_DOC_COMMENT_CLOSE_TAG) { + // Skip past function docblocks. + $prev = $phpcsFile->findPrevious($ignore, ($tokens[$prev]['comment_opener'] - 1), null, true); + } + + if ($tokens[$prev]['code'] === T_OPEN_CURLY_BRACKET) { + $isFirst = true; + } + + $next = $phpcsFile->findNext($ignore, ($closer + 1), null, true); + if (isset(Tokens::$emptyTokens[$tokens[$next]['code']]) === true + && $tokens[$next]['line'] === $tokens[$closer]['line'] + ) { + // Skip past "end" comments. + $next = $phpcsFile->findNext($ignore, ($next + 1), null, true); + } + + if ($tokens[$next]['code'] === T_CLOSE_CURLY_BRACKET) { + $isLast = true; + } + + /* + Check the number of blank lines + after the function. + */ + + // Allow for comments on the same line as the closer. + for ($nextLineToken = ($closer + 1); $nextLineToken < $phpcsFile->numTokens; $nextLineToken++) { + if ($tokens[$nextLineToken]['line'] !== $tokens[$closer]['line']) { + break; + } + } + + $requiredSpacing = $this->spacing; + $errorCode = 'After'; + if ($isLast === true) { + $requiredSpacing = $this->spacingAfterLast; + $errorCode = 'AfterLast'; + } + + $foundLines = 0; + if ($nextLineToken === ($phpcsFile->numTokens - 1)) { + // We are at the end of the file. + // Don't check spacing after the function because this + // should be done by an EOF sniff. + $foundLines = $requiredSpacing; + } else { + $nextContent = $phpcsFile->findNext(T_WHITESPACE, $nextLineToken, null, true); + if ($nextContent === false) { + // We are at the end of the file. + // Don't check spacing after the function because this + // should be done by an EOF sniff. + $foundLines = $requiredSpacing; + } else { + $foundLines = ($tokens[$nextContent]['line'] - $tokens[$nextLineToken]['line']); + } + } + + if ($isLast === true) { + $phpcsFile->recordMetric($stackPtr, 'Function spacing after last', $foundLines); + } else { + $phpcsFile->recordMetric($stackPtr, 'Function spacing after', $foundLines); + } + + if ($foundLines !== $requiredSpacing) { + $error = 'Expected %s blank line'; + if ($requiredSpacing !== 1) { + $error .= 's'; + } + + $error .= ' after function; %s found'; + $data = [ + $requiredSpacing, + $foundLines, + ]; + + $fix = $phpcsFile->addFixableError($error, $closer, $errorCode, $data); + if ($fix === true) { + $phpcsFile->fixer->beginChangeset(); + for ($i = $nextLineToken; $i <= $nextContent; $i++) { + if ($tokens[$i]['line'] === $tokens[$nextContent]['line']) { + $phpcsFile->fixer->addContentBefore($i, str_repeat($phpcsFile->eolChar, $requiredSpacing)); + break; + } + + $phpcsFile->fixer->replaceToken($i, ''); + } + + $phpcsFile->fixer->endChangeset(); + }//end if + }//end if + + /* + Check the number of blank lines + before the function. + */ + + $prevLineToken = null; + for ($i = $stackPtr; $i >= 0; $i--) { + if ($tokens[$i]['line'] === $tokens[$stackPtr]['line']) { + continue; + } + + $prevLineToken = $i; + break; + } + + if ($prevLineToken === null) { + // Never found the previous line, which means + // there are 0 blank lines before the function. + $foundLines = 0; + $prevContent = 0; + $prevLineToken = 0; + } else { + $currentLine = $tokens[$stackPtr]['line']; + + $prevContent = $phpcsFile->findPrevious(T_WHITESPACE, $prevLineToken, null, true); + + if ($tokens[$prevContent]['code'] === T_COMMENT + || isset(Tokens::$phpcsCommentTokens[$tokens[$prevContent]['code']]) === true + ) { + // Ignore comments as they can have different spacing rules, and this + // isn't a proper function comment anyway. + return; + } + + while ($tokens[$prevContent]['code'] === T_ATTRIBUTE_END + && $tokens[$prevContent]['line'] === ($currentLine - 1) + ) { + // Account for function attributes. + $currentLine = $tokens[$tokens[$prevContent]['attribute_opener']]['line']; + $prevContent = $phpcsFile->findPrevious(T_WHITESPACE, ($tokens[$prevContent]['attribute_opener'] - 1), null, true); + } + + if ($tokens[$prevContent]['code'] === T_DOC_COMMENT_CLOSE_TAG + && $tokens[$prevContent]['line'] === ($currentLine - 1) + ) { + // Account for function comments. + $prevContent = $phpcsFile->findPrevious(T_WHITESPACE, ($tokens[$prevContent]['comment_opener'] - 1), null, true); + } + + $prevLineToken = $prevContent; + + // Before we throw an error, check that we are not throwing an error + // for another function. We don't want to error for no blank lines after + // the previous function and no blank lines before this one as well. + $prevLine = ($tokens[$prevContent]['line'] - 1); + $i = ($stackPtr - 1); + $foundLines = 0; + + $stopAt = 0; + if (isset($tokens[$stackPtr]['conditions']) === true) { + $conditions = $tokens[$stackPtr]['conditions']; + $conditions = array_keys($conditions); + $stopAt = array_pop($conditions); + } + + while ($currentLine !== $prevLine && $currentLine > 1 && $i > $stopAt) { + if ($tokens[$i]['code'] === T_FUNCTION) { + // Found another interface or abstract function. + return; + } + + if ($tokens[$i]['code'] === T_CLOSE_CURLY_BRACKET + && $tokens[$tokens[$i]['scope_condition']]['code'] === T_FUNCTION + ) { + // Found a previous function. + return; + } + + $currentLine = $tokens[$i]['line']; + if ($currentLine === $prevLine) { + break; + } + + if ($tokens[($i - 1)]['line'] < $currentLine && $tokens[($i + 1)]['line'] > $currentLine) { + // This token is on a line by itself. If it is whitespace, the line is empty. + if ($tokens[$i]['code'] === T_WHITESPACE) { + $foundLines++; + } + } + + $i--; + }//end while + }//end if + + $requiredSpacing = $this->spacing; + $errorCode = 'Before'; + if ($isFirst === true) { + $requiredSpacing = $this->spacingBeforeFirst; + $errorCode = 'BeforeFirst'; + + $phpcsFile->recordMetric($stackPtr, 'Function spacing before first', $foundLines); + } else { + $phpcsFile->recordMetric($stackPtr, 'Function spacing before', $foundLines); + } + + if ($foundLines !== $requiredSpacing) { + $error = 'Expected %s blank line'; + if ($requiredSpacing !== 1) { + $error .= 's'; + } + + $error .= ' before function; %s found'; + $data = [ + $requiredSpacing, + $foundLines, + ]; + + $fix = $phpcsFile->addFixableError($error, $stackPtr, $errorCode, $data); + if ($fix === true) { + $nextSpace = $phpcsFile->findNext(T_WHITESPACE, ($prevContent + 1), $stackPtr); + if ($nextSpace === false) { + $nextSpace = ($stackPtr - 1); + } + + if ($foundLines < $requiredSpacing) { + $padding = str_repeat($phpcsFile->eolChar, ($requiredSpacing - $foundLines)); + $phpcsFile->fixer->addContent($prevLineToken, $padding); + } else { + $nextContent = $phpcsFile->findNext(T_WHITESPACE, ($nextSpace + 1), null, true); + $phpcsFile->fixer->beginChangeset(); + for ($i = $nextSpace; $i < $nextContent; $i++) { + if ($tokens[$i]['line'] === $tokens[$prevContent]['line']) { + continue; + } + + if ($tokens[$i]['line'] === $tokens[$nextContent]['line']) { + $phpcsFile->fixer->addContentBefore($i, str_repeat($phpcsFile->eolChar, $requiredSpacing)); + break; + } + + $phpcsFile->fixer->replaceToken($i, ''); + } + + $phpcsFile->fixer->endChangeset(); + }//end if + }//end if + }//end if + + }//end process() + + +}//end class diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Sniffs/WhiteSpace/LanguageConstructSpacingSniff.php b/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Sniffs/WhiteSpace/LanguageConstructSpacingSniff.php new file mode 100644 index 00000000..c1492bf7 --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Sniffs/WhiteSpace/LanguageConstructSpacingSniff.php @@ -0,0 +1,89 @@ + + * @copyright 2006-2015 Squiz Pty Ltd (ABN 77 084 670 600) + * @license https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence + */ + +namespace PHP_CodeSniffer\Standards\Squiz\Sniffs\WhiteSpace; + +use PHP_CodeSniffer\Files\File; +use PHP_CodeSniffer\Sniffs\Sniff; +use PHP_CodeSniffer\Util; + +class LanguageConstructSpacingSniff implements Sniff +{ + + + /** + * Returns an array of tokens this test wants to listen for. + * + * @return array + */ + public function register() + { + return [ + T_ECHO, + T_PRINT, + T_RETURN, + T_INCLUDE, + T_INCLUDE_ONCE, + T_REQUIRE, + T_REQUIRE_ONCE, + T_NEW, + ]; + + }//end register() + + + /** + * Processes this test, when one of its tokens is encountered. + * + * @param \PHP_CodeSniffer\Files\File $phpcsFile The file being scanned. + * @param int $stackPtr The position of the current token in + * the stack passed in $tokens. + * + * @return void + */ + public function process(File $phpcsFile, $stackPtr) + { + $tokens = $phpcsFile->getTokens(); + + if (isset($tokens[($stackPtr + 1)]) === false) { + // Skip if there is no next token. + return; + } + + if ($tokens[($stackPtr + 1)]['code'] === T_SEMICOLON) { + // No content for this language construct. + return; + } + + if ($tokens[($stackPtr + 1)]['code'] === T_WHITESPACE) { + $content = $tokens[($stackPtr + 1)]['content']; + if ($content !== ' ') { + $error = 'Language constructs must be followed by a single space; expected 1 space but found "%s"'; + $data = [Util\Common::prepareForOutput($content)]; + $fix = $phpcsFile->addFixableError($error, $stackPtr, 'IncorrectSingle', $data); + if ($fix === true) { + $phpcsFile->fixer->replaceToken(($stackPtr + 1), ' '); + } + } + } else if ($tokens[($stackPtr + 1)]['code'] !== T_OPEN_PARENTHESIS) { + $error = 'Language constructs must be followed by a single space; expected "%s" but found "%s"'; + $data = [ + $tokens[$stackPtr]['content'].' '.$tokens[($stackPtr + 1)]['content'], + $tokens[$stackPtr]['content'].$tokens[($stackPtr + 1)]['content'], + ]; + $fix = $phpcsFile->addFixableError($error, $stackPtr, 'Incorrect', $data); + if ($fix === true) { + $phpcsFile->fixer->addContent($stackPtr, ' '); + } + }//end if + + }//end process() + + +}//end class diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Sniffs/WhiteSpace/LogicalOperatorSpacingSniff.php b/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Sniffs/WhiteSpace/LogicalOperatorSpacingSniff.php new file mode 100644 index 00000000..a89a02a9 --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Sniffs/WhiteSpace/LogicalOperatorSpacingSniff.php @@ -0,0 +1,102 @@ + + * @copyright 2006-2015 Squiz Pty Ltd (ABN 77 084 670 600) + * @license https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence + */ + +namespace PHP_CodeSniffer\Standards\Squiz\Sniffs\WhiteSpace; + +use PHP_CodeSniffer\Files\File; +use PHP_CodeSniffer\Sniffs\Sniff; +use PHP_CodeSniffer\Util\Tokens; + +class LogicalOperatorSpacingSniff implements Sniff +{ + + /** + * A list of tokenizers this sniff supports. + * + * @var array + */ + public $supportedTokenizers = [ + 'PHP', + 'JS', + ]; + + + /** + * Returns an array of tokens this test wants to listen for. + * + * @return array + */ + public function register() + { + return Tokens::$booleanOperators; + + }//end register() + + + /** + * Processes this sniff, when one of its tokens is encountered. + * + * @param \PHP_CodeSniffer\Files\File $phpcsFile The current file being checked. + * @param int $stackPtr The position of the current token + * in the stack passed in $tokens. + * + * @return void + */ + public function process(File $phpcsFile, $stackPtr) + { + $tokens = $phpcsFile->getTokens(); + + // Check there is one space before the operator. + if ($tokens[($stackPtr - 1)]['code'] !== T_WHITESPACE) { + $error = 'Expected 1 space before logical operator; 0 found'; + $fix = $phpcsFile->addFixableError($error, $stackPtr, 'NoSpaceBefore'); + if ($fix === true) { + $phpcsFile->fixer->addContentBefore($stackPtr, ' '); + } + } else { + $prev = $phpcsFile->findPrevious(T_WHITESPACE, ($stackPtr - 1), null, true); + if ($tokens[$stackPtr]['line'] === $tokens[$prev]['line'] + && $tokens[($stackPtr - 1)]['length'] !== 1 + ) { + $found = $tokens[($stackPtr - 1)]['length']; + $error = 'Expected 1 space before logical operator; %s found'; + $data = [$found]; + $fix = $phpcsFile->addFixableError($error, $stackPtr, 'TooMuchSpaceBefore', $data); + if ($fix === true) { + $phpcsFile->fixer->replaceToken(($stackPtr - 1), ' '); + } + } + } + + // Check there is one space after the operator. + if ($tokens[($stackPtr + 1)]['code'] !== T_WHITESPACE) { + $error = 'Expected 1 space after logical operator; 0 found'; + $fix = $phpcsFile->addFixableError($error, $stackPtr, 'NoSpaceAfter'); + if ($fix === true) { + $phpcsFile->fixer->addContent($stackPtr, ' '); + } + } else { + $next = $phpcsFile->findNext(T_WHITESPACE, ($stackPtr + 1), null, true); + if ($tokens[$stackPtr]['line'] === $tokens[$next]['line'] + && $tokens[($stackPtr + 1)]['length'] !== 1 + ) { + $found = $tokens[($stackPtr + 1)]['length']; + $error = 'Expected 1 space after logical operator; %s found'; + $data = [$found]; + $fix = $phpcsFile->addFixableError($error, $stackPtr, 'TooMuchSpaceAfter', $data); + if ($fix === true) { + $phpcsFile->fixer->replaceToken(($stackPtr + 1), ' '); + } + } + } + + }//end process() + + +}//end class diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Sniffs/WhiteSpace/MemberVarSpacingSniff.php b/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Sniffs/WhiteSpace/MemberVarSpacingSniff.php new file mode 100644 index 00000000..0ece1aca --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Sniffs/WhiteSpace/MemberVarSpacingSniff.php @@ -0,0 +1,254 @@ + + * @copyright 2006-2015 Squiz Pty Ltd (ABN 77 084 670 600) + * @license https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence + */ + +namespace PHP_CodeSniffer\Standards\Squiz\Sniffs\WhiteSpace; + +use PHP_CodeSniffer\Files\File; +use PHP_CodeSniffer\Sniffs\AbstractVariableSniff; +use PHP_CodeSniffer\Util\Tokens; + +class MemberVarSpacingSniff extends AbstractVariableSniff +{ + + /** + * The number of blank lines between member vars. + * + * @var integer + */ + public $spacing = 1; + + /** + * The number of blank lines before the first member var. + * + * @var integer + */ + public $spacingBeforeFirst = 1; + + + /** + * Processes the function tokens within the class. + * + * @param \PHP_CodeSniffer\Files\File $phpcsFile The file where this token was found. + * @param int $stackPtr The position where the token was found. + * + * @return void|int Optionally returns a stack pointer. The sniff will not be + * called again on the current file until the returned stack + * pointer is reached. + */ + protected function processMemberVar(File $phpcsFile, $stackPtr) + { + $tokens = $phpcsFile->getTokens(); + + $validPrefixes = Tokens::$methodPrefixes; + $validPrefixes[] = T_VAR; + + $startOfStatement = $phpcsFile->findPrevious($validPrefixes, ($stackPtr - 1), null, false, null, true); + if ($startOfStatement === false) { + return; + } + + $endOfStatement = $phpcsFile->findNext(T_SEMICOLON, ($stackPtr + 1), null, false, null, true); + + $ignore = $validPrefixes; + $ignore[T_WHITESPACE] = T_WHITESPACE; + + $start = $startOfStatement; + for ($prev = ($startOfStatement - 1); $prev >= 0; $prev--) { + if (isset($ignore[$tokens[$prev]['code']]) === true) { + continue; + } + + if ($tokens[$prev]['code'] === T_ATTRIBUTE_END + && isset($tokens[$prev]['attribute_opener']) === true + ) { + $prev = $tokens[$prev]['attribute_opener']; + $start = $prev; + continue; + } + + break; + } + + if (isset(Tokens::$commentTokens[$tokens[$prev]['code']]) === true) { + // Assume the comment belongs to the member var if it is on a line by itself. + $prevContent = $phpcsFile->findPrevious(Tokens::$emptyTokens, ($prev - 1), null, true); + if ($tokens[$prevContent]['line'] !== $tokens[$prev]['line']) { + // Check the spacing, but then skip it. + $foundLines = ($tokens[$startOfStatement]['line'] - $tokens[$prev]['line'] - 1); + if ($foundLines > 0) { + for ($i = ($prev + 1); $i < $startOfStatement; $i++) { + if ($tokens[$i]['column'] !== 1) { + continue; + } + + if ($tokens[$i]['code'] === T_WHITESPACE + && $tokens[$i]['line'] !== $tokens[($i + 1)]['line'] + ) { + $error = 'Expected 0 blank lines after member var comment; %s found'; + $data = [$foundLines]; + $fix = $phpcsFile->addFixableError($error, $prev, 'AfterComment', $data); + if ($fix === true) { + $phpcsFile->fixer->beginChangeset(); + // Inline comments have the newline included in the content but + // docblocks do not. + if ($tokens[$prev]['code'] === T_COMMENT) { + $phpcsFile->fixer->replaceToken($prev, rtrim($tokens[$prev]['content'])); + } + + for ($i = ($prev + 1); $i <= $startOfStatement; $i++) { + if ($tokens[$i]['line'] === $tokens[$startOfStatement]['line']) { + break; + } + + // Remove the newline after the docblock, and any entirely + // empty lines before the member var. + if ($tokens[$i]['code'] === T_WHITESPACE + && $tokens[$i]['line'] === $tokens[$prev]['line'] + || ($tokens[$i]['column'] === 1 + && $tokens[$i]['line'] !== $tokens[($i + 1)]['line']) + ) { + $phpcsFile->fixer->replaceToken($i, ''); + } + } + + $phpcsFile->fixer->addNewline($prev); + $phpcsFile->fixer->endChangeset(); + }//end if + + break; + }//end if + }//end for + }//end if + + $start = $prev; + }//end if + }//end if + + // There needs to be n blank lines before the var, not counting comments. + if ($start === $startOfStatement) { + // No comment found. + $first = $phpcsFile->findFirstOnLine(Tokens::$emptyTokens, $start, true); + if ($first === false) { + $first = $start; + } + } else if ($tokens[$start]['code'] === T_DOC_COMMENT_CLOSE_TAG) { + $first = $tokens[$start]['comment_opener']; + } else { + $first = $phpcsFile->findPrevious(Tokens::$emptyTokens, ($start - 1), null, true); + $first = $phpcsFile->findNext(array_merge(Tokens::$commentTokens, [T_ATTRIBUTE]), ($first + 1)); + } + + // Determine if this is the first member var. + $prev = $phpcsFile->findPrevious(T_WHITESPACE, ($first - 1), null, true); + if ($tokens[$prev]['code'] === T_CLOSE_CURLY_BRACKET + && isset($tokens[$prev]['scope_condition']) === true + && $tokens[$tokens[$prev]['scope_condition']]['code'] === T_FUNCTION + ) { + return; + } + + if ($tokens[$prev]['code'] === T_OPEN_CURLY_BRACKET + && isset(Tokens::$ooScopeTokens[$tokens[$tokens[$prev]['scope_condition']]['code']]) === true + ) { + $errorMsg = 'Expected %s blank line(s) before first member var; %s found'; + $errorCode = 'FirstIncorrect'; + $spacing = (int) $this->spacingBeforeFirst; + } else { + $errorMsg = 'Expected %s blank line(s) before member var; %s found'; + $errorCode = 'Incorrect'; + $spacing = (int) $this->spacing; + } + + $foundLines = ($tokens[$first]['line'] - $tokens[$prev]['line'] - 1); + + if ($errorCode === 'FirstIncorrect') { + $phpcsFile->recordMetric($stackPtr, 'Member var spacing before first', $foundLines); + } else { + $phpcsFile->recordMetric($stackPtr, 'Member var spacing before', $foundLines); + } + + if ($foundLines === $spacing) { + if ($endOfStatement !== false) { + return $endOfStatement; + } + + return; + } + + $data = [ + $spacing, + $foundLines, + ]; + + $fix = $phpcsFile->addFixableError($errorMsg, $startOfStatement, $errorCode, $data); + if ($fix === true) { + $phpcsFile->fixer->beginChangeset(); + for ($i = ($prev + 1); $i < $first; $i++) { + if ($tokens[$i]['line'] === $tokens[$prev]['line']) { + continue; + } + + if ($tokens[$i]['line'] === $tokens[$first]['line']) { + for ($x = 1; $x <= $spacing; $x++) { + $phpcsFile->fixer->addNewlineBefore($i); + } + + break; + } + + $phpcsFile->fixer->replaceToken($i, ''); + } + + $phpcsFile->fixer->endChangeset(); + }//end if + + if ($endOfStatement !== false) { + return $endOfStatement; + } + + return; + + }//end processMemberVar() + + + /** + * Processes normal variables. + * + * @param \PHP_CodeSniffer\Files\File $phpcsFile The file where this token was found. + * @param int $stackPtr The position where the token was found. + * + * @return void + */ + protected function processVariable(File $phpcsFile, $stackPtr) + { + /* + We don't care about normal variables. + */ + + }//end processVariable() + + + /** + * Processes variables in double quoted strings. + * + * @param \PHP_CodeSniffer\Files\File $phpcsFile The file where this token was found. + * @param int $stackPtr The position where the token was found. + * + * @return void + */ + protected function processVariableInString(File $phpcsFile, $stackPtr) + { + /* + We don't care about normal variables. + */ + + }//end processVariableInString() + + +}//end class diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Sniffs/WhiteSpace/ObjectOperatorSpacingSniff.php b/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Sniffs/WhiteSpace/ObjectOperatorSpacingSniff.php new file mode 100644 index 00000000..cc5db164 --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Sniffs/WhiteSpace/ObjectOperatorSpacingSniff.php @@ -0,0 +1,167 @@ + + * @copyright 2006-2015 Squiz Pty Ltd (ABN 77 084 670 600) + * @license https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence + */ + +namespace PHP_CodeSniffer\Standards\Squiz\Sniffs\WhiteSpace; + +use PHP_CodeSniffer\Files\File; +use PHP_CodeSniffer\Sniffs\Sniff; + +class ObjectOperatorSpacingSniff implements Sniff +{ + + /** + * Allow newlines instead of spaces. + * + * @var boolean + */ + public $ignoreNewlines = false; + + + /** + * Returns an array of tokens this test wants to listen for. + * + * @return array + */ + public function register() + { + return [ + T_OBJECT_OPERATOR, + T_DOUBLE_COLON, + T_NULLSAFE_OBJECT_OPERATOR, + ]; + + }//end register() + + + /** + * Processes this test, when one of its tokens is encountered. + * + * @param \PHP_CodeSniffer\Files\File $phpcsFile The file being scanned. + * @param int $stackPtr The position of the current token + * in the stack passed in $tokens. + * + * @return void + */ + public function process(File $phpcsFile, $stackPtr) + { + $tokens = $phpcsFile->getTokens(); + if ($tokens[($stackPtr - 1)]['code'] !== T_WHITESPACE) { + $before = 0; + } else { + if ($tokens[($stackPtr - 2)]['line'] !== $tokens[$stackPtr]['line']) { + $before = 'newline'; + } else { + $before = $tokens[($stackPtr - 1)]['length']; + } + } + + $phpcsFile->recordMetric($stackPtr, 'Spacing before object operator', $before); + $this->checkSpacingBeforeOperator($phpcsFile, $stackPtr, $before); + + if (isset($tokens[($stackPtr + 1)]) === false + || isset($tokens[($stackPtr + 2)]) === false + ) { + return; + } + + if ($tokens[($stackPtr + 1)]['code'] !== T_WHITESPACE) { + $after = 0; + } else { + if ($tokens[($stackPtr + 2)]['line'] !== $tokens[$stackPtr]['line']) { + $after = 'newline'; + } else { + $after = $tokens[($stackPtr + 1)]['length']; + } + } + + $phpcsFile->recordMetric($stackPtr, 'Spacing after object operator', $after); + $this->checkSpacingAfterOperator($phpcsFile, $stackPtr, $after); + + }//end process() + + + /** + * Check the spacing before the operator. + * + * @param \PHP_CodeSniffer\Files\File $phpcsFile The file being scanned. + * @param int $stackPtr The position of the current token + * in the stack passed in $tokens. + * @param mixed $before The number of spaces found before the + * operator or the string 'newline'. + * + * @return boolean true if there was no error, false otherwise. + */ + protected function checkSpacingBeforeOperator(File $phpcsFile, $stackPtr, $before) + { + if ($before !== 0 + && ($before !== 'newline' || $this->ignoreNewlines === false) + ) { + $error = 'Space found before object operator'; + $fix = $phpcsFile->addFixableError($error, $stackPtr, 'Before'); + if ($fix === true) { + $tokens = $phpcsFile->getTokens(); + $curPos = ($stackPtr - 1); + + $phpcsFile->fixer->beginChangeset(); + while ($tokens[$curPos]['code'] === T_WHITESPACE) { + $phpcsFile->fixer->replaceToken($curPos, ''); + --$curPos; + } + + $phpcsFile->fixer->endChangeset(); + } + + return false; + } + + return true; + + }//end checkSpacingBeforeOperator() + + + /** + * Check the spacing after the operator. + * + * @param \PHP_CodeSniffer\Files\File $phpcsFile The file being scanned. + * @param int $stackPtr The position of the current token + * in the stack passed in $tokens. + * @param mixed $after The number of spaces found after the + * operator or the string 'newline'. + * + * @return boolean true if there was no error, false otherwise. + */ + protected function checkSpacingAfterOperator(File $phpcsFile, $stackPtr, $after) + { + if ($after !== 0 + && ($after !== 'newline' || $this->ignoreNewlines === false) + ) { + $error = 'Space found after object operator'; + $fix = $phpcsFile->addFixableError($error, $stackPtr, 'After'); + if ($fix === true) { + $tokens = $phpcsFile->getTokens(); + $curPos = ($stackPtr + 1); + + $phpcsFile->fixer->beginChangeset(); + while ($tokens[$curPos]['code'] === T_WHITESPACE) { + $phpcsFile->fixer->replaceToken($curPos, ''); + ++$curPos; + } + + $phpcsFile->fixer->endChangeset(); + } + + return false; + } + + return true; + + }//end checkSpacingAfterOperator() + + +}//end class diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Sniffs/WhiteSpace/OperatorSpacingSniff.php b/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Sniffs/WhiteSpace/OperatorSpacingSniff.php new file mode 100644 index 00000000..2627d10d --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Sniffs/WhiteSpace/OperatorSpacingSniff.php @@ -0,0 +1,381 @@ + + * @copyright 2006-2015 Squiz Pty Ltd (ABN 77 084 670 600) + * @license https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence + */ + +namespace PHP_CodeSniffer\Standards\Squiz\Sniffs\WhiteSpace; + +use PHP_CodeSniffer\Files\File; +use PHP_CodeSniffer\Sniffs\Sniff; +use PHP_CodeSniffer\Util\Tokens; + +class OperatorSpacingSniff implements Sniff +{ + + /** + * A list of tokenizers this sniff supports. + * + * @var array + */ + public $supportedTokenizers = [ + 'PHP', + 'JS', + ]; + + /** + * Allow newlines instead of spaces. + * + * @var boolean + */ + public $ignoreNewlines = false; + + /** + * Don't check spacing for assignment operators. + * + * This allows multiple assignment statements to be aligned. + * + * @var boolean + */ + public $ignoreSpacingBeforeAssignments = true; + + /** + * A list of tokens that aren't considered as operands. + * + * @var string[] + */ + private $nonOperandTokens = []; + + + /** + * Returns an array of tokens this test wants to listen for. + * + * @return array + */ + public function register() + { + /* + First we setup an array of all the tokens that can come before + a T_MINUS or T_PLUS token to indicate that the token is not being + used as an operator. + */ + + // Trying to operate on a negative value; eg. ($var * -1). + $this->nonOperandTokens = Tokens::$operators; + + // Trying to compare a negative value; eg. ($var === -1). + $this->nonOperandTokens += Tokens::$comparisonTokens; + + // Trying to compare a negative value; eg. ($var || -1 === $b). + $this->nonOperandTokens += Tokens::$booleanOperators; + + // Trying to assign a negative value; eg. ($var = -1). + $this->nonOperandTokens += Tokens::$assignmentTokens; + + // Returning/printing a negative value; eg. (return -1). + $this->nonOperandTokens += [ + T_RETURN => T_RETURN, + T_ECHO => T_ECHO, + T_EXIT => T_EXIT, + T_PRINT => T_PRINT, + T_YIELD => T_YIELD, + T_FN_ARROW => T_FN_ARROW, + ]; + + // Trying to use a negative value; eg. myFunction($var, -2). + $this->nonOperandTokens += [ + T_CASE => T_CASE, + T_COLON => T_COLON, + T_COMMA => T_COMMA, + T_INLINE_ELSE => T_INLINE_ELSE, + T_INLINE_THEN => T_INLINE_THEN, + T_OPEN_CURLY_BRACKET => T_OPEN_CURLY_BRACKET, + T_OPEN_PARENTHESIS => T_OPEN_PARENTHESIS, + T_OPEN_SHORT_ARRAY => T_OPEN_SHORT_ARRAY, + T_OPEN_SQUARE_BRACKET => T_OPEN_SQUARE_BRACKET, + T_STRING_CONCAT => T_STRING_CONCAT, + ]; + + // Casting a negative value; eg. (array) -$a. + $this->nonOperandTokens += Tokens::$castTokens; + + /* + These are the tokens the sniff is looking for. + */ + + $targets = Tokens::$comparisonTokens; + $targets += Tokens::$operators; + $targets += Tokens::$assignmentTokens; + $targets[] = T_INLINE_THEN; + $targets[] = T_INLINE_ELSE; + $targets[] = T_INSTANCEOF; + + return $targets; + + }//end register() + + + /** + * Processes this sniff, when one of its tokens is encountered. + * + * @param \PHP_CodeSniffer\Files\File $phpcsFile The current file being checked. + * @param int $stackPtr The position of the current token in + * the stack passed in $tokens. + * + * @return void + */ + public function process(File $phpcsFile, $stackPtr) + { + $tokens = $phpcsFile->getTokens(); + + if ($this->isOperator($phpcsFile, $stackPtr) === false) { + return; + } + + if ($tokens[$stackPtr]['code'] === T_BITWISE_AND) { + // Check there is one space before the & operator. + if ($tokens[($stackPtr - 1)]['code'] !== T_WHITESPACE) { + $error = 'Expected 1 space before "&" operator; 0 found'; + $fix = $phpcsFile->addFixableError($error, $stackPtr, 'NoSpaceBeforeAmp'); + if ($fix === true) { + $phpcsFile->fixer->addContentBefore($stackPtr, ' '); + } + + $phpcsFile->recordMetric($stackPtr, 'Space before operator', 0); + } else { + if ($tokens[($stackPtr - 2)]['line'] !== $tokens[$stackPtr]['line']) { + $found = 'newline'; + } else { + $found = $tokens[($stackPtr - 1)]['length']; + } + + $phpcsFile->recordMetric($stackPtr, 'Space before operator', $found); + if ($found !== 1 + && ($found !== 'newline' || $this->ignoreNewlines === false) + ) { + $error = 'Expected 1 space before "&" operator; %s found'; + $data = [$found]; + $fix = $phpcsFile->addFixableError($error, $stackPtr, 'SpacingBeforeAmp', $data); + if ($fix === true) { + $phpcsFile->fixer->replaceToken(($stackPtr - 1), ' '); + } + } + }//end if + + $hasNext = $phpcsFile->findNext(T_WHITESPACE, ($stackPtr + 1), null, true); + if ($hasNext === false) { + // Live coding/parse error at end of file. + return; + } + + // Check there is one space after the & operator. + if ($tokens[($stackPtr + 1)]['code'] !== T_WHITESPACE) { + $error = 'Expected 1 space after "&" operator; 0 found'; + $fix = $phpcsFile->addFixableError($error, $stackPtr, 'NoSpaceAfterAmp'); + if ($fix === true) { + $phpcsFile->fixer->addContent($stackPtr, ' '); + } + + $phpcsFile->recordMetric($stackPtr, 'Space after operator', 0); + } else { + if ($tokens[($stackPtr + 2)]['line'] !== $tokens[$stackPtr]['line']) { + $found = 'newline'; + } else { + $found = $tokens[($stackPtr + 1)]['length']; + } + + $phpcsFile->recordMetric($stackPtr, 'Space after operator', $found); + if ($found !== 1 + && ($found !== 'newline' || $this->ignoreNewlines === false) + ) { + $error = 'Expected 1 space after "&" operator; %s found'; + $data = [$found]; + $fix = $phpcsFile->addFixableError($error, $stackPtr, 'SpacingAfterAmp', $data); + if ($fix === true) { + $phpcsFile->fixer->replaceToken(($stackPtr + 1), ' '); + } + } + }//end if + + return; + }//end if + + $operator = $tokens[$stackPtr]['content']; + + if ($tokens[($stackPtr - 1)]['code'] !== T_WHITESPACE + && (($tokens[($stackPtr - 1)]['code'] === T_INLINE_THEN + && $tokens[($stackPtr)]['code'] === T_INLINE_ELSE) === false) + ) { + $error = "Expected 1 space before \"$operator\"; 0 found"; + $fix = $phpcsFile->addFixableError($error, $stackPtr, 'NoSpaceBefore'); + if ($fix === true) { + $phpcsFile->fixer->addContentBefore($stackPtr, ' '); + } + + $phpcsFile->recordMetric($stackPtr, 'Space before operator', 0); + } else if (isset(Tokens::$assignmentTokens[$tokens[$stackPtr]['code']]) === false + || $this->ignoreSpacingBeforeAssignments === false + ) { + // Throw an error for assignments only if enabled using the sniff property + // because other standards allow multiple spaces to align assignments. + if ($tokens[($stackPtr - 2)]['line'] !== $tokens[$stackPtr]['line']) { + $found = 'newline'; + } else { + $found = $tokens[($stackPtr - 1)]['length']; + } + + $phpcsFile->recordMetric($stackPtr, 'Space before operator', $found); + if ($found !== 1 + && ($found !== 'newline' || $this->ignoreNewlines === false) + ) { + $error = 'Expected 1 space before "%s"; %s found'; + $data = [ + $operator, + $found, + ]; + $fix = $phpcsFile->addFixableError($error, $stackPtr, 'SpacingBefore', $data); + if ($fix === true) { + $phpcsFile->fixer->beginChangeset(); + if ($found === 'newline') { + $i = ($stackPtr - 2); + while ($tokens[$i]['code'] === T_WHITESPACE) { + $phpcsFile->fixer->replaceToken($i, ''); + $i--; + } + } + + $phpcsFile->fixer->replaceToken(($stackPtr - 1), ' '); + $phpcsFile->fixer->endChangeset(); + } + }//end if + }//end if + + $hasNext = $phpcsFile->findNext(T_WHITESPACE, ($stackPtr + 1), null, true); + if ($hasNext === false) { + // Live coding/parse error at end of file. + return; + } + + if ($tokens[($stackPtr + 1)]['code'] !== T_WHITESPACE) { + // Skip short ternary such as: "$foo = $bar ?: true;". + if (($tokens[$stackPtr]['code'] === T_INLINE_THEN + && $tokens[($stackPtr + 1)]['code'] === T_INLINE_ELSE) + ) { + return; + } + + $error = "Expected 1 space after \"$operator\"; 0 found"; + $fix = $phpcsFile->addFixableError($error, $stackPtr, 'NoSpaceAfter'); + if ($fix === true) { + $phpcsFile->fixer->addContent($stackPtr, ' '); + } + + $phpcsFile->recordMetric($stackPtr, 'Space after operator', 0); + } else { + if (isset($tokens[($stackPtr + 2)]) === true + && $tokens[($stackPtr + 2)]['line'] !== $tokens[$stackPtr]['line'] + ) { + $found = 'newline'; + } else { + $found = $tokens[($stackPtr + 1)]['length']; + } + + $phpcsFile->recordMetric($stackPtr, 'Space after operator', $found); + if ($found !== 1 + && ($found !== 'newline' || $this->ignoreNewlines === false) + ) { + $error = 'Expected 1 space after "%s"; %s found'; + $data = [ + $operator, + $found, + ]; + + $nextNonWhitespace = $phpcsFile->findNext(T_WHITESPACE, ($stackPtr + 1), null, true); + if ($nextNonWhitespace !== false + && isset(Tokens::$commentTokens[$tokens[$nextNonWhitespace]['code']]) === true + && $found === 'newline' + ) { + // Don't auto-fix when it's a comment or PHPCS annotation on a new line as + // it causes fixer conflicts and can cause the meaning of annotations to change. + $phpcsFile->addError($error, $stackPtr, 'SpacingAfter', $data); + } else { + $fix = $phpcsFile->addFixableError($error, $stackPtr, 'SpacingAfter', $data); + if ($fix === true) { + $phpcsFile->fixer->replaceToken(($stackPtr + 1), ' '); + } + } + }//end if + }//end if + + }//end process() + + + /** + * Checks if an operator is actually a different type of token in the current context. + * + * @param \PHP_CodeSniffer\Files\File $phpcsFile The current file being checked. + * @param int $stackPtr The position of the operator in + * the stack. + * + * @return boolean + */ + protected function isOperator(File $phpcsFile, $stackPtr) + { + $tokens = $phpcsFile->getTokens(); + + // Skip default values in function declarations. + // Skip declare statements. + if ($tokens[$stackPtr]['code'] === T_EQUAL + || $tokens[$stackPtr]['code'] === T_MINUS + ) { + if (isset($tokens[$stackPtr]['nested_parenthesis']) === true) { + $parenthesis = array_keys($tokens[$stackPtr]['nested_parenthesis']); + $bracket = array_pop($parenthesis); + if (isset($tokens[$bracket]['parenthesis_owner']) === true) { + $function = $tokens[$bracket]['parenthesis_owner']; + if ($tokens[$function]['code'] === T_FUNCTION + || $tokens[$function]['code'] === T_CLOSURE + || $tokens[$function]['code'] === T_FN + || $tokens[$function]['code'] === T_DECLARE + ) { + return false; + } + } + } + } + + if ($tokens[$stackPtr]['code'] === T_EQUAL) { + // Skip for '=&' case. + if (isset($tokens[($stackPtr + 1)]) === true + && $tokens[($stackPtr + 1)]['code'] === T_BITWISE_AND + ) { + return false; + } + } + + if ($tokens[$stackPtr]['code'] === T_BITWISE_AND) { + // If it's not a reference, then we expect one space either side of the + // bitwise operator. + if ($phpcsFile->isReference($stackPtr) === true) { + return false; + } + } + + if ($tokens[$stackPtr]['code'] === T_MINUS || $tokens[$stackPtr]['code'] === T_PLUS) { + // Check minus spacing, but make sure we aren't just assigning + // a minus value or returning one. + $prev = $phpcsFile->findPrevious(Tokens::$emptyTokens, ($stackPtr - 1), null, true); + if (isset($this->nonOperandTokens[$tokens[$prev]['code']]) === true) { + return false; + } + }//end if + + return true; + + }//end isOperator() + + +}//end class diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Sniffs/WhiteSpace/PropertyLabelSpacingSniff.php b/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Sniffs/WhiteSpace/PropertyLabelSpacingSniff.php new file mode 100644 index 00000000..198460df --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Sniffs/WhiteSpace/PropertyLabelSpacingSniff.php @@ -0,0 +1,79 @@ + + * @copyright 2006-2015 Squiz Pty Ltd (ABN 77 084 670 600) + * @license https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence + */ + +namespace PHP_CodeSniffer\Standards\Squiz\Sniffs\WhiteSpace; + +use PHP_CodeSniffer\Files\File; +use PHP_CodeSniffer\Sniffs\Sniff; + +class PropertyLabelSpacingSniff implements Sniff +{ + + /** + * A list of tokenizers this sniff supports. + * + * @var array + */ + public $supportedTokenizers = ['JS']; + + + /** + * Returns an array of tokens this test wants to listen for. + * + * @return array + */ + public function register() + { + return [ + T_PROPERTY, + T_LABEL, + ]; + + }//end register() + + + /** + * Processes this test, when one of its tokens is encountered. + * + * @param \PHP_CodeSniffer\Files\File $phpcsFile The file being scanned. + * @param int $stackPtr The position of the current token + * in the stack passed in $tokens. + * + * @return void + */ + public function process(File $phpcsFile, $stackPtr) + { + $tokens = $phpcsFile->getTokens(); + + $colon = $phpcsFile->findNext(T_COLON, ($stackPtr + 1)); + + if ($colon !== ($stackPtr + 1)) { + $error = 'There must be no space before the colon in a property/label declaration'; + $fix = $phpcsFile->addFixableError($error, $stackPtr, 'Before'); + if ($fix === true) { + $phpcsFile->fixer->replaceToken(($stackPtr + 1), ''); + } + } + + if ($tokens[($colon + 1)]['code'] !== T_WHITESPACE || $tokens[($colon + 1)]['content'] !== ' ') { + $error = 'There must be a single space after the colon in a property/label declaration'; + $fix = $phpcsFile->addFixableError($error, $stackPtr, 'After'); + if ($fix === true) { + if ($tokens[($colon + 1)]['code'] === T_WHITESPACE) { + $phpcsFile->fixer->replaceToken(($colon + 1), ' '); + } else { + $phpcsFile->fixer->addContent($colon, ' '); + } + } + } + + }//end process() + + +}//end class diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Sniffs/WhiteSpace/ScopeClosingBraceSniff.php b/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Sniffs/WhiteSpace/ScopeClosingBraceSniff.php new file mode 100644 index 00000000..fd038753 --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Sniffs/WhiteSpace/ScopeClosingBraceSniff.php @@ -0,0 +1,114 @@ + + * @copyright 2006-2015 Squiz Pty Ltd (ABN 77 084 670 600) + * @license https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence + */ + +namespace PHP_CodeSniffer\Standards\Squiz\Sniffs\WhiteSpace; + +use PHP_CodeSniffer\Files\File; +use PHP_CodeSniffer\Sniffs\Sniff; +use PHP_CodeSniffer\Util\Tokens; + +class ScopeClosingBraceSniff implements Sniff +{ + + + /** + * Returns an array of tokens this test wants to listen for. + * + * @return array + */ + public function register() + { + return Tokens::$scopeOpeners; + + }//end register() + + + /** + * Processes this test, when one of its tokens is encountered. + * + * @param \PHP_CodeSniffer\Files\File $phpcsFile All the tokens found in the document. + * @param int $stackPtr The position of the current token in the + * stack passed in $tokens. + * + * @return void + */ + public function process(File $phpcsFile, $stackPtr) + { + $tokens = $phpcsFile->getTokens(); + + // If this is an inline condition (ie. there is no scope opener), then + // return, as this is not a new scope. + if (isset($tokens[$stackPtr]['scope_closer']) === false) { + return; + } + + // We need to actually find the first piece of content on this line, + // as if this is a method with tokens before it (public, static etc) + // or an if with an else before it, then we need to start the scope + // checking from there, rather than the current token. + $lineStart = $phpcsFile->findFirstOnLine([T_WHITESPACE, T_INLINE_HTML], $stackPtr, true); + while ($tokens[$lineStart]['code'] === T_CONSTANT_ENCAPSED_STRING + && $tokens[($lineStart - 1)]['code'] === T_CONSTANT_ENCAPSED_STRING + ) { + $lineStart = $phpcsFile->findFirstOnLine([T_WHITESPACE, T_INLINE_HTML], ($lineStart - 1), true); + } + + $startColumn = $tokens[$lineStart]['column']; + $scopeStart = $tokens[$stackPtr]['scope_opener']; + $scopeEnd = $tokens[$stackPtr]['scope_closer']; + + // Check that the closing brace is on it's own line. + $lastContent = $phpcsFile->findPrevious([T_INLINE_HTML, T_WHITESPACE, T_OPEN_TAG], ($scopeEnd - 1), $scopeStart, true); + for ($lineStart = $scopeEnd; $tokens[$lineStart]['column'] > 1; $lineStart--); + + if ($tokens[$lastContent]['line'] === $tokens[$scopeEnd]['line'] + || ($tokens[$lineStart]['code'] === T_INLINE_HTML + && trim($tokens[$lineStart]['content']) !== '') + ) { + $error = 'Closing brace must be on a line by itself'; + $fix = $phpcsFile->addFixableError($error, $scopeEnd, 'ContentBefore'); + if ($fix === true) { + if ($tokens[$lastContent]['line'] === $tokens[$scopeEnd]['line']) { + $phpcsFile->fixer->addNewlineBefore($scopeEnd); + } else { + $phpcsFile->fixer->addNewlineBefore(($lineStart + 1)); + } + } + + return; + } + + // Check now that the closing brace is lined up correctly. + $lineStart = $phpcsFile->findFirstOnLine([T_WHITESPACE, T_INLINE_HTML], $scopeEnd, true); + $braceIndent = $tokens[$lineStart]['column']; + if ($tokens[$stackPtr]['code'] !== T_DEFAULT + && $tokens[$stackPtr]['code'] !== T_CASE + && $braceIndent !== $startColumn + ) { + $error = 'Closing brace indented incorrectly; expected %s spaces, found %s'; + $data = [ + ($startColumn - 1), + ($braceIndent - 1), + ]; + + $fix = $phpcsFile->addFixableError($error, $scopeEnd, 'Indent', $data); + if ($fix === true) { + $diff = ($startColumn - $braceIndent); + if ($diff > 0) { + $phpcsFile->fixer->addContentBefore($lineStart, str_repeat(' ', $diff)); + } else { + $phpcsFile->fixer->substrToken(($lineStart - 1), 0, $diff); + } + } + }//end if + + }//end process() + + +}//end class diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Sniffs/WhiteSpace/ScopeKeywordSpacingSniff.php b/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Sniffs/WhiteSpace/ScopeKeywordSpacingSniff.php new file mode 100644 index 00000000..ad995dc4 --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Sniffs/WhiteSpace/ScopeKeywordSpacingSniff.php @@ -0,0 +1,168 @@ + + * @copyright 2006-2015 Squiz Pty Ltd (ABN 77 084 670 600) + * @license https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence + */ + +namespace PHP_CodeSniffer\Standards\Squiz\Sniffs\WhiteSpace; + +use PHP_CodeSniffer\Files\File; +use PHP_CodeSniffer\Sniffs\Sniff; +use PHP_CodeSniffer\Util\Tokens; + +class ScopeKeywordSpacingSniff implements Sniff +{ + + + /** + * Returns an array of tokens this test wants to listen for. + * + * @return array + */ + public function register() + { + $register = Tokens::$scopeModifiers; + $register[] = T_STATIC; + return $register; + + }//end register() + + + /** + * Processes this test, when one of its tokens is encountered. + * + * @param \PHP_CodeSniffer\Files\File $phpcsFile The file being scanned. + * @param int $stackPtr The position of the current token + * in the stack passed in $tokens. + * + * @return void + */ + public function process(File $phpcsFile, $stackPtr) + { + $tokens = $phpcsFile->getTokens(); + + if (isset($tokens[($stackPtr + 1)]) === false) { + return; + } + + $prevToken = $phpcsFile->findPrevious(Tokens::$emptyTokens, ($stackPtr - 1), null, true); + $nextToken = $phpcsFile->findNext(Tokens::$emptyTokens, ($stackPtr + 1), null, true); + + if ($tokens[$stackPtr]['code'] === T_STATIC) { + if (($nextToken === false || $tokens[$nextToken]['code'] === T_DOUBLE_COLON) + || $tokens[$prevToken]['code'] === T_NEW + ) { + // Late static binding, e.g., static:: OR new static() usage or live coding. + return; + } + + if ($prevToken !== false + && $tokens[$prevToken]['code'] === T_TYPE_UNION + ) { + // Not a scope keyword, but a union return type. + return; + } + + if ($prevToken !== false + && $tokens[$prevToken]['code'] === T_NULLABLE + ) { + // Not a scope keyword, but a return type. + return; + } + + if ($prevToken !== false + && $tokens[$prevToken]['code'] === T_COLON + ) { + $prevPrevToken = $phpcsFile->findPrevious(Tokens::$emptyTokens, ($prevToken - 1), null, true); + if ($prevPrevToken !== false + && $tokens[$prevPrevToken]['code'] === T_CLOSE_PARENTHESIS + ) { + // Not a scope keyword, but a return type. + return; + } + } + }//end if + + if ($tokens[$prevToken]['code'] === T_AS) { + // Trait visibility change, e.g., "use HelloWorld { sayHello as private; }". + return; + } + + $isInFunctionDeclaration = false; + if (empty($tokens[$stackPtr]['nested_parenthesis']) === false) { + // Check if this is PHP 8.0 constructor property promotion. + // In that case, we can't have multi-property definitions. + $nestedParens = $tokens[$stackPtr]['nested_parenthesis']; + $lastCloseParens = end($nestedParens); + if (isset($tokens[$lastCloseParens]['parenthesis_owner']) === true + && $tokens[$tokens[$lastCloseParens]['parenthesis_owner']]['code'] === T_FUNCTION + ) { + $isInFunctionDeclaration = true; + } + } + + if ($nextToken !== false + && $tokens[$nextToken]['code'] === T_VARIABLE + && $isInFunctionDeclaration === false + ) { + $endOfStatement = $phpcsFile->findNext(T_SEMICOLON, ($nextToken + 1)); + if ($endOfStatement === false) { + // Live coding. + return; + } + + $multiProperty = $phpcsFile->findNext(T_VARIABLE, ($nextToken + 1), $endOfStatement); + if ($multiProperty !== false + && $tokens[$stackPtr]['line'] !== $tokens[$nextToken]['line'] + && $tokens[$nextToken]['line'] !== $tokens[$endOfStatement]['line'] + ) { + // Allow for multiple properties definitions to each be on their own line. + return; + } + } + + if ($tokens[($stackPtr + 1)]['code'] !== T_WHITESPACE) { + $spacing = 0; + } else { + if ($tokens[($stackPtr + 2)]['line'] !== $tokens[$stackPtr]['line']) { + $spacing = 'newline'; + } else { + $spacing = $tokens[($stackPtr + 1)]['length']; + } + } + + if ($spacing !== 1) { + $error = 'Scope keyword "%s" must be followed by a single space; found %s'; + $data = [ + $tokens[$stackPtr]['content'], + $spacing, + ]; + + $fix = $phpcsFile->addFixableError($error, $stackPtr, 'Incorrect', $data); + if ($fix === true) { + if ($spacing === 0) { + $phpcsFile->fixer->addContent($stackPtr, ' '); + } else { + $phpcsFile->fixer->beginChangeset(); + + for ($i = ($stackPtr + 2); $i < $phpcsFile->numTokens; $i++) { + if (isset($tokens[$i]) === false || $tokens[$i]['code'] !== T_WHITESPACE) { + break; + } + + $phpcsFile->fixer->replaceToken($i, ''); + } + + $phpcsFile->fixer->replaceToken(($stackPtr + 1), ' '); + $phpcsFile->fixer->endChangeset(); + } + }//end if + }//end if + + }//end process() + + +}//end class diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Sniffs/WhiteSpace/SemicolonSpacingSniff.php b/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Sniffs/WhiteSpace/SemicolonSpacingSniff.php new file mode 100644 index 00000000..bdcf9a5d --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Sniffs/WhiteSpace/SemicolonSpacingSniff.php @@ -0,0 +1,116 @@ + + * @copyright 2006-2015 Squiz Pty Ltd (ABN 77 084 670 600) + * @license https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence + */ + +namespace PHP_CodeSniffer\Standards\Squiz\Sniffs\WhiteSpace; + +use PHP_CodeSniffer\Files\File; +use PHP_CodeSniffer\Sniffs\Sniff; +use PHP_CodeSniffer\Util\Tokens; + +class SemicolonSpacingSniff implements Sniff +{ + + /** + * A list of tokenizers this sniff supports. + * + * @var array + */ + public $supportedTokenizers = [ + 'PHP', + 'JS', + ]; + + + /** + * Returns an array of tokens this test wants to listen for. + * + * @return array + */ + public function register() + { + return [T_SEMICOLON]; + + }//end register() + + + /** + * Processes this test, when one of its tokens is encountered. + * + * @param \PHP_CodeSniffer\Files\File $phpcsFile The file being scanned. + * @param int $stackPtr The position of the current token + * in the stack passed in $tokens. + * + * @return void + */ + public function process(File $phpcsFile, $stackPtr) + { + $tokens = $phpcsFile->getTokens(); + + $prevType = $tokens[($stackPtr - 1)]['code']; + if (isset(Tokens::$emptyTokens[$prevType]) === false) { + return; + } + + $nonSpace = $phpcsFile->findPrevious(Tokens::$emptyTokens, ($stackPtr - 2), null, true); + + // Detect whether this is a semi-colon for a condition in a `for()` control structure. + $forCondition = false; + if (isset($tokens[$stackPtr]['nested_parenthesis']) === true) { + $nestedParens = $tokens[$stackPtr]['nested_parenthesis']; + $closeParenthesis = end($nestedParens); + + if (isset($tokens[$closeParenthesis]['parenthesis_owner']) === true) { + $owner = $tokens[$closeParenthesis]['parenthesis_owner']; + + if ($tokens[$owner]['code'] === T_FOR) { + $forCondition = true; + $nonSpace = $phpcsFile->findPrevious(T_WHITESPACE, ($stackPtr - 2), null, true); + } + } + } + + if ($tokens[$nonSpace]['code'] === T_SEMICOLON + || ($forCondition === true && $nonSpace === $tokens[$owner]['parenthesis_opener']) + || (isset($tokens[$nonSpace]['scope_opener']) === true + && $tokens[$nonSpace]['scope_opener'] === $nonSpace) + ) { + // Empty statement. + return; + } + + $expected = $tokens[$nonSpace]['content'].';'; + $found = $phpcsFile->getTokensAsString($nonSpace, ($stackPtr - $nonSpace)).';'; + $found = str_replace("\n", '\n', $found); + $found = str_replace("\r", '\r', $found); + $found = str_replace("\t", '\t', $found); + $error = 'Space found before semicolon; expected "%s" but found "%s"'; + $data = [ + $expected, + $found, + ]; + + $fix = $phpcsFile->addFixableError($error, $stackPtr, 'Incorrect', $data); + if ($fix === true) { + $phpcsFile->fixer->beginChangeset(); + $i = ($stackPtr - 1); + while (($tokens[$i]['code'] === T_WHITESPACE) && ($i > $nonSpace)) { + $phpcsFile->fixer->replaceToken($i, ''); + $i--; + } + + $phpcsFile->fixer->addContent($nonSpace, ';'); + $phpcsFile->fixer->replaceToken($stackPtr, ''); + + $phpcsFile->fixer->endChangeset(); + } + + }//end process() + + +}//end class diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Sniffs/WhiteSpace/SuperfluousWhitespaceSniff.php b/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Sniffs/WhiteSpace/SuperfluousWhitespaceSniff.php new file mode 100644 index 00000000..e99d829b --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Sniffs/WhiteSpace/SuperfluousWhitespaceSniff.php @@ -0,0 +1,265 @@ + + * @copyright 2006-2015 Squiz Pty Ltd (ABN 77 084 670 600) + * @license https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence + */ + +namespace PHP_CodeSniffer\Standards\Squiz\Sniffs\WhiteSpace; + +use PHP_CodeSniffer\Files\File; +use PHP_CodeSniffer\Sniffs\Sniff; + +class SuperfluousWhitespaceSniff implements Sniff +{ + + /** + * A list of tokenizers this sniff supports. + * + * @var array + */ + public $supportedTokenizers = [ + 'PHP', + 'JS', + 'CSS', + ]; + + /** + * If TRUE, whitespace rules are not checked for blank lines. + * + * Blank lines are those that contain only whitespace. + * + * @var boolean + */ + public $ignoreBlankLines = false; + + + /** + * Returns an array of tokens this test wants to listen for. + * + * @return array + */ + public function register() + { + return [ + T_OPEN_TAG, + T_OPEN_TAG_WITH_ECHO, + T_CLOSE_TAG, + T_WHITESPACE, + T_COMMENT, + T_DOC_COMMENT_WHITESPACE, + T_CLOSURE, + ]; + + }//end register() + + + /** + * Processes this sniff, when one of its tokens is encountered. + * + * @param \PHP_CodeSniffer\Files\File $phpcsFile The file being scanned. + * @param int $stackPtr The position of the current token in the + * stack passed in $tokens. + * + * @return void + */ + public function process(File $phpcsFile, $stackPtr) + { + $tokens = $phpcsFile->getTokens(); + + if ($tokens[$stackPtr]['code'] === T_OPEN_TAG) { + /* + Check for start of file whitespace. + */ + + if ($phpcsFile->tokenizerType !== 'PHP') { + // The first token is always the open tag inserted when tokenized + // and the second token is always the first piece of content in + // the file. If the second token is whitespace, there was + // whitespace at the start of the file. + if ($tokens[($stackPtr + 1)]['code'] !== T_WHITESPACE) { + return; + } + + if ($phpcsFile->fixer->enabled === true) { + $stackPtr = $phpcsFile->findNext(T_WHITESPACE, ($stackPtr + 1), null, true); + } + } else { + // If it's the first token, then there is no space. + if ($stackPtr === 0) { + return; + } + + $beforeOpen = ''; + + for ($i = ($stackPtr - 1); $i >= 0; $i--) { + // If we find something that isn't inline html then there is something previous in the file. + if ($tokens[$i]['type'] !== 'T_INLINE_HTML') { + return; + } + + $beforeOpen .= $tokens[$i]['content']; + } + + // If we have ended up with inline html make sure it isn't just whitespace. + if (preg_match('`^[\pZ\s]+$`u', $beforeOpen) !== 1) { + return; + } + }//end if + + $fix = $phpcsFile->addFixableError('Additional whitespace found at start of file', $stackPtr, 'StartFile'); + if ($fix === true) { + $phpcsFile->fixer->beginChangeset(); + for ($i = 0; $i < $stackPtr; $i++) { + $phpcsFile->fixer->replaceToken($i, ''); + } + + $phpcsFile->fixer->endChangeset(); + } + } else if ($tokens[$stackPtr]['code'] === T_CLOSE_TAG) { + /* + Check for end of file whitespace. + */ + + if ($phpcsFile->tokenizerType === 'PHP') { + if (isset($tokens[($stackPtr + 1)]) === false) { + // The close PHP token is the last in the file. + return; + } + + $afterClose = ''; + + for ($i = ($stackPtr + 1); $i < $phpcsFile->numTokens; $i++) { + // If we find something that isn't inline HTML then there + // is more to the file. + if ($tokens[$i]['type'] !== 'T_INLINE_HTML') { + return; + } + + $afterClose .= $tokens[$i]['content']; + } + + // If we have ended up with inline html make sure it isn't just whitespace. + if (preg_match('`^[\pZ\s]+$`u', $afterClose) !== 1) { + return; + } + } else { + // The last token is always the close tag inserted when tokenized + // and the second last token is always the last piece of content in + // the file. If the second last token is whitespace, there was + // whitespace at the end of the file. + $stackPtr--; + + // The pointer is now looking at the last content in the file and + // not the fake PHP end tag the tokenizer inserted. + if ($tokens[$stackPtr]['code'] !== T_WHITESPACE) { + return; + } + + // Allow a single newline at the end of the last line in the file. + if ($tokens[($stackPtr - 1)]['code'] !== T_WHITESPACE + && $tokens[$stackPtr]['content'] === $phpcsFile->eolChar + ) { + return; + } + }//end if + + $fix = $phpcsFile->addFixableError('Additional whitespace found at end of file', $stackPtr, 'EndFile'); + if ($fix === true) { + if ($phpcsFile->tokenizerType !== 'PHP') { + $prev = $phpcsFile->findPrevious(T_WHITESPACE, ($stackPtr - 1), null, true); + $stackPtr = ($prev + 1); + } + + $phpcsFile->fixer->beginChangeset(); + for ($i = ($stackPtr + 1); $i < $phpcsFile->numTokens; $i++) { + $phpcsFile->fixer->replaceToken($i, ''); + } + + $phpcsFile->fixer->endChangeset(); + } + } else { + /* + Check for end of line whitespace. + */ + + // Ignore whitespace that is not at the end of a line. + if (isset($tokens[($stackPtr + 1)]['line']) === true + && $tokens[($stackPtr + 1)]['line'] === $tokens[$stackPtr]['line'] + ) { + return; + } + + // Ignore blank lines if required. + if ($this->ignoreBlankLines === true + && $tokens[$stackPtr]['code'] === T_WHITESPACE + && $tokens[($stackPtr - 1)]['line'] !== $tokens[$stackPtr]['line'] + ) { + return; + } + + $tokenContent = rtrim($tokens[$stackPtr]['content'], $phpcsFile->eolChar); + if (empty($tokenContent) === false) { + if ($tokenContent !== rtrim($tokenContent)) { + $fix = $phpcsFile->addFixableError('Whitespace found at end of line', $stackPtr, 'EndLine'); + if ($fix === true) { + $phpcsFile->fixer->replaceToken($stackPtr, rtrim($tokenContent).$phpcsFile->eolChar); + } + } + } else if ($tokens[($stackPtr - 1)]['content'] !== rtrim($tokens[($stackPtr - 1)]['content']) + && $tokens[($stackPtr - 1)]['line'] === $tokens[$stackPtr]['line'] + ) { + $fix = $phpcsFile->addFixableError('Whitespace found at end of line', ($stackPtr - 1), 'EndLine'); + if ($fix === true) { + $phpcsFile->fixer->replaceToken(($stackPtr - 1), rtrim($tokens[($stackPtr - 1)]['content'])); + } + } + + /* + Check for multiple blank lines in a function. + */ + + if (($phpcsFile->hasCondition($stackPtr, [T_FUNCTION, T_CLOSURE]) === true) + && $tokens[($stackPtr - 1)]['line'] < $tokens[$stackPtr]['line'] + && $tokens[($stackPtr - 2)]['line'] === $tokens[($stackPtr - 1)]['line'] + ) { + // Properties and functions in nested classes have their own rules for spacing. + $conditions = $tokens[$stackPtr]['conditions']; + $deepestScope = end($conditions); + if ($deepestScope === T_ANON_CLASS) { + return; + } + + // This is an empty line and the line before this one is not + // empty, so this could be the start of a multiple empty + // line block. + $next = $phpcsFile->findNext(T_WHITESPACE, $stackPtr, null, true); + $lines = ($tokens[$next]['line'] - $tokens[$stackPtr]['line']); + if ($lines > 1) { + $error = 'Functions must not contain multiple empty lines in a row; found %s empty lines'; + $fix = $phpcsFile->addFixableError($error, $stackPtr, 'EmptyLines', [$lines]); + if ($fix === true) { + $phpcsFile->fixer->beginChangeset(); + $i = $stackPtr; + while ($tokens[$i]['line'] !== $tokens[$next]['line']) { + $phpcsFile->fixer->replaceToken($i, ''); + $i++; + } + + $phpcsFile->fixer->addNewlineBefore($i); + $phpcsFile->fixer->endChangeset(); + } + } + }//end if + }//end if + + }//end process() + + +}//end class diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/Arrays/ArrayBracketSpacingUnitTest.inc b/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/Arrays/ArrayBracketSpacingUnitTest.inc new file mode 100644 index 00000000..8ffc868a --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/Arrays/ArrayBracketSpacingUnitTest.inc @@ -0,0 +1,31 @@ + 'bar', + 'bar' => 'foo', +]; + +if ($foo) {} +[$a, $b] = $c; + +echo foo()[ 1 ]; + +echo $this->addedCustomFunctions['nonce']; +echo $this->deprecated_functions[ $function_name ]['version']; + +echo [ 1,2,3 ][0]; +echo [ 1,2,3 ][ 0 ]; +echo 'PHP'[ 0 ]; + +$array = []; +$var = $var[$var[$var]]]; // Syntax error +$var = $var[$var[$var]; // Syntax error + +$myArray[ /* key start */'key'] = $value; +$myArray[ /* key start */'key'/* key end */ ] = $value; diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/Arrays/ArrayBracketSpacingUnitTest.inc.fixed b/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/Arrays/ArrayBracketSpacingUnitTest.inc.fixed new file mode 100644 index 00000000..41d66409 --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/Arrays/ArrayBracketSpacingUnitTest.inc.fixed @@ -0,0 +1,31 @@ + 'bar', + 'bar' => 'foo', +]; + +if ($foo) {} +[$a, $b] = $c; + +echo foo()[1]; + +echo $this->addedCustomFunctions['nonce']; +echo $this->deprecated_functions[$function_name]['version']; + +echo [ 1,2,3 ][0]; +echo [ 1,2,3 ][0]; +echo 'PHP'[0]; + +$array = []; +$var = $var[$var[$var]]]; // Syntax error +$var = $var[$var[$var]; // Syntax error + +$myArray[/* key start */'key'] = $value; +$myArray[/* key start */'key'/* key end */] = $value; diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/Arrays/ArrayBracketSpacingUnitTest.php b/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/Arrays/ArrayBracketSpacingUnitTest.php new file mode 100644 index 00000000..304a0d42 --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/Arrays/ArrayBracketSpacingUnitTest.php @@ -0,0 +1,57 @@ + + * @copyright 2006-2015 Squiz Pty Ltd (ABN 77 084 670 600) + * @license https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence + */ + +namespace PHP_CodeSniffer\Standards\Squiz\Tests\Arrays; + +use PHP_CodeSniffer\Tests\Standards\AbstractSniffUnitTest; + +class ArrayBracketSpacingUnitTest extends AbstractSniffUnitTest +{ + + + /** + * Returns the lines where errors should occur. + * + * The key of the array should represent the line number and the value + * should represent the number of errors that should occur on that line. + * + * @return array + */ + public function getErrorList() + { + return [ + 5 => 3, + 7 => 3, + 17 => 2, + 20 => 2, + 23 => 2, + 24 => 2, + 30 => 1, + 31 => 2, + ]; + + }//end getErrorList() + + + /** + * Returns the lines where warnings should occur. + * + * The key of the array should represent the line number and the value + * should represent the number of warnings that should occur on that line. + * + * @return array + */ + public function getWarningList() + { + return []; + + }//end getWarningList() + + +}//end class diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/Arrays/ArrayDeclarationUnitTest.1.inc b/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/Arrays/ArrayDeclarationUnitTest.1.inc new file mode 100644 index 00000000..750aaebc --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/Arrays/ArrayDeclarationUnitTest.1.inc @@ -0,0 +1,481 @@ + 1, + ); +} + +class TestClass +{ + public $good = array( + 'width' => '', + 'height' => '', + ); + + private $_bad = Array( + 'width' => '', + 'height' => '' + ); + + + public function test() + { + $truck = array( + 'width' => '', + 'height' => '', + ); + + $plane = Array( + 'width' => '', + 'height' => '', + ); + + $car = array( + 'width' => '', + 'height' => '', + ); + + $bus = array( + 'width' => '', + 'height' => '' + ); + + $train = array ( + TRUE, + FALSE, + 'aaa' + ); + + $inline = array('aaa', 'bbb', 'ccc'); + $inline = array('aaa'); + $inline = Array('aaa'); + + $bigone = array( + 'name' => 'bigone', + 'children' => Array( + '1a' => 'child', + '11b' => 'child', + '111c' => 'child', + 'children' => Array( + 'child' => 'aaa', + ), + ), + 'short_name' => 'big' + ); + } + +}//end class + +$value = array ( ); +$value = array( ); +$value = array('1'=>$one, '2' => $two, '3'=> $three, '4' =>$four); +$value = array('1'=>$one); + +if (in_array('1', array('1','2','3')) === TRUE) { + $value = in_array('1', array('1' , '2', '3','4')); +} + +$value = array( + '1'=> TRUE, + FALSE, + '3' => 'aaa',); + +$value = array( + '1'=> TRUE, + FALSE, + ); + +$value = array( + TRUE, + '1' => FALSE, + ); + +$value = array(1, + 2 , + 3 , + ); + +$value = array(1 => $one, + 2 => $two , + 3 => $three , + ); + +$value = array( + 'tag' => $tag, + 'space' => $this->_getIndentation($tag, $tagElement), + ); + +$expected = array( + array( + '1' => 1, + '1' => 2, + ), + ); + +$expected = array( + array( + '1' => 1, + '1' => 2 + ) + ); + +// Space in second arg. +$args = array( + '"'.$this->id.'"', + (int) $hasSessions, + ); + +// No errors. +$paths = array( + Init::ROOT_DIR.'/Systems' => 'Systems', + Init::ROOT_DIR.'/Installer' => 'Systems', + ); + +$x = array( + ); + +$x = array('test' + ); +$x = array('test', + ); +$x = array('name' => 'test', + ); + +$x = array( + $x, + ); + +$func = array( + $x, + 'get'.$x.'Replacement' + ); + +$array = array( + 'input_one' => 'one', + 'inputTwo' => 'two', + 'input_3' => 3, + ); + +$array = array( + 'input_one', + 'inputTwo', + 'input_3', + ); + +// Malformed +$foo = array(1 +, 2); + +$listItems[$aliasPath] = array('itemContent' => implode('
    ', $aliases)); + +$listItems[$aliasPath] = array( + 'itemContent' => implode('
    ', $aliases) + ); + +$x = array + ( + $x, + $y, + ); + +$x = array +( + $x, + $y, + ); + +$x = array( + + $x, + $y, + ); + +$test = array( + 'test' => TestFunction::blah( + $value1, + $value2 + ), + ); + +$c = array('a' => 1,); + +function b() +{ + $a = array( + 'a' => a('a'), + + ); + +} + +$foo = Array('[',']',':',"\n","\r"); +$bar = Array('[',']',':',' ',' '); + +function foo() +{ + return array($a, $b->screen); +} + +$array = array( + 'name' => 'contactSubject', + 'required' => TRUE, + 'validators' => array( + new \Zend\Validator\InArray(array('haystack' => array_keys($aSubjects))), + ), + ); + +$var = array( + 'ViewHelper', + array('Foo'), + 'Errors', + ); + +$data = array( + 'first', + 'second', + 'third', + // Add more here + ); + +$data = array( + 'first', + 'second', + //'third', + ); + +$data = array( + 'first', + 'second' + //'third', + ); + +$foo = array( + $this->getViewName() . '.id' => 'value', + $this->getViewName() . '.title' => 'value', + ); + +$foo = array( + $this->getViewName() . '.id', + $this->getViewName() . '.title', + ); + +$weightings = array( + T_CLOSURE => 100, + + /* + Conditions. + */ + + T_WHILE => 50, + + /* + Operators and arithmetic. + */ + + T_BITWISE_AND => 8, + + T_BOOLEAN_AND => 5, + + /* + Equality. + */ + + T_IS_GREATER_OR_EQUAL => 5, + ); + +foreach (array( + 'foo' => 'bar', + 'foobaz' => 'bazzy', + ) as $key => $value) { +} + +$ids = array( + '1', // Foo. + '13', // Bar. + ); + +array( + 'key1' => function($bar) { + return $bar; + }, + 'key2' => function($foo) { + return $foo; + }, + 'key3' => function($bar) { + return $bar; + } +); + +array( + 'key1' => array( + '1', + '2', + ) +); + +$var = array( + 'tab_template' => ' +
  • %s
  • ', + 'panel_template' => ' +
    + %s +
    ', + ); + +function test() : array +{ + return []; +} + +$fields = array( + 'id' => array('type' => 'INT'), + 'value' => array('type' => 'VARCHAR')); + +get_current_screen()->add_help_tab( array( + 'id' => << false); + +$x = array( + 'xxxx' => array('aaaaaaaaaa' => 'ccccccccccc', + 'bbbbbbbb' => false), +); + +$foo = array + ('foo' => array + ('bar1' => 1 + ,'bar2' => 1 + ,'bar3' => 1 + ,'bar4' => 1 + ,'bar5' => 1 + ) + ); + +$foo = array( + '1' => $row['status'] === 'rejected' + ? self::REJECTED_CODE + : self::VERIFIED_CODE, + '2' => in_array($row['status'], array('notverified', 'unverified'), true) + ? self::STATUS_PENDING + : self::STATUS_VERIFIED, + '3' => strtotime($row['date']), + ); + +$foo = foo( + array( + // comment + ) +); + +$foo = array( + << lorem( + 1 + ), 2 => 2, +); + +$foo = array( + 'тип' => 'авто', + 'цвет' => 'синий', + ); + +$paths = array( + Init::ROOT_DIR.'/тип' => 'авто', + Init::ROOT_DIR.'/цвет' => 'синий', + ); + +$foo = array(<< fn() => return 1, + 'bb' => fn() => return 2, + 'ccc' => ( true ) ? + fn() => return 1 : + fn() => return 2, + ); + +$array = array( + 1 => '1', + 2 => fn ($x) => yield 'a' => $x, + 3 => '3', + ); + +$foo = array( + $this->fn => 'value', + $foo->fn => 'value', + ); + +array($a, $b, +$c); + +array('a' => $a, 'b' => $b, +'c' => $c); + +array( + static function() { + return null; + }, + (array) array(), + (bool) array(), + (double) array(), + (int) array(), + (object) array(), + (string) array(), + (unset) array(), +); + +array( + 'foo', + 'bar' + // This is a non-fixable error. + , +); + +yield array( + static fn () : string => '', +); + +yield array( + static fn () : string => '', + ); + +// Intentional syntax error. +$a = array( + 'a' => + ); diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/Arrays/ArrayDeclarationUnitTest.1.inc.fixed b/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/Arrays/ArrayDeclarationUnitTest.1.inc.fixed new file mode 100644 index 00000000..3ecc091d --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/Arrays/ArrayDeclarationUnitTest.1.inc.fixed @@ -0,0 +1,517 @@ + 1); +} + +class TestClass +{ + public $good = array( + 'width' => '', + 'height' => '', + ); + + private $_bad = array( + 'width' => '', + 'height' => '', + ); + + + public function test() + { + $truck = array( + 'width' => '', + 'height' => '', + ); + + $plane = array( + 'width' => '', + 'height' => '', + ); + + $car = array( + 'width' => '', + 'height' => '', + ); + + $bus = array( + 'width' => '', + 'height' => '', + ); + + $train = array( + TRUE, + FALSE, + 'aaa', + ); + + $inline = array( + 'aaa', + 'bbb', + 'ccc', + ); + $inline = array('aaa'); + $inline = array('aaa'); + + $bigone = array( + 'name' => 'bigone', + 'children' => array( + '1a' => 'child', + '11b' => 'child', + '111c' => 'child', + 'children' => array('child' => 'aaa'), + ), + 'short_name' => 'big', + ); + } + +}//end class + +$value = array(); +$value = array(); +$value = array( + '1' => $one, + '2' => $two, + '3' => $three, + '4' => $four, + ); +$value = array('1' => $one); + +if (in_array('1', array('1', '2', '3')) === TRUE) { + $value = in_array('1', array('1', '2', '3', '4')); +} + +$value = array( + '1'=> TRUE, + FALSE, + '3' => 'aaa', + ); + +$value = array( + '1'=> TRUE, + FALSE, + ); + +$value = array( + TRUE, + '1' => FALSE, + ); + +$value = array( + 1, + 2, + 3, + ); + +$value = array( + 1 => $one, + 2 => $two, + 3 => $three, + ); + +$value = array( + 'tag' => $tag, + 'space' => $this->_getIndentation($tag, $tagElement), + ); + +$expected = array( + array( + '1' => 1, + '1' => 2, + ), + ); + +$expected = array( + array( + '1' => 1, + '1' => 2, + ), + ); + +// Space in second arg. +$args = array( + '"'.$this->id.'"', + (int) $hasSessions, + ); + +// No errors. +$paths = array( + Init::ROOT_DIR.'/Systems' => 'Systems', + Init::ROOT_DIR.'/Installer' => 'Systems', + ); + +$x = array(); + +$x = array('test'); +$x = array('test'); +$x = array('name' => 'test'); + +$x = array($x); + +$func = array( + $x, + 'get'.$x.'Replacement', + ); + +$array = array( + 'input_one' => 'one', + 'inputTwo' => 'two', + 'input_3' => 3, + ); + +$array = array( + 'input_one', + 'inputTwo', + 'input_3', + ); + +// Malformed +$foo = array( + 1, + 2, + ); + +$listItems[$aliasPath] = array('itemContent' => implode('
    ', $aliases)); + +$listItems[$aliasPath] = array( + 'itemContent' => implode('
    ', $aliases), + ); + +$x = array( + $x, + $y, + ); + +$x = array( + $x, + $y, + ); + +$x = array( + + $x, + $y, + ); + +$test = array( + 'test' => TestFunction::blah( + $value1, + $value2 + ), + ); + +$c = array('a' => 1); + +function b() +{ + $a = array( + 'a' => a('a'), + + ); + +} + +$foo = array( + '[', + ']', + ':', + "\n", + "\r", + ); +$bar = array( + '[', + ']', + ':', + ' ', + ' ', + ); + +function foo() +{ + return array( + $a, + $b->screen, + ); +} + +$array = array( + 'name' => 'contactSubject', + 'required' => TRUE, + 'validators' => array( + new \Zend\Validator\InArray(array('haystack' => array_keys($aSubjects))), + ), + ); + +$var = array( + 'ViewHelper', + array('Foo'), + 'Errors', + ); + +$data = array( + 'first', + 'second', + 'third', + // Add more here + ); + +$data = array( + 'first', + 'second', + //'third', + ); + +$data = array( + 'first', + 'second', + //'third', + ); + +$foo = array( + $this->getViewName() . '.id' => 'value', + $this->getViewName() . '.title' => 'value', + ); + +$foo = array( + $this->getViewName() . '.id', + $this->getViewName() . '.title', + ); + +$weightings = array( + T_CLOSURE => 100, + + /* + Conditions. + */ + + T_WHILE => 50, + + /* + Operators and arithmetic. + */ + + T_BITWISE_AND => 8, + + T_BOOLEAN_AND => 5, + + /* + Equality. + */ + + T_IS_GREATER_OR_EQUAL => 5, + ); + +foreach (array( + 'foo' => 'bar', + 'foobaz' => 'bazzy', + ) as $key => $value) { +} + +$ids = array( + '1', // Foo. + '13', // Bar. + ); + +array( + 'key1' => function($bar) { + return $bar; + }, + 'key2' => function($foo) { + return $foo; + }, + 'key3' => function($bar) { + return $bar; + }, +); + +array( + 'key1' => array( + '1', + '2', + ), +); + +$var = array( + 'tab_template' => ' +
  • %s
  • ', + 'panel_template' => ' +
    + %s +
    ', + ); + +function test() : array +{ + return []; +} + +$fields = array( + 'id' => array('type' => 'INT'), + 'value' => array('type' => 'VARCHAR'), + ); + +get_current_screen()->add_help_tab( array( + 'id' => << false); + +$x = array( + 'xxxx' => array( + 'aaaaaaaaaa' => 'ccccccccccc', + 'bbbbbbbb' => false, + ), + ); + +$foo = array( + 'foo' => array( + 'bar1' => 1, + 'bar2' => 1, + 'bar3' => 1, + 'bar4' => 1, + 'bar5' => 1, + ), + ); + +$foo = array( + '1' => $row['status'] === 'rejected' + ? self::REJECTED_CODE + : self::VERIFIED_CODE, + '2' => in_array($row['status'], array('notverified', 'unverified'), true) + ? self::STATUS_PENDING + : self::STATUS_VERIFIED, + '3' => strtotime($row['date']), + ); + +$foo = foo( + array( + // comment + ) +); + +$foo = array( + << lorem( + 1 + ), + 2 => 2, +); + +$foo = array( + 'тип' => 'авто', + 'цвет' => 'синий', + ); + +$paths = array( + Init::ROOT_DIR.'/тип' => 'авто', + Init::ROOT_DIR.'/цвет' => 'синий', + ); + +$foo = array(<< fn() => return 1, + 'bb' => fn() => return 2, + 'ccc' => ( true ) ? + fn() => return 1 : + fn() => return 2, + ); + +$array = array( + 1 => '1', + 2 => fn ($x) => yield 'a' => $x, + 3 => '3', + ); + +$foo = array( + $this->fn => 'value', + $foo->fn => 'value', + ); + +array( + $a, + $b, + $c, +); + +array( + 'a' => $a, + 'b' => $b, + 'c' => $c, +); + +array( + static function() { + return null; + }, + (array) array(), + (bool) array(), + (double) array(), + (int) array(), + (object) array(), + (string) array(), + (unset) array(), +); + +array( + 'foo', + 'bar' + // This is a non-fixable error. + , +); + +yield array( + static fn () : string => '', + ); + +yield array( + static fn () : string => '', + ); + +// Intentional syntax error. +$a = array( + 'a' => + ); diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/Arrays/ArrayDeclarationUnitTest.2.inc b/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/Arrays/ArrayDeclarationUnitTest.2.inc new file mode 100644 index 00000000..621970fa --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/Arrays/ArrayDeclarationUnitTest.2.inc @@ -0,0 +1,470 @@ + 1, + ]; +} + +class TestClass +{ + public $good = [ + 'width' => '', + 'height' => '', + ]; + + private $_bad = [ + 'width' => '', + 'height' => '' + ]; + + + public function test() + { + $truck = [ + 'width' => '', + 'height' => '', + ]; + + $plane = [ + 'width' => '', + 'height' => '', + ]; + + $car = [ + 'width' => '', + 'height' => '', + ]; + + $bus = [ + 'width' => '', + 'height' => '' + ]; + + $train = [ + TRUE, + FALSE, + 'aaa' + ]; + + $inline = ['aaa', 'bbb', 'ccc']; + $inline = ['aaa']; + $inline = ['aaa']; + + $bigone = [ + 'name' => 'bigone', + 'children' => [ + '1a' => 'child', + '11b' => 'child', + '111c' => 'child', + 'children' => [ + 'child' => 'aaa', + ], + ], + 'short_name' => 'big' + ]; + } + +}//end class + +$value = [ ]; +$value = [ ]; +$value = ['1'=>$one, '2' => $two, '3'=> $three, '4' =>$four]; +$value = ['1'=>$one]; + +if (in_array('1', ['1','2','3']) === TRUE) { + $value = in_array('1', ['1' , '2', '3','4']); +} + +$value = [ + '1'=> TRUE, + FALSE, + '3' => 'aaa',]; + +$value = [ + '1'=> TRUE, + FALSE, + ]; + +$value = [ + TRUE, + '1' => FALSE, + ]; + +$value = [1, + 2 , + 3 , + ]; + +$value = [1 => $one, + 2 => $two , + 3 => $three , + ]; + +$value = [ + 'tag' => $tag, + 'space' => $this->_getIndentation($tag, $tagElement), + ]; + +$expected = [ + [ + '1' => 1, + '1' => 2, + ], + ]; + +$expected = [ + [ + '1' => 1, + '1' => 2 + ] + ]; + +// Space in second arg. +$args = [ + '"'.$this->id.'"', + (int) $hasSessions, + ]; + +// No errors. +$paths = [ + Init::ROOT_DIR.'/Systems' => 'Systems', + Init::ROOT_DIR.'/Installer' => 'Systems', + ]; + +$x = [ + ]; + +$x = ['test' + ]; +$x = ['test', + ]; +$x = ['name' => 'test', + ]; + +$x = [ + $x, + ]; + +$func = [ + $x, + 'get'.$x.'Replacement' + ]; + +$array = [ + 'input_one' => 'one', + 'inputTwo' => 'two', + 'input_3' => 3, + ]; + +$array = [ + 'input_one', + 'inputTwo', + 'input_3', + ]; + +// Malformed +$foo = [1 +, 2]; + +$listItems[$aliasPath] = ['itemContent' => implode('
    ', $aliases)]; + +$listItems[$aliasPath] = [ + 'itemContent' => implode('
    ', $aliases) + ]; + +$x = + [ + $x, + $y, + ]; + +$x = +[ + $x, + $y, + ]; + +$x = [ + + $x, + $y, + ]; + +$test = [ + 'test' => TestFunction::blah( + $value1, + $value2 + ), + ]; + +$c = ['a' => 1,]; +$c->{$var}[ ] = 2; + +$foo = ['[',']',':',"\n","\r"]; +$bar = ['[',']',':',' ',' ']; + +function foo() +{ + return [$a, $b->screen]; +} + +$array = [ + 'name' => 'contactSubject', + 'required' => TRUE, + 'validators' => [ + new \Zend\Validator\InArray(['haystack' => array_keys($aSubjects)]), + ], + ]; + +$var = [ + 'ViewHelper', + ['Foo'], + 'Errors', + ]; + +$data = [ + 'first', + 'second', + 'third', + // Add more here + ]; + +$data = [ + 'first', + 'second', + //'third', + ]; + +$data = [ + 'first', + 'second' + //'third', + ]; + +$foo = [ + $this->getViewName() . '.id' => 'value', + $this->getViewName() . '.title' => 'value', + ]; + +$foo = [ + $this->getViewName() . '.id', + $this->getViewName() . '.title', + ]; + +$weightings = [ + T_CLOSURE => 100, + + /* + Conditions. + */ + + T_WHILE => 50, + + /* + Operators and arithmetic. + */ + + T_BITWISE_AND => 8, + + T_BOOLEAN_AND => 5, + + /* + Equality. + */ + + T_IS_GREATER_OR_EQUAL => 5, + ]; + +foreach ([ + 'foo' => 'bar', + 'foobaz' => 'bazzy', + ] as $key => $value) { +} + +$ids = [ + '1', // Foo. + '13', // Bar. + ]; + +[ + 'key1' => function($bar) { + return $bar; + }, + 'key2' => function($foo) { + return $foo; + }, + 'key3' => function($bar) { + return $bar; + } +]; + +[ + 'key1' => [ + '1', + '2', + ] +]; + +$var = [ + 'tab_template' => ' +
  • %s
  • ', + 'panel_template' => ' +
    + %s +
    ', + ]; + +function test() : array +{ + return []; +} + +$fields = [ + 'id' => ['type' => 'INT'], + 'value' => ['type' => 'VARCHAR']]; + +get_current_screen()->add_help_tab( [ + 'id' => << false]; + +$x = [ + 'xxxx' => ['aaaaaaaaaa' => 'ccccccccccc', + 'bbbbbbbb' => false], +]; + +$foo = ['foo' => ['bar1' => 1 + ,'bar2' => 1 + ,'bar3' => 1 + ,'bar4' => 1 + ,'bar5' => 1 + ] + ]; + +$foo = [ + '1' => $row['status'] === 'rejected' + ? self::REJECTED_CODE + : self::VERIFIED_CODE, + '2' => in_array($row['status'], ['notverified', 'unverified'], true) + ? self::STATUS_PENDING + : self::STATUS_VERIFIED, + '3' => strtotime($row['date']), + ]; + + +$foo = foo( + [ + // comment + ] +); + +$foo = [ + << lorem( + 1 + ), 2 => 2, +]; + +$foo = [ + 'тип' => 'авто', + 'цвет' => 'синий', + ]; + +$paths = [ + Init::ROOT_DIR.'/тип' => 'авто', + Init::ROOT_DIR.'/цвет' => 'синий', + ]; + +$foo = [<< fn() => return 1, + 'bb' => fn() => return 2, + 'ccc' => ( true ) ? + fn() => return 1 : + fn() => return 2, + ]; + +$array = [ + 1 => '1', + 2 => fn ($x) => yield 'a' => $x, + 3 => '3', + ]; + +$foo = [ + $this->fn => 'value', + $foo->fn => 'value', + ]; + +[$a, $b, +$c]; + +['a' => $a, 'b' => $b, +'c' => $c]; + +[ + static function() { + return null; + }, + (array) [], + (bool) [], + (double) [], + (int) [], + (object) [], + (string) [], + (unset) [], +]; + +[ + 'foo', + 'bar' + // This is a non-fixable error. + , +]; + +yield [ + static fn () : string => '', +]; + +yield [ + static fn () : string => '', + ]; + +// Intentional syntax error. +$a = [ + 'a' => + ]; diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/Arrays/ArrayDeclarationUnitTest.2.inc.fixed b/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/Arrays/ArrayDeclarationUnitTest.2.inc.fixed new file mode 100644 index 00000000..efe4c450 --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/Arrays/ArrayDeclarationUnitTest.2.inc.fixed @@ -0,0 +1,504 @@ + 1]; +} + +class TestClass +{ + public $good = [ + 'width' => '', + 'height' => '', + ]; + + private $_bad = [ + 'width' => '', + 'height' => '', + ]; + + + public function test() + { + $truck = [ + 'width' => '', + 'height' => '', + ]; + + $plane = [ + 'width' => '', + 'height' => '', + ]; + + $car = [ + 'width' => '', + 'height' => '', + ]; + + $bus = [ + 'width' => '', + 'height' => '', + ]; + + $train = [ + TRUE, + FALSE, + 'aaa', + ]; + + $inline = [ + 'aaa', + 'bbb', + 'ccc', + ]; + $inline = ['aaa']; + $inline = ['aaa']; + + $bigone = [ + 'name' => 'bigone', + 'children' => [ + '1a' => 'child', + '11b' => 'child', + '111c' => 'child', + 'children' => ['child' => 'aaa'], + ], + 'short_name' => 'big', + ]; + } + +}//end class + +$value = []; +$value = []; +$value = [ + '1' => $one, + '2' => $two, + '3' => $three, + '4' => $four, + ]; +$value = ['1' => $one]; + +if (in_array('1', ['1', '2', '3']) === TRUE) { + $value = in_array('1', ['1', '2', '3', '4']); +} + +$value = [ + '1'=> TRUE, + FALSE, + '3' => 'aaa', + ]; + +$value = [ + '1'=> TRUE, + FALSE, + ]; + +$value = [ + TRUE, + '1' => FALSE, + ]; + +$value = [ + 1, + 2, + 3, + ]; + +$value = [ + 1 => $one, + 2 => $two, + 3 => $three, + ]; + +$value = [ + 'tag' => $tag, + 'space' => $this->_getIndentation($tag, $tagElement), + ]; + +$expected = [ + [ + '1' => 1, + '1' => 2, + ], + ]; + +$expected = [ + [ + '1' => 1, + '1' => 2, + ], + ]; + +// Space in second arg. +$args = [ + '"'.$this->id.'"', + (int) $hasSessions, + ]; + +// No errors. +$paths = [ + Init::ROOT_DIR.'/Systems' => 'Systems', + Init::ROOT_DIR.'/Installer' => 'Systems', + ]; + +$x = []; + +$x = ['test']; +$x = ['test']; +$x = ['name' => 'test']; + +$x = [$x]; + +$func = [ + $x, + 'get'.$x.'Replacement', + ]; + +$array = [ + 'input_one' => 'one', + 'inputTwo' => 'two', + 'input_3' => 3, + ]; + +$array = [ + 'input_one', + 'inputTwo', + 'input_3', + ]; + +// Malformed +$foo = [ + 1, + 2, + ]; + +$listItems[$aliasPath] = ['itemContent' => implode('
    ', $aliases)]; + +$listItems[$aliasPath] = [ + 'itemContent' => implode('
    ', $aliases), + ]; + +$x = + [ + $x, + $y, + ]; + +$x = +[ + $x, + $y, +]; + +$x = [ + + $x, + $y, + ]; + +$test = [ + 'test' => TestFunction::blah( + $value1, + $value2 + ), + ]; + +$c = ['a' => 1]; +$c->{$var}[ ] = 2; + +$foo = [ + '[', + ']', + ':', + "\n", + "\r", + ]; +$bar = [ + '[', + ']', + ':', + ' ', + ' ', + ]; + +function foo() +{ + return [ + $a, + $b->screen, + ]; +} + +$array = [ + 'name' => 'contactSubject', + 'required' => TRUE, + 'validators' => [ + new \Zend\Validator\InArray(['haystack' => array_keys($aSubjects)]), + ], + ]; + +$var = [ + 'ViewHelper', + ['Foo'], + 'Errors', + ]; + +$data = [ + 'first', + 'second', + 'third', + // Add more here + ]; + +$data = [ + 'first', + 'second', + //'third', + ]; + +$data = [ + 'first', + 'second', + //'third', + ]; + +$foo = [ + $this->getViewName() . '.id' => 'value', + $this->getViewName() . '.title' => 'value', + ]; + +$foo = [ + $this->getViewName() . '.id', + $this->getViewName() . '.title', + ]; + +$weightings = [ + T_CLOSURE => 100, + + /* + Conditions. + */ + + T_WHILE => 50, + + /* + Operators and arithmetic. + */ + + T_BITWISE_AND => 8, + + T_BOOLEAN_AND => 5, + + /* + Equality. + */ + + T_IS_GREATER_OR_EQUAL => 5, + ]; + +foreach ([ + 'foo' => 'bar', + 'foobaz' => 'bazzy', + ] as $key => $value) { +} + +$ids = [ + '1', // Foo. + '13', // Bar. + ]; + +[ + 'key1' => function($bar) { + return $bar; + }, + 'key2' => function($foo) { + return $foo; + }, + 'key3' => function($bar) { + return $bar; + }, +]; + +[ + 'key1' => [ + '1', + '2', + ], +]; + +$var = [ + 'tab_template' => ' +
  • %s
  • ', + 'panel_template' => ' +
    + %s +
    ', + ]; + +function test() : array +{ + return []; +} + +$fields = [ + 'id' => ['type' => 'INT'], + 'value' => ['type' => 'VARCHAR'], + ]; + +get_current_screen()->add_help_tab( [ + 'id' => << false]; + +$x = [ + 'xxxx' => [ + 'aaaaaaaaaa' => 'ccccccccccc', + 'bbbbbbbb' => false, + ], + ]; + +$foo = [ + 'foo' => [ + 'bar1' => 1, + 'bar2' => 1, + 'bar3' => 1, + 'bar4' => 1, + 'bar5' => 1, + ], + ]; + +$foo = [ + '1' => $row['status'] === 'rejected' + ? self::REJECTED_CODE + : self::VERIFIED_CODE, + '2' => in_array($row['status'], ['notverified', 'unverified'], true) + ? self::STATUS_PENDING + : self::STATUS_VERIFIED, + '3' => strtotime($row['date']), + ]; + + +$foo = foo( + [ + // comment + ] +); + +$foo = [ + << lorem( + 1 + ), + 2 => 2, +]; + +$foo = [ + 'тип' => 'авто', + 'цвет' => 'синий', + ]; + +$paths = [ + Init::ROOT_DIR.'/тип' => 'авто', + Init::ROOT_DIR.'/цвет' => 'синий', + ]; + +$foo = [<< fn() => return 1, + 'bb' => fn() => return 2, + 'ccc' => ( true ) ? + fn() => return 1 : + fn() => return 2, + ]; + +$array = [ + 1 => '1', + 2 => fn ($x) => yield 'a' => $x, + 3 => '3', + ]; + +$foo = [ + $this->fn => 'value', + $foo->fn => 'value', + ]; + +[ + $a, + $b, + $c, +]; + +[ + 'a' => $a, + 'b' => $b, + 'c' => $c, +]; + +[ + static function() { + return null; + }, + (array) [], + (bool) [], + (double) [], + (int) [], + (object) [], + (string) [], + (unset) [], +]; + +[ + 'foo', + 'bar' + // This is a non-fixable error. + , +]; + +yield [ + static fn () : string => '', + ]; + +yield [ + static fn () : string => '', + ]; + +// Intentional syntax error. +$a = [ + 'a' => + ]; diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/Arrays/ArrayDeclarationUnitTest.php b/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/Arrays/ArrayDeclarationUnitTest.php new file mode 100644 index 00000000..15ce0746 --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/Arrays/ArrayDeclarationUnitTest.php @@ -0,0 +1,236 @@ + + * @copyright 2006-2015 Squiz Pty Ltd (ABN 77 084 670 600) + * @license https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence + */ + +namespace PHP_CodeSniffer\Standards\Squiz\Tests\Arrays; + +use PHP_CodeSniffer\Tests\Standards\AbstractSniffUnitTest; + +class ArrayDeclarationUnitTest extends AbstractSniffUnitTest +{ + + + /** + * Returns the lines where errors should occur. + * + * The key of the array should represent the line number and the value + * should represent the number of errors that should occur on that line. + * + * @param string $testFile The name of the file being tested. + * + * @return array + */ + public function getErrorList($testFile='') + { + switch ($testFile) { + case 'ArrayDeclarationUnitTest.1.inc': + return [ + 2 => 1, + 8 => 2, + 10 => 2, + 22 => 1, + 23 => 2, + 24 => 2, + 25 => 1, + 31 => 2, + 35 => 1, + 36 => 2, + 41 => 1, + 46 => 1, + 47 => 1, + 50 => 1, + 51 => 1, + 53 => 1, + 56 => 1, + 58 => 1, + 61 => 1, + 62 => 1, + 63 => 1, + 64 => 1, + 65 => 1, + 66 => 3, + 70 => 1, + 76 => 2, + 77 => 1, + 78 => 7, + 79 => 2, + 81 => 2, + 82 => 4, + 87 => 1, + 88 => 1, + 92 => 1, + 97 => 1, + 100 => 1, + 101 => 1, + 102 => 1, + 105 => 1, + 106 => 1, + 107 => 1, + 125 => 1, + 126 => 1, + 141 => 1, + 144 => 1, + 146 => 1, + 148 => 1, + 151 => 1, + 157 => 1, + 173 => 1, + 174 => 3, + 179 => 1, + 182 => 1, + 188 => 1, + 207 => 1, + 212 => 2, + 214 => 1, + 218 => 2, + 219 => 2, + 223 => 1, + 255 => 1, + 294 => 1, + 295 => 1, + 296 => 1, + 311 => 1, + 317 => 1, + 339 => 2, + 348 => 2, + 352 => 2, + 355 => 3, + 358 => 3, + 359 => 2, + 360 => 1, + 362 => 1, + 363 => 2, + 364 => 1, + 365 => 2, + 366 => 2, + 367 => 2, + 368 => 2, + 369 => 1, + 370 => 1, + 383 => 1, + 394 => 1, + 400 => 1, + 406 => 1, + 441 => 1, + 444 => 2, + 445 => 2, + 447 => 2, + 448 => 3, + 467 => 1, + 471 => 1, + 472 => 1, + ]; + case 'ArrayDeclarationUnitTest.2.inc': + return [ + 2 => 1, + 10 => 1, + 23 => 2, + 24 => 2, + 25 => 1, + 31 => 2, + 36 => 2, + 41 => 1, + 46 => 1, + 47 => 1, + 51 => 1, + 53 => 1, + 56 => 1, + 61 => 1, + 63 => 1, + 64 => 1, + 65 => 1, + 66 => 2, + 70 => 1, + 76 => 1, + 77 => 1, + 78 => 7, + 79 => 2, + 81 => 2, + 82 => 4, + 87 => 1, + 88 => 1, + 92 => 1, + 97 => 1, + 100 => 1, + 101 => 1, + 102 => 1, + 105 => 1, + 106 => 1, + 107 => 1, + 125 => 1, + 126 => 1, + 141 => 1, + 144 => 1, + 146 => 1, + 148 => 1, + 151 => 1, + 157 => 1, + 173 => 1, + 174 => 3, + 179 => 1, + 190 => 1, + 191 => 1, + 192 => 1, + 207 => 1, + 210 => 1, + 211 => 1, + 215 => 1, + 247 => 1, + 286 => 1, + 287 => 1, + 288 => 1, + 303 => 1, + 309 => 1, + 331 => 2, + 345 => 3, + 348 => 3, + 349 => 2, + 350 => 1, + 352 => 2, + 353 => 2, + 354 => 2, + 355 => 2, + 356 => 2, + 357 => 1, + 358 => 1, + 372 => 1, + 383 => 1, + 389 => 1, + 395 => 1, + 430 => 1, + 433 => 2, + 434 => 2, + 436 => 2, + 437 => 3, + 456 => 1, + 460 => 1, + 461 => 1, + ]; + default: + return []; + }//end switch + + }//end getErrorList() + + + /** + * Returns the lines where warnings should occur. + * + * The key of the array should represent the line number and the value + * should represent the number of warnings that should occur on that line. + * + * @return array + */ + public function getWarningList() + { + return []; + + }//end getWarningList() + + +}//end class diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/CSS/ClassDefinitionClosingBraceSpaceUnitTest.css b/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/CSS/ClassDefinitionClosingBraceSpaceUnitTest.css new file mode 100644 index 00000000..39abce23 --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/CSS/ClassDefinitionClosingBraceSpaceUnitTest.css @@ -0,0 +1,81 @@ +.my-style { +} + + +.my-style { +} + +/* Comment */ + +.my-style { +} + + +/* Comment */ + +.my-style { + float: left; + +} + +.AssetLineageWidgetType-item { + color: #CCC; +} + +/*.AssetLineageWidgetType-item2 .selected, +.AssetLineageWidgetType-item .selected { +}*/ + +.AssetLineageWidgetType-item.selected { +} + +@media screen and (max-device-width: 769px) { + + header #logo img { + max-width: 100%; + } + +} + +@media screen and (max-device-width: 769px) { + + header #logo img { + max-width: 100%; + } +} + +.GUITextBox.container:after {} + +@media screen and (max-device-width: 769px) { + .no-blank-line-after { + } + .no-blank-line-after-second-def { + } .my-style { + } + + .no-blank-line-and-trailing-comment { + } /* end long class */ + .too-many-blank-lines-and-trailing-comment-extra-whitespace-after-brace { + } /* end long class */ + + + + .has-blank-line-and-trailing-comment { + } /* end long class */ + + .no-blank-line-and-annotation { + } /* phpcs:ignore Standard.Cat.SniffName -- for reasons */ + .too-many-blank-lines-annotation { + } /* phpcs:ignore Standard.Cat.SniffName -- for reasons */ + + + + .has-blank-line-and-annotation { + } /* phpcs:ignore Standard.Cat.SniffName -- for reasons */ + +} + +@media screen and (max-device-width: 769px) { + + header #logo img { + max-width: 100%;}} diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/CSS/ClassDefinitionClosingBraceSpaceUnitTest.css.fixed b/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/CSS/ClassDefinitionClosingBraceSpaceUnitTest.css.fixed new file mode 100644 index 00000000..ca77e83b --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/CSS/ClassDefinitionClosingBraceSpaceUnitTest.css.fixed @@ -0,0 +1,85 @@ +.my-style { +} + +.my-style { +} + +/* Comment */ + +.my-style { +} + +/* Comment */ + +.my-style { + float: left; + +} + +.AssetLineageWidgetType-item { + color: #CCC; +} + +/*.AssetLineageWidgetType-item2 .selected, +.AssetLineageWidgetType-item .selected { +}*/ + +.AssetLineageWidgetType-item.selected { +} + +@media screen and (max-device-width: 769px) { + + header #logo img { + max-width: 100%; + } + +} + +@media screen and (max-device-width: 769px) { + + header #logo img { + max-width: 100%; + } + +} + +.GUITextBox.container:after { +} + +@media screen and (max-device-width: 769px) { + .no-blank-line-after { + } + + .no-blank-line-after-second-def { + } + +.my-style { + } + + .no-blank-line-and-trailing-comment { + } /* end long class */ + + .too-many-blank-lines-and-trailing-comment-extra-whitespace-after-brace { + } /* end long class */ + + .has-blank-line-and-trailing-comment { + } /* end long class */ + + .no-blank-line-and-annotation { + } /* phpcs:ignore Standard.Cat.SniffName -- for reasons */ + + .too-many-blank-lines-annotation { + } /* phpcs:ignore Standard.Cat.SniffName -- for reasons */ + + .has-blank-line-and-annotation { + } /* phpcs:ignore Standard.Cat.SniffName -- for reasons */ + +} + +@media screen and (max-device-width: 769px) { + + header #logo img { + max-width: 100%; +} + +} diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/CSS/ClassDefinitionClosingBraceSpaceUnitTest.php b/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/CSS/ClassDefinitionClosingBraceSpaceUnitTest.php new file mode 100644 index 00000000..528fcfd6 --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/CSS/ClassDefinitionClosingBraceSpaceUnitTest.php @@ -0,0 +1,60 @@ + + * @copyright 2006-2015 Squiz Pty Ltd (ABN 77 084 670 600) + * @license https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence + */ + +namespace PHP_CodeSniffer\Standards\Squiz\Tests\CSS; + +use PHP_CodeSniffer\Tests\Standards\AbstractSniffUnitTest; + +class ClassDefinitionClosingBraceSpaceUnitTest extends AbstractSniffUnitTest +{ + + + /** + * Returns the lines where errors should occur. + * + * The key of the array should represent the line number and the value + * should represent the number of errors that should occur on that line. + * + * @return array + */ + public function getErrorList() + { + return [ + 2 => 1, + 11 => 1, + 44 => 1, + 47 => 1, + 51 => 1, + 53 => 1, + 57 => 1, + 59 => 1, + 67 => 1, + 69 => 1, + 81 => 2, + ]; + + }//end getErrorList() + + + /** + * Returns the lines where warnings should occur. + * + * The key of the array should represent the line number and the value + * should represent the number of warnings that should occur on that line. + * + * @return array + */ + public function getWarningList() + { + return []; + + }//end getWarningList() + + +}//end class diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/CSS/ClassDefinitionNameSpacingUnitTest.css b/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/CSS/ClassDefinitionNameSpacingUnitTest.css new file mode 100644 index 00000000..6496cb83 --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/CSS/ClassDefinitionNameSpacingUnitTest.css @@ -0,0 +1,66 @@ +.AssetListingEditWidgetType-BottomPanel select, +#EditEditingModeWidgetType-assetEditor-filters-assetTypes-addNew { + float: left; +} + +.AssetListingEditWidgetType-BottomPanel select, + +#EditEditingModeWidgetType-assetEditor-filters-assetTypes-addNew { + float: left; +} + +.AssetListingEditWidgetType-BottomPanel select, +/*.AssetListingEditWidgetType-BottomPanel ul,*/ +#EditEditingModeWidgetType-assetEditor-filters-assetTypes-addNew { + float: left; +} + +.AssetListingEditWidgetType-BottomPanel select, + +.AssetListingEditWidgetType-BottomPanel ul, +#EditEditingModeWidgetType-assetEditor-filters-assetTypes-addNew { + float: left; +} + +#SuperUsersSystemConfigScreen-table { + display: block; + left: 50%; + margin-left: -500px; + margin-top: 180px; + position: relative; + width: 1000px; +} + +/** + * More styles below here. + */ + +td.TableWidgetType-header.TableWidgetType-header-lastLogin, +td.TableWidgetType-header.TableWidgetType-header-remove, +td.TableWidgetType-header.TableWidgetType-header-email, +td.TableWidgetType-header.TableWidgetType-header-userName { + background: url(images/ScreenImages/table_header_bg.png) repeat-x; + border-top: 1px solid #D4D4D4; + color: #787878; + height: 33px; + padding-left: 12px; + width: 150px; +} + +@media screen and (max-device-width: 769px) { + + header #logo img { + max-width: 100%; + padding: 20px; + margin: 40px; + } +} + +.foo +{ + border: none; +} + +/* Live coding. Has to be the last test in the file. */ +.intentional-parse-error { + float: left diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/CSS/ClassDefinitionNameSpacingUnitTest.php b/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/CSS/ClassDefinitionNameSpacingUnitTest.php new file mode 100644 index 00000000..41202bc8 --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/CSS/ClassDefinitionNameSpacingUnitTest.php @@ -0,0 +1,51 @@ + + * @copyright 2006-2015 Squiz Pty Ltd (ABN 77 084 670 600) + * @license https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence + */ + +namespace PHP_CodeSniffer\Standards\Squiz\Tests\CSS; + +use PHP_CodeSniffer\Tests\Standards\AbstractSniffUnitTest; + +class ClassDefinitionNameSpacingUnitTest extends AbstractSniffUnitTest +{ + + + /** + * Returns the lines where errors should occur. + * + * The key of the array should represent the line number and the value + * should represent the number of errors that should occur on that line. + * + * @return array + */ + public function getErrorList() + { + return [ + 7 => 1, + 19 => 1, + ]; + + }//end getErrorList() + + + /** + * Returns the lines where warnings should occur. + * + * The key of the array should represent the line number and the value + * should represent the number of warnings that should occur on that line. + * + * @return array + */ + public function getWarningList() + { + return []; + + }//end getWarningList() + + +}//end class diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/CSS/ClassDefinitionOpeningBraceSpaceUnitTest.css b/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/CSS/ClassDefinitionOpeningBraceSpaceUnitTest.css new file mode 100644 index 00000000..98c8fa56 --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/CSS/ClassDefinitionOpeningBraceSpaceUnitTest.css @@ -0,0 +1,108 @@ +.HelpWidgetType-new-bug-title { + float: left; +} +.HelpWidgetType-new-bug-title { + float: left; +} +.HelpWidgetType-new-bug-title { + float: left; +} +.HelpWidgetType-new-bug-title{ + float: left; +} +.HelpWidgetType-new-bug-title { + + float: left; +} + +@media screen and (max-device-width: 769px) { + + header #logo img { + max-width: 100%; + } + +} + +@media screen and (max-device-width: 769px) { + header #logo img { + max-width: 100%; + } + +} + +@media screen and (max-device-width: 769px) { + + + + header #logo img { + max-width: 100%; + } + +} + +.GUITextBox.container:after {} + +.single-line {float: left;} + +#opening-brace-on-different-line + + +{ + color: #FFFFFF; +} + +#opening-brace-on-different-line-and-inline-style + + +{color: #FFFFFF;} + +@media screen and (max-device-width: 769px) { .everything-on-one-line { float: left; } } + +/* Document handling of comments in various places */ +.no-space-before-opening-with-comment /* comment*/{ + float: left; +} + +.space-before-opening-with-comment-on-next-line +/* comment*/ { + float: left; +} + +#opening-brace-on-different-line-with-comment-between +/*comment*/ +{ + padding: 0; +} + +.single-line-with-comment { /* comment*/ float: left; } + +.multi-line-with-trailing-comment { /* comment*/ + float: left; +} + + +@media screen and (max-device-width: 769px) { + /*comment*/ + .comment-line-after-nesting-class-opening { + } +} + +@media screen and (max-device-width: 769px) { + + /*comment*/ + .blank-line-and-comment-line-after-nesting-class-opening { + } +} + +@media screen and (max-device-width: 769px) { + + + + /* phpcs:ignore Standard.Category.Sniffname -- for reasons */ + .blank-line-and-annotation-after-nesting-class-opening { + } +} + +/* Live coding. Has to be the last test in the file. */ +.intentional-parse-error { + float: left diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/CSS/ClassDefinitionOpeningBraceSpaceUnitTest.css.fixed b/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/CSS/ClassDefinitionOpeningBraceSpaceUnitTest.css.fixed new file mode 100644 index 00000000..b3f48a5c --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/CSS/ClassDefinitionOpeningBraceSpaceUnitTest.css.fixed @@ -0,0 +1,106 @@ +.HelpWidgetType-new-bug-title { + float: left; +} +.HelpWidgetType-new-bug-title { + float: left; +} +.HelpWidgetType-new-bug-title { + float: left; +} +.HelpWidgetType-new-bug-title { + float: left; +} +.HelpWidgetType-new-bug-title { + + float: left; +} + +@media screen and (max-device-width: 769px) { + + header #logo img { + max-width: 100%; + } + +} + +@media screen and (max-device-width: 769px) { + + header #logo img { + max-width: 100%; + } + +} + +@media screen and (max-device-width: 769px) { + + header #logo img { + max-width: 100%; + } + +} + +.GUITextBox.container:after { +} + +.single-line { +float: left;} + +#opening-brace-on-different-line { + color: #FFFFFF; +} + +#opening-brace-on-different-line-and-inline-style { +color: #FFFFFF;} + +@media screen and (max-device-width: 769px) { + +.everything-on-one-line { +float: left; } } + +/* Document handling of comments in various places */ +.no-space-before-opening-with-comment /* comment*/ { + float: left; +} + +.space-before-opening-with-comment-on-next-line +/* comment*/ { + float: left; +} + +#opening-brace-on-different-line-with-comment-between +/*comment*/ { + padding: 0; +} + +.single-line-with-comment { +/* comment*/ float: left; } + +.multi-line-with-trailing-comment { /* comment*/ + float: left; +} + + +@media screen and (max-device-width: 769px) { + + /*comment*/ + .comment-line-after-nesting-class-opening { + } +} + +@media screen and (max-device-width: 769px) { + + /*comment*/ + .blank-line-and-comment-line-after-nesting-class-opening { + } +} + +@media screen and (max-device-width: 769px) { + + /* phpcs:ignore Standard.Category.Sniffname -- for reasons */ + .blank-line-and-annotation-after-nesting-class-opening { + } +} + +/* Live coding. Has to be the last test in the file. */ +.intentional-parse-error { + float: left diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/CSS/ClassDefinitionOpeningBraceSpaceUnitTest.php b/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/CSS/ClassDefinitionOpeningBraceSpaceUnitTest.php new file mode 100644 index 00000000..d1e44219 --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/CSS/ClassDefinitionOpeningBraceSpaceUnitTest.php @@ -0,0 +1,64 @@ + + * @copyright 2006-2015 Squiz Pty Ltd (ABN 77 084 670 600) + * @license https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence + */ + +namespace PHP_CodeSniffer\Standards\Squiz\Tests\CSS; + +use PHP_CodeSniffer\Tests\Standards\AbstractSniffUnitTest; + +class ClassDefinitionOpeningBraceSpaceUnitTest extends AbstractSniffUnitTest +{ + + + /** + * Returns the lines where errors should occur. + * + * The key of the array should represent the line number and the value + * should represent the number of errors that should occur on that line. + * + * @return array + */ + public function getErrorList() + { + return [ + 4 => 1, + 7 => 1, + 10 => 1, + 26 => 1, + 33 => 1, + 43 => 1, + 45 => 1, + 50 => 1, + 57 => 2, + 59 => 2, + 62 => 1, + 73 => 1, + 77 => 1, + 84 => 1, + 97 => 1, + ]; + + }//end getErrorList() + + + /** + * Returns the lines where warnings should occur. + * + * The key of the array should represent the line number and the value + * should represent the number of warnings that should occur on that line. + * + * @return array + */ + public function getWarningList() + { + return []; + + }//end getWarningList() + + +}//end class diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/CSS/ColonSpacingUnitTest.css b/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/CSS/ColonSpacingUnitTest.css new file mode 100644 index 00000000..391bc85a --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/CSS/ColonSpacingUnitTest.css @@ -0,0 +1,42 @@ +body { +font-family: Arial, Helvetica, sans-serif; +margin : 40px 0 0 0; +padding : 0; +background: #8FB7DB url(diag_lines_bg.gif) top left; +margin-top: +10px; +margin-bottom: +0px; +} + +.TableWidgetType .recover:hover { + background-color: #FFF; +} + +#clearCache-settings:rootNodes-list_0 { + border-top: none; +} + +.LookupEditScreenWidgetType-urls a, .LookupEditScreenWidgetType-urls a:visited { + text-decoration: none; + color: #444; +} + +/* checking embedded PHP */ +li { + background:url(/images//bullet.gif) left px no-repeat; + margin:0px; + padding-left:10px; + margin-bottom:px; + margin-top: px; + line-height:13px; + filter: progid:DXImageTransform.Microsoft.gradient(GradientType=0, startColorstr=#2e62a8, endColorstr=#123363); +} + +/* Empty style defs. */ +.p { + margin:; + margin-right: + margin-left: 10px; + float:/* Some comment. */ ; +} diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/CSS/ColonSpacingUnitTest.css.fixed b/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/CSS/ColonSpacingUnitTest.css.fixed new file mode 100644 index 00000000..e68bddce --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/CSS/ColonSpacingUnitTest.css.fixed @@ -0,0 +1,40 @@ +body { +font-family: Arial, Helvetica, sans-serif; +margin: 40px 0 0 0; +padding: 0; +background: #8FB7DB url(diag_lines_bg.gif) top left; +margin-top: 10px; +margin-bottom: 0px; +} + +.TableWidgetType .recover:hover { + background-color: #FFF; +} + +#clearCache-settings:rootNodes-list_0 { + border-top: none; +} + +.LookupEditScreenWidgetType-urls a, .LookupEditScreenWidgetType-urls a:visited { + text-decoration: none; + color: #444; +} + +/* checking embedded PHP */ +li { + background: url(/images//bullet.gif) left px no-repeat; + margin: 0px; + padding-left: 10px; + margin-bottom: px; + margin-top: px; + line-height: 13px; + filter: progid:DXImageTransform.Microsoft.gradient(GradientType=0, startColorstr=#2e62a8, endColorstr=#123363); +} + +/* Empty style defs. */ +.p { + margin:; + margin-right: + margin-left: 10px; + float: /* Some comment. */ ; +} diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/CSS/ColonSpacingUnitTest.php b/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/CSS/ColonSpacingUnitTest.php new file mode 100644 index 00000000..9b8aa103 --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/CSS/ColonSpacingUnitTest.php @@ -0,0 +1,60 @@ + + * @copyright 2006-2015 Squiz Pty Ltd (ABN 77 084 670 600) + * @license https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence + */ + +namespace PHP_CodeSniffer\Standards\Squiz\Tests\CSS; + +use PHP_CodeSniffer\Tests\Standards\AbstractSniffUnitTest; + +class ColonSpacingUnitTest extends AbstractSniffUnitTest +{ + + + /** + * Returns the lines where errors should occur. + * + * The key of the array should represent the line number and the value + * should represent the number of errors that should occur on that line. + * + * @return array + */ + public function getErrorList() + { + return [ + 3 => 1, + 4 => 2, + 5 => 1, + 6 => 1, + 8 => 1, + 27 => 1, + 28 => 1, + 29 => 1, + 30 => 1, + 32 => 1, + 41 => 1, + ]; + + }//end getErrorList() + + + /** + * Returns the lines where warnings should occur. + * + * The key of the array should represent the line number and the value + * should represent the number of warnings that should occur on that line. + * + * @return array + */ + public function getWarningList() + { + return []; + + }//end getWarningList() + + +}//end class diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/CSS/ColourDefinitionUnitTest.css b/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/CSS/ColourDefinitionUnitTest.css new file mode 100644 index 00000000..2dfd22ad --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/CSS/ColourDefinitionUnitTest.css @@ -0,0 +1,16 @@ +#title-bar-bottom-right { + background-color: #333333; + padding: 10px; + border-bottom: 1px dotted #F0F0F0; + border-top: 1px dotted #FF00FF; + background: #08f7db url(diag_lines_bg.gif) top left; + + /* The sniff only deals with HEX colours. */ + color: DarkSlateGray; + background-color: rgb(255, 0, 0); + background-color: rgba(0, 0, 255, 0.3); + background-color: hsl(120, 100%, 50%); +} + +#add-new-comment { +} diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/CSS/ColourDefinitionUnitTest.css.fixed b/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/CSS/ColourDefinitionUnitTest.css.fixed new file mode 100644 index 00000000..039209dd --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/CSS/ColourDefinitionUnitTest.css.fixed @@ -0,0 +1,16 @@ +#title-bar-bottom-right { + background-color: #333; + padding: 10px; + border-bottom: 1px dotted #F0F0F0; + border-top: 1px dotted #F0F; + background: #08F7DB url(diag_lines_bg.gif) top left; + + /* The sniff only deals with HEX colours. */ + color: DarkSlateGray; + background-color: rgb(255, 0, 0); + background-color: rgba(0, 0, 255, 0.3); + background-color: hsl(120, 100%, 50%); +} + +#add-new-comment { +} diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/CSS/ColourDefinitionUnitTest.php b/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/CSS/ColourDefinitionUnitTest.php new file mode 100644 index 00000000..d535fdc2 --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/CSS/ColourDefinitionUnitTest.php @@ -0,0 +1,52 @@ + + * @copyright 2006-2015 Squiz Pty Ltd (ABN 77 084 670 600) + * @license https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence + */ + +namespace PHP_CodeSniffer\Standards\Squiz\Tests\CSS; + +use PHP_CodeSniffer\Tests\Standards\AbstractSniffUnitTest; + +class ColourDefinitionUnitTest extends AbstractSniffUnitTest +{ + + + /** + * Returns the lines where errors should occur. + * + * The key of the array should represent the line number and the value + * should represent the number of errors that should occur on that line. + * + * @return array + */ + public function getErrorList() + { + return [ + 2 => 1, + 5 => 1, + 6 => 1, + ]; + + }//end getErrorList() + + + /** + * Returns the lines where warnings should occur. + * + * The key of the array should represent the line number and the value + * should represent the number of warnings that should occur on that line. + * + * @return array + */ + public function getWarningList() + { + return []; + + }//end getWarningList() + + +}//end class diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/CSS/DisallowMultipleStyleDefinitionsUnitTest.css b/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/CSS/DisallowMultipleStyleDefinitionsUnitTest.css new file mode 100644 index 00000000..4c11beaa --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/CSS/DisallowMultipleStyleDefinitionsUnitTest.css @@ -0,0 +1,17 @@ +.SettingsTabPaneWidgetType-tab-mid { + background: transparent url(tab_inact_mid.png) repeat-x; + height: 100%;float: left; + line-height: -25px; + cursor: pointer; margin: 10px; float: right; +} + +/* testing embedded PHP */ +li { + background:url(/images//bullet.gif) left px no-repeat; margin:0px; padding-left:10px; margin-bottom:px; line-height:13px; + filter: progid:DXImageTransform.Microsoft.gradient(GradientType=0, startColorstr=#2e62a8, endColorstr=#123363); +} + +/* Document handling of comments and annotations. */ +div#annotations {-webkit-tap-highlight-color:transparent;/* phpcs:disable Standard.Cat.SniffName */-webkit-touch-callout:none;/*phpcs:enable*/-webkit-user-select:none;} + +div#comments {height:100%;/*comment*/width:100%;} diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/CSS/DisallowMultipleStyleDefinitionsUnitTest.css.fixed b/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/CSS/DisallowMultipleStyleDefinitionsUnitTest.css.fixed new file mode 100644 index 00000000..93a7815e --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/CSS/DisallowMultipleStyleDefinitionsUnitTest.css.fixed @@ -0,0 +1,27 @@ +.SettingsTabPaneWidgetType-tab-mid { + background: transparent url(tab_inact_mid.png) repeat-x; + height: 100%; +float: left; + line-height: -25px; + cursor: pointer; +margin: 10px; +float: right; +} + +/* testing embedded PHP */ +li { + background:url(/images//bullet.gif) left px no-repeat; +margin:0px; +padding-left:10px; +margin-bottom:px; +line-height:13px; + filter: progid:DXImageTransform.Microsoft.gradient(GradientType=0, startColorstr=#2e62a8, endColorstr=#123363); +} + +/* Document handling of comments and annotations. */ +div#annotations {-webkit-tap-highlight-color:transparent;/* phpcs:disable Standard.Cat.SniffName */ +-webkit-touch-callout:none;/*phpcs:enable*/ +-webkit-user-select:none;} + +div#comments {height:100%;/*comment*/ +width:100%;} diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/CSS/DisallowMultipleStyleDefinitionsUnitTest.php b/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/CSS/DisallowMultipleStyleDefinitionsUnitTest.php new file mode 100644 index 00000000..8e3b4873 --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/CSS/DisallowMultipleStyleDefinitionsUnitTest.php @@ -0,0 +1,54 @@ + + * @copyright 2006-2015 Squiz Pty Ltd (ABN 77 084 670 600) + * @license https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence + */ + +namespace PHP_CodeSniffer\Standards\Squiz\Tests\CSS; + +use PHP_CodeSniffer\Tests\Standards\AbstractSniffUnitTest; + +class DisallowMultipleStyleDefinitionsUnitTest extends AbstractSniffUnitTest +{ + + + /** + * Returns the lines where errors should occur. + * + * The key of the array should represent the line number and the value + * should represent the number of errors that should occur on that line. + * + * @return array + */ + public function getErrorList() + { + return [ + 3 => 1, + 5 => 2, + 10 => 4, + 15 => 2, + 17 => 1, + ]; + + }//end getErrorList() + + + /** + * Returns the lines where warnings should occur. + * + * The key of the array should represent the line number and the value + * should represent the number of warnings that should occur on that line. + * + * @return array + */ + public function getWarningList() + { + return []; + + }//end getWarningList() + + +}//end class diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/CSS/DuplicateClassDefinitionUnitTest.css b/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/CSS/DuplicateClassDefinitionUnitTest.css new file mode 100644 index 00000000..8ac95012 --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/CSS/DuplicateClassDefinitionUnitTest.css @@ -0,0 +1,103 @@ +.AssetLineageWidgetType-item { + color: #FFF; +} + +.AssetLineageWidgetType-title { + color: #CCC; +} + +.AssetLineageWidgetType-item { + color: #CCC; +} + +.AssetLineageWidgetType-item .selected { +} + +.AssetLineageWidgetType-item.selected { +} + +#Blah .AssetLineageWidgetType-item { +} + +#X.selected, +.AssetLineageWidgetType-item { +} + +.MyClass, .YourClass { +} + +.YourClass, .MyClass { +} + +.YourClass, .MyClass, .OurClass { +} + + +.ClassAtTopOfMediaBlock { +} + +@media print { + .ClassAtTopOfMediaBlock { + } + + .ClassInMultipleMediaBlocks { + } +} + +.ClassNotAtTopOfMediaBlock { +} + +@media handheld { + .SameClassInMediaBlock { + } + + .ClassNotAtTopOfMediaBlock { + } + + .SameClassInMediaBlock { + } +} + +@media braille { + .PlaceholderClass { + } + + .ClassNotAtTopOfMediaBlock { + } + + .ClassInMultipleMediaBlocks { + } +} + +.foo /* any comment */ +{ color: red; } + +/* print comment */ +@media print { + /* comment1 */ + td { + } + + /* comment2 */ + img { + } + + /* comment3 */ + td { + } +} + +@media handheld /* handheld comment */ +{ + td /* comment1 */ + { + } + + img /* comment2 */ + { + } + + td /* comment3 */ + { + } +} diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/CSS/DuplicateClassDefinitionUnitTest.php b/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/CSS/DuplicateClassDefinitionUnitTest.php new file mode 100644 index 00000000..2a95971b --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/CSS/DuplicateClassDefinitionUnitTest.php @@ -0,0 +1,54 @@ + + * @copyright 2006-2015 Squiz Pty Ltd (ABN 77 084 670 600) + * @license https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence + */ + +namespace PHP_CodeSniffer\Standards\Squiz\Tests\CSS; + +use PHP_CodeSniffer\Tests\Standards\AbstractSniffUnitTest; + +class DuplicateClassDefinitionUnitTest extends AbstractSniffUnitTest +{ + + + /** + * Returns the lines where errors should occur. + * + * The key of the array should represent the line number and the value + * should represent the number of errors that should occur on that line. + * + * @return array + */ + public function getErrorList() + { + return [ + 9 => 1, + 29 => 1, + 57 => 1, + 86 => 1, + 101 => 1, + ]; + + }//end getErrorList() + + + /** + * Returns the lines where warnings should occur. + * + * The key of the array should represent the line number and the value + * should represent the number of warnings that should occur on that line. + * + * @return array + */ + public function getWarningList() + { + return []; + + }//end getWarningList() + + +}//end class diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/CSS/DuplicateStyleDefinitionUnitTest.css b/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/CSS/DuplicateStyleDefinitionUnitTest.css new file mode 100644 index 00000000..c9c849f6 --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/CSS/DuplicateStyleDefinitionUnitTest.css @@ -0,0 +1,27 @@ +.ViperSubToolbar-wrapper { + height: 34px; + left: 0; + position: fixed; + top: 60px; + z-index: 997; + left: 50%; +} + +.expandable { + -moz-transition-property: margin-left, margin-right; + -moz-transition-duration: 0.2s; + -moz-transition-timing-function: ease; + -webkit-transition-property: margin-left, margin-right; + -webkit-transition-duration: 0.2s; + -webkit-transition-timing-function: ease; + z-index: 2; +} + +@media only screen and (max-width: 480px) { + header nav.meta a { display: none; } + header nav.meta a.search { display: block; } +} + +/* Live coding. Has to be the last test in the file. */ +.intentional-parse-error { + float: left diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/CSS/DuplicateStyleDefinitionUnitTest.php b/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/CSS/DuplicateStyleDefinitionUnitTest.php new file mode 100644 index 00000000..c555461b --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/CSS/DuplicateStyleDefinitionUnitTest.php @@ -0,0 +1,48 @@ + + * @copyright 2006-2015 Squiz Pty Ltd (ABN 77 084 670 600) + * @license https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence + */ + +namespace PHP_CodeSniffer\Standards\Squiz\Tests\CSS; + +use PHP_CodeSniffer\Tests\Standards\AbstractSniffUnitTest; + +class DuplicateStyleDefinitionUnitTest extends AbstractSniffUnitTest +{ + + + /** + * Returns the lines where errors should occur. + * + * The key of the array should represent the line number and the value + * should represent the number of errors that should occur on that line. + * + * @return array + */ + public function getErrorList() + { + return [7 => 1]; + + }//end getErrorList() + + + /** + * Returns the lines where warnings should occur. + * + * The key of the array should represent the line number and the value + * should represent the number of warnings that should occur on that line. + * + * @return array + */ + public function getWarningList() + { + return []; + + }//end getWarningList() + + +}//end class diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/CSS/EmptyClassDefinitionUnitTest.css b/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/CSS/EmptyClassDefinitionUnitTest.css new file mode 100644 index 00000000..801dcda1 --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/CSS/EmptyClassDefinitionUnitTest.css @@ -0,0 +1,15 @@ +.HelpWidgetType-new-bug-title {} +.HelpWidgetType-new-bug-title { +} +.HelpWidgetType-new-bug-title { + +} +.HelpWidgetType-new-bug-title { + +} +.HelpWidgetType-new-bug-title { + /* Nothing to see here */ +} +.HelpWidgetType-new-bug-title { + float: left; +} diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/CSS/EmptyClassDefinitionUnitTest.php b/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/CSS/EmptyClassDefinitionUnitTest.php new file mode 100644 index 00000000..b3fd318c --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/CSS/EmptyClassDefinitionUnitTest.php @@ -0,0 +1,54 @@ + + * @copyright 2006-2015 Squiz Pty Ltd (ABN 77 084 670 600) + * @license https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence + */ + +namespace PHP_CodeSniffer\Standards\Squiz\Tests\CSS; + +use PHP_CodeSniffer\Tests\Standards\AbstractSniffUnitTest; + +class EmptyClassDefinitionUnitTest extends AbstractSniffUnitTest +{ + + + /** + * Returns the lines where errors should occur. + * + * The key of the array should represent the line number and the value + * should represent the number of errors that should occur on that line. + * + * @return array + */ + public function getErrorList() + { + return [ + 1 => 1, + 2 => 1, + 4 => 1, + 7 => 1, + 10 => 1, + ]; + + }//end getErrorList() + + + /** + * Returns the lines where warnings should occur. + * + * The key of the array should represent the line number and the value + * should represent the number of warnings that should occur on that line. + * + * @return array + */ + public function getWarningList() + { + return []; + + }//end getWarningList() + + +}//end class diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/CSS/EmptyStyleDefinitionUnitTest.css b/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/CSS/EmptyStyleDefinitionUnitTest.css new file mode 100644 index 00000000..24910b71 --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/CSS/EmptyStyleDefinitionUnitTest.css @@ -0,0 +1,11 @@ +#MetadataAdminScreen-addField-fieldType { + margin-left: 10px; + margin-right: + float: ; +} + +#MetadataAdminScreen-addField-fieldType li { + margin-right: /* @todo */ + margin-left: 10px; + float: /* Some comment. */ ; +} diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/CSS/EmptyStyleDefinitionUnitTest.php b/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/CSS/EmptyStyleDefinitionUnitTest.php new file mode 100644 index 00000000..f5bc858d --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/CSS/EmptyStyleDefinitionUnitTest.php @@ -0,0 +1,53 @@ + + * @copyright 2006-2015 Squiz Pty Ltd (ABN 77 084 670 600) + * @license https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence + */ + +namespace PHP_CodeSniffer\Standards\Squiz\Tests\CSS; + +use PHP_CodeSniffer\Tests\Standards\AbstractSniffUnitTest; + +class EmptyStyleDefinitionUnitTest extends AbstractSniffUnitTest +{ + + + /** + * Returns the lines where errors should occur. + * + * The key of the array should represent the line number and the value + * should represent the number of errors that should occur on that line. + * + * @return array + */ + public function getErrorList() + { + return [ + 3 => 1, + 4 => 1, + 8 => 1, + 10 => 1, + ]; + + }//end getErrorList() + + + /** + * Returns the lines where warnings should occur. + * + * The key of the array should represent the line number and the value + * should represent the number of warnings that should occur on that line. + * + * @return array + */ + public function getWarningList() + { + return []; + + }//end getWarningList() + + +}//end class diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/CSS/ForbiddenStylesUnitTest.css b/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/CSS/ForbiddenStylesUnitTest.css new file mode 100644 index 00000000..dbd54870 --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/CSS/ForbiddenStylesUnitTest.css @@ -0,0 +1,18 @@ +#add-new-comment { + -moz-border-radius: 1px; + -webkit-border-radius: 1px; + border-radius: 1px; + + -moz-border-radius-topleft: 1px; + -moz-border-radius-topright: 1px; + -moz-border-radius-bottomright: 1px; + -moz-border-radius-bottomleft: 1px; + border-top-left-radius: 1px; + border-top-right-radius: 1px; + border-bottom-right-radius: 1px; + border-bottom-left-radius: 1px; + + -moz-box-shadow: 1px; + -webkit-box-shadow: 1px; + box-shadow: 1px; +} diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/CSS/ForbiddenStylesUnitTest.css.fixed b/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/CSS/ForbiddenStylesUnitTest.css.fixed new file mode 100644 index 00000000..a8ea2704 --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/CSS/ForbiddenStylesUnitTest.css.fixed @@ -0,0 +1,18 @@ +#add-new-comment { + border-radius: 1px; + border-radius: 1px; + border-radius: 1px; + + border-top-left-radius: 1px; + border-top-right-radius: 1px; + border-bottom-right-radius: 1px; + border-bottom-left-radius: 1px; + border-top-left-radius: 1px; + border-top-right-radius: 1px; + border-bottom-right-radius: 1px; + border-bottom-left-radius: 1px; + + box-shadow: 1px; + box-shadow: 1px; + box-shadow: 1px; +} diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/CSS/ForbiddenStylesUnitTest.php b/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/CSS/ForbiddenStylesUnitTest.php new file mode 100644 index 00000000..28aa8ec3 --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/CSS/ForbiddenStylesUnitTest.php @@ -0,0 +1,57 @@ + + * @copyright 2006-2015 Squiz Pty Ltd (ABN 77 084 670 600) + * @license https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence + */ + +namespace PHP_CodeSniffer\Standards\Squiz\Tests\CSS; + +use PHP_CodeSniffer\Tests\Standards\AbstractSniffUnitTest; + +class ForbiddenStylesUnitTest extends AbstractSniffUnitTest +{ + + + /** + * Returns the lines where errors should occur. + * + * The key of the array should represent the line number and the value + * should represent the number of errors that should occur on that line. + * + * @return array + */ + public function getErrorList() + { + return [ + 2 => 1, + 3 => 1, + 6 => 1, + 7 => 1, + 8 => 1, + 9 => 1, + 15 => 1, + 16 => 1, + ]; + + }//end getErrorList() + + + /** + * Returns the lines where warnings should occur. + * + * The key of the array should represent the line number and the value + * should represent the number of warnings that should occur on that line. + * + * @return array + */ + public function getWarningList() + { + return []; + + }//end getWarningList() + + +}//end class diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/CSS/IndentationUnitTest.1.css b/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/CSS/IndentationUnitTest.1.css new file mode 100644 index 00000000..216f00ee --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/CSS/IndentationUnitTest.1.css @@ -0,0 +1,79 @@ +body { + + font-family: Arial, Helvetica, sans-serif; + margin: 40px 0 0 0; +padding: 0; + background: #8FB7DB url(diag_lines_bg.gif) top left; + +} + +td { + margin: 40px; + + padding: 20px; +} + +/* +#AdminScreenModeWidgetType-tab_pane-containers .TabPaneWidgetType-tab-selected-left { + background: transparent url(images/ScreenImages/tab_on_left.png) no-repeat; +} +#AdminScreenModeWidgetType-tab_pane-containers .TabPaneWidgetType-tab-selected-right { + background: transparent url(images/ScreenImages/tab_on_right.png) no-repeat; +} +*/ + +.GUITextBox.container:after {} + +@media screen and (max-device-width: 769px) { + + header #logo img { + max-width: 100%; + padding: 20px; + margin: 40px; + } +} + +@media screen and (max-device-width: 769px) { + + header #logo img { + max-width: 100%; + } + + header #logo img { + min-width: 100%; + } + +} + +td { + margin: 40px; + + padding: 20px; + + +} + +.GUIFileUpload { +/* opacity: 0.25; */ +} + +.foo +{ + border: none; +} + +.mortgage-calculator h2 { + background: #072237; + color: #fff; + font-weight: normal; + height: 50px; + line-height: 50px; + padding: 0 0 0 30px; + } + +.WhitelistCommentIndentationShouldBeIgnored { +/* phpcs:disable Standard.Category.Sniff -- for reasons. */ +} + +/* syntax error */ +--------------------------------------------- */ diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/CSS/IndentationUnitTest.1.css.fixed b/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/CSS/IndentationUnitTest.1.css.fixed new file mode 100644 index 00000000..1fd128a5 --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/CSS/IndentationUnitTest.1.css.fixed @@ -0,0 +1,73 @@ +body { + font-family: Arial, Helvetica, sans-serif; + margin: 40px 0 0 0; + padding: 0; + background: #8FB7DB url(diag_lines_bg.gif) top left; +} + +td { + margin: 40px; + padding: 20px; +} + +/* +#AdminScreenModeWidgetType-tab_pane-containers .TabPaneWidgetType-tab-selected-left { + background: transparent url(images/ScreenImages/tab_on_left.png) no-repeat; +} +#AdminScreenModeWidgetType-tab_pane-containers .TabPaneWidgetType-tab-selected-right { + background: transparent url(images/ScreenImages/tab_on_right.png) no-repeat; +} +*/ + +.GUITextBox.container:after {} + +@media screen and (max-device-width: 769px) { + + header #logo img { + max-width: 100%; + padding: 20px; + margin: 40px; + } +} + +@media screen and (max-device-width: 769px) { + + header #logo img { + max-width: 100%; + } + + header #logo img { + min-width: 100%; + } + +} + +td { + margin: 40px; + padding: 20px; +} + +.GUIFileUpload { +/* opacity: 0.25; */ +} + +.foo +{ + border: none; +} + +.mortgage-calculator h2 { + background: #072237; + color: #fff; + font-weight: normal; + height: 50px; + line-height: 50px; + padding: 0 0 0 30px; +} + +.WhitelistCommentIndentationShouldBeIgnored { +/* phpcs:disable Standard.Category.Sniff -- for reasons. */ +} + +/* syntax error */ +--------------------------------------------- */ diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/CSS/IndentationUnitTest.2.css b/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/CSS/IndentationUnitTest.2.css new file mode 100644 index 00000000..48b22f6d --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/CSS/IndentationUnitTest.2.css @@ -0,0 +1,3 @@ +/* Live coding. Has to be the last (only) test in the file. */ +.intentional-parse-error { + float: left diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/CSS/IndentationUnitTest.php b/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/CSS/IndentationUnitTest.php new file mode 100644 index 00000000..9413b4ff --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/CSS/IndentationUnitTest.php @@ -0,0 +1,75 @@ + + * @copyright 2006-2015 Squiz Pty Ltd (ABN 77 084 670 600) + * @license https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence + */ + +namespace PHP_CodeSniffer\Standards\Squiz\Tests\CSS; + +use PHP_CodeSniffer\Tests\Standards\AbstractSniffUnitTest; + +class IndentationUnitTest extends AbstractSniffUnitTest +{ + + + /** + * Returns the lines where errors should occur. + * + * The key of the array should represent the line number and the value + * should represent the number of errors that should occur on that line. + * + * @param string $testFile The name of the file being tested. + * + * @return array + */ + public function getErrorList($testFile='') + { + switch ($testFile) { + case 'IndentationUnitTest.1.css': + return [ + 2 => 1, + 3 => 1, + 5 => 1, + 6 => 1, + 7 => 1, + 12 => 1, + 30 => 1, + 32 => 1, + 50 => 1, + 52 => 1, + 53 => 1, + 66 => 1, + 67 => 1, + 68 => 1, + 69 => 1, + 70 => 1, + 71 => 1, + 72 => 1, + ]; + + default: + return []; + }//end switch + + }//end getErrorList() + + + /** + * Returns the lines where warnings should occur. + * + * The key of the array should represent the line number and the value + * should represent the number of warnings that should occur on that line. + * + * @return array + */ + public function getWarningList() + { + return []; + + }//end getWarningList() + + +}//end class diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/CSS/LowercaseStyleDefinitionUnitTest.css b/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/CSS/LowercaseStyleDefinitionUnitTest.css new file mode 100644 index 00000000..d0f2982f --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/CSS/LowercaseStyleDefinitionUnitTest.css @@ -0,0 +1,14 @@ +.SettingsTabPaneWidgetType-tab-mid { + font-family: Arial; + Font-Family: arial; + background-color: #DA9393; + BACKGROUND-IMAGE: URL(Warning_Close.png); +} + +@media screen and (max-device-width: 769px) { + + .SettingsTabPaneWidgetType-tab-mid { + Font-Family: arial; + filter: progid:DXImageTransform.Microsoft.gradient(GradientType=0, startColorstr=#2e62a8, endColorstr=#123363); + } +} diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/CSS/LowercaseStyleDefinitionUnitTest.php b/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/CSS/LowercaseStyleDefinitionUnitTest.php new file mode 100644 index 00000000..1a25aaac --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/CSS/LowercaseStyleDefinitionUnitTest.php @@ -0,0 +1,53 @@ + + * @copyright 2006-2015 Squiz Pty Ltd (ABN 77 084 670 600) + * @license https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence + */ + +namespace PHP_CodeSniffer\Standards\Squiz\Tests\CSS; + +use PHP_CodeSniffer\Tests\Standards\AbstractSniffUnitTest; + +class LowercaseStyleDefinitionUnitTest extends AbstractSniffUnitTest +{ + + + /** + * Returns the lines where errors should occur. + * + * The key of the array should represent the line number and the value + * should represent the number of errors that should occur on that line. + * + * @return array + */ + public function getErrorList() + { + return [ + 2 => 1, + 3 => 1, + 5 => 2, + 11 => 1, + ]; + + }//end getErrorList() + + + /** + * Returns the lines where warnings should occur. + * + * The key of the array should represent the line number and the value + * should represent the number of warnings that should occur on that line. + * + * @return array + */ + public function getWarningList() + { + return []; + + }//end getWarningList() + + +}//end class diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/CSS/MissingColonUnitTest.css b/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/CSS/MissingColonUnitTest.css new file mode 100644 index 00000000..6c947e5b --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/CSS/MissingColonUnitTest.css @@ -0,0 +1,21 @@ +.my-style { + margin-right 15px; + float: left; + margin-left 15px; + margin-top: 15px; + margin-bottom 15px; +} + +@media screen and (max-device-width: 769px) { + header #logo img { + max-width: 100%; + margin-bottom 15px; + } +} + +#foo { background-color: #FF0000; +} + +/* Live coding. Has to be the last test in the file. */ +.intentional-parse-error { + float diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/CSS/MissingColonUnitTest.php b/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/CSS/MissingColonUnitTest.php new file mode 100644 index 00000000..dc0809e2 --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/CSS/MissingColonUnitTest.php @@ -0,0 +1,53 @@ + + * @copyright 2006-2015 Squiz Pty Ltd (ABN 77 084 670 600) + * @license https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence + */ + +namespace PHP_CodeSniffer\Standards\Squiz\Tests\CSS; + +use PHP_CodeSniffer\Tests\Standards\AbstractSniffUnitTest; + +class MissingColonUnitTest extends AbstractSniffUnitTest +{ + + + /** + * Returns the lines where errors should occur. + * + * The key of the array should represent the line number and the value + * should represent the number of errors that should occur on that line. + * + * @return array + */ + public function getErrorList() + { + return [ + 2 => 1, + 4 => 1, + 6 => 1, + 12 => 1, + ]; + + }//end getErrorList() + + + /** + * Returns the lines where warnings should occur. + * + * The key of the array should represent the line number and the value + * should represent the number of warnings that should occur on that line. + * + * @return array + */ + public function getWarningList() + { + return []; + + }//end getWarningList() + + +}//end class diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/CSS/NamedColoursUnitTest.css b/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/CSS/NamedColoursUnitTest.css new file mode 100644 index 00000000..05637a60 --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/CSS/NamedColoursUnitTest.css @@ -0,0 +1,25 @@ +#red { + background-color: red; +} + +.red { + border-bottom: 1px dotted black; + border-top: 1px dotted gray; +} + +#red.yellow { + background: yellow url(diag_lines_bg.gif) top left; + text-shadow: 0 1px 0 white; +} + +.something--white { + border: 0; +} + +.something--------------white { + border: 0; +} + +.-white { + border: 0; +} diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/CSS/NamedColoursUnitTest.php b/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/CSS/NamedColoursUnitTest.php new file mode 100644 index 00000000..a8032fad --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/CSS/NamedColoursUnitTest.php @@ -0,0 +1,54 @@ + + * @copyright 2006-2015 Squiz Pty Ltd (ABN 77 084 670 600) + * @license https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence + */ + +namespace PHP_CodeSniffer\Standards\Squiz\Tests\CSS; + +use PHP_CodeSniffer\Tests\Standards\AbstractSniffUnitTest; + +class NamedColoursUnitTest extends AbstractSniffUnitTest +{ + + + /** + * Returns the lines where errors should occur. + * + * The key of the array should represent the line number and the value + * should represent the number of errors that should occur on that line. + * + * @return array + */ + public function getErrorList() + { + return [ + 2 => 1, + 6 => 1, + 7 => 1, + 11 => 1, + 12 => 1, + ]; + + }//end getErrorList() + + + /** + * Returns the lines where warnings should occur. + * + * The key of the array should represent the line number and the value + * should represent the number of warnings that should occur on that line. + * + * @return array + */ + public function getWarningList() + { + return []; + + }//end getWarningList() + + +}//end class diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/CSS/OpacityUnitTest.css b/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/CSS/OpacityUnitTest.css new file mode 100644 index 00000000..c656c78e --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/CSS/OpacityUnitTest.css @@ -0,0 +1,35 @@ +.my-style { + opacity: 0; + opacity: 0.0; + opacity: 1; + opacity: 1.0; + opacity: 1.5; + opacity: .5; + opacity: 0.5; + opacity: 2; + opacity: -1; + opacity: 0.55; +} + +div { + font-size: 1.2em; + background: linear-gradient(to bottom, #00F, #0F0) repeat scroll 50% 50% #EEE; + min-width: 250px; + max-width: 100%; + padding-bottom: 50px; + box-shadow: 2px -3px 3px rgba(100, 100, 100, 0.33); + border-left: 1px solid #000; + border-right: 1px solid #000; + border-top: 1px solid #000; + border-bottom: 1px dotted #000; + background: url(../1/2/3/4-5-6_7_100x100.png) repeat scroll 50% 50% #EEE; + opacity: -1; +} + +.my-commented-style { + opacity: /*comment*/ 0; + opacity: /* phpcs:ignore Standard.Cat.Sniff -- for reasons */ + 0.0; + opacity: /*comment*/ 1.0; + opacity: /*comment*/ .5; +} diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/CSS/OpacityUnitTest.css.fixed b/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/CSS/OpacityUnitTest.css.fixed new file mode 100644 index 00000000..257e41a7 --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/CSS/OpacityUnitTest.css.fixed @@ -0,0 +1,35 @@ +.my-style { + opacity: 0; + opacity: 0; + opacity: 1; + opacity: 1; + opacity: 1.5; + opacity: 0.5; + opacity: 0.5; + opacity: 2; + opacity: -1; + opacity: 0.55; +} + +div { + font-size: 1.2em; + background: linear-gradient(to bottom, #00F, #0F0) repeat scroll 50% 50% #EEE; + min-width: 250px; + max-width: 100%; + padding-bottom: 50px; + box-shadow: 2px -3px 3px rgba(100, 100, 100, 0.33); + border-left: 1px solid #000; + border-right: 1px solid #000; + border-top: 1px solid #000; + border-bottom: 1px dotted #000; + background: url(../1/2/3/4-5-6_7_100x100.png) repeat scroll 50% 50% #EEE; + opacity: -1; +} + +.my-commented-style { + opacity: /*comment*/ 0; + opacity: /* phpcs:ignore Standard.Cat.Sniff -- for reasons */ + 0; + opacity: /*comment*/ 1; + opacity: /*comment*/ 0.5; +} diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/CSS/OpacityUnitTest.php b/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/CSS/OpacityUnitTest.php new file mode 100644 index 00000000..9fe839da --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/CSS/OpacityUnitTest.php @@ -0,0 +1,60 @@ + + * @copyright 2006-2015 Squiz Pty Ltd (ABN 77 084 670 600) + * @license https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence + */ + +namespace PHP_CodeSniffer\Standards\Squiz\Tests\CSS; + +use PHP_CodeSniffer\Tests\Standards\AbstractSniffUnitTest; + +class OpacityUnitTest extends AbstractSniffUnitTest +{ + + + /** + * Returns the lines where errors should occur. + * + * The key of the array should represent the line number and the value + * should represent the number of errors that should occur on that line. + * + * @return array + */ + public function getErrorList() + { + return [ + 3 => 1, + 5 => 1, + 6 => 1, + 7 => 1, + 9 => 1, + 10 => 1, + 11 => 1, + 26 => 1, + 32 => 1, + 33 => 1, + 34 => 1, + ]; + + }//end getErrorList() + + + /** + * Returns the lines where warnings should occur. + * + * The key of the array should represent the line number and the value + * should represent the number of warnings that should occur on that line. + * + * @return array + */ + public function getWarningList() + { + return []; + + }//end getWarningList() + + +}//end class diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/CSS/SemicolonSpacingUnitTest.css b/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/CSS/SemicolonSpacingUnitTest.css new file mode 100644 index 00000000..3ccb162e --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/CSS/SemicolonSpacingUnitTest.css @@ -0,0 +1,61 @@ +.HelpWidgetType-new-bug-title { + width: 308px + float: left; +} + +#MetadataAdminScreen-addField-add { + float: left ; +} + +.TableWidgetType .recover:hover { + background-color: #FFF; +} + +#clearCache-settings:rootNodes-list_0 { + border-top: none; +} + +.HelpWidgetType-list { + list-style-image: url(); +} + +@media (min-width: 320px) and (max-width: 961px) { + .tooltipsrt:hover span.tltp, + .tooltipstp:hover span.tltp { + visibility: hidden; + } +} + +#single-line-multi-statement-no-semicolon { + padding: 0 border: 20; +} + +#multi-line-style-no-semicolon { + padding: 0 /* phpcs:ignore Standard.Cat.Sniff -- for reasons */ + border: + 20 + margin: + 0px /* top */ + 10px /* right + left */ +} + +#multi-line-style-whitespace { + padding: 0 /* phpcs:ignore Standard.Cat.Sniff -- for reasons */ ; + border: + 20 ; + margin: + 10px /* top */ + 0px /* right + left */ + + + ; +} + +.allow-for-star-hack { + cursor: pointer; + *cursor: hand; +} + +/* Live coding. Has to be the last test in the file. */ +.intentional-parse-error { + float: left diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/CSS/SemicolonSpacingUnitTest.css.fixed b/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/CSS/SemicolonSpacingUnitTest.css.fixed new file mode 100644 index 00000000..7efef588 --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/CSS/SemicolonSpacingUnitTest.css.fixed @@ -0,0 +1,58 @@ +.HelpWidgetType-new-bug-title { + width: 308px + float: left; +} + +#MetadataAdminScreen-addField-add { + float: left; +} + +.TableWidgetType .recover:hover { + background-color: #FFF; +} + +#clearCache-settings:rootNodes-list_0 { + border-top: none; +} + +.HelpWidgetType-list { + list-style-image: url(); +} + +@media (min-width: 320px) and (max-width: 961px) { + .tooltipsrt:hover span.tltp, + .tooltipstp:hover span.tltp { + visibility: hidden; + } +} + +#single-line-multi-statement-no-semicolon { + padding: 0 border: 20; +} + +#multi-line-style-no-semicolon { + padding: 0 /* phpcs:ignore Standard.Cat.Sniff -- for reasons */ + border: + 20 + margin: + 0px /* top */ + 10px /* right + left */ +} + +#multi-line-style-whitespace { + padding: 0; /* phpcs:ignore Standard.Cat.Sniff -- for reasons */ + border: + 20; + margin: + 10px /* top */ + 0px; /* right + left */ +} + +.allow-for-star-hack { + cursor: pointer; + *cursor: hand; +} + +/* Live coding. Has to be the last test in the file. */ +.intentional-parse-error { + float: left diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/CSS/SemicolonSpacingUnitTest.php b/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/CSS/SemicolonSpacingUnitTest.php new file mode 100644 index 00000000..897df65e --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/CSS/SemicolonSpacingUnitTest.php @@ -0,0 +1,58 @@ + + * @copyright 2006-2015 Squiz Pty Ltd (ABN 77 084 670 600) + * @license https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence + */ + +namespace PHP_CodeSniffer\Standards\Squiz\Tests\CSS; + +use PHP_CodeSniffer\Tests\Standards\AbstractSniffUnitTest; + +class SemicolonSpacingUnitTest extends AbstractSniffUnitTest +{ + + + /** + * Returns the lines where errors should occur. + * + * The key of the array should represent the line number and the value + * should represent the number of errors that should occur on that line. + * + * @return array + */ + public function getErrorList() + { + return [ + 2 => 1, + 7 => 1, + 30 => 1, + 34 => 1, + 36 => 1, + 39 => 1, + 43 => 1, + 45 => 1, + 48 => 1, + ]; + + }//end getErrorList() + + + /** + * Returns the lines where warnings should occur. + * + * The key of the array should represent the line number and the value + * should represent the number of warnings that should occur on that line. + * + * @return array + */ + public function getWarningList() + { + return []; + + }//end getWarningList() + + +}//end class diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/CSS/ShorthandSizeUnitTest.css b/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/CSS/ShorthandSizeUnitTest.css new file mode 100644 index 00000000..cfc4503c --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/CSS/ShorthandSizeUnitTest.css @@ -0,0 +1,45 @@ +#add-new-comment { + background-color: #333333; + padding: 10px; + border-bottom: 1px dotted #F0F0F0; + border-top: 1px dotted #FF00FF; + background: #8fb7db url(diag_lines_bg.gif) top left; + tab-size: 1; + margin: 8px 8px 8px 8px; + margin: 8px 8px; + margin: 0 0 0 0; + margin: 0 8px 0 8px; + margin: 8px 4px 8px 4px; + margin: 8px 4% 8px 4%; + margin: 6px 2px 9px 2px; + margin: 6px 2px 9px; + border-radius: 2px 2px 2px 2px !important; + border-width: 2px 2px 2px 2px; + border-width: 1px 2px 2px 4px; + margin: 97px auto 0 auto; + text-shadow: 0 1px 0 #fff; + border-width: + 2px + 4px + 2px + 4px; + + /* These are style names excluded from this rule. */ + background-position: 0 0; + box-shadow: 2px 2px 2px 2px; + transform-origin: 0 110% 0; + + /* Sizes with comments between them will be ignored for the purposes of this sniff. */ + margin: 8px /*top*/ 8px /*right*/ 8px /*bottom*/ 8px /*left*/; + + /* Same with PHPCS annotations. */ + border-width: + 2px /* phpcs:ignore Standard.Category.SniffName -- for reasons */ + 4px + 2px /* phpcs:disable Standard.Category.SniffName -- for reasons */ + 4px; +} + +/* Intentional parse error. Live coding resilience. This has to be the last test in the file. */ +#live-coding { + margin: 8px 8px 8px 8px diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/CSS/ShorthandSizeUnitTest.css.fixed b/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/CSS/ShorthandSizeUnitTest.css.fixed new file mode 100644 index 00000000..3472cb17 --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/CSS/ShorthandSizeUnitTest.css.fixed @@ -0,0 +1,41 @@ +#add-new-comment { + background-color: #333333; + padding: 10px; + border-bottom: 1px dotted #F0F0F0; + border-top: 1px dotted #FF00FF; + background: #8fb7db url(diag_lines_bg.gif) top left; + tab-size: 1; + margin: 8px; + margin: 8px; + margin: 0; + margin: 0 8px; + margin: 8px 4px; + margin: 8px 4%; + margin: 6px 2px 9px 2px; + margin: 6px 2px 9px 2px; + border-radius: 2px !important; + border-width: 2px; + border-width: 1px 2px 2px 4px; + margin: 97px auto 0 auto; + text-shadow: 0 1px 0 #fff; + border-width: 2px 4px; + + /* These are style names excluded from this rule. */ + background-position: 0 0; + box-shadow: 2px 2px 2px 2px; + transform-origin: 0 110% 0; + + /* Sizes with comments between them will be ignored for the purposes of this sniff. */ + margin: 8px /*top*/ 8px /*right*/ 8px /*bottom*/ 8px /*left*/; + + /* Same with PHPCS annotations. */ + border-width: + 2px /* phpcs:ignore Standard.Category.SniffName -- for reasons */ + 4px + 2px /* phpcs:disable Standard.Category.SniffName -- for reasons */ + 4px; +} + +/* Intentional parse error. Live coding resilience. This has to be the last test in the file. */ +#live-coding { + margin: 8px 8px 8px 8px diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/CSS/ShorthandSizeUnitTest.php b/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/CSS/ShorthandSizeUnitTest.php new file mode 100644 index 00000000..3d0baaad --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/CSS/ShorthandSizeUnitTest.php @@ -0,0 +1,59 @@ + + * @copyright 2006-2015 Squiz Pty Ltd (ABN 77 084 670 600) + * @license https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence + */ + +namespace PHP_CodeSniffer\Standards\Squiz\Tests\CSS; + +use PHP_CodeSniffer\Tests\Standards\AbstractSniffUnitTest; + +class ShorthandSizeUnitTest extends AbstractSniffUnitTest +{ + + + /** + * Returns the lines where errors should occur. + * + * The key of the array should represent the line number and the value + * should represent the number of errors that should occur on that line. + * + * @return array + */ + public function getErrorList() + { + return [ + 8 => 1, + 9 => 1, + 10 => 1, + 11 => 1, + 12 => 1, + 13 => 1, + 15 => 1, + 16 => 1, + 17 => 1, + 21 => 1, + ]; + + }//end getErrorList() + + + /** + * Returns the lines where warnings should occur. + * + * The key of the array should represent the line number and the value + * should represent the number of warnings that should occur on that line. + * + * @return array + */ + public function getWarningList() + { + return []; + + }//end getWarningList() + + +}//end class diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/Classes/ClassDeclarationUnitTest.inc b/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/Classes/ClassDeclarationUnitTest.inc new file mode 100644 index 00000000..43ef6c9c --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/Classes/ClassDeclarationUnitTest.inc @@ -0,0 +1,121 @@ + + + + + + * @copyright 2006-2015 Squiz Pty Ltd (ABN 77 084 670 600) + * @license https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence + */ + +namespace PHP_CodeSniffer\Standards\Squiz\Tests\Classes; + +use PHP_CodeSniffer\Tests\Standards\AbstractSniffUnitTest; + +class ClassDeclarationUnitTest extends AbstractSniffUnitTest +{ + + + /** + * Returns the lines where errors should occur. + * + * The key of the array should represent the line number and the value + * should represent the number of errors that should occur on that line. + * + * @return array + */ + public function getErrorList() + { + return [ + 5 => 1, + 6 => 1, + 10 => 1, + 15 => 2, + 18 => 1, + 22 => 4, + 23 => 4, + 24 => 4, + 27 => 2, + 30 => 2, + 34 => 1, + 35 => 1, + 39 => 1, + 42 => 1, + 45 => 1, + 48 => 1, + 50 => 2, + 51 => 1, + 55 => 1, + 59 => 4, + 63 => 1, + 65 => 1, + 69 => 3, + 74 => 2, + 77 => 1, + 80 => 1, + 85 => 3, + 89 => 1, + 92 => 1, + 97 => 1, + 108 => 1, + 114 => 1, + 116 => 1, + 118 => 1, + 121 => 1, + ]; + + }//end getErrorList() + + + /** + * Returns the lines where warnings should occur. + * + * The key of the array should represent the line number and the value + * should represent the number of warnings that should occur on that line. + * + * @return array + */ + public function getWarningList() + { + return []; + + }//end getWarningList() + + +}//end class diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/Classes/ClassFileNameUnitTest.inc b/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/Classes/ClassFileNameUnitTest.inc new file mode 100644 index 00000000..a346a00f --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/Classes/ClassFileNameUnitTest.inc @@ -0,0 +1,37 @@ + \ No newline at end of file diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/Classes/ClassFileNameUnitTest.php b/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/Classes/ClassFileNameUnitTest.php new file mode 100644 index 00000000..b229a2fc --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/Classes/ClassFileNameUnitTest.php @@ -0,0 +1,70 @@ + + * @copyright 2006-2015 Squiz Pty Ltd (ABN 77 084 670 600) + * @license https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence + */ + +namespace PHP_CodeSniffer\Standards\Squiz\Tests\Classes; + +use PHP_CodeSniffer\Tests\Standards\AbstractSniffUnitTest; + +class ClassFileNameUnitTest extends AbstractSniffUnitTest +{ + + + /** + * Returns the lines where errors should occur. + * + * The key of the array should represent the line number and the value + * should represent the number of errors that should occur on that line. + * + * @return array + */ + public function getErrorList() + { + return [ + 11 => 1, + 12 => 1, + 13 => 1, + 14 => 1, + 15 => 1, + 16 => 1, + 17 => 1, + 18 => 1, + 19 => 1, + 23 => 1, + 24 => 1, + 25 => 1, + 26 => 1, + 27 => 1, + 28 => 1, + 29 => 1, + 30 => 1, + 31 => 1, + 32 => 1, + 33 => 1, + 34 => 1, + ]; + + }//end getErrorList() + + + /** + * Returns the lines where warnings should occur. + * + * The key of the array should represent the line number and the value + * should represent the number of warnings that should occur on that line. + * + * @return array + */ + public function getWarningList() + { + return []; + + }//end getWarningList() + + +}//end class diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/Classes/DuplicatePropertyUnitTest.js b/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/Classes/DuplicatePropertyUnitTest.js new file mode 100644 index 00000000..04126f86 --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/Classes/DuplicatePropertyUnitTest.js @@ -0,0 +1,45 @@ +var x = { + abc: 1, + zyz: 2, + abc: 5, + mno: { + abc: 4 + }, + abc: 5 + + this.request({ + action: 'getSubmissions' + }); + + this.request({ + action: 'deleteSubmission' + }); +} + + +LinkingEditScreenWidgetType.prototype = { + + _addDeleteButtonEvent: function(parentid) + { + var params = { + screen: 'LinkingEditScreenWidget', + assetid: self.assetid, + parentid: parentid, + assetid: parentid, + op: 'deleteLink' + }; + + }, + + saveDesignEdit: function() + { + var params = { + screen: [this.id, 'Widget'].join(''), + assetid: this.assetid, + changes: dfx.jsonEncode(this.currnetLinksWdgt.getChanges()), + op: 'saveLinkEdit' + }; + + } + +}; \ No newline at end of file diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/Classes/DuplicatePropertyUnitTest.php b/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/Classes/DuplicatePropertyUnitTest.php new file mode 100644 index 00000000..1b71eb2c --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/Classes/DuplicatePropertyUnitTest.php @@ -0,0 +1,52 @@ + + * @copyright 2006-2015 Squiz Pty Ltd (ABN 77 084 670 600) + * @license https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence + */ + +namespace PHP_CodeSniffer\Standards\Squiz\Tests\Classes; + +use PHP_CodeSniffer\Tests\Standards\AbstractSniffUnitTest; + +class DuplicatePropertyUnitTest extends AbstractSniffUnitTest +{ + + + /** + * Returns the lines where errors should occur. + * + * The key of the array should represent the line number and the value + * should represent the number of errors that should occur on that line. + * + * @return array + */ + public function getErrorList() + { + return [ + 4 => 1, + 8 => 1, + 28 => 1, + ]; + + }//end getErrorList() + + + /** + * Returns the lines where warnings should occur. + * + * The key of the array should represent the line number and the value + * should represent the number of warnings that should occur on that line. + * + * @return array + */ + public function getWarningList() + { + return []; + + }//end getWarningList() + + +}//end class diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/Classes/LowercaseClassKeywordsUnitTest.inc b/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/Classes/LowercaseClassKeywordsUnitTest.inc new file mode 100644 index 00000000..511bbe47 --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/Classes/LowercaseClassKeywordsUnitTest.inc @@ -0,0 +1,13 @@ + + * @copyright 2006-2015 Squiz Pty Ltd (ABN 77 084 670 600) + * @license https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence + */ + +namespace PHP_CodeSniffer\Standards\Squiz\Tests\Classes; + +use PHP_CodeSniffer\Tests\Standards\AbstractSniffUnitTest; + +class LowercaseClassKeywordsUnitTest extends AbstractSniffUnitTest +{ + + + /** + * Returns the lines where errors should occur. + * + * The key of the array should represent the line number and the value + * should represent the number of errors that should occur on that line. + * + * @return array + */ + public function getErrorList() + { + $errors = [ + 2 => 3, + 3 => 3, + 4 => 1, + 5 => 1, + 9 => 1, + 10 => 1, + 13 => 1, + ]; + + return $errors; + + }//end getErrorList() + + + /** + * Returns the lines where warnings should occur. + * + * The key of the array should represent the line number and the value + * should represent the number of warnings that should occur on that line. + * + * @return array + */ + public function getWarningList() + { + return []; + + }//end getWarningList() + + +}//end class diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/Classes/SelfMemberReferenceUnitTest.inc b/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/Classes/SelfMemberReferenceUnitTest.inc new file mode 100644 index 00000000..0a0729a0 --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/Classes/SelfMemberReferenceUnitTest.inc @@ -0,0 +1,174 @@ +testResults; + + + // Correct call to self. + $testResults[] = self::selfMemberReferenceUnitTestFunction(); + $testResults[] = parent::selfMemberReferenceUnitTestFunction(); + + // Incorrect case. + $testResults[] = Self::selfMemberReferenceUnitTestFunction(); + $testResults[] = SELF::selfMemberReferenceUnitTestFunction(); + $testResults[] = SelfMemberReferenceUnitTestExample::selfMemberReferenceUnitTestFunction(); + + + // Incorrect spacing. + $testResults[] = self ::selfMemberReferenceUnitTestFunction(); + $testResults[] = self:: selfMemberReferenceUnitTestFunction(); + $testResults[] = self :: selfMemberReferenceUnitTestFunction(); + + // Remove ALL the newlines + $testResults[] = self + + + + + :: + + + + + selfMemberReferenceUnitTestFunction(); + + } + + + function selfMemberReferenceUnitTestFunction() + { + $this->testCount = $this->testCount + 1; + return $this->testCount; + + } + + +} + + +class MyClass { + + public static function test($value) { + echo "$value\n"; + } + + public static function walk() { + $callback = function($value, $key) { + // This is valid because you can't use self:: in a closure. + MyClass::test($value); + }; + + $array = array(1,2,3); + array_walk($array, $callback); + } +} + +MyClass::walk(); + +class Controller +{ + public function Action() + { + Doctrine\Common\Util\Debug::dump(); + } +} + +class Foo +{ + public static function bar() + { + \Foo::baz(); + } +} + +namespace TYPO3\CMS\Reports; + +class Status { + const NOTICE = -2; + const INFO = -1; + const OK = 0; + const WARNING = 1; + const ERROR = 2; +} + +namespace TYPO3\CMS\Reports\Report\Status; + +class Status implements \TYPO3\CMS\Reports\ReportInterface { + public function getHighestSeverity(array $statusCollection) { + $highestSeverity = \TYPO3\CMS\Reports\Status::NOTICE; + } +} + +namespace Foo; + +class Bar { + + function myFunction() + { + \Foo\Whatever::something(); + \Foo\Bar::something(); + } +} + +namespace Foo\Bar; + +class Baz { + + function myFunction() + { + \Foo\Bar\Whatever::something(); + \Foo\Bar\Baz::something(); + } +} + +class Nested_Anon_Class { + public function getAnonymousClass() { + // Spacing/comments should not cause false negatives for the NotUsed error. + Nested_Anon_Class :: $prop; + Nested_Anon_Class + /* some comment */ + + :: + + // phpcs:ignore Standard.Category.SniffName -- for reasons. + Bar(); + + // Anonymous class is a different scope. + return new class() { + public function nested_function() { + Nested_Anon_Class::$prop; + Nested_Anon_Class::BAR; + } + }; + } +} + +// Test dealing with scoped namespaces. +namespace Foo\Baz { + class BarFoo { + public function foo() { + echo Foo\Baz\BarFoo::$prop; + } + } +} + +// Prevent false negative when namespace has whitespace/comments. +namespace Foo /*comment*/ \ Bah { + class BarFoo { + public function foo() { + echo Foo \ /*comment*/ Bah\BarFoo::$prop; + } + } +} diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/Classes/SelfMemberReferenceUnitTest.inc.fixed b/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/Classes/SelfMemberReferenceUnitTest.inc.fixed new file mode 100644 index 00000000..f2c1731d --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/Classes/SelfMemberReferenceUnitTest.inc.fixed @@ -0,0 +1,162 @@ +testResults; + + + // Correct call to self. + $testResults[] = self::selfMemberReferenceUnitTestFunction(); + $testResults[] = parent::selfMemberReferenceUnitTestFunction(); + + // Incorrect case. + $testResults[] = self::selfMemberReferenceUnitTestFunction(); + $testResults[] = self::selfMemberReferenceUnitTestFunction(); + $testResults[] = self::selfMemberReferenceUnitTestFunction(); + + + // Incorrect spacing. + $testResults[] = self::selfMemberReferenceUnitTestFunction(); + $testResults[] = self::selfMemberReferenceUnitTestFunction(); + $testResults[] = self::selfMemberReferenceUnitTestFunction(); + + // Remove ALL the newlines + $testResults[] = self::selfMemberReferenceUnitTestFunction(); + + } + + + function selfMemberReferenceUnitTestFunction() + { + $this->testCount = $this->testCount + 1; + return $this->testCount; + + } + + +} + + +class MyClass { + + public static function test($value) { + echo "$value\n"; + } + + public static function walk() { + $callback = function($value, $key) { + // This is valid because you can't use self:: in a closure. + MyClass::test($value); + }; + + $array = array(1,2,3); + array_walk($array, $callback); + } +} + +MyClass::walk(); + +class Controller +{ + public function Action() + { + Doctrine\Common\Util\Debug::dump(); + } +} + +class Foo +{ + public static function bar() + { + self::baz(); + } +} + +namespace TYPO3\CMS\Reports; + +class Status { + const NOTICE = -2; + const INFO = -1; + const OK = 0; + const WARNING = 1; + const ERROR = 2; +} + +namespace TYPO3\CMS\Reports\Report\Status; + +class Status implements \TYPO3\CMS\Reports\ReportInterface { + public function getHighestSeverity(array $statusCollection) { + $highestSeverity = \TYPO3\CMS\Reports\Status::NOTICE; + } +} + +namespace Foo; + +class Bar { + + function myFunction() + { + \Foo\Whatever::something(); + self::something(); + } +} + +namespace Foo\Bar; + +class Baz { + + function myFunction() + { + \Foo\Bar\Whatever::something(); + self::something(); + } +} + +class Nested_Anon_Class { + public function getAnonymousClass() { + // Spacing/comments should not cause false negatives for the NotUsed error. + self::$prop; + + /* some comment */ + + self::// phpcs:ignore Standard.Category.SniffName -- for reasons. + Bar(); + + // Anonymous class is a different scope. + return new class() { + public function nested_function() { + Nested_Anon_Class::$prop; + Nested_Anon_Class::BAR; + } + }; + } +} + +// Test dealing with scoped namespaces. +namespace Foo\Baz { + class BarFoo { + public function foo() { + echo self::$prop; + } + } +} + +// Prevent false negative when namespace has whitespace/comments. +namespace Foo /*comment*/ \ Bah { + class BarFoo { + public function foo() { + echo /*comment*/ self::$prop; + } + } +} diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/Classes/SelfMemberReferenceUnitTest.php b/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/Classes/SelfMemberReferenceUnitTest.php new file mode 100644 index 00000000..ea493d3c --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/Classes/SelfMemberReferenceUnitTest.php @@ -0,0 +1,64 @@ + + * @copyright 2006-2015 Squiz Pty Ltd (ABN 77 084 670 600) + * @license https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence + */ + +namespace PHP_CodeSniffer\Standards\Squiz\Tests\Classes; + +use PHP_CodeSniffer\Tests\Standards\AbstractSniffUnitTest; + +class SelfMemberReferenceUnitTest extends AbstractSniffUnitTest +{ + + + /** + * Returns the lines where errors should occur. + * + * The key of the array should represent the line number and the value + * should represent the number of errors that should occur on that line. + * + * @return array + */ + public function getErrorList() + { + return [ + 24 => 1, + 25 => 1, + 26 => 1, + 30 => 1, + 31 => 1, + 32 => 2, + 40 => 2, + 92 => 1, + 121 => 1, + 132 => 1, + 139 => 3, + 140 => 1, + 143 => 2, + 162 => 1, + 171 => 1, + ]; + + }//end getErrorList() + + + /** + * Returns the lines where warnings should occur. + * + * The key of the array should represent the line number and the value + * should represent the number of warnings that should occur on that line. + * + * @return array + */ + public function getWarningList() + { + return []; + + }//end getWarningList() + + +}//end class diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/Classes/ValidClassNameUnitTest.inc b/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/Classes/ValidClassNameUnitTest.inc new file mode 100644 index 00000000..aadbab5b --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/Classes/ValidClassNameUnitTest.inc @@ -0,0 +1,147 @@ +anonymous = new class extends ArrayObject + { + public function __construct() + { + parent::__construct(['a' => 1, 'b' => 2]); + } + }; + } +} + +// Valid interface name. +interface ValidCamelCaseClass extends MyClass {} + + +// Incorrect usage of camel case. +interface invalidCamelCaseClass extends MyClass {} +interface Invalid_Camel_Case_Class_With_Underscores implements MyClass {} + + +// All lowercase. +interface invalidlowercaseclass extends MyClass {} +interface invalid_lowercase_class_with_underscores extends MyClass {} + + +// All uppercase. +interface VALIDUPPERCASECLASS extends MyClass {} +interface INVALID_UPPERCASE_CLASS_WITH_UNDERSCORES extends MyClass {} + + +// Mix camel case with uppercase. +interface ValidCamelCaseClassWithUPPERCASE extends MyClass {} + + +// Usage of numeric characters. +interface ValidCamelCaseClassWith1Number extends MyClass {} +interface ValidCamelCaseClassWith12345Numbers extends MyClass {} +interface 5InvalidCamelCaseClassStartingWithNumber extends MyClass {} +interface ValidCamelCaseClassEndingWithNumber5 extends MyClass {} +interface 12345 extends MyClass {} + +interface Testing{} + +interface Base +{ + protected $anonymous; + + public function __construct(); +} + + +// Valid trait name. +trait ValidCamelCaseClass extends MyClass {} + + +// Incorrect usage of camel case. +trait invalidCamelCaseClass extends MyClass {} +trait Invalid_Camel_Case_Class_With_Underscores implements MyClass {} + + +// All lowercase. +trait invalidlowercaseclass extends MyClass {} +trait invalid_lowercase_class_with_underscores extends MyClass {} + + +// All uppercase. +trait VALIDUPPERCASECLASS extends MyClass {} +trait INVALID_UPPERCASE_CLASS_WITH_UNDERSCORES extends MyClass {} + + +// Mix camel case with uppercase. +trait ValidCamelCaseClassWithUPPERCASE extends MyClass {} + + +// Usage of numeric characters. +trait ValidCamelCaseClassWith1Number extends MyClass {} +trait ValidCamelCaseClassWith12345Numbers extends MyClass {} +trait 5InvalidCamelCaseClassStartingWithNumber extends MyClass {} +trait ValidCamelCaseClassEndingWithNumber5 extends MyClass {} +trait 12345 extends MyClass {} + +trait Testing{} + +trait Base +{ + protected $anonymous; + + public function __construct() + { + $this->anonymous = new class extends ArrayObject + { + public function __construct() + { + parent::__construct(['a' => 1, 'b' => 2]); + } + }; + } +} + +if ( class_exists( Test :: class ) ) {} +if ( class_exists( Test2 ::class ) ) {} + +$foo = new class( + new class implements Countable { + } +) extends DateTime { +}; diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/Classes/ValidClassNameUnitTest.php b/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/Classes/ValidClassNameUnitTest.php new file mode 100644 index 00000000..70777c54 --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/Classes/ValidClassNameUnitTest.php @@ -0,0 +1,70 @@ + + * @copyright 2006-2015 Squiz Pty Ltd (ABN 77 084 670 600) + * @license https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence + */ + +namespace PHP_CodeSniffer\Standards\Squiz\Tests\Classes; + +use PHP_CodeSniffer\Tests\Standards\AbstractSniffUnitTest; + +class ValidClassNameUnitTest extends AbstractSniffUnitTest +{ + + + /** + * Returns the lines where errors should occur. + * + * The key of the array should represent the line number and the value + * should represent the number of errors that should occur on that line. + * + * @return array + */ + public function getErrorList() + { + return [ + 9 => 1, + 10 => 1, + 14 => 1, + 15 => 1, + 20 => 1, + 30 => 1, + 32 => 1, + 57 => 1, + 58 => 1, + 62 => 1, + 63 => 1, + 68 => 1, + 78 => 1, + 80 => 1, + 97 => 1, + 98 => 1, + 102 => 1, + 103 => 1, + 108 => 1, + 118 => 1, + 120 => 1, + ]; + + }//end getErrorList() + + + /** + * Returns the lines where warnings should occur. + * + * The key of the array should represent the line number and the value + * should represent the number of warnings that should occur on that line. + * + * @return array + */ + public function getWarningList() + { + return []; + + }//end getWarningList() + + +}//end class diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/Commenting/BlockCommentUnitTest.inc b/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/Commenting/BlockCommentUnitTest.inc new file mode 100644 index 00000000..eed554b3 --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/Commenting/BlockCommentUnitTest.inc @@ -0,0 +1,290 @@ + + + + + + + + + + * @copyright 2006-2015 Squiz Pty Ltd (ABN 77 084 670 600) + * @license https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence + */ + +namespace PHP_CodeSniffer\Standards\Squiz\Tests\Commenting; + +use PHP_CodeSniffer\Tests\Standards\AbstractSniffUnitTest; + +class BlockCommentUnitTest extends AbstractSniffUnitTest +{ + + + /** + * Get a list of CLI values to set before the file is tested. + * + * @param string $testFile The name of the file being tested. + * @param \PHP_CodeSniffer\Config $config The config data for the test run. + * + * @return void + */ + public function setCliValues($testFile, $config) + { + $config->tabWidth = 4; + + }//end setCliValues() + + + /** + * Returns the lines where errors should occur. + * + * The key of the array should represent the line number and the value + * should represent the number of errors that should occur on that line. + * + * @return array + */ + public function getErrorList() + { + $errors = [ + 3 => 1, + 8 => 1, + 20 => 1, + 24 => 1, + 30 => 1, + 31 => 1, + 34 => 1, + 40 => 1, + 45 => 1, + 49 => 1, + 51 => 1, + 53 => 1, + 57 => 1, + 60 => 1, + 61 => 1, + 63 => 1, + 65 => 1, + 68 => 1, + 70 => 1, + 72 => 1, + 75 => 1, + 84 => 1, + 87 => 1, + 89 => 1, + 92 => 1, + 111 => 1, + 159 => 1, + 181 => 1, + 188 => 1, + 208 => 1, + 214 => 1, + 226 => 1, + 227 => 1, + 232 => 1, + 233 => 1, + 256 => 1, + 271 => 1, + 273 => 1, + ]; + + return $errors; + + }//end getErrorList() + + + /** + * Returns the lines where warnings should occur. + * + * The key of the array should represent the line number and the value + * should represent the number of warnings that should occur on that line. + * + * @return array + */ + public function getWarningList() + { + return []; + + }//end getWarningList() + + +}//end class diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/Commenting/ClassCommentUnitTest.inc b/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/Commenting/ClassCommentUnitTest.inc new file mode 100644 index 00000000..28aff226 --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/Commenting/ClassCommentUnitTest.inc @@ -0,0 +1,133 @@ + + * @copyright 2006-2015 Squiz Pty Ltd (ABN 77 084 670 600) + * @license https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence + */ + +namespace PHP_CodeSniffer\Standards\Squiz\Tests\Commenting; + +use PHP_CodeSniffer\Tests\Standards\AbstractSniffUnitTest; + +class ClassCommentUnitTest extends AbstractSniffUnitTest +{ + + + /** + * Returns the lines where errors should occur. + * + * The key of the array should represent the line number and the value + * should represent the number of errors that should occur on that line. + * + * @return array + */ + public function getErrorList() + { + return [ + 2 => 1, + 15 => 1, + 31 => 1, + 54 => 1, + ]; + + }//end getErrorList() + + + /** + * Returns the lines where warnings should occur. + * + * The key of the array should represent the line number and the value + * should represent the number of warnings that should occur on that line. + * + * @return array + */ + public function getWarningList() + { + return [ + 29 => 1, + 30 => 1, + 50 => 1, + 66 => 1, + 67 => 1, + ]; + + }//end getWarningList() + + +}//end class diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/Commenting/ClosingDeclarationCommentUnitTest.inc b/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/Commenting/ClosingDeclarationCommentUnitTest.inc new file mode 100644 index 00000000..9c3255cf --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/Commenting/ClosingDeclarationCommentUnitTest.inc @@ -0,0 +1,82 @@ + \ No newline at end of file diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/Commenting/ClosingDeclarationCommentUnitTest.php b/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/Commenting/ClosingDeclarationCommentUnitTest.php new file mode 100644 index 00000000..cdc89ba6 --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/Commenting/ClosingDeclarationCommentUnitTest.php @@ -0,0 +1,57 @@ + + * @copyright 2006-2015 Squiz Pty Ltd (ABN 77 084 670 600) + * @license https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence + */ + +namespace PHP_CodeSniffer\Standards\Squiz\Tests\Commenting; + +use PHP_CodeSniffer\Tests\Standards\AbstractSniffUnitTest; + +class ClosingDeclarationCommentUnitTest extends AbstractSniffUnitTest +{ + + + /** + * Returns the lines where errors should occur. + * + * The key of the array should represent the line number and the value + * should represent the number of errors that should occur on that line. + * + * @return array + */ + public function getErrorList() + { + return [ + 13 => 1, + 17 => 1, + 31 => 1, + 41 => 1, + 59 => 1, + 63 => 1, + 67 => 1, + 79 => 1, + ]; + + }//end getErrorList() + + + /** + * Returns the lines where warnings should occur. + * + * The key of the array should represent the line number and the value + * should represent the number of warnings that should occur on that line. + * + * @return array + */ + public function getWarningList() + { + return [71 => 1]; + + }//end getWarningList() + + +}//end class diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/Commenting/DocCommentAlignmentUnitTest.inc b/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/Commenting/DocCommentAlignmentUnitTest.inc new file mode 100644 index 00000000..e7d880d6 --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/Commenting/DocCommentAlignmentUnitTest.inc @@ -0,0 +1,83 @@ + line numbers for each token. + * + * Long description with some points: + * - one + * - two + * - three + * + * @param array &$tokens The array of tokens to process. + * @param object $tokenizer The tokenizer being used to + * process this file. + * @param string $eolChar The EOL character to use for splitting strings. + * + * @return void + */ +function myFunction() {} + +class MyClass2 +{ + /** + * Some info about the variable here. + */ + var $x; +} + +/** ************************************************************************ + * Example with no errors. + **************************************************************************/ +function example() {} diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/Commenting/DocCommentAlignmentUnitTest.inc.fixed b/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/Commenting/DocCommentAlignmentUnitTest.inc.fixed new file mode 100644 index 00000000..4d8cb392 --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/Commenting/DocCommentAlignmentUnitTest.inc.fixed @@ -0,0 +1,83 @@ + line numbers for each token. + * + * Long description with some points: + * - one + * - two + * - three + * + * @param array &$tokens The array of tokens to process. + * @param object $tokenizer The tokenizer being used to + * process this file. + * @param string $eolChar The EOL character to use for splitting strings. + * + * @return void + */ +function myFunction() {} + +class MyClass2 +{ + /** + * Some info about the variable here. + */ + var $x; +} + +/** ************************************************************************ + * Example with no errors. + **************************************************************************/ +function example() {} diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/Commenting/DocCommentAlignmentUnitTest.js b/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/Commenting/DocCommentAlignmentUnitTest.js new file mode 100644 index 00000000..6e1a8781 --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/Commenting/DocCommentAlignmentUnitTest.js @@ -0,0 +1,76 @@ + +/** +* Some info about the class here + * + */ +foo.prototype = { + + /** + * Some info about the function here. + * + *@return void + */ + bar: function() {} +} + +/** + * Some info about the class here + * + */ +foo.prototype = { + + /** + *Some info about the function here. + * + * @return void + */ + bar: function() {} +} + +/** + * Some info about the class here + * +*/ +foo.prototype = { + + /** + * Some info about the function here. + * + * @return void + */ + bar: function() {} +} + +/** @var Database $mockedDatabase */ +/** @var Container $mockedContainer */ + +function myFunction() +{ + console.info('hi'); + /** + Comment here. + */ +} + +/** + * Creates a map of tokens => line numbers for each token. + * + * Long description with some points: + * - one + * - two + * - three + * + * @param array &$tokens The array of tokens to process. + * @param object $tokenizer The tokenizer being used to + * process this file. + * @param string $eolChar The EOL character to use for splitting strings. + * + * @return void + */ +function myFunction() {} + +$.extend(Datepicker.prototype, { + _widgetDatepicker: function() { + }, + /* Action for selecting a new month/year. */ +}); diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/Commenting/DocCommentAlignmentUnitTest.js.fixed b/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/Commenting/DocCommentAlignmentUnitTest.js.fixed new file mode 100644 index 00000000..9edb4ccc --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/Commenting/DocCommentAlignmentUnitTest.js.fixed @@ -0,0 +1,76 @@ + +/** + * Some info about the class here + * + */ +foo.prototype = { + + /** + * Some info about the function here. + * + * @return void + */ + bar: function() {} +} + +/** + * Some info about the class here + * + */ +foo.prototype = { + + /** + * Some info about the function here. + * + * @return void + */ + bar: function() {} +} + +/** + * Some info about the class here + * + */ +foo.prototype = { + + /** + * Some info about the function here. + * + * @return void + */ + bar: function() {} +} + +/** @var Database $mockedDatabase */ +/** @var Container $mockedContainer */ + +function myFunction() +{ + console.info('hi'); + /** + Comment here. + */ +} + +/** + * Creates a map of tokens => line numbers for each token. + * + * Long description with some points: + * - one + * - two + * - three + * + * @param array &$tokens The array of tokens to process. + * @param object $tokenizer The tokenizer being used to + * process this file. + * @param string $eolChar The EOL character to use for splitting strings. + * + * @return void + */ +function myFunction() {} + +$.extend(Datepicker.prototype, { + _widgetDatepicker: function() { + }, + /* Action for selecting a new month/year. */ +}); diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/Commenting/DocCommentAlignmentUnitTest.php b/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/Commenting/DocCommentAlignmentUnitTest.php new file mode 100644 index 00000000..974951ce --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/Commenting/DocCommentAlignmentUnitTest.php @@ -0,0 +1,70 @@ + + * @copyright 2006-2015 Squiz Pty Ltd (ABN 77 084 670 600) + * @license https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence + */ + +namespace PHP_CodeSniffer\Standards\Squiz\Tests\Commenting; + +use PHP_CodeSniffer\Tests\Standards\AbstractSniffUnitTest; + +class DocCommentAlignmentUnitTest extends AbstractSniffUnitTest +{ + + + /** + * Returns the lines where errors should occur. + * + * The key of the array should represent the line number and the value + * should represent the number of errors that should occur on that line. + * + * @param string $testFile The name of the file being tested. + * + * @return array + */ + public function getErrorList($testFile='DocCommentAlignmentUnitTest.inc') + { + $errors = [ + 3 => 1, + 11 => 1, + 17 => 1, + 18 => 1, + 19 => 1, + 23 => 2, + 24 => 1, + 25 => 2, + 26 => 1, + 32 => 1, + 33 => 1, + 38 => 1, + 39 => 1, + ]; + + if ($testFile === 'DocCommentAlignmentUnitTest.inc') { + $errors[75] = 1; + } + + return $errors; + + }//end getErrorList() + + + /** + * Returns the lines where warnings should occur. + * + * The key of the array should represent the line number and the value + * should represent the number of warnings that should occur on that line. + * + * @return array + */ + public function getWarningList() + { + return []; + + }//end getWarningList() + + +}//end class diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/Commenting/EmptyCatchCommentUnitTest.inc b/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/Commenting/EmptyCatchCommentUnitTest.inc new file mode 100644 index 00000000..cde6e462 --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/Commenting/EmptyCatchCommentUnitTest.inc @@ -0,0 +1,55 @@ + \ No newline at end of file diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/Commenting/EmptyCatchCommentUnitTest.php b/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/Commenting/EmptyCatchCommentUnitTest.php new file mode 100644 index 00000000..3c1668e4 --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/Commenting/EmptyCatchCommentUnitTest.php @@ -0,0 +1,55 @@ + + * @copyright 2006-2015 Squiz Pty Ltd (ABN 77 084 670 600) + * @license https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence + */ + +namespace PHP_CodeSniffer\Standards\Squiz\Tests\Commenting; + +use PHP_CodeSniffer\Tests\Standards\AbstractSniffUnitTest; + +class EmptyCatchCommentUnitTest extends AbstractSniffUnitTest +{ + + + /** + * Returns the lines where errors should occur. + * + * The key of the array should represent the line number and the value + * should represent the number of errors that should occur on that line. + * + * @return array + */ + public function getErrorList() + { + return [ + 13 => 1, + 33 => 1, + 49 => 1, + 50 => 1, + 51 => 1, + 52 => 1, + ]; + + }//end getErrorList() + + + /** + * Returns the lines where warnings should occur. + * + * The key of the array should represent the line number and the value + * should represent the number of warnings that should occur on that line. + * + * @return array + */ + public function getWarningList() + { + return []; + + }//end getWarningList() + + +}//end class diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/Commenting/FileCommentUnitTest.1.inc b/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/Commenting/FileCommentUnitTest.1.inc new file mode 100644 index 00000000..1db2861b --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/Commenting/FileCommentUnitTest.1.inc @@ -0,0 +1,43 @@ + +* @author +* @copyright 1997~1994 The PHP Group +* @copyright 1994-1997 The PHP Group +* @copyright The PHP Group +* @license http://www.php.net/license/3_0.txt +* @summary An unknown summary tag +* +*/ + + +?> + diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/Commenting/FileCommentUnitTest.1.inc.fixed b/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/Commenting/FileCommentUnitTest.1.inc.fixed new file mode 100644 index 00000000..5cc47642 --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/Commenting/FileCommentUnitTest.1.inc.fixed @@ -0,0 +1,43 @@ + +* @author +* @copyright 1997 Squiz Pty Ltd (ABN 77 084 670 600) +* @copyright 1994-1997 Squiz Pty Ltd (ABN 77 084 670 600) +* @copyright 2021 Squiz Pty Ltd (ABN 77 084 670 600) +* @license http://www.php.net/license/3_0.txt +* @summary An unknown summary tag +* +*/ + + +?> + diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/Commenting/FileCommentUnitTest.1.js b/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/Commenting/FileCommentUnitTest.1.js new file mode 100644 index 00000000..57d8d37a --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/Commenting/FileCommentUnitTest.1.js @@ -0,0 +1,40 @@ + + + + +/** +* +* 0Multi-line short description without full stop +* +* +* asdasd +* long description for file (if any) +* asdasdadada +* +* PHP versio +* +* LICENSE: This source file is subject to version 3.0 of the PHP license +* that is available through the world-wide-web at the following URI: +* http://www.php.net/license/3_0.txt. If you did not receive a copy of +* the PHP License and are unable to obtain it through the web, please +* send a note to license@php.net so we can mail you a copy immediately. +* @package SquizCMS +* @package ADDITIONAL PACKAGE TAG +* @subpkg not_camelcased +* @author Antônio Carlos Venâncio Júnior +* @author +* @copyright 1997~1994 The PHP Group +* @copyright 1994-1997 The PHP Group +* @copyright The PHP Group +* @license http://www.php.net/license/3_0.txt +* @summary An unknown summary tag +* +*/ + + +/** +* This bit here is not qualified as file comment +* +* as it is not the first comment in the file +* +*/ diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/Commenting/FileCommentUnitTest.1.js.fixed b/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/Commenting/FileCommentUnitTest.1.js.fixed new file mode 100644 index 00000000..b2b071f4 --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/Commenting/FileCommentUnitTest.1.js.fixed @@ -0,0 +1,40 @@ + + + + +/** +* +* 0Multi-line short description without full stop +* +* +* asdasd +* long description for file (if any) +* asdasdadada +* +* PHP versio +* +* LICENSE: This source file is subject to version 3.0 of the PHP license +* that is available through the world-wide-web at the following URI: +* http://www.php.net/license/3_0.txt. If you did not receive a copy of +* the PHP License and are unable to obtain it through the web, please +* send a note to license@php.net so we can mail you a copy immediately. +* @package SquizCMS +* @package ADDITIONAL PACKAGE TAG +* @subpkg not_camelcased +* @author Squiz Pty Ltd +* @author +* @copyright 1997 Squiz Pty Ltd (ABN 77 084 670 600) +* @copyright 1994-1997 Squiz Pty Ltd (ABN 77 084 670 600) +* @copyright 2021 Squiz Pty Ltd (ABN 77 084 670 600) +* @license http://www.php.net/license/3_0.txt +* @summary An unknown summary tag +* +*/ + + +/** +* This bit here is not qualified as file comment +* +* as it is not the first comment in the file +* +*/ diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/Commenting/FileCommentUnitTest.2.inc b/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/Commenting/FileCommentUnitTest.2.inc new file mode 100644 index 00000000..520d3497 --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/Commenting/FileCommentUnitTest.2.inc @@ -0,0 +1,11 @@ + + * @copyright 2010-2014 Squiz Pty Ltd (ABN 77 084 670 600) + */ + +echo 'hi'; \ No newline at end of file diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/Commenting/FileCommentUnitTest.2.js b/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/Commenting/FileCommentUnitTest.2.js new file mode 100644 index 00000000..4bb4d50d --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/Commenting/FileCommentUnitTest.2.js @@ -0,0 +1,10 @@ +/** + * File comment. + * + * @package Package + * @subpackage Subpackage + * @author Squiz Pty Ltd + * @copyright 2010-2014 Squiz Pty Ltd (ABN 77 084 670 600) + */ + +print 'hi'; \ No newline at end of file diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/Commenting/FileCommentUnitTest.3.inc b/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/Commenting/FileCommentUnitTest.3.inc new file mode 100644 index 00000000..b47603f2 --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/Commenting/FileCommentUnitTest.3.inc @@ -0,0 +1,9 @@ + + * @copyright 2010-2014 Squiz Pty Ltd (ABN 77 084 670 600) + * diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/Commenting/FileCommentUnitTest.4.inc b/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/Commenting/FileCommentUnitTest.4.inc new file mode 100644 index 00000000..2fdeeba1 --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/Commenting/FileCommentUnitTest.4.inc @@ -0,0 +1,3 @@ + + * @copyright 2010-2014 Squiz Pty Ltd (ABN 77 084 670 600) + */ + +class Foo { +} diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/Commenting/FileCommentUnitTest.7.inc b/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/Commenting/FileCommentUnitTest.7.inc new file mode 100644 index 00000000..7074dac2 --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/Commenting/FileCommentUnitTest.7.inc @@ -0,0 +1,12 @@ + + * @copyright 2010-2014 Squiz Pty Ltd (ABN 77 084 670 600) + */ +#[Attribute] +class Foo { +} diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/Commenting/FileCommentUnitTest.8.inc b/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/Commenting/FileCommentUnitTest.8.inc new file mode 100644 index 00000000..5ef90f2a --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/Commenting/FileCommentUnitTest.8.inc @@ -0,0 +1,9 @@ + + * @copyright 2010-2014 Squiz Pty Ltd (ABN 77 084 670 600) + */ diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/Commenting/FileCommentUnitTest.php b/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/Commenting/FileCommentUnitTest.php new file mode 100644 index 00000000..080df3aa --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/Commenting/FileCommentUnitTest.php @@ -0,0 +1,75 @@ + + * @copyright 2006-2015 Squiz Pty Ltd (ABN 77 084 670 600) + * @license https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence + */ + +namespace PHP_CodeSniffer\Standards\Squiz\Tests\Commenting; + +use PHP_CodeSniffer\Tests\Standards\AbstractSniffUnitTest; + +class FileCommentUnitTest extends AbstractSniffUnitTest +{ + + + /** + * Returns the lines where errors should occur. + * + * The key of the array should represent the line number and the value + * should represent the number of errors that should occur on that line. + * + * @param string $testFile The name of the file being tested. + * + * @return array + */ + public function getErrorList($testFile='FileCommentUnitTest.inc') + { + switch ($testFile) { + case 'FileCommentUnitTest.1.inc': + case 'FileCommentUnitTest.1.js': + return [ + 1 => 1, + 22 => 2, + 23 => 1, + 24 => 2, + 25 => 2, + 26 => 1, + 27 => 2, + 28 => 2, + 32 => 2, + ]; + + case 'FileCommentUnitTest.4.inc': + case 'FileCommentUnitTest.6.inc': + case 'FileCommentUnitTest.7.inc': + return [1 => 1]; + + case 'FileCommentUnitTest.5.inc': + return [2 => 1]; + + default: + return []; + }//end switch + + }//end getErrorList() + + + /** + * Returns the lines where warnings should occur. + * + * The key of the array should represent the line number and the value + * should represent the number of warnings that should occur on that line. + * + * @return array + */ + public function getWarningList() + { + return []; + + }//end getWarningList() + + +}//end class diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/Commenting/FunctionCommentThrowTagUnitTest.inc b/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/Commenting/FunctionCommentThrowTagUnitTest.inc new file mode 100644 index 00000000..7e94bb26 --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/Commenting/FunctionCommentThrowTagUnitTest.inc @@ -0,0 +1,511 @@ +callSomeFunction(); + + }//end okFunction() + + + /** + * Comment inside function. + * + * @throws Exception + */ + function okFunction() + { + /** + * @var FooClass + */ + $foo = FooFactory::factory(); + throw new Exception; + + }//end okFunction + + /** + * Needs at throws tag for rethrown exception, + * even though we have one throws tag. + * + * @throws PHP_Exception1 + */ + public function notOkVariableRethrown() + { + throw new PHP_Exception1('Error'); + + try { + // Do something. + } catch (PHP_Exception2 $e) { + logError(); + throw $e; + } + + }//end notOkVariableRethrown() + + /** + * Needs at throws tag for rethrown exception, + * even though we have one throws tag. + * + * @throws PHP_Exception1 + */ + public function notOkVariableRethrown() + { + throw new PHP_Exception1('Error'); + + try { + // Do something. + } catch (PHP_Exception1 | PHP_Exception2 $e) { + logError(); + throw $e; + } + + }//end notOkVariableRethrown() + + /** + * Has correct throws tags for all exceptions + * + * @throws PHP_Exception1 + * @throws PHP_Exception2 + */ + public function okVariableRethrown() + { + throw new PHP_Exception1('Error'); + + try { + // Do something. + } catch (PHP_Exception2 $e) { + logError(); + throw $e; + } + + }//end okVariableRethrown() + + /** + * Has correct throws tags for all exceptions + * + * @throws PHP_Exception1 + * @throws PHP_Exception2 + */ + public function okVariableMultiRethrown() + { + try { + // Do something. + } catch (PHP_Exception1 | PHP_Exception2 $e) { + logError(); + throw $e; + } + + }//end okVariableMultiRethrown() +}//end class + +class NamespacedException { + /** + * @throws \Exception + */ + public function foo() { + throw new \Exception(); + } + + /** + * @throws \Foo\Bar\FooBarException + */ + public function fooBar2() { + throw new \Foo\Bar\FooBarException(); + } + + /** + * @throws FooBarException + */ + public function fooBar2() { + throw new \Foo\Bar\FooBarException(); + } +} + +class Foo { + /** + * Comment + */ + public function foo() { + }//end foo() + + public function bar() { + throw new Exception(); + } + + /** + * Returns information for a test. + * + * This info includes parameters, their valid values. + * + * @param integer $projectid Id of the project. + * + * @return array + * @throws ChannelException If the project is invalid. + */ + public static function getTestInfo($projectid=NULL) + { + try { + DAL::beginTransaction(); + DAL::commit(); + } catch (DALException $e) { + DAL::rollBack(); + throw new ChannelException($e); + } + } +} + +class Test +{ + /** + * Folder name. + * + * @var string + */ + protected $folderName; + + protected function setUp() + { + parent::setUp(); + + if ( !strlen($this->folderName) ) { + throw new \RuntimeException('The $this->folderName must be specified before proceeding.'); + } + } + + /* + * + */ + protected function foo() + { + } + + /** + * @return Closure + */ + public function getStuff() + { + return function () { + throw new RuntimeException("bam!"); + }; + } +} + +/** + * Class comment. + */ +class A +{ + /** + * Function B. + */ + public function b() + { + return new class { + public function c() + { + throw new \Exception(); + } + } + } +} + +/** + * Class comment. + */ +class A +{ + /** + * Function B. + */ + public function b() + { + return new class { + /** + * Tag and token number mismatch. + * + * @throws PHP_Exception1 + * @throws PHP_Exception2 + */ + public function oneLessThrowsTagNeeded() + { + throw new PHP_Exception1('Error'); + + }//end oneLessThrowsTagNeeded() + } + } +} + +abstract class SomeClass { + /** + * Comment here. + */ + abstract public function getGroups(); +} + +class SomeClass { + /** + * Validates something. + * + * @param string $method The set method parameter. + * + * @return string The validated method. + * + * @throws Prefix_Invalid_Argument_Exception The invalid argument exception. + * @throws InvalidArgumentException The invalid argument exception. + */ + protected function validate_something( $something ) { + if ( ! Prefix_Validator::is_string( $something ) ) { + throw Prefix_Invalid_Argument_Exception::invalid_string_parameter( $something, 'something' ); + } + + if ( ! in_array( $something, $this->valid_http_something, true ) ) { + throw new InvalidArgumentException( sprintf( '%s is not a valid HTTP something', $something ) ); + } + + return $something; + } + + /** + * Comment + * + * @throws Exception1 Comment. + * @throws Exception2 Comment. + * @throws Exception3 Comment. + */ + public function foo() { + switch ($foo) { + case 1: + throw Exception1::a(); + case 2: + throw Exception1::b(); + case 3: + throw Exception1::c(); + case 4: + throw Exception2::a(); + case 5: + throw Exception2::b(); + default: + throw new Exception3; + + } + } +} + +namespace Test\Admin { + class NameSpacedClass { + /** + * @throws \ExceptionFromGlobalNamespace + */ + public function ExceptionInGlobalNamespace() { + throw new \ExceptionFromGlobalNamespace(); + } + + /** + * @throws ExceptionFromSameNamespace + */ + public function ExceptionInSameNamespace() { + throw new ExceptionFromSameNamespace(); + } + + /** + * @throws \Test\Admin\ExceptionFromSameNamespace + */ + public function ExceptionInSameNamespaceToo() { + throw new ExceptionFromSameNamespace(); + } + + /** + * @throws \Different\NameSpaceName\ExceptionFromDifferentNamespace + */ + public function ExceptionInSameNamespaceToo() { + throw new \Different\NameSpaceName\ExceptionFromDifferentNamespace(); + } + } +} + +namespace { + class GlobalNameSpaceClass { + /** + * @throws SomeGlobalException + */ + public function ThrowGlobalException() { + throw new SomeGlobalException(); + } + + /** + * @throws \SomeGlobalException + */ + public function ThrowGlobalExceptionToo() { + throw new SomeGlobalException(); + } + } +} diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/Commenting/FunctionCommentThrowTagUnitTest.php b/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/Commenting/FunctionCommentThrowTagUnitTest.php new file mode 100644 index 00000000..1e2d07fa --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/Commenting/FunctionCommentThrowTagUnitTest.php @@ -0,0 +1,60 @@ + + * @copyright 2006-2015 Squiz Pty Ltd (ABN 77 084 670 600) + * @license https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence + */ + +namespace PHP_CodeSniffer\Standards\Squiz\Tests\Commenting; + +use PHP_CodeSniffer\Tests\Standards\AbstractSniffUnitTest; + +class FunctionCommentThrowTagUnitTest extends AbstractSniffUnitTest +{ + + + /** + * Returns the lines where errors should occur. + * + * The key of the array should represent the line number and the value + * should represent the number of errors that should occur on that line. + * + * @return array + */ + public function getErrorList() + { + return [ + 9 => 1, + 21 => 1, + 35 => 1, + 47 => 1, + 61 => 2, + 106 => 1, + 123 => 1, + 200 => 1, + 219 => 1, + 287 => 1, + 397 => 1, + ]; + + }//end getErrorList() + + + /** + * Returns the lines where warnings should occur. + * + * The key of the array should represent the line number and the value + * should represent the number of warnings that should occur on that line. + * + * @return array + */ + public function getWarningList() + { + return []; + + }//end getWarningList() + + +}//end class diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/Commenting/FunctionCommentUnitTest.inc b/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/Commenting/FunctionCommentUnitTest.inc new file mode 100644 index 00000000..deaa966e --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/Commenting/FunctionCommentUnitTest.inc @@ -0,0 +1,1043 @@ +MyClass) + */ +public function caseSensitive($a1, $a2, $a3, arRay $a4, $a5, $a6, myclas $a7) +{ + +}//end caseSensitive() + + +/** + * More type hint check for custom type and array. + * + * @param array $a1 Comment here. + * @param array $a2 Comment here. + * @param MyClass $a3 Comment here. + * @param MyClass $a4 Comment here. + * + * @return array(int => MyClass) + */ +public function typeHint(MyClass $a1, $a2, myclass $a3, $a4) +{ + return (3 => 'myclass obj'); + +}//end typeHint() + + +/** + * Mixed variable type separated by a '|'. + * + * @param array|string $a1 Comment here. + * @param mixed $a2 Comment here. + * @param string|array $a3 Comment here. + * @param MyClass|int $a4 Comment here. + * + * @return bool + */ +public function mixedType($a1, $a2, $a3, $a4) +{ + return true; + +}//end mixedType() + + +/** + * Array type. + * + * @param array(MyClass) $a1 OK. + * @param array() $a2 Invalid type. + * @param array( $a3 Typo. + * @param array(int) $a4 Use 'array(integer)' instead. + * @param array(int => integer) $a5 Use 'array(integer => integer)' instead. + * @param array(integer => bool) $a6 Use 'array(integer => boolean)' instead. + * @param aRRay $a7 Use 'array' instead. + * @param string $a8 String with unknown type hint. + * + * @return int + */ +public function mixedArrayType($a1, $a2, array $a3, $a4, $a5, $a6, $a7, unknownTypeHint $a8) +{ + return 1; + +}//end mixedArrayType() + + +/** + */ +function empty1() +{ +}//end empty1() + + +/** + * + */ +function empty2() +{ +}//end empty2() + + +/** + * + * + * + */ +function empty3() +{ +}//end empty3 + + +/** + * @return boolean + */ +public function missingShortDescriptionInFunctionComment() +{ + return true; + +}//end missingShortDescriptionInFunctionComment() + + +class Another_Class +{ + + /** + * Destructor should not include a return tag. + * + * @return void + */ + function __destruct() + { + return; + } + + /** + * Constructor should not include a return tag. + * + * @return void + */ + function __construct() + { + return; + } + +}//end class + + +/** + * Comment param alignment test. + * + * @param string $varrr1 Comment1.. + * @param string $vr2 Comment2. + * @param string $var3 Comment3.. + * + * @return void + */ +public static function paramAlign($varrr1, $vr2, $var3) +{ + +}//end paramAlign() + + +/** + * Comment. + * + * @param string $id Comment. + * @param array $design Comment. + * + * @return void + */ +public static function paint($id, array $design) +{ + +}//end paint() + + +/** + * Adds specified class name to class attribute of this widget. + * + * @since 4.0.0 + * @return string + */ +public function myFunction() +{ + if ($condition === FALSE) { + echo 'hi'; + } + +}//end myFunction() + + +/** + * Adds specified class name to class attribute of this widget. + * + * @return string + */ +public function myFunction() +{ + if ($condition === FALSE) { + echo 'hi'; + return; + } + + return 'blah'; + +}//end myFunction() + + +/** + * Adds specified class name to class attribute of this widget. + * + * @return string + */ +public function myFunction() +{ + if ($condition === FALSE) { + echo 'hi'; + } + + return 'blah'; + +}//end myFunction() + +/** + * Test function. + * + * @param string $arg1 An argument + * + * @access public + * @return bool + */ + +echo $blah; + +function myFunction($arg1) {} + +class MyClass() { + /** + * An abstract function. + * + * @return string[] + */ + abstract final protected function myFunction(); +} + +/** + * Comment. + * + * @param mixed $test An argument. + * + * @return mixed + */ +function test($test) +{ + if ($test === TRUE) { + return; + } + + return $test; + +}//end test() + + +/** Comment. + * + * @return mixed + * + */ +function test() +{ + +}//end test() + +/** + * Comment. + * + * @param \other\ns\item $test An argument. + * + * @return mixed + */ +function test(\other\ns\item $test) +{ + return $test; + +}//end test() + +/** + * Comment. + * + * @param item $test An argument. + * + * @return mixed + */ +function test(\other\ns\item $test) +{ + return $test; + +}//end test() + +/** + * Comment. + * + * @param \first\ns\item $test An argument. + * + * @return mixed + */ +function test(\first\ns\item $test = \second\ns::CONSTANT) +{ + return $test; + +}//end test() + +/** + * Comment. + * + * @param \first\item $test An argument. + * + * @return mixed + */ +function test(\first\ns\item $test = \second\ns::CONSTANT) +{ + return $test; + +}//end test() + +// Closures should be ignored. +preg_replace_callback( + '~-([a-z])~', + function ($match) { + return strtoupper($match[1]); + }, + 'hello-world' +); + +$callback = function ($bar) use ($foo) + { + $bar += $foo; + }; + +/** + * Comment should end with '*', not '**' before the slash. + **/ +function test123() { + +} + +/** + * Cant use resource for type hint. + * + * @param resource $test An argument. + * + * @return mixed + */ +function test($test) +{ + return $test; + +}//end test() + +/** + * Variable number of args. + * + * @param string $a1 Comment here. + * @param string $a2 Comment here. + * @param string $a2,... Comment here. + * + * @return boolean + */ +public function variableArgs($a1, $a2) +{ + return true; + +}//end variableArgs() + +/** + * Contains closure. + * + * @return void + */ +public function containsClosure() +{ + function ($e) { + return new Event($e); + }, + +}//end containsClosure() + +/** + * 这是一条测试评论. + * + * @return void + */ +public function test() +{ + +}//end variableArgs() + +/** + * Uses callable. + * + * @param callable $cb Test parameter. + * + * @return void + */ +public function usesCallable(callable $cb) { + $cb(); +}//end usesCallable() + +/** + * Creates a map of tokens => line numbers for each token. + * + * @param array $tokens The array of tokens to process. + * @param object $tokenizer The tokenizer being used to process this file. + * @param string $eolChar The EOL character + * to use for splitting strings. + * + * @return void + * @throws Exception If something really bad + * happens while doing foo. + */ +public function foo(array &$tokens, $tokenizer, $eolChar) +{ + +}//end foo() + +/** + * Some description. + * + * @param \Vendor\Package\SomeClass $someclass Some class. + * @param \OtherVendor\Package\SomeClass2 $someclass2 Some class. + * @param \OtherVendor\Package\SomeClass2 $someclass3 Some class. + * + * @return void + */ +public function foo(SomeClass $someclass, \OtherVendor\Package\SomeClass2 $someclass2, SomeClass3 $someclass3) +{ +} + +/** + * Gettext. + * + * @return string + */ +public function _() { + return $foo; +} + +class Baz { + /** + * The PHP5 constructor + * + * No return tag + */ + public function __construct() { + + } +} + +/** + * Test + * + * @return void + * @throws E + */ +function myFunction() {} + +/** + * Yield test + * + * @return integer + */ +function yieldTest() +{ + for ($i = 0; $i < 5; $i++) { + yield $i; + } +} + +/** + * Yield test + * + * @return void + */ +function yieldTest() +{ + for ($i = 0; $i < 5; $i++) { + yield $i; + } +} + +/** + * Using "array" as a type hint should satisfy a specified array parameter type. + * + * @param MyClass[] $values An array of MyClass objects. + * + * @return void + */ +public function specifiedArray(array $values) { + +}// end specifiedArray() + +/** + * Using "callable" as a type hint should satisfy a "callback" parameter type. + * + * @param callback $cb A callback. + * + * @return void + */ +public function callableCallback(callable $cb) { + +}// end callableCallback() + +/** + * PHP7 type hints. + * + * @param string $name1 Comment. + * @param integer $name2 Comment. + * @param float $name3 Comment. + * @param boolean $name4 Comment. + * + * @return void + */ +public function myFunction (string $name1, int $name2, float $name3, bool $name4) { +} + +/** + * Variadic function. + * + * @param string $name1 Comment. + * @param string ...$name2 Comment. + * + * @return void + */ +public function myFunction(string $name1, string ...$name2) { +} + + +/** + * Variadic function. + * + * @param string $name1 Comment. + * @param string $name2 Comment. + * + * @return void + */ +public function myFunction(string $name1, string ...$name2) { +} + +/** + * Return description function + correct type. + * + * @return integer This is a description. + */ +public function myFunction() { + return 5; +} + +/** + * Return description function + incorrect type. + * + * @return int This is a description. + */ +public function myFunction() { + return 5; +} + +/** + * Return description function + no return. + * + * @return void This is a description. + */ +public function myFunction() { +} + +/** + * Return description function + mixed return. + * + * @return mixed This is a description. + */ +public function myFunction() { +} + +/** + * Function comment. + * + * @param $bar + * Comment here. + * @param ... + * Additional arguments here. + * + * @return + * Return value + * + */ +function foo($bar) { +} + +/** + * Do something. + * + * @return void + */ +public function someFunc(): void +{ + $class = new class + { + /** + * Do something. + * + * @return string + */ + public function getString(): string + { + return 'some string'; + } + }; +} + +/** + * Return description function + mixed return types. + * + * @return bool|int This is a description. + */ +function returnTypeWithDescriptionA() +{ + return 5; + +}//end returnTypeWithDescriptionA() + + +/** + * Return description function + mixed return types. + * + * @return real|bool This is a description. + */ +function returnTypeWithDescriptionB() +{ + return 5; + +}//end returnTypeWithDescriptionB() + + +/** + * Return description function + lots of different mixed return types. + * + * @return int|object|string[]|real|double|float|bool|array(int=>MyClass)|callable And here we have a description + */ +function returnTypeWithDescriptionC() +{ + return 5; + +}//end returnTypeWithDescriptionC() + + +/** + * Return description function + lots of different mixed return types. + * + * @return array(int=>bool)|\OtherVendor\Package\SomeClass2|MyClass[]|void And here we have a description + */ +function returnTypeWithDescriptionD() +{ + +}//end returnTypeWithDescriptionD() + +/** + * Yield from test + * + * @return int[] + */ +function yieldFromTest() +{ + yield from foo(); +} + +/** + * Audio + * + * Generates an audio element to embed sounds + * + * @param mixed $src Either a source string or + * an array of sources. + * @param mixed $unsupportedMessage The message to display + * if the media tag is not supported by the browser. + * @param mixed $attributes HTML attributes. + * @return string + */ +function audio( + $src, + $unsupportedMessage = '', + $attributes = '', +) +{ + return 'test'; +} + +/** + * Test function + * + * @return array + */ +function returnArrayWithClosure() +{ + function () { + return; + }; + + return []; +} + +/** + * Test function + * + * @return array + */ +function returnArrayWithAnonymousClass() +{ + new class { + /** + * @return void + */ + public function test() { + return; + } + }; + + return []; +} + +/** + * @return void + */ +function returnVoidWithClosure() +{ + function () { + return 1; + }; +} + +/** + * @return void + */ +function returnVoidWithAnonymousClass() +{ + new class { + /** + * @return integer + */ + public function test() + { + return 1; + } + }; +} + +class TestReturnVoid +{ + /** + * @return void + */ + public function test() + { + function () { + return 4; + }; + } +} + +/** + * Comment here. + * + * @param integer $a This is A. + * @param ?array $b This is B. + * + * @return void + */ +public static function foo(?int $a, ?array $b) {} + +/** + * Comment here. + * + * @param object $a This is A. + * @param object $b This is B. + * + * @return void + */ +public function foo(object $a, ?object $b) {} + +/** + * Prepares given PHP class method for later code building. + * + * @param integer $foo Comment. + * - Additional comment. + * + * @return void + */ +function foo($foo) {} + +/** + * {@inheritDoc} + */ +public function foo($a, $b) {} + +// phpcs:set Squiz.Commenting.FunctionComment skipIfInheritdoc true + +/** + * {@inheritDoc} + */ +public function foo($a, $b) {} + +/** + * Foo. + * + * @param mixed $a Comment. + * + * @return mixed + */ +public function foo(mixed $a): mixed {} + +// phpcs:set Squiz.Commenting.FunctionComment specialMethods[] +class Bar { + /** + * The PHP5 constructor + */ + public function __construct() { + + } +} + +// phpcs:set Squiz.Commenting.FunctionComment specialMethods[] ignored +/** + * Should be ok + */ +public function ignored() { + +} + +// phpcs:set Squiz.Commenting.FunctionComment specialMethods[] __construct,__destruct diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/Commenting/FunctionCommentUnitTest.inc.fixed b/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/Commenting/FunctionCommentUnitTest.inc.fixed new file mode 100644 index 00000000..b46df26b --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/Commenting/FunctionCommentUnitTest.inc.fixed @@ -0,0 +1,1043 @@ + MyClass) + */ +public function caseSensitive($a1, $a2, $a3, arRay $a4, $a5, $a6, myclas $a7) +{ + +}//end caseSensitive() + + +/** + * More type hint check for custom type and array. + * + * @param array $a1 Comment here. + * @param array $a2 Comment here. + * @param MyClass $a3 Comment here. + * @param MyClass $a4 Comment here. + * + * @return array(integer => MyClass) + */ +public function typeHint(MyClass $a1, $a2, myclass $a3, $a4) +{ + return (3 => 'myclass obj'); + +}//end typeHint() + + +/** + * Mixed variable type separated by a '|'. + * + * @param array|string $a1 Comment here. + * @param mixed $a2 Comment here. + * @param string|array $a3 Comment here. + * @param MyClass|integer $a4 Comment here. + * + * @return boolean + */ +public function mixedType($a1, $a2, $a3, $a4) +{ + return true; + +}//end mixedType() + + +/** + * Array type. + * + * @param array(MyClass) $a1 OK. + * @param array $a2 Invalid type. + * @param array $a3 Typo. + * @param array(integer) $a4 Use 'array(integer)' instead. + * @param array(integer => integer) $a5 Use 'array(integer => integer)' instead. + * @param array(integer => boolean) $a6 Use 'array(integer => boolean)' instead. + * @param array $a7 Use 'array' instead. + * @param string $a8 String with unknown type hint. + * + * @return integer + */ +public function mixedArrayType($a1, $a2, array $a3, $a4, $a5, $a6, $a7, unknownTypeHint $a8) +{ + return 1; + +}//end mixedArrayType() + + +/** + */ +function empty1() +{ +}//end empty1() + + +/** + * + */ +function empty2() +{ +}//end empty2() + + +/** + * + * + * + */ +function empty3() +{ +}//end empty3 + + +/** + * @return boolean + */ +public function missingShortDescriptionInFunctionComment() +{ + return true; + +}//end missingShortDescriptionInFunctionComment() + + +class Another_Class +{ + + /** + * Destructor should not include a return tag. + * + * @return void + */ + function __destruct() + { + return; + } + + /** + * Constructor should not include a return tag. + * + * @return void + */ + function __construct() + { + return; + } + +}//end class + + +/** + * Comment param alignment test. + * + * @param string $varrr1 Comment1.. + * @param string $vr2 Comment2. + * @param string $var3 Comment3.. + * + * @return void + */ +public static function paramAlign($varrr1, $vr2, $var3) +{ + +}//end paramAlign() + + +/** + * Comment. + * + * @param string $id Comment. + * @param array $design Comment. + * + * @return void + */ +public static function paint($id, array $design) +{ + +}//end paint() + + +/** + * Adds specified class name to class attribute of this widget. + * + * @since 4.0.0 + * @return string + */ +public function myFunction() +{ + if ($condition === FALSE) { + echo 'hi'; + } + +}//end myFunction() + + +/** + * Adds specified class name to class attribute of this widget. + * + * @return string + */ +public function myFunction() +{ + if ($condition === FALSE) { + echo 'hi'; + return; + } + + return 'blah'; + +}//end myFunction() + + +/** + * Adds specified class name to class attribute of this widget. + * + * @return string + */ +public function myFunction() +{ + if ($condition === FALSE) { + echo 'hi'; + } + + return 'blah'; + +}//end myFunction() + +/** + * Test function. + * + * @param string $arg1 An argument + * + * @access public + * @return bool + */ + +echo $blah; + +function myFunction($arg1) {} + +class MyClass() { + /** + * An abstract function. + * + * @return string[] + */ + abstract final protected function myFunction(); +} + +/** + * Comment. + * + * @param mixed $test An argument. + * + * @return mixed + */ +function test($test) +{ + if ($test === TRUE) { + return; + } + + return $test; + +}//end test() + + +/** Comment. + * + * @return mixed + * + */ +function test() +{ + +}//end test() + +/** + * Comment. + * + * @param \other\ns\item $test An argument. + * + * @return mixed + */ +function test(\other\ns\item $test) +{ + return $test; + +}//end test() + +/** + * Comment. + * + * @param item $test An argument. + * + * @return mixed + */ +function test(\other\ns\item $test) +{ + return $test; + +}//end test() + +/** + * Comment. + * + * @param \first\ns\item $test An argument. + * + * @return mixed + */ +function test(\first\ns\item $test = \second\ns::CONSTANT) +{ + return $test; + +}//end test() + +/** + * Comment. + * + * @param \first\item $test An argument. + * + * @return mixed + */ +function test(\first\ns\item $test = \second\ns::CONSTANT) +{ + return $test; + +}//end test() + +// Closures should be ignored. +preg_replace_callback( + '~-([a-z])~', + function ($match) { + return strtoupper($match[1]); + }, + 'hello-world' +); + +$callback = function ($bar) use ($foo) + { + $bar += $foo; + }; + +/** + * Comment should end with '*', not '**' before the slash. + **/ +function test123() { + +} + +/** + * Cant use resource for type hint. + * + * @param resource $test An argument. + * + * @return mixed + */ +function test($test) +{ + return $test; + +}//end test() + +/** + * Variable number of args. + * + * @param string $a1 Comment here. + * @param string $a2 Comment here. + * @param string $a2,... Comment here. + * + * @return boolean + */ +public function variableArgs($a1, $a2) +{ + return true; + +}//end variableArgs() + +/** + * Contains closure. + * + * @return void + */ +public function containsClosure() +{ + function ($e) { + return new Event($e); + }, + +}//end containsClosure() + +/** + * 这是一条测试评论. + * + * @return void + */ +public function test() +{ + +}//end variableArgs() + +/** + * Uses callable. + * + * @param callable $cb Test parameter. + * + * @return void + */ +public function usesCallable(callable $cb) { + $cb(); +}//end usesCallable() + +/** + * Creates a map of tokens => line numbers for each token. + * + * @param array $tokens The array of tokens to process. + * @param object $tokenizer The tokenizer being used to process this file. + * @param string $eolChar The EOL character + * to use for splitting strings. + * + * @return void + * @throws Exception If something really bad + * happens while doing foo. + */ +public function foo(array &$tokens, $tokenizer, $eolChar) +{ + +}//end foo() + +/** + * Some description. + * + * @param \Vendor\Package\SomeClass $someclass Some class. + * @param \OtherVendor\Package\SomeClass2 $someclass2 Some class. + * @param \OtherVendor\Package\SomeClass2 $someclass3 Some class. + * + * @return void + */ +public function foo(SomeClass $someclass, \OtherVendor\Package\SomeClass2 $someclass2, SomeClass3 $someclass3) +{ +} + +/** + * Gettext. + * + * @return string + */ +public function _() { + return $foo; +} + +class Baz { + /** + * The PHP5 constructor + * + * No return tag + */ + public function __construct() { + + } +} + +/** + * Test + * + * @return void + * @throws E + */ +function myFunction() {} + +/** + * Yield test + * + * @return integer + */ +function yieldTest() +{ + for ($i = 0; $i < 5; $i++) { + yield $i; + } +} + +/** + * Yield test + * + * @return void + */ +function yieldTest() +{ + for ($i = 0; $i < 5; $i++) { + yield $i; + } +} + +/** + * Using "array" as a type hint should satisfy a specified array parameter type. + * + * @param MyClass[] $values An array of MyClass objects. + * + * @return void + */ +public function specifiedArray(array $values) { + +}// end specifiedArray() + +/** + * Using "callable" as a type hint should satisfy a "callback" parameter type. + * + * @param callback $cb A callback. + * + * @return void + */ +public function callableCallback(callable $cb) { + +}// end callableCallback() + +/** + * PHP7 type hints. + * + * @param string $name1 Comment. + * @param integer $name2 Comment. + * @param float $name3 Comment. + * @param boolean $name4 Comment. + * + * @return void + */ +public function myFunction (string $name1, int $name2, float $name3, bool $name4) { +} + +/** + * Variadic function. + * + * @param string $name1 Comment. + * @param string ...$name2 Comment. + * + * @return void + */ +public function myFunction(string $name1, string ...$name2) { +} + + +/** + * Variadic function. + * + * @param string $name1 Comment. + * @param string $name2 Comment. + * + * @return void + */ +public function myFunction(string $name1, string ...$name2) { +} + +/** + * Return description function + correct type. + * + * @return integer This is a description. + */ +public function myFunction() { + return 5; +} + +/** + * Return description function + incorrect type. + * + * @return integer This is a description. + */ +public function myFunction() { + return 5; +} + +/** + * Return description function + no return. + * + * @return void This is a description. + */ +public function myFunction() { +} + +/** + * Return description function + mixed return. + * + * @return mixed This is a description. + */ +public function myFunction() { +} + +/** + * Function comment. + * + * @param $bar + * Comment here. + * @param ... + * Additional arguments here. + * + * @return + * Return value + * + */ +function foo($bar) { +} + +/** + * Do something. + * + * @return void + */ +public function someFunc(): void +{ + $class = new class + { + /** + * Do something. + * + * @return string + */ + public function getString(): string + { + return 'some string'; + } + }; +} + +/** + * Return description function + mixed return types. + * + * @return boolean|integer This is a description. + */ +function returnTypeWithDescriptionA() +{ + return 5; + +}//end returnTypeWithDescriptionA() + + +/** + * Return description function + mixed return types. + * + * @return float|boolean This is a description. + */ +function returnTypeWithDescriptionB() +{ + return 5; + +}//end returnTypeWithDescriptionB() + + +/** + * Return description function + lots of different mixed return types. + * + * @return integer|object|string[]|float|boolean|array(integer => MyClass)|callable And here we have a description + */ +function returnTypeWithDescriptionC() +{ + return 5; + +}//end returnTypeWithDescriptionC() + + +/** + * Return description function + lots of different mixed return types. + * + * @return array(integer => boolean)|\OtherVendor\Package\SomeClass2|MyClass[]|void And here we have a description + */ +function returnTypeWithDescriptionD() +{ + +}//end returnTypeWithDescriptionD() + +/** + * Yield from test + * + * @return int[] + */ +function yieldFromTest() +{ + yield from foo(); +} + +/** + * Audio + * + * Generates an audio element to embed sounds + * + * @param mixed $src Either a source string or + * an array of sources. + * @param mixed $unsupportedMessage The message to display + * if the media tag is not supported by the browser. + * @param mixed $attributes HTML attributes. + * @return string + */ +function audio( + $src, + $unsupportedMessage = '', + $attributes = '', +) +{ + return 'test'; +} + +/** + * Test function + * + * @return array + */ +function returnArrayWithClosure() +{ + function () { + return; + }; + + return []; +} + +/** + * Test function + * + * @return array + */ +function returnArrayWithAnonymousClass() +{ + new class { + /** + * @return void + */ + public function test() { + return; + } + }; + + return []; +} + +/** + * @return void + */ +function returnVoidWithClosure() +{ + function () { + return 1; + }; +} + +/** + * @return void + */ +function returnVoidWithAnonymousClass() +{ + new class { + /** + * @return integer + */ + public function test() + { + return 1; + } + }; +} + +class TestReturnVoid +{ + /** + * @return void + */ + public function test() + { + function () { + return 4; + }; + } +} + +/** + * Comment here. + * + * @param integer $a This is A. + * @param array $b This is B. + * + * @return void + */ +public static function foo(?int $a, ?array $b) {} + +/** + * Comment here. + * + * @param object $a This is A. + * @param object $b This is B. + * + * @return void + */ +public function foo(object $a, ?object $b) {} + +/** + * Prepares given PHP class method for later code building. + * + * @param integer $foo Comment. + * - Additional comment. + * + * @return void + */ +function foo($foo) {} + +/** + * {@inheritDoc} + */ +public function foo($a, $b) {} + +// phpcs:set Squiz.Commenting.FunctionComment skipIfInheritdoc true + +/** + * {@inheritDoc} + */ +public function foo($a, $b) {} + +/** + * Foo. + * + * @param mixed $a Comment. + * + * @return mixed + */ +public function foo(mixed $a): mixed {} + +// phpcs:set Squiz.Commenting.FunctionComment specialMethods[] +class Bar { + /** + * The PHP5 constructor + */ + public function __construct() { + + } +} + +// phpcs:set Squiz.Commenting.FunctionComment specialMethods[] ignored +/** + * Should be ok + */ +public function ignored() { + +} + +// phpcs:set Squiz.Commenting.FunctionComment specialMethods[] __construct,__destruct diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/Commenting/FunctionCommentUnitTest.php b/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/Commenting/FunctionCommentUnitTest.php new file mode 100644 index 00000000..632b7c51 --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/Commenting/FunctionCommentUnitTest.php @@ -0,0 +1,177 @@ + + * @copyright 2006-2015 Squiz Pty Ltd (ABN 77 084 670 600) + * @license https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence + */ + +namespace PHP_CodeSniffer\Standards\Squiz\Tests\Commenting; + +use PHP_CodeSniffer\Tests\Standards\AbstractSniffUnitTest; + +class FunctionCommentUnitTest extends AbstractSniffUnitTest +{ + + + /** + * Returns the lines where errors should occur. + * + * The key of the array should represent the line number and the value + * should represent the number of errors that should occur on that line. + * + * @return array + */ + public function getErrorList() + { + $errors = [ + 5 => 1, + 10 => 3, + 12 => 2, + 13 => 2, + 14 => 1, + 15 => 1, + 28 => 1, + 43 => 1, + 76 => 1, + 87 => 1, + 103 => 1, + 109 => 1, + 112 => 1, + 122 => 1, + 123 => 3, + 124 => 2, + 125 => 1, + 126 => 1, + 137 => 4, + 138 => 4, + 139 => 4, + 143 => 2, + 152 => 1, + 155 => 2, + 159 => 1, + 166 => 1, + 173 => 1, + 183 => 1, + 190 => 2, + 193 => 2, + 196 => 1, + 199 => 2, + 210 => 1, + 211 => 1, + 222 => 1, + 223 => 1, + 224 => 1, + 225 => 1, + 226 => 1, + 227 => 1, + 230 => 2, + 232 => 2, + 246 => 1, + 248 => 4, + 261 => 1, + 263 => 1, + 276 => 1, + 277 => 1, + 278 => 1, + 279 => 1, + 280 => 1, + 281 => 1, + 284 => 1, + 286 => 7, + 294 => 1, + 302 => 1, + 312 => 1, + 358 => 1, + 359 => 2, + 372 => 1, + 373 => 1, + 387 => 1, + 407 => 1, + 441 => 1, + 500 => 1, + 526 => 1, + 548 => 1, + 641 => 1, + 669 => 1, + 688 => 1, + 744 => 1, + 748 => 1, + 767 => 1, + 789 => 1, + 792 => 1, + 794 => 1, + 797 => 1, + 801 => 1, + 828 => 1, + 840 => 1, + 852 => 1, + 864 => 1, + 886 => 1, + 888 => 1, + 890 => 1, + 978 => 1, + 997 => 1, + 1004 => 2, + 1006 => 1, + 1029 => 1, + ]; + + // Scalar type hints only work from PHP 7 onwards. + if (PHP_VERSION_ID >= 70000) { + $errors[17] = 3; + $errors[128] = 1; + $errors[143] = 3; + $errors[161] = 2; + $errors[201] = 1; + $errors[232] = 7; + $errors[363] = 3; + $errors[377] = 1; + $errors[575] = 2; + $errors[627] = 1; + $errors[1002] = 1; + } else { + $errors[729] = 4; + $errors[740] = 2; + $errors[752] = 2; + $errors[982] = 1; + } + + // Object type hints only work from PHP 7.2 onwards. + if (PHP_VERSION_ID >= 70200) { + $errors[627] = 2; + } else { + $errors[992] = 2; + } + + // Mixed type hints only work from PHP 8.0 onwards. + if (PHP_VERSION_ID >= 80000) { + $errors[265] = 1; + $errors[459] = 1; + $errors[893] = 3; + } else { + $errors[1023] = 1; + } + + return $errors; + + }//end getErrorList() + + + /** + * Returns the lines where warnings should occur. + * + * The key of the array should represent the line number and the value + * should represent the number of warnings that should occur on that line. + * + * @return array + */ + public function getWarningList() + { + return []; + + }//end getWarningList() + + +}//end class diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/Commenting/InlineCommentUnitTest.inc b/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/Commenting/InlineCommentUnitTest.inc new file mode 100644 index 00000000..1b97af0b --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/Commenting/InlineCommentUnitTest.inc @@ -0,0 +1,175 @@ + One +// -> One.One +// -> Two + +/* + Here is some inline example code: + -> One + -> One.One + -> Two +*/ + +/** + * Comment should be ignored in PHP 5.4. + * + */ +trait MyTrait { + +} + +$foo = 'foo'; // Var set to foo. + +echo $foo; + +// Comment here. +echo $foo; + +/** + * Comments about the include + */ +include_once($blah); + +// some comment without capital or full stop +echo $foo; // An unrelated comment. + +// An unrelated comment. +echo $foo; // some comment without capital or full stop + +class Foo +{ + // This is fine. + + /** + * Spacing is ignored above. + */ + function bar(){} +} + +if ($foo) { +}//end if +// Another comment here. +$foo++; + +if ($foo) { +}//end if +// another comment here. +$foo++; + +/** + * Comment should be ignored, even though there is an attribute between the docblock and the class declaration. + */ + +#[AttributeA] + +final class MyClass +{ + /** + * Comment should be ignored, even though there is an attribute between the docblock and the function declaration + */ + #[AttributeA] + #[AttributeB] + final public function test() {} +} + +/* + * N.B.: The below test line must be the last test in the file. + * Testing that a new line after an inline comment when it's the last non-whitespace + * token in a file, does *not* throw an error as this would conflict with the common + * "new line required at end of file" rule. + */ + +// For this test line having an empty line below it, is fine. diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/Commenting/InlineCommentUnitTest.inc.fixed b/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/Commenting/InlineCommentUnitTest.inc.fixed new file mode 100644 index 00000000..6b666241 --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/Commenting/InlineCommentUnitTest.inc.fixed @@ -0,0 +1,168 @@ + One +// -> One.One +// -> Two +/* + Here is some inline example code: + -> One + -> One.One + -> Two +*/ + +/** + * Comment should be ignored in PHP 5.4. + * + */ +trait MyTrait { + +} + +$foo = 'foo'; // Var set to foo. + +echo $foo; + +// Comment here. +echo $foo; + +/** + * Comments about the include + */ +include_once($blah); + +// some comment without capital or full stop +echo $foo; // An unrelated comment. + +// An unrelated comment. +echo $foo; // some comment without capital or full stop + +class Foo +{ + // This is fine. + + /** + * Spacing is ignored above. + */ + function bar(){} +} + +if ($foo) { +}//end if +// Another comment here. +$foo++; + +if ($foo) { +}//end if +// another comment here. +$foo++; + +/** + * Comment should be ignored, even though there is an attribute between the docblock and the class declaration. + */ + +#[AttributeA] + +final class MyClass +{ + /** + * Comment should be ignored, even though there is an attribute between the docblock and the function declaration + */ + #[AttributeA] + #[AttributeB] + final public function test() {} +} + +/* + * N.B.: The below test line must be the last test in the file. + * Testing that a new line after an inline comment when it's the last non-whitespace + * token in a file, does *not* throw an error as this would conflict with the common + * "new line required at end of file" rule. + */ + +// For this test line having an empty line below it, is fine. diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/Commenting/InlineCommentUnitTest.js b/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/Commenting/InlineCommentUnitTest.js new file mode 100644 index 00000000..6b1093e6 --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/Commenting/InlineCommentUnitTest.js @@ -0,0 +1,129 @@ +// Some content here. +var code = 'hello'; + +// This comment contains # multiple +// hash signs (#). +code = 'hello'; + +/** + * This is the first line of a function comment. + * This is the second line. + */ +function testFunction() +{ + // Callback methods which are added by external objects. + this.callbacks = {}; + +}//end testFunction() + +/** + * This is the first line of a class comment. + * This is the second line. + */ +myClass.prototype = { + + /** + * This is the first line of a method comment. + * This is the second line. + */ + load: function(url, callback) + { + // Some code here. + + } +}; + +// some code goes here! + +/* + A longer comment goes here. + It spans multiple lines!! + Or does it? +*/ + +// 0This is a simple multi-line +// comment! +code = 'hello'; + +//This is not valid. +code = 'hello'; + +// Neither is this! +code = 'hello'; + +// +code = 'hello'; + +/** Neither is this! **/ +code = 'hello'; + +/** + * This is the first line of a function comment. + * This is the second line. + */ +var myFunction = function() { +} + +/** + * This is the first line of a function comment. + * This is the second line. + */ +myFunction = function() { +} + +/** + * This is the first line of a function comment. + * This is the second line. + */ +myClass.myFunction = function() { +} + +dfx.getIframeDocument = function(iframe) +{ + return doc; + +};//end dfx.getIframeDocument() + +mig.Gallery.prototype = { + + init: function(cb) + { + + },//end init() + + imageClicked: function(id) + { + + }//end imageClicked() + +}; + +// Here is some inline example code: +// -> One +// -> One.One +// -> Two + +/* + Here is some inline example code: + -> One + -> One.One + -> Two +*/ + + +var foo = 'foo'; // Var set to foo. + +console.info(foo); + +// Comment here. +console.info(foo); + +//** +* invalid comment +*/ + +// some comment without capital or full stop +console.log(foo); // An unrelated comment. + +// An unrelated comment. +console.log(foo); // some comment without capital or full stop diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/Commenting/InlineCommentUnitTest.js.fixed b/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/Commenting/InlineCommentUnitTest.js.fixed new file mode 100644 index 00000000..20e5041e --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/Commenting/InlineCommentUnitTest.js.fixed @@ -0,0 +1,125 @@ +// Some content here. +var code = 'hello'; + +// This comment contains # multiple +// hash signs (#). +code = 'hello'; + +/** + * This is the first line of a function comment. + * This is the second line. + */ +function testFunction() +{ + // Callback methods which are added by external objects. + this.callbacks = {}; + +}//end testFunction() + +/** + * This is the first line of a class comment. + * This is the second line. + */ +myClass.prototype = { + + /** + * This is the first line of a method comment. + * This is the second line. + */ + load: function(url, callback) + { + // Some code here. + } +}; + +// some code goes here! +/* + A longer comment goes here. + It spans multiple lines!! + Or does it? +*/ + +// 0This is a simple multi-line +// comment! +code = 'hello'; + +// This is not valid. +code = 'hello'; + +// Neither is this! +code = 'hello'; + +code = 'hello'; + +/** Neither is this! **/ +code = 'hello'; + +/** + * This is the first line of a function comment. + * This is the second line. + */ +var myFunction = function() { +} + +/** + * This is the first line of a function comment. + * This is the second line. + */ +myFunction = function() { +} + +/** + * This is the first line of a function comment. + * This is the second line. + */ +myClass.myFunction = function() { +} + +dfx.getIframeDocument = function(iframe) +{ + return doc; + +};//end dfx.getIframeDocument() + +mig.Gallery.prototype = { + + init: function(cb) + { + + },//end init() + + imageClicked: function(id) + { + + }//end imageClicked() + +}; + +// Here is some inline example code: +// -> One +// -> One.One +// -> Two +/* + Here is some inline example code: + -> One + -> One.One + -> Two +*/ + + +var foo = 'foo'; // Var set to foo. + +console.info(foo); + +// Comment here. +console.info(foo); + +// ** +* invalid comment +*/ + +// some comment without capital or full stop +console.log(foo); // An unrelated comment. + +// An unrelated comment. +console.log(foo); // some comment without capital or full stop diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/Commenting/InlineCommentUnitTest.php b/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/Commenting/InlineCommentUnitTest.php new file mode 100644 index 00000000..e4a5298b --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/Commenting/InlineCommentUnitTest.php @@ -0,0 +1,91 @@ + + * @copyright 2006-2015 Squiz Pty Ltd (ABN 77 084 670 600) + * @license https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence + */ + +namespace PHP_CodeSniffer\Standards\Squiz\Tests\Commenting; + +use PHP_CodeSniffer\Tests\Standards\AbstractSniffUnitTest; + +class InlineCommentUnitTest extends AbstractSniffUnitTest +{ + + + /** + * Returns the lines where errors should occur. + * + * The key of the array should represent the line number and the value + * should represent the number of errors that should occur on that line. + * + * @param string $testFile The name of the file being tested. + * + * @return array + */ + public function getErrorList($testFile='InlineCommentUnitTest.inc') + { + switch ($testFile) { + case 'InlineCommentUnitTest.inc': + $errors = [ + 17 => 1, + 27 => 1, + 28 => 1, + 32 => 2, + 36 => 1, + 44 => 2, + 58 => 1, + 61 => 1, + 64 => 1, + 67 => 1, + 95 => 1, + 96 => 1, + 97 => 3, + 118 => 1, + 126 => 2, + 130 => 2, + 149 => 1, + ]; + + return $errors; + case 'InlineCommentUnitTest.js': + return [ + 31 => 1, + 36 => 2, + 48 => 1, + 51 => 1, + 54 => 1, + 57 => 1, + 102 => 1, + 103 => 1, + 104 => 3, + 118 => 1, + 121 => 1, + 125 => 2, + 129 => 2, + ]; + default: + return []; + }//end switch + + }//end getErrorList() + + + /** + * Returns the lines where warnings should occur. + * + * The key of the array should represent the line number and the value + * should represent the number of warnings that should occur on that line. + * + * @return array + */ + public function getWarningList() + { + return []; + + }//end getWarningList() + + +}//end class diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/Commenting/LongConditionClosingCommentUnitTest.inc b/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/Commenting/LongConditionClosingCommentUnitTest.inc new file mode 100644 index 00000000..d6c4cf6c --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/Commenting/LongConditionClosingCommentUnitTest.inc @@ -0,0 +1,1033 @@ + match ($foo) { + // Line 1 + // Line 2 + // Line 3 + // Line 4 + // Line 5 + // Line 6 + // Line 7 + // Line 8 + // Line 9 + // Line 10 + // Line 11 + // Line 12 + // Line 13 + // Line 14 + // Line 15 + // Line 16 + // Line 17 + // Line 18 + // Line 19 + // Line 20 + }, +]; diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/Commenting/LongConditionClosingCommentUnitTest.inc.fixed b/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/Commenting/LongConditionClosingCommentUnitTest.inc.fixed new file mode 100644 index 00000000..176cfe24 --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/Commenting/LongConditionClosingCommentUnitTest.inc.fixed @@ -0,0 +1,1033 @@ + match ($foo) { + // Line 1 + // Line 2 + // Line 3 + // Line 4 + // Line 5 + // Line 6 + // Line 7 + // Line 8 + // Line 9 + // Line 10 + // Line 11 + // Line 12 + // Line 13 + // Line 14 + // Line 15 + // Line 16 + // Line 17 + // Line 18 + // Line 19 + // Line 20 + },//end match +]; diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/Commenting/LongConditionClosingCommentUnitTest.js b/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/Commenting/LongConditionClosingCommentUnitTest.js new file mode 100644 index 00000000..c0cf2821 --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/Commenting/LongConditionClosingCommentUnitTest.js @@ -0,0 +1,444 @@ +function long_function() +{ + if (longFunction) { + // This is a long + // IF statement + // that does + // not have + // an ELSE + // block on it + variable = 'hello'; + + if (variable === 'hello') { + // This is a short + // IF statement + } + + if (variable === 'hello') { + // This is a short + // IF statement + } else { + // This is a short ELSE + // statement + } + }//end if + + if (longFunction) { + // This is a long + // IF statement + // that does + // not have + // an ELSE + // block on it + variable = 'hello'; + + if (variable === 'hello') { + // This is a short + // IF statement + } + + if (variable === 'hello') { + // This is a short + // IF statement + } else { + // This is a short ELSE + // statement + } + } + + if (longFunction) { + // This is a long + // IF statement + // that does + // not have + // an ELSE + // block on it + variable = 'hello'; + + if (variable === 'hello') { + // This is a short + // IF statement + } + + if (variable === 'hello') { + // This is a short + // IF statement + } else { + // This is a short ELSE + // statement + } + } else { + // Short ELSE + }//end if + + if (longFunction) { + // This is a long + // IF statement + // that does + // not have + // an ELSE + // block on it + variable = 'hello'; + + if (variable === 'hello') { + // This is a short + // IF statement + } + + if (variable === 'hello') { + // This is a short + // IF statement + } else { + // This is a short ELSE + // statement + } + } else { + // Short ELSE + } +} + +for (variable=1; variable < 20; variable++) { + // Line 1 + // Line 2 + // Line 3 + // Line 4 + // Line 5 + // Line 6 + // Line 7 + // Line 8 + // Line 9 + // Line 10 + // Line 11 + // Line 12 + // Line 13 + // Line 14 + // Line 15 + // Line 16 + // Line 17 + // Line 18 + // Line 19 + // Line 20 +}//end for + +for (variable=1; variable < 20; variable++) { + // Line 1 + // Line 2 + // Line 3 + // Line 4 + // Line 5 + // Line 6 + // Line 7 + // Line 8 + // Line 9 + for (val =1; val < 20; val++) { + // Short for. + } + // Line 13 + // Line 14 + // Line 15 + // Line 16 + // Line 17 + // Line 18 + // Line 19 + // Line 20 +} + +while (variable < 20) { + // Line 1 + // Line 2 + // Line 3 + // Line 4 + // Line 5 + // Line 6 + // Line 7 + // Line 8 + // Line 9 + // Line 10 + // Line 11 + // Line 12 + // Line 13 + // Line 14 + // Line 15 + // Line 16 + // Line 17 + // Line 18 + // Line 19 + // Line 20 +}//end while + +while (variable < 20) { + // Line 1 + // Line 2 + // Line 3 + // Line 4 + // Line 5 + // Line 6 + // Line 7 + // Line 8 + // Line 9 + while (something) { + // Short while. + } + // Line 13 + // Line 14 + // Line 15 + // Line 16 + // Line 17 + // Line 18 + // Line 19 + // Line 20 +} + +if (longFunction) { + // This is a long + // IF statement + // that does + // not have + // an ELSE + // block on it + variable = 'hello'; + + if (variable === 'hello') { + // This is a short + // IF statement + } + + if (variable === 'hello') { + // This is a short + // IF statement + } else { + // This is a short ELSE + // statement + } +} //end if + +if (longFunction) { + // This is a long + // IF statement + // that does + // not have + // an ELSE + // block on it + variable = 'hello'; + + if (variable === 'hello') { + // This is a short + // IF statement + } + + if (variable === 'hello') { + // This is a short + // IF statement + } else { + // This is a short ELSE + // statement + } +} else { + // Short ELSE +} //end if + +for (variable=1; variable < 20; variable++) { + // Line 1 + // Line 2 + // Line 3 + // Line 4 + // Line 5 + // Line 6 + // Line 7 + // Line 8 + // Line 9 + // Line 10 + // Line 11 + // Line 12 + // Line 13 + // Line 14 + // Line 15 + // Line 16 + // Line 17 + // Line 18 + // Line 19 + // Line 20 +} //end for + +while (variable < 20) { + // Line 1 + // Line 2 + // Line 3 + // Line 4 + // Line 5 + // Line 6 + // Line 7 + // Line 8 + // Line 9 + // Line 10 + // Line 11 + // Line 12 + // Line 13 + // Line 14 + // Line 15 + // Line 16 + // Line 17 + // Line 18 + // Line 19 + // Line 20 +} //end while + +while (variable < 20) { + // Line 1 + // Line 2 + // Line 3 + // Line 4 + // Line 5 + // Line 6 + // Line 7 + // Line 8 + // Line 9 + // Line 10 + // Line 11 + // Line 12 + // Line 13 + // Line 14 + // Line 15 + // Line 16 + // Line 17 + // Line 18 + // Line 19 + // Line 20 +}//end for + +if (true) { + // Line 1 + // Line 2 + // Line 3 + // Line 4 + // Line 5 + // Line 6 + // Line 7 + // Line 8 + // Line 9 + // Line 10 + // Line 11 + // Line 12 + // Line 13 + // Line 14 + // Line 15 + // Line 16 + // Line 17 + // Line 18 + // Line 19 + // Line 20 +} else if (condition) { + // Line 1 + // Line 2 + // Line 3 + // Line 4 + // Line 5 + // Line 6 + // Line 7 + // Line 8 + // Line 9 + // Line 10 + // Line 11 + // Line 12 + // Line 13 + // Line 14 + // Line 15 + // Line 16 + // Line 17 + // Line 18 + // Line 19 + // Line 20 +} else { + // Line 1 + // Line 2 + // Line 3 + // Line 4 + // Line 5 + // Line 6 + // Line 7 + // Line 8 + // Line 9 + // Line 10 + // Line 11 + // Line 12 + // Line 13 + // Line 14 + // Line 15 + // Line 16 + // Line 17 + // Line 18 + // Line 19 + // Line 20 +}//end if + +if (something) { + // Line 1 + // Line 2 +} else if (somethingElse) { + // Line 1 + // Line 2 +} else { + // Line 1 + // Line 2 + // Line 3 + // Line 4 + // Line 5 + // Line 6 + // Line 7 + // Line 8 + // Line 9 + // Line 10 + // Line 11 + // Line 12 + // Line 13 + // Line 14 + // Line 15 + // Line 16 + // Line 17 + // Line 18 + // Line 19 + // Line 20 +} + +switch (something) { + case '1': + // Line 1 + // Line 2 + // Line 3 + // Line 4 + // Line 5 + break; + case '2': + // Line 1 + // Line 2 + // Line 3 + // Line 4 + // Line 5 + break; + case '3': + // Line 1 + // Line 2 + // Line 3 + // Line 4 + // Line 5 + break; + case '4': + // Line 1 + // Line 2 + // Line 3 + // Line 4 + // Line 5 + break; + case '5': + // Line 1 + // Line 2 + // Line 3 + // Line 4 + // Line 5 + break; +} + +// Wrong comment +if (condition) { + condition = true; +}//end foreach diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/Commenting/LongConditionClosingCommentUnitTest.js.fixed b/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/Commenting/LongConditionClosingCommentUnitTest.js.fixed new file mode 100644 index 00000000..231b51c5 --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/Commenting/LongConditionClosingCommentUnitTest.js.fixed @@ -0,0 +1,444 @@ +function long_function() +{ + if (longFunction) { + // This is a long + // IF statement + // that does + // not have + // an ELSE + // block on it + variable = 'hello'; + + if (variable === 'hello') { + // This is a short + // IF statement + } + + if (variable === 'hello') { + // This is a short + // IF statement + } else { + // This is a short ELSE + // statement + } + }//end if + + if (longFunction) { + // This is a long + // IF statement + // that does + // not have + // an ELSE + // block on it + variable = 'hello'; + + if (variable === 'hello') { + // This is a short + // IF statement + } + + if (variable === 'hello') { + // This is a short + // IF statement + } else { + // This is a short ELSE + // statement + } + }//end if + + if (longFunction) { + // This is a long + // IF statement + // that does + // not have + // an ELSE + // block on it + variable = 'hello'; + + if (variable === 'hello') { + // This is a short + // IF statement + } + + if (variable === 'hello') { + // This is a short + // IF statement + } else { + // This is a short ELSE + // statement + } + } else { + // Short ELSE + }//end if + + if (longFunction) { + // This is a long + // IF statement + // that does + // not have + // an ELSE + // block on it + variable = 'hello'; + + if (variable === 'hello') { + // This is a short + // IF statement + } + + if (variable === 'hello') { + // This is a short + // IF statement + } else { + // This is a short ELSE + // statement + } + } else { + // Short ELSE + }//end if +} + +for (variable=1; variable < 20; variable++) { + // Line 1 + // Line 2 + // Line 3 + // Line 4 + // Line 5 + // Line 6 + // Line 7 + // Line 8 + // Line 9 + // Line 10 + // Line 11 + // Line 12 + // Line 13 + // Line 14 + // Line 15 + // Line 16 + // Line 17 + // Line 18 + // Line 19 + // Line 20 +}//end for + +for (variable=1; variable < 20; variable++) { + // Line 1 + // Line 2 + // Line 3 + // Line 4 + // Line 5 + // Line 6 + // Line 7 + // Line 8 + // Line 9 + for (val =1; val < 20; val++) { + // Short for. + } + // Line 13 + // Line 14 + // Line 15 + // Line 16 + // Line 17 + // Line 18 + // Line 19 + // Line 20 +}//end for + +while (variable < 20) { + // Line 1 + // Line 2 + // Line 3 + // Line 4 + // Line 5 + // Line 6 + // Line 7 + // Line 8 + // Line 9 + // Line 10 + // Line 11 + // Line 12 + // Line 13 + // Line 14 + // Line 15 + // Line 16 + // Line 17 + // Line 18 + // Line 19 + // Line 20 +}//end while + +while (variable < 20) { + // Line 1 + // Line 2 + // Line 3 + // Line 4 + // Line 5 + // Line 6 + // Line 7 + // Line 8 + // Line 9 + while (something) { + // Short while. + } + // Line 13 + // Line 14 + // Line 15 + // Line 16 + // Line 17 + // Line 18 + // Line 19 + // Line 20 +}//end while + +if (longFunction) { + // This is a long + // IF statement + // that does + // not have + // an ELSE + // block on it + variable = 'hello'; + + if (variable === 'hello') { + // This is a short + // IF statement + } + + if (variable === 'hello') { + // This is a short + // IF statement + } else { + // This is a short ELSE + // statement + } +} //end if + +if (longFunction) { + // This is a long + // IF statement + // that does + // not have + // an ELSE + // block on it + variable = 'hello'; + + if (variable === 'hello') { + // This is a short + // IF statement + } + + if (variable === 'hello') { + // This is a short + // IF statement + } else { + // This is a short ELSE + // statement + } +} else { + // Short ELSE +} //end if + +for (variable=1; variable < 20; variable++) { + // Line 1 + // Line 2 + // Line 3 + // Line 4 + // Line 5 + // Line 6 + // Line 7 + // Line 8 + // Line 9 + // Line 10 + // Line 11 + // Line 12 + // Line 13 + // Line 14 + // Line 15 + // Line 16 + // Line 17 + // Line 18 + // Line 19 + // Line 20 +} //end for + +while (variable < 20) { + // Line 1 + // Line 2 + // Line 3 + // Line 4 + // Line 5 + // Line 6 + // Line 7 + // Line 8 + // Line 9 + // Line 10 + // Line 11 + // Line 12 + // Line 13 + // Line 14 + // Line 15 + // Line 16 + // Line 17 + // Line 18 + // Line 19 + // Line 20 +} //end while + +while (variable < 20) { + // Line 1 + // Line 2 + // Line 3 + // Line 4 + // Line 5 + // Line 6 + // Line 7 + // Line 8 + // Line 9 + // Line 10 + // Line 11 + // Line 12 + // Line 13 + // Line 14 + // Line 15 + // Line 16 + // Line 17 + // Line 18 + // Line 19 + // Line 20 +}//end while + +if (true) { + // Line 1 + // Line 2 + // Line 3 + // Line 4 + // Line 5 + // Line 6 + // Line 7 + // Line 8 + // Line 9 + // Line 10 + // Line 11 + // Line 12 + // Line 13 + // Line 14 + // Line 15 + // Line 16 + // Line 17 + // Line 18 + // Line 19 + // Line 20 +} else if (condition) { + // Line 1 + // Line 2 + // Line 3 + // Line 4 + // Line 5 + // Line 6 + // Line 7 + // Line 8 + // Line 9 + // Line 10 + // Line 11 + // Line 12 + // Line 13 + // Line 14 + // Line 15 + // Line 16 + // Line 17 + // Line 18 + // Line 19 + // Line 20 +} else { + // Line 1 + // Line 2 + // Line 3 + // Line 4 + // Line 5 + // Line 6 + // Line 7 + // Line 8 + // Line 9 + // Line 10 + // Line 11 + // Line 12 + // Line 13 + // Line 14 + // Line 15 + // Line 16 + // Line 17 + // Line 18 + // Line 19 + // Line 20 +}//end if + +if (something) { + // Line 1 + // Line 2 +} else if (somethingElse) { + // Line 1 + // Line 2 +} else { + // Line 1 + // Line 2 + // Line 3 + // Line 4 + // Line 5 + // Line 6 + // Line 7 + // Line 8 + // Line 9 + // Line 10 + // Line 11 + // Line 12 + // Line 13 + // Line 14 + // Line 15 + // Line 16 + // Line 17 + // Line 18 + // Line 19 + // Line 20 +}//end if + +switch (something) { + case '1': + // Line 1 + // Line 2 + // Line 3 + // Line 4 + // Line 5 + break; + case '2': + // Line 1 + // Line 2 + // Line 3 + // Line 4 + // Line 5 + break; + case '3': + // Line 1 + // Line 2 + // Line 3 + // Line 4 + // Line 5 + break; + case '4': + // Line 1 + // Line 2 + // Line 3 + // Line 4 + // Line 5 + break; + case '5': + // Line 1 + // Line 2 + // Line 3 + // Line 4 + // Line 5 + break; +}//end switch + +// Wrong comment +if (condition) { + condition = true; +}//end if diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/Commenting/LongConditionClosingCommentUnitTest.php b/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/Commenting/LongConditionClosingCommentUnitTest.php new file mode 100644 index 00000000..5b61612c --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/Commenting/LongConditionClosingCommentUnitTest.php @@ -0,0 +1,103 @@ + + * @copyright 2006-2015 Squiz Pty Ltd (ABN 77 084 670 600) + * @license https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence + */ + +namespace PHP_CodeSniffer\Standards\Squiz\Tests\Commenting; + +use PHP_CodeSniffer\Tests\Standards\AbstractSniffUnitTest; + +class LongConditionClosingCommentUnitTest extends AbstractSniffUnitTest +{ + + + /** + * Returns the lines where errors should occur. + * + * The key of the array should represent the line number and the value + * should represent the number of errors that should occur on that line. + * + * @param string $testFile The name of the file being tested. + * + * @return array + */ + public function getErrorList($testFile='LongConditionClosingCommentUnitTest.inc') + { + switch ($testFile) { + case 'LongConditionClosingCommentUnitTest.inc': + return [ + 49 => 1, + 99 => 1, + 146 => 1, + 192 => 1, + 215 => 1, + 238 => 1, + 261 => 1, + 286 => 1, + 309 => 1, + 332 => 1, + 355 => 1, + 378 => 1, + 493 => 1, + 531 => 1, + 536 => 1, + 540 => 1, + 562 => 1, + 601 => 1, + 629 => 1, + 663 => 1, + 765 => 1, + 798 => 1, + 811 => 1, + 897 => 1, + 931 => 1, + 962 => 1, + 985 => 2, + 1008 => 1, + 1032 => 1, + ]; + break; + case 'LongConditionClosingCommentUnitTest.js': + return [ + 47 => 1, + 97 => 1, + 144 => 1, + 190 => 1, + 213 => 1, + 238 => 1, + 261 => 1, + 284 => 1, + 307 => 1, + 401 => 1, + 439 => 1, + 444 => 1, + ]; + break; + default: + return []; + break; + }//end switch + + }//end getErrorList() + + + /** + * Returns the lines where warnings should occur. + * + * The key of the array should represent the line number and the value + * should represent the number of warnings that should occur on that line. + * + * @return array + */ + public function getWarningList() + { + return []; + + }//end getWarningList() + + +}//end class diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/Commenting/PostStatementCommentUnitTest.1.js b/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/Commenting/PostStatementCommentUnitTest.1.js new file mode 100644 index 00000000..6de64210 --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/Commenting/PostStatementCommentUnitTest.1.js @@ -0,0 +1,36 @@ +function test(id, buttons) // cool function +{ + alert('hello'); + alert('hello again'); // And again. + // Valid comment. + +}//end test() + +var good = true; // Indeed. + +mig.Gallery.prototype = { + + init: function(cb) + { + + },//end init() + + imageClicked: function(id) + { + + }//end imageClicked() + +}; + +dfx.getIframeDocument = function(iframe) +{ + + return doc; + +};//end dfx.getIframeDocument() + +// Verify that multi-line control structure with comments and annotations are left alone. +if (condition // comment + && anotherCondition) { + condition = true; +} diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/Commenting/PostStatementCommentUnitTest.1.js.fixed b/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/Commenting/PostStatementCommentUnitTest.1.js.fixed new file mode 100644 index 00000000..1953760d --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/Commenting/PostStatementCommentUnitTest.1.js.fixed @@ -0,0 +1,39 @@ +function test(id, buttons) +// cool function +{ + alert('hello'); + alert('hello again'); +// And again. + // Valid comment. + +}//end test() + +var good = true; +// Indeed. + +mig.Gallery.prototype = { + + init: function(cb) + { + + },//end init() + + imageClicked: function(id) + { + + }//end imageClicked() + +}; + +dfx.getIframeDocument = function(iframe) +{ + + return doc; + +};//end dfx.getIframeDocument() + +// Verify that multi-line control structure with comments and annotations are left alone. +if (condition // comment + && anotherCondition) { + condition = true; +} diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/Commenting/PostStatementCommentUnitTest.2.js b/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/Commenting/PostStatementCommentUnitTest.2.js new file mode 100644 index 00000000..88d0e7d4 --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/Commenting/PostStatementCommentUnitTest.2.js @@ -0,0 +1,2 @@ +// Comment as first thing in a JS file. +var i = 100; diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/Commenting/PostStatementCommentUnitTest.inc b/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/Commenting/PostStatementCommentUnitTest.inc new file mode 100644 index 00000000..b8346961 --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/Commenting/PostStatementCommentUnitTest.inc @@ -0,0 +1,54 @@ + function($b) { + }, // comment. + 'key' => 'value', // phpcs:ignore Standard.Category.SniffName -- for reasons. + 'key' => 'value', // comment. +]; + +// Verify that multi-line control structure with comments and annotations are left alone. +for ( + $i = 0; /* Start */ + $i < 10; /* phpcs:ignore Standard.Category.SniffName -- for reasons. */ + $i++ // comment + +) {} + +if ( $condition === true // comment + && $anotherCondition === false +) {} + +$match = match($foo // comment + && $bar +) { + 1 => 1, // comment +}; diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/Commenting/PostStatementCommentUnitTest.inc.fixed b/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/Commenting/PostStatementCommentUnitTest.inc.fixed new file mode 100644 index 00000000..21a4bbe0 --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/Commenting/PostStatementCommentUnitTest.inc.fixed @@ -0,0 +1,59 @@ + function($b) { + }, // comment. + 'key' => 'value', // phpcs:ignore Standard.Category.SniffName -- for reasons. + 'key' => 'value', +// comment. +]; + +// Verify that multi-line control structure with comments and annotations are left alone. +for ( + $i = 0; /* Start */ + $i < 10; /* phpcs:ignore Standard.Category.SniffName -- for reasons. */ + $i++ // comment + +) {} + +if ( $condition === true // comment + && $anotherCondition === false +) {} + +$match = match($foo // comment + && $bar +) { + 1 => 1, +// comment +}; diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/Commenting/PostStatementCommentUnitTest.php b/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/Commenting/PostStatementCommentUnitTest.php new file mode 100644 index 00000000..a04426f1 --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/Commenting/PostStatementCommentUnitTest.php @@ -0,0 +1,69 @@ + + * @copyright 2006-2015 Squiz Pty Ltd (ABN 77 084 670 600) + * @license https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence + */ + +namespace PHP_CodeSniffer\Standards\Squiz\Tests\Commenting; + +use PHP_CodeSniffer\Tests\Standards\AbstractSniffUnitTest; + +class PostStatementCommentUnitTest extends AbstractSniffUnitTest +{ + + + /** + * Returns the lines where errors should occur. + * + * The key of the array should represent the line number and the value + * should represent the number of errors that should occur on that line. + * + * @param string $testFile The name of the file being tested. + * + * @return array + */ + public function getErrorList($testFile='PostStatementCommentUnitTest.inc') + { + switch ($testFile) { + case 'PostStatementCommentUnitTest.inc': + return [ + 6 => 1, + 10 => 1, + 18 => 1, + 35 => 1, + 53 => 1, + ]; + + case 'PostStatementCommentUnitTest.1.js': + return [ + 1 => 1, + 4 => 1, + 9 => 1, + ]; + + default: + return []; + }//end switch + + }//end getErrorList() + + + /** + * Returns the lines where warnings should occur. + * + * The key of the array should represent the line number and the value + * should represent the number of warnings that should occur on that line. + * + * @return array + */ + public function getWarningList() + { + return []; + + }//end getWarningList() + + +}//end class diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/Commenting/VariableCommentUnitTest.inc b/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/Commenting/VariableCommentUnitTest.inc new file mode 100644 index 00000000..c2046b17 --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/Commenting/VariableCommentUnitTest.inc @@ -0,0 +1,385 @@ + $content) { + echo $content; + } + + return $var1; + + }//end checkVariable() + + + /** + * + * + */ + $emptyVarDoc = ''; + + /** + * Var type checking (int v.s. integer). + * + * @var int + */ + private $_varSimpleTypeCheck; + + + /** + * Var type checking (array(int => string) v.s. array(int => string)). + * + * @var array(int => string) + */ + private $_varArrayTypeCheck; + + + /** + * Boolean @var tag Capitalized + * + * @var Boolean + */ + public $CapBoolTag = true; + + + /** + * Boolean @var tag Capitalized + * + * @var BOOLEAN + */ + public $CapBoolTag2 = true; + + + /** + * Double @var tag Capitalized + * + * @var Double + */ + public $CapDoubleTag = 1; + + + /** + * Double @var tag Capitalized + * + * @var DOUBLE + */ + public $CapDoubleTag2 = 1; + + + /** + * Real @var tag Capitalized + * + * @var Real + */ + public $CapRealTag = 1; + + + /** + * Real @var tag Capitalized + * + * @var REAL + */ + public $CapRealTag2 = 1; + + + /** + * Float @var tag Capitalized + * + * @var Float + */ + public $CapFloatTag = 1; + + + /** + * Float @var tag Capitalized + * + * @var FLOAT + */ + public $CapFloatTag2 = 1; + + + /** + * Int @var tag Capitalized + * + * @var Int + */ + public $CapIntTag = 1; + + + /** + * Int @var tag Capitalized + * + * @var INT + */ + public $CapIntTag2 = 1; + + + /** + * Integer @var tag Capitalized + * + * @var Integer + */ + public $CapIntTag3 = 1; + + + /** + * Integer @var tag Capitalized + * + * @var INTEGER + */ + public $CapIntTag4 = 1; + + + /** + * Array @var tag Capitalized + * + * @var Array + */ + public $CapVarTag = []; + + + /** + * Array @var tag All Caps + * + * @var ARRAY + */ + public $CapVarTag2 = []; + + + /** + * Array @var tag Capitalized + * + * @var Array() + */ + public $CapVarTag3 = []; + + + /** + * Array @var tag All Caps + * + * @var ARRAY() + */ + public $CapVarTag4 = []; + + + /** + * Var type checking (STRING v.s. string). + * + * @var STRING + */ + private $_varCaseTypeCheck; + + + /** + * @var integer + */ + private $_varWithNoShortComment; + + protected $noComment2 = ''; + + + /** + * @var int Var type checking (int v.s. integer) with single-line comment. + */ + private $_varSimpleTypeCheckSingleLine; + + +}//end class + + +/** + * VariableCommentUnitTest2. + * + * Long description goes here. + * + */ +class VariableCommentUnitTest2 +{ + + public $hello; + + /** Comment starts here. + * + * @var string + * + */ + private $_varCaseTypeCheck; + + /** + * 这是一条测试评论. + * + * @var string + */ + public $foo; + +}//end class + + +/* + * Class comment + */ +class Foo +{ + + protected $bar; + + /** + * Short description of the member variable. + * + * @var array + */ + public static array $variableName = array(); + +} + +class Foo +{ + + /** + * Short description of the member variable. + * + * @var array + */ + public array $variableName = array(); + + + // Not "/**" style comment. + // + // @var string + private ?Folder\ClassName $_incorrectCommentStyle = null; + + + var int $noComment = 1; + } + +class HasAttributes +{ + /** + * Short description of the member variable. + * + * @var array + */ + #[ORM\Id]#[ORM\Column("integer")] + private $id; + + /** + * Short description of the member variable. + * + * @var array + */ + #[ORM\GeneratedValue] + #[ORM\Column(ORM\Column::T_INTEGER)] + protected $height; +} diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/Commenting/VariableCommentUnitTest.inc.fixed b/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/Commenting/VariableCommentUnitTest.inc.fixed new file mode 100644 index 00000000..37ca1ceb --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/Commenting/VariableCommentUnitTest.inc.fixed @@ -0,0 +1,385 @@ + $content) { + echo $content; + } + + return $var1; + + }//end checkVariable() + + + /** + * + * + */ + $emptyVarDoc = ''; + + /** + * Var type checking (int v.s. integer). + * + * @var integer + */ + private $_varSimpleTypeCheck; + + + /** + * Var type checking (array(int => string) v.s. array(int => string)). + * + * @var array(integer => string) + */ + private $_varArrayTypeCheck; + + + /** + * Boolean @var tag Capitalized + * + * @var boolean + */ + public $CapBoolTag = true; + + + /** + * Boolean @var tag Capitalized + * + * @var boolean + */ + public $CapBoolTag2 = true; + + + /** + * Double @var tag Capitalized + * + * @var float + */ + public $CapDoubleTag = 1; + + + /** + * Double @var tag Capitalized + * + * @var float + */ + public $CapDoubleTag2 = 1; + + + /** + * Real @var tag Capitalized + * + * @var float + */ + public $CapRealTag = 1; + + + /** + * Real @var tag Capitalized + * + * @var float + */ + public $CapRealTag2 = 1; + + + /** + * Float @var tag Capitalized + * + * @var float + */ + public $CapFloatTag = 1; + + + /** + * Float @var tag Capitalized + * + * @var float + */ + public $CapFloatTag2 = 1; + + + /** + * Int @var tag Capitalized + * + * @var integer + */ + public $CapIntTag = 1; + + + /** + * Int @var tag Capitalized + * + * @var integer + */ + public $CapIntTag2 = 1; + + + /** + * Integer @var tag Capitalized + * + * @var integer + */ + public $CapIntTag3 = 1; + + + /** + * Integer @var tag Capitalized + * + * @var integer + */ + public $CapIntTag4 = 1; + + + /** + * Array @var tag Capitalized + * + * @var array + */ + public $CapVarTag = []; + + + /** + * Array @var tag All Caps + * + * @var array + */ + public $CapVarTag2 = []; + + + /** + * Array @var tag Capitalized + * + * @var array + */ + public $CapVarTag3 = []; + + + /** + * Array @var tag All Caps + * + * @var array + */ + public $CapVarTag4 = []; + + + /** + * Var type checking (STRING v.s. string). + * + * @var string + */ + private $_varCaseTypeCheck; + + + /** + * @var integer + */ + private $_varWithNoShortComment; + + protected $noComment2 = ''; + + + /** + * @var integer Var type checking (int v.s. integer) with single-line comment. + */ + private $_varSimpleTypeCheckSingleLine; + + +}//end class + + +/** + * VariableCommentUnitTest2. + * + * Long description goes here. + * + */ +class VariableCommentUnitTest2 +{ + + public $hello; + + /** Comment starts here. + * + * @var string + * + */ + private $_varCaseTypeCheck; + + /** + * 这是一条测试评论. + * + * @var string + */ + public $foo; + +}//end class + + +/* + * Class comment + */ +class Foo +{ + + protected $bar; + + /** + * Short description of the member variable. + * + * @var array + */ + public static array $variableName = array(); + +} + +class Foo +{ + + /** + * Short description of the member variable. + * + * @var array + */ + public array $variableName = array(); + + + // Not "/**" style comment. + // + // @var string + private ?Folder\ClassName $_incorrectCommentStyle = null; + + + var int $noComment = 1; + } + +class HasAttributes +{ + /** + * Short description of the member variable. + * + * @var array + */ + #[ORM\Id]#[ORM\Column("integer")] + private $id; + + /** + * Short description of the member variable. + * + * @var array + */ + #[ORM\GeneratedValue] + #[ORM\Column(ORM\Column::T_INTEGER)] + protected $height; +} diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/Commenting/VariableCommentUnitTest.php b/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/Commenting/VariableCommentUnitTest.php new file mode 100644 index 00000000..f3ee3c76 --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/Commenting/VariableCommentUnitTest.php @@ -0,0 +1,81 @@ + + * @copyright 2006-2015 Squiz Pty Ltd (ABN 77 084 670 600) + * @license https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence + */ + +namespace PHP_CodeSniffer\Standards\Squiz\Tests\Commenting; + +use PHP_CodeSniffer\Tests\Standards\AbstractSniffUnitTest; + +class VariableCommentUnitTest extends AbstractSniffUnitTest +{ + + + /** + * Returns the lines where errors should occur. + * + * The key of the array should represent the line number and the value + * should represent the number of errors that should occur on that line. + * + * @return array + */ + public function getErrorList() + { + return [ + 21 => 1, + 24 => 1, + 56 => 1, + 64 => 1, + 73 => 1, + 84 => 1, + 130 => 1, + 136 => 1, + 144 => 1, + 152 => 1, + 160 => 1, + 168 => 1, + 176 => 1, + 184 => 1, + 192 => 1, + 200 => 1, + 208 => 1, + 216 => 1, + 224 => 1, + 232 => 1, + 240 => 1, + 248 => 1, + 256 => 1, + 264 => 1, + 272 => 1, + 280 => 1, + 290 => 1, + 294 => 1, + 311 => 1, + 336 => 1, + 361 => 1, + 364 => 1, + ]; + + }//end getErrorList() + + + /** + * Returns the lines where warnings should occur. + * + * The key of the array should represent the line number and the value + * should represent the number of warnings that should occur on that line. + * + * @return array + */ + public function getWarningList() + { + return [93 => 1]; + + }//end getWarningList() + + +}//end class diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/ControlStructures/ControlSignatureUnitTest.inc b/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/ControlStructures/ControlSignatureUnitTest.inc new file mode 100644 index 00000000..8eaf1b03 --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/ControlStructures/ControlSignatureUnitTest.inc @@ -0,0 +1,310 @@ + 0); + +do +{ + echo $i; +} while ($i > 0); + +do +{ + echo $i; +} +while ($i > 0); + +do { echo $i; } while ($i > 0); + +do{ + echo $i; +}while($i > 0); + +while ($i < 1) { + echo $i; +} + +while($i < 1){ + echo $i; +} + +while ($i < 1) { echo $i; } + +for ($i = 1; $i < 1; $i++) { + echo $i; +} + +for($i = 1; $i < 1; $i++){ + echo $i; +} + +for ($i = 1; $i < 1; $i++) { echo $i; } + +if ($i == 0) { + $i = 1; +} + +if($i == 0){ + $i = 1; +} + +if ($i == 0) { $i = 1; } + +if ($i == 0) { + $i = 1; +} else { + $i = 0; +} + +if ($i == 0) { + $i = 1; +}else{ + $i = 0; +} + +if ($i == 0) { $i = 1; } else { $i = 0; } + +if ($i == 0) { + $i = 1; +} else if ($i == 2) { + $i = 0; +} + +if ($i == 0) { + $i = 1; +}else if($i == 2){ + $i = 0; +} + +if ($i == 0) { $i = 1; } else if ($i == 2) { $i = 0; } + +if ($i == 0) { // comments are allowed + $i = 1; +} + +if ($i == 0) {// comments are allowed + $i = 1; +} + +if ($i == 0) { /* comments are allowed*/ + $i = 1; +} + +if ($i == 0) +{ // this is ok + $i = 1; +} + +if ($i == 0) /* this is ok */ { +} + +try { + $code = 'this'; +} catch (Exception $e) { + // Caught! +} + +try { $code = 'this'; } catch (Exception $e) { + // Caught! +} + +do { echo $i; +} while ($i > 0); + +if ($i === 0) { + + $i = 1 +} + +if ($a) { + +} +elseif ($b) { +} + +foreach ($items as $item) { + echo $item; +} + +foreach($items as $item){ + echo $item; +} + +if ($a && $b) // && $c) +{ +} + +if ($a == 5) : + echo "a equals 5"; + echo "..."; +elseif ($a == 6) : + echo "a equals 6"; + echo "!!!"; +else : + echo "a is neither 5 nor 6"; +endif; + +try { + // try body +} +catch (FirstExceptionType $e) { + // catch body +} +catch (OtherExceptionType $e) { + // catch body +} + +switch($foo) { + + case 'bar': + break; + +} + +if ($foo) : +endif; + +?> + +getRow()): ?> +

    + + + +
    + +
    + + + + + + + hello + + + + hello + + + + +getRow()) : ?> +

    + + + + + + + + hello + + + + hello + + 1, +}; + +$r = match($x){1 => 1}; + +// Intentional parse error. This should be the last test in the file. +foreach + // Some unrelated comment. diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/ControlStructures/ControlSignatureUnitTest.inc.fixed b/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/ControlStructures/ControlSignatureUnitTest.inc.fixed new file mode 100644 index 00000000..dc5233d9 --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/ControlStructures/ControlSignatureUnitTest.inc.fixed @@ -0,0 +1,314 @@ + 0); + +do { + echo $i; +} while ($i > 0); + +do { + echo $i; +} while ($i > 0); + +do { +echo $i; } while ($i > 0); + +do { + echo $i; +} while ($i > 0); + +while ($i < 1) { + echo $i; +} + +while ($i < 1) { + echo $i; +} + +while ($i < 1) { +echo $i; } + +for ($i = 1; $i < 1; $i++) { + echo $i; +} + +for ($i = 1; $i < 1; $i++) { + echo $i; +} + +for ($i = 1; $i < 1; $i++) { +echo $i; } + +if ($i == 0) { + $i = 1; +} + +if ($i == 0) { + $i = 1; +} + +if ($i == 0) { +$i = 1; } + +if ($i == 0) { + $i = 1; +} else { + $i = 0; +} + +if ($i == 0) { + $i = 1; +} else { + $i = 0; +} + +if ($i == 0) { +$i = 1; } else { +$i = 0; } + +if ($i == 0) { + $i = 1; +} else if ($i == 2) { + $i = 0; +} + +if ($i == 0) { + $i = 1; +} else if ($i == 2) { + $i = 0; +} + +if ($i == 0) { +$i = 1; } else if ($i == 2) { +$i = 0; } + +if ($i == 0) { // comments are allowed + $i = 1; +} + +if ($i == 0) {// comments are allowed + $i = 1; +} + +if ($i == 0) { /* comments are allowed*/ + $i = 1; +} + +if ($i == 0) { // this is ok + $i = 1; +} + +if ($i == 0) { /* this is ok */ +} + +try { + $code = 'this'; +} catch (Exception $e) { + // Caught! +} + +try { +$code = 'this'; } catch (Exception $e) { + // Caught! +} + +do { +echo $i; +} while ($i > 0); + +if ($i === 0) { + + $i = 1 +} + +if ($a) { + +} elseif ($b) { +} + +foreach ($items as $item) { + echo $item; +} + +foreach ($items as $item) { + echo $item; +} + +if ($a && $b) { // && $c) +} + +if ($a == 5) : + echo "a equals 5"; + echo "..."; +elseif ($a == 6) : + echo "a equals 6"; + echo "!!!"; +else : + echo "a is neither 5 nor 6"; +endif; + +try { + // try body +} catch (FirstExceptionType $e) { + // catch body +} catch (OtherExceptionType $e) { + // catch body +} + +switch ($foo) { + + case 'bar': + break; + +} + +if ($foo) : +endif; + +?> + +getRow()) : ?> +

    + + + +
    + +
    + + + + + + + hello + + + + hello + + + + +getRow()): ?> +

    + + + + + + + + hello + + + + hello + + 1, +}; + +$r = match ($x) { +1 => 1}; + +// Intentional parse error. This should be the last test in the file. +foreach + // Some unrelated comment. diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/ControlStructures/ControlSignatureUnitTest.js b/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/ControlStructures/ControlSignatureUnitTest.js new file mode 100644 index 00000000..6c2e9ffe --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/ControlStructures/ControlSignatureUnitTest.js @@ -0,0 +1,135 @@ + +i = 0; +do { + i = 0; +} while (i > 0); + +do +{ + i = 0; +} while (i > 0); + +do +{ + i = 0; +} +while (i > 0); + +do { i = 0; } while (i > 0); + +do{ + i = 0; +}while(i > 0); + +while (i < 1) { + i = 0; +} + +while(i < 1){ + i = 0; +} + +while (i < 1) { i = 0; } + +for (i = 1; i < 1; i++) { + i = 0; +} + +for(i = 1; i < 1; i++){ + i = 0; +} + +for (i = 1; i < 1; i++) { i = 0; } + +if (i == 0) { + i = 1; +} + +if(i == 0){ + i = 1; +} + +if (i == 0) { i = 1; } + +if (i == 0) { + i = 1; +} else { + i = 0; +} + +if (i == 0) { + i = 1; +}else{ + i = 0; +} + +if (i == 0) { i = 1; } else { i = 0; } + +if (i == 0) { + i = 1; +} else if (i == 2) { + i = 0; +} + +if (i == 0) { + i = 1; +}else if(i == 2){ + i = 0; +} + +if (i == 0) { i = 1; } else if (i == 2) { i = 0; } + +if (i == 0) { // comments are allowed + i = 1; +} + +if (i == 0) {// comments are allowed + i = 1; +} + +if (i == 0) { /* comments are allowed*/ + i = 1; +} + +if (i == 0) +{ // this is ok + i = 1; +} + +if (i == 0) /* this is ok */ { +} + +try { + code = 'this'; +} catch (e) { + // Caught! +} + +try { code = 'this'; } catch (e) { + // Caught! +} + +do { i = 0; +} while (i > 0); + +if (i === 0) { + + i = 1 +} + +if (window.jQuery)(function($) { + $.fn.reset = function() { + return this.each(function() { + try { + this.reset(); + } catch (e) { + } + }); + }; +})(jQuery); + +if ($("#myid").rotationDegrees()=='90') + $('.modal').css({'transform': 'rotate(90deg)'}); + +if ($("#myid").rotationDegrees()=='90') + $foo = {'transform': 'rotate(90deg)'}; diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/ControlStructures/ControlSignatureUnitTest.js.fixed b/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/ControlStructures/ControlSignatureUnitTest.js.fixed new file mode 100644 index 00000000..e3ed6de7 --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/ControlStructures/ControlSignatureUnitTest.js.fixed @@ -0,0 +1,141 @@ + +i = 0; +do { + i = 0; +} while (i > 0); + +do { + i = 0; +} while (i > 0); + +do { + i = 0; +} while (i > 0); + +do { +i = 0; } while (i > 0); + +do { + i = 0; +} while (i > 0); + +while (i < 1) { + i = 0; +} + +while (i < 1) { + i = 0; +} + +while (i < 1) { +i = 0; } + +for (i = 1; i < 1; i++) { + i = 0; +} + +for (i = 1; i < 1; i++) { + i = 0; +} + +for (i = 1; i < 1; i++) { +i = 0; } + +if (i == 0) { + i = 1; +} + +if (i == 0) { + i = 1; +} + +if (i == 0) { +i = 1; } + +if (i == 0) { + i = 1; +} else { + i = 0; +} + +if (i == 0) { + i = 1; +} else { + i = 0; +} + +if (i == 0) { +i = 1; } else { +i = 0; } + +if (i == 0) { + i = 1; +} else if (i == 2) { + i = 0; +} + +if (i == 0) { + i = 1; +} else if (i == 2) { + i = 0; +} + +if (i == 0) { +i = 1; } else if (i == 2) { +i = 0; } + +if (i == 0) { // comments are allowed + i = 1; +} + +if (i == 0) {// comments are allowed + i = 1; +} + +if (i == 0) { /* comments are allowed*/ + i = 1; +} + +if (i == 0) { // this is ok + i = 1; +} + +if (i == 0) { /* this is ok */ +} + +try { + code = 'this'; +} catch (e) { + // Caught! +} + +try { +code = 'this'; } catch (e) { + // Caught! +} + +do { +i = 0; +} while (i > 0); + +if (i === 0) { + + i = 1 +} + +if (window.jQuery)(function($) { + $.fn.reset = function() { + return this.each(function() { + try { + this.reset(); + } catch (e) { + } + }); + }; +})(jQuery); + +if ($("#myid").rotationDegrees()=='90') + $('.modal').css({'transform': 'rotate(90deg)'}); + +if ($("#myid").rotationDegrees()=='90') + $foo = {'transform': 'rotate(90deg)'}; diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/ControlStructures/ControlSignatureUnitTest.php b/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/ControlStructures/ControlSignatureUnitTest.php new file mode 100644 index 00000000..92427f0d --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/ControlStructures/ControlSignatureUnitTest.php @@ -0,0 +1,102 @@ + + * @copyright 2006-2015 Squiz Pty Ltd (ABN 77 084 670 600) + * @license https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence + */ + +namespace PHP_CodeSniffer\Standards\Squiz\Tests\ControlStructures; + +use PHP_CodeSniffer\Tests\Standards\AbstractSniffUnitTest; + +class ControlSignatureUnitTest extends AbstractSniffUnitTest +{ + + + /** + * Returns the lines where errors should occur. + * + * The key of the array should represent the line number and the value + * should represent the number of errors that should occur on that line. + * + * @param string $testFile The name of the file being tested. + * + * @return array + */ + public function getErrorList($testFile='ControlSignatureUnitTest.inc') + { + $errors = [ + 7 => 1, + 12 => 1, + 15 => 1, + 18 => 1, + 20 => 1, + 22 => 2, + 28 => 2, + 32 => 1, + 38 => 2, + 42 => 1, + 48 => 2, + 52 => 1, + 62 => 2, + 66 => 2, + 76 => 4, + 80 => 2, + 94 => 1, + 99 => 1, + 108 => 1, + 112 => 1, + ]; + + if ($testFile === 'ControlSignatureUnitTest.inc') { + $errors[122] = 1; + $errors[130] = 2; + $errors[134] = 1; + $errors[150] = 1; + $errors[153] = 1; + $errors[158] = 1; + $errors[165] = 1; + $errors[170] = 2; + $errors[185] = 1; + $errors[190] = 2; + $errors[191] = 2; + $errors[195] = 1; + $errors[227] = 1; + $errors[234] = 1; + $errors[239] = 2; + $errors[243] = 2; + $errors[244] = 2; + $errors[248] = 1; + $errors[259] = 1; + $errors[262] = 1; + $errors[267] = 1; + $errors[269] = 1; + $errors[276] = 1; + $errors[279] = 1; + $errors[283] = 1; + $errors[306] = 3; + }//end if + + return $errors; + + }//end getErrorList() + + + /** + * Returns the lines where warnings should occur. + * + * The key of the array should represent the line number and the value + * should represent the number of warnings that should occur on that line. + * + * @return array + */ + public function getWarningList() + { + return []; + + }//end getWarningList() + + +}//end class diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/ControlStructures/ElseIfDeclarationUnitTest.inc b/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/ControlStructures/ElseIfDeclarationUnitTest.inc new file mode 100644 index 00000000..91d0a23c --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/ControlStructures/ElseIfDeclarationUnitTest.inc @@ -0,0 +1,14 @@ + + * @copyright 2006-2015 Squiz Pty Ltd (ABN 77 084 670 600) + * @license https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence + */ + +namespace PHP_CodeSniffer\Standards\Squiz\Tests\ControlStructures; + +use PHP_CodeSniffer\Tests\Standards\AbstractSniffUnitTest; + +class ElseIfDeclarationUnitTest extends AbstractSniffUnitTest +{ + + + /** + * Returns the lines where errors should occur. + * + * The key of the array should represent the line number and the value + * should represent the number of errors that should occur on that line. + * + * @return array + */ + public function getErrorList() + { + return [ + 8 => 1, + 13 => 1, + ]; + + }//end getErrorList() + + + /** + * Returns the lines where warnings should occur. + * + * The key of the array should represent the line number and the value + * should represent the number of warnings that should occur on that line. + * + * @return array + */ + public function getWarningList() + { + return []; + + }//end getWarningList() + + +}//end class diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/ControlStructures/ForEachLoopDeclarationUnitTest.inc b/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/ControlStructures/ForEachLoopDeclarationUnitTest.inc new file mode 100644 index 00000000..4709923e --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/ControlStructures/ForEachLoopDeclarationUnitTest.inc @@ -0,0 +1,36 @@ + $that) { +} + +// Invalid. +foreach ( $something as $blah => $that ) { +} + +foreach ($something as $blah => $that) { +} + +foreach ($something as $blah => $that) { +} + +foreach (${something}AS$blah=>$that) { +} + +// The works. +foreach ( $something aS $blah => $that ) { +} + +// phpcs:set Squiz.ControlStructures.ForEachLoopDeclaration requiredSpacesAfterOpen 1 +// phpcs:set Squiz.ControlStructures.ForEachLoopDeclaration requiredSpacesBeforeClose 1 +foreach ($something as $blah => $that) {} +foreach ( $something as $blah => $that ) {} +foreach ( $something as $blah => $that ) {} +// phpcs:set Squiz.ControlStructures.ForEachLoopDeclaration requiredSpacesAfterOpen 0 +// phpcs:set Squiz.ControlStructures.ForEachLoopDeclaration requiredSpacesBeforeClose 0 + +foreach ([ + 'foo' => 'bar', + 'foobaz' => 'bazzy', + ] as $key => $value) { +} diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/ControlStructures/ForEachLoopDeclarationUnitTest.inc.fixed b/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/ControlStructures/ForEachLoopDeclarationUnitTest.inc.fixed new file mode 100644 index 00000000..b0de6ebc --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/ControlStructures/ForEachLoopDeclarationUnitTest.inc.fixed @@ -0,0 +1,36 @@ + $that) { +} + +// Invalid. +foreach ($something as $blah => $that) { +} + +foreach ($something as $blah => $that) { +} + +foreach ($something as $blah => $that) { +} + +foreach (${something} as $blah => $that) { +} + +// The works. +foreach ($something as $blah => $that) { +} + +// phpcs:set Squiz.ControlStructures.ForEachLoopDeclaration requiredSpacesAfterOpen 1 +// phpcs:set Squiz.ControlStructures.ForEachLoopDeclaration requiredSpacesBeforeClose 1 +foreach ( $something as $blah => $that ) {} +foreach ( $something as $blah => $that ) {} +foreach ( $something as $blah => $that ) {} +// phpcs:set Squiz.ControlStructures.ForEachLoopDeclaration requiredSpacesAfterOpen 0 +// phpcs:set Squiz.ControlStructures.ForEachLoopDeclaration requiredSpacesBeforeClose 0 + +foreach ([ + 'foo' => 'bar', + 'foobaz' => 'bazzy', + ] as $key => $value) { +} diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/ControlStructures/ForEachLoopDeclarationUnitTest.php b/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/ControlStructures/ForEachLoopDeclarationUnitTest.php new file mode 100644 index 00000000..6957ff67 --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/ControlStructures/ForEachLoopDeclarationUnitTest.php @@ -0,0 +1,56 @@ + + * @copyright 2006-2015 Squiz Pty Ltd (ABN 77 084 670 600) + * @license https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence + */ + +namespace PHP_CodeSniffer\Standards\Squiz\Tests\ControlStructures; + +use PHP_CodeSniffer\Tests\Standards\AbstractSniffUnitTest; + +class ForEachLoopDeclarationUnitTest extends AbstractSniffUnitTest +{ + + + /** + * Returns the lines where errors should occur. + * + * The key of the array should represent the line number and the value + * should represent the number of errors that should occur on that line. + * + * @return array + */ + public function getErrorList() + { + return [ + 8 => 2, + 11 => 2, + 14 => 2, + 17 => 5, + 21 => 7, + 26 => 2, + 28 => 2, + ]; + + }//end getErrorList() + + + /** + * Returns the lines where warnings should occur. + * + * The key of the array should represent the line number and the value + * should represent the number of warnings that should occur on that line. + * + * @return array + */ + public function getWarningList() + { + return []; + + }//end getWarningList() + + +}//end class diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/ControlStructures/ForLoopDeclarationUnitTest.inc b/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/ControlStructures/ForLoopDeclarationUnitTest.inc new file mode 100644 index 00000000..5022e74c --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/ControlStructures/ForLoopDeclarationUnitTest.inc @@ -0,0 +1,129 @@ +i ; }; $i < function() { return $this->max; }; $i++) {} +for ($i = function() { return $this->i; }; $i < function() { return $this->max; } ; $i++) {} + +// phpcs:set Squiz.ControlStructures.ForLoopDeclaration ignoreNewlines true +for ( + $i = 0; + $i < 5; + $i++ +) { + // body here +} +// phpcs:set Squiz.ControlStructures.ForLoopDeclaration ignoreNewlines false + +// This test has to be the last one in the file! Intentional parse error check. +for diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/ControlStructures/ForLoopDeclarationUnitTest.inc.fixed b/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/ControlStructures/ForLoopDeclarationUnitTest.inc.fixed new file mode 100644 index 00000000..6a1e7634 --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/ControlStructures/ForLoopDeclarationUnitTest.inc.fixed @@ -0,0 +1,95 @@ +i ; }; $i < function() { return $this->max; }; $i++) {} +for ($i = function() { return $this->i; }; $i < function() { return $this->max; }; $i++) {} + +// phpcs:set Squiz.ControlStructures.ForLoopDeclaration ignoreNewlines true +for ( + $i = 0; + $i < 5; + $i++ +) { + // body here +} +// phpcs:set Squiz.ControlStructures.ForLoopDeclaration ignoreNewlines false + +// This test has to be the last one in the file! Intentional parse error check. +for diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/ControlStructures/ForLoopDeclarationUnitTest.js b/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/ControlStructures/ForLoopDeclarationUnitTest.js new file mode 100644 index 00000000..cfda6c12 --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/ControlStructures/ForLoopDeclarationUnitTest.js @@ -0,0 +1,125 @@ +// Valid. +for (var i = 0; i < 10; i++) { +} + +// Invalid. +for ( i = 0; i < 10; i++ ) { +} + +for (i = 0; i < 10; i++) { +} + +for (var i = 0 ; i < 10 ; i++) { +} + +for (i = 0;i < 10;i++) { +} + +// The works. +for ( var i = 0 ; i < 10 ; i++ ) { +} + +this.formats = {}; +dfx.inherits('ContentFormat', 'Widget'); + +for (var widgetid in this.loadedContents) { + if (dfx.isset(widget) === true) { + widget.loadAutoSaveCWidgetStore.setData('activeScreen', null);widget.getContents(this.loadedContents[widgetid], function() {self.widgetLoaded(widget.id);}); + } +} + +for (var i = 0; i < 10;) { +} +for (var i = 0; i < 10; ) { +} + +for (var i = 0; ; i++) { +} +for (var i = 0;; i++) { +} + +// phpcs:set Squiz.ControlStructures.ForLoopDeclaration requiredSpacesAfterOpen 1 +// phpcs:set Squiz.ControlStructures.ForLoopDeclaration requiredSpacesBeforeClose 1 +for (var i = 0; i < 10; i++) {} +for ( var i = 0; i < 10; i++ ) {} +for ( var i = 0; i < 10; i++ ) {} +// phpcs:set Squiz.ControlStructures.ForLoopDeclaration requiredSpacesAfterOpen 0 +// phpcs:set Squiz.ControlStructures.ForLoopDeclaration requiredSpacesBeforeClose 0 + +for ( ; i < 10; i++) {} +for (; i < 10; i++) {} + +// phpcs:set Squiz.ControlStructures.ForLoopDeclaration requiredSpacesAfterOpen 1 +// phpcs:set Squiz.ControlStructures.ForLoopDeclaration requiredSpacesBeforeClose 1 +for ( ; i < 10; i++ ) {} +for ( ; i < 10; i++ ) {} +for (; i < 10; i++ ) {} + +for ( i = 0; i < 10; ) {} +for ( i = 0; i < 10;) {} +for ( i = 0; i < 10; ) {} +// phpcs:set Squiz.ControlStructures.ForLoopDeclaration requiredSpacesAfterOpen 0 +// phpcs:set Squiz.ControlStructures.ForLoopDeclaration requiredSpacesBeforeClose 0 + +// Test handling of comments and inline annotations. +for ( /*phpcs:enable*/ i = 0 /*start*/ ; /*end*/i < 10/*comment*/; i++ /*comment*/ ) {} + +// Test multi-line FOR control structure. +for ( + i = 0; + i < 10; + i++ +) {} + +// Test multi-line FOR control structure with comments and annotations. +for ( + i = 0; /* Start */ + i < 10; /* phpcs:ignore Standard.Category.SniffName -- for reasons. */ + i++ // comment + +) {} + +// Test fixing each error in one go. Note: lines 84 + 88 contain trailing whitespace on purpose. +for ( + + + i = 0 + + ; + + i < 10 + + ; + + i++ + + +) {} + +// phpcs:set Squiz.ControlStructures.ForLoopDeclaration requiredSpacesAfterOpen 1 +// phpcs:set Squiz.ControlStructures.ForLoopDeclaration requiredSpacesBeforeClose 1 +for ( + + + + i = 0 + + ; + + i < 10 + + ; + + i++ + + +) {} +// phpcs:set Squiz.ControlStructures.ForLoopDeclaration requiredSpacesAfterOpen 0 +// phpcs:set Squiz.ControlStructures.ForLoopDeclaration requiredSpacesBeforeClose 0 + +// Test with semi-colon not belonging to for. +for (i = function() {self.widgetLoaded(widget.id) ; }; i < function() {self.widgetLoaded(widget.id);}; i++) {} +for (i = function() {self.widgetLoaded(widget.id);}; i < function() {self.widgetLoaded(widget.id);} ; i++) {} + +// This test has to be the last one in the file! Intentional parse error check. +for diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/ControlStructures/ForLoopDeclarationUnitTest.js.fixed b/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/ControlStructures/ForLoopDeclarationUnitTest.js.fixed new file mode 100644 index 00000000..00ced643 --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/ControlStructures/ForLoopDeclarationUnitTest.js.fixed @@ -0,0 +1,91 @@ +// Valid. +for (var i = 0; i < 10; i++) { +} + +// Invalid. +for (i = 0; i < 10; i++) { +} + +for (i = 0; i < 10; i++) { +} + +for (var i = 0; i < 10; i++) { +} + +for (i = 0; i < 10; i++) { +} + +// The works. +for (var i = 0; i < 10; i++) { +} + +this.formats = {}; +dfx.inherits('ContentFormat', 'Widget'); + +for (var widgetid in this.loadedContents) { + if (dfx.isset(widget) === true) { + widget.loadAutoSaveCWidgetStore.setData('activeScreen', null);widget.getContents(this.loadedContents[widgetid], function() {self.widgetLoaded(widget.id);}); + } +} + +for (var i = 0; i < 10;) { +} +for (var i = 0; i < 10;) { +} + +for (var i = 0;; i++) { +} +for (var i = 0;; i++) { +} + +// phpcs:set Squiz.ControlStructures.ForLoopDeclaration requiredSpacesAfterOpen 1 +// phpcs:set Squiz.ControlStructures.ForLoopDeclaration requiredSpacesBeforeClose 1 +for ( var i = 0; i < 10; i++ ) {} +for ( var i = 0; i < 10; i++ ) {} +for ( var i = 0; i < 10; i++ ) {} +// phpcs:set Squiz.ControlStructures.ForLoopDeclaration requiredSpacesAfterOpen 0 +// phpcs:set Squiz.ControlStructures.ForLoopDeclaration requiredSpacesBeforeClose 0 + +for (; i < 10; i++) {} +for (; i < 10; i++) {} + +// phpcs:set Squiz.ControlStructures.ForLoopDeclaration requiredSpacesAfterOpen 1 +// phpcs:set Squiz.ControlStructures.ForLoopDeclaration requiredSpacesBeforeClose 1 +for ( ; i < 10; i++ ) {} +for ( ; i < 10; i++ ) {} +for ( ; i < 10; i++ ) {} + +for ( i = 0; i < 10; ) {} +for ( i = 0; i < 10; ) {} +for ( i = 0; i < 10; ) {} +// phpcs:set Squiz.ControlStructures.ForLoopDeclaration requiredSpacesAfterOpen 0 +// phpcs:set Squiz.ControlStructures.ForLoopDeclaration requiredSpacesBeforeClose 0 + +// Test handling of comments and inline annotations. +for (/*phpcs:enable*/ i = 0 /*start*/; /*end*/i < 10/*comment*/; i++ /*comment*/) {} + +// Test multi-line FOR control structure. +for (i = 0; i < 10; i++) {} + +// Test multi-line FOR control structure with comments and annotations. +for (i = 0; /* Start */ + i < 10; /* phpcs:ignore Standard.Category.SniffName -- for reasons. */ + i++ // comment + +) {} + +// Test fixing each error in one go. Note: lines 84 + 88 contain trailing whitespace on purpose. +for (i = 0; i < 10; i++) {} + +// phpcs:set Squiz.ControlStructures.ForLoopDeclaration requiredSpacesAfterOpen 1 +// phpcs:set Squiz.ControlStructures.ForLoopDeclaration requiredSpacesBeforeClose 1 +for ( i = 0; i < 10; i++ ) {} +// phpcs:set Squiz.ControlStructures.ForLoopDeclaration requiredSpacesAfterOpen 0 +// phpcs:set Squiz.ControlStructures.ForLoopDeclaration requiredSpacesBeforeClose 0 + +// Test with semi-colon not belonging to for. +for (i = function() {self.widgetLoaded(widget.id) ; }; i < function() {self.widgetLoaded(widget.id);}; i++) {} +for (i = function() {self.widgetLoaded(widget.id);}; i < function() {self.widgetLoaded(widget.id);}; i++) {} + +// This test has to be the last one in the file! Intentional parse error check. +for diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/ControlStructures/ForLoopDeclarationUnitTest.php b/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/ControlStructures/ForLoopDeclarationUnitTest.php new file mode 100644 index 00000000..51638866 --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/ControlStructures/ForLoopDeclarationUnitTest.php @@ -0,0 +1,132 @@ + + * @copyright 2006-2015 Squiz Pty Ltd (ABN 77 084 670 600) + * @license https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence + */ + +namespace PHP_CodeSniffer\Standards\Squiz\Tests\ControlStructures; + +use PHP_CodeSniffer\Tests\Standards\AbstractSniffUnitTest; + +class ForLoopDeclarationUnitTest extends AbstractSniffUnitTest +{ + + + /** + * Returns the lines where errors should occur. + * + * The key of the array should represent the line number and the value + * should represent the number of errors that should occur on that line. + * + * @param string $testFile The name of the file being tested. + * + * @return array + */ + public function getErrorList($testFile='ForLoopDeclarationUnitTest.inc') + { + switch ($testFile) { + case 'ForLoopDeclarationUnitTest.inc': + return [ + 8 => 2, + 11 => 2, + 14 => 2, + 17 => 2, + 21 => 6, + 27 => 1, + 30 => 1, + 37 => 2, + 39 => 2, + 43 => 1, + 49 => 1, + 50 => 1, + 53 => 1, + 54 => 1, + 59 => 4, + 62 => 1, + 63 => 1, + 64 => 1, + 66 => 1, + 69 => 1, + 74 => 1, + 77 => 1, + 82 => 2, + 86 => 2, + 91 => 1, + 95 => 1, + 101 => 2, + 105 => 2, + 110 => 1, + 116 => 2, + ]; + + case 'ForLoopDeclarationUnitTest.js': + return [ + 6 => 2, + 9 => 2, + 12 => 2, + 15 => 2, + 19 => 6, + 33 => 1, + 36 => 1, + 43 => 2, + 45 => 2, + 49 => 1, + 55 => 1, + 56 => 1, + 59 => 1, + 60 => 1, + 65 => 4, + 68 => 1, + 69 => 1, + 70 => 1, + 72 => 1, + 75 => 1, + 80 => 1, + 83 => 1, + 88 => 2, + 92 => 2, + 97 => 1, + 101 => 1, + 107 => 2, + 111 => 2, + 116 => 1, + 122 => 2, + ]; + + default: + return []; + }//end switch + + }//end getErrorList() + + + /** + * Returns the lines where warnings should occur. + * + * The key of the array should represent the line number and the value + * should represent the number of warnings that should occur on that line. + * + * @param string $testFile The name of the file being tested. + * + * @return array + */ + public function getWarningList($testFile='ForLoopDeclarationUnitTest.inc') + { + switch ($testFile) { + case 'ForLoopDeclarationUnitTest.inc': + return [129 => 1]; + + case 'ForLoopDeclarationUnitTest.js': + return [125 => 1]; + + default: + return []; + }//end switch + + }//end getWarningList() + + +}//end class diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/ControlStructures/InlineIfDeclarationUnitTest.inc b/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/ControlStructures/InlineIfDeclarationUnitTest.inc new file mode 100644 index 00000000..f54ed8af --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/ControlStructures/InlineIfDeclarationUnitTest.inc @@ -0,0 +1,48 @@ +id.'"', + '"'.$this->stepInfo['title'].'"', + '"'.((isset($this->stepInfo['description']) === TRUE) ? $this->stepInfo['description'] : '').'"', + '"'.(isset($this->stepInfo['description']) === TRUE ? $this->stepInfo['description'] : '').'"', + '"'.$this->stepInfo['title'].'"', + ); + +echo (TRUE)?'Hello':'Bye'; + +$array = array( + 'one' => ($test == 1) ? true : false, + 'two' => (($test == 1) ? true : false), + 'three' => (($test == 1) ? true : false) +); +$var = ($test == 1) ? true : false; +$var = (myFunc(1,2,3) == 1) ? true : false; + +set('config', function() { + $foo = ($bar === "on") ? "1" : "2"; +}); + +$config = function() { + $foo = ($bar === "on") ? "1" : "2"; +}; + +rand(0, 1) ? 'ěščřžýáí' : NULL; + +$c = ($argv[1]) ? : ""; +$filepath = realpath($argv[1]) ?: $argv[1]; +$c = ($argv[1]) ? /* comment */ : ""; +$c = ($argv[1]) ? +: ""; diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/ControlStructures/InlineIfDeclarationUnitTest.inc.fixed b/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/ControlStructures/InlineIfDeclarationUnitTest.inc.fixed new file mode 100644 index 00000000..f7aa1d67 --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/ControlStructures/InlineIfDeclarationUnitTest.inc.fixed @@ -0,0 +1,48 @@ +id.'"', + '"'.$this->stepInfo['title'].'"', + '"'.((isset($this->stepInfo['description']) === TRUE) ? $this->stepInfo['description'] : '').'"', + '"'.(isset($this->stepInfo['description']) === TRUE ? $this->stepInfo['description'] : '').'"', + '"'.$this->stepInfo['title'].'"', + ); + +echo (TRUE) ? 'Hello' : 'Bye'; + +$array = array( + 'one' => ($test == 1) ? true : false, + 'two' => (($test == 1) ? true : false), + 'three' => (($test == 1) ? true : false) +); +$var = ($test == 1) ? true : false; +$var = (myFunc(1,2,3) == 1) ? true : false; + +set('config', function() { + $foo = ($bar === "on") ? "1" : "2"; +}); + +$config = function() { + $foo = ($bar === "on") ? "1" : "2"; +}; + +rand(0, 1) ? 'ěščřžýáí' : NULL; + +$c = ($argv[1]) ?: ""; +$filepath = realpath($argv[1]) ?: $argv[1]; +$c = ($argv[1]) ? /* comment */ : ""; +$c = ($argv[1]) ? +: ""; diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/ControlStructures/InlineIfDeclarationUnitTest.php b/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/ControlStructures/InlineIfDeclarationUnitTest.php new file mode 100644 index 00000000..97212dba --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/ControlStructures/InlineIfDeclarationUnitTest.php @@ -0,0 +1,75 @@ + + * @copyright 2006-2015 Squiz Pty Ltd (ABN 77 084 670 600) + * @license https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence + */ + +namespace PHP_CodeSniffer\Standards\Squiz\Tests\ControlStructures; + +use PHP_CodeSniffer\Tests\Standards\AbstractSniffUnitTest; + +class InlineIfDeclarationUnitTest extends AbstractSniffUnitTest +{ + + + /** + * Get a list of CLI values to set before the file is tested. + * + * @param string $testFile The name of the file being tested. + * + * @return array + */ + public function getCliValues($testFile) + { + return ['--encoding=utf-8']; + + }//end getCliValues() + + + /** + * Returns the lines where errors should occur. + * + * The key of the array should represent the line number and the value + * should represent the number of errors that should occur on that line. + * + * @return array + */ + public function getErrorList() + { + return [ + 4 => 1, + 5 => 1, + 6 => 1, + 7 => 1, + 8 => 1, + 9 => 1, + 10 => 1, + 13 => 1, + 20 => 1, + 24 => 4, + 44 => 1, + 47 => 1, + ]; + + }//end getErrorList() + + + /** + * Returns the lines where warnings should occur. + * + * The key of the array should represent the line number and the value + * should represent the number of warnings that should occur on that line. + * + * @return array + */ + public function getWarningList() + { + return []; + + }//end getWarningList() + + +}//end class diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/ControlStructures/LowercaseDeclarationUnitTest.inc b/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/ControlStructures/LowercaseDeclarationUnitTest.inc new file mode 100644 index 00000000..1acf3eac --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/ControlStructures/LowercaseDeclarationUnitTest.inc @@ -0,0 +1,24 @@ + + * @copyright 2006-2015 Squiz Pty Ltd (ABN 77 084 670 600) + * @license https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence + */ + +namespace PHP_CodeSniffer\Standards\Squiz\Tests\ControlStructures; + +use PHP_CodeSniffer\Tests\Standards\AbstractSniffUnitTest; + +class LowercaseDeclarationUnitTest extends AbstractSniffUnitTest +{ + + + /** + * Returns the lines where errors should occur. + * + * The key of the array should represent the line number and the value + * should represent the number of errors that should occur on that line. + * + * @return array + */ + public function getErrorList() + { + return [ + 3 => 1, + 5 => 1, + 7 => 1, + 9 => 1, + 10 => 1, + 12 => 1, + 14 => 1, + 15 => 1, + 16 => 1, + 20 => 1, + 21 => 1, + 24 => 1, + ]; + + }//end getErrorList() + + + /** + * Returns the lines where warnings should occur. + * + * The key of the array should represent the line number and the value + * should represent the number of warnings that should occur on that line. + * + * @return array + */ + public function getWarningList() + { + return []; + + }//end getWarningList() + + +}//end class diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/ControlStructures/SwitchDeclarationUnitTest.inc b/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/ControlStructures/SwitchDeclarationUnitTest.inc new file mode 100644 index 00000000..cf397607 --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/ControlStructures/SwitchDeclarationUnitTest.inc @@ -0,0 +1,333 @@ + + * @copyright 2006-2015 Squiz Pty Ltd (ABN 77 084 670 600) + * @license https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence + */ + +namespace PHP_CodeSniffer\Standards\Squiz\Tests\ControlStructures; + +use PHP_CodeSniffer\Tests\Standards\AbstractSniffUnitTest; + +class SwitchDeclarationUnitTest extends AbstractSniffUnitTest +{ + + + /** + * Returns the lines where errors should occur. + * + * The key of the array should represent the line number and the value + * should represent the number of errors that should occur on that line. + * + * @param string $testFile The name of the file being tested. + * + * @return array + */ + public function getErrorList($testFile='SwitchDeclarationUnitTest.inc') + { + switch ($testFile) { + case 'SwitchDeclarationUnitTest.inc': + return [ + 27 => 1, + 29 => 1, + 34 => 1, + 36 => 1, + 44 => 1, + 48 => 1, + 52 => 1, + 54 => 1, + 55 => 1, + 56 => 1, + 58 => 1, + 59 => 1, + 61 => 1, + 62 => 1, + 79 => 1, + 85 => 2, + 88 => 2, + 89 => 2, + 92 => 1, + 95 => 3, + 99 => 1, + 116 => 1, + 122 => 1, + 127 => 2, + 134 => 2, + 135 => 1, + 138 => 1, + 143 => 1, + 144 => 1, + 147 => 1, + 165 => 1, + 172 => 1, + 176 => 2, + 180 => 1, + 192 => 2, + 196 => 1, + 223 => 1, + 266 => 1, + 282 => 1, + 284 => 2, + 322 => 1, + 323 => 1, + 327 => 1, + 329 => 1, + 330 => 1, + ]; + + case 'SwitchDeclarationUnitTest.js': + return [ + 27 => 1, + 29 => 1, + 34 => 1, + 36 => 1, + 44 => 1, + 48 => 1, + 52 => 1, + 54 => 1, + 55 => 1, + 56 => 1, + 58 => 1, + 59 => 1, + 61 => 1, + 62 => 1, + 79 => 1, + 85 => 2, + 88 => 2, + 89 => 2, + 92 => 1, + 95 => 3, + 99 => 1, + 116 => 1, + 122 => 1, + 127 => 2, + 134 => 2, + 135 => 1, + 138 => 1, + 143 => 1, + 144 => 1, + 147 => 1, + 165 => 1, + 172 => 1, + 176 => 2, + 180 => 1, + 192 => 2, + 196 => 1, + 223 => 1, + 266 => 1, + 282 => 1, + 284 => 2, + ]; + + default: + return []; + }//end switch + + }//end getErrorList() + + + /** + * Returns the lines where warnings should occur. + * + * The key of the array should represent the line number and the value + * should represent the number of warnings that should occur on that line. + * + * @param string $testFile The name of the file being tested. + * + * @return array + */ + public function getWarningList($testFile='SwitchDeclarationUnitTest.inc') + { + if ($testFile === 'SwitchDeclarationUnitTest.js') { + return [273 => 1]; + } + + return []; + + }//end getWarningList() + + +}//end class diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/Debug/JSLintUnitTest.js b/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/Debug/JSLintUnitTest.js new file mode 100644 index 00000000..797e0eea --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/Debug/JSLintUnitTest.js @@ -0,0 +1,2 @@ +alert('hi') +alert('hi'); diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/Debug/JSLintUnitTest.php b/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/Debug/JSLintUnitTest.php new file mode 100644 index 00000000..7ccfe1a3 --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/Debug/JSLintUnitTest.php @@ -0,0 +1,69 @@ + + * @copyright 2006-2015 Squiz Pty Ltd (ABN 77 084 670 600) + * @license https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence + */ + +namespace PHP_CodeSniffer\Standards\Squiz\Tests\Debug; + +use PHP_CodeSniffer\Tests\Standards\AbstractSniffUnitTest; +use PHP_CodeSniffer\Config; + +class JSLintUnitTest extends AbstractSniffUnitTest +{ + + + /** + * Should this test be skipped for some reason. + * + * @return void + */ + protected function shouldSkipTest() + { + $jslPath = Config::getExecutablePath('jslint'); + if ($jslPath === null) { + return true; + } + + return false; + + }//end shouldSkipTest() + + + /** + * Returns the lines where errors should occur. + * + * The key of the array should represent the line number and the value + * should represent the number of errors that should occur on that line. + * + * @return array + */ + public function getErrorList() + { + return []; + + }//end getErrorList() + + + /** + * Returns the lines where warnings should occur. + * + * The key of the array should represent the line number and the value + * should represent the number of warnings that should occur on that line. + * + * @return array + */ + public function getWarningList() + { + return [ + 1 => 2, + 2 => 1, + ]; + + }//end getWarningList() + + +}//end class diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/Debug/JavaScriptLintUnitTest.js b/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/Debug/JavaScriptLintUnitTest.js new file mode 100644 index 00000000..797e0eea --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/Debug/JavaScriptLintUnitTest.js @@ -0,0 +1,2 @@ +alert('hi') +alert('hi'); diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/Debug/JavaScriptLintUnitTest.php b/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/Debug/JavaScriptLintUnitTest.php new file mode 100644 index 00000000..1e83f1f4 --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/Debug/JavaScriptLintUnitTest.php @@ -0,0 +1,66 @@ + + * @copyright 2006-2015 Squiz Pty Ltd (ABN 77 084 670 600) + * @license https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence + */ + +namespace PHP_CodeSniffer\Standards\Squiz\Tests\Debug; + +use PHP_CodeSniffer\Tests\Standards\AbstractSniffUnitTest; +use PHP_CodeSniffer\Config; + +class JavaScriptLintUnitTest extends AbstractSniffUnitTest +{ + + + /** + * Should this test be skipped for some reason. + * + * @return void + */ + protected function shouldSkipTest() + { + $jslPath = Config::getExecutablePath('jsl'); + if ($jslPath === null) { + return true; + } + + return false; + + }//end shouldSkipTest() + + + /** + * Returns the lines where errors should occur. + * + * The key of the array should represent the line number and the value + * should represent the number of errors that should occur on that line. + * + * @return array + */ + public function getErrorList() + { + return []; + + }//end getErrorList() + + + /** + * Returns the lines where warnings should occur. + * + * The key of the array should represent the line number and the value + * should represent the number of warnings that should occur on that line. + * + * @return array + */ + public function getWarningList() + { + return [2 => 1]; + + }//end getWarningList() + + +}//end class diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/Files/FileExtensionUnitTest.1.inc b/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/Files/FileExtensionUnitTest.1.inc new file mode 100644 index 00000000..3279edb5 --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/Files/FileExtensionUnitTest.1.inc @@ -0,0 +1,3 @@ + diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/Files/FileExtensionUnitTest.2.inc b/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/Files/FileExtensionUnitTest.2.inc new file mode 100644 index 00000000..05be6330 --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/Files/FileExtensionUnitTest.2.inc @@ -0,0 +1,3 @@ + diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/Files/FileExtensionUnitTest.3.inc b/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/Files/FileExtensionUnitTest.3.inc new file mode 100644 index 00000000..ec1b0239 --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/Files/FileExtensionUnitTest.3.inc @@ -0,0 +1,3 @@ + diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/Files/FileExtensionUnitTest.4.inc b/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/Files/FileExtensionUnitTest.4.inc new file mode 100644 index 00000000..ed045646 --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/Files/FileExtensionUnitTest.4.inc @@ -0,0 +1,3 @@ + diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/Files/FileExtensionUnitTest.php b/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/Files/FileExtensionUnitTest.php new file mode 100644 index 00000000..7e613b33 --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/Files/FileExtensionUnitTest.php @@ -0,0 +1,55 @@ + + * @copyright 2006-2015 Squiz Pty Ltd (ABN 77 084 670 600) + * @license https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence + */ + +namespace PHP_CodeSniffer\Standards\Squiz\Tests\Files; + +use PHP_CodeSniffer\Tests\Standards\AbstractSniffUnitTest; + +class FileExtensionUnitTest extends AbstractSniffUnitTest +{ + + + /** + * Returns the lines where errors should occur. + * + * The key of the array should represent the line number and the value + * should represent the number of errors that should occur on that line. + * + * @param string $testFile The name of the file being tested. + * + * @return array + */ + public function getErrorList($testFile='') + { + switch ($testFile) { + case 'FileExtensionUnitTest.1.inc': + return [1 => 1]; + default: + return []; + } + + }//end getErrorList() + + + /** + * Returns the lines where warnings should occur. + * + * The key of the array should represent the line number and the value + * should represent the number of warnings that should occur on that line. + * + * @return array + */ + public function getWarningList() + { + return []; + + }//end getWarningList() + + +}//end class diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/Formatting/OperatorBracketUnitTest.inc b/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/Formatting/OperatorBracketUnitTest.inc new file mode 100644 index 00000000..2a480bb9 --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/Formatting/OperatorBracketUnitTest.inc @@ -0,0 +1,195 @@ +words[$wordPos-1]) || $this->words[$wordPos-1] !== ' ') { +} else if ($this->tokens[$pos + 1] === "\n") { +} + +if ($pos === count($this->tokens) - 1) { + $file = '...'.substr($file, (($padding * -1) + 3)); +} + +if (substr($basename, -5) !== 'Sniff') { + $i = ($this->_tokens[$i]['parenthesis_closer'] + 1); +} + +$pos = $this->_getShortCommentEndPos(); +if ($pos === -1) { + $stackPtr = ($tokens[$next][$to] - 1); + $stackPtr = ($tokens[$next][$pattern[$i]['to']] + 1); + $var = (($var1 + $var2) + $var3 + $var4) +} + +$commentStart = ($phpcsFile->findPrevious(T_DOC_COMMENT, ($commentEnd - 1), null, true) + 1); +$commentEnd = ($this->_phpcsFile->findNext(T_DOC_COMMENT, ($commentStart + 1), null, true) - 1); +$expected .= '...'.substr($tokens[($stackPtr - 2)]['content'], -5).$tokens[$stackPtr]['content']; + +if (($tokens[$nextToken - 1]['code']) !== T_WHITESPACE) { + $errorPos = ($params[(count($params) - 1)]->getLine() + $commentStart); +} + +while (($nextSpace = $phpcsFile->findNext(T_WHITESPACE, $nextSpace + 1, $nextBreak)) !== false) { +} + +foreach ($attributes as $id => &$attribute) { +} + +class MyClass +{ + + + public function &myFunction(array &$one, array &$two) + { + + }//end myFunction() + + +}//end class + +if ($index < -1) $index = 0; +if ($index < - 1) $index = 0; + +$three = ceil($one / $two); +$three = ceil(($one / $two) / $four); +$three = ceil($one / ($two / $four)); + +$four = -0.25; + +$three = ceil($one[1] / $two); + +switch ($number % 10) { + case -1: + $suffix = 'st'; + break; +} + +$expectedPermission = array( + 'granted' => 4, + 'denied' => 1, + 'cascade' => TRUE, + 'blockergranted' => 2, + 'blockerdenied' => - 3, + 'effective' => TRUE, + ); + +$value = (int) isset($blah) + 2; +$value = (int) isset($blah) + (int) isset($foo) + (int) isset($bar); + +doSomething(getValue($var, 2)) - $y; + +$codeFiles = array($global => $codeFiles[$global]) + $codeFiles; + +$var = array(-1); +$var = [-1]; +$var = [0, -1, -2]; + +$cntPages = ceil(count($items) / self::ON_PAGE); + +error_reporting(E_ALL & ~E_NOTICE & ~E_WARNING); +error_reporting(E_ALL & ~E_NOTICE | ~E_WARNING); +$results = $stmt->fetchAll(\PDO::FETCH_ASSOC | \PDO::FETCH_GROUP | \PDO::FETCH_UNIQUE); +$di = new \RecursiveDirectoryIterator($path, \RecursiveDirectoryIterator::SKIP_DOTS | \FilesystemIterator::FOLLOW_SYMLINKS); +foo(1 + 2 + 3); + +if (empty($foo[-1]) === true) { + $foo[-1] = 'foo'; +} + +try { +} catch (AException | BException $e) { +} + +$var = $foo['blah'] + []; + +$a = 2 * ${x} - ${minus}; + +$foo = $bar ?? $baz ?? ''; + +$foo = $myString{-1}; + +$value = (binary) $blah + b"binary $foo"; + +$test = (1 * static::TEST); +$test = myfunc(1 * static::TEST); + +$errorPos = $params[$x]?->getLine() + $commentStart; + +$foo = $this->gmail ?? $this->gmail = new Google_Service_Gmail($this->google); + +exit -1; + +$expr = match ($number - 10) { + -1 => 0, +}; + +$expr = match ($number % 10) { + 1 => 2 * $num, +}; + +$expr = match (true) { + $num * 100 > 500 => 'expression in key', +}; + +// PHP 8.0 named parameters. +if ($pos === count(value: $this->tokens) - 1) { + $file = '...'.substr(string: $file, offset: $padding * -1 + 3); +} diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/Formatting/OperatorBracketUnitTest.inc.fixed b/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/Formatting/OperatorBracketUnitTest.inc.fixed new file mode 100644 index 00000000..669b16b2 --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/Formatting/OperatorBracketUnitTest.inc.fixed @@ -0,0 +1,195 @@ +words[($wordPos-1)]) || $this->words[($wordPos-1)] !== ' ') { +} else if ($this->tokens[($pos + 1)] === "\n") { +} + +if ($pos === (count($this->tokens) - 1)) { + $file = '...'.substr($file, (($padding * -1) + 3)); +} + +if (substr($basename, -5) !== 'Sniff') { + $i = ($this->_tokens[$i]['parenthesis_closer'] + 1); +} + +$pos = $this->_getShortCommentEndPos(); +if ($pos === -1) { + $stackPtr = ($tokens[$next][$to] - 1); + $stackPtr = ($tokens[$next][$pattern[$i]['to']] + 1); + $var = (($var1 + $var2) + $var3 + $var4) +} + +$commentStart = ($phpcsFile->findPrevious(T_DOC_COMMENT, ($commentEnd - 1), null, true) + 1); +$commentEnd = ($this->_phpcsFile->findNext(T_DOC_COMMENT, ($commentStart + 1), null, true) - 1); +$expected .= '...'.substr($tokens[($stackPtr - 2)]['content'], -5).$tokens[$stackPtr]['content']; + +if (($tokens[($nextToken - 1)]['code']) !== T_WHITESPACE) { + $errorPos = ($params[(count($params) - 1)]->getLine() + $commentStart); +} + +while (($nextSpace = $phpcsFile->findNext(T_WHITESPACE, ($nextSpace + 1), $nextBreak)) !== false) { +} + +foreach ($attributes as $id => &$attribute) { +} + +class MyClass +{ + + + public function &myFunction(array &$one, array &$two) + { + + }//end myFunction() + + +}//end class + +if ($index < -1) $index = 0; +if ($index < - 1) $index = 0; + +$three = ceil($one / $two); +$three = ceil(($one / $two) / $four); +$three = ceil($one / ($two / $four)); + +$four = -0.25; + +$three = ceil($one[1] / $two); + +switch ($number % 10) { + case -1: + $suffix = 'st'; + break; +} + +$expectedPermission = array( + 'granted' => 4, + 'denied' => 1, + 'cascade' => TRUE, + 'blockergranted' => 2, + 'blockerdenied' => - 3, + 'effective' => TRUE, + ); + +$value = ((int) isset($blah) + 2); +$value = ((int) isset($blah) + (int) isset($foo) + (int) isset($bar)); + +(doSomething(getValue($var, 2)) - $y); + +$codeFiles = (array($global => $codeFiles[$global]) + $codeFiles); + +$var = array(-1); +$var = [-1]; +$var = [0, -1, -2]; + +$cntPages = ceil(count($items) / self::ON_PAGE); + +error_reporting(E_ALL & ~E_NOTICE & ~E_WARNING); +error_reporting(E_ALL & ~E_NOTICE | ~E_WARNING); +$results = $stmt->fetchAll(\PDO::FETCH_ASSOC | \PDO::FETCH_GROUP | \PDO::FETCH_UNIQUE); +$di = new \RecursiveDirectoryIterator($path, (\RecursiveDirectoryIterator::SKIP_DOTS | \FilesystemIterator::FOLLOW_SYMLINKS)); +foo(1 + 2 + 3); + +if (empty($foo[-1]) === true) { + $foo[-1] = 'foo'; +} + +try { +} catch (AException | BException $e) { +} + +$var = ($foo['blah'] + []); + +$a = 2 * ${x} - ${minus}; + +$foo = ($bar ?? $baz ?? ''); + +$foo = $myString{-1}; + +$value = ((binary) $blah + b"binary $foo"); + +$test = (1 * static::TEST); +$test = myfunc(1 * static::TEST); + +$errorPos = ($params[$x]?->getLine() + $commentStart); + +$foo = ($this->gmail ?? $this->gmail = new Google_Service_Gmail($this->google)); + +exit -1; + +$expr = match ($number - 10) { + -1 => 0, +}; + +$expr = match ($number % 10) { + 1 => (2 * $num), +}; + +$expr = match (true) { + ($num * 100) > 500 => 'expression in key', +}; + +// PHP 8.0 named parameters. +if ($pos === (count(value: $this->tokens) - 1)) { + $file = '...'.substr(string: $file, offset: ($padding * -1 + 3)); +} diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/Formatting/OperatorBracketUnitTest.js b/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/Formatting/OperatorBracketUnitTest.js new file mode 100644 index 00000000..92ed8038 --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/Formatting/OperatorBracketUnitTest.js @@ -0,0 +1,118 @@ +value = (one + two); +value = one + two; + +value = (one - two); +value = one - two; + +value = (one * two); +value = one * two; + +value = (one / two); +value = one / two; + +value = (one % two); +value = one % two; + +value = (one + two + three); +value = one + two + three; +value = (one + (two + three)); +value = one + (two + three); + +value++; +value--; +value = -1; +value = - 1; + +value = (1 + 2); +value = 1 + 2; + +value = (1 - 2); +value = 1 - 2; + +value = (1 * 2); +value = 1 * 2; + +value = (1 / 2); +value = 1 / 2; + +value = (1 % 2); +value = 1 % 2; + +value = (1 + 2 + 3); +value = 1 + 2 + 3; +value = (1 + (2 + 3)); +value = 1 + (2 + 3); + +value = one + 2 + 3 - (four * five * (6 + 7)) + nine + 2; +value = myFunction(tokens[stackPtr - 1]); + +for (i = 1 + 2; i < 4 + 5; i++) { +} + +function myFunction() +{ + value = (one + 1) + (two + 2) + (myFunction() + 2); + value = myFunction() + 2; + value = (myFunction(mvar) + myFunction2(mvar)); + return -1; +} + +params['mode'] = id.replace(/WidgetType/, ''); + +if (index < -1) index = 0; +if (index < - 1) index = 0; + +var classN = prvId.replace(/\./g, '-'); + +three = myFunction(one / two); +three = myFunction((one / two) / four); +three = myFunction(one / (two / four)); + +four = -0.25; + +id = id.replace(/row\/:/gi, ''); +return /MSIE/.test(navigator.userAgent); + +var re = new RegExp(/<\/?(\w+)((\s+\w+(\s*=\s*(?:".*?"|'.*?'|[^'">\s]+))?)+\s*|\s*)\/?>/gim); + +var options = { + minVal: -1, + maxVal: -1 +}; + +stepWidth = Math.round(this.width / 5); + +date.setMonth(d[2] - 1); + +switch (number % 10) { + case -1: + suffix = 'st'; + break; +} + +var pathSplit = ipt.value.split(/\/|\\/); + +if (pairs[i].search(/=/) !== -1) { +} + +if (urlValue.search(/[a-zA-z]+:\/\//) !== 0) { +} + +if (urlValue.search(/[a-zA-z]+:\/\/*/) !== 0) { +} + +if (!value || /^\s*$/.test(value)) { + return true; +} + +parseInt(dfx.attr(selectors[idx], 'elemOffsetTop'), 10) - scrollCoords.y + 'px' + +if (something === true + ^ somethingElse === true +) { + return false; +} + +if (true === /^\d*\.?\d*$/.test(input)) return true; + +if ( ! /^(?:a|select)$/i.test( element.tagName ) ) return true; diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/Formatting/OperatorBracketUnitTest.js.fixed b/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/Formatting/OperatorBracketUnitTest.js.fixed new file mode 100644 index 00000000..04e35d97 --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/Formatting/OperatorBracketUnitTest.js.fixed @@ -0,0 +1,118 @@ +value = (one + two); +value = one + two; + +value = (one - two); +value = (one - two); + +value = (one * two); +value = (one * two); + +value = (one / two); +value = (one / two); + +value = (one % two); +value = (one % two); + +value = (one + two + three); +value = one + two + three; +value = (one + (two + three)); +value = one + (two + three); + +value++; +value--; +value = -1; +value = - 1; + +value = (1 + 2); +value = 1 + 2; + +value = (1 - 2); +value = (1 - 2); + +value = (1 * 2); +value = (1 * 2); + +value = (1 / 2); +value = (1 / 2); + +value = (1 % 2); +value = (1 % 2); + +value = (1 + 2 + 3); +value = 1 + 2 + 3; +value = (1 + (2 + 3)); +value = 1 + (2 + 3); + +value = one + 2 + (3 - (four * five * (6 + 7))) + nine + 2; +value = myFunction(tokens[(stackPtr - 1)]); + +for (i = 1 + 2; i < 4 + 5; i++) { +} + +function myFunction() +{ + value = (one + 1) + (two + 2) + (myFunction() + 2); + value = myFunction() + 2; + value = (myFunction(mvar) + myFunction2(mvar)); + return -1; +} + +params['mode'] = id.replace(/WidgetType/, ''); + +if (index < -1) index = 0; +if (index < - 1) index = 0; + +var classN = prvId.replace(/\./g, '-'); + +three = myFunction(one / two); +three = myFunction((one / two) / four); +three = myFunction(one / (two / four)); + +four = -0.25; + +id = id.replace(/row\/:/gi, ''); +return /MSIE/.test(navigator.userAgent); + +var re = new RegExp(/<\/?(\w+)((\s+\w+(\s*=\s*(?:".*?"|'.*?'|[^'">\s]+))?)+\s*|\s*)\/?>/gim); + +var options = { + minVal: -1, + maxVal: -1 +}; + +stepWidth = Math.round(this.width / 5); + +date.setMonth(d[2] - 1); + +switch (number % 10) { + case -1: + suffix = 'st'; + break; +} + +var pathSplit = ipt.value.split(/\/|\\/); + +if (pairs[i].search(/=/) !== -1) { +} + +if (urlValue.search(/[a-zA-z]+:\/\//) !== 0) { +} + +if (urlValue.search(/[a-zA-z]+:\/\/*/) !== 0) { +} + +if (!value || /^\s*$/.test(value)) { + return true; +} + +(parseInt(dfx.attr(selectors[idx], 'elemOffsetTop'), 10) - scrollCoords.y) + 'px' + +if (something === true + ^ somethingElse === true +) { + return false; +} + +if (true === /^\d*\.?\d*$/.test(input)) return true; + +if ( ! /^(?:a|select)$/i.test( element.tagName ) ) return true; diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/Formatting/OperatorBracketUnitTest.php b/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/Formatting/OperatorBracketUnitTest.php new file mode 100644 index 00000000..4f04a6eb --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/Formatting/OperatorBracketUnitTest.php @@ -0,0 +1,117 @@ + + * @copyright 2006-2015 Squiz Pty Ltd (ABN 77 084 670 600) + * @license https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence + */ + +namespace PHP_CodeSniffer\Standards\Squiz\Tests\Formatting; + +use PHP_CodeSniffer\Tests\Standards\AbstractSniffUnitTest; + +class OperatorBracketUnitTest extends AbstractSniffUnitTest +{ + + + /** + * Returns the lines where errors should occur. + * + * The key of the array should represent the line number and the value + * should represent the number of errors that should occur on that line. + * + * @param string $testFile The name of the file being tested. + * + * @return array + */ + public function getErrorList($testFile='OperatorBracketUnitTest.inc') + { + switch ($testFile) { + case 'OperatorBracketUnitTest.inc': + return [ + 3 => 1, + 6 => 1, + 9 => 1, + 12 => 1, + 15 => 1, + 18 => 2, + 20 => 1, + 25 => 1, + 28 => 1, + 31 => 1, + 34 => 1, + 37 => 1, + 40 => 1, + 43 => 2, + 45 => 1, + 47 => 5, + 48 => 1, + 50 => 2, + 55 => 2, + 56 => 1, + 63 => 2, + 64 => 1, + 67 => 1, + 86 => 1, + 90 => 1, + 109 => 1, + 130 => 1, + 134 => 1, + 135 => 2, + 137 => 1, + 139 => 1, + 150 => 1, + 161 => 1, + 163 => 2, + 165 => 2, + 169 => 1, + 174 => 1, + 176 => 1, + 185 => 1, + 189 => 1, + 193 => 1, + 194 => 2, + ]; + break; + case 'OperatorBracketUnitTest.js': + return [ + 5 => 1, + 8 => 1, + 11 => 1, + 14 => 1, + 24 => 1, + 30 => 1, + 33 => 1, + 36 => 1, + 39 => 1, + 46 => 1, + 47 => 1, + 63 => 1, + 108 => 1, + ]; + break; + default: + return []; + break; + }//end switch + + }//end getErrorList() + + + /** + * Returns the lines where warnings should occur. + * + * The key of the array should represent the line number and the value + * should represent the number of warnings that should occur on that line. + * + * @return array + */ + public function getWarningList() + { + return []; + + }//end getWarningList() + + +}//end class diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/Functions/FunctionDeclarationArgumentSpacingUnitTest.inc b/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/Functions/FunctionDeclarationArgumentSpacingUnitTest.inc new file mode 100644 index 00000000..33564e2e --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/Functions/FunctionDeclarationArgumentSpacingUnitTest.inc @@ -0,0 +1,111 @@ + $a($b); diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/Functions/FunctionDeclarationArgumentSpacingUnitTest.inc.fixed b/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/Functions/FunctionDeclarationArgumentSpacingUnitTest.inc.fixed new file mode 100644 index 00000000..68fb1c1c --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/Functions/FunctionDeclarationArgumentSpacingUnitTest.inc.fixed @@ -0,0 +1,111 @@ + $a($b); diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/Functions/FunctionDeclarationArgumentSpacingUnitTest.php b/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/Functions/FunctionDeclarationArgumentSpacingUnitTest.php new file mode 100644 index 00000000..65e987dd --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/Functions/FunctionDeclarationArgumentSpacingUnitTest.php @@ -0,0 +1,86 @@ + + * @copyright 2006-2015 Squiz Pty Ltd (ABN 77 084 670 600) + * @license https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence + */ + +namespace PHP_CodeSniffer\Standards\Squiz\Tests\Functions; + +use PHP_CodeSniffer\Tests\Standards\AbstractSniffUnitTest; + +class FunctionDeclarationArgumentSpacingUnitTest extends AbstractSniffUnitTest +{ + + + /** + * Returns the lines where errors should occur. + * + * The key of the array should represent the line number and the value + * should represent the number of errors that should occur on that line. + * + * @return array + */ + public function getErrorList() + { + return [ + 3 => 1, + 5 => 2, + 7 => 2, + 8 => 2, + 9 => 2, + 11 => 2, + 13 => 7, + 14 => 2, + 15 => 2, + 16 => 4, + 18 => 2, + 35 => 2, + 36 => 2, + 44 => 2, + 45 => 1, + 46 => 1, + 51 => 2, + 53 => 2, + 55 => 1, + 56 => 1, + 58 => 1, + 73 => 7, + 76 => 1, + 77 => 1, + 81 => 1, + 89 => 2, + 92 => 1, + 93 => 1, + 94 => 1, + 95 => 1, + 99 => 11, + 100 => 2, + 101 => 2, + 102 => 2, + 106 => 1, + 107 => 2, + 111 => 3, + ]; + + }//end getErrorList() + + + /** + * Returns the lines where warnings should occur. + * + * The key of the array should represent the line number and the value + * should represent the number of warnings that should occur on that line. + * + * @return array + */ + public function getWarningList() + { + return []; + + }//end getWarningList() + + +}//end class diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/Functions/FunctionDeclarationUnitTest.inc b/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/Functions/FunctionDeclarationUnitTest.inc new file mode 100644 index 00000000..0cde1138 --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/Functions/FunctionDeclarationUnitTest.inc @@ -0,0 +1,75 @@ + + * @copyright 2006-2015 Squiz Pty Ltd (ABN 77 084 670 600) + * @license https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence + */ + +namespace PHP_CodeSniffer\Standards\Squiz\Tests\Functions; + +use PHP_CodeSniffer\Tests\Standards\AbstractSniffUnitTest; + +class FunctionDeclarationUnitTest extends AbstractSniffUnitTest +{ + + + /** + * Returns the lines where errors should occur. + * + * The key of the array should represent the line number and the value + * should represent the number of errors that should occur on that line. + * + * @return array + */ + public function getErrorList() + { + return [ + 55 => 1, + 68 => 1, + ]; + + }//end getErrorList() + + + /** + * Returns the lines where warnings should occur. + * + * The key of the array should represent the line number and the value + * should represent the number of warnings that should occur on that line. + * + * @return array + */ + public function getWarningList() + { + return []; + + }//end getWarningList() + + +}//end class diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/Functions/FunctionDuplicateArgumentUnitTest.inc b/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/Functions/FunctionDuplicateArgumentUnitTest.inc new file mode 100644 index 00000000..27102d05 --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/Functions/FunctionDuplicateArgumentUnitTest.inc @@ -0,0 +1,6 @@ + diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/Functions/FunctionDuplicateArgumentUnitTest.php b/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/Functions/FunctionDuplicateArgumentUnitTest.php new file mode 100644 index 00000000..da09cef3 --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/Functions/FunctionDuplicateArgumentUnitTest.php @@ -0,0 +1,52 @@ + + * @copyright 2006-2015 Squiz Pty Ltd (ABN 77 084 670 600) + * @license https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence + */ + +namespace PHP_CodeSniffer\Standards\Squiz\Tests\Functions; + +use PHP_CodeSniffer\Tests\Standards\AbstractSniffUnitTest; + +class FunctionDuplicateArgumentUnitTest extends AbstractSniffUnitTest +{ + + + /** + * Returns the lines where errors should occur. + * + * The key of the array should represent the line number and the value + * should represent the number of errors that should occur on that line. + * + * @return array + */ + public function getErrorList() + { + return [ + 2 => 1, + 4 => 2, + 5 => 1, + ]; + + }//end getErrorList() + + + /** + * Returns the lines where warnings should occur. + * + * The key of the array should represent the line number and the value + * should represent the number of warnings that should occur on that line. + * + * @return array + */ + public function getWarningList() + { + return []; + + }//end getWarningList() + + +}//end class diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/Functions/GlobalFunctionUnitTest.inc b/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/Functions/GlobalFunctionUnitTest.inc new file mode 100644 index 00000000..b7b7f205 --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/Functions/GlobalFunctionUnitTest.inc @@ -0,0 +1,17 @@ + diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/Functions/GlobalFunctionUnitTest.php b/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/Functions/GlobalFunctionUnitTest.php new file mode 100644 index 00000000..7be76488 --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/Functions/GlobalFunctionUnitTest.php @@ -0,0 +1,48 @@ + + * @copyright 2006-2015 Squiz Pty Ltd (ABN 77 084 670 600) + * @license https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence + */ + +namespace PHP_CodeSniffer\Standards\Squiz\Tests\Functions; + +use PHP_CodeSniffer\Tests\Standards\AbstractSniffUnitTest; + +class GlobalFunctionUnitTest extends AbstractSniffUnitTest +{ + + + /** + * Returns the lines where errors should occur. + * + * The key of the array should represent the line number and the value + * should represent the number of errors that should occur on that line. + * + * @return array + */ + public function getErrorList() + { + return []; + + }//end getErrorList() + + + /** + * Returns the lines where warnings should occur. + * + * The key of the array should represent the line number and the value + * should represent the number of warnings that should occur on that line. + * + * @return array + */ + public function getWarningList() + { + return [2 => 1]; + + }//end getWarningList() + + +}//end class diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/Functions/LowercaseFunctionKeywordsUnitTest.inc b/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/Functions/LowercaseFunctionKeywordsUnitTest.inc new file mode 100644 index 00000000..4e868336 --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/Functions/LowercaseFunctionKeywordsUnitTest.inc @@ -0,0 +1,28 @@ + $x; diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/Functions/LowercaseFunctionKeywordsUnitTest.inc.fixed b/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/Functions/LowercaseFunctionKeywordsUnitTest.inc.fixed new file mode 100644 index 00000000..48c99777 --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/Functions/LowercaseFunctionKeywordsUnitTest.inc.fixed @@ -0,0 +1,28 @@ + $x; diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/Functions/LowercaseFunctionKeywordsUnitTest.php b/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/Functions/LowercaseFunctionKeywordsUnitTest.php new file mode 100644 index 00000000..1e1537b7 --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/Functions/LowercaseFunctionKeywordsUnitTest.php @@ -0,0 +1,58 @@ + + * @copyright 2006-2015 Squiz Pty Ltd (ABN 77 084 670 600) + * @license https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence + */ + +namespace PHP_CodeSniffer\Standards\Squiz\Tests\Functions; + +use PHP_CodeSniffer\Tests\Standards\AbstractSniffUnitTest; + +class LowercaseFunctionKeywordsUnitTest extends AbstractSniffUnitTest +{ + + + /** + * Returns the lines where errors should occur. + * + * The key of the array should represent the line number and the value + * should represent the number of errors that should occur on that line. + * + * @return array + */ + public function getErrorList() + { + return [ + 16 => 1, + 17 => 1, + 20 => 1, + 21 => 1, + 22 => 1, + 23 => 1, + 24 => 3, + 25 => 4, + 28 => 1, + ]; + + }//end getErrorList() + + + /** + * Returns the lines where warnings should occur. + * + * The key of the array should represent the line number and the value + * should represent the number of warnings that should occur on that line. + * + * @return array + */ + public function getWarningList() + { + return []; + + }//end getWarningList() + + +}//end class diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/Functions/MultiLineFunctionDeclarationUnitTest.inc b/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/Functions/MultiLineFunctionDeclarationUnitTest.inc new file mode 100644 index 00000000..fce0b237 --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/Functions/MultiLineFunctionDeclarationUnitTest.inc @@ -0,0 +1,257 @@ + + * @copyright 2006-2015 Squiz Pty Ltd (ABN 77 084 670 600) + * @license https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence + */ + +namespace PHP_CodeSniffer\Standards\Squiz\Tests\Functions; + +use PHP_CodeSniffer\Tests\Standards\AbstractSniffUnitTest; + +class MultiLineFunctionDeclarationUnitTest extends AbstractSniffUnitTest +{ + + + /** + * Returns the lines where errors should occur. + * + * The key of the array should represent the line number and the value + * should represent the number of errors that should occur on that line. + * + * @param string $testFile The name of the file being tested. + * + * @return array + */ + public function getErrorList($testFile='MultiLineFunctionDeclarationUnitTest.inc') + { + if ($testFile === 'MultiLineFunctionDeclarationUnitTest.inc') { + $errors = [ + 2 => 1, + 3 => 1, + 4 => 2, + 5 => 1, + 7 => 1, + 11 => 1, + 12 => 1, + 13 => 1, + 16 => 1, + 36 => 1, + 43 => 2, + 48 => 1, + 81 => 1, + 82 => 2, + 88 => 1, + 102 => 2, + 137 => 1, + 141 => 2, + 142 => 1, + 158 => 1, + 160 => 1, + 182 => 2, + 186 => 2, + 190 => 2, + 194 => 1, + 195 => 1, + 233 => 1, + 234 => 1, + 235 => 1, + 236 => 1, + 244 => 1, + 245 => 1, + 246 => 1, + 247 => 1, + 248 => 1, + 249 => 1, + 250 => 1, + 251 => 1, + 252 => 1, + 253 => 1, + 254 => 1, + ]; + } else { + $errors = [ + 2 => 1, + 3 => 1, + 4 => 2, + 5 => 1, + 7 => 1, + 11 => 1, + 12 => 1, + 13 => 1, + 16 => 1, + 26 => 1, + 36 => 1, + 43 => 2, + 48 => 1, + 65 => 1, + ]; + }//end if + + return $errors; + + }//end getErrorList() + + + /** + * Returns the lines where warnings should occur. + * + * The key of the array should represent the line number and the value + * should represent the number of warnings that should occur on that line. + * + * @return array + */ + public function getWarningList() + { + return []; + + }//end getWarningList() + + +}//end class diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/NamingConventions/ValidFunctionNameUnitTest.inc b/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/NamingConventions/ValidFunctionNameUnitTest.inc new file mode 100644 index 00000000..aacef347 --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/NamingConventions/ValidFunctionNameUnitTest.inc @@ -0,0 +1,27 @@ + diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/NamingConventions/ValidFunctionNameUnitTest.php b/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/NamingConventions/ValidFunctionNameUnitTest.php new file mode 100644 index 00000000..77f13bb2 --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/NamingConventions/ValidFunctionNameUnitTest.php @@ -0,0 +1,59 @@ + + * @copyright 2006-2015 Squiz Pty Ltd (ABN 77 084 670 600) + * @license https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence + */ + +namespace PHP_CodeSniffer\Standards\Squiz\Tests\NamingConventions; + +use PHP_CodeSniffer\Tests\Standards\AbstractSniffUnitTest; + +class ValidFunctionNameUnitTest extends AbstractSniffUnitTest +{ + + + /** + * Returns the lines where errors should occur. + * + * The key of the array should represent the line number and the value + * should represent the number of errors that should occur on that line. + * + * @return array + */ + public function getErrorList() + { + return [ + 4 => 1, + 5 => 1, + 6 => 1, + 7 => 1, + 8 => 1, + 9 => 1, + 11 => 1, + 12 => 1, + 13 => 1, + 14 => 2, + ]; + + }//end getErrorList() + + + /** + * Returns the lines where warnings should occur. + * + * The key of the array should represent the line number and the value + * should represent the number of warnings that should occur on that line. + * + * @return array + */ + public function getWarningList() + { + return []; + + }//end getWarningList() + + +}//end class diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/NamingConventions/ValidVariableNameUnitTest.inc b/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/NamingConventions/ValidVariableNameUnitTest.inc new file mode 100644 index 00000000..c7b8a2b6 --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/NamingConventions/ValidVariableNameUnitTest.inc @@ -0,0 +1,148 @@ +varName2; +echo $this->var_name2; +echo $this->varname2; +echo $this->_varName2; +echo $object->varName2; +echo $object->var_name2; +echo $object_name->varname2; +echo $object_name->_varName2; + +echo $this->myFunction($one, $two); +echo $object->myFunction($one_two); + +$error = "format is \$GLOBALS['$varName']"; + +echo $_SESSION['var_name']; +echo $_FILES['var_name']; +echo $_ENV['var_name']; +echo $_COOKIE['var_name']; + +$XML = 'hello'; +$myXML = 'hello'; +$XMLParser = 'hello'; +$xmlParser = 'hello'; + +echo "{$_SERVER['HOSTNAME']} $var_name"; + +// Need to be the last thing in this test file. +$obj->$classVar = $prefix.'-'.$type; + +class foo +{ + const bar = <<varName; +echo $obj?->var_name; +echo $obj?->varname; +echo $obj?->_varName; diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/NamingConventions/ValidVariableNameUnitTest.php b/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/NamingConventions/ValidVariableNameUnitTest.php new file mode 100644 index 00000000..aaa9d099 --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/NamingConventions/ValidVariableNameUnitTest.php @@ -0,0 +1,86 @@ + + * @copyright 2006-2015 Squiz Pty Ltd (ABN 77 084 670 600) + * @license https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence + */ + +namespace PHP_CodeSniffer\Standards\Squiz\Tests\NamingConventions; + +use PHP_CodeSniffer\Tests\Standards\AbstractSniffUnitTest; + +class ValidVariableNameUnitTest extends AbstractSniffUnitTest +{ + + + /** + * Returns the lines where errors should occur. + * + * The key of the array should represent the line number and the value + * should represent the number of errors that should occur on that line. + * + * @return array + */ + public function getErrorList() + { + $errors = [ + 3 => 1, + 5 => 1, + 10 => 1, + 12 => 1, + 15 => 1, + 17 => 1, + 20 => 1, + 22 => 1, + 25 => 1, + 27 => 1, + 31 => 1, + 33 => 1, + 36 => 1, + 37 => 1, + 39 => 1, + 42 => 1, + 44 => 1, + 53 => 1, + 58 => 1, + 62 => 1, + 63 => 1, + 64 => 1, + 67 => 1, + 81 => 1, + 106 => 1, + 107 => 2, + 108 => 1, + 111 => 1, + 112 => 1, + 113 => 1, + 114 => 1, + 123 => 1, + 138 => 1, + 141 => 1, + 146 => 1, + ]; + + return $errors; + + }//end getErrorList() + + + /** + * Returns the lines where warnings should occur. + * + * The key of the array should represent the line number and the value + * should represent the number of warnings that should occur on that line. + * + * @return array + */ + public function getWarningList() + { + return []; + + }//end getWarningList() + + +}//end class diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/Objects/DisallowObjectStringIndexUnitTest.js b/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/Objects/DisallowObjectStringIndexUnitTest.js new file mode 100644 index 00000000..1c61fbfb --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/Objects/DisallowObjectStringIndexUnitTest.js @@ -0,0 +1,37 @@ +function test(id) +{ + + this.id = id; + +} +/**/ +test.prototype = { + init: function() + { + var x = {}; + x.name = 'test'; + x['phone'] = 123124324; + var t = ['test', 'this'].join(''); + var y = ['test'].join(''); + var a = x[0]; + var z = x[x['name']]; + var p = x[x.name]; + } + +}; + +function test() { + this.errors['step_' + step] = errors; + this.errors['test'] = x; + this.errors['test' + 10] = x; + this.errors['test' + y] = x; + this.errors['test' + 'blah'] = x; + this.errors[y] = x; + this.errors[y + z] = x; + this.permissions['workflow.cancel'] = x; +} + +if (child.prototype) { + above.prototype['constructor'] = parent; + child.prototype['super'] = new above(); +} diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/Objects/DisallowObjectStringIndexUnitTest.php b/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/Objects/DisallowObjectStringIndexUnitTest.php new file mode 100644 index 00000000..cb2d58e5 --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/Objects/DisallowObjectStringIndexUnitTest.php @@ -0,0 +1,59 @@ + + * @copyright 2006-2015 Squiz Pty Ltd (ABN 77 084 670 600) + * @license https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence + */ + +namespace PHP_CodeSniffer\Standards\Squiz\Tests\Objects; + +use PHP_CodeSniffer\Tests\Standards\AbstractSniffUnitTest; + +class DisallowObjectStringIndexUnitTest extends AbstractSniffUnitTest +{ + + + /** + * Returns the lines where errors should occur. + * + * The key of the array should represent the line number and the value + * should represent the number of errors that should occur on that line. + * + * @param string $testFile The name of the file being tested. + * + * @return array + */ + public function getErrorList($testFile='DisallowObjectStringIndexUnitTest.js') + { + if ($testFile !== 'DisallowObjectStringIndexUnitTest.js') { + return []; + } + + return [ + 13 => 1, + 17 => 1, + 25 => 1, + 35 => 1, + ]; + + }//end getErrorList() + + + /** + * Returns the lines where warnings should occur. + * + * The key of the array should represent the line number and the value + * should represent the number of warnings that should occur on that line. + * + * @return array + */ + public function getWarningList() + { + return []; + + }//end getWarningList() + + +}//end class diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/Objects/ObjectInstantiationUnitTest.inc b/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/Objects/ObjectInstantiationUnitTest.inc new file mode 100644 index 00000000..41c88128 --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/Objects/ObjectInstantiationUnitTest.inc @@ -0,0 +1,46 @@ + new MyClass()); +$object->myFunction(new MyClass()); + +throw new MyException($msg); + +function foo() { return new MyClass(); } + +$doodad = $x ? new Foo : new Bar; + +function returnFn() { + $fn = fn($x) => new MyClass(); +} + +function returnMatch() { + $match = match($x) { + 0 => new MyClass() + } +} + +// Issue 3333. +$time2 ??= new \DateTime(); +$time3 = $time1 ?? new \DateTime(); +$time3 = $time1 ?? $time2 ?? new \DateTime(); + +function_call($time1 ?? new \DateTime()); +$return = function_call($time1 ?? new \DateTime()); // False negative depending on interpretation of the sniff. + +function returnViaTernary() { + return ($y == false ) ? ($x === true ? new Foo : new Bar) : new FooBar; +} + +function nonAssignmentTernary() { + if (($x ? new Foo() : new Bar) instanceof FooBar) { + // Do something. + } +} + +// Intentional parse error. This must be the last test in the file. +function new +?> diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/Objects/ObjectInstantiationUnitTest.php b/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/Objects/ObjectInstantiationUnitTest.php new file mode 100644 index 00000000..f9979fa2 --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/Objects/ObjectInstantiationUnitTest.php @@ -0,0 +1,53 @@ + + * @copyright 2006-2015 Squiz Pty Ltd (ABN 77 084 670 600) + * @license https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence + */ + +namespace PHP_CodeSniffer\Standards\Squiz\Tests\Objects; + +use PHP_CodeSniffer\Tests\Standards\AbstractSniffUnitTest; + +class ObjectInstantiationUnitTest extends AbstractSniffUnitTest +{ + + + /** + * Returns the lines where errors should occur. + * + * The key of the array should represent the line number and the value + * should represent the number of errors that should occur on that line. + * + * @return array + */ + public function getErrorList() + { + return [ + 5 => 1, + 8 => 1, + 31 => 1, + 39 => 2, + ]; + + }//end getErrorList() + + + /** + * Returns the lines where warnings should occur. + * + * The key of the array should represent the line number and the value + * should represent the number of warnings that should occur on that line. + * + * @return array + */ + public function getWarningList() + { + return []; + + }//end getWarningList() + + +}//end class diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/Objects/ObjectMemberCommaUnitTest.js b/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/Objects/ObjectMemberCommaUnitTest.js new file mode 100644 index 00000000..28bf85ad --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/Objects/ObjectMemberCommaUnitTest.js @@ -0,0 +1,47 @@ +this.request({ action: 'getTypeFormatContents', }); + +addTypeFormatButton.addClickEvent(function() { + self.addNewTypeFormat(); +}); + +var x = {}; + +var y = { + VarOne : 'If you ask me, thats if you ask', + VarTwo : ['Alonzo played you', 'for a fool', 'esse'], + VarThree: function(arg) { + console.info(1); + } +}; + +var z = { + VarOne : 'If you ask me, thats if you ask', + VarTwo : ['Alonzo played you', 'for a fool', 'esse'], + VarThree: function(arg) { + console.info(1); + }, +}; + +var x = function() { + console.info(2); +}; + +AssetListingEditWidgetType.prototype = { + init: function(data, assetid, editables) + { + } +}; + +AssetListingEditWidgetType.prototype = { + init: function(data, assetid, editables) + { + }, +}; + +AssetListingEditWidgetType.prototype = { + // phpcs: disable Standard.Cat.SniffName -- testing annotation between closing brace and comma + init: function(data, assetid, editables) + { + }, + // phpcs:enable +}; diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/Objects/ObjectMemberCommaUnitTest.js.fixed b/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/Objects/ObjectMemberCommaUnitTest.js.fixed new file mode 100644 index 00000000..df548c74 --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/Objects/ObjectMemberCommaUnitTest.js.fixed @@ -0,0 +1,47 @@ +this.request({ action: 'getTypeFormatContents' }); + +addTypeFormatButton.addClickEvent(function() { + self.addNewTypeFormat(); +}); + +var x = {}; + +var y = { + VarOne : 'If you ask me, thats if you ask', + VarTwo : ['Alonzo played you', 'for a fool', 'esse'], + VarThree: function(arg) { + console.info(1); + } +}; + +var z = { + VarOne : 'If you ask me, thats if you ask', + VarTwo : ['Alonzo played you', 'for a fool', 'esse'], + VarThree: function(arg) { + console.info(1); + } +}; + +var x = function() { + console.info(2); +}; + +AssetListingEditWidgetType.prototype = { + init: function(data, assetid, editables) + { + } +}; + +AssetListingEditWidgetType.prototype = { + init: function(data, assetid, editables) + { + } +}; + +AssetListingEditWidgetType.prototype = { + // phpcs: disable Standard.Cat.SniffName -- testing annotation between closing brace and comma + init: function(data, assetid, editables) + { + } + // phpcs:enable +}; diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/Objects/ObjectMemberCommaUnitTest.php b/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/Objects/ObjectMemberCommaUnitTest.php new file mode 100644 index 00000000..ab1cf810 --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/Objects/ObjectMemberCommaUnitTest.php @@ -0,0 +1,53 @@ + + * @copyright 2006-2015 Squiz Pty Ltd (ABN 77 084 670 600) + * @license https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence + */ + +namespace PHP_CodeSniffer\Standards\Squiz\Tests\Objects; + +use PHP_CodeSniffer\Tests\Standards\AbstractSniffUnitTest; + +class ObjectMemberCommaUnitTest extends AbstractSniffUnitTest +{ + + + /** + * Returns the lines where errors should occur. + * + * The key of the array should represent the line number and the value + * should represent the number of errors that should occur on that line. + * + * @return array + */ + public function getErrorList() + { + return [ + 1 => 1, + 22 => 1, + 38 => 1, + 45 => 1, + ]; + + }//end getErrorList() + + + /** + * Returns the lines where warnings should occur. + * + * The key of the array should represent the line number and the value + * should represent the number of warnings that should occur on that line. + * + * @return array + */ + public function getWarningList() + { + return []; + + }//end getWarningList() + + +}//end class diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/Operators/ComparisonOperatorUsageUnitTest.inc b/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/Operators/ComparisonOperatorUsageUnitTest.inc new file mode 100644 index 00000000..8522438d --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/Operators/ComparisonOperatorUsageUnitTest.inc @@ -0,0 +1,138 @@ + + 0)) { +} + +myFunction($var1 === true ? "" : "foobar"); diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/Operators/ComparisonOperatorUsageUnitTest.js b/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/Operators/ComparisonOperatorUsageUnitTest.js new file mode 100644 index 00000000..048223ba --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/Operators/ComparisonOperatorUsageUnitTest.js @@ -0,0 +1,71 @@ +if (value === TRUE) { +} else if (value === FALSE) { +} + +if (value == TRUE) { +} else if (value == FALSE) { +} + +if (value) { +} else if (!value) { +} + +if (value.isSomething === TRUE) { +} else if (myFunction(value) === FALSE) { +} + +if (value.isSomething == TRUE) { +} else if (myFunction(value) == FALSE) { +} + +if (value.isSomething) { +} else if (!myFunction(value)) { +} + +if (value === TRUE || other === FALSE) { +} + +if (value == TRUE || other == FALSE) { +} + +if (value || !other) { +} + +if (one === TRUE || two === TRUE || three === FALSE || four === TRUE) { +} + +if (one || two || !three || four) { +} + +while (one == true) { +} + +while (one === true) { +} + +do { +} while (one == true); + +do { +} while (one === true); + +for (one = 10; one != 0; one--) { +} + +for (one = 10; one !== 0; one--) { +} + +for (type in types) { +} + +variable = (variable2 === true) ? variable1 : "foobar"; + +variable = (variable2 == true) ? variable1 : "foobar"; + +variable = (variable2 === false) ? variable1 : "foobar"; + +variable = (variable2 == false) ? variable1 : "foobar"; + +variable = (variable2 === 0) ? variable1 : "foobar"; + +variable = (variable2 == 0) ? variable1 : "foobar"; diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/Operators/ComparisonOperatorUsageUnitTest.php b/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/Operators/ComparisonOperatorUsageUnitTest.php new file mode 100644 index 00000000..5618a7fc --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/Operators/ComparisonOperatorUsageUnitTest.php @@ -0,0 +1,101 @@ + + * @copyright 2006-2015 Squiz Pty Ltd (ABN 77 084 670 600) + * @license https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence + */ + +namespace PHP_CodeSniffer\Standards\Squiz\Tests\Operators; + +use PHP_CodeSniffer\Tests\Standards\AbstractSniffUnitTest; + +class ComparisonOperatorUsageUnitTest extends AbstractSniffUnitTest +{ + + + /** + * Returns the lines where errors should occur. + * + * The key of the array should represent the line number and the value + * should represent the number of errors that should occur on that line. + * + * @param string $testFile The name of the file being tested. + * + * @return array + */ + public function getErrorList($testFile='ComparisonOperatorUsageUnitTest.inc') + { + switch ($testFile) { + case 'ComparisonOperatorUsageUnitTest.inc': + return [ + 6 => 1, + 7 => 1, + 10 => 1, + 11 => 1, + 18 => 1, + 19 => 1, + 22 => 1, + 23 => 1, + 29 => 2, + 32 => 2, + 38 => 4, + 47 => 2, + 69 => 1, + 72 => 1, + 75 => 1, + 78 => 1, + 80 => 1, + 82 => 1, + 83 => 1, + 89 => 1, + 92 => 1, + 100 => 1, + 106 => 1, + 112 => 1, + 123 => 1, + 127 => 1, + 131 => 1, + 135 => 1, + ]; + break; + case 'ComparisonOperatorUsageUnitTest.js': + return [ + 5 => 1, + 6 => 1, + 17 => 1, + 18 => 1, + 28 => 2, + 40 => 1, + 47 => 1, + 52 => 1, + 63 => 1, + 67 => 1, + 71 => 1, + ]; + break; + default: + return []; + break; + }//end switch + + }//end getErrorList() + + + /** + * Returns the lines where warnings should occur. + * + * The key of the array should represent the line number and the value + * should represent the number of warnings that should occur on that line. + * + * @return array + */ + public function getWarningList() + { + return []; + + }//end getWarningList() + + +}//end class diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/Operators/IncrementDecrementUsageUnitTest.inc b/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/Operators/IncrementDecrementUsageUnitTest.inc new file mode 100644 index 00000000..a4f82d1a --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/Operators/IncrementDecrementUsageUnitTest.inc @@ -0,0 +1,42 @@ +i++).$id; +$id = $obj?->i++.$id; +$id = $obj?->i++*10; diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/Operators/IncrementDecrementUsageUnitTest.php b/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/Operators/IncrementDecrementUsageUnitTest.php new file mode 100644 index 00000000..3846905d --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/Operators/IncrementDecrementUsageUnitTest.php @@ -0,0 +1,60 @@ + + * @copyright 2006-2015 Squiz Pty Ltd (ABN 77 084 670 600) + * @license https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence + */ + +namespace PHP_CodeSniffer\Standards\Squiz\Tests\Operators; + +use PHP_CodeSniffer\Tests\Standards\AbstractSniffUnitTest; + +class IncrementDecrementUsageUnitTest extends AbstractSniffUnitTest +{ + + + /** + * Returns the lines where errors should occur. + * + * The key of the array should represent the line number and the value + * should represent the number of errors that should occur on that line. + * + * @return array + */ + public function getErrorList() + { + return [ + 2 => 1, + 6 => 1, + 12 => 1, + 16 => 1, + 25 => 1, + 26 => 1, + 27 => 1, + 29 => 1, + 31 => 1, + 41 => 1, + 42 => 1, + ]; + + }//end getErrorList() + + + /** + * Returns the lines where warnings should occur. + * + * The key of the array should represent the line number and the value + * should represent the number of warnings that should occur on that line. + * + * @return array + */ + public function getWarningList() + { + return []; + + }//end getWarningList() + + +}//end class diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/Operators/ValidLogicalOperatorsUnitTest.inc b/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/Operators/ValidLogicalOperatorsUnitTest.inc new file mode 100644 index 00000000..328ccc5d --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/Operators/ValidLogicalOperatorsUnitTest.inc @@ -0,0 +1,28 @@ + diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/Operators/ValidLogicalOperatorsUnitTest.php b/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/Operators/ValidLogicalOperatorsUnitTest.php new file mode 100644 index 00000000..fc351319 --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/Operators/ValidLogicalOperatorsUnitTest.php @@ -0,0 +1,52 @@ + + * @copyright 2006-2015 Squiz Pty Ltd (ABN 77 084 670 600) + * @license https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence + */ + +namespace PHP_CodeSniffer\Standards\Squiz\Tests\Operators; + +use PHP_CodeSniffer\Tests\Standards\AbstractSniffUnitTest; + +class ValidLogicalOperatorsUnitTest extends AbstractSniffUnitTest +{ + + + /** + * Returns the lines where errors should occur. + * + * The key of the array should represent the line number and the value + * should represent the number of errors that should occur on that line. + * + * @return array + */ + public function getErrorList() + { + return [ + 5 => 1, + 11 => 1, + 17 => 2, + ]; + + }//end getErrorList() + + + /** + * Returns the lines where warnings should occur. + * + * The key of the array should represent the line number and the value + * should represent the number of warnings that should occur on that line. + * + * @return array + */ + public function getWarningList() + { + return []; + + }//end getWarningList() + + +}//end class diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/PHP/CommentedOutCodeUnitTest.css b/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/PHP/CommentedOutCodeUnitTest.css new file mode 100644 index 00000000..94cc8f27 --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/PHP/CommentedOutCodeUnitTest.css @@ -0,0 +1,23 @@ +/* CSS Document */ + +body { +font-family: Arial, Helvetica, sans-serif; +margin : 40px 0 0 0; +padding : 0; +/*background: #8FB7DB url(login_glow_bg.jpg) no-repeat 30% 0;*/ +background: #8FB7DB url(diag_lines_bg.gif) top left; +} + +#login-container { + margin-left: -225px; + margin-top: -161px; + position:absolute; + top :50%; + /*left :50%;*/ + width:450px; +} + +#cacheConfig-dayLabel, #cacheConfig-hourLabel, #cacheConfig-minuteLabel { + float: left; + padding-right: 8px; +} diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/PHP/CommentedOutCodeUnitTest.inc b/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/PHP/CommentedOutCodeUnitTest.inc new file mode 100644 index 00000000..121240a9 --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/PHP/CommentedOutCodeUnitTest.inc @@ -0,0 +1,158 @@ + + * + * Title + * Contents + * + * ... + * + * + * + * + * @return void + */ + +/* + [^\'"] +*/ + +// http://www.google.com + +// Base config function. + +// function () + +// T_STRING is not a function call or not listed in _getFunctionListWithCallableArgument(). + + // function myFunction( $param ) + // { + // do_something(); + // }//end myFunction() + // + +/* +function myFunction( $param ) +{ + // phpcs:disable Standard.Category.Sniff -- for reasons. + if ( preg_match( '`[abc]`', $param ) > 0 ) { + do_something(); + } + // phpcs:enable Standard.Category.Sniff -- for reasons. + +}//end myFunction() +*/ + + /* + * function myFunction( $param ) // @phpcs:ignore Standard.Category.Sniff -- for reasons. + * { + * + * }//end myFunction() + */ + + /* + * function myFunction( $param ) + * { + * // phpcs:disable Standard.Category.Sniff -- for reasons. + * if ( preg_match( '`[abc]`', $param ) > 0 ) { + * do_something(); + * } + * // phpcs:enable Standard.Category.Sniff -- for reasons. + * + * }//end myFunction() + */ + + // function myFunction( $param ) + // { + // phpcs:disable Standard.Category.Sniff -- for reasons. + // do_something(); + // phpcs:enable Standard.Category.Sniff -- for reasons. + // }//end myFunction() + // + +echo 'something'; // @codeCoverageIgnore +echo 'something'; // @codeCoverageIgnoreStart +echo 'something'; // @SuppressWarnings(PHPMD.UnusedLocalVariable) + +// Ok! + +/* Go! */ + +// ISO-639-3 + + // But override with a different text if any. + /* + $id = intval( str_replace( 'hook_name', '', $order_method['method_id'] ) ); + if ( ! empty( $id ) ) { + $info_text = get_post_meta( $location_id, 'meta_name' ); + + if ( ! empty( $info_text ) ) { + $text = $info_text; + } + + } + */ + // function() { $a = $b; }; diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/PHP/CommentedOutCodeUnitTest.php b/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/PHP/CommentedOutCodeUnitTest.php new file mode 100644 index 00000000..36c556d8 --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/PHP/CommentedOutCodeUnitTest.php @@ -0,0 +1,76 @@ + + * @copyright 2006-2015 Squiz Pty Ltd (ABN 77 084 670 600) + * @license https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence + */ + +namespace PHP_CodeSniffer\Standards\Squiz\Tests\PHP; + +use PHP_CodeSniffer\Tests\Standards\AbstractSniffUnitTest; + +class CommentedOutCodeUnitTest extends AbstractSniffUnitTest +{ + + + /** + * Returns the lines where errors should occur. + * + * The key of the array should represent the line number and the value + * should represent the number of errors that should occur on that line. + * + * @return array + */ + public function getErrorList() + { + return []; + + }//end getErrorList() + + + /** + * Returns the lines where warnings should occur. + * + * The key of the array should represent the line number and the value + * should represent the number of warnings that should occur on that line. + * + * @param string $testFile The name of the file being tested. + * + * @return array + */ + public function getWarningList($testFile='CommentedOutCodeUnitTest.inc') + { + switch ($testFile) { + case 'CommentedOutCodeUnitTest.inc': + return [ + 6 => 1, + 8 => 1, + 15 => 1, + 19 => 1, + 87 => 1, + 91 => 1, + 97 => 1, + 109 => 1, + 116 => 1, + 128 => 1, + 147 => 1, + 158 => 1, + ]; + break; + case 'CommentedOutCodeUnitTest.css': + return [ + 7 => 1, + 16 => 1, + ]; + break; + default: + return []; + break; + }//end switch + + }//end getWarningList() + + +}//end class diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/PHP/DisallowBooleanStatementUnitTest.inc b/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/PHP/DisallowBooleanStatementUnitTest.inc new file mode 100644 index 00000000..4701c23e --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/PHP/DisallowBooleanStatementUnitTest.inc @@ -0,0 +1,27 @@ + \ No newline at end of file diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/PHP/DisallowBooleanStatementUnitTest.php b/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/PHP/DisallowBooleanStatementUnitTest.php new file mode 100644 index 00000000..6439b632 --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/PHP/DisallowBooleanStatementUnitTest.php @@ -0,0 +1,53 @@ + + * @copyright 2006-2015 Squiz Pty Ltd (ABN 77 084 670 600) + * @license https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence + */ + +namespace PHP_CodeSniffer\Standards\Squiz\Tests\PHP; + +use PHP_CodeSniffer\Tests\Standards\AbstractSniffUnitTest; + +class DisallowBooleanStatementUnitTest extends AbstractSniffUnitTest +{ + + + /** + * Returns the lines where errors should occur. + * + * The key of the array should represent the line number and the value + * should represent the number of errors that should occur on that line. + * + * @return array + */ + public function getErrorList() + { + return [ + 3 => 1, + 8 => 1, + 13 => 1, + 15 => 1, + ]; + + }//end getErrorList() + + + /** + * Returns the lines where warnings should occur. + * + * The key of the array should represent the line number and the value + * should represent the number of warnings that should occur on that line. + * + * @return array + */ + public function getWarningList() + { + return []; + + }//end getWarningList() + + +}//end class diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/PHP/DisallowComparisonAssignmentUnitTest.inc b/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/PHP/DisallowComparisonAssignmentUnitTest.inc new file mode 100644 index 00000000..022aca73 --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/PHP/DisallowComparisonAssignmentUnitTest.inc @@ -0,0 +1,73 @@ +nextSibling; $node; $node = $node->nextSibling) { + if ($node->nodeType !== XML_ELEMENT_NODE) { + continue; + } + + for ($node = $fields->nextSibling; $node; $node = $node->nextSibling) { + if ($node->nodeType !== XML_ELEMENT_NODE) { + continue; + } + } +} + +$a = $b ? $c : $d; +$a = $b === true ? $c : $d; + +$this->_args = $this->_getArgs(($_SERVER['argv'] ?? [])); +$args = ($_SERVER['argv'] ?? []); + +$a = [ + 'a' => ($foo) ? $foo : $bar, +]; + +$a = [ + 'a' => ($foo) ? fn() => return 1 : fn() => return 2, +]; + +$var = $foo->something(!$var); +$var = $foo?->something(!$var); + +$callback = function ($value) { + if ($value > 10) { + return false; + } +}; diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/PHP/DisallowComparisonAssignmentUnitTest.php b/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/PHP/DisallowComparisonAssignmentUnitTest.php new file mode 100644 index 00000000..c8d8b0b8 --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/PHP/DisallowComparisonAssignmentUnitTest.php @@ -0,0 +1,59 @@ + + * @copyright 2006-2015 Squiz Pty Ltd (ABN 77 084 670 600) + * @license https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence + */ + +namespace PHP_CodeSniffer\Standards\Squiz\Tests\PHP; + +use PHP_CodeSniffer\Tests\Standards\AbstractSniffUnitTest; + +class DisallowComparisonAssignmentUnitTest extends AbstractSniffUnitTest +{ + + + /** + * Returns the lines where errors should occur. + * + * The key of the array should represent the line number and the value + * should represent the number of errors that should occur on that line. + * + * @return array + */ + public function getErrorList() + { + return [ + 3 => 1, + 5 => 1, + 6 => 1, + 7 => 1, + 8 => 1, + 10 => 1, + 52 => 1, + 53 => 1, + 58 => 1, + 62 => 1, + ]; + + }//end getErrorList() + + + /** + * Returns the lines where warnings should occur. + * + * The key of the array should represent the line number and the value + * should represent the number of warnings that should occur on that line. + * + * @return array + */ + public function getWarningList() + { + return []; + + }//end getWarningList() + + +}//end class diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/PHP/DisallowInlineIfUnitTest.inc b/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/PHP/DisallowInlineIfUnitTest.inc new file mode 100644 index 00000000..f57e0710 --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/PHP/DisallowInlineIfUnitTest.inc @@ -0,0 +1,18 @@ + $x; + +$b = fn ($b) => $b ? true : false; diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/PHP/DisallowInlineIfUnitTest.js b/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/PHP/DisallowInlineIfUnitTest.js new file mode 100644 index 00000000..56387c06 --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/PHP/DisallowInlineIfUnitTest.js @@ -0,0 +1,2 @@ +x = (x?a:x); +id = id.replace(/row\/:/gi, ''); diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/PHP/DisallowInlineIfUnitTest.php b/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/PHP/DisallowInlineIfUnitTest.php new file mode 100644 index 00000000..27083ce2 --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/PHP/DisallowInlineIfUnitTest.php @@ -0,0 +1,63 @@ + + * @copyright 2006-2015 Squiz Pty Ltd (ABN 77 084 670 600) + * @license https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence + */ + +namespace PHP_CodeSniffer\Standards\Squiz\Tests\PHP; + +use PHP_CodeSniffer\Tests\Standards\AbstractSniffUnitTest; + +class DisallowInlineIfUnitTest extends AbstractSniffUnitTest +{ + + + /** + * Returns the lines where errors should occur. + * + * The key of the array should represent the line number and the value + * should represent the number of errors that should occur on that line. + * + * @param string $testFile The name of the file being tested. + * + * @return array + */ + public function getErrorList($testFile='DisallowInlineIfUnitTest.inc') + { + switch ($testFile) { + case 'DisallowInlineIfUnitTest.inc': + return [ + 8 => 1, + 18 => 1, + ]; + break; + case 'DisallowInlineIfUnitTest.js': + return [1 => 1]; + break; + default: + return []; + break; + }//end switch + + }//end getErrorList() + + + /** + * Returns the lines where warnings should occur. + * + * The key of the array should represent the line number and the value + * should represent the number of warnings that should occur on that line. + * + * @return array + */ + public function getWarningList() + { + return []; + + }//end getWarningList() + + +}//end class diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/PHP/DisallowMultipleAssignmentsUnitTest.inc b/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/PHP/DisallowMultipleAssignmentsUnitTest.inc new file mode 100644 index 00000000..f657fb4a --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/PHP/DisallowMultipleAssignmentsUnitTest.inc @@ -0,0 +1,110 @@ +fetch(PDO::FETCH_NUM)) { + $result[$row[0]] = array(); + $result[$row[0]][] = $current; + + self::$_inTransaction = TRUE; + parent::$_inTransaction = TRUE; + static::$_inTransaction = TRUE; + $$varName = $varValue; + } + +}//end getVar() + +class myClass +{ + private static $_dbh = NULL; + public $dbh = NULL; + protected $dbh = NULL; + var $dbh = NULL; // Old PHP4 compatible code. +} + +A::$a = 'b'; +\A::$a = 'c'; +\A\B\C::$d = 'd'; +B\C::$d = 'e'; + +@$a = 1; + +$a = []; +foreach ($a as $b) + $c = 'd'; + +$var = $var2; +list ($a, $b) = explode(',', $c); +$var1 ? $var2 = 0 : $var2 = 1; + +$obj->$classVar = $prefix.'-'.$type; + +$closureWithDefaultParamter = function(array $testArray=array()) {}; +?> + + + 10, + false => 0 + }, +]; + +$arrow_function = fn ($a = null) => $a; + +function ($html) { + $regEx = '/regexp/'; + + return preg_replace_callback($regEx, function ($matches) { + [$all] = $matches; + return $all; + }, $html); +}; + + +function () { + $a = false; + + some_label: + + $b = getB(); +}; + diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/PHP/DisallowMultipleAssignmentsUnitTest.php b/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/PHP/DisallowMultipleAssignmentsUnitTest.php new file mode 100644 index 00000000..618d76ef --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/PHP/DisallowMultipleAssignmentsUnitTest.php @@ -0,0 +1,58 @@ + + * @copyright 2006-2015 Squiz Pty Ltd (ABN 77 084 670 600) + * @license https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence + */ + +namespace PHP_CodeSniffer\Standards\Squiz\Tests\PHP; + +use PHP_CodeSniffer\Tests\Standards\AbstractSniffUnitTest; + +class DisallowMultipleAssignmentsUnitTest extends AbstractSniffUnitTest +{ + + + /** + * Returns the lines where errors should occur. + * + * The key of the array should represent the line number and the value + * should represent the number of errors that should occur on that line. + * + * @return array + */ + public function getErrorList() + { + return [ + 4 => 1, + 5 => 2, + 7 => 1, + 9 => 1, + 12 => 1, + 14 => 1, + 15 => 1, + 79 => 1, + 85 => 1, + ]; + + }//end getErrorList() + + + /** + * Returns the lines where warnings should occur. + * + * The key of the array should represent the line number and the value + * should represent the number of warnings that should occur on that line. + * + * @return array + */ + public function getWarningList() + { + return []; + + }//end getWarningList() + + +}//end class diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/PHP/DisallowSizeFunctionsInLoopsUnitTest.inc b/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/PHP/DisallowSizeFunctionsInLoopsUnitTest.inc new file mode 100644 index 00000000..56802e37 --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/PHP/DisallowSizeFunctionsInLoopsUnitTest.inc @@ -0,0 +1,58 @@ +children); $i++) { +} + + + +for ($i = 0; $i < sizeof($array); $i++) { +} + +$num = sizeof($array); + +while ($i < sizeof($array)) { +} + +do { +} while ($i < sizeof($array)); + +for ($i = 0; $i < sizeof($this->children); $i++) { +} + + + + +for ($i = 0; $i < strlen($string); $i++) { +} + +$num = strlen($string); + +while ($i < strlen($string)) { +} + +do { +} while ($i < strlen($string)); + +for ($i = 0; $i < strlen($this->string); $i++) { +} + +for ($i = sizeof($array); $i > 0; $i--) { +} + +do { + echo $a->count; + $a->count--; +} while($a->count); + +for ($i = 0; $i < $a->count; $i++) {} +for ($i = 0; $i < $a?->count; $i++) {} diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/PHP/DisallowSizeFunctionsInLoopsUnitTest.js b/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/PHP/DisallowSizeFunctionsInLoopsUnitTest.js new file mode 100644 index 00000000..8f7f7b94 --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/PHP/DisallowSizeFunctionsInLoopsUnitTest.js @@ -0,0 +1,13 @@ +for (var i = 0; i < permissions.length; i++) { + // Code here. +} + +var permLen = permissions.length; +for (var length = 0; i < permLen; i++) { + // Code here. +} + +var myArray = [1, 2, 3, 4]; +for (var i = myArray.length; i >= 0; i--) { + var x = i; +} diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/PHP/DisallowSizeFunctionsInLoopsUnitTest.php b/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/PHP/DisallowSizeFunctionsInLoopsUnitTest.php new file mode 100644 index 00000000..21260ad7 --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/PHP/DisallowSizeFunctionsInLoopsUnitTest.php @@ -0,0 +1,73 @@ + + * @copyright 2006-2015 Squiz Pty Ltd (ABN 77 084 670 600) + * @license https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence + */ + +namespace PHP_CodeSniffer\Standards\Squiz\Tests\PHP; + +use PHP_CodeSniffer\Tests\Standards\AbstractSniffUnitTest; + +class DisallowSizeFunctionsInLoopsUnitTest extends AbstractSniffUnitTest +{ + + + /** + * Returns the lines where errors should occur. + * + * The key of the array should represent the line number and the value + * should represent the number of errors that should occur on that line. + * + * @param string $testFile The name of the file being tested. + * + * @return array + */ + public function getErrorList($testFile='DisallowSizeFunctionsInLoopsUnitTest.inc') + { + switch ($testFile) { + case 'DisallowSizeFunctionsInLoopsUnitTest.inc': + return [ + 2 => 1, + 7 => 1, + 11 => 1, + 13 => 1, + 18 => 1, + 23 => 1, + 27 => 1, + 29 => 1, + 35 => 1, + 40 => 1, + 44 => 1, + 46 => 1, + ]; + break; + case 'DisallowSizeFunctionsInLoopsUnitTest.js': + return [1 => 1]; + break; + default: + return []; + break; + }//end switch + + }//end getErrorList() + + + /** + * Returns the lines where warnings should occur. + * + * The key of the array should represent the line number and the value + * should represent the number of warnings that should occur on that line. + * + * @return array + */ + public function getWarningList() + { + return []; + + }//end getWarningList() + + +}//end class diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/PHP/DiscouragedFunctionsUnitTest.inc b/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/PHP/DiscouragedFunctionsUnitTest.inc new file mode 100644 index 00000000..ca457a2e --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/PHP/DiscouragedFunctionsUnitTest.inc @@ -0,0 +1,5 @@ + diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/PHP/DiscouragedFunctionsUnitTest.php b/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/PHP/DiscouragedFunctionsUnitTest.php new file mode 100644 index 00000000..2b2ff5b4 --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/PHP/DiscouragedFunctionsUnitTest.php @@ -0,0 +1,52 @@ + + * @copyright 2006-2015 Squiz Pty Ltd (ABN 77 084 670 600) + * @license https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence + */ + +namespace PHP_CodeSniffer\Standards\Squiz\Tests\PHP; + +use PHP_CodeSniffer\Tests\Standards\AbstractSniffUnitTest; + +class DiscouragedFunctionsUnitTest extends AbstractSniffUnitTest +{ + + + /** + * Returns the lines where errors should occur. + * + * The key of the array should represent the line number and the value + * should represent the number of errors that should occur on that line. + * + * @return array + */ + public function getErrorList() + { + return []; + + }//end getErrorList() + + + /** + * Returns the lines where warnings should occur. + * + * The key of the array should represent the line number and the value + * should represent the number of warnings that should occur on that line. + * + * @return array + */ + public function getWarningList() + { + return [ + 2 => 1, + 3 => 1, + 4 => 1, + ]; + + }//end getWarningList() + + +}//end class diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/PHP/EmbeddedPhpUnitTest.inc b/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/PHP/EmbeddedPhpUnitTest.inc new file mode 100644 index 00000000..c61d5a39 --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/PHP/EmbeddedPhpUnitTest.inc @@ -0,0 +1,119 @@ + + + +<?php echo $title ?> + + + + + hello + + + + + + + + + + + + + + + + + + + + + +section as $section) { + ?> + + + + + + section as $section) { + ?> +
    + + + + + + + + +?> + + + + + + + + + + + + + + + diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/PHP/EmbeddedPhpUnitTest.inc.fixed b/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/PHP/EmbeddedPhpUnitTest.inc.fixed new file mode 100644 index 00000000..5b43d849 --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/PHP/EmbeddedPhpUnitTest.inc.fixed @@ -0,0 +1,119 @@ + + + +<?php echo $title; ?> + + + + + hello + + + + + + + + + + + + + + + + + + + +section as $section) { + ?> +
    + + + + + section as $section) { + ?> +
    + + + + + + + + + + + + +?> + + + + + + + + + + + + + + + diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/PHP/EmbeddedPhpUnitTest.php b/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/PHP/EmbeddedPhpUnitTest.php new file mode 100644 index 00000000..f8cf4cc7 --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/PHP/EmbeddedPhpUnitTest.php @@ -0,0 +1,78 @@ + + * @copyright 2006-2015 Squiz Pty Ltd (ABN 77 084 670 600) + * @license https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence + */ + +namespace PHP_CodeSniffer\Standards\Squiz\Tests\PHP; + +use PHP_CodeSniffer\Tests\Standards\AbstractSniffUnitTest; + +class EmbeddedPhpUnitTest extends AbstractSniffUnitTest +{ + + + /** + * Returns the lines where errors should occur. + * + * The key of the array should represent the line number and the value + * should represent the number of errors that should occur on that line. + * + * @return array + */ + public function getErrorList() + { + return [ + 7 => 1, + 12 => 1, + 18 => 1, + 19 => 2, + 20 => 1, + 21 => 1, + 22 => 3, + 24 => 1, + 26 => 1, + 29 => 1, + 30 => 1, + 31 => 1, + 34 => 1, + 36 => 1, + 40 => 1, + 41 => 1, + 44 => 1, + 45 => 1, + 49 => 1, + 59 => 1, + 63 => 1, + 93 => 1, + 94 => 2, + 100 => 1, + 102 => 1, + 112 => 1, + 113 => 1, + 116 => 1, + 117 => 1, + ]; + + }//end getErrorList() + + + /** + * Returns the lines where warnings should occur. + * + * The key of the array should represent the line number and the value + * should represent the number of warnings that should occur on that line. + * + * @return array + */ + public function getWarningList() + { + return []; + + }//end getWarningList() + + +}//end class diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/PHP/EvalUnitTest.inc b/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/PHP/EvalUnitTest.inc new file mode 100644 index 00000000..ee4c73e5 --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/PHP/EvalUnitTest.inc @@ -0,0 +1,5 @@ + diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/PHP/EvalUnitTest.php b/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/PHP/EvalUnitTest.php new file mode 100644 index 00000000..adee7882 --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/PHP/EvalUnitTest.php @@ -0,0 +1,51 @@ + + * @copyright 2006-2015 Squiz Pty Ltd (ABN 77 084 670 600) + * @license https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence + */ + +namespace PHP_CodeSniffer\Standards\Squiz\Tests\PHP; + +use PHP_CodeSniffer\Tests\Standards\AbstractSniffUnitTest; + +class EvalUnitTest extends AbstractSniffUnitTest +{ + + + /** + * Returns the lines where errors should occur. + * + * The key of the array should represent the line number and the value + * should represent the number of errors that should occur on that line. + * + * @return array + */ + public function getErrorList() + { + return []; + + }//end getErrorList() + + + /** + * Returns the lines where warnings should occur. + * + * The key of the array should represent the line number and the value + * should represent the number of warnings that should occur on that line. + * + * @return array + */ + public function getWarningList() + { + return [ + 2 => 1, + 4 => 1, + ]; + + }//end getWarningList() + + +}//end class diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/PHP/GlobalKeywordUnitTest.inc b/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/PHP/GlobalKeywordUnitTest.inc new file mode 100644 index 00000000..4b2a2109 --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/PHP/GlobalKeywordUnitTest.inc @@ -0,0 +1,13 @@ + diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/PHP/GlobalKeywordUnitTest.php b/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/PHP/GlobalKeywordUnitTest.php new file mode 100644 index 00000000..52f6a00a --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/PHP/GlobalKeywordUnitTest.php @@ -0,0 +1,51 @@ + + * @copyright 2006-2015 Squiz Pty Ltd (ABN 77 084 670 600) + * @license https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence + */ + +namespace PHP_CodeSniffer\Standards\Squiz\Tests\PHP; + +use PHP_CodeSniffer\Tests\Standards\AbstractSniffUnitTest; + +class GlobalKeywordUnitTest extends AbstractSniffUnitTest +{ + + + /** + * Returns the lines where errors should occur. + * + * The key of the array should represent the line number and the value + * should represent the number of errors that should occur on that line. + * + * @return array + */ + public function getErrorList() + { + return [ + 8 => 1, + 9 => 1, + ]; + + }//end getErrorList() + + + /** + * Returns the lines where warnings should occur. + * + * The key of the array should represent the line number and the value + * should represent the number of warnings that should occur on that line. + * + * @return array + */ + public function getWarningList() + { + return []; + + }//end getWarningList() + + +}//end class diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/PHP/HeredocUnitTest.inc b/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/PHP/HeredocUnitTest.inc new file mode 100644 index 00000000..56f4393a --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/PHP/HeredocUnitTest.inc @@ -0,0 +1,27 @@ +foo. +Now, I am printing some {$foo->bar[1]}. +This should not print a capital 'A': \x41 +EOT; + +// The following function has a simulated git conflict for testing. +// This is not a merge conflict - it is a valid test case. +// Please do not remove. +function test() + { + $arr = array( + 'a' => 'a' +<<<<<<< HEAD + 'b' => 'b' +======= + 'c' => 'c' +>>>>>>> master + ); + } diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/PHP/HeredocUnitTest.php b/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/PHP/HeredocUnitTest.php new file mode 100644 index 00000000..2f06f0b0 --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/PHP/HeredocUnitTest.php @@ -0,0 +1,51 @@ + + * @copyright 2006-2015 Squiz Pty Ltd (ABN 77 084 670 600) + * @license https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence + */ + +namespace PHP_CodeSniffer\Standards\Squiz\Tests\PHP; + +use PHP_CodeSniffer\Tests\Standards\AbstractSniffUnitTest; + +class HeredocUnitTest extends AbstractSniffUnitTest +{ + + + /** + * Returns the lines where errors should occur. + * + * The key of the array should represent the line number and the value + * should represent the number of errors that should occur on that line. + * + * @return array + */ + public function getErrorList() + { + return [ + 2 => 1, + 8 => 1, + ]; + + }//end getErrorList() + + + /** + * Returns the lines where warnings should occur. + * + * The key of the array should represent the line number and the value + * should represent the number of warnings that should occur on that line. + * + * @return array + */ + public function getWarningList() + { + return []; + + }//end getWarningList() + + +}//end class diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/PHP/InnerFunctionsUnitTest.inc b/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/PHP/InnerFunctionsUnitTest.inc new file mode 100644 index 00000000..dd851461 --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/PHP/InnerFunctionsUnitTest.inc @@ -0,0 +1,50 @@ + + * @copyright 2006-2015 Squiz Pty Ltd (ABN 77 084 670 600) + * @license https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence + */ + +namespace PHP_CodeSniffer\Standards\Squiz\Tests\PHP; + +use PHP_CodeSniffer\Tests\Standards\AbstractSniffUnitTest; + +class InnerFunctionsUnitTest extends AbstractSniffUnitTest +{ + + + /** + * Returns the lines where errors should occur. + * + * The key of the array should represent the line number and the value + * should represent the number of errors that should occur on that line. + * + * @return array + */ + public function getErrorList() + { + return [ + 5 => 1, + 46 => 1, + ]; + + }//end getErrorList() + + + /** + * Returns the lines where warnings should occur. + * + * The key of the array should represent the line number and the value + * should represent the number of warnings that should occur on that line. + * + * @return array + */ + public function getWarningList() + { + return []; + + }//end getWarningList() + + +}//end class diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/PHP/LowercasePHPFunctionsUnitTest.inc b/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/PHP/LowercasePHPFunctionsUnitTest.inc new file mode 100644 index 00000000..c67381ad --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/PHP/LowercasePHPFunctionsUnitTest.inc @@ -0,0 +1,43 @@ +Count(); +$count = $object::Count(); +$count = $object->count(); +$count = $object::count(); +class MyClass { + public function Count() {} +} + +function &Sort() { + +} + +$connection = new Db\Adapter\Pdo\Mysql($config); + +namespace Strtolower\Silly; + +use function strToUpper as somethingElse; +use function MyClass\WordsToUpper as UCWords; // Intentional redeclared function error. +use function strToUpper\NotTheFunction; + +class ArrayUnique {} + +$sillyComments = strToLower /*comment*/ ($string); + +$callToGlobalFunction = \STR_REPEAT($a, 2); +$callToGlobalFunction = \ /*comment*/ str_Repeat($a, 2); + +$callToNamespacedFunction = MyNamespace /* phpcs:ignore Standard */ \STR_REPEAT($a, 2); +$callToNamespacedFunction = namespace\STR_REPEAT($a, 2); // Could potentially be false negative. + +$filePath = new \File($path); + +$count = $object?->Count(); diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/PHP/LowercasePHPFunctionsUnitTest.inc.fixed b/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/PHP/LowercasePHPFunctionsUnitTest.inc.fixed new file mode 100644 index 00000000..40507c04 --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/PHP/LowercasePHPFunctionsUnitTest.inc.fixed @@ -0,0 +1,43 @@ +Count(); +$count = $object::Count(); +$count = $object->count(); +$count = $object::count(); +class MyClass { + public function Count() {} +} + +function &Sort() { + +} + +$connection = new Db\Adapter\Pdo\Mysql($config); + +namespace Strtolower\Silly; + +use function strtoupper as somethingElse; +use function MyClass\WordsToUpper as UCWords; // Intentional redeclared function error. +use function strToUpper\NotTheFunction; + +class ArrayUnique {} + +$sillyComments = strtolower /*comment*/ ($string); + +$callToGlobalFunction = \str_repeat($a, 2); +$callToGlobalFunction = \ /*comment*/ str_repeat($a, 2); + +$callToNamespacedFunction = MyNamespace /* phpcs:ignore Standard */ \STR_REPEAT($a, 2); +$callToNamespacedFunction = namespace\STR_REPEAT($a, 2); // Could potentially be false negative. + +$filePath = new \File($path); + +$count = $object?->Count(); diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/PHP/LowercasePHPFunctionsUnitTest.php b/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/PHP/LowercasePHPFunctionsUnitTest.php new file mode 100644 index 00000000..708d01ef --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/PHP/LowercasePHPFunctionsUnitTest.php @@ -0,0 +1,55 @@ + + * @copyright 2006-2015 Squiz Pty Ltd (ABN 77 084 670 600) + * @license https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence + */ + +namespace PHP_CodeSniffer\Standards\Squiz\Tests\PHP; + +use PHP_CodeSniffer\Tests\Standards\AbstractSniffUnitTest; + +class LowercasePHPFunctionsUnitTest extends AbstractSniffUnitTest +{ + + + /** + * Returns the lines where errors should occur. + * + * The key of the array should represent the line number and the value + * should represent the number of errors that should occur on that line. + * + * @return array + */ + public function getErrorList() + { + return [ + 2 => 1, + 4 => 1, + 27 => 1, + 33 => 1, + 35 => 1, + 36 => 1, + ]; + + }//end getErrorList() + + + /** + * Returns the lines where warnings should occur. + * + * The key of the array should represent the line number and the value + * should represent the number of warnings that should occur on that line. + * + * @return array + */ + public function getWarningList() + { + return []; + + }//end getWarningList() + + +}//end class diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/PHP/NonExecutableCodeUnitTest.1.inc b/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/PHP/NonExecutableCodeUnitTest.1.inc new file mode 100644 index 00000000..ed7f0115 --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/PHP/NonExecutableCodeUnitTest.1.inc @@ -0,0 +1,301 @@ +{$action . 'JsonAction'}(); +} + +switch (true) { + case 1: + return foo( + function () { + $foo = $bar; // when this is removed it works ok + return false; // from here on it reports unreachable + } + ); +} + +for($i=0,$j=50; $i<100; $i++) { + while($j--) { + if($j==17) { + goto end; + echo 'unreachable'; + } + } +} + +switch ($var) { + case '1': + goto end; + echo 'hi'; + + case '2': + case '3': + if ($something === true) { + goto end; + echo 'hi'; + } + break; + default: + goto end; + + if ($something === true) { + goto end; + echo 'hi'; + } +} + +end: +echo 'j hit 17'; + +// Issue 2512. +class TestAlternativeControlStructures { + + public function alternative_switch_in_function( $var ) { + + switch ( $var ) : + case 'value1': + do_something(); + break; + + default: + case 'value2': + do_something_else(); + break; + endswitch; + } + + public function various_alternative_control_structures() { + $_while = 1; + + for ( $a = 0; $a++ < 1; ) : + foreach ( [ 1 ] as $b ) : + while ( $_while-- ) : + if ( 1 ) : + switch ( 1 ) : + default: + echo 'yay, we made it!'; + break; + endswitch; + endif; + endwhile; + endforeach; + endfor; + } +} + +$var_after_class_in_global_space = 1; +do_something_else(); + +// Intentional syntax error. +return array_map( diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/PHP/NonExecutableCodeUnitTest.2.inc b/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/PHP/NonExecutableCodeUnitTest.2.inc new file mode 100644 index 00000000..407c4740 --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/PHP/NonExecutableCodeUnitTest.2.inc @@ -0,0 +1,55 @@ + + * @copyright 2006-2015 Squiz Pty Ltd (ABN 77 084 670 600) + * @license https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence + */ + +namespace PHP_CodeSniffer\Standards\Squiz\Tests\PHP; + +use PHP_CodeSniffer\Tests\Standards\AbstractSniffUnitTest; + +class NonExecutableCodeUnitTest extends AbstractSniffUnitTest +{ + + + /** + * Returns the lines where errors should occur. + * + * The key of the array should represent the line number and the value + * should represent the number of errors that should occur on that line. + * + * @return array + */ + public function getErrorList() + { + return []; + + }//end getErrorList() + + + /** + * Returns the lines where warnings should occur. + * + * The key of the array should represent the line number and the value + * should represent the number of warnings that should occur on that line. + * + * @param string $testFile The name of the file being tested. + * + * @return array + */ + public function getWarningList($testFile='') + { + switch ($testFile) { + case 'NonExecutableCodeUnitTest.1.inc': + return [ + 5 => 1, + 11 => 1, + 17 => 1, + 18 => 1, + 19 => 2, + 28 => 1, + 32 => 1, + 33 => 2, + 34 => 2, + 42 => 1, + 45 => 1, + 54 => 1, + 58 => 1, + 73 => 1, + 83 => 1, + 95 => 1, + 105 => 1, + 123 => 1, + 147 => 1, + 150 => 1, + 153 => 1, + 166 => 1, + 180 => 1, + 232 => 1, + 240 => 1, + 246 => 1, + 252 => 1, + 253 => 1, + 254 => 2, + ]; + break; + case 'NonExecutableCodeUnitTest.2.inc': + return [ + 7 => 1, + 8 => 1, + 9 => 1, + 10 => 2, + 14 => 1, + 48 => 2, + ]; + break; + default: + return []; + break; + }//end switch + + }//end getWarningList() + + +}//end class diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/Scope/MemberVarScopeUnitTest.inc b/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/Scope/MemberVarScopeUnitTest.inc new file mode 100644 index 00000000..6df12cca --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/Scope/MemberVarScopeUnitTest.inc @@ -0,0 +1,72 @@ + + * @copyright 2006-2015 Squiz Pty Ltd (ABN 77 084 670 600) + * @license https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence + */ + +namespace PHP_CodeSniffer\Standards\Squiz\Tests\Scope; + +use PHP_CodeSniffer\Tests\Standards\AbstractSniffUnitTest; + +class MemberVarScopeUnitTest extends AbstractSniffUnitTest +{ + + + /** + * Returns the lines where errors should occur. + * + * The key of the array should represent the line number and the value + * should represent the number of errors that should occur on that line. + * + * @return array + */ + public function getErrorList() + { + return [ + 7 => 1, + 25 => 1, + 29 => 1, + 33 => 1, + 39 => 1, + 41 => 1, + 66 => 2, + 67 => 1, + ]; + + }//end getErrorList() + + + /** + * Returns the lines where warnings should occur. + * + * The key of the array should represent the line number and the value + * should represent the number of warnings that should occur on that line. + * + * @return array + */ + public function getWarningList() + { + return [71 => 1]; + + }//end getWarningList() + + +}//end class diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/Scope/MethodScopeUnitTest.inc b/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/Scope/MethodScopeUnitTest.inc new file mode 100644 index 00000000..cec0355c --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/Scope/MethodScopeUnitTest.inc @@ -0,0 +1,42 @@ + + * @copyright 2006-2015 Squiz Pty Ltd (ABN 77 084 670 600) + * @license https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence + */ + +namespace PHP_CodeSniffer\Standards\Squiz\Tests\Scope; + +use PHP_CodeSniffer\Tests\Standards\AbstractSniffUnitTest; + +class MethodScopeUnitTest extends AbstractSniffUnitTest +{ + + + /** + * Returns the lines where errors should occur. + * + * The key of the array should represent the line number and the value + * should represent the number of errors that should occur on that line. + * + * @return array + */ + public function getErrorList() + { + return [ + 6 => 1, + 30 => 1, + 39 => 1, + ]; + + }//end getErrorList() + + + /** + * Returns the lines where warnings should occur. + * + * The key of the array should represent the line number and the value + * should represent the number of warnings that should occur on that line. + * + * @return array + */ + public function getWarningList() + { + return []; + + }//end getWarningList() + + +}//end class diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/Scope/StaticThisUsageUnitTest.inc b/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/Scope/StaticThisUsageUnitTest.inc new file mode 100644 index 00000000..38b443f2 --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/Scope/StaticThisUsageUnitTest.inc @@ -0,0 +1,117 @@ +func2()); + $result = $this->getValue($value); + return $this->setValue($result); + } + + public static function /* */ func1() + { + return $this->setValue($result); + } + + public static function + func1() + { + return $this->setValue($result); + } + + public function func1() + { + $value = 'hello'; + $newValue = array($this->func2()); + $result = $this->getValue($value); + return $this->setValue($result); + } + + function func1() + { + $value = 'hello'; + $newValue = array($this->func2()); + $result = $this->getValue($value); + return $this->setValue($result); + } + + public static function func1() { + return function() { + echo $this->name; + }; + } + + private static function func1(array $data) + { + return new class() + { + private $data; + + public function __construct(array $data) + { + $this->data = $data; + } + }; + } + + public function getAnonymousClass() { + return new class() { + public static function something() { + $this->doSomething(); + } + }; + } +} + +trait MyTrait { + public static function myFunc() { + $this->doSomething(); + } +} + +$b = new class() +{ + public static function myFunc() { + $this->doSomething(); + } + + public static function other() { + return fn () => $this->name; + } + + public static function anonClassUseThis() { + return new class($this) { + public function __construct($class) { + } + }; + } + + public static function anonClassAnotherThis() { + return new class() { + public function __construct() { + $this->id = 1; + } + }; + } + + public static function anonClassNestedUseThis() { + return new class(new class($this) {}) { + }; + } + + public static function anonClassNestedAnotherThis() { + return new class(new class() { + public function __construct() { + $this->id = 1; + } + }) { + }; + } + + public static function thisMustBeLowercase() { + $This = 'hey'; + + return $This; + } +} diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/Scope/StaticThisUsageUnitTest.php b/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/Scope/StaticThisUsageUnitTest.php new file mode 100644 index 00000000..2935241b --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/Scope/StaticThisUsageUnitTest.php @@ -0,0 +1,61 @@ + + * @copyright 2006-2015 Squiz Pty Ltd (ABN 77 084 670 600) + * @license https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence + */ + +namespace PHP_CodeSniffer\Standards\Squiz\Tests\Scope; + +use PHP_CodeSniffer\Tests\Standards\AbstractSniffUnitTest; + +class StaticThisUsageUnitTest extends AbstractSniffUnitTest +{ + + + /** + * Returns the lines where errors should occur. + * + * The key of the array should represent the line number and the value + * should represent the number of errors that should occur on that line. + * + * @return array + */ + public function getErrorList() + { + return [ + 7 => 1, + 8 => 1, + 9 => 1, + 14 => 1, + 20 => 1, + 41 => 1, + 61 => 1, + 69 => 1, + 76 => 1, + 80 => 1, + 84 => 1, + 99 => 1, + ]; + + }//end getErrorList() + + + /** + * Returns the lines where warnings should occur. + * + * The key of the array should represent the line number and the value + * should represent the number of warnings that should occur on that line. + * + * @return array + */ + public function getWarningList() + { + return []; + + }//end getWarningList() + + +}//end class diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/Strings/ConcatenationSpacingUnitTest.inc b/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/Strings/ConcatenationSpacingUnitTest.inc new file mode 100644 index 00000000..3bf4186e --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/Strings/ConcatenationSpacingUnitTest.inc @@ -0,0 +1,49 @@ +add_help_tab( array( +'id' => <<', +) ); + +// phpcs:set Squiz.Strings.ConcatenationSpacing spacing 1 + +$string = 'Hello'.$there.'. How are'.$you.$going. "today $okay"; +$string = 'Hello' . $there . '. How are' . $you . $going . "today $okay"; +$string = 'Hello'.$there; +$string = 'Hello'. $there; +$string = 'Hello' .$there; + +// phpcs:set Squiz.Strings.ConcatenationSpacing ignoreNewlines true +$y = '1' + . '2' + . '3'; + +$y = '1' . + '2' . + '3'; + +$y = '1' +. '2' +. '3'; + +$y = '1' + .'2'. + '3' + . '4'; diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/Strings/ConcatenationSpacingUnitTest.inc.fixed b/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/Strings/ConcatenationSpacingUnitTest.inc.fixed new file mode 100644 index 00000000..b45f1a43 --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/Strings/ConcatenationSpacingUnitTest.inc.fixed @@ -0,0 +1,47 @@ +add_help_tab( array( +'id' => <<', +) ); + +// phpcs:set Squiz.Strings.ConcatenationSpacing spacing 1 + +$string = 'Hello' . $there . '. How are' . $you . $going . "today $okay"; +$string = 'Hello' . $there . '. How are' . $you . $going . "today $okay"; +$string = 'Hello' . $there; +$string = 'Hello' . $there; +$string = 'Hello' . $there; + +// phpcs:set Squiz.Strings.ConcatenationSpacing ignoreNewlines true +$y = '1' + . '2' + . '3'; + +$y = '1' . + '2' . + '3'; + +$y = '1' +. '2' +. '3'; + +$y = '1' + . '2' . + '3' + . '4'; diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/Strings/ConcatenationSpacingUnitTest.php b/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/Strings/ConcatenationSpacingUnitTest.php new file mode 100644 index 00000000..862af7d2 --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/Strings/ConcatenationSpacingUnitTest.php @@ -0,0 +1,66 @@ + + * @copyright 2006-2015 Squiz Pty Ltd (ABN 77 084 670 600) + * @license https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence + */ + +namespace PHP_CodeSniffer\Standards\Squiz\Tests\Strings; + +use PHP_CodeSniffer\Tests\Standards\AbstractSniffUnitTest; + +class ConcatenationSpacingUnitTest extends AbstractSniffUnitTest +{ + + + /** + * Returns the lines where errors should occur. + * + * The key of the array should represent the line number and the value + * should represent the number of errors that should occur on that line. + * + * @return array + */ + public function getErrorList() + { + return [ + 3 => 5, + 5 => 1, + 6 => 1, + 9 => 1, + 10 => 1, + 12 => 1, + 13 => 1, + 14 => 1, + 15 => 1, + 16 => 5, + 22 => 1, + 27 => 5, + 29 => 1, + 30 => 1, + 31 => 1, + 47 => 2, + 49 => 1, + ]; + + }//end getErrorList() + + + /** + * Returns the lines where warnings should occur. + * + * The key of the array should represent the line number and the value + * should represent the number of warnings that should occur on that line. + * + * @return array + */ + public function getWarningList() + { + return []; + + }//end getWarningList() + + +}//end class diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/Strings/DoubleQuoteUsageUnitTest.inc b/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/Strings/DoubleQuoteUsageUnitTest.inc new file mode 100644 index 00000000..c8cc6383 --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/Strings/DoubleQuoteUsageUnitTest.inc @@ -0,0 +1,37 @@ +"; +$string = "Value: $var[test]"; +$string = "\0"; +$string = "\$var"; + +$x = "bar = '$z', +baz = '" . $a . "'...$x"; + +$string = "Hello +there"; +$string = 'Hello +there'; + +$string = "\123 \234"."\u123"."\e"; + +echo "window.location = \"".$url."\";\n"; +echo "" + +$string = "Hello + there"; + +function test() { + echo "It Worked'; +} diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/Strings/DoubleQuoteUsageUnitTest.inc.fixed b/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/Strings/DoubleQuoteUsageUnitTest.inc.fixed new file mode 100644 index 00000000..97309194 --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/Strings/DoubleQuoteUsageUnitTest.inc.fixed @@ -0,0 +1,37 @@ +"; +$string = "Value: $var[test]"; +$string = "\0"; +$string = '$var'; + +$x = "bar = '$z', +baz = '" . $a . "'...$x"; + +$string = 'Hello +there'; +$string = 'Hello +there'; + +$string = "\123 \234"."\u123"."\e"; + +echo 'window.location = "'.$url."\";\n"; +echo '' + +$string = 'Hello + there'; + +function test() { + echo "It Worked'; +} diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/Strings/DoubleQuoteUsageUnitTest.php b/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/Strings/DoubleQuoteUsageUnitTest.php new file mode 100644 index 00000000..a95d1888 --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/Strings/DoubleQuoteUsageUnitTest.php @@ -0,0 +1,62 @@ + + * @copyright 2006-2015 Squiz Pty Ltd (ABN 77 084 670 600) + * @license https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence + */ + +namespace PHP_CodeSniffer\Standards\Squiz\Tests\Strings; + +use PHP_CodeSniffer\Tests\Standards\AbstractSniffUnitTest; + +class DoubleQuoteUsageUnitTest extends AbstractSniffUnitTest +{ + + + /** + * Returns the lines where errors should occur. + * + * The key of the array should represent the line number and the value + * should represent the number of errors that should occur on that line. + * + * @return array + */ + public function getErrorList() + { + return [ + 4 => 1, + 5 => 1, + 6 => 1, + 8 => 2, + 14 => 1, + 15 => 1, + 17 => 1, + 19 => 1, + 20 => 1, + 22 => 1, + 29 => 1, + 30 => 1, + 32 => 1, + ]; + + }//end getErrorList() + + + /** + * Returns the lines where warnings should occur. + * + * The key of the array should represent the line number and the value + * should represent the number of warnings that should occur on that line. + * + * @return array + */ + public function getWarningList() + { + return []; + + }//end getWarningList() + + +}//end class diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/Strings/EchoedStringsUnitTest.inc b/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/Strings/EchoedStringsUnitTest.inc new file mode 100644 index 00000000..9e0391da --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/Strings/EchoedStringsUnitTest.inc @@ -0,0 +1,13 @@ +returndate == 0) ? 'Not returned' : date('d/m/Y', $loan_device->returndate); +?> +

    +

    diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/Strings/EchoedStringsUnitTest.inc.fixed b/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/Strings/EchoedStringsUnitTest.inc.fixed new file mode 100644 index 00000000..37c7d24c --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/Strings/EchoedStringsUnitTest.inc.fixed @@ -0,0 +1,13 @@ +returndate == 0) ? 'Not returned' : date('d/m/Y', $loan_device->returndate); +?> +

    +

    diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/Strings/EchoedStringsUnitTest.php b/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/Strings/EchoedStringsUnitTest.php new file mode 100644 index 00000000..0d9af1e9 --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/Strings/EchoedStringsUnitTest.php @@ -0,0 +1,55 @@ + + * @copyright 2006-2015 Squiz Pty Ltd (ABN 77 084 670 600) + * @license https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence + */ + +namespace PHP_CodeSniffer\Standards\Squiz\Tests\Strings; + +use PHP_CodeSniffer\Tests\Standards\AbstractSniffUnitTest; + +class EchoedStringsUnitTest extends AbstractSniffUnitTest +{ + + + /** + * Returns the lines where errors should occur. + * + * The key of the array should represent the line number and the value + * should represent the number of errors that should occur on that line. + * + * @return array + */ + public function getErrorList() + { + return [ + 5 => 1, + 6 => 1, + 7 => 1, + 8 => 1, + 9 => 1, + 13 => 1, + ]; + + }//end getErrorList() + + + /** + * Returns the lines where warnings should occur. + * + * The key of the array should represent the line number and the value + * should represent the number of warnings that should occur on that line. + * + * @return array + */ + public function getWarningList() + { + return []; + + }//end getWarningList() + + +}//end class diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/WhiteSpace/CastSpacingUnitTest.inc b/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/WhiteSpace/CastSpacingUnitTest.inc new file mode 100644 index 00000000..fa65112f --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/WhiteSpace/CastSpacingUnitTest.inc @@ -0,0 +1,9 @@ + + * @copyright 2006-2015 Squiz Pty Ltd (ABN 77 084 670 600) + * @license https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence + */ + +namespace PHP_CodeSniffer\Standards\Squiz\Tests\WhiteSpace; + +use PHP_CodeSniffer\Tests\Standards\AbstractSniffUnitTest; + +class CastSpacingUnitTest extends AbstractSniffUnitTest +{ + + + /** + * Returns the lines where errors should occur. + * + * The key of the array should represent the line number and the value + * should represent the number of errors that should occur on that line. + * + * @return array + */ + public function getErrorList() + { + return [ + 3 => 1, + 4 => 1, + 5 => 1, + 6 => 1, + 9 => 1, + ]; + + }//end getErrorList() + + + /** + * Returns the lines where warnings should occur. + * + * The key of the array should represent the line number and the value + * should represent the number of warnings that should occur on that line. + * + * @return array + */ + public function getWarningList() + { + return []; + + }//end getWarningList() + + +}//end class diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/WhiteSpace/ControlStructureSpacingUnitTest.inc b/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/WhiteSpace/ControlStructureSpacingUnitTest.inc new file mode 100644 index 00000000..0371ce49 --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/WhiteSpace/ControlStructureSpacingUnitTest.inc @@ -0,0 +1,263 @@ + +
    + + + +
    + children as $child) { + // There should be no error after this + // foreach, because it is followed by a + // close PHP tag. + } + ?> +
    +children as $child) { + echo $child; + +} + +if ($defaultPageDesign === 0 + && $defaultCascade === TRUE + && $defaultChildDesign === 0 +) { + $settingsUpdated = FALSE; +} + +foreach ( $blah as $var ) { + if ( $blah ) { + } +} + +if ( + $defaultPageDesign === 0 + && $defaultCascade === TRUE + && $defaultChildDesign === 0 +) { + $settingsUpdated = FALSE; +} + +$moo = 'blar'; +switch ($moo) +{ + case 'blar': + if ($moo === 'blar2') { + $moo = 'blar' + } + return $moo; + + default: + $moo = 'moo'; + break; +} + +do { +} +while (true); + +try { + // Something +} catch (Exception $e) { + // Something +} + +try { + + // Something + +} catch (Exception $e) { + + // Something + +} + +if ($one) { +} +elseif ($two) { +} +// else if something +else if ($three) { +} // else do something +else { +} + +if ($one) { + +} + +do { + echo 'hi'; +} while ( $blah ); + +if ($one) { +} +// No blank line here. +if ($two) { +} + +switch ($moo) +{ + case 'blar': + if ($moo === 'blar2') { + $moo = 'blar' + } + + return $moo; +} + +try { + // Something +} +catch (Exception $e) { + // Something +} +finally { + // Something +} + +if ($foo) { + + + /** + * Comment + */ + function foo() { + // Code here + } + + + /** + * Comment + */ + class bar() { + + }//end class + + +} + +if (true) { // some comment goes here + + echo 'foo'; +} + +if (true) { echo 'foo'; + + echo 'foo'; +} + +if ($true) { + echo 'hi 2'; +}//end if +echo 'hi'; + +if ($true) { + echo 'hi 2'; +} // phpcs:enable Standard.Category.Sniff -- for reasons. +echo 'hi'; + +?> + + + + + + + 1, + 2 => 2, + +}; +echo $expr; diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/WhiteSpace/ControlStructureSpacingUnitTest.inc.fixed b/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/WhiteSpace/ControlStructureSpacingUnitTest.inc.fixed new file mode 100644 index 00000000..ad4505c3 --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/WhiteSpace/ControlStructureSpacingUnitTest.inc.fixed @@ -0,0 +1,255 @@ + + + + + +
    + children as $child) { + // There should be no error after this + // foreach, because it is followed by a + // close PHP tag. + } + ?> +
    +children as $child) { + echo $child; +} + +if ($defaultPageDesign === 0 + && $defaultCascade === TRUE + && $defaultChildDesign === 0 +) { + $settingsUpdated = FALSE; +} + +foreach ($blah as $var) { + if ($blah) { + } +} + +if ($defaultPageDesign === 0 + && $defaultCascade === TRUE + && $defaultChildDesign === 0 +) { + $settingsUpdated = FALSE; +} + +$moo = 'blar'; +switch ($moo) +{ + case 'blar': + if ($moo === 'blar2') { + $moo = 'blar' + } + return $moo; + + default: + $moo = 'moo'; + break; +} + +do { +} +while (true); + +try { + // Something +} catch (Exception $e) { + // Something +} + +try { + // Something +} catch (Exception $e) { + // Something +} + +if ($one) { +} +elseif ($two) { +} +// else if something +else if ($three) { +} // else do something +else { +} + +if ($one) { +} + +do { + echo 'hi'; +} while ($blah); + +if ($one) { +} + +// No blank line here. +if ($two) { +} + +switch ($moo) +{ + case 'blar': + if ($moo === 'blar2') { + $moo = 'blar' + } + return $moo; +} + +try { + // Something +} +catch (Exception $e) { + // Something +} +finally { + // Something +} + +if ($foo) { + + + /** + * Comment + */ + function foo() { + // Code here + } + + + /** + * Comment + */ + class bar() { + + }//end class + + +} + +if (true) { // some comment goes here + echo 'foo'; +} + +if (true) { echo 'foo'; + + echo 'foo'; +} + +if ($true) { + echo 'hi 2'; +}//end if + +echo 'hi'; + +if ($true) { + echo 'hi 2'; +} // phpcs:enable Standard.Category.Sniff -- for reasons. + +echo 'hi'; + +?> + + + + + + 1, + 2 => 2, +}; + +echo $expr; diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/WhiteSpace/ControlStructureSpacingUnitTest.js b/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/WhiteSpace/ControlStructureSpacingUnitTest.js new file mode 100644 index 00000000..1c889a1c --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/WhiteSpace/ControlStructureSpacingUnitTest.js @@ -0,0 +1,93 @@ + +if (something) { +} +for (i = 0; i < 10; i++) { +} + +while (true) { + for (i = 0; i < 10; i++) { + } + if (something) { + } + + do { + } while (true); + +} + +if (one) { +} else (two) { +} else if (three) { +} +if (one) { +} else (two) { +} else if (three) { +} + +switch (blah) { + case 'one': + if (blah) { + // There are no spaces before break. + } + break; + + default: + if (blah) { + // There are no spaces before break. + } + break; +} + +switch (blah) { + case 'one': + if (blah) { + // There are no spaces before break. + } + break; + + default: + if (blah) { + // Code here. + } +} + +for (i = 0; i < 10; i++) { + if (blah) { + } + break; +} + +while (true) { + for (i = 0; i < 10; i++) { + + if (something) { + } + + } + + do { + + alert(i); + } while (true); +} + +for ( i = 0; i < 10; i++ ) { + if ( blah ) { + } +} + +var x = { + a: function () { + if (blah) { + } + + }, +}; + +if (one) { +} +// else if something +else if (two) { +} // else do something +else { +} diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/WhiteSpace/ControlStructureSpacingUnitTest.js.fixed b/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/WhiteSpace/ControlStructureSpacingUnitTest.js.fixed new file mode 100644 index 00000000..bb979bc8 --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/WhiteSpace/ControlStructureSpacingUnitTest.js.fixed @@ -0,0 +1,93 @@ + +if (something) { +} + +for (i = 0; i < 10; i++) { +} + +while (true) { + for (i = 0; i < 10; i++) { + } + + if (something) { + } + + do { + } while (true); +} + +if (one) { +} else (two) { +} else if (three) { +} + +if (one) { +} else (two) { +} else if (three) { +} + +switch (blah) { + case 'one': + if (blah) { + // There are no spaces before break. + } + break; + + default: + if (blah) { + // There are no spaces before break. + } + break; +} + +switch (blah) { + case 'one': + if (blah) { + // There are no spaces before break. + } + break; + + default: + if (blah) { + // Code here. + } +} + +for (i = 0; i < 10; i++) { + if (blah) { + } + + break; +} + +while (true) { + for (i = 0; i < 10; i++) { + if (something) { + } + } + + do { + alert(i); + } while (true); +} + +for (i = 0; i < 10; i++) { + if (blah) { + } +} + +var x = { + a: function () { + if (blah) { + } + + }, +}; + +if (one) { +} +// else if something +else if (two) { +} // else do something +else { +} diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/WhiteSpace/ControlStructureSpacingUnitTest.php b/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/WhiteSpace/ControlStructureSpacingUnitTest.php new file mode 100644 index 00000000..ac3f5d6f --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/WhiteSpace/ControlStructureSpacingUnitTest.php @@ -0,0 +1,103 @@ + + * @copyright 2006-2015 Squiz Pty Ltd (ABN 77 084 670 600) + * @license https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence + */ + +namespace PHP_CodeSniffer\Standards\Squiz\Tests\WhiteSpace; + +use PHP_CodeSniffer\Tests\Standards\AbstractSniffUnitTest; + +class ControlStructureSpacingUnitTest extends AbstractSniffUnitTest +{ + + + /** + * Returns the lines where errors should occur. + * + * The key of the array should represent the line number and the value + * should represent the number of errors that should occur on that line. + * + * @param string $testFile The name of the file being tested. + * + * @return array + */ + public function getErrorList($testFile='ControlStructureSpacingUnitTest.inc') + { + switch ($testFile) { + case 'ControlStructureSpacingUnitTest.inc': + return [ + 3 => 1, + 5 => 1, + 8 => 1, + 15 => 1, + 23 => 1, + 74 => 1, + 79 => 1, + 82 => 1, + 83 => 1, + 87 => 1, + 103 => 1, + 113 => 2, + 114 => 2, + 118 => 1, + 150 => 1, + 153 => 1, + 154 => 1, + 157 => 1, + 170 => 1, + 176 => 2, + 179 => 1, + 189 => 1, + 225 => 1, + 237 => 1, + 242 => 1, + 246 => 1, + 248 => 1, + 257 => 3, + 261 => 1, + 262 => 1, + ]; + break; + case 'ControlStructureSpacingUnitTest.js': + return [ + 3 => 1, + 9 => 1, + 15 => 1, + 21 => 1, + 56 => 1, + 61 => 1, + 64 => 1, + 65 => 1, + 68 => 1, + 74 => 2, + 75 => 2, + ]; + break; + default: + return []; + break; + }//end switch + + }//end getErrorList() + + + /** + * Returns the lines where warnings should occur. + * + * The key of the array should represent the line number and the value + * should represent the number of warnings that should occur on that line. + * + * @return array + */ + public function getWarningList() + { + return []; + + }//end getWarningList() + + +}//end class diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/WhiteSpace/FunctionClosingBraceSpaceUnitTest.inc b/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/WhiteSpace/FunctionClosingBraceSpaceUnitTest.inc new file mode 100644 index 00000000..e831e257 --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/WhiteSpace/FunctionClosingBraceSpaceUnitTest.inc @@ -0,0 +1,39 @@ + + * @copyright 2006-2015 Squiz Pty Ltd (ABN 77 084 670 600) + * @license https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence + */ + +namespace PHP_CodeSniffer\Standards\Squiz\Tests\WhiteSpace; + +use PHP_CodeSniffer\Tests\Standards\AbstractSniffUnitTest; + +class FunctionClosingBraceSpaceUnitTest extends AbstractSniffUnitTest +{ + + + /** + * Returns the lines where errors should occur. + * + * The key of the array should represent the line number and the value + * should represent the number of errors that should occur on that line. + * + * @param string $testFile The name of the file being tested. + * + * @return array + */ + public function getErrorList($testFile='FunctionClosingBraceSpaceUnitTest.inc') + { + switch ($testFile) { + case 'FunctionClosingBraceSpaceUnitTest.inc': + return [ + 10 => 1, + 21 => 1, + 28 => 1, + 29 => 1, + 31 => 1, + 39 => 1, + ]; + break; + case 'FunctionClosingBraceSpaceUnitTest.js': + return [ + 13 => 1, + 25 => 1, + 32 => 1, + 53 => 1, + 59 => 1, + 67 => 1, + 84 => 1, + 128 => 1, + ]; + break; + default: + return []; + break; + }//end switch + + }//end getErrorList() + + + /** + * Returns the lines where warnings should occur. + * + * The key of the array should represent the line number and the value + * should represent the number of warnings that should occur on that line. + * + * @return array + */ + public function getWarningList() + { + return []; + + }//end getWarningList() + + +}//end class diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/WhiteSpace/FunctionOpeningBraceSpaceUnitTest.inc b/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/WhiteSpace/FunctionOpeningBraceSpaceUnitTest.inc new file mode 100644 index 00000000..fe2c903b --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/WhiteSpace/FunctionOpeningBraceSpaceUnitTest.inc @@ -0,0 +1,54 @@ + + * @copyright 2006-2015 Squiz Pty Ltd (ABN 77 084 670 600) + * @license https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence + */ + +namespace PHP_CodeSniffer\Standards\Squiz\Tests\WhiteSpace; + +use PHP_CodeSniffer\Tests\Standards\AbstractSniffUnitTest; + +class FunctionOpeningBraceSpaceUnitTest extends AbstractSniffUnitTest +{ + + + /** + * Returns the lines where errors should occur. + * + * The key of the array should represent the line number and the value + * should represent the number of errors that should occur on that line. + * + * @param string $testFile The name of the file being tested. + * + * @return array + */ + public function getErrorList($testFile='FunctionOpeningBraceSpaceUnitTest.inc') + { + switch ($testFile) { + case 'FunctionOpeningBraceSpaceUnitTest.inc': + return [ + 10 => 1, + 25 => 1, + 49 => 1, + ]; + + case 'FunctionOpeningBraceSpaceUnitTest.js': + return [ + 11 => 1, + 31 => 1, + 38 => 1, + 88 => 1, + ]; + + default: + return []; + }//end switch + + }//end getErrorList() + + + /** + * Returns the lines where warnings should occur. + * + * The key of the array should represent the line number and the value + * should represent the number of warnings that should occur on that line. + * + * @return array + */ + public function getWarningList() + { + return []; + + }//end getWarningList() + + +}//end class diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/WhiteSpace/FunctionSpacingUnitTest.1.inc b/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/WhiteSpace/FunctionSpacingUnitTest.1.inc new file mode 100644 index 00000000..36a287f0 --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/WhiteSpace/FunctionSpacingUnitTest.1.inc @@ -0,0 +1,576 @@ +setLogger(new class { + public function a(){} + private function b(){} + protected function c(){} +}); + +?> + +setLogger(new class { + + public function a(){} + + private function b(){} + + protected function c(){} + +}); + +?> + + + * @copyright 2006-2015 Squiz Pty Ltd (ABN 77 084 670 600) + * @license https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence + */ + +namespace PHP_CodeSniffer\Standards\Squiz\Tests\WhiteSpace; + +use PHP_CodeSniffer\Tests\Standards\AbstractSniffUnitTest; + +class FunctionSpacingUnitTest extends AbstractSniffUnitTest +{ + + + /** + * Returns the lines where errors should occur. + * + * The key of the array should represent the line number and the value + * should represent the number of errors that should occur on that line. + * + * @param string $testFile The name of the file being tested. + * + * @return array + */ + public function getErrorList($testFile='') + { + switch ($testFile) { + case 'FunctionSpacingUnitTest.1.inc': + return [ + 26 => 1, + 35 => 1, + 44 => 1, + 51 => 1, + 55 => 1, + 61 => 1, + 64 => 1, + 66 => 1, + 81 => 1, + 100 => 1, + 111 => 1, + 113 => 1, + 119 => 2, + 141 => 1, + 160 => 1, + 173 => 2, + 190 => 1, + 224 => 2, + 281 => 1, + 282 => 1, + 295 => 1, + 297 => 1, + 303 => 1, + 327 => 1, + 329 => 1, + 338 => 1, + 344 => 1, + 345 => 1, + 354 => 2, + 355 => 1, + 356 => 1, + 360 => 2, + 361 => 1, + 362 => 1, + 385 => 1, + 399 => 1, + 411 => 2, + 418 => 2, + 426 => 2, + 432 => 1, + 437 => 1, + 438 => 1, + 442 => 2, + 444 => 1, + 449 => 1, + 458 => 2, + 459 => 1, + 460 => 1, + 465 => 2, + 466 => 1, + 467 => 1, + 471 => 1, + 473 => 2, + 475 => 1, + 478 => 2, + 479 => 1, + 483 => 2, + 495 => 1, + 529 => 1, + 539 => 1, + 547 => 2, + 551 => 1, + 553 => 1, + 560 => 1, + 566 => 1, + ]; + + case 'FunctionSpacingUnitTest.2.inc': + return [2 => 1]; + + case 'FunctionSpacingUnitTest.3.inc': + return [7 => 1]; + + case 'FunctionSpacingUnitTest.5.inc': + return [5 => 1]; + + case 'FunctionSpacingUnitTest.6.inc': + return [10 => 1]; + + default: + return []; + }//end switch + + }//end getErrorList() + + + /** + * Returns the lines where warnings should occur. + * + * The key of the array should represent the line number and the value + * should represent the number of warnings that should occur on that line. + * + * @return array + */ + public function getWarningList() + { + return []; + + }//end getWarningList() + + +}//end class diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/WhiteSpace/LanguageConstructSpacingUnitTest.inc b/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/WhiteSpace/LanguageConstructSpacingUnitTest.inc new file mode 100644 index 00000000..e8f2edad --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/WhiteSpace/LanguageConstructSpacingUnitTest.inc @@ -0,0 +1,43 @@ + + * @copyright 2006-2015 Squiz Pty Ltd (ABN 77 084 670 600) + * @license https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence + */ + +namespace PHP_CodeSniffer\Standards\Squiz\Tests\WhiteSpace; + +use PHP_CodeSniffer\Tests\Standards\AbstractSniffUnitTest; + +class LanguageConstructSpacingUnitTest extends AbstractSniffUnitTest +{ + + + /** + * Returns the lines where errors should occur. + * + * The key of the array should represent the line number and the value + * should represent the number of errors that should occur on that line. + * + * @return array + */ + public function getErrorList() + { + return [ + 3 => 1, + 7 => 1, + 11 => 1, + 15 => 1, + 19 => 1, + 23 => 1, + 27 => 1, + 31 => 1, + 34 => 1, + 35 => 1, + 39 => 1, + ]; + + }//end getErrorList() + + + /** + * Returns the lines where warnings should occur. + * + * The key of the array should represent the line number and the value + * should represent the number of warnings that should occur on that line. + * + * @return array + */ + public function getWarningList() + { + return []; + + }//end getWarningList() + + +}//end class diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/WhiteSpace/LogicalOperatorSpacingUnitTest.inc b/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/WhiteSpace/LogicalOperatorSpacingUnitTest.inc new file mode 100644 index 00000000..c2f4ec7d --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/WhiteSpace/LogicalOperatorSpacingUnitTest.inc @@ -0,0 +1,19 @@ + + * @copyright 2006-2015 Squiz Pty Ltd (ABN 77 084 670 600) + * @license https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence + */ + +namespace PHP_CodeSniffer\Standards\Squiz\Tests\WhiteSpace; + +use PHP_CodeSniffer\Tests\Standards\AbstractSniffUnitTest; + +class LogicalOperatorSpacingUnitTest extends AbstractSniffUnitTest +{ + + + /** + * Returns the lines where errors should occur. + * + * The key of the array should represent the line number and the value + * should represent the number of errors that should occur on that line. + * + * @param string $testFile The name of the file being tested. + * + * @return array + */ + public function getErrorList($testFile='LogicalOperatorSpacingUnitTest.inc') + { + return [ + 4 => 2, + 5 => 3, + 6 => 3, + 15 => 1, + 17 => 1, + ]; + + }//end getErrorList() + + + /** + * Returns the lines where warnings should occur. + * + * The key of the array should represent the line number and the value + * should represent the number of warnings that should occur on that line. + * + * @return array + */ + public function getWarningList() + { + return []; + + }//end getWarningList() + + +}//end class diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/WhiteSpace/MemberVarSpacingUnitTest.inc b/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/WhiteSpace/MemberVarSpacingUnitTest.inc new file mode 100644 index 00000000..038072df --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/WhiteSpace/MemberVarSpacingUnitTest.inc @@ -0,0 +1,367 @@ + 'a', 'b' => 'b' ), + $varQ = 'string', + $varR = 123; +} + +// Make sure the determination of whether a property is the first property or not is done correctly. +class ClassUsingSimpleTraits +{ + use HelloWorld; + + + /* comment */ + public $firstVar = array( 'a', 'b' ); + protected $secondVar = true; +} + +class ClassUsingComplexTraits +{ + use A, B { + B::smallTalk insteadof A; + A::bigTalk insteadof B; + } + + + + public $firstVar = array( 'a', 'b' ); + + + /* comment */ + protected $secondVar = true; +} + +class Foo +{ + + + private function foo() + { + } + + + /* no error here because after function */ + private $bar = false; +} + +class CommentedOutCodeAtStartOfClass { + + /** + * Description. + * + * @var bool + */ + //public $commented_out_property = true; + + /** + * Description. + * + * @var bool + */ + public $property = true; +} + +class CommentedOutCodeAtStartOfClassNoBlankLine { + + // phpcs:disable Stnd.Cat.Sniff -- For reasons. + /** + * Description. + * + * @var bool + */ + public $property = true; +} + +class HasAttributes +{ + /** + * Short description of the member variable. + * + * @var array + */ + + #[ORM\Id]#[ORM\Column("integer")] + + private $id; + + + /** + * Short description of the member variable. + * + * @var array + */ + #[ORM\GeneratedValue] + + #[ORM\Column(ORM\Column::T_INTEGER)] + protected $height; + + #[SingleAttribute] + protected $propertySingle; + + #[FirstAttribute] + #[SecondAttribute] + protected $propertyDouble; + #[ThirdAttribute] + protected $propertyWithoutSpacing; +} diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/WhiteSpace/MemberVarSpacingUnitTest.inc.fixed b/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/WhiteSpace/MemberVarSpacingUnitTest.inc.fixed new file mode 100644 index 00000000..3cb2ca3a --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/WhiteSpace/MemberVarSpacingUnitTest.inc.fixed @@ -0,0 +1,352 @@ + 'a', 'b' => 'b' ), + $varQ = 'string', + $varR = 123; +} + +// Make sure the determination of whether a property is the first property or not is done correctly. +class ClassUsingSimpleTraits +{ + use HelloWorld; + + /* comment */ + public $firstVar = array( 'a', 'b' ); + + protected $secondVar = true; +} + +class ClassUsingComplexTraits +{ + use A, B { + B::smallTalk insteadof A; + A::bigTalk insteadof B; + } + + public $firstVar = array( 'a', 'b' ); + + /* comment */ + protected $secondVar = true; +} + +class Foo +{ + + + private function foo() + { + } + + + /* no error here because after function */ + private $bar = false; +} + +class CommentedOutCodeAtStartOfClass { + + /** + * Description. + * + * @var bool + */ + //public $commented_out_property = true; + + /** + * Description. + * + * @var bool + */ + public $property = true; +} + +class CommentedOutCodeAtStartOfClassNoBlankLine { + + // phpcs:disable Stnd.Cat.Sniff -- For reasons. + + /** + * Description. + * + * @var bool + */ + public $property = true; +} + +class HasAttributes +{ + + /** + * Short description of the member variable. + * + * @var array + */ + #[ORM\Id]#[ORM\Column("integer")] + private $id; + + /** + * Short description of the member variable. + * + * @var array + */ + #[ORM\GeneratedValue] + #[ORM\Column(ORM\Column::T_INTEGER)] + protected $height; + + #[SingleAttribute] + protected $propertySingle; + + #[FirstAttribute] + #[SecondAttribute] + protected $propertyDouble; + + #[ThirdAttribute] + protected $propertyWithoutSpacing; +} diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/WhiteSpace/MemberVarSpacingUnitTest.php b/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/WhiteSpace/MemberVarSpacingUnitTest.php new file mode 100644 index 00000000..9b406681 --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/WhiteSpace/MemberVarSpacingUnitTest.php @@ -0,0 +1,85 @@ + + * @copyright 2006-2015 Squiz Pty Ltd (ABN 77 084 670 600) + * @license https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence + */ + +namespace PHP_CodeSniffer\Standards\Squiz\Tests\WhiteSpace; + +use PHP_CodeSniffer\Tests\Standards\AbstractSniffUnitTest; + +class MemberVarSpacingUnitTest extends AbstractSniffUnitTest +{ + + + /** + * Returns the lines where errors should occur. + * + * The key of the array should represent the line number and the value + * should represent the number of errors that should occur on that line. + * + * @return array + */ + public function getErrorList() + { + return [ + 4 => 1, + 7 => 1, + 20 => 1, + 30 => 1, + 35 => 1, + 44 => 1, + 50 => 1, + 73 => 1, + 86 => 1, + 106 => 1, + 115 => 1, + 150 => 1, + 160 => 1, + 165 => 1, + 177 => 1, + 186 => 1, + 200 => 1, + 209 => 1, + 211 => 1, + 224 => 1, + 229 => 1, + 241 => 1, + 246 => 1, + 252 => 1, + 254 => 1, + 261 => 1, + 275 => 1, + 276 => 1, + 288 => 1, + 292 => 1, + 333 => 1, + 342 => 1, + 346 => 1, + 353 => 1, + 357 => 1, + 366 => 1, + ]; + + }//end getErrorList() + + + /** + * Returns the lines where warnings should occur. + * + * The key of the array should represent the line number and the value + * should represent the number of warnings that should occur on that line. + * + * @return array + */ + public function getWarningList() + { + return []; + + }//end getWarningList() + + +}//end class diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/WhiteSpace/ObjectOperatorSpacingUnitTest.inc b/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/WhiteSpace/ObjectOperatorSpacingUnitTest.inc new file mode 100644 index 00000000..67f8ee14 --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/WhiteSpace/ObjectOperatorSpacingUnitTest.inc @@ -0,0 +1,52 @@ +testThis(); +$this-> testThis(); +$this -> testThis(); +$this-> /* comment here */testThis(); +$this/* comment here */ -> testThis(); +$this + ->testThis(); +$this-> + testThis(); + +// phpcs:set Squiz.WhiteSpace.ObjectOperatorSpacing ignoreNewlines true + +$this->testThis(); +$this-> testThis(); +$this -> testThis(); +$this->/* comment here */testThis(); +$this/* comment here */ -> testThis(); +$this + ->testThis(); +$this-> + testThis(); + +// phpcs:set Squiz.WhiteSpace.ObjectOperatorSpacing ignoreNewlines false + +thisObject::testThis(); +thisObject:: testThis(); +thisObject :: testThis(); +thisObject::/* comment here */testThis(); +thisObject/* comment here */ :: testThis(); +thisObject + ::testThis(); +thisObject:: + testThis(); + +// phpcs:set Squiz.WhiteSpace.ObjectOperatorSpacing ignoreNewlines true + +thisObject::testThis(); +thisObject:: testThis(); +thisObject :: testThis(); +thisObject::/* comment here */testThis(); +thisObject/* comment here */ :: testThis(); +thisObject + ::testThis(); +thisObject:: + testThis(); + +// phpcs:set Squiz.WhiteSpace.ObjectOperatorSpacing ignoreNewlines false + +$this?->testThis(); +$this?-> testThis(); +$this ?-> testThis(); diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/WhiteSpace/ObjectOperatorSpacingUnitTest.inc.fixed b/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/WhiteSpace/ObjectOperatorSpacingUnitTest.inc.fixed new file mode 100644 index 00000000..730b8e4a --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/WhiteSpace/ObjectOperatorSpacingUnitTest.inc.fixed @@ -0,0 +1,48 @@ +testThis(); +$this->testThis(); +$this->testThis(); +$this->/* comment here */testThis(); +$this/* comment here */->testThis(); +$this->testThis(); +$this->testThis(); + +// phpcs:set Squiz.WhiteSpace.ObjectOperatorSpacing ignoreNewlines true + +$this->testThis(); +$this->testThis(); +$this->testThis(); +$this->/* comment here */testThis(); +$this/* comment here */->testThis(); +$this + ->testThis(); +$this-> + testThis(); + +// phpcs:set Squiz.WhiteSpace.ObjectOperatorSpacing ignoreNewlines false + +thisObject::testThis(); +thisObject::testThis(); +thisObject::testThis(); +thisObject::/* comment here */testThis(); +thisObject/* comment here */::testThis(); +thisObject::testThis(); +thisObject::testThis(); + +// phpcs:set Squiz.WhiteSpace.ObjectOperatorSpacing ignoreNewlines true + +thisObject::testThis(); +thisObject::testThis(); +thisObject::testThis(); +thisObject::/* comment here */testThis(); +thisObject/* comment here */::testThis(); +thisObject + ::testThis(); +thisObject:: + testThis(); + +// phpcs:set Squiz.WhiteSpace.ObjectOperatorSpacing ignoreNewlines false + +$this?->testThis(); +$this?->testThis(); +$this?->testThis(); diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/WhiteSpace/ObjectOperatorSpacingUnitTest.php b/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/WhiteSpace/ObjectOperatorSpacingUnitTest.php new file mode 100644 index 00000000..82a4056f --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/WhiteSpace/ObjectOperatorSpacingUnitTest.php @@ -0,0 +1,68 @@ + + * @copyright 2006-2015 Squiz Pty Ltd (ABN 77 084 670 600) + * @license https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence + */ + +namespace PHP_CodeSniffer\Standards\Squiz\Tests\WhiteSpace; + +use PHP_CodeSniffer\Tests\Standards\AbstractSniffUnitTest; + +class ObjectOperatorSpacingUnitTest extends AbstractSniffUnitTest +{ + + + /** + * Returns the lines where errors should occur. + * + * The key of the array should represent the line number and the value + * should represent the number of errors that should occur on that line. + * + * @return array + */ + public function getErrorList() + { + return [ + 3 => 1, + 4 => 2, + 5 => 1, + 6 => 2, + 8 => 1, + 9 => 1, + 15 => 1, + 16 => 2, + 18 => 2, + 27 => 1, + 28 => 2, + 30 => 2, + 32 => 1, + 33 => 1, + 39 => 1, + 40 => 2, + 42 => 2, + 51 => 1, + 52 => 2, + ]; + + }//end getErrorList() + + + /** + * Returns the lines where warnings should occur. + * + * The key of the array should represent the line number and the value + * should represent the number of warnings that should occur on that line. + * + * @return array + */ + public function getWarningList() + { + return []; + + }//end getWarningList() + + +}//end class diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/WhiteSpace/OperatorSpacingUnitTest.inc b/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/WhiteSpace/OperatorSpacingUnitTest.inc new file mode 100644 index 00000000..f89cf08d --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/WhiteSpace/OperatorSpacingUnitTest.inc @@ -0,0 +1,481 @@ + $j && $k< $l && $m>= $n && $o<= $p && $q<> $r; + +$a ==$b && $c !=$d && $e ===$f && $g !==$h; +$i >$j && $k <$l && $m >=$n && $o <=$p && $q <>$r; + +function myFunction($variable=0, $var2='string') {} + +if (index > -1) { +} + +array_walk_recursive($array, function(&$item) use (&$something) { +}); + +$var = saveFile(&$model, &$foo); + +// This is all valid. +$boo = -$foo; +function foo($boo = -1) {} +$foo = array('boo' => -1); +$x = $test ? -1 : 1; +$y = $test ? 1 : -1; +$z = $test ?: false; + +$closureWithDefaultParameter = function (array $testArray=array()) {}; + +switch ($foo) { + case -1: + break; +} + +$y = 1 * -1; +$y = -1 * 1; +$y = -1 * $var; +$y = 10 / -2; +$y = -10 / 2; +$y = (-10 / 2); +$y = (-10 / $var); +$y = 10 + -2; +$y = -10 + 2; + +$a = $x?$y:$z; +$a = $x ? $y : $z; + +$y = 1 + + 2 + - 3; + +$y = 1 + + 2 - + 3; + +$y = 1 ++ 2 +- 3; + +// phpcs:set Squiz.WhiteSpace.OperatorSpacing ignoreNewlines true +$y = 1 + + 2 + - 3; + +$y = 1 + + 2 - + 3; + +$y = 1 ++ 2 +- 3; +// phpcs:set Squiz.WhiteSpace.OperatorSpacing ignoreNewlines false + +if (true || -1 == $b) { +} + +$var = array(-1); +$var = [-1]; +$var = [0, -1, -2]; + +$y = array(&$x); +$y = [&$x]; +$y = array(&$a, &$b, &$c); +$y = [&$a, &$b, &$c]; +$y = array(&$a => 1, 2 => &$b, &$c); +$y = [&$a => 1, 2 => &$b, &$c]; + +if ($a <=> $b) { +} + +if ($a <=>$b) { +} + +$a |= $b; +$a **= $b; +$a ??= $b; + +$a = +1; + +function bar($boo = +1) {} + +$username = $_GET['user']??'nobody'; + +function foo(string $bar, array $baz, ?MyClass $object) : MyClass {} + +declare(strict_types=1); + +function foo($c = ((BAR)?10:100)) {} + +$res = $a ?: $b; +$res = $a ?: $b; +$res = $a ?: $b; +$res = $a ?: $b; + +$res = $a ? : $b; +$res = $a ? : $b; +$res = $a ? : $b; +$res = $a ? : $b; + +function foo(string $a = '', ?string $b = ''): ?string {} + +// Issue #1605. +$text = preg_replace_callback( + self::CHAR_REFS_REGEX, + [ 'Sanitizer', 'decodeCharReferencesCallback' ], + $text, /* limit */ -1, $count ); + +if (true || /* test */ -1 == $b) {} +$y = 10 + /* test */ -2; + +// Issue #1604. +Hooks::run( 'ParserOptionsRegister', [ + &self::$defaults, + &self::$inCacheKey, + &self::$lazyOptions, +] ); + +$x = $foo ? function (): int { + return 1; +} : $bar; + +$x = $foo ? function ($foo) + // comment + : int { + return 1; +} : $bar; + +$x = $foo ? function ($foo) use /* comment */ ($bar): int { + return 1; +} : $bar; + +$x = !$foo ? $bar : function (): int { + return 1; +}; + +$a = + // Comment. + [ + 'a', + 'b', + ]; + +$a = +// phpcs:ignore Standard.Category.Sniff -- for reasons. +[ + 'a', + 'b', +]; + +$foo = is_array($bar) ? array_map( + function () {}, + $bar + ) : $bar; + +function bar(): array {} + +if ($line{-1} === ':') { + $line = substr($line, 0, -1); +} + +$a = $a instanceof $b; +$a = $a instanceof $b; +$a = ($a)instanceof$b; + +fn&($x) => $x; + +// phpcs:set Squiz.WhiteSpace.OperatorSpacing ignoreSpacingBeforeAssignments false +$a = 3; + +yield -1; +echo -1; +$a = -1; +func(-1); +$a = [-1]; +return -1; +print -1; +$a &= -1; +switch ($a) { + case -1: +} +$a = $a ?? -1; +$a .= -1; +$a /= -1; +$a = [1 => -1]; +$a = $a == -1; +$a = $a >= -1; +$a = $a === -1; +$a = $a != -1; +$a = $a !== -1; +$a = $a <= -1; +$a = $a <=> -1; +$a = $a and -1; +$a = $a or -1; +$a = $a xor -1; +$a -= -1; +$a %= -1; +$a *= -1; +$a |= -1; +$a += -1; +$a = $a ** -1; +$a **= -1; +$a = $a << -1; +$a <<= -1; +$a = $a >> -1; +$a >>= -1; +$a = (string) -1; +$a = (array) -1; +$a = (bool) -1; +$a = (object) -1; +$a = (unset) -1; +$a = (float) -1; +$a = (int) -1; +$a ^= -1; +$a = [$a, -1]; +$a = $a[-1]; +$a = $a ? -1 : -1; + +yield - 1; +echo - 1; +$a = - 1; +func(- 1); +$a = [- 1]; +return - 1; +print - 1; +$a &= - 1; +switch ($a) { + case - 1: +} +$a = $a ?? - 1; +$a .= - 1; +$a /= - 1; +$a = [1 => - 1]; +$a = $a == - 1; +$a = $a >= - 1; +$a = $a === - 1; +$a = $a != - 1; +$a = $a !== - 1; +$a = $a <= - 1; +$a = $a <=> - 1; +$a = $a and - 1; +$a = $a or - 1; +$a = $a xor - 1; +$a -= - 1; +$a %= - 1; +$a *= - 1; +$a |= - 1; +$a += - 1; +$a = $a ** - 1; +$a **= - 1; +$a = $a << - 1; +$a <<= - 1; +$a = $a >> - 1; +$a >>= - 1; +$a = (string) - 1; +$a = (array) - 1; +$a = (bool) - 1; +$a = (object) - 1; +$a = (unset) - 1; +$a = (float) - 1; +$a = (int) - 1; +$a ^= - 1; +$a = [$a, - 1]; +$a = $a[- 1]; +$a = $a ? - 1 : - 1; + + +yield -$b; +echo -$b; +$a = -$b; +func(-$b); +$a = [-$b]; +return -$b; +print -$b; +$a &= -$b; +switch ($a) { + case -$b: +} +$a = $a ?? -$b; +$a .= -$b; +$a /= -$b; +$a = [1 => -$b]; +$a = $a == -$b; +$a = $a >= -$b; +$a = $a === -$b; +$a = $a != -$b; +$a = $a !== -$b; +$a = $a <= -$b; +$a = $a <=> -$b; +$a = $a and -$b; +$a = $a or -$b; +$a = $a xor -$b; +$a -= -$b; +$a %= -$b; +$a *= -$b; +$a |= -$b; +$a += -$b; +$a = $a ** -$b; +$a **= -$b; +$a = $a << -$b; +$a <<= -$b; +$a = $a >> -$b; +$a >>= -$b; +$a = (string) -$b; +$a = (array) -$b; +$a = (bool) -$b; +$a = (object) -$b; +$a = (unset) -$b; +$a = (float) -$b; +$a = (int) -$b; +$a ^= -$b; +$a = [$a, -$b]; +$a = $a[-$b]; +$a = $a ? -$b : -$b; + +yield - $b; +echo - $b; +$a = - $b; +func(- $b); +$a = [- $b]; +return - $b; +print - $b; +$a &= - $b; +switch ($a) { + case - $b: +} +$a = $a ?? - $b; +$a .= - $b; +$a /= - $b; +$a = [1 => - $b]; +$a = $a == - $b; +$a = $a >= - $b; +$a = $a === - $b; +$a = $a != - $b; +$a = $a !== - $b; +$a = $a <= - $b; +$a = $a <=> - $b; +$a = $a and - $b; +$a = $a or - $b; +$a = $a xor - $b; +$a -= - $b; +$a %= - $b; +$a *= - $b; +$a |= - $b; +$a += - $b; +$a = $a ** - $b; +$a **= - $b; +$a = $a << - $b; +$a <<= - $b; +$a = $a >> - $b; +$a >>= - $b; +$a = (string) - $b; +$a = (array) - $b; +$a = (bool) - $b; +$a = (object) - $b; +$a = (unset) - $b; +$a = (float) - $b; +$a = (int) - $b; +$a ^= - $b; +$a = [$a, - $b]; +$a = $a[- $b]; +$a = $a ? - $b : - $b; + +exit -1; + +$cl = function ($boo =-1) {}; +$cl = function ($boo =+1) {}; +$fn = fn ($boo =-1) => $boo; +$fn = fn ($boo =+1) => $boo; + +$fn = static fn(DateTime $a, DateTime $b): int => -($a->getTimestamp() <=> $b->getTimestamp()); + +$a = 'a '.-MY_CONSTANT; +$a = 'a '.-$b; +$a = 'a '.- MY_CONSTANT; +$a = 'a '.- $b; + +/* Intentional parse error. This has to be the last test in the file. */ +$a = 10 + diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/WhiteSpace/OperatorSpacingUnitTest.inc.fixed b/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/WhiteSpace/OperatorSpacingUnitTest.inc.fixed new file mode 100644 index 00000000..138616e7 --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/WhiteSpace/OperatorSpacingUnitTest.inc.fixed @@ -0,0 +1,475 @@ + $j && $k < $l && $m >= $n && $o <= $p && $q <> $r; + +$a == $b && $c != $d && $e === $f && $g !== $h; +$i > $j && $k < $l && $m >= $n && $o <= $p && $q <> $r; + +function myFunction($variable=0, $var2='string') {} + +if (index > -1) { +} + +array_walk_recursive($array, function(&$item) use (&$something) { +}); + +$var = saveFile(&$model, &$foo); + +// This is all valid. +$boo = -$foo; +function foo($boo = -1) {} +$foo = array('boo' => -1); +$x = $test ? -1 : 1; +$y = $test ? 1 : -1; +$z = $test ?: false; + +$closureWithDefaultParameter = function (array $testArray=array()) {}; + +switch ($foo) { + case -1: + break; +} + +$y = 1 * -1; +$y = -1 * 1; +$y = -1 * $var; +$y = 10 / -2; +$y = -10 / 2; +$y = (-10 / 2); +$y = (-10 / $var); +$y = 10 + -2; +$y = -10 + 2; + +$a = $x ? $y : $z; +$a = $x ? $y : $z; + +$y = 1 + 2 - 3; + +$y = 1 + 2 - 3; + +$y = 1 + 2 - 3; + +// phpcs:set Squiz.WhiteSpace.OperatorSpacing ignoreNewlines true +$y = 1 + + 2 + - 3; + +$y = 1 + + 2 - + 3; + +$y = 1 ++ 2 +- 3; +// phpcs:set Squiz.WhiteSpace.OperatorSpacing ignoreNewlines false + +if (true || -1 == $b) { +} + +$var = array(-1); +$var = [-1]; +$var = [0, -1, -2]; + +$y = array(&$x); +$y = [&$x]; +$y = array(&$a, &$b, &$c); +$y = [&$a, &$b, &$c]; +$y = array(&$a => 1, 2 => &$b, &$c); +$y = [&$a => 1, 2 => &$b, &$c]; + +if ($a <=> $b) { +} + +if ($a <=> $b) { +} + +$a |= $b; +$a **= $b; +$a ??= $b; + +$a = +1; + +function bar($boo = +1) {} + +$username = $_GET['user'] ?? 'nobody'; + +function foo(string $bar, array $baz, ?MyClass $object) : MyClass {} + +declare(strict_types=1); + +function foo($c = ((BAR) ? 10 : 100)) {} + +$res = $a ?: $b; +$res = $a ?: $b; +$res = $a ?: $b; +$res = $a ?: $b; + +$res = $a ? : $b; +$res = $a ? : $b; +$res = $a ? : $b; +$res = $a ? : $b; + +function foo(string $a = '', ?string $b = ''): ?string {} + +// Issue #1605. +$text = preg_replace_callback( + self::CHAR_REFS_REGEX, + [ 'Sanitizer', 'decodeCharReferencesCallback' ], + $text, /* limit */ -1, $count ); + +if (true || /* test */ -1 == $b) {} +$y = 10 + /* test */ -2; + +// Issue #1604. +Hooks::run( 'ParserOptionsRegister', [ + &self::$defaults, + &self::$inCacheKey, + &self::$lazyOptions, +] ); + +$x = $foo ? function (): int { + return 1; +} : $bar; + +$x = $foo ? function ($foo) + // comment + : int { + return 1; +} : $bar; + +$x = $foo ? function ($foo) use /* comment */ ($bar): int { + return 1; +} : $bar; + +$x = !$foo ? $bar : function (): int { + return 1; +}; + +$a = + // Comment. + [ + 'a', + 'b', + ]; + +$a = +// phpcs:ignore Standard.Category.Sniff -- for reasons. +[ + 'a', + 'b', +]; + +$foo = is_array($bar) ? array_map( + function () {}, + $bar + ) : $bar; + +function bar(): array {} + +if ($line{-1} === ':') { + $line = substr($line, 0, -1); +} + +$a = $a instanceof $b; +$a = $a instanceof $b; +$a = ($a) instanceof $b; + +fn&($x) => $x; + +// phpcs:set Squiz.WhiteSpace.OperatorSpacing ignoreSpacingBeforeAssignments false +$a = 3; + +yield -1; +echo -1; +$a = -1; +func(-1); +$a = [-1]; +return -1; +print -1; +$a &= -1; +switch ($a) { + case -1: +} +$a = $a ?? -1; +$a .= -1; +$a /= -1; +$a = [1 => -1]; +$a = $a == -1; +$a = $a >= -1; +$a = $a === -1; +$a = $a != -1; +$a = $a !== -1; +$a = $a <= -1; +$a = $a <=> -1; +$a = $a and -1; +$a = $a or -1; +$a = $a xor -1; +$a -= -1; +$a %= -1; +$a *= -1; +$a |= -1; +$a += -1; +$a = $a ** -1; +$a **= -1; +$a = $a << -1; +$a <<= -1; +$a = $a >> -1; +$a >>= -1; +$a = (string) -1; +$a = (array) -1; +$a = (bool) -1; +$a = (object) -1; +$a = (unset) -1; +$a = (float) -1; +$a = (int) -1; +$a ^= -1; +$a = [$a, -1]; +$a = $a[-1]; +$a = $a ? -1 : -1; + +yield - 1; +echo - 1; +$a = - 1; +func(- 1); +$a = [- 1]; +return - 1; +print - 1; +$a &= - 1; +switch ($a) { + case - 1: +} +$a = $a ?? - 1; +$a .= - 1; +$a /= - 1; +$a = [1 => - 1]; +$a = $a == - 1; +$a = $a >= - 1; +$a = $a === - 1; +$a = $a != - 1; +$a = $a !== - 1; +$a = $a <= - 1; +$a = $a <=> - 1; +$a = $a and - 1; +$a = $a or - 1; +$a = $a xor - 1; +$a -= - 1; +$a %= - 1; +$a *= - 1; +$a |= - 1; +$a += - 1; +$a = $a ** - 1; +$a **= - 1; +$a = $a << - 1; +$a <<= - 1; +$a = $a >> - 1; +$a >>= - 1; +$a = (string) - 1; +$a = (array) - 1; +$a = (bool) - 1; +$a = (object) - 1; +$a = (unset) - 1; +$a = (float) - 1; +$a = (int) - 1; +$a ^= - 1; +$a = [$a, - 1]; +$a = $a[- 1]; +$a = $a ? - 1 : - 1; + + +yield -$b; +echo -$b; +$a = -$b; +func(-$b); +$a = [-$b]; +return -$b; +print -$b; +$a &= -$b; +switch ($a) { + case -$b: +} +$a = $a ?? -$b; +$a .= -$b; +$a /= -$b; +$a = [1 => -$b]; +$a = $a == -$b; +$a = $a >= -$b; +$a = $a === -$b; +$a = $a != -$b; +$a = $a !== -$b; +$a = $a <= -$b; +$a = $a <=> -$b; +$a = $a and -$b; +$a = $a or -$b; +$a = $a xor -$b; +$a -= -$b; +$a %= -$b; +$a *= -$b; +$a |= -$b; +$a += -$b; +$a = $a ** -$b; +$a **= -$b; +$a = $a << -$b; +$a <<= -$b; +$a = $a >> -$b; +$a >>= -$b; +$a = (string) -$b; +$a = (array) -$b; +$a = (bool) -$b; +$a = (object) -$b; +$a = (unset) -$b; +$a = (float) -$b; +$a = (int) -$b; +$a ^= -$b; +$a = [$a, -$b]; +$a = $a[-$b]; +$a = $a ? -$b : -$b; + +yield - $b; +echo - $b; +$a = - $b; +func(- $b); +$a = [- $b]; +return - $b; +print - $b; +$a &= - $b; +switch ($a) { + case - $b: +} +$a = $a ?? - $b; +$a .= - $b; +$a /= - $b; +$a = [1 => - $b]; +$a = $a == - $b; +$a = $a >= - $b; +$a = $a === - $b; +$a = $a != - $b; +$a = $a !== - $b; +$a = $a <= - $b; +$a = $a <=> - $b; +$a = $a and - $b; +$a = $a or - $b; +$a = $a xor - $b; +$a -= - $b; +$a %= - $b; +$a *= - $b; +$a |= - $b; +$a += - $b; +$a = $a ** - $b; +$a **= - $b; +$a = $a << - $b; +$a <<= - $b; +$a = $a >> - $b; +$a >>= - $b; +$a = (string) - $b; +$a = (array) - $b; +$a = (bool) - $b; +$a = (object) - $b; +$a = (unset) - $b; +$a = (float) - $b; +$a = (int) - $b; +$a ^= - $b; +$a = [$a, - $b]; +$a = $a[- $b]; +$a = $a ? - $b : - $b; + +exit -1; + +$cl = function ($boo =-1) {}; +$cl = function ($boo =+1) {}; +$fn = fn ($boo =-1) => $boo; +$fn = fn ($boo =+1) => $boo; + +$fn = static fn(DateTime $a, DateTime $b): int => -($a->getTimestamp() <=> $b->getTimestamp()); + +$a = 'a '.-MY_CONSTANT; +$a = 'a '.-$b; +$a = 'a '.- MY_CONSTANT; +$a = 'a '.- $b; + +/* Intentional parse error. This has to be the last test in the file. */ +$a = 10 + diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/WhiteSpace/OperatorSpacingUnitTest.js b/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/WhiteSpace/OperatorSpacingUnitTest.js new file mode 100644 index 00000000..16eb130f --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/WhiteSpace/OperatorSpacingUnitTest.js @@ -0,0 +1,103 @@ + + +result = 1 + 2; +result = 1 + 2; +result = 1 + 2; +result = 1 +2; +result = 1+ 2; +result = 1+2; + +result = 1 - 2; +result = 1 - 2; +result = 1 - 2; +result = 1 -2; +result = 1- 2; +result = 1-2; + +result = 1 * 2; +result = 1 * 2; +result = 1 * 2; +result = 1 *2; +result = 1* 2; +result = 1*2; + +result = 1 / 2; +result = 1 / 2; +result = 1 / 2; +result = 1 /2; +result = 1/ 2; +result = 1/2; + +result = 1 % 2; +result = 1 % 2; +result = 1 % 2; +result = 1 %2; +result = 1% 2; +result = 1%2; +result = '100%'; + +result += 4; +result+=4; +result -= 4; +result-=4; +result /= 4; +result/=4; +result *=4; +result*=4; + +$.localScroll({offset: {top: -32}}); + +switch (result) { + case -1: + break; +} + +result = x?y:z; +result = x ? y : z; + +if (something === true + ^ somethingElse === true +) { + return false; +} + +y = 1 + + 2 + - 3; + +y = 1 + + 2 - + 3; + +y = 1 ++ 2 +- 3; + +// phpcs:set Squiz.WhiteSpace.OperatorSpacing ignoreNewlines true +y = 1 + + 2 + - 3; + +y = 1 + + 2 - + 3; + +y = 1 ++ 2 +- 3; +// phpcs:set Squiz.WhiteSpace.OperatorSpacing ignoreNewlines false + +if (true || -1 == b) { +} + +x = x << y; +x <<= y; +x = x >> y; +x >>= y; +x = x >>> y; +x >>>= y; + +var foo = bar.map(baz=> baz.length); + +// phpcs:set Squiz.WhiteSpace.OperatorSpacing ignoreSpacingBeforeAssignments false +a = 3; diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/WhiteSpace/OperatorSpacingUnitTest.js.fixed b/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/WhiteSpace/OperatorSpacingUnitTest.js.fixed new file mode 100644 index 00000000..877db467 --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/WhiteSpace/OperatorSpacingUnitTest.js.fixed @@ -0,0 +1,97 @@ + + +result = 1 + 2; +result = 1 + 2; +result = 1 + 2; +result = 1 + 2; +result = 1 + 2; +result = 1 + 2; + +result = 1 - 2; +result = 1 - 2; +result = 1 - 2; +result = 1 - 2; +result = 1 - 2; +result = 1 - 2; + +result = 1 * 2; +result = 1 * 2; +result = 1 * 2; +result = 1 * 2; +result = 1 * 2; +result = 1 * 2; + +result = 1 / 2; +result = 1 / 2; +result = 1 / 2; +result = 1 / 2; +result = 1 / 2; +result = 1 / 2; + +result = 1 % 2; +result = 1 % 2; +result = 1 % 2; +result = 1 % 2; +result = 1 % 2; +result = 1 % 2; +result = '100%'; + +result += 4; +result += 4; +result -= 4; +result -= 4; +result /= 4; +result /= 4; +result *= 4; +result *= 4; + +$.localScroll({offset: {top: -32}}); + +switch (result) { + case -1: + break; +} + +result = x ? y : z; +result = x ? y : z; + +if (something === true + ^ somethingElse === true +) { + return false; +} + +y = 1 + 2 - 3; + +y = 1 + 2 - 3; + +y = 1 + 2 - 3; + +// phpcs:set Squiz.WhiteSpace.OperatorSpacing ignoreNewlines true +y = 1 + + 2 + - 3; + +y = 1 + + 2 - + 3; + +y = 1 ++ 2 +- 3; +// phpcs:set Squiz.WhiteSpace.OperatorSpacing ignoreNewlines false + +if (true || -1 == b) { +} + +x = x << y; +x <<= y; +x = x >> y; +x >>= y; +x = x >>> y; +x >>>= y; + +var foo = bar.map(baz => baz.length); + +// phpcs:set Squiz.WhiteSpace.OperatorSpacing ignoreSpacingBeforeAssignments false +a = 3; diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/WhiteSpace/OperatorSpacingUnitTest.php b/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/WhiteSpace/OperatorSpacingUnitTest.php new file mode 100644 index 00000000..8e8ad98d --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/WhiteSpace/OperatorSpacingUnitTest.php @@ -0,0 +1,170 @@ + + * @copyright 2006-2015 Squiz Pty Ltd (ABN 77 084 670 600) + * @license https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence + */ + +namespace PHP_CodeSniffer\Standards\Squiz\Tests\WhiteSpace; + +use PHP_CodeSniffer\Tests\Standards\AbstractSniffUnitTest; + +class OperatorSpacingUnitTest extends AbstractSniffUnitTest +{ + + + /** + * Returns the lines where errors should occur. + * + * The key of the array should represent the line number and the value + * should represent the number of errors that should occur on that line. + * + * @param string $testFile The name of the file being tested. + * + * @return array + */ + public function getErrorList($testFile='OperatorSpacingUnitTest.inc') + { + switch ($testFile) { + case 'OperatorSpacingUnitTest.inc': + return [ + 4 => 1, + 5 => 2, + 6 => 1, + 7 => 1, + 8 => 2, + 11 => 1, + 12 => 2, + 13 => 1, + 14 => 1, + 15 => 2, + 18 => 1, + 19 => 2, + 20 => 1, + 21 => 1, + 22 => 2, + 25 => 1, + 26 => 2, + 27 => 1, + 28 => 1, + 29 => 2, + 32 => 1, + 33 => 2, + 34 => 1, + 35 => 1, + 36 => 2, + 40 => 2, + 42 => 2, + 44 => 2, + 45 => 1, + 46 => 2, + 53 => 4, + 54 => 3, + 59 => 10, + 64 => 1, + 77 => 4, + 78 => 1, + 79 => 1, + 80 => 2, + 81 => 1, + 84 => 6, + 85 => 6, + 87 => 4, + 88 => 5, + 90 => 4, + 91 => 5, + 128 => 4, + 132 => 1, + 133 => 1, + 135 => 1, + 136 => 1, + 140 => 1, + 141 => 1, + 174 => 1, + 177 => 1, + 178 => 1, + 179 => 1, + 185 => 2, + 191 => 4, + 194 => 1, + 195 => 1, + 196 => 2, + 199 => 1, + 200 => 1, + 201 => 2, + 239 => 1, + 246 => 1, + 265 => 2, + 266 => 2, + 271 => 2, + ]; + break; + case 'OperatorSpacingUnitTest.js': + return [ + 4 => 1, + 5 => 2, + 6 => 1, + 7 => 1, + 8 => 2, + 11 => 1, + 12 => 2, + 13 => 1, + 14 => 1, + 15 => 2, + 18 => 1, + 19 => 2, + 20 => 1, + 21 => 1, + 22 => 2, + 25 => 1, + 26 => 2, + 27 => 1, + 28 => 1, + 29 => 2, + 32 => 1, + 33 => 2, + 34 => 1, + 35 => 1, + 36 => 2, + 40 => 2, + 42 => 2, + 44 => 2, + 45 => 1, + 46 => 2, + 55 => 4, + 65 => 1, + 66 => 1, + 68 => 1, + 69 => 1, + 73 => 1, + 74 => 1, + 100 => 1, + 103 => 2, + ]; + break; + default: + return []; + break; + }//end switch + + }//end getErrorList() + + + /** + * Returns the lines where warnings should occur. + * + * The key of the array should represent the line number and the value + * should represent the number of warnings that should occur on that line. + * + * @return array + */ + public function getWarningList() + { + return []; + + }//end getWarningList() + + +}//end class diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/WhiteSpace/PropertyLabelSpacingUnitTest.js b/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/WhiteSpace/PropertyLabelSpacingUnitTest.js new file mode 100644 index 00000000..15890b96 --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/WhiteSpace/PropertyLabelSpacingUnitTest.js @@ -0,0 +1,40 @@ +var x = { + b: 'x', + xasd: x, + abc:x, + a: function () { + alert('thats right'); + x = (x?a:x); + }, + casdasd : 123123, + omgwtfbbq: { + a: 1, + b: 2 + } +}; + +id = id.replace(/row\/:/gi, ''); + +outer_loop: +for (i=0; i<3; i++) { + for (j=0; j<5; j++) { + if (j==x) + break outer_loop; + } +} +alert('hi'); + +even_number: if ((i % 2) == 0) { + if (i == 12) + break even_number; +} + +switch (blah) { + case dfx.DOM_VK_LEFT: + this.caretLeft(shiftKey); + break; + default: + if (blah) { + } + break; +} diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/WhiteSpace/PropertyLabelSpacingUnitTest.js.fixed b/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/WhiteSpace/PropertyLabelSpacingUnitTest.js.fixed new file mode 100644 index 00000000..f332878e --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/WhiteSpace/PropertyLabelSpacingUnitTest.js.fixed @@ -0,0 +1,39 @@ +var x = { + b: 'x', + xasd: x, + abc: x, + a: function () { + alert('thats right'); + x = (x?a:x); + }, + casdasd: 123123, + omgwtfbbq: { + a: 1, + b: 2 + } +}; + +id = id.replace(/row\/:/gi, ''); + +outer_loop: for (i=0; i<3; i++) { + for (j=0; j<5; j++) { + if (j==x) + break outer_loop; + } +} +alert('hi'); + +even_number: if ((i % 2) == 0) { + if (i == 12) + break even_number; +} + +switch (blah) { + case dfx.DOM_VK_LEFT: + this.caretLeft(shiftKey); + break; + default: + if (blah) { + } + break; +} diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/WhiteSpace/PropertyLabelSpacingUnitTest.php b/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/WhiteSpace/PropertyLabelSpacingUnitTest.php new file mode 100644 index 00000000..e80f9367 --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/WhiteSpace/PropertyLabelSpacingUnitTest.php @@ -0,0 +1,55 @@ + + * @copyright 2006-2015 Squiz Pty Ltd (ABN 77 084 670 600) + * @license https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence + */ + +namespace PHP_CodeSniffer\Standards\Squiz\Tests\WhiteSpace; + +use PHP_CodeSniffer\Tests\Standards\AbstractSniffUnitTest; + +class PropertyLabelSpacingUnitTest extends AbstractSniffUnitTest +{ + + + /** + * Returns the lines where errors should occur. + * + * The key of the array should represent the line number and the value + * should represent the number of errors that should occur on that line. + * + * @return array + */ + public function getErrorList() + { + return [ + 2 => 1, + 4 => 1, + 9 => 2, + 10 => 1, + 12 => 1, + 18 => 1, + ]; + + }//end getErrorList() + + + /** + * Returns the lines where warnings should occur. + * + * The key of the array should represent the line number and the value + * should represent the number of warnings that should occur on that line. + * + * @return array + */ + public function getWarningList() + { + return []; + + }//end getWarningList() + + +}//end class diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/WhiteSpace/ScopeClosingBraceUnitTest.inc b/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/WhiteSpace/ScopeClosingBraceUnitTest.inc new file mode 100644 index 00000000..ecd80b55 --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/WhiteSpace/ScopeClosingBraceUnitTest.inc @@ -0,0 +1,122 @@ +{$property} =& new $class_name($this->db_index); + $this->modules[$module] =& $this->{$property}; +} + +foreach ($elements as $element) { + if ($something) { + // Do IF. + } else if ($somethingElse) { + // Do ELSE. + } +} + +if ($token['code'] === T_COMMENT + && $multiLineComment === false + && (substr($token['content'], 0, 2) === '//' + || $token['content']{0} === '#') +) { +} + +switch ($blah) { + case 'one': + echo 'one'; + break; + default: + echo 'another'; +} + +?> + +getRow()): ?> +

    + + + +
    + +

    o hai!

    + +
    + + + + + + + + + + + + $x + $y; + +$match = match ($test) { 1 => 'a', 2 => 'b' }; + +$match = match ($test) { + 1 => 'a', + 2 => 'b' + }; + +?> + +
    + +
    diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/WhiteSpace/ScopeClosingBraceUnitTest.inc.fixed b/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/WhiteSpace/ScopeClosingBraceUnitTest.inc.fixed new file mode 100644 index 00000000..a30dfd0e --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/WhiteSpace/ScopeClosingBraceUnitTest.inc.fixed @@ -0,0 +1,125 @@ +{$property} =& new $class_name($this->db_index); + $this->modules[$module] =& $this->{$property}; +} + +foreach ($elements as $element) { + if ($something) { + // Do IF. + } else if ($somethingElse) { + // Do ELSE. + } +} + +if ($token['code'] === T_COMMENT + && $multiLineComment === false + && (substr($token['content'], 0, 2) === '//' + || $token['content']{0} === '#') +) { +} + +switch ($blah) { + case 'one': + echo 'one'; + break; + default: + echo 'another'; +} + +?> + +getRow()): ?> +

    + + + +
    + +

    o hai!

    + +
    + + + + + + + + + + + + $x + $y; + +$match = match ($test) { 1 => 'a', 2 => 'b' +}; + +$match = match ($test) { + 1 => 'a', + 2 => 'b' +}; + +?> + +
    + +
    + diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/WhiteSpace/ScopeClosingBraceUnitTest.php b/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/WhiteSpace/ScopeClosingBraceUnitTest.php new file mode 100644 index 00000000..0df8603f --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/WhiteSpace/ScopeClosingBraceUnitTest.php @@ -0,0 +1,57 @@ + + * @copyright 2006-2015 Squiz Pty Ltd (ABN 77 084 670 600) + * @license https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence + */ + +namespace PHP_CodeSniffer\Standards\Squiz\Tests\WhiteSpace; + +use PHP_CodeSniffer\Tests\Standards\AbstractSniffUnitTest; + +class ScopeClosingBraceUnitTest extends AbstractSniffUnitTest +{ + + + /** + * Returns the lines where errors should occur. + * + * The key of the array should represent the line number and the value + * should represent the number of errors that should occur on that line. + * + * @return array + */ + public function getErrorList() + { + return [ + 11 => 1, + 13 => 1, + 24 => 1, + 80 => 1, + 102 => 1, + 111 => 1, + 116 => 1, + 122 => 1, + ]; + + }//end getErrorList() + + + /** + * Returns the lines where warnings should occur. + * + * The key of the array should represent the line number and the value + * should represent the number of warnings that should occur on that line. + * + * @return array + */ + public function getWarningList() + { + return []; + + }//end getWarningList() + + +}//end class diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/WhiteSpace/ScopeKeywordSpacingUnitTest.inc b/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/WhiteSpace/ScopeKeywordSpacingUnitTest.inc new file mode 100644 index 00000000..22138171 --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/WhiteSpace/ScopeKeywordSpacingUnitTest.inc @@ -0,0 +1,128 @@ + 'a', 'b' => 'b' ), + $varQ = 'string', + $varR = 123; + + // Intentionally missing a semi-colon for testing. + public + $varS, + $varT +} + +// Issue #3188 - static as return type. +public static function fCreate($attributes = []): static +{ + return static::factory()->create($attributes); +} + +public static function fCreate($attributes = []): ?static +{ + return static::factory()->create($attributes); +} + +// Also account for static used within union types. +public function fCreate($attributes = []): object|static +{ +} + +// Ensure that static as a scope keyword when preceeded by a colon which is not for a type declaration is still handled. +$callback = $cond ? get_fn_name() : static function ($a) { return $a * 10; }; + +class TypedProperties { + public + int $var; + + protected string $stringA, $stringB; + + private bool + $boolA, + $boolB; +} + +// PHP 8.0 constructor property promotion. +class ConstructorPropertyPromotionTest { + public function __construct( + public $x = 0.0, + protected $y = '', + private $z = null, + $normalParam, + ) {} +} + +class ConstructorPropertyPromotionWithTypesTest { + public function __construct(protected float|int $x, public?string &$y = 'test', private mixed $z) {} +} diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/WhiteSpace/ScopeKeywordSpacingUnitTest.inc.fixed b/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/WhiteSpace/ScopeKeywordSpacingUnitTest.inc.fixed new file mode 100644 index 00000000..e642f0c7 --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/WhiteSpace/ScopeKeywordSpacingUnitTest.inc.fixed @@ -0,0 +1,122 @@ + 'a', 'b' => 'b' ), + $varQ = 'string', + $varR = 123; + + // Intentionally missing a semi-colon for testing. + public + $varS, + $varT +} + +// Issue #3188 - static as return type. +public static function fCreate($attributes = []): static +{ + return static::factory()->create($attributes); +} + +public static function fCreate($attributes = []): ?static +{ + return static::factory()->create($attributes); +} + +// Also account for static used within union types. +public function fCreate($attributes = []): object|static +{ +} + +// Ensure that static as a scope keyword when preceeded by a colon which is not for a type declaration is still handled. +$callback = $cond ? get_fn_name() : static function ($a) { return $a * 10; }; + +class TypedProperties { + public int $var; + + protected string $stringA, $stringB; + + private bool + $boolA, + $boolB; +} + +// PHP 8.0 constructor property promotion. +class ConstructorPropertyPromotionTest { + public function __construct( + public $x = 0.0, + protected $y = '', + private $z = null, + $normalParam, + ) {} +} + +class ConstructorPropertyPromotionWithTypesTest { + public function __construct(protected float|int $x, public ?string &$y = 'test', private mixed $z) {} +} diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/WhiteSpace/ScopeKeywordSpacingUnitTest.php b/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/WhiteSpace/ScopeKeywordSpacingUnitTest.php new file mode 100644 index 00000000..de4697c0 --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/WhiteSpace/ScopeKeywordSpacingUnitTest.php @@ -0,0 +1,67 @@ + + * @copyright 2006-2015 Squiz Pty Ltd (ABN 77 084 670 600) + * @license https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence + */ + +namespace PHP_CodeSniffer\Standards\Squiz\Tests\WhiteSpace; + +use PHP_CodeSniffer\Tests\Standards\AbstractSniffUnitTest; + +class ScopeKeywordSpacingUnitTest extends AbstractSniffUnitTest +{ + + + /** + * Returns the lines where errors should occur. + * + * The key of the array should represent the line number and the value + * should represent the number of errors that should occur on that line. + * + * @return array + */ + public function getErrorList() + { + return [ + 7 => 2, + 8 => 1, + 13 => 1, + 14 => 1, + 15 => 1, + 17 => 2, + 26 => 1, + 28 => 1, + 29 => 1, + 64 => 1, + 67 => 1, + 71 => 1, + 103 => 1, + 106 => 1, + 111 => 1, + 119 => 1, + 121 => 1, + 127 => 2, + ]; + + }//end getErrorList() + + + /** + * Returns the lines where warnings should occur. + * + * The key of the array should represent the line number and the value + * should represent the number of warnings that should occur on that line. + * + * @return array + */ + public function getWarningList() + { + return []; + + }//end getWarningList() + + +}//end class diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/WhiteSpace/SemicolonSpacingUnitTest.inc b/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/WhiteSpace/SemicolonSpacingUnitTest.inc new file mode 100644 index 00000000..393f4845 --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/WhiteSpace/SemicolonSpacingUnitTest.inc @@ -0,0 +1,42 @@ +testThis(); +$test = $this->testThis() ; +$test = $this->testThis() ; +for ($var = 1 ; $var < 10 ; $var++) { + echo $var ; +} +$test = $this->testThis() /* comment here */; +$test = $this->testThis() /* comment here */ ; + +$hello ='foo'; +; + +$sum = $a /* + $b */; +$sum = $a // + $b +; +$sum = $a /* + $b + + $c */ ; + +/* + * Test that the sniff does *not* throw incorrect errors for semi-colons in + * "empty" parts of a `for` control structure. + */ +for ($i = 1; ; $i++) {} +for ( ; $ptr >= 0; $ptr-- ) {} +for ( ; ; ) {} + +// But it should when the semi-colon in a `for` follows a comment (but shouldn't move the semi-colon). +for ( /* Deliberately left empty. */ ; $ptr >= 0; $ptr-- ) {} +for ( $i = 1 ; /* Deliberately left empty. */ ; $i++ ) {} + +switch ($foo) { + case 'foo': + ; + break + ; +} + +// This is an empty statement and should be ignored. +if ($foo) { +; +} diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/WhiteSpace/SemicolonSpacingUnitTest.inc.fixed b/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/WhiteSpace/SemicolonSpacingUnitTest.inc.fixed new file mode 100644 index 00000000..0d06324d --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/WhiteSpace/SemicolonSpacingUnitTest.inc.fixed @@ -0,0 +1,41 @@ +testThis(); +$test = $this->testThis(); +$test = $this->testThis(); +for ($var = 1; $var < 10; $var++) { + echo $var; +} +$test = $this->testThis(); /* comment here */ +$test = $this->testThis(); /* comment here */ + +$hello ='foo'; +; + +$sum = $a; /* + $b */ +$sum = $a; // + $b + +$sum = $a; /* + $b + + $c */ + +/* + * Test that the sniff does *not* throw incorrect errors for semi-colons in + * "empty" parts of a `for` control structure. + */ +for ($i = 1; ; $i++) {} +for ( ; $ptr >= 0; $ptr-- ) {} +for ( ; ; ) {} + +// But it should when the semi-colon in a `for` follows a comment (but shouldn't move the semi-colon). +for ( /* Deliberately left empty. */; $ptr >= 0; $ptr-- ) {} +for ( $i = 1; /* Deliberately left empty. */; $i++ ) {} + +switch ($foo) { + case 'foo': + ; + break; +} + +// This is an empty statement and should be ignored. +if ($foo) { +; +} diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/WhiteSpace/SemicolonSpacingUnitTest.js b/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/WhiteSpace/SemicolonSpacingUnitTest.js new file mode 100644 index 00000000..3aafd6da --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/WhiteSpace/SemicolonSpacingUnitTest.js @@ -0,0 +1,25 @@ +var x = { + a: function () { + alert('thats right') ; + x = (x?a:x) ; + }, +} ; + +id = id.replace(/row\/:;/gi, ''); + +for (i=0 ; i<3 ; i++) { + for (j=0; j<5 ; j++) { + if (j==x) + break ; + } +} +alert('hi'); +; + +var sum = a /* + b */; + +var sum = a // +b +; + +var sum = a /* +b + + c */ ; diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/WhiteSpace/SemicolonSpacingUnitTest.js.fixed b/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/WhiteSpace/SemicolonSpacingUnitTest.js.fixed new file mode 100644 index 00000000..a547144d --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/WhiteSpace/SemicolonSpacingUnitTest.js.fixed @@ -0,0 +1,25 @@ +var x = { + a: function () { + alert('thats right'); + x = (x?a:x); + }, +}; + +id = id.replace(/row\/:;/gi, ''); + +for (i=0; i<3; i++) { + for (j=0; j<5; j++) { + if (j==x) + break; + } +} +alert('hi'); +; + +var sum = a; /* + b */ + +var sum = a; // +b + + +var sum = a; /* +b + + c */ diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/WhiteSpace/SemicolonSpacingUnitTest.php b/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/WhiteSpace/SemicolonSpacingUnitTest.php new file mode 100644 index 00000000..72196f8e --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/WhiteSpace/SemicolonSpacingUnitTest.php @@ -0,0 +1,83 @@ + + * @copyright 2006-2015 Squiz Pty Ltd (ABN 77 084 670 600) + * @license https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence + */ + +namespace PHP_CodeSniffer\Standards\Squiz\Tests\WhiteSpace; + +use PHP_CodeSniffer\Tests\Standards\AbstractSniffUnitTest; + +class SemicolonSpacingUnitTest extends AbstractSniffUnitTest +{ + + + /** + * Returns the lines where errors should occur. + * + * The key of the array should represent the line number and the value + * should represent the number of errors that should occur on that line. + * + * @param string $testFile The name of the file being tested. + * + * @return array + */ + public function getErrorList($testFile='SemicolonSpacingUnitTest.inc') + { + switch ($testFile) { + case 'SemicolonSpacingUnitTest.inc': + return [ + 3 => 1, + 4 => 1, + 5 => 2, + 6 => 1, + 8 => 1, + 9 => 1, + 14 => 1, + 16 => 1, + 18 => 1, + 29 => 1, + 30 => 2, + 36 => 1, + ]; + break; + case 'SemicolonSpacingUnitTest.js': + return [ + 3 => 1, + 4 => 1, + 6 => 1, + 10 => 2, + 11 => 1, + 13 => 1, + 19 => 1, + 22 => 1, + 25 => 1, + ]; + break; + default: + return []; + break; + }//end switch + + }//end getErrorList() + + + /** + * Returns the lines where warnings should occur. + * + * The key of the array should represent the line number and the value + * should represent the number of warnings that should occur on that line. + * + * @return array + */ + public function getWarningList() + { + return []; + + }//end getWarningList() + + +}//end class diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/WhiteSpace/SuperfluousWhitespaceUnitTest.1.css b/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/WhiteSpace/SuperfluousWhitespaceUnitTest.1.css new file mode 100644 index 00000000..1dd1b6e6 --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/WhiteSpace/SuperfluousWhitespaceUnitTest.1.css @@ -0,0 +1,25 @@ + +.HelpWidgetType-new-bug-title { + float: left; +} +.HelpWidgetType-new-bug-title { + float: left; +} +.HelpWidgetType-new-bug-title { + float: left; +} + +.HelpWidgetType-new-bug-title{ + float: left; +} + +/* phpcs:set Squiz.WhiteSpace.SuperfluousWhitespace ignoreBlankLines true */ +.HelpWidgetType-new-bug-title{ + float: left; +} + +.HelpWidgetType-new-bug-title{ + float: left; +} +/* phpcs:set Squiz.WhiteSpace.SuperfluousWhitespace ignoreBlankLines false */ + diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/WhiteSpace/SuperfluousWhitespaceUnitTest.1.css.fixed b/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/WhiteSpace/SuperfluousWhitespaceUnitTest.1.css.fixed new file mode 100644 index 00000000..59ddddb0 --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/WhiteSpace/SuperfluousWhitespaceUnitTest.1.css.fixed @@ -0,0 +1,23 @@ +.HelpWidgetType-new-bug-title { + float: left; +} +.HelpWidgetType-new-bug-title { + float: left; +} +.HelpWidgetType-new-bug-title { + float: left; +} + +.HelpWidgetType-new-bug-title{ + float: left; +} + +/* phpcs:set Squiz.WhiteSpace.SuperfluousWhitespace ignoreBlankLines true */ +.HelpWidgetType-new-bug-title{ + float: left; +} + +.HelpWidgetType-new-bug-title{ + float: left; +} +/* phpcs:set Squiz.WhiteSpace.SuperfluousWhitespace ignoreBlankLines false */ diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/WhiteSpace/SuperfluousWhitespaceUnitTest.1.inc b/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/WhiteSpace/SuperfluousWhitespaceUnitTest.1.inc new file mode 100644 index 00000000..f9dca29a --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/WhiteSpace/SuperfluousWhitespaceUnitTest.1.inc @@ -0,0 +1,74 @@ + + + diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/WhiteSpace/SuperfluousWhitespaceUnitTest.1.inc.fixed b/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/WhiteSpace/SuperfluousWhitespaceUnitTest.1.inc.fixed new file mode 100644 index 00000000..1d764ebf --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/WhiteSpace/SuperfluousWhitespaceUnitTest.1.inc.fixed @@ -0,0 +1,68 @@ + diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/WhiteSpace/SuperfluousWhitespaceUnitTest.1.js b/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/WhiteSpace/SuperfluousWhitespaceUnitTest.1.js new file mode 100644 index 00000000..be542e77 --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/WhiteSpace/SuperfluousWhitespaceUnitTest.1.js @@ -0,0 +1,56 @@ + +alert('hi'); +alert('hello'); + +if (something) { + +} + + +function myFunction() +{ + alert('code here'); + + alert('code here'); + + + // Hello. + + /* + HI + */ + + +} + +function myFunction2() +{ + alert('code here'); + + + alert('code here'); + +} + +MyFunction = function() +{ + alert('code here'); + + + alert('code here'); + +}; + +// phpcs:set Squiz.WhiteSpace.SuperfluousWhitespace ignoreBlankLines true + +function myFunction2() +{ + alert('code here'); + + alert('code here'); + +} + +// phpcs:set Squiz.WhiteSpace.SuperfluousWhitespace ignoreBlankLines false + + diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/WhiteSpace/SuperfluousWhitespaceUnitTest.1.js.fixed b/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/WhiteSpace/SuperfluousWhitespaceUnitTest.1.js.fixed new file mode 100644 index 00000000..960111a5 --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/WhiteSpace/SuperfluousWhitespaceUnitTest.1.js.fixed @@ -0,0 +1,50 @@ +alert('hi'); +alert('hello'); + +if (something) { + +} + + +function myFunction() +{ + alert('code here'); + + alert('code here'); + + // Hello. + + /* + HI + */ + +} + +function myFunction2() +{ + alert('code here'); + + alert('code here'); + +} + +MyFunction = function() +{ + alert('code here'); + + alert('code here'); + +}; + +// phpcs:set Squiz.WhiteSpace.SuperfluousWhitespace ignoreBlankLines true + +function myFunction2() +{ + alert('code here'); + + alert('code here'); + +} + +// phpcs:set Squiz.WhiteSpace.SuperfluousWhitespace ignoreBlankLines false + diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/WhiteSpace/SuperfluousWhitespaceUnitTest.2.css b/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/WhiteSpace/SuperfluousWhitespaceUnitTest.2.css new file mode 100644 index 00000000..2025eeb1 --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/WhiteSpace/SuperfluousWhitespaceUnitTest.2.css @@ -0,0 +1,3 @@ +.HelpWidgetType-new-bug-title { + float: left; +} \ No newline at end of file diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/WhiteSpace/SuperfluousWhitespaceUnitTest.2.css.fixed b/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/WhiteSpace/SuperfluousWhitespaceUnitTest.2.css.fixed new file mode 100644 index 00000000..2025eeb1 --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/WhiteSpace/SuperfluousWhitespaceUnitTest.2.css.fixed @@ -0,0 +1,3 @@ +.HelpWidgetType-new-bug-title { + float: left; +} \ No newline at end of file diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/WhiteSpace/SuperfluousWhitespaceUnitTest.2.inc b/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/WhiteSpace/SuperfluousWhitespaceUnitTest.2.inc new file mode 100644 index 00000000..a6e2b8ad --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/WhiteSpace/SuperfluousWhitespaceUnitTest.2.inc @@ -0,0 +1,9 @@ + + +

    + +

    + diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/WhiteSpace/SuperfluousWhitespaceUnitTest.2.inc.fixed b/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/WhiteSpace/SuperfluousWhitespaceUnitTest.2.inc.fixed new file mode 100644 index 00000000..78c45251 --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/WhiteSpace/SuperfluousWhitespaceUnitTest.2.inc.fixed @@ -0,0 +1,7 @@ + +

    + +

    diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/WhiteSpace/SuperfluousWhitespaceUnitTest.2.js b/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/WhiteSpace/SuperfluousWhitespaceUnitTest.2.js new file mode 100644 index 00000000..7b0c8eac --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/WhiteSpace/SuperfluousWhitespaceUnitTest.2.js @@ -0,0 +1 @@ +alert('hi'); \ No newline at end of file diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/WhiteSpace/SuperfluousWhitespaceUnitTest.2.js.fixed b/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/WhiteSpace/SuperfluousWhitespaceUnitTest.2.js.fixed new file mode 100644 index 00000000..7b0c8eac --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/WhiteSpace/SuperfluousWhitespaceUnitTest.2.js.fixed @@ -0,0 +1 @@ +alert('hi'); \ No newline at end of file diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/WhiteSpace/SuperfluousWhitespaceUnitTest.3.css b/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/WhiteSpace/SuperfluousWhitespaceUnitTest.3.css new file mode 100644 index 00000000..9f794a08 --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/WhiteSpace/SuperfluousWhitespaceUnitTest.3.css @@ -0,0 +1,3 @@ +.HelpWidgetType-new-bug-title { + float: left; +} diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/WhiteSpace/SuperfluousWhitespaceUnitTest.3.css.fixed b/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/WhiteSpace/SuperfluousWhitespaceUnitTest.3.css.fixed new file mode 100644 index 00000000..2025eeb1 --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/WhiteSpace/SuperfluousWhitespaceUnitTest.3.css.fixed @@ -0,0 +1,3 @@ +.HelpWidgetType-new-bug-title { + float: left; +} \ No newline at end of file diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/WhiteSpace/SuperfluousWhitespaceUnitTest.3.inc b/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/WhiteSpace/SuperfluousWhitespaceUnitTest.3.inc new file mode 100644 index 00000000..661ebdaf --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/WhiteSpace/SuperfluousWhitespaceUnitTest.3.inc @@ -0,0 +1,14 @@ + + + + + + + + + + diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/WhiteSpace/SuperfluousWhitespaceUnitTest.3.inc.fixed b/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/WhiteSpace/SuperfluousWhitespaceUnitTest.3.inc.fixed new file mode 100644 index 00000000..0cb97480 --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/WhiteSpace/SuperfluousWhitespaceUnitTest.3.inc.fixed @@ -0,0 +1,5 @@ + diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/WhiteSpace/SuperfluousWhitespaceUnitTest.3.js b/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/WhiteSpace/SuperfluousWhitespaceUnitTest.3.js new file mode 100644 index 00000000..70f67193 --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/WhiteSpace/SuperfluousWhitespaceUnitTest.3.js @@ -0,0 +1 @@ +alert('hi'); diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/WhiteSpace/SuperfluousWhitespaceUnitTest.3.js.fixed b/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/WhiteSpace/SuperfluousWhitespaceUnitTest.3.js.fixed new file mode 100644 index 00000000..70f67193 --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/WhiteSpace/SuperfluousWhitespaceUnitTest.3.js.fixed @@ -0,0 +1 @@ +alert('hi'); diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/WhiteSpace/SuperfluousWhitespaceUnitTest.4.inc b/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/WhiteSpace/SuperfluousWhitespaceUnitTest.4.inc new file mode 100644 index 00000000..96860ffb --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/WhiteSpace/SuperfluousWhitespaceUnitTest.4.inc @@ -0,0 +1,4 @@ + \ No newline at end of file diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/WhiteSpace/SuperfluousWhitespaceUnitTest.4.inc.fixed b/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/WhiteSpace/SuperfluousWhitespaceUnitTest.4.inc.fixed new file mode 100644 index 00000000..b26b5b2c --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/WhiteSpace/SuperfluousWhitespaceUnitTest.4.inc.fixed @@ -0,0 +1,4 @@ + \ No newline at end of file diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/WhiteSpace/SuperfluousWhitespaceUnitTest.5.inc b/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/WhiteSpace/SuperfluousWhitespaceUnitTest.5.inc new file mode 100644 index 00000000..4d6f06bc --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/WhiteSpace/SuperfluousWhitespaceUnitTest.5.inc @@ -0,0 +1,5 @@ +   +  \ No newline at end of file diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/WhiteSpace/SuperfluousWhitespaceUnitTest.5.inc.fixed b/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/WhiteSpace/SuperfluousWhitespaceUnitTest.5.inc.fixed new file mode 100644 index 00000000..8ec5f30d --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/WhiteSpace/SuperfluousWhitespaceUnitTest.5.inc.fixed @@ -0,0 +1,4 @@ + \ No newline at end of file diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/WhiteSpace/SuperfluousWhitespaceUnitTest.php b/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/WhiteSpace/SuperfluousWhitespaceUnitTest.php new file mode 100644 index 00000000..b9ff96fb --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/WhiteSpace/SuperfluousWhitespaceUnitTest.php @@ -0,0 +1,113 @@ + + * @copyright 2006-2015 Squiz Pty Ltd (ABN 77 084 670 600) + * @license https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence + */ + +namespace PHP_CodeSniffer\Standards\Squiz\Tests\WhiteSpace; + +use PHP_CodeSniffer\Tests\Standards\AbstractSniffUnitTest; + +class SuperfluousWhitespaceUnitTest extends AbstractSniffUnitTest +{ + + + /** + * Returns the lines where errors should occur. + * + * The key of the array should represent the line number and the value + * should represent the number of errors that should occur on that line. + * + * @param string $testFile The name of the file being tested. + * + * @return array + */ + public function getErrorList($testFile='SuperfluousWhitespaceUnitTest.inc') + { + switch ($testFile) { + case 'SuperfluousWhitespaceUnitTest.1.inc': + return [ + 2 => 1, + 4 => 1, + 5 => 1, + 6 => 1, + 7 => 1, + 16 => 1, + 23 => 1, + 28 => 1, + 33 => 1, + 49 => 1, + 62 => 1, + 65 => 1, + 73 => 1, + ]; + break; + case 'SuperfluousWhitespaceUnitTest.2.inc': + return [ + 2 => 1, + 8 => 1, + ]; + break; + case 'SuperfluousWhitespaceUnitTest.3.inc': + return [ + 6 => 1, + 10 => 1, + ]; + break; + case 'SuperfluousWhitespaceUnitTest.4.inc': + case 'SuperfluousWhitespaceUnitTest.5.inc': + return [ + 1 => 1, + 4 => 1, + ]; + break; + case 'SuperfluousWhitespaceUnitTest.1.js': + return [ + 1 => 1, + 3 => 1, + 4 => 1, + 5 => 1, + 6 => 1, + 15 => 1, + 22 => 1, + 29 => 1, + 38 => 1, + 56 => 1, + ]; + break; + case 'SuperfluousWhitespaceUnitTest.1.css': + return [ + 1 => 1, + 8 => 1, + 9 => 1, + 11 => 1, + 25 => 1, + ]; + break; + default: + return []; + break; + }//end switch + + }//end getErrorList() + + + /** + * Returns the lines where warnings should occur. + * + * The key of the array should represent the line number and the value + * should represent the number of warnings that should occur on that line. + * + * @return array + */ + public function getWarningList() + { + return []; + + }//end getWarningList() + + +}//end class diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/ruleset.xml b/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/ruleset.xml new file mode 100644 index 00000000..87ab4c3e --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/ruleset.xml @@ -0,0 +1,132 @@ + + + The Squiz coding standard. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 0 + + + + + + + + + + + %2$s + + + + + + + + + + + + + 0 + + + 0 + + + 0 + + + 0 + + + + + 0 + + + + + + + + + + 0 + + + error + + + + + 0 + + + error + + diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/Zend/Docs/Debug/CodeAnalyzerStandard.xml b/vendor/squizlabs/php_codesniffer/src/Standards/Zend/Docs/Debug/CodeAnalyzerStandard.xml new file mode 100644 index 00000000..c462b4f8 --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/Zend/Docs/Debug/CodeAnalyzerStandard.xml @@ -0,0 +1,25 @@ + + + + + + + $bar + $baz; +} + ]]> + + + $bar + 2; +} + ]]> + + + diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/Zend/Docs/Files/ClosingTagStandard.xml b/vendor/squizlabs/php_codesniffer/src/Standards/Zend/Docs/Files/ClosingTagStandard.xml new file mode 100644 index 00000000..aa60b8ab --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/Zend/Docs/Files/ClosingTagStandard.xml @@ -0,0 +1,22 @@ + + + + + + + + + + ?> + ]]> + + + diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/Zend/Docs/NamingConventions/ValidVariableNameStandard.xml b/vendor/squizlabs/php_codesniffer/src/Standards/Zend/Docs/NamingConventions/ValidVariableNameStandard.xml new file mode 100644 index 00000000..5bcde4b8 --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/Zend/Docs/NamingConventions/ValidVariableNameStandard.xml @@ -0,0 +1,37 @@ + + + + + + + $testNumber = 1; + ]]> + + + $Test_Number = 1; + ]]> + + + + + _bar; +} + ]]> + + + + + + diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/Zend/Sniffs/Debug/CodeAnalyzerSniff.php b/vendor/squizlabs/php_codesniffer/src/Standards/Zend/Sniffs/Debug/CodeAnalyzerSniff.php new file mode 100644 index 00000000..5df4b0fc --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/Zend/Sniffs/Debug/CodeAnalyzerSniff.php @@ -0,0 +1,98 @@ + + * @author Greg Sherwood + * @copyright 2006-2015 Squiz Pty Ltd (ABN 77 084 670 600) + * @license https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence + */ + +namespace PHP_CodeSniffer\Standards\Zend\Sniffs\Debug; + +use PHP_CodeSniffer\Sniffs\Sniff; +use PHP_CodeSniffer\Files\File; +use PHP_CodeSniffer\Config; +use PHP_CodeSniffer\Exceptions\RuntimeException; +use PHP_CodeSniffer\Util\Common; + +class CodeAnalyzerSniff implements Sniff +{ + + + /** + * Returns the token types that this sniff is interested in. + * + * @return int[] + */ + public function register() + { + return [T_OPEN_TAG]; + + }//end register() + + + /** + * Processes the tokens that this sniff is interested in. + * + * @param \PHP_CodeSniffer\Files\File $phpcsFile The file where the token was found. + * @param int $stackPtr The position in the stack where + * the token was found. + * + * @return int + * @throws \PHP_CodeSniffer\Exceptions\RuntimeException If ZendCodeAnalyzer could not be run. + */ + public function process(File $phpcsFile, $stackPtr) + { + $analyzerPath = Config::getExecutablePath('zend_ca'); + if ($analyzerPath === null) { + return; + } + + $fileName = $phpcsFile->getFilename(); + + // In the command, 2>&1 is important because the code analyzer sends its + // findings to stderr. $output normally contains only stdout, so using 2>&1 + // will pipe even stderr to stdout. + $cmd = Common::escapeshellcmd($analyzerPath).' '.escapeshellarg($fileName).' 2>&1'; + + // There is the possibility to pass "--ide" as an option to the analyzer. + // This would result in an output format which would be easier to parse. + // The problem here is that no cleartext error messages are returned; only + // error-code-labels. So for a start we go for cleartext output. + $exitCode = exec($cmd, $output, $retval); + + // Variable $exitCode is the last line of $output if no error occurs, on + // error it is numeric. Try to handle various error conditions and + // provide useful error reporting. + if (is_numeric($exitCode) === true && $exitCode > 0) { + if (is_array($output) === true) { + $msg = join('\n', $output); + } + + throw new RuntimeException("Failed invoking ZendCodeAnalyzer, exitcode was [$exitCode], retval was [$retval], output was [$msg]"); + } + + if (is_array($output) === true) { + foreach ($output as $finding) { + // The first two lines of analyzer output contain + // something like this: + // > Zend Code Analyzer 1.2.2 + // > Analyzing ... + // So skip these... + $res = preg_match("/^.+\(line ([0-9]+)\):(.+)$/", $finding, $regs); + if (empty($regs) === true || $res === false) { + continue; + } + + $phpcsFile->addWarningOnLine(trim($regs[2]), $regs[1], 'ExternalTool'); + } + } + + // Ignore the rest of the file. + return ($phpcsFile->numTokens + 1); + + }//end process() + + +}//end class diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/Zend/Sniffs/Files/ClosingTagSniff.php b/vendor/squizlabs/php_codesniffer/src/Standards/Zend/Sniffs/Files/ClosingTagSniff.php new file mode 100644 index 00000000..0ed34d13 --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/Zend/Sniffs/Files/ClosingTagSniff.php @@ -0,0 +1,79 @@ + + * @copyright 2006-2015 Squiz Pty Ltd (ABN 77 084 670 600) + * @license https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence + */ + +namespace PHP_CodeSniffer\Standards\Zend\Sniffs\Files; + +use PHP_CodeSniffer\Sniffs\Sniff; +use PHP_CodeSniffer\Files\File; +use PHP_CodeSniffer\Util\Tokens; + +class ClosingTagSniff implements Sniff +{ + + + /** + * Returns an array of tokens this test wants to listen for. + * + * @return array + */ + public function register() + { + return [T_OPEN_TAG]; + + }//end register() + + + /** + * Processes this sniff, when one of its tokens is encountered. + * + * @param \PHP_CodeSniffer\Files\File $phpcsFile The file being scanned. + * @param int $stackPtr The position of the current token in + * the stack passed in $tokens. + * + * @return void + */ + public function process(File $phpcsFile, $stackPtr) + { + // Find the last non-empty token. + $tokens = $phpcsFile->getTokens(); + for ($last = ($phpcsFile->numTokens - 1); $last > 0; $last--) { + if (trim($tokens[$last]['content']) !== '') { + break; + } + } + + if ($tokens[$last]['code'] === T_CLOSE_TAG) { + $error = 'A closing tag is not permitted at the end of a PHP file'; + $fix = $phpcsFile->addFixableError($error, $last, 'NotAllowed'); + if ($fix === true) { + $phpcsFile->fixer->beginChangeset(); + $phpcsFile->fixer->replaceToken($last, $phpcsFile->eolChar); + $prev = $phpcsFile->findPrevious(Tokens::$emptyTokens, ($last - 1), null, true); + if ($tokens[$prev]['code'] !== T_SEMICOLON + && $tokens[$prev]['code'] !== T_CLOSE_CURLY_BRACKET + && $tokens[$prev]['code'] !== T_OPEN_TAG + ) { + $phpcsFile->fixer->addContent($prev, ';'); + } + + $phpcsFile->fixer->endChangeset(); + } + + $phpcsFile->recordMetric($stackPtr, 'PHP closing tag at EOF', 'yes'); + } else { + $phpcsFile->recordMetric($stackPtr, 'PHP closing tag at EOF', 'no'); + }//end if + + // Ignore the rest of the file. + return ($phpcsFile->numTokens + 1); + + }//end process() + + +}//end class diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/Zend/Sniffs/NamingConventions/ValidVariableNameSniff.php b/vendor/squizlabs/php_codesniffer/src/Standards/Zend/Sniffs/NamingConventions/ValidVariableNameSniff.php new file mode 100644 index 00000000..267cd0ad --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/Zend/Sniffs/NamingConventions/ValidVariableNameSniff.php @@ -0,0 +1,196 @@ + + * @copyright 2006-2015 Squiz Pty Ltd (ABN 77 084 670 600) + * @license https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence + */ + +namespace PHP_CodeSniffer\Standards\Zend\Sniffs\NamingConventions; + +use PHP_CodeSniffer\Sniffs\AbstractVariableSniff; +use PHP_CodeSniffer\Util\Common; +use PHP_CodeSniffer\Files\File; +use PHP_CodeSniffer\Util\Tokens; + +class ValidVariableNameSniff extends AbstractVariableSniff +{ + + + /** + * Processes this test, when one of its tokens is encountered. + * + * @param \PHP_CodeSniffer\Files\File $phpcsFile The file being scanned. + * @param int $stackPtr The position of the current token in the + * stack passed in $tokens. + * + * @return void + */ + protected function processVariable(File $phpcsFile, $stackPtr) + { + $tokens = $phpcsFile->getTokens(); + $varName = ltrim($tokens[$stackPtr]['content'], '$'); + + // If it's a php reserved var, then its ok. + if (isset($this->phpReservedVars[$varName]) === true) { + return; + } + + $objOperator = $phpcsFile->findNext([T_WHITESPACE], ($stackPtr + 1), null, true); + if ($tokens[$objOperator]['code'] === T_OBJECT_OPERATOR + || $tokens[$objOperator]['code'] === T_NULLSAFE_OBJECT_OPERATOR + ) { + // Check to see if we are using a variable from an object. + $var = $phpcsFile->findNext([T_WHITESPACE], ($objOperator + 1), null, true); + if ($tokens[$var]['code'] === T_STRING) { + // Either a var name or a function call, so check for bracket. + $bracket = $phpcsFile->findNext([T_WHITESPACE], ($var + 1), null, true); + + if ($tokens[$bracket]['code'] !== T_OPEN_PARENTHESIS) { + $objVarName = $tokens[$var]['content']; + + // There is no way for us to know if the var is public or private, + // so we have to ignore a leading underscore if there is one and just + // check the main part of the variable name. + $originalVarName = $objVarName; + if (substr($objVarName, 0, 1) === '_') { + $objVarName = substr($objVarName, 1); + } + + if (Common::isCamelCaps($objVarName, false, true, false) === false) { + $error = 'Variable "%s" is not in valid camel caps format'; + $data = [$originalVarName]; + $phpcsFile->addError($error, $var, 'NotCamelCaps', $data); + } else if (preg_match('|\d|', $objVarName) === 1) { + $warning = 'Variable "%s" contains numbers but this is discouraged'; + $data = [$originalVarName]; + $phpcsFile->addWarning($warning, $stackPtr, 'ContainsNumbers', $data); + } + }//end if + }//end if + }//end if + + // There is no way for us to know if the var is public or private, + // so we have to ignore a leading underscore if there is one and just + // check the main part of the variable name. + $originalVarName = $varName; + if (substr($varName, 0, 1) === '_') { + $objOperator = $phpcsFile->findPrevious([T_WHITESPACE], ($stackPtr - 1), null, true); + if ($tokens[$objOperator]['code'] === T_DOUBLE_COLON) { + // The variable lives within a class, and is referenced like + // this: MyClass::$_variable, so we don't know its scope. + $inClass = true; + } else { + $inClass = $phpcsFile->hasCondition($stackPtr, Tokens::$ooScopeTokens); + } + + if ($inClass === true) { + $varName = substr($varName, 1); + } + } + + if (Common::isCamelCaps($varName, false, true, false) === false) { + $error = 'Variable "%s" is not in valid camel caps format'; + $data = [$originalVarName]; + $phpcsFile->addError($error, $stackPtr, 'NotCamelCaps', $data); + } else if (preg_match('|\d|', $varName) === 1) { + $warning = 'Variable "%s" contains numbers but this is discouraged'; + $data = [$originalVarName]; + $phpcsFile->addWarning($warning, $stackPtr, 'ContainsNumbers', $data); + } + + }//end processVariable() + + + /** + * Processes class member variables. + * + * @param \PHP_CodeSniffer\Files\File $phpcsFile The file being scanned. + * @param int $stackPtr The position of the current token in the + * stack passed in $tokens. + * + * @return void + */ + protected function processMemberVar(File $phpcsFile, $stackPtr) + { + $tokens = $phpcsFile->getTokens(); + $varName = ltrim($tokens[$stackPtr]['content'], '$'); + $memberProps = $phpcsFile->getMemberProperties($stackPtr); + if (empty($memberProps) === true) { + // Exception encountered. + return; + } + + $public = ($memberProps['scope'] === 'public'); + + if ($public === true) { + if (substr($varName, 0, 1) === '_') { + $error = 'Public member variable "%s" must not contain a leading underscore'; + $data = [$varName]; + $phpcsFile->addError($error, $stackPtr, 'PublicHasUnderscore', $data); + } + } else { + if (substr($varName, 0, 1) !== '_') { + $scope = ucfirst($memberProps['scope']); + $error = '%s member variable "%s" must contain a leading underscore'; + $data = [ + $scope, + $varName, + ]; + $phpcsFile->addError($error, $stackPtr, 'PrivateNoUnderscore', $data); + } + } + + // Remove a potential underscore prefix for testing CamelCaps. + $varName = ltrim($varName, '_'); + + if (Common::isCamelCaps($varName, false, true, false) === false) { + $error = 'Member variable "%s" is not in valid camel caps format'; + $data = [$varName]; + $phpcsFile->addError($error, $stackPtr, 'MemberVarNotCamelCaps', $data); + } else if (preg_match('|\d|', $varName) === 1) { + $warning = 'Member variable "%s" contains numbers but this is discouraged'; + $data = [$varName]; + $phpcsFile->addWarning($warning, $stackPtr, 'MemberVarContainsNumbers', $data); + } + + }//end processMemberVar() + + + /** + * Processes the variable found within a double quoted string. + * + * @param \PHP_CodeSniffer\Files\File $phpcsFile The file being scanned. + * @param int $stackPtr The position of the double quoted + * string. + * + * @return void + */ + protected function processVariableInString(File $phpcsFile, $stackPtr) + { + $tokens = $phpcsFile->getTokens(); + + if (preg_match_all('|[^\\\]\$([a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*)|', $tokens[$stackPtr]['content'], $matches) !== 0) { + foreach ($matches[1] as $varName) { + // If it's a php reserved var, then its ok. + if (isset($this->phpReservedVars[$varName]) === true) { + continue; + } + + if (Common::isCamelCaps($varName, false, true, false) === false) { + $error = 'Variable "%s" is not in valid camel caps format'; + $data = [$varName]; + $phpcsFile->addError($error, $stackPtr, 'StringVarNotCamelCaps', $data); + } else if (preg_match('|\d|', $varName) === 1) { + $warning = 'Variable "%s" contains numbers but this is discouraged'; + $data = [$varName]; + $phpcsFile->addWarning($warning, $stackPtr, 'StringVarContainsNumbers', $data); + } + }//end foreach + }//end if + + }//end processVariableInString() + + +}//end class diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/Zend/Tests/Debug/CodeAnalyzerUnitTest.inc b/vendor/squizlabs/php_codesniffer/src/Standards/Zend/Tests/Debug/CodeAnalyzerUnitTest.inc new file mode 100644 index 00000000..c8d0499d --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/Zend/Tests/Debug/CodeAnalyzerUnitTest.inc @@ -0,0 +1,6 @@ + diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/Zend/Tests/Debug/CodeAnalyzerUnitTest.php b/vendor/squizlabs/php_codesniffer/src/Standards/Zend/Tests/Debug/CodeAnalyzerUnitTest.php new file mode 100644 index 00000000..efd3b900 --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/Zend/Tests/Debug/CodeAnalyzerUnitTest.php @@ -0,0 +1,66 @@ + + * @copyright 2006-2015 Squiz Pty Ltd (ABN 77 084 670 600) + * @license https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence + */ + +namespace PHP_CodeSniffer\Standards\Zend\Tests\Debug; + +use PHP_CodeSniffer\Tests\Standards\AbstractSniffUnitTest; +use PHP_CodeSniffer\Config; + +class CodeAnalyzerUnitTest extends AbstractSniffUnitTest +{ + + + /** + * Should this test be skipped for some reason. + * + * @return void + */ + protected function shouldSkipTest() + { + $analyzerPath = Config::getExecutablePath('zend_ca'); + if ($analyzerPath === null) { + return true; + } + + return false; + + }//end shouldSkipTest() + + + /** + * Returns the lines where errors should occur. + * + * The key of the array should represent the line number and the value + * should represent the number of errors that should occur on that line. + * + * @return array + */ + public function getErrorList() + { + return []; + + }//end getErrorList() + + + /** + * Returns the lines where warnings should occur. + * + * The key of the array should represent the line number and the value + * should represent the number of warnings that should occur on that line. + * + * @return array + */ + public function getWarningList() + { + return [2 => 1]; + + }//end getWarningList() + + +}//end class diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/Zend/Tests/Files/ClosingTagUnitTest.1.inc b/vendor/squizlabs/php_codesniffer/src/Standards/Zend/Tests/Files/ClosingTagUnitTest.1.inc new file mode 100644 index 00000000..7e7089dc --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/Zend/Tests/Files/ClosingTagUnitTest.1.inc @@ -0,0 +1,12 @@ + + + + diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/Zend/Tests/Files/ClosingTagUnitTest.1.inc.fixed b/vendor/squizlabs/php_codesniffer/src/Standards/Zend/Tests/Files/ClosingTagUnitTest.1.inc.fixed new file mode 100644 index 00000000..caf3b38e --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/Zend/Tests/Files/ClosingTagUnitTest.1.inc.fixed @@ -0,0 +1,12 @@ + + + + + diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/Zend/Tests/Files/ClosingTagUnitTest.3.inc b/vendor/squizlabs/php_codesniffer/src/Standards/Zend/Tests/Files/ClosingTagUnitTest.3.inc new file mode 100644 index 00000000..63df04d5 --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/Zend/Tests/Files/ClosingTagUnitTest.3.inc @@ -0,0 +1 @@ +add('arg'))?> diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/Zend/Tests/Files/ClosingTagUnitTest.3.inc.fixed b/vendor/squizlabs/php_codesniffer/src/Standards/Zend/Tests/Files/ClosingTagUnitTest.3.inc.fixed new file mode 100644 index 00000000..b4c46219 --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/Zend/Tests/Files/ClosingTagUnitTest.3.inc.fixed @@ -0,0 +1 @@ +add('arg')); diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/Zend/Tests/Files/ClosingTagUnitTest.4.inc b/vendor/squizlabs/php_codesniffer/src/Standards/Zend/Tests/Files/ClosingTagUnitTest.4.inc new file mode 100644 index 00000000..539365da --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/Zend/Tests/Files/ClosingTagUnitTest.4.inc @@ -0,0 +1 @@ +add('arg')) /* comment */ ?> diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/Zend/Tests/Files/ClosingTagUnitTest.4.inc.fixed b/vendor/squizlabs/php_codesniffer/src/Standards/Zend/Tests/Files/ClosingTagUnitTest.4.inc.fixed new file mode 100644 index 00000000..4cc31a51 --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/Zend/Tests/Files/ClosingTagUnitTest.4.inc.fixed @@ -0,0 +1 @@ +add('arg')); /* comment */ diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/Zend/Tests/Files/ClosingTagUnitTest.5.inc b/vendor/squizlabs/php_codesniffer/src/Standards/Zend/Tests/Files/ClosingTagUnitTest.5.inc new file mode 100644 index 00000000..09e48440 --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/Zend/Tests/Files/ClosingTagUnitTest.5.inc @@ -0,0 +1 @@ +add('arg')); } ?> diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/Zend/Tests/Files/ClosingTagUnitTest.5.inc.fixed b/vendor/squizlabs/php_codesniffer/src/Standards/Zend/Tests/Files/ClosingTagUnitTest.5.inc.fixed new file mode 100644 index 00000000..9ff112a4 --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/Zend/Tests/Files/ClosingTagUnitTest.5.inc.fixed @@ -0,0 +1 @@ +add('arg')); } diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/Zend/Tests/Files/ClosingTagUnitTest.6.inc b/vendor/squizlabs/php_codesniffer/src/Standards/Zend/Tests/Files/ClosingTagUnitTest.6.inc new file mode 100644 index 00000000..48de7e03 --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/Zend/Tests/Files/ClosingTagUnitTest.6.inc @@ -0,0 +1,3 @@ + diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/Zend/Tests/Files/ClosingTagUnitTest.6.inc.fixed b/vendor/squizlabs/php_codesniffer/src/Standards/Zend/Tests/Files/ClosingTagUnitTest.6.inc.fixed new file mode 100644 index 00000000..796727a8 --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/Zend/Tests/Files/ClosingTagUnitTest.6.inc.fixed @@ -0,0 +1,3 @@ + diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/Zend/Tests/Files/ClosingTagUnitTest.7.inc.fixed b/vendor/squizlabs/php_codesniffer/src/Standards/Zend/Tests/Files/ClosingTagUnitTest.7.inc.fixed new file mode 100644 index 00000000..dc84e23e --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/Zend/Tests/Files/ClosingTagUnitTest.7.inc.fixed @@ -0,0 +1 @@ + + * @copyright 2006-2015 Squiz Pty Ltd (ABN 77 084 670 600) + * @license https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence + */ + +namespace PHP_CodeSniffer\Standards\Zend\Tests\Files; + +use PHP_CodeSniffer\Tests\Standards\AbstractSniffUnitTest; + +class ClosingTagUnitTest extends AbstractSniffUnitTest +{ + + + /** + * Returns the lines where errors should occur. + * + * The key of the array should represent the line number and the value + * should represent the number of errors that should occur on that line. + * + * @param string $testFile The name of the file being tested. + * + * @return array + */ + public function getErrorList($testFile='') + { + switch ($testFile) { + case 'ClosingTagUnitTest.1.inc': + return [11 => 1]; + + case 'ClosingTagUnitTest.3.inc': + case 'ClosingTagUnitTest.4.inc': + case 'ClosingTagUnitTest.5.inc': + case 'ClosingTagUnitTest.7.inc': + return [1 => 1]; + + case 'ClosingTagUnitTest.6.inc': + return [3 => 1]; + + default: + return []; + } + + }//end getErrorList() + + + /** + * Returns the lines where warnings should occur. + * + * The key of the array should represent the line number and the value + * should represent the number of warnings that should occur on that line. + * + * @return array + */ + public function getWarningList() + { + return []; + + }//end getWarningList() + + +}//end class diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/Zend/Tests/NamingConventions/ValidVariableNameUnitTest.inc b/vendor/squizlabs/php_codesniffer/src/Standards/Zend/Tests/NamingConventions/ValidVariableNameUnitTest.inc new file mode 100644 index 00000000..8ed8509d --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/Zend/Tests/NamingConventions/ValidVariableNameUnitTest.inc @@ -0,0 +1,122 @@ +varName; +echo $this->var_name; +echo $this->varname; +echo $this->_varName; +echo $this->varName2; +echo $object->varName; +echo $object->var_name; +echo $object->varName2; +echo $object_name->varname; +echo $object_name->_varName; +echo $object_name->varName2; + +echo $this->myFunction($one, $two); +echo $object->myFunction($one_two, $var2); + +$error = "format is \$GLOBALS['$varName']"; +$error = "format is \$GLOBALS['$varName2']"; + +echo $_SESSION['var_name']; +echo $_FILES['var_name']; +echo $_ENV['var_name']; +echo $_COOKIE['var_name']; +echo $_COOKIE['var_name2']; + +$XML = 'hello'; +$myXML = 'hello'; +$XMLParser = 'hello'; +$xmlParser = 'hello'; +$xmlParser2 = 'hello'; + +echo "{$_SERVER['HOSTNAME']} $var_name"; + +$someObject->{$name}; +$someObject->my_function($var_name); + +var_dump($http_response_header); +var_dump($HTTP_RAW_POST_DATA); +var_dump($php_errormsg); + +interface Base +{ + protected $anonymous; + + public function __construct(); +} + +$anonClass = new class() { + public function foo($foo, $_foo, $foo_bar) { + $bar = 1; + $_bar = 2; + $bar_foo = 3; + } +}; + +echo $obj?->varName; +echo $obj?->var_name; +echo $obj?->varName; diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/Zend/Tests/NamingConventions/ValidVariableNameUnitTest.php b/vendor/squizlabs/php_codesniffer/src/Standards/Zend/Tests/NamingConventions/ValidVariableNameUnitTest.php new file mode 100644 index 00000000..916b334f --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/Zend/Tests/NamingConventions/ValidVariableNameUnitTest.php @@ -0,0 +1,94 @@ + + * @copyright 2006-2015 Squiz Pty Ltd (ABN 77 084 670 600) + * @license https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence + */ + +namespace PHP_CodeSniffer\Standards\Zend\Tests\NamingConventions; + +use PHP_CodeSniffer\Tests\Standards\AbstractSniffUnitTest; + +class ValidVariableNameUnitTest extends AbstractSniffUnitTest +{ + + + /** + * Returns the lines where errors should occur. + * + * The key of the array should represent the line number and the value + * should represent the number of errors that should occur on that line. + * + * @return array + */ + public function getErrorList() + { + return [ + 3 => 1, + 5 => 1, + 11 => 1, + 13 => 1, + 17 => 1, + 19 => 1, + 23 => 1, + 25 => 1, + 29 => 1, + 31 => 1, + 36 => 1, + 38 => 1, + 42 => 1, + 44 => 1, + 48 => 1, + 50 => 1, + 61 => 1, + 67 => 1, + 72 => 1, + 74 => 1, + 75 => 1, + 76 => 1, + 79 => 1, + 96 => 1, + 99 => 1, + 113 => 1, + 116 => 1, + 121 => 1, + ]; + + }//end getErrorList() + + + /** + * Returns the lines where warnings should occur. + * + * The key of the array should represent the line number and the value + * should represent the number of warnings that should occur on that line. + * + * @return array + */ + public function getWarningList() + { + return [ + 6 => 1, + 14 => 1, + 20 => 1, + 26 => 1, + 32 => 1, + 39 => 1, + 45 => 1, + 51 => 1, + 64 => 1, + 70 => 1, + 73 => 1, + 76 => 1, + 79 => 1, + 82 => 1, + 94 => 1, + 107 => 1, + ]; + + }//end getWarningList() + + +}//end class diff --git a/vendor/squizlabs/php_codesniffer/src/Standards/Zend/ruleset.xml b/vendor/squizlabs/php_codesniffer/src/Standards/Zend/ruleset.xml new file mode 100644 index 00000000..d10b1039 --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Standards/Zend/ruleset.xml @@ -0,0 +1,32 @@ + + + A coding standard based on an early Zend Framework coding standard. Note that this standard is out of date. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/vendor/squizlabs/php_codesniffer/src/Tokenizers/CSS.php b/vendor/squizlabs/php_codesniffer/src/Tokenizers/CSS.php new file mode 100644 index 00000000..b7c2018b --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Tokenizers/CSS.php @@ -0,0 +1,537 @@ + + * @copyright 2006-2015 Squiz Pty Ltd (ABN 77 084 670 600) + * @license https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence + */ + +namespace PHP_CodeSniffer\Tokenizers; + +use PHP_CodeSniffer\Config; +use PHP_CodeSniffer\Exceptions\TokenizerException; +use PHP_CodeSniffer\Util; + +class CSS extends PHP +{ + + + /** + * Initialise the tokenizer. + * + * Pre-checks the content to see if it looks minified. + * + * @param string $content The content to tokenize, + * @param \PHP_CodeSniffer\Config $config The config data for the run. + * @param string $eolChar The EOL char used in the content. + * + * @return void + * @throws \PHP_CodeSniffer\Exceptions\TokenizerException If the file appears to be minified. + */ + public function __construct($content, Config $config, $eolChar='\n') + { + if ($this->isMinifiedContent($content, $eolChar) === true) { + throw new TokenizerException('File appears to be minified and cannot be processed'); + } + + parent::__construct($content, $config, $eolChar); + + }//end __construct() + + + /** + * Creates an array of tokens when given some CSS code. + * + * Uses the PHP tokenizer to do all the tricky work + * + * @param string $string The string to tokenize. + * + * @return array + */ + public function tokenize($string) + { + if (PHP_CODESNIFFER_VERBOSITY > 1) { + echo "\t*** START CSS TOKENIZING 1ST PASS ***".PHP_EOL; + } + + // If the content doesn't have an EOL char on the end, add one so + // the open and close tags we add are parsed correctly. + $eolAdded = false; + if (substr($string, (strlen($this->eolChar) * -1)) !== $this->eolChar) { + $string .= $this->eolChar; + $eolAdded = true; + } + + $string = str_replace('', '^PHPCS_CSS_T_CLOSE_TAG^', $string); + $tokens = parent::tokenize(''); + + $finalTokens = []; + $finalTokens[0] = [ + 'code' => T_OPEN_TAG, + 'type' => 'T_OPEN_TAG', + 'content' => '', + ]; + + $newStackPtr = 1; + $numTokens = count($tokens); + $multiLineComment = false; + for ($stackPtr = 1; $stackPtr < $numTokens; $stackPtr++) { + $token = $tokens[$stackPtr]; + + // CSS files don't have lists, breaks etc, so convert these to + // standard strings early so they can be converted into T_STYLE + // tokens and joined with other strings if needed. + if ($token['code'] === T_BREAK + || $token['code'] === T_LIST + || $token['code'] === T_DEFAULT + || $token['code'] === T_SWITCH + || $token['code'] === T_FOR + || $token['code'] === T_FOREACH + || $token['code'] === T_WHILE + || $token['code'] === T_DEC + || $token['code'] === T_NEW + ) { + $token['type'] = 'T_STRING'; + $token['code'] = T_STRING; + } + + $token['content'] = str_replace('^PHPCS_CSS_T_OPEN_TAG^', '', $token['content']); + + if (PHP_CODESNIFFER_VERBOSITY > 1) { + $type = $token['type']; + $content = Util\Common::prepareForOutput($token['content']); + echo "\tProcess token $stackPtr: $type => $content".PHP_EOL; + } + + if ($token['code'] === T_BITWISE_XOR + && $tokens[($stackPtr + 1)]['content'] === 'PHPCS_CSS_T_OPEN_TAG' + ) { + $content = ''; + $stackPtr += 2; + break; + } else { + $content .= $tokens[$stackPtr]['content']; + } + } + + if (PHP_CODESNIFFER_VERBOSITY > 1) { + echo "\t\t=> Found embedded PHP code: "; + $cleanContent = Util\Common::prepareForOutput($content); + echo $cleanContent.PHP_EOL; + } + + $finalTokens[$newStackPtr] = [ + 'type' => 'T_EMBEDDED_PHP', + 'code' => T_EMBEDDED_PHP, + 'content' => $content, + ]; + + $newStackPtr++; + continue; + }//end if + + if ($token['code'] === T_GOTO_LABEL) { + // Convert these back to T_STRING followed by T_COLON so we can + // more easily process style definitions. + $finalTokens[$newStackPtr] = [ + 'type' => 'T_STRING', + 'code' => T_STRING, + 'content' => substr($token['content'], 0, -1), + ]; + $newStackPtr++; + $finalTokens[$newStackPtr] = [ + 'type' => 'T_COLON', + 'code' => T_COLON, + 'content' => ':', + ]; + $newStackPtr++; + continue; + } + + if ($token['code'] === T_FUNCTION) { + // There are no functions in CSS, so convert this to a string. + $finalTokens[$newStackPtr] = [ + 'type' => 'T_STRING', + 'code' => T_STRING, + 'content' => $token['content'], + ]; + + $newStackPtr++; + continue; + } + + if ($token['code'] === T_COMMENT + && substr($token['content'], 0, 2) === '/*' + ) { + // Multi-line comment. Record it so we can ignore other + // comment tags until we get out of this one. + $multiLineComment = true; + } + + if ($token['code'] === T_COMMENT + && $multiLineComment === false + && (substr($token['content'], 0, 2) === '//' + || $token['content'][0] === '#') + ) { + $content = ltrim($token['content'], '#/'); + + // Guard against PHP7+ syntax errors by stripping + // leading zeros so the content doesn't look like an invalid int. + $leadingZero = false; + if ($content[0] === '0') { + $content = '1'.$content; + $leadingZero = true; + } + + $commentTokens = parent::tokenize(''); + + // The first and last tokens are the open/close tags. + array_shift($commentTokens); + array_pop($commentTokens); + + if ($leadingZero === true) { + $commentTokens[0]['content'] = substr($commentTokens[0]['content'], 1); + $content = substr($content, 1); + } + + if ($token['content'][0] === '#') { + // The # character is not a comment in CSS files, so + // determine what it means in this context. + $firstContent = $commentTokens[0]['content']; + + // If the first content is just a number, it is probably a + // colour like 8FB7DB, which PHP splits into 8 and FB7DB. + if (($commentTokens[0]['code'] === T_LNUMBER + || $commentTokens[0]['code'] === T_DNUMBER) + && $commentTokens[1]['code'] === T_STRING + ) { + $firstContent .= $commentTokens[1]['content']; + array_shift($commentTokens); + } + + // If the first content looks like a colour and not a class + // definition, join the tokens together. + if (preg_match('/^[ABCDEF0-9]+$/i', $firstContent) === 1 + && $commentTokens[1]['content'] !== '-' + ) { + array_shift($commentTokens); + // Work out what we trimmed off above and remember to re-add it. + $trimmed = substr($token['content'], 0, (strlen($token['content']) - strlen($content))); + $finalTokens[$newStackPtr] = [ + 'type' => 'T_COLOUR', + 'code' => T_COLOUR, + 'content' => $trimmed.$firstContent, + ]; + } else { + $finalTokens[$newStackPtr] = [ + 'type' => 'T_HASH', + 'code' => T_HASH, + 'content' => '#', + ]; + } + } else { + $finalTokens[$newStackPtr] = [ + 'type' => 'T_STRING', + 'code' => T_STRING, + 'content' => '//', + ]; + }//end if + + $newStackPtr++; + + array_splice($tokens, $stackPtr, 1, $commentTokens); + $numTokens = count($tokens); + $stackPtr--; + continue; + }//end if + + if ($token['code'] === T_COMMENT + && substr($token['content'], -2) === '*/' + ) { + // Multi-line comment is done. + $multiLineComment = false; + } + + $finalTokens[$newStackPtr] = $token; + $newStackPtr++; + }//end for + + if (PHP_CODESNIFFER_VERBOSITY > 1) { + echo "\t*** END CSS TOKENIZING 1ST PASS ***".PHP_EOL; + echo "\t*** START CSS TOKENIZING 2ND PASS ***".PHP_EOL; + } + + // A flag to indicate if we are inside a style definition, + // which is defined using curly braces. + $inStyleDef = false; + + // A flag to indicate if an At-rule like "@media" is used, which will result + // in nested curly brackets. + $asperandStart = false; + + $numTokens = count($finalTokens); + for ($stackPtr = 0; $stackPtr < $numTokens; $stackPtr++) { + $token = $finalTokens[$stackPtr]; + + if (PHP_CODESNIFFER_VERBOSITY > 1) { + $type = $token['type']; + $content = Util\Common::prepareForOutput($token['content']); + echo "\tProcess token $stackPtr: $type => $content".PHP_EOL; + } + + switch ($token['code']) { + case T_OPEN_CURLY_BRACKET: + // Opening curly brackets for an At-rule do not start a style + // definition. We also reset the asperand flag here because the next + // opening curly bracket could be indeed the start of a style + // definition. + if ($asperandStart === true) { + if (PHP_CODESNIFFER_VERBOSITY > 1) { + if ($inStyleDef === true) { + echo "\t\t* style definition closed *".PHP_EOL; + } + + if ($asperandStart === true) { + echo "\t\t* at-rule definition closed *".PHP_EOL; + } + } + + $inStyleDef = false; + $asperandStart = false; + } else { + $inStyleDef = true; + if (PHP_CODESNIFFER_VERBOSITY > 1) { + echo "\t\t* style definition opened *".PHP_EOL; + } + } + break; + case T_CLOSE_CURLY_BRACKET: + if (PHP_CODESNIFFER_VERBOSITY > 1) { + if ($inStyleDef === true) { + echo "\t\t* style definition closed *".PHP_EOL; + } + + if ($asperandStart === true) { + echo "\t\t* at-rule definition closed *".PHP_EOL; + } + } + + $inStyleDef = false; + $asperandStart = false; + break; + case T_MINUS: + // Minus signs are often used instead of spaces inside + // class names, IDs and styles. + if ($finalTokens[($stackPtr + 1)]['code'] === T_STRING) { + if ($finalTokens[($stackPtr - 1)]['code'] === T_STRING) { + $newContent = $finalTokens[($stackPtr - 1)]['content'].'-'.$finalTokens[($stackPtr + 1)]['content']; + + if (PHP_CODESNIFFER_VERBOSITY > 1) { + echo "\t\t* token is a string joiner; ignoring this and previous token".PHP_EOL; + $old = Util\Common::prepareForOutput($finalTokens[($stackPtr + 1)]['content']); + $new = Util\Common::prepareForOutput($newContent); + echo "\t\t=> token ".($stackPtr + 1)." content changed from \"$old\" to \"$new\"".PHP_EOL; + } + + $finalTokens[($stackPtr + 1)]['content'] = $newContent; + unset($finalTokens[$stackPtr]); + unset($finalTokens[($stackPtr - 1)]); + } else { + $newContent = '-'.$finalTokens[($stackPtr + 1)]['content']; + + $finalTokens[($stackPtr + 1)]['content'] = $newContent; + unset($finalTokens[$stackPtr]); + } + } else if ($finalTokens[($stackPtr + 1)]['code'] === T_LNUMBER) { + // They can also be used to provide negative numbers. + if (PHP_CODESNIFFER_VERBOSITY > 1) { + echo "\t\t* token is part of a negative number; adding content to next token and ignoring *".PHP_EOL; + $content = Util\Common::prepareForOutput($finalTokens[($stackPtr + 1)]['content']); + echo "\t\t=> token ".($stackPtr + 1)." content changed from \"$content\" to \"-$content\"".PHP_EOL; + } + + $finalTokens[($stackPtr + 1)]['content'] = '-'.$finalTokens[($stackPtr + 1)]['content']; + unset($finalTokens[$stackPtr]); + }//end if + break; + case T_COLON: + // Only interested in colons that are defining styles. + if ($inStyleDef === false) { + break; + } + + for ($x = ($stackPtr - 1); $x >= 0; $x--) { + if (isset(Util\Tokens::$emptyTokens[$finalTokens[$x]['code']]) === false) { + break; + } + } + + if (PHP_CODESNIFFER_VERBOSITY > 1) { + $type = $finalTokens[$x]['type']; + echo "\t\t=> token $x changed from $type to T_STYLE".PHP_EOL; + } + + $finalTokens[$x]['type'] = 'T_STYLE'; + $finalTokens[$x]['code'] = T_STYLE; + break; + case T_STRING: + if (strtolower($token['content']) === 'url') { + // Find the next content. + for ($x = ($stackPtr + 1); $x < $numTokens; $x++) { + if (isset(Util\Tokens::$emptyTokens[$finalTokens[$x]['code']]) === false) { + break; + } + } + + // Needs to be in the format "url(" for it to be a URL. + if ($finalTokens[$x]['code'] !== T_OPEN_PARENTHESIS) { + continue 2; + } + + // Make sure the content isn't empty. + for ($y = ($x + 1); $y < $numTokens; $y++) { + if (isset(Util\Tokens::$emptyTokens[$finalTokens[$y]['code']]) === false) { + break; + } + } + + if ($finalTokens[$y]['code'] === T_CLOSE_PARENTHESIS) { + continue 2; + } + + if (PHP_CODESNIFFER_VERBOSITY > 1) { + for ($i = ($stackPtr + 1); $i <= $y; $i++) { + $type = $finalTokens[$i]['type']; + $content = Util\Common::prepareForOutput($finalTokens[$i]['content']); + echo "\tProcess token $i: $type => $content".PHP_EOL; + } + + echo "\t\t* token starts a URL *".PHP_EOL; + } + + // Join all the content together inside the url() statement. + $newContent = ''; + for ($i = ($x + 2); $i < $numTokens; $i++) { + if ($finalTokens[$i]['code'] === T_CLOSE_PARENTHESIS) { + break; + } + + $newContent .= $finalTokens[$i]['content']; + if (PHP_CODESNIFFER_VERBOSITY > 1) { + $content = Util\Common::prepareForOutput($finalTokens[$i]['content']); + echo "\t\t=> token $i added to URL string and ignored: $content".PHP_EOL; + } + + unset($finalTokens[$i]); + } + + $stackPtr = $i; + + // If the content inside the "url()" is in double quotes + // there will only be one token and so we don't have to do + // anything except change its type. If it is not empty, + // we need to do some token merging. + $finalTokens[($x + 1)]['type'] = 'T_URL'; + $finalTokens[($x + 1)]['code'] = T_URL; + + if ($newContent !== '') { + $finalTokens[($x + 1)]['content'] .= $newContent; + if (PHP_CODESNIFFER_VERBOSITY > 1) { + $content = Util\Common::prepareForOutput($finalTokens[($x + 1)]['content']); + echo "\t\t=> token content changed to: $content".PHP_EOL; + } + } + } else if ($finalTokens[$stackPtr]['content'][0] === '-' + && $finalTokens[($stackPtr + 1)]['code'] === T_STRING + ) { + if (isset($finalTokens[($stackPtr - 1)]) === true + && $finalTokens[($stackPtr - 1)]['code'] === T_STRING + ) { + $newContent = $finalTokens[($stackPtr - 1)]['content'].$finalTokens[$stackPtr]['content'].$finalTokens[($stackPtr + 1)]['content']; + + if (PHP_CODESNIFFER_VERBOSITY > 1) { + echo "\t\t* token is a string joiner; ignoring this and previous token".PHP_EOL; + $old = Util\Common::prepareForOutput($finalTokens[($stackPtr + 1)]['content']); + $new = Util\Common::prepareForOutput($newContent); + echo "\t\t=> token ".($stackPtr + 1)." content changed from \"$old\" to \"$new\"".PHP_EOL; + } + + $finalTokens[($stackPtr + 1)]['content'] = $newContent; + unset($finalTokens[$stackPtr]); + unset($finalTokens[($stackPtr - 1)]); + } else { + $newContent = $finalTokens[$stackPtr]['content'].$finalTokens[($stackPtr + 1)]['content']; + + $finalTokens[($stackPtr + 1)]['content'] = $newContent; + unset($finalTokens[$stackPtr]); + } + }//end if + break; + case T_ASPERAND: + $asperandStart = true; + if (PHP_CODESNIFFER_VERBOSITY > 1) { + echo "\t\t* at-rule definition opened *".PHP_EOL; + } + break; + default: + // Nothing special to be done with this token. + break; + }//end switch + }//end for + + // Reset the array keys to avoid gaps. + $finalTokens = array_values($finalTokens); + $numTokens = count($finalTokens); + + // Blank out the content of the end tag. + $finalTokens[($numTokens - 1)]['content'] = ''; + + if ($eolAdded === true) { + // Strip off the extra EOL char we added for tokenizing. + $finalTokens[($numTokens - 2)]['content'] = substr( + $finalTokens[($numTokens - 2)]['content'], + 0, + (strlen($this->eolChar) * -1) + ); + + if ($finalTokens[($numTokens - 2)]['content'] === '') { + unset($finalTokens[($numTokens - 2)]); + $finalTokens = array_values($finalTokens); + $numTokens = count($finalTokens); + } + } + + if (PHP_CODESNIFFER_VERBOSITY > 1) { + echo "\t*** END CSS TOKENIZING 2ND PASS ***".PHP_EOL; + } + + return $finalTokens; + + }//end tokenize() + + + /** + * Performs additional processing after main tokenizing. + * + * @return void + */ + public function processAdditional() + { + /* + We override this method because we don't want the PHP version to + run during CSS processing because it is wasted processing time. + */ + + }//end processAdditional() + + +}//end class diff --git a/vendor/squizlabs/php_codesniffer/src/Tokenizers/Comment.php b/vendor/squizlabs/php_codesniffer/src/Tokenizers/Comment.php new file mode 100644 index 00000000..beba53c2 --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Tokenizers/Comment.php @@ -0,0 +1,277 @@ + + * @copyright 2006-2015 Squiz Pty Ltd (ABN 77 084 670 600) + * @license https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence + */ + +namespace PHP_CodeSniffer\Tokenizers; + +use PHP_CodeSniffer\Util; + +class Comment +{ + + + /** + * Creates an array of tokens when given some PHP code. + * + * Starts by using token_get_all() but does a lot of extra processing + * to insert information about the context of the token. + * + * @param string $string The string to tokenize. + * @param string $eolChar The EOL character to use for splitting strings. + * @param int $stackPtr The position of the first token in the file. + * + * @return array + */ + public function tokenizeString($string, $eolChar, $stackPtr) + { + if (PHP_CODESNIFFER_VERBOSITY > 1) { + echo "\t\t*** START COMMENT TOKENIZING ***".PHP_EOL; + } + + $tokens = []; + $numChars = strlen($string); + + /* + Doc block comments start with /*, but typically contain an + extra star when they are used for function and class comments. + */ + + $char = ($numChars - strlen(ltrim($string, '/*'))); + $openTag = substr($string, 0, $char); + $string = ltrim($string, '/*'); + + $tokens[$stackPtr] = [ + 'content' => $openTag, + 'code' => T_DOC_COMMENT_OPEN_TAG, + 'type' => 'T_DOC_COMMENT_OPEN_TAG', + 'comment_tags' => [], + ]; + + $openPtr = $stackPtr; + $stackPtr++; + + if (PHP_CODESNIFFER_VERBOSITY > 1) { + $content = Util\Common::prepareForOutput($openTag); + echo "\t\tCreate comment token: T_DOC_COMMENT_OPEN_TAG => $content".PHP_EOL; + } + + /* + Strip off the close tag so it doesn't interfere with any + of our comment line processing. The token will be added to the + stack just before we return it. + */ + + $closeTag = [ + 'content' => substr($string, strlen(rtrim($string, '/*'))), + 'code' => T_DOC_COMMENT_CLOSE_TAG, + 'type' => 'T_DOC_COMMENT_CLOSE_TAG', + 'comment_opener' => $openPtr, + ]; + + if ($closeTag['content'] === false) { + $closeTag['content'] = ''; + } + + $string = rtrim($string, '/*'); + + /* + Process each line of the comment. + */ + + $lines = explode($eolChar, $string); + $numLines = count($lines); + foreach ($lines as $lineNum => $string) { + if ($lineNum !== ($numLines - 1)) { + $string .= $eolChar; + } + + $char = 0; + $numChars = strlen($string); + + // We've started a new line, so process the indent. + $space = $this->collectWhitespace($string, $char, $numChars); + if ($space !== null) { + $tokens[$stackPtr] = $space; + $stackPtr++; + if (PHP_CODESNIFFER_VERBOSITY > 1) { + $content = Util\Common::prepareForOutput($space['content']); + echo "\t\tCreate comment token: T_DOC_COMMENT_WHITESPACE => $content".PHP_EOL; + } + + $char += strlen($space['content']); + if ($char === $numChars) { + break; + } + } + + if ($string === '') { + continue; + } + + if ($lineNum > 0 && $string[$char] === '*') { + // This is a function or class doc block line. + $char++; + $tokens[$stackPtr] = [ + 'content' => '*', + 'code' => T_DOC_COMMENT_STAR, + 'type' => 'T_DOC_COMMENT_STAR', + ]; + + $stackPtr++; + + if (PHP_CODESNIFFER_VERBOSITY > 1) { + echo "\t\tCreate comment token: T_DOC_COMMENT_STAR => *".PHP_EOL; + } + } + + // Now we are ready to process the actual content of the line. + $lineTokens = $this->processLine($string, $eolChar, $char, $numChars); + foreach ($lineTokens as $lineToken) { + $tokens[$stackPtr] = $lineToken; + if (PHP_CODESNIFFER_VERBOSITY > 1) { + $content = Util\Common::prepareForOutput($lineToken['content']); + $type = $lineToken['type']; + echo "\t\tCreate comment token: $type => $content".PHP_EOL; + } + + if ($lineToken['code'] === T_DOC_COMMENT_TAG) { + $tokens[$openPtr]['comment_tags'][] = $stackPtr; + } + + $stackPtr++; + } + }//end foreach + + $tokens[$stackPtr] = $closeTag; + $tokens[$openPtr]['comment_closer'] = $stackPtr; + if (PHP_CODESNIFFER_VERBOSITY > 1) { + $content = Util\Common::prepareForOutput($closeTag['content']); + echo "\t\tCreate comment token: T_DOC_COMMENT_CLOSE_TAG => $content".PHP_EOL; + } + + if (PHP_CODESNIFFER_VERBOSITY > 1) { + echo "\t\t*** END COMMENT TOKENIZING ***".PHP_EOL; + } + + return $tokens; + + }//end tokenizeString() + + + /** + * Process a single line of a comment. + * + * @param string $string The comment string being tokenized. + * @param string $eolChar The EOL character to use for splitting strings. + * @param int $start The position in the string to start processing. + * @param int $end The position in the string to end processing. + * + * @return array + */ + private function processLine($string, $eolChar, $start, $end) + { + $tokens = []; + + // Collect content padding. + $space = $this->collectWhitespace($string, $start, $end); + if ($space !== null) { + $tokens[] = $space; + $start += strlen($space['content']); + } + + if (isset($string[$start]) === false) { + return $tokens; + } + + if ($string[$start] === '@') { + // The content up until the first whitespace is the tag name. + $matches = []; + preg_match('/@[^\s]+/', $string, $matches, 0, $start); + if (isset($matches[0]) === true + && substr(strtolower($matches[0]), 0, 7) !== '@phpcs:' + ) { + $tagName = $matches[0]; + $start += strlen($tagName); + $tokens[] = [ + 'content' => $tagName, + 'code' => T_DOC_COMMENT_TAG, + 'type' => 'T_DOC_COMMENT_TAG', + ]; + + // Then there will be some whitespace. + $space = $this->collectWhitespace($string, $start, $end); + if ($space !== null) { + $tokens[] = $space; + $start += strlen($space['content']); + } + } + }//end if + + // Process the rest of the line. + $eol = strpos($string, $eolChar, $start); + if ($eol === false) { + $eol = $end; + } + + if ($eol > $start) { + $tokens[] = [ + 'content' => substr($string, $start, ($eol - $start)), + 'code' => T_DOC_COMMENT_STRING, + 'type' => 'T_DOC_COMMENT_STRING', + ]; + } + + if ($eol !== $end) { + $tokens[] = [ + 'content' => substr($string, $eol, strlen($eolChar)), + 'code' => T_DOC_COMMENT_WHITESPACE, + 'type' => 'T_DOC_COMMENT_WHITESPACE', + ]; + } + + return $tokens; + + }//end processLine() + + + /** + * Collect consecutive whitespace into a single token. + * + * @param string $string The comment string being tokenized. + * @param int $start The position in the string to start processing. + * @param int $end The position in the string to end processing. + * + * @return array|null + */ + private function collectWhitespace($string, $start, $end) + { + $space = ''; + for ($start; $start < $end; $start++) { + if ($string[$start] !== ' ' && $string[$start] !== "\t") { + break; + } + + $space .= $string[$start]; + } + + if ($space === '') { + return null; + } + + $token = [ + 'content' => $space, + 'code' => T_DOC_COMMENT_WHITESPACE, + 'type' => 'T_DOC_COMMENT_WHITESPACE', + ]; + + return $token; + + }//end collectWhitespace() + + +}//end class diff --git a/vendor/squizlabs/php_codesniffer/src/Tokenizers/JS.php b/vendor/squizlabs/php_codesniffer/src/Tokenizers/JS.php new file mode 100644 index 00000000..ee2f8429 --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Tokenizers/JS.php @@ -0,0 +1,1256 @@ + + * @copyright 2006-2015 Squiz Pty Ltd (ABN 77 084 670 600) + * @license https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence + */ + +namespace PHP_CodeSniffer\Tokenizers; + +use PHP_CodeSniffer\Config; +use PHP_CodeSniffer\Exceptions\TokenizerException; +use PHP_CodeSniffer\Util; + +class JS extends Tokenizer +{ + + /** + * A list of tokens that are allowed to open a scope. + * + * This array also contains information about what kind of token the scope + * opener uses to open and close the scope, if the token strictly requires + * an opener, if the token can share a scope closer, and who it can be shared + * with. An example of a token that shares a scope closer is a CASE scope. + * + * @var array + */ + public $scopeOpeners = [ + T_IF => [ + 'start' => [T_OPEN_CURLY_BRACKET => T_OPEN_CURLY_BRACKET], + 'end' => [T_CLOSE_CURLY_BRACKET => T_CLOSE_CURLY_BRACKET], + 'strict' => false, + 'shared' => false, + 'with' => [], + ], + T_TRY => [ + 'start' => [T_OPEN_CURLY_BRACKET => T_OPEN_CURLY_BRACKET], + 'end' => [T_CLOSE_CURLY_BRACKET => T_CLOSE_CURLY_BRACKET], + 'strict' => true, + 'shared' => false, + 'with' => [], + ], + T_CATCH => [ + 'start' => [T_OPEN_CURLY_BRACKET => T_OPEN_CURLY_BRACKET], + 'end' => [T_CLOSE_CURLY_BRACKET => T_CLOSE_CURLY_BRACKET], + 'strict' => true, + 'shared' => false, + 'with' => [], + ], + T_ELSE => [ + 'start' => [T_OPEN_CURLY_BRACKET => T_OPEN_CURLY_BRACKET], + 'end' => [T_CLOSE_CURLY_BRACKET => T_CLOSE_CURLY_BRACKET], + 'strict' => false, + 'shared' => false, + 'with' => [], + ], + T_FOR => [ + 'start' => [T_OPEN_CURLY_BRACKET => T_OPEN_CURLY_BRACKET], + 'end' => [T_CLOSE_CURLY_BRACKET => T_CLOSE_CURLY_BRACKET], + 'strict' => false, + 'shared' => false, + 'with' => [], + ], + T_CLASS => [ + 'start' => [T_OPEN_CURLY_BRACKET => T_OPEN_CURLY_BRACKET], + 'end' => [T_CLOSE_CURLY_BRACKET => T_CLOSE_CURLY_BRACKET], + 'strict' => true, + 'shared' => false, + 'with' => [], + ], + T_FUNCTION => [ + 'start' => [T_OPEN_CURLY_BRACKET => T_OPEN_CURLY_BRACKET], + 'end' => [T_CLOSE_CURLY_BRACKET => T_CLOSE_CURLY_BRACKET], + 'strict' => false, + 'shared' => false, + 'with' => [], + ], + T_WHILE => [ + 'start' => [T_OPEN_CURLY_BRACKET => T_OPEN_CURLY_BRACKET], + 'end' => [T_CLOSE_CURLY_BRACKET => T_CLOSE_CURLY_BRACKET], + 'strict' => false, + 'shared' => false, + 'with' => [], + ], + T_DO => [ + 'start' => [T_OPEN_CURLY_BRACKET => T_OPEN_CURLY_BRACKET], + 'end' => [T_CLOSE_CURLY_BRACKET => T_CLOSE_CURLY_BRACKET], + 'strict' => true, + 'shared' => false, + 'with' => [], + ], + T_SWITCH => [ + 'start' => [T_OPEN_CURLY_BRACKET => T_OPEN_CURLY_BRACKET], + 'end' => [T_CLOSE_CURLY_BRACKET => T_CLOSE_CURLY_BRACKET], + 'strict' => true, + 'shared' => false, + 'with' => [], + ], + T_CASE => [ + 'start' => [T_COLON => T_COLON], + 'end' => [ + T_BREAK => T_BREAK, + T_RETURN => T_RETURN, + T_CONTINUE => T_CONTINUE, + T_THROW => T_THROW, + ], + 'strict' => true, + 'shared' => true, + 'with' => [ + T_DEFAULT => T_DEFAULT, + T_CASE => T_CASE, + T_SWITCH => T_SWITCH, + ], + ], + T_DEFAULT => [ + 'start' => [T_COLON => T_COLON], + 'end' => [ + T_BREAK => T_BREAK, + T_RETURN => T_RETURN, + T_CONTINUE => T_CONTINUE, + T_THROW => T_THROW, + ], + 'strict' => true, + 'shared' => true, + 'with' => [ + T_CASE => T_CASE, + T_SWITCH => T_SWITCH, + ], + ], + ]; + + /** + * A list of tokens that end the scope. + * + * This array is just a unique collection of the end tokens + * from the _scopeOpeners array. The data is duplicated here to + * save time during parsing of the file. + * + * @var array + */ + public $endScopeTokens = [ + T_CLOSE_CURLY_BRACKET => T_CLOSE_CURLY_BRACKET, + T_BREAK => T_BREAK, + ]; + + /** + * A list of special JS tokens and their types. + * + * @var array + */ + protected $tokenValues = [ + 'class' => 'T_CLASS', + 'function' => 'T_FUNCTION', + 'prototype' => 'T_PROTOTYPE', + 'try' => 'T_TRY', + 'catch' => 'T_CATCH', + 'return' => 'T_RETURN', + 'throw' => 'T_THROW', + 'break' => 'T_BREAK', + 'switch' => 'T_SWITCH', + 'continue' => 'T_CONTINUE', + 'if' => 'T_IF', + 'else' => 'T_ELSE', + 'do' => 'T_DO', + 'while' => 'T_WHILE', + 'for' => 'T_FOR', + 'var' => 'T_VAR', + 'case' => 'T_CASE', + 'default' => 'T_DEFAULT', + 'true' => 'T_TRUE', + 'false' => 'T_FALSE', + 'null' => 'T_NULL', + 'this' => 'T_THIS', + 'typeof' => 'T_TYPEOF', + '(' => 'T_OPEN_PARENTHESIS', + ')' => 'T_CLOSE_PARENTHESIS', + '{' => 'T_OPEN_CURLY_BRACKET', + '}' => 'T_CLOSE_CURLY_BRACKET', + '[' => 'T_OPEN_SQUARE_BRACKET', + ']' => 'T_CLOSE_SQUARE_BRACKET', + '?' => 'T_INLINE_THEN', + '.' => 'T_OBJECT_OPERATOR', + '+' => 'T_PLUS', + '-' => 'T_MINUS', + '*' => 'T_MULTIPLY', + '%' => 'T_MODULUS', + '/' => 'T_DIVIDE', + '^' => 'T_LOGICAL_XOR', + ',' => 'T_COMMA', + ';' => 'T_SEMICOLON', + ':' => 'T_COLON', + '<' => 'T_LESS_THAN', + '>' => 'T_GREATER_THAN', + '<<' => 'T_SL', + '>>' => 'T_SR', + '>>>' => 'T_ZSR', + '<<=' => 'T_SL_EQUAL', + '>>=' => 'T_SR_EQUAL', + '>>>=' => 'T_ZSR_EQUAL', + '<=' => 'T_IS_SMALLER_OR_EQUAL', + '>=' => 'T_IS_GREATER_OR_EQUAL', + '=>' => 'T_DOUBLE_ARROW', + '!' => 'T_BOOLEAN_NOT', + '||' => 'T_BOOLEAN_OR', + '&&' => 'T_BOOLEAN_AND', + '|' => 'T_BITWISE_OR', + '&' => 'T_BITWISE_AND', + '!=' => 'T_IS_NOT_EQUAL', + '!==' => 'T_IS_NOT_IDENTICAL', + '=' => 'T_EQUAL', + '==' => 'T_IS_EQUAL', + '===' => 'T_IS_IDENTICAL', + '-=' => 'T_MINUS_EQUAL', + '+=' => 'T_PLUS_EQUAL', + '*=' => 'T_MUL_EQUAL', + '/=' => 'T_DIV_EQUAL', + '%=' => 'T_MOD_EQUAL', + '++' => 'T_INC', + '--' => 'T_DEC', + '//' => 'T_COMMENT', + '/*' => 'T_COMMENT', + '/**' => 'T_DOC_COMMENT', + '*/' => 'T_COMMENT', + ]; + + /** + * A list string delimiters. + * + * @var array + */ + protected $stringTokens = [ + '\'' => '\'', + '"' => '"', + ]; + + /** + * A list tokens that start and end comments. + * + * @var array + */ + protected $commentTokens = [ + '//' => null, + '/*' => '*/', + '/**' => '*/', + ]; + + + /** + * Initialise the tokenizer. + * + * Pre-checks the content to see if it looks minified. + * + * @param string $content The content to tokenize, + * @param \PHP_CodeSniffer\Config $config The config data for the run. + * @param string $eolChar The EOL char used in the content. + * + * @return void + * @throws \PHP_CodeSniffer\Exceptions\TokenizerException If the file appears to be minified. + */ + public function __construct($content, Config $config, $eolChar='\n') + { + if ($this->isMinifiedContent($content, $eolChar) === true) { + throw new TokenizerException('File appears to be minified and cannot be processed'); + } + + parent::__construct($content, $config, $eolChar); + + }//end __construct() + + + /** + * Creates an array of tokens when given some JS code. + * + * @param string $string The string to tokenize. + * + * @return array + */ + public function tokenize($string) + { + if (PHP_CODESNIFFER_VERBOSITY > 1) { + echo "\t*** START JS TOKENIZING ***".PHP_EOL; + } + + $maxTokenLength = 0; + foreach ($this->tokenValues as $token => $values) { + if (strlen($token) > $maxTokenLength) { + $maxTokenLength = strlen($token); + } + } + + $tokens = []; + $inString = ''; + $stringChar = null; + $inComment = ''; + $buffer = ''; + $preStringBuffer = ''; + $cleanBuffer = false; + + $commentTokenizer = new Comment(); + + $tokens[] = [ + 'code' => T_OPEN_TAG, + 'type' => 'T_OPEN_TAG', + 'content' => '', + ]; + + // Convert newlines to single characters for ease of + // processing. We will change them back later. + $string = str_replace($this->eolChar, "\n", $string); + + $chars = str_split($string); + $numChars = count($chars); + for ($i = 0; $i < $numChars; $i++) { + $char = $chars[$i]; + + if (PHP_CODESNIFFER_VERBOSITY > 1) { + $content = Util\Common::prepareForOutput($char); + $bufferContent = Util\Common::prepareForOutput($buffer); + + if ($inString !== '') { + echo "\t"; + } + + if ($inComment !== '') { + echo "\t"; + } + + echo "\tProcess char $i => $content (buffer: $bufferContent)".PHP_EOL; + }//end if + + if ($inString === '' && $inComment === '' && $buffer !== '') { + // If the buffer only has whitespace and we are about to + // add a character, store the whitespace first. + if (trim($char) !== '' && trim($buffer) === '') { + $tokens[] = [ + 'code' => T_WHITESPACE, + 'type' => 'T_WHITESPACE', + 'content' => str_replace("\n", $this->eolChar, $buffer), + ]; + + if (PHP_CODESNIFFER_VERBOSITY > 1) { + $content = Util\Common::prepareForOutput($buffer); + echo "\t=> Added token T_WHITESPACE ($content)".PHP_EOL; + } + + $buffer = ''; + } + + // If the buffer is not whitespace and we are about to + // add a whitespace character, store the content first. + if ($inString === '' + && $inComment === '' + && trim($char) === '' + && trim($buffer) !== '' + ) { + $tokens[] = [ + 'code' => T_STRING, + 'type' => 'T_STRING', + 'content' => str_replace("\n", $this->eolChar, $buffer), + ]; + + if (PHP_CODESNIFFER_VERBOSITY > 1) { + $content = Util\Common::prepareForOutput($buffer); + echo "\t=> Added token T_STRING ($content)".PHP_EOL; + } + + $buffer = ''; + } + }//end if + + // Process strings. + if ($inComment === '' && isset($this->stringTokens[$char]) === true) { + if ($inString === $char) { + // This could be the end of the string, but make sure it + // is not escaped first. + $escapes = 0; + for ($x = ($i - 1); $x >= 0; $x--) { + if ($chars[$x] !== '\\') { + break; + } + + $escapes++; + } + + if ($escapes === 0 || ($escapes % 2) === 0) { + // There is an even number escape chars, + // so this is not escaped, it is the end of the string. + $tokens[] = [ + 'code' => T_CONSTANT_ENCAPSED_STRING, + 'type' => 'T_CONSTANT_ENCAPSED_STRING', + 'content' => str_replace("\n", $this->eolChar, $buffer).$char, + ]; + + if (PHP_CODESNIFFER_VERBOSITY > 1) { + echo "\t\t* found end of string *".PHP_EOL; + $content = Util\Common::prepareForOutput($buffer.$char); + echo "\t=> Added token T_CONSTANT_ENCAPSED_STRING ($content)".PHP_EOL; + } + + $buffer = ''; + $preStringBuffer = ''; + $inString = ''; + $stringChar = null; + continue; + }//end if + } else if ($inString === '') { + $inString = $char; + $stringChar = $i; + $preStringBuffer = $buffer; + + if (PHP_CODESNIFFER_VERBOSITY > 1) { + echo "\t\t* looking for string closer *".PHP_EOL; + } + }//end if + }//end if + + if ($inString !== '' && $char === "\n") { + // Unless this newline character is escaped, the string did not + // end before the end of the line, which means it probably + // wasn't a string at all (maybe a regex). + if ($chars[($i - 1)] !== '\\') { + $i = $stringChar; + $buffer = $preStringBuffer; + $preStringBuffer = ''; + $inString = ''; + $stringChar = null; + $char = $chars[$i]; + + if (PHP_CODESNIFFER_VERBOSITY > 1) { + echo "\t\t* found newline before end of string, bailing *".PHP_EOL; + } + } + } + + $buffer .= $char; + + // We don't look for special tokens inside strings, + // so if we are in a string, we can continue here now + // that the current char is in the buffer. + if ($inString !== '') { + continue; + } + + // Special case for T_DIVIDE which can actually be + // the start of a regular expression. + if ($buffer === $char && $char === '/' && $chars[($i + 1)] !== '*') { + $regex = $this->getRegexToken($i, $string, $chars, $tokens); + if ($regex !== null) { + $tokens[] = [ + 'code' => T_REGULAR_EXPRESSION, + 'type' => 'T_REGULAR_EXPRESSION', + 'content' => $regex['content'], + ]; + + if (PHP_CODESNIFFER_VERBOSITY > 1) { + $content = Util\Common::prepareForOutput($regex['content']); + echo "\t=> Added token T_REGULAR_EXPRESSION ($content)".PHP_EOL; + } + + $i = $regex['end']; + $buffer = ''; + $cleanBuffer = false; + continue; + }//end if + }//end if + + // Check for known tokens, but ignore tokens found that are not at + // the end of a string, like FOR and this.FORmat. + if (isset($this->tokenValues[strtolower($buffer)]) === true + && (preg_match('|[a-zA-z0-9_]|', $char) === 0 + || isset($chars[($i + 1)]) === false + || preg_match('|[a-zA-z0-9_]|', $chars[($i + 1)]) === 0) + ) { + $matchedToken = false; + $lookAheadLength = ($maxTokenLength - strlen($buffer)); + + if ($lookAheadLength > 0) { + // The buffer contains a token type, but we need + // to look ahead at the next chars to see if this is + // actually part of a larger token. For example, + // FOR and FOREACH. + if (PHP_CODESNIFFER_VERBOSITY > 1) { + echo "\t\t* buffer possibly contains token, looking ahead $lookAheadLength chars *".PHP_EOL; + } + + $charBuffer = $buffer; + for ($x = 1; $x <= $lookAheadLength; $x++) { + if (isset($chars[($i + $x)]) === false) { + break; + } + + $charBuffer .= $chars[($i + $x)]; + + if (PHP_CODESNIFFER_VERBOSITY > 1) { + $content = Util\Common::prepareForOutput($charBuffer); + echo "\t\t=> Looking ahead $x chars => $content".PHP_EOL; + } + + if (isset($this->tokenValues[strtolower($charBuffer)]) === true) { + // We've found something larger that matches + // so we can ignore this char. Except for 1 very specific + // case where a comment like /**/ needs to tokenize as + // T_COMMENT and not T_DOC_COMMENT. + $oldType = $this->tokenValues[strtolower($buffer)]; + $newType = $this->tokenValues[strtolower($charBuffer)]; + if ($oldType === 'T_COMMENT' + && $newType === 'T_DOC_COMMENT' + && $chars[($i + $x + 1)] === '/' + ) { + if (PHP_CODESNIFFER_VERBOSITY > 1) { + echo "\t\t* look ahead ignored T_DOC_COMMENT, continuing *".PHP_EOL; + } + } else { + if (PHP_CODESNIFFER_VERBOSITY > 1) { + echo "\t\t* look ahead found more specific token ($newType), ignoring $i *".PHP_EOL; + } + + $matchedToken = true; + break; + } + }//end if + }//end for + }//end if + + if ($matchedToken === false) { + if (PHP_CODESNIFFER_VERBOSITY > 1 && $lookAheadLength > 0) { + echo "\t\t* look ahead found nothing *".PHP_EOL; + } + + $value = $this->tokenValues[strtolower($buffer)]; + + if ($value === 'T_FUNCTION' && $buffer !== 'function') { + // The function keyword needs to be all lowercase or else + // it is just a function called "Function". + $value = 'T_STRING'; + } + + $tokens[] = [ + 'code' => constant($value), + 'type' => $value, + 'content' => $buffer, + ]; + + if (PHP_CODESNIFFER_VERBOSITY > 1) { + $content = Util\Common::prepareForOutput($buffer); + echo "\t=> Added token $value ($content)".PHP_EOL; + } + + $cleanBuffer = true; + }//end if + } else if (isset($this->tokenValues[strtolower($char)]) === true) { + // No matter what token we end up using, we don't + // need the content in the buffer any more because we have + // found a valid token. + $newContent = substr(str_replace("\n", $this->eolChar, $buffer), 0, -1); + if ($newContent !== '') { + $tokens[] = [ + 'code' => T_STRING, + 'type' => 'T_STRING', + 'content' => $newContent, + ]; + + if (PHP_CODESNIFFER_VERBOSITY > 1) { + $content = Util\Common::prepareForOutput(substr($buffer, 0, -1)); + echo "\t=> Added token T_STRING ($content)".PHP_EOL; + } + } + + if (PHP_CODESNIFFER_VERBOSITY > 1) { + echo "\t\t* char is token, looking ahead ".($maxTokenLength - 1).' chars *'.PHP_EOL; + } + + // The char is a token type, but we need to look ahead at the + // next chars to see if this is actually part of a larger token. + // For example, = and ===. + $charBuffer = $char; + $matchedToken = false; + for ($x = 1; $x <= $maxTokenLength; $x++) { + if (isset($chars[($i + $x)]) === false) { + break; + } + + $charBuffer .= $chars[($i + $x)]; + + if (PHP_CODESNIFFER_VERBOSITY > 1) { + $content = Util\Common::prepareForOutput($charBuffer); + echo "\t\t=> Looking ahead $x chars => $content".PHP_EOL; + } + + if (isset($this->tokenValues[strtolower($charBuffer)]) === true) { + // We've found something larger that matches + // so we can ignore this char. + if (PHP_CODESNIFFER_VERBOSITY > 1) { + $type = $this->tokenValues[strtolower($charBuffer)]; + echo "\t\t* look ahead found more specific token ($type), ignoring $i *".PHP_EOL; + } + + $matchedToken = true; + break; + } + }//end for + + if ($matchedToken === false) { + $value = $this->tokenValues[strtolower($char)]; + $tokens[] = [ + 'code' => constant($value), + 'type' => $value, + 'content' => $char, + ]; + + if (PHP_CODESNIFFER_VERBOSITY > 1) { + echo "\t\t* look ahead found nothing *".PHP_EOL; + $content = Util\Common::prepareForOutput($char); + echo "\t=> Added token $value ($content)".PHP_EOL; + } + + $cleanBuffer = true; + } else { + $buffer = $char; + }//end if + }//end if + + // Keep track of content inside comments. + if ($inComment === '' + && array_key_exists($buffer, $this->commentTokens) === true + ) { + // This is not really a comment if the content + // looks like \// (i.e., it is escaped). + if (isset($chars[($i - 2)]) === true && $chars[($i - 2)] === '\\') { + $lastToken = array_pop($tokens); + $lastContent = $lastToken['content']; + if (PHP_CODESNIFFER_VERBOSITY > 1) { + $value = $this->tokenValues[strtolower($lastContent)]; + $content = Util\Common::prepareForOutput($lastContent); + echo "\t=> Removed token $value ($content)".PHP_EOL; + } + + $lastChars = str_split($lastContent); + $lastNumChars = count($lastChars); + for ($x = 0; $x < $lastNumChars; $x++) { + $lastChar = $lastChars[$x]; + $value = $this->tokenValues[strtolower($lastChar)]; + $tokens[] = [ + 'code' => constant($value), + 'type' => $value, + 'content' => $lastChar, + ]; + + if (PHP_CODESNIFFER_VERBOSITY > 1) { + $content = Util\Common::prepareForOutput($lastChar); + echo "\t=> Added token $value ($content)".PHP_EOL; + } + } + } else { + // We have started a comment. + $inComment = $buffer; + + if (PHP_CODESNIFFER_VERBOSITY > 1) { + echo "\t\t* looking for end of comment *".PHP_EOL; + } + }//end if + } else if ($inComment !== '') { + if ($this->commentTokens[$inComment] === null) { + // Comment ends at the next newline. + if (strpos($buffer, "\n") !== false) { + $inComment = ''; + } + } else { + if ($this->commentTokens[$inComment] === $buffer) { + $inComment = ''; + } + } + + if (PHP_CODESNIFFER_VERBOSITY > 1) { + if ($inComment === '') { + echo "\t\t* found end of comment *".PHP_EOL; + } + } + + if ($inComment === '' && $cleanBuffer === false) { + $tokens[] = [ + 'code' => T_STRING, + 'type' => 'T_STRING', + 'content' => str_replace("\n", $this->eolChar, $buffer), + ]; + + if (PHP_CODESNIFFER_VERBOSITY > 1) { + $content = Util\Common::prepareForOutput($buffer); + echo "\t=> Added token T_STRING ($content)".PHP_EOL; + } + + $buffer = ''; + } + }//end if + + if ($cleanBuffer === true) { + $buffer = ''; + $cleanBuffer = false; + } + }//end for + + if (empty($buffer) === false) { + if ($inString !== '') { + // The string did not end before the end of the file, + // which means there was probably a syntax error somewhere. + $tokens[] = [ + 'code' => T_STRING, + 'type' => 'T_STRING', + 'content' => str_replace("\n", $this->eolChar, $buffer), + ]; + + if (PHP_CODESNIFFER_VERBOSITY > 1) { + $content = Util\Common::prepareForOutput($buffer); + echo "\t=> Added token T_STRING ($content)".PHP_EOL; + } + } else { + // Buffer contains whitespace from the end of the file. + $tokens[] = [ + 'code' => T_WHITESPACE, + 'type' => 'T_WHITESPACE', + 'content' => str_replace("\n", $this->eolChar, $buffer), + ]; + + if (PHP_CODESNIFFER_VERBOSITY > 1) { + $content = Util\Common::prepareForOutput($buffer); + echo "\t=> Added token T_WHITESPACE ($content)".PHP_EOL; + } + }//end if + }//end if + + $tokens[] = [ + 'code' => T_CLOSE_TAG, + 'type' => 'T_CLOSE_TAG', + 'content' => '', + ]; + + /* + Now that we have done some basic tokenizing, we need to + modify the tokens to join some together and split some apart + so they match what the PHP tokenizer does. + */ + + $finalTokens = []; + $newStackPtr = 0; + $numTokens = count($tokens); + for ($stackPtr = 0; $stackPtr < $numTokens; $stackPtr++) { + $token = $tokens[$stackPtr]; + + /* + Look for comments and join the tokens together. + */ + + if ($token['code'] === T_COMMENT || $token['code'] === T_DOC_COMMENT) { + $newContent = ''; + $tokenContent = $token['content']; + + $endContent = null; + if (isset($this->commentTokens[$tokenContent]) === true) { + $endContent = $this->commentTokens[$tokenContent]; + } + + while ($tokenContent !== $endContent) { + if ($endContent === null + && strpos($tokenContent, $this->eolChar) !== false + ) { + // A null end token means the comment ends at the end of + // the line so we look for newlines and split the token. + $tokens[$stackPtr]['content'] = substr( + $tokenContent, + (strpos($tokenContent, $this->eolChar) + strlen($this->eolChar)) + ); + + $tokenContent = substr( + $tokenContent, + 0, + (strpos($tokenContent, $this->eolChar) + strlen($this->eolChar)) + ); + + // If the substr failed, skip the token as the content + // will now be blank. + if ($tokens[$stackPtr]['content'] !== false + && $tokens[$stackPtr]['content'] !== '' + ) { + $stackPtr--; + } + + break; + }//end if + + $stackPtr++; + $newContent .= $tokenContent; + if (isset($tokens[$stackPtr]) === false) { + break; + } + + $tokenContent = $tokens[$stackPtr]['content']; + }//end while + + if ($token['code'] === T_DOC_COMMENT) { + $commentTokens = $commentTokenizer->tokenizeString($newContent.$tokenContent, $this->eolChar, $newStackPtr); + foreach ($commentTokens as $commentToken) { + $finalTokens[$newStackPtr] = $commentToken; + $newStackPtr++; + } + + continue; + } else { + // Save the new content in the current token so + // the code below can chop it up on newlines. + $token['content'] = $newContent.$tokenContent; + } + }//end if + + /* + If this token has newlines in its content, split each line up + and create a new token for each line. We do this so it's easier + to ascertain where errors occur on a line. + Note that $token[1] is the token's content. + */ + + if (strpos($token['content'], $this->eolChar) !== false) { + $tokenLines = explode($this->eolChar, $token['content']); + $numLines = count($tokenLines); + + for ($i = 0; $i < $numLines; $i++) { + $newToken = ['content' => $tokenLines[$i]]; + if ($i === ($numLines - 1)) { + if ($tokenLines[$i] === '') { + break; + } + } else { + $newToken['content'] .= $this->eolChar; + } + + $newToken['type'] = $token['type']; + $newToken['code'] = $token['code']; + $finalTokens[$newStackPtr] = $newToken; + $newStackPtr++; + } + } else { + $finalTokens[$newStackPtr] = $token; + $newStackPtr++; + }//end if + + // Convert numbers, including decimals. + if ($token['code'] === T_STRING + || $token['code'] === T_OBJECT_OPERATOR + ) { + $newContent = ''; + $oldStackPtr = $stackPtr; + while (preg_match('|^[0-9\.]+$|', $tokens[$stackPtr]['content']) !== 0) { + $newContent .= $tokens[$stackPtr]['content']; + $stackPtr++; + } + + if ($newContent !== '' && $newContent !== '.') { + $finalTokens[($newStackPtr - 1)]['content'] = $newContent; + if (ctype_digit($newContent) === true) { + $finalTokens[($newStackPtr - 1)]['code'] = constant('T_LNUMBER'); + $finalTokens[($newStackPtr - 1)]['type'] = 'T_LNUMBER'; + } else { + $finalTokens[($newStackPtr - 1)]['code'] = constant('T_DNUMBER'); + $finalTokens[($newStackPtr - 1)]['type'] = 'T_DNUMBER'; + } + + $stackPtr--; + continue; + } else { + $stackPtr = $oldStackPtr; + } + }//end if + + // Convert the token after an object operator into a string, in most cases. + if ($token['code'] === T_OBJECT_OPERATOR) { + for ($i = ($stackPtr + 1); $i < $numTokens; $i++) { + if (isset(Util\Tokens::$emptyTokens[$tokens[$i]['code']]) === true) { + continue; + } + + if ($tokens[$i]['code'] !== T_PROTOTYPE + && $tokens[$i]['code'] !== T_LNUMBER + && $tokens[$i]['code'] !== T_DNUMBER + ) { + $tokens[$i]['code'] = T_STRING; + $tokens[$i]['type'] = 'T_STRING'; + } + + break; + } + } + }//end for + + if (PHP_CODESNIFFER_VERBOSITY > 1) { + echo "\t*** END TOKENIZING ***".PHP_EOL; + } + + return $finalTokens; + + }//end tokenize() + + + /** + * Tokenizes a regular expression if one is found. + * + * If a regular expression is not found, NULL is returned. + * + * @param string $char The index of the possible regex start character. + * @param string $string The complete content of the string being tokenized. + * @param string $chars An array of characters being tokenized. + * @param string $tokens The current array of tokens found in the string. + * + * @return array|null + */ + public function getRegexToken($char, $string, $chars, $tokens) + { + $beforeTokens = [ + T_EQUAL => true, + T_IS_NOT_EQUAL => true, + T_IS_IDENTICAL => true, + T_IS_NOT_IDENTICAL => true, + T_OPEN_PARENTHESIS => true, + T_OPEN_SQUARE_BRACKET => true, + T_RETURN => true, + T_BOOLEAN_OR => true, + T_BOOLEAN_AND => true, + T_BOOLEAN_NOT => true, + T_BITWISE_OR => true, + T_BITWISE_AND => true, + T_COMMA => true, + T_COLON => true, + T_TYPEOF => true, + T_INLINE_THEN => true, + T_INLINE_ELSE => true, + ]; + + $afterTokens = [ + ',' => true, + ')' => true, + ']' => true, + ';' => true, + ' ' => true, + '.' => true, + ':' => true, + $this->eolChar => true, + ]; + + // Find the last non-whitespace token that was added + // to the tokens array. + $numTokens = count($tokens); + for ($prev = ($numTokens - 1); $prev >= 0; $prev--) { + if (isset(Util\Tokens::$emptyTokens[$tokens[$prev]['code']]) === false) { + break; + } + } + + if (isset($beforeTokens[$tokens[$prev]['code']]) === false) { + return null; + } + + // This is probably a regular expression, so look for the end of it. + if (PHP_CODESNIFFER_VERBOSITY > 1) { + echo "\t* token possibly starts a regular expression *".PHP_EOL; + } + + $numChars = count($chars); + for ($next = ($char + 1); $next < $numChars; $next++) { + if ($chars[$next] === '/') { + // Just make sure this is not escaped first. + if ($chars[($next - 1)] !== '\\') { + // In the simple form: /.../ so we found the end. + break; + } else if ($chars[($next - 2)] === '\\') { + // In the form: /...\\/ so we found the end. + break; + } + } else { + $possibleEolChar = substr($string, $next, strlen($this->eolChar)); + if ($possibleEolChar === $this->eolChar) { + // This is the last token on the line and regular + // expressions need to be defined on a single line, + // so this is not a regular expression. + break; + } + } + } + + if ($chars[$next] !== '/') { + if (PHP_CODESNIFFER_VERBOSITY > 1) { + echo "\t* could not find end of regular expression *".PHP_EOL; + } + + return null; + } + + while (preg_match('|[a-zA-Z]|', $chars[($next + 1)]) !== 0) { + // The token directly after the end of the regex can + // be modifiers like global and case insensitive + // (.e.g, /pattern/gi). + $next++; + } + + $regexEnd = $next; + if (PHP_CODESNIFFER_VERBOSITY > 1) { + echo "\t* found end of regular expression at token $regexEnd *".PHP_EOL; + } + + for ($next += 1; $next < $numChars; $next++) { + if ($chars[$next] !== ' ') { + break; + } else { + $possibleEolChar = substr($string, $next, strlen($this->eolChar)); + if ($possibleEolChar === $this->eolChar) { + // This is the last token on the line. + break; + } + } + } + + if (isset($afterTokens[$chars[$next]]) === false) { + if (PHP_CODESNIFFER_VERBOSITY > 1) { + echo "\t* tokens after regular expression do not look correct *".PHP_EOL; + } + + return null; + } + + // This is a regular expression, so join all the tokens together. + $content = ''; + for ($x = $char; $x <= $regexEnd; $x++) { + $content .= $chars[$x]; + } + + $token = [ + 'start' => $char, + 'end' => $regexEnd, + 'content' => $content, + ]; + + return $token; + + }//end getRegexToken() + + + /** + * Performs additional processing after main tokenizing. + * + * This additional processing looks for properties, closures, labels and objects. + * + * @return void + */ + public function processAdditional() + { + if (PHP_CODESNIFFER_VERBOSITY > 1) { + echo "\t*** START ADDITIONAL JS PROCESSING ***".PHP_EOL; + } + + $numTokens = count($this->tokens); + $classStack = []; + + for ($i = 0; $i < $numTokens; $i++) { + if (PHP_CODESNIFFER_VERBOSITY > 1) { + $type = $this->tokens[$i]['type']; + $content = Util\Common::prepareForOutput($this->tokens[$i]['content']); + + echo str_repeat("\t", count($classStack)); + echo "\tProcess token $i: $type => $content".PHP_EOL; + } + + // Looking for functions that are actually closures. + if ($this->tokens[$i]['code'] === T_FUNCTION && isset($this->tokens[$i]['scope_opener']) === true) { + for ($x = ($i + 1); $x < $numTokens; $x++) { + if (isset(Util\Tokens::$emptyTokens[$this->tokens[$x]['code']]) === false) { + break; + } + } + + if ($this->tokens[$x]['code'] === T_OPEN_PARENTHESIS) { + $this->tokens[$i]['code'] = T_CLOSURE; + $this->tokens[$i]['type'] = 'T_CLOSURE'; + if (PHP_CODESNIFFER_VERBOSITY > 1) { + $line = $this->tokens[$i]['line']; + echo str_repeat("\t", count($classStack)); + echo "\t* token $i on line $line changed from T_FUNCTION to T_CLOSURE *".PHP_EOL; + } + + for ($x = ($this->tokens[$i]['scope_opener'] + 1); $x < $this->tokens[$i]['scope_closer']; $x++) { + if (isset($this->tokens[$x]['conditions'][$i]) === false) { + continue; + } + + $this->tokens[$x]['conditions'][$i] = T_CLOSURE; + if (PHP_CODESNIFFER_VERBOSITY > 1) { + $type = $this->tokens[$x]['type']; + echo str_repeat("\t", count($classStack)); + echo "\t\t* cleaned $x ($type) *".PHP_EOL; + } + } + }//end if + + continue; + } else if ($this->tokens[$i]['code'] === T_OPEN_CURLY_BRACKET + && isset($this->tokens[$i]['scope_condition']) === false + && isset($this->tokens[$i]['bracket_closer']) === true + ) { + $condition = $this->tokens[$i]['conditions']; + $condition = end($condition); + if ($condition === T_CLASS) { + // Possibly an ES6 method. To be classified as one, the previous + // non-empty tokens need to be a set of parenthesis, and then a string + // (the method name). + for ($parenCloser = ($i - 1); $parenCloser > 0; $parenCloser--) { + if (isset(Util\Tokens::$emptyTokens[$this->tokens[$parenCloser]['code']]) === false) { + break; + } + } + + if ($this->tokens[$parenCloser]['code'] === T_CLOSE_PARENTHESIS) { + $parenOpener = $this->tokens[$parenCloser]['parenthesis_opener']; + for ($name = ($parenOpener - 1); $name > 0; $name--) { + if (isset(Util\Tokens::$emptyTokens[$this->tokens[$name]['code']]) === false) { + break; + } + } + + if ($this->tokens[$name]['code'] === T_STRING) { + // We found a method name. + if (PHP_CODESNIFFER_VERBOSITY > 1) { + $line = $this->tokens[$name]['line']; + echo str_repeat("\t", count($classStack)); + echo "\t* token $name on line $line changed from T_STRING to T_FUNCTION *".PHP_EOL; + } + + $closer = $this->tokens[$i]['bracket_closer']; + + $this->tokens[$name]['code'] = T_FUNCTION; + $this->tokens[$name]['type'] = 'T_FUNCTION'; + + foreach ([$name, $i, $closer] as $token) { + $this->tokens[$token]['scope_condition'] = $name; + $this->tokens[$token]['scope_opener'] = $i; + $this->tokens[$token]['scope_closer'] = $closer; + $this->tokens[$token]['parenthesis_opener'] = $parenOpener; + $this->tokens[$token]['parenthesis_closer'] = $parenCloser; + $this->tokens[$token]['parenthesis_owner'] = $name; + } + + $this->tokens[$parenOpener]['parenthesis_owner'] = $name; + $this->tokens[$parenCloser]['parenthesis_owner'] = $name; + + for ($x = ($i + 1); $x < $closer; $x++) { + $this->tokens[$x]['conditions'][$name] = T_FUNCTION; + ksort($this->tokens[$x]['conditions'], SORT_NUMERIC); + if (PHP_CODESNIFFER_VERBOSITY > 1) { + $type = $this->tokens[$x]['type']; + echo str_repeat("\t", count($classStack)); + echo "\t\t* added T_FUNCTION condition to $x ($type) *".PHP_EOL; + } + } + + continue; + }//end if + }//end if + }//end if + + $classStack[] = $i; + + $closer = $this->tokens[$i]['bracket_closer']; + $this->tokens[$i]['code'] = T_OBJECT; + $this->tokens[$i]['type'] = 'T_OBJECT'; + $this->tokens[$closer]['code'] = T_CLOSE_OBJECT; + $this->tokens[$closer]['type'] = 'T_CLOSE_OBJECT'; + + if (PHP_CODESNIFFER_VERBOSITY > 1) { + echo str_repeat("\t", count($classStack)); + echo "\t* token $i converted from T_OPEN_CURLY_BRACKET to T_OBJECT *".PHP_EOL; + echo str_repeat("\t", count($classStack)); + echo "\t* token $closer converted from T_CLOSE_CURLY_BRACKET to T_CLOSE_OBJECT *".PHP_EOL; + } + + for ($x = ($i + 1); $x < $closer; $x++) { + $this->tokens[$x]['conditions'][$i] = T_OBJECT; + ksort($this->tokens[$x]['conditions'], SORT_NUMERIC); + if (PHP_CODESNIFFER_VERBOSITY > 1) { + $type = $this->tokens[$x]['type']; + echo str_repeat("\t", count($classStack)); + echo "\t\t* added T_OBJECT condition to $x ($type) *".PHP_EOL; + } + } + } else if ($this->tokens[$i]['code'] === T_CLOSE_OBJECT) { + $opener = array_pop($classStack); + } else if ($this->tokens[$i]['code'] === T_COLON) { + // If it is a scope opener, it belongs to a + // DEFAULT or CASE statement. + if (isset($this->tokens[$i]['scope_condition']) === true) { + continue; + } + + // Make sure this is not part of an inline IF statement. + for ($x = ($i - 1); $x >= 0; $x--) { + if ($this->tokens[$x]['code'] === T_INLINE_THEN) { + $this->tokens[$i]['code'] = T_INLINE_ELSE; + $this->tokens[$i]['type'] = 'T_INLINE_ELSE'; + + if (PHP_CODESNIFFER_VERBOSITY > 1) { + echo str_repeat("\t", count($classStack)); + echo "\t* token $i converted from T_COLON to T_INLINE_THEN *".PHP_EOL; + } + + continue(2); + } else if ($this->tokens[$x]['line'] < $this->tokens[$i]['line']) { + break; + } + } + + // The string to the left of the colon is either a property or label. + for ($label = ($i - 1); $label >= 0; $label--) { + if (isset(Util\Tokens::$emptyTokens[$this->tokens[$label]['code']]) === false) { + break; + } + } + + if ($this->tokens[$label]['code'] !== T_STRING + && $this->tokens[$label]['code'] !== T_CONSTANT_ENCAPSED_STRING + ) { + continue; + } + + if (empty($classStack) === false) { + $this->tokens[$label]['code'] = T_PROPERTY; + $this->tokens[$label]['type'] = 'T_PROPERTY'; + + if (PHP_CODESNIFFER_VERBOSITY > 1) { + echo str_repeat("\t", count($classStack)); + echo "\t* token $label converted from T_STRING to T_PROPERTY *".PHP_EOL; + } + } else { + $this->tokens[$label]['code'] = T_LABEL; + $this->tokens[$label]['type'] = 'T_LABEL'; + + if (PHP_CODESNIFFER_VERBOSITY > 1) { + echo str_repeat("\t", count($classStack)); + echo "\t* token $label converted from T_STRING to T_LABEL *".PHP_EOL; + } + }//end if + }//end if + }//end for + + if (PHP_CODESNIFFER_VERBOSITY > 1) { + echo "\t*** END ADDITIONAL JS PROCESSING ***".PHP_EOL; + } + + }//end processAdditional() + + +}//end class diff --git a/vendor/squizlabs/php_codesniffer/src/Tokenizers/PHP.php b/vendor/squizlabs/php_codesniffer/src/Tokenizers/PHP.php new file mode 100644 index 00000000..1ba26363 --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Tokenizers/PHP.php @@ -0,0 +1,3289 @@ + + * @copyright 2006-2015 Squiz Pty Ltd (ABN 77 084 670 600) + * @license https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence + */ + +namespace PHP_CodeSniffer\Tokenizers; + +use PHP_CodeSniffer\Util; + +class PHP extends Tokenizer +{ + + /** + * A list of tokens that are allowed to open a scope. + * + * This array also contains information about what kind of token the scope + * opener uses to open and close the scope, if the token strictly requires + * an opener, if the token can share a scope closer, and who it can be shared + * with. An example of a token that shares a scope closer is a CASE scope. + * + * @var array + */ + public $scopeOpeners = [ + T_IF => [ + 'start' => [ + T_OPEN_CURLY_BRACKET => T_OPEN_CURLY_BRACKET, + T_COLON => T_COLON, + ], + 'end' => [ + T_CLOSE_CURLY_BRACKET => T_CLOSE_CURLY_BRACKET, + T_ENDIF => T_ENDIF, + T_ELSE => T_ELSE, + T_ELSEIF => T_ELSEIF, + ], + 'strict' => false, + 'shared' => false, + 'with' => [ + T_ELSE => T_ELSE, + T_ELSEIF => T_ELSEIF, + ], + ], + T_TRY => [ + 'start' => [T_OPEN_CURLY_BRACKET => T_OPEN_CURLY_BRACKET], + 'end' => [T_CLOSE_CURLY_BRACKET => T_CLOSE_CURLY_BRACKET], + 'strict' => true, + 'shared' => false, + 'with' => [], + ], + T_CATCH => [ + 'start' => [T_OPEN_CURLY_BRACKET => T_OPEN_CURLY_BRACKET], + 'end' => [T_CLOSE_CURLY_BRACKET => T_CLOSE_CURLY_BRACKET], + 'strict' => true, + 'shared' => false, + 'with' => [], + ], + T_FINALLY => [ + 'start' => [T_OPEN_CURLY_BRACKET => T_OPEN_CURLY_BRACKET], + 'end' => [T_CLOSE_CURLY_BRACKET => T_CLOSE_CURLY_BRACKET], + 'strict' => true, + 'shared' => false, + 'with' => [], + ], + T_ELSE => [ + 'start' => [ + T_OPEN_CURLY_BRACKET => T_OPEN_CURLY_BRACKET, + T_COLON => T_COLON, + ], + 'end' => [ + T_CLOSE_CURLY_BRACKET => T_CLOSE_CURLY_BRACKET, + T_ENDIF => T_ENDIF, + ], + 'strict' => false, + 'shared' => false, + 'with' => [ + T_IF => T_IF, + T_ELSEIF => T_ELSEIF, + ], + ], + T_ELSEIF => [ + 'start' => [ + T_OPEN_CURLY_BRACKET => T_OPEN_CURLY_BRACKET, + T_COLON => T_COLON, + ], + 'end' => [ + T_CLOSE_CURLY_BRACKET => T_CLOSE_CURLY_BRACKET, + T_ENDIF => T_ENDIF, + T_ELSE => T_ELSE, + T_ELSEIF => T_ELSEIF, + ], + 'strict' => false, + 'shared' => false, + 'with' => [ + T_IF => T_IF, + T_ELSE => T_ELSE, + ], + ], + T_FOR => [ + 'start' => [ + T_OPEN_CURLY_BRACKET => T_OPEN_CURLY_BRACKET, + T_COLON => T_COLON, + ], + 'end' => [ + T_CLOSE_CURLY_BRACKET => T_CLOSE_CURLY_BRACKET, + T_ENDFOR => T_ENDFOR, + ], + 'strict' => false, + 'shared' => false, + 'with' => [], + ], + T_FOREACH => [ + 'start' => [ + T_OPEN_CURLY_BRACKET => T_OPEN_CURLY_BRACKET, + T_COLON => T_COLON, + ], + 'end' => [ + T_CLOSE_CURLY_BRACKET => T_CLOSE_CURLY_BRACKET, + T_ENDFOREACH => T_ENDFOREACH, + ], + 'strict' => false, + 'shared' => false, + 'with' => [], + ], + T_INTERFACE => [ + 'start' => [T_OPEN_CURLY_BRACKET => T_OPEN_CURLY_BRACKET], + 'end' => [T_CLOSE_CURLY_BRACKET => T_CLOSE_CURLY_BRACKET], + 'strict' => true, + 'shared' => false, + 'with' => [], + ], + T_FUNCTION => [ + 'start' => [T_OPEN_CURLY_BRACKET => T_OPEN_CURLY_BRACKET], + 'end' => [T_CLOSE_CURLY_BRACKET => T_CLOSE_CURLY_BRACKET], + 'strict' => true, + 'shared' => false, + 'with' => [], + ], + T_CLASS => [ + 'start' => [T_OPEN_CURLY_BRACKET => T_OPEN_CURLY_BRACKET], + 'end' => [T_CLOSE_CURLY_BRACKET => T_CLOSE_CURLY_BRACKET], + 'strict' => true, + 'shared' => false, + 'with' => [], + ], + T_TRAIT => [ + 'start' => [T_OPEN_CURLY_BRACKET => T_OPEN_CURLY_BRACKET], + 'end' => [T_CLOSE_CURLY_BRACKET => T_CLOSE_CURLY_BRACKET], + 'strict' => true, + 'shared' => false, + 'with' => [], + ], + T_USE => [ + 'start' => [T_OPEN_CURLY_BRACKET => T_OPEN_CURLY_BRACKET], + 'end' => [T_CLOSE_CURLY_BRACKET => T_CLOSE_CURLY_BRACKET], + 'strict' => false, + 'shared' => false, + 'with' => [], + ], + T_DECLARE => [ + 'start' => [ + T_OPEN_CURLY_BRACKET => T_OPEN_CURLY_BRACKET, + T_COLON => T_COLON, + ], + 'end' => [ + T_CLOSE_CURLY_BRACKET => T_CLOSE_CURLY_BRACKET, + T_ENDDECLARE => T_ENDDECLARE, + ], + 'strict' => false, + 'shared' => false, + 'with' => [], + ], + T_NAMESPACE => [ + 'start' => [T_OPEN_CURLY_BRACKET => T_OPEN_CURLY_BRACKET], + 'end' => [T_CLOSE_CURLY_BRACKET => T_CLOSE_CURLY_BRACKET], + 'strict' => false, + 'shared' => false, + 'with' => [], + ], + T_WHILE => [ + 'start' => [ + T_OPEN_CURLY_BRACKET => T_OPEN_CURLY_BRACKET, + T_COLON => T_COLON, + ], + 'end' => [ + T_CLOSE_CURLY_BRACKET => T_CLOSE_CURLY_BRACKET, + T_ENDWHILE => T_ENDWHILE, + ], + 'strict' => false, + 'shared' => false, + 'with' => [], + ], + T_DO => [ + 'start' => [T_OPEN_CURLY_BRACKET => T_OPEN_CURLY_BRACKET], + 'end' => [T_CLOSE_CURLY_BRACKET => T_CLOSE_CURLY_BRACKET], + 'strict' => true, + 'shared' => false, + 'with' => [], + ], + T_SWITCH => [ + 'start' => [ + T_OPEN_CURLY_BRACKET => T_OPEN_CURLY_BRACKET, + T_COLON => T_COLON, + ], + 'end' => [ + T_CLOSE_CURLY_BRACKET => T_CLOSE_CURLY_BRACKET, + T_ENDSWITCH => T_ENDSWITCH, + ], + 'strict' => true, + 'shared' => false, + 'with' => [], + ], + T_CASE => [ + 'start' => [ + T_COLON => T_COLON, + T_SEMICOLON => T_SEMICOLON, + ], + 'end' => [ + T_BREAK => T_BREAK, + T_RETURN => T_RETURN, + T_CONTINUE => T_CONTINUE, + T_THROW => T_THROW, + T_EXIT => T_EXIT, + ], + 'strict' => true, + 'shared' => true, + 'with' => [ + T_DEFAULT => T_DEFAULT, + T_CASE => T_CASE, + T_SWITCH => T_SWITCH, + ], + ], + T_DEFAULT => [ + 'start' => [ + T_COLON => T_COLON, + T_SEMICOLON => T_SEMICOLON, + ], + 'end' => [ + T_BREAK => T_BREAK, + T_RETURN => T_RETURN, + T_CONTINUE => T_CONTINUE, + T_THROW => T_THROW, + T_EXIT => T_EXIT, + ], + 'strict' => true, + 'shared' => true, + 'with' => [ + T_CASE => T_CASE, + T_SWITCH => T_SWITCH, + ], + ], + T_MATCH => [ + 'start' => [T_OPEN_CURLY_BRACKET => T_OPEN_CURLY_BRACKET], + 'end' => [T_CLOSE_CURLY_BRACKET => T_CLOSE_CURLY_BRACKET], + 'strict' => true, + 'shared' => false, + 'with' => [], + ], + T_START_HEREDOC => [ + 'start' => [T_START_HEREDOC => T_START_HEREDOC], + 'end' => [T_END_HEREDOC => T_END_HEREDOC], + 'strict' => true, + 'shared' => false, + 'with' => [], + ], + T_START_NOWDOC => [ + 'start' => [T_START_NOWDOC => T_START_NOWDOC], + 'end' => [T_END_NOWDOC => T_END_NOWDOC], + 'strict' => true, + 'shared' => false, + 'with' => [], + ], + ]; + + /** + * A list of tokens that end the scope. + * + * This array is just a unique collection of the end tokens + * from the scopeOpeners array. The data is duplicated here to + * save time during parsing of the file. + * + * @var array + */ + public $endScopeTokens = [ + T_CLOSE_CURLY_BRACKET => T_CLOSE_CURLY_BRACKET, + T_ENDIF => T_ENDIF, + T_ENDFOR => T_ENDFOR, + T_ENDFOREACH => T_ENDFOREACH, + T_ENDWHILE => T_ENDWHILE, + T_ENDSWITCH => T_ENDSWITCH, + T_ENDDECLARE => T_ENDDECLARE, + T_BREAK => T_BREAK, + T_END_HEREDOC => T_END_HEREDOC, + T_END_NOWDOC => T_END_NOWDOC, + ]; + + /** + * Known lengths of tokens. + * + * @var array + */ + public $knownLengths = [ + T_ABSTRACT => 8, + T_AND_EQUAL => 2, + T_ARRAY => 5, + T_AS => 2, + T_BOOLEAN_AND => 2, + T_BOOLEAN_OR => 2, + T_BREAK => 5, + T_CALLABLE => 8, + T_CASE => 4, + T_CATCH => 5, + T_CLASS => 5, + T_CLASS_C => 9, + T_CLONE => 5, + T_CONCAT_EQUAL => 2, + T_CONST => 5, + T_CONTINUE => 8, + T_CURLY_OPEN => 2, + T_DEC => 2, + T_DECLARE => 7, + T_DEFAULT => 7, + T_DIR => 7, + T_DIV_EQUAL => 2, + T_DO => 2, + T_DOLLAR_OPEN_CURLY_BRACES => 2, + T_DOUBLE_ARROW => 2, + T_DOUBLE_COLON => 2, + T_ECHO => 4, + T_ELLIPSIS => 3, + T_ELSE => 4, + T_ELSEIF => 6, + T_EMPTY => 5, + T_ENDDECLARE => 10, + T_ENDFOR => 6, + T_ENDFOREACH => 10, + T_ENDIF => 5, + T_ENDSWITCH => 9, + T_ENDWHILE => 8, + T_EVAL => 4, + T_EXTENDS => 7, + T_FILE => 8, + T_FINAL => 5, + T_FINALLY => 7, + T_FN => 2, + T_FOR => 3, + T_FOREACH => 7, + T_FUNCTION => 8, + T_FUNC_C => 12, + T_GLOBAL => 6, + T_GOTO => 4, + T_HALT_COMPILER => 15, + T_IF => 2, + T_IMPLEMENTS => 10, + T_INC => 2, + T_INCLUDE => 7, + T_INCLUDE_ONCE => 12, + T_INSTANCEOF => 10, + T_INSTEADOF => 9, + T_INTERFACE => 9, + T_ISSET => 5, + T_IS_EQUAL => 2, + T_IS_GREATER_OR_EQUAL => 2, + T_IS_IDENTICAL => 3, + T_IS_NOT_EQUAL => 2, + T_IS_NOT_IDENTICAL => 3, + T_IS_SMALLER_OR_EQUAL => 2, + T_LINE => 8, + T_LIST => 4, + T_LOGICAL_AND => 3, + T_LOGICAL_OR => 2, + T_LOGICAL_XOR => 3, + T_MATCH => 5, + T_MATCH_ARROW => 2, + T_MATCH_DEFAULT => 7, + T_METHOD_C => 10, + T_MINUS_EQUAL => 2, + T_POW_EQUAL => 3, + T_MOD_EQUAL => 2, + T_MUL_EQUAL => 2, + T_NAMESPACE => 9, + T_NS_C => 13, + T_NS_SEPARATOR => 1, + T_NEW => 3, + T_NULLSAFE_OBJECT_OPERATOR => 3, + T_OBJECT_OPERATOR => 2, + T_OPEN_TAG_WITH_ECHO => 3, + T_OR_EQUAL => 2, + T_PLUS_EQUAL => 2, + T_PRINT => 5, + T_PRIVATE => 7, + T_PUBLIC => 6, + T_PROTECTED => 9, + T_REQUIRE => 7, + T_REQUIRE_ONCE => 12, + T_RETURN => 6, + T_STATIC => 6, + T_SWITCH => 6, + T_THROW => 5, + T_TRAIT => 5, + T_TRAIT_C => 9, + T_TRY => 3, + T_UNSET => 5, + T_USE => 3, + T_VAR => 3, + T_WHILE => 5, + T_XOR_EQUAL => 2, + T_YIELD => 5, + T_OPEN_CURLY_BRACKET => 1, + T_CLOSE_CURLY_BRACKET => 1, + T_OPEN_SQUARE_BRACKET => 1, + T_CLOSE_SQUARE_BRACKET => 1, + T_OPEN_PARENTHESIS => 1, + T_CLOSE_PARENTHESIS => 1, + T_COLON => 1, + T_STRING_CONCAT => 1, + T_INLINE_THEN => 1, + T_INLINE_ELSE => 1, + T_NULLABLE => 1, + T_NULL => 4, + T_FALSE => 5, + T_TRUE => 4, + T_SEMICOLON => 1, + T_EQUAL => 1, + T_MULTIPLY => 1, + T_DIVIDE => 1, + T_PLUS => 1, + T_MINUS => 1, + T_MODULUS => 1, + T_POW => 2, + T_SPACESHIP => 3, + T_COALESCE => 2, + T_COALESCE_EQUAL => 3, + T_BITWISE_AND => 1, + T_BITWISE_OR => 1, + T_BITWISE_XOR => 1, + T_SL => 2, + T_SR => 2, + T_SL_EQUAL => 3, + T_SR_EQUAL => 3, + T_GREATER_THAN => 1, + T_LESS_THAN => 1, + T_BOOLEAN_NOT => 1, + T_SELF => 4, + T_PARENT => 6, + T_COMMA => 1, + T_THIS => 4, + T_CLOSURE => 8, + T_BACKTICK => 1, + T_OPEN_SHORT_ARRAY => 1, + T_CLOSE_SHORT_ARRAY => 1, + T_TYPE_UNION => 1, + ]; + + /** + * Contexts in which keywords should always be tokenized as T_STRING. + * + * @var array + */ + protected $tstringContexts = [ + T_OBJECT_OPERATOR => true, + T_NULLSAFE_OBJECT_OPERATOR => true, + T_FUNCTION => true, + T_CLASS => true, + T_INTERFACE => true, + T_TRAIT => true, + T_EXTENDS => true, + T_IMPLEMENTS => true, + T_ATTRIBUTE => true, + T_NEW => true, + T_CONST => true, + T_NS_SEPARATOR => true, + T_USE => true, + T_NAMESPACE => true, + T_PAAMAYIM_NEKUDOTAYIM => true, + ]; + + /** + * A cache of different token types, resolved into arrays. + * + * @var array + * @see standardiseToken() + */ + private static $resolveTokenCache = []; + + + /** + * Creates an array of tokens when given some PHP code. + * + * Starts by using token_get_all() but does a lot of extra processing + * to insert information about the context of the token. + * + * @param string $string The string to tokenize. + * + * @return array + */ + protected function tokenize($string) + { + if (PHP_CODESNIFFER_VERBOSITY > 1) { + echo "\t*** START PHP TOKENIZING ***".PHP_EOL; + $isWin = false; + if (strtoupper(substr(PHP_OS, 0, 3)) === 'WIN') { + $isWin = true; + } + } + + $tokens = @token_get_all($string); + $finalTokens = []; + + $newStackPtr = 0; + $numTokens = count($tokens); + $lastNotEmptyToken = 0; + + $insideInlineIf = []; + $insideUseGroup = false; + + $commentTokenizer = new Comment(); + + for ($stackPtr = 0; $stackPtr < $numTokens; $stackPtr++) { + // Special case for tokens we have needed to blank out. + if ($tokens[$stackPtr] === null) { + continue; + } + + $token = (array) $tokens[$stackPtr]; + $tokenIsArray = isset($token[1]); + + if (PHP_CODESNIFFER_VERBOSITY > 1) { + if ($tokenIsArray === true) { + $type = Util\Tokens::tokenName($token[0]); + $content = Util\Common::prepareForOutput($token[1]); + } else { + $newToken = self::resolveSimpleToken($token[0]); + $type = $newToken['type']; + $content = Util\Common::prepareForOutput($token[0]); + } + + echo "\tProcess token "; + if ($tokenIsArray === true) { + echo "[$stackPtr]"; + } else { + echo " $stackPtr "; + } + + echo ": $type => $content"; + }//end if + + if ($newStackPtr > 0 + && isset(Util\Tokens::$emptyTokens[$finalTokens[($newStackPtr - 1)]['code']]) === false + ) { + $lastNotEmptyToken = ($newStackPtr - 1); + } + + /* + If we are using \r\n newline characters, the \r and \n are sometimes + split over two tokens. This normally occurs after comments. We need + to merge these two characters together so that our line endings are + consistent for all lines. + */ + + if ($tokenIsArray === true && substr($token[1], -1) === "\r") { + if (isset($tokens[($stackPtr + 1)]) === true + && is_array($tokens[($stackPtr + 1)]) === true + && $tokens[($stackPtr + 1)][1][0] === "\n" + ) { + $token[1] .= "\n"; + if (PHP_CODESNIFFER_VERBOSITY > 1) { + if ($isWin === true) { + echo '\n'; + } else { + echo "\033[30;1m\\n\033[0m"; + } + } + + if ($tokens[($stackPtr + 1)][1] === "\n") { + // This token's content has been merged into the previous, + // so we can skip it. + $tokens[($stackPtr + 1)] = ''; + } else { + $tokens[($stackPtr + 1)][1] = substr($tokens[($stackPtr + 1)][1], 1); + } + } + }//end if + + if (PHP_CODESNIFFER_VERBOSITY > 1) { + echo PHP_EOL; + } + + /* + Parse doc blocks into something that can be easily iterated over. + */ + + if ($tokenIsArray === true + && ($token[0] === T_DOC_COMMENT + || ($token[0] === T_COMMENT && strpos($token[1], '/**') === 0)) + ) { + $commentTokens = $commentTokenizer->tokenizeString($token[1], $this->eolChar, $newStackPtr); + foreach ($commentTokens as $commentToken) { + $finalTokens[$newStackPtr] = $commentToken; + $newStackPtr++; + } + + continue; + } + + /* + PHP 8 tokenizes a new line after a slash and hash comment to the next whitespace token. + */ + + if (PHP_VERSION_ID >= 80000 + && $tokenIsArray === true + && ($token[0] === T_COMMENT && (strpos($token[1], '//') === 0 || strpos($token[1], '#') === 0)) + && isset($tokens[($stackPtr + 1)]) === true + && is_array($tokens[($stackPtr + 1)]) === true + && $tokens[($stackPtr + 1)][0] === T_WHITESPACE + ) { + $nextToken = $tokens[($stackPtr + 1)]; + + // If the next token is a single new line, merge it into the comment token + // and set to it up to be skipped. + if ($nextToken[1] === "\n" || $nextToken[1] === "\r\n" || $nextToken[1] === "\n\r") { + $token[1] .= $nextToken[1]; + $tokens[($stackPtr + 1)] = null; + + if (PHP_CODESNIFFER_VERBOSITY > 1) { + echo "\t\t* merged newline after comment into comment token $stackPtr".PHP_EOL; + } + } else { + // This may be a whitespace token consisting of multiple new lines. + if (strpos($nextToken[1], "\r\n") === 0) { + $token[1] .= "\r\n"; + $tokens[($stackPtr + 1)][1] = substr($nextToken[1], 2); + } else if (strpos($nextToken[1], "\n\r") === 0) { + $token[1] .= "\n\r"; + $tokens[($stackPtr + 1)][1] = substr($nextToken[1], 2); + } else if (strpos($nextToken[1], "\n") === 0) { + $token[1] .= "\n"; + $tokens[($stackPtr + 1)][1] = substr($nextToken[1], 1); + } + + if (PHP_CODESNIFFER_VERBOSITY > 1) { + echo "\t\t* stripped first newline after comment and added it to comment token $stackPtr".PHP_EOL; + } + }//end if + }//end if + + /* + PHP 8.1 introduced two dedicated tokens for the & character. + Retokenizing both of these to T_BITWISE_AND, which is the + token PHPCS already tokenized them as. + */ + + if ($tokenIsArray === true + && ($token[0] === T_AMPERSAND_FOLLOWED_BY_VAR_OR_VARARG + || $token[0] === T_AMPERSAND_NOT_FOLLOWED_BY_VAR_OR_VARARG) + ) { + $finalTokens[$newStackPtr] = [ + 'code' => T_BITWISE_AND, + 'type' => 'T_BITWISE_AND', + 'content' => $token[1], + ]; + $newStackPtr++; + continue; + } + + /* + If this is a double quoted string, PHP will tokenize the whole + thing which causes problems with the scope map when braces are + within the string. So we need to merge the tokens together to + provide a single string. + */ + + if ($tokenIsArray === false && ($token[0] === '"' || $token[0] === 'b"')) { + // Binary casts need a special token. + if ($token[0] === 'b"') { + $finalTokens[$newStackPtr] = [ + 'code' => T_BINARY_CAST, + 'type' => 'T_BINARY_CAST', + 'content' => 'b', + ]; + $newStackPtr++; + } + + $tokenContent = '"'; + $nestedVars = []; + for ($i = ($stackPtr + 1); $i < $numTokens; $i++) { + $subToken = (array) $tokens[$i]; + $subTokenIsArray = isset($subToken[1]); + + if ($subTokenIsArray === true) { + $tokenContent .= $subToken[1]; + if ($subToken[1] === '{' + && $subToken[0] !== T_ENCAPSED_AND_WHITESPACE + ) { + $nestedVars[] = $i; + } + } else { + $tokenContent .= $subToken[0]; + if ($subToken[0] === '}') { + array_pop($nestedVars); + } + } + + if ($subTokenIsArray === false + && $subToken[0] === '"' + && empty($nestedVars) === true + ) { + // We found the other end of the double quoted string. + break; + } + }//end for + + $stackPtr = $i; + + // Convert each line within the double quoted string to a + // new token, so it conforms with other multiple line tokens. + $tokenLines = explode($this->eolChar, $tokenContent); + $numLines = count($tokenLines); + $newToken = []; + + for ($j = 0; $j < $numLines; $j++) { + $newToken['content'] = $tokenLines[$j]; + if ($j === ($numLines - 1)) { + if ($tokenLines[$j] === '') { + break; + } + } else { + $newToken['content'] .= $this->eolChar; + } + + $newToken['code'] = T_DOUBLE_QUOTED_STRING; + $newToken['type'] = 'T_DOUBLE_QUOTED_STRING'; + $finalTokens[$newStackPtr] = $newToken; + $newStackPtr++; + } + + // Continue, as we're done with this token. + continue; + }//end if + + /* + Detect binary casting and assign the casts their own token. + */ + + if ($tokenIsArray === true + && $token[0] === T_CONSTANT_ENCAPSED_STRING + && (substr($token[1], 0, 2) === 'b"' + || substr($token[1], 0, 2) === "b'") + ) { + $finalTokens[$newStackPtr] = [ + 'code' => T_BINARY_CAST, + 'type' => 'T_BINARY_CAST', + 'content' => 'b', + ]; + $newStackPtr++; + $token[1] = substr($token[1], 1); + } + + if ($tokenIsArray === true + && $token[0] === T_STRING_CAST + && preg_match('`^\(\s*binary\s*\)$`i', $token[1]) === 1 + ) { + $finalTokens[$newStackPtr] = [ + 'code' => T_BINARY_CAST, + 'type' => 'T_BINARY_CAST', + 'content' => $token[1], + ]; + $newStackPtr++; + continue; + } + + /* + If this is a heredoc, PHP will tokenize the whole + thing which causes problems when heredocs don't + contain real PHP code, which is almost never. + We want to leave the start and end heredoc tokens + alone though. + */ + + if ($tokenIsArray === true && $token[0] === T_START_HEREDOC) { + // Add the start heredoc token to the final array. + $finalTokens[$newStackPtr] = self::standardiseToken($token); + + // Check if this is actually a nowdoc and use a different token + // to help the sniffs. + $nowdoc = false; + if (strpos($token[1], "'") !== false) { + $finalTokens[$newStackPtr]['code'] = T_START_NOWDOC; + $finalTokens[$newStackPtr]['type'] = 'T_START_NOWDOC'; + $nowdoc = true; + } + + $tokenContent = ''; + for ($i = ($stackPtr + 1); $i < $numTokens; $i++) { + $subTokenIsArray = is_array($tokens[$i]); + if ($subTokenIsArray === true + && $tokens[$i][0] === T_END_HEREDOC + ) { + // We found the other end of the heredoc. + break; + } + + if ($subTokenIsArray === true) { + $tokenContent .= $tokens[$i][1]; + } else { + $tokenContent .= $tokens[$i]; + } + } + + if ($i === $numTokens) { + // We got to the end of the file and never + // found the closing token, so this probably wasn't + // a heredoc. + if (PHP_CODESNIFFER_VERBOSITY > 1) { + $type = $finalTokens[$newStackPtr]['type']; + echo "\t\t* failed to find the end of the here/nowdoc".PHP_EOL; + echo "\t\t* token $stackPtr changed from $type to T_STRING".PHP_EOL; + } + + $finalTokens[$newStackPtr]['code'] = T_STRING; + $finalTokens[$newStackPtr]['type'] = 'T_STRING'; + $newStackPtr++; + continue; + } + + $stackPtr = $i; + $newStackPtr++; + + // Convert each line within the heredoc to a + // new token, so it conforms with other multiple line tokens. + $tokenLines = explode($this->eolChar, $tokenContent); + $numLines = count($tokenLines); + $newToken = []; + + for ($j = 0; $j < $numLines; $j++) { + $newToken['content'] = $tokenLines[$j]; + if ($j === ($numLines - 1)) { + if ($tokenLines[$j] === '') { + break; + } + } else { + $newToken['content'] .= $this->eolChar; + } + + if ($nowdoc === true) { + $newToken['code'] = T_NOWDOC; + $newToken['type'] = 'T_NOWDOC'; + } else { + $newToken['code'] = T_HEREDOC; + $newToken['type'] = 'T_HEREDOC'; + } + + $finalTokens[$newStackPtr] = $newToken; + $newStackPtr++; + }//end for + + // Add the end heredoc token to the final array. + $finalTokens[$newStackPtr] = self::standardiseToken($tokens[$stackPtr]); + + if ($nowdoc === true) { + $finalTokens[$newStackPtr]['code'] = T_END_NOWDOC; + $finalTokens[$newStackPtr]['type'] = 'T_END_NOWDOC'; + } + + $newStackPtr++; + + // Continue, as we're done with this token. + continue; + }//end if + + /* + As of PHP 8.0 fully qualified, partially qualified and namespace relative + identifier names are tokenized differently. + This "undoes" the new tokenization so the tokenization will be the same in + in PHP 5, 7 and 8. + */ + + if (PHP_VERSION_ID >= 80000 + && $tokenIsArray === true + && ($token[0] === T_NAME_QUALIFIED + || $token[0] === T_NAME_FULLY_QUALIFIED + || $token[0] === T_NAME_RELATIVE) + ) { + $name = $token[1]; + + if ($token[0] === T_NAME_FULLY_QUALIFIED) { + $newToken = []; + $newToken['code'] = T_NS_SEPARATOR; + $newToken['type'] = 'T_NS_SEPARATOR'; + $newToken['content'] = '\\'; + $finalTokens[$newStackPtr] = $newToken; + ++$newStackPtr; + + $name = ltrim($name, '\\'); + } + + if ($token[0] === T_NAME_RELATIVE) { + $newToken = []; + $newToken['code'] = T_NAMESPACE; + $newToken['type'] = 'T_NAMESPACE'; + $newToken['content'] = substr($name, 0, 9); + $finalTokens[$newStackPtr] = $newToken; + ++$newStackPtr; + + $newToken = []; + $newToken['code'] = T_NS_SEPARATOR; + $newToken['type'] = 'T_NS_SEPARATOR'; + $newToken['content'] = '\\'; + $finalTokens[$newStackPtr] = $newToken; + ++$newStackPtr; + + $name = substr($name, 10); + } + + $parts = explode('\\', $name); + $partCount = count($parts); + $lastPart = ($partCount - 1); + + foreach ($parts as $i => $part) { + $newToken = []; + $newToken['code'] = T_STRING; + $newToken['type'] = 'T_STRING'; + $newToken['content'] = $part; + $finalTokens[$newStackPtr] = $newToken; + ++$newStackPtr; + + if ($i !== $lastPart) { + $newToken = []; + $newToken['code'] = T_NS_SEPARATOR; + $newToken['type'] = 'T_NS_SEPARATOR'; + $newToken['content'] = '\\'; + $finalTokens[$newStackPtr] = $newToken; + ++$newStackPtr; + } + } + + if (PHP_CODESNIFFER_VERBOSITY > 1) { + $type = Util\Tokens::tokenName($token[0]); + $content = Util\Common::prepareForOutput($token[1]); + echo "\t\t* token $stackPtr split into individual tokens; was: $type => $content".PHP_EOL; + } + + continue; + }//end if + + /* + PHP 8.0 Attributes + */ + + if (PHP_VERSION_ID < 80000 + && $token[0] === T_COMMENT + && strpos($token[1], '#[') === 0 + ) { + $subTokens = $this->parsePhpAttribute($tokens, $stackPtr); + if ($subTokens !== null) { + array_splice($tokens, $stackPtr, 1, $subTokens); + $numTokens = count($tokens); + + $tokenIsArray = true; + $token = $tokens[$stackPtr]; + } else { + $token[0] = T_ATTRIBUTE; + } + } + + if ($tokenIsArray === true + && $token[0] === T_ATTRIBUTE + ) { + // Go looking for the close bracket. + $bracketCloser = $this->findCloser($tokens, ($stackPtr + 1), ['[', '#['], ']'); + + $newToken = []; + $newToken['code'] = T_ATTRIBUTE; + $newToken['type'] = 'T_ATTRIBUTE'; + $newToken['content'] = '#['; + $finalTokens[$newStackPtr] = $newToken; + + $tokens[$bracketCloser] = []; + $tokens[$bracketCloser][0] = T_ATTRIBUTE_END; + $tokens[$bracketCloser][1] = ']'; + + if (PHP_CODESNIFFER_VERBOSITY > 1) { + echo "\t\t* token $bracketCloser changed from T_CLOSE_SQUARE_BRACKET to T_ATTRIBUTE_END".PHP_EOL; + } + + $newStackPtr++; + continue; + }//end if + + /* + Tokenize the parameter labels for PHP 8.0 named parameters as a special T_PARAM_NAME + token and ensure that the colon after it is always T_COLON. + */ + + if ($tokenIsArray === true + && ($token[0] === T_STRING + || preg_match('`^[a-zA-Z_\x80-\xff]`', $token[1]) === 1) + ) { + // Get the next non-empty token. + for ($i = ($stackPtr + 1); $i < $numTokens; $i++) { + if (is_array($tokens[$i]) === false + || isset(Util\Tokens::$emptyTokens[$tokens[$i][0]]) === false + ) { + break; + } + } + + if (isset($tokens[$i]) === true + && is_array($tokens[$i]) === false + && $tokens[$i] === ':' + ) { + // Get the previous non-empty token. + for ($j = ($stackPtr - 1); $j > 0; $j--) { + if (is_array($tokens[$j]) === false + || isset(Util\Tokens::$emptyTokens[$tokens[$j][0]]) === false + ) { + break; + } + } + + if (is_array($tokens[$j]) === false + && ($tokens[$j] === '(' + || $tokens[$j] === ',') + ) { + $newToken = []; + $newToken['code'] = T_PARAM_NAME; + $newToken['type'] = 'T_PARAM_NAME'; + $newToken['content'] = $token[1]; + $finalTokens[$newStackPtr] = $newToken; + + $newStackPtr++; + + // Modify the original token stack so that future checks, like + // determining T_COLON vs T_INLINE_ELSE can handle this correctly. + $tokens[$stackPtr][0] = T_PARAM_NAME; + + if (PHP_CODESNIFFER_VERBOSITY > 1) { + $type = Util\Tokens::tokenName($token[0]); + echo "\t\t* token $stackPtr changed from $type to T_PARAM_NAME".PHP_EOL; + } + + continue; + } + }//end if + }//end if + + /* + Before PHP 7.0, the "yield from" was tokenized as + T_YIELD, T_WHITESPACE and T_STRING. So look for + and change this token in earlier versions. + */ + + if (PHP_VERSION_ID < 70000 + && PHP_VERSION_ID >= 50500 + && $tokenIsArray === true + && $token[0] === T_YIELD + && isset($tokens[($stackPtr + 1)]) === true + && isset($tokens[($stackPtr + 2)]) === true + && $tokens[($stackPtr + 1)][0] === T_WHITESPACE + && $tokens[($stackPtr + 2)][0] === T_STRING + && strtolower($tokens[($stackPtr + 2)][1]) === 'from' + ) { + // Could be multi-line, so adjust the token stack. + $token[0] = T_YIELD_FROM; + $token[1] .= $tokens[($stackPtr + 1)][1].$tokens[($stackPtr + 2)][1]; + + if (PHP_CODESNIFFER_VERBOSITY > 1) { + for ($i = ($stackPtr + 1); $i <= ($stackPtr + 2); $i++) { + $type = Util\Tokens::tokenName($tokens[$i][0]); + $content = Util\Common::prepareForOutput($tokens[$i][1]); + echo "\t\t* token $i merged into T_YIELD_FROM; was: $type => $content".PHP_EOL; + } + } + + $tokens[($stackPtr + 1)] = null; + $tokens[($stackPtr + 2)] = null; + } + + /* + Before PHP 5.5, the yield keyword was tokenized as + T_STRING. So look for and change this token in + earlier versions. + Checks also if it is just "yield" or "yield from". + */ + + if (PHP_VERSION_ID < 50500 + && $tokenIsArray === true + && $token[0] === T_STRING + && strtolower($token[1]) === 'yield' + ) { + if (isset($tokens[($stackPtr + 1)]) === true + && isset($tokens[($stackPtr + 2)]) === true + && $tokens[($stackPtr + 1)][0] === T_WHITESPACE + && $tokens[($stackPtr + 2)][0] === T_STRING + && strtolower($tokens[($stackPtr + 2)][1]) === 'from' + ) { + // Could be multi-line, so just just the token stack. + $token[0] = T_YIELD_FROM; + $token[1] .= $tokens[($stackPtr + 1)][1].$tokens[($stackPtr + 2)][1]; + + if (PHP_CODESNIFFER_VERBOSITY > 1) { + for ($i = ($stackPtr + 1); $i <= ($stackPtr + 2); $i++) { + $type = Util\Tokens::tokenName($tokens[$i][0]); + $content = Util\Common::prepareForOutput($tokens[$i][1]); + echo "\t\t* token $i merged into T_YIELD_FROM; was: $type => $content".PHP_EOL; + } + } + + $tokens[($stackPtr + 1)] = null; + $tokens[($stackPtr + 2)] = null; + } else { + $newToken = []; + $newToken['code'] = T_YIELD; + $newToken['type'] = 'T_YIELD'; + $newToken['content'] = $token[1]; + $finalTokens[$newStackPtr] = $newToken; + + $newStackPtr++; + continue; + }//end if + }//end if + + /* + Before PHP 5.6, the ... operator was tokenized as three + T_STRING_CONCAT tokens in a row. So look for and combine + these tokens in earlier versions. + */ + + if ($tokenIsArray === false + && $token[0] === '.' + && isset($tokens[($stackPtr + 1)]) === true + && isset($tokens[($stackPtr + 2)]) === true + && $tokens[($stackPtr + 1)] === '.' + && $tokens[($stackPtr + 2)] === '.' + ) { + $newToken = []; + $newToken['code'] = T_ELLIPSIS; + $newToken['type'] = 'T_ELLIPSIS'; + $newToken['content'] = '...'; + $finalTokens[$newStackPtr] = $newToken; + + $newStackPtr++; + $stackPtr += 2; + continue; + } + + /* + Before PHP 5.6, the ** operator was tokenized as two + T_MULTIPLY tokens in a row. So look for and combine + these tokens in earlier versions. + */ + + if ($tokenIsArray === false + && $token[0] === '*' + && isset($tokens[($stackPtr + 1)]) === true + && $tokens[($stackPtr + 1)] === '*' + ) { + $newToken = []; + $newToken['code'] = T_POW; + $newToken['type'] = 'T_POW'; + $newToken['content'] = '**'; + $finalTokens[$newStackPtr] = $newToken; + + $newStackPtr++; + $stackPtr++; + continue; + } + + /* + Before PHP 5.6, the **= operator was tokenized as + T_MULTIPLY followed by T_MUL_EQUAL. So look for and combine + these tokens in earlier versions. + */ + + if ($tokenIsArray === false + && $token[0] === '*' + && isset($tokens[($stackPtr + 1)]) === true + && is_array($tokens[($stackPtr + 1)]) === true + && $tokens[($stackPtr + 1)][1] === '*=' + ) { + $newToken = []; + $newToken['code'] = T_POW_EQUAL; + $newToken['type'] = 'T_POW_EQUAL'; + $newToken['content'] = '**='; + $finalTokens[$newStackPtr] = $newToken; + + $newStackPtr++; + $stackPtr++; + continue; + } + + /* + Before PHP 7, the ??= operator was tokenized as + T_INLINE_THEN, T_INLINE_THEN, T_EQUAL. + Between PHP 7.0 and 7.3, the ??= operator was tokenized as + T_COALESCE, T_EQUAL. + So look for and combine these tokens in earlier versions. + */ + + if (($tokenIsArray === false + && $token[0] === '?' + && isset($tokens[($stackPtr + 1)]) === true + && $tokens[($stackPtr + 1)][0] === '?' + && isset($tokens[($stackPtr + 2)]) === true + && $tokens[($stackPtr + 2)][0] === '=') + || ($tokenIsArray === true + && $token[0] === T_COALESCE + && isset($tokens[($stackPtr + 1)]) === true + && $tokens[($stackPtr + 1)][0] === '=') + ) { + $newToken = []; + $newToken['code'] = T_COALESCE_EQUAL; + $newToken['type'] = 'T_COALESCE_EQUAL'; + $newToken['content'] = '??='; + $finalTokens[$newStackPtr] = $newToken; + + $newStackPtr++; + $stackPtr++; + + if ($tokenIsArray === false) { + // Pre PHP 7. + $stackPtr++; + } + + continue; + } + + /* + Before PHP 7, the ?? operator was tokenized as + T_INLINE_THEN followed by T_INLINE_THEN. + So look for and combine these tokens in earlier versions. + */ + + if ($tokenIsArray === false + && $token[0] === '?' + && isset($tokens[($stackPtr + 1)]) === true + && $tokens[($stackPtr + 1)][0] === '?' + ) { + $newToken = []; + $newToken['code'] = T_COALESCE; + $newToken['type'] = 'T_COALESCE'; + $newToken['content'] = '??'; + $finalTokens[$newStackPtr] = $newToken; + + $newStackPtr++; + $stackPtr++; + continue; + } + + /* + Before PHP 8, the ?-> operator was tokenized as + T_INLINE_THEN followed by T_OBJECT_OPERATOR. + So look for and combine these tokens in earlier versions. + */ + + if ($tokenIsArray === false + && $token[0] === '?' + && isset($tokens[($stackPtr + 1)]) === true + && is_array($tokens[($stackPtr + 1)]) === true + && $tokens[($stackPtr + 1)][0] === T_OBJECT_OPERATOR + ) { + $newToken = []; + $newToken['code'] = T_NULLSAFE_OBJECT_OPERATOR; + $newToken['type'] = 'T_NULLSAFE_OBJECT_OPERATOR'; + $newToken['content'] = '?->'; + $finalTokens[$newStackPtr] = $newToken; + + $newStackPtr++; + $stackPtr++; + continue; + } + + /* + Before PHP 7.4, underscores inside T_LNUMBER and T_DNUMBER + tokens split the token with a T_STRING. So look for + and change these tokens in earlier versions. + */ + + if (PHP_VERSION_ID < 70400 + && ($tokenIsArray === true + && ($token[0] === T_LNUMBER + || $token[0] === T_DNUMBER) + && isset($tokens[($stackPtr + 1)]) === true + && is_array($tokens[($stackPtr + 1)]) === true + && $tokens[($stackPtr + 1)][0] === T_STRING + && $tokens[($stackPtr + 1)][1][0] === '_') + ) { + $newContent = $token[1]; + $newType = $token[0]; + for ($i = ($stackPtr + 1); $i < $numTokens; $i++) { + if (is_array($tokens[$i]) === false) { + break; + } + + if ($tokens[$i][0] === T_LNUMBER + || $tokens[$i][0] === T_DNUMBER + ) { + $newContent .= $tokens[$i][1]; + continue; + } + + if ($tokens[$i][0] === T_STRING + && $tokens[$i][1][0] === '_' + && ((strpos($newContent, '0x') === 0 + && preg_match('`^((? PHP_INT_MAX) + || (stripos($newContent, '0b') === 0 && bindec(str_replace('_', '', $newContent)) > PHP_INT_MAX) + || (stripos($newContent, '0x') !== 0 + && stripos($newContent, 'e') !== false || strpos($newContent, '.') !== false) + || (strpos($newContent, '0') === 0 && stripos($newContent, '0x') !== 0 + && stripos($newContent, '0b') !== 0 && octdec(str_replace('_', '', $newContent)) > PHP_INT_MAX) + || (strpos($newContent, '0') !== 0 && str_replace('_', '', $newContent) > PHP_INT_MAX)) + ) { + $newType = T_DNUMBER; + } + + $newToken = []; + $newToken['code'] = $newType; + $newToken['type'] = Util\Tokens::tokenName($newType); + $newToken['content'] = $newContent; + $finalTokens[$newStackPtr] = $newToken; + + $newStackPtr++; + $stackPtr = ($i - 1); + continue; + }//end if + + /* + Backfill the T_MATCH token for PHP versions < 8.0 and + do initial correction for non-match expression T_MATCH tokens + to T_STRING for PHP >= 8.0. + A final check for non-match expression T_MATCH tokens is done + in PHP::processAdditional(). + */ + + if ($tokenIsArray === true + && (($token[0] === T_STRING + && strtolower($token[1]) === 'match') + || $token[0] === T_MATCH) + ) { + $isMatch = false; + for ($x = ($stackPtr + 1); $x < $numTokens; $x++) { + if (isset($tokens[$x][0], Util\Tokens::$emptyTokens[$tokens[$x][0]]) === true) { + continue; + } + + if ($tokens[$x] !== '(') { + // This is not a match expression. + break; + } + + if (isset($this->tstringContexts[$finalTokens[$lastNotEmptyToken]['code']]) === true) { + // Also not a match expression. + break; + } + + $isMatch = true; + break; + }//end for + + if ($isMatch === true && $token[0] === T_STRING) { + $newToken = []; + $newToken['code'] = T_MATCH; + $newToken['type'] = 'T_MATCH'; + $newToken['content'] = $token[1]; + + if (PHP_CODESNIFFER_VERBOSITY > 1) { + echo "\t\t* token $stackPtr changed from T_STRING to T_MATCH".PHP_EOL; + } + + $finalTokens[$newStackPtr] = $newToken; + $newStackPtr++; + continue; + } else if ($isMatch === false && $token[0] === T_MATCH) { + // PHP 8.0, match keyword, but not a match expression. + $newToken = []; + $newToken['code'] = T_STRING; + $newToken['type'] = 'T_STRING'; + $newToken['content'] = $token[1]; + + if (PHP_CODESNIFFER_VERBOSITY > 1) { + echo "\t\t* token $stackPtr changed from T_MATCH to T_STRING".PHP_EOL; + } + + $finalTokens[$newStackPtr] = $newToken; + $newStackPtr++; + continue; + }//end if + }//end if + + /* + Retokenize the T_DEFAULT in match control structures as T_MATCH_DEFAULT + to prevent scope being set and the scope for switch default statements + breaking. + */ + + if ($tokenIsArray === true + && $token[0] === T_DEFAULT + ) { + if (isset($this->tstringContexts[$finalTokens[$lastNotEmptyToken]['code']]) === false) { + for ($x = ($stackPtr + 1); $x < $numTokens; $x++) { + if ($tokens[$x] === ',') { + // Skip over potential trailing comma (supported in PHP). + continue; + } + + if (is_array($tokens[$x]) === false + || isset(Util\Tokens::$emptyTokens[$tokens[$x][0]]) === false + ) { + // Non-empty, non-comma content. + break; + } + } + + if (isset($tokens[$x]) === true + && is_array($tokens[$x]) === true + && $tokens[$x][0] === T_DOUBLE_ARROW + ) { + // Modify the original token stack for the double arrow so that + // future checks can disregard the double arrow token more easily. + // For match expression "case" statements, this is handled + // in PHP::processAdditional(). + $tokens[$x][0] = T_MATCH_ARROW; + if (PHP_CODESNIFFER_VERBOSITY > 1) { + echo "\t\t* token $x changed from T_DOUBLE_ARROW to T_MATCH_ARROW".PHP_EOL; + } + + $newToken = []; + $newToken['code'] = T_MATCH_DEFAULT; + $newToken['type'] = 'T_MATCH_DEFAULT'; + $newToken['content'] = $token[1]; + + if (PHP_CODESNIFFER_VERBOSITY > 1) { + echo "\t\t* token $stackPtr changed from T_DEFAULT to T_MATCH_DEFAULT".PHP_EOL; + } + + $finalTokens[$newStackPtr] = $newToken; + $newStackPtr++; + continue; + }//end if + } else { + // Definitely not the "default" keyword. + $newToken = []; + $newToken['code'] = T_STRING; + $newToken['type'] = 'T_STRING'; + $newToken['content'] = $token[1]; + + if (PHP_CODESNIFFER_VERBOSITY > 1) { + echo "\t\t* token $stackPtr changed from T_DEFAULT to T_STRING".PHP_EOL; + } + + $finalTokens[$newStackPtr] = $newToken; + $newStackPtr++; + continue; + }//end if + }//end if + + /* + Convert ? to T_NULLABLE OR T_INLINE_THEN + */ + + if ($tokenIsArray === false && $token[0] === '?') { + $newToken = []; + $newToken['content'] = '?'; + + /* + * Check if the next non-empty token is one of the tokens which can be used + * in type declarations. If not, it's definitely a ternary. + * At this point, the only token types which need to be taken into consideration + * as potential type declarations are identifier names, T_ARRAY, T_CALLABLE and T_NS_SEPARATOR. + */ + + $lastRelevantNonEmpty = null; + + for ($i = ($stackPtr + 1); $i < $numTokens; $i++) { + if (is_array($tokens[$i]) === true) { + $tokenType = $tokens[$i][0]; + } else { + $tokenType = $tokens[$i]; + } + + if (isset(Util\Tokens::$emptyTokens[$tokenType]) === true) { + continue; + } + + if ($tokenType === T_STRING + || $tokenType === T_NAME_FULLY_QUALIFIED + || $tokenType === T_NAME_RELATIVE + || $tokenType === T_NAME_QUALIFIED + || $tokenType === T_ARRAY + || $tokenType === T_NAMESPACE + || $tokenType === T_NS_SEPARATOR + ) { + $lastRelevantNonEmpty = $tokenType; + continue; + } + + if (($tokenType !== T_CALLABLE + && isset($lastRelevantNonEmpty) === false) + || ($lastRelevantNonEmpty === T_ARRAY + && $tokenType === '(') + || (($lastRelevantNonEmpty === T_STRING + || $lastRelevantNonEmpty === T_NAME_FULLY_QUALIFIED + || $lastRelevantNonEmpty === T_NAME_RELATIVE + || $lastRelevantNonEmpty === T_NAME_QUALIFIED) + && ($tokenType === T_DOUBLE_COLON + || $tokenType === '(' + || $tokenType === ':')) + ) { + if (PHP_CODESNIFFER_VERBOSITY > 1) { + echo "\t\t* token $stackPtr changed from ? to T_INLINE_THEN".PHP_EOL; + } + + $newToken['code'] = T_INLINE_THEN; + $newToken['type'] = 'T_INLINE_THEN'; + + $insideInlineIf[] = $stackPtr; + + $finalTokens[$newStackPtr] = $newToken; + $newStackPtr++; + continue 2; + } + + break; + }//end for + + /* + * This can still be a nullable type or a ternary. + * Do additional checking. + */ + + $prevNonEmpty = null; + $lastSeenNonEmpty = null; + + for ($i = ($stackPtr - 1); $i >= 0; $i--) { + if (is_array($tokens[$i]) === true) { + $tokenType = $tokens[$i][0]; + } else { + $tokenType = $tokens[$i]; + } + + if ($tokenType === T_STATIC + && ($lastSeenNonEmpty === T_DOUBLE_COLON + || $lastSeenNonEmpty === '(') + ) { + $lastSeenNonEmpty = $tokenType; + continue; + } + + if ($prevNonEmpty === null + && isset(Util\Tokens::$emptyTokens[$tokenType]) === false + ) { + // Found the previous non-empty token. + if ($tokenType === ':' || $tokenType === ',' || $tokenType === T_ATTRIBUTE_END) { + $newToken['code'] = T_NULLABLE; + $newToken['type'] = 'T_NULLABLE'; + + if (PHP_CODESNIFFER_VERBOSITY > 1) { + echo "\t\t* token $stackPtr changed from ? to T_NULLABLE".PHP_EOL; + } + + break; + } + + $prevNonEmpty = $tokenType; + } + + if ($tokenType === T_FUNCTION + || $tokenType === T_FN + || isset(Util\Tokens::$methodPrefixes[$tokenType]) === true + || $tokenType === T_VAR + ) { + if (PHP_CODESNIFFER_VERBOSITY > 1) { + echo "\t\t* token $stackPtr changed from ? to T_NULLABLE".PHP_EOL; + } + + $newToken['code'] = T_NULLABLE; + $newToken['type'] = 'T_NULLABLE'; + break; + } else if (in_array($tokenType, [T_DOUBLE_ARROW, T_OPEN_TAG, T_OPEN_TAG_WITH_ECHO, '=', '{', ';'], true) === true) { + if (PHP_CODESNIFFER_VERBOSITY > 1) { + echo "\t\t* token $stackPtr changed from ? to T_INLINE_THEN".PHP_EOL; + } + + $newToken['code'] = T_INLINE_THEN; + $newToken['type'] = 'T_INLINE_THEN'; + + $insideInlineIf[] = $stackPtr; + break; + } + + if (isset(Util\Tokens::$emptyTokens[$tokenType]) === false) { + $lastSeenNonEmpty = $tokenType; + } + }//end for + + $finalTokens[$newStackPtr] = $newToken; + $newStackPtr++; + continue; + }//end if + + /* + Tokens after a double colon may look like scope openers, + such as when writing code like Foo::NAMESPACE, but they are + only ever variables or strings. + */ + + if ($stackPtr > 1 + && (is_array($tokens[($stackPtr - 1)]) === true + && $tokens[($stackPtr - 1)][0] === T_PAAMAYIM_NEKUDOTAYIM) + && $tokenIsArray === true + && $token[0] !== T_STRING + && $token[0] !== T_VARIABLE + && $token[0] !== T_DOLLAR + && isset(Util\Tokens::$emptyTokens[$token[0]]) === false + ) { + $newToken = []; + $newToken['code'] = T_STRING; + $newToken['type'] = 'T_STRING'; + $newToken['content'] = $token[1]; + $finalTokens[$newStackPtr] = $newToken; + + $newStackPtr++; + continue; + } + + /* + Backfill the T_FN token for PHP versions < 7.4. + */ + + if ($tokenIsArray === true + && $token[0] === T_STRING + && strtolower($token[1]) === 'fn' + ) { + // Modify the original token stack so that + // future checks (like looking for T_NULLABLE) can + // detect the T_FN token more easily. + $tokens[$stackPtr][0] = T_FN; + $token[0] = T_FN; + if (PHP_CODESNIFFER_VERBOSITY > 1) { + echo "\t\t* token $stackPtr changed from T_STRING to T_FN".PHP_EOL; + } + } + + /* + The string-like token after a function keyword should always be + tokenized as T_STRING even if it appears to be a different token, + such as when writing code like: function default(): foo + so go forward and change the token type before it is processed. + + Note: this should not be done for `function Level\Name` within a + group use statement for the PHP 8 identifier name tokens as it + would interfere with the re-tokenization of those. + */ + + if ($tokenIsArray === true + && ($token[0] === T_FUNCTION + || $token[0] === T_FN) + && $finalTokens[$lastNotEmptyToken]['code'] !== T_USE + ) { + if ($token[0] === T_FUNCTION) { + for ($x = ($stackPtr + 1); $x < $numTokens; $x++) { + if (is_array($tokens[$x]) === false + || (isset(Util\Tokens::$emptyTokens[$tokens[$x][0]]) === false + && $tokens[$x][1] !== '&') + ) { + // Non-empty content. + break; + } + } + + if ($x < $numTokens + && is_array($tokens[$x]) === true + && $tokens[$x][0] !== T_STRING + && $tokens[$x][0] !== T_NAME_QUALIFIED + ) { + if (PHP_CODESNIFFER_VERBOSITY > 1) { + $oldType = Util\Tokens::tokenName($tokens[$x][0]); + echo "\t\t* token $x changed from $oldType to T_STRING".PHP_EOL; + } + + $tokens[$x][0] = T_STRING; + } + }//end if + + /* + This is a special condition for T_ARRAY tokens used for + function return types. We want to keep the parenthesis map clean, + so let's tag these tokens as T_STRING. + */ + + // Go looking for the colon to start the return type hint. + // Start by finding the closing parenthesis of the function. + $parenthesisStack = []; + $parenthesisCloser = false; + for ($x = ($stackPtr + 1); $x < $numTokens; $x++) { + if (is_array($tokens[$x]) === false && $tokens[$x] === '(') { + $parenthesisStack[] = $x; + } else if (is_array($tokens[$x]) === false && $tokens[$x] === ')') { + array_pop($parenthesisStack); + if (empty($parenthesisStack) === true) { + $parenthesisCloser = $x; + break; + } + } + } + + if ($parenthesisCloser !== false) { + for ($x = ($parenthesisCloser + 1); $x < $numTokens; $x++) { + if (is_array($tokens[$x]) === false + || isset(Util\Tokens::$emptyTokens[$tokens[$x][0]]) === false + ) { + // Non-empty content. + if (is_array($tokens[$x]) === true && $tokens[$x][0] === T_USE) { + // Found a use statements, so search ahead for the closing parenthesis. + for ($x += 1; $x < $numTokens; $x++) { + if (is_array($tokens[$x]) === false && $tokens[$x] === ')') { + continue(2); + } + } + } + + break; + } + } + + if (isset($tokens[$x]) === true + && is_array($tokens[$x]) === false + && $tokens[$x] === ':' + ) { + $allowed = [ + T_STRING => T_STRING, + T_NAME_FULLY_QUALIFIED => T_NAME_FULLY_QUALIFIED, + T_NAME_RELATIVE => T_NAME_RELATIVE, + T_NAME_QUALIFIED => T_NAME_QUALIFIED, + T_ARRAY => T_ARRAY, + T_CALLABLE => T_CALLABLE, + T_SELF => T_SELF, + T_PARENT => T_PARENT, + T_NAMESPACE => T_NAMESPACE, + T_STATIC => T_STATIC, + T_NS_SEPARATOR => T_NS_SEPARATOR, + ]; + + $allowed += Util\Tokens::$emptyTokens; + + // Find the start of the return type. + for ($x += 1; $x < $numTokens; $x++) { + if (is_array($tokens[$x]) === true + && isset(Util\Tokens::$emptyTokens[$tokens[$x][0]]) === true + ) { + // Whitespace or comments before the return type. + continue; + } + + if (is_array($tokens[$x]) === false && $tokens[$x] === '?') { + // Found a nullable operator, so skip it. + // But also convert the token to save the tokenizer + // a bit of time later on. + $tokens[$x] = [ + T_NULLABLE, + '?', + ]; + + if (PHP_CODESNIFFER_VERBOSITY > 1) { + echo "\t\t* token $x changed from ? to T_NULLABLE".PHP_EOL; + } + + continue; + } + + break; + }//end for + }//end if + }//end if + }//end if + + /* + Before PHP 7, the <=> operator was tokenized as + T_IS_SMALLER_OR_EQUAL followed by T_GREATER_THAN. + So look for and combine these tokens in earlier versions. + */ + + if ($tokenIsArray === true + && $token[0] === T_IS_SMALLER_OR_EQUAL + && isset($tokens[($stackPtr + 1)]) === true + && $tokens[($stackPtr + 1)][0] === '>' + ) { + $newToken = []; + $newToken['code'] = T_SPACESHIP; + $newToken['type'] = 'T_SPACESHIP'; + $newToken['content'] = '<=>'; + $finalTokens[$newStackPtr] = $newToken; + + $newStackPtr++; + $stackPtr++; + continue; + } + + /* + PHP doesn't assign a token to goto labels, so we have to. + These are just string tokens with a single colon after them. Double + colons are already tokenized and so don't interfere with this check. + But we do have to account for CASE statements, that look just like + goto labels. + */ + + if ($tokenIsArray === true + && $token[0] === T_STRING + && isset($tokens[($stackPtr + 1)]) === true + && $tokens[($stackPtr + 1)] === ':' + && (is_array($tokens[($stackPtr - 1)]) === false + || $tokens[($stackPtr - 1)][0] !== T_PAAMAYIM_NEKUDOTAYIM) + ) { + $stopTokens = [ + T_CASE => true, + T_SEMICOLON => true, + T_OPEN_TAG => true, + T_OPEN_CURLY_BRACKET => true, + T_INLINE_THEN => true, + ]; + + for ($x = ($newStackPtr - 1); $x > 0; $x--) { + if (isset($stopTokens[$finalTokens[$x]['code']]) === true) { + break; + } + } + + if ($finalTokens[$x]['code'] !== T_CASE + && $finalTokens[$x]['code'] !== T_INLINE_THEN + ) { + $finalTokens[$newStackPtr] = [ + 'content' => $token[1].':', + 'code' => T_GOTO_LABEL, + 'type' => 'T_GOTO_LABEL', + ]; + + if (PHP_CODESNIFFER_VERBOSITY > 1) { + echo "\t\t* token $stackPtr changed from T_STRING to T_GOTO_LABEL".PHP_EOL; + echo "\t\t* skipping T_COLON token ".($stackPtr + 1).PHP_EOL; + } + + $newStackPtr++; + $stackPtr++; + continue; + } + }//end if + + /* + If this token has newlines in its content, split each line up + and create a new token for each line. We do this so it's easier + to ascertain where errors occur on a line. + Note that $token[1] is the token's content. + */ + + if ($tokenIsArray === true && strpos($token[1], $this->eolChar) !== false) { + $tokenLines = explode($this->eolChar, $token[1]); + $numLines = count($tokenLines); + $newToken = [ + 'type' => Util\Tokens::tokenName($token[0]), + 'code' => $token[0], + 'content' => '', + ]; + + for ($i = 0; $i < $numLines; $i++) { + $newToken['content'] = $tokenLines[$i]; + if ($i === ($numLines - 1)) { + if ($tokenLines[$i] === '') { + break; + } + } else { + $newToken['content'] .= $this->eolChar; + } + + $finalTokens[$newStackPtr] = $newToken; + $newStackPtr++; + } + } else { + if ($tokenIsArray === true && $token[0] === T_STRING) { + // Some T_STRING tokens should remain that way + // due to their context. + if (isset($this->tstringContexts[$finalTokens[$lastNotEmptyToken]['code']]) === true) { + // Special case for syntax like: return new self + // where self should not be a string. + if ($finalTokens[$lastNotEmptyToken]['code'] === T_NEW + && strtolower($token[1]) === 'self' + ) { + $finalTokens[$newStackPtr] = [ + 'content' => $token[1], + 'code' => T_SELF, + 'type' => 'T_SELF', + ]; + } else { + $finalTokens[$newStackPtr] = [ + 'content' => $token[1], + 'code' => T_STRING, + 'type' => 'T_STRING', + ]; + } + + $newStackPtr++; + continue; + }//end if + }//end if + + $newToken = null; + if ($tokenIsArray === false) { + if (isset(self::$resolveTokenCache[$token[0]]) === true) { + $newToken = self::$resolveTokenCache[$token[0]]; + } + } else { + $cacheKey = null; + if ($token[0] === T_STRING) { + $cacheKey = strtolower($token[1]); + } else if ($token[0] !== T_CURLY_OPEN) { + $cacheKey = $token[0]; + } + + if ($cacheKey !== null && isset(self::$resolveTokenCache[$cacheKey]) === true) { + $newToken = self::$resolveTokenCache[$cacheKey]; + $newToken['content'] = $token[1]; + } + } + + if ($newToken === null) { + $newToken = self::standardiseToken($token); + } + + // Convert colons that are actually the ELSE component of an + // inline IF statement. + if (empty($insideInlineIf) === false && $newToken['code'] === T_COLON) { + $isInlineIf = true; + + // Make sure this isn't a named parameter label. + // Get the previous non-empty token. + for ($i = ($stackPtr - 1); $i > 0; $i--) { + if (is_array($tokens[$i]) === false + || isset(Util\Tokens::$emptyTokens[$tokens[$i][0]]) === false + ) { + break; + } + } + + if ($tokens[$i][0] === T_PARAM_NAME) { + $isInlineIf = false; + if (PHP_CODESNIFFER_VERBOSITY > 1) { + echo "\t\t* token is parameter label, not T_INLINE_ELSE".PHP_EOL; + } + } + + if ($isInlineIf === true) { + // Make sure this isn't a return type separator. + for ($i = ($stackPtr - 1); $i > 0; $i--) { + if (is_array($tokens[$i]) === false + || ($tokens[$i][0] !== T_DOC_COMMENT + && $tokens[$i][0] !== T_COMMENT + && $tokens[$i][0] !== T_WHITESPACE) + ) { + break; + } + } + + if ($tokens[$i] === ')') { + $parenCount = 1; + for ($i--; $i > 0; $i--) { + if ($tokens[$i] === '(') { + $parenCount--; + if ($parenCount === 0) { + break; + } + } else if ($tokens[$i] === ')') { + $parenCount++; + } + } + + // We've found the open parenthesis, so if the previous + // non-empty token is FUNCTION or USE, this is a return type. + // Note that we need to skip T_STRING tokens here as these + // can be function names. + for ($i--; $i > 0; $i--) { + if (is_array($tokens[$i]) === false + || ($tokens[$i][0] !== T_DOC_COMMENT + && $tokens[$i][0] !== T_COMMENT + && $tokens[$i][0] !== T_WHITESPACE + && $tokens[$i][0] !== T_STRING) + ) { + break; + } + } + + if ($tokens[$i][0] === T_FUNCTION || $tokens[$i][0] === T_FN || $tokens[$i][0] === T_USE) { + $isInlineIf = false; + if (PHP_CODESNIFFER_VERBOSITY > 1) { + echo "\t\t* token is return type, not T_INLINE_ELSE".PHP_EOL; + } + } + }//end if + }//end if + + // Check to see if this is a CASE or DEFAULT opener. + if ($isInlineIf === true) { + $inlineIfToken = $insideInlineIf[(count($insideInlineIf) - 1)]; + for ($i = $stackPtr; $i > $inlineIfToken; $i--) { + if (is_array($tokens[$i]) === true + && ($tokens[$i][0] === T_CASE + || $tokens[$i][0] === T_DEFAULT) + ) { + $isInlineIf = false; + if (PHP_CODESNIFFER_VERBOSITY > 1) { + echo "\t\t* token is T_CASE or T_DEFAULT opener, not T_INLINE_ELSE".PHP_EOL; + } + + break; + } + + if (is_array($tokens[$i]) === false + && ($tokens[$i] === ';' + || $tokens[$i] === '{') + ) { + break; + } + } + }//end if + + if ($isInlineIf === true) { + array_pop($insideInlineIf); + $newToken['code'] = T_INLINE_ELSE; + $newToken['type'] = 'T_INLINE_ELSE'; + + if (PHP_CODESNIFFER_VERBOSITY > 1) { + echo "\t\t* token changed from T_COLON to T_INLINE_ELSE".PHP_EOL; + } + } + }//end if + + // This is a special condition for T_ARRAY tokens used for anything else + // but array declarations, like type hinting function arguments as + // being arrays. + // We want to keep the parenthesis map clean, so let's tag these tokens as + // T_STRING. + if ($newToken['code'] === T_ARRAY) { + for ($i = ($stackPtr + 1); $i < $numTokens; $i++) { + if (is_array($tokens[$i]) === false + || isset(Util\Tokens::$emptyTokens[$tokens[$i][0]]) === false + ) { + // Non-empty content. + break; + } + } + + if ($tokens[$i] !== '(' && $i !== $numTokens) { + $newToken['code'] = T_STRING; + $newToken['type'] = 'T_STRING'; + } + } + + // This is a special case when checking PHP 5.5+ code in PHP < 5.5 + // where "finally" should be T_FINALLY instead of T_STRING. + if ($newToken['code'] === T_STRING + && strtolower($newToken['content']) === 'finally' + && $finalTokens[$lastNotEmptyToken]['code'] === T_CLOSE_CURLY_BRACKET + ) { + $newToken['code'] = T_FINALLY; + $newToken['type'] = 'T_FINALLY'; + } + + // This is a special case for the PHP 5.5 classname::class syntax + // where "class" should be T_STRING instead of T_CLASS. + if (($newToken['code'] === T_CLASS + || $newToken['code'] === T_FUNCTION) + && $finalTokens[$lastNotEmptyToken]['code'] === T_DOUBLE_COLON + ) { + $newToken['code'] = T_STRING; + $newToken['type'] = 'T_STRING'; + } + + // This is a special case for PHP 5.6 use function and use const + // where "function" and "const" should be T_STRING instead of T_FUNCTION + // and T_CONST. + if (($newToken['code'] === T_FUNCTION + || $newToken['code'] === T_CONST) + && ($finalTokens[$lastNotEmptyToken]['code'] === T_USE || $insideUseGroup === true) + ) { + $newToken['code'] = T_STRING; + $newToken['type'] = 'T_STRING'; + } + + // This is a special case for use groups in PHP 7+ where leaving + // the curly braces as their normal tokens would confuse + // the scope map and sniffs. + if ($newToken['code'] === T_OPEN_CURLY_BRACKET + && $finalTokens[$lastNotEmptyToken]['code'] === T_NS_SEPARATOR + ) { + $newToken['code'] = T_OPEN_USE_GROUP; + $newToken['type'] = 'T_OPEN_USE_GROUP'; + $insideUseGroup = true; + } + + if ($insideUseGroup === true && $newToken['code'] === T_CLOSE_CURLY_BRACKET) { + $newToken['code'] = T_CLOSE_USE_GROUP; + $newToken['type'] = 'T_CLOSE_USE_GROUP'; + $insideUseGroup = false; + } + + $finalTokens[$newStackPtr] = $newToken; + $newStackPtr++; + }//end if + }//end for + + if (PHP_CODESNIFFER_VERBOSITY > 1) { + echo "\t*** END PHP TOKENIZING ***".PHP_EOL; + } + + return $finalTokens; + + }//end tokenize() + + + /** + * Performs additional processing after main tokenizing. + * + * This additional processing checks for CASE statements that are using curly + * braces for scope openers and closers. It also turns some T_FUNCTION tokens + * into T_CLOSURE when they are not standard function definitions. It also + * detects short array syntax and converts those square brackets into new tokens. + * It also corrects some usage of the static and class keywords. It also + * assigns tokens to function return types. + * + * @return void + */ + protected function processAdditional() + { + if (PHP_CODESNIFFER_VERBOSITY > 1) { + echo "\t*** START ADDITIONAL PHP PROCESSING ***".PHP_EOL; + } + + $this->createAttributesNestingMap(); + + $numTokens = count($this->tokens); + for ($i = ($numTokens - 1); $i >= 0; $i--) { + // Check for any unset scope conditions due to alternate IF/ENDIF syntax. + if (isset($this->tokens[$i]['scope_opener']) === true + && isset($this->tokens[$i]['scope_condition']) === false + ) { + $this->tokens[$i]['scope_condition'] = $this->tokens[$this->tokens[$i]['scope_opener']]['scope_condition']; + } + + if ($this->tokens[$i]['code'] === T_FUNCTION) { + /* + Detect functions that are actually closures and + assign them a different token. + */ + + if (isset($this->tokens[$i]['scope_opener']) === true) { + for ($x = ($i + 1); $x < $numTokens; $x++) { + if (isset(Util\Tokens::$emptyTokens[$this->tokens[$x]['code']]) === false + && $this->tokens[$x]['code'] !== T_BITWISE_AND + ) { + break; + } + } + + if ($this->tokens[$x]['code'] === T_OPEN_PARENTHESIS) { + $this->tokens[$i]['code'] = T_CLOSURE; + $this->tokens[$i]['type'] = 'T_CLOSURE'; + if (PHP_CODESNIFFER_VERBOSITY > 1) { + $line = $this->tokens[$i]['line']; + echo "\t* token $i on line $line changed from T_FUNCTION to T_CLOSURE".PHP_EOL; + } + + for ($x = ($this->tokens[$i]['scope_opener'] + 1); $x < $this->tokens[$i]['scope_closer']; $x++) { + if (isset($this->tokens[$x]['conditions'][$i]) === false) { + continue; + } + + $this->tokens[$x]['conditions'][$i] = T_CLOSURE; + if (PHP_CODESNIFFER_VERBOSITY > 1) { + $type = $this->tokens[$x]['type']; + echo "\t\t* cleaned $x ($type) *".PHP_EOL; + } + } + } + }//end if + + continue; + } else if ($this->tokens[$i]['code'] === T_CLASS && isset($this->tokens[$i]['scope_opener']) === true) { + /* + Detect anonymous classes and assign them a different token. + */ + + for ($x = ($i + 1); $x < $numTokens; $x++) { + if (isset(Util\Tokens::$emptyTokens[$this->tokens[$x]['code']]) === false) { + break; + } + } + + if ($this->tokens[$x]['code'] === T_OPEN_PARENTHESIS + || $this->tokens[$x]['code'] === T_OPEN_CURLY_BRACKET + || $this->tokens[$x]['code'] === T_EXTENDS + || $this->tokens[$x]['code'] === T_IMPLEMENTS + ) { + $this->tokens[$i]['code'] = T_ANON_CLASS; + $this->tokens[$i]['type'] = 'T_ANON_CLASS'; + if (PHP_CODESNIFFER_VERBOSITY > 1) { + $line = $this->tokens[$i]['line']; + echo "\t* token $i on line $line changed from T_CLASS to T_ANON_CLASS".PHP_EOL; + } + + if ($this->tokens[$x]['code'] === T_OPEN_PARENTHESIS + && isset($this->tokens[$x]['parenthesis_closer']) === true + ) { + $closer = $this->tokens[$x]['parenthesis_closer']; + + $this->tokens[$i]['parenthesis_opener'] = $x; + $this->tokens[$i]['parenthesis_closer'] = $closer; + $this->tokens[$i]['parenthesis_owner'] = $i; + $this->tokens[$x]['parenthesis_owner'] = $i; + $this->tokens[$closer]['parenthesis_owner'] = $i; + + if (PHP_CODESNIFFER_VERBOSITY > 1) { + $line = $this->tokens[$i]['line']; + echo "\t\t* added parenthesis keys to T_ANON_CLASS token $i on line $line".PHP_EOL; + } + } + + for ($x = ($this->tokens[$i]['scope_opener'] + 1); $x < $this->tokens[$i]['scope_closer']; $x++) { + if (isset($this->tokens[$x]['conditions'][$i]) === false) { + continue; + } + + $this->tokens[$x]['conditions'][$i] = T_ANON_CLASS; + if (PHP_CODESNIFFER_VERBOSITY > 1) { + $type = $this->tokens[$x]['type']; + echo "\t\t* cleaned $x ($type) *".PHP_EOL; + } + } + }//end if + + continue; + } else if ($this->tokens[$i]['code'] === T_FN && isset($this->tokens[($i + 1)]) === true) { + // Possible arrow function. + for ($x = ($i + 1); $x < $numTokens; $x++) { + if (isset(Util\Tokens::$emptyTokens[$this->tokens[$x]['code']]) === false + && $this->tokens[$x]['code'] !== T_BITWISE_AND + ) { + // Non-whitespace content. + break; + } + } + + if (isset($this->tokens[$x]) === true && $this->tokens[$x]['code'] === T_OPEN_PARENTHESIS) { + $ignore = Util\Tokens::$emptyTokens; + $ignore += [ + T_ARRAY => T_ARRAY, + T_CALLABLE => T_CALLABLE, + T_COLON => T_COLON, + T_NAMESPACE => T_NAMESPACE, + T_NS_SEPARATOR => T_NS_SEPARATOR, + T_NULL => T_NULL, + T_NULLABLE => T_NULLABLE, + T_PARENT => T_PARENT, + T_SELF => T_SELF, + T_STATIC => T_STATIC, + T_STRING => T_STRING, + T_TYPE_UNION => T_TYPE_UNION, + ]; + + $closer = $this->tokens[$x]['parenthesis_closer']; + for ($arrow = ($closer + 1); $arrow < $numTokens; $arrow++) { + if (isset($ignore[$this->tokens[$arrow]['code']]) === false) { + break; + } + } + + if ($this->tokens[$arrow]['code'] === T_DOUBLE_ARROW) { + $endTokens = [ + T_COLON => true, + T_COMMA => true, + T_SEMICOLON => true, + T_CLOSE_PARENTHESIS => true, + T_CLOSE_SQUARE_BRACKET => true, + T_CLOSE_CURLY_BRACKET => true, + T_CLOSE_SHORT_ARRAY => true, + T_OPEN_TAG => true, + T_CLOSE_TAG => true, + ]; + + $inTernary = false; + $lastEndToken = null; + + for ($scopeCloser = ($arrow + 1); $scopeCloser < $numTokens; $scopeCloser++) { + // Arrow function closer should never be shared with the closer of a match + // control structure. + if (isset($this->tokens[$scopeCloser]['scope_closer'], $this->tokens[$scopeCloser]['scope_condition']) === true + && $scopeCloser === $this->tokens[$scopeCloser]['scope_closer'] + && $this->tokens[$this->tokens[$scopeCloser]['scope_condition']]['code'] === T_MATCH + ) { + if ($arrow < $this->tokens[$scopeCloser]['scope_condition']) { + // Match in return value of arrow function. Move on to the next token. + continue; + } + + // Arrow function as return value for the last match case without trailing comma. + if ($lastEndToken !== null) { + $scopeCloser = $lastEndToken; + break; + } + + for ($lastNonEmpty = ($scopeCloser - 1); $lastNonEmpty > $arrow; $lastNonEmpty--) { + if (isset(Util\Tokens::$emptyTokens[$this->tokens[$lastNonEmpty]['code']]) === false) { + $scopeCloser = $lastNonEmpty; + break 2; + } + } + } + + if (isset($endTokens[$this->tokens[$scopeCloser]['code']]) === true) { + if ($lastEndToken !== null + && ((isset($this->tokens[$scopeCloser]['parenthesis_opener']) === true + && $this->tokens[$scopeCloser]['parenthesis_opener'] < $arrow) + || (isset($this->tokens[$scopeCloser]['bracket_opener']) === true + && $this->tokens[$scopeCloser]['bracket_opener'] < $arrow)) + ) { + for ($lastNonEmpty = ($scopeCloser - 1); $lastNonEmpty > $arrow; $lastNonEmpty--) { + if (isset(Util\Tokens::$emptyTokens[$this->tokens[$lastNonEmpty]['code']]) === false) { + $scopeCloser = $lastNonEmpty; + break; + } + } + } + + break; + } + + if ($inTernary === false + && isset($this->tokens[$scopeCloser]['scope_closer'], $this->tokens[$scopeCloser]['scope_condition']) === true + && $scopeCloser === $this->tokens[$scopeCloser]['scope_closer'] + && $this->tokens[$this->tokens[$scopeCloser]['scope_condition']]['code'] === T_FN + ) { + // Found a nested arrow function that already has the closer set and is in + // the same scope as us, so we can use its closer. + break; + } + + if (isset($this->tokens[$scopeCloser]['scope_closer']) === true + && $this->tokens[$scopeCloser]['code'] !== T_INLINE_ELSE + && $this->tokens[$scopeCloser]['code'] !== T_END_HEREDOC + && $this->tokens[$scopeCloser]['code'] !== T_END_NOWDOC + ) { + // We minus 1 here in case the closer can be shared with us. + $scopeCloser = ($this->tokens[$scopeCloser]['scope_closer'] - 1); + continue; + } + + if (isset($this->tokens[$scopeCloser]['parenthesis_closer']) === true) { + $scopeCloser = $this->tokens[$scopeCloser]['parenthesis_closer']; + $lastEndToken = $scopeCloser; + continue; + } + + if (isset($this->tokens[$scopeCloser]['bracket_closer']) === true) { + $scopeCloser = $this->tokens[$scopeCloser]['bracket_closer']; + $lastEndToken = $scopeCloser; + continue; + } + + if ($this->tokens[$scopeCloser]['code'] === T_INLINE_THEN) { + $inTernary = true; + continue; + } + + if ($this->tokens[$scopeCloser]['code'] === T_INLINE_ELSE) { + if ($inTernary === false) { + break; + } + + $inTernary = false; + continue; + } + }//end for + + if ($scopeCloser !== $numTokens) { + if (PHP_CODESNIFFER_VERBOSITY > 1) { + $line = $this->tokens[$i]['line']; + echo "\t=> token $i on line $line processed as arrow function".PHP_EOL; + echo "\t\t* scope opener set to $arrow *".PHP_EOL; + echo "\t\t* scope closer set to $scopeCloser *".PHP_EOL; + echo "\t\t* parenthesis opener set to $x *".PHP_EOL; + echo "\t\t* parenthesis closer set to $closer *".PHP_EOL; + } + + $this->tokens[$i]['code'] = T_FN; + $this->tokens[$i]['type'] = 'T_FN'; + $this->tokens[$i]['scope_condition'] = $i; + $this->tokens[$i]['scope_opener'] = $arrow; + $this->tokens[$i]['scope_closer'] = $scopeCloser; + $this->tokens[$i]['parenthesis_owner'] = $i; + $this->tokens[$i]['parenthesis_opener'] = $x; + $this->tokens[$i]['parenthesis_closer'] = $closer; + + $this->tokens[$arrow]['code'] = T_FN_ARROW; + $this->tokens[$arrow]['type'] = 'T_FN_ARROW'; + + $this->tokens[$arrow]['scope_condition'] = $i; + $this->tokens[$arrow]['scope_opener'] = $arrow; + $this->tokens[$arrow]['scope_closer'] = $scopeCloser; + $this->tokens[$scopeCloser]['scope_condition'] = $i; + $this->tokens[$scopeCloser]['scope_opener'] = $arrow; + $this->tokens[$scopeCloser]['scope_closer'] = $scopeCloser; + + $opener = $this->tokens[$i]['parenthesis_opener']; + $closer = $this->tokens[$i]['parenthesis_closer']; + $this->tokens[$opener]['parenthesis_owner'] = $i; + $this->tokens[$closer]['parenthesis_owner'] = $i; + + if (PHP_CODESNIFFER_VERBOSITY > 1) { + $line = $this->tokens[$arrow]['line']; + echo "\t\t* token $arrow on line $line changed from T_DOUBLE_ARROW to T_FN_ARROW".PHP_EOL; + } + }//end if + }//end if + }//end if + + // If after all that, the extra tokens are not set, this is not an arrow function. + if (isset($this->tokens[$i]['scope_closer']) === false) { + if (PHP_CODESNIFFER_VERBOSITY > 1) { + $line = $this->tokens[$i]['line']; + echo "\t=> token $i on line $line is not an arrow function".PHP_EOL; + echo "\t\t* token changed from T_FN to T_STRING".PHP_EOL; + } + + $this->tokens[$i]['code'] = T_STRING; + $this->tokens[$i]['type'] = 'T_STRING'; + } + } else if ($this->tokens[$i]['code'] === T_OPEN_SQUARE_BRACKET) { + if (isset($this->tokens[$i]['bracket_closer']) === false) { + continue; + } + + // Unless there is a variable or a bracket before this token, + // it is the start of an array being defined using the short syntax. + $isShortArray = false; + $allowed = [ + T_CLOSE_SQUARE_BRACKET => T_CLOSE_SQUARE_BRACKET, + T_CLOSE_CURLY_BRACKET => T_CLOSE_CURLY_BRACKET, + T_CLOSE_PARENTHESIS => T_CLOSE_PARENTHESIS, + T_VARIABLE => T_VARIABLE, + T_OBJECT_OPERATOR => T_OBJECT_OPERATOR, + T_NULLSAFE_OBJECT_OPERATOR => T_NULLSAFE_OBJECT_OPERATOR, + T_STRING => T_STRING, + T_CONSTANT_ENCAPSED_STRING => T_CONSTANT_ENCAPSED_STRING, + T_DOUBLE_QUOTED_STRING => T_DOUBLE_QUOTED_STRING, + ]; + $allowed += Util\Tokens::$magicConstants; + + for ($x = ($i - 1); $x >= 0; $x--) { + // If we hit a scope opener, the statement has ended + // without finding anything, so it's probably an array + // using PHP 7.1 short list syntax. + if (isset($this->tokens[$x]['scope_opener']) === true) { + $isShortArray = true; + break; + } + + if (isset(Util\Tokens::$emptyTokens[$this->tokens[$x]['code']]) === false) { + if (isset($allowed[$this->tokens[$x]['code']]) === false) { + $isShortArray = true; + } + + break; + } + } + + if ($isShortArray === true) { + $this->tokens[$i]['code'] = T_OPEN_SHORT_ARRAY; + $this->tokens[$i]['type'] = 'T_OPEN_SHORT_ARRAY'; + + $closer = $this->tokens[$i]['bracket_closer']; + $this->tokens[$closer]['code'] = T_CLOSE_SHORT_ARRAY; + $this->tokens[$closer]['type'] = 'T_CLOSE_SHORT_ARRAY'; + if (PHP_CODESNIFFER_VERBOSITY > 1) { + $line = $this->tokens[$i]['line']; + echo "\t* token $i on line $line changed from T_OPEN_SQUARE_BRACKET to T_OPEN_SHORT_ARRAY".PHP_EOL; + $line = $this->tokens[$closer]['line']; + echo "\t* token $closer on line $line changed from T_CLOSE_SQUARE_BRACKET to T_CLOSE_SHORT_ARRAY".PHP_EOL; + } + } + + continue; + } else if ($this->tokens[$i]['code'] === T_MATCH) { + if (isset($this->tokens[$i]['scope_opener'], $this->tokens[$i]['scope_closer']) === false) { + // Not a match expression after all. + $this->tokens[$i]['code'] = T_STRING; + $this->tokens[$i]['type'] = 'T_STRING'; + + if (PHP_CODESNIFFER_VERBOSITY > 1) { + echo "\t\t* token $i changed from T_MATCH to T_STRING".PHP_EOL; + } + + if (isset($this->tokens[$i]['parenthesis_opener'], $this->tokens[$i]['parenthesis_closer']) === true) { + $opener = $this->tokens[$i]['parenthesis_opener']; + $closer = $this->tokens[$i]['parenthesis_closer']; + unset( + $this->tokens[$opener]['parenthesis_owner'], + $this->tokens[$closer]['parenthesis_owner'] + ); + unset( + $this->tokens[$i]['parenthesis_opener'], + $this->tokens[$i]['parenthesis_closer'], + $this->tokens[$i]['parenthesis_owner'] + ); + + if (PHP_CODESNIFFER_VERBOSITY > 1) { + echo "\t\t* cleaned parenthesis of token $i *".PHP_EOL; + } + } + } else { + // Retokenize the double arrows for match expression cases to `T_MATCH_ARROW`. + $searchFor = [ + T_OPEN_CURLY_BRACKET => T_OPEN_CURLY_BRACKET, + T_OPEN_SQUARE_BRACKET => T_OPEN_SQUARE_BRACKET, + T_OPEN_PARENTHESIS => T_OPEN_PARENTHESIS, + T_OPEN_SHORT_ARRAY => T_OPEN_SHORT_ARRAY, + T_DOUBLE_ARROW => T_DOUBLE_ARROW, + ]; + $searchFor += Util\Tokens::$scopeOpeners; + + for ($x = ($this->tokens[$i]['scope_opener'] + 1); $x < $this->tokens[$i]['scope_closer']; $x++) { + if (isset($searchFor[$this->tokens[$x]['code']]) === false) { + continue; + } + + if (isset($this->tokens[$x]['scope_closer']) === true) { + $x = $this->tokens[$x]['scope_closer']; + continue; + } + + if (isset($this->tokens[$x]['parenthesis_closer']) === true) { + $x = $this->tokens[$x]['parenthesis_closer']; + continue; + } + + if (isset($this->tokens[$x]['bracket_closer']) === true) { + $x = $this->tokens[$x]['bracket_closer']; + continue; + } + + // This must be a double arrow, but make sure anyhow. + if ($this->tokens[$x]['code'] === T_DOUBLE_ARROW) { + $this->tokens[$x]['code'] = T_MATCH_ARROW; + $this->tokens[$x]['type'] = 'T_MATCH_ARROW'; + + if (PHP_CODESNIFFER_VERBOSITY > 1) { + echo "\t\t* token $x changed from T_DOUBLE_ARROW to T_MATCH_ARROW".PHP_EOL; + } + } + }//end for + }//end if + + continue; + } else if ($this->tokens[$i]['code'] === T_BITWISE_OR) { + /* + Convert "|" to T_TYPE_UNION or leave as T_BITWISE_OR. + */ + + $allowed = [ + T_STRING => T_STRING, + T_CALLABLE => T_CALLABLE, + T_SELF => T_SELF, + T_PARENT => T_PARENT, + T_STATIC => T_STATIC, + T_FALSE => T_FALSE, + T_NULL => T_NULL, + T_NAMESPACE => T_NAMESPACE, + T_NS_SEPARATOR => T_NS_SEPARATOR, + ]; + + $suspectedType = null; + $typeTokenCount = 0; + + for ($x = ($i + 1); $x < $numTokens; $x++) { + if (isset(Util\Tokens::$emptyTokens[$this->tokens[$x]['code']]) === true) { + continue; + } + + if (isset($allowed[$this->tokens[$x]['code']]) === true) { + ++$typeTokenCount; + continue; + } + + if ($typeTokenCount > 0 + && ($this->tokens[$x]['code'] === T_BITWISE_AND + || $this->tokens[$x]['code'] === T_ELLIPSIS) + ) { + // Skip past reference and variadic indicators for parameter types. + continue; + } + + if ($this->tokens[$x]['code'] === T_VARIABLE) { + // Parameter/Property defaults can not contain variables, so this could be a type. + $suspectedType = 'property or parameter'; + break; + } + + if ($this->tokens[$x]['code'] === T_DOUBLE_ARROW) { + // Possible arrow function. + $suspectedType = 'return'; + break; + } + + if ($this->tokens[$x]['code'] === T_SEMICOLON) { + // Possible abstract method or interface method. + $suspectedType = 'return'; + break; + } + + if ($this->tokens[$x]['code'] === T_OPEN_CURLY_BRACKET + && isset($this->tokens[$x]['scope_condition']) === true + && $this->tokens[$this->tokens[$x]['scope_condition']]['code'] === T_FUNCTION + ) { + $suspectedType = 'return'; + } + + break; + }//end for + + if ($typeTokenCount === 0 || isset($suspectedType) === false) { + // Definitely not a union type, move on. + continue; + } + + $typeTokenCount = 0; + $unionOperators = [$i]; + $confirmed = false; + + for ($x = ($i - 1); $x >= 0; $x--) { + if (isset(Util\Tokens::$emptyTokens[$this->tokens[$x]['code']]) === true) { + continue; + } + + if (isset($allowed[$this->tokens[$x]['code']]) === true) { + ++$typeTokenCount; + continue; + } + + // Union types can't use the nullable operator, but be tolerant to parse errors. + if ($typeTokenCount > 0 && $this->tokens[$x]['code'] === T_NULLABLE) { + continue; + } + + if ($this->tokens[$x]['code'] === T_BITWISE_OR) { + $unionOperators[] = $x; + continue; + } + + if ($suspectedType === 'return' && $this->tokens[$x]['code'] === T_COLON) { + $confirmed = true; + break; + } + + if ($suspectedType === 'property or parameter' + && (isset(Util\Tokens::$scopeModifiers[$this->tokens[$x]['code']]) === true + || $this->tokens[$x]['code'] === T_VAR) + ) { + // This will also confirm constructor property promotion parameters, but that's fine. + $confirmed = true; + } + + break; + }//end for + + if ($confirmed === false + && $suspectedType === 'property or parameter' + && isset($this->tokens[$i]['nested_parenthesis']) === true + ) { + $parens = $this->tokens[$i]['nested_parenthesis']; + $last = end($parens); + + if (isset($this->tokens[$last]['parenthesis_owner']) === true + && $this->tokens[$this->tokens[$last]['parenthesis_owner']]['code'] === T_FUNCTION + ) { + $confirmed = true; + } else { + // No parenthesis owner set, this may be an arrow function which has not yet + // had additional processing done. + if (isset($this->tokens[$last]['parenthesis_opener']) === true) { + for ($x = ($this->tokens[$last]['parenthesis_opener'] - 1); $x >= 0; $x--) { + if (isset(Util\Tokens::$emptyTokens[$this->tokens[$x]['code']]) === true) { + continue; + } + + break; + } + + if ($this->tokens[$x]['code'] === T_FN) { + for (--$x; $x >= 0; $x--) { + if (isset(Util\Tokens::$emptyTokens[$this->tokens[$x]['code']]) === true + || $this->tokens[$x]['code'] === T_BITWISE_AND + ) { + continue; + } + + break; + } + + if ($this->tokens[$x]['code'] !== T_FUNCTION) { + $confirmed = true; + } + } + }//end if + }//end if + + unset($parens, $last); + }//end if + + if ($confirmed === false) { + // Not a union type after all, move on. + continue; + } + + foreach ($unionOperators as $x) { + $this->tokens[$x]['code'] = T_TYPE_UNION; + $this->tokens[$x]['type'] = 'T_TYPE_UNION'; + + if (PHP_CODESNIFFER_VERBOSITY > 1) { + $line = $this->tokens[$x]['line']; + echo "\t* token $x on line $line changed from T_BITWISE_OR to T_TYPE_UNION".PHP_EOL; + } + } + + continue; + } else if ($this->tokens[$i]['code'] === T_STATIC) { + for ($x = ($i - 1); $x > 0; $x--) { + if (isset(Util\Tokens::$emptyTokens[$this->tokens[$x]['code']]) === false) { + break; + } + } + + if ($this->tokens[$x]['code'] === T_INSTANCEOF) { + $this->tokens[$i]['code'] = T_STRING; + $this->tokens[$i]['type'] = 'T_STRING'; + + if (PHP_CODESNIFFER_VERBOSITY > 1) { + $line = $this->tokens[$i]['line']; + echo "\t* token $i on line $line changed from T_STATIC to T_STRING".PHP_EOL; + } + } + + continue; + } else if ($this->tokens[$i]['code'] === T_TRUE + || $this->tokens[$i]['code'] === T_FALSE + || $this->tokens[$i]['code'] === T_NULL + ) { + for ($x = ($i + 1); $i < $numTokens; $x++) { + if (isset(Util\Tokens::$emptyTokens[$this->tokens[$x]['code']]) === false) { + // Non-whitespace content. + break; + } + } + + if (isset($this->tstringContexts[$this->tokens[$x]['code']]) === true) { + if (PHP_CODESNIFFER_VERBOSITY > 1) { + $line = $this->tokens[$i]['line']; + $type = $this->tokens[$i]['type']; + echo "\t* token $i on line $line changed from $type to T_STRING".PHP_EOL; + } + + $this->tokens[$i]['code'] = T_STRING; + $this->tokens[$i]['type'] = 'T_STRING'; + } + } else if ($this->tokens[$i]['code'] === T_CONST) { + // Context sensitive keywords support. + for ($x = ($i + 1); $i < $numTokens; $x++) { + if (isset(Util\Tokens::$emptyTokens[$this->tokens[$x]['code']]) === false) { + // Non-whitespace content. + break; + } + } + + if ($this->tokens[$x]['code'] !== T_STRING) { + if (PHP_CODESNIFFER_VERBOSITY > 1) { + $line = $this->tokens[$x]['line']; + $type = $this->tokens[$x]['type']; + echo "\t* token $x on line $line changed from $type to T_STRING".PHP_EOL; + } + + $this->tokens[$x]['code'] = T_STRING; + $this->tokens[$x]['type'] = 'T_STRING'; + } + }//end if + + if (($this->tokens[$i]['code'] !== T_CASE + && $this->tokens[$i]['code'] !== T_DEFAULT) + || isset($this->tokens[$i]['scope_opener']) === false + ) { + // Only interested in CASE and DEFAULT statements from here on in. + continue; + } + + $scopeOpener = $this->tokens[$i]['scope_opener']; + $scopeCloser = $this->tokens[$i]['scope_closer']; + + // If the first char after the opener is a curly brace + // and that brace has been ignored, it is actually + // opening this case statement and the opener and closer are + // probably set incorrectly. + for ($x = ($scopeOpener + 1); $x < $numTokens; $x++) { + if (isset(Util\Tokens::$emptyTokens[$this->tokens[$x]['code']]) === false) { + // Non-whitespace content. + break; + } + } + + if ($this->tokens[$x]['code'] === T_CASE || $this->tokens[$x]['code'] === T_DEFAULT) { + // Special case for multiple CASE statements that share the same + // closer. Because we are going backwards through the file, this next + // CASE statement is already fixed, so just use its closer and don't + // worry about fixing anything. + $newCloser = $this->tokens[$x]['scope_closer']; + $this->tokens[$i]['scope_closer'] = $newCloser; + if (PHP_CODESNIFFER_VERBOSITY > 1) { + $oldType = $this->tokens[$scopeCloser]['type']; + $newType = $this->tokens[$newCloser]['type']; + $line = $this->tokens[$i]['line']; + echo "\t* token $i (T_CASE) on line $line closer changed from $scopeCloser ($oldType) to $newCloser ($newType)".PHP_EOL; + } + + continue; + } + + if ($this->tokens[$x]['code'] !== T_OPEN_CURLY_BRACKET + || isset($this->tokens[$x]['scope_condition']) === true + ) { + // Not a CASE/DEFAULT with a curly brace opener. + continue; + } + + // The closer for this CASE/DEFAULT should be the closing curly brace and + // not whatever it already is. The opener needs to be the opening curly + // brace so everything matches up. + $newCloser = $this->tokens[$x]['bracket_closer']; + foreach ([$i, $x, $newCloser] as $index) { + $this->tokens[$index]['scope_condition'] = $i; + $this->tokens[$index]['scope_opener'] = $x; + $this->tokens[$index]['scope_closer'] = $newCloser; + } + + if (PHP_CODESNIFFER_VERBOSITY > 1) { + $line = $this->tokens[$i]['line']; + $tokenType = $this->tokens[$i]['type']; + + $oldType = $this->tokens[$scopeOpener]['type']; + $newType = $this->tokens[$x]['type']; + echo "\t* token $i ($tokenType) on line $line opener changed from $scopeOpener ($oldType) to $x ($newType)".PHP_EOL; + + $oldType = $this->tokens[$scopeCloser]['type']; + $newType = $this->tokens[$newCloser]['type']; + echo "\t* token $i ($tokenType) on line $line closer changed from $scopeCloser ($oldType) to $newCloser ($newType)".PHP_EOL; + } + + if ($this->tokens[$scopeOpener]['scope_condition'] === $i) { + unset($this->tokens[$scopeOpener]['scope_condition']); + unset($this->tokens[$scopeOpener]['scope_opener']); + unset($this->tokens[$scopeOpener]['scope_closer']); + } + + if ($this->tokens[$scopeCloser]['scope_condition'] === $i) { + unset($this->tokens[$scopeCloser]['scope_condition']); + unset($this->tokens[$scopeCloser]['scope_opener']); + unset($this->tokens[$scopeCloser]['scope_closer']); + } else { + // We were using a shared closer. All tokens that were + // sharing this closer with us, except for the scope condition + // and it's opener, need to now point to the new closer. + $condition = $this->tokens[$scopeCloser]['scope_condition']; + $start = ($this->tokens[$condition]['scope_opener'] + 1); + for ($y = $start; $y < $scopeCloser; $y++) { + if (isset($this->tokens[$y]['scope_closer']) === true + && $this->tokens[$y]['scope_closer'] === $scopeCloser + ) { + $this->tokens[$y]['scope_closer'] = $newCloser; + + if (PHP_CODESNIFFER_VERBOSITY > 1) { + $line = $this->tokens[$y]['line']; + $tokenType = $this->tokens[$y]['type']; + $oldType = $this->tokens[$scopeCloser]['type']; + $newType = $this->tokens[$newCloser]['type']; + echo "\t\t* token $y ($tokenType) on line $line closer changed from $scopeCloser ($oldType) to $newCloser ($newType)".PHP_EOL; + } + } + } + }//end if + + unset($this->tokens[$x]['bracket_opener']); + unset($this->tokens[$x]['bracket_closer']); + unset($this->tokens[$newCloser]['bracket_opener']); + unset($this->tokens[$newCloser]['bracket_closer']); + $this->tokens[$scopeCloser]['conditions'][] = $i; + + // Now fix up all the tokens that think they are + // inside the CASE/DEFAULT statement when they are really outside. + for ($x = $newCloser; $x < $scopeCloser; $x++) { + foreach ($this->tokens[$x]['conditions'] as $num => $oldCond) { + if ($oldCond === $this->tokens[$i]['code']) { + $oldConditions = $this->tokens[$x]['conditions']; + unset($this->tokens[$x]['conditions'][$num]); + + if (PHP_CODESNIFFER_VERBOSITY > 1) { + $type = $this->tokens[$x]['type']; + $oldConds = ''; + foreach ($oldConditions as $condition) { + $oldConds .= Util\Tokens::tokenName($condition).','; + } + + $oldConds = rtrim($oldConds, ','); + + $newConds = ''; + foreach ($this->tokens[$x]['conditions'] as $condition) { + $newConds .= Util\Tokens::tokenName($condition).','; + } + + $newConds = rtrim($newConds, ','); + + echo "\t\t* cleaned $x ($type) *".PHP_EOL; + echo "\t\t\t=> conditions changed from $oldConds to $newConds".PHP_EOL; + } + + break; + }//end if + }//end foreach + }//end for + }//end for + + if (PHP_CODESNIFFER_VERBOSITY > 1) { + echo "\t*** END ADDITIONAL PHP PROCESSING ***".PHP_EOL; + } + + }//end processAdditional() + + + /** + * Takes a token produced from token_get_all() and produces a + * more uniform token. + * + * @param string|array $token The token to convert. + * + * @return array The new token. + */ + public static function standardiseToken($token) + { + if (isset($token[1]) === false) { + if (isset(self::$resolveTokenCache[$token[0]]) === true) { + return self::$resolveTokenCache[$token[0]]; + } + } else { + $cacheKey = null; + if ($token[0] === T_STRING) { + $cacheKey = strtolower($token[1]); + } else if ($token[0] !== T_CURLY_OPEN) { + $cacheKey = $token[0]; + } + + if ($cacheKey !== null && isset(self::$resolveTokenCache[$cacheKey]) === true) { + $newToken = self::$resolveTokenCache[$cacheKey]; + $newToken['content'] = $token[1]; + return $newToken; + } + } + + if (isset($token[1]) === false) { + return self::resolveSimpleToken($token[0]); + } + + if ($token[0] === T_STRING) { + switch ($cacheKey) { + case 'false': + $newToken['type'] = 'T_FALSE'; + break; + case 'true': + $newToken['type'] = 'T_TRUE'; + break; + case 'null': + $newToken['type'] = 'T_NULL'; + break; + case 'self': + $newToken['type'] = 'T_SELF'; + break; + case 'parent': + $newToken['type'] = 'T_PARENT'; + break; + default: + $newToken['type'] = 'T_STRING'; + break; + } + + $newToken['code'] = constant($newToken['type']); + + self::$resolveTokenCache[$cacheKey] = $newToken; + } else if ($token[0] === T_CURLY_OPEN) { + $newToken = [ + 'code' => T_OPEN_CURLY_BRACKET, + 'type' => 'T_OPEN_CURLY_BRACKET', + ]; + } else { + $newToken = [ + 'code' => $token[0], + 'type' => Util\Tokens::tokenName($token[0]), + ]; + + self::$resolveTokenCache[$token[0]] = $newToken; + }//end if + + $newToken['content'] = $token[1]; + return $newToken; + + }//end standardiseToken() + + + /** + * Converts simple tokens into a format that conforms to complex tokens + * produced by token_get_all(). + * + * Simple tokens are tokens that are not in array form when produced from + * token_get_all(). + * + * @param string $token The simple token to convert. + * + * @return array The new token in array format. + */ + public static function resolveSimpleToken($token) + { + $newToken = []; + + switch ($token) { + case '{': + $newToken['type'] = 'T_OPEN_CURLY_BRACKET'; + break; + case '}': + $newToken['type'] = 'T_CLOSE_CURLY_BRACKET'; + break; + case '[': + $newToken['type'] = 'T_OPEN_SQUARE_BRACKET'; + break; + case ']': + $newToken['type'] = 'T_CLOSE_SQUARE_BRACKET'; + break; + case '(': + $newToken['type'] = 'T_OPEN_PARENTHESIS'; + break; + case ')': + $newToken['type'] = 'T_CLOSE_PARENTHESIS'; + break; + case ':': + $newToken['type'] = 'T_COLON'; + break; + case '.': + $newToken['type'] = 'T_STRING_CONCAT'; + break; + case ';': + $newToken['type'] = 'T_SEMICOLON'; + break; + case '=': + $newToken['type'] = 'T_EQUAL'; + break; + case '*': + $newToken['type'] = 'T_MULTIPLY'; + break; + case '/': + $newToken['type'] = 'T_DIVIDE'; + break; + case '+': + $newToken['type'] = 'T_PLUS'; + break; + case '-': + $newToken['type'] = 'T_MINUS'; + break; + case '%': + $newToken['type'] = 'T_MODULUS'; + break; + case '^': + $newToken['type'] = 'T_BITWISE_XOR'; + break; + case '&': + $newToken['type'] = 'T_BITWISE_AND'; + break; + case '|': + $newToken['type'] = 'T_BITWISE_OR'; + break; + case '~': + $newToken['type'] = 'T_BITWISE_NOT'; + break; + case '<': + $newToken['type'] = 'T_LESS_THAN'; + break; + case '>': + $newToken['type'] = 'T_GREATER_THAN'; + break; + case '!': + $newToken['type'] = 'T_BOOLEAN_NOT'; + break; + case ',': + $newToken['type'] = 'T_COMMA'; + break; + case '@': + $newToken['type'] = 'T_ASPERAND'; + break; + case '$': + $newToken['type'] = 'T_DOLLAR'; + break; + case '`': + $newToken['type'] = 'T_BACKTICK'; + break; + default: + $newToken['type'] = 'T_NONE'; + break; + }//end switch + + $newToken['code'] = constant($newToken['type']); + $newToken['content'] = $token; + + self::$resolveTokenCache[$token] = $newToken; + return $newToken; + + }//end resolveSimpleToken() + + + /** + * Finds a "closer" token (closing parenthesis or square bracket for example) + * Handle parenthesis balancing while searching for closing token + * + * @param array $tokens The list of tokens to iterate searching the closing token (as returned by token_get_all) + * @param int $start The starting position + * @param string|string[] $openerTokens The opening character + * @param string $closerChar The closing character + * + * @return int|null The position of the closing token, if found. NULL otherwise. + */ + private function findCloser(array &$tokens, $start, $openerTokens, $closerChar) + { + $numTokens = count($tokens); + $stack = [0]; + $closer = null; + $openerTokens = (array) $openerTokens; + + for ($x = $start; $x < $numTokens; $x++) { + if (in_array($tokens[$x], $openerTokens, true) === true + || (is_array($tokens[$x]) === true && in_array($tokens[$x][1], $openerTokens, true) === true) + ) { + $stack[] = $x; + } else if ($tokens[$x] === $closerChar) { + array_pop($stack); + if (empty($stack) === true) { + $closer = $x; + break; + } + } + } + + return $closer; + + }//end findCloser() + + + /** + * PHP 8 attributes parser for PHP < 8 + * Handles single-line and multiline attributes. + * + * @param array $tokens The original array of tokens (as returned by token_get_all) + * @param int $stackPtr The current position in token array + * + * @return array|null The array of parsed attribute tokens + */ + private function parsePhpAttribute(array &$tokens, $stackPtr) + { + + $token = $tokens[$stackPtr]; + + $commentBody = substr($token[1], 2); + $subTokens = @token_get_all(' $subToken) { + if (is_array($subToken) === true + && $subToken[0] === T_COMMENT + && strpos($subToken[1], '#[') === 0 + ) { + $reparsed = $this->parsePhpAttribute($subTokens, $i); + if ($reparsed !== null) { + array_splice($subTokens, $i, 1, $reparsed); + } else { + $subToken[0] = T_ATTRIBUTE; + } + } + } + + array_splice($subTokens, 0, 1, [[T_ATTRIBUTE, '#[']]); + + // Go looking for the close bracket. + $bracketCloser = $this->findCloser($subTokens, 1, '[', ']'); + if (PHP_VERSION_ID < 80000 && $bracketCloser === null) { + foreach (array_slice($tokens, ($stackPtr + 1)) as $token) { + if (is_array($token) === true) { + $commentBody .= $token[1]; + } else { + $commentBody .= $token; + } + } + + $subTokens = @token_get_all('findCloser($subTokens, 1, '[', ']'); + if ($bracketCloser !== null) { + array_splice($tokens, ($stackPtr + 1), count($tokens), array_slice($subTokens, ($bracketCloser + 1))); + $subTokens = array_slice($subTokens, 0, ($bracketCloser + 1)); + } + } + + if ($bracketCloser === null) { + return null; + } + + return $subTokens; + + }//end parsePhpAttribute() + + + /** + * Creates a map for the attributes tokens that surround other tokens. + * + * @return void + */ + private function createAttributesNestingMap() + { + $map = []; + for ($i = 0; $i < $this->numTokens; $i++) { + if (isset($this->tokens[$i]['attribute_opener']) === true + && $i === $this->tokens[$i]['attribute_opener'] + ) { + if (empty($map) === false) { + $this->tokens[$i]['nested_attributes'] = $map; + } + + if (isset($this->tokens[$i]['attribute_closer']) === true) { + $map[$this->tokens[$i]['attribute_opener']] + = $this->tokens[$i]['attribute_closer']; + } + } else if (isset($this->tokens[$i]['attribute_closer']) === true + && $i === $this->tokens[$i]['attribute_closer'] + ) { + array_pop($map); + if (empty($map) === false) { + $this->tokens[$i]['nested_attributes'] = $map; + } + } else { + if (empty($map) === false) { + $this->tokens[$i]['nested_attributes'] = $map; + } + }//end if + }//end for + + }//end createAttributesNestingMap() + + +}//end class diff --git a/vendor/squizlabs/php_codesniffer/src/Tokenizers/Tokenizer.php b/vendor/squizlabs/php_codesniffer/src/Tokenizers/Tokenizer.php new file mode 100644 index 00000000..c79323cc --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Tokenizers/Tokenizer.php @@ -0,0 +1,1732 @@ + + * @copyright 2006-2015 Squiz Pty Ltd (ABN 77 084 670 600) + * @license https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence + */ + +namespace PHP_CodeSniffer\Tokenizers; + +use PHP_CodeSniffer\Exceptions\TokenizerException; +use PHP_CodeSniffer\Util; + +abstract class Tokenizer +{ + + /** + * The config data for the run. + * + * @var \PHP_CodeSniffer\Config + */ + protected $config = null; + + /** + * The EOL char used in the content. + * + * @var string + */ + protected $eolChar = []; + + /** + * A token-based representation of the content. + * + * @var array + */ + protected $tokens = []; + + /** + * The number of tokens in the tokens array. + * + * @var integer + */ + protected $numTokens = 0; + + /** + * A list of tokens that are allowed to open a scope. + * + * @var array + */ + public $scopeOpeners = []; + + /** + * A list of tokens that end the scope. + * + * @var array + */ + public $endScopeTokens = []; + + /** + * Known lengths of tokens. + * + * @var array + */ + public $knownLengths = []; + + /** + * A list of lines being ignored due to error suppression comments. + * + * @var array + */ + public $ignoredLines = []; + + + /** + * Initialise and run the tokenizer. + * + * @param string $content The content to tokenize, + * @param \PHP_CodeSniffer\Config | null $config The config data for the run. + * @param string $eolChar The EOL char used in the content. + * + * @return void + * @throws \PHP_CodeSniffer\Exceptions\TokenizerException If the file appears to be minified. + */ + public function __construct($content, $config, $eolChar='\n') + { + $this->eolChar = $eolChar; + + $this->config = $config; + $this->tokens = $this->tokenize($content); + + if ($config === null) { + return; + } + + $this->createPositionMap(); + $this->createTokenMap(); + $this->createParenthesisNestingMap(); + $this->createScopeMap(); + $this->createLevelMap(); + + // Allow the tokenizer to do additional processing if required. + $this->processAdditional(); + + }//end __construct() + + + /** + * Checks the content to see if it looks minified. + * + * @param string $content The content to tokenize. + * @param string $eolChar The EOL char used in the content. + * + * @return boolean + */ + protected function isMinifiedContent($content, $eolChar='\n') + { + // Minified files often have a very large number of characters per line + // and cause issues when tokenizing. + $numChars = strlen($content); + $numLines = (substr_count($content, $eolChar) + 1); + $average = ($numChars / $numLines); + if ($average > 100) { + return true; + } + + return false; + + }//end isMinifiedContent() + + + /** + * Gets the array of tokens. + * + * @return array + */ + public function getTokens() + { + return $this->tokens; + + }//end getTokens() + + + /** + * Creates an array of tokens when given some content. + * + * @param string $string The string to tokenize. + * + * @return array + */ + abstract protected function tokenize($string); + + + /** + * Performs additional processing after main tokenizing. + * + * @return void + */ + abstract protected function processAdditional(); + + + /** + * Sets token position information. + * + * Can also convert tabs into spaces. Each tab can represent between + * 1 and $width spaces, so this cannot be a straight string replace. + * + * @return void + */ + private function createPositionMap() + { + $currColumn = 1; + $lineNumber = 1; + $eolLen = strlen($this->eolChar); + $ignoring = null; + $inTests = defined('PHP_CODESNIFFER_IN_TESTS'); + + $checkEncoding = false; + if (function_exists('iconv_strlen') === true) { + $checkEncoding = true; + } + + $checkAnnotations = $this->config->annotations; + $encoding = $this->config->encoding; + $tabWidth = $this->config->tabWidth; + + $tokensWithTabs = [ + T_WHITESPACE => true, + T_COMMENT => true, + T_DOC_COMMENT => true, + T_DOC_COMMENT_WHITESPACE => true, + T_DOC_COMMENT_STRING => true, + T_CONSTANT_ENCAPSED_STRING => true, + T_DOUBLE_QUOTED_STRING => true, + T_HEREDOC => true, + T_NOWDOC => true, + T_INLINE_HTML => true, + ]; + + $this->numTokens = count($this->tokens); + for ($i = 0; $i < $this->numTokens; $i++) { + $this->tokens[$i]['line'] = $lineNumber; + $this->tokens[$i]['column'] = $currColumn; + + if (isset($this->knownLengths[$this->tokens[$i]['code']]) === true) { + // There are no tabs in the tokens we know the length of. + $length = $this->knownLengths[$this->tokens[$i]['code']]; + $currColumn += $length; + } else if ($tabWidth === 0 + || isset($tokensWithTabs[$this->tokens[$i]['code']]) === false + || strpos($this->tokens[$i]['content'], "\t") === false + ) { + // There are no tabs in this content, or we aren't replacing them. + if ($checkEncoding === true) { + // Not using the default encoding, so take a bit more care. + $oldLevel = error_reporting(); + error_reporting(0); + $length = iconv_strlen($this->tokens[$i]['content'], $encoding); + error_reporting($oldLevel); + + if ($length === false) { + // String contained invalid characters, so revert to default. + $length = strlen($this->tokens[$i]['content']); + } + } else { + $length = strlen($this->tokens[$i]['content']); + } + + $currColumn += $length; + } else { + $this->replaceTabsInToken($this->tokens[$i]); + $length = $this->tokens[$i]['length']; + $currColumn += $length; + }//end if + + $this->tokens[$i]['length'] = $length; + + if (isset($this->knownLengths[$this->tokens[$i]['code']]) === false + && strpos($this->tokens[$i]['content'], $this->eolChar) !== false + ) { + $lineNumber++; + $currColumn = 1; + + // Newline chars are not counted in the token length. + $this->tokens[$i]['length'] -= $eolLen; + } + + if ($this->tokens[$i]['code'] === T_COMMENT + || $this->tokens[$i]['code'] === T_DOC_COMMENT_STRING + || $this->tokens[$i]['code'] === T_DOC_COMMENT_TAG + || ($inTests === true && $this->tokens[$i]['code'] === T_INLINE_HTML) + ) { + $commentText = ltrim($this->tokens[$i]['content'], " \t/*#"); + $commentText = rtrim($commentText, " */\t\r\n"); + $commentTextLower = strtolower($commentText); + if (strpos($commentText, '@codingStandards') !== false) { + // If this comment is the only thing on the line, it tells us + // to ignore the following line. If the line contains other content + // then we are just ignoring this one single line. + $ownLine = false; + if ($i > 0) { + for ($prev = ($i - 1); $prev >= 0; $prev--) { + if ($this->tokens[$prev]['code'] === T_WHITESPACE) { + continue; + } + + break; + } + + if ($this->tokens[$prev]['line'] !== $this->tokens[$i]['line']) { + $ownLine = true; + } + } + + if ($ignoring === null + && strpos($commentText, '@codingStandardsIgnoreStart') !== false + ) { + $ignoring = ['.all' => true]; + if ($ownLine === true) { + $this->ignoredLines[$this->tokens[$i]['line']] = $ignoring; + } + } else if ($ignoring !== null + && strpos($commentText, '@codingStandardsIgnoreEnd') !== false + ) { + if ($ownLine === true) { + $this->ignoredLines[$this->tokens[$i]['line']] = ['.all' => true]; + } else { + $this->ignoredLines[$this->tokens[$i]['line']] = $ignoring; + } + + $ignoring = null; + } else if ($ignoring === null + && strpos($commentText, '@codingStandardsIgnoreLine') !== false + ) { + $ignoring = ['.all' => true]; + if ($ownLine === true) { + $this->ignoredLines[$this->tokens[$i]['line']] = $ignoring; + $this->ignoredLines[($this->tokens[$i]['line'] + 1)] = $ignoring; + } else { + $this->ignoredLines[$this->tokens[$i]['line']] = $ignoring; + } + + $ignoring = null; + }//end if + } else if (substr($commentTextLower, 0, 6) === 'phpcs:' + || substr($commentTextLower, 0, 7) === '@phpcs:' + ) { + // If the @phpcs: syntax is being used, strip the @ to make + // comparisons easier. + if ($commentText[0] === '@') { + $commentText = substr($commentText, 1); + $commentTextLower = strtolower($commentText); + } + + // If there is a comment on the end, strip it off. + $commentStart = strpos($commentTextLower, ' --'); + if ($commentStart !== false) { + $commentText = substr($commentText, 0, $commentStart); + $commentTextLower = strtolower($commentText); + } + + // If this comment is the only thing on the line, it tells us + // to ignore the following line. If the line contains other content + // then we are just ignoring this one single line. + $lineHasOtherContent = false; + $lineHasOtherTokens = false; + if ($i > 0) { + for ($prev = ($i - 1); $prev > 0; $prev--) { + if ($this->tokens[$prev]['line'] !== $this->tokens[$i]['line']) { + // Changed lines. + break; + } + + if ($this->tokens[$prev]['code'] === T_WHITESPACE + || $this->tokens[$prev]['code'] === T_DOC_COMMENT_WHITESPACE + || ($this->tokens[$prev]['code'] === T_INLINE_HTML + && trim($this->tokens[$prev]['content']) === '') + ) { + continue; + } + + $lineHasOtherTokens = true; + + if ($this->tokens[$prev]['code'] === T_OPEN_TAG + || $this->tokens[$prev]['code'] === T_DOC_COMMENT_STAR + ) { + continue; + } + + $lineHasOtherContent = true; + break; + }//end for + + $changedLines = false; + for ($next = $i; $next < $this->numTokens; $next++) { + if ($changedLines === true) { + // Changed lines. + break; + } + + if (isset($this->knownLengths[$this->tokens[$next]['code']]) === false + && strpos($this->tokens[$next]['content'], $this->eolChar) !== false + ) { + // Last token on the current line. + $changedLines = true; + } + + if ($next === $i) { + continue; + } + + if ($this->tokens[$next]['code'] === T_WHITESPACE + || $this->tokens[$next]['code'] === T_DOC_COMMENT_WHITESPACE + || ($this->tokens[$next]['code'] === T_INLINE_HTML + && trim($this->tokens[$next]['content']) === '') + ) { + continue; + } + + $lineHasOtherTokens = true; + + if ($this->tokens[$next]['code'] === T_CLOSE_TAG) { + continue; + } + + $lineHasOtherContent = true; + break; + }//end for + }//end if + + if (substr($commentTextLower, 0, 9) === 'phpcs:set') { + // Ignore standards for complete lines that change sniff settings. + if ($lineHasOtherTokens === false) { + $this->ignoredLines[$this->tokens[$i]['line']] = ['.all' => true]; + } + + // Need to maintain case here, to get the correct sniff code. + $parts = explode(' ', substr($commentText, 10)); + if (count($parts) >= 2) { + $sniffParts = explode('.', $parts[0]); + if (count($sniffParts) >= 3) { + $this->tokens[$i]['sniffCode'] = array_shift($parts); + $this->tokens[$i]['sniffProperty'] = array_shift($parts); + $this->tokens[$i]['sniffPropertyValue'] = rtrim(implode(' ', $parts), " */\r\n"); + } + } + + $this->tokens[$i]['code'] = T_PHPCS_SET; + $this->tokens[$i]['type'] = 'T_PHPCS_SET'; + } else if (substr($commentTextLower, 0, 16) === 'phpcs:ignorefile') { + // The whole file will be ignored, but at least set the correct token. + $this->tokens[$i]['code'] = T_PHPCS_IGNORE_FILE; + $this->tokens[$i]['type'] = 'T_PHPCS_IGNORE_FILE'; + } else if (substr($commentTextLower, 0, 13) === 'phpcs:disable') { + if ($lineHasOtherContent === false) { + // Completely ignore the comment line. + $this->ignoredLines[$this->tokens[$i]['line']] = ['.all' => true]; + } + + if ($ignoring === null) { + $ignoring = []; + } + + $disabledSniffs = []; + + $additionalText = substr($commentText, 14); + if (empty($additionalText) === true) { + $ignoring = ['.all' => true]; + } else { + $parts = explode(',', $additionalText); + foreach ($parts as $sniffCode) { + $sniffCode = trim($sniffCode); + $disabledSniffs[$sniffCode] = true; + $ignoring[$sniffCode] = true; + + // This newly disabled sniff might be disabling an existing + // enabled exception that we are tracking. + if (isset($ignoring['.except']) === true) { + foreach (array_keys($ignoring['.except']) as $ignoredSniffCode) { + if ($ignoredSniffCode === $sniffCode + || strpos($ignoredSniffCode, $sniffCode.'.') === 0 + ) { + unset($ignoring['.except'][$ignoredSniffCode]); + } + } + + if (empty($ignoring['.except']) === true) { + unset($ignoring['.except']); + } + } + }//end foreach + }//end if + + $this->tokens[$i]['code'] = T_PHPCS_DISABLE; + $this->tokens[$i]['type'] = 'T_PHPCS_DISABLE'; + $this->tokens[$i]['sniffCodes'] = $disabledSniffs; + } else if (substr($commentTextLower, 0, 12) === 'phpcs:enable') { + if ($ignoring !== null) { + $enabledSniffs = []; + + $additionalText = substr($commentText, 13); + if (empty($additionalText) === true) { + $ignoring = null; + } else { + $parts = explode(',', $additionalText); + foreach ($parts as $sniffCode) { + $sniffCode = trim($sniffCode); + $enabledSniffs[$sniffCode] = true; + + // This new enabled sniff might remove previously disabled + // sniffs if it is actually a standard or category of sniffs. + foreach (array_keys($ignoring) as $ignoredSniffCode) { + if ($ignoredSniffCode === $sniffCode + || strpos($ignoredSniffCode, $sniffCode.'.') === 0 + ) { + unset($ignoring[$ignoredSniffCode]); + } + } + + // This new enabled sniff might be able to clear up + // previously enabled sniffs if it is actually a standard or + // category of sniffs. + if (isset($ignoring['.except']) === true) { + foreach (array_keys($ignoring['.except']) as $ignoredSniffCode) { + if ($ignoredSniffCode === $sniffCode + || strpos($ignoredSniffCode, $sniffCode.'.') === 0 + ) { + unset($ignoring['.except'][$ignoredSniffCode]); + } + } + } + }//end foreach + + if (empty($ignoring) === true) { + $ignoring = null; + } else { + if (isset($ignoring['.except']) === true) { + $ignoring['.except'] += $enabledSniffs; + } else { + $ignoring['.except'] = $enabledSniffs; + } + } + }//end if + + if ($lineHasOtherContent === false) { + // Completely ignore the comment line. + $this->ignoredLines[$this->tokens[$i]['line']] = ['.all' => true]; + } else { + // The comment is on the same line as the code it is ignoring, + // so respect the new ignore rules. + $this->ignoredLines[$this->tokens[$i]['line']] = $ignoring; + } + + $this->tokens[$i]['sniffCodes'] = $enabledSniffs; + }//end if + + $this->tokens[$i]['code'] = T_PHPCS_ENABLE; + $this->tokens[$i]['type'] = 'T_PHPCS_ENABLE'; + } else if (substr($commentTextLower, 0, 12) === 'phpcs:ignore') { + $ignoreRules = []; + + $additionalText = substr($commentText, 13); + if (empty($additionalText) === true) { + $ignoreRules = ['.all' => true]; + } else { + $parts = explode(',', $additionalText); + foreach ($parts as $sniffCode) { + $ignoreRules[trim($sniffCode)] = true; + } + } + + $this->tokens[$i]['code'] = T_PHPCS_IGNORE; + $this->tokens[$i]['type'] = 'T_PHPCS_IGNORE'; + $this->tokens[$i]['sniffCodes'] = $ignoreRules; + + if ($ignoring !== null) { + $ignoreRules += $ignoring; + } + + if ($lineHasOtherContent === false) { + // Completely ignore the comment line, and set the following + // line to include the ignore rules we've set. + $this->ignoredLines[$this->tokens[$i]['line']] = ['.all' => true]; + $this->ignoredLines[($this->tokens[$i]['line'] + 1)] = $ignoreRules; + } else { + // The comment is on the same line as the code it is ignoring, + // so respect the ignore rules it set. + $this->ignoredLines[$this->tokens[$i]['line']] = $ignoreRules; + } + }//end if + }//end if + }//end if + + if ($ignoring !== null && isset($this->ignoredLines[$this->tokens[$i]['line']]) === false) { + $this->ignoredLines[$this->tokens[$i]['line']] = $ignoring; + } + }//end for + + // If annotations are being ignored, we clear out all the ignore rules + // but leave the annotations tokenized as normal. + if ($checkAnnotations === false) { + $this->ignoredLines = []; + } + + }//end createPositionMap() + + + /** + * Replaces tabs in original token content with spaces. + * + * Each tab can represent between 1 and $config->tabWidth spaces, + * so this cannot be a straight string replace. The original content + * is placed into an orig_content index and the new token length is also + * set in the length index. + * + * @param array $token The token to replace tabs inside. + * @param string $prefix The character to use to represent the start of a tab. + * @param string $padding The character to use to represent the end of a tab. + * @param int $tabWidth The number of spaces each tab represents. + * + * @return void + */ + public function replaceTabsInToken(&$token, $prefix=' ', $padding=' ', $tabWidth=null) + { + $checkEncoding = false; + if (function_exists('iconv_strlen') === true) { + $checkEncoding = true; + } + + $currColumn = $token['column']; + if ($tabWidth === null) { + $tabWidth = $this->config->tabWidth; + if ($tabWidth === 0) { + $tabWidth = 1; + } + } + + if (rtrim($token['content'], "\t") === '') { + // String only contains tabs, so we can shortcut the process. + $numTabs = strlen($token['content']); + + $firstTabSize = ($tabWidth - (($currColumn - 1) % $tabWidth)); + $length = ($firstTabSize + ($tabWidth * ($numTabs - 1))); + $newContent = $prefix.str_repeat($padding, ($length - 1)); + } else { + // We need to determine the length of each tab. + $tabs = explode("\t", $token['content']); + + $numTabs = (count($tabs) - 1); + $tabNum = 0; + $newContent = ''; + $length = 0; + + foreach ($tabs as $content) { + if ($content !== '') { + $newContent .= $content; + if ($checkEncoding === true) { + // Not using the default encoding, so take a bit more care. + $oldLevel = error_reporting(); + error_reporting(0); + $contentLength = iconv_strlen($content, $this->config->encoding); + error_reporting($oldLevel); + if ($contentLength === false) { + // String contained invalid characters, so revert to default. + $contentLength = strlen($content); + } + } else { + $contentLength = strlen($content); + } + + $currColumn += $contentLength; + $length += $contentLength; + } + + // The last piece of content does not have a tab after it. + if ($tabNum === $numTabs) { + break; + } + + // Process the tab that comes after the content. + $tabNum++; + + // Move the pointer to the next tab stop. + $pad = ($tabWidth - ($currColumn + $tabWidth - 1) % $tabWidth); + $currColumn += $pad; + $length += $pad; + $newContent .= $prefix.str_repeat($padding, ($pad - 1)); + }//end foreach + }//end if + + $token['orig_content'] = $token['content']; + $token['content'] = $newContent; + $token['length'] = $length; + + }//end replaceTabsInToken() + + + /** + * Creates a map of brackets positions. + * + * @return void + */ + private function createTokenMap() + { + if (PHP_CODESNIFFER_VERBOSITY > 1) { + echo "\t*** START TOKEN MAP ***".PHP_EOL; + } + + $squareOpeners = []; + $curlyOpeners = []; + $this->numTokens = count($this->tokens); + + $openers = []; + $openOwner = null; + + for ($i = 0; $i < $this->numTokens; $i++) { + /* + Parenthesis mapping. + */ + + if (isset(Util\Tokens::$parenthesisOpeners[$this->tokens[$i]['code']]) === true) { + $this->tokens[$i]['parenthesis_opener'] = null; + $this->tokens[$i]['parenthesis_closer'] = null; + $this->tokens[$i]['parenthesis_owner'] = $i; + $openOwner = $i; + + if (PHP_CODESNIFFER_VERBOSITY > 1) { + echo str_repeat("\t", (count($openers) + 1)); + echo "=> Found parenthesis owner at $i".PHP_EOL; + } + } else if ($this->tokens[$i]['code'] === T_OPEN_PARENTHESIS) { + $openers[] = $i; + $this->tokens[$i]['parenthesis_opener'] = $i; + if ($openOwner !== null) { + if (PHP_CODESNIFFER_VERBOSITY > 1) { + echo str_repeat("\t", count($openers)); + echo "=> Found parenthesis opener at $i for $openOwner".PHP_EOL; + } + + $this->tokens[$openOwner]['parenthesis_opener'] = $i; + $this->tokens[$i]['parenthesis_owner'] = $openOwner; + $openOwner = null; + } else if (PHP_CODESNIFFER_VERBOSITY > 1) { + echo str_repeat("\t", count($openers)); + echo "=> Found unowned parenthesis opener at $i".PHP_EOL; + } + } else if ($this->tokens[$i]['code'] === T_CLOSE_PARENTHESIS) { + // Did we set an owner for this set of parenthesis? + $numOpeners = count($openers); + if ($numOpeners !== 0) { + $opener = array_pop($openers); + if (isset($this->tokens[$opener]['parenthesis_owner']) === true) { + $owner = $this->tokens[$opener]['parenthesis_owner']; + + $this->tokens[$owner]['parenthesis_closer'] = $i; + $this->tokens[$i]['parenthesis_owner'] = $owner; + + if (PHP_CODESNIFFER_VERBOSITY > 1) { + echo str_repeat("\t", (count($openers) + 1)); + echo "=> Found parenthesis closer at $i for $owner".PHP_EOL; + } + } else if (PHP_CODESNIFFER_VERBOSITY > 1) { + echo str_repeat("\t", (count($openers) + 1)); + echo "=> Found unowned parenthesis closer at $i for $opener".PHP_EOL; + } + + $this->tokens[$i]['parenthesis_opener'] = $opener; + $this->tokens[$i]['parenthesis_closer'] = $i; + $this->tokens[$opener]['parenthesis_closer'] = $i; + }//end if + } else if ($this->tokens[$i]['code'] === T_ATTRIBUTE) { + $openers[] = $i; + if (PHP_CODESNIFFER_VERBOSITY > 1) { + echo str_repeat("\t", count($openers)); + echo "=> Found attribute opener at $i".PHP_EOL; + } + + $this->tokens[$i]['attribute_opener'] = $i; + $this->tokens[$i]['attribute_closer'] = null; + } else if ($this->tokens[$i]['code'] === T_ATTRIBUTE_END) { + $numOpeners = count($openers); + if ($numOpeners !== 0) { + $opener = array_pop($openers); + if (isset($this->tokens[$opener]['attribute_opener']) === true) { + $this->tokens[$opener]['attribute_closer'] = $i; + + if (PHP_CODESNIFFER_VERBOSITY > 1) { + echo str_repeat("\t", (count($openers) + 1)); + echo "=> Found attribute closer at $i for $opener".PHP_EOL; + } + + for ($x = ($opener + 1); $x <= $i; ++$x) { + if (isset($this->tokens[$x]['attribute_closer']) === true) { + continue; + } + + $this->tokens[$x]['attribute_opener'] = $opener; + $this->tokens[$x]['attribute_closer'] = $i; + } + } else if (PHP_CODESNIFFER_VERBOSITY > 1) { + echo str_repeat("\t", (count($openers) + 1)); + echo "=> Found unowned attribute closer at $i for $opener".PHP_EOL; + } + }//end if + }//end if + + /* + Bracket mapping. + */ + + switch ($this->tokens[$i]['code']) { + case T_OPEN_SQUARE_BRACKET: + $squareOpeners[] = $i; + + if (PHP_CODESNIFFER_VERBOSITY > 1) { + echo str_repeat("\t", count($squareOpeners)); + echo str_repeat("\t", count($curlyOpeners)); + echo "=> Found square bracket opener at $i".PHP_EOL; + } + break; + case T_OPEN_CURLY_BRACKET: + if (isset($this->tokens[$i]['scope_closer']) === false) { + $curlyOpeners[] = $i; + + if (PHP_CODESNIFFER_VERBOSITY > 1) { + echo str_repeat("\t", count($squareOpeners)); + echo str_repeat("\t", count($curlyOpeners)); + echo "=> Found curly bracket opener at $i".PHP_EOL; + } + } + break; + case T_CLOSE_SQUARE_BRACKET: + if (empty($squareOpeners) === false) { + $opener = array_pop($squareOpeners); + $this->tokens[$i]['bracket_opener'] = $opener; + $this->tokens[$i]['bracket_closer'] = $i; + $this->tokens[$opener]['bracket_opener'] = $opener; + $this->tokens[$opener]['bracket_closer'] = $i; + + if (PHP_CODESNIFFER_VERBOSITY > 1) { + echo str_repeat("\t", count($squareOpeners)); + echo str_repeat("\t", count($curlyOpeners)); + echo "\t=> Found square bracket closer at $i for $opener".PHP_EOL; + } + } + break; + case T_CLOSE_CURLY_BRACKET: + if (empty($curlyOpeners) === false + && isset($this->tokens[$i]['scope_opener']) === false + ) { + $opener = array_pop($curlyOpeners); + $this->tokens[$i]['bracket_opener'] = $opener; + $this->tokens[$i]['bracket_closer'] = $i; + $this->tokens[$opener]['bracket_opener'] = $opener; + $this->tokens[$opener]['bracket_closer'] = $i; + + if (PHP_CODESNIFFER_VERBOSITY > 1) { + echo str_repeat("\t", count($squareOpeners)); + echo str_repeat("\t", count($curlyOpeners)); + echo "\t=> Found curly bracket closer at $i for $opener".PHP_EOL; + } + } + break; + default: + continue 2; + }//end switch + }//end for + + // Cleanup for any openers that we didn't find closers for. + // This typically means there was a syntax error breaking things. + foreach ($openers as $opener) { + unset($this->tokens[$opener]['parenthesis_opener']); + unset($this->tokens[$opener]['parenthesis_owner']); + } + + if (PHP_CODESNIFFER_VERBOSITY > 1) { + echo "\t*** END TOKEN MAP ***".PHP_EOL; + } + + }//end createTokenMap() + + + /** + * Creates a map for the parenthesis tokens that surround other tokens. + * + * @return void + */ + private function createParenthesisNestingMap() + { + $map = []; + for ($i = 0; $i < $this->numTokens; $i++) { + if (isset($this->tokens[$i]['parenthesis_opener']) === true + && $i === $this->tokens[$i]['parenthesis_opener'] + ) { + if (empty($map) === false) { + $this->tokens[$i]['nested_parenthesis'] = $map; + } + + if (isset($this->tokens[$i]['parenthesis_closer']) === true) { + $map[$this->tokens[$i]['parenthesis_opener']] + = $this->tokens[$i]['parenthesis_closer']; + } + } else if (isset($this->tokens[$i]['parenthesis_closer']) === true + && $i === $this->tokens[$i]['parenthesis_closer'] + ) { + array_pop($map); + if (empty($map) === false) { + $this->tokens[$i]['nested_parenthesis'] = $map; + } + } else { + if (empty($map) === false) { + $this->tokens[$i]['nested_parenthesis'] = $map; + } + }//end if + }//end for + + }//end createParenthesisNestingMap() + + + /** + * Creates a scope map of tokens that open scopes. + * + * @return void + * @see recurseScopeMap() + */ + private function createScopeMap() + { + if (PHP_CODESNIFFER_VERBOSITY > 1) { + echo "\t*** START SCOPE MAP ***".PHP_EOL; + } + + for ($i = 0; $i < $this->numTokens; $i++) { + // Check to see if the current token starts a new scope. + if (isset($this->scopeOpeners[$this->tokens[$i]['code']]) === true) { + if (PHP_CODESNIFFER_VERBOSITY > 1) { + $type = $this->tokens[$i]['type']; + $content = Util\Common::prepareForOutput($this->tokens[$i]['content']); + echo "\tStart scope map at $i:$type => $content".PHP_EOL; + } + + if (isset($this->tokens[$i]['scope_condition']) === true) { + if (PHP_CODESNIFFER_VERBOSITY > 1) { + echo "\t* already processed, skipping *".PHP_EOL; + } + + continue; + } + + $i = $this->recurseScopeMap($i); + }//end if + }//end for + + if (PHP_CODESNIFFER_VERBOSITY > 1) { + echo "\t*** END SCOPE MAP ***".PHP_EOL; + } + + }//end createScopeMap() + + + /** + * Recurses though the scope openers to build a scope map. + * + * @param int $stackPtr The position in the stack of the token that + * opened the scope (eg. an IF token or FOR token). + * @param int $depth How many scope levels down we are. + * @param int $ignore How many curly braces we are ignoring. + * + * @return int The position in the stack that closed the scope. + * @throws \PHP_CodeSniffer\Exceptions\TokenizerException If the nesting level gets too deep. + */ + private function recurseScopeMap($stackPtr, $depth=1, &$ignore=0) + { + if (PHP_CODESNIFFER_VERBOSITY > 1) { + echo str_repeat("\t", $depth); + echo "=> Begin scope map recursion at token $stackPtr with depth $depth".PHP_EOL; + } + + $opener = null; + $currType = $this->tokens[$stackPtr]['code']; + $startLine = $this->tokens[$stackPtr]['line']; + + // We will need this to restore the value if we end up + // returning a token ID that causes our calling function to go back + // over already ignored braces. + $originalIgnore = $ignore; + + // If the start token for this scope opener is the same as + // the scope token, we have already found our opener. + if (isset($this->scopeOpeners[$currType]['start'][$currType]) === true) { + $opener = $stackPtr; + } + + for ($i = ($stackPtr + 1); $i < $this->numTokens; $i++) { + $tokenType = $this->tokens[$i]['code']; + + if (PHP_CODESNIFFER_VERBOSITY > 1) { + $type = $this->tokens[$i]['type']; + $line = $this->tokens[$i]['line']; + $content = Util\Common::prepareForOutput($this->tokens[$i]['content']); + + echo str_repeat("\t", $depth); + echo "Process token $i on line $line ["; + if ($opener !== null) { + echo "opener:$opener;"; + } + + if ($ignore > 0) { + echo "ignore=$ignore;"; + } + + echo "]: $type => $content".PHP_EOL; + }//end if + + // Very special case for IF statements in PHP that can be defined without + // scope tokens. E.g., if (1) 1; 1 ? (1 ? 1 : 1) : 1; + // If an IF statement below this one has an opener but no + // keyword, the opener will be incorrectly assigned to this IF statement. + // The same case also applies to USE statements, which don't have to have + // openers, so a following USE statement can cause an incorrect brace match. + if (($currType === T_IF || $currType === T_ELSE || $currType === T_USE) + && $opener === null + && ($this->tokens[$i]['code'] === T_SEMICOLON + || $this->tokens[$i]['code'] === T_CLOSE_TAG) + ) { + if (PHP_CODESNIFFER_VERBOSITY > 1) { + $type = $this->tokens[$stackPtr]['type']; + echo str_repeat("\t", $depth); + if ($this->tokens[$i]['code'] === T_SEMICOLON) { + $closerType = 'semicolon'; + } else { + $closerType = 'close tag'; + } + + echo "=> Found $closerType before scope opener for $stackPtr:$type, bailing".PHP_EOL; + } + + return $i; + } + + // Special case for PHP control structures that have no braces. + // If we find a curly brace closer before we find the opener, + // we're not going to find an opener. That closer probably belongs to + // a control structure higher up. + if ($opener === null + && $ignore === 0 + && $tokenType === T_CLOSE_CURLY_BRACKET + && isset($this->scopeOpeners[$currType]['end'][$tokenType]) === true + ) { + if (PHP_CODESNIFFER_VERBOSITY > 1) { + $type = $this->tokens[$stackPtr]['type']; + echo str_repeat("\t", $depth); + echo "=> Found curly brace closer before scope opener for $stackPtr:$type, bailing".PHP_EOL; + } + + return ($i - 1); + } + + if ($opener !== null + && (isset($this->tokens[$i]['scope_opener']) === false + || $this->scopeOpeners[$this->tokens[$stackPtr]['code']]['shared'] === true) + && isset($this->scopeOpeners[$currType]['end'][$tokenType]) === true + ) { + if ($ignore > 0 && $tokenType === T_CLOSE_CURLY_BRACKET) { + // The last opening bracket must have been for a string + // offset or alike, so let's ignore it. + if (PHP_CODESNIFFER_VERBOSITY > 1) { + echo str_repeat("\t", $depth); + echo '* finished ignoring curly brace *'.PHP_EOL; + } + + $ignore--; + continue; + } else if ($this->tokens[$opener]['code'] === T_OPEN_CURLY_BRACKET + && $tokenType !== T_CLOSE_CURLY_BRACKET + ) { + // The opener is a curly bracket so the closer must be a curly bracket as well. + // We ignore this closer to handle cases such as T_ELSE or T_ELSEIF being considered + // a closer of T_IF when it should not. + if (PHP_CODESNIFFER_VERBOSITY > 1) { + $type = $this->tokens[$stackPtr]['type']; + echo str_repeat("\t", $depth); + echo "=> Ignoring non-curly scope closer for $stackPtr:$type".PHP_EOL; + } + } else { + $scopeCloser = $i; + $todo = [ + $stackPtr, + $opener, + ]; + + if (PHP_CODESNIFFER_VERBOSITY > 1) { + $type = $this->tokens[$stackPtr]['type']; + $closerType = $this->tokens[$scopeCloser]['type']; + echo str_repeat("\t", $depth); + echo "=> Found scope closer ($scopeCloser:$closerType) for $stackPtr:$type".PHP_EOL; + } + + $validCloser = true; + if (($this->tokens[$stackPtr]['code'] === T_IF || $this->tokens[$stackPtr]['code'] === T_ELSEIF) + && ($tokenType === T_ELSE || $tokenType === T_ELSEIF) + ) { + // To be a closer, this token must have an opener. + if (PHP_CODESNIFFER_VERBOSITY > 1) { + echo str_repeat("\t", $depth); + echo "* closer needs to be tested *".PHP_EOL; + } + + $i = self::recurseScopeMap($i, ($depth + 1), $ignore); + + if (isset($this->tokens[$scopeCloser]['scope_opener']) === false) { + $validCloser = false; + if (PHP_CODESNIFFER_VERBOSITY > 1) { + echo str_repeat("\t", $depth); + echo "* closer is not valid (no opener found) *".PHP_EOL; + } + } else if ($this->tokens[$this->tokens[$scopeCloser]['scope_opener']]['code'] !== $this->tokens[$opener]['code']) { + $validCloser = false; + if (PHP_CODESNIFFER_VERBOSITY > 1) { + echo str_repeat("\t", $depth); + $type = $this->tokens[$this->tokens[$scopeCloser]['scope_opener']]['type']; + $openerType = $this->tokens[$opener]['type']; + echo "* closer is not valid (mismatched opener type; $type != $openerType) *".PHP_EOL; + } + } else if (PHP_CODESNIFFER_VERBOSITY > 1) { + echo str_repeat("\t", $depth); + echo "* closer was valid *".PHP_EOL; + } + } else { + // The closer was not processed, so we need to + // complete that token as well. + $todo[] = $scopeCloser; + }//end if + + if ($validCloser === true) { + foreach ($todo as $token) { + $this->tokens[$token]['scope_condition'] = $stackPtr; + $this->tokens[$token]['scope_opener'] = $opener; + $this->tokens[$token]['scope_closer'] = $scopeCloser; + } + + if ($this->scopeOpeners[$this->tokens[$stackPtr]['code']]['shared'] === true) { + // As we are going back to where we started originally, restore + // the ignore value back to its original value. + $ignore = $originalIgnore; + return $opener; + } else if ($scopeCloser === $i + && isset($this->scopeOpeners[$tokenType]) === true + ) { + // Unset scope_condition here or else the token will appear to have + // already been processed, and it will be skipped. Normally we want that, + // but in this case, the token is both a closer and an opener, so + // it needs to act like an opener. This is also why we return the + // token before this one; so the closer has a chance to be processed + // a second time, but as an opener. + unset($this->tokens[$scopeCloser]['scope_condition']); + return ($i - 1); + } else { + return $i; + } + } else { + continue; + }//end if + }//end if + }//end if + + // Is this an opening condition ? + if (isset($this->scopeOpeners[$tokenType]) === true) { + if ($opener === null) { + if ($tokenType === T_USE) { + // PHP use keywords are special because they can be + // used as blocks but also inline in function definitions. + // So if we find them nested inside another opener, just skip them. + continue; + } + + if ($tokenType === T_NAMESPACE) { + // PHP namespace keywords are special because they can be + // used as blocks but also inline as operators. + // So if we find them nested inside another opener, just skip them. + continue; + } + + if ($tokenType === T_FUNCTION + && $this->tokens[$stackPtr]['code'] !== T_FUNCTION + ) { + // Probably a closure, so process it manually. + if (PHP_CODESNIFFER_VERBOSITY > 1) { + $type = $this->tokens[$stackPtr]['type']; + echo str_repeat("\t", $depth); + echo "=> Found function before scope opener for $stackPtr:$type, processing manually".PHP_EOL; + } + + if (isset($this->tokens[$i]['scope_closer']) === true) { + // We've already processed this closure. + if (PHP_CODESNIFFER_VERBOSITY > 1) { + echo str_repeat("\t", $depth); + echo '* already processed, skipping *'.PHP_EOL; + } + + $i = $this->tokens[$i]['scope_closer']; + continue; + } + + $i = self::recurseScopeMap($i, ($depth + 1), $ignore); + continue; + }//end if + + if ($tokenType === T_CLASS) { + // Probably an anonymous class inside another anonymous class, + // so process it manually. + if (PHP_CODESNIFFER_VERBOSITY > 1) { + $type = $this->tokens[$stackPtr]['type']; + echo str_repeat("\t", $depth); + echo "=> Found class before scope opener for $stackPtr:$type, processing manually".PHP_EOL; + } + + if (isset($this->tokens[$i]['scope_closer']) === true) { + // We've already processed this anon class. + if (PHP_CODESNIFFER_VERBOSITY > 1) { + echo str_repeat("\t", $depth); + echo '* already processed, skipping *'.PHP_EOL; + } + + $i = $this->tokens[$i]['scope_closer']; + continue; + } + + $i = self::recurseScopeMap($i, ($depth + 1), $ignore); + continue; + }//end if + + // Found another opening condition but still haven't + // found our opener, so we are never going to find one. + if (PHP_CODESNIFFER_VERBOSITY > 1) { + $type = $this->tokens[$stackPtr]['type']; + echo str_repeat("\t", $depth); + echo "=> Found new opening condition before scope opener for $stackPtr:$type, "; + } + + if (($this->tokens[$stackPtr]['code'] === T_IF + || $this->tokens[$stackPtr]['code'] === T_ELSEIF + || $this->tokens[$stackPtr]['code'] === T_ELSE) + && ($this->tokens[$i]['code'] === T_ELSE + || $this->tokens[$i]['code'] === T_ELSEIF) + ) { + if (PHP_CODESNIFFER_VERBOSITY > 1) { + echo "continuing".PHP_EOL; + } + + return ($i - 1); + } else { + if (PHP_CODESNIFFER_VERBOSITY > 1) { + echo "backtracking".PHP_EOL; + } + + return $stackPtr; + } + }//end if + + if (PHP_CODESNIFFER_VERBOSITY > 1) { + echo str_repeat("\t", $depth); + echo '* token is an opening condition *'.PHP_EOL; + } + + $isShared = ($this->scopeOpeners[$tokenType]['shared'] === true); + + if (isset($this->tokens[$i]['scope_condition']) === true) { + // We've been here before. + if (PHP_CODESNIFFER_VERBOSITY > 1) { + echo str_repeat("\t", $depth); + echo '* already processed, skipping *'.PHP_EOL; + } + + if ($isShared === false + && isset($this->tokens[$i]['scope_closer']) === true + ) { + $i = $this->tokens[$i]['scope_closer']; + } + + continue; + } else if ($currType === $tokenType + && $isShared === false + && $opener === null + ) { + // We haven't yet found our opener, but we have found another + // scope opener which is the same type as us, and we don't + // share openers, so we will never find one. + if (PHP_CODESNIFFER_VERBOSITY > 1) { + echo str_repeat("\t", $depth); + echo '* it was another token\'s opener, bailing *'.PHP_EOL; + } + + return $stackPtr; + } else { + if (PHP_CODESNIFFER_VERBOSITY > 1) { + echo str_repeat("\t", $depth); + echo '* searching for opener *'.PHP_EOL; + } + + if (isset($this->scopeOpeners[$tokenType]['end'][T_CLOSE_CURLY_BRACKET]) === true) { + $oldIgnore = $ignore; + $ignore = 0; + } + + // PHP has a max nesting level for functions. Stop before we hit that limit + // because too many loops means we've run into trouble anyway. + if ($depth > 50) { + if (PHP_CODESNIFFER_VERBOSITY > 1) { + echo str_repeat("\t", $depth); + echo '* reached maximum nesting level; aborting *'.PHP_EOL; + } + + throw new TokenizerException('Maximum nesting level reached; file could not be processed'); + } + + $oldDepth = $depth; + if ($isShared === true + && isset($this->scopeOpeners[$tokenType]['with'][$currType]) === true + ) { + // Don't allow the depth to increment because this is + // possibly not a true nesting if we are sharing our closer. + // This can happen, for example, when a SWITCH has a large + // number of CASE statements with the same shared BREAK. + $depth--; + } + + $i = self::recurseScopeMap($i, ($depth + 1), $ignore); + $depth = $oldDepth; + + if (isset($this->scopeOpeners[$tokenType]['end'][T_CLOSE_CURLY_BRACKET]) === true) { + $ignore = $oldIgnore; + } + }//end if + }//end if + + if (isset($this->scopeOpeners[$currType]['start'][$tokenType]) === true + && $opener === null + ) { + if ($tokenType === T_OPEN_CURLY_BRACKET) { + if (isset($this->tokens[$stackPtr]['parenthesis_closer']) === true + && $i < $this->tokens[$stackPtr]['parenthesis_closer'] + ) { + // We found a curly brace inside the condition of the + // current scope opener, so it must be a string offset. + if (PHP_CODESNIFFER_VERBOSITY > 1) { + echo str_repeat("\t", $depth); + echo '* ignoring curly brace inside condition *'.PHP_EOL; + } + + $ignore++; + } else { + // Make sure this is actually an opener and not a + // string offset (e.g., $var{0}). + for ($x = ($i - 1); $x > 0; $x--) { + if (isset(Util\Tokens::$emptyTokens[$this->tokens[$x]['code']]) === true) { + continue; + } else { + // If the first non-whitespace/comment token looks like this + // brace is a string offset, or this brace is mid-way through + // a new statement, it isn't a scope opener. + $disallowed = Util\Tokens::$assignmentTokens; + $disallowed += [ + T_DOLLAR => true, + T_VARIABLE => true, + T_OBJECT_OPERATOR => true, + T_NULLSAFE_OBJECT_OPERATOR => true, + T_COMMA => true, + T_OPEN_PARENTHESIS => true, + ]; + + if (isset($disallowed[$this->tokens[$x]['code']]) === true) { + if (PHP_CODESNIFFER_VERBOSITY > 1) { + echo str_repeat("\t", $depth); + echo '* ignoring curly brace *'.PHP_EOL; + } + + $ignore++; + } + + break; + }//end if + }//end for + }//end if + }//end if + + if ($ignore === 0 || $tokenType !== T_OPEN_CURLY_BRACKET) { + $openerNested = isset($this->tokens[$i]['nested_parenthesis']); + $ownerNested = isset($this->tokens[$stackPtr]['nested_parenthesis']); + + if (($openerNested === true && $ownerNested === false) + || ($openerNested === false && $ownerNested === true) + || ($openerNested === true + && $this->tokens[$i]['nested_parenthesis'] !== $this->tokens[$stackPtr]['nested_parenthesis']) + ) { + // We found the a token that looks like the opener, but it's nested differently. + if (PHP_CODESNIFFER_VERBOSITY > 1) { + $type = $this->tokens[$i]['type']; + echo str_repeat("\t", $depth); + echo "* ignoring possible opener $i:$type as nested parenthesis don't match *".PHP_EOL; + } + } else { + // We found the opening scope token for $currType. + if (PHP_CODESNIFFER_VERBOSITY > 1) { + $type = $this->tokens[$stackPtr]['type']; + echo str_repeat("\t", $depth); + echo "=> Found scope opener for $stackPtr:$type".PHP_EOL; + } + + $opener = $i; + } + }//end if + } else if ($tokenType === T_SEMICOLON + && $opener === null + && (isset($this->tokens[$stackPtr]['parenthesis_closer']) === false + || $i > $this->tokens[$stackPtr]['parenthesis_closer']) + ) { + // Found the end of a statement but still haven't + // found our opener, so we are never going to find one. + if (PHP_CODESNIFFER_VERBOSITY > 1) { + $type = $this->tokens[$stackPtr]['type']; + echo str_repeat("\t", $depth); + echo "=> Found end of statement before scope opener for $stackPtr:$type, continuing".PHP_EOL; + } + + return ($i - 1); + } else if ($tokenType === T_OPEN_PARENTHESIS) { + if (isset($this->tokens[$i]['parenthesis_owner']) === true) { + $owner = $this->tokens[$i]['parenthesis_owner']; + if (isset(Util\Tokens::$scopeOpeners[$this->tokens[$owner]['code']]) === true + && isset($this->tokens[$i]['parenthesis_closer']) === true + ) { + // If we get into here, then we opened a parenthesis for + // a scope (eg. an if or else if) so we need to update the + // start of the line so that when we check to see + // if the closing parenthesis is more than n lines away from + // the statement, we check from the closing parenthesis. + $startLine = $this->tokens[$this->tokens[$i]['parenthesis_closer']]['line']; + } + } + } else if ($tokenType === T_OPEN_CURLY_BRACKET && $opener !== null) { + // We opened something that we don't have a scope opener for. + // Examples of this are curly brackets for string offsets etc. + // We want to ignore this so that we don't have an invalid scope + // map. + if (PHP_CODESNIFFER_VERBOSITY > 1) { + echo str_repeat("\t", $depth); + echo '* ignoring curly brace *'.PHP_EOL; + } + + $ignore++; + } else if ($tokenType === T_CLOSE_CURLY_BRACKET && $ignore > 0) { + // We found the end token for the opener we were ignoring. + if (PHP_CODESNIFFER_VERBOSITY > 1) { + echo str_repeat("\t", $depth); + echo '* finished ignoring curly brace *'.PHP_EOL; + } + + $ignore--; + } else if ($opener === null + && isset($this->scopeOpeners[$currType]) === true + ) { + // If we still haven't found the opener after 30 lines, + // we're not going to find it, unless we know it requires + // an opener (in which case we better keep looking) or the last + // token was empty (in which case we'll just confirm there is + // more code in this file and not just a big comment). + if ($this->tokens[$i]['line'] >= ($startLine + 30) + && isset(Util\Tokens::$emptyTokens[$this->tokens[($i - 1)]['code']]) === false + ) { + if ($this->scopeOpeners[$currType]['strict'] === true) { + if (PHP_CODESNIFFER_VERBOSITY > 1) { + $type = $this->tokens[$stackPtr]['type']; + $lines = ($this->tokens[$i]['line'] - $startLine); + echo str_repeat("\t", $depth); + echo "=> Still looking for $stackPtr:$type scope opener after $lines lines".PHP_EOL; + } + } else { + if (PHP_CODESNIFFER_VERBOSITY > 1) { + $type = $this->tokens[$stackPtr]['type']; + echo str_repeat("\t", $depth); + echo "=> Couldn't find scope opener for $stackPtr:$type, bailing".PHP_EOL; + } + + return $stackPtr; + } + } + } else if ($opener !== null + && $tokenType !== T_BREAK + && isset($this->endScopeTokens[$tokenType]) === true + ) { + if (isset($this->tokens[$i]['scope_condition']) === false) { + if ($ignore > 0) { + // We found the end token for the opener we were ignoring. + if (PHP_CODESNIFFER_VERBOSITY > 1) { + echo str_repeat("\t", $depth); + echo '* finished ignoring curly brace *'.PHP_EOL; + } + + $ignore--; + } else { + // We found a token that closes the scope but it doesn't + // have a condition, so it belongs to another token and + // our token doesn't have a closer, so pretend this is + // the closer. + if (PHP_CODESNIFFER_VERBOSITY > 1) { + $type = $this->tokens[$stackPtr]['type']; + echo str_repeat("\t", $depth); + echo "=> Found (unexpected) scope closer for $stackPtr:$type".PHP_EOL; + } + + foreach ([$stackPtr, $opener] as $token) { + $this->tokens[$token]['scope_condition'] = $stackPtr; + $this->tokens[$token]['scope_opener'] = $opener; + $this->tokens[$token]['scope_closer'] = $i; + } + + return ($i - 1); + }//end if + }//end if + }//end if + }//end for + + return $stackPtr; + + }//end recurseScopeMap() + + + /** + * Constructs the level map. + * + * The level map adds a 'level' index to each token which indicates the + * depth that a token within a set of scope blocks. It also adds a + * 'conditions' index which is an array of the scope conditions that opened + * each of the scopes - position 0 being the first scope opener. + * + * @return void + */ + private function createLevelMap() + { + if (PHP_CODESNIFFER_VERBOSITY > 1) { + echo "\t*** START LEVEL MAP ***".PHP_EOL; + } + + $this->numTokens = count($this->tokens); + $level = 0; + $conditions = []; + $lastOpener = null; + $openers = []; + + for ($i = 0; $i < $this->numTokens; $i++) { + if (PHP_CODESNIFFER_VERBOSITY > 1) { + $type = $this->tokens[$i]['type']; + $line = $this->tokens[$i]['line']; + $len = $this->tokens[$i]['length']; + $col = $this->tokens[$i]['column']; + + $content = Util\Common::prepareForOutput($this->tokens[$i]['content']); + + echo str_repeat("\t", ($level + 1)); + echo "Process token $i on line $line [col:$col;len:$len;lvl:$level;"; + if (empty($conditions) !== true) { + $conditionString = 'conds;'; + foreach ($conditions as $condition) { + $conditionString .= Util\Tokens::tokenName($condition).','; + } + + echo rtrim($conditionString, ',').';'; + } + + echo "]: $type => $content".PHP_EOL; + }//end if + + $this->tokens[$i]['level'] = $level; + $this->tokens[$i]['conditions'] = $conditions; + + if (isset($this->tokens[$i]['scope_condition']) === true) { + // Check to see if this token opened the scope. + if ($this->tokens[$i]['scope_opener'] === $i) { + $stackPtr = $this->tokens[$i]['scope_condition']; + if (PHP_CODESNIFFER_VERBOSITY > 1) { + $type = $this->tokens[$stackPtr]['type']; + echo str_repeat("\t", ($level + 1)); + echo "=> Found scope opener for $stackPtr:$type".PHP_EOL; + } + + $stackPtr = $this->tokens[$i]['scope_condition']; + + // If we find a scope opener that has a shared closer, + // then we need to go back over the condition map that we + // just created and fix ourselves as we just added some + // conditions where there was none. This happens for T_CASE + // statements that are using the same break statement. + if ($lastOpener !== null && $this->tokens[$lastOpener]['scope_closer'] === $this->tokens[$i]['scope_closer']) { + // This opener shares its closer with the previous opener, + // but we still need to check if the two openers share their + // closer with each other directly (like CASE and DEFAULT) + // or if they are just sharing because one doesn't have a + // closer (like CASE with no BREAK using a SWITCHes closer). + $thisType = $this->tokens[$this->tokens[$i]['scope_condition']]['code']; + $opener = $this->tokens[$lastOpener]['scope_condition']; + + $isShared = isset($this->scopeOpeners[$thisType]['with'][$this->tokens[$opener]['code']]); + + reset($this->scopeOpeners[$thisType]['end']); + reset($this->scopeOpeners[$this->tokens[$opener]['code']]['end']); + $sameEnd = (current($this->scopeOpeners[$thisType]['end']) === current($this->scopeOpeners[$this->tokens[$opener]['code']]['end'])); + + if ($isShared === true && $sameEnd === true) { + $badToken = $opener; + if (PHP_CODESNIFFER_VERBOSITY > 1) { + $type = $this->tokens[$badToken]['type']; + echo str_repeat("\t", ($level + 1)); + echo "* shared closer, cleaning up $badToken:$type *".PHP_EOL; + } + + for ($x = $this->tokens[$i]['scope_condition']; $x <= $i; $x++) { + $oldConditions = $this->tokens[$x]['conditions']; + $oldLevel = $this->tokens[$x]['level']; + $this->tokens[$x]['level']--; + unset($this->tokens[$x]['conditions'][$badToken]); + if (PHP_CODESNIFFER_VERBOSITY > 1) { + $type = $this->tokens[$x]['type']; + $oldConds = ''; + foreach ($oldConditions as $condition) { + $oldConds .= Util\Tokens::tokenName($condition).','; + } + + $oldConds = rtrim($oldConds, ','); + + $newConds = ''; + foreach ($this->tokens[$x]['conditions'] as $condition) { + $newConds .= Util\Tokens::tokenName($condition).','; + } + + $newConds = rtrim($newConds, ','); + + $newLevel = $this->tokens[$x]['level']; + echo str_repeat("\t", ($level + 1)); + echo "* cleaned $x:$type *".PHP_EOL; + echo str_repeat("\t", ($level + 2)); + echo "=> level changed from $oldLevel to $newLevel".PHP_EOL; + echo str_repeat("\t", ($level + 2)); + echo "=> conditions changed from $oldConds to $newConds".PHP_EOL; + }//end if + }//end for + + unset($conditions[$badToken]); + if (PHP_CODESNIFFER_VERBOSITY > 1) { + $type = $this->tokens[$badToken]['type']; + echo str_repeat("\t", ($level + 1)); + echo "* token $badToken:$type removed from conditions array *".PHP_EOL; + } + + unset($openers[$lastOpener]); + + $level--; + if (PHP_CODESNIFFER_VERBOSITY > 1) { + echo str_repeat("\t", ($level + 2)); + echo '* level decreased *'.PHP_EOL; + } + }//end if + }//end if + + $level++; + if (PHP_CODESNIFFER_VERBOSITY > 1) { + echo str_repeat("\t", ($level + 1)); + echo '* level increased *'.PHP_EOL; + } + + $conditions[$stackPtr] = $this->tokens[$stackPtr]['code']; + if (PHP_CODESNIFFER_VERBOSITY > 1) { + $type = $this->tokens[$stackPtr]['type']; + echo str_repeat("\t", ($level + 1)); + echo "* token $stackPtr:$type added to conditions array *".PHP_EOL; + } + + $lastOpener = $this->tokens[$i]['scope_opener']; + if ($lastOpener !== null) { + $openers[$lastOpener] = $lastOpener; + } + } else if ($lastOpener !== null && $this->tokens[$lastOpener]['scope_closer'] === $i) { + foreach (array_reverse($openers) as $opener) { + if ($this->tokens[$opener]['scope_closer'] === $i) { + $oldOpener = array_pop($openers); + if (empty($openers) === false) { + $lastOpener = array_pop($openers); + $openers[$lastOpener] = $lastOpener; + } else { + $lastOpener = null; + } + + if (PHP_CODESNIFFER_VERBOSITY > 1) { + $type = $this->tokens[$oldOpener]['type']; + echo str_repeat("\t", ($level + 1)); + echo "=> Found scope closer for $oldOpener:$type".PHP_EOL; + } + + $oldCondition = array_pop($conditions); + if (PHP_CODESNIFFER_VERBOSITY > 1) { + echo str_repeat("\t", ($level + 1)); + echo '* token '.Util\Tokens::tokenName($oldCondition).' removed from conditions array *'.PHP_EOL; + } + + // Make sure this closer actually belongs to us. + // Either the condition also has to think this is the + // closer, or it has to allow sharing with us. + $condition = $this->tokens[$this->tokens[$i]['scope_condition']]['code']; + if ($condition !== $oldCondition) { + if (isset($this->scopeOpeners[$oldCondition]['with'][$condition]) === false) { + $badToken = $this->tokens[$oldOpener]['scope_condition']; + + if (PHP_CODESNIFFER_VERBOSITY > 1) { + $type = Util\Tokens::tokenName($oldCondition); + echo str_repeat("\t", ($level + 1)); + echo "* scope closer was bad, cleaning up $badToken:$type *".PHP_EOL; + } + + for ($x = ($oldOpener + 1); $x <= $i; $x++) { + $oldConditions = $this->tokens[$x]['conditions']; + $oldLevel = $this->tokens[$x]['level']; + $this->tokens[$x]['level']--; + unset($this->tokens[$x]['conditions'][$badToken]); + if (PHP_CODESNIFFER_VERBOSITY > 1) { + $type = $this->tokens[$x]['type']; + $oldConds = ''; + foreach ($oldConditions as $condition) { + $oldConds .= Util\Tokens::tokenName($condition).','; + } + + $oldConds = rtrim($oldConds, ','); + + $newConds = ''; + foreach ($this->tokens[$x]['conditions'] as $condition) { + $newConds .= Util\Tokens::tokenName($condition).','; + } + + $newConds = rtrim($newConds, ','); + + $newLevel = $this->tokens[$x]['level']; + echo str_repeat("\t", ($level + 1)); + echo "* cleaned $x:$type *".PHP_EOL; + echo str_repeat("\t", ($level + 2)); + echo "=> level changed from $oldLevel to $newLevel".PHP_EOL; + echo str_repeat("\t", ($level + 2)); + echo "=> conditions changed from $oldConds to $newConds".PHP_EOL; + }//end if + }//end for + }//end if + }//end if + + $level--; + if (PHP_CODESNIFFER_VERBOSITY > 1) { + echo str_repeat("\t", ($level + 2)); + echo '* level decreased *'.PHP_EOL; + } + + $this->tokens[$i]['level'] = $level; + $this->tokens[$i]['conditions'] = $conditions; + }//end if + }//end foreach + }//end if + }//end if + }//end for + + if (PHP_CODESNIFFER_VERBOSITY > 1) { + echo "\t*** END LEVEL MAP ***".PHP_EOL; + } + + }//end createLevelMap() + + +}//end class diff --git a/vendor/squizlabs/php_codesniffer/src/Util/Cache.php b/vendor/squizlabs/php_codesniffer/src/Util/Cache.php new file mode 100644 index 00000000..68abef59 --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Util/Cache.php @@ -0,0 +1,351 @@ + + * @copyright 2006-2015 Squiz Pty Ltd (ABN 77 084 670 600) + * @license https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence + */ + +namespace PHP_CodeSniffer\Util; + +use PHP_CodeSniffer\Autoload; +use PHP_CodeSniffer\Config; +use PHP_CodeSniffer\Ruleset; + +class Cache +{ + + /** + * The filesystem location of the cache file. + * + * @var void + */ + private static $path = ''; + + /** + * The cached data. + * + * @var array + */ + private static $cache = []; + + + /** + * Loads existing cache data for the run, if any. + * + * @param \PHP_CodeSniffer\Ruleset $ruleset The ruleset used for the run. + * @param \PHP_CodeSniffer\Config $config The config data for the run. + * + * @return void + */ + public static function load(Ruleset $ruleset, Config $config) + { + // Look at every loaded sniff class so far and use their file contents + // to generate a hash for the code used during the run. + // At this point, the loaded class list contains the core PHPCS code + // and all sniffs that have been loaded as part of the run. + if (PHP_CODESNIFFER_VERBOSITY > 1) { + echo PHP_EOL."\tGenerating loaded file list for code hash".PHP_EOL; + } + + $codeHashFiles = []; + + $classes = array_keys(Autoload::getLoadedClasses()); + sort($classes); + + $installDir = dirname(__DIR__); + $installDirLen = strlen($installDir); + $standardDir = $installDir.DIRECTORY_SEPARATOR.'Standards'; + $standardDirLen = strlen($standardDir); + foreach ($classes as $file) { + if (substr($file, 0, $standardDirLen) !== $standardDir) { + if (substr($file, 0, $installDirLen) === $installDir) { + // We are only interested in sniffs here. + continue; + } + + if (PHP_CODESNIFFER_VERBOSITY > 1) { + echo "\t\t=> external file: $file".PHP_EOL; + } + } else if (PHP_CODESNIFFER_VERBOSITY > 1) { + echo "\t\t=> internal sniff: $file".PHP_EOL; + } + + $codeHashFiles[] = $file; + } + + // Add the content of the used rulesets to the hash so that sniff setting + // changes in the ruleset invalidate the cache. + $rulesets = $ruleset->paths; + sort($rulesets); + foreach ($rulesets as $file) { + if (substr($file, 0, $standardDirLen) !== $standardDir) { + if (PHP_CODESNIFFER_VERBOSITY > 1) { + echo "\t\t=> external ruleset: $file".PHP_EOL; + } + } else if (PHP_CODESNIFFER_VERBOSITY > 1) { + echo "\t\t=> internal ruleset: $file".PHP_EOL; + } + + $codeHashFiles[] = $file; + } + + // Go through the core PHPCS code and add those files to the file + // hash. This ensures that core PHPCS changes will also invalidate the cache. + // Note that we ignore sniffs here, and any files that don't affect + // the outcome of the run. + $di = new \RecursiveDirectoryIterator( + $installDir, + (\FilesystemIterator::KEY_AS_PATHNAME | \FilesystemIterator::CURRENT_AS_FILEINFO | \FilesystemIterator::SKIP_DOTS) + ); + $filter = new \RecursiveCallbackFilterIterator( + $di, + function ($file, $key, $iterator) { + // Skip non-php files. + $filename = $file->getFilename(); + if ($file->isFile() === true && substr($filename, -4) !== '.php') { + return false; + } + + $filePath = Common::realpath($key); + if ($filePath === false) { + return false; + } + + if ($iterator->hasChildren() === true + && ($filename === 'Standards' + || $filename === 'Exceptions' + || $filename === 'Reports' + || $filename === 'Generators') + ) { + return false; + } + + return true; + } + ); + + $iterator = new \RecursiveIteratorIterator($filter); + foreach ($iterator as $file) { + if (PHP_CODESNIFFER_VERBOSITY > 1) { + echo "\t\t=> core file: $file".PHP_EOL; + } + + $codeHashFiles[] = $file->getPathname(); + } + + $codeHash = ''; + sort($codeHashFiles); + foreach ($codeHashFiles as $file) { + $codeHash .= md5_file($file); + } + + $codeHash = md5($codeHash); + + // Along with the code hash, use various settings that can affect + // the results of a run to create a new hash. This hash will be used + // in the cache file name. + $rulesetHash = md5(var_export($ruleset->ignorePatterns, true).var_export($ruleset->includePatterns, true)); + $phpExtensionsHash = md5(var_export(get_loaded_extensions(), true)); + $configData = [ + 'phpVersion' => PHP_VERSION_ID, + 'phpExtensions' => $phpExtensionsHash, + 'tabWidth' => $config->tabWidth, + 'encoding' => $config->encoding, + 'recordErrors' => $config->recordErrors, + 'annotations' => $config->annotations, + 'configData' => Config::getAllConfigData(), + 'codeHash' => $codeHash, + 'rulesetHash' => $rulesetHash, + ]; + + $configString = var_export($configData, true); + $cacheHash = substr(sha1($configString), 0, 12); + + if (PHP_CODESNIFFER_VERBOSITY > 1) { + echo "\tGenerating cache key data".PHP_EOL; + foreach ($configData as $key => $value) { + if (is_array($value) === true) { + echo "\t\t=> $key:".PHP_EOL; + foreach ($value as $subKey => $subValue) { + echo "\t\t\t=> $subKey: $subValue".PHP_EOL; + } + + continue; + } + + if ($value === true || $value === false) { + $value = (int) $value; + } + + echo "\t\t=> $key: $value".PHP_EOL; + } + + echo "\t\t=> cacheHash: $cacheHash".PHP_EOL; + }//end if + + if ($config->cacheFile !== null) { + $cacheFile = $config->cacheFile; + } else { + // Determine the common paths for all files being checked. + // We can use this to locate an existing cache file, or to + // determine where to create a new one. + if (PHP_CODESNIFFER_VERBOSITY > 1) { + echo "\tChecking possible cache file paths".PHP_EOL; + } + + $paths = []; + foreach ($config->files as $file) { + $file = Common::realpath($file); + while ($file !== DIRECTORY_SEPARATOR) { + if (isset($paths[$file]) === false) { + $paths[$file] = 1; + } else { + $paths[$file]++; + } + + $lastFile = $file; + $file = dirname($file); + if ($file === $lastFile) { + // Just in case something went wrong, + // we don't want to end up in an infinite loop. + break; + } + } + } + + ksort($paths); + $paths = array_reverse($paths); + + $numFiles = count($config->files); + + $cacheFile = null; + $cacheDir = getenv('XDG_CACHE_HOME'); + if ($cacheDir === false || is_dir($cacheDir) === false) { + $cacheDir = sys_get_temp_dir(); + } + + foreach ($paths as $file => $count) { + if ($count !== $numFiles) { + unset($paths[$file]); + continue; + } + + $fileHash = substr(sha1($file), 0, 12); + $testFile = $cacheDir.DIRECTORY_SEPARATOR."phpcs.$fileHash.$cacheHash.cache"; + if ($cacheFile === null) { + // This will be our default location if we can't find + // an existing file. + $cacheFile = $testFile; + } + + if (PHP_CODESNIFFER_VERBOSITY > 1) { + echo "\t\t=> $testFile".PHP_EOL; + echo "\t\t\t * based on shared location: $file *".PHP_EOL; + } + + if (file_exists($testFile) === true) { + $cacheFile = $testFile; + break; + } + }//end foreach + + if ($cacheFile === null) { + // Unlikely, but just in case $paths is empty for some reason. + $cacheFile = $cacheDir.DIRECTORY_SEPARATOR."phpcs.$cacheHash.cache"; + } + }//end if + + self::$path = $cacheFile; + if (PHP_CODESNIFFER_VERBOSITY > 1) { + echo "\t=> Using cache file: ".self::$path.PHP_EOL; + } + + if (file_exists(self::$path) === true) { + self::$cache = json_decode(file_get_contents(self::$path), true); + + // Verify the contents of the cache file. + if (self::$cache['config'] !== $configData) { + self::$cache = []; + if (PHP_CODESNIFFER_VERBOSITY > 1) { + echo "\t* cache was invalid and has been cleared *".PHP_EOL; + } + } + } else if (PHP_CODESNIFFER_VERBOSITY > 1) { + echo "\t* cache file does not exist *".PHP_EOL; + } + + self::$cache['config'] = $configData; + + }//end load() + + + /** + * Saves the current cache to the filesystem. + * + * @return void + */ + public static function save() + { + file_put_contents(self::$path, json_encode(self::$cache)); + + }//end save() + + + /** + * Retrieves a single entry from the cache. + * + * @param string $key The key of the data to get. If NULL, + * everything in the cache is returned. + * + * @return mixed + */ + public static function get($key=null) + { + if ($key === null) { + return self::$cache; + } + + if (isset(self::$cache[$key]) === true) { + return self::$cache[$key]; + } + + return false; + + }//end get() + + + /** + * Retrieves a single entry from the cache. + * + * @param string $key The key of the data to set. If NULL, + * sets the entire cache. + * @param mixed $value The value to set. + * + * @return void + */ + public static function set($key, $value) + { + if ($key === null) { + self::$cache = $value; + } else { + self::$cache[$key] = $value; + } + + }//end set() + + + /** + * Retrieves the number of cache entries. + * + * @return int + */ + public static function getSize() + { + return (count(self::$cache) - 1); + + }//end getSize() + + +}//end class diff --git a/vendor/squizlabs/php_codesniffer/src/Util/Common.php b/vendor/squizlabs/php_codesniffer/src/Util/Common.php new file mode 100644 index 00000000..204f44de --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Util/Common.php @@ -0,0 +1,570 @@ + + * @copyright 2006-2015 Squiz Pty Ltd (ABN 77 084 670 600) + * @license https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence + */ + +namespace PHP_CodeSniffer\Util; + +class Common +{ + + /** + * An array of variable types for param/var we will check. + * + * @var string[] + */ + public static $allowedTypes = [ + 'array', + 'boolean', + 'float', + 'integer', + 'mixed', + 'object', + 'string', + 'resource', + 'callable', + ]; + + + /** + * Return TRUE if the path is a PHAR file. + * + * @param string $path The path to use. + * + * @return mixed + */ + public static function isPharFile($path) + { + if (strpos($path, 'phar://') === 0) { + return true; + } + + return false; + + }//end isPharFile() + + + /** + * Checks if a file is readable. + * + * Addresses PHP bug related to reading files from network drives on Windows. + * e.g. when using WSL2. + * + * @param string $path The path to the file. + * + * @return boolean + */ + public static function isReadable($path) + { + if (@is_readable($path) === true) { + return true; + } + + if (@file_exists($path) === true && @is_file($path) === true) { + $f = @fopen($path, 'rb'); + if (fclose($f) === true) { + return true; + } + } + + return false; + + }//end isReadable() + + + /** + * CodeSniffer alternative for realpath. + * + * Allows for PHAR support. + * + * @param string $path The path to use. + * + * @return mixed + */ + public static function realpath($path) + { + // Support the path replacement of ~ with the user's home directory. + if (substr($path, 0, 2) === '~/') { + $homeDir = getenv('HOME'); + if ($homeDir !== false) { + $path = $homeDir.substr($path, 1); + } + } + + // Check for process substitution. + if (strpos($path, '/dev/fd') === 0) { + return str_replace('/dev/fd', 'php://fd', $path); + } + + // No extra work needed if this is not a phar file. + if (self::isPharFile($path) === false) { + return realpath($path); + } + + // Before trying to break down the file path, + // check if it exists first because it will mostly not + // change after running the below code. + if (file_exists($path) === true) { + return $path; + } + + $phar = \Phar::running(false); + $extra = str_replace('phar://'.$phar, '', $path); + $path = realpath($phar); + if ($path === false) { + return false; + } + + $path = 'phar://'.$path.$extra; + if (file_exists($path) === true) { + return $path; + } + + return false; + + }//end realpath() + + + /** + * Removes a base path from the front of a file path. + * + * @param string $path The path of the file. + * @param string $basepath The base path to remove. This should not end + * with a directory separator. + * + * @return string + */ + public static function stripBasepath($path, $basepath) + { + if (empty($basepath) === true) { + return $path; + } + + $basepathLen = strlen($basepath); + if (substr($path, 0, $basepathLen) === $basepath) { + $path = substr($path, $basepathLen); + } + + $path = ltrim($path, DIRECTORY_SEPARATOR); + if ($path === '') { + $path = '.'; + } + + return $path; + + }//end stripBasepath() + + + /** + * Detects the EOL character being used in a string. + * + * @param string $contents The contents to check. + * + * @return string + */ + public static function detectLineEndings($contents) + { + if (preg_match("/\r\n?|\n/", $contents, $matches) !== 1) { + // Assume there are no newlines. + $eolChar = "\n"; + } else { + $eolChar = $matches[0]; + } + + return $eolChar; + + }//end detectLineEndings() + + + /** + * Check if STDIN is a TTY. + * + * @return boolean + */ + public static function isStdinATTY() + { + // The check is slow (especially calling `tty`) so we static + // cache the result. + static $isTTY = null; + + if ($isTTY !== null) { + return $isTTY; + } + + if (defined('STDIN') === false) { + return false; + } + + // If PHP has the POSIX extensions we will use them. + if (function_exists('posix_isatty') === true) { + $isTTY = (posix_isatty(STDIN) === true); + return $isTTY; + } + + // Next try is detecting whether we have `tty` installed and use that. + if (defined('PHP_WINDOWS_VERSION_PLATFORM') === true) { + $devnull = 'NUL'; + $which = 'where'; + } else { + $devnull = '/dev/null'; + $which = 'which'; + } + + $tty = trim(shell_exec("$which tty 2> $devnull")); + if (empty($tty) === false) { + exec("tty -s 2> $devnull", $output, $returnValue); + $isTTY = ($returnValue === 0); + return $isTTY; + } + + // Finally we will use fstat. The solution borrowed from + // https://stackoverflow.com/questions/11327367/detect-if-a-php-script-is-being-run-interactively-or-not + // This doesn't work on Mingw/Cygwin/... using Mintty but they + // have `tty` installed. + $type = [ + 'S_IFMT' => 0170000, + 'S_IFIFO' => 0010000, + ]; + + $stat = fstat(STDIN); + $mode = ($stat['mode'] & $type['S_IFMT']); + $isTTY = ($mode !== $type['S_IFIFO']); + + return $isTTY; + + }//end isStdinATTY() + + + /** + * Escape a path to a system command. + * + * @param string $cmd The path to the system command. + * + * @return string + */ + public static function escapeshellcmd($cmd) + { + $cmd = escapeshellcmd($cmd); + + if (strtoupper(substr(PHP_OS, 0, 3)) === 'WIN') { + // Spaces are not escaped by escapeshellcmd on Windows, but need to be + // for the command to be able to execute. + $cmd = preg_replace('`(? 0) { + return false; + } + + if ($strict === true) { + // Check that there are not two capital letters next to each other. + $length = strlen($string); + $lastCharWasCaps = $classFormat; + + for ($i = 1; $i < $length; $i++) { + $ascii = ord($string[$i]); + if ($ascii >= 48 && $ascii <= 57) { + // The character is a number, so it cant be a capital. + $isCaps = false; + } else { + if (strtoupper($string[$i]) === $string[$i]) { + $isCaps = true; + } else { + $isCaps = false; + } + } + + if ($isCaps === true && $lastCharWasCaps === true) { + return false; + } + + $lastCharWasCaps = $isCaps; + } + }//end if + + return true; + + }//end isCamelCaps() + + + /** + * Returns true if the specified string is in the underscore caps format. + * + * @param string $string The string to verify. + * + * @return boolean + */ + public static function isUnderscoreName($string) + { + // If there are space in the name, it can't be valid. + if (strpos($string, ' ') !== false) { + return false; + } + + $validName = true; + $nameBits = explode('_', $string); + + if (preg_match('|^[A-Z]|', $string) === 0) { + // Name does not begin with a capital letter. + $validName = false; + } else { + foreach ($nameBits as $bit) { + if ($bit === '') { + continue; + } + + if ($bit[0] !== strtoupper($bit[0])) { + $validName = false; + break; + } + } + } + + return $validName; + + }//end isUnderscoreName() + + + /** + * Returns a valid variable type for param/var tags. + * + * If type is not one of the standard types, it must be a custom type. + * Returns the correct type name suggestion if type name is invalid. + * + * @param string $varType The variable type to process. + * + * @return string + */ + public static function suggestType($varType) + { + if ($varType === '') { + return ''; + } + + if (in_array($varType, self::$allowedTypes, true) === true) { + return $varType; + } else { + $lowerVarType = strtolower($varType); + switch ($lowerVarType) { + case 'bool': + case 'boolean': + return 'boolean'; + case 'double': + case 'real': + case 'float': + return 'float'; + case 'int': + case 'integer': + return 'integer'; + case 'array()': + case 'array': + return 'array'; + }//end switch + + if (strpos($lowerVarType, 'array(') !== false) { + // Valid array declaration: + // array, array(type), array(type1 => type2). + $matches = []; + $pattern = '/^array\(\s*([^\s^=^>]*)(\s*=>\s*(.*))?\s*\)/i'; + if (preg_match($pattern, $varType, $matches) !== 0) { + $type1 = ''; + if (isset($matches[1]) === true) { + $type1 = $matches[1]; + } + + $type2 = ''; + if (isset($matches[3]) === true) { + $type2 = $matches[3]; + } + + $type1 = self::suggestType($type1); + $type2 = self::suggestType($type2); + if ($type2 !== '') { + $type2 = ' => '.$type2; + } + + return "array($type1$type2)"; + } else { + return 'array'; + }//end if + } else if (in_array($lowerVarType, self::$allowedTypes, true) === true) { + // A valid type, but not lower cased. + return $lowerVarType; + } else { + // Must be a custom type name. + return $varType; + }//end if + }//end if + + }//end suggestType() + + + /** + * Given a sniff class name, returns the code for the sniff. + * + * @param string $sniffClass The fully qualified sniff class name. + * + * @return string + */ + public static function getSniffCode($sniffClass) + { + $parts = explode('\\', $sniffClass); + $sniff = array_pop($parts); + + if (substr($sniff, -5) === 'Sniff') { + // Sniff class name. + $sniff = substr($sniff, 0, -5); + } else { + // Unit test class name. + $sniff = substr($sniff, 0, -8); + } + + $category = array_pop($parts); + $sniffDir = array_pop($parts); + $standard = array_pop($parts); + $code = $standard.'.'.$category.'.'.$sniff; + return $code; + + }//end getSniffCode() + + + /** + * Removes project-specific information from a sniff class name. + * + * @param string $sniffClass The fully qualified sniff class name. + * + * @return string + */ + public static function cleanSniffClass($sniffClass) + { + $newName = strtolower($sniffClass); + + $sniffPos = strrpos($newName, '\sniffs\\'); + if ($sniffPos === false) { + // Nothing we can do as it isn't in a known format. + return $newName; + } + + $end = (strlen($newName) - $sniffPos + 1); + $start = strrpos($newName, '\\', ($end * -1)); + + if ($start === false) { + // Nothing needs to be cleaned. + return $newName; + } + + $newName = substr($newName, ($start + 1)); + return $newName; + + }//end cleanSniffClass() + + +}//end class diff --git a/vendor/squizlabs/php_codesniffer/src/Util/Standards.php b/vendor/squizlabs/php_codesniffer/src/Util/Standards.php new file mode 100644 index 00000000..50f58f02 --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Util/Standards.php @@ -0,0 +1,334 @@ + + * @copyright 2006-2015 Squiz Pty Ltd (ABN 77 084 670 600) + * @license https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence + */ + +namespace PHP_CodeSniffer\Util; + +use PHP_CodeSniffer\Config; + +class Standards +{ + + + /** + * Get a list of paths where standards are installed. + * + * Unresolvable relative paths will be excluded from the results. + * + * @return array + */ + public static function getInstalledStandardPaths() + { + $ds = DIRECTORY_SEPARATOR; + + $installedPaths = [dirname(dirname(__DIR__)).$ds.'src'.$ds.'Standards']; + $configPaths = Config::getConfigData('installed_paths'); + if ($configPaths !== null) { + $installedPaths = array_merge($installedPaths, explode(',', $configPaths)); + } + + $resolvedInstalledPaths = []; + foreach ($installedPaths as $installedPath) { + if (substr($installedPath, 0, 1) === '.') { + $installedPath = Common::realPath(__DIR__.$ds.'..'.$ds.'..'.$ds.$installedPath); + if ($installedPath === false) { + continue; + } + } + + $resolvedInstalledPaths[] = $installedPath; + } + + return $resolvedInstalledPaths; + + }//end getInstalledStandardPaths() + + + /** + * Get the details of all coding standards installed. + * + * Coding standards are directories located in the + * CodeSniffer/Standards directory. Valid coding standards + * include a Sniffs subdirectory. + * + * The details returned for each standard are: + * - path: the path to the coding standard's main directory + * - name: the name of the coding standard, as sourced from the ruleset.xml file + * - namespace: the namespace used by the coding standard, as sourced from the ruleset.xml file + * + * If you only need the paths to the installed standards, + * use getInstalledStandardPaths() instead as it performs less work to + * retrieve coding standard names. + * + * @param boolean $includeGeneric If true, the special "Generic" + * coding standard will be included + * if installed. + * @param string $standardsDir A specific directory to look for standards + * in. If not specified, PHP_CodeSniffer will + * look in its default locations. + * + * @return array + * @see getInstalledStandardPaths() + */ + public static function getInstalledStandardDetails( + $includeGeneric=false, + $standardsDir='' + ) { + $rulesets = []; + + if ($standardsDir === '') { + $installedPaths = self::getInstalledStandardPaths(); + } else { + $installedPaths = [$standardsDir]; + } + + foreach ($installedPaths as $standardsDir) { + // Check if the installed dir is actually a standard itself. + $csFile = $standardsDir.'/ruleset.xml'; + if (is_file($csFile) === true) { + $rulesets[] = $csFile; + continue; + } + + if (is_dir($standardsDir) === false) { + continue; + } + + $di = new \DirectoryIterator($standardsDir); + foreach ($di as $file) { + if ($file->isDir() === true && $file->isDot() === false) { + $filename = $file->getFilename(); + + // Ignore the special "Generic" standard. + if ($includeGeneric === false && $filename === 'Generic') { + continue; + } + + // Valid coding standard dirs include a ruleset. + $csFile = $file->getPathname().'/ruleset.xml'; + if (is_file($csFile) === true) { + $rulesets[] = $csFile; + } + } + } + }//end foreach + + $installedStandards = []; + + foreach ($rulesets as $rulesetPath) { + $ruleset = @simplexml_load_string(file_get_contents($rulesetPath)); + if ($ruleset === false) { + continue; + } + + $standardName = (string) $ruleset['name']; + $dirname = basename(dirname($rulesetPath)); + + if (isset($ruleset['namespace']) === true) { + $namespace = (string) $ruleset['namespace']; + } else { + $namespace = $dirname; + } + + $installedStandards[$dirname] = [ + 'path' => dirname($rulesetPath), + 'name' => $standardName, + 'namespace' => $namespace, + ]; + }//end foreach + + return $installedStandards; + + }//end getInstalledStandardDetails() + + + /** + * Get a list of all coding standards installed. + * + * Coding standards are directories located in the + * CodeSniffer/Standards directory. Valid coding standards + * include a Sniffs subdirectory. + * + * @param boolean $includeGeneric If true, the special "Generic" + * coding standard will be included + * if installed. + * @param string $standardsDir A specific directory to look for standards + * in. If not specified, PHP_CodeSniffer will + * look in its default locations. + * + * @return array + * @see isInstalledStandard() + */ + public static function getInstalledStandards( + $includeGeneric=false, + $standardsDir='' + ) { + $installedStandards = []; + + if ($standardsDir === '') { + $installedPaths = self::getInstalledStandardPaths(); + } else { + $installedPaths = [$standardsDir]; + } + + foreach ($installedPaths as $standardsDir) { + // Check if the installed dir is actually a standard itself. + $csFile = $standardsDir.'/ruleset.xml'; + if (is_file($csFile) === true) { + $installedStandards[] = basename($standardsDir); + continue; + } + + if (is_dir($standardsDir) === false) { + // Doesn't exist. + continue; + } + + $di = new \DirectoryIterator($standardsDir); + foreach ($di as $file) { + if ($file->isDir() === true && $file->isDot() === false) { + $filename = $file->getFilename(); + + // Ignore the special "Generic" standard. + if ($includeGeneric === false && $filename === 'Generic') { + continue; + } + + // Valid coding standard dirs include a ruleset. + $csFile = $file->getPathname().'/ruleset.xml'; + if (is_file($csFile) === true) { + $installedStandards[] = $filename; + } + } + } + }//end foreach + + return $installedStandards; + + }//end getInstalledStandards() + + + /** + * Determine if a standard is installed. + * + * Coding standards are directories located in the + * CodeSniffer/Standards directory. Valid coding standards + * include a ruleset.xml file. + * + * @param string $standard The name of the coding standard. + * + * @return boolean + * @see getInstalledStandards() + */ + public static function isInstalledStandard($standard) + { + $path = self::getInstalledStandardPath($standard); + if ($path !== null && strpos($path, 'ruleset.xml') !== false) { + return true; + } else { + // This could be a custom standard, installed outside our + // standards directory. + $standard = Common::realPath($standard); + if ($standard === false) { + return false; + } + + // Might be an actual ruleset file itUtil. + // If it has an XML extension, let's at least try it. + if (is_file($standard) === true + && (substr(strtolower($standard), -4) === '.xml' + || substr(strtolower($standard), -9) === '.xml.dist') + ) { + return true; + } + + // If it is a directory with a ruleset.xml file in it, + // it is a standard. + $ruleset = rtrim($standard, ' /\\').DIRECTORY_SEPARATOR.'ruleset.xml'; + if (is_file($ruleset) === true) { + return true; + } + }//end if + + return false; + + }//end isInstalledStandard() + + + /** + * Return the path of an installed coding standard. + * + * Coding standards are directories located in the + * CodeSniffer/Standards directory. Valid coding standards + * include a ruleset.xml file. + * + * @param string $standard The name of the coding standard. + * + * @return string|null + */ + public static function getInstalledStandardPath($standard) + { + if (strpos($standard, '.') !== false) { + return null; + } + + $installedPaths = self::getInstalledStandardPaths(); + foreach ($installedPaths as $installedPath) { + $standardPath = $installedPath.DIRECTORY_SEPARATOR.$standard; + if (file_exists($standardPath) === false) { + if (basename($installedPath) !== $standard) { + continue; + } + + $standardPath = $installedPath; + } + + $path = Common::realpath($standardPath.DIRECTORY_SEPARATOR.'ruleset.xml'); + + if ($path !== false && is_file($path) === true) { + return $path; + } else if (Common::isPharFile($standardPath) === true) { + $path = Common::realpath($standardPath); + if ($path !== false) { + return $path; + } + } + }//end foreach + + return null; + + }//end getInstalledStandardPath() + + + /** + * Prints out a list of installed coding standards. + * + * @return void + */ + public static function printInstalledStandards() + { + $installedStandards = self::getInstalledStandards(); + $numStandards = count($installedStandards); + + if ($numStandards === 0) { + echo 'No coding standards are installed.'.PHP_EOL; + } else { + $lastStandard = array_pop($installedStandards); + if ($numStandards === 1) { + echo "The only coding standard installed is $lastStandard".PHP_EOL; + } else { + $standardList = implode(', ', $installedStandards); + $standardList .= ' and '.$lastStandard; + echo 'The installed coding standards are '.$standardList.PHP_EOL; + } + } + + }//end printInstalledStandards() + + +}//end class diff --git a/vendor/squizlabs/php_codesniffer/src/Util/Timing.php b/vendor/squizlabs/php_codesniffer/src/Util/Timing.php new file mode 100644 index 00000000..95ee8521 --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Util/Timing.php @@ -0,0 +1,86 @@ + + * @copyright 2006-2015 Squiz Pty Ltd (ABN 77 084 670 600) + * @license https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence + */ + +namespace PHP_CodeSniffer\Util; + +class Timing +{ + + /** + * The start time of the run. + * + * @var float + */ + private static $startTime; + + /** + * Used to make sure we only print the run time once per run. + * + * @var boolean + */ + private static $printed = false; + + + /** + * Start recording time for the run. + * + * @return void + */ + public static function startTiming() + { + + self::$startTime = microtime(true); + + }//end startTiming() + + + /** + * Print information about the run. + * + * @param boolean $force If TRUE, prints the output even if it has + * already been printed during the run. + * + * @return void + */ + public static function printRunTime($force=false) + { + if ($force === false && self::$printed === true) { + // A double call. + return; + } + + if (self::$startTime === null) { + // Timing was never started. + return; + } + + $time = ((microtime(true) - self::$startTime) * 1000); + + if ($time > 60000) { + $mins = floor($time / 60000); + $secs = round((fmod($time, 60000) / 1000), 2); + $time = $mins.' mins'; + if ($secs !== 0) { + $time .= ", $secs secs"; + } + } else if ($time > 1000) { + $time = round(($time / 1000), 2).' secs'; + } else { + $time = round($time).'ms'; + } + + $mem = round((memory_get_peak_usage(true) / (1024 * 1024)), 2).'MB'; + echo "Time: $time; Memory: $mem".PHP_EOL.PHP_EOL; + + self::$printed = true; + + }//end printRunTime() + + +}//end class diff --git a/vendor/squizlabs/php_codesniffer/src/Util/Tokens.php b/vendor/squizlabs/php_codesniffer/src/Util/Tokens.php new file mode 100644 index 00000000..f501c7f0 --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/src/Util/Tokens.php @@ -0,0 +1,716 @@ + + * @copyright 2006-2015 Squiz Pty Ltd (ABN 77 084 670 600) + * @license https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence + */ + +namespace PHP_CodeSniffer\Util; + +define('T_NONE', 'PHPCS_T_NONE'); +define('T_OPEN_CURLY_BRACKET', 'PHPCS_T_OPEN_CURLY_BRACKET'); +define('T_CLOSE_CURLY_BRACKET', 'PHPCS_T_CLOSE_CURLY_BRACKET'); +define('T_OPEN_SQUARE_BRACKET', 'PHPCS_T_OPEN_SQUARE_BRACKET'); +define('T_CLOSE_SQUARE_BRACKET', 'PHPCS_T_CLOSE_SQUARE_BRACKET'); +define('T_OPEN_PARENTHESIS', 'PHPCS_T_OPEN_PARENTHESIS'); +define('T_CLOSE_PARENTHESIS', 'PHPCS_T_CLOSE_PARENTHESIS'); +define('T_COLON', 'PHPCS_T_COLON'); +define('T_NULLABLE', 'PHPCS_T_NULLABLE'); +define('T_STRING_CONCAT', 'PHPCS_T_STRING_CONCAT'); +define('T_INLINE_THEN', 'PHPCS_T_INLINE_THEN'); +define('T_INLINE_ELSE', 'PHPCS_T_INLINE_ELSE'); +define('T_NULL', 'PHPCS_T_NULL'); +define('T_FALSE', 'PHPCS_T_FALSE'); +define('T_TRUE', 'PHPCS_T_TRUE'); +define('T_SEMICOLON', 'PHPCS_T_SEMICOLON'); +define('T_EQUAL', 'PHPCS_T_EQUAL'); +define('T_MULTIPLY', 'PHPCS_T_MULTIPLY'); +define('T_DIVIDE', 'PHPCS_T_DIVIDE'); +define('T_PLUS', 'PHPCS_T_PLUS'); +define('T_MINUS', 'PHPCS_T_MINUS'); +define('T_MODULUS', 'PHPCS_T_MODULUS'); +define('T_BITWISE_AND', 'PHPCS_T_BITWISE_AND'); +define('T_BITWISE_OR', 'PHPCS_T_BITWISE_OR'); +define('T_BITWISE_XOR', 'PHPCS_T_BITWISE_XOR'); +define('T_BITWISE_NOT', 'PHPCS_T_BITWISE_NOT'); +define('T_ARRAY_HINT', 'PHPCS_T_ARRAY_HINT'); +define('T_GREATER_THAN', 'PHPCS_T_GREATER_THAN'); +define('T_LESS_THAN', 'PHPCS_T_LESS_THAN'); +define('T_BOOLEAN_NOT', 'PHPCS_T_BOOLEAN_NOT'); +define('T_SELF', 'PHPCS_T_SELF'); +define('T_PARENT', 'PHPCS_T_PARENT'); +define('T_DOUBLE_QUOTED_STRING', 'PHPCS_T_DOUBLE_QUOTED_STRING'); +define('T_COMMA', 'PHPCS_T_COMMA'); +define('T_HEREDOC', 'PHPCS_T_HEREDOC'); +define('T_PROTOTYPE', 'PHPCS_T_PROTOTYPE'); +define('T_THIS', 'PHPCS_T_THIS'); +define('T_REGULAR_EXPRESSION', 'PHPCS_T_REGULAR_EXPRESSION'); +define('T_PROPERTY', 'PHPCS_T_PROPERTY'); +define('T_LABEL', 'PHPCS_T_LABEL'); +define('T_OBJECT', 'PHPCS_T_OBJECT'); +define('T_CLOSE_OBJECT', 'PHPCS_T_CLOSE_OBJECT'); +define('T_COLOUR', 'PHPCS_T_COLOUR'); +define('T_HASH', 'PHPCS_T_HASH'); +define('T_URL', 'PHPCS_T_URL'); +define('T_STYLE', 'PHPCS_T_STYLE'); +define('T_ASPERAND', 'PHPCS_T_ASPERAND'); +define('T_DOLLAR', 'PHPCS_T_DOLLAR'); +define('T_TYPEOF', 'PHPCS_T_TYPEOF'); +define('T_CLOSURE', 'PHPCS_T_CLOSURE'); +define('T_ANON_CLASS', 'PHPCS_T_ANON_CLASS'); +define('T_BACKTICK', 'PHPCS_T_BACKTICK'); +define('T_START_NOWDOC', 'PHPCS_T_START_NOWDOC'); +define('T_NOWDOC', 'PHPCS_T_NOWDOC'); +define('T_END_NOWDOC', 'PHPCS_T_END_NOWDOC'); +define('T_OPEN_SHORT_ARRAY', 'PHPCS_T_OPEN_SHORT_ARRAY'); +define('T_CLOSE_SHORT_ARRAY', 'PHPCS_T_CLOSE_SHORT_ARRAY'); +define('T_GOTO_LABEL', 'PHPCS_T_GOTO_LABEL'); +define('T_BINARY_CAST', 'PHPCS_T_BINARY_CAST'); +define('T_EMBEDDED_PHP', 'PHPCS_T_EMBEDDED_PHP'); +define('T_RETURN_TYPE', 'PHPCS_T_RETURN_TYPE'); +define('T_OPEN_USE_GROUP', 'PHPCS_T_OPEN_USE_GROUP'); +define('T_CLOSE_USE_GROUP', 'PHPCS_T_CLOSE_USE_GROUP'); +define('T_ZSR', 'PHPCS_T_ZSR'); +define('T_ZSR_EQUAL', 'PHPCS_T_ZSR_EQUAL'); +define('T_FN_ARROW', 'PHPCS_T_FN_ARROW'); +define('T_TYPE_UNION', 'PHPCS_T_TYPE_UNION'); +define('T_PARAM_NAME', 'PHPCS_T_PARAM_NAME'); +define('T_MATCH_ARROW', 'PHPCS_T_MATCH_ARROW'); +define('T_MATCH_DEFAULT', 'PHPCS_T_MATCH_DEFAULT'); +define('T_ATTRIBUTE_END', 'PHPCS_T_ATTRIBUTE_END'); + +// Some PHP 5.5 tokens, replicated for lower versions. +if (defined('T_FINALLY') === false) { + define('T_FINALLY', 'PHPCS_T_FINALLY'); +} + +if (defined('T_YIELD') === false) { + define('T_YIELD', 'PHPCS_T_YIELD'); +} + +// Some PHP 5.6 tokens, replicated for lower versions. +if (defined('T_ELLIPSIS') === false) { + define('T_ELLIPSIS', 'PHPCS_T_ELLIPSIS'); +} + +if (defined('T_POW') === false) { + define('T_POW', 'PHPCS_T_POW'); +} + +if (defined('T_POW_EQUAL') === false) { + define('T_POW_EQUAL', 'PHPCS_T_POW_EQUAL'); +} + +// Some PHP 7 tokens, replicated for lower versions. +if (defined('T_SPACESHIP') === false) { + define('T_SPACESHIP', 'PHPCS_T_SPACESHIP'); +} + +if (defined('T_COALESCE') === false) { + define('T_COALESCE', 'PHPCS_T_COALESCE'); +} + +if (defined('T_COALESCE_EQUAL') === false) { + define('T_COALESCE_EQUAL', 'PHPCS_T_COALESCE_EQUAL'); +} + +if (defined('T_YIELD_FROM') === false) { + define('T_YIELD_FROM', 'PHPCS_T_YIELD_FROM'); +} + +// Some PHP 7.4 tokens, replicated for lower versions. +if (defined('T_BAD_CHARACTER') === false) { + define('T_BAD_CHARACTER', 'PHPCS_T_BAD_CHARACTER'); +} + +if (defined('T_FN') === false) { + define('T_FN', 'PHPCS_T_FN'); +} + +// Some PHP 8.0 tokens, replicated for lower versions. +if (defined('T_NULLSAFE_OBJECT_OPERATOR') === false) { + define('T_NULLSAFE_OBJECT_OPERATOR', 'PHPCS_T_NULLSAFE_OBJECT_OPERATOR'); +} + +if (defined('T_NAME_QUALIFIED') === false) { + define('T_NAME_QUALIFIED', 'PHPCS_T_NAME_QUALIFIED'); +} + +if (defined('T_NAME_FULLY_QUALIFIED') === false) { + define('T_NAME_FULLY_QUALIFIED', 'PHPCS_T_NAME_FULLY_QUALIFIED'); +} + +if (defined('T_NAME_RELATIVE') === false) { + define('T_NAME_RELATIVE', 'PHPCS_T_NAME_RELATIVE'); +} + +if (defined('T_MATCH') === false) { + define('T_MATCH', 'PHPCS_T_MATCH'); +} + +if (defined('T_ATTRIBUTE') === false) { + define('T_ATTRIBUTE', 'PHPCS_T_ATTRIBUTE'); +} + +// Some PHP 8.1 tokens, replicated for lower versions. +if (defined('T_AMPERSAND_FOLLOWED_BY_VAR_OR_VARARG') === false) { + define('T_AMPERSAND_FOLLOWED_BY_VAR_OR_VARARG', 'PHPCS_T_AMPERSAND_FOLLOWED_BY_VAR_OR_VARARG'); +} + +if (defined('T_AMPERSAND_NOT_FOLLOWED_BY_VAR_OR_VARARG') === false) { + define('T_AMPERSAND_NOT_FOLLOWED_BY_VAR_OR_VARARG', 'PHPCS_T_AMPERSAND_NOT_FOLLOWED_BY_VAR_OR_VARARG'); +} + +// Tokens used for parsing doc blocks. +define('T_DOC_COMMENT_STAR', 'PHPCS_T_DOC_COMMENT_STAR'); +define('T_DOC_COMMENT_WHITESPACE', 'PHPCS_T_DOC_COMMENT_WHITESPACE'); +define('T_DOC_COMMENT_TAG', 'PHPCS_T_DOC_COMMENT_TAG'); +define('T_DOC_COMMENT_OPEN_TAG', 'PHPCS_T_DOC_COMMENT_OPEN_TAG'); +define('T_DOC_COMMENT_CLOSE_TAG', 'PHPCS_T_DOC_COMMENT_CLOSE_TAG'); +define('T_DOC_COMMENT_STRING', 'PHPCS_T_DOC_COMMENT_STRING'); + +// Tokens used for PHPCS instruction comments. +define('T_PHPCS_ENABLE', 'PHPCS_T_PHPCS_ENABLE'); +define('T_PHPCS_DISABLE', 'PHPCS_T_PHPCS_DISABLE'); +define('T_PHPCS_SET', 'PHPCS_T_PHPCS_SET'); +define('T_PHPCS_IGNORE', 'PHPCS_T_PHPCS_IGNORE'); +define('T_PHPCS_IGNORE_FILE', 'PHPCS_T_PHPCS_IGNORE_FILE'); + +final class Tokens +{ + + /** + * The token weightings. + * + * @var array + */ + public static $weightings = [ + T_CLASS => 1000, + T_INTERFACE => 1000, + T_TRAIT => 1000, + T_NAMESPACE => 1000, + T_FUNCTION => 100, + T_CLOSURE => 100, + + /* + * Conditions. + */ + + T_WHILE => 50, + T_FOR => 50, + T_FOREACH => 50, + T_IF => 50, + T_ELSE => 50, + T_ELSEIF => 50, + T_DO => 50, + T_TRY => 50, + T_CATCH => 50, + T_FINALLY => 50, + T_SWITCH => 50, + T_MATCH => 50, + + T_SELF => 25, + T_PARENT => 25, + + /* + * Operators and arithmetic. + */ + + T_BITWISE_AND => 8, + T_BITWISE_OR => 8, + T_BITWISE_XOR => 8, + + T_MULTIPLY => 5, + T_DIVIDE => 5, + T_PLUS => 5, + T_MINUS => 5, + T_MODULUS => 5, + T_POW => 5, + T_SPACESHIP => 5, + T_COALESCE => 5, + T_COALESCE_EQUAL => 5, + + T_SL => 5, + T_SR => 5, + T_SL_EQUAL => 5, + T_SR_EQUAL => 5, + + T_EQUAL => 5, + T_AND_EQUAL => 5, + T_CONCAT_EQUAL => 5, + T_DIV_EQUAL => 5, + T_MINUS_EQUAL => 5, + T_MOD_EQUAL => 5, + T_MUL_EQUAL => 5, + T_OR_EQUAL => 5, + T_PLUS_EQUAL => 5, + T_XOR_EQUAL => 5, + + T_BOOLEAN_AND => 5, + T_BOOLEAN_OR => 5, + + /* + * Equality. + */ + + T_IS_EQUAL => 5, + T_IS_NOT_EQUAL => 5, + T_IS_IDENTICAL => 5, + T_IS_NOT_IDENTICAL => 5, + T_IS_SMALLER_OR_EQUAL => 5, + T_IS_GREATER_OR_EQUAL => 5, + ]; + + /** + * Tokens that represent assignments. + * + * @var array + */ + public static $assignmentTokens = [ + T_EQUAL => T_EQUAL, + T_AND_EQUAL => T_AND_EQUAL, + T_OR_EQUAL => T_OR_EQUAL, + T_CONCAT_EQUAL => T_CONCAT_EQUAL, + T_DIV_EQUAL => T_DIV_EQUAL, + T_MINUS_EQUAL => T_MINUS_EQUAL, + T_POW_EQUAL => T_POW_EQUAL, + T_MOD_EQUAL => T_MOD_EQUAL, + T_MUL_EQUAL => T_MUL_EQUAL, + T_PLUS_EQUAL => T_PLUS_EQUAL, + T_XOR_EQUAL => T_XOR_EQUAL, + T_DOUBLE_ARROW => T_DOUBLE_ARROW, + T_SL_EQUAL => T_SL_EQUAL, + T_SR_EQUAL => T_SR_EQUAL, + T_COALESCE_EQUAL => T_COALESCE_EQUAL, + T_ZSR_EQUAL => T_ZSR_EQUAL, + ]; + + /** + * Tokens that represent equality comparisons. + * + * @var array + */ + public static $equalityTokens = [ + T_IS_EQUAL => T_IS_EQUAL, + T_IS_NOT_EQUAL => T_IS_NOT_EQUAL, + T_IS_IDENTICAL => T_IS_IDENTICAL, + T_IS_NOT_IDENTICAL => T_IS_NOT_IDENTICAL, + T_IS_SMALLER_OR_EQUAL => T_IS_SMALLER_OR_EQUAL, + T_IS_GREATER_OR_EQUAL => T_IS_GREATER_OR_EQUAL, + ]; + + /** + * Tokens that represent comparison operator. + * + * @var array + */ + public static $comparisonTokens = [ + T_IS_EQUAL => T_IS_EQUAL, + T_IS_IDENTICAL => T_IS_IDENTICAL, + T_IS_NOT_EQUAL => T_IS_NOT_EQUAL, + T_IS_NOT_IDENTICAL => T_IS_NOT_IDENTICAL, + T_LESS_THAN => T_LESS_THAN, + T_GREATER_THAN => T_GREATER_THAN, + T_IS_SMALLER_OR_EQUAL => T_IS_SMALLER_OR_EQUAL, + T_IS_GREATER_OR_EQUAL => T_IS_GREATER_OR_EQUAL, + T_SPACESHIP => T_SPACESHIP, + T_COALESCE => T_COALESCE, + ]; + + /** + * Tokens that represent arithmetic operators. + * + * @var array + */ + public static $arithmeticTokens = [ + T_PLUS => T_PLUS, + T_MINUS => T_MINUS, + T_MULTIPLY => T_MULTIPLY, + T_DIVIDE => T_DIVIDE, + T_MODULUS => T_MODULUS, + T_POW => T_POW, + ]; + + /** + * Tokens that perform operations. + * + * @var array + */ + public static $operators = [ + T_MINUS => T_MINUS, + T_PLUS => T_PLUS, + T_MULTIPLY => T_MULTIPLY, + T_DIVIDE => T_DIVIDE, + T_MODULUS => T_MODULUS, + T_POW => T_POW, + T_SPACESHIP => T_SPACESHIP, + T_COALESCE => T_COALESCE, + T_BITWISE_AND => T_BITWISE_AND, + T_BITWISE_OR => T_BITWISE_OR, + T_BITWISE_XOR => T_BITWISE_XOR, + T_SL => T_SL, + T_SR => T_SR, + ]; + + /** + * Tokens that perform boolean operations. + * + * @var array + */ + public static $booleanOperators = [ + T_BOOLEAN_AND => T_BOOLEAN_AND, + T_BOOLEAN_OR => T_BOOLEAN_OR, + T_LOGICAL_AND => T_LOGICAL_AND, + T_LOGICAL_OR => T_LOGICAL_OR, + T_LOGICAL_XOR => T_LOGICAL_XOR, + ]; + + /** + * Tokens that represent casting. + * + * @var array + */ + public static $castTokens = [ + T_INT_CAST => T_INT_CAST, + T_STRING_CAST => T_STRING_CAST, + T_DOUBLE_CAST => T_DOUBLE_CAST, + T_ARRAY_CAST => T_ARRAY_CAST, + T_BOOL_CAST => T_BOOL_CAST, + T_OBJECT_CAST => T_OBJECT_CAST, + T_UNSET_CAST => T_UNSET_CAST, + T_BINARY_CAST => T_BINARY_CAST, + ]; + + /** + * Token types that open parenthesis. + * + * @var array + */ + public static $parenthesisOpeners = [ + T_ARRAY => T_ARRAY, + T_LIST => T_LIST, + T_FUNCTION => T_FUNCTION, + T_CLOSURE => T_CLOSURE, + T_ANON_CLASS => T_ANON_CLASS, + T_WHILE => T_WHILE, + T_FOR => T_FOR, + T_FOREACH => T_FOREACH, + T_SWITCH => T_SWITCH, + T_IF => T_IF, + T_ELSEIF => T_ELSEIF, + T_CATCH => T_CATCH, + T_DECLARE => T_DECLARE, + T_MATCH => T_MATCH, + ]; + + /** + * Tokens that are allowed to open scopes. + * + * @var array + */ + public static $scopeOpeners = [ + T_CLASS => T_CLASS, + T_ANON_CLASS => T_ANON_CLASS, + T_INTERFACE => T_INTERFACE, + T_TRAIT => T_TRAIT, + T_NAMESPACE => T_NAMESPACE, + T_FUNCTION => T_FUNCTION, + T_CLOSURE => T_CLOSURE, + T_IF => T_IF, + T_SWITCH => T_SWITCH, + T_CASE => T_CASE, + T_DECLARE => T_DECLARE, + T_DEFAULT => T_DEFAULT, + T_WHILE => T_WHILE, + T_ELSE => T_ELSE, + T_ELSEIF => T_ELSEIF, + T_FOR => T_FOR, + T_FOREACH => T_FOREACH, + T_DO => T_DO, + T_TRY => T_TRY, + T_CATCH => T_CATCH, + T_FINALLY => T_FINALLY, + T_PROPERTY => T_PROPERTY, + T_OBJECT => T_OBJECT, + T_USE => T_USE, + T_MATCH => T_MATCH, + ]; + + /** + * Tokens that represent scope modifiers. + * + * @var array + */ + public static $scopeModifiers = [ + T_PRIVATE => T_PRIVATE, + T_PUBLIC => T_PUBLIC, + T_PROTECTED => T_PROTECTED, + ]; + + /** + * Tokens that can prefix a method name + * + * @var array + */ + public static $methodPrefixes = [ + T_PRIVATE => T_PRIVATE, + T_PUBLIC => T_PUBLIC, + T_PROTECTED => T_PROTECTED, + T_ABSTRACT => T_ABSTRACT, + T_STATIC => T_STATIC, + T_FINAL => T_FINAL, + ]; + + /** + * Tokens that open code blocks. + * + * @var array + */ + public static $blockOpeners = [ + T_OPEN_CURLY_BRACKET => T_OPEN_CURLY_BRACKET, + T_OPEN_SQUARE_BRACKET => T_OPEN_SQUARE_BRACKET, + T_OPEN_PARENTHESIS => T_OPEN_PARENTHESIS, + T_OBJECT => T_OBJECT, + ]; + + /** + * Tokens that don't represent code. + * + * @var array + */ + public static $emptyTokens = [ + T_WHITESPACE => T_WHITESPACE, + T_COMMENT => T_COMMENT, + T_DOC_COMMENT => T_DOC_COMMENT, + T_DOC_COMMENT_STAR => T_DOC_COMMENT_STAR, + T_DOC_COMMENT_WHITESPACE => T_DOC_COMMENT_WHITESPACE, + T_DOC_COMMENT_TAG => T_DOC_COMMENT_TAG, + T_DOC_COMMENT_OPEN_TAG => T_DOC_COMMENT_OPEN_TAG, + T_DOC_COMMENT_CLOSE_TAG => T_DOC_COMMENT_CLOSE_TAG, + T_DOC_COMMENT_STRING => T_DOC_COMMENT_STRING, + T_PHPCS_ENABLE => T_PHPCS_ENABLE, + T_PHPCS_DISABLE => T_PHPCS_DISABLE, + T_PHPCS_SET => T_PHPCS_SET, + T_PHPCS_IGNORE => T_PHPCS_IGNORE, + T_PHPCS_IGNORE_FILE => T_PHPCS_IGNORE_FILE, + ]; + + /** + * Tokens that are comments. + * + * @var array + */ + public static $commentTokens = [ + T_COMMENT => T_COMMENT, + T_DOC_COMMENT => T_DOC_COMMENT, + T_DOC_COMMENT_STAR => T_DOC_COMMENT_STAR, + T_DOC_COMMENT_WHITESPACE => T_DOC_COMMENT_WHITESPACE, + T_DOC_COMMENT_TAG => T_DOC_COMMENT_TAG, + T_DOC_COMMENT_OPEN_TAG => T_DOC_COMMENT_OPEN_TAG, + T_DOC_COMMENT_CLOSE_TAG => T_DOC_COMMENT_CLOSE_TAG, + T_DOC_COMMENT_STRING => T_DOC_COMMENT_STRING, + T_PHPCS_ENABLE => T_PHPCS_ENABLE, + T_PHPCS_DISABLE => T_PHPCS_DISABLE, + T_PHPCS_SET => T_PHPCS_SET, + T_PHPCS_IGNORE => T_PHPCS_IGNORE, + T_PHPCS_IGNORE_FILE => T_PHPCS_IGNORE_FILE, + ]; + + /** + * Tokens that are comments containing PHPCS instructions. + * + * @var array + */ + public static $phpcsCommentTokens = [ + T_PHPCS_ENABLE => T_PHPCS_ENABLE, + T_PHPCS_DISABLE => T_PHPCS_DISABLE, + T_PHPCS_SET => T_PHPCS_SET, + T_PHPCS_IGNORE => T_PHPCS_IGNORE, + T_PHPCS_IGNORE_FILE => T_PHPCS_IGNORE_FILE, + ]; + + /** + * Tokens that represent strings. + * + * Note that T_STRINGS are NOT represented in this list. + * + * @var array + */ + public static $stringTokens = [ + T_CONSTANT_ENCAPSED_STRING => T_CONSTANT_ENCAPSED_STRING, + T_DOUBLE_QUOTED_STRING => T_DOUBLE_QUOTED_STRING, + ]; + + /** + * Tokens that represent text strings. + * + * @var array + */ + public static $textStringTokens = [ + T_CONSTANT_ENCAPSED_STRING => T_CONSTANT_ENCAPSED_STRING, + T_DOUBLE_QUOTED_STRING => T_DOUBLE_QUOTED_STRING, + T_INLINE_HTML => T_INLINE_HTML, + T_HEREDOC => T_HEREDOC, + T_NOWDOC => T_NOWDOC, + ]; + + /** + * Tokens that represent brackets and parenthesis. + * + * @var array + */ + public static $bracketTokens = [ + T_OPEN_CURLY_BRACKET => T_OPEN_CURLY_BRACKET, + T_CLOSE_CURLY_BRACKET => T_CLOSE_CURLY_BRACKET, + T_OPEN_SQUARE_BRACKET => T_OPEN_SQUARE_BRACKET, + T_CLOSE_SQUARE_BRACKET => T_CLOSE_SQUARE_BRACKET, + T_OPEN_PARENTHESIS => T_OPEN_PARENTHESIS, + T_CLOSE_PARENTHESIS => T_CLOSE_PARENTHESIS, + ]; + + /** + * Tokens that include files. + * + * @var array + */ + public static $includeTokens = [ + T_REQUIRE_ONCE => T_REQUIRE_ONCE, + T_REQUIRE => T_REQUIRE, + T_INCLUDE_ONCE => T_INCLUDE_ONCE, + T_INCLUDE => T_INCLUDE, + ]; + + /** + * Tokens that make up a heredoc string. + * + * @var array + */ + public static $heredocTokens = [ + T_START_HEREDOC => T_START_HEREDOC, + T_END_HEREDOC => T_END_HEREDOC, + T_HEREDOC => T_HEREDOC, + T_START_NOWDOC => T_START_NOWDOC, + T_END_NOWDOC => T_END_NOWDOC, + T_NOWDOC => T_NOWDOC, + ]; + + /** + * Tokens that represent the names of called functions. + * + * Mostly, these are just strings. But PHP tokenizes some language + * constructs and functions using their own tokens. + * + * @var array + */ + public static $functionNameTokens = [ + T_STRING => T_STRING, + T_EVAL => T_EVAL, + T_EXIT => T_EXIT, + T_INCLUDE => T_INCLUDE, + T_INCLUDE_ONCE => T_INCLUDE_ONCE, + T_REQUIRE => T_REQUIRE, + T_REQUIRE_ONCE => T_REQUIRE_ONCE, + T_ISSET => T_ISSET, + T_UNSET => T_UNSET, + T_EMPTY => T_EMPTY, + T_SELF => T_SELF, + T_STATIC => T_STATIC, + ]; + + /** + * Tokens that open class and object scopes. + * + * @var array + */ + public static $ooScopeTokens = [ + T_CLASS => T_CLASS, + T_ANON_CLASS => T_ANON_CLASS, + T_INTERFACE => T_INTERFACE, + T_TRAIT => T_TRAIT, + ]; + + /** + * Tokens representing PHP magic constants. + * + * @var array => + * + * @link https://www.php.net/language.constants.predefined PHP Manual on magic constants + */ + public static $magicConstants = [ + T_CLASS_C => T_CLASS_C, + T_DIR => T_DIR, + T_FILE => T_FILE, + T_FUNC_C => T_FUNC_C, + T_LINE => T_LINE, + T_METHOD_C => T_METHOD_C, + T_NS_C => T_NS_C, + T_TRAIT_C => T_TRAIT_C, + ]; + + + /** + * Given a token, returns the name of the token. + * + * If passed an integer, the token name is sourced from PHP's token_name() + * function. If passed a string, it is assumed to be a PHPCS-supplied token + * that begins with PHPCS_T_, so the name is sourced from the token value itself. + * + * @param int|string $token The token to get the name for. + * + * @return string + */ + public static function tokenName($token) + { + if (is_string($token) === false) { + // PHP-supplied token name. + return token_name($token); + } + + return substr($token, 6); + + }//end tokenName() + + + /** + * Returns the highest weighted token type. + * + * Tokens are weighted by their approximate frequency of appearance in code + * - the less frequently they appear in the code, the higher the weighting. + * For example T_CLASS tokens appear very infrequently in a file, and + * therefore have a high weighting. + * + * Returns false if there are no weightings for any of the specified tokens. + * + * @param array $tokens The token types to get the highest weighted + * type for. + * + * @return int|false The highest weighted token. + */ + public static function getHighestWeightedToken(array $tokens) + { + $highest = -1; + $highestType = false; + + $weights = self::$weightings; + + foreach ($tokens as $token) { + if (isset($weights[$token]) === true) { + $weight = $weights[$token]; + } else { + $weight = 0; + } + + if ($weight > $highest) { + $highest = $weight; + $highestType = $token; + } + } + + return $highestType; + + }//end getHighestWeightedToken() + + +}//end class diff --git a/vendor/squizlabs/php_codesniffer/tests/AllTests.php b/vendor/squizlabs/php_codesniffer/tests/AllTests.php new file mode 100644 index 00000000..9d099c1e --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/tests/AllTests.php @@ -0,0 +1,64 @@ + + * @copyright 2006-2015 Squiz Pty Ltd (ABN 77 084 670 600) + * @license https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence + */ + +namespace PHP_CodeSniffer\Tests; + +if ($GLOBALS['PHP_CODESNIFFER_PEAR'] === false) { + include_once 'Core/AllTests.php'; + include_once 'Standards/AllSniffs.php'; +} else { + include_once 'CodeSniffer/Core/AllTests.php'; + include_once 'CodeSniffer/Standards/AllSniffs.php'; + include_once 'FileList.php'; +} + +// PHPUnit 7 made the TestSuite run() method incompatible with +// older PHPUnit versions due to return type hints, so maintain +// two different suite objects. +$phpunit7 = false; +if (class_exists('\PHPUnit\Runner\Version') === true) { + $version = \PHPUnit\Runner\Version::id(); + if ($version[0] === '7') { + $phpunit7 = true; + } +} + +if ($phpunit7 === true) { + include_once 'TestSuite7.php'; +} else { + include_once 'TestSuite.php'; +} + +class PHP_CodeSniffer_AllTests +{ + + + /** + * Add all PHP_CodeSniffer test suites into a single test suite. + * + * @return \PHPUnit\Framework\TestSuite + */ + public static function suite() + { + $GLOBALS['PHP_CODESNIFFER_STANDARD_DIRS'] = []; + $GLOBALS['PHP_CODESNIFFER_TEST_DIRS'] = []; + + // Use a special PHP_CodeSniffer test suite so that we can + // unset our autoload function after the run. + $suite = new TestSuite('PHP CodeSniffer'); + + $suite->addTest(Core\AllTests::suite()); + $suite->addTest(Standards\AllSniffs::suite()); + + return $suite; + + }//end suite() + + +}//end class diff --git a/vendor/squizlabs/php_codesniffer/tests/Core/AbstractMethodUnitTest.php b/vendor/squizlabs/php_codesniffer/tests/Core/AbstractMethodUnitTest.php new file mode 100644 index 00000000..4d4f5469 --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/tests/Core/AbstractMethodUnitTest.php @@ -0,0 +1,140 @@ + + * @copyright 2018-2019 Juliette Reinders Folmer. All rights reserved. + * @license https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence + */ + +namespace PHP_CodeSniffer\Tests\Core; + +use PHP_CodeSniffer\Config; +use PHP_CodeSniffer\Ruleset; +use PHP_CodeSniffer\Files\DummyFile; +use PHPUnit\Framework\TestCase; + +abstract class AbstractMethodUnitTest extends TestCase +{ + + /** + * The file extension of the test case file (without leading dot). + * + * This allows child classes to overrule the default `inc` with, for instance, + * `js` or `css` when applicable. + * + * @var string + */ + protected static $fileExtension = 'inc'; + + /** + * The \PHP_CodeSniffer\Files\File object containing the parsed contents of the test case file. + * + * @var \PHP_CodeSniffer\Files\File + */ + protected static $phpcsFile; + + + /** + * Initialize & tokenize \PHP_CodeSniffer\Files\File with code from the test case file. + * + * The test case file for a unit test class has to be in the same directory + * directory and use the same file name as the test class, using the .inc extension. + * + * @return void + */ + public static function setUpBeforeClass() + { + $config = new Config(); + $config->standards = ['PSR1']; + + $ruleset = new Ruleset($config); + + // Default to a file with the same name as the test class. Extension is property based. + $relativeCN = str_replace(__NAMESPACE__, '', get_called_class()); + $relativePath = str_replace('\\', DIRECTORY_SEPARATOR, $relativeCN); + $pathToTestFile = realpath(__DIR__).$relativePath.'.'.static::$fileExtension; + + // Make sure the file gets parsed correctly based on the file type. + $contents = 'phpcs_input_file: '.$pathToTestFile.PHP_EOL; + $contents .= file_get_contents($pathToTestFile); + + self::$phpcsFile = new DummyFile($contents, $ruleset, $config); + self::$phpcsFile->process(); + + }//end setUpBeforeClass() + + + /** + * Clean up after finished test. + * + * @return void + */ + public static function tearDownAfterClass() + { + self::$phpcsFile = null; + + }//end tearDownAfterClass() + + + /** + * Get the token pointer for a target token based on a specific comment found on the line before. + * + * Note: the test delimiter comment MUST start with "/* test" to allow this function to + * distinguish between comments used *in* a test and test delimiters. + * + * @param string $commentString The delimiter comment to look for. + * @param int|string|array $tokenType The type of token(s) to look for. + * @param string $tokenContent Optional. The token content for the target token. + * + * @return int + */ + public function getTargetToken($commentString, $tokenType, $tokenContent=null) + { + $start = (self::$phpcsFile->numTokens - 1); + $comment = self::$phpcsFile->findPrevious( + T_COMMENT, + $start, + null, + false, + $commentString + ); + + $tokens = self::$phpcsFile->getTokens(); + $end = ($start + 1); + + // Limit the token finding to between this and the next delimiter comment. + for ($i = ($comment + 1); $i < $end; $i++) { + if ($tokens[$i]['code'] !== T_COMMENT) { + continue; + } + + if (stripos($tokens[$i]['content'], '/* test') === 0) { + $end = $i; + break; + } + } + + $target = self::$phpcsFile->findNext( + $tokenType, + ($comment + 1), + $end, + false, + $tokenContent + ); + + if ($target === false) { + $msg = 'Failed to find test target token for comment string: '.$commentString; + if ($tokenContent !== null) { + $msg .= ' With token content: '.$tokenContent; + } + + $this->assertFalse(true, $msg); + } + + return $target; + + }//end getTargetToken() + + +}//end class diff --git a/vendor/squizlabs/php_codesniffer/tests/Core/AllTests.php b/vendor/squizlabs/php_codesniffer/tests/Core/AllTests.php new file mode 100644 index 00000000..304690ef --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/tests/Core/AllTests.php @@ -0,0 +1,63 @@ + + * @author Juliette Reinders Folmer + * @copyright 2006-2019 Squiz Pty Ltd (ABN 77 084 670 600) + * @license https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence + */ + +namespace PHP_CodeSniffer\Tests\Core; + +use PHP_CodeSniffer\Tests\FileList; +use PHPUnit\TextUI\TestRunner; +use PHPUnit\Framework\TestSuite; + +class AllTests +{ + + + /** + * Prepare the test runner. + * + * @return void + */ + public static function main() + { + TestRunner::run(self::suite()); + + }//end main() + + + /** + * Add all core unit tests into a test suite. + * + * @return \PHPUnit\Framework\TestSuite + */ + public static function suite() + { + $suite = new TestSuite('PHP CodeSniffer Core'); + + $testFileIterator = new FileList(__DIR__, '', '`Test\.php$`Di'); + foreach ($testFileIterator->fileIterator as $file) { + if (strpos($file, 'AbstractMethodUnitTest.php') !== false) { + continue; + } + + include_once $file; + + $class = str_replace(__DIR__, '', $file); + $class = str_replace('.php', '', $class); + $class = str_replace('/', '\\', $class); + $class = 'PHP_CodeSniffer\Tests\Core'.$class; + + $suite->addTestSuite($class); + } + + return $suite; + + }//end suite() + + +}//end class diff --git a/vendor/squizlabs/php_codesniffer/tests/Core/Autoloader/DetermineLoadedClassTest.php b/vendor/squizlabs/php_codesniffer/tests/Core/Autoloader/DetermineLoadedClassTest.php new file mode 100644 index 00000000..65542b67 --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/tests/Core/Autoloader/DetermineLoadedClassTest.php @@ -0,0 +1,118 @@ + + * @copyright 2006-2015 Squiz Pty Ltd (ABN 77 084 670 600) + * @license https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence + */ + +namespace PHP_CodeSniffer\Tests\Core\Autoloader; + +use PHPUnit\Framework\TestCase; + +class DetermineLoadedClassTest extends TestCase +{ + + + /** + * Load the test files. + * + * @return void + */ + public static function setUpBeforeClass() + { + include __DIR__.'/TestFiles/Sub/C.inc'; + + }//end setUpBeforeClass() + + + /** + * Test for when class list is ordered. + * + * @return void + */ + public function testOrdered() + { + $classesBeforeLoad = [ + 'classes' => [], + 'interfaces' => [], + 'traits' => [], + ]; + + $classesAfterLoad = [ + 'classes' => [ + 'PHP_CodeSniffer\Tests\Core\Autoloader\A', + 'PHP_CodeSniffer\Tests\Core\Autoloader\B', + 'PHP_CodeSniffer\Tests\Core\Autoloader\C', + 'PHP_CodeSniffer\Tests\Core\Autoloader\Sub\C', + ], + 'interfaces' => [], + 'traits' => [], + ]; + + $className = \PHP_CodeSniffer\Autoload::determineLoadedClass($classesBeforeLoad, $classesAfterLoad); + $this->assertEquals('PHP_CodeSniffer\Tests\Core\Autoloader\Sub\C', $className); + + }//end testOrdered() + + + /** + * Test for when class list is out of order. + * + * @return void + */ + public function testUnordered() + { + $classesBeforeLoad = [ + 'classes' => [], + 'interfaces' => [], + 'traits' => [], + ]; + + $classesAfterLoad = [ + 'classes' => [ + 'PHP_CodeSniffer\Tests\Core\Autoloader\A', + 'PHP_CodeSniffer\Tests\Core\Autoloader\Sub\C', + 'PHP_CodeSniffer\Tests\Core\Autoloader\C', + 'PHP_CodeSniffer\Tests\Core\Autoloader\B', + ], + 'interfaces' => [], + 'traits' => [], + ]; + + $className = \PHP_CodeSniffer\Autoload::determineLoadedClass($classesBeforeLoad, $classesAfterLoad); + $this->assertEquals('PHP_CodeSniffer\Tests\Core\Autoloader\Sub\C', $className); + + $classesAfterLoad = [ + 'classes' => [ + 'PHP_CodeSniffer\Tests\Core\Autoloader\A', + 'PHP_CodeSniffer\Tests\Core\Autoloader\C', + 'PHP_CodeSniffer\Tests\Core\Autoloader\Sub\C', + 'PHP_CodeSniffer\Tests\Core\Autoloader\B', + ], + 'interfaces' => [], + 'traits' => [], + ]; + + $className = \PHP_CodeSniffer\Autoload::determineLoadedClass($classesBeforeLoad, $classesAfterLoad); + $this->assertEquals('PHP_CodeSniffer\Tests\Core\Autoloader\Sub\C', $className); + + $classesAfterLoad = [ + 'classes' => [ + 'PHP_CodeSniffer\Tests\Core\Autoloader\Sub\C', + 'PHP_CodeSniffer\Tests\Core\Autoloader\A', + 'PHP_CodeSniffer\Tests\Core\Autoloader\C', + 'PHP_CodeSniffer\Tests\Core\Autoloader\B', + ], + 'interfaces' => [], + 'traits' => [], + ]; + + $className = \PHP_CodeSniffer\Autoload::determineLoadedClass($classesBeforeLoad, $classesAfterLoad); + $this->assertEquals('PHP_CodeSniffer\Tests\Core\Autoloader\Sub\C', $className); + + }//end testUnordered() + + +}//end class diff --git a/vendor/squizlabs/php_codesniffer/tests/Core/Autoloader/TestFiles/A.inc b/vendor/squizlabs/php_codesniffer/tests/Core/Autoloader/TestFiles/A.inc new file mode 100644 index 00000000..c1433718 --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/tests/Core/Autoloader/TestFiles/A.inc @@ -0,0 +1,3 @@ + + * @copyright 2006-2015 Squiz Pty Ltd (ABN 77 084 670 600) + * @license https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence + */ + +namespace PHP_CodeSniffer\Tests\Core; + +use PHP_CodeSniffer\Config; +use PHP_CodeSniffer\Ruleset; +use PHP_CodeSniffer\Files\DummyFile; +use PHPUnit\Framework\TestCase; + +class ErrorSuppressionTest extends TestCase +{ + + + /** + * Test suppressing a single error. + * + * @param string $before Annotation to place before the code. + * @param string $after Annotation to place after the code. + * @param int $expectedErrors Optional. Number of errors expected. + * Defaults to 0. + * + * @dataProvider dataSuppressError + * @covers PHP_CodeSniffer\Tokenizers\Tokenizer::createPositionMap + * + * @return void + */ + public function testSuppressError($before, $after, $expectedErrors=0) + { + static $config, $ruleset; + + if (isset($config, $ruleset) === false) { + $config = new Config(); + $config->standards = ['Generic']; + $config->sniffs = ['Generic.PHP.LowerCaseConstant']; + + $ruleset = new Ruleset($config); + } + + $content = 'process(); + + $this->assertSame($expectedErrors, $file->getErrorCount()); + $this->assertCount($expectedErrors, $file->getErrors()); + + }//end testSuppressError() + + + /** + * Data provider. + * + * @see testSuppressError() + * + * @return array + */ + public function dataSuppressError() + { + return [ + 'no suppression' => [ + 'before' => '', + 'after' => '', + 'expectedErrors' => 1, + ], + + // Inline slash comments. + 'disable/enable: slash comment' => [ + 'before' => '// phpcs:disable'.PHP_EOL, + 'after' => '// phpcs:enable', + ], + 'disable/enable: multi-line slash comment, tab indented' => [ + 'before' => "\t".'// For reasons'.PHP_EOL."\t".'// phpcs:disable'.PHP_EOL."\t", + 'after' => "\t".'// phpcs:enable', + ], + 'disable/enable: slash comment, with @' => [ + 'before' => '// @phpcs:disable'.PHP_EOL, + 'after' => '// @phpcs:enable', + ], + 'disable/enable: slash comment, mixed case' => [ + 'before' => '// PHPCS:Disable'.PHP_EOL, + 'after' => '// pHPcs:enabLE', + ], + + // Inline hash comments. + 'disable/enable: hash comment' => [ + 'before' => '# phpcs:disable'.PHP_EOL, + 'after' => '# phpcs:enable', + ], + 'disable/enable: multi-line hash comment, tab indented' => [ + 'before' => "\t".'# For reasons'.PHP_EOL."\t".'# phpcs:disable'.PHP_EOL."\t", + 'after' => "\t".'# phpcs:enable', + ], + 'disable/enable: hash comment, with @' => [ + 'before' => '# @phpcs:disable'.PHP_EOL, + 'after' => '# @phpcs:enable', + ], + 'disable/enable: hash comment, mixed case' => [ + 'before' => '# PHPCS:Disable'.PHP_EOL, + 'after' => '# pHPcs:enabLE', + ], + + // Inline star (block) comments. + 'disable/enable: star comment' => [ + 'before' => '/* phpcs:disable */'.PHP_EOL, + 'after' => '/* phpcs:enable */', + ], + 'disable/enable: multi-line star comment' => [ + 'before' => '/*'.PHP_EOL.' phpcs:disable'.PHP_EOL.' */'.PHP_EOL, + 'after' => '/*'.PHP_EOL.' phpcs:enable'.PHP_EOL.' */', + ], + 'disable/enable: multi-line star comment, each line starred' => [ + 'before' => '/*'.PHP_EOL.' * phpcs:disable'.PHP_EOL.' */'.PHP_EOL, + 'after' => '/*'.PHP_EOL.' * phpcs:enable'.PHP_EOL.' */', + ], + 'disable/enable: multi-line star comment, each line starred, tab indented' => [ + 'before' => "\t".'/*'.PHP_EOL."\t".' * phpcs:disable'.PHP_EOL."\t".' */'.PHP_EOL."\t", + 'after' => "\t".'/*'.PHP_EOL.' * phpcs:enable'.PHP_EOL.' */', + ], + + // Docblock comments. + 'disable/enable: single line docblock comment' => [ + 'before' => '/** phpcs:disable */'.PHP_EOL, + 'after' => '/** phpcs:enable */', + ], + + // Deprecated syntax. + 'old style: slash comment' => [ + 'before' => '// @codingStandardsIgnoreStart'.PHP_EOL, + 'after' => '// @codingStandardsIgnoreEnd', + ], + 'old style: star comment' => [ + 'before' => '/* @codingStandardsIgnoreStart */'.PHP_EOL, + 'after' => '/* @codingStandardsIgnoreEnd */', + ], + 'old style: multi-line star comment' => [ + 'before' => '/*'.PHP_EOL.' @codingStandardsIgnoreStart'.PHP_EOL.' */'.PHP_EOL, + 'after' => '/*'.PHP_EOL.' @codingStandardsIgnoreEnd'.PHP_EOL.' */', + ], + 'old style: single line docblock comment' => [ + 'before' => '/** @codingStandardsIgnoreStart */'.PHP_EOL, + 'after' => '/** @codingStandardsIgnoreEnd */', + ], + ]; + + }//end dataSuppressError() + + + /** + * Test suppressing 1 out of 2 errors. + * + * @param string $before Annotation to place before the code. + * @param string $between Annotation to place between the code. + * @param int $expectedErrors Optional. Number of errors expected. + * Defaults to 1. + * + * @dataProvider dataSuppressSomeErrors + * @covers PHP_CodeSniffer\Tokenizers\Tokenizer::createPositionMap + * + * @return void + */ + public function testSuppressSomeErrors($before, $between, $expectedErrors=1) + { + static $config, $ruleset; + + if (isset($config, $ruleset) === false) { + $config = new Config(); + $config->standards = ['Generic']; + $config->sniffs = ['Generic.PHP.LowerCaseConstant']; + + $ruleset = new Ruleset($config); + } + + $content = <<process(); + + $this->assertSame($expectedErrors, $file->getErrorCount()); + $this->assertCount($expectedErrors, $file->getErrors()); + + }//end testSuppressSomeErrors() + + + /** + * Data provider. + * + * @see testSuppressSomeErrors() + * + * @return array + */ + public function dataSuppressSomeErrors() + { + return [ + 'no suppression' => [ + 'before' => '', + 'between' => '', + 'expectedErrors' => 2, + ], + + // With suppression. + 'disable/enable: slash comment' => [ + 'before' => '// phpcs:disable', + 'between' => '// phpcs:enable', + ], + 'disable/enable: slash comment, with @' => [ + 'before' => '// @phpcs:disable', + 'between' => '// @phpcs:enable', + ], + 'disable/enable: hash comment' => [ + 'before' => '# phpcs:disable', + 'between' => '# phpcs:enable', + ], + 'disable/enable: hash comment, with @' => [ + 'before' => '# @phpcs:disable', + 'between' => '# @phpcs:enable', + ], + 'disable/enable: single line docblock comment' => [ + 'before' => '/** phpcs:disable */', + 'between' => '/** phpcs:enable */', + ], + + // Deprecated syntax. + 'old style: slash comment' => [ + 'before' => '// @codingStandardsIgnoreStart', + 'between' => '// @codingStandardsIgnoreEnd', + ], + 'old style: single line docblock comment' => [ + 'before' => '/** @codingStandardsIgnoreStart */', + 'between' => '/** @codingStandardsIgnoreEnd */', + ], + ]; + + }//end dataSuppressSomeErrors() + + + /** + * Test suppressing a single warning. + * + * @param string $before Annotation to place before the code. + * @param string $after Annotation to place after the code. + * @param int $expectedWarnings Optional. Number of warnings expected. + * Defaults to 0. + * + * @dataProvider dataSuppressWarning + * @covers PHP_CodeSniffer\Tokenizers\Tokenizer::createPositionMap + * + * @return void + */ + public function testSuppressWarning($before, $after, $expectedWarnings=0) + { + static $config, $ruleset; + + if (isset($config, $ruleset) === false) { + $config = new Config(); + $config->standards = ['Generic']; + $config->sniffs = ['Generic.Commenting.Todo']; + + $ruleset = new Ruleset($config); + } + + $content = <<process(); + + $this->assertSame($expectedWarnings, $file->getWarningCount()); + $this->assertCount($expectedWarnings, $file->getWarnings()); + + }//end testSuppressWarning() + + + /** + * Data provider. + * + * @see testSuppressWarning() + * + * @return array + */ + public function dataSuppressWarning() + { + return [ + 'no suppression' => [ + 'before' => '', + 'after' => '', + 'expectedWarnings' => 1, + ], + + // With suppression. + 'disable/enable: slash comment' => [ + 'before' => '// phpcs:disable', + 'after' => '// phpcs:enable', + ], + 'disable/enable: slash comment, with @' => [ + 'before' => '// @phpcs:disable', + 'after' => '// @phpcs:enable', + ], + 'disable/enable: single line docblock comment' => [ + 'before' => '/** phpcs:disable */', + 'after' => '/** phpcs:enable */', + ], + + // Deprecated syntax. + 'old style: slash comment' => [ + 'before' => '// @codingStandardsIgnoreStart', + 'after' => '// @codingStandardsIgnoreEnd', + ], + 'old style: single line docblock comment' => [ + 'before' => '/** @codingStandardsIgnoreStart */', + 'after' => '/** @codingStandardsIgnoreEnd */', + ], + ]; + + }//end dataSuppressWarning() + + + /** + * Test suppressing a single error using a single line ignore. + * + * @param string $before Annotation to place before the code. + * @param string $after Optional. Annotation to place after the code. + * Defaults to an empty string. + * @param int $expectedErrors Optional. Number of errors expected. + * Defaults to 1. + * + * @dataProvider dataSuppressLine + * @covers PHP_CodeSniffer\Tokenizers\Tokenizer::createPositionMap + * + * @return void + */ + public function testSuppressLine($before, $after='', $expectedErrors=1) + { + static $config, $ruleset; + + if (isset($config, $ruleset) === false) { + $config = new Config(); + $config->standards = ['Generic']; + $config->sniffs = ['Generic.PHP.LowerCaseConstant']; + + $ruleset = new Ruleset($config); + } + + $content = <<process(); + + $this->assertSame($expectedErrors, $file->getErrorCount()); + $this->assertCount($expectedErrors, $file->getErrors()); + + }//end testSuppressLine() + + + /** + * Data provider. + * + * @see testSuppressLine() + * + * @return array + */ + public function dataSuppressLine() + { + return [ + 'no suppression' => [ + 'before' => '', + 'after' => '', + 'expectedErrors' => 2, + ], + + // With suppression on line before. + 'ignore: line before, slash comment' => ['before' => '// phpcs:ignore'], + 'ignore: line before, slash comment, with @' => ['before' => '// @phpcs:ignore'], + 'ignore: line before, hash comment' => ['before' => '# phpcs:ignore'], + 'ignore: line before, hash comment, with @' => ['before' => '# @phpcs:ignore'], + 'ignore: line before, star comment' => ['before' => '/* phpcs:ignore */'], + 'ignore: line before, star comment, with @' => ['before' => '/* @phpcs:ignore */'], + + // With suppression as trailing comment on code line. + 'ignore: end of line, slash comment' => [ + 'before' => '', + 'after' => ' // phpcs:ignore', + ], + 'ignore: end of line, slash comment, with @' => [ + 'before' => '', + 'after' => ' // @phpcs:ignore', + ], + 'ignore: end of line, hash comment' => [ + 'before' => '', + 'after' => ' # phpcs:ignore', + ], + 'ignore: end of line, hash comment, with @' => [ + 'before' => '', + 'after' => ' # @phpcs:ignore', + ], + + // Deprecated syntax. + 'old style: line before, slash comment' => ['before' => '// @codingStandardsIgnoreLine'], + 'old style: end of line, slash comment' => [ + 'before' => '', + 'after' => ' // @codingStandardsIgnoreLine', + ], + ]; + + }//end dataSuppressLine() + + + /** + * Test suppressing a single error using a single line ignore in the middle of a line. + * + * @covers PHP_CodeSniffer\Tokenizers\Tokenizer::createPositionMap + * + * @return void + */ + public function testSuppressLineMidLine() + { + $config = new Config(); + $config->standards = ['Generic']; + $config->sniffs = ['Generic.PHP.LowerCaseConstant']; + + $ruleset = new Ruleset($config); + + $content = 'process(); + + $this->assertSame(0, $file->getErrorCount()); + $this->assertCount(0, $file->getErrors()); + + }//end testSuppressLineMidLine() + + + /** + * Test suppressing a single error using a single line ignore within a docblock. + * + * @covers PHP_CodeSniffer\Tokenizers\Tokenizer::createPositionMap + * + * @return void + */ + public function testSuppressLineWithinDocblock() + { + $config = new Config(); + $config->standards = ['Generic']; + $config->sniffs = ['Generic.Files.LineLength']; + + $ruleset = new Ruleset($config); + + // Process with @ suppression on line before inside docblock. + $comment = str_repeat('a ', 50); + $content = <<process(); + + $this->assertSame(0, $file->getErrorCount()); + $this->assertCount(0, $file->getErrors()); + + }//end testSuppressLineWithinDocblock() + + + /** + * Test that using a single line ignore does not interfere with other suppressions. + * + * @param string $before Annotation to place before the code. + * @param string $after Annotation to place after the code. + * + * @dataProvider dataNestedSuppressLine + * @covers PHP_CodeSniffer\Tokenizers\Tokenizer::createPositionMap + * + * @return void + */ + public function testNestedSuppressLine($before, $after) + { + static $config, $ruleset; + + if (isset($config, $ruleset) === false) { + $config = new Config(); + $config->standards = ['Generic']; + $config->sniffs = ['Generic.PHP.LowerCaseConstant']; + + $ruleset = new Ruleset($config); + } + + $content = <<process(); + + $this->assertSame(0, $file->getErrorCount()); + $this->assertCount(0, $file->getErrors()); + + }//end testNestedSuppressLine() + + + /** + * Data provider. + * + * @see testNestedSuppressLine() + * + * @return array + */ + public function dataNestedSuppressLine() + { + return [ + // Process with disable/enable suppression and no single line suppression. + 'disable/enable: slash comment, no single line suppression' => [ + 'before' => '// phpcs:disable', + 'after' => '// phpcs:enable', + ], + 'disable/enable: slash comment, with @, no single line suppression' => [ + 'before' => '// @phpcs:disable', + 'after' => '// @phpcs:enable', + ], + 'disable/enable: hash comment, no single line suppression' => [ + 'before' => '# phpcs:disable', + 'after' => '# phpcs:enable', + ], + 'old style: slash comment, no single line suppression' => [ + 'before' => '// @codingStandardsIgnoreStart', + 'after' => '// @codingStandardsIgnoreEnd', + ], + + // Process with line suppression nested within disable/enable suppression. + 'disable/enable: slash comment, next line nested single line suppression' => [ + 'before' => '// phpcs:disable'.PHP_EOL.'// phpcs:ignore', + 'after' => '// phpcs:enable', + ], + 'disable/enable: slash comment, with @, next line nested single line suppression' => [ + 'before' => '// @phpcs:disable'.PHP_EOL.'// @phpcs:ignore', + 'after' => '// @phpcs:enable', + ], + 'disable/enable: hash comment, next line nested single line suppression' => [ + 'before' => '# @phpcs:disable'.PHP_EOL.'# @phpcs:ignore', + 'after' => '# @phpcs:enable', + ], + 'old style: slash comment, next line nested single line suppression' => [ + 'before' => '// @codingStandardsIgnoreStart'.PHP_EOL.'// @codingStandardsIgnoreLine', + 'after' => '// @codingStandardsIgnoreEnd', + ], + ]; + + }//end dataNestedSuppressLine() + + + /** + * Test suppressing a scope opener. + * + * @param string $before Annotation to place before the scope opener. + * @param string $after Annotation to place after the scope opener. + * @param int $expectedErrors Optional. Number of errors expected. + * Defaults to 0. + * + * @dataProvider dataSuppressScope + * @covers PHP_CodeSniffer\Tokenizers\Tokenizer::createPositionMap + * + * @return void + */ + public function testSuppressScope($before, $after, $expectedErrors=0) + { + static $config, $ruleset; + + if (isset($config, $ruleset) === false) { + $config = new Config(); + $config->standards = ['PEAR']; + $config->sniffs = ['PEAR.Functions.FunctionDeclaration']; + + $ruleset = new Ruleset($config); + } + + $content = 'foo(); + } +} +EOD; + $file = new DummyFile($content, $ruleset, $config); + $file->process(); + + $this->assertSame($expectedErrors, $file->getErrorCount()); + $this->assertCount($expectedErrors, $file->getErrors()); + + }//end testSuppressScope() + + + /** + * Data provider. + * + * @see testSuppressScope() + * + * @return array + */ + public function dataSuppressScope() + { + return [ + 'no suppression' => [ + 'before' => '', + 'after' => '', + 'expectedErrors' => 1, + ], + + // Process with suppression. + 'disable/enable: slash comment' => [ + 'before' => '//phpcs:disable', + 'after' => '//phpcs:enable', + ], + 'disable/enable: slash comment, with @' => [ + 'before' => '//@phpcs:disable', + 'after' => '//@phpcs:enable', + ], + 'disable/enable: hash comment' => [ + 'before' => '#phpcs:disable', + 'after' => '#phpcs:enable', + ], + 'disable/enable: single line docblock comment' => [ + 'before' => '/** phpcs:disable */', + 'after' => '/** phpcs:enable */', + ], + 'disable/enable: single line docblock comment, with @' => [ + 'before' => '/** @phpcs:disable */', + 'after' => '/** @phpcs:enable */', + ], + + // Deprecated syntax. + 'old style: start/end, slash comment' => [ + 'before' => '//@codingStandardsIgnoreStart', + 'after' => '//@codingStandardsIgnoreEnd', + ], + 'old style: start/end, single line docblock comment' => [ + 'before' => '/** @codingStandardsIgnoreStart */', + 'after' => '/** @codingStandardsIgnoreEnd */', + ], + ]; + + }//end dataSuppressScope() + + + /** + * Test suppressing a whole file. + * + * @param string $before Annotation to place before the code. + * @param string $after Optional. Annotation to place after the code. + * Defaults to an empty string. + * @param int $expectedWarnings Optional. Number of warnings expected. + * Defaults to 0. + * + * @dataProvider dataSuppressFile + * @covers PHP_CodeSniffer\Tokenizers\Tokenizer::createPositionMap + * + * @return void + */ + public function testSuppressFile($before, $after='', $expectedWarnings=0) + { + static $config, $ruleset; + + if (isset($config, $ruleset) === false) { + $config = new Config(); + $config->standards = ['Generic']; + $config->sniffs = ['Generic.Commenting.Todo']; + + $ruleset = new Ruleset($config); + } + + $content = <<process(); + + $this->assertSame($expectedWarnings, $file->getWarningCount()); + $this->assertCount($expectedWarnings, $file->getWarnings()); + + }//end testSuppressFile() + + + /** + * Data provider. + * + * @see testSuppressFile() + * + * @return array + */ + public function dataSuppressFile() + { + return [ + 'no suppression' => [ + 'before' => '', + 'after' => '', + 'expectedErrors' => 1, + ], + + // Process with suppression. + 'ignoreFile: start of file, slash comment' => ['before' => '// phpcs:ignoreFile'], + 'ignoreFile: start of file, slash comment, with @' => ['before' => '// @phpcs:ignoreFile'], + 'ignoreFile: start of file, slash comment, mixed case' => ['before' => '// PHPCS:Ignorefile'], + 'ignoreFile: start of file, hash comment' => ['before' => '# phpcs:ignoreFile'], + 'ignoreFile: start of file, hash comment, with @' => ['before' => '# @phpcs:ignoreFile'], + 'ignoreFile: start of file, single-line star comment' => ['before' => '/* phpcs:ignoreFile */'], + 'ignoreFile: start of file, multi-line star comment' => [ + 'before' => '/*'.PHP_EOL.' phpcs:ignoreFile'.PHP_EOL.' */', + ], + 'ignoreFile: start of file, single-line docblock comment' => ['before' => '/** phpcs:ignoreFile */'], + + // Process late comment. + 'ignoreFile: late comment, slash comment' => [ + 'before' => '', + 'after' => '// phpcs:ignoreFile', + ], + + // Deprecated syntax. + 'old style: start of file, slash comment' => ['before' => '// @codingStandardsIgnoreFile'], + 'old style: start of file, single-line star comment' => ['before' => '/* @codingStandardsIgnoreFile */'], + 'old style: start of file, multi-line star comment' => [ + 'before' => '/*'.PHP_EOL.' @codingStandardsIgnoreFile'.PHP_EOL.' */', + ], + 'old style: start of file, single-line docblock comment' => ['before' => '/** @codingStandardsIgnoreFile */'], + + // Deprecated syntax, late comment. + 'old style: late comment, slash comment' => [ + 'before' => '', + 'after' => '// @codingStandardsIgnoreFile', + ], + ]; + + }//end dataSuppressFile() + + + /** + * Test disabling specific sniffs. + * + * @param string $before Annotation to place before the code. + * @param int $expectedErrors Optional. Number of errors expected. + * Defaults to 0. + * @param int $expectedWarnings Optional. Number of warnings expected. + * Defaults to 0. + * + * @dataProvider dataDisableSelected + * @covers PHP_CodeSniffer\Tokenizers\Tokenizer::createPositionMap + * + * @return void + */ + public function testDisableSelected($before, $expectedErrors=0, $expectedWarnings=0) + { + static $config, $ruleset; + + if (isset($config, $ruleset) === false) { + $config = new Config(); + $config->standards = ['Generic']; + $config->sniffs = [ + 'Generic.PHP.LowerCaseConstant', + 'Generic.Commenting.Todo', + ]; + + $ruleset = new Ruleset($config); + } + + $content = <<process(); + + $this->assertSame($expectedErrors, $file->getErrorCount()); + $this->assertCount($expectedErrors, $file->getErrors()); + + $this->assertSame($expectedWarnings, $file->getWarningCount()); + $this->assertCount($expectedWarnings, $file->getWarnings()); + + }//end testDisableSelected() + + + /** + * Data provider. + * + * @see testDisableSelected() + * + * @return array + */ + public function dataDisableSelected() + { + return [ + // Single sniff. + 'disable: single sniff' => [ + 'before' => '// phpcs:disable Generic.Commenting.Todo', + 'expectedErrors' => 1, + ], + 'disable: single sniff with reason' => [ + 'before' => '# phpcs:disable Generic.Commenting.Todo -- for reasons', + 'expectedErrors' => 1, + ], + 'disable: single sniff, docblock' => [ + 'before' => '/**'.PHP_EOL.' * phpcs:disable Generic.Commenting.Todo'.PHP_EOL.' */ ', + 'expectedErrors' => 1, + ], + 'disable: single sniff, docblock, with @' => [ + 'before' => '/**'.PHP_EOL.' * @phpcs:disable Generic.Commenting.Todo'.PHP_EOL.' */ ', + 'expectedErrors' => 1, + ], + + // Multiple sniffs. + 'disable: multiple sniffs in one comment' => ['before' => '// phpcs:disable Generic.Commenting.Todo,Generic.PHP.LowerCaseConstant'], + 'disable: multiple sniff in multiple comments' => [ + 'before' => '// phpcs:disable Generic.Commenting.Todo'.PHP_EOL.'// phpcs:disable Generic.PHP.LowerCaseConstant', + ], + + // Selectiveness variations. + 'disable: complete category' => [ + 'before' => '// phpcs:disable Generic.Commenting', + 'expectedErrors' => 1, + ], + 'disable: whole standard' => ['before' => '// phpcs:disable Generic'], + 'disable: single errorcode' => [ + 'before' => '# @phpcs:disable Generic.Commenting.Todo.TaskFound', + 'expectedErrors' => 1, + ], + 'disable: single errorcode and a category' => ['before' => '// phpcs:disable Generic.PHP.LowerCaseConstant.Found,Generic.Commenting'], + + // Wrong category/sniff/code. + 'disable: wrong error code and category' => [ + 'before' => '/**'.PHP_EOL.' * phpcs:disable Generic.PHP.LowerCaseConstant.Upper,Generic.Comments'.PHP_EOL.' */ ', + 'expectedErrors' => 1, + 'expectedWarnings' => 1, + ], + 'disable: wrong category, docblock' => [ + 'before' => '/**'.PHP_EOL.' * phpcs:disable Generic.Files'.PHP_EOL.' */ ', + 'expectedErrors' => 1, + 'expectedWarnings' => 1, + ], + 'disable: wrong category, docblock, with @' => [ + 'before' => '/**'.PHP_EOL.' * @phpcs:disable Generic.Files'.PHP_EOL.' */ ', + 'expectedErrors' => 1, + 'expectedWarnings' => 1, + ], + ]; + + }//end dataDisableSelected() + + + /** + * Test re-enabling specific sniffs that have been disabled. + * + * @param string $code Code pattern to check. + * @param int $expectedErrors Number of errors expected. + * @param int $expectedWarnings Number of warnings expected. + * + * @dataProvider dataEnableSelected + * @covers PHP_CodeSniffer\Tokenizers\Tokenizer::createPositionMap + * + * @return void + */ + public function testEnableSelected($code, $expectedErrors, $expectedWarnings) + { + static $config, $ruleset; + + if (isset($config, $ruleset) === false) { + $config = new Config(); + $config->standards = ['Generic']; + $config->sniffs = [ + 'Generic.PHP.LowerCaseConstant', + 'Generic.Commenting.Todo', + ]; + + $ruleset = new Ruleset($config); + } + + $content = 'process(); + + $this->assertSame($expectedErrors, $file->getErrorCount()); + $this->assertCount($expectedErrors, $file->getErrors()); + + $this->assertSame($expectedWarnings, $file->getWarningCount()); + $this->assertCount($expectedWarnings, $file->getWarnings()); + + }//end testEnableSelected() + + + /** + * Data provider. + * + * @see testEnableSelected() + * + * @return array + */ + public function dataEnableSelected() + { + return [ + 'disable/enable: a single sniff' => [ + 'code' => ' + // phpcs:disable Generic.Commenting.Todo + $var = FALSE; + //TODO: write some code + // phpcs:enable Generic.Commenting.Todo + //TODO: write some code', + 'expectedErrors' => 1, + 'expectedWarnings' => 1, + ], + 'disable/enable: multiple sniffs' => [ + 'code' => ' + // phpcs:disable Generic.Commenting.Todo,Generic.PHP.LowerCaseConstant + $var = FALSE; + //TODO: write some code + // phpcs:enable Generic.Commenting.Todo,Generic.PHP.LowerCaseConstant + //TODO: write some code + $var = FALSE;', + 'expectedErrors' => 1, + 'expectedWarnings' => 1, + ], + 'disable: multiple sniffs; enable: one' => [ + 'code' => ' + # phpcs:disable Generic.Commenting.Todo,Generic.PHP.LowerCaseConstant + $var = FALSE; + //TODO: write some code + # phpcs:enable Generic.Commenting.Todo + //TODO: write some code + $var = FALSE;', + 'expectedErrors' => 0, + 'expectedWarnings' => 1, + ], + 'disable/enable: complete category' => [ + 'code' => ' + // phpcs:disable Generic.Commenting + $var = FALSE; + //TODO: write some code + // phpcs:enable Generic.Commenting + //TODO: write some code', + 'expectedErrors' => 1, + 'expectedWarnings' => 1, + ], + 'disable/enable: whole standard' => [ + 'code' => ' + // phpcs:disable Generic + $var = FALSE; + //TODO: write some code + // phpcs:enable Generic + //TODO: write some code', + 'expectedErrors' => 0, + 'expectedWarnings' => 1, + ], + 'disable: whole standard; enable: category from the standard' => [ + 'code' => ' + // phpcs:disable Generic + $var = FALSE; + //TODO: write some code + // phpcs:enable Generic.Commenting + //TODO: write some code', + 'expectedErrors' => 0, + 'expectedWarnings' => 1, + ], + 'disable: a category; enable: the whole standard containing the category' => [ + 'code' => ' + # phpcs:disable Generic.Commenting + $var = FALSE; + //TODO: write some code + # phpcs:enable Generic + //TODO: write some code', + 'expectedErrors' => 1, + 'expectedWarnings' => 1, + ], + 'disable: single sniff; enable: the category containing the sniff' => [ + 'code' => ' + // phpcs:disable Generic.Commenting.Todo + $var = FALSE; + //TODO: write some code + // phpcs:enable Generic.Commenting + //TODO: write some code', + 'expectedErrors' => 1, + 'expectedWarnings' => 1, + ], + 'disable: whole standard; enable: single sniff from the standard' => [ + 'code' => ' + // phpcs:disable Generic + $var = FALSE; + //TODO: write some code + // phpcs:enable Generic.Commenting.Todo + //TODO: write some code', + 'expectedErrors' => 0, + 'expectedWarnings' => 1, + ], + 'disable: whole standard; enable: single sniff from the standard; disable: that same sniff; enable: everything' => [ + 'code' => ' + // phpcs:disable Generic + $var = FALSE; + //TODO: write some code + // phpcs:enable Generic.Commenting.Todo + //TODO: write some code + // phpcs:disable Generic.Commenting.Todo + //TODO: write some code + // phpcs:enable + //TODO: write some code', + 'expectedErrors' => 0, + 'expectedWarnings' => 2, + ], + 'disable: whole standard; enable: single sniff from the standard; enable: other sniff from the standard' => [ + 'code' => ' + // phpcs:disable Generic + $var = FALSE; + //TODO: write some code + // phpcs:enable Generic.Commenting.Todo + //TODO: write some code + $var = FALSE; + // phpcs:enable Generic.PHP.LowerCaseConstant + //TODO: write some code + $var = FALSE;', + 'expectedErrors' => 1, + 'expectedWarnings' => 2, + ], + ]; + + }//end dataEnableSelected() + + + /** + * Test ignoring specific sniffs. + * + * @param string $before Annotation to place before the code. + * @param int $expectedErrors Number of errors expected. + * @param int $expectedWarnings Number of warnings expected. + * + * @dataProvider dataIgnoreSelected + * @covers PHP_CodeSniffer\Tokenizers\Tokenizer::createPositionMap + * + * @return void + */ + public function testIgnoreSelected($before, $expectedErrors, $expectedWarnings) + { + static $config, $ruleset; + + if (isset($config, $ruleset) === false) { + $config = new Config(); + $config->standards = ['Generic']; + $config->sniffs = [ + 'Generic.PHP.LowerCaseConstant', + 'Generic.Commenting.Todo', + ]; + + $ruleset = new Ruleset($config); + } + + $content = <<process(); + + $this->assertSame($expectedErrors, $file->getErrorCount()); + $this->assertCount($expectedErrors, $file->getErrors()); + + $this->assertSame($expectedWarnings, $file->getWarningCount()); + $this->assertCount($expectedWarnings, $file->getWarnings()); + + }//end testIgnoreSelected() + + + /** + * Data provider. + * + * @see testIgnoreSelected() + * + * @return array + */ + public function dataIgnoreSelected() + { + return [ + 'no suppression' => [ + 'before' => '', + 'expectedErrors' => 2, + 'expectedWarnings' => 2, + ], + + // With suppression. + 'ignore: single sniff' => [ + 'before' => '// phpcs:ignore Generic.Commenting.Todo', + 'expectedErrors' => 2, + 'expectedWarnings' => 1, + ], + 'ignore: multiple sniffs' => [ + 'before' => '// phpcs:ignore Generic.Commenting.Todo,Generic.PHP.LowerCaseConstant', + 'expectedErrors' => 1, + 'expectedWarnings' => 1, + ], + 'disable: single sniff; ignore: single sniff' => [ + 'before' => '// phpcs:disable Generic.Commenting.Todo'.PHP_EOL.'// phpcs:ignore Generic.PHP.LowerCaseConstant', + 'expectedErrors' => 1, + 'expectedWarnings' => 0, + ], + 'ignore: category of sniffs' => [ + 'before' => '# phpcs:ignore Generic.Commenting', + 'expectedErrors' => 2, + 'expectedWarnings' => 1, + ], + 'ignore: whole standard' => [ + 'before' => '// phpcs:ignore Generic', + 'expectedErrors' => 1, + 'expectedWarnings' => 1, + ], + ]; + + }//end dataIgnoreSelected() + + + /** + * Test ignoring specific sniffs. + * + * @param string $code Code pattern to check. + * @param int $expectedErrors Number of errors expected. + * @param int $expectedWarnings Number of warnings expected. + * + * @dataProvider dataCommenting + * @covers PHP_CodeSniffer\Tokenizers\Tokenizer::createPositionMap + * + * @return void + */ + public function testCommenting($code, $expectedErrors, $expectedWarnings) + { + static $config, $ruleset; + + if (isset($config, $ruleset) === false) { + $config = new Config(); + $config->standards = ['Generic']; + $config->sniffs = [ + 'Generic.PHP.LowerCaseConstant', + 'Generic.Commenting.Todo', + ]; + + $ruleset = new Ruleset($config); + } + + $content = 'process(); + + $this->assertSame($expectedErrors, $file->getErrorCount()); + $this->assertCount($expectedErrors, $file->getErrors()); + + $this->assertSame($expectedWarnings, $file->getWarningCount()); + $this->assertCount($expectedWarnings, $file->getWarnings()); + + }//end testCommenting() + + + /** + * Data provider. + * + * @see testCommenting() + * + * @return array + */ + public function dataCommenting() + { + return [ + 'ignore: single sniff' => [ + 'code' => ' + // phpcs:ignore Generic.Commenting.Todo -- Because reasons + $var = FALSE; //TODO: write some code + $var = FALSE; //TODO: write some code', + 'expectedErrors' => 2, + 'expectedWarnings' => 1, + ], + 'disable: single sniff; enable: same sniff - test whitespace handling around reason delimiter' => [ + 'code' => ' + // phpcs:disable Generic.Commenting.Todo --Because reasons + $var = FALSE; + //TODO: write some code + // phpcs:enable Generic.Commenting.Todo -- Because reasons + //TODO: write some code', + 'expectedErrors' => 1, + 'expectedWarnings' => 1, + ], + 'disable: single sniff, multi-line comment' => [ + 'code' => ' + /* + Disable some checks + phpcs:disable Generic.Commenting.Todo + */ + $var = FALSE; + //TODO: write some code', + 'expectedErrors' => 1, + 'expectedWarnings' => 0, + ], + 'ignore: single sniff, multi-line slash comment' => [ + 'code' => ' + // Turn off a check for the next line of code. + // phpcs:ignore Generic.Commenting.Todo + $var = FALSE; //TODO: write some code + $var = FALSE; //TODO: write some code', + 'expectedErrors' => 2, + 'expectedWarnings' => 1, + ], + 'enable before disable, sniff not in standard' => [ + 'code' => ' + // phpcs:enable Generic.PHP.NoSilencedErrors -- Because reasons + $var = @delete( $filename ); + ', + 'expectedErrors' => 0, + 'expectedWarnings' => 0, + ], + ]; + + }//end dataCommenting() + + +}//end class diff --git a/vendor/squizlabs/php_codesniffer/tests/Core/File/FindEndOfStatementTest.inc b/vendor/squizlabs/php_codesniffer/tests/Core/File/FindEndOfStatementTest.inc new file mode 100644 index 00000000..6dfd0a28 --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/tests/Core/File/FindEndOfStatementTest.inc @@ -0,0 +1,105 @@ + fn() => return 1, + 'b' => fn() => return 1, +]; + +/* testStaticArrowFunction */ +static fn ($a) => $a; + +/* testArrowFunctionReturnValue */ +fn(): array => [a($a, $b)]; + +/* testArrowFunctionAsArgument */ +$foo = foo( + fn() => bar() +); + +/* testArrowFunctionWithArrayAsArgument */ +$foo = foo( + fn() => [$row[0], $row[3]] +); + +$match = match ($a) { + /* testMatchCase */ + 1 => 'foo', + /* testMatchDefault */ + default => 'bar' +}; + +$match = match ($a) { + /* testMatchMultipleCase */ + 1, 2, => $a * $b, + /* testMatchDefaultComma */ + default, => 'something' +}; + +match ($pressedKey) { + /* testMatchFunctionCall */ + Key::RETURN_ => save($value, $user) +}; + +$result = match (true) { + /* testMatchFunctionCallArm */ + str_contains($text, 'Welcome') || str_contains($text, 'Hello') => 'en', + str_contains($text, 'Bienvenue') || str_contains($text, 'Bonjour') => 'fr', + default => 'pl' +}; + +/* testMatchClosure */ +$result = match ($key) { + 1 => function($a, $b) {}, + 2 => function($b, $c) {}, +}; + +/* testMatchArray */ +$result = match ($key) { + 1 => [1,2,3], + 2 => [1 => one(), 2 => two()], +}; + +/* testNestedMatch */ +$result = match ($key) { + 1 => match ($key) { + 1 => 'one', + 2 => 'two', + }, + 2 => match ($key) { + 1 => 'two', + 2 => 'one', + }, +}; + +return 0; diff --git a/vendor/squizlabs/php_codesniffer/tests/Core/File/FindEndOfStatementTest.php b/vendor/squizlabs/php_codesniffer/tests/Core/File/FindEndOfStatementTest.php new file mode 100644 index 00000000..7bff26b5 --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/tests/Core/File/FindEndOfStatementTest.php @@ -0,0 +1,415 @@ + + * @copyright 2006-2015 Squiz Pty Ltd (ABN 77 084 670 600) + * @license https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence + */ + +namespace PHP_CodeSniffer\Tests\Core\File; + +use PHP_CodeSniffer\Tests\Core\AbstractMethodUnitTest; + +class FindEndOfStatementTest extends AbstractMethodUnitTest +{ + + + /** + * Test a simple assignment. + * + * @return void + */ + public function testSimpleAssignment() + { + $start = $this->getTargetToken('/* testSimpleAssignment */', T_VARIABLE); + $found = self::$phpcsFile->findEndOfStatement($start); + + $this->assertSame(($start + 5), $found); + + }//end testSimpleAssignment() + + + /** + * Test a direct call to a control structure. + * + * @return void + */ + public function testControlStructure() + { + $start = $this->getTargetToken('/* testControlStructure */', T_WHILE); + $found = self::$phpcsFile->findEndOfStatement($start); + + $this->assertSame(($start + 6), $found); + + }//end testControlStructure() + + + /** + * Test the assignment of a closure. + * + * @return void + */ + public function testClosureAssignment() + { + $start = $this->getTargetToken('/* testClosureAssignment */', T_VARIABLE, '$a'); + $found = self::$phpcsFile->findEndOfStatement($start); + + $this->assertSame(($start + 13), $found); + + }//end testClosureAssignment() + + + /** + * Test using a heredoc in a function argument. + * + * @return void + */ + public function testHeredocFunctionArg() + { + // Find the end of the function. + $start = $this->getTargetToken('/* testHeredocFunctionArg */', T_STRING, 'myFunction'); + $found = self::$phpcsFile->findEndOfStatement($start); + + $this->assertSame(($start + 10), $found); + + // Find the end of the heredoc. + $start += 2; + $found = self::$phpcsFile->findEndOfStatement($start); + + $this->assertSame(($start + 4), $found); + + // Find the end of the last arg. + $start = ($found + 2); + $found = self::$phpcsFile->findEndOfStatement($start); + + $this->assertSame($start, $found); + + }//end testHeredocFunctionArg() + + + /** + * Test parts of a switch statement. + * + * @return void + */ + public function testSwitch() + { + // Find the end of the switch. + $start = $this->getTargetToken('/* testSwitch */', T_SWITCH); + $found = self::$phpcsFile->findEndOfStatement($start); + + $this->assertSame(($start + 28), $found); + + // Find the end of the case. + $start += 9; + $found = self::$phpcsFile->findEndOfStatement($start); + + $this->assertSame(($start + 8), $found); + + // Find the end of default case. + $start += 11; + $found = self::$phpcsFile->findEndOfStatement($start); + + $this->assertSame(($start + 6), $found); + + }//end testSwitch() + + + /** + * Test statements that are array values. + * + * @return void + */ + public function testStatementAsArrayValue() + { + // Test short array syntax. + $start = $this->getTargetToken('/* testStatementAsArrayValue */', T_NEW); + $found = self::$phpcsFile->findEndOfStatement($start); + + $this->assertSame(($start + 2), $found); + + // Test long array syntax. + $start += 12; + $found = self::$phpcsFile->findEndOfStatement($start); + + $this->assertSame(($start + 2), $found); + + // Test same statement outside of array. + $start += 10; + $found = self::$phpcsFile->findEndOfStatement($start); + + $this->assertSame(($start + 3), $found); + + }//end testStatementAsArrayValue() + + + /** + * Test a use group. + * + * @return void + */ + public function testUseGroup() + { + $start = $this->getTargetToken('/* testUseGroup */', T_USE); + $found = self::$phpcsFile->findEndOfStatement($start); + + $this->assertSame(($start + 23), $found); + + }//end testUseGroup() + + + /** + * Test arrow function as array value. + * + * @return void + */ + public function testArrowFunctionArrayValue() + { + $start = $this->getTargetToken('/* testArrowFunctionArrayValue */', T_FN); + $found = self::$phpcsFile->findEndOfStatement($start); + + $this->assertSame(($start + 9), $found); + + }//end testArrowFunctionArrayValue() + + + /** + * Test static arrow function. + * + * @return void + */ + public function testStaticArrowFunction() + { + $static = $this->getTargetToken('/* testStaticArrowFunction */', T_STATIC); + $fn = $this->getTargetToken('/* testStaticArrowFunction */', T_FN); + + $endOfStatementStatic = self::$phpcsFile->findEndOfStatement($static); + $endOfStatementFn = self::$phpcsFile->findEndOfStatement($fn); + + $this->assertSame($endOfStatementFn, $endOfStatementStatic); + + }//end testStaticArrowFunction() + + + /** + * Test arrow function with return value. + * + * @return void + */ + public function testArrowFunctionReturnValue() + { + $start = $this->getTargetToken('/* testArrowFunctionReturnValue */', T_FN); + $found = self::$phpcsFile->findEndOfStatement($start); + + $this->assertSame(($start + 18), $found); + + }//end testArrowFunctionReturnValue() + + + /** + * Test arrow function used as a function argument. + * + * @return void + */ + public function testArrowFunctionAsArgument() + { + $start = $this->getTargetToken('/* testArrowFunctionAsArgument */', T_FN); + $found = self::$phpcsFile->findEndOfStatement($start); + + $this->assertSame(($start + 8), $found); + + }//end testArrowFunctionAsArgument() + + + /** + * Test arrow function with arrays used as a function argument. + * + * @return void + */ + public function testArrowFunctionWithArrayAsArgument() + { + $start = $this->getTargetToken('/* testArrowFunctionWithArrayAsArgument */', T_FN); + $found = self::$phpcsFile->findEndOfStatement($start); + + $this->assertSame(($start + 17), $found); + + }//end testArrowFunctionWithArrayAsArgument() + + + /** + * Test simple match expression case. + * + * @return void + */ + public function testMatchCase() + { + $start = $this->getTargetToken('/* testMatchCase */', T_LNUMBER); + $found = self::$phpcsFile->findEndOfStatement($start); + + $this->assertSame(($start + 5), $found); + + $start = $this->getTargetToken('/* testMatchCase */', T_CONSTANT_ENCAPSED_STRING); + $found = self::$phpcsFile->findEndOfStatement($start); + + $this->assertSame(($start + 1), $found); + + }//end testMatchCase() + + + /** + * Test simple match expression default case. + * + * @return void + */ + public function testMatchDefault() + { + $start = $this->getTargetToken('/* testMatchDefault */', T_MATCH_DEFAULT); + $found = self::$phpcsFile->findEndOfStatement($start); + + $this->assertSame(($start + 4), $found); + + $start = $this->getTargetToken('/* testMatchDefault */', T_CONSTANT_ENCAPSED_STRING); + $found = self::$phpcsFile->findEndOfStatement($start); + + $this->assertSame($start, $found); + + }//end testMatchDefault() + + + /** + * Test multiple comma-separated match expression case values. + * + * @return void + */ + public function testMatchMultipleCase() + { + $start = $this->getTargetToken('/* testMatchMultipleCase */', T_LNUMBER); + $found = self::$phpcsFile->findEndOfStatement($start); + $this->assertSame(($start + 13), $found); + + $start += 6; + $found = self::$phpcsFile->findEndOfStatement($start); + $this->assertSame(($start + 7), $found); + + }//end testMatchMultipleCase() + + + /** + * Test match expression default case with trailing comma. + * + * @return void + */ + public function testMatchDefaultComma() + { + $start = $this->getTargetToken('/* testMatchDefaultComma */', T_MATCH_DEFAULT); + $found = self::$phpcsFile->findEndOfStatement($start); + + $this->assertSame(($start + 5), $found); + + }//end testMatchDefaultComma() + + + /** + * Test match expression with function call. + * + * @return void + */ + public function testMatchFunctionCall() + { + $start = $this->getTargetToken('/* testMatchFunctionCall */', T_STRING); + $found = self::$phpcsFile->findEndOfStatement($start); + + $this->assertSame(($start + 12), $found); + + $start += 8; + $found = self::$phpcsFile->findEndOfStatement($start); + + $this->assertSame(($start + 1), $found); + + }//end testMatchFunctionCall() + + + /** + * Test match expression with function call in the arm. + * + * @return void + */ + public function testMatchFunctionCallArm() + { + // Check the first case. + $start = $this->getTargetToken('/* testMatchFunctionCallArm */', T_STRING); + $found = self::$phpcsFile->findEndOfStatement($start); + + $this->assertSame(($start + 21), $found); + + // Check the second case. + $start += 24; + $found = self::$phpcsFile->findEndOfStatement($start); + + $this->assertSame(($start + 21), $found); + + }//end testMatchFunctionCallArm() + + + /** + * Test match expression with closure. + * + * @return void + */ + public function testMatchClosure() + { + $start = $this->getTargetToken('/* testMatchClosure */', T_LNUMBER); + $found = self::$phpcsFile->findEndOfStatement($start); + + $this->assertSame(($start + 14), $found); + + $start += 17; + $found = self::$phpcsFile->findEndOfStatement($start); + + $this->assertSame(($start + 14), $found); + + }//end testMatchClosure() + + + /** + * Test match expression with array declaration. + * + * @return void + */ + public function testMatchArray() + { + $start = $this->getTargetToken('/* testMatchArray */', T_LNUMBER); + $found = self::$phpcsFile->findEndOfStatement($start); + + $this->assertSame(($start + 11), $found); + + $start += 14; + $found = self::$phpcsFile->findEndOfStatement($start); + + $this->assertSame(($start + 22), $found); + + }//end testMatchArray() + + + /** + * Test nested match expressions. + * + * @return void + */ + public function testNestedMatch() + { + $start = $this->getTargetToken('/* testNestedMatch */', T_LNUMBER); + $found = self::$phpcsFile->findEndOfStatement($start); + + $this->assertSame(($start + 30), $found); + + $start += 21; + $found = self::$phpcsFile->findEndOfStatement($start); + + $this->assertSame(($start + 5), $found); + + }//end testNestedMatch() + + +}//end class diff --git a/vendor/squizlabs/php_codesniffer/tests/Core/File/FindExtendedClassNameTest.inc b/vendor/squizlabs/php_codesniffer/tests/Core/File/FindExtendedClassNameTest.inc new file mode 100644 index 00000000..aead06cd --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/tests/Core/File/FindExtendedClassNameTest.inc @@ -0,0 +1,37 @@ + + * @copyright 2006-2015 Squiz Pty Ltd (ABN 77 084 670 600) + * @license https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence + */ + +namespace PHP_CodeSniffer\Tests\Core\File; + +use PHP_CodeSniffer\Tests\Core\AbstractMethodUnitTest; + +class FindExtendedClassNameTest extends AbstractMethodUnitTest +{ + + + /** + * Test retrieving the name of the class being extended by another class + * (or interface). + * + * @param string $identifier Comment which precedes the test case. + * @param bool $expected Expected function output. + * + * @dataProvider dataExtendedClass + * + * @return void + */ + public function testFindExtendedClassName($identifier, $expected) + { + $OOToken = $this->getTargetToken($identifier, [T_CLASS, T_ANON_CLASS, T_INTERFACE]); + $result = self::$phpcsFile->findExtendedClassName($OOToken); + $this->assertSame($expected, $result); + + }//end testFindExtendedClassName() + + + /** + * Data provider for the FindExtendedClassName test. + * + * @see testFindExtendedClassName() + * + * @return array + */ + public function dataExtendedClass() + { + return [ + [ + '/* testExtendedClass */', + 'testFECNClass', + ], + [ + '/* testNamespacedClass */', + '\PHP_CodeSniffer\Tests\Core\File\testFECNClass', + ], + [ + '/* testNonExtendedClass */', + false, + ], + [ + '/* testInterface */', + false, + ], + [ + '/* testInterfaceThatExtendsInterface */', + 'testFECNInterface', + ], + [ + '/* testInterfaceThatExtendsFQCNInterface */', + '\PHP_CodeSniffer\Tests\Core\File\testFECNInterface', + ], + [ + '/* testNestedExtendedClass */', + false, + ], + [ + '/* testNestedExtendedAnonClass */', + 'testFECNAnonClass', + ], + [ + '/* testClassThatExtendsAndImplements */', + 'testFECNClass', + ], + [ + '/* testClassThatImplementsAndExtends */', + 'testFECNClass', + ], + ]; + + }//end dataExtendedClass() + + +}//end class diff --git a/vendor/squizlabs/php_codesniffer/tests/Core/File/FindImplementedInterfaceNamesTest.inc b/vendor/squizlabs/php_codesniffer/tests/Core/File/FindImplementedInterfaceNamesTest.inc new file mode 100644 index 00000000..3885b27e --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/tests/Core/File/FindImplementedInterfaceNamesTest.inc @@ -0,0 +1,26 @@ + + * @copyright 2006-2015 Squiz Pty Ltd (ABN 77 084 670 600) + * @license https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence + */ + +namespace PHP_CodeSniffer\Tests\Core\File; + +use PHP_CodeSniffer\Tests\Core\AbstractMethodUnitTest; + +class FindImplementedInterfaceNamesTest extends AbstractMethodUnitTest +{ + + + /** + * Test retrieving the name(s) of the interfaces being implemented by a class. + * + * @param string $identifier Comment which precedes the test case. + * @param bool $expected Expected function output. + * + * @dataProvider dataImplementedInterface + * + * @return void + */ + public function testFindImplementedInterfaceNames($identifier, $expected) + { + $OOToken = $this->getTargetToken($identifier, [T_CLASS, T_ANON_CLASS, T_INTERFACE]); + $result = self::$phpcsFile->findImplementedInterfaceNames($OOToken); + $this->assertSame($expected, $result); + + }//end testFindImplementedInterfaceNames() + + + /** + * Data provider for the FindImplementedInterfaceNames test. + * + * @see testFindImplementedInterfaceNames() + * + * @return array + */ + public function dataImplementedInterface() + { + return [ + [ + '/* testImplementedClass */', + ['testFIINInterface'], + ], + [ + '/* testMultiImplementedClass */', + [ + 'testFIINInterface', + 'testFIINInterface2', + ], + ], + [ + '/* testNamespacedClass */', + ['\PHP_CodeSniffer\Tests\Core\File\testFIINInterface'], + ], + [ + '/* testNonImplementedClass */', + false, + ], + [ + '/* testInterface */', + false, + ], + [ + '/* testClassThatExtendsAndImplements */', + [ + 'InterfaceA', + '\NameSpaced\Cat\InterfaceB', + ], + ], + [ + '/* testClassThatImplementsAndExtends */', + [ + '\InterfaceA', + 'InterfaceB', + ], + ], + ]; + + }//end dataImplementedInterface() + + +}//end class diff --git a/vendor/squizlabs/php_codesniffer/tests/Core/File/FindStartOfStatementTest.inc b/vendor/squizlabs/php_codesniffer/tests/Core/File/FindStartOfStatementTest.inc new file mode 100644 index 00000000..ce9dfad3 --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/tests/Core/File/FindStartOfStatementTest.inc @@ -0,0 +1,123 @@ + $foo + $bar, 'b' => true]; + +/* testUseGroup */ +use Vendor\Package\{ClassA as A, ClassB, ClassC as C}; + +$a = [ + /* testArrowFunctionArrayValue */ + 'a' => fn() => return 1, + 'b' => fn() => return 1, +]; + +/* testStaticArrowFunction */ +static fn ($a) => $a; + +/* testArrowFunctionReturnValue */ +fn(): array => [a($a, $b)]; + +/* testArrowFunctionAsArgument */ +$foo = foo( + fn() => bar() +); + +/* testArrowFunctionWithArrayAsArgument */ +$foo = foo( + fn() => [$row[0], $row[3]] +); + +$match = match ($a) { + /* testMatchCase */ + 1 => 'foo', + /* testMatchDefault */ + default => 'bar' +}; + +$match = match ($a) { + /* testMatchMultipleCase */ + 1, 2, => $a * $b, + /* testMatchDefaultComma */ + default, => 'something' +}; + +match ($pressedKey) { + /* testMatchFunctionCall */ + Key::RETURN_ => save($value, $user) +}; + +$result = match (true) { + /* testMatchFunctionCallArm */ + str_contains($text, 'Welcome') || str_contains($text, 'Hello') => 'en', + str_contains($text, 'Bienvenue') || str_contains($text, 'Bonjour') => 'fr', + default => 'pl' +}; + +/* testMatchClosure */ +$result = match ($key) { + 1 => function($a, $b) {}, + 2 => function($b, $c) {}, +}; + +/* testMatchArray */ +$result = match ($key) { + 1 => [1,2,3], + 2 => [1 => one($a, $b), 2 => two($b, $c)], + 3 => [], +}; + +/* testNestedMatch */ +$result = match ($key) { + 1 => match ($key) { + 1 => 'one', + 2 => 'two', + }, + 2 => match ($key) { + 1 => 'two', + 2 => 'one', + }, +}; + +return 0; + +/* testOpenTag */ +?> +

    Test

    +', foo(), ''; + +/* testOpenTagWithEcho */ +?> +

    Test

    +', foo(), ''; diff --git a/vendor/squizlabs/php_codesniffer/tests/Core/File/FindStartOfStatementTest.php b/vendor/squizlabs/php_codesniffer/tests/Core/File/FindStartOfStatementTest.php new file mode 100644 index 00000000..464021f6 --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/tests/Core/File/FindStartOfStatementTest.php @@ -0,0 +1,503 @@ + + * @copyright 2006-2015 Squiz Pty Ltd (ABN 77 084 670 600) + * @license https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence + */ + +namespace PHP_CodeSniffer\Tests\Core\File; + +use PHP_CodeSniffer\Tests\Core\AbstractMethodUnitTest; + +class FindStartOfStatementTest extends AbstractMethodUnitTest +{ + + + /** + * Test a simple assignment. + * + * @return void + */ + public function testSimpleAssignment() + { + $start = $this->getTargetToken('/* testSimpleAssignment */', T_SEMICOLON); + $found = self::$phpcsFile->findStartOfStatement($start); + + $this->assertSame(($start - 5), $found); + + }//end testSimpleAssignment() + + + /** + * Test a function call. + * + * @return void + */ + public function testFunctionCall() + { + $start = $this->getTargetToken('/* testFunctionCall */', T_CLOSE_PARENTHESIS); + $found = self::$phpcsFile->findStartOfStatement($start); + + $this->assertSame(($start - 6), $found); + + }//end testFunctionCall() + + + /** + * Test a function call. + * + * @return void + */ + public function testFunctionCallArgument() + { + $start = $this->getTargetToken('/* testFunctionCallArgument */', T_VARIABLE, '$b'); + $found = self::$phpcsFile->findStartOfStatement($start); + + $this->assertSame($start, $found); + + }//end testFunctionCallArgument() + + + /** + * Test a direct call to a control structure. + * + * @return void + */ + public function testControlStructure() + { + $start = $this->getTargetToken('/* testControlStructure */', T_CLOSE_CURLY_BRACKET); + $found = self::$phpcsFile->findStartOfStatement($start); + + $this->assertSame(($start - 6), $found); + + }//end testControlStructure() + + + /** + * Test the assignment of a closure. + * + * @return void + */ + public function testClosureAssignment() + { + $start = $this->getTargetToken('/* testClosureAssignment */', T_CLOSE_CURLY_BRACKET); + $found = self::$phpcsFile->findStartOfStatement($start); + + $this->assertSame(($start - 12), $found); + + }//end testClosureAssignment() + + + /** + * Test using a heredoc in a function argument. + * + * @return void + */ + public function testHeredocFunctionArg() + { + // Find the start of the function. + $start = $this->getTargetToken('/* testHeredocFunctionArg */', T_SEMICOLON); + $found = self::$phpcsFile->findStartOfStatement($start); + + $this->assertSame(($start - 10), $found); + + // Find the start of the heredoc. + $start -= 4; + $found = self::$phpcsFile->findStartOfStatement($start); + + $this->assertSame(($start - 4), $found); + + // Find the start of the last arg. + $start += 2; + $found = self::$phpcsFile->findStartOfStatement($start); + + $this->assertSame($start, $found); + + }//end testHeredocFunctionArg() + + + /** + * Test parts of a switch statement. + * + * @return void + */ + public function testSwitch() + { + // Find the start of the switch. + $start = $this->getTargetToken('/* testSwitch */', T_CLOSE_CURLY_BRACKET); + $found = self::$phpcsFile->findStartOfStatement($start); + + $this->assertSame(($start - 47), $found); + + // Find the start of default case. + $start -= 5; + $found = self::$phpcsFile->findStartOfStatement($start); + + $this->assertSame(($start - 6), $found); + + // Find the start of the second case. + $start -= 12; + $found = self::$phpcsFile->findStartOfStatement($start); + + $this->assertSame(($start - 5), $found); + + // Find the start of the first case. + $start -= 13; + $found = self::$phpcsFile->findStartOfStatement($start); + + $this->assertSame(($start - 8), $found); + + // Test inside the first case. + $start--; + $found = self::$phpcsFile->findStartOfStatement($start); + + $this->assertSame(($start - 1), $found); + + }//end testSwitch() + + + /** + * Test statements that are array values. + * + * @return void + */ + public function testStatementAsArrayValue() + { + // Test short array syntax. + $start = $this->getTargetToken('/* testStatementAsArrayValue */', T_STRING, 'Datetime'); + $found = self::$phpcsFile->findStartOfStatement($start); + + $this->assertSame(($start - 2), $found); + + // Test long array syntax. + $start += 12; + $found = self::$phpcsFile->findStartOfStatement($start); + + $this->assertSame(($start - 2), $found); + + // Test same statement outside of array. + $start++; + $found = self::$phpcsFile->findStartOfStatement($start); + + $this->assertSame(($start - 9), $found); + + // Test with an array index. + $start += 17; + $found = self::$phpcsFile->findStartOfStatement($start); + + $this->assertSame(($start - 5), $found); + + }//end testStatementAsArrayValue() + + + /** + * Test a use group. + * + * @return void + */ + public function testUseGroup() + { + $start = $this->getTargetToken('/* testUseGroup */', T_SEMICOLON); + $found = self::$phpcsFile->findStartOfStatement($start); + + $this->assertSame(($start - 23), $found); + + }//end testUseGroup() + + + /** + * Test arrow function as array value. + * + * @return void + */ + public function testArrowFunctionArrayValue() + { + $start = $this->getTargetToken('/* testArrowFunctionArrayValue */', T_COMMA); + $found = self::$phpcsFile->findStartOfStatement($start); + + $this->assertSame(($start - 9), $found); + + }//end testArrowFunctionArrayValue() + + + /** + * Test static arrow function. + * + * @return void + */ + public function testStaticArrowFunction() + { + $start = $this->getTargetToken('/* testStaticArrowFunction */', T_SEMICOLON); + $found = self::$phpcsFile->findStartOfStatement($start); + + $this->assertSame(($start - 11), $found); + + }//end testStaticArrowFunction() + + + /** + * Test arrow function with return value. + * + * @return void + */ + public function testArrowFunctionReturnValue() + { + $start = $this->getTargetToken('/* testArrowFunctionReturnValue */', T_SEMICOLON); + $found = self::$phpcsFile->findStartOfStatement($start); + + $this->assertSame(($start - 18), $found); + + }//end testArrowFunctionReturnValue() + + + /** + * Test arrow function used as a function argument. + * + * @return void + */ + public function testArrowFunctionAsArgument() + { + $start = $this->getTargetToken('/* testArrowFunctionAsArgument */', T_FN); + $start += 8; + $found = self::$phpcsFile->findStartOfStatement($start); + + $this->assertSame(($start - 8), $found); + + }//end testArrowFunctionAsArgument() + + + /** + * Test arrow function with arrays used as a function argument. + * + * @return void + */ + public function testArrowFunctionWithArrayAsArgument() + { + $start = $this->getTargetToken('/* testArrowFunctionWithArrayAsArgument */', T_FN); + $start += 17; + $found = self::$phpcsFile->findStartOfStatement($start); + + $this->assertSame(($start - 17), $found); + + }//end testArrowFunctionWithArrayAsArgument() + + + /** + * Test simple match expression case. + * + * @return void + */ + public function testMatchCase() + { + $start = $this->getTargetToken('/* testMatchCase */', T_COMMA); + $found = self::$phpcsFile->findStartOfStatement($start); + + $this->assertSame(($start - 1), $found); + + }//end testMatchCase() + + + /** + * Test simple match expression default case. + * + * @return void + */ + public function testMatchDefault() + { + $start = $this->getTargetToken('/* testMatchDefault */', T_CONSTANT_ENCAPSED_STRING, "'bar'"); + $found = self::$phpcsFile->findStartOfStatement($start); + + $this->assertSame($start, $found); + + }//end testMatchDefault() + + + /** + * Test multiple comma-separated match expression case values. + * + * @return void + */ + public function testMatchMultipleCase() + { + $start = $this->getTargetToken('/* testMatchMultipleCase */', T_MATCH_ARROW); + $found = self::$phpcsFile->findStartOfStatement($start); + + $this->assertSame(($start - 6), $found); + + $start += 6; + $found = self::$phpcsFile->findStartOfStatement($start); + + $this->assertSame(($start - 4), $found); + + }//end testMatchMultipleCase() + + + /** + * Test match expression default case with trailing comma. + * + * @return void + */ + public function testMatchDefaultComma() + { + $start = $this->getTargetToken('/* testMatchDefaultComma */', T_MATCH_ARROW); + $found = self::$phpcsFile->findStartOfStatement($start); + + $this->assertSame(($start - 3), $found); + + $start += 2; + $found = self::$phpcsFile->findStartOfStatement($start); + + $this->assertSame($start, $found); + + }//end testMatchDefaultComma() + + + /** + * Test match expression with function call. + * + * @return void + */ + public function testMatchFunctionCall() + { + $start = $this->getTargetToken('/* testMatchFunctionCall */', T_CLOSE_PARENTHESIS); + $found = self::$phpcsFile->findStartOfStatement($start); + + $this->assertSame(($start - 6), $found); + + }//end testMatchFunctionCall() + + + /** + * Test match expression with function call in the arm. + * + * @return void + */ + public function testMatchFunctionCallArm() + { + // Check the first case. + $start = $this->getTargetToken('/* testMatchFunctionCallArm */', T_MATCH_ARROW); + $found = self::$phpcsFile->findStartOfStatement($start); + + $this->assertSame(($start - 18), $found); + + // Check the second case. + $start += 24; + $found = self::$phpcsFile->findStartOfStatement($start); + + $this->assertSame(($start - 18), $found); + + }//end testMatchFunctionCallArm() + + + /** + * Test match expression with closure. + * + * @return void + */ + public function testMatchClosure() + { + $start = $this->getTargetToken('/* testMatchClosure */', T_LNUMBER); + $start += 14; + $found = self::$phpcsFile->findStartOfStatement($start); + + $this->assertSame(($start - 10), $found); + + $start += 17; + $found = self::$phpcsFile->findStartOfStatement($start); + + $this->assertSame(($start - 10), $found); + + }//end testMatchClosure() + + + /** + * Test match expression with array declaration. + * + * @return void + */ + public function testMatchArray() + { + // Start of first case statement. + $start = $this->getTargetToken('/* testMatchArray */', T_LNUMBER); + $found = self::$phpcsFile->findStartOfStatement($start); + $this->assertSame($start, $found); + + // Comma after first statement. + $start += 11; + $found = self::$phpcsFile->findStartOfStatement($start); + $this->assertSame(($start - 7), $found); + + // Start of second case statement. + $start += 3; + $found = self::$phpcsFile->findStartOfStatement($start); + $this->assertSame($start, $found); + + // Comma after first statement. + $start += 30; + $found = self::$phpcsFile->findStartOfStatement($start); + $this->assertSame(($start - 26), $found); + + }//end testMatchArray() + + + /** + * Test nested match expressions. + * + * @return void + */ + public function testNestedMatch() + { + $start = $this->getTargetToken('/* testNestedMatch */', T_LNUMBER); + $start += 30; + $found = self::$phpcsFile->findStartOfStatement($start); + + $this->assertSame(($start - 26), $found); + + $start -= 4; + $found = self::$phpcsFile->findStartOfStatement($start); + + $this->assertSame(($start - 1), $found); + + $start -= 3; + $found = self::$phpcsFile->findStartOfStatement($start); + + $this->assertSame(($start - 2), $found); + + }//end testNestedMatch() + + + /** + * Test nested match expressions. + * + * @return void + */ + public function testOpenTag() + { + $start = $this->getTargetToken('/* testOpenTag */', T_OPEN_TAG); + $start += 2; + $found = self::$phpcsFile->findStartOfStatement($start); + + $this->assertSame(($start - 1), $found); + + }//end testOpenTag() + + + /** + * Test nested match expressions. + * + * @return void + */ + public function testOpenTagWithEcho() + { + $start = $this->getTargetToken('/* testOpenTagWithEcho */', T_OPEN_TAG_WITH_ECHO); + $start += 3; + $found = self::$phpcsFile->findStartOfStatement($start); + + $this->assertSame(($start - 1), $found); + + }//end testOpenTagWithEcho() + + +}//end class diff --git a/vendor/squizlabs/php_codesniffer/tests/Core/File/GetMemberPropertiesTest.inc b/vendor/squizlabs/php_codesniffer/tests/Core/File/GetMemberPropertiesTest.inc new file mode 100644 index 00000000..ea47e9fc --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/tests/Core/File/GetMemberPropertiesTest.inc @@ -0,0 +1,258 @@ + 'a', 'b' => 'b' ), + /* testGroupPrivate 3 */ + $varQ = 'string', + /* testGroupPrivate 4 */ + $varR = 123, + /* testGroupPrivate 5 */ + $varS = ONE / self::THREE, + /* testGroupPrivate 6 */ + $varT = [ + 'a' => 'a', + 'b' => 'b' + ], + /* testGroupPrivate 7 */ + $varU = __DIR__ . "/base"; + + + /* testMethodParam */ + public function methodName($param) { + /* testImportedGlobal */ + global $importedGlobal = true; + + /* testLocalVariable */ + $localVariable = true; + } + + /* testPropertyAfterMethod */ + private static $varV = true; + + /* testMessyNullableType */ + public /* comment + */ ? //comment + array $foo = []; + + /* testNamespaceType */ + public \MyNamespace\MyClass $foo; + + /* testNullableNamespaceType 1 */ + private ?ClassName $nullableClassType; + + /* testNullableNamespaceType 2 */ + protected ?Folder\ClassName $nullableClassType2; + + /* testMultilineNamespaceType */ + public \MyNamespace /** comment *\/ comment */ + \MyClass /* comment */ + \Foo $foo; + +} + +interface Base +{ + /* testInterfaceProperty */ + protected $anonymous; +} + +/* testGlobalVariable */ +$globalVariable = true; + +/* testNotAVariable */ +return; + +$a = ( $foo == $bar ? new stdClass() : + new class() { + /* testNestedProperty 1 */ + public $var = true; + + /* testNestedMethodParam 1 */ + public function something($var = false) {} + } +); + +function_call( 'param', new class { + /* testNestedProperty 2 */ + public $year = 2017; + + /* testNestedMethodParam 2 */ + public function __construct( $open, $post_id ) {} +}, 10, 2 ); + +class PHP8Mixed { + /* testPHP8MixedTypeHint */ + public static miXed $mixed; + + /* testPHP8MixedTypeHintNullable */ + // Intentional fatal error - nullability is not allowed with mixed, but that's not the concern of the method. + private ?mixed $nullableMixed; +} + +class NSOperatorInType { + /* testNamespaceOperatorTypeHint */ + public ?namespace\Name $prop; +} + +$anon = class() { + /* testPHP8UnionTypesSimple */ + public int|float $unionTypeSimple; + + /* testPHP8UnionTypesTwoClasses */ + private MyClassA|\Package\MyClassB $unionTypesTwoClasses; + + /* testPHP8UnionTypesAllBaseTypes */ + protected array|bool|int|float|NULL|object|string $unionTypesAllBaseTypes; + + /* testPHP8UnionTypesAllPseudoTypes */ + // Intentional fatal error - mixing types which cannot be combined, but that's not the concern of the method. + var false|mixed|self|parent|iterable|Resource $unionTypesAllPseudoTypes; + + /* testPHP8UnionTypesIllegalTypes */ + // Intentional fatal error - types which are not allowed for properties, but that's not the concern of the method. + public callable|static|void $unionTypesIllegalTypes; + + /* testPHP8UnionTypesNullable */ + // Intentional fatal error - nullability is not allowed with union types, but that's not the concern of the method. + public ?int|float $unionTypesNullable; + + /* testPHP8PseudoTypeNull */ + // Intentional fatal error - null pseudotype is only allowed in union types, but that's not the concern of the method. + public null $pseudoTypeNull; + + /* testPHP8PseudoTypeFalse */ + // Intentional fatal error - false pseudotype is only allowed in union types, but that's not the concern of the method. + public false $pseudoTypeFalse; + + /* testPHP8PseudoTypeFalseAndBool */ + // Intentional fatal error - false pseudotype is not allowed in combination with bool, but that's not the concern of the method. + public bool|FALSE $pseudoTypeFalseAndBool; + + /* testPHP8ObjectAndClass */ + // Intentional fatal error - object is not allowed in combination with class name, but that's not the concern of the method. + public object|ClassName $objectAndClass; + + /* testPHP8PseudoTypeIterableAndArray */ + // Intentional fatal error - iterable pseudotype is not allowed in combination with array or Traversable, but that's not the concern of the method. + public iterable|array|Traversable $pseudoTypeIterableAndArray; + + /* testPHP8DuplicateTypeInUnionWhitespaceAndComment */ + // Intentional fatal error - duplicate types are not allowed in union types, but that's not the concern of the method. + public int |string| /*comment*/ INT $duplicateTypeInUnion; +}; + +$anon = class { + /* testPHP8PropertySingleAttribute */ + #[PropertyWithAttribute] + public string $foo; + + /* testPHP8PropertyMultipleAttributes */ + #[PropertyWithAttribute(foo: 'bar'), MyAttribute] + protected ?int|float $bar; + + /* testPHP8PropertyMultilineAttribute */ + #[ + PropertyWithAttribute(/* comment */ 'baz') + ] + private mixed $baz; +}; diff --git a/vendor/squizlabs/php_codesniffer/tests/Core/File/GetMemberPropertiesTest.php b/vendor/squizlabs/php_codesniffer/tests/Core/File/GetMemberPropertiesTest.php new file mode 100644 index 00000000..0af04379 --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/tests/Core/File/GetMemberPropertiesTest.php @@ -0,0 +1,705 @@ + + * @copyright 2006-2015 Squiz Pty Ltd (ABN 77 084 670 600) + * @license https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence + */ + +namespace PHP_CodeSniffer\Tests\Core\File; + +use PHP_CodeSniffer\Tests\Core\AbstractMethodUnitTest; + +class GetMemberPropertiesTest extends AbstractMethodUnitTest +{ + + + /** + * Test the getMemberProperties() method. + * + * @param string $identifier Comment which precedes the test case. + * @param bool $expected Expected function output. + * + * @dataProvider dataGetMemberProperties + * + * @return void + */ + public function testGetMemberProperties($identifier, $expected) + { + $variable = $this->getTargetToken($identifier, T_VARIABLE); + $result = self::$phpcsFile->getMemberProperties($variable); + + $this->assertArraySubset($expected, $result, true); + + }//end testGetMemberProperties() + + + /** + * Data provider for the GetMemberProperties test. + * + * @see testGetMemberProperties() + * + * @return array + */ + public function dataGetMemberProperties() + { + return [ + [ + '/* testVar */', + [ + 'scope' => 'public', + 'scope_specified' => false, + 'is_static' => false, + 'type' => '', + 'nullable_type' => false, + ], + ], + [ + '/* testVarType */', + [ + 'scope' => 'public', + 'scope_specified' => false, + 'is_static' => false, + 'type' => '?int', + 'nullable_type' => true, + ], + ], + [ + '/* testPublic */', + [ + 'scope' => 'public', + 'scope_specified' => true, + 'is_static' => false, + 'type' => '', + 'nullable_type' => false, + ], + ], + [ + '/* testPublicType */', + [ + 'scope' => 'public', + 'scope_specified' => true, + 'is_static' => false, + 'type' => 'string', + 'nullable_type' => false, + ], + ], + [ + '/* testProtected */', + [ + 'scope' => 'protected', + 'scope_specified' => true, + 'is_static' => false, + 'type' => '', + 'nullable_type' => false, + ], + ], + [ + '/* testProtectedType */', + [ + 'scope' => 'protected', + 'scope_specified' => true, + 'is_static' => false, + 'type' => 'bool', + 'nullable_type' => false, + ], + ], + [ + '/* testPrivate */', + [ + 'scope' => 'private', + 'scope_specified' => true, + 'is_static' => false, + 'type' => '', + 'nullable_type' => false, + ], + ], + [ + '/* testPrivateType */', + [ + 'scope' => 'private', + 'scope_specified' => true, + 'is_static' => false, + 'type' => 'array', + 'nullable_type' => false, + ], + ], + [ + '/* testStatic */', + [ + 'scope' => 'public', + 'scope_specified' => false, + 'is_static' => true, + 'type' => '', + 'nullable_type' => false, + ], + ], + [ + '/* testStaticType */', + [ + 'scope' => 'public', + 'scope_specified' => false, + 'is_static' => true, + 'type' => '?string', + 'nullable_type' => true, + ], + ], + [ + '/* testStaticVar */', + [ + 'scope' => 'public', + 'scope_specified' => false, + 'is_static' => true, + 'type' => '', + 'nullable_type' => false, + ], + ], + [ + '/* testVarStatic */', + [ + 'scope' => 'public', + 'scope_specified' => false, + 'is_static' => true, + 'type' => '', + 'nullable_type' => false, + ], + ], + [ + '/* testPublicStatic */', + [ + 'scope' => 'public', + 'scope_specified' => true, + 'is_static' => true, + 'type' => '', + 'nullable_type' => false, + ], + ], + [ + '/* testProtectedStatic */', + [ + 'scope' => 'protected', + 'scope_specified' => true, + 'is_static' => true, + 'type' => '', + 'nullable_type' => false, + ], + ], + [ + '/* testPrivateStatic */', + [ + 'scope' => 'private', + 'scope_specified' => true, + 'is_static' => true, + 'type' => '', + 'nullable_type' => false, + ], + ], + [ + '/* testPublicStaticWithDocblock */', + [ + 'scope' => 'public', + 'scope_specified' => true, + 'is_static' => true, + 'type' => '', + 'nullable_type' => false, + ], + ], + [ + '/* testProtectedStaticWithDocblock */', + [ + 'scope' => 'protected', + 'scope_specified' => true, + 'is_static' => true, + 'type' => '', + 'nullable_type' => false, + ], + ], + [ + '/* testPrivateStaticWithDocblock */', + [ + 'scope' => 'private', + 'scope_specified' => true, + 'is_static' => true, + 'type' => '', + 'nullable_type' => false, + ], + ], + [ + '/* testGroupType 1 */', + [ + 'scope' => 'public', + 'scope_specified' => true, + 'is_static' => false, + 'type' => 'float', + 'nullable_type' => false, + ], + ], + [ + '/* testGroupType 2 */', + [ + 'scope' => 'public', + 'scope_specified' => true, + 'is_static' => false, + 'type' => 'float', + 'nullable_type' => false, + ], + ], + [ + '/* testGroupNullableType 1 */', + [ + 'scope' => 'public', + 'scope_specified' => true, + 'is_static' => true, + 'type' => '?string', + 'nullable_type' => true, + ], + ], + [ + '/* testGroupNullableType 2 */', + [ + 'scope' => 'public', + 'scope_specified' => true, + 'is_static' => true, + 'type' => '?string', + 'nullable_type' => true, + ], + ], + [ + '/* testNoPrefix */', + [ + 'scope' => 'public', + 'scope_specified' => false, + 'is_static' => false, + 'type' => '', + 'nullable_type' => false, + ], + ], + [ + '/* testGroupProtectedStatic 1 */', + [ + 'scope' => 'protected', + 'scope_specified' => true, + 'is_static' => true, + 'type' => '', + 'nullable_type' => false, + ], + ], + [ + '/* testGroupProtectedStatic 2 */', + [ + 'scope' => 'protected', + 'scope_specified' => true, + 'is_static' => true, + 'type' => '', + 'nullable_type' => false, + ], + ], + [ + '/* testGroupProtectedStatic 3 */', + [ + 'scope' => 'protected', + 'scope_specified' => true, + 'is_static' => true, + 'type' => '', + 'nullable_type' => false, + ], + ], + [ + '/* testGroupPrivate 1 */', + [ + 'scope' => 'private', + 'scope_specified' => true, + 'is_static' => false, + 'type' => '', + 'nullable_type' => false, + ], + ], + [ + '/* testGroupPrivate 2 */', + [ + 'scope' => 'private', + 'scope_specified' => true, + 'is_static' => false, + 'type' => '', + 'nullable_type' => false, + ], + ], + [ + '/* testGroupPrivate 3 */', + [ + 'scope' => 'private', + 'scope_specified' => true, + 'is_static' => false, + 'type' => '', + 'nullable_type' => false, + ], + ], + [ + '/* testGroupPrivate 4 */', + [ + 'scope' => 'private', + 'scope_specified' => true, + 'is_static' => false, + 'type' => '', + 'nullable_type' => false, + ], + ], + [ + '/* testGroupPrivate 5 */', + [ + 'scope' => 'private', + 'scope_specified' => true, + 'is_static' => false, + 'type' => '', + 'nullable_type' => false, + ], + ], + [ + '/* testGroupPrivate 6 */', + [ + 'scope' => 'private', + 'scope_specified' => true, + 'is_static' => false, + 'type' => '', + 'nullable_type' => false, + ], + ], + [ + '/* testGroupPrivate 7 */', + [ + 'scope' => 'private', + 'scope_specified' => true, + 'is_static' => false, + 'type' => '', + 'nullable_type' => false, + ], + ], + [ + '/* testMessyNullableType */', + [ + 'scope' => 'public', + 'scope_specified' => true, + 'is_static' => false, + 'type' => '?array', + 'nullable_type' => true, + ], + ], + [ + '/* testNamespaceType */', + [ + 'scope' => 'public', + 'scope_specified' => true, + 'is_static' => false, + 'type' => '\MyNamespace\MyClass', + 'nullable_type' => false, + ], + ], + [ + '/* testNullableNamespaceType 1 */', + [ + 'scope' => 'private', + 'scope_specified' => true, + 'is_static' => false, + 'type' => '?ClassName', + 'nullable_type' => true, + ], + ], + [ + '/* testNullableNamespaceType 2 */', + [ + 'scope' => 'protected', + 'scope_specified' => true, + 'is_static' => false, + 'type' => '?Folder\ClassName', + 'nullable_type' => true, + ], + ], + [ + '/* testMultilineNamespaceType */', + [ + 'scope' => 'public', + 'scope_specified' => true, + 'is_static' => false, + 'type' => '\MyNamespace\MyClass\Foo', + 'nullable_type' => false, + ], + ], + [ + '/* testPropertyAfterMethod */', + [ + 'scope' => 'private', + 'scope_specified' => true, + 'is_static' => true, + 'type' => '', + 'nullable_type' => false, + ], + ], + [ + '/* testInterfaceProperty */', + [], + ], + [ + '/* testNestedProperty 1 */', + [ + 'scope' => 'public', + 'scope_specified' => true, + 'is_static' => false, + 'type' => '', + 'nullable_type' => false, + ], + ], + [ + '/* testNestedProperty 2 */', + [ + 'scope' => 'public', + 'scope_specified' => true, + 'is_static' => false, + 'type' => '', + 'nullable_type' => false, + ], + ], + [ + '/* testPHP8MixedTypeHint */', + [ + 'scope' => 'public', + 'scope_specified' => true, + 'is_static' => true, + 'type' => 'miXed', + 'nullable_type' => false, + ], + ], + [ + '/* testPHP8MixedTypeHintNullable */', + [ + 'scope' => 'private', + 'scope_specified' => true, + 'is_static' => false, + 'type' => '?mixed', + 'nullable_type' => true, + ], + ], + [ + '/* testNamespaceOperatorTypeHint */', + [ + 'scope' => 'public', + 'scope_specified' => true, + 'is_static' => false, + 'type' => '?namespace\Name', + 'nullable_type' => true, + ], + ], + [ + '/* testPHP8UnionTypesSimple */', + [ + 'scope' => 'public', + 'scope_specified' => true, + 'is_static' => false, + 'type' => 'int|float', + 'nullable_type' => false, + ], + ], + [ + '/* testPHP8UnionTypesTwoClasses */', + [ + 'scope' => 'private', + 'scope_specified' => true, + 'is_static' => false, + 'type' => 'MyClassA|\Package\MyClassB', + 'nullable_type' => false, + ], + ], + [ + '/* testPHP8UnionTypesAllBaseTypes */', + [ + 'scope' => 'protected', + 'scope_specified' => true, + 'is_static' => false, + 'type' => 'array|bool|int|float|NULL|object|string', + 'nullable_type' => false, + ], + ], + [ + '/* testPHP8UnionTypesAllPseudoTypes */', + [ + 'scope' => 'public', + 'scope_specified' => false, + 'is_static' => false, + 'type' => 'false|mixed|self|parent|iterable|Resource', + 'nullable_type' => false, + ], + ], + [ + '/* testPHP8UnionTypesIllegalTypes */', + [ + 'scope' => 'public', + 'scope_specified' => true, + 'is_static' => false, + // Missing static, but that's OK as not an allowed syntax. + 'type' => 'callable||void', + 'nullable_type' => false, + ], + ], + [ + '/* testPHP8UnionTypesNullable */', + [ + 'scope' => 'public', + 'scope_specified' => true, + 'is_static' => false, + 'type' => '?int|float', + 'nullable_type' => true, + ], + ], + [ + '/* testPHP8PseudoTypeNull */', + [ + 'scope' => 'public', + 'scope_specified' => true, + 'is_static' => false, + 'type' => 'null', + 'nullable_type' => false, + ], + ], + [ + '/* testPHP8PseudoTypeFalse */', + [ + 'scope' => 'public', + 'scope_specified' => true, + 'is_static' => false, + 'type' => 'false', + 'nullable_type' => false, + ], + ], + [ + '/* testPHP8PseudoTypeFalseAndBool */', + [ + 'scope' => 'public', + 'scope_specified' => true, + 'is_static' => false, + 'type' => 'bool|FALSE', + 'nullable_type' => false, + ], + ], + [ + '/* testPHP8ObjectAndClass */', + [ + 'scope' => 'public', + 'scope_specified' => true, + 'is_static' => false, + 'type' => 'object|ClassName', + 'nullable_type' => false, + ], + ], + [ + '/* testPHP8PseudoTypeIterableAndArray */', + [ + 'scope' => 'public', + 'scope_specified' => true, + 'is_static' => false, + 'type' => 'iterable|array|Traversable', + 'nullable_type' => false, + ], + ], + [ + '/* testPHP8DuplicateTypeInUnionWhitespaceAndComment */', + [ + 'scope' => 'public', + 'scope_specified' => true, + 'is_static' => false, + 'type' => 'int|string|INT', + 'nullable_type' => false, + ], + ], + [ + '/* testPHP8PropertySingleAttribute */', + [ + 'scope' => 'public', + 'scope_specified' => true, + 'is_static' => false, + 'type' => 'string', + 'nullable_type' => false, + ], + ], + [ + '/* testPHP8PropertyMultipleAttributes */', + [ + 'scope' => 'protected', + 'scope_specified' => true, + 'is_static' => false, + 'type' => '?int|float', + 'nullable_type' => true, + ], + ], + [ + '/* testPHP8PropertyMultilineAttribute */', + [ + 'scope' => 'private', + 'scope_specified' => true, + 'is_static' => false, + 'type' => 'mixed', + 'nullable_type' => false, + ], + ], + ]; + + }//end dataGetMemberProperties() + + + /** + * Test receiving an expected exception when a non property is passed. + * + * @param string $identifier Comment which precedes the test case. + * + * @expectedException PHP_CodeSniffer\Exceptions\RuntimeException + * @expectedExceptionMessage $stackPtr is not a class member var + * + * @dataProvider dataNotClassProperty + * + * @return void + */ + public function testNotClassPropertyException($identifier) + { + $variable = $this->getTargetToken($identifier, T_VARIABLE); + $result = self::$phpcsFile->getMemberProperties($variable); + + }//end testNotClassPropertyException() + + + /** + * Data provider for the NotClassPropertyException test. + * + * @see testNotClassPropertyException() + * + * @return array + */ + public function dataNotClassProperty() + { + return [ + ['/* testMethodParam */'], + ['/* testImportedGlobal */'], + ['/* testLocalVariable */'], + ['/* testGlobalVariable */'], + ['/* testNestedMethodParam 1 */'], + ['/* testNestedMethodParam 2 */'], + ]; + + }//end dataNotClassProperty() + + + /** + * Test receiving an expected exception when a non variable is passed. + * + * @expectedException PHP_CodeSniffer\Exceptions\RuntimeException + * @expectedExceptionMessage $stackPtr must be of type T_VARIABLE + * + * @return void + */ + public function testNotAVariableException() + { + $next = $this->getTargetToken('/* testNotAVariable */', T_RETURN); + $result = self::$phpcsFile->getMemberProperties($next); + + }//end testNotAVariableException() + + +}//end class diff --git a/vendor/squizlabs/php_codesniffer/tests/Core/File/GetMethodParametersTest.inc b/vendor/squizlabs/php_codesniffer/tests/Core/File/GetMethodParametersTest.inc new file mode 100644 index 00000000..ed1762e7 --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/tests/Core/File/GetMethodParametersTest.inc @@ -0,0 +1,142 @@ + $b; + +/* testPHP8MixedTypeHint */ +function mixedTypeHint(mixed &...$var1) {} + +/* testPHP8MixedTypeHintNullable */ +// Intentional fatal error - nullability is not allowed with mixed, but that's not the concern of the method. +function mixedTypeHintNullable(?Mixed $var1) {} + +/* testNamespaceOperatorTypeHint */ +function namespaceOperatorTypeHint(?namespace\Name $var1) {} + +/* testPHP8UnionTypesSimple */ +function unionTypeSimple(int|float $number, self|parent &...$obj) {} + +/* testPHP8UnionTypesWithSpreadOperatorAndReference */ +function globalFunctionWithSpreadAndReference(float|null &$paramA, string|int ...$paramB) {} + +/* testPHP8UnionTypesSimpleWithBitwiseOrInDefault */ +$fn = fn(int|float $var = CONSTANT_A | CONSTANT_B) => $var; + +/* testPHP8UnionTypesTwoClasses */ +function unionTypesTwoClasses(MyClassA|\Package\MyClassB $var) {} + +/* testPHP8UnionTypesAllBaseTypes */ +function unionTypesAllBaseTypes(array|bool|callable|int|float|null|object|string $var) {} + +/* testPHP8UnionTypesAllPseudoTypes */ +// Intentional fatal error - mixing types which cannot be combined, but that's not the concern of the method. +function unionTypesAllPseudoTypes(false|mixed|self|parent|iterable|Resource $var) {} + +/* testPHP8UnionTypesNullable */ +// Intentional fatal error - nullability is not allowed with union types, but that's not the concern of the method. +$closure = function (?int|float $number) {}; + +/* testPHP8PseudoTypeNull */ +// Intentional fatal error - null pseudotype is only allowed in union types, but that's not the concern of the method. +function pseudoTypeNull(null $var = null) {} + +/* testPHP8PseudoTypeFalse */ +// Intentional fatal error - false pseudotype is only allowed in union types, but that's not the concern of the method. +function pseudoTypeFalse(false $var = false) {} + +/* testPHP8PseudoTypeFalseAndBool */ +// Intentional fatal error - false pseudotype is not allowed in combination with bool, but that's not the concern of the method. +function pseudoTypeFalseAndBool(bool|false $var = false) {} + +/* testPHP8ObjectAndClass */ +// Intentional fatal error - object is not allowed in combination with class name, but that's not the concern of the method. +function objectAndClass(object|ClassName $var) {} + +/* testPHP8PseudoTypeIterableAndArray */ +// Intentional fatal error - iterable pseudotype is not allowed in combination with array or Traversable, but that's not the concern of the method. +function pseudoTypeIterableAndArray(iterable|array|Traversable $var) {} + +/* testPHP8DuplicateTypeInUnionWhitespaceAndComment */ +// Intentional fatal error - duplicate types are not allowed in union types, but that's not the concern of the method. +function duplicateTypeInUnion( int | string /*comment*/ | INT $var) {} + +class ConstructorPropertyPromotionNoTypes { + /* testPHP8ConstructorPropertyPromotionNoTypes */ + public function __construct( + public $x = 0.0, + protected $y = '', + private $z = null, + ) {} +} + +class ConstructorPropertyPromotionWithTypes { + /* testPHP8ConstructorPropertyPromotionWithTypes */ + public function __construct(protected float|int $x, public ?string &$y = 'test', private mixed $z) {} +} + +class ConstructorPropertyPromotionAndNormalParams { + /* testPHP8ConstructorPropertyPromotionAndNormalParam */ + public function __construct(public int $promotedProp, ?int $normalArg) {} +} + +/* testPHP8ConstructorPropertyPromotionGlobalFunction */ +// Intentional fatal error. Property promotion not allowed in non-constructor, but that's not the concern of this method. +function globalFunction(private $x) {} + +abstract class ConstructorPropertyPromotionAbstractMethod { + /* testPHP8ConstructorPropertyPromotionAbstractMethod */ + // Intentional fatal error. + // 1. Property promotion not allowed in abstract method, but that's not the concern of this method. + // 2. Variadic arguments not allowed in property promotion, but that's not the concern of this method. + // 3. The callable type is not supported for properties, but that's not the concern of this method. + abstract public function __construct(public callable $y, private ...$x); +} + +/* testCommentsInParameter */ +function commentsInParams( + // Leading comment. + ?MyClass /*-*/ & /*-*/.../*-*/ $param /*-*/ = /*-*/ 'default value' . /*-*/ 'second part' // Trailing comment. +) {} + +/* testParameterAttributesInFunctionDeclaration */ +class ParametersWithAttributes( + public function __construct( + #[\MyExample\MyAttribute] private string $constructorPropPromTypedParamSingleAttribute, + #[MyAttr([1, 2])] + Type|false + $typedParamSingleAttribute, + #[MyAttribute(1234), MyAttribute(5678)] ?int $nullableTypedParamMultiAttribute, + #[WithoutArgument] #[SingleArgument(0)] $nonTypedParamTwoAttributes, + #[MyAttribute(array("key" => "value"))] + &...$otherParam, + ) {} +} diff --git a/vendor/squizlabs/php_codesniffer/tests/Core/File/GetMethodParametersTest.php b/vendor/squizlabs/php_codesniffer/tests/Core/File/GetMethodParametersTest.php new file mode 100644 index 00000000..e7692a71 --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/tests/Core/File/GetMethodParametersTest.php @@ -0,0 +1,969 @@ + + * @copyright 2006-2015 Squiz Pty Ltd (ABN 77 084 670 600) + * @license https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence + */ + +namespace PHP_CodeSniffer\Tests\Core\File; + +use PHP_CodeSniffer\Tests\Core\AbstractMethodUnitTest; + +class GetMethodParametersTest extends AbstractMethodUnitTest +{ + + + /** + * Verify pass-by-reference parsing. + * + * @return void + */ + public function testPassByReference() + { + $expected = []; + $expected[0] = [ + 'name' => '$var', + 'content' => '&$var', + 'has_attributes' => false, + 'pass_by_reference' => true, + 'variable_length' => false, + 'type_hint' => '', + 'nullable_type' => false, + ]; + + $this->getMethodParametersTestHelper('/* '.__FUNCTION__.' */', $expected); + + }//end testPassByReference() + + + /** + * Verify array hint parsing. + * + * @return void + */ + public function testArrayHint() + { + $expected = []; + $expected[0] = [ + 'name' => '$var', + 'content' => 'array $var', + 'has_attributes' => false, + 'pass_by_reference' => false, + 'variable_length' => false, + 'type_hint' => 'array', + 'nullable_type' => false, + ]; + + $this->getMethodParametersTestHelper('/* '.__FUNCTION__.' */', $expected); + + }//end testArrayHint() + + + /** + * Verify type hint parsing. + * + * @return void + */ + public function testTypeHint() + { + $expected = []; + $expected[0] = [ + 'name' => '$var1', + 'content' => 'foo $var1', + 'has_attributes' => false, + 'pass_by_reference' => false, + 'variable_length' => false, + 'type_hint' => 'foo', + 'nullable_type' => false, + ]; + + $expected[1] = [ + 'name' => '$var2', + 'content' => 'bar $var2', + 'has_attributes' => false, + 'pass_by_reference' => false, + 'variable_length' => false, + 'type_hint' => 'bar', + 'nullable_type' => false, + ]; + + $this->getMethodParametersTestHelper('/* '.__FUNCTION__.' */', $expected); + + }//end testTypeHint() + + + /** + * Verify self type hint parsing. + * + * @return void + */ + public function testSelfTypeHint() + { + $expected = []; + $expected[0] = [ + 'name' => '$var', + 'content' => 'self $var', + 'has_attributes' => false, + 'pass_by_reference' => false, + 'variable_length' => false, + 'type_hint' => 'self', + 'nullable_type' => false, + ]; + + $this->getMethodParametersTestHelper('/* '.__FUNCTION__.' */', $expected); + + }//end testSelfTypeHint() + + + /** + * Verify nullable type hint parsing. + * + * @return void + */ + public function testNullableTypeHint() + { + $expected = []; + $expected[0] = [ + 'name' => '$var1', + 'content' => '?int $var1', + 'has_attributes' => false, + 'pass_by_reference' => false, + 'variable_length' => false, + 'type_hint' => '?int', + 'nullable_type' => true, + ]; + + $expected[1] = [ + 'name' => '$var2', + 'content' => '?\bar $var2', + 'has_attributes' => false, + 'pass_by_reference' => false, + 'variable_length' => false, + 'type_hint' => '?\bar', + 'nullable_type' => true, + ]; + + $this->getMethodParametersTestHelper('/* '.__FUNCTION__.' */', $expected); + + }//end testNullableTypeHint() + + + /** + * Verify variable. + * + * @return void + */ + public function testVariable() + { + $expected = []; + $expected[0] = [ + 'name' => '$var', + 'content' => '$var', + 'has_attributes' => false, + 'pass_by_reference' => false, + 'variable_length' => false, + 'type_hint' => '', + 'nullable_type' => false, + ]; + + $this->getMethodParametersTestHelper('/* '.__FUNCTION__.' */', $expected); + + }//end testVariable() + + + /** + * Verify default value parsing with a single function param. + * + * @return void + */ + public function testSingleDefaultValue() + { + $expected = []; + $expected[0] = [ + 'name' => '$var1', + 'content' => '$var1=self::CONSTANT', + 'has_attributes' => false, + 'default' => 'self::CONSTANT', + 'pass_by_reference' => false, + 'variable_length' => false, + 'type_hint' => '', + 'nullable_type' => false, + ]; + + $this->getMethodParametersTestHelper('/* '.__FUNCTION__.' */', $expected); + + }//end testSingleDefaultValue() + + + /** + * Verify default value parsing. + * + * @return void + */ + public function testDefaultValues() + { + $expected = []; + $expected[0] = [ + 'name' => '$var1', + 'content' => '$var1=1', + 'has_attributes' => false, + 'default' => '1', + 'pass_by_reference' => false, + 'variable_length' => false, + 'type_hint' => '', + 'nullable_type' => false, + ]; + $expected[1] = [ + 'name' => '$var2', + 'content' => "\$var2='value'", + 'has_attributes' => false, + 'default' => "'value'", + 'pass_by_reference' => false, + 'variable_length' => false, + 'type_hint' => '', + 'nullable_type' => false, + ]; + + $this->getMethodParametersTestHelper('/* '.__FUNCTION__.' */', $expected); + + }//end testDefaultValues() + + + /** + * Verify "bitwise and" in default value !== pass-by-reference. + * + * @return void + */ + public function testBitwiseAndConstantExpressionDefaultValue() + { + $expected = []; + $expected[0] = [ + 'name' => '$a', + 'content' => '$a = 10 & 20', + 'default' => '10 & 20', + 'has_attributes' => false, + 'pass_by_reference' => false, + 'variable_length' => false, + 'type_hint' => '', + 'nullable_type' => false, + ]; + + $this->getMethodParametersTestHelper('/* '.__FUNCTION__.' */', $expected); + + }//end testBitwiseAndConstantExpressionDefaultValue() + + + /** + * Verify that arrow functions are supported. + * + * @return void + */ + public function testArrowFunction() + { + $expected = []; + $expected[0] = [ + 'name' => '$a', + 'content' => 'int $a', + 'has_attributes' => false, + 'pass_by_reference' => false, + 'variable_length' => false, + 'type_hint' => 'int', + 'nullable_type' => false, + ]; + + $expected[1] = [ + 'name' => '$b', + 'content' => '...$b', + 'has_attributes' => false, + 'pass_by_reference' => false, + 'variable_length' => true, + 'type_hint' => '', + 'nullable_type' => false, + ]; + + $this->getMethodParametersTestHelper('/* '.__FUNCTION__.' */', $expected); + + }//end testArrowFunction() + + + /** + * Verify recognition of PHP8 mixed type declaration. + * + * @return void + */ + public function testPHP8MixedTypeHint() + { + $expected = []; + $expected[0] = [ + 'name' => '$var1', + 'content' => 'mixed &...$var1', + 'has_attributes' => false, + 'pass_by_reference' => true, + 'variable_length' => true, + 'type_hint' => 'mixed', + 'nullable_type' => false, + ]; + + $this->getMethodParametersTestHelper('/* '.__FUNCTION__.' */', $expected); + + }//end testPHP8MixedTypeHint() + + + /** + * Verify recognition of PHP8 mixed type declaration with nullability. + * + * @return void + */ + public function testPHP8MixedTypeHintNullable() + { + $expected = []; + $expected[0] = [ + 'name' => '$var1', + 'content' => '?Mixed $var1', + 'has_attributes' => false, + 'pass_by_reference' => false, + 'variable_length' => false, + 'type_hint' => '?Mixed', + 'nullable_type' => true, + ]; + + $this->getMethodParametersTestHelper('/* '.__FUNCTION__.' */', $expected); + + }//end testPHP8MixedTypeHintNullable() + + + /** + * Verify recognition of type declarations using the namespace operator. + * + * @return void + */ + public function testNamespaceOperatorTypeHint() + { + $expected = []; + $expected[0] = [ + 'name' => '$var1', + 'content' => '?namespace\Name $var1', + 'has_attributes' => false, + 'pass_by_reference' => false, + 'variable_length' => false, + 'type_hint' => '?namespace\Name', + 'nullable_type' => true, + ]; + + $this->getMethodParametersTestHelper('/* '.__FUNCTION__.' */', $expected); + + }//end testNamespaceOperatorTypeHint() + + + /** + * Verify recognition of PHP8 union type declaration. + * + * @return void + */ + public function testPHP8UnionTypesSimple() + { + $expected = []; + $expected[0] = [ + 'name' => '$number', + 'content' => 'int|float $number', + 'has_attributes' => false, + 'pass_by_reference' => false, + 'variable_length' => false, + 'type_hint' => 'int|float', + 'nullable_type' => false, + ]; + $expected[1] = [ + 'name' => '$obj', + 'content' => 'self|parent &...$obj', + 'has_attributes' => false, + 'pass_by_reference' => true, + 'variable_length' => true, + 'type_hint' => 'self|parent', + 'nullable_type' => false, + ]; + + $this->getMethodParametersTestHelper('/* '.__FUNCTION__.' */', $expected); + + }//end testPHP8UnionTypesSimple() + + + /** + * Verify recognition of PHP8 union type declaration when the variable has either a spread operator or a reference. + * + * @return void + */ + public function testPHP8UnionTypesWithSpreadOperatorAndReference() + { + $expected = []; + $expected[0] = [ + 'name' => '$paramA', + 'content' => 'float|null &$paramA', + 'has_attributes' => false, + 'pass_by_reference' => true, + 'variable_length' => false, + 'type_hint' => 'float|null', + 'nullable_type' => false, + ]; + $expected[1] = [ + 'name' => '$paramB', + 'content' => 'string|int ...$paramB', + 'has_attributes' => false, + 'pass_by_reference' => false, + 'variable_length' => true, + 'type_hint' => 'string|int', + 'nullable_type' => false, + ]; + + $this->getMethodParametersTestHelper('/* '.__FUNCTION__.' */', $expected); + + }//end testPHP8UnionTypesWithSpreadOperatorAndReference() + + + /** + * Verify recognition of PHP8 union type declaration with a bitwise or in the default value. + * + * @return void + */ + public function testPHP8UnionTypesSimpleWithBitwiseOrInDefault() + { + $expected = []; + $expected[0] = [ + 'name' => '$var', + 'content' => 'int|float $var = CONSTANT_A | CONSTANT_B', + 'default' => 'CONSTANT_A | CONSTANT_B', + 'has_attributes' => false, + 'pass_by_reference' => false, + 'variable_length' => false, + 'type_hint' => 'int|float', + 'nullable_type' => false, + ]; + + $this->getMethodParametersTestHelper('/* '.__FUNCTION__.' */', $expected); + + }//end testPHP8UnionTypesSimpleWithBitwiseOrInDefault() + + + /** + * Verify recognition of PHP8 union type declaration with two classes. + * + * @return void + */ + public function testPHP8UnionTypesTwoClasses() + { + $expected = []; + $expected[0] = [ + 'name' => '$var', + 'content' => 'MyClassA|\Package\MyClassB $var', + 'has_attributes' => false, + 'pass_by_reference' => false, + 'variable_length' => false, + 'type_hint' => 'MyClassA|\Package\MyClassB', + 'nullable_type' => false, + ]; + + $this->getMethodParametersTestHelper('/* '.__FUNCTION__.' */', $expected); + + }//end testPHP8UnionTypesTwoClasses() + + + /** + * Verify recognition of PHP8 union type declaration with all base types. + * + * @return void + */ + public function testPHP8UnionTypesAllBaseTypes() + { + $expected = []; + $expected[0] = [ + 'name' => '$var', + 'content' => 'array|bool|callable|int|float|null|object|string $var', + 'has_attributes' => false, + 'pass_by_reference' => false, + 'variable_length' => false, + 'type_hint' => 'array|bool|callable|int|float|null|object|string', + 'nullable_type' => false, + ]; + + $this->getMethodParametersTestHelper('/* '.__FUNCTION__.' */', $expected); + + }//end testPHP8UnionTypesAllBaseTypes() + + + /** + * Verify recognition of PHP8 union type declaration with all pseudo types. + * + * @return void + */ + public function testPHP8UnionTypesAllPseudoTypes() + { + $expected = []; + $expected[0] = [ + 'name' => '$var', + 'content' => 'false|mixed|self|parent|iterable|Resource $var', + 'has_attributes' => false, + 'pass_by_reference' => false, + 'variable_length' => false, + 'type_hint' => 'false|mixed|self|parent|iterable|Resource', + 'nullable_type' => false, + ]; + + $this->getMethodParametersTestHelper('/* '.__FUNCTION__.' */', $expected); + + }//end testPHP8UnionTypesAllPseudoTypes() + + + /** + * Verify recognition of PHP8 union type declaration with (illegal) nullability. + * + * @return void + */ + public function testPHP8UnionTypesNullable() + { + $expected = []; + $expected[0] = [ + 'name' => '$number', + 'content' => '?int|float $number', + 'has_attributes' => false, + 'pass_by_reference' => false, + 'variable_length' => false, + 'type_hint' => '?int|float', + 'nullable_type' => true, + ]; + + $this->getMethodParametersTestHelper('/* '.__FUNCTION__.' */', $expected); + + }//end testPHP8UnionTypesNullable() + + + /** + * Verify recognition of PHP8 type declaration with (illegal) single type null. + * + * @return void + */ + public function testPHP8PseudoTypeNull() + { + $expected = []; + $expected[0] = [ + 'name' => '$var', + 'content' => 'null $var = null', + 'default' => 'null', + 'has_attributes' => false, + 'pass_by_reference' => false, + 'variable_length' => false, + 'type_hint' => 'null', + 'nullable_type' => false, + ]; + + $this->getMethodParametersTestHelper('/* '.__FUNCTION__.' */', $expected); + + }//end testPHP8PseudoTypeNull() + + + /** + * Verify recognition of PHP8 type declaration with (illegal) single type false. + * + * @return void + */ + public function testPHP8PseudoTypeFalse() + { + $expected = []; + $expected[0] = [ + 'name' => '$var', + 'content' => 'false $var = false', + 'default' => 'false', + 'has_attributes' => false, + 'pass_by_reference' => false, + 'variable_length' => false, + 'type_hint' => 'false', + 'nullable_type' => false, + ]; + + $this->getMethodParametersTestHelper('/* '.__FUNCTION__.' */', $expected); + + }//end testPHP8PseudoTypeFalse() + + + /** + * Verify recognition of PHP8 type declaration with (illegal) type false combined with type bool. + * + * @return void + */ + public function testPHP8PseudoTypeFalseAndBool() + { + $expected = []; + $expected[0] = [ + 'name' => '$var', + 'content' => 'bool|false $var = false', + 'default' => 'false', + 'has_attributes' => false, + 'pass_by_reference' => false, + 'variable_length' => false, + 'type_hint' => 'bool|false', + 'nullable_type' => false, + ]; + + $this->getMethodParametersTestHelper('/* '.__FUNCTION__.' */', $expected); + + }//end testPHP8PseudoTypeFalseAndBool() + + + /** + * Verify recognition of PHP8 type declaration with (illegal) type object combined with a class name. + * + * @return void + */ + public function testPHP8ObjectAndClass() + { + $expected = []; + $expected[0] = [ + 'name' => '$var', + 'content' => 'object|ClassName $var', + 'has_attributes' => false, + 'pass_by_reference' => false, + 'variable_length' => false, + 'type_hint' => 'object|ClassName', + 'nullable_type' => false, + ]; + + $this->getMethodParametersTestHelper('/* '.__FUNCTION__.' */', $expected); + + }//end testPHP8ObjectAndClass() + + + /** + * Verify recognition of PHP8 type declaration with (illegal) type iterable combined with array/Traversable. + * + * @return void + */ + public function testPHP8PseudoTypeIterableAndArray() + { + $expected = []; + $expected[0] = [ + 'name' => '$var', + 'content' => 'iterable|array|Traversable $var', + 'has_attributes' => false, + 'pass_by_reference' => false, + 'variable_length' => false, + 'type_hint' => 'iterable|array|Traversable', + 'nullable_type' => false, + ]; + + $this->getMethodParametersTestHelper('/* '.__FUNCTION__.' */', $expected); + + }//end testPHP8PseudoTypeIterableAndArray() + + + /** + * Verify recognition of PHP8 type declaration with (illegal) duplicate types. + * + * @return void + */ + public function testPHP8DuplicateTypeInUnionWhitespaceAndComment() + { + $expected = []; + $expected[0] = [ + 'name' => '$var', + 'content' => 'int | string /*comment*/ | INT $var', + 'has_attributes' => false, + 'pass_by_reference' => false, + 'variable_length' => false, + 'type_hint' => 'int|string|INT', + 'nullable_type' => false, + ]; + + $this->getMethodParametersTestHelper('/* '.__FUNCTION__.' */', $expected); + + }//end testPHP8DuplicateTypeInUnionWhitespaceAndComment() + + + /** + * Verify recognition of PHP8 constructor property promotion without type declaration, with defaults. + * + * @return void + */ + public function testPHP8ConstructorPropertyPromotionNoTypes() + { + $expected = []; + $expected[0] = [ + 'name' => '$x', + 'content' => 'public $x = 0.0', + 'default' => '0.0', + 'has_attributes' => false, + 'pass_by_reference' => false, + 'variable_length' => false, + 'type_hint' => '', + 'nullable_type' => false, + 'property_visibility' => 'public', + ]; + $expected[1] = [ + 'name' => '$y', + 'content' => 'protected $y = \'\'', + 'default' => "''", + 'has_attributes' => false, + 'pass_by_reference' => false, + 'variable_length' => false, + 'type_hint' => '', + 'nullable_type' => false, + 'property_visibility' => 'protected', + ]; + $expected[2] = [ + 'name' => '$z', + 'content' => 'private $z = null', + 'default' => 'null', + 'has_attributes' => false, + 'pass_by_reference' => false, + 'variable_length' => false, + 'type_hint' => '', + 'nullable_type' => false, + 'property_visibility' => 'private', + ]; + + $this->getMethodParametersTestHelper('/* '.__FUNCTION__.' */', $expected); + + }//end testPHP8ConstructorPropertyPromotionNoTypes() + + + /** + * Verify recognition of PHP8 constructor property promotion with type declarations. + * + * @return void + */ + public function testPHP8ConstructorPropertyPromotionWithTypes() + { + $expected = []; + $expected[0] = [ + 'name' => '$x', + 'content' => 'protected float|int $x', + 'has_attributes' => false, + 'pass_by_reference' => false, + 'variable_length' => false, + 'type_hint' => 'float|int', + 'nullable_type' => false, + 'property_visibility' => 'protected', + ]; + $expected[1] = [ + 'name' => '$y', + 'content' => 'public ?string &$y = \'test\'', + 'default' => "'test'", + 'has_attributes' => false, + 'pass_by_reference' => true, + 'variable_length' => false, + 'type_hint' => '?string', + 'nullable_type' => true, + 'property_visibility' => 'public', + ]; + $expected[2] = [ + 'name' => '$z', + 'content' => 'private mixed $z', + 'has_attributes' => false, + 'pass_by_reference' => false, + 'variable_length' => false, + 'type_hint' => 'mixed', + 'nullable_type' => false, + 'property_visibility' => 'private', + ]; + + $this->getMethodParametersTestHelper('/* '.__FUNCTION__.' */', $expected); + + }//end testPHP8ConstructorPropertyPromotionWithTypes() + + + /** + * Verify recognition of PHP8 constructor with both property promotion as well as normal parameters. + * + * @return void + */ + public function testPHP8ConstructorPropertyPromotionAndNormalParam() + { + $expected = []; + $expected[0] = [ + 'name' => '$promotedProp', + 'content' => 'public int $promotedProp', + 'has_attributes' => false, + 'pass_by_reference' => false, + 'variable_length' => false, + 'type_hint' => 'int', + 'nullable_type' => false, + 'property_visibility' => 'public', + ]; + $expected[1] = [ + 'name' => '$normalArg', + 'content' => '?int $normalArg', + 'has_attributes' => false, + 'pass_by_reference' => false, + 'variable_length' => false, + 'type_hint' => '?int', + 'nullable_type' => true, + ]; + + $this->getMethodParametersTestHelper('/* '.__FUNCTION__.' */', $expected); + + }//end testPHP8ConstructorPropertyPromotionAndNormalParam() + + + /** + * Verify behaviour when a non-constructor function uses PHP 8 property promotion syntax. + * + * @return void + */ + public function testPHP8ConstructorPropertyPromotionGlobalFunction() + { + $expected = []; + $expected[0] = [ + 'name' => '$x', + 'content' => 'private $x', + 'has_attributes' => false, + 'pass_by_reference' => false, + 'variable_length' => false, + 'type_hint' => '', + 'nullable_type' => false, + 'property_visibility' => 'private', + ]; + + $this->getMethodParametersTestHelper('/* '.__FUNCTION__.' */', $expected); + + }//end testPHP8ConstructorPropertyPromotionGlobalFunction() + + + /** + * Verify behaviour when an abstract constructor uses PHP 8 property promotion syntax. + * + * @return void + */ + public function testPHP8ConstructorPropertyPromotionAbstractMethod() + { + $expected = []; + $expected[0] = [ + 'name' => '$y', + 'content' => 'public callable $y', + 'has_attributes' => false, + 'pass_by_reference' => false, + 'variable_length' => false, + 'type_hint' => 'callable', + 'nullable_type' => false, + 'property_visibility' => 'public', + ]; + $expected[1] = [ + 'name' => '$x', + 'content' => 'private ...$x', + 'has_attributes' => false, + 'pass_by_reference' => false, + 'variable_length' => true, + 'type_hint' => '', + 'nullable_type' => false, + 'property_visibility' => 'private', + ]; + + $this->getMethodParametersTestHelper('/* '.__FUNCTION__.' */', $expected); + + }//end testPHP8ConstructorPropertyPromotionAbstractMethod() + + + /** + * Verify and document behaviour when there are comments within a parameter declaration. + * + * @return void + */ + public function testCommentsInParameter() + { + $expected = []; + $expected[0] = [ + 'name' => '$param', + 'content' => '// Leading comment. + ?MyClass /*-*/ & /*-*/.../*-*/ $param /*-*/ = /*-*/ \'default value\' . /*-*/ \'second part\' // Trailing comment.', + 'has_attributes' => false, + 'pass_by_reference' => true, + 'variable_length' => true, + 'type_hint' => '?MyClass', + 'nullable_type' => true, + ]; + + $this->getMethodParametersTestHelper('/* '.__FUNCTION__.' */', $expected); + + }//end testCommentsInParameter() + + + /** + * Verify behaviour when parameters have attributes attached. + * + * @return void + */ + public function testParameterAttributesInFunctionDeclaration() + { + $expected = []; + $expected[0] = [ + 'name' => '$constructorPropPromTypedParamSingleAttribute', + 'content' => '#[\MyExample\MyAttribute] private string $constructorPropPromTypedParamSingleAttribute', + 'has_attributes' => true, + 'pass_by_reference' => false, + 'variable_length' => false, + 'type_hint' => 'string', + 'nullable_type' => false, + 'property_visibility' => 'private', + ]; + $expected[1] = [ + 'name' => '$typedParamSingleAttribute', + 'content' => '#[MyAttr([1, 2])] + Type|false + $typedParamSingleAttribute', + 'has_attributes' => true, + 'pass_by_reference' => false, + 'variable_length' => false, + 'type_hint' => 'Type|false', + 'nullable_type' => false, + ]; + $expected[2] = [ + 'name' => '$nullableTypedParamMultiAttribute', + 'content' => '#[MyAttribute(1234), MyAttribute(5678)] ?int $nullableTypedParamMultiAttribute', + 'has_attributes' => true, + 'pass_by_reference' => false, + 'variable_length' => false, + 'type_hint' => '?int', + 'nullable_type' => true, + ]; + $expected[3] = [ + 'name' => '$nonTypedParamTwoAttributes', + 'content' => '#[WithoutArgument] #[SingleArgument(0)] $nonTypedParamTwoAttributes', + 'has_attributes' => true, + 'pass_by_reference' => false, + 'variable_length' => false, + 'type_hint' => '', + 'nullable_type' => false, + ]; + $expected[4] = [ + 'name' => '$otherParam', + 'content' => '#[MyAttribute(array("key" => "value"))] + &...$otherParam', + 'has_attributes' => true, + 'pass_by_reference' => true, + 'variable_length' => true, + 'type_hint' => '', + 'nullable_type' => false, + ]; + + $this->getMethodParametersTestHelper('/* '.__FUNCTION__.' */', $expected); + + }//end testParameterAttributesInFunctionDeclaration() + + + /** + * Test helper. + * + * @param string $commentString The comment which preceeds the test. + * @param array $expected The expected function output. + * + * @return void + */ + private function getMethodParametersTestHelper($commentString, $expected) + { + $function = $this->getTargetToken($commentString, [T_FUNCTION, T_CLOSURE, T_FN]); + $found = self::$phpcsFile->getMethodParameters($function); + + $this->assertArraySubset($expected, $found, true); + + }//end getMethodParametersTestHelper() + + +}//end class diff --git a/vendor/squizlabs/php_codesniffer/tests/Core/File/GetMethodPropertiesTest.inc b/vendor/squizlabs/php_codesniffer/tests/Core/File/GetMethodPropertiesTest.inc new file mode 100644 index 00000000..3e9682df --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/tests/Core/File/GetMethodPropertiesTest.inc @@ -0,0 +1,128 @@ + $number + 1, + $numbers +); + +class ReturnMe { + /* testReturnTypeStatic */ + private function myFunction(): static { + return $this; + } +} + +/* testPHP8MixedTypeHint */ +function mixedTypeHint() :mixed {} + +/* testPHP8MixedTypeHintNullable */ +// Intentional fatal error - nullability is not allowed with mixed, but that's not the concern of the method. +function mixedTypeHintNullable(): ?mixed {} + +/* testNamespaceOperatorTypeHint */ +function namespaceOperatorTypeHint() : ?namespace\Name {} + +/* testPHP8UnionTypesSimple */ +function unionTypeSimple($number) : int|float {} + +/* testPHP8UnionTypesTwoClasses */ +$fn = fn($var): MyClassA|\Package\MyClassB => $var; + +/* testPHP8UnionTypesAllBaseTypes */ +function unionTypesAllBaseTypes() : array|bool|callable|int|float|null|Object|string {} + +/* testPHP8UnionTypesAllPseudoTypes */ +// Intentional fatal error - mixing types which cannot be combined, but that's not the concern of the method. +function unionTypesAllPseudoTypes($var) : false|MIXED|self|parent|static|iterable|Resource|void {} + +/* testPHP8UnionTypesNullable */ +// Intentional fatal error - nullability is not allowed with union types, but that's not the concern of the method. +$closure = function () use($a) :?int|float {}; + +/* testPHP8PseudoTypeNull */ +// Intentional fatal error - null pseudotype is only allowed in union types, but that's not the concern of the method. +function pseudoTypeNull(): null {} + +/* testPHP8PseudoTypeFalse */ +// Intentional fatal error - false pseudotype is only allowed in union types, but that's not the concern of the method. +function pseudoTypeFalse(): false {} + +/* testPHP8PseudoTypeFalseAndBool */ +// Intentional fatal error - false pseudotype is not allowed in combination with bool, but that's not the concern of the method. +function pseudoTypeFalseAndBool(): bool|false {} + +/* testPHP8ObjectAndClass */ +// Intentional fatal error - object is not allowed in combination with class name, but that's not the concern of the method. +function objectAndClass(): object|ClassName {} + +/* testPHP8PseudoTypeIterableAndArray */ +// Intentional fatal error - iterable pseudotype is not allowed in combination with array or Traversable, but that's not the concern of the method. +interface FooBar { + public function pseudoTypeIterableAndArray(): iterable|array|Traversable; +} + +/* testPHP8DuplicateTypeInUnionWhitespaceAndComment */ +// Intentional fatal error - duplicate types are not allowed in union types, but that's not the concern of the method. +function duplicateTypeInUnion(): int | /*comment*/ string | INT {} diff --git a/vendor/squizlabs/php_codesniffer/tests/Core/File/GetMethodPropertiesTest.php b/vendor/squizlabs/php_codesniffer/tests/Core/File/GetMethodPropertiesTest.php new file mode 100644 index 00000000..d912d6b1 --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/tests/Core/File/GetMethodPropertiesTest.php @@ -0,0 +1,749 @@ + + * @copyright 2006-2015 Squiz Pty Ltd (ABN 77 084 670 600) + * @license https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence + */ + +namespace PHP_CodeSniffer\Tests\Core\File; + +use PHP_CodeSniffer\Tests\Core\AbstractMethodUnitTest; + +class GetMethodPropertiesTest extends AbstractMethodUnitTest +{ + + + /** + * Test a basic function. + * + * @return void + */ + public function testBasicFunction() + { + $expected = [ + 'scope' => 'public', + 'scope_specified' => false, + 'return_type' => '', + 'nullable_return_type' => false, + 'is_abstract' => false, + 'is_final' => false, + 'is_static' => false, + 'has_body' => true, + ]; + + $this->getMethodPropertiesTestHelper('/* '.__FUNCTION__.' */', $expected); + + }//end testBasicFunction() + + + /** + * Test a function with a return type. + * + * @return void + */ + public function testReturnFunction() + { + $expected = [ + 'scope' => 'public', + 'scope_specified' => false, + 'return_type' => 'array', + 'nullable_return_type' => false, + 'is_abstract' => false, + 'is_final' => false, + 'is_static' => false, + 'has_body' => true, + ]; + + $this->getMethodPropertiesTestHelper('/* '.__FUNCTION__.' */', $expected); + + }//end testReturnFunction() + + + /** + * Test a closure used as a function argument. + * + * @return void + */ + public function testNestedClosure() + { + $expected = [ + 'scope' => 'public', + 'scope_specified' => false, + 'return_type' => 'int', + 'nullable_return_type' => false, + 'is_abstract' => false, + 'is_final' => false, + 'is_static' => false, + 'has_body' => true, + ]; + + $this->getMethodPropertiesTestHelper('/* '.__FUNCTION__.' */', $expected); + + }//end testNestedClosure() + + + /** + * Test a basic method. + * + * @return void + */ + public function testBasicMethod() + { + $expected = [ + 'scope' => 'public', + 'scope_specified' => false, + 'return_type' => '', + 'nullable_return_type' => false, + 'is_abstract' => false, + 'is_final' => false, + 'is_static' => false, + 'has_body' => true, + ]; + + $this->getMethodPropertiesTestHelper('/* '.__FUNCTION__.' */', $expected); + + }//end testBasicMethod() + + + /** + * Test a private static method. + * + * @return void + */ + public function testPrivateStaticMethod() + { + $expected = [ + 'scope' => 'private', + 'scope_specified' => true, + 'return_type' => '', + 'nullable_return_type' => false, + 'is_abstract' => false, + 'is_final' => false, + 'is_static' => true, + 'has_body' => true, + ]; + + $this->getMethodPropertiesTestHelper('/* '.__FUNCTION__.' */', $expected); + + }//end testPrivateStaticMethod() + + + /** + * Test a basic final method. + * + * @return void + */ + public function testFinalMethod() + { + $expected = [ + 'scope' => 'public', + 'scope_specified' => true, + 'return_type' => '', + 'nullable_return_type' => false, + 'is_abstract' => false, + 'is_final' => true, + 'is_static' => false, + 'has_body' => true, + ]; + + $this->getMethodPropertiesTestHelper('/* '.__FUNCTION__.' */', $expected); + + }//end testFinalMethod() + + + /** + * Test a protected method with a return type. + * + * @return void + */ + public function testProtectedReturnMethod() + { + $expected = [ + 'scope' => 'protected', + 'scope_specified' => true, + 'return_type' => 'int', + 'nullable_return_type' => false, + 'is_abstract' => false, + 'is_final' => false, + 'is_static' => false, + 'has_body' => true, + ]; + + $this->getMethodPropertiesTestHelper('/* '.__FUNCTION__.' */', $expected); + + }//end testProtectedReturnMethod() + + + /** + * Test a public method with a return type. + * + * @return void + */ + public function testPublicReturnMethod() + { + $expected = [ + 'scope' => 'public', + 'scope_specified' => true, + 'return_type' => 'array', + 'nullable_return_type' => false, + 'is_abstract' => false, + 'is_final' => false, + 'is_static' => false, + 'has_body' => true, + ]; + + $this->getMethodPropertiesTestHelper('/* '.__FUNCTION__.' */', $expected); + + }//end testPublicReturnMethod() + + + /** + * Test a public method with a nullable return type. + * + * @return void + */ + public function testNullableReturnMethod() + { + $expected = [ + 'scope' => 'public', + 'scope_specified' => true, + 'return_type' => '?array', + 'nullable_return_type' => true, + 'is_abstract' => false, + 'is_final' => false, + 'is_static' => false, + 'has_body' => true, + ]; + + $this->getMethodPropertiesTestHelper('/* '.__FUNCTION__.' */', $expected); + + }//end testNullableReturnMethod() + + + /** + * Test a public method with a nullable return type. + * + * @return void + */ + public function testMessyNullableReturnMethod() + { + $expected = [ + 'scope' => 'public', + 'scope_specified' => true, + 'return_type' => '?array', + 'nullable_return_type' => true, + 'is_abstract' => false, + 'is_final' => false, + 'is_static' => false, + 'has_body' => true, + ]; + + $this->getMethodPropertiesTestHelper('/* '.__FUNCTION__.' */', $expected); + + }//end testMessyNullableReturnMethod() + + + /** + * Test a method with a namespaced return type. + * + * @return void + */ + public function testReturnNamespace() + { + $expected = [ + 'scope' => 'public', + 'scope_specified' => false, + 'return_type' => '\MyNamespace\MyClass', + 'nullable_return_type' => false, + 'is_abstract' => false, + 'is_final' => false, + 'is_static' => false, + 'has_body' => true, + ]; + + $this->getMethodPropertiesTestHelper('/* '.__FUNCTION__.' */', $expected); + + }//end testReturnNamespace() + + + /** + * Test a method with a messy namespaces return type. + * + * @return void + */ + public function testReturnMultilineNamespace() + { + $expected = [ + 'scope' => 'public', + 'scope_specified' => false, + 'return_type' => '\MyNamespace\MyClass\Foo', + 'nullable_return_type' => false, + 'is_abstract' => false, + 'is_final' => false, + 'is_static' => false, + 'has_body' => true, + ]; + + $this->getMethodPropertiesTestHelper('/* '.__FUNCTION__.' */', $expected); + + }//end testReturnMultilineNamespace() + + + /** + * Test a basic abstract method. + * + * @return void + */ + public function testAbstractMethod() + { + $expected = [ + 'scope' => 'public', + 'scope_specified' => false, + 'return_type' => '', + 'nullable_return_type' => false, + 'is_abstract' => true, + 'is_final' => false, + 'is_static' => false, + 'has_body' => false, + ]; + + $this->getMethodPropertiesTestHelper('/* '.__FUNCTION__.' */', $expected); + + }//end testAbstractMethod() + + + /** + * Test an abstract method with a return type. + * + * @return void + */ + public function testAbstractReturnMethod() + { + $expected = [ + 'scope' => 'protected', + 'scope_specified' => true, + 'return_type' => 'bool', + 'nullable_return_type' => false, + 'is_abstract' => true, + 'is_final' => false, + 'is_static' => false, + 'has_body' => false, + ]; + + $this->getMethodPropertiesTestHelper('/* '.__FUNCTION__.' */', $expected); + + }//end testAbstractReturnMethod() + + + /** + * Test a basic interface method. + * + * @return void + */ + public function testInterfaceMethod() + { + $expected = [ + 'scope' => 'public', + 'scope_specified' => false, + 'return_type' => '', + 'nullable_return_type' => false, + 'is_abstract' => false, + 'is_final' => false, + 'is_static' => false, + 'has_body' => false, + ]; + + $this->getMethodPropertiesTestHelper('/* '.__FUNCTION__.' */', $expected); + + }//end testInterfaceMethod() + + + /** + * Test a static arrow function. + * + * @return void + */ + public function testArrowFunction() + { + $expected = [ + 'scope' => 'public', + 'scope_specified' => false, + 'return_type' => 'int', + 'nullable_return_type' => false, + 'is_abstract' => false, + 'is_final' => false, + 'is_static' => true, + 'has_body' => true, + ]; + + $this->getMethodPropertiesTestHelper('/* '.__FUNCTION__.' */', $expected); + + }//end testArrowFunction() + + + /** + * Test a function with return type "static". + * + * @return void + */ + public function testReturnTypeStatic() + { + $expected = [ + 'scope' => 'private', + 'scope_specified' => true, + 'return_type' => 'static', + 'nullable_return_type' => false, + 'is_abstract' => false, + 'is_final' => false, + 'is_static' => false, + 'has_body' => true, + ]; + + $this->getMethodPropertiesTestHelper('/* '.__FUNCTION__.' */', $expected); + + }//end testReturnTypeStatic() + + + /** + * Test a function with return type "mixed". + * + * @return void + */ + public function testPHP8MixedTypeHint() + { + $expected = [ + 'scope' => 'public', + 'scope_specified' => false, + 'return_type' => 'mixed', + 'nullable_return_type' => false, + 'is_abstract' => false, + 'is_final' => false, + 'is_static' => false, + 'has_body' => true, + ]; + + $this->getMethodPropertiesTestHelper('/* '.__FUNCTION__.' */', $expected); + + }//end testPHP8MixedTypeHint() + + + /** + * Test a function with return type "mixed" and nullability. + * + * @return void + */ + public function testPHP8MixedTypeHintNullable() + { + $expected = [ + 'scope' => 'public', + 'scope_specified' => false, + 'return_type' => '?mixed', + 'nullable_return_type' => true, + 'is_abstract' => false, + 'is_final' => false, + 'is_static' => false, + 'has_body' => true, + ]; + + $this->getMethodPropertiesTestHelper('/* '.__FUNCTION__.' */', $expected); + + }//end testPHP8MixedTypeHintNullable() + + + /** + * Test a function with return type using the namespace operator. + * + * @return void + */ + public function testNamespaceOperatorTypeHint() + { + $expected = [ + 'scope' => 'public', + 'scope_specified' => false, + 'return_type' => '?namespace\Name', + 'nullable_return_type' => true, + 'is_abstract' => false, + 'is_final' => false, + 'is_static' => false, + 'has_body' => true, + ]; + + $this->getMethodPropertiesTestHelper('/* '.__FUNCTION__.' */', $expected); + + }//end testNamespaceOperatorTypeHint() + + + /** + * Verify recognition of PHP8 union type declaration. + * + * @return void + */ + public function testPHP8UnionTypesSimple() + { + $expected = [ + 'scope' => 'public', + 'scope_specified' => false, + 'return_type' => 'int|float', + 'nullable_return_type' => false, + 'is_abstract' => false, + 'is_final' => false, + 'is_static' => false, + 'has_body' => true, + ]; + + $this->getMethodPropertiesTestHelper('/* '.__FUNCTION__.' */', $expected); + + }//end testPHP8UnionTypesSimple() + + + /** + * Verify recognition of PHP8 union type declaration with two classes. + * + * @return void + */ + public function testPHP8UnionTypesTwoClasses() + { + $expected = [ + 'scope' => 'public', + 'scope_specified' => false, + 'return_type' => 'MyClassA|\Package\MyClassB', + 'nullable_return_type' => false, + 'is_abstract' => false, + 'is_final' => false, + 'is_static' => false, + 'has_body' => true, + ]; + + $this->getMethodPropertiesTestHelper('/* '.__FUNCTION__.' */', $expected); + + }//end testPHP8UnionTypesTwoClasses() + + + /** + * Verify recognition of PHP8 union type declaration with all base types. + * + * @return void + */ + public function testPHP8UnionTypesAllBaseTypes() + { + $expected = [ + 'scope' => 'public', + 'scope_specified' => false, + 'return_type' => 'array|bool|callable|int|float|null|Object|string', + 'nullable_return_type' => false, + 'is_abstract' => false, + 'is_final' => false, + 'is_static' => false, + 'has_body' => true, + ]; + + $this->getMethodPropertiesTestHelper('/* '.__FUNCTION__.' */', $expected); + + }//end testPHP8UnionTypesAllBaseTypes() + + + /** + * Verify recognition of PHP8 union type declaration with all pseudo types. + * + * @return void + */ + public function testPHP8UnionTypesAllPseudoTypes() + { + $expected = [ + 'scope' => 'public', + 'scope_specified' => false, + 'return_type' => 'false|MIXED|self|parent|static|iterable|Resource|void', + 'nullable_return_type' => false, + 'is_abstract' => false, + 'is_final' => false, + 'is_static' => false, + 'has_body' => true, + ]; + + $this->getMethodPropertiesTestHelper('/* '.__FUNCTION__.' */', $expected); + + }//end testPHP8UnionTypesAllPseudoTypes() + + + /** + * Verify recognition of PHP8 union type declaration with (illegal) nullability. + * + * @return void + */ + public function testPHP8UnionTypesNullable() + { + $expected = [ + 'scope' => 'public', + 'scope_specified' => false, + 'return_type' => '?int|float', + 'nullable_return_type' => true, + 'is_abstract' => false, + 'is_final' => false, + 'is_static' => false, + 'has_body' => true, + ]; + + $this->getMethodPropertiesTestHelper('/* '.__FUNCTION__.' */', $expected); + + }//end testPHP8UnionTypesNullable() + + + /** + * Verify recognition of PHP8 type declaration with (illegal) single type null. + * + * @return void + */ + public function testPHP8PseudoTypeNull() + { + $expected = [ + 'scope' => 'public', + 'scope_specified' => false, + 'return_type' => 'null', + 'nullable_return_type' => false, + 'is_abstract' => false, + 'is_final' => false, + 'is_static' => false, + 'has_body' => true, + ]; + + $this->getMethodPropertiesTestHelper('/* '.__FUNCTION__.' */', $expected); + + }//end testPHP8PseudoTypeNull() + + + /** + * Verify recognition of PHP8 type declaration with (illegal) single type false. + * + * @return void + */ + public function testPHP8PseudoTypeFalse() + { + $expected = [ + 'scope' => 'public', + 'scope_specified' => false, + 'return_type' => 'false', + 'nullable_return_type' => false, + 'is_abstract' => false, + 'is_final' => false, + 'is_static' => false, + 'has_body' => true, + ]; + + $this->getMethodPropertiesTestHelper('/* '.__FUNCTION__.' */', $expected); + + }//end testPHP8PseudoTypeFalse() + + + /** + * Verify recognition of PHP8 type declaration with (illegal) type false combined with type bool. + * + * @return void + */ + public function testPHP8PseudoTypeFalseAndBool() + { + $expected = [ + 'scope' => 'public', + 'scope_specified' => false, + 'return_type' => 'bool|false', + 'nullable_return_type' => false, + 'is_abstract' => false, + 'is_final' => false, + 'is_static' => false, + 'has_body' => true, + ]; + + $this->getMethodPropertiesTestHelper('/* '.__FUNCTION__.' */', $expected); + + }//end testPHP8PseudoTypeFalseAndBool() + + + /** + * Verify recognition of PHP8 type declaration with (illegal) type object combined with a class name. + * + * @return void + */ + public function testPHP8ObjectAndClass() + { + $expected = [ + 'scope' => 'public', + 'scope_specified' => false, + 'return_type' => 'object|ClassName', + 'nullable_return_type' => false, + 'is_abstract' => false, + 'is_final' => false, + 'is_static' => false, + 'has_body' => true, + ]; + + $this->getMethodPropertiesTestHelper('/* '.__FUNCTION__.' */', $expected); + + }//end testPHP8ObjectAndClass() + + + /** + * Verify recognition of PHP8 type declaration with (illegal) type iterable combined with array/Traversable. + * + * @return void + */ + public function testPHP8PseudoTypeIterableAndArray() + { + $expected = [ + 'scope' => 'public', + 'scope_specified' => true, + 'return_type' => 'iterable|array|Traversable', + 'nullable_return_type' => false, + 'is_abstract' => false, + 'is_final' => false, + 'is_static' => false, + 'has_body' => false, + ]; + + $this->getMethodPropertiesTestHelper('/* '.__FUNCTION__.' */', $expected); + + }//end testPHP8PseudoTypeIterableAndArray() + + + /** + * Verify recognition of PHP8 type declaration with (illegal) duplicate types. + * + * @return void + */ + public function testPHP8DuplicateTypeInUnionWhitespaceAndComment() + { + $expected = [ + 'scope' => 'public', + 'scope_specified' => false, + 'return_type' => 'int|string|INT', + 'nullable_return_type' => false, + 'is_abstract' => false, + 'is_final' => false, + 'is_static' => false, + 'has_body' => true, + ]; + + $this->getMethodPropertiesTestHelper('/* '.__FUNCTION__.' */', $expected); + + }//end testPHP8DuplicateTypeInUnionWhitespaceAndComment() + + + /** + * Test helper. + * + * @param string $commentString The comment which preceeds the test. + * @param array $expected The expected function output. + * + * @return void + */ + private function getMethodPropertiesTestHelper($commentString, $expected) + { + $function = $this->getTargetToken($commentString, [T_FUNCTION, T_CLOSURE, T_FN]); + $found = self::$phpcsFile->getMethodProperties($function); + + $this->assertArraySubset($expected, $found, true); + + }//end getMethodPropertiesTestHelper() + + +}//end class diff --git a/vendor/squizlabs/php_codesniffer/tests/Core/File/IsReferenceTest.inc b/vendor/squizlabs/php_codesniffer/tests/Core/File/IsReferenceTest.inc new file mode 100644 index 00000000..cd40ed3b --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/tests/Core/File/IsReferenceTest.inc @@ -0,0 +1,150 @@ + $first, 'b' => $something & $somethingElse ]; + +/* testBitwiseAndF */ +$a = array( 'a' => $first, 'b' => $something & \MyClass::$somethingElse ); + +/* testBitwiseAndG */ +$a = $something & $somethingElse; + +/* testBitwiseAndH */ +function myFunction($a = 10 & 20) {} + +/* testBitwiseAndI */ +$closure = function ($a = MY_CONSTANT & parent::OTHER_CONSTANT) {}; + +/* testFunctionReturnByReference */ +function &myFunction() {} + +/* testFunctionPassByReferenceA */ +function myFunction( &$a ) {} + +/* testFunctionPassByReferenceB */ +function myFunction( $a, &$b ) {} + +/* testFunctionPassByReferenceC */ +$closure = function ( &$a ) {}; + +/* testFunctionPassByReferenceD */ +$closure = function ( $a, &$b ) {}; + +/* testFunctionPassByReferenceE */ +function myFunction(array &$one) {} + +/* testFunctionPassByReferenceF */ +$closure = function (\MyClass &$one) {}; + +/* testFunctionPassByReferenceG */ +$closure = function myFunc($param, &...$moreParams) {}; + +/* testForeachValueByReference */ +foreach( $array as $key => &$value ) {} + +/* testForeachKeyByReference */ +foreach( $array as &$key => $value ) {} + +/* testArrayValueByReferenceA */ +$a = [ 'a' => &$something ]; + +/* testArrayValueByReferenceB */ +$a = [ 'a' => $something, 'b' => &$somethingElse ]; + +/* testArrayValueByReferenceC */ +$a = [ &$something ]; + +/* testArrayValueByReferenceD */ +$a = [ $something, &$somethingElse ]; + +/* testArrayValueByReferenceE */ +$a = array( 'a' => &$something ); + +/* testArrayValueByReferenceF */ +$a = array( 'a' => $something, 'b' => &$somethingElse ); + +/* testArrayValueByReferenceG */ +$a = array( &$something ); + +/* testArrayValueByReferenceH */ +$a = array( $something, &$somethingElse ); + +/* testAssignByReferenceA */ +$b = &$something; + +/* testAssignByReferenceB */ +$b =& $something; + +/* testAssignByReferenceC */ +$b .= &$something; + +/* testAssignByReferenceD */ +$myValue = &$obj->getValue(); + +/* testAssignByReferenceE */ +$collection = &collector(); + +/* testPassByReferenceA */ +functionCall(&$something, $somethingElse); + +/* testPassByReferenceB */ +functionCall($something, &$somethingElse); + +/* testPassByReferenceC */ +functionCall($something, &$this->somethingElse); + +/* testPassByReferenceD */ +functionCall($something, &self::$somethingElse); + +/* testPassByReferenceE */ +functionCall($something, &parent::$somethingElse); + +/* testPassByReferenceF */ +functionCall($something, &static::$somethingElse); + +/* testPassByReferenceG */ +functionCall($something, &SomeClass::$somethingElse); + +/* testPassByReferenceH */ +functionCall(&\SomeClass::$somethingElse); + +/* testPassByReferenceI */ +functionCall($something, &\SomeNS\SomeClass::$somethingElse); + +/* testPassByReferenceJ */ +functionCall($something, &namespace\SomeClass::$somethingElse); + +/* testNewByReferenceA */ +$foobar2 = &new Foobar(); + +/* testNewByReferenceB */ +functionCall( $something , &new Foobar() ); + +/* testUseByReference */ +$closure = function() use (&$var){}; + +/* testArrowFunctionReturnByReference */ +fn&($x) => $x; + +/* testArrowFunctionPassByReferenceA */ +$fn = fn(array &$one) => 1; + +/* testArrowFunctionPassByReferenceB */ +$fn = fn($param, &...$moreParams) => 1; + +/* testClosureReturnByReference */ +$closure = function &($param) use ($value) {}; diff --git a/vendor/squizlabs/php_codesniffer/tests/Core/File/IsReferenceTest.php b/vendor/squizlabs/php_codesniffer/tests/Core/File/IsReferenceTest.php new file mode 100644 index 00000000..ea2dddba --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/tests/Core/File/IsReferenceTest.php @@ -0,0 +1,248 @@ + + * @copyright 2006-2015 Squiz Pty Ltd (ABN 77 084 670 600) + * @license https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence + */ + +namespace PHP_CodeSniffer\Tests\Core\File; + +use PHP_CodeSniffer\Tests\Core\AbstractMethodUnitTest; + +class IsReferenceTest extends AbstractMethodUnitTest +{ + + + /** + * Test correctly identifying whether a "bitwise and" token is a reference or not. + * + * @param string $identifier Comment which precedes the test case. + * @param bool $expected Expected function output. + * + * @dataProvider dataIsReference + * + * @return void + */ + public function testIsReference($identifier, $expected) + { + $bitwiseAnd = $this->getTargetToken($identifier, T_BITWISE_AND); + $result = self::$phpcsFile->isReference($bitwiseAnd); + $this->assertSame($expected, $result); + + }//end testIsReference() + + + /** + * Data provider for the IsReference test. + * + * @see testIsReference() + * + * @return array + */ + public function dataIsReference() + { + return [ + [ + '/* testBitwiseAndA */', + false, + ], + [ + '/* testBitwiseAndB */', + false, + ], + [ + '/* testBitwiseAndC */', + false, + ], + [ + '/* testBitwiseAndD */', + false, + ], + [ + '/* testBitwiseAndE */', + false, + ], + [ + '/* testBitwiseAndF */', + false, + ], + [ + '/* testBitwiseAndG */', + false, + ], + [ + '/* testBitwiseAndH */', + false, + ], + [ + '/* testBitwiseAndI */', + false, + ], + [ + '/* testFunctionReturnByReference */', + true, + ], + [ + '/* testFunctionPassByReferenceA */', + true, + ], + [ + '/* testFunctionPassByReferenceB */', + true, + ], + [ + '/* testFunctionPassByReferenceC */', + true, + ], + [ + '/* testFunctionPassByReferenceD */', + true, + ], + [ + '/* testFunctionPassByReferenceE */', + true, + ], + [ + '/* testFunctionPassByReferenceF */', + true, + ], + [ + '/* testFunctionPassByReferenceG */', + true, + ], + [ + '/* testForeachValueByReference */', + true, + ], + [ + '/* testForeachKeyByReference */', + true, + ], + [ + '/* testArrayValueByReferenceA */', + true, + ], + [ + '/* testArrayValueByReferenceB */', + true, + ], + [ + '/* testArrayValueByReferenceC */', + true, + ], + [ + '/* testArrayValueByReferenceD */', + true, + ], + [ + '/* testArrayValueByReferenceE */', + true, + ], + [ + '/* testArrayValueByReferenceF */', + true, + ], + [ + '/* testArrayValueByReferenceG */', + true, + ], + [ + '/* testArrayValueByReferenceH */', + true, + ], + [ + '/* testAssignByReferenceA */', + true, + ], + [ + '/* testAssignByReferenceB */', + true, + ], + [ + '/* testAssignByReferenceC */', + true, + ], + [ + '/* testAssignByReferenceD */', + true, + ], + [ + '/* testAssignByReferenceE */', + true, + ], + [ + '/* testPassByReferenceA */', + true, + ], + [ + '/* testPassByReferenceB */', + true, + ], + [ + '/* testPassByReferenceC */', + true, + ], + [ + '/* testPassByReferenceD */', + true, + ], + [ + '/* testPassByReferenceE */', + true, + ], + [ + '/* testPassByReferenceF */', + true, + ], + [ + '/* testPassByReferenceG */', + true, + ], + [ + '/* testPassByReferenceH */', + true, + ], + [ + '/* testPassByReferenceI */', + true, + ], + [ + '/* testPassByReferenceJ */', + true, + ], + [ + '/* testNewByReferenceA */', + true, + ], + [ + '/* testNewByReferenceB */', + true, + ], + [ + '/* testUseByReference */', + true, + ], + [ + '/* testArrowFunctionReturnByReference */', + true, + ], + [ + '/* testArrowFunctionPassByReferenceA */', + true, + ], + [ + '/* testArrowFunctionPassByReferenceB */', + true, + ], + [ + '/* testClosureReturnByReference */', + true, + ], + ]; + + }//end dataIsReference() + + +}//end class diff --git a/vendor/squizlabs/php_codesniffer/tests/Core/Filters/Filter/AcceptTest.php b/vendor/squizlabs/php_codesniffer/tests/Core/Filters/Filter/AcceptTest.php new file mode 100644 index 00000000..2c9f57cd --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/tests/Core/Filters/Filter/AcceptTest.php @@ -0,0 +1,154 @@ + + * @author Juliette Reinders Folmer + * @copyright 2019 Squiz Pty Ltd (ABN 77 084 670 600) + * @license https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence + */ + +namespace PHP_CodeSniffer\Tests\Core\Filters\Filter; + +use PHP_CodeSniffer\Config; +use PHP_CodeSniffer\Filters\Filter; +use PHP_CodeSniffer\Ruleset; +use PHPUnit\Framework\TestCase; + +class AcceptTest extends TestCase +{ + + /** + * The Config object. + * + * @var \PHP_CodeSniffer\Config + */ + protected static $config; + + /** + * The Ruleset object. + * + * @var \PHP_CodeSniffer\Ruleset + */ + protected static $ruleset; + + + /** + * Initialize the test. + * + * @return void + */ + public function setUp() + { + if ($GLOBALS['PHP_CODESNIFFER_PEAR'] === true) { + // PEAR installs test and sniff files into different locations + // so these tests will not pass as they directly reference files + // by relative location. + $this->markTestSkipped('Test cannot run from a PEAR install'); + } + + }//end setUp() + + + /** + * Initialize the config and ruleset objects based on the `AcceptTest.xml` ruleset file. + * + * @return void + */ + public static function setUpBeforeClass() + { + if ($GLOBALS['PHP_CODESNIFFER_PEAR'] === true) { + // This test will be skipped. + return; + } + + $standard = __DIR__.'/'.basename(__FILE__, '.php').'.xml'; + self::$config = new Config(["--standard=$standard", "--ignore=*/somethingelse/*"]); + self::$ruleset = new Ruleset(self::$config); + + }//end setUpBeforeClass() + + + /** + * Test filtering a file list for excluded paths. + * + * @param array $inputPaths List of file paths to be filtered. + * @param array $expectedOutput Expected filtering result. + * + * @dataProvider dataExcludePatterns + * + * @return void + */ + public function testExcludePatterns($inputPaths, $expectedOutput) + { + $fakeDI = new \RecursiveArrayIterator($inputPaths); + $filter = new Filter($fakeDI, '/', self::$config, self::$ruleset); + $iterator = new \RecursiveIteratorIterator($filter); + $files = []; + + foreach ($iterator as $file) { + $files[] = $file; + } + + $this->assertEquals($expectedOutput, $files); + + }//end testExcludePatterns() + + + /** + * Data provider. + * + * @see testExcludePatterns + * + * @return array + */ + public function dataExcludePatterns() + { + $testCases = [ + // Test top-level exclude patterns. + [ + [ + '/path/to/src/Main.php', + '/path/to/src/Something/Main.php', + '/path/to/src/Somethingelse/Main.php', + '/path/to/src/SomethingelseEvenLonger/Main.php', + '/path/to/src/Other/Main.php', + ], + [ + '/path/to/src/Main.php', + '/path/to/src/SomethingelseEvenLonger/Main.php', + ], + ], + + // Test ignoring standard/sniff specific exclude patterns. + [ + [ + '/path/to/src/generic-project/Main.php', + '/path/to/src/generic/Main.php', + '/path/to/src/anything-generic/Main.php', + ], + [ + '/path/to/src/generic-project/Main.php', + '/path/to/src/generic/Main.php', + '/path/to/src/anything-generic/Main.php', + ], + ], + ]; + + // Allow these tests to work on Windows as well. + if (DIRECTORY_SEPARATOR === '\\') { + foreach ($testCases as $key => $case) { + foreach ($case as $nr => $param) { + foreach ($param as $file => $value) { + $testCases[$key][$nr][$file] = strtr($value, '/', '\\'); + } + } + } + } + + return $testCases; + + }//end dataExcludePatterns() + + +}//end class diff --git a/vendor/squizlabs/php_codesniffer/tests/Core/Filters/Filter/AcceptTest.xml b/vendor/squizlabs/php_codesniffer/tests/Core/Filters/Filter/AcceptTest.xml new file mode 100644 index 00000000..3d3e1de0 --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/tests/Core/Filters/Filter/AcceptTest.xml @@ -0,0 +1,16 @@ + + + Ruleset to test the filtering based on exclude patterns. + + + */something/* + + */Other/Main\.php$ + + + + /anything/* + + /YetAnother/Main\.php + + diff --git a/vendor/squizlabs/php_codesniffer/tests/Core/IsCamelCapsTest.php b/vendor/squizlabs/php_codesniffer/tests/Core/IsCamelCapsTest.php new file mode 100644 index 00000000..b60d524b --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/tests/Core/IsCamelCapsTest.php @@ -0,0 +1,135 @@ + + * @copyright 2006-2015 Squiz Pty Ltd (ABN 77 084 670 600) + * @license https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence + */ + +namespace PHP_CodeSniffer\Tests\Core; + +use PHP_CodeSniffer\Util\Common; +use PHPUnit\Framework\TestCase; + +class IsCamelCapsTest extends TestCase +{ + + + /** + * Test valid public function/method names. + * + * @return void + */ + public function testValidNotClassFormatPublic() + { + $this->assertTrue(Common::isCamelCaps('thisIsCamelCaps', false, true, true)); + $this->assertTrue(Common::isCamelCaps('thisISCamelCaps', false, true, false)); + + }//end testValidNotClassFormatPublic() + + + /** + * Test invalid public function/method names. + * + * @return void + */ + public function testInvalidNotClassFormatPublic() + { + $this->assertFalse(Common::isCamelCaps('_thisIsCamelCaps', false, true, true)); + $this->assertFalse(Common::isCamelCaps('thisISCamelCaps', false, true, true)); + $this->assertFalse(Common::isCamelCaps('ThisIsCamelCaps', false, true, true)); + + $this->assertFalse(Common::isCamelCaps('3thisIsCamelCaps', false, true, true)); + $this->assertFalse(Common::isCamelCaps('*thisIsCamelCaps', false, true, true)); + $this->assertFalse(Common::isCamelCaps('-thisIsCamelCaps', false, true, true)); + + $this->assertFalse(Common::isCamelCaps('this*IsCamelCaps', false, true, true)); + $this->assertFalse(Common::isCamelCaps('this-IsCamelCaps', false, true, true)); + $this->assertFalse(Common::isCamelCaps('this_IsCamelCaps', false, true, true)); + $this->assertFalse(Common::isCamelCaps('this_is_camel_caps', false, true, true)); + + }//end testInvalidNotClassFormatPublic() + + + /** + * Test valid private method names. + * + * @return void + */ + public function testValidNotClassFormatPrivate() + { + $this->assertTrue(Common::isCamelCaps('_thisIsCamelCaps', false, false, true)); + $this->assertTrue(Common::isCamelCaps('_thisISCamelCaps', false, false, false)); + $this->assertTrue(Common::isCamelCaps('_i18N', false, false, true)); + $this->assertTrue(Common::isCamelCaps('_i18n', false, false, true)); + + }//end testValidNotClassFormatPrivate() + + + /** + * Test invalid private method names. + * + * @return void + */ + public function testInvalidNotClassFormatPrivate() + { + $this->assertFalse(Common::isCamelCaps('thisIsCamelCaps', false, false, true)); + $this->assertFalse(Common::isCamelCaps('_thisISCamelCaps', false, false, true)); + $this->assertFalse(Common::isCamelCaps('_ThisIsCamelCaps', false, false, true)); + $this->assertFalse(Common::isCamelCaps('__thisIsCamelCaps', false, false, true)); + $this->assertFalse(Common::isCamelCaps('__thisISCamelCaps', false, false, false)); + + $this->assertFalse(Common::isCamelCaps('3thisIsCamelCaps', false, false, true)); + $this->assertFalse(Common::isCamelCaps('*thisIsCamelCaps', false, false, true)); + $this->assertFalse(Common::isCamelCaps('-thisIsCamelCaps', false, false, true)); + $this->assertFalse(Common::isCamelCaps('_this_is_camel_caps', false, false, true)); + + }//end testInvalidNotClassFormatPrivate() + + + /** + * Test valid class names. + * + * @return void + */ + public function testValidClassFormatPublic() + { + $this->assertTrue(Common::isCamelCaps('ThisIsCamelCaps', true, true, true)); + $this->assertTrue(Common::isCamelCaps('ThisISCamelCaps', true, true, false)); + $this->assertTrue(Common::isCamelCaps('This3IsCamelCaps', true, true, false)); + + }//end testValidClassFormatPublic() + + + /** + * Test invalid class names. + * + * @return void + */ + public function testInvalidClassFormat() + { + $this->assertFalse(Common::isCamelCaps('thisIsCamelCaps', true)); + $this->assertFalse(Common::isCamelCaps('This-IsCamelCaps', true)); + $this->assertFalse(Common::isCamelCaps('This_Is_Camel_Caps', true)); + + }//end testInvalidClassFormat() + + + /** + * Test invalid class names with the private flag set. + * + * Note that the private flag is ignored if the class format + * flag is set, so these names are all invalid. + * + * @return void + */ + public function testInvalidClassFormatPrivate() + { + $this->assertFalse(Common::isCamelCaps('_ThisIsCamelCaps', true, true)); + $this->assertFalse(Common::isCamelCaps('_ThisIsCamelCaps', true, false)); + + }//end testInvalidClassFormatPrivate() + + +}//end class diff --git a/vendor/squizlabs/php_codesniffer/tests/Core/Ruleset/RuleInclusionAbsoluteLinuxTest.php b/vendor/squizlabs/php_codesniffer/tests/Core/Ruleset/RuleInclusionAbsoluteLinuxTest.php new file mode 100644 index 00000000..8b138e0b --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/tests/Core/Ruleset/RuleInclusionAbsoluteLinuxTest.php @@ -0,0 +1,118 @@ + + * @copyright 2019 Juliette Reinders Folmer. All rights reserved. + * @license https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence + */ + +namespace PHP_CodeSniffer\Tests\Core\Ruleset; + +use PHP_CodeSniffer\Config; +use PHP_CodeSniffer\Ruleset; +use PHPUnit\Framework\TestCase; + +class RuleInclusionAbsoluteLinuxTest extends TestCase +{ + + /** + * The Ruleset object. + * + * @var \PHP_CodeSniffer\Ruleset + */ + protected $ruleset; + + /** + * Path to the ruleset file. + * + * @var string + */ + private $standard = ''; + + /** + * The original content of the ruleset. + * + * @var string + */ + private $contents = ''; + + + /** + * Initialize the config and ruleset objects. + * + * @return void + */ + public function setUp() + { + if ($GLOBALS['PHP_CODESNIFFER_PEAR'] === true) { + // PEAR installs test and sniff files into different locations + // so these tests will not pass as they directly reference files + // by relative location. + $this->markTestSkipped('Test cannot run from a PEAR install'); + } + + $this->standard = __DIR__.'/'.basename(__FILE__, '.php').'.xml'; + $repoRootDir = dirname(dirname(dirname(__DIR__))); + + // On-the-fly adjust the ruleset test file to be able to test sniffs included with absolute paths. + $contents = file_get_contents($this->standard); + $this->contents = $contents; + + $newPath = $repoRootDir; + if (DIRECTORY_SEPARATOR === '\\') { + $newPath = str_replace('\\', '/', $repoRootDir); + } + + $adjusted = str_replace('%path_slash_forward%', $newPath, $contents); + + if (file_put_contents($this->standard, $adjusted) === false) { + $this->markTestSkipped('On the fly ruleset adjustment failed'); + } + + // Initialize the config and ruleset objects for the test. + $config = new Config(["--standard={$this->standard}"]); + $this->ruleset = new Ruleset($config); + + }//end setUp() + + + /** + * Reset ruleset file. + * + * @return void + */ + public function tearDown() + { + file_put_contents($this->standard, $this->contents); + + }//end tearDown() + + + /** + * Test that sniffs registed with a Linux absolute path are correctly recognized and that + * properties are correctly set for them. + * + * @return void + */ + public function testLinuxStylePathRuleInclusion() + { + // Test that the sniff is correctly registered. + $this->assertObjectHasAttribute('sniffCodes', $this->ruleset); + $this->assertCount(1, $this->ruleset->sniffCodes); + $this->assertArrayHasKey('Generic.Formatting.SpaceAfterNot', $this->ruleset->sniffCodes); + $this->assertSame( + 'PHP_CodeSniffer\Standards\Generic\Sniffs\Formatting\SpaceAfterNotSniff', + $this->ruleset->sniffCodes['Generic.Formatting.SpaceAfterNot'] + ); + + // Test that the sniff properties are correctly set. + $this->assertSame( + '10', + $this->ruleset->sniffs['PHP_CodeSniffer\Standards\Generic\Sniffs\Formatting\SpaceAfterNotSniff']->spacing + ); + + }//end testLinuxStylePathRuleInclusion() + + +}//end class diff --git a/vendor/squizlabs/php_codesniffer/tests/Core/Ruleset/RuleInclusionAbsoluteLinuxTest.xml b/vendor/squizlabs/php_codesniffer/tests/Core/Ruleset/RuleInclusionAbsoluteLinuxTest.xml new file mode 100644 index 00000000..64d1aae6 --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/tests/Core/Ruleset/RuleInclusionAbsoluteLinuxTest.xml @@ -0,0 +1,11 @@ + + + + + + + + + + + diff --git a/vendor/squizlabs/php_codesniffer/tests/Core/Ruleset/RuleInclusionAbsoluteWindowsTest.php b/vendor/squizlabs/php_codesniffer/tests/Core/Ruleset/RuleInclusionAbsoluteWindowsTest.php new file mode 100644 index 00000000..f8e3255b --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/tests/Core/Ruleset/RuleInclusionAbsoluteWindowsTest.php @@ -0,0 +1,119 @@ + + * @copyright 2019 Juliette Reinders Folmer. All rights reserved. + * @license https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence + */ + +namespace PHP_CodeSniffer\Tests\Core\Ruleset; + +use PHP_CodeSniffer\Config; +use PHP_CodeSniffer\Ruleset; +use PHPUnit\Framework\TestCase; + +class RuleInclusionAbsoluteWindowsTest extends TestCase +{ + + /** + * The Ruleset object. + * + * @var \PHP_CodeSniffer\Ruleset + */ + protected $ruleset; + + /** + * Path to the ruleset file. + * + * @var string + */ + private $standard = ''; + + /** + * The original content of the ruleset. + * + * @var string + */ + private $contents = ''; + + + /** + * Initialize the config and ruleset objects. + * + * @return void + */ + public function setUp() + { + if (DIRECTORY_SEPARATOR === '/') { + $this->markTestSkipped('Windows specific test'); + } + + if ($GLOBALS['PHP_CODESNIFFER_PEAR'] === true) { + // PEAR installs test and sniff files into different locations + // so these tests will not pass as they directly reference files + // by relative location. + $this->markTestSkipped('Test cannot run from a PEAR install'); + } + + $this->standard = __DIR__.'/'.basename(__FILE__, '.php').'.xml'; + $repoRootDir = dirname(dirname(dirname(__DIR__))); + + // On-the-fly adjust the ruleset test file to be able to test sniffs included with absolute paths. + $contents = file_get_contents($this->standard); + $this->contents = $contents; + + $adjusted = str_replace('%path_slash_back%', $repoRootDir, $contents); + + if (file_put_contents($this->standard, $adjusted) === false) { + $this->markTestSkipped('On the fly ruleset adjustment failed'); + } + + // Initialize the config and ruleset objects for the test. + $config = new Config(["--standard={$this->standard}"]); + $this->ruleset = new Ruleset($config); + + }//end setUp() + + + /** + * Reset ruleset file. + * + * @return void + */ + public function tearDown() + { + if (DIRECTORY_SEPARATOR !== '/') { + file_put_contents($this->standard, $this->contents); + } + + }//end tearDown() + + + /** + * Test that sniffs registed with a Windows absolute path are correctly recognized and that + * properties are correctly set for them. + * + * @return void + */ + public function testWindowsStylePathRuleInclusion() + { + // Test that the sniff is correctly registered. + $this->assertObjectHasAttribute('sniffCodes', $this->ruleset); + $this->assertCount(1, $this->ruleset->sniffCodes); + $this->assertArrayHasKey('Generic.Formatting.SpaceAfterCast', $this->ruleset->sniffCodes); + $this->assertSame( + 'PHP_CodeSniffer\Standards\Generic\Sniffs\Formatting\SpaceAfterCastSniff', + $this->ruleset->sniffCodes['Generic.Formatting.SpaceAfterCast'] + ); + + // Test that the sniff property is correctly set. + $this->assertSame( + '10', + $this->ruleset->sniffs['PHP_CodeSniffer\Standards\Generic\Sniffs\Formatting\SpaceAfterCastSniff']->spacing + ); + + }//end testWindowsStylePathRuleInclusion() + + +}//end class diff --git a/vendor/squizlabs/php_codesniffer/tests/Core/Ruleset/RuleInclusionAbsoluteWindowsTest.xml b/vendor/squizlabs/php_codesniffer/tests/Core/Ruleset/RuleInclusionAbsoluteWindowsTest.xml new file mode 100644 index 00000000..15710d20 --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/tests/Core/Ruleset/RuleInclusionAbsoluteWindowsTest.xml @@ -0,0 +1,11 @@ + + + + + + + + + + + diff --git a/vendor/squizlabs/php_codesniffer/tests/Core/Ruleset/RuleInclusionTest-include.xml b/vendor/squizlabs/php_codesniffer/tests/Core/Ruleset/RuleInclusionTest-include.xml new file mode 100644 index 00000000..ca116d45 --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/tests/Core/Ruleset/RuleInclusionTest-include.xml @@ -0,0 +1,10 @@ + + + + + + + + + + diff --git a/vendor/squizlabs/php_codesniffer/tests/Core/Ruleset/RuleInclusionTest.php b/vendor/squizlabs/php_codesniffer/tests/Core/Ruleset/RuleInclusionTest.php new file mode 100644 index 00000000..24abe8da --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/tests/Core/Ruleset/RuleInclusionTest.php @@ -0,0 +1,297 @@ + + * @copyright 2019 Juliette Reinders Folmer. All rights reserved. + * @license https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence + */ + +namespace PHP_CodeSniffer\Tests\Core\Ruleset; + +use PHP_CodeSniffer\Config; +use PHP_CodeSniffer\Ruleset; +use PHPUnit\Framework\TestCase; + +class RuleInclusionTest extends TestCase +{ + + /** + * The Ruleset object. + * + * @var \PHP_CodeSniffer\Ruleset + */ + protected static $ruleset; + + /** + * Path to the ruleset file. + * + * @var string + */ + private static $standard = ''; + + /** + * The original content of the ruleset. + * + * @var string + */ + private static $contents = ''; + + + /** + * Initialize the test. + * + * @return void + */ + public function setUp() + { + if ($GLOBALS['PHP_CODESNIFFER_PEAR'] === true) { + // PEAR installs test and sniff files into different locations + // so these tests will not pass as they directly reference files + // by relative location. + $this->markTestSkipped('Test cannot run from a PEAR install'); + } + + }//end setUp() + + + /** + * Initialize the config and ruleset objects based on the `RuleInclusionTest.xml` ruleset file. + * + * @return void + */ + public static function setUpBeforeClass() + { + if ($GLOBALS['PHP_CODESNIFFER_PEAR'] === true) { + // This test will be skipped. + return; + } + + $standard = __DIR__.'/'.basename(__FILE__, '.php').'.xml'; + self::$standard = $standard; + + // On-the-fly adjust the ruleset test file to be able to test + // sniffs included with relative paths. + $contents = file_get_contents($standard); + self::$contents = $contents; + + $repoRootDir = basename(dirname(dirname(dirname(__DIR__)))); + + $newPath = $repoRootDir; + if (DIRECTORY_SEPARATOR === '\\') { + $newPath = str_replace('\\', '/', $repoRootDir); + } + + $adjusted = str_replace('%path_root_dir%', $newPath, $contents); + + if (file_put_contents($standard, $adjusted) === false) { + self::markTestSkipped('On the fly ruleset adjustment failed'); + } + + $config = new Config(["--standard=$standard"]); + self::$ruleset = new Ruleset($config); + + }//end setUpBeforeClass() + + + /** + * Reset ruleset file. + * + * @return void + */ + public function tearDown() + { + file_put_contents(self::$standard, self::$contents); + + }//end tearDown() + + + /** + * Test that sniffs are registered. + * + * @return void + */ + public function testHasSniffCodes() + { + $this->assertObjectHasAttribute('sniffCodes', self::$ruleset); + $this->assertCount(14, self::$ruleset->sniffCodes); + + }//end testHasSniffCodes() + + + /** + * Test that sniffs are correctly registered, independently on the syntax used to include the sniff. + * + * @param string $key Expected array key. + * @param string $value Expected array value. + * + * @dataProvider dataRegisteredSniffCodes + * + * @return void + */ + public function testRegisteredSniffCodes($key, $value) + { + $this->assertArrayHasKey($key, self::$ruleset->sniffCodes); + $this->assertSame($value, self::$ruleset->sniffCodes[$key]); + + }//end testRegisteredSniffCodes() + + + /** + * Data provider. + * + * @see self::testRegisteredSniffCodes() + * + * @return array + */ + public function dataRegisteredSniffCodes() + { + return [ + [ + 'PSR1.Classes.ClassDeclaration', + 'PHP_CodeSniffer\Standards\PSR1\Sniffs\Classes\ClassDeclarationSniff', + ], + [ + 'PSR1.Files.SideEffects', + 'PHP_CodeSniffer\Standards\PSR1\Sniffs\Files\SideEffectsSniff', + ], + [ + 'PSR1.Methods.CamelCapsMethodName', + 'PHP_CodeSniffer\Standards\PSR1\Sniffs\Methods\CamelCapsMethodNameSniff', + ], + [ + 'Generic.PHP.DisallowAlternativePHPTags', + 'PHP_CodeSniffer\Standards\Generic\Sniffs\PHP\DisallowAlternativePHPTagsSniff', + ], + [ + 'Generic.PHP.DisallowShortOpenTag', + 'PHP_CodeSniffer\Standards\Generic\Sniffs\PHP\DisallowShortOpenTagSniff', + ], + [ + 'Generic.Files.ByteOrderMark', + 'PHP_CodeSniffer\Standards\Generic\Sniffs\Files\ByteOrderMarkSniff', + ], + [ + 'Squiz.Classes.ValidClassName', + 'PHP_CodeSniffer\Standards\Squiz\Sniffs\Classes\ValidClassNameSniff', + ], + [ + 'Generic.NamingConventions.UpperCaseConstantName', + 'PHP_CodeSniffer\Standards\Generic\Sniffs\NamingConventions\UpperCaseConstantNameSniff', + ], + [ + 'Zend.NamingConventions.ValidVariableName', + 'PHP_CodeSniffer\Standards\Zend\Sniffs\NamingConventions\ValidVariableNameSniff', + ], + [ + 'Generic.Arrays.ArrayIndent', + 'PHP_CodeSniffer\Standards\Generic\Sniffs\Arrays\ArrayIndentSniff', + ], + [ + 'Generic.Metrics.CyclomaticComplexity', + 'PHP_CodeSniffer\Standards\Generic\Sniffs\Metrics\CyclomaticComplexitySniff', + ], + [ + 'Generic.Files.LineLength', + 'PHP_CodeSniffer\Standards\Generic\Sniffs\Files\LineLengthSniff', + ], + [ + 'Generic.NamingConventions.CamelCapsFunctionName', + 'PHP_CodeSniffer\Standards\Generic\Sniffs\NamingConventions\CamelCapsFunctionNameSniff', + ], + [ + 'Generic.Metrics.NestingLevel', + 'PHP_CodeSniffer\Standards\Generic\Sniffs\Metrics\NestingLevelSniff', + ], + ]; + + }//end dataRegisteredSniffCodes() + + + /** + * Test that setting properties for standards, categories, sniffs works for all supported rule + * inclusion methods. + * + * @param string $sniffClass The name of the sniff class. + * @param string $propertyName The name of the changed property. + * @param mixed $expectedValue The value expected for the property. + * + * @dataProvider dataSettingProperties + * + * @return void + */ + public function testSettingProperties($sniffClass, $propertyName, $expectedValue) + { + $this->assertObjectHasAttribute('sniffs', self::$ruleset); + $this->assertArrayHasKey($sniffClass, self::$ruleset->sniffs); + $this->assertObjectHasAttribute($propertyName, self::$ruleset->sniffs[$sniffClass]); + + $actualValue = self::$ruleset->sniffs[$sniffClass]->$propertyName; + $this->assertSame($expectedValue, $actualValue); + + }//end testSettingProperties() + + + /** + * Data provider. + * + * @see self::testSettingProperties() + * + * @return array + */ + public function dataSettingProperties() + { + return [ + 'ClassDeclarationSniff' => [ + 'PHP_CodeSniffer\Standards\PSR1\Sniffs\Classes\ClassDeclarationSniff', + 'setforallsniffs', + true, + ], + 'SideEffectsSniff' => [ + 'PHP_CodeSniffer\Standards\PSR1\Sniffs\Files\SideEffectsSniff', + 'setforallsniffs', + true, + ], + 'ValidVariableNameSniff' => [ + 'PHP_CodeSniffer\Standards\Zend\Sniffs\NamingConventions\ValidVariableNameSniff', + 'setforallincategory', + true, + ], + 'ArrayIndentSniff' => [ + 'PHP_CodeSniffer\Standards\Generic\Sniffs\Arrays\ArrayIndentSniff', + 'indent', + '2', + ], + 'LineLengthSniff' => [ + 'PHP_CodeSniffer\Standards\Generic\Sniffs\Files\LineLengthSniff', + 'lineLimit', + '10', + ], + 'CamelCapsFunctionNameSniff' => [ + 'PHP_CodeSniffer\Standards\Generic\Sniffs\NamingConventions\CamelCapsFunctionNameSniff', + 'strict', + false, + ], + 'NestingLevelSniff-nestingLevel' => [ + 'PHP_CodeSniffer\Standards\Generic\Sniffs\Metrics\NestingLevelSniff', + 'nestingLevel', + '2', + ], + 'NestingLevelSniff-setforsniffsinincludedruleset' => [ + 'PHP_CodeSniffer\Standards\Generic\Sniffs\Metrics\NestingLevelSniff', + 'setforsniffsinincludedruleset', + true, + ], + + // Testing that setting a property at error code level does *not* work. + 'CyclomaticComplexitySniff' => [ + 'PHP_CodeSniffer\Standards\Generic\Sniffs\Metrics\CyclomaticComplexitySniff', + 'complexity', + 10, + ], + ]; + + }//end dataSettingProperties() + + +}//end class diff --git a/vendor/squizlabs/php_codesniffer/tests/Core/Ruleset/RuleInclusionTest.xml b/vendor/squizlabs/php_codesniffer/tests/Core/Ruleset/RuleInclusionTest.xml new file mode 100644 index 00000000..06ce040e --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/tests/Core/Ruleset/RuleInclusionTest.xml @@ -0,0 +1,46 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/vendor/squizlabs/php_codesniffer/tests/Core/Sniffs/AbstractArraySniffTest.inc b/vendor/squizlabs/php_codesniffer/tests/Core/Sniffs/AbstractArraySniffTest.inc new file mode 100644 index 00000000..48822958 --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/tests/Core/Sniffs/AbstractArraySniffTest.inc @@ -0,0 +1,51 @@ +1,'2'=>2,'3'=>3]; + +/* testMissingKeys */ +$foo = ['1'=>1,2,'3'=>3]; + +/* testMultiTokenKeys */ +$paths = array( + Init::ROOT_DIR.'/a' => 'a', + Init::ROOT_DIR.'/b' => 'b', +); + +/* testMissingKeysCoalesceTernary */ +return [ + $a => static function () { return [1,2,3]; }, + $b ?? $c, + $d ? [$e] : [$f], +]; + +/* testTernaryValues */ +$foo = [ + '1' => $row['status'] === 'rejected' + ? self::REJECTED_CODE + : self::VERIFIED_CODE, + '2' => in_array($row['status'], array('notverified', 'unverified'), true) + ? self::STATUS_PENDING + : self::STATUS_VERIFIED, + '3' => strtotime($row['date']), +]; + +/* testHeredocValues */ +$foo = array( + << '1', + 2 => fn ($x) => yield 'a' => $x, + 3 => '3', +); diff --git a/vendor/squizlabs/php_codesniffer/tests/Core/Sniffs/AbstractArraySniffTest.php b/vendor/squizlabs/php_codesniffer/tests/Core/Sniffs/AbstractArraySniffTest.php new file mode 100644 index 00000000..20c28d60 --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/tests/Core/Sniffs/AbstractArraySniffTest.php @@ -0,0 +1,290 @@ + + * @copyright 2006-2020 Squiz Pty Ltd (ABN 77 084 670 600) + * @license https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence + */ + +namespace PHP_CodeSniffer\Tests\Core\Sniffs; + +use PHP_CodeSniffer\Tests\Core\AbstractMethodUnitTest; + +class AbstractArraySniffTest extends AbstractMethodUnitTest +{ + + /** + * The sniff objects we are testing. + * + * This extends the \PHP_CodeSniffer\Sniffs\AbstractArraySniff class to make the + * internal workings of the sniff observable. + * + * @var \PHP_CodeSniffer\Sniffs\AbstractArraySniffTestable + */ + protected static $sniff; + + + /** + * Initialize & tokenize \PHP_CodeSniffer\Files\File with code from the test case file. + * + * The test case file for a unit test class has to be in the same directory + * directory and use the same file name as the test class, using the .inc extension. + * + * @return void + */ + public static function setUpBeforeClass() + { + self::$sniff = new AbstractArraySniffTestable(); + parent::setUpBeforeClass(); + + }//end setUpBeforeClass() + + + /** + * Test an array of simple values only. + * + * @return void + */ + public function testSimpleValues() + { + $token = $this->getTargetToken('/* testSimpleValues */', T_OPEN_SHORT_ARRAY); + self::$sniff->process(self::$phpcsFile, $token); + + $expected = [ + 0 => ['value_start' => ($token + 1)], + 1 => ['value_start' => ($token + 3)], + 2 => ['value_start' => ($token + 5)], + ]; + + $this->assertSame($expected, self::$sniff->indicies); + + }//end testSimpleValues() + + + /** + * Test an array of simple keys and values. + * + * @return void + */ + public function testSimpleKeyValues() + { + $token = $this->getTargetToken('/* testSimpleKeyValues */', T_OPEN_SHORT_ARRAY); + self::$sniff->process(self::$phpcsFile, $token); + + $expected = [ + 0 => [ + 'index_start' => ($token + 1), + 'index_end' => ($token + 1), + 'arrow' => ($token + 2), + 'value_start' => ($token + 3), + ], + 1 => [ + 'index_start' => ($token + 5), + 'index_end' => ($token + 5), + 'arrow' => ($token + 6), + 'value_start' => ($token + 7), + ], + 2 => [ + 'index_start' => ($token + 9), + 'index_end' => ($token + 9), + 'arrow' => ($token + 10), + 'value_start' => ($token + 11), + ], + ]; + + $this->assertSame($expected, self::$sniff->indicies); + + }//end testSimpleKeyValues() + + + /** + * Test an array of simple keys and values. + * + * @return void + */ + public function testMissingKeys() + { + $token = $this->getTargetToken('/* testMissingKeys */', T_OPEN_SHORT_ARRAY); + self::$sniff->process(self::$phpcsFile, $token); + + $expected = [ + 0 => [ + 'index_start' => ($token + 1), + 'index_end' => ($token + 1), + 'arrow' => ($token + 2), + 'value_start' => ($token + 3), + ], + 1 => [ + 'value_start' => ($token + 5), + ], + 2 => [ + 'index_start' => ($token + 7), + 'index_end' => ($token + 7), + 'arrow' => ($token + 8), + 'value_start' => ($token + 9), + ], + ]; + + $this->assertSame($expected, self::$sniff->indicies); + + }//end testMissingKeys() + + + /** + * Test an array with keys that span multiple tokens. + * + * @return void + */ + public function testMultiTokenKeys() + { + $token = $this->getTargetToken('/* testMultiTokenKeys */', T_ARRAY); + self::$sniff->process(self::$phpcsFile, $token); + + $expected = [ + 0 => [ + 'index_start' => ($token + 4), + 'index_end' => ($token + 8), + 'arrow' => ($token + 10), + 'value_start' => ($token + 12), + ], + 1 => [ + 'index_start' => ($token + 16), + 'index_end' => ($token + 20), + 'arrow' => ($token + 22), + 'value_start' => ($token + 24), + ], + ]; + + $this->assertSame($expected, self::$sniff->indicies); + + }//end testMultiTokenKeys() + + + /** + * Test an array of simple keys and values. + * + * @return void + */ + public function testMissingKeysCoalesceTernary() + { + $token = $this->getTargetToken('/* testMissingKeysCoalesceTernary */', T_OPEN_SHORT_ARRAY); + self::$sniff->process(self::$phpcsFile, $token); + + $expected = [ + 0 => [ + 'index_start' => ($token + 3), + 'index_end' => ($token + 3), + 'arrow' => ($token + 5), + 'value_start' => ($token + 7), + ], + 1 => [ + 'value_start' => ($token + 31), + ], + 2 => [ + 'value_start' => ($token + 39), + ], + ]; + + $this->assertSame($expected, self::$sniff->indicies); + + }//end testMissingKeysCoalesceTernary() + + + /** + * Test an array of ternary values. + * + * @return void + */ + public function testTernaryValues() + { + $token = $this->getTargetToken('/* testTernaryValues */', T_OPEN_SHORT_ARRAY); + self::$sniff->process(self::$phpcsFile, $token); + + $expected = [ + 0 => [ + 'index_start' => ($token + 3), + 'index_end' => ($token + 3), + 'arrow' => ($token + 5), + 'value_start' => ($token + 7), + ], + 1 => [ + 'index_start' => ($token + 32), + 'index_end' => ($token + 32), + 'arrow' => ($token + 34), + 'value_start' => ($token + 36), + ], + 2 => [ + 'index_start' => ($token + 72), + 'index_end' => ($token + 72), + 'arrow' => ($token + 74), + 'value_start' => ($token + 76), + ], + ]; + + $this->assertSame($expected, self::$sniff->indicies); + + }//end testTernaryValues() + + + /** + * Test an array of heredocs. + * + * @return void + */ + public function testHeredocValues() + { + $token = $this->getTargetToken('/* testHeredocValues */', T_ARRAY); + self::$sniff->process(self::$phpcsFile, $token); + + $expected = [ + 0 => [ + 'value_start' => ($token + 4), + ], + 1 => [ + 'value_start' => ($token + 10), + ], + ]; + + $this->assertSame($expected, self::$sniff->indicies); + + }//end testHeredocValues() + + + /** + * Test an array of with an arrow function as a value. + * + * @return void + */ + public function testArrowFunctionValue() + { + $token = $this->getTargetToken('/* testArrowFunctionValue */', T_ARRAY); + self::$sniff->process(self::$phpcsFile, $token); + + $expected = [ + 0 => [ + 'index_start' => ($token + 4), + 'index_end' => ($token + 4), + 'arrow' => ($token + 6), + 'value_start' => ($token + 8), + ], + 1 => [ + 'index_start' => ($token + 12), + 'index_end' => ($token + 12), + 'arrow' => ($token + 14), + 'value_start' => ($token + 16), + ], + 2 => [ + 'index_start' => ($token + 34), + 'index_end' => ($token + 34), + 'arrow' => ($token + 36), + 'value_start' => ($token + 38), + ], + ]; + + $this->assertSame($expected, self::$sniff->indicies); + + }//end testArrowFunctionValue() + + +}//end class diff --git a/vendor/squizlabs/php_codesniffer/tests/Core/Sniffs/AbstractArraySniffTestable.php b/vendor/squizlabs/php_codesniffer/tests/Core/Sniffs/AbstractArraySniffTestable.php new file mode 100644 index 00000000..a224012f --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/tests/Core/Sniffs/AbstractArraySniffTestable.php @@ -0,0 +1,65 @@ + + * @copyright 2006-2020 Squiz Pty Ltd (ABN 77 084 670 600) + * @license https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence + */ + +namespace PHP_CodeSniffer\Tests\Core\Sniffs; + +use PHP_CodeSniffer\Sniffs\AbstractArraySniff; + +class AbstractArraySniffTestable extends AbstractArraySniff +{ + + /** + * The array indicies that were found during processing. + * + * @var array + */ + public $indicies = []; + + + /** + * Processes a single-line array definition. + * + * @param \PHP_CodeSniffer\Files\File $phpcsFile The current file being checked. + * @param int $stackPtr The position of the current token + * in the stack passed in $tokens. + * @param int $arrayStart The token that starts the array definition. + * @param int $arrayEnd The token that ends the array definition. + * @param array $indices An array of token positions for the array keys, + * double arrows, and values. + * + * @return void + */ + public function processSingleLineArray($phpcsFile, $stackPtr, $arrayStart, $arrayEnd, $indices) + { + $this->indicies = $indices; + + }//end processSingleLineArray() + + + /** + * Processes a multi-line array definition. + * + * @param \PHP_CodeSniffer\Files\File $phpcsFile The current file being checked. + * @param int $stackPtr The position of the current token + * in the stack passed in $tokens. + * @param int $arrayStart The token that starts the array definition. + * @param int $arrayEnd The token that ends the array definition. + * @param array $indices An array of token positions for the array keys, + * double arrows, and values. + * + * @return void + */ + public function processMultiLineArray($phpcsFile, $stackPtr, $arrayStart, $arrayEnd, $indices) + { + $this->indicies = $indices; + + }//end processMultiLineArray() + + +}//end class diff --git a/vendor/squizlabs/php_codesniffer/tests/Core/Tokenizer/AnonClassParenthesisOwnerTest.inc b/vendor/squizlabs/php_codesniffer/tests/Core/Tokenizer/AnonClassParenthesisOwnerTest.inc new file mode 100644 index 00000000..5867691c --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/tests/Core/Tokenizer/AnonClassParenthesisOwnerTest.inc @@ -0,0 +1,19 @@ + + * @copyright 2019 Squiz Pty Ltd (ABN 77 084 670 600) + * @license https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence + */ + +namespace PHP_CodeSniffer\Tests\Core\Tokenizer; + +use PHP_CodeSniffer\Tests\Core\AbstractMethodUnitTest; + +class AnonClassParenthesisOwnerTest extends AbstractMethodUnitTest +{ + + + /** + * Test that anonymous class tokens without parenthesis do not get assigned a parenthesis owner. + * + * @param string $testMarker The comment which prefaces the target token in the test file. + * + * @dataProvider dataAnonClassNoParentheses + * @covers PHP_CodeSniffer\Tokenizers\PHP::processAdditional + * + * @return void + */ + public function testAnonClassNoParentheses($testMarker) + { + $tokens = self::$phpcsFile->getTokens(); + + $anonClass = $this->getTargetToken($testMarker, T_ANON_CLASS); + $this->assertFalse(array_key_exists('parenthesis_owner', $tokens[$anonClass])); + $this->assertFalse(array_key_exists('parenthesis_opener', $tokens[$anonClass])); + $this->assertFalse(array_key_exists('parenthesis_closer', $tokens[$anonClass])); + + }//end testAnonClassNoParentheses() + + + /** + * Test that the next open/close parenthesis after an anonymous class without parenthesis + * do not get assigned the anonymous class as a parenthesis owner. + * + * @param string $testMarker The comment which prefaces the target token in the test file. + * + * @dataProvider dataAnonClassNoParentheses + * @covers PHP_CodeSniffer\Tokenizers\PHP::processAdditional + * + * @return void + */ + public function testAnonClassNoParenthesesNextOpenClose($testMarker) + { + $tokens = self::$phpcsFile->getTokens(); + $function = $this->getTargetToken($testMarker, T_FUNCTION); + + $opener = $this->getTargetToken($testMarker, T_OPEN_PARENTHESIS); + $this->assertTrue(array_key_exists('parenthesis_owner', $tokens[$opener])); + $this->assertSame($function, $tokens[$opener]['parenthesis_owner']); + + $closer = $this->getTargetToken($testMarker, T_CLOSE_PARENTHESIS); + $this->assertTrue(array_key_exists('parenthesis_owner', $tokens[$closer])); + $this->assertSame($function, $tokens[$closer]['parenthesis_owner']); + + }//end testAnonClassNoParenthesesNextOpenClose() + + + /** + * Data provider. + * + * @see testAnonClassNoParentheses() + * @see testAnonClassNoParenthesesNextOpenClose() + * + * @return array + */ + public function dataAnonClassNoParentheses() + { + return [ + ['/* testNoParentheses */'], + ['/* testNoParenthesesAndEmptyTokens */'], + ]; + + }//end dataAnonClassNoParentheses() + + + /** + * Test that anonymous class tokens with parenthesis get assigned a parenthesis owner, + * opener and closer; and that the opener/closer get the anonymous class assigned as owner. + * + * @param string $testMarker The comment which prefaces the target token in the test file. + * + * @dataProvider dataAnonClassWithParentheses + * @covers PHP_CodeSniffer\Tokenizers\PHP::processAdditional + * + * @return void + */ + public function testAnonClassWithParentheses($testMarker) + { + $tokens = self::$phpcsFile->getTokens(); + $anonClass = $this->getTargetToken($testMarker, T_ANON_CLASS); + $opener = $this->getTargetToken($testMarker, T_OPEN_PARENTHESIS); + $closer = $this->getTargetToken($testMarker, T_CLOSE_PARENTHESIS); + + $this->assertTrue(array_key_exists('parenthesis_owner', $tokens[$anonClass])); + $this->assertTrue(array_key_exists('parenthesis_opener', $tokens[$anonClass])); + $this->assertTrue(array_key_exists('parenthesis_closer', $tokens[$anonClass])); + $this->assertSame($anonClass, $tokens[$anonClass]['parenthesis_owner']); + $this->assertSame($opener, $tokens[$anonClass]['parenthesis_opener']); + $this->assertSame($closer, $tokens[$anonClass]['parenthesis_closer']); + + $this->assertTrue(array_key_exists('parenthesis_owner', $tokens[$opener])); + $this->assertTrue(array_key_exists('parenthesis_opener', $tokens[$opener])); + $this->assertTrue(array_key_exists('parenthesis_closer', $tokens[$opener])); + $this->assertSame($anonClass, $tokens[$opener]['parenthesis_owner']); + $this->assertSame($opener, $tokens[$opener]['parenthesis_opener']); + $this->assertSame($closer, $tokens[$opener]['parenthesis_closer']); + + $this->assertTrue(array_key_exists('parenthesis_owner', $tokens[$closer])); + $this->assertTrue(array_key_exists('parenthesis_opener', $tokens[$closer])); + $this->assertTrue(array_key_exists('parenthesis_closer', $tokens[$closer])); + $this->assertSame($anonClass, $tokens[$closer]['parenthesis_owner']); + $this->assertSame($opener, $tokens[$closer]['parenthesis_opener']); + $this->assertSame($closer, $tokens[$closer]['parenthesis_closer']); + + }//end testAnonClassWithParentheses() + + + /** + * Data provider. + * + * @see testAnonClassWithParentheses() + * + * @return array + */ + public function dataAnonClassWithParentheses() + { + return [ + ['/* testWithParentheses */'], + ['/* testWithParenthesesAndEmptyTokens */'], + ]; + + }//end dataAnonClassWithParentheses() + + +}//end class diff --git a/vendor/squizlabs/php_codesniffer/tests/Core/Tokenizer/ArrayKeywordTest.inc b/vendor/squizlabs/php_codesniffer/tests/Core/Tokenizer/ArrayKeywordTest.inc new file mode 100644 index 00000000..ce5c553c --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/tests/Core/Tokenizer/ArrayKeywordTest.inc @@ -0,0 +1,35 @@ + 10); + +/* testArrayWithComment */ +$var = Array /*comment*/ (1 => 10); + +/* testNestingArray */ +$var = array( + /* testNestedArray */ + array( + 'key' => 'value', + + /* testClosureReturnType */ + 'closure' => function($a) use($global) : Array {}, + ), +); + +/* testFunctionDeclarationParamType */ +function foo(array $a) {} + +/* testFunctionDeclarationReturnType */ +function foo($a) : int|array|null {} + +class Bar { + /* testClassConst */ + const ARRAY = []; + + /* testClassMethod */ + public function array() {} +} diff --git a/vendor/squizlabs/php_codesniffer/tests/Core/Tokenizer/ArrayKeywordTest.php b/vendor/squizlabs/php_codesniffer/tests/Core/Tokenizer/ArrayKeywordTest.php new file mode 100644 index 00000000..237258a6 --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/tests/Core/Tokenizer/ArrayKeywordTest.php @@ -0,0 +1,170 @@ + + * @copyright 2021 Squiz Pty Ltd (ABN 77 084 670 600) + * @license https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence + */ + +namespace PHP_CodeSniffer\Tests\Core\Tokenizer; + +use PHP_CodeSniffer\Tests\Core\AbstractMethodUnitTest; + +class ArrayKeywordTest extends AbstractMethodUnitTest +{ + + + /** + * Test that the array keyword is correctly tokenized as `T_ARRAY`. + * + * @param string $testMarker The comment prefacing the target token. + * @param string $testContent Optional. The token content to look for. + * + * @dataProvider dataArrayKeyword + * @covers PHP_CodeSniffer\Tokenizers\PHP::tokenize + * @covers PHP_CodeSniffer\Tokenizers\Tokenizer::createTokenMap + * + * @return void + */ + public function testArrayKeyword($testMarker, $testContent='array') + { + $tokens = self::$phpcsFile->getTokens(); + + $token = $this->getTargetToken($testMarker, [T_ARRAY, T_STRING], $testContent); + $tokenArray = $tokens[$token]; + + $this->assertSame(T_ARRAY, $tokenArray['code'], 'Token tokenized as '.$tokenArray['type'].', not T_ARRAY (code)'); + $this->assertSame('T_ARRAY', $tokenArray['type'], 'Token tokenized as '.$tokenArray['type'].', not T_ARRAY (type)'); + + $this->assertArrayHasKey('parenthesis_owner', $tokenArray, 'Parenthesis owner is not set'); + $this->assertArrayHasKey('parenthesis_opener', $tokenArray, 'Parenthesis opener is not set'); + $this->assertArrayHasKey('parenthesis_closer', $tokenArray, 'Parenthesis closer is not set'); + + }//end testArrayKeyword() + + + /** + * Data provider. + * + * @see testArrayKeyword() + * + * @return array + */ + public function dataArrayKeyword() + { + return [ + 'empty array' => ['/* testEmptyArray */'], + 'array with space before parenthesis' => ['/* testArrayWithSpace */'], + 'array with comment before parenthesis' => [ + '/* testArrayWithComment */', + 'Array', + ], + 'nested: outer array' => ['/* testNestingArray */'], + 'nested: inner array' => ['/* testNestedArray */'], + ]; + + }//end dataArrayKeyword() + + + /** + * Test that the array keyword when used in a type declaration is correctly tokenized as `T_STRING`. + * + * @param string $testMarker The comment prefacing the target token. + * @param string $testContent Optional. The token content to look for. + * + * @dataProvider dataArrayType + * @covers PHP_CodeSniffer\Tokenizers\PHP::tokenize + * @covers PHP_CodeSniffer\Tokenizers\Tokenizer::createTokenMap + * + * @return void + */ + public function testArrayType($testMarker, $testContent='array') + { + $tokens = self::$phpcsFile->getTokens(); + + $token = $this->getTargetToken($testMarker, [T_ARRAY, T_STRING], $testContent); + $tokenArray = $tokens[$token]; + + $this->assertSame(T_STRING, $tokenArray['code'], 'Token tokenized as '.$tokenArray['type'].', not T_STRING (code)'); + $this->assertSame('T_STRING', $tokenArray['type'], 'Token tokenized as '.$tokenArray['type'].', not T_STRING (type)'); + + $this->assertArrayNotHasKey('parenthesis_owner', $tokenArray, 'Parenthesis owner is set'); + $this->assertArrayNotHasKey('parenthesis_opener', $tokenArray, 'Parenthesis opener is set'); + $this->assertArrayNotHasKey('parenthesis_closer', $tokenArray, 'Parenthesis closer is set'); + + }//end testArrayType() + + + /** + * Data provider. + * + * @see testArrayType() + * + * @return array + */ + public function dataArrayType() + { + return [ + 'closure return type' => [ + '/* testClosureReturnType */', + 'Array', + ], + 'function param type' => ['/* testFunctionDeclarationParamType */'], + 'function union return type' => ['/* testFunctionDeclarationReturnType */'], + ]; + + }//end dataArrayType() + + + /** + * Verify that the retokenization of `T_ARRAY` tokens to `T_STRING` is handled correctly + * for tokens with the contents 'array' which aren't in actual fact the array keyword. + * + * @param string $testMarker The comment prefacing the target token. + * @param string $testContent The token content to look for. + * + * @dataProvider dataNotArrayKeyword + * @covers PHP_CodeSniffer\Tokenizers\PHP::tokenize + * @covers PHP_CodeSniffer\Tokenizers\Tokenizer::createTokenMap + * + * @return void + */ + public function testNotArrayKeyword($testMarker, $testContent='array') + { + $tokens = self::$phpcsFile->getTokens(); + + $token = $this->getTargetToken($testMarker, [T_ARRAY, T_STRING], $testContent); + $tokenArray = $tokens[$token]; + + $this->assertSame(T_STRING, $tokenArray['code'], 'Token tokenized as '.$tokenArray['type'].', not T_STRING (code)'); + $this->assertSame('T_STRING', $tokenArray['type'], 'Token tokenized as '.$tokenArray['type'].', not T_STRING (type)'); + + $this->assertArrayNotHasKey('parenthesis_owner', $tokenArray, 'Parenthesis owner is set'); + $this->assertArrayNotHasKey('parenthesis_opener', $tokenArray, 'Parenthesis opener is set'); + $this->assertArrayNotHasKey('parenthesis_closer', $tokenArray, 'Parenthesis closer is set'); + + }//end testNotArrayKeyword() + + + /** + * Data provider. + * + * @see testNotArrayKeyword() + * + * @return array + */ + public function dataNotArrayKeyword() + { + return [ + 'class-constant-name' => [ + '/* testClassConst */', + 'ARRAY', + ], + 'class-method-name' => ['/* testClassMethod */'], + ]; + + }//end dataNotArrayKeyword() + + +}//end class diff --git a/vendor/squizlabs/php_codesniffer/tests/Core/Tokenizer/AttributesTest.inc b/vendor/squizlabs/php_codesniffer/tests/Core/Tokenizer/AttributesTest.inc new file mode 100644 index 00000000..e539adf8 --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/tests/Core/Tokenizer/AttributesTest.inc @@ -0,0 +1,90 @@ + 'foobar'])] +function attribute_with_params_on_function_test() {} + +/* testAttributeWithShortClosureParameter */ +#[AttributeWithParams(static fn ($value) => ! $value)] +function attribute_with_short_closure_param_test() {} + +/* testTwoAttributeOnTheSameLine */ +#[CustomAttribute] #[AttributeWithParams('foo')] +function two_attribute_on_same_line_test() {} + +/* testAttributeAndCommentOnTheSameLine */ +#[CustomAttribute] // This is a comment +function attribute_and_line_comment_on_same_line_test() {} + +/* testAttributeGrouping */ +#[CustomAttribute, AttributeWithParams('foo'), AttributeWithParams('foo', bar: ['bar' => 'foobar'])] +function attribute_grouping_test() {} + +/* testAttributeMultiline */ +#[ + CustomAttribute, + AttributeWithParams('foo'), + AttributeWithParams('foo', bar: ['bar' => 'foobar']) +] +function attribute_multiline_test() {} + +/* testAttributeMultilineWithComment */ +#[ + CustomAttribute, // comment + AttributeWithParams(/* another comment */ 'foo'), + AttributeWithParams('foo', bar: ['bar' => 'foobar']) +] +function attribute_multiline_with_comment_test() {} + +/* testSingleAttributeOnParameter */ +function single_attribute_on_parameter_test(#[ParamAttribute] int $param) {} + +/* testMultipleAttributesOnParameter */ +function multiple_attributes_on_parameter_test(#[ParamAttribute, AttributeWithParams(/* another comment */ 'foo')] int $param) {} + +/* testFqcnAttribute */ +#[Boo\QualifiedName, \Foo\FullyQualifiedName('foo')] +function fqcn_attrebute_test() {} + +/* testNestedAttributes */ +#[Boo\QualifiedName(fn (#[AttributeOne('boo')] $value) => (string) $value)] +function nested_attributes_test() {} + +/* testMultilineAttributesOnParameter */ +function multiline_attributes_on_parameter_test(#[ + AttributeWithParams( + 'foo' + ) + ] int $param) {} + +/* testAttributeContainingTextLookingLikeCloseTag */ +#[DeprecationReason('reason: ')] +function attribute_containing_text_looking_like_close_tag() {} + +/* testAttributeContainingMultilineTextLookingLikeCloseTag */ +#[DeprecationReason( + 'reason: ' +)] +function attribute_containing_mulitline_text_looking_like_close_tag() {} + +/* testInvalidAttribute */ +#[ThisIsNotAnAttribute +function invalid_attribute_test() {} diff --git a/vendor/squizlabs/php_codesniffer/tests/Core/Tokenizer/AttributesTest.php b/vendor/squizlabs/php_codesniffer/tests/Core/Tokenizer/AttributesTest.php new file mode 100644 index 00000000..b10a1efb --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/tests/Core/Tokenizer/AttributesTest.php @@ -0,0 +1,659 @@ + + * @copyright 2019 Squiz Pty Ltd (ABN 77 084 670 600) + * @license https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence + */ + +namespace PHP_CodeSniffer\Tests\Core\Tokenizer; + +use PHP_CodeSniffer\Tests\Core\AbstractMethodUnitTest; +use PHP_CodeSniffer\Util\Tokens; + +class AttributesTest extends AbstractMethodUnitTest +{ + + + /** + * Test that attributes are parsed correctly. + * + * @param string $testMarker The comment which prefaces the target token in the test file. + * @param int $length The number of tokens between opener and closer. + * @param array $tokenCodes The codes of tokens inside the attributes. + * + * @dataProvider dataAttribute + * @covers PHP_CodeSniffer\Tokenizers\PHP::tokenize + * @covers PHP_CodeSniffer\Tokenizers\PHP::findCloser + * @covers PHP_CodeSniffer\Tokenizers\PHP::parsePhpAttribute + * + * @return void + */ + public function testAttribute($testMarker, $length, $tokenCodes) + { + $tokens = self::$phpcsFile->getTokens(); + + $attribute = $this->getTargetToken($testMarker, T_ATTRIBUTE); + $this->assertArrayHasKey('attribute_closer', $tokens[$attribute]); + + $closer = $tokens[$attribute]['attribute_closer']; + $this->assertSame(($attribute + $length), $closer); + + $this->assertSame(T_ATTRIBUTE_END, $tokens[$closer]['code']); + + $this->assertSame($tokens[$attribute]['attribute_opener'], $tokens[$closer]['attribute_opener']); + $this->assertSame($tokens[$attribute]['attribute_closer'], $tokens[$closer]['attribute_closer']); + + $map = array_map( + function ($token) use ($attribute, $length) { + $this->assertArrayHasKey('attribute_closer', $token); + $this->assertSame(($attribute + $length), $token['attribute_closer']); + + return $token['code']; + }, + array_slice($tokens, ($attribute + 1), ($length - 1)) + ); + + $this->assertSame($tokenCodes, $map); + + }//end testAttribute() + + + /** + * Data provider. + * + * @see testAttribute() + * + * @return array + */ + public function dataAttribute() + { + return [ + [ + '/* testAttribute */', + 2, + [ T_STRING ], + ], + [ + '/* testAttributeWithParams */', + 7, + [ + T_STRING, + T_OPEN_PARENTHESIS, + T_STRING, + T_DOUBLE_COLON, + T_STRING, + T_CLOSE_PARENTHESIS, + ], + ], + [ + '/* testAttributeWithNamedParam */', + 10, + [ + T_STRING, + T_OPEN_PARENTHESIS, + T_PARAM_NAME, + T_COLON, + T_WHITESPACE, + T_STRING, + T_DOUBLE_COLON, + T_STRING, + T_CLOSE_PARENTHESIS, + ], + ], + [ + '/* testAttributeOnFunction */', + 2, + [ T_STRING ], + ], + [ + '/* testAttributeOnFunctionWithParams */', + 17, + [ + T_STRING, + T_OPEN_PARENTHESIS, + T_CONSTANT_ENCAPSED_STRING, + T_COMMA, + T_WHITESPACE, + T_PARAM_NAME, + T_COLON, + T_WHITESPACE, + T_OPEN_SHORT_ARRAY, + T_CONSTANT_ENCAPSED_STRING, + T_WHITESPACE, + T_DOUBLE_ARROW, + T_WHITESPACE, + T_CONSTANT_ENCAPSED_STRING, + T_CLOSE_SHORT_ARRAY, + T_CLOSE_PARENTHESIS, + ], + ], + [ + '/* testAttributeWithShortClosureParameter */', + 17, + [ + T_STRING, + T_OPEN_PARENTHESIS, + T_STATIC, + T_WHITESPACE, + T_FN, + T_WHITESPACE, + T_OPEN_PARENTHESIS, + T_VARIABLE, + T_CLOSE_PARENTHESIS, + T_WHITESPACE, + T_FN_ARROW, + T_WHITESPACE, + T_BOOLEAN_NOT, + T_WHITESPACE, + T_VARIABLE, + T_CLOSE_PARENTHESIS, + ], + ], + [ + '/* testAttributeGrouping */', + 26, + [ + T_STRING, + T_COMMA, + T_WHITESPACE, + T_STRING, + T_OPEN_PARENTHESIS, + T_CONSTANT_ENCAPSED_STRING, + T_CLOSE_PARENTHESIS, + T_COMMA, + T_WHITESPACE, + T_STRING, + T_OPEN_PARENTHESIS, + T_CONSTANT_ENCAPSED_STRING, + T_COMMA, + T_WHITESPACE, + T_PARAM_NAME, + T_COLON, + T_WHITESPACE, + T_OPEN_SHORT_ARRAY, + T_CONSTANT_ENCAPSED_STRING, + T_WHITESPACE, + T_DOUBLE_ARROW, + T_WHITESPACE, + T_CONSTANT_ENCAPSED_STRING, + T_CLOSE_SHORT_ARRAY, + T_CLOSE_PARENTHESIS, + ], + ], + [ + '/* testAttributeMultiline */', + 31, + [ + T_WHITESPACE, + T_WHITESPACE, + T_STRING, + T_COMMA, + T_WHITESPACE, + T_WHITESPACE, + T_STRING, + T_OPEN_PARENTHESIS, + T_CONSTANT_ENCAPSED_STRING, + T_CLOSE_PARENTHESIS, + T_COMMA, + T_WHITESPACE, + T_WHITESPACE, + T_STRING, + T_OPEN_PARENTHESIS, + T_CONSTANT_ENCAPSED_STRING, + T_COMMA, + T_WHITESPACE, + T_PARAM_NAME, + T_COLON, + T_WHITESPACE, + T_OPEN_SHORT_ARRAY, + T_CONSTANT_ENCAPSED_STRING, + T_WHITESPACE, + T_DOUBLE_ARROW, + T_WHITESPACE, + T_CONSTANT_ENCAPSED_STRING, + T_CLOSE_SHORT_ARRAY, + T_CLOSE_PARENTHESIS, + T_WHITESPACE, + ], + ], + [ + '/* testFqcnAttribute */', + 13, + [ + T_STRING, + T_NS_SEPARATOR, + T_STRING, + T_COMMA, + T_WHITESPACE, + T_NS_SEPARATOR, + T_STRING, + T_NS_SEPARATOR, + T_STRING, + T_OPEN_PARENTHESIS, + T_CONSTANT_ENCAPSED_STRING, + T_CLOSE_PARENTHESIS, + ], + ], + ]; + + }//end dataAttribute() + + + /** + * Test that multiple attributes on the same line are parsed correctly. + * + * @covers PHP_CodeSniffer\Tokenizers\PHP::tokenize + * @covers PHP_CodeSniffer\Tokenizers\PHP::findCloser + * @covers PHP_CodeSniffer\Tokenizers\PHP::parsePhpAttribute + * + * @return void + */ + public function testTwoAttributesOnTheSameLine() + { + $tokens = self::$phpcsFile->getTokens(); + + $attribute = $this->getTargetToken('/* testTwoAttributeOnTheSameLine */', T_ATTRIBUTE); + $this->assertArrayHasKey('attribute_closer', $tokens[$attribute]); + + $closer = $tokens[$attribute]['attribute_closer']; + $this->assertSame(T_WHITESPACE, $tokens[($closer + 1)]['code']); + $this->assertSame(T_ATTRIBUTE, $tokens[($closer + 2)]['code']); + $this->assertArrayHasKey('attribute_closer', $tokens[($closer + 2)]); + + }//end testTwoAttributesOnTheSameLine() + + + /** + * Test that attribute followed by a line comment is parsed correctly. + * + * @covers PHP_CodeSniffer\Tokenizers\PHP::tokenize + * @covers PHP_CodeSniffer\Tokenizers\PHP::findCloser + * @covers PHP_CodeSniffer\Tokenizers\PHP::parsePhpAttribute + * + * @return void + */ + public function testAttributeAndLineComment() + { + $tokens = self::$phpcsFile->getTokens(); + + $attribute = $this->getTargetToken('/* testAttributeAndCommentOnTheSameLine */', T_ATTRIBUTE); + $this->assertArrayHasKey('attribute_closer', $tokens[$attribute]); + + $closer = $tokens[$attribute]['attribute_closer']; + $this->assertSame(T_WHITESPACE, $tokens[($closer + 1)]['code']); + $this->assertSame(T_COMMENT, $tokens[($closer + 2)]['code']); + + }//end testAttributeAndLineComment() + + + /** + * Test that attribute followed by a line comment is parsed correctly. + * + * @param string $testMarker The comment which prefaces the target token in the test file. + * @param int $position The token position (starting from T_FUNCTION) of T_ATTRIBUTE token. + * @param int $length The number of tokens between opener and closer. + * @param array $tokenCodes The codes of tokens inside the attributes. + * + * @dataProvider dataAttributeOnParameters + * + * @covers PHP_CodeSniffer\Tokenizers\PHP::tokenize + * @covers PHP_CodeSniffer\Tokenizers\PHP::findCloser + * @covers PHP_CodeSniffer\Tokenizers\PHP::parsePhpAttribute + * + * @return void + */ + public function testAttributeOnParameters($testMarker, $position, $length, array $tokenCodes) + { + $tokens = self::$phpcsFile->getTokens(); + + $function = $this->getTargetToken($testMarker, T_FUNCTION); + $attribute = ($function + $position); + + $this->assertSame(T_ATTRIBUTE, $tokens[$attribute]['code']); + $this->assertArrayHasKey('attribute_closer', $tokens[$attribute]); + + $this->assertSame(($attribute + $length), $tokens[$attribute]['attribute_closer']); + + $closer = $tokens[$attribute]['attribute_closer']; + $this->assertSame(T_WHITESPACE, $tokens[($closer + 1)]['code']); + $this->assertSame(T_STRING, $tokens[($closer + 2)]['code']); + $this->assertSame('int', $tokens[($closer + 2)]['content']); + + $this->assertSame(T_VARIABLE, $tokens[($closer + 4)]['code']); + $this->assertSame('$param', $tokens[($closer + 4)]['content']); + + $map = array_map( + function ($token) use ($attribute, $length) { + $this->assertArrayHasKey('attribute_closer', $token); + $this->assertSame(($attribute + $length), $token['attribute_closer']); + + return $token['code']; + }, + array_slice($tokens, ($attribute + 1), ($length - 1)) + ); + + $this->assertSame($tokenCodes, $map); + + }//end testAttributeOnParameters() + + + /** + * Data provider. + * + * @see testAttributeOnParameters() + * + * @return array + */ + public function dataAttributeOnParameters() + { + return [ + [ + '/* testSingleAttributeOnParameter */', + 4, + 2, + [T_STRING], + ], + [ + '/* testMultipleAttributesOnParameter */', + 4, + 10, + [ + T_STRING, + T_COMMA, + T_WHITESPACE, + T_STRING, + T_OPEN_PARENTHESIS, + T_COMMENT, + T_WHITESPACE, + T_CONSTANT_ENCAPSED_STRING, + T_CLOSE_PARENTHESIS, + ], + ], + [ + '/* testMultilineAttributesOnParameter */', + 4, + 13, + [ + T_WHITESPACE, + T_WHITESPACE, + T_STRING, + T_OPEN_PARENTHESIS, + T_WHITESPACE, + T_WHITESPACE, + T_CONSTANT_ENCAPSED_STRING, + T_WHITESPACE, + T_WHITESPACE, + T_CLOSE_PARENTHESIS, + T_WHITESPACE, + T_WHITESPACE, + ], + ], + ]; + + }//end dataAttributeOnParameters() + + + /** + * Test that an attribute containing text which looks like a PHP close tag is tokenized correctly. + * + * @param string $testMarker The comment which prefaces the target token in the test file. + * @param int $length The number of tokens between opener and closer. + * @param array $expectedTokensAttribute The codes of tokens inside the attributes. + * @param array $expectedTokensAfter The codes of tokens after the attributes. + * + * @covers PHP_CodeSniffer\Tokenizers\PHP::parsePhpAttribute + * + * @dataProvider dataAttributeOnTextLookingLikeCloseTag + * + * @return void + */ + public function testAttributeContainingTextLookingLikeCloseTag($testMarker, $length, array $expectedTokensAttribute, array $expectedTokensAfter) + { + $tokens = self::$phpcsFile->getTokens(); + + $attribute = $this->getTargetToken($testMarker, T_ATTRIBUTE); + + $this->assertSame('T_ATTRIBUTE', $tokens[$attribute]['type']); + $this->assertArrayHasKey('attribute_closer', $tokens[$attribute]); + + $closer = $tokens[$attribute]['attribute_closer']; + $this->assertSame(($attribute + $length), $closer); + $this->assertSame(T_ATTRIBUTE_END, $tokens[$closer]['code']); + $this->assertSame('T_ATTRIBUTE_END', $tokens[$closer]['type']); + + $this->assertSame($tokens[$attribute]['attribute_opener'], $tokens[$closer]['attribute_opener']); + $this->assertSame($tokens[$attribute]['attribute_closer'], $tokens[$closer]['attribute_closer']); + + $i = ($attribute + 1); + foreach ($expectedTokensAttribute as $item) { + list($expectedType, $expectedContents) = $item; + $this->assertSame($expectedType, $tokens[$i]['type']); + $this->assertSame($expectedContents, $tokens[$i]['content']); + $this->assertArrayHasKey('attribute_opener', $tokens[$i]); + $this->assertArrayHasKey('attribute_closer', $tokens[$i]); + ++$i; + } + + $i = ($closer + 1); + foreach ($expectedTokensAfter as $expectedCode) { + $this->assertSame($expectedCode, $tokens[$i]['code']); + ++$i; + } + + }//end testAttributeContainingTextLookingLikeCloseTag() + + + /** + * Data provider. + * + * @see dataAttributeOnTextLookingLikeCloseTag() + * + * @return array + */ + public function dataAttributeOnTextLookingLikeCloseTag() + { + return [ + [ + '/* testAttributeContainingTextLookingLikeCloseTag */', + 5, + [ + [ + 'T_STRING', + 'DeprecationReason', + ], + [ + 'T_OPEN_PARENTHESIS', + '(', + ], + [ + 'T_CONSTANT_ENCAPSED_STRING', + "'reason: '", + ], + [ + 'T_CLOSE_PARENTHESIS', + ')', + ], + [ + 'T_ATTRIBUTE_END', + ']', + ], + ], + [ + T_WHITESPACE, + T_FUNCTION, + T_WHITESPACE, + T_STRING, + T_OPEN_PARENTHESIS, + T_CLOSE_PARENTHESIS, + T_WHITESPACE, + T_OPEN_CURLY_BRACKET, + T_CLOSE_CURLY_BRACKET, + ], + ], + [ + '/* testAttributeContainingMultilineTextLookingLikeCloseTag */', + 8, + [ + [ + 'T_STRING', + 'DeprecationReason', + ], + [ + 'T_OPEN_PARENTHESIS', + '(', + ], + [ + 'T_WHITESPACE', + "\n", + ], + [ + 'T_WHITESPACE', + " ", + ], + [ + 'T_CONSTANT_ENCAPSED_STRING', + "'reason: '", + ], + [ + 'T_WHITESPACE', + "\n", + ], + [ + 'T_CLOSE_PARENTHESIS', + ')', + ], + [ + 'T_ATTRIBUTE_END', + ']', + ], + ], + [ + T_WHITESPACE, + T_FUNCTION, + T_WHITESPACE, + T_STRING, + T_OPEN_PARENTHESIS, + T_CLOSE_PARENTHESIS, + T_WHITESPACE, + T_OPEN_CURLY_BRACKET, + T_CLOSE_CURLY_BRACKET, + ], + ], + ]; + + }//end dataAttributeOnTextLookingLikeCloseTag() + + + /** + * Test that invalid attribute (or comment starting with #[ and without ]) are parsed correctly. + * + * @covers PHP_CodeSniffer\Tokenizers\PHP::tokenize + * @covers PHP_CodeSniffer\Tokenizers\PHP::findCloser + * @covers PHP_CodeSniffer\Tokenizers\PHP::parsePhpAttribute + * + * @return void + */ + public function testInvalidAttribute() + { + $tokens = self::$phpcsFile->getTokens(); + + $attribute = $this->getTargetToken('/* testInvalidAttribute */', T_ATTRIBUTE); + + $this->assertArrayHasKey('attribute_closer', $tokens[$attribute]); + $this->assertNull($tokens[$attribute]['attribute_closer']); + + }//end testInvalidAttribute() + + + /** + * Test that nested attributes are parsed correctly. + * + * @covers PHP_CodeSniffer\Tokenizers\PHP::tokenize + * @covers PHP_CodeSniffer\Tokenizers\PHP::findCloser + * @covers PHP_CodeSniffer\Tokenizers\PHP::parsePhpAttribute + * + * @return void + */ + public function testNestedAttributes() + { + $tokens = self::$phpcsFile->getTokens(); + $tokenCodes = [ + T_STRING, + T_NS_SEPARATOR, + T_STRING, + T_OPEN_PARENTHESIS, + T_FN, + T_WHITESPACE, + T_OPEN_PARENTHESIS, + T_ATTRIBUTE, + T_STRING, + T_OPEN_PARENTHESIS, + T_CONSTANT_ENCAPSED_STRING, + T_CLOSE_PARENTHESIS, + T_ATTRIBUTE_END, + T_WHITESPACE, + T_VARIABLE, + T_CLOSE_PARENTHESIS, + T_WHITESPACE, + T_FN_ARROW, + T_WHITESPACE, + T_STRING_CAST, + T_WHITESPACE, + T_VARIABLE, + T_CLOSE_PARENTHESIS, + ]; + + $attribute = $this->getTargetToken('/* testNestedAttributes */', T_ATTRIBUTE); + $this->assertArrayHasKey('attribute_closer', $tokens[$attribute]); + + $closer = $tokens[$attribute]['attribute_closer']; + $this->assertSame(($attribute + 24), $closer); + + $this->assertSame(T_ATTRIBUTE_END, $tokens[$closer]['code']); + + $this->assertSame($tokens[$attribute]['attribute_opener'], $tokens[$closer]['attribute_opener']); + $this->assertSame($tokens[$attribute]['attribute_closer'], $tokens[$closer]['attribute_closer']); + + $this->assertArrayNotHasKey('nested_attributes', $tokens[$attribute]); + $this->assertArrayHasKey('nested_attributes', $tokens[($attribute + 8)]); + $this->assertSame([$attribute => ($attribute + 24)], $tokens[($attribute + 8)]['nested_attributes']); + + $test = function (array $tokens, $length, $nestedMap) use ($attribute) { + foreach ($tokens as $token) { + $this->assertArrayHasKey('attribute_closer', $token); + $this->assertSame(($attribute + $length), $token['attribute_closer']); + $this->assertSame($nestedMap, $token['nested_attributes']); + } + }; + + $test(array_slice($tokens, ($attribute + 1), 7), 24, [$attribute => $attribute + 24]); + $test(array_slice($tokens, ($attribute + 8), 1), 8 + 5, [$attribute => $attribute + 24]); + + // Length here is 8 (nested attribute offset) + 5 (real length). + $test( + array_slice($tokens, ($attribute + 9), 4), + 8 + 5, + [ + $attribute => $attribute + 24, + $attribute + 8 => $attribute + 13, + ] + ); + + $test(array_slice($tokens, ($attribute + 13), 1), 8 + 5, [$attribute => $attribute + 24]); + $test(array_slice($tokens, ($attribute + 14), 10), 24, [$attribute => $attribute + 24]); + + $map = array_map( + static function ($token) { + return $token['code']; + }, + array_slice($tokens, ($attribute + 1), 23) + ); + + $this->assertSame($tokenCodes, $map); + + }//end testNestedAttributes() + + +}//end class diff --git a/vendor/squizlabs/php_codesniffer/tests/Core/Tokenizer/BackfillFnTokenTest.inc b/vendor/squizlabs/php_codesniffer/tests/Core/Tokenizer/BackfillFnTokenTest.inc new file mode 100644 index 00000000..13f165b7 --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/tests/Core/Tokenizer/BackfillFnTokenTest.inc @@ -0,0 +1,198 @@ + $x + $y; + +/* testMixedCase */ +$fn1 = Fn($x) => $x + $y; + +/* testWhitespace */ +$fn1 = fn ($x) => $x + $y; + +/* testComment */ +$fn1 = fn /* comment here */ ($x) => $x + $y; + +/* testHeredoc */ +$fn1 = fn() => << /* testNestedInner */ fn($y) => $x * $y + $z; + +/* testNestedSharedCloserOuter */ +$foo = foo(fn() => /* testNestedSharedCloserInner */ fn() => bar() === true); + +/* testFunctionCall */ +$extended = fn($c) => $callable($factory($c), $c); + +/* testChainedFunctionCall */ +$result = Collection::from([1, 2]) + ->map(fn($v) => $v * 2) + ->reduce(/* testFunctionArgument */ fn($tmp, $v) => $tmp + $v, 0); + +/* testClosure */ +$extended = fn($c) => $callable(function() { + for ($x = 1; $x < 10; $x++) { + echo $x; + } + + echo 'done'; +}, $c); + +/* testArrayIndex */ +$found = in_array_cb($needle, $haystack, fn($array, $needle) => $array[2] === $needle); + +$result = array_map( + /* testReturnType */ + static fn(int $number) : int => $number + 1, + $numbers +); + +/* testReference */ +fn&($x) => $x; + +/* testGrouped */ +(fn($x) => $x) + $y; + +/* testArrayValue */ +$a = [ + 'a' => fn() => return 1, +]; + +/* testArrayValueNoTrailingComma */ +$a = [ + 'a' => fn() => foo() +]; + +/* testYield */ +$a = fn($x) => yield 'k' => $x; + +/* testNullableNamespace */ +$a = fn(?\DateTime $x) : ?\DateTime => $x; + +/* testNamespaceOperatorInTypes */ +$fn = fn(namespace\Foo $a) : ?namespace\Foo => $a; + +/* testSelfReturnType */ +fn(self $a) : self => $a; + +/* testParentReturnType */ +fn(parent $a) : parent => $a; + +/* testCallableReturnType */ +fn(callable $a) : callable => $a; + +/* testArrayReturnType */ +fn(array $a) : array => $a; + +/* testStaticReturnType */ +fn(array $a) : static => $a; + +/* testUnionParamType */ +$arrowWithUnionParam = fn(int|float $param) : SomeClass => new SomeClass($param); + +/* testUnionReturnType */ +$arrowWithUnionReturn = fn($param) : int|float => $param | 10; + +/* testTernary */ +$fn = fn($a) => $a ? /* testTernaryThen */ fn() : string => 'a' : /* testTernaryElse */ fn() : string => 'b'; + +/* testTernaryWithTypes */ +$fn = fn(int|null $a) : array|null => $a ? null : []; + +function matchInArrow($x) { + /* testWithMatchValue */ + $fn = fn($x) => match(true) { + 1, 2, 3, 4, 5 => 'foo', + default => 'bar', + }; +} + +function matchInArrowAndMore($x) { + /* testWithMatchValueAndMore */ + $fn = fn($x) => match(true) { + 1, 2, 3, 4, 5 => 'foo', + default => 'bar', + } . 'suffix'; +} + +function arrowFunctionInMatchWithTrailingComma($x) { + return match ($x) { + /* testInMatchNotLastValue */ + 1 => fn($y) => callMe($y), + /* testInMatchLastValueWithTrailingComma */ + default => fn($y) => callThem($y), + }; +} + +function arrowFunctionInMatchNoTrailingComma1($x) { + return match ($x) { + 1 => fn($y) => callMe($y), + /* testInMatchLastValueNoTrailingComma1 */ + default => fn($y) => callThem($y) + }; +} + +function arrowFunctionInMatchNoTrailingComma2($x) { + return match ($x) { + /* testInMatchLastValueNoTrailingComma2 */ + default => fn($y) => 5 * $y + }; +} + +/* testConstantDeclaration */ +const FN = 'a'; + +/* testConstantDeclarationLower */ +const fn = 'a'; + +class Foo { + /* testStaticMethodName */ + public static function fn($param) { + /* testNestedInMethod */ + $fn = fn($c) => $callable($factory($c), $c); + } + + public function foo() { + /* testPropertyAssignment */ + $this->fn = 'a'; + } +} + +$anon = new class() { + /* testAnonClassMethodName */ + protected function fN($param) { + } +} + +/* testNonArrowStaticMethodCall */ +$a = Foo::fn($param); + +/* testNonArrowConstantAccess */ +$a = MyClass::FN; + +/* testNonArrowConstantAccessMixed */ +$a = MyClass::Fn; + +/* testNonArrowObjectMethodCall */ +$a = $obj->fn($param); + +/* testNonArrowObjectMethodCallUpper */ +$a = $obj->FN($param); + +/* testNonArrowNamespacedFunctionCall */ +$a = MyNS\Sub\Fn($param); + +/* testNonArrowNamespaceOperatorFunctionCall */ +$a = namespace\fn($param); + +/* testNonArrowFunctionNameWithUnionTypes */ +function fn(int|float $param) : string|null {} + +/* testLiveCoding */ +// Intentional parse error. This has to be the last test in the file. +$fn = fn diff --git a/vendor/squizlabs/php_codesniffer/tests/Core/Tokenizer/BackfillFnTokenTest.php b/vendor/squizlabs/php_codesniffer/tests/Core/Tokenizer/BackfillFnTokenTest.php new file mode 100644 index 00000000..4d0f4c06 --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/tests/Core/Tokenizer/BackfillFnTokenTest.php @@ -0,0 +1,802 @@ + + * @copyright 2019 Squiz Pty Ltd (ABN 77 084 670 600) + * @license https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence + */ + +namespace PHP_CodeSniffer\Tests\Core\Tokenizer; + +use PHP_CodeSniffer\Tests\Core\AbstractMethodUnitTest; + +class BackfillFnTokenTest extends AbstractMethodUnitTest +{ + + + /** + * Test simple arrow functions. + * + * @covers PHP_CodeSniffer\Tokenizers\PHP::processAdditional + * + * @return void + */ + public function testSimple() + { + foreach (['/* testStandard */', '/* testMixedCase */'] as $comment) { + $token = $this->getTargetToken($comment, T_FN); + $this->backfillHelper($token); + $this->scopePositionTestHelper($token, 5, 12); + } + + }//end testSimple() + + + /** + * Test whitespace inside arrow function definitions. + * + * @covers PHP_CodeSniffer\Tokenizers\PHP::processAdditional + * + * @return void + */ + public function testWhitespace() + { + $token = $this->getTargetToken('/* testWhitespace */', T_FN); + $this->backfillHelper($token); + $this->scopePositionTestHelper($token, 6, 13); + + }//end testWhitespace() + + + /** + * Test comments inside arrow function definitions. + * + * @covers PHP_CodeSniffer\Tokenizers\PHP::processAdditional + * + * @return void + */ + public function testComment() + { + $token = $this->getTargetToken('/* testComment */', T_FN); + $this->backfillHelper($token); + $this->scopePositionTestHelper($token, 8, 15); + + }//end testComment() + + + /** + * Test heredocs inside arrow function definitions. + * + * @covers PHP_CodeSniffer\Tokenizers\PHP::processAdditional + * + * @return void + */ + public function testHeredoc() + { + $token = $this->getTargetToken('/* testHeredoc */', T_FN); + $this->backfillHelper($token); + $this->scopePositionTestHelper($token, 4, 9); + + }//end testHeredoc() + + + /** + * Test nested arrow functions. + * + * @covers PHP_CodeSniffer\Tokenizers\PHP::processAdditional + * + * @return void + */ + public function testNestedOuter() + { + $token = $this->getTargetToken('/* testNestedOuter */', T_FN); + $this->backfillHelper($token); + $this->scopePositionTestHelper($token, 5, 25); + + }//end testNestedOuter() + + + /** + * Test nested arrow functions. + * + * @covers PHP_CodeSniffer\Tokenizers\PHP::processAdditional + * + * @return void + */ + public function testNestedInner() + { + $tokens = self::$phpcsFile->getTokens(); + + $token = $this->getTargetToken('/* testNestedInner */', T_FN); + $this->backfillHelper($token, true); + + $expectedScopeOpener = ($token + 5); + $expectedScopeCloser = ($token + 16); + + $this->assertSame($expectedScopeOpener, $tokens[$token]['scope_opener'], 'Scope opener is not the arrow token'); + $this->assertSame($expectedScopeCloser, $tokens[$token]['scope_closer'], 'Scope closer is not the semicolon token'); + + $opener = $tokens[$token]['scope_opener']; + $this->assertSame($expectedScopeOpener, $tokens[$opener]['scope_opener'], 'Opener scope opener is not the arrow token'); + $this->assertSame($expectedScopeCloser, $tokens[$opener]['scope_closer'], 'Opener scope closer is not the semicolon token'); + + $closer = $tokens[$token]['scope_closer']; + $this->assertSame(($token - 4), $tokens[$closer]['scope_opener'], 'Closer scope opener is not the arrow token of the "outer" arrow function (shared scope closer)'); + $this->assertSame($expectedScopeCloser, $tokens[$closer]['scope_closer'], 'Closer scope closer is not the semicolon token'); + + }//end testNestedInner() + + + /** + * Test nested arrow functions with a shared closer. + * + * @covers PHP_CodeSniffer\Tokenizers\PHP::processAdditional + * + * @return void + */ + public function testNestedSharedCloser() + { + $tokens = self::$phpcsFile->getTokens(); + + $token = $this->getTargetToken('/* testNestedSharedCloserOuter */', T_FN); + $this->backfillHelper($token); + $this->scopePositionTestHelper($token, 4, 20); + + $token = $this->getTargetToken('/* testNestedSharedCloserInner */', T_FN); + $this->backfillHelper($token, true); + + $expectedScopeOpener = ($token + 4); + $expectedScopeCloser = ($token + 12); + + $this->assertSame($expectedScopeOpener, $tokens[$token]['scope_opener'], 'Scope opener for "inner" arrow function is not the arrow token'); + $this->assertSame($expectedScopeCloser, $tokens[$token]['scope_closer'], 'Scope closer for "inner" arrow function is not the TRUE token'); + + $opener = $tokens[$token]['scope_opener']; + $this->assertSame($expectedScopeOpener, $tokens[$opener]['scope_opener'], 'Opener scope opener for "inner" arrow function is not the arrow token'); + $this->assertSame($expectedScopeCloser, $tokens[$opener]['scope_closer'], 'Opener scope closer for "inner" arrow function is not the semicolon token'); + + $closer = $tokens[$token]['scope_closer']; + $this->assertSame(($token - 4), $tokens[$closer]['scope_opener'], 'Closer scope opener for "inner" arrow function is not the arrow token of the "outer" arrow function (shared scope closer)'); + $this->assertSame($expectedScopeCloser, $tokens[$closer]['scope_closer'], 'Closer scope closer for "inner" arrow function is not the TRUE token'); + + }//end testNestedSharedCloser() + + + /** + * Test arrow functions that call functions. + * + * @covers PHP_CodeSniffer\Tokenizers\PHP::processAdditional + * + * @return void + */ + public function testFunctionCall() + { + $token = $this->getTargetToken('/* testFunctionCall */', T_FN); + $this->backfillHelper($token); + $this->scopePositionTestHelper($token, 5, 17); + + }//end testFunctionCall() + + + /** + * Test arrow functions that are included in chained calls. + * + * @covers PHP_CodeSniffer\Tokenizers\PHP::processAdditional + * + * @return void + */ + public function testChainedFunctionCall() + { + $token = $this->getTargetToken('/* testChainedFunctionCall */', T_FN); + $this->backfillHelper($token); + $this->scopePositionTestHelper($token, 5, 12, 'bracket'); + + }//end testChainedFunctionCall() + + + /** + * Test arrow functions that are used as function arguments. + * + * @covers PHP_CodeSniffer\Tokenizers\PHP::processAdditional + * + * @return void + */ + public function testFunctionArgument() + { + $token = $this->getTargetToken('/* testFunctionArgument */', T_FN); + $this->backfillHelper($token); + $this->scopePositionTestHelper($token, 8, 15, 'comma'); + + }//end testFunctionArgument() + + + /** + * Test arrow functions that use closures. + * + * @covers PHP_CodeSniffer\Tokenizers\PHP::processAdditional + * + * @return void + */ + public function testClosure() + { + $token = $this->getTargetToken('/* testClosure */', T_FN); + $this->backfillHelper($token); + $this->scopePositionTestHelper($token, 5, 60, 'comma'); + + }//end testClosure() + + + /** + * Test arrow functions using an array index. + * + * @covers PHP_CodeSniffer\Tokenizers\PHP::processAdditional + * + * @return void + */ + public function testArrayIndex() + { + $token = $this->getTargetToken('/* testArrayIndex */', T_FN); + $this->backfillHelper($token); + $this->scopePositionTestHelper($token, 8, 17, 'comma'); + + }//end testArrayIndex() + + + /** + * Test arrow functions with a return type. + * + * @covers PHP_CodeSniffer\Tokenizers\PHP::processAdditional + * + * @return void + */ + public function testReturnType() + { + $token = $this->getTargetToken('/* testReturnType */', T_FN); + $this->backfillHelper($token); + $this->scopePositionTestHelper($token, 11, 18, 'comma'); + + }//end testReturnType() + + + /** + * Test arrow functions that return a reference. + * + * @covers PHP_CodeSniffer\Tokenizers\PHP::processAdditional + * + * @return void + */ + public function testReference() + { + $token = $this->getTargetToken('/* testReference */', T_FN); + $this->backfillHelper($token); + $this->scopePositionTestHelper($token, 6, 9); + + }//end testReference() + + + /** + * Test arrow functions that are grouped by parenthesis. + * + * @covers PHP_CodeSniffer\Tokenizers\PHP::processAdditional + * + * @return void + */ + public function testGrouped() + { + $token = $this->getTargetToken('/* testGrouped */', T_FN); + $this->backfillHelper($token); + $this->scopePositionTestHelper($token, 5, 8); + + }//end testGrouped() + + + /** + * Test arrow functions that are used as array values. + * + * @covers PHP_CodeSniffer\Tokenizers\PHP::processAdditional + * + * @return void + */ + public function testArrayValue() + { + $token = $this->getTargetToken('/* testArrayValue */', T_FN); + $this->backfillHelper($token); + $this->scopePositionTestHelper($token, 4, 9, 'comma'); + + }//end testArrayValue() + + + /** + * Test arrow functions that are used as array values with no trailing comma. + * + * @covers PHP_CodeSniffer\Tokenizers\PHP::processAdditional + * + * @return void + */ + public function testArrayValueNoTrailingComma() + { + $token = $this->getTargetToken('/* testArrayValueNoTrailingComma */', T_FN); + $this->backfillHelper($token); + $this->scopePositionTestHelper($token, 4, 8, 'closing parenthesis'); + + }//end testArrayValueNoTrailingComma() + + + /** + * Test arrow functions that use the yield keyword. + * + * @covers PHP_CodeSniffer\Tokenizers\PHP::processAdditional + * + * @return void + */ + public function testYield() + { + $token = $this->getTargetToken('/* testYield */', T_FN); + $this->backfillHelper($token); + $this->scopePositionTestHelper($token, 5, 14); + + }//end testYield() + + + /** + * Test arrow functions that use nullable namespace types. + * + * @covers PHP_CodeSniffer\Tokenizers\PHP::processAdditional + * + * @return void + */ + public function testNullableNamespace() + { + $token = $this->getTargetToken('/* testNullableNamespace */', T_FN); + $this->backfillHelper($token); + $this->scopePositionTestHelper($token, 15, 18); + + }//end testNullableNamespace() + + + /** + * Test arrow functions that use the namespace operator in the return type. + * + * @covers PHP_CodeSniffer\Tokenizers\PHP::processAdditional + * + * @return void + */ + public function testNamespaceOperatorInTypes() + { + $token = $this->getTargetToken('/* testNamespaceOperatorInTypes */', T_FN); + $this->backfillHelper($token); + $this->scopePositionTestHelper($token, 16, 19); + + }//end testNamespaceOperatorInTypes() + + + /** + * Test arrow functions that use self/parent/callable/array/static return types. + * + * @covers PHP_CodeSniffer\Tokenizers\PHP::processAdditional + * + * @return void + */ + public function testKeywordReturnTypes() + { + $tokens = self::$phpcsFile->getTokens(); + + $testMarkers = [ + 'Self', + 'Parent', + 'Callable', + 'Array', + 'Static', + ]; + + foreach ($testMarkers as $marker) { + $token = $this->getTargetToken('/* test'.$marker.'ReturnType */', T_FN); + $this->backfillHelper($token); + + $expectedScopeOpener = ($token + 11); + $expectedScopeCloser = ($token + 14); + + $this->assertSame($expectedScopeOpener, $tokens[$token]['scope_opener'], "Scope opener is not the arrow token (for $marker)"); + $this->assertSame($expectedScopeCloser, $tokens[$token]['scope_closer'], "Scope closer is not the semicolon token(for $marker)"); + + $opener = $tokens[$token]['scope_opener']; + $this->assertSame($expectedScopeOpener, $tokens[$opener]['scope_opener'], "Opener scope opener is not the arrow token(for $marker)"); + $this->assertSame($expectedScopeCloser, $tokens[$opener]['scope_closer'], "Opener scope closer is not the semicolon token(for $marker)"); + + $closer = $tokens[$token]['scope_closer']; + $this->assertSame($expectedScopeOpener, $tokens[$closer]['scope_opener'], "Closer scope opener is not the arrow token(for $marker)"); + $this->assertSame($expectedScopeCloser, $tokens[$closer]['scope_closer'], "Closer scope closer is not the semicolon token(for $marker)"); + } + + }//end testKeywordReturnTypes() + + + /** + * Test arrow function with a union parameter type. + * + * @covers PHP_CodeSniffer\Tokenizers\PHP::processAdditional + * + * @return void + */ + public function testUnionParamType() + { + $token = $this->getTargetToken('/* testUnionParamType */', T_FN); + $this->backfillHelper($token); + $this->scopePositionTestHelper($token, 13, 21); + + }//end testUnionParamType() + + + /** + * Test arrow function with a union return type. + * + * @covers PHP_CodeSniffer\Tokenizers\PHP::processAdditional + * + * @return void + */ + public function testUnionReturnType() + { + $token = $this->getTargetToken('/* testUnionReturnType */', T_FN); + $this->backfillHelper($token); + $this->scopePositionTestHelper($token, 11, 18); + + }//end testUnionReturnType() + + + /** + * Test arrow functions used in ternary operators. + * + * @covers PHP_CodeSniffer\Tokenizers\PHP::processAdditional + * + * @return void + */ + public function testTernary() + { + $tokens = self::$phpcsFile->getTokens(); + + $token = $this->getTargetToken('/* testTernary */', T_FN); + $this->backfillHelper($token); + $this->scopePositionTestHelper($token, 5, 40); + + $token = $this->getTargetToken('/* testTernaryThen */', T_FN); + $this->backfillHelper($token); + + $expectedScopeOpener = ($token + 8); + $expectedScopeCloser = ($token + 12); + + $this->assertSame($expectedScopeOpener, $tokens[$token]['scope_opener'], 'Scope opener for THEN is not the arrow token'); + $this->assertSame($expectedScopeCloser, $tokens[$token]['scope_closer'], 'Scope closer for THEN is not the semicolon token'); + + $opener = $tokens[$token]['scope_opener']; + $this->assertSame($expectedScopeOpener, $tokens[$opener]['scope_opener'], 'Opener scope opener for THEN is not the arrow token'); + $this->assertSame($expectedScopeCloser, $tokens[$opener]['scope_closer'], 'Opener scope closer for THEN is not the semicolon token'); + + $closer = $tokens[$token]['scope_closer']; + $this->assertSame($expectedScopeOpener, $tokens[$closer]['scope_opener'], 'Closer scope opener for THEN is not the arrow token'); + $this->assertSame($expectedScopeCloser, $tokens[$closer]['scope_closer'], 'Closer scope closer for THEN is not the semicolon token'); + + $token = $this->getTargetToken('/* testTernaryElse */', T_FN); + $this->backfillHelper($token, true); + + $expectedScopeOpener = ($token + 8); + $expectedScopeCloser = ($token + 11); + + $this->assertSame($expectedScopeOpener, $tokens[$token]['scope_opener'], 'Scope opener for ELSE is not the arrow token'); + $this->assertSame($expectedScopeCloser, $tokens[$token]['scope_closer'], 'Scope closer for ELSE is not the semicolon token'); + + $opener = $tokens[$token]['scope_opener']; + $this->assertSame($expectedScopeOpener, $tokens[$opener]['scope_opener'], 'Opener scope opener for ELSE is not the arrow token'); + $this->assertSame($expectedScopeCloser, $tokens[$opener]['scope_closer'], 'Opener scope closer for ELSE is not the semicolon token'); + + $closer = $tokens[$token]['scope_closer']; + $this->assertSame(($token - 24), $tokens[$closer]['scope_opener'], 'Closer scope opener for ELSE is not the arrow token of the "outer" arrow function (shared scope closer)'); + $this->assertSame($expectedScopeCloser, $tokens[$closer]['scope_closer'], 'Closer scope closer for ELSE is not the semicolon token'); + + }//end testTernary() + + + /** + * Test typed arrow functions used in ternary operators. + * + * @covers PHP_CodeSniffer\Tokenizers\PHP::processAdditional + * + * @return void + */ + public function testTernaryWithTypes() + { + $tokens = self::$phpcsFile->getTokens(); + + $token = $this->getTargetToken('/* testTernaryWithTypes */', T_FN); + $this->backfillHelper($token); + $this->scopePositionTestHelper($token, 15, 27); + + }//end testTernaryWithTypes() + + + /** + * Test arrow function returning a match control structure. + * + * @covers PHP_CodeSniffer\Tokenizers\PHP::processAdditional + * + * @return void + */ + public function testWithMatchValue() + { + $token = $this->getTargetToken('/* testWithMatchValue */', T_FN); + $this->backfillHelper($token); + $this->scopePositionTestHelper($token, 5, 44); + + }//end testWithMatchValue() + + + /** + * Test arrow function returning a match control structure with something behind it. + * + * @covers PHP_CodeSniffer\Tokenizers\PHP::processAdditional + * + * @return void + */ + public function testWithMatchValueAndMore() + { + $token = $this->getTargetToken('/* testWithMatchValueAndMore */', T_FN); + $this->backfillHelper($token); + $this->scopePositionTestHelper($token, 5, 48); + + }//end testWithMatchValueAndMore() + + + /** + * Test match control structure returning arrow functions. + * + * @param string $testMarker The comment prefacing the target token. + * @param int $openerOffset The expected offset of the scope opener in relation to the testMarker. + * @param int $closerOffset The expected offset of the scope closer in relation to the testMarker. + * @param string $expectedCloserType The type of token expected for the scope closer. + * @param string $expectedCloserFriendlyName A friendly name for the type of token expected for the scope closer + * to be used in the error message for failing tests. + * + * @dataProvider dataInMatchValue + * @covers PHP_CodeSniffer\Tokenizers\PHP::processAdditional + * + * @return void + */ + public function testInMatchValue($testMarker, $openerOffset, $closerOffset, $expectedCloserType, $expectedCloserFriendlyName) + { + $tokens = self::$phpcsFile->getTokens(); + + $token = $this->getTargetToken($testMarker, T_FN); + $this->backfillHelper($token); + $this->scopePositionTestHelper($token, $openerOffset, $closerOffset, $expectedCloserFriendlyName); + + $this->assertSame($expectedCloserType, $tokens[($token + $closerOffset)]['type'], 'Mismatched scope closer type'); + + }//end testInMatchValue() + + + /** + * Data provider. + * + * @see testInMatchValue() + * + * @return array + */ + public function dataInMatchValue() + { + return [ + 'not_last_value' => [ + '/* testInMatchNotLastValue */', + 5, + 11, + 'T_COMMA', + 'comma', + ], + 'last_value_with_trailing_comma' => [ + '/* testInMatchLastValueWithTrailingComma */', + 5, + 11, + 'T_COMMA', + 'comma', + ], + 'last_value_without_trailing_comma_1' => [ + '/* testInMatchLastValueNoTrailingComma1 */', + 5, + 10, + 'T_CLOSE_PARENTHESIS', + 'close parenthesis', + ], + 'last_value_without_trailing_comma_2' => [ + '/* testInMatchLastValueNoTrailingComma2 */', + 5, + 11, + 'T_VARIABLE', + '$y variable', + ], + ]; + + }//end dataInMatchValue() + + + /** + * Test arrow function nested within a method declaration. + * + * @covers PHP_CodeSniffer\Tokenizers\PHP::processAdditional + * + * @return void + */ + public function testNestedInMethod() + { + $token = $this->getTargetToken('/* testNestedInMethod */', T_FN); + $this->backfillHelper($token); + $this->scopePositionTestHelper($token, 5, 17); + + }//end testNestedInMethod() + + + /** + * Verify that "fn" keywords which are not arrow functions get tokenized as T_STRING and don't + * have the extra token array indexes. + * + * @param string $testMarker The comment prefacing the target token. + * @param string $testContent The token content to look for. + * + * @dataProvider dataNotAnArrowFunction + * @covers PHP_CodeSniffer\Tokenizers\PHP::processAdditional + * + * @return void + */ + public function testNotAnArrowFunction($testMarker, $testContent='fn') + { + $tokens = self::$phpcsFile->getTokens(); + + $token = $this->getTargetToken($testMarker, [T_STRING, T_FN], $testContent); + $tokenArray = $tokens[$token]; + + $this->assertSame('T_STRING', $tokenArray['type'], 'Token tokenized as '.$tokenArray['type'].', not T_STRING'); + + $this->assertArrayNotHasKey('scope_condition', $tokenArray, 'Scope condition is set'); + $this->assertArrayNotHasKey('scope_opener', $tokenArray, 'Scope opener is set'); + $this->assertArrayNotHasKey('scope_closer', $tokenArray, 'Scope closer is set'); + $this->assertArrayNotHasKey('parenthesis_owner', $tokenArray, 'Parenthesis owner is set'); + $this->assertArrayNotHasKey('parenthesis_opener', $tokenArray, 'Parenthesis opener is set'); + $this->assertArrayNotHasKey('parenthesis_closer', $tokenArray, 'Parenthesis closer is set'); + + }//end testNotAnArrowFunction() + + + /** + * Data provider. + * + * @see testNotAnArrowFunction() + * + * @return array + */ + public function dataNotAnArrowFunction() + { + return [ + ['/* testFunctionName */'], + [ + '/* testConstantDeclaration */', + 'FN', + ], + [ + '/* testConstantDeclarationLower */', + 'fn', + ], + ['/* testStaticMethodName */'], + ['/* testPropertyAssignment */'], + [ + '/* testAnonClassMethodName */', + 'fN', + ], + ['/* testNonArrowStaticMethodCall */'], + [ + '/* testNonArrowConstantAccess */', + 'FN', + ], + [ + '/* testNonArrowConstantAccessMixed */', + 'Fn', + ], + ['/* testNonArrowObjectMethodCall */'], + [ + '/* testNonArrowObjectMethodCallUpper */', + 'FN', + ], + [ + '/* testNonArrowNamespacedFunctionCall */', + 'Fn', + ], + ['/* testNonArrowNamespaceOperatorFunctionCall */'], + ['/* testNonArrowFunctionNameWithUnionTypes */'], + ['/* testLiveCoding */'], + ]; + + }//end dataNotAnArrowFunction() + + + /** + * Helper function to check that all token keys are correctly set for T_FN tokens. + * + * @param int $token The T_FN token to check. + * @param bool $skipScopeCloserCheck Whether to skip the scope closer check. + * This should be set to "true" when testing nested arrow functions, + * where the "inner" arrow function shares a scope closer with the + * "outer" arrow function, as the 'scope_condition' for the scope closer + * of the "inner" arrow function will point to the "outer" arrow function. + * + * @return void + */ + private function backfillHelper($token, $skipScopeCloserCheck=false) + { + $tokens = self::$phpcsFile->getTokens(); + + $this->assertTrue(array_key_exists('scope_condition', $tokens[$token]), 'Scope condition is not set'); + $this->assertTrue(array_key_exists('scope_opener', $tokens[$token]), 'Scope opener is not set'); + $this->assertTrue(array_key_exists('scope_closer', $tokens[$token]), 'Scope closer is not set'); + $this->assertSame($tokens[$token]['scope_condition'], $token, 'Scope condition is not the T_FN token'); + $this->assertTrue(array_key_exists('parenthesis_owner', $tokens[$token]), 'Parenthesis owner is not set'); + $this->assertTrue(array_key_exists('parenthesis_opener', $tokens[$token]), 'Parenthesis opener is not set'); + $this->assertTrue(array_key_exists('parenthesis_closer', $tokens[$token]), 'Parenthesis closer is not set'); + $this->assertSame($tokens[$token]['parenthesis_owner'], $token, 'Parenthesis owner is not the T_FN token'); + + $opener = $tokens[$token]['scope_opener']; + $this->assertTrue(array_key_exists('scope_condition', $tokens[$opener]), 'Opener scope condition is not set'); + $this->assertTrue(array_key_exists('scope_opener', $tokens[$opener]), 'Opener scope opener is not set'); + $this->assertTrue(array_key_exists('scope_closer', $tokens[$opener]), 'Opener scope closer is not set'); + $this->assertSame($tokens[$opener]['scope_condition'], $token, 'Opener scope condition is not the T_FN token'); + $this->assertSame(T_FN_ARROW, $tokens[$opener]['code'], 'Arrow scope opener not tokenized as T_FN_ARROW (code)'); + $this->assertSame('T_FN_ARROW', $tokens[$opener]['type'], 'Arrow scope opener not tokenized as T_FN_ARROW (type)'); + + $closer = $tokens[$token]['scope_closer']; + $this->assertTrue(array_key_exists('scope_condition', $tokens[$closer]), 'Closer scope condition is not set'); + $this->assertTrue(array_key_exists('scope_opener', $tokens[$closer]), 'Closer scope opener is not set'); + $this->assertTrue(array_key_exists('scope_closer', $tokens[$closer]), 'Closer scope closer is not set'); + if ($skipScopeCloserCheck === false) { + $this->assertSame($tokens[$closer]['scope_condition'], $token, 'Closer scope condition is not the T_FN token'); + } + + $opener = $tokens[$token]['parenthesis_opener']; + $this->assertTrue(array_key_exists('parenthesis_owner', $tokens[$opener]), 'Opening parenthesis owner is not set'); + $this->assertSame($tokens[$opener]['parenthesis_owner'], $token, 'Opening parenthesis owner is not the T_FN token'); + + $closer = $tokens[$token]['parenthesis_closer']; + $this->assertTrue(array_key_exists('parenthesis_owner', $tokens[$closer]), 'Closing parenthesis owner is not set'); + $this->assertSame($tokens[$closer]['parenthesis_owner'], $token, 'Closing parenthesis owner is not the T_FN token'); + + }//end backfillHelper() + + + /** + * Helper function to check that the scope opener/closer positions are correctly set for T_FN tokens. + * + * @param int $token The T_FN token to check. + * @param int $openerOffset The expected offset of the scope opener in relation to + * the fn keyword. + * @param int $closerOffset The expected offset of the scope closer in relation to + * the fn keyword. + * @param string $expectedCloserType Optional. The type of token expected for the scope closer. + * + * @return void + */ + private function scopePositionTestHelper($token, $openerOffset, $closerOffset, $expectedCloserType='semicolon') + { + $tokens = self::$phpcsFile->getTokens(); + $expectedScopeOpener = ($token + $openerOffset); + $expectedScopeCloser = ($token + $closerOffset); + + $this->assertSame($expectedScopeOpener, $tokens[$token]['scope_opener'], 'Scope opener is not the arrow token'); + $this->assertSame($expectedScopeCloser, $tokens[$token]['scope_closer'], 'Scope closer is not the '.$expectedCloserType.' token'); + + $opener = $tokens[$token]['scope_opener']; + $this->assertSame($expectedScopeOpener, $tokens[$opener]['scope_opener'], 'Opener scope opener is not the arrow token'); + $this->assertSame($expectedScopeCloser, $tokens[$opener]['scope_closer'], 'Opener scope closer is not the '.$expectedCloserType.' token'); + + $closer = $tokens[$token]['scope_closer']; + $this->assertSame($expectedScopeOpener, $tokens[$closer]['scope_opener'], 'Closer scope opener is not the arrow token'); + $this->assertSame($expectedScopeCloser, $tokens[$closer]['scope_closer'], 'Closer scope closer is not the '.$expectedCloserType.' token'); + + }//end scopePositionTestHelper() + + +}//end class diff --git a/vendor/squizlabs/php_codesniffer/tests/Core/Tokenizer/BackfillMatchTokenTest.inc b/vendor/squizlabs/php_codesniffer/tests/Core/Tokenizer/BackfillMatchTokenTest.inc new file mode 100644 index 00000000..095a4d7d --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/tests/Core/Tokenizer/BackfillMatchTokenTest.inc @@ -0,0 +1,319 @@ + 'Zero', + 1 => 'One', + 2 => 'Two', + }; +} + +function matchNoTrailingComma($bool) { + /* testMatchNoTrailingComma */ + echo match ($bool) { + true => "true\n", + false => "false\n" + }; +} + +function matchWithDefault($i) { + /* testMatchWithDefault */ + return match ($i) { + 1 => 1, + 2 => 2, + default => 'default', + }; +} + +function matchExpressionInCondition($i) { + /* testMatchExpressionInCondition */ + return match (true) { + $i >= 50 => '50+', + $i >= 40 => '40-50', + $i >= 30 => '30-40', + $i >= 20 => '20-30', + $i >= 10 => '10-20', + default => '0-10', + }; +} + +function matchMultiCase($day) { + /* testMatchMultiCase */ + return match ($day) { + 1, 7 => false, + 2, 3, 4, 5, 6 => true, + }; +} + +function matchMultiCaseTrailingCommaInCase($bool) { + /* testMatchMultiCaseTrailingCommaInCase */ + echo match ($bool) { + false, + 0, + => "false\n", + true, + 1, + => "true\n", + default, + => "not bool\n", + }; +} + +assert((function () { + /* testMatchInClosureNotLowercase */ + Match ('foo') { + 'foo', 'bar' => false, + 'baz' => 'a', + default => 'b', + }; +})()); + +function matchInArrowFunction($x) { + /* testMatchInArrowFunction */ + $fn = fn($x) => match(true) { + 1, 2, 3, 4, 5 => 'foo', + default => 'bar', + }; +} + +function arrowFunctionInMatchNoTrailingComma($x) { + /* testArrowFunctionInMatchNoTrailingComma */ + return match ($x) { + 1 => fn($y) => callMe($y), + default => fn($y) => callThem($y) + }; +} + +/* testMatchInFunctionCallParamNotLowercase */ +var_dump(MATCH ( 'foo' ) { + 'foo' => dump_and_return('foo'), + 'bar' => dump_and_return('bar'), +}); + +/* testMatchInMethodCallParam */ +Test::usesValue(match(true) { true => $i }); + +/* testMatchDiscardResult */ +match (1) { + 1 => print "Executed\n", +}; + +/* testMatchWithDuplicateConditionsWithComments */ +echo match /*comment*/ ( $value /*comment*/ ) { + // Comment. + 2, 1 => '2, 1', + 1 => 1, + 3 => 3, + 4 => 4, + 5 => 5, +}; + +/* testNestedMatchOuter */ +$x = match ($y) { + /* testNestedMatchInner */ + default => match ($z) { 1 => 1 }, +}; + +/* testMatchInTernaryCondition */ +$x = match ($test) { 1 => 'a', 2 => 'b' } ? + /* testMatchInTernaryThen */ match ($test) { 1 => 'a', 2 => 'b' } : + /* testMatchInTernaryElse */ match ($notTest) { 3 => 'a', 4 => 'b' }; + +/* testMatchInArrayValue */ +$array = array( + match ($test) { 1 => 'a', 2 => 'b' }, +); + +/* testMatchInArrayKey */ +$array = [ + match ($test) { 1 => 'a', 2 => 'b' } => 'dynamic keys, woho!', +]; + +/* testMatchreturningArray */ +$matcher = match ($x) { + 0 => array( 0 => 1, 'a' => 2, 'b' => 3 ), + 1 => [1, 2, 3], + 2 => array( 1, [1, 2, 3], 2, 3), + 3 => [ 0 => 1, 'a' => array(1, 2, 3), 'b' => 2, 3], +}; + +/* testSwitchContainingMatch */ +switch ($something) { + /* testMatchWithDefaultNestedInSwitchCase1 */ + case 'foo': + $var = [1, 2, 3]; + $var = match ($i) { + 1 => 1, + default => 'default', + }; + continue 2; + + /* testMatchWithDefaultNestedInSwitchCase2 */ + case 'bar' ; + $i = callMe($a, $b); + return match ($i) { + 1 => 1, + default => 'default', + }; + + /* testMatchWithDefaultNestedInSwitchDefault */ + default: + echo 'something', match ($i) { + 1 => 1, + default => 'default', + }; + break; +} + +/* testMatchContainingSwitch */ +$x = match ($y) { + 5, 8 => function($z) { + /* testSwitchNestedInMatch1 */ + switch($z) { + case 'a': + $var = [1, 2, 3]; + return 'a'; + /* testSwitchDefaultNestedInMatchCase */ + default: + $i = callMe($a, $b); + return 'default1'; + } + }, + default => function($z) { + /* testSwitchNestedInMatch2 */ + switch($z) { + case 'a'; + $i = callMe($a, $b); + return 'b'; + /* testSwitchDefaultNestedInMatchDefault */ + default; + $var = [1, 2, 3]; + return 'default2'; + } + } +}; + +/* testMatchNoCases */ +// Intentional fatal error. +$x = match (true) {}; + +/* testMatchMultiDefault */ +// Intentional fatal error. +echo match (1) { + default => 'foo', + 1 => 'bar', + 2 => 'baz', + default => 'qux', +}; + +/* testNoMatchStaticMethodCall */ +$a = Foo::match($param); + +/* testNoMatchClassConstantAccess */ +$a = MyClass::MATCH; + +/* testNoMatchClassConstantArrayAccessMixedCase */ +$a = MyClass::Match[$a]; + +/* testNoMatchMethodCall */ +$a = $obj->match($param); + +/* testNoMatchMethodCallUpper */ +$a = $obj??->MATCH()->chain($param); + +/* testNoMatchPropertyAccess */ +$a = $obj->match; + +/* testNoMatchNamespacedFunctionCall */ +// Intentional fatal error. +$a = MyNS\Sub\match($param); + +/* testNoMatchNamespaceOperatorFunctionCall */ +// Intentional fatal error. +$a = namespace\match($param); + +interface MatchInterface { + /* testNoMatchInterfaceMethodDeclaration */ + public static function match($param); +} + +class MatchClass { + /* testNoMatchClassConstantDeclarationLower */ + const match = 'a'; + + /* testNoMatchClassMethodDeclaration */ + public static function match($param) { + /* testNoMatchPropertyAssignment */ + $this->match = 'a'; + } +} + +/* testNoMatchClassInstantiation */ +$obj = new Match(); + +$anon = new class() { + /* testNoMatchAnonClassMethodDeclaration */ + protected function maTCH($param) { + } +}; + +/* testNoMatchClassDeclaration */ +// Intentional fatal error. Match is now a reserved keyword. +class Match {} + +/* testNoMatchInterfaceDeclaration */ +// Intentional fatal error. Match is now a reserved keyword. +interface Match {} + +/* testNoMatchTraitDeclaration */ +// Intentional fatal error. Match is now a reserved keyword. +trait Match {} + +/* testNoMatchConstantDeclaration */ +// Intentional fatal error. Match is now a reserved keyword. +const MATCH = '1'; + +/* testNoMatchFunctionDeclaration */ +// Intentional fatal error. Match is now a reserved keyword. +function match() {} + +/* testNoMatchNamespaceDeclaration */ +// Intentional fatal error. Match is now a reserved keyword. +namespace Match {} + +/* testNoMatchExtendedClassDeclaration */ +// Intentional fatal error. Match is now a reserved keyword. +class Foo extends Match {} + +/* testNoMatchImplementedClassDeclaration */ +// Intentional fatal error. Match is now a reserved keyword. +class Bar implements Match {} + +/* testNoMatchInUseStatement */ +// Intentional fatal error in PHP < 8. Match is now a reserved keyword. +use Match\me; + +function brokenMatchNoCurlies($x) { + /* testNoMatchMissingCurlies */ + // Intentional fatal error. New control structure is not supported without curly braces. + return match ($x) + 0 => 'Zero', + 1 => 'One', + 2 => 'Two', + ; +} + +function brokenMatchAlternativeSyntax($x) { + /* testNoMatchAlternativeSyntax */ + // Intentional fatal error. Alternative syntax is not supported. + return match ($x) : + 0 => 'Zero', + 1 => 'One', + 2 => 'Two', + endmatch; +} + +/* testLiveCoding */ +// Intentional parse error. This has to be the last test in the file. +echo match diff --git a/vendor/squizlabs/php_codesniffer/tests/Core/Tokenizer/BackfillMatchTokenTest.php b/vendor/squizlabs/php_codesniffer/tests/Core/Tokenizer/BackfillMatchTokenTest.php new file mode 100644 index 00000000..80f909ac --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/tests/Core/Tokenizer/BackfillMatchTokenTest.php @@ -0,0 +1,529 @@ + + * @copyright 2020-2021 Squiz Pty Ltd (ABN 77 084 670 600) + * @license https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence + */ + +namespace PHP_CodeSniffer\Tests\Core\Tokenizer; + +use PHP_CodeSniffer\Tests\Core\AbstractMethodUnitTest; +use PHP_CodeSniffer\Util\Tokens; + +class BackfillMatchTokenTest extends AbstractMethodUnitTest +{ + + + /** + * Test tokenization of match expressions. + * + * @param string $testMarker The comment prefacing the target token. + * @param int $openerOffset The expected offset of the scope opener in relation to the testMarker. + * @param int $closerOffset The expected offset of the scope closer in relation to the testMarker. + * @param string $testContent The token content to look for. + * + * @dataProvider dataMatchExpression + * @covers PHP_CodeSniffer\Tokenizers\PHP::tokenize + * + * @return void + */ + public function testMatchExpression($testMarker, $openerOffset, $closerOffset, $testContent='match') + { + $tokens = self::$phpcsFile->getTokens(); + + $token = $this->getTargetToken($testMarker, [T_STRING, T_MATCH], $testContent); + $tokenArray = $tokens[$token]; + + $this->assertSame(T_MATCH, $tokenArray['code'], 'Token tokenized as '.$tokenArray['type'].', not T_MATCH (code)'); + $this->assertSame('T_MATCH', $tokenArray['type'], 'Token tokenized as '.$tokenArray['type'].', not T_MATCH (type)'); + + $this->scopeTestHelper($token, $openerOffset, $closerOffset); + $this->parenthesisTestHelper($token); + + }//end testMatchExpression() + + + /** + * Data provider. + * + * @see testMatchExpression() + * + * @return array + */ + public function dataMatchExpression() + { + return [ + 'simple_match' => [ + '/* testMatchSimple */', + 6, + 33, + ], + 'no_trailing_comma' => [ + '/* testMatchNoTrailingComma */', + 6, + 24, + ], + 'with_default_case' => [ + '/* testMatchWithDefault */', + 6, + 33, + ], + 'expression_in_condition' => [ + '/* testMatchExpressionInCondition */', + 6, + 77, + ], + 'multicase' => [ + '/* testMatchMultiCase */', + 6, + 40, + ], + 'multicase_trailing_comma_in_case' => [ + '/* testMatchMultiCaseTrailingCommaInCase */', + 6, + 47, + ], + 'in_closure_not_lowercase' => [ + '/* testMatchInClosureNotLowercase */', + 6, + 36, + 'Match', + ], + 'in_arrow_function' => [ + '/* testMatchInArrowFunction */', + 5, + 36, + ], + 'arrow_function_in_match_no_trailing_comma' => [ + '/* testArrowFunctionInMatchNoTrailingComma */', + 6, + 44, + ], + 'in_function_call_param_not_lowercase' => [ + '/* testMatchInFunctionCallParamNotLowercase */', + 8, + 32, + 'MATCH', + ], + 'in_method_call_param' => [ + '/* testMatchInMethodCallParam */', + 5, + 13, + ], + 'discard_result' => [ + '/* testMatchDiscardResult */', + 6, + 18, + ], + 'duplicate_conditions_and_comments' => [ + '/* testMatchWithDuplicateConditionsWithComments */', + 12, + 59, + ], + 'nested_match_outer' => [ + '/* testNestedMatchOuter */', + 6, + 33, + ], + 'nested_match_inner' => [ + '/* testNestedMatchInner */', + 6, + 14, + ], + 'ternary_condition' => [ + '/* testMatchInTernaryCondition */', + 6, + 21, + ], + 'ternary_then' => [ + '/* testMatchInTernaryThen */', + 6, + 21, + ], + 'ternary_else' => [ + '/* testMatchInTernaryElse */', + 6, + 21, + ], + 'array_value' => [ + '/* testMatchInArrayValue */', + 6, + 21, + ], + 'array_key' => [ + '/* testMatchInArrayKey */', + 6, + 21, + ], + 'returning_array' => [ + '/* testMatchreturningArray */', + 6, + 125, + ], + 'nested_in_switch_case_1' => [ + '/* testMatchWithDefaultNestedInSwitchCase1 */', + 6, + 25, + ], + 'nested_in_switch_case_2' => [ + '/* testMatchWithDefaultNestedInSwitchCase2 */', + 6, + 25, + ], + 'nested_in_switch_default' => [ + '/* testMatchWithDefaultNestedInSwitchDefault */', + 6, + 25, + ], + 'match_with_nested_switch' => [ + '/* testMatchContainingSwitch */', + 6, + 180, + ], + 'no_cases' => [ + '/* testMatchNoCases */', + 6, + 7, + ], + 'multi_default' => [ + '/* testMatchMultiDefault */', + 6, + 40, + ], + ]; + + }//end dataMatchExpression() + + + /** + * Verify that "match" keywords which are not match control structures get tokenized as T_STRING + * and don't have the extra token array indexes. + * + * @param string $testMarker The comment prefacing the target token. + * @param string $testContent The token content to look for. + * + * @dataProvider dataNotAMatchStructure + * @covers PHP_CodeSniffer\Tokenizers\PHP::tokenize + * @covers PHP_CodeSniffer\Tokenizers\PHP::processAdditional + * + * @return void + */ + public function testNotAMatchStructure($testMarker, $testContent='match') + { + $tokens = self::$phpcsFile->getTokens(); + + $token = $this->getTargetToken($testMarker, [T_STRING, T_MATCH], $testContent); + $tokenArray = $tokens[$token]; + + $this->assertSame(T_STRING, $tokenArray['code'], 'Token tokenized as '.$tokenArray['type'].', not T_STRING (code)'); + $this->assertSame('T_STRING', $tokenArray['type'], 'Token tokenized as '.$tokenArray['type'].', not T_STRING (type)'); + + $this->assertArrayNotHasKey('scope_condition', $tokenArray, 'Scope condition is set'); + $this->assertArrayNotHasKey('scope_opener', $tokenArray, 'Scope opener is set'); + $this->assertArrayNotHasKey('scope_closer', $tokenArray, 'Scope closer is set'); + $this->assertArrayNotHasKey('parenthesis_owner', $tokenArray, 'Parenthesis owner is set'); + $this->assertArrayNotHasKey('parenthesis_opener', $tokenArray, 'Parenthesis opener is set'); + $this->assertArrayNotHasKey('parenthesis_closer', $tokenArray, 'Parenthesis closer is set'); + + $next = self::$phpcsFile->findNext(Tokens::$emptyTokens, ($token + 1), null, true); + if ($next !== false && $tokens[$next]['code'] === T_OPEN_PARENTHESIS) { + $this->assertArrayNotHasKey('parenthesis_owner', $tokenArray, 'Parenthesis owner is set for opener after'); + } + + }//end testNotAMatchStructure() + + + /** + * Data provider. + * + * @see testNotAMatchStructure() + * + * @return array + */ + public function dataNotAMatchStructure() + { + return [ + 'static_method_call' => ['/* testNoMatchStaticMethodCall */'], + 'class_constant_access' => [ + '/* testNoMatchClassConstantAccess */', + 'MATCH', + ], + 'class_constant_array_access' => [ + '/* testNoMatchClassConstantArrayAccessMixedCase */', + 'Match', + ], + 'method_call' => ['/* testNoMatchMethodCall */'], + 'method_call_uppercase' => [ + '/* testNoMatchMethodCallUpper */', + 'MATCH', + ], + 'property_access' => ['/* testNoMatchPropertyAccess */'], + 'namespaced_function_call' => ['/* testNoMatchNamespacedFunctionCall */'], + 'namespace_operator_function_call' => ['/* testNoMatchNamespaceOperatorFunctionCall */'], + 'interface_method_declaration' => ['/* testNoMatchInterfaceMethodDeclaration */'], + 'class_constant_declaration' => ['/* testNoMatchClassConstantDeclarationLower */'], + 'class_method_declaration' => ['/* testNoMatchClassMethodDeclaration */'], + 'property_assigment' => ['/* testNoMatchPropertyAssignment */'], + 'class_instantiation' => [ + '/* testNoMatchClassInstantiation */', + 'Match', + ], + 'anon_class_method_declaration' => [ + '/* testNoMatchAnonClassMethodDeclaration */', + 'maTCH', + ], + 'class_declaration' => [ + '/* testNoMatchClassDeclaration */', + 'Match', + ], + 'interface_declaration' => [ + '/* testNoMatchInterfaceDeclaration */', + 'Match', + ], + 'trait_declaration' => [ + '/* testNoMatchTraitDeclaration */', + 'Match', + ], + 'constant_declaration' => [ + '/* testNoMatchConstantDeclaration */', + 'MATCH', + ], + 'function_declaration' => ['/* testNoMatchFunctionDeclaration */'], + 'namespace_declaration' => [ + '/* testNoMatchNamespaceDeclaration */', + 'Match', + ], + 'class_extends_declaration' => [ + '/* testNoMatchExtendedClassDeclaration */', + 'Match', + ], + 'class_implements_declaration' => [ + '/* testNoMatchImplementedClassDeclaration */', + 'Match', + ], + 'use_statement' => [ + '/* testNoMatchInUseStatement */', + 'Match', + ], + 'unsupported_inline_control_structure' => ['/* testNoMatchMissingCurlies */'], + 'unsupported_alternative_syntax' => ['/* testNoMatchAlternativeSyntax */'], + 'live_coding' => ['/* testLiveCoding */'], + ]; + + }//end dataNotAMatchStructure() + + + /** + * Verify that the tokenization of switch structures is not affected by the backfill. + * + * @param string $testMarker The comment prefacing the target token. + * @param int $openerOffset The expected offset of the scope opener in relation to the testMarker. + * @param int $closerOffset The expected offset of the scope closer in relation to the testMarker. + * + * @dataProvider dataSwitchExpression + * @covers PHP_CodeSniffer\Tokenizers\PHP::tokenize + * @covers PHP_CodeSniffer\Tokenizers\PHP::processAdditional + * + * @return void + */ + public function testSwitchExpression($testMarker, $openerOffset, $closerOffset) + { + $token = $this->getTargetToken($testMarker, T_SWITCH); + + $this->scopeTestHelper($token, $openerOffset, $closerOffset); + $this->parenthesisTestHelper($token); + + }//end testSwitchExpression() + + + /** + * Data provider. + * + * @see testSwitchExpression() + * + * @return array + */ + public function dataSwitchExpression() + { + return [ + 'switch_containing_match' => [ + '/* testSwitchContainingMatch */', + 6, + 174, + ], + 'match_containing_switch_1' => [ + '/* testSwitchNestedInMatch1 */', + 5, + 63, + ], + 'match_containing_switch_2' => [ + '/* testSwitchNestedInMatch2 */', + 5, + 63, + ], + ]; + + }//end dataSwitchExpression() + + + /** + * Verify that the tokenization of a switch case/default structure containing a match structure + * or contained *in* a match structure is not affected by the backfill. + * + * @param string $testMarker The comment prefacing the target token. + * @param int $openerOffset The expected offset of the scope opener in relation to the testMarker. + * @param int $closerOffset The expected offset of the scope closer in relation to the testMarker. + * + * @dataProvider dataSwitchCaseVersusMatch + * @covers PHP_CodeSniffer\Tokenizers\PHP::tokenize + * @covers PHP_CodeSniffer\Tokenizers\PHP::processAdditional + * + * @return void + */ + public function testSwitchCaseVersusMatch($testMarker, $openerOffset, $closerOffset) + { + $token = $this->getTargetToken($testMarker, [T_CASE, T_DEFAULT]); + + $this->scopeTestHelper($token, $openerOffset, $closerOffset); + + }//end testSwitchCaseVersusMatch() + + + /** + * Data provider. + * + * @see testSwitchCaseVersusMatch() + * + * @return array + */ + public function dataSwitchCaseVersusMatch() + { + return [ + 'switch_with_nested_match_case_1' => [ + '/* testMatchWithDefaultNestedInSwitchCase1 */', + 3, + 55, + ], + 'switch_with_nested_match_case_2' => [ + '/* testMatchWithDefaultNestedInSwitchCase2 */', + 4, + 21, + ], + 'switch_with_nested_match_default_case' => [ + '/* testMatchWithDefaultNestedInSwitchDefault */', + 1, + 38, + ], + 'match_with_nested_switch_case' => [ + '/* testSwitchDefaultNestedInMatchCase */', + 1, + 18, + ], + 'match_with_nested_switch_default_case' => [ + '/* testSwitchDefaultNestedInMatchDefault */', + 1, + 20, + ], + ]; + + }//end dataSwitchCaseVersusMatch() + + + /** + * Helper function to verify that all scope related array indexes for a control structure + * are set correctly. + * + * @param string $token The control structure token to check. + * @param int $openerOffset The expected offset of the scope opener in relation to + * the control structure token. + * @param int $closerOffset The expected offset of the scope closer in relation to + * the control structure token. + * @param bool $skipScopeCloserCheck Whether to skip the scope closer check. + * This should be set to "true" when testing nested arrow functions, + * where the "inner" arrow function shares a scope closer with the + * "outer" arrow function, as the 'scope_condition' for the scope closer + * of the "inner" arrow function will point to the "outer" arrow function. + * + * @return void + */ + private function scopeTestHelper($token, $openerOffset, $closerOffset, $skipScopeCloserCheck=false) + { + $tokens = self::$phpcsFile->getTokens(); + $tokenArray = $tokens[$token]; + $tokenType = $tokenArray['type']; + $expectedScopeOpener = ($token + $openerOffset); + $expectedScopeCloser = ($token + $closerOffset); + + $this->assertArrayHasKey('scope_condition', $tokenArray, 'Scope condition is not set'); + $this->assertArrayHasKey('scope_opener', $tokenArray, 'Scope opener is not set'); + $this->assertArrayHasKey('scope_closer', $tokenArray, 'Scope closer is not set'); + $this->assertSame($token, $tokenArray['scope_condition'], 'Scope condition is not the '.$tokenType.' token'); + $this->assertSame($expectedScopeOpener, $tokenArray['scope_opener'], 'Scope opener of the '.$tokenType.' token incorrect'); + $this->assertSame($expectedScopeCloser, $tokenArray['scope_closer'], 'Scope closer of the '.$tokenType.' token incorrect'); + + $opener = $tokenArray['scope_opener']; + $this->assertArrayHasKey('scope_condition', $tokens[$opener], 'Opener scope condition is not set'); + $this->assertArrayHasKey('scope_opener', $tokens[$opener], 'Opener scope opener is not set'); + $this->assertArrayHasKey('scope_closer', $tokens[$opener], 'Opener scope closer is not set'); + $this->assertSame($token, $tokens[$opener]['scope_condition'], 'Opener scope condition is not the '.$tokenType.' token'); + $this->assertSame($expectedScopeOpener, $tokens[$opener]['scope_opener'], $tokenType.' opener scope opener token incorrect'); + $this->assertSame($expectedScopeCloser, $tokens[$opener]['scope_closer'], $tokenType.' opener scope closer token incorrect'); + + $closer = $tokenArray['scope_closer']; + $this->assertArrayHasKey('scope_condition', $tokens[$closer], 'Closer scope condition is not set'); + $this->assertArrayHasKey('scope_opener', $tokens[$closer], 'Closer scope opener is not set'); + $this->assertArrayHasKey('scope_closer', $tokens[$closer], 'Closer scope closer is not set'); + if ($skipScopeCloserCheck === false) { + $this->assertSame($token, $tokens[$closer]['scope_condition'], 'Closer scope condition is not the '.$tokenType.' token'); + } + + $this->assertSame($expectedScopeOpener, $tokens[$closer]['scope_opener'], $tokenType.' closer scope opener token incorrect'); + $this->assertSame($expectedScopeCloser, $tokens[$closer]['scope_closer'], $tokenType.' closer scope closer token incorrect'); + + if (($opener + 1) !== $closer) { + for ($i = ($opener + 1); $i < $closer; $i++) { + $this->assertArrayHasKey( + $token, + $tokens[$i]['conditions'], + $tokenType.' condition not added for token belonging to the '.$tokenType.' structure' + ); + } + } + + }//end scopeTestHelper() + + + /** + * Helper function to verify that all parenthesis related array indexes for a control structure + * token are set correctly. + * + * @param int $token The position of the control structure token. + * + * @return void + */ + private function parenthesisTestHelper($token) + { + $tokens = self::$phpcsFile->getTokens(); + $tokenArray = $tokens[$token]; + $tokenType = $tokenArray['type']; + + $this->assertArrayHasKey('parenthesis_owner', $tokenArray, 'Parenthesis owner is not set'); + $this->assertArrayHasKey('parenthesis_opener', $tokenArray, 'Parenthesis opener is not set'); + $this->assertArrayHasKey('parenthesis_closer', $tokenArray, 'Parenthesis closer is not set'); + $this->assertSame($token, $tokenArray['parenthesis_owner'], 'Parenthesis owner is not the '.$tokenType.' token'); + + $opener = $tokenArray['parenthesis_opener']; + $this->assertArrayHasKey('parenthesis_owner', $tokens[$opener], 'Opening parenthesis owner is not set'); + $this->assertSame($token, $tokens[$opener]['parenthesis_owner'], 'Opening parenthesis owner is not the '.$tokenType.' token'); + + $closer = $tokenArray['parenthesis_closer']; + $this->assertArrayHasKey('parenthesis_owner', $tokens[$closer], 'Closing parenthesis owner is not set'); + $this->assertSame($token, $tokens[$closer]['parenthesis_owner'], 'Closing parenthesis owner is not the '.$tokenType.' token'); + + }//end parenthesisTestHelper() + + +}//end class diff --git a/vendor/squizlabs/php_codesniffer/tests/Core/Tokenizer/BackfillNumericSeparatorTest.inc b/vendor/squizlabs/php_codesniffer/tests/Core/Tokenizer/BackfillNumericSeparatorTest.inc new file mode 100644 index 00000000..eef53f59 --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/tests/Core/Tokenizer/BackfillNumericSeparatorTest.inc @@ -0,0 +1,82 @@ + + * @copyright 2019 Squiz Pty Ltd (ABN 77 084 670 600) + * @license https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence + */ + +namespace PHP_CodeSniffer\Tests\Core\Tokenizer; + +use PHP_CodeSniffer\Tests\Core\AbstractMethodUnitTest; + +class BackfillNumericSeparatorTest extends AbstractMethodUnitTest +{ + + + /** + * Test that numbers using numeric separators are tokenized correctly. + * + * @param array $testData The data required for the specific test case. + * + * @dataProvider dataTestBackfill + * @covers PHP_CodeSniffer\Tokenizers\PHP::tokenize + * + * @return void + */ + public function testBackfill($testData) + { + $tokens = self::$phpcsFile->getTokens(); + $number = $this->getTargetToken($testData['marker'], [T_LNUMBER, T_DNUMBER]); + + $this->assertSame(constant($testData['type']), $tokens[$number]['code']); + $this->assertSame($testData['type'], $tokens[$number]['type']); + $this->assertSame($testData['value'], $tokens[$number]['content']); + + }//end testBackfill() + + + /** + * Data provider. + * + * @see testBackfill() + * + * @return array + */ + public function dataTestBackfill() + { + $testHexType = 'T_LNUMBER'; + if (PHP_INT_MAX < 0xCAFEF00D) { + $testHexType = 'T_DNUMBER'; + } + + $testHexMultipleType = 'T_LNUMBER'; + if (PHP_INT_MAX < 0x42726F776E) { + $testHexMultipleType = 'T_DNUMBER'; + } + + $testIntMoreThanMaxType = 'T_LNUMBER'; + if (PHP_INT_MAX < 10223372036854775807) { + $testIntMoreThanMaxType = 'T_DNUMBER'; + } + + return [ + [ + [ + 'marker' => '/* testSimpleLNumber */', + 'type' => 'T_LNUMBER', + 'value' => '1_000_000_000', + ], + ], + [ + [ + 'marker' => '/* testSimpleDNumber */', + 'type' => 'T_DNUMBER', + 'value' => '107_925_284.88', + ], + ], + [ + [ + 'marker' => '/* testFloat */', + 'type' => 'T_DNUMBER', + 'value' => '6.674_083e-11', + ], + ], + [ + [ + 'marker' => '/* testFloat2 */', + 'type' => 'T_DNUMBER', + 'value' => '6.674_083e+11', + ], + ], + [ + [ + 'marker' => '/* testFloat3 */', + 'type' => 'T_DNUMBER', + 'value' => '1_2.3_4e1_23', + ], + ], + [ + [ + 'marker' => '/* testHex */', + 'type' => $testHexType, + 'value' => '0xCAFE_F00D', + ], + ], + [ + [ + 'marker' => '/* testHexMultiple */', + 'type' => $testHexMultipleType, + 'value' => '0x42_72_6F_77_6E', + ], + ], + [ + [ + 'marker' => '/* testHexInt */', + 'type' => 'T_LNUMBER', + 'value' => '0x42_72_6F', + ], + ], + [ + [ + 'marker' => '/* testBinary */', + 'type' => 'T_LNUMBER', + 'value' => '0b0101_1111', + ], + ], + [ + [ + 'marker' => '/* testOctal */', + 'type' => 'T_LNUMBER', + 'value' => '0137_041', + ], + ], + [ + [ + 'marker' => '/* testIntMoreThanMax */', + 'type' => $testIntMoreThanMaxType, + 'value' => '10_223_372_036_854_775_807', + ], + ], + ]; + + }//end dataTestBackfill() + + + /** + * Test that numbers using numeric separators which are considered parse errors and/or + * which aren't relevant to the backfill, do not incorrectly trigger the backfill anyway. + * + * @param string $testMarker The comment which prefaces the target token in the test file. + * @param array $expectedTokens The token type and content of the expected token sequence. + * + * @dataProvider dataNoBackfill + * @covers PHP_CodeSniffer\Tokenizers\PHP::tokenize + * + * @return void + */ + public function testNoBackfill($testMarker, $expectedTokens) + { + $tokens = self::$phpcsFile->getTokens(); + $number = $this->getTargetToken($testMarker, [T_LNUMBER, T_DNUMBER]); + + foreach ($expectedTokens as $key => $expectedToken) { + $i = ($number + $key); + $this->assertSame($expectedToken['code'], $tokens[$i]['code']); + $this->assertSame($expectedToken['content'], $tokens[$i]['content']); + } + + }//end testNoBackfill() + + + /** + * Data provider. + * + * @see testBackfill() + * + * @return array + */ + public function dataNoBackfill() + { + return [ + [ + '/* testInvalid1 */', + [ + [ + 'code' => T_LNUMBER, + 'content' => '100', + ], + [ + 'code' => T_STRING, + 'content' => '_', + ], + ], + ], + [ + '/* testInvalid2 */', + [ + [ + 'code' => T_LNUMBER, + 'content' => '1', + ], + [ + 'code' => T_STRING, + 'content' => '__1', + ], + ], + ], + [ + '/* testInvalid3 */', + [ + [ + 'code' => T_LNUMBER, + 'content' => '1', + ], + [ + 'code' => T_STRING, + 'content' => '_', + ], + [ + 'code' => T_DNUMBER, + 'content' => '.0', + ], + ], + ], + [ + '/* testInvalid4 */', + [ + [ + 'code' => T_DNUMBER, + 'content' => '1.', + ], + [ + 'code' => T_STRING, + 'content' => '_0', + ], + ], + ], + [ + '/* testInvalid5 */', + [ + [ + 'code' => T_LNUMBER, + 'content' => '0', + ], + [ + 'code' => T_STRING, + 'content' => 'x_123', + ], + ], + ], + [ + '/* testInvalid6 */', + [ + [ + 'code' => T_LNUMBER, + 'content' => '0', + ], + [ + 'code' => T_STRING, + 'content' => 'b_101', + ], + ], + ], + [ + '/* testInvalid7 */', + [ + [ + 'code' => T_LNUMBER, + 'content' => '1', + ], + [ + 'code' => T_STRING, + 'content' => '_e2', + ], + ], + ], + [ + '/* testInvalid8 */', + [ + [ + 'code' => T_LNUMBER, + 'content' => '1', + ], + [ + 'code' => T_STRING, + 'content' => 'e_2', + ], + ], + ], + [ + '/* testInvalid9 */', + [ + [ + 'code' => T_LNUMBER, + 'content' => '107_925_284', + ], + [ + 'code' => T_WHITESPACE, + 'content' => ' ', + ], + [ + 'code' => T_DNUMBER, + 'content' => '.88', + ], + ], + ], + [ + '/* testInvalid10 */', + [ + [ + 'code' => T_LNUMBER, + 'content' => '107_925_284', + ], + [ + 'code' => T_COMMENT, + 'content' => '/*comment*/', + ], + [ + 'code' => T_DNUMBER, + 'content' => '.88', + ], + ], + ], + [ + '/* testCalc1 */', + [ + [ + 'code' => T_LNUMBER, + 'content' => '667_083', + ], + [ + 'code' => T_WHITESPACE, + 'content' => ' ', + ], + [ + 'code' => T_MINUS, + 'content' => '-', + ], + [ + 'code' => T_WHITESPACE, + 'content' => ' ', + ], + [ + 'code' => T_LNUMBER, + 'content' => '11', + ], + ], + ], + [ + '/* test Calc2 */', + [ + [ + 'code' => T_DNUMBER, + 'content' => '6.674_08e3', + ], + [ + 'code' => T_WHITESPACE, + 'content' => ' ', + ], + [ + 'code' => T_PLUS, + 'content' => '+', + ], + [ + 'code' => T_WHITESPACE, + 'content' => ' ', + ], + [ + 'code' => T_LNUMBER, + 'content' => '11', + ], + ], + ], + ]; + + }//end dataNoBackfill() + + +}//end class diff --git a/vendor/squizlabs/php_codesniffer/tests/Core/Tokenizer/BitwiseOrTest.inc b/vendor/squizlabs/php_codesniffer/tests/Core/Tokenizer/BitwiseOrTest.inc new file mode 100644 index 00000000..2af0ecae --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/tests/Core/Tokenizer/BitwiseOrTest.inc @@ -0,0 +1,119 @@ + $param | $int; + +/* testTypeUnionArrowReturnType */ +$arrowWithReturnType = fn ($param) : int|null => $param * 10; + +/* testBitwiseOrInArrayKey */ +$array = array( + A | B => /* testBitwiseOrInArrayValue */ B | C +); + +/* testBitwiseOrInShortArrayKey */ +$array = [ + A | B => /* testBitwiseOrInShortArrayValue */ B | C +]; + +/* testBitwiseOrTryCatch */ +try { +} catch ( ExceptionA | ExceptionB $e ) { +} + +/* testBitwiseOrNonArrowFnFunctionCall */ +$obj->fn($something | $else); + +/* testTypeUnionNonArrowFunctionDeclaration */ +function &fn(int|false $something) {} + +/* testLiveCoding */ +// Intentional parse error. This has to be the last test in the file. +return function( type| diff --git a/vendor/squizlabs/php_codesniffer/tests/Core/Tokenizer/BitwiseOrTest.php b/vendor/squizlabs/php_codesniffer/tests/Core/Tokenizer/BitwiseOrTest.php new file mode 100644 index 00000000..d4a27bdc --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/tests/Core/Tokenizer/BitwiseOrTest.php @@ -0,0 +1,133 @@ + + * @copyright 2020 Squiz Pty Ltd (ABN 77 084 670 600) + * @license https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence + */ + +namespace PHP_CodeSniffer\Tests\Core\Tokenizer; + +use PHP_CodeSniffer\Tests\Core\AbstractMethodUnitTest; + +class BitwiseOrTest extends AbstractMethodUnitTest +{ + + + /** + * Test that non-union type bitwise or tokens are still tokenized as bitwise or. + * + * @param string $testMarker The comment which prefaces the target token in the test file. + * + * @dataProvider dataBitwiseOr + * @covers PHP_CodeSniffer\Tokenizers\PHP::processAdditional + * + * @return void + */ + public function testBitwiseOr($testMarker) + { + $tokens = self::$phpcsFile->getTokens(); + + $opener = $this->getTargetToken($testMarker, [T_BITWISE_OR, T_TYPE_UNION]); + $this->assertSame(T_BITWISE_OR, $tokens[$opener]['code']); + $this->assertSame('T_BITWISE_OR', $tokens[$opener]['type']); + + }//end testBitwiseOr() + + + /** + * Data provider. + * + * @see testBitwiseOr() + * + * @return array + */ + public function dataBitwiseOr() + { + return [ + ['/* testBitwiseOr1 */'], + ['/* testBitwiseOr2 */'], + ['/* testBitwiseOrPropertyDefaultValue */'], + ['/* testBitwiseOrParamDefaultValue */'], + ['/* testBitwiseOr3 */'], + ['/* testBitwiseOrClosureParamDefault */'], + ['/* testBitwiseOrArrowParamDefault */'], + ['/* testBitwiseOrArrowExpression */'], + ['/* testBitwiseOrInArrayKey */'], + ['/* testBitwiseOrInArrayValue */'], + ['/* testBitwiseOrInShortArrayKey */'], + ['/* testBitwiseOrInShortArrayValue */'], + ['/* testBitwiseOrTryCatch */'], + ['/* testBitwiseOrNonArrowFnFunctionCall */'], + ['/* testLiveCoding */'], + ]; + + }//end dataBitwiseOr() + + + /** + * Test that bitwise or tokens when used as part of a union type are tokenized as `T_TYPE_UNION`. + * + * @param string $testMarker The comment which prefaces the target token in the test file. + * + * @dataProvider dataTypeUnion + * @covers PHP_CodeSniffer\Tokenizers\PHP::processAdditional + * + * @return void + */ + public function testTypeUnion($testMarker) + { + $tokens = self::$phpcsFile->getTokens(); + + $opener = $this->getTargetToken($testMarker, [T_BITWISE_OR, T_TYPE_UNION]); + $this->assertSame(T_TYPE_UNION, $tokens[$opener]['code']); + $this->assertSame('T_TYPE_UNION', $tokens[$opener]['type']); + + }//end testTypeUnion() + + + /** + * Data provider. + * + * @see testTypeUnion() + * + * @return array + */ + public function dataTypeUnion() + { + return [ + ['/* testTypeUnionPropertySimple */'], + ['/* testTypeUnionPropertyReverseModifierOrder */'], + ['/* testTypeUnionPropertyMulti1 */'], + ['/* testTypeUnionPropertyMulti2 */'], + ['/* testTypeUnionPropertyMulti3 */'], + ['/* testTypeUnionPropertyNamespaceRelative */'], + ['/* testTypeUnionPropertyPartiallyQualified */'], + ['/* testTypeUnionPropertyFullyQualified */'], + ['/* testTypeUnionParam1 */'], + ['/* testTypeUnionParam2 */'], + ['/* testTypeUnionParam3 */'], + ['/* testTypeUnionParamNamespaceRelative */'], + ['/* testTypeUnionParamPartiallyQualified */'], + ['/* testTypeUnionParamFullyQualified */'], + ['/* testTypeUnionReturnType */'], + ['/* testTypeUnionConstructorPropertyPromotion */'], + ['/* testTypeUnionAbstractMethodReturnType1 */'], + ['/* testTypeUnionAbstractMethodReturnType2 */'], + ['/* testTypeUnionReturnTypeNamespaceRelative */'], + ['/* testTypeUnionReturnPartiallyQualified */'], + ['/* testTypeUnionReturnFullyQualified */'], + ['/* testTypeUnionClosureParamIllegalNullable */'], + ['/* testTypeUnionWithReference */'], + ['/* testTypeUnionWithSpreadOperator */'], + ['/* testTypeUnionClosureReturn */'], + ['/* testTypeUnionArrowParam */'], + ['/* testTypeUnionArrowReturnType */'], + ['/* testTypeUnionNonArrowFunctionDeclaration */'], + ]; + + }//end dataTypeUnion() + + +}//end class diff --git a/vendor/squizlabs/php_codesniffer/tests/Core/Tokenizer/DefaultKeywordTest.inc b/vendor/squizlabs/php_codesniffer/tests/Core/Tokenizer/DefaultKeywordTest.inc new file mode 100644 index 00000000..648149d2 --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/tests/Core/Tokenizer/DefaultKeywordTest.inc @@ -0,0 +1,203 @@ + 1, + 2 => 2, + /* testSimpleMatchDefault */ + default => 'default', + }; +} + +function switchWithDefault($i) { + switch ($i) { + case 1: + return 1; + case 2: + return 2; + /* testSimpleSwitchDefault */ + default: + return 'default'; + } +} + +function switchWithDefaultAndCurlies($i) { + switch ($i) { + case 1: + return 1; + case 2: + return 2; + /* testSimpleSwitchDefaultWithCurlies */ + default: { + return 'default'; + } + } +} + +function matchWithDefaultInSwitch() { + switch ($something) { + case 'foo': + $var = [1, 2, 3]; + $var = match ($i) { + 1 => 1, + /* testMatchDefaultNestedInSwitchCase1 */ + default => 'default', + }; + continue; + + case 'bar' : + $i = callMe($a, $b); + return match ($i) { + 1 => 1, + /* testMatchDefaultNestedInSwitchCase2 */ + default => 'default', + }; + + /* testSwitchDefault */ + default; + echo 'something', match ($i) { + 1, => 1, + /* testMatchDefaultNestedInSwitchDefault */ + default, => 'default', + }; + break; + } +} + +function switchWithDefaultInMatch() { + $x = match ($y) { + 5, 8 => function($z) { + switch($z) { + case 'a'; + $var = [1, 2, 3]; + return 'a'; + /* testSwitchDefaultNestedInMatchCase */ + default: + $var = [1, 2, 3]; + return 'default1'; + } + }, + /* testMatchDefault */ + default => function($z) { + switch($z) { + case 'a': + $i = callMe($a, $b); + return 'b'; + /* testSwitchDefaultNestedInMatchDefault */ + default: + $i = callMe($a, $b); + return 'default2'; + } + } + }; +} + +function shortArrayWithConstantKey() { + $arr = [ + /* testClassConstantAsShortArrayKey */ + SomeClass::DEFAULT => 1, + /* testClassPropertyAsShortArrayKey */ + SomeClass->DEFAULT => 1, + /* testNamespacedConstantAsShortArrayKey */ + // Intentional parse error PHP < 8.0. Reserved keyword used as namespaced constant. + SomeNamespace\DEFAULT => 1, + /* testFQNGlobalConstantAsShortArrayKey */ + // Intentional parse error in PHP < 8.0. Reserved keyword used as global constant. + \DEFAULT => 1, + ]; +} + +function longArrayWithConstantKey() { + $arr = array( + /* testClassConstantAsLongArrayKey */ + SomeClass::DEFAULT => 1, + ); +} + +function yieldWithConstantKey() { + /* testClassConstantAsYieldKey */ + yield SomeClass::DEFAULT => 1; +} + +function longArrayWithConstantKeyNestedInMatch() { + return match($x) { + /* testMatchDefaultWithNestedLongArrayWithClassConstantKey */ + DEFAULT => array( + /* testClassConstantAsLongArrayKeyNestedInMatch */ + SomeClass::DEFAULT => match($x) { + /* testMatchDefaultWithNestedLongArrayWithClassConstantKeyLevelDown */ + DEFAULT => array( + /* testClassConstantAsLongArrayKeyNestedInMatchLevelDown */ + SomeClass::DEFAULT => 1, + ), + }, + ), + }; +} + +function shortArrayWithConstantKeyNestedInMatch() { + return match($x) { + /* testMatchDefaultWithNestedShortArrayWithClassConstantKey */ + DEFAULT => [ + /* testClassConstantAsShortArrayKeyNestedInMatch */ + SomeClass::DEFAULT => match($x) { + /* testMatchDefaultWithNestedShortArrayWithClassConstantKeyLevelDown */ + DEFAULT => [ + /* testClassConstantAsShortArrayKeyNestedInMatchLevelDown */ + SomeClass::DEFAULT => 1, + ], + }, + ], + }; +} + + +function longArrayWithConstantKeyWithNestedMatch() { + return array( + /* testClassConstantAsLongArrayKeyWithNestedMatch */ + SomeClass::DEFAULT => match($x) { + /* testMatchDefaultNestedInLongArray */ + DEFAULT => 'foo' + }, + ); +} + +function shortArrayWithConstantKeyWithNestedMatch() { + return [ + /* testClassConstantAsShortArrayKeyWithNestedMatch */ + SomeClass::DEFAULT => match($x) { + /* testMatchDefaultNestedInShortArray */ + DEFAULT => 'foo' + }, + ]; +} + +function switchWithConstantNonDefault($i) { + switch ($i) { + /* testClassConstantInSwitchCase */ + case SomeClass::DEFAULT: + return 1; + + /* testClassPropertyInSwitchCase */ + case SomeClass->DEFAULT: + return 2; + + /* testNamespacedConstantInSwitchCase */ + // Intentional parse error PHP < 8.0. Reserved keyword used as constant. + case SomeNamespace\DEFAULT: + return 2; + + /* testNamespaceRelativeConstantInSwitchCase */ + // Intentional parse error PHP < 8.0. Reserved keyword used as global constant. + case namespace\DEFAULT: + return 2; + } +} + +class Foo { + /* testClassConstant */ + const DEFAULT = 'foo'; + + /* testMethodDeclaration */ + public function default() {} +} diff --git a/vendor/squizlabs/php_codesniffer/tests/Core/Tokenizer/DefaultKeywordTest.php b/vendor/squizlabs/php_codesniffer/tests/Core/Tokenizer/DefaultKeywordTest.php new file mode 100644 index 00000000..9a5b061a --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/tests/Core/Tokenizer/DefaultKeywordTest.php @@ -0,0 +1,302 @@ + + * @copyright 2020-2021 Squiz Pty Ltd (ABN 77 084 670 600) + * @license https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence + */ + +namespace PHP_CodeSniffer\Tests\Core\Tokenizer; + +use PHP_CodeSniffer\Tests\Core\AbstractMethodUnitTest; + +class DefaultKeywordTest extends AbstractMethodUnitTest +{ + + + /** + * Test the retokenization of the `default` keyword for match structure to `T_MATCH_DEFAULT`. + * + * Note: Cases and default structures within a match structure do *NOT* get case/default scope + * conditions, in contrast to case and default structures in switch control structures. + * + * @param string $testMarker The comment prefacing the target token. + * @param string $testContent The token content to look for. + * + * @dataProvider dataMatchDefault + * @covers PHP_CodeSniffer\Tokenizers\PHP::tokenize + * @covers PHP_CodeSniffer\Tokenizers\Tokenizer::recurseScopeMap + * + * @return void + */ + public function testMatchDefault($testMarker, $testContent='default') + { + $tokens = self::$phpcsFile->getTokens(); + + $token = $this->getTargetToken($testMarker, [T_MATCH_DEFAULT, T_DEFAULT, T_STRING], $testContent); + $tokenArray = $tokens[$token]; + + $this->assertSame(T_MATCH_DEFAULT, $tokenArray['code'], 'Token tokenized as '.$tokenArray['type'].', not T_MATCH_DEFAULT (code)'); + $this->assertSame('T_MATCH_DEFAULT', $tokenArray['type'], 'Token tokenized as '.$tokenArray['type'].', not T_MATCH_DEFAULT (type)'); + + $this->assertArrayNotHasKey('scope_condition', $tokenArray, 'Scope condition is set'); + $this->assertArrayNotHasKey('scope_opener', $tokenArray, 'Scope opener is set'); + $this->assertArrayNotHasKey('scope_closer', $tokenArray, 'Scope closer is set'); + + }//end testMatchDefault() + + + /** + * Data provider. + * + * @see testMatchDefault() + * + * @return array + */ + public function dataMatchDefault() + { + return [ + 'simple_match_default' => ['/* testSimpleMatchDefault */'], + 'match_default_in_switch_case_1' => ['/* testMatchDefaultNestedInSwitchCase1 */'], + 'match_default_in_switch_case_2' => ['/* testMatchDefaultNestedInSwitchCase2 */'], + 'match_default_in_switch_default' => ['/* testMatchDefaultNestedInSwitchDefault */'], + 'match_default_containing_switch' => ['/* testMatchDefault */'], + + 'match_default_with_nested_long_array_and_default_key' => [ + '/* testMatchDefaultWithNestedLongArrayWithClassConstantKey */', + 'DEFAULT', + ], + 'match_default_with_nested_long_array_and_default_key_2' => [ + '/* testMatchDefaultWithNestedLongArrayWithClassConstantKeyLevelDown */', + 'DEFAULT', + ], + 'match_default_with_nested_short_array_and_default_key' => [ + '/* testMatchDefaultWithNestedShortArrayWithClassConstantKey */', + 'DEFAULT', + ], + 'match_default_with_nested_short_array_and_default_key_2' => [ + '/* testMatchDefaultWithNestedShortArrayWithClassConstantKeyLevelDown */', + 'DEFAULT', + ], + 'match_default_in_long_array' => [ + '/* testMatchDefaultNestedInLongArray */', + 'DEFAULT', + ], + 'match_default_in_short_array' => [ + '/* testMatchDefaultNestedInShortArray */', + 'DEFAULT', + ], + ]; + + }//end dataMatchDefault() + + + /** + * Verify that the retokenization of `T_DEFAULT` tokens in match constructs, doesn't negatively + * impact the tokenization of `T_DEFAULT` tokens in switch control structures. + * + * Note: Cases and default structures within a switch control structure *do* get case/default scope + * conditions. + * + * @param string $testMarker The comment prefacing the target token. + * @param int $openerOffset The expected offset of the scope opener in relation to the testMarker. + * @param int $closerOffset The expected offset of the scope closer in relation to the testMarker. + * @param int|null $conditionStop The expected offset at which tokens stop having T_DEFAULT as a scope condition. + * @param string $testContent The token content to look for. + * + * @dataProvider dataSwitchDefault + * @covers PHP_CodeSniffer\Tokenizers\Tokenizer::recurseScopeMap + * + * @return void + */ + public function testSwitchDefault($testMarker, $openerOffset, $closerOffset, $conditionStop=null, $testContent='default') + { + $tokens = self::$phpcsFile->getTokens(); + + $token = $this->getTargetToken($testMarker, [T_MATCH_DEFAULT, T_DEFAULT, T_STRING], $testContent); + $tokenArray = $tokens[$token]; + $expectedScopeOpener = ($token + $openerOffset); + $expectedScopeCloser = ($token + $closerOffset); + + $this->assertSame(T_DEFAULT, $tokenArray['code'], 'Token tokenized as '.$tokenArray['type'].', not T_DEFAULT (code)'); + $this->assertSame('T_DEFAULT', $tokenArray['type'], 'Token tokenized as '.$tokenArray['type'].', not T_DEFAULT (type)'); + + $this->assertArrayHasKey('scope_condition', $tokenArray, 'Scope condition is not set'); + $this->assertArrayHasKey('scope_opener', $tokenArray, 'Scope opener is not set'); + $this->assertArrayHasKey('scope_closer', $tokenArray, 'Scope closer is not set'); + $this->assertSame($token, $tokenArray['scope_condition'], 'Scope condition is not the T_DEFAULT token'); + $this->assertSame($expectedScopeOpener, $tokenArray['scope_opener'], 'Scope opener of the T_DEFAULT token incorrect'); + $this->assertSame($expectedScopeCloser, $tokenArray['scope_closer'], 'Scope closer of the T_DEFAULT token incorrect'); + + $opener = $tokenArray['scope_opener']; + $this->assertArrayHasKey('scope_condition', $tokens[$opener], 'Opener scope condition is not set'); + $this->assertArrayHasKey('scope_opener', $tokens[$opener], 'Opener scope opener is not set'); + $this->assertArrayHasKey('scope_closer', $tokens[$opener], 'Opener scope closer is not set'); + $this->assertSame($token, $tokens[$opener]['scope_condition'], 'Opener scope condition is not the T_DEFAULT token'); + $this->assertSame($expectedScopeOpener, $tokens[$opener]['scope_opener'], 'T_DEFAULT opener scope opener token incorrect'); + $this->assertSame($expectedScopeCloser, $tokens[$opener]['scope_closer'], 'T_DEFAULT opener scope closer token incorrect'); + + $closer = $tokenArray['scope_closer']; + $this->assertArrayHasKey('scope_condition', $tokens[$closer], 'Closer scope condition is not set'); + $this->assertArrayHasKey('scope_opener', $tokens[$closer], 'Closer scope opener is not set'); + $this->assertArrayHasKey('scope_closer', $tokens[$closer], 'Closer scope closer is not set'); + $this->assertSame($token, $tokens[$closer]['scope_condition'], 'Closer scope condition is not the T_DEFAULT token'); + $this->assertSame($expectedScopeOpener, $tokens[$closer]['scope_opener'], 'T_DEFAULT closer scope opener token incorrect'); + $this->assertSame($expectedScopeCloser, $tokens[$closer]['scope_closer'], 'T_DEFAULT closer scope closer token incorrect'); + + if (($opener + 1) !== $closer) { + $end = $closer; + if (isset($conditionStop) === true) { + $end = $conditionStop; + } + + for ($i = ($opener + 1); $i < $end; $i++) { + $this->assertArrayHasKey( + $token, + $tokens[$i]['conditions'], + 'T_DEFAULT condition not added for token belonging to the T_DEFAULT structure' + ); + } + } + + }//end testSwitchDefault() + + + /** + * Data provider. + * + * @see testSwitchDefault() + * + * @return array + */ + public function dataSwitchDefault() + { + return [ + 'simple_switch_default' => [ + '/* testSimpleSwitchDefault */', + 1, + 4, + ], + 'simple_switch_default_with_curlies' => [ + // For a default structure with curly braces, the scope opener + // will be the open curly and the closer the close curly. + // However, scope conditions will not be set for open to close, + // but only for the open token up to the "break/return/continue" etc. + '/* testSimpleSwitchDefaultWithCurlies */', + 3, + 12, + 6, + ], + 'switch_default_toplevel' => [ + '/* testSwitchDefault */', + 1, + 43, + ], + 'switch_default_nested_in_match_case' => [ + '/* testSwitchDefaultNestedInMatchCase */', + 1, + 20, + ], + 'switch_default_nested_in_match_default' => [ + '/* testSwitchDefaultNestedInMatchDefault */', + 1, + 18, + ], + ]; + + }//end dataSwitchDefault() + + + /** + * Verify that the retokenization of `T_DEFAULT` tokens in match constructs, doesn't negatively + * impact the tokenization of `T_STRING` tokens with the contents 'default' which aren't in + * actual fact the default keyword. + * + * @param string $testMarker The comment prefacing the target token. + * @param string $testContent The token content to look for. + * + * @dataProvider dataNotDefaultKeyword + * @covers PHP_CodeSniffer\Tokenizers\PHP::processAdditional + * + * @return void + */ + public function testNotDefaultKeyword($testMarker, $testContent='DEFAULT') + { + $tokens = self::$phpcsFile->getTokens(); + + $token = $this->getTargetToken($testMarker, [T_MATCH_DEFAULT, T_DEFAULT, T_STRING], $testContent); + $tokenArray = $tokens[$token]; + + $this->assertSame(T_STRING, $tokenArray['code'], 'Token tokenized as '.$tokenArray['type'].', not T_STRING (code)'); + $this->assertSame('T_STRING', $tokenArray['type'], 'Token tokenized as '.$tokenArray['type'].', not T_STRING (type)'); + + $this->assertArrayNotHasKey('scope_condition', $tokenArray, 'Scope condition is set'); + $this->assertArrayNotHasKey('scope_opener', $tokenArray, 'Scope opener is set'); + $this->assertArrayNotHasKey('scope_closer', $tokenArray, 'Scope closer is set'); + + }//end testNotDefaultKeyword() + + + /** + * Data provider. + * + * @see testNotDefaultKeyword() + * + * @return array + */ + public function dataNotDefaultKeyword() + { + return [ + 'class-constant-as-short-array-key' => ['/* testClassConstantAsShortArrayKey */'], + 'class-property-as-short-array-key' => ['/* testClassPropertyAsShortArrayKey */'], + 'namespaced-constant-as-short-array-key' => ['/* testNamespacedConstantAsShortArrayKey */'], + 'fqn-global-constant-as-short-array-key' => ['/* testFQNGlobalConstantAsShortArrayKey */'], + 'class-constant-as-long-array-key' => ['/* testClassConstantAsLongArrayKey */'], + 'class-constant-as-yield-key' => ['/* testClassConstantAsYieldKey */'], + + 'class-constant-as-long-array-key-nested-in-match' => ['/* testClassConstantAsLongArrayKeyNestedInMatch */'], + 'class-constant-as-long-array-key-nested-in-match-2' => ['/* testClassConstantAsLongArrayKeyNestedInMatchLevelDown */'], + 'class-constant-as-short-array-key-nested-in-match' => ['/* testClassConstantAsShortArrayKeyNestedInMatch */'], + 'class-constant-as-short-array-key-nested-in-match-2' => ['/* testClassConstantAsShortArrayKeyNestedInMatchLevelDown */'], + 'class-constant-as-long-array-key-with-nested-match' => ['/* testClassConstantAsLongArrayKeyWithNestedMatch */'], + 'class-constant-as-short-array-key-with-nested-match' => ['/* testClassConstantAsShortArrayKeyWithNestedMatch */'], + + 'class-constant-in-switch-case' => ['/* testClassConstantInSwitchCase */'], + 'class-property-in-switch-case' => ['/* testClassPropertyInSwitchCase */'], + 'namespaced-constant-in-switch-case' => ['/* testNamespacedConstantInSwitchCase */'], + 'namespace-relative-constant-in-switch-case' => ['/* testNamespaceRelativeConstantInSwitchCase */'], + + 'class-constant-declaration' => ['/* testClassConstant */'], + 'class-method-declaration' => [ + '/* testMethodDeclaration */', + 'default', + ], + ]; + + }//end dataNotDefaultKeyword() + + + /** + * Test a specific edge case where a scope opener would be incorrectly set. + * + * @link https://github.com/squizlabs/PHP_CodeSniffer/issues/3326 + * + * @return void + */ + public function testIssue3326() + { + $tokens = self::$phpcsFile->getTokens(); + + $token = $this->getTargetToken('/* testClassConstant */', [T_SEMICOLON]); + $tokenArray = $tokens[$token]; + + $this->assertArrayNotHasKey('scope_condition', $tokenArray, 'Scope condition is set'); + $this->assertArrayNotHasKey('scope_opener', $tokenArray, 'Scope opener is set'); + $this->assertArrayNotHasKey('scope_closer', $tokenArray, 'Scope closer is set'); + + }//end testIssue3326() + + +}//end class diff --git a/vendor/squizlabs/php_codesniffer/tests/Core/Tokenizer/DoubleArrowTest.inc b/vendor/squizlabs/php_codesniffer/tests/Core/Tokenizer/DoubleArrowTest.inc new file mode 100644 index 00000000..b67b0660 --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/tests/Core/Tokenizer/DoubleArrowTest.inc @@ -0,0 +1,281 @@ + 'Zero', + ); +} + +function simpleShortArray($x) { + return [ + /* testShortArrayArrowSimple */ + 0 => 'Zero', + ]; +} + +function simpleLongList($x) { + list( + /* testLongListArrowSimple */ + 0 => $a, + ) = $x; +} + +function simpleShortList($x) { + [ + /* testShortListArrowSimple */ + 0 => $a, + ] = $x; +} + +function simpleYield($x) { + $i = 0; + foreach (explode("\n", $x) as $line) { + /* testYieldArrowSimple */ + yield ++$i => $line; + } +} + +function simpleForeach($x) { + /* testForeachArrowSimple */ + foreach ($x as $k => $value) {} +} + +function simpleMatch($x) { + return match ($x) { + /* testMatchArrowSimpleSingleCase */ + 0 => 'Zero', + /* testMatchArrowSimpleMultiCase */ + 2, 4, 6 => 'Zero', + /* testMatchArrowSimpleSingleCaseWithTrailingComma */ + 1, => 'Zero', + /* testMatchArrowSimpleMultiCaseWithTrailingComma */ + 3, 5, => 'Zero', + }; +} + +function simpleArrowFunction($y) { + /* testFnArrowSimple */ + return fn ($y) => callMe($y); +} + +function matchNestedInMatch() { + $x = match ($y) { + /* testMatchArrowNestedMatchOuter */ + default, => match ($z) { + /* testMatchArrowNestedMatchInner */ + 1 => 1 + }, + }; +} + +function matchNestedInLongArrayValue() { + $array = array( + /* testLongArrayArrowWithNestedMatchValue1 */ + 'a' => match ($test) { + /* testMatchArrowInLongArrayValue1 */ + 1 => 'a', + /* testMatchArrowInLongArrayValue2 */ + 2 => 'b' + }, + /* testLongArrayArrowWithNestedMatchValue2 */ + $i => match ($test) { + /* testMatchArrowInLongArrayValue3 */ + 1 => 'a', + }, + ); +} + +function matchNestedInShortArrayValue() { + $array = [ + /* testShortArrayArrowWithNestedMatchValue1 */ + 'a' => match ($test) { + /* testMatchArrowInShortArrayValue1 */ + 1 => 'a', + /* testMatchArrowInShortArrayValue2 */ + 2 => 'b' + }, + /* testShortArrayArrowWithNestedMatchValue2 */ + $i => match ($test) { + /* testMatchArrowInShortArrayValue3 */ + 1 => 'a', + }, + ]; +} + +function matchNestedInLongArrayKey() { + $array = array( + match ($test) { /* testMatchArrowInLongArrayKey1 */ 1 => 'a', /* testMatchArrowInLongArrayKey2 */ 2 => 'b' } + /* testLongArrayArrowWithMatchKey */ + => 'dynamic keys, woho!', + ); +} + +function matchNestedInShortArrayKey() { + $array = [ + match ($test) { /* testMatchArrowInShortArrayKey1 */ 1 => 'a', /* testMatchArrowInShortArrayKey2 */ 2 => 'b' } + /* testShortArrayArrowWithMatchKey */ + => 'dynamic keys, woho!', + ]; +} + +function arraysNestedInMatch() { + $matcher = match ($x) { + /* testMatchArrowWithLongArrayBodyWithKeys */ + 0 => array( + /* testLongArrayArrowInMatchBody1 */ + 0 => 1, + /* testLongArrayArrowInMatchBody2 */ + 'a' => 2, + /* testLongArrayArrowInMatchBody3 */ + 'b' => 3 + ), + /* testMatchArrowWithShortArrayBodyWithoutKeys */ + 1 => [1, 2, 3], + /* testMatchArrowWithLongArrayBodyWithoutKeys */ + 2 => array( 1, [1, 2, 3], 2, 3), + /* testMatchArrowWithShortArrayBodyWithKeys */ + 3 => [ + /* testShortArrayArrowInMatchBody1 */ + 0 => 1, + /* testShortArrayArrowInMatchBody2 */ + 'a' => array(1, 2, 3), + /* testShortArrayArrowInMatchBody3 */ + 'b' => 2, + 3 + ], + /* testShortArrayArrowinMatchCase1 */ + [4 => 'a', /* testShortArrayArrowinMatchCase2 */ 5 => 6] + /* testMatchArrowWithShortArrayWithKeysAsCase */ + => 'match with array as case value', + /* testShortArrayArrowinMatchCase3 */ + [4 => 'a'], /* testLongArrayArrowinMatchCase4 */ array(5 => 6), + /* testMatchArrowWithMultipleArraysWithKeysAsCase */ + => 'match with multiple arrays as case value', + }; +} + +function matchNestedInArrowFunction($x) { + /* testFnArrowWithMatchInValue */ + $fn = fn($x) => match(true) { + /* testMatchArrowInFnBody1 */ + 1, 2, 3, 4, 5 => 'foo', + /* testMatchArrowInFnBody2 */ + default => 'bar', + }; +} + +function arrowFunctionsNestedInMatch($x) { + return match ($x) { + /* testMatchArrowWithFnBody1 */ + 1 => /* testFnArrowInMatchBody1 */ fn($y) => callMe($y), + /* testMatchArrowWithFnBody2 */ + default => /* testFnArrowInMatchBody2 */ fn($y) => callThem($y) + }; +} + +function matchShortArrayMismash() { + $array = [ + match ($test) { + /* testMatchArrowInComplexShortArrayKey1 */ + 1 => [ /* testShortArrayArrowInComplexMatchValueinShortArrayKey */ 1 => 'a'], + /* testMatchArrowInComplexShortArrayKey2 */ + 2 => 'b' + /* testShortArrayArrowInComplexMatchArrayMismash */ + } => match ($test) { + /* testMatchArrowInComplexShortArrayValue1 */ + 1 => [ /* testShortArrayArrowInComplexMatchValueinShortArrayValue */ 1 => 'a'], + /* testMatchArrowInComplexShortArrayValue2 */ + 2 => /* testFnArrowInComplexMatchValueInShortArrayValue */ fn($y) => callMe($y) + }, + ]; +} + + +function longListInMatch($x, $y) { + return match($x) { + /* testMatchArrowWithLongListBody */ + 1 => list('a' => $a, /* testLongListArrowInMatchBody */ 'b' => $b, 'c' => list('d' => $c)) = $y, + /* testLongListArrowInMatchCase */ + list('a' => $a, 'b' => $b) = $y /* testMatchArrowWithLongListInCase */ => 'something' + }; +} + +function shortListInMatch($x, $y) { + return match($x) { + /* testMatchArrowWithShortListBody */ + 1 => ['a' => $a, 'b' => $b, 'c' => /* testShortListArrowInMatchBody */ ['d' => $c]] = $y, + /* testShortListArrowInMatchCase */ + ['a' => $a, 'b' => $b] = $y /* testMatchArrowWithShortListInCase */ => 'something' + }; +} + +function matchInLongList() { + /* testMatchArrowInLongListKey */ + list(match($x) {1 => 1, 2 => 2} /* testLongListArrowWithMatchInKey */ => $a) = $array; +} + +function matchInShortList() { + /* testMatchArrowInShortListKey */ + [match($x) {1 => 1, 2 => 2} /* testShortListArrowWithMatchInKey */ => $a] = $array; +} + +function longArrayWithConstantKey() { + $arr = array( + /* testLongArrayArrowWithClassConstantKey */ + SomeClass::DEFAULT => 1, + ); +} + +function shortArrayWithConstantKey() { + $arr = [ + /* testShortArrayArrowWithClassConstantKey */ + SomeClass::DEFAULT => 1, + ]; +} + +function yieldWithConstantKey() { + /* testYieldArrowWithClassConstantKey */ + yield SomeClass::DEFAULT => 1; +} + +function longArrayWithConstantKeyNestedInMatch() { + return match($x) { + /* testMatchArrowWithNestedLongArrayWithClassConstantKey */ + default => array( + /* testLongArrayArrowWithClassConstantKeyNestedInMatch */ + SomeClass::DEFAULT => 1, + ), + }; +} + +function shortArrayWithConstantKeyNestedInMatch() { + return match($x) { + /* testMatchArrowWithNestedShortArrayWithClassConstantKey */ + default => [ + /* testShortArrayArrowWithClassConstantKeyNestedInMatch */ + SomeClass::DEFAULT => 1, + ], + }; +} + + +function longArrayWithConstantKeyWithNestedMatch() { + return array( + /* testLongArrayArrowWithClassConstantKeyWithNestedMatch */ + SomeClass::DEFAULT => match($x) { + /* testMatchArrowNestedInLongArrayWithClassConstantKey */ + default => 'foo' + }, + ); +} + +function shortArrayWithConstantKeyWithNestedMatch() { + return [ + /* testShortArrayArrowWithClassConstantKeyWithNestedMatch */ + SomeClass::DEFAULT => match($x) { + /* testMatchArrowNestedInShortArrayWithClassConstantKey */ + default => 'foo' + }, + ]; +} diff --git a/vendor/squizlabs/php_codesniffer/tests/Core/Tokenizer/DoubleArrowTest.php b/vendor/squizlabs/php_codesniffer/tests/Core/Tokenizer/DoubleArrowTest.php new file mode 100644 index 00000000..ad1a411f --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/tests/Core/Tokenizer/DoubleArrowTest.php @@ -0,0 +1,237 @@ + + * @copyright 2020-2021 Squiz Pty Ltd (ABN 77 084 670 600) + * @license https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence + */ + +namespace PHP_CodeSniffer\Tests\Core\Tokenizer; + +use PHP_CodeSniffer\Tests\Core\AbstractMethodUnitTest; + +class DoubleArrowTest extends AbstractMethodUnitTest +{ + + + /** + * Test that "normal" double arrows are correctly tokenized as `T_DOUBLE_ARROW`. + * + * @param string $testMarker The comment prefacing the target token. + * + * @dataProvider dataDoubleArrow + * @coversNothing + * + * @return void + */ + public function testDoubleArrow($testMarker) + { + $tokens = self::$phpcsFile->getTokens(); + + $token = $this->getTargetToken($testMarker, [T_DOUBLE_ARROW, T_MATCH_ARROW, T_FN_ARROW]); + $tokenArray = $tokens[$token]; + + $this->assertSame(T_DOUBLE_ARROW, $tokenArray['code'], 'Token tokenized as '.$tokenArray['type'].', not T_DOUBLE_ARROW (code)'); + $this->assertSame('T_DOUBLE_ARROW', $tokenArray['type'], 'Token tokenized as '.$tokenArray['type'].', not T_DOUBLE_ARROW (type)'); + + }//end testDoubleArrow() + + + /** + * Data provider. + * + * @see testDoubleArrow() + * + * @return array + */ + public function dataDoubleArrow() + { + return [ + 'simple_long_array' => ['/* testLongArrayArrowSimple */'], + 'simple_short_array' => ['/* testShortArrayArrowSimple */'], + 'simple_long_list' => ['/* testLongListArrowSimple */'], + 'simple_short_list' => ['/* testShortListArrowSimple */'], + 'simple_yield' => ['/* testYieldArrowSimple */'], + 'simple_foreach' => ['/* testForeachArrowSimple */'], + + 'long_array_with_match_value_1' => ['/* testLongArrayArrowWithNestedMatchValue1 */'], + 'long_array_with_match_value_2' => ['/* testLongArrayArrowWithNestedMatchValue2 */'], + 'short_array_with_match_value_1' => ['/* testShortArrayArrowWithNestedMatchValue1 */'], + 'short_array_with_match_value_2' => ['/* testShortArrayArrowWithNestedMatchValue2 */'], + + 'long_array_with_match_key' => ['/* testLongArrayArrowWithMatchKey */'], + 'short_array_with_match_key' => ['/* testShortArrayArrowWithMatchKey */'], + + 'long_array_in_match_body_1' => ['/* testLongArrayArrowInMatchBody1 */'], + 'long_array_in_match_body_2' => ['/* testLongArrayArrowInMatchBody2 */'], + 'long_array_in_match_body_3' => ['/* testLongArrayArrowInMatchBody3 */'], + 'short_array_in_match_body_1' => ['/* testShortArrayArrowInMatchBody1 */'], + 'short_array_in_match_body_2' => ['/* testShortArrayArrowInMatchBody2 */'], + 'short_array_in_match_body_3' => ['/* testShortArrayArrowInMatchBody3 */'], + + 'short_array_in_match_case_1' => ['/* testShortArrayArrowinMatchCase1 */'], + 'short_array_in_match_case_2' => ['/* testShortArrayArrowinMatchCase2 */'], + 'short_array_in_match_case_3' => ['/* testShortArrayArrowinMatchCase3 */'], + 'long_array_in_match_case_4' => ['/* testLongArrayArrowinMatchCase4 */'], + + 'in_complex_short_array_key_match_value' => ['/* testShortArrayArrowInComplexMatchValueinShortArrayKey */'], + 'in_complex_short_array_toplevel' => ['/* testShortArrayArrowInComplexMatchArrayMismash */'], + 'in_complex_short_array_value_match_value' => ['/* testShortArrayArrowInComplexMatchValueinShortArrayValue */'], + + 'long_list_in_match_body' => ['/* testLongListArrowInMatchBody */'], + 'long_list_in_match_case' => ['/* testLongListArrowInMatchCase */'], + 'short_list_in_match_body' => ['/* testShortListArrowInMatchBody */'], + 'short_list_in_match_case' => ['/* testShortListArrowInMatchCase */'], + 'long_list_with_match_in_key' => ['/* testLongListArrowWithMatchInKey */'], + 'short_list_with_match_in_key' => ['/* testShortListArrowWithMatchInKey */'], + + 'long_array_with_constant_default_in_key' => ['/* testLongArrayArrowWithClassConstantKey */'], + 'short_array_with_constant_default_in_key' => ['/* testShortArrayArrowWithClassConstantKey */'], + 'yield_with_constant_default_in_key' => ['/* testYieldArrowWithClassConstantKey */'], + + 'long_array_with_default_in_key_in_match' => ['/* testLongArrayArrowWithClassConstantKeyNestedInMatch */'], + 'short_array_with_default_in_key_in_match' => ['/* testShortArrayArrowWithClassConstantKeyNestedInMatch */'], + 'long_array_with_default_in_key_with_match' => ['/* testLongArrayArrowWithClassConstantKeyWithNestedMatch */'], + 'short_array_with_default_in_key_with_match' => ['/* testShortArrayArrowWithClassConstantKeyWithNestedMatch */'], + ]; + + }//end dataDoubleArrow() + + + /** + * Test that double arrows in match expressions which are the demarkation between a case and the return value + * are correctly tokenized as `T_MATCH_ARROW`. + * + * @param string $testMarker The comment prefacing the target token. + * + * @dataProvider dataMatchArrow + * @covers PHP_CodeSniffer\Tokenizers\PHP::processAdditional + * + * @return void + */ + public function testMatchArrow($testMarker) + { + $tokens = self::$phpcsFile->getTokens(); + + $token = $this->getTargetToken($testMarker, [T_DOUBLE_ARROW, T_MATCH_ARROW, T_FN_ARROW]); + $tokenArray = $tokens[$token]; + + $this->assertSame(T_MATCH_ARROW, $tokenArray['code'], 'Token tokenized as '.$tokenArray['type'].', not T_MATCH_ARROW (code)'); + $this->assertSame('T_MATCH_ARROW', $tokenArray['type'], 'Token tokenized as '.$tokenArray['type'].', not T_MATCH_ARROW (type)'); + + }//end testMatchArrow() + + + /** + * Data provider. + * + * @see testMatchArrow() + * + * @return array + */ + public function dataMatchArrow() + { + return [ + 'single_case' => ['/* testMatchArrowSimpleSingleCase */'], + 'multi_case' => ['/* testMatchArrowSimpleMultiCase */'], + 'single_case_with_trailing_comma' => ['/* testMatchArrowSimpleSingleCaseWithTrailingComma */'], + 'multi_case_with_trailing_comma' => ['/* testMatchArrowSimpleMultiCaseWithTrailingComma */'], + 'match_nested_outer' => ['/* testMatchArrowNestedMatchOuter */'], + 'match_nested_inner' => ['/* testMatchArrowNestedMatchInner */'], + + 'in_long_array_value_1' => ['/* testMatchArrowInLongArrayValue1 */'], + 'in_long_array_value_2' => ['/* testMatchArrowInLongArrayValue2 */'], + 'in_long_array_value_3' => ['/* testMatchArrowInLongArrayValue3 */'], + 'in_short_array_value_1' => ['/* testMatchArrowInShortArrayValue1 */'], + 'in_short_array_value_2' => ['/* testMatchArrowInShortArrayValue2 */'], + 'in_short_array_value_3' => ['/* testMatchArrowInShortArrayValue3 */'], + + 'in_long_array_key_1' => ['/* testMatchArrowInLongArrayKey1 */'], + 'in_long_array_key_2' => ['/* testMatchArrowInLongArrayKey2 */'], + 'in_short_array_key_1' => ['/* testMatchArrowInShortArrayKey1 */'], + 'in_short_array_key_2' => ['/* testMatchArrowInShortArrayKey2 */'], + + 'with_long_array_value_with_keys' => ['/* testMatchArrowWithLongArrayBodyWithKeys */'], + 'with_short_array_value_without_keys' => ['/* testMatchArrowWithShortArrayBodyWithoutKeys */'], + 'with_long_array_value_without_keys' => ['/* testMatchArrowWithLongArrayBodyWithoutKeys */'], + 'with_short_array_value_with_keys' => ['/* testMatchArrowWithShortArrayBodyWithKeys */'], + + 'with_short_array_with_keys_as_case' => ['/* testMatchArrowWithShortArrayWithKeysAsCase */'], + 'with_multiple_arrays_with_keys_as_case' => ['/* testMatchArrowWithMultipleArraysWithKeysAsCase */'], + + 'in_fn_body_case' => ['/* testMatchArrowInFnBody1 */'], + 'in_fn_body_default' => ['/* testMatchArrowInFnBody2 */'], + 'with_fn_body_case' => ['/* testMatchArrowWithFnBody1 */'], + 'with_fn_body_default' => ['/* testMatchArrowWithFnBody2 */'], + + 'in_complex_short_array_key_1' => ['/* testMatchArrowInComplexShortArrayKey1 */'], + 'in_complex_short_array_key_2' => ['/* testMatchArrowInComplexShortArrayKey2 */'], + 'in_complex_short_array_value_1' => ['/* testMatchArrowInComplexShortArrayValue1 */'], + 'in_complex_short_array_value_2' => ['/* testMatchArrowInComplexShortArrayValue2 */'], + + 'with_long_list_in_body' => ['/* testMatchArrowWithLongListBody */'], + 'with_long_list_in_case' => ['/* testMatchArrowWithLongListInCase */'], + 'with_short_list_in_body' => ['/* testMatchArrowWithShortListBody */'], + 'with_short_list_in_case' => ['/* testMatchArrowWithShortListInCase */'], + 'in_long_list_key' => ['/* testMatchArrowInLongListKey */'], + 'in_short_list_key' => ['/* testMatchArrowInShortListKey */'], + + 'with_long_array_value_with_default_key' => ['/* testMatchArrowWithNestedLongArrayWithClassConstantKey */'], + 'with_short_array_value_with_default_key' => ['/* testMatchArrowWithNestedShortArrayWithClassConstantKey */'], + 'in_long_array_value_with_default_key' => ['/* testMatchArrowNestedInLongArrayWithClassConstantKey */'], + 'in_short_array_value_with_default_key' => ['/* testMatchArrowNestedInShortArrayWithClassConstantKey */'], + ]; + + }//end dataMatchArrow() + + + /** + * Test that double arrows used as the scope opener for an arrow function + * are correctly tokenized as `T_FN_ARROW`. + * + * @param string $testMarker The comment prefacing the target token. + * + * @dataProvider dataFnArrow + * @covers PHP_CodeSniffer\Tokenizers\PHP::processAdditional + * + * @return void + */ + public function testFnArrow($testMarker) + { + $tokens = self::$phpcsFile->getTokens(); + + $token = $this->getTargetToken($testMarker, [T_DOUBLE_ARROW, T_MATCH_ARROW, T_FN_ARROW]); + $tokenArray = $tokens[$token]; + + $this->assertSame(T_FN_ARROW, $tokenArray['code'], 'Token tokenized as '.$tokenArray['type'].', not T_FN_ARROW (code)'); + $this->assertSame('T_FN_ARROW', $tokenArray['type'], 'Token tokenized as '.$tokenArray['type'].', not T_FN_ARROW (type)'); + + }//end testFnArrow() + + + /** + * Data provider. + * + * @see testFnArrow() + * + * @return array + */ + public function dataFnArrow() + { + return [ + 'simple_fn' => ['/* testFnArrowSimple */'], + + 'with_match_as_value' => ['/* testFnArrowWithMatchInValue */'], + 'in_match_value_case' => ['/* testFnArrowInMatchBody1 */'], + 'in_match_value_default' => ['/* testFnArrowInMatchBody2 */'], + + 'in_complex_match_value_in_short_array' => ['/* testFnArrowInComplexMatchValueInShortArrayValue */'], + ]; + + }//end dataFnArrow() + + +}//end class diff --git a/vendor/squizlabs/php_codesniffer/tests/Core/Tokenizer/FinallyTest.inc b/vendor/squizlabs/php_codesniffer/tests/Core/Tokenizer/FinallyTest.inc new file mode 100644 index 00000000..e65600b6 --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/tests/Core/Tokenizer/FinallyTest.inc @@ -0,0 +1,40 @@ +finally = 'foo'; + } +} diff --git a/vendor/squizlabs/php_codesniffer/tests/Core/Tokenizer/FinallyTest.php b/vendor/squizlabs/php_codesniffer/tests/Core/Tokenizer/FinallyTest.php new file mode 100644 index 00000000..2b28bc5d --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/tests/Core/Tokenizer/FinallyTest.php @@ -0,0 +1,96 @@ + + * @copyright 2021 Squiz Pty Ltd (ABN 77 084 670 600) + * @license https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence + */ + +namespace PHP_CodeSniffer\Tests\Core\Tokenizer; + +use PHP_CodeSniffer\Tests\Core\AbstractMethodUnitTest; + +class FinallyTest extends AbstractMethodUnitTest +{ + + + /** + * Test that the finally keyword is tokenized as such. + * + * @param string $testMarker The comment which prefaces the target token in the test file. + * + * @dataProvider dataFinallyKeyword + * @covers PHP_CodeSniffer\Tokenizers\PHP::tokenize + * + * @return void + */ + public function testFinallyKeyword($testMarker) + { + $tokens = self::$phpcsFile->getTokens(); + + $target = $this->getTargetToken($testMarker, [T_FINALLY, T_STRING]); + $this->assertSame(T_FINALLY, $tokens[$target]['code']); + $this->assertSame('T_FINALLY', $tokens[$target]['type']); + + }//end testFinallyKeyword() + + + /** + * Data provider. + * + * @see testFinallyKeyword() + * + * @return array + */ + public function dataFinallyKeyword() + { + return [ + ['/* testTryCatchFinally */'], + ['/* testTryFinallyCatch */'], + ['/* testTryFinally */'], + ]; + + }//end dataFinallyKeyword() + + + /** + * Test that 'finally' when not used as the reserved keyword is tokenized as `T_STRING`. + * + * @param string $testMarker The comment which prefaces the target token in the test file. + * + * @dataProvider dataFinallyNonKeyword + * @covers PHP_CodeSniffer\Tokenizers\PHP::tokenize + * + * @return void + */ + public function testFinallyNonKeyword($testMarker) + { + $tokens = self::$phpcsFile->getTokens(); + + $target = $this->getTargetToken($testMarker, [T_FINALLY, T_STRING]); + $this->assertSame(T_STRING, $tokens[$target]['code']); + $this->assertSame('T_STRING', $tokens[$target]['type']); + + }//end testFinallyNonKeyword() + + + /** + * Data provider. + * + * @see testFinallyNonKeyword() + * + * @return array + */ + public function dataFinallyNonKeyword() + { + return [ + ['/* testFinallyUsedAsClassConstantName */'], + ['/* testFinallyUsedAsMethodName */'], + ['/* testFinallyUsedAsPropertyName */'], + ]; + + }//end dataFinallyNonKeyword() + + +}//end class diff --git a/vendor/squizlabs/php_codesniffer/tests/Core/Tokenizer/GotoLabelTest.inc b/vendor/squizlabs/php_codesniffer/tests/Core/Tokenizer/GotoLabelTest.inc new file mode 100644 index 00000000..f6920f54 --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/tests/Core/Tokenizer/GotoLabelTest.inc @@ -0,0 +1,53 @@ + +
    + +property: + // Do something. + break; +} + +switch (true) { + /* testNotGotoDeclarationGlobalConstantInTernary */ + case $x === ($cond) ? CONST_A : CONST_B: + // Do something. + break; +} diff --git a/vendor/squizlabs/php_codesniffer/tests/Core/Tokenizer/GotoLabelTest.php b/vendor/squizlabs/php_codesniffer/tests/Core/Tokenizer/GotoLabelTest.php new file mode 100644 index 00000000..fa6f8cfb --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/tests/Core/Tokenizer/GotoLabelTest.php @@ -0,0 +1,171 @@ + + * @copyright 2020 Squiz Pty Ltd (ABN 77 084 670 600) + * @license https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence + */ + +namespace PHP_CodeSniffer\Tests\Core\Tokenizer; + +use PHP_CodeSniffer\Tests\Core\AbstractMethodUnitTest; + +class GotoLabelTest extends AbstractMethodUnitTest +{ + + + /** + * Verify that the label in a goto statement is tokenized as T_STRING. + * + * @param string $testMarker The comment prefacing the target token. + * @param string $testContent The token content to expect. + * + * @dataProvider dataGotoStatement + * @covers PHP_CodeSniffer\Tokenizers\PHP::tokenize + * + * @return void + */ + public function testGotoStatement($testMarker, $testContent) + { + $tokens = self::$phpcsFile->getTokens(); + + $label = $this->getTargetToken($testMarker, T_STRING); + + $this->assertInternalType('int', $label); + $this->assertSame($testContent, $tokens[$label]['content']); + + }//end testGotoStatement() + + + /** + * Data provider. + * + * @see testGotoStatement() + * + * @return array + */ + public function dataGotoStatement() + { + return [ + [ + '/* testGotoStatement */', + 'marker', + ], + [ + '/* testGotoStatementInLoop */', + 'end', + ], + ]; + + }//end dataGotoStatement() + + + /** + * Verify that the label in a goto declaration is tokenized as T_GOTO_LABEL. + * + * @param string $testMarker The comment prefacing the target token. + * @param string $testContent The token content to expect. + * + * @dataProvider dataGotoDeclaration + * @covers PHP_CodeSniffer\Tokenizers\PHP::tokenize + * + * @return void + */ + public function testGotoDeclaration($testMarker, $testContent) + { + $tokens = self::$phpcsFile->getTokens(); + + $label = $this->getTargetToken($testMarker, T_GOTO_LABEL); + + $this->assertInternalType('int', $label); + $this->assertSame($testContent, $tokens[$label]['content']); + + }//end testGotoDeclaration() + + + /** + * Data provider. + * + * @see testGotoDeclaration() + * + * @return array + */ + public function dataGotoDeclaration() + { + return [ + [ + '/* testGotoDeclaration */', + 'marker:', + ], + [ + '/* testGotoDeclarationOutsideLoop */', + 'end:', + ], + ]; + + }//end dataGotoDeclaration() + + + /** + * Verify that the constant used in a switch - case statement is not confused with a goto label. + * + * @param string $testMarker The comment prefacing the target token. + * @param string $testContent The token content to expect. + * + * @dataProvider dataNotAGotoDeclaration + * @covers PHP_CodeSniffer\Tokenizers\PHP::tokenize + * + * @return void + */ + public function testNotAGotoDeclaration($testMarker, $testContent) + { + $tokens = self::$phpcsFile->getTokens(); + $target = $this->getTargetToken($testMarker, [T_GOTO_LABEL, T_STRING], $testContent); + + $this->assertSame(T_STRING, $tokens[$target]['code']); + $this->assertSame('T_STRING', $tokens[$target]['type']); + + }//end testNotAGotoDeclaration() + + + /** + * Data provider. + * + * @see testNotAGotoDeclaration() + * + * @return array + */ + public function dataNotAGotoDeclaration() + { + return [ + [ + '/* testNotGotoDeclarationGlobalConstant */', + 'CONSTANT', + ], + [ + '/* testNotGotoDeclarationNamespacedConstant */', + 'CONSTANT', + ], + [ + '/* testNotGotoDeclarationClassConstant */', + 'CONSTANT', + ], + [ + '/* testNotGotoDeclarationClassProperty */', + 'property', + ], + [ + '/* testNotGotoDeclarationGlobalConstantInTernary */', + 'CONST_A', + ], + [ + '/* testNotGotoDeclarationGlobalConstantInTernary */', + 'CONST_B', + ], + ]; + + }//end dataNotAGotoDeclaration() + + +}//end class diff --git a/vendor/squizlabs/php_codesniffer/tests/Core/Tokenizer/NamedFunctionCallArgumentsTest.inc b/vendor/squizlabs/php_codesniffer/tests/Core/Tokenizer/NamedFunctionCallArgumentsTest.inc new file mode 100644 index 00000000..d05d27d9 --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/tests/Core/Tokenizer/NamedFunctionCallArgumentsTest.inc @@ -0,0 +1,398 @@ +getPos(skip: false), + count: count(array_or_countable: $array), + value: 50 +); + +array_fill( + start_index: /* testNestedFunctionCallInner1 */ $obj->getPos(skip: false), + count: /* testNestedFunctionCallInner2 */ count(array_or_countable: $array), + value: 50 +); + +/* testNamespaceOperatorFunction */ +namespace\function_name(label:$string, more: false); + +/* testNamespaceRelativeFunction */ +Partially\Qualified\function_name(label:$string, more: false); + +/* testNamespacedFQNFunction */ +\Fully\Qualified\function_name(label: $string, more:false); + +/* testVariableFunction */ +$fn(label: $string, more:false); + +/* testVariableVariableFunction */ +${$fn}(label: $string, more:false); + +/* testMethodCall */ +$obj->methodName(label: $foo, more: $bar); + +/* testVariableMethodCall */ +$obj->{$var}(label: $foo, more: $bar); + +/* testClassInstantiation */ +$obj = new MyClass(label: $string, more:false); + +/* testClassInstantiationSelf */ +$obj = new self(label: $string, more:true); + +/* testClassInstantiationStatic */ +$obj = new static(label: $string, more:false); + +/* testAnonClass */ +$anon = new class(label: $string, more: false) { + public function __construct($label, $more) {} +}; + +function myfoo( $💩💩💩, $Пасха, $_valid) {} +/* testNonAsciiNames */ +foo(💩💩💩: [], Пасха: 'text', _valid: 123); + +/* testMixedPositionalAndNamedArgsWithTernary */ +foo( $cond ? true : false, name: $value2 ); + +/* testNamedArgWithTernary */ +foo( label: $cond ? true : false, more: $cond ? CONSTANT_A : CONSTANT_B ); + +/* testTernaryWithFunctionCallsInThenElse */ +echo $cond ? foo( label: $something ) : foo( more: $something_else ); + +/* testTernaryWithConstantsInThenElse */ +echo $cond ? CONSTANT_NAME : OTHER_CONSTANT; + +switch ($s) { + /* testSwitchCaseWithConstant */ + case MY_CONSTANT: + // Do something. + break; + + /* testSwitchCaseWithClassProperty */ + case $obj->property: + // Do something. + break; + + /* testSwitchDefault */ + default: + // Do something. + break; +} + +/* testTernaryWithClosuresAndReturnTypes */ +$closure = $cond ? function() : bool {return true;} : function() : int {return 123;}; + +/* testTernaryWithArrowFunctionsAndReturnTypes */ +$fn = $cond ? fn() : bool => true : fn() : int => 123; + + +/* testCompileErrorNamedBeforePositional */ +// Not the concern of PHPCS. Should still be handled. +test(param: $bar, $foo); + +/* testDuplicateName1 */ +// Error Exception, but not the concern of PHPCS. Should still be handled. +test(param: 1, /* testDuplicateName2 */ param: 2); + +/* testIncorrectOrderWithVariadic */ +// Error Exception, but not the concern of PHPCS. Should still be handled. +array_fill(start_index: 0, ...[100, 50]); + +/* testCompileErrorIncorrectOrderWithVariadic */ +// Not the concern of PHPCS. Should still be handled. +test(...$values, param: $value); // Compile-time error + +/* testParseErrorNoValue */ +// Not the concern of PHPCS. Should still be handled. +test(param1:, param2:); + +/* testParseErrorDynamicName */ +// Parse error. Ignore. +function_name($variableStoringParamName: $value); + +/* testParseErrorExit */ +// Exit is a language construct, not a function. Named params not supported, handle it anyway. +exit(status: $value); + +/* testParseErrorEmpty */ +// Empty is a language construct, not a function. Named params not supported, handle it anyway. +empty(variable: $value); + +/* testParseErrorEval */ +// Eval is a language construct, not a function. Named params not supported, handle it anyway. +eval(code: $value); + +/* testParseErrorArbitraryParentheses */ +// Parse error. Not named param, handle it anyway. +$calc = (something: $value / $other); + + +/* testReservedKeywordAbstract1 */ +foobar(abstract: $value, /* testReservedKeywordAbstract2 */ abstract: $value); + +/* testReservedKeywordAnd1 */ +foobar(and: $value, /* testReservedKeywordAnd2 */ and: $value); + +/* testReservedKeywordArray1 */ +foobar(array: $value, /* testReservedKeywordArray2 */ array: $value); + +/* testReservedKeywordAs1 */ +foobar(as: $value, /* testReservedKeywordAs2 */ as: $value); + +/* testReservedKeywordBreak1 */ +foobar(break: $value, /* testReservedKeywordBreak2 */ break: $value); + +/* testReservedKeywordCallable1 */ +foobar(callable: $value, /* testReservedKeywordCallable2 */ callable: $value); + +/* testReservedKeywordCase1 */ +foobar(case: $value, /* testReservedKeywordCase2 */ case: $value); + +/* testReservedKeywordCatch1 */ +foobar(catch: $value, /* testReservedKeywordCatch2 */ catch: $value); + +/* testReservedKeywordClass1 */ +foobar(class: $value, /* testReservedKeywordClass2 */ class: $value); + +/* testReservedKeywordClone1 */ +foobar(clone: $value, /* testReservedKeywordClone2 */ clone: $value); + +/* testReservedKeywordConst1 */ +foobar(const: $value, /* testReservedKeywordConst2 */ const: $value); + +/* testReservedKeywordContinue1 */ +foobar(continue: $value, /* testReservedKeywordContinue2 */ continue: $value); + +/* testReservedKeywordDeclare1 */ +foobar(declare: $value, /* testReservedKeywordDeclare2 */ declare: $value); + +/* testReservedKeywordDefault1 */ +foobar(default: $value, /* testReservedKeywordDefault2 */ default: $value); + +/* testReservedKeywordDie1 */ +foobar(die: $value, /* testReservedKeywordDie2 */ die: $value); + +/* testReservedKeywordDo1 */ +foobar(do: $value, /* testReservedKeywordDo2 */ do: $value); + +/* testReservedKeywordEcho1 */ +foobar(echo: $value, /* testReservedKeywordEcho2 */ echo: $value); + +/* testReservedKeywordElse1 */ +foobar(else: $value, /* testReservedKeywordElse2 */ else: $value); + +/* testReservedKeywordElseif1 */ +foobar(elseif: $value, /* testReservedKeywordElseif2 */ elseif: $value); + +/* testReservedKeywordEmpty1 */ +foobar(empty: $value, /* testReservedKeywordEmpty2 */ empty: $value); + +/* testReservedKeywordEnddeclare1 */ +foobar(enddeclare: $value, /* testReservedKeywordEnddeclare2 */ enddeclare: $value); + +/* testReservedKeywordEndfor1 */ +foobar(endfor: $value, /* testReservedKeywordEndfor2 */ endfor: $value); + +/* testReservedKeywordEndforeach1 */ +foobar(endforeach: $value, /* testReservedKeywordEndforeach2 */ endforeach: $value); + +/* testReservedKeywordEndif1 */ +foobar(endif: $value, /* testReservedKeywordEndif2 */ endif: $value); + +/* testReservedKeywordEndswitch1 */ +foobar(endswitch: $value, /* testReservedKeywordEndswitch2 */ endswitch: $value); + +/* testReservedKeywordEndwhile1 */ +foobar(endwhile: $value, /* testReservedKeywordEndwhile2 */ endwhile: $value); + +/* testReservedKeywordEval1 */ +foobar(eval: $value, /* testReservedKeywordEval2 */ eval: $value); + +/* testReservedKeywordExit1 */ +foobar(exit: $value, /* testReservedKeywordExit2 */ exit: $value); + +/* testReservedKeywordExtends1 */ +foobar(extends: $value, /* testReservedKeywordExtends2 */ extends: $value); + +/* testReservedKeywordFinal1 */ +foobar(final: $value, /* testReservedKeywordFinal2 */ final: $value); + +/* testReservedKeywordFinally1 */ +foobar(finally: $value, /* testReservedKeywordFinally2 */ finally: $value); + +/* testReservedKeywordFn1 */ +foobar(fn: $value, /* testReservedKeywordFn2 */ fn: $value); + +/* testReservedKeywordFor1 */ +foobar(for: $value, /* testReservedKeywordFor2 */ for: $value); + +/* testReservedKeywordForeach1 */ +foobar(foreach: $value, /* testReservedKeywordForeach2 */ foreach: $value); + +/* testReservedKeywordFunction1 */ +foobar(function: $value, /* testReservedKeywordFunction2 */ function: $value); + +/* testReservedKeywordGlobal1 */ +foobar(global: $value, /* testReservedKeywordGlobal2 */ global: $value); + +/* testReservedKeywordGoto1 */ +foobar(goto: $value, /* testReservedKeywordGoto2 */ goto: $value); + +/* testReservedKeywordIf1 */ +foobar(if: $value, /* testReservedKeywordIf2 */ if: $value); + +/* testReservedKeywordImplements1 */ +foobar(implements: $value, /* testReservedKeywordImplements2 */ implements: $value); + +/* testReservedKeywordInclude1 */ +foobar(include: $value, /* testReservedKeywordInclude2 */ include: $value); + +/* testReservedKeywordInclude_once1 */ +foobar(include_once: $value, /* testReservedKeywordInclude_once2 */ include_once: $value); + +/* testReservedKeywordInstanceof1 */ +foobar(instanceof: $value, /* testReservedKeywordInstanceof2 */ instanceof: $value); + +/* testReservedKeywordInsteadof1 */ +foobar(insteadof: $value, /* testReservedKeywordInsteadof2 */ insteadof: $value); + +/* testReservedKeywordInterface1 */ +foobar(interface: $value, /* testReservedKeywordInterface2 */ interface: $value); + +/* testReservedKeywordIsset1 */ +foobar(isset: $value, /* testReservedKeywordIsset2 */ isset: $value); + +/* testReservedKeywordList1 */ +foobar(list: $value, /* testReservedKeywordList2 */ list: $value); + +/* testReservedKeywordMatch1 */ +foobar(match: $value, /* testReservedKeywordMatch2 */ match: $value); + +/* testReservedKeywordNamespace1 */ +foobar(namespace: $value, /* testReservedKeywordNamespace2 */ namespace: $value); + +/* testReservedKeywordNew1 */ +foobar(new: $value, /* testReservedKeywordNew2 */ new: $value); + +/* testReservedKeywordOr1 */ +foobar(or: $value, /* testReservedKeywordOr2 */ or: $value); + +/* testReservedKeywordPrint1 */ +foobar(print: $value, /* testReservedKeywordPrint2 */ print: $value); + +/* testReservedKeywordPrivate1 */ +foobar(private: $value, /* testReservedKeywordPrivate2 */ private: $value); + +/* testReservedKeywordProtected1 */ +foobar(protected: $value, /* testReservedKeywordProtected2 */ protected: $value); + +/* testReservedKeywordPublic1 */ +foobar(public: $value, /* testReservedKeywordPublic2 */ public: $value); + +/* testReservedKeywordRequire1 */ +foobar(require: $value, /* testReservedKeywordRequire2 */ require: $value); + +/* testReservedKeywordRequire_once1 */ +foobar(require_once: $value, /* testReservedKeywordRequire_once2 */ require_once: $value); + +/* testReservedKeywordReturn1 */ +foobar(return: $value, /* testReservedKeywordReturn2 */ return: $value); + +/* testReservedKeywordStatic1 */ +foobar(static: $value, /* testReservedKeywordStatic2 */ static: $value); + +/* testReservedKeywordSwitch1 */ +foobar(switch: $value, /* testReservedKeywordSwitch2 */ switch: $value); + +/* testReservedKeywordThrow1 */ +foobar(throw: $value, /* testReservedKeywordThrow2 */ throw: $value); + +/* testReservedKeywordTrait1 */ +foobar(trait: $value, /* testReservedKeywordTrait2 */ trait: $value); + +/* testReservedKeywordTry1 */ +foobar(try: $value, /* testReservedKeywordTry2 */ try: $value); + +/* testReservedKeywordUnset1 */ +foobar(unset: $value, /* testReservedKeywordUnset2 */ unset: $value); + +/* testReservedKeywordUse1 */ +foobar(use: $value, /* testReservedKeywordUse2 */ use: $value); + +/* testReservedKeywordVar1 */ +foobar(var: $value, /* testReservedKeywordVar2 */ var: $value); + +/* testReservedKeywordWhile1 */ +foobar(while: $value, /* testReservedKeywordWhile2 */ while: $value); + +/* testReservedKeywordXor1 */ +foobar(xor: $value, /* testReservedKeywordXor2 */ xor: $value); + +/* testReservedKeywordYield1 */ +foobar(yield: $value, /* testReservedKeywordYield2 */ yield: $value); + +/* testReservedKeywordInt1 */ +foobar(int: $value, /* testReservedKeywordInt2 */ int: $value); + +/* testReservedKeywordFloat1 */ +foobar(float: $value, /* testReservedKeywordFloat2 */ float: $value); + +/* testReservedKeywordBool1 */ +foobar(bool: $value, /* testReservedKeywordBool2 */ bool: $value); + +/* testReservedKeywordString1 */ +foobar(string: $value, /* testReservedKeywordString2 */ string: $value); + +/* testReservedKeywordTrue1 */ +foobar(true: $value, /* testReservedKeywordTrue2 */ true: $value); + +/* testReservedKeywordFalse1 */ +foobar(false: $value, /* testReservedKeywordFalse2 */ false: $value); + +/* testReservedKeywordNull1 */ +foobar(null: $value, /* testReservedKeywordNull2 */ null: $value); + +/* testReservedKeywordVoid1 */ +foobar(void: $value, /* testReservedKeywordVoid2 */ void: $value); + +/* testReservedKeywordIterable1 */ +foobar(iterable: $value, /* testReservedKeywordIterable2 */ iterable: $value); + +/* testReservedKeywordObject1 */ +foobar(object: $value, /* testReservedKeywordObject2 */ object: $value); + +/* testReservedKeywordResource1 */ +foobar(resource: $value, /* testReservedKeywordResource2 */ resource: $value); + +/* testReservedKeywordMixed1 */ +foobar(mixed: $value, /* testReservedKeywordMixed2 */ mixed: $value); + +/* testReservedKeywordNumeric1 */ +foobar(numeric: $value, /* testReservedKeywordNumeric2 */ numeric: $value); + +/* testReservedKeywordParent1 */ +foobar(parent: $value, /* testReservedKeywordParent2 */ parent: $value); + +/* testReservedKeywordSelf1 */ +foobar(self: $value, /* testReservedKeywordSelf2 */ self: $value); diff --git a/vendor/squizlabs/php_codesniffer/tests/Core/Tokenizer/NamedFunctionCallArgumentsTest.php b/vendor/squizlabs/php_codesniffer/tests/Core/Tokenizer/NamedFunctionCallArgumentsTest.php new file mode 100644 index 00000000..52845ac7 --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/tests/Core/Tokenizer/NamedFunctionCallArgumentsTest.php @@ -0,0 +1,882 @@ + + * @copyright 2020 Squiz Pty Ltd (ABN 77 084 670 600) + * @license https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence + */ + +namespace PHP_CodeSniffer\Tests\Core\Tokenizer; + +use PHP_CodeSniffer\Tests\Core\AbstractMethodUnitTest; +use PHP_CodeSniffer\Util\Tokens; + +class NamedFunctionCallArgumentsTest extends AbstractMethodUnitTest +{ + + + /** + * Verify that parameter labels are tokenized as T_PARAM_NAME and that + * the colon after it is tokenized as a T_COLON. + * + * @param string $testMarker The comment prefacing the target token. + * @param array $parameters The token content for each parameter label to look for. + * + * @dataProvider dataNamedFunctionCallArguments + * @covers PHP_CodeSniffer\Tokenizers\PHP::tokenize + * + * @return void + */ + public function testNamedFunctionCallArguments($testMarker, $parameters) + { + $tokens = self::$phpcsFile->getTokens(); + + foreach ($parameters as $content) { + $label = $this->getTargetToken($testMarker, [T_STRING, T_PARAM_NAME], $content); + + $this->assertSame( + T_PARAM_NAME, + $tokens[$label]['code'], + 'Token tokenized as '.$tokens[$label]['type'].', not T_PARAM_NAME (code)' + ); + $this->assertSame( + 'T_PARAM_NAME', + $tokens[$label]['type'], + 'Token tokenized as '.$tokens[$label]['type'].', not T_PARAM_NAME (type)' + ); + + // Get the next non-empty token. + $colon = self::$phpcsFile->findNext(Tokens::$emptyTokens, ($label + 1), null, true); + + $this->assertSame( + ':', + $tokens[$colon]['content'], + 'Next token after parameter name is not a colon. Found: '.$tokens[$colon]['content'] + ); + $this->assertSame( + T_COLON, + $tokens[$colon]['code'], + 'Token tokenized as '.$tokens[$colon]['type'].', not T_COLON (code)' + ); + $this->assertSame( + 'T_COLON', + $tokens[$colon]['type'], + 'Token tokenized as '.$tokens[$colon]['type'].', not T_COLON (type)' + ); + }//end foreach + + }//end testNamedFunctionCallArguments() + + + /** + * Data provider. + * + * @see testNamedFunctionCallArguments() + * + * @return array + */ + public function dataNamedFunctionCallArguments() + { + return [ + [ + '/* testNamedArgs */', + [ + 'start_index', + 'count', + 'value', + ], + ], + [ + '/* testNamedArgsMultiline */', + [ + 'start_index', + 'count', + 'value', + ], + ], + [ + '/* testNamedArgsWithWhitespaceAndComments */', + [ + 'start_index', + 'count', + 'value', + ], + ], + [ + '/* testMixedPositionalAndNamedArgs */', + ['double_encode'], + ], + [ + '/* testNestedFunctionCallOuter */', + [ + 'start_index', + 'count', + 'value', + ], + ], + [ + '/* testNestedFunctionCallInner1 */', + ['skip'], + ], + [ + '/* testNestedFunctionCallInner2 */', + ['array_or_countable'], + ], + [ + '/* testNamespaceOperatorFunction */', + [ + 'label', + 'more', + ], + ], + [ + '/* testNamespaceRelativeFunction */', + [ + 'label', + 'more', + ], + ], + [ + '/* testNamespacedFQNFunction */', + [ + 'label', + 'more', + ], + ], + [ + '/* testVariableFunction */', + [ + 'label', + 'more', + ], + ], + [ + '/* testVariableVariableFunction */', + [ + 'label', + 'more', + ], + ], + [ + '/* testMethodCall */', + [ + 'label', + 'more', + ], + ], + [ + '/* testVariableMethodCall */', + [ + 'label', + 'more', + ], + ], + [ + '/* testClassInstantiation */', + [ + 'label', + 'more', + ], + ], + [ + '/* testClassInstantiationSelf */', + [ + 'label', + 'more', + ], + ], + [ + '/* testClassInstantiationStatic */', + [ + 'label', + 'more', + ], + ], + [ + '/* testAnonClass */', + [ + 'label', + 'more', + ], + ], + [ + '/* testNonAsciiNames */', + [ + '💩💩💩', + 'Пасха', + '_valid', + ], + ], + + // Coding errors which should still be handled. + [ + '/* testCompileErrorNamedBeforePositional */', + ['param'], + ], + [ + '/* testDuplicateName1 */', + ['param'], + ], + [ + '/* testDuplicateName2 */', + ['param'], + ], + [ + '/* testIncorrectOrderWithVariadic */', + ['start_index'], + ], + [ + '/* testCompileErrorIncorrectOrderWithVariadic */', + ['param'], + ], + [ + '/* testParseErrorNoValue */', + [ + 'param1', + 'param2', + ], + ], + [ + '/* testParseErrorExit */', + ['status'], + ], + [ + '/* testParseErrorEmpty */', + ['variable'], + ], + [ + '/* testParseErrorEval */', + ['code'], + ], + [ + '/* testParseErrorArbitraryParentheses */', + ['something'], + ], + ]; + + }//end dataNamedFunctionCallArguments() + + + /** + * Verify that other T_STRING tokens within a function call are still tokenized as T_STRING. + * + * @param string $testMarker The comment prefacing the target token. + * @param string $content The token content to look for. + * + * @dataProvider dataOtherTstringInFunctionCall + * @covers PHP_CodeSniffer\Tokenizers\PHP::tokenize + * + * @return void + */ + public function testOtherTstringInFunctionCall($testMarker, $content) + { + $tokens = self::$phpcsFile->getTokens(); + + $label = $this->getTargetToken($testMarker, [T_STRING, T_PARAM_NAME], $content); + + $this->assertSame( + T_STRING, + $tokens[$label]['code'], + 'Token tokenized as '.$tokens[$label]['type'].', not T_STRING (code)' + ); + $this->assertSame( + 'T_STRING', + $tokens[$label]['type'], + 'Token tokenized as '.$tokens[$label]['type'].', not T_STRING (type)' + ); + + }//end testOtherTstringInFunctionCall() + + + /** + * Data provider. + * + * @see testOtherTstringInFunctionCall() + * + * @return array + */ + public function dataOtherTstringInFunctionCall() + { + return [ + [ + '/* testPositionalArgs */', + 'START_INDEX', + ], + [ + '/* testPositionalArgs */', + 'COUNT', + ], + [ + '/* testPositionalArgs */', + 'VALUE', + ], + [ + '/* testNestedFunctionCallInner2 */', + 'count', + ], + ]; + + }//end dataOtherTstringInFunctionCall() + + + /** + * Verify whether the colons are tokenized correctly when a ternary is used in a mixed + * positional and named arguments function call. + * + * @covers PHP_CodeSniffer\Tokenizers\PHP::tokenize + * + * @return void + */ + public function testMixedPositionalAndNamedArgsWithTernary() + { + $tokens = self::$phpcsFile->getTokens(); + + $true = $this->getTargetToken('/* testMixedPositionalAndNamedArgsWithTernary */', T_TRUE); + + // Get the next non-empty token. + $colon = self::$phpcsFile->findNext(Tokens::$emptyTokens, ($true + 1), null, true); + + $this->assertSame( + T_INLINE_ELSE, + $tokens[$colon]['code'], + 'Token tokenized as '.$tokens[$colon]['type'].', not T_INLINE_ELSE (code)' + ); + $this->assertSame( + 'T_INLINE_ELSE', + $tokens[$colon]['type'], + 'Token tokenized as '.$tokens[$colon]['type'].', not T_INLINE_ELSE (type)' + ); + + $label = $this->getTargetToken('/* testMixedPositionalAndNamedArgsWithTernary */', T_PARAM_NAME, 'name'); + + // Get the next non-empty token. + $colon = self::$phpcsFile->findNext(Tokens::$emptyTokens, ($label + 1), null, true); + + $this->assertSame( + ':', + $tokens[$colon]['content'], + 'Next token after parameter name is not a colon. Found: '.$tokens[$colon]['content'] + ); + $this->assertSame( + T_COLON, + $tokens[$colon]['code'], + 'Token tokenized as '.$tokens[$colon]['type'].', not T_COLON (code)' + ); + $this->assertSame( + 'T_COLON', + $tokens[$colon]['type'], + 'Token tokenized as '.$tokens[$colon]['type'].', not T_COLON (type)' + ); + + }//end testMixedPositionalAndNamedArgsWithTernary() + + + /** + * Verify whether the colons are tokenized correctly when a ternary is used + * in a named arguments function call. + * + * @covers PHP_CodeSniffer\Tokenizers\PHP::tokenize + * + * @return void + */ + public function testNamedArgWithTernary() + { + $tokens = self::$phpcsFile->getTokens(); + + /* + * First argument. + */ + + $label = $this->getTargetToken('/* testNamedArgWithTernary */', T_PARAM_NAME, 'label'); + + // Get the next non-empty token. + $colon = self::$phpcsFile->findNext(Tokens::$emptyTokens, ($label + 1), null, true); + + $this->assertSame( + ':', + $tokens[$colon]['content'], + 'First arg: Next token after parameter name is not a colon. Found: '.$tokens[$colon]['content'] + ); + $this->assertSame( + T_COLON, + $tokens[$colon]['code'], + 'First arg: Token tokenized as '.$tokens[$colon]['type'].', not T_COLON (code)' + ); + $this->assertSame( + 'T_COLON', + $tokens[$colon]['type'], + 'First arg: Token tokenized as '.$tokens[$colon]['type'].', not T_COLON (type)' + ); + + $true = $this->getTargetToken('/* testNamedArgWithTernary */', T_TRUE); + + // Get the next non-empty token. + $colon = self::$phpcsFile->findNext(Tokens::$emptyTokens, ($true + 1), null, true); + + $this->assertSame( + T_INLINE_ELSE, + $tokens[$colon]['code'], + 'First arg ternary: Token tokenized as '.$tokens[$colon]['type'].', not T_INLINE_ELSE (code)' + ); + $this->assertSame( + 'T_INLINE_ELSE', + $tokens[$colon]['type'], + 'First arg ternary: Token tokenized as '.$tokens[$colon]['type'].', not T_INLINE_ELSE (type)' + ); + + /* + * Second argument. + */ + + $label = $this->getTargetToken('/* testNamedArgWithTernary */', T_PARAM_NAME, 'more'); + + // Get the next non-empty token. + $colon = self::$phpcsFile->findNext(Tokens::$emptyTokens, ($label + 1), null, true); + + $this->assertSame( + ':', + $tokens[$colon]['content'], + 'Second arg: Next token after parameter name is not a colon. Found: '.$tokens[$colon]['content'] + ); + $this->assertSame( + T_COLON, + $tokens[$colon]['code'], + 'Second arg: Token tokenized as '.$tokens[$colon]['type'].', not T_COLON (code)' + ); + $this->assertSame( + 'T_COLON', + $tokens[$colon]['type'], + 'Second arg: Token tokenized as '.$tokens[$colon]['type'].', not T_COLON (type)' + ); + + $true = $this->getTargetToken('/* testNamedArgWithTernary */', T_STRING, 'CONSTANT_A'); + + // Get the next non-empty token. + $colon = self::$phpcsFile->findNext(Tokens::$emptyTokens, ($true + 1), null, true); + + $this->assertSame( + T_INLINE_ELSE, + $tokens[$colon]['code'], + 'Second arg ternary: Token tokenized as '.$tokens[$colon]['type'].', not T_INLINE_ELSE (code)' + ); + $this->assertSame( + 'T_INLINE_ELSE', + $tokens[$colon]['type'], + 'Second arg ternary: Token tokenized as '.$tokens[$colon]['type'].', not T_INLINE_ELSE (type)' + ); + + }//end testNamedArgWithTernary() + + + /** + * Verify whether the colons are tokenized correctly when named arguments + * function calls are used in a ternary. + * + * @covers PHP_CodeSniffer\Tokenizers\PHP::tokenize + * + * @return void + */ + public function testTernaryWithFunctionCallsInThenElse() + { + $tokens = self::$phpcsFile->getTokens(); + + /* + * Then. + */ + + $label = $this->getTargetToken('/* testTernaryWithFunctionCallsInThenElse */', T_PARAM_NAME, 'label'); + + // Get the next non-empty token. + $colon = self::$phpcsFile->findNext(Tokens::$emptyTokens, ($label + 1), null, true); + + $this->assertSame( + ':', + $tokens[$colon]['content'], + 'Function in then: Next token after parameter name is not a colon. Found: '.$tokens[$colon]['content'] + ); + $this->assertSame( + T_COLON, + $tokens[$colon]['code'], + 'Function in then: Token tokenized as '.$tokens[$colon]['type'].', not T_COLON (code)' + ); + $this->assertSame( + 'T_COLON', + $tokens[$colon]['type'], + 'Function in then: Token tokenized as '.$tokens[$colon]['type'].', not T_COLON (type)' + ); + + $closeParens = $this->getTargetToken('/* testTernaryWithFunctionCallsInThenElse */', T_CLOSE_PARENTHESIS); + + // Get the next non-empty token. + $colon = self::$phpcsFile->findNext(Tokens::$emptyTokens, ($closeParens + 1), null, true); + + $this->assertSame( + T_INLINE_ELSE, + $tokens[$colon]['code'], + 'Token tokenized as '.$tokens[$colon]['type'].', not T_INLINE_ELSE (code)' + ); + $this->assertSame( + 'T_INLINE_ELSE', + $tokens[$colon]['type'], + 'Token tokenized as '.$tokens[$colon]['type'].', not T_INLINE_ELSE (type)' + ); + + /* + * Else. + */ + + $label = $this->getTargetToken('/* testTernaryWithFunctionCallsInThenElse */', T_PARAM_NAME, 'more'); + + // Get the next non-empty token. + $colon = self::$phpcsFile->findNext(Tokens::$emptyTokens, ($label + 1), null, true); + + $this->assertSame( + ':', + $tokens[$colon]['content'], + 'Function in else: Next token after parameter name is not a colon. Found: '.$tokens[$colon]['content'] + ); + $this->assertSame( + T_COLON, + $tokens[$colon]['code'], + 'Function in else: Token tokenized as '.$tokens[$colon]['type'].', not T_COLON (code)' + ); + $this->assertSame( + 'T_COLON', + $tokens[$colon]['type'], + 'Function in else: Token tokenized as '.$tokens[$colon]['type'].', not T_COLON (type)' + ); + + }//end testTernaryWithFunctionCallsInThenElse() + + + /** + * Verify whether the colons are tokenized correctly when constants are used in a ternary. + * + * @covers PHP_CodeSniffer\Tokenizers\PHP::tokenize + * + * @return void + */ + public function testTernaryWithConstantsInThenElse() + { + $tokens = self::$phpcsFile->getTokens(); + + $constant = $this->getTargetToken('/* testTernaryWithConstantsInThenElse */', T_STRING, 'CONSTANT_NAME'); + + // Get the next non-empty token. + $colon = self::$phpcsFile->findNext(Tokens::$emptyTokens, ($constant + 1), null, true); + + $this->assertSame( + T_INLINE_ELSE, + $tokens[$colon]['code'], + 'Token tokenized as '.$tokens[$colon]['type'].', not T_INLINE_ELSE (code)' + ); + $this->assertSame( + 'T_INLINE_ELSE', + $tokens[$colon]['type'], + 'Token tokenized as '.$tokens[$colon]['type'].', not T_INLINE_ELSE (type)' + ); + + }//end testTernaryWithConstantsInThenElse() + + + /** + * Verify whether the colons are tokenized correctly in a switch statement. + * + * @covers PHP_CodeSniffer\Tokenizers\PHP::tokenize + * + * @return void + */ + public function testSwitchStatement() + { + $tokens = self::$phpcsFile->getTokens(); + + $label = $this->getTargetToken('/* testSwitchCaseWithConstant */', T_STRING, 'MY_CONSTANT'); + + // Get the next non-empty token. + $colon = self::$phpcsFile->findNext(Tokens::$emptyTokens, ($label + 1), null, true); + + $this->assertSame( + T_COLON, + $tokens[$colon]['code'], + 'First case: Token tokenized as '.$tokens[$colon]['type'].', not T_COLON (code)' + ); + $this->assertSame( + 'T_COLON', + $tokens[$colon]['type'], + 'First case: Token tokenized as '.$tokens[$colon]['type'].', not T_COLON (type)' + ); + + $label = $this->getTargetToken('/* testSwitchCaseWithClassProperty */', T_STRING, 'property'); + + // Get the next non-empty token. + $colon = self::$phpcsFile->findNext(Tokens::$emptyTokens, ($label + 1), null, true); + + $this->assertSame( + T_COLON, + $tokens[$colon]['code'], + 'Second case: Token tokenized as '.$tokens[$colon]['type'].', not T_COLON (code)' + ); + $this->assertSame( + 'T_COLON', + $tokens[$colon]['type'], + 'Second case: Token tokenized as '.$tokens[$colon]['type'].', not T_COLON (type)' + ); + + $default = $this->getTargetToken('/* testSwitchDefault */', T_DEFAULT); + + // Get the next non-empty token. + $colon = self::$phpcsFile->findNext(Tokens::$emptyTokens, ($default + 1), null, true); + + $this->assertSame( + T_COLON, + $tokens[$colon]['code'], + 'Default case: Token tokenized as '.$tokens[$colon]['type'].', not T_COLON (code)' + ); + $this->assertSame( + 'T_COLON', + $tokens[$colon]['type'], + 'Default case: Token tokenized as '.$tokens[$colon]['type'].', not T_COLON (type)' + ); + + }//end testSwitchStatement() + + + /** + * Verify that a variable parameter label (parse error) is still tokenized as T_VARIABLE. + * + * @covers PHP_CodeSniffer\Tokenizers\PHP::tokenize + * + * @return void + */ + public function testParseErrorVariableLabel() + { + $tokens = self::$phpcsFile->getTokens(); + + $label = $this->getTargetToken('/* testParseErrorDynamicName */', [T_VARIABLE, T_PARAM_NAME], '$variableStoringParamName'); + + $this->assertSame( + T_VARIABLE, + $tokens[$label]['code'], + 'Token tokenized as '.$tokens[$label]['type'].', not T_VARIABLE (code)' + ); + $this->assertSame( + 'T_VARIABLE', + $tokens[$label]['type'], + 'Token tokenized as '.$tokens[$label]['type'].', not T_VARIABLE (type)' + ); + + // Get the next non-empty token. + $colon = self::$phpcsFile->findNext(Tokens::$emptyTokens, ($label + 1), null, true); + + $this->assertSame( + ':', + $tokens[$colon]['content'], + 'Next token after parameter name is not a colon. Found: '.$tokens[$colon]['content'] + ); + $this->assertSame( + T_COLON, + $tokens[$colon]['code'], + 'Token tokenized as '.$tokens[$colon]['type'].', not T_COLON (code)' + ); + $this->assertSame( + 'T_COLON', + $tokens[$colon]['type'], + 'Token tokenized as '.$tokens[$colon]['type'].', not T_COLON (type)' + ); + + }//end testParseErrorVariableLabel() + + + /** + * Verify that reserved keywords used as a parameter label are tokenized as T_PARAM_NAME + * and that the colon after it is tokenized as a T_COLON. + * + * @param string $testMarker The comment prefacing the target token. + * @param array $tokenTypes The token codes to look for. + * @param string $tokenContent The token content to look for. + * + * @dataProvider dataReservedKeywordsAsName + * @covers PHP_CodeSniffer\Tokenizers\PHP::tokenize + * + * @return void + */ + public function testReservedKeywordsAsName($testMarker, $tokenTypes, $tokenContent) + { + $tokens = self::$phpcsFile->getTokens(); + $label = $this->getTargetToken($testMarker, $tokenTypes, $tokenContent); + + $this->assertSame( + T_PARAM_NAME, + $tokens[$label]['code'], + 'Token tokenized as '.$tokens[$label]['type'].', not T_PARAM_NAME (code)' + ); + $this->assertSame( + 'T_PARAM_NAME', + $tokens[$label]['type'], + 'Token tokenized as '.$tokens[$label]['type'].', not T_PARAM_NAME (type)' + ); + + // Get the next non-empty token. + $colon = self::$phpcsFile->findNext(Tokens::$emptyTokens, ($label + 1), null, true); + + $this->assertSame( + ':', + $tokens[$colon]['content'], + 'Next token after parameter name is not a colon. Found: '.$tokens[$colon]['content'] + ); + $this->assertSame( + T_COLON, + $tokens[$colon]['code'], + 'Token tokenized as '.$tokens[$colon]['type'].', not T_COLON (code)' + ); + $this->assertSame( + 'T_COLON', + $tokens[$colon]['type'], + 'Token tokenized as '.$tokens[$colon]['type'].', not T_COLON (type)' + ); + + }//end testReservedKeywordsAsName() + + + /** + * Data provider. + * + * @see testReservedKeywordsAsName() + * + * @return array + */ + public function dataReservedKeywordsAsName() + { + $reservedKeywords = [ + // '__halt_compiler', NOT TESTABLE + 'abstract', + 'and', + 'array', + 'as', + 'break', + 'callable', + 'case', + 'catch', + 'class', + 'clone', + 'const', + 'continue', + 'declare', + 'default', + 'die', + 'do', + 'echo', + 'else', + 'elseif', + 'empty', + 'enddeclare', + 'endfor', + 'endforeach', + 'endif', + 'endswitch', + 'endwhile', + 'eval', + 'exit', + 'extends', + 'final', + 'finally', + 'fn', + 'for', + 'foreach', + 'function', + 'global', + 'goto', + 'if', + 'implements', + 'include', + 'include_once', + 'instanceof', + 'insteadof', + 'interface', + 'isset', + 'list', + 'match', + 'namespace', + 'new', + 'or', + 'print', + 'private', + 'protected', + 'public', + 'require', + 'require_once', + 'return', + 'static', + 'switch', + 'throw', + 'trait', + 'try', + 'unset', + 'use', + 'var', + 'while', + 'xor', + 'yield', + 'int', + 'float', + 'bool', + 'string', + 'true', + 'false', + 'null', + 'void', + 'iterable', + 'object', + 'resource', + 'mixed', + 'numeric', + + // Not reserved keyword, but do have their own token in PHPCS. + 'parent', + 'self', + ]; + + $data = []; + + foreach ($reservedKeywords as $keyword) { + $tokensTypes = [ + T_PARAM_NAME, + T_STRING, + T_GOTO_LABEL, + ]; + $tokenName = 'T_'.strtoupper($keyword); + + if ($keyword === 'and') { + $tokensTypes[] = T_LOGICAL_AND; + } else if ($keyword === 'die') { + $tokensTypes[] = T_EXIT; + } else if ($keyword === 'or') { + $tokensTypes[] = T_LOGICAL_OR; + } else if ($keyword === 'xor') { + $tokensTypes[] = T_LOGICAL_XOR; + } else if ($keyword === '__halt_compiler') { + $tokensTypes[] = T_HALT_COMPILER; + } else if (defined($tokenName) === true) { + $tokensTypes[] = constant($tokenName); + } + + $data[$keyword.'FirstParam'] = [ + '/* testReservedKeyword'.ucfirst($keyword).'1 */', + $tokensTypes, + $keyword, + ]; + + $data[$keyword.'SecondParam'] = [ + '/* testReservedKeyword'.ucfirst($keyword).'2 */', + $tokensTypes, + $keyword, + ]; + }//end foreach + + return $data; + + }//end dataReservedKeywordsAsName() + + +}//end class diff --git a/vendor/squizlabs/php_codesniffer/tests/Core/Tokenizer/NullsafeObjectOperatorTest.inc b/vendor/squizlabs/php_codesniffer/tests/Core/Tokenizer/NullsafeObjectOperatorTest.inc new file mode 100644 index 00000000..982841ea --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/tests/Core/Tokenizer/NullsafeObjectOperatorTest.inc @@ -0,0 +1,29 @@ +foo; + +/* testNullsafeObjectOperator */ +echo $obj?->foo; + +/* testNullsafeObjectOperatorWriteContext */ +// Intentional parse error, but not the concern of the tokenizer. +$foo?->bar->baz = 'baz'; + +/* testTernaryThen */ +echo $obj ? $obj->prop : $other->prop; + +/* testParseErrorWhitespaceNotAllowed */ +echo $obj ? + -> foo; + +/* testParseErrorCommentNotAllowed */ +echo $obj ?/*comment*/-> foo; + +/* testLiveCoding */ +// Intentional parse error. This has to be the last test in the file. +echo $obj? diff --git a/vendor/squizlabs/php_codesniffer/tests/Core/Tokenizer/NullsafeObjectOperatorTest.php b/vendor/squizlabs/php_codesniffer/tests/Core/Tokenizer/NullsafeObjectOperatorTest.php new file mode 100644 index 00000000..8e465a3b --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/tests/Core/Tokenizer/NullsafeObjectOperatorTest.php @@ -0,0 +1,140 @@ += 8.0 nullsafe object operator. + * + * @author Juliette Reinders Folmer + * @copyright 2020 Squiz Pty Ltd (ABN 77 084 670 600) + * @license https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence + */ + +namespace PHP_CodeSniffer\Tests\Core\Tokenizer; + +use PHP_CodeSniffer\Tests\Core\AbstractMethodUnitTest; +use PHP_CodeSniffer\Util\Tokens; + +class NullsafeObjectOperatorTest extends AbstractMethodUnitTest +{ + + /** + * Tokens to search for. + * + * @var array + */ + protected $find = [ + T_NULLSAFE_OBJECT_OPERATOR, + T_OBJECT_OPERATOR, + T_INLINE_THEN, + ]; + + + /** + * Test that a normal object operator is still tokenized as such. + * + * @covers PHP_CodeSniffer\Tokenizers\PHP::tokenize + * + * @return void + */ + public function testObjectOperator() + { + $tokens = self::$phpcsFile->getTokens(); + + $operator = $this->getTargetToken('/* testObjectOperator */', $this->find); + $this->assertSame(T_OBJECT_OPERATOR, $tokens[$operator]['code'], 'Failed asserting code is object operator'); + $this->assertSame('T_OBJECT_OPERATOR', $tokens[$operator]['type'], 'Failed asserting type is object operator'); + + }//end testObjectOperator() + + + /** + * Test that a nullsafe object operator is tokenized as such. + * + * @param string $testMarker The comment which prefaces the target token in the test file. + * + * @dataProvider dataNullsafeObjectOperator + * @covers PHP_CodeSniffer\Tokenizers\PHP::tokenize + * + * @return void + */ + public function testNullsafeObjectOperator($testMarker) + { + $tokens = self::$phpcsFile->getTokens(); + + $operator = $this->getTargetToken($testMarker, $this->find); + $this->assertSame(T_NULLSAFE_OBJECT_OPERATOR, $tokens[$operator]['code'], 'Failed asserting code is nullsafe object operator'); + $this->assertSame('T_NULLSAFE_OBJECT_OPERATOR', $tokens[$operator]['type'], 'Failed asserting type is nullsafe object operator'); + + }//end testNullsafeObjectOperator() + + + /** + * Data provider. + * + * @see testNullsafeObjectOperator() + * + * @return array + */ + public function dataNullsafeObjectOperator() + { + return [ + ['/* testNullsafeObjectOperator */'], + ['/* testNullsafeObjectOperatorWriteContext */'], + ]; + + }//end dataNullsafeObjectOperator() + + + /** + * Test that a question mark not followed by an object operator is tokenized as T_TERNARY_THEN. + * + * @param string $testMarker The comment which prefaces the target token in the test file. + * @param bool $testObjectOperator Whether to test for the next non-empty token being tokenized + * as an object operator. + * + * @dataProvider dataTernaryThen + * @covers PHP_CodeSniffer\Tokenizers\PHP::tokenize + * + * @return void + */ + public function testTernaryThen($testMarker, $testObjectOperator=false) + { + $tokens = self::$phpcsFile->getTokens(); + + $operator = $this->getTargetToken($testMarker, $this->find); + $this->assertSame(T_INLINE_THEN, $tokens[$operator]['code'], 'Failed asserting code is inline then'); + $this->assertSame('T_INLINE_THEN', $tokens[$operator]['type'], 'Failed asserting type is inline then'); + + if ($testObjectOperator === true) { + $next = self::$phpcsFile->findNext(Tokens::$emptyTokens, ($operator + 1), null, true); + $this->assertSame(T_OBJECT_OPERATOR, $tokens[$next]['code'], 'Failed asserting code is object operator'); + $this->assertSame('T_OBJECT_OPERATOR', $tokens[$next]['type'], 'Failed asserting type is object operator'); + } + + }//end testTernaryThen() + + + /** + * Data provider. + * + * @see testTernaryThen() + * + * @return array + */ + public function dataTernaryThen() + { + return [ + ['/* testTernaryThen */'], + [ + '/* testParseErrorWhitespaceNotAllowed */', + true, + ], + [ + '/* testParseErrorCommentNotAllowed */', + true, + ], + ['/* testLiveCoding */'], + ]; + + }//end dataTernaryThen() + + +}//end class diff --git a/vendor/squizlabs/php_codesniffer/tests/Core/Tokenizer/ScopeSettingWithNamespaceOperatorTest.inc b/vendor/squizlabs/php_codesniffer/tests/Core/Tokenizer/ScopeSettingWithNamespaceOperatorTest.inc new file mode 100644 index 00000000..e2d61bb6 --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/tests/Core/Tokenizer/ScopeSettingWithNamespaceOperatorTest.inc @@ -0,0 +1,19 @@ + new namespace\Baz; diff --git a/vendor/squizlabs/php_codesniffer/tests/Core/Tokenizer/ScopeSettingWithNamespaceOperatorTest.php b/vendor/squizlabs/php_codesniffer/tests/Core/Tokenizer/ScopeSettingWithNamespaceOperatorTest.php new file mode 100644 index 00000000..23cbd987 --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/tests/Core/Tokenizer/ScopeSettingWithNamespaceOperatorTest.php @@ -0,0 +1,98 @@ + + * @copyright 2020 Squiz Pty Ltd (ABN 77 084 670 600) + * @license https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence + */ + +namespace PHP_CodeSniffer\Tests\Core\Tokenizer; + +use PHP_CodeSniffer\Tests\Core\AbstractMethodUnitTest; + +class ScopeSettingWithNamespaceOperatorTest extends AbstractMethodUnitTest +{ + + + /** + * Test that the scope opener/closers are set correctly when the namespace keyword is encountered as an operator. + * + * @param string $testMarker The comment which prefaces the target tokens in the test file. + * @param int|string[] $tokenTypes The token type to search for. + * @param int|string[] $open Optional. The token type for the scope opener. + * @param int|string[] $close Optional. The token type for the scope closer. + * + * @dataProvider dataScopeSetting + * @covers PHP_CodeSniffer\Tokenizers\Tokenizer::recurseScopeMap + * + * @return void + */ + public function testScopeSetting($testMarker, $tokenTypes, $open=T_OPEN_CURLY_BRACKET, $close=T_CLOSE_CURLY_BRACKET) + { + $tokens = self::$phpcsFile->getTokens(); + + $target = $this->getTargetToken($testMarker, $tokenTypes); + $opener = $this->getTargetToken($testMarker, $open); + $closer = $this->getTargetToken($testMarker, $close); + + $this->assertArrayHasKey('scope_opener', $tokens[$target], 'Scope opener missing'); + $this->assertArrayHasKey('scope_closer', $tokens[$target], 'Scope closer missing'); + $this->assertSame($opener, $tokens[$target]['scope_opener'], 'Scope opener not same'); + $this->assertSame($closer, $tokens[$target]['scope_closer'], 'Scope closer not same'); + + $this->assertArrayHasKey('scope_opener', $tokens[$opener], 'Scope opener missing for open curly'); + $this->assertArrayHasKey('scope_closer', $tokens[$opener], 'Scope closer missing for open curly'); + $this->assertSame($opener, $tokens[$opener]['scope_opener'], 'Scope opener not same for open curly'); + $this->assertSame($closer, $tokens[$opener]['scope_closer'], 'Scope closer not same for open curly'); + + $this->assertArrayHasKey('scope_opener', $tokens[$closer], 'Scope opener missing for close curly'); + $this->assertArrayHasKey('scope_closer', $tokens[$closer], 'Scope closer missing for close curly'); + $this->assertSame($opener, $tokens[$closer]['scope_opener'], 'Scope opener not same for close curly'); + $this->assertSame($closer, $tokens[$closer]['scope_closer'], 'Scope closer not same for close curly'); + + }//end testScopeSetting() + + + /** + * Data provider. + * + * @see testScopeSetting() + * + * @return array + */ + public function dataScopeSetting() + { + return [ + [ + '/* testClassExtends */', + [T_CLASS], + ], + [ + '/* testClassImplements */', + [T_ANON_CLASS], + ], + [ + '/* testInterfaceExtends */', + [T_INTERFACE], + ], + [ + '/* testFunctionReturnType */', + [T_FUNCTION], + ], + [ + '/* testClosureReturnType */', + [T_CLOSURE], + ], + [ + '/* testArrowFunctionReturnType */', + [T_FN], + [T_FN_ARROW], + [T_SEMICOLON], + ], + ]; + + }//end dataScopeSetting() + + +}//end class diff --git a/vendor/squizlabs/php_codesniffer/tests/Core/Tokenizer/ShortArrayTest.inc b/vendor/squizlabs/php_codesniffer/tests/Core/Tokenizer/ShortArrayTest.inc new file mode 100644 index 00000000..54065f21 --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/tests/Core/Tokenizer/ShortArrayTest.inc @@ -0,0 +1,97 @@ +function_call()[$x]; + +/* testStaticMethodCallDereferencing */ +$var = ClassName::function_call()[$x]; + +/* testPropertyDereferencing */ +$var = $obj->property[2]; + +/* testPropertyDereferencingWithInaccessibleName */ +$var = $ref->{'ref-type'}[1]; + +/* testStaticPropertyDereferencing */ +$var ClassName::$property[2]; + +/* testStringDereferencing */ +$var = 'PHP'[1]; + +/* testStringDereferencingDoubleQuoted */ +$var = "PHP"[$y]; + +/* testConstantDereferencing */ +$var = MY_CONSTANT[1]; + +/* testClassConstantDereferencing */ +$var ClassName::CONSTANT_NAME[2]; + +/* testMagicConstantDereferencing */ +$var = __FILE__[0]; + +/* testArrayAccessCurlyBraces */ +$var = $array{'key'}['key']; + +/* testArrayLiteralDereferencing */ +echo array(1, 2, 3)[0]; + +echo [1, 2, 3]/* testShortArrayLiteralDereferencing */[0]; + +/* testClassMemberDereferencingOnInstantiation1 */ +(new foo)[0]; + +/* testClassMemberDereferencingOnInstantiation2 */ +$a = (new Foo( array(1, array(4, 5), 3) ))[1][0]; + +/* testClassMemberDereferencingOnClone */ +echo (clone $iterable)[20]; + +/* testNullsafeMethodCallDereferencing */ +$var = $obj?->function_call()[$x]; + +/* testInterpolatedStringDereferencing */ +$var = "PHP{$rocks}"[1]; + +/* + * Short array brackets. + */ + +/* testShortArrayDeclarationEmpty */ +$array = []; + +/* testShortArrayDeclarationWithOneValue */ +$array = [1]; + +/* testShortArrayDeclarationWithMultipleValues */ +$array = [1, 2, 3]; + +/* testShortArrayDeclarationWithDereferencing */ +echo [1, 2, 3][0]; + +/* testShortListDeclaration */ +[ $a, $b ] = $array; + +[ $a, $b, /* testNestedListDeclaration */, [$c, $d]] = $array; + +/* testArrayWithinFunctionCall */ +$var = functionCall([$x, $y]); + +/* testLiveCoding */ +// Intentional parse error. This has to be the last test in the file. +$array = [ diff --git a/vendor/squizlabs/php_codesniffer/tests/Core/Tokenizer/ShortArrayTest.php b/vendor/squizlabs/php_codesniffer/tests/Core/Tokenizer/ShortArrayTest.php new file mode 100644 index 00000000..0484d4fc --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/tests/Core/Tokenizer/ShortArrayTest.php @@ -0,0 +1,132 @@ + + * @copyright 2020 Squiz Pty Ltd (ABN 77 084 670 600) + * @license https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence + */ + +namespace PHP_CodeSniffer\Tests\Core\Tokenizer; + +use PHP_CodeSniffer\Tests\Core\AbstractMethodUnitTest; + +class ShortArrayTest extends AbstractMethodUnitTest +{ + + + /** + * Test that real square brackets are still tokenized as square brackets. + * + * @param string $testMarker The comment which prefaces the target token in the test file. + * + * @dataProvider dataSquareBrackets + * @covers PHP_CodeSniffer\Tokenizers\PHP::processAdditional + * + * @return void + */ + public function testSquareBrackets($testMarker) + { + $tokens = self::$phpcsFile->getTokens(); + + $opener = $this->getTargetToken($testMarker, [T_OPEN_SQUARE_BRACKET, T_OPEN_SHORT_ARRAY]); + $this->assertSame(T_OPEN_SQUARE_BRACKET, $tokens[$opener]['code']); + $this->assertSame('T_OPEN_SQUARE_BRACKET', $tokens[$opener]['type']); + + if (isset($tokens[$opener]['bracket_closer']) === true) { + $closer = $tokens[$opener]['bracket_closer']; + $this->assertSame(T_CLOSE_SQUARE_BRACKET, $tokens[$closer]['code']); + $this->assertSame('T_CLOSE_SQUARE_BRACKET', $tokens[$closer]['type']); + } + + }//end testSquareBrackets() + + + /** + * Data provider. + * + * @see testSquareBrackets() + * + * @return array + */ + public function dataSquareBrackets() + { + return [ + ['/* testArrayAccess1 */'], + ['/* testArrayAccess2 */'], + ['/* testArrayAssignment */'], + ['/* testFunctionCallDereferencing */'], + ['/* testMethodCallDereferencing */'], + ['/* testStaticMethodCallDereferencing */'], + ['/* testPropertyDereferencing */'], + ['/* testPropertyDereferencingWithInaccessibleName */'], + ['/* testStaticPropertyDereferencing */'], + ['/* testStringDereferencing */'], + ['/* testStringDereferencingDoubleQuoted */'], + ['/* testConstantDereferencing */'], + ['/* testClassConstantDereferencing */'], + ['/* testMagicConstantDereferencing */'], + ['/* testArrayAccessCurlyBraces */'], + ['/* testArrayLiteralDereferencing */'], + ['/* testShortArrayLiteralDereferencing */'], + ['/* testClassMemberDereferencingOnInstantiation1 */'], + ['/* testClassMemberDereferencingOnInstantiation2 */'], + ['/* testClassMemberDereferencingOnClone */'], + ['/* testNullsafeMethodCallDereferencing */'], + ['/* testInterpolatedStringDereferencing */'], + ['/* testLiveCoding */'], + ]; + + }//end dataSquareBrackets() + + + /** + * Test that short arrays and short lists are still tokenized as short arrays. + * + * @param string $testMarker The comment which prefaces the target token in the test file. + * + * @dataProvider dataShortArrays + * @covers PHP_CodeSniffer\Tokenizers\PHP::processAdditional + * + * @return void + */ + public function testShortArrays($testMarker) + { + $tokens = self::$phpcsFile->getTokens(); + + $opener = $this->getTargetToken($testMarker, [T_OPEN_SQUARE_BRACKET, T_OPEN_SHORT_ARRAY]); + $this->assertSame(T_OPEN_SHORT_ARRAY, $tokens[$opener]['code']); + $this->assertSame('T_OPEN_SHORT_ARRAY', $tokens[$opener]['type']); + + if (isset($tokens[$opener]['bracket_closer']) === true) { + $closer = $tokens[$opener]['bracket_closer']; + $this->assertSame(T_CLOSE_SHORT_ARRAY, $tokens[$closer]['code']); + $this->assertSame('T_CLOSE_SHORT_ARRAY', $tokens[$closer]['type']); + } + + }//end testShortArrays() + + + /** + * Data provider. + * + * @see testShortArrays() + * + * @return array + */ + public function dataShortArrays() + { + return [ + ['/* testShortArrayDeclarationEmpty */'], + ['/* testShortArrayDeclarationWithOneValue */'], + ['/* testShortArrayDeclarationWithMultipleValues */'], + ['/* testShortArrayDeclarationWithDereferencing */'], + ['/* testShortListDeclaration */'], + ['/* testNestedListDeclaration */'], + ['/* testArrayWithinFunctionCall */'], + ]; + + }//end dataShortArrays() + + +}//end class diff --git a/vendor/squizlabs/php_codesniffer/tests/Core/Tokenizer/StableCommentWhitespaceTest.inc b/vendor/squizlabs/php_codesniffer/tests/Core/Tokenizer/StableCommentWhitespaceTest.inc new file mode 100644 index 00000000..3bf013c6 --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/tests/Core/Tokenizer/StableCommentWhitespaceTest.inc @@ -0,0 +1,139 @@ + + + + * @copyright 2020 Squiz Pty Ltd (ABN 77 084 670 600) + * @license https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence + */ + +namespace PHP_CodeSniffer\Tests\Core\Tokenizer; + +use PHP_CodeSniffer\Tests\Core\AbstractMethodUnitTest; +use PHP_CodeSniffer\Util\Tokens; + +class StableCommentWhitespaceTest extends AbstractMethodUnitTest +{ + + + /** + * Test that comment tokenization with new lines at the end of the comment is stable. + * + * @param string $testMarker The comment prefacing the test. + * @param array $expectedTokens The tokenization expected. + * + * @dataProvider dataCommentTokenization + * @covers PHP_CodeSniffer\Tokenizers\PHP::tokenize + * + * @return void + */ + public function testCommentTokenization($testMarker, $expectedTokens) + { + $tokens = self::$phpcsFile->getTokens(); + $comment = $this->getTargetToken($testMarker, Tokens::$commentTokens); + + foreach ($expectedTokens as $key => $tokenInfo) { + $this->assertSame(constant($tokenInfo['type']), $tokens[$comment]['code']); + $this->assertSame($tokenInfo['type'], $tokens[$comment]['type']); + $this->assertSame($tokenInfo['content'], $tokens[$comment]['content']); + + ++$comment; + } + + }//end testCommentTokenization() + + + /** + * Data provider. + * + * @see testCommentTokenization() + * + * @return array + */ + public function dataCommentTokenization() + { + return [ + [ + '/* testSingleLineSlashComment */', + [ + [ + 'type' => 'T_COMMENT', + 'content' => '// Comment +', + ], + [ + 'type' => 'T_WHITESPACE', + 'content' => ' +', + ], + ], + ], + [ + '/* testSingleLineSlashCommentTrailing */', + [ + [ + 'type' => 'T_COMMENT', + 'content' => '// Comment +', + ], + [ + 'type' => 'T_WHITESPACE', + 'content' => ' +', + ], + ], + ], + [ + '/* testSingleLineSlashAnnotation */', + [ + [ + 'type' => 'T_PHPCS_DISABLE', + 'content' => '// phpcs:disable Stnd.Cat +', + ], + [ + 'type' => 'T_WHITESPACE', + 'content' => ' +', + ], + ], + ], + [ + '/* testMultiLineSlashComment */', + [ + [ + 'type' => 'T_COMMENT', + 'content' => '// Comment1 +', + ], + [ + 'type' => 'T_COMMENT', + 'content' => '// Comment2 +', + ], + [ + 'type' => 'T_COMMENT', + 'content' => '// Comment3 +', + ], + [ + 'type' => 'T_WHITESPACE', + 'content' => ' +', + ], + ], + ], + [ + '/* testMultiLineSlashCommentWithIndent */', + [ + [ + 'type' => 'T_COMMENT', + 'content' => '// Comment1 +', + ], + [ + 'type' => 'T_WHITESPACE', + 'content' => ' ', + ], + [ + 'type' => 'T_COMMENT', + 'content' => '// Comment2 +', + ], + [ + 'type' => 'T_WHITESPACE', + 'content' => ' ', + ], + [ + 'type' => 'T_COMMENT', + 'content' => '// Comment3 +', + ], + [ + 'type' => 'T_WHITESPACE', + 'content' => ' +', + ], + ], + ], + [ + '/* testMultiLineSlashCommentWithAnnotationStart */', + [ + [ + 'type' => 'T_PHPCS_IGNORE', + 'content' => '// phpcs:ignore Stnd.Cat +', + ], + [ + 'type' => 'T_COMMENT', + 'content' => '// Comment2 +', + ], + [ + 'type' => 'T_COMMENT', + 'content' => '// Comment3 +', + ], + [ + 'type' => 'T_WHITESPACE', + 'content' => ' +', + ], + ], + ], + [ + '/* testMultiLineSlashCommentWithAnnotationMiddle */', + [ + [ + 'type' => 'T_COMMENT', + 'content' => '// Comment1 +', + ], + [ + 'type' => 'T_PHPCS_IGNORE', + 'content' => '// @phpcs:ignore Stnd.Cat +', + ], + [ + 'type' => 'T_COMMENT', + 'content' => '// Comment3 +', + ], + [ + 'type' => 'T_WHITESPACE', + 'content' => ' +', + ], + ], + ], + [ + '/* testMultiLineSlashCommentWithAnnotationEnd */', + [ + [ + 'type' => 'T_COMMENT', + 'content' => '// Comment1 +', + ], + [ + 'type' => 'T_COMMENT', + 'content' => '// Comment2 +', + ], + [ + 'type' => 'T_PHPCS_IGNORE', + 'content' => '// phpcs:ignore Stnd.Cat +', + ], + [ + 'type' => 'T_WHITESPACE', + 'content' => ' +', + ], + ], + ], + [ + '/* testSingleLineStarComment */', + [ + [ + 'type' => 'T_COMMENT', + 'content' => '/* Single line star comment */', + ], + [ + 'type' => 'T_WHITESPACE', + 'content' => ' +', + ], + ], + ], + [ + '/* testSingleLineStarCommentTrailing */', + [ + [ + 'type' => 'T_COMMENT', + 'content' => '/* Comment */', + ], + [ + 'type' => 'T_WHITESPACE', + 'content' => ' +', + ], + ], + ], + [ + '/* testSingleLineStarAnnotation */', + [ + [ + 'type' => 'T_PHPCS_IGNORE', + 'content' => '/* phpcs:ignore Stnd.Cat */', + ], + [ + 'type' => 'T_WHITESPACE', + 'content' => ' +', + ], + ], + ], + [ + '/* testMultiLineStarComment */', + [ + [ + 'type' => 'T_COMMENT', + 'content' => '/* Comment1 +', + ], + [ + 'type' => 'T_COMMENT', + 'content' => ' * Comment2 +', + ], + [ + 'type' => 'T_COMMENT', + 'content' => ' * Comment3 */', + ], + [ + 'type' => 'T_WHITESPACE', + 'content' => ' +', + ], + ], + ], + [ + '/* testMultiLineStarCommentWithIndent */', + [ + [ + 'type' => 'T_COMMENT', + 'content' => '/* Comment1 +', + ], + [ + 'type' => 'T_COMMENT', + 'content' => ' * Comment2 +', + ], + [ + 'type' => 'T_COMMENT', + 'content' => ' * Comment3 */', + ], + [ + 'type' => 'T_WHITESPACE', + 'content' => ' +', + ], + ], + ], + [ + '/* testMultiLineStarCommentWithAnnotationStart */', + [ + [ + 'type' => 'T_PHPCS_IGNORE', + 'content' => '/* @phpcs:ignore Stnd.Cat +', + ], + [ + 'type' => 'T_COMMENT', + 'content' => ' * Comment2 +', + ], + [ + 'type' => 'T_COMMENT', + 'content' => ' * Comment3 */', + ], + [ + 'type' => 'T_WHITESPACE', + 'content' => ' +', + ], + ], + ], + [ + '/* testMultiLineStarCommentWithAnnotationMiddle */', + [ + [ + 'type' => 'T_COMMENT', + 'content' => '/* Comment1 +', + ], + [ + 'type' => 'T_PHPCS_IGNORE', + 'content' => ' * phpcs:ignore Stnd.Cat +', + ], + [ + 'type' => 'T_COMMENT', + 'content' => ' * Comment3 */', + ], + [ + 'type' => 'T_WHITESPACE', + 'content' => ' +', + ], + ], + ], + [ + '/* testMultiLineStarCommentWithAnnotationEnd */', + [ + [ + 'type' => 'T_COMMENT', + 'content' => '/* Comment1 +', + ], + [ + 'type' => 'T_COMMENT', + 'content' => ' * Comment2 +', + ], + [ + 'type' => 'T_PHPCS_IGNORE', + 'content' => ' * phpcs:ignore Stnd.Cat */', + ], + [ + 'type' => 'T_WHITESPACE', + 'content' => ' +', + ], + ], + ], + + [ + '/* testSingleLineDocblockComment */', + [ + [ + 'type' => 'T_DOC_COMMENT_OPEN_TAG', + 'content' => '/**', + ], + [ + 'type' => 'T_DOC_COMMENT_WHITESPACE', + 'content' => ' ', + ], + [ + 'type' => 'T_DOC_COMMENT_STRING', + 'content' => 'Comment ', + ], + [ + 'type' => 'T_DOC_COMMENT_CLOSE_TAG', + 'content' => '*/', + ], + [ + 'type' => 'T_WHITESPACE', + 'content' => ' +', + ], + ], + ], + [ + '/* testSingleLineDocblockCommentTrailing */', + [ + [ + 'type' => 'T_DOC_COMMENT_OPEN_TAG', + 'content' => '/**', + ], + [ + 'type' => 'T_DOC_COMMENT_WHITESPACE', + 'content' => ' ', + ], + [ + 'type' => 'T_DOC_COMMENT_STRING', + 'content' => 'Comment ', + ], + [ + 'type' => 'T_DOC_COMMENT_CLOSE_TAG', + 'content' => '*/', + ], + [ + 'type' => 'T_WHITESPACE', + 'content' => ' +', + ], + ], + ], + [ + '/* testSingleLineDocblockAnnotation */', + [ + [ + 'type' => 'T_DOC_COMMENT_OPEN_TAG', + 'content' => '/**', + ], + [ + 'type' => 'T_DOC_COMMENT_WHITESPACE', + 'content' => ' ', + ], + [ + 'type' => 'T_PHPCS_IGNORE', + 'content' => 'phpcs:ignore Stnd.Cat.Sniff ', + ], + [ + 'type' => 'T_DOC_COMMENT_CLOSE_TAG', + 'content' => '*/', + ], + [ + 'type' => 'T_WHITESPACE', + 'content' => ' +', + ], + ], + ], + + [ + '/* testMultiLineDocblockComment */', + [ + [ + 'type' => 'T_DOC_COMMENT_OPEN_TAG', + 'content' => '/**', + ], + [ + 'type' => 'T_DOC_COMMENT_WHITESPACE', + 'content' => ' +', + ], + [ + 'type' => 'T_DOC_COMMENT_WHITESPACE', + 'content' => ' ', + ], + [ + 'type' => 'T_DOC_COMMENT_STAR', + 'content' => '*', + ], + [ + 'type' => 'T_DOC_COMMENT_WHITESPACE', + 'content' => ' ', + ], + [ + 'type' => 'T_DOC_COMMENT_STRING', + 'content' => 'Comment1', + ], + [ + 'type' => 'T_DOC_COMMENT_WHITESPACE', + 'content' => ' +', + ], + [ + 'type' => 'T_DOC_COMMENT_WHITESPACE', + 'content' => ' ', + ], + [ + 'type' => 'T_DOC_COMMENT_STAR', + 'content' => '*', + ], + [ + 'type' => 'T_DOC_COMMENT_WHITESPACE', + 'content' => ' ', + ], + [ + 'type' => 'T_DOC_COMMENT_STRING', + 'content' => 'Comment2', + ], + [ + 'type' => 'T_DOC_COMMENT_WHITESPACE', + 'content' => ' +', + ], + [ + 'type' => 'T_DOC_COMMENT_WHITESPACE', + 'content' => ' ', + ], + [ + 'type' => 'T_DOC_COMMENT_STAR', + 'content' => '*', + ], + [ + 'type' => 'T_DOC_COMMENT_WHITESPACE', + 'content' => ' +', + ], + [ + 'type' => 'T_DOC_COMMENT_WHITESPACE', + 'content' => ' ', + ], + [ + 'type' => 'T_DOC_COMMENT_STAR', + 'content' => '*', + ], + [ + 'type' => 'T_DOC_COMMENT_WHITESPACE', + 'content' => ' ', + ], + [ + 'type' => 'T_DOC_COMMENT_TAG', + 'content' => '@tag', + ], + [ + 'type' => 'T_DOC_COMMENT_WHITESPACE', + 'content' => ' ', + ], + [ + 'type' => 'T_DOC_COMMENT_STRING', + 'content' => 'Comment', + ], + [ + 'type' => 'T_DOC_COMMENT_WHITESPACE', + 'content' => ' +', + ], + [ + 'type' => 'T_DOC_COMMENT_WHITESPACE', + 'content' => ' ', + ], + [ + 'type' => 'T_DOC_COMMENT_CLOSE_TAG', + 'content' => '*/', + ], + [ + 'type' => 'T_WHITESPACE', + 'content' => ' +', + ], + ], + ], + [ + '/* testMultiLineDocblockCommentWithIndent */', + [ + [ + 'type' => 'T_DOC_COMMENT_OPEN_TAG', + 'content' => '/**', + ], + [ + 'type' => 'T_DOC_COMMENT_WHITESPACE', + 'content' => ' +', + ], + [ + 'type' => 'T_DOC_COMMENT_WHITESPACE', + 'content' => ' ', + ], + [ + 'type' => 'T_DOC_COMMENT_STAR', + 'content' => '*', + ], + [ + 'type' => 'T_DOC_COMMENT_WHITESPACE', + 'content' => ' ', + ], + [ + 'type' => 'T_DOC_COMMENT_STRING', + 'content' => 'Comment1', + ], + [ + 'type' => 'T_DOC_COMMENT_WHITESPACE', + 'content' => ' +', + ], + [ + 'type' => 'T_DOC_COMMENT_WHITESPACE', + 'content' => ' ', + ], + [ + 'type' => 'T_DOC_COMMENT_STAR', + 'content' => '*', + ], + [ + 'type' => 'T_DOC_COMMENT_WHITESPACE', + 'content' => ' ', + ], + [ + 'type' => 'T_DOC_COMMENT_STRING', + 'content' => 'Comment2', + ], + [ + 'type' => 'T_DOC_COMMENT_WHITESPACE', + 'content' => ' +', + ], + [ + 'type' => 'T_DOC_COMMENT_WHITESPACE', + 'content' => ' ', + ], + [ + 'type' => 'T_DOC_COMMENT_STAR', + 'content' => '*', + ], + [ + 'type' => 'T_DOC_COMMENT_WHITESPACE', + 'content' => ' +', + ], + [ + 'type' => 'T_DOC_COMMENT_WHITESPACE', + 'content' => ' ', + ], + [ + 'type' => 'T_DOC_COMMENT_STAR', + 'content' => '*', + ], + [ + 'type' => 'T_DOC_COMMENT_WHITESPACE', + 'content' => ' ', + ], + [ + 'type' => 'T_DOC_COMMENT_TAG', + 'content' => '@tag', + ], + [ + 'type' => 'T_DOC_COMMENT_WHITESPACE', + 'content' => ' ', + ], + [ + 'type' => 'T_DOC_COMMENT_STRING', + 'content' => 'Comment', + ], + [ + 'type' => 'T_DOC_COMMENT_WHITESPACE', + 'content' => ' +', + ], + [ + 'type' => 'T_DOC_COMMENT_WHITESPACE', + 'content' => ' ', + ], + [ + 'type' => 'T_DOC_COMMENT_CLOSE_TAG', + 'content' => '*/', + ], + [ + 'type' => 'T_WHITESPACE', + 'content' => ' +', + ], + ], + ], + [ + '/* testMultiLineDocblockCommentWithAnnotation */', + [ + [ + 'type' => 'T_DOC_COMMENT_OPEN_TAG', + 'content' => '/**', + ], + [ + 'type' => 'T_DOC_COMMENT_WHITESPACE', + 'content' => ' +', + ], + [ + 'type' => 'T_DOC_COMMENT_WHITESPACE', + 'content' => ' ', + ], + [ + 'type' => 'T_DOC_COMMENT_STAR', + 'content' => '*', + ], + [ + 'type' => 'T_DOC_COMMENT_WHITESPACE', + 'content' => ' ', + ], + [ + 'type' => 'T_DOC_COMMENT_STRING', + 'content' => 'Comment', + ], + [ + 'type' => 'T_DOC_COMMENT_WHITESPACE', + 'content' => ' +', + ], + [ + 'type' => 'T_DOC_COMMENT_WHITESPACE', + 'content' => ' ', + ], + [ + 'type' => 'T_DOC_COMMENT_STAR', + 'content' => '*', + ], + [ + 'type' => 'T_DOC_COMMENT_WHITESPACE', + 'content' => ' +', + ], + [ + 'type' => 'T_DOC_COMMENT_WHITESPACE', + 'content' => ' ', + ], + [ + 'type' => 'T_DOC_COMMENT_STAR', + 'content' => '*', + ], + [ + 'type' => 'T_DOC_COMMENT_WHITESPACE', + 'content' => ' ', + ], + [ + 'type' => 'T_PHPCS_IGNORE', + 'content' => 'phpcs:ignore Stnd.Cat', + ], + [ + 'type' => 'T_DOC_COMMENT_WHITESPACE', + 'content' => ' +', + ], + [ + 'type' => 'T_DOC_COMMENT_WHITESPACE', + 'content' => ' ', + ], + [ + 'type' => 'T_DOC_COMMENT_STAR', + 'content' => '*', + ], + [ + 'type' => 'T_DOC_COMMENT_WHITESPACE', + 'content' => ' ', + ], + [ + 'type' => 'T_DOC_COMMENT_TAG', + 'content' => '@tag', + ], + [ + 'type' => 'T_DOC_COMMENT_WHITESPACE', + 'content' => ' ', + ], + [ + 'type' => 'T_DOC_COMMENT_STRING', + 'content' => 'Comment', + ], + [ + 'type' => 'T_DOC_COMMENT_WHITESPACE', + 'content' => ' +', + ], + [ + 'type' => 'T_DOC_COMMENT_WHITESPACE', + 'content' => ' ', + ], + [ + 'type' => 'T_DOC_COMMENT_CLOSE_TAG', + 'content' => '*/', + ], + [ + 'type' => 'T_WHITESPACE', + 'content' => ' +', + ], + ], + ], + [ + '/* testMultiLineDocblockCommentWithTagAnnotation */', + [ + [ + 'type' => 'T_DOC_COMMENT_OPEN_TAG', + 'content' => '/**', + ], + [ + 'type' => 'T_DOC_COMMENT_WHITESPACE', + 'content' => ' +', + ], + [ + 'type' => 'T_DOC_COMMENT_WHITESPACE', + 'content' => ' ', + ], + [ + 'type' => 'T_DOC_COMMENT_STAR', + 'content' => '*', + ], + [ + 'type' => 'T_DOC_COMMENT_WHITESPACE', + 'content' => ' ', + ], + [ + 'type' => 'T_DOC_COMMENT_STRING', + 'content' => 'Comment', + ], + [ + 'type' => 'T_DOC_COMMENT_WHITESPACE', + 'content' => ' +', + ], + [ + 'type' => 'T_DOC_COMMENT_WHITESPACE', + 'content' => ' ', + ], + [ + 'type' => 'T_DOC_COMMENT_STAR', + 'content' => '*', + ], + [ + 'type' => 'T_DOC_COMMENT_WHITESPACE', + 'content' => ' +', + ], + [ + 'type' => 'T_DOC_COMMENT_WHITESPACE', + 'content' => ' ', + ], + [ + 'type' => 'T_DOC_COMMENT_STAR', + 'content' => '*', + ], + [ + 'type' => 'T_DOC_COMMENT_WHITESPACE', + 'content' => ' ', + ], + [ + 'type' => 'T_PHPCS_IGNORE', + 'content' => '@phpcs:ignore Stnd.Cat', + ], + [ + 'type' => 'T_DOC_COMMENT_WHITESPACE', + 'content' => ' +', + ], + [ + 'type' => 'T_DOC_COMMENT_WHITESPACE', + 'content' => ' ', + ], + [ + 'type' => 'T_DOC_COMMENT_STAR', + 'content' => '*', + ], + [ + 'type' => 'T_DOC_COMMENT_WHITESPACE', + 'content' => ' ', + ], + [ + 'type' => 'T_DOC_COMMENT_TAG', + 'content' => '@tag', + ], + [ + 'type' => 'T_DOC_COMMENT_WHITESPACE', + 'content' => ' ', + ], + [ + 'type' => 'T_DOC_COMMENT_STRING', + 'content' => 'Comment', + ], + [ + 'type' => 'T_DOC_COMMENT_WHITESPACE', + 'content' => ' +', + ], + [ + 'type' => 'T_DOC_COMMENT_WHITESPACE', + 'content' => ' ', + ], + [ + 'type' => 'T_DOC_COMMENT_CLOSE_TAG', + 'content' => '*/', + ], + [ + 'type' => 'T_WHITESPACE', + 'content' => ' +', + ], + ], + ], + [ + '/* testSingleLineHashComment */', + [ + [ + 'type' => 'T_COMMENT', + 'content' => '# Comment +', + ], + [ + 'type' => 'T_WHITESPACE', + 'content' => ' +', + ], + ], + ], + [ + '/* testSingleLineHashCommentTrailing */', + [ + [ + 'type' => 'T_COMMENT', + 'content' => '# Comment +', + ], + [ + 'type' => 'T_WHITESPACE', + 'content' => ' +', + ], + ], + ], + [ + '/* testMultiLineHashComment */', + [ + [ + 'type' => 'T_COMMENT', + 'content' => '# Comment1 +', + ], + [ + 'type' => 'T_COMMENT', + 'content' => '# Comment2 +', + ], + [ + 'type' => 'T_COMMENT', + 'content' => '# Comment3 +', + ], + [ + 'type' => 'T_WHITESPACE', + 'content' => ' +', + ], + ], + ], + [ + '/* testMultiLineHashCommentWithIndent */', + [ + [ + 'type' => 'T_COMMENT', + 'content' => '# Comment1 +', + ], + [ + 'type' => 'T_WHITESPACE', + 'content' => ' ', + ], + [ + 'type' => 'T_COMMENT', + 'content' => '# Comment2 +', + ], + [ + 'type' => 'T_WHITESPACE', + 'content' => ' ', + ], + [ + 'type' => 'T_COMMENT', + 'content' => '# Comment3 +', + ], + [ + 'type' => 'T_WHITESPACE', + 'content' => ' +', + ], + ], + ], + [ + '/* testSingleLineSlashCommentNoNewLineAtEnd */', + [ + [ + 'type' => 'T_COMMENT', + 'content' => '// Slash ', + ], + [ + 'type' => 'T_CLOSE_TAG', + 'content' => '?> +', + ], + ], + ], + [ + '/* testSingleLineHashCommentNoNewLineAtEnd */', + [ + [ + 'type' => 'T_COMMENT', + 'content' => '# Hash ', + ], + [ + 'type' => 'T_CLOSE_TAG', + 'content' => '?> +', + ], + ], + ], + [ + '/* testCommentAtEndOfFile */', + [ + [ + 'type' => 'T_COMMENT', + 'content' => '/* Comment', + ], + ], + ], + ]; + + }//end dataCommentTokenization() + + +}//end class diff --git a/vendor/squizlabs/php_codesniffer/tests/Core/Tokenizer/StableCommentWhitespaceWinTest.inc b/vendor/squizlabs/php_codesniffer/tests/Core/Tokenizer/StableCommentWhitespaceWinTest.inc new file mode 100644 index 00000000..dc98eb01 --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/tests/Core/Tokenizer/StableCommentWhitespaceWinTest.inc @@ -0,0 +1,63 @@ + + + + * @copyright 2020 Squiz Pty Ltd (ABN 77 084 670 600) + * @license https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence + */ + +namespace PHP_CodeSniffer\Tests\Core\Tokenizer; + +use PHP_CodeSniffer\Tests\Core\AbstractMethodUnitTest; +use PHP_CodeSniffer\Util\Tokens; + +class StableCommentWhitespaceWinTest extends AbstractMethodUnitTest +{ + + + /** + * Test that comment tokenization with new lines at the end of the comment is stable. + * + * @param string $testMarker The comment prefacing the test. + * @param array $expectedTokens The tokenization expected. + * + * @dataProvider dataCommentTokenization + * @covers PHP_CodeSniffer\Tokenizers\PHP::tokenize + * + * @return void + */ + public function testCommentTokenization($testMarker, $expectedTokens) + { + $tokens = self::$phpcsFile->getTokens(); + $comment = $this->getTargetToken($testMarker, Tokens::$commentTokens); + + foreach ($expectedTokens as $key => $tokenInfo) { + $this->assertSame(constant($tokenInfo['type']), $tokens[$comment]['code']); + $this->assertSame($tokenInfo['type'], $tokens[$comment]['type']); + $this->assertSame($tokenInfo['content'], $tokens[$comment]['content']); + + ++$comment; + } + + }//end testCommentTokenization() + + + /** + * Data provider. + * + * @see testCommentTokenization() + * + * @return array + */ + public function dataCommentTokenization() + { + return [ + [ + '/* testSingleLineSlashComment */', + [ + [ + 'type' => 'T_COMMENT', + 'content' => '// Comment +', + ], + [ + 'type' => 'T_WHITESPACE', + 'content' => ' +', + ], + ], + ], + [ + '/* testSingleLineSlashCommentTrailing */', + [ + [ + 'type' => 'T_COMMENT', + 'content' => '// Comment +', + ], + [ + 'type' => 'T_WHITESPACE', + 'content' => ' +', + ], + ], + ], + [ + '/* testSingleLineSlashAnnotation */', + [ + [ + 'type' => 'T_PHPCS_DISABLE', + 'content' => '// phpcs:disable Stnd.Cat +', + ], + [ + 'type' => 'T_WHITESPACE', + 'content' => ' +', + ], + ], + ], + [ + '/* testMultiLineSlashComment */', + [ + [ + 'type' => 'T_COMMENT', + 'content' => '// Comment1 +', + ], + [ + 'type' => 'T_COMMENT', + 'content' => '// Comment2 +', + ], + [ + 'type' => 'T_COMMENT', + 'content' => '// Comment3 +', + ], + [ + 'type' => 'T_WHITESPACE', + 'content' => ' +', + ], + ], + ], + [ + '/* testMultiLineSlashCommentWithIndent */', + [ + [ + 'type' => 'T_COMMENT', + 'content' => '// Comment1 +', + ], + [ + 'type' => 'T_WHITESPACE', + 'content' => ' ', + ], + [ + 'type' => 'T_COMMENT', + 'content' => '// Comment2 +', + ], + [ + 'type' => 'T_WHITESPACE', + 'content' => ' ', + ], + [ + 'type' => 'T_COMMENT', + 'content' => '// Comment3 +', + ], + [ + 'type' => 'T_WHITESPACE', + 'content' => ' +', + ], + ], + ], + [ + '/* testMultiLineSlashCommentWithAnnotationStart */', + [ + [ + 'type' => 'T_PHPCS_IGNORE', + 'content' => '// phpcs:ignore Stnd.Cat +', + ], + [ + 'type' => 'T_COMMENT', + 'content' => '// Comment2 +', + ], + [ + 'type' => 'T_COMMENT', + 'content' => '// Comment3 +', + ], + [ + 'type' => 'T_WHITESPACE', + 'content' => ' +', + ], + ], + ], + [ + '/* testMultiLineSlashCommentWithAnnotationMiddle */', + [ + [ + 'type' => 'T_COMMENT', + 'content' => '// Comment1 +', + ], + [ + 'type' => 'T_PHPCS_IGNORE', + 'content' => '// @phpcs:ignore Stnd.Cat +', + ], + [ + 'type' => 'T_COMMENT', + 'content' => '// Comment3 +', + ], + [ + 'type' => 'T_WHITESPACE', + 'content' => ' +', + ], + ], + ], + [ + '/* testMultiLineSlashCommentWithAnnotationEnd */', + [ + [ + 'type' => 'T_COMMENT', + 'content' => '// Comment1 +', + ], + [ + 'type' => 'T_COMMENT', + 'content' => '// Comment2 +', + ], + [ + 'type' => 'T_PHPCS_IGNORE', + 'content' => '// phpcs:ignore Stnd.Cat +', + ], + [ + 'type' => 'T_WHITESPACE', + 'content' => ' +', + ], + ], + ], + [ + '/* testSingleLineSlashCommentNoNewLineAtEnd */', + [ + [ + 'type' => 'T_COMMENT', + 'content' => '// Slash ', + ], + [ + 'type' => 'T_CLOSE_TAG', + 'content' => '?> +', + ], + ], + ], + [ + '/* testSingleLineHashComment */', + [ + [ + 'type' => 'T_COMMENT', + 'content' => '# Comment +', + ], + [ + 'type' => 'T_WHITESPACE', + 'content' => ' +', + ], + ], + ], + [ + '/* testSingleLineHashCommentTrailing */', + [ + [ + 'type' => 'T_COMMENT', + 'content' => '# Comment +', + ], + [ + 'type' => 'T_WHITESPACE', + 'content' => ' +', + ], + ], + ], + [ + '/* testMultiLineHashComment */', + [ + [ + 'type' => 'T_COMMENT', + 'content' => '# Comment1 +', + ], + [ + 'type' => 'T_COMMENT', + 'content' => '# Comment2 +', + ], + [ + 'type' => 'T_COMMENT', + 'content' => '# Comment3 +', + ], + [ + 'type' => 'T_WHITESPACE', + 'content' => ' +', + ], + ], + ], + [ + '/* testMultiLineHashCommentWithIndent */', + [ + [ + 'type' => 'T_COMMENT', + 'content' => '# Comment1 +', + ], + [ + 'type' => 'T_WHITESPACE', + 'content' => ' ', + ], + [ + 'type' => 'T_COMMENT', + 'content' => '# Comment2 +', + ], + [ + 'type' => 'T_WHITESPACE', + 'content' => ' ', + ], + [ + 'type' => 'T_COMMENT', + 'content' => '# Comment3 +', + ], + [ + 'type' => 'T_WHITESPACE', + 'content' => ' +', + ], + ], + ], + [ + '/* testSingleLineHashCommentNoNewLineAtEnd */', + [ + [ + 'type' => 'T_COMMENT', + 'content' => '# Hash ', + ], + [ + 'type' => 'T_CLOSE_TAG', + 'content' => '?> +', + ], + ], + ], + [ + '/* testCommentAtEndOfFile */', + [ + [ + 'type' => 'T_COMMENT', + 'content' => '/* Comment', + ], + ], + ], + ]; + + }//end dataCommentTokenization() + + +}//end class diff --git a/vendor/squizlabs/php_codesniffer/tests/Core/Tokenizer/UndoNamespacedNameSingleTokenTest.inc b/vendor/squizlabs/php_codesniffer/tests/Core/Tokenizer/UndoNamespacedNameSingleTokenTest.inc new file mode 100644 index 00000000..540f72c9 --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/tests/Core/Tokenizer/UndoNamespacedNameSingleTokenTest.inc @@ -0,0 +1,147 @@ + + * @copyright 2020 Squiz Pty Ltd (ABN 77 084 670 600) + * @license https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence + */ + +namespace PHP_CodeSniffer\Tests\Core\Tokenizer; + +use PHP_CodeSniffer\Tests\Core\AbstractMethodUnitTest; + +class UndoNamespacedNameSingleTokenTest extends AbstractMethodUnitTest +{ + + + /** + * Test that identifier names are tokenized the same across PHP versions, based on the PHP 5/7 tokenization. + * + * @param string $testMarker The comment prefacing the test. + * @param array $expectedTokens The tokenization expected. + * + * @dataProvider dataIdentifierTokenization + * @covers PHP_CodeSniffer\Tokenizers\PHP::tokenize + * + * @return void + */ + public function testIdentifierTokenization($testMarker, $expectedTokens) + { + $tokens = self::$phpcsFile->getTokens(); + $identifier = $this->getTargetToken($testMarker, constant($expectedTokens[0]['type'])); + + foreach ($expectedTokens as $key => $tokenInfo) { + $this->assertSame(constant($tokenInfo['type']), $tokens[$identifier]['code']); + $this->assertSame($tokenInfo['type'], $tokens[$identifier]['type']); + $this->assertSame($tokenInfo['content'], $tokens[$identifier]['content']); + + ++$identifier; + } + + }//end testIdentifierTokenization() + + + /** + * Data provider. + * + * @see testIdentifierTokenization() + * + * @return array + */ + public function dataIdentifierTokenization() + { + return [ + [ + '/* testNamespaceDeclaration */', + [ + [ + 'type' => 'T_STRING', + 'content' => 'Package', + ], + [ + 'type' => 'T_SEMICOLON', + 'content' => ';', + ], + ], + ], + [ + '/* testNamespaceDeclarationWithLevels */', + [ + [ + 'type' => 'T_STRING', + 'content' => 'Vendor', + ], + [ + 'type' => 'T_NS_SEPARATOR', + 'content' => '\\', + ], + [ + 'type' => 'T_STRING', + 'content' => 'SubLevel', + ], + [ + 'type' => 'T_NS_SEPARATOR', + 'content' => '\\', + ], + [ + 'type' => 'T_STRING', + 'content' => 'Domain', + ], + [ + 'type' => 'T_SEMICOLON', + 'content' => ';', + ], + ], + ], + [ + '/* testUseStatement */', + [ + [ + 'type' => 'T_STRING', + 'content' => 'ClassName', + ], + [ + 'type' => 'T_SEMICOLON', + 'content' => ';', + ], + ], + ], + [ + '/* testUseStatementWithLevels */', + [ + [ + 'type' => 'T_STRING', + 'content' => 'Vendor', + ], + [ + 'type' => 'T_NS_SEPARATOR', + 'content' => '\\', + ], + [ + 'type' => 'T_STRING', + 'content' => 'Level', + ], + [ + 'type' => 'T_NS_SEPARATOR', + 'content' => '\\', + ], + [ + 'type' => 'T_STRING', + 'content' => 'Domain', + ], + [ + 'type' => 'T_SEMICOLON', + 'content' => ';', + ], + ], + ], + [ + '/* testFunctionUseStatement */', + [ + [ + 'type' => 'T_STRING', + 'content' => 'function', + ], + [ + 'type' => 'T_WHITESPACE', + 'content' => ' ', + ], + [ + 'type' => 'T_STRING', + 'content' => 'function_name', + ], + [ + 'type' => 'T_SEMICOLON', + 'content' => ';', + ], + ], + ], + [ + '/* testFunctionUseStatementWithLevels */', + [ + [ + 'type' => 'T_STRING', + 'content' => 'function', + ], + [ + 'type' => 'T_WHITESPACE', + 'content' => ' ', + ], + [ + 'type' => 'T_STRING', + 'content' => 'Vendor', + ], + [ + 'type' => 'T_NS_SEPARATOR', + 'content' => '\\', + ], + [ + 'type' => 'T_STRING', + 'content' => 'Level', + ], + [ + 'type' => 'T_NS_SEPARATOR', + 'content' => '\\', + ], + [ + 'type' => 'T_STRING', + 'content' => 'function_in_ns', + ], + [ + 'type' => 'T_SEMICOLON', + 'content' => ';', + ], + ], + ], + [ + '/* testConstantUseStatement */', + [ + [ + 'type' => 'T_STRING', + 'content' => 'const', + ], + [ + 'type' => 'T_WHITESPACE', + 'content' => ' ', + ], + [ + 'type' => 'T_STRING', + 'content' => 'CONSTANT_NAME', + ], + [ + 'type' => 'T_SEMICOLON', + 'content' => ';', + ], + ], + ], + [ + '/* testConstantUseStatementWithLevels */', + [ + [ + 'type' => 'T_STRING', + 'content' => 'const', + ], + [ + 'type' => 'T_WHITESPACE', + 'content' => ' ', + ], + [ + 'type' => 'T_STRING', + 'content' => 'Vendor', + ], + [ + 'type' => 'T_NS_SEPARATOR', + 'content' => '\\', + ], + [ + 'type' => 'T_STRING', + 'content' => 'Level', + ], + [ + 'type' => 'T_NS_SEPARATOR', + 'content' => '\\', + ], + [ + 'type' => 'T_STRING', + 'content' => 'OTHER_CONSTANT', + ], + [ + 'type' => 'T_SEMICOLON', + 'content' => ';', + ], + ], + ], + [ + '/* testMultiUseUnqualified */', + [ + [ + 'type' => 'T_STRING', + 'content' => 'UnqualifiedClassName', + ], + [ + 'type' => 'T_COMMA', + 'content' => ',', + ], + ], + ], + [ + '/* testMultiUsePartiallyQualified */', + [ + [ + 'type' => 'T_STRING', + 'content' => 'Sublevel', + ], + [ + 'type' => 'T_NS_SEPARATOR', + 'content' => '\\', + ], + [ + 'type' => 'T_STRING', + 'content' => 'PartiallyClassName', + ], + [ + 'type' => 'T_SEMICOLON', + 'content' => ';', + ], + ], + ], + [ + '/* testGroupUseStatement */', + [ + [ + 'type' => 'T_STRING', + 'content' => 'Vendor', + ], + [ + 'type' => 'T_NS_SEPARATOR', + 'content' => '\\', + ], + [ + 'type' => 'T_STRING', + 'content' => 'Level', + ], + [ + 'type' => 'T_NS_SEPARATOR', + 'content' => '\\', + ], + [ + 'type' => 'T_OPEN_USE_GROUP', + 'content' => '{', + ], + [ + 'type' => 'T_WHITESPACE', + 'content' => ' +', + ], + [ + 'type' => 'T_WHITESPACE', + 'content' => ' ', + ], + [ + 'type' => 'T_STRING', + 'content' => 'AnotherDomain', + ], + [ + 'type' => 'T_COMMA', + 'content' => ',', + ], + [ + 'type' => 'T_WHITESPACE', + 'content' => ' +', + ], + [ + 'type' => 'T_WHITESPACE', + 'content' => ' ', + ], + [ + 'type' => 'T_STRING', + 'content' => 'function', + ], + [ + 'type' => 'T_WHITESPACE', + 'content' => ' ', + ], + [ + 'type' => 'T_STRING', + 'content' => 'function_grouped', + ], + [ + 'type' => 'T_COMMA', + 'content' => ',', + ], + [ + 'type' => 'T_WHITESPACE', + 'content' => ' +', + ], + [ + 'type' => 'T_WHITESPACE', + 'content' => ' ', + ], + [ + 'type' => 'T_STRING', + 'content' => 'const', + ], + [ + 'type' => 'T_WHITESPACE', + 'content' => ' ', + ], + [ + 'type' => 'T_STRING', + 'content' => 'CONSTANT_GROUPED', + ], + [ + 'type' => 'T_COMMA', + 'content' => ',', + ], + [ + 'type' => 'T_WHITESPACE', + 'content' => ' +', + ], + [ + 'type' => 'T_WHITESPACE', + 'content' => ' ', + ], + [ + 'type' => 'T_STRING', + 'content' => 'Sub', + ], + [ + 'type' => 'T_NS_SEPARATOR', + 'content' => '\\', + ], + [ + 'type' => 'T_STRING', + 'content' => 'YetAnotherDomain', + ], + [ + 'type' => 'T_COMMA', + 'content' => ',', + ], + [ + 'type' => 'T_WHITESPACE', + 'content' => ' +', + ], + [ + 'type' => 'T_WHITESPACE', + 'content' => ' ', + ], + [ + 'type' => 'T_STRING', + 'content' => 'function', + ], + [ + 'type' => 'T_WHITESPACE', + 'content' => ' ', + ], + [ + 'type' => 'T_STRING', + 'content' => 'SubLevelA', + ], + [ + 'type' => 'T_NS_SEPARATOR', + 'content' => '\\', + ], + [ + 'type' => 'T_STRING', + 'content' => 'function_grouped_too', + ], + [ + 'type' => 'T_COMMA', + 'content' => ',', + ], + [ + 'type' => 'T_WHITESPACE', + 'content' => ' +', + ], + [ + 'type' => 'T_WHITESPACE', + 'content' => ' ', + ], + [ + 'type' => 'T_STRING', + 'content' => 'const', + ], + [ + 'type' => 'T_WHITESPACE', + 'content' => ' ', + ], + [ + 'type' => 'T_STRING', + 'content' => 'SubLevelB', + ], + [ + 'type' => 'T_NS_SEPARATOR', + 'content' => '\\', + ], + [ + 'type' => 'T_STRING', + 'content' => 'CONSTANT_GROUPED_TOO', + ], + [ + 'type' => 'T_COMMA', + 'content' => ',', + ], + [ + 'type' => 'T_WHITESPACE', + 'content' => ' +', + ], + [ + 'type' => 'T_CLOSE_USE_GROUP', + 'content' => '}', + ], + [ + 'type' => 'T_SEMICOLON', + 'content' => ';', + ], + ], + ], + [ + '/* testClassName */', + [ + [ + 'type' => 'T_STRING', + 'content' => 'MyClass', + ], + [ + 'type' => 'T_WHITESPACE', + 'content' => ' +', + ], + ], + ], + [ + '/* testExtendedFQN */', + [ + [ + 'type' => 'T_NS_SEPARATOR', + 'content' => '\\', + ], + [ + 'type' => 'T_STRING', + 'content' => 'Vendor', + ], + [ + 'type' => 'T_NS_SEPARATOR', + 'content' => '\\', + ], + [ + 'type' => 'T_STRING', + 'content' => 'Level', + ], + [ + 'type' => 'T_NS_SEPARATOR', + 'content' => '\\', + ], + [ + 'type' => 'T_STRING', + 'content' => 'FQN', + ], + [ + 'type' => 'T_WHITESPACE', + 'content' => ' +', + ], + ], + ], + [ + '/* testImplementsRelative */', + [ + [ + 'type' => 'T_NAMESPACE', + 'content' => 'namespace', + ], + [ + 'type' => 'T_NS_SEPARATOR', + 'content' => '\\', + ], + [ + 'type' => 'T_STRING', + 'content' => 'Name', + ], + [ + 'type' => 'T_COMMA', + 'content' => ',', + ], + ], + ], + [ + '/* testImplementsFQN */', + [ + [ + 'type' => 'T_NS_SEPARATOR', + 'content' => '\\', + ], + [ + 'type' => 'T_STRING', + 'content' => 'Fully', + ], + [ + 'type' => 'T_NS_SEPARATOR', + 'content' => '\\', + ], + [ + 'type' => 'T_STRING', + 'content' => 'Qualified', + ], + [ + 'type' => 'T_COMMA', + 'content' => ',', + ], + ], + ], + [ + '/* testImplementsUnqualified */', + [ + [ + 'type' => 'T_STRING', + 'content' => 'Unqualified', + ], + [ + 'type' => 'T_COMMA', + 'content' => ',', + ], + ], + ], + [ + '/* testImplementsPartiallyQualified */', + [ + [ + 'type' => 'T_STRING', + 'content' => 'Sub', + ], + [ + 'type' => 'T_NS_SEPARATOR', + 'content' => '\\', + ], + [ + 'type' => 'T_STRING', + 'content' => 'Level', + ], + [ + 'type' => 'T_NS_SEPARATOR', + 'content' => '\\', + ], + [ + 'type' => 'T_STRING', + 'content' => 'Name', + ], + [ + 'type' => 'T_WHITESPACE', + 'content' => ' +', + ], + ], + ], + [ + '/* testFunctionName */', + [ + [ + 'type' => 'T_STRING', + 'content' => 'function_name', + ], + [ + 'type' => 'T_OPEN_PARENTHESIS', + 'content' => '(', + ], + ], + ], + [ + '/* testTypeDeclarationRelative */', + [ + [ + 'type' => 'T_NAMESPACE', + 'content' => 'namespace', + ], + [ + 'type' => 'T_NS_SEPARATOR', + 'content' => '\\', + ], + [ + 'type' => 'T_STRING', + 'content' => 'Name', + ], + [ + 'type' => 'T_TYPE_UNION', + 'content' => '|', + ], + [ + 'type' => 'T_STRING', + 'content' => 'object', + ], + ], + ], + [ + '/* testTypeDeclarationFQN */', + [ + [ + 'type' => 'T_NS_SEPARATOR', + 'content' => '\\', + ], + [ + 'type' => 'T_STRING', + 'content' => 'Fully', + ], + [ + 'type' => 'T_NS_SEPARATOR', + 'content' => '\\', + ], + [ + 'type' => 'T_STRING', + 'content' => 'Qualified', + ], + [ + 'type' => 'T_NS_SEPARATOR', + 'content' => '\\', + ], + [ + 'type' => 'T_STRING', + 'content' => 'Name', + ], + [ + 'type' => 'T_WHITESPACE', + 'content' => ' ', + ], + ], + ], + [ + '/* testTypeDeclarationUnqualified */', + [ + [ + 'type' => 'T_STRING', + 'content' => 'Unqualified', + ], + [ + 'type' => 'T_TYPE_UNION', + 'content' => '|', + ], + [ + 'type' => 'T_FALSE', + 'content' => 'false', + ], + ], + ], + [ + '/* testTypeDeclarationPartiallyQualified */', + [ + [ + 'type' => 'T_NULLABLE', + 'content' => '?', + ], + [ + 'type' => 'T_STRING', + 'content' => 'Sublevel', + ], + [ + 'type' => 'T_NS_SEPARATOR', + 'content' => '\\', + ], + [ + 'type' => 'T_STRING', + 'content' => 'Name', + ], + [ + 'type' => 'T_WHITESPACE', + 'content' => ' ', + ], + ], + ], + [ + '/* testReturnTypeFQN */', + [ + [ + 'type' => 'T_NULLABLE', + 'content' => '?', + ], + [ + 'type' => 'T_NS_SEPARATOR', + 'content' => '\\', + ], + [ + 'type' => 'T_STRING', + 'content' => 'Name', + ], + [ + 'type' => 'T_WHITESPACE', + 'content' => ' ', + ], + ], + ], + [ + '/* testFunctionCallRelative */', + [ + [ + 'type' => 'T_NAMESPACE', + 'content' => 'NameSpace', + ], + [ + 'type' => 'T_NS_SEPARATOR', + 'content' => '\\', + ], + [ + 'type' => 'T_STRING', + 'content' => 'function_name', + ], + [ + 'type' => 'T_OPEN_PARENTHESIS', + 'content' => '(', + ], + ], + ], + [ + '/* testFunctionCallFQN */', + [ + [ + 'type' => 'T_NS_SEPARATOR', + 'content' => '\\', + ], + [ + 'type' => 'T_STRING', + 'content' => 'Vendor', + ], + [ + 'type' => 'T_NS_SEPARATOR', + 'content' => '\\', + ], + [ + 'type' => 'T_STRING', + 'content' => 'Package', + ], + [ + 'type' => 'T_NS_SEPARATOR', + 'content' => '\\', + ], + [ + 'type' => 'T_STRING', + 'content' => 'function_name', + ], + [ + 'type' => 'T_OPEN_PARENTHESIS', + 'content' => '(', + ], + ], + ], + [ + '/* testFunctionCallUnqualified */', + [ + [ + 'type' => 'T_STRING', + 'content' => 'function_name', + ], + [ + 'type' => 'T_OPEN_PARENTHESIS', + 'content' => '(', + ], + ], + ], + [ + '/* testFunctionPartiallyQualified */', + [ + [ + 'type' => 'T_STRING', + 'content' => 'Level', + ], + [ + 'type' => 'T_NS_SEPARATOR', + 'content' => '\\', + ], + [ + 'type' => 'T_STRING', + 'content' => 'function_name', + ], + [ + 'type' => 'T_OPEN_PARENTHESIS', + 'content' => '(', + ], + ], + ], + [ + '/* testCatchRelative */', + [ + [ + 'type' => 'T_NAMESPACE', + 'content' => 'namespace', + ], + [ + 'type' => 'T_NS_SEPARATOR', + 'content' => '\\', + ], + [ + 'type' => 'T_STRING', + 'content' => 'SubLevel', + ], + [ + 'type' => 'T_NS_SEPARATOR', + 'content' => '\\', + ], + [ + 'type' => 'T_STRING', + 'content' => 'Exception', + ], + [ + 'type' => 'T_WHITESPACE', + 'content' => ' ', + ], + ], + ], + [ + '/* testCatchFQN */', + [ + [ + 'type' => 'T_NS_SEPARATOR', + 'content' => '\\', + ], + [ + 'type' => 'T_STRING', + 'content' => 'Exception', + ], + [ + 'type' => 'T_WHITESPACE', + 'content' => ' ', + ], + ], + ], + [ + '/* testCatchUnqualified */', + [ + [ + 'type' => 'T_STRING', + 'content' => 'Exception', + ], + [ + 'type' => 'T_WHITESPACE', + 'content' => ' ', + ], + ], + ], + [ + '/* testCatchPartiallyQualified */', + [ + [ + 'type' => 'T_STRING', + 'content' => 'Level', + ], + [ + 'type' => 'T_NS_SEPARATOR', + 'content' => '\\', + ], + [ + 'type' => 'T_STRING', + 'content' => 'Exception', + ], + [ + 'type' => 'T_WHITESPACE', + 'content' => ' ', + ], + ], + ], + [ + '/* testNewRelative */', + [ + [ + 'type' => 'T_NAMESPACE', + 'content' => 'namespace', + ], + [ + 'type' => 'T_NS_SEPARATOR', + 'content' => '\\', + ], + [ + 'type' => 'T_STRING', + 'content' => 'ClassName', + ], + [ + 'type' => 'T_OPEN_PARENTHESIS', + 'content' => '(', + ], + ], + ], + [ + '/* testNewFQN */', + [ + [ + 'type' => 'T_NS_SEPARATOR', + 'content' => '\\', + ], + [ + 'type' => 'T_STRING', + 'content' => 'Vendor', + ], + [ + 'type' => 'T_NS_SEPARATOR', + 'content' => '\\', + ], + [ + 'type' => 'T_STRING', + 'content' => 'ClassName', + ], + [ + 'type' => 'T_OPEN_PARENTHESIS', + 'content' => '(', + ], + ], + ], + [ + '/* testNewUnqualified */', + [ + [ + 'type' => 'T_STRING', + 'content' => 'ClassName', + ], + [ + 'type' => 'T_SEMICOLON', + 'content' => ';', + ], + ], + ], + [ + '/* testNewPartiallyQualified */', + [ + [ + 'type' => 'T_STRING', + 'content' => 'Level', + ], + [ + 'type' => 'T_NS_SEPARATOR', + 'content' => '\\', + ], + [ + 'type' => 'T_STRING', + 'content' => 'ClassName', + ], + [ + 'type' => 'T_SEMICOLON', + 'content' => ';', + ], + ], + ], + [ + '/* testDoubleColonRelative */', + [ + [ + 'type' => 'T_NAMESPACE', + 'content' => 'namespace', + ], + [ + 'type' => 'T_NS_SEPARATOR', + 'content' => '\\', + ], + [ + 'type' => 'T_STRING', + 'content' => 'ClassName', + ], + [ + 'type' => 'T_DOUBLE_COLON', + 'content' => '::', + ], + ], + ], + [ + '/* testDoubleColonFQN */', + [ + [ + 'type' => 'T_NS_SEPARATOR', + 'content' => '\\', + ], + [ + 'type' => 'T_STRING', + 'content' => 'ClassName', + ], + [ + 'type' => 'T_DOUBLE_COLON', + 'content' => '::', + ], + ], + ], + [ + '/* testDoubleColonUnqualified */', + [ + [ + 'type' => 'T_STRING', + 'content' => 'ClassName', + ], + [ + 'type' => 'T_DOUBLE_COLON', + 'content' => '::', + ], + ], + ], + [ + '/* testDoubleColonPartiallyQualified */', + [ + [ + 'type' => 'T_STRING', + 'content' => 'Level', + ], + [ + 'type' => 'T_NS_SEPARATOR', + 'content' => '\\', + ], + [ + 'type' => 'T_STRING', + 'content' => 'ClassName', + ], + [ + 'type' => 'T_DOUBLE_COLON', + 'content' => '::', + ], + ], + ], + [ + '/* testInstanceOfRelative */', + [ + [ + 'type' => 'T_NAMESPACE', + 'content' => 'namespace', + ], + [ + 'type' => 'T_NS_SEPARATOR', + 'content' => '\\', + ], + [ + 'type' => 'T_STRING', + 'content' => 'ClassName', + ], + [ + 'type' => 'T_SEMICOLON', + 'content' => ';', + ], + ], + ], + [ + '/* testInstanceOfFQN */', + [ + [ + 'type' => 'T_NS_SEPARATOR', + 'content' => '\\', + ], + [ + 'type' => 'T_STRING', + 'content' => 'Full', + ], + [ + 'type' => 'T_NS_SEPARATOR', + 'content' => '\\', + ], + [ + 'type' => 'T_STRING', + 'content' => 'ClassName', + ], + [ + 'type' => 'T_CLOSE_PARENTHESIS', + 'content' => ')', + ], + ], + ], + [ + '/* testInstanceOfUnqualified */', + [ + [ + 'type' => 'T_STRING', + 'content' => 'ClassName', + ], + [ + 'type' => 'T_WHITESPACE', + 'content' => ' ', + ], + ], + ], + [ + '/* testInstanceOfPartiallyQualified */', + [ + [ + 'type' => 'T_STRING', + 'content' => 'Partially', + ], + [ + 'type' => 'T_NS_SEPARATOR', + 'content' => '\\', + ], + [ + 'type' => 'T_STRING', + 'content' => 'ClassName', + ], + [ + 'type' => 'T_SEMICOLON', + 'content' => ';', + ], + ], + ], + [ + '/* testInvalidInPHP8Whitespace */', + [ + [ + 'type' => 'T_NAMESPACE', + 'content' => 'namespace', + ], + [ + 'type' => 'T_WHITESPACE', + 'content' => ' ', + ], + [ + 'type' => 'T_NS_SEPARATOR', + 'content' => '\\', + ], + [ + 'type' => 'T_WHITESPACE', + 'content' => ' ', + ], + [ + 'type' => 'T_STRING', + 'content' => 'Sublevel', + ], + [ + 'type' => 'T_WHITESPACE', + 'content' => ' +', + ], + [ + 'type' => 'T_WHITESPACE', + 'content' => ' ', + ], + [ + 'type' => 'T_NS_SEPARATOR', + 'content' => '\\', + ], + [ + 'type' => 'T_WHITESPACE', + 'content' => ' ', + ], + [ + 'type' => 'T_STRING', + 'content' => 'function_name', + ], + [ + 'type' => 'T_OPEN_PARENTHESIS', + 'content' => '(', + ], + ], + ], + [ + '/* testInvalidInPHP8Comments */', + [ + [ + 'type' => 'T_NS_SEPARATOR', + 'content' => '\\', + ], + [ + 'type' => 'T_STRING', + 'content' => 'Fully', + ], + [ + 'type' => 'T_WHITESPACE', + 'content' => ' +', + ], + [ + 'type' => 'T_WHITESPACE', + 'content' => ' ', + ], + [ + 'type' => 'T_PHPCS_IGNORE', + 'content' => '// phpcs:ignore Stnd.Cat.Sniff -- for reasons +', + ], + [ + 'type' => 'T_WHITESPACE', + 'content' => ' ', + ], + [ + 'type' => 'T_NS_SEPARATOR', + 'content' => '\\', + ], + [ + 'type' => 'T_STRING', + 'content' => 'Qualified', + ], + [ + 'type' => 'T_WHITESPACE', + 'content' => ' +', + ], + [ + 'type' => 'T_WHITESPACE', + 'content' => ' ', + ], + [ + 'type' => 'T_COMMENT', + 'content' => '/* comment */', + ], + [ + 'type' => 'T_WHITESPACE', + 'content' => ' +', + ], + [ + 'type' => 'T_WHITESPACE', + 'content' => ' ', + ], + [ + 'type' => 'T_NS_SEPARATOR', + 'content' => '\\', + ], + [ + 'type' => 'T_STRING', + 'content' => 'Name', + ], + [ + 'type' => 'T_WHITESPACE', + 'content' => ' +', + ], + ], + ], + ]; + + }//end dataIdentifierTokenization() + + +}//end class diff --git a/vendor/squizlabs/php_codesniffer/tests/FileList.php b/vendor/squizlabs/php_codesniffer/tests/FileList.php new file mode 100644 index 00000000..8ef57b7a --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/tests/FileList.php @@ -0,0 +1,94 @@ + + * @copyright 2019 Juliette Reinders Folmer. All rights reserved. + * @license https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence + */ + +namespace PHP_CodeSniffer\Tests; + +class FileList +{ + + /** + * The path to the project root directory. + * + * @var string + */ + protected $rootPath; + + /** + * Recursive directory iterator. + * + * @var \DirectoryIterator + */ + public $fileIterator; + + /** + * Base regex to use if no filter regex is provided. + * + * Matches based on: + * - File path starts with the project root (replacement done in constructor). + * - Don't match .git/ files. + * - Don't match dot files, i.e. "." or "..". + * - Don't match backup files. + * - Match everything else in a case-insensitive manner. + * + * @var string + */ + private $baseRegex = '`^%s(?!\.git/)(?!(.*/)?\.+$)(?!.*\.(bak|orig)).*$`Dix'; + + + /** + * Constructor. + * + * @param string $directory The directory to examine. + * @param string $rootPath Path to the project root. + * @param string $filter PCRE regular expression to filter the file list with. + */ + public function __construct($directory, $rootPath='', $filter='') + { + $this->rootPath = $rootPath; + + $directory = new \RecursiveDirectoryIterator( + $directory, + \RecursiveDirectoryIterator::UNIX_PATHS + ); + $flattened = new \RecursiveIteratorIterator( + $directory, + \RecursiveIteratorIterator::LEAVES_ONLY, + \RecursiveIteratorIterator::CATCH_GET_CHILD + ); + + if ($filter === '') { + $filter = sprintf($this->baseRegex, preg_quote($this->rootPath)); + } + + $this->fileIterator = new \RegexIterator($flattened, $filter); + + return $this; + + }//end __construct() + + + /** + * Retrieve the filtered file list as an array. + * + * @return array + */ + public function getList() + { + $fileList = []; + + foreach ($this->fileIterator as $file) { + $fileList[] = str_replace($this->rootPath, '', $file); + } + + return $fileList; + + }//end getList() + + +}//end class diff --git a/vendor/squizlabs/php_codesniffer/tests/Standards/AbstractSniffUnitTest.php b/vendor/squizlabs/php_codesniffer/tests/Standards/AbstractSniffUnitTest.php new file mode 100644 index 00000000..c050a0c2 --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/tests/Standards/AbstractSniffUnitTest.php @@ -0,0 +1,461 @@ + + * @copyright 2006-2015 Squiz Pty Ltd (ABN 77 084 670 600) + * @license https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence + */ + +namespace PHP_CodeSniffer\Tests\Standards; + +use PHP_CodeSniffer\Config; +use PHP_CodeSniffer\Exceptions\RuntimeException; +use PHP_CodeSniffer\Ruleset; +use PHP_CodeSniffer\Files\LocalFile; +use PHP_CodeSniffer\Util\Common; +use PHPUnit\Framework\TestCase; + +abstract class AbstractSniffUnitTest extends TestCase +{ + + /** + * Enable or disable the backup and restoration of the $GLOBALS array. + * Overwrite this attribute in a child class of TestCase. + * Setting this attribute in setUp() has no effect! + * + * @var boolean + */ + protected $backupGlobals = false; + + /** + * The path to the standard's main directory. + * + * @var string + */ + public $standardsDir = null; + + /** + * The path to the standard's test directory. + * + * @var string + */ + public $testsDir = null; + + + /** + * Sets up this unit test. + * + * @return void + */ + protected function setUp() + { + $class = get_class($this); + $this->standardsDir = $GLOBALS['PHP_CODESNIFFER_STANDARD_DIRS'][$class]; + $this->testsDir = $GLOBALS['PHP_CODESNIFFER_TEST_DIRS'][$class]; + + }//end setUp() + + + /** + * Get a list of all test files to check. + * + * These will have the same base as the sniff name but different extensions. + * We ignore the .php file as it is the class. + * + * @param string $testFileBase The base path that the unit tests files will have. + * + * @return string[] + */ + protected function getTestFiles($testFileBase) + { + $testFiles = []; + + $dir = substr($testFileBase, 0, strrpos($testFileBase, DIRECTORY_SEPARATOR)); + $di = new \DirectoryIterator($dir); + + foreach ($di as $file) { + $path = $file->getPathname(); + if (substr($path, 0, strlen($testFileBase)) === $testFileBase) { + if ($path !== $testFileBase.'php' && substr($path, -5) !== 'fixed' && substr($path, -4) !== '.bak') { + $testFiles[] = $path; + } + } + } + + // Put them in order. + sort($testFiles); + + return $testFiles; + + }//end getTestFiles() + + + /** + * Should this test be skipped for some reason. + * + * @return boolean + */ + protected function shouldSkipTest() + { + return false; + + }//end shouldSkipTest() + + + /** + * Tests the extending classes Sniff class. + * + * @return void + * @throws \PHPUnit\Framework\Exception + */ + final public function testSniff() + { + // Skip this test if we can't run in this environment. + if ($this->shouldSkipTest() === true) { + $this->markTestSkipped(); + } + + $sniffCode = Common::getSniffCode(get_class($this)); + list($standardName, $categoryName, $sniffName) = explode('.', $sniffCode); + + $testFileBase = $this->testsDir.$categoryName.DIRECTORY_SEPARATOR.$sniffName.'UnitTest.'; + + // Get a list of all test files to check. + $testFiles = $this->getTestFiles($testFileBase); + $GLOBALS['PHP_CODESNIFFER_SNIFF_CASE_FILES'][] = $testFiles; + + if (isset($GLOBALS['PHP_CODESNIFFER_CONFIG']) === true) { + $config = $GLOBALS['PHP_CODESNIFFER_CONFIG']; + } else { + $config = new Config(); + $config->cache = false; + $GLOBALS['PHP_CODESNIFFER_CONFIG'] = $config; + } + + $config->standards = [$standardName]; + $config->sniffs = [$sniffCode]; + $config->ignored = []; + + if (isset($GLOBALS['PHP_CODESNIFFER_RULESETS']) === false) { + $GLOBALS['PHP_CODESNIFFER_RULESETS'] = []; + } + + if (isset($GLOBALS['PHP_CODESNIFFER_RULESETS'][$standardName]) === false) { + $ruleset = new Ruleset($config); + $GLOBALS['PHP_CODESNIFFER_RULESETS'][$standardName] = $ruleset; + } + + $ruleset = $GLOBALS['PHP_CODESNIFFER_RULESETS'][$standardName]; + + $sniffFile = $this->standardsDir.DIRECTORY_SEPARATOR.'Sniffs'.DIRECTORY_SEPARATOR.$categoryName.DIRECTORY_SEPARATOR.$sniffName.'Sniff.php'; + + $sniffClassName = substr(get_class($this), 0, -8).'Sniff'; + $sniffClassName = str_replace('\Tests\\', '\Sniffs\\', $sniffClassName); + $sniffClassName = Common::cleanSniffClass($sniffClassName); + + $restrictions = [strtolower($sniffClassName) => true]; + $ruleset->registerSniffs([$sniffFile], $restrictions, []); + $ruleset->populateTokenListeners(); + + $failureMessages = []; + foreach ($testFiles as $testFile) { + $filename = basename($testFile); + $oldConfig = $config->getSettings(); + + try { + $this->setCliValues($filename, $config); + $phpcsFile = new LocalFile($testFile, $ruleset, $config); + $phpcsFile->process(); + } catch (RuntimeException $e) { + $this->fail('An unexpected exception has been caught: '.$e->getMessage()); + } + + $failures = $this->generateFailureMessages($phpcsFile); + $failureMessages = array_merge($failureMessages, $failures); + + if ($phpcsFile->getFixableCount() > 0) { + // Attempt to fix the errors. + $phpcsFile->fixer->fixFile(); + $fixable = $phpcsFile->getFixableCount(); + if ($fixable > 0) { + $failureMessages[] = "Failed to fix $fixable fixable violations in $filename"; + } + + // Check for a .fixed file to check for accuracy of fixes. + $fixedFile = $testFile.'.fixed'; + if (file_exists($fixedFile) === true) { + $diff = $phpcsFile->fixer->generateDiff($fixedFile); + if (trim($diff) !== '') { + $filename = basename($testFile); + $fixedFilename = basename($fixedFile); + $failureMessages[] = "Fixed version of $filename does not match expected version in $fixedFilename; the diff is\n$diff"; + } + } + } + + // Restore the config. + $config->setSettings($oldConfig); + }//end foreach + + if (empty($failureMessages) === false) { + $this->fail(implode(PHP_EOL, $failureMessages)); + } + + }//end testSniff() + + + /** + * Generate a list of test failures for a given sniffed file. + * + * @param \PHP_CodeSniffer\Files\LocalFile $file The file being tested. + * + * @return array + * @throws \PHP_CodeSniffer\Exceptions\RuntimeException + */ + public function generateFailureMessages(LocalFile $file) + { + $testFile = $file->getFilename(); + + $foundErrors = $file->getErrors(); + $foundWarnings = $file->getWarnings(); + $expectedErrors = $this->getErrorList(basename($testFile)); + $expectedWarnings = $this->getWarningList(basename($testFile)); + + if (is_array($expectedErrors) === false) { + throw new RuntimeException('getErrorList() must return an array'); + } + + if (is_array($expectedWarnings) === false) { + throw new RuntimeException('getWarningList() must return an array'); + } + + /* + We merge errors and warnings together to make it easier + to iterate over them and produce the errors string. In this way, + we can report on errors and warnings in the same line even though + it's not really structured to allow that. + */ + + $allProblems = []; + $failureMessages = []; + + foreach ($foundErrors as $line => $lineErrors) { + foreach ($lineErrors as $column => $errors) { + if (isset($allProblems[$line]) === false) { + $allProblems[$line] = [ + 'expected_errors' => 0, + 'expected_warnings' => 0, + 'found_errors' => [], + 'found_warnings' => [], + ]; + } + + $foundErrorsTemp = []; + foreach ($allProblems[$line]['found_errors'] as $foundError) { + $foundErrorsTemp[] = $foundError; + } + + $errorsTemp = []; + foreach ($errors as $foundError) { + $errorsTemp[] = $foundError['message'].' ('.$foundError['source'].')'; + + $source = $foundError['source']; + if (in_array($source, $GLOBALS['PHP_CODESNIFFER_SNIFF_CODES'], true) === false) { + $GLOBALS['PHP_CODESNIFFER_SNIFF_CODES'][] = $source; + } + + if ($foundError['fixable'] === true + && in_array($source, $GLOBALS['PHP_CODESNIFFER_FIXABLE_CODES'], true) === false + ) { + $GLOBALS['PHP_CODESNIFFER_FIXABLE_CODES'][] = $source; + } + } + + $allProblems[$line]['found_errors'] = array_merge($foundErrorsTemp, $errorsTemp); + }//end foreach + + if (isset($expectedErrors[$line]) === true) { + $allProblems[$line]['expected_errors'] = $expectedErrors[$line]; + } else { + $allProblems[$line]['expected_errors'] = 0; + } + + unset($expectedErrors[$line]); + }//end foreach + + foreach ($expectedErrors as $line => $numErrors) { + if (isset($allProblems[$line]) === false) { + $allProblems[$line] = [ + 'expected_errors' => 0, + 'expected_warnings' => 0, + 'found_errors' => [], + 'found_warnings' => [], + ]; + } + + $allProblems[$line]['expected_errors'] = $numErrors; + } + + foreach ($foundWarnings as $line => $lineWarnings) { + foreach ($lineWarnings as $column => $warnings) { + if (isset($allProblems[$line]) === false) { + $allProblems[$line] = [ + 'expected_errors' => 0, + 'expected_warnings' => 0, + 'found_errors' => [], + 'found_warnings' => [], + ]; + } + + $foundWarningsTemp = []; + foreach ($allProblems[$line]['found_warnings'] as $foundWarning) { + $foundWarningsTemp[] = $foundWarning; + } + + $warningsTemp = []; + foreach ($warnings as $warning) { + $warningsTemp[] = $warning['message'].' ('.$warning['source'].')'; + + $source = $warning['source']; + if (in_array($source, $GLOBALS['PHP_CODESNIFFER_SNIFF_CODES'], true) === false) { + $GLOBALS['PHP_CODESNIFFER_SNIFF_CODES'][] = $source; + } + + if ($warning['fixable'] === true + && in_array($source, $GLOBALS['PHP_CODESNIFFER_FIXABLE_CODES'], true) === false + ) { + $GLOBALS['PHP_CODESNIFFER_FIXABLE_CODES'][] = $source; + } + } + + $allProblems[$line]['found_warnings'] = array_merge($foundWarningsTemp, $warningsTemp); + }//end foreach + + if (isset($expectedWarnings[$line]) === true) { + $allProblems[$line]['expected_warnings'] = $expectedWarnings[$line]; + } else { + $allProblems[$line]['expected_warnings'] = 0; + } + + unset($expectedWarnings[$line]); + }//end foreach + + foreach ($expectedWarnings as $line => $numWarnings) { + if (isset($allProblems[$line]) === false) { + $allProblems[$line] = [ + 'expected_errors' => 0, + 'expected_warnings' => 0, + 'found_errors' => [], + 'found_warnings' => [], + ]; + } + + $allProblems[$line]['expected_warnings'] = $numWarnings; + } + + // Order the messages by line number. + ksort($allProblems); + + foreach ($allProblems as $line => $problems) { + $numErrors = count($problems['found_errors']); + $numWarnings = count($problems['found_warnings']); + $expectedErrors = $problems['expected_errors']; + $expectedWarnings = $problems['expected_warnings']; + + $errors = ''; + $foundString = ''; + + if ($expectedErrors !== $numErrors || $expectedWarnings !== $numWarnings) { + $lineMessage = "[LINE $line]"; + $expectedMessage = 'Expected '; + $foundMessage = 'in '.basename($testFile).' but found '; + + if ($expectedErrors !== $numErrors) { + $expectedMessage .= "$expectedErrors error(s)"; + $foundMessage .= "$numErrors error(s)"; + if ($numErrors !== 0) { + $foundString .= 'error(s)'; + $errors .= implode(PHP_EOL.' -> ', $problems['found_errors']); + } + + if ($expectedWarnings !== $numWarnings) { + $expectedMessage .= ' and '; + $foundMessage .= ' and '; + if ($numWarnings !== 0) { + if ($foundString !== '') { + $foundString .= ' and '; + } + } + } + } + + if ($expectedWarnings !== $numWarnings) { + $expectedMessage .= "$expectedWarnings warning(s)"; + $foundMessage .= "$numWarnings warning(s)"; + if ($numWarnings !== 0) { + $foundString .= 'warning(s)'; + if (empty($errors) === false) { + $errors .= PHP_EOL.' -> '; + } + + $errors .= implode(PHP_EOL.' -> ', $problems['found_warnings']); + } + } + + $fullMessage = "$lineMessage $expectedMessage $foundMessage."; + if ($errors !== '') { + $fullMessage .= " The $foundString found were:".PHP_EOL." -> $errors"; + } + + $failureMessages[] = $fullMessage; + }//end if + }//end foreach + + return $failureMessages; + + }//end generateFailureMessages() + + + /** + * Get a list of CLI values to set before the file is tested. + * + * @param string $filename The name of the file being tested. + * @param \PHP_CodeSniffer\Config $config The config data for the run. + * + * @return void + */ + public function setCliValues($filename, $config) + { + return; + + }//end setCliValues() + + + /** + * Returns the lines where errors should occur. + * + * The key of the array should represent the line number and the value + * should represent the number of errors that should occur on that line. + * + * @return array + */ + abstract protected function getErrorList(); + + + /** + * Returns the lines where warnings should occur. + * + * The key of the array should represent the line number and the value + * should represent the number of warnings that should occur on that line. + * + * @return array + */ + abstract protected function getWarningList(); + + +}//end class diff --git a/vendor/squizlabs/php_codesniffer/tests/Standards/AllSniffs.php b/vendor/squizlabs/php_codesniffer/tests/Standards/AllSniffs.php new file mode 100644 index 00000000..24527dd5 --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/tests/Standards/AllSniffs.php @@ -0,0 +1,123 @@ + + * @copyright 2006-2015 Squiz Pty Ltd (ABN 77 084 670 600) + * @license https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence + */ + +namespace PHP_CodeSniffer\Tests\Standards; + +use PHP_CodeSniffer\Util\Standards; +use PHP_CodeSniffer\Autoload; +use PHPUnit\TextUI\TestRunner; +use PHPUnit\Framework\TestSuite; + +class AllSniffs +{ + + + /** + * Prepare the test runner. + * + * @return void + */ + public static function main() + { + TestRunner::run(self::suite()); + + }//end main() + + + /** + * Add all sniff unit tests into a test suite. + * + * Sniff unit tests are found by recursing through the 'Tests' directory + * of each installed coding standard. + * + * @return \PHPUnit\Framework\TestSuite + */ + public static function suite() + { + $GLOBALS['PHP_CODESNIFFER_SNIFF_CODES'] = []; + $GLOBALS['PHP_CODESNIFFER_FIXABLE_CODES'] = []; + $GLOBALS['PHP_CODESNIFFER_SNIFF_CASE_FILES'] = []; + + $suite = new TestSuite('PHP CodeSniffer Standards'); + + $isInstalled = !is_file(__DIR__.'/../../autoload.php'); + + // Optionally allow for ignoring the tests for one or more standards. + $ignoreTestsForStandards = getenv('PHPCS_IGNORE_TESTS'); + if ($ignoreTestsForStandards === false) { + $ignoreTestsForStandards = []; + } else { + $ignoreTestsForStandards = explode(',', $ignoreTestsForStandards); + } + + $installedStandards = self::getInstalledStandardDetails(); + + foreach ($installedStandards as $standard => $details) { + Autoload::addSearchPath($details['path'], $details['namespace']); + + // If the test is running PEAR installed, the built-in standards + // are split into different directories; one for the sniffs and + // a different file system location for tests. + if ($isInstalled === true && is_dir(dirname($details['path']).DIRECTORY_SEPARATOR.'Generic') === true) { + $testPath = realpath(__DIR__.'/../../src/Standards/'.$standard); + } else { + $testPath = $details['path']; + } + + if (in_array($standard, $ignoreTestsForStandards, true) === true) { + continue; + } + + $testsDir = $testPath.DIRECTORY_SEPARATOR.'Tests'.DIRECTORY_SEPARATOR; + if (is_dir($testsDir) === false) { + // No tests for this standard. + continue; + } + + $di = new \RecursiveIteratorIterator(new \RecursiveDirectoryIterator($testsDir)); + + foreach ($di as $file) { + // Skip hidden files. + if (substr($file->getFilename(), 0, 1) === '.') { + continue; + } + + // Tests must have the extension 'php'. + $parts = explode('.', $file); + $ext = array_pop($parts); + if ($ext !== 'php') { + continue; + } + + $className = Autoload::loadFile($file->getPathname()); + $GLOBALS['PHP_CODESNIFFER_STANDARD_DIRS'][$className] = $details['path']; + $GLOBALS['PHP_CODESNIFFER_TEST_DIRS'][$className] = $testsDir; + $suite->addTestSuite($className); + } + }//end foreach + + return $suite; + + }//end suite() + + + /** + * Get the details of all coding standards installed. + * + * @return array + * @see Standards::getInstalledStandardDetails() + */ + protected static function getInstalledStandardDetails() + { + return Standards::getInstalledStandardDetails(true); + + }//end getInstalledStandardDetails() + + +}//end class diff --git a/vendor/squizlabs/php_codesniffer/tests/TestSuite.php b/vendor/squizlabs/php_codesniffer/tests/TestSuite.php new file mode 100644 index 00000000..9eb269f8 --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/tests/TestSuite.php @@ -0,0 +1,35 @@ + + * @copyright 2006-2015 Squiz Pty Ltd (ABN 77 084 670 600) + * @license https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence + */ + +namespace PHP_CodeSniffer\Tests; + +use PHPUnit\Framework\TestSuite as PHPUnit_TestSuite; +use PHPUnit\Framework\TestResult; + +class TestSuite extends PHPUnit_TestSuite +{ + + + /** + * Runs the tests and collects their result in a TestResult. + * + * @param \PHPUnit\Framework\TestResult $result A test result. + * + * @return \PHPUnit\Framework\TestResult + */ + public function run(TestResult $result=null) + { + $result = parent::run($result); + printPHPCodeSnifferTestOutput(); + return $result; + + }//end run() + + +}//end class diff --git a/vendor/squizlabs/php_codesniffer/tests/TestSuite7.php b/vendor/squizlabs/php_codesniffer/tests/TestSuite7.php new file mode 100644 index 00000000..43db293d --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/tests/TestSuite7.php @@ -0,0 +1,35 @@ + + * @copyright 2006-2015 Squiz Pty Ltd (ABN 77 084 670 600) + * @license https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence + */ + +namespace PHP_CodeSniffer\Tests; + +use PHPUnit\Framework\TestSuite as PHPUnit_TestSuite; +use PHPUnit\Framework\TestResult; + +class TestSuite extends PHPUnit_TestSuite +{ + + + /** + * Runs the tests and collects their result in a TestResult. + * + * @param \PHPUnit\Framework\TestResult $result A test result. + * + * @return \PHPUnit\Framework\TestResult + */ + public function run(TestResult $result=null): TestResult + { + $result = parent::run($result); + printPHPCodeSnifferTestOutput(); + return $result; + + }//end run() + + +}//end class diff --git a/vendor/squizlabs/php_codesniffer/tests/bootstrap.php b/vendor/squizlabs/php_codesniffer/tests/bootstrap.php new file mode 100644 index 00000000..47084d11 --- /dev/null +++ b/vendor/squizlabs/php_codesniffer/tests/bootstrap.php @@ -0,0 +1,91 @@ + + * @copyright 2006-2017 Squiz Pty Ltd (ABN 77 084 670 600) + * @license https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence + */ + +if (defined('PHP_CODESNIFFER_IN_TESTS') === false) { + define('PHP_CODESNIFFER_IN_TESTS', true); +} + +if (defined('PHP_CODESNIFFER_CBF') === false) { + define('PHP_CODESNIFFER_CBF', false); +} + +if (defined('PHP_CODESNIFFER_VERBOSITY') === false) { + define('PHP_CODESNIFFER_VERBOSITY', 0); +} + +if (is_file(__DIR__.'/../autoload.php') === true) { + include_once __DIR__.'/../autoload.php'; +} else { + include_once 'PHP/CodeSniffer/autoload.php'; +} + +$tokens = new \PHP_CodeSniffer\Util\Tokens(); + +// Compatibility for PHPUnit < 6 and PHPUnit 6+. +if (class_exists('PHPUnit_Framework_TestSuite') === true && class_exists('PHPUnit\Framework\TestSuite') === false) { + class_alias('PHPUnit_Framework_TestSuite', 'PHPUnit'.'\Framework\TestSuite'); +} + +if (class_exists('PHPUnit_Framework_TestCase') === true && class_exists('PHPUnit\Framework\TestCase') === false) { + class_alias('PHPUnit_Framework_TestCase', 'PHPUnit'.'\Framework\TestCase'); +} + +if (class_exists('PHPUnit_TextUI_TestRunner') === true && class_exists('PHPUnit\TextUI\TestRunner') === false) { + class_alias('PHPUnit_TextUI_TestRunner', 'PHPUnit'.'\TextUI\TestRunner'); +} + +if (class_exists('PHPUnit_Framework_TestResult') === true && class_exists('PHPUnit\Framework\TestResult') === false) { + class_alias('PHPUnit_Framework_TestResult', 'PHPUnit'.'\Framework\TestResult'); +} + +// Determine whether this is a PEAR install or not. +$GLOBALS['PHP_CODESNIFFER_PEAR'] = false; + +if (is_file(__DIR__.'/../autoload.php') === false) { + $GLOBALS['PHP_CODESNIFFER_PEAR'] = true; +} + + +/** + * A global util function to help print unit test fixing data. + * + * @return void + */ +function printPHPCodeSnifferTestOutput() +{ + echo PHP_EOL.PHP_EOL; + + $output = 'The test files'; + $data = []; + + $codeCount = count($GLOBALS['PHP_CODESNIFFER_SNIFF_CODES']); + if (empty($GLOBALS['PHP_CODESNIFFER_SNIFF_CASE_FILES']) === false) { + $files = call_user_func_array('array_merge', $GLOBALS['PHP_CODESNIFFER_SNIFF_CASE_FILES']); + $files = array_unique($files); + $fileCount = count($files); + + $output = '%d sniff test files'; + $data[] = $fileCount; + } + + $output .= ' generated %d unique error codes'; + $data[] = $codeCount; + + if ($codeCount > 0) { + $fixes = count($GLOBALS['PHP_CODESNIFFER_FIXABLE_CODES']); + $percent = round(($fixes / $codeCount * 100), 2); + + $output .= '; %d were fixable (%d%%)'; + $data[] = $fixes; + $data[] = $percent; + } + + vprintf($output, $data); + +}//end printPHPCodeSnifferTestOutput() From 5bd22a41f85d90686768c0974642b4ecd693c9d6 Mon Sep 17 00:00:00 2001 From: Luke Carl Hartman Date: Mon, 2 May 2022 13:23:39 -0700 Subject: [PATCH 09/32] quiz settings winner loser text customizable --- .vscode/settings.json | 4 +- database/class-enp_quiz_save_mc_option.php | 502 +++---- database/class-enp_quiz_save_question.php | 1162 ++++++++--------- database/class-enp_quiz_save_quiz.php | 101 +- .../class-enp_quiz_save_quiz_response.php | 6 +- enp_quiz.php | 7 +- error.txt | 0 includes/class-enp_quiz-activator.php | 8 +- includes/class-enp_quiz-question.php | 4 +- includes/class-enp_quiz-quiz.php | 136 +- public/quiz-create/class-enp_quiz-create.php | 527 ++++---- .../quiz-create/css/enp_quiz-create.min.css | 2 +- .../css/enp_quiz-create.min.css.map | 2 +- public/quiz-create/css/sass/_forms.scss | 9 +- public/quiz-create/css/sass/_utilities.scss | 7 +- .../includes/class-enp_quiz-dashboard.php | 159 ++- .../includes/class-enp_quiz-quiz_create.php | 3 - .../includes/class-enp_quiz-quiz_preview.php | 65 +- .../includes/class-enp_quiz-quiz_results.php | 154 +-- public/quiz-create/templates/ab-results.php | 140 +- .../templates/partials/ab-test-fieldset.php | 21 +- .../templates/partials/dashboard-ab-item.php | 36 +- .../partials/dashboard-quiz-item.php | 59 +- .../partials/question-results-section.php | 47 +- .../partials/quiz-create-mc-option.php | 18 +- .../partials/quiz-create-question.php | 1 + public/quiz-create/templates/quiz-create.php | 41 +- public/quiz-create/templates/quiz-preview.php | 137 +- public/quiz-create/templates/quiz-publish.php | 55 +- public/quiz-create/templates/quiz-results.php | 40 +- public/quiz-take/class-enp_quiz-take.php | 743 ++++++----- public/quiz-take/css/enp_quiz-take.min.css | 2 +- .../quiz-take/css/enp_quiz-take.min.css.map | 2 +- public/quiz-take/css/sass/_quiz.scss | 8 +- .../includes/class-enp_quiz-take_quiz_end.php | 183 +-- .../quiz-take/templates/partials/quiz-end.php | 50 +- public/quiz-take/templates/quiz.php | 251 ++-- 37 files changed, 2560 insertions(+), 2132 deletions(-) create mode 100644 error.txt diff --git a/.vscode/settings.json b/.vscode/settings.json index b1404d52..deb64802 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -1,3 +1,5 @@ { - "phpsab.fixerEnable": false + "phpsab.fixerEnable": false, + "intelephense.format.enable": false, + "phpcbf.enable": false } \ No newline at end of file diff --git a/database/class-enp_quiz_save_mc_option.php b/database/class-enp_quiz_save_mc_option.php index cf6ecd87..0695f038 100644 --- a/database/class-enp_quiz_save_mc_option.php +++ b/database/class-enp_quiz_save_mc_option.php @@ -19,279 +19,279 @@ * @author Engaging News Project */ class Enp_quiz_Save_mc_option extends Enp_quiz_Save_question { - protected static $mc_option; - // building responses - // parent::response['messages']['errors'][] - // parent::response['messages']['success'][], etc + protected static $mc_option; + // building responses + // parent::response['messages']['errors'][] + // parent::response['messages']['success'][], etc - public function __construct() { + public function __construct() { - } + } - /** - * Reformat and set values for a submitted mc_option - * - * @param $mc_option = array() in this format: - * $mc_option = array( - * 'mc_option_id' => $mc_option['mc_option_id'], - * 'mc_option_content' =>$mc_option['mc_option_content'], - * 'mc_option_correct' => $mc_option['mc_option_correct'], - * 'mc_option_order' => $mc_option['mc_option_order'], - * ); - * @return nicely formatted and value validated mc_option array ready for saving - */ - protected function prepare_submitted_mc_option($mc_option) { - self::$mc_option = $mc_option; - // set the defaults/get the submitted values - $mc_option_id = $this->set_mc_option_value('mc_option_id', 0); - $mc_option_content = $this->set_mc_option_value('mc_option_content', ''); - $mc_option_order = $mc_option['mc_option_order']; + /** + * Reformat and set values for a submitted mc_option + * + * @param $mc_option = array() in this format: + * $mc_option = array( + * 'mc_option_id' => $mc_option['mc_option_id'], + * 'mc_option_content' =>$mc_option['mc_option_content'], + * 'mc_option_correct' => $mc_option['mc_option_correct'], + * 'mc_option_order' => $mc_option['mc_option_order'], + * ); + * @return nicely formatted and value validated mc_option array ready for saving + */ + protected function prepare_submitted_mc_option($mc_option) { + self::$mc_option = $mc_option; + // set the defaults/get the submitted values + $mc_option_id = $this->set_mc_option_value('mc_option_id', 0); + $mc_option_content = $this->set_mc_option_value('mc_option_content', ''); + $mc_option_order = $mc_option['mc_option_order']; - // set our mc_option array - self::$mc_option = array( - 'mc_option_id' => $mc_option_id, - 'mc_option_content' => $mc_option_content, - 'mc_option_order' => $mc_option_order, - ); - // add in if it's correct or not. - // we need this after setting the mc_option because set_mc_option_correct needs - // the mc_option_id - self::$mc_option['mc_option_correct'] = $this->set_mc_option_correct(); - // see if we need to delete it or not - // we need this after setting the mc_option because set_mc_option_correct needs - // the mc_option_id - self::$mc_option['mc_option_is_deleted'] = $this->set_mc_option_is_deleted(); + // set our mc_option array + self::$mc_option = array( + 'mc_option_id' => $mc_option_id, + 'mc_option_content' => $mc_option_content, + 'mc_option_order' => $mc_option_order, + ); + // add in if it's correct or not. + // we need this after setting the mc_option because set_mc_option_correct needs + // the mc_option_id + self::$mc_option['mc_option_correct'] = $this->set_mc_option_correct(); + // see if we need to delete it or not + // we need this after setting the mc_option because set_mc_option_correct needs + // the mc_option_id + self::$mc_option['mc_option_is_deleted'] = $this->set_mc_option_is_deleted(); - return self::$mc_option; - } + return self::$mc_option; + } - /** - * Check to see if a value was passed in parent::$quiz['question'][$question_i]['mc_option'] array - * If it was, set it as the value. If it wasn't, set the value - * from the $mc_option_obj we'll create - * - * @param $key = key that should be set in the quiz['question'] array. - * @param $default = int or string of default value if nothing is found - * @return value from either parent::$quiz['question'][$question_i]['mc_option'][$mc_option_i] or $mc_option_obj->get_mc_option_$key() - */ - protected function set_mc_option_value($key, $default) { - $param_value = $default; + /** + * Check to see if a value was passed in parent::$quiz['question'][$question_i]['mc_option'] array + * If it was, set it as the value. If it wasn't, set the value + * from the $mc_option_obj we'll create + * + * @param $key = key that should be set in the quiz['question'] array. + * @param $default = int or string of default value if nothing is found + * @return value from either parent::$quiz['question'][$question_i]['mc_option'][$mc_option_i] or $mc_option_obj->get_mc_option_$key() + */ + protected function set_mc_option_value($key, $default) { + $param_value = $default; - // see if the value is already in our submitted quiz - if(array_key_exists($key, self::$mc_option) && self::$mc_option[$key] !== "") { - $param_value = self::$mc_option[$key]; - } else { - // check to see if there's even a mc_option_id to try to get - if(array_key_exists('mc_option_id', self::$mc_option) && self::$mc_option['mc_option_id'] !== 0) { - // if it's not in our submited quiz, try to get it from the object - // dynamically create the quiz getter function - $mc_option_obj = new Enp_quiz_MC_option(self::$mc_option['mc_option_id']); - $get_obj_value = 'get_'.$key; - // get the quiz object value - $obj_value = $mc_option_obj->$get_obj_value(); - // if the object value isn't null, then we have a value to set - if($obj_value !== null) { - $param_value = $obj_value; - } - } - } + // see if the value is already in our submitted quiz + if(array_key_exists($key, self::$mc_option) && self::$mc_option[$key] !== "") { + $param_value = self::$mc_option[$key]; + } else { + // check to see if there's even a mc_option_id to try to get + if(array_key_exists('mc_option_id', self::$mc_option) && self::$mc_option['mc_option_id'] !== 0) { + // if it's not in our submited quiz, try to get it from the object + // dynamically create the quiz getter function + $mc_option_obj = new Enp_quiz_MC_option(self::$mc_option['mc_option_id']); + $get_obj_value = 'get_'.$key; + // get the quiz object value + $obj_value = $mc_option_obj->$get_obj_value(); + // if the object value isn't null, then we have a value to set + if($obj_value !== null) { + $param_value = $obj_value; + } + } + } - return $param_value; - } - /** - * we need to check if an option is trying to be set as correct or not, - * and unset any other options that were set as correct (until we allow - * multiple mc correct) - * @param self::$mc_option - */ - protected function set_mc_option_correct() { - //get the current values (from submission or object) - $correct = $this->set_mc_option_value('mc_option_correct', '0'); - // check what the user action is - // see if they want to set an mc_option as correct - if(self::$user_action_action === 'set_correct' && self::$user_action_element === 'mc_option') { - // get the user_action question_id - // if it matches this question, then we'll either be setting it as 1 or 0 - if(parent::$user_action_details['question_id'] === (int)parent::$question['question_id']) { - // get the mc_option_id they were trying to set - if(parent::$user_action_details['mc_option_id'] === (int)self::$mc_option['mc_option_id']) { - // we've got a match! - // see if it's already set as the correct one. If it is, make it incorrect. - if((int)$correct === 1) { - $correct = 0; - } else { - // Alright, it's correct now! - $correct = 1; - } + return $param_value; + } + /** + * we need to check if an option is trying to be set as correct or not, + * and unset any other options that were set as correct (until we allow + * multiple mc correct) + * @param self::$mc_option + */ + protected function set_mc_option_correct() { + //get the current values (from submission or object) + $correct = $this->set_mc_option_value('mc_option_correct', '0'); + // check what the user action is + // see if they want to set an mc_option as correct + if(self::$user_action_action === 'set_correct' && self::$user_action_element === 'mc_option') { + // get the user_action question_id + // if it matches this question, then we'll either be setting it as 1 or 0 + if(parent::$user_action_details['question_id'] === (int)parent::$question['question_id']) { + // get the mc_option_id they were trying to set + if(parent::$user_action_details['mc_option_id'] === (int)self::$mc_option['mc_option_id']) { + // we've got a match! + // see if it's already set as the correct one. If it is, make it incorrect. + if((int)$correct === 1) { + $correct = 0; + } else { + // Alright, it's correct now! + $correct = 1; + } - } else { - // it doesn't match THIS mc_option, so set it to 0 (incorrect) - // even if it was correct before. This is bc we can only have one - // correct mc_option per question. If we move to multiple mc correct, - // more code would go here - $correct = 0; - } - } - } else { - // no changes - } - return $correct; - } + } else { + // it doesn't match THIS mc_option, so set it to 0 (incorrect) + // even if it was correct before. This is bc we can only have one + // correct mc_option per question. If we move to multiple mc correct, + // more code would go here + $correct = 0; + } + } + } else { + // no changes + } + return $correct; + } - /** - * we need to check if an option is trying to be set as correct or not, - * and unset any other options that were set as correct (until we allow - * multiple mc correct) - * @param self::$mc_option - */ - protected function set_mc_option_is_deleted() { - //get the current values (from submission or object) - $is_deleted = $this->set_mc_option_value('mc_option_is_deleted', '0'); - // check what the user action is - // see if they want to set an mc_option as correct - if(self::$user_action_action === 'delete' && self::$user_action_element === 'mc_option') { - // if they want to delete, see if we match the mc_option_id - if(parent::$user_action_details['mc_option_id'] === (int) self::$mc_option['mc_option_id']) { - // we've got a match! this is the one they want to delete - $is_deleted = 1; - } - } - // return if this one should be deleted or not - return $is_deleted; - } + /** + * we need to check if an option is trying to be set as correct or not, + * and unset any other options that were set as correct (until we allow + * multiple mc correct) + * @param self::$mc_option + */ + protected function set_mc_option_is_deleted() { + //get the current values (from submission or object) + $is_deleted = $this->set_mc_option_value('mc_option_is_deleted', '0'); + // check what the user action is + // see if they want to set an mc_option as correct + if(self::$user_action_action === 'delete' && self::$user_action_element === 'mc_option') { + // if they want to delete, see if we match the mc_option_id + if(parent::$user_action_details['mc_option_id'] === (int) self::$mc_option['mc_option_id']) { + // we've got a match! this is the one they want to delete + $is_deleted = 1; + } + } + // return if this one should be deleted or not + return $is_deleted; + } - /** - * Save a mc_option array in the database - * Often used in a foreach loop to loop over all mc_options - * If ID is passed, it will update that ID. - * If no ID or ID = 0, it will insert - * - * @param $mc_option = array(); of mc_option data - * @return ID of saved mc_option or false if error - * @since 0.0.1 - */ - protected function save_mc_option($mc_option) { - self::$mc_option = $mc_option; - // check to see if the id exists - if(self::$mc_option['mc_option_id'] === 0) { - // It doesn't exist yet, so insert it! - $this->insert_mc_option(); - } else { - // we have a mc_option_id, so update it! - $this->update_mc_option(); - } - } + /** + * Save a mc_option array in the database + * Often used in a foreach loop to loop over all mc_options + * If ID is passed, it will update that ID. + * If no ID or ID = 0, it will insert + * + * @param $mc_option = array(); of mc_option data + * @return ID of saved mc_option or false if error + * @since 0.0.1 + */ + protected function save_mc_option($mc_option) { + self::$mc_option = $mc_option; + // check to see if the id exists + if(self::$mc_option['mc_option_id'] === 0) { + // It doesn't exist yet, so insert it! + $this->insert_mc_option(); + } else { + // we have a mc_option_id, so update it! + $this->update_mc_option(); + } + } - /** - * Connects to DB and inserts the mc_option. - * @param $mc_option = formatted mc_option array - * @param $question_id = which quiz this mc_option goes with - * @return builds and returns a response message - */ - protected function insert_mc_option() { - // connect to PDO - $pdo = new enp_quiz_Db(); - // Get our Parameters ready - $params = array(':question_id' => parent::$question['question_id'], - ':mc_option_content'=> self::$mc_option['mc_option_content'], - ':mc_option_correct'=> self::$mc_option['mc_option_correct'], - ':mc_option_order' => self::$mc_option['mc_option_order'], + /** + * Connects to DB and inserts the mc_option. + * @param $mc_option = formatted mc_option array + * @param $question_id = which quiz this mc_option goes with + * @return builds and returns a response message + */ + protected function insert_mc_option() { + // connect to PDO + $pdo = new enp_quiz_Db(); + // Get our Parameters ready + $params = array(':question_id' => parent::$question['question_id'], + ':mc_option_content'=> self::$mc_option['mc_option_content'], + ':mc_option_correct'=> self::$mc_option['mc_option_correct'], + ':mc_option_order' => self::$mc_option['mc_option_order'], ':mc_option_responses' => 0 - ); - // write our SQL statement - $sql = "INSERT INTO ".$pdo->question_mc_option_table." ( - question_id, - mc_option_content, - mc_option_correct, - mc_option_order, + ); + // write our SQL statement + $sql = "INSERT INTO ".$pdo->question_mc_option_table." ( + question_id, + mc_option_content, + mc_option_correct, + mc_option_order, mc_option_responses - ) - VALUES( - :question_id, - :mc_option_content, - :mc_option_correct, - :mc_option_order, + ) + VALUES( + :question_id, + :mc_option_content, + :mc_option_correct, + :mc_option_order, :mc_option_responses - )"; - // insert the mc_option into the database - $stmt = $pdo->query($sql, $params); + )"; + // insert the mc_option into the database + $stmt = $pdo->query($sql, $params); - // success! - if($stmt !== false) { - // set-up our response array - $mc_option_response = array( - 'mc_option_id' => $pdo->lastInsertId(), - 'status' => 'success', - 'action' => 'insert' - ); - // pass the response array to our response object - parent::$response_obj->set_mc_option_response($mc_option_response, parent::$question, self::$mc_option); + // success! + if($stmt !== false) { + // set-up our response array + $mc_option_response = array( + 'mc_option_id' => $pdo->lastInsertId(), + 'status' => 'success', + 'action' => 'insert' + ); + // pass the response array to our response object + parent::$response_obj->set_mc_option_response($mc_option_response, parent::$question, self::$mc_option); - // see if we we're adding a mc_option in here... - if(self::$user_action_action === 'add' && self::$user_action_element === 'mc_option') { - // we added a mc_option successfully, let them know! - parent::$response_obj->add_success('Multiple Choice option added to Question #'.(parent::$question['question_order']+1).'.'); - } - } else { - parent::$response_obj->add_error('Question #'.(parent::$question['question_order']+1).' could not add a Multiple Choice Option.'); - } - } + // see if we we're adding a mc_option in here... + if(self::$user_action_action === 'add' && self::$user_action_element === 'mc_option') { + // we added a mc_option successfully, let them know! + parent::$response_obj->add_success('Multiple Choice option added to Question #'.(parent::$question['question_order']+1).'.'); + } + } else { + parent::$response_obj->add_error('Question #'.(parent::$question['question_order']+1).' could not add a Multiple Choice Option.'); + } + } - /** - * Connects to DB and updates the question. - * @param $question = formatted question array - * @param $question_id = which quiz this question goes with - * @return builds and returns a response message - */ - protected function update_mc_option() { - // connect to PDO - $pdo = new enp_quiz_Db(); - // Get our Parameters ready - $params = array(':mc_option_id' => self::$mc_option['mc_option_id'], - ':mc_option_content'=> self::$mc_option['mc_option_content'], - ':mc_option_correct'=> self::$mc_option['mc_option_correct'], - ':mc_option_order' => self::$mc_option['mc_option_order'], - ':mc_option_is_deleted' => self::$mc_option['mc_option_is_deleted'], - ); - // write our SQL statement - $sql = "UPDATE ".$pdo->question_mc_option_table." - SET mc_option_content = :mc_option_content, - mc_option_correct = :mc_option_correct, - mc_option_order = :mc_option_order, - mc_option_is_deleted = :mc_option_is_deleted + /** + * Connects to DB and updates the question. + * @param $question = formatted question array + * @param $question_id = which quiz this question goes with + * @return builds and returns a response message + */ + protected function update_mc_option() { + // connect to PDO + $pdo = new enp_quiz_Db(); + // Get our Parameters ready + $params = array(':mc_option_id' => self::$mc_option['mc_option_id'], + ':mc_option_content'=> self::$mc_option['mc_option_content'], + ':mc_option_correct'=> self::$mc_option['mc_option_correct'], + ':mc_option_order' => self::$mc_option['mc_option_order'], + ':mc_option_is_deleted' => self::$mc_option['mc_option_is_deleted'], + ); + // write our SQL statement + $sql = "UPDATE ".$pdo->question_mc_option_table." + SET mc_option_content = :mc_option_content, + mc_option_correct = :mc_option_correct, + mc_option_order = :mc_option_order, + mc_option_is_deleted = :mc_option_is_deleted - WHERE mc_option_id = :mc_option_id"; - // update the mc_option in the database - $stmt = $pdo->query($sql, $params); + WHERE mc_option_id = :mc_option_id"; + // update the mc_option in the database + $stmt = $pdo->query($sql, $params); - // success! - if($stmt !== false) { + // success! + if($stmt !== false) { - // set-up our response array - $mc_option_response = array( - 'mc_option_id' => self::$mc_option['mc_option_id'], - 'status' => 'success', - 'action' => 'update' - ); - // pass the response array to our response object - parent::$response_obj->set_mc_option_response($mc_option_response, parent::$question, self::$mc_option); + // set-up our response array + $mc_option_response = array( + 'mc_option_id' => self::$mc_option['mc_option_id'], + 'status' => 'success', + 'action' => 'update' + ); + // pass the response array to our response object + parent::$response_obj->set_mc_option_response($mc_option_response, parent::$question, self::$mc_option); - // SUCCESS MESSAGES - // see if we we're deleting a mc_option in here... - if(self::$mc_option['mc_option_is_deleted'] === 1) { - // we deleted a question successfully. Let's let them know! - parent::$response_obj->add_success('Multiple Choice Option deleted from Question #'.(parent::$question['question_order']+1).'.'); - } - // See if we're setting one as CORRECT - if(self::$mc_option['mc_option_correct'] === 1) { - // we set a question as correct! - parent::$response_obj->add_success('Multiple Choice Option set as Correct on Question #'.(parent::$question['question_order']+1).'.'); - } - } else { - // add an error that we couldn't update the mc_option - parent::$response_obj->add_error('Question #'.(parent::$question['question_order']+1).' could not update Multiple Choice Option #'.(self::$mc_option['mc_option_order']+1).'. Please try again and contact support if you continue to see this error message.'); - } - } + // SUCCESS MESSAGES + // see if we we're deleting a mc_option in here... + if(self::$mc_option['mc_option_is_deleted'] === 1) { + // we deleted a question successfully. Let's let them know! + parent::$response_obj->add_success('Multiple Choice Option deleted from Question #'.(parent::$question['question_order']+1).'.'); + } + // See if we're setting one as CORRECT + if(self::$mc_option['mc_option_correct'] === 1) { + // we set a question as correct! + parent::$response_obj->add_success('Multiple Choice Option set as Correct on Question #'.(parent::$question['question_order']+1).'.'); + } + } else { + // add an error that we couldn't update the mc_option + parent::$response_obj->add_error('Question #'.(parent::$question['question_order']+1).' could not update Multiple Choice Option #'.(self::$mc_option['mc_option_order']+1).'. Please try again and contact support if you continue to see this error message.'); + } + } } diff --git a/database/class-enp_quiz_save_question.php b/database/class-enp_quiz_save_question.php index 389af83c..123f83c3 100644 --- a/database/class-enp_quiz_save_question.php +++ b/database/class-enp_quiz_save_question.php @@ -19,598 +19,598 @@ * @author Engaging News Project */ class Enp_quiz_Save_question extends Enp_quiz_Save_quiz { - protected static $question; - // building responses - // parent::$response_obj->add_error('Wow. Such errors.'); - - public function __construct() { - - } - - /** - * Reformat and set values for a submitted question - * - * @param $question = array() in this format: - * $question = array( - * 'question_id' => $question['question_id'], - * 'question_title' =>$question['question_title'], - * 'question_type' =>$question['question_type'], - * 'question_explanation' => $question['question_explanation'], - * 'question_order' => $question['question_order'], - * ); - * @return nicely formatted and value validated question array - * ready to get passed on to mc_option or slider validation - */ - protected function prepare_submitted_question($question) { - self::$question = $question; - // set the defaults/get the submitted values - $question_id = $this->set_question_value('question_id', 0); - $question_title = $this->set_question_value('question_title', ''); - $question_image_alt = $this->set_question_value('question_image_alt', ''); - $question_type = $this->set_question_value('question_type', 'mc'); - $question_explanation = $this->set_question_value('question_explanation', ''); - $question_order = $question['question_order']; - $question_is_deleted = $question['question_is_deleted']; - // build our new array - $prepared_question = array( - 'question_id' => $question_id, - 'question_title' => $question_title, - 'question_image_alt' => $question_image_alt, - 'question_type' => $question_type, - 'question_explanation' => $question_explanation, - 'question_order' => $question_order, - 'question_is_deleted' => $question_is_deleted, - ); - - self::$question = array_merge(self::$question, $prepared_question); - // set the image - self::$question['question_image'] = $this->set_question_image(); - - // we need to preprocess_mc_options and preprocess_slider to make sure each question has at least a slider array and mc_option array - $this->preprocess_mc_options(); - $this->preprocess_slider(); - // merge the prepared question array so we don't lose our mc_option or slider values - - // check what the question type is and set the values accordingly - if(self::$question['question_type'] === 'mc') { - // we have a mc question, so prepare the values - // and set it as the mc_option array - self::$question['mc_option'] = $this->prepare_submitted_mc_options(self::$question['mc_option']); - - // check if the user action is to add a question. If so, add a slider in too - // we only need to check here, because the default is MC option - if(parent::$user_action_action === 'add' && parent::$user_action_element === 'question') { - self::$question['slider'] = $this->prepare_submitted_slider(self::$question['slider']); - } - } elseif(self::$question['question_type'] === 'slider') { - self::$question['slider'] = $this->prepare_submitted_slider(self::$question['slider']); - } - - return self::$question; - } - - /** - * Sets our question image, uploads an image, or deletes it - */ - protected function set_question_image() { - // set our default - $question_image = $this->set_question_value('question_image', ''); - // see if the user is trying to delete the image - if(parent::$user_action_action === 'delete' && parent::$user_action_element === 'question_image') { - // see if it matches this question - if(parent::$user_action_details['question_id'] === (int)self::$question['question_id']) { - // they want to delete this image. I wonder what was so bad about it? - $question_image = ''; - parent::$response_obj->add_success('Image deleted for Question #'.(self::$question['question_order']+1).'.'); - } - } - - // process images if necessary - // See if there's an image trying to be uploaded for this question - if(!empty($_FILES)) { - // This is the name="" field for that question image in the form - $question_image_file = 'question_image_upload_'.self::$question['question_id']; - // some question has a file submitted, let's see if it's this one - // check for size being set and that the size is greater than 0 - if( isset($_FILES[$question_image_file]["size"]) && $_FILES[$question_image_file]["size"] > 0 ) { - // we have a new image to upload! - // upload it - $new_question_image = $this->upload_question_image($question_image_file); - // see if it worked - if($new_question_image !== false) { - // if it worked, set it as the question_image - $question_image = $new_question_image; - } - } - } - - return $question_image; - } - - /* - * Uploads an image to - * @param $question_image_file (string) name of "name" field in HTML form for that question - * @return (string) filename of image uploaded to save to DB - */ - protected function upload_question_image($question_image_file) { - $new_image_name = false; - $image_upload = wp_upload_bits( $_FILES[$question_image_file]['name'], null, @file_get_contents( $_FILES[$question_image_file]['tmp_name'] ) ); - // check to make sure there are no errors - if($image_upload['error'] === false) { - // success! set the image - // set the URL to the image as our question_image - // create / delete our directory for these images - $this->prepare_quiz_image_dir(); - $path = $this->prepare_question_image_dir(); - - // now upload all the resized images we'll need - $new_image_name = $this->resize_image($image_upload, $path, null); - // we have the full path, but we just need the filename - $new_image_name = str_replace(ENP_QUIZ_IMAGE_DIR . parent::$quiz['quiz_id'].'/'.self::$question['question_id'].'/', '', $new_image_name); - // resize all the other images - $this->resize_image($image_upload, $path, 1000); - $this->resize_image($image_upload, $path, 740); - $this->resize_image($image_upload, $path, 580); - $this->resize_image($image_upload, $path, 320); - $this->resize_image($image_upload, $path, 200); - - // delete the image we initially uploaded from the wp-content dir - $this->delete_file($image_upload['file']); - - // add a success message - parent::$response_obj->add_success('Image uploaded for Question #'.(self::$question['question_order']+1).'.'); - } else { - // add an error message - parent::$response_obj->add_error('Image upload failed for Question #'.(self::$question['question_order']+1).'.'); - } - - return $new_image_name; - } - - /** - * Resizes images using wp_get_image_editor - * and appends the width to the filename - * @param $question_image_upload (string) path to image - * @param $path (string) path to upload image to - * @param $width (int) maxwidth of image to resize it to - * @return path to saved resized image - */ - protected function resize_image($question_image_upload, $path, $width) { + protected static $question; + // building responses + // parent::$response_obj->add_error('Wow. Such errors.'); + + public function __construct() { + + } + + /** + * Reformat and set values for a submitted question + * + * @param $question = array() in this format: + * $question = array( + * 'question_id' => $question['question_id'], + * 'question_title' =>$question['question_title'], + * 'question_type' =>$question['question_type'], + * 'question_explanation' => $question['question_explanation'], + * 'question_order' => $question['question_order'], + * ); + * @return nicely formatted and value validated question array + * ready to get passed on to mc_option or slider validation + */ + protected function prepare_submitted_question($question) { + self::$question = $question; + // set the defaults/get the submitted values + $question_id = $this->set_question_value('question_id', 0); + $question_title = $this->set_question_value('question_title', ''); + $question_image_alt = $this->set_question_value('question_image_alt', ''); + $question_type = $this->set_question_value('question_type', 'mc'); + $question_explanation = $this->set_question_value('question_explanation', ''); + $question_order = $question['question_order']; + $question_is_deleted = $question['question_is_deleted']; + // build our new array + $prepared_question = array( + 'question_id' => $question_id, + 'question_title' => $question_title, + 'question_image_alt' => $question_image_alt, + 'question_type' => $question_type, + 'question_explanation' => $question_explanation, + 'question_order' => $question_order, + 'question_is_deleted' => $question_is_deleted, + ); + + self::$question = array_merge(self::$question, $prepared_question); + // set the image + self::$question['question_image'] = $this->set_question_image(); + + // we need to preprocess_mc_options and preprocess_slider to make sure each question has at least a slider array and mc_option array + $this->preprocess_mc_options(); + $this->preprocess_slider(); + // merge the prepared question array so we don't lose our mc_option or slider values + + // check what the question type is and set the values accordingly + if(self::$question['question_type'] === 'mc') { + // we have a mc question, so prepare the values + // and set it as the mc_option array + self::$question['mc_option'] = $this->prepare_submitted_mc_options(self::$question['mc_option']); + + // check if the user action is to add a question. If so, add a slider in too + // we only need to check here, because the default is MC option + if(parent::$user_action_action === 'add' && parent::$user_action_element === 'question') { + self::$question['slider'] = $this->prepare_submitted_slider(self::$question['slider']); + } + } elseif(self::$question['question_type'] === 'slider') { + self::$question['slider'] = $this->prepare_submitted_slider(self::$question['slider']); + } + + return self::$question; + } + + /** + * Sets our question image, uploads an image, or deletes it + */ + protected function set_question_image() { + // set our default + $question_image = $this->set_question_value('question_image', ''); + // see if the user is trying to delete the image + if(parent::$user_action_action === 'delete' && parent::$user_action_element === 'question_image') { + // see if it matches this question + if(parent::$user_action_details['question_id'] === (int)self::$question['question_id']) { + // they want to delete this image. I wonder what was so bad about it? + $question_image = ''; + parent::$response_obj->add_success('Image deleted for Question #'.(self::$question['question_order']+1).'.'); + } + } + + // process images if necessary + // See if there's an image trying to be uploaded for this question + if(!empty($_FILES)) { + // This is the name="" field for that question image in the form + $question_image_file = 'question_image_upload_'.self::$question['question_id']; + // some question has a file submitted, let's see if it's this one + // check for size being set and that the size is greater than 0 + if( isset($_FILES[$question_image_file]["size"]) && $_FILES[$question_image_file]["size"] > 0 ) { + // we have a new image to upload! + // upload it + $new_question_image = $this->upload_question_image($question_image_file); + // see if it worked + if($new_question_image !== false) { + // if it worked, set it as the question_image + $question_image = $new_question_image; + } + } + } + + return $question_image; + } + + /* + * Uploads an image to + * @param $question_image_file (string) name of "name" field in HTML form for that question + * @return (string) filename of image uploaded to save to DB + */ + protected function upload_question_image($question_image_file) { + $new_image_name = false; + $image_upload = wp_upload_bits( $_FILES[$question_image_file]['name'], null, @file_get_contents( $_FILES[$question_image_file]['tmp_name'] ) ); + // check to make sure there are no errors + if($image_upload['error'] === false) { + // success! set the image + // set the URL to the image as our question_image + // create / delete our directory for these images + $this->prepare_quiz_image_dir(); + $path = $this->prepare_question_image_dir(); + + // now upload all the resized images we'll need + $new_image_name = $this->resize_image($image_upload, $path, null); + // we have the full path, but we just need the filename + $new_image_name = str_replace(ENP_QUIZ_IMAGE_DIR . parent::$quiz['quiz_id'].'/'.self::$question['question_id'].'/', '', $new_image_name); + // resize all the other images + $this->resize_image($image_upload, $path, 1000); + $this->resize_image($image_upload, $path, 740); + $this->resize_image($image_upload, $path, 580); + $this->resize_image($image_upload, $path, 320); + $this->resize_image($image_upload, $path, 200); + + // delete the image we initially uploaded from the wp-content dir + $this->delete_file($image_upload['file']); + + // add a success message + parent::$response_obj->add_success('Image uploaded for Question #'.(self::$question['question_order']+1).'.'); + } else { + // add an error message + parent::$response_obj->add_error('Image upload failed for Question #'.(self::$question['question_order']+1).'.'); + } + + return $new_image_name; + } + + /** + * Resizes images using wp_get_image_editor + * and appends the width to the filename + * @param $question_image_upload (string) path to image + * @param $path (string) path to upload image to + * @param $width (int) maxwidth of image to resize it to + * @return path to saved resized image + */ + protected function resize_image($question_image_upload, $path, $width) { // Resize the image to fit the single goal's page dimensions $image = wp_get_image_editor( $question_image_upload['file']); - if ( ! is_wp_error( $image ) ) { - if($width !== null && is_int($width)) { - // make our height max out at 4x6 aspect ratio so we don't have a HUUUUGEly tall image - $height = $width * 1.666667; - $extension = $width.'w'; - // Get the actual filename (rather than the directory + filename) - $image->resize( $width, $height, false ); - - } else { - $extension = '-original'; - } - - $filename = $image->generate_filename( $extension, $path, NULL ); - $saved_image = $image->save($filename); - return $saved_image['path']; - } - - return false; - } - - /** - * Check for mc_option array and append it if it's missing - * because every question needs to have a mc_option and slider row with it - */ - protected function preprocess_mc_options() { - // if it doesn't exist, create an empty array of arrays so the - // mc_option save prepare function gets run - if(!array_key_exists('mc_option', self::$question)) { - self::$question['mc_option'] = array( - array(), - ); - } - // append array if adding an option - if(parent::$user_action_action === 'add' && parent::$user_action_element === 'mc_option') { - // find out which question we need to append an option to - $question_id = parent::$user_action_details['question_id']; - // if the question we want to add a mc_option to is THIS question, - // append an extra mc_option array - if($question_id === (int)self::$question['question_id']) { - // add a new empty mc_option array to the end of the array - // so our foreach loop will run one extra time when saving this question - self::$question['mc_option'][] = array(); - } - - } - return self::$question; - } - - /** - * Check for mc_option array and append it if it's missing - * because every question needs to have a mc_option and slider row with it - */ - protected function preprocess_slider() { - if(!array_key_exists('slider', self::$question)) { - self::$question['slider'] = array(); - } - return self::$question; - } - - /** - * Reformat and set values for all submitted question mc_option - * - * @param $mc_option = array() in this format: - * $mc_option = array( - * array( - * 'mc_option_id' => $question[$i]['mc_option'][$i]['mc_option_id'], - * 'mc_option_content' =>$question[$i]['mc_option'][$i]['mc_option_content'], - * 'mc_option_correct' => $question[$i]['mc_option'][$i]['mc_option_correct'], - * 'mc_option_order' => $mc_option_i, - * ), - * ); - * @return nicely formatted and value validated mc_option array ready for saving - */ - protected function prepare_submitted_mc_options($mc_options) { - // set our counter - $i = 0; - // open a new array - $prepared_mc_options = array(); - // loop through all submitted $mc_options - foreach($mc_options as $mc_option) { - // add in our new mc_option_order value - $mc_option['mc_option_order'] = $i; - // create the object - $mc_obj = new Enp_quiz_Save_mc_option(); - // prepare the values - $mc_option = $mc_obj->prepare_submitted_mc_option($mc_option); - // set the nicely formatted returned $mc_option - $prepared_mc_options[$i] = $mc_option; - // increase our counter and do it again! - $i++; - } - // Return our nicely prepared_mc_options array - return $prepared_mc_options; - } - - /** - * Reformat and set values for all submitted question slider - * - * @param $slider = array() in this format: - * $slider = array( + if ( ! is_wp_error( $image ) ) { + if($width !== null && is_int($width)) { + // make our height max out at 4x6 aspect ratio so we don't have a HUUUUGEly tall image + $height = $width * 1.666667; + $extension = $width.'w'; + // Get the actual filename (rather than the directory + filename) + $image->resize( $width, $height, false ); + + } else { + $extension = '-original'; + } + + $filename = $image->generate_filename( $extension, $path, NULL ); + $saved_image = $image->save($filename); + return $saved_image['path']; + } + + return false; + } + + /** + * Check for mc_option array and append it if it's missing + * because every question needs to have a mc_option and slider row with it + */ + protected function preprocess_mc_options() { + // if it doesn't exist, create an empty array of arrays so the + // mc_option save prepare function gets run + if(!array_key_exists('mc_option', self::$question)) { + self::$question['mc_option'] = array( + array(), + ); + } + // append array if adding an option + if(parent::$user_action_action === 'add' && parent::$user_action_element === 'mc_option') { + // find out which question we need to append an option to + $question_id = parent::$user_action_details['question_id']; + // if the question we want to add a mc_option to is THIS question, + // append an extra mc_option array + if($question_id === (int)self::$question['question_id']) { + // add a new empty mc_option array to the end of the array + // so our foreach loop will run one extra time when saving this question + self::$question['mc_option'][] = array(); + } + + } + return self::$question; + } + + /** + * Check for mc_option array and append it if it's missing + * because every question needs to have a mc_option and slider row with it + */ + protected function preprocess_slider() { + if(!array_key_exists('slider', self::$question)) { + self::$question['slider'] = array(); + } + return self::$question; + } + + /** + * Reformat and set values for all submitted question mc_option + * + * @param $mc_option = array() in this format: + * $mc_option = array( + * array( + * 'mc_option_id' => $question[$i]['mc_option'][$i]['mc_option_id'], + * 'mc_option_content' =>$question[$i]['mc_option'][$i]['mc_option_content'], + * 'mc_option_correct' => $question[$i]['mc_option'][$i]['mc_option_correct'], + * 'mc_option_order' => $mc_option_i, + * ), + * ); + * @return nicely formatted and value validated mc_option array ready for saving + */ + protected function prepare_submitted_mc_options($mc_options) { + // set our counter + $i = 0; + // open a new array + $prepared_mc_options = array(); + // loop through all submitted $mc_options + foreach($mc_options as $mc_option) { + // add in our new mc_option_order value + $mc_option['mc_option_order'] = $i; + // create the object + $mc_obj = new Enp_quiz_Save_mc_option(); + // prepare the values + $mc_option = $mc_obj->prepare_submitted_mc_option($mc_option); + // set the nicely formatted returned $mc_option + $prepared_mc_options[$i] = $mc_option; + // increase our counter and do it again! + $i++; + } + // Return our nicely prepared_mc_options array + return $prepared_mc_options; + } + + /** + * Reformat and set values for all submitted question slider + * + * @param $slider = array() in this format: + * $slider = array( * 'slider_id' => $question[$i]['slider']['slider_id'], * 'slider_range_low' =>$question[$i]['slider']['slider_range_low'], * 'slider_range_high' => $question[$i]['slider']['slider_range_high'], * ... - * ); - * @return nicely formatted and value validated mc_option array ready for saving - */ - protected function prepare_submitted_slider($slider) { - // create the object - $slider_obj = new Enp_quiz_Save_slider(); - // Return our nicely prepared slider array - return $slider_obj->prepare_submitted_slider($slider); - } - - /** - * Check to see if a value was passed in parent::$quiz['question'] array - * If it was, set it as the value. If it wasn't, set the value - * from parent::$quiz_obj - * - * @param $key = key that should be set in the quiz['question'] array. - * @param $default = int or string of default value if nothing is found - * @return value from either parent::$quiz['question'][$question_number][$key] or parent::$quiz_obj->get_question_$key() - */ - protected function set_question_value($key, $default) { - $param_value = $default; - // see if the value is already in our submitted quiz - if(array_key_exists($key, self::$question) && self::$question[$key] !== "") { - $param_value = self::$question[$key]; - } else { - // if we set it from the object, then we can't delete values... - // hmm... - // check to see if there's even a question_id to try to get - /*if(array_key_exists('question_id', self::$question) && self::$question['question_id'] !== 0) { - // if it's not in our submited quiz, try to get it from the object - // dynamically create the quiz getter function - $question_obj = new Enp_quiz_Question(self::$question['question_id']); - $get_obj_value = 'get_'.$key; - // get the quiz object value - $obj_value = $question_obj->$get_obj_value(); - // if the object value isn't null, then we have a value to set - if($obj_value !== null) { - $param_value = $obj_value; - } - }*/ - } - - return $param_value; - } - - - /** - * Save a question array in the database - * Often used in a foreach loop to loop over all questions - * If ID is passed, it will update that ID. - * If no ID or ID = 0, it will insert - * - * @param $question = array(); of question data - * @return ID of saved question or false if error - * @since 0.0.1 - */ - protected function save_question($question) { - // set the question array - self::$question = $question; - - // check to see if the id exists - if(self::$question['question_id'] === 0) { - // It doesn't exist yet, so insert it! - $this->insert_question(); - } else { - // we have a question_id, so update it! - $this->update_question(); - } - } - - /** - * Connects to DB and inserts the question. - * @param $question = formatted question array - * @param $quiz_id = which quiz this question goes with - * @return builds and returns a response message - */ - protected function insert_question() { - // connect to PDO - $pdo = new enp_quiz_Db(); - // Get our Parameters ready - $params = array(':quiz_id' => parent::$quiz['quiz_id'], - ':question_title' => self::$question['question_title'], - ':question_image' => self::$question['question_image'], - ':question_image_alt' => self::$question['question_image_alt'], - ':question_type' => self::$question['question_type'], - ':question_explanation' => self::$question['question_explanation'], - ':question_order' => self::$question['question_order'], + * ); + * @return nicely formatted and value validated mc_option array ready for saving + */ + protected function prepare_submitted_slider($slider) { + // create the object + $slider_obj = new Enp_quiz_Save_slider(); + // Return our nicely prepared slider array + return $slider_obj->prepare_submitted_slider($slider); + } + + /** + * Check to see if a value was passed in parent::$quiz['question'] array + * If it was, set it as the value. If it wasn't, set the value + * from parent::$quiz_obj + * + * @param $key = key that should be set in the quiz['question'] array. + * @param $default = int or string of default value if nothing is found + * @return value from either parent::$quiz['question'][$question_number][$key] or parent::$quiz_obj->get_question_$key() + */ + protected function set_question_value($key, $default) { + $param_value = $default; + // see if the value is already in our submitted quiz + if(array_key_exists($key, self::$question) && self::$question[$key] !== "") { + $param_value = self::$question[$key]; + } else { + // if we set it from the object, then we can't delete values... + // hmm... + // check to see if there's even a question_id to try to get + /*if(array_key_exists('question_id', self::$question) && self::$question['question_id'] !== 0) { + // if it's not in our submited quiz, try to get it from the object + // dynamically create the quiz getter function + $question_obj = new Enp_quiz_Question(self::$question['question_id']); + $get_obj_value = 'get_'.$key; + // get the quiz object value + $obj_value = $question_obj->$get_obj_value(); + // if the object value isn't null, then we have a value to set + if($obj_value !== null) { + $param_value = $obj_value; + } + }*/ + } + + return $param_value; + } + + + /** + * Save a question array in the database + * Often used in a foreach loop to loop over all questions + * If ID is passed, it will update that ID. + * If no ID or ID = 0, it will insert + * + * @param $question = array(); of question data + * @return ID of saved question or false if error + * @since 0.0.1 + */ + protected function save_question($question) { + // set the question array + self::$question = $question; + + // check to see if the id exists + if(self::$question['question_id'] === 0) { + // It doesn't exist yet, so insert it! + $this->insert_question(); + } else { + // we have a question_id, so update it! + $this->update_question(); + } + } + + /** + * Connects to DB and inserts the question. + * @param $question = formatted question array + * @param $quiz_id = which quiz this question goes with + * @return builds and returns a response message + */ + protected function insert_question() { + // connect to PDO + $pdo = new enp_quiz_Db(); + // Get our Parameters ready + $params = array(':quiz_id' => parent::$quiz['quiz_id'], + ':question_title' => self::$question['question_title'], + ':question_image' => self::$question['question_image'], + ':question_image_alt' => self::$question['question_image_alt'], + ':question_type' => self::$question['question_type'], + ':question_explanation' => self::$question['question_explanation'], + ':question_order' => self::$question['question_order'], ':question_time_spent' => 0, ':question_time_spent_average' => 0 - ); - // write our SQL statement - $sql = "INSERT INTO ".$pdo->question_table." ( - quiz_id, - question_title, - question_image, - question_image_alt, - question_type, - question_explanation, - question_order, + ); + // write our SQL statement + $sql = "INSERT INTO ".$pdo->question_table." ( + quiz_id, + question_title, + question_image, + question_image_alt, + question_type, + question_explanation, + question_order, question_time_spent, question_time_spent_average - ) - VALUES( - :quiz_id, - :question_title, - :question_image, - :question_image_alt, - :question_type, - :question_explanation, - :question_order, + ) + VALUES( + :quiz_id, + :question_title, + :question_image, + :question_image_alt, + :question_type, + :question_explanation, + :question_order, :question_time_spent, :question_time_spent_average - )"; - // insert the question into the database - $stmt = $pdo->query($sql, $params); - - // success! - if($stmt !== false) { - self::$question['question_id'] = $pdo->lastInsertId(); - // set-up our response array - $question_response = array( - 'status' => 'success', - 'action' => 'insert', - ); - $question_response = array_merge($this->build_question_response(), $question_response); - // pass the response array to our response object - parent::$response_obj->set_question_response($question_response, self::$question); - - // SUCCESS MESSAGES - // see if we we're adding a mc_option in here... - if(self::$user_action_action === 'add' && self::$user_action_element === 'question') { - // we added a mc_option successfully, let them know! - parent::$response_obj->add_success('Question added.'); - } - - // pass the question on to save_mc_option or save_slider - // add the question_id to the questions array - $this->save_question_type_options(); - - } else { - parent::$response_obj->add_error('Question number '.$question['question_order'].' could not be added to the database. Try again and if it continues to not work, send us an email with details of how you got to this error.'); - } - } - - /** - * Connects to DB and updates the question. - * @param $question = formatted question array - * @param $quiz_id = which quiz this question goes with - * @return builds and returns a response message - */ - protected function update_question() { - // connect to PDO - $pdo = new enp_quiz_Db(); - // Get our Parameters ready - $params = array(':question_id' => self::$question['question_id'], - ':question_title' => self::$question['question_title'], - ':question_image' => self::$question['question_image'], - ':question_image_alt' => self::$question['question_image_alt'], - ':question_type' => self::$question['question_type'], - ':question_explanation' => self::$question['question_explanation'], - ':question_order' => self::$question['question_order'], - ':question_is_deleted' => self::$question['question_is_deleted'] - ); - // write our SQL statement - $sql = "UPDATE ".$pdo->question_table." - SET question_title = :question_title, - question_image = :question_image, - question_image_alt = :question_image_alt, - question_type = :question_type, - question_explanation = :question_explanation, - question_order = :question_order, - question_is_deleted = :question_is_deleted - - WHERE question_id = :question_id"; - // update the question in the database - $stmt =$pdo->query($sql, $params); - - // success! - if($stmt !== false) { - // set-up our response array - $question_response = array( - 'status' => 'success', - 'action' => 'update' - ); - $question_response = array_merge($this->build_question_response(), $question_response); - // pass the response array to our response object - parent::$response_obj->set_question_response($question_response, self::$question); - // see if we were deleting a question in here... - if(self::$question['question_is_deleted'] === 1) { - // we deleted a question successfully. Let's let them know! - parent::$response_obj->add_success('Question deleted.'); - } - - // pass the question on to save_mc_option or save_slider - $this->save_question_type_options(); - - } else { - parent::$response_obj->add_error('Question number '.self::$question['question_order'].' could not be updated.'); - } - } - - protected function build_question_response() { - // build all the values for the question and return them in the JSON array - return array( - 'question_id' => self::$question['question_id'], - 'question_title' => self::$question['question_title'], - 'question_image' => self::$question['question_image'], - 'question_image_alt' => self::$question['question_image_alt'], - 'question_type' => self::$question['question_type'], - 'question_explanation' => self::$question['question_explanation'], - 'question_order' => self::$question['question_order'] - ); - } - - /** - * Chooses which question type we need to save, and passes it - * to the correct function to save it - * Not a great function name though... - * - * @param $question = array of the question data - */ - protected function save_question_type_options() { - $question_type = self::$question['question_type']; - // now try to save the mc_option or slider - if($question_type === 'mc') { - // pass the mc_option array for saving - $this->save_mc_options(self::$question['mc_option']); - } - // if it's a slider, or if we're adding a question, we need to save a slider too - if( $question_type === 'slider' || (parent::$user_action_action === 'add' && parent::$user_action_element === 'question') ) { - //TODO: create slider save - $this->save_slider(self::$question['slider']); - } - } - - /** - * Loop through a $question['mc_option'] array to save to the db - * - * @param $mc_option = array(); of all question['mc_option'] data - * @since 0.0.1 - */ - protected function save_mc_options($mc_options) { - if(!empty($mc_options)){ - // loop through the questions and save each one - foreach($mc_options as $mc_option) { - // create a new object - $mc_option_obj = new Enp_quiz_Save_mc_option(); - // pass to save_mc_options so we can decide - // if we should insert or update the mc_option - $mc_option_obj->save_mc_option($mc_option); - } - } - } - - /** - * Save a slider array in the database - * If ID is passed, it will update that ID. - * If no ID or ID = 0, it will insert - * - * @param $slider = array(); of slider data - * @return ID of saved slider or false if error - * @since 0.0.1 - */ - protected function save_slider($slider) { - // create a new object - $slider_obj = new Enp_quiz_Save_slider(); - // pass to save_sliders so we can decide - // if we should insert or update the slider - $slider_obj->save_slider($slider); - } - - /* - * Creates a new directory for the quiz images, if necessary - */ - protected function prepare_quiz_image_dir() { - $path = ENP_QUIZ_IMAGE_DIR . parent::$quiz['quiz_id'].'/'; - $path = $this->build_dir($path); - return $path; - } - - /* - * Creates a new directory for the question images, if necessary - * and DELETES all files in the directory if there are any - */ - protected function prepare_question_image_dir() { - $path = ENP_QUIZ_IMAGE_DIR . parent::$quiz['quiz_id'].'/'.self::$question['question_id'].'/'; - $path = $this->build_dir($path); - $this->delete_files($path); - - // check if directory exists - // check to see if our image question upload directory exists - return $path; - } - - /** - * Creates a new directory if it doesn't exist - */ - private function build_dir($path) { - if (!file_exists($path)) { - // if it doesn't exist, create it - mkdir($path, 0777, true); - } - return $path; - } - - /** - * Deletes files in a directory, restricted to ENP_QUIZ_IMG_DIR - */ - private function delete_files($path) { - if(strpos($path, ENP_QUIZ_IMAGE_DIR) === false) { - // uh oh... someone is misusing this - return false; - } - if (file_exists($path)) { - // delete all the images in it - $files = glob($path.'*'); // get all file names - foreach($files as $file){ // iterate files - $this->delete_file($file); - } - } - } - - /** - * Deletes a file by path - */ - private function delete_file($file) { - if(is_file($file)) { - unlink($file); // delete file - } - } + )"; + // insert the question into the database + $stmt = $pdo->query($sql, $params); + + // success! + if($stmt !== false) { + self::$question['question_id'] = $pdo->lastInsertId(); + // set-up our response array + $question_response = array( + 'status' => 'success', + 'action' => 'insert', + ); + $question_response = array_merge($this->build_question_response(), $question_response); + // pass the response array to our response object + parent::$response_obj->set_question_response($question_response, self::$question); + + // SUCCESS MESSAGES + // see if we we're adding a mc_option in here... + if(self::$user_action_action === 'add' && self::$user_action_element === 'question') { + // we added a mc_option successfully, let them know! + parent::$response_obj->add_success('Question added.'); + } + + // pass the question on to save_mc_option or save_slider + // add the question_id to the questions array + $this->save_question_type_options(); + + } else { + parent::$response_obj->add_error('Question number '.$question['question_order'].' could not be added to the database. Try again and if it continues to not work, send us an email with details of how you got to this error.'); + } + } + + /** + * Connects to DB and updates the question. + * @param $question = formatted question array + * @param $quiz_id = which quiz this question goes with + * @return builds and returns a response message + */ + protected function update_question() { + // connect to PDO + $pdo = new enp_quiz_Db(); + // Get our Parameters ready + $params = array(':question_id' => self::$question['question_id'], + ':question_title' => self::$question['question_title'], + ':question_image' => self::$question['question_image'], + ':question_image_alt' => self::$question['question_image_alt'], + ':question_type' => self::$question['question_type'], + ':question_explanation' => self::$question['question_explanation'], + ':question_order' => self::$question['question_order'], + ':question_is_deleted' => self::$question['question_is_deleted'] + ); + // write our SQL statement + $sql = "UPDATE ".$pdo->question_table." + SET question_title = :question_title, + question_image = :question_image, + question_image_alt = :question_image_alt, + question_type = :question_type, + question_explanation = :question_explanation, + question_order = :question_order, + question_is_deleted = :question_is_deleted + + WHERE question_id = :question_id"; + // update the question in the database + $stmt =$pdo->query($sql, $params); + + // success! + if($stmt !== false) { + // set-up our response array + $question_response = array( + 'status' => 'success', + 'action' => 'update' + ); + $question_response = array_merge($this->build_question_response(), $question_response); + // pass the response array to our response object + parent::$response_obj->set_question_response($question_response, self::$question); + // see if we were deleting a question in here... + if(self::$question['question_is_deleted'] === 1) { + // we deleted a question successfully. Let's let them know! + parent::$response_obj->add_success('Question deleted.'); + } + + // pass the question on to save_mc_option or save_slider + $this->save_question_type_options(); + + } else { + parent::$response_obj->add_error('Question number '.self::$question['question_order'].' could not be updated.'); + } + } + + protected function build_question_response() { + // build all the values for the question and return them in the JSON array + return array( + 'question_id' => self::$question['question_id'], + 'question_title' => self::$question['question_title'], + 'question_image' => self::$question['question_image'], + 'question_image_alt' => self::$question['question_image_alt'], + 'question_type' => self::$question['question_type'], + 'question_explanation' => self::$question['question_explanation'], + 'question_order' => self::$question['question_order'] + ); + } + + /** + * Chooses which question type we need to save, and passes it + * to the correct function to save it + * Not a great function name though... + * + * @param $question = array of the question data + */ + protected function save_question_type_options() { + $question_type = self::$question['question_type']; + // now try to save the mc_option or slider + if($question_type === 'mc') { + // pass the mc_option array for saving + $this->save_mc_options(self::$question['mc_option']); + } + // if it's a slider, or if we're adding a question, we need to save a slider too + if( $question_type === 'slider' || (parent::$user_action_action === 'add' && parent::$user_action_element === 'question') ) { + //TODO: create slider save + $this->save_slider(self::$question['slider']); + } + } + + /** + * Loop through a $question['mc_option'] array to save to the db + * + * @param $mc_option = array(); of all question['mc_option'] data + * @since 0.0.1 + */ + protected function save_mc_options($mc_options) { + if(!empty($mc_options)){ + // loop through the questions and save each one + foreach($mc_options as $mc_option) { + // create a new object + $mc_option_obj = new Enp_quiz_Save_mc_option(); + // pass to save_mc_options so we can decide + // if we should insert or update the mc_option + $mc_option_obj->save_mc_option($mc_option); + } + } + } + + /** + * Save a slider array in the database + * If ID is passed, it will update that ID. + * If no ID or ID = 0, it will insert + * + * @param $slider = array(); of slider data + * @return ID of saved slider or false if error + * @since 0.0.1 + */ + protected function save_slider($slider) { + // create a new object + $slider_obj = new Enp_quiz_Save_slider(); + // pass to save_sliders so we can decide + // if we should insert or update the slider + $slider_obj->save_slider($slider); + } + + /* + * Creates a new directory for the quiz images, if necessary + */ + protected function prepare_quiz_image_dir() { + $path = ENP_QUIZ_IMAGE_DIR . parent::$quiz['quiz_id'].'/'; + $path = $this->build_dir($path); + return $path; + } + + /* + * Creates a new directory for the question images, if necessary + * and DELETES all files in the directory if there are any + */ + protected function prepare_question_image_dir() { + $path = ENP_QUIZ_IMAGE_DIR . parent::$quiz['quiz_id'].'/'.self::$question['question_id'].'/'; + $path = $this->build_dir($path); + $this->delete_files($path); + + // check if directory exists + // check to see if our image question upload directory exists + return $path; + } + + /** + * Creates a new directory if it doesn't exist + */ + private function build_dir($path) { + if (!file_exists($path)) { + // if it doesn't exist, create it + mkdir($path, 0777, true); + } + return $path; + } + + /** + * Deletes files in a directory, restricted to ENP_QUIZ_IMG_DIR + */ + private function delete_files($path) { + if(strpos($path, ENP_QUIZ_IMAGE_DIR) === false) { + // uh oh... someone is misusing this + return false; + } + if (file_exists($path)) { + // delete all the images in it + $files = glob($path.'*'); // get all file names + foreach($files as $file){ // iterate files + $this->delete_file($file); + } + } + } + + /** + * Deletes a file by path + */ + private function delete_file($file) { + if(is_file($file)) { + unlink($file); // delete file + } + } } diff --git a/database/class-enp_quiz_save_quiz.php b/database/class-enp_quiz_save_quiz.php index a9bc20ac..3de0810e 100644 --- a/database/class-enp_quiz_save_quiz.php +++ b/database/class-enp_quiz_save_quiz.php @@ -105,15 +105,16 @@ public function save($quiz) * 'quiz_updated_at' => $date_time, * ); * @return nicely formatted and value validated quiz array ready for saving + * $quiz_title_test = $this->set_quiz_value('quiz_title_test', ''); */ protected function prepare_submitted_quiz() { $quiz_id = $this->set_quiz_value('quiz_id', 0); $quiz_title = $this->set_quiz_value('quiz_title', ''); - $quiz_title_test = $this->set_quiz_value('quiz_title_test', ''); + $quiz_feedback = $this->set_quiz_value('quiz_feedback', ''); $quiz_status = $this->set_quiz_value('quiz_status', 'draft'); - $quiz_finish_message = $this->set_quiz_value('quiz_finish_message', 'Thanks for taking our quiz!'); + $quiz_finish_message = $this->set_quiz_value('quiz_finish_message', 'Thanks A LOT for taking our quiz!'); $quiz_updated_by = $this->set_quiz_value('quiz_updated_by', 0); $quiz_updated_at = $this->set_quiz_value('quiz_updated_at', date("Y-m-d H:i:s")); $quiz_owner = $this->set_quiz_value__object_first('quiz_owner', $quiz_updated_by); @@ -139,21 +140,31 @@ protected function prepare_submitted_quiz() $facebook_title = $this->set_quiz_value('facebook_title', $quiz_title); $facebook_description = $this->set_quiz_value('facebook_description', 'How well can you do?'); $facebook_quote_end = $this->set_quiz_value('facebook_quote_end', 'I got {{score_percentage}}% right.'); + // email $email_subject = $facebook_title; $email_body_start = $facebook_description; - $email_body_end = $facebook_quote_end . ' + $email_body_end = $facebook_quote_end . ' ' . $facebook_description; -' . $facebook_description; // twitter $include_url = true; $replace_mustache = true; $tweet_end = $this->set_tweet_value('tweet_end', 'I got {{score_percentage}}% right on this quiz. How many can you get right?', $include_url, $replace_mustache); + // winners & losers + $quiz_end_fail_title = $this->set_quiz_value('quiz_end_fail_title', 'Oops!!'); + $quiz_end_fail_description = $this->set_quiz_value('quiz_end_fail_description', 'We bet you could do better. Why don\'t you try taking the quiz again?'); + $quiz_end_average_title = $this->set_quiz_value('quiz_end_average_title', 'Not Bad!'); + $quiz_end_average_description = $this->set_quiz_value('quiz_end_average_description', 'We bet you could do better. Why don\'t you try taking the quiz again?.'); + $quiz_end_good_title = $this->set_quiz_value('quiz_end_good_title', 'Nice Job!'); + $quiz_end_good_description = $this->set_quiz_value('quiz_end_good_description', 'Nice work! You almost got a perfect score!'); + $quiz_end_perfect_title = $this->set_quiz_value('quiz_end_perfect_title', 'Perfect!'); + $quiz_end_perfect_description = $this->set_quiz_value('quiz_end_perfect_description', 'Can\'t do any better than that! Go ahead, share this quiz and brag about it.'); + $default_quiz = array( 'quiz_id' => $quiz_id, 'quiz_title' => $quiz_title, - 'quiz_title_test' => $quiz_title_test, + 'quiz_feedback' => $quiz_feedback, 'quiz_status' => $quiz_status, 'quiz_finish_message' => $quiz_finish_message, 'quiz_owner' => $quiz_owner, @@ -186,6 +197,16 @@ protected function prepare_submitted_quiz() 'email_body_end' => $email_body_end, // tweet share text 'tweet_end' => $tweet_end, + + // quiz options - winner & loser text + 'quiz_end_fail_title' => $quiz_end_fail_title, + 'quiz_end_fail_description' => $quiz_end_fail_description, + 'quiz_end_average_title' => $quiz_end_average_title, + 'quiz_end_average_description' => $quiz_end_average_description, + 'quiz_end_good_title' => $quiz_end_good_title, + 'quiz_end_good_description' => $quiz_end_good_description, + 'quiz_end_perfect_title' => $quiz_end_perfect_title, + 'quiz_end_perfect_description' => $quiz_end_perfect_description, ); // We don't want to lose anything that was in the sent quiz (like questions, etc) // so we'll merge them to make sure we don't lose anything @@ -399,12 +420,12 @@ private function save_quiz() return false; } - // check for the quiz_title real quick - if (self::$quiz['quiz_title_test'] === '') { - // You had ONE job... - self::$response_obj->add_error('Please enter a quiz test title.'); - return false; - } + // check for the quiz_title_test real quick + // if (self::$quiz['quiz_title_test'] === '') { + // // You had ONE job... + // self::$response_obj->add_error('Please enter a quiz test title.'); + // return false; + // } // If the quiz_obj doesn't exist the quiz object will set the quiz_id as null if (self::$quiz_obj->get_quiz_id() === null) { @@ -501,9 +522,10 @@ protected function insert_quiz() // connect to PDO $pdo = new enp_quiz_Db(); // Get our Parameters ready + // ':quiz_title_test' => self::$quiz['quiz_title_test'], $params = array( ':quiz_title' => self::$quiz['quiz_title'], - ':quiz_title_test' => self::$quiz['quiz_title_test'], + ':quiz_feedback' => self::$quiz['quiz_feedback'], ':quiz_status' => self::$quiz['quiz_status'], ':quiz_finish_message' => self::$quiz['quiz_finish_message'], ':quiz_owner' => self::$quiz['quiz_owner'], @@ -513,10 +535,12 @@ protected function insert_quiz() ':quiz_updated_at' => self::$quiz['quiz_updated_at'], ':quiz_is_deleted' => self::$quiz['quiz_is_deleted'], ); - // write our SQL statement - $sql = "INSERT INTO " . $pdo->quiz_table . " ( + // write our SQL statement. + // quiz_title_test, + // add to VALUES too -> :quiz_title_test, + $sql = 'INSERT INTO ' . $pdo->quiz_table . ' ( quiz_title, - quiz_title_test, + quiz_feedback, quiz_status, quiz_finish_message, quiz_owner, @@ -528,7 +552,7 @@ protected function insert_quiz() ) VALUES( :quiz_title, - :quiz_title_test, + :quiz_feedback, :quiz_status, :quiz_finish_message, :quiz_owner, @@ -537,12 +561,12 @@ protected function insert_quiz() :quiz_updated_by, :quiz_updated_at, :quiz_is_deleted - )"; + )'; // insert the quiz into the database - $stmt = $pdo->query($sql, $params); + $stmt = $pdo->query( $sql, $params ); // success! - if ($stmt !== false) { + if ( $stmt !== false ) { self::$quiz['quiz_id'] = $pdo->lastInsertId(); self::$response_obj->set_status('success'); self::$response_obj->set_action('insert'); @@ -564,10 +588,10 @@ protected function update_quiz() $pdo = new enp_quiz_Db(); $params = $this->set_update_quiz_params(); - + // quiz_title_test = :quiz_title_test, $sql = "UPDATE " . $pdo->quiz_table . " SET quiz_title = :quiz_title, - quiz_title_test = :quiz_title_test, + quiz_feedback = :quiz_feedback, quiz_status = :quiz_status, quiz_finish_message = :quiz_finish_message, quiz_updated_by = :quiz_updated_by, @@ -624,7 +648,15 @@ protected function save_quiz_options() 'email_subject', 'email_body_start', 'email_body_end', - 'tweet_end' + 'tweet_end', + 'quiz_end_fail_title', + 'quiz_end_fail_description', + 'quiz_end_average_title', + 'quiz_end_average_description', + 'quiz_end_good_title', + 'quiz_end_good_description', + 'quiz_end_perfect_title', + 'quiz_end_perfect_description', ); foreach ($quiz_options as $quiz_option) { if (array_key_exists($quiz_option, self::$quiz)) { @@ -694,19 +726,20 @@ public function publish_quiz($quiz) * @param $slider = array(); of slider data * @return ID of saved slider or false if error * @since 0.0.1 + * ':quiz_title_test' => self::$quiz['quiz_title_test'], */ protected function set_update_quiz_params() { $params = array( - ':quiz_id' => self::$quiz_obj->get_quiz_id(), - ':quiz_title' => self::$quiz['quiz_title'], - ':quiz_title_test' => self::$quiz['quiz_title_test'], - ':quiz_status' => self::$quiz['quiz_status'], + ':quiz_id' => self::$quiz_obj->get_quiz_id(), + ':quiz_title' => self::$quiz['quiz_title'], + ':quiz_feedback' => self::$quiz['quiz_feedback'], + ':quiz_status' => self::$quiz['quiz_status'], ':quiz_finish_message' => self::$quiz['quiz_finish_message'], - ':quiz_owner' => self::$quiz['quiz_owner'], - ':quiz_updated_by' => self::$quiz['quiz_updated_by'], - ':quiz_updated_at' => self::$quiz['quiz_updated_at'], - ':quiz_is_deleted' => self::$quiz['quiz_is_deleted'] + ':quiz_owner' => self::$quiz['quiz_owner'], + ':quiz_updated_by' => self::$quiz['quiz_updated_by'], + ':quiz_updated_at' => self::$quiz['quiz_updated_at'], + ':quiz_is_deleted' => self::$quiz['quiz_is_deleted'] ); return $params; } @@ -1040,6 +1073,14 @@ public function facebook_curl_post($quiz_url) curl_close($ch); } + /** + * quiz end winning title and description + */ + // public function quiz_end_fail_title() + // { + // $quiz_end_fail_title = self::$quiz_obj->get_quiz_end_fail_title(); + // $quiz_end_fail_description = self::$quiz_obj->get_quiz_end_fail_description(); + // } /** * Decide if a quiz should be deleted or not diff --git a/database/class-enp_quiz_save_quiz_response.php b/database/class-enp_quiz_save_quiz_response.php index 75203bff..69c6d059 100644 --- a/database/class-enp_quiz_save_quiz_response.php +++ b/database/class-enp_quiz_save_quiz_response.php @@ -18,12 +18,13 @@ * @package Enp_quiz * @subpackage Enp_quiz/database * @author Engaging News Project + * $quiz_title_test, */ class Enp_quiz_Save_quiz_Response extends Enp_quiz_Save { public $quiz_id, $quiz_title, - $quiz_title_test, + $quiz_feedback, $quiz_status, $status, $action, @@ -68,12 +69,13 @@ public function set_status($status) /** * Gets response from quiz save class and assigns values to our response object + * $this->quiz_title_test = $quiz['quiz_title_test']; */ public function set_quiz_response($quiz) { $this->set_quiz_id($quiz['quiz_id']); $this->quiz_title = $quiz['quiz_title']; - $this->quiz_title_test = $quiz['quiz_title_test']; + $this->quiz_feedback = $quiz['quiz_feedback']; $this->quiz_status = $quiz['quiz_status']; $this->quiz_finish_message = $quiz['quiz_finish_message']; $this->quiz_updated_at = $quiz['quiz_updated_at']; diff --git a/enp_quiz.php b/enp_quiz.php index 4ce76a05..23e7626f 100755 --- a/enp_quiz.php +++ b/enp_quiz.php @@ -175,13 +175,10 @@ function run_enp_quiz() { /* For DEBUGGING * creates log file with error output. Good for using on * The plugin generated xxxx characters of unexpected output messages - +*/ add_action('activated_plugin','enp_log_error'); function enp_log_error(){ file_put_contents(plugin_dir_path( __FILE__ ).'/error.txt', ob_get_contents()); } -*/ -run_enp_quiz(); - - +run_enp_quiz(); diff --git a/error.txt b/error.txt new file mode 100644 index 00000000..e69de29b diff --git a/includes/class-enp_quiz-activator.php b/includes/class-enp_quiz-activator.php index 13816d25..9ca56f0f 100755 --- a/includes/class-enp_quiz-activator.php +++ b/includes/class-enp_quiz-activator.php @@ -155,12 +155,12 @@ public function create_tables() global $wpdb; $charset_collate = $wpdb->get_charset_collate(); // quiz table name - + // quiz_title_test VARCHAR(255) NOT NULL, $quiz_table_name = $this->quiz_table_name; - $quiz_sql = "CREATE TABLE $quiz_table_name ( + $quiz_sql = "CREATE TABLE $quiz_table_name ( quiz_id BIGINT(20) NOT NULL AUTO_INCREMENT, quiz_title VARCHAR(255) NOT NULL, - quiz_title_test VARCHAR(255) NOT NULL, + quiz_feedback VARCHAR(255) NOT NULL, quiz_status VARCHAR(11) NOT NULL, quiz_finish_message VARCHAR(510) NOT NULL, quiz_owner BIGINT(20) NOT NULL, @@ -180,7 +180,7 @@ public function create_tables() $quiz_option_table_name = $this->quiz_option_table_name; - $quiz_option_sql = "CREATE TABLE $quiz_option_table_name ( + $quiz_option_sql = "CREATE TABLE $quiz_option_table_name ( quiz_option_id BIGINT(20) NOT NULL AUTO_INCREMENT, quiz_id BIGINT(20) NOT NULL, quiz_option_name VARCHAR(191) NOT NULL, diff --git a/includes/class-enp_quiz-question.php b/includes/class-enp_quiz-question.php index 64600665..2563bd39 100644 --- a/includes/class-enp_quiz-question.php +++ b/includes/class-enp_quiz-question.php @@ -489,7 +489,9 @@ public function get_question_type() { public function get_question_explanation() { $question_explanation = $this->question_explanation; // ? TODO: perfect the target attribute add. kindof buggy. - $question_explanation = preg_replace('/(<]*)>/i', '$1 target="_blank">', $question_explanation); + + $question_explanation = stripslashes($question_explanation); + // = preg_replace('/(<]*)>/i', '$1 target="_blank">', $question_explanation); return $question_explanation; } diff --git a/includes/class-enp_quiz-quiz.php b/includes/class-enp_quiz-quiz.php index 33b68cfe..5d1e028e 100644 --- a/includes/class-enp_quiz-quiz.php +++ b/includes/class-enp_quiz-quiz.php @@ -4,12 +4,13 @@ * Create a quiz object * @param $quiz_id = the id of the quiz you want to get * @return quiz object + * $quiz_title_test, */ class Enp_quiz_Quiz { public $quiz_id, $quiz_title, - $quiz_title_test, + $quiz_feedback, $quiz_status, $quiz_finish_message, $quiz_owner, @@ -75,11 +76,13 @@ public function select_quiz_by_id($quiz_id) /** * Hook up all the values for the object * @param $quiz = row from the quiz_table + * $this->quiz_title_test = $this->set_quiz_title_test(); */ protected function set_quiz_object_values() { $this->quiz_id = $this->set_quiz_id(); $this->quiz_title = $this->set_quiz_title(); + $this->quiz_feedback = $this->set_quiz_feedback(); $this->quiz_status = $this->set_quiz_status(); $this->quiz_finish_message = $this->set_quiz_finish_message(); $this->quiz_owner = $this->set_quiz_owner(); @@ -168,10 +171,21 @@ protected function set_quiz_title() * @param $quiz = quiz row from quiz database table * @return quiz_title_test field from the database */ - protected function set_quiz_title_test() + // protected function set_quiz_title_test() + // { + // $quiz_title_test = stripslashes(self::$quiz['quiz_title_test']); + // return $quiz_title_test; + // } + + /** + * Set the quiz_feedback for our Quiz Object + * @param $quiz = quiz row from quiz database table + * @return quiz_feedback field from the database + */ + protected function set_quiz_feedback() { - $quiz_title_test = stripslashes(self::$quiz['quiz_title_test']); - return $quiz_title_test; + $quiz_feedback = stripslashes(self::$quiz['quiz_feedback']); + return $quiz_feedback; } /** @@ -386,10 +400,21 @@ public function get_quiz_title() * @param $quiz = quiz object * @return quiz_title_test from the object */ - public function get_quiz_title_test() + // public function get_quiz_title_test() + // { + // $quiz_title_test = $this->quiz_title_test; + // return $quiz_title_test; + // } + + /** + * Get the quiz_feedback for our Quiz Object + * @param $quiz = quiz object + * @return quiz_feedback from the object + */ + public function get_quiz_feedback() { - $quiz_title_test = $this->quiz_title_test; - return $quiz_title_test; + $quiz_feedback = $this->quiz_feedback; + return $quiz_feedback; } /** @@ -504,6 +529,16 @@ public function get_quiz_title_display() return $this->get_quiz_option('quiz_title_display'); } + /** + * Get the quiz_title_test_display for our Quiz Object + * @param $quiz = quiz object + * @return (string) 'show' or 'hide' + */ + // public function get_quiz_title_test_display() + // { + // return $this->get_quiz_option('quiz_title_test_display'); + // } + /** * Get the quiz_width for our Quiz Object @@ -625,6 +660,93 @@ public function get_facebook_description() return $this->get_quiz_option('facebook_description'); } + /** + * Get the quiz_end_fail_title for our Quiz Object + * + * @param $quiz = quiz object + * @return string + */ + public function get_quiz_end_fail_title() + { + return $this->get_quiz_option('quiz_end_fail_title'); + } + + /** + * Get the quiz_end_fail_description for our Quiz Object + * + * @param $quiz = quiz object + * @return string + */ + public function get_quiz_end_fail_description() + { + return $this->get_quiz_option('quiz_end_fail_description'); + } + + /** + * Get the quiz_end_average_title for our Quiz Object + * + * @param $quiz = quiz object + * @return string + */ + public function get_quiz_end_average_title() + { + return $this->get_quiz_option('quiz_end_average_title'); + } + + /** + * Get the quiz_end_average_description for our Quiz Object + * + * @param $quiz = quiz object + * @return string + */ + public function get_quiz_end_average_description() + { + return $this->get_quiz_option('quiz_end_average_description'); + } + + /** + * Get the quiz_end_good_title for our Quiz Object + * + * @param $quiz = quiz object + * @return string + */ + public function get_quiz_end_good_title() + { + return $this->get_quiz_option('quiz_end_good_title'); + } + + /** + * Get the quiz_end_good_description for our Quiz Object + * + * @param $quiz = quiz object + * @return string + */ + public function get_quiz_end_good_description() + { + return $this->get_quiz_option('quiz_end_good_description'); + } + + /** + * Get the quiz_end_perfect_title for our Quiz Object + * + * @param $quiz = quiz object + * @return string + */ + public function get_quiz_end_perfect_title() + { + return $this->get_quiz_option('quiz_end_perfect_title'); + } + + /** + * Get the quiz_end_perfect_description for our Quiz Object + * + * @param $quiz = quiz object + * @return string + */ + public function get_quiz_end_perfect_description() + { + return $this->get_quiz_option('quiz_end_perfect_description'); + } /** * Get the facebook_quote_end for our Quiz Object * @param $quiz = quiz object diff --git a/public/quiz-create/class-enp_quiz-create.php b/public/quiz-create/class-enp_quiz-create.php index e6a39bb3..492d7e53 100755 --- a/public/quiz-create/class-enp_quiz-create.php +++ b/public/quiz-create/class-enp_quiz-create.php @@ -20,7 +20,8 @@ * @subpackage Enp_quiz/public * @author Engaging News Project */ -class Enp_quiz_Create { +class Enp_quiz_Create +{ /** * The ID of this plugin. @@ -33,9 +34,9 @@ class Enp_quiz_Create { public static $message, - $nonce, - $saved_quiz_id, - $user_action; + $nonce, + $saved_quiz_id, + $user_action; /** * Initialize the class and set its properties. @@ -43,41 +44,44 @@ class Enp_quiz_Create { * @since 0.0.1 * @param string $plugin_name The name of the plugin. */ - public function __construct( $plugin_name ) { + public function __construct($plugin_name) + { // set-up class $this->plugin_name = $plugin_name; - include_once(WP_CONTENT_DIR.'/enp-quiz-config.php'); + include_once(WP_CONTENT_DIR . '/enp-quiz-config.php'); add_action('init', array($this, 'set_enp_quiz_nonce'), 1); add_action('init', array($this, 'add_enp_quiz_rewrite_tags')); // redirect to the page they should go to - add_action('template_redirect', array($this, 'enp_quiz_template_rewrite_catch' )); + add_action('template_redirect', array($this, 'enp_quiz_template_rewrite_catch')); // add our ajax save to be available - add_action( 'wp_ajax_save_quiz', array($this, 'save_quiz'), 1 ); - add_action( 'wp_ajax_save_ab_test', array($this, 'save_ab_test'), 1 ); + add_action('wp_ajax_save_quiz', array($this, 'save_quiz'), 1); + add_action('wp_ajax_save_ab_test', array($this, 'save_ab_test'), 1); // we're including this as a fallback for the other pages. - // process save, if necessary - // if the enp-quiz-submit is posted, then they probably want to try to - // save the quiz. Be nice, try to save the quiz. - if(isset($_POST['enp-quiz-submit'])) { - add_action('template_redirect', array($this, 'save_quiz'), 1); - } elseif(isset($_POST['enp-ab-test-submit'])) { + // process save, if necessary + // if the enp-quiz-submit is posted, then they probably want to try to + // save the quiz. Be nice, try to save the quiz. + if (isset($_POST['enp-quiz-submit'])) { + add_action('template_redirect', array($this, 'save_quiz'), 1); + } elseif (isset($_POST['enp-ab-test-submit'])) { add_action('template_redirect', array($this, 'save_ab_test'), 1); } } - public function set_enp_quiz_nonce() { + public function set_enp_quiz_nonce() + { //Start the session - session_start(); - //Start the class - self::$nonce = new Enp_quiz_Nonce(); + session_start(); + //Start the class + self::$nonce = new Enp_quiz_Nonce(); } - public function get_enp_quiz_nonce() { + public function get_enp_quiz_nonce() + { $return = true; return self::$nonce->outputKey($return); } @@ -87,15 +91,16 @@ public function get_enp_quiz_nonce() { * * @since 0.0.1 */ - public function enqueue_styles() { - - wp_register_style( $this->plugin_name.'-quiz-create', plugin_dir_url( __FILE__ ) . 'css/enp_quiz-create.min.css', array(), ENP_QUIZ_VERSION ); - wp_enqueue_style( $this->plugin_name.'-quiz-create' ); + public function enqueue_styles() + { + wp_register_style($this->plugin_name . '-quiz-create', plugin_dir_url(__FILE__) . 'css/enp_quiz-create.min.css', array(), ENP_QUIZ_VERSION); + wp_enqueue_style($this->plugin_name . '-quiz-create'); } // if we're not an admin, override WP's margin-top reserved for the admin bar - public function override_wp_admin_bar_css() { + public function override_wp_admin_bar_css() + { print_r(''); } @@ -104,18 +109,17 @@ public function override_wp_admin_bar_css() { * * @since 0.0.1 */ - public function enqueue_scripts() { - - - + public function enqueue_scripts() + { } /* * Adds a enp_quiz_template parameter for WordPress to look for * ?enp_quiz_template=dashboard */ - public function add_enp_quiz_rewrite_tags(){ - add_rewrite_tag( '%enp_quiz_template%', '([^/]+)' ); - add_rewrite_tag( '%enp_quiz_id%', '([^/]+)' ); + public function add_enp_quiz_rewrite_tags() + { + add_rewrite_tag('%enp_quiz_template%', '([^/]+)'); + add_rewrite_tag('%enp_quiz_id%', '([^/]+)'); } /* @@ -127,28 +131,28 @@ public function add_enp_quiz_rewrite_tags(){ * * @since 0.0.1 */ - public function enp_quiz_template_rewrite_catch() { + public function enp_quiz_template_rewrite_catch() + { global $wp_query; // see if enp_quiz_template is one of the query_vars posted - if ( array_key_exists( 'enp_quiz_template', $wp_query->query_vars ) ) { + if (array_key_exists('enp_quiz_template', $wp_query->query_vars)) { // if it's there, then see what the value is - $this->template = $wp_query->get( 'enp_quiz_template' ); - $this->template_file = ENP_QUIZ_CREATE_TEMPLATES_PATH.'/'.$this->template.'.php'; + $this->template = $wp_query->get('enp_quiz_template'); + $this->template_file = ENP_QUIZ_CREATE_TEMPLATES_PATH . '/' . $this->template . '.php'; // make sure we have a user // and if they're accessing a quiz, that they own it $this->validate_user(); // make sure there's something there - if(!empty($this->template)) { + if (!empty($this->template)) { // convert the dashes (-) to underscores (_) so it will match a function - $this->template_underscored = str_replace('-','_',$this->template); + $this->template_underscored = str_replace('-', '_', $this->template); // load all the resources we need $this->load_quiz_create_resources(); // load the template $this->load_template(); - } } } @@ -157,47 +161,49 @@ public function enp_quiz_template_rewrite_catch() { * Load all the scripts, css, and any other filters/hooks that * need to run on a quiz create page */ - public function load_quiz_create_resources() { + public function load_quiz_create_resources() + { // load take quiz styles add_action('wp_enqueue_scripts', array($this, 'enqueue_styles')); // load take quiz scripts add_action('wp_enqueue_scripts', array($this, 'enqueue_scripts')); // custom action hook for displaying messages - add_action( 'enp_quiz_display_messages', array($this, 'display_messages' )); + add_action('enp_quiz_display_messages', array($this, 'display_messages')); // set title tag - add_filter( 'document_title_parts', array($this, 'set_title_tag')); + add_filter('document_title_parts', array($this, 'set_title_tag')); // don't remove wp_admin bar for admins - $is_admin_user = current_user_can( 'manage_options' ); - if ( $is_admin_user === false) { + $is_admin_user = current_user_can('manage_options'); + if ($is_admin_user === false) { add_filter('show_admin_bar', '__return_false'); add_action('wp_head', array($this, 'override_wp_admin_bar_css')); } - } /** - * Get the requested quiz_id from the URL - * @return quiz_id if found, else false - * @since 0.0.1 - **/ - public function enp_quiz_id_rewrite_catch() { + * Get the requested quiz_id from the URL + * @return quiz_id if found, else false + * @since 0.0.1 + **/ + public function enp_quiz_id_rewrite_catch() + { global $wp_query; $quiz_id = false; // see if enp_quiz_template is one of the query_vars posted - if ( array_key_exists( 'enp_quiz_id', $wp_query->query_vars ) ) { + if (array_key_exists('enp_quiz_id', $wp_query->query_vars)) { // if it's there, then see what the value is - $quiz_id = $wp_query->get( 'enp_quiz_id' ); + $quiz_id = $wp_query->get('enp_quiz_id'); } return $quiz_id; } /** - * Get the requested ab_test_id from the URL - * @return quiz_id if found, else false - * @since 0.0.1 - **/ - public function enp_ab_test_id_rewrite_catch() { + * Get the requested ab_test_id from the URL + * @return quiz_id if found, else false + * @since 0.0.1 + **/ + public function enp_ab_test_id_rewrite_catch() + { // same as the quiz_id request right now return $this->enp_quiz_id_rewrite_catch(); } @@ -207,15 +213,16 @@ public function enp_ab_test_id_rewrite_catch() { * If it's not found, show the dashboard instead * @since 0.0.1 */ - public function load_template() { + public function load_template() + { // load our default page template instead of their theme template add_filter('template_include', array($this, 'load_page_template'), 1, 1); // add enp-quiz class to the body add_filter('body_class', array($this, 'add_enp_quiz_body_class')); // check to make sure the template file exists - if(file_exists($this->template_file)) { + if (file_exists($this->template_file)) { // set our classname to load (ie - load_dashboard) - $load_template = 'load_'.$this->template_underscored; + $load_template = 'load_' . $this->template_underscored; // load the template dynamically based on the template name $this->$load_template(); } else { @@ -227,10 +234,11 @@ public function load_template() { /* * Sets Title Tag attribute based on template filename */ - public function set_title_tag($title) { + public function set_title_tag($title) + { // $title is an array returned by WP of all the pieces // we just need to change the title attribute - $page_title = str_replace('-',' ',$this->template); + $page_title = str_replace('-', ' ', $this->template); $page_title = ucwords($page_title); $title['title'] = $page_title; @@ -240,26 +248,28 @@ public function set_title_tag($title) { /* * Loads quiz object based on url query */ - public function load_quiz() { - // prepare the quiz object - $quiz_id = $this->enp_quiz_id_rewrite_catch(); + public function load_quiz() + { + // prepare the quiz object + $quiz_id = $this->enp_quiz_id_rewrite_catch(); // set-up variables - $quiz = new Enp_quiz_Quiz($quiz_id); + $quiz = new Enp_quiz_Quiz($quiz_id); // check to see if the user owns this quiz - return $quiz; - } + return $quiz; + } /* * Loads quiz object based on url query */ - public function load_ab_test_object() { - // prepare the quiz object - $ab_test_id = $this->enp_ab_test_id_rewrite_catch(); + public function load_ab_test_object() + { + // prepare the quiz object + $ab_test_id = $this->enp_ab_test_id_rewrite_catch(); // set-up variables - $ab_test = new Enp_quiz_AB_test($ab_test_id); + $ab_test = new Enp_quiz_AB_test($ab_test_id); // check to see if the user owns this quiz - return $ab_test; - } + return $ab_test; + } /* * Checks to see if a quiz is valid or not, * then redirects to quiz create page if invalid @@ -271,32 +281,32 @@ public function load_ab_test_object() { * the publish button) * It won't SAVE their previous settings, but they will still be able to edit them. */ - public function validate_quiz_redirect($quiz, $publish = false) { + public function validate_quiz_redirect($quiz, $publish = false) + { $response = new Enp_quiz_Save_quiz_Response(); - $validate = $response->validate_quiz_and_questions($quiz); - if($validate === 'invalid') { + $validate = $response->validate_quiz_and_questions($quiz); + if ($validate === 'invalid') { // combine the arrays - if(is_array(self::$message['error'])) { + if (is_array(self::$message['error'])) { self::$message['error'] = array_merge(self::$message['error'], $response->get_error_messages()); } else { self::$message['error'] = $response->get_error_messages(); } // check to make sure there's actually a quiz... - if($quiz->get_quiz_id() === null) { + if ($quiz->get_quiz_id() === null) { // nope... redirect to quiz create $this->redirect_to_quiz_create('new'); } else { // There's a quiz, it's just an invalid quiz. // Send them back to the create page to fix it. - $this->redirect_to_quiz_create($quiz->get_quiz_id()); + $this->redirect_to_quiz_create($quiz->get_quiz_id()); } - - } elseif($validate === 'valid' && $publish === 'publish') { + } elseif ($validate === 'valid' && $publish === 'publish') { // let's just send them to the preview page if they're trying to // access the publish URL on a NON-published quiz - if($quiz->get_quiz_status() !== 'published') { + if ($quiz->get_quiz_status() !== 'published') { // add error message // add error message self::$message['error'][] = "Please use the Publish Button to publish a quiz instead of the Breadcrumb Publish link."; @@ -310,124 +320,136 @@ public function validate_quiz_redirect($quiz, $publish = false) { * If a quiz is published, we won't let them access the create page * and redirect them to preview page */ - public function quiz_published_redirect($quiz) { - if($quiz->get_quiz_status() === 'published') { + public function quiz_published_redirect($quiz) + { + if ($quiz->get_quiz_status() === 'published') { // add error message self::$message['note'][] = "You can only make text and image changes to published quizzes. Please create a new quiz if you need to add questions or change answers."; - // uh oh, invalid quiz. Send them back to the create page to fix it. - // $this->redirect_to_quiz_preview($quiz->get_quiz_id()); - } + // uh oh, invalid quiz. Send them back to the create page to fix it. + // $this->redirect_to_quiz_preview($quiz->get_quiz_id()); + } } /* * for child classes to set the variable on the user_action */ - public function load_user_action() { - if(!empty(self::$user_action)) { + public function load_user_action() + { + if (!empty(self::$user_action)) { return self::$user_action; - } elseif(isset($_GET['enp_user_action'])) { + } elseif (isset($_GET['enp_user_action'])) { return $_GET['enp_user_action']; } else { return false; } - } - public function add_enp_quiz_body_class($classes) { + public function add_enp_quiz_body_class($classes) + { $classes[] = 'enp-quiz'; - $classes[] = 'enp-'.$this->template; + $classes[] = 'enp-' . $this->template; return $classes; } - public function load_page_template() { + public function load_page_template() + { return ENP_QUIZ_CREATE_MAIN_TEMPLATE_PATH; } - public function load_ab_test() { - include_once(dirname(__FILE__).'/includes/class-enp_quiz-ab_test_view.php'); + public function load_ab_test() + { + include_once(dirname(__FILE__) . '/includes/class-enp_quiz-ab_test_view.php'); new Enp_quiz_AB_test_view(); } - public function load_ab_results() { - include_once(dirname(__FILE__).'/includes/class-enp_quiz-quiz_results.php'); - include_once(dirname(__FILE__).'/includes/class-enp_quiz-ab_results.php'); + public function load_ab_results() + { + include_once(dirname(__FILE__) . '/includes/class-enp_quiz-quiz_results.php'); + include_once(dirname(__FILE__) . '/includes/class-enp_quiz-ab_results.php'); new Enp_quiz_AB_results(); } - public function load_dashboard() { - include_once(dirname(__FILE__).'/includes/class-enp_quiz-dashboard.php'); + public function load_dashboard() + { + include_once(dirname(__FILE__) . '/includes/class-enp_quiz-dashboard.php'); new Enp_quiz_Dashboard(); } - public function load_quiz_create() { + public function load_quiz_create() + { $this->load_breadcrumbs(); - include_once(dirname(__FILE__).'/includes/class-enp_quiz-quiz_create.php'); + include_once(dirname(__FILE__) . '/includes/class-enp_quiz-quiz_create.php'); new Enp_quiz_Quiz_create(); } - public function load_quiz_preview() { + public function load_quiz_preview() + { $this->load_breadcrumbs(); - include_once(dirname(__FILE__).'/includes/class-enp_quiz-quiz_preview.php'); + include_once(dirname(__FILE__) . '/includes/class-enp_quiz-quiz_preview.php'); new Enp_quiz_Quiz_preview(); } - public function load_quiz_publish() { + public function load_quiz_publish() + { $this->load_breadcrumbs(); - include_once(dirname(__FILE__).'/includes/class-enp_quiz-quiz_publish.php'); + include_once(dirname(__FILE__) . '/includes/class-enp_quiz-quiz_publish.php'); new Enp_quiz_Quiz_publish(); } - public function load_quiz_results() { - include_once(dirname(__FILE__).'/includes/class-enp_quiz-quiz_results.php'); + public function load_quiz_results() + { + include_once(dirname(__FILE__) . '/includes/class-enp_quiz-quiz_results.php'); new Enp_quiz_Quiz_results(); } - public function load_breadcrumbs() { - include_once(dirname(__FILE__).'/includes/class-enp_quiz-breadcrumbs.php'); + public function load_breadcrumbs() + { + include_once(dirname(__FILE__) . '/includes/class-enp_quiz-breadcrumbs.php'); } - public function save_quiz() { + public function save_quiz() + { // make sure they're logged in and own this quiz // returns current_user_id if valid $user_id = $this->validate_user(); $params = array(); - if(isset($_POST['enp_quiz'])) { - $posted_quiz = $_POST['enp_quiz']; - if(isset($posted_quiz['new_quiz'])) { - $new_quiz_flag = $posted_quiz['new_quiz']; - } else { - $new_quiz_flag = '0'; - } - } - if(isset($_POST['enp_question'])) { - $posted_question = $_POST['enp_question']; + if (isset($_POST['enp_quiz'])) { + $posted_quiz = $_POST['enp_quiz']; + if (isset($posted_quiz['new_quiz'])) { + $new_quiz_flag = $posted_quiz['new_quiz']; + } else { + $new_quiz_flag = '0'; + } + } + if (isset($_POST['enp_question'])) { + $posted_question = $_POST['enp_question']; } - if(isset($_POST['enp-quiz-submit'])) { + if (isset($_POST['enp-quiz-submit'])) { $posted_user_action = $_POST['enp-quiz-submit']; } - if(isset($_POST['enp_quiz_nonce'])) { + if (isset($_POST['enp_quiz_nonce'])) { $posted_nonce = $_POST['enp_quiz_nonce']; } - //Is it a POST request? - if($_SERVER['REQUEST_METHOD'] === 'POST') { + //Is it a POST request? + if ($_SERVER['REQUEST_METHOD'] === 'POST') { - //Validate the form key - if(!isset($posted_nonce) || !self::$nonce->validate($posted_nonce)) { - // Form key is invalid, - // return them to the page (they're probably refreshing the page) - self::$message['error'][] = 'Quiz was not resaved'; + //Validate the form key + if (!isset($posted_nonce) || !self::$nonce->validate($posted_nonce)) { + // Form key is invalid, + // return them to the page (they're probably refreshing the page) + self::$message['error'][] = 'Quiz was not resaved'; - return false; - } - } - // initiate the save_quiz object + return false; + } + } + // initiate the save_quiz object // get access to wpdb global $wpdb; // set-up an empty array for our quiz submission @@ -437,19 +459,19 @@ public function save_quiz() { // set the date_time to pass $date_time = date("Y-m-d H:i:s"); // build our array to save - if(isset($posted_quiz)) { + if (isset($posted_quiz)) { $quiz = array( - 'quiz' => $posted_quiz, - 'quiz_updated_by' => $user_id, - 'quiz_updated_at' => $date_time, - ); + 'quiz' => $posted_quiz, + 'quiz_updated_by' => $user_id, + 'quiz_updated_at' => $date_time, + ); } - if(isset($posted_question) && !empty($posted_question)) { + if (isset($posted_question) && !empty($posted_question)) { $quiz['question'] = $posted_question; } - if(isset($posted_user_action) && !empty($posted_user_action)) { + if (isset($posted_user_action) && !empty($posted_user_action)) { // get the value of the button they clicked $quiz['user_action'] = $posted_user_action; } else { @@ -475,12 +497,12 @@ public function save_quiz() { // check to see if we have a successful save response from the save class // REMEMBER: A successful save can still have an error message // such as "Quiz Updated. Hey! You don't have any questions though!" - if($response->status !== 'success') { + if ($response->status !== 'success') { // No successful save, so return them to the same page and display error messages return false; } - //*************************// - // SUCCESS! Now what...? // + //*************************// + // SUCCESS! Now what...? // //*************************// if (defined('DOING_AJAX') && DOING_AJAX) { @@ -492,7 +514,7 @@ public function save_quiz() { } // if they want to go to the preview page AND there are no errors, // let them move on to the preview page - elseif(self::$user_action['action'] === 'next' && self::$user_action['element'] === 'preview' && empty(self::$message['error'])) { + elseif (self::$user_action['action'] === 'next' && self::$user_action['element'] === 'preview' && empty(self::$message['error'])) { // unset the cookies for the current quiz // in case they deleted questions and just in general // to make it feel as expected (starting quiz from beginning) @@ -501,7 +523,7 @@ public function save_quiz() { $this->redirect_to_quiz_preview($quiz_id); } // if they want to move on to the quiz-publish page and there are no errors, let them - elseif(self::$user_action['action'] === 'next' && self::$user_action['element'] === 'publish' && empty(self::$message['error'])) { + elseif (self::$user_action['action'] === 'next' && self::$user_action['element'] === 'publish' && empty(self::$message['error'])) { // unset the cookies for the current quiz $published_quiz = new Enp_quiz_Quiz($quiz_id); $this->unset_quiz_take_cookies($published_quiz); @@ -509,39 +531,41 @@ public function save_quiz() { $this->redirect_to_quiz_publish($quiz_id); } // catch if we're just creating the new quiz, send them to the new quiz page - elseif($save_action === 'insert' || $new_quiz_flag === '1') { + elseif ($save_action === 'insert' || $new_quiz_flag === '1') { // they don't want to move on yet, but they're inserting, // so we need to send them to their newly created quiz create page $this->redirect_to_quiz_create($quiz_id); } // we're just updating the same page, return false to send them back - else { + else { // we have errors! Oh no! Send them back to fix it return false; } - } - protected function redirect_to_quiz_create($quiz_id) { + protected function redirect_to_quiz_create($quiz_id) + { // set a messages array to pass to url on redirect - $url_query = http_build_query(array('enp_messages' => self::$message, 'enp_user_action'=> self::$user_action)); + $url_query = http_build_query(array('enp_messages' => self::$message, 'enp_user_action' => self::$user_action)); // they just created a new page (quiz) so we need to redirect them to it and post our messages - wp_redirect( ENP_QUIZ_CREATE_URL.$quiz_id.'/?'.$url_query ); + wp_redirect(ENP_QUIZ_CREATE_URL . $quiz_id . '/?' . $url_query); exit; } - protected function redirect_to_quiz_preview($quiz_id) { + protected function redirect_to_quiz_preview($quiz_id) + { // set a messages array to pass to url on redirect - $url_query = http_build_query(array('enp_messages' => self::$message, 'enp_user_action'=> self::$user_action)); + $url_query = http_build_query(array('enp_messages' => self::$message, 'enp_user_action' => self::$user_action)); - wp_redirect( ENP_QUIZ_PREVIEW_URL.$quiz_id.'/?'.$url_query ); + wp_redirect(ENP_QUIZ_PREVIEW_URL . $quiz_id . '/?' . $url_query); exit; } - protected function redirect_to_quiz_publish($quiz_id) { + protected function redirect_to_quiz_publish($quiz_id) + { // set a messages array to pass to url on redirect - $url_query = http_build_query(array('enp_messages' => self::$message, 'enp_user_action'=> self::$user_action)); - wp_redirect( ENP_QUIZ_PUBLISH_URL.$quiz_id.'/?'.$url_query ); + $url_query = http_build_query(array('enp_messages' => self::$message, 'enp_user_action' => self::$user_action)); + wp_redirect(ENP_QUIZ_PUBLISH_URL . $quiz_id . '/?' . $url_query); exit; } @@ -551,29 +575,29 @@ public function save_ab_test() { // returns current_user_id if valid $user_id = $this->validate_user(); - if(isset($_POST['enp_quiz_nonce'])) { + if (isset($_POST['enp_quiz_nonce'])) { $posted_nonce = $_POST['enp_quiz_nonce']; } - //Is it a POST request? - if($_SERVER['REQUEST_METHOD'] === 'POST') { + //Is it a POST request? + if ($_SERVER['REQUEST_METHOD'] === 'POST') { - //Validate the form key - if(!isset($posted_nonce) || !self::$nonce->validate($posted_nonce)) { - // Form key is invalid, - // return them to the page (they're probably refreshing the page) - self::$message['error'][] = 'AB Test was not saved'; + //Validate the form key + if (!isset($posted_nonce) || !self::$nonce->validate($posted_nonce)) { + // Form key is invalid, + // return them to the page (they're probably refreshing the page) + self::$message['error'][] = 'AB Test was not saved'; - return false; - } - } + return false; + } + } $params = $_POST; $params['ab_test_updated_by'] = $user_id; $save_ab_test = new Enp_quiz_Save_ab_test(); - if($params['enp-ab-test-submit'] === 'enp-ab-test-create') { + if ($params['enp-ab-test-submit'] === 'enp-ab-test-create') { $response = $save_ab_test->save($params); - } elseif($params['enp-ab-test-submit'] === 'delete-ab-test') { + } elseif ($params['enp-ab-test-submit'] === 'delete-ab-test') { $response = $save_ab_test->delete($params); } else { self::$message['error'][] = 'We\'re not sure what you want to do. Please contact us and let us know how you got to this error message.'; @@ -589,26 +613,26 @@ public function save_ab_test() { exit(); } // if we're not doing AJAX, find out what we need to do - elseif(empty(self::$message['error']) && $response['status'] === 'success' && $response['action'] === 'insert' && isset($response['ab_test_id'])) { + elseif (empty(self::$message['error']) && $response['status'] === 'success' && $response['action'] === 'insert' && isset($response['ab_test_id'])) { // successful insert, so redirect them to the embed code section of the results page // set a messages array to pass to url on redirect $url_query = http_build_query(array('enp_messages' => self::$message, 'enp_user_action' => 'ab_test_created')); // they just created a new page (quiz) so we need to redirect them to it and post our messages - wp_redirect( ENP_AB_RESULTS_URL.$response['ab_test_id'].'/?'.$url_query ); + wp_redirect(ENP_AB_RESULTS_URL . $response['ab_test_id'] . '/?' . $url_query); exit; } return $response; - } /** - * Set the success/error message(s) off of the response from quiz_save - * @param $response (object) response from quiz_save - * @return messages set - */ - public function set_message($response) { - if(isset($response->message)) { + * Set the success/error message(s) off of the response from quiz_save + * @param $response (object) response from quiz_save + * @return messages set + */ + public function set_message($response) + { + if (isset($response->message)) { return $response->message; } else { return false; @@ -616,22 +640,23 @@ public function set_message($response) { } /** - * Process any error/success messages and output - * them to the browser. - * @return false if message, HTML output with messages if found - * @usage Display in templates using an action hook - * do_action('enp_quiz_display_messages'); - * To set error messages from child classes, add - * parent::$messages['error'][] = 'error message'; - */ - public function display_messages() { + * Process any error/success messages and output + * them to the browser. + * @return false if message, HTML output with messages if found + * @usage Display in templates using an action hook + * do_action('enp_quiz_display_messages'); + * To set error messages from child classes, add + * parent::$messages['error'][] = 'error message'; + */ + public function display_messages() + { // try to get self::$message first bc they might // have reloaded a page with a $_GET variable or something // and we want our self::$message ones to override that - if(!empty(self::$message)) { + if (!empty(self::$message)) { // check for self first $messages = self::$message; - } elseif(isset($_GET['enp_messages'])) { + } elseif (isset($_GET['enp_messages'])) { // check URL second $messages = $_GET['enp_messages']; } else { @@ -639,38 +664,38 @@ public function display_messages() { return false; } - $message_content = ''; - if(!empty($messages['error'])) { - $message_type = 'error'; + $message_content = ''; + if (!empty($messages['error'])) { + $message_type = 'error'; $message_content .= $this->display_message_html($messages['error'], $message_type); - } - if(!empty($messages['success'])) { - $message_type = 'success'; + } + if (!empty($messages['success'])) { + $message_type = 'success'; $message_content .= $this->display_message_html($messages['success'], $message_type); - } - if(!empty($messages['note'])) { + } + if (!empty($messages['note'])) { $message_type = 'note'; $message_content .= $this->display_message_html($messages['note'], $message_type); } - if(!empty($message_content)) { - echo $message_content; - } else { + if (!empty($message_content)) { + echo $message_content; + } else { return false; } + } - } - - public function display_message_html($messages, $message_type) { + public function display_message_html($messages, $message_type) + { $message_html = ''; - if(!empty($messages) && !empty($message_type)) { - $message_html .= '
    -

    '.$message_type.'

    -
      '; - foreach($messages as $message) { - $message_html .= '
    • '.stripslashes($message).'
    • '; - } - $message_html .='
    + if (!empty($messages) && !empty($message_type)) { + $message_html .= '
    +

    ' . $message_type . '

    +
      '; + foreach ($messages as $message) { + $message_html .= '
    • ' . stripslashes($message) . '
    • '; + } + $message_html .= '
    '; } @@ -685,14 +710,15 @@ public function display_message_html($messages, $message_type) { * @return get_current_user_id(); OR Redirect to login page * @since 0.0.1 */ - public function validate_user() { - if(is_user_logged_in() === false) { + public function validate_user() + { + if (is_user_logged_in() === false) { auth_redirect(); } else { $current_user_id = get_current_user_id(); // see if user is admin or not - if(current_user_can('manage_options') === false) { + if (current_user_can('manage_options') === false) { // do error checks for validation if the user isn't an admin $this->validate_user__check_if_owner($current_user_id); } @@ -701,26 +727,27 @@ public function validate_user() { } } - public function validate_user__check_if_owner($current_user_id) { + public function validate_user__check_if_owner($current_user_id) + { // if we're loading a template, find out which one and set the vars accordingly - if(!empty($this->template)) { - if($this->template === 'ab-test' || $this->template === 'ab-results') { + if (!empty($this->template)) { + if ($this->template === 'ab-test' || $this->template === 'ab-results') { // load the ab_test_object // they're logged in, but do they own this quiz? // get the quiz, if any $ab_test = $this->load_ab_test_object(); - if(is_object($ab_test)) { + if (is_object($ab_test)) { $ab_test_id = $ab_test->get_ab_test_id(); $ab_test_owner = $ab_test->get_ab_test_owner(); // looks like we have a real quiz - if($ab_test_id !== null && $ab_test_owner !== null) { + if ($ab_test_id !== null && $ab_test_owner !== null) { // see if the owner matches the current user - if((int) $ab_test_owner !== $current_user_id) { + if ((int) $ab_test_owner !== $current_user_id) { // Hey! Get outta here! self::$message['error'][] = "You don't have permission to view this AB Test."; - $url_query = http_build_query(array('enp_messages' => self::$message, 'enp_user_action'=> self::$user_action)); - wp_redirect( ENP_QUIZ_DASHBOARD_URL.'user/?'.$url_query ); + $url_query = http_build_query(array('enp_messages' => self::$message, 'enp_user_action' => self::$user_action)); + wp_redirect(ENP_QUIZ_DASHBOARD_URL . 'user/?' . $url_query); exit; } else { // valid! @@ -732,17 +759,17 @@ public function validate_user__check_if_owner($current_user_id) { // they're logged in, but do they own this quiz? // get the quiz, if any $quiz = $this->load_quiz(); - if(is_object($quiz)) { + if (is_object($quiz)) { $quiz_id = $quiz->get_quiz_id(); $quiz_owner = $quiz->get_quiz_owner(); // looks like we have a real quiz - if($quiz_id !== null && $quiz_owner !== null) { + if ($quiz_id !== null && $quiz_owner !== null) { // see if the owner matches the current user - if((int) $quiz_owner !== $current_user_id) { + if ((int) $quiz_owner !== $current_user_id) { // Hey! Get outta here! self::$message['error'][] = "You don't have permission to edit that quiz."; - $url_query = http_build_query(array('enp_messages' => self::$message, 'enp_user_action'=> self::$user_action)); - wp_redirect( ENP_QUIZ_DASHBOARD_URL.'user/?'.$url_query ); + $url_query = http_build_query(array('enp_messages' => self::$message, 'enp_user_action' => self::$user_action)); + wp_redirect(ENP_QUIZ_DASHBOARD_URL . 'user/?' . $url_query); exit; } else { // valid! @@ -755,22 +782,23 @@ public function validate_user__check_if_owner($current_user_id) { /** - * Utility function for returning a percentage - * @param $part (int) The number you want to see what it's a percentage of - * @param $whole (int) The whole you want a percentage of - * @param $decimals (int) How many decimal places you want returned. Defaults to no modification. - */ - public function percentagize($part, $whole, $decimals = false) { + * Utility function for returning a percentage + * @param $part (int) The number you want to see what it's a percentage of + * @param $whole (int) The whole you want a percentage of + * @param $decimals (int) How many decimal places you want returned. Defaults to no modification. + */ + public function percentagize($part, $whole, $decimals = false) + { $part = (int) $part; $whole = (int) $whole; // check to make sure it's valid - if($whole === 0) { + if ($whole === 0) { return 0; } // percentage function $percentage = ($part / $whole) * 100; // if they want some decimals, round it to that amount of decimals - if($decimals !== false) { + if ($decimals !== false) { $percentage = round($percentage, $decimals); } // return the percentage @@ -778,23 +806,24 @@ public function percentagize($part, $whole, $decimals = false) { } /** - * Reset all cookies for a quiz - */ - public function unset_quiz_take_cookies($quiz) { + * Reset all cookies for a quiz + */ + public function unset_quiz_take_cookies($quiz) + { // get the path that the cookies are set on - $path = parse_url(ENP_QUIZ_URL, PHP_URL_PATH).$quiz->get_quiz_id(); + $path = parse_url(ENP_QUIZ_URL, PHP_URL_PATH) . $quiz->get_quiz_id(); // open the cookie manager for taking quizzes $cookie_manager = new Enp_quiz_Cookies_Quiz_take($path); // unset all the cookies for this quiz $cookie_manager->unset_quiz_cookies($quiz); } - public function dashboard_breadcrumb_link() { - return '
    \ No newline at end of file diff --git a/public/quiz-create/templates/partials/ab-test-fieldset.php b/public/quiz-create/templates/partials/ab-test-fieldset.php index 84cbd0d6..efc306ad 100644 --- a/public/quiz-create/templates/partials/ab-test-fieldset.php +++ b/public/quiz-create/templates/partials/ab-test-fieldset.php @@ -1,12 +1,13 @@ -
    - +
    + - + get_quiz_id() . '">' . $quiz->get_quiz_title() . ''; + // echo ''; + } + ?> -
    +
    \ No newline at end of file diff --git a/public/quiz-create/templates/partials/dashboard-ab-item.php b/public/quiz-create/templates/partials/dashboard-ab-item.php index 93d70760..be33d5b8 100644 --- a/public/quiz-create/templates/partials/dashboard-ab-item.php +++ b/public/quiz-create/templates/partials/dashboard-ab-item.php @@ -1,25 +1,25 @@ get_quiz_id_a()); $quiz_b = new Enp_quiz_Quiz($ab_test->get_quiz_id_b()); -$unique_ab_test_id = $ab_test->get_ab_test_id().'a'.$ab_test->get_quiz_id_a().'b'.$ab_test->get_quiz_id_b(); +$unique_ab_test_id = $ab_test->get_ab_test_id() . 'a' . $ab_test->get_quiz_id_a() . 'b' . $ab_test->get_quiz_id_b(); ?> -
  • +
  • -

    get_ab_test_title();?>

    -
      -
    • A. get_quiz_title();?>
    • -
    • B. get_quiz_title();?>
    • +
    • A. get_quiz_title(); ?>
    • +
    • B. get_quiz_title(); ?>
    • + +
    -
  • + \ No newline at end of file diff --git a/public/quiz-create/templates/partials/dashboard-quiz-item.php b/public/quiz-create/templates/partials/dashboard-quiz-item.php index f0da4913..47a48d5d 100644 --- a/public/quiz-create/templates/partials/dashboard-quiz-item.php +++ b/public/quiz-create/templates/partials/dashboard-quiz-item.php @@ -1,35 +1,36 @@ - - -
  • +
  • -

    get_quiz_dashboard_item_title($quiz);?>

    +

    get_quiz_dashboard_item_title($quiz); ?>

    + +
    - get_quiz_created_at() );?> + get_quiz_created_at()); ?>
    - get_quiz_created_by(); - $user_info = get_userdata($created_by); - echo ' '.($user_info !== false ? "$user_info->user_email" : "user has been deleted").''; - }?> + get_quiz_created_by(); + $user_info = get_userdata($created_by); + echo ' ' . ($user_info !== false ? "$user_info->user_email" : "user has been deleted") . ''; + } ?>
    • - get_dashboard_quiz_views($quiz);?> + get_dashboard_quiz_views($quiz); ?>
      Views
    • - get_dashboard_quiz_finishes($quiz);?> + get_dashboard_quiz_finishes($quiz); ?>
      Finishes
    • - get_dashboard_quiz_score_average($quiz);?> + get_dashboard_quiz_score_average($quiz); ?>
      Average
    -
  • + \ No newline at end of file diff --git a/public/quiz-create/templates/partials/question-results-section.php b/public/quiz-create/templates/partials/question-results-section.php index 4cfcb98d..18eb60c2 100644 --- a/public/quiz-create/templates/partials/question-results-section.php +++ b/public/quiz-create/templates/partials/question-results-section.php @@ -1,27 +1,28 @@
    -
    -
    -

    get_quiz_title();?> Question Results

    -
    - Views / Completion % -
    -
    -
      - get_questions(); - foreach($question_ids as $question_id) { - // IF AB Test, we need to return AB Test Question data instead - if(isset($ab_test) && !empty($ab_test->ab_test_id)) { - $question = new Enp_quiz_Question_AB_test_result($question_id, $ab_test->get_ab_test_id()); - } else { - $question = new Enp_quiz_Question($question_id); - } +
      +
      +

      get_quiz_title(); ?> Question Results

      + +
      + Views / Completion % +
      +
      +
        + get_questions(); + foreach ($question_ids as $question_id) { + // IF AB Test, we need to return AB Test Question data instead + if (isset($ab_test) && !empty($ab_test->ab_test_id)) { + $question = new Enp_quiz_Question_AB_test_result($question_id, $ab_test->get_ab_test_id()); + } else { + $question = new Enp_quiz_Question($question_id); + } - include(ENP_QUIZ_CREATE_TEMPLATES_PATH.'partials/question-results.php'); - } + include(ENP_QUIZ_CREATE_TEMPLATES_PATH . 'partials/question-results.php'); + } - ?> -
      -
      -
    + ?> + + + \ No newline at end of file diff --git a/public/quiz-create/templates/partials/quiz-create-mc-option.php b/public/quiz-create/templates/partials/quiz-create-mc-option.php index 006b887d..c4a52b7b 100644 --- a/public/quiz-create/templates/partials/quiz-create-mc-option.php +++ b/public/quiz-create/templates/partials/quiz-create-mc-option.php @@ -4,12 +4,14 @@
  • - - - - - get_mc_option_correct_button($question_id, $mc_option_id); - echo $Quiz_create->get_mc_option_delete_button($mc_option_id); - ?> + + + + + get_mc_option_correct_button($question_id, $mc_option_id); + echo $Quiz_create->get_mc_option_delete_button($mc_option_id); + ?>
  • diff --git a/public/quiz-create/templates/partials/quiz-create-question.php b/public/quiz-create/templates/partials/quiz-create-question.php index 910f348f..f718fd86 100644 --- a/public/quiz-create/templates/partials/quiz-create-question.php +++ b/public/quiz-create/templates/partials/quiz-create-question.php @@ -70,6 +70,7 @@ $settings = array( 'textarea_name' => $editor_name, 'media_buttons' => false, // ? no media upload option + 'quicktags' => true, 'tinymce' => array( 'toolbar1' => 'link,unlink', // ? limit what shows on the toolbar 'toolbar2' => '', diff --git a/public/quiz-create/templates/quiz-create.php b/public/quiz-create/templates/quiz-create.php index 0308eca9..fa951cc3 100644 --- a/public/quiz-create/templates/quiz-create.php +++ b/public/quiz-create/templates/quiz-create.php @@ -40,7 +40,36 @@ Quiz Title - + + + @@ -71,5 +100,13 @@ + + + outputKey(); + // echo $Quiz_create->hidden_fields(); ?> + + + +
    +
    - +

    Quiz Settings

    -
    - outputKey();?> - + + outputKey(); ?> +
    Quiz Styles
    Title Display - get_quiz_title_display();?> - /> + get_quiz_title_display(); ?> + /> - /> + />
    + +
    Multiple Choice Options Order - get_quiz_mc_options_order();?> - /> + get_quiz_mc_options_order(); ?> + /> - /> + />
    - - + - + - + - + - + - + - +

    Advanced. Entered CSS could break your quiz, and is sanitized on save.

    - +
    +
    Quiz Share Text @@ -110,49 +129,99 @@ - + - - +

    Use {{score_percentage}} to show someone's score.

    - +
    - + +
    + Winners & Losers +
    +

    How would you like to address your winners & losers?

    - + + + + + +
    + + + + + + +
    + + + + + + +
    + + + + + + + +
    +
    + +
    + Feedback? +
    +

    What did you think of our quiz tool?

    + +
    +
    + +

    Quiz Preview

    - + - +
    -
    + + \ No newline at end of file diff --git a/public/quiz-create/templates/quiz-publish.php b/public/quiz-create/templates/quiz-publish.php index 909aa0d0..33539f70 100644 --- a/public/quiz-create/templates/quiz-publish.php +++ b/public/quiz-create/templates/quiz-publish.php @@ -1,4 +1,5 @@
    -
    - - -
    -
    -

    Embed

    - - -
    - -
    - - - - -
    -
    -
    +
    + + +
    +
    +

    Embed

    + + +
    + +
    + + + + +
    +
    +
    \ No newline at end of file diff --git a/public/quiz-create/templates/quiz-results.php b/public/quiz-create/templates/quiz-results.php index 0055ccf7..280d126d 100644 --- a/public/quiz-create/templates/quiz-results.php +++ b/public/quiz-create/templates/quiz-results.php @@ -1,4 +1,5 @@
    -

    get_quiz_title();?>

    +

    get_quiz_title(); ?>

    +
    - +
    @@ -52,10 +38,10 @@ Score # of People - quiz_score_chart_data['quiz_scores'] as $key => $val) {?> + quiz_score_chart_data['quiz_scores'] as $key => $val) { ?> - quiz_score_chart_data['quiz_scores_labels'][$key];?> - + quiz_score_chart_data['quiz_scores_labels'][$key]; ?> + @@ -63,6 +49,6 @@
    - + -
    + \ No newline at end of file diff --git a/public/quiz-take/class-enp_quiz-take.php b/public/quiz-take/class-enp_quiz-take.php index 4655fcba..b882f770 100755 --- a/public/quiz-take/class-enp_quiz-take.php +++ b/public/quiz-take/class-enp_quiz-take.php @@ -20,49 +20,52 @@ * @subpackage Enp_quiz/public * @author Engaging News Project */ -class Enp_quiz_Take { +class Enp_quiz_Take +{ public $quiz, - $ab_test_id = false, - $user_id, - $response_quiz_id, - $state = '', - $correctly_answered, - $current_question_id, - $next_question_id, - $current_question_number, - $nonce, - $cookie_manager, - $quiz_url, // set as ab test or quiz url - $response = array(), - $error = array(); + $ab_test_id = false, + $user_id, + $response_quiz_id, + $state = '', + $correctly_answered, + $current_question_id, + $next_question_id, + $current_question_number, + $nonce, + $cookie_manager, + $quiz_url, // set as ab test or quiz url + $response = array(), + $error = array(); /** - * Constructor to set a Version number and load all necessary files - */ - public function __construct() { + * Constructor to set a Version number and load all necessary files + */ + public function __construct() + { // Define Version - if(!defined('ENP_QUIZ_VERSION')) { + if (!defined('ENP_QUIZ_VERSION')) { // also defined in enp_quiz.php for the Quiz Create side of things define('ENP_QUIZ_VERSION', '0.2.0'); } // require files $this->load_files(); - } /** - * Set the ab_test_id for our class - */ - public function set_ab_test_id($ab_test_id) { + * Set the ab_test_id for our class + */ + public function set_ab_test_id($ab_test_id) + { $this->ab_test_id = $ab_test_id; } /** - * Get the right quiz, process it (including saves, if necessary), - * and set up all states and variables for the quiz to be - * properly loade - */ - public function load_quiz($quiz_id = false) { + * Get the right quiz, process it (including saves, if necessary), + * and set up all states and variables for the quiz to be + * properly loade + */ + public function load_quiz($quiz_id = false) + { // set nonce $this->set_nonce($quiz_id); $this->cookie_manager = $this->set_cookie_manager($quiz_id); @@ -75,18 +78,18 @@ public function load_quiz($quiz_id = false) { $this->set_user_id(); // check if we have a posted var - if(isset($_POST['enp-question-submit'])) { + if (isset($_POST['enp-question-submit'])) { // sets $this->response; - $this->save_quiz_take(); - } + $this->save_quiz_take(); + } // make sure a quiz got loaded $this->validate_quiz(); - if(isset($_POST['enp-quiz-restart'])) { + if (isset($_POST['enp-quiz-restart'])) { // sets $this->response; - $this->quiz_restart(); - } + $this->quiz_restart(); + } // check for any errors $this->set_error_messages(); @@ -109,7 +112,7 @@ public function load_quiz($quiz_id = false) { // if we're doing AJAX, echo the response back to the server // this is echo-ed after everything else is done so we don't get "header already sent" errors from PHP - if(isset($_POST['doing_ajax'])) { + if (isset($_POST['doing_ajax'])) { header('Content-type: application/json'); echo json_encode($this->response); // don't produce anymore HTML or render anything else @@ -124,10 +127,11 @@ public function load_quiz($quiz_id = false) { * * @since 0.0.1 */ - public function styles() { - $styles = array(ENP_QUIZ_PLUGIN_URL.'public/quiz-take/css/enp_quiz-take.min.css'); - foreach($styles as $href) { - echo ''; + public function styles() + { + $styles = array(ENP_QUIZ_PLUGIN_URL . 'public/quiz-take/css/enp_quiz-take.min.css'); + foreach ($styles as $href) { + echo ''; } } @@ -136,62 +140,64 @@ public function styles() { * * @since 0.0.1 */ - public function scripts() { + public function scripts() + { // use minified version on engagingnewsproject.org - if($_SERVER['HTTP_HOST'] === 'engagingnewsproject.org' || $_SERVER['HTTP_HOST'] === 'mediaengagement.org') { + if ($_SERVER['HTTP_HOST'] === 'engagingnewsproject.org' || $_SERVER['HTTP_HOST'] === 'mediaengagement.org') { $ext = '.min'; } else { $ext = ''; } $scripts = array( - "https://ajax.googleapis.com/ajax/libs/jquery/1.12.2/jquery.min.js", - // if developing offline - // ENP_QUIZ_PLUGIN_URL.'public/quiz-take/js/dist/jquery.min.js', - ENP_QUIZ_PLUGIN_URL.'public/quiz-take/js/dist/utilities'.$ext.'.js', - ENP_QUIZ_PLUGIN_URL.'public/quiz-take/js/dist/quiz-take'.$ext.'.js?v'.ENP_QUIZ_VERSION, - ); - foreach($scripts as $src) { - echo ''; + "https://ajax.googleapis.com/ajax/libs/jquery/1.12.2/jquery.min.js", + // if developing offline + // ENP_QUIZ_PLUGIN_URL.'public/quiz-take/js/dist/jquery.min.js', + ENP_QUIZ_PLUGIN_URL . 'public/quiz-take/js/dist/utilities' . $ext . '.js', + ENP_QUIZ_PLUGIN_URL . 'public/quiz-take/js/dist/quiz-take' . $ext . '.js?v' . ENP_QUIZ_VERSION, + ); + foreach ($scripts as $src) { + echo ''; } } /** - * Load the data of our class into the document in JSON - * format so our JS can hook into it and process it accordingly - */ - public function get_init_json() { + * Load the data of our class into the document in JSON + * format so our JS can hook into it and process it accordingly + */ + public function get_init_json() + { $json = clone $this; - if($json->ab_test_id === false) { + if ($json->ab_test_id === false) { $json->ab_test_id = 0; } // output the quiz level json and ab test id echo ''; // remove quiz from the object so we don't print it again unset($json->quiz); echo ''; // unset the cloned object unset($json); - } /** - * Require all the files we'll need. This is loaded outside of WP, so we need - * to require everything we need on our own. - */ - public function load_files() { + * Require all the files we'll need. This is loaded outside of WP, so we need + * to require everything we need on our own. + */ + public function load_files() + { // require the necessary files - require_once ENP_QUIZ_PLUGIN_DIR . 'includes/class-enp_quiz-quiz.php'; - require_once ENP_QUIZ_PLUGIN_DIR . 'includes/class-enp_quiz-question.php'; - require_once ENP_QUIZ_PLUGIN_DIR . 'includes/class-enp_quiz-mc_option.php'; + require_once ENP_QUIZ_PLUGIN_DIR . 'includes/class-enp_quiz-quiz.php'; + require_once ENP_QUIZ_PLUGIN_DIR . 'includes/class-enp_quiz-question.php'; + require_once ENP_QUIZ_PLUGIN_DIR . 'includes/class-enp_quiz-mc_option.php'; require_once ENP_QUIZ_PLUGIN_DIR . 'includes/class-enp_quiz-slider.php'; require_once ENP_QUIZ_PLUGIN_DIR . 'includes/class-enp_quiz-ab_test.php'; require_once ENP_QUIZ_PLUGIN_DIR . 'includes/class-enp_quiz-nonce.php'; @@ -202,8 +208,8 @@ public function load_files() { // Quiz Take Classes require_once ENP_QUIZ_PLUGIN_DIR . 'public/quiz-take/includes/class-enp_quiz-take_quiz_end.php'; require_once ENP_QUIZ_PLUGIN_DIR . 'public/quiz-take/includes/class-enp_quiz-take_question.php'; - // Database - require_once ENP_QUIZ_PLUGIN_DIR . 'database/class-enp_quiz_db.php'; + // Database + require_once ENP_QUIZ_PLUGIN_DIR . 'database/class-enp_quiz_db.php'; require_once ENP_QUIZ_PLUGIN_DIR . 'database/class-enp_quiz_save_quiz_take.php'; require_once ENP_QUIZ_PLUGIN_DIR . 'database/class-enp_quiz_save_quiz_take_question_view.php'; require_once ENP_QUIZ_PLUGIN_DIR . 'database/class-enp_quiz_save_quiz_take_response_quiz.php'; @@ -212,80 +218,85 @@ public function load_files() { require_once ENP_QUIZ_PLUGIN_DIR . 'database/class-enp_quiz_save_quiz_take_response_mc.php'; require_once ENP_QUIZ_PLUGIN_DIR . 'database/class-enp_quiz_save_quiz_take_response_slider.php'; require_once ENP_QUIZ_PLUGIN_DIR . 'database/class-enp_quiz_save_quiz_take_quiz_data.php'; - } /** - * Output all the meta tags our needs - */ - public function meta_tags() { + * Output all the meta tags our needs + */ + public function meta_tags() + { echo ' - + - - '; + + '; } /** - * Generate and set the nonce for our form - */ - public function set_nonce($quiz_id) { + * Generate and set the nonce for our form + */ + public function set_nonce($quiz_id) + { // allow use of URLs for sessions is cookies off ini_set('session.use_cookies', 1); ini_set('session.use_only_cookies', 0); ini_set('session.use_trans_sid', 1); //Start the session - session_start(); - if($this->ab_test_id !== false) { - // we're on an ab test - $nonce_name = 'enp_quiz_take_ab_test_'.$this->ab_test_id.'_nonce'; - } else { - $nonce_name = 'enp_quiz_take_'.$quiz_id.'_nonce'; - } - - //Start the class - $this->nonce = new Enp_quiz_Nonce($nonce_name); + session_start(); + if ($this->ab_test_id !== false) { + // we're on an ab test + $nonce_name = 'enp_quiz_take_ab_test_' . $this->ab_test_id . '_nonce'; + } else { + $nonce_name = 'enp_quiz_take_' . $quiz_id . '_nonce'; + } + + //Start the class + $this->nonce = new Enp_quiz_Nonce($nonce_name); } /** - * Outputs the PHPSESSID into our form so we can pass it along when - * cookies are turned off. This automatically gets added to forms when - * people are using a PHP version that was compiled with - * --enable-trans-sid, but we can't assume that everyone's will be - * as BlueHost doesn't have it enabled. (https://www.sitepoint.com/community/t/php-sessions-and-phpsessid/1041/3) - * If you do have it enabled, you'll get the PHPSESSID input in the HTML - * twice, but it's not an issue. - */ - public function get_session_id_input() { - return ''; + * Outputs the PHPSESSID into our form so we can pass it along when + * cookies are turned off. This automatically gets added to forms when + * people are using a PHP version that was compiled with + * --enable-trans-sid, but we can't assume that everyone's will be + * as BlueHost doesn't have it enabled. (https://www.sitepoint.com/community/t/php-sessions-and-phpsessid/1041/3) + * If you do have it enabled, you'll get the PHPSESSID input in the HTML + * twice, but it's not an issue. + */ + public function get_session_id_input() + { + return ''; } /** - * Quick check to see if we have a valid quiz before moving on - */ - public function validate_quiz() { + * Quick check to see if we have a valid quiz before moving on + */ + public function validate_quiz() + { $quiz_id = $this->quiz->get_quiz_id(); - if(empty($quiz_id)) { - echo 'Quiz not found'; - exit; - } else { + if (empty($quiz_id)) { + echo 'Quiz not found'; + exit; + } else { return true; } } /** - * Add all of our SVG to the DOM - */ - public function load_svg() { - $svg = file_get_contents(ENP_QUIZ_PLUGIN_DIR.'public/quiz-take/svg/symbol-defs.svg'); - return $svg; + * Add all of our SVG to the DOM + */ + public function load_svg() + { + $svg = file_get_contents(ENP_QUIZ_PLUGIN_DIR . 'public/quiz-take/svg/symbol-defs.svg'); + return $svg; } /** - * Quiz Option styles that we need to override our own CSS - */ - public function load_quiz_styles() { + * Quiz Option styles that we need to override our own CSS + */ + public function load_quiz_styles() + { // figure out the width of our progress bar $progress_bar_width = $this->get_progress_bar_width(); $text_color = $this->quiz->get_quiz_text_color(); @@ -294,7 +305,7 @@ public function load_quiz_styles() { $button_color = $this->quiz->get_quiz_button_color(); $correct_color = $this->quiz->get_quiz_correct_color(); $incorrect_color = $this->quiz->get_quiz_incorrect_color(); - + // var_dump($correct_color); // get the CSS we need $bg_color_css = (strtolower($bg_color) !== '#ffffff' ? $this->get_bg_color_css() : ''); $text_color_css = (strtolower($text_color) !== '#444444' ? $this->get_text_color_css() : ''); @@ -305,53 +316,55 @@ public function load_quiz_styles() { $custom_css = $this->quiz->get_quiz_custom_css_minified(); return ""; - + $custom_css + $bg_color_css $text_color_css $border_color_css $button_color_css $correct_color_css $incorrect_color_css + #enp-quiz .enp-quiz__progress__bar { + width: $progress_bar_width%; + } + "; } /** - * Calculate how wide the progress bar should be - * @return int - */ - public function get_progress_bar_width() { - $progress_bar_width = $this->get_current_progress_bar_question_number()/$this->quiz->get_total_question_count(); + * Calculate how wide the progress bar should be + * @return int + */ + public function get_progress_bar_width() + { + $progress_bar_width = $this->get_current_progress_bar_question_number() / $this->quiz->get_total_question_count(); // reduce the number a little if we're at the very end so it still looks like there's more to go - if($this->state !== 'quiz_end' && $progress_bar_width === 1) { + if ($this->state !== 'quiz_end' && $progress_bar_width === 1) { $progress_bar_width = .9; } - $progress_bar_width = number_format( $progress_bar_width * 100, 2 ); + $progress_bar_width = number_format($progress_bar_width * 100, 2); return $progress_bar_width; } /** - * Output HTML for the Progress Bar - * @return string (HTML) - */ - public function get_progress_bar() { + * Output HTML for the Progress Bar + * @return string (HTML) + */ + public function get_progress_bar() + { $progressbar = '
    + aria-valuenow="' . $this->get_current_progress_bar_question_number() . '" + aria-valuemax="' . $this->quiz->get_total_question_count() . '"> -
    '.$this->get_progress_bar_display_text().'
    +
    ' . $this->get_progress_bar_display_text() . '
    '; return $progressbar; } /** - * get_current_question_number() returns 0 if you're at the end, but - * we need it to be the total questions if it's at the end. - */ - public function get_current_progress_bar_question_number() { - if($this->state === 'quiz_end') { + * get_current_question_number() returns 0 if you're at the end, but + * we need it to be the total questions if it's at the end. + */ + public function get_current_progress_bar_question_number() + { + if ($this->state === 'quiz_end') { $progress_bar_question_number = $this->quiz->get_total_question_count(); } else { $progress_bar_question_number = $this->get_current_question_number(); @@ -360,45 +373,50 @@ public function get_current_progress_bar_question_number() { return $progress_bar_question_number; } - public function get_progress_bar_text_value() { - if($this->state === 'quiz_end') { - $progress_bar_text_value = 'Quiz Complete. '. $this->get_correctly_answered().'/'. $this->quiz->get_total_question_count().' Correct.'; + public function get_progress_bar_text_value() + { + if ($this->state === 'quiz_end') { + $progress_bar_text_value = 'Quiz Complete. ' . $this->get_correctly_answered() . '/' . $this->quiz->get_total_question_count() . ' Correct.'; } else { - $progress_bar_text_value = 'Question '. $this->get_current_progress_bar_question_number().' of '. $this->quiz->get_total_question_count(); + $progress_bar_text_value = 'Question ' . $this->get_current_progress_bar_question_number() . ' of ' . $this->quiz->get_total_question_count(); } return $progress_bar_text_value; } /** - * Text to visually for the progress bar. - * @return string (HTML) - */ - function get_progress_bar_display_text() { - $progress_bar_display_text = ''. ($this->state === 'quiz_end' ? $this->get_correctly_answered() : $this->get_current_progress_bar_question_number()).'/'.$this->quiz->get_total_question_count() . ($this->state === 'quiz_end' ? ' Correct':'').''; + * Text to visually for the progress bar. + * @return string (HTML) + */ + function get_progress_bar_display_text() + { + $progress_bar_display_text = '' . ($this->state === 'quiz_end' ? $this->get_correctly_answered() : $this->get_current_progress_bar_question_number()) . '/' . $this->quiz->get_total_question_count() . ($this->state === 'quiz_end' ? ' Correct' : '') . ''; return $progress_bar_display_text; } /** - * All CSS for Background Color. - * @return string - */ - public function get_bg_color_css() { + * All CSS for Background Color. + * @return string + */ + public function get_bg_color_css() + { $bg_color = $this->quiz->get_quiz_bg_color(); return " -#enp-quiz .enp-quiz__container, -#enp-quiz .enp-option__label, -#enp-quiz .enp-explanation, -#enp-quiz .enp-question__container--explanation .enp-option__input--incorrect-clicked+.enp-option__label { - background-color: $bg_color; -}"; + #enp-quiz .enp-quiz__container, + #enp-quiz .enp-option__label, + #enp-quiz .enp-explanation, + #enp-quiz .enp-question__container--explanation .enp-option__input--incorrect-clicked+.enp-option__label { + background-color: $bg_color; + }"; } /** - * All CSS for text Color. - * @return string - */ - public function get_text_color_css() { + * All CSS for text Color. + * @return string + * #enp-quiz .enp-quiz__title_test, + */ + public function get_text_color_css() + { $text_color = $this->quiz->get_quiz_text_color(); return " #enp-quiz .enp-quiz__container, @@ -423,10 +441,11 @@ public function get_text_color_css() { } /** - * All CSS for Border Color. - * @return string - */ - public function get_border_color_css() { + * All CSS for Border Color. + * @return string + */ + public function get_border_color_css() + { $border_color = $this->quiz->get_quiz_border_color(); return " #enp-quiz .enp-quiz__container, @@ -436,10 +455,11 @@ public function get_border_color_css() { } /** - * All CSS for Button Color. - * @return string - */ - public function get_button_color_css() { + * All CSS for Button Color. + * @return string + */ + public function get_button_color_css() + { $button_color = $this->quiz->get_quiz_button_color(); return " #enp-quiz .enp-btn, @@ -483,10 +503,11 @@ public function get_button_color_css() { } /** - * All CSS for "Correct" Color. - * @return string - */ - public function get_correct_color_css() { + * All CSS for "Correct" Color. + * @return string + */ + public function get_correct_color_css() + { $correct_color = $this->quiz->get_quiz_correct_color(); return " #enp-quiz .enp-quiz__progress__bar, @@ -521,15 +542,16 @@ public function get_correct_color_css() { } #enp-quiz .enp-question__answered .ui-slider-range-min { - background-color: ".$this->quiz->get_quiz_bg_color()."; + background-color: " . $this->quiz->get_quiz_bg_color() . "; }"; } /** - * All CSS for "Incorrect" Color. - * @return string - */ - public function get_incorrect_color_css() { + * All CSS for "Incorrect" Color. + * @return string + */ + public function get_incorrect_color_css() + { $incorrect_color = $this->quiz->get_quiz_incorrect_color(); return " #enp-quiz .enp-explanation--incorrect .enp-explanation__title, @@ -550,69 +572,71 @@ public function get_incorrect_color_css() { #enp-quiz .enp-explanation--incorrect { box-shadow: inset 4px 0 0 $incorrect_color; }"; - } /** - * Check if our Nonce is valid or invald - * @param $quiz_id (string) - * @return (BOOLEAN) true if valid, false if not - */ - public function validate_nonce($quiz_id) { + * Check if our Nonce is valid or invald + * @param $quiz_id (string) + * @return (BOOLEAN) true if valid, false if not + */ + public function validate_nonce($quiz_id) + { // validate nonce - if($this->ab_test_id !== false) { + if ($this->ab_test_id !== false) { // it's an ab test nonce - $nonce_name = 'enp_quiz_take_ab_test_'.$this->ab_test_id.'_nonce'; + $nonce_name = 'enp_quiz_take_ab_test_' . $this->ab_test_id . '_nonce'; } else { // it's a quiz nonce - $nonce_name = 'enp_quiz_take_'.$quiz_id.'_nonce'; + $nonce_name = 'enp_quiz_take_' . $quiz_id . '_nonce'; } - if(isset($_POST[$nonce_name])) { + if (isset($_POST[$nonce_name])) { $posted_nonce = $_POST[$nonce_name]; } - //Is it a POST request? - if($_SERVER['REQUEST_METHOD'] === 'POST') { - $validate_nonce = $this->nonce->validate($posted_nonce); - //Validate the form key - if(!isset($posted_nonce) || $validate_nonce !== true) { - // Form key is invalid, - // return them to the page (they're probably refreshing the page) - //first, check if it's null or not - if($validate_nonce === null) { - // cookies are likely disabled - $this->error[] = 'It looks like Cookies are disabled. Please enable Cookies in order to take the quiz. If you only have third-party Cookies disabled, go here to take the quiz.'; - } else { - $this->error[] = 'It looks like this quiz got started in a different browser window. Click here to get it working again.'; - } - return false; - } - } + //Is it a POST request? + if ($_SERVER['REQUEST_METHOD'] === 'POST') { + $validate_nonce = $this->nonce->validate($posted_nonce); + //Validate the form key + if (!isset($posted_nonce) || $validate_nonce !== true) { + // Form key is invalid, + // return them to the page (they're probably refreshing the page) + //first, check if it's null or not + if ($validate_nonce === null) { + // cookies are likely disabled + $this->error[] = 'It looks like Cookies are disabled. Please enable Cookies in order to take the quiz. If you only have third-party Cookies disabled, go here to take the quiz.'; + } else { + $this->error[] = 'It looks like this quiz got started in a different browser window. Click here to get it working again.'; + } + return false; + } + } return true; } /** - * Output our error message into the DOM if there is one - */ - public function get_error_messages() { - if(isset($this->response->error) && !empty($this->response->error)) { - $errors = $this->response->error; - echo '
    + * Output our error message into the DOM if there is one + */ + public function get_error_messages() + { + if (isset($this->response->error) && !empty($this->response->error)) { + $errors = $this->response->error; + echo '

    Error

      '; - foreach($errors as $error) { - echo '
    • '.$error.'
    • '; - } - echo '
    '; + foreach ($errors as $error) { + echo '
  • ' . $error . '
  • '; + } + echo '
    '; } } /** - * JS Error message template for displaying errors from AJAX response - */ - public function error_message_js_template() { + * JS Error message template for displaying errors from AJAX response + */ + public function error_message_js_template() + { return ''; // remove the cloned object unset($quiz_end); } /** - * I can't think of a better way to do this right now, but I think this is OK - * It loops all keys in the object and sets the values as handlebar style strings - * and injects it into the template - */ - public function quiz_end_template() { + * I can't think of a better way to do this right now, but I think this is OK + * It loops all keys in the object and sets the values as handlebar style strings + * and injects it into the template + */ + public function quiz_end_template() + { // clone the object so we don't reset its own values $qt_end = clone $this; // quiz end object variables - foreach($qt_end as $key => $value) { + foreach ($qt_end as $key => $value) { // we don't want to unset our quiz object or twitter_share_text - if($key !== 'quiz' && $key !== 'twitter_share_text') { - $qt_end->$key = '{{'.$key.'}}'; + if ('quiz' !== $key && 'twitter_share_text' !== $key) { + $qt_end->$key = '{{' . $key . '}}'; } } $template = ''; @@ -165,13 +173,14 @@ public function quiz_end_template() { } /** - * Replace a {{mustache}} var with it's actual value. Only works with - * {{score_percentage}} right now, but we could upgrade it to use regex or an array later (or the Mustache PHP implementation) - * - * @param $str (string) with {{mustache}} variable in it - * @return $str (string) with {{score_percentage}} replaced by the actual get_score_percentage() - */ - public function replace_mustache_variable($str) { + * Replace a {{mustache}} var with it's actual value. Only works with + * {{score_percentage}} right now, but we could upgrade it to use regex or an array later (or the Mustache PHP implementation) + * + * @param $str (string) with {{mustache}} variable in it + * @return $str (string) with {{score_percentage}} replaced by the actual get_score_percentage() + */ + public function replace_mustache_variable($str) + { // regex to match {{string}} and extract string // /\{\{([^}]+)\}\}/g $str = str_replace('{{score_percentage}}', $this->get_score_percentage(), $str); @@ -179,17 +188,18 @@ public function replace_mustache_variable($str) { } /** - * Get the share content from the array and encode/replace {{mustache}} - * template values (if encoded) - * @param $key (str) key in $this->share_content array - * ('facebook_title_end', 'twitter_text_start', etc) - * @param $encoding = 'url', 'rawurl', 'htmlspecialchars' - * @param $replace_mustache (boolean) true = search_repace {{vars}}, false = nope - * @return (string) $this->share_content($key), if found. - */ - public function get_share_content($key = false, $encoding = 'url', $replace_mustache = true) { + * Get the share content from the array and encode/replace {{mustache}} + * template values (if encoded) + * @param $key (str) key in $this->share_content array + * ('facebook_title_end', 'twitter_text_start', etc) + * @param $encoding = 'url', 'rawurl', 'htmlspecialchars' + * @param $replace_mustache (boolean) true = search_repace {{vars}}, false = nope + * @return (string) $this->share_content($key), if found. + */ + public function get_share_content($key = false, $encoding = 'url', $replace_mustache = true) + { // check if it's there - if($key === false ) { + if ($key === false) { // we're gonna need some more from you here... return false; } @@ -197,13 +207,10 @@ public function get_share_content($key = false, $encoding = 'url', $replace_must $content = $this->quiz->get_encoded($key, $encoding, $replace_mustache); // replace mustache var if necessary - if($replace_mustache === true) { + if ($replace_mustache === true) { $content = $this->replace_mustache_variable($content); } return $content; } - - - } diff --git a/public/quiz-take/templates/partials/quiz-end.php b/public/quiz-take/templates/partials/quiz-end.php index 5c934b76..a25fd881 100644 --- a/public/quiz-take/templates/partials/quiz-end.php +++ b/public/quiz-take/templates/partials/quiz-end.php @@ -1,36 +1,38 @@ +$current_url = new Enp_quiz_Current_URL(); ?>
    -

    get_score_percentage();?>% Correct

    +

    get_score_percentage(); ?>% Correct

    - - + +
    -

    get_quiz_end_title();?>

    -

    get_quiz_end_content();?>

    +

    get_quiz_end_title(); ?>

    +

    + get_quiz_end_content(); ?> +

    -
    + \ No newline at end of file diff --git a/public/quiz-take/templates/quiz.php b/public/quiz-take/templates/quiz.php index bb46cb05..9a474a7b 100644 --- a/public/quiz-take/templates/quiz.php +++ b/public/quiz-take/templates/quiz.php @@ -9,33 +9,33 @@ // Check if we've loaded the config file yet. If we haven't guess to load it -if(!defined('ENP_QUIZ_URL')) { - // set enp-quiz-config file path (eehhhh... could be better to not use relative path stuff) - require_once '../../../../../enp-quiz-config.php'; +if (!defined('ENP_QUIZ_URL')) { + // set enp-quiz-config file path (eehhhh... could be better to not use relative path stuff) + require_once '../../../../../enp-quiz-config.php'; } require_once ENP_QUIZ_PLUGIN_DIR . 'public/quiz-take/class-enp_quiz-take.php'; // create the new object if it hasn't already been created -if(isset($qt) && is_object($qt)) { - // do nothing, we already got it! +if (isset($qt) && is_object($qt)) { + // do nothing, we already got it! } else { - // we need the $qt instance, so let's load it up - // load up quiz_take class (requires all the files) - $qt = new Enp_quiz_Take(); + // we need the $qt instance, so let's load it up + // load up quiz_take class (requires all the files) + $qt = new Enp_quiz_Take(); } // get the quiz ID we need -if(isset($quiz_id)) { - // do nothing, already set +if (isset($quiz_id)) { + // do nothing, already set } else { - // set our quiz id - $quiz_id = $qt->get_init_quiz_id(); + // set our quiz id + $quiz_id = $qt->get_init_quiz_id(); } //check to make sure one was found -if($quiz_id === false) { - echo 'No quiz requested'; - exit; +if ($quiz_id === false) { + echo 'No quiz requested'; + exit; } // load the quiz @@ -43,118 +43,133 @@ // get the state $state = $qt->get_state(); // check the state -if($state !== 'quiz_end') { - $qt_question = new Enp_quiz_Take_Question($qt); +if ($state !== 'quiz_end') { + $qt_question = new Enp_quiz_Take_Question($qt); } // create the quiz end object (so we have a template for it for the JS) $qt_end = new Enp_quiz_Take_Quiz_end($qt->quiz, $qt->get_correctly_answered()); - +// var_dump($qt->quiz); ?> + - - - - <?php echo $qt->quiz->get_quiz_title();?> - meta_tags(); - // load styles - $qt->styles(); - // IE8 conditional - ?> - - - - - - load_quiz_styles();?> + + + + <?php echo $qt->quiz->get_quiz_title(); ?> + + meta_tags(); + // load styles + $qt->styles(); + // IE8 conditional + ?> + + + + + + load_quiz_styles(); ?> - -load_svg(); -?> -
    - - - get_error_messages();?> - -
    -
    - get_session_id_input();?> - nonce->outputKey();?> - - - - - - -
    - - - -
    -
    - - - - - -get_init_json(); -echo $qt_end->get_init_json(); -if(isset($qt_question) && is_object($qt_question)) { - echo $qt_question->get_init_json(); - echo $qt_question->question_js_templates(); - echo $qt_question->question_explanation_js_template(); - echo $qt_question->mc_option_js_template(); - echo $qt_question->slider_js_template(); -} -echo $qt_end->quiz_end_template(); -echo $qt->error_message_js_template(); - -// load scripts -$qt->scripts(); -// if we're on prod, include GA Tracking code -if($_SERVER['HTTP_HOST'] === 'engagingnewsproject.org' || $_SERVER['HTTP_HOST'] === 'mediaengagement.org') { - $ga_id = ($_SERVER['HTTP_HOST'] === 'mediaengagement.org' ? 'UA-52471115-4' : 'UA-52471115-1'); - ?> - - + + load_svg(); + ?> +
    + + + + + get_error_messages(); ?> + +
    +
    + get_session_id_input(); ?> + nonce->outputKey(); ?> + + + + + + +
    + + + +
    +
    + + + + + + get_init_json(); + echo $qt_end->get_init_json(); + if (isset($qt_question) && is_object($qt_question)) { + echo $qt_question->get_init_json(); + echo $qt_question->question_js_templates(); + echo $qt_question->question_explanation_js_template(); + echo $qt_question->mc_option_js_template(); + echo $qt_question->slider_js_template(); + } + echo $qt_end->quiz_end_template(); + echo $qt->error_message_js_template(); + + // load scripts + $qt->scripts(); + // if we're on prod, include GA Tracking code + if ($_SERVER['HTTP_HOST'] === 'engagingnewsproject.org' || $_SERVER['HTTP_HOST'] === 'mediaengagement.org') { + $ga_id = ($_SERVER['HTTP_HOST'] === 'mediaengagement.org' ? 'UA-52471115-4' : 'UA-52471115-1'); + ?> + + - + + \ No newline at end of file From d2a5fa1ec2055c3c9b8006606fbe6d32d99bdd02 Mon Sep 17 00:00:00 2001 From: Luke Carl Hartman Date: Mon, 2 May 2022 15:30:48 -0700 Subject: [PATCH 10/32] a little styling and tinymce installation --- composer.json | 3 + composer.lock | 64 +- includes/class-enp_quiz-question.php | 2 +- .../quiz-create/css/enp_quiz-create.min.css | 2 +- .../css/enp_quiz-create.min.css.map | 2 +- public/quiz-create/css/sass/_dashboard.scss | 24 +- public/quiz-create/css/sass/_forms.scss | 2 +- public/quiz-create/css/sass/_quiz-create.scss | 15 +- .../quiz-create/css/sass/_quiz-preview.scss | 7 + public/quiz-create/css/sass/_variables.scss | 2 +- .../quiz-create-mc-option-image-upload.php | 3 + .../partials/quiz-create-mc-option-image.php | 11 + .../partials/quiz-create-mc-option.php | 6 +- .../partials/quiz-create-question.php | 42 +- public/quiz-create/templates/quiz-publish.php | 7 - public/quiz-take/css/enp_quiz-take.min.css | 2 +- .../quiz-take/css/enp_quiz-take.min.css.map | 2 +- public/quiz-take/css/sass/_quiz.scss | 2 +- public/quiz-take/css/sass/_slider.scss | 2 +- vendor/composer/installed.json | 62 + vendor/composer/installed.php | 13 +- vendor/tinymce/tinymce/.npmignore | 2 + vendor/tinymce/tinymce/CHANGELOG.md | 2868 ++ vendor/tinymce/tinymce/README.md | 71 + vendor/tinymce/tinymce/bower.json | 27 + vendor/tinymce/tinymce/composer.json | 52 + vendor/tinymce/tinymce/icons/default/icons.js | 182 + .../tinymce/icons/default/icons.min.js | 1 + vendor/tinymce/tinymce/icons/default/index.js | 7 + vendor/tinymce/tinymce/license.txt | 21 + vendor/tinymce/tinymce/models/dom/index.js | 7 + vendor/tinymce/tinymce/models/dom/model.js | 7942 +++++ .../tinymce/tinymce/models/dom/model.min.js | 4 + vendor/tinymce/tinymce/package.json | 32 + .../tinymce/tinymce/plugins/advlist/index.js | 7 + .../tinymce/tinymce/plugins/advlist/plugin.js | 246 + .../tinymce/plugins/advlist/plugin.min.js | 4 + .../tinymce/tinymce/plugins/anchor/index.js | 7 + .../tinymce/tinymce/plugins/anchor/plugin.js | 195 + .../tinymce/plugins/anchor/plugin.min.js | 4 + .../tinymce/tinymce/plugins/autolink/index.js | 7 + .../tinymce/plugins/autolink/plugin.js | 204 + .../tinymce/plugins/autolink/plugin.min.js | 4 + .../tinymce/plugins/autoresize/index.js | 7 + .../tinymce/plugins/autoresize/plugin.js | 156 + .../tinymce/plugins/autoresize/plugin.min.js | 4 + .../tinymce/tinymce/plugins/autosave/index.js | 7 + .../tinymce/plugins/autosave/plugin.js | 232 + .../tinymce/plugins/autosave/plugin.min.js | 4 + .../tinymce/tinymce/plugins/charmap/index.js | 7 + .../tinymce/tinymce/plugins/charmap/plugin.js | 1636 + .../tinymce/plugins/charmap/plugin.min.js | 4 + vendor/tinymce/tinymce/plugins/code/index.js | 7 + vendor/tinymce/tinymce/plugins/code/plugin.js | 85 + .../tinymce/plugins/code/plugin.min.js | 4 + .../tinymce/plugins/codesample/index.js | 7 + .../tinymce/plugins/codesample/plugin.js | 2407 ++ .../tinymce/plugins/codesample/plugin.min.js | 4 + .../tinymce/plugins/directionality/index.js | 7 + .../tinymce/plugins/directionality/plugin.js | 384 + .../plugins/directionality/plugin.min.js | 4 + .../tinymce/plugins/emoticons/index.js | 7 + .../plugins/emoticons/js/emojiimages.js | 1 + .../plugins/emoticons/js/emojiimages.min.js | 3 + .../tinymce/plugins/emoticons/js/emojis.js | 1 + .../plugins/emoticons/js/emojis.min.js | 2 + .../tinymce/plugins/emoticons/plugin.js | 577 + .../tinymce/plugins/emoticons/plugin.min.js | 4 + .../tinymce/plugins/fullscreen/index.js | 7 + .../tinymce/plugins/fullscreen/plugin.js | 1189 + .../tinymce/plugins/fullscreen/plugin.min.js | 4 + vendor/tinymce/tinymce/plugins/help/index.js | 7 + vendor/tinymce/tinymce/plugins/help/plugin.js | 848 + .../tinymce/plugins/help/plugin.min.js | 4 + vendor/tinymce/tinymce/plugins/image/index.js | 7 + .../tinymce/tinymce/plugins/image/plugin.js | 1475 + .../tinymce/plugins/image/plugin.min.js | 4 + .../tinymce/plugins/importcss/index.js | 7 + .../tinymce/plugins/importcss/plugin.js | 342 + .../tinymce/plugins/importcss/plugin.min.js | 4 + .../tinymce/plugins/insertdatetime/index.js | 7 + .../tinymce/plugins/insertdatetime/plugin.js | 176 + .../plugins/insertdatetime/plugin.min.js | 4 + vendor/tinymce/tinymce/plugins/link/index.js | 7 + vendor/tinymce/tinymce/plugins/link/plugin.js | 1188 + .../tinymce/plugins/link/plugin.min.js | 4 + vendor/tinymce/tinymce/plugins/lists/index.js | 7 + .../tinymce/tinymce/plugins/lists/plugin.js | 1757 + .../tinymce/plugins/lists/plugin.min.js | 4 + vendor/tinymce/tinymce/plugins/media/index.js | 7 + .../tinymce/tinymce/plugins/media/plugin.js | 1150 + .../tinymce/plugins/media/plugin.min.js | 4 + .../tinymce/plugins/nonbreaking/index.js | 7 + .../tinymce/plugins/nonbreaking/plugin.js | 111 + .../tinymce/plugins/nonbreaking/plugin.min.js | 4 + .../tinymce/plugins/pagebreak/index.js | 7 + .../tinymce/plugins/pagebreak/plugin.js | 105 + .../tinymce/plugins/pagebreak/plugin.min.js | 4 + .../tinymce/tinymce/plugins/preview/index.js | 7 + .../tinymce/tinymce/plugins/preview/plugin.js | 96 + .../tinymce/plugins/preview/plugin.min.js | 4 + .../tinymce/plugins/quickbars/index.js | 7 + .../tinymce/plugins/quickbars/plugin.js | 421 + .../tinymce/plugins/quickbars/plugin.min.js | 4 + vendor/tinymce/tinymce/plugins/save/index.js | 7 + vendor/tinymce/tinymce/plugins/save/plugin.js | 118 + .../tinymce/plugins/save/plugin.min.js | 4 + .../tinymce/plugins/searchreplace/index.js | 7 + .../tinymce/plugins/searchreplace/plugin.js | 1079 + .../plugins/searchreplace/plugin.min.js | 4 + vendor/tinymce/tinymce/plugins/table/index.js | 7 + .../tinymce/tinymce/plugins/table/plugin.js | 3362 ++ .../tinymce/plugins/table/plugin.min.js | 4 + .../tinymce/tinymce/plugins/template/index.js | 7 + .../tinymce/plugins/template/plugin.js | 536 + .../tinymce/plugins/template/plugin.min.js | 4 + .../tinymce/plugins/visualblocks/index.js | 7 + .../tinymce/plugins/visualblocks/plugin.js | 98 + .../plugins/visualblocks/plugin.min.js | 4 + .../tinymce/plugins/visualchars/index.js | 7 + .../tinymce/plugins/visualchars/plugin.js | 506 + .../tinymce/plugins/visualchars/plugin.min.js | 4 + .../tinymce/plugins/wordcount/index.js | 7 + .../tinymce/plugins/wordcount/plugin.js | 404 + .../tinymce/plugins/wordcount/plugin.min.js | 4 + .../tinymce/skins/content/dark/content.css | 66 + .../skins/content/dark/content.min.css | 1 + .../tinymce/skins/content/default/content.css | 61 + .../skins/content/default/content.min.css | 1 + .../skins/content/document/content.css | 66 + .../skins/content/document/content.min.css | 1 + .../skins/content/tinymce-5-dark/content.css | 66 + .../content/tinymce-5-dark/content.min.css | 1 + .../skins/content/tinymce-5/content.css | 61 + .../skins/content/tinymce-5/content.min.css | 1 + .../tinymce/skins/content/writer/content.css | 62 + .../skins/content/writer/content.min.css | 1 + .../tinymce/skins/ui/oxide-dark/content.css | 711 + .../skins/ui/oxide-dark/content.inline.css | 724 + .../ui/oxide-dark/content.inline.min.css | 1 + .../skins/ui/oxide-dark/content.min.css | 1 + .../tinymce/skins/ui/oxide-dark/skin.css | 3041 ++ .../tinymce/skins/ui/oxide-dark/skin.min.css | 1 + .../skins/ui/oxide-dark/skin.shadowdom.css | 30 + .../ui/oxide-dark/skin.shadowdom.min.css | 1 + .../tinymce/skins/ui/oxide/content.css | 730 + .../tinymce/skins/ui/oxide/content.inline.css | 724 + .../skins/ui/oxide/content.inline.min.css | 1 + .../tinymce/skins/ui/oxide/content.min.css | 1 + .../tinymce/tinymce/skins/ui/oxide/skin.css | 3038 ++ .../tinymce/skins/ui/oxide/skin.min.css | 1 + .../tinymce/skins/ui/oxide/skin.shadowdom.css | 30 + .../skins/ui/oxide/skin.shadowdom.min.css | 1 + .../skins/ui/tinymce-5-dark/content.css | 711 + .../ui/tinymce-5-dark/content.inline.css | 724 + .../ui/tinymce-5-dark/content.inline.min.css | 1 + .../skins/ui/tinymce-5-dark/content.min.css | 1 + .../tinymce/skins/ui/tinymce-5-dark/skin.css | 3119 ++ .../skins/ui/tinymce-5-dark/skin.min.css | 1 + .../ui/tinymce-5-dark/skin.shadowdom.css | 30 + .../ui/tinymce-5-dark/skin.shadowdom.min.css | 1 + .../tinymce/skins/ui/tinymce-5/content.css | 730 + .../skins/ui/tinymce-5/content.inline.css | 724 + .../skins/ui/tinymce-5/content.inline.min.css | 1 + .../skins/ui/tinymce-5/content.min.css | 1 + .../tinymce/skins/ui/tinymce-5/skin.css | 3119 ++ .../tinymce/skins/ui/tinymce-5/skin.min.css | 1 + .../skins/ui/tinymce-5/skin.shadowdom.css | 30 + .../skins/ui/tinymce-5/skin.shadowdom.min.css | 1 + vendor/tinymce/tinymce/themes/silver/index.js | 7 + vendor/tinymce/tinymce/themes/silver/theme.js | 26108 ++++++++++++++ .../tinymce/themes/silver/theme.min.js | 4 + vendor/tinymce/tinymce/tinymce.d.ts | 2876 ++ vendor/tinymce/tinymce/tinymce.js | 29039 ++++++++++++++++ vendor/tinymce/tinymce/tinymce.min.js | 4 + 175 files changed, 109503 insertions(+), 54 deletions(-) create mode 100644 public/quiz-create/templates/partials/quiz-create-mc-option-image-upload.php create mode 100644 public/quiz-create/templates/partials/quiz-create-mc-option-image.php create mode 100644 vendor/tinymce/tinymce/.npmignore create mode 100644 vendor/tinymce/tinymce/CHANGELOG.md create mode 100644 vendor/tinymce/tinymce/README.md create mode 100644 vendor/tinymce/tinymce/bower.json create mode 100644 vendor/tinymce/tinymce/composer.json create mode 100644 vendor/tinymce/tinymce/icons/default/icons.js create mode 100644 vendor/tinymce/tinymce/icons/default/icons.min.js create mode 100644 vendor/tinymce/tinymce/icons/default/index.js create mode 100644 vendor/tinymce/tinymce/license.txt create mode 100644 vendor/tinymce/tinymce/models/dom/index.js create mode 100644 vendor/tinymce/tinymce/models/dom/model.js create mode 100644 vendor/tinymce/tinymce/models/dom/model.min.js create mode 100644 vendor/tinymce/tinymce/package.json create mode 100644 vendor/tinymce/tinymce/plugins/advlist/index.js create mode 100644 vendor/tinymce/tinymce/plugins/advlist/plugin.js create mode 100644 vendor/tinymce/tinymce/plugins/advlist/plugin.min.js create mode 100644 vendor/tinymce/tinymce/plugins/anchor/index.js create mode 100644 vendor/tinymce/tinymce/plugins/anchor/plugin.js create mode 100644 vendor/tinymce/tinymce/plugins/anchor/plugin.min.js create mode 100644 vendor/tinymce/tinymce/plugins/autolink/index.js create mode 100644 vendor/tinymce/tinymce/plugins/autolink/plugin.js create mode 100644 vendor/tinymce/tinymce/plugins/autolink/plugin.min.js create mode 100644 vendor/tinymce/tinymce/plugins/autoresize/index.js create mode 100644 vendor/tinymce/tinymce/plugins/autoresize/plugin.js create mode 100644 vendor/tinymce/tinymce/plugins/autoresize/plugin.min.js create mode 100644 vendor/tinymce/tinymce/plugins/autosave/index.js create mode 100644 vendor/tinymce/tinymce/plugins/autosave/plugin.js create mode 100644 vendor/tinymce/tinymce/plugins/autosave/plugin.min.js create mode 100644 vendor/tinymce/tinymce/plugins/charmap/index.js create mode 100644 vendor/tinymce/tinymce/plugins/charmap/plugin.js create mode 100644 vendor/tinymce/tinymce/plugins/charmap/plugin.min.js create mode 100644 vendor/tinymce/tinymce/plugins/code/index.js create mode 100644 vendor/tinymce/tinymce/plugins/code/plugin.js create mode 100644 vendor/tinymce/tinymce/plugins/code/plugin.min.js create mode 100644 vendor/tinymce/tinymce/plugins/codesample/index.js create mode 100644 vendor/tinymce/tinymce/plugins/codesample/plugin.js create mode 100644 vendor/tinymce/tinymce/plugins/codesample/plugin.min.js create mode 100644 vendor/tinymce/tinymce/plugins/directionality/index.js create mode 100644 vendor/tinymce/tinymce/plugins/directionality/plugin.js create mode 100644 vendor/tinymce/tinymce/plugins/directionality/plugin.min.js create mode 100644 vendor/tinymce/tinymce/plugins/emoticons/index.js create mode 100644 vendor/tinymce/tinymce/plugins/emoticons/js/emojiimages.js create mode 100644 vendor/tinymce/tinymce/plugins/emoticons/js/emojiimages.min.js create mode 100644 vendor/tinymce/tinymce/plugins/emoticons/js/emojis.js create mode 100644 vendor/tinymce/tinymce/plugins/emoticons/js/emojis.min.js create mode 100644 vendor/tinymce/tinymce/plugins/emoticons/plugin.js create mode 100644 vendor/tinymce/tinymce/plugins/emoticons/plugin.min.js create mode 100644 vendor/tinymce/tinymce/plugins/fullscreen/index.js create mode 100644 vendor/tinymce/tinymce/plugins/fullscreen/plugin.js create mode 100644 vendor/tinymce/tinymce/plugins/fullscreen/plugin.min.js create mode 100644 vendor/tinymce/tinymce/plugins/help/index.js create mode 100644 vendor/tinymce/tinymce/plugins/help/plugin.js create mode 100644 vendor/tinymce/tinymce/plugins/help/plugin.min.js create mode 100644 vendor/tinymce/tinymce/plugins/image/index.js create mode 100644 vendor/tinymce/tinymce/plugins/image/plugin.js create mode 100644 vendor/tinymce/tinymce/plugins/image/plugin.min.js create mode 100644 vendor/tinymce/tinymce/plugins/importcss/index.js create mode 100644 vendor/tinymce/tinymce/plugins/importcss/plugin.js create mode 100644 vendor/tinymce/tinymce/plugins/importcss/plugin.min.js create mode 100644 vendor/tinymce/tinymce/plugins/insertdatetime/index.js create mode 100644 vendor/tinymce/tinymce/plugins/insertdatetime/plugin.js create mode 100644 vendor/tinymce/tinymce/plugins/insertdatetime/plugin.min.js create mode 100644 vendor/tinymce/tinymce/plugins/link/index.js create mode 100644 vendor/tinymce/tinymce/plugins/link/plugin.js create mode 100644 vendor/tinymce/tinymce/plugins/link/plugin.min.js create mode 100644 vendor/tinymce/tinymce/plugins/lists/index.js create mode 100644 vendor/tinymce/tinymce/plugins/lists/plugin.js create mode 100644 vendor/tinymce/tinymce/plugins/lists/plugin.min.js create mode 100644 vendor/tinymce/tinymce/plugins/media/index.js create mode 100644 vendor/tinymce/tinymce/plugins/media/plugin.js create mode 100644 vendor/tinymce/tinymce/plugins/media/plugin.min.js create mode 100644 vendor/tinymce/tinymce/plugins/nonbreaking/index.js create mode 100644 vendor/tinymce/tinymce/plugins/nonbreaking/plugin.js create mode 100644 vendor/tinymce/tinymce/plugins/nonbreaking/plugin.min.js create mode 100644 vendor/tinymce/tinymce/plugins/pagebreak/index.js create mode 100644 vendor/tinymce/tinymce/plugins/pagebreak/plugin.js create mode 100644 vendor/tinymce/tinymce/plugins/pagebreak/plugin.min.js create mode 100644 vendor/tinymce/tinymce/plugins/preview/index.js create mode 100644 vendor/tinymce/tinymce/plugins/preview/plugin.js create mode 100644 vendor/tinymce/tinymce/plugins/preview/plugin.min.js create mode 100644 vendor/tinymce/tinymce/plugins/quickbars/index.js create mode 100644 vendor/tinymce/tinymce/plugins/quickbars/plugin.js create mode 100644 vendor/tinymce/tinymce/plugins/quickbars/plugin.min.js create mode 100644 vendor/tinymce/tinymce/plugins/save/index.js create mode 100644 vendor/tinymce/tinymce/plugins/save/plugin.js create mode 100644 vendor/tinymce/tinymce/plugins/save/plugin.min.js create mode 100644 vendor/tinymce/tinymce/plugins/searchreplace/index.js create mode 100644 vendor/tinymce/tinymce/plugins/searchreplace/plugin.js create mode 100644 vendor/tinymce/tinymce/plugins/searchreplace/plugin.min.js create mode 100644 vendor/tinymce/tinymce/plugins/table/index.js create mode 100644 vendor/tinymce/tinymce/plugins/table/plugin.js create mode 100644 vendor/tinymce/tinymce/plugins/table/plugin.min.js create mode 100644 vendor/tinymce/tinymce/plugins/template/index.js create mode 100644 vendor/tinymce/tinymce/plugins/template/plugin.js create mode 100644 vendor/tinymce/tinymce/plugins/template/plugin.min.js create mode 100644 vendor/tinymce/tinymce/plugins/visualblocks/index.js create mode 100644 vendor/tinymce/tinymce/plugins/visualblocks/plugin.js create mode 100644 vendor/tinymce/tinymce/plugins/visualblocks/plugin.min.js create mode 100644 vendor/tinymce/tinymce/plugins/visualchars/index.js create mode 100644 vendor/tinymce/tinymce/plugins/visualchars/plugin.js create mode 100644 vendor/tinymce/tinymce/plugins/visualchars/plugin.min.js create mode 100644 vendor/tinymce/tinymce/plugins/wordcount/index.js create mode 100644 vendor/tinymce/tinymce/plugins/wordcount/plugin.js create mode 100644 vendor/tinymce/tinymce/plugins/wordcount/plugin.min.js create mode 100644 vendor/tinymce/tinymce/skins/content/dark/content.css create mode 100644 vendor/tinymce/tinymce/skins/content/dark/content.min.css create mode 100644 vendor/tinymce/tinymce/skins/content/default/content.css create mode 100644 vendor/tinymce/tinymce/skins/content/default/content.min.css create mode 100644 vendor/tinymce/tinymce/skins/content/document/content.css create mode 100644 vendor/tinymce/tinymce/skins/content/document/content.min.css create mode 100644 vendor/tinymce/tinymce/skins/content/tinymce-5-dark/content.css create mode 100644 vendor/tinymce/tinymce/skins/content/tinymce-5-dark/content.min.css create mode 100644 vendor/tinymce/tinymce/skins/content/tinymce-5/content.css create mode 100644 vendor/tinymce/tinymce/skins/content/tinymce-5/content.min.css create mode 100644 vendor/tinymce/tinymce/skins/content/writer/content.css create mode 100644 vendor/tinymce/tinymce/skins/content/writer/content.min.css create mode 100644 vendor/tinymce/tinymce/skins/ui/oxide-dark/content.css create mode 100644 vendor/tinymce/tinymce/skins/ui/oxide-dark/content.inline.css create mode 100644 vendor/tinymce/tinymce/skins/ui/oxide-dark/content.inline.min.css create mode 100644 vendor/tinymce/tinymce/skins/ui/oxide-dark/content.min.css create mode 100644 vendor/tinymce/tinymce/skins/ui/oxide-dark/skin.css create mode 100644 vendor/tinymce/tinymce/skins/ui/oxide-dark/skin.min.css create mode 100644 vendor/tinymce/tinymce/skins/ui/oxide-dark/skin.shadowdom.css create mode 100644 vendor/tinymce/tinymce/skins/ui/oxide-dark/skin.shadowdom.min.css create mode 100644 vendor/tinymce/tinymce/skins/ui/oxide/content.css create mode 100644 vendor/tinymce/tinymce/skins/ui/oxide/content.inline.css create mode 100644 vendor/tinymce/tinymce/skins/ui/oxide/content.inline.min.css create mode 100644 vendor/tinymce/tinymce/skins/ui/oxide/content.min.css create mode 100644 vendor/tinymce/tinymce/skins/ui/oxide/skin.css create mode 100644 vendor/tinymce/tinymce/skins/ui/oxide/skin.min.css create mode 100644 vendor/tinymce/tinymce/skins/ui/oxide/skin.shadowdom.css create mode 100644 vendor/tinymce/tinymce/skins/ui/oxide/skin.shadowdom.min.css create mode 100644 vendor/tinymce/tinymce/skins/ui/tinymce-5-dark/content.css create mode 100644 vendor/tinymce/tinymce/skins/ui/tinymce-5-dark/content.inline.css create mode 100644 vendor/tinymce/tinymce/skins/ui/tinymce-5-dark/content.inline.min.css create mode 100644 vendor/tinymce/tinymce/skins/ui/tinymce-5-dark/content.min.css create mode 100644 vendor/tinymce/tinymce/skins/ui/tinymce-5-dark/skin.css create mode 100644 vendor/tinymce/tinymce/skins/ui/tinymce-5-dark/skin.min.css create mode 100644 vendor/tinymce/tinymce/skins/ui/tinymce-5-dark/skin.shadowdom.css create mode 100644 vendor/tinymce/tinymce/skins/ui/tinymce-5-dark/skin.shadowdom.min.css create mode 100644 vendor/tinymce/tinymce/skins/ui/tinymce-5/content.css create mode 100644 vendor/tinymce/tinymce/skins/ui/tinymce-5/content.inline.css create mode 100644 vendor/tinymce/tinymce/skins/ui/tinymce-5/content.inline.min.css create mode 100644 vendor/tinymce/tinymce/skins/ui/tinymce-5/content.min.css create mode 100644 vendor/tinymce/tinymce/skins/ui/tinymce-5/skin.css create mode 100644 vendor/tinymce/tinymce/skins/ui/tinymce-5/skin.min.css create mode 100644 vendor/tinymce/tinymce/skins/ui/tinymce-5/skin.shadowdom.css create mode 100644 vendor/tinymce/tinymce/skins/ui/tinymce-5/skin.shadowdom.min.css create mode 100644 vendor/tinymce/tinymce/themes/silver/index.js create mode 100644 vendor/tinymce/tinymce/themes/silver/theme.js create mode 100644 vendor/tinymce/tinymce/themes/silver/theme.min.js create mode 100644 vendor/tinymce/tinymce/tinymce.d.ts create mode 100644 vendor/tinymce/tinymce/tinymce.js create mode 100644 vendor/tinymce/tinymce/tinymce.min.js diff --git a/composer.json b/composer.json index 6621cee4..4f94e4ce 100644 --- a/composer.json +++ b/composer.json @@ -1,5 +1,8 @@ { "require-dev": { "squizlabs/php_codesniffer": "^3.6" + }, + "require": { + "tinymce/tinymce": "^6.0" } } diff --git a/composer.lock b/composer.lock index 4cdb20c4..4f04c294 100644 --- a/composer.lock +++ b/composer.lock @@ -4,8 +4,68 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "41d912bd58e662a1350f62ec1dc8f75b", - "packages": [], + "content-hash": "5d2e28165eab7831551f0ea94a461251", + "packages": [ + { + "name": "tinymce/tinymce", + "version": "6.0.2", + "source": { + "type": "git", + "url": "https://github.com/tinymce/tinymce-dist.git", + "reference": "6eb0c53e09bd552740dee0ede369f6b97d6983d5" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/tinymce/tinymce-dist/zipball/6eb0c53e09bd552740dee0ede369f6b97d6983d5", + "reference": "6eb0c53e09bd552740dee0ede369f6b97d6983d5", + "shasum": "" + }, + "type": "component", + "extra": { + "component": { + "scripts": [ + "tinymce.js", + "plugins/*/plugin.js", + "themes/*/theme.js", + "models/*/model.js", + "icons/*/icons.js" + ], + "files": [ + "tinymce.min.js", + "plugins/*/plugin.min.js", + "themes/*/theme.min.js", + "models/*/model.min.js", + "skins/**", + "icons/*/icons.min.js" + ] + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT-only" + ], + "description": "Web based JavaScript HTML WYSIWYG editor control.", + "homepage": "https://www.tiny.cloud/", + "keywords": [ + "contenteditable", + "editing", + "html", + "javascript", + "rich editor", + "rich text", + "rich text editor", + "richtext", + "rte", + "text", + "tinymce", + "wysiwyg" + ], + "support": { + "source": "https://github.com/tinymce/tinymce-dist/tree/6.0.2" + }, + "time": "2022-04-27T03:41:08+00:00" + } + ], "packages-dev": [ { "name": "squizlabs/php_codesniffer", diff --git a/includes/class-enp_quiz-question.php b/includes/class-enp_quiz-question.php index 2563bd39..d576a790 100644 --- a/includes/class-enp_quiz-question.php +++ b/includes/class-enp_quiz-question.php @@ -490,7 +490,7 @@ public function get_question_explanation() { $question_explanation = $this->question_explanation; // ? TODO: perfect the target attribute add. kindof buggy. - $question_explanation = stripslashes($question_explanation); + $question_explanation = htmlentities($question_explanation); // = preg_replace('/(<]*)>/i', '$1 target="_blank">', $question_explanation); return $question_explanation; } diff --git a/public/quiz-create/css/enp_quiz-create.min.css b/public/quiz-create/css/enp_quiz-create.min.css index ac8e02dd..44bf9eb7 100644 --- a/public/quiz-create/css/enp_quiz-create.min.css +++ b/public/quiz-create/css/enp_quiz-create.min.css @@ -1,2 +1,2 @@ -html{font-size:16px!important}html #enp-quiz{box-sizing:border-box}body #enp-quiz{background:#fff;overflow:hidden}#enp-quiz *,#enp-quiz :after,#enp-quiz :before{box-sizing:inherit}#enp-quiz ol,#enp-quiz ul{margin:0 0 1.6rem 1.25rem;padding:0}#enp-quiz textarea{margin-bottom:1rem}#enp-quiz button,#enp-quiz button:active,#enp-quiz button:focus,#enp-quiz button:hover,#enp-quiz iframe,#enp-quiz input[type=button],#enp-quiz input[type=button]:active,#enp-quiz input[type=button]:focus,#enp-quiz input[type=button]:hover,#enp-quiz input[type=reset],#enp-quiz input[type=reset]:active,#enp-quiz input[type=reset]:focus,#enp-quiz input[type=reset]:hover,#enp-quiz input[type=submit],#enp-quiz input[type=submit]:active,#enp-quiz input[type=submit]:focus,#enp-quiz input[type=submit]:hover{border:none}#enp-quiz .enp-screen-reader-text{clip:rect(1px,1px,1px,1px);position:absolute!important;left:-10000px;top:auto;width:1px;height:1px;overflow:hidden}#enp-quiz .enp-screen-reader-text:active,#enp-quiz .enp-screen-reader-text:focus,#enp-quiz .enp-screen-reader-text:hover{background-color:#f1f1f1;border-radius:3px;box-shadow:0 0 2px 2px rgba(0,0,0,.6);clip:auto!important;color:#21759b;display:block;font-size:14px;font-weight:700;height:auto;left:5px;line-height:normal;padding:15px 23px 14px;text-decoration:none;top:5px;width:auto;z-index:100000}#enp-quiz .enp-accordion-header{background:#fff;width:100%;box-shadow:inset 1px 1px 0 #ccc,inset -1px -1px 0 #ccc;color:#1d1c25;font-family:Arial,monospace,helvetica,arial,sans-serif;font-size:.9rem;font-weight:400;line-height:1.5;text-transform:none;letter-spacing:0;text-align:left;border:none;border-radius:3px;min-height:3.065rem;padding:1rem 2rem 1rem 1rem;margin:1.6rem 0 0;position:relative;z-index:9;cursor:pointer;transition:all .2s cubic-bezier(0,0,.3,1)}#enp-quiz .enp-accordion-header:first-of-type{margin-top:0}#enp-quiz .enp-accordion-header .enp-accordion-header__icon{position:absolute;fill:#e8e4ed;right:.75rem;bottom:.75rem;transition:all .35s cubic-bezier(0,0,.3,1)}#enp-quiz .enp-accordion-header--open .enp-accordion-header__icon{transform:rotateX(180deg)}#enp-quiz .enp-quiz-settings__form .enp-accordion-header{position:relative;overflow-y:hidden}#enp-quiz .enp-accordion-content{background:#fff;width:100%;box-shadow:inset 1px -1px 0 #ccc,inset -1px -1px 0 #ccc;display:block;position:relative;height:auto;overflow:visible;margin-bottom:1.6rem}#enp-quiz .enp-accordion-content--closed{margin-top:0;padding-top:0;animation:d .25s cubic-bezier(0,0,.3,1) forwards;display:none}#enp-quiz .enp-accordion-content--open{padding-top:1.6rem;margin-bottom:2rem;animation:b .45s cubic-bezier(0,0,.3,1) forwards}#enp-quiz .enp-quiz-message{max-width:740px;margin:0 auto;background:#fff;border:1px solid #eee;border-bottom:1px solid #ccc;padding:1rem;margin-bottom:1.6rem;position:fixed;bottom:0;left:0}#enp-quiz .enp-quiz-message:after{content:"";display:table;clear:both}#enp-quiz .enp-quiz-message__title{font-size:1rem;text-transform:uppercase}#enp-quiz .enp-message__list{list-style:none;margin-left:0;font-size:1.1rem;margin-bottom:0}#enp-quiz .enp-quiz-message--error{border-left:6px solid #bf5700;color:#bf5700}#enp-quiz .enp-quiz-message__title--error{color:#964400}#enp-quiz .enp-quiz-message--success{border-left:6px solid #60aaad;color:#4e9497}#enp-quiz .enp-quiz-message__title--success{color:#4e9497}#enp-quiz .enp-quiz-message--note{border-left:6px solid #cca562}#enp-quiz .enp-quiz-message__title--note{color:#333f48}#enp-quiz .enp-quiz-message__close{border:none;background:none;box-shadow:none;padding:0;margin:0;position:absolute;top:5px;right:5px}#enp-quiz .enp-quiz-message--ajax{margin-bottom:.6rem;animation:a .3s}#enp-quiz .enp-quiz-message-ajax-container{z-index:9999;position:fixed;bottom:10px}#enp-quiz .enp-quiz-message--saving__spinner{margin-left:-10px}#enp-quiz .enp-quiz-message--saving__text{font-size:1rem}#enp-quiz input.limited-chars,#enp-quiz textarea.limited-chars{margin-bottom:.2rem}#enp-quiz .limited-chars__container{color:#fdfcfd;font-size:.8rem;display:block;text-align:right;margin-bottom:1.2rem}#enp-quiz .limited-chars__counter{color:#e8e4ed}#enp-quiz .limited-chars__container--error,#enp-quiz .limited-chars__container--error .limited-chars__counter{color:#964400}#enp-quiz input.has-error,#enp-quiz textarea.has-error{border:1px solid #bf5700}#enp-quiz input.has-error:focus,#enp-quiz textarea.has-error:focus{outline-color:#bf5700}#enp-quiz .enp-tooltip{position:relative}#enp-quiz .enp-tooltip__activator:focus+.enp-tooltip__description,#enp-quiz .enp-tooltip__activator:focus>.enp-tooltip__description{display:block}#enp-quiz .enp-tooltip__description{display:none;position:absolute;left:103%;margin-bottom:2rem;border-radius:3px;background:#faf9fb;font-size:.9rem;padding:.9rem;max-width:200px}.enp-sticky{position:relative;left:0;right:0;top:0;z-index:999}.enp-sticky.enp-sticky--fixed{position:fixed}.enp-breadcrumb-link{font-size:.85rem}.enp-breadcrumb-link__icon{position:relative;top:.45rem;left:.4rem}body #enp-quiz{color:#1d1c25;font-family:Arial,monospace,helvetica,arial,sans-serif;font-size:1em;line-height:1.6;font-weight:400}@media (min-width:700px){body #enp-quiz{font-size:1.3em}}#enp-quiz h1,#enp-quiz h2,#enp-quiz h3,#enp-quiz h4,#enp-quiz h5,#enp-quiz h6{font-family:Arial,monospace,helvetica,arial,sans-serif;color:#5d5e5f;clear:both;margin:0 0 .2rem;font-weight:700;line-height:1.2em}#enp-quiz h1{font-size:2em}#enp-quiz h2{font-size:1.75em}#enp-quiz h3{font-size:1.475em}#enp-quiz h4{font-size:1.3em}#enp-quiz h5{font-size:1.125em}#enp-quiz h6{font-size:1em}#enp-quiz p+h1,#enp-quiz p+h2,#enp-quiz p+h3,#enp-quiz p+h4,#enp-quiz p+h5,#enp-quiz p+h6,#enp-quiz ul+h1,#enp-quiz ul+h2,#enp-quiz ul+h3,#enp-quiz ul+h4,#enp-quiz ul+h5,#enp-quiz ul+h6{margin-top:1.8em}#enp-quiz p{font-size:.85em;margin-bottom:1.125em;font-weight:300}#enp-quiz ol,#enp-quiz ul{margin:0 0 1.6em 1.25em}#enp-quiz ul{list-style:disc}#enp-quiz ol{list-style:decimal}#enp-quiz li>ol,#enp-quiz li>ul{margin-bottom:0;margin-left:1.6em}#enp-quiz b,#enp-quiz strong{font-weight:700}#enp-quiz cite,#enp-quiz dfn,#enp-quiz em{font-family:georgia,times,serif;font-style:italic}#enp-quiz pre{background:#eee;font-family:Courier\ 10 Pitch,Courier,monospace;font-size:.95em;line-height:1.6;margin-bottom:1.6em;padding:1.6em;overflow:auto;max-width:100%}#enp-quiz .code,#enp-quiz code,#enp-quiz kbd,#enp-quiz tt,#enp-quiz var{font:.7em Monaco,Consolas,Andale Mono,DejaVu Sans Mono,monospace}#enp-quiz table{border:none}#enp-quiz table th{font-size:.8rem;text-transform:uppercase;border:none;border-bottom:1px solid #ddd}#enp-quiz table td,#enp-quiz table th{font-family:Arial,monospace,helvetica,arial,sans-serif}#enp-quiz table td{font-size:1rem;border:none;border-bottom:1px solid #eee}#enp-quiz table tr:nth-child(2n) td{background:#fdfcfd}#enp-quiz table tr:last-child td{border-bottom:none}#enp-quiz figure{margin:0}#enp-quiz img{height:auto;max-width:100%}#enp-quiz a{color:#bf5700;text-decoration:none;transition:color .2s;touch-action:manipulation}#enp-quiz a .enp-icon{fill:#bf5700}#enp-quiz a:active,#enp-quiz a:focus,#enp-quiz a:hover{color:#964400}#enp-quiz a:active .enp-icon,#enp-quiz a:focus .enp-icon,#enp-quiz a:hover .enp-icon{fill:#964400}#enp-quiz button:focus{outline-color:#4d90fe;outline-offset:-2px;outline-style:auto;outline-width:5px}#enp-quiz .enp-btn{text-align:center;border:none;border-radius:3px;padding:.85em 1.4em .75em;font-size:15px;font-weight:400;letter-spacing:.05em;color:#fff;box-shadow:inset 0 -2px 0 rgba(0,0,0,.2);background:#bf5700;cursor:pointer;text-transform:uppercase;transition:all .2s;line-height:1.6}#enp-quiz .enp-btn:focus,#enp-quiz .enp-btn:hover{color:#fff;box-shadow:none;background:#964400}#enp-quiz .enp-btn:active{color:#fff;box-shadow:inset 0 2px 0 rgba(0,0,0,.1);background:#1eeeff}#enp-quiz .enp-btn:focus{outline-color:#4d90fe;outline-offset:-2px;outline-style:auto;outline-width:5px}#enp-quiz .enp-btn:disabled,#enp-quiz .enp-btn:disabled:focus,#enp-quiz .enp-btn:disabled:hover{background:#bf5700;cursor:default;opacity:.5}#enp-quiz .enp-btn--add{text-align:center;border:none;border-radius:3px;padding:.85em 1.4em .75em;font-size:15px;font-weight:400;letter-spacing:.05em;color:#fff;box-shadow:inset 0 -2px 0 rgba(0,0,0,.2);background:#bf5700;cursor:pointer;text-transform:uppercase;transition:all .2s;line-height:1.6;border:1px dashed #b5a6c4;background:none;color:#545454;box-shadow:none;width:100%}#enp-quiz .enp-btn--add:focus,#enp-quiz .enp-btn--add:hover{color:#fff;box-shadow:none;background:#964400}#enp-quiz .enp-btn--add:active{color:#fff;box-shadow:inset 0 2px 0 rgba(0,0,0,.1);background:#1eeeff}#enp-quiz .enp-btn--add:focus{outline-color:#4d90fe;outline-offset:-2px;outline-style:auto;outline-width:5px}#enp-quiz .enp-btn--add:disabled,#enp-quiz .enp-btn--add:disabled:focus,#enp-quiz .enp-btn--add:disabled:hover{background:#bf5700;cursor:default;opacity:.5}#enp-quiz .enp-btn--add:focus,#enp-quiz .enp-btn--add:hover{border:1px dashed #69547e;color:#b5a6c4;background:hsla(0,0%,100%,.9)}#enp-quiz .enp-btn--disabled{opacity:.65;cursor:default}#enp-quiz .enp-btn--enabled{animation:f .6s}#enp-quiz .enp-icon{width:24px;height:24px;transition:all .2s}#enp-quiz .enp-page-title{font-size:1.6rem}@keyframes a{0%{opacity:0;transform:translate3d(0,100px,0)}to{opacity:1;transform:translateZ(0)}}@keyframes b{0%{opacity:0;height:auto;transform:translate3d(0,-20px,0)}to{opacity:1;height:auto;transform:translateZ(0)}}@keyframes c{0%{opacity:0;height:auto;transform:translate3d(0,-20px,0)}to{opacity:.8;height:auto;transform:translateZ(0)}}@keyframes d{0%{overflow:hidden;height:100px;opacity:1;transform:translateZ(0)}to{height:0;opacity:0;transform:translate3d(0,-20px,0)}}@keyframes e{0%{opacity:1;transform:translateZ(0)}to{padding:0;margin:0;opacity:0;height:0;z-index:-1;transform:translate3d(-200px,0,0)}}@keyframes f{0%{opacity:.8;transform:scaleX(1);box-shadow:0 0 0 rgba(0,0,0,.3)}40%{opacity:1}70%{opacity:1;transform:scale3d(1.1,1.1,1);box-shadow:0 0 8px rgba(0,0,0,.4)}to{opacity:1;transform:scaleX(1);box-shadow:0 0 0 rgba(0,0,0,.3),inset 0 2px 0 rgba(0,0,0,.2)}}@keyframes g{0%{opacity:0}to{opacity:1}}@keyframes h{0%{transform:translate3d(0,-200px,0)}to{transform:translateZ(0)}}.spinner{margin:0 auto;width:70px;text-align:center}.spinner>div{width:18px;height:18px;background-color:#333;border-radius:100%;display:inline-block;animation:i 1.4s infinite ease-in-out both}.spinner .bounce1{animation-delay:-.32s}.spinner .bounce2{animation-delay:-.16s}@keyframes i{0%,80%,to{transform:scale(0)}40%{transform:scale(1)}}#enp-quiz{transition:background .25s cubic-bezier(0,0,.3,1)}#enp-quiz .enp-aside{padding:1.6rem;margin-bottom:1.6rem;background:#fff;border-radius:3px;border:1px solid #eee;border-bottom-color:#ccc;max-width:740px;margin:0 auto;font-size:1.2rem}@media (min-width:700px){#enp-quiz .enp-aside{margin-bottom:2.6rem;padding:1.6rem 2rem}}#enp-quiz .enp-aside:after{content:"";display:table;clear:both}#enp-quiz .enp-aside__title{font-size:1rem;text-transform:uppercase;font-weight:600}#enp-quiz .enp-page-title{border-bottom:2px solid #00a9b7}#enp-quiz fieldset{border:none;margin:0;padding:0}#enp-quiz .enp-label{display:block;color:#343242;font-weight:400;font-size:.85rem;text-transform:uppercase}#enp-quiz .enp-label__sm{font-size:small}#enp-quiz .enp-legend{display:block;color:#343242;font-weight:400;font-size:.85rem;text-transform:uppercase;padding-top:1.6rem;margin-bottom:.2rem;border:none;padding-top:0}#enp-quiz .enp-input{font-size:1rem;font-family:Arial,monospace,helvetica,arial,sans-serif;padding:.8rem .5rem;background:#fff;border:1px solid #aaa;border-radius:3px;width:20rem;max-width:100%;margin-bottom:1.2rem}@media (min-width:700px){#enp-quiz .enp-input{padding:.8rem;width:100%}}#enp-quiz .enp-input__sm{padding:5px;margin-bottom:5px}#enp-quiz .enp-input.enp-input--has-description{margin-bottom:.2rem}#enp-quiz .enp-input-description,#enp-quiz .enp-textarea-description{margin-bottom:1rem;font-size:.85rem}#enp-quiz .enp-input-description--before,#enp-quiz .enp-textarea-description--before{margin-bottom:0}#enp-quiz .enp-input::-webkit-input-placeholder,#enp-quiz .enp-textarea::-webkit-input-placeholder{font-family:Arial,monospace,helvetica,arial,sans-serif;font-weight:300;color:#7a7697}#enp-quiz .enp-input:-ms-input-placeholder,#enp-quiz .enp-input::-ms-input-placeholder,#enp-quiz .enp-textarea:-ms-input-placeholder,#enp-quiz .enp-textarea::-ms-input-placeholder{font-family:Arial,monospace,helvetica,arial,sans-serif;font-weight:300;color:#7a7697}#enp-quiz .enp-input::placeholder,#enp-quiz .enp-textarea::placeholder{font-family:Arial,monospace,helvetica,arial,sans-serif;font-weight:300;color:#7a7697}#enp-quiz .enp-textarea{font-size:1rem;font-family:Arial,monospace,helvetica,arial,sans-serif;padding:.8rem .5rem;background:#fff;border:1px solid #aaa;border-radius:3px;width:20rem;max-width:100%;margin-bottom:1.2rem;line-height:1.5}@media (min-width:700px){#enp-quiz .enp-textarea{padding:.8rem;width:100%}}#enp-quiz .enp-textarea:focus{outline-color:#4d90fe;outline-offset:-2px;outline-style:auto;outline-width:5px}#enp-quiz .enp-textarea.enp-textarea--has-description{margin-bottom:.2rem}#enp-quiz .enp-textarea.enp-textarea--has-description--before{margin-bottom:1.2rem}#enp-quiz .enp-embed-code{font-size:1rem;font-family:Arial,monospace,helvetica,arial,sans-serif;padding:.8rem .5rem;background:#fff;border:1px solid #aaa;border-radius:3px;width:20rem;max-width:100%;margin-bottom:1.2rem;line-height:1.5;padding:1.6rem;font-size:.7rem;font-family:Monaco,Consolas,Andale Mono,DejaVu Sans Mono,monospace}@media (min-width:700px){#enp-quiz .enp-embed-code{padding:.8rem;width:100%}}#enp-quiz .enp-embed-code:focus{outline-color:#4d90fe;outline-offset:-2px;outline-style:auto;outline-width:5px}#enp-quiz .enp-preview-page-container,#enp-quiz .enp-publish-page-container,#enp-quiz .enp-quiz-form-container{display:grid;grid-column:2/-1;gap:1rem;width:100%;justify-items:center}#enp-quiz .enp-quiz-form{display:grid;padding-left:0;padding-right:0}@media (min-width:700px){#enp-quiz .enp-quiz-form{width:100%;max-width:40rem}}#enp-quiz .enp-preview-page-flex-container{display:grid;gap:1rem}@media (min-width:700px){#enp-quiz .enp-preview-page-flex-container{grid-template-columns:1fr 3fr;padding:0 2rem}}#enp-quiz .enp-quiz-title__label{display:block;color:#343242;font-weight:400;font-size:.85rem;text-transform:uppercase;font-weight:500}#enp-quiz .enp-quiz-title__textarea{font-size:1rem;font-family:Arial,monospace,helvetica,arial,sans-serif;padding:.8rem .5rem;background:#fff;border:1px solid #aaa;border-radius:3px;width:20rem;max-width:100%;margin-bottom:1.2rem;font-weight:700;font-size:1.6rem;margin-bottom:1rem}@media (min-width:700px){#enp-quiz .enp-quiz-title__textarea{padding:.8rem;width:100%}}#enp-quiz .enp-quiz-title__textarea::-webkit-input-placeholder{font-weight:700}#enp-quiz .enp-quiz-title__textarea:-ms-input-placeholder,#enp-quiz .enp-quiz-title__textarea::-ms-input-placeholder{font-weight:700}#enp-quiz .enp-quiz-title__textarea::placeholder{font-weight:700}#enp-quiz textarea{color:#000}#enp-quiz .enp-accordion-container{margin-bottom:1.6rem;position:relative}#enp-quiz .enp-question-content{background:#fff;width:100%;padding-top:0;position:relative}#enp-quiz .enp-question-inner{padding:1.6rem 1.6rem 1rem}@media (min-width:700px){#enp-quiz .enp-question-inner{padding-right:2.8rem;padding-left:2.9rem}}#enp-quiz .enp-question-title__label{display:block;color:#343242;font-weight:400;font-size:.85rem;text-transform:uppercase;font-weight:500}#enp-quiz .enp-question-title__textarea{font-family:Arial,monospace,helvetica,arial,sans-serif;padding:.8rem .5rem;background:#fff;border:1px solid #aaa;border-radius:3px;width:20rem;max-width:100%;margin-bottom:1.2rem;padding:1rem 1.2rem;font-size:1rem}@media (min-width:700px){#enp-quiz .enp-question-title__textarea{padding:.8rem;width:100%}}#enp-quiz .enp-question-image-upload{text-align:center;border:none;border-radius:3px;padding:.85em 1.4em .75em;font-size:15px;font-weight:400;letter-spacing:.05em;color:#fff;box-shadow:inset 0 -2px 0 rgba(0,0,0,.2);background:#bf5700;cursor:pointer;line-height:1.6;border:1px dashed #b5a6c4;background:none;color:#545454;box-shadow:none;border:2px dashed #b5a6c4;color:#e8e4ed;transition:all .2s;background:#faf9fb;font-size:1rem;text-transform:uppercase;position:relative;margin-bottom:2rem;transform:translateZ(0);transition:all .3s cubic-bezier(0,0,.3,1)}#enp-quiz .enp-question-image-upload:focus,#enp-quiz .enp-question-image-upload:hover{color:#fff;box-shadow:none;background:#964400}#enp-quiz .enp-question-image-upload:active{color:#fff;box-shadow:inset 0 2px 0 rgba(0,0,0,.1);background:#1eeeff}#enp-quiz .enp-question-image-upload:focus{outline-color:#4d90fe;outline-offset:-2px;outline-style:auto;outline-width:5px}#enp-quiz .enp-question-image-upload:disabled,#enp-quiz .enp-question-image-upload:disabled:focus,#enp-quiz .enp-question-image-upload:disabled:hover{background:#bf5700;cursor:default;opacity:.5}#enp-quiz .enp-question-image-upload:focus,#enp-quiz .enp-question-image-upload:hover{border:1px dashed #69547e;background:hsla(0,0%,100%,.9);color:#b5a6c4;border:2px dashed #999}#enp-quiz .enp-question-image-upload .enp-question-image-upload__icon--photo{width:2.8rem;height:2.8rem;opacity:0;position:absolute;top:0;left:0;right:0;margin:0 auto;transform:translateZ(0);z-index:-1;transition:opacity .2s,transform .3s cubic-bezier(0,0,.3,1)}#enp-quiz .enp-question-image-upload .enp-question-image-upload__icon--add{width:1rem;height:1rem;border-radius:50%;fill:#fff;padding:.02rem;background:#e8e4ed;fill:#faf9fb;margin-right:5px;position:relative;top:.2rem}#enp-quiz .enp-question-image-upload:active,#enp-quiz .enp-question-image-upload:focus,#enp-quiz .enp-question-image-upload:hover{padding-top:5rem;padding-bottom:2rem}#enp-quiz .enp-question-image-upload:active .enp-question-image-upload__icon--photo,#enp-quiz .enp-question-image-upload:focus .enp-question-image-upload__icon--photo,#enp-quiz .enp-question-image-upload:hover .enp-question-image-upload__icon--photo{opacity:1;z-index:1;transform:translate3d(0,1.75rem,0)}#enp-quiz .enp-question-image-upload:active .enp-question-image-upload__icon--add,#enp-quiz .enp-question-image-upload:focus .enp-question-image-upload__icon--add,#enp-quiz .enp-question-image-upload:hover .enp-question-image-upload__icon--add{fill:#fff;background:#b5a6c4}#enp-quiz .enp-question-image__container{position:relative;margin-bottom:1rem}#enp-quiz .enp-question-image{margin-bottom:1.2rem}#enp-quiz .enp-question-type__legend{display:block;color:#343242;font-weight:400;font-size:.85rem;text-transform:uppercase;padding-top:1.6rem;margin-bottom:.2rem;border:none}#enp-quiz .enp-question-type__input{clip:rect(1px,1px,1px,1px);position:absolute!important;left:-10000px;top:auto;width:1px;height:1px;overflow:hidden}#enp-quiz .enp-question-type__label{text-transform:capitalize;display:inline-block;padding:.2rem .5rem;border-radius:3px;cursor:pointer}#enp-quiz .enp-question-type__input:checked+.enp-question-type__label{background:#60aaad;color:#fff;text-shadow:0 0 1px rgba(0,0,0,.7)}#enp-quiz .enp-question-type__input:focus+.enp-question-type__label{z-index:8;outline-color:#4d90fe;outline-offset:-2px;outline-style:auto;outline-width:5px}#enp-quiz .enp-question-type__label{position:relative;z-index:9}#enp-quiz .enp-mc-options,#enp-quiz .enp-slider-options{margin-top:0;display:none;animation:d .25s cubic-bezier(0,0,.3,1) forwards;animation-delay:0s,.05s}#enp-quiz .enp-question-type__input--mc:checked~.enp-mc-options,#enp-quiz .enp-question-type__input--slider:checked~.enp-slider-options{visibility:visible;display:block;animation:g .45s cubic-bezier(0,0,.3,1) forwards}#enp-quiz .enp-mc-options__list{list-style:none;margin-left:0}#enp-quiz .enp-mc-option{position:relative;padding-left:6px}@media (min-width:700px){#enp-quiz .enp-mc-option{padding-left:0}}#enp-quiz .enp-mc-options__legend{display:block;color:#343242;font-weight:400;font-size:.85rem;text-transform:uppercase;font-weight:500}#enp-quiz .enp-mc-option__add,#enp-quiz .enp-mc-option__button--correct,#enp-quiz .enp-mc-option__button--delete{display:none}#enp-quiz .enp-question-type__input--mc:checked~.enp-mc-options .enp-mc-option__add,#enp-quiz .enp-question-type__input--mc:checked~.enp-mc-options .enp-mc-option__button--correct,#enp-quiz .enp-question-type__input--mc:checked~.enp-mc-options .enp-mc-option__button--delete{display:block}#enp-quiz .enp-button__question-image-delete,#enp-quiz .enp-mc-option__button--delete{border:none;background:none;box-shadow:none;padding:0;margin:0;position:absolute;top:9px;right:-24px;fill:#bbb;cursor:pointer}@media (min-width:700px){#enp-quiz .enp-button__question-image-delete,#enp-quiz .enp-mc-option__button--delete{right:-30px}}#enp-quiz .enp-button__question-image-delete:focus,#enp-quiz .enp-button__question-image-delete:hover,#enp-quiz .enp-mc-option__button--delete:focus,#enp-quiz .enp-mc-option__button--delete:hover{fill:#bf5700}#enp-quiz .enp-mc-option__button--correct{border:none;background:none;box-shadow:none;padding:0;margin:0;position:absolute;top:8px;left:-24px}@media (min-width:700px){#enp-quiz .enp-mc-option__button--correct{left:-35px}}#enp-quiz .enp-mc-option__button--correct .enp-mc-option__icon--correct{border-radius:50%;padding:.05em;width:28px;height:28px;fill:#fff;background:#fff;cursor:pointer;border:2px solid #c1893e;transition:all .2s}@media (min-width:700px){#enp-quiz .enp-mc-option__button--correct .enp-mc-option__icon--correct{padding:.15em}}#enp-quiz .enp-mc-option__button--correct:focus .enp-mc-option__icon--correct,#enp-quiz .enp-mc-option__button--correct:hover .enp-mc-option__icon--correct{background:#fff;border-color:#60aaad;fill:#60aaad}#enp-quiz .enp-mc-option__button--correct:disabled{opacity:1}#enp-quiz .enp-mc-option__button--correct:disabled .enp-mc-option__icon--correct{cursor:default;fill:#fff;border:2px solid transparent}#enp-quiz .enp-mc-option--correct .enp-mc-option__input{box-shadow:inset 0 0 3px #60aaad;border:1px solid #60aaad}#enp-quiz .enp-mc-option--correct .enp-mc-option__button--correct:focus .enp-mc-option__icon--correct,#enp-quiz .enp-mc-option--correct .enp-mc-option__button--correct:hover .enp-mc-option__icon--correct,#enp-quiz .enp-mc-option--correct .enp-mc-option__icon--correct{fill:#fff;border-color:#60aaad;background:#60aaad}#enp-quiz .enp-mc-option__add{text-align:center;border:none;border-radius:3px;padding:.85em 1.4em .75em;font-size:15px;font-weight:400;letter-spacing:.05em;color:#fff;box-shadow:inset 0 -2px 0 rgba(0,0,0,.2);background:#bf5700;cursor:pointer;line-height:1.6;border:1px dashed #b5a6c4;background:none;color:#545454;box-shadow:none;border:2px dashed #b5a6c4;color:#e8e4ed;transition:all .2s;background:#faf9fb;font-size:1rem;text-transform:uppercase;text-align:left;padding:.7rem .75rem .8rem}#enp-quiz .enp-mc-option__add:focus,#enp-quiz .enp-mc-option__add:hover{color:#fff;box-shadow:none;background:#964400}#enp-quiz .enp-mc-option__add:active{color:#fff;box-shadow:inset 0 2px 0 rgba(0,0,0,.1);background:#1eeeff}#enp-quiz .enp-mc-option__add:focus{outline-color:#4d90fe;outline-offset:-2px;outline-style:auto;outline-width:5px}#enp-quiz .enp-mc-option__add:disabled,#enp-quiz .enp-mc-option__add:disabled:focus,#enp-quiz .enp-mc-option__add:disabled:hover{background:#bf5700;cursor:default;opacity:.5}#enp-quiz .enp-mc-option__add:focus,#enp-quiz .enp-mc-option__add:hover{border:1px dashed #69547e;background:hsla(0,0%,100%,.9);color:#b5a6c4;border:2px dashed #999}#enp-quiz .enp-mc-option__add .enp-mc-option__add__icon{width:1rem;height:1rem;border-radius:50%;fill:#fff;padding:.02rem;margin-right:5px;background:#e8e4ed;fill:#faf9fb;position:relative;top:.2rem}#enp-quiz .enp-mc-option__add:hover .enp-mc-option__add__icon{fill:#fff;background:#b5a6c4}#enp-quiz .enp-slider-options .enp-input{max-width:11.8rem}#enp-quiz .enp-slider-correct__container .enp-input,#enp-quiz .enp-slider-range__container .enp-input{max-width:8.8rem}@media (min-width:400px){#enp-quiz .enp-slider-correct__container .enp-input,#enp-quiz .enp-slider-range__container .enp-input{max-width:11.8rem}}#enp-quiz .enp-slider-preview{border:1px solid #ddd;margin-top:.2rem;margin-bottom:1.6rem;padding:1.6rem 1.6rem .6rem;position:relative}#enp-quiz .enp-slider-preview .enp-label--slider-preview{position:absolute;width:100%;top:.2rem;left:.4rem;font-size:.75rem;text-transform:uppercase}#enp-quiz .enp-slider-correct__container,#enp-quiz .enp-slider-range__container{display:flex;justify-content:space-between;align-items:center}#enp-quiz .enp-slider-correct__helper,#enp-quiz .enp-slider-range__helper{color:#777;font-size:.85rem;background:#fff;padding:0 .3rem;position:relative}#enp-quiz .enp-slider-correct__helper:before,#enp-quiz .enp-slider-range__helper:before{content:"";position:absolute;top:44%;height:4px;background:#ddd;width:120px;left:-60px;z-index:-1;transition:width .7s cubic-bezier(0,0,.3,1),background 1.6s cubic-bezier(0,0,.3,1)}#enp-quiz .enp-slider-options{margin-bottom:2rem}#enp-quiz .enp-slider-options .enp-accordion-header{text-transform:uppercase;font-size:.85rem;padding:.675rem}#enp-quiz .enp-slider-options .enp-slider-advanced-options__content{border:none;box-shadow:none;padding-top:1rem;padding-bottom:0;margin-bottom:0}#enp-quiz .enp-slider-correct-high__container{position:relative}#enp-quiz .enp-slider-correct-high__input-container--hidden{display:none}#enp-quiz .enp-slider-correct__helper--hidden:before{width:0;background:#60aaad}#enp-quiz .enp-slider-correct-answer-range--add-range{text-align:center;border:none;border-radius:3px;padding:.85em 1.4em .75em;font-size:15px;font-weight:400;letter-spacing:.05em;color:#fff;box-shadow:inset 0 -2px 0 rgba(0,0,0,.2);background:#bf5700;cursor:pointer;text-transform:uppercase;line-height:1.6;border:1px dashed #b5a6c4;background:none;color:#545454;box-shadow:none;border:2px dashed #b5a6c4;color:#e8e4ed;transition:all .2s;background:#faf9fb;margin-left:.8rem;font-size:.7rem}#enp-quiz .enp-slider-correct-answer-range--add-range:focus,#enp-quiz .enp-slider-correct-answer-range--add-range:hover{color:#fff;box-shadow:none;background:#964400}#enp-quiz .enp-slider-correct-answer-range--add-range:active{color:#fff;box-shadow:inset 0 2px 0 rgba(0,0,0,.1);background:#1eeeff}#enp-quiz .enp-slider-correct-answer-range--add-range:focus{outline-color:#4d90fe;outline-offset:-2px;outline-style:auto;outline-width:5px}#enp-quiz .enp-slider-correct-answer-range--add-range:disabled,#enp-quiz .enp-slider-correct-answer-range--add-range:disabled:focus,#enp-quiz .enp-slider-correct-answer-range--add-range:disabled:hover{background:#bf5700;cursor:default;opacity:.5}#enp-quiz .enp-slider-correct-answer-range--add-range:focus,#enp-quiz .enp-slider-correct-answer-range--add-range:hover{border:1px dashed #69547e;background:hsla(0,0%,100%,.9);color:#b5a6c4;border:2px dashed #999}@media (min-width:400px){#enp-quiz .enp-slider-correct-answer-range--add-range{font-size:.8rem;padding:.7rem}}@media (min-width:700px){#enp-quiz .enp-slider-correct-answer-range--add-range{padding:.7rem 1.2rem;min-width:11.4rem}}#enp-quiz .enp-slider-correct-answer-range--add-range .enp-slider-correct-answer-range__icon{width:1rem;height:1rem;border-radius:50%;fill:#fff;padding:.02rem;margin-right:5px;background:#e8e4ed;fill:#faf9fb;position:relative;left:-.2rem}#enp-quiz .enp-slider-correct-answer-range--add-range:hover .enp-slider-correct-answer-range__icon{fill:#fff;background:#b5a6c4}#enp-quiz .enp-slider-correct-answer-range--remove-range{position:absolute;right:-1.6rem;bottom:1.6rem;background:none;border:none;box-shadow:none;padding:0 .1rem}#enp-quiz .enp-slider-correct-answer-range--remove-range .enp-slider-correct-answer-range__icon{width:1.2em;height:1.2em;fill:#e8e4ed}#enp-quiz .enp-slider-correct-answer-range--remove-range:focus .enp-slider-correct-answer-range__icon,#enp-quiz .enp-slider-correct-answer-range--remove-range:hover .enp-slider-correct-answer-range__icon{fill:#bf5700}@media (min-width:700px){#enp-quiz .enp-slider-correct-answer-range--remove-range{top:-.2rem;right:-.2rem;bottom:auto}}#enp-quiz .enp-slider-options .enp-input:-moz-read-only{background:#faf9fb}#enp-quiz .enp-slider-options .enp-input:read-only{background:#faf9fb}#enp-quiz .enp-answer-explanation{background:#fff;padding-top:2rem;box-shadow:inset 1px 0 0 #ccc,inset -1px -1px 0 #ccc,inset 0 1px 0 #ddd}#enp-quiz .enp-answer-explanation__label{display:block;color:#343242;font-weight:400;font-size:.85rem;text-transform:uppercase;font-weight:500}#enp-quiz .enp-question__button--delete{border:none;background:none;box-shadow:none;padding:0;margin:0;position:absolute;top:9px;right:9px;fill:#bbb;cursor:pointer}@media (min-width:700px){#enp-quiz .enp-question__button--delete{right:-30px}}#enp-quiz .enp-question__button--delete:hover{fill:#bf5700}#enp-quiz .enp-question__move{position:absolute;left:15px}@media (min-width:700px){#enp-quiz .enp-question__move{left:-40px}}#enp-quiz .enp-sort__placeholder{background:#ddd;height:60px;width:100%;max-height:120px;margin-bottom:1.6rem}#enp-quiz .ui-sortable .ui-sortable-helper .ui-sortable-handle{cursor:move;cursor:grabbing;cursor:-webkit-grabbing}#enp-quiz .enp-question__button--move{border:none;background:none;box-shadow:none;padding:0;margin:0;position:absolute;fill:#bbb;cursor:pointer}#enp-quiz .enp-question__button--move:focus,#enp-quiz .enp-question__button--move:hover{fill:#333}#enp-quiz .enp-question__button--move:disabled{opacity:.5}#enp-quiz .enp-question__button--move--up{top:0;left:-9px}#enp-quiz .enp-question__button--move--down{top:3px;right:-9px}#enp-quiz .enp-quiz-form__add-question{padding:.75em .8em .7em 1.4em;text-align:center;border:none;border-radius:3px;padding:.85em 1.4em .75em;font-size:15px;font-weight:400;letter-spacing:.05em;color:#fff;box-shadow:inset 0 -2px 0 rgba(0,0,0,.2);background:#bf5700;cursor:pointer;text-transform:uppercase;transition:all .2s;line-height:1.6;border:1px dashed #b5a6c4;background:none;color:#545454;box-shadow:none;padding-top:1rem;padding-bottom:1rem;margin-top:1.6rem;margin-bottom:2rem}#enp-quiz .enp-quiz-form__add-question:focus,#enp-quiz .enp-quiz-form__add-question:hover{color:#fff;box-shadow:none;background:#964400}#enp-quiz .enp-quiz-form__add-question:active{color:#fff;box-shadow:inset 0 2px 0 rgba(0,0,0,.1);background:#1eeeff}#enp-quiz .enp-quiz-form__add-question:focus{outline-color:#4d90fe;outline-offset:-2px;outline-style:auto;outline-width:5px}#enp-quiz .enp-quiz-form__add-question:disabled,#enp-quiz .enp-quiz-form__add-question:disabled:focus,#enp-quiz .enp-quiz-form__add-question:disabled:hover{background:#bf5700;cursor:default;opacity:.5}#enp-quiz .enp-quiz-form__add-question:focus,#enp-quiz .enp-quiz-form__add-question:hover{border:1px dashed #69547e;color:#b5a6c4;background:hsla(0,0%,100%,.9)}#enp-quiz .enp-quiz-form__add-question .enp-add-question__icon{width:1rem;height:1rem;border-radius:50%;fill:#fff;padding:.02rem;margin-right:5px;width:1.2rem;height:1.2rem;background:#e8e4ed;fill:#faf9fb;position:relative;top:.2rem}#enp-quiz .enp-quiz-form__add-question:hover .enp-add-question__icon{fill:#fff;background:#b5a6c4}#enp-quiz .enp-btn--save__btns{display:flex;align-items:center;align-items:flex-start}#enp-quiz .enp-quiz-form__save{text-align:center;border:none;border-radius:3px;padding:.85em 1.4em .75em;font-size:15px;font-weight:400;letter-spacing:.05em;color:#fff;box-shadow:inset 0 -2px 0 rgba(0,0,0,.2);background:#bf5700;cursor:pointer;text-transform:uppercase;transition:all .2s;line-height:1.6;width:100%;margin-bottom:1rem;opacity:.8;text-shadow:0 -1px 2px rgba(0,0,0,.6)}#enp-quiz .enp-quiz-form__save:focus,#enp-quiz .enp-quiz-form__save:hover{color:#fff;box-shadow:none;background:#964400}#enp-quiz .enp-quiz-form__save:active{color:#fff;box-shadow:inset 0 2px 0 rgba(0,0,0,.1);background:#1eeeff}#enp-quiz .enp-quiz-form__save:focus{outline-color:#4d90fe;outline-offset:-2px;outline-style:auto;outline-width:5px}#enp-quiz .enp-quiz-form__save:disabled,#enp-quiz .enp-quiz-form__save:disabled:focus,#enp-quiz .enp-quiz-form__save:disabled:hover{background:#bf5700;cursor:default;opacity:.5}#enp-quiz .enp-quiz-form__save:focus,#enp-quiz .enp-quiz-form__save:hover{opacity:1}@media (min-width:400px){#enp-quiz .enp-quiz-form__save{padding:1.2rem 1.8rem 1.1rem;width:27%;margin-right:3%;position:relative}}#enp-quiz .enp-quiz-form__save--reveal{animation:c .3s cubic-bezier(0,0,.3,1)}#enp-quiz .enp-btn--next-step{text-align:center;border:none;border-radius:3px;padding:.85em 1.4em .75em;font-size:15px;font-weight:400;letter-spacing:.05em;color:#fff;box-shadow:inset 0 -2px 0 rgba(0,0,0,.2);background:#bf5700;cursor:pointer;text-transform:uppercase;transition:all .2s;line-height:1.6;padding:.65em 1.2em .85em 1.4em}#enp-quiz .enp-btn--next-step:focus,#enp-quiz .enp-btn--next-step:hover{color:#fff;box-shadow:none;background:#964400}#enp-quiz .enp-btn--next-step:active{color:#fff;box-shadow:inset 0 2px 0 rgba(0,0,0,.1);background:#1eeeff}#enp-quiz .enp-btn--next-step:focus{outline-color:#4d90fe;outline-offset:-2px;outline-style:auto;outline-width:5px}#enp-quiz .enp-btn--next-step:disabled,#enp-quiz .enp-btn--next-step:disabled:focus,#enp-quiz .enp-btn--next-step:disabled:hover{background:#bf5700;cursor:default;opacity:.5}#enp-quiz .enp-btn--next-step__icon{border-radius:50%;fill:#fff;background:#fff;fill:#bf5700;width:1.2rem;height:1.2rem;margin-left:.5em;position:relative;top:.15rem}#enp-quiz .enp-btn--next-step__icon:hover{background:#fff;fill:#964400}#enp-quiz .enp-btn--next-step{width:100%;padding:1rem 1.4rem}@media (min-width:700px){#enp-quiz .enp-btn--next-step{padding:1.2rem 1.8rem 1.1rem}}#enp-quiz .enp-btn--next-step .enp-btn--next-step__icon{width:1rem;height:1rem}#enp-quiz .enp-btn--next-step--reveal{animation:b .3s cubic-bezier(0,0,.3,1)}#enp-quiz .enp-accordion-header--inserting,#enp-quiz .enp-mc-option--inputs{animation:a .4s cubic-bezier(0,0,.3,1) forwards}#enp-quiz .enp-mc-option--remove,#enp-quiz .enp-question--remove,#enp-quiz .enp-question__image--remove{animation:e .5s cubic-bezier(0,0,.3,1) forwards}#enp-quiz .enp-image-upload-wait{text-align:center;border:none;border-radius:3px;padding:.85em 1.4em .75em;font-size:15px;font-weight:400;letter-spacing:.05em;color:#fff;box-shadow:inset 0 -2px 0 rgba(0,0,0,.2);background:#bf5700;cursor:pointer;text-transform:uppercase;line-height:1.6;border:1px dashed #b5a6c4;background:none;color:#545454;box-shadow:none;border:2px dashed #b5a6c4;color:#e8e4ed;transition:all .2s;background:#faf9fb;padding-top:4rem;padding-bottom:4rem;margin-bottom:1rem;width:100%}#enp-quiz .enp-image-upload-wait:focus,#enp-quiz .enp-image-upload-wait:hover{color:#fff;box-shadow:none;background:#964400}#enp-quiz .enp-image-upload-wait:active{color:#fff;box-shadow:inset 0 2px 0 rgba(0,0,0,.1);background:#1eeeff}#enp-quiz .enp-image-upload-wait:focus{outline-color:#4d90fe;outline-offset:-2px;outline-style:auto;outline-width:5px}#enp-quiz .enp-image-upload-wait:disabled,#enp-quiz .enp-image-upload-wait:disabled:focus,#enp-quiz .enp-image-upload-wait:disabled:hover{background:#bf5700;cursor:default;opacity:.5}#enp-quiz .enp-image-upload-wait:focus,#enp-quiz .enp-image-upload-wait:hover{border:1px dashed #69547e;background:hsla(0,0%,100%,.9);color:#b5a6c4;border:2px dashed #999}#enp-quiz .enp-accordion-header.question-has-error{color:#bf5700;box-shadow:0 0 3px #bf5700}.enp-quiz.ui-sortable--sorting #enp-quiz .enp-accordion-content{display:none}#enp-quiz .enp-quiz-settings__title,#enp-quiz .enp-quiz-share__legend{position:relative;font-size:1rem;text-transform:uppercase;font-weight:600;padding-top:0}#enp-quiz .enp-quiz-settings__form{margin-bottom:3rem;overflow:visible}@media (min-width:1000px){#enp-quiz .enp-quiz-settings__form{padding:0;margin-bottom:0}}@media (min-width:700px){#enp-quiz .enp-fieldset{position:relative}}#enp-quiz .enp-title-display__legend{padding-top:0}@media (min-width:700px){#enp-quiz .enp-title-display__legend{padding-top:.4rem}}#enp-quiz .enp-quiz-share__input,#enp-quiz .enp-quiz-styles__input{width:100%}#enp-quiz .enp-quiz-styles__textarea--custom-css{font-family:Monaco,Consolas,Andale Mono,DejaVu Sans Mono,monospace;font-size:.9rem;min-height:200px}#enp-quiz .enp-fieldset--section{padding:1.6rem 1rem}#enp-quiz .enp-fieldset--section.enp-accordion-content--open{margin-bottom:0}#enp-quiz .enp-quiz-share--facebook{margin-bottom:2rem}#enp-quiz .enp-title-display__legend{display:block;color:#343242;font-weight:400;font-size:.85rem;text-transform:uppercase;padding-top:1.6rem;margin-bottom:.2rem;border:none}#enp-quiz .enp-title-display__input{clip:rect(1px,1px,1px,1px);position:absolute!important;left:-10000px;top:auto;width:1px;height:1px;overflow:hidden}#enp-quiz .enp-title-display__label{text-transform:capitalize;display:inline-block;padding:.2rem .5rem;border-radius:3px;cursor:pointer}#enp-quiz .enp-title-display__input:checked+.enp-title-display__label{background:#60aaad;color:#fff;text-shadow:0 0 1px rgba(0,0,0,.7)}#enp-quiz .enp-title-display__input:focus+.enp-title-display__label{z-index:8;outline-color:#4d90fe;outline-offset:-2px;outline-style:auto;outline-width:5px}#enp-quiz .enp-mc-options-order__legend{display:block;color:#343242;font-weight:400;font-size:.85rem;text-transform:uppercase;padding-top:1.6rem;margin-bottom:.2rem;border:none}#enp-quiz .enp-mc-options-order__input{clip:rect(1px,1px,1px,1px);position:absolute!important;left:-10000px;top:auto;width:1px;height:1px;overflow:hidden}#enp-quiz .enp-mc-options-order__label{text-transform:capitalize;display:inline-block;padding:.2rem .5rem;border-radius:3px;cursor:pointer}#enp-quiz .enp-mc-options-order__input:checked+.enp-mc-options-order__label{background:#60aaad;color:#fff;text-shadow:0 0 1px rgba(0,0,0,.7)}#enp-quiz .enp-mc-options-order__input:focus+.enp-mc-options-order__label{z-index:8;outline-color:#4d90fe;outline-offset:-2px;outline-style:auto;outline-width:5px}#enp-quiz .enp-mc-options-order{margin-bottom:1.6rem}#enp-quiz .enp-quiz-share__textarea{min-height:7.6rem;margin-bottom:2rem}@media (min-width:700px){#enp-quiz .enp-quiz-share__textarea{min-height:4.6rem}}@media (min-width:1000px){#enp-quiz .enp-quiz-share__textarea{min-height:7.6rem}}#enp-quiz .enp-preview-form__submit{margin-top:1.6rem;margin-bottom:1.6rem}#enp-quiz .enp-quiz-preview__title{font-size:1rem;text-transform:uppercase;font-weight:600}#enp-quiz .enp-preview-form__submit{text-align:center;border:none;border-radius:3px;padding:.85em 1.4em .75em;font-size:15px;font-weight:400;letter-spacing:.05em;color:#fff;box-shadow:inset 0 -2px 0 rgba(0,0,0,.2);background:#bf5700;cursor:pointer;text-transform:uppercase;transition:all .2s;line-height:1.6;width:100%;padding-top:.85rem;padding-bottom:.85rem;margin-bottom:1rem;opacity:.8;text-shadow:0 -1px 2px rgba(0,0,0,.6)}#enp-quiz .enp-preview-form__submit:focus,#enp-quiz .enp-preview-form__submit:hover{color:#fff;box-shadow:none;background:#964400}#enp-quiz .enp-preview-form__submit:active{color:#fff;box-shadow:inset 0 2px 0 rgba(0,0,0,.1);background:#1eeeff}#enp-quiz .enp-preview-form__submit:focus{outline-color:#4d90fe;outline-offset:-2px;outline-style:auto;outline-width:5px}#enp-quiz .enp-preview-form__submit:disabled,#enp-quiz .enp-preview-form__submit:disabled:focus,#enp-quiz .enp-preview-form__submit:disabled:hover{background:#bf5700;cursor:default;opacity:.5}#enp-quiz .enp-preview-form__submit:focus,#enp-quiz .enp-preview-form__submit:hover{opacity:1}#enp-quiz .enp-preview-form__submit--publish{width:100%;position:relative;z-index:99999999;padding:1.05rem 1.8rem .95rem}#enp-quiz .enp-quiz-styles__iris-wrapper{position:relative}#enp-quiz .iris-picker{box-sizing:content-box;position:relative;z-index:9999999999;top:-1.2rem;margin-bottom:1rem;padding-bottom:3rem;padding-right:30px}@media (min-width:1000px){#enp-quiz .iris-picker{position:absolute;top:-4px;left:0}}#enp-quiz .iris-picker:last-of-type{margin-bottom:0}#enp-quiz .iris-picker .ui-draggable-handle:focus .ui-slider-handle,#enp-quiz .iris-picker .ui-slider-handle:focus{box-shadow:0 0 3px rgba(0,0,0,.75)}#enp-quiz .enp-quiz-styles__set-default{text-align:center;border:none;border-radius:3px;padding:.85em 1.4em .75em;font-size:15px;font-weight:400;letter-spacing:.05em;color:#fff;box-shadow:inset 0 -2px 0 rgba(0,0,0,.2);background:#bf5700;cursor:pointer;text-transform:uppercase;transition:all .2s;line-height:1.6;border:2px solid #bf5700;background:transparent;color:#bf5700;box-shadow:none;font-size:.75rem;position:absolute;left:10px;bottom:10px}#enp-quiz .enp-quiz-styles__set-default:focus,#enp-quiz .enp-quiz-styles__set-default:hover{color:#fff;box-shadow:none;background:#964400}#enp-quiz .enp-quiz-styles__set-default:active{color:#fff;box-shadow:inset 0 2px 0 rgba(0,0,0,.1);background:#1eeeff}#enp-quiz .enp-quiz-styles__set-default:focus{outline-color:#4d90fe;outline-offset:-2px;outline-style:auto;outline-width:5px}#enp-quiz .enp-quiz-styles__set-default:disabled,#enp-quiz .enp-quiz-styles__set-default:disabled:focus,#enp-quiz .enp-quiz-styles__set-default:disabled:hover{background:#bf5700;cursor:default;opacity:.5}#enp-quiz .enp-quiz-styles__set-default:focus,#enp-quiz .enp-quiz-styles__set-default:hover{background:transparent;border:2px solid #964400;color:#964400}#enp-quiz .enp-iris__close{border:none;background:none;box-shadow:none;padding:0;margin:0;position:absolute;top:5px;right:5px;fill:#888;cursor:pointer}#enp-quiz .enp-quiz-styles__input--color{padding-left:45px}#enp-quiz .enp-quiz-styles__color-demo{width:30px;height:30px;border:1px solid #ccc;top:8px;left:8px;border-radius:3px;position:absolute}#enp-quiz .enp-share-quiz__url{display:block;font-size:1.5rem;line-height:1.4;word-wrap:break-word}#enp-quiz .enp-share-quiz{list-style:none;margin-left:0;display:flex;justify-content:center;align-content:center;align-items:center}#enp-quiz .enp-share-quiz__item{margin-right:20px}#enp-quiz .enp-share-quiz__item:last-child{margin-right:0}#enp-quiz .enp-share-quiz__item__icon{width:2.4rem;height:2.4rem;border-radius:50%;fill:#fff;padding:.6rem;fill:#fff!important}#enp-quiz .enp-share-quiz__item__icon--facebook{background-color:#3a5795}#enp-quiz .enp-share-quiz__item__icon--twitter{background-color:#4099ff}#enp-quiz .enp-share-quiz{justify-content:space-around;margin-bottom:0}#enp-quiz .enp-ab-create__container{max-width:740px;margin:0 auto;width:100%;background:#fdfcfd;padding-top:3rem;padding-bottom:3rem}#enp-quiz .enp-ab-create__container:after{content:"";display:table;clear:both}@media (min-width:700px){#enp-quiz .enp-ab-create__container{max-width:1000px}}@media (min-width:1000px){#enp-quiz .enp-ab-create__container{max-width:1440px}}#enp-quiz .enp-ab-create__form{max-width:740px;margin:0 auto}#enp-quiz .enp-ab-create__form:after{content:"";display:table;clear:both}#enp-quiz .enp-ab-create__label{display:block;color:#343242;font-weight:400;font-size:.85rem;text-transform:uppercase;font-weight:500}#enp-quiz .enp-ab-create-title__textarea{font-size:1rem;font-family:Arial,monospace,helvetica,arial,sans-serif;padding:.8rem .5rem;background:#fff;border:1px solid #aaa;border-radius:3px;width:20rem;max-width:100%;margin-bottom:1.2rem;font-weight:700;font-size:1.6rem;margin-bottom:1rem;width:100%}@media (min-width:700px){#enp-quiz .enp-ab-create-title__textarea{padding:.8rem;width:100%}}#enp-quiz .enp-ab-create-title__textarea::-webkit-input-placeholder{font-weight:700}#enp-quiz .enp-ab-create-title__textarea:-ms-input-placeholder,#enp-quiz .enp-ab-create-title__textarea::-ms-input-placeholder{font-weight:700}#enp-quiz .enp-ab-create-title__textarea::placeholder{font-weight:700}#enp-quiz .enp-ab-create__select{width:100%;-webkit-appearance:none;-moz-appearance:none;appearance:none;font-size:.85rem;padding:.7rem 32px .7rem .8rem;border:1px solid #bbb;border-radius:3px;margin-bottom:1.6rem;background:url(../svg/chevron-down.svg) 100% 50% no-repeat;background-color:#fff;box-shadow:inset -26px 0 0 rgba(0,0,0,.1)}#enp-quiz .enp-ab-create__submit{width:100%;padding-top:1em;padding-bottom:1em}#headerimg h1{text-align:center;font-size:40px!important}#enp-quiz.enp-quiz__main{max-width:740px;margin:0 auto;display:grid;gap:1em;min-height:85vh}#enp-quiz.enp-quiz__main:after{content:"";display:table;clear:both}@media (min-width:1000px){#enp-quiz.enp-quiz__main{max-width:740px;margin:0 auto;grid-template-columns:1fr 4fr}#enp-quiz.enp-quiz__main:after{content:"";display:table;clear:both}}@media (min-width:1000px) and (min-width:700px){#enp-quiz.enp-quiz__main{max-width:1000px}}@media (min-width:1000px) and (min-width:1000px){#enp-quiz.enp-quiz__main{max-width:1440px}}#enp-quiz .enp-dash-container{padding:2rem;transition:all .25s cubic-bezier(0,0,.3,1)}#enp-quiz .enp-dash__section-aside{background-color:#faf9fb}@media (min-width:700px){#enp-quiz .enp-dash__section-aside{padding:2rem}}#enp-quiz .enp-breadcrumb-link__container{padding-bottom:2rem}#enp-quiz .enp-search-quizzes{display:flex;justify-content:space-between;flex-wrap:wrap;padding:1em}@media (min-width:700px){#enp-quiz .enp-search-quizzes{padding:.2rem .8rem;flex-wrap:nowrap}}@media (min-width:1000px){#enp-quiz .enp-search-quizzes{display:flex;justify-content:space-between;flex-direction:column}}#enp-quiz .enp-search-quizzes__form-item{margin-bottom:.6rem;flex:0 1 48%}@media (min-width:400px){#enp-quiz .enp-search-quizzes__form-item{margin-bottom:0;margin-right:1rem;flex:1 0 auto}}#enp-quiz .enp-quiz-search{flex:1 0 100%;position:relative}@media (min-width:700px){#enp-quiz .enp-quiz-search{flex:1 0 auto}}#enp-quiz .enp-search-quizzes__label{margin-bottom:0;clip:rect(1px,1px,1px,1px);position:absolute!important;left:-10000px;top:auto;width:1px;height:1px;overflow:hidden}#enp-quiz .enp-search-quizzes__select{padding:.3rem;border-radius:3px;width:100%}@media (min-width:1000px){#enp-quiz .enp-search-quizzes__select{min-width:200px}}#enp-quiz .enp-quiz-search__input{width:100%;margin:0 0 .1rem;padding:.3rem .3rem .3rem 26px;font-size:.85rem}@media (min-width:700px){#enp-quiz .enp-quiz-search__input{max-width:200px}}#enp-quiz .enp-quiz-search__icon{position:absolute;bottom:.3rem;left:.2rem;width:21px;height:21px}#enp-quiz .enp-search-quizzes__button{padding:.2rem .8rem}#enp-quiz .enp-search-results-description{font-size:.85rem}#enp-quiz .enp-search-results-description__link{white-space:nowrap}#enp-quiz .enp-search-results-description__icon{width:1.3em;height:1.3em;position:relative;top:4px;left:2px}#enp-quiz .enp-dash__section-title{font-size:1rem;text-transform:uppercase;margin-bottom:.325rem;border-bottom:1px solid #e8e4ed}#enp-quiz .enp-dash__ab-test-helper--not-enough-quizzes{color:#b5a6c4}#enp-quiz .enp-view-toggle{cursor:pointer;opacity:.5;display:none}@media (min-width:700px){#enp-quiz .enp-view-toggle{display:flex}}#enp-quiz .enp-view-toggle__active{opacity:1}#enp-quiz .enp-sort-by{margin-left:5px}#enp-quiz .enp-dash-list{display:flex;flex-flow:column wrap;align-items:stretch;list-style:none;margin-left:0}#enp-quiz .enp-dash-item{flex-basis:100%;padding:1rem 1.2rem;background:#fff;border:1px solid #eee;border-bottom:1px solid #ddd;list-style:none;transition:all .35s cubic-bezier(0,0,.3,1);margin:0 0 .8rem;justify-content:space-between;display:flex;z-index:1;flex-direction:column;align-content:flex-end;justify-content:flex-end;border:none;border-radius:3px;background-color:#f5f3f7}#enp-quiz .enp-dash-item--draft,#enp-quiz .enp-dash-item--published{box-shadow:inset 4px 0 0 #00a9b7,0 1px 0 rgba(0,0,0,.1)}#enp-quiz .enp-dash-item--remove{animation:e .5s cubic-bezier(0,0,.3,1) forwards}#enp-quiz .enp-dash-list--list-view .enp-dash-item{margin:0 0 .8rem;flex-basis:100%}#enp-quiz .enp-dash-item__spinner{display:flex;justify-content:center;align-content:center;align-items:center;position:absolute;top:0;bottom:0;left:0;right:0;background:hsla(0,59%,90%,.8);width:100%;animation:g .3s cubic-bezier(0,0,.3,1)}#enp-quiz .enp-dash-item__header{padding:.5rem 1rem;background:#faf9fb;border-bottom:1px solid #e8e4ed;display:flex;justify-content:space-between;align-items:center;border-radius:3px}#enp-quiz .enp-dash-item__title{font-size:1rem;padding-bottom:.5rem;padding:0;margin-bottom:0}#enp-quiz .enp-dash-item__title a{color:#00a9b7}#enp-quiz .enp-dash-item__content{padding:0 0 .375rem;position:relative;transition:all .2s cubic-bezier(0,0,.3,1)}#enp-quiz .enp-dash-item__meta{font-size:.7rem;font-weight:300;color:#565656;font-size:.75rem}#enp-quiz .enp-dash-item__username{word-wrap:break-word;padding-left:.4rem;margin-left:.2rem;border-left:1px solid #ddd}#enp-quiz .enp-dash-item__title--ab-test{padding-bottom:0}#enp-quiz .enp-dash-item__ab-quizzes{list-style:none;margin-left:0;font-size:.85rem;color:#e8e4ed;margin-bottom:.8rem}#enp-quiz .enp-dash-item__nav{list-style:none;margin-left:0;margin-bottom:0;font-size:.85rem}#enp-quiz .enp-dash-item__nav__item{display:flex;margin:0;width:100%;align-items:center}#enp-quiz .enp-dash-item__nav__item:hover{background-color:#f5f3f7}#enp-quiz .enp-dash-item__nav__item:hover .enp-dash-item__icon{fill:#bf5700}#enp-quiz .enp-dash-item__nav__item a{font-weight:400;color:#b5a6c4;display:flex;align-items:center;width:100%;padding:12px}#enp-quiz .enp-dash-item__nav__item a:focus,#enp-quiz .enp-dash-item__nav__item a:hover{color:#bf5700;outline:1px dotted #bf5700;outline-offset:1px}#enp-quiz .enp-delete-quiz{width:100%}#enp-quiz .enp-delete-quiz:hover .enp-dash-item__delete{color:#bf5700}#enp-quiz .enp-delete-quiz:hover .enp-icon{fill:#bf5700}#enp-quiz .enp-dash-item__delete{border:none;background:none;box-shadow:none;padding:0;margin:0;display:flex;padding:12px;align-items:center;position:relative;line-height:1.6;color:#b5a6c4;cursor:pointer;width:100%}#enp-quiz .enp-dash-item__delete .enp-icon{fill:#b5a6c4}#enp-quiz .enp-dash-item__icon{fill:#b5a6c4;width:15px;height:15px;margin-right:10px}#enp-quiz .enp-dash-item__nav--collapsible{display:none;position:absolute;z-index:2;top:44px;right:-17px;width:195px;background-color:#fff;text-align:left;transform:translateZ(0);transition:all .2s cubic-bezier(0,0,.3,1)}#enp-quiz .enp-dash-item__nav--collapsible .enp-dash-item__nav__item{cursor:pointer}#enp-quiz .enp-dash-item__menu-action{height:24px;background:none;border:none;color:#444;padding:0;bottom:.2rem;right:1.5rem;top:1.5rem;cursor:pointer}#enp-quiz .enp-dash-item__menu-action-wrap{max-width:0;display:flex;flex-direction:column;align-items:flex-end}#enp-quiz .enp-dash-item__menu-action__icon{width:15px;height:15px;fill:#b5a6c4;transition:all .3s cubic-bezier(0,0,.3,1)}#enp-quiz .enp-dash-item--menu-active{transform:translate3d(0,-3px,0);z-index:2}#enp-quiz .enp-dash-item--menu-active .enp-dash-item__nav-wrap{position:relative}#enp-quiz .enp-dash-item--menu-active.enp-dash-item--published{box-shadow:inset 4px 0 0 #60aaad,0 2px 2px rgba(0,0,0,.2)}#enp-quiz .enp-dash-item--menu-active.enp-dash-item--draft{box-shadow:inset 4px 0 0 #b4d7d8,0 2px 2px rgba(0,0,0,.2)}#enp-quiz .enp-dash-item--menu-active .enp-dash-item__menu-action__icon--bottom{transform:rotateX(180deg)}#enp-quiz .enp-dash-item--menu-active .enp-dash-item__nav--collapsible{display:block;animation:b .25s cubic-bezier(0,0,.3,1) forwards;border-radius:3px;box-shadow:0 2px 2px rgba(0,0,0,.2)}#enp-quiz .enp-dash-item--menu-active .enp-dash-item__content{opacity:.4}#enp-quiz .enp-quiz-results{display:flex;justify-content:space-around;list-style:none;margin:.8rem 0 0;padding:0;text-align:center}#enp-quiz .enp-quiz-results__item{margin:0 2% 0 0;padding:0;color:#454545}@media (max-width:280px){#enp-quiz .enp-quiz-results__item{width:100%;padding:0;margin-bottom:.6rem}}#enp-quiz .enp-quiz-results__number{font-size:1.6rem;line-height:1;position:relative}#enp-quiz .enp-dash-item--draft .enp-quiz-results__number{opacity:.5}#enp-quiz .enp-quiz-results__number--average-score{color:#4e9497}#enp-quiz .enp-quiz-results__number--average-score:after{content:"%";font-size:.9rem;position:absolute;top:.3rem;right:-1rem}#enp-quiz .enp-quiz-results__label{text-transform:uppercase;font-size:.7rem;font-weight:300;color:#888}#enp-quiz .enp-dash-item--add-new__wrap{display:grid;gap:1em;grid-template-columns:1fr 1fr}#enp-quiz .enp-dash-list--quiz__container{display:grid;gap:1em}@media (min-width:1000px){#enp-quiz .enp-dash-list--quiz__container{grid-template-columns:1fr 1fr}}#enp-quiz .enp-dash-item--add-new{background:none;border:none;padding:0;position:relative}@media (min-width:1000px){#enp-quiz .enp-dash-item--add-new{padding-top:7rem}}#enp-quiz .enp-dash-link--add-new{text-align:center;border:none;border-radius:3px;padding:.85em 1.4em .75em;font-size:15px;font-weight:400;letter-spacing:.05em;color:#fff;box-shadow:inset 0 -2px 0 rgba(0,0,0,.2);background:#bf5700;cursor:pointer;text-transform:uppercase;line-height:1.6;border:1px dashed #b5a6c4;background:none;color:#545454;box-shadow:none;border:2px dashed #b5a6c4;color:#e8e4ed;transition:all .2s;justify-content:flex-start;color:#bf5700;padding:1rem 1.2rem}#enp-quiz .enp-dash-link--add-new:focus,#enp-quiz .enp-dash-link--add-new:hover{color:#fff;box-shadow:none;background:#964400}#enp-quiz .enp-dash-link--add-new:active{color:#fff;box-shadow:inset 0 2px 0 rgba(0,0,0,.1);background:#1eeeff}#enp-quiz .enp-dash-link--add-new:focus{outline-color:#4d90fe;outline-offset:-2px;outline-style:auto;outline-width:5px}#enp-quiz .enp-dash-link--add-new:disabled,#enp-quiz .enp-dash-link--add-new:disabled:focus,#enp-quiz .enp-dash-link--add-new:disabled:hover{background:#bf5700;cursor:default;opacity:.5}#enp-quiz .enp-dash-link--add-new:focus,#enp-quiz .enp-dash-link--add-new:hover{border:1px dashed #69547e;background:hsla(0,0%,100%,.9);color:#b5a6c4;border:2px dashed #999}@media (min-width:700px){#enp-quiz .enp-dash-link--add-new{font-size:1rem;text-transform:uppercase;display:flex;justify-content:center;align-content:center;align-items:center;flex-direction:column;position:absolute;top:0;left:0;right:0;bottom:0}}#enp-quiz .enp-dash-link--add-new .enp-dash-link__icon{border-radius:50%;fill:#fff;width:1.2rem;height:1.2rem;margin-right:5px;background-color:#333f48}@media (min-width:700px){#enp-quiz .enp-dash-link--add-new .enp-dash-link__icon{width:2rem;height:2rem;margin:.8rem 0 .2rem}}#enp-quiz .enp-dash-link--add-new:hover{color:#964400}#enp-quiz .enp-dash-link--add-new:hover .enp-dash-link__icon{fill:#fff;background:#964400}#enp-quiz .enp-quiz-message--welcome p{color:#1d1c25}#enp-quiz .enp-paginate{list-style:none;margin-left:0;font-size:1rem}#enp-quiz .enp-paginate,#enp-quiz .enp-paginate__link{display:flex;justify-content:center;align-content:center;align-items:center}#enp-quiz .enp-paginate__link{margin:0 .2rem;padding:0 .4rem;border-radius:3px;font-weight:400}#enp-quiz .enp-paginate__link--current-page{border:2px solid #00a9b7}#enp-quiz .enp-paginate__item--first-page,#enp-quiz .enp-paginate__item--last-page{display:flex}#enp-quiz .enp-paginate__item--first-page:after,#enp-quiz .enp-paginate__item--last-page:before{content:"...";font-size:1rem;position:relative;bottom:.2rem;opacity:.6}#enp-quiz .enp-paginate__item--no-gap:after,#enp-quiz .enp-paginate__item--no-gap:before{content:""}#enp-quiz .enp-paginate__item--next-page{margin-left:.2rem}#enp-quiz .enp-paginate__item--previous-page{margin-right:.2rem}#enp-quiz .enp-quiz-breadcrumbs{grid-row:1}#enp-quiz .enp-quiz-breadcrumbs__list{display:flex;list-style:none;margin-left:0;margin-bottom:0}#enp-quiz .enp-quiz-breadcrumbs__item{margin-right:10px;display:flex;justify-content:center;align-content:center;align-items:center;fill:#bf5700;margin-right:5px}#enp-quiz .enp-quiz-breadcrumbs__item:last-of-type{margin-right:0}@media (min-width:400px){#enp-quiz .enp-quiz-breadcrumbs__item{margin-right:10px}}#enp-quiz .enp-quiz-breadcrumbs__link--disabled{opacity:.65;cursor:default}#enp-quiz .enp-quiz-breadcrumbs__link--active{text-align:center;border:none;border-radius:3px;padding:.85em 1.4em .75em;font-size:15px;font-weight:400;letter-spacing:.05em;color:#fff;box-shadow:inset 0 -2px 0 rgba(0,0,0,.2);background:#bf5700;cursor:pointer;text-transform:uppercase;transition:all .2s;line-height:1.6;border:2px solid #bf5700;background:transparent;color:#bf5700;box-shadow:none;padding:.4em 1em}#enp-quiz .enp-quiz-breadcrumbs__link--active:focus,#enp-quiz .enp-quiz-breadcrumbs__link--active:hover{color:#fff;box-shadow:none;background:#964400}#enp-quiz .enp-quiz-breadcrumbs__link--active:active{color:#fff;box-shadow:inset 0 2px 0 rgba(0,0,0,.1);background:#1eeeff}#enp-quiz .enp-quiz-breadcrumbs__link--active:focus{outline-color:#4d90fe;outline-offset:-2px;outline-style:auto;outline-width:5px}#enp-quiz .enp-quiz-breadcrumbs__link--active:disabled,#enp-quiz .enp-quiz-breadcrumbs__link--active:disabled:focus,#enp-quiz .enp-quiz-breadcrumbs__link--active:disabled:hover{background:#bf5700;cursor:default;opacity:.5}#enp-quiz .enp-quiz-breadcrumbs__link--active:focus,#enp-quiz .enp-quiz-breadcrumbs__link--active:hover{background:transparent;border:2px solid #964400;color:#964400}#enp-quiz .enp-quiz-breadcrumbs__link{font-size:1rem;font-weight:400;text-transform:none;letter-spacing:0}#enp-quiz .enp-quiz-breadcrumbs--fixed{top:0;position:fixed;animation:h .25s}#enp-quiz .enp-results-title{font-size:1.6rem;text-align:center;padding:3.2rem 20px 2.6rem;background:#fdfcfd;margin:-1.2rem 0 2rem;border-bottom:1px solid #ddd}#enp-quiz .enp-results-title:after{font-size:1rem;text-transform:uppercase;display:block;content:"RESULTS";font-weight:400}#enp-quiz .enp-results__container{max-width:740px;margin:0 auto;display:block}#enp-quiz .enp-results__container:after{content:"";display:table;clear:both}@media (min-width:700px){#enp-quiz .enp-results__container{max-width:1000px}}@media (min-width:1000px){#enp-quiz .enp-results__container{max-width:1440px;display:flex;justify-content:space-between}}#enp-quiz .enp-quiz-scores__container,#enp-quiz .enp-results-flow__container{width:100%}@media (min-width:1000px){#enp-quiz .enp-quiz-scores__container,#enp-quiz .enp-results-flow__container{width:48%}}#enp-quiz .enp-quiz-scores{margin-top:2.6rem}#enp-quiz .enp-quiz-score__line-chart{height:300px;margin-bottom:1rem}#enp-quiz .enp-quiz-score__line-chart .ct-label{color:#1d1c25}#enp-quiz .enp-quiz-score__line-chart .ct-grid{stroke:#dadada;stroke-dasharray:0}#enp-quiz .enp-quiz-score__line-chart .ct-line{stroke:#60aaad;stroke-width:2px}#enp-quiz .enp-quiz-score__line-chart .ct-point{stroke:#60aaad;stroke-width:8px}#enp-quiz .enp-quiz-scores-table{width:100%;max-width:500px;margin:0 auto}#enp-quiz .enp-quiz-scores-table tr th{background-color:#fff}#enp-quiz .enp-quiz-scores-table__label{padding-left:5%}#enp-quiz .enp-quiz-scores-table__score{text-align:right;padding-right:5%}#enp-quiz .enp-results-flow{position:relative;margin:2rem auto;width:320px;height:320px;border-radius:50%}@media (min-width:400px){#enp-quiz .enp-results-flow{width:390px;height:390px}}@media (min-width:700px){#enp-quiz .enp-results-flow{width:450px;height:450px}}@media (min-width:1000px){#enp-quiz .enp-results-flow{width:400px;height:400px}}#enp-quiz .enp-results-flow__section-title{clip:rect(1px,1px,1px,1px);position:absolute!important;left:-10000px;top:auto;width:1px;height:1px;overflow:hidden}#enp-quiz .enp-results-flow__item{border-radius:50%;text-align:center;height:100%;width:100%;margin:0 auto;left:0;right:0;padding:12.5% 0 0;letter-spacing:.05rem;border:2px solid #60aaad;animation:.85s a cubic-bezier(0,0,.3,1) forwards}#enp-quiz .enp-results-flow__item--total-views{background:#fff}#enp-quiz .enp-results-flow__item--quiz-starts{width:65%;height:65%;position:absolute;padding-top:8%;bottom:2.5%;background:#fff}#enp-quiz .enp-results-flow__item--quiz-finishes{width:35%;height:35%;position:absolute;bottom:5%;background:#d6e9ea}#enp-quiz .enp-results-flow__title{font-size:1rem;text-transform:uppercase;color:#444;font-size:.7rem;margin-bottom:0}@media (min-width:700px){#enp-quiz .enp-results-flow__title{font-weight:700;margin-bottom:2px}}#enp-quiz .enp-results-flow__number{font-weight:700;font-size:1.4rem;line-height:1.2}#enp-quiz .enp-results-flow__number--total-views{font-size:2rem}#enp-quiz .enp-results-flow__number--quiz-starts{font-size:1.65rem}#enp-quiz .enp-results-flow__percentage{font-size:.8rem;font-weight:400;position:relative;display:inline-block;top:-.7em;left:-.1rem;color:#444}#enp-quiz .enp-results-flow__percentage:after{content:"%";position:absolute;right:-.75rem;font-size:.7rem;color:#444}#enp-quiz .enp-results-questions__section{padding-top:5rem;padding-bottom:3rem;margin-top:5rem;margin-bottom:3rem}@media (min-width:700px){#enp-quiz .enp-results-questions__section{margin-right:2rem;margin-left:2rem}}#enp-quiz .enp-results-questions__header{align-items:flex-start;flex-direction:column}@media (min-width:400px){#enp-quiz .enp-results-questions__header{display:flex;justify-content:space-between;flex-direction:row;align-items:flex-end}}#enp-quiz .enp-results-questions__key,#enp-quiz .enp-results-questions__title{font-size:1rem;text-transform:uppercase}#enp-quiz .enp-results-questions{list-style:none;margin-left:0}#enp-quiz .enp-results-question{width:100%;font-size:1rem;padding:0;margin-bottom:1rem}#enp-quiz .enp-results-question__header{padding:1rem 1.2rem;position:relative}#enp-quiz .enp-results-question__question,#enp-quiz .enp-results-question__stats{font-size:1rem;line-height:1.4}#enp-quiz .enp-results-question__question{font-weight:400}@media (min-width:400px){#enp-quiz .enp-results-question__question{padding-right:7em;margin-bottom:0}}#enp-quiz .enp-results-question__stats{font-size:.9rem}@media (min-width:400px){#enp-quiz .enp-results-question__stats{position:absolute;bottom:1rem;right:1.2rem;text-align:right}}#enp-quiz .enp-results-question__stats,#enp-quiz .enp-results-questions__key{font-weight:300}#enp-quiz .enp-results-question__content{padding:2rem 1.2rem 1.2rem;border-radius:3px}#enp-quiz .enp-results-question__deep-stats{display:flex;justify-content:space-around;list-style:none;margin-left:0;text-align:center}#enp-quiz .enp-results-question__deep-stat__number{font-size:1.8rem;line-height:1;position:relative}#enp-quiz .enp-results-question__deep-stat__number--correct,#enp-quiz .enp-results-question__deep-stat__number--finishes{color:#4e9497}#enp-quiz .enp-results-question__deep-stat__number--incorrect{color:#c1893e}#enp-quiz .enp-results-question__deep-stat__number--correct:after,#enp-quiz .enp-results-question__deep-stat__number--finishes:after,#enp-quiz .enp-results-question__deep-stat__number--incorrect:after{content:"%";font-size:.9rem;position:absolute;top:.3rem;right:-1rem}#enp-quiz .enp-results-question__deep-stat__label{font-size:1rem;text-transform:uppercase;font-size:.8rem}#enp-quiz .enp-results-question__options{list-style:none;margin-left:0;margin-bottom:0}#enp-quiz .enp-results-question__option{padding:.8rem .8rem .8rem .4rem;border-top:1px solid #ddd}@media (min-width:400px){#enp-quiz .enp-results-question__option{display:flex;justify-content:space-between;flex-direction:row}}#enp-quiz .enp-results-question__option:first-of-type{margin-top:1.4rem}#enp-quiz .enp-results-question__option--correct{background:#fff}#enp-quiz .enp-results-question__option__text{flex-grow:100;margin-right:1rem}#enp-quiz .enp-results-question__option__text__helper{font-weight:300;font-size:1rem;text-transform:uppercase;margin-right:.4rem}@media (min-width:400px){#enp-quiz .enp-results-question__option__icon{margin-right:.3rem;min-width:1.6rem}}#enp-quiz .enp-results-question__option__icon--incorrect{fill:#c1893e;opacity:.5}#enp-quiz .enp-results-question__option__icon--correct{fill:#4e9497;opacity:1}#enp-quiz .enp-results-question__option__percentage--incorrect{color:#c1893e}#enp-quiz .enp-results-question__option__percentage--correct{color:#4e9497}#enp-quiz .enp-results-question__option__number-selected{font-weight:300}#enp-quiz .enp-slider-responses__title{font-size:1rem;text-transform:uppercase;font-weight:400;margin-top:1.6rem}#enp-quiz .enp-slider-responses__line-chart .ct-point{stroke-width:8px}#enp-quiz .enp-slider-responses__line-chart--high,#enp-quiz .enp-slider-responses__line-chart--low{stroke:#bf5700}#enp-quiz .enp-slider-responses__line-chart--correct{stroke:#60aaad}#enp-quiz .enp-slider-responses-table{width:100%}#enp-quiz .enp-slider-responses-table tr.enp-slider-responses-table__response--correct td,#enp-quiz .enp-slider-responses-table tr:nth-child(2n) td{background-color:#fff}#enp-quiz .enp-slider-responses-table__content{box-shadow:none;padding-top:1rem}#enp-quiz .enp-slider-responses-table--hide-zero .enp-slider-responses-table__frequency--zero{display:none}#enp-quiz .enp-slider-responses-table__response-frequency{display:flex;justify-content:space-between;align-items:center}#enp-quiz .enp-slider-responses-table__toggle-zero-frequency{background:#fff;width:100%;box-shadow:inset 1px 1px 0 #ccc,inset -1px -1px 0 #ccc;color:#1d1c25;font-family:Arial,monospace,helvetica,arial,sans-serif;font-size:.9rem;font-weight:400;line-height:1.5;text-transform:none;letter-spacing:0;text-align:left;border:none;border-radius:3px;min-height:3.065rem;padding:1rem 2rem 1rem 1rem;margin:1.6rem 0 0;position:relative;z-index:9;cursor:pointer;transition:all .2s cubic-bezier(0,0,.3,1);width:auto;padding:0 .6rem;margin:0}.enp-quiz-results #enp-quiz .enp-aside{border:none}.enp-quiz-results .enp-results-questions__title__quiz-title{clip:rect(1px,1px,1px,1px);position:absolute!important;left:-10000px;top:auto;width:1px;height:1px;overflow:hidden}#enp-quiz .enp-results--ab{display:block;margin-bottom:3rem}@media (min-width:1000px){#enp-quiz .enp-results--ab{display:flex;flex-wrap:wrap;align-content:flex-end;width:50%;padding:10px}}@media (min-width:1000px){#enp-quiz .enp-results--a{padding-right:1rem;border-right:1px solid #ddd}}@media (min-width:1000px){#enp-quiz .enp-results--b{padding-left:1rem}}#enp-quiz .enp-results-title--ab,#enp-quiz .enp-results__container--ab .enp-results-flow__container{min-width:100%}#enp-quiz .enp-results--loser .enp-results-flow__item{border:2px solid #bf5700}#enp-quiz .enp-results--loser .enp-results-flow__item--quiz-starts{background:#ffc696}#enp-quiz .enp-results--loser .enp-results-flow__item--quiz-finishes{background:#ffb06d}#enp-quiz .enp-results--loser .enp-results-questions__title,#enp-quiz .enp-results--loser th{color:#964400}#enp-quiz .enp-results--winner .enp-results-questions__title,#enp-quiz .enp-results--winner th{color:#4e9497}#enp-quiz .enp-results-title--a,#enp-quiz .enp-results-title--b{background:transparent}#enp-quiz .enp-ab-scores{max-width:740px;margin:0 auto}#enp-quiz .enp-ab-scores:after{content:"";display:table;clear:both}@media (min-width:700px){#enp-quiz .enp-ab-scores{max-width:1000px}}@media (min-width:1000px){#enp-quiz .enp-ab-scores{max-width:1440px}}#enp-quiz .enp-ab-scores th.enp-quiz-scores-table__label,#enp-quiz .enp-ab-scores th.enp-quiz-scores-table__score{padding-left:0;padding-right:0}#enp-quiz .enp-ab-scores__title{padding-left:50px;font-size:1rem;text-transform:uppercase}#enp-quiz .enp-quiz-score__line-chart .enp-test-loser .ct-line,#enp-quiz .enp-quiz-score__line-chart .enp-test-loser .ct-point{stroke:#bf5700}#enp-quiz .enp-quiz-scores{margin-top:0}#enp-quiz .enp-ab-scores .enp-quiz-scores-table,#enp-quiz .enp-question-results{margin-bottom:1.6rem}@media (min-width:1000px){#enp-quiz .enp-ab-scores .enp-quiz-scores-table,#enp-quiz .enp-question-results{float:left;width:48%;margin:0}#enp-quiz .enp-ab-scores .enp-quiz-scores-table:first-of-type,#enp-quiz .enp-question-results:first-of-type{margin-right:4%}}#enp-quiz .enp-question-results__container{max-width:740px;margin:0 auto}#enp-quiz .enp-question-results__container:after{content:"";display:table;clear:both}@media (min-width:700px){#enp-quiz .enp-question-results__container{max-width:1000px}}@media (min-width:1000px){#enp-quiz .enp-question-results__container{max-width:1440px}}#enp-quiz .enp-question-results--ab .enp-results-questions__section{background:#fff;border:none;padding:1.6rem 0;margin:1.6rem auto}#enp-quiz .enp-question-results--ab .enp-results-questions__container{padding:0}#enp-quiz .enp-ab-new-embed-code__section{max-width:740px;margin:0 auto;max-width:540px;padding-bottom:2rem;margin-bottom:2rem}#enp-quiz .enp-ab-new-embed-code__section:after{content:"";display:table;clear:both}#enp-quiz .enp-ab-new-embed-code__section .enp-ab-embed-code{padding:0;margin:0}#enp-quiz .enp-ab-embed-code__section{background:#faf9fb;border-bottom:1px solid #ddd;border-top:1px solid #ddd;padding-top:3rem;padding-bottom:3rem;margin-top:3rem;margin-bottom:3rem;padding-top:5rem;margin-top:5rem}#enp-quiz .enp-ab-embed-code{max-width:740px;margin:0 auto}#enp-quiz .enp-ab-embed-code:after{content:"";display:table;clear:both}#enp-quiz .enp-ab-embed-code__title{font-size:1rem;text-transform:uppercase}#enp-quiz .enp-embed-code__textarea{margin-bottom:0}#enp-quiz .enp-embed-code__instructions{font-size:1.1rem}#enp-quiz .enp-slider{margin-bottom:1.6rem}#enp-quiz .enp-slider-input__container{display:flex;align-items:center;justify-content:center;margin:1.6rem auto;position:relative}#enp-quiz .enp-slider-input__label{display:block;color:#343242;font-weight:400;font-size:.85rem;text-transform:uppercase}#enp-quiz .enp-slider-input__prefix,#enp-quiz .enp-slider-input__suffix{font-size:1rem}#enp-quiz .enp-slider-input__prefix{margin-right:.2rem;white-space:pre}#enp-quiz .enp-slider-input__suffix{margin-left:.2rem;white-space:pre}#enp-quiz .enp-slider-input__input{font-size:1rem;font-family:Arial,monospace,helvetica,arial,sans-serif;padding:.8rem .5rem;background:#fff;border:1px solid #aaa;border-radius:3px;width:20rem;max-width:100%;margin-bottom:1.2rem;margin-bottom:0;padding:.75rem;width:auto;transition:all .25s cubic-bezier(0,0,.3,1)}@media (min-width:700px){#enp-quiz .enp-slider-input__input{padding:.8rem;width:100%}}#enp-quiz .enp-slider-input__input--incorrect{color:#bf5700}#enp-quiz .enp-slider-input__input--correct{color:#4e9497}#enp-quiz .enp-slider-input__input--invalid-animation{box-shadow:0 0 2px 1px #c1893e}#enp-quiz .enp-slider_input__range-helper{position:absolute;bottom:-1.2rem;font-size:.8rem}#enp-quiz .enp-slider_input__range-helper--low{left:0}#enp-quiz .enp-slider_input__range-helper--high{right:0}#enp-quiz .enp-slider-input__range-helper__number{position:relative;color:#e8e4ed}#enp-quiz .ui-slider-range-show-correct__tooltip-container{position:relative}#enp-quiz .ui-slider-range-show-correct__tooltip{position:absolute;top:-.4rem;margin-left:-.55rem;height:1rem;width:1.1rem;height:1.1rem;border:2px solid #60aaad;background-color:#fff;border-radius:50%;z-index:9999}#enp-quiz .ui-slider-range-show-correct__tooltip--low{left:0}#enp-quiz .ui-slider-range-show-correct__tooltip--high{right:-.55rem}#enp-quiz .ui-slider-range-show-correct__tooltip__text{position:relative;color:#417d7f;top:-1.35rem;font-size:.825rem;min-width:100%;display:inline-block;text-align:center;text-shadow:0 1px 0 #fff}#enp-quiz .enp-slider{position:relative;text-align:left;background:#ddd}#enp-quiz .enp-slider .ui-helper-hidden{display:none}#enp-quiz .enp-slider .ui-helper-hidden-accessible{border:0;clip:rect(0 0 0 0);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px}#enp-quiz .enp-slider .ui-helper-reset{margin:0;padding:0;border:0;outline:0;line-height:1.3;text-decoration:none;font-size:100%;list-style:none}#enp-quiz .enp-slider .ui-helper-clearfix:after,#enp-quiz .enp-slider .ui-helper-clearfix:before{content:"";display:table;border-collapse:collapse}#enp-quiz .enp-slider .ui-helper-clearfix:after{clear:both}#enp-quiz .enp-slider .ui-helper-clearfix{min-height:0}#enp-quiz .enp-slider .ui-helper-zfix{width:100%;height:100%;top:0;left:0;position:absolute;opacity:0;filter:alpha(opacity=0)}#enp-quiz .enp-slider .ui-front{z-index:100}#enp-quiz .enp-slider .ui-state-disabled{cursor:default!important}#enp-quiz .enp-slider .ui-icon{display:block;text-indent:-99999px;overflow:hidden;background-repeat:no-repeat}#enp-quiz .enp-slider .ui-widget-overlay{position:fixed;top:0;left:0;width:100%;height:100%}#enp-quiz .enp-slider .ui-slider-handle{background:#fff;border-radius:50%;border:1px solid #aaa;position:absolute;z-index:2;width:1.2rem;height:1.2rem;top:-.4rem;margin-left:-.6rem;cursor:default;touch-action:none;transition:opacity .2s cubic-bezier(0,0,.3,1),height .18s cubic-bezier(0,0,.3,1),width .18s cubic-bezier(0,0,.3,1),transform .18s cubic-bezier(0,0,.3,1)}#enp-quiz .enp-slider .ui-slider-handle:focus{outline:none;box-shadow:0 0 3px 1px #4d90fe}#enp-quiz .enp-slider .ui-slider-handle--correct,#enp-quiz .enp-slider .ui-slider-handle--incorrect{width:1.1rem;height:1.1rem;top:-.4rem;margin-left:-.55rem}#enp-quiz .enp-slider .ui-slider-handle--incorrect{z-index:1;border:2px solid #bf5700}#enp-quiz .enp-slider .ui-slider-handle--correct{border:2px solid #60aaad;z-index:99999}#enp-quiz .enp-slider .ui-slider-range{position:absolute;z-index:1;font-size:.7rem;display:block;border:0;background-position:0 0;top:0;height:100%}#enp-quiz .enp-slider .ui-slider-range-show-correct{background:#60aaad;z-index:9}#enp-quiz .enp-slider .ui-slider-range-min{left:0;background:#60aaad}#enp-quiz .enp-slider .ui-slider-range-max{right:0}#enp-quiz .enp-slider.ui-state-disabled .ui-slider-handle,#enp-quiz .enp-slider.ui-state-disabled .ui-slider-range{filter:inherit}#enp-quiz .ui-slider-horizontal{height:.3rem}#enp-quiz .enp-question__answered .enp-slider{background:#bbb}#enp-quiz .enp-question__answered .ui-slider-range-min{background:#fff} +html{font-size:16px!important}html #enp-quiz{box-sizing:border-box}body #enp-quiz{background:#fff;overflow:hidden}#enp-quiz *,#enp-quiz :after,#enp-quiz :before{box-sizing:inherit}#enp-quiz ol,#enp-quiz ul{margin:0 0 1.6rem 1.25rem;padding:0}#enp-quiz textarea{margin-bottom:1rem}#enp-quiz button,#enp-quiz button:active,#enp-quiz button:focus,#enp-quiz button:hover,#enp-quiz iframe,#enp-quiz input[type=button],#enp-quiz input[type=button]:active,#enp-quiz input[type=button]:focus,#enp-quiz input[type=button]:hover,#enp-quiz input[type=reset],#enp-quiz input[type=reset]:active,#enp-quiz input[type=reset]:focus,#enp-quiz input[type=reset]:hover,#enp-quiz input[type=submit],#enp-quiz input[type=submit]:active,#enp-quiz input[type=submit]:focus,#enp-quiz input[type=submit]:hover{border:none}#enp-quiz .enp-screen-reader-text{clip:rect(1px,1px,1px,1px);position:absolute!important;left:-10000px;top:auto;width:1px;height:1px;overflow:hidden}#enp-quiz .enp-screen-reader-text:active,#enp-quiz .enp-screen-reader-text:focus,#enp-quiz .enp-screen-reader-text:hover{background-color:#f1f1f1;border-radius:3px;box-shadow:0 0 2px 2px rgba(0,0,0,.6);clip:auto!important;color:#21759b;display:block;font-size:14px;font-weight:700;height:auto;left:5px;line-height:normal;padding:15px 23px 14px;text-decoration:none;top:5px;width:auto;z-index:100000}#enp-quiz .enp-accordion-header{background:#fff;width:100%;box-shadow:inset 1px 1px 0 #ccc,inset -1px -1px 0 #ccc;color:#1d1c25;font-family:Arial,monospace,helvetica,arial,sans-serif;font-size:.9rem;font-weight:400;line-height:1.5;text-transform:none;letter-spacing:0;text-align:left;border:none;border-radius:3px;min-height:3.065rem;padding:1rem 2rem 1rem 1rem;margin:1.6rem 0 0;position:relative;z-index:9;cursor:pointer;transition:all .2s cubic-bezier(0,0,.3,1)}#enp-quiz .enp-accordion-header:first-of-type{margin-top:0}#enp-quiz .enp-accordion-header .enp-accordion-header__icon{position:absolute;fill:#e8e4ed;right:.75rem;bottom:.75rem;transition:all .35s cubic-bezier(0,0,.3,1)}#enp-quiz .enp-accordion-header--open .enp-accordion-header__icon{transform:rotateX(180deg)}#enp-quiz .enp-quiz-settings__form .enp-accordion-header{position:relative;overflow-y:hidden}#enp-quiz .enp-accordion-content{background:#fff;width:100%;box-shadow:inset 1px -1px 0 #ccc,inset -1px -1px 0 #ccc;display:block;position:relative;height:auto;overflow:visible;margin-bottom:1.6rem}#enp-quiz .enp-accordion-content--closed{margin-top:0;padding-top:0;animation:d .25s cubic-bezier(0,0,.3,1) forwards;display:none}#enp-quiz .enp-accordion-content--open{padding-top:1.6rem;margin-bottom:2rem;animation:b .45s cubic-bezier(0,0,.3,1) forwards}#enp-quiz .enp-quiz-message{max-width:740px;margin:0 auto;background:#fff;border:1px solid #eee;border-bottom:1px solid #ccc;padding:1rem;margin-bottom:1.6rem;position:fixed;bottom:0;left:0}#enp-quiz .enp-quiz-message:after{content:"";display:table;clear:both}#enp-quiz .enp-quiz-message__title{font-size:1rem;text-transform:uppercase}#enp-quiz .enp-message__list{list-style:none;margin-left:0;font-size:1.1rem;margin-bottom:0}#enp-quiz .enp-quiz-message--error{border-left:6px solid #bf5700;color:#bf5700}#enp-quiz .enp-quiz-message__title--error{color:#964400}#enp-quiz .enp-quiz-message--success{border-left:6px solid #60aaad;color:#4e9497}#enp-quiz .enp-quiz-message__title--success{color:#4e9497}#enp-quiz .enp-quiz-message--note{border-left:6px solid #cca562}#enp-quiz .enp-quiz-message__title--note{color:#333f48}#enp-quiz .enp-quiz-message__close{border:none;background:none;box-shadow:none;padding:0;margin:0;position:absolute;top:5px;right:5px}#enp-quiz .enp-quiz-message--ajax{margin-bottom:.6rem;animation:a .3s}#enp-quiz .enp-quiz-message-ajax-container{z-index:9999;position:fixed;bottom:10px}#enp-quiz .enp-quiz-message--saving__spinner{margin-left:-10px}#enp-quiz .enp-quiz-message--saving__text{font-size:1rem}#enp-quiz input.limited-chars,#enp-quiz textarea.limited-chars{margin-bottom:.2rem}#enp-quiz .limited-chars__container{color:#fdfcfd;font-size:.8rem;display:block;text-align:right;margin-bottom:1.2rem}#enp-quiz .limited-chars__counter{color:#e8e4ed}#enp-quiz .limited-chars__container--error,#enp-quiz .limited-chars__container--error .limited-chars__counter{color:#964400}#enp-quiz input.has-error,#enp-quiz textarea.has-error{border:1px solid #bf5700}#enp-quiz input.has-error:focus,#enp-quiz textarea.has-error:focus{outline-color:#bf5700}#enp-quiz .enp-tooltip{position:relative}#enp-quiz .enp-tooltip__activator:focus+.enp-tooltip__description,#enp-quiz .enp-tooltip__activator:focus>.enp-tooltip__description{display:block}#enp-quiz .enp-tooltip__description{display:none;position:absolute;left:103%;margin-bottom:2rem;border-radius:3px;background:#faf9fb;font-size:.9rem;padding:.9rem;max-width:200px}.enp-sticky{position:relative;left:0;right:0;top:0;z-index:999}.enp-sticky.enp-sticky--fixed{position:fixed}.enp-breadcrumb-link{font-size:.85rem}.enp-breadcrumb-link__icon{position:relative;top:.45rem;left:.4rem}body #enp-quiz{color:#1d1c25;font-family:Arial,monospace,helvetica,arial,sans-serif;font-size:1em;line-height:1.6;font-weight:400}@media (min-width:700px){body #enp-quiz{font-size:1.3em}}#enp-quiz h1,#enp-quiz h2,#enp-quiz h3,#enp-quiz h4,#enp-quiz h5,#enp-quiz h6{font-family:Arial,monospace,helvetica,arial,sans-serif;color:#5d5e5f;clear:both;margin:0 0 .2rem;font-weight:700;line-height:1.2em}#enp-quiz h1{font-size:2em}#enp-quiz h2{font-size:1.75em}#enp-quiz h3{font-size:1.475em}#enp-quiz h4{font-size:1.3em}#enp-quiz h5{font-size:1.125em}#enp-quiz h6{font-size:1em}#enp-quiz p+h1,#enp-quiz p+h2,#enp-quiz p+h3,#enp-quiz p+h4,#enp-quiz p+h5,#enp-quiz p+h6,#enp-quiz ul+h1,#enp-quiz ul+h2,#enp-quiz ul+h3,#enp-quiz ul+h4,#enp-quiz ul+h5,#enp-quiz ul+h6{margin-top:1.8em}#enp-quiz p{font-size:.85em;margin-bottom:1.125em;font-weight:300}#enp-quiz ol,#enp-quiz ul{margin:0 0 1.6em 1.25em}#enp-quiz ul{list-style:disc}#enp-quiz ol{list-style:decimal}#enp-quiz li>ol,#enp-quiz li>ul{margin-bottom:0;margin-left:1.6em}#enp-quiz b,#enp-quiz strong{font-weight:700}#enp-quiz cite,#enp-quiz dfn,#enp-quiz em{font-family:georgia,times,serif;font-style:italic}#enp-quiz pre{background:#eee;font-family:Courier\ 10 Pitch,Courier,monospace;font-size:.95em;line-height:1.6;margin-bottom:1.6em;padding:1.6em;overflow:auto;max-width:100%}#enp-quiz .code,#enp-quiz code,#enp-quiz kbd,#enp-quiz tt,#enp-quiz var{font:.7em Monaco,Consolas,Andale Mono,DejaVu Sans Mono,monospace}#enp-quiz table{border:none}#enp-quiz table th{font-size:.8rem;text-transform:uppercase;border:none;border-bottom:1px solid #ddd}#enp-quiz table td,#enp-quiz table th{font-family:Arial,monospace,helvetica,arial,sans-serif}#enp-quiz table td{font-size:1rem;border:none;border-bottom:1px solid #eee}#enp-quiz table tr:nth-child(2n) td{background:#fdfcfd}#enp-quiz table tr:last-child td{border-bottom:none}#enp-quiz figure{margin:0}#enp-quiz img{height:auto;max-width:100%}#enp-quiz a{color:#bf5700;text-decoration:none;transition:color .2s;touch-action:manipulation}#enp-quiz a .enp-icon{fill:#bf5700}#enp-quiz a:active,#enp-quiz a:focus,#enp-quiz a:hover{color:#964400}#enp-quiz a:active .enp-icon,#enp-quiz a:focus .enp-icon,#enp-quiz a:hover .enp-icon{fill:#964400}#enp-quiz button:focus{outline-color:#4d90fe;outline-offset:-2px;outline-style:auto;outline-width:5px}#enp-quiz .enp-btn{text-align:center;border:none;border-radius:3px;padding:.85em 1.4em .75em;font-size:15px;font-weight:400;letter-spacing:.05em;color:#fff;box-shadow:inset 0 -2px 0 rgba(0,0,0,.2);background:#bf5700;cursor:pointer;text-transform:uppercase;transition:all .2s;line-height:1.6}#enp-quiz .enp-btn:focus,#enp-quiz .enp-btn:hover{color:#fff;box-shadow:none;background:#964400}#enp-quiz .enp-btn:active{color:#fff;box-shadow:inset 0 2px 0 rgba(0,0,0,.1);background:#1eeeff}#enp-quiz .enp-btn:focus{outline-color:#4d90fe;outline-offset:-2px;outline-style:auto;outline-width:5px}#enp-quiz .enp-btn:disabled,#enp-quiz .enp-btn:disabled:focus,#enp-quiz .enp-btn:disabled:hover{background:#bf5700;cursor:default;opacity:.5}#enp-quiz .enp-btn--add{text-align:center;border:none;border-radius:3px;padding:.85em 1.4em .75em;font-size:15px;font-weight:400;letter-spacing:.05em;color:#fff;box-shadow:inset 0 -2px 0 rgba(0,0,0,.2);background:#bf5700;cursor:pointer;text-transform:uppercase;transition:all .2s;line-height:1.6;border:1px dashed #b5a6c4;background:none;color:#545454;box-shadow:none;width:100%}#enp-quiz .enp-btn--add:focus,#enp-quiz .enp-btn--add:hover{color:#fff;box-shadow:none;background:#964400}#enp-quiz .enp-btn--add:active{color:#fff;box-shadow:inset 0 2px 0 rgba(0,0,0,.1);background:#1eeeff}#enp-quiz .enp-btn--add:focus{outline-color:#4d90fe;outline-offset:-2px;outline-style:auto;outline-width:5px}#enp-quiz .enp-btn--add:disabled,#enp-quiz .enp-btn--add:disabled:focus,#enp-quiz .enp-btn--add:disabled:hover{background:#bf5700;cursor:default;opacity:.5}#enp-quiz .enp-btn--add:focus,#enp-quiz .enp-btn--add:hover{border:1px dashed #69547e;color:#b5a6c4;background:hsla(0,0%,100%,.9)}#enp-quiz .enp-btn--disabled{opacity:.65;cursor:default}#enp-quiz .enp-btn--enabled{animation:f .6s}#enp-quiz .enp-icon{width:24px;height:24px;transition:all .2s}#enp-quiz .enp-page-title{font-size:1.6rem}@keyframes a{0%{opacity:0;transform:translate3d(0,100px,0)}to{opacity:1;transform:translateZ(0)}}@keyframes b{0%{opacity:0;height:auto;transform:translate3d(0,-20px,0)}to{opacity:1;height:auto;transform:translateZ(0)}}@keyframes c{0%{opacity:0;height:auto;transform:translate3d(0,-20px,0)}to{opacity:.8;height:auto;transform:translateZ(0)}}@keyframes d{0%{overflow:hidden;height:100px;opacity:1;transform:translateZ(0)}to{height:0;opacity:0;transform:translate3d(0,-20px,0)}}@keyframes e{0%{opacity:1;transform:translateZ(0)}to{padding:0;margin:0;opacity:0;height:0;z-index:-1;transform:translate3d(-200px,0,0)}}@keyframes f{0%{opacity:.8;transform:scaleX(1);box-shadow:0 0 0 rgba(0,0,0,.3)}40%{opacity:1}70%{opacity:1;transform:scale3d(1.1,1.1,1);box-shadow:0 0 8px rgba(0,0,0,.4)}to{opacity:1;transform:scaleX(1);box-shadow:0 0 0 rgba(0,0,0,.3),inset 0 2px 0 rgba(0,0,0,.2)}}@keyframes g{0%{opacity:0}to{opacity:1}}@keyframes h{0%{transform:translate3d(0,-200px,0)}to{transform:translateZ(0)}}.spinner{margin:0 auto;width:70px;text-align:center}.spinner>div{width:18px;height:18px;background-color:#333;border-radius:100%;display:inline-block;animation:i 1.4s infinite ease-in-out both}.spinner .bounce1{animation-delay:-.32s}.spinner .bounce2{animation-delay:-.16s}@keyframes i{0%,80%,to{transform:scale(0)}40%{transform:scale(1)}}#enp-quiz{transition:background .25s cubic-bezier(0,0,.3,1)}#enp-quiz .enp-aside{padding:1.6rem;margin-bottom:1.6rem;background:#94a6b3;border-radius:3px;border:1px solid #eee;border-bottom-color:#ccc;max-width:740px;margin:0 auto;font-size:1.2rem}@media (min-width:700px){#enp-quiz .enp-aside{margin-bottom:2.6rem;padding:1.6rem 2rem}}#enp-quiz .enp-aside:after{content:"";display:table;clear:both}#enp-quiz .enp-aside__title{font-size:1rem;text-transform:uppercase;font-weight:600}#enp-quiz .enp-page-title{border-bottom:2px solid #00a9b7}#enp-quiz fieldset{border:none;margin:0;padding:0}#enp-quiz .enp-label{display:block;color:#343242;font-weight:400;font-size:.85rem;text-transform:uppercase}#enp-quiz .enp-label__sm{font-size:small}#enp-quiz .enp-legend{display:block;color:#343242;font-weight:400;font-size:.85rem;text-transform:uppercase;padding-top:1.6rem;margin-bottom:.2rem;border:none;padding-top:0}#enp-quiz .enp-input{font-size:1rem;font-family:Arial,monospace,helvetica,arial,sans-serif;padding:.8rem .5rem;background:#fff;border:1px solid #aaa;border-radius:3px;width:20rem;max-width:100%;margin-bottom:1.2rem}@media (min-width:700px){#enp-quiz .enp-input{padding:.8rem;width:100%}}#enp-quiz .enp-input__sm{padding:5px;margin-bottom:5px}#enp-quiz .enp-input.enp-input--has-description{margin-bottom:.2rem}#enp-quiz .enp-input-description,#enp-quiz .enp-textarea-description{margin-bottom:1rem;font-size:.85rem}#enp-quiz .enp-input-description--before,#enp-quiz .enp-textarea-description--before{margin-bottom:0}#enp-quiz .enp-input::-webkit-input-placeholder,#enp-quiz .enp-textarea::-webkit-input-placeholder{font-family:Arial,monospace,helvetica,arial,sans-serif;font-weight:300;color:#7a7697}#enp-quiz .enp-input:-ms-input-placeholder,#enp-quiz .enp-input::-ms-input-placeholder,#enp-quiz .enp-textarea:-ms-input-placeholder,#enp-quiz .enp-textarea::-ms-input-placeholder{font-family:Arial,monospace,helvetica,arial,sans-serif;font-weight:300;color:#7a7697}#enp-quiz .enp-input::placeholder,#enp-quiz .enp-textarea::placeholder{font-family:Arial,monospace,helvetica,arial,sans-serif;font-weight:300;color:#7a7697}#enp-quiz .enp-textarea{font-size:1rem;font-family:Arial,monospace,helvetica,arial,sans-serif;padding:.8rem .5rem;background:#fff;border:1px solid #aaa;border-radius:3px;width:20rem;max-width:100%;margin-bottom:1.2rem;line-height:1.5}@media (min-width:700px){#enp-quiz .enp-textarea{padding:.8rem;width:100%}}#enp-quiz .enp-textarea:focus{outline-color:#4d90fe;outline-offset:-2px;outline-style:auto;outline-width:5px}#enp-quiz .enp-textarea.enp-textarea--has-description{margin-bottom:.2rem}#enp-quiz .enp-textarea.enp-textarea--has-description--before{margin-bottom:1.2rem}#enp-quiz .enp-embed-code{font-size:1rem;font-family:Arial,monospace,helvetica,arial,sans-serif;padding:.8rem .5rem;background:#fff;border:1px solid #aaa;border-radius:3px;width:20rem;max-width:100%;margin-bottom:1.2rem;line-height:1.5;padding:1.6rem;font-size:.7rem;font-family:Monaco,Consolas,Andale Mono,DejaVu Sans Mono,monospace}@media (min-width:700px){#enp-quiz .enp-embed-code{padding:.8rem;width:100%}}#enp-quiz .enp-embed-code:focus{outline-color:#4d90fe;outline-offset:-2px;outline-style:auto;outline-width:5px}#enp-quiz .enp-preview-page-container,#enp-quiz .enp-publish-page-container,#enp-quiz .enp-quiz-form-container{display:grid;grid-column:2/-1;gap:1rem;width:100%;justify-items:center}@media (min-width:700px){#enp-quiz .enp-preview-page-container,#enp-quiz .enp-publish-page-container,#enp-quiz .enp-quiz-form-container{justify-items:start}}#enp-quiz .enp-quiz-form{display:grid;padding-left:0;padding-right:0}@media (min-width:700px){#enp-quiz .enp-quiz-form{width:100%;max-width:40rem}}#enp-quiz .enp-preview-page-flex-container{display:grid;gap:1rem}@media (min-width:700px){#enp-quiz .enp-preview-page-flex-container{grid-template-columns:1fr 3fr}}#enp-quiz .enp-quiz-title__label{display:block;color:#343242;font-weight:400;font-size:.85rem;text-transform:uppercase;font-weight:500}#enp-quiz .enp-quiz-title__textarea{font-size:1rem;font-family:Arial,monospace,helvetica,arial,sans-serif;padding:.8rem .5rem;background:#fff;border:1px solid #aaa;border-radius:3px;width:20rem;max-width:100%;margin-bottom:1.2rem;font-weight:700;font-size:1.6rem;margin-bottom:1rem}@media (min-width:700px){#enp-quiz .enp-quiz-title__textarea{padding:.8rem;width:100%}}#enp-quiz .enp-quiz-title__textarea::-webkit-input-placeholder{font-weight:700}#enp-quiz .enp-quiz-title__textarea:-ms-input-placeholder,#enp-quiz .enp-quiz-title__textarea::-ms-input-placeholder{font-weight:700}#enp-quiz .enp-quiz-title__textarea::placeholder{font-weight:700}#enp-quiz textarea{color:#000}#enp-quiz .enp-accordion-container{margin-bottom:1.6rem;position:relative}#enp-quiz .enp-question-content{background:#fff;width:100%;padding-top:0;position:relative}#enp-quiz .enp-question-inner{padding:1.6rem 1.6rem 1rem}@media (min-width:700px){#enp-quiz .enp-question-inner{padding-right:2.8rem;padding-left:2.9rem}}#enp-quiz .enp-question-title__label{display:block;color:#343242;font-weight:400;font-size:.85rem;text-transform:uppercase;font-weight:500}#enp-quiz .enp-question-title__textarea{font-family:Arial,monospace,helvetica,arial,sans-serif;padding:.8rem .5rem;background:#fff;border:1px solid #aaa;border-radius:3px;width:20rem;max-width:100%;margin-bottom:1.2rem;padding:1rem 1.2rem;font-size:1rem}@media (min-width:700px){#enp-quiz .enp-question-title__textarea{padding:.8rem;width:100%}}#enp-quiz .enp-question-image-upload{text-align:center;border:none;border-radius:3px;padding:.85em 1.4em .75em;font-size:15px;font-weight:400;letter-spacing:.05em;color:#fff;box-shadow:inset 0 -2px 0 rgba(0,0,0,.2);background:#bf5700;cursor:pointer;line-height:1.6;border:1px dashed #b5a6c4;background:none;color:#545454;box-shadow:none;border:2px dashed #b5a6c4;color:#e8e4ed;transition:all .2s;background:#faf9fb;font-size:1rem;text-transform:uppercase;position:relative;margin-bottom:2rem;transform:translateZ(0);transition:all .3s cubic-bezier(0,0,.3,1)}#enp-quiz .enp-question-image-upload:focus,#enp-quiz .enp-question-image-upload:hover{color:#fff;box-shadow:none;background:#964400}#enp-quiz .enp-question-image-upload:active{color:#fff;box-shadow:inset 0 2px 0 rgba(0,0,0,.1);background:#1eeeff}#enp-quiz .enp-question-image-upload:focus{outline-color:#4d90fe;outline-offset:-2px;outline-style:auto;outline-width:5px}#enp-quiz .enp-question-image-upload:disabled,#enp-quiz .enp-question-image-upload:disabled:focus,#enp-quiz .enp-question-image-upload:disabled:hover{background:#bf5700;cursor:default;opacity:.5}#enp-quiz .enp-question-image-upload:focus,#enp-quiz .enp-question-image-upload:hover{border:1px dashed #69547e;background:hsla(0,0%,100%,.9);color:#b5a6c4;border:2px dashed #999}#enp-quiz .enp-question-image-upload .enp-question-image-upload__icon--photo{width:2.8rem;height:2.8rem;opacity:0;position:absolute;top:0;left:0;right:0;margin:0 auto;transform:translateZ(0);z-index:-1;transition:opacity .2s,transform .3s cubic-bezier(0,0,.3,1)}#enp-quiz .enp-question-image-upload .enp-question-image-upload__icon--add{width:1rem;height:1rem;border-radius:50%;fill:#fff;padding:.02rem;background:#e8e4ed;fill:#faf9fb;margin-right:5px;position:relative;top:.2rem}#enp-quiz .enp-question-image-upload:active,#enp-quiz .enp-question-image-upload:focus,#enp-quiz .enp-question-image-upload:hover{padding-top:5rem;padding-bottom:2rem}#enp-quiz .enp-question-image-upload:active .enp-question-image-upload__icon--photo,#enp-quiz .enp-question-image-upload:focus .enp-question-image-upload__icon--photo,#enp-quiz .enp-question-image-upload:hover .enp-question-image-upload__icon--photo{opacity:1;z-index:1;transform:translate3d(0,1.75rem,0)}#enp-quiz .enp-question-image-upload:active .enp-question-image-upload__icon--add,#enp-quiz .enp-question-image-upload:focus .enp-question-image-upload__icon--add,#enp-quiz .enp-question-image-upload:hover .enp-question-image-upload__icon--add{fill:#fff;background:#b5a6c4}#enp-quiz .enp-question-image__container{position:relative;margin-bottom:1rem}#enp-quiz .enp-question-image{margin-bottom:1.2rem}#enp-quiz .enp-question-type__legend{display:block;color:#343242;font-weight:400;font-size:.85rem;text-transform:uppercase;padding-top:1.6rem;margin-bottom:.2rem;border:none}#enp-quiz .enp-question-type__input{clip:rect(1px,1px,1px,1px);position:absolute!important;left:-10000px;top:auto;width:1px;height:1px;overflow:hidden}#enp-quiz .enp-question-type__label{text-transform:capitalize;display:inline-block;padding:.2rem .5rem;border-radius:3px;cursor:pointer}#enp-quiz .enp-question-type__input:checked+.enp-question-type__label{background:#00a9b7;color:#fff;text-shadow:0 0 1px rgba(0,0,0,.7)}#enp-quiz .enp-question-type__input:focus+.enp-question-type__label{z-index:8;outline-color:#4d90fe;outline-offset:-2px;outline-style:auto;outline-width:5px}#enp-quiz .enp-question-type__label{position:relative;z-index:9}#enp-quiz .enp-mc-options,#enp-quiz .enp-slider-options{margin-top:0;display:none;animation:d .25s cubic-bezier(0,0,.3,1) forwards;animation-delay:0s,.05s}#enp-quiz .enp-question-type__input--mc:checked~.enp-mc-options,#enp-quiz .enp-question-type__input--slider:checked~.enp-slider-options{visibility:visible;display:block;animation:g .45s cubic-bezier(0,0,.3,1) forwards}#enp-quiz .enp-mc-options__list{list-style:none;margin-left:0}#enp-quiz .enp-mc-option{position:relative;padding-left:6px}@media (min-width:700px){#enp-quiz .enp-mc-option{padding-left:0}}#enp-quiz .enp-mc-options__legend{display:block;color:#343242;font-weight:400;font-size:.85rem;text-transform:uppercase;font-weight:500}#enp-quiz .enp-mc-option__add,#enp-quiz .enp-mc-option__button--correct,#enp-quiz .enp-mc-option__button--delete{display:none}#enp-quiz .enp-question-type__input--mc:checked~.enp-mc-options .enp-mc-option__add,#enp-quiz .enp-question-type__input--mc:checked~.enp-mc-options .enp-mc-option__button--correct,#enp-quiz .enp-question-type__input--mc:checked~.enp-mc-options .enp-mc-option__button--delete{display:block}#enp-quiz .enp-button__question-image-delete,#enp-quiz .enp-mc-option__button--delete{border:none;background:none;box-shadow:none;padding:0;margin:0;position:absolute;top:9px;right:-24px;fill:#bbb;cursor:pointer}@media (min-width:700px){#enp-quiz .enp-button__question-image-delete,#enp-quiz .enp-mc-option__button--delete{right:-30px}}#enp-quiz .enp-button__question-image-delete:focus,#enp-quiz .enp-button__question-image-delete:hover,#enp-quiz .enp-mc-option__button--delete:focus,#enp-quiz .enp-mc-option__button--delete:hover{fill:#bf5700}#enp-quiz .enp-mc-option__button--correct{border:none;background:none;box-shadow:none;padding:0;margin:0;position:absolute;top:8px;left:-24px}@media (min-width:700px){#enp-quiz .enp-mc-option__button--correct{left:-35px}}#enp-quiz .enp-mc-option__button--correct .enp-mc-option__icon--correct{border-radius:50%;padding:.05em;width:28px;height:28px;fill:#fff;background:#fff;cursor:pointer;border:2px solid #c1893e;transition:all .2s}@media (min-width:700px){#enp-quiz .enp-mc-option__button--correct .enp-mc-option__icon--correct{padding:.15em}}#enp-quiz .enp-mc-option__button--correct:focus .enp-mc-option__icon--correct,#enp-quiz .enp-mc-option__button--correct:hover .enp-mc-option__icon--correct{background:#fff;border-color:#60aaad;fill:#60aaad}#enp-quiz .enp-mc-option__button--correct:disabled{opacity:1}#enp-quiz .enp-mc-option__button--correct:disabled .enp-mc-option__icon--correct{cursor:default;fill:#fff;border:2px solid transparent}#enp-quiz .enp-mc-option--correct .enp-mc-option__input{box-shadow:inset 0 0 3px #00a9b7;border:1px solid #00a9b7}#enp-quiz .enp-mc-option--correct .enp-mc-option__button--correct:focus .enp-mc-option__icon--correct,#enp-quiz .enp-mc-option--correct .enp-mc-option__button--correct:hover .enp-mc-option__icon--correct,#enp-quiz .enp-mc-option--correct .enp-mc-option__icon--correct{fill:#fff;border-color:#00a9b7;background:#00a9b7}#enp-quiz .enp-mc-option__add{text-align:center;border:none;border-radius:3px;padding:.85em 1.4em .75em;font-size:15px;font-weight:400;letter-spacing:.05em;color:#fff;box-shadow:inset 0 -2px 0 rgba(0,0,0,.2);background:#bf5700;cursor:pointer;line-height:1.6;border:1px dashed #b5a6c4;background:none;color:#545454;box-shadow:none;border:2px dashed #b5a6c4;color:#e8e4ed;transition:all .2s;background:#faf9fb;font-size:1rem;text-transform:uppercase;text-align:left;padding:.7rem .75rem .8rem}#enp-quiz .enp-mc-option__add:focus,#enp-quiz .enp-mc-option__add:hover{color:#fff;box-shadow:none;background:#964400}#enp-quiz .enp-mc-option__add:active{color:#fff;box-shadow:inset 0 2px 0 rgba(0,0,0,.1);background:#1eeeff}#enp-quiz .enp-mc-option__add:focus{outline-color:#4d90fe;outline-offset:-2px;outline-style:auto;outline-width:5px}#enp-quiz .enp-mc-option__add:disabled,#enp-quiz .enp-mc-option__add:disabled:focus,#enp-quiz .enp-mc-option__add:disabled:hover{background:#bf5700;cursor:default;opacity:.5}#enp-quiz .enp-mc-option__add:focus,#enp-quiz .enp-mc-option__add:hover{border:1px dashed #69547e;background:hsla(0,0%,100%,.9);color:#b5a6c4;border:2px dashed #999}#enp-quiz .enp-mc-option__add .enp-mc-option__add__icon{width:1rem;height:1rem;border-radius:50%;fill:#fff;padding:.02rem;margin-right:5px;background:#e8e4ed;fill:#faf9fb;position:relative;top:.2rem}#enp-quiz .enp-mc-option__add:hover .enp-mc-option__add__icon{fill:#fff;background:#b5a6c4}#enp-quiz .enp-slider-options .enp-input{max-width:11.8rem}#enp-quiz .enp-slider-correct__container .enp-input,#enp-quiz .enp-slider-range__container .enp-input{max-width:8.8rem}@media (min-width:400px){#enp-quiz .enp-slider-correct__container .enp-input,#enp-quiz .enp-slider-range__container .enp-input{max-width:11.8rem}}#enp-quiz .enp-slider-preview{border:1px solid #ddd;margin-top:.2rem;margin-bottom:1.6rem;padding:1.6rem 1.6rem .6rem;position:relative}#enp-quiz .enp-slider-preview .enp-label--slider-preview{position:absolute;width:100%;top:.2rem;left:.4rem;font-size:.75rem;text-transform:uppercase}#enp-quiz .enp-slider-correct__container,#enp-quiz .enp-slider-range__container{display:flex;justify-content:space-between;align-items:center}#enp-quiz .enp-slider-correct__helper,#enp-quiz .enp-slider-range__helper{color:#777;font-size:.85rem;background:#fff;padding:0 .3rem;position:relative}#enp-quiz .enp-slider-correct__helper:before,#enp-quiz .enp-slider-range__helper:before{content:"";position:absolute;top:44%;height:4px;background:#ddd;width:120px;left:-60px;z-index:-1;transition:width .7s cubic-bezier(0,0,.3,1),background 1.6s cubic-bezier(0,0,.3,1)}#enp-quiz .enp-slider-options{margin-bottom:2rem}#enp-quiz .enp-slider-options .enp-accordion-header{text-transform:uppercase;font-size:.85rem;padding:.675rem}#enp-quiz .enp-slider-options .enp-slider-advanced-options__content{border:none;box-shadow:none;padding-top:1rem;padding-bottom:0;margin-bottom:0}#enp-quiz .enp-slider-correct-high__container{position:relative}#enp-quiz .enp-slider-correct-high__input-container--hidden{display:none}#enp-quiz .enp-slider-correct__helper--hidden:before{width:0;background:#60aaad}#enp-quiz .enp-slider-correct-answer-range--add-range{text-align:center;border:none;border-radius:3px;padding:.85em 1.4em .75em;font-size:15px;font-weight:400;letter-spacing:.05em;color:#fff;box-shadow:inset 0 -2px 0 rgba(0,0,0,.2);background:#bf5700;cursor:pointer;text-transform:uppercase;line-height:1.6;border:1px dashed #b5a6c4;background:none;color:#545454;box-shadow:none;border:2px dashed #b5a6c4;color:#e8e4ed;transition:all .2s;background:#faf9fb;margin-left:.8rem;font-size:.7rem}#enp-quiz .enp-slider-correct-answer-range--add-range:focus,#enp-quiz .enp-slider-correct-answer-range--add-range:hover{color:#fff;box-shadow:none;background:#964400}#enp-quiz .enp-slider-correct-answer-range--add-range:active{color:#fff;box-shadow:inset 0 2px 0 rgba(0,0,0,.1);background:#1eeeff}#enp-quiz .enp-slider-correct-answer-range--add-range:focus{outline-color:#4d90fe;outline-offset:-2px;outline-style:auto;outline-width:5px}#enp-quiz .enp-slider-correct-answer-range--add-range:disabled,#enp-quiz .enp-slider-correct-answer-range--add-range:disabled:focus,#enp-quiz .enp-slider-correct-answer-range--add-range:disabled:hover{background:#bf5700;cursor:default;opacity:.5}#enp-quiz .enp-slider-correct-answer-range--add-range:focus,#enp-quiz .enp-slider-correct-answer-range--add-range:hover{border:1px dashed #69547e;background:hsla(0,0%,100%,.9);color:#b5a6c4;border:2px dashed #999}@media (min-width:400px){#enp-quiz .enp-slider-correct-answer-range--add-range{font-size:.8rem;padding:.7rem}}@media (min-width:700px){#enp-quiz .enp-slider-correct-answer-range--add-range{padding:.7rem 1.2rem;min-width:11.4rem}}#enp-quiz .enp-slider-correct-answer-range--add-range .enp-slider-correct-answer-range__icon{width:1rem;height:1rem;border-radius:50%;fill:#fff;padding:.02rem;margin-right:5px;background:#e8e4ed;fill:#faf9fb;position:relative;left:-.2rem}#enp-quiz .enp-slider-correct-answer-range--add-range:hover .enp-slider-correct-answer-range__icon{fill:#fff;background:#b5a6c4}#enp-quiz .enp-slider-correct-answer-range--remove-range{position:absolute;right:-1.6rem;bottom:1.6rem;background:none;border:none;box-shadow:none;padding:0 .1rem}#enp-quiz .enp-slider-correct-answer-range--remove-range .enp-slider-correct-answer-range__icon{width:1.2em;height:1.2em;fill:#e8e4ed}#enp-quiz .enp-slider-correct-answer-range--remove-range:focus .enp-slider-correct-answer-range__icon,#enp-quiz .enp-slider-correct-answer-range--remove-range:hover .enp-slider-correct-answer-range__icon{fill:#bf5700}@media (min-width:700px){#enp-quiz .enp-slider-correct-answer-range--remove-range{top:-.2rem;right:-.2rem;bottom:auto}}#enp-quiz .enp-slider-options .enp-input:-moz-read-only{background:#faf9fb}#enp-quiz .enp-slider-options .enp-input:read-only{background:#faf9fb}#enp-quiz .enp-answer-explanation{background:#faf9fb;padding-top:2rem;box-shadow:inset 1px 0 0 #ccc,inset -1px -1px 0 #ccc,inset 0 1px 0 #ddd}#enp-quiz .enp-answer-explanation__label{display:block;color:#343242;font-weight:400;font-size:.85rem;text-transform:uppercase;font-weight:500}#enp-quiz .enp-question__button--delete{border:none;background:none;box-shadow:none;padding:0;margin:0;position:absolute;top:9px;right:9px;fill:#bbb;cursor:pointer}@media (min-width:700px){#enp-quiz .enp-question__button--delete{right:-30px}}#enp-quiz .enp-question__button--delete:hover{fill:#bf5700}#enp-quiz .enp-question__move{position:absolute;left:15px}@media (min-width:700px){#enp-quiz .enp-question__move{left:-40px}}#enp-quiz .enp-sort__placeholder{background:#ddd;height:60px;width:100%;max-height:120px;margin-bottom:1.6rem}#enp-quiz .ui-sortable .ui-sortable-helper .ui-sortable-handle{cursor:move;cursor:grabbing;cursor:-webkit-grabbing}#enp-quiz .enp-question__button--move{border:none;background:none;box-shadow:none;padding:0;margin:0;position:absolute;fill:#bbb;cursor:pointer}#enp-quiz .enp-question__button--move:focus,#enp-quiz .enp-question__button--move:hover{fill:#333}#enp-quiz .enp-question__button--move:disabled{opacity:.5}#enp-quiz .enp-question__button--move--up{top:0;left:-9px}#enp-quiz .enp-question__button--move--down{top:3px;right:-9px}#enp-quiz .enp-quiz-form__add-question{padding:.75em .8em .7em 1.4em;text-align:center;border:none;border-radius:3px;padding:.85em 1.4em .75em;font-size:15px;font-weight:400;letter-spacing:.05em;color:#fff;box-shadow:inset 0 -2px 0 rgba(0,0,0,.2);background:#bf5700;cursor:pointer;text-transform:uppercase;transition:all .2s;line-height:1.6;border:1px dashed #b5a6c4;background:none;color:#545454;box-shadow:none;padding-top:1rem;padding-bottom:1rem;margin-top:1.6rem;margin-bottom:2rem}#enp-quiz .enp-quiz-form__add-question:focus,#enp-quiz .enp-quiz-form__add-question:hover{color:#fff;box-shadow:none;background:#964400}#enp-quiz .enp-quiz-form__add-question:active{color:#fff;box-shadow:inset 0 2px 0 rgba(0,0,0,.1);background:#1eeeff}#enp-quiz .enp-quiz-form__add-question:focus{outline-color:#4d90fe;outline-offset:-2px;outline-style:auto;outline-width:5px}#enp-quiz .enp-quiz-form__add-question:disabled,#enp-quiz .enp-quiz-form__add-question:disabled:focus,#enp-quiz .enp-quiz-form__add-question:disabled:hover{background:#bf5700;cursor:default;opacity:.5}#enp-quiz .enp-quiz-form__add-question:focus,#enp-quiz .enp-quiz-form__add-question:hover{border:1px dashed #69547e;color:#b5a6c4;background:hsla(0,0%,100%,.9)}#enp-quiz .enp-quiz-form__add-question .enp-add-question__icon{width:1rem;height:1rem;border-radius:50%;fill:#fff;padding:.02rem;margin-right:5px;width:1.2rem;height:1.2rem;background:#e8e4ed;fill:#faf9fb;position:relative;top:.2rem}#enp-quiz .enp-quiz-form__add-question:hover .enp-add-question__icon{fill:#fff;background:#b5a6c4}#enp-quiz .enp-btn--save__btns{display:flex;align-items:center;align-items:flex-start}#enp-quiz .enp-quiz-form__save{text-align:center;border:none;border-radius:3px;padding:.85em 1.4em .75em;font-size:15px;font-weight:400;letter-spacing:.05em;color:#fff;box-shadow:inset 0 -2px 0 rgba(0,0,0,.2);background:#bf5700;cursor:pointer;text-transform:uppercase;transition:all .2s;line-height:1.6;width:100%;margin-bottom:1rem;opacity:.8;text-shadow:0 -1px 2px rgba(0,0,0,.6)}#enp-quiz .enp-quiz-form__save:focus,#enp-quiz .enp-quiz-form__save:hover{color:#fff;box-shadow:none;background:#964400}#enp-quiz .enp-quiz-form__save:active{color:#fff;box-shadow:inset 0 2px 0 rgba(0,0,0,.1);background:#1eeeff}#enp-quiz .enp-quiz-form__save:focus{outline-color:#4d90fe;outline-offset:-2px;outline-style:auto;outline-width:5px}#enp-quiz .enp-quiz-form__save:disabled,#enp-quiz .enp-quiz-form__save:disabled:focus,#enp-quiz .enp-quiz-form__save:disabled:hover{background:#bf5700;cursor:default;opacity:.5}#enp-quiz .enp-quiz-form__save:focus,#enp-quiz .enp-quiz-form__save:hover{opacity:1}@media (min-width:400px){#enp-quiz .enp-quiz-form__save{padding:1.2rem 1.8rem 1.1rem;width:27%;margin-right:3%;position:relative}}#enp-quiz .enp-quiz-form__save--reveal{animation:c .3s cubic-bezier(0,0,.3,1)}#enp-quiz .enp-btn--next-step{text-align:center;border:none;border-radius:3px;padding:.85em 1.4em .75em;font-size:15px;font-weight:400;letter-spacing:.05em;color:#fff;box-shadow:inset 0 -2px 0 rgba(0,0,0,.2);background:#bf5700;cursor:pointer;text-transform:uppercase;transition:all .2s;line-height:1.6;padding:.65em 1.2em .85em 1.4em}#enp-quiz .enp-btn--next-step:focus,#enp-quiz .enp-btn--next-step:hover{color:#fff;box-shadow:none;background:#964400}#enp-quiz .enp-btn--next-step:active{color:#fff;box-shadow:inset 0 2px 0 rgba(0,0,0,.1);background:#1eeeff}#enp-quiz .enp-btn--next-step:focus{outline-color:#4d90fe;outline-offset:-2px;outline-style:auto;outline-width:5px}#enp-quiz .enp-btn--next-step:disabled,#enp-quiz .enp-btn--next-step:disabled:focus,#enp-quiz .enp-btn--next-step:disabled:hover{background:#bf5700;cursor:default;opacity:.5}#enp-quiz .enp-btn--next-step__icon{border-radius:50%;fill:#fff;background:#fff;fill:#bf5700;width:1.2rem;height:1.2rem;margin-left:.5em;position:relative;top:.15rem}#enp-quiz .enp-btn--next-step__icon:hover{background:#fff;fill:#964400}#enp-quiz .enp-btn--next-step{width:100%;padding:1rem 1.4rem}@media (min-width:700px){#enp-quiz .enp-btn--next-step{padding:1.2rem 1.8rem 1.1rem}}#enp-quiz .enp-btn--next-step .enp-btn--next-step__icon{width:1rem;height:1rem}#enp-quiz .enp-btn--next-step--reveal{animation:b .3s cubic-bezier(0,0,.3,1)}#enp-quiz .enp-accordion-header--inserting,#enp-quiz .enp-mc-option--inputs{animation:a .4s cubic-bezier(0,0,.3,1) forwards}#enp-quiz .enp-mc-option--remove,#enp-quiz .enp-question--remove,#enp-quiz .enp-question__image--remove{animation:e .5s cubic-bezier(0,0,.3,1) forwards}#enp-quiz .enp-image-upload-wait{text-align:center;border:none;border-radius:3px;padding:.85em 1.4em .75em;font-size:15px;font-weight:400;letter-spacing:.05em;color:#fff;box-shadow:inset 0 -2px 0 rgba(0,0,0,.2);background:#bf5700;cursor:pointer;text-transform:uppercase;line-height:1.6;border:1px dashed #b5a6c4;background:none;color:#545454;box-shadow:none;border:2px dashed #b5a6c4;color:#e8e4ed;transition:all .2s;background:#faf9fb;padding-top:4rem;padding-bottom:4rem;margin-bottom:1rem;width:100%}#enp-quiz .enp-image-upload-wait:focus,#enp-quiz .enp-image-upload-wait:hover{color:#fff;box-shadow:none;background:#964400}#enp-quiz .enp-image-upload-wait:active{color:#fff;box-shadow:inset 0 2px 0 rgba(0,0,0,.1);background:#1eeeff}#enp-quiz .enp-image-upload-wait:focus{outline-color:#4d90fe;outline-offset:-2px;outline-style:auto;outline-width:5px}#enp-quiz .enp-image-upload-wait:disabled,#enp-quiz .enp-image-upload-wait:disabled:focus,#enp-quiz .enp-image-upload-wait:disabled:hover{background:#bf5700;cursor:default;opacity:.5}#enp-quiz .enp-image-upload-wait:focus,#enp-quiz .enp-image-upload-wait:hover{border:1px dashed #69547e;background:hsla(0,0%,100%,.9);color:#b5a6c4;border:2px dashed #999}#enp-quiz .enp-accordion-header.question-has-error{color:#bf5700;box-shadow:0 0 3px #bf5700}.enp-quiz.ui-sortable--sorting #enp-quiz .enp-accordion-content{display:none}#enp-quiz .enp-quiz-settings__title,#enp-quiz .enp-quiz-share__legend{position:relative;font-size:1rem;text-transform:uppercase;font-weight:600;padding-top:0}@media (min-width:700px){#enp-quiz .enp-quiz-settings__title,#enp-quiz .enp-quiz-share__legend{padding:1em 0}}#enp-quiz .enp-quiz-settings__form{margin-bottom:3rem;overflow:visible}@media (min-width:1000px){#enp-quiz .enp-quiz-settings__form{padding:0;margin-bottom:0}}@media (min-width:700px){#enp-quiz .enp-fieldset{position:relative}}#enp-quiz .enp-title-display__legend{padding-top:0}@media (min-width:700px){#enp-quiz .enp-title-display__legend{padding-top:.4rem}}#enp-quiz .enp-quiz-share__input,#enp-quiz .enp-quiz-styles__input{width:100%}#enp-quiz .enp-quiz-styles__textarea--custom-css{font-family:Monaco,Consolas,Andale Mono,DejaVu Sans Mono,monospace;font-size:.9rem;min-height:200px}#enp-quiz .enp-fieldset--section{padding:1.6rem 1rem}#enp-quiz .enp-fieldset--section.enp-accordion-content--open{margin-bottom:0}#enp-quiz .enp-quiz-share--facebook{margin-bottom:2rem}#enp-quiz .enp-title-display__legend{display:block;color:#343242;font-weight:400;font-size:.85rem;text-transform:uppercase;padding-top:1.6rem;margin-bottom:.2rem;border:none}#enp-quiz .enp-title-display__input{clip:rect(1px,1px,1px,1px);position:absolute!important;left:-10000px;top:auto;width:1px;height:1px;overflow:hidden}#enp-quiz .enp-title-display__label{text-transform:capitalize;display:inline-block;padding:.2rem .5rem;border-radius:3px;cursor:pointer}#enp-quiz .enp-title-display__input:checked+.enp-title-display__label{background:#00a9b7;color:#fff;text-shadow:0 0 1px rgba(0,0,0,.7)}#enp-quiz .enp-title-display__input:focus+.enp-title-display__label{z-index:8;outline-color:#4d90fe;outline-offset:-2px;outline-style:auto;outline-width:5px}#enp-quiz .enp-mc-options-order__legend{display:block;color:#343242;font-weight:400;font-size:.85rem;text-transform:uppercase;padding-top:1.6rem;margin-bottom:.2rem;border:none}#enp-quiz .enp-mc-options-order__input{clip:rect(1px,1px,1px,1px);position:absolute!important;left:-10000px;top:auto;width:1px;height:1px;overflow:hidden}#enp-quiz .enp-mc-options-order__label{text-transform:capitalize;display:inline-block;padding:.2rem .5rem;border-radius:3px;cursor:pointer}#enp-quiz .enp-mc-options-order__input:checked+.enp-mc-options-order__label{background:#00a9b7;color:#fff;text-shadow:0 0 1px rgba(0,0,0,.7)}#enp-quiz .enp-mc-options-order__input:focus+.enp-mc-options-order__label{z-index:8;outline-color:#4d90fe;outline-offset:-2px;outline-style:auto;outline-width:5px}#enp-quiz .enp-mc-options-order{margin-bottom:1.6rem}#enp-quiz .enp-quiz-share__textarea{min-height:7.6rem;margin-bottom:2rem}@media (min-width:700px){#enp-quiz .enp-quiz-share__textarea{min-height:4.6rem}}@media (min-width:1000px){#enp-quiz .enp-quiz-share__textarea{min-height:7.6rem}}#enp-quiz .enp-preview-form__submit{margin-top:1.6rem;margin-bottom:1.6rem}#enp-quiz .enp-quiz-preview__title{font-size:1rem;text-transform:uppercase;font-weight:600}@media (min-width:700px){#enp-quiz .enp-quiz-preview__title{padding:1em 0}}#enp-quiz .enp-preview-form__submit{text-align:center;border:none;border-radius:3px;padding:.85em 1.4em .75em;font-size:15px;font-weight:400;letter-spacing:.05em;color:#fff;box-shadow:inset 0 -2px 0 rgba(0,0,0,.2);background:#bf5700;cursor:pointer;text-transform:uppercase;transition:all .2s;line-height:1.6;width:100%;padding-top:.85rem;padding-bottom:.85rem;margin-bottom:1rem;opacity:.8;text-shadow:0 -1px 2px rgba(0,0,0,.6)}#enp-quiz .enp-preview-form__submit:focus,#enp-quiz .enp-preview-form__submit:hover{color:#fff;box-shadow:none;background:#964400}#enp-quiz .enp-preview-form__submit:active{color:#fff;box-shadow:inset 0 2px 0 rgba(0,0,0,.1);background:#1eeeff}#enp-quiz .enp-preview-form__submit:focus{outline-color:#4d90fe;outline-offset:-2px;outline-style:auto;outline-width:5px}#enp-quiz .enp-preview-form__submit:disabled,#enp-quiz .enp-preview-form__submit:disabled:focus,#enp-quiz .enp-preview-form__submit:disabled:hover{background:#bf5700;cursor:default;opacity:.5}#enp-quiz .enp-preview-form__submit:focus,#enp-quiz .enp-preview-form__submit:hover{opacity:1}#enp-quiz .enp-preview-form__submit--publish{width:100%;position:relative;z-index:99999999;padding:1.05rem 1.8rem .95rem}#enp-quiz .enp-quiz-styles__iris-wrapper{position:relative}#enp-quiz .iris-picker{box-sizing:content-box;position:relative;z-index:9999999999;top:-1.2rem;margin-bottom:1rem;padding-bottom:3rem;padding-right:30px}@media (min-width:1000px){#enp-quiz .iris-picker{position:absolute;top:-4px;left:0}}#enp-quiz .iris-picker:last-of-type{margin-bottom:0}#enp-quiz .iris-picker .ui-draggable-handle:focus .ui-slider-handle,#enp-quiz .iris-picker .ui-slider-handle:focus{box-shadow:0 0 3px rgba(0,0,0,.75)}#enp-quiz .enp-quiz-styles__set-default{text-align:center;border:none;border-radius:3px;padding:.85em 1.4em .75em;font-size:15px;font-weight:400;letter-spacing:.05em;color:#fff;box-shadow:inset 0 -2px 0 rgba(0,0,0,.2);background:#bf5700;cursor:pointer;text-transform:uppercase;transition:all .2s;line-height:1.6;border:2px solid #bf5700;background:transparent;color:#bf5700;box-shadow:none;font-size:.75rem;position:absolute;left:10px;bottom:10px}#enp-quiz .enp-quiz-styles__set-default:focus,#enp-quiz .enp-quiz-styles__set-default:hover{color:#fff;box-shadow:none;background:#964400}#enp-quiz .enp-quiz-styles__set-default:active{color:#fff;box-shadow:inset 0 2px 0 rgba(0,0,0,.1);background:#1eeeff}#enp-quiz .enp-quiz-styles__set-default:focus{outline-color:#4d90fe;outline-offset:-2px;outline-style:auto;outline-width:5px}#enp-quiz .enp-quiz-styles__set-default:disabled,#enp-quiz .enp-quiz-styles__set-default:disabled:focus,#enp-quiz .enp-quiz-styles__set-default:disabled:hover{background:#bf5700;cursor:default;opacity:.5}#enp-quiz .enp-quiz-styles__set-default:focus,#enp-quiz .enp-quiz-styles__set-default:hover{background:transparent;border:2px solid #964400;color:#964400}#enp-quiz .enp-iris__close{border:none;background:none;box-shadow:none;padding:0;margin:0;position:absolute;top:5px;right:5px;fill:#888;cursor:pointer}#enp-quiz .enp-quiz-styles__input--color{padding-left:45px}#enp-quiz .enp-quiz-styles__color-demo{width:30px;height:30px;border:1px solid #ccc;top:8px;left:8px;border-radius:3px;position:absolute}#enp-quiz .enp-share-quiz__url{display:block;font-size:1.5rem;line-height:1.4;word-wrap:break-word}#enp-quiz .enp-share-quiz{list-style:none;margin-left:0;display:flex;justify-content:center;align-content:center;align-items:center}#enp-quiz .enp-share-quiz__item{margin-right:20px}#enp-quiz .enp-share-quiz__item:last-child{margin-right:0}#enp-quiz .enp-share-quiz__item__icon{width:2.4rem;height:2.4rem;border-radius:50%;fill:#fff;padding:.6rem;fill:#fff!important}#enp-quiz .enp-share-quiz__item__icon--facebook{background-color:#3a5795}#enp-quiz .enp-share-quiz__item__icon--twitter{background-color:#4099ff}#enp-quiz .enp-share-quiz{justify-content:space-around;margin-bottom:0}#enp-quiz .enp-ab-create__container{max-width:740px;margin:0 auto;width:100%;background:#fdfcfd;padding-top:3rem;padding-bottom:3rem}#enp-quiz .enp-ab-create__container:after{content:"";display:table;clear:both}@media (min-width:700px){#enp-quiz .enp-ab-create__container{max-width:1000px}}@media (min-width:1000px){#enp-quiz .enp-ab-create__container{max-width:1440px}}#enp-quiz .enp-ab-create__form{max-width:740px;margin:0 auto}#enp-quiz .enp-ab-create__form:after{content:"";display:table;clear:both}#enp-quiz .enp-ab-create__label{display:block;color:#343242;font-weight:400;font-size:.85rem;text-transform:uppercase;font-weight:500}#enp-quiz .enp-ab-create-title__textarea{font-size:1rem;font-family:Arial,monospace,helvetica,arial,sans-serif;padding:.8rem .5rem;background:#fff;border:1px solid #aaa;border-radius:3px;width:20rem;max-width:100%;margin-bottom:1.2rem;font-weight:700;font-size:1.6rem;margin-bottom:1rem;width:100%}@media (min-width:700px){#enp-quiz .enp-ab-create-title__textarea{padding:.8rem;width:100%}}#enp-quiz .enp-ab-create-title__textarea::-webkit-input-placeholder{font-weight:700}#enp-quiz .enp-ab-create-title__textarea:-ms-input-placeholder,#enp-quiz .enp-ab-create-title__textarea::-ms-input-placeholder{font-weight:700}#enp-quiz .enp-ab-create-title__textarea::placeholder{font-weight:700}#enp-quiz .enp-ab-create__select{width:100%;-webkit-appearance:none;-moz-appearance:none;appearance:none;font-size:.85rem;padding:.7rem 32px .7rem .8rem;border:1px solid #bbb;border-radius:3px;margin-bottom:1.6rem;background:url(../svg/chevron-down.svg) 100% 50% no-repeat;background-color:#fff;box-shadow:inset -26px 0 0 rgba(0,0,0,.1)}#enp-quiz .enp-ab-create__submit{width:100%;padding-top:1em;padding-bottom:1em}#headerimg h1{text-align:center;font-size:40px!important}#enp-quiz.enp-quiz__main{max-width:740px;margin:0 auto;display:grid;gap:1em;min-height:85vh}#enp-quiz.enp-quiz__main:after{content:"";display:table;clear:both}@media (min-width:1000px){#enp-quiz.enp-quiz__main{max-width:740px;margin:0 auto;grid-template-columns:1fr 4fr}#enp-quiz.enp-quiz__main:after{content:"";display:table;clear:both}}@media (min-width:1000px) and (min-width:700px){#enp-quiz.enp-quiz__main{max-width:1000px}}@media (min-width:1000px) and (min-width:1000px){#enp-quiz.enp-quiz__main{max-width:1440px}}#enp-quiz .enp-dash-container{padding:2rem;transition:all .25s cubic-bezier(0,0,.3,1)}#enp-quiz .enp-dash__section-aside{background-color:#faf9fb}@media (min-width:700px){#enp-quiz .enp-dash__section-aside{padding:2rem}}#enp-quiz .enp-breadcrumb-link__container{padding-bottom:2rem}#enp-quiz .enp-search-quizzes{display:flex;justify-content:space-between;flex-wrap:wrap;padding:1em}@media (min-width:700px){#enp-quiz .enp-search-quizzes{padding:.2rem 0;flex-wrap:nowrap}}@media (min-width:1000px){#enp-quiz .enp-search-quizzes{display:flex;justify-content:space-between;flex-direction:column}}#enp-quiz .enp-search-quizzes__form-item{margin-bottom:.6rem;flex:0 1 48%}@media (min-width:400px){#enp-quiz .enp-search-quizzes__form-item{margin-bottom:0;margin-right:1rem;flex:1 0 auto}}#enp-quiz .enp-quiz-search{flex:1 0 100%;position:relative}@media (min-width:700px){#enp-quiz .enp-quiz-search{flex:1 0 auto}}#enp-quiz .enp-search-quizzes__label{margin-bottom:0;clip:rect(1px,1px,1px,1px);position:absolute!important;left:-10000px;top:auto;width:1px;height:1px;overflow:hidden}#enp-quiz .enp-search-quizzes__select{padding:.3rem;border-radius:3px;width:100%}@media (min-width:1000px){#enp-quiz .enp-search-quizzes__select{min-width:200px;font-size:.85rem}}#enp-quiz .enp-quiz-search__input{width:100%;margin:0 0 .1rem;padding:.3rem .3rem .3rem 26px;font-size:.85rem}#enp-quiz .enp-quiz-search__icon{position:absolute;bottom:.3rem;left:.2rem;width:21px;height:21px}#enp-quiz .enp-search-quizzes__button{padding:.2rem .8rem}#enp-quiz .enp-search-results-description{font-size:.85rem}#enp-quiz .enp-search-results-description__link{white-space:nowrap}#enp-quiz .enp-search-results-description__icon{width:1.3em;height:1.3em;position:relative;top:4px;left:2px}#enp-quiz .enp-dash__section-title{font-size:1rem;text-transform:uppercase;margin-bottom:.325rem;border-bottom:1px solid #e8e4ed}@media (min-width:700px){#enp-quiz .enp-dash__section-title{padding:1em 0}}#enp-quiz .enp-dash__ab-test-helper--not-enough-quizzes{color:#b5a6c4}#enp-quiz .enp-view-toggle{cursor:pointer;opacity:.5;display:none}@media (min-width:700px){#enp-quiz .enp-view-toggle{display:flex}}#enp-quiz .enp-view-toggle__active{opacity:1}#enp-quiz .enp-sort-by{margin-left:5px}#enp-quiz .enp-dash-list{display:flex;flex-flow:column wrap;align-items:stretch;list-style:none;margin-left:0}#enp-quiz .enp-dash-item{flex-basis:100%;padding:1rem 1.2rem;background:#fff;border:1px solid #eee;border-bottom:1px solid #ddd;list-style:none;transition:all .35s cubic-bezier(0,0,.3,1);margin:0 0 .8rem;justify-content:space-between;display:flex;z-index:1;flex-direction:column;align-content:flex-end;justify-content:flex-end;border:none;border-radius:3px;background-color:#f5f3f7}#enp-quiz .enp-dash-item--published{box-shadow:inset 4px 0 0 #00a9b7,0 1px 0 rgba(0,0,0,.1)}#enp-quiz .enp-dash-item--draft{box-shadow:inset 4px 0 0 #94a6b3,0 1px 0 rgba(0,0,0,.1)}#enp-quiz .enp-dash-item--draft .enp-dash-item__title a{color:#333f48}#enp-quiz .enp-dash-item--remove{animation:e .5s cubic-bezier(0,0,.3,1) forwards}#enp-quiz .enp-dash-list--list-view .enp-dash-item{margin:0 0 .8rem;flex-basis:100%}#enp-quiz .enp-dash-item__spinner{display:flex;justify-content:center;align-content:center;align-items:center;position:absolute;top:0;bottom:0;left:0;right:0;background:hsla(0,59%,90%,.8);width:100%;animation:g .3s cubic-bezier(0,0,.3,1)}#enp-quiz .enp-dash-item__header{padding:.5rem 1rem;background:#faf9fb;border-bottom:1px solid #e8e4ed;display:flex;justify-content:space-between;align-items:center;border-radius:3px}#enp-quiz .enp-dash-item__title{font-size:1rem;padding-bottom:.5rem;padding:0;margin-bottom:0}#enp-quiz .enp-dash-item__title a{color:#00a9b7}#enp-quiz .enp-dash-item__content{padding:0 0 .375rem;position:relative;transition:all .2s cubic-bezier(0,0,.3,1)}#enp-quiz .enp-dash-item__meta{font-size:.7rem;font-weight:300;color:#565656;font-size:.75rem}#enp-quiz .enp-dash-item__username{word-wrap:break-word;padding-left:.4rem;margin-left:.2rem;border-left:1px solid #ddd}#enp-quiz .enp-dash-item__title--ab-test{padding-bottom:0}#enp-quiz .enp-dash-item__ab-quizzes{list-style:none;margin-left:0;font-size:.85rem;color:#e8e4ed;margin-bottom:.8rem}#enp-quiz .enp-dash-item__nav{list-style:none;margin-left:0;margin-bottom:0;font-size:.85rem}#enp-quiz .enp-dash-item__nav__item{display:flex;margin:0;width:100%;align-items:center}#enp-quiz .enp-dash-item__nav__item:hover{background-color:#f5f3f7}#enp-quiz .enp-dash-item__nav__item:hover .enp-dash-item__icon{fill:#bf5700}#enp-quiz .enp-dash-item__nav__item a{font-weight:400;color:#b5a6c4;display:flex;align-items:center;width:100%;padding:12px}#enp-quiz .enp-dash-item__nav__item a:focus,#enp-quiz .enp-dash-item__nav__item a:hover{color:#bf5700;outline:1px dotted #bf5700;outline-offset:1px}#enp-quiz .enp-dash-item__nav__item a:focus .enp-dash-item__icon,#enp-quiz .enp-dash-item__nav__item a:hover .enp-dash-item__icon{fill:#bf5700}#enp-quiz .enp-delete-quiz{width:100%}#enp-quiz .enp-delete-quiz:hover .enp-dash-item__delete{color:#bf5700}#enp-quiz .enp-delete-quiz:hover .enp-icon{fill:#bf5700}#enp-quiz .enp-dash-item__delete{border:none;background:none;box-shadow:none;padding:0;margin:0;display:flex;padding:12px;align-items:center;position:relative;line-height:1.6;color:#b5a6c4;cursor:pointer;width:100%}#enp-quiz .enp-dash-item__delete .enp-icon{fill:#b5a6c4}#enp-quiz .enp-dash-item__icon{fill:#b5a6c4;width:15px;height:15px;margin-right:10px}#enp-quiz .enp-dash-item__nav--collapsible{display:none;position:absolute;z-index:2;top:44px;right:-17px;width:195px;background-color:#fff;text-align:left;transform:translateZ(0);transition:all .2s cubic-bezier(0,0,.3,1)}#enp-quiz .enp-dash-item__nav--collapsible .enp-dash-item__nav__item{cursor:pointer}#enp-quiz .enp-dash-item__menu-action{height:24px;background:none;border:none;color:#444;padding:0;bottom:.2rem;right:1.5rem;top:1.5rem;cursor:pointer}#enp-quiz .enp-dash-item__menu-action-wrap{max-width:0;display:flex;flex-direction:column;align-items:flex-end}#enp-quiz .enp-dash-item__menu-action__icon{width:15px;height:15px;fill:#b5a6c4;transition:all .3s cubic-bezier(0,0,.3,1)}#enp-quiz .enp-dash-item--menu-active{transform:translate3d(0,-3px,0);z-index:2}#enp-quiz .enp-dash-item--menu-active .enp-dash-item__nav-wrap{position:relative}#enp-quiz .enp-dash-item--menu-active.enp-dash-item--published{box-shadow:inset 4px 0 0 #60aaad,0 2px 2px rgba(0,0,0,.2)}#enp-quiz .enp-dash-item--menu-active.enp-dash-item--draft{box-shadow:inset 4px 0 0 #b4d7d8,0 2px 2px rgba(0,0,0,.2)}#enp-quiz .enp-dash-item--menu-active .enp-dash-item__menu-action__icon--bottom{transform:rotateX(180deg)}#enp-quiz .enp-dash-item--menu-active .enp-dash-item__nav--collapsible{display:block;animation:b .25s cubic-bezier(0,0,.3,1) forwards;border-radius:3px;box-shadow:0 2px 2px rgba(0,0,0,.2)}#enp-quiz .enp-dash-item--menu-active .enp-dash-item__content{opacity:.4}#enp-quiz .enp-quiz-results{display:flex;justify-content:space-around;list-style:none;margin:.8rem 0 0;padding:0;text-align:center}#enp-quiz .enp-quiz-results__item{margin:0 2% 0 0;padding:0;color:#454545}@media (max-width:280px){#enp-quiz .enp-quiz-results__item{width:100%;padding:0;margin-bottom:.6rem}}#enp-quiz .enp-quiz-results__number{font-size:1.6rem;line-height:1;position:relative}#enp-quiz .enp-dash-item--draft .enp-quiz-results__number{opacity:.5}#enp-quiz .enp-quiz-results__number--average-score{color:#4e9497}#enp-quiz .enp-quiz-results__number--average-score:after{content:"%";font-size:.9rem;position:absolute;top:.3rem;right:-1rem}#enp-quiz .enp-quiz-results__label{text-transform:uppercase;font-size:.7rem;font-weight:300;color:#888}#enp-quiz .enp-dash-item--add-new__wrap{display:grid;gap:1em;grid-template-columns:1fr 1fr}#enp-quiz .enp-dash-list--quiz__container{display:grid;gap:1em}@media (min-width:1000px){#enp-quiz .enp-dash-list--quiz__container{grid-template-columns:1fr 1fr}}#enp-quiz .enp-dash-item--add-new{background:none;border:none;padding:0;position:relative}@media (min-width:1000px){#enp-quiz .enp-dash-item--add-new{padding-top:7rem}}#enp-quiz .enp-dash-link--add-new{text-align:center;border:none;border-radius:3px;padding:.85em 1.4em .75em;font-size:15px;font-weight:400;letter-spacing:.05em;color:#fff;box-shadow:inset 0 -2px 0 rgba(0,0,0,.2);background:#bf5700;cursor:pointer;text-transform:uppercase;line-height:1.6;border:1px dashed #b5a6c4;background:none;color:#545454;box-shadow:none;border:2px dashed #b5a6c4;color:#e8e4ed;transition:all .2s;justify-content:flex-start;color:#94a6b3;padding:1rem 1.2rem}#enp-quiz .enp-dash-link--add-new:focus,#enp-quiz .enp-dash-link--add-new:hover{color:#fff;box-shadow:none;background:#964400}#enp-quiz .enp-dash-link--add-new:active{color:#fff;box-shadow:inset 0 2px 0 rgba(0,0,0,.1);background:#1eeeff}#enp-quiz .enp-dash-link--add-new:focus{outline-color:#4d90fe;outline-offset:-2px;outline-style:auto;outline-width:5px}#enp-quiz .enp-dash-link--add-new:disabled,#enp-quiz .enp-dash-link--add-new:disabled:focus,#enp-quiz .enp-dash-link--add-new:disabled:hover{background:#bf5700;cursor:default;opacity:.5}#enp-quiz .enp-dash-link--add-new:focus,#enp-quiz .enp-dash-link--add-new:hover{border:1px dashed #69547e;background:hsla(0,0%,100%,.9);color:#b5a6c4;border:2px dashed #999}@media (min-width:700px){#enp-quiz .enp-dash-link--add-new{font-size:1rem;text-transform:uppercase;display:flex;justify-content:center;align-content:center;align-items:center;flex-direction:column;position:absolute;top:0;left:0;right:0;bottom:0}}#enp-quiz .enp-dash-link--add-new .enp-dash-link__icon{border-radius:50%;fill:#fff;width:1.2rem;height:1.2rem;margin-right:5px;background-color:#94a6b3}@media (min-width:700px){#enp-quiz .enp-dash-link--add-new .enp-dash-link__icon{width:2rem;height:2rem;margin:.8rem 0 .2rem}}#enp-quiz .enp-dash-link--add-new:hover{color:#333f48}#enp-quiz .enp-dash-link--add-new:hover .enp-dash-link__icon{fill:#fff;background:#333f48}#enp-quiz .enp-quiz-message--welcome p{color:#1d1c25}#enp-quiz .enp-paginate{list-style:none;margin-left:0;font-size:1rem}#enp-quiz .enp-paginate,#enp-quiz .enp-paginate__link{display:flex;justify-content:center;align-content:center;align-items:center}#enp-quiz .enp-paginate__link{margin:0 .2rem;padding:0 .4rem;border-radius:3px;font-weight:400}#enp-quiz .enp-paginate__link--current-page{border:2px solid #00a9b7}#enp-quiz .enp-paginate__item--first-page,#enp-quiz .enp-paginate__item--last-page{display:flex}#enp-quiz .enp-paginate__item--first-page:after,#enp-quiz .enp-paginate__item--last-page:before{content:"...";font-size:1rem;position:relative;bottom:.2rem;opacity:.6}#enp-quiz .enp-paginate__item--no-gap:after,#enp-quiz .enp-paginate__item--no-gap:before{content:""}#enp-quiz .enp-paginate__item--next-page{margin-left:.2rem}#enp-quiz .enp-paginate__item--previous-page{margin-right:.2rem}#enp-quiz .enp-quiz-breadcrumbs{grid-row:1}#enp-quiz .enp-quiz-breadcrumbs__list{display:flex;list-style:none;margin-left:0;margin-bottom:0}#enp-quiz .enp-quiz-breadcrumbs__item{margin-right:10px;display:flex;justify-content:center;align-content:center;align-items:center;fill:#bf5700;margin-right:5px}#enp-quiz .enp-quiz-breadcrumbs__item:last-of-type{margin-right:0}@media (min-width:400px){#enp-quiz .enp-quiz-breadcrumbs__item{margin-right:10px}}#enp-quiz .enp-quiz-breadcrumbs__link--disabled{opacity:.65;cursor:default}#enp-quiz .enp-quiz-breadcrumbs__link--active{text-align:center;border:none;border-radius:3px;padding:.85em 1.4em .75em;font-size:15px;font-weight:400;letter-spacing:.05em;color:#fff;box-shadow:inset 0 -2px 0 rgba(0,0,0,.2);background:#bf5700;cursor:pointer;text-transform:uppercase;transition:all .2s;line-height:1.6;border:2px solid #bf5700;background:transparent;color:#bf5700;box-shadow:none;padding:.4em 1em}#enp-quiz .enp-quiz-breadcrumbs__link--active:focus,#enp-quiz .enp-quiz-breadcrumbs__link--active:hover{color:#fff;box-shadow:none;background:#964400}#enp-quiz .enp-quiz-breadcrumbs__link--active:active{color:#fff;box-shadow:inset 0 2px 0 rgba(0,0,0,.1);background:#1eeeff}#enp-quiz .enp-quiz-breadcrumbs__link--active:focus{outline-color:#4d90fe;outline-offset:-2px;outline-style:auto;outline-width:5px}#enp-quiz .enp-quiz-breadcrumbs__link--active:disabled,#enp-quiz .enp-quiz-breadcrumbs__link--active:disabled:focus,#enp-quiz .enp-quiz-breadcrumbs__link--active:disabled:hover{background:#bf5700;cursor:default;opacity:.5}#enp-quiz .enp-quiz-breadcrumbs__link--active:focus,#enp-quiz .enp-quiz-breadcrumbs__link--active:hover{background:transparent;border:2px solid #964400;color:#964400}#enp-quiz .enp-quiz-breadcrumbs__link{font-size:1rem;font-weight:400;text-transform:none;letter-spacing:0}#enp-quiz .enp-quiz-breadcrumbs--fixed{top:0;position:fixed;animation:h .25s}#enp-quiz .enp-results-title{font-size:1.6rem;text-align:center;padding:3.2rem 20px 2.6rem;background:#fdfcfd;margin:-1.2rem 0 2rem;border-bottom:1px solid #ddd}#enp-quiz .enp-results-title:after{font-size:1rem;text-transform:uppercase;display:block;content:"RESULTS";font-weight:400}#enp-quiz .enp-results__container{max-width:740px;margin:0 auto;display:block}#enp-quiz .enp-results__container:after{content:"";display:table;clear:both}@media (min-width:700px){#enp-quiz .enp-results__container{max-width:1000px}}@media (min-width:1000px){#enp-quiz .enp-results__container{max-width:1440px;display:flex;justify-content:space-between}}#enp-quiz .enp-quiz-scores__container,#enp-quiz .enp-results-flow__container{width:100%}@media (min-width:1000px){#enp-quiz .enp-quiz-scores__container,#enp-quiz .enp-results-flow__container{width:48%}}#enp-quiz .enp-quiz-scores{margin-top:2.6rem}#enp-quiz .enp-quiz-score__line-chart{height:300px;margin-bottom:1rem}#enp-quiz .enp-quiz-score__line-chart .ct-label{color:#1d1c25}#enp-quiz .enp-quiz-score__line-chart .ct-grid{stroke:#dadada;stroke-dasharray:0}#enp-quiz .enp-quiz-score__line-chart .ct-line{stroke:#60aaad;stroke-width:2px}#enp-quiz .enp-quiz-score__line-chart .ct-point{stroke:#60aaad;stroke-width:8px}#enp-quiz .enp-quiz-scores-table{width:100%;max-width:500px;margin:0 auto}#enp-quiz .enp-quiz-scores-table tr th{background-color:#fff}#enp-quiz .enp-quiz-scores-table__label{padding-left:5%}#enp-quiz .enp-quiz-scores-table__score{text-align:right;padding-right:5%}#enp-quiz .enp-results-flow{position:relative;margin:2rem auto;width:320px;height:320px;border-radius:50%}@media (min-width:400px){#enp-quiz .enp-results-flow{width:390px;height:390px}}@media (min-width:700px){#enp-quiz .enp-results-flow{width:450px;height:450px}}@media (min-width:1000px){#enp-quiz .enp-results-flow{width:400px;height:400px}}#enp-quiz .enp-results-flow__section-title{clip:rect(1px,1px,1px,1px);position:absolute!important;left:-10000px;top:auto;width:1px;height:1px;overflow:hidden}#enp-quiz .enp-results-flow__item{border-radius:50%;text-align:center;height:100%;width:100%;margin:0 auto;left:0;right:0;padding:12.5% 0 0;letter-spacing:.05rem;border:2px solid #60aaad;animation:.85s a cubic-bezier(0,0,.3,1) forwards}#enp-quiz .enp-results-flow__item--total-views{background:#fff}#enp-quiz .enp-results-flow__item--quiz-starts{width:65%;height:65%;position:absolute;padding-top:8%;bottom:2.5%;background:#fff}#enp-quiz .enp-results-flow__item--quiz-finishes{width:35%;height:35%;position:absolute;bottom:5%;background:#d6e9ea}#enp-quiz .enp-results-flow__title{font-size:1rem;text-transform:uppercase;color:#444;font-size:.7rem;margin-bottom:0}@media (min-width:700px){#enp-quiz .enp-results-flow__title{font-weight:700;margin-bottom:2px}}#enp-quiz .enp-results-flow__number{font-weight:700;font-size:1.4rem;line-height:1.2}#enp-quiz .enp-results-flow__number--total-views{font-size:2rem}#enp-quiz .enp-results-flow__number--quiz-starts{font-size:1.65rem}#enp-quiz .enp-results-flow__percentage{font-size:.8rem;font-weight:400;position:relative;display:inline-block;top:-.7em;left:-.1rem;color:#444}#enp-quiz .enp-results-flow__percentage:after{content:"%";position:absolute;right:-.75rem;font-size:.7rem;color:#444}#enp-quiz .enp-results-questions__section{padding-top:5rem;padding-bottom:3rem;margin-top:5rem;margin-bottom:3rem}@media (min-width:700px){#enp-quiz .enp-results-questions__section{margin-right:2rem;margin-left:2rem}}#enp-quiz .enp-results-questions__header{align-items:flex-start;flex-direction:column}@media (min-width:400px){#enp-quiz .enp-results-questions__header{display:flex;justify-content:space-between;flex-direction:row;align-items:flex-end}}#enp-quiz .enp-results-questions__key,#enp-quiz .enp-results-questions__title{font-size:1rem;text-transform:uppercase}#enp-quiz .enp-results-questions{list-style:none;margin-left:0}#enp-quiz .enp-results-question{width:100%;font-size:1rem;padding:0;margin-bottom:1rem}#enp-quiz .enp-results-question__header{padding:1rem 1.2rem;position:relative}#enp-quiz .enp-results-question__question,#enp-quiz .enp-results-question__stats{font-size:1rem;line-height:1.4}#enp-quiz .enp-results-question__question{font-weight:400}@media (min-width:400px){#enp-quiz .enp-results-question__question{padding-right:7em;margin-bottom:0}}#enp-quiz .enp-results-question__stats{font-size:.9rem}@media (min-width:400px){#enp-quiz .enp-results-question__stats{position:absolute;bottom:1rem;right:1.2rem;text-align:right}}#enp-quiz .enp-results-question__stats,#enp-quiz .enp-results-questions__key{font-weight:300}#enp-quiz .enp-results-question__content{padding:2rem 1.2rem 1.2rem;border-radius:3px}#enp-quiz .enp-results-question__deep-stats{display:flex;justify-content:space-around;list-style:none;margin-left:0;text-align:center}#enp-quiz .enp-results-question__deep-stat__number{font-size:1.8rem;line-height:1;position:relative}#enp-quiz .enp-results-question__deep-stat__number--correct,#enp-quiz .enp-results-question__deep-stat__number--finishes{color:#4e9497}#enp-quiz .enp-results-question__deep-stat__number--incorrect{color:#c1893e}#enp-quiz .enp-results-question__deep-stat__number--correct:after,#enp-quiz .enp-results-question__deep-stat__number--finishes:after,#enp-quiz .enp-results-question__deep-stat__number--incorrect:after{content:"%";font-size:.9rem;position:absolute;top:.3rem;right:-1rem}#enp-quiz .enp-results-question__deep-stat__label{font-size:1rem;text-transform:uppercase;font-size:.8rem}#enp-quiz .enp-results-question__options{list-style:none;margin-left:0;margin-bottom:0}#enp-quiz .enp-results-question__option{padding:.8rem .8rem .8rem .4rem;border-top:1px solid #ddd}@media (min-width:400px){#enp-quiz .enp-results-question__option{display:flex;justify-content:space-between;flex-direction:row}}#enp-quiz .enp-results-question__option:first-of-type{margin-top:1.4rem}#enp-quiz .enp-results-question__option--correct{background:#fff}#enp-quiz .enp-results-question__option__text{flex-grow:100;margin-right:1rem}#enp-quiz .enp-results-question__option__text__helper{font-weight:300;font-size:1rem;text-transform:uppercase;margin-right:.4rem}@media (min-width:400px){#enp-quiz .enp-results-question__option__icon{margin-right:.3rem;min-width:1.6rem}}#enp-quiz .enp-results-question__option__icon--incorrect{fill:#c1893e;opacity:.5}#enp-quiz .enp-results-question__option__icon--correct{fill:#4e9497;opacity:1}#enp-quiz .enp-results-question__option__percentage--incorrect{color:#c1893e}#enp-quiz .enp-results-question__option__percentage--correct{color:#4e9497}#enp-quiz .enp-results-question__option__number-selected{font-weight:300}#enp-quiz .enp-slider-responses__title{font-size:1rem;text-transform:uppercase;font-weight:400;margin-top:1.6rem}#enp-quiz .enp-slider-responses__line-chart .ct-point{stroke-width:8px}#enp-quiz .enp-slider-responses__line-chart--high,#enp-quiz .enp-slider-responses__line-chart--low{stroke:#bf5700}#enp-quiz .enp-slider-responses__line-chart--correct{stroke:#60aaad}#enp-quiz .enp-slider-responses-table{width:100%}#enp-quiz .enp-slider-responses-table tr.enp-slider-responses-table__response--correct td,#enp-quiz .enp-slider-responses-table tr:nth-child(2n) td{background-color:#fff}#enp-quiz .enp-slider-responses-table__content{box-shadow:none;padding-top:1rem}#enp-quiz .enp-slider-responses-table--hide-zero .enp-slider-responses-table__frequency--zero{display:none}#enp-quiz .enp-slider-responses-table__response-frequency{display:flex;justify-content:space-between;align-items:center}#enp-quiz .enp-slider-responses-table__toggle-zero-frequency{background:#fff;width:100%;box-shadow:inset 1px 1px 0 #ccc,inset -1px -1px 0 #ccc;color:#1d1c25;font-family:Arial,monospace,helvetica,arial,sans-serif;font-size:.9rem;font-weight:400;line-height:1.5;text-transform:none;letter-spacing:0;text-align:left;border:none;border-radius:3px;min-height:3.065rem;padding:1rem 2rem 1rem 1rem;margin:1.6rem 0 0;position:relative;z-index:9;cursor:pointer;transition:all .2s cubic-bezier(0,0,.3,1);width:auto;padding:0 .6rem;margin:0}.enp-quiz-results #enp-quiz .enp-aside{border:none}.enp-quiz-results .enp-results-questions__title__quiz-title{clip:rect(1px,1px,1px,1px);position:absolute!important;left:-10000px;top:auto;width:1px;height:1px;overflow:hidden}#enp-quiz .enp-results--ab{display:block;margin-bottom:3rem}@media (min-width:1000px){#enp-quiz .enp-results--ab{display:flex;flex-wrap:wrap;align-content:flex-end;width:50%;padding:10px}}@media (min-width:1000px){#enp-quiz .enp-results--a{padding-right:1rem;border-right:1px solid #ddd}}@media (min-width:1000px){#enp-quiz .enp-results--b{padding-left:1rem}}#enp-quiz .enp-results-title--ab,#enp-quiz .enp-results__container--ab .enp-results-flow__container{min-width:100%}#enp-quiz .enp-results--loser .enp-results-flow__item{border:2px solid #bf5700}#enp-quiz .enp-results--loser .enp-results-flow__item--quiz-starts{background:#ffc696}#enp-quiz .enp-results--loser .enp-results-flow__item--quiz-finishes{background:#ffb06d}#enp-quiz .enp-results--loser .enp-results-questions__title,#enp-quiz .enp-results--loser th{color:#964400}#enp-quiz .enp-results--winner .enp-results-questions__title,#enp-quiz .enp-results--winner th{color:#4e9497}#enp-quiz .enp-results-title--a,#enp-quiz .enp-results-title--b{background:transparent}#enp-quiz .enp-ab-scores{max-width:740px;margin:0 auto}#enp-quiz .enp-ab-scores:after{content:"";display:table;clear:both}@media (min-width:700px){#enp-quiz .enp-ab-scores{max-width:1000px}}@media (min-width:1000px){#enp-quiz .enp-ab-scores{max-width:1440px}}#enp-quiz .enp-ab-scores th.enp-quiz-scores-table__label,#enp-quiz .enp-ab-scores th.enp-quiz-scores-table__score{padding-left:0;padding-right:0}#enp-quiz .enp-ab-scores__title{padding-left:50px;font-size:1rem;text-transform:uppercase}#enp-quiz .enp-quiz-score__line-chart .enp-test-loser .ct-line,#enp-quiz .enp-quiz-score__line-chart .enp-test-loser .ct-point{stroke:#bf5700}#enp-quiz .enp-quiz-scores{margin-top:0}#enp-quiz .enp-ab-scores .enp-quiz-scores-table,#enp-quiz .enp-question-results{margin-bottom:1.6rem}@media (min-width:1000px){#enp-quiz .enp-ab-scores .enp-quiz-scores-table,#enp-quiz .enp-question-results{float:left;width:48%;margin:0}#enp-quiz .enp-ab-scores .enp-quiz-scores-table:first-of-type,#enp-quiz .enp-question-results:first-of-type{margin-right:4%}}#enp-quiz .enp-question-results__container{max-width:740px;margin:0 auto}#enp-quiz .enp-question-results__container:after{content:"";display:table;clear:both}@media (min-width:700px){#enp-quiz .enp-question-results__container{max-width:1000px}}@media (min-width:1000px){#enp-quiz .enp-question-results__container{max-width:1440px}}#enp-quiz .enp-question-results--ab .enp-results-questions__section{background:#fff;border:none;padding:1.6rem 0;margin:1.6rem auto}#enp-quiz .enp-question-results--ab .enp-results-questions__container{padding:0}#enp-quiz .enp-ab-new-embed-code__section{max-width:740px;margin:0 auto;max-width:540px;padding-bottom:2rem;margin-bottom:2rem}#enp-quiz .enp-ab-new-embed-code__section:after{content:"";display:table;clear:both}#enp-quiz .enp-ab-new-embed-code__section .enp-ab-embed-code{padding:0;margin:0}#enp-quiz .enp-ab-embed-code__section{background:#faf9fb;border-bottom:1px solid #ddd;border-top:1px solid #ddd;padding-top:3rem;padding-bottom:3rem;margin-top:3rem;margin-bottom:3rem;padding-top:5rem;margin-top:5rem}#enp-quiz .enp-ab-embed-code{max-width:740px;margin:0 auto}#enp-quiz .enp-ab-embed-code:after{content:"";display:table;clear:both}#enp-quiz .enp-ab-embed-code__title{font-size:1rem;text-transform:uppercase}#enp-quiz .enp-embed-code__textarea{margin-bottom:0}#enp-quiz .enp-embed-code__instructions{font-size:1.1rem}#enp-quiz .enp-slider{margin-bottom:1.6rem}#enp-quiz .enp-slider-input__container{display:flex;align-items:center;justify-content:center;margin:1.6rem auto;position:relative}#enp-quiz .enp-slider-input__label{display:block;color:#343242;font-weight:400;font-size:.85rem;text-transform:uppercase}#enp-quiz .enp-slider-input__prefix,#enp-quiz .enp-slider-input__suffix{font-size:1rem}#enp-quiz .enp-slider-input__prefix{margin-right:.2rem;white-space:pre}#enp-quiz .enp-slider-input__suffix{margin-left:.2rem;white-space:pre}#enp-quiz .enp-slider-input__input{font-size:1rem;font-family:Arial,monospace,helvetica,arial,sans-serif;padding:.8rem .5rem;background:#fff;border:1px solid #aaa;border-radius:3px;width:20rem;max-width:100%;margin-bottom:1.2rem;margin-bottom:0;padding:.75rem;width:auto;transition:all .25s cubic-bezier(0,0,.3,1)}@media (min-width:700px){#enp-quiz .enp-slider-input__input{padding:.8rem;width:100%}}#enp-quiz .enp-slider-input__input--incorrect{color:#bf5700}#enp-quiz .enp-slider-input__input--correct{color:#4e9497}#enp-quiz .enp-slider-input__input--invalid-animation{box-shadow:0 0 2px 1px #c1893e}#enp-quiz .enp-slider_input__range-helper{position:absolute;bottom:-1.2rem;font-size:.8rem}#enp-quiz .enp-slider_input__range-helper--low{left:0}#enp-quiz .enp-slider_input__range-helper--high{right:0}#enp-quiz .enp-slider-input__range-helper__number{position:relative;color:#e8e4ed}#enp-quiz .ui-slider-range-show-correct__tooltip-container{position:relative}#enp-quiz .ui-slider-range-show-correct__tooltip{position:absolute;top:-.4rem;margin-left:-.55rem;height:1rem;width:1.1rem;height:1.1rem;border:2px solid #60aaad;background-color:#fff;border-radius:50%;z-index:9999}#enp-quiz .ui-slider-range-show-correct__tooltip--low{left:0}#enp-quiz .ui-slider-range-show-correct__tooltip--high{right:-.55rem}#enp-quiz .ui-slider-range-show-correct__tooltip__text{position:relative;color:#417d7f;top:-1.35rem;font-size:.825rem;min-width:100%;display:inline-block;text-align:center;text-shadow:0 1px 0 #fff}#enp-quiz .enp-slider{position:relative;text-align:left;background:#ddd}#enp-quiz .enp-slider .ui-helper-hidden{display:none}#enp-quiz .enp-slider .ui-helper-hidden-accessible{border:0;clip:rect(0 0 0 0);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px}#enp-quiz .enp-slider .ui-helper-reset{margin:0;padding:0;border:0;outline:0;line-height:1.3;text-decoration:none;font-size:100%;list-style:none}#enp-quiz .enp-slider .ui-helper-clearfix:after,#enp-quiz .enp-slider .ui-helper-clearfix:before{content:"";display:table;border-collapse:collapse}#enp-quiz .enp-slider .ui-helper-clearfix:after{clear:both}#enp-quiz .enp-slider .ui-helper-clearfix{min-height:0}#enp-quiz .enp-slider .ui-helper-zfix{width:100%;height:100%;top:0;left:0;position:absolute;opacity:0;filter:alpha(opacity=0)}#enp-quiz .enp-slider .ui-front{z-index:100}#enp-quiz .enp-slider .ui-state-disabled{cursor:default!important}#enp-quiz .enp-slider .ui-icon{display:block;text-indent:-99999px;overflow:hidden;background-repeat:no-repeat}#enp-quiz .enp-slider .ui-widget-overlay{position:fixed;top:0;left:0;width:100%;height:100%}#enp-quiz .enp-slider .ui-slider-handle{background:#fff;border-radius:50%;border:1px solid #aaa;position:absolute;z-index:2;width:1.2rem;height:1.2rem;top:-.4rem;margin-left:-.6rem;cursor:default;touch-action:none;transition:opacity .2s cubic-bezier(0,0,.3,1),height .18s cubic-bezier(0,0,.3,1),width .18s cubic-bezier(0,0,.3,1),transform .18s cubic-bezier(0,0,.3,1)}#enp-quiz .enp-slider .ui-slider-handle:focus{outline:none;box-shadow:0 0 3px 1px #4d90fe}#enp-quiz .enp-slider .ui-slider-handle--correct,#enp-quiz .enp-slider .ui-slider-handle--incorrect{width:1.1rem;height:1.1rem;top:-.4rem;margin-left:-.55rem}#enp-quiz .enp-slider .ui-slider-handle--incorrect{z-index:1;border:2px solid #bf5700}#enp-quiz .enp-slider .ui-slider-handle--correct{border:2px solid #60aaad;z-index:99999}#enp-quiz .enp-slider .ui-slider-range{position:absolute;z-index:1;font-size:.7rem;display:block;border:0;background-position:0 0;top:0;height:100%}#enp-quiz .enp-slider .ui-slider-range-show-correct{background:#60aaad;z-index:9}#enp-quiz .enp-slider .ui-slider-range-min{left:0;background:#00a9b7}#enp-quiz .enp-slider .ui-slider-range-max{right:0}#enp-quiz .enp-slider.ui-state-disabled .ui-slider-handle,#enp-quiz .enp-slider.ui-state-disabled .ui-slider-range{filter:inherit}#enp-quiz .ui-slider-horizontal{height:.3rem}#enp-quiz .enp-question__answered .enp-slider{background:#bbb}#enp-quiz .enp-question__answered .ui-slider-range-min{background:#fff} /*# sourceMappingURL=enp_quiz-create.min.css.map */ diff --git a/public/quiz-create/css/enp_quiz-create.min.css.map b/public/quiz-create/css/enp_quiz-create.min.css.map index 13fe9b01..16a87c9e 100644 --- a/public/quiz-create/css/enp_quiz-create.min.css.map +++ b/public/quiz-create/css/enp_quiz-create.min.css.map @@ -1 +1 @@ -{"version":3,"sources":["_setup.scss","_utilities.scss","_variables.scss","_structure.scss","_typography.scss","_animations.scss","_base.scss","_forms.scss","_quiz-create.scss","_quiz-preview.scss","_quiz-publish.scss","_ab-create.scss","_dashboard.scss","_breadcrumbs.scss","_quiz-results.scss","_ab-results.scss","../../../quiz-take/css/sass/_slider.scss"],"names":[],"mappings":"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","file":"enp_quiz-create.min.css","sourcesContent":["html {\n font-size: 16px!important; // set our rem value reference\n}\n\nhtml #enp-quiz {\n box-sizing: border-box;\n}\n\nbody #enp-quiz {\n background: #fff;\n overflow: hidden;\n}\n\n#enp-quiz {\n *, *:before, *:after {\n box-sizing: inherit;\n }\n\n ul, ol {\n margin: 0 0 1.6rem 1.25rem;\n padding: 0;\n }\n\n textarea {\n margin-bottom: 1rem;\n }\n\n button, input[type=\"button\"], input[type=\"reset\"], input[type=\"submit\"] {\n border: none;\n &:active,\n &:focus,\n &:hover {\n border: none;\n }\n }\n\n iframe {\n border: none;\n }\n}\n","@mixin focus--glow {\n outline-color: #4D90FE;\n outline-offset: -2px;\n outline-style: auto;\n outline-width: 5px;\n}\n\n@mixin disabled {\n opacity: 0.65;\n cursor: default;\n}\n\n@mixin btn {\n text-align: center;\n border: none;\n border-radius: 3px;\n padding: .85em 1.4em .75em;\n font-size: 15px;\n font-weight: 400;\n letter-spacing: .05em;\n color: #fff;\n box-shadow: inset 0 -2px 0 rgba(0,0,0,.2);\n background: $link;\n cursor: pointer;\n text-transform: uppercase;\n transition: all .2s;\n line-height: 1.6;\n\n &:focus,\n &:hover {\n color: #fff;\n box-shadow: none;\n background: $link_hover;\n }\n\n &:active {\n color: #fff;\n box-shadow: inset 0 2px 0 rgba(0,0,0,.1);\n background: lighten($blue, 20);\n }\n\n &:focus {\n @include focus--glow;\n }\n\n &:disabled,\n &:disabled:focus,\n &:disabled:hover {\n background: $link;\n cursor: default;\n opacity: .5;\n\n\n }\n}\n\n@mixin btn--reset {\n border: none;\n background: none;\n box-shadow: none;\n padding: 0;\n margin: 0;\n}\n\n@mixin btn--submit {\n @include btn;\n}\n\n@mixin btn--ghost {\n @include btn;\n border: 2px solid $link;\n background: transparent;\n color: $link;\n box-shadow: none;\n\n &:focus,\n &:hover {\n background: transparent;\n border: 2px solid $link_hover;\n color: $link_hover;\n }\n}\n\n@mixin box-shadow {\n box-shadow: 0 2px 2px rgba(0,0,0,.2);\n}\n\n@mixin btn--dashed {\n @include btn;\n border: 1px dashed $darker_gray;\n background: none;\n color: #545454;\n box-shadow: none;\n\n &:hover,\n &:focus {\n border: 1px dashed $darkest_gray;\n color: $darker_gray;\n background: rgba(255,255,255,.9);\n }\n}\n\n@mixin btn--dashed--light {\n @include btn--dashed;\n border: 2px dashed $darker-gray;\n color: $dark_gray;\n transition: all .2s;\n\n &:hover,\n &:focus {\n color: $darker_gray;\n border: 2px dashed #999;\n }\n}\n\n@mixin btn--dashed--light--alt-bg {\n @include btn--dashed--light ;\n background: $light_gray;\n}\n\n@mixin btn--small {\n font-size: 13px;\n}\n\n@mixin btn--thin {\n padding: 0.4em 1em;\n}\n\n@mixin btn--icon {\n @include btn;\n padding: .75em 0.8em .7em 1.4em;\n}\n\n@mixin btn--icon__icon {\n @include icon--white;\n @include icon--xl;\n position: relative;\n top: 4px;\n}\n\n/*\n* @usage: @include btn--icon(BEM-root-class);\n* Button with icon with white circular background.\n* --------------\n* | BTN TEXT > |\n* --------------\n* @param $rootBEM: root class name that will be extended\n\n@mixin btn--icon($rootBEM) {\n .(#){$rootBEM} {\n @include btn--icon;\n }\n\n .(#){$rootBEM}__icon {\n @include btn--icon__icon ;\n }\n}\n*/\n\n@mixin btn--icon--icon-circle {\n @include btn;\n padding: .65em 1.2em .85em 1.4em;\n}\n\n// use when the icon is larger and on the right\n@mixin btn--icon__icon--circle {\n @include icon--circle;\n @include icon--white-bg;\n @include icon--normal;\n margin-left: 0.5em;\n position: relative;\n top: 0.15rem;\n}\n\n@mixin btn--icon__icon--circle--hover {\n @include icon--white-bg--hover;\n}\n\n/*\n* @usage: @include btn--icon--circle(BEM-root-class);\n* Button with icon with white circular background.\n* ---------------\n* | BTN TEXT (>) |\n* ---------------\n* @param $rootBEM: root class name that will be extended\n*/\n@mixin btn--icon--circle($rootBEM) {\n .#{$rootBEM} {\n @include btn--icon--icon-circle;\n }\n\n .#{$rootBEM}__icon {\n @include btn--icon__icon--circle ;\n\n\n &:hover {\n @include btn--icon__icon--circle--hover ;\n }\n }\n}\n\n/*\n* @usage: @include btn--icon--hover-circle(BEM-root-class);\n* Button with icon. Hovering/focusing button moves\n* the icon to right and fades in a white circular background\n* -------------- ----------------\n* | BTN TEXT > | --hover/focus--> | BTN TEXT (>) |\n* -------------- ----------------\n* @param $rootBEM: root class name that will be extended\n*/\n@mixin btn--icon--hover-circle($rootBEM) {\n .#{$rootBEM} {\n @include btn--icon--icon-circle;\n padding-right: 0.8em;\n }\n\n .#{$rootBEM}__icon {\n @include btn--icon__icon--circle ;\n margin-left: 0;\n width: 1em;\n height: 1em;\n background: transparent;\n fill: #fff;\n transform: translate3d(0, 0, 0);\n transition: all .3s ease-in-out;\n }\n\n .#{$rootBEM}:hover .#{$rootBEM}__icon {\n @include btn--icon__icon--circle--hover ;\n transform: translate3d(1em, 0, 0);\n margin-right: 1em;\n }\n\n\n}\n\n// use on small icons and placed on the left\n@mixin btn--icon__icon--circle--small {\n @include icon--circle--small;\n margin-right: 5px;\n}\n\n\n// use this to match the icon to the inline font-size\n@mixin icon--inline {\n width: 1em;\n height: 1em;\n position: relative;\n top: .125em;\n}\n\n@mixin icon--small {\n width: 1rem;\n height: 1rem;\n}\n\n@mixin icon--normal {\n width: 1.2rem;\n height: 1.2rem;\n}\n\n@mixin icon--large {\n width: 1.5rem;\n height: 1.5rem;\n}\n\n@mixin icon--xl {\n width: 1.8rem;\n height: 1.8rem;\n}\n\n@mixin icon--xxl {\n width: 2.4rem;\n height: 2.4rem;\n}\n\n@mixin icon--xxxl {\n width: 2.8rem;\n height: 2.8rem;\n}\n\n@mixin icon--circle {\n border-radius: 50%;\n fill: #fff;\n}\n\n@mixin border-radius {\n border-radius: 3px;\n}\n\n@mixin icon--circle--pad {\n @include icon--circle ;\n padding: 0.05em;\n\n @include breakpoint(medium) {\n padding: 0.15em;\n }\n}\n\n@mixin icon--circle--pad--xl {\n @include icon--circle ;\n padding: 0.6rem;\n}\n\n@mixin icon--circle--small {\n @include icon--small;\n @include icon--circle;\n padding: 0.02rem;\n}\n\n@mixin icon--white {\n fill: #fff;\n}\n\n@mixin icon--white-bg {\n background: #fff;\n fill: $link;\n}\n\n@mixin icon--white-bg--hover {\n background: #fff;\n fill: $link_hover;\n}\n\n@mixin icon--gray-bg {\n background: $dark_gray;\n fill: $light_gray;\n}\n\n@mixin icon--gray-bg--hover {\n fill: #fff;\n background: $darker_gray;\n}\n\n@mixin small-uppercase {\n font-size: 1rem;\n text-transform: uppercase;\n}\n\n@mixin hint {\n font-size: .7rem;\n font-weight: 300;\n color: #565656;\n}\n\n@mixin green {\n color: $green;\n}\n\n@mixin dark-green {\n color: $dark_green;\n}\n\n@mixin red {\n color: $red;\n}\n\n@mixin fade-red {\n color: $fade_red;\n}\n\n/* Text meant only for screen readers */\n@mixin screen-reader-text {\n clip: rect(1px, 1px, 1px, 1px);\n position: absolute !important;\n left:-10000px;\n top:auto;\n width:1px;\n height:1px;\n overflow:hidden;\n}\n\n@mixin screen-reader-text--hover {\n background-color: #f1f1f1;\n border-radius: 3px;\n box-shadow: 0 0 2px 2px rgba(0, 0, 0, 0.6);\n clip: auto !important;\n color: #21759b;\n display: block;\n font-size: 14px;\n font-weight: bold;\n height: auto;\n left: 5px;\n line-height: normal;\n padding: 15px 23px 14px;\n text-decoration: none;\n top: 5px;\n width: auto;\n z-index: 100000;\n}\n\n@mixin xmargin-vertical {\n margin-top: 2rem;\n margin-bottom: 2rem;\n}\n\n@mixin xmargin-horizontal {\n margin-right: 2rem;\n margin-left: 2rem;\n}\n\n@mixin xpadding-vertical {\n padding-top: 2rem;\n padding-bottom: 2rem;\n}\n\n@mixin xpadding-vertical-top {\n padding-top: 2rem;\n}\n\n@mixin xpadding-horizontal {\n padding-right: 2rem;\n padding-left: 2rem;\n}\n\n@mixin header-space {\n @include breakpoint(large) {\n padding-top: 7rem;\n }\n}\n\n@mixin ul-no-style {\n list-style: none;\n margin-left: 0;\n}\n\n@mixin hidden--accessible {\n height: 0;\n opacity: 0;\n padding: 0;\n overflow: hidden;\n}\n\n@mixin accordion {\n background: #fff;\n width: 100%;\n}\n\n@mixin accordion__header {\n @include accordion ;\n box-shadow: inset 1px 1px 0 #ccc, inset -1px -1px 0 #ccc;\n color: $font;\n font-family: $fontTitle;\n font-size: .9rem;\n font-weight: 400;\n line-height: 1.5;\n text-transform: none;\n letter-spacing: 0;\n text-align: left;\n border: none;\n border-radius: 3px;\n min-height: 3.065rem;\n padding: 1rem 2rem 1rem 1rem;\n margin: 1.6rem 0 0;\n position: relative;\n z-index: 9;\n cursor: pointer;\n transition: all .2s $fastInEaseOut;\n}\n\n@mixin accordion__content {\n @include accordion ;\n box-shadow: inset 1px -1px 0 #ccc, inset -1px -1px 0 #ccc;\n display: block;\n position: relative;\n height: auto;\n overflow: visible;\n margin-bottom: 1.6rem;\n}\n\n@mixin accordion__content--closed {\n margin-top: 0;\n padding-top: 0rem;\n animation: slideOutTop .25s $fastInEaseOut forwards;\n display: none;\n}\n\n@mixin accordion__content--open {\n padding-top: 1.6rem;\n margin-bottom: 2rem;\n animation: slideInTop .45s $fastInEaseOut forwards;\n}\n\n// Share Icons\n@mixin share_icons($rootBEM) {\n\n .#{$rootBEM} {\n @include ul-no-style;\n @include flex-center;\n }\n\n .#{$rootBEM}__item {\n margin-right: 20px;\n\n &:last-child {\n margin-right: 0;\n }\n }\n\n .#{$rootBEM}__item__icon {\n @include icon--xxl;\n @include icon--circle--pad--xl;\n\n fill: #fff!important;\n }\n\n .#{$rootBEM}__item__icon--facebook {\n background-color: #3a5795;\n }\n\n .#{$rootBEM}__item__icon--twitter {\n background-color: #4099ff;\n }\n}\n\n@mixin section--alt {\n background: $light_gray;\n border-bottom: 1px solid #ddd;\n border-top: 1px solid #ddd;\n padding-top: 3rem;\n padding-bottom: 3rem;\n margin-top: 3rem;\n margin-bottom: 3rem;\n}\n\n#enp-quiz {\n .enp-screen-reader-text {\n @include screen-reader-text;\n }\n\n .enp-screen-reader-text:hover,\n .enp-screen-reader-text:active,\n .enp-screen-reader-text:focus {\n @include screen-reader-text--hover;\n }\n\n .enp-accordion-header {\n @include accordion__header ;\n\n &:first-of-type {\n margin-top: 0;\n }\n\n .enp-accordion-header__icon {\n position: absolute;\n fill: $dark_gray;\n right: 0.75rem;\n bottom: 0.75rem;\n transition: all .35s $fastInEaseOut;\n }\n }\n\n .enp-accordion-header--open {\n\n .enp-accordion-header__icon {\n transform: rotateX(180deg);\n }\n\n }\n\n .enp-quiz-settings__form .enp-accordion-header {\n position: relative;\n overflow-y: hidden;\n }\n\n .enp-accordion-content {\n @include accordion__content ;\n }\n\n .enp-accordion-content--closed {\n @include accordion__content--closed ;\n }\n\n .enp-accordion-content--open {\n @include accordion__content--open ;\n }\n\n .enp-quiz-message {\n @include container--thin;\n background: #fff;\n border: 1px solid #eee;\n border-bottom: 1px solid #ccc;\n padding: 1rem;\n margin-bottom: 1.6rem;\n position: fixed;\n bottom: 0;\n left: 0;\n }\n\n .enp-quiz-message__title {\n @include small-uppercase;\n }\n\n .enp-message__list {\n @include ul-no-style;\n font-size: 1.1rem;\n margin-bottom: 0;\n }\n\n .enp-quiz-message--error {\n border-left: 6px solid $red;\n color: $red;\n }\n\n .enp-quiz-message__title--error {\n color: $dark_red;\n }\n\n .enp-quiz-message--success {\n border-left: 6px solid $green;\n color: $dark_green;\n }\n\n .enp-quiz-message__title--success {\n color: $dark_green;\n }\n\n .enp-quiz-message--note {\n border-left: 6px solid $khaki;\n }\n\n .enp-quiz-message__title--note {\n color: $dark_blue;\n }\n\n .enp-quiz-message__close {\n @include btn--reset;\n position: absolute;\n top: 5px;\n right: 5px;\n }\n\n .enp-quiz-message--ajax {\n margin-bottom: .6rem;\n animation: slideInBottom .3s;\n }\n\n .enp-quiz-message-ajax-container {\n z-index: 9999;\n position: fixed;\n bottom: 10px;\n }\n\n .enp-quiz-message--saving__spinner {\n margin-left: -10px;\n }\n\n .enp-quiz-message--saving__text {\n font-size: 1rem;\n }\n\n textarea.limited-chars,\n input.limited-chars {\n margin-bottom: 0.2rem;\n }\n\n .limited-chars__container {\n color: lighten($dark_gray, 8);\n font-size: 0.8rem;\n display: block;\n text-align: right;\n margin-bottom: 1.2rem;\n }\n\n .limited-chars__counter {\n color: $dark_gray;\n }\n\n .limited-chars__container--error {\n color: $dark_red;\n\n .limited-chars__counter {\n color: $dark_red;\n }\n }\n\n textarea.has-error,\n input.has-error {\n border: 1px solid $red;\n &:focus {\n outline-color: $red;\n }\n\n }\n\n\n\n .enp-tooltip {\n position: relative;\n }\n\n .enp-tooltip__activator {\n\n &:focus + .enp-tooltip__description,\n &:focus > .enp-tooltip__description {\n display: block;\n }\n }\n\n .enp-tooltip__description {\n display: none;\n position: absolute;\n left: 103%;\n margin-bottom: 2rem;\n border-radius: 3px;\n background: $light_gray;\n font-size: 0.9rem;\n padding: 0.9rem;\n max-width: 200px;\n }\n\n\n}\n\n.enp-sticky {\n position: relative;\n left: 0;\n right: 0;\n top: 0;\n z-index: 999;\n\n &.enp-sticky--fixed {\n position: fixed;\n }\n}\n\n.enp-breadcrumb-link {\n font-size: 0.85rem;\n}\n\n.enp-breadcrumb-link__icon {\n position: relative;\n top: 0.45rem;\n left: 0.4rem;\n}\n","//fonts\n$fontBody : Arial,monospace, helvetica, arial, sans-serif;\n$fontTitle : Arial,monospace, helvetica, arial, sans-serif;\n\n// // // colors\n$font : #1d1c25;\n$background: #FAF9FB;\n$title : #5D5E5F;\n\n// Blues\n$blue: #00A9B7;\n$dark_blue: #333F48;\n$light_blue: lighten($blue, 100);\n\n// Grays\n$light_gray: #FAF9FB;\n$really_light_gray: lighten($light_gray, 1);\n$gray: darken($light_gray, 2);\n$dark_gray: darken($gray, 5);\n$darker_gray: darken($dark_gray, 20);\n$darkest_gray: darken($dark_gray, 50);\n\n// Other colors\n$khaki: #CCA562;\n$green: #60AAAD;\n$dark_green: darken($green, 8);\n$red: #bf5700;\n$dark_red: darken($red, 8);\n$fade_red: #C1893E;\n\n// Elements\n$link: #bf5700;\n$link_hover: darken($link, 8);\n// animation\n$fastInEaseOut: cubic-bezier(0.000, 0, .3, 1);\n\n\n$breakpoints: (\n \"small\" : 400px,\n \"medium\" : 700px,\n \"large\" : 1000px\n);\n\n// -----------------------------------------------------------------------------\n// Core\n// -----------------------------------------------------------------------------\n\n// Caching current breakpoint\n// Not meant to be manually edited\n$default-breakpoint: root;\n$current-breakpoint: $default-breakpoint;\n\n// The usual breakpoint mixin\n// Except it updates the $current-breakpoint variable\n// 1. If breakpoint name exists in map\n// 2. Update $current-breakpoint\n// 3. Open a media query\n// 4. Let the user dump content\n// 5. Then reset $current-breakpoint\n// 6. If breakpoint name doesn't exist in map, warn the user\n@mixin breakpoint($breakpoint) {\n $value: map-get($breakpoints, $breakpoint);\n\n @if $value != null { // 1\n $current-breakpoint: $breakpoint !global; // 2\n @media (min-width: $value) { @content; } // 3\n $current-breakpoint: $default-breakpoint !global; // 5\n }\n\n @else {\n @warn \"Invalid breakpoint `#{$breakpoint}`.\"; // 6\n }\n}\n\n// for only targeting a specific device\n// NOTE: DOESN'T SUPPORT THE @include placeholders!!!\n@mixin media($query) {\n @if $query == max-small {\n $media_query: \"max-width: #{map-get($breakpoints, \"small\")}\";\n } @else if $query == only-medium {\n $media_query: \"min-width: #{map-get($breakpoints, \"medium\")}) and (max-width: #{(map-get($breakpoints, \"large\") - 1px)}\";\n } @else if $query == max-medium {\n $media_query: \"max-width: #{(map-get($breakpoints, \"medium\") - 1px)}\";\n } @else if $query == max-large {\n $media_query: \"max-width: #{(map-get($breakpoints, \"large\") - 1px)}\";\n } @else {\n // just use the number provided as a max width\n $media_query: \"max-width: #{$query}\";\n }\n\n @if variable-exists(media_query) {\n @media ($media_query) {\n @content;\n }\n }\n\n}\n","@mixin clearfix {\n &:after {\n content: \"\";\n display: table;\n clear: both;\n }\n}\n\n@mixin container {\n max-width: 740px;\n margin: 0 auto;\n @include clearfix;\n}\n\n@mixin well {\n padding: 1.6rem;\n margin-bottom: 1.6rem;\n background: $light_blue;\n @include border-radius;\n border: 1px solid #eee;\n border-bottom-color: #ccc;\n\n @include breakpoint(medium) {\n margin-bottom: 2.6rem;\n padding: 1.6rem 2rem;\n }\n}\n\n@mixin container--wide {\n @include container;\n\n @include breakpoint(medium) {\n max-width: 1000px;\n }\n\n @include breakpoint(large) {\n max-width: 1440px;\n }\n}\n\n\n@mixin container--thin {\n @include container;\n // max-width: 512px;\n}\n\n@mixin container--really-thin {\n @include container;\n max-width: 300px;\n}\n\n@mixin container--form {\n @include container--thin;\n\n .enp-input,\n .enp-textarea {\n width: 100%;\n }\n}\n\n@mixin container--form--thin {\n @include well;\n @include container--really-thin;\n\n .enp-input,\n .enp-textarea {\n width: 100%;\n }\n}\n\n@mixin flex-container { // no pseudo element to clear and break spacing\n @include container;\n}\n\n@mixin flex-container--wide { // no pseudo element to clear and break spacing\n @include flex-container;\n\n @include breakpoint(medium) {\n max-width: 840px;\n }\n\n @include breakpoint(large) {\n max-width: 1000px;\n }\n}\n\n@mixin flex {\n display: flex;\n}\n\n@mixin flex-list__item {\n flex-basis: 100%;\n margin: 0;\n border-bottom-color: #ddd;\n}\n\n@mixin flex-spread {\n @include flex;\n justify-content: space-between;\n}\n\n@mixin flex-spread-vertical {\n @include flex-spread;\n flex-direction: column;\n}\n\n@mixin flex-spread-around {\n @include flex;\n justify-content: space-around;\n}\n\n@mixin flex-bottom {\n @include flex;\n align-items: flex-end;\n align-content: flex-end;\n}\n\n@mixin flex-center {\n @include flex;\n justify-content: center;\n align-content: center;\n align-items: center;\n}\n\n@mixin flex-vertical-center {\n @include flex;\n align-content: center;\n align-items: center;\n}\n\n@mixin flex-inline {\n @include flex;\n @include ul-no-style;\n margin-bottom: 0;\n}\n\n@mixin flex-inline__item {\n margin-right: 10px;\n\n &:last-of-type {\n margin-right: 0;\n }\n}\n\n\n@mixin flex-grid {\n @include flex;\n flex-flow: column wrap;\n align-items: stretch;\n @include ul-no-style;\n}\n\n@mixin flex-grid__item {\n flex-basis: 100%;\n padding: 1rem 1.2rem;\n background: #fff;\n border: 1px solid #eee;\n border-bottom: 1px solid #ddd;\n list-style: none;\n transition: all .35s $fastInEaseOut;\n margin: 0 0 0.8rem;\n\n // @include breakpoint(medium) {\n // flex-basis: 100%;\n // max-width: 100%;\n // margin: 0 2% 0.8rem 0;\n\n // &:nth-child(2n) {\n // margin-right: 0;\n // }\n // }\n\n // @include breakpoint(large) {\n // flex-basis: 100%;\n // max-width: 100%;\n // margin-right: 1.25%;\n\n // &:nth-child(2n) {\n // margin-right: 1.25%;\n // }\n\n // &:nth-child(3n) {\n // margin-right: 0;\n // }\n // }\n}\n\n@mixin flex-grid__title {\n font-size: 1rem;\n padding-bottom: 0.5rem;\n}\n","body #enp-quiz {\n color: $font;\n font-family: $fontBody;\n font-size: 1em;\n line-height: 1.6;\n font-weight: 400;\n\n @include breakpoint(medium) {\n font-size: 1.3em;\n }\n}\n\n#enp-quiz {\n /* Headings */\n h1,h2,h3,h4,h5,h6 {\n font-family: $fontTitle;\n color: $title;\n clear: both;\n margin: 0 0 .2rem;\n font-weight: bold;\n line-height: 1.2em;\n }\n\n h1 {\n font-size: 2em;\n }\n\n h2 {\n font-size: 1.75em;\n }\n\n h3 {\n font-size: 1.475em;\n }\n\n h4 {\n font-size: 1.3em;\n }\n\n h5 {\n font-size: 1.125em;\n }\n\n h6 {\n font-size: 1em;\n }\n\n p+h1, ul+h1,\n p+h2, ul+h2,\n p+h3, ul+h3,\n p+h4, ul+h4,\n p+h5, ul+h5,\n p+h6, ul+h6 {\n margin-top: 1.8em;\n }\n\n /* Text elements */\n p {\n font-size: 0.85em;\n margin-bottom: 1.125em;\n font-weight: 300;\n }\n ul, ol {\n margin: 0 0 1.6em 1.25em;\n }\n ul {\n list-style: disc;\n }\n ol {\n list-style: decimal;\n }\n li > ul,\n li > ol {\n margin-bottom: 0;\n margin-left: 1.6em;\n }\n\n b, strong {\n font-weight: bold;\n }\n\n dfn, cite, em {\n font-family: georgia, times, serif;\n font-style: italic;\n }\n\n pre {\n background: #eee;\n font-family: \"Courier 10 Pitch\", Courier, monospace;\n font-size: .95em;\n line-height: 1.6;\n margin-bottom: 1.6em;\n padding: 1.6em;\n overflow: auto;\n max-width: 100%;\n }\n .code, code, kbd, tt, var {\n font: .7em Monaco, Consolas, \"Andale Mono\", \"DejaVu Sans Mono\", monospace;\n }\n\n table {\n border: none;\n\n th {\n font-family: $fontTitle;\n font-size: .8rem;\n text-transform: uppercase;\n border: none;\n border-bottom: 1px solid #ddd;\n }\n\n td {\n font-family: $fontBody;\n font-size: 1rem;\n border: none;\n border-bottom: 1px solid #eee;\n }\n\n tr:nth-child(even) td {\n background: $really_light_gray;\n }\n\n tr:last-child td {\n border-bottom: none;\n }\n }\n\n figure {\n margin: 0;\n }\n\n img {\n height: auto; /* Make sure images are scaled correctly. */\n max-width: 100%; /* Adhere to container width. */\n }\n\n /* Links */\n a {\n color: $link;\n text-decoration: none;\n transition: color .2s;\n touch-action: manipulation; // remove 300ms delay for ie\n\n .enp-icon {\n fill: $link;\n }\n }\n\n a:hover,\n a:focus,\n a:active {\n color: $link_hover;\n\n .enp-icon {\n fill: $link_hover;\n }\n }\n\n button {\n &:focus {\n @include focus--glow;\n }\n }\n\n .enp-btn {\n @include btn;\n }\n\n\n .enp-btn--add {\n @include btn--dashed;\n width: 100%;\n }\n\n .enp-btn--disabled {\n @include disabled;\n }\n\n .enp-btn--enabled {\n animation: expand .6s;\n }\n\n .enp-icon {\n width: 24px;\n height: 24px;\n transition: all .2s;\n }\n\n .enp-page-title {\n font-size: 1.6rem;\n }\n}\n","@keyframes slideInBottom {\n 0% {\n opacity: 0;\n transform: translate3d(0, 100px, 0);\n }\n 100% {\n opacity: 1;\n transform: translate3d(0, 0, 0);\n }\n}\n\n@keyframes slideInTop {\n 0% {\n opacity: 0;\n height: auto;\n transform: translate3d(0, -20px, 0);\n }\n 100% {\n opacity: 1;\n height: auto;\n transform: translate3d(0, 0, 0);\n }\n}\n\n@keyframes slideInTop--reduced-opacity {\n 0% {\n opacity: 0;\n height: auto;\n transform: translate3d(0, -20px, 0);\n }\n 100% {\n opacity: 0.8;\n height: auto;\n transform: translate3d(0, 0, 0);\n }\n}\n\n\n@keyframes slideOutTop {\n 0% {\n overflow: hidden;\n height: 100px;\n opacity: 1;\n transform: translate3d(0, 0, 0);\n }\n 100% {\n height: 0;\n opacity: 0;\n transform: translate3d(0, -20px, 0);\n }\n}\n\n@keyframes removeElement {\n 0% {\n opacity: 1;\n transform: translate3d(0, 0, 0);\n }\n 100% {\n padding: 0;\n margin: 0;\n opacity: 0;\n height: 0;\n z-index: -1;\n transform: translate3d(-200px, 0, 0);\n }\n}\n\n@keyframes removeAnswers {\n 0% {\n opacity: 1;\n transform: translate3d(0, 0, 0);\n }\n 100% {\n padding: 0;\n opacity: 0;\n display: none;\n height: 0;\n z-index: -1;\n transform: translate3d(-200px, 0, 0);\n }\n}\n\n@keyframes removeQuestion {\n 0% {\n opacity: 1;\n transform: translateX(0);\n }\n 100% {\n opacity: 0;\n transform: translateX(-200px);\n }\n}\n\n@keyframes showNextQuestion {\n 0% {\n opacity: 0;\n transform: translateX(200px);\n }\n\n 100% {\n opacity: 1;\n transform: translateX(0);\n }\n}\n\n@keyframes expand {\n 0% {\n opacity: 0.8;\n transform: scale3d(1, 1, 1);\n box-shadow: 0 0 0px rgba(0,0,0,.3);\n }\n\n 40% {\n opacity: 1;\n }\n\n 70% {\n opacity: 1;\n transform: scale3d(1.1, 1.1, 1);\n box-shadow: 0 0 8px rgba(0,0,0,.4);\n }\n\n 100% {\n opacity: 1;\n transform: scale3d(1, 1, 1);\n box-shadow: 0 0 0px rgba(0,0,0,.3), inset 0 2px 0 rgba(0,0,0,.2);\n }\n}\n\n@keyframes checkmark {\n 0% {\n opacity: 0;\n transform: scale3d(0.2, 0.2, 1);\n }\n 5% {\n opacity: 1;\n }\n 10% {\n transform: scale3d(1.4, 1.4, 1);\n }\n 12% {\n transform: scale3d(1, 1, 1);\n }\n 90% {\n opacity: 1;\n transform: scale3d(1, 1, 1);\n }\n 92% {\n transform: scale3d(1.4, 1.4, 1);\n }\n 100% {\n opacity: 0;\n transform: scale3d(0.2, 0.2, 1);\n }\n\n}\n\n@keyframes fadeOut {\n 0% {\n opacity: 1;\n }\n 100% {\n opacity: 0;\n }\n}\n\n@keyframes fadeIn {\n 0% {\n opacity: 0;\n }\n 100% {\n opacity: 1;\n }\n}\n\n@keyframes navSlideIn {\n 0% {\n transform: translate3d(0, -200px, 0);\n }\n 100% {\n transform: translate3d(0, 0, 0);\n }\n}\n\n\n.spinner {\n margin: 0 auto;\n width: 70px;\n text-align: center;\n}\n\n.spinner > div {\n width: 18px;\n height: 18px;\n background-color: #333;\n\n border-radius: 100%;\n display: inline-block;\n -webkit-animation: sk-bouncedelay 1.4s infinite ease-in-out both;\n animation: sk-bouncedelay 1.4s infinite ease-in-out both;\n}\n\n.spinner .bounce1 {\n -webkit-animation-delay: -0.32s;\n animation-delay: -0.32s;\n}\n\n.spinner .bounce2 {\n -webkit-animation-delay: -0.16s;\n animation-delay: -0.16s;\n}\n\n@-webkit-keyframes sk-bouncedelay {\n 0%, 80%, 100% { -webkit-transform: scale(0) }\n 40% { -webkit-transform: scale(1.0) }\n}\n\n@keyframes sk-bouncedelay {\n 0%, 80%, 100% {\n -webkit-transform: scale(0);\n transform: scale(0);\n } 40% {\n -webkit-transform: scale(1.0);\n transform: scale(1.0);\n }\n}\n","#enp-quiz {\n transition: background .25s $fastInEaseOut;\n\n .enp-container {\n // @include container;\n }\n\n .enp-aside {\n @include well;\n @include container--thin;\n font-size: 1.2rem;\n }\n\n .enp-aside__title {\n @include small-uppercase;\n font-weight: 600;\n }\n\n .enp-page-title {\n border-bottom: 2px solid $blue;\n }\n}\n","\n\n// enter the root BEM class and this will output the correct CSS for you\n@mixin radio-block($rootBEM) {\n .#{$rootBEM}__legend {\n @include radio-block__legend ;\n }\n\n .#{$rootBEM}__input {\n @include radio-block__input ;\n }\n\n .#{$rootBEM}__label {\n @include radio-block__label ;\n }\n\n .#{$rootBEM}__input:checked + .#{$rootBEM}__label {\n @include radio-block__label--checked ;\n }\n\n .#{$rootBEM}__input:focus + .#{$rootBEM}__label {\n @include radio-block__label--focus ;\n }\n}\n\n@mixin radio-inline($rootBEM) {\n .#{$rootBEM}__legend {\n @include radio-inline__legend ;\n }\n\n .#{$rootBEM}__input {\n @include radio-inline__input ;\n }\n\n .#{$rootBEM}__label {\n @include radio-inline__label ;\n }\n\n .#{$rootBEM}__input:checked + .#{$rootBEM}__label {\n @include radio-inline__label--checked ;\n }\n\n .#{$rootBEM}__input:focus + .#{$rootBEM}__label {\n @include radio-inline__label--focus ;\n }\n\n}\n\n@mixin label {\n display: block;\n color: lighten($font, 10);\n font-weight: normal;\n font-size: 0.85rem;\n text-transform: uppercase;\n}\n\n@mixin legend {\n @include label;\n padding-top: 1.6rem;\n margin-bottom: 0.2rem;\n border: none;\n}\n\n@mixin label--bold {\n @include label;\n font-weight: 500;\n}\n\n@mixin legend--bold {\n @include label--bold;\n}\n\n@mixin input {\n font-size: 1rem;\n font-family: $fontBody;\n padding: 0.8rem 0.5rem;\n background: #fff;\n border: 1px solid #aaa;\n border-radius: 3px;\n width: 20rem;\n max-width: 100%;\n margin-bottom: 1.2rem;\n\n @include breakpoint(medium) {\n padding: 0.8rem;\n width: 100%;\n }\n}\n\n@mixin input--large {\n @include input;\n padding: 1rem 1.2rem;\n font-size: 1rem;\n}\n\n@mixin input--xl {\n @include input;\n font-weight: bold;\n font-size: 1.6rem;\n margin-bottom: 1rem;\n\n &::placeholder {\n font-weight: bold;\n }\n}\n\n@mixin textarea {\n @include input;\n line-height: 1.5;\n\n &:focus {\n @include focus--glow;\n }\n}\n\n\n/*\n@mixin no-radio__input {\n display: inline-block;\n width: 0;\n margin: 0;\n padding: 0;\n opacity: 0;\n overflow: hidden;\n}\n\n@mixin no-radio__label {\n display: inline-block;\n position: relative;\n left: -1rem;\n padding: .2rem .6rem;\n @include small-uppercase;\n font-size: .8rem;\n font-weight: normal;\n background: transparent;\n border-radius: 3px;\n transition: all .2s;\n}*/\n\n@mixin radio-block__legend {\n @include legend;\n margin-bottom: 0.6rem;\n}\n\n@mixin radio-block__input {\n position: absolute;\n z-index: 9;\n margin-left: 9px;\n}\n\n@mixin radio-block__label {\n text-transform: capitalize;\n background: #f2f2f2;\n display: block;\n padding: 5px 10px 5px 39px;\n position: relative;\n top: -6px;\n box-shadow: inset -1px -1px 0 rgba(0,0,0,.1), inset 30px 0px 0 rgba(255,255,255,.7), inset 31px 0px 0 rgba(0,0,0,.1);\n}\n\n@mixin radio-block__label--checked {\n background: $green;\n color: #fff;\n text-shadow: 0 0 1px rgba(0,0,0,.7);\n}\n\n@mixin radio-block__label--focus {\n z-index: 8;\n @include focus--glow ;\n}\n\n@mixin radio-inline__legend {\n @include legend;\n}\n\n@mixin radio-inline__input {\n @include screen-reader-text;\n}\n\n@mixin radio-inline__label {\n text-transform: capitalize;\n display: inline-block;\n padding: 0.2rem 0.5rem;\n border-radius: 3px;\n cursor: pointer;\n}\n\n@mixin radio-inline__label--checked {\n @include radio-block__label--checked ;\n}\n\n@mixin radio-inline__label--focus {\n @include radio-block__label--focus ;\n}\n\n@mixin select--wide--chevron {\n width: 100%;\n -webkit-appearance: none;\n -moz-appearance: none;\n appearance: none;\n font-size: 0.85rem;\n padding: 0.7rem 32px 0.7rem 0.8rem;\n border: 1px solid #bbb;\n border-radius: 3px;\n margin-bottom: 1.6rem;\n background: url(../svg/chevron-down.svg) 100% 50% no-repeat;\n background-color: #fff;\n box-shadow: inset -26px 0 0 rgba(0,0,0,.1);\n}\n\n\n#enp-quiz {\n\n fieldset {\n border: none;\n margin: 0;\n padding: 0;\n }\n\n .enp-label {\n @include label;\n &__sm {\n font-size: small;\n }\n }\n\n .enp-legend {\n @include legend;\n padding-top: 0;\n }\n\n .enp-input {\n @include input;\n &__sm {\n padding: 5px;\n margin-bottom: 5px;\n }\n &.enp-input--has-description {\n margin-bottom: 0.2rem;\n }\n }\n\n .enp-textarea-description,\n .enp-input-description {\n margin-bottom: 1rem;\n font-size: 0.85rem;\n }\n\n .enp-textarea-description--before,\n .enp-input-description--before {\n margin-bottom: 0;\n }\n\n .enp-input::placeholder,\n .enp-textarea::placeholder {\n font-family: $fontBody;\n font-weight: 300;\n color: lighten($font, 40);\n }\n\n .enp-textarea {\n @include textarea;\n\n &.enp-textarea--has-description {\n margin-bottom: 0.2rem;\n }\n &.enp-textarea--has-description--before {\n margin-bottom: 1.2rem;\n }\n }\n\n .enp-embed-code {\n @include textarea;\n padding: 1.6rem;\n font-size: 0.7rem;\n font-family: Monaco, Consolas, \"Andale Mono\", \"DejaVu Sans Mono\", monospace;\n\n @include media(max-medium) {\n padding: .8rem;\n }\n }\n}\n","#enp-quiz {\n // .enp-publish-page-container,\n // .enp-preview-page-container {\n // @include container--wide;\n // position: relative;\n // @include xpadding-vertical;\n // background: $really_light_gray;\n\n\n // }\n\n .enp-publish-page-container,\n .enp-quiz-form-container,\n .enp-preview-page-container {\n display: grid;\n grid-column: 2/-1;\n gap: 1rem;;\n width: 100%;\n justify-items: center;\n \n @include media(max-small) {\n padding-left: 8px;\n padding-right: 8px;\n }\n }\n // .enp-breadcrumb-link__container {\n // display: grid;\n // grid-column: 1/span 1;\n // justify-content: center;\n // align-items: flex-start;\n // @include xpadding-vertical;\n // }\n .enp-quiz-form {\n display: grid;\n padding-left: 0;\n padding-right: 0;\n @include breakpoint(medium) {\n width: 100%;\n max-width: 40rem;\n }\n }\n\n .enp-preview-page-flex-container {\n display: grid;\n gap: 1rem;\n\n @include breakpoint(medium) {\n grid-template-columns: 1fr 3fr;\n padding: 0 2rem;\n }\n }\n\n .enp-quiz-title__label {\n @include label--bold;\n }\n\n .enp-quiz-title__textarea {\n @include input--xl;\n }\n \n textarea {\n color: #000;\n }\n\n .enp-accordion-container {\n margin-bottom: 1.6rem;\n position: relative;\n }\n\n .enp-question-content {\n @include accordion;\n padding-top: 0;\n position: relative;\n }\n\n .enp-question-inner {\n padding: 1.6rem 1.6rem 1rem;\n\n @include breakpoint(medium) {\n padding-right: 2.8rem;\n padding-left: 2.9rem;\n }\n\n }\n\n .enp-question-title__label {\n @include label--bold;\n }\n\n .enp-question-title__textarea {\n @include input--large;\n }\n\n .enp-question-image-upload {\n @include btn--dashed--light--alt-bg;\n @include small-uppercase;\n position: relative;\n margin-bottom: 2rem;\n transform: translate3d(0, 0, 0);\n transition: all .3s $fastInEaseOut;\n\n .enp-question-image-upload__icon--photo {\n @include icon--xxxl;\n opacity: 0;\n position: absolute;\n top: 0;\n left: 0;\n right: 0;\n margin: 0 auto;\n transform: translate3d(0, 0, 0);\n z-index: -1;\n transition: opacity .2s, transform .3s $fastInEaseOut;\n }\n\n .enp-question-image-upload__icon--add {\n @include icon--circle--small;\n @include icon--gray-bg;\n margin-right: 5px;\n position: relative;\n top: 0.2rem;\n }\n\n &:hover,\n &:focus,\n &:active {\n padding-top: 5rem;\n padding-bottom: 2rem;\n\n .enp-question-image-upload__icon--photo {\n opacity: 1;\n z-index: 1;\n transform: translate3d(0, 1.75rem, 0);\n }\n\n .enp-question-image-upload__icon--add {\n @include icon--gray-bg--hover;\n }\n }\n }\n\n .enp-question-image__container {\n position: relative;\n margin-bottom: 1rem;\n }\n\n .enp-question-image {\n margin-bottom: 1.2rem;\n }\n\n @include radio-inline(enp-question-type);\n\n .enp-question-type__label {\n position: relative;\n z-index: 9;\n }\n\n .enp-slider-options,\n .enp-mc-options {\n margin-top: 0rem;\n display: none;\n animation: slideOutTop .25s $fastInEaseOut forwards;\n animation-delay: 0s, .05s;\n }\n\n .enp-question-type__input--slider:checked ~ .enp-slider-options,\n .enp-question-type__input--mc:checked ~ .enp-mc-options {\n visibility: visible;\n display: block;\n animation: fadeIn .45s $fastInEaseOut forwards;\n }\n\n .enp-mc-options__list {\n @include ul-no-style;\n }\n\n .enp-mc-option {\n position: relative;\n padding-left: 6px;\n\n @include breakpoint(medium) {\n padding-left: 0;\n }\n }\n\n .enp-mc-options__legend {\n @include legend--bold;\n }\n\n .enp-mc-option__add,\n .enp-mc-option__button--correct,\n .enp-mc-option__button--delete {\n display: none;\n }\n\n .enp-question-type__input--mc:checked ~ .enp-mc-options {\n .enp-mc-option__add,\n .enp-mc-option__button--correct,\n .enp-mc-option__button--delete {\n display: block;\n }\n }\n\n .enp-button__question-image-delete,\n .enp-mc-option__button--delete {\n @include btn--reset;\n position: absolute;\n top: 9px;\n right: -24px;\n fill: #bbb;\n cursor: pointer;\n\n @include breakpoint(medium) {\n right: -30px;\n }\n\n &:focus,\n &:hover {\n fill: $red;\n }\n }\n\n .enp-mc-option__button--correct {\n @include btn--reset;\n position: absolute;\n top: 8px;\n left: -24px;\n\n @include breakpoint(medium) {\n left: -35px;\n }\n\n .enp-mc-option__icon--correct {\n @include icon--circle--pad;\n width: 28px;\n height: 28px;\n fill: #fff;\n background: #fff;\n cursor: pointer;\n border: 2px solid $fade_red;\n transition: all .2s;\n }\n\n &:focus .enp-mc-option__icon--correct,\n &:hover .enp-mc-option__icon--correct {\n background: #fff;\n border-color: $green;\n fill: $green;\n }\n\n &:disabled {\n opacity: 1;\n\n .enp-mc-option__icon--correct {\n cursor: default;\n fill: #fff;\n border: 2px solid transparent;\n }\n }\n }\n\n .enp-mc-option--correct {\n .enp-mc-option__input {\n box-shadow: inset 0 0 3px $green;\n border: 1px solid $green;\n }\n\n .enp-mc-option__button--correct:focus .enp-mc-option__icon--correct,\n .enp-mc-option__button--correct:hover .enp-mc-option__icon--correct,\n .enp-mc-option__icon--correct {\n fill: #fff;\n border-color: $green;\n background: $green;\n }\n }\n\n .enp-mc-option__add {\n @include btn--dashed--light--alt-bg;\n @include small-uppercase;\n text-align: left;\n padding: 0.7rem 0.75rem 0.8rem;\n\n .enp-mc-option__add__icon {\n @include btn--icon__icon--circle--small ;\n @include icon--gray-bg;\n position: relative;\n top: 0.2rem;\n }\n\n &:hover .enp-mc-option__add__icon {\n @include icon--gray-bg--hover;\n }\n }\n\n .enp-slider-options .enp-input {\n max-width: 11.8rem;\n }\n\n .enp-slider-range__container .enp-input,\n .enp-slider-correct__container .enp-input {\n max-width: 8.8rem;\n @include breakpoint('small') {\n max-width: 11.8rem;\n }\n }\n\n .enp-slider-preview {\n border: 1px solid #ddd;\n margin-top: 0.2rem;\n margin-bottom: 1.6rem;\n padding: 1.6rem 1.6rem .6rem;\n position: relative;\n\n .enp-label--slider-preview {\n position: absolute;\n width: 100%;\n top: 0.2rem;\n left: 0.4rem;\n font-size: 0.75rem;\n text-transform: uppercase;\n }\n }\n\n .enp-slider-range__container,\n .enp-slider-correct__container {\n @include flex-spread;\n align-items: center;\n }\n\n .enp-slider-range__helper,\n .enp-slider-correct__helper {\n color: #777;\n font-size: 0.85rem;\n background: #fff;\n padding: 0 .3rem;\n position: relative;\n\n &:before {\n content: '';\n position: absolute;\n top: 44%;\n height: 4px;\n background: #ddd;\n width: 120px;\n left: -60px;\n z-index: -1;\n transition: width 0.7s $fastInEaseOut, background 1.6s $fastInEaseOut;\n }\n }\n\n .enp-slider-options {\n margin-bottom: 2rem;\n\n .enp-accordion-header {\n text-transform: uppercase;\n font-size: 0.85rem;\n padding: 0.675rem;\n }\n\n .enp-slider-advanced-options__content {\n border: none;\n box-shadow: none;\n padding-top: 1rem;\n padding-bottom: 0;\n margin-bottom: 0;\n }\n }\n\n .enp-slider-correct-high__container {\n position: relative;\n }\n\n .enp-slider-correct-high__input-container--hidden {\n display: none;\n }\n\n .enp-slider-correct__helper--hidden {\n &:before {\n width: 0;\n background: $green;\n }\n }\n\n .enp-slider-correct-answer-range--add-range {\n @include btn--dashed--light--alt-bg;\n margin-left: 0.8rem;\n font-size: 0.7rem;\n\n @include breakpoint('small') {\n font-size: 0.8rem;\n padding: .7rem;\n }\n\n @include breakpoint('medium') {\n padding: .7rem 1.2rem;\n min-width: 11.4rem;\n }\n\n .enp-slider-correct-answer-range__icon {\n @include btn--icon__icon--circle--small ;\n @include icon--gray-bg;\n position: relative;\n left: -0.2rem;\n }\n\n &:hover .enp-slider-correct-answer-range__icon {\n @include icon--gray-bg--hover;\n }\n }\n\n .enp-slider-correct-answer-range--remove-range {\n position: absolute;\n right: -1.6rem;\n bottom: 1.6rem;\n background: none;\n border: none;\n box-shadow: none;\n padding: 0 0.1rem;\n\n .enp-slider-correct-answer-range__icon {\n width: 1.2em;\n height: 1.2em;\n fill: $dark_gray;\n }\n\n &:hover,\n &:focus {\n .enp-slider-correct-answer-range__icon {\n fill: $red;\n }\n }\n\n @include breakpoint(medium) {\n top: -0.2rem;\n right: -0.2rem;\n bottom: auto;\n }\n\n }\n\n .enp-slider-options .enp-input:read-only {\n background: $light_gray;\n }\n\n .enp-answer-explanation {\n background: $light_blue;\n padding-top: 2rem;\n box-shadow: inset 1px 0px 0 #ccc, inset -1px -1px 0 #ccc, inset 0 1px 0 #ddd;\n }\n\n .enp-answer-explanation__label {\n @include label--bold;\n\n }\n\n .enp-question__button--delete {\n @include btn--reset;\n position: absolute;\n top: 9px;\n right: 9px;\n fill: #bbb;\n cursor: pointer;\n\n @include breakpoint(medium) {\n right: -30px;\n }\n\n &:hover {\n fill: $red;\n }\n }\n\n .enp-question__move {\n position: absolute;\n left: 15px;\n\n @include breakpoint(medium) {\n left: -40px;\n }\n }\n\n .enp-sort__placeholder {\n background: #ddd;\n height: 60px;\n width: 100%;\n max-height: 120px;\n margin-bottom: 1.6rem;\n }\n\n .ui-sortable .ui-sortable-helper {\n .ui-sortable-handle {\n cursor: move;\n cursor: grabbing;\n cursor: -webkit-grabbing;\n }\n }\n \n\n .enp-question__button--move {\n @include btn--reset;\n position: absolute;\n fill: #bbb;\n cursor: pointer;\n\n &:hover, &:focus {\n fill: #333;\n }\n\n &:disabled {\n opacity: 0.5;\n }\n }\n\n .enp-question__button--move--up {\n top: 0px;\n left: -9px;\n }\n\n\n .enp-question__button--move--down {\n top: 3px;\n right: -9px;\n }\n\n .enp-quiz-form__add-question {\n @include btn--icon;\n @include btn--dashed;\n padding-top: 1rem;\n padding-bottom: 1rem;\n margin-top: 1.6rem;\n margin-bottom: 2rem;\n\n .enp-add-question__icon {\n @include btn--icon__icon--circle--small;\n @include icon--normal;\n @include icon--gray-bg;\n position: relative;\n top: 0.2rem;\n }\n\n &:hover .enp-add-question__icon {\n @include icon--gray-bg--hover;\n }\n }\n\n .enp-btn--save__btns {\n @include flex;\n align-items: center;\n align-items: flex-start;\n }\n\n .enp-quiz-form__save {\n @include btn;\n width: 100%;\n margin-bottom: 1rem;\n opacity: 0.8;\n text-shadow: 0px -1px 2px rgba(0,0,0,.6);\n\n &:hover,\n &:focus {\n opacity: 1;\n }\n\n @include breakpoint(small) {\n padding: 1.2rem 1.8rem 1.1rem;\n width: 27%;\n margin-right: 3%;\n position: relative;\n }\n }\n\n .enp-quiz-form__save--reveal {\n animation: slideInTop--reduced-opacity .3s $fastInEaseOut;\n }\n\n @include btn--icon--circle(enp-btn--next-step);\n\n .enp-btn--next-step {\n // @include btn;\n width: 100%;\n padding: 1rem 1.4rem 1rem;\n\n @include breakpoint(medium) {\n padding: 1.2rem 1.8rem 1.1rem;\n }\n .enp-btn--next-step__icon {\n width: 1rem;\n height: 1rem;\n }\n // @include breakpoint(small) {\n // width: auto;\n // }\n\n /*\n * AFTER we have removed the Save button,\n * use this code to add the preview button into the\n * header\n @include media(max-medium) {\n padding: 1rem 1.4rem 1rem;\n }\n\n @include breakpoint(medium) {\n position: absolute;\n right: 20px;\n top: 10px;\n width: auto;\n z-index: 999999;\n\n &.enp-btn--next-step--fixed {\n position: fixed;\n animation: navSlideIn .25s;\n }\n }*/\n\n }\n\n .enp-btn--next-step--reveal {\n animation: slideInTop .3s $fastInEaseOut;\n }\n\n\n // UX interactions\n .enp-mc-option--inputs,\n .enp-accordion-header--inserting {\n animation: slideInBottom .4s $fastInEaseOut forwards;\n }\n\n .enp-mc-option--remove,\n .enp-question--remove,\n .enp-question__image--remove {\n animation: removeElement .5s $fastInEaseOut forwards;\n }\n\n .enp-image-upload-wait {\n @include btn--dashed--light--alt-bg;\n padding-top: 4rem;\n padding-bottom: 4rem;\n margin-bottom: 1rem;\n width: 100%;\n }\n\n // validation\n .enp-accordion-header.question-has-error {\n color: $red;\n box-shadow: 0 0 3px $red;\n }\n\n}\n\n.enp-quiz.ui-sortable--sorting #enp-quiz .enp-accordion-content {\n display: none;\n}","#enp-quiz {\n\n\n .enp-quiz-settings-container {\n\n @include breakpoint(large) {\n // margin: 0;\n // width: 40%;\n // float: left;\n }\n }\n\n .enp-quiz-preview-container {\n\n @include breakpoint(large) {\n // width: 60%;\n // float: left;\n }\n\n }\n\n .enp-quiz-share__legend,\n .enp-quiz-settings__title {\n position: relative;\n @include small-uppercase;\n font-weight: 600;\n padding-top: 0;\n }\n\n .enp-quiz-settings__form {\n margin-bottom: 3rem;\n overflow: visible;\n @include breakpoint(large) {\n padding: 0;\n margin-bottom: 0;\n }\n }\n\n .enp-fieldset {\n @include breakpoint(medium) {\n // this is necessary to keep the form elements visible on top of the\n // white BG on the sidebar. We can't set this on the whole form bc\n // then the publish button won't be positioned right\n position: relative;\n }\n }\n\n .enp-title-display__legend {\n padding-top: 0;\n\n @include breakpoint(medium) {\n padding-top: 0.4rem;\n }\n }\n\n .enp-quiz-share__input,\n .enp-quiz-styles__input {\n width: 100%;\n }\n\n .enp-quiz-styles__textarea--custom-css {\n font-family: Monaco,Consolas,\"Andale Mono\",\"DejaVu Sans Mono\",monospace;\n font-size: 0.9rem;\n min-height: 200px;\n }\n\n .enp-fieldset--section {\n padding: 1.6rem 1rem;\n\n &.enp-accordion-content--open {\n margin-bottom: 0;\n }\n }\n\n .enp-quiz-share--facebook {\n margin-bottom: 2rem;\n }\n\n @include radio-inline(enp-title-display);\n @include radio-inline(enp-mc-options-order);\n\n .enp-mc-options-order {\n margin-bottom: 1.6rem;\n }\n\n .enp-quiz-share__textarea {\n min-height: 7.6rem;\n margin-bottom: 2rem;\n\n @include breakpoint('medium') {\n min-height: 4.6rem;\n }\n\n @include breakpoint('large') {\n min-height: 7.6rem;\n }\n\n\n }\n\n .enp-preview-form__submit {\n margin-top: 1.6rem;\n margin-bottom: 1.6rem;\n }\n\n .enp-quiz-preview__title {\n @include small-uppercase;\n font-weight: 600;\n }\n\n .enp-preview-form__submit {\n @include btn;\n width: 100%;\n padding-top: 0.85rem;\n padding-bottom: 0.85rem;\n margin-bottom: 1rem;\n opacity: 0.8;\n text-shadow: 0px -1px 2px rgba(0,0,0,.6);\n\n &:hover,\n &:focus {\n opacity: 1;\n }\n }\n\n .enp-preview-form__submit--publish {\n width: 100%;\n position: relative;\n z-index: 99999999;\n padding: 1.05rem 1.8rem .95rem;\n }\n\n .enp-quiz-styles__iris-wrapper {\n position: relative;\n }\n\n // Fix for WP Color Picker formatting\n .iris-picker {\n box-sizing: content-box;\n position: relative;\n z-index: 9999999999;\n top: -1.2rem;\n margin-bottom: 1rem;\n padding-bottom: 3rem;\n padding-right: 30px;\n\n @include breakpoint(large) {\n position: absolute;\n top: -4px;\n left: 0;\n }\n\n &:last-of-type {\n margin-bottom: 0;\n }\n\n .ui-slider-handle:focus,\n .ui-draggable-handle:focus .ui-slider-handle {\n box-shadow: 0 0 3px rgba(0,0,0,.75);\n }\n\n }\n\n .enp-quiz-styles__set-default {\n @include btn--ghost;\n font-size: 0.75rem;\n position: absolute;\n left: 10px;\n bottom: 10px;\n }\n\n .enp-iris__close {\n @include btn--reset;\n position: absolute;\n top: 5px;\n right: 5px;\n fill: #888;\n cursor: pointer;\n }\n\n .enp-quiz-styles__input--color {\n padding-left: 45px;\n }\n\n .enp-quiz-styles__color-demo {\n width: 30px;\n height: 30px;\n border: 1px solid #ccc;\n top: 8px;\n left: 8px;\n border-radius: 3px;\n\n position: absolute;\n }\n\n\n}\n","#enp-quiz {\n /* Removing flexbox layout temporarily\n * because it wasn't laying out correctly before content loading\n * It would snap into the correct layout after a resize or textarea highlight\n .enp-publish-page-container {\n &:before {\n @include breakpoint(medium) {\n position: absolute;\n top: 0;\n bottom: 0;\n left: -100%;\n width: 128%;\n content: '';\n background: #fff;\n border-right: 1px solid #ddd;\n }\n\n @include breakpoint(large) {\n width: 124%;\n }\n }\n\n .enp-quiz-message {\n @include breakpoint(medium) {\n margin-left: 33%;\n }\n\n @include breakpoint(large) {\n margin-left: 26%;\n }\n }\n }\n\n .enp-publish-page-flex-container {\n @include breakpoint(medium) {\n @include flex;\n align-items: stretch;\n flex-direction: row-reverse;\n }\n }\n\n .enp-publish-page__aside-container {\n\n @include breakpoint(medium) {\n position: relative;\n margin: 0 6% 0 0;\n padding: 0;\n width: 24%;\n }\n\n @include breakpoint(large) {\n margin: 0;\n //padding-left: 20px;\n width: 20%;\n }\n }\n\n .enp-share-quiz__container,\n .enp-ab-ad__container {\n @include breakpoint(medium) {\n padding: 0;\n border: none;\n }\n }\n */\n\n .enp-share-quiz__url {\n display: block;\n font-size: 1.5rem;\n line-height: 1.4;\n word-wrap: break-word;\n }\n\n @include share_icons(enp-share-quiz);\n\n .enp-share-quiz {\n justify-content: space-around;\n margin-bottom: 0;\n }\n}\n","#enp-quiz {\n .enp-ab-create__container {\n @include container--wide;\n width: 100%;\n background: $really_light_gray;\n padding-top: 3rem;\n padding-bottom: 3rem;\n }\n\n .enp-ab-create__form {\n @include container--thin;\n }\n\n .enp-ab-create__label {\n @include label--bold;\n }\n\n .enp-ab-create-title__textarea {\n @include input--xl;\n width: 100%;\n }\n\n .enp-ab-create__select {\n @include select--wide--chevron;\n }\n\n .enp-ab-create__submit {\n width: 100%;\n padding-top: 1em;\n padding-bottom: 1em;\n }\n}\n","// TEMP for dev theme\n#headerimg h1 {\n text-align: center;\n font-size: 40px !important;\n}\n#enp-quiz {\n\n &.enp-quiz__main {\n @include container;\n display: grid;\n gap: 1em;\n min-height: 85vh;\n \n @include breakpoint(large) {\n @include container--wide;\n grid-template-columns: 1fr 4fr;\n }\n }\n\n .enp-dash-container {\n @include xpadding-vertical;\n @include xpadding-horizontal;\n transition: all .25s $fastInEaseOut;\n }\n\n .enp-dash__section-aside {\n background-color: $background;\n @include breakpoint(medium) {\n @include xpadding-vertical;\n @include xpadding-horizontal;\n }\n }\n\n .enp-breadcrumb-link__container {\n padding-bottom: 2rem;\n }\n\n .enp-search-quizzes {\n display: flex;\n justify-content: space-between;\n flex-wrap: wrap;\n padding: 1em;\n\n @include breakpoint(medium) {\n padding: 0.2rem 0.8rem;\n flex-wrap: nowrap;\n }\n @include breakpoint(large) {\n @include flex-spread-vertical;\n }\n }\n\n .enp-search-quizzes__form-item {\n margin-bottom: 0.6rem;\n flex: 0 1 48%;\n\n @include breakpoint(small) {\n margin-bottom: 0;\n margin-right: 1rem;\n flex: 1 0 auto;\n }\n\n }\n\n .enp-quiz-search {\n flex: 1 0 100%;\n position: relative;\n @include breakpoint(medium) {\n flex: 1 0 auto;\n }\n }\n\n .enp-search-quizzes__label {\n margin-bottom: 0;\n @include screen-reader-text ;\n }\n\n .enp-search-quizzes__select {\n padding: .3rem;\n border-radius: 3px;\n width: 100%;\n @include breakpoint(large) {\n min-width: 200px;\n }\n }\n\n .enp-quiz-search__input {\n width: 100%;\n margin: 0 0 0.1rem;\n padding: .3rem .3rem .3rem 26px;\n font-size: 0.85rem;\n @include breakpoint(medium) {\n max-width: 200px;\n }\n }\n\n .enp-quiz-search__icon {\n position: absolute;\n bottom: 0.3rem;\n left: 0.2rem;\n width: 21px;\n height: 21px;\n }\n\n .enp-search-quizzes__button {\n padding: 0.2rem 0.8rem;\n }\n\n .enp-search-results-description {\n font-size: 0.85rem;\n }\n\n .enp-search-results-description__link {\n white-space: nowrap;\n }\n\n .enp-search-results-description__icon {\n width: 1.3em;\n height: 1.3em;\n position: relative;\n top: 4px;\n left: 2px;\n }\n\n .enp-dash__section-title {\n @include small-uppercase;\n margin-bottom: 0.325rem;\n border-bottom: 1px solid $dark-gray;\n }\n\n .enp-dash__ab-test-helper--not-enough-quizzes {\n color: $darker-gray;\n }\n\n .enp-view-toggle {\n cursor: pointer;\n opacity: .5;\n display: none; // hide the buttons for small screens\n\n @include breakpoint(medium) {\n display: flex;\n }\n }\n\n .enp-view-toggle__active {\n opacity: 1;\n }\n\n .enp-sort-by {\n margin-left: 5px;\n }\n\n .enp-dash-list {\n @include flex-grid;\n }\n\n .enp-dash-item {\n @include flex-grid__item ;\n @include flex-spread-vertical;\n display: flex;\n z-index: 1;\n flex-direction: column;\n align-content: flex-end;\n justify-content: flex-end;\n border: none;\n border-radius: 3px;\n background-color: $gray;\n }\n\n .enp-dash-item--published {\n box-shadow: inset 4px 0 0 $blue, 0 1px 0 rgba(0,0,0,.1);\n }\n\n .enp-dash-item--draft {\n box-shadow: inset 4px 0 0 $blue, 0 1px 0 rgba(0,0,0,.1);\n }\n\n .enp-dash-item--remove {\n animation: removeElement .5s $fastInEaseOut forwards;\n }\n\n .enp-dash-list--list-view {\n .enp-dash-item {\n margin: 0 0 0.8rem;\n flex-basis: 100%;\n }\n }\n\n .enp-dash-item__spinner {\n @include flex-center ;\n position: absolute;\n top: 0;\n bottom: 0;\n left: 0;\n right: 0;\n background: rgba(245,216,216,0.8);\n width: 100%;\n animation: fadeIn .3s $fastInEaseOut;\n }\n\n .enp-dash-item__header {\n padding: 0.5rem 1rem;\n background: $light_gray;\n border-bottom: 1px solid $dark_gray;\n display: flex;\n justify-content: space-between;\n align-items: center;\n @include border-radius;\n }\n\n .enp-dash-item__title {\n @include flex-grid__title ;\n padding: 0;\n margin-bottom: 0;\n a {\n color: $blue;\n }\n }\n\n .enp-dash-item__content {\n padding: 0rem 0 0.375rem;\n position: relative;\n transition: all .2s $fastInEaseOut;\n }\n\n .enp-dash-item__meta {\n @include hint;\n font-size: 0.75rem;\n }\n\n .enp-dash-item__username {\n word-wrap: break-word;\n padding-left: 0.4rem;\n margin-left: 0.2rem;\n border-left: 1px solid #ddd;\n }\n\n .enp-dash-item__title--ab-test {\n padding-bottom: 0;\n }\n\n .enp-dash-item__ab-quizzes {\n @include ul-no-style;\n font-size: 0.85rem;\n color: $dark_gray;\n margin-bottom: 0.8rem;\n }\n\n .enp-dash-item__nav {\n @include ul-no-style;\n margin-bottom: 0;\n font-size: 0.85rem;\n }\n\n .enp-dash-item__nav__item {\n display: flex;\n margin: 0;\n width: 100%;\n align-items: center;\n &:hover {\n background-color: $gray;\n .enp-dash-item__icon {\n fill: $red;\n }\n }\n a {\n font-weight: normal;\n color: $darker_gray;\n @include flex;\n align-items: center;\n width: 100%;\n padding: 12px;\n &:focus,\n &:hover {\n color: $red;\n outline: 1px dotted $link;\n outline-offset: 1px;\n }\n }\n }\n .enp-delete-quiz {\n width: 100%;\n &:hover {\n .enp-dash-item__delete {\n color: $red;\n }\n .enp-icon {\n fill: $red;\n }\n }\n }\n .enp-dash-item__delete {\n @include btn--reset;\n @include flex;\n padding: 12px;\n align-items: center;\n position: relative;\n line-height: 1.6;\n color: $darker_gray;\n cursor: pointer;\n width: 100%;\n .enp-icon {\n fill: $darker_gray;\n }\n }\n .enp-dash-item__icon {\n fill: $darker_gray;\n width: 15px;\n height: 15px;\n margin-right: 10px;\n }\n\n .enp-dash-item__nav--collapsible {\n display: none;\n position: absolute;\n z-index: 2;\n top: 44px;\n right: -17px;\n width: 195px;\n background-color: #fff;\n text-align: left;\n transform: translate3d(0,0,0);\n transition: all .2s $fastInEaseOut;\n\n .enp-dash-item__nav__item {\n cursor: pointer;\n }\n }\n\n .enp-dash-item__menu-action {\n height: 24px;\n background: none;\n border: none;\n color: #444;\n padding: 0;\n bottom: 0.2rem;\n right: 1.5rem;\n top: 1.5rem;\n cursor: pointer;\n }\n\n .enp-dash-item__menu-action-wrap {\n max-width: 0;\n display: flex;\n flex-direction: column;\n align-items: flex-end;\n }\n\n .enp-dash-item__menu-action__icon {\n width: 15px;\n height: 15px;\n fill: $darker_gray;\n transition: all .3s $fastInEaseOut;\n }\n\n .enp-dash-item__menu-action__icon--bottom {\n \n }\n\n .enp-dash-item--menu-active {\n transform: translate3d(0,-3px,0);\n z-index: 2;\n .enp-dash-item__nav-wrap {\n position: relative;\n }\n\n &.enp-dash-item--published {\n box-shadow: inset 4px 0 0 $green, 0 2px 2px rgba(0,0,0,.2);\n }\n\n &.enp-dash-item--draft {\n box-shadow: inset 4px 0 0 lighten($green, 25%), 0 2px 2px rgba(0,0,0,.2);\n }\n\n .enp-dash-item__menu-action__icon--bottom {\n transform: rotateX(180deg);\n }\n\n .enp-dash-item__nav--collapsible {\n display: block;\n animation: slideInTop .25s $fastInEaseOut forwards;\n @include border-radius;\n @include box-shadow;\n }\n\n .enp-dash-item__content {\n opacity: 0.4;\n }\n\n }\n\n\n .enp-quiz-results {\n display: flex;\n justify-content: space-around;\n list-style: none;\n margin: 0.8rem 0 0;\n padding: 0;\n text-align: center;\n }\n\n .enp-quiz-results__item {\n\n margin: 0 2% 0 0;\n padding: 0;\n color: #454545;\n\n @media (max-width:280px) {\n width: 100%;\n padding: 0;\n margin-bottom: 0.6rem;\n }\n }\n\n .enp-quiz-results__number {\n font-size: 1.6rem;\n line-height: 1;\n position: relative;\n }\n\n .enp-dash-item--draft .enp-quiz-results__number {\n opacity: 0.5;\n }\n\n .enp-quiz-results__number--average-score {\n color: darken($green, 8);\n\n &:after {\n content: '%';\n font-size: .9rem;\n position: absolute;\n top: .3rem;\n right: -1rem;\n }\n }\n\n .enp-quiz-results__label {\n text-transform: uppercase;\n font-size: .7rem;\n font-weight: 300;\n color: #888;\n }\n\n\n .enp-quiz-list__view {\n // @include flex-bottom;\n }\n\n .enp-dash-item--add-new__wrap {\n display: grid;\n gap: 1em;\n grid-template-columns: 1fr 1fr;\n }\n\n .enp-dash-list--quiz__container {\n display: grid;\n gap: 1em;\n @include breakpoint(large) {\n grid-template-columns: 1fr 1fr;\n }\n }\n\n .enp-dash-item--add-new {\n background: none;\n border: none;\n padding: 0;\n position: relative;\n @include header-space;\n }\n\n .enp-dash-link--add-new {\n @include btn--dashed--light;\n justify-content: flex-start;\n color: $link;\n padding: 1rem 1.2rem;\n\n\n @include breakpoint(medium) {\n @include small-uppercase;\n @include flex-center;\n flex-direction: column;\n position: absolute;\n top: 0;\n left: 0;\n right: 0;\n bottom: 0;\n }\n\n .enp-dash-link__icon {\n @include icon--circle;\n @include icon--normal;\n margin-right: 5px;\n background-color: $dark_blue;\n\n @include breakpoint(medium) {\n width: 2rem;\n height: 2rem;\n margin: 0.8rem 0 0.2rem;\n }\n }\n\n &:hover {\n color: $link_hover;\n\n .enp-dash-link__icon {\n fill: #fff;\n background: $link_hover;\n }\n }\n\n }\n\n .enp-quiz-message--welcome p {\n color: $font;\n }\n\n // pagination\n .enp-paginate {\n @include ul-no-style ;\n @include flex-center ;\n font-size: 1rem;\n }\n\n .enp-paginate__link {\n @include flex-center ;\n margin: 0 0.2rem;\n padding: 0 0.4rem;\n border-radius: 3px;\n font-weight: normal;\n\n }\n\n .enp-paginate__link--current-page {\n border: 2px solid $blue;\n }\n\n .enp-paginate__item--last-page,\n .enp-paginate__item--first-page {\n display: flex;\n }\n\n .enp-paginate__item--first-page:after,\n .enp-paginate__item--last-page:before {\n content: '...';\n font-size: 1rem;\n position: relative;\n bottom: 0.2rem;\n opacity: 0.6;\n }\n\n .enp-paginate__item--no-gap {\n &:before,\n &:after {\n content:'';\n }\n }\n\n .enp-paginate__item--next-page {\n margin-left: 0.2rem;\n }\n\n .enp-paginate__item--previous-page {\n margin-right: 0.2rem;\n }\n}\n","#enp-quiz {\n .enp-quiz-breadcrumbs {\n grid-row: 1;\n // @include flex-center;\n // position: absolute;\n // top: 0;\n // width: 1000%;\n // left: -500%;\n // right: -500%;\n // margin-left: auto;\n // margin-right: auto;\n // background: #fff;\n // border-bottom: 1px solid #ddd;\n // padding: 10px;\n // z-index: 99999;\n }\n\n .enp-quiz-breadcrumbs__list {\n @include flex-inline;\n }\n\n .enp-quiz-breadcrumbs__item {\n @include flex-inline__item ;\n @include flex-center;\n fill: $link;\n margin-right: 5px;\n\n @include breakpoint(small) {\n margin-right: 10px;\n }\n }\n\n .enp-quiz-breadcrumbs__link--disabled {\n @include disabled;\n }\n\n .enp-quiz-breadcrumbs__link--active {\n @include btn--ghost;\n @include btn--thin;\n }\n\n .enp-quiz-breadcrumbs__link {\n font-size: 1rem;\n font-weight: 400;\n text-transform: none;\n letter-spacing: 0;\n }\n\n // JS\n .enp-quiz-breadcrumbs--fixed {\n top: 0;\n position: fixed;\n animation: navSlideIn .25s;\n }\n}\n","#enp-quiz {\n .enp-results-title {\n font-size: 1.6rem;\n text-align: center;\n padding: 3.2rem 20px 2.6rem;\n background: $really_light_gray;\n margin: -1.2rem 0 2rem;\n border-bottom: 1px solid #ddd;\n\n &:after {\n @include small-uppercase;\n display: block;\n content: \"RESULTS\";\n font-weight: normal;\n }\n }\n\n .enp-results__container {\n @include container--wide;\n display: block;\n\n @include breakpoint(large) {\n display: flex;\n @include flex-spread;\n }\n }\n\n .enp-results__container,\n .enp-quiz-scores__container,\n .enp-results-flow__container {\n @include media(max-medium) {\n padding: 8px;\n }\n }\n\n .enp-quiz-scores__container,\n .enp-results-flow__container {\n width: 100%;\n\n @include breakpoint(large) {\n width: 48%;\n }\n }\n\n .enp-quiz-scores {\n margin-top: 2.6rem;\n }\n\n .enp-quiz-score__line-chart {\n height: 300px;\n margin-bottom: 1rem;\n\n .ct-label {\n color: $font;\n }\n\n .ct-grid {\n stroke: #dadada;\n stroke-dasharray: 0;\n }\n\n .ct-line {\n stroke: $green;\n stroke-width: 2px;\n }\n\n .ct-point {\n stroke: $green;\n stroke-width: 8px;\n }\n }\n\n .enp-quiz-scores-table {\n width: 100%;\n max-width: 500px;\n margin: 0 auto;\n\n tr th {\n background-color: #fff;\n }\n }\n\n .enp-quiz-scores-table__label {\n padding-left: 5%;\n }\n\n .enp-quiz-scores-table__score {\n text-align: right;\n padding-right: 5%;\n }\n\n .enp-results-flow {\n position: relative;\n margin: 2rem auto;\n width: 320px;\n height: 320px;\n border-radius: 50%;\n\n @include media(300px) {\n left: -100px;\n }\n\n @include breakpoint(small) {\n width: 390px;\n height: 390px;\n }\n\n @include breakpoint(medium) {\n width: 450px;\n height: 450px;\n }\n\n @include breakpoint(large) {\n width: 400px;\n height: 400px;\n }\n\n }\n\n .enp-results-flow__section-title {\n @include screen-reader-text;\n }\n\n .enp-results-flow__item {\n border-radius: 50%;\n text-align: center;\n height: 100%;\n width: 100%;\n margin: 0 auto;\n left: 0;\n right: 0;\n padding: 12.5% 0 0;\n letter-spacing: 0.05rem;\n border: 2px solid $green;\n animation: 0.85s slideInBottom $fastInEaseOut forwards;\n }\n\n .enp-results-flow__item--total-views {\n background: #fff;\n }\n\n .enp-results-flow__item--quiz-starts {\n width: 65%;\n height: 65%;\n position: absolute;\n padding-top: 8%;\n bottom: 2.5%;\n background: lighten($green, 48);\n }\n\n .enp-results-flow__item--quiz-finishes {\n width: 35%;\n height: 35%;\n position: absolute;\n bottom: 5%;\n background: lighten($green, 35);\n }\n\n .enp-results-flow__title {\n @include small-uppercase;\n color: #444;\n font-size: .7rem;\n margin-bottom: 0px;\n\n @include breakpoint(medium) {\n font-weight: bold;\n margin-bottom: 2px;\n }\n }\n\n .enp-results-flow__number {\n font-weight: bold;\n font-size: 1.4rem;\n line-height: 1.2;\n }\n\n .enp-results-flow__number--total-views {\n font-size: 2rem;\n }\n\n .enp-results-flow__number--quiz-starts {\n font-size: 1.65rem;\n }\n\n .enp-results-flow__percentage {\n font-size: .8rem;\n font-weight: normal;\n position: relative;\n display: inline-block;\n top: -0.7em;\n left: -.1rem;\n color: #444;\n\n &:after {\n content: '%';\n position: absolute;\n right: -0.75rem;\n font-size: .7rem;\n color: #444;\n }\n }\n\n .enp-results-questions__section {\n // @include section--alt;\n padding-top: 5rem;\n padding-bottom: 3rem;\n margin-top: 5rem;\n margin-bottom: 3rem;\n @include breakpoint(medium) {\n @include xmargin-horizontal;\n }\n }\n\n .enp-results-questions__container {\n @include media(max-small) {\n padding-left: 8px;\n padding-right: 8px;\n }\n }\n\n .enp-results-questions__header {\n align-items: flex-start;\n flex-direction: column;\n\n @include breakpoint(small) {\n @include flex-spread;\n flex-direction: row;\n align-items: flex-end;\n }\n }\n\n .enp-results-questions__title {\n @include small-uppercase;\n }\n\n .enp-results-questions__key {\n @include small-uppercase;\n }\n\n .enp-results-questions {\n @include ul-no-style;\n }\n\n .enp-results-question {\n width: 100%;\n font-size: 1rem;\n padding: 0;\n margin-bottom: 1rem;\n }\n\n .enp-results-question__header {\n padding: 1rem 1.2rem;\n position: relative;\n }\n\n .enp-results-question__question,\n .enp-results-question__stats {\n font-size: 1rem;\n line-height: 1.4;\n }\n\n .enp-results-question__question {\n font-weight: normal;\n\n @include breakpoint(small) {\n padding-right: 7em;\n margin-bottom: 0;\n }\n }\n\n .enp-results-question__stats {\n font-size: .9rem;\n\n @include breakpoint(small) {\n position: absolute;\n bottom: 1rem;\n right: 1.2rem;\n text-align: right;\n }\n }\n\n .enp-results-questions__key,\n .enp-results-question__stats {\n font-weight: 300;\n }\n\n .enp-results-question__content {\n padding: 2rem 1.2rem 1.2rem;\n @include border-radius;\n }\n\n .enp-results-question__deep-stats {\n @include flex-spread-around;\n @include ul-no-style;\n text-align: center;\n\n @include media(500px) {\n flex-wrap: wrap;\n }\n }\n\n .enp-results-question__deep-stat {\n\n @include media(500px) {\n width: 48%;\n margin: 0 2% 2% 0;\n padding: 1.6rem 0;\n\n &:nth-child(even) {\n margin-right: 0;\n }\n }\n\n @include media(280px) {\n width: 100%;\n padding: 0;\n margin-bottom: 1.6rem;\n }\n }\n\n .enp-results-question__deep-stat__number {\n font-size: 1.8rem;\n line-height: 1;\n position: relative;\n }\n\n .enp-results-question__deep-stat__number--finishes,\n .enp-results-question__deep-stat__number--correct {\n @include dark-green;\n }\n\n .enp-results-question__deep-stat__number--incorrect {\n @include fade-red;\n }\n\n .enp-results-question__deep-stat__number--correct,\n .enp-results-question__deep-stat__number--incorrect,\n .enp-results-question__deep-stat__number--finishes {\n &:after {\n content: '%';\n font-size: .9rem;\n position: absolute;\n top: .3rem;\n right: -1rem;\n }\n }\n\n .enp-results-question__deep-stat__label {\n @include small-uppercase;\n font-size: .8rem;\n }\n\n .enp-results-question__options {\n @include ul-no-style;\n margin-bottom: 0;\n }\n\n .enp-results-question__option {\n padding: 0.8rem 0.8rem 0.8rem 0.4rem;\n border-top: 1px solid #ddd;\n @include media(max-small) {\n position: relative;\n flex-direction: column;\n }\n\n @include breakpoint(small) {\n @include flex-spread;\n flex-direction: row;\n }\n\n &:first-of-type {\n margin-top: 1.4rem;\n }\n\n }\n\n .enp-results-question__option--correct {\n background: lighten($green, 48);\n }\n\n .enp-results-question__option__text {\n flex-grow: 100;\n margin-right: 1rem;\n }\n\n .enp-results-question__option__text__helper {\n font-weight: 300;\n @include small-uppercase;\n margin-right: 0.4rem;\n }\n\n .enp-results-question__option__icon {\n @include media(max-small) {\n position: relative;\n left: -3px;\n }\n\n @include breakpoint(small) {\n margin-right: 0.3rem;\n min-width: 1.6rem;\n }\n }\n\n .enp-results-question__option__icon--incorrect {\n fill: $fade_red;\n opacity: 0.5;\n }\n\n .enp-results-question__option__icon--correct {\n fill: $dark_green;\n opacity: 1;\n }\n\n .enp-results-question__option__percentage--incorrect {\n @include fade-red;\n }\n\n .enp-results-question__option__percentage--correct {\n @include dark-green;\n }\n\n .enp-results-question__option__number-selected {\n font-weight: 300;\n\n @include media(max-small) {\n position: absolute;\n top: 0.8rem;\n right: 0.8rem;\n }\n }\n\n .enp-slider-responses__title {\n @include small-uppercase;\n font-weight: 400;\n margin-top: 1.6rem;\n }\n\n .enp-slider-responses__line-chart {\n .ct-point {\n stroke-width: 8px;\n }\n }\n\n .enp-slider-responses__line-chart--low,\n .enp-slider-responses__line-chart--high {\n stroke: $red;\n }\n\n .enp-slider-responses__line-chart--correct {\n stroke: $green;\n }\n\n .enp-slider-responses-table {\n width: 100%;\n }\n\n .enp-slider-responses-table tr:nth-child(even) td {\n background-color: #fff;\n }\n\n .enp-slider-responses-table tr.enp-slider-responses-table__response--correct td {\n background-color: lighten($green, 48);\n }\n\n .enp-slider-responses-table__content {\n box-shadow: none;\n padding-top: 1rem;\n }\n\n .enp-slider-responses-table--hide-zero {\n .enp-slider-responses-table__frequency--zero {\n display: none;\n }\n }\n\n .enp-slider-responses-table__response-frequency {\n @include flex-spread ;\n align-items: center;\n }\n\n .enp-slider-responses-table__toggle-zero-frequency {\n @include accordion__header ;\n width: auto;\n padding: 0 0.6rem;\n margin: 0;\n }\n\n\n\n}\n\n.enp-quiz-results {\n #enp-quiz .enp-aside {\n border: none;\n }\n\n .enp-results-questions__title__quiz-title {\n @include screen-reader-text;\n }\n}\n","#enp-quiz {\n\n .enp-results--ab {\n display: block;\n margin-bottom: 3rem;\n\n @include breakpoint(large) {\n display: flex;\n flex-wrap: wrap;\n align-content: flex-end;\n width: 50%;\n padding: 10px;\n }\n\n }\n\n .enp-results--a {\n @include breakpoint(large) {\n padding-right: 1rem;\n border-right: 1px solid #ddd;\n }\n }\n\n .enp-results--b {\n @include breakpoint(large) {\n padding-left: 1rem;\n }\n }\n\n .enp-results-title--ab,\n .enp-results__container--ab .enp-results-flow__container {\n min-width: 100%;\n }\n\n .enp-results--loser {\n .enp-results-flow__item {\n border: 2px solid $red;\n }\n\n .enp-results-flow__item--quiz-starts {\n background: lighten($red, 42);\n }\n\n .enp-results-flow__item--quiz-finishes {\n background: lighten($red, 34);\n }\n\n th,\n .enp-results-questions__title {\n color: $dark_red;\n }\n\n }\n\n .enp-results--winner {\n th,\n .enp-results-questions__title {\n color: $dark_green;\n }\n\n }\n\n .enp-results-title--a,\n .enp-results-title--b {\n background: transparent;\n }\n\n .enp-ab-scores {\n @include container--wide;\n\n th.enp-quiz-scores-table__label,\n th.enp-quiz-scores-table__score {\n padding-left: 0;\n padding-right: 0;\n }\n }\n\n .enp-ab-scores__title {\n padding-left: 50px;\n @include small-uppercase;\n }\n\n .enp-quiz-score__line-chart .enp-test-loser {\n\n .ct-line,\n .ct-point {\n stroke: $red;\n }\n }\n\n .enp-quiz-scores {\n margin-top: 0;\n }\n\n .enp-question-results,\n .enp-ab-scores .enp-quiz-scores-table {\n margin-bottom: 1.6rem;\n\n @include breakpoint(large) {\n float: left;\n width: 48%;\n margin: 0;\n\n &:first-of-type {\n margin-right: 4%;\n }\n }\n }\n\n .enp-question-results__container {\n @include container--wide;\n }\n\n .enp-question-results--ab {\n\n .enp-results-questions__section {\n background: #fff;\n border: none;\n padding: 1.6rem 0;\n margin: 1.6rem auto;\n }\n\n .enp-results-questions__container {\n padding: 0;\n }\n\n }\n\n .enp-ab-new-embed-code__section {\n @include container--thin;\n max-width: 540px;\n padding-bottom: 2rem;\n margin-bottom: 2rem;\n\n .enp-ab-embed-code {\n padding: 0;\n margin: 0;\n }\n }\n\n .enp-ab-embed-code__section {\n @include section--alt;\n padding-top: 5rem;\n margin-top: 5rem;\n }\n\n .enp-ab-embed-code {\n @include container;\n }\n\n .enp-ab-embed-code__title {\n @include small-uppercase;\n }\n\n .enp-embed-code__textarea {\n margin-bottom: 0;\n }\n\n .enp-embed-code__instructions {\n font-size: 1.1rem;\n }\n}\n","#enp-quiz {\n\n .enp-slider {\n margin-bottom: 1.6rem;\n }\n\n .enp-slider-input__container {\n display: flex;\n align-items: center;\n justify-content: center;\n margin: 1.6rem auto;\n position: relative;\n }\n\n .enp-slider-input__label {\n @include label;\n }\n\n .enp-slider-input__prefix,\n .enp-slider-input__suffix {\n font-size: 1rem;\n }\n\n .enp-slider-input__prefix {\n margin-right: .2rem;\n white-space: pre;\n }\n\n .enp-slider-input__suffix {\n margin-left: .2rem;\n white-space: pre;\n }\n\n .enp-slider-input__input {\n @include input;\n margin-bottom: 0;\n padding: .75rem;\n width: auto;\n transition: all .25s $fastInEaseOut;\n }\n\n .enp-slider-input__input--incorrect {\n color: $red;\n }\n\n .enp-slider-input__input--correct {\n color: $dark_green;\n }\n\n .enp-slider-input__input--invalid-animation {\n box-shadow: 0 0 2px 1px $fade_red;\n }\n\n .enp-slider_input__range-helper {\n position: absolute;\n bottom: -1.2rem;\n font-size: 0.8rem;\n }\n\n .enp-slider_input__range-helper--low {\n left: 0;\n }\n\n .enp-slider_input__range-helper--high {\n right: 0;\n }\n\n .enp-slider-input__range-helper__number {\n position: relative;\n color: $dark_gray;\n }\n\n .enp-slider_input__range-helper__number--low {\n\n }\n\n .enp-slider_input__range-helper__number--high {\n\n }\n\n .ui-slider-range-show-correct__tooltip-container {\n position: relative;\n }\n\n .ui-slider-range-show-correct__tooltip {\n position: absolute;\n top: -0.4rem;\n margin-left: -0.55rem;\n height: 1rem;\n width: 1.1rem;\n height: 1.1rem;\n border: 2px solid $green;\n background-color: #fff;\n border-radius: 50%;\n z-index: 9999;\n }\n\n .ui-slider-range-show-correct__tooltip--low {\n left: 0;\n }\n\n .ui-slider-range-show-correct__tooltip--high {\n right: -0.55rem;\n }\n\n .ui-slider-range-show-correct__tooltip__text {\n position: relative;\n color: darken($green, 15);\n top: -1.35rem;\n font-size: .825rem;\n min-width: 100%;\n display: inline-block;\n text-align: center;\n text-shadow: 0 1px 0 #fff;\n }\n\n .ui-slider-range-show-correct__tooltip__text--low {\n\n }\n\n .ui-slider-range-show-correct__tooltip__text--high {\n\n }\n\n .ui-slider-range-show-correct__tooltip__text--low-center {\n //left: 0; // not perfectly centered for huge numbers, but is for small numbers\n }\n\n // JQUERY SLIDER\n .enp-slider {\n\t\tposition: relative;\n\t\ttext-align: left;\n\t\tbackground: #ddd;\n\n\t\t/* Layout helpers\n\t\t----------------------------------*/\n\t\t.ui-helper-hidden {\n\t\t\tdisplay: none;\n\t\t}\n\t\t.ui-helper-hidden-accessible {\n\t\t\tborder: 0;\n\t\t\tclip: rect(0 0 0 0);\n\t\t\theight: 1px;\n\t\t\tmargin: -1px;\n\t\t\toverflow: hidden;\n\t\t\tpadding: 0;\n\t\t\tposition: absolute;\n\t\t\twidth: 1px;\n\t\t}\n\t\t.ui-helper-reset {\n\t\t\tmargin: 0;\n\t\t\tpadding: 0;\n\t\t\tborder: 0;\n\t\t\toutline: 0;\n\t\t\tline-height: 1.3;\n\t\t\ttext-decoration: none;\n\t\t\tfont-size: 100%;\n\t\t\tlist-style: none;\n\t\t}\n\t\t.ui-helper-clearfix:before,\n\t\t.ui-helper-clearfix:after {\n\t\t\tcontent: \"\";\n\t\t\tdisplay: table;\n\t\t\tborder-collapse: collapse;\n\t\t}\n\t\t.ui-helper-clearfix:after {\n\t\t\tclear: both;\n\t\t}\n\t\t.ui-helper-clearfix {\n\t\t\tmin-height: 0; /* support: IE7 */\n\t\t}\n\t\t.ui-helper-zfix {\n\t\t\twidth: 100%;\n\t\t\theight: 100%;\n\t\t\ttop: 0;\n\t\t\tleft: 0;\n\t\t\tposition: absolute;\n\t\t\topacity: 0;\n\t\t\tfilter:alpha(opacity=0); /* support: IE8 */\n\t\t}\n\n\t\t.ui-front {\n\t\t\tz-index: 100;\n\t\t}\n\n\n\t\t/* Interaction Cues\n\t\t----------------------------------*/\n\t\t.ui-state-disabled {\n\t\t\tcursor: default !important;\n\t\t}\n\n\n\t\t/* Icons\n\t\t----------------------------------*/\n\n\t\t/* states and images */\n\t\t.ui-icon {\n\t\t\tdisplay: block;\n\t\t\ttext-indent: -99999px;\n\t\t\toverflow: hidden;\n\t\t\tbackground-repeat: no-repeat;\n\t\t}\n\n\n\t\t/* Misc visuals\n\t\t----------------------------------*/\n\n\t\t/* Overlays */\n\t\t.ui-widget-overlay {\n\t\t\tposition: fixed;\n\t\t\ttop: 0;\n\t\t\tleft: 0;\n\t\t\twidth: 100%;\n\t\t\theight: 100%;\n\t\t}\n\n\t\t.ui-slider-handle {\n\t\t\tbackground: #fff;\n\t\t\tborder-radius: 50%;\n\t\t\tborder: 1px solid #aaa;\n\t\t\tposition: absolute;\n\t\t\tz-index: 2;\n\t\t\twidth: 1.2rem;\n\t\t\theight: 1.2rem;\n top: -.4rem;\n\t\t\tmargin-left: -.6rem;\n\t\t\tcursor: default;\n\t\t\t-ms-touch-action: none;\n\t\t\ttouch-action: none;\n\t\t\ttransition: opacity 0.2s $fastInEaseOut, height .18s $fastInEaseOut, width .18s $fastInEaseOut, transform 0.18s $fastInEaseOut;\n\n @include media(max-medium) {\n width: 2rem;\n \t\t\theight: 2rem;\n top: -.85rem;\n margin-left: -1rem;\n transform: rotate(225deg);\n }\n\n\t\t\t&:focus {\n\t\t\t\toutline: none;\n\t\t\t\tbox-shadow: 0 0 3px 1px #4D90FE;\n\t\t\t}\n\n &.ui-state-active {\n @include media(max-medium) {\n width: 2.2rem;\n height: 2.2rem;\n border-top-left-radius: 0;\n transform: translate3d(-0.2rem, -0.8rem, 0) rotate(225deg);\n }\n\n }\n\n\t\t}\n\n .ui-slider-handle--correct,\n\t\t.ui-slider-handle--incorrect {\n width: 1.1rem;\n\t\t\theight: 1.1rem;\n top: -.4rem;\n margin-left: -.55rem;\n }\n\n .ui-slider-handle--incorrect {\n z-index: 1;\n\t\t\tborder: 2px solid $red;\n\t\t}\n\n .ui-slider-handle--correct {\n border: 2px solid $green;\n z-index: 99999;\n }\n\n\t\t.ui-slider-range {\n\t\t\tposition: absolute;\n\t\t\tz-index: 1;\n\t\t\tfont-size: .7rem;\n\t\t\tdisplay: block;\n\t\t\tborder: 0;\n\t\t\tbackground-position: 0 0;\n\t\t\ttop: 0;\n\t\t\theight: 100%;\n\t\t}\n\n .ui-slider-range-show-correct {\n background: $green;\n z-index: 9;\n }\n\n\t\t.ui-slider-range-min {\n\t\t\tleft: 0;\n\t\t\tbackground: $green;\n\t\t}\n\n\t\t.ui-slider-range-max {\n\t\t\tright: 0;\n\t\t}\n\n\t\t/* support: IE8 - See #6727 */\n\t\t&.ui-state-disabled .ui-slider-handle,\n\t\t&.ui-state-disabled .ui-slider-range {\n\t\t\tfilter: inherit;\n\t\t}\n\t}\n\n\t.ui-slider-horizontal {\n\t\theight: .3rem;\n\t}\n\n\t.enp-question__answered {\n\t\t.enp-slider {\n\t\t\tbackground: #bbb;\n\t\t}\n\n\t\t.ui-slider-range-min {\n\t\t\tbackground: #fff;\n\t\t}\n\n\t}\n\n}\n"]} \ No newline at end of file +{"version":3,"sources":["_setup.scss","_utilities.scss","_variables.scss","_structure.scss","_typography.scss","_animations.scss","_base.scss","_forms.scss","_quiz-create.scss","_quiz-preview.scss","_quiz-publish.scss","_ab-create.scss","_dashboard.scss","_breadcrumbs.scss","_quiz-results.scss","_ab-results.scss","../../../quiz-take/css/sass/_slider.scss"],"names":[],"mappings":"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","file":"enp_quiz-create.min.css","sourcesContent":["html {\n font-size: 16px!important; // set our rem value reference\n}\n\nhtml #enp-quiz {\n box-sizing: border-box;\n}\n\nbody #enp-quiz {\n background: #fff;\n overflow: hidden;\n}\n\n#enp-quiz {\n *, *:before, *:after {\n box-sizing: inherit;\n }\n\n ul, ol {\n margin: 0 0 1.6rem 1.25rem;\n padding: 0;\n }\n\n textarea {\n margin-bottom: 1rem;\n }\n\n button, input[type=\"button\"], input[type=\"reset\"], input[type=\"submit\"] {\n border: none;\n &:active,\n &:focus,\n &:hover {\n border: none;\n }\n }\n\n iframe {\n border: none;\n }\n}\n","@mixin focus--glow {\n outline-color: #4D90FE;\n outline-offset: -2px;\n outline-style: auto;\n outline-width: 5px;\n}\n\n@mixin disabled {\n opacity: 0.65;\n cursor: default;\n}\n\n@mixin btn {\n text-align: center;\n border: none;\n border-radius: 3px;\n padding: .85em 1.4em .75em;\n font-size: 15px;\n font-weight: 400;\n letter-spacing: .05em;\n color: #fff;\n box-shadow: inset 0 -2px 0 rgba(0,0,0,.2);\n background: $link;\n cursor: pointer;\n text-transform: uppercase;\n transition: all .2s;\n line-height: 1.6;\n\n &:focus,\n &:hover {\n color: #fff;\n box-shadow: none;\n background: $link_hover;\n }\n\n &:active {\n color: #fff;\n box-shadow: inset 0 2px 0 rgba(0,0,0,.1);\n background: lighten($blue, 20);\n }\n\n &:focus {\n @include focus--glow;\n }\n\n &:disabled,\n &:disabled:focus,\n &:disabled:hover {\n background: $link;\n cursor: default;\n opacity: .5;\n\n\n }\n}\n\n@mixin btn--reset {\n border: none;\n background: none;\n box-shadow: none;\n padding: 0;\n margin: 0;\n}\n\n@mixin btn--submit {\n @include btn;\n}\n\n@mixin btn--ghost {\n @include btn;\n border: 2px solid $link;\n background: transparent;\n color: $link;\n box-shadow: none;\n\n &:focus,\n &:hover {\n background: transparent;\n border: 2px solid $link_hover;\n color: $link_hover;\n }\n}\n\n@mixin box-shadow {\n box-shadow: 0 2px 2px rgba(0,0,0,.2);\n}\n\n@mixin btn--dashed {\n @include btn;\n border: 1px dashed $darker_gray;\n background: none;\n color: #545454;\n box-shadow: none;\n\n &:hover,\n &:focus {\n border: 1px dashed $darkest_gray;\n color: $darker_gray;\n background: rgba(255,255,255,.9);\n }\n}\n\n@mixin btn--dashed--light {\n @include btn--dashed;\n border: 2px dashed $darker-gray;\n color: $dark_gray;\n transition: all .2s;\n\n &:hover,\n &:focus {\n color: $darker_gray;\n border: 2px dashed #999;\n }\n}\n\n@mixin btn--dashed--light--alt-bg {\n @include btn--dashed--light ;\n background: $light_gray;\n}\n\n@mixin btn--small {\n font-size: 13px;\n}\n\n@mixin btn--thin {\n padding: 0.4em 1em;\n}\n\n@mixin btn--icon {\n @include btn;\n padding: .75em 0.8em .7em 1.4em;\n}\n\n@mixin btn--icon__icon {\n @include icon--white;\n @include icon--xl;\n position: relative;\n top: 4px;\n}\n\n/*\n* @usage: @include btn--icon(BEM-root-class);\n* Button with icon with white circular background.\n* --------------\n* | BTN TEXT > |\n* --------------\n* @param $rootBEM: root class name that will be extended\n\n@mixin btn--icon($rootBEM) {\n .(#){$rootBEM} {\n @include btn--icon;\n }\n\n .(#){$rootBEM}__icon {\n @include btn--icon__icon ;\n }\n}\n*/\n\n@mixin btn--icon--icon-circle {\n @include btn;\n padding: .65em 1.2em .85em 1.4em;\n}\n\n// use when the icon is larger and on the right\n@mixin btn--icon__icon--circle {\n @include icon--circle;\n @include icon--white-bg;\n @include icon--normal;\n margin-left: 0.5em;\n position: relative;\n top: 0.15rem;\n}\n\n@mixin btn--icon__icon--circle--hover {\n @include icon--white-bg--hover;\n}\n\n/*\n* @usage: @include btn--icon--circle(BEM-root-class);\n* Button with icon with white circular background.\n* ---------------\n* | BTN TEXT (>) |\n* ---------------\n* @param $rootBEM: root class name that will be extended\n*/\n@mixin btn--icon--circle($rootBEM) {\n .#{$rootBEM} {\n @include btn--icon--icon-circle;\n }\n\n .#{$rootBEM}__icon {\n @include btn--icon__icon--circle ;\n\n\n &:hover {\n @include btn--icon__icon--circle--hover ;\n }\n }\n}\n\n/*\n* @usage: @include btn--icon--hover-circle(BEM-root-class);\n* Button with icon. Hovering/focusing button moves\n* the icon to right and fades in a white circular background\n* -------------- ----------------\n* | BTN TEXT > | --hover/focus--> | BTN TEXT (>) |\n* -------------- ----------------\n* @param $rootBEM: root class name that will be extended\n*/\n@mixin btn--icon--hover-circle($rootBEM) {\n .#{$rootBEM} {\n @include btn--icon--icon-circle;\n padding-right: 0.8em;\n }\n\n .#{$rootBEM}__icon {\n @include btn--icon__icon--circle ;\n margin-left: 0;\n width: 1em;\n height: 1em;\n background: transparent;\n fill: #fff;\n transform: translate3d(0, 0, 0);\n transition: all .3s ease-in-out;\n }\n\n .#{$rootBEM}:hover .#{$rootBEM}__icon {\n @include btn--icon__icon--circle--hover ;\n transform: translate3d(1em, 0, 0);\n margin-right: 1em;\n }\n\n\n}\n\n// use on small icons and placed on the left\n@mixin btn--icon__icon--circle--small {\n @include icon--circle--small;\n margin-right: 5px;\n}\n\n\n// use this to match the icon to the inline font-size\n@mixin icon--inline {\n width: 1em;\n height: 1em;\n position: relative;\n top: .125em;\n}\n\n@mixin icon--small {\n width: 1rem;\n height: 1rem;\n}\n\n@mixin icon--normal {\n width: 1.2rem;\n height: 1.2rem;\n}\n\n@mixin icon--large {\n width: 1.5rem;\n height: 1.5rem;\n}\n\n@mixin icon--xl {\n width: 1.8rem;\n height: 1.8rem;\n}\n\n@mixin icon--xxl {\n width: 2.4rem;\n height: 2.4rem;\n}\n\n@mixin icon--xxxl {\n width: 2.8rem;\n height: 2.8rem;\n}\n\n@mixin icon--circle {\n border-radius: 50%;\n fill: #fff;\n}\n\n@mixin border-radius {\n border-radius: 3px;\n}\n\n@mixin icon--circle--pad {\n @include icon--circle ;\n padding: 0.05em;\n\n @include breakpoint(medium) {\n padding: 0.15em;\n }\n}\n\n@mixin icon--circle--pad--xl {\n @include icon--circle ;\n padding: 0.6rem;\n}\n\n@mixin icon--circle--small {\n @include icon--small;\n @include icon--circle;\n padding: 0.02rem;\n}\n\n@mixin icon--white {\n fill: #fff;\n}\n\n@mixin icon--white-bg {\n background: #fff;\n fill: $link;\n}\n\n@mixin icon--white-bg--hover {\n background: #fff;\n fill: $link_hover;\n}\n\n@mixin icon--gray-bg {\n background: $dark_gray;\n fill: $light_gray;\n}\n\n@mixin icon--gray-bg--hover {\n fill: #fff;\n background: $darker_gray;\n}\n\n@mixin small-uppercase {\n font-size: 1rem;\n text-transform: uppercase;\n}\n\n@mixin hint {\n font-size: .7rem;\n font-weight: 300;\n color: #565656;\n}\n\n@mixin green {\n color: $green;\n}\n\n@mixin dark-green {\n color: $dark_green;\n}\n\n@mixin red {\n color: $red;\n}\n\n@mixin fade-red {\n color: $fade_red;\n}\n\n/* Text meant only for screen readers */\n@mixin screen-reader-text {\n clip: rect(1px, 1px, 1px, 1px);\n position: absolute !important;\n left:-10000px;\n top:auto;\n width:1px;\n height:1px;\n overflow:hidden;\n}\n\n@mixin screen-reader-text--hover {\n background-color: #f1f1f1;\n border-radius: 3px;\n box-shadow: 0 0 2px 2px rgba(0, 0, 0, 0.6);\n clip: auto !important;\n color: #21759b;\n display: block;\n font-size: 14px;\n font-weight: bold;\n height: auto;\n left: 5px;\n line-height: normal;\n padding: 15px 23px 14px;\n text-decoration: none;\n top: 5px;\n width: auto;\n z-index: 100000;\n}\n\n@mixin xmargin-vertical {\n margin-top: 2rem;\n margin-bottom: 2rem;\n}\n\n@mixin xmargin-horizontal {\n margin-right: 2rem;\n margin-left: 2rem;\n}\n\n@mixin xpadding-vertical {\n padding-top: 2rem;\n padding-bottom: 2rem;\n}\n\n@mixin xpadding-vertical-top {\n padding-top: 2rem;\n}\n\n@mixin xpadding-horizontal {\n padding-right: 2rem;\n padding-left: 2rem;\n}\n\n@mixin header-space {\n @include breakpoint(large) {\n padding-top: 7rem;\n }\n}\n\n@mixin ul-no-style {\n list-style: none;\n margin-left: 0;\n}\n\n@mixin hidden--accessible {\n height: 0;\n opacity: 0;\n padding: 0;\n overflow: hidden;\n}\n\n@mixin accordion {\n background: #fff;\n width: 100%;\n}\n\n@mixin accordion__header {\n @include accordion ;\n box-shadow: inset 1px 1px 0 #ccc, inset -1px -1px 0 #ccc;\n color: $font;\n font-family: $fontTitle;\n font-size: .9rem;\n font-weight: 400;\n line-height: 1.5;\n text-transform: none;\n letter-spacing: 0;\n text-align: left;\n border: none;\n border-radius: 3px;\n min-height: 3.065rem;\n padding: 1rem 2rem 1rem 1rem;\n margin: 1.6rem 0 0;\n position: relative;\n z-index: 9;\n cursor: pointer;\n transition: all .2s $fastInEaseOut;\n}\n\n@mixin accordion__content {\n @include accordion ;\n box-shadow: inset 1px -1px 0 #ccc, inset -1px -1px 0 #ccc;\n display: block;\n position: relative;\n height: auto;\n overflow: visible;\n margin-bottom: 1.6rem;\n}\n\n@mixin accordion__content--closed {\n margin-top: 0;\n padding-top: 0rem;\n animation: slideOutTop .25s $fastInEaseOut forwards;\n display: none;\n}\n\n@mixin accordion__content--open {\n padding-top: 1.6rem;\n margin-bottom: 2rem;\n animation: slideInTop .45s $fastInEaseOut forwards;\n}\n\n// Share Icons\n@mixin share_icons($rootBEM) {\n\n .#{$rootBEM} {\n @include ul-no-style;\n @include flex-center;\n }\n\n .#{$rootBEM}__item {\n margin-right: 20px;\n\n &:last-child {\n margin-right: 0;\n }\n }\n\n .#{$rootBEM}__item__icon {\n @include icon--xxl;\n @include icon--circle--pad--xl;\n\n fill: #fff!important;\n }\n\n .#{$rootBEM}__item__icon--facebook {\n background-color: #3a5795;\n }\n\n .#{$rootBEM}__item__icon--twitter {\n background-color: #4099ff;\n }\n}\n\n@mixin section--alt {\n background: $light_gray;\n border-bottom: 1px solid #ddd;\n border-top: 1px solid #ddd;\n padding-top: 3rem;\n padding-bottom: 3rem;\n margin-top: 3rem;\n margin-bottom: 3rem;\n}\n\n#enp-quiz {\n .enp-screen-reader-text {\n @include screen-reader-text;\n }\n\n .enp-screen-reader-text:hover,\n .enp-screen-reader-text:active,\n .enp-screen-reader-text:focus {\n @include screen-reader-text--hover;\n }\n\n .enp-accordion-header {\n @include accordion__header ;\n\n &:first-of-type {\n margin-top: 0;\n }\n\n .enp-accordion-header__icon {\n position: absolute;\n fill: $dark_gray;\n right: 0.75rem;\n bottom: 0.75rem;\n transition: all .35s $fastInEaseOut;\n }\n }\n\n .enp-accordion-header--open {\n\n .enp-accordion-header__icon {\n transform: rotateX(180deg);\n }\n\n }\n\n .enp-quiz-settings__form .enp-accordion-header {\n position: relative;\n overflow-y: hidden;\n }\n\n .enp-accordion-content {\n @include accordion__content ;\n }\n\n .enp-accordion-content--closed {\n @include accordion__content--closed ;\n }\n\n .enp-accordion-content--open {\n @include accordion__content--open ;\n }\n\n .enp-quiz-message {\n @include container--thin;\n background: #fff;\n border: 1px solid #eee;\n border-bottom: 1px solid #ccc;\n padding: 1rem;\n margin-bottom: 1.6rem;\n position: fixed;\n bottom: 0;\n left: 0;\n }\n\n .enp-quiz-message__title {\n @include small-uppercase;\n }\n\n .enp-message__list {\n @include ul-no-style;\n font-size: 1.1rem;\n margin-bottom: 0;\n }\n\n .enp-quiz-message--error {\n border-left: 6px solid $red;\n color: $red;\n }\n\n .enp-quiz-message__title--error {\n color: $dark_red;\n }\n\n .enp-quiz-message--success {\n border-left: 6px solid $green;\n color: $dark_green;\n }\n\n .enp-quiz-message__title--success {\n color: $dark_green;\n }\n\n .enp-quiz-message--note {\n border-left: 6px solid $khaki;\n }\n\n .enp-quiz-message__title--note {\n color: $dark_blue;\n }\n\n .enp-quiz-message__close {\n @include btn--reset;\n position: absolute;\n top: 5px;\n right: 5px;\n }\n\n .enp-quiz-message--ajax {\n margin-bottom: .6rem;\n animation: slideInBottom .3s;\n }\n\n .enp-quiz-message-ajax-container {\n z-index: 9999;\n position: fixed;\n bottom: 10px;\n }\n\n .enp-quiz-message--saving__spinner {\n margin-left: -10px;\n }\n\n .enp-quiz-message--saving__text {\n font-size: 1rem;\n }\n\n textarea.limited-chars,\n input.limited-chars {\n margin-bottom: 0.2rem;\n }\n\n .limited-chars__container {\n color: lighten($dark_gray, 8);\n font-size: 0.8rem;\n display: block;\n text-align: right;\n margin-bottom: 1.2rem;\n }\n\n .limited-chars__counter {\n color: $dark_gray;\n }\n\n .limited-chars__container--error {\n color: $dark_red;\n\n .limited-chars__counter {\n color: $dark_red;\n }\n }\n\n textarea.has-error,\n input.has-error {\n border: 1px solid $red;\n &:focus {\n outline-color: $red;\n }\n\n }\n\n\n\n .enp-tooltip {\n position: relative;\n }\n\n .enp-tooltip__activator {\n\n &:focus + .enp-tooltip__description,\n &:focus > .enp-tooltip__description {\n display: block;\n }\n }\n\n .enp-tooltip__description {\n display: none;\n position: absolute;\n left: 103%;\n margin-bottom: 2rem;\n border-radius: 3px;\n background: $light_gray;\n font-size: 0.9rem;\n padding: 0.9rem;\n max-width: 200px;\n }\n\n\n}\n\n.enp-sticky {\n position: relative;\n left: 0;\n right: 0;\n top: 0;\n z-index: 999;\n\n &.enp-sticky--fixed {\n position: fixed;\n }\n}\n\n.enp-breadcrumb-link {\n font-size: 0.85rem;\n}\n\n.enp-breadcrumb-link__icon {\n position: relative;\n top: 0.45rem;\n left: 0.4rem;\n}\n","//fonts\n$fontBody : Arial,monospace, helvetica, arial, sans-serif;\n$fontTitle : Arial,monospace, helvetica, arial, sans-serif;\n\n// // // colors\n$font : #1d1c25;\n$background: #FAF9FB;\n$title : #5D5E5F;\n\n// Blues\n$blue: #00A9B7;\n$dark_blue: #333F48;\n$light_blue: lighten($dark_blue, 40);\n\n// Grays\n$light_gray: #FAF9FB;\n$really_light_gray: lighten($light_gray, 1);\n$gray: darken($light_gray, 2);\n$dark_gray: darken($gray, 5);\n$darker_gray: darken($dark_gray, 20);\n$darkest_gray: darken($dark_gray, 50);\n\n// Other colors\n$khaki: #CCA562;\n$green: #60AAAD;\n$dark_green: darken($green, 8);\n$red: #bf5700;\n$dark_red: darken($red, 8);\n$fade_red: #C1893E;\n\n// Elements\n$link: #bf5700;\n$link_hover: darken($link, 8);\n// animation\n$fastInEaseOut: cubic-bezier(0.000, 0, .3, 1);\n\n\n$breakpoints: (\n \"small\" : 400px,\n \"medium\" : 700px,\n \"large\" : 1000px\n);\n\n// -----------------------------------------------------------------------------\n// Core\n// -----------------------------------------------------------------------------\n\n// Caching current breakpoint\n// Not meant to be manually edited\n$default-breakpoint: root;\n$current-breakpoint: $default-breakpoint;\n\n// The usual breakpoint mixin\n// Except it updates the $current-breakpoint variable\n// 1. If breakpoint name exists in map\n// 2. Update $current-breakpoint\n// 3. Open a media query\n// 4. Let the user dump content\n// 5. Then reset $current-breakpoint\n// 6. If breakpoint name doesn't exist in map, warn the user\n@mixin breakpoint($breakpoint) {\n $value: map-get($breakpoints, $breakpoint);\n\n @if $value != null { // 1\n $current-breakpoint: $breakpoint !global; // 2\n @media (min-width: $value) { @content; } // 3\n $current-breakpoint: $default-breakpoint !global; // 5\n }\n\n @else {\n @warn \"Invalid breakpoint `#{$breakpoint}`.\"; // 6\n }\n}\n\n// for only targeting a specific device\n// NOTE: DOESN'T SUPPORT THE @include placeholders!!!\n@mixin media($query) {\n @if $query == max-small {\n $media_query: \"max-width: #{map-get($breakpoints, \"small\")}\";\n } @else if $query == only-medium {\n $media_query: \"min-width: #{map-get($breakpoints, \"medium\")}) and (max-width: #{(map-get($breakpoints, \"large\") - 1px)}\";\n } @else if $query == max-medium {\n $media_query: \"max-width: #{(map-get($breakpoints, \"medium\") - 1px)}\";\n } @else if $query == max-large {\n $media_query: \"max-width: #{(map-get($breakpoints, \"large\") - 1px)}\";\n } @else {\n // just use the number provided as a max width\n $media_query: \"max-width: #{$query}\";\n }\n\n @if variable-exists(media_query) {\n @media ($media_query) {\n @content;\n }\n }\n\n}\n","@mixin clearfix {\n &:after {\n content: \"\";\n display: table;\n clear: both;\n }\n}\n\n@mixin container {\n max-width: 740px;\n margin: 0 auto;\n @include clearfix;\n}\n\n@mixin well {\n padding: 1.6rem;\n margin-bottom: 1.6rem;\n background: $light_blue;\n @include border-radius;\n border: 1px solid #eee;\n border-bottom-color: #ccc;\n\n @include breakpoint(medium) {\n margin-bottom: 2.6rem;\n padding: 1.6rem 2rem;\n }\n}\n\n@mixin container--wide {\n @include container;\n\n @include breakpoint(medium) {\n max-width: 1000px;\n }\n\n @include breakpoint(large) {\n max-width: 1440px;\n }\n}\n\n\n@mixin container--thin {\n @include container;\n // max-width: 512px;\n}\n\n@mixin container--really-thin {\n @include container;\n max-width: 300px;\n}\n\n@mixin container--form {\n @include container--thin;\n\n .enp-input,\n .enp-textarea {\n width: 100%;\n }\n}\n\n@mixin container--form--thin {\n @include well;\n @include container--really-thin;\n\n .enp-input,\n .enp-textarea {\n width: 100%;\n }\n}\n\n@mixin flex-container { // no pseudo element to clear and break spacing\n @include container;\n}\n\n@mixin flex-container--wide { // no pseudo element to clear and break spacing\n @include flex-container;\n\n @include breakpoint(medium) {\n max-width: 840px;\n }\n\n @include breakpoint(large) {\n max-width: 1000px;\n }\n}\n\n@mixin flex {\n display: flex;\n}\n\n@mixin flex-list__item {\n flex-basis: 100%;\n margin: 0;\n border-bottom-color: #ddd;\n}\n\n@mixin flex-spread {\n @include flex;\n justify-content: space-between;\n}\n\n@mixin flex-spread-vertical {\n @include flex-spread;\n flex-direction: column;\n}\n\n@mixin flex-spread-around {\n @include flex;\n justify-content: space-around;\n}\n\n@mixin flex-bottom {\n @include flex;\n align-items: flex-end;\n align-content: flex-end;\n}\n\n@mixin flex-center {\n @include flex;\n justify-content: center;\n align-content: center;\n align-items: center;\n}\n\n@mixin flex-vertical-center {\n @include flex;\n align-content: center;\n align-items: center;\n}\n\n@mixin flex-inline {\n @include flex;\n @include ul-no-style;\n margin-bottom: 0;\n}\n\n@mixin flex-inline__item {\n margin-right: 10px;\n\n &:last-of-type {\n margin-right: 0;\n }\n}\n\n\n@mixin flex-grid {\n @include flex;\n flex-flow: column wrap;\n align-items: stretch;\n @include ul-no-style;\n}\n\n@mixin flex-grid__item {\n flex-basis: 100%;\n padding: 1rem 1.2rem;\n background: #fff;\n border: 1px solid #eee;\n border-bottom: 1px solid #ddd;\n list-style: none;\n transition: all .35s $fastInEaseOut;\n margin: 0 0 0.8rem;\n\n // @include breakpoint(medium) {\n // flex-basis: 100%;\n // max-width: 100%;\n // margin: 0 2% 0.8rem 0;\n\n // &:nth-child(2n) {\n // margin-right: 0;\n // }\n // }\n\n // @include breakpoint(large) {\n // flex-basis: 100%;\n // max-width: 100%;\n // margin-right: 1.25%;\n\n // &:nth-child(2n) {\n // margin-right: 1.25%;\n // }\n\n // &:nth-child(3n) {\n // margin-right: 0;\n // }\n // }\n}\n\n@mixin flex-grid__title {\n font-size: 1rem;\n padding-bottom: 0.5rem;\n}\n","body #enp-quiz {\n color: $font;\n font-family: $fontBody;\n font-size: 1em;\n line-height: 1.6;\n font-weight: 400;\n\n @include breakpoint(medium) {\n font-size: 1.3em;\n }\n}\n\n#enp-quiz {\n /* Headings */\n h1,h2,h3,h4,h5,h6 {\n font-family: $fontTitle;\n color: $title;\n clear: both;\n margin: 0 0 .2rem;\n font-weight: bold;\n line-height: 1.2em;\n }\n\n h1 {\n font-size: 2em;\n }\n\n h2 {\n font-size: 1.75em;\n }\n\n h3 {\n font-size: 1.475em;\n }\n\n h4 {\n font-size: 1.3em;\n }\n\n h5 {\n font-size: 1.125em;\n }\n\n h6 {\n font-size: 1em;\n }\n\n p+h1, ul+h1,\n p+h2, ul+h2,\n p+h3, ul+h3,\n p+h4, ul+h4,\n p+h5, ul+h5,\n p+h6, ul+h6 {\n margin-top: 1.8em;\n }\n\n /* Text elements */\n p {\n font-size: 0.85em;\n margin-bottom: 1.125em;\n font-weight: 300;\n }\n ul, ol {\n margin: 0 0 1.6em 1.25em;\n }\n ul {\n list-style: disc;\n }\n ol {\n list-style: decimal;\n }\n li > ul,\n li > ol {\n margin-bottom: 0;\n margin-left: 1.6em;\n }\n\n b, strong {\n font-weight: bold;\n }\n\n dfn, cite, em {\n font-family: georgia, times, serif;\n font-style: italic;\n }\n\n pre {\n background: #eee;\n font-family: \"Courier 10 Pitch\", Courier, monospace;\n font-size: .95em;\n line-height: 1.6;\n margin-bottom: 1.6em;\n padding: 1.6em;\n overflow: auto;\n max-width: 100%;\n }\n .code, code, kbd, tt, var {\n font: .7em Monaco, Consolas, \"Andale Mono\", \"DejaVu Sans Mono\", monospace;\n }\n\n table {\n border: none;\n\n th {\n font-family: $fontTitle;\n font-size: .8rem;\n text-transform: uppercase;\n border: none;\n border-bottom: 1px solid #ddd;\n }\n\n td {\n font-family: $fontBody;\n font-size: 1rem;\n border: none;\n border-bottom: 1px solid #eee;\n }\n\n tr:nth-child(even) td {\n background: $really_light_gray;\n }\n\n tr:last-child td {\n border-bottom: none;\n }\n }\n\n figure {\n margin: 0;\n }\n\n img {\n height: auto; /* Make sure images are scaled correctly. */\n max-width: 100%; /* Adhere to container width. */\n }\n\n /* Links */\n a {\n color: $link;\n text-decoration: none;\n transition: color .2s;\n touch-action: manipulation; // remove 300ms delay for ie\n\n .enp-icon {\n fill: $link;\n }\n }\n\n a:hover,\n a:focus,\n a:active {\n color: $link_hover;\n\n .enp-icon {\n fill: $link_hover;\n }\n }\n\n button {\n &:focus {\n @include focus--glow;\n }\n }\n\n .enp-btn {\n @include btn;\n }\n\n\n .enp-btn--add {\n @include btn--dashed;\n width: 100%;\n }\n\n .enp-btn--disabled {\n @include disabled;\n }\n\n .enp-btn--enabled {\n animation: expand .6s;\n }\n\n .enp-icon {\n width: 24px;\n height: 24px;\n transition: all .2s;\n }\n\n .enp-page-title {\n font-size: 1.6rem;\n }\n}\n","@keyframes slideInBottom {\n 0% {\n opacity: 0;\n transform: translate3d(0, 100px, 0);\n }\n 100% {\n opacity: 1;\n transform: translate3d(0, 0, 0);\n }\n}\n\n@keyframes slideInTop {\n 0% {\n opacity: 0;\n height: auto;\n transform: translate3d(0, -20px, 0);\n }\n 100% {\n opacity: 1;\n height: auto;\n transform: translate3d(0, 0, 0);\n }\n}\n\n@keyframes slideInTop--reduced-opacity {\n 0% {\n opacity: 0;\n height: auto;\n transform: translate3d(0, -20px, 0);\n }\n 100% {\n opacity: 0.8;\n height: auto;\n transform: translate3d(0, 0, 0);\n }\n}\n\n\n@keyframes slideOutTop {\n 0% {\n overflow: hidden;\n height: 100px;\n opacity: 1;\n transform: translate3d(0, 0, 0);\n }\n 100% {\n height: 0;\n opacity: 0;\n transform: translate3d(0, -20px, 0);\n }\n}\n\n@keyframes removeElement {\n 0% {\n opacity: 1;\n transform: translate3d(0, 0, 0);\n }\n 100% {\n padding: 0;\n margin: 0;\n opacity: 0;\n height: 0;\n z-index: -1;\n transform: translate3d(-200px, 0, 0);\n }\n}\n\n@keyframes removeAnswers {\n 0% {\n opacity: 1;\n transform: translate3d(0, 0, 0);\n }\n 100% {\n padding: 0;\n opacity: 0;\n display: none;\n height: 0;\n z-index: -1;\n transform: translate3d(-200px, 0, 0);\n }\n}\n\n@keyframes removeQuestion {\n 0% {\n opacity: 1;\n transform: translateX(0);\n }\n 100% {\n opacity: 0;\n transform: translateX(-200px);\n }\n}\n\n@keyframes showNextQuestion {\n 0% {\n opacity: 0;\n transform: translateX(200px);\n }\n\n 100% {\n opacity: 1;\n transform: translateX(0);\n }\n}\n\n@keyframes expand {\n 0% {\n opacity: 0.8;\n transform: scale3d(1, 1, 1);\n box-shadow: 0 0 0px rgba(0,0,0,.3);\n }\n\n 40% {\n opacity: 1;\n }\n\n 70% {\n opacity: 1;\n transform: scale3d(1.1, 1.1, 1);\n box-shadow: 0 0 8px rgba(0,0,0,.4);\n }\n\n 100% {\n opacity: 1;\n transform: scale3d(1, 1, 1);\n box-shadow: 0 0 0px rgba(0,0,0,.3), inset 0 2px 0 rgba(0,0,0,.2);\n }\n}\n\n@keyframes checkmark {\n 0% {\n opacity: 0;\n transform: scale3d(0.2, 0.2, 1);\n }\n 5% {\n opacity: 1;\n }\n 10% {\n transform: scale3d(1.4, 1.4, 1);\n }\n 12% {\n transform: scale3d(1, 1, 1);\n }\n 90% {\n opacity: 1;\n transform: scale3d(1, 1, 1);\n }\n 92% {\n transform: scale3d(1.4, 1.4, 1);\n }\n 100% {\n opacity: 0;\n transform: scale3d(0.2, 0.2, 1);\n }\n\n}\n\n@keyframes fadeOut {\n 0% {\n opacity: 1;\n }\n 100% {\n opacity: 0;\n }\n}\n\n@keyframes fadeIn {\n 0% {\n opacity: 0;\n }\n 100% {\n opacity: 1;\n }\n}\n\n@keyframes navSlideIn {\n 0% {\n transform: translate3d(0, -200px, 0);\n }\n 100% {\n transform: translate3d(0, 0, 0);\n }\n}\n\n\n.spinner {\n margin: 0 auto;\n width: 70px;\n text-align: center;\n}\n\n.spinner > div {\n width: 18px;\n height: 18px;\n background-color: #333;\n\n border-radius: 100%;\n display: inline-block;\n -webkit-animation: sk-bouncedelay 1.4s infinite ease-in-out both;\n animation: sk-bouncedelay 1.4s infinite ease-in-out both;\n}\n\n.spinner .bounce1 {\n -webkit-animation-delay: -0.32s;\n animation-delay: -0.32s;\n}\n\n.spinner .bounce2 {\n -webkit-animation-delay: -0.16s;\n animation-delay: -0.16s;\n}\n\n@-webkit-keyframes sk-bouncedelay {\n 0%, 80%, 100% { -webkit-transform: scale(0) }\n 40% { -webkit-transform: scale(1.0) }\n}\n\n@keyframes sk-bouncedelay {\n 0%, 80%, 100% {\n -webkit-transform: scale(0);\n transform: scale(0);\n } 40% {\n -webkit-transform: scale(1.0);\n transform: scale(1.0);\n }\n}\n","#enp-quiz {\n transition: background .25s $fastInEaseOut;\n\n .enp-container {\n // @include container;\n }\n\n .enp-aside {\n @include well;\n @include container--thin;\n font-size: 1.2rem;\n }\n\n .enp-aside__title {\n @include small-uppercase;\n font-weight: 600;\n }\n\n .enp-page-title {\n border-bottom: 2px solid $blue;\n }\n}\n","\n\n// enter the root BEM class and this will output the correct CSS for you\n@mixin radio-block($rootBEM) {\n .#{$rootBEM}__legend {\n @include radio-block__legend ;\n }\n\n .#{$rootBEM}__input {\n @include radio-block__input ;\n }\n\n .#{$rootBEM}__label {\n @include radio-block__label ;\n }\n\n .#{$rootBEM}__input:checked + .#{$rootBEM}__label {\n @include radio-block__label--checked ;\n }\n\n .#{$rootBEM}__input:focus + .#{$rootBEM}__label {\n @include radio-block__label--focus ;\n }\n}\n\n@mixin radio-inline($rootBEM) {\n .#{$rootBEM}__legend {\n @include radio-inline__legend ;\n }\n\n .#{$rootBEM}__input {\n @include radio-inline__input ;\n }\n\n .#{$rootBEM}__label {\n @include radio-inline__label ;\n }\n\n .#{$rootBEM}__input:checked + .#{$rootBEM}__label {\n @include radio-inline__label--checked ;\n }\n\n .#{$rootBEM}__input:focus + .#{$rootBEM}__label {\n @include radio-inline__label--focus ;\n }\n\n}\n\n@mixin label {\n display: block;\n color: lighten($font, 10);\n font-weight: normal;\n font-size: 0.85rem;\n text-transform: uppercase;\n}\n\n@mixin legend {\n @include label;\n padding-top: 1.6rem;\n margin-bottom: 0.2rem;\n border: none;\n}\n\n@mixin label--bold {\n @include label;\n font-weight: 500;\n}\n\n@mixin legend--bold {\n @include label--bold;\n}\n\n@mixin input {\n font-size: 1rem;\n font-family: $fontBody;\n padding: 0.8rem 0.5rem;\n background: #fff;\n border: 1px solid #aaa;\n border-radius: 3px;\n width: 20rem;\n max-width: 100%;\n margin-bottom: 1.2rem;\n\n @include breakpoint(medium) {\n padding: 0.8rem;\n width: 100%;\n }\n}\n\n@mixin input--large {\n @include input;\n padding: 1rem 1.2rem;\n font-size: 1rem;\n}\n\n@mixin input--xl {\n @include input;\n font-weight: bold;\n font-size: 1.6rem;\n margin-bottom: 1rem;\n\n &::placeholder {\n font-weight: bold;\n }\n}\n\n@mixin textarea {\n @include input;\n line-height: 1.5;\n\n &:focus {\n @include focus--glow;\n }\n}\n\n\n/*\n@mixin no-radio__input {\n display: inline-block;\n width: 0;\n margin: 0;\n padding: 0;\n opacity: 0;\n overflow: hidden;\n}\n\n@mixin no-radio__label {\n display: inline-block;\n position: relative;\n left: -1rem;\n padding: .2rem .6rem;\n @include small-uppercase;\n font-size: .8rem;\n font-weight: normal;\n background: transparent;\n border-radius: 3px;\n transition: all .2s;\n}*/\n\n@mixin radio-block__legend {\n @include legend;\n margin-bottom: 0.6rem;\n}\n\n@mixin radio-block__input {\n position: absolute;\n z-index: 9;\n margin-left: 9px;\n}\n\n@mixin radio-block__label {\n text-transform: capitalize;\n background: #f2f2f2;\n display: block;\n padding: 5px 10px 5px 39px;\n position: relative;\n top: -6px;\n box-shadow: inset -1px -1px 0 rgba(0,0,0,.1), inset 30px 0px 0 rgba(255,255,255,.7), inset 31px 0px 0 rgba(0,0,0,.1);\n}\n\n@mixin radio-block__label--checked {\n background: $blue;\n color: #fff;\n text-shadow: 0 0 1px rgba(0,0,0,.7);\n}\n\n@mixin radio-block__label--focus {\n z-index: 8;\n @include focus--glow ;\n}\n\n@mixin radio-inline__legend {\n @include legend;\n}\n\n@mixin radio-inline__input {\n @include screen-reader-text;\n}\n\n@mixin radio-inline__label {\n text-transform: capitalize;\n display: inline-block;\n padding: 0.2rem 0.5rem;\n border-radius: 3px;\n cursor: pointer;\n}\n\n@mixin radio-inline__label--checked {\n @include radio-block__label--checked ;\n}\n\n@mixin radio-inline__label--focus {\n @include radio-block__label--focus ;\n}\n\n@mixin select--wide--chevron {\n width: 100%;\n -webkit-appearance: none;\n -moz-appearance: none;\n appearance: none;\n font-size: 0.85rem;\n padding: 0.7rem 32px 0.7rem 0.8rem;\n border: 1px solid #bbb;\n border-radius: 3px;\n margin-bottom: 1.6rem;\n background: url(../svg/chevron-down.svg) 100% 50% no-repeat;\n background-color: #fff;\n box-shadow: inset -26px 0 0 rgba(0,0,0,.1);\n}\n\n\n#enp-quiz {\n\n fieldset {\n border: none;\n margin: 0;\n padding: 0;\n }\n\n .enp-label {\n @include label;\n &__sm {\n font-size: small;\n }\n }\n\n .enp-legend {\n @include legend;\n padding-top: 0;\n }\n\n .enp-input {\n @include input;\n &__sm {\n padding: 5px;\n margin-bottom: 5px;\n }\n &.enp-input--has-description {\n margin-bottom: 0.2rem;\n }\n }\n\n .enp-textarea-description,\n .enp-input-description {\n margin-bottom: 1rem;\n font-size: 0.85rem;\n }\n\n .enp-textarea-description--before,\n .enp-input-description--before {\n margin-bottom: 0;\n }\n\n .enp-input::placeholder,\n .enp-textarea::placeholder {\n font-family: $fontBody;\n font-weight: 300;\n color: lighten($font, 40);\n }\n\n .enp-textarea {\n @include textarea;\n\n &.enp-textarea--has-description {\n margin-bottom: 0.2rem;\n }\n &.enp-textarea--has-description--before {\n margin-bottom: 1.2rem;\n }\n }\n\n .enp-embed-code {\n @include textarea;\n padding: 1.6rem;\n font-size: 0.7rem;\n font-family: Monaco, Consolas, \"Andale Mono\", \"DejaVu Sans Mono\", monospace;\n\n @include media(max-medium) {\n padding: .8rem;\n }\n }\n}\n","#enp-quiz {\n // .enp-publish-page-container,\n // .enp-preview-page-container {\n // @include container--wide;\n // position: relative;\n // @include xpadding-vertical;\n // background: $really_light_gray;\n\n\n // }\n\n .enp-publish-page-container,\n .enp-quiz-form-container,\n .enp-preview-page-container {\n display: grid;\n grid-column: 2/-1;\n gap: 1rem;;\n width: 100%;\n justify-items: center;\n \n @include media(max-small) {\n padding-left: 8px;\n padding-right: 8px;\n }\n @include breakpoint(medium) {\n justify-items: start;\n }\n }\n // .enp-breadcrumb-link__container {\n // display: grid;\n // grid-column: 1/span 1;\n // justify-content: center;\n // align-items: flex-start;\n // @include xpadding-vertical;\n // }\n .enp-quiz-form {\n display: grid;\n padding-left: 0;\n padding-right: 0;\n @include breakpoint(medium) {\n width: 100%;\n max-width: 40rem;\n }\n }\n\n .enp-preview-page-flex-container {\n display: grid;\n gap: 1rem;\n\n @include breakpoint(medium) {\n grid-template-columns: 1fr 3fr;\n // padding: 0 2rem;\n }\n }\n\n .enp-quiz-title__label {\n @include label--bold;\n }\n\n .enp-quiz-title__textarea {\n @include input--xl;\n }\n \n textarea {\n color: #000;\n }\n\n .enp-accordion-container {\n margin-bottom: 1.6rem;\n position: relative;\n }\n\n .enp-question-content {\n @include accordion;\n padding-top: 0;\n position: relative;\n }\n\n .enp-question-inner {\n padding: 1.6rem 1.6rem 1rem;\n\n @include breakpoint(medium) {\n padding-right: 2.8rem;\n padding-left: 2.9rem;\n }\n\n }\n\n .enp-question-title__label {\n @include label--bold;\n }\n\n .enp-question-title__textarea {\n @include input--large;\n }\n\n .enp-question-image-upload {\n @include btn--dashed--light--alt-bg;\n @include small-uppercase;\n position: relative;\n margin-bottom: 2rem;\n transform: translate3d(0, 0, 0);\n transition: all .3s $fastInEaseOut;\n\n .enp-question-image-upload__icon--photo {\n @include icon--xxxl;\n opacity: 0;\n position: absolute;\n top: 0;\n left: 0;\n right: 0;\n margin: 0 auto;\n transform: translate3d(0, 0, 0);\n z-index: -1;\n transition: opacity .2s, transform .3s $fastInEaseOut;\n }\n\n .enp-question-image-upload__icon--add {\n @include icon--circle--small;\n @include icon--gray-bg;\n margin-right: 5px;\n position: relative;\n top: 0.2rem;\n }\n\n &:hover,\n &:focus,\n &:active {\n padding-top: 5rem;\n padding-bottom: 2rem;\n\n .enp-question-image-upload__icon--photo {\n opacity: 1;\n z-index: 1;\n transform: translate3d(0, 1.75rem, 0);\n }\n\n .enp-question-image-upload__icon--add {\n @include icon--gray-bg--hover;\n }\n }\n }\n\n .enp-question-image__container {\n position: relative;\n margin-bottom: 1rem;\n }\n\n .enp-question-image {\n margin-bottom: 1.2rem;\n }\n\n @include radio-inline(enp-question-type);\n\n .enp-question-type__label {\n position: relative;\n z-index: 9;\n }\n\n .enp-slider-options,\n .enp-mc-options {\n margin-top: 0rem;\n display: none;\n animation: slideOutTop .25s $fastInEaseOut forwards;\n animation-delay: 0s, .05s;\n }\n\n .enp-question-type__input--slider:checked ~ .enp-slider-options,\n .enp-question-type__input--mc:checked ~ .enp-mc-options {\n visibility: visible;\n display: block;\n animation: fadeIn .45s $fastInEaseOut forwards;\n }\n\n .enp-mc-options__list {\n @include ul-no-style;\n }\n\n .enp-mc-option {\n position: relative;\n padding-left: 6px;\n\n @include breakpoint(medium) {\n padding-left: 0;\n }\n }\n\n .enp-mc-options__legend {\n @include legend--bold;\n }\n\n .enp-mc-option__add,\n .enp-mc-option__button--correct,\n .enp-mc-option__button--delete {\n display: none;\n }\n\n .enp-question-type__input--mc:checked ~ .enp-mc-options {\n .enp-mc-option__add,\n .enp-mc-option__button--correct,\n .enp-mc-option__button--delete {\n display: block;\n }\n }\n\n .enp-button__question-image-delete,\n .enp-mc-option__button--delete {\n @include btn--reset;\n position: absolute;\n top: 9px;\n right: -24px;\n fill: #bbb;\n cursor: pointer;\n\n @include breakpoint(medium) {\n right: -30px;\n }\n\n &:focus,\n &:hover {\n fill: $red;\n }\n }\n\n .enp-mc-option__button--correct {\n @include btn--reset;\n position: absolute;\n top: 8px;\n left: -24px;\n\n @include breakpoint(medium) {\n left: -35px;\n }\n\n .enp-mc-option__icon--correct {\n @include icon--circle--pad;\n width: 28px;\n height: 28px;\n fill: #fff;\n background: #fff;\n cursor: pointer;\n border: 2px solid $fade_red;\n transition: all .2s;\n }\n\n &:focus .enp-mc-option__icon--correct,\n &:hover .enp-mc-option__icon--correct {\n background: #fff;\n border-color: $green;\n fill: $green;\n }\n\n &:disabled {\n opacity: 1;\n\n .enp-mc-option__icon--correct {\n cursor: default;\n fill: #fff;\n border: 2px solid transparent;\n }\n }\n }\n\n .enp-mc-option--correct {\n .enp-mc-option__input {\n box-shadow: inset 0 0 3px $blue;\n border: 1px solid $blue;\n }\n\n .enp-mc-option__button--correct:focus .enp-mc-option__icon--correct,\n .enp-mc-option__button--correct:hover .enp-mc-option__icon--correct,\n .enp-mc-option__icon--correct {\n fill: #fff;\n border-color: $blue;\n background: $blue;\n }\n }\n\n .enp-mc-option__add {\n @include btn--dashed--light--alt-bg;\n @include small-uppercase;\n text-align: left;\n padding: 0.7rem 0.75rem 0.8rem;\n\n .enp-mc-option__add__icon {\n @include btn--icon__icon--circle--small ;\n @include icon--gray-bg;\n position: relative;\n top: 0.2rem;\n }\n\n &:hover .enp-mc-option__add__icon {\n @include icon--gray-bg--hover;\n }\n }\n\n .enp-slider-options .enp-input {\n max-width: 11.8rem;\n }\n\n .enp-slider-range__container .enp-input,\n .enp-slider-correct__container .enp-input {\n max-width: 8.8rem;\n @include breakpoint('small') {\n max-width: 11.8rem;\n }\n }\n\n .enp-slider-preview {\n border: 1px solid #ddd;\n margin-top: 0.2rem;\n margin-bottom: 1.6rem;\n padding: 1.6rem 1.6rem .6rem;\n position: relative;\n\n .enp-label--slider-preview {\n position: absolute;\n width: 100%;\n top: 0.2rem;\n left: 0.4rem;\n font-size: 0.75rem;\n text-transform: uppercase;\n }\n }\n\n .enp-slider-range__container,\n .enp-slider-correct__container {\n @include flex-spread;\n align-items: center;\n }\n\n .enp-slider-range__helper,\n .enp-slider-correct__helper {\n color: #777;\n font-size: 0.85rem;\n background: #fff;\n padding: 0 .3rem;\n position: relative;\n\n &:before {\n content: '';\n position: absolute;\n top: 44%;\n height: 4px;\n background: #ddd;\n width: 120px;\n left: -60px;\n z-index: -1;\n transition: width 0.7s $fastInEaseOut, background 1.6s $fastInEaseOut;\n }\n }\n\n .enp-slider-options {\n margin-bottom: 2rem;\n\n .enp-accordion-header {\n text-transform: uppercase;\n font-size: 0.85rem;\n padding: 0.675rem;\n }\n\n .enp-slider-advanced-options__content {\n border: none;\n box-shadow: none;\n padding-top: 1rem;\n padding-bottom: 0;\n margin-bottom: 0;\n }\n }\n\n .enp-slider-correct-high__container {\n position: relative;\n }\n\n .enp-slider-correct-high__input-container--hidden {\n display: none;\n }\n\n .enp-slider-correct__helper--hidden {\n &:before {\n width: 0;\n background: $green;\n }\n }\n\n .enp-slider-correct-answer-range--add-range {\n @include btn--dashed--light--alt-bg;\n margin-left: 0.8rem;\n font-size: 0.7rem;\n\n @include breakpoint('small') {\n font-size: 0.8rem;\n padding: .7rem;\n }\n\n @include breakpoint('medium') {\n padding: .7rem 1.2rem;\n min-width: 11.4rem;\n }\n\n .enp-slider-correct-answer-range__icon {\n @include btn--icon__icon--circle--small ;\n @include icon--gray-bg;\n position: relative;\n left: -0.2rem;\n }\n\n &:hover .enp-slider-correct-answer-range__icon {\n @include icon--gray-bg--hover;\n }\n }\n\n .enp-slider-correct-answer-range--remove-range {\n position: absolute;\n right: -1.6rem;\n bottom: 1.6rem;\n background: none;\n border: none;\n box-shadow: none;\n padding: 0 0.1rem;\n\n .enp-slider-correct-answer-range__icon {\n width: 1.2em;\n height: 1.2em;\n fill: $dark_gray;\n }\n\n &:hover,\n &:focus {\n .enp-slider-correct-answer-range__icon {\n fill: $red;\n }\n }\n\n @include breakpoint(medium) {\n top: -0.2rem;\n right: -0.2rem;\n bottom: auto;\n }\n\n }\n\n .enp-slider-options .enp-input:read-only {\n background: $light_gray;\n }\n\n .enp-answer-explanation {\n background: $light_gray;\n padding-top: 2rem;\n box-shadow: inset 1px 0px 0 #ccc, inset -1px -1px 0 #ccc, inset 0 1px 0 #ddd;\n }\n\n .enp-answer-explanation__label {\n @include label--bold;\n\n }\n\n .enp-question__button--delete {\n @include btn--reset;\n position: absolute;\n top: 9px;\n right: 9px;\n fill: #bbb;\n cursor: pointer;\n\n @include breakpoint(medium) {\n right: -30px;\n }\n\n &:hover {\n fill: $red;\n }\n }\n\n .enp-question__move {\n position: absolute;\n left: 15px;\n\n @include breakpoint(medium) {\n left: -40px;\n }\n }\n\n .enp-sort__placeholder {\n background: #ddd;\n height: 60px;\n width: 100%;\n max-height: 120px;\n margin-bottom: 1.6rem;\n }\n\n .ui-sortable .ui-sortable-helper {\n .ui-sortable-handle {\n cursor: move;\n cursor: grabbing;\n cursor: -webkit-grabbing;\n }\n }\n \n\n .enp-question__button--move {\n @include btn--reset;\n position: absolute;\n fill: #bbb;\n cursor: pointer;\n\n &:hover, &:focus {\n fill: #333;\n }\n\n &:disabled {\n opacity: 0.5;\n }\n }\n\n .enp-question__button--move--up {\n top: 0px;\n left: -9px;\n }\n\n\n .enp-question__button--move--down {\n top: 3px;\n right: -9px;\n }\n\n .enp-quiz-form__add-question {\n @include btn--icon;\n @include btn--dashed;\n padding-top: 1rem;\n padding-bottom: 1rem;\n margin-top: 1.6rem;\n margin-bottom: 2rem;\n\n .enp-add-question__icon {\n @include btn--icon__icon--circle--small;\n @include icon--normal;\n @include icon--gray-bg;\n position: relative;\n top: 0.2rem;\n }\n\n &:hover .enp-add-question__icon {\n @include icon--gray-bg--hover;\n }\n }\n\n .enp-btn--save__btns {\n @include flex;\n align-items: center;\n align-items: flex-start;\n }\n\n .enp-quiz-form__save {\n @include btn;\n width: 100%;\n margin-bottom: 1rem;\n opacity: 0.8;\n text-shadow: 0px -1px 2px rgba(0,0,0,.6);\n\n &:hover,\n &:focus {\n opacity: 1;\n }\n\n @include breakpoint(small) {\n padding: 1.2rem 1.8rem 1.1rem;\n width: 27%;\n margin-right: 3%;\n position: relative;\n }\n }\n\n .enp-quiz-form__save--reveal {\n animation: slideInTop--reduced-opacity .3s $fastInEaseOut;\n }\n\n @include btn--icon--circle(enp-btn--next-step);\n\n .enp-btn--next-step {\n // @include btn;\n width: 100%;\n padding: 1rem 1.4rem 1rem;\n\n @include breakpoint(medium) {\n padding: 1.2rem 1.8rem 1.1rem;\n }\n .enp-btn--next-step__icon {\n width: 1rem;\n height: 1rem;\n }\n // @include breakpoint(small) {\n // width: auto;\n // }\n\n /*\n * AFTER we have removed the Save button,\n * use this code to add the preview button into the\n * header\n @include media(max-medium) {\n padding: 1rem 1.4rem 1rem;\n }\n\n @include breakpoint(medium) {\n position: absolute;\n right: 20px;\n top: 10px;\n width: auto;\n z-index: 999999;\n\n &.enp-btn--next-step--fixed {\n position: fixed;\n animation: navSlideIn .25s;\n }\n }*/\n\n }\n\n .enp-btn--next-step--reveal {\n animation: slideInTop .3s $fastInEaseOut;\n }\n\n\n // UX interactions\n .enp-mc-option--inputs,\n .enp-accordion-header--inserting {\n animation: slideInBottom .4s $fastInEaseOut forwards;\n }\n\n .enp-mc-option--remove,\n .enp-question--remove,\n .enp-question__image--remove {\n animation: removeElement .5s $fastInEaseOut forwards;\n }\n\n .enp-image-upload-wait {\n @include btn--dashed--light--alt-bg;\n padding-top: 4rem;\n padding-bottom: 4rem;\n margin-bottom: 1rem;\n width: 100%;\n }\n\n // validation\n .enp-accordion-header.question-has-error {\n color: $red;\n box-shadow: 0 0 3px $red;\n }\n\n}\n\n.enp-quiz.ui-sortable--sorting #enp-quiz .enp-accordion-content {\n display: none;\n}","#enp-quiz {\n\n\n .enp-quiz-settings-container {\n\n @include breakpoint(large) {\n // margin: 0;\n // width: 40%;\n // float: left;\n }\n }\n\n .enp-quiz-preview-container {\n\n @include breakpoint(large) {\n // width: 60%;\n // float: left;\n }\n\n }\n\n .enp-quiz-share__legend,\n .enp-quiz-settings__title {\n position: relative;\n @include small-uppercase;\n font-weight: 600;\n padding-top: 0;\n\n @include breakpoint(medium) {\n padding: 1em 0;\n }\n }\n\n .enp-quiz-settings__form {\n margin-bottom: 3rem;\n overflow: visible;\n @include breakpoint(large) {\n padding: 0;\n margin-bottom: 0;\n }\n }\n\n .enp-fieldset {\n @include breakpoint(medium) {\n // this is necessary to keep the form elements visible on top of the\n // white BG on the sidebar. We can't set this on the whole form bc\n // then the publish button won't be positioned right\n position: relative;\n }\n }\n\n .enp-title-display__legend {\n padding-top: 0;\n\n @include breakpoint(medium) {\n padding-top: 0.4rem;\n }\n }\n\n .enp-quiz-share__input,\n .enp-quiz-styles__input {\n width: 100%;\n }\n\n .enp-quiz-styles__textarea--custom-css {\n font-family: Monaco,Consolas,\"Andale Mono\",\"DejaVu Sans Mono\",monospace;\n font-size: 0.9rem;\n min-height: 200px;\n }\n\n .enp-fieldset--section {\n padding: 1.6rem 1rem;\n\n &.enp-accordion-content--open {\n margin-bottom: 0;\n }\n }\n\n .enp-quiz-share--facebook {\n margin-bottom: 2rem;\n }\n\n @include radio-inline(enp-title-display);\n @include radio-inline(enp-mc-options-order);\n\n .enp-mc-options-order {\n margin-bottom: 1.6rem;\n }\n\n .enp-quiz-share__textarea {\n min-height: 7.6rem;\n margin-bottom: 2rem;\n\n @include breakpoint('medium') {\n min-height: 4.6rem;\n }\n\n @include breakpoint('large') {\n min-height: 7.6rem;\n }\n\n\n }\n\n .enp-preview-form__submit {\n margin-top: 1.6rem;\n margin-bottom: 1.6rem;\n }\n\n .enp-quiz-preview__title {\n @include small-uppercase;\n font-weight: 600;\n @include breakpoint(medium) {\n padding: 1em 0;\n }\n }\n\n .enp-preview-form__submit {\n @include btn;\n width: 100%;\n padding-top: 0.85rem;\n padding-bottom: 0.85rem;\n margin-bottom: 1rem;\n opacity: 0.8;\n text-shadow: 0px -1px 2px rgba(0,0,0,.6);\n\n &:hover,\n &:focus {\n opacity: 1;\n }\n }\n\n .enp-preview-form__submit--publish {\n width: 100%;\n position: relative;\n z-index: 99999999;\n padding: 1.05rem 1.8rem .95rem;\n }\n\n .enp-quiz-styles__iris-wrapper {\n position: relative;\n }\n\n // Fix for WP Color Picker formatting\n .iris-picker {\n box-sizing: content-box;\n position: relative;\n z-index: 9999999999;\n top: -1.2rem;\n margin-bottom: 1rem;\n padding-bottom: 3rem;\n padding-right: 30px;\n\n @include breakpoint(large) {\n position: absolute;\n top: -4px;\n left: 0;\n }\n\n &:last-of-type {\n margin-bottom: 0;\n }\n\n .ui-slider-handle:focus,\n .ui-draggable-handle:focus .ui-slider-handle {\n box-shadow: 0 0 3px rgba(0,0,0,.75);\n }\n\n }\n\n .enp-quiz-styles__set-default {\n @include btn--ghost;\n font-size: 0.75rem;\n position: absolute;\n left: 10px;\n bottom: 10px;\n }\n\n .enp-iris__close {\n @include btn--reset;\n position: absolute;\n top: 5px;\n right: 5px;\n fill: #888;\n cursor: pointer;\n }\n\n .enp-quiz-styles__input--color {\n padding-left: 45px;\n }\n\n .enp-quiz-styles__color-demo {\n width: 30px;\n height: 30px;\n border: 1px solid #ccc;\n top: 8px;\n left: 8px;\n border-radius: 3px;\n\n position: absolute;\n }\n\n\n}\n","#enp-quiz {\n /* Removing flexbox layout temporarily\n * because it wasn't laying out correctly before content loading\n * It would snap into the correct layout after a resize or textarea highlight\n .enp-publish-page-container {\n &:before {\n @include breakpoint(medium) {\n position: absolute;\n top: 0;\n bottom: 0;\n left: -100%;\n width: 128%;\n content: '';\n background: #fff;\n border-right: 1px solid #ddd;\n }\n\n @include breakpoint(large) {\n width: 124%;\n }\n }\n\n .enp-quiz-message {\n @include breakpoint(medium) {\n margin-left: 33%;\n }\n\n @include breakpoint(large) {\n margin-left: 26%;\n }\n }\n }\n\n .enp-publish-page-flex-container {\n @include breakpoint(medium) {\n @include flex;\n align-items: stretch;\n flex-direction: row-reverse;\n }\n }\n\n .enp-publish-page__aside-container {\n\n @include breakpoint(medium) {\n position: relative;\n margin: 0 6% 0 0;\n padding: 0;\n width: 24%;\n }\n\n @include breakpoint(large) {\n margin: 0;\n //padding-left: 20px;\n width: 20%;\n }\n }\n\n .enp-share-quiz__container,\n .enp-ab-ad__container {\n @include breakpoint(medium) {\n padding: 0;\n border: none;\n }\n }\n */\n\n .enp-share-quiz__url {\n display: block;\n font-size: 1.5rem;\n line-height: 1.4;\n word-wrap: break-word;\n }\n\n @include share_icons(enp-share-quiz);\n\n .enp-share-quiz {\n justify-content: space-around;\n margin-bottom: 0;\n }\n}\n","#enp-quiz {\n .enp-ab-create__container {\n @include container--wide;\n width: 100%;\n background: $really_light_gray;\n padding-top: 3rem;\n padding-bottom: 3rem;\n }\n\n .enp-ab-create__form {\n @include container--thin;\n }\n\n .enp-ab-create__label {\n @include label--bold;\n }\n\n .enp-ab-create-title__textarea {\n @include input--xl;\n width: 100%;\n }\n\n .enp-ab-create__select {\n @include select--wide--chevron;\n }\n\n .enp-ab-create__submit {\n width: 100%;\n padding-top: 1em;\n padding-bottom: 1em;\n }\n}\n","// TEMP for dev theme\n#headerimg h1 {\n text-align: center;\n font-size: 40px !important;\n}\n#enp-quiz {\n\n &.enp-quiz__main {\n @include container;\n display: grid;\n gap: 1em;\n min-height: 85vh;\n \n @include breakpoint(large) {\n @include container--wide;\n grid-template-columns: 1fr 4fr;\n }\n }\n\n .enp-dash-container {\n @include xpadding-vertical;\n @include xpadding-horizontal;\n transition: all .25s $fastInEaseOut;\n }\n\n .enp-dash__section-aside {\n background-color: $background;\n @include breakpoint(medium) {\n @include xpadding-vertical;\n @include xpadding-horizontal;\n }\n }\n\n .enp-breadcrumb-link__container {\n padding-bottom: 2rem;\n }\n\n .enp-search-quizzes {\n display: flex;\n justify-content: space-between;\n flex-wrap: wrap;\n padding: 1em;\n\n @include breakpoint(medium) {\n padding: 0.2rem 0;\n flex-wrap: nowrap;\n }\n @include breakpoint(large) {\n @include flex-spread-vertical;\n }\n }\n\n .enp-search-quizzes__form-item {\n margin-bottom: 0.6rem;\n flex: 0 1 48%;\n\n @include breakpoint(small) {\n margin-bottom: 0;\n margin-right: 1rem;\n flex: 1 0 auto;\n }\n\n }\n\n .enp-quiz-search {\n flex: 1 0 100%;\n position: relative;\n @include breakpoint(medium) {\n flex: 1 0 auto;\n }\n }\n\n .enp-search-quizzes__label {\n margin-bottom: 0;\n @include screen-reader-text ;\n }\n\n .enp-search-quizzes__select {\n padding: .3rem;\n border-radius: 3px;\n width: 100%;\n @include breakpoint(large) {\n min-width: 200px;\n font-size: 0.85rem;\n }\n }\n\n .enp-quiz-search__input {\n width: 100%;\n margin: 0 0 0.1rem;\n padding: .3rem .3rem .3rem 26px;\n font-size: 0.85rem;\n @include breakpoint(medium) {\n // max-width: 200px;\n }\n }\n\n .enp-quiz-search__icon {\n position: absolute;\n bottom: 0.3rem;\n left: 0.2rem;\n width: 21px;\n height: 21px;\n }\n\n .enp-search-quizzes__button {\n padding: 0.2rem 0.8rem;\n }\n\n .enp-search-results-description {\n font-size: 0.85rem;\n }\n\n .enp-search-results-description__link {\n white-space: nowrap;\n }\n\n .enp-search-results-description__icon {\n width: 1.3em;\n height: 1.3em;\n position: relative;\n top: 4px;\n left: 2px;\n }\n\n .enp-dash__section-title {\n @include small-uppercase;\n margin-bottom: 0.325rem;\n border-bottom: 1px solid $dark-gray;\n @include breakpoint(medium) {\n padding: 1em 0;\n }\n }\n\n .enp-dash__ab-test-helper--not-enough-quizzes {\n color: $darker-gray;\n }\n\n .enp-view-toggle {\n cursor: pointer;\n opacity: .5;\n display: none; // hide the buttons for small screens\n\n @include breakpoint(medium) {\n display: flex;\n }\n }\n\n .enp-view-toggle__active {\n opacity: 1;\n }\n\n .enp-sort-by {\n margin-left: 5px;\n }\n\n .enp-dash-list {\n @include flex-grid;\n }\n\n .enp-dash-item {\n @include flex-grid__item ;\n @include flex-spread-vertical;\n display: flex;\n z-index: 1;\n flex-direction: column;\n align-content: flex-end;\n justify-content: flex-end;\n border: none;\n border-radius: 3px;\n background-color: $gray;\n }\n\n .enp-dash-item--published {\n box-shadow: inset 4px 0 0 $blue, 0 1px 0 rgba(0,0,0,.1);\n }\n\n .enp-dash-item--draft {\n box-shadow: inset 4px 0 0 $light_blue, 0 1px 0 rgba(0,0,0,.1);\n .enp-dash-item__title a {\n color: $dark_blue;\n }\n }\n\n .enp-dash-item--remove {\n animation: removeElement .5s $fastInEaseOut forwards;\n }\n\n .enp-dash-list--list-view {\n .enp-dash-item {\n margin: 0 0 0.8rem;\n flex-basis: 100%;\n }\n }\n\n .enp-dash-item__spinner {\n @include flex-center ;\n position: absolute;\n top: 0;\n bottom: 0;\n left: 0;\n right: 0;\n background: rgba(245,216,216,0.8);\n width: 100%;\n animation: fadeIn .3s $fastInEaseOut;\n }\n\n .enp-dash-item__header {\n padding: 0.5rem 1rem;\n background: $light_gray;\n border-bottom: 1px solid $dark_gray;\n display: flex;\n justify-content: space-between;\n align-items: center;\n @include border-radius;\n }\n\n .enp-dash-item__title {\n @include flex-grid__title ;\n padding: 0;\n margin-bottom: 0;\n a {\n color: $blue;\n }\n }\n\n .enp-dash-item__content {\n padding: 0rem 0 0.375rem;\n position: relative;\n transition: all .2s $fastInEaseOut;\n }\n\n .enp-dash-item__meta {\n @include hint;\n font-size: 0.75rem;\n }\n\n .enp-dash-item__username {\n word-wrap: break-word;\n padding-left: 0.4rem;\n margin-left: 0.2rem;\n border-left: 1px solid #ddd;\n }\n\n .enp-dash-item__title--ab-test {\n padding-bottom: 0;\n }\n\n .enp-dash-item__ab-quizzes {\n @include ul-no-style;\n font-size: 0.85rem;\n color: $dark_gray;\n margin-bottom: 0.8rem;\n }\n\n .enp-dash-item__nav {\n @include ul-no-style;\n margin-bottom: 0;\n font-size: 0.85rem;\n }\n\n .enp-dash-item__nav__item {\n display: flex;\n margin: 0;\n width: 100%;\n align-items: center;\n &:hover {\n background-color: $gray;\n .enp-dash-item__icon {\n fill: $red;\n }\n }\n a {\n font-weight: normal;\n color: $darker_gray;\n @include flex;\n align-items: center;\n width: 100%;\n padding: 12px;\n &:focus,\n &:hover {\n color: $red;\n outline: 1px dotted $link;\n outline-offset: 1px;\n .enp-dash-item__icon {\n fill: $red;\n }\n }\n }\n }\n .enp-delete-quiz {\n width: 100%;\n &:hover {\n .enp-dash-item__delete {\n color: $red;\n }\n .enp-icon {\n fill: $red;\n }\n }\n }\n .enp-dash-item__delete {\n @include btn--reset;\n @include flex;\n padding: 12px;\n align-items: center;\n position: relative;\n line-height: 1.6;\n color: $darker_gray;\n cursor: pointer;\n width: 100%;\n .enp-icon {\n fill: $darker_gray;\n }\n }\n .enp-dash-item__icon {\n fill: $darker_gray;\n width: 15px;\n height: 15px;\n margin-right: 10px;\n }\n\n .enp-dash-item__nav--collapsible {\n display: none;\n position: absolute;\n z-index: 2;\n top: 44px;\n right: -17px;\n width: 195px;\n background-color: #fff;\n text-align: left;\n transform: translate3d(0,0,0);\n transition: all .2s $fastInEaseOut;\n\n .enp-dash-item__nav__item {\n cursor: pointer;\n }\n }\n\n .enp-dash-item__menu-action {\n height: 24px;\n background: none;\n border: none;\n color: #444;\n padding: 0;\n bottom: 0.2rem;\n right: 1.5rem;\n top: 1.5rem;\n cursor: pointer;\n }\n\n .enp-dash-item__menu-action-wrap {\n max-width: 0;\n display: flex;\n flex-direction: column;\n align-items: flex-end;\n }\n\n .enp-dash-item__menu-action__icon {\n width: 15px;\n height: 15px;\n fill: $darker_gray;\n transition: all .3s $fastInEaseOut;\n }\n\n .enp-dash-item__menu-action__icon--bottom {\n \n }\n\n .enp-dash-item--menu-active {\n transform: translate3d(0,-3px,0);\n z-index: 2;\n .enp-dash-item__nav-wrap {\n position: relative;\n }\n\n &.enp-dash-item--published {\n box-shadow: inset 4px 0 0 $green, 0 2px 2px rgba(0,0,0,.2);\n }\n\n &.enp-dash-item--draft {\n box-shadow: inset 4px 0 0 lighten($green, 25%), 0 2px 2px rgba(0,0,0,.2);\n }\n\n .enp-dash-item__menu-action__icon--bottom {\n transform: rotateX(180deg);\n }\n\n .enp-dash-item__nav--collapsible {\n display: block;\n animation: slideInTop .25s $fastInEaseOut forwards;\n @include border-radius;\n @include box-shadow;\n }\n\n .enp-dash-item__content {\n opacity: 0.4;\n }\n\n }\n\n\n .enp-quiz-results {\n display: flex;\n justify-content: space-around;\n list-style: none;\n margin: 0.8rem 0 0;\n padding: 0;\n text-align: center;\n }\n\n .enp-quiz-results__item {\n\n margin: 0 2% 0 0;\n padding: 0;\n color: #454545;\n\n @media (max-width:280px) {\n width: 100%;\n padding: 0;\n margin-bottom: 0.6rem;\n }\n }\n\n .enp-quiz-results__number {\n font-size: 1.6rem;\n line-height: 1;\n position: relative;\n }\n\n .enp-dash-item--draft .enp-quiz-results__number {\n opacity: 0.5;\n }\n\n .enp-quiz-results__number--average-score {\n color: darken($green, 8);\n\n &:after {\n content: '%';\n font-size: .9rem;\n position: absolute;\n top: .3rem;\n right: -1rem;\n }\n }\n\n .enp-quiz-results__label {\n text-transform: uppercase;\n font-size: .7rem;\n font-weight: 300;\n color: #888;\n }\n\n\n .enp-quiz-list__view {\n // @include flex-bottom;\n }\n\n .enp-dash-item--add-new__wrap {\n display: grid;\n gap: 1em;\n grid-template-columns: 1fr 1fr;\n }\n\n .enp-dash-list--quiz__container {\n display: grid;\n gap: 1em;\n @include breakpoint(large) {\n grid-template-columns: 1fr 1fr;\n }\n }\n\n .enp-dash-item--add-new {\n background: none;\n border: none;\n padding: 0;\n position: relative;\n @include header-space;\n }\n\n .enp-dash-link--add-new {\n @include btn--dashed--light;\n justify-content: flex-start;\n color: $light_blue;\n padding: 1rem 1.2rem;\n\n\n @include breakpoint(medium) {\n @include small-uppercase;\n @include flex-center;\n flex-direction: column;\n position: absolute;\n top: 0;\n left: 0;\n right: 0;\n bottom: 0;\n }\n\n .enp-dash-link__icon {\n @include icon--circle;\n @include icon--normal;\n margin-right: 5px;\n background-color: $light_blue;\n\n @include breakpoint(medium) {\n width: 2rem;\n height: 2rem;\n margin: 0.8rem 0 0.2rem;\n }\n }\n\n &:hover {\n color: $dark_blue;\n\n .enp-dash-link__icon {\n fill: #fff;\n background: $dark_blue;\n }\n }\n\n }\n\n .enp-quiz-message--welcome p {\n color: $font;\n }\n\n // pagination\n .enp-paginate {\n @include ul-no-style ;\n @include flex-center ;\n font-size: 1rem;\n }\n\n .enp-paginate__link {\n @include flex-center ;\n margin: 0 0.2rem;\n padding: 0 0.4rem;\n border-radius: 3px;\n font-weight: normal;\n\n }\n\n .enp-paginate__link--current-page {\n border: 2px solid $blue;\n }\n\n .enp-paginate__item--last-page,\n .enp-paginate__item--first-page {\n display: flex;\n }\n\n .enp-paginate__item--first-page:after,\n .enp-paginate__item--last-page:before {\n content: '...';\n font-size: 1rem;\n position: relative;\n bottom: 0.2rem;\n opacity: 0.6;\n }\n\n .enp-paginate__item--no-gap {\n &:before,\n &:after {\n content:'';\n }\n }\n\n .enp-paginate__item--next-page {\n margin-left: 0.2rem;\n }\n\n .enp-paginate__item--previous-page {\n margin-right: 0.2rem;\n }\n}\n","#enp-quiz {\n .enp-quiz-breadcrumbs {\n grid-row: 1;\n // @include flex-center;\n // position: absolute;\n // top: 0;\n // width: 1000%;\n // left: -500%;\n // right: -500%;\n // margin-left: auto;\n // margin-right: auto;\n // background: #fff;\n // border-bottom: 1px solid #ddd;\n // padding: 10px;\n // z-index: 99999;\n }\n\n .enp-quiz-breadcrumbs__list {\n @include flex-inline;\n }\n\n .enp-quiz-breadcrumbs__item {\n @include flex-inline__item ;\n @include flex-center;\n fill: $link;\n margin-right: 5px;\n\n @include breakpoint(small) {\n margin-right: 10px;\n }\n }\n\n .enp-quiz-breadcrumbs__link--disabled {\n @include disabled;\n }\n\n .enp-quiz-breadcrumbs__link--active {\n @include btn--ghost;\n @include btn--thin;\n }\n\n .enp-quiz-breadcrumbs__link {\n font-size: 1rem;\n font-weight: 400;\n text-transform: none;\n letter-spacing: 0;\n }\n\n // JS\n .enp-quiz-breadcrumbs--fixed {\n top: 0;\n position: fixed;\n animation: navSlideIn .25s;\n }\n}\n","#enp-quiz {\n .enp-results-title {\n font-size: 1.6rem;\n text-align: center;\n padding: 3.2rem 20px 2.6rem;\n background: $really_light_gray;\n margin: -1.2rem 0 2rem;\n border-bottom: 1px solid #ddd;\n\n &:after {\n @include small-uppercase;\n display: block;\n content: \"RESULTS\";\n font-weight: normal;\n }\n }\n\n .enp-results__container {\n @include container--wide;\n display: block;\n\n @include breakpoint(large) {\n display: flex;\n @include flex-spread;\n }\n }\n\n .enp-results__container,\n .enp-quiz-scores__container,\n .enp-results-flow__container {\n @include media(max-medium) {\n padding: 8px;\n }\n }\n\n .enp-quiz-scores__container,\n .enp-results-flow__container {\n width: 100%;\n\n @include breakpoint(large) {\n width: 48%;\n }\n }\n\n .enp-quiz-scores {\n margin-top: 2.6rem;\n }\n\n .enp-quiz-score__line-chart {\n height: 300px;\n margin-bottom: 1rem;\n\n .ct-label {\n color: $font;\n }\n\n .ct-grid {\n stroke: #dadada;\n stroke-dasharray: 0;\n }\n\n .ct-line {\n stroke: $green;\n stroke-width: 2px;\n }\n\n .ct-point {\n stroke: $green;\n stroke-width: 8px;\n }\n }\n\n .enp-quiz-scores-table {\n width: 100%;\n max-width: 500px;\n margin: 0 auto;\n\n tr th {\n background-color: #fff;\n }\n }\n\n .enp-quiz-scores-table__label {\n padding-left: 5%;\n }\n\n .enp-quiz-scores-table__score {\n text-align: right;\n padding-right: 5%;\n }\n\n .enp-results-flow {\n position: relative;\n margin: 2rem auto;\n width: 320px;\n height: 320px;\n border-radius: 50%;\n\n @include media(300px) {\n left: -100px;\n }\n\n @include breakpoint(small) {\n width: 390px;\n height: 390px;\n }\n\n @include breakpoint(medium) {\n width: 450px;\n height: 450px;\n }\n\n @include breakpoint(large) {\n width: 400px;\n height: 400px;\n }\n\n }\n\n .enp-results-flow__section-title {\n @include screen-reader-text;\n }\n\n .enp-results-flow__item {\n border-radius: 50%;\n text-align: center;\n height: 100%;\n width: 100%;\n margin: 0 auto;\n left: 0;\n right: 0;\n padding: 12.5% 0 0;\n letter-spacing: 0.05rem;\n border: 2px solid $green;\n animation: 0.85s slideInBottom $fastInEaseOut forwards;\n }\n\n .enp-results-flow__item--total-views {\n background: #fff;\n }\n\n .enp-results-flow__item--quiz-starts {\n width: 65%;\n height: 65%;\n position: absolute;\n padding-top: 8%;\n bottom: 2.5%;\n background: lighten($green, 48);\n }\n\n .enp-results-flow__item--quiz-finishes {\n width: 35%;\n height: 35%;\n position: absolute;\n bottom: 5%;\n background: lighten($green, 35);\n }\n\n .enp-results-flow__title {\n @include small-uppercase;\n color: #444;\n font-size: .7rem;\n margin-bottom: 0px;\n\n @include breakpoint(medium) {\n font-weight: bold;\n margin-bottom: 2px;\n }\n }\n\n .enp-results-flow__number {\n font-weight: bold;\n font-size: 1.4rem;\n line-height: 1.2;\n }\n\n .enp-results-flow__number--total-views {\n font-size: 2rem;\n }\n\n .enp-results-flow__number--quiz-starts {\n font-size: 1.65rem;\n }\n\n .enp-results-flow__percentage {\n font-size: .8rem;\n font-weight: normal;\n position: relative;\n display: inline-block;\n top: -0.7em;\n left: -.1rem;\n color: #444;\n\n &:after {\n content: '%';\n position: absolute;\n right: -0.75rem;\n font-size: .7rem;\n color: #444;\n }\n }\n\n .enp-results-questions__section {\n // @include section--alt;\n padding-top: 5rem;\n padding-bottom: 3rem;\n margin-top: 5rem;\n margin-bottom: 3rem;\n @include breakpoint(medium) {\n @include xmargin-horizontal;\n }\n }\n\n .enp-results-questions__container {\n @include media(max-small) {\n padding-left: 8px;\n padding-right: 8px;\n }\n }\n\n .enp-results-questions__header {\n align-items: flex-start;\n flex-direction: column;\n\n @include breakpoint(small) {\n @include flex-spread;\n flex-direction: row;\n align-items: flex-end;\n }\n }\n\n .enp-results-questions__title {\n @include small-uppercase;\n }\n\n .enp-results-questions__key {\n @include small-uppercase;\n }\n\n .enp-results-questions {\n @include ul-no-style;\n }\n\n .enp-results-question {\n width: 100%;\n font-size: 1rem;\n padding: 0;\n margin-bottom: 1rem;\n }\n\n .enp-results-question__header {\n padding: 1rem 1.2rem;\n position: relative;\n }\n\n .enp-results-question__question,\n .enp-results-question__stats {\n font-size: 1rem;\n line-height: 1.4;\n }\n\n .enp-results-question__question {\n font-weight: normal;\n\n @include breakpoint(small) {\n padding-right: 7em;\n margin-bottom: 0;\n }\n }\n\n .enp-results-question__stats {\n font-size: .9rem;\n\n @include breakpoint(small) {\n position: absolute;\n bottom: 1rem;\n right: 1.2rem;\n text-align: right;\n }\n }\n\n .enp-results-questions__key,\n .enp-results-question__stats {\n font-weight: 300;\n }\n\n .enp-results-question__content {\n padding: 2rem 1.2rem 1.2rem;\n @include border-radius;\n }\n\n .enp-results-question__deep-stats {\n @include flex-spread-around;\n @include ul-no-style;\n text-align: center;\n\n @include media(500px) {\n flex-wrap: wrap;\n }\n }\n\n .enp-results-question__deep-stat {\n\n @include media(500px) {\n width: 48%;\n margin: 0 2% 2% 0;\n padding: 1.6rem 0;\n\n &:nth-child(even) {\n margin-right: 0;\n }\n }\n\n @include media(280px) {\n width: 100%;\n padding: 0;\n margin-bottom: 1.6rem;\n }\n }\n\n .enp-results-question__deep-stat__number {\n font-size: 1.8rem;\n line-height: 1;\n position: relative;\n }\n\n .enp-results-question__deep-stat__number--finishes,\n .enp-results-question__deep-stat__number--correct {\n @include dark-green;\n }\n\n .enp-results-question__deep-stat__number--incorrect {\n @include fade-red;\n }\n\n .enp-results-question__deep-stat__number--correct,\n .enp-results-question__deep-stat__number--incorrect,\n .enp-results-question__deep-stat__number--finishes {\n &:after {\n content: '%';\n font-size: .9rem;\n position: absolute;\n top: .3rem;\n right: -1rem;\n }\n }\n\n .enp-results-question__deep-stat__label {\n @include small-uppercase;\n font-size: .8rem;\n }\n\n .enp-results-question__options {\n @include ul-no-style;\n margin-bottom: 0;\n }\n\n .enp-results-question__option {\n padding: 0.8rem 0.8rem 0.8rem 0.4rem;\n border-top: 1px solid #ddd;\n @include media(max-small) {\n position: relative;\n flex-direction: column;\n }\n\n @include breakpoint(small) {\n @include flex-spread;\n flex-direction: row;\n }\n\n &:first-of-type {\n margin-top: 1.4rem;\n }\n\n }\n\n .enp-results-question__option--correct {\n background: lighten($green, 48);\n }\n\n .enp-results-question__option__text {\n flex-grow: 100;\n margin-right: 1rem;\n }\n\n .enp-results-question__option__text__helper {\n font-weight: 300;\n @include small-uppercase;\n margin-right: 0.4rem;\n }\n\n .enp-results-question__option__icon {\n @include media(max-small) {\n position: relative;\n left: -3px;\n }\n\n @include breakpoint(small) {\n margin-right: 0.3rem;\n min-width: 1.6rem;\n }\n }\n\n .enp-results-question__option__icon--incorrect {\n fill: $fade_red;\n opacity: 0.5;\n }\n\n .enp-results-question__option__icon--correct {\n fill: $dark_green;\n opacity: 1;\n }\n\n .enp-results-question__option__percentage--incorrect {\n @include fade-red;\n }\n\n .enp-results-question__option__percentage--correct {\n @include dark-green;\n }\n\n .enp-results-question__option__number-selected {\n font-weight: 300;\n\n @include media(max-small) {\n position: absolute;\n top: 0.8rem;\n right: 0.8rem;\n }\n }\n\n .enp-slider-responses__title {\n @include small-uppercase;\n font-weight: 400;\n margin-top: 1.6rem;\n }\n\n .enp-slider-responses__line-chart {\n .ct-point {\n stroke-width: 8px;\n }\n }\n\n .enp-slider-responses__line-chart--low,\n .enp-slider-responses__line-chart--high {\n stroke: $red;\n }\n\n .enp-slider-responses__line-chart--correct {\n stroke: $green;\n }\n\n .enp-slider-responses-table {\n width: 100%;\n }\n\n .enp-slider-responses-table tr:nth-child(even) td {\n background-color: #fff;\n }\n\n .enp-slider-responses-table tr.enp-slider-responses-table__response--correct td {\n background-color: lighten($green, 48);\n }\n\n .enp-slider-responses-table__content {\n box-shadow: none;\n padding-top: 1rem;\n }\n\n .enp-slider-responses-table--hide-zero {\n .enp-slider-responses-table__frequency--zero {\n display: none;\n }\n }\n\n .enp-slider-responses-table__response-frequency {\n @include flex-spread ;\n align-items: center;\n }\n\n .enp-slider-responses-table__toggle-zero-frequency {\n @include accordion__header ;\n width: auto;\n padding: 0 0.6rem;\n margin: 0;\n }\n\n\n\n}\n\n.enp-quiz-results {\n #enp-quiz .enp-aside {\n border: none;\n }\n\n .enp-results-questions__title__quiz-title {\n @include screen-reader-text;\n }\n}\n","#enp-quiz {\n\n .enp-results--ab {\n display: block;\n margin-bottom: 3rem;\n\n @include breakpoint(large) {\n display: flex;\n flex-wrap: wrap;\n align-content: flex-end;\n width: 50%;\n padding: 10px;\n }\n\n }\n\n .enp-results--a {\n @include breakpoint(large) {\n padding-right: 1rem;\n border-right: 1px solid #ddd;\n }\n }\n\n .enp-results--b {\n @include breakpoint(large) {\n padding-left: 1rem;\n }\n }\n\n .enp-results-title--ab,\n .enp-results__container--ab .enp-results-flow__container {\n min-width: 100%;\n }\n\n .enp-results--loser {\n .enp-results-flow__item {\n border: 2px solid $red;\n }\n\n .enp-results-flow__item--quiz-starts {\n background: lighten($red, 42);\n }\n\n .enp-results-flow__item--quiz-finishes {\n background: lighten($red, 34);\n }\n\n th,\n .enp-results-questions__title {\n color: $dark_red;\n }\n\n }\n\n .enp-results--winner {\n th,\n .enp-results-questions__title {\n color: $dark_green;\n }\n\n }\n\n .enp-results-title--a,\n .enp-results-title--b {\n background: transparent;\n }\n\n .enp-ab-scores {\n @include container--wide;\n\n th.enp-quiz-scores-table__label,\n th.enp-quiz-scores-table__score {\n padding-left: 0;\n padding-right: 0;\n }\n }\n\n .enp-ab-scores__title {\n padding-left: 50px;\n @include small-uppercase;\n }\n\n .enp-quiz-score__line-chart .enp-test-loser {\n\n .ct-line,\n .ct-point {\n stroke: $red;\n }\n }\n\n .enp-quiz-scores {\n margin-top: 0;\n }\n\n .enp-question-results,\n .enp-ab-scores .enp-quiz-scores-table {\n margin-bottom: 1.6rem;\n\n @include breakpoint(large) {\n float: left;\n width: 48%;\n margin: 0;\n\n &:first-of-type {\n margin-right: 4%;\n }\n }\n }\n\n .enp-question-results__container {\n @include container--wide;\n }\n\n .enp-question-results--ab {\n\n .enp-results-questions__section {\n background: #fff;\n border: none;\n padding: 1.6rem 0;\n margin: 1.6rem auto;\n }\n\n .enp-results-questions__container {\n padding: 0;\n }\n\n }\n\n .enp-ab-new-embed-code__section {\n @include container--thin;\n max-width: 540px;\n padding-bottom: 2rem;\n margin-bottom: 2rem;\n\n .enp-ab-embed-code {\n padding: 0;\n margin: 0;\n }\n }\n\n .enp-ab-embed-code__section {\n @include section--alt;\n padding-top: 5rem;\n margin-top: 5rem;\n }\n\n .enp-ab-embed-code {\n @include container;\n }\n\n .enp-ab-embed-code__title {\n @include small-uppercase;\n }\n\n .enp-embed-code__textarea {\n margin-bottom: 0;\n }\n\n .enp-embed-code__instructions {\n font-size: 1.1rem;\n }\n}\n","#enp-quiz {\n\n .enp-slider {\n margin-bottom: 1.6rem;\n }\n\n .enp-slider-input__container {\n display: flex;\n align-items: center;\n justify-content: center;\n margin: 1.6rem auto;\n position: relative;\n }\n\n .enp-slider-input__label {\n @include label;\n }\n\n .enp-slider-input__prefix,\n .enp-slider-input__suffix {\n font-size: 1rem;\n }\n\n .enp-slider-input__prefix {\n margin-right: .2rem;\n white-space: pre;\n }\n\n .enp-slider-input__suffix {\n margin-left: .2rem;\n white-space: pre;\n }\n\n .enp-slider-input__input {\n @include input;\n margin-bottom: 0;\n padding: .75rem;\n width: auto;\n transition: all .25s $fastInEaseOut;\n }\n\n .enp-slider-input__input--incorrect {\n color: $red;\n }\n\n .enp-slider-input__input--correct {\n color: $dark_green;\n }\n\n .enp-slider-input__input--invalid-animation {\n box-shadow: 0 0 2px 1px $fade_red;\n }\n\n .enp-slider_input__range-helper {\n position: absolute;\n bottom: -1.2rem;\n font-size: 0.8rem;\n }\n\n .enp-slider_input__range-helper--low {\n left: 0;\n }\n\n .enp-slider_input__range-helper--high {\n right: 0;\n }\n\n .enp-slider-input__range-helper__number {\n position: relative;\n color: $dark_gray;\n }\n\n .enp-slider_input__range-helper__number--low {\n\n }\n\n .enp-slider_input__range-helper__number--high {\n\n }\n\n .ui-slider-range-show-correct__tooltip-container {\n position: relative;\n }\n\n .ui-slider-range-show-correct__tooltip {\n position: absolute;\n top: -0.4rem;\n margin-left: -0.55rem;\n height: 1rem;\n width: 1.1rem;\n height: 1.1rem;\n border: 2px solid $green;\n background-color: #fff;\n border-radius: 50%;\n z-index: 9999;\n }\n\n .ui-slider-range-show-correct__tooltip--low {\n left: 0;\n }\n\n .ui-slider-range-show-correct__tooltip--high {\n right: -0.55rem;\n }\n\n .ui-slider-range-show-correct__tooltip__text {\n position: relative;\n color: darken($green, 15);\n top: -1.35rem;\n font-size: .825rem;\n min-width: 100%;\n display: inline-block;\n text-align: center;\n text-shadow: 0 1px 0 #fff;\n }\n\n .ui-slider-range-show-correct__tooltip__text--low {\n\n }\n\n .ui-slider-range-show-correct__tooltip__text--high {\n\n }\n\n .ui-slider-range-show-correct__tooltip__text--low-center {\n //left: 0; // not perfectly centered for huge numbers, but is for small numbers\n }\n\n // JQUERY SLIDER\n .enp-slider {\n\t\tposition: relative;\n\t\ttext-align: left;\n\t\tbackground: #ddd;\n\n\t\t/* Layout helpers\n\t\t----------------------------------*/\n\t\t.ui-helper-hidden {\n\t\t\tdisplay: none;\n\t\t}\n\t\t.ui-helper-hidden-accessible {\n\t\t\tborder: 0;\n\t\t\tclip: rect(0 0 0 0);\n\t\t\theight: 1px;\n\t\t\tmargin: -1px;\n\t\t\toverflow: hidden;\n\t\t\tpadding: 0;\n\t\t\tposition: absolute;\n\t\t\twidth: 1px;\n\t\t}\n\t\t.ui-helper-reset {\n\t\t\tmargin: 0;\n\t\t\tpadding: 0;\n\t\t\tborder: 0;\n\t\t\toutline: 0;\n\t\t\tline-height: 1.3;\n\t\t\ttext-decoration: none;\n\t\t\tfont-size: 100%;\n\t\t\tlist-style: none;\n\t\t}\n\t\t.ui-helper-clearfix:before,\n\t\t.ui-helper-clearfix:after {\n\t\t\tcontent: \"\";\n\t\t\tdisplay: table;\n\t\t\tborder-collapse: collapse;\n\t\t}\n\t\t.ui-helper-clearfix:after {\n\t\t\tclear: both;\n\t\t}\n\t\t.ui-helper-clearfix {\n\t\t\tmin-height: 0; /* support: IE7 */\n\t\t}\n\t\t.ui-helper-zfix {\n\t\t\twidth: 100%;\n\t\t\theight: 100%;\n\t\t\ttop: 0;\n\t\t\tleft: 0;\n\t\t\tposition: absolute;\n\t\t\topacity: 0;\n\t\t\tfilter:alpha(opacity=0); /* support: IE8 */\n\t\t}\n\n\t\t.ui-front {\n\t\t\tz-index: 100;\n\t\t}\n\n\n\t\t/* Interaction Cues\n\t\t----------------------------------*/\n\t\t.ui-state-disabled {\n\t\t\tcursor: default !important;\n\t\t}\n\n\n\t\t/* Icons\n\t\t----------------------------------*/\n\n\t\t/* states and images */\n\t\t.ui-icon {\n\t\t\tdisplay: block;\n\t\t\ttext-indent: -99999px;\n\t\t\toverflow: hidden;\n\t\t\tbackground-repeat: no-repeat;\n\t\t}\n\n\n\t\t/* Misc visuals\n\t\t----------------------------------*/\n\n\t\t/* Overlays */\n\t\t.ui-widget-overlay {\n\t\t\tposition: fixed;\n\t\t\ttop: 0;\n\t\t\tleft: 0;\n\t\t\twidth: 100%;\n\t\t\theight: 100%;\n\t\t}\n\n\t\t.ui-slider-handle {\n\t\t\tbackground: #fff;\n\t\t\tborder-radius: 50%;\n\t\t\tborder: 1px solid #aaa;\n\t\t\tposition: absolute;\n\t\t\tz-index: 2;\n\t\t\twidth: 1.2rem;\n\t\t\theight: 1.2rem;\n top: -.4rem;\n\t\t\tmargin-left: -.6rem;\n\t\t\tcursor: default;\n\t\t\t-ms-touch-action: none;\n\t\t\ttouch-action: none;\n\t\t\ttransition: opacity 0.2s $fastInEaseOut, height .18s $fastInEaseOut, width .18s $fastInEaseOut, transform 0.18s $fastInEaseOut;\n\n @include media(max-medium) {\n width: 2rem;\n \t\t\theight: 2rem;\n top: -.85rem;\n margin-left: -1rem;\n transform: rotate(225deg);\n }\n\n\t\t\t&:focus {\n\t\t\t\toutline: none;\n\t\t\t\tbox-shadow: 0 0 3px 1px #4D90FE;\n\t\t\t}\n\n &.ui-state-active {\n @include media(max-medium) {\n width: 2.2rem;\n height: 2.2rem;\n border-top-left-radius: 0;\n transform: translate3d(-0.2rem, -0.8rem, 0) rotate(225deg);\n }\n\n }\n\n\t\t}\n\n .ui-slider-handle--correct,\n\t\t.ui-slider-handle--incorrect {\n width: 1.1rem;\n\t\t\theight: 1.1rem;\n top: -.4rem;\n margin-left: -.55rem;\n }\n\n .ui-slider-handle--incorrect {\n z-index: 1;\n\t\t\tborder: 2px solid $red;\n\t\t}\n\n .ui-slider-handle--correct {\n border: 2px solid $green;\n z-index: 99999;\n }\n\n\t\t.ui-slider-range {\n\t\t\tposition: absolute;\n\t\t\tz-index: 1;\n\t\t\tfont-size: .7rem;\n\t\t\tdisplay: block;\n\t\t\tborder: 0;\n\t\t\tbackground-position: 0 0;\n\t\t\ttop: 0;\n\t\t\theight: 100%;\n\t\t}\n\n .ui-slider-range-show-correct {\n background: $green;\n z-index: 9;\n }\n\n\t\t.ui-slider-range-min {\n\t\t\tleft: 0;\n\t\t\tbackground: $blue;\n\t\t}\n\n\t\t.ui-slider-range-max {\n\t\t\tright: 0;\n\t\t}\n\n\t\t/* support: IE8 - See #6727 */\n\t\t&.ui-state-disabled .ui-slider-handle,\n\t\t&.ui-state-disabled .ui-slider-range {\n\t\t\tfilter: inherit;\n\t\t}\n\t}\n\n\t.ui-slider-horizontal {\n\t\theight: .3rem;\n\t}\n\n\t.enp-question__answered {\n\t\t.enp-slider {\n\t\t\tbackground: #bbb;\n\t\t}\n\n\t\t.ui-slider-range-min {\n\t\t\tbackground: #fff;\n\t\t}\n\n\t}\n\n}\n"]} \ No newline at end of file diff --git a/public/quiz-create/css/sass/_dashboard.scss b/public/quiz-create/css/sass/_dashboard.scss index 08b105fb..6e4b6f6b 100644 --- a/public/quiz-create/css/sass/_dashboard.scss +++ b/public/quiz-create/css/sass/_dashboard.scss @@ -42,7 +42,7 @@ padding: 1em; @include breakpoint(medium) { - padding: 0.2rem 0.8rem; + padding: 0.2rem 0; flex-wrap: nowrap; } @include breakpoint(large) { @@ -81,6 +81,7 @@ width: 100%; @include breakpoint(large) { min-width: 200px; + font-size: 0.85rem; } } @@ -90,7 +91,7 @@ padding: .3rem .3rem .3rem 26px; font-size: 0.85rem; @include breakpoint(medium) { - max-width: 200px; + // max-width: 200px; } } @@ -126,6 +127,9 @@ @include small-uppercase; margin-bottom: 0.325rem; border-bottom: 1px solid $dark-gray; + @include breakpoint(medium) { + padding: 1em 0; + } } .enp-dash__ab-test-helper--not-enough-quizzes { @@ -172,7 +176,10 @@ } .enp-dash-item--draft { - box-shadow: inset 4px 0 0 $blue, 0 1px 0 rgba(0,0,0,.1); + box-shadow: inset 4px 0 0 $light_blue, 0 1px 0 rgba(0,0,0,.1); + .enp-dash-item__title a { + color: $dark_blue; + } } .enp-dash-item--remove { @@ -275,6 +282,9 @@ color: $red; outline: 1px dotted $link; outline-offset: 1px; + .enp-dash-item__icon { + fill: $red; + } } } } @@ -471,7 +481,7 @@ .enp-dash-link--add-new { @include btn--dashed--light; justify-content: flex-start; - color: $link; + color: $light_blue; padding: 1rem 1.2rem; @@ -490,7 +500,7 @@ @include icon--circle; @include icon--normal; margin-right: 5px; - background-color: $dark_blue; + background-color: $light_blue; @include breakpoint(medium) { width: 2rem; @@ -500,11 +510,11 @@ } &:hover { - color: $link_hover; + color: $dark_blue; .enp-dash-link__icon { fill: #fff; - background: $link_hover; + background: $dark_blue; } } diff --git a/public/quiz-create/css/sass/_forms.scss b/public/quiz-create/css/sass/_forms.scss index e4648e41..d6ed75c8 100644 --- a/public/quiz-create/css/sass/_forms.scss +++ b/public/quiz-create/css/sass/_forms.scss @@ -159,7 +159,7 @@ } @mixin radio-block__label--checked { - background: $green; + background: $blue; color: #fff; text-shadow: 0 0 1px rgba(0,0,0,.7); } diff --git a/public/quiz-create/css/sass/_quiz-create.scss b/public/quiz-create/css/sass/_quiz-create.scss index 76d8c3bc..7f23d432 100644 --- a/public/quiz-create/css/sass/_quiz-create.scss +++ b/public/quiz-create/css/sass/_quiz-create.scss @@ -22,6 +22,9 @@ padding-left: 8px; padding-right: 8px; } + @include breakpoint(medium) { + justify-items: start; + } } // .enp-breadcrumb-link__container { // display: grid; @@ -46,7 +49,7 @@ @include breakpoint(medium) { grid-template-columns: 1fr 3fr; - padding: 0 2rem; + // padding: 0 2rem; } } @@ -260,16 +263,16 @@ .enp-mc-option--correct { .enp-mc-option__input { - box-shadow: inset 0 0 3px $green; - border: 1px solid $green; + box-shadow: inset 0 0 3px $blue; + border: 1px solid $blue; } .enp-mc-option__button--correct:focus .enp-mc-option__icon--correct, .enp-mc-option__button--correct:hover .enp-mc-option__icon--correct, .enp-mc-option__icon--correct { fill: #fff; - border-color: $green; - background: $green; + border-color: $blue; + background: $blue; } } @@ -442,7 +445,7 @@ } .enp-answer-explanation { - background: $light_blue; + background: $light_gray; padding-top: 2rem; box-shadow: inset 1px 0px 0 #ccc, inset -1px -1px 0 #ccc, inset 0 1px 0 #ddd; } diff --git a/public/quiz-create/css/sass/_quiz-preview.scss b/public/quiz-create/css/sass/_quiz-preview.scss index cb4c88d4..9496d947 100644 --- a/public/quiz-create/css/sass/_quiz-preview.scss +++ b/public/quiz-create/css/sass/_quiz-preview.scss @@ -25,6 +25,10 @@ @include small-uppercase; font-weight: 600; padding-top: 0; + + @include breakpoint(medium) { + padding: 1em 0; + } } .enp-quiz-settings__form { @@ -106,6 +110,9 @@ .enp-quiz-preview__title { @include small-uppercase; font-weight: 600; + @include breakpoint(medium) { + padding: 1em 0; + } } .enp-preview-form__submit { diff --git a/public/quiz-create/css/sass/_variables.scss b/public/quiz-create/css/sass/_variables.scss index 2e2a21b0..afb92666 100644 --- a/public/quiz-create/css/sass/_variables.scss +++ b/public/quiz-create/css/sass/_variables.scss @@ -10,7 +10,7 @@ $title : #5D5E5F; // Blues $blue: #00A9B7; $dark_blue: #333F48; -$light_blue: lighten($blue, 100); +$light_blue: lighten($dark_blue, 40); // Grays $light_gray: #FAF9FB; diff --git a/public/quiz-create/templates/partials/quiz-create-mc-option-image-upload.php b/public/quiz-create/templates/partials/quiz-create-mc-option-image-upload.php new file mode 100644 index 00000000..fa90d703 --- /dev/null +++ b/public/quiz-create/templates/partials/quiz-create-mc-option-image-upload.php @@ -0,0 +1,3 @@ + + + diff --git a/public/quiz-create/templates/partials/quiz-create-mc-option-image.php b/public/quiz-create/templates/partials/quiz-create-mc-option-image.php new file mode 100644 index 00000000..a3e51339 --- /dev/null +++ b/public/quiz-create/templates/partials/quiz-create-mc-option-image.php @@ -0,0 +1,11 @@ +
    + get_quiz_create_question_image($question, $question_id);?> + + + + + +

    Used for Assistive Technology (i.e. screen readers) and SEO. Does not show on the question.

    + +
    diff --git a/public/quiz-create/templates/partials/quiz-create-mc-option.php b/public/quiz-create/templates/partials/quiz-create-mc-option.php index c4a52b7b..c5148413 100644 --- a/public/quiz-create/templates/partials/quiz-create-mc-option.php +++ b/public/quiz-create/templates/partials/quiz-create-mc-option.php @@ -4,12 +4,10 @@
  • - + - + get_mc_option_correct_button($question_id, $mc_option_id); echo $Quiz_create->get_mc_option_delete_button($mc_option_id); diff --git a/public/quiz-create/templates/partials/quiz-create-question.php b/public/quiz-create/templates/partials/quiz-create-question.php index f718fd86..f10b5645 100644 --- a/public/quiz-create/templates/partials/quiz-create-question.php +++ b/public/quiz-create/templates/partials/quiz-create-question.php @@ -61,24 +61,32 @@ 1 question added the toolbar wont show, user has to save & refresh or preview - if ($question_i < 1) { // ? prevent json error for $question_id with {{}}'s - $question_id = 0; - } - $input = $question->get_question_explanation(); - $editor_id = "enp-question-explanation__$question_id"; - $editor_name = 'enp_question[' . $question_i . '][question_explanation]'; - $settings = array( - 'textarea_name' => $editor_name, - 'media_buttons' => false, // ? no media upload option - 'quicktags' => true, - 'tinymce' => array( - 'toolbar1' => 'link,unlink', // ? limit what shows on the toolbar - 'toolbar2' => '', - 'toolbar3' => '', - ), - ); - wp_editor($input, $editor_id, $settings); + // if ($question_i < 1) { // ? prevent json error for $question_id with {{}}'s + // $question_id = 0; + // } + // $input = $question->get_question_explanation(); + // $editor_id = "enp-question-explanation__$question_id"; + // $editor_name = 'enp_question[' . $question_i . '][question_explanation]'; + // $settings = array( + // 'textarea_name' => $editor_name, + // 'media_buttons' => false, // ? no media upload option + // 'quicktags' => true, + // 'teeny' => false, + // 'tinymce' => array( + // 'toolbar1' => 'link,unlink', // ? limit what shows on the toolbar + // 'toolbar2' => '', + // 'toolbar3' => '', + // ), + // ); + // wp_editor($input, $editor_id, $settings); + ?> + \ No newline at end of file diff --git a/public/quiz-create/templates/quiz-publish.php b/public/quiz-create/templates/quiz-publish.php index 33539f70..6a105cb5 100644 --- a/public/quiz-create/templates/quiz-publish.php +++ b/public/quiz-create/templates/quiz-publish.php @@ -14,13 +14,6 @@ ?>
    diff --git a/public/quiz-take/css/enp_quiz-take.min.css b/public/quiz-take/css/enp_quiz-take.min.css index 65316689..f927b428 100644 --- a/public/quiz-take/css/enp_quiz-take.min.css +++ b/public/quiz-take/css/enp_quiz-take.min.css @@ -1,2 +1,2 @@ -a,abbr,acronym,address,applet,big,blockquote,body,caption,cite,code,dd,del,dfn,div,dl,dt,em,fieldset,font,form,h1,h2,h3,h4,h5,h6,html,iframe,ins,kbd,label,legend,li,object,ol,p,pre,q,s,samp,small,span,strike,strong,sub,sup,table,tbody,td,tfoot,th,thead,tr,tt,ul,var{border:0;font-family:inherit;font-size:100%;font-style:inherit;font-weight:inherit;margin:0;outline:0;padding:0;vertical-align:baseline}html{font-size:100%;overflow-y:scroll;-webkit-text-size-adjust:100%;-ms-text-size-adjust:100%}body{background:#fff;overflow:hidden}article,aside,details,figcaption,figure,footer,header,nav,section{display:block}ol,ul{list-style:none}table{border-collapse:separate;border-spacing:0}caption,td,th{font-weight:400;text-align:left}blockquote:after,blockquote:before,q:after,q:before{content:""}blockquote,q{quotes:"" ""}a:focus{outline:thin dotted}a:active,a:hover{outline:0}a img{border:0}html{box-sizing:border-box}*,:after,:before{box-sizing:inherit}html{font-size:16px!important}html #enp-quiz{box-sizing:border-box;border-radius:3px}body #enp-quiz{background:#fff;overflow:hidden}#enp-quiz *,#enp-quiz :after,#enp-quiz :before{box-sizing:inherit}#enp-quiz ol,#enp-quiz ul{margin:0 0 1.6rem 1.25rem;padding:0}#enp-quiz textarea{margin-bottom:1rem}#enp-quiz button,#enp-quiz button:active,#enp-quiz button:focus,#enp-quiz button:hover,#enp-quiz iframe,#enp-quiz input[type=button],#enp-quiz input[type=button]:active,#enp-quiz input[type=button]:focus,#enp-quiz input[type=button]:hover,#enp-quiz input[type=reset],#enp-quiz input[type=reset]:active,#enp-quiz input[type=reset]:focus,#enp-quiz input[type=reset]:hover,#enp-quiz input[type=submit],#enp-quiz input[type=submit]:active,#enp-quiz input[type=submit]:focus,#enp-quiz input[type=submit]:hover{border:none}#enp-quiz .enp-screen-reader-text{clip:rect(1px,1px,1px,1px);position:absolute!important;left:-10000px;top:auto;width:1px;height:1px;overflow:hidden}#enp-quiz .enp-screen-reader-text:active,#enp-quiz .enp-screen-reader-text:focus,#enp-quiz .enp-screen-reader-text:hover{background-color:#f1f1f1;border-radius:3px;box-shadow:0 0 2px 2px rgba(0,0,0,.6);clip:auto!important;color:#21759b;display:block;font-size:14px;font-weight:700;height:auto;left:5px;line-height:normal;padding:15px 23px 14px;text-decoration:none;top:5px;width:auto;z-index:100000}#enp-quiz .enp-quiz-message{max-width:640px;margin:1.6rem auto;padding-left:20px;padding-right:20px;max-width:400px;background:#fff;border:1px solid #eee;border-bottom:1px solid #ccc;padding:1rem .375rem}#enp-quiz .enp-quiz-message:after{content:"";display:table;clear:both}#enp-quiz .enp-quiz-message__title{font-size:.85rem;text-transform:uppercase}#enp-quiz .enp-message__list{list-style:none;margin-left:0;font-size:1.1rem;margin-bottom:0}#enp-quiz .enp-quiz-message--error{border-left:6px solid #bf5700;animation:d .3s cubic-bezier(0,0,.3,1)}#enp-quiz .enp-quiz-message__title--error{color:#964400}#enp-quiz .enp-quiz-message--success{border-left:6px solid #60aaad;color:#4e9497}#enp-quiz .enp-quiz-message__title--success{color:#4e9497}body{color:#1d1c25;font-family:Arial,monospace,helvetica,arial,sans-serif;font-size:1em;line-height:1.6;font-weight:400}@media (min-width:700px){body{font-size:1.3em}}#enp-quiz h1,#enp-quiz h2,#enp-quiz h3,#enp-quiz h4,#enp-quiz h5,#enp-quiz h6{font-family:Arial,monospace,helvetica,arial,sans-serif;color:#1d1c25;clear:both;margin:0 0 .2rem;font-weight:700;line-height:1.2em}#enp-quiz h1{font-size:2em}#enp-quiz h2{font-size:1.75em}#enp-quiz h3{font-size:1.475em}#enp-quiz h4{font-size:1.3em}#enp-quiz h5{font-size:1.125em}#enp-quiz h6{font-size:1em}#enp-quiz p+h1,#enp-quiz p+h2,#enp-quiz p+h3,#enp-quiz p+h4,#enp-quiz p+h5,#enp-quiz p+h6,#enp-quiz ul+h1,#enp-quiz ul+h2,#enp-quiz ul+h3,#enp-quiz ul+h4,#enp-quiz ul+h5,#enp-quiz ul+h6{margin-top:1.8em}#enp-quiz p{font-size:.85em;margin-bottom:1.125em;font-weight:300}#enp-quiz ol,#enp-quiz ul{margin:0 0 1.6em 1.25em}#enp-quiz ul{list-style:disc}#enp-quiz ol{list-style:decimal}#enp-quiz li>ol,#enp-quiz li>ul{margin-bottom:0;margin-left:1.6em}#enp-quiz b,#enp-quiz strong{font-weight:700}#enp-quiz cite,#enp-quiz dfn,#enp-quiz em{font-family:georgia,times,serif;font-style:italic}#enp-quiz pre{background:#eee;font-family:Courier\ 10 Pitch,Courier,monospace;font-size:.95em;line-height:1.6;margin-bottom:1.6em;padding:1.6em;overflow:auto;max-width:100%}#enp-quiz .code,#enp-quiz code,#enp-quiz kbd,#enp-quiz tt,#enp-quiz var{font:.7em Monaco,Consolas,Andale Mono,DejaVu Sans Mono,monospace}#enp-quiz figure{margin:0}#enp-quiz img{height:auto;max-width:100%}#enp-quiz a{color:#00a9b7;text-decoration:none;transition:color .2s;touch-action:manipulation}#enp-quiz a .enp-icon{fill:#00a9b7}#enp-quiz a:active,#enp-quiz a:focus,#enp-quiz a:hover{color:#007a84}#enp-quiz a:active .enp-icon,#enp-quiz a:focus .enp-icon,#enp-quiz a:hover .enp-icon{fill:#007a84}#enp-quiz button:focus{outline-color:#4d90fe;outline-offset:-2px;outline-style:auto;outline-width:5px}#enp-quiz .enp-btn{text-align:center;border:none;border-radius:3px;padding:.85em 1.4em .75em;font-size:15px;font-weight:400;letter-spacing:.05em;line-height:1.6;color:#fff;box-shadow:inset 0 -2px 0 rgba(0,0,0,.2);background:#00a9b7;cursor:pointer;text-transform:uppercase;transition:all .2s}#enp-quiz .enp-btn:hover{color:#fff;box-shadow:none;background:#007a84}#enp-quiz .enp-btn:active{color:#fff;box-shadow:inset 0 2px 0 rgba(0,0,0,.1);background:#1eeeff}#enp-quiz .enp-btn:focus{outline-color:#4d90fe;outline-offset:-2px;outline-style:auto;outline-width:5px}#enp-quiz .enp-btn--add{text-align:center;border:none;border-radius:3px;padding:.85em 1.4em .75em;font-size:15px;font-weight:400;letter-spacing:.05em;line-height:1.6;color:#fff;box-shadow:inset 0 -2px 0 rgba(0,0,0,.2);background:#00a9b7;cursor:pointer;text-transform:uppercase;transition:all .2s;border:3px dashed #e3e3e3;background:none;color:#545454;box-shadow:none;width:100%}#enp-quiz .enp-btn--add:hover{color:#fff;box-shadow:none;background:#007a84}#enp-quiz .enp-btn--add:active{color:#fff;box-shadow:inset 0 2px 0 rgba(0,0,0,.1);background:#1eeeff}#enp-quiz .enp-btn--add:focus{outline-color:#4d90fe;outline-offset:-2px;outline-style:auto;outline-width:5px}#enp-quiz .enp-btn--add:focus,#enp-quiz .enp-btn--add:hover{border:3px dashed #b0b0b0;color:#b0b0b0;background:hsla(0,0%,100%,.9)}#enp-quiz .enp-btn--disabled{opacity:.65;cursor:default}#enp-quiz .enp-btn--enabled{animation:expand .6s}#enp-quiz .enp-icon{width:24px;height:24px;transition:all .2s}#enp-quiz .enp-page-title{font-size:1.6rem}#enp-quiz fieldset{border:none;margin:0;padding:0}.enp-label,.enp-legend{display:block;color:#343242;font-weight:400;font-size:.85rem;text-transform:uppercase}.enp-legend{padding-top:1.6rem;margin-bottom:.2rem;border:none}.enp-input{font-size:1rem;font-family:Arial,monospace,helvetica,arial,sans-serif;padding:.8rem .5rem;background:#fff;border:1px solid #aaa;border-radius:3px;width:20rem;max-width:100%;margin-bottom:1.2rem}@media (min-width:700px){.enp-input{padding:.8rem}}.enp-input::-webkit-input-placeholder,.enp-textarea::-webkit-input-placeholder{font-family:Arial,monospace,helvetica,arial,sans-serif;font-weight:300;color:#7a7697}.enp-input:-ms-input-placeholder,.enp-input::-ms-input-placeholder,.enp-textarea:-ms-input-placeholder,.enp-textarea::-ms-input-placeholder{font-family:Arial,monospace,helvetica,arial,sans-serif;font-weight:300;color:#7a7697}.enp-input::placeholder,.enp-textarea::placeholder{font-family:Arial,monospace,helvetica,arial,sans-serif;font-weight:300;color:#7a7697}@keyframes a{0%{opacity:1;height:auto;transform:translateZ(0)}10%{opacity:1;transform:translateZ(0)}to{padding:0;opacity:0;display:none;height:0;z-index:-1;transform:translate3d(-150px,0,0)}}@keyframes b{0%{opacity:1;transform:translateX(0)}15%{opacity:1;transform:translateX(0)}to{opacity:0;transform:translateX(-150px)}}@keyframes c{0%{opacity:0;transform:translateX(120px)}to{opacity:1;transform:translateX(0)}}@keyframes d{0%{opacity:0;height:auto;transform:translate3d(0,-20px,0)}to{opacity:1;height:auto;transform:translateZ(0)}}@keyframes e{0%{opacity:0;transform:translate3d(0,20px,0)}to{opacity:1;transform:translateZ(0)}}@keyframes f{to{background-color:rgba(191,87,0,.2)}}@keyframes g{0%{width:0;opacity:1}30%{width:100%}80%{opacity:1;width:100%}to{width:40%;opacity:0}}.spinner{margin:0 auto;width:70px;text-align:center}.spinner>div{width:18px;height:18px;background-color:#333;border-radius:100%;display:inline-block;animation:h 1.4s infinite ease-in-out both}.spinner .bounce1{animation-delay:-.32s}.spinner .bounce2{animation-delay:-.16s}@keyframes h{0%,80%,to{transform:scale(0)}40%{transform:scale(1)}}#enp-quiz{background:transparent}#enp-quiz .enp-quiz__container{position:relative;padding:0;background:#fff;border:1px solid #ddd}#enp-quiz .enp-quiz__header{position:relative;border-bottom:1px solid #ddd}#enp-quiz .enp-quiz__title{font-size:.85rem;text-transform:uppercase;font-weight:500;letter-spacing:.01rem;padding:.6rem 1rem}#enp-quiz .enp-quiz__title--hide{display:none}#enp-quiz .enp-quiz__progress{position:absolute;bottom:0;left:0;right:0;height:0}#enp-quiz .enp-quiz__progress__bar{position:relative;width:0;min-width:2rem;height:3px;background:#60aaad;transition:all .5s cubic-bezier(0,0,.3,1)}#enp-quiz .enp-quiz__progress__bar__question-count{position:absolute;right:1rem;bottom:.7rem;font-size:.8rem}#enp-quiz .enp-question__container{display:block;min-height:92vh}#enp-quiz .enp-question__form{max-width:640px;margin-left:auto;margin-right:auto;padding:2rem 20px 2.6rem;overflow:hidden;color:#1d1c25}#enp-quiz .enp-question__form:after{content:"";display:table;clear:both}@media (min-width:700px){#enp-quiz .enp-question__form{padding:2.6rem 3rem;width:100vw}}#enp-quiz .enp-question__question{font-size:1.8rem;font-weight:700;line-height:1.2;margin-bottom:.2rem;padding-bottom:.1rem;position:relative;box-sizing:border-box;display:table;max-width:100%;white-space:normal}@media (min-width:400px){#enp-quiz .enp-question__question{font-size:2rem}}#enp-quiz .enp-question__question:after{content:"";position:absolute;height:2px;background-color:#eee;background-color:rgba(0,0,0,.2);margin:auto;width:0;bottom:0;left:0;right:0}#enp-quiz .enp-question__question:focus:after{animation:g .8s cubic-bezier(0,0,.3,1)}#enp-quiz .enp-question-image{margin-bottom:.4rem}#enp-quiz .enp-question__helper{font-size:1rem}#enp-quiz .enp-option__input{clip:rect(1px,1px,1px,1px);position:absolute!important;left:-10000px;top:auto;width:1px;height:1px;overflow:hidden}#enp-quiz .enp-option__input:checked+.enp-option__label:before{background-color:#60aaad}#enp-quiz .enp-option__input:focus+.enp-option__label{color:#1d1c25;background:#f5f5f5}#enp-quiz .enp-option__label{display:block;position:relative;width:100%;text-align:left;text-transform:none;padding:.8rem 0 .8rem 40px;font-size:1rem;font-weight:400;line-height:1.6;border:none;border-bottom:1px solid #eee;border-bottom:1px solid rgba(0,0,0,.1);background:none;color:#1d1c25;transition:color .2s cubic-bezier(0,0,.3,1),background .2s cubic-bezier(0,0,.3,1)}#enp-quiz .enp-option__label:before{content:"";position:absolute;top:.925rem;left:10px;width:20px;height:20px;border-radius:50%;border:2px solid #60aaad;padding:3px;background-clip:content-box;background-color:transparent;transition:all .2s}#enp-quiz .enp-option__label:last-of-type{border-bottom:none}#enp-quiz .enp-question__container--unanswered .enp-option__label:hover{cursor:pointer}#enp-quiz .enp-question__container--unanswered .enp-option__label:hover:before{background-color:#60aaad}#enp-quiz .enp-question__submit{text-align:center;border:none;border-radius:3px;padding:.85em 1.4em .75em;font-size:15px;font-weight:400;letter-spacing:.05em;line-height:1.6;color:#fff;box-shadow:inset 0 -2px 0 rgba(0,0,0,.2);background:#00a9b7;cursor:pointer;text-transform:uppercase;transition:all .2s;padding:.8em 1.2em .6em 1.4em;position:relative;padding-right:2.8em;padding-top:1em;padding-bottom:.95em;transition:padding .3s cubic-bezier(0,0,.3,1)}#enp-quiz .enp-question__submit:hover{color:#fff;box-shadow:none;background:#007a84}#enp-quiz .enp-question__submit:active{color:#fff;box-shadow:inset 0 2px 0 rgba(0,0,0,.1);background:#1eeeff}#enp-quiz .enp-question__submit:focus{outline-color:#4d90fe;outline-offset:-2px;outline-style:auto;outline-width:5px}#enp-quiz .enp-question__submit__icon{border-radius:50%;background:#00a9b7;background:#fff;fill:#00a9b7;width:1.2rem;height:1.2rem;margin-left:.5em;width:1.6em;height:1.6em;background:transparent;fill:#fff;position:absolute;top:0;bottom:0;margin-top:auto;margin-bottom:auto;transform:translateZ(0);transition:all .3s cubic-bezier(0,0,.3,1)}#enp-quiz .enp-question__submit:focus .enp-question__submit__icon,#enp-quiz .enp-question__submit:hover .enp-question__submit__icon{background:#fff;fill:#007a84}#enp-quiz .enp-question__submit:focus,#enp-quiz .enp-question__submit:hover{padding-right:4em}#enp-quiz .enp-question__submit .enp-question__submit__icon{right:.8em}#enp-quiz .enp-question__fieldset--mc .enp-question__submit{opacity:0;height:0;padding-top:0;padding-bottom:0}#enp-quiz .enp-question__fieldset--mc .enp-option__input:checked~.enp-options__submit{margin-top:.4rem;padding-top:1em;padding-bottom:.95em;height:auto;opacity:1;animation:.3s d cubic-bezier(0,0,.3,1) forwards}#enp-quiz .enp-question__fieldset--slider .enp-options__submit{margin-top:1.4rem}#enp-quiz .enp-question__container--explanation{background-color:#faf9fb}#enp-quiz .enp-question__container--explanation .enp-question__submit{display:none}#enp-quiz .enp-question__container--explanation .enp-option__label{margin-bottom:5px;border-bottom:none}#enp-quiz .enp-question__container--explanation .enp-option__input--correct-clicked+.enp-option__label:before{background-color:#60aaad}#enp-quiz .enp-question__container--explanation .enp-option__input--correct+.enp-option__label{box-shadow:inset 4px 0 0 #60aaad;background-color:#feffff}#enp-quiz .enp-question__container--explanation .enp-option__input--incorrect-clicked+.enp-option__label{background-color:#fff;box-shadow:inset 4px 0 0 #bf5700}#enp-quiz .enp-question__container--explanation .enp-option__input--incorrect-clicked+.enp-option__label:before{border:2px solid #bf5700;background-color:#bf5700}#enp-quiz .enp-option__input--slide-hide+.enp-option__label{margin:0;height:0;animation:a .6s cubic-bezier(.28,.01,0,.69) forwards}#enp-quiz .enp-explanation{background:#fff;padding:1.6rem 1.6rem 1.5rem}#enp-quiz .enp-question__fieldset--slider .enp-explanation{animation:e .3s cubic-bezier(0,0,.3,1) forwards}#enp-quiz .enp-explanation--correct{box-shadow:inset 4px 0 0 #60aaad}#enp-quiz .enp-explanation--correct .enp-explanation__percentage:after{content:"% Got This Right"}#enp-quiz .enp-explanation--incorrect{box-shadow:inset 4px 0 0 #bf5700}#enp-quiz .enp-explanation--incorrect .enp-explanation__percentage:after{content:"% Got This Wrong"}#enp-quiz .enp-explanation__title{font-size:.85rem;text-transform:uppercase}#enp-quiz .enp-explanation__percentage{font-size:.75rem;font-weight:500;color:#565656;margin-left:4px}#enp-quiz .enp-explanation__percentage:after{content:"%"}#enp-quiz .enp-explanation--correct .enp-explanation__title{color:#4a8d90}#enp-quiz .enp-explanation--incorrect .enp-explanation__title{color:#8c4000}#enp-quiz .enp-explanation__explanation{font-weight:400;margin-top:.4rem}#enp-quiz .enp-next-step{padding:.8em 1.2em .6em 1.4em;padding-right:2.8em;padding-top:1em;padding-bottom:.95em;transition:padding .3s cubic-bezier(0,0,.3,1)}#enp-quiz .enp-next-step__icon{border-radius:50%;background:#00a9b7;background:#fff;fill:#00a9b7;width:1.2rem;height:1.2rem;margin-left:.5em;width:1.6em;height:1.6em;background:transparent;fill:#fff;position:absolute;top:0;bottom:0;margin-top:auto;margin-bottom:auto;transform:translateZ(0);transition:all .3s cubic-bezier(0,0,.3,1)}#enp-quiz .enp-next-step:focus .enp-next-step__icon,#enp-quiz .enp-next-step:hover .enp-next-step__icon{background:#fff;fill:#007a84}#enp-quiz .enp-next-step{text-align:center;border:none;border-radius:3px;padding:.85em 1.4em .75em;font-size:15px;font-weight:400;letter-spacing:.05em;line-height:1.6;color:#fff;box-shadow:inset 0 -2px 0 rgba(0,0,0,.2);background:#00a9b7;cursor:pointer;text-transform:uppercase;transition:all .2s;border:2px solid #00a9b7;background:transparent;color:#00a9b7;box-shadow:none;display:inline-block;width:100%;padding:.8em 2.4em .8em 1.4em;position:relative}#enp-quiz .enp-next-step:hover{color:#fff;box-shadow:none;background:#007a84}#enp-quiz .enp-next-step:active{color:#fff;box-shadow:inset 0 2px 0 rgba(0,0,0,.1);background:#1eeeff}#enp-quiz .enp-next-step:focus{outline-color:#4d90fe;outline-offset:-2px;outline-style:auto;outline-width:5px}#enp-quiz .enp-next-step:focus,#enp-quiz .enp-next-step:hover{background:transparent;border:2px solid #007a84;color:#007a84}#enp-quiz .enp-next-step .enp-next-step__icon{fill:#00a9b7;transition:all .3s cubic-bezier(0,0,.3,1)}#enp-quiz .enp-next-step:hover .enp-next-step__icon{fill:#fff;background:#00a9b7;margin-right:0;transform:translate3d(1em,0,0);margin-right:1em}#enp-quiz .enp-question--on-deck{transform:translateX(200px);opacity:0;z-index:-1;top:0;position:absolute}#enp-quiz .enp-question--show{animation:c .6s cubic-bezier(0,0,.3,1) forwards}#enp-quiz .enp-question--remove{position:absolute;animation:b .15s cubic-bezier(0,0,.3,1) forwards}#enp-quiz .enp-results__score{position:relative;text-align:center;border-radius:50%;margin:0 auto 1rem;display:block;height:200px;width:200px}#enp-quiz .enp-results__score__title{color:#1d1c25;font-size:5rem;line-height:1;font-weight:400;position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);margin:0}#enp-quiz .enp-results__score__title__percentage{font-size:1.3rem;position:absolute;top:1rem;font-weight:300}#enp-quiz .enp-results__encouragement{font-size:1.8rem;font-weight:500;text-align:center;line-height:1.2;margin:.2rem}#enp-quiz .enp-results__description{max-width:100vw;overflow:auto;margin:0 auto 1.6rem}#enp-quiz .enp-results__score__circle{transform:rotate(-90deg)}#enp-quiz #enp-results__score__circle__path,#enp-quiz .enp-results__score__circle__bg{stroke:#ddd;stroke-width:4px}#enp-quiz #enp-results__score__circle__path{stroke:#60aaad}#enp-quiz .enp-results__score__circle__setOffset{transition:stroke-dashoffset 1.2s cubic-bezier(0,0,.3,1)}#enp-quiz .enp-results__score__circle__resetOffset{stroke-dashoffset:565.48}#enp-quiz .enp-results__share-title{margin:2.4rem 0 1rem;font-size:.85rem;text-transform:uppercase;text-align:center}#enp-quiz .enp-results__share{list-style:none;margin-left:0;text-align:center}#enp-quiz .enp-results__share__item{display:inline-block;margin-right:20px}#enp-quiz .enp-results__share__item:last-child{margin-right:0}#enp-quiz .enp-results__share__item__icon{width:2.4rem;height:2.4rem;border-radius:50%;background:#00a9b7;fill:#fff;padding:.6rem;fill:#fff!important}#enp-quiz .enp-results__share__item__icon--facebook{background-color:#3a5795}#enp-quiz .enp-results__share__item__icon--twitter{background-color:#4099ff}#enp-quiz .enp-quiz-restart__container{text-align:center}#enp-quiz .enp-question__container--error{padding:1rem 10px;animation:f .3s cubic-bezier(0,0,.3,1) forwards}#enp-quiz .enp-callout{font-size:10px;font-size:.8rem;text-align:right;padding:.4rem}#enp-quiz .enp-slider{margin-bottom:1.6rem}#enp-quiz .enp-slider-input__container{display:flex;align-items:center;justify-content:center;margin:1.6rem auto;position:relative}#enp-quiz .enp-slider-input__label{display:block;color:#343242;font-weight:400;font-size:.85rem;text-transform:uppercase}#enp-quiz .enp-slider-input__prefix,#enp-quiz .enp-slider-input__suffix{font-size:1rem}#enp-quiz .enp-slider-input__prefix{margin-right:.2rem;white-space:pre}#enp-quiz .enp-slider-input__suffix{margin-left:.2rem;white-space:pre}#enp-quiz .enp-slider-input__input{font-size:1rem;font-family:Arial,monospace,helvetica,arial,sans-serif;padding:.8rem .5rem;background:#fff;border:1px solid #aaa;border-radius:3px;width:20rem;max-width:100%;margin-bottom:1.2rem;margin-bottom:0;padding:.75rem;width:auto;transition:all .25s cubic-bezier(0,0,.3,1)}@media (min-width:700px){#enp-quiz .enp-slider-input__input{padding:.8rem}}#enp-quiz .enp-slider-input__input--incorrect{color:#bf5700}#enp-quiz .enp-slider-input__input--correct{color:#4e9497}#enp-quiz .enp-slider-input__input--invalid-animation{box-shadow:0 0 2px 1px #c1893e}#enp-quiz .enp-slider_input__range-helper{position:absolute;bottom:-1.2rem;font-size:.8rem}#enp-quiz .enp-slider_input__range-helper--low{left:0}#enp-quiz .enp-slider_input__range-helper--high{right:0}#enp-quiz .enp-slider-input__range-helper__number{position:relative;color:#e3e3e3}#enp-quiz .ui-slider-range-show-correct__tooltip-container{position:relative}#enp-quiz .ui-slider-range-show-correct__tooltip{position:absolute;top:-.4rem;margin-left:-.55rem;height:1rem;width:1.1rem;height:1.1rem;border:2px solid #60aaad;background-color:#fff;border-radius:50%;z-index:9999}#enp-quiz .ui-slider-range-show-correct__tooltip--low{left:0}#enp-quiz .ui-slider-range-show-correct__tooltip--high{right:-.55rem}#enp-quiz .ui-slider-range-show-correct__tooltip__text{position:relative;color:#417d7f;top:-1.35rem;font-size:.825rem;min-width:100%;display:inline-block;text-align:center;text-shadow:0 1px 0 #fff}#enp-quiz .enp-slider{position:relative;text-align:left;background:#ddd}#enp-quiz .enp-slider .ui-helper-hidden{display:none}#enp-quiz .enp-slider .ui-helper-hidden-accessible{border:0;clip:rect(0 0 0 0);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px}#enp-quiz .enp-slider .ui-helper-reset{margin:0;padding:0;border:0;outline:0;line-height:1.3;text-decoration:none;font-size:100%;list-style:none}#enp-quiz .enp-slider .ui-helper-clearfix:after,#enp-quiz .enp-slider .ui-helper-clearfix:before{content:"";display:table;border-collapse:collapse}#enp-quiz .enp-slider .ui-helper-clearfix:after{clear:both}#enp-quiz .enp-slider .ui-helper-clearfix{min-height:0}#enp-quiz .enp-slider .ui-helper-zfix{width:100%;height:100%;top:0;left:0;position:absolute;opacity:0;filter:alpha(opacity=0)}#enp-quiz .enp-slider .ui-front{z-index:100}#enp-quiz .enp-slider .ui-state-disabled{cursor:default!important}#enp-quiz .enp-slider .ui-icon{display:block;text-indent:-99999px;overflow:hidden;background-repeat:no-repeat}#enp-quiz .enp-slider .ui-widget-overlay{position:fixed;top:0;left:0;width:100%;height:100%}#enp-quiz .enp-slider .ui-slider-handle{background:#fff;border-radius:50%;border:1px solid #aaa;position:absolute;z-index:2;width:1.2rem;height:1.2rem;top:-.4rem;margin-left:-.6rem;cursor:default;touch-action:none;transition:opacity .2s cubic-bezier(0,0,.3,1),height .18s cubic-bezier(0,0,.3,1),width .18s cubic-bezier(0,0,.3,1),transform .18s cubic-bezier(0,0,.3,1)}@media (max-width:699px){#enp-quiz .enp-slider .ui-slider-handle{width:2rem;height:2rem;top:-.85rem;margin-left:-1rem;transform:rotate(225deg)}}#enp-quiz .enp-slider .ui-slider-handle:focus{outline:none;box-shadow:0 0 3px 1px #4d90fe}@media (max-width:699px){#enp-quiz .enp-slider .ui-slider-handle.ui-state-active{width:2.2rem;height:2.2rem;border-top-left-radius:0;transform:translate3d(-.2rem,-.8rem,0) rotate(225deg)}}#enp-quiz .enp-slider .ui-slider-handle--correct,#enp-quiz .enp-slider .ui-slider-handle--incorrect{width:1.1rem;height:1.1rem;top:-.4rem;margin-left:-.55rem}#enp-quiz .enp-slider .ui-slider-handle--incorrect{z-index:1;border:2px solid #bf5700}#enp-quiz .enp-slider .ui-slider-handle--correct{border:2px solid #60aaad;z-index:99999}#enp-quiz .enp-slider .ui-slider-range{position:absolute;z-index:1;font-size:.7rem;display:block;border:0;background-position:0 0;top:0;height:100%}#enp-quiz .enp-slider .ui-slider-range-show-correct{background:#60aaad;z-index:9}#enp-quiz .enp-slider .ui-slider-range-min{left:0;background:#60aaad}#enp-quiz .enp-slider .ui-slider-range-max{right:0}#enp-quiz .enp-slider.ui-state-disabled .ui-slider-handle,#enp-quiz .enp-slider.ui-state-disabled .ui-slider-range{filter:inherit}#enp-quiz .ui-slider-horizontal{height:.3rem}#enp-quiz .enp-question__answered .enp-slider{background:#bbb}#enp-quiz .enp-question__answered .ui-slider-range-min{background:#fff} +a,abbr,acronym,address,applet,big,blockquote,body,caption,cite,code,dd,del,dfn,div,dl,dt,em,fieldset,font,form,h1,h2,h3,h4,h5,h6,html,iframe,ins,kbd,label,legend,li,object,ol,p,pre,q,s,samp,small,span,strike,strong,sub,sup,table,tbody,td,tfoot,th,thead,tr,tt,ul,var{border:0;font-family:inherit;font-size:100%;font-style:inherit;font-weight:inherit;margin:0;outline:0;padding:0;vertical-align:baseline}html{font-size:100%;overflow-y:scroll;-webkit-text-size-adjust:100%;-ms-text-size-adjust:100%}body{background:#fff;overflow:hidden}article,aside,details,figcaption,figure,footer,header,nav,section{display:block}ol,ul{list-style:none}table{border-collapse:separate;border-spacing:0}caption,td,th{font-weight:400;text-align:left}blockquote:after,blockquote:before,q:after,q:before{content:""}blockquote,q{quotes:"" ""}a:focus{outline:thin dotted}a:active,a:hover{outline:0}a img{border:0}html{box-sizing:border-box}*,:after,:before{box-sizing:inherit}html{font-size:16px!important}html #enp-quiz{box-sizing:border-box;border-radius:3px}body #enp-quiz{background:#fff;overflow:hidden}#enp-quiz *,#enp-quiz :after,#enp-quiz :before{box-sizing:inherit}#enp-quiz ol,#enp-quiz ul{margin:0 0 1.6rem 1.25rem;padding:0}#enp-quiz textarea{margin-bottom:1rem}#enp-quiz button,#enp-quiz button:active,#enp-quiz button:focus,#enp-quiz button:hover,#enp-quiz iframe,#enp-quiz input[type=button],#enp-quiz input[type=button]:active,#enp-quiz input[type=button]:focus,#enp-quiz input[type=button]:hover,#enp-quiz input[type=reset],#enp-quiz input[type=reset]:active,#enp-quiz input[type=reset]:focus,#enp-quiz input[type=reset]:hover,#enp-quiz input[type=submit],#enp-quiz input[type=submit]:active,#enp-quiz input[type=submit]:focus,#enp-quiz input[type=submit]:hover{border:none}#enp-quiz .enp-screen-reader-text{clip:rect(1px,1px,1px,1px);position:absolute!important;left:-10000px;top:auto;width:1px;height:1px;overflow:hidden}#enp-quiz .enp-screen-reader-text:active,#enp-quiz .enp-screen-reader-text:focus,#enp-quiz .enp-screen-reader-text:hover{background-color:#f1f1f1;border-radius:3px;box-shadow:0 0 2px 2px rgba(0,0,0,.6);clip:auto!important;color:#21759b;display:block;font-size:14px;font-weight:700;height:auto;left:5px;line-height:normal;padding:15px 23px 14px;text-decoration:none;top:5px;width:auto;z-index:100000}#enp-quiz .enp-quiz-message{max-width:640px;margin:1.6rem auto;padding-left:20px;padding-right:20px;max-width:400px;background:#fff;border:1px solid #eee;border-bottom:1px solid #ccc;padding:1rem .375rem}#enp-quiz .enp-quiz-message:after{content:"";display:table;clear:both}#enp-quiz .enp-quiz-message__title{font-size:.85rem;text-transform:uppercase}#enp-quiz .enp-message__list{list-style:none;margin-left:0;font-size:1.1rem;margin-bottom:0}#enp-quiz .enp-quiz-message--error{border-left:6px solid #bf5700;animation:d .3s cubic-bezier(0,0,.3,1)}#enp-quiz .enp-quiz-message__title--error{color:#964400}#enp-quiz .enp-quiz-message--success{border-left:6px solid #60aaad;color:#4e9497}#enp-quiz .enp-quiz-message__title--success{color:#4e9497}body{color:#1d1c25;font-family:Arial,monospace,helvetica,arial,sans-serif;font-size:1em;line-height:1.6;font-weight:400}@media (min-width:700px){body{font-size:1.3em}}#enp-quiz h1,#enp-quiz h2,#enp-quiz h3,#enp-quiz h4,#enp-quiz h5,#enp-quiz h6{font-family:Arial,monospace,helvetica,arial,sans-serif;color:#1d1c25;clear:both;margin:0 0 .2rem;font-weight:700;line-height:1.2em}#enp-quiz h1{font-size:2em}#enp-quiz h2{font-size:1.75em}#enp-quiz h3{font-size:1.475em}#enp-quiz h4{font-size:1.3em}#enp-quiz h5{font-size:1.125em}#enp-quiz h6{font-size:1em}#enp-quiz p+h1,#enp-quiz p+h2,#enp-quiz p+h3,#enp-quiz p+h4,#enp-quiz p+h5,#enp-quiz p+h6,#enp-quiz ul+h1,#enp-quiz ul+h2,#enp-quiz ul+h3,#enp-quiz ul+h4,#enp-quiz ul+h5,#enp-quiz ul+h6{margin-top:1.8em}#enp-quiz p{font-size:.85em;margin-bottom:1.125em;font-weight:300}#enp-quiz ol,#enp-quiz ul{margin:0 0 1.6em 1.25em}#enp-quiz ul{list-style:disc}#enp-quiz ol{list-style:decimal}#enp-quiz li>ol,#enp-quiz li>ul{margin-bottom:0;margin-left:1.6em}#enp-quiz b,#enp-quiz strong{font-weight:700}#enp-quiz cite,#enp-quiz dfn,#enp-quiz em{font-family:georgia,times,serif;font-style:italic}#enp-quiz pre{background:#eee;font-family:Courier\ 10 Pitch,Courier,monospace;font-size:.95em;line-height:1.6;margin-bottom:1.6em;padding:1.6em;overflow:auto;max-width:100%}#enp-quiz .code,#enp-quiz code,#enp-quiz kbd,#enp-quiz tt,#enp-quiz var{font:.7em Monaco,Consolas,Andale Mono,DejaVu Sans Mono,monospace}#enp-quiz figure{margin:0}#enp-quiz img{height:auto;max-width:100%}#enp-quiz a{color:#00a9b7;text-decoration:none;transition:color .2s;touch-action:manipulation}#enp-quiz a .enp-icon{fill:#00a9b7}#enp-quiz a:active,#enp-quiz a:focus,#enp-quiz a:hover{color:#007a84}#enp-quiz a:active .enp-icon,#enp-quiz a:focus .enp-icon,#enp-quiz a:hover .enp-icon{fill:#007a84}#enp-quiz button:focus{outline-color:#4d90fe;outline-offset:-2px;outline-style:auto;outline-width:5px}#enp-quiz .enp-btn{text-align:center;border:none;border-radius:3px;padding:.85em 1.4em .75em;font-size:15px;font-weight:400;letter-spacing:.05em;line-height:1.6;color:#fff;box-shadow:inset 0 -2px 0 rgba(0,0,0,.2);background:#00a9b7;cursor:pointer;text-transform:uppercase;transition:all .2s}#enp-quiz .enp-btn:hover{color:#fff;box-shadow:none;background:#007a84}#enp-quiz .enp-btn:active{color:#fff;box-shadow:inset 0 2px 0 rgba(0,0,0,.1);background:#1eeeff}#enp-quiz .enp-btn:focus{outline-color:#4d90fe;outline-offset:-2px;outline-style:auto;outline-width:5px}#enp-quiz .enp-btn--add{text-align:center;border:none;border-radius:3px;padding:.85em 1.4em .75em;font-size:15px;font-weight:400;letter-spacing:.05em;line-height:1.6;color:#fff;box-shadow:inset 0 -2px 0 rgba(0,0,0,.2);background:#00a9b7;cursor:pointer;text-transform:uppercase;transition:all .2s;border:3px dashed #e3e3e3;background:none;color:#545454;box-shadow:none;width:100%}#enp-quiz .enp-btn--add:hover{color:#fff;box-shadow:none;background:#007a84}#enp-quiz .enp-btn--add:active{color:#fff;box-shadow:inset 0 2px 0 rgba(0,0,0,.1);background:#1eeeff}#enp-quiz .enp-btn--add:focus{outline-color:#4d90fe;outline-offset:-2px;outline-style:auto;outline-width:5px}#enp-quiz .enp-btn--add:focus,#enp-quiz .enp-btn--add:hover{border:3px dashed #b0b0b0;color:#b0b0b0;background:hsla(0,0%,100%,.9)}#enp-quiz .enp-btn--disabled{opacity:.65;cursor:default}#enp-quiz .enp-btn--enabled{animation:expand .6s}#enp-quiz .enp-icon{width:24px;height:24px;transition:all .2s}#enp-quiz .enp-page-title{font-size:1.6rem}#enp-quiz fieldset{border:none;margin:0;padding:0}.enp-label,.enp-legend{display:block;color:#343242;font-weight:400;font-size:.85rem;text-transform:uppercase}.enp-legend{padding-top:1.6rem;margin-bottom:.2rem;border:none}.enp-input{font-size:1rem;font-family:Arial,monospace,helvetica,arial,sans-serif;padding:.8rem .5rem;background:#fff;border:1px solid #aaa;border-radius:3px;width:20rem;max-width:100%;margin-bottom:1.2rem}@media (min-width:700px){.enp-input{padding:.8rem}}.enp-input::-webkit-input-placeholder,.enp-textarea::-webkit-input-placeholder{font-family:Arial,monospace,helvetica,arial,sans-serif;font-weight:300;color:#7a7697}.enp-input:-ms-input-placeholder,.enp-input::-ms-input-placeholder,.enp-textarea:-ms-input-placeholder,.enp-textarea::-ms-input-placeholder{font-family:Arial,monospace,helvetica,arial,sans-serif;font-weight:300;color:#7a7697}.enp-input::placeholder,.enp-textarea::placeholder{font-family:Arial,monospace,helvetica,arial,sans-serif;font-weight:300;color:#7a7697}@keyframes a{0%{opacity:1;height:auto;transform:translateZ(0)}10%{opacity:1;transform:translateZ(0)}to{padding:0;opacity:0;display:none;height:0;z-index:-1;transform:translate3d(-150px,0,0)}}@keyframes b{0%{opacity:1;transform:translateX(0)}15%{opacity:1;transform:translateX(0)}to{opacity:0;transform:translateX(-150px)}}@keyframes c{0%{opacity:0;transform:translateX(120px)}to{opacity:1;transform:translateX(0)}}@keyframes d{0%{opacity:0;height:auto;transform:translate3d(0,-20px,0)}to{opacity:1;height:auto;transform:translateZ(0)}}@keyframes e{0%{opacity:0;transform:translate3d(0,20px,0)}to{opacity:1;transform:translateZ(0)}}@keyframes f{to{background-color:rgba(191,87,0,.2)}}@keyframes g{0%{width:0;opacity:1}30%{width:100%}80%{opacity:1;width:100%}to{width:40%;opacity:0}}.spinner{margin:0 auto;width:70px;text-align:center}.spinner>div{width:18px;height:18px;background-color:#333;border-radius:100%;display:inline-block;animation:h 1.4s infinite ease-in-out both}.spinner .bounce1{animation-delay:-.32s}.spinner .bounce2{animation-delay:-.16s}@keyframes h{0%,80%,to{transform:scale(0)}40%{transform:scale(1)}}#enp-quiz{background:transparent}#enp-quiz .enp-quiz__container{position:relative;padding:0;background:#fff;border:1px solid #ddd}#enp-quiz .enp-quiz__header{position:relative;border-bottom:1px solid #ddd}#enp-quiz .enp-quiz__title{font-size:.85rem;text-transform:uppercase;font-weight:500;letter-spacing:.01rem;padding:.6rem 1rem}#enp-quiz .enp-quiz__title--hide{display:none}#enp-quiz .enp-quiz__progress{position:absolute;bottom:0;left:0;right:0;height:0}#enp-quiz .enp-quiz__progress__bar{position:relative;width:0;min-width:2rem;height:3px;background:#60aaad;transition:all .5s cubic-bezier(0,0,.3,1)}#enp-quiz .enp-quiz__progress__bar__question-count{position:absolute;right:1rem;bottom:.7rem;font-size:.8rem}#enp-quiz .enp-question__container{display:block;min-height:92vh}#enp-quiz .enp-question__form{max-width:640px;margin-left:auto;margin-right:auto;padding:2rem 20px 2.6rem;overflow:hidden;color:#1d1c25}#enp-quiz .enp-question__form:after{content:"";display:table;clear:both}@media (min-width:700px){#enp-quiz .enp-question__form{padding:2.6rem 3rem;width:100vw}}#enp-quiz .enp-question__question{font-size:1.8rem;font-weight:700;line-height:1.2;margin-bottom:.2rem;padding-bottom:.1rem;position:relative;box-sizing:border-box;display:table;max-width:100%;white-space:normal}@media (min-width:400px){#enp-quiz .enp-question__question{font-size:2rem}}#enp-quiz .enp-question__question:after{content:"";position:absolute;height:2px;background-color:#eee;background-color:rgba(0,0,0,.2);margin:auto;width:0;bottom:0;left:0;right:0}#enp-quiz .enp-question__question:focus:after{animation:g .8s cubic-bezier(0,0,.3,1)}#enp-quiz .enp-question-image{margin-bottom:.4rem}#enp-quiz .enp-question__helper{font-size:1rem}#enp-quiz .enp-option__input{clip:rect(1px,1px,1px,1px);position:absolute!important;left:-10000px;top:auto;width:1px;height:1px;overflow:hidden}#enp-quiz .enp-option__input:checked+.enp-option__label:before{background-color:#60aaad}#enp-quiz .enp-option__input:focus+.enp-option__label{color:#1d1c25;background:#f5f5f5}#enp-quiz .enp-option__label{display:block;position:relative;width:100%;text-align:left;text-transform:none;padding:.8rem 0 .8rem 40px;font-size:1rem;font-weight:400;line-height:1.6;border:none;border-bottom:1px solid #eee;border-bottom:1px solid rgba(0,0,0,.1);background:none;color:#1d1c25;transition:color .2s cubic-bezier(0,0,.3,1),background .2s cubic-bezier(0,0,.3,1)}#enp-quiz .enp-option__label:before{content:"";position:absolute;top:.925rem;left:10px;width:20px;height:20px;border-radius:50%;border:2px solid #60aaad;padding:3px;background-clip:content-box;background-color:transparent;transition:all .2s}#enp-quiz .enp-option__label:last-of-type{border-bottom:none}#enp-quiz .enp-question__container--unanswered .enp-option__label:hover{cursor:pointer}#enp-quiz .enp-question__container--unanswered .enp-option__label:hover:before{background-color:#60aaad}#enp-quiz .enp-question__submit{text-align:center;border:none;border-radius:3px;padding:.85em 1.4em .75em;font-size:15px;font-weight:400;letter-spacing:.05em;line-height:1.6;color:#fff;box-shadow:inset 0 -2px 0 rgba(0,0,0,.2);background:#00a9b7;cursor:pointer;text-transform:uppercase;transition:all .2s;padding:.8em 1.2em .6em 1.4em;position:relative;padding-right:2.8em;padding-top:1em;padding-bottom:.95em;transition:padding .3s cubic-bezier(0,0,.3,1)}#enp-quiz .enp-question__submit:hover{color:#fff;box-shadow:none;background:#007a84}#enp-quiz .enp-question__submit:active{color:#fff;box-shadow:inset 0 2px 0 rgba(0,0,0,.1);background:#1eeeff}#enp-quiz .enp-question__submit:focus{outline-color:#4d90fe;outline-offset:-2px;outline-style:auto;outline-width:5px}#enp-quiz .enp-question__submit__icon{border-radius:50%;background:#00a9b7;background:#fff;fill:#00a9b7;width:1.2rem;height:1.2rem;margin-left:.5em;width:1.6em;height:1.6em;background:transparent;fill:#fff;position:absolute;top:0;bottom:0;margin-top:auto;margin-bottom:auto;transform:translateZ(0);transition:all .3s cubic-bezier(0,0,.3,1)}#enp-quiz .enp-question__submit:focus .enp-question__submit__icon,#enp-quiz .enp-question__submit:hover .enp-question__submit__icon{background:#fff;fill:#007a84}#enp-quiz .enp-question__submit:focus,#enp-quiz .enp-question__submit:hover{padding-right:4em}#enp-quiz .enp-question__submit .enp-question__submit__icon{right:.8em}#enp-quiz .enp-question__fieldset--mc .enp-question__submit{opacity:0;height:0;padding-top:0;padding-bottom:0}#enp-quiz .enp-question__fieldset--mc .enp-option__input:checked~.enp-options__submit{margin-top:.4rem;padding-top:1em;padding-bottom:.95em;height:auto;opacity:1;animation:.3s d cubic-bezier(0,0,.3,1) forwards}#enp-quiz .enp-question__fieldset--slider .enp-options__submit{margin-top:1.4rem}#enp-quiz .enp-question__container--explanation{background-color:#faf9fb}#enp-quiz .enp-question__container--explanation .enp-question__submit{display:none}#enp-quiz .enp-question__container--explanation .enp-option__label{margin-bottom:5px;border-bottom:none}#enp-quiz .enp-question__container--explanation .enp-option__input--correct-clicked+.enp-option__label:before{background-color:#60aaad}#enp-quiz .enp-question__container--explanation .enp-option__input--correct+.enp-option__label{box-shadow:inset 4px 0 0 #60aaad;background-color:#feffff}#enp-quiz .enp-question__container--explanation .enp-option__input--incorrect-clicked+.enp-option__label{background-color:#fff;box-shadow:inset 4px 0 0 #bf5700}#enp-quiz .enp-question__container--explanation .enp-option__input--incorrect-clicked+.enp-option__label:before{border:2px solid #bf5700;background-color:#bf5700}#enp-quiz .enp-option__input--slide-hide+.enp-option__label{margin:0;height:0;animation:a .6s cubic-bezier(.28,.01,0,.69) forwards}#enp-quiz .enp-explanation{background:#fff;padding:1.6rem 1.6rem 1.5rem}#enp-quiz .enp-question__fieldset--slider .enp-explanation{animation:e .3s cubic-bezier(0,0,.3,1) forwards}#enp-quiz .enp-explanation--correct{box-shadow:inset 4px 0 0 #60aaad}#enp-quiz .enp-explanation--correct .enp-explanation__percentage:after{content:"% Got This Right"}#enp-quiz .enp-explanation--incorrect{box-shadow:inset 4px 0 0 #bf5700}#enp-quiz .enp-explanation--incorrect .enp-explanation__percentage:after{content:"% Got This Wrong"}#enp-quiz .enp-explanation__title{font-size:.85rem;text-transform:uppercase}#enp-quiz .enp-explanation__percentage{font-size:.75rem;font-weight:500;color:#565656;margin-left:4px}#enp-quiz .enp-explanation__percentage:after{content:"%"}#enp-quiz .enp-explanation--correct .enp-explanation__title{color:#4a8d90}#enp-quiz .enp-explanation--incorrect .enp-explanation__title{color:#8c4000}#enp-quiz .enp-explanation__explanation{font-weight:400;margin-top:.4rem}#enp-quiz .enp-next-step{padding:.8em 1.2em .6em 1.4em;padding-right:2.8em;padding-top:1em;padding-bottom:.95em;transition:padding .3s cubic-bezier(0,0,.3,1)}#enp-quiz .enp-next-step__icon{border-radius:50%;background:#00a9b7;background:#fff;fill:#00a9b7;width:1.2rem;height:1.2rem;margin-left:.5em;width:1.6em;height:1.6em;background:transparent;fill:#fff;position:absolute;top:0;bottom:0;margin-top:auto;margin-bottom:auto;transform:translateZ(0);transition:all .3s cubic-bezier(0,0,.3,1)}#enp-quiz .enp-next-step:focus .enp-next-step__icon,#enp-quiz .enp-next-step:hover .enp-next-step__icon{background:#fff;fill:#007a84}#enp-quiz .enp-next-step{text-align:center;border:none;border-radius:3px;padding:.85em 1.4em .75em;font-size:15px;font-weight:400;letter-spacing:.05em;line-height:1.6;color:#fff;box-shadow:inset 0 -2px 0 rgba(0,0,0,.2);background:#00a9b7;cursor:pointer;text-transform:uppercase;transition:all .2s;border:2px solid #00a9b7;background:transparent;color:#00a9b7;box-shadow:none;display:inline-block;width:100%;padding:.8em 2.4em .8em 1.4em;position:relative}#enp-quiz .enp-next-step:hover{color:#fff;box-shadow:none;background:#007a84}#enp-quiz .enp-next-step:active{color:#fff;box-shadow:inset 0 2px 0 rgba(0,0,0,.1);background:#1eeeff}#enp-quiz .enp-next-step:focus{outline-color:#4d90fe;outline-offset:-2px;outline-style:auto;outline-width:5px}#enp-quiz .enp-next-step:focus,#enp-quiz .enp-next-step:hover{background:transparent;border:2px solid #007a84;color:#007a84}#enp-quiz .enp-next-step .enp-next-step__icon{fill:#00a9b7;transition:all .3s cubic-bezier(0,0,.3,1)}#enp-quiz .enp-next-step:hover .enp-next-step__icon{fill:#fff;background:#00a9b7;margin-right:0;transform:translate3d(1em,0,0);margin-right:1em}#enp-quiz .enp-question--on-deck{transform:translateX(200px);opacity:0;z-index:-1;top:0;position:absolute}#enp-quiz .enp-question--show{animation:c .6s cubic-bezier(0,0,.3,1) forwards}#enp-quiz .enp-question--remove{position:absolute;animation:b .15s cubic-bezier(0,0,.3,1) forwards}#enp-quiz .enp-results__score{position:relative;text-align:center;border-radius:50%;margin:0 auto 1rem;display:block;height:200px;width:200px}#enp-quiz .enp-results__score__title{color:#1d1c25;font-size:5rem;line-height:1;font-weight:400;position:absolute;top:50%;left:47%;transform:translate(-50%,-50%);margin:0}#enp-quiz .enp-results__score__title__percentage{font-size:1.3rem;position:absolute;top:1rem;font-weight:300}#enp-quiz .enp-results__encouragement{font-size:1.8rem;font-weight:500;text-align:center;line-height:1.2;margin:.2rem}#enp-quiz .enp-results__description{max-width:100vw;overflow:auto;margin:0 auto 1.6rem}#enp-quiz .enp-results__score__circle{transform:rotate(-90deg)}#enp-quiz #enp-results__score__circle__path,#enp-quiz .enp-results__score__circle__bg{stroke:#ddd;stroke-width:4px}#enp-quiz #enp-results__score__circle__path{stroke:#60aaad}#enp-quiz .enp-results__score__circle__setOffset{transition:stroke-dashoffset 1.2s cubic-bezier(0,0,.3,1)}#enp-quiz .enp-results__score__circle__resetOffset{stroke-dashoffset:565.48}#enp-quiz .enp-results__share-title{margin:2.4rem 0 1rem;font-size:.85rem;text-transform:uppercase;text-align:center}#enp-quiz .enp-results__share{list-style:none;margin-left:0;text-align:center}#enp-quiz .enp-results__share__item{display:inline-block;margin-right:20px}#enp-quiz .enp-results__share__item:last-child{margin-right:0}#enp-quiz .enp-results__share__item__icon{width:2.4rem;height:2.4rem;border-radius:50%;background:#00a9b7;fill:#fff;padding:.6rem;fill:#fff!important}#enp-quiz .enp-results__share__item__icon--facebook{background-color:#3a5795}#enp-quiz .enp-results__share__item__icon--twitter{background-color:#4099ff}#enp-quiz .enp-quiz-restart__container{text-align:center}#enp-quiz .enp-question__container--error{padding:1rem 10px;animation:f .3s cubic-bezier(0,0,.3,1) forwards}#enp-quiz .enp-callout{font-size:10px;font-size:.8rem;text-align:right;padding:.4rem}#enp-quiz .enp-slider{margin-bottom:1.6rem}#enp-quiz .enp-slider-input__container{display:flex;align-items:center;justify-content:center;margin:1.6rem auto;position:relative}#enp-quiz .enp-slider-input__label{display:block;color:#343242;font-weight:400;font-size:.85rem;text-transform:uppercase}#enp-quiz .enp-slider-input__prefix,#enp-quiz .enp-slider-input__suffix{font-size:1rem}#enp-quiz .enp-slider-input__prefix{margin-right:.2rem;white-space:pre}#enp-quiz .enp-slider-input__suffix{margin-left:.2rem;white-space:pre}#enp-quiz .enp-slider-input__input{font-size:1rem;font-family:Arial,monospace,helvetica,arial,sans-serif;padding:.8rem .5rem;background:#fff;border:1px solid #aaa;border-radius:3px;width:20rem;max-width:100%;margin-bottom:1.2rem;margin-bottom:0;padding:.75rem;width:auto;transition:all .25s cubic-bezier(0,0,.3,1)}@media (min-width:700px){#enp-quiz .enp-slider-input__input{padding:.8rem}}#enp-quiz .enp-slider-input__input--incorrect{color:#bf5700}#enp-quiz .enp-slider-input__input--correct{color:#4e9497}#enp-quiz .enp-slider-input__input--invalid-animation{box-shadow:0 0 2px 1px #c1893e}#enp-quiz .enp-slider_input__range-helper{position:absolute;bottom:-1.2rem;font-size:.8rem}#enp-quiz .enp-slider_input__range-helper--low{left:0}#enp-quiz .enp-slider_input__range-helper--high{right:0}#enp-quiz .enp-slider-input__range-helper__number{position:relative;color:#e3e3e3}#enp-quiz .ui-slider-range-show-correct__tooltip-container{position:relative}#enp-quiz .ui-slider-range-show-correct__tooltip{position:absolute;top:-.4rem;margin-left:-.55rem;height:1rem;width:1.1rem;height:1.1rem;border:2px solid #60aaad;background-color:#fff;border-radius:50%;z-index:9999}#enp-quiz .ui-slider-range-show-correct__tooltip--low{left:0}#enp-quiz .ui-slider-range-show-correct__tooltip--high{right:-.55rem}#enp-quiz .ui-slider-range-show-correct__tooltip__text{position:relative;color:#417d7f;top:-1.35rem;font-size:.825rem;min-width:100%;display:inline-block;text-align:center;text-shadow:0 1px 0 #fff}#enp-quiz .enp-slider{position:relative;text-align:left;background:#ddd}#enp-quiz .enp-slider .ui-helper-hidden{display:none}#enp-quiz .enp-slider .ui-helper-hidden-accessible{border:0;clip:rect(0 0 0 0);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px}#enp-quiz .enp-slider .ui-helper-reset{margin:0;padding:0;border:0;outline:0;line-height:1.3;text-decoration:none;font-size:100%;list-style:none}#enp-quiz .enp-slider .ui-helper-clearfix:after,#enp-quiz .enp-slider .ui-helper-clearfix:before{content:"";display:table;border-collapse:collapse}#enp-quiz .enp-slider .ui-helper-clearfix:after{clear:both}#enp-quiz .enp-slider .ui-helper-clearfix{min-height:0}#enp-quiz .enp-slider .ui-helper-zfix{width:100%;height:100%;top:0;left:0;position:absolute;opacity:0;filter:alpha(opacity=0)}#enp-quiz .enp-slider .ui-front{z-index:100}#enp-quiz .enp-slider .ui-state-disabled{cursor:default!important}#enp-quiz .enp-slider .ui-icon{display:block;text-indent:-99999px;overflow:hidden;background-repeat:no-repeat}#enp-quiz .enp-slider .ui-widget-overlay{position:fixed;top:0;left:0;width:100%;height:100%}#enp-quiz .enp-slider .ui-slider-handle{background:#fff;border-radius:50%;border:1px solid #aaa;position:absolute;z-index:2;width:1.2rem;height:1.2rem;top:-.4rem;margin-left:-.6rem;cursor:default;touch-action:none;transition:opacity .2s cubic-bezier(0,0,.3,1),height .18s cubic-bezier(0,0,.3,1),width .18s cubic-bezier(0,0,.3,1),transform .18s cubic-bezier(0,0,.3,1)}@media (max-width:699px){#enp-quiz .enp-slider .ui-slider-handle{width:2rem;height:2rem;top:-.85rem;margin-left:-1rem;transform:rotate(225deg)}}#enp-quiz .enp-slider .ui-slider-handle:focus{outline:none;box-shadow:0 0 3px 1px #4d90fe}@media (max-width:699px){#enp-quiz .enp-slider .ui-slider-handle.ui-state-active{width:2.2rem;height:2.2rem;border-top-left-radius:0;transform:translate3d(-.2rem,-.8rem,0) rotate(225deg)}}#enp-quiz .enp-slider .ui-slider-handle--correct,#enp-quiz .enp-slider .ui-slider-handle--incorrect{width:1.1rem;height:1.1rem;top:-.4rem;margin-left:-.55rem}#enp-quiz .enp-slider .ui-slider-handle--incorrect{z-index:1;border:2px solid #bf5700}#enp-quiz .enp-slider .ui-slider-handle--correct{border:2px solid #60aaad;z-index:99999}#enp-quiz .enp-slider .ui-slider-range{position:absolute;z-index:1;font-size:.7rem;display:block;border:0;background-position:0 0;top:0;height:100%}#enp-quiz .enp-slider .ui-slider-range-show-correct{background:#60aaad;z-index:9}#enp-quiz .enp-slider .ui-slider-range-min{left:0;background:#00a9b7}#enp-quiz .enp-slider .ui-slider-range-max{right:0}#enp-quiz .enp-slider.ui-state-disabled .ui-slider-handle,#enp-quiz .enp-slider.ui-state-disabled .ui-slider-range{filter:inherit}#enp-quiz .ui-slider-horizontal{height:.3rem}#enp-quiz .enp-question__answered .enp-slider{background:#bbb}#enp-quiz .enp-question__answered .ui-slider-range-min{background:#fff} /*# sourceMappingURL=enp_quiz-take.min.css.map */ diff --git a/public/quiz-take/css/enp_quiz-take.min.css.map b/public/quiz-take/css/enp_quiz-take.min.css.map index 0d1fb160..1c167772 100644 --- a/public/quiz-take/css/enp_quiz-take.min.css.map +++ b/public/quiz-take/css/enp_quiz-take.min.css.map @@ -1 +1 @@ -{"version":3,"sources":["_setup.scss","_utilities.scss","_structure.scss","_variables.scss","_typography.scss","_forms.scss","_animations.scss","_quiz.scss","_slider.scss"],"names":[],"mappings":"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","file":"enp_quiz-take.min.css","sourcesContent":["html, body, div, span, applet, object, iframe,\nh1, h2, h3, h4, h5, h6, p, blockquote, pre,\na, abbr, acronym, address, big, cite, code,\ndel, dfn, em, font, ins, kbd, q, s, samp,\nsmall, strike, strong, sub, sup, tt, var,\ndl, dt, dd, ol, ul, li,\nfieldset, form, label, legend,\ntable, caption, tbody, tfoot, thead, tr, th, td {\nborder: 0;\nfont-family: inherit;\nfont-size: 100%;\nfont-style: inherit;\nfont-weight: inherit;\nmargin: 0;\noutline: 0;\npadding: 0;\nvertical-align: baseline;\n}\nhtml {\nfont-size: 100%; /* Corrects text resizing oddly in IE6/7 when body font-size is set using em units http://clagnut.com/blog/348/#c790 */\noverflow-y: scroll; /* Keeps page centred in all browsers regardless of content height */\n-webkit-text-size-adjust: 100%; /* Prevents iOS text size adjust after orientation change, without disabling user zoom */\n-ms-text-size-adjust: 100%; /* www.456bereastreet.com/archive/201012/controlling_text_size_in_safari_for_ios_without_disabling_user_zoom/ */\n}\nbody {\nbackground: #fff;\noverflow: hidden;\n}\narticle,\naside,\ndetails,\nfigcaption,\nfigure,\nfooter,\nheader,\nnav,\nsection {\ndisplay: block;\n}\nol, ul {\nlist-style: none;\n}\ntable { /* tables still need 'cellspacing=\"0\"' in the markup */\nborder-collapse: separate;\nborder-spacing: 0;\n}\ncaption, th, td {\nfont-weight: normal;\ntext-align: left;\n}\nblockquote:before, blockquote:after,\nq:before, q:after {\ncontent: \"\";\n}\nblockquote, q {\nquotes: \"\" \"\";\n}\na:focus {\noutline: thin dotted;\n}\na:hover,\na:active { /* Improves readability when focused and also mouse hovered in all browsers people.opera.com/patrickl/experiments/keyboard/test */\noutline: 0;\n}\na img {\nborder: 0;\n}\n\n/* Reseting to border-box so we can do 100% width with 20px and not mess stuff up. */\nhtml {\nbox-sizing: border-box;\n}\n\n*, *:before, *:after {\nbox-sizing: inherit;\n}\n\nhtml {\n font-size: 16px!important; // set our rem value reference\n}\n\nhtml #enp-quiz {\n box-sizing: border-box;\n border-radius: 3px;\n}\n\nbody #enp-quiz {\n background: #fff;\n overflow: hidden;\n}\n\n#enp-quiz {\n *, *:before, *:after {\n box-sizing: inherit;\n }\n\n ul, ol {\n margin: 0 0 1.6rem 1.25rem;\n padding: 0;\n }\n\n textarea {\n margin-bottom: 1rem;\n }\n\n button, input[type=\"button\"], input[type=\"reset\"], input[type=\"submit\"] {\n border: none;\n &:active,\n &:focus,\n &:hover {\n border: none;\n }\n }\n\n iframe {\n border: none;\n }\n}\n","/* Text meant only for screen readers */\n@mixin screen-reader-text {\n clip: rect(1px, 1px, 1px, 1px);\n position: absolute !important;\n left:-10000px;\n top:auto;\n width:1px;\n height:1px;\n overflow:hidden;\n}\n\n@mixin screen-reader-text--hover {\n background-color: #f1f1f1;\n border-radius: 3px;\n box-shadow: 0 0 2px 2px rgba(0, 0, 0, 0.6);\n clip: auto !important;\n color: #21759b;\n display: block;\n font-size: 14px;\n font-weight: bold;\n height: auto;\n left: 5px;\n line-height: normal;\n padding: 15px 23px 14px;\n text-decoration: none;\n top: 5px;\n width: auto;\n z-index: 100000;\n}\n\n\n@mixin disabled {\n opacity: 0.65;\n cursor: default;\n}\n\n@mixin btn {\n text-align: center;\n border: none;\n border-radius: 3px;\n padding: .85em 1.4em .75em;\n font-size: 15px;\n font-weight: 400;\n letter-spacing: .05em;\n line-height: 1.6;\n color: #fff;\n box-shadow: inset 0 -2px 0 rgba(0,0,0,.2);\n background: $link;\n cursor: pointer;\n text-transform: uppercase;\n transition: all .2s;\n\n &:hover {\n color: #fff;\n box-shadow: none;\n background: $link_hover;\n }\n\n &:active {\n color: #fff;\n box-shadow: inset 0 2px 0 rgba(0,0,0,.1);\n background: lighten($link, 20);\n }\n\n &:focus {\n @include focus--glow;\n }\n}\n\n@mixin btn--reset {\n border: none;\n background: none;\n box-shadow: none;\n padding: 0;\n margin: 0;\n}\n\n\n@mixin btn--submit {\n @include btn;\n}\n\n@mixin btn--ghost {\n @include btn;\n border: 2px solid $blue;\n background: transparent;\n color: $link;\n box-shadow: none;\n\n &:focus,\n &:hover {\n background: transparent;\n border: 2px solid $link_hover;\n color: $link_hover;\n }\n}\n\n@mixin btn--dashed {\n @include btn;\n border: 3px dashed $dark_gray;\n background: none;\n color: #545454;\n box-shadow: none;\n\n &:hover,\n &:focus {\n border: 3px dashed $darker_gray;\n color: $darker_gray;\n background: rgba(255,255,255,.9);\n }\n}\n\n@mixin btn--small {\n font-size: 13px;\n}\n\n@mixin btn--thin {\n padding: 0.4em 1em;\n}\n\n@mixin btn--wide {\n width: 100%;\n padding-top: 1em;\n padding-bottom: 1em;\n}\n\n@mixin btn--icon {\n @include btn;\n padding: .75em 0.8em .7em 1.4em;\n}\n\n@mixin btn--icon__icon {\n @include icon--white;\n @include icon--xl;\n}\n\n/*\n* @usage: @include btn--icon(BEM-root-class);\n* Button with icon with white circular background.\n* --------------\n* | BTN TEXT > |\n* --------------\n* @param $rootBEM: root class name that will be extended\n*/\n@mixin btn--icon($rootBEM) {\n .#{$rootBEM} {\n @include btn--icon;\n }\n\n .#{$rootBEM}__icon {\n @include btn--icon__icon ;\n }\n}\n\n@mixin btn--icon--icon-circle {\n @include btn;\n padding: .8em 1.2em .6em 1.4em;\n}\n\n// use when the icon is larger and on the right\n@mixin btn--icon__icon--circle {\n @include icon--circle;\n @include icon--white-bg;\n @include icon--normal;\n margin-left: 0.5em;\n}\n\n@mixin btn--icon__icon--circle--hover {\n @include icon--white-bg--hover;\n}\n\n/*\n* @usage: @include btn--icon--circle(BEM-root-class);\n* Button with icon with white circular background.\n* ---------------\n* | BTN TEXT (>) |\n* ---------------\n* @param $rootBEM: root class name that will be extended\n*/\n@mixin btn--icon--circle($rootBEM) {\n .#{$rootBEM} {\n @include btn--icon--icon-circle;\n }\n\n .#{$rootBEM}__icon {\n @include btn--icon__icon--circle ;\n\n &:hover {\n @include btn--icon__icon--circle--hover ;\n }\n }\n}\n\n/*\n* @usage: @include btn--icon--hover-circle(BEM-root-class);\n* Button with icon. Hovering/focusing button moves\n* the icon to right and fades in a white circular background\n* -------------- ----------------\n* | BTN TEXT > | --hover/focus--> | BTN TEXT (>) |\n* -------------- ----------------\n* @param $rootBEM: root class name that will be extended\n*/\n@mixin btn--icon--hover-circle($rootBEM) {\n .#{$rootBEM} {\n @include btn--icon--icon-circle;\n position: relative;\n padding-right: 2.8em;\n padding-top: 1em;\n padding-bottom: 0.95em;\n transition: padding .3s $fastInEaseOut;\n }\n\n .#{$rootBEM}__icon {\n @include btn--icon__icon--circle ;\n width: 1.6em;\n height: 1.6em;\n background: transparent;\n fill: #fff;\n position: absolute;\n top: 0;\n bottom: 0;\n margin-top: auto;\n margin-bottom: auto;\n transform: translate3d(0, 0, 0);\n transition: all .3s $fastInEaseOut;\n }\n\n .#{$rootBEM}:hover,\n .#{$rootBEM}:focus {\n\n .#{$rootBEM}__icon {\n @include btn--icon__icon--circle--hover ;\n }\n }\n\n\n\n\n}\n\n// use on small icons and placed on the left\n@mixin btn--icon__icon--circle--small {\n @include icon--circle--small;\n margin-right: 5px;\n}\n\n\n// use this to match the icon to the inline font-size\n@mixin icon--inline {\n width: 1em;\n height: 1em;\n position: relative;\n top: .125em;\n}\n\n@mixin icon--small {\n width: 1rem;\n height: 1rem;\n}\n\n@mixin icon--normal {\n width: 1.2rem;\n height: 1.2rem;\n}\n\n@mixin icon--large {\n width: 1.5rem;\n height: 1.5rem;\n}\n\n@mixin icon--xl {\n width: 1.8rem;\n height: 1.8rem;\n}\n\n@mixin icon--xxl {\n width: 2.4rem;\n height: 2.4rem;\n}\n\n@mixin icon--xxxl {\n width: 2.8rem;\n height: 2.8rem;\n}\n\n@mixin icon--circle {\n border-radius: 50%;\n background: $link;\n fill: #fff;\n}\n\n@mixin icon--circle--pad {\n @include icon--circle ;\n padding: 0.05em;\n\n @include breakpoint(medium) {\n padding: 0.15em;\n }\n}\n\n@mixin icon--circle--pad--xl {\n @include icon--circle ;\n padding: 0.6rem;\n}\n\n@mixin icon--circle--small {\n @include icon--small;\n @include icon--circle;\n padding: 0.02rem;\n}\n\n@mixin icon--white {\n fill: #fff;\n}\n\n@mixin icon--white-bg {\n background: #fff;\n fill: $link;\n}\n\n@mixin icon--white-bg--hover {\n background: #fff;\n fill: $link_hover;\n}\n\n@mixin icon--gray-bg {\n background: $dark_gray;\n fill: $light_gray;\n}\n\n@mixin icon--gray-bg--hover {\n fill: #fff;\n background: $darker_gray;\n}\n\n@mixin small-uppercase {\n font-size: 0.85rem;\n text-transform: uppercase;\n}\n\n@mixin hint {\n font-size: .7rem;\n font-weight: 300;\n color: #565656;\n}\n\n@mixin green {\n color: $green;\n}\n\n@mixin dark-green {\n color: $dark_green;\n}\n\n@mixin red {\n color: $red;\n}\n\n@mixin fade-red {\n color: $fade_red;\n}\n\n@mixin xmargin-vertical {\n margin-top: 2rem;\n margin-bottom: 2rem;\n}\n\n@mixin xmargin-horizontal {\n margin-right: 2rem;\n margin-left: 2rem;\n}\n\n@mixin xpadding-vertical {\n padding-top: 2rem;\n padding-bottom: 2rem;\n}\n\n@mixin xpadding-horizontal {\n padding-right: 2rem;\n padding-left: 2rem;\n}\n\n@mixin ul-no-style {\n list-style: none;\n margin-left: 0;\n}\n\n@mixin well {\n padding: 1.6rem;\n margin-bottom: 1.6rem;\n background: #fff;\n border: 1px solid #eee;\n border-bottom-color: #ccc;\n\n @include breakpoint(medium) {\n margin-bottom: 2.6rem;\n padding: 1.6rem 2rem;\n }\n}\n\n@mixin hidden--accessible {\n height: 0;\n opacity: 0;\n padding: 0;\n overflow: hidden;\n}\n\n// Share Icons\n@mixin share_icons($rootBEM) {\n\n .#{$rootBEM} {\n @include ul-no-style;\n text-align: center;\n }\n\n .#{$rootBEM}__item {\n display: inline-block;\n margin-right: 20px;\n\n &:last-child {\n margin-right: 0;\n }\n }\n\n .#{$rootBEM}__item__icon {\n @include icon--xxl;\n @include icon--circle--pad--xl;\n fill: #fff!important;\n }\n\n .#{$rootBEM}__item__icon--facebook {\n background-color: #3a5795;\n }\n\n .#{$rootBEM}__item__icon--twitter {\n background-color: #4099ff;\n }\n}\n\n@mixin section--alt {\n background: $light_gray;\n border-bottom: 1px solid #ddd;\n border-top: 1px solid #ddd;\n padding-top: 3rem;\n padding-bottom: 3rem;\n margin-top: 3rem;\n margin-bottom: 3rem;\n}\n\n#enp-quiz {\n .enp-screen-reader-text {\n @include screen-reader-text;\n }\n\n .enp-screen-reader-text:hover,\n .enp-screen-reader-text:active,\n .enp-screen-reader-text:focus {\n @include screen-reader-text--hover;\n }\n}\n\n@mixin focus--glow {\n outline-color: #4D90FE;\n outline-offset: -2px;\n outline-style: auto;\n outline-width: 5px;\n}\n\n#enp-quiz {\n\n .enp-quiz-message {\n @include container;\n max-width: 400px;\n background: #fff;\n border: 1px solid #eee;\n border-bottom: 1px solid #ccc;\n padding: 1rem 0.375rem;\n margin-top: 1.6rem;\n margin-bottom: 1.6rem;\n }\n\n .enp-quiz-message__title {\n @include small-uppercase;\n }\n\n .enp-message__list {\n @include ul-no-style;\n font-size: 1.1rem;\n margin-bottom: 0;\n }\n\n .enp-quiz-message--error {\n border-left: 6px solid $red;\n animation: slideInTop .3s $fastInEaseOut;\n }\n\n .enp-quiz-message__title--error {\n color: $dark_red;\n }\n\n .enp-quiz-message--success {\n border-left: 6px solid $green;\n color: $dark_green;\n }\n\n .enp-quiz-message__title--success {\n color: $dark_green;\n }\n\n}\n","@mixin clearfix {\n &:after {\n content: \"\";\n display: table;\n clear: both;\n }\n}\n\n@mixin container {\n max-width: 640px;\n margin-left: auto;\n margin-right: auto;\n padding-left: 20px;\n padding-right: 20px;\n @include clearfix;\n}\n\n@mixin flex {\n display: flex;\n}\n\n@mixin flex-center {\n @include flex;\n justify-content: center;\n align-content: center;\n align-items: center;\n}\n","//fonts\n$fontBody : Arial, monospace, helvetica, arial, sans-serif;\n$fontTitle : Arial, monospace, helvetica, arial, sans-serif;\n\n// // // colors\n$font : #1d1c25;\n$background: #FAF9FB;\n$title : #5D5E5F;\n\n// Blues\n$blue: #00A9B7;\n$dark_blue: #333F48;\n$light_blue: lighten($blue, 100);\n\n// Grays\n$light_gray: #F5F5F5;\n$really_light_gray: #F8F8F8;\n$gray: darken($light_gray, 2);\n$dark_gray: darken($gray, 5);\n$darker_gray: darken($dark_gray, 20);\n\n// Other colors\n$green: darken(#58C88F,10);\n$green: #60AAAD;\n$dark_green: darken($green, 8);\n$red: #bf5700;\n$dark_red: darken($red, 8);\n$fade_red: #C1893E;\n\n// Elements\n$link: $blue;\n$link_hover: darken($link, 10%);\n\n// animation\n$fastInEaseOut: cubic-bezier(0, 0, .3, 1);\n$easeInOut: cubic-bezier(0.15,0,.5,1);\n$easeInPauseFastOut: cubic-bezier(.28,.01,0,.69);\n\n$breakpoints: (\n \"small\" : 400px,\n \"medium\" : 700px,\n \"large\" : 1000px\n);\n\n// -----------------------------------------------------------------------------\n// Core\n// -----------------------------------------------------------------------------\n\n// Caching current breakpoint\n// Not meant to be manually edited\n$default-breakpoint: root;\n$current-breakpoint: $default-breakpoint;\n\n// The usual breakpoint mixin\n// Except it updates the $current-breakpoint variable\n// 1. If breakpoint name exists in map\n// 2. Update $current-breakpoint\n// 3. Open a media query\n// 4. Let the user dump content\n// 5. Then reset $current-breakpoint\n// 6. If breakpoint name doesn't exist in map, warn the user\n@mixin breakpoint($breakpoint) {\n $value: map-get($breakpoints, $breakpoint);\n\n @if $value != null { // 1\n $current-breakpoint: $breakpoint !global; // 2\n @media (min-width: $value) { @content; } // 3\n $current-breakpoint: $default-breakpoint !global; // 5\n }\n\n @else {\n @warn \"Invalid breakpoint `#{$breakpoint}`.\"; // 6\n }\n}\n\n// for only targeting a specific device\n// NOTE: DOESN'T SUPPORT THE @include placeholders!!!\n@mixin media($query) {\n $media_query: \"\";\n @if $query == max-small {\n $media_query: \"max-width: #{map-get($breakpoints, \"small\")}\";\n } @else if $query == only-medium {\n $media_query: \"min-width: #{map-get($breakpoints, \"medium\")}) and (max-width: #{(map-get($breakpoints, \"large\") - 1px)}\";\n } @else if $query == max-medium {\n $media_query: \"max-width: #{(map-get($breakpoints, \"medium\") - 1px)}\";\n } @else if $query == max-large {\n $media_query: \"max-width: #{(map-get($breakpoints, \"large\") - 1px)}\";\n } @else {\n // just use the number provided as a max width\n $media_query: \"max-width: #{$query}\";\n }\n\n @if variable-exists(media_query) {\n @media ($media_query) {\n @content;\n }\n }\n\n\n}\n","body {\n color: $font;\n font-family: $fontBody;\n font-size: 1em;\n line-height: 1.6;\n font-weight: 400;\n\n @include breakpoint(medium) {\n font-size: 1.3em;\n }\n}\n\n#enp-quiz {\n /* Headings */\n h1,h2,h3,h4,h5,h6 {\n font-family: $fontTitle;\n color: $font;\n clear: both;\n margin: 0 0 .2rem;\n font-weight: bold;\n line-height: 1.2em;\n }\n\n h1 {\n font-size: 2em;\n }\n\n h2 {\n font-size: 1.75em;\n }\n\n h3 {\n font-size: 1.475em;\n }\n\n h4 {\n font-size: 1.3em;\n }\n\n h5 {\n font-size: 1.125em;\n }\n\n h6 {\n font-size: 1em;\n }\n\n p+h1, ul+h1,\n p+h2, ul+h2,\n p+h3, ul+h3,\n p+h4, ul+h4,\n p+h5, ul+h5,\n p+h6, ul+h6 {\n margin-top: 1.8em;\n }\n\n /* Text elements */\n p {\n font-size: 0.85em;\n margin-bottom: 1.125em;\n font-weight: 300;\n }\n ul, ol {\n margin: 0 0 1.6em 1.25em;\n }\n ul {\n list-style: disc;\n }\n ol {\n list-style: decimal;\n }\n li > ul,\n li > ol {\n margin-bottom: 0;\n margin-left: 1.6em;\n }\n\n b, strong {\n font-weight: bold;\n }\n\n dfn, cite, em {\n font-family: georgia, times, serif;\n font-style: italic;\n }\n\n pre {\n background: #eee;\n font-family: \"Courier 10 Pitch\", Courier, monospace;\n font-size: .95em;\n line-height: 1.6;\n margin-bottom: 1.6em;\n padding: 1.6em;\n overflow: auto;\n max-width: 100%;\n }\n .code, code, kbd, tt, var {\n font: .7em Monaco, Consolas, \"Andale Mono\", \"DejaVu Sans Mono\", monospace;\n }\n\n figure {\n margin: 0;\n }\n\n img {\n height: auto; /* Make sure images are scaled correctly. */\n max-width: 100%; /* Adhere to container width. */\n }\n\n /* Links */\n a {\n color: $link;\n text-decoration: none;\n transition: color .2s;\n touch-action: manipulation; // remove 300ms delay for ie\n\n .enp-icon {\n fill: $link;\n }\n }\n\n a:hover,\n a:focus,\n a:active {\n color: $link_hover;\n\n .enp-icon {\n fill: $link_hover;\n }\n }\n\n button {\n &:focus {\n @include focus--glow;\n }\n }\n\n .enp-btn {\n @include btn;\n }\n\n\n .enp-btn--add {\n @include btn--dashed;\n width: 100%;\n }\n\n .enp-btn--disabled {\n @include disabled;\n }\n\n .enp-btn--enabled {\n animation: expand .6s;\n }\n\n .enp-icon {\n width: 24px;\n height: 24px;\n transition: all .2s;\n }\n\n .enp-page-title {\n font-size: 1.6rem;\n }\n}\n\n","#enp-quiz fieldset {\n border: none;\n margin: 0;\n padding: 0;\n}\n\n// enter the root BEM class and this will output the correct CSS for you\n@mixin radio-block($rootBEM) {\n .#{$rootBEM}__legend {\n @include radio-block__legend ;\n }\n\n .#{$rootBEM}__input {\n @include radio-block__input ;\n }\n\n .#{$rootBEM}__label {\n @include radio-block__label ;\n }\n\n .#{$rootBEM}__input:checked + .#{$rootBEM}__label {\n @include radio-block__label--checked ;\n }\n\n .#{$rootBEM}__input:focus + .#{$rootBEM}__label {\n @include radio-block__label--focus ;\n }\n}\n\n@mixin radio-inline($rootBEM) {\n .#{$rootBEM}__legend {\n @include radio-inline__legend ;\n }\n\n .#{$rootBEM}__input {\n @include radio-inline__input ;\n }\n\n .#{$rootBEM}__label {\n @include radio-inline__label ;\n }\n\n .#{$rootBEM}__input:checked + .#{$rootBEM}__label {\n @include radio-inline__label--checked ;\n }\n\n .#{$rootBEM}__input:focus + .#{$rootBEM}__label {\n @include radio-inline__label--focus ;\n }\n}\n\n@mixin label {\n display: block;\n color: lighten($font, 10);\n font-weight: normal;\n font-size: 0.85rem;\n text-transform: uppercase;\n}\n\n.enp-label {\n @include label;\n}\n\n@mixin legend {\n @include label;\n padding-top: 1.6rem;\n margin-bottom: 0.2rem;\n border: none;\n}\n\n.enp-legend {\n @include legend;\n}\n\n@mixin label--bold {\n @include label;\n font-weight: 500;\n}\n\n@mixin legend--bold {\n @include label--bold;\n}\n\n@mixin input {\n font-size: 1rem;\n font-family: $fontBody;\n padding: 0.8rem 0.5rem;\n background: #fff;\n border: 1px solid #aaa;\n border-radius: 3px;\n width: 20rem;\n max-width: 100%;\n margin-bottom: 1.2rem;\n\n @include breakpoint(medium) {\n padding: 0.8rem;\n }\n}\n\n@mixin input--large {\n @include input;\n padding: 1rem 1.2rem;\n font-size: 1.3rem;\n}\n\n@mixin input--xl {\n @include input;\n font-weight: bold;\n font-size: 1.6rem;\n margin-bottom: 1rem;\n\n &::placeholder {\n font-weight: bold;\n }\n}\n\n.enp-input {\n @include input;\n}\n\n.enp-input::placeholder,\n.enp-textarea::placeholder {\n font-family: $fontBody;\n font-weight: 300;\n color: lighten($font, 40);\n}\n\n@mixin textarea {\n @include input;\n line-height: 1.5;\n width: 100%;\n\n &:focus {\n @include focus--glow;\n }\n}\n\n@mixin radio-block__legend {\n @include legend;\n margin-bottom: 0.6rem;\n}\n\n@mixin radio-block__input {\n position: absolute;\n z-index: 9;\n margin-left: 9px;\n}\n\n@mixin radio-block__label {\n text-transform: capitalize;\n background: #f2f2f2;\n display: block;\n padding: 5px 10px 5px 39px;\n position: relative;\n top: -6px;\n box-shadow: inset -1px -1px 0 rgba(0,0,0,.1), inset 30px 0px 0 rgba(255,255,255,.7), inset 31px 0px 0 rgba(0,0,0,.1);\n}\n\n@mixin radio-block__label--checked {\n background: $green;\n color: #fff;\n text-shadow: 0 0 1px rgba(0,0,0,.7);\n}\n\n@mixin radio-block__label--focus {\n z-index: 8;\n @include focus--glow ;\n}\n\n@mixin radio-inline__legend {\n @include legend;\n}\n\n@mixin radio-inline__input {\n @include screen-reader-text;\n}\n\n@mixin radio-inline__label {\n text-transform: capitalize;\n display: inline-block;\n padding: 0.2rem 0.5rem;\n border-radius: 3px;\n}\n\n@mixin radio-inline__label--checked {\n @include radio-block__label--checked ;\n}\n\n@mixin radio-inline__label--focus {\n @include radio-block__label--focus ;\n}\n","@keyframes removeAnswers {\n 0% {\n opacity: 1;\n height: auto;\n transform: translate3d(0, 0, 0);\n }\n 10% {\n opacity: 1;\n transform: translate3d(0, 0, 0);\n }\n 100% {\n padding: 0;\n opacity: 0;\n display: none;\n height: 0;\n z-index: -1;\n transform: translate3d(-150px, 0, 0);\n }\n}\n\n@keyframes removeQuestion {\n 0% {\n opacity: 1;\n transform: translateX(0);\n }\n 15% {\n opacity: 1;\n transform: translateX(0);\n }\n 100% {\n opacity: 0;\n transform: translateX(-150px);\n }\n}\n\n@keyframes showNextQuestion {\n 0% {\n opacity: 0;\n transform: translateX(120px);\n }\n\n 100% {\n opacity: 1;\n transform: translateX(0);\n }\n}\n\n@keyframes slideInTop {\n 0% {\n opacity: 0;\n height: auto;\n transform: translate3d(0, -20px, 0);\n }\n 100% {\n opacity: 1;\n height: auto;\n transform: translate3d(0, 0, 0);\n }\n}\n\n@keyframes slideInBottom {\n 0% {\n opacity: 0;\n transform: translate3d(0, 20px, 0);\n }\n 100% {\n opacity: 1;\n transform: translate3d(0, 0, 0);\n }\n}\n\n@keyframes flashRedShadow {\n 0% {\n background: $red;\n }\n 100% {\n background: #fff;\n }\n}\n\n\n@keyframes errorContainer {\n 0% {\n //background-color: #fff;\n }\n 100% {\n background-color: rgba($red, .2);\n }\n}\n\n@keyframes pop {\n 0% {\n width: 0;\n opacity: 1;\n }\n 30% {\n width: 100%;\n }\n 80% {\n opacity: 1;\n width: 100%;\n }\n 100% {\n width: 40%;\n opacity: 0;\n }\n}\n\n\n.spinner {\n margin: 0 auto;\n width: 70px;\n text-align: center;\n}\n\n.spinner > div {\n width: 18px;\n height: 18px;\n background-color: #333;\n\n border-radius: 100%;\n display: inline-block;\n -webkit-animation: sk-bouncedelay 1.4s infinite ease-in-out both;\n animation: sk-bouncedelay 1.4s infinite ease-in-out both;\n}\n\n.spinner .bounce1 {\n -webkit-animation-delay: -0.32s;\n animation-delay: -0.32s;\n}\n\n.spinner .bounce2 {\n -webkit-animation-delay: -0.16s;\n animation-delay: -0.16s;\n}\n\n@-webkit-keyframes sk-bouncedelay {\n 0%, 80%, 100% { -webkit-transform: scale(0) }\n 40% { -webkit-transform: scale(1.0) }\n}\n\n@keyframes sk-bouncedelay {\n 0%, 80%, 100% {\n -webkit-transform: scale(0);\n transform: scale(0);\n } 40% {\n -webkit-transform: scale(1.0);\n transform: scale(1.0);\n }\n}\n"," // -------------------------//\n // Taking a Quiz Styles //\n// -------------------------//\n\n#enp-quiz {\n background: transparent;\n\n .enp-quiz__container {\n position: relative;\n padding: 0;\n background: #fff;\n border: 1px solid #ddd;\n }\n\n .enp-quiz__header {\n position: relative;\n border-bottom: 1px solid #ddd;\n }\n\n .enp-quiz__title {\n @include small-uppercase;\n font-weight: 500;\n letter-spacing: 0.01rem;\n padding: 0.6rem 1rem;\n }\n\n .enp-quiz__title--hide {\n display: none;\n }\n\n .enp-quiz__progress {\n position: absolute;\n bottom: 0;\n left: 0;\n right: 0;\n height: 0;\n }\n\n .enp-quiz__progress__bar {\n position: relative;\n // this will be calculated on load\n width: 0;\n // to prevent 30 question quizzes from having a width of 3.33% and not being wide enough to display the question count\n min-width: 2rem;\n height: 3px;\n background: $green;\n transition: all .5s $fastInEaseOut;\n }\n\n .enp-quiz__progress__bar__question-count {\n position: absolute;\n right: 1rem;\n bottom: 0.7rem;\n font-size: .8rem;\n }\n\n .enp-question__container {\n display: block;\n min-height: 92vh;\n }\n\n .enp-question__form {\n //transition: all .3s $fastInEaseOut;\n @include container;\n overflow: hidden;\n color: $font;\n padding-top: 2rem;\n padding-bottom: 2.6rem;\n\n @include breakpoint(medium) {\n padding: 2.6rem 3rem;\n // TEMP dev style:\n width: 100vw;\n }\n }\n\n .enp-question__question {\n font-size: 1.8rem;\n font-weight: bold;\n line-height: 1.2;\n margin-bottom: 0.2rem;\n padding-bottom: 0.1rem;\n position: relative;\n box-sizing: border-box; /* IE9-11 & Edge 12-13 */\n display: table; /* IE8-11 */\n max-width: 100%; /* Patch for IE9-11 & Edge 12-13 */\n white-space: normal; /* IE8-11 */\n\n @include breakpoint(small) {\n font-size: 2rem;\n }\n\n &:after {\n content: '';\n position: absolute;\n height: 2px;\n background-color: #eee;\n background-color: rgba(0,0,0,.2);\n margin: auto;\n width: 0;\n bottom: 0;\n left: 0;\n right: 0;\n }\n\n &:focus {\n &:after {\n animation: pop .8s $fastInEaseOut;\n }\n\n }\n }\n\n .enp-question-image {\n margin-bottom: 0.4rem;\n }\n\n .enp-question__helper {\n font-size: 1rem;\n }\n\n .enp-option__input {\n @include screen-reader-text;\n\n &:checked + .enp-option__label:before {\n background-color: $green;\n }\n\n &:focus + .enp-option__label {\n color: $font;\n background: $light_gray;\n }\n }\n\n .enp-option__label {\n display: block;\n position: relative;\n width: 100%;\n text-align: left;\n text-transform: none;\n padding: 0.8rem 0rem 0.8rem 40px;\n font-size: 1rem;\n font-weight: 400;\n line-height: 1.6;\n border: none;\n border-bottom: 1px solid #eee;\n border-bottom: 1px solid rgba(0,0,0,.1);\n background: none;\n color: $font;\n transition: color .2s $fastInEaseOut, background .2s $fastInEaseOut;\n\n &:before {\n content: '';\n position: absolute;\n top: 0.925rem;\n left: 10px;\n width: 20px;\n height: 20px;\n border-radius: 50%;\n border: 2px solid $green;\n padding: 3px;\n background-clip: content-box; /* support: IE9+ */\n background-color: transparent;\n transition: all .2s;\n }\n\n &:last-of-type {\n border-bottom: none;\n }\n }\n\n .enp-question__container--unanswered {\n .enp-option__label {\n\n &:hover {\n cursor: pointer;\n\n &:before {\n background-color: $green;\n }\n }\n }\n }\n\n // if keyboard user (or JS didn't submit the question).\n // show the submit button (they can also hit enter to submit tho)\n @include btn--icon--hover-circle(enp-question__submit);\n\n .enp-question__submit {\n\n &:hover,\n &:focus {\n padding-right: 4em;\n }\n\n .enp-question__submit__icon {\n right: 0.8em;\n }\n }\n\n .enp-question__fieldset--mc .enp-question__submit {\n opacity: 0;\n height: 0;\n padding-top: 0;\n padding-bottom: 0;\n }\n\n .enp-question__fieldset--mc .enp-option__input:checked ~ .enp-options__submit {\n margin-top: 0.4rem;\n padding-top: 1em;\n padding-bottom: 0.95em;\n height: auto;\n opacity: 1;\n animation: .3s slideInTop $fastInEaseOut forwards;\n }\n\n .enp-question__fieldset--slider .enp-options__submit {\n margin-top: 1.4rem;\n }\n // ----------------------//\n // Answer Explanation //\n // ----------------------//\n\n .enp-question__container--explanation {\n background-color: $background;\n\n .enp-question__submit {\n display: none;\n }\n\n .enp-option__label {\n margin-bottom: 5px;\n border-bottom: none;\n }\n\n .enp-option__input--correct-clicked + .enp-option__label {\n\n &:before {\n background-color: $green;\n }\n\n }\n\n .enp-option__input--correct + .enp-option__label {\n box-shadow: inset 4px 0 0 $green;\n background-color: lighten($green, 47);\n }\n\n .enp-option__input--incorrect-clicked + .enp-option__label {\n background-color: #fff;\n box-shadow: inset 4px 0 0 $red;\n\n &:before {\n border: 2px solid $red;\n background-color: $red;\n }\n }\n }\n\n .enp-option__input--slide-hide + .enp-option__label{\n margin: 0;\n height: 0;\n animation: removeAnswers 0.6s $easeInPauseFastOut forwards;\n }\n\n .enp-explanation {\n background: #fff;\n padding: 1.6rem 1.6rem 1.5rem;\n }\n\n .enp-question__fieldset--slider .enp-explanation {\n animation: slideInBottom .3s $fastInEaseOut forwards;\n }\n\n .enp-explanation--correct {\n box-shadow: inset 4px 0 0 $green;\n\n // set our text for after the percentage\n .enp-explanation__percentage:after {\n content: '% Got This Right';\n }\n }\n\n .enp-explanation--incorrect {\n box-shadow: inset 4px 0 0 $red;\n\n // set our text for after the percentage\n .enp-explanation__percentage:after {\n content: '% Got This Wrong';\n }\n\n }\n\n .enp-explanation__title {\n @include small-uppercase;\n }\n\n .enp-explanation__percentage {\n font-size: .75rem;\n font-weight: 500;\n color: #565656;\n margin-left: 4px;\n\n &:after {\n content: '%';\n }\n }\n\n .enp-explanation--correct .enp-explanation__title {\n color: darken($green, 10);\n }\n\n .enp-explanation--incorrect .enp-explanation__title {\n color: darken($red, 10);\n }\n\n .enp-explanation__explanation {\n font-weight: 400;\n margin-top: 0.4rem;\n }\n\n @include btn--icon--hover-circle(enp-next-step);\n .enp-next-step {\n @include btn--ghost;\n display: inline-block;\n width: 100%;\n padding: .8em 2.4em .8em 1.4em;\n position: relative;\n\n\n .enp-next-step__icon {\n fill: $link;\n transition: all .3s $fastInEaseOut;\n }\n\n &:hover {\n .enp-next-step__icon {\n fill: #fff;\n background: $link;\n margin-right: 0;\n transform: translate3d(1em, 0, 0);\n margin-right: 1em;\n }\n }\n }\n\n\n //\n // Next Question\n //\n\n\n .enp-question--on-deck {\n transform: translateX(200px);\n opacity: 0;\n z-index: -1;\n top: 0;\n position: absolute;\n }\n\n .enp-question--show {\n animation: showNextQuestion .6s $fastInEaseOut forwards;\n }\n\n .enp-question--remove {\n position: absolute;\n animation: removeQuestion .15s $fastInEaseOut forwards;\n }\n\n // ----------------------//\n // Quiz Results //\n // ----------------------//\n\n .enp-results__score {\n position: relative;\n text-align: center;\n border-radius: 50%;\n margin: 0 auto 1rem;\n display: block;\n height: 200px;\n width: 200px;\n }\n\n .enp-results__score__title {\n color: $font;\n font-size: 5rem;\n line-height: 1;\n font-weight: 400;\n position: absolute;\n top: 50%;\n left: 50%;\n transform: translate(-50%, -50%);\n margin: 0;\n }\n\n .enp-results__score__title__percentage {\n font-size: 1.3rem;\n position: absolute;\n top: 1rem;\n font-weight: 300;\n }\n\n .enp-results__encouragement {\n font-size: 1.8rem;\n font-weight: 500;\n text-align: center;\n line-height: 1.2;\n margin: 0.2rem;\n }\n\n .enp-results__description {\n // max-width: 24rem;\n // TEMP DEV style:\n max-width: 100vw;\n overflow: auto;\n // END temp dev\n margin: 0 auto 1.6rem;\n }\n\n .enp-results__score__circle {\n transform: rotate(-90deg);\n }\n\n #enp-results__score__circle__path,\n .enp-results__score__circle__bg {\n stroke: #ddd;\n stroke-width: 4px;\n }\n\n #enp-results__score__circle__path {\n stroke: $green;\n }\n\n .enp-results__score__circle__setOffset {\n transition: stroke-dashoffset 1.2s $fastInEaseOut;\n }\n\n .enp-results__score__circle__resetOffset {\n stroke-dashoffset: 565.48;\n }\n\n .enp-results__share-title {\n margin: 2.4rem 0 1rem;\n }\n\n .enp-results__share-title {\n @include small-uppercase;\n text-align: center;\n }\n\n @include share_icons(enp-results__share);\n\n .enp-quiz-restart__container {\n text-align: center;\n }\n\n // error state\n .enp-question__container--error {\n padding: 1rem 10px;\n //background-color: rgba($red, .2);\n animation: errorContainer .3s $fastInEaseOut forwards;\n }\n\n .enp-callout {\n font-size: 10px;\n font-size: 0.8rem;\n text-align: right;\n padding: 0.4rem;\n }\n}\n","#enp-quiz {\n\n .enp-slider {\n margin-bottom: 1.6rem;\n }\n\n .enp-slider-input__container {\n display: flex;\n align-items: center;\n justify-content: center;\n margin: 1.6rem auto;\n position: relative;\n }\n\n .enp-slider-input__label {\n @include label;\n }\n\n .enp-slider-input__prefix,\n .enp-slider-input__suffix {\n font-size: 1rem;\n }\n\n .enp-slider-input__prefix {\n margin-right: .2rem;\n white-space: pre;\n }\n\n .enp-slider-input__suffix {\n margin-left: .2rem;\n white-space: pre;\n }\n\n .enp-slider-input__input {\n @include input;\n margin-bottom: 0;\n padding: .75rem;\n width: auto;\n transition: all .25s $fastInEaseOut;\n }\n\n .enp-slider-input__input--incorrect {\n color: $red;\n }\n\n .enp-slider-input__input--correct {\n color: $dark_green;\n }\n\n .enp-slider-input__input--invalid-animation {\n box-shadow: 0 0 2px 1px $fade_red;\n }\n\n .enp-slider_input__range-helper {\n position: absolute;\n bottom: -1.2rem;\n font-size: 0.8rem;\n }\n\n .enp-slider_input__range-helper--low {\n left: 0;\n }\n\n .enp-slider_input__range-helper--high {\n right: 0;\n }\n\n .enp-slider-input__range-helper__number {\n position: relative;\n color: $dark_gray;\n }\n\n .enp-slider_input__range-helper__number--low {\n\n }\n\n .enp-slider_input__range-helper__number--high {\n\n }\n\n .ui-slider-range-show-correct__tooltip-container {\n position: relative;\n }\n\n .ui-slider-range-show-correct__tooltip {\n position: absolute;\n top: -0.4rem;\n margin-left: -0.55rem;\n height: 1rem;\n width: 1.1rem;\n height: 1.1rem;\n border: 2px solid $green;\n background-color: #fff;\n border-radius: 50%;\n z-index: 9999;\n }\n\n .ui-slider-range-show-correct__tooltip--low {\n left: 0;\n }\n\n .ui-slider-range-show-correct__tooltip--high {\n right: -0.55rem;\n }\n\n .ui-slider-range-show-correct__tooltip__text {\n position: relative;\n color: darken($green, 15);\n top: -1.35rem;\n font-size: .825rem;\n min-width: 100%;\n display: inline-block;\n text-align: center;\n text-shadow: 0 1px 0 #fff;\n }\n\n .ui-slider-range-show-correct__tooltip__text--low {\n\n }\n\n .ui-slider-range-show-correct__tooltip__text--high {\n\n }\n\n .ui-slider-range-show-correct__tooltip__text--low-center {\n //left: 0; // not perfectly centered for huge numbers, but is for small numbers\n }\n\n // JQUERY SLIDER\n .enp-slider {\n\t\tposition: relative;\n\t\ttext-align: left;\n\t\tbackground: #ddd;\n\n\t\t/* Layout helpers\n\t\t----------------------------------*/\n\t\t.ui-helper-hidden {\n\t\t\tdisplay: none;\n\t\t}\n\t\t.ui-helper-hidden-accessible {\n\t\t\tborder: 0;\n\t\t\tclip: rect(0 0 0 0);\n\t\t\theight: 1px;\n\t\t\tmargin: -1px;\n\t\t\toverflow: hidden;\n\t\t\tpadding: 0;\n\t\t\tposition: absolute;\n\t\t\twidth: 1px;\n\t\t}\n\t\t.ui-helper-reset {\n\t\t\tmargin: 0;\n\t\t\tpadding: 0;\n\t\t\tborder: 0;\n\t\t\toutline: 0;\n\t\t\tline-height: 1.3;\n\t\t\ttext-decoration: none;\n\t\t\tfont-size: 100%;\n\t\t\tlist-style: none;\n\t\t}\n\t\t.ui-helper-clearfix:before,\n\t\t.ui-helper-clearfix:after {\n\t\t\tcontent: \"\";\n\t\t\tdisplay: table;\n\t\t\tborder-collapse: collapse;\n\t\t}\n\t\t.ui-helper-clearfix:after {\n\t\t\tclear: both;\n\t\t}\n\t\t.ui-helper-clearfix {\n\t\t\tmin-height: 0; /* support: IE7 */\n\t\t}\n\t\t.ui-helper-zfix {\n\t\t\twidth: 100%;\n\t\t\theight: 100%;\n\t\t\ttop: 0;\n\t\t\tleft: 0;\n\t\t\tposition: absolute;\n\t\t\topacity: 0;\n\t\t\tfilter:alpha(opacity=0); /* support: IE8 */\n\t\t}\n\n\t\t.ui-front {\n\t\t\tz-index: 100;\n\t\t}\n\n\n\t\t/* Interaction Cues\n\t\t----------------------------------*/\n\t\t.ui-state-disabled {\n\t\t\tcursor: default !important;\n\t\t}\n\n\n\t\t/* Icons\n\t\t----------------------------------*/\n\n\t\t/* states and images */\n\t\t.ui-icon {\n\t\t\tdisplay: block;\n\t\t\ttext-indent: -99999px;\n\t\t\toverflow: hidden;\n\t\t\tbackground-repeat: no-repeat;\n\t\t}\n\n\n\t\t/* Misc visuals\n\t\t----------------------------------*/\n\n\t\t/* Overlays */\n\t\t.ui-widget-overlay {\n\t\t\tposition: fixed;\n\t\t\ttop: 0;\n\t\t\tleft: 0;\n\t\t\twidth: 100%;\n\t\t\theight: 100%;\n\t\t}\n\n\t\t.ui-slider-handle {\n\t\t\tbackground: #fff;\n\t\t\tborder-radius: 50%;\n\t\t\tborder: 1px solid #aaa;\n\t\t\tposition: absolute;\n\t\t\tz-index: 2;\n\t\t\twidth: 1.2rem;\n\t\t\theight: 1.2rem;\n top: -.4rem;\n\t\t\tmargin-left: -.6rem;\n\t\t\tcursor: default;\n\t\t\t-ms-touch-action: none;\n\t\t\ttouch-action: none;\n\t\t\ttransition: opacity 0.2s $fastInEaseOut, height .18s $fastInEaseOut, width .18s $fastInEaseOut, transform 0.18s $fastInEaseOut;\n\n @include media(max-medium) {\n width: 2rem;\n \t\t\theight: 2rem;\n top: -.85rem;\n margin-left: -1rem;\n transform: rotate(225deg);\n }\n\n\t\t\t&:focus {\n\t\t\t\toutline: none;\n\t\t\t\tbox-shadow: 0 0 3px 1px #4D90FE;\n\t\t\t}\n\n &.ui-state-active {\n @include media(max-medium) {\n width: 2.2rem;\n height: 2.2rem;\n border-top-left-radius: 0;\n transform: translate3d(-0.2rem, -0.8rem, 0) rotate(225deg);\n }\n\n }\n\n\t\t}\n\n .ui-slider-handle--correct,\n\t\t.ui-slider-handle--incorrect {\n width: 1.1rem;\n\t\t\theight: 1.1rem;\n top: -.4rem;\n margin-left: -.55rem;\n }\n\n .ui-slider-handle--incorrect {\n z-index: 1;\n\t\t\tborder: 2px solid $red;\n\t\t}\n\n .ui-slider-handle--correct {\n border: 2px solid $green;\n z-index: 99999;\n }\n\n\t\t.ui-slider-range {\n\t\t\tposition: absolute;\n\t\t\tz-index: 1;\n\t\t\tfont-size: .7rem;\n\t\t\tdisplay: block;\n\t\t\tborder: 0;\n\t\t\tbackground-position: 0 0;\n\t\t\ttop: 0;\n\t\t\theight: 100%;\n\t\t}\n\n .ui-slider-range-show-correct {\n background: $green;\n z-index: 9;\n }\n\n\t\t.ui-slider-range-min {\n\t\t\tleft: 0;\n\t\t\tbackground: $green;\n\t\t}\n\n\t\t.ui-slider-range-max {\n\t\t\tright: 0;\n\t\t}\n\n\t\t/* support: IE8 - See #6727 */\n\t\t&.ui-state-disabled .ui-slider-handle,\n\t\t&.ui-state-disabled .ui-slider-range {\n\t\t\tfilter: inherit;\n\t\t}\n\t}\n\n\t.ui-slider-horizontal {\n\t\theight: .3rem;\n\t}\n\n\t.enp-question__answered {\n\t\t.enp-slider {\n\t\t\tbackground: #bbb;\n\t\t}\n\n\t\t.ui-slider-range-min {\n\t\t\tbackground: #fff;\n\t\t}\n\n\t}\n\n}\n"]} \ No newline at end of file +{"version":3,"sources":["_setup.scss","_utilities.scss","_structure.scss","_variables.scss","_typography.scss","_forms.scss","_animations.scss","_quiz.scss","_slider.scss"],"names":[],"mappings":"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","file":"enp_quiz-take.min.css","sourcesContent":["html, body, div, span, applet, object, iframe,\nh1, h2, h3, h4, h5, h6, p, blockquote, pre,\na, abbr, acronym, address, big, cite, code,\ndel, dfn, em, font, ins, kbd, q, s, samp,\nsmall, strike, strong, sub, sup, tt, var,\ndl, dt, dd, ol, ul, li,\nfieldset, form, label, legend,\ntable, caption, tbody, tfoot, thead, tr, th, td {\nborder: 0;\nfont-family: inherit;\nfont-size: 100%;\nfont-style: inherit;\nfont-weight: inherit;\nmargin: 0;\noutline: 0;\npadding: 0;\nvertical-align: baseline;\n}\nhtml {\nfont-size: 100%; /* Corrects text resizing oddly in IE6/7 when body font-size is set using em units http://clagnut.com/blog/348/#c790 */\noverflow-y: scroll; /* Keeps page centred in all browsers regardless of content height */\n-webkit-text-size-adjust: 100%; /* Prevents iOS text size adjust after orientation change, without disabling user zoom */\n-ms-text-size-adjust: 100%; /* www.456bereastreet.com/archive/201012/controlling_text_size_in_safari_for_ios_without_disabling_user_zoom/ */\n}\nbody {\nbackground: #fff;\noverflow: hidden;\n}\narticle,\naside,\ndetails,\nfigcaption,\nfigure,\nfooter,\nheader,\nnav,\nsection {\ndisplay: block;\n}\nol, ul {\nlist-style: none;\n}\ntable { /* tables still need 'cellspacing=\"0\"' in the markup */\nborder-collapse: separate;\nborder-spacing: 0;\n}\ncaption, th, td {\nfont-weight: normal;\ntext-align: left;\n}\nblockquote:before, blockquote:after,\nq:before, q:after {\ncontent: \"\";\n}\nblockquote, q {\nquotes: \"\" \"\";\n}\na:focus {\noutline: thin dotted;\n}\na:hover,\na:active { /* Improves readability when focused and also mouse hovered in all browsers people.opera.com/patrickl/experiments/keyboard/test */\noutline: 0;\n}\na img {\nborder: 0;\n}\n\n/* Reseting to border-box so we can do 100% width with 20px and not mess stuff up. */\nhtml {\nbox-sizing: border-box;\n}\n\n*, *:before, *:after {\nbox-sizing: inherit;\n}\n\nhtml {\n font-size: 16px!important; // set our rem value reference\n}\n\nhtml #enp-quiz {\n box-sizing: border-box;\n border-radius: 3px;\n}\n\nbody #enp-quiz {\n background: #fff;\n overflow: hidden;\n}\n\n#enp-quiz {\n *, *:before, *:after {\n box-sizing: inherit;\n }\n\n ul, ol {\n margin: 0 0 1.6rem 1.25rem;\n padding: 0;\n }\n\n textarea {\n margin-bottom: 1rem;\n }\n\n button, input[type=\"button\"], input[type=\"reset\"], input[type=\"submit\"] {\n border: none;\n &:active,\n &:focus,\n &:hover {\n border: none;\n }\n }\n\n iframe {\n border: none;\n }\n}\n","/* Text meant only for screen readers */\n@mixin screen-reader-text {\n clip: rect(1px, 1px, 1px, 1px);\n position: absolute !important;\n left:-10000px;\n top:auto;\n width:1px;\n height:1px;\n overflow:hidden;\n}\n\n@mixin screen-reader-text--hover {\n background-color: #f1f1f1;\n border-radius: 3px;\n box-shadow: 0 0 2px 2px rgba(0, 0, 0, 0.6);\n clip: auto !important;\n color: #21759b;\n display: block;\n font-size: 14px;\n font-weight: bold;\n height: auto;\n left: 5px;\n line-height: normal;\n padding: 15px 23px 14px;\n text-decoration: none;\n top: 5px;\n width: auto;\n z-index: 100000;\n}\n\n\n@mixin disabled {\n opacity: 0.65;\n cursor: default;\n}\n\n@mixin btn {\n text-align: center;\n border: none;\n border-radius: 3px;\n padding: .85em 1.4em .75em;\n font-size: 15px;\n font-weight: 400;\n letter-spacing: .05em;\n line-height: 1.6;\n color: #fff;\n box-shadow: inset 0 -2px 0 rgba(0,0,0,.2);\n background: $link;\n cursor: pointer;\n text-transform: uppercase;\n transition: all .2s;\n\n &:hover {\n color: #fff;\n box-shadow: none;\n background: $link_hover;\n }\n\n &:active {\n color: #fff;\n box-shadow: inset 0 2px 0 rgba(0,0,0,.1);\n background: lighten($link, 20);\n }\n\n &:focus {\n @include focus--glow;\n }\n}\n\n@mixin btn--reset {\n border: none;\n background: none;\n box-shadow: none;\n padding: 0;\n margin: 0;\n}\n\n\n@mixin btn--submit {\n @include btn;\n}\n\n@mixin btn--ghost {\n @include btn;\n border: 2px solid $blue;\n background: transparent;\n color: $link;\n box-shadow: none;\n\n &:focus,\n &:hover {\n background: transparent;\n border: 2px solid $link_hover;\n color: $link_hover;\n }\n}\n\n@mixin btn--dashed {\n @include btn;\n border: 3px dashed $dark_gray;\n background: none;\n color: #545454;\n box-shadow: none;\n\n &:hover,\n &:focus {\n border: 3px dashed $darker_gray;\n color: $darker_gray;\n background: rgba(255,255,255,.9);\n }\n}\n\n@mixin btn--small {\n font-size: 13px;\n}\n\n@mixin btn--thin {\n padding: 0.4em 1em;\n}\n\n@mixin btn--wide {\n width: 100%;\n padding-top: 1em;\n padding-bottom: 1em;\n}\n\n@mixin btn--icon {\n @include btn;\n padding: .75em 0.8em .7em 1.4em;\n}\n\n@mixin btn--icon__icon {\n @include icon--white;\n @include icon--xl;\n}\n\n/*\n* @usage: @include btn--icon(BEM-root-class);\n* Button with icon with white circular background.\n* --------------\n* | BTN TEXT > |\n* --------------\n* @param $rootBEM: root class name that will be extended\n*/\n@mixin btn--icon($rootBEM) {\n .#{$rootBEM} {\n @include btn--icon;\n }\n\n .#{$rootBEM}__icon {\n @include btn--icon__icon ;\n }\n}\n\n@mixin btn--icon--icon-circle {\n @include btn;\n padding: .8em 1.2em .6em 1.4em;\n}\n\n// use when the icon is larger and on the right\n@mixin btn--icon__icon--circle {\n @include icon--circle;\n @include icon--white-bg;\n @include icon--normal;\n margin-left: 0.5em;\n}\n\n@mixin btn--icon__icon--circle--hover {\n @include icon--white-bg--hover;\n}\n\n/*\n* @usage: @include btn--icon--circle(BEM-root-class);\n* Button with icon with white circular background.\n* ---------------\n* | BTN TEXT (>) |\n* ---------------\n* @param $rootBEM: root class name that will be extended\n*/\n@mixin btn--icon--circle($rootBEM) {\n .#{$rootBEM} {\n @include btn--icon--icon-circle;\n }\n\n .#{$rootBEM}__icon {\n @include btn--icon__icon--circle ;\n\n &:hover {\n @include btn--icon__icon--circle--hover ;\n }\n }\n}\n\n/*\n* @usage: @include btn--icon--hover-circle(BEM-root-class);\n* Button with icon. Hovering/focusing button moves\n* the icon to right and fades in a white circular background\n* -------------- ----------------\n* | BTN TEXT > | --hover/focus--> | BTN TEXT (>) |\n* -------------- ----------------\n* @param $rootBEM: root class name that will be extended\n*/\n@mixin btn--icon--hover-circle($rootBEM) {\n .#{$rootBEM} {\n @include btn--icon--icon-circle;\n position: relative;\n padding-right: 2.8em;\n padding-top: 1em;\n padding-bottom: 0.95em;\n transition: padding .3s $fastInEaseOut;\n }\n\n .#{$rootBEM}__icon {\n @include btn--icon__icon--circle ;\n width: 1.6em;\n height: 1.6em;\n background: transparent;\n fill: #fff;\n position: absolute;\n top: 0;\n bottom: 0;\n margin-top: auto;\n margin-bottom: auto;\n transform: translate3d(0, 0, 0);\n transition: all .3s $fastInEaseOut;\n }\n\n .#{$rootBEM}:hover,\n .#{$rootBEM}:focus {\n\n .#{$rootBEM}__icon {\n @include btn--icon__icon--circle--hover ;\n }\n }\n\n\n\n\n}\n\n// use on small icons and placed on the left\n@mixin btn--icon__icon--circle--small {\n @include icon--circle--small;\n margin-right: 5px;\n}\n\n\n// use this to match the icon to the inline font-size\n@mixin icon--inline {\n width: 1em;\n height: 1em;\n position: relative;\n top: .125em;\n}\n\n@mixin icon--small {\n width: 1rem;\n height: 1rem;\n}\n\n@mixin icon--normal {\n width: 1.2rem;\n height: 1.2rem;\n}\n\n@mixin icon--large {\n width: 1.5rem;\n height: 1.5rem;\n}\n\n@mixin icon--xl {\n width: 1.8rem;\n height: 1.8rem;\n}\n\n@mixin icon--xxl {\n width: 2.4rem;\n height: 2.4rem;\n}\n\n@mixin icon--xxxl {\n width: 2.8rem;\n height: 2.8rem;\n}\n\n@mixin icon--circle {\n border-radius: 50%;\n background: $link;\n fill: #fff;\n}\n\n@mixin icon--circle--pad {\n @include icon--circle ;\n padding: 0.05em;\n\n @include breakpoint(medium) {\n padding: 0.15em;\n }\n}\n\n@mixin icon--circle--pad--xl {\n @include icon--circle ;\n padding: 0.6rem;\n}\n\n@mixin icon--circle--small {\n @include icon--small;\n @include icon--circle;\n padding: 0.02rem;\n}\n\n@mixin icon--white {\n fill: #fff;\n}\n\n@mixin icon--white-bg {\n background: #fff;\n fill: $link;\n}\n\n@mixin icon--white-bg--hover {\n background: #fff;\n fill: $link_hover;\n}\n\n@mixin icon--gray-bg {\n background: $dark_gray;\n fill: $light_gray;\n}\n\n@mixin icon--gray-bg--hover {\n fill: #fff;\n background: $darker_gray;\n}\n\n@mixin small-uppercase {\n font-size: 0.85rem;\n text-transform: uppercase;\n}\n\n@mixin hint {\n font-size: .7rem;\n font-weight: 300;\n color: #565656;\n}\n\n@mixin green {\n color: $green;\n}\n\n@mixin dark-green {\n color: $dark_green;\n}\n\n@mixin red {\n color: $red;\n}\n\n@mixin fade-red {\n color: $fade_red;\n}\n\n@mixin xmargin-vertical {\n margin-top: 2rem;\n margin-bottom: 2rem;\n}\n\n@mixin xmargin-horizontal {\n margin-right: 2rem;\n margin-left: 2rem;\n}\n\n@mixin xpadding-vertical {\n padding-top: 2rem;\n padding-bottom: 2rem;\n}\n\n@mixin xpadding-horizontal {\n padding-right: 2rem;\n padding-left: 2rem;\n}\n\n@mixin ul-no-style {\n list-style: none;\n margin-left: 0;\n}\n\n@mixin well {\n padding: 1.6rem;\n margin-bottom: 1.6rem;\n background: #fff;\n border: 1px solid #eee;\n border-bottom-color: #ccc;\n\n @include breakpoint(medium) {\n margin-bottom: 2.6rem;\n padding: 1.6rem 2rem;\n }\n}\n\n@mixin hidden--accessible {\n height: 0;\n opacity: 0;\n padding: 0;\n overflow: hidden;\n}\n\n// Share Icons\n@mixin share_icons($rootBEM) {\n\n .#{$rootBEM} {\n @include ul-no-style;\n text-align: center;\n }\n\n .#{$rootBEM}__item {\n display: inline-block;\n margin-right: 20px;\n\n &:last-child {\n margin-right: 0;\n }\n }\n\n .#{$rootBEM}__item__icon {\n @include icon--xxl;\n @include icon--circle--pad--xl;\n fill: #fff!important;\n }\n\n .#{$rootBEM}__item__icon--facebook {\n background-color: #3a5795;\n }\n\n .#{$rootBEM}__item__icon--twitter {\n background-color: #4099ff;\n }\n}\n\n@mixin section--alt {\n background: $light_gray;\n border-bottom: 1px solid #ddd;\n border-top: 1px solid #ddd;\n padding-top: 3rem;\n padding-bottom: 3rem;\n margin-top: 3rem;\n margin-bottom: 3rem;\n}\n\n#enp-quiz {\n .enp-screen-reader-text {\n @include screen-reader-text;\n }\n\n .enp-screen-reader-text:hover,\n .enp-screen-reader-text:active,\n .enp-screen-reader-text:focus {\n @include screen-reader-text--hover;\n }\n}\n\n@mixin focus--glow {\n outline-color: #4D90FE;\n outline-offset: -2px;\n outline-style: auto;\n outline-width: 5px;\n}\n\n#enp-quiz {\n\n .enp-quiz-message {\n @include container;\n max-width: 400px;\n background: #fff;\n border: 1px solid #eee;\n border-bottom: 1px solid #ccc;\n padding: 1rem 0.375rem;\n margin-top: 1.6rem;\n margin-bottom: 1.6rem;\n }\n\n .enp-quiz-message__title {\n @include small-uppercase;\n }\n\n .enp-message__list {\n @include ul-no-style;\n font-size: 1.1rem;\n margin-bottom: 0;\n }\n\n .enp-quiz-message--error {\n border-left: 6px solid $red;\n animation: slideInTop .3s $fastInEaseOut;\n }\n\n .enp-quiz-message__title--error {\n color: $dark_red;\n }\n\n .enp-quiz-message--success {\n border-left: 6px solid $green;\n color: $dark_green;\n }\n\n .enp-quiz-message__title--success {\n color: $dark_green;\n }\n\n}\n","@mixin clearfix {\n &:after {\n content: \"\";\n display: table;\n clear: both;\n }\n}\n\n@mixin container {\n max-width: 640px;\n margin-left: auto;\n margin-right: auto;\n padding-left: 20px;\n padding-right: 20px;\n @include clearfix;\n}\n\n@mixin flex {\n display: flex;\n}\n\n@mixin flex-center {\n @include flex;\n justify-content: center;\n align-content: center;\n align-items: center;\n}\n","//fonts\n$fontBody : Arial, monospace, helvetica, arial, sans-serif;\n$fontTitle : Arial, monospace, helvetica, arial, sans-serif;\n\n// // // colors\n$font : #1d1c25;\n$background: #FAF9FB;\n$title : #5D5E5F;\n\n// Blues\n$blue: #00A9B7;\n$dark_blue: #333F48;\n$light_blue: lighten($blue, 100);\n\n// Grays\n$light_gray: #F5F5F5;\n$really_light_gray: #F8F8F8;\n$gray: darken($light_gray, 2);\n$dark_gray: darken($gray, 5);\n$darker_gray: darken($dark_gray, 20);\n\n// Other colors\n$green: darken(#58C88F,10);\n$green: #60AAAD;\n$dark_green: darken($green, 8);\n$red: #bf5700;\n$dark_red: darken($red, 8);\n$fade_red: #C1893E;\n\n// Elements\n$link: $blue;\n$link_hover: darken($link, 10%);\n\n// animation\n$fastInEaseOut: cubic-bezier(0, 0, .3, 1);\n$easeInOut: cubic-bezier(0.15,0,.5,1);\n$easeInPauseFastOut: cubic-bezier(.28,.01,0,.69);\n\n$breakpoints: (\n \"small\" : 400px,\n \"medium\" : 700px,\n \"large\" : 1000px\n);\n\n// -----------------------------------------------------------------------------\n// Core\n// -----------------------------------------------------------------------------\n\n// Caching current breakpoint\n// Not meant to be manually edited\n$default-breakpoint: root;\n$current-breakpoint: $default-breakpoint;\n\n// The usual breakpoint mixin\n// Except it updates the $current-breakpoint variable\n// 1. If breakpoint name exists in map\n// 2. Update $current-breakpoint\n// 3. Open a media query\n// 4. Let the user dump content\n// 5. Then reset $current-breakpoint\n// 6. If breakpoint name doesn't exist in map, warn the user\n@mixin breakpoint($breakpoint) {\n $value: map-get($breakpoints, $breakpoint);\n\n @if $value != null { // 1\n $current-breakpoint: $breakpoint !global; // 2\n @media (min-width: $value) { @content; } // 3\n $current-breakpoint: $default-breakpoint !global; // 5\n }\n\n @else {\n @warn \"Invalid breakpoint `#{$breakpoint}`.\"; // 6\n }\n}\n\n// for only targeting a specific device\n// NOTE: DOESN'T SUPPORT THE @include placeholders!!!\n@mixin media($query) {\n $media_query: \"\";\n @if $query == max-small {\n $media_query: \"max-width: #{map-get($breakpoints, \"small\")}\";\n } @else if $query == only-medium {\n $media_query: \"min-width: #{map-get($breakpoints, \"medium\")}) and (max-width: #{(map-get($breakpoints, \"large\") - 1px)}\";\n } @else if $query == max-medium {\n $media_query: \"max-width: #{(map-get($breakpoints, \"medium\") - 1px)}\";\n } @else if $query == max-large {\n $media_query: \"max-width: #{(map-get($breakpoints, \"large\") - 1px)}\";\n } @else {\n // just use the number provided as a max width\n $media_query: \"max-width: #{$query}\";\n }\n\n @if variable-exists(media_query) {\n @media ($media_query) {\n @content;\n }\n }\n\n\n}\n","body {\n color: $font;\n font-family: $fontBody;\n font-size: 1em;\n line-height: 1.6;\n font-weight: 400;\n\n @include breakpoint(medium) {\n font-size: 1.3em;\n }\n}\n\n#enp-quiz {\n /* Headings */\n h1,h2,h3,h4,h5,h6 {\n font-family: $fontTitle;\n color: $font;\n clear: both;\n margin: 0 0 .2rem;\n font-weight: bold;\n line-height: 1.2em;\n }\n\n h1 {\n font-size: 2em;\n }\n\n h2 {\n font-size: 1.75em;\n }\n\n h3 {\n font-size: 1.475em;\n }\n\n h4 {\n font-size: 1.3em;\n }\n\n h5 {\n font-size: 1.125em;\n }\n\n h6 {\n font-size: 1em;\n }\n\n p+h1, ul+h1,\n p+h2, ul+h2,\n p+h3, ul+h3,\n p+h4, ul+h4,\n p+h5, ul+h5,\n p+h6, ul+h6 {\n margin-top: 1.8em;\n }\n\n /* Text elements */\n p {\n font-size: 0.85em;\n margin-bottom: 1.125em;\n font-weight: 300;\n }\n ul, ol {\n margin: 0 0 1.6em 1.25em;\n }\n ul {\n list-style: disc;\n }\n ol {\n list-style: decimal;\n }\n li > ul,\n li > ol {\n margin-bottom: 0;\n margin-left: 1.6em;\n }\n\n b, strong {\n font-weight: bold;\n }\n\n dfn, cite, em {\n font-family: georgia, times, serif;\n font-style: italic;\n }\n\n pre {\n background: #eee;\n font-family: \"Courier 10 Pitch\", Courier, monospace;\n font-size: .95em;\n line-height: 1.6;\n margin-bottom: 1.6em;\n padding: 1.6em;\n overflow: auto;\n max-width: 100%;\n }\n .code, code, kbd, tt, var {\n font: .7em Monaco, Consolas, \"Andale Mono\", \"DejaVu Sans Mono\", monospace;\n }\n\n figure {\n margin: 0;\n }\n\n img {\n height: auto; /* Make sure images are scaled correctly. */\n max-width: 100%; /* Adhere to container width. */\n }\n\n /* Links */\n a {\n color: $link;\n text-decoration: none;\n transition: color .2s;\n touch-action: manipulation; // remove 300ms delay for ie\n\n .enp-icon {\n fill: $link;\n }\n }\n\n a:hover,\n a:focus,\n a:active {\n color: $link_hover;\n\n .enp-icon {\n fill: $link_hover;\n }\n }\n\n button {\n &:focus {\n @include focus--glow;\n }\n }\n\n .enp-btn {\n @include btn;\n }\n\n\n .enp-btn--add {\n @include btn--dashed;\n width: 100%;\n }\n\n .enp-btn--disabled {\n @include disabled;\n }\n\n .enp-btn--enabled {\n animation: expand .6s;\n }\n\n .enp-icon {\n width: 24px;\n height: 24px;\n transition: all .2s;\n }\n\n .enp-page-title {\n font-size: 1.6rem;\n }\n}\n\n","#enp-quiz fieldset {\n border: none;\n margin: 0;\n padding: 0;\n}\n\n// enter the root BEM class and this will output the correct CSS for you\n@mixin radio-block($rootBEM) {\n .#{$rootBEM}__legend {\n @include radio-block__legend ;\n }\n\n .#{$rootBEM}__input {\n @include radio-block__input ;\n }\n\n .#{$rootBEM}__label {\n @include radio-block__label ;\n }\n\n .#{$rootBEM}__input:checked + .#{$rootBEM}__label {\n @include radio-block__label--checked ;\n }\n\n .#{$rootBEM}__input:focus + .#{$rootBEM}__label {\n @include radio-block__label--focus ;\n }\n}\n\n@mixin radio-inline($rootBEM) {\n .#{$rootBEM}__legend {\n @include radio-inline__legend ;\n }\n\n .#{$rootBEM}__input {\n @include radio-inline__input ;\n }\n\n .#{$rootBEM}__label {\n @include radio-inline__label ;\n }\n\n .#{$rootBEM}__input:checked + .#{$rootBEM}__label {\n @include radio-inline__label--checked ;\n }\n\n .#{$rootBEM}__input:focus + .#{$rootBEM}__label {\n @include radio-inline__label--focus ;\n }\n}\n\n@mixin label {\n display: block;\n color: lighten($font, 10);\n font-weight: normal;\n font-size: 0.85rem;\n text-transform: uppercase;\n}\n\n.enp-label {\n @include label;\n}\n\n@mixin legend {\n @include label;\n padding-top: 1.6rem;\n margin-bottom: 0.2rem;\n border: none;\n}\n\n.enp-legend {\n @include legend;\n}\n\n@mixin label--bold {\n @include label;\n font-weight: 500;\n}\n\n@mixin legend--bold {\n @include label--bold;\n}\n\n@mixin input {\n font-size: 1rem;\n font-family: $fontBody;\n padding: 0.8rem 0.5rem;\n background: #fff;\n border: 1px solid #aaa;\n border-radius: 3px;\n width: 20rem;\n max-width: 100%;\n margin-bottom: 1.2rem;\n\n @include breakpoint(medium) {\n padding: 0.8rem;\n }\n}\n\n@mixin input--large {\n @include input;\n padding: 1rem 1.2rem;\n font-size: 1.3rem;\n}\n\n@mixin input--xl {\n @include input;\n font-weight: bold;\n font-size: 1.6rem;\n margin-bottom: 1rem;\n\n &::placeholder {\n font-weight: bold;\n }\n}\n\n.enp-input {\n @include input;\n}\n\n.enp-input::placeholder,\n.enp-textarea::placeholder {\n font-family: $fontBody;\n font-weight: 300;\n color: lighten($font, 40);\n}\n\n@mixin textarea {\n @include input;\n line-height: 1.5;\n width: 100%;\n\n &:focus {\n @include focus--glow;\n }\n}\n\n@mixin radio-block__legend {\n @include legend;\n margin-bottom: 0.6rem;\n}\n\n@mixin radio-block__input {\n position: absolute;\n z-index: 9;\n margin-left: 9px;\n}\n\n@mixin radio-block__label {\n text-transform: capitalize;\n background: #f2f2f2;\n display: block;\n padding: 5px 10px 5px 39px;\n position: relative;\n top: -6px;\n box-shadow: inset -1px -1px 0 rgba(0,0,0,.1), inset 30px 0px 0 rgba(255,255,255,.7), inset 31px 0px 0 rgba(0,0,0,.1);\n}\n\n@mixin radio-block__label--checked {\n background: $green;\n color: #fff;\n text-shadow: 0 0 1px rgba(0,0,0,.7);\n}\n\n@mixin radio-block__label--focus {\n z-index: 8;\n @include focus--glow ;\n}\n\n@mixin radio-inline__legend {\n @include legend;\n}\n\n@mixin radio-inline__input {\n @include screen-reader-text;\n}\n\n@mixin radio-inline__label {\n text-transform: capitalize;\n display: inline-block;\n padding: 0.2rem 0.5rem;\n border-radius: 3px;\n}\n\n@mixin radio-inline__label--checked {\n @include radio-block__label--checked ;\n}\n\n@mixin radio-inline__label--focus {\n @include radio-block__label--focus ;\n}\n","@keyframes removeAnswers {\n 0% {\n opacity: 1;\n height: auto;\n transform: translate3d(0, 0, 0);\n }\n 10% {\n opacity: 1;\n transform: translate3d(0, 0, 0);\n }\n 100% {\n padding: 0;\n opacity: 0;\n display: none;\n height: 0;\n z-index: -1;\n transform: translate3d(-150px, 0, 0);\n }\n}\n\n@keyframes removeQuestion {\n 0% {\n opacity: 1;\n transform: translateX(0);\n }\n 15% {\n opacity: 1;\n transform: translateX(0);\n }\n 100% {\n opacity: 0;\n transform: translateX(-150px);\n }\n}\n\n@keyframes showNextQuestion {\n 0% {\n opacity: 0;\n transform: translateX(120px);\n }\n\n 100% {\n opacity: 1;\n transform: translateX(0);\n }\n}\n\n@keyframes slideInTop {\n 0% {\n opacity: 0;\n height: auto;\n transform: translate3d(0, -20px, 0);\n }\n 100% {\n opacity: 1;\n height: auto;\n transform: translate3d(0, 0, 0);\n }\n}\n\n@keyframes slideInBottom {\n 0% {\n opacity: 0;\n transform: translate3d(0, 20px, 0);\n }\n 100% {\n opacity: 1;\n transform: translate3d(0, 0, 0);\n }\n}\n\n@keyframes flashRedShadow {\n 0% {\n background: $red;\n }\n 100% {\n background: #fff;\n }\n}\n\n\n@keyframes errorContainer {\n 0% {\n //background-color: #fff;\n }\n 100% {\n background-color: rgba($red, .2);\n }\n}\n\n@keyframes pop {\n 0% {\n width: 0;\n opacity: 1;\n }\n 30% {\n width: 100%;\n }\n 80% {\n opacity: 1;\n width: 100%;\n }\n 100% {\n width: 40%;\n opacity: 0;\n }\n}\n\n\n.spinner {\n margin: 0 auto;\n width: 70px;\n text-align: center;\n}\n\n.spinner > div {\n width: 18px;\n height: 18px;\n background-color: #333;\n\n border-radius: 100%;\n display: inline-block;\n -webkit-animation: sk-bouncedelay 1.4s infinite ease-in-out both;\n animation: sk-bouncedelay 1.4s infinite ease-in-out both;\n}\n\n.spinner .bounce1 {\n -webkit-animation-delay: -0.32s;\n animation-delay: -0.32s;\n}\n\n.spinner .bounce2 {\n -webkit-animation-delay: -0.16s;\n animation-delay: -0.16s;\n}\n\n@-webkit-keyframes sk-bouncedelay {\n 0%, 80%, 100% { -webkit-transform: scale(0) }\n 40% { -webkit-transform: scale(1.0) }\n}\n\n@keyframes sk-bouncedelay {\n 0%, 80%, 100% {\n -webkit-transform: scale(0);\n transform: scale(0);\n } 40% {\n -webkit-transform: scale(1.0);\n transform: scale(1.0);\n }\n}\n"," // -------------------------//\n // Taking a Quiz Styles //\n// -------------------------//\n\n#enp-quiz {\n background: transparent;\n\n .enp-quiz__container {\n position: relative;\n padding: 0;\n background: #fff;\n border: 1px solid #ddd;\n }\n\n .enp-quiz__header {\n position: relative;\n border-bottom: 1px solid #ddd;\n }\n\n .enp-quiz__title {\n @include small-uppercase;\n font-weight: 500;\n letter-spacing: 0.01rem;\n padding: 0.6rem 1rem;\n }\n\n .enp-quiz__title--hide {\n display: none;\n }\n\n .enp-quiz__progress {\n position: absolute;\n bottom: 0;\n left: 0;\n right: 0;\n height: 0;\n }\n\n .enp-quiz__progress__bar {\n position: relative;\n // this will be calculated on load\n width: 0;\n // to prevent 30 question quizzes from having a width of 3.33% and not being wide enough to display the question count\n min-width: 2rem;\n height: 3px;\n background: $green;\n transition: all .5s $fastInEaseOut;\n }\n\n .enp-quiz__progress__bar__question-count {\n position: absolute;\n right: 1rem;\n bottom: 0.7rem;\n font-size: .8rem;\n }\n\n .enp-question__container {\n display: block;\n min-height: 92vh;\n }\n\n .enp-question__form {\n //transition: all .3s $fastInEaseOut;\n @include container;\n overflow: hidden;\n color: $font;\n padding-top: 2rem;\n padding-bottom: 2.6rem;\n\n @include breakpoint(medium) {\n padding: 2.6rem 3rem;\n // TEMP dev style:\n width: 100vw;\n }\n }\n\n .enp-question__question {\n font-size: 1.8rem;\n font-weight: bold;\n line-height: 1.2;\n margin-bottom: 0.2rem;\n padding-bottom: 0.1rem;\n position: relative;\n box-sizing: border-box; /* IE9-11 & Edge 12-13 */\n display: table; /* IE8-11 */\n max-width: 100%; /* Patch for IE9-11 & Edge 12-13 */\n white-space: normal; /* IE8-11 */\n\n @include breakpoint(small) {\n font-size: 2rem;\n }\n\n &:after {\n content: '';\n position: absolute;\n height: 2px;\n background-color: #eee;\n background-color: rgba(0,0,0,.2);\n margin: auto;\n width: 0;\n bottom: 0;\n left: 0;\n right: 0;\n }\n\n &:focus {\n &:after {\n animation: pop .8s $fastInEaseOut;\n }\n\n }\n }\n\n .enp-question-image {\n margin-bottom: 0.4rem;\n }\n\n .enp-question__helper {\n font-size: 1rem;\n }\n\n .enp-option__input {\n @include screen-reader-text;\n\n &:checked + .enp-option__label:before {\n background-color: $green;\n }\n\n &:focus + .enp-option__label {\n color: $font;\n background: $light_gray;\n }\n }\n\n .enp-option__label {\n display: block;\n position: relative;\n width: 100%;\n text-align: left;\n text-transform: none;\n padding: 0.8rem 0rem 0.8rem 40px;\n font-size: 1rem;\n font-weight: 400;\n line-height: 1.6;\n border: none;\n border-bottom: 1px solid #eee;\n border-bottom: 1px solid rgba(0,0,0,.1);\n background: none;\n color: $font;\n transition: color .2s $fastInEaseOut, background .2s $fastInEaseOut;\n\n &:before {\n content: '';\n position: absolute;\n top: 0.925rem;\n left: 10px;\n width: 20px;\n height: 20px;\n border-radius: 50%;\n border: 2px solid $green;\n padding: 3px;\n background-clip: content-box; /* support: IE9+ */\n background-color: transparent;\n transition: all .2s;\n }\n\n &:last-of-type {\n border-bottom: none;\n }\n }\n\n .enp-question__container--unanswered {\n .enp-option__label {\n\n &:hover {\n cursor: pointer;\n\n &:before {\n background-color: $green;\n }\n }\n }\n }\n\n // if keyboard user (or JS didn't submit the question).\n // show the submit button (they can also hit enter to submit tho)\n @include btn--icon--hover-circle(enp-question__submit);\n\n .enp-question__submit {\n\n &:hover,\n &:focus {\n padding-right: 4em;\n }\n\n .enp-question__submit__icon {\n right: 0.8em;\n }\n }\n\n .enp-question__fieldset--mc .enp-question__submit {\n opacity: 0;\n height: 0;\n padding-top: 0;\n padding-bottom: 0;\n }\n\n .enp-question__fieldset--mc .enp-option__input:checked ~ .enp-options__submit {\n margin-top: 0.4rem;\n padding-top: 1em;\n padding-bottom: 0.95em;\n height: auto;\n opacity: 1;\n animation: .3s slideInTop $fastInEaseOut forwards;\n }\n\n .enp-question__fieldset--slider .enp-options__submit {\n margin-top: 1.4rem;\n }\n // ----------------------//\n // Answer Explanation //\n // ----------------------//\n\n .enp-question__container--explanation {\n background-color: $background;\n\n .enp-question__submit {\n display: none;\n }\n\n .enp-option__label {\n margin-bottom: 5px;\n border-bottom: none;\n }\n\n .enp-option__input--correct-clicked + .enp-option__label {\n\n &:before {\n background-color: $green;\n }\n\n }\n\n .enp-option__input--correct + .enp-option__label {\n box-shadow: inset 4px 0 0 $green;\n background-color: lighten($green, 47);\n }\n\n .enp-option__input--incorrect-clicked + .enp-option__label {\n background-color: #fff;\n box-shadow: inset 4px 0 0 $red;\n\n &:before {\n border: 2px solid $red;\n background-color: $red;\n }\n }\n }\n\n .enp-option__input--slide-hide + .enp-option__label{\n margin: 0;\n height: 0;\n animation: removeAnswers 0.6s $easeInPauseFastOut forwards;\n }\n\n .enp-explanation {\n background: #fff;\n padding: 1.6rem 1.6rem 1.5rem;\n }\n\n .enp-question__fieldset--slider .enp-explanation {\n animation: slideInBottom .3s $fastInEaseOut forwards;\n }\n\n .enp-explanation--correct {\n box-shadow: inset 4px 0 0 $green;\n\n // set our text for after the percentage\n .enp-explanation__percentage:after {\n content: '% Got This Right';\n }\n }\n\n .enp-explanation--incorrect {\n box-shadow: inset 4px 0 0 $red;\n\n // set our text for after the percentage\n .enp-explanation__percentage:after {\n content: '% Got This Wrong';\n }\n\n }\n\n .enp-explanation__title {\n @include small-uppercase;\n }\n\n .enp-explanation__percentage {\n font-size: .75rem;\n font-weight: 500;\n color: #565656;\n margin-left: 4px;\n\n &:after {\n content: '%';\n }\n }\n\n .enp-explanation--correct .enp-explanation__title {\n color: darken($green, 10);\n }\n\n .enp-explanation--incorrect .enp-explanation__title {\n color: darken($red, 10);\n }\n\n .enp-explanation__explanation {\n font-weight: 400;\n margin-top: 0.4rem;\n }\n\n @include btn--icon--hover-circle(enp-next-step);\n .enp-next-step {\n @include btn--ghost;\n display: inline-block;\n width: 100%;\n padding: .8em 2.4em .8em 1.4em;\n position: relative;\n\n\n .enp-next-step__icon {\n fill: $link;\n transition: all .3s $fastInEaseOut;\n }\n\n &:hover {\n .enp-next-step__icon {\n fill: #fff;\n background: $link;\n margin-right: 0;\n transform: translate3d(1em, 0, 0);\n margin-right: 1em;\n }\n }\n }\n\n\n //\n // Next Question\n //\n\n\n .enp-question--on-deck {\n transform: translateX(200px);\n opacity: 0;\n z-index: -1;\n top: 0;\n position: absolute;\n }\n\n .enp-question--show {\n animation: showNextQuestion .6s $fastInEaseOut forwards;\n }\n\n .enp-question--remove {\n position: absolute;\n animation: removeQuestion .15s $fastInEaseOut forwards;\n }\n\n // ----------------------//\n // Quiz Results //\n // ----------------------//\n\n .enp-results__score {\n position: relative;\n text-align: center;\n border-radius: 50%;\n margin: 0 auto 1rem;\n display: block;\n height: 200px;\n width: 200px;\n }\n\n .enp-results__score__title {\n color: $font;\n font-size: 5rem;\n line-height: 1;\n font-weight: 400;\n position: absolute;\n top: 50%;\n left: 47%;\n transform: translate(-50%, -50%);\n margin: 0;\n }\n\n .enp-results__score__title__percentage {\n font-size: 1.3rem;\n position: absolute;\n top: 1rem;\n font-weight: 300;\n }\n\n .enp-results__encouragement {\n font-size: 1.8rem;\n font-weight: 500;\n text-align: center;\n line-height: 1.2;\n margin: 0.2rem;\n }\n\n .enp-results__description {\n // max-width: 24rem;\n // TEMP DEV style:\n max-width: 100vw;\n overflow: auto;\n // END temp dev\n margin: 0 auto 1.6rem;\n }\n\n .enp-results__score__circle {\n transform: rotate(-90deg);\n }\n\n #enp-results__score__circle__path,\n .enp-results__score__circle__bg {\n stroke: #ddd;\n stroke-width: 4px;\n }\n\n #enp-results__score__circle__path {\n stroke: $green;\n }\n\n .enp-results__score__circle__setOffset {\n transition: stroke-dashoffset 1.2s $fastInEaseOut;\n }\n\n .enp-results__score__circle__resetOffset {\n stroke-dashoffset: 565.48;\n }\n\n .enp-results__share-title {\n margin: 2.4rem 0 1rem;\n }\n\n .enp-results__share-title {\n @include small-uppercase;\n text-align: center;\n }\n\n @include share_icons(enp-results__share);\n\n .enp-quiz-restart__container {\n text-align: center;\n }\n\n // error state\n .enp-question__container--error {\n padding: 1rem 10px;\n //background-color: rgba($red, .2);\n animation: errorContainer .3s $fastInEaseOut forwards;\n }\n\n .enp-callout {\n font-size: 10px;\n font-size: 0.8rem;\n text-align: right;\n padding: 0.4rem;\n }\n}\n","#enp-quiz {\n\n .enp-slider {\n margin-bottom: 1.6rem;\n }\n\n .enp-slider-input__container {\n display: flex;\n align-items: center;\n justify-content: center;\n margin: 1.6rem auto;\n position: relative;\n }\n\n .enp-slider-input__label {\n @include label;\n }\n\n .enp-slider-input__prefix,\n .enp-slider-input__suffix {\n font-size: 1rem;\n }\n\n .enp-slider-input__prefix {\n margin-right: .2rem;\n white-space: pre;\n }\n\n .enp-slider-input__suffix {\n margin-left: .2rem;\n white-space: pre;\n }\n\n .enp-slider-input__input {\n @include input;\n margin-bottom: 0;\n padding: .75rem;\n width: auto;\n transition: all .25s $fastInEaseOut;\n }\n\n .enp-slider-input__input--incorrect {\n color: $red;\n }\n\n .enp-slider-input__input--correct {\n color: $dark_green;\n }\n\n .enp-slider-input__input--invalid-animation {\n box-shadow: 0 0 2px 1px $fade_red;\n }\n\n .enp-slider_input__range-helper {\n position: absolute;\n bottom: -1.2rem;\n font-size: 0.8rem;\n }\n\n .enp-slider_input__range-helper--low {\n left: 0;\n }\n\n .enp-slider_input__range-helper--high {\n right: 0;\n }\n\n .enp-slider-input__range-helper__number {\n position: relative;\n color: $dark_gray;\n }\n\n .enp-slider_input__range-helper__number--low {\n\n }\n\n .enp-slider_input__range-helper__number--high {\n\n }\n\n .ui-slider-range-show-correct__tooltip-container {\n position: relative;\n }\n\n .ui-slider-range-show-correct__tooltip {\n position: absolute;\n top: -0.4rem;\n margin-left: -0.55rem;\n height: 1rem;\n width: 1.1rem;\n height: 1.1rem;\n border: 2px solid $green;\n background-color: #fff;\n border-radius: 50%;\n z-index: 9999;\n }\n\n .ui-slider-range-show-correct__tooltip--low {\n left: 0;\n }\n\n .ui-slider-range-show-correct__tooltip--high {\n right: -0.55rem;\n }\n\n .ui-slider-range-show-correct__tooltip__text {\n position: relative;\n color: darken($green, 15);\n top: -1.35rem;\n font-size: .825rem;\n min-width: 100%;\n display: inline-block;\n text-align: center;\n text-shadow: 0 1px 0 #fff;\n }\n\n .ui-slider-range-show-correct__tooltip__text--low {\n\n }\n\n .ui-slider-range-show-correct__tooltip__text--high {\n\n }\n\n .ui-slider-range-show-correct__tooltip__text--low-center {\n //left: 0; // not perfectly centered for huge numbers, but is for small numbers\n }\n\n // JQUERY SLIDER\n .enp-slider {\n\t\tposition: relative;\n\t\ttext-align: left;\n\t\tbackground: #ddd;\n\n\t\t/* Layout helpers\n\t\t----------------------------------*/\n\t\t.ui-helper-hidden {\n\t\t\tdisplay: none;\n\t\t}\n\t\t.ui-helper-hidden-accessible {\n\t\t\tborder: 0;\n\t\t\tclip: rect(0 0 0 0);\n\t\t\theight: 1px;\n\t\t\tmargin: -1px;\n\t\t\toverflow: hidden;\n\t\t\tpadding: 0;\n\t\t\tposition: absolute;\n\t\t\twidth: 1px;\n\t\t}\n\t\t.ui-helper-reset {\n\t\t\tmargin: 0;\n\t\t\tpadding: 0;\n\t\t\tborder: 0;\n\t\t\toutline: 0;\n\t\t\tline-height: 1.3;\n\t\t\ttext-decoration: none;\n\t\t\tfont-size: 100%;\n\t\t\tlist-style: none;\n\t\t}\n\t\t.ui-helper-clearfix:before,\n\t\t.ui-helper-clearfix:after {\n\t\t\tcontent: \"\";\n\t\t\tdisplay: table;\n\t\t\tborder-collapse: collapse;\n\t\t}\n\t\t.ui-helper-clearfix:after {\n\t\t\tclear: both;\n\t\t}\n\t\t.ui-helper-clearfix {\n\t\t\tmin-height: 0; /* support: IE7 */\n\t\t}\n\t\t.ui-helper-zfix {\n\t\t\twidth: 100%;\n\t\t\theight: 100%;\n\t\t\ttop: 0;\n\t\t\tleft: 0;\n\t\t\tposition: absolute;\n\t\t\topacity: 0;\n\t\t\tfilter:alpha(opacity=0); /* support: IE8 */\n\t\t}\n\n\t\t.ui-front {\n\t\t\tz-index: 100;\n\t\t}\n\n\n\t\t/* Interaction Cues\n\t\t----------------------------------*/\n\t\t.ui-state-disabled {\n\t\t\tcursor: default !important;\n\t\t}\n\n\n\t\t/* Icons\n\t\t----------------------------------*/\n\n\t\t/* states and images */\n\t\t.ui-icon {\n\t\t\tdisplay: block;\n\t\t\ttext-indent: -99999px;\n\t\t\toverflow: hidden;\n\t\t\tbackground-repeat: no-repeat;\n\t\t}\n\n\n\t\t/* Misc visuals\n\t\t----------------------------------*/\n\n\t\t/* Overlays */\n\t\t.ui-widget-overlay {\n\t\t\tposition: fixed;\n\t\t\ttop: 0;\n\t\t\tleft: 0;\n\t\t\twidth: 100%;\n\t\t\theight: 100%;\n\t\t}\n\n\t\t.ui-slider-handle {\n\t\t\tbackground: #fff;\n\t\t\tborder-radius: 50%;\n\t\t\tborder: 1px solid #aaa;\n\t\t\tposition: absolute;\n\t\t\tz-index: 2;\n\t\t\twidth: 1.2rem;\n\t\t\theight: 1.2rem;\n top: -.4rem;\n\t\t\tmargin-left: -.6rem;\n\t\t\tcursor: default;\n\t\t\t-ms-touch-action: none;\n\t\t\ttouch-action: none;\n\t\t\ttransition: opacity 0.2s $fastInEaseOut, height .18s $fastInEaseOut, width .18s $fastInEaseOut, transform 0.18s $fastInEaseOut;\n\n @include media(max-medium) {\n width: 2rem;\n \t\t\theight: 2rem;\n top: -.85rem;\n margin-left: -1rem;\n transform: rotate(225deg);\n }\n\n\t\t\t&:focus {\n\t\t\t\toutline: none;\n\t\t\t\tbox-shadow: 0 0 3px 1px #4D90FE;\n\t\t\t}\n\n &.ui-state-active {\n @include media(max-medium) {\n width: 2.2rem;\n height: 2.2rem;\n border-top-left-radius: 0;\n transform: translate3d(-0.2rem, -0.8rem, 0) rotate(225deg);\n }\n\n }\n\n\t\t}\n\n .ui-slider-handle--correct,\n\t\t.ui-slider-handle--incorrect {\n width: 1.1rem;\n\t\t\theight: 1.1rem;\n top: -.4rem;\n margin-left: -.55rem;\n }\n\n .ui-slider-handle--incorrect {\n z-index: 1;\n\t\t\tborder: 2px solid $red;\n\t\t}\n\n .ui-slider-handle--correct {\n border: 2px solid $green;\n z-index: 99999;\n }\n\n\t\t.ui-slider-range {\n\t\t\tposition: absolute;\n\t\t\tz-index: 1;\n\t\t\tfont-size: .7rem;\n\t\t\tdisplay: block;\n\t\t\tborder: 0;\n\t\t\tbackground-position: 0 0;\n\t\t\ttop: 0;\n\t\t\theight: 100%;\n\t\t}\n\n .ui-slider-range-show-correct {\n background: $green;\n z-index: 9;\n }\n\n\t\t.ui-slider-range-min {\n\t\t\tleft: 0;\n\t\t\tbackground: $blue;\n\t\t}\n\n\t\t.ui-slider-range-max {\n\t\t\tright: 0;\n\t\t}\n\n\t\t/* support: IE8 - See #6727 */\n\t\t&.ui-state-disabled .ui-slider-handle,\n\t\t&.ui-state-disabled .ui-slider-range {\n\t\t\tfilter: inherit;\n\t\t}\n\t}\n\n\t.ui-slider-horizontal {\n\t\theight: .3rem;\n\t}\n\n\t.enp-question__answered {\n\t\t.enp-slider {\n\t\t\tbackground: #bbb;\n\t\t}\n\n\t\t.ui-slider-range-min {\n\t\t\tbackground: #fff;\n\t\t}\n\n\t}\n\n}\n"]} \ No newline at end of file diff --git a/public/quiz-take/css/sass/_quiz.scss b/public/quiz-take/css/sass/_quiz.scss index c64b2204..3b0a760d 100644 --- a/public/quiz-take/css/sass/_quiz.scss +++ b/public/quiz-take/css/sass/_quiz.scss @@ -388,7 +388,7 @@ font-weight: 400; position: absolute; top: 50%; - left: 50%; + left: 47%; transform: translate(-50%, -50%); margin: 0; } diff --git a/public/quiz-take/css/sass/_slider.scss b/public/quiz-take/css/sass/_slider.scss index d80196a5..70230d5f 100644 --- a/public/quiz-take/css/sass/_slider.scss +++ b/public/quiz-take/css/sass/_slider.scss @@ -291,7 +291,7 @@ .ui-slider-range-min { left: 0; - background: $green; + background: $blue; } .ui-slider-range-max { diff --git a/vendor/composer/installed.json b/vendor/composer/installed.json index 233e6aa8..505df387 100644 --- a/vendor/composer/installed.json +++ b/vendor/composer/installed.json @@ -58,6 +58,68 @@ "wiki": "https://github.com/squizlabs/PHP_CodeSniffer/wiki" }, "install-path": "../squizlabs/php_codesniffer" + }, + { + "name": "tinymce/tinymce", + "version": "6.0.2", + "version_normalized": "6.0.2.0", + "source": { + "type": "git", + "url": "https://github.com/tinymce/tinymce-dist.git", + "reference": "6eb0c53e09bd552740dee0ede369f6b97d6983d5" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/tinymce/tinymce-dist/zipball/6eb0c53e09bd552740dee0ede369f6b97d6983d5", + "reference": "6eb0c53e09bd552740dee0ede369f6b97d6983d5", + "shasum": "" + }, + "time": "2022-04-27T03:41:08+00:00", + "type": "component", + "extra": { + "component": { + "scripts": [ + "tinymce.js", + "plugins/*/plugin.js", + "themes/*/theme.js", + "models/*/model.js", + "icons/*/icons.js" + ], + "files": [ + "tinymce.min.js", + "plugins/*/plugin.min.js", + "themes/*/theme.min.js", + "models/*/model.min.js", + "skins/**", + "icons/*/icons.min.js" + ] + } + }, + "installation-source": "dist", + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT-only" + ], + "description": "Web based JavaScript HTML WYSIWYG editor control.", + "homepage": "https://www.tiny.cloud/", + "keywords": [ + "contenteditable", + "editing", + "html", + "javascript", + "rich editor", + "rich text", + "rich text editor", + "richtext", + "rte", + "text", + "tinymce", + "wysiwyg" + ], + "support": { + "source": "https://github.com/tinymce/tinymce-dist/tree/6.0.2" + }, + "install-path": "../tinymce/tinymce" } ], "dev": true, diff --git a/vendor/composer/installed.php b/vendor/composer/installed.php index 97d488e4..479650c2 100644 --- a/vendor/composer/installed.php +++ b/vendor/composer/installed.php @@ -5,7 +5,7 @@ 'type' => 'library', 'install_path' => __DIR__ . '/../../', 'aliases' => array(), - 'reference' => '880c3376674ee9f0405cee18123ad22735ee7fde', + 'reference' => '5bd22a41f85d90686768c0974642b4ecd693c9d6', 'name' => '__root__', 'dev' => true, ), @@ -16,7 +16,7 @@ 'type' => 'library', 'install_path' => __DIR__ . '/../../', 'aliases' => array(), - 'reference' => '880c3376674ee9f0405cee18123ad22735ee7fde', + 'reference' => '5bd22a41f85d90686768c0974642b4ecd693c9d6', 'dev_requirement' => false, ), 'squizlabs/php_codesniffer' => array( @@ -28,5 +28,14 @@ 'reference' => '5e4e71592f69da17871dba6e80dd51bce74a351a', 'dev_requirement' => true, ), + 'tinymce/tinymce' => array( + 'pretty_version' => '6.0.2', + 'version' => '6.0.2.0', + 'type' => 'component', + 'install_path' => __DIR__ . '/../tinymce/tinymce', + 'aliases' => array(), + 'reference' => '6eb0c53e09bd552740dee0ede369f6b97d6983d5', + 'dev_requirement' => false, + ), ), ); diff --git a/vendor/tinymce/tinymce/.npmignore b/vendor/tinymce/tinymce/.npmignore new file mode 100644 index 00000000..45187ad4 --- /dev/null +++ b/vendor/tinymce/tinymce/.npmignore @@ -0,0 +1,2 @@ +composer.json +bower.json diff --git a/vendor/tinymce/tinymce/CHANGELOG.md b/vendor/tinymce/tinymce/CHANGELOG.md new file mode 100644 index 00000000..715530ba --- /dev/null +++ b/vendor/tinymce/tinymce/CHANGELOG.md @@ -0,0 +1,2868 @@ +# Changelog +All notable changes to this project will be documented in this file. + +The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), +and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). + +## Unreleased + +## 6.0.2 - 2022-04-27 + +### Fixed +- Some media elements wouldn't update when changing the source URL #TINY-8660 +- Inline toolbars flickered when switching between editors #TINY-8594 +- Multiple inline toolbars were shown if focused too quickly #TINY-8503 +- Added background and additional spacing for the text labeled buttons in the toolbar to improve visual clarity #TINY-8617 +- Toolbar split buttons with text used an incorrect width on touch devices #TINY-8647 + +## 6.0.1 - 2022-03-23 + +### Fixed +- Fixed the dev ZIP missing the required `bin` scripts to build from the source #TINY-8542 +- Fixed a regression whereby text patterns couldn't be updated at runtime #TINY-8540 +- Fixed an issue where tables with colgroups could be copied incorrectly in some cases #TINY-8568 +- Naked buttons better adapt to various background colors, improved text contrast in notifications #TINY-8533 +- The autocompleter would not fire the `AutocompleterStart` event nor close the menu in some cases #TINY-8552 +- It wasn't possible to select text right after an inline noneditable element #TINY-8567 +- Fixed a double border showing for the `tinymce-5` skin when using `toolbar_location: 'bottom'` #TINY-8564 +- Clipboard content was not generated correctly when cutting and copying `contenteditable="false"` elements #TINY-8563 +- Fixed the box-shadow getting clipped in autocompletor popups #TINY-8573 +- The `buttonType` property did not work for dialog footer buttons #TINY-8582 +- Fix contrast ratio for error messages #TINY-8586 + +## 6.0.0 - 2022-03-03 + +### Added +- New `editor.options` API to replace the old `editor.settings` and `editor.getParam` APIs #TINY-8206 +- New `editor.annotator.removeAll` API to remove all annotations by name #TINY-8195 +- New `Resource.unload` API to make it possible to unload resources #TINY-8431 +- New `FakeClipboard` API on the `tinymce` global #TINY-8353 +- New `dispatch()` function to replace the now deprecated `fire()` function in various APIs #TINY-8102 +- New `AutocompleterStart`, `AutocompleterUpdate` and `AutocompleterEnd` events #TINY-8279 +- New `mceAutocompleterClose`, `mceAutocompleterReload` commands #TINY-8279 +- New `mceInsertTableDialog` command to open the insert table dialog #TINY-8273 +- New `slider` dialog component #TINY-8304 +- New `imagepreview` dialog component, allowing preview and zoom of any image URL #TINY-8333 +- New `buttonType` property on dialog button components, supporting `toolbar` style in addition to `primary` and `secondary` #TINY-8304 +- The `tabindex` attribute is now copied from the target element to the iframe #TINY-8315 + +### Improved +- New default theme styling for TinyMCE 6 facelift with old skin available as `tinymce-5` and `tinymce-5-dark` #TINY-8373 +- The default height of editor has been increased from `200px` to `400px` to improve the usability of the editor #TINY-6860 +- The upload results returned from the `editor.uploadImages()` API now includes a `removed` flag, reflecting if the image was removed after a failed upload #TINY-7735 +- The `ScriptLoader`, `StyleSheetLoader`, `AddOnManager`, `PluginManager` and `ThemeManager` APIs will now return a `Promise` when loading resources instead of using callbacks #TINY-8325 +- A `ThemeLoadError` event is now fired if the theme fails to load #TINY-8325 +- The `BeforeSetContent` event will now include the actual serialized content when passing in an `AstNode` to the `editor.setContent` API #TINY-7996 +- Improved support for placing the caret before or after noneditable elements within the editor #TINY-8169 +- Calls to `editor.selection.setRng` now update the caret position bookmark used when focus is returned to the editor #TINY-8450 +- The `emoticon` plugin dialog, toolbar and menu item has been updated to use the more accurate `Emojis` term #TINY-7631 +- The dialog `redial` API will now only rerender the changed components instead of the whole dialog #TINY-8334 +- The dialog API `setData` method now uses a deep merge algorithm to support partial nested objects #TINY-8333 +- The dialog spec `initialData` type is now `Partial` to match the underlying implementation details #TINY-8334 +- Notifications no longer require a timeout to disable the close button #TINY-6679 +- The editor theme is now fetched in parallel with the icons, language pack and plugins #TINY-8453 + +### Changed +- TinyMCE is now MIT licensed #TINY-2316 +- Moved the `paste` plugin's functionality to TinyMCE core #TINY-8310 +- The `paste_data_images` option now defaults to `true` #TINY-8310 +- Moved the `noneditable` plugin to TinyMCE core #TINY-8311 +- Renamed the `noneditable_noneditable_class` option to `noneditable_class` #TINY-8311 +- Renamed the `noneditable_editable_class` option to `editable_class` #TINY-8311 +- Moved the `textpattern` plugin to TinyMCE core #TINY-8312 +- Renamed the `textpattern_patterns` option to `text_patterns` #TINY-8312 +- Moved the `hr` plugin's functionality to TinyMCE core #TINY-8313 +- Moved the `print` plugin's functionality to TinyMCE core #TINY-8314 +- Moved non-UI table functionality to core #TINY-8273 +- The `DomParser` API no longer uses a custom parser internally and instead uses the native `DOMParser` API #TINY-4627 +- The `editor.getContent()` API can provide custom content by preventing and overriding `content` in the `BeforeGetContent` event. This makes it consistent with the `editor.selection.getContent()` API #TINY-8018 +- The `editor.setContent()` API can now be prevented using the `BeforeSetContent` event. This makes it consistent with the `editor.selection.setContent()` API #TINY-8018 +- Add-ons such as plugins and themes are no longer constructed using the `new` operator #TINY-8256 +- A number of APIs that were not proper classes, are no longer constructed using the `new` operator #TINY-8322 +- The Editor commands APIs will no longer fallback to executing the browsers native command functionality #TINY-7829 +- The Editor query command APIs will now return `false` or an empty string on removed editors #TINY-7829 +- The `mceAddEditor` and `mceToggleEditor` commands now take an object as their value to specify the id and editor options #TINY-8138 +- The `mceInsertTable` command can no longer open the insert table dialog. Use the `mceInsertTableDialog` command instead #TINY-8273 +- The `plugins` option now returns a `string` array instead of a space separated string #TINY-8455 +- The `media` plugin no longer treats `iframe`, `video`, `audio` or `object` elements as "special" and will validate the contents against the schema #TINY-8382 +- The `images_upload_handler` option is no longer passed a `success` or `failure` callback and instead requires a `Promise` to be returned with the upload result #TINY-8325 +- The `tinymce.settings` global property is no longer set upon initialization #TINY-7359 +- The `change` event is no longer fired on first modification #TINY-6920 +- The `GetContent` event will now always pass a `string` for the `content` property #TINY-7996 +- Changed the default tag for the strikethrough format to the `s` tag when using a html 5 schema #TINY-8262 +- The `strike` tag is automatically converted to the `s` tag when using a html 5 schema #TINY-8262 +- Aligning a table to the left or right will now use margin styling instead of float styling #TINY-6558 +- The `:` control character has been changed to `~` for the schema `valid_elements` and `extended_valid_elements` options #TINY-6726 +- The `primary` property on dialog buttons has been deprecated. Use the new `buttonType` property instead #TINY-8304 +- Changed the default statusbar element path delimiter from `»` to `›` #TINY-8372 +- Replaced the `Powered by Tiny` branding text with the Tiny logo #TINY-8371 +- The default minimum height of editor has been changed to 100px to prevent the UI disappearing while resizing #TINY-6860 +- RGB colors are no longer converted to hex values when parsing or serializing content #TINY-8163 +- Replaced the `isDisabled()` function with an `isEnabled()` function for various APIs #TINY-8101 +- Replaced the `enable()` and `disable()` functions with a `setEnabled(state)` function in various APIs #TINY-8101 +- Replaced the `disabled` property with an `enabled` property in various APIs #TINY-8101 +- Replaced the `disable(name)` and `enable(name)` functions with a `setEnabled(name, state)` function in the Dialog APIs #TINY-8101 +- Renamed the `tinymce.Env.os.isOSX` API to `tinymce.Env.os.isMacOS` #TINY-8175 +- Renamed the `tinymce.Env.browser.isChrome` API to `tinymce.Env.browser.isChromium` to better reflect its functionality #TINY-8300 +- Renamed the `getShortEndedElements` Schema API to `getVoidElements` #TINY-8344 +- Renamed the `font_formats` option to `font_family_formats` #TINY-8328 +- Renamed the `fontselect` toolbar button and `fontformats` menu item to `fontfamily` #TINY-8328 +- Renamed the `fontsize_formats` option to `font_size_formats` #TINY-8328 +- Renamed the `fontsizeselect` toolbar button and `fontsizes` menu item to `fontsize` #TINY-8328 +- Renamed the `formatselect` toolbar button and `blockformats` menu item to `blocks` #TINY-8328 +- Renamed the `styleselect` toolbar button and `formats` menu item to `styles` #TINY-8328 +- Renamed the `lineheight_formats` option to `line_height_formats` #TINY-8328 +- Renamed the `getWhiteSpaceElements()` function to `getWhitespaceElements()` in the `Schema` API #TINY-8102 +- Renamed the `mceInsertClipboardContent` command `content` property to `html` to better reflect what data is passed #TINY-8310 +- Renamed the `default_link_target` option to `link_default_target` for both `link` and `autolink` plugins #TINY-4603 +- Renamed the `rel_list` option to `link_rel_list` for the `link` plugin #TINY-4603 +- Renamed the `target_list` option to `link_target_list` for the `link` plugin #TINY-4603 +- The default value for the `link_default_protocol` option has been changed to `https` instead of `http` #TINY-7824 +- The default value for the `element_format` option has been changed to `html` #TINY-8263 +- The default value for the `schema` option has been changed to `html5` #TINY-8261 +- The default value for the `table_style_by_css` option has been changed to `true` #TINY-8259 +- The default value for the `table_use_colgroups` option has been changed to `true` #TINY-8259 + +### Fixed +- The object returned from the `editor.fire()` API was incorrect if the editor had been removed #TINY-8018 +- The `editor.selection.getContent()` API did not respect the `no_events` argument #TINY-8018 +- The `editor.annotator.remove` API did not keep selection when removing the annotation #TINY-8195 +- The `GetContent` event was not fired when getting `tree` or `text` formats using the `editor.selection.getContent()` API #TINY-8018 +- The `beforeinput` and `input` events would sometimes not fire as expected when deleting content #TINY-8168 #TINY-8329 +- The `table` plugin would sometimes not correctly handle headers in the `tfoot` section #TINY-8104 +- The `silver` theme UI was incorrectly rendered before plugins had initialized #TINY-8288 +- The aria labels for the color picker dialog were not translated #TINY-8381 +- Fixed sub-menu items not read by screen readers. Patch contributed by westonkd #TINY-8417 +- Dialog labels and other text-based UI properties did not escape HTML markup #TINY-7524 +- Anchor elements would render incorrectly when using the `allow_html_in_named_anchor` option #TINY-3799 +- The `AstNode` HTML serializer did not serialize `pre` or `textarea` elements correctly when they contained newlines #TINY-8446 +- Fixed sub-menu items not read by screen readers. Patch contributed by westonkd #TINY-8417 +- The Home or End keys would move out of a editable element contained within a noneditable element #TINY-8201 +- Dialogs could not be opened in inline mode before the editor had been rendered #TINY-8397 +- Clicking on menu items could cause an unexpected console warning if the `onAction` function caused the menu to close #TINY-8513 +- Fixed various color and contrast issues for the dark skins #TINY-8527 + +### Removed +- Removed support for Microsoft Internet Explorer 11 #TINY-8194 #TINY-8241 +- Removed support for Microsoft Word from the opensource paste functionality #TINY-7493 +- Removed support for the `plugins` option allowing a mixture of a string array and of space separated strings #TINY-8399 +- Removed support for the deprecated `false` value for the `forced_root_block` option #TINY-8260 +- Removed the jQuery integration #TINY-4519 +- Removed the `imagetools` plugin, which is now classified as a Premium plugin #TINY-8209 +- Removed the `imagetools` dialog component #TINY-8333 +- Removed the `toc` plugin, which is now classified as a Premium plugin #TINY-8250 +- Removed the `tabfocus` plugin #TINY-8315 +- Removed the `textpattern` plugin's API as part of moving it to core #TINY-8312 +- Removed the `table` plugin's API #TINY-8273 +- Removed the callback for the `EditorUpload` API #TINY-8325 +- Removed the legacy browser detection properties from the `Env` API #TINY-8162 +- Removed the `filterNode` method from the `DomParser` API #TINY-8249 +- Removed the `SaxParser` API #TINY-8218 +- Removed the `tinymce.utils.Promise` API #TINY-8241 +- Removed the `toHex` function for the `DOMUtils` and `Styles` APIs #TINY-8163 +- Removed the `execCommand` handler function from the plugin and theme interfaces #TINY-7829 +- Removed the `editor.settings` property as it has been replaced by the new Options API #TINY-8236 +- Removed the `shortEnded` and `fixed` properties on `tinymce.html.Node` class #TINY-8205 +- Removed the `mceInsertRawHTML` command #TINY-8214 +- Removed the style field from the `image` plugin dialog advanced tab #TINY-3422 +- Removed the `paste_filter_drop` option as native drag and drop handling is no longer supported #TINY-8511 +- Removed the legacy `mobile` theme #TINY-7832 +- Removed the deprecated `$`, `Class`, `DomQuery` and `Sizzle` APIs #TINY-4520 #TINY-8326 +- Removed the deprecated `Color`, `JSON`, `JSONP` and `JSONRequest` #TINY-8162 +- Removed the deprecated `XHR` API #TINY-8164 +- Removed the deprecated `setIconStroke` Split Toolbar Button API #TINY-8162 +- Removed the deprecated `editors` property from `EditorManager` #TINY-8162 +- Removed the deprecated `execCallback` and `setMode` APIs from `Editor` #TINY-8162 +- Removed the deprecated `addComponents` and `dependencies` APIs from `AddOnManager` #TINY-8162 +- Removed the deprecated `clearInterval`, `clearTimeout`, `debounce`, `requestAnimationFrame`, `setInterval`, `setTimeout` and `throttle` APIs from `Delay` #TINY-8162 +- Removed the deprecated `Schema` options #TINY-7821 +- Removed the deprecated `file_browser_callback_types`, `force_hex_style_colors` and `images_dataimg_filter` options #TINY-7823 +- Removed the deprecated `filepicker_validator_handler`, `force_p_newlines`, `gecko_spellcheck`, `tab_focus`, `table_responsive_width` and `toolbar_drawer` options #TINY-7820 +- Removed the deprecated `media_scripts` option in the `media` plugin #TINY-8421 +- Removed the deprecated `editor_deselector`, `editor_selector`, `elements`, `mode` and `types` legacy TinyMCE init options #TINY-7822 +- Removed the deprecated `content_editable_state` and `padd_empty_with_br` options #TINY-8400 +- Removed the deprecated `autoresize_on_init` option from the `autoresize` plugin #TINY-8400 +- Removed the deprecated `fullpage`, `spellchecker`, `bbcode`, `legacyoutput`, `colorpicker`, `contextmenu` and `textcolor` plugins #TINY-8192 +- Removed the undocumented `editor.editorCommands.hasCustomCommand` API #TINY-7829 +- Removed the undocumented `mceResetDesignMode`, `mceRepaint` and `mceBeginUndoLevel` commands #TINY-7829 + +### Deprecated +- The dialog button component's `primary` property has been deprecated and will be removed in the next major release. Use the new `buttonType` property instead #TINY-8304 +- The `fire()` function of `tinymce.Editor`, `tinymce.dom.EventUtils`, `tinymce.dom.DOMUtils`, `tinymce.util.Observable` and `tinymce.util.EventDispatcher` has been deprecated and will be removed in the next major release. Use the `dispatch()` function instead #TINY-8102 +- The `content` property on the `SetContent` event has been deprecated and will be removed in the next major release #TINY-8457 +- The return value of the `editor.setContent` API has been deprecated and will be removed in the next major release #TINY-8457 + +## 5.10.3 - 2022-02-09 + +### Fixed +- Alignment would sometimes be removed on parent elements when changing alignment on certain inline nodes, such as images #TINY-8308 +- The `fullscreen` plugin would reset the scroll position when exiting fullscreen mode #TINY-8418 + +## 5.10.2 - 2021-11-17 + +### Fixed +- Internal selectors were appearing in the style list when using the `importcss` plugin #TINY-8238 + +## 5.10.1 - 2021-11-03 + +### Fixed +- The iframe aria help text was not read by some screen readers #TINY-8171 +- Clicking the `forecolor` or `backcolor` toolbar buttons would do nothing until selecting a color #TINY-7836 +- Crop functionality did not work in the `imagetools` plugin when the editor was rendered in a shadow root #TINY-6387 +- Fixed an exception thrown on Safari when closing the `searchreplace` plugin dialog #TINY-8166 +- The `autolink` plugin did not convert URLs to links when starting with a bracket #TINY-8091 +- The `autolink` plugin incorrectly created nested links in some cases #TINY-8091 +- Tables could have an incorrect height set on rows when rendered outside of the editor #TINY-7699 +- In certain circumstances, the table of contents plugin would incorrectly add an extra empty list item #TINY-4636 +- The insert table grid menu displayed an incorrect size when re-opening the grid #TINY-6532 +- The word count plugin was treating the zero width space character (`​`) as a word #TINY-7484 + +## 5.10.0 - 2021-10-11 + +### Added +- Added a new `URI.isDomSafe(uri)` API to check if a URI is considered safe to be inserted into the DOM #TINY-7998 +- Added the `ESC` key code constant to the `VK` API #TINY-7917 +- Added a new `deprecation_warnings` setting for turning off deprecation console warning messages #TINY-8049 + +### Improved +- The `element` argument of the `editor.selection.scrollIntoView()` API is now optional, and if it is not provided the current selection will be scrolled into view #TINY-7291 + +### Changed +- The deprecated `scope` attribute is no longer added to `td` cells when converting a row to a header row #TINY-7731 +- The number of `col` elements is normalized to match the number of columns in a table after a table action #TINY-8011 + +### Fixed +- Fixed a regression that caused block wrapper formats to apply and remove incorrectly when using a collapsed selection with multiple words #TINY-8036 +- Resizing table columns in some scenarios would resize the column to an incorrect position #TINY-7731 +- Inserting a table where the parent element had padding would cause the table width to be incorrect #TINY-7991 +- The resize backdrop element did not have the `data-mce-bogus="all"` attribute set to prevent it being included in output #TINY-7854 +- Resize handles appeared on top of dialogs and menus when using an inline editor #TINY-3263 +- Fixed the `autoresize` plugin incorrectly scrolling to the top of the editor content in some cases when changing content #TINY-7291 +- Fixed the `editor.selection.scrollIntoView()` type signature, as it incorrectly required an `Element` instead of `HTMLElement` #TINY-7291 +- Table cells that were both row and column headers did not retain the correct state when converting back to a regular row or column #TINY-7709 +- Clicking beside a non-editable element could cause the editor to incorrectly scroll to the top of the content #TINY-7062 +- Clicking in a table cell, with a non-editable element in an adjacent cell, incorrectly caused the non-editable element to be selected #TINY-7736 +- Split toolbar buttons incorrectly had nested `tabindex="-1"` attributes #TINY-7879 +- Fixed notifications rendering in the wrong place initially and when the page was scrolled #TINY-7894 +- Fixed an exception getting thrown when the number of `col` elements didn't match the number of columns in a table #TINY-7041 #TINY-8011 +- The table selection state could become incorrect after selecting a noneditable table cell #TINY-8053 +- As of Mozilla Firefox 91, toggling fullscreen mode with `toolbar_sticky` enabled would cause the toolbar to disappear #TINY-7873 +- Fixed URLs not cleaned correctly in some cases in the `link` and `image` plugins #TINY-7998 +- Fixed the `image` and `media` toolbar buttons incorrectly appearing to be in an inactive state in some cases #TINY-3463 +- Fixed the `editor.selection.selectorChanged` API not firing if the selector matched the current selection when registered in some cases #TINY-3463 +- Inserting content into a `contenteditable="true"` element that was contained within a `contenteditable="false"` element would move the selection to an incorrect location #TINY-7842 +- Dragging and dropping `contenteditable="false"` elements could result in the element being placed in an unexpected location #TINY-7917 +- Pressing the Escape key would not cancel a drag action that started on a `contenteditable="false"` element within the editor #TINY-7917 +- `video` and `audio` elements were unable to be played when the `media` plugin live embeds were enabled in some cases #TINY-7674 +- Pasting images would throw an exception if the clipboard `items` were not files (for example, screenshots taken from gnome-software). Patch contributed by cedric-anne #TINY-8079 + +### Deprecated +- Several APIs have been deprecated. See the release notes section for information #TINY-8023 #TINY-8063 +- Several Editor settings have been deprecated. See the release notes section for information #TINY-8086 +- The Table of Contents and Image Tools plugins will be classified as Premium plugins in the next major release #TINY-8087 +- Word support in the `paste` plugin has been deprecated and will be removed in the next major release #TINY-8087 + +## 5.9.2 - 2021-09-08 + +### Fixed +- Fixed an exception getting thrown when disabling events and setting content #TINY-7956 +- Delete operations could behave incorrectly if the selection crossed a table boundary #TINY-7596 + +## 5.9.1 - 2021-08-27 + +### Fixed +- Published TinyMCE types failed to compile in strict mode #TINY-7915 +- The `TableModified` event sometimes didn't fire when performing certain table actions #TINY-7916 + +## 5.9.0 - 2021-08-26 + +### Added +- Added a new `mceFocus` command that focuses the editor. Equivalent to using `editor.focus()` #TINY-7373 +- Added a new `mceTableToggleClass` command which toggles the provided class on the currently selected table #TINY-7476 +- Added a new `mceTableCellToggleClass` command which toggles the provided class on the currently selected table cells #TINY-7476 +- Added a new `tablecellvalign` toolbar button and menu item for vertical table cell alignment #TINY-7477 +- Added a new `tablecellborderwidth` toolbar button and menu item to change table cell border width #TINY-7478 +- Added a new `tablecellborderstyle` toolbar button and menu item to change table cell border style #TINY-7478 +- Added a new `tablecaption` toolbar button and menu item to toggle captions on tables #TINY-7479 +- Added a new `mceTableToggleCaption` command that toggles captions on a selected table #TINY-7479 +- Added a new `tablerowheader` toolbar button and menu item to toggle the header state of row cells #TINY-7478 +- Added a new `tablecolheader` toolbar button and menu item to toggle the header state of column cells #TINY-7482 +- Added a new `tablecellbordercolor` toolbar button and menu item to select table cell border colors, with an accompanying setting `table_border_color_map` to customize the available values #TINY-7480 +- Added a new `tablecellbackgroundcolor` toolbar button and menu item to select table cell background colors, with an accompanying setting `table_background_color_map` to customize the available values #TINY-7480 +- Added a new `language` menu item and toolbar button to add `lang` attributes to content, with an accompanying `content_langs` setting to specify the languages available #TINY-6149 +- A new `lang` format is now available that can be used with `editor.formatter`, or applied with the `Lang` editor command #TINY-6149 +- Added a new `language` icon for the `language` toolbar button #TINY-7670 +- Added a new `table-row-numbering` icon #TINY-7327 +- Added new plugin commands: `mceEmoticons` (Emoticons), `mceWordCount` (Word Count), and `mceTemplate` (Template) #TINY-7619 +- Added a new `iframe_aria_text` setting to set the iframe title attribute #TINY-1264 +- Added a new DomParser `Node.children()` API to return all the children of a `Node` #TINY-7756 + +### Improved +- Sticky toolbars can now be offset from the top of the page using the new `toolbar_sticky_offset` setting #TINY-7337 +- Fancy menu items now accept an `initData` property to allow custom initialization data #TINY-7480 +- Improved the load time of the `fullpage` plugin by using the existing editor schema rather than creating a new one #TINY-6504 +- Improved the performance when UI components are rendered #TINY-7572 +- The context toolbar no longer unnecessarily repositions to the top of large elements when scrolling #TINY-7545 +- The context toolbar will now move out of the way when it overlaps with the selection, such as in table cells #TINY-7192 +- The context toolbar now uses a short animation when transitioning between different locations #TINY-7740 +- `Env.browser` now uses the User-Agent Client Hints API where it is available #TINY-7785 +- Icons with a `-rtl` suffix in their name will now automatically be used when the UI is rendered in right-to-left mode #TINY-7782 +- The `formatter.match` API now accepts an optional `similar` parameter to check if the format partially matches #TINY-7712 +- The `formatter.formatChanged` API now supports providing format variables when listening for changes #TINY-7713 +- The formatter will now fire `FormatApply` and `FormatRemove` events for the relevant actions #TINY-7713 +- The `autolink` plugin link detection now permits custom protocols #TINY-7714 +- The `autolink` plugin valid link detection has been improved #TINY-7714 + +### Changed +- Changed the load order so content CSS is loaded before the editor is populated with content #TINY-7249 +- Changed the `emoticons`, `wordcount`, `code`, `codesample`, and `template` plugins to open dialogs using commands #TINY-7619 +- The context toolbar will no longer show an arrow when it overlaps the content, such as in table cells #TINY-7665 +- The context toolbar will no longer overlap the statusbar for toolbars using `node` or `selection` positions #TINY-7666 + +### Fixed +- The `editor.fire` API was incorrectly mutating the original `args` provided #TINY-3254 +- Unbinding an event handler did not take effect immediately while the event was firing #TINY-7436 +- Binding an event handler incorrectly took effect immediately while the event was firing #TINY-7436 +- Unbinding a native event handler inside the `remove` event caused an exception that blocked editor removal #TINY-7730 +- The `SetContent` event contained the incorrect `content` when using the `editor.selection.setContent()` API #TINY-3254 +- The editor content could be edited after calling `setProgressState(true)` in iframe mode #TINY-7373 +- Tabbing out of the editor after calling `setProgressState(true)` behaved inconsistently in iframe mode #TINY-7373 +- Flash of unstyled content while loading the editor because the content CSS was loaded after the editor content was rendered #TINY-7249 +- Partially transparent RGBA values provided in the `color_map` setting were given the wrong hex value #TINY-7163 +- HTML comments with mismatched quotes were parsed incorrectly under certain circumstances #TINY-7589 +- The editor could crash when inserting certain HTML content #TINY-7756 +- Inserting certain HTML content into the editor could result in invalid HTML once parsed #TINY-7756 +- Links in notification text did not show the correct mouse pointer #TINY-7661 +- Using the Tab key to navigate into the editor on Microsoft Internet Explorer 11 would incorrectly focus the toolbar #TINY-3707 +- The editor selection could be placed in an incorrect location when undoing or redoing changes in a document containing `contenteditable="false"` elements #TINY-7663 +- Menus and context menus were not closed when clicking into a different editor #TINY-7399 +- Context menus on Android were not displayed when more than one HTML element was selected #TINY-7688 +- Disabled nested menu items could still be opened #TINY-7700 +- The nested menu item chevron icon was not fading when the menu item was disabled #TINY-7700 +- `imagetools` buttons were incorrectly enabled for remote images without `imagetools_proxy` set #TINY-7772 +- Only table content would be deleted when partially selecting a table and content outside the table #TINY-6044 +- The table cell selection handling was incorrect in some cases when dealing with nested tables #TINY-6298 +- Removing a table row or column could result in the cursor getting placed in an invalid location #TINY-7695 +- Pressing the Tab key to navigate through table cells did not skip noneditable cells #TINY-7705 +- Clicking on a noneditable table cell did not show a visual selection like other noneditable elements #TINY-7724 +- Some table operations would incorrectly cause table row attributes and styles to be lost #TINY-6666 +- The selection was incorrectly lost when using the `mceTableCellType` and `mceTableRowType` commands #TINY-6666 +- The `mceTableRowType` was reversing the order of the rows when converting multiple header rows back to body rows #TINY-6666 +- The table dialog did not always respect the `table_style_with_css` option #TINY-4926 +- Pasting into a table with multiple cells selected could cause the content to be pasted in the wrong location #TINY-7485 +- The `TableModified` event was not fired when pasting cells into a table #TINY-6939 +- The table paste column before and after icons were not flipped in RTL mode #TINY-7851 +- Fixed table corruption when deleting a `contenteditable="false"` cell #TINY-7891 +- The `dir` attribute was being incorrectly applied to list items #TINY-4589 +- Applying selector formats would sometimes not apply the format correctly to elements in a list #TINY-7393 +- For formats that specify an attribute or style that should be removed, the formatter `match` API incorrectly returned `false` #TINY-6149 +- The type signature on the `formatter.matchNode` API had the wrong return type (was `boolean` but should have been `Formatter | undefined`) #TINY-6149 +- The `formatter.formatChanged` API would ignore the `similar` parameter if another callback had already been registered for the same format #TINY-7713 +- The `formatter.formatChanged` API would sometimes not run the callback the first time the format was removed #TINY-7713 +- Base64 encoded images with spaces or line breaks in the data URI were not displayed correctly. Patch contributed by RoboBurned + +### Deprecated +- The `bbcode`, `fullpage`, `legacyoutput`, and `spellchecker` plugins have been deprecated and marked for removal in the next major release #TINY-7260 + +## 5.8.2 - 2021-06-23 + +### Fixed +- Fixed an issue when pasting cells from tables containing `colgroup`s into tables without `colgroup`s #TINY-6675 +- Fixed an issue that could cause an invalid toolbar button state when multiple inline editors were on a single page #TINY-6297 + +## 5.8.1 - 2021-05-20 + +### Fixed +- An unexpected exception was thrown when switching to readonly mode and adjusting the editor width #TINY-6383 +- Content could be lost when the `pagebreak_split_block` setting was enabled #TINY-3388 +- The `list-style-type: none;` style on nested list items was incorrectly removed when clearing formatting #TINY-6264 +- URLs were not always detected when pasting over a selection. Patch contributed by jwcooper #TINY-6997 +- Properties on the `OpenNotification` event were incorrectly namespaced #TINY-7486 + +## 5.8.0 - 2021-05-06 + +### Added +- Added the `PAGE_UP` and `PAGE_DOWN` key code constants to the `VK` API #TINY-4612 +- The editor resize handle can now be controlled using the keyboard #TINY-4823 +- Added a new `fixed_toolbar_container_target` setting which renders the toolbar in the specified `HTMLElement`. Patch contributed by pvrobays + +### Improved +- The `inline_boundaries` feature now supports the `home`, `end`, `pageup`, and `pagedown` keys #TINY-4612 +- Updated the `formatter.matchFormat` API to support matching formats with variables in the `classes` property #TINY-7227 +- Added HTML5 `audio` and `video` elements to the default alignment formats #TINY-6633 +- Added support for alpha list numbering to the list properties dialog #TINY-6891 + +### Changed +- Updated the `image` dialog to display the class list dropdown as full-width if the caption checkbox is not present #TINY-6400 +- Renamed the "H Align" and "V Align" input labels in the Table Cell Properties dialog to "Horizontal align" and "Vertical align" respectively #TINY-7285 + +### Deprecated +- The undocumented `setIconStroke` Split Toolbar Button API has been deprecated and will be removed in a future release #TINY-3551 + +### Fixed +- Fixed a bug where it wasn't possible to align nested list items #TINY-6567 +- The RGB fields in the color picker dialog were not staying in sync with the color palette and hue slider #TINY-6952 +- The color preview box in the color picker dialog was not correctly displaying the saturation and value of the chosen color #TINY-6952 +- The color picker dialog will now show an alert if it is submitted with an invalid hex color code #TINY-2814 +- Fixed a bug where the `TableModified` event was not fired when adding a table row with the Tab key #TINY-7006 +- Added missing `images_file_types` setting to the exported TypeScript types #GH-6607 +- Fixed a bug where lists pasted from Word with Roman numeral markers were not displayed correctly. Patch contributed by aautio #GH-6620 +- The `editor.insertContent` API was incorrectly handling nested `span` elements with matching styles #TINY-6263 +- The HTML5 `small` element could not be removed when clearing text formatting #TINY-6633 +- The Oxide button text transform variable was incorrectly using `capitalize` instead of `none`. Patch contributed by dakur #GH-6341 +- Fix dialog button text that was using title-style capitalization #TINY-6816 +- Table plugin could perform operations on tables containing the inline editor #TINY-6625 +- Fixed Tab key navigation inside table cells with a ranged selection #TINY-6638 +- The foreground and background toolbar button color indicator is no longer blurry #TINY-3551 +- Fixed a regression in the `tinymce.create()` API that caused issues when multiple objects were created #TINY-7358 +- Fixed the `LineHeight` command causing the `change` event to be fired inconsistently #TINY-7048 + +## 5.7.1 - 2021-03-17 + +### Fixed +- Fixed the `help` dialog incorrectly linking to the changelog of TinyMCE 4 instead of TinyMCE 5 #TINY-7031 +- Fixed a bug where error messages were displayed incorrectly in the image dialog #TINY-7099 +- Fixed an issue where URLs were not correctly filtered in some cases #TINY-7025 +- Fixed a bug where context menu items with names that contained uppercase characters were not displayed #TINY-7072 +- Fixed context menu items lacking support for the `disabled` and `shortcut` properties #TINY-7073 +- Fixed a regression where the width and height were incorrectly set when embedding content using the `media` dialog #TINY-7074 + +## 5.7.0 - 2021-02-10 + +### Added +- Added IPv6 address support to the URI API. Patch contributed by dev7355608 #GH-4409 +- Added new `structure` and `style` properties to the `TableModified` event to indicate what kinds of modifications were made #TINY-6643 +- Added `video` and `audio` live embed support for the `media` plugin #TINY-6229 +- Added the ability to resize `video` and `iframe` media elements #TINY-6229 +- Added a new `font_css` setting for adding fonts to both the editor and the parent document #TINY-6199 +- Added a new `ImageUploader` API to simplify uploading image data to the configured `images_upload_url` or `images_upload_handler` #TINY-4601 +- Added an Oxide variable to define the container background color in fullscreen mode #TINY-6903 +- Added Oxide variables for setting the toolbar background colors for inline and sticky toolbars #TINY-6009 +- Added a new `AfterProgressState` event that is fired after `editor.setProgressState` calls complete #TINY-6686 +- Added support for `table_column_resizing` when inserting or deleting columns #TINY-6711 + +### Changed +- Changed table and table column copy behavior to retain an appropriate width when pasted #TINY-6664 +- Changed the `lists` plugin to apply list styles to all text blocks within a selection #TINY-3755 +- Changed the `advlist` plugin to log a console error message when the `list` plugin isn't enabled #TINY-6585 +- Changed the z-index of the `setProgressState(true)` throbber so it does not hide notifications #TINY-6686 +- Changed the type signature for `editor.selection.getRng()` incorrectly returning `null` #TINY-6843 +- Changed some `SaxParser` regular expressions to improve performance #TINY-6823 +- Changed `editor.setProgressState(true)` to close any open popups #TINY-6686 + +### Fixed +- Fixed `codesample` highlighting performance issues for some languages #TINY-6996 +- Fixed an issue where cell widths were lost when merging table cells #TINY-6901 +- Fixed `col` elements incorrectly transformed to `th` elements when converting columns to header columns #TINY-6715 +- Fixed a number of table operations not working when selecting 2 table cells on Mozilla Firefox #TINY-3897 +- Fixed a memory leak by backporting an upstream Sizzle fix #TINY-6859 +- Fixed table `width` style was removed when copying #TINY-6664 +- Fixed focus lost while typing in the `charmap` or `emoticons` dialogs when the editor is rendered in a shadow root #TINY-6904 +- Fixed corruption of base64 URLs used in style attributes when parsing HTML #TINY-6828 +- Fixed the order of CSS precedence of `content_style` and `content_css` in the `preview` and `template` plugins. `content_style` now has precedence #TINY-6529 +- Fixed an issue where the image dialog tried to calculate image dimensions for an empty image URL #TINY-6611 +- Fixed an issue where `scope` attributes on table cells would not change as expected when merging or unmerging cells #TINY-6486 +- Fixed the plugin documentation links in the `help` plugin #DOC-703 +- Fixed events bound using `DOMUtils` not returning the correct result for `isDefaultPrevented` in some cases #TINY-6834 +- Fixed the "Dropped file type is not supported" notification incorrectly showing when using an inline editor #TINY-6834 +- Fixed an issue with external styles bleeding into TinyMCE #TINY-6735 +- Fixed an issue where parsing malformed comments could cause an infinite loop #TINY-6864 +- Fixed incorrect return types on `editor.selection.moveToBookmark` #TINY-6504 +- Fixed the type signature for `editor.selection.setCursorLocation()` incorrectly allowing a node with no `offset` #TINY-6843 +- Fixed incorrect behavior when editor is destroyed while loading stylesheets #INT-2282 +- Fixed figure elements incorrectly splitting from a valid parent element when editing the image within #TINY-6592 +- Fixed inserting multiple rows or columns in a table cloning from the incorrect source row or column #TINY-6906 +- Fixed an issue where new lines were not scrolled into view when pressing Shift+Enter or Shift+Return #TINY-6964 +- Fixed an issue where list elements would not be removed when outdenting using the Enter or Return key #TINY-5974 +- Fixed an issue where file extensions with uppercase characters were treated as invalid #TINY-6940 +- Fixed dialog block messages were not passed through TinyMCE's translation system #TINY-6971 + +## 5.6.2 - 2020-12-08 + +### Fixed +- Fixed a UI rendering regression when the document body is using `display: flex` #TINY-6783 + +## 5.6.1 - 2020-11-25 + +### Fixed +- Fixed the `mceTableRowType` and `mceTableCellType` commands were not firing the `newCell` event #TINY-6692 +- Fixed the HTML5 `s` element was not recognized when editing or clearing text formatting #TINY-6681 +- Fixed an issue where copying and pasting table columns resulted in invalid HTML when using colgroups #TINY-6684 +- Fixed an issue where the toolbar would render with the wrong width for inline editors in some situations #TINY-6683 + +## 5.6.0 - 2020-11-18 + +### Added +- Added new `BeforeOpenNotification` and `OpenNotification` events which allow internal notifications to be captured and modified before display #TINY-6528 +- Added support for `block` and `unblock` methods on inline dialogs #TINY-6487 +- Added new `TableModified` event which is fired whenever changes are made to a table #TINY-6629 +- Added new `images_file_types` setting to determine which image file formats will be automatically processed into `img` tags on paste when using the `paste` plugin #TINY-6306 +- Added support for `images_file_types` setting in the image file uploader to determine which image file extensions are valid for upload #TINY-6224 +- Added new `format_empty_lines` setting to control if empty lines are formatted in a ranged selection #TINY-6483 +- Added template support to the `autocompleter` for customizing the autocompleter items #TINY-6505 +- Added new user interface `enable`, `disable`, and `isDisabled` methods #TINY-6397 +- Added new `closest` formatter API to get the closest matching selection format from a set of formats #TINY-6479 +- Added new `emojiimages` emoticons database that uses the twemoji CDN by default #TINY-6021 +- Added new `emoticons_database` setting to configure which emoji database to use #TINY-6021 +- Added new `name` field to the `style_formats` setting object to enable specifying a name for the format #TINY-4239 + +### Changed +- Changed `readonly` mode to allow hyperlinks to be clickable #TINY-6248 + +### Fixed +- Fixed the `change` event not firing after a successful image upload #TINY-6586 +- Fixed the type signature for the `entity_encoding` setting not accepting delimited lists #TINY-6648 +- Fixed layout issues when empty `tr` elements were incorrectly removed from tables #TINY-4679 +- Fixed image file extensions lost when uploading an image with an alternative extension, such as `.jfif` #TINY-6622 +- Fixed a security issue where URLs in attributes weren't correctly sanitized #TINY-6518 +- Fixed `DOMUtils.getParents` incorrectly including the shadow root in the array of elements returned #TINY-6540 +- Fixed an issue where the root document could be scrolled while an editor dialog was open inside a shadow root #TINY-6363 +- Fixed `getContent` with text format returning a new line when the editor is empty #TINY-6281 +- Fixed table column and row resizers not respecting the `data-mce-resize` attribute #TINY-6600 +- Fixed inserting a table via the `mceInsertTable` command incorrectly creating 2 undo levels #TINY-6656 +- Fixed nested tables with `colgroup` elements incorrectly always resizing the inner table #TINY-6623 +- Fixed the `visualchars` plugin causing the editor to steal focus when initialized #TINY-6282 +- Fixed `fullpage` plugin altering text content in `editor.getContent()` #TINY-6541 +- Fixed `fullscreen` plugin not working correctly with multiple editors and shadow DOM #TINY-6280 +- Fixed font size keywords such as `medium` not displaying correctly in font size menus #TINY-6291 +- Fixed an issue where some attributes in table cells were not copied over to new rows or columns #TINY-6485 +- Fixed incorrectly removing formatting on adjacent spaces when removing formatting on a ranged selection #TINY-6268 +- Fixed the `Cut` menu item not working in the latest version of Mozilla Firefox #TINY-6615 +- Fixed some incorrect types in the new TypeScript declaration file #TINY-6413 +- Fixed a regression where a fake offscreen selection element was incorrectly created for the editor root node #TINY-6555 +- Fixed an issue where menus would incorrectly collapse in small containers #TINY-3321 +- Fixed an issue where only one table column at a time could be converted to a header #TINY-6326 +- Fixed some minor memory leaks that prevented garbage collection for editor instances #TINY-6570 +- Fixed resizing a `responsive` table not working when using the column resize handles #TINY-6601 +- Fixed incorrectly calculating table `col` widths when resizing responsive tables #TINY-6646 +- Fixed an issue where spaces were not preserved in pre-blocks when getting text content #TINY-6448 +- Fixed a regression that caused the selection to be difficult to see in tables with backgrounds #TINY-6495 +- Fixed content pasted multiple times in the editor when using Microsoft Internet Explorer 11. Patch contributed by mattford #GH-4905 + +## 5.5.1 - 2020-10-01 + +### Fixed +- Fixed pressing the down key near the end of a document incorrectly raising an exception #TINY-6471 +- Fixed incorrect Typescript types for the `Tools` API #TINY-6475 + +## 5.5.0 - 2020-09-29 + +### Added +- Added a TypeScript declaration file to the bundle output for TinyMCE core #TINY-3785 +- Added new `table_column_resizing` setting to control how table columns are resized when using the resize bars #TINY-6001 +- Added the ability to remove images on a failed upload using the `images_upload_handler` failure callback #TINY-6011 +- Added `hasPlugin` function to the editor API to determine if a plugin exists or not #TINY-766 +- Added new `ToggleToolbarDrawer` command and query state handler to allow the toolbar drawer to be programmatically toggled and the toggle state to be checked #TINY-6032 +- Added the ability to use `colgroup` elements in tables #TINY-6050 +- Added a new setting `table_use_colgroups` for toggling whether colgroups are used in new tables #TINY-6050 +- Added the ability to delete and navigate HTML media elements without the `media` plugin #TINY-4211 +- Added `fullscreen_native` setting to the `fullscreen` plugin to enable use of the entire monitor #TINY-6284 +- Added table related oxide variables to the Style API for more granular control over table cell selection appearance #TINY-6311 +- Added new `toolbar_persist` setting to control the visibility of the inline toolbar #TINY-4847 +- Added new APIs to allow for programmatic control of the inline toolbar visibility #TINY-4847 +- Added the `origin` property to the `ObjectResized` and `ObjectResizeStart` events, to specify which handle the resize was performed on #TINY-6242 +- Added new StyleSheetLoader `unload` and `unloadAll` APIs to allow loaded stylesheets to be removed #TINY-3926 +- Added the `LineHeight` query command and action to the editor #TINY-4843 +- Added the `lineheight` toolbar and menu items, and added `lineheight` to the default format menu #TINY-4843 +- Added a new `contextmenu_avoid_overlap` setting to allow context menus to avoid overlapping matched nodes #TINY-6036 +- Added new listbox dialog UI component for rendering a dropdown that allows nested options #TINY-2236 +- Added back the ability to use nested items in the `image_class_list`, `link_class_list`, `link_list`, `table_class_list`, `table_cell_class_list`, and `table_row_class_list` settings #TINY-2236 + +### Changed +- Changed how CSS manipulates table cells when selecting multiple cells to achieve a semi-transparent selection #TINY-6311 +- Changed the `target` property on fired events to use the native event target. The original target for an open shadow root can be obtained using `event.getComposedPath()` #TINY-6128 +- Changed the editor to clean-up loaded CSS stylesheets when all editors using the stylesheet have been removed #TINY-3926 +- Changed `imagetools` context menu icon for accessing the `image` dialog to use the `image` icon #TINY-4141 +- Changed the `editor.insertContent()` and `editor.selection.setContent()` APIs to retain leading and trailing whitespace #TINY-5966 +- Changed the `table` plugin `Column` menu to include the cut, copy and paste column menu items #TINY-6374 +- Changed the default table styles in the content CSS files to better support the styling options available in the `table` dialog #TINY-6179 + +### Deprecated +- Deprecated the `Env.experimentalShadowDom` flag #TINY-6128 + +### Fixed +- Fixed tables with no borders displaying with the default border styles in the `preview` dialog #TINY-6179 +- Fixed loss of whitespace when inserting content after a non-breaking space #TINY-5966 +- Fixed the `event.getComposedPath()` function throwing an exception for events fired from the editor #TINY-6128 +- Fixed notifications not appearing when the editor is within a ShadowRoot #TINY-6354 +- Fixed focus issues with inline dialogs when the editor is within a ShadowRoot #TINY-6360 +- Fixed the `template` plugin previews missing some content styles #TINY-6115 +- Fixed the `media` plugin not saving the alternative source url in some situations #TINY-4113 +- Fixed an issue where column resizing using the resize bars was inconsistent between fixed and relative table widths #TINY-6001 +- Fixed an issue where dragging and dropping within a table would select table cells #TINY-5950 +- Fixed up and down keyboard navigation not working for inline `contenteditable="false"` elements #TINY-6226 +- Fixed dialog not retrieving `close` icon from icon pack #TINY-6445 +- Fixed the `unlink` toolbar button not working when selecting multiple links #TINY-4867 +- Fixed the `link` dialog not showing the "Text to display" field in some valid cases #TINY-5205 +- Fixed the `DOMUtils.split()` API incorrectly removing some content #TINY-6294 +- Fixed pressing the escape key not focusing the editor when using multiple toolbars #TINY-6230 +- Fixed the `dirty` flag not being correctly set during an `AddUndo` event #TINY-4707 +- Fixed `editor.selection.setCursorLocation` incorrectly placing the cursor outside `pre` elements in some circumstances #TINY-4058 +- Fixed an exception being thrown when pressing the enter key inside pre elements while `br_in_pre` setting is false #TINY-4058 + +## 5.4.2 - 2020-08-17 + +### Fixed +- Fixed the editor not resizing when resizing the browser window in fullscreen mode #TINY-3511 +- Fixed clicking on notifications causing inline editors to hide #TINY-6058 +- Fixed an issue where link URLs could not be deleted or edited in the link dialog in some cases #TINY-4706 +- Fixed a regression where setting the `anchor_top` or `anchor_bottom` options to `false` was not working #TINY-6256 +- Fixed the `anchor` plugin not supporting the `allow_html_in_named_anchor` option #TINY-6236 +- Fixed an exception thrown when removing inline formats that contained additional styles or classes #TINY-6288 +- Fixed an exception thrown when positioning the context toolbar on Internet Explorer 11 in some edge cases #TINY-6271 +- Fixed inline formats not removed when more than one `removeformat` format rule existed #TINY-6216 +- Fixed an issue where spaces were sometimes removed when removing formating on nearby text #TINY-6251 +- Fixed the list toolbar buttons not showing as active when a list is selected #TINY-6286 +- Fixed an issue where the UI would sometimes not be shown or hidden when calling the show or hide API methods on the editor #TINY-6048 +- Fixed the list type style not retained when copying list items #TINY-6289 +- Fixed the Paste plugin converting tabs in plain text to a single space character. A `paste_tab_spaces` option has been included for setting the number of spaces used to replace a tab character #TINY-6237 + +## 5.4.1 - 2020-07-08 + +### Fixed +- Fixed the Search and Replace plugin incorrectly including zero-width caret characters in search results #TINY-4599 +- Fixed dragging and dropping unsupported files navigating the browser away from the editor #TINY-6027 +- Fixed undo levels not created on browser handled drop or paste events #TINY-6027 +- Fixed content in an iframe element parsing as DOM elements instead of text content #TINY-5943 +- Fixed Oxide checklist styles not showing when printing #TINY-5139 +- Fixed bug with `scope` attribute not being added to the cells of header rows #TINY-6206 + +## 5.4.0 - 2020-06-30 + +### Added +- Added keyboard navigation support to menus and toolbars when the editor is in a ShadowRoot #TINY-6152 +- Added the ability for menus to be clicked when the editor is in an open shadow root #TINY-6091 +- Added the `Editor.ui.styleSheetLoader` API for loading stylesheets within the Document or ShadowRoot containing the editor UI #TINY-6089 +- Added the `StyleSheetLoader` module to the public API #TINY-6100 +- Added Oxide variables for styling the `select` element and headings in dialog content #TINY-6070 +- Added icons for `table` column and row cut, copy, and paste toolbar buttons #TINY-6062 +- Added all `table` menu items to the UI registry, so they can be used by name in other menus #TINY-4866 +- Added new `mceTableApplyCellStyle` command to the `table` plugin #TINY-6004 +- Added new `table` cut, copy, and paste column editor commands and menu items #TINY-6006 +- Added font related Oxide variables for secondary buttons, allowing for custom styling #TINY-6061 +- Added new `table_header_type` setting to control how table header rows are structured #TINY-6007 +- Added new `table_sizing_mode` setting to replace the `table_responsive_width` setting, which has now been deprecated #TINY-6051 +- Added new `mceTableSizingMode` command for changing the sizing mode of a table #TINY-6000 +- Added new `mceTableRowType`, `mceTableColType`, and `mceTableCellType` commands and value queries #TINY-6150 + +### Changed +- Changed `advlist` toolbar buttons to only show a dropdown list if there is more than one option #TINY-3194 +- Changed `mceInsertTable` command and `insertTable` API method to take optional header rows and columns arguments #TINY-6012 +- Changed stylesheet loading, so that UI skin stylesheets can load in a ShadowRoot if required #TINY-6089 +- Changed the DOM location of menus so that they display correctly when the editor is in a ShadowRoot #TINY-6093 +- Changed the table plugin to correctly detect all valid header row structures #TINY-6007 + +### Fixed +- Fixed tables with no defined width being converted to a `fixed` width table when modifying the table #TINY-6051 +- Fixed the `autosave` `isEmpty` API incorrectly detecting non-empty content as empty #TINY-5953 +- Fixed table `Paste row after` and `Paste row before` menu items not disabled when nothing was available to paste #TINY-6006 +- Fixed a selection performance issue with large tables on Microsoft Internet Explorer and Edge #TINY-6057 +- Fixed filters for screening commands from the undo stack to be case-insensitive #TINY-5946 +- Fixed `fullscreen` plugin now removes all classes when the editor is closed #TINY-4048 +- Fixed handling of mixed-case icon identifiers (names) for UI elements #TINY-3854 +- Fixed leading and trailing spaces lost when using `editor.selection.getContent({ format: 'text' })` #TINY-5986 +- Fixed an issue where changing the URL with the quicklink toolbar caused unexpected undo behavior #TINY-5952 +- Fixed an issue where removing formatting within a table cell would cause Internet Explorer 11 to scroll to the end of the table #TINY-6049 +- Fixed an issue where the `allow_html_data_urls` setting was not correctly applied #TINY-5951 +- Fixed the `autolink` feature so that it no longer treats a string with multiple "@" characters as an email address #TINY-4773 +- Fixed an issue where removing the editor would leave unexpected attributes on the target element #TINY-4001 +- Fixed the `link` plugin now suggest `mailto:` when the text contains an '@' and no slashes (`/`) #TINY-5941 +- Fixed the `valid_children` check of custom elements now allows a wider range of characters in names #TINY-5971 + +## 5.3.2 - 2020-06-10 + +### Fixed +- Fixed a regression introduced in 5.3.0, where `images_dataimg_filter` was no-longer called #TINY-6086 + +## 5.3.1 - 2020-05-27 + +### Fixed +- Fixed the image upload error alert also incorrectly closing the image dialog #TINY-6020 +- Fixed editor content scrolling incorrectly on focus in Firefox by reverting default content CSS html and body heights added in 5.3.0 #TINY-6019 + +## 5.3.0 - 2020-05-21 + +### Added +- Added html and body height styles to the default oxide content CSS #TINY-5978 +- Added `uploadUri` and `blobInfo` to the data returned by `editor.uploadImages()` #TINY-4579 +- Added a new function to the `BlobCache` API to lookup a blob based on the base64 data and mime type #TINY-5988 +- Added the ability to search and replace within a selection #TINY-4549 +- Added the ability to set the list start position for ordered lists and added new `lists` context menu item #TINY-3915 +- Added `icon` as an optional config option to the toggle menu item API #TINY-3345 +- Added `auto` mode for `toolbar_location` which positions the toolbar and menu bar at the bottom if there is no space at the top #TINY-3161 + +### Changed +- Changed the default `toolbar_location` to `auto` #TINY-3161 +- Changed toggle menu items and choice menu items to have a dedicated icon with the checkmark displayed on the far right side of the menu item #TINY-3345 +- Changed the `link`, `image`, and `paste` plugins to use Promises to reduce the bundle size #TINY-4710 +- Changed the default icons to be lazy loaded during initialization #TINY-4729 +- Changed the parsing of content so base64 encoded urls are converted to blob urls #TINY-4727 +- Changed context toolbars so they concatenate when more than one is suitable for the current selection #TINY-4495 +- Changed inline style element formats (strong, b, em, i, u, strike) to convert to a span on format removal if a `style` or `class` attribute is present #TINY-4741 + +### Fixed +- Fixed the `selection.setContent()` API not running parser filters #TINY-4002 +- Fixed formats incorrectly applied or removed when table cells were selected #TINY-4709 +- Fixed the `quickimage` button not restricting the file types to images #TINY-4715 +- Fixed search and replace ignoring text in nested contenteditable elements #TINY-5967 +- Fixed resize handlers displaying in the wrong location sometimes for remote images #TINY-4732 +- Fixed table picker breaking in Firefox on low zoom levels #TINY-4728 +- Fixed issue with loading or pasting contents with large base64 encoded images on Safari #TINY-4715 +- Fixed supplementary special characters being truncated when inserted into the editor. Patch contributed by mlitwin. #TINY-4791 +- Fixed toolbar buttons not set to disabled when the editor is in readonly mode #TINY-4592 +- Fixed the editor selection incorrectly changing when removing caret format containers #TINY-3438 +- Fixed bug where title, width, and height would be set to empty string values when updating an image and removing those attributes using the image dialog #TINY-4786 +- Fixed `ObjectResized` event firing when an object wasn't resized #TINY-4161 +- Fixed `ObjectResized` and `ObjectResizeStart` events incorrectly fired when adding or removing table rows and columns #TINY-4829 +- Fixed the placeholder not hiding when pasting content into the editor #TINY-4828 +- Fixed an issue where the editor would fail to load if local storage was disabled #TINY-5935 +- Fixed an issue where an uploaded image would reuse a cached image with a different mime type #TINY-5988 +- Fixed bug where toolbars and dialogs would not show if the body element was replaced (e.g. with Turbolinks). Patch contributed by spohlenz #GH-5653 +- Fixed an issue where multiple formats would be removed when removing a single format at the end of lines or on empty lines #TINY-1170 +- Fixed zero-width spaces incorrectly included in the `wordcount` plugin character count #TINY-5991 +- Fixed a regression introduced in 5.2.0 whereby the desktop `toolbar_mode` setting would incorrectly override the mobile default setting #TINY-5998 +- Fixed an issue where deleting all content in a single cell table would delete the entire table #TINY-1044 + +## 5.2.2 - 2020-04-23 + +### Fixed +- Fixed an issue where anchors could not be inserted on empty lines #TINY-2788 +- Fixed text decorations (underline, strikethrough) not consistently inheriting the text color #TINY-4757 +- Fixed `format` menu alignment buttons inconsistently applying to images #TINY-4057 +- Fixed the floating toolbar drawer height collapsing when the editor is rendered in modal dialogs or floating containers #TINY-4837 +- Fixed `media` embed content not processing safely in some cases #TINY-4857 + +## 5.2.1 - 2020-03-25 + +### Fixed +- Fixed the "is decorative" checkbox in the image dialog clearing after certain dialog events #FOAM-11 +- Fixed possible uncaught exception when a `style` attribute is removed using a content filter on `setContent` #TINY-4742 +- Fixed the table selection not functioning correctly in Microsoft Edge 44 or higher #TINY-3862 +- Fixed the table resize handles not functioning correctly in Microsoft Edge 44 or higher #TINY-4160 +- Fixed the floating toolbar drawer disconnecting from the toolbar when adding content in inline mode #TINY-4725 #TINY-4765 +- Fixed `readonly` mode not returning the appropriate boolean value #TINY-3948 +- Fixed the `forced_root_block_attrs` setting not applying attributes to new blocks consistently #TINY-4564 +- Fixed the editor incorrectly stealing focus during initialization in Microsoft Internet Explorer #TINY-4697 +- Fixed dialogs stealing focus when opening an alert or confirm dialog using an `onAction` callback #TINY-4014 +- Fixed inline dialogs incorrectly closing when clicking on an opened alert or confirm dialog #TINY-4012 +- Fixed the context toolbar overlapping the menu bar and toolbar #TINY-4586 +- Fixed notification and inline dialog positioning issues when using `toolbar_location: 'bottom'` #TINY-4586 +- Fixed the `colorinput` popup appearing offscreen on mobile devices #TINY-4711 +- Fixed special characters not being found when searching by "whole words only" #TINY-4522 +- Fixed an issue where dragging images could cause them to be duplicated #TINY-4195 +- Fixed context toolbars activating without the editor having focus #TINY-4754 +- Fixed an issue where removing the background color of text did not always work #TINY-4770 +- Fixed an issue where new rows and columns in a table did not retain the style of the previous row or column #TINY-4788 + +## 5.2.0 - 2020-02-13 + +### Added +- Added the ability to apply formats to spaces #TINY-4200 +- Added new `toolbar_location` setting to allow for positioning the menu and toolbar at the bottom of the editor #TINY-4210 +- Added new `toolbar_groups` setting to allow a custom floating toolbar group to be added to the toolbar when using `floating` toolbar mode #TINY-4229 +- Added new `link_default_protocol` setting to `link` and `autolink` plugin to allow a protocol to be used by default #TINY-3328 +- Added new `placeholder` setting to allow a placeholder to be shown when the editor is empty #TINY-3917 +- Added new `tinymce.dom.TextSeeker` API to allow searching text across different DOM nodes #TINY-4200 +- Added a drop shadow below the toolbar while in sticky mode and introduced Oxide variables to customize it when creating a custom skin #TINY-4343 +- Added `quickbars_image_toolbar` setting to allow for the image quickbar to be turned off #TINY-4398 +- Added iframe and img `loading` attribute to the default schema. Patch contributed by ataylor32. #GH-5112 +- Added new `getNodeFilters`/`getAttributeFilters` functions to the `editor.serializer` instance #TINY-4344 +- Added new `a11y_advanced_options` setting to allow additional accessibility options to be added #FOAM-11 +- Added new accessibility options and behaviours to the image dialog using `a11y_advanced_options` #FOAM-11 +- Added the ability to use the window `PrismJS` instance for the `codesample` plugin instead of the bundled version to allow for styling custom languages #TINY-4504 +- Added error message events that fire when a resource loading error occurs #TINY-4509 + +### Changed +- Changed the default schema to disallow `onchange` for select elements #TINY-4614 +- Changed default `toolbar_mode` value from false to `wrap`. The value false has been deprecated #TINY-4617 +- Changed `toolbar_drawer` setting to `toolbar_mode`. `toolbar_drawer` has been deprecated #TINY-4416 +- Changed iframe mode to set selection on content init if selection doesn't exist #TINY-4139 +- Changed table related icons to align them with the visual style of the other icons #TINY-4341 +- Changed and improved the visual appearance of the color input field #TINY-2917 +- Changed fake caret container to use `forced_root_block` when possible #TINY-4190 +- Changed the `requireLangPack` API to wait until the plugin has been loaded before loading the language pack #TINY-3716 +- Changed the formatter so `style_formats` are registered before the initial content is loaded into the editor #TINY-4238 +- Changed media plugin to use https protocol for media urls by default #TINY-4577 +- Changed the parser to treat CDATA nodes as bogus HTML comments to match the HTML parsing spec. A new `preserve_cdata` setting has been added to preserve CDATA nodes if required #TINY-4625 + +### Fixed +- Fixed incorrect parsing of malformed/bogus HTML comments #TINY-4625 +- Fixed `quickbars` selection toolbar appearing on non-editable elements #TINY-4359 +- Fixed bug with alignment toolbar buttons sometimes not changing state correctly #TINY-4139 +- Fixed the `codesample` toolbar button not toggling when selecting code samples other than HTML #TINY-4504 +- Fixed content incorrectly scrolling to the top or bottom when pressing enter if when the content was already in view #TINY-4162 +- Fixed `scrollIntoView` potentially hiding elements behind the toolbar #TINY-4162 +- Fixed editor not respecting the `resize_img_proportional` setting due to legacy code #TINY-4236 +- Fixed flickering floating toolbar drawer in inline mode #TINY-4210 +- Fixed an issue where the template plugin dialog would be indefinitely blocked on a failed template load #TINY-2766 +- Fixed the `mscontrolselect` event not being unbound on IE/Edge #TINY-4196 +- Fixed Confirm dialog footer buttons so only the "Yes" button is highlighted #TINY-4310 +- Fixed `file_picker_callback` functionality for Image, Link and Media plugins #TINY-4163 +- Fixed issue where floating toolbar drawer sometimes would break if the editor is resized while the drawer is open #TINY-4439 +- Fixed incorrect `external_plugins` loading error message #TINY-4503 +- Fixed resize handler was not hidden for ARIA purposes. Patch contributed by Parent5446. #GH-5195 +- Fixed an issue where content could be lost if a misspelled word was selected and spellchecking was disabled #TINY-3899 +- Fixed validation errors in the CSS where certain properties had the wrong default value #TINY-4491 +- Fixed an issue where forced root block attributes were not applied when removing a list #TINY-4272 +- Fixed an issue where the element path isn't being cleared when there are no parents #TINY-4412 +- Fixed an issue where width and height in svg icons containing `rect` elements were overridden by the CSS reset #TINY-4408 +- Fixed an issue where uploading images with `images_reuse_filename` enabled and that included a query parameter would generate an invalid URL #TINY-4638 +- Fixed the `closeButton` property not working when opening notifications #TINY-4674 +- Fixed keyboard flicker when opening a context menu on mobile #TINY-4540 +- Fixed issue where plus icon svg contained strokes #TINY-4681 + +## 5.1.6 - 2020-01-28 + +### Fixed +- Fixed `readonly` mode not blocking all clicked links #TINY-4572 +- Fixed legacy font sizes being calculated inconsistently for the `FontSize` query command value #TINY-4555 +- Fixed changing a tables row from `Header` to `Body` incorrectly moving the row to the bottom of the table #TINY-4593 +- Fixed the context menu not showing in certain cases with hybrid devices #TINY-4569 +- Fixed the context menu opening in the wrong location when the target is the editor body #TINY-4568 +- Fixed the `image` plugin not respecting the `automatic_uploads` setting when uploading local images #TINY-4287 +- Fixed security issue related to parsing HTML comments and CDATA #TINY-4544 + +## 5.1.5 - 2019-12-19 + +### Fixed +- Fixed the UI not working with hybrid devices that accept both touch and mouse events #TNY-4521 +- Fixed the `charmap` dialog initially focusing the first tab of the dialog instead of the search input field #TINY-4342 +- Fixed an exception being raised when inserting content if the caret was directly before or after a `contenteditable="false"` element #TINY-4528 +- Fixed a bug with pasting image URLs when paste as text is enabled #TINY-4523 + +## 5.1.4 - 2019-12-11 + +### Fixed +- Fixed dialog contents disappearing when clicking a checkbox for right-to-left languages #TINY-4518 +- Fixed the `legacyoutput` plugin registering legacy formats after editor initialization, causing legacy content to be stripped on the initial load #TINY-4447 +- Fixed search and replace not cycling through results when searching using special characters #TINY-4506 +- Fixed the `visualchars` plugin converting HTML-like text to DOM elements in certain cases #TINY-4507 +- Fixed an issue with the `paste` plugin not sanitizing content in some cases #TINY-4510 +- Fixed HTML comments incorrectly being parsed in certain cases #TINY-4511 + +## 5.1.3 - 2019-12-04 + +### Fixed +- Fixed sticky toolbar not undocking when fullscreen mode is activated #TINY-4390 +- Fixed the "Current Window" target not applying when updating links using the link dialog #TINY-4063 +- Fixed disabled menu items not highlighting when focused #TINY-4339 +- Fixed touch events passing through dialog collection items to the content underneath on Android devices #TINY-4431 +- Fixed keyboard navigation of the Help dialog's Keyboard Navigation tab #TINY-4391 +- Fixed search and replace dialog disappearing when finding offscreen matches on iOS devices #TINY-4350 +- Fixed performance issues where sticky toolbar was jumping while scrolling on slower browsers #TINY-4475 + +## 5.1.2 - 2019-11-19 + +### Fixed +- Fixed desktop touch devices using `mobile` configuration overrides #TINY-4345 +- Fixed unable to disable the new scrolling toolbar feature #TINY-4345 +- Fixed touch events passing through any pop-up items to the content underneath on Android devices #TINY-4367 +- Fixed the table selector handles throwing JavaScript exceptions for non-table selections #TINY-4338 +- Fixed `cut` operations not removing selected content on Android devices when the `paste` plugin is enabled #TINY-4362 +- Fixed inline toolbar not constrained to the window width by default #TINY-4314 +- Fixed context toolbar split button chevrons pointing right when they should be pointing down #TINY-4257 +- Fixed unable to access the dialog footer in tabbed dialogs on small screens #TINY-4360 +- Fixed mobile table selectors were hard to select with touch by increasing the size #TINY-4366 +- Fixed mobile table selectors moving when moving outside the editor #TINY-4366 +- Fixed inline toolbars collapsing when using sliding toolbars #TINY-4389 +- Fixed block textpatterns not treating NBSPs as spaces #TINY-4378 +- Fixed backspace not merging blocks when the last element in the preceding block was a `contenteditable="false"` element #TINY-4235 +- Fixed toolbar buttons that only contain text labels overlapping on mobile devices #TINY-4395 +- Fixed quickbars quickimage picker not working on mobile #TINY-4377 +- Fixed fullscreen not resizing in an iOS WKWebView component #TINY-4413 + +## 5.1.1 - 2019-10-28 + +### Fixed +- Fixed font formats containing spaces being wrapped in `"` entities instead of single quotes #TINY-4275 +- Fixed alert and confirm dialogs losing focus when clicked #TINY-4248 +- Fixed clicking outside a modal dialog focusing on the document body #TINY-4249 +- Fixed the context toolbar not hiding when scrolled out of view #TINY-4265 + +## 5.1.0 - 2019-10-17 + +### Added +- Added touch selector handles for table selections on touch devices #TINY-4097 +- Added border width field to Table Cell dialog #TINY-4028 +- Added touch event listener to media plugin to make embeds playable #TINY-4093 +- Added oxide styling options to notifications and tweaked the default variables #TINY-4153 +- Added additional padding to split button chevrons on touch devices, to make them easier to interact with #TINY-4223 +- Added new platform detection functions to `Env` and deprecated older detection properties #TINY-4184 +- Added `inputMode` config field to specify inputmode attribute of `input` dialog components #TINY-4062 +- Added new `inputMode` property to relevant plugins/dialogs #TINY-4102 +- Added new `toolbar_sticky` setting to allow the iframe menubar/toolbar to stick to the top of the window when scrolling #TINY-3982 + +### Changed +- Changed default setting for `toolbar_drawer` to `floating` #TINY-3634 +- Changed mobile phones to use the `silver` theme by default #TINY-3634 +- Changed some editor settings to default to `false` on touch devices: + - `menubar`(phones only) #TINY-4077 + - `table_grid` #TINY-4075 + - `resize` #TINY-4157 + - `object_resizing` #TINY-4157 +- Changed toolbars and context toolbars to sidescroll on mobile #TINY-3894 #TINY-4107 +- Changed context menus to render as horizontal menus on touch devices #TINY-4107 +- Changed the editor to use the `VisualViewport` API of the browser where possible #TINY-4078 +- Changed visualblocks toolbar button icon and renamed `paragraph` icon to `visualchars` #TINY-4074 +- Changed Oxide default for `@toolbar-button-chevron-color` to follow toolbar button icon color #TINY-4153 +- Changed the `urlinput` dialog component to use the `url` type attribute #TINY-4102 + +### Fixed +- Fixed Safari desktop visual viewport fires resize on fullscreen breaking the restore function #TINY-3976 +- Fixed scroll issues on mobile devices #TINY-3976 +- Fixed context toolbar unable to refresh position on iOS12 #TINY-4107 +- Fixed ctrl+left click not opening links on readonly mode and the preview dialog #TINY-4138 +- Fixed Slider UI component not firing `onChange` event on touch devices #TINY-4092 +- Fixed notifications overlapping instead of stacking #TINY-3478 +- Fixed inline dialogs positioning incorrectly when the page is scrolled #TINY-4018 +- Fixed inline dialogs and menus not repositioning when resizing #TINY-3227 +- Fixed inline toolbar incorrectly stretching to the full width when a width value was provided #TINY-4066 +- Fixed menu chevrons color to follow the menu text color #TINY-4153 +- Fixed table menu selection grid from staying black when using dark skins, now follows border color #TINY-4153 +- Fixed Oxide using the wrong text color variable for menubar button focused state #TINY-4146 +- Fixed the autoresize plugin not keeping the selection in view when resizing #TINY-4094 +- Fixed textpattern plugin throwing exceptions when using `forced_root_block: false` #TINY-4172 +- Fixed missing CSS fill styles for toolbar button icon active state #TINY-4147 +- Fixed an issue where the editor selection could end up inside a short ended element (such as `br`) #TINY-3999 +- Fixed browser selection being lost in inline mode when opening split dropdowns #TINY-4197 +- Fixed backspace throwing an exception when using `forced_root_block: false` #TINY-4099 +- Fixed floating toolbar drawer expanding outside the bounds of the editor #TINY-3941 +- Fixed the autocompleter not activating immediately after a `br` or `contenteditable=false` element #TINY-4194 +- Fixed an issue where the autocompleter would incorrectly close on IE 11 in certain edge cases #TINY-4205 + +## 5.0.16 - 2019-09-24 + +### Added +- Added new `referrer_policy` setting to add the `referrerpolicy` attribute when loading scripts or stylesheets #TINY-3978 +- Added a slight background color to dialog tab links when focused to aid keyboard navigation #TINY-3877 + +### Fixed +- Fixed media poster value not updating on change #TINY-4013 +- Fixed openlink was not registered as a toolbar button #TINY-4024 +- Fixed failing to initialize if a script tag was used inside a SVG #TINY-4087 +- Fixed double top border showing on toolbar without menubar when toolbar_drawer is enabled #TINY-4118 +- Fixed unable to drag inline dialogs to the bottom of the screen when scrolled #TINY-4154 +- Fixed notifications appearing on top of the toolbar when scrolled in inline mode #TINY-4159 +- Fixed notifications displaying incorrectly on IE 11 #TINY-4169 + +## 5.0.15 - 2019-09-02 + +### Added +- Added a dark `content_css` skin to go with the dark UI skin #TINY-3743 + +### Changed +- Changed the enabled state on toolbar buttons so they don't get the hover effect #TINY-3974 + +### Fixed +- Fixed missing CSS active state on toolbar buttons #TINY-3966 +- Fixed `onChange` callback not firing for the colorinput dialog component #TINY-3968 +- Fixed context toolbars not showing in fullscreen mode #TINY-4023 + +## 5.0.14 - 2019-08-19 + +### Added +- Added an API to reload the autocompleter menu with additional fetch metadata #MENTIONS-17 + +### Fixed +- Fixed missing toolbar button border styling options #TINY-3965 +- Fixed image upload progress notification closing before the upload is complete #TINY-3963 +- Fixed inline dialogs not closing on escape when no dialog component is in focus #TINY-3936 +- Fixed plugins not being filtered when defaulting to mobile on phones #TINY-3537 +- Fixed toolbar more drawer showing the content behind it when transitioning between opened and closed states #TINY-3878 +- Fixed focus not returning to the dialog after pressing the "Replace all" button in the search and replace dialog #TINY-3961 + +### Removed +- Removed Oxide variable `@menubar-select-disabled-border-color` and replaced it with `@menubar-select-disabled-border` #TINY-3965 + +## 5.0.13 - 2019-08-06 + +### Changed +- Changed modal dialogs to prevent dragging by default and added new `draggable_modal` setting to restore dragging #TINY-3873 +- Changed the nonbreaking plugin to insert nbsp characters wrapped in spans to aid in filtering. This can be disabled using the `nonbreaking_wrap` setting #TINY-3647 +- Changed backspace behaviour in lists to outdent nested list items when the cursor is at the start of the list item #TINY-3651 + +### Fixed +- Fixed sidebar growing beyond editor bounds in IE 11 #TINY-3937 +- Fixed issue with being unable to keyboard navigate disabled toolbar buttons #TINY-3350 +- Fixed issues with backspace and delete in nested contenteditable true and false elements #TINY-3868 +- Fixed issue with losing keyboard navigation in dialogs due to disabled buttons #TINY-3914 +- Fixed `MouseEvent.mozPressure is deprecated` warning in Firefox #TINY-3919 +- Fixed `default_link_target` not being respected when `target_list` is disabled #TINY-3757 +- Fixed mobile plugin filter to only apply to the mobile theme, rather than all mobile platforms #TINY-3405 +- Fixed focus switching to another editor during mode changes #TINY-3852 +- Fixed an exception being thrown when clicking on an uninitialized inline editor #TINY-3925 +- Fixed unable to keyboard navigate to dialog menu buttons #TINY-3933 +- Fixed dialogs being able to be dragged outside the window viewport #TINY-3787 +- Fixed inline dialogs appearing above modal dialogs #TINY-3932 + +## 5.0.12 - 2019-07-18 + +### Added +- Added ability to utilize UI dialog panels inside other panels #TINY-3305 +- Added help dialog tab explaining keyboard navigation of the editor #TINY-3603 + +### Changed +- Changed the "Find and Replace" design to an inline dialog #TINY-3054 + +### Fixed +- Fixed issue where autolink spacebar event was not being fired on Edge #TINY-3891 +- Fixed table selection missing the background color #TINY-3892 +- Fixed removing shortcuts not working for function keys #TINY-3871 +- Fixed non-descriptive UI component type names #TINY-3349 +- Fixed UI registry components rendering as the wrong type when manually specifying a different type #TINY-3385 +- Fixed an issue where dialog checkbox, input, selectbox, textarea and urlinput components couldn't be disabled #TINY-3708 +- Fixed the context toolbar not using viable screen space in inline/distraction free mode #TINY-3717 +- Fixed the context toolbar overlapping the toolbar in various conditions #TINY-3205 +- Fixed IE11 edge case where items were being inserted into the wrong location #TINY-3884 + +## 5.0.11 - 2019-07-04 + +### Fixed +- Fixed packaging errors caused by a rollup treeshaking bug (https://github.com/rollup/rollup/issues/2970) #TINY-3866 +- Fixed the customeditor component not able to get data from the dialog api #TINY-3866 +- Fixed collection component tooltips not being translated #TINY-3855 + +## 5.0.10 - 2019-07-02 + +### Added +- Added support for all HTML color formats in `color_map` setting #TINY-3837 + +### Changed +- Changed backspace key handling to outdent content in appropriate circumstances #TINY-3685 +- Changed default palette for forecolor and backcolor to include some lighter colors suitable for highlights #TINY-2865 +- Changed the search and replace plugin to cycle through results #TINY-3800 + +### Fixed +- Fixed inconsistent types causing some properties to be unable to be used in dialog components #TINY-3778 +- Fixed an issue in the Oxide skin where dialog content like outlines and shadows were clipped because of overflow hidden #TINY-3566 +- Fixed the search and replace plugin not resetting state when changing the search query #TINY-3800 +- Fixed backspace in lists not creating an undo level #TINY-3814 +- Fixed the editor to cancel loading in quirks mode where the UI is not supported #TINY-3391 +- Fixed applying fonts not working when the name contained spaces and numbers #TINY-3801 +- Fixed so that initial content is retained when initializing on list items #TINY-3796 +- Fixed inefficient font name and font size current value lookup during rendering #TINY-3813 +- Fixed mobile font copied into the wrong folder for the oxide-dark skin #TINY-3816 +- Fixed an issue where resizing the width of tables would produce inaccurate results #TINY-3827 +- Fixed a memory leak in the Silver theme #TINY-3797 +- Fixed alert and confirm dialogs using incorrect markup causing inconsistent padding #TINY-3835 +- Fixed an issue in the Table plugin with `table_responsive_width` not enforcing units when resizing #TINY-3790 +- Fixed leading, trailing and sequential spaces being lost when pasting plain text #TINY-3726 +- Fixed exception being thrown when creating relative URIs #TINY-3851 +- Fixed focus is no longer set to the editor content during mode changes unless the editor already had focus #TINY-3852 + +## 5.0.9 - 2019-06-26 + +### Fixed +- Fixed print plugin not working in Firefox #TINY-3834 + +## 5.0.8 - 2019-06-18 + +### Added +- Added back support for multiple toolbars #TINY-2195 +- Added support for .m4a files to the media plugin #TINY-3750 +- Added new base_url and suffix editor init options #TINY-3681 + +### Fixed +- Fixed incorrect padding for select boxes with visible values #TINY-3780 +- Fixed selection incorrectly changing when programmatically setting selection on contenteditable false elements #TINY-3766 +- Fixed sidebar background being transparent #TINY-3727 +- Fixed the build to remove duplicate iife wrappers #TINY-3689 +- Fixed bogus autocompleter span appearing in content when the autocompleter menu is shown #TINY-3752 +- Fixed toolbar font size select not working with legacyoutput plugin #TINY-2921 +- Fixed the legacyoutput plugin incorrectly aligning images #TINY-3660 +- Fixed remove color not working when using the legacyoutput plugin #TINY-3756 +- Fixed the font size menu applying incorrect sizes when using the legacyoutput plugin #TINY-3773 +- Fixed scrollIntoView not working when the parent window was out of view #TINY-3663 +- Fixed the print plugin printing from the wrong window in IE11 #TINY-3762 +- Fixed content CSS loaded over CORS not loading in the preview plugin with content_css_cors enabled #TINY-3769 +- Fixed the link plugin missing the default "None" option for link list #TINY-3738 +- Fixed small dot visible with menubar and toolbar disabled in inline mode #TINY-3623 +- Fixed space key properly inserts a nbsp before/after block elements #TINY-3745 +- Fixed native context menu not showing with images in IE11 #TINY-3392 +- Fixed inconsistent browser context menu image selection #TINY-3789 + +## 5.0.7 - 2019-06-05 + +### Added +- Added new toolbar button and menu item for inserting tables via dialog #TINY-3636 +- Added new API for adding/removing/changing tabs in the Help dialog #TINY-3535 +- Added highlighting of matched text in autocompleter items #TINY-3687 +- Added the ability for autocompleters to work with matches that include spaces #TINY-3704 +- Added new `imagetools_fetch_image` callback to allow custom implementations for cors loading of images #TINY-3658 +- Added `'http'` and `https` options to `link_assume_external_targets` to prepend `http://` or `https://` prefixes when URL does not contain a protocol prefix. Patch contributed by francoisfreitag. #GH-4335 + +### Changed +- Changed annotations navigation to work the same as inline boundaries #TINY-3396 +- Changed tabpanel API by adding a `name` field and changing relevant methods to use it #TINY-3535 + +### Fixed +- Fixed text color not updating all color buttons when choosing a color #TINY-3602 +- Fixed the autocompleter not working with fragmented text #TINY-3459 +- Fixed the autosave plugin no longer overwrites window.onbeforeunload #TINY-3688 +- Fixed infinite loop in the paste plugin when IE11 takes a long time to process paste events. Patch contributed by lRawd. #GH-4987 +- Fixed image handle locations when using `fixed_toolbar_container`. Patch contributed by t00. #GH-4966 +- Fixed the autoresize plugin not firing `ResizeEditor` events #TINY-3587 +- Fixed editor in fullscreen mode not extending to the bottom of the screen #TINY-3701 +- Fixed list removal when pressing backspace after the start of the list item #TINY-3697 +- Fixed autocomplete not triggering from compositionend events #TINY-3711 +- Fixed `file_picker_callback` could not set the caption field on the insert image dialog #TINY-3172 +- Fixed the autocompleter menu showing up after a selection had been made #TINY-3718 +- Fixed an exception being thrown when a file or number input has focus during initialization. Patch contributed by t00 #GH-2194 + +## 5.0.6 - 2019-05-22 + +### Added +- Added `icons_url` editor settings to enable icon packs to be loaded from a custom url #TINY-3585 +- Added `image_uploadtab` editor setting to control the visibility of the upload tab in the image dialog #TINY-3606 +- Added new api endpoints to the wordcount plugin and improved character count logic #TINY-3578 + +### Changed +- Changed plugin, language and icon loading errors to log in the console instead of a notification #TINY-3585 + +### Fixed +- Fixed the textpattern plugin not working with fragmented text #TINY-3089 +- Fixed various toolbar drawer accessibility issues and added an animation #TINY-3554 +- Fixed issues with selection and ui components when toggling readonly mode #TINY-3592 +- Fixed so readonly mode works with inline editors #TINY-3592 +- Fixed docked inline toolbar positioning when scrolled #TINY-3621 +- Fixed initial value not being set on bespoke select in quickbars and toolbar drawer #TINY-3591 +- Fixed so that nbsp entities aren't trimmed in white-space: pre-line elements #TINY-3642 +- Fixed `mceInsertLink` command inserting spaces instead of url encoded characters #GH-4990 +- Fixed text content floating on top of dialogs in IE11 #TINY-3640 + +## 5.0.5 - 2019-05-09 + +### Added +- Added menu items to match the forecolor/backcolor toolbar buttons #TINY-2878 +- Added default directionality based on the configured language #TINY-2621 +- Added styles, icons and tests for rtl mode #TINY-2621 + +### Fixed +- Fixed autoresize not working with floating elements or when media elements finished loading #TINY-3545 +- Fixed incorrect vertical caret positioning in IE 11 #TINY-3188 +- Fixed submenu anchoring hiding overflowed content #TINY-3564 + +### Removed +- Removed unused and hidden validation icons to avoid displaying phantom tooltips #TINY-2329 + +## 5.0.4 - 2019-04-23 + +### Added +- Added back URL dialog functionality, which is now available via `editor.windowManager.openUrl()` #TINY-3382 +- Added the missing throbber functionality when calling `editor.setProgressState(true)` #TINY-3453 +- Added function to reset the editor content and undo/dirty state via `editor.resetContent()` #TINY-3435 +- Added the ability to set menu buttons as active #TINY-3274 +- Added `editor.mode` API, featuring a custom editor mode API #TINY-3406 +- Added better styling to floating toolbar drawer #TINY-3479 +- Added the new premium plugins to the Help dialog plugins tab #TINY-3496 +- Added the linkchecker context menu items to the default configuration #TINY-3543 + +### Fixed +- Fixed image context menu items showing on placeholder images #TINY-3280 +- Fixed dialog labels and text color contrast within notifications/alert banners to satisfy WCAG 4.5:1 contrast ratio for accessibility #TINY-3351 +- Fixed selectbox and colorpicker items not being translated #TINY-3546 +- Fixed toolbar drawer sliding mode to correctly focus the editor when tabbing via keyboard navigation #TINY-3533 +- Fixed positioning of the styleselect menu in iOS while using the mobile theme #TINY-3505 +- Fixed the menubutton `onSetup` callback to be correctly executed when rendering the menu buttons #TINY-3547 +- Fixed `default_link_target` setting to be correctly utilized when creating a link #TINY-3508 +- Fixed colorpicker floating marginally outside its container #TINY-3026 +- Fixed disabled menu items displaying as active when hovered #TINY-3027 + +### Removed +- Removed redundant mobile wrapper #TINY-3480 + +## 5.0.3 - 2019-03-19 + +### Changed +- Changed empty nested-menu items within the style formats menu to be disabled or hidden if the value of `style_formats_autohide` is `true` #TINY-3310 +- Changed the entire phrase 'Powered by Tiny' in the status bar to be a link instead of just the word 'Tiny' #TINY-3366 +- Changed `formatselect`, `styleselect` and `align` menus to use the `mceToggleFormat` command internally #TINY-3428 + +### Fixed +- Fixed toolbar keyboard navigation to work as expected when `toolbar_drawer` is configured #TINY-3432 +- Fixed text direction buttons to display the correct pressed state in selections that have no explicit `dir` property #TINY-3138 +- Fixed the mobile editor to clean up properly when removed #TINY-3445 +- Fixed quickbar toolbars to add an empty box to the screen when it is set to `false` #TINY-3439 +- Fixed an issue where pressing the **Delete/Backspace** key at the edge of tables was creating incorrect selections #TINY-3371 +- Fixed an issue where dialog collection items (emoticon and special character dialogs) couldn't be selected with touch devices #TINY-3444 +- Fixed a type error introduced in TinyMCE version 5.0.2 when calling `editor.getContent()` with nested bookmarks #TINY-3400 +- Fixed an issue that prevented default icons from being overridden #TINY-3449 +- Fixed an issue where **Home/End** keys wouldn't move the caret correctly before or after `contenteditable=false` inline elements #TINY-2995 +- Fixed styles to be preserved in IE 11 when editing via the `fullpage` plugin #TINY-3464 +- Fixed the `link` plugin context toolbar missing the open link button #TINY-3461 +- Fixed inconsistent dialog component spacing #TINY-3436 + +## 5.0.2 - 2019-03-05 + +### Added +- Added presentation and document presets to `htmlpanel` dialog component #TINY-2694 +- Added missing fixed_toolbar_container setting has been reimplemented in the Silver theme #TINY-2712 +- Added a new toolbar setting `toolbar_drawer` that moves toolbar groups which overflow the editor width into either a `sliding` or `floating` toolbar section #TINY-2874 + +### Changed +- Updated the build process to include package lock files in the dev distribution archive #TINY-2870 + +### Fixed +- Fixed inline dialogs did not have aria attributes #TINY-2694 +- Fixed default icons are now available in the UI registry, allowing use outside of toolbar buttons #TINY-3307 +- Fixed a memory leak related to select toolbar items #TINY-2874 +- Fixed a memory leak due to format changed listeners that were never unbound #TINY-3191 +- Fixed an issue where content may have been lost when using permanent bookmarks #TINY-3400 +- Fixed the quicklink toolbar button not rendering in the quickbars plugin #TINY-3125 +- Fixed an issue where menus were generating invalid HTML in some cases #TINY-3323 +- Fixed an issue that could cause the mobile theme to show a blank white screen when the editor was inside an `overflow:hidden` element #TINY-3407 +- Fixed mobile theme using a transparent background and not taking up the full width on iOS #TINY-3414 +- Fixed the template plugin dialog missing the description field #TINY-3337 +- Fixed input dialog components using an invalid default type attribute #TINY-3424 +- Fixed an issue where backspace/delete keys after/before pagebreak elements wouldn't move the caret #TINY-3097 +- Fixed an issue in the table plugin where menu items and toolbar buttons weren't showing correctly based on the selection #TINY-3423 +- Fixed inconsistent button focus styles in Firefox #TINY-3377 +- Fixed the resize icon floating left when all status bar elements were disabled #TINY-3340 +- Fixed the resize handle to not show in fullscreen mode #TINY-3404 + +## 5.0.1 - 2019-02-21 + +### Added +- Added H1-H6 toggle button registration to the silver theme #TINY-3070 +- Added code sample toolbar button will now toggle on when the cursor is in a code section #TINY-3040 +- Added new settings to the emoticons plugin to allow additional emoticons to be added #TINY-3088 + +### Fixed +- Fixed an issue where adding links to images would replace the image with text #TINY-3356 +- Fixed an issue where the inline editor could use fractional pixels for positioning #TINY-3202 +- Fixed an issue where uploading non-image files in the Image Plugin upload tab threw an error. #TINY-3244 +- Fixed an issue in the media plugin that was causing the source url and height/width to be lost in certain circumstances #TINY-2858 +- Fixed an issue with the Context Toolbar not being removed when clicking outside of the editor #TINY-2804 +- Fixed an issue where clicking 'Remove link' wouldn't remove the link in certain circumstances #TINY-3199 +- Fixed an issue where the media plugin would fail when parsing dialog data #TINY-3218 +- Fixed an issue where retrieving the selected content as text didn't create newlines #TINY-3197 +- Fixed incorrect keyboard shortcuts in the Help dialog for Windows #TINY-3292 +- Fixed an issue where JSON serialization could produce invalid JSON #TINY-3281 +- Fixed production CSS including references to source maps #TINY-3920 +- Fixed development CSS was not included in the development zip #TINY-3920 +- Fixed the autocompleter matches predicate not matching on the start of words by default #TINY-3306 +- Fixed an issue where the page could be scrolled with modal dialogs open #TINY-2252 +- Fixed an issue where autocomplete menus would show an icon margin when no items had icons #TINY-3329 +- Fixed an issue in the quickbars plugin where images incorrectly showed the text selection toolbar #TINY-3338 +- Fixed an issue that caused the inline editor to fail to render when the target element already had focus #TINY-3353 + +### Removed +- Removed paste as text notification banner and paste_plaintext_inform setting #POW-102 + +## 5.0.0 - 2019-02-04 + +Full documentation for the version 5 features and changes is available at https://www.tiny.cloud/docs/tinymce/5/release-notes/release-notes50/ + +### Added +- Added links and registered names with * to denote premium plugins in Plugins tab of Help dialog #TINY-3223 + +### Changed +- Changed Tiny 5 mobile skin to look more uniform with desktop #TINY-2650 +- Blacklisted table, th and td as inline editor target #TINY-717 + +### Fixed +- Fixed an issue where tab panel heights weren't sizing properly on smaller screens and weren't updating on resize #TINY-3242 +- Fixed image tools not having any padding between the label and slider #TINY-3220 +- Fixed context toolbar toggle buttons not showing the correct state #TINY-3022 +- Fixed missing separators in the spellchecker context menu between the suggestions and actions #TINY-3217 +- Fixed notification icon positioning in alert banners #TINY-2196 +- Fixed a typo in the word count plugin name #TINY-3062 +- Fixed charmap and emoticons dialogs not having a primary button #TINY-3233 +- Fixed an issue where resizing wouldn't work correctly depending on the box-sizing model #TINY-3278 + +## 5.0.0-rc-2 - 2019-01-22 + +### Added +- Added screen reader accessibility for sidebar and statusbar #TINY-2699 + +### Changed +- Changed formatting menus so they are registered and made the align toolbar button use an icon instead of text #TINY-2880 +- Changed checkboxes to use a boolean for its state, instead of a string #TINY-2848 +- Updated the textpattern plugin to properly support nested patterns and to allow running a command with a value for a pattern with a start and an end #TINY-2991 +- Updated Emoticons and Charmap dialogs to be screen reader accessible #TINY-2693 + +### Fixed +- Fixed the link dialog such that it will now retain class attributes when updating links #TINY-2825 +- Fixed "Find and replace" not showing in the "Edit" menu by default #TINY-3061 +- Fixed dropdown buttons missing the 'type' attribute, which could cause forms to be incorrectly submitted #TINY-2826 +- Fixed emoticon and charmap search not returning expected results in certain cases #TINY-3084 +- Fixed blank rel_list values throwing an exception in the link plugin #TINY-3149 + +### Removed +- Removed unnecessary 'flex' and unused 'colspan' properties from the new dialog APIs #TINY-2973 + +## 5.0.0-rc-1 - 2019-01-08 + +### Added +- Added editor settings functionality to specify title attributes for toolbar groups #TINY-2690 +- Added icons instead of button text to improve Search and Replace dialog footer appearance #TINY-2654 +- Added `tox-dialog__table` instead of `mce-table-striped` class to enhance Help dialog appearance #TINY-2360 +- Added title attribute to iframes so, screen readers can announce iframe labels #TINY-2692 +- Added a wordcount menu item, that defaults to appearing in the tools menu #TINY-2877 + +### Changed +- Updated the font select dropdown logic to try to detect the system font stack and show "System Font" as the font name #TINY-2710 +- Updated the autocompleter to only show when it has matched items #TINY-2350 +- Updated SizeInput labels to "Height" and "Width" instead of Dimensions #TINY-2833 +- Updated the build process to minify and generate ASCII only output for the emoticons database #TINY-2744 + +### Fixed +- Fixed readonly mode not fully disabling editing content #TINY-2287 +- Fixed accessibility issues with the font select, font size, style select and format select toolbar dropdowns #TINY-2713 +- Fixed accessibility issues with split dropdowns #TINY-2697 +- Fixed the legacyoutput plugin to be compatible with TinyMCE 5.0 #TINY-2301 +- Fixed icons not showing correctly in the autocompleter popup #TINY-3029 +- Fixed an issue where preview wouldn't show anything in Edge under certain circumstances #TINY-3035 +- Fixed the height being incorrectly calculated for the autoresize plugin #TINY-2807 + +## 5.0.0-beta-1 - 2018-11-30 + +### Added +- Added a new `addNestedMenuItem()` UI registry function and changed all nested menu items to use the new registry functions #TINY-2230 +- Added title attribute to color swatch colors #TINY-2669 +- Added anchorbar component to anchor inline toolbar dialogs to instead of the toolbar #TINY-2040 +- Added support for toolbar and toolbar array config options to be squashed into a single toolbar and not create multiple toolbars #TINY-2195 +- Added error handling for when forced_root_block config option is set to true #TINY-2261 +- Added functionality for the removed_menuitems config option #TINY-2184 +- Added the ability to use a string to reference menu items in menu buttons and submenu items #TINY-2253 + +### Changed +- Changed the name of the "inlite" plugin to "quickbars" #TINY-2831 +- Changed the background color icon to highlight background icon #TINY-2258 +- Changed Help dialog to be accessible to screen readers #TINY-2687 +- Changed the color swatch to save selected custom colors to local storage for use across sessions #TINY-2722 +- Changed `WindowManager` API - methods `getParams`, `setParams` and `getWindows`, and the legacy `windows` property, have been removed. `alert` and `confirm` dialogs are no longer tracked in the window list. #TINY-2603 + +### Fixed +- Fixed an inline mode issue where the save plugin upon saving can cause content loss #TINY-2659 +- Fixed an issue in IE 11 where calling selection.getContent() would return an empty string when the editor didn't have focus #TINY-2325 + +### Removed +- Removed compat3x plugin #TINY-2815 + +## 5.0.0-preview-4 - 2018-11-12 + +### Added +- Added width and height placeholder text to image and media dialog dimensions input #AP-296 +- Added the ability to keyboard navigate through menus, toolbars, sidebar and the status bar sequentially #AP-381 +- Added translation capability back to the editor's UI #AP-282 +- Added `label` component type for dialogs to group components under a label + +### Changed +- Changed the editor resize handle so that it should be disabled when the autoresize plugin is turned on #AP-424 +- Changed UI text for microcopy improvements #TINY-2281 + +### Fixed +- Fixed distraction free plugin #AP-470 +- Fixed contents of the input field being selected on focus instead of just recieving an outline highlight #AP-464 +- Fixed styling issues with dialogs and menus in IE 11 #AP-456 +- Fixed custom style format control not honoring custom formats #AP-393 +- Fixed context menu not appearing when clicking an image with a caption #AP-382 +- Fixed directionality of UI when using an RTL language #AP-423 +- Fixed page responsiveness with multiple inline editors #AP-430 +- Fixed empty toolbar groups appearing through invalid configuration of the `toolbar` property #AP-450 +- Fixed text not being retained when updating links through the link dialog #AP-293 +- Fixed edit image context menu, context toolbar and toolbar items being incorrectly enabled when selecting invalid images #AP-323 +- Fixed emoji type ahead being shown when typing URLs #AP-366 +- Fixed toolbar configuration properties incorrectly expecting string arrays instead of strings #AP-342 +- Fixed the block formatting toolbar item not showing a "Formatting" title when there is no selection #AP-321 +- Fixed clicking disabled toolbar buttons hiding the toolbar in inline mode #AP-380 +- Fixed `EditorResize` event not being fired upon editor resize #AP-327 +- Fixed tables losing styles when updating through the dialog #AP-368 +- Fixed context toolbar positioning to be more consistent near the edges of the editor #AP-318 +- Fixed table of contents plugin now works with v5 toolbar APIs correctly #AP-347 +- Fixed the `link_context_toolbar` configuration not disabling the context toolbar #AP-458 +- Fixed the link context toolbar showing incorrect relative links #AP-435 +- Fixed the alignment of the icon in alert banner dialog components #TINY-2220 +- Fixed the visual blocks and visual char menu options not displaying their toggled state #TINY-2238 +- Fixed the editor not displaying as fullscreen when toggled #TINY-2237 + +### Removed +- Removed the tox-custom-editor class that was added to the wrapping element of codemirror #TINY-2211 + +## 5.0.0-preview-3 - 2018-10-18 + +### Changed +- Changed editor layout to use modern CSS properties over manually calculating dimensions #AP-324 +- Changed `autoresize_min_height` and `autoresize_max_height` configurations to `min_height` and `max_height` #AP-324 +- Changed `Whole word` label in Search and Replace dialog to `Find whole words only` #AP-387 + +### Fixed +- Fixed bugs with editor width jumping when resizing and the iframe not resizing to smaller than 150px in height #AP-324 +- Fixed mobile theme bug that prevented the editor from loading #AP-404 +- Fixed long toolbar groups extending outside of the editor instead of wrapping +- Fixed dialog titles so they are now proper case #AP-384 +- Fixed color picker default to be #000000 instead of #ff00ff #AP-216 +- Fixed "match case" option on the Find and Replace dialog is no longer selected by default #AP-298 +- Fixed vertical alignment of toolbar icons #DES-134 +- Fixed toolbar icons not appearing on IE11 #DES-133 + +## 5.0.0-preview-2 - 2018-10-10 + +### Added +- Added swatch is now shown for colorinput fields, instead of the colorpicker directly #AP-328 +- Added fontformats and fontsizes menu items #AP-390 + +### Changed +- Changed configuration of color options has been simplified to `color_map`, `color_cols`, and `custom_colors` #AP-328 +- Changed `height` configuration to apply to the editor frame (including menubar, toolbar, status bar) instead of the content area #AP-324 + +### Fixed +- Fixed styleselect not updating the displayed item as the cursor moved #AP-388 +- Fixed preview iframe not expanding to the dialog size #AP-252 +- Fixed 'meta' shortcuts not translated into platform-specific text #AP-270 +- Fixed tabbed dialogs (Charmap and Emoticons) shrinking when no search results returned +- Fixed a bug where alert banner icons were not retrieved from icon pack. #AP-330 +- Fixed component styles to flex so they fill large dialogs. #AP-252 +- Fixed editor flashing unstyled during load (still in progress). #AP-349 + +### Removed +- Removed `colorpicker` plugin, it is now in the theme #AP-328 +- Removed `textcolor` plugin, it is now in the theme #AP-328 + +## 5.0.0-preview-1 - 2018-10-01 + +Developer preview 1 + +Initial list of features and changes is available at https://www.tiny.cloud/docs/tinymce/5/release-notes/release-notes50/ + +## 4.9.11 - 2020-07-13 + +### Fixed +- Fixed the `selection.setContent()` API not running parser filters #TINY-4002 +- Fixed content in an iframe element parsing as DOM elements instead of text content #TINY-5943 +- Fixed up and down keyboard navigation not working for inline `contenteditable="false"` elements #TINY-6226 + +## 4.9.10 - 2020-04-23 + +### Fixed +- Fixed an issue where the editor selection could end up inside a short ended element (eg br) #TINY-3999 +- Fixed a security issue related to CDATA sanitization during parsing #TINY-4669 +- Fixed `media` embed content not processing safely in some cases #TINY-4857 + +## 4.9.9 - 2020-03-25 + +### Fixed +- Fixed the table selection not functioning correctly in Microsoft Edge 44 or higher #TINY-3862 +- Fixed the table resize handles not functioning correctly in Microsoft Edge 44 or higher #TINY-4160 +- Fixed the `forced_root_block_attrs` setting not applying attributes to new blocks consistently #TINY-4564 +- Fixed the editor failing to initialize if a script tag was used inside an SVG #TINY-4087 + +## 4.9.8 - 2020-01-28 + +### Fixed +- Fixed the `mobile` theme failing to load due to a bundling issue #TINY-4613 +- Fixed security issue related to parsing HTML comments and CDATA #TINY-4544 + +## 4.9.7 - 2019-12-19 + +### Fixed +- Fixed the `visualchars` plugin converting HTML-like text to DOM elements in certain cases #TINY-4507 +- Fixed an issue with the `paste` plugin not sanitizing content in some cases #TINY-4510 +- Fixed HTML comments incorrectly being parsed in certain cases #TINY-4511 + +## 4.9.6 - 2019-09-02 + +### Fixed +- Fixed image browse button sometimes displaying the browse window twice #TINY-3959 + +## 4.9.5 - 2019-07-02 + +### Changed +- Changed annotations navigation to work the same as inline boundaries #TINY-3396 + +### Fixed +- Fixed the print plugin printing from the wrong window in IE11 #TINY-3762 +- Fixed an exception being thrown when a file or number input has focus during initialization. Patch contributed by t00 #GH-2194 +- Fixed positioning of the styleselect menu in iOS while using the mobile theme #TINY-3505 +- Fixed native context menu not showing with images in IE11 #TINY-3392 +- Fixed selection incorrectly changing when programmatically setting selection on contenteditable false elements #TINY-3766 +- Fixed image browse button not working on touch devices #TINY-3751 +- Fixed so that nbsp entities aren't trimmed in white-space: pre-line elements #TINY-3642 +- Fixed space key properly inserts a nbsp before/after block elements #TINY-3745 +- Fixed infinite loop in the paste plugin when IE11 takes a long time to process paste events. Patch contributed by lRawd. #GH-4987 + +## 4.9.4 - 2019-03-20 + +### Fixed +- Fixed an issue where **Home/End** keys wouldn't move the caret correctly before or after `contenteditable=false` inline elements #TINY-2995 +- Fixed an issue where content may have been lost when using permanent bookmarks #TINY-3400 +- Fixed the mobile editor to clean up properly when removed #TINY-3445 +- Fixed an issue where retrieving the selected content as text didn't create newlines #TINY-3197 +- Fixed an issue where typing space between images would cause issues with nbsp not being inserted. #TINY-3346 + +## 4.9.3 - 2019-01-31 + +### Added +- Added a visualchars_default_state setting to the Visualchars Plugin. Patch contributed by mat3e. + +### Fixed +- Fixed a bug where scrolling on a page with more than one editor would cause a ResizeWindow event to fire. #TINY-3247 +- Fixed a bug where if a plugin threw an error during initialisation the whole editor would fail to load. #TINY-3243 +- Fixed a bug where getContent would include bogus elements when valid_elements setting was set up in a specific way. #TINY-3213 +- Fixed a bug where only a few function key names could be used when creating keyboard shortcuts. #TINY-3146 +- Fixed a bug where it wasn't possible to enter spaces into an editor after pressing shift+enter. #TINY-3099 +- Fixed a bug where no caret would be rendered after backspacing to a contenteditable false element. #TINY-2998 +- Fixed a bug where deletion to/from indented lists would leave list fragments in the editor. #TINY-2981 + +## 4.9.2 - 2018-12-17 + +### Fixed +- Fixed a bug with pressing the space key on IE 11 would result in nbsp characters being inserted between words at the end of a block. #TINY-2996 +- Fixed a bug where character composition using quote and space on US International keyboards would produce a space instead of a quote. #TINY-2999 +- Fixed a bug where remove format wouldn't remove the inner most inline element in some situations. #TINY-2982 +- Fixed a bug where outdenting an list item would affect attributes on other list items within the same list. #TINY-2971 +- Fixed a bug where the DomParser filters wouldn't be applied for elements created when parsing invalid html. #TINY-2978 +- Fixed a bug where setProgressState wouldn't automatically close floating ui elements like menus. #TINY-2896 +- Fixed a bug where it wasn't possible to navigate out of a figcaption element using the arrow keys. #TINY-2894 +- Fixed a bug where enter key before an image inside a link would remove the image. #TINY-2780 + +## 4.9.1 - 2018-12-04 + +### Added +- Added functionality to insert html to the replacement feature of the Textpattern Plugin. #TINY-2839 + +### Fixed +- Fixed a bug where `editor.selection.getContent({format: 'text'})` didn't work as expected in IE11 on an unfocused editor. #TINY-2862 +- Fixed a bug in the Textpattern Plugin where the editor would get an incorrect selection after inserting a text pattern on Safari. #TINY-2838 +- Fixed a bug where the space bar didn't work correctly in editors with the forced_root_block setting set to false. #TINY-2816 + +## 4.9.0 - 2018-11-27 + +### Added +- Added a replace feature to the Textpattern Plugin. #TINY-1908 +- Added functionality to the Lists Plugin that improves the indentation logic. #TINY-1790 + +### Fixed +- Fixed a bug where it wasn't possible to delete/backspace when the caret was between a contentEditable=false element and a BR. #TINY-2372 +- Fixed a bug where copying table cells without a text selection would fail to copy anything. #TINY-1789 +- Implemented missing `autosave_restore_when_empty` functionality in the Autosave Plugin. Patch contributed by gzzo. #GH-4447 +- Reduced insertion of unnecessary nonbreaking spaces in the editor. #TINY-1879 + +## 4.8.5 - 2018-10-30 + +### Added +- Added a content_css_cors setting to the editor that adds the crossorigin="anonymous" attribute to link tags added by the StyleSheetLoader. #TINY-1909 + +### Fixed +- Fixed a bug where trying to remove formatting with a collapsed selection range would throw an exception. #GH-4636 +- Fixed a bug in the image plugin that caused updating figures to split contenteditable elements. #GH-4563 +- Fixed a bug that was causing incorrect viewport calculations for fixed position UI elements. #TINY-1897 +- Fixed a bug where inline formatting would cause the delete key to do nothing. #TINY-1900 + +## 4.8.4 - 2018-10-23 + +### Added +- Added support for the HTML5 `main` element. #TINY-1877 + +### Changed +- Changed the keyboard shortcut to move focus to contextual toolbars to Ctrl+F9. #TINY-1812 + +### Fixed +- Fixed a bug where content css could not be loaded from another domain. #TINY-1891 +- Fixed a bug on FireFox where the cursor would get stuck between two contenteditable false inline elements located inside of the same block element divided by a BR. #TINY-1878 +- Fixed a bug with the insertContent method where nonbreaking spaces would be inserted incorrectly. #TINY-1868 +- Fixed a bug where the toolbar of the inline editor would not be visible in some scenarios. #TINY-1862 +- Fixed a bug where removing the editor while more than one notification was open would throw an error. #TINY-1845 +- Fixed a bug where the menubutton would be rendered on top of the menu if the viewport didn't have enough height. #TINY-1678 +- Fixed a bug with the annotations api where annotating collapsed selections caused problems. #TBS-2449 +- Fixed a bug where wbr elements were being transformed into whitespace when using the Paste Plugin's paste as text setting. #GH-4638 +- Fixed a bug where the Search and Replace didn't replace spaces correctly. #GH-4632 +- Fixed a bug with sublist items not persisting selection. #GH-4628 +- Fixed a bug with mceInsertRawHTML command not working as expected. #GH-4625 + +## 4.8.3 - 2018-09-13 + +### Fixed +- Fixed a bug where the Wordcount Plugin didn't correctly count words within tables on IE11. #TINY-1770 +- Fixed a bug where it wasn't possible to move the caret out of a table on IE11 and Firefox. #TINY-1682 +- Fixed a bug where merging empty blocks didn't work as expected, sometimes causing content to be deleted. #TINY-1781 +- Fixed a bug where the Textcolor Plugin didn't show the correct current color. #TINY-1810 +- Fixed a bug where clear formatting with a collapsed selection would sometimes clear formatting from more content than expected. #TINY-1813 #TINY-1821 +- Fixed a bug with the Table Plugin where it wasn't possible to keyboard navigate to the caption. #TINY-1818 + +## 4.8.2 - 2018-08-09 + +### Changed +- Moved annotator from "experimental" to "annotator" object on editor. #TBS-2398 +- Improved the multiclick normalization across browsers. #TINY-1788 + +### Fixed +- Fixed a bug where running getSelectedBlocks with a collapsed selection between block elements would produce incorrect results. #TINY-1787 +- Fixed a bug where the ScriptLoaders loadScript method would not work as expected in FireFox when loaded on the same page as a ShadowDOM polyfill. #TINY-1786 +- Removed reference to ShadowDOM event.path as Blink based browsers now support event.composedPath. #TINY-1785 +- Fixed a bug where a reference to localStorage would throw an "access denied" error in IE11 with strict security settings. #TINY-1782 +- Fixed a bug where pasting using the toolbar button on an inline editor in IE11 would cause a looping behaviour. #TINY-1768 + +## 4.8.1 - 2018-07-26 + +### Fixed +- Fixed a bug where the content of inline editors was being cleaned on every call of `editor.save()`. #TINY-1783 +- Fixed a bug where the arrow of the Inlite Theme toolbar was being rendered incorrectly in RTL mode. #TINY-1776 +- Fixed a bug with the Paste Plugin where pasting after inline contenteditable false elements moved the caret to the end of the line. #TINY-1758 + +## 4.8.0 - 2018-06-27 + +### Added +- Added new "experimental" object in editor, with initial Annotator API. #TBS-2374 + +### Fixed +- Fixed a bug where deleting paragraphs inside of table cells would delete the whole table cell. #TINY-1759 +- Fixed a bug in the Table Plugin where removing row height set on the row properties dialog did not update the table. #TINY-1730 +- Fixed a bug with the font select toolbar item didn't update correctly. #TINY-1683 +- Fixed a bug where all bogus elements would not be deleted when removing an inline editor. #TINY-1669 + +## 4.7.13 - 2018-05-16 + +### Added +- Added missing code menu item from the default menu config. #TINY-1648 +- Added new align button for combining the separate align buttons into a menu button. #TINY-1652 + +### Fixed +- Fixed a bug where Edge 17 wouldn't be able to select images or tables. #TINY-1679 +- Fixed issue where whitespace wasn't preserved when the editor was initialized on pre elements. #TINY-1649 +- Fixed a bug with the fontselect dropdowns throwing an error if the editor was hidden in Firefox. #TINY-1664 +- Fixed a bug where it wasn't possible to merge table cells on IE 11. #TINY-1671 +- Fixed a bug where textcolor wasn't applying properly on IE 11 in some situations. #TINY-1663 +- Fixed a bug where the justifyfull command state wasn't working correctly. #TINY-1677 +- Fixed a bug where the styles wasn't updated correctly when resizing some tables. #TINY-1668 + +## 4.7.12 - 2018-05-03 + +### Added +- Added an option to filter out image svg data urls. +- Added support for html5 details and summary elements. + +### Changed +- Changed so the mce-abs-layout-item css rule targets html instead of body. Patch contributed by nazar-pc. + +### Fixed +- Fixed a bug where the "read" step on the mobile theme was still present on android mobile browsers. +- Fixed a bug where all images in the editor document would reload on any editor change. +- Fixed a bug with the Table Plugin where ObjectResized event wasn't being triggered on column resize. +- Fixed so the selection is set to the first suitable caret position after editor.setContent called. +- Fixed so links with xlink:href attributes are filtered correctly to prevent XSS. +- Fixed a bug on IE11 where pasting content into an inline editor initialized on a heading element would create new editable elements. +- Fixed a bug where readonly mode would not work as expected when the editor contained contentEditable=true elements. +- Fixed a bug where the Link Plugin would throw an error when used together with the webcomponents polyfill. Patch contributed by 4esnog. +- Fixed a bug where the "Powered by TinyMCE" branding link would break on XHTML pages. Patch contributed by tistre. +- Fixed a bug where the same id would be used in the blobcache for all pasted images. Patch contributed by thorn0. + +## 4.7.11 - 2018-04-11 + +### Added +- Added a new imagetools_credentials_hosts option to the Imagetools Plugin. + +### Fixed +- Fixed a bug where toggling a list containing empty LIs would throw an error. Patch contributed by bradleyke. +- Fixed a bug where applying block styles to a text with the caret at the end of the paragraph would select all text in the paragraph. +- Fixed a bug where toggling on the Spellchecker Plugin would trigger isDirty on the editor. +- Fixed a bug where it was possible to enter content into selection bookmark spans. +- Fixed a bug where if a non paragraph block was configured in forced_root_block the editor.getContent method would return incorrect values with an empty editor. +- Fixed a bug where dropdown menu panels stayed open and fixed in position when dragging dialog windows. +- Fixed a bug where it wasn't possible to extend table cells with the space button in Safari. +- Fixed a bug where the setupeditor event would thrown an error when using the Compat3x Plugin. +- Fixed a bug where an error was thrown in FontInfo when called on a detached element. + +## 4.7.10 - 2018-04-03 + +### Added +- Added normalization of triple clicks across browsers in the editor. +- Added a `hasFocus` method to the editor that checks if the editor has focus. +- Added correct icon to the Nonbreaking Plugin menu item. + +### Fixed +- Fixed so the `getContent`/`setContent` methods work even if the editor is not initialized. +- Fixed a bug with the Media Plugin where query strings were being stripped from youtube links. +- Fixed a bug where image styles were changed/removed when opening and closing the Image Plugin dialog. +- Fixed a bug in the Table Plugin where some table cell styles were not correctly added to the content html. +- Fixed a bug in the Spellchecker Plugin where it wasn't possible to change the spellchecker language. +- Fixed so the the unlink action in the Link Plugin has a menu item and can be added to the contextmenu. +- Fixed a bug where it wasn't possible to keyboard navigate to the start of an inline element on a new line within the same block element. +- Fixed a bug with the Text Color Plugin where if used with an inline editor located at the bottom of the screen the colorpicker could appear off screen. +- Fixed a bug with the UndoManager where undo levels were being added for nbzwsp characters. +- Fixed a bug with the Table Plugin where the caret would sometimes be lost when keyboard navigating up through a table. +- Fixed a bug where FontInfo.getFontFamily would throw an error when called on a removed editor. +- Fixed a bug in Firefox where undo levels were not being added correctly for some specific operations. +- Fixed a bug where initializing an inline editor inside of a table would make the whole table resizeable. +- Fixed a bug where the fake cursor that appears next to tables on Firefox was positioned incorrectly when switching to fullscreen. +- Fixed a bug where zwsp's weren't trimmed from the output from `editor.getContent({ format: 'text' })`. +- Fixed a bug where the fontsizeselect/fontselect toolbar items showed the body info rather than the first possible caret position info on init. +- Fixed a bug where it wasn't possible to select all content if the editor only contained an inline boundary element. +- Fixed a bug where `content_css` urls with query strings wasn't working. +- Fixed a bug in the Table Plugin where some table row styles were removed when changing other styles in the row properties dialog. + +### Removed +- Removed the "read" step from the mobile theme. + +## 4.7.9 - 2018-02-27 + +### Fixed +- Fixed a bug where the editor target element didn't get the correct style when removing the editor. + +## 4.7.8 - 2018-02-26 + +### Fixed +- Fixed an issue with the Help Plugin where the menuitem name wasn't lowercase. +- Fixed an issue on MacOS where text and bold text did not have the same line-height in the autocomplete dropdown in the Link Plugin dialog. +- Fixed a bug where the "paste as text" option in the Paste Plugin didn't work. +- Fixed a bug where dialog list boxes didn't get positioned correctly in documents with scroll. +- Fixed a bug where the Inlite Theme didn't use the Table Plugin api to insert correct tables. +- Fixed a bug where the Inlite Theme panel didn't hide on blur in a correct way. +- Fixed a bug where placing the cursor before a table in Firefox would scroll to the bottom of the table. +- Fixed a bug where selecting partial text in table cells with rowspans and deleting would produce faulty tables. +- Fixed a bug where the Preview Plugin didn't work on Safari due to sandbox security. +- Fixed a bug where table cell selection using the keyboard threw an error. +- Fixed so the font size and font family doesn't toggle the text but only sets the selected format on the selected text. +- Fixed so the built-in spellchecking on Chrome and Safari creates an undo level when replacing words. + +## 4.7.7 - 2018-02-19 + +### Added +- Added a border style selector to the advanced tab of the Image Plugin. +- Added better controls for default table inserted by the Table Plugin. +- Added new `table_responsive_width` option to the Table Plugin that controls whether to use pixel or percentage widths. + +### Fixed +- Fixed a bug where the Link Plugin text didn't update when a URL was pasted using the context menu. +- Fixed a bug with the Spellchecker Plugin where using "Add to dictionary" in the context menu threw an error. +- Fixed a bug in the Media Plugin where the preview node for iframes got default width and height attributes that interfered with width/height styles. +- Fixed a bug where backslashes were being added to some font family names in Firefox in the fontselect toolbar item. +- Fixed a bug where errors would be thrown when trying to remove an editor that had not yet been fully initialized. +- Fixed a bug where the Imagetools Plugin didn't update the images atomically. +- Fixed a bug where the Fullscreen Plugin was throwing errors when being used on an inline editor. +- Fixed a bug where drop down menus weren't positioned correctly in inline editors on scroll. +- Fixed a bug with a semicolon missing at the end of the bundled javascript files. +- Fixed a bug in the Table Plugin with cursor navigation inside of tables where the cursor would sometimes jump into an incorrect table cells. +- Fixed a bug where indenting a table that is a list item using the "Increase indent" button would create a nested table. +- Fixed a bug where text nodes containing only whitespace were being wrapped by paragraph elements. +- Fixed a bug where whitespace was being inserted after br tags inside of paragraph tags. +- Fixed a bug where converting an indented paragraph to a list item would cause the list item to have extra padding. +- Fixed a bug where Copy/Paste in an editor with a lot of content would cause the editor to scroll to the top of the content in IE11. +- Fixed a bug with a memory leak in the DragHelper. Path contributed by ben-mckernan. +- Fixed a bug where the advanced tab in the Media Plugin was being shown even if it didn't contain anything. Patch contributed by gabrieeel. +- Fixed an outdated eventname in the EventUtils. Patch contributed by nazar-pc. +- Fixed an issue where the Json.parse function would throw an error when being used on a page with strict CSP settings. +- Fixed so you can place the curser before and after table elements within the editor in Firefox and Edge/IE. + +## 4.7.6 - 2018-01-29 + +### Fixed +- Fixed a bug in the jquery integration where it threw an error saying that "global is not defined". +- Fixed a bug where deleting a table cell whose previous sibling was set to contenteditable false would create a corrupted table. +- Fixed a bug where highlighting text in an unfocused editor did not work correctly in IE11/Edge. +- Fixed a bug where the table resize handles were not being repositioned when activating the Fullscreen Plugin. +- Fixed a bug where the Imagetools Plugin dialog didn't honor editor RTL settings. +- Fixed a bug where block elements weren't being merged correctly if you deleted from after a contenteditable false element to the beginning of another block element. +- Fixed a bug where TinyMCE didn't work with module loaders like webpack. + +## 4.7.5 - 2018-01-22 + +### Fixed +- Fixed bug with the Codesample Plugin where it wasn't possible to edit codesamples when the editor was in inline mode. +- Fixed bug where focusing on the status bar broke the keyboard navigation functionality. +- Fixed bug where an error would be thrown on Edge by the Table Plugin when pasting using the PowerPaste Plugin. +- Fixed bug in the Table Plugin where selecting row border style from the dropdown menu in advanced row properties would throw an error. +- Fixed bug with icons being rendered incorrectly on Chrome on Mac OS. +- Fixed bug in the Textcolor Plugin where the font color and background color buttons wouldn't trigger an ExecCommand event. +- Fixed bug in the Link Plugin where the url field wasn't forced LTR. +- Fixed bug where the Nonbreaking Plugin incorrectly inserted spaces into tables. +- Fixed bug with the inline theme where the toolbar wasn't repositioned on window resize. + +## 4.7.4 - 2017-12-05 + +### Fixed +- Fixed bug in the Nonbreaking Plugin where the nonbreaking_force_tab setting was being ignored. +- Fixed bug in the Table Plugin where changing row height incorrectly converted column widths to pixels. +- Fixed bug in the Table Plugin on Edge and IE11 where resizing the last column after resizing the table would cause invalid column heights. +- Fixed bug in the Table Plugin where keyboard navigation was not normalized between browsers. +- Fixed bug in the Table Plugin where the colorpicker button would show even without defining the colorpicker_callback. +- Fixed bug in the Table Plugin where it wasn't possible to set the cell background color. +- Fixed bug where Firefox would throw an error when intialising an editor on an element that is hidden or not yet added to the DOM. +- Fixed bug where Firefox would throw an error when intialising an editor inside of a hidden iframe. + +## 4.7.3 - 2017-11-23 + +### Added +- Added functionality to open the Codesample Plugin dialog when double clicking on a codesample. Patch contributed by dakuzen. + +### Fixed +- Fixed bug where undo/redo didn't work correctly with some formats and caret positions. +- Fixed bug where the color picker didn't show up in Table Plugin dialogs. +- Fixed bug where it wasn't possible to change the width of a table through the Table Plugin dialog. +- Fixed bug where the Charmap Plugin couldn't insert some special characters. +- Fixed bug where editing a newly inserted link would not actually edit the link but insert a new link next to it. +- Fixed bug where deleting all content in a table cell made it impossible to place the caret into it. +- Fixed bug where the vertical alignment field in the Table Plugin cell properties dialog didn't do anything. +- Fixed bug where an image with a caption showed two sets of resize handles in IE11. +- Fixed bug where pressing the enter button inside of an h1 with contenteditable set to true would sometimes produce a p tag. +- Fixed bug with backspace not working as expected before a noneditable element. +- Fixed bug where operating on tables with invalid rowspans would cause an error to be thrown. +- Fixed so a real base64 representation of the image is available on the blobInfo that the images_upload_handler gets called with. +- Fixed so the image upload tab is available when the images_upload_handler is defined (and not only when the images_upload_url is defined). + +## 4.7.2 - 2017-11-07 + +### Added +- Added newly rewritten Table Plugin. +- Added support for attributes with colon in valid_elements and addValidElements. +- Added support for dailymotion short url in the Media Plugin. Patch contributed by maat8. +- Added support for converting to half pt when converting font size from px to pt. Patch contributed by danny6514. +- Added support for location hash to the Autosave plugin to make it work better with SPAs using hash routing. +- Added support for merging table cells when pasting a table into another table. + +### Changed +- Changed so the language packs are only loaded once. Patch contributed by 0xor1. +- Simplified the css for inline boundaries selection by switching to an attribute selector. + +### Fixed +- Fixed bug where an error would be thrown on editor initialization if the window.getSelection() returned null. +- Fixed bug where holding down control or alt keys made the keyboard navigation inside an inline boundary not work as expected. +- Fixed bug where applying formats in IE11 produced extra, empty paragraphs in the editor. +- Fixed bug where the Word Count Plugin didn't count some mathematical operators correctly. +- Fixed bug where removing an inline editor removed the element that the editor had been initialized on. +- Fixed bug where setting the selection to the end of an editable container caused some formatting problems. +- Fixed bug where an error would be thrown sometimes when an editor was removed because of the selection bookmark was being stored asynchronously. +- Fixed a bug where an editor initialized on an empty list did not contain any valid cursor positions. +- Fixed a bug with the Context Menu Plugin and webkit browsers on Mac where right-clicking inside a table would produce an incorrect selection. +- Fixed bug where the Image Plugin constrain proportions setting wasn't working as expected. +- Fixed bug where deleting the last character in a span with decorations produced an incorrect element when typing. +- Fixed bug where focusing on inline editors made the toolbar flicker when moving between elements quickly. +- Fixed bug where the selection would be stored incorrectly in inline editors when the mouseup event was fired outside the editor body. +- Fixed bug where toggling bold at the end of an inline boundary would toggle off the whole word. +- Fixed bug where setting the skin to false would not stop the loading of some skin css files. +- Fixed bug in mobile theme where pinch-to-zoom would break after exiting the editor. +- Fixed bug where sublists of a fully selected list would not be switched correctly when changing list style. +- Fixed bug where inserting media by source would break the UndoManager. +- Fixed bug where inserting some content into the editor with a specific selection would replace some content incorrectly. +- Fixed bug where selecting all content with ctrl+a in IE11 caused problems with untoggling some formatting. +- Fixed bug where the Search and Replace Plugin left some marker spans in the editor when undoing and redoing after replacing some content. +- Fixed bug where the editor would not get a scrollbar when using the Fullscreen and Autoresize plugins together. +- Fixed bug where the font selector would stop working correctly after selecting fonts three times. +- Fixed so pressing the enter key inside of an inline boundary inserts a br after the inline boundary element. +- Fixed a bug where it wasn't possible to use tab navigation inside of a table that was inside of a list. +- Fixed bug where end_container_on_empty_block would incorrectly remove elements. +- Fixed bug where content_styles weren't added to the Preview Plugin iframe. +- Fixed so the beforeSetContent/beforeGetContent events are preventable. +- Fixed bug where changing height value in Table Plugin advanced tab didn't do anything. +- Fixed bug where it wasn't possible to remove formatting from content in beginning of table cell. + +## 4.7.1 - 2017-10-09 + +### Fixed +- Fixed bug where theme set to false on an inline editor produced an extra div element after the target element. +- Fixed bug where the editor drag icon was misaligned with the branding set to false. +- Fixed bug where doubled menu items were not being removed as expected with the removed_menuitems setting. +- Fixed bug where the Table of contents plugin threw an error when initialized. +- Fixed bug where it wasn't possible to add inline formats to text selected right to left. +- Fixed bug where the paste from plain text mode did not work as expected. +- Fixed so the style previews do not set color and background color when selected. +- Fixed bug where the Autolink plugin didn't work as expected with some formats applied on an empty editor. +- Fixed bug where the Textpattern plugin were throwing errors on some patterns. +- Fixed bug where the Save plugin saved all editors instead of only the active editor. Patch contributed by dannoe. + +## 4.7.0 - 2017-10-03 + +### Added +- Added new mobile ui that is specifically designed for mobile devices. + +### Changed +- Updated the default skin to be more modern and white since white is preferred by most implementations. +- Restructured the default menus to be more similar to common office suites like Google Docs. + +### Fixed +- Fixed so theme can be set to false on both inline and iframe editor modes. +- Fixed bug where inline editor would add/remove the visualblocks css multiple times. +- Fixed bug where selection wouldn't be properly restored when editor lost focus and commands where invoked. +- Fixed bug where toc plugin would generate id:s for headers even though a toc wasn't inserted into the content. +- Fixed bug where is wasn't possible to drag/drop contents within the editor if paste_data_images where set to true. +- Fixed bug where getParam and close in WindowManager would get the first opened window instead of the last opened window. +- Fixed bug where delete would delete between cells inside a table in Firefox. + +## 4.6.7 - 2017-09-18 + +### Added +- Added some missing translations to Image, Link and Help plugins. + +### Fixed +- Fixed bug where paste wasn't working in IOS. +- Fixed bug where the Word Count Plugin didn't count some mathematical operators correctly. +- Fixed bug where inserting a list in a table caused the cell to expand in height. +- Fixed bug where pressing enter in a list located inside of a table deleted list items instead of inserting new list item. +- Fixed bug where copy and pasting table cells produced inconsistent results. +- Fixed bug where initializing an editor with an ID of 'length' would throw an exception. +- Fixed bug where it was possible to split a non merged table cell. +- Fixed bug where copy and pasting a list with a very specific selection into another list would produce a nested list. +- Fixed bug where copy and pasting ordered lists sometimes produced unordered lists. +- Fixed bug where padded elements inside other elements would be treated as empty. +- Fixed so you can resize images inside a figure element. +- Fixed bug where an inline TinyMCE editor initialized on a table did not set selection on load in Chrome. +- Fixed the positioning of the inlite toolbar when the target element wasn't big enough to fit the toolbar. + +## 4.6.6 - 2017-08-30 + +### Fixed +- Fixed so that notifications wrap long text content instead of bleeding outside the notification element. +- Fixed so the content_style css is added after the skin and custom stylesheets. +- Fixed bug where it wasn't possible to remove a table with the Cut button. +- Fixed bug where the center format wasn't getting the same font size as the other formats in the format preview. +- Fixed bug where the wordcount plugin wasn't counting hyphenated words correctly. +- Fixed bug where all content pasted into the editor was added to the end of the editor. +- Fixed bug where enter keydown on list item selection only deleted content and didn't create a new line. +- Fixed bug where destroying the editor while the content css was still loading caused error notifications on Firefox. +- Fixed bug where undoing cut operation in IE11 left some unwanted html in the editor content. +- Fixed bug where enter keydown would throw an error in IE11. +- Fixed bug where duplicate instances of an editor were added to the editors array when using the createEditor API. +- Fixed bug where the formatter applied formats on the wrong content when spellchecker was activated. +- Fixed bug where switching formats would reset font size on child nodes. +- Fixed bug where the table caption element weren't always the first descendant to the table tag. +- Fixed bug where pasting some content into the editor on chrome some newlines were removed. +- Fixed bug where it wasn't possible to remove a list if a list item was a table element. +- Fixed bug where copy/pasting partial selections of tables wouldn't produce a proper table. +- Fixed bug where the searchreplace plugin could not find consecutive spaces. +- Fixed bug where background color wasn't applied correctly on some partially selected contents. + +## 4.6.5 - 2017-08-02 + +### Added +- Added new inline_boundaries_selector that allows you to specify the elements that should have boundaries. +- Added new local upload feature this allows the user to upload images directly from the image dialog. +- Added a new api for providing meta data for plugins. It will show up in the help dialog if it's provided. + +### Fixed +- Fixed so that the notifications created by the notification manager are more screen reader accessible. +- Fixed bug where changing the list format on multiple selected lists didn't change all of the lists. +- Fixed bug where the nonbreaking plugin would insert multiple undo levels when pressing the tab key. +- Fixed bug where delete/backspace wouldn't render a caret when all editor contents where deleted. +- Fixed bug where delete/backspace wouldn't render a caret if the deleted element was a single contentEditable false element. +- Fixed bug where the wordcount plugin wouldn't count words correctly if word where typed after applying a style format. +- Fixed bug where the wordcount plugin would count mathematical formulas as multiple words for example 1+1=2. +- Fixed bug where formatting of triple clicked blocks on Chrome/Safari would result in styles being added outside the visual selection. +- Fixed bug where paste would add the contents to the end of the editor area when inline mode was used. +- Fixed bug where toggling off bold formatting on text entered in a new paragraph would add an extra line break. +- Fixed bug where autolink plugin would only produce a link on every other consecutive link on Firefox. +- Fixed bug where it wasn't possible to select all contents if the content only had one pre element. +- Fixed bug where sizzle would produce lagging behavior on some sites due to repaints caused by feature detection. +- Fixed bug where toggling off inline formats wouldn't include the space on selected contents with leading or trailing spaces. +- Fixed bug where the cut operation in UI wouldn't work in Chrome. +- Fixed bug where some legacy editor initialization logic would throw exceptions about editor settings not being defined. +- Fixed bug where it wasn't possible to apply text color to links if they where part of a non collapsed selection. +- Fixed bug where an exception would be thrown if the user selected a video element and then moved the focus outside the editor. +- Fixed bug where list operations didn't work if there where block elements inside the list items. +- Fixed bug where applying block formats to lists wrapped in block elements would apply to all elements in that wrapped block. + +## 4.6.4 - 2017-06-13 + +### Fixed +- Fixed bug where the editor would move the caret when clicking on the scrollbar next to a content editable false block. +- Fixed bug where the text color select dropdowns wasn't placed correctly when they didn't fit the width of the screen. +- Fixed bug where the default editor line height wasn't working for mixed font size contents. +- Fixed bug where the content css files for inline editors were loaded multiple times for multiple editor instances. +- Fixed bug where the initial value of the font size/font family dropdowns wasn't displayed. +- Fixed bug where the I18n api was not supporting arrays as the translation replacement values. +- Fixed bug where chrome would display "The given range isn't in document." errors for invalid ranges passed to setRng. +- Fixed bug where the compat3x plugin wasn't working since the global tinymce references wasn't resolved correctly. +- Fixed bug where the preview plugin wasn't encoding the base url passed into the iframe contents producing a xss bug. +- Fixed bug where the dom parser/serializer wasn't handling some special elements like noframes, title and xmp. +- Fixed bug where the dom parser/serializer wasn't handling cdata sections with comments inside. +- Fixed bug where the editor would scroll to the top of the editable area if a dialog was closed in inline mode. +- Fixed bug where the link dialog would not display the right rel value if rel_list was configured. +- Fixed bug where the context menu would select images on some platforms but not others. +- Fixed bug where the filenames of images were not retained on dragged and drop into the editor from the desktop. +- Fixed bug where the paste plugin would misrepresent newlines when pasting plain text and having forced_root_block configured. +- Fixed so that the error messages for the imagetools plugin is more human readable. +- Fixed so the internal validate setting for the parser/serializer can't be set from editor initialization settings. + +## 4.6.3 - 2017-05-30 + +### Fixed +- Fixed bug where the arrow keys didn't work correctly when navigating on nested inline boundary elements. +- Fixed bug where delete/backspace didn't work correctly on nested inline boundary elements. +- Fixed bug where image editing didn't work on subsequent edits of the same image. +- Fixed bug where charmap descriptions wouldn't properly wrap if they exceeded the width of the box. +- Fixed bug where the default image upload handler only accepted 200 as a valid http status code. +- Fixed so rel on target=_blank links gets forced with only noopener instead of both noopener and noreferrer. + +## 4.6.2 - 2017-05-23 + +### Fixed +- Fixed bug where the SaxParser would run out of memory on very large documents. +- Fixed bug with formatting like font size wasn't applied to del elements. +- Fixed bug where various api calls would be throwing exceptions if they where invoked on a removed editor instance. +- Fixed bug where the branding position would be incorrect if the editor was inside a hidden tab and then later showed. +- Fixed bug where the color levels feature in the imagetools dialog wasn't working properly. +- Fixed bug where imagetools dialog wouldn't pre-load images from CORS domains, before trying to prepare them for editing. +- Fixed bug where the tab key would move the caret to the next table cell if being pressed inside a list inside a table. +- Fixed bug where the cut/copy operations would loose parent context like the current format etc. +- Fixed bug with format preview not working on invalid elements excluded by valid_elements. +- Fixed bug where blocks would be merged in incorrect order on backspace/delete. +- Fixed bug where zero length text nodes would cause issues with the undo logic if there where iframes present. +- Fixed bug where the font size/family select lists would throw errors if the first node was a comment. +- Fixed bug with csp having to allow local script evaluation since it was used to detect global scope. +- Fixed bug where CSP required a relaxed option for javascript: URLs in unsupported legacy browsers. +- Fixed bug where a fake caret would be rendered for td with the contenteditable=false. +- Fixed bug where typing would be blocked on IE 11 when within a nested contenteditable=true/false structure. + +## 4.6.1 - 2017-05-10 + +### Added +- Added configuration option to list plugin to disable tab indentation. + +### Fixed +- Fixed bug where format change on very specific content could cause the selection to change. +- Fixed bug where TinyMCE could not be lazyloaded through jquery integration. +- Fixed bug where entities in style attributes weren't decoded correctly on paste in webkit. +- Fixed bug where fontsize_formats option had been renamed incorrectly. +- Fixed bug with broken backspace/delete behaviour between contenteditable=false blocks. +- Fixed bug where it wasn't possible to backspace to the previous line with the inline boundaries functionality turned on. +- Fixed bug where is wasn't possible to move caret left and right around a linked image with the inline boundaries functionality turned on. +- Fixed bug where pressing enter after/before hr element threw exception. Patch contributed bradleyke. +- Fixed so the CSS in the visualblocks plugin doesn't overwrite background color. Patch contributed by Christian Rank. +- Fixed bug where multibyte characters weren't encoded correctly. Patch contributed by James Tarkenton. +- Fixed bug where shift-click to select within contenteditable=true fields wasn't working. + +## 4.6.0 - 2017-05-04 + +### Added +- Added an inline boundary caret position feature that makes it easier to type at the beginning/end of links/code elements. +- Added a help plugin that adds a button and a dialog showing the editor shortcuts and loaded plugins. +- Added an inline_boundaries option that allows you to disable the inline boundary feature if it's not desired. +- Added a new ScrollIntoView event that allows you to override the default scroll to element behavior. +- Added role and aria- attributes as valid elements in the default valid elements config. +- Added new internal flag for PastePreProcess/PastePostProcess this is useful to know if the paste was coming from an external source. +- Added new ignore function to UndoManager this works similar to transact except that it doesn't add an undo level by default. + +### Fixed +- Fixed so that urls gets retained for images when being edited. This url is then passed on to the upload handler. +- Fixed so that the editors would be initialized on readyState interactive instead of complete. +- Fixed so that the init event of the editor gets fired once all contentCSS files have been properly loaded. +- Fixed so that width/height of the editor gets taken from the textarea element if it's explicitly specified in styles. +- Fixed so that keep_styles set to false no longer clones class/style from the previous paragraph on enter. +- Fixed so that the default line-height is 1.2em to avoid zwnbsp characters from producing text rendering glitches on Windows. +- Fixed so that loading errors of content css gets presented by a notification message. +- Fixed so figure image elements can be linked when selected this wraps the figure image in a anchor element. +- Fixed bug where it wasn't possible to copy/paste rows with colspans by using the table copy/paste feature. +- Fixed bug where the protect setting wasn't properly applied to header/footer parts when using the fullpage plugin. +- Fixed bug where custom formats that specified upper case element names where not applied correctly. +- Fixed bug where some screen readers weren't reading buttons due to an aria specific fix for IE 8. +- Fixed bug where cut wasn't working correctly on iOS due to it's clipboard API not working correctly. +- Fixed bug where Edge would paste div elements instead of paragraphs when pasting plain text. +- Fixed bug where the textpattern plugin wasn't dealing with trailing punctuations correctly. +- Fixed bug where image editing would some times change the image format from jpg to png. +- Fixed bug where some UI elements could be inserted into the toolbar even if they where not registered. +- Fixed bug where it was possible to click the TD instead of the character in the character map and that caused an exception. +- Fixed bug where the font size/font family dropdowns would sometimes show an incorrect value due to css not being loaded in time. +- Fixed bug with the media plugin inserting undefined instead of retaining size when media_dimensions was set to false. +- Fixed bug with deleting images when forced_root_blocks where set to false. +- Fixed bug where input focus wasn't properly handled on nested content editable elements. +- Fixed bug where Chrome/Firefox would throw an exception when selecting images due to recent change of setBaseAndExtent support. +- Fixed bug where malformed blobs would throw exceptions now they are simply ignored. +- Fixed bug where backspace/delete wouldn't work properly in some cases where all contents was selected in WebKit. +- Fixed bug with Angular producing errors since it was expecting events objects to be patched with their custom properties. +- Fixed bug where the formatter would apply formatting to spellchecker errors now all bogus elements are excluded. +- Fixed bug with backspace/delete inside table caption elements wouldn't behave properly on IE 11. +- Fixed bug where typing after a contenteditable false inline element could move the caret to the end of that element. +- Fixed bug where backspace before/after contenteditable false blocks wouldn't properly remove the right element. +- Fixed bug where backspace before/after contenteditable false inline elements wouldn't properly empty the current block element. +- Fixed bug where vertical caret navigation with a custom line-height would sometimes match incorrect positions. +- Fixed bug with paste on Edge where character encoding wasn't handled properly due to a browser bug. +- Fixed bug with paste on Edge where extra fragment data was inserted into the contents when pasting. +- Fixed bug with pasting contents when having a whole block element selected on WebKit could cause WebKit spans to appear. +- Fixed bug where the visualchars plugin wasn't working correctly showing invisible nbsp characters. +- Fixed bug where browsers would hang if you tried to load some malformed html contents. +- Fixed bug where the init call promise wouldn't resolve if the specified selector didn't find any matching elements. +- Fixed bug where the Schema isValidChild function was case sensitive. + +### Removed +- Dropped support for IE 8-10 due to market share and lack of support from Microsoft. See tinymce docs for details. + +## 4.5.3 - 2017-02-01 + +### Added +- Added keyboard navigation for menu buttons when the menu is in focus. +- Added api to the list plugin for setting custom classes/attributes on lists. +- Added validation for the anchor plugin input field according to W3C id naming specifications. + +### Fixed +- Fixed bug where media placeholders were removed after resize with the forced_root_block setting set to false. +- Fixed bug where deleting selections with similar sibling nodes sometimes deleted the whole document. +- Fixed bug with inlite theme where several toolbars would appear scrolling when more than one instance of the editor was in use. +- Fixed bug where the editor would throw error with the fontselect plugin on hidden editor instances in Firefox. +- Fixed bug where the background color would not stretch to the font size. +- Fixed bug where font size would be removed when changing background color. +- Fixed bug where the undomanager trimmed away whitespace between nodes on undo/redo. +- Fixed bug where media_dimensions=false in media plugin caused the editor to throw an error. +- Fixed bug where IE was producing font/u elements within links on paste. +- Fixed bug where some button tooltips were broken when compat3x was in use. +- Fixed bug where backspace/delete/typeover would remove the caption element. +- Fixed bug where powerspell failed to function when compat3x was enabled. +- Fixed bug where it wasn't possible to apply sub/sup on text with large font size. +- Fixed bug where pre tags with spaces weren't treated as content. +- Fixed bug where Meta+A would select the entire document instead of all contents in nested ce=true elements. + +## 4.5.2 - 2017-01-04 + +### Fixed +- Added missing keyboard shortcut description for the underline menu item in the format menu. +- Fixed bug where external blob urls wasn't properly handled by editor upload logic. Patch contributed by David Oviedo. +- Fixed bug where urls wasn't treated as a single word by the wordcount plugin. +- Fixed bug where nbsp characters wasn't treated as word delimiters by the wordcount plugin. +- Fixed bug where editor instance wasn't properly passed to the format preview logic. Patch contributed by NullQuery. +- Fixed bug where the fake caret wasn't hidden when you moved selection to a cE=false element. +- Fixed bug where it wasn't possible to edit existing code sample blocks. +- Fixed bug where it wasn't possible to delete editor contents if the selection included an empty block. +- Fixed bug where the formatter wasn't expanding words on some international characters. Patch contributed by Martin Larochelle. +- Fixed bug where the open link feature wasn't working correctly on IE 11. +- Fixed bug where enter before/after a cE=false block wouldn't properly padd the paragraph with an br element. +- Fixed so font size and font family select boxes always displays a value by using the runtime style as a fallback. +- Fixed so missing plugins will be logged to console as warnings rather than halting the initialization of the editor. +- Fixed so splitbuttons become normal buttons in advlist plugin if styles are empty. Patch contributed by René Schleusner. +- Fixed so you can multi insert rows/cols by selecting table cells and using insert rows/columns. + +## 4.5.1 - 2016-12-07 + +### Fixed +- Fixed bug where the lists plugin wouldn't initialize without the advlist plugins if served from cdn. +- Fixed bug where selectors with "*" would cause the style format preview to throw an error. +- Fixed bug with toggling lists off on lists with empty list items would throw an error. +- Fixed bug where editing images would produce non existing blob uris. +- Fixed bug where the offscreen toc selection would be treated as the real toc element. +- Fixed bug where the aria level attribute for element path would have an incorrect start index. +- Fixed bug where the offscreen selection of cE=false that where very wide would be shown onscreen. Patch contributed by Steven Bufton. +- Fixed so the default_link_target gets applied to links created by the autolink plugin. +- Fixed so that the name attribute gets removed by the anchor plugin if editing anchors. + +## 4.5.0 - 2016-11-23 + +### Added +- Added new toc plugin allows you to insert table of contents based on editor headings. +- Added new auto complete menu to all url fields. Adds history, link to anchors etc. +- Added new sidebar api that allows you to add custom sidebar panels and buttons to toggle these. +- Added new insert menu button that allows you to have multiple insert functions under the same menu button. +- Added new open link feature to ctrl+click, alt+enter and context menu. +- Added new media_embed_handler option to allow the media plugin to be populated with custom embeds. +- Added new support for editing transparent images using the image tools dialog. +- Added new images_reuse_filename option to allow filenames of images to be retained for upload. +- Added new security feature where links with target="_blank" will by default get rel="noopener noreferrer". +- Added new allow_unsafe_link_target to allow you to opt-out of the target="_blank" security feature. +- Added new style_formats_autohide option to automatically hide styles based on context. +- Added new codesample_content_css option to specify where the code sample prism css is loaded from. +- Added new support for Japanese/Chinese word count following the unicode standards on this. +- Added new fragmented undo levels this dramatically reduces flicker on contents with iframes. +- Added new live previews for complex elements like table or lists. + +### Fixed +- Fixed bug where it wasn't possible to properly tab between controls in a dialog with a disabled form item control. +- Fixed bug where firefox would generate a rectangle on elements produced after/before a cE=false elements. +- Fixed bug with advlist plugin not switching list element format properly in some edge cases. +- Fixed bug where col/rowspans wasn't correctly computed by the table plugin in some cases. +- Fixed bug where the table plugin would thrown an error if object_resizing was disabled. +- Fixed bug where some invalid markup would cause issues when running in XHTML mode. Patch contributed by Charles Bourasseau. +- Fixed bug where the fullscreen class wouldn't be removed properly when closing dialogs. +- Fixed bug where the PastePlainTextToggle event wasn't fired by the paste plugin when the state changed. +- Fixed bug where table the row type wasn't properly updated in table row dialog. Patch contributed by Matthias Balmer. +- Fixed bug where select all and cut wouldn't place caret focus back to the editor in WebKit. Patch contributed by Daniel Jalkut. +- Fixed bug where applying cell/row properties to multiple cells/rows would reset other unchanged properties. +- Fixed bug where some elements in the schema would have redundant/incorrect children. +- Fixed bug where selector and target options would cause issues if used together. +- Fixed bug where drag/drop of images from desktop on chrome would thrown an error. +- Fixed bug where cut on WebKit/Blink wouldn't add an undo level. +- Fixed bug where IE 11 would scroll to the cE=false elements when they where selected. +- Fixed bug where keys like F5 wouldn't work when a cE=false element was selected. +- Fixed bug where the undo manager wouldn't stop the typing state when commands where executed. +- Fixed bug where unlink on wrapped links wouldn't work properly. +- Fixed bug with drag/drop of images on WebKit where the image would be deleted form the source editor. +- Fixed bug where the visual characters mode would be disabled when contents was extracted from the editor. +- Fixed bug where some browsers would toggle of formats applied to the caret when clicking in the editor toolbar. +- Fixed bug where the custom theme function wasn't working correctly. +- Fixed bug where image option for custom buttons required you to have icon specified as well. +- Fixed bug where the context menu and contextual toolbars would be visible at the same time and sometimes overlapping. +- Fixed bug where the noneditable plugin would double wrap elements when using the noneditable_regexp option. +- Fixed bug where tables would get padding instead of margin when you used the indent button. +- Fixed bug where the charmap plugin wouldn't properly insert non breaking spaces. +- Fixed bug where the color previews in color input boxes wasn't properly updated. +- Fixed bug where the list items of previous lists wasn't merged in the right order. +- Fixed bug where it wasn't possible to drag/drop inline-block cE=false elements on IE 11. +- Fixed bug where some table cell merges would produce incorrect rowspan/colspan. +- Fixed so the font size of the editor defaults to 14px instead of 11px this can be overridden by custom css. +- Fixed so wordcount is debounced to reduce cpu hogging on larger texts. +- Fixed so tinymce global gets properly exported as a module when used with some module bundlers. +- Fixed so it's possible to specify what css properties you want to preview on specific formats. +- Fixed so anchors are contentEditable=false while within the editor. +- Fixed so selected contents gets wrapped in a inline code element by the codesample plugin. +- Fixed so conditional comments gets properly stripped independent of case. Patch contributed by Georgii Dolzhykov. +- Fixed so some escaped css sequences gets properly handled. Patch contributed by Georgii Dolzhykov. +- Fixed so notifications with the same message doesn't get displayed at the same time. +- Fixed so F10 can be used as an alternative key to focus to the toolbar. +- Fixed various api documentation issues and typos. + +### Removed +- Removed layer plugin since it wasn't really ported from 3.x and there doesn't seem to be much use for it. +- Removed moxieplayer.swf from the media plugin since it wasn't used by the media plugin. +- Removed format state from the advlist plugin to be more consistent with common word processors. + +## 4.4.3 - 2016-09-01 + +### Fixed +- Fixed bug where copy would produce an exception on Chrome. +- Fixed bug where deleting lists on IE 11 would merge in correct text nodes. +- Fixed bug where deleting partial lists with indentation wouldn't cause proper normalization. + +## 4.4.2 - 2016-08-25 + +### Added +- Added new importcss_exclusive option to disable unique selectors per group. +- Added new group specific selector_converter option to importcss plugin. +- Added new codesample_languages option to apply custom languages to codesample plugin. +- Added new codesample_dialog_width/codesample_dialog_height options. + +### Fixed +- Fixed bug where fullscreen button had an incorrect keyboard shortcut. +- Fixed bug where backspace/delete wouldn't work correctly from a block to a cE=false element. +- Fixed bug where smartpaste wasn't detecting links with special characters in them like tilde. +- Fixed bug where the editor wouldn't get proper focus if you clicked on a cE=false element. +- Fixed bug where it wasn't possible to copy/paste table rows that had merged cells. +- Fixed bug where merging cells could some times produce invalid col/rowspan attibute values. +- Fixed bug where getBody would sometimes thrown an exception now it just returns null if the iframe is clobbered. +- Fixed bug where drag/drop of cE=false element wasn't properly constrained to viewport. +- Fixed bug where contextmenu on Mac would collapse any selection to a caret. +- Fixed bug where rtl mode wasn't rendered properly when loading a language pack with the rtl flag. +- Fixed bug where Kamer word bounderies would be stripped from contents. +- Fixed bug where lists would sometimes render two dots or numbers on the same line. +- Fixed bug where the skin_url wasn't used by the inlite theme. +- Fixed so data attributes are ignored when comparing formats in the formatter. +- Fixed so it's possible to disable inline toolbars in the inlite theme. +- Fixed so template dialog gets resized if it doesn't fit the window viewport. + +## 4.4.1 - 2016-07-26 + +### Added +- Added smart_paste option to paste plugin to allow disabling the paste behavior if needed. + +### Fixed +- Fixed bug where png urls wasn't properly detected by the smart paste logic. +- Fixed bug where the element path wasn't working properly when multiple editor instances where used. +- Fixed bug with creating lists out of multiple paragraphs would just create one list item instead of multiple. +- Fixed bug where scroll position wasn't properly handled by the inlite theme to place the toolbar properly. +- Fixed bug where multiple instances of the editor using the inlite theme didn't render the toolbar properly. +- Fixed bug where the shortcut label for fullscreen mode didn't match the actual shortcut key. +- Fixed bug where it wasn't possible to select cE=false blocks using touch devices on for example iOS. +- Fixed bug where it was possible to select the child image within a cE=false on IE 11. +- Fixed so inserts of html containing lists doesn't merge with any existing lists unless it's a paste operation. + +## 4.4.0 - 2016-06-30 + +### Added +- Added new inlite theme this is a more lightweight inline UI. +- Added smarter paste logic that auto detects urls in the clipboard and inserts images/links based on that. +- Added a better image resize algorithm for better image quality in the imagetools plugin. + +### Fixed +- Fixed bug where it wasn't possible to drag/dropping cE=false elements on FF. +- Fixed bug where backspace/delete before/after a cE=false block would produce a new paragraph. +- Fixed bug where list style type css property wasn't preserved when indenting lists. +- Fixed bug where merging of lists where done even if the list style type was different. +- Fixed bug where the image_dataimg_filter function wasn't used when pasting images. +- Fixed bug where nested editable within a non editable element would cause scroll on focus in Chrome. +- Fixed so invalid targets for inline mode is blocked on initialization. We only support elements that can have children. + +## 4.3.13 - 2016-06-08 + +### Added +- Added characters with a diacritical mark to charmap plugin. Patch contributed by Dominik Schilling. +- Added better error handling if the image proxy service would produce errors. + +### Fixed +- Fixed issue with pasting list items into list items would produce nested list rather than a merged list. +- Fixed bug where table selection could get stuck in selection mode for inline editors. +- Fixed bug where it was possible to place the caret inside the resize grid elements. +- Fixed bug where it wasn't possible to place in elements horizontally adjacent cE=false blocks. +- Fixed bug where multiple notifications wouldn't be properly placed on screen. +- Fixed bug where multiple editor instance of the same id could be produces in some specific integrations. + +## 4.3.12 - 2016-05-10 + +### Fixed +- Fixed bug where focus calls couldn't be made inside the editors PostRender event handler. +- Fixed bug where some translations wouldn't work as expected due to a bug in editor.translate. +- Fixed bug where the node change event could fire with a node out side the root of the editor. +- Fixed bug where Chrome wouldn't properly present the keyboard paste clipboard details when paste was clicked. +- Fixed bug where merged cells in tables couldn't be selected from right to left. +- Fixed bug where insert row wouldn't properly update a merged cells rowspan property. +- Fixed bug where the color input boxes preview field wasn't properly set on initialization. +- Fixed bug where IME composition inside table cells wouldn't work as expected on IE 11. +- Fixed so all shadow dom support is under and experimental flag due to flaky browser support. + +## 4.3.11 - 2016-04-25 + +### Fixed +- Fixed bug where it wasn't possible to insert empty blocks though the API unless they where padded. +- Fixed bug where you couldn't type the Euro character on Windows. +- Fixed bug where backspace/delete from a cE=false element to a text block didn't work properly. +- Fixed bug where the text color default grid would render incorrectly. +- Fixed bug where the codesample plugin wouldn't load the css in the editor for multiple editors. +- Fixed so the codesample plugin textarea gets focused by default. + +## 4.3.10 - 2016-04-12 + +### Fixed +- Fixed bug where the key "y" on WebKit couldn't be entered due to conflict with keycode for F10 on keypress. + +## 4.3.9 - 2016-04-12 + +### Added +- Added support for focusing the contextual toolbars using keyboard. +- Added keyboard support for slider UI controls. You can no increase/decrease using arrow keys. +- Added url pattern matching for Dailymotion to media plugin. Patch contributed by Bertrand Darbon. +- Added body_class to template plugin preview. Patch contributed by Milen Petrinski. +- Added options to better override textcolor pickers with custom colors. Patch contributed by Xavier Boubert. +- Added visual arrows to inline contextual toolbars so that they point to the element being active. + +### Changed +- Changed the Meta+Shift+F shortcut to Ctrl+Shift+F since Czech, Slovak, Polish languages used the first one for input. + +### Fixed +- Fixed so toolbars for tables or other larger elements get better positioned below the scrollable viewport. +- Fixed bug where it was possible to click links inside cE=false blocks. +- Fixed bug where event targets wasn't properly handled in Safari Technical Preview. +- Fixed bug where drag/drop text in FF 45 would make the editor caret invisible. +- Fixed bug where the remove state wasn't properly set on editor instances when detected as clobbered. +- Fixed bug where offscreen selection of some cE=false elements would render onscreen. Patch contributed by Steven Bufton +- Fixed bug where enter would clone styles out side the root on editors inside a span. Patch contributed by ChristophKaser. +- Fixed bug where drag/drop of images into the editor didn't work correctly in FF. +- Fixed so the first item in panels for the imagetools dialog gets proper keyboard focus. + +## 4.3.8 - 2016-03-15 + +### Fixed +- Fixed bug where inserting HR at the end of a block element would produce an extra empty block. +- Fixed bug where links would be clickable when readonly mode was enabled. +- Fixed bug where the formatter would normalize to the wrong node on very specific content. +- Fixed bug where some nested list items couldn't be indented properly. +- Fixed bug where links where clickable in the preview dialog. +- Fixed so the alt attribute doesn't get padded with an empty value by default. +- Fixed so nested alignment works more correctly. You will now alter the alignment to the closest block parent. + +## 4.3.7 - 2016-03-02 + +### Fixed +- Fixed bug where incorrect icons would be rendered for imagetools edit and color levels. +- Fixed bug where navigation using arrow keys inside a SelectBox didn't move up/down. +- Fixed bug where the visualblocks plugin would render borders round internal UI elements. + +## 4.3.6 - 2016-03-01 + +### Added +- Added new paste_remember_plaintext_info option to allow a global disable of the plain text mode notification. +- Added new PastePlainTextToggle event that fires when plain text mode toggles on/off. + +### Fixed +- Fixed bug where it wasn't possible to select media elements since the drag logic would snap it to mouse cursor. +- Fixed bug where it was hard to place the caret inside nested cE=true elements when the outer cE=false element was focused. +- Fixed bug where editors wouldn't properly initialize if both selector and mode where used. +- Fixed bug where IME input inside table cells would switch the IME off. +- Fixed bug where selection inside the first table cell would cause the whole table cell to get selected. +- Fixed bug where error handling of images being uploaded wouldn't properly handle faulty statuses. +- Fixed bug where inserting contents before a HR would cause an exception to be thrown. +- Fixed bug where copy/paste of Excel data would be inserted as an image. +- Fixed caret position issues with copy/paste of inline block cE=false elements. +- Fixed issues with various menu item focus bugs in Chrome. Where the focused menu bar item wasn't properly blurred. +- Fixed so the notifications have a solid background since it would be hard to read if there where text under it. +- Fixed so notifications gets animated similar to the ones used by dialogs. +- Fixed so larger images that gets pasted is handled better. +- Fixed so the window close button is more uniform on various platform and also increased it's hit area. + +## 4.3.5 - 2016-02-11 + +Npm version bump due to package not being fully updated. + +## 4.3.4 - 2016-02-11 + +### Added +- Added new OpenWindow/CloseWindow events that gets fired when windows open/close. +- Added new NewCell/NewRow events that gets fired when table cells/rows are created. +- Added new Promise return value to tinymce.init makes it easier to handle initialization. + +### Fixed +- Fixed various bugs with drag/drop of contentEditable:false elements. +- Fixed bug where deleting of very specific nested list items would result in an odd list. +- Fixed bug where lists would get merged with adjacent lists outside the editable inline root. +- Fixed bug where MS Edge would crash when closing a dialog then clicking a menu item. +- Fixed bug where table cell selection would add undo levels. +- Fixed bug where table cell selection wasn't removed when inline editor where removed. +- Fixed bug where table cell selection wouldn't work properly on nested tables. +- Fixed bug where table merge menu would be available when merging between thead and tbody. +- Fixed bug where table row/column resize wouldn't get properly removed when the editor was removed. +- Fixed bug where Chrome would scroll to the editor if there where a empty hash value in document url. +- Fixed bug where the cache suffix wouldn't work correctly with the importcss plugin. +- Fixed bug where selection wouldn't work properly on MS Edge on Windows Phone 10. +- Fixed so adjacent pre blocks gets joined into one pre block since that seems like the user intent. +- Fixed so events gets properly dispatched in shadow dom. Patch provided by Nazar Mokrynskyi. + +### Removed +- Removed the jQuery version the jQuery plugin is now moved into the main package. +- Removed jscs from build process since eslint can now handle code style checking. + +## 4.3.3 - 2016-01-14 + +### Added +- Added new table_resize_bars configuration setting. This setting allows you to disable the table resize bars. +- Added new beforeInitialize event to tinymce.util.XHR lets you modify XHR properties before open. Patch contributed by Brent Clintel. +- Added new autolink_pattern setting to autolink plugin. Enables you to override the default autolink formats. Patch contributed by Ben Tiedt. +- Added new charmap option that lets you override the default charmap of the charmap plugin. +- Added new charmap_append option that lets you add new characters to the default charmap of the charmap plugin. +- Added new insertCustomChar event that gets fired when a character is inserted by the charmap plugin. + +### Fixed +- Fixed bug where table cells started with a superfluous   in IE10+. +- Fixed bug where table plugin would retain all BR tags when cells were merged. +- Fixed bug where media plugin would strip underscores from youtube urls. +- Fixed bug where IME input would fail on IE 11 if you typed within a table. +- Fixed bug where double click selection of a word would remove the space before the word on insert contents. +- Fixed bug where table plugin would produce exceptions when hovering tables with invalid structure. +- Fixed bug where fullscreen wouldn't scroll back to it's original position when untoggled. +- Fixed so the template plugins templates setting can be a function that gets a callback that can provide templates. + +## 4.3.2 - 2015-12-14 + +### Fixed +- Fixed bug where the resize bars for table cells were not affected by the object_resizing property. +- Fixed bug where the contextual table toolbar would appear incorrectly if TinyMCE was initialized inline inside a table. +- Fixed bug where resizing table cells did not fire a node change event or add an undo level. +- Fixed bug where double click selection of text on IE 11 wouldn't work properly. +- Fixed bug where codesample plugin would incorrectly produce br elements inside code elements. +- Fixed bug where media plugin would strip dashes from youtube urls. +- Fixed bug where it was possible to move the caret into the table resize bars. +- Fixed bug where drag/drop into a cE=false element was possible on IE. + +## 4.3.1 - 2015-11-30 + +### Fixed +- Fixed so it's possible to disable the table inline toolbar by setting it to false or an empty string. +- Fixed bug where it wasn't possible to resize some tables using the drag handles. +- Fixed bug where unique id:s would clash for multiple editor instances and cE=false selections. +- Fixed bug where the same plugin could be initialized multiple times. +- Fixed bug where the table inline toolbars would be displayed at the same time as the image toolbars. +- Fixed bug where the table selection rect wouldn't be removed when selecting another control element. + +## 4.3.0 - 2015-11-23 + +### Added +- Added new table column/row resize support. Makes it a lot more easy to resize the columns/rows in a table. +- Added new table inline toolbar. Makes it easier to for example add new rows or columns to a table. +- Added new notification API. Lets you display floating notifications to the end user. +- Added new codesample plugin that lets you insert syntax highlighted pre elements into the editor. +- Added new image_caption to images. Lets you create images with captions using a HTML5 figure/figcaption elements. +- Added new live previews of embeded videos. Lets you play the video right inside the editor. +- Added new setDirty method and "dirty" event to the editor. Makes it easier to track the dirty state change. +- Added new setMode method to Editor instances that lets you dynamically switch between design/readonly. +- Added new core support for contentEditable=false elements within the editor overrides the browsers broken behavior. + +### Changed +- Rewrote the noneditable plugin to use the new contentEditable false core logic. + +### Fixed +- Fixed so the dirty state doesn't set to false automatically when the undo index is set to 0. +- Fixed the Selection.placeCaretAt so it works better on IE when the coordinate is between paragraphs. +- Fixed bug where data-mce-bogus="all" element contents where counted by the word count plugin. +- Fixed bug where contentEditable=false elements would be indented by the indent buttons. +- Fixed bug where images within contentEditable=false would be selected in WebKit on mouse click. +- Fixed bug in DOMUntils split method where the replacement parameter wouldn't work on specific cases. +- Fixed bug where the importcss plugin would import classes from the skin content css file. +- Fixed so all button variants have a wrapping span for it's text to make it easier to skin. +- Fixed so it's easier to exit pre block using the arrow keys. +- Fixed bug where listboxes with fix widths didn't render correctly. + +## 4.2.8 - 2015-11-13 + +### Fixed +- Fixed bug where it was possible to delete tables as the inline root element if all columns where selected. +- Fixed bug where the UI buttons active state wasn't properly updated due to recent refactoring of that logic. + +## 4.2.7 - 2015-10-27 + +### Fixed +- Fixed bug where backspace/delete would remove all formats on the last paragraph character in WebKit/Blink. +- Fixed bug where backspace within a inline format element with a bogus caret container would move the caret. +- Fixed bug where backspace/delete on selected table cells wouldn't add an undo level. +- Fixed bug where script tags embedded within the editor could sometimes get a mce- prefix prepended to them +- Fixed bug where validate: false option could produce an error to be thrown from the Serialization step. +- Fixed bug where inline editing of a table as the root element could let the user delete that table. +- Fixed bug where inline editing of a table as the root element wouldn't properly handle enter key. +- Fixed bug where inline editing of a table as the root element would normalize the selection incorrectly. +- Fixed bug where inline editing of a list as the root element could let the user delete that list. +- Fixed bug where inline editing of a list as the root element could let the user split that list. +- Fixed bug where resize handles would be rendered on editable root elements such as table. + +## 4.2.6 - 2015-09-28 + +### Added +- Added capability to set request headers when using XHRs. +- Added capability to upload local images automatically default delay is set to 30 seconds after editing images. +- Added commands ids mceEditImage, mceAchor and mceMedia to be avaiable from execCommand. +- Added Edge browser to saucelabs grunt task. Patch contributed by John-David Dalton. + +### Fixed +- Fixed bug where blob uris not produced by tinymce would produce HTML invalid markup. +- Fixed bug where selection of contents of a nearly empty editor in Edge would sometimes fail. +- Fixed bug where color styles woudln't be retained on copy/paste in Blink/Webkit. +- Fixed bug where the table plugin would throw an error when inserting rows after a child table. +- Fixed bug where the template plugin wouldn't handle functions as variable replacements. +- Fixed bug where undo/redo sometimes wouldn't work properly when applying formatting collapsed ranges. +- Fixed bug where shift+delete wouldn't do a cut operation on Blink/WebKit. +- Fixed bug where cut action wouldn't properly store the before selection bookmark for the undo level. +- Fixed bug where backspace in side an empty list element on IE would loose editor focus. +- Fixed bug where the save plugin wouldn't enable the buttons when a change occurred. +- Fixed bug where Edge wouldn't initialize the editor if a document.domain was specified. +- Fixed bug where enter key before nested images would sometimes not properly expand the previous block. +- Fixed bug where the inline toolbars wouldn't get properly hidden when blurring the editor instance. +- Fixed bug where Edge would paste Chinese characters on some Windows 10 installations. +- Fixed bug where IME would loose focus on IE 11 due to the double trailing br bug fix. +- Fixed bug where the proxy url in imagetools was incorrect. Patch contributed by Wong Ho Wang. + +## 4.2.5 - 2015-08-31 + +### Added +- Added fullscreen capability to embedded youtube and vimeo videos. + +### Fixed +- Fixed bug where the uploadImages call didn't work on IE 10. +- Fixed bug where image place holders would be uploaded by uploadImages call. +- Fixed bug where images marked with bogus would be uploaded by the uploadImages call. +- Fixed bug where multiple calls to uploadImages would result in decreased performance. +- Fixed bug where pagebreaks were editable to imagetools patch contributed by Rasmus Wallin. +- Fixed bug where the element path could cause too much recursion exception. +- Fixed bug for domains containing ".min". Patch contributed by Loïc Février. +- Fixed so validation of external links to accept a number after www. Patch contributed by Victor Carvalho. +- Fixed so the charmap is exposed though execCommand. Patch contributed by Matthew Will. +- Fixed so that the image uploads are concurrent for improved performance. +- Fixed various grammar problems in inline documentation. Patches provided by nikolas. + +## 4.2.4 - 2015-08-17 + +### Added +- Added picture as a valid element to the HTML 5 schema. Patch contributed by Adam Taylor. + +### Fixed +- Fixed bug where contents would be duplicated on drag/drop within the same editor. +- Fixed bug where floating/alignment of images on Edge wouldn't work properly. +- Fixed bug where it wasn't possible to drag images on IE 11. +- Fixed bug where image selection on Edge would sometimes fail. +- Fixed bug where contextual toolbars icons wasn't rendered properly when using the toolbar_items_size. +- Fixed bug where searchreplace dialog doesn't get prefilled with the selected text. +- Fixed bug where fragmented matches wouldn't get properly replaced by the searchreplace plugin. +- Fixed bug where enter key wouldn't place the caret if was after a trailing space within an inline element. +- Fixed bug where the autolink plugin could produce multiple links for the same text on Gecko. +- Fixed bug where EditorUpload could sometimes throw an exception if the blob wasn't found. +- Fixed xss issues with media plugin not properly filtering out some script attributes. + +## 4.2.3 - 2015-07-30 + +### Fixed +- Fixed bug where image selection wasn't possible on Edge due to incompatible setBaseAndExtend API. +- Fixed bug where image blobs urls where not properly destroyed by the imagetools plugin. +- Fixed bug where keyboard shortcuts wasn't working correctly on IE 8. +- Fixed skin issue where the borders of panels where not visible on IE 8. + +## 4.2.2 - 2015-07-22 + +### Fixed +- Fixed bug where float panels were not being hidden on inline editor blur when fixed_toolbar_container config option was in use. +- Fixed bug where combobox states wasn't properly updated if contents where updated without keyboard. +- Fixed bug where pasting into textbox or combobox would move the caret to the end of text. +- Fixed bug where removal of bogus span elements before block elements would remove whitespace between nodes. +- Fixed bug where repositioning of inline toolbars where async and producing errors if the editor was removed from DOM to early. Patch by iseulde. +- Fixed bug where element path wasn't working correctly. Patch contributed by iseulde. +- Fixed bug where menus wasn't rendered correctly when custom images where added to a menu. Patch contributed by Naim Hammadi. + +## 4.2.1 - 2015-06-29 + +### Fixed +- Fixed bug where back/forward buttons in the browser would render blob images as broken images. +- Fixed bug where Firefox would throw regexp to big error when replacing huge base64 chunks. +- Fixed bug rendering issues with resize and context toolbars not being placed properly until next animation frame. +- Fixed bug where the rendering of the image while cropping would some times not be centered correctly. +- Fixed bug where listbox items with submenus would me selected as active. +- Fixed bug where context menu where throwing an error when rendering. +- Fixed bug where resize both option wasn't working due to resent addClass API change. Patch contributed by Jogai. +- Fixed bug where a hideAll call for container rendered inline toolbars would throw an error. +- Fixed bug where onclick event handler on combobox could cause issues if element.id was a function by some polluting libraries. +- Fixed bug where listboxes wouldn't get proper selected sub menu item when using link_list or image_list. +- Fixed so the UI controls are as wide as 4.1.x to avoid wrapping controls in toolbars. +- Fixed so the imagetools dialog is adaptive for smaller screen sizes. + +## 4.2.0 - 2015-06-25 + +### Added +- Added new flat default skin to make the UI more modern. +- Added new imagetools plugin, lets you crop/resize and apply filters to images. +- Added new contextual toolbars support to the API lets you add floating toolbars for specific CSS selectors. +- Added new promise feature fill as tinymce.util.Promise. +- Added new built in image upload feature lets you upload any base64 encoded image within the editor as files. + +### Fixed +- Fixed bug where resize handles would appear in the right position in the wrong editor when switching between resizable content in different inline editors. +- Fixed bug where tables would not be inserted in inline mode due to previous float panel fix. +- Fixed bug where floating panels would remain open when focus was lost on inline editors. +- Fixed bug where cut command on Chrome would thrown a browser security exception. +- Fixed bug where IE 11 sometimes would report an incorrect size for images in the image dialog. +- Fixed bug where it wasn't possible to remove inline formatting at the end of block elements. +- Fixed bug where it wasn't possible to delete table cell contents when cell selection was vertical. +- Fixed bug where table cell wasn't emptied from block elements if delete/backspace where pressed in empty cell. +- Fixed bug where cmd+shift+arrow didn't work correctly on Firefox mac when selecting to start/end of line. +- Fixed bug where removal of bogus elements would sometimes remove whitespace between nodes. +- Fixed bug where the resize handles wasn't updated when the main window was resized. +- Fixed so script elements gets removed by default to prevent possible XSS issues in default config implementations. +- Fixed so the UI doesn't need manual reflows when using non native layout managers. +- Fixed so base64 encoded images doesn't slow down the editor on modern browsers while editing. +- Fixed so all UI elements uses touch events to improve mobile device support. +- Removed the touch click quirks patch for iOS since it did more harm than good. +- Removed the non proportional resize handles since. Unproportional resize can still be done by holding the shift key. + +## 4.1.10 - 2015-05-05 + +### Fixed +- Fixed bug where plugins loaded with compat3x would sometimes throw errors when loading using the jQuery version. +- Fixed bug where extra empty paragraphs would get deleted in WebKit/Blink due to recent Quriks fix. +- Fixed bug where the editor wouldn't work properly on IE 12 due to some required browser sniffing. +- Fixed bug where formatting shortcut keys where interfering with Mac OS X screenshot keys. +- Fixed bug where the caret wouldn't move to the next/previous line boundary on Cmd+Left/Right on Gecko. +- Fixed bug where it wasn't possible to remove formats from very specific nested contents. +- Fixed bug where undo levels wasn't produced when typing letters using the shift or alt+ctrl modifiers. +- Fixed bug where the dirty state wasn't properly updated when typing using the shift or alt+ctrl modifiers. +- Fixed bug where an error would be thrown if an autofocused editor was destroyed quickly after its initialization. Patch provided by thorn0. +- Fixed issue with dirty state not being properly updated on redo operation. +- Fixed issue with entity decoder not handling incorrectly written numeric entities. +- Fixed issue where some PI element values wouldn't be properly encoded. + +## 4.1.9 - 2015-03-10 + +### Fixed +- Fixed bug where indentation wouldn't work properly for non list elements. +- Fixed bug with image plugin not pulling the image dimensions out correctly if a custom document_base_url was used. +- Fixed bug where ctrl+alt+[1-9] would conflict with the AltGr+[1-9] on Windows. New shortcuts is ctrl+shift+[1-9]. +- Fixed bug with removing formatting on nodes in inline mode would sometimes include nodes outside the editor body. +- Fixed bug where extra nbsp:s would be inserted when you replaced a word surrounded by spaces using insertContent. +- Fixed bug with pasting from Google Docs would produce extra strong elements and line feeds. + +## 4.1.8 - 2015-03-05 + +### Added +- Added new html5 sizes attribute to img elements used together with srcset. +- Added new elementpath option that makes it possible to disable the element path but keep the statusbar. +- Added new option table_style_by_css for the table plugin to set table styling with css rather than table attributes. +- Added new link_assume_external_targets option to prompt the user to prepend http:// prefix if the supplied link does not contain a protocol prefix. +- Added new image_prepend_url option to allow a custom base path/url to be added to images. +- Added new table_appearance_options option to make it possible to disable some options. +- Added new image_title option to make it possible to alter the title of the image, disabled by default. + +### Fixed +- Fixed bug where selection starting from out side of the body wouldn't produce a proper selection range on IE 11. +- Fixed bug where pressing enter twice before a table moves the cursor in the table and causes a javascript error. +- Fixed bug where advanced image styles were not respected. +- Fixed bug where the less common Shift+Delete didn't produce a proper cut operation on WebKit browsers. +- Fixed bug where image/media size constrain logic would produce NaN when handling non number values. +- Fixed bug where internal classes where removed by the removeformat command. +- Fixed bug with creating links table cell contents with a specific selection would throw a exceptions on WebKit/Blink. +- Fixed bug where valid_classes option didn't work as expected according to docs. Patch provided by thorn0. +- Fixed bug where jQuery plugin would patch the internal methods multiple times. Patch provided by Drew Martin. +- Fixed bug where backspace key wouldn't delete the current selection of newly formatted content. +- Fixed bug where type over of inline formatting elements wouldn't properly keep the format on WebKit/Blink. +- Fixed bug where selection needed to be properly normalized on modern IE versions. +- Fixed bug where Command+Backspace didn't properly delete the whole line of text but the previous word. +- Fixed bug where UI active states wheren't properly updated on IE if you placed caret within the current range. +- Fixed bug where delete/backspace on WebKit/Blink would remove span elements created by the user. +- Fixed bug where delete/backspace would produce incorrect results when deleting between two text blocks with br elements. +- Fixed bug where captions where removed when pasting from MS Office. +- Fixed bug where lists plugin wouldn't properly remove fully selected nested lists. +- Fixed bug where the ttf font used for icons would throw an warning message on Gecko on Mac OS X. +- Fixed a bug where applying a color to text did not update the undo/redo history. +- Fixed so shy entities gets displayed when using the visualchars plugin. +- Fixed so removeformat removes ins/del by default since these might be used for strikethough. +- Fixed so multiple language packs can be loaded and added to the global I18n data structure. +- Fixed so transparent color selection gets treated as a normal color selection. Patch contributed by Alexander Hofbauer. +- Fixed so it's possible to disable autoresize_overflow_padding, autoresize_bottom_margin options by setting them to false. +- Fixed so the charmap plugin shows the description of the character in the dialog. Patch contributed by Jelle Hissink. +- Removed address from the default list of block formats since it tends to be missused. +- Fixed so the pre block format is called preformatted to make it more verbose. +- Fixed so it's possible to context scope translation strings this isn't needed most of the time. +- Fixed so the max length of the width/height input fields of the media dialog is 5 instead of 3. +- Fixed so drag/dropped contents gets properly processed by paste plugin since it's basically a paste. Patch contributed by Greg Fairbanks. +- Fixed so shortcut keys for headers is ctrl+alt+[1-9] instead of ctrl+[1-9] since these are for switching tabs in the browsers. +- Fixed so "u" doesn't get converted into a span element by the legacy input filter. Since this is now a valid HTML5 element. +- Fixed font families in order to provide appropriate web-safe fonts. + +## 4.1.7 - 2014-11-27 + +### Added +- Added HTML5 schema support for srcset, source and picture. Patch contributed by mattheu. +- Added new cache_suffix setting to enable cache busting by producing unique urls. +- Added new paste_convert_word_fake_lists option to enable users to disable the fake lists convert logic. + +### Fixed +- Fixed so advlist style changes adds undo levels for each change. +- Fixed bug where WebKit would sometimes produce an exception when the autolink plugin where looking for URLs. +- Fixed bug where IE 7 wouldn't be rendered properly due to aggressive css compression. +- Fixed bug where DomQuery wouldn't accept window as constructor element. +- Fixed bug where the color picker in 3.x dialogs wouldn't work properly. Patch contributed by Callidior. +- Fixed bug where the image plugin wouldn't respect the document_base_url. +- Fixed bug where the jQuery plugin would fail to append to elements named array prototype names. + +## 4.1.6 - 2014-10-08 + +### Changed +- Replaced jake with grunt since it is more mainstream and has better plugin support. + +### Fixed +- Fixed bug with clicking on the scrollbar of the iframe would cause a JS error to be thrown. +- Fixed bug where null would produce an exception if you passed it to selection.setRng. +- Fixed bug where Ctrl/Cmd+Tab would indent the current list item if you switched tabs in the browser. +- Fixed bug where pasting empty cells from Excel would result in a broken table. +- Fixed bug where it wasn't possible to switch back to default list style type. +- Fixed issue where the select all quirk fix would fire for other modifiers than Ctrl/Cmd combinations. + + +## 4.1.5 - 2014-09-09 + +### Fixed +- Fixed bug where sometimes the resize rectangles wouldn't properly render on images on WebKit/Blink. +- Fixed bug in list plugin where delete/backspace would merge empty LI elements in lists incorrectly. +- Fixed bug where empty list elements would result in empty LI elements without it's parent container. +- Fixed bug where backspace in empty caret formatted element could produce an type error exception of Gecko. +- Fixed bug where lists pasted from word with a custom start index above 9 wouldn't be properly handled. +- Fixed bug where tabfocus plugin would tab out of the editor instance even if the default action was prevented. +- Fixed bug where tabfocus wouldn't tab properly to other adjacent editor instances. +- Fixed bug where the DOMUtils setStyles wouldn't properly removed or update the data-mce-style attribute. +- Fixed bug where dialog select boxes would be placed incorrectly if document.body wasn't statically positioned. +- Fixed bug where pasting would sometimes scroll to the top of page if the user was using the autoresize plugin. +- Fixed bug where caret wouldn't be properly rendered by Chrome when clicking on the iframes documentElement. +- Fixed so custom images for menubutton/splitbutton can be provided. Patch contributed by Naim Hammadi. +- Fixed so the default action of windows closing can be prevented by blocking the default action of the close event. +- Fixed so nodeChange and focus of the editor isn't automatically performed when opening sub dialogs. + +## 4.1.4 - 2014-08-21 + +### Added +- Added new media_filter_html option to media plugin that blocks any conditional comments, scripts etc within a video element. +- Added new content_security_policy option allows you to set custom policy for iframe contents. Patch contributed by Francois Chagnon. + +### Fixed +- Fixed bug where activate/deactivate events wasn't firing properly when switching between editors. +- Fixed bug where placing the caret on iOS was difficult due to a WebKit bug with touch events. +- Fixed bug where the resize helper wouldn't render properly on older IE versions. +- Fixed bug where resizing images inside tables on older IE versions would sometimes fail depending mouse position. +- Fixed bug where editor.insertContent would produce an exception when inserting select/option elements. +- Fixed bug where extra empty paragraphs would be produced if block elements where inserted inside span elements. +- Fixed bug where the spellchecker menu item wouldn't be properly checked if spell checking was started before it was rendered. +- Fixed bug where the DomQuery filter function wouldn't remove non elements from collection. +- Fixed bug where document with custom document.domain wouldn't properly render the editor. +- Fixed bug where IE 8 would throw exception when trying to enter invalid color values into colorboxes. +- Fixed bug where undo manager could incorrectly add an extra undo level when custom resize handles was removed. +- Fixed bug where it wouldn't be possible to alter cell properties properly on table cells on IE 8. +- Fixed so the color picker button in table dialog isn't shown unless you include the colorpicker plugin or add your own custom color picker. +- Fixed so activate/deactivate events fire when windowManager opens a window since. +- Fixed so the table advtab options isn't separated by an underscore to normalize naming with image_advtab option. +- Fixed so the table cell dialog has proper padding when the advanced tab in disabled. + +## 4.1.3 - 2014-07-29 + +### Added +- Added event binding logic to tinymce.util.XHR making it possible to override headers and settings before any request is made. + +### Fixed +- Fixed bug where drag events wasn't fireing properly on older IE versions since the event handlers where bound to document. +- Fixed bug where drag/dropping contents within the editor on IE would force the contents into plain text mode even if it was internal content. +- Fixed bug where IE 7 wouldn't open menus properly due to a resize bug in the browser auto closing them immediately. +- Fixed bug where the DOMUtils getPos logic wouldn't produce a valid coordinate inside the body if the body was positioned non static. +- Fixed bug where the element path and format state wasn't properly updated if you had the wordcount plugin enabled. +- Fixed bug where a comment at the beginning of source would produce an exception in the formatter logic. +- Fixed bug where setAttrib/getAttrib on null would throw exception together with any hooked attributes like style. +- Fixed bug where table sizes wasn't properly retained when copy/pasting on WebKit/Blink. +- Fixed bug where WebKit/Blink would produce colors in RGB format instead of the forced HEX format when deleting contents. +- Fixed bug where the width attribute wasn't updated on tables if you changed the size inside the table dialog. +- Fixed bug where control selection wasn't properly handled when the caret was placed directly after an image. +- Fixed bug where selecting the contents of table cells using the selection.select method wouldn't place the caret properly. +- Fixed bug where the selection state for images wasn't removed when placing the caret right after an image on WebKit/Blink. +- Fixed bug where all events wasn't properly unbound when and editor instance was removed or destroyed by some external innerHTML call. +- Fixed bug where it wasn't possible or very hard to select images on iOS when the onscreen keyboard was visible. +- Fixed so auto_focus can take a boolean argument this will auto focus the last initialized editor might be useful for single inits. +- Fixed so word auto detect lists logic works better for faked lists that doesn't have specific markup. +- Fixed so nodeChange gets fired on mouseup as it used to before 4.1.1 we optimized that event to fire less often. + +### Removed +- Removed the finish menu item from spellchecker menu since it's redundant you can stop spellchecking by toggling menu item or button. + +## 4.1.2 - 2014-07-15 + +### Added +- Added offset/grep to DomQuery class works basically the same as it's jQuery equivalent. + +### Fixed +- Fixed bug where backspace/delete or setContent with an empty string would remove header data when using the fullpage plugin. +- Fixed bug where tinymce.remove with a selector not matching any editors would remove all editors. +- Fixed bug where resizing of the editor didn't work since the theme was calling setStyles instead of setStyle. +- Fixed bug where IE 7 would fail to append html fragments to iframe document when using DomQuery. +- Fixed bug where the getStyle DOMUtils method would produce an exception if it was called with null as it's element. +- Fixed bug where the paste plugin would remove the element if the none of the paste_webkit_styles rules matched the current style. +- Fixed bug where contextmenu table items wouldn't work properly on IE since it would some times fire an incorrect selection change. +- Fixed bug where the padding/border values wasn't used in the size calculation for the body size when using autoresize. Patch contributed by Matt Whelan. +- Fixed bug where conditional word comments wouldn't be properly removed when pasting plain text. +- Fixed bug where resizing would sometime fail on IE 11 when the mouseup occurred inside the resizable element. +- Fixed so the iframe gets initialized without any inline event handlers for better CSP support. Patch contributed by Matt Whelan. +- Fixed so the tinymce.dom.Sizzle is the latest version of sizzle this resolves the document context bug. + +## 4.1.1 - 2014-07-08 + +### Fixed +- Fixed bug where pasting plain text on some WebKit versions would result in an empty line. +- Fixed bug where resizing images inside tables on IE 11 wouldn't work properly. +- Fixed bug where IE 11 would sometimes throw "Invalid argument" exception when editor contents was set to an empty string. +- Fixed bug where document.activeElement would throw exceptions on IE 9 when that element was hidden or removed from dom. +- Fixed bug where WebKit/Blink sometimes produced br elements with the Apple-interchange-newline class. +- Fixed bug where table cell selection wasn't properly removed when copy/pasting table cells. +- Fixed bug where pasting nested list items from Word wouldn't produce proper semantic nested lists. +- Fixed bug where right clicking using the contextmenu plugin on WebKit/Blink on Mac OS X would select the target current word or line. +- Fixed bug where it wasn't possible to alter table cell properties on IE 8 using the context menu. +- Fixed bug where the resize helper wouldn't be correctly positioned on older IE versions. +- Fixed bug where fullpage plugin would produce an error if you didn't specify a doctype encoding. +- Fixed bug where anchor plugin would get the name/id of the current element even if it wasn't anchor element. +- Fixed bug where visual aids for tables wouldn't be properly disabled when changing the border size. +- Fixed bug where some control selection events wasn't properly fired on older IE versions. +- Fixed bug where table cell selection on older IE versions would prevent resizing of images. +- Fixed bug with paste_data_images paste option not working properly on modern IE versions. +- Fixed bug where custom elements with underscores in the name wasn't properly parsed/serialized. +- Fixed bug where applying inline formats to nested list elements would produce an incorrect formatting result. +- Fixed so it's possible to hide items from elements path by using preventDefault/stopPropagation. +- Fixed so inline mode toolbar gets rendered right aligned if the editable element positioned to the documents right edge. +- Fixed so empty inline elements inside empty block elements doesn't get removed if configured to be kept intact. +- Fixed so DomQuery parentsUntil/prevUntil/nextUntil supports selectors/elements/filters etc. +- Fixed so legacyoutput plugin overrides fontselect and fontsizeselect controls and handles font elements properly. + +## 4.1.0 - 2014-06-18 + +### Added +- Added new file_picker_callback option to replace the old file_browser_callback the latter will still work though. +- Added new custom colors to textcolor plugin will be displayed if a color picker is provided also shows the latest colors. +- Added new color_picker_callback option to enable you to add custom color pickers to the editor. +- Added new advanced tabs to table/cell/row dialogs to enable you to select colors for border/background. +- Added new colorpicker plugin that lets you select colors from a hsv color picker. +- Added new tinymce.util.Color class to handle color parsing and converting. +- Added new colorpicker UI widget element lets you add a hsv color picker to any form/window. +- Added new textpattern plugin that allows you to use markdown like text patterns to format contents. +- Added new resize helper element that shows the current width & height while resizing. +- Added new "once" method to Editor and EventDispatcher enables since callback execution events. +- Added new jQuery like class under tinymce.dom.DomQuery it's exposed on editor instances (editor.$) and globally under (tinymce.$). + +### Fixed +- Fixed so the default resize method for images are proportional shift/ctrl can be used to make an unproportional size. +- Fixed bug where the image_dimensions option of the image plugin would cause exceptions when it tried to update the size. +- Fixed bug where table cell dialog class field wasn't properly updated when editing an a table cell with an existing class. +- Fixed bug where Safari on Mac would produce webkit-fake-url for pasted images so these are now removed. +- Fixed bug where the nodeChange event would get fired before the selection was changed when clicking inside the current selection range. +- Fixed bug where valid_classes option would cause exception when it removed internal prefixed classes like mce-item-. +- Fixed bug where backspace would cause navigation in IE 8 on an inline element and after a caret formatting was applied. +- Fixed so placeholder images produced by the media plugin gets selected when inserted/edited. +- Fixed so it's possible to drag in images when the paste_data_images option is enabled. Might be useful for mail clients. +- Fixed so images doesn't get a width/height applied if the image_dimensions option is set to false useful for responsive contents. +- Fixed so it's possible to pass in an optional arguments object for the nodeChanged function to be passed to all nodechange event listeners. +- Fixed bug where media plugin embed code didn't update correctly. diff --git a/vendor/tinymce/tinymce/README.md b/vendor/tinymce/tinymce/README.md new file mode 100644 index 00000000..c9035ebb --- /dev/null +++ b/vendor/tinymce/tinymce/README.md @@ -0,0 +1,71 @@ +# TinyMCE + +The world's #1 open source rich text editor. + +Used and trusted by millions of developers, TinyMCE is the world’s most customizable, scalable, and flexible rich text editor. We’ve helped launch the likes of Atlassian, Medium, Evernote (and lots more that we can’t tell you), by empowering them to create exceptional content and experiences for their users. + +With more than 350M+ downloads every year, we’re also one of the most trusted enterprise-grade open source HTML editors on the internet. There’s currently more than 100M+ products worldwide, powered by Tiny. As a high powered WYSIWYG editor, TinyMCE is built to scale, designed to innovate, and thrives on delivering results to difficult edge-cases. + +You can access a [full featured demo of TinyMCE](https://www.tiny.cloud/docs/tinymce/6/premium-full-featured/) in the docs on the TinyMCE website. + +

    + Screenshot of the TinyMCE Editor +

    + +## Get started with TinyMCE + +Getting started with the TinyMCE rich text editor is easy, and for simple configurations can be done in less than 5 minutes. + +[TinyMCE Cloud Deployment Quick Start Guide](https://www.tiny.cloud/docs/tinymce/6/cloud-quick-start/) + +[TinyMCE Self-hosted Deployment Guide](https://www.tiny.cloud/docs/tinymce/6/npm-projects/) + +TinyMCE provides a range of configuration options that allow you to integrate it into your application. Start customizing with a [basic setup](https://www.tiny.cloud/docs/tinymce/6/basic-setup/). + +Configure it for one of three modes of editing: + +- [TinyMCE classic editing mode](https://www.tiny.cloud/docs/tinymce/6/use-tinymce-classic/). +- [TinyMCE inline editing mode](https://www.tiny.cloud/docs/tinymce/6/use-tinymce-inline/). +- [TinyMCE distraction-free editing mode](https://www.tiny.cloud/docs/tinymce/6/use-tinymce-distraction-free/). + +## Features + +### Integration + +TinyMCE is easily integrated into your projects with the help of components such as: + +- [tinymce-react](https://github.com/tinymce/tinymce-react) +- [tinymce-vue](https://github.com/tinymce/tinymce-vue) +- [tinymce-angular](https://github.com/tinymce/tinymce-angular) + +With over 29 integrations, and 400+ APIs, see the TinyMCE docs for a full list of editor [integrations](https://www.tiny.cloud/docs/tinymce/6/integrations/). + +### Customization + +It is easy to [configure the UI](https://www.tiny.cloud/docs/tinymce/6/customize-ui/) of your rich text editor to match the design of your site, product or application. Due to its flexibility, you can [configure the editor](https://www.tiny.cloud/docs/tinymce/6/basic-setup/) with as much or as little functionality as you like, depending on your requirements. + +With [50+ powerful plugins available](https://www.tiny.cloud/tinymce/features/), and content editable as the basis of TinyMCE, adding additional functionality is as simple as including a single line of code. + +Realizing the full power of most plugins requires only a few lines more. + +### Extensibility + +Sometimes your editor requirements can be quite unique, and you need the freedom and flexibility to innovate. Thanks to TinyMCE being open source, you can view the source code and develop your own extensions for custom functionality to meet your own requirements. + +The TinyMCE [API](https://www.tiny.cloud/docs/tinymce/6/apis/tinymce.root/) is exposed to make it easier for you to write custom functionality that fits within the existing framework of TinyMCE [UI components](https://www.tiny.cloud/docs/tinymce/6/custom-ui-components/). + +### Extended Features and Support + +For the professional software teams that require more in-depth efficiency, compliance or collaborative features built to enterprise-grade standards, please [get in touch with our team](https://www.tiny.cloud/contact/). + +Tiny also offers dedicated SLAs and support for professional development teams. + +## Compiling and contributing + +In 2019 the decision was made to transition our codebase to a monorepo. For information on compiling and contributing, see: [contribution guidelines](https://github.com/tinymce/tinymce/blob/master/CONTRIBUTING.md). + +As an open source product, we encourage and support the active development of our software. + +## Want more information? + +Visit the [TinyMCE website](https://tiny.cloud/) and check out the [TinyMCE documentation](https://www.tiny.cloud/docs/). diff --git a/vendor/tinymce/tinymce/bower.json b/vendor/tinymce/tinymce/bower.json new file mode 100644 index 00000000..0af3ccfe --- /dev/null +++ b/vendor/tinymce/tinymce/bower.json @@ -0,0 +1,27 @@ +{ + "name": "tinymce", + "description": "Web based JavaScript HTML WYSIWYG editor control.", + "license": "MIT", + "keywords": [ + "wysiwyg", + "tinymce", + "richtext", + "javascript", + "html", + "text", + "rich editor", + "rich text editor", + "rte", + "rich text", + "contenteditable", + "editing" + ], + "homepage": "https://www.tiny.cloud/", + "ignore": [ + "README.md", + "composer.json", + "package.json", + ".npmignore", + "CHANGELOG.md" + ] +} \ No newline at end of file diff --git a/vendor/tinymce/tinymce/composer.json b/vendor/tinymce/tinymce/composer.json new file mode 100644 index 00000000..49886f6b --- /dev/null +++ b/vendor/tinymce/tinymce/composer.json @@ -0,0 +1,52 @@ +{ + "name": "tinymce/tinymce", + "version": "6.0.2", + "description": "Web based JavaScript HTML WYSIWYG editor control.", + "license": [ + "MIT-only" + ], + "keywords": [ + "wysiwyg", + "tinymce", + "richtext", + "javascript", + "html", + "text", + "rich editor", + "rich text editor", + "rte", + "rich text", + "contenteditable", + "editing" + ], + "homepage": "https://www.tiny.cloud/", + "type": "component", + "extra": { + "component": { + "scripts": [ + "tinymce.js", + "plugins/*/plugin.js", + "themes/*/theme.js", + "models/*/model.js", + "icons/*/icons.js" + ], + "files": [ + "tinymce.min.js", + "plugins/*/plugin.min.js", + "themes/*/theme.min.js", + "models/*/model.min.js", + "skins/**", + "icons/*/icons.min.js" + ] + } + }, + "archive": { + "exclude": [ + "README.md", + "bower.js", + "package.json", + ".npmignore", + "CHANGELOG.md" + ] + } +} \ No newline at end of file diff --git a/vendor/tinymce/tinymce/icons/default/icons.js b/vendor/tinymce/tinymce/icons/default/icons.js new file mode 100644 index 00000000..a240d41a --- /dev/null +++ b/vendor/tinymce/tinymce/icons/default/icons.js @@ -0,0 +1,182 @@ +tinymce.IconManager.add('default', { + icons: { + 'accessibility-check': '', + 'action-next': '', + 'action-prev': '', + 'align-center': '', + 'align-justify': '', + 'align-left': '', + 'align-none': '', + 'align-right': '', + 'arrow-left': '', + 'arrow-right': '', + 'bold': '', + 'bookmark': '', + 'border-style': '', + 'border-width': '', + 'brightness': '', + 'browse': '', + 'cancel': '', + 'cell-background-color': '', + 'cell-border-color': '', + 'change-case': '', + 'character-count': '', + 'checklist-rtl': '', + 'checklist': '', + 'checkmark': '', + 'chevron-down': '', + 'chevron-left': '', + 'chevron-right': '', + 'chevron-up': '', + 'close': '', + 'code-sample': '', + 'color-levels': '', + 'color-picker': '', + 'color-swatch-remove-color': '', + 'color-swatch': '', + 'comment-add': '', + 'comment': '', + 'contrast': '', + 'copy': '', + 'crop': '', + 'cut-column': '', + 'cut-row': '', + 'cut': '', + 'document-properties': '', + 'drag': '', + 'duplicate-column': '', + 'duplicate-row': '', + 'duplicate': '', + 'edit-block': '', + 'edit-image': '', + 'embed-page': '', + 'embed': '', + 'emoji': '', + 'export': '', + 'fill': '', + 'flip-horizontally': '', + 'flip-vertically': '', + 'format-painter': '', + 'format': '', + 'fullscreen': '', + 'gallery': '', + 'gamma': '', + 'help': '', + 'highlight-bg-color': '', + 'home': '', + 'horizontal-rule': '', + 'image-options': '', + 'image': '', + 'indent': '', + 'info': '', + 'insert-character': '', + 'insert-time': '', + 'invert': '', + 'italic': '', + 'language': '', + 'line-height': '', + 'line': '', + 'link': '', + 'list-bull-circle': '', + 'list-bull-default': '', + 'list-bull-square': '', + 'list-num-default-rtl': '', + 'list-num-default': '', + 'list-num-lower-alpha-rtl': '', + 'list-num-lower-alpha': '', + 'list-num-lower-greek-rtl': '', + 'list-num-lower-greek': '', + 'list-num-lower-roman-rtl': '', + 'list-num-lower-roman': '', + 'list-num-upper-alpha-rtl': '', + 'list-num-upper-alpha': '', + 'list-num-upper-roman-rtl': '', + 'list-num-upper-roman': '', + 'lock': '', + 'ltr': '', + 'more-drawer': '', + 'new-document': '', + 'new-tab': '', + 'non-breaking': '', + 'notice': '', + 'ordered-list-rtl': '', + 'ordered-list': '', + 'orientation': '', + 'outdent': '', + 'page-break': '', + 'paragraph': '', + 'paste-column-after': '', + 'paste-column-before': '', + 'paste-row-after': '', + 'paste-row-before': '', + 'paste-text': '', + 'paste': '', + 'permanent-pen': '', + 'plus': '', + 'preferences': '', + 'preview': '', + 'print': '', + 'quote': '', + 'redo': '', + 'reload': '', + 'remove-formatting': '', + 'remove': '', + 'resize-handle': '', + 'resize': '', + 'restore-draft': '', + 'rotate-left': '', + 'rotate-right': '', + 'rtl': '', + 'save': '', + 'search': '', + 'select-all': '', + 'selected': '', + 'settings': '', + 'sharpen': '', + 'sourcecode': '', + 'spell-check': '', + 'strike-through': '', + 'subscript': '', + 'superscript': '', + 'table-caption': '', + 'table-cell-classes': '', + 'table-cell-properties': '', + 'table-cell-select-all': '', + 'table-cell-select-inner': '', + 'table-classes': '', + 'table-delete-column': '', + 'table-delete-row': '', + 'table-delete-table': '', + 'table-insert-column-after': '', + 'table-insert-column-before': '', + 'table-insert-row-above': '', + 'table-insert-row-after': '', + 'table-left-header': '', + 'table-merge-cells': '', + 'table-row-numbering-rtl': '', + 'table-row-numbering': '', + 'table-row-properties': '', + 'table-split-cells': '', + 'table-top-header': '', + 'table': '', + 'template': '', + 'temporary-placeholder': '', + 'text-color': '', + 'toc': '', + 'translate': '', + 'underline': '', + 'undo': '', + 'unlink': '', + 'unlock': '', + 'unordered-list': '', + 'unselected': '', + 'upload': '', + 'user': '', + 'vertical-align': '', + 'visualblocks': '', + 'visualchars': '', + 'warning': '', + 'zoom-in': '', + 'zoom-out': '', + } +}); \ No newline at end of file diff --git a/vendor/tinymce/tinymce/icons/default/icons.min.js b/vendor/tinymce/tinymce/icons/default/icons.min.js new file mode 100644 index 00000000..2cf9ef86 --- /dev/null +++ b/vendor/tinymce/tinymce/icons/default/icons.min.js @@ -0,0 +1 @@ +tinymce.IconManager.add("default",{icons:{"accessibility-check":'',"action-next":'',"action-prev":'',"align-center":'',"align-justify":'',"align-left":'',"align-none":'',"align-right":'',"arrow-left":'',"arrow-right":'',bold:'',bookmark:'',"border-style":'',"border-width":'',brightness:'',browse:'',cancel:'',"cell-background-color":'',"cell-border-color":'',"change-case":'',"character-count":'',"checklist-rtl":'',checklist:'',checkmark:'',"chevron-down":'',"chevron-left":'',"chevron-right":'',"chevron-up":'',close:'',"code-sample":'',"color-levels":'',"color-picker":'',"color-swatch-remove-color":'',"color-swatch":'',"comment-add":'',comment:'',contrast:'',copy:'',crop:'',"cut-column":'',"cut-row":'',cut:'',"document-properties":'',drag:'',"duplicate-column":'',"duplicate-row":'',duplicate:'',"edit-block":'',"edit-image":'',"embed-page":'',embed:'',emoji:'',export:'',fill:'',"flip-horizontally":'',"flip-vertically":'',"format-painter":'',format:'',fullscreen:'',gallery:'',gamma:'',help:'',"highlight-bg-color":'',home:'',"horizontal-rule":'',"image-options":'',image:'',indent:'',info:'',"insert-character":'',"insert-time":'',invert:'',italic:'',language:'',"line-height":'',line:'',link:'',"list-bull-circle":'',"list-bull-default":'',"list-bull-square":'',"list-num-default-rtl":'',"list-num-default":'',"list-num-lower-alpha-rtl":'',"list-num-lower-alpha":'',"list-num-lower-greek-rtl":'',"list-num-lower-greek":'',"list-num-lower-roman-rtl":'',"list-num-lower-roman":'',"list-num-upper-alpha-rtl":'',"list-num-upper-alpha":'',"list-num-upper-roman-rtl":'',"list-num-upper-roman":'',lock:'',ltr:'',"more-drawer":'',"new-document":'',"new-tab":'',"non-breaking":'',notice:'',"ordered-list-rtl":'',"ordered-list":'',orientation:'',outdent:'',"page-break":'',paragraph:'',"paste-column-after":'',"paste-column-before":'',"paste-row-after":'',"paste-row-before":'',"paste-text":'',paste:'',"permanent-pen":'',plus:'',preferences:'',preview:'',print:'',quote:'',redo:'',reload:'',"remove-formatting":'',remove:'',"resize-handle":'',resize:'',"restore-draft":'',"rotate-left":'',"rotate-right":'',rtl:'',save:'',search:'',"select-all":'',selected:'',settings:'',sharpen:'',sourcecode:'',"spell-check":'',"strike-through":'',subscript:'',superscript:'',"table-caption":'',"table-cell-classes":'',"table-cell-properties":'',"table-cell-select-all":'',"table-cell-select-inner":'',"table-classes":'',"table-delete-column":'',"table-delete-row":'',"table-delete-table":'',"table-insert-column-after":'',"table-insert-column-before":'',"table-insert-row-above":'',"table-insert-row-after":'',"table-left-header":'',"table-merge-cells":'',"table-row-numbering-rtl":'',"table-row-numbering":'',"table-row-properties":'',"table-split-cells":'',"table-top-header":'',table:'',template:'',"temporary-placeholder":'',"text-color":'',toc:'',translate:'',underline:'',undo:'',unlink:'',unlock:'',"unordered-list":'',unselected:'',upload:'',user:'',"vertical-align":'',visualblocks:'',visualchars:'',warning:'',"zoom-in":'',"zoom-out":''}}); \ No newline at end of file diff --git a/vendor/tinymce/tinymce/icons/default/index.js b/vendor/tinymce/tinymce/icons/default/index.js new file mode 100644 index 00000000..ca4184a4 --- /dev/null +++ b/vendor/tinymce/tinymce/icons/default/index.js @@ -0,0 +1,7 @@ +// Exports the "default" icons for usage with module loaders +// Usage: +// CommonJS: +// require('tinymce/icons/default') +// ES2015: +// import 'tinymce/icons/default' +require('./icons.js'); \ No newline at end of file diff --git a/vendor/tinymce/tinymce/license.txt b/vendor/tinymce/tinymce/license.txt new file mode 100644 index 00000000..3a49f66f --- /dev/null +++ b/vendor/tinymce/tinymce/license.txt @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2022 Ephox Corporation DBA Tiny Technologies, Inc. + +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/vendor/tinymce/tinymce/models/dom/index.js b/vendor/tinymce/tinymce/models/dom/index.js new file mode 100644 index 00000000..7ed634af --- /dev/null +++ b/vendor/tinymce/tinymce/models/dom/index.js @@ -0,0 +1,7 @@ +// Exports the "dom" model for usage with module loaders +// Usage: +// CommonJS: +// require('tinymce/models/dom') +// ES2015: +// import 'tinymce/models/dom' +require('./model.js'); \ No newline at end of file diff --git a/vendor/tinymce/tinymce/models/dom/model.js b/vendor/tinymce/tinymce/models/dom/model.js new file mode 100644 index 00000000..bafa14e0 --- /dev/null +++ b/vendor/tinymce/tinymce/models/dom/model.js @@ -0,0 +1,7942 @@ +/** + * TinyMCE version 6.0.2 (2022-04-27) + */ + +(function () { + 'use strict'; + + var global$1 = tinymce.util.Tools.resolve('tinymce.ModelManager'); + + const hasProto = (v, constructor, predicate) => { + var _a; + if (predicate(v, constructor.prototype)) { + return true; + } else { + return ((_a = v.constructor) === null || _a === void 0 ? void 0 : _a.name) === constructor.name; + } + }; + const typeOf = x => { + const t = typeof x; + if (x === null) { + return 'null'; + } else if (t === 'object' && Array.isArray(x)) { + return 'array'; + } else if (t === 'object' && hasProto(x, String, (o, proto) => proto.isPrototypeOf(o))) { + return 'string'; + } else { + return t; + } + }; + const isType$1 = type => value => typeOf(value) === type; + const isSimpleType = type => value => typeof value === type; + const eq$2 = t => a => t === a; + const isString = isType$1('string'); + const isObject = isType$1('object'); + const isArray = isType$1('array'); + const isNull = eq$2(null); + const isBoolean = isSimpleType('boolean'); + const isNullable = a => a === null || a === undefined; + const isNonNullable = a => !isNullable(a); + const isFunction = isSimpleType('function'); + const isNumber = isSimpleType('number'); + + const noop = () => { + }; + const compose = (fa, fb) => { + return (...args) => { + return fa(fb.apply(null, args)); + }; + }; + const compose1 = (fbc, fab) => a => fbc(fab(a)); + const constant = value => { + return () => { + return value; + }; + }; + const identity = x => { + return x; + }; + const tripleEquals = (a, b) => { + return a === b; + }; + function curry(fn, ...initialArgs) { + return (...restArgs) => { + const all = initialArgs.concat(restArgs); + return fn.apply(null, all); + }; + } + const not = f => t => !f(t); + const die = msg => { + return () => { + throw new Error(msg); + }; + }; + const apply = f => { + return f(); + }; + const never = constant(false); + const always = constant(true); + + class Optional { + constructor(tag, value) { + this.tag = tag; + this.value = value; + } + static some(value) { + return new Optional(true, value); + } + static none() { + return Optional.singletonNone; + } + fold(onNone, onSome) { + if (this.tag) { + return onSome(this.value); + } else { + return onNone(); + } + } + isSome() { + return this.tag; + } + isNone() { + return !this.tag; + } + map(mapper) { + if (this.tag) { + return Optional.some(mapper(this.value)); + } else { + return Optional.none(); + } + } + bind(binder) { + if (this.tag) { + return binder(this.value); + } else { + return Optional.none(); + } + } + exists(predicate) { + return this.tag && predicate(this.value); + } + forall(predicate) { + return !this.tag || predicate(this.value); + } + filter(predicate) { + if (!this.tag || predicate(this.value)) { + return this; + } else { + return Optional.none(); + } + } + getOr(replacement) { + return this.tag ? this.value : replacement; + } + or(replacement) { + return this.tag ? this : replacement; + } + getOrThunk(thunk) { + return this.tag ? this.value : thunk(); + } + orThunk(thunk) { + return this.tag ? this : thunk(); + } + getOrDie(message) { + if (!this.tag) { + throw new Error(message !== null && message !== void 0 ? message : 'Called getOrDie on None'); + } else { + return this.value; + } + } + static from(value) { + return isNonNullable(value) ? Optional.some(value) : Optional.none(); + } + getOrNull() { + return this.tag ? this.value : null; + } + getOrUndefined() { + return this.value; + } + each(worker) { + if (this.tag) { + worker(this.value); + } + } + toArray() { + return this.tag ? [this.value] : []; + } + toString() { + return this.tag ? `some(${ this.value })` : 'none()'; + } + } + Optional.singletonNone = new Optional(false); + + const nativeSlice = Array.prototype.slice; + const nativeIndexOf = Array.prototype.indexOf; + const nativePush = Array.prototype.push; + const rawIndexOf = (ts, t) => nativeIndexOf.call(ts, t); + const contains$2 = (xs, x) => rawIndexOf(xs, x) > -1; + const exists = (xs, pred) => { + for (let i = 0, len = xs.length; i < len; i++) { + const x = xs[i]; + if (pred(x, i)) { + return true; + } + } + return false; + }; + const range$1 = (num, f) => { + const r = []; + for (let i = 0; i < num; i++) { + r.push(f(i)); + } + return r; + }; + const map$1 = (xs, f) => { + const len = xs.length; + const r = new Array(len); + for (let i = 0; i < len; i++) { + const x = xs[i]; + r[i] = f(x, i); + } + return r; + }; + const each$2 = (xs, f) => { + for (let i = 0, len = xs.length; i < len; i++) { + const x = xs[i]; + f(x, i); + } + }; + const eachr = (xs, f) => { + for (let i = xs.length - 1; i >= 0; i--) { + const x = xs[i]; + f(x, i); + } + }; + const partition = (xs, pred) => { + const pass = []; + const fail = []; + for (let i = 0, len = xs.length; i < len; i++) { + const x = xs[i]; + const arr = pred(x, i) ? pass : fail; + arr.push(x); + } + return { + pass, + fail + }; + }; + const filter$2 = (xs, pred) => { + const r = []; + for (let i = 0, len = xs.length; i < len; i++) { + const x = xs[i]; + if (pred(x, i)) { + r.push(x); + } + } + return r; + }; + const foldr = (xs, f, acc) => { + eachr(xs, (x, i) => { + acc = f(acc, x, i); + }); + return acc; + }; + const foldl = (xs, f, acc) => { + each$2(xs, (x, i) => { + acc = f(acc, x, i); + }); + return acc; + }; + const findUntil = (xs, pred, until) => { + for (let i = 0, len = xs.length; i < len; i++) { + const x = xs[i]; + if (pred(x, i)) { + return Optional.some(x); + } else if (until(x, i)) { + break; + } + } + return Optional.none(); + }; + const find$1 = (xs, pred) => { + return findUntil(xs, pred, never); + }; + const findIndex = (xs, pred) => { + for (let i = 0, len = xs.length; i < len; i++) { + const x = xs[i]; + if (pred(x, i)) { + return Optional.some(i); + } + } + return Optional.none(); + }; + const flatten = xs => { + const r = []; + for (let i = 0, len = xs.length; i < len; ++i) { + if (!isArray(xs[i])) { + throw new Error('Arr.flatten item ' + i + ' was not an array, input: ' + xs); + } + nativePush.apply(r, xs[i]); + } + return r; + }; + const bind$2 = (xs, f) => flatten(map$1(xs, f)); + const forall = (xs, pred) => { + for (let i = 0, len = xs.length; i < len; ++i) { + const x = xs[i]; + if (pred(x, i) !== true) { + return false; + } + } + return true; + }; + const reverse = xs => { + const r = nativeSlice.call(xs, 0); + r.reverse(); + return r; + }; + const mapToObject = (xs, f) => { + const r = {}; + for (let i = 0, len = xs.length; i < len; i++) { + const x = xs[i]; + r[String(x)] = f(x, i); + } + return r; + }; + const sort$1 = (xs, comparator) => { + const copy = nativeSlice.call(xs, 0); + copy.sort(comparator); + return copy; + }; + const get$d = (xs, i) => i >= 0 && i < xs.length ? Optional.some(xs[i]) : Optional.none(); + const head = xs => get$d(xs, 0); + const last$2 = xs => get$d(xs, xs.length - 1); + const findMap = (arr, f) => { + for (let i = 0; i < arr.length; i++) { + const r = f(arr[i], i); + if (r.isSome()) { + return r; + } + } + return Optional.none(); + }; + + const keys = Object.keys; + const hasOwnProperty = Object.hasOwnProperty; + const each$1 = (obj, f) => { + const props = keys(obj); + for (let k = 0, len = props.length; k < len; k++) { + const i = props[k]; + const x = obj[i]; + f(x, i); + } + }; + const map = (obj, f) => { + return tupleMap(obj, (x, i) => ({ + k: i, + v: f(x, i) + })); + }; + const tupleMap = (obj, f) => { + const r = {}; + each$1(obj, (x, i) => { + const tuple = f(x, i); + r[tuple.k] = tuple.v; + }); + return r; + }; + const objAcc = r => (x, i) => { + r[i] = x; + }; + const internalFilter = (obj, pred, onTrue, onFalse) => { + const r = {}; + each$1(obj, (x, i) => { + (pred(x, i) ? onTrue : onFalse)(x, i); + }); + return r; + }; + const filter$1 = (obj, pred) => { + const t = {}; + internalFilter(obj, pred, objAcc(t), noop); + return t; + }; + const mapToArray = (obj, f) => { + const r = []; + each$1(obj, (value, name) => { + r.push(f(value, name)); + }); + return r; + }; + const values = obj => { + return mapToArray(obj, identity); + }; + const get$c = (obj, key) => { + return has$1(obj, key) ? Optional.from(obj[key]) : Optional.none(); + }; + const has$1 = (obj, key) => hasOwnProperty.call(obj, key); + const hasNonNullableKey = (obj, key) => has$1(obj, key) && obj[key] !== undefined && obj[key] !== null; + const isEmpty = r => { + for (const x in r) { + if (hasOwnProperty.call(r, x)) { + return false; + } + } + return true; + }; + + typeof window !== 'undefined' ? window : Function('return this;')(); + + const COMMENT = 8; + const DOCUMENT = 9; + const DOCUMENT_FRAGMENT = 11; + const ELEMENT = 1; + const TEXT = 3; + + const name = element => { + const r = element.dom.nodeName; + return r.toLowerCase(); + }; + const type = element => element.dom.nodeType; + const isType = t => element => type(element) === t; + const isComment = element => type(element) === COMMENT || name(element) === '#comment'; + const isElement = isType(ELEMENT); + const isText = isType(TEXT); + const isDocument = isType(DOCUMENT); + const isDocumentFragment = isType(DOCUMENT_FRAGMENT); + const isTag = tag => e => isElement(e) && name(e) === tag; + + const rawSet = (dom, key, value) => { + if (isString(value) || isBoolean(value) || isNumber(value)) { + dom.setAttribute(key, value + ''); + } else { + console.error('Invalid call to Attribute.set. Key ', key, ':: Value ', value, ':: Element ', dom); + throw new Error('Attribute value was not simple'); + } + }; + const set$2 = (element, key, value) => { + rawSet(element.dom, key, value); + }; + const setAll$1 = (element, attrs) => { + const dom = element.dom; + each$1(attrs, (v, k) => { + rawSet(dom, k, v); + }); + }; + const setOptions = (element, attrs) => { + each$1(attrs, (v, k) => { + v.fold(() => { + remove$7(element, k); + }, value => { + rawSet(element.dom, k, value); + }); + }); + }; + const get$b = (element, key) => { + const v = element.dom.getAttribute(key); + return v === null ? undefined : v; + }; + const getOpt = (element, key) => Optional.from(get$b(element, key)); + const remove$7 = (element, key) => { + element.dom.removeAttribute(key); + }; + const clone$2 = element => foldl(element.dom.attributes, (acc, attr) => { + acc[attr.name] = attr.value; + return acc; + }, {}); + + const fromHtml$1 = (html, scope) => { + const doc = scope || document; + const div = doc.createElement('div'); + div.innerHTML = html; + if (!div.hasChildNodes() || div.childNodes.length > 1) { + const message = 'HTML does not have a single root node'; + console.error(message, html); + throw new Error(message); + } + return fromDom$1(div.childNodes[0]); + }; + const fromTag = (tag, scope) => { + const doc = scope || document; + const node = doc.createElement(tag); + return fromDom$1(node); + }; + const fromText = (text, scope) => { + const doc = scope || document; + const node = doc.createTextNode(text); + return fromDom$1(node); + }; + const fromDom$1 = node => { + if (node === null || node === undefined) { + throw new Error('Node cannot be null or undefined'); + } + return { dom: node }; + }; + const fromPoint$1 = (docElm, x, y) => Optional.from(docElm.dom.elementFromPoint(x, y)).map(fromDom$1); + const SugarElement = { + fromHtml: fromHtml$1, + fromTag, + fromText, + fromDom: fromDom$1, + fromPoint: fromPoint$1 + }; + + const is$2 = (element, selector) => { + const dom = element.dom; + if (dom.nodeType !== ELEMENT) { + return false; + } else { + const elem = dom; + if (elem.matches !== undefined) { + return elem.matches(selector); + } else if (elem.msMatchesSelector !== undefined) { + return elem.msMatchesSelector(selector); + } else if (elem.webkitMatchesSelector !== undefined) { + return elem.webkitMatchesSelector(selector); + } else if (elem.mozMatchesSelector !== undefined) { + return elem.mozMatchesSelector(selector); + } else { + throw new Error('Browser lacks native selectors'); + } + } + }; + const bypassSelector = dom => dom.nodeType !== ELEMENT && dom.nodeType !== DOCUMENT && dom.nodeType !== DOCUMENT_FRAGMENT || dom.childElementCount === 0; + const all$1 = (selector, scope) => { + const base = scope === undefined ? document : scope.dom; + return bypassSelector(base) ? [] : map$1(base.querySelectorAll(selector), SugarElement.fromDom); + }; + const one = (selector, scope) => { + const base = scope === undefined ? document : scope.dom; + return bypassSelector(base) ? Optional.none() : Optional.from(base.querySelector(selector)).map(SugarElement.fromDom); + }; + + const eq$1 = (e1, e2) => e1.dom === e2.dom; + const contains$1 = (e1, e2) => { + const d1 = e1.dom; + const d2 = e2.dom; + return d1 === d2 ? false : d1.contains(d2); + }; + const is$1 = is$2; + + const owner = element => SugarElement.fromDom(element.dom.ownerDocument); + const documentOrOwner = dos => isDocument(dos) ? dos : owner(dos); + const documentElement = element => SugarElement.fromDom(documentOrOwner(element).dom.documentElement); + const defaultView = element => SugarElement.fromDom(documentOrOwner(element).dom.defaultView); + const parent = element => Optional.from(element.dom.parentNode).map(SugarElement.fromDom); + const parentElement = element => Optional.from(element.dom.parentElement).map(SugarElement.fromDom); + const parents = (element, isRoot) => { + const stop = isFunction(isRoot) ? isRoot : never; + let dom = element.dom; + const ret = []; + while (dom.parentNode !== null && dom.parentNode !== undefined) { + const rawParent = dom.parentNode; + const p = SugarElement.fromDom(rawParent); + ret.push(p); + if (stop(p) === true) { + break; + } else { + dom = rawParent; + } + } + return ret; + }; + const prevSibling = element => Optional.from(element.dom.previousSibling).map(SugarElement.fromDom); + const nextSibling = element => Optional.from(element.dom.nextSibling).map(SugarElement.fromDom); + const children$2 = element => map$1(element.dom.childNodes, SugarElement.fromDom); + const child$2 = (element, index) => { + const cs = element.dom.childNodes; + return Optional.from(cs[index]).map(SugarElement.fromDom); + }; + const firstChild = element => child$2(element, 0); + + const before$3 = (marker, element) => { + const parent$1 = parent(marker); + parent$1.each(v => { + v.dom.insertBefore(element.dom, marker.dom); + }); + }; + const after$5 = (marker, element) => { + const sibling = nextSibling(marker); + sibling.fold(() => { + const parent$1 = parent(marker); + parent$1.each(v => { + append$1(v, element); + }); + }, v => { + before$3(v, element); + }); + }; + const prepend = (parent, element) => { + const firstChild$1 = firstChild(parent); + firstChild$1.fold(() => { + append$1(parent, element); + }, v => { + parent.dom.insertBefore(element.dom, v.dom); + }); + }; + const append$1 = (parent, element) => { + parent.dom.appendChild(element.dom); + }; + const appendAt = (parent, element, index) => { + child$2(parent, index).fold(() => { + append$1(parent, element); + }, v => { + before$3(v, element); + }); + }; + const wrap = (element, wrapper) => { + before$3(element, wrapper); + append$1(wrapper, element); + }; + + const after$4 = (marker, elements) => { + each$2(elements, (x, i) => { + const e = i === 0 ? marker : elements[i - 1]; + after$5(e, x); + }); + }; + const append = (parent, elements) => { + each$2(elements, x => { + append$1(parent, x); + }); + }; + + const empty = element => { + element.dom.textContent = ''; + each$2(children$2(element), rogue => { + remove$6(rogue); + }); + }; + const remove$6 = element => { + const dom = element.dom; + if (dom.parentNode !== null) { + dom.parentNode.removeChild(dom); + } + }; + const unwrap = wrapper => { + const children = children$2(wrapper); + if (children.length > 0) { + after$4(wrapper, children); + } + remove$6(wrapper); + }; + + const clone$1 = (original, isDeep) => SugarElement.fromDom(original.dom.cloneNode(isDeep)); + const shallow = original => clone$1(original, false); + const deep = original => clone$1(original, true); + const shallowAs = (original, tag) => { + const nu = SugarElement.fromTag(tag); + const attributes = clone$2(original); + setAll$1(nu, attributes); + return nu; + }; + const copy$2 = (original, tag) => { + const nu = shallowAs(original, tag); + const cloneChildren = children$2(deep(original)); + append(nu, cloneChildren); + return nu; + }; + const mutate$1 = (original, tag) => { + const nu = shallowAs(original, tag); + after$5(original, nu); + const children = children$2(original); + append(nu, children); + remove$6(original); + return nu; + }; + + const validSectionList = [ + 'tfoot', + 'thead', + 'tbody', + 'colgroup' + ]; + const isValidSection = parentName => contains$2(validSectionList, parentName); + const grid = (rows, columns) => ({ + rows, + columns + }); + const address = (row, column) => ({ + row, + column + }); + const detail = (element, rowspan, colspan) => ({ + element, + rowspan, + colspan + }); + const detailnew = (element, rowspan, colspan, isNew) => ({ + element, + rowspan, + colspan, + isNew + }); + const extended = (element, rowspan, colspan, row, column, isLocked) => ({ + element, + rowspan, + colspan, + row, + column, + isLocked + }); + const rowdetail = (element, cells, section) => ({ + element, + cells, + section + }); + const rowdetailnew = (element, cells, section, isNew) => ({ + element, + cells, + section, + isNew + }); + const elementnew = (element, isNew, isLocked) => ({ + element, + isNew, + isLocked + }); + const rowcells = (element, cells, section, isNew) => ({ + element, + cells, + section, + isNew + }); + const bounds = (startRow, startCol, finishRow, finishCol) => ({ + startRow, + startCol, + finishRow, + finishCol + }); + const columnext = (element, colspan, column) => ({ + element, + colspan, + column + }); + const colgroup = (element, columns) => ({ + element, + columns + }); + + const isShadowRoot = dos => isDocumentFragment(dos) && isNonNullable(dos.dom.host); + const supported = isFunction(Element.prototype.attachShadow) && isFunction(Node.prototype.getRootNode); + const isSupported$1 = constant(supported); + const getRootNode = supported ? e => SugarElement.fromDom(e.dom.getRootNode()) : documentOrOwner; + const getShadowRoot = e => { + const r = getRootNode(e); + return isShadowRoot(r) ? Optional.some(r) : Optional.none(); + }; + const getShadowHost = e => SugarElement.fromDom(e.dom.host); + const getOriginalEventTarget = event => { + if (isSupported$1() && isNonNullable(event.target)) { + const el = SugarElement.fromDom(event.target); + if (isElement(el) && isOpenShadowHost(el)) { + if (event.composed && event.composedPath) { + const composedPath = event.composedPath(); + if (composedPath) { + return head(composedPath); + } + } + } + } + return Optional.from(event.target); + }; + const isOpenShadowHost = element => isNonNullable(element.dom.shadowRoot); + + const inBody = element => { + const dom = isText(element) ? element.dom.parentNode : element.dom; + if (dom === undefined || dom === null || dom.ownerDocument === null) { + return false; + } + const doc = dom.ownerDocument; + return getShadowRoot(SugarElement.fromDom(dom)).fold(() => doc.body.contains(dom), compose1(inBody, getShadowHost)); + }; + const body$1 = () => getBody$1(SugarElement.fromDom(document)); + const getBody$1 = doc => { + const b = doc.dom.body; + if (b === null || b === undefined) { + throw new Error('Body is not available yet'); + } + return SugarElement.fromDom(b); + }; + + const ancestors$4 = (scope, predicate, isRoot) => filter$2(parents(scope, isRoot), predicate); + const children$1 = (scope, predicate) => filter$2(children$2(scope), predicate); + const descendants$1 = (scope, predicate) => { + let result = []; + each$2(children$2(scope), x => { + if (predicate(x)) { + result = result.concat([x]); + } + result = result.concat(descendants$1(x, predicate)); + }); + return result; + }; + + const ancestors$3 = (scope, selector, isRoot) => ancestors$4(scope, e => is$2(e, selector), isRoot); + const children = (scope, selector) => children$1(scope, e => is$2(e, selector)); + const descendants = (scope, selector) => all$1(selector, scope); + + var ClosestOrAncestor = (is, ancestor, scope, a, isRoot) => { + if (is(scope, a)) { + return Optional.some(scope); + } else if (isFunction(isRoot) && isRoot(scope)) { + return Optional.none(); + } else { + return ancestor(scope, a, isRoot); + } + }; + + const ancestor$2 = (scope, predicate, isRoot) => { + let element = scope.dom; + const stop = isFunction(isRoot) ? isRoot : never; + while (element.parentNode) { + element = element.parentNode; + const el = SugarElement.fromDom(element); + if (predicate(el)) { + return Optional.some(el); + } else if (stop(el)) { + break; + } + } + return Optional.none(); + }; + const closest$2 = (scope, predicate, isRoot) => { + const is = (s, test) => test(s); + return ClosestOrAncestor(is, ancestor$2, scope, predicate, isRoot); + }; + const child$1 = (scope, predicate) => { + const pred = node => predicate(SugarElement.fromDom(node)); + const result = find$1(scope.dom.childNodes, pred); + return result.map(SugarElement.fromDom); + }; + const descendant$1 = (scope, predicate) => { + const descend = node => { + for (let i = 0; i < node.childNodes.length; i++) { + const child = SugarElement.fromDom(node.childNodes[i]); + if (predicate(child)) { + return Optional.some(child); + } + const res = descend(node.childNodes[i]); + if (res.isSome()) { + return res; + } + } + return Optional.none(); + }; + return descend(scope.dom); + }; + + const ancestor$1 = (scope, selector, isRoot) => ancestor$2(scope, e => is$2(e, selector), isRoot); + const child = (scope, selector) => child$1(scope, e => is$2(e, selector)); + const descendant = (scope, selector) => one(selector, scope); + const closest$1 = (scope, selector, isRoot) => { + const is = (element, selector) => is$2(element, selector); + return ClosestOrAncestor(is, ancestor$1, scope, selector, isRoot); + }; + + const is = (lhs, rhs, comparator = tripleEquals) => lhs.exists(left => comparator(left, rhs)); + const cat = arr => { + const r = []; + const push = x => { + r.push(x); + }; + for (let i = 0; i < arr.length; i++) { + arr[i].each(push); + } + return r; + }; + const bindFrom = (a, f) => a !== undefined && a !== null ? f(a) : Optional.none(); + const someIf = (b, a) => b ? Optional.some(a) : Optional.none(); + + const checkRange = (str, substr, start) => substr === '' || str.length >= substr.length && str.substr(start, start + substr.length) === substr; + const contains = (str, substr) => { + return str.indexOf(substr) !== -1; + }; + const startsWith = (str, prefix) => { + return checkRange(str, prefix, 0); + }; + const endsWith = (str, suffix) => { + return checkRange(str, suffix, str.length - suffix.length); + }; + const blank = r => s => s.replace(r, ''); + const trim = blank(/^\s+|\s+$/g); + const isNotEmpty = s => s.length > 0; + const toFloat = value => { + const num = parseFloat(value); + return isNaN(num) ? Optional.none() : Optional.some(num); + }; + + const isSupported = dom => dom.style !== undefined && isFunction(dom.style.getPropertyValue); + + const internalSet = (dom, property, value) => { + if (!isString(value)) { + console.error('Invalid call to CSS.set. Property ', property, ':: Value ', value, ':: Element ', dom); + throw new Error('CSS value must be a string: ' + value); + } + if (isSupported(dom)) { + dom.style.setProperty(property, value); + } + }; + const internalRemove = (dom, property) => { + if (isSupported(dom)) { + dom.style.removeProperty(property); + } + }; + const set$1 = (element, property, value) => { + const dom = element.dom; + internalSet(dom, property, value); + }; + const setAll = (element, css) => { + const dom = element.dom; + each$1(css, (v, k) => { + internalSet(dom, k, v); + }); + }; + const get$a = (element, property) => { + const dom = element.dom; + const styles = window.getComputedStyle(dom); + const r = styles.getPropertyValue(property); + return r === '' && !inBody(element) ? getUnsafeProperty(dom, property) : r; + }; + const getUnsafeProperty = (dom, property) => isSupported(dom) ? dom.style.getPropertyValue(property) : ''; + const getRaw$2 = (element, property) => { + const dom = element.dom; + const raw = getUnsafeProperty(dom, property); + return Optional.from(raw).filter(r => r.length > 0); + }; + const remove$5 = (element, property) => { + const dom = element.dom; + internalRemove(dom, property); + if (is(getOpt(element, 'style').map(trim), '')) { + remove$7(element, 'style'); + } + }; + const copy$1 = (source, target) => { + const sourceDom = source.dom; + const targetDom = target.dom; + if (isSupported(sourceDom) && isSupported(targetDom)) { + targetDom.style.cssText = sourceDom.style.cssText; + } + }; + + const getAttrValue = (cell, name, fallback = 0) => getOpt(cell, name).map(value => parseInt(value, 10)).getOr(fallback); + const getSpan = (cell, type) => getAttrValue(cell, type, 1); + const hasColspan = cellOrCol => { + if (isTag('col')(cellOrCol)) { + return getAttrValue(cellOrCol, 'span', 1) > 1; + } else { + return getSpan(cellOrCol, 'colspan') > 1; + } + }; + const hasRowspan = cell => getSpan(cell, 'rowspan') > 1; + const getCssValue = (element, property) => parseInt(get$a(element, property), 10); + const minWidth = constant(10); + const minHeight = constant(10); + + const firstLayer = (scope, selector) => { + return filterFirstLayer(scope, selector, always); + }; + const filterFirstLayer = (scope, selector, predicate) => { + return bind$2(children$2(scope), x => { + if (is$2(x, selector)) { + return predicate(x) ? [x] : []; + } else { + return filterFirstLayer(x, selector, predicate); + } + }); + }; + + const lookup = (tags, element, isRoot = never) => { + if (isRoot(element)) { + return Optional.none(); + } + if (contains$2(tags, name(element))) { + return Optional.some(element); + } + const isRootOrUpperTable = elm => is$2(elm, 'table') || isRoot(elm); + return ancestor$1(element, tags.join(','), isRootOrUpperTable); + }; + const cell = (element, isRoot) => lookup([ + 'td', + 'th' + ], element, isRoot); + const cells$1 = ancestor => firstLayer(ancestor, 'th,td'); + const columns$1 = ancestor => { + if (is$2(ancestor, 'colgroup')) { + return children(ancestor, 'col'); + } else { + return bind$2(columnGroups(ancestor), columnGroup => children(columnGroup, 'col')); + } + }; + const table = (element, isRoot) => closest$1(element, 'table', isRoot); + const rows$1 = ancestor => firstLayer(ancestor, 'tr'); + const columnGroups = ancestor => table(ancestor).fold(constant([]), table => children(table, 'colgroup')); + + const fromRowsOrColGroups = (elems, getSection) => map$1(elems, row => { + if (name(row) === 'colgroup') { + const cells = map$1(columns$1(row), column => { + const colspan = getAttrValue(column, 'span', 1); + return detail(column, 1, colspan); + }); + return rowdetail(row, cells, 'colgroup'); + } else { + const cells = map$1(cells$1(row), cell => { + const rowspan = getAttrValue(cell, 'rowspan', 1); + const colspan = getAttrValue(cell, 'colspan', 1); + return detail(cell, rowspan, colspan); + }); + return rowdetail(row, cells, getSection(row)); + } + }); + const getParentSection = group => parent(group).map(parent => { + const parentName = name(parent); + return isValidSection(parentName) ? parentName : 'tbody'; + }).getOr('tbody'); + const fromTable$1 = table => { + const rows = rows$1(table); + const columnGroups$1 = columnGroups(table); + const elems = [ + ...columnGroups$1, + ...rows + ]; + return fromRowsOrColGroups(elems, getParentSection); + }; + const fromPastedRows = (elems, section) => fromRowsOrColGroups(elems, () => section); + + const cached = f => { + let called = false; + let r; + return (...args) => { + if (!called) { + called = true; + r = f.apply(null, args); + } + return r; + }; + }; + + const DeviceType = (os, browser, userAgent, mediaMatch) => { + const isiPad = os.isiOS() && /ipad/i.test(userAgent) === true; + const isiPhone = os.isiOS() && !isiPad; + const isMobile = os.isiOS() || os.isAndroid(); + const isTouch = isMobile || mediaMatch('(pointer:coarse)'); + const isTablet = isiPad || !isiPhone && isMobile && mediaMatch('(min-device-width:768px)'); + const isPhone = isiPhone || isMobile && !isTablet; + const iOSwebview = browser.isSafari() && os.isiOS() && /safari/i.test(userAgent) === false; + const isDesktop = !isPhone && !isTablet && !iOSwebview; + return { + isiPad: constant(isiPad), + isiPhone: constant(isiPhone), + isTablet: constant(isTablet), + isPhone: constant(isPhone), + isTouch: constant(isTouch), + isAndroid: os.isAndroid, + isiOS: os.isiOS, + isWebView: constant(iOSwebview), + isDesktop: constant(isDesktop) + }; + }; + + const firstMatch = (regexes, s) => { + for (let i = 0; i < regexes.length; i++) { + const x = regexes[i]; + if (x.test(s)) { + return x; + } + } + return undefined; + }; + const find = (regexes, agent) => { + const r = firstMatch(regexes, agent); + if (!r) { + return { + major: 0, + minor: 0 + }; + } + const group = i => { + return Number(agent.replace(r, '$' + i)); + }; + return nu$2(group(1), group(2)); + }; + const detect$5 = (versionRegexes, agent) => { + const cleanedAgent = String(agent).toLowerCase(); + if (versionRegexes.length === 0) { + return unknown$2(); + } + return find(versionRegexes, cleanedAgent); + }; + const unknown$2 = () => { + return nu$2(0, 0); + }; + const nu$2 = (major, minor) => { + return { + major, + minor + }; + }; + const Version = { + nu: nu$2, + detect: detect$5, + unknown: unknown$2 + }; + + const detectBrowser$1 = (browsers, userAgentData) => { + return findMap(userAgentData.brands, uaBrand => { + const lcBrand = uaBrand.brand.toLowerCase(); + return find$1(browsers, browser => { + var _a; + return lcBrand === ((_a = browser.brand) === null || _a === void 0 ? void 0 : _a.toLowerCase()); + }).map(info => ({ + current: info.name, + version: Version.nu(parseInt(uaBrand.version, 10), 0) + })); + }); + }; + + const detect$4 = (candidates, userAgent) => { + const agent = String(userAgent).toLowerCase(); + return find$1(candidates, candidate => { + return candidate.search(agent); + }); + }; + const detectBrowser = (browsers, userAgent) => { + return detect$4(browsers, userAgent).map(browser => { + const version = Version.detect(browser.versionRegexes, userAgent); + return { + current: browser.name, + version + }; + }); + }; + const detectOs = (oses, userAgent) => { + return detect$4(oses, userAgent).map(os => { + const version = Version.detect(os.versionRegexes, userAgent); + return { + current: os.name, + version + }; + }); + }; + + const normalVersionRegex = /.*?version\/\ ?([0-9]+)\.([0-9]+).*/; + const checkContains = target => { + return uastring => { + return contains(uastring, target); + }; + }; + const browsers = [ + { + name: 'Edge', + versionRegexes: [/.*?edge\/ ?([0-9]+)\.([0-9]+)$/], + search: uastring => { + return contains(uastring, 'edge/') && contains(uastring, 'chrome') && contains(uastring, 'safari') && contains(uastring, 'applewebkit'); + } + }, + { + name: 'Chromium', + brand: 'Chromium', + versionRegexes: [ + /.*?chrome\/([0-9]+)\.([0-9]+).*/, + normalVersionRegex + ], + search: uastring => { + return contains(uastring, 'chrome') && !contains(uastring, 'chromeframe'); + } + }, + { + name: 'IE', + versionRegexes: [ + /.*?msie\ ?([0-9]+)\.([0-9]+).*/, + /.*?rv:([0-9]+)\.([0-9]+).*/ + ], + search: uastring => { + return contains(uastring, 'msie') || contains(uastring, 'trident'); + } + }, + { + name: 'Opera', + versionRegexes: [ + normalVersionRegex, + /.*?opera\/([0-9]+)\.([0-9]+).*/ + ], + search: checkContains('opera') + }, + { + name: 'Firefox', + versionRegexes: [/.*?firefox\/\ ?([0-9]+)\.([0-9]+).*/], + search: checkContains('firefox') + }, + { + name: 'Safari', + versionRegexes: [ + normalVersionRegex, + /.*?cpu os ([0-9]+)_([0-9]+).*/ + ], + search: uastring => { + return (contains(uastring, 'safari') || contains(uastring, 'mobile/')) && contains(uastring, 'applewebkit'); + } + } + ]; + const oses = [ + { + name: 'Windows', + search: checkContains('win'), + versionRegexes: [/.*?windows\ nt\ ?([0-9]+)\.([0-9]+).*/] + }, + { + name: 'iOS', + search: uastring => { + return contains(uastring, 'iphone') || contains(uastring, 'ipad'); + }, + versionRegexes: [ + /.*?version\/\ ?([0-9]+)\.([0-9]+).*/, + /.*cpu os ([0-9]+)_([0-9]+).*/, + /.*cpu iphone os ([0-9]+)_([0-9]+).*/ + ] + }, + { + name: 'Android', + search: checkContains('android'), + versionRegexes: [/.*?android\ ?([0-9]+)\.([0-9]+).*/] + }, + { + name: 'macOS', + search: checkContains('mac os x'), + versionRegexes: [/.*?mac\ os\ x\ ?([0-9]+)_([0-9]+).*/] + }, + { + name: 'Linux', + search: checkContains('linux'), + versionRegexes: [] + }, + { + name: 'Solaris', + search: checkContains('sunos'), + versionRegexes: [] + }, + { + name: 'FreeBSD', + search: checkContains('freebsd'), + versionRegexes: [] + }, + { + name: 'ChromeOS', + search: checkContains('cros'), + versionRegexes: [/.*?chrome\/([0-9]+)\.([0-9]+).*/] + } + ]; + const PlatformInfo = { + browsers: constant(browsers), + oses: constant(oses) + }; + + const edge = 'Edge'; + const chromium = 'Chromium'; + const ie = 'IE'; + const opera = 'Opera'; + const firefox = 'Firefox'; + const safari = 'Safari'; + const unknown$1 = () => { + return nu$1({ + current: undefined, + version: Version.unknown() + }); + }; + const nu$1 = info => { + const current = info.current; + const version = info.version; + const isBrowser = name => () => current === name; + return { + current, + version, + isEdge: isBrowser(edge), + isChromium: isBrowser(chromium), + isIE: isBrowser(ie), + isOpera: isBrowser(opera), + isFirefox: isBrowser(firefox), + isSafari: isBrowser(safari) + }; + }; + const Browser = { + unknown: unknown$1, + nu: nu$1, + edge: constant(edge), + chromium: constant(chromium), + ie: constant(ie), + opera: constant(opera), + firefox: constant(firefox), + safari: constant(safari) + }; + + const windows = 'Windows'; + const ios = 'iOS'; + const android = 'Android'; + const linux = 'Linux'; + const macos = 'macOS'; + const solaris = 'Solaris'; + const freebsd = 'FreeBSD'; + const chromeos = 'ChromeOS'; + const unknown = () => { + return nu({ + current: undefined, + version: Version.unknown() + }); + }; + const nu = info => { + const current = info.current; + const version = info.version; + const isOS = name => () => current === name; + return { + current, + version, + isWindows: isOS(windows), + isiOS: isOS(ios), + isAndroid: isOS(android), + isMacOS: isOS(macos), + isLinux: isOS(linux), + isSolaris: isOS(solaris), + isFreeBSD: isOS(freebsd), + isChromeOS: isOS(chromeos) + }; + }; + const OperatingSystem = { + unknown, + nu, + windows: constant(windows), + ios: constant(ios), + android: constant(android), + linux: constant(linux), + macos: constant(macos), + solaris: constant(solaris), + freebsd: constant(freebsd), + chromeos: constant(chromeos) + }; + + const detect$3 = (userAgent, userAgentDataOpt, mediaMatch) => { + const browsers = PlatformInfo.browsers(); + const oses = PlatformInfo.oses(); + const browser = userAgentDataOpt.bind(userAgentData => detectBrowser$1(browsers, userAgentData)).orThunk(() => detectBrowser(browsers, userAgent)).fold(Browser.unknown, Browser.nu); + const os = detectOs(oses, userAgent).fold(OperatingSystem.unknown, OperatingSystem.nu); + const deviceType = DeviceType(os, browser, userAgent, mediaMatch); + return { + browser, + os, + deviceType + }; + }; + const PlatformDetection = { detect: detect$3 }; + + const mediaMatch = query => window.matchMedia(query).matches; + let platform = cached(() => PlatformDetection.detect(navigator.userAgent, Optional.from(navigator.userAgentData), mediaMatch)); + const detect$2 = () => platform(); + + const Dimension = (name, getOffset) => { + const set = (element, h) => { + if (!isNumber(h) && !h.match(/^[0-9]+$/)) { + throw new Error(name + '.set accepts only positive integer values. Value was ' + h); + } + const dom = element.dom; + if (isSupported(dom)) { + dom.style[name] = h + 'px'; + } + }; + const get = element => { + const r = getOffset(element); + if (r <= 0 || r === null) { + const css = get$a(element, name); + return parseFloat(css) || 0; + } + return r; + }; + const getOuter = get; + const aggregate = (element, properties) => foldl(properties, (acc, property) => { + const val = get$a(element, property); + const value = val === undefined ? 0 : parseInt(val, 10); + return isNaN(value) ? acc : acc + value; + }, 0); + const max = (element, value, properties) => { + const cumulativeInclusions = aggregate(element, properties); + const absoluteMax = value > cumulativeInclusions ? value - cumulativeInclusions : 0; + return absoluteMax; + }; + return { + set, + get, + getOuter, + aggregate, + max + }; + }; + + const toNumber = (px, fallback) => toFloat(px).getOr(fallback); + const getProp = (element, name, fallback) => toNumber(get$a(element, name), fallback); + const calcContentBoxSize = (element, size, upper, lower) => { + const paddingUpper = getProp(element, `padding-${ upper }`, 0); + const paddingLower = getProp(element, `padding-${ lower }`, 0); + const borderUpper = getProp(element, `border-${ upper }-width`, 0); + const borderLower = getProp(element, `border-${ lower }-width`, 0); + return size - paddingUpper - paddingLower - borderUpper - borderLower; + }; + const getCalculatedWidth = (element, boxSizing) => { + const dom = element.dom; + const width = dom.getBoundingClientRect().width || dom.offsetWidth; + return boxSizing === 'border-box' ? width : calcContentBoxSize(element, width, 'left', 'right'); + }; + const getHeight$1 = element => getProp(element, 'height', element.dom.offsetHeight); + const getWidth = element => getProp(element, 'width', element.dom.offsetWidth); + const getInnerWidth = element => getCalculatedWidth(element, 'content-box'); + + const api$2 = Dimension('width', element => element.dom.offsetWidth); + const get$9 = element => api$2.get(element); + const getOuter$2 = element => api$2.getOuter(element); + const getInner = getInnerWidth; + const getRuntime$1 = getWidth; + + const addCells = (gridRow, index, cells) => { + const existingCells = gridRow.cells; + const before = existingCells.slice(0, index); + const after = existingCells.slice(index); + const newCells = before.concat(cells).concat(after); + return setCells(gridRow, newCells); + }; + const addCell = (gridRow, index, cell) => addCells(gridRow, index, [cell]); + const mutateCell = (gridRow, index, cell) => { + const cells = gridRow.cells; + cells[index] = cell; + }; + const setCells = (gridRow, cells) => rowcells(gridRow.element, cells, gridRow.section, gridRow.isNew); + const mapCells = (gridRow, f) => { + const cells = gridRow.cells; + const r = map$1(cells, f); + return rowcells(gridRow.element, r, gridRow.section, gridRow.isNew); + }; + const getCell = (gridRow, index) => gridRow.cells[index]; + const getCellElement = (gridRow, index) => getCell(gridRow, index).element; + const cellLength = gridRow => gridRow.cells.length; + const extractGridDetails = grid => { + const result = partition(grid, row => row.section === 'colgroup'); + return { + rows: result.fail, + cols: result.pass + }; + }; + const clone = (gridRow, cloneRow, cloneCell) => { + const newCells = map$1(gridRow.cells, cloneCell); + return rowcells(cloneRow(gridRow.element), newCells, gridRow.section, true); + }; + + const LOCKED_COL_ATTR = 'data-snooker-locked-cols'; + const getLockedColumnsFromTable = table => getOpt(table, LOCKED_COL_ATTR).bind(lockedColStr => Optional.from(lockedColStr.match(/\d+/g))).map(lockedCols => mapToObject(lockedCols, always)); + const getLockedColumnsFromGrid = grid => { + const locked = foldl(extractGridDetails(grid).rows, (acc, row) => { + each$2(row.cells, (cell, idx) => { + if (cell.isLocked) { + acc[idx] = true; + } + }); + return acc; + }, {}); + const lockedArr = mapToArray(locked, (_val, key) => parseInt(key, 10)); + return sort$1(lockedArr); + }; + + const key = (row, column) => { + return row + ',' + column; + }; + const getAt = (warehouse, row, column) => Optional.from(warehouse.access[key(row, column)]); + const findItem = (warehouse, item, comparator) => { + const filtered = filterItems(warehouse, detail => { + return comparator(item, detail.element); + }); + return filtered.length > 0 ? Optional.some(filtered[0]) : Optional.none(); + }; + const filterItems = (warehouse, predicate) => { + const all = bind$2(warehouse.all, r => { + return r.cells; + }); + return filter$2(all, predicate); + }; + const generateColumns = rowData => { + const columnsGroup = {}; + let index = 0; + each$2(rowData.cells, column => { + const colspan = column.colspan; + range$1(colspan, columnIndex => { + const colIndex = index + columnIndex; + columnsGroup[colIndex] = columnext(column.element, colspan, colIndex); + }); + index += colspan; + }); + return columnsGroup; + }; + const generate$1 = list => { + const access = {}; + const cells = []; + const tableOpt = head(list).map(rowData => rowData.element).bind(table); + const lockedColumns = tableOpt.bind(getLockedColumnsFromTable).getOr({}); + let maxRows = 0; + let maxColumns = 0; + let rowCount = 0; + const { + pass: colgroupRows, + fail: rows + } = partition(list, rowData => rowData.section === 'colgroup'); + each$2(rows, rowData => { + const currentRow = []; + each$2(rowData.cells, rowCell => { + let start = 0; + while (access[key(rowCount, start)] !== undefined) { + start++; + } + const isLocked = hasNonNullableKey(lockedColumns, start.toString()); + const current = extended(rowCell.element, rowCell.rowspan, rowCell.colspan, rowCount, start, isLocked); + for (let occupiedColumnPosition = 0; occupiedColumnPosition < rowCell.colspan; occupiedColumnPosition++) { + for (let occupiedRowPosition = 0; occupiedRowPosition < rowCell.rowspan; occupiedRowPosition++) { + const rowPosition = rowCount + occupiedRowPosition; + const columnPosition = start + occupiedColumnPosition; + const newpos = key(rowPosition, columnPosition); + access[newpos] = current; + maxColumns = Math.max(maxColumns, columnPosition + 1); + } + } + currentRow.push(current); + }); + maxRows++; + cells.push(rowdetail(rowData.element, currentRow, rowData.section)); + rowCount++; + }); + const {columns, colgroups} = last$2(colgroupRows).map(rowData => { + const columns = generateColumns(rowData); + const colgroup$1 = colgroup(rowData.element, values(columns)); + return { + colgroups: [colgroup$1], + columns + }; + }).getOrThunk(() => ({ + colgroups: [], + columns: {} + })); + const grid$1 = grid(maxRows, maxColumns); + return { + grid: grid$1, + access, + all: cells, + columns, + colgroups + }; + }; + const fromTable = table => { + const list = fromTable$1(table); + return generate$1(list); + }; + const justCells = warehouse => bind$2(warehouse.all, w => w.cells); + const justColumns = warehouse => values(warehouse.columns); + const hasColumns = warehouse => keys(warehouse.columns).length > 0; + const getColumnAt = (warehouse, columnIndex) => Optional.from(warehouse.columns[columnIndex]); + const Warehouse = { + fromTable, + generate: generate$1, + getAt, + findItem, + filterItems, + justCells, + justColumns, + hasColumns, + getColumnAt + }; + + const columns = (warehouse, isValidCell = always) => { + const grid = warehouse.grid; + const cols = range$1(grid.columns, identity); + const rowsArr = range$1(grid.rows, identity); + return map$1(cols, col => { + const getBlock = () => bind$2(rowsArr, r => Warehouse.getAt(warehouse, r, col).filter(detail => detail.column === col).toArray()); + const isValid = detail => detail.colspan === 1 && isValidCell(detail.element); + const getFallback = () => Warehouse.getAt(warehouse, 0, col); + return decide(getBlock, isValid, getFallback); + }); + }; + const decide = (getBlock, isValid, getFallback) => { + const inBlock = getBlock(); + const validInBlock = find$1(inBlock, isValid); + const detailOption = validInBlock.orThunk(() => Optional.from(inBlock[0]).orThunk(getFallback)); + return detailOption.map(detail => detail.element); + }; + const rows = warehouse => { + const grid = warehouse.grid; + const rowsArr = range$1(grid.rows, identity); + const cols = range$1(grid.columns, identity); + return map$1(rowsArr, row => { + const getBlock = () => bind$2(cols, c => Warehouse.getAt(warehouse, row, c).filter(detail => detail.row === row).fold(constant([]), detail => [detail])); + const isSingle = detail => detail.rowspan === 1; + const getFallback = () => Warehouse.getAt(warehouse, row, 0); + return decide(getBlock, isSingle, getFallback); + }); + }; + + const deduce = (xs, index) => { + if (index < 0 || index >= xs.length - 1) { + return Optional.none(); + } + const current = xs[index].fold(() => { + const rest = reverse(xs.slice(0, index)); + return findMap(rest, (a, i) => a.map(aa => ({ + value: aa, + delta: i + 1 + }))); + }, c => Optional.some({ + value: c, + delta: 0 + })); + const next = xs[index + 1].fold(() => { + const rest = xs.slice(index + 1); + return findMap(rest, (a, i) => a.map(aa => ({ + value: aa, + delta: i + 1 + }))); + }, n => Optional.some({ + value: n, + delta: 1 + })); + return current.bind(c => next.map(n => { + const extras = n.delta + c.delta; + return Math.abs(n.value - c.value) / extras; + })); + }; + + const onDirection = (isLtr, isRtl) => element => getDirection(element) === 'rtl' ? isRtl : isLtr; + const getDirection = element => get$a(element, 'direction') === 'rtl' ? 'rtl' : 'ltr'; + + const api$1 = Dimension('height', element => { + const dom = element.dom; + return inBody(element) ? dom.getBoundingClientRect().height : dom.offsetHeight; + }); + const get$8 = element => api$1.get(element); + const getOuter$1 = element => api$1.getOuter(element); + const getRuntime = getHeight$1; + + const r = (left, top) => { + const translate = (x, y) => r(left + x, top + y); + return { + left, + top, + translate + }; + }; + const SugarPosition = r; + + const boxPosition = dom => { + const box = dom.getBoundingClientRect(); + return SugarPosition(box.left, box.top); + }; + const firstDefinedOrZero = (a, b) => { + if (a !== undefined) { + return a; + } else { + return b !== undefined ? b : 0; + } + }; + const absolute = element => { + const doc = element.dom.ownerDocument; + const body = doc.body; + const win = doc.defaultView; + const html = doc.documentElement; + if (body === element.dom) { + return SugarPosition(body.offsetLeft, body.offsetTop); + } + const scrollTop = firstDefinedOrZero(win === null || win === void 0 ? void 0 : win.pageYOffset, html.scrollTop); + const scrollLeft = firstDefinedOrZero(win === null || win === void 0 ? void 0 : win.pageXOffset, html.scrollLeft); + const clientTop = firstDefinedOrZero(html.clientTop, body.clientTop); + const clientLeft = firstDefinedOrZero(html.clientLeft, body.clientLeft); + return viewport(element).translate(scrollLeft - clientLeft, scrollTop - clientTop); + }; + const viewport = element => { + const dom = element.dom; + const doc = dom.ownerDocument; + const body = doc.body; + if (body === dom) { + return SugarPosition(body.offsetLeft, body.offsetTop); + } + if (!inBody(element)) { + return SugarPosition(0, 0); + } + return boxPosition(dom); + }; + + const rowInfo = (row, y) => ({ + row, + y + }); + const colInfo = (col, x) => ({ + col, + x + }); + const rtlEdge = cell => { + const pos = absolute(cell); + return pos.left + getOuter$2(cell); + }; + const ltrEdge = cell => { + return absolute(cell).left; + }; + const getLeftEdge = (index, cell) => { + return colInfo(index, ltrEdge(cell)); + }; + const getRightEdge = (index, cell) => { + return colInfo(index, rtlEdge(cell)); + }; + const getTop$1 = cell => { + return absolute(cell).top; + }; + const getTopEdge = (index, cell) => { + return rowInfo(index, getTop$1(cell)); + }; + const getBottomEdge = (index, cell) => { + return rowInfo(index, getTop$1(cell) + getOuter$1(cell)); + }; + const findPositions = (getInnerEdge, getOuterEdge, array) => { + if (array.length === 0) { + return []; + } + const lines = map$1(array.slice(1), (cellOption, index) => { + return cellOption.map(cell => { + return getInnerEdge(index, cell); + }); + }); + const lastLine = array[array.length - 1].map(cell => { + return getOuterEdge(array.length - 1, cell); + }); + return lines.concat([lastLine]); + }; + const negate = step => { + return -step; + }; + const height = { + delta: identity, + positions: optElements => findPositions(getTopEdge, getBottomEdge, optElements), + edge: getTop$1 + }; + const ltr$1 = { + delta: identity, + edge: ltrEdge, + positions: optElements => findPositions(getLeftEdge, getRightEdge, optElements) + }; + const rtl$1 = { + delta: negate, + edge: rtlEdge, + positions: optElements => findPositions(getRightEdge, getLeftEdge, optElements) + }; + const detect$1 = onDirection(ltr$1, rtl$1); + const width = { + delta: (amount, table) => detect$1(table).delta(amount, table), + positions: (cols, table) => detect$1(table).positions(cols, table), + edge: cell => detect$1(cell).edge(cell) + }; + + const units = { + unsupportedLength: [ + 'em', + 'ex', + 'cap', + 'ch', + 'ic', + 'rem', + 'lh', + 'rlh', + 'vw', + 'vh', + 'vi', + 'vb', + 'vmin', + 'vmax', + 'cm', + 'mm', + 'Q', + 'in', + 'pc', + 'pt', + 'px' + ], + fixed: [ + 'px', + 'pt' + ], + relative: ['%'], + empty: [''] + }; + const pattern = (() => { + const decimalDigits = '[0-9]+'; + const signedInteger = '[+-]?' + decimalDigits; + const exponentPart = '[eE]' + signedInteger; + const dot = '\\.'; + const opt = input => `(?:${ input })?`; + const unsignedDecimalLiteral = [ + 'Infinity', + decimalDigits + dot + opt(decimalDigits) + opt(exponentPart), + dot + decimalDigits + opt(exponentPart), + decimalDigits + opt(exponentPart) + ].join('|'); + const float = `[+-]?(?:${ unsignedDecimalLiteral })`; + return new RegExp(`^(${ float })(.*)$`); + })(); + const isUnit = (unit, accepted) => exists(accepted, acc => exists(units[acc], check => unit === check)); + const parse = (input, accepted) => { + const match = Optional.from(pattern.exec(input)); + return match.bind(array => { + const value = Number(array[1]); + const unitRaw = array[2]; + if (isUnit(unitRaw, accepted)) { + return Optional.some({ + value, + unit: unitRaw + }); + } else { + return Optional.none(); + } + }); + }; + + const rPercentageBasedSizeRegex = /(\d+(\.\d+)?)%/; + const rPixelBasedSizeRegex = /(\d+(\.\d+)?)px|em/; + const isCol$2 = isTag('col'); + const getPercentSize = (elm, outerGetter, innerGetter) => { + const relativeParent = parentElement(elm).getOrThunk(() => getBody$1(owner(elm))); + return outerGetter(elm) / innerGetter(relativeParent) * 100; + }; + const setPixelWidth = (cell, amount) => { + set$1(cell, 'width', amount + 'px'); + }; + const setPercentageWidth = (cell, amount) => { + set$1(cell, 'width', amount + '%'); + }; + const setHeight = (cell, amount) => { + set$1(cell, 'height', amount + 'px'); + }; + const getHeightValue = cell => getRuntime(cell) + 'px'; + const convert = (cell, number, getter, setter) => { + const newSize = table(cell).map(table => { + const total = getter(table); + return Math.floor(number / 100 * total); + }).getOr(number); + setter(cell, newSize); + return newSize; + }; + const normalizePixelSize = (value, cell, getter, setter) => { + const number = parseFloat(value); + return endsWith(value, '%') && name(cell) !== 'table' ? convert(cell, number, getter, setter) : number; + }; + const getTotalHeight = cell => { + const value = getHeightValue(cell); + if (!value) { + return get$8(cell); + } + return normalizePixelSize(value, cell, get$8, setHeight); + }; + const get$7 = (cell, type, f) => { + const v = f(cell); + const span = getSpan(cell, type); + return v / span; + }; + const getRaw$1 = (element, prop) => { + return getRaw$2(element, prop).orThunk(() => { + return getOpt(element, prop).map(val => val + 'px'); + }); + }; + const getRawWidth$1 = element => getRaw$1(element, 'width'); + const getRawHeight = element => getRaw$1(element, 'height'); + const getPercentageWidth = cell => getPercentSize(cell, get$9, getInner); + const getPixelWidth$1 = cell => isCol$2(cell) ? get$9(cell) : getRuntime$1(cell); + const getHeight = cell => { + return get$7(cell, 'rowspan', getTotalHeight); + }; + const getGenericWidth = cell => { + const width = getRawWidth$1(cell); + return width.bind(w => parse(w, [ + 'fixed', + 'relative', + 'empty' + ])); + }; + const setGenericWidth = (cell, amount, unit) => { + set$1(cell, 'width', amount + unit); + }; + const getPixelTableWidth = table => get$9(table) + 'px'; + const getPercentTableWidth = table => getPercentSize(table, get$9, getInner) + '%'; + const isPercentSizing$1 = table => getRawWidth$1(table).exists(size => rPercentageBasedSizeRegex.test(size)); + const isPixelSizing$1 = table => getRawWidth$1(table).exists(size => rPixelBasedSizeRegex.test(size)); + const isNoneSizing$1 = table => getRawWidth$1(table).isNone(); + const percentageBasedSizeRegex = constant(rPercentageBasedSizeRegex); + + const isCol$1 = isTag('col'); + const getRawW = cell => { + return getRawWidth$1(cell).getOrThunk(() => getPixelWidth$1(cell) + 'px'); + }; + const getRawH = cell => { + return getRawHeight(cell).getOrThunk(() => getHeight(cell) + 'px'); + }; + const justCols = warehouse => map$1(Warehouse.justColumns(warehouse), column => Optional.from(column.element)); + const isValidColumn = cell => { + const browser = detect$2().browser; + const supportsColWidths = browser.isChromium() || browser.isFirefox(); + return isCol$1(cell) ? supportsColWidths : true; + }; + const getDimension = (cellOpt, index, backups, filter, getter, fallback) => cellOpt.filter(filter).fold(() => fallback(deduce(backups, index)), cell => getter(cell)); + const getWidthFrom = (warehouse, table, getWidth, fallback) => { + const columnCells = columns(warehouse); + const columns$1 = Warehouse.hasColumns(warehouse) ? justCols(warehouse) : columnCells; + const backups = [Optional.some(width.edge(table))].concat(map$1(width.positions(columnCells, table), pos => pos.map(p => p.x))); + const colFilter = not(hasColspan); + return map$1(columns$1, (cellOption, c) => { + return getDimension(cellOption, c, backups, colFilter, column => { + if (isValidColumn(column)) { + return getWidth(column); + } else { + const cell = bindFrom(columnCells[c], identity); + return getDimension(cell, c, backups, colFilter, cell => fallback(Optional.some(get$9(cell))), fallback); + } + }, fallback); + }); + }; + const getDeduced = deduced => { + return deduced.map(d => { + return d + 'px'; + }).getOr(''); + }; + const getRawWidths = (warehouse, table) => { + return getWidthFrom(warehouse, table, getRawW, getDeduced); + }; + const getPercentageWidths = (warehouse, table, tableSize) => { + return getWidthFrom(warehouse, table, getPercentageWidth, deduced => { + return deduced.fold(() => { + return tableSize.minCellWidth(); + }, cellWidth => { + return cellWidth / tableSize.pixelWidth() * 100; + }); + }); + }; + const getPixelWidths = (warehouse, table, tableSize) => { + return getWidthFrom(warehouse, table, getPixelWidth$1, deduced => { + return deduced.getOrThunk(tableSize.minCellWidth); + }); + }; + const getHeightFrom = (warehouse, table, direction, getHeight, fallback) => { + const rows$1 = rows(warehouse); + const backups = [Optional.some(direction.edge(table))].concat(map$1(direction.positions(rows$1, table), pos => pos.map(p => p.y))); + return map$1(rows$1, (cellOption, c) => { + return getDimension(cellOption, c, backups, not(hasRowspan), getHeight, fallback); + }); + }; + const getPixelHeights = (warehouse, table, direction) => { + return getHeightFrom(warehouse, table, direction, getHeight, deduced => { + return deduced.getOrThunk(minHeight); + }); + }; + const getRawHeights = (warehouse, table, direction) => { + return getHeightFrom(warehouse, table, direction, getRawH, getDeduced); + }; + + const widthLookup = (table, getter) => () => { + if (inBody(table)) { + return getter(table); + } else { + return parseFloat(getRaw$2(table, 'width').getOr('0')); + } + }; + const noneSize = table => { + const getWidth = widthLookup(table, get$9); + const zero = constant(0); + const getWidths = (warehouse, tableSize) => getPixelWidths(warehouse, table, tableSize); + return { + width: getWidth, + pixelWidth: getWidth, + getWidths, + getCellDelta: zero, + singleColumnWidth: constant([0]), + minCellWidth: zero, + setElementWidth: noop, + adjustTableWidth: noop, + isRelative: true, + label: 'none' + }; + }; + const percentageSize = table => { + const getFloatWidth = widthLookup(table, elem => parseFloat(getPercentTableWidth(elem))); + const getWidth = widthLookup(table, get$9); + const getCellDelta = delta => delta / getWidth() * 100; + const singleColumnWidth = (w, _delta) => [100 - w]; + const minCellWidth = () => minWidth() / getWidth() * 100; + const adjustTableWidth = delta => { + const currentWidth = getFloatWidth(); + const change = delta / 100 * currentWidth; + const newWidth = currentWidth + change; + setPercentageWidth(table, newWidth); + }; + const getWidths = (warehouse, tableSize) => getPercentageWidths(warehouse, table, tableSize); + return { + width: getFloatWidth, + pixelWidth: getWidth, + getWidths, + getCellDelta, + singleColumnWidth, + minCellWidth, + setElementWidth: setPercentageWidth, + adjustTableWidth, + isRelative: true, + label: 'percent' + }; + }; + const pixelSize = table => { + const getWidth = widthLookup(table, get$9); + const getCellDelta = identity; + const singleColumnWidth = (w, delta) => { + const newNext = Math.max(minWidth(), w + delta); + return [newNext - w]; + }; + const adjustTableWidth = delta => { + const newWidth = getWidth() + delta; + setPixelWidth(table, newWidth); + }; + const getWidths = (warehouse, tableSize) => getPixelWidths(warehouse, table, tableSize); + return { + width: getWidth, + pixelWidth: getWidth, + getWidths, + getCellDelta, + singleColumnWidth, + minCellWidth: minWidth, + setElementWidth: setPixelWidth, + adjustTableWidth, + isRelative: false, + label: 'pixel' + }; + }; + const chooseSize = (element, width) => { + const percentMatch = percentageBasedSizeRegex().exec(width); + if (percentMatch !== null) { + return percentageSize(element); + } else { + return pixelSize(element); + } + }; + const getTableSize = table => { + const width = getRawWidth$1(table); + return width.fold(() => noneSize(table), w => chooseSize(table, w)); + }; + const TableSize = { + getTableSize, + pixelSize, + percentageSize, + noneSize + }; + + const statsStruct = (minRow, minCol, maxRow, maxCol, allCells, selectedCells) => ({ + minRow, + minCol, + maxRow, + maxCol, + allCells, + selectedCells + }); + const findSelectedStats = (house, isSelected) => { + const totalColumns = house.grid.columns; + const totalRows = house.grid.rows; + let minRow = totalRows; + let minCol = totalColumns; + let maxRow = 0; + let maxCol = 0; + const allCells = []; + const selectedCells = []; + each$1(house.access, detail => { + allCells.push(detail); + if (isSelected(detail)) { + selectedCells.push(detail); + const startRow = detail.row; + const endRow = startRow + detail.rowspan - 1; + const startCol = detail.column; + const endCol = startCol + detail.colspan - 1; + if (startRow < minRow) { + minRow = startRow; + } else if (endRow > maxRow) { + maxRow = endRow; + } + if (startCol < minCol) { + minCol = startCol; + } else if (endCol > maxCol) { + maxCol = endCol; + } + } + }); + return statsStruct(minRow, minCol, maxRow, maxCol, allCells, selectedCells); + }; + const makeCell = (list, seenSelected, rowIndex) => { + const row = list[rowIndex].element; + const td = SugarElement.fromTag('td'); + append$1(td, SugarElement.fromTag('br')); + const f = seenSelected ? append$1 : prepend; + f(row, td); + }; + const fillInGaps = (list, house, stats, isSelected) => { + const rows = filter$2(list, row => row.section !== 'colgroup'); + const totalColumns = house.grid.columns; + const totalRows = house.grid.rows; + for (let i = 0; i < totalRows; i++) { + let seenSelected = false; + for (let j = 0; j < totalColumns; j++) { + if (!(i < stats.minRow || i > stats.maxRow || j < stats.minCol || j > stats.maxCol)) { + const needCell = Warehouse.getAt(house, i, j).filter(isSelected).isNone(); + if (needCell) { + makeCell(rows, seenSelected, i); + } else { + seenSelected = true; + } + } + } + } + }; + const clean = (replica, stats, house, widthDelta) => { + each$1(house.columns, col => { + if (col.column < stats.minCol || col.column > stats.maxCol) { + remove$6(col.element); + } + }); + const emptyRows = filter$2(firstLayer(replica, 'tr'), row => row.dom.childElementCount === 0); + each$2(emptyRows, remove$6); + if (stats.minCol === stats.maxCol || stats.minRow === stats.maxRow) { + each$2(firstLayer(replica, 'th,td'), cell => { + remove$7(cell, 'rowspan'); + remove$7(cell, 'colspan'); + }); + } + remove$7(replica, LOCKED_COL_ATTR); + remove$7(replica, 'data-snooker-col-series'); + const tableSize = TableSize.getTableSize(replica); + tableSize.adjustTableWidth(widthDelta); + }; + const getTableWidthDelta = (table, warehouse, tableSize, stats) => { + if (stats.minCol === 0 && warehouse.grid.columns === stats.maxCol + 1) { + return 0; + } + const colWidths = getPixelWidths(warehouse, table, tableSize); + const allColsWidth = foldl(colWidths, (acc, width) => acc + width, 0); + const selectedColsWidth = foldl(colWidths.slice(stats.minCol, stats.maxCol + 1), (acc, width) => acc + width, 0); + const newWidth = selectedColsWidth / allColsWidth * tableSize.pixelWidth(); + const delta = newWidth - tableSize.pixelWidth(); + return tableSize.getCellDelta(delta); + }; + const extract$1 = (table, selectedSelector) => { + const isSelected = detail => is$2(detail.element, selectedSelector); + const replica = deep(table); + const list = fromTable$1(replica); + const tableSize = TableSize.getTableSize(table); + const replicaHouse = Warehouse.generate(list); + const replicaStats = findSelectedStats(replicaHouse, isSelected); + const selector = 'th:not(' + selectedSelector + ')' + ',td:not(' + selectedSelector + ')'; + const unselectedCells = filterFirstLayer(replica, 'th,td', cell => is$2(cell, selector)); + each$2(unselectedCells, remove$6); + fillInGaps(list, replicaHouse, replicaStats, isSelected); + const house = Warehouse.fromTable(table); + const widthDelta = getTableWidthDelta(table, house, tableSize, replicaStats); + clean(replica, replicaStats, replicaHouse, widthDelta); + return replica; + }; + + const nbsp = '\xA0'; + + const NodeValue = (is, name) => { + const get = element => { + if (!is(element)) { + throw new Error('Can only get ' + name + ' value of a ' + name + ' node'); + } + return getOption(element).getOr(''); + }; + const getOption = element => is(element) ? Optional.from(element.dom.nodeValue) : Optional.none(); + const set = (element, value) => { + if (!is(element)) { + throw new Error('Can only set raw ' + name + ' value of a ' + name + ' node'); + } + element.dom.nodeValue = value; + }; + return { + get, + getOption, + set + }; + }; + + const api = NodeValue(isText, 'text'); + const get$6 = element => api.get(element); + const getOption = element => api.getOption(element); + const set = (element, value) => api.set(element, value); + + const getEnd = element => name(element) === 'img' ? 1 : getOption(element).fold(() => children$2(element).length, v => v.length); + const isTextNodeWithCursorPosition = el => getOption(el).filter(text => text.trim().length !== 0 || text.indexOf(nbsp) > -1).isSome(); + const elementsWithCursorPosition = [ + 'img', + 'br' + ]; + const isCursorPosition = elem => { + const hasCursorPosition = isTextNodeWithCursorPosition(elem); + return hasCursorPosition || contains$2(elementsWithCursorPosition, name(elem)); + }; + + const first = element => descendant$1(element, isCursorPosition); + const last$1 = element => descendantRtl(element, isCursorPosition); + const descendantRtl = (scope, predicate) => { + const descend = element => { + const children = children$2(element); + for (let i = children.length - 1; i >= 0; i--) { + const child = children[i]; + if (predicate(child)) { + return Optional.some(child); + } + const res = descend(child); + if (res.isSome()) { + return res; + } + } + return Optional.none(); + }; + return descend(scope); + }; + + const transferableAttributes = { + scope: [ + 'row', + 'col' + ] + }; + const createCell = doc => () => { + const td = SugarElement.fromTag('td', doc.dom); + append$1(td, SugarElement.fromTag('br', doc.dom)); + return td; + }; + const createCol = doc => () => { + return SugarElement.fromTag('col', doc.dom); + }; + const createColgroup = doc => () => { + return SugarElement.fromTag('colgroup', doc.dom); + }; + const createRow$1 = doc => () => { + return SugarElement.fromTag('tr', doc.dom); + }; + const replace$1 = (cell, tag, attrs) => { + const replica = copy$2(cell, tag); + each$1(attrs, (v, k) => { + if (v === null) { + remove$7(replica, k); + } else { + set$2(replica, k, v); + } + }); + return replica; + }; + const pasteReplace = cell => { + return cell; + }; + const cloneFormats = (oldCell, newCell, formats) => { + const first$1 = first(oldCell); + return first$1.map(firstText => { + const formatSelector = formats.join(','); + const parents = ancestors$3(firstText, formatSelector, element => { + return eq$1(element, oldCell); + }); + return foldr(parents, (last, parent) => { + const clonedFormat = shallow(parent); + remove$7(clonedFormat, 'contenteditable'); + append$1(last, clonedFormat); + return clonedFormat; + }, newCell); + }).getOr(newCell); + }; + const cloneAppropriateAttributes = (original, clone) => { + each$1(transferableAttributes, (validAttributes, attributeName) => getOpt(original, attributeName).filter(attribute => contains$2(validAttributes, attribute)).each(attribute => set$2(clone, attributeName, attribute))); + }; + const cellOperations = (mutate, doc, formatsToClone) => { + const cloneCss = (prev, clone) => { + copy$1(prev.element, clone); + remove$5(clone, 'height'); + if (prev.colspan !== 1) { + remove$5(clone, 'width'); + } + }; + const newCell = prev => { + const td = SugarElement.fromTag(name(prev.element), doc.dom); + const formats = formatsToClone.getOr([ + 'strong', + 'em', + 'b', + 'i', + 'span', + 'font', + 'h1', + 'h2', + 'h3', + 'h4', + 'h5', + 'h6', + 'p', + 'div' + ]); + const lastNode = formats.length > 0 ? cloneFormats(prev.element, td, formats) : td; + append$1(lastNode, SugarElement.fromTag('br')); + cloneCss(prev, td); + cloneAppropriateAttributes(prev.element, td); + mutate(prev.element, td); + return td; + }; + const newCol = prev => { + const col = SugarElement.fromTag(name(prev.element), doc.dom); + cloneCss(prev, col); + mutate(prev.element, col); + return col; + }; + return { + col: newCol, + colgroup: createColgroup(doc), + row: createRow$1(doc), + cell: newCell, + replace: replace$1, + colGap: createCol(doc), + gap: createCell(doc) + }; + }; + const paste$1 = doc => { + return { + col: createCol(doc), + colgroup: createColgroup(doc), + row: createRow$1(doc), + cell: createCell(doc), + replace: pasteReplace, + colGap: createCol(doc), + gap: createCell(doc) + }; + }; + + const fromHtml = (html, scope) => { + const doc = scope || document; + const div = doc.createElement('div'); + div.innerHTML = html; + return children$2(SugarElement.fromDom(div)); + }; + const fromDom = nodes => map$1(nodes, SugarElement.fromDom); + + const getBody = editor => SugarElement.fromDom(editor.getBody()); + const getIsRoot = editor => element => eq$1(element, getBody(editor)); + const removeDataStyle = table => { + remove$7(table, 'data-mce-style'); + const removeStyleAttribute = element => remove$7(element, 'data-mce-style'); + each$2(cells$1(table), removeStyleAttribute); + each$2(columns$1(table), removeStyleAttribute); + each$2(rows$1(table), removeStyleAttribute); + }; + const getSelectionStart = editor => SugarElement.fromDom(editor.selection.getStart()); + const getPixelWidth = elm => elm.getBoundingClientRect().width; + const getPixelHeight = elm => elm.getBoundingClientRect().height; + const getRawWidth = (editor, elm) => { + const raw = editor.dom.getStyle(elm, 'width') || editor.dom.getAttrib(elm, 'width'); + return Optional.from(raw).filter(isNotEmpty); + }; + const isPercentage$1 = value => /^(\d+(\.\d+)?)%$/.test(value); + const isPixel = value => /^(\d+(\.\d+)?)px$/.test(value); + + const inSelection = (bounds, detail) => { + const leftEdge = detail.column; + const rightEdge = detail.column + detail.colspan - 1; + const topEdge = detail.row; + const bottomEdge = detail.row + detail.rowspan - 1; + return leftEdge <= bounds.finishCol && rightEdge >= bounds.startCol && (topEdge <= bounds.finishRow && bottomEdge >= bounds.startRow); + }; + const isWithin = (bounds, detail) => { + return detail.column >= bounds.startCol && detail.column + detail.colspan - 1 <= bounds.finishCol && detail.row >= bounds.startRow && detail.row + detail.rowspan - 1 <= bounds.finishRow; + }; + const isRectangular = (warehouse, bounds) => { + let isRect = true; + const detailIsWithin = curry(isWithin, bounds); + for (let i = bounds.startRow; i <= bounds.finishRow; i++) { + for (let j = bounds.startCol; j <= bounds.finishCol; j++) { + isRect = isRect && Warehouse.getAt(warehouse, i, j).exists(detailIsWithin); + } + } + return isRect ? Optional.some(bounds) : Optional.none(); + }; + + const getBounds = (detailA, detailB) => { + return bounds(Math.min(detailA.row, detailB.row), Math.min(detailA.column, detailB.column), Math.max(detailA.row + detailA.rowspan - 1, detailB.row + detailB.rowspan - 1), Math.max(detailA.column + detailA.colspan - 1, detailB.column + detailB.colspan - 1)); + }; + const getAnyBox = (warehouse, startCell, finishCell) => { + const startCoords = Warehouse.findItem(warehouse, startCell, eq$1); + const finishCoords = Warehouse.findItem(warehouse, finishCell, eq$1); + return startCoords.bind(sc => { + return finishCoords.map(fc => { + return getBounds(sc, fc); + }); + }); + }; + const getBox$1 = (warehouse, startCell, finishCell) => { + return getAnyBox(warehouse, startCell, finishCell).bind(bounds => { + return isRectangular(warehouse, bounds); + }); + }; + + const moveBy$1 = (warehouse, cell, row, column) => { + return Warehouse.findItem(warehouse, cell, eq$1).bind(detail => { + const startRow = row > 0 ? detail.row + detail.rowspan - 1 : detail.row; + const startCol = column > 0 ? detail.column + detail.colspan - 1 : detail.column; + const dest = Warehouse.getAt(warehouse, startRow + row, startCol + column); + return dest.map(d => { + return d.element; + }); + }); + }; + const intercepts$1 = (warehouse, start, finish) => { + return getAnyBox(warehouse, start, finish).map(bounds => { + const inside = Warehouse.filterItems(warehouse, curry(inSelection, bounds)); + return map$1(inside, detail => { + return detail.element; + }); + }); + }; + const parentCell = (warehouse, innerCell) => { + const isContainedBy = (c1, c2) => { + return contains$1(c2, c1); + }; + return Warehouse.findItem(warehouse, innerCell, isContainedBy).map(detail => { + return detail.element; + }); + }; + + const moveBy = (cell, deltaRow, deltaColumn) => { + return table(cell).bind(table => { + const warehouse = getWarehouse(table); + return moveBy$1(warehouse, cell, deltaRow, deltaColumn); + }); + }; + const intercepts = (table, first, last) => { + const warehouse = getWarehouse(table); + return intercepts$1(warehouse, first, last); + }; + const nestedIntercepts = (table, first, firstTable, last, lastTable) => { + const warehouse = getWarehouse(table); + const optStartCell = eq$1(table, firstTable) ? Optional.some(first) : parentCell(warehouse, first); + const optLastCell = eq$1(table, lastTable) ? Optional.some(last) : parentCell(warehouse, last); + return optStartCell.bind(startCell => optLastCell.bind(lastCell => intercepts$1(warehouse, startCell, lastCell))); + }; + const getBox = (table, first, last) => { + const warehouse = getWarehouse(table); + return getBox$1(warehouse, first, last); + }; + const getWarehouse = Warehouse.fromTable; + + var TagBoundaries = [ + 'body', + 'p', + 'div', + 'article', + 'aside', + 'figcaption', + 'figure', + 'footer', + 'header', + 'nav', + 'section', + 'ol', + 'ul', + 'li', + 'table', + 'thead', + 'tbody', + 'tfoot', + 'caption', + 'tr', + 'td', + 'th', + 'h1', + 'h2', + 'h3', + 'h4', + 'h5', + 'h6', + 'blockquote', + 'pre', + 'address' + ]; + + var DomUniverse = () => { + const clone = element => { + return SugarElement.fromDom(element.dom.cloneNode(false)); + }; + const document = element => documentOrOwner(element).dom; + const isBoundary = element => { + if (!isElement(element)) { + return false; + } + if (name(element) === 'body') { + return true; + } + return contains$2(TagBoundaries, name(element)); + }; + const isEmptyTag = element => { + if (!isElement(element)) { + return false; + } + return contains$2([ + 'br', + 'img', + 'hr', + 'input' + ], name(element)); + }; + const isNonEditable = element => isElement(element) && get$b(element, 'contenteditable') === 'false'; + const comparePosition = (element, other) => { + return element.dom.compareDocumentPosition(other.dom); + }; + const copyAttributesTo = (source, destination) => { + const as = clone$2(source); + setAll$1(destination, as); + }; + const isSpecial = element => { + const tag = name(element); + return contains$2([ + 'script', + 'noscript', + 'iframe', + 'noframes', + 'noembed', + 'title', + 'style', + 'textarea', + 'xmp' + ], tag); + }; + const getLanguage = element => isElement(element) ? getOpt(element, 'lang') : Optional.none(); + return { + up: constant({ + selector: ancestor$1, + closest: closest$1, + predicate: ancestor$2, + all: parents + }), + down: constant({ + selector: descendants, + predicate: descendants$1 + }), + styles: constant({ + get: get$a, + getRaw: getRaw$2, + set: set$1, + remove: remove$5 + }), + attrs: constant({ + get: get$b, + set: set$2, + remove: remove$7, + copyTo: copyAttributesTo + }), + insert: constant({ + before: before$3, + after: after$5, + afterAll: after$4, + append: append$1, + appendAll: append, + prepend: prepend, + wrap: wrap + }), + remove: constant({ + unwrap: unwrap, + remove: remove$6 + }), + create: constant({ + nu: SugarElement.fromTag, + clone, + text: SugarElement.fromText + }), + query: constant({ + comparePosition, + prevSibling: prevSibling, + nextSibling: nextSibling + }), + property: constant({ + children: children$2, + name: name, + parent: parent, + document, + isText: isText, + isComment: isComment, + isElement: isElement, + isSpecial, + getLanguage, + getText: get$6, + setText: set, + isBoundary, + isEmptyTag, + isNonEditable + }), + eq: eq$1, + is: is$1 + }; + }; + + const all = (universe, look, elements, f) => { + const head = elements[0]; + const tail = elements.slice(1); + return f(universe, look, head, tail); + }; + const oneAll = (universe, look, elements) => { + return elements.length > 0 ? all(universe, look, elements, unsafeOne) : Optional.none(); + }; + const unsafeOne = (universe, look, head, tail) => { + const start = look(universe, head); + return foldr(tail, (b, a) => { + const current = look(universe, a); + return commonElement(universe, b, current); + }, start); + }; + const commonElement = (universe, start, end) => { + return start.bind(s => { + return end.filter(curry(universe.eq, s)); + }); + }; + + const eq = (universe, item) => { + return curry(universe.eq, item); + }; + const ancestors$2 = (universe, start, end, isRoot = never) => { + const ps1 = [start].concat(universe.up().all(start)); + const ps2 = [end].concat(universe.up().all(end)); + const prune = path => { + const index = findIndex(path, isRoot); + return index.fold(() => { + return path; + }, ind => { + return path.slice(0, ind + 1); + }); + }; + const pruned1 = prune(ps1); + const pruned2 = prune(ps2); + const shared = find$1(pruned1, x => { + return exists(pruned2, eq(universe, x)); + }); + return { + firstpath: pruned1, + secondpath: pruned2, + shared + }; + }; + + const sharedOne$1 = oneAll; + const ancestors$1 = ancestors$2; + + const universe$3 = DomUniverse(); + const sharedOne = (look, elements) => { + return sharedOne$1(universe$3, (_universe, element) => { + return look(element); + }, elements); + }; + const ancestors = (start, finish, isRoot) => { + return ancestors$1(universe$3, start, finish, isRoot); + }; + + const lookupTable = container => { + return ancestor$1(container, 'table'); + }; + const identify = (start, finish, isRoot) => { + const getIsRoot = rootTable => { + return element => { + return isRoot !== undefined && isRoot(element) || eq$1(element, rootTable); + }; + }; + if (eq$1(start, finish)) { + return Optional.some({ + boxes: Optional.some([start]), + start, + finish + }); + } else { + return lookupTable(start).bind(startTable => { + return lookupTable(finish).bind(finishTable => { + if (eq$1(startTable, finishTable)) { + return Optional.some({ + boxes: intercepts(startTable, start, finish), + start, + finish + }); + } else if (contains$1(startTable, finishTable)) { + const ancestorCells = ancestors$3(finish, 'td,th', getIsRoot(startTable)); + const finishCell = ancestorCells.length > 0 ? ancestorCells[ancestorCells.length - 1] : finish; + return Optional.some({ + boxes: nestedIntercepts(startTable, start, startTable, finish, finishTable), + start, + finish: finishCell + }); + } else if (contains$1(finishTable, startTable)) { + const ancestorCells = ancestors$3(start, 'td,th', getIsRoot(finishTable)); + const startCell = ancestorCells.length > 0 ? ancestorCells[ancestorCells.length - 1] : start; + return Optional.some({ + boxes: nestedIntercepts(finishTable, start, startTable, finish, finishTable), + start, + finish: startCell + }); + } else { + return ancestors(start, finish).shared.bind(lca => { + return closest$1(lca, 'table', isRoot).bind(lcaTable => { + const finishAncestorCells = ancestors$3(finish, 'td,th', getIsRoot(lcaTable)); + const finishCell = finishAncestorCells.length > 0 ? finishAncestorCells[finishAncestorCells.length - 1] : finish; + const startAncestorCells = ancestors$3(start, 'td,th', getIsRoot(lcaTable)); + const startCell = startAncestorCells.length > 0 ? startAncestorCells[startAncestorCells.length - 1] : start; + return Optional.some({ + boxes: nestedIntercepts(lcaTable, start, startTable, finish, finishTable), + start: startCell, + finish: finishCell + }); + }); + }); + } + }); + }); + } + }; + const retrieve$1 = (container, selector) => { + const sels = descendants(container, selector); + return sels.length > 0 ? Optional.some(sels) : Optional.none(); + }; + const getLast = (boxes, lastSelectedSelector) => { + return find$1(boxes, box => { + return is$2(box, lastSelectedSelector); + }); + }; + const getEdges = (container, firstSelectedSelector, lastSelectedSelector) => { + return descendant(container, firstSelectedSelector).bind(first => { + return descendant(container, lastSelectedSelector).bind(last => { + return sharedOne(lookupTable, [ + first, + last + ]).map(table => { + return { + first, + last, + table + }; + }); + }); + }); + }; + const expandTo = (finish, firstSelectedSelector) => { + return ancestor$1(finish, 'table').bind(table => { + return descendant(table, firstSelectedSelector).bind(start => { + return identify(start, finish).bind(identified => { + return identified.boxes.map(boxes => { + return { + boxes, + start: identified.start, + finish: identified.finish + }; + }); + }); + }); + }); + }; + const shiftSelection = (boxes, deltaRow, deltaColumn, firstSelectedSelector, lastSelectedSelector) => { + return getLast(boxes, lastSelectedSelector).bind(last => { + return moveBy(last, deltaRow, deltaColumn).bind(finish => { + return expandTo(finish, firstSelectedSelector); + }); + }); + }; + + const retrieve = (container, selector) => { + return retrieve$1(container, selector); + }; + const retrieveBox = (container, firstSelectedSelector, lastSelectedSelector) => { + return getEdges(container, firstSelectedSelector, lastSelectedSelector).bind(edges => { + const isRoot = ancestor => { + return eq$1(container, ancestor); + }; + const sectionSelector = 'thead,tfoot,tbody,table'; + const firstAncestor = ancestor$1(edges.first, sectionSelector, isRoot); + const lastAncestor = ancestor$1(edges.last, sectionSelector, isRoot); + return firstAncestor.bind(fA => { + return lastAncestor.bind(lA => { + return eq$1(fA, lA) ? getBox(edges.table, edges.first, edges.last) : Optional.none(); + }); + }); + }); + }; + + const selection = identity; + const unmergable = selectedCells => { + const hasSpan = (elem, type) => getOpt(elem, type).exists(span => parseInt(span, 10) > 1); + const hasRowOrColSpan = elem => hasSpan(elem, 'rowspan') || hasSpan(elem, 'colspan'); + return selectedCells.length > 0 && forall(selectedCells, hasRowOrColSpan) ? Optional.some(selectedCells) : Optional.none(); + }; + const mergable = (table, selectedCells, ephemera) => { + if (selectedCells.length <= 1) { + return Optional.none(); + } else { + return retrieveBox(table, ephemera.firstSelectedSelector, ephemera.lastSelectedSelector).map(bounds => ({ + bounds, + cells: selectedCells + })); + } + }; + + const strSelected = 'data-mce-selected'; + const strSelectedSelector = 'td[' + strSelected + '],th[' + strSelected + ']'; + const strAttributeSelector = '[' + strSelected + ']'; + const strFirstSelected = 'data-mce-first-selected'; + const strFirstSelectedSelector = 'td[' + strFirstSelected + '],th[' + strFirstSelected + ']'; + const strLastSelected = 'data-mce-last-selected'; + const strLastSelectedSelector = 'td[' + strLastSelected + '],th[' + strLastSelected + ']'; + const attributeSelector = strAttributeSelector; + const ephemera = { + selected: strSelected, + selectedSelector: strSelectedSelector, + firstSelected: strFirstSelected, + firstSelectedSelector: strFirstSelectedSelector, + lastSelected: strLastSelected, + lastSelectedSelector: strLastSelectedSelector + }; + + const forMenu = (selectedCells, table, cell) => ({ + element: cell, + mergable: mergable(table, selectedCells, ephemera), + unmergable: unmergable(selectedCells), + selection: selection(selectedCells) + }); + const paste = (element, clipboard, generators) => ({ + element, + clipboard, + generators + }); + const pasteRows = (selectedCells, _cell, clipboard, generators) => ({ + selection: selection(selectedCells), + clipboard, + generators + }); + + const getSelectionCellFallback = element => table(element).bind(table => retrieve(table, ephemera.firstSelectedSelector)).fold(constant(element), cells => cells[0]); + const getSelectionFromSelector = selector => (initCell, isRoot) => { + const cellName = name(initCell); + const cell = cellName === 'col' || cellName === 'colgroup' ? getSelectionCellFallback(initCell) : initCell; + return closest$1(cell, selector, isRoot); + }; + const getSelectionCellOrCaption = getSelectionFromSelector('th,td,caption'); + const getSelectionCell = getSelectionFromSelector('th,td'); + const getCellsFromSelection = editor => fromDom(editor.model.table.getSelectedCells()); + const getCellsFromFakeSelection = editor => filter$2(getCellsFromSelection(editor), cell => is$2(cell, ephemera.selectedSelector)); + + const extractSelected = cells => { + return table(cells[0]).map(table => { + const replica = extract$1(table, attributeSelector); + removeDataStyle(replica); + return [replica]; + }); + }; + const serializeElements = (editor, elements) => map$1(elements, elm => editor.selection.serializer.serialize(elm.dom, {})).join(''); + const getTextContent = elements => map$1(elements, element => element.dom.innerText).join(''); + const registerEvents = (editor, actions) => { + editor.on('BeforeGetContent', e => { + const multiCellContext = cells => { + e.preventDefault(); + extractSelected(cells).each(elements => { + e.content = e.format === 'text' ? getTextContent(elements) : serializeElements(editor, elements); + }); + }; + if (e.selection === true) { + const cells = getCellsFromFakeSelection(editor); + if (cells.length >= 1) { + multiCellContext(cells); + } + } + }); + editor.on('BeforeSetContent', e => { + if (e.selection === true && e.paste === true) { + const selectedCells = getCellsFromSelection(editor); + head(selectedCells).each(cell => { + table(cell).each(table => { + const elements = filter$2(fromHtml(e.content), content => { + return name(content) !== 'meta'; + }); + const isTable = isTag('table'); + if (elements.length === 1 && isTable(elements[0])) { + e.preventDefault(); + const doc = SugarElement.fromDom(editor.getDoc()); + const generators = paste$1(doc); + const targets = paste(cell, elements[0], generators); + actions.pasteCells(table, targets).each(() => { + editor.focus(); + }); + } + }); + }); + } + }); + }; + + const point = (element, offset) => ({ + element, + offset + }); + + const scan$1 = (universe, element, direction) => { + if (universe.property().isText(element) && universe.property().getText(element).trim().length === 0 || universe.property().isComment(element)) { + return direction(element).bind(elem => { + return scan$1(universe, elem, direction).orThunk(() => { + return Optional.some(elem); + }); + }); + } else { + return Optional.none(); + } + }; + const toEnd = (universe, element) => { + if (universe.property().isText(element)) { + return universe.property().getText(element).length; + } + const children = universe.property().children(element); + return children.length; + }; + const freefallRtl$2 = (universe, element) => { + const candidate = scan$1(universe, element, universe.query().prevSibling).getOr(element); + if (universe.property().isText(candidate)) { + return point(candidate, toEnd(universe, candidate)); + } + const children = universe.property().children(candidate); + return children.length > 0 ? freefallRtl$2(universe, children[children.length - 1]) : point(candidate, toEnd(universe, candidate)); + }; + + const freefallRtl$1 = freefallRtl$2; + + const universe$2 = DomUniverse(); + const freefallRtl = element => { + return freefallRtl$1(universe$2, element); + }; + + const halve = (main, other) => { + if (!hasColspan(main)) { + const width = getGenericWidth(main); + width.each(w => { + const newWidth = w.value / 2; + setGenericWidth(main, newWidth, w.unit); + setGenericWidth(other, newWidth, w.unit); + }); + } + }; + + const zero = array => map$1(array, constant(0)); + const surround = (sizes, startIndex, endIndex, results, f) => f(sizes.slice(0, startIndex)).concat(results).concat(f(sizes.slice(endIndex))); + const clampDeltaHelper = predicate => (sizes, index, delta, minCellSize) => { + if (!predicate(delta)) { + return delta; + } else { + const newSize = Math.max(minCellSize, sizes[index] - Math.abs(delta)); + const diff = Math.abs(newSize - sizes[index]); + return delta >= 0 ? diff : -diff; + } + }; + const clampNegativeDelta = clampDeltaHelper(delta => delta < 0); + const clampDelta = clampDeltaHelper(always); + const resizeTable = () => { + const calcFixedDeltas = (sizes, index, next, delta, minCellSize) => { + const clampedDelta = clampNegativeDelta(sizes, index, delta, minCellSize); + return surround(sizes, index, next + 1, [ + clampedDelta, + 0 + ], zero); + }; + const calcRelativeDeltas = (sizes, index, delta, minCellSize) => { + const ratio = (100 + delta) / 100; + const newThis = Math.max(minCellSize, (sizes[index] + delta) / ratio); + return map$1(sizes, (size, idx) => { + const newSize = idx === index ? newThis : size / ratio; + return newSize - size; + }); + }; + const calcLeftEdgeDeltas = (sizes, index, next, delta, minCellSize, isRelative) => { + if (isRelative) { + return calcRelativeDeltas(sizes, index, delta, minCellSize); + } else { + return calcFixedDeltas(sizes, index, next, delta, minCellSize); + } + }; + const calcMiddleDeltas = (sizes, _prev, index, next, delta, minCellSize, isRelative) => calcLeftEdgeDeltas(sizes, index, next, delta, minCellSize, isRelative); + const resizeTable = (resizer, delta) => resizer(delta); + const calcRightEdgeDeltas = (sizes, _prev, index, delta, minCellSize, isRelative) => { + if (isRelative) { + return calcRelativeDeltas(sizes, index, delta, minCellSize); + } else { + const clampedDelta = clampNegativeDelta(sizes, index, delta, minCellSize); + return zero(sizes.slice(0, index)).concat([clampedDelta]); + } + }; + const calcRedestributedWidths = (sizes, totalWidth, pixelDelta, isRelative) => { + if (isRelative) { + const tableWidth = totalWidth + pixelDelta; + const ratio = tableWidth / totalWidth; + const newSizes = map$1(sizes, size => size / ratio); + return { + delta: ratio * 100 - 100, + newSizes + }; + } else { + return { + delta: pixelDelta, + newSizes: sizes + }; + } + }; + return { + resizeTable, + clampTableDelta: clampNegativeDelta, + calcLeftEdgeDeltas, + calcMiddleDeltas, + calcRightEdgeDeltas, + calcRedestributedWidths + }; + }; + const preserveTable = () => { + const calcLeftEdgeDeltas = (sizes, index, next, delta, minCellSize) => { + const idx = delta >= 0 ? next : index; + const clampedDelta = clampDelta(sizes, idx, delta, minCellSize); + return surround(sizes, index, next + 1, [ + clampedDelta, + -clampedDelta + ], zero); + }; + const calcMiddleDeltas = (sizes, _prev, index, next, delta, minCellSize) => calcLeftEdgeDeltas(sizes, index, next, delta, minCellSize); + const resizeTable = (resizer, delta, isLastColumn) => { + if (isLastColumn) { + resizer(delta); + } + }; + const calcRightEdgeDeltas = (sizes, _prev, _index, delta, _minCellSize, isRelative) => { + if (isRelative) { + return zero(sizes); + } else { + const diff = delta / sizes.length; + return map$1(sizes, constant(diff)); + } + }; + const clampTableDelta = (sizes, index, delta, minCellSize, isLastColumn) => { + if (isLastColumn) { + if (delta >= 0) { + return delta; + } else { + const maxDelta = foldl(sizes, (a, b) => a + b - minCellSize, 0); + return Math.max(-maxDelta, delta); + } + } else { + return clampNegativeDelta(sizes, index, delta, minCellSize); + } + }; + const calcRedestributedWidths = (sizes, _totalWidth, _pixelDelta, _isRelative) => ({ + delta: 0, + newSizes: sizes + }); + return { + resizeTable, + clampTableDelta, + calcLeftEdgeDeltas, + calcMiddleDeltas, + calcRightEdgeDeltas, + calcRedestributedWidths + }; + }; + + const getGridSize = table => { + const warehouse = Warehouse.fromTable(table); + return warehouse.grid; + }; + + const isHeaderCell = isTag('th'); + const isHeaderCells = cells => forall(cells, cell => isHeaderCell(cell.element)); + const getRowHeaderType = (isHeaderRow, isHeaderCells) => { + if (isHeaderRow && isHeaderCells) { + return 'sectionCells'; + } else if (isHeaderRow) { + return 'section'; + } else { + return 'cells'; + } + }; + const getRowType = row => { + const isHeaderRow = row.section === 'thead'; + const isHeaderCells = is(findCommonCellType(row.cells), 'th'); + if (row.section === 'tfoot') { + return { type: 'footer' }; + } else if (isHeaderRow || isHeaderCells) { + return { + type: 'header', + subType: getRowHeaderType(isHeaderRow, isHeaderCells) + }; + } else { + return { type: 'body' }; + } + }; + const findCommonCellType = cells => { + const headerCells = filter$2(cells, cell => isHeaderCell(cell.element)); + if (headerCells.length === 0) { + return Optional.some('td'); + } else if (headerCells.length === cells.length) { + return Optional.some('th'); + } else { + return Optional.none(); + } + }; + const findCommonRowType = rows => { + const rowTypes = map$1(rows, row => getRowType(row).type); + const hasHeader = contains$2(rowTypes, 'header'); + const hasFooter = contains$2(rowTypes, 'footer'); + if (!hasHeader && !hasFooter) { + return Optional.some('body'); + } else { + const hasBody = contains$2(rowTypes, 'body'); + if (hasHeader && !hasBody && !hasFooter) { + return Optional.some('header'); + } else if (!hasHeader && !hasBody && hasFooter) { + return Optional.some('footer'); + } else { + return Optional.none(); + } + } + }; + const findTableRowHeaderType = warehouse => findMap(warehouse.all, row => { + const rowType = getRowType(row); + return rowType.type === 'header' ? Optional.from(rowType.subType) : Optional.none(); + }); + + const transformCell = (cell, comparator, substitution) => elementnew(substitution(cell.element, comparator), true, cell.isLocked); + const transformRow = (row, section) => row.section !== section ? rowcells(row.element, row.cells, section, row.isNew) : row; + const section = () => ({ + transformRow, + transformCell: (cell, comparator, substitution) => { + const newCell = substitution(cell.element, comparator); + const fixedCell = name(newCell) !== 'td' ? mutate$1(newCell, 'td') : newCell; + return elementnew(fixedCell, cell.isNew, cell.isLocked); + } + }); + const sectionCells = () => ({ + transformRow, + transformCell + }); + const cells = () => ({ + transformRow: (row, section) => { + const newSection = section === 'thead' ? 'tbody' : section; + return transformRow(row, newSection); + }, + transformCell + }); + const fallback = () => ({ + transformRow: identity, + transformCell + }); + const getTableSectionType = (table, fallback) => { + const warehouse = Warehouse.fromTable(table); + const type = findTableRowHeaderType(warehouse).getOr(fallback); + switch (type) { + case 'section': + return section(); + case 'sectionCells': + return sectionCells(); + case 'cells': + return cells(); + } + }; + const TableSection = { + getTableSectionType, + section, + sectionCells, + cells, + fallback + }; + + const closest = target => closest$1(target, '[contenteditable]'); + const isEditable$1 = (element, assumeEditable = false) => { + if (inBody(element)) { + return element.dom.isContentEditable; + } else { + return closest(element).fold(constant(assumeEditable), editable => getRaw(editable) === 'true'); + } + }; + const getRaw = element => element.dom.contentEditable; + + const setIfNot = (element, property, value, ignore) => { + if (value === ignore) { + remove$7(element, property); + } else { + set$2(element, property, value); + } + }; + const insert$1 = (table, selector, element) => { + last$2(children(table, selector)).fold(() => prepend(table, element), child => after$5(child, element)); + }; + const generateSection = (table, sectionName) => { + const section = child(table, sectionName).getOrThunk(() => { + const newSection = SugarElement.fromTag(sectionName, owner(table).dom); + if (sectionName === 'thead') { + insert$1(table, 'caption,colgroup', newSection); + } else if (sectionName === 'colgroup') { + insert$1(table, 'caption', newSection); + } else { + append$1(table, newSection); + } + return newSection; + }); + empty(section); + return section; + }; + const render$1 = (table, grid) => { + const newRows = []; + const newCells = []; + const syncRows = gridSection => map$1(gridSection, row => { + if (row.isNew) { + newRows.push(row.element); + } + const tr = row.element; + empty(tr); + each$2(row.cells, cell => { + if (cell.isNew) { + newCells.push(cell.element); + } + setIfNot(cell.element, 'colspan', cell.colspan, 1); + setIfNot(cell.element, 'rowspan', cell.rowspan, 1); + append$1(tr, cell.element); + }); + return tr; + }); + const syncColGroup = gridSection => bind$2(gridSection, colGroup => map$1(colGroup.cells, col => { + setIfNot(col.element, 'span', col.colspan, 1); + return col.element; + })); + const renderSection = (gridSection, sectionName) => { + const section = generateSection(table, sectionName); + const sync = sectionName === 'colgroup' ? syncColGroup : syncRows; + const sectionElems = sync(gridSection); + append(section, sectionElems); + }; + const removeSection = sectionName => { + child(table, sectionName).each(remove$6); + }; + const renderOrRemoveSection = (gridSection, sectionName) => { + if (gridSection.length > 0) { + renderSection(gridSection, sectionName); + } else { + removeSection(sectionName); + } + }; + const headSection = []; + const bodySection = []; + const footSection = []; + const columnGroupsSection = []; + each$2(grid, row => { + switch (row.section) { + case 'thead': + headSection.push(row); + break; + case 'tbody': + bodySection.push(row); + break; + case 'tfoot': + footSection.push(row); + break; + case 'colgroup': + columnGroupsSection.push(row); + break; + } + }); + renderOrRemoveSection(columnGroupsSection, 'colgroup'); + renderOrRemoveSection(headSection, 'thead'); + renderOrRemoveSection(bodySection, 'tbody'); + renderOrRemoveSection(footSection, 'tfoot'); + return { + newRows, + newCells + }; + }; + const copy = grid => map$1(grid, row => { + const tr = shallow(row.element); + each$2(row.cells, cell => { + const clonedCell = deep(cell.element); + setIfNot(clonedCell, 'colspan', cell.colspan, 1); + setIfNot(clonedCell, 'rowspan', cell.rowspan, 1); + append$1(tr, clonedCell); + }); + return tr; + }); + + const getColumn = (grid, index) => { + return map$1(grid, row => { + return getCell(row, index); + }); + }; + const getRow = (grid, index) => { + return grid[index]; + }; + const findDiff = (xs, comp) => { + if (xs.length === 0) { + return 0; + } + const first = xs[0]; + const index = findIndex(xs, x => { + return !comp(first.element, x.element); + }); + return index.getOr(xs.length); + }; + const subgrid = (grid, row, column, comparator) => { + const gridRow = getRow(grid, row); + const isColRow = gridRow.section === 'colgroup'; + const colspan = findDiff(gridRow.cells.slice(column), comparator); + const rowspan = isColRow ? 1 : findDiff(getColumn(grid.slice(row), column), comparator); + return { + colspan, + rowspan + }; + }; + + const toDetails = (grid, comparator) => { + const seen = map$1(grid, row => map$1(row.cells, never)); + const updateSeen = (rowIndex, columnIndex, rowspan, colspan) => { + for (let row = rowIndex; row < rowIndex + rowspan; row++) { + for (let column = columnIndex; column < columnIndex + colspan; column++) { + seen[row][column] = true; + } + } + }; + return map$1(grid, (row, rowIndex) => { + const details = bind$2(row.cells, (cell, columnIndex) => { + if (seen[rowIndex][columnIndex] === false) { + const result = subgrid(grid, rowIndex, columnIndex, comparator); + updateSeen(rowIndex, columnIndex, result.rowspan, result.colspan); + return [detailnew(cell.element, result.rowspan, result.colspan, cell.isNew)]; + } else { + return []; + } + }); + return rowdetailnew(row.element, details, row.section, row.isNew); + }); + }; + const toGrid = (warehouse, generators, isNew) => { + const grid = []; + each$2(warehouse.colgroups, colgroup => { + const colgroupCols = []; + for (let columnIndex = 0; columnIndex < warehouse.grid.columns; columnIndex++) { + const element = Warehouse.getColumnAt(warehouse, columnIndex).map(column => elementnew(column.element, isNew, false)).getOrThunk(() => elementnew(generators.colGap(), true, false)); + colgroupCols.push(element); + } + grid.push(rowcells(colgroup.element, colgroupCols, 'colgroup', isNew)); + }); + for (let rowIndex = 0; rowIndex < warehouse.grid.rows; rowIndex++) { + const rowCells = []; + for (let columnIndex = 0; columnIndex < warehouse.grid.columns; columnIndex++) { + const element = Warehouse.getAt(warehouse, rowIndex, columnIndex).map(item => elementnew(item.element, isNew, item.isLocked)).getOrThunk(() => elementnew(generators.gap(), true, false)); + rowCells.push(element); + } + const rowDetail = warehouse.all[rowIndex]; + const row = rowcells(rowDetail.element, rowCells, rowDetail.section, isNew); + grid.push(row); + } + return grid; + }; + + const fromWarehouse = (warehouse, generators) => toGrid(warehouse, generators, false); + const toDetailList = grid => toDetails(grid, eq$1); + const findInWarehouse = (warehouse, element) => findMap(warehouse.all, r => find$1(r.cells, e => eq$1(element, e.element))); + const extractCells = (warehouse, target, predicate) => { + const details = map$1(target.selection, cell$1 => { + return cell(cell$1).bind(lc => findInWarehouse(warehouse, lc)).filter(predicate); + }); + const cells = cat(details); + return someIf(cells.length > 0, cells); + }; + const run = (operation, extract, adjustment, postAction, genWrappers) => (table, target, generators, behaviours) => { + const warehouse = Warehouse.fromTable(table); + const tableSection = Optional.from(behaviours === null || behaviours === void 0 ? void 0 : behaviours.section).getOrThunk(TableSection.fallback); + const output = extract(warehouse, target).map(info => { + const model = fromWarehouse(warehouse, generators); + const result = operation(model, info, eq$1, genWrappers(generators), tableSection); + const lockedColumns = getLockedColumnsFromGrid(result.grid); + const grid = toDetailList(result.grid); + return { + info, + grid, + cursor: result.cursor, + lockedColumns + }; + }); + return output.bind(out => { + const newElements = render$1(table, out.grid); + const tableSizing = Optional.from(behaviours === null || behaviours === void 0 ? void 0 : behaviours.sizing).getOrThunk(() => TableSize.getTableSize(table)); + const resizing = Optional.from(behaviours === null || behaviours === void 0 ? void 0 : behaviours.resize).getOrThunk(preserveTable); + adjustment(table, out.grid, out.info, { + sizing: tableSizing, + resize: resizing, + section: tableSection + }); + postAction(table); + remove$7(table, LOCKED_COL_ATTR); + if (out.lockedColumns.length > 0) { + set$2(table, LOCKED_COL_ATTR, out.lockedColumns.join(',')); + } + return Optional.some({ + cursor: out.cursor, + newRows: newElements.newRows, + newCells: newElements.newCells + }); + }); + }; + const onPaste = (warehouse, target) => cell(target.element).bind(cell => findInWarehouse(warehouse, cell).map(details => { + const value = { + ...details, + generators: target.generators, + clipboard: target.clipboard + }; + return value; + })); + const onPasteByEditor = (warehouse, target) => extractCells(warehouse, target, always).map(cells => ({ + cells, + generators: target.generators, + clipboard: target.clipboard + })); + const onMergable = (_warehouse, target) => target.mergable; + const onUnmergable = (_warehouse, target) => target.unmergable; + const onCells = (warehouse, target) => extractCells(warehouse, target, always); + const onUnlockedCells = (warehouse, target) => extractCells(warehouse, target, detail => !detail.isLocked); + const isUnlockedTableCell = (warehouse, cell) => findInWarehouse(warehouse, cell).exists(detail => !detail.isLocked); + const allUnlocked = (warehouse, cells) => forall(cells, cell => isUnlockedTableCell(warehouse, cell)); + const onUnlockedMergable = (warehouse, target) => onMergable(warehouse, target).filter(mergeable => allUnlocked(warehouse, mergeable.cells)); + const onUnlockedUnmergable = (warehouse, target) => onUnmergable(warehouse, target).filter(cells => allUnlocked(warehouse, cells)); + + const merge$2 = (grid, bounds, comparator, substitution) => { + const rows = extractGridDetails(grid).rows; + if (rows.length === 0) { + return grid; + } + for (let i = bounds.startRow; i <= bounds.finishRow; i++) { + for (let j = bounds.startCol; j <= bounds.finishCol; j++) { + const row = rows[i]; + const isLocked = getCell(row, j).isLocked; + mutateCell(row, j, elementnew(substitution(), false, isLocked)); + } + } + return grid; + }; + const unmerge = (grid, target, comparator, substitution) => { + const rows = extractGridDetails(grid).rows; + let first = true; + for (let i = 0; i < rows.length; i++) { + for (let j = 0; j < cellLength(rows[0]); j++) { + const row = rows[i]; + const currentCell = getCell(row, j); + const currentCellElm = currentCell.element; + const isToReplace = comparator(currentCellElm, target); + if (isToReplace && !first) { + mutateCell(row, j, elementnew(substitution(), true, currentCell.isLocked)); + } else if (isToReplace) { + first = false; + } + } + } + return grid; + }; + const uniqueCells = (row, comparator) => { + return foldl(row, (rest, cell) => { + return exists(rest, currentCell => { + return comparator(currentCell.element, cell.element); + }) ? rest : rest.concat([cell]); + }, []); + }; + const splitCols = (grid, index, comparator, substitution) => { + if (index > 0 && index < grid[0].cells.length) { + each$2(grid, row => { + const prevCell = row.cells[index - 1]; + const current = row.cells[index]; + const isToReplace = comparator(current.element, prevCell.element); + if (isToReplace) { + mutateCell(row, index, elementnew(substitution(), true, current.isLocked)); + } + }); + } + return grid; + }; + const splitRows = (grid, index, comparator, substitution) => { + const rows = extractGridDetails(grid).rows; + if (index > 0 && index < rows.length) { + const rowPrevCells = rows[index - 1].cells; + const cells = uniqueCells(rowPrevCells, comparator); + each$2(cells, cell => { + let replacement = Optional.none(); + for (let i = index; i < rows.length; i++) { + for (let j = 0; j < cellLength(rows[0]); j++) { + const row = rows[i]; + const current = getCell(row, j); + const isToReplace = comparator(current.element, cell.element); + if (isToReplace) { + if (replacement.isNone()) { + replacement = Optional.some(substitution()); + } + replacement.each(sub => { + mutateCell(row, j, elementnew(sub, true, current.isLocked)); + }); + } + } + } + }); + } + return grid; + }; + + const value$1 = value => { + const applyHelper = fn => fn(value); + const constHelper = constant(value); + const outputHelper = () => output; + const output = { + tag: true, + inner: value, + fold: (_onError, onValue) => onValue(value), + isValue: always, + isError: never, + map: mapper => Result.value(mapper(value)), + mapError: outputHelper, + bind: applyHelper, + exists: applyHelper, + forall: applyHelper, + getOr: constHelper, + or: outputHelper, + getOrThunk: constHelper, + orThunk: outputHelper, + getOrDie: constHelper, + each: fn => { + fn(value); + }, + toOptional: () => Optional.some(value) + }; + return output; + }; + const error = error => { + const outputHelper = () => output; + const output = { + tag: false, + inner: error, + fold: (onError, _onValue) => onError(error), + isValue: never, + isError: always, + map: outputHelper, + mapError: mapper => Result.error(mapper(error)), + bind: outputHelper, + exists: never, + forall: always, + getOr: identity, + or: identity, + getOrThunk: apply, + orThunk: apply, + getOrDie: die(String(error)), + each: noop, + toOptional: Optional.none + }; + return output; + }; + const fromOption = (optional, err) => optional.fold(() => error(err), value$1); + const Result = { + value: value$1, + error, + fromOption + }; + + const measure = (startAddress, gridA, gridB) => { + if (startAddress.row >= gridA.length || startAddress.column > cellLength(gridA[0])) { + return Result.error('invalid start address out of table bounds, row: ' + startAddress.row + ', column: ' + startAddress.column); + } + const rowRemainder = gridA.slice(startAddress.row); + const colRemainder = rowRemainder[0].cells.slice(startAddress.column); + const colRequired = cellLength(gridB[0]); + const rowRequired = gridB.length; + return Result.value({ + rowDelta: rowRemainder.length - rowRequired, + colDelta: colRemainder.length - colRequired + }); + }; + const measureWidth = (gridA, gridB) => { + const colLengthA = cellLength(gridA[0]); + const colLengthB = cellLength(gridB[0]); + return { + rowDelta: 0, + colDelta: colLengthA - colLengthB + }; + }; + const measureHeight = (gridA, gridB) => { + const rowLengthA = gridA.length; + const rowLengthB = gridB.length; + return { + rowDelta: rowLengthA - rowLengthB, + colDelta: 0 + }; + }; + const generateElements = (amount, row, generators, isLocked) => { + const generator = row.section === 'colgroup' ? generators.col : generators.cell; + return range$1(amount, idx => elementnew(generator(), true, isLocked(idx))); + }; + const rowFill = (grid, amount, generators, lockedColumns) => { + const exampleRow = grid[grid.length - 1]; + return grid.concat(range$1(amount, () => { + const generator = exampleRow.section === 'colgroup' ? generators.colgroup : generators.row; + const row = clone(exampleRow, generator, identity); + const elements = generateElements(row.cells.length, row, generators, idx => has$1(lockedColumns, idx.toString())); + return setCells(row, elements); + })); + }; + const colFill = (grid, amount, generators, startIndex) => map$1(grid, row => { + const newChildren = generateElements(amount, row, generators, never); + return addCells(row, startIndex, newChildren); + }); + const lockedColFill = (grid, generators, lockedColumns) => map$1(grid, row => { + return foldl(lockedColumns, (acc, colNum) => { + const newChild = generateElements(1, row, generators, always)[0]; + return addCell(acc, colNum, newChild); + }, row); + }); + const tailor = (gridA, delta, generators) => { + const fillCols = delta.colDelta < 0 ? colFill : identity; + const fillRows = delta.rowDelta < 0 ? rowFill : identity; + const lockedColumns = getLockedColumnsFromGrid(gridA); + const gridWidth = cellLength(gridA[0]); + const isLastColLocked = exists(lockedColumns, locked => locked === gridWidth - 1); + const modifiedCols = fillCols(gridA, Math.abs(delta.colDelta), generators, isLastColLocked ? gridWidth - 1 : gridWidth); + const newLockedColumns = getLockedColumnsFromGrid(modifiedCols); + return fillRows(modifiedCols, Math.abs(delta.rowDelta), generators, mapToObject(newLockedColumns, always)); + }; + + const isSpanning = (grid, row, col, comparator) => { + const candidate = getCell(grid[row], col); + const matching = curry(comparator, candidate.element); + const currentRow = grid[row]; + return grid.length > 1 && cellLength(currentRow) > 1 && (col > 0 && matching(getCellElement(currentRow, col - 1)) || col < currentRow.cells.length - 1 && matching(getCellElement(currentRow, col + 1)) || row > 0 && matching(getCellElement(grid[row - 1], col)) || row < grid.length - 1 && matching(getCellElement(grid[row + 1], col))); + }; + const mergeTables = (startAddress, gridA, gridBRows, generator, comparator, lockedColumns) => { + const startRow = startAddress.row; + const startCol = startAddress.column; + const mergeHeight = gridBRows.length; + const mergeWidth = cellLength(gridBRows[0]); + const endRow = startRow + mergeHeight; + const endCol = startCol + mergeWidth + lockedColumns.length; + const lockedColumnObj = mapToObject(lockedColumns, always); + for (let r = startRow; r < endRow; r++) { + let skippedCol = 0; + for (let c = startCol; c < endCol; c++) { + if (lockedColumnObj[c]) { + skippedCol++; + continue; + } + if (isSpanning(gridA, r, c, comparator)) { + unmerge(gridA, getCellElement(gridA[r], c), comparator, generator.cell); + } + const gridBColIndex = c - startCol - skippedCol; + const newCell = getCell(gridBRows[r - startRow], gridBColIndex); + const newCellElm = newCell.element; + const replacement = generator.replace(newCellElm); + mutateCell(gridA[r], c, elementnew(replacement, true, newCell.isLocked)); + } + } + return gridA; + }; + const getValidStartAddress = (currentStartAddress, grid, lockedColumns) => { + const gridColLength = cellLength(grid[0]); + const adjustedRowAddress = extractGridDetails(grid).cols.length + currentStartAddress.row; + const possibleColAddresses = range$1(gridColLength - currentStartAddress.column, num => num + currentStartAddress.column); + const validColAddress = find$1(possibleColAddresses, num => forall(lockedColumns, col => col !== num)).getOr(gridColLength - 1); + return { + row: adjustedRowAddress, + column: validColAddress + }; + }; + const getLockedColumnsWithinBounds = (startAddress, rows, lockedColumns) => filter$2(lockedColumns, colNum => colNum >= startAddress.column && colNum <= cellLength(rows[0]) + startAddress.column); + const merge$1 = (startAddress, gridA, gridB, generator, comparator) => { + const lockedColumns = getLockedColumnsFromGrid(gridA); + const validStartAddress = getValidStartAddress(startAddress, gridA, lockedColumns); + const gridBRows = extractGridDetails(gridB).rows; + const lockedColumnsWithinBounds = getLockedColumnsWithinBounds(validStartAddress, gridBRows, lockedColumns); + const result = measure(validStartAddress, gridA, gridBRows); + return result.map(diff => { + const delta = { + ...diff, + colDelta: diff.colDelta - lockedColumnsWithinBounds.length + }; + const fittedGrid = tailor(gridA, delta, generator); + const newLockedColumns = getLockedColumnsFromGrid(fittedGrid); + const newLockedColumnsWithinBounds = getLockedColumnsWithinBounds(validStartAddress, gridBRows, newLockedColumns); + return mergeTables(validStartAddress, fittedGrid, gridBRows, generator, comparator, newLockedColumnsWithinBounds); + }); + }; + const insertCols = (index, gridA, gridB, generator, comparator) => { + splitCols(gridA, index, comparator, generator.cell); + const delta = measureHeight(gridB, gridA); + const fittedNewGrid = tailor(gridB, delta, generator); + const secondDelta = measureHeight(gridA, fittedNewGrid); + const fittedOldGrid = tailor(gridA, secondDelta, generator); + return map$1(fittedOldGrid, (gridRow, i) => { + return addCells(gridRow, index, fittedNewGrid[i].cells); + }); + }; + const insertRows = (index, gridA, gridB, generator, comparator) => { + splitRows(gridA, index, comparator, generator.cell); + const locked = getLockedColumnsFromGrid(gridA); + const diff = measureWidth(gridA, gridB); + const delta = { + ...diff, + colDelta: diff.colDelta - locked.length + }; + const fittedOldGrid = tailor(gridA, delta, generator); + const { + cols: oldCols, + rows: oldRows + } = extractGridDetails(fittedOldGrid); + const newLocked = getLockedColumnsFromGrid(fittedOldGrid); + const secondDiff = measureWidth(gridB, gridA); + const secondDelta = { + ...secondDiff, + colDelta: secondDiff.colDelta + newLocked.length + }; + const fittedGridB = lockedColFill(gridB, generator, newLocked); + const fittedNewGrid = tailor(fittedGridB, secondDelta, generator); + return [ + ...oldCols, + ...oldRows.slice(0, index), + ...fittedNewGrid, + ...oldRows.slice(index, oldRows.length) + ]; + }; + + const cloneRow = (row, cloneCell, comparator, substitution) => clone(row, elem => substitution(elem, comparator), cloneCell); + const insertRowAt = (grid, index, example, comparator, substitution) => { + const {rows, cols} = extractGridDetails(grid); + const before = rows.slice(0, index); + const after = rows.slice(index); + const newRow = cloneRow(rows[example], (ex, c) => { + const withinSpan = index > 0 && index < rows.length && comparator(getCellElement(rows[index - 1], c), getCellElement(rows[index], c)); + const ret = withinSpan ? getCell(rows[index], c) : elementnew(substitution(ex.element, comparator), true, ex.isLocked); + return ret; + }, comparator, substitution); + return [ + ...cols, + ...before, + newRow, + ...after + ]; + }; + const getElementFor = (row, column, section, withinSpan, example, comparator, substitution) => { + if (section === 'colgroup' || !withinSpan) { + const cell = getCell(row, example); + return elementnew(substitution(cell.element, comparator), true, false); + } else { + return getCell(row, column); + } + }; + const insertColumnAt = (grid, index, example, comparator, substitution) => map$1(grid, row => { + const withinSpan = index > 0 && index < cellLength(row) && comparator(getCellElement(row, index - 1), getCellElement(row, index)); + const sub = getElementFor(row, index, row.section, withinSpan, example, comparator, substitution); + return addCell(row, index, sub); + }); + const deleteColumnsAt = (grid, columns) => bind$2(grid, row => { + const existingCells = row.cells; + const cells = foldr(columns, (acc, column) => column >= 0 && column < acc.length ? acc.slice(0, column).concat(acc.slice(column + 1)) : acc, existingCells); + return cells.length > 0 ? [rowcells(row.element, cells, row.section, row.isNew)] : []; + }); + const deleteRowsAt = (grid, start, finish) => { + const {rows, cols} = extractGridDetails(grid); + return [ + ...cols, + ...rows.slice(0, start), + ...rows.slice(finish + 1) + ]; + }; + + const notInStartRow = (grid, rowIndex, colIndex, comparator) => getCellElement(grid[rowIndex], colIndex) !== undefined && (rowIndex > 0 && comparator(getCellElement(grid[rowIndex - 1], colIndex), getCellElement(grid[rowIndex], colIndex))); + const notInStartColumn = (row, index, comparator) => index > 0 && comparator(getCellElement(row, index - 1), getCellElement(row, index)); + const isDuplicatedCell = (grid, rowIndex, colIndex, comparator) => notInStartRow(grid, rowIndex, colIndex, comparator) || notInStartColumn(grid[rowIndex], colIndex, comparator); + const rowReplacerPredicate = (targetRow, columnHeaders) => { + const entireTableIsHeader = forall(columnHeaders, identity) && isHeaderCells(targetRow.cells); + return entireTableIsHeader ? always : (cell, _rowIndex, colIndex) => { + const type = name(cell.element); + return !(type === 'th' && columnHeaders[colIndex]); + }; + }; + const columnReplacePredicate = (targetColumn, rowHeaders) => { + const entireTableIsHeader = forall(rowHeaders, identity) && isHeaderCells(targetColumn); + return entireTableIsHeader ? always : (cell, rowIndex, _colIndex) => { + const type = name(cell.element); + return !(type === 'th' && rowHeaders[rowIndex]); + }; + }; + const determineScope = (applyScope, cell, newScope, isInHeader) => { + const hasSpan = scope => scope === 'row' ? hasRowspan(cell) : hasColspan(cell); + const getScope = scope => hasSpan(scope) ? `${ scope }group` : scope; + if (applyScope) { + return isHeaderCell(cell) ? getScope(newScope) : null; + } else if (isInHeader && isHeaderCell(cell)) { + const oppositeScope = newScope === 'row' ? 'col' : 'row'; + return getScope(oppositeScope); + } else { + return null; + } + }; + const rowScopeGenerator = (applyScope, columnHeaders) => (cell, rowIndex, columnIndex) => Optional.some(determineScope(applyScope, cell.element, 'col', columnHeaders[columnIndex])); + const columnScopeGenerator = (applyScope, rowHeaders) => (cell, rowIndex) => Optional.some(determineScope(applyScope, cell.element, 'row', rowHeaders[rowIndex])); + const replace = (cell, comparator, substitute) => elementnew(substitute(cell.element, comparator), true, cell.isLocked); + const replaceIn = (grid, targets, comparator, substitute, replacer, genScope, shouldReplace) => { + const isTarget = cell => { + return exists(targets, target => { + return comparator(cell.element, target.element); + }); + }; + return map$1(grid, (row, rowIndex) => { + return mapCells(row, (cell, colIndex) => { + if (isTarget(cell)) { + const newCell = shouldReplace(cell, rowIndex, colIndex) ? replacer(cell, comparator, substitute) : cell; + genScope(newCell, rowIndex, colIndex).each(scope => { + setOptions(newCell.element, { scope: Optional.from(scope) }); + }); + return newCell; + } else { + return cell; + } + }); + }); + }; + const getColumnCells = (rows, columnIndex, comparator) => bind$2(rows, (row, i) => { + return isDuplicatedCell(rows, i, columnIndex, comparator) ? [] : [getCell(row, columnIndex)]; + }); + const getRowCells = (rows, rowIndex, comparator) => { + const targetRow = rows[rowIndex]; + return bind$2(targetRow.cells, (item, i) => { + return isDuplicatedCell(rows, rowIndex, i, comparator) ? [] : [item]; + }); + }; + const replaceColumns = (grid, indexes, applyScope, comparator, substitution) => { + const rows = extractGridDetails(grid).rows; + const targets = bind$2(indexes, index => getColumnCells(rows, index, comparator)); + const rowHeaders = map$1(rows, row => isHeaderCells(row.cells)); + const shouldReplaceCell = columnReplacePredicate(targets, rowHeaders); + const scopeGenerator = columnScopeGenerator(applyScope, rowHeaders); + return replaceIn(grid, targets, comparator, substitution, replace, scopeGenerator, shouldReplaceCell); + }; + const replaceRows = (grid, indexes, section, applyScope, comparator, substitution, tableSection) => { + const {cols, rows} = extractGridDetails(grid); + const targetRow = rows[indexes[0]]; + const targets = bind$2(indexes, index => getRowCells(rows, index, comparator)); + const columnHeaders = map$1(targetRow.cells, (_cell, index) => isHeaderCells(getColumnCells(rows, index, comparator))); + const newRows = [...rows]; + each$2(indexes, index => { + newRows[index] = tableSection.transformRow(rows[index], section); + }); + const newGrid = [ + ...cols, + ...newRows + ]; + const shouldReplaceCell = rowReplacerPredicate(targetRow, columnHeaders); + const scopeGenerator = rowScopeGenerator(applyScope, columnHeaders); + return replaceIn(newGrid, targets, comparator, substitution, tableSection.transformCell, scopeGenerator, shouldReplaceCell); + }; + const replaceCells = (grid, details, comparator, substitution) => { + const rows = extractGridDetails(grid).rows; + const targetCells = map$1(details, detail => getCell(rows[detail.row], detail.column)); + return replaceIn(grid, targetCells, comparator, substitution, replace, Optional.none, always); + }; + + const generate = cases => { + if (!isArray(cases)) { + throw new Error('cases must be an array'); + } + if (cases.length === 0) { + throw new Error('there must be at least one case'); + } + const constructors = []; + const adt = {}; + each$2(cases, (acase, count) => { + const keys$1 = keys(acase); + if (keys$1.length !== 1) { + throw new Error('one and only one name per case'); + } + const key = keys$1[0]; + const value = acase[key]; + if (adt[key] !== undefined) { + throw new Error('duplicate key detected:' + key); + } else if (key === 'cata') { + throw new Error('cannot have a case named cata (sorry)'); + } else if (!isArray(value)) { + throw new Error('case arguments must be an array'); + } + constructors.push(key); + adt[key] = (...args) => { + const argLength = args.length; + if (argLength !== value.length) { + throw new Error('Wrong number of arguments to case ' + key + '. Expected ' + value.length + ' (' + value + '), got ' + argLength); + } + const match = branches => { + const branchKeys = keys(branches); + if (constructors.length !== branchKeys.length) { + throw new Error('Wrong number of arguments to match. Expected: ' + constructors.join(',') + '\nActual: ' + branchKeys.join(',')); + } + const allReqd = forall(constructors, reqKey => { + return contains$2(branchKeys, reqKey); + }); + if (!allReqd) { + throw new Error('Not all branches were specified when using match. Specified: ' + branchKeys.join(', ') + '\nRequired: ' + constructors.join(', ')); + } + return branches[key].apply(null, args); + }; + return { + fold: (...foldArgs) => { + if (foldArgs.length !== cases.length) { + throw new Error('Wrong number of arguments to fold. Expected ' + cases.length + ', got ' + foldArgs.length); + } + const target = foldArgs[count]; + return target.apply(null, args); + }, + match, + log: label => { + console.log(label, { + constructors, + constructor: key, + params: args + }); + } + }; + }; + }); + return adt; + }; + const Adt = { generate }; + + const adt$6 = Adt.generate([ + { none: [] }, + { only: ['index'] }, + { + left: [ + 'index', + 'next' + ] + }, + { + middle: [ + 'prev', + 'index', + 'next' + ] + }, + { + right: [ + 'prev', + 'index' + ] + } + ]); + const ColumnContext = { ...adt$6 }; + + const neighbours = (input, index) => { + if (input.length === 0) { + return ColumnContext.none(); + } + if (input.length === 1) { + return ColumnContext.only(0); + } + if (index === 0) { + return ColumnContext.left(0, 1); + } + if (index === input.length - 1) { + return ColumnContext.right(index - 1, index); + } + if (index > 0 && index < input.length - 1) { + return ColumnContext.middle(index - 1, index, index + 1); + } + return ColumnContext.none(); + }; + const determine = (input, column, step, tableSize, resize) => { + const result = input.slice(0); + const context = neighbours(input, column); + const onNone = constant(map$1(result, constant(0))); + const onOnly = index => tableSize.singleColumnWidth(result[index], step); + const onLeft = (index, next) => resize.calcLeftEdgeDeltas(result, index, next, step, tableSize.minCellWidth(), tableSize.isRelative); + const onMiddle = (prev, index, next) => resize.calcMiddleDeltas(result, prev, index, next, step, tableSize.minCellWidth(), tableSize.isRelative); + const onRight = (prev, index) => resize.calcRightEdgeDeltas(result, prev, index, step, tableSize.minCellWidth(), tableSize.isRelative); + return context.fold(onNone, onOnly, onLeft, onMiddle, onRight); + }; + + const total = (start, end, measures) => { + let r = 0; + for (let i = start; i < end; i++) { + r += measures[i] !== undefined ? measures[i] : 0; + } + return r; + }; + const recalculateWidthForCells = (warehouse, widths) => { + const all = Warehouse.justCells(warehouse); + return map$1(all, cell => { + const width = total(cell.column, cell.column + cell.colspan, widths); + return { + element: cell.element, + width, + colspan: cell.colspan + }; + }); + }; + const recalculateWidthForColumns = (warehouse, widths) => { + const groups = Warehouse.justColumns(warehouse); + return map$1(groups, (column, index) => ({ + element: column.element, + width: widths[index], + colspan: column.colspan + })); + }; + const recalculateHeightForCells = (warehouse, heights) => { + const all = Warehouse.justCells(warehouse); + return map$1(all, cell => { + const height = total(cell.row, cell.row + cell.rowspan, heights); + return { + element: cell.element, + height, + rowspan: cell.rowspan + }; + }); + }; + const matchRowHeight = (warehouse, heights) => { + return map$1(warehouse.all, (row, i) => { + return { + element: row.element, + height: heights[i] + }; + }); + }; + + const sumUp = newSize => foldr(newSize, (b, a) => b + a, 0); + const recalculate = (warehouse, widths) => { + if (Warehouse.hasColumns(warehouse)) { + return recalculateWidthForColumns(warehouse, widths); + } else { + return recalculateWidthForCells(warehouse, widths); + } + }; + const recalculateAndApply = (warehouse, widths, tableSize) => { + const newSizes = recalculate(warehouse, widths); + each$2(newSizes, cell => { + tableSize.setElementWidth(cell.element, cell.width); + }); + }; + const adjustWidth = (table, delta, index, resizing, tableSize) => { + const warehouse = Warehouse.fromTable(table); + const step = tableSize.getCellDelta(delta); + const widths = tableSize.getWidths(warehouse, tableSize); + const isLastColumn = index === warehouse.grid.columns - 1; + const clampedStep = resizing.clampTableDelta(widths, index, step, tableSize.minCellWidth(), isLastColumn); + const deltas = determine(widths, index, clampedStep, tableSize, resizing); + const newWidths = map$1(deltas, (dx, i) => dx + widths[i]); + recalculateAndApply(warehouse, newWidths, tableSize); + resizing.resizeTable(tableSize.adjustTableWidth, clampedStep, isLastColumn); + }; + const adjustHeight = (table, delta, index, direction) => { + const warehouse = Warehouse.fromTable(table); + const heights = getPixelHeights(warehouse, table, direction); + const newHeights = map$1(heights, (dy, i) => index === i ? Math.max(delta + dy, minHeight()) : dy); + const newCellSizes = recalculateHeightForCells(warehouse, newHeights); + const newRowSizes = matchRowHeight(warehouse, newHeights); + each$2(newRowSizes, row => { + setHeight(row.element, row.height); + }); + each$2(newCellSizes, cell => { + setHeight(cell.element, cell.height); + }); + const total = sumUp(newHeights); + setHeight(table, total); + }; + const adjustAndRedistributeWidths$1 = (_table, list, details, tableSize, resizeBehaviour) => { + const warehouse = Warehouse.generate(list); + const sizes = tableSize.getWidths(warehouse, tableSize); + const tablePixelWidth = tableSize.pixelWidth(); + const {newSizes, delta} = resizeBehaviour.calcRedestributedWidths(sizes, tablePixelWidth, details.pixelDelta, tableSize.isRelative); + recalculateAndApply(warehouse, newSizes, tableSize); + tableSize.adjustTableWidth(delta); + }; + const adjustWidthTo = (_table, list, _info, tableSize) => { + const warehouse = Warehouse.generate(list); + const widths = tableSize.getWidths(warehouse, tableSize); + recalculateAndApply(warehouse, widths, tableSize); + }; + + const uniqueColumns = details => { + const uniqueCheck = (rest, detail) => { + const columnExists = exists(rest, currentDetail => currentDetail.column === detail.column); + return columnExists ? rest : rest.concat([detail]); + }; + return foldl(details, uniqueCheck, []).sort((detailA, detailB) => detailA.column - detailB.column); + }; + + const isCol = isTag('col'); + const isColgroup = isTag('colgroup'); + const isRow$1 = element => name(element) === 'tr' || isColgroup(element); + const elementToData = element => { + const colspan = getAttrValue(element, 'colspan', 1); + const rowspan = getAttrValue(element, 'rowspan', 1); + return { + element, + colspan, + rowspan + }; + }; + const modification = (generators, toData = elementToData) => { + const nuCell = data => isCol(data.element) ? generators.col(data) : generators.cell(data); + const nuRow = data => isColgroup(data.element) ? generators.colgroup(data) : generators.row(data); + const add = element => { + if (isRow$1(element)) { + return nuRow({ element }); + } else { + const cell = element; + const replacement = nuCell(toData(cell)); + recent = Optional.some({ + item: cell, + replacement + }); + return replacement; + } + }; + let recent = Optional.none(); + const getOrInit = (element, comparator) => { + return recent.fold(() => { + return add(element); + }, p => { + return comparator(element, p.item) ? p.replacement : add(element); + }); + }; + return { getOrInit }; + }; + const transform$1 = tag => { + return generators => { + const list = []; + const find = (element, comparator) => { + return find$1(list, x => { + return comparator(x.item, element); + }); + }; + const makeNew = element => { + const attrs = tag === 'td' ? { scope: null } : {}; + const cell = generators.replace(element, tag, attrs); + list.push({ + item: element, + sub: cell + }); + return cell; + }; + const replaceOrInit = (element, comparator) => { + if (isRow$1(element) || isCol(element)) { + return element; + } else { + const cell = element; + return find(cell, comparator).fold(() => { + return makeNew(cell); + }, p => { + return comparator(element, p.item) ? p.sub : makeNew(cell); + }); + } + }; + return { replaceOrInit }; + }; + }; + const getScopeAttribute = cell => getOpt(cell, 'scope').map(attribute => attribute.substr(0, 3)); + const merging = generators => { + const unmerge = cell => { + const scope = getScopeAttribute(cell); + scope.each(attribute => set$2(cell, 'scope', attribute)); + return () => { + const raw = generators.cell({ + element: cell, + colspan: 1, + rowspan: 1 + }); + remove$5(raw, 'width'); + remove$5(cell, 'width'); + scope.each(attribute => set$2(raw, 'scope', attribute)); + return raw; + }; + }; + const merge = cells => { + const getScopeProperty = () => { + const stringAttributes = cat(map$1(cells, getScopeAttribute)); + if (stringAttributes.length === 0) { + return Optional.none(); + } else { + const baseScope = stringAttributes[0]; + const scopes = [ + 'row', + 'col' + ]; + const isMixed = exists(stringAttributes, attribute => { + return attribute !== baseScope && contains$2(scopes, attribute); + }); + return isMixed ? Optional.none() : Optional.from(baseScope); + } + }; + remove$5(cells[0], 'width'); + getScopeProperty().fold(() => remove$7(cells[0], 'scope'), attribute => set$2(cells[0], 'scope', attribute + 'group')); + return constant(cells[0]); + }; + return { + unmerge, + merge + }; + }; + const Generators = { + modification, + transform: transform$1, + merging + }; + + const blockList = [ + 'body', + 'p', + 'div', + 'article', + 'aside', + 'figcaption', + 'figure', + 'footer', + 'header', + 'nav', + 'section', + 'ol', + 'ul', + 'table', + 'thead', + 'tfoot', + 'tbody', + 'caption', + 'tr', + 'td', + 'th', + 'h1', + 'h2', + 'h3', + 'h4', + 'h5', + 'h6', + 'blockquote', + 'pre', + 'address' + ]; + const isList$1 = (universe, item) => { + const tagName = universe.property().name(item); + return contains$2([ + 'ol', + 'ul' + ], tagName); + }; + const isBlock$1 = (universe, item) => { + const tagName = universe.property().name(item); + return contains$2(blockList, tagName); + }; + const isEmptyTag$1 = (universe, item) => { + return contains$2([ + 'br', + 'img', + 'hr', + 'input' + ], universe.property().name(item)); + }; + + const universe$1 = DomUniverse(); + const isBlock = element => { + return isBlock$1(universe$1, element); + }; + const isList = element => { + return isList$1(universe$1, element); + }; + const isEmptyTag = element => { + return isEmptyTag$1(universe$1, element); + }; + + const merge = cells => { + const isBr = isTag('br'); + const advancedBr = children => { + return forall(children, c => { + return isBr(c) || isText(c) && get$6(c).trim().length === 0; + }); + }; + const isListItem = el => { + return name(el) === 'li' || ancestor$2(el, isList).isSome(); + }; + const siblingIsBlock = el => { + return nextSibling(el).map(rightSibling => { + if (isBlock(rightSibling)) { + return true; + } + if (isEmptyTag(rightSibling)) { + return name(rightSibling) === 'img' ? false : true; + } + return false; + }).getOr(false); + }; + const markCell = cell => { + return last$1(cell).bind(rightEdge => { + const rightSiblingIsBlock = siblingIsBlock(rightEdge); + return parent(rightEdge).map(parent => { + return rightSiblingIsBlock === true || isListItem(parent) || isBr(rightEdge) || isBlock(parent) && !eq$1(cell, parent) ? [] : [SugarElement.fromTag('br')]; + }); + }).getOr([]); + }; + const markContent = () => { + const content = bind$2(cells, cell => { + const children = children$2(cell); + return advancedBr(children) ? [] : children.concat(markCell(cell)); + }); + return content.length === 0 ? [SugarElement.fromTag('br')] : content; + }; + const contents = markContent(); + empty(cells[0]); + append(cells[0], contents); + }; + + const isEditable = elem => isEditable$1(elem, true); + const prune = table => { + const cells = cells$1(table); + if (cells.length === 0) { + remove$6(table); + } + }; + const outcome = (grid, cursor) => ({ + grid, + cursor + }); + const findEditableCursorPosition = rows => findMap(rows, row => findMap(row.cells, cell => { + const elem = cell.element; + return someIf(isEditable(elem), elem); + })); + const elementFromGrid = (grid, row, column) => { + var _a, _b; + const rows = extractGridDetails(grid).rows; + return Optional.from((_b = (_a = rows[row]) === null || _a === void 0 ? void 0 : _a.cells[column]) === null || _b === void 0 ? void 0 : _b.element).filter(isEditable).orThunk(() => findEditableCursorPosition(rows)); + }; + const bundle = (grid, row, column) => { + const cursorElement = elementFromGrid(grid, row, column); + return outcome(grid, cursorElement); + }; + const uniqueRows = details => { + const rowCompilation = (rest, detail) => { + const rowExists = exists(rest, currentDetail => currentDetail.row === detail.row); + return rowExists ? rest : rest.concat([detail]); + }; + return foldl(details, rowCompilation, []).sort((detailA, detailB) => detailA.row - detailB.row); + }; + const opInsertRowsBefore = (grid, details, comparator, genWrappers) => { + const targetIndex = details[0].row; + const rows = uniqueRows(details); + const newGrid = foldr(rows, (acc, row) => { + const newG = insertRowAt(acc.grid, targetIndex, row.row + acc.delta, comparator, genWrappers.getOrInit); + return { + grid: newG, + delta: acc.delta + 1 + }; + }, { + grid, + delta: 0 + }).grid; + return bundle(newGrid, targetIndex, details[0].column); + }; + const opInsertRowsAfter = (grid, details, comparator, genWrappers) => { + const rows = uniqueRows(details); + const target = rows[rows.length - 1]; + const targetIndex = target.row + target.rowspan; + const newGrid = foldr(rows, (newG, row) => { + return insertRowAt(newG, targetIndex, row.row, comparator, genWrappers.getOrInit); + }, grid); + return bundle(newGrid, targetIndex, details[0].column); + }; + const opInsertColumnsBefore = (grid, extractDetail, comparator, genWrappers) => { + const details = extractDetail.details; + const columns = uniqueColumns(details); + const targetIndex = columns[0].column; + const newGrid = foldr(columns, (acc, col) => { + const newG = insertColumnAt(acc.grid, targetIndex, col.column + acc.delta, comparator, genWrappers.getOrInit); + return { + grid: newG, + delta: acc.delta + 1 + }; + }, { + grid, + delta: 0 + }).grid; + return bundle(newGrid, details[0].row, targetIndex); + }; + const opInsertColumnsAfter = (grid, extractDetail, comparator, genWrappers) => { + const details = extractDetail.details; + const target = details[details.length - 1]; + const targetIndex = target.column + target.colspan; + const columns = uniqueColumns(details); + const newGrid = foldr(columns, (newG, col) => { + return insertColumnAt(newG, targetIndex, col.column, comparator, genWrappers.getOrInit); + }, grid); + return bundle(newGrid, details[0].row, targetIndex); + }; + const opMakeColumnsHeader = (initialGrid, details, comparator, genWrappers) => { + const columns = uniqueColumns(details); + const columnIndexes = map$1(columns, detail => detail.column); + const newGrid = replaceColumns(initialGrid, columnIndexes, true, comparator, genWrappers.replaceOrInit); + return bundle(newGrid, details[0].row, details[0].column); + }; + const opMakeCellsHeader = (initialGrid, details, comparator, genWrappers) => { + const newGrid = replaceCells(initialGrid, details, comparator, genWrappers.replaceOrInit); + return bundle(newGrid, details[0].row, details[0].column); + }; + const opUnmakeColumnsHeader = (initialGrid, details, comparator, genWrappers) => { + const columns = uniqueColumns(details); + const columnIndexes = map$1(columns, detail => detail.column); + const newGrid = replaceColumns(initialGrid, columnIndexes, false, comparator, genWrappers.replaceOrInit); + return bundle(newGrid, details[0].row, details[0].column); + }; + const opUnmakeCellsHeader = (initialGrid, details, comparator, genWrappers) => { + const newGrid = replaceCells(initialGrid, details, comparator, genWrappers.replaceOrInit); + return bundle(newGrid, details[0].row, details[0].column); + }; + const makeRowsSection = (section, applyScope) => (initialGrid, details, comparator, genWrappers, tableSection) => { + const rows = uniqueRows(details); + const rowIndexes = map$1(rows, detail => detail.row); + const newGrid = replaceRows(initialGrid, rowIndexes, section, applyScope, comparator, genWrappers.replaceOrInit, tableSection); + return bundle(newGrid, details[0].row, details[0].column); + }; + const opMakeRowsHeader = makeRowsSection('thead', true); + const opMakeRowsBody = makeRowsSection('tbody', false); + const opMakeRowsFooter = makeRowsSection('tfoot', false); + const opEraseColumns = (grid, extractDetail, _comparator, _genWrappers) => { + const columns = uniqueColumns(extractDetail.details); + const newGrid = deleteColumnsAt(grid, map$1(columns, column => column.column)); + const maxColIndex = newGrid.length > 0 ? newGrid[0].cells.length - 1 : 0; + return bundle(newGrid, columns[0].row, Math.min(columns[0].column, maxColIndex)); + }; + const opEraseRows = (grid, details, _comparator, _genWrappers) => { + const rows = uniqueRows(details); + const newGrid = deleteRowsAt(grid, rows[0].row, rows[rows.length - 1].row); + const maxRowIndex = newGrid.length > 0 ? newGrid.length - 1 : 0; + return bundle(newGrid, Math.min(details[0].row, maxRowIndex), details[0].column); + }; + const opMergeCells = (grid, mergable, comparator, genWrappers) => { + const cells = mergable.cells; + merge(cells); + const newGrid = merge$2(grid, mergable.bounds, comparator, genWrappers.merge(cells)); + return outcome(newGrid, Optional.from(cells[0])); + }; + const opUnmergeCells = (grid, unmergable, comparator, genWrappers) => { + const unmerge$1 = (b, cell) => unmerge(b, cell, comparator, genWrappers.unmerge(cell)); + const newGrid = foldr(unmergable, unmerge$1, grid); + return outcome(newGrid, Optional.from(unmergable[0])); + }; + const opPasteCells = (grid, pasteDetails, comparator, _genWrappers) => { + const gridify = (table, generators) => { + const wh = Warehouse.fromTable(table); + return toGrid(wh, generators, true); + }; + const gridB = gridify(pasteDetails.clipboard, pasteDetails.generators); + const startAddress = address(pasteDetails.row, pasteDetails.column); + const mergedGrid = merge$1(startAddress, grid, gridB, pasteDetails.generators, comparator); + return mergedGrid.fold(() => outcome(grid, Optional.some(pasteDetails.element)), newGrid => { + return bundle(newGrid, pasteDetails.row, pasteDetails.column); + }); + }; + const gridifyRows = (rows, generators, context) => { + const pasteDetails = fromPastedRows(rows, context.section); + const wh = Warehouse.generate(pasteDetails); + return toGrid(wh, generators, true); + }; + const opPasteColsBefore = (grid, pasteDetails, comparator, _genWrappers) => { + const rows = extractGridDetails(grid).rows; + const index = pasteDetails.cells[0].column; + const context = rows[pasteDetails.cells[0].row]; + const gridB = gridifyRows(pasteDetails.clipboard, pasteDetails.generators, context); + const mergedGrid = insertCols(index, grid, gridB, pasteDetails.generators, comparator); + return bundle(mergedGrid, pasteDetails.cells[0].row, pasteDetails.cells[0].column); + }; + const opPasteColsAfter = (grid, pasteDetails, comparator, _genWrappers) => { + const rows = extractGridDetails(grid).rows; + const index = pasteDetails.cells[pasteDetails.cells.length - 1].column + pasteDetails.cells[pasteDetails.cells.length - 1].colspan; + const context = rows[pasteDetails.cells[0].row]; + const gridB = gridifyRows(pasteDetails.clipboard, pasteDetails.generators, context); + const mergedGrid = insertCols(index, grid, gridB, pasteDetails.generators, comparator); + return bundle(mergedGrid, pasteDetails.cells[0].row, pasteDetails.cells[0].column); + }; + const opPasteRowsBefore = (grid, pasteDetails, comparator, _genWrappers) => { + const rows = extractGridDetails(grid).rows; + const index = pasteDetails.cells[0].row; + const context = rows[index]; + const gridB = gridifyRows(pasteDetails.clipboard, pasteDetails.generators, context); + const mergedGrid = insertRows(index, grid, gridB, pasteDetails.generators, comparator); + return bundle(mergedGrid, pasteDetails.cells[0].row, pasteDetails.cells[0].column); + }; + const opPasteRowsAfter = (grid, pasteDetails, comparator, _genWrappers) => { + const rows = extractGridDetails(grid).rows; + const index = pasteDetails.cells[pasteDetails.cells.length - 1].row + pasteDetails.cells[pasteDetails.cells.length - 1].rowspan; + const context = rows[pasteDetails.cells[0].row]; + const gridB = gridifyRows(pasteDetails.clipboard, pasteDetails.generators, context); + const mergedGrid = insertRows(index, grid, gridB, pasteDetails.generators, comparator); + return bundle(mergedGrid, pasteDetails.cells[0].row, pasteDetails.cells[0].column); + }; + const opGetColumnsType = (table, target) => { + const house = Warehouse.fromTable(table); + const details = onCells(house, target); + return details.bind(selectedCells => { + const lastSelectedCell = selectedCells[selectedCells.length - 1]; + const minColRange = selectedCells[0].column; + const maxColRange = lastSelectedCell.column + lastSelectedCell.colspan; + const selectedColumnCells = flatten(map$1(house.all, row => filter$2(row.cells, cell => cell.column >= minColRange && cell.column < maxColRange))); + return findCommonCellType(selectedColumnCells); + }).getOr(''); + }; + const opGetCellsType = (table, target) => { + const house = Warehouse.fromTable(table); + const details = onCells(house, target); + return details.bind(findCommonCellType).getOr(''); + }; + const opGetRowsType = (table, target) => { + const house = Warehouse.fromTable(table); + const details = onCells(house, target); + return details.bind(selectedCells => { + const lastSelectedCell = selectedCells[selectedCells.length - 1]; + const minRowRange = selectedCells[0].row; + const maxRowRange = lastSelectedCell.row + lastSelectedCell.rowspan; + const selectedRows = house.all.slice(minRowRange, maxRowRange); + return findCommonRowType(selectedRows); + }).getOr(''); + }; + const resize = (table, list, details, behaviours) => adjustWidthTo(table, list, details, behaviours.sizing); + const adjustAndRedistributeWidths = (table, list, details, behaviours) => adjustAndRedistributeWidths$1(table, list, details, behaviours.sizing, behaviours.resize); + const firstColumnIsLocked = (_warehouse, details) => exists(details, detail => detail.column === 0 && detail.isLocked); + const lastColumnIsLocked = (warehouse, details) => exists(details, detail => detail.column + detail.colspan >= warehouse.grid.columns && detail.isLocked); + const getColumnsWidth = (warehouse, details) => { + const columns$1 = columns(warehouse); + const uniqueCols = uniqueColumns(details); + return foldl(uniqueCols, (acc, detail) => { + const column = columns$1[detail.column]; + const colWidth = column.map(getOuter$2).getOr(0); + return acc + colWidth; + }, 0); + }; + const insertColumnsExtractor = before => (warehouse, target) => onCells(warehouse, target).filter(details => { + const checkLocked = before ? firstColumnIsLocked : lastColumnIsLocked; + return !checkLocked(warehouse, details); + }).map(details => ({ + details, + pixelDelta: getColumnsWidth(warehouse, details) + })); + const eraseColumnsExtractor = (warehouse, target) => onUnlockedCells(warehouse, target).map(details => ({ + details, + pixelDelta: -getColumnsWidth(warehouse, details) + })); + const pasteColumnsExtractor = before => (warehouse, target) => onPasteByEditor(warehouse, target).filter(details => { + const checkLocked = before ? firstColumnIsLocked : lastColumnIsLocked; + return !checkLocked(warehouse, details.cells); + }); + const headerCellGenerator = Generators.transform('th'); + const bodyCellGenerator = Generators.transform('td'); + const insertRowsBefore = run(opInsertRowsBefore, onCells, noop, noop, Generators.modification); + const insertRowsAfter = run(opInsertRowsAfter, onCells, noop, noop, Generators.modification); + const insertColumnsBefore = run(opInsertColumnsBefore, insertColumnsExtractor(true), adjustAndRedistributeWidths, noop, Generators.modification); + const insertColumnsAfter = run(opInsertColumnsAfter, insertColumnsExtractor(false), adjustAndRedistributeWidths, noop, Generators.modification); + const eraseColumns = run(opEraseColumns, eraseColumnsExtractor, adjustAndRedistributeWidths, prune, Generators.modification); + const eraseRows = run(opEraseRows, onCells, noop, prune, Generators.modification); + const makeColumnsHeader = run(opMakeColumnsHeader, onUnlockedCells, noop, noop, headerCellGenerator); + const unmakeColumnsHeader = run(opUnmakeColumnsHeader, onUnlockedCells, noop, noop, bodyCellGenerator); + const makeRowsHeader = run(opMakeRowsHeader, onUnlockedCells, noop, noop, headerCellGenerator); + const makeRowsBody = run(opMakeRowsBody, onUnlockedCells, noop, noop, bodyCellGenerator); + const makeRowsFooter = run(opMakeRowsFooter, onUnlockedCells, noop, noop, bodyCellGenerator); + const makeCellsHeader = run(opMakeCellsHeader, onUnlockedCells, noop, noop, headerCellGenerator); + const unmakeCellsHeader = run(opUnmakeCellsHeader, onUnlockedCells, noop, noop, bodyCellGenerator); + const mergeCells = run(opMergeCells, onUnlockedMergable, resize, noop, Generators.merging); + const unmergeCells = run(opUnmergeCells, onUnlockedUnmergable, resize, noop, Generators.merging); + const pasteCells = run(opPasteCells, onPaste, resize, noop, Generators.modification); + const pasteColsBefore = run(opPasteColsBefore, pasteColumnsExtractor(true), noop, noop, Generators.modification); + const pasteColsAfter = run(opPasteColsAfter, pasteColumnsExtractor(false), noop, noop, Generators.modification); + const pasteRowsBefore = run(opPasteRowsBefore, onPasteByEditor, noop, noop, Generators.modification); + const pasteRowsAfter = run(opPasteRowsAfter, onPasteByEditor, noop, noop, Generators.modification); + const getColumnsType = opGetColumnsType; + const getCellsType = opGetCellsType; + const getRowsType = opGetRowsType; + + const fireNewRow = (editor, row) => editor.dispatch('NewRow', { node: row }); + const fireNewCell = (editor, cell) => editor.dispatch('NewCell', { node: cell }); + const fireTableModified = (editor, table, data) => { + editor.dispatch('TableModified', { + ...data, + table + }); + }; + const fireTableSelectionChange = (editor, cells, start, finish, otherCells) => { + editor.dispatch('TableSelectionChange', { + cells, + start, + finish, + otherCells + }); + }; + const fireTableSelectionClear = editor => { + editor.dispatch('TableSelectionClear'); + }; + const fireObjectResizeStart = (editor, target, width, height, origin) => { + editor.dispatch('ObjectResizeStart', { + target, + width, + height, + origin + }); + }; + const fireObjectResized = (editor, target, width, height, origin) => { + editor.dispatch('ObjectResized', { + target, + width, + height, + origin + }); + }; + const styleModified = { + structure: false, + style: true + }; + const structureModified = { + structure: true, + style: false + }; + const styleAndStructureModified = { + structure: true, + style: true + }; + + const option = name => editor => editor.options.get(name); + const determineDefaultTableStyles = (editor, defaultStyles) => { + var _a; + if (isTablePixelsForced(editor)) { + const dom = editor.dom; + const parentBlock = (_a = dom.getParent(editor.selection.getStart(), dom.isBlock)) !== null && _a !== void 0 ? _a : editor.getBody(); + const contentWidth = getInner(SugarElement.fromDom(parentBlock)); + return { + ...defaultStyles, + width: contentWidth + 'px' + }; + } else if (isTableResponsiveForced(editor)) { + return filter$1(defaultStyles, (_value, key) => key !== 'width'); + } else { + return defaultStyles; + } + }; + const register = editor => { + const registerOption = editor.options.register; + registerOption('table_clone_elements', { processor: 'string[]' }); + registerOption('table_use_colgroups', { + processor: 'boolean', + default: true + }); + registerOption('table_header_type', { + processor: value => { + const valid = contains$2([ + 'section', + 'cells', + 'sectionCells', + 'auto' + ], value); + return valid ? { + value, + valid + } : { + valid: false, + message: 'Must be one of: section, cells, sectionCells or auto.' + }; + }, + default: 'section' + }); + registerOption('table_sizing_mode', { + processor: 'string', + default: 'auto' + }); + registerOption('table_default_attributes', { + processor: 'object', + default: { border: '1' } + }); + registerOption('table_default_styles', { + processor: 'object', + default: { + 'border-collapse': 'collapse', + 'width': '100%' + } + }); + registerOption('table_column_resizing', { + processor: value => { + const valid = contains$2([ + 'preservetable', + 'resizetable' + ], value); + return valid ? { + value, + valid + } : { + valid: false, + message: 'Must be preservetable, or resizetable.' + }; + }, + default: 'preservetable' + }); + registerOption('table_resize_bars', { + processor: 'boolean', + default: true + }); + }; + const getTableCloneElements = editor => { + return Optional.from(editor.options.get('table_clone_elements')); + }; + const hasTableObjectResizing = editor => { + const objectResizing = editor.options.get('object_resizing'); + return contains$2(objectResizing.split(','), 'table'); + }; + const getTableHeaderType = option('table_header_type'); + const getTableColumnResizingBehaviour = option('table_column_resizing'); + const isPreserveTableColumnResizing = editor => getTableColumnResizingBehaviour(editor) === 'preservetable'; + const isResizeTableColumnResizing = editor => getTableColumnResizingBehaviour(editor) === 'resizetable'; + const getTableSizingMode = option('table_sizing_mode'); + const isTablePercentagesForced = editor => getTableSizingMode(editor) === 'relative'; + const isTablePixelsForced = editor => getTableSizingMode(editor) === 'fixed'; + const isTableResponsiveForced = editor => getTableSizingMode(editor) === 'responsive'; + const hasTableResizeBars = option('table_resize_bars'); + const getTableDefaultAttributes = option('table_default_attributes'); + const getTableDefaultStyles = editor => { + const options = editor.options; + const defaultStyles = options.get('table_default_styles'); + return options.isSet('table_default_styles') ? defaultStyles : determineDefaultTableStyles(editor, defaultStyles); + }; + const tableUseColumnGroup = option('table_use_colgroups'); + + const get$5 = (editor, table) => { + if (isTablePercentagesForced(editor)) { + return TableSize.percentageSize(table); + } else if (isTablePixelsForced(editor)) { + return TableSize.pixelSize(table); + } else { + return TableSize.getTableSize(table); + } + }; + + const TableActions = (editor, resizeHandler, cellSelectionHandler) => { + const isTableBody = editor => name(getBody(editor)) === 'table'; + const lastRowGuard = table => isTableBody(editor) === false || getGridSize(table).rows > 1; + const lastColumnGuard = table => isTableBody(editor) === false || getGridSize(table).columns > 1; + const cloneFormats = getTableCloneElements(editor); + const colMutationOp = isResizeTableColumnResizing(editor) ? noop : halve; + const getTableSectionType = table => { + switch (getTableHeaderType(editor)) { + case 'section': + return TableSection.section(); + case 'sectionCells': + return TableSection.sectionCells(); + case 'cells': + return TableSection.cells(); + default: + return TableSection.getTableSectionType(table, 'section'); + } + }; + const setSelectionFromAction = (table, result) => result.cursor.fold(() => { + const cells = cells$1(table); + return head(cells).filter(inBody).map(firstCell => { + cellSelectionHandler.clearSelectedCells(table.dom); + const rng = editor.dom.createRng(); + rng.selectNode(firstCell.dom); + editor.selection.setRng(rng); + set$2(firstCell, 'data-mce-selected', '1'); + return rng; + }); + }, cell => { + const des = freefallRtl(cell); + const rng = editor.dom.createRng(); + rng.setStart(des.element.dom, des.offset); + rng.setEnd(des.element.dom, des.offset); + editor.selection.setRng(rng); + cellSelectionHandler.clearSelectedCells(table.dom); + return Optional.some(rng); + }); + const execute = (operation, guard, mutate, effect) => (table, target, noEvents = false) => { + removeDataStyle(table); + const doc = SugarElement.fromDom(editor.getDoc()); + const generators = cellOperations(mutate, doc, cloneFormats); + const behaviours = { + sizing: get$5(editor, table), + resize: isResizeTableColumnResizing(editor) ? resizeTable() : preserveTable(), + section: getTableSectionType(table) + }; + return guard(table) ? operation(table, target, generators, behaviours).bind(result => { + resizeHandler.refresh(table.dom); + each$2(result.newRows, row => { + fireNewRow(editor, row.dom); + }); + each$2(result.newCells, cell => { + fireNewCell(editor, cell.dom); + }); + const range = setSelectionFromAction(table, result); + if (inBody(table)) { + removeDataStyle(table); + if (!noEvents) { + fireTableModified(editor, table.dom, effect); + } + } + return range.map(rng => ({ + rng, + effect + })); + }) : Optional.none(); + }; + const deleteRow = execute(eraseRows, lastRowGuard, noop, structureModified); + const deleteColumn = execute(eraseColumns, lastColumnGuard, noop, structureModified); + const insertRowsBefore$1 = execute(insertRowsBefore, always, noop, structureModified); + const insertRowsAfter$1 = execute(insertRowsAfter, always, noop, structureModified); + const insertColumnsBefore$1 = execute(insertColumnsBefore, always, colMutationOp, structureModified); + const insertColumnsAfter$1 = execute(insertColumnsAfter, always, colMutationOp, structureModified); + const mergeCells$1 = execute(mergeCells, always, noop, structureModified); + const unmergeCells$1 = execute(unmergeCells, always, noop, structureModified); + const pasteColsBefore$1 = execute(pasteColsBefore, always, noop, structureModified); + const pasteColsAfter$1 = execute(pasteColsAfter, always, noop, structureModified); + const pasteRowsBefore$1 = execute(pasteRowsBefore, always, noop, structureModified); + const pasteRowsAfter$1 = execute(pasteRowsAfter, always, noop, structureModified); + const pasteCells$1 = execute(pasteCells, always, noop, styleAndStructureModified); + const makeCellsHeader$1 = execute(makeCellsHeader, always, noop, structureModified); + const unmakeCellsHeader$1 = execute(unmakeCellsHeader, always, noop, structureModified); + const makeColumnsHeader$1 = execute(makeColumnsHeader, always, noop, structureModified); + const unmakeColumnsHeader$1 = execute(unmakeColumnsHeader, always, noop, structureModified); + const makeRowsHeader$1 = execute(makeRowsHeader, always, noop, structureModified); + const makeRowsBody$1 = execute(makeRowsBody, always, noop, structureModified); + const makeRowsFooter$1 = execute(makeRowsFooter, always, noop, structureModified); + const getTableCellType = getCellsType; + const getTableColType = getColumnsType; + const getTableRowType = getRowsType; + return { + deleteRow, + deleteColumn, + insertRowsBefore: insertRowsBefore$1, + insertRowsAfter: insertRowsAfter$1, + insertColumnsBefore: insertColumnsBefore$1, + insertColumnsAfter: insertColumnsAfter$1, + mergeCells: mergeCells$1, + unmergeCells: unmergeCells$1, + pasteColsBefore: pasteColsBefore$1, + pasteColsAfter: pasteColsAfter$1, + pasteRowsBefore: pasteRowsBefore$1, + pasteRowsAfter: pasteRowsAfter$1, + pasteCells: pasteCells$1, + makeCellsHeader: makeCellsHeader$1, + unmakeCellsHeader: unmakeCellsHeader$1, + makeColumnsHeader: makeColumnsHeader$1, + unmakeColumnsHeader: unmakeColumnsHeader$1, + makeRowsHeader: makeRowsHeader$1, + makeRowsBody: makeRowsBody$1, + makeRowsFooter: makeRowsFooter$1, + getTableRowType, + getTableCellType, + getTableColType + }; + }; + + const constrainSpan = (element, property, value) => { + const currentColspan = getAttrValue(element, property, 1); + if (value === 1 || currentColspan <= 1) { + remove$7(element, property); + } else { + set$2(element, property, Math.min(value, currentColspan)); + } + }; + const generateColGroup = (house, minColRange, maxColRange) => { + if (Warehouse.hasColumns(house)) { + const colsToCopy = filter$2(Warehouse.justColumns(house), col => col.column >= minColRange && col.column < maxColRange); + const copiedCols = map$1(colsToCopy, c => { + const clonedCol = deep(c.element); + constrainSpan(clonedCol, 'span', maxColRange - minColRange); + return clonedCol; + }); + const fakeColgroup = SugarElement.fromTag('colgroup'); + append(fakeColgroup, copiedCols); + return [fakeColgroup]; + } else { + return []; + } + }; + const generateRows = (house, minColRange, maxColRange) => map$1(house.all, row => { + const cellsToCopy = filter$2(row.cells, cell => cell.column >= minColRange && cell.column < maxColRange); + const copiedCells = map$1(cellsToCopy, cell => { + const clonedCell = deep(cell.element); + constrainSpan(clonedCell, 'colspan', maxColRange - minColRange); + return clonedCell; + }); + const fakeTR = SugarElement.fromTag('tr'); + append(fakeTR, copiedCells); + return fakeTR; + }); + const copyCols = (table, target) => { + const house = Warehouse.fromTable(table); + const details = onUnlockedCells(house, target); + return details.map(selectedCells => { + const lastSelectedCell = selectedCells[selectedCells.length - 1]; + const minColRange = selectedCells[0].column; + const maxColRange = lastSelectedCell.column + lastSelectedCell.colspan; + const fakeColGroups = generateColGroup(house, minColRange, maxColRange); + const fakeRows = generateRows(house, minColRange, maxColRange); + return [ + ...fakeColGroups, + ...fakeRows + ]; + }); + }; + + const copyRows = (table, target, generators) => { + const warehouse = Warehouse.fromTable(table); + const details = onCells(warehouse, target); + return details.bind(selectedCells => { + const grid = toGrid(warehouse, generators, false); + const rows = extractGridDetails(grid).rows; + const slicedGrid = rows.slice(selectedCells[0].row, selectedCells[selectedCells.length - 1].row + selectedCells[selectedCells.length - 1].rowspan); + const filteredGrid = bind$2(slicedGrid, row => { + const newCells = filter$2(row.cells, cell => !cell.isLocked); + return newCells.length > 0 ? [{ + ...row, + cells: newCells + }] : []; + }); + const slicedDetails = toDetailList(filteredGrid); + return someIf(slicedDetails.length > 0, slicedDetails); + }).map(slicedDetails => copy(slicedDetails)); + }; + + const adt$5 = Adt.generate([ + { invalid: ['raw'] }, + { pixels: ['value'] }, + { percent: ['value'] } + ]); + const validateFor = (suffix, type, value) => { + const rawAmount = value.substring(0, value.length - suffix.length); + const amount = parseFloat(rawAmount); + return rawAmount === amount.toString() ? type(amount) : adt$5.invalid(value); + }; + const from = value => { + if (endsWith(value, '%')) { + return validateFor('%', adt$5.percent, value); + } + if (endsWith(value, 'px')) { + return validateFor('px', adt$5.pixels, value); + } + return adt$5.invalid(value); + }; + const Size = { + ...adt$5, + from + }; + + const redistributeToPercent = (widths, totalWidth) => { + return map$1(widths, w => { + const colType = Size.from(w); + return colType.fold(() => { + return w; + }, px => { + const ratio = px / totalWidth * 100; + return ratio + '%'; + }, pc => { + return pc + '%'; + }); + }); + }; + const redistributeToPx = (widths, totalWidth, newTotalWidth) => { + const scale = newTotalWidth / totalWidth; + return map$1(widths, w => { + const colType = Size.from(w); + return colType.fold(() => { + return w; + }, px => { + return px * scale + 'px'; + }, pc => { + return pc / 100 * newTotalWidth + 'px'; + }); + }); + }; + const redistributeEmpty = (newWidthType, columns) => { + const f = newWidthType.fold(() => constant(''), pixels => { + const num = pixels / columns; + return constant(num + 'px'); + }, () => { + const num = 100 / columns; + return constant(num + '%'); + }); + return range$1(columns, f); + }; + const redistributeValues = (newWidthType, widths, totalWidth) => { + return newWidthType.fold(() => { + return widths; + }, px => { + return redistributeToPx(widths, totalWidth, px); + }, _pc => { + return redistributeToPercent(widths, totalWidth); + }); + }; + const redistribute$1 = (widths, totalWidth, newWidth) => { + const newType = Size.from(newWidth); + const floats = forall(widths, s => { + return s === '0px'; + }) ? redistributeEmpty(newType, widths.length) : redistributeValues(newType, widths, totalWidth); + return normalize(floats); + }; + const sum = (values, fallback) => { + if (values.length === 0) { + return fallback; + } + return foldr(values, (rest, v) => { + return Size.from(v).fold(constant(0), identity, identity) + rest; + }, 0); + }; + const roundDown = (num, unit) => { + const floored = Math.floor(num); + return { + value: floored + unit, + remainder: num - floored + }; + }; + const add$3 = (value, amount) => { + return Size.from(value).fold(constant(value), px => { + return px + amount + 'px'; + }, pc => { + return pc + amount + '%'; + }); + }; + const normalize = values => { + if (values.length === 0) { + return values; + } + const scan = foldr(values, (rest, value) => { + const info = Size.from(value).fold(() => ({ + value, + remainder: 0 + }), num => roundDown(num, 'px'), num => ({ + value: num + '%', + remainder: 0 + })); + return { + output: [info.value].concat(rest.output), + remainder: rest.remainder + info.remainder + }; + }, { + output: [], + remainder: 0 + }); + const r = scan.output; + return r.slice(0, r.length - 1).concat([add$3(r[r.length - 1], Math.round(scan.remainder))]); + }; + const validate = Size.from; + + const redistributeToW = (newWidths, cells, unit) => { + each$2(cells, cell => { + const widths = newWidths.slice(cell.column, cell.colspan + cell.column); + const w = sum(widths, minWidth()); + set$1(cell.element, 'width', w + unit); + }); + }; + const redistributeToColumns = (newWidths, columns, unit) => { + each$2(columns, (column, index) => { + const width = sum([newWidths[index]], minWidth()); + set$1(column.element, 'width', width + unit); + }); + }; + const redistributeToH = (newHeights, rows, cells, unit) => { + each$2(cells, cell => { + const heights = newHeights.slice(cell.row, cell.rowspan + cell.row); + const h = sum(heights, minHeight()); + set$1(cell.element, 'height', h + unit); + }); + each$2(rows, (row, i) => { + set$1(row.element, 'height', newHeights[i]); + }); + }; + const getUnit = newSize => { + return validate(newSize).fold(constant('px'), constant('px'), constant('%')); + }; + const redistribute = (table, optWidth, optHeight) => { + const warehouse = Warehouse.fromTable(table); + const rows = warehouse.all; + const cells = Warehouse.justCells(warehouse); + const columns = Warehouse.justColumns(warehouse); + optWidth.each(newWidth => { + const widthUnit = getUnit(newWidth); + const totalWidth = get$9(table); + const oldWidths = getRawWidths(warehouse, table); + const nuWidths = redistribute$1(oldWidths, totalWidth, newWidth); + if (Warehouse.hasColumns(warehouse)) { + redistributeToColumns(nuWidths, columns, widthUnit); + } else { + redistributeToW(nuWidths, cells, widthUnit); + } + set$1(table, 'width', newWidth); + }); + optHeight.each(newHeight => { + const hUnit = getUnit(newHeight); + const totalHeight = get$8(table); + const oldHeights = getRawHeights(warehouse, table, height); + const nuHeights = redistribute$1(oldHeights, totalHeight, newHeight); + redistributeToH(nuHeights, rows, cells, hUnit); + set$1(table, 'height', newHeight); + }); + }; + const isPercentSizing = isPercentSizing$1; + const isPixelSizing = isPixelSizing$1; + const isNoneSizing = isNoneSizing$1; + + const cleanupLegacyAttributes = element => { + remove$7(element, 'width'); + }; + const convertToPercentSize = table => { + const newWidth = getPercentTableWidth(table); + redistribute(table, Optional.some(newWidth), Optional.none()); + cleanupLegacyAttributes(table); + }; + const convertToPixelSize = table => { + const newWidth = getPixelTableWidth(table); + redistribute(table, Optional.some(newWidth), Optional.none()); + cleanupLegacyAttributes(table); + }; + const convertToNoneSize = table => { + remove$5(table, 'width'); + const columns = columns$1(table); + const rowElements = columns.length > 0 ? columns : cells$1(table); + each$2(rowElements, cell => { + remove$5(cell, 'width'); + cleanupLegacyAttributes(cell); + }); + cleanupLegacyAttributes(table); + }; + + const DefaultRenderOptions = { + styles: { + 'border-collapse': 'collapse', + 'width': '100%' + }, + attributes: { border: '1' }, + colGroups: false + }; + const tableHeaderCell = () => SugarElement.fromTag('th'); + const tableCell = () => SugarElement.fromTag('td'); + const tableColumn = () => SugarElement.fromTag('col'); + const createRow = (columns, rowHeaders, columnHeaders, rowIndex) => { + const tr = SugarElement.fromTag('tr'); + for (let j = 0; j < columns; j++) { + const td = rowIndex < rowHeaders || j < columnHeaders ? tableHeaderCell() : tableCell(); + if (j < columnHeaders) { + set$2(td, 'scope', 'row'); + } + if (rowIndex < rowHeaders) { + set$2(td, 'scope', 'col'); + } + append$1(td, SugarElement.fromTag('br')); + append$1(tr, td); + } + return tr; + }; + const createGroupRow = columns => { + const columnGroup = SugarElement.fromTag('colgroup'); + range$1(columns, () => append$1(columnGroup, tableColumn())); + return columnGroup; + }; + const createRows = (rows, columns, rowHeaders, columnHeaders) => range$1(rows, r => createRow(columns, rowHeaders, columnHeaders, r)); + const render = (rows, columns, rowHeaders, columnHeaders, headerType, renderOpts = DefaultRenderOptions) => { + const table = SugarElement.fromTag('table'); + const rowHeadersGoInThead = headerType !== 'cells'; + setAll(table, renderOpts.styles); + setAll$1(table, renderOpts.attributes); + if (renderOpts.colGroups) { + append$1(table, createGroupRow(columns)); + } + const actualRowHeaders = Math.min(rows, rowHeaders); + if (rowHeadersGoInThead && rowHeaders > 0) { + const thead = SugarElement.fromTag('thead'); + append$1(table, thead); + const theadRowHeaders = headerType === 'sectionCells' ? actualRowHeaders : 0; + const theadRows = createRows(rowHeaders, columns, theadRowHeaders, columnHeaders); + append(thead, theadRows); + } + const tbody = SugarElement.fromTag('tbody'); + append$1(table, tbody); + const numRows = rowHeadersGoInThead ? rows - actualRowHeaders : rows; + const numRowHeaders = rowHeadersGoInThead ? 0 : rowHeaders; + const tbodyRows = createRows(numRows, columns, numRowHeaders, columnHeaders); + append(tbody, tbodyRows); + return table; + }; + + const get$4 = element => element.dom.innerHTML; + const getOuter = element => { + const container = SugarElement.fromTag('div'); + const clone = SugarElement.fromDom(element.dom.cloneNode(true)); + append$1(container, clone); + return get$4(container); + }; + + const placeCaretInCell = (editor, cell) => { + editor.selection.select(cell.dom, true); + editor.selection.collapse(true); + }; + const selectFirstCellInTable = (editor, tableElm) => { + descendant(tableElm, 'td,th').each(curry(placeCaretInCell, editor)); + }; + const fireEvents = (editor, table) => { + each$2(descendants(table, 'tr'), row => { + fireNewRow(editor, row.dom); + each$2(descendants(row, 'th,td'), cell => { + fireNewCell(editor, cell.dom); + }); + }); + }; + const isPercentage = width => isString(width) && width.indexOf('%') !== -1; + const insert = (editor, columns, rows, colHeaders, rowHeaders) => { + const defaultStyles = getTableDefaultStyles(editor); + const options = { + styles: defaultStyles, + attributes: getTableDefaultAttributes(editor), + colGroups: tableUseColumnGroup(editor) + }; + editor.undoManager.ignore(() => { + const table = render(rows, columns, rowHeaders, colHeaders, getTableHeaderType(editor), options); + set$2(table, 'data-mce-id', '__mce'); + const html = getOuter(table); + editor.insertContent(html); + editor.addVisual(); + }); + return descendant(getBody(editor), 'table[data-mce-id="__mce"]').map(table => { + if (isTablePixelsForced(editor)) { + convertToPixelSize(table); + } else if (isTableResponsiveForced(editor)) { + convertToNoneSize(table); + } else if (isTablePercentagesForced(editor) || isPercentage(defaultStyles.width)) { + convertToPercentSize(table); + } + removeDataStyle(table); + remove$7(table, 'data-mce-id'); + fireEvents(editor, table); + selectFirstCellInTable(editor, table); + return table.dom; + }).getOr(null); + }; + const insertTable = (editor, rows, columns, options = {}) => { + const checkInput = val => isNumber(val) && val > 0; + if (checkInput(rows) && checkInput(columns)) { + const headerRows = options.headerRows || 0; + const headerColumns = options.headerColumns || 0; + return insert(editor, columns, rows, headerColumns, headerRows); + } else { + console.error('Invalid values for mceInsertTable - rows and columns values are required to insert a table.'); + return null; + } + }; + + var global = tinymce.util.Tools.resolve('tinymce.FakeClipboard'); + + const tableTypeBase = 'x-tinymce/dom-table-'; + const tableTypeRow = tableTypeBase + 'rows'; + const tableTypeColumn = tableTypeBase + 'columns'; + const setData = items => { + const fakeClipboardItem = global.FakeClipboardItem(items); + global.write([fakeClipboardItem]); + }; + const getData = type => { + var _a; + const items = (_a = global.read()) !== null && _a !== void 0 ? _a : []; + return findMap(items, item => Optional.from(item.getType(type))); + }; + const clearData = type => { + if (getData(type).isSome()) { + global.clear(); + } + }; + const setRows = rowsOpt => { + rowsOpt.fold(clearRows, rows => setData({ [tableTypeRow]: rows })); + }; + const getRows = () => getData(tableTypeRow); + const clearRows = () => clearData(tableTypeRow); + const setColumns = columnsOpt => { + columnsOpt.fold(clearColumns, columns => setData({ [tableTypeColumn]: columns })); + }; + const getColumns = () => getData(tableTypeColumn); + const clearColumns = () => clearData(tableTypeColumn); + + const getSelectionStartCellOrCaption = editor => getSelectionCellOrCaption(getSelectionStart(editor), getIsRoot(editor)); + const getSelectionStartCell = editor => getSelectionCell(getSelectionStart(editor), getIsRoot(editor)); + const registerCommands = (editor, actions) => { + const isRoot = getIsRoot(editor); + const eraseTable = () => getSelectionStartCellOrCaption(editor).each(cellOrCaption => { + table(cellOrCaption, isRoot).filter(not(isRoot)).each(table => { + const cursor = SugarElement.fromText(''); + after$5(table, cursor); + remove$6(table); + if (editor.dom.isEmpty(editor.getBody())) { + editor.setContent(''); + editor.selection.setCursorLocation(); + } else { + const rng = editor.dom.createRng(); + rng.setStart(cursor.dom, 0); + rng.setEnd(cursor.dom, 0); + editor.selection.setRng(rng); + editor.nodeChanged(); + } + }); + }); + const setSizingMode = sizing => getSelectionStartCellOrCaption(editor).each(cellOrCaption => { + const isForcedSizing = isTableResponsiveForced(editor) || isTablePixelsForced(editor) || isTablePercentagesForced(editor); + if (!isForcedSizing) { + table(cellOrCaption, isRoot).each(table => { + if (sizing === 'relative' && !isPercentSizing(table)) { + convertToPercentSize(table); + } else if (sizing === 'fixed' && !isPixelSizing(table)) { + convertToPixelSize(table); + } else if (sizing === 'responsive' && !isNoneSizing(table)) { + convertToNoneSize(table); + } + removeDataStyle(table); + fireTableModified(editor, table.dom, structureModified); + }); + } + }); + const getTableFromCell = cell => table(cell, isRoot); + const performActionOnSelection = action => getSelectionStartCell(editor).bind(cell => getTableFromCell(cell).map(table => action(table, cell))); + const toggleTableClass = (_ui, clazz) => { + performActionOnSelection(table => { + editor.formatter.toggle('tableclass', { value: clazz }, table.dom); + fireTableModified(editor, table.dom, styleModified); + }); + }; + const toggleTableCellClass = (_ui, clazz) => { + performActionOnSelection(table => { + const selectedCells = getCellsFromSelection(editor); + const allHaveClass = forall(selectedCells, cell => editor.formatter.match('tablecellclass', { value: clazz }, cell.dom)); + const formatterAction = allHaveClass ? editor.formatter.remove : editor.formatter.apply; + each$2(selectedCells, cell => formatterAction('tablecellclass', { value: clazz }, cell.dom)); + fireTableModified(editor, table.dom, styleModified); + }); + }; + const toggleCaption = () => { + getSelectionStartCellOrCaption(editor).each(cellOrCaption => { + table(cellOrCaption, isRoot).each(table => { + child(table, 'caption').fold(() => { + const caption = SugarElement.fromTag('caption'); + append$1(caption, SugarElement.fromText('Caption')); + appendAt(table, caption, 0); + editor.selection.setCursorLocation(caption.dom, 0); + }, caption => { + if (isTag('caption')(cellOrCaption)) { + one('td', table).each(td => editor.selection.setCursorLocation(td.dom, 0)); + } + remove$6(caption); + }); + fireTableModified(editor, table.dom, structureModified); + }); + }); + }; + const postExecute = _data => { + editor.focus(); + }; + const actOnSelection = (execute, noEvents = false) => performActionOnSelection((table, startCell) => { + const targets = forMenu(getCellsFromSelection(editor), table, startCell); + execute(table, targets, noEvents).each(postExecute); + }); + const copyRowSelection = () => performActionOnSelection((table, startCell) => { + const targets = forMenu(getCellsFromSelection(editor), table, startCell); + const generators = cellOperations(noop, SugarElement.fromDom(editor.getDoc()), Optional.none()); + return copyRows(table, targets, generators); + }); + const copyColSelection = () => performActionOnSelection((table, startCell) => { + const targets = forMenu(getCellsFromSelection(editor), table, startCell); + return copyCols(table, targets); + }); + const pasteOnSelection = (execute, getRows) => getRows().each(rows => { + const clonedRows = map$1(rows, row => deep(row)); + performActionOnSelection((table, startCell) => { + const generators = paste$1(SugarElement.fromDom(editor.getDoc())); + const targets = pasteRows(getCellsFromSelection(editor), startCell, clonedRows, generators); + execute(table, targets).each(postExecute); + }); + }); + const actOnType = getAction => (_ui, args) => get$c(args, 'type').each(type => { + actOnSelection(getAction(type), args.no_events); + }); + each$1({ + mceTableSplitCells: () => actOnSelection(actions.unmergeCells), + mceTableMergeCells: () => actOnSelection(actions.mergeCells), + mceTableInsertRowBefore: () => actOnSelection(actions.insertRowsBefore), + mceTableInsertRowAfter: () => actOnSelection(actions.insertRowsAfter), + mceTableInsertColBefore: () => actOnSelection(actions.insertColumnsBefore), + mceTableInsertColAfter: () => actOnSelection(actions.insertColumnsAfter), + mceTableDeleteCol: () => actOnSelection(actions.deleteColumn), + mceTableDeleteRow: () => actOnSelection(actions.deleteRow), + mceTableCutCol: () => copyColSelection().each(selection => { + setColumns(selection); + actOnSelection(actions.deleteColumn); + }), + mceTableCutRow: () => copyRowSelection().each(selection => { + setRows(selection); + actOnSelection(actions.deleteRow); + }), + mceTableCopyCol: () => copyColSelection().each(selection => setColumns(selection)), + mceTableCopyRow: () => copyRowSelection().each(selection => setRows(selection)), + mceTablePasteColBefore: () => pasteOnSelection(actions.pasteColsBefore, getColumns), + mceTablePasteColAfter: () => pasteOnSelection(actions.pasteColsAfter, getColumns), + mceTablePasteRowBefore: () => pasteOnSelection(actions.pasteRowsBefore, getRows), + mceTablePasteRowAfter: () => pasteOnSelection(actions.pasteRowsAfter, getRows), + mceTableDelete: eraseTable, + mceTableCellToggleClass: toggleTableCellClass, + mceTableToggleClass: toggleTableClass, + mceTableToggleCaption: toggleCaption, + mceTableSizingMode: (_ui, sizing) => setSizingMode(sizing), + mceTableCellType: actOnType(type => type === 'th' ? actions.makeCellsHeader : actions.unmakeCellsHeader), + mceTableColType: actOnType(type => type === 'th' ? actions.makeColumnsHeader : actions.unmakeColumnsHeader), + mceTableRowType: actOnType(type => { + switch (type) { + case 'header': + return actions.makeRowsHeader; + case 'footer': + return actions.makeRowsFooter; + default: + return actions.makeRowsBody; + } + }) + }, (func, name) => editor.addCommand(name, func)); + editor.addCommand('mceInsertTable', (_ui, args) => { + insertTable(editor, args.rows, args.columns, args.options); + }); + editor.addCommand('mceTableApplyCellStyle', (_ui, args) => { + const getFormatName = style => 'tablecell' + style.toLowerCase().replace('-', ''); + if (!isObject(args)) { + return; + } + const cells = getCellsFromSelection(editor); + if (cells.length === 0) { + return; + } + const validArgs = filter$1(args, (value, style) => editor.formatter.has(getFormatName(style)) && isString(value)); + if (isEmpty(validArgs)) { + return; + } + each$1(validArgs, (value, style) => { + const formatName = getFormatName(style); + each$2(cells, cell => { + if (value === '') { + editor.formatter.remove(formatName, { value: null }, cell.dom, true); + } else { + editor.formatter.apply(formatName, { value }, cell.dom); + } + }); + }); + getTableFromCell(cells[0]).each(table => fireTableModified(editor, table.dom, styleModified)); + }); + }; + + const registerQueryCommands = (editor, actions) => { + const isRoot = getIsRoot(editor); + const lookupOnSelection = action => getSelectionCell(getSelectionStart(editor)).bind(cell => table(cell, isRoot).map(table => { + const targets = forMenu(getCellsFromSelection(editor), table, cell); + return action(table, targets); + })).getOr(''); + each$1({ + mceTableRowType: () => lookupOnSelection(actions.getTableRowType), + mceTableCellType: () => lookupOnSelection(actions.getTableCellType), + mceTableColType: () => lookupOnSelection(actions.getTableColType) + }, (func, name) => editor.addQueryValueHandler(name, func)); + }; + + const adt$4 = Adt.generate([ + { before: ['element'] }, + { + on: [ + 'element', + 'offset' + ] + }, + { after: ['element'] } + ]); + const cata$1 = (subject, onBefore, onOn, onAfter) => subject.fold(onBefore, onOn, onAfter); + const getStart$1 = situ => situ.fold(identity, identity, identity); + const before$2 = adt$4.before; + const on = adt$4.on; + const after$3 = adt$4.after; + const Situ = { + before: before$2, + on, + after: after$3, + cata: cata$1, + getStart: getStart$1 + }; + + const create$4 = (selection, kill) => ({ + selection, + kill + }); + const Response = { create: create$4 }; + + const selectNode = (win, element) => { + const rng = win.document.createRange(); + rng.selectNode(element.dom); + return rng; + }; + const selectNodeContents = (win, element) => { + const rng = win.document.createRange(); + selectNodeContentsUsing(rng, element); + return rng; + }; + const selectNodeContentsUsing = (rng, element) => rng.selectNodeContents(element.dom); + const setStart = (rng, situ) => { + situ.fold(e => { + rng.setStartBefore(e.dom); + }, (e, o) => { + rng.setStart(e.dom, o); + }, e => { + rng.setStartAfter(e.dom); + }); + }; + const setFinish = (rng, situ) => { + situ.fold(e => { + rng.setEndBefore(e.dom); + }, (e, o) => { + rng.setEnd(e.dom, o); + }, e => { + rng.setEndAfter(e.dom); + }); + }; + const relativeToNative = (win, startSitu, finishSitu) => { + const range = win.document.createRange(); + setStart(range, startSitu); + setFinish(range, finishSitu); + return range; + }; + const exactToNative = (win, start, soffset, finish, foffset) => { + const rng = win.document.createRange(); + rng.setStart(start.dom, soffset); + rng.setEnd(finish.dom, foffset); + return rng; + }; + const toRect = rect => ({ + left: rect.left, + top: rect.top, + right: rect.right, + bottom: rect.bottom, + width: rect.width, + height: rect.height + }); + const getFirstRect$1 = rng => { + const rects = rng.getClientRects(); + const rect = rects.length > 0 ? rects[0] : rng.getBoundingClientRect(); + return rect.width > 0 || rect.height > 0 ? Optional.some(rect).map(toRect) : Optional.none(); + }; + + const adt$3 = Adt.generate([ + { + ltr: [ + 'start', + 'soffset', + 'finish', + 'foffset' + ] + }, + { + rtl: [ + 'start', + 'soffset', + 'finish', + 'foffset' + ] + } + ]); + const fromRange = (win, type, range) => type(SugarElement.fromDom(range.startContainer), range.startOffset, SugarElement.fromDom(range.endContainer), range.endOffset); + const getRanges = (win, selection) => selection.match({ + domRange: rng => { + return { + ltr: constant(rng), + rtl: Optional.none + }; + }, + relative: (startSitu, finishSitu) => { + return { + ltr: cached(() => relativeToNative(win, startSitu, finishSitu)), + rtl: cached(() => Optional.some(relativeToNative(win, finishSitu, startSitu))) + }; + }, + exact: (start, soffset, finish, foffset) => { + return { + ltr: cached(() => exactToNative(win, start, soffset, finish, foffset)), + rtl: cached(() => Optional.some(exactToNative(win, finish, foffset, start, soffset))) + }; + } + }); + const doDiagnose = (win, ranges) => { + const rng = ranges.ltr(); + if (rng.collapsed) { + const reversed = ranges.rtl().filter(rev => rev.collapsed === false); + return reversed.map(rev => adt$3.rtl(SugarElement.fromDom(rev.endContainer), rev.endOffset, SugarElement.fromDom(rev.startContainer), rev.startOffset)).getOrThunk(() => fromRange(win, adt$3.ltr, rng)); + } else { + return fromRange(win, adt$3.ltr, rng); + } + }; + const diagnose = (win, selection) => { + const ranges = getRanges(win, selection); + return doDiagnose(win, ranges); + }; + const asLtrRange = (win, selection) => { + const diagnosis = diagnose(win, selection); + return diagnosis.match({ + ltr: (start, soffset, finish, foffset) => { + const rng = win.document.createRange(); + rng.setStart(start.dom, soffset); + rng.setEnd(finish.dom, foffset); + return rng; + }, + rtl: (start, soffset, finish, foffset) => { + const rng = win.document.createRange(); + rng.setStart(finish.dom, foffset); + rng.setEnd(start.dom, soffset); + return rng; + } + }); + }; + adt$3.ltr; + adt$3.rtl; + + const create$3 = (start, soffset, finish, foffset) => ({ + start, + soffset, + finish, + foffset + }); + const SimRange = { create: create$3 }; + + const create$2 = (start, soffset, finish, foffset) => { + return { + start: Situ.on(start, soffset), + finish: Situ.on(finish, foffset) + }; + }; + const Situs = { create: create$2 }; + + const convertToRange = (win, selection) => { + const rng = asLtrRange(win, selection); + return SimRange.create(SugarElement.fromDom(rng.startContainer), rng.startOffset, SugarElement.fromDom(rng.endContainer), rng.endOffset); + }; + const makeSitus = Situs.create; + + const sync = (container, isRoot, start, soffset, finish, foffset, selectRange) => { + if (!(eq$1(start, finish) && soffset === foffset)) { + return closest$1(start, 'td,th', isRoot).bind(s => { + return closest$1(finish, 'td,th', isRoot).bind(f => { + return detect(container, isRoot, s, f, selectRange); + }); + }); + } else { + return Optional.none(); + } + }; + const detect = (container, isRoot, start, finish, selectRange) => { + if (!eq$1(start, finish)) { + return identify(start, finish, isRoot).bind(cellSel => { + const boxes = cellSel.boxes.getOr([]); + if (boxes.length > 1) { + selectRange(container, boxes, cellSel.start, cellSel.finish); + return Optional.some(Response.create(Optional.some(makeSitus(start, 0, start, getEnd(start))), true)); + } else { + return Optional.none(); + } + }); + } else { + return Optional.none(); + } + }; + const update = (rows, columns, container, selected, annotations) => { + const updateSelection = newSels => { + annotations.clearBeforeUpdate(container); + annotations.selectRange(container, newSels.boxes, newSels.start, newSels.finish); + return newSels.boxes; + }; + return shiftSelection(selected, rows, columns, annotations.firstSelectedSelector, annotations.lastSelectedSelector).map(updateSelection); + }; + + const traverse = (item, mode) => ({ + item, + mode + }); + const backtrack = (universe, item, _direction, transition = sidestep) => { + return universe.property().parent(item).map(p => { + return traverse(p, transition); + }); + }; + const sidestep = (universe, item, direction, transition = advance) => { + return direction.sibling(universe, item).map(p => { + return traverse(p, transition); + }); + }; + const advance = (universe, item, direction, transition = advance) => { + const children = universe.property().children(item); + const result = direction.first(children); + return result.map(r => { + return traverse(r, transition); + }); + }; + const successors = [ + { + current: backtrack, + next: sidestep, + fallback: Optional.none() + }, + { + current: sidestep, + next: advance, + fallback: Optional.some(backtrack) + }, + { + current: advance, + next: advance, + fallback: Optional.some(sidestep) + } + ]; + const go = (universe, item, mode, direction, rules = successors) => { + const ruleOpt = find$1(rules, succ => { + return succ.current === mode; + }); + return ruleOpt.bind(rule => { + return rule.current(universe, item, direction, rule.next).orThunk(() => { + return rule.fallback.bind(fb => { + return go(universe, item, fb, direction); + }); + }); + }); + }; + + const left$1 = () => { + const sibling = (universe, item) => { + return universe.query().prevSibling(item); + }; + const first = children => { + return children.length > 0 ? Optional.some(children[children.length - 1]) : Optional.none(); + }; + return { + sibling, + first + }; + }; + const right$1 = () => { + const sibling = (universe, item) => { + return universe.query().nextSibling(item); + }; + const first = children => { + return children.length > 0 ? Optional.some(children[0]) : Optional.none(); + }; + return { + sibling, + first + }; + }; + const Walkers = { + left: left$1, + right: right$1 + }; + + const hone = (universe, item, predicate, mode, direction, isRoot) => { + const next = go(universe, item, mode, direction); + return next.bind(n => { + if (isRoot(n.item)) { + return Optional.none(); + } else { + return predicate(n.item) ? Optional.some(n.item) : hone(universe, n.item, predicate, n.mode, direction, isRoot); + } + }); + }; + const left = (universe, item, predicate, isRoot) => { + return hone(universe, item, predicate, sidestep, Walkers.left(), isRoot); + }; + const right = (universe, item, predicate, isRoot) => { + return hone(universe, item, predicate, sidestep, Walkers.right(), isRoot); + }; + + const isLeaf = universe => element => universe.property().children(element).length === 0; + const before$1 = (universe, item, isRoot) => { + return seekLeft$1(universe, item, isLeaf(universe), isRoot); + }; + const after$2 = (universe, item, isRoot) => { + return seekRight$1(universe, item, isLeaf(universe), isRoot); + }; + const seekLeft$1 = left; + const seekRight$1 = right; + + const universe = DomUniverse(); + const before = (element, isRoot) => { + return before$1(universe, element, isRoot); + }; + const after$1 = (element, isRoot) => { + return after$2(universe, element, isRoot); + }; + const seekLeft = (element, predicate, isRoot) => { + return seekLeft$1(universe, element, predicate, isRoot); + }; + const seekRight = (element, predicate, isRoot) => { + return seekRight$1(universe, element, predicate, isRoot); + }; + + const ancestor = (scope, predicate, isRoot) => ancestor$2(scope, predicate, isRoot).isSome(); + + const adt$2 = Adt.generate([ + { none: ['message'] }, + { success: [] }, + { failedUp: ['cell'] }, + { failedDown: ['cell'] } + ]); + const isOverlapping = (bridge, before, after) => { + const beforeBounds = bridge.getRect(before); + const afterBounds = bridge.getRect(after); + return afterBounds.right > beforeBounds.left && afterBounds.left < beforeBounds.right; + }; + const isRow = elem => { + return closest$1(elem, 'tr'); + }; + const verify = (bridge, before, beforeOffset, after, afterOffset, failure, isRoot) => { + return closest$1(after, 'td,th', isRoot).bind(afterCell => { + return closest$1(before, 'td,th', isRoot).map(beforeCell => { + if (!eq$1(afterCell, beforeCell)) { + return sharedOne(isRow, [ + afterCell, + beforeCell + ]).fold(() => { + return isOverlapping(bridge, beforeCell, afterCell) ? adt$2.success() : failure(beforeCell); + }, _sharedRow => { + return failure(beforeCell); + }); + } else { + return eq$1(after, afterCell) && getEnd(afterCell) === afterOffset ? failure(beforeCell) : adt$2.none('in same cell'); + } + }); + }).getOr(adt$2.none('default')); + }; + const cata = (subject, onNone, onSuccess, onFailedUp, onFailedDown) => { + return subject.fold(onNone, onSuccess, onFailedUp, onFailedDown); + }; + const BeforeAfter = { + ...adt$2, + verify, + cata + }; + + const inParent = (parent, children, element, index) => ({ + parent, + children, + element, + index + }); + const indexInParent = element => parent(element).bind(parent => { + const children = children$2(parent); + return indexOf(children, element).map(index => inParent(parent, children, element, index)); + }); + const indexOf = (elements, element) => findIndex(elements, curry(eq$1, element)); + + const isBr = isTag('br'); + const gatherer = (cand, gather, isRoot) => { + return gather(cand, isRoot).bind(target => { + return isText(target) && get$6(target).trim().length === 0 ? gatherer(target, gather, isRoot) : Optional.some(target); + }); + }; + const handleBr = (isRoot, element, direction) => { + return direction.traverse(element).orThunk(() => { + return gatherer(element, direction.gather, isRoot); + }).map(direction.relative); + }; + const findBr = (element, offset) => { + return child$2(element, offset).filter(isBr).orThunk(() => { + return child$2(element, offset - 1).filter(isBr); + }); + }; + const handleParent = (isRoot, element, offset, direction) => { + return findBr(element, offset).bind(br => { + return direction.traverse(br).fold(() => { + return gatherer(br, direction.gather, isRoot).map(direction.relative); + }, adjacent => { + return indexInParent(adjacent).map(info => { + return Situ.on(info.parent, info.index); + }); + }); + }); + }; + const tryBr = (isRoot, element, offset, direction) => { + const target = isBr(element) ? handleBr(isRoot, element, direction) : handleParent(isRoot, element, offset, direction); + return target.map(tgt => { + return { + start: tgt, + finish: tgt + }; + }); + }; + const process = analysis => { + return BeforeAfter.cata(analysis, _message => { + return Optional.none(); + }, () => { + return Optional.none(); + }, cell => { + return Optional.some(point(cell, 0)); + }, cell => { + return Optional.some(point(cell, getEnd(cell))); + }); + }; + + const moveDown = (caret, amount) => { + return { + left: caret.left, + top: caret.top + amount, + right: caret.right, + bottom: caret.bottom + amount + }; + }; + const moveUp = (caret, amount) => { + return { + left: caret.left, + top: caret.top - amount, + right: caret.right, + bottom: caret.bottom - amount + }; + }; + const translate = (caret, xDelta, yDelta) => { + return { + left: caret.left + xDelta, + top: caret.top + yDelta, + right: caret.right + xDelta, + bottom: caret.bottom + yDelta + }; + }; + const getTop = caret => { + return caret.top; + }; + const getBottom = caret => { + return caret.bottom; + }; + + const getPartialBox = (bridge, element, offset) => { + if (offset >= 0 && offset < getEnd(element)) { + return bridge.getRangedRect(element, offset, element, offset + 1); + } else if (offset > 0) { + return bridge.getRangedRect(element, offset - 1, element, offset); + } + return Optional.none(); + }; + const toCaret = rect => ({ + left: rect.left, + top: rect.top, + right: rect.right, + bottom: rect.bottom + }); + const getElemBox = (bridge, element) => { + return Optional.some(bridge.getRect(element)); + }; + const getBoxAt = (bridge, element, offset) => { + if (isElement(element)) { + return getElemBox(bridge, element).map(toCaret); + } else if (isText(element)) { + return getPartialBox(bridge, element, offset).map(toCaret); + } else { + return Optional.none(); + } + }; + const getEntireBox = (bridge, element) => { + if (isElement(element)) { + return getElemBox(bridge, element).map(toCaret); + } else if (isText(element)) { + return bridge.getRangedRect(element, 0, element, getEnd(element)).map(toCaret); + } else { + return Optional.none(); + } + }; + + const JUMP_SIZE = 5; + const NUM_RETRIES = 100; + const adt$1 = Adt.generate([ + { none: [] }, + { retry: ['caret'] } + ]); + const isOutside = (caret, box) => { + return caret.left < box.left || Math.abs(box.right - caret.left) < 1 || caret.left > box.right; + }; + const inOutsideBlock = (bridge, element, caret) => { + return closest$2(element, isBlock).fold(never, cell => { + return getEntireBox(bridge, cell).exists(box => { + return isOutside(caret, box); + }); + }); + }; + const adjustDown = (bridge, element, guessBox, original, caret) => { + const lowerCaret = moveDown(caret, JUMP_SIZE); + if (Math.abs(guessBox.bottom - original.bottom) < 1) { + return adt$1.retry(lowerCaret); + } else if (guessBox.top > caret.bottom) { + return adt$1.retry(lowerCaret); + } else if (guessBox.top === caret.bottom) { + return adt$1.retry(moveDown(caret, 1)); + } else { + return inOutsideBlock(bridge, element, caret) ? adt$1.retry(translate(lowerCaret, JUMP_SIZE, 0)) : adt$1.none(); + } + }; + const adjustUp = (bridge, element, guessBox, original, caret) => { + const higherCaret = moveUp(caret, JUMP_SIZE); + if (Math.abs(guessBox.top - original.top) < 1) { + return adt$1.retry(higherCaret); + } else if (guessBox.bottom < caret.top) { + return adt$1.retry(higherCaret); + } else if (guessBox.bottom === caret.top) { + return adt$1.retry(moveUp(caret, 1)); + } else { + return inOutsideBlock(bridge, element, caret) ? adt$1.retry(translate(higherCaret, JUMP_SIZE, 0)) : adt$1.none(); + } + }; + const upMovement = { + point: getTop, + adjuster: adjustUp, + move: moveUp, + gather: before + }; + const downMovement = { + point: getBottom, + adjuster: adjustDown, + move: moveDown, + gather: after$1 + }; + const isAtTable = (bridge, x, y) => { + return bridge.elementFromPoint(x, y).filter(elm => { + return name(elm) === 'table'; + }).isSome(); + }; + const adjustForTable = (bridge, movement, original, caret, numRetries) => { + return adjustTil(bridge, movement, original, movement.move(caret, JUMP_SIZE), numRetries); + }; + const adjustTil = (bridge, movement, original, caret, numRetries) => { + if (numRetries === 0) { + return Optional.some(caret); + } + if (isAtTable(bridge, caret.left, movement.point(caret))) { + return adjustForTable(bridge, movement, original, caret, numRetries - 1); + } + return bridge.situsFromPoint(caret.left, movement.point(caret)).bind(guess => { + return guess.start.fold(Optional.none, element => { + return getEntireBox(bridge, element).bind(guessBox => { + return movement.adjuster(bridge, element, guessBox, original, caret).fold(Optional.none, newCaret => { + return adjustTil(bridge, movement, original, newCaret, numRetries - 1); + }); + }).orThunk(() => { + return Optional.some(caret); + }); + }, Optional.none); + }); + }; + const checkScroll = (movement, adjusted, bridge) => { + if (movement.point(adjusted) > bridge.getInnerHeight()) { + return Optional.some(movement.point(adjusted) - bridge.getInnerHeight()); + } else if (movement.point(adjusted) < 0) { + return Optional.some(-movement.point(adjusted)); + } else { + return Optional.none(); + } + }; + const retry = (movement, bridge, caret) => { + const moved = movement.move(caret, JUMP_SIZE); + const adjusted = adjustTil(bridge, movement, caret, moved, NUM_RETRIES).getOr(moved); + return checkScroll(movement, adjusted, bridge).fold(() => { + return bridge.situsFromPoint(adjusted.left, movement.point(adjusted)); + }, delta => { + bridge.scrollBy(0, delta); + return bridge.situsFromPoint(adjusted.left, movement.point(adjusted) - delta); + }); + }; + const Retries = { + tryUp: curry(retry, upMovement), + tryDown: curry(retry, downMovement), + getJumpSize: constant(JUMP_SIZE) + }; + + const MAX_RETRIES = 20; + const findSpot = (bridge, isRoot, direction) => { + return bridge.getSelection().bind(sel => { + return tryBr(isRoot, sel.finish, sel.foffset, direction).fold(() => { + return Optional.some(point(sel.finish, sel.foffset)); + }, brNeighbour => { + const range = bridge.fromSitus(brNeighbour); + const analysis = BeforeAfter.verify(bridge, sel.finish, sel.foffset, range.finish, range.foffset, direction.failure, isRoot); + return process(analysis); + }); + }); + }; + const scan = (bridge, isRoot, element, offset, direction, numRetries) => { + if (numRetries === 0) { + return Optional.none(); + } + return tryCursor(bridge, isRoot, element, offset, direction).bind(situs => { + const range = bridge.fromSitus(situs); + const analysis = BeforeAfter.verify(bridge, element, offset, range.finish, range.foffset, direction.failure, isRoot); + return BeforeAfter.cata(analysis, () => { + return Optional.none(); + }, () => { + return Optional.some(situs); + }, cell => { + if (eq$1(element, cell) && offset === 0) { + return tryAgain(bridge, element, offset, moveUp, direction); + } else { + return scan(bridge, isRoot, cell, 0, direction, numRetries - 1); + } + }, cell => { + if (eq$1(element, cell) && offset === getEnd(cell)) { + return tryAgain(bridge, element, offset, moveDown, direction); + } else { + return scan(bridge, isRoot, cell, getEnd(cell), direction, numRetries - 1); + } + }); + }); + }; + const tryAgain = (bridge, element, offset, move, direction) => { + return getBoxAt(bridge, element, offset).bind(box => { + return tryAt(bridge, direction, move(box, Retries.getJumpSize())); + }); + }; + const tryAt = (bridge, direction, box) => { + const browser = detect$2().browser; + if (browser.isChromium() || browser.isSafari() || browser.isFirefox()) { + return direction.retry(bridge, box); + } else { + return Optional.none(); + } + }; + const tryCursor = (bridge, isRoot, element, offset, direction) => { + return getBoxAt(bridge, element, offset).bind(box => { + return tryAt(bridge, direction, box); + }); + }; + const handle$1 = (bridge, isRoot, direction) => { + return findSpot(bridge, isRoot, direction).bind(spot => { + return scan(bridge, isRoot, spot.element, spot.offset, direction, MAX_RETRIES).map(bridge.fromSitus); + }); + }; + + const inSameTable = (elem, table) => { + return ancestor(elem, e => { + return parent(e).exists(p => { + return eq$1(p, table); + }); + }); + }; + const simulate = (bridge, isRoot, direction, initial, anchor) => { + return closest$1(initial, 'td,th', isRoot).bind(start => { + return closest$1(start, 'table', isRoot).bind(table => { + if (!inSameTable(anchor, table)) { + return Optional.none(); + } + return handle$1(bridge, isRoot, direction).bind(range => { + return closest$1(range.finish, 'td,th', isRoot).map(finish => { + return { + start, + finish, + range + }; + }); + }); + }); + }); + }; + const navigate = (bridge, isRoot, direction, initial, anchor, precheck) => { + return precheck(initial, isRoot).orThunk(() => { + return simulate(bridge, isRoot, direction, initial, anchor).map(info => { + const range = info.range; + return Response.create(Optional.some(makeSitus(range.start, range.soffset, range.finish, range.foffset)), true); + }); + }); + }; + const firstUpCheck = (initial, isRoot) => { + return closest$1(initial, 'tr', isRoot).bind(startRow => { + return closest$1(startRow, 'table', isRoot).bind(table => { + const rows = descendants(table, 'tr'); + if (eq$1(startRow, rows[0])) { + return seekLeft(table, element => { + return last$1(element).isSome(); + }, isRoot).map(last => { + const lastOffset = getEnd(last); + return Response.create(Optional.some(makeSitus(last, lastOffset, last, lastOffset)), true); + }); + } else { + return Optional.none(); + } + }); + }); + }; + const lastDownCheck = (initial, isRoot) => { + return closest$1(initial, 'tr', isRoot).bind(startRow => { + return closest$1(startRow, 'table', isRoot).bind(table => { + const rows = descendants(table, 'tr'); + if (eq$1(startRow, rows[rows.length - 1])) { + return seekRight(table, element => { + return first(element).isSome(); + }, isRoot).map(first => { + return Response.create(Optional.some(makeSitus(first, 0, first, 0)), true); + }); + } else { + return Optional.none(); + } + }); + }); + }; + const select = (bridge, container, isRoot, direction, initial, anchor, selectRange) => { + return simulate(bridge, isRoot, direction, initial, anchor).bind(info => { + return detect(container, isRoot, info.start, info.finish, selectRange); + }); + }; + + const Cell = initial => { + let value = initial; + const get = () => { + return value; + }; + const set = v => { + value = v; + }; + return { + get, + set + }; + }; + + const singleton = doRevoke => { + const subject = Cell(Optional.none()); + const revoke = () => subject.get().each(doRevoke); + const clear = () => { + revoke(); + subject.set(Optional.none()); + }; + const isSet = () => subject.get().isSome(); + const get = () => subject.get(); + const set = s => { + revoke(); + subject.set(Optional.some(s)); + }; + return { + clear, + isSet, + get, + set + }; + }; + const value = () => { + const subject = singleton(noop); + const on = f => subject.get().each(f); + return { + ...subject, + on + }; + }; + + const findCell = (target, isRoot) => closest$1(target, 'td,th', isRoot); + const MouseSelection = (bridge, container, isRoot, annotations) => { + const cursor = value(); + const clearstate = cursor.clear; + const applySelection = event => { + cursor.on(start => { + annotations.clearBeforeUpdate(container); + findCell(event.target, isRoot).each(finish => { + identify(start, finish, isRoot).each(cellSel => { + const boxes = cellSel.boxes.getOr([]); + if (boxes.length === 1) { + const singleCell = boxes[0]; + const isNonEditableCell = getRaw(singleCell) === 'false'; + const isCellClosestContentEditable = is(closest(event.target), singleCell, eq$1); + if (isNonEditableCell && isCellClosestContentEditable) { + annotations.selectRange(container, boxes, singleCell, singleCell); + bridge.selectContents(singleCell); + } + } else if (boxes.length > 1) { + annotations.selectRange(container, boxes, cellSel.start, cellSel.finish); + bridge.selectContents(finish); + } + }); + }); + }); + }; + const mousedown = event => { + annotations.clear(container); + findCell(event.target, isRoot).each(cursor.set); + }; + const mouseover = event => { + applySelection(event); + }; + const mouseup = event => { + applySelection(event); + clearstate(); + }; + return { + clearstate, + mousedown, + mouseover, + mouseup + }; + }; + + const down = { + traverse: nextSibling, + gather: after$1, + relative: Situ.before, + retry: Retries.tryDown, + failure: BeforeAfter.failedDown + }; + const up = { + traverse: prevSibling, + gather: before, + relative: Situ.before, + retry: Retries.tryUp, + failure: BeforeAfter.failedUp + }; + + const isKey = key => { + return keycode => { + return keycode === key; + }; + }; + const isUp = isKey(38); + const isDown = isKey(40); + const isNavigation = keycode => { + return keycode >= 37 && keycode <= 40; + }; + const ltr = { + isBackward: isKey(37), + isForward: isKey(39) + }; + const rtl = { + isBackward: isKey(39), + isForward: isKey(37) + }; + + const get$3 = _DOC => { + const doc = _DOC !== undefined ? _DOC.dom : document; + const x = doc.body.scrollLeft || doc.documentElement.scrollLeft; + const y = doc.body.scrollTop || doc.documentElement.scrollTop; + return SugarPosition(x, y); + }; + const by = (x, y, _DOC) => { + const doc = _DOC !== undefined ? _DOC.dom : document; + const win = doc.defaultView; + if (win) { + win.scrollBy(x, y); + } + }; + + const adt = Adt.generate([ + { domRange: ['rng'] }, + { + relative: [ + 'startSitu', + 'finishSitu' + ] + }, + { + exact: [ + 'start', + 'soffset', + 'finish', + 'foffset' + ] + } + ]); + const exactFromRange = simRange => adt.exact(simRange.start, simRange.soffset, simRange.finish, simRange.foffset); + const getStart = selection => selection.match({ + domRange: rng => SugarElement.fromDom(rng.startContainer), + relative: (startSitu, _finishSitu) => Situ.getStart(startSitu), + exact: (start, _soffset, _finish, _foffset) => start + }); + const domRange = adt.domRange; + const relative = adt.relative; + const exact = adt.exact; + const getWin = selection => { + const start = getStart(selection); + return defaultView(start); + }; + const range = SimRange.create; + const SimSelection = { + domRange, + relative, + exact, + exactFromRange, + getWin, + range + }; + + const caretPositionFromPoint = (doc, x, y) => { + var _a, _b; + return Optional.from((_b = (_a = doc.dom).caretPositionFromPoint) === null || _b === void 0 ? void 0 : _b.call(_a, x, y)).bind(pos => { + if (pos.offsetNode === null) { + return Optional.none(); + } + const r = doc.dom.createRange(); + r.setStart(pos.offsetNode, pos.offset); + r.collapse(); + return Optional.some(r); + }); + }; + const caretRangeFromPoint = (doc, x, y) => { + var _a, _b; + return Optional.from((_b = (_a = doc.dom).caretRangeFromPoint) === null || _b === void 0 ? void 0 : _b.call(_a, x, y)); + }; + const availableSearch = (() => { + if (document.caretPositionFromPoint) { + return caretPositionFromPoint; + } else if (document.caretRangeFromPoint) { + return caretRangeFromPoint; + } else { + return Optional.none; + } + })(); + const fromPoint = (win, x, y) => { + const doc = SugarElement.fromDom(win.document); + return availableSearch(doc, x, y).map(rng => SimRange.create(SugarElement.fromDom(rng.startContainer), rng.startOffset, SugarElement.fromDom(rng.endContainer), rng.endOffset)); + }; + + const beforeSpecial = (element, offset) => { + const name$1 = name(element); + if ('input' === name$1) { + return Situ.after(element); + } else if (!contains$2([ + 'br', + 'img' + ], name$1)) { + return Situ.on(element, offset); + } else { + return offset === 0 ? Situ.before(element) : Situ.after(element); + } + }; + const preprocessRelative = (startSitu, finishSitu) => { + const start = startSitu.fold(Situ.before, beforeSpecial, Situ.after); + const finish = finishSitu.fold(Situ.before, beforeSpecial, Situ.after); + return SimSelection.relative(start, finish); + }; + const preprocessExact = (start, soffset, finish, foffset) => { + const startSitu = beforeSpecial(start, soffset); + const finishSitu = beforeSpecial(finish, foffset); + return SimSelection.relative(startSitu, finishSitu); + }; + + const makeRange = (start, soffset, finish, foffset) => { + const doc = owner(start); + const rng = doc.dom.createRange(); + rng.setStart(start.dom, soffset); + rng.setEnd(finish.dom, foffset); + return rng; + }; + const after = (start, soffset, finish, foffset) => { + const r = makeRange(start, soffset, finish, foffset); + const same = eq$1(start, finish) && soffset === foffset; + return r.collapsed && !same; + }; + + const getNativeSelection = win => Optional.from(win.getSelection()); + const doSetNativeRange = (win, rng) => { + getNativeSelection(win).each(selection => { + selection.removeAllRanges(); + selection.addRange(rng); + }); + }; + const doSetRange = (win, start, soffset, finish, foffset) => { + const rng = exactToNative(win, start, soffset, finish, foffset); + doSetNativeRange(win, rng); + }; + const setLegacyRtlRange = (win, selection, start, soffset, finish, foffset) => { + selection.collapse(start.dom, soffset); + selection.extend(finish.dom, foffset); + }; + const setRangeFromRelative = (win, relative) => diagnose(win, relative).match({ + ltr: (start, soffset, finish, foffset) => { + doSetRange(win, start, soffset, finish, foffset); + }, + rtl: (start, soffset, finish, foffset) => { + getNativeSelection(win).each(selection => { + if (selection.setBaseAndExtent) { + selection.setBaseAndExtent(start.dom, soffset, finish.dom, foffset); + } else if (selection.extend) { + try { + setLegacyRtlRange(win, selection, start, soffset, finish, foffset); + } catch (e) { + doSetRange(win, finish, foffset, start, soffset); + } + } else { + doSetRange(win, finish, foffset, start, soffset); + } + }); + } + }); + const setExact = (win, start, soffset, finish, foffset) => { + const relative = preprocessExact(start, soffset, finish, foffset); + setRangeFromRelative(win, relative); + }; + const setRelative = (win, startSitu, finishSitu) => { + const relative = preprocessRelative(startSitu, finishSitu); + setRangeFromRelative(win, relative); + }; + const readRange = selection => { + if (selection.rangeCount > 0) { + const firstRng = selection.getRangeAt(0); + const lastRng = selection.getRangeAt(selection.rangeCount - 1); + return Optional.some(SimRange.create(SugarElement.fromDom(firstRng.startContainer), firstRng.startOffset, SugarElement.fromDom(lastRng.endContainer), lastRng.endOffset)); + } else { + return Optional.none(); + } + }; + const doGetExact = selection => { + if (selection.anchorNode === null || selection.focusNode === null) { + return readRange(selection); + } else { + const anchor = SugarElement.fromDom(selection.anchorNode); + const focus = SugarElement.fromDom(selection.focusNode); + return after(anchor, selection.anchorOffset, focus, selection.focusOffset) ? Optional.some(SimRange.create(anchor, selection.anchorOffset, focus, selection.focusOffset)) : readRange(selection); + } + }; + const setToElement = (win, element, selectNodeContents$1 = true) => { + const rngGetter = selectNodeContents$1 ? selectNodeContents : selectNode; + const rng = rngGetter(win, element); + doSetNativeRange(win, rng); + }; + const getExact = win => getNativeSelection(win).filter(sel => sel.rangeCount > 0).bind(doGetExact); + const get$2 = win => getExact(win).map(range => SimSelection.exact(range.start, range.soffset, range.finish, range.foffset)); + const getFirstRect = (win, selection) => { + const rng = asLtrRange(win, selection); + return getFirstRect$1(rng); + }; + const getAtPoint = (win, x, y) => fromPoint(win, x, y); + const clear = win => { + getNativeSelection(win).each(selection => selection.removeAllRanges()); + }; + + const WindowBridge = win => { + const elementFromPoint = (x, y) => { + return SugarElement.fromPoint(SugarElement.fromDom(win.document), x, y); + }; + const getRect = element => { + return element.dom.getBoundingClientRect(); + }; + const getRangedRect = (start, soffset, finish, foffset) => { + const sel = SimSelection.exact(start, soffset, finish, foffset); + return getFirstRect(win, sel); + }; + const getSelection = () => { + return get$2(win).map(exactAdt => { + return convertToRange(win, exactAdt); + }); + }; + const fromSitus = situs => { + const relative = SimSelection.relative(situs.start, situs.finish); + return convertToRange(win, relative); + }; + const situsFromPoint = (x, y) => { + return getAtPoint(win, x, y).map(exact => { + return Situs.create(exact.start, exact.soffset, exact.finish, exact.foffset); + }); + }; + const clearSelection = () => { + clear(win); + }; + const collapseSelection = (toStart = false) => { + get$2(win).each(sel => sel.fold(rng => rng.collapse(toStart), (startSitu, finishSitu) => { + const situ = toStart ? startSitu : finishSitu; + setRelative(win, situ, situ); + }, (start, soffset, finish, foffset) => { + const node = toStart ? start : finish; + const offset = toStart ? soffset : foffset; + setExact(win, node, offset, node, offset); + })); + }; + const selectNode = element => { + setToElement(win, element, false); + }; + const selectContents = element => { + setToElement(win, element); + }; + const setSelection = sel => { + setExact(win, sel.start, sel.soffset, sel.finish, sel.foffset); + }; + const setRelativeSelection = (start, finish) => { + setRelative(win, start, finish); + }; + const getInnerHeight = () => { + return win.innerHeight; + }; + const getScrollY = () => { + const pos = get$3(SugarElement.fromDom(win.document)); + return pos.top; + }; + const scrollBy = (x, y) => { + by(x, y, SugarElement.fromDom(win.document)); + }; + return { + elementFromPoint, + getRect, + getRangedRect, + getSelection, + fromSitus, + situsFromPoint, + clearSelection, + collapseSelection, + setSelection, + setRelativeSelection, + selectNode, + selectContents, + getInnerHeight, + getScrollY, + scrollBy + }; + }; + + const rc = (rows, cols) => ({ + rows, + cols + }); + const mouse = (win, container, isRoot, annotations) => { + const bridge = WindowBridge(win); + const handlers = MouseSelection(bridge, container, isRoot, annotations); + return { + clearstate: handlers.clearstate, + mousedown: handlers.mousedown, + mouseover: handlers.mouseover, + mouseup: handlers.mouseup + }; + }; + const keyboard = (win, container, isRoot, annotations) => { + const bridge = WindowBridge(win); + const clearToNavigate = () => { + annotations.clear(container); + return Optional.none(); + }; + const keydown = (event, start, soffset, finish, foffset, direction) => { + const realEvent = event.raw; + const keycode = realEvent.which; + const shiftKey = realEvent.shiftKey === true; + const handler = retrieve$1(container, annotations.selectedSelector).fold(() => { + if (isNavigation(keycode) && !shiftKey) { + annotations.clearBeforeUpdate(container); + } + if (isDown(keycode) && shiftKey) { + return curry(select, bridge, container, isRoot, down, finish, start, annotations.selectRange); + } else if (isUp(keycode) && shiftKey) { + return curry(select, bridge, container, isRoot, up, finish, start, annotations.selectRange); + } else if (isDown(keycode)) { + return curry(navigate, bridge, isRoot, down, finish, start, lastDownCheck); + } else if (isUp(keycode)) { + return curry(navigate, bridge, isRoot, up, finish, start, firstUpCheck); + } else { + return Optional.none; + } + }, selected => { + const update$1 = attempts => { + return () => { + const navigation = findMap(attempts, delta => { + return update(delta.rows, delta.cols, container, selected, annotations); + }); + return navigation.fold(() => { + return getEdges(container, annotations.firstSelectedSelector, annotations.lastSelectedSelector).map(edges => { + const relative = isDown(keycode) || direction.isForward(keycode) ? Situ.after : Situ.before; + bridge.setRelativeSelection(Situ.on(edges.first, 0), relative(edges.table)); + annotations.clear(container); + return Response.create(Optional.none(), true); + }); + }, _ => { + return Optional.some(Response.create(Optional.none(), true)); + }); + }; + }; + if (isDown(keycode) && shiftKey) { + return update$1([rc(+1, 0)]); + } else if (isUp(keycode) && shiftKey) { + return update$1([rc(-1, 0)]); + } else if (direction.isBackward(keycode) && shiftKey) { + return update$1([ + rc(0, -1), + rc(-1, 0) + ]); + } else if (direction.isForward(keycode) && shiftKey) { + return update$1([ + rc(0, +1), + rc(+1, 0) + ]); + } else if (isNavigation(keycode) && !shiftKey) { + return clearToNavigate; + } else { + return Optional.none; + } + }); + return handler(); + }; + const keyup = (event, start, soffset, finish, foffset) => { + return retrieve$1(container, annotations.selectedSelector).fold(() => { + const realEvent = event.raw; + const keycode = realEvent.which; + const shiftKey = realEvent.shiftKey === true; + if (!shiftKey) { + return Optional.none(); + } + if (isNavigation(keycode)) { + return sync(container, isRoot, start, soffset, finish, foffset, annotations.selectRange); + } else { + return Optional.none(); + } + }, Optional.none); + }; + return { + keydown, + keyup + }; + }; + const external = (win, container, isRoot, annotations) => { + const bridge = WindowBridge(win); + return (start, finish) => { + annotations.clearBeforeUpdate(container); + identify(start, finish, isRoot).each(cellSel => { + const boxes = cellSel.boxes.getOr([]); + annotations.selectRange(container, boxes, cellSel.start, cellSel.finish); + bridge.selectContents(finish); + bridge.collapseSelection(); + }); + }; + }; + + const read = (element, attr) => { + const value = get$b(element, attr); + return value === undefined || value === '' ? [] : value.split(' '); + }; + const add$2 = (element, attr, id) => { + const old = read(element, attr); + const nu = old.concat([id]); + set$2(element, attr, nu.join(' ')); + return true; + }; + const remove$4 = (element, attr, id) => { + const nu = filter$2(read(element, attr), v => v !== id); + if (nu.length > 0) { + set$2(element, attr, nu.join(' ')); + } else { + remove$7(element, attr); + } + return false; + }; + + const supports = element => element.dom.classList !== undefined; + const get$1 = element => read(element, 'class'); + const add$1 = (element, clazz) => add$2(element, 'class', clazz); + const remove$3 = (element, clazz) => remove$4(element, 'class', clazz); + + const add = (element, clazz) => { + if (supports(element)) { + element.dom.classList.add(clazz); + } else { + add$1(element, clazz); + } + }; + const cleanClass = element => { + const classList = supports(element) ? element.dom.classList : get$1(element); + if (classList.length === 0) { + remove$7(element, 'class'); + } + }; + const remove$2 = (element, clazz) => { + if (supports(element)) { + const classList = element.dom.classList; + classList.remove(clazz); + } else { + remove$3(element, clazz); + } + cleanClass(element); + }; + const has = (element, clazz) => supports(element) && element.dom.classList.contains(clazz); + + const remove$1 = (element, classes) => { + each$2(classes, x => { + remove$2(element, x); + }); + }; + + const addClass = clazz => element => { + add(element, clazz); + }; + const removeClasses = classes => element => { + remove$1(element, classes); + }; + + const byClass = ephemera => { + const addSelectionClass = addClass(ephemera.selected); + const removeSelectionClasses = removeClasses([ + ephemera.selected, + ephemera.lastSelected, + ephemera.firstSelected + ]); + const clear = container => { + const sels = descendants(container, ephemera.selectedSelector); + each$2(sels, removeSelectionClasses); + }; + const selectRange = (container, cells, start, finish) => { + clear(container); + each$2(cells, addSelectionClass); + add(start, ephemera.firstSelected); + add(finish, ephemera.lastSelected); + }; + return { + clearBeforeUpdate: clear, + clear, + selectRange, + selectedSelector: ephemera.selectedSelector, + firstSelectedSelector: ephemera.firstSelectedSelector, + lastSelectedSelector: ephemera.lastSelectedSelector + }; + }; + const byAttr = (ephemera, onSelection, onClear) => { + const removeSelectionAttributes = element => { + remove$7(element, ephemera.selected); + remove$7(element, ephemera.firstSelected); + remove$7(element, ephemera.lastSelected); + }; + const addSelectionAttribute = element => { + set$2(element, ephemera.selected, '1'); + }; + const clear = container => { + clearBeforeUpdate(container); + onClear(); + }; + const clearBeforeUpdate = container => { + const sels = descendants(container, `${ ephemera.selectedSelector },${ ephemera.firstSelectedSelector },${ ephemera.lastSelectedSelector }`); + each$2(sels, removeSelectionAttributes); + }; + const selectRange = (container, cells, start, finish) => { + clear(container); + each$2(cells, addSelectionAttribute); + set$2(start, ephemera.firstSelected, '1'); + set$2(finish, ephemera.lastSelected, '1'); + onSelection(cells, start, finish); + }; + return { + clearBeforeUpdate, + clear, + selectRange, + selectedSelector: ephemera.selectedSelector, + firstSelectedSelector: ephemera.firstSelectedSelector, + lastSelectedSelector: ephemera.lastSelectedSelector + }; + }; + const SelectionAnnotation = { + byClass, + byAttr + }; + + const fold = (subject, onNone, onMultiple, onSingle) => { + switch (subject.tag) { + case 'none': + return onNone(); + case 'single': + return onSingle(subject.element); + case 'multiple': + return onMultiple(subject.elements); + } + }; + const none = () => ({ tag: 'none' }); + const multiple = elements => ({ + tag: 'multiple', + elements + }); + const single = element => ({ + tag: 'single', + element + }); + + const Selections = (lazyRoot, getStart, selectedSelector) => { + const get = () => retrieve(lazyRoot(), selectedSelector).fold(() => getStart().fold(none, single), multiple); + return { get }; + }; + + const getUpOrLeftCells = (grid, selectedCells) => { + const upGrid = grid.slice(0, selectedCells[selectedCells.length - 1].row + 1); + const upDetails = toDetailList(upGrid); + return bind$2(upDetails, detail => { + const slicedCells = detail.cells.slice(0, selectedCells[selectedCells.length - 1].column + 1); + return map$1(slicedCells, cell => cell.element); + }); + }; + const getDownOrRightCells = (grid, selectedCells) => { + const downGrid = grid.slice(selectedCells[0].row + selectedCells[0].rowspan - 1, grid.length); + const downDetails = toDetailList(downGrid); + return bind$2(downDetails, detail => { + const slicedCells = detail.cells.slice(selectedCells[0].column + selectedCells[0].colspan - 1, detail.cells.length); + return map$1(slicedCells, cell => cell.element); + }); + }; + const getOtherCells = (table, target, generators) => { + const warehouse = Warehouse.fromTable(table); + const details = onCells(warehouse, target); + return details.map(selectedCells => { + const grid = toGrid(warehouse, generators, false); + const {rows} = extractGridDetails(grid); + const upOrLeftCells = getUpOrLeftCells(rows, selectedCells); + const downOrRightCells = getDownOrRightCells(rows, selectedCells); + return { + upOrLeftCells, + downOrRightCells + }; + }); + }; + + const mkEvent = (target, x, y, stop, prevent, kill, raw) => ({ + target, + x, + y, + stop, + prevent, + kill, + raw + }); + const fromRawEvent$1 = rawEvent => { + const target = SugarElement.fromDom(getOriginalEventTarget(rawEvent).getOr(rawEvent.target)); + const stop = () => rawEvent.stopPropagation(); + const prevent = () => rawEvent.preventDefault(); + const kill = compose(prevent, stop); + return mkEvent(target, rawEvent.clientX, rawEvent.clientY, stop, prevent, kill, rawEvent); + }; + const handle = (filter, handler) => rawEvent => { + if (filter(rawEvent)) { + handler(fromRawEvent$1(rawEvent)); + } + }; + const binder = (element, event, filter, handler, useCapture) => { + const wrapped = handle(filter, handler); + element.dom.addEventListener(event, wrapped, useCapture); + return { unbind: curry(unbind, element, event, wrapped, useCapture) }; + }; + const bind$1 = (element, event, filter, handler) => binder(element, event, filter, handler, false); + const unbind = (element, event, handler, useCapture) => { + element.dom.removeEventListener(event, handler, useCapture); + }; + + const filter = always; + const bind = (element, event, handler) => bind$1(element, event, filter, handler); + const fromRawEvent = fromRawEvent$1; + + const hasInternalTarget = e => has(SugarElement.fromDom(e.target), 'ephox-snooker-resizer-bar') === false; + const TableCellSelectionHandler = (editor, resizeHandler) => { + const cellSelection = Selections(() => SugarElement.fromDom(editor.getBody()), () => getSelectionCell(getSelectionStart(editor), getIsRoot(editor)), ephemera.selectedSelector); + const onSelection = (cells, start, finish) => { + const tableOpt = table(start); + tableOpt.each(table => { + const cloneFormats = getTableCloneElements(editor); + const generators = cellOperations(noop, SugarElement.fromDom(editor.getDoc()), cloneFormats); + const selectedCells = getCellsFromSelection(editor); + const otherCells = getOtherCells(table, { selection: selectedCells }, generators); + fireTableSelectionChange(editor, cells, start, finish, otherCells); + }); + }; + const onClear = () => fireTableSelectionClear(editor); + const annotations = SelectionAnnotation.byAttr(ephemera, onSelection, onClear); + editor.on('init', _e => { + const win = editor.getWin(); + const body = getBody(editor); + const isRoot = getIsRoot(editor); + const syncSelection = () => { + const sel = editor.selection; + const start = SugarElement.fromDom(sel.getStart()); + const end = SugarElement.fromDom(sel.getEnd()); + const shared = sharedOne(table, [ + start, + end + ]); + shared.fold(() => annotations.clear(body), noop); + }; + const mouseHandlers = mouse(win, body, isRoot, annotations); + const keyHandlers = keyboard(win, body, isRoot, annotations); + const external$1 = external(win, body, isRoot, annotations); + const hasShiftKey = event => event.raw.shiftKey === true; + editor.on('TableSelectorChange', e => external$1(e.start, e.finish)); + const handleResponse = (event, response) => { + if (!hasShiftKey(event)) { + return; + } + if (response.kill) { + event.kill(); + } + response.selection.each(ns => { + const relative = SimSelection.relative(ns.start, ns.finish); + const rng = asLtrRange(win, relative); + editor.selection.setRng(rng); + }); + }; + const keyup = event => { + const wrappedEvent = fromRawEvent(event); + if (wrappedEvent.raw.shiftKey && isNavigation(wrappedEvent.raw.which)) { + const rng = editor.selection.getRng(); + const start = SugarElement.fromDom(rng.startContainer); + const end = SugarElement.fromDom(rng.endContainer); + keyHandlers.keyup(wrappedEvent, start, rng.startOffset, end, rng.endOffset).each(response => { + handleResponse(wrappedEvent, response); + }); + } + }; + const keydown = event => { + const wrappedEvent = fromRawEvent(event); + resizeHandler.hide(); + const rng = editor.selection.getRng(); + const start = SugarElement.fromDom(rng.startContainer); + const end = SugarElement.fromDom(rng.endContainer); + const direction = onDirection(ltr, rtl)(SugarElement.fromDom(editor.selection.getStart())); + keyHandlers.keydown(wrappedEvent, start, rng.startOffset, end, rng.endOffset, direction).each(response => { + handleResponse(wrappedEvent, response); + }); + resizeHandler.show(); + }; + const isLeftMouse = raw => raw.button === 0; + const isLeftButtonPressed = raw => { + if (raw.buttons === undefined) { + return true; + } + return (raw.buttons & 1) !== 0; + }; + const dragStart = _e => { + mouseHandlers.clearstate(); + }; + const mouseDown = e => { + if (isLeftMouse(e) && hasInternalTarget(e)) { + mouseHandlers.mousedown(fromRawEvent(e)); + } + }; + const mouseOver = e => { + if (isLeftButtonPressed(e) && hasInternalTarget(e)) { + mouseHandlers.mouseover(fromRawEvent(e)); + } + }; + const mouseUp = e => { + if (isLeftMouse(e) && hasInternalTarget(e)) { + mouseHandlers.mouseup(fromRawEvent(e)); + } + }; + const getDoubleTap = () => { + const lastTarget = Cell(SugarElement.fromDom(body)); + const lastTimeStamp = Cell(0); + const touchEnd = t => { + const target = SugarElement.fromDom(t.target); + if (isTag('td')(target) || isTag('th')(target)) { + const lT = lastTarget.get(); + const lTS = lastTimeStamp.get(); + if (eq$1(lT, target) && t.timeStamp - lTS < 300) { + t.preventDefault(); + external$1(target, target); + } + } + lastTarget.set(target); + lastTimeStamp.set(t.timeStamp); + }; + return { touchEnd }; + }; + const doubleTap = getDoubleTap(); + editor.on('dragstart', dragStart); + editor.on('mousedown', mouseDown); + editor.on('mouseover', mouseOver); + editor.on('mouseup', mouseUp); + editor.on('touchend', doubleTap.touchEnd); + editor.on('keyup', keyup); + editor.on('keydown', keydown); + editor.on('NodeChange', syncSelection); + }); + editor.on('PreInit', () => { + editor.serializer.addTempAttr(ephemera.firstSelected); + editor.serializer.addTempAttr(ephemera.lastSelected); + }); + const clearSelectedCells = container => annotations.clear(SugarElement.fromDom(container)); + const getSelectedCells = () => fold(cellSelection.get(), constant([]), cells => { + return map$1(cells, cell => cell.dom); + }, cell => [cell.dom]); + return { + getSelectedCells, + clearSelectedCells + }; + }; + + const Event = fields => { + let handlers = []; + const bind = handler => { + if (handler === undefined) { + throw new Error('Event bind error: undefined handler'); + } + handlers.push(handler); + }; + const unbind = handler => { + handlers = filter$2(handlers, h => { + return h !== handler; + }); + }; + const trigger = (...args) => { + const event = {}; + each$2(fields, (name, i) => { + event[name] = args[i]; + }); + each$2(handlers, handler => { + handler(event); + }); + }; + return { + bind, + unbind, + trigger + }; + }; + + const create$1 = typeDefs => { + const registry = map(typeDefs, event => { + return { + bind: event.bind, + unbind: event.unbind + }; + }); + const trigger = map(typeDefs, event => { + return event.trigger; + }); + return { + registry, + trigger + }; + }; + + const last = (fn, rate) => { + let timer = null; + const cancel = () => { + if (!isNull(timer)) { + clearTimeout(timer); + timer = null; + } + }; + const throttle = (...args) => { + cancel(); + timer = setTimeout(() => { + timer = null; + fn.apply(null, args); + }, rate); + }; + return { + cancel, + throttle + }; + }; + + const sort = arr => { + return arr.slice(0).sort(); + }; + const reqMessage = (required, keys) => { + throw new Error('All required keys (' + sort(required).join(', ') + ') were not specified. Specified keys were: ' + sort(keys).join(', ') + '.'); + }; + const unsuppMessage = unsupported => { + throw new Error('Unsupported keys for object: ' + sort(unsupported).join(', ')); + }; + const validateStrArr = (label, array) => { + if (!isArray(array)) { + throw new Error('The ' + label + ' fields must be an array. Was: ' + array + '.'); + } + each$2(array, a => { + if (!isString(a)) { + throw new Error('The value ' + a + ' in the ' + label + ' fields was not a string.'); + } + }); + }; + const invalidTypeMessage = (incorrect, type) => { + throw new Error('All values need to be of type: ' + type + '. Keys (' + sort(incorrect).join(', ') + ') were not.'); + }; + const checkDupes = everything => { + const sorted = sort(everything); + const dupe = find$1(sorted, (s, i) => { + return i < sorted.length - 1 && s === sorted[i + 1]; + }); + dupe.each(d => { + throw new Error('The field: ' + d + ' occurs more than once in the combined fields: [' + sorted.join(', ') + '].'); + }); + }; + + const base = (handleUnsupported, required) => { + return baseWith(handleUnsupported, required, { + validate: isFunction, + label: 'function' + }); + }; + const baseWith = (handleUnsupported, required, pred) => { + if (required.length === 0) { + throw new Error('You must specify at least one required field.'); + } + validateStrArr('required', required); + checkDupes(required); + return obj => { + const keys$1 = keys(obj); + const allReqd = forall(required, req => { + return contains$2(keys$1, req); + }); + if (!allReqd) { + reqMessage(required, keys$1); + } + handleUnsupported(required, keys$1); + const invalidKeys = filter$2(required, key => { + return !pred.validate(obj[key], key); + }); + if (invalidKeys.length > 0) { + invalidTypeMessage(invalidKeys, pred.label); + } + return obj; + }; + }; + const handleExact = (required, keys) => { + const unsupported = filter$2(keys, key => { + return !contains$2(required, key); + }); + if (unsupported.length > 0) { + unsuppMessage(unsupported); + } + }; + const exactly = required => base(handleExact, required); + + const DragMode = exactly([ + 'compare', + 'extract', + 'mutate', + 'sink' + ]); + const DragSink = exactly([ + 'element', + 'start', + 'stop', + 'destroy' + ]); + const DragApi = exactly([ + 'forceDrop', + 'drop', + 'move', + 'delayDrop' + ]); + + const InDrag = () => { + let previous = Optional.none(); + const reset = () => { + previous = Optional.none(); + }; + const update = (mode, nu) => { + const result = previous.map(old => { + return mode.compare(old, nu); + }); + previous = Optional.some(nu); + return result; + }; + const onEvent = (event, mode) => { + const dataOption = mode.extract(event); + dataOption.each(data => { + const offset = update(mode, data); + offset.each(d => { + events.trigger.move(d); + }); + }); + }; + const events = create$1({ move: Event(['info']) }); + return { + onEvent, + reset, + events: events.registry + }; + }; + + const NoDrag = () => { + const events = create$1({ move: Event(['info']) }); + return { + onEvent: noop, + reset: noop, + events: events.registry + }; + }; + + const Movement = () => { + const noDragState = NoDrag(); + const inDragState = InDrag(); + let dragState = noDragState; + const on = () => { + dragState.reset(); + dragState = inDragState; + }; + const off = () => { + dragState.reset(); + dragState = noDragState; + }; + const onEvent = (event, mode) => { + dragState.onEvent(event, mode); + }; + const isOn = () => { + return dragState === inDragState; + }; + return { + on, + off, + isOn, + onEvent, + events: inDragState.events + }; + }; + + const setup = (mutation, mode, settings) => { + let active = false; + const events = create$1({ + start: Event([]), + stop: Event([]) + }); + const movement = Movement(); + const drop = () => { + sink.stop(); + if (movement.isOn()) { + movement.off(); + events.trigger.stop(); + } + }; + const throttledDrop = last(drop, 200); + const go = parent => { + sink.start(parent); + movement.on(); + events.trigger.start(); + }; + const mousemove = event => { + throttledDrop.cancel(); + movement.onEvent(event, mode); + }; + movement.events.move.bind(event => { + mode.mutate(mutation, event.info); + }); + const on = () => { + active = true; + }; + const off = () => { + active = false; + }; + const runIfActive = f => { + return (...args) => { + if (active) { + f.apply(null, args); + } + }; + }; + const sink = mode.sink(DragApi({ + forceDrop: drop, + drop: runIfActive(drop), + move: runIfActive(mousemove), + delayDrop: runIfActive(throttledDrop.throttle) + }), settings); + const destroy = () => { + sink.destroy(); + }; + return { + element: sink.element, + go, + on, + off, + destroy, + events: events.registry + }; + }; + + const css = namespace => { + const dashNamespace = namespace.replace(/\./g, '-'); + const resolve = str => { + return dashNamespace + '-' + str; + }; + return { resolve }; + }; + + const styles$1 = css('ephox-dragster'); + const resolve$1 = styles$1.resolve; + + const Blocker = options => { + const settings = { + layerClass: resolve$1('blocker'), + ...options + }; + const div = SugarElement.fromTag('div'); + set$2(div, 'role', 'presentation'); + setAll(div, { + position: 'fixed', + left: '0px', + top: '0px', + width: '100%', + height: '100%' + }); + add(div, resolve$1('blocker')); + add(div, settings.layerClass); + const element = constant(div); + const destroy = () => { + remove$6(div); + }; + return { + element, + destroy + }; + }; + + const compare = (old, nu) => { + return SugarPosition(nu.left - old.left, nu.top - old.top); + }; + const extract = event => { + return Optional.some(SugarPosition(event.x, event.y)); + }; + const mutate = (mutation, info) => { + mutation.mutate(info.left, info.top); + }; + const sink = (dragApi, settings) => { + const blocker = Blocker(settings); + const mdown = bind(blocker.element(), 'mousedown', dragApi.forceDrop); + const mup = bind(blocker.element(), 'mouseup', dragApi.drop); + const mmove = bind(blocker.element(), 'mousemove', dragApi.move); + const mout = bind(blocker.element(), 'mouseout', dragApi.delayDrop); + const destroy = () => { + blocker.destroy(); + mup.unbind(); + mmove.unbind(); + mout.unbind(); + mdown.unbind(); + }; + const start = parent => { + append$1(parent, blocker.element()); + }; + const stop = () => { + remove$6(blocker.element()); + }; + return DragSink({ + element: blocker.element, + start, + stop, + destroy + }); + }; + var MouseDrag = DragMode({ + compare, + extract, + sink, + mutate + }); + + const transform = (mutation, settings = {}) => { + var _a; + const mode = (_a = settings.mode) !== null && _a !== void 0 ? _a : MouseDrag; + return setup(mutation, mode, settings); + }; + + const styles = css('ephox-snooker'); + const resolve = styles.resolve; + + const Mutation = () => { + const events = create$1({ + drag: Event([ + 'xDelta', + 'yDelta' + ]) + }); + const mutate = (x, y) => { + events.trigger.drag(x, y); + }; + return { + mutate, + events: events.registry + }; + }; + + const BarMutation = () => { + const events = create$1({ + drag: Event([ + 'xDelta', + 'yDelta', + 'target' + ]) + }); + let target = Optional.none(); + const delegate = Mutation(); + delegate.events.drag.bind(event => { + target.each(t => { + events.trigger.drag(event.xDelta, event.yDelta, t); + }); + }); + const assign = t => { + target = Optional.some(t); + }; + const get = () => { + return target; + }; + return { + assign, + get, + mutate: delegate.mutate, + events: events.registry + }; + }; + + const col = (column, x, y, w, h) => { + const bar = SugarElement.fromTag('div'); + setAll(bar, { + position: 'absolute', + left: x - w / 2 + 'px', + top: y + 'px', + height: h + 'px', + width: w + 'px' + }); + setAll$1(bar, { + 'data-column': column, + 'role': 'presentation' + }); + return bar; + }; + const row = (r, x, y, w, h) => { + const bar = SugarElement.fromTag('div'); + setAll(bar, { + position: 'absolute', + left: x + 'px', + top: y - h / 2 + 'px', + height: h + 'px', + width: w + 'px' + }); + setAll$1(bar, { + 'data-row': r, + 'role': 'presentation' + }); + return bar; + }; + + const resizeBar = resolve('resizer-bar'); + const resizeRowBar = resolve('resizer-rows'); + const resizeColBar = resolve('resizer-cols'); + const BAR_THICKNESS = 7; + const resizableRows = (warehouse, isResizable) => bind$2(warehouse.all, (row, i) => isResizable(row.element) ? [i] : []); + const resizableColumns = (warehouse, isResizable) => { + const resizableCols = []; + range$1(warehouse.grid.columns, index => { + const colElmOpt = Warehouse.getColumnAt(warehouse, index).map(col => col.element); + if (colElmOpt.forall(isResizable)) { + resizableCols.push(index); + } + }); + return filter$2(resizableCols, colIndex => { + const columnCells = Warehouse.filterItems(warehouse, cell => cell.column === colIndex); + return forall(columnCells, cell => isResizable(cell.element)); + }); + }; + const destroy = wire => { + const previous = descendants(wire.parent(), '.' + resizeBar); + each$2(previous, remove$6); + }; + const drawBar = (wire, positions, create) => { + const origin = wire.origin(); + each$2(positions, cpOption => { + cpOption.each(cp => { + const bar = create(origin, cp); + add(bar, resizeBar); + append$1(wire.parent(), bar); + }); + }); + }; + const refreshCol = (wire, colPositions, position, tableHeight) => { + drawBar(wire, colPositions, (origin, cp) => { + const colBar = col(cp.col, cp.x - origin.left, position.top - origin.top, BAR_THICKNESS, tableHeight); + add(colBar, resizeColBar); + return colBar; + }); + }; + const refreshRow = (wire, rowPositions, position, tableWidth) => { + drawBar(wire, rowPositions, (origin, cp) => { + const rowBar = row(cp.row, position.left - origin.left, cp.y - origin.top, tableWidth, BAR_THICKNESS); + add(rowBar, resizeRowBar); + return rowBar; + }); + }; + const refreshGrid = (warhouse, wire, table, rows, cols) => { + const position = absolute(table); + const isResizable = wire.isResizable; + const rowPositions = rows.length > 0 ? height.positions(rows, table) : []; + const resizableRowBars = rowPositions.length > 0 ? resizableRows(warhouse, isResizable) : []; + const resizableRowPositions = filter$2(rowPositions, (_pos, i) => exists(resizableRowBars, barIndex => i === barIndex)); + refreshRow(wire, resizableRowPositions, position, getOuter$2(table)); + const colPositions = cols.length > 0 ? width.positions(cols, table) : []; + const resizableColBars = colPositions.length > 0 ? resizableColumns(warhouse, isResizable) : []; + const resizableColPositions = filter$2(colPositions, (_pos, i) => exists(resizableColBars, barIndex => i === barIndex)); + refreshCol(wire, resizableColPositions, position, getOuter$1(table)); + }; + const refresh = (wire, table) => { + destroy(wire); + if (wire.isResizable(table)) { + const warehouse = Warehouse.fromTable(table); + const rows$1 = rows(warehouse); + const cols = columns(warehouse); + refreshGrid(warehouse, wire, table, rows$1, cols); + } + }; + const each = (wire, f) => { + const bars = descendants(wire.parent(), '.' + resizeBar); + each$2(bars, f); + }; + const hide = wire => { + each(wire, bar => { + set$1(bar, 'display', 'none'); + }); + }; + const show = wire => { + each(wire, bar => { + set$1(bar, 'display', 'block'); + }); + }; + const isRowBar = element => { + return has(element, resizeRowBar); + }; + const isColBar = element => { + return has(element, resizeColBar); + }; + + const resizeBarDragging = resolve('resizer-bar-dragging'); + const BarManager = wire => { + const mutation = BarMutation(); + const resizing = transform(mutation, {}); + let hoverTable = Optional.none(); + const getResizer = (element, type) => { + return Optional.from(get$b(element, type)); + }; + mutation.events.drag.bind(event => { + getResizer(event.target, 'data-row').each(_dataRow => { + const currentRow = getCssValue(event.target, 'top'); + set$1(event.target, 'top', currentRow + event.yDelta + 'px'); + }); + getResizer(event.target, 'data-column').each(_dataCol => { + const currentCol = getCssValue(event.target, 'left'); + set$1(event.target, 'left', currentCol + event.xDelta + 'px'); + }); + }); + const getDelta = (target, dir) => { + const newX = getCssValue(target, dir); + const oldX = getAttrValue(target, 'data-initial-' + dir, 0); + return newX - oldX; + }; + resizing.events.stop.bind(() => { + mutation.get().each(target => { + hoverTable.each(table => { + getResizer(target, 'data-row').each(row => { + const delta = getDelta(target, 'top'); + remove$7(target, 'data-initial-top'); + events.trigger.adjustHeight(table, delta, parseInt(row, 10)); + }); + getResizer(target, 'data-column').each(column => { + const delta = getDelta(target, 'left'); + remove$7(target, 'data-initial-left'); + events.trigger.adjustWidth(table, delta, parseInt(column, 10)); + }); + refresh(wire, table); + }); + }); + }); + const handler = (target, dir) => { + events.trigger.startAdjust(); + mutation.assign(target); + set$2(target, 'data-initial-' + dir, getCssValue(target, dir)); + add(target, resizeBarDragging); + set$1(target, 'opacity', '0.2'); + resizing.go(wire.parent()); + }; + const mousedown = bind(wire.parent(), 'mousedown', event => { + if (isRowBar(event.target)) { + handler(event.target, 'top'); + } + if (isColBar(event.target)) { + handler(event.target, 'left'); + } + }); + const isRoot = e => { + return eq$1(e, wire.view()); + }; + const findClosestEditableTable = target => closest$1(target, 'table', isRoot).filter(isEditable$1); + const mouseover = bind(wire.view(), 'mouseover', event => { + findClosestEditableTable(event.target).fold(() => { + if (inBody(event.target)) { + destroy(wire); + } + }, table => { + hoverTable = Optional.some(table); + refresh(wire, table); + }); + }); + const destroy$1 = () => { + mousedown.unbind(); + mouseover.unbind(); + resizing.destroy(); + destroy(wire); + }; + const refresh$1 = tbl => { + refresh(wire, tbl); + }; + const events = create$1({ + adjustHeight: Event([ + 'table', + 'delta', + 'row' + ]), + adjustWidth: Event([ + 'table', + 'delta', + 'column' + ]), + startAdjust: Event([]) + }); + return { + destroy: destroy$1, + refresh: refresh$1, + on: resizing.on, + off: resizing.off, + hideBars: curry(hide, wire), + showBars: curry(show, wire), + events: events.registry + }; + }; + + const create = (wire, resizing, lazySizing) => { + const hdirection = height; + const vdirection = width; + const manager = BarManager(wire); + const events = create$1({ + beforeResize: Event([ + 'table', + 'type' + ]), + afterResize: Event([ + 'table', + 'type' + ]), + startDrag: Event([]) + }); + manager.events.adjustHeight.bind(event => { + const table = event.table; + events.trigger.beforeResize(table, 'row'); + const delta = hdirection.delta(event.delta, table); + adjustHeight(table, delta, event.row, hdirection); + events.trigger.afterResize(table, 'row'); + }); + manager.events.startAdjust.bind(_event => { + events.trigger.startDrag(); + }); + manager.events.adjustWidth.bind(event => { + const table = event.table; + events.trigger.beforeResize(table, 'col'); + const delta = vdirection.delta(event.delta, table); + const tableSize = lazySizing(table); + adjustWidth(table, delta, event.column, resizing, tableSize); + events.trigger.afterResize(table, 'col'); + }); + return { + on: manager.on, + off: manager.off, + refreshBars: manager.refresh, + hideBars: manager.hideBars, + showBars: manager.showBars, + destroy: manager.destroy, + events: events.registry + }; + }; + const TableResize = { create }; + + const only = (element, isResizable) => { + const parent = isDocument(element) ? documentElement(element) : element; + return { + parent: constant(parent), + view: constant(element), + origin: constant(SugarPosition(0, 0)), + isResizable + }; + }; + const detached = (editable, chrome, isResizable) => { + const origin = () => absolute(chrome); + return { + parent: constant(chrome), + view: constant(editable), + origin, + isResizable + }; + }; + const body = (editable, chrome, isResizable) => { + return { + parent: constant(chrome), + view: constant(editable), + origin: constant(SugarPosition(0, 0)), + isResizable + }; + }; + const ResizeWire = { + only, + detached, + body + }; + + const createContainer = () => { + const container = SugarElement.fromTag('div'); + setAll(container, { + position: 'static', + height: '0', + width: '0', + padding: '0', + margin: '0', + border: '0' + }); + append$1(body$1(), container); + return container; + }; + const get = (editor, isResizable) => { + return editor.inline ? ResizeWire.body(SugarElement.fromDom(editor.getBody()), createContainer(), isResizable) : ResizeWire.only(SugarElement.fromDom(editor.getDoc()), isResizable); + }; + const remove = (editor, wire) => { + if (editor.inline) { + remove$6(wire.parent()); + } + }; + + const isTable = node => isNonNullable(node) && node.tagName === 'TABLE'; + const barResizerPrefix = 'bar-'; + const isResizable = elm => get$b(elm, 'data-mce-resize') !== 'false'; + const syncPixels = table => { + const warehouse = Warehouse.fromTable(table); + if (!Warehouse.hasColumns(warehouse)) { + each$2(cells$1(table), cell => { + const computedWidth = get$a(cell, 'width'); + set$1(cell, 'width', computedWidth); + remove$7(cell, 'width'); + }); + } + }; + const TableResizeHandler = editor => { + const selectionRng = value(); + const tableResize = value(); + const resizeWire = value(); + let startW; + let startRawW; + const lazySizing = table => get$5(editor, table); + const lazyResizingBehaviour = () => isPreserveTableColumnResizing(editor) ? preserveTable() : resizeTable(); + const getNumColumns = table => getGridSize(table).columns; + const afterCornerResize = (table, origin, width) => { + const isRightEdgeResize = endsWith(origin, 'e'); + if (startRawW === '') { + convertToPercentSize(table); + } + if (width !== startW && startRawW !== '') { + set$1(table, 'width', startRawW); + const resizing = lazyResizingBehaviour(); + const tableSize = lazySizing(table); + const col = isPreserveTableColumnResizing(editor) || isRightEdgeResize ? getNumColumns(table) - 1 : 0; + adjustWidth(table, width - startW, col, resizing, tableSize); + } else if (isPercentage$1(startRawW)) { + const percentW = parseFloat(startRawW.replace('%', '')); + const targetPercentW = width * percentW / startW; + set$1(table, 'width', targetPercentW + '%'); + } + if (isPixel(startRawW)) { + syncPixels(table); + } + }; + const destroy = () => { + tableResize.on(sz => { + sz.destroy(); + }); + resizeWire.on(w => { + remove(editor, w); + }); + }; + editor.on('init', () => { + const rawWire = get(editor, isResizable); + resizeWire.set(rawWire); + if (hasTableObjectResizing(editor) && hasTableResizeBars(editor)) { + const resizing = lazyResizingBehaviour(); + const sz = TableResize.create(rawWire, resizing, lazySizing); + sz.on(); + sz.events.startDrag.bind(_event => { + selectionRng.set(editor.selection.getRng()); + }); + sz.events.beforeResize.bind(event => { + const rawTable = event.table.dom; + fireObjectResizeStart(editor, rawTable, getPixelWidth(rawTable), getPixelHeight(rawTable), barResizerPrefix + event.type); + }); + sz.events.afterResize.bind(event => { + const table = event.table; + const rawTable = table.dom; + removeDataStyle(table); + selectionRng.on(rng => { + editor.selection.setRng(rng); + editor.focus(); + }); + fireObjectResized(editor, rawTable, getPixelWidth(rawTable), getPixelHeight(rawTable), barResizerPrefix + event.type); + editor.undoManager.add(); + }); + tableResize.set(sz); + } + }); + editor.on('ObjectResizeStart', e => { + const targetElm = e.target; + if (isTable(targetElm)) { + const table = SugarElement.fromDom(targetElm); + each$2(editor.dom.select('.mce-clonedresizable'), clone => { + editor.dom.addClass(clone, 'mce-' + getTableColumnResizingBehaviour(editor) + '-columns'); + }); + if (!isPixelSizing(table) && isTablePixelsForced(editor)) { + convertToPixelSize(table); + } else if (!isPercentSizing(table) && isTablePercentagesForced(editor)) { + convertToPercentSize(table); + } + if (isNoneSizing(table) && startsWith(e.origin, barResizerPrefix)) { + convertToPercentSize(table); + } + startW = e.width; + startRawW = isTableResponsiveForced(editor) ? '' : getRawWidth(editor, targetElm).getOr(''); + } + }); + editor.on('ObjectResized', e => { + const targetElm = e.target; + if (isTable(targetElm)) { + const table = SugarElement.fromDom(targetElm); + const origin = e.origin; + if (startsWith(origin, 'corner-')) { + afterCornerResize(table, origin, e.width); + } + removeDataStyle(table); + fireTableModified(editor, table.dom, styleModified); + } + }); + editor.on('SwitchMode', () => { + tableResize.on(resize => { + if (editor.mode.isReadOnly()) { + resize.hideBars(); + } else { + resize.showBars(); + } + }); + }); + editor.on('remove', () => { + destroy(); + }); + const refresh = table => { + tableResize.on(resize => resize.refreshBars(SugarElement.fromDom(table))); + }; + const hide = () => { + tableResize.on(resize => resize.hideBars()); + }; + const show = () => { + tableResize.on(resize => resize.showBars()); + }; + return { + refresh, + hide, + show + }; + }; + + const setupTable = editor => { + register(editor); + const resizeHandler = TableResizeHandler(editor); + const cellSelectionHandler = TableCellSelectionHandler(editor, resizeHandler); + const actions = TableActions(editor, resizeHandler, cellSelectionHandler); + registerCommands(editor, actions); + registerQueryCommands(editor, actions); + registerEvents(editor, actions); + return { + getSelectedCells: cellSelectionHandler.getSelectedCells, + clearSelectedCells: cellSelectionHandler.clearSelectedCells + }; + }; + + const DomModel = editor => { + const table = setupTable(editor); + return { table }; + }; + var Model = () => { + global$1.add('dom', DomModel); + }; + + Model(); + +})(); diff --git a/vendor/tinymce/tinymce/models/dom/model.min.js b/vendor/tinymce/tinymce/models/dom/model.min.js new file mode 100644 index 00000000..f8c541cb --- /dev/null +++ b/vendor/tinymce/tinymce/models/dom/model.min.js @@ -0,0 +1,4 @@ +/** + * TinyMCE version 6.0.2 (2022-04-27) + */ +!function(){"use strict";var e=tinymce.util.Tools.resolve("tinymce.ModelManager");const t=e=>t=>(e=>{const t=typeof e;return null===e?"null":"object"===t&&Array.isArray(e)?"array":"object"===t&&(o=n=e,(r=String).prototype.isPrototypeOf(o)||(null===(s=n.constructor)||void 0===s?void 0:s.name)===r.name)?"string":t;var o,n,r,s})(t)===e,o=e=>t=>typeof t===e,n=t("string"),r=t("object"),s=t("array"),l=(null,e=>null===e);const a=o("boolean"),c=e=>!(e=>null==e)(e),i=o("function"),m=o("number"),d=()=>{},u=e=>()=>e,f=e=>e,g=(e,t)=>e===t;function h(e,...t){return(...o)=>{const n=t.concat(o);return e.apply(null,n)}}const p=e=>t=>!e(t),w=e=>e(),b=u(!1),v=u(!0);class y{constructor(e,t){this.tag=e,this.value=t}static some(e){return new y(!0,e)}static none(){return y.singletonNone}fold(e,t){return this.tag?t(this.value):e()}isSome(){return this.tag}isNone(){return!this.tag}map(e){return this.tag?y.some(e(this.value)):y.none()}bind(e){return this.tag?e(this.value):y.none()}exists(e){return this.tag&&e(this.value)}forall(e){return!this.tag||e(this.value)}filter(e){return!this.tag||e(this.value)?this:y.none()}getOr(e){return this.tag?this.value:e}or(e){return this.tag?this:e}getOrThunk(e){return this.tag?this.value:e()}orThunk(e){return this.tag?this:e()}getOrDie(e){if(this.tag)return this.value;throw new Error(null!=e?e:"Called getOrDie on None")}static from(e){return c(e)?y.some(e):y.none()}getOrNull(){return this.tag?this.value:null}getOrUndefined(){return this.value}each(e){this.tag&&e(this.value)}toArray(){return this.tag?[this.value]:[]}toString(){return this.tag?`some(${this.value})`:"none()"}}y.singletonNone=new y(!1);const x=Array.prototype.slice,C=Array.prototype.indexOf,S=Array.prototype.push,T=(e,t)=>((e,t)=>C.call(e,t))(e,t)>-1,R=(e,t)=>{for(let o=0,n=e.length;o{const o=[];for(let n=0;n{const o=e.length,n=new Array(o);for(let r=0;r{for(let o=0,n=e.length;o{const o=[],n=[];for(let r=0,s=e.length;r{const o=[];for(let n=0,r=e.length;n(((e,t)=>{for(let o=e.length-1;o>=0;o--)t(e[o],o)})(e,((e,n)=>{o=t(o,e,n)})),o),z=(e,t,o)=>(k(e,((e,n)=>{o=t(o,e,n)})),o),A=(e,t)=>((e,t,o)=>{for(let n=0,r=e.length;n{for(let o=0,n=e.length;o{const t=[];for(let o=0,n=e.length;oL(O(e,t)),j=(e,t)=>{for(let o=0,n=e.length;o{const o={};for(let n=0,r=e.length;nt>=0&&tI(e,0),F=e=>I(e,e.length-1),H=(e,t)=>{for(let o=0;o{const o=q(e);for(let n=0,r=o.length;nG(e,((e,o)=>({k:o,v:t(e,o)}))),G=(e,t)=>{const o={};return $(e,((e,n)=>{const r=t(e,n);o[r.k]=r.v})),o},K=(e,t)=>{const o={};return((e,t,o,n)=>{$(e,((e,r)=>{(t(e,r)?o:n)(e,r)}))})(e,t,(e=>(t,o)=>{e[o]=t})(o),d),o},Y=(e,t)=>{const o=[];return $(e,((e,n)=>{o.push(t(e,n))})),o},J=e=>Y(e,f),Q=(e,t)=>V.call(e,t);"undefined"!=typeof window?window:Function("return this;")();const X=e=>e.dom.nodeName.toLowerCase(),Z=e=>e.dom.nodeType,ee=e=>t=>Z(t)===e,te=e=>8===Z(e)||"#comment"===X(e),oe=ee(1),ne=ee(3),re=ee(9),se=ee(11),le=e=>t=>oe(t)&&X(t)===e,ae=(e,t,o)=>{if(!(n(o)||a(o)||m(o)))throw console.error("Invalid call to Attribute.set. Key ",t,":: Value ",o,":: Element ",e),new Error("Attribute value was not simple");e.setAttribute(t,o+"")},ce=(e,t,o)=>{ae(e.dom,t,o)},ie=(e,t)=>{const o=e.dom;$(t,((e,t)=>{ae(o,t,e)}))},me=(e,t)=>{const o=e.dom.getAttribute(t);return null===o?void 0:o},de=(e,t)=>y.from(me(e,t)),ue=(e,t)=>{e.dom.removeAttribute(t)},fe=e=>z(e.dom.attributes,((e,t)=>(e[t.name]=t.value,e)),{}),ge=e=>{if(null==e)throw new Error("Node cannot be null or undefined");return{dom:e}},he={fromHtml:(e,t)=>{const o=(t||document).createElement("div");if(o.innerHTML=e,!o.hasChildNodes()||o.childNodes.length>1){const t="HTML does not have a single root node";throw console.error(t,e),new Error(t)}return ge(o.childNodes[0])},fromTag:(e,t)=>{const o=(t||document).createElement(e);return ge(o)},fromText:(e,t)=>{const o=(t||document).createTextNode(e);return ge(o)},fromDom:ge,fromPoint:(e,t,o)=>y.from(e.dom.elementFromPoint(t,o)).map(ge)},pe=(e,t)=>{const o=e.dom;if(1!==o.nodeType)return!1;{const e=o;if(void 0!==e.matches)return e.matches(t);if(void 0!==e.msMatchesSelector)return e.msMatchesSelector(t);if(void 0!==e.webkitMatchesSelector)return e.webkitMatchesSelector(t);if(void 0!==e.mozMatchesSelector)return e.mozMatchesSelector(t);throw new Error("Browser lacks native selectors")}},we=e=>1!==e.nodeType&&9!==e.nodeType&&11!==e.nodeType||0===e.childElementCount,be=(e,t)=>{const o=void 0===t?document:t.dom;return we(o)?y.none():y.from(o.querySelector(e)).map(he.fromDom)},ve=(e,t)=>e.dom===t.dom,ye=(e,t)=>{const o=e.dom,n=t.dom;return o!==n&&o.contains(n)},xe=pe,Ce=e=>he.fromDom(e.dom.ownerDocument),Se=e=>re(e)?e:Ce(e),Te=e=>y.from(e.dom.parentNode).map(he.fromDom),Re=(e,t)=>{const o=i(t)?t:b;let n=e.dom;const r=[];for(;null!==n.parentNode&&void 0!==n.parentNode;){const e=n.parentNode,t=he.fromDom(e);if(r.push(t),!0===o(t))break;n=e}return r},De=e=>y.from(e.dom.previousSibling).map(he.fromDom),Oe=e=>y.from(e.dom.nextSibling).map(he.fromDom),ke=e=>O(e.dom.childNodes,he.fromDom),Ee=(e,t)=>{const o=e.dom.childNodes;return y.from(o[t]).map(he.fromDom)},Ne=(e,t)=>{Te(e).each((o=>{o.dom.insertBefore(t.dom,e.dom)}))},Be=(e,t)=>{Oe(e).fold((()=>{Te(e).each((e=>{Ae(e,t)}))}),(e=>{Ne(e,t)}))},ze=(e,t)=>{const o=(e=>Ee(e,0))(e);o.fold((()=>{Ae(e,t)}),(o=>{e.dom.insertBefore(t.dom,o.dom)}))},Ae=(e,t)=>{e.dom.appendChild(t.dom)},We=(e,t)=>{Ne(e,t),Ae(t,e)},Le=(e,t)=>{k(t,((o,n)=>{const r=0===n?e:t[n-1];Be(r,o)}))},Me=(e,t)=>{k(t,(t=>{Ae(e,t)}))},je=e=>{e.dom.textContent="",k(ke(e),(e=>{_e(e)}))},_e=e=>{const t=e.dom;null!==t.parentNode&&t.parentNode.removeChild(t)},Ie=e=>{const t=ke(e);t.length>0&&Le(e,t),_e(e)},Pe=(e,t)=>he.fromDom(e.dom.cloneNode(t)),Fe=e=>Pe(e,!1),He=e=>Pe(e,!0),qe=(e,t)=>{const o=he.fromTag(t),n=fe(e);return ie(o,n),o},Ve=["tfoot","thead","tbody","colgroup"],$e=(e,t,o)=>({element:e,rowspan:t,colspan:o}),Ue=(e,t,o)=>({element:e,cells:t,section:o}),Ge=(e,t,o)=>({element:e,isNew:t,isLocked:o}),Ke=(e,t,o,n)=>({element:e,cells:t,section:o,isNew:n}),Ye=i(Element.prototype.attachShadow)&&i(Node.prototype.getRootNode),Je=u(Ye),Qe=Ye?e=>he.fromDom(e.dom.getRootNode()):Se,Xe=e=>he.fromDom(e.dom.host),Ze=e=>{const t=ne(e)?e.dom.parentNode:e.dom;if(null==t||null===t.ownerDocument)return!1;const o=t.ownerDocument;return(e=>{const t=Qe(e);return se(o=t)&&c(o.dom.host)?y.some(t):y.none();var o})(he.fromDom(t)).fold((()=>o.body.contains(t)),(n=Ze,r=Xe,e=>n(r(e))));var n,r},et=e=>{const t=e.dom.body;if(null==t)throw new Error("Body is not available yet");return he.fromDom(t)},tt=(e,t)=>{let o=[];return k(ke(e),(e=>{t(e)&&(o=o.concat([e])),o=o.concat(tt(e,t))})),o},ot=(e,t,o)=>((e,o,n)=>N(Re(e,n),(e=>pe(e,t))))(e,0,o),nt=(e,t)=>((e,o)=>N(ke(e),(e=>pe(e,t))))(e),rt=(e,t)=>((e,t)=>{const o=void 0===t?document:t.dom;return we(o)?[]:O(o.querySelectorAll(e),he.fromDom)})(t,e);var st=(e,t,o,n,r)=>e(o,n)?y.some(o):i(r)&&r(o)?y.none():t(o,n,r);const lt=(e,t,o)=>{let n=e.dom;const r=i(o)?o:b;for(;n.parentNode;){n=n.parentNode;const e=he.fromDom(n);if(t(e))return y.some(e);if(r(e))break}return y.none()},at=(e,t,o)=>lt(e,(e=>pe(e,t)),o),ct=(e,t)=>((e,o)=>A(e.dom.childNodes,(e=>{return o=he.fromDom(e),pe(o,t);var o})).map(he.fromDom))(e),it=(e,t)=>be(t,e),mt=(e,t,o)=>st(((e,t)=>pe(e,t)),at,e,t,o),dt=(e,t,o=g)=>e.exists((e=>o(e,t))),ut=e=>{const t=[],o=e=>{t.push(e)};for(let t=0;te?y.some(t):y.none(),gt=(e,t,o)=>""===t||e.length>=t.length&&e.substr(o,o+t.length)===t,ht=(e,t)=>-1!==e.indexOf(t),pt=(e,t)=>gt(e,t,0),wt=(e,t)=>gt(e,t,e.length-t.length),bt=(e=>t=>t.replace(e,""))(/^\s+|\s+$/g),vt=e=>e.length>0,yt=e=>void 0!==e.style&&i(e.style.getPropertyValue),xt=(e,t,o)=>{if(!n(o))throw console.error("Invalid call to CSS.set. Property ",t,":: Value ",o,":: Element ",e),new Error("CSS value must be a string: "+o);yt(e)&&e.style.setProperty(t,o)},Ct=(e,t,o)=>{const n=e.dom;xt(n,t,o)},St=(e,t)=>{const o=e.dom;$(t,((e,t)=>{xt(o,t,e)}))},Tt=(e,t)=>{const o=e.dom,n=window.getComputedStyle(o).getPropertyValue(t);return""!==n||Ze(e)?n:Rt(o,t)},Rt=(e,t)=>yt(e)?e.style.getPropertyValue(t):"",Dt=(e,t)=>{const o=e.dom,n=Rt(o,t);return y.from(n).filter((e=>e.length>0))},Ot=(e,t)=>{((e,t)=>{yt(e)&&e.style.removeProperty(t)})(e.dom,t),dt(de(e,"style").map(bt),"")&&ue(e,"style")},kt=(e,t,o=0)=>de(e,t).map((e=>parseInt(e,10))).getOr(o),Et=(e,t)=>kt(e,t,1),Nt=e=>le("col")(e)?kt(e,"span",1)>1:Et(e,"colspan")>1,Bt=e=>Et(e,"rowspan")>1,zt=(e,t)=>parseInt(Tt(e,t),10),At=u(10),Wt=u(10),Lt=(e,t)=>Mt(e,t,v),Mt=(e,t,o)=>M(ke(e),(e=>pe(e,t)?o(e)?[e]:[]:Mt(e,t,o))),jt=(e,t)=>((e,t,o=b)=>o(t)?y.none():T(e,X(t))?y.some(t):at(t,e.join(","),(e=>pe(e,"table")||o(e))))(["td","th"],e,t),_t=e=>Lt(e,"th,td"),It=e=>pe(e,"colgroup")?nt(e,"col"):M(Ht(e),(e=>nt(e,"col"))),Pt=(e,t)=>mt(e,"table",t),Ft=e=>Lt(e,"tr"),Ht=e=>Pt(e).fold(u([]),(e=>nt(e,"colgroup"))),qt=(e,t)=>O(e,(e=>{if("colgroup"===X(e)){const t=O(It(e),(e=>{const t=kt(e,"span",1);return $e(e,1,t)}));return Ue(e,t,"colgroup")}{const o=O(_t(e),(e=>{const t=kt(e,"rowspan",1),o=kt(e,"colspan",1);return $e(e,t,o)}));return Ue(e,o,t(e))}})),Vt=e=>Te(e).map((e=>{const t=X(e);return(e=>T(Ve,e))(t)?t:"tbody"})).getOr("tbody"),$t=e=>{const t=Ft(e),o=[...Ht(e),...t];return qt(o,Vt)},Ut=e=>{let t,o=!1;return(...n)=>(o||(o=!0,t=e.apply(null,n)),t)},Gt=()=>Kt(0,0),Kt=(e,t)=>({major:e,minor:t}),Yt={nu:Kt,detect:(e,t)=>{const o=String(t).toLowerCase();return 0===e.length?Gt():((e,t)=>{const o=((e,t)=>{for(let o=0;oNumber(t.replace(o,"$"+e));return Kt(n(1),n(2))})(e,o)},unknown:Gt},Jt=(e,t)=>{const o=String(t).toLowerCase();return A(e,(e=>e.search(o)))},Qt=/.*?version\/\ ?([0-9]+)\.([0-9]+).*/,Xt=e=>t=>ht(t,e),Zt=[{name:"Edge",versionRegexes:[/.*?edge\/ ?([0-9]+)\.([0-9]+)$/],search:e=>ht(e,"edge/")&&ht(e,"chrome")&&ht(e,"safari")&&ht(e,"applewebkit")},{name:"Chromium",brand:"Chromium",versionRegexes:[/.*?chrome\/([0-9]+)\.([0-9]+).*/,Qt],search:e=>ht(e,"chrome")&&!ht(e,"chromeframe")},{name:"IE",versionRegexes:[/.*?msie\ ?([0-9]+)\.([0-9]+).*/,/.*?rv:([0-9]+)\.([0-9]+).*/],search:e=>ht(e,"msie")||ht(e,"trident")},{name:"Opera",versionRegexes:[Qt,/.*?opera\/([0-9]+)\.([0-9]+).*/],search:Xt("opera")},{name:"Firefox",versionRegexes:[/.*?firefox\/\ ?([0-9]+)\.([0-9]+).*/],search:Xt("firefox")},{name:"Safari",versionRegexes:[Qt,/.*?cpu os ([0-9]+)_([0-9]+).*/],search:e=>(ht(e,"safari")||ht(e,"mobile/"))&&ht(e,"applewebkit")}],eo=[{name:"Windows",search:Xt("win"),versionRegexes:[/.*?windows\ nt\ ?([0-9]+)\.([0-9]+).*/]},{name:"iOS",search:e=>ht(e,"iphone")||ht(e,"ipad"),versionRegexes:[/.*?version\/\ ?([0-9]+)\.([0-9]+).*/,/.*cpu os ([0-9]+)_([0-9]+).*/,/.*cpu iphone os ([0-9]+)_([0-9]+).*/]},{name:"Android",search:Xt("android"),versionRegexes:[/.*?android\ ?([0-9]+)\.([0-9]+).*/]},{name:"macOS",search:Xt("mac os x"),versionRegexes:[/.*?mac\ os\ x\ ?([0-9]+)_([0-9]+).*/]},{name:"Linux",search:Xt("linux"),versionRegexes:[]},{name:"Solaris",search:Xt("sunos"),versionRegexes:[]},{name:"FreeBSD",search:Xt("freebsd"),versionRegexes:[]},{name:"ChromeOS",search:Xt("cros"),versionRegexes:[/.*?chrome\/([0-9]+)\.([0-9]+).*/]}],to={browsers:u(Zt),oses:u(eo)},oo="Edge",no="Chromium",ro="Opera",so="Firefox",lo="Safari",ao=e=>{const t=e.current,o=e.version,n=e=>()=>t===e;return{current:t,version:o,isEdge:n(oo),isChromium:n(no),isIE:n("IE"),isOpera:n(ro),isFirefox:n(so),isSafari:n(lo)}},co=()=>ao({current:void 0,version:Yt.unknown()}),io=ao,mo=(u(oo),u(no),u("IE"),u(ro),u(so),u(lo),"Windows"),uo="Android",fo="Linux",go="macOS",ho="Solaris",po="FreeBSD",wo="ChromeOS",bo=e=>{const t=e.current,o=e.version,n=e=>()=>t===e;return{current:t,version:o,isWindows:n(mo),isiOS:n("iOS"),isAndroid:n(uo),isMacOS:n(go),isLinux:n(fo),isSolaris:n(ho),isFreeBSD:n(po),isChromeOS:n(wo)}},vo=()=>bo({current:void 0,version:Yt.unknown()}),yo=bo,xo=(u(mo),u("iOS"),u(uo),u(fo),u(go),u(ho),u(po),u(wo),e=>window.matchMedia(e).matches);let Co=Ut((()=>((e,t,o)=>{const n=to.browsers(),r=to.oses(),s=t.bind((e=>((e,t)=>H(t.brands,(t=>{const o=t.brand.toLowerCase();return A(e,(e=>{var t;return o===(null===(t=e.brand)||void 0===t?void 0:t.toLowerCase())})).map((e=>({current:e.name,version:Yt.nu(parseInt(t.version,10),0)})))})))(n,e))).orThunk((()=>((e,t)=>Jt(e,t).map((e=>{const o=Yt.detect(e.versionRegexes,t);return{current:e.name,version:o}})))(n,e))).fold(co,io),l=((e,t)=>Jt(e,t).map((e=>{const o=Yt.detect(e.versionRegexes,t);return{current:e.name,version:o}})))(r,e).fold(vo,yo),a=((e,t,o,n)=>{const r=e.isiOS()&&!0===/ipad/i.test(o),s=e.isiOS()&&!r,l=e.isiOS()||e.isAndroid(),a=l||n("(pointer:coarse)"),c=r||!s&&l&&n("(min-device-width:768px)"),i=s||l&&!c,m=t.isSafari()&&e.isiOS()&&!1===/safari/i.test(o),d=!i&&!c&&!m;return{isiPad:u(r),isiPhone:u(s),isTablet:u(c),isPhone:u(i),isTouch:u(a),isAndroid:e.isAndroid,isiOS:e.isiOS,isWebView:u(m),isDesktop:u(d)}})(l,s,e,o);return{browser:s,os:l,deviceType:a}})(navigator.userAgent,y.from(navigator.userAgentData),xo)));const So=()=>Co(),To=(e,t)=>{const o=o=>{const n=t(o);if(n<=0||null===n){const t=Tt(o,e);return parseFloat(t)||0}return n},n=(e,t)=>z(t,((t,o)=>{const n=Tt(e,o),r=void 0===n?0:parseInt(n,10);return isNaN(r)?t:t+r}),0);return{set:(t,o)=>{if(!m(o)&&!o.match(/^[0-9]+$/))throw new Error(e+".set accepts only positive integer values. Value was "+o);const n=t.dom;yt(n)&&(n.style[e]=o+"px")},get:o,getOuter:o,aggregate:n,max:(e,t,o)=>{const r=n(e,o);return t>r?t-r:0}}},Ro=(e,t,o)=>((e,t)=>(e=>{const t=parseFloat(e);return isNaN(t)?y.none():y.some(t)})(e).getOr(t))(Tt(e,t),o),Do=To("width",(e=>e.dom.offsetWidth)),Oo=e=>Do.get(e),ko=e=>Do.getOuter(e),Eo=e=>((e,t)=>{const o=e.dom,n=o.getBoundingClientRect().width||o.offsetWidth;return"border-box"===t?n:((e,t,o,n)=>t-Ro(e,"padding-left",0)-Ro(e,"padding-right",0)-Ro(e,"border-left-width",0)-Ro(e,"border-right-width",0))(e,n)})(e,"content-box"),No=(e,t,o)=>{const n=e.cells,r=n.slice(0,t),s=n.slice(t),l=r.concat(o).concat(s);return Ao(e,l)},Bo=(e,t,o)=>No(e,t,[o]),zo=(e,t,o)=>{e.cells[t]=o},Ao=(e,t)=>Ke(e.element,t,e.section,e.isNew),Wo=(e,t)=>e.cells[t],Lo=(e,t)=>Wo(e,t).element,Mo=e=>e.cells.length,jo=e=>{const t=E(e,(e=>"colgroup"===e.section));return{rows:t.fail,cols:t.pass}},_o=(e,t,o)=>{const n=O(e.cells,o);return Ke(t(e.element),n,e.section,!0)},Io="data-snooker-locked-cols",Po=e=>de(e,Io).bind((e=>y.from(e.match(/\d+/g)))).map((e=>_(e,v))),Fo=e=>{const t=z(jo(e).rows,((e,t)=>(k(t.cells,((t,o)=>{t.isLocked&&(e[o]=!0)})),e)),{}),o=Y(t,((e,t)=>parseInt(t,10)));return((e,t)=>{const o=x.call(e,0);return o.sort(void 0),o})(o)},Ho=(e,t)=>e+","+t,qo=(e,t)=>{const o=M(e.all,(e=>e.cells));return N(o,t)},Vo=e=>{const t={},o=[],n=P(e).map((e=>e.element)).bind(Pt).bind(Po).getOr({});let r=0,s=0,l=0;const{pass:a,fail:c}=E(e,(e=>"colgroup"===e.section));k(c,(e=>{const a=[];k(e.cells,(e=>{let o=0;for(;void 0!==t[Ho(l,o)];)o++;const r=((e,t)=>Q(e,t)&&void 0!==e[t]&&null!==e[t])(n,o.toString()),c=((e,t,o,n,r,s)=>({element:e,rowspan:t,colspan:o,row:n,column:r,isLocked:s}))(e.element,e.rowspan,e.colspan,l,o,r);for(let n=0;n{const t=(e=>{const t={};let o=0;return k(e.cells,(e=>{const n=e.colspan;D(n,(r=>{const s=o+r;t[s]=((e,t,o)=>({element:e,colspan:t,column:o}))(e.element,n,s)})),o+=n})),t})(e),o=((e,t)=>({element:e,columns:t}))(e.element,J(t));return{colgroups:[o],columns:t}})).getOrThunk((()=>({colgroups:[],columns:{}}))),d=((e,t)=>({rows:e,columns:t}))(r,s);return{grid:d,access:t,all:o,columns:i,colgroups:m}},$o=e=>{const t=$t(e);return Vo(t)},Uo=Vo,Go=(e,t,o)=>y.from(e.access[Ho(t,o)]),Ko=(e,t,o)=>{const n=qo(e,(e=>o(t,e.element)));return n.length>0?y.some(n[0]):y.none()},Yo=qo,Jo=e=>M(e.all,(e=>e.cells)),Qo=e=>J(e.columns),Xo=e=>q(e.columns).length>0,Zo=(e,t)=>y.from(e.columns[t]),en=(e,t=v)=>{const o=e.grid,n=D(o.columns,f),r=D(o.rows,f);return O(n,(o=>tn((()=>M(r,(t=>Go(e,t,o).filter((e=>e.column===o)).toArray()))),(e=>1===e.colspan&&t(e.element)),(()=>Go(e,0,o)))))},tn=(e,t,o)=>{const n=e();return A(n,t).orThunk((()=>y.from(n[0]).orThunk(o))).map((e=>e.element))},on=e=>{const t=e.grid,o=D(t.rows,f),n=D(t.columns,f);return O(o,(t=>tn((()=>M(n,(o=>Go(e,t,o).filter((e=>e.row===t)).fold(u([]),(e=>[e]))))),(e=>1===e.rowspan),(()=>Go(e,t,0)))))},nn=(e,t)=>o=>"rtl"===rn(o)?t:e,rn=e=>"rtl"===Tt(e,"direction")?"rtl":"ltr",sn=To("height",(e=>{const t=e.dom;return Ze(e)?t.getBoundingClientRect().height:t.offsetHeight})),ln=e=>sn.get(e),an=e=>sn.getOuter(e),cn=(e,t)=>({left:e,top:t,translate:(o,n)=>cn(e+o,t+n)}),mn=cn,dn=(e,t)=>void 0!==e?e:void 0!==t?t:0,un=e=>{const t=e.dom.ownerDocument,o=t.body,n=t.defaultView,r=t.documentElement;if(o===e.dom)return mn(o.offsetLeft,o.offsetTop);const s=dn(null==n?void 0:n.pageYOffset,r.scrollTop),l=dn(null==n?void 0:n.pageXOffset,r.scrollLeft),a=dn(r.clientTop,o.clientTop),c=dn(r.clientLeft,o.clientLeft);return fn(e).translate(l-c,s-a)},fn=e=>{const t=e.dom,o=t.ownerDocument.body;return o===t?mn(o.offsetLeft,o.offsetTop):Ze(e)?(e=>{const t=e.getBoundingClientRect();return mn(t.left,t.top)})(t):mn(0,0)},gn=(e,t)=>({row:e,y:t}),hn=(e,t)=>({col:e,x:t}),pn=e=>un(e).left+ko(e),wn=e=>un(e).left,bn=(e,t)=>hn(e,wn(t)),vn=(e,t)=>hn(e,pn(t)),yn=e=>un(e).top,xn=(e,t)=>gn(e,yn(t)),Cn=(e,t)=>gn(e,yn(t)+an(t)),Sn=(e,t,o)=>{if(0===o.length)return[];const n=O(o.slice(1),((t,o)=>t.map((t=>e(o,t))))),r=o[o.length-1].map((e=>t(o.length-1,e)));return n.concat([r])},Tn={delta:f,positions:e=>Sn(xn,Cn,e),edge:yn},Rn=nn({delta:f,edge:wn,positions:e=>Sn(bn,vn,e)},{delta:e=>-e,edge:pn,positions:e=>Sn(vn,bn,e)}),Dn={delta:(e,t)=>Rn(t).delta(e,t),positions:(e,t)=>Rn(t).positions(e,t),edge:e=>Rn(e).edge(e)},On={unsupportedLength:["em","ex","cap","ch","ic","rem","lh","rlh","vw","vh","vi","vb","vmin","vmax","cm","mm","Q","in","pc","pt","px"],fixed:["px","pt"],relative:["%"],empty:[""]},kn=(()=>{const e="[0-9]+",t="[eE][+-]?[0-9]+",o=e=>`(?:${e})?`,n=["Infinity","[0-9]+\\."+o(e)+o(t),"\\.[0-9]+"+o(t),e+o(t)].join("|");return new RegExp(`^([+-]?(?:${n}))(.*)$`)})(),En=/(\d+(\.\d+)?)%/,Nn=/(\d+(\.\d+)?)px|em/,Bn=le("col"),zn=(e,t,o)=>{const n=(r=e,y.from(r.dom.parentElement).map(he.fromDom)).getOrThunk((()=>et(Ce(e))));var r;return t(e)/o(n)*100},An=(e,t)=>{Ct(e,"width",t+"px")},Wn=(e,t)=>{Ct(e,"width",t+"%")},Ln=(e,t)=>{Ct(e,"height",t+"px")},Mn=e=>{const t=(e=>{return Ro(t=e,"height",t.dom.offsetHeight)+"px";var t})(e);return t?((e,t,o,n)=>{const r=parseFloat(e);return wt(e,"%")&&"table"!==X(t)?((e,t,o,n)=>{const r=Pt(e).map((e=>{const n=o(e);return Math.floor(t/100*n)})).getOr(t);return n(e,r),r})(t,r,o,n):r})(t,e,ln,Ln):ln(e)},jn=(e,t)=>Dt(e,t).orThunk((()=>de(e,t).map((e=>e+"px")))),_n=e=>jn(e,"width"),In=e=>zn(e,Oo,Eo),Pn=e=>{return Bn(e)?Oo(e):Ro(t=e,"width",t.dom.offsetWidth);var t},Fn=e=>((e,t,o)=>o(e)/Et(e,"rowspan"))(e,0,Mn),Hn=(e,t,o)=>{Ct(e,"width",t+o)},qn=e=>zn(e,Oo,Eo)+"%",Vn=u(En),$n=le("col"),Un=e=>_n(e).getOrThunk((()=>Pn(e)+"px")),Gn=e=>{return(t=e,jn(t,"height")).getOrThunk((()=>Fn(e)+"px"));var t},Kn=(e,t,o,n,r,s)=>e.filter(n).fold((()=>s(((e,t)=>{if(t<0||t>=e.length-1)return y.none();const o=e[t].fold((()=>{const o=(e=>{const t=x.call(e,0);return t.reverse(),t})(e.slice(0,t));return H(o,((e,t)=>e.map((e=>({value:e,delta:t+1})))))}),(e=>y.some({value:e,delta:0}))),n=e[t+1].fold((()=>{const o=e.slice(t+1);return H(o,((e,t)=>e.map((e=>({value:e,delta:t+1})))))}),(e=>y.some({value:e,delta:1})));return o.bind((e=>n.map((t=>{const o=t.delta+e.delta;return Math.abs(t.value-e.value)/o}))))})(o,t))),(e=>r(e))),Yn=(e,t,o,n)=>{const r=en(e),s=Xo(e)?(e=>O(Qo(e),(e=>y.from(e.element))))(e):r,l=[y.some(Dn.edge(t))].concat(O(Dn.positions(r,t),(e=>e.map((e=>e.x))))),a=p(Nt);return O(s,((e,t)=>Kn(e,t,l,a,(e=>{if((e=>{const t=So().browser,o=t.isChromium()||t.isFirefox();return!$n(e)||o})(e))return o(e);{const e=null!=(s=r[t])?f(s):y.none();return Kn(e,t,l,a,(e=>n(y.some(Oo(e)))),n)}var s}),n)))},Jn=e=>e.map((e=>e+"px")).getOr(""),Qn=(e,t,o)=>Yn(e,t,Pn,(e=>e.getOrThunk(o.minCellWidth))),Xn=(e,t,o,n,r)=>{const s=on(e),l=[y.some(o.edge(t))].concat(O(o.positions(s,t),(e=>e.map((e=>e.y)))));return O(s,((e,t)=>Kn(e,t,l,p(Bt),n,r)))},Zn=(e,t)=>()=>Ze(e)?t(e):parseFloat(Dt(e,"width").getOr("0")),er=e=>{const t=Zn(e,(e=>parseFloat(qn(e)))),o=Zn(e,Oo);return{width:t,pixelWidth:o,getWidths:(t,o)=>((e,t,o)=>Yn(e,t,In,(e=>e.fold((()=>o.minCellWidth()),(e=>e/o.pixelWidth()*100)))))(t,e,o),getCellDelta:e=>e/o()*100,singleColumnWidth:(e,t)=>[100-e],minCellWidth:()=>At()/o()*100,setElementWidth:Wn,adjustTableWidth:o=>{const n=t();Wn(e,n+o/100*n)},isRelative:!0,label:"percent"}},tr=e=>{const t=Zn(e,Oo);return{width:t,pixelWidth:t,getWidths:(t,o)=>Qn(t,e,o),getCellDelta:f,singleColumnWidth:(e,t)=>[Math.max(At(),e+t)-e],minCellWidth:At,setElementWidth:An,adjustTableWidth:o=>{const n=t()+o;An(e,n)},isRelative:!1,label:"pixel"}},or=e=>_n(e).fold((()=>(e=>{const t=Zn(e,Oo),o=u(0);return{width:t,pixelWidth:t,getWidths:(t,o)=>Qn(t,e,o),getCellDelta:o,singleColumnWidth:u([0]),minCellWidth:o,setElementWidth:d,adjustTableWidth:d,isRelative:!0,label:"none"}})(e)),(t=>((e,t)=>null!==Vn().exec(t)?er(e):tr(e))(e,t))),nr=tr,rr=er,sr=(e,t,o)=>{const n=e[o].element,r=he.fromTag("td");Ae(r,he.fromTag("br")),(t?Ae:ze)(n,r)},lr=((e,t)=>{const o=t=>e(t)?y.from(t.dom.nodeValue):y.none();return{get:t=>{if(!e(t))throw new Error("Can only get text value of a text node");return o(t).getOr("")},getOption:o,set:(t,o)=>{if(!e(t))throw new Error("Can only set raw text value of a text node");t.dom.nodeValue=o}}})(ne),ar=e=>lr.get(e),cr=e=>lr.getOption(e),ir=(e,t)=>lr.set(e,t),mr=e=>"img"===X(e)?1:cr(e).fold((()=>ke(e).length),(e=>e.length)),dr=["img","br"],ur=e=>cr(e).filter((e=>0!==e.trim().length||e.indexOf("\xa0")>-1)).isSome()||T(dr,X(e)),fr=e=>((e,t)=>{const o=e=>{for(let n=0;nhr(e,ur),hr=(e,t)=>{const o=e=>{const n=ke(e);for(let e=n.length-1;e>=0;e--){const r=n[e];if(t(r))return y.some(r);const s=o(r);if(s.isSome())return s}return y.none()};return o(e)},pr={scope:["row","col"]},wr=e=>()=>{const t=he.fromTag("td",e.dom);return Ae(t,he.fromTag("br",e.dom)),t},br=e=>()=>he.fromTag("col",e.dom),vr=e=>()=>he.fromTag("colgroup",e.dom),yr=e=>()=>he.fromTag("tr",e.dom),xr=(e,t,o)=>{const n=((e,t)=>{const o=qe(e,t),n=ke(He(e));return Me(o,n),o})(e,t);return $(o,((e,t)=>{null===e?ue(n,t):ce(n,t,e)})),n},Cr=e=>e,Sr=(e,t,o)=>{const n=(e,t)=>{((e,t)=>{const o=e.dom,n=t.dom;yt(o)&&yt(n)&&(n.style.cssText=o.style.cssText)})(e.element,t),Ot(t,"height"),1!==e.colspan&&Ot(t,"width")};return{col:o=>{const r=he.fromTag(X(o.element),t.dom);return n(o,r),e(o.element,r),r},colgroup:vr(t),row:yr(t),cell:r=>{const s=he.fromTag(X(r.element),t.dom),l=o.getOr(["strong","em","b","i","span","font","h1","h2","h3","h4","h5","h6","p","div"]),a=l.length>0?((e,t,o)=>fr(e).map((n=>{const r=o.join(","),s=ot(n,r,(t=>ve(t,e)));return B(s,((e,t)=>{const o=Fe(t);return ue(o,"contenteditable"),Ae(e,o),o}),t)})).getOr(t))(r.element,s,l):s;return Ae(a,he.fromTag("br")),n(r,s),((e,t)=>{$(pr,((o,n)=>de(e,n).filter((e=>T(o,e))).each((e=>ce(t,n,e)))))})(r.element,s),e(r.element,s),s},replace:xr,colGap:br(t),gap:wr(t)}},Tr=e=>({col:br(e),colgroup:vr(e),row:yr(e),cell:wr(e),replace:Cr,colGap:br(e),gap:wr(e)}),Rr=e=>he.fromDom(e.getBody()),Dr=e=>t=>ve(t,Rr(e)),Or=e=>{ue(e,"data-mce-style");const t=e=>ue(e,"data-mce-style");k(_t(e),t),k(It(e),t),k(Ft(e),t)},kr=e=>he.fromDom(e.selection.getStart()),Er=e=>e.getBoundingClientRect().width,Nr=e=>e.getBoundingClientRect().height,Br=(e,t)=>{const o=t.column,n=t.column+t.colspan-1,r=t.row,s=t.row+t.rowspan-1;return o<=e.finishCol&&n>=e.startCol&&r<=e.finishRow&&s>=e.startRow},zr=(e,t)=>t.column>=e.startCol&&t.column+t.colspan-1<=e.finishCol&&t.row>=e.startRow&&t.row+t.rowspan-1<=e.finishRow,Ar=(e,t,o)=>{const n=Ko(e,t,ve),r=Ko(e,o,ve);return n.bind((e=>r.map((t=>{return o=e,n=t,{startRow:Math.min(o.row,n.row),startCol:Math.min(o.column,n.column),finishRow:Math.max(o.row+o.rowspan-1,n.row+n.rowspan-1),finishCol:Math.max(o.column+o.colspan-1,n.column+n.colspan-1)};var o,n}))))},Wr=(e,t,o)=>Ar(e,t,o).map((t=>{const o=Yo(e,h(Br,t));return O(o,(e=>e.element))})),Lr=(e,t)=>Ko(e,t,((e,t)=>ye(t,e))).map((e=>e.element)),Mr=(e,t,o)=>{const n=_r(e);return Wr(n,t,o)},jr=(e,t,o,n,r)=>{const s=_r(e),l=ve(e,o)?y.some(t):Lr(s,t),a=ve(e,r)?y.some(n):Lr(s,n);return l.bind((e=>a.bind((t=>Wr(s,e,t)))))},_r=$o;var Ir=["body","p","div","article","aside","figcaption","figure","footer","header","nav","section","ol","ul","li","table","thead","tbody","tfoot","caption","tr","td","th","h1","h2","h3","h4","h5","h6","blockquote","pre","address"],Pr=()=>({up:u({selector:at,closest:mt,predicate:lt,all:Re}),down:u({selector:rt,predicate:tt}),styles:u({get:Tt,getRaw:Dt,set:Ct,remove:Ot}),attrs:u({get:me,set:ce,remove:ue,copyTo:(e,t)=>{const o=fe(e);ie(t,o)}}),insert:u({before:Ne,after:Be,afterAll:Le,append:Ae,appendAll:Me,prepend:ze,wrap:We}),remove:u({unwrap:Ie,remove:_e}),create:u({nu:he.fromTag,clone:e=>he.fromDom(e.dom.cloneNode(!1)),text:he.fromText}),query:u({comparePosition:(e,t)=>e.dom.compareDocumentPosition(t.dom),prevSibling:De,nextSibling:Oe}),property:u({children:ke,name:X,parent:Te,document:e=>Se(e).dom,isText:ne,isComment:te,isElement:oe,isSpecial:e=>{const t=X(e);return T(["script","noscript","iframe","noframes","noembed","title","style","textarea","xmp"],t)},getLanguage:e=>oe(e)?de(e,"lang"):y.none(),getText:ar,setText:ir,isBoundary:e=>!!oe(e)&&("body"===X(e)||T(Ir,X(e))),isEmptyTag:e=>!!oe(e)&&T(["br","img","hr","input"],X(e)),isNonEditable:e=>oe(e)&&"false"===me(e,"contenteditable")}),eq:ve,is:xe});const Fr=(e,t,o,n)=>{const r=t(e,o);return B(n,((o,n)=>{const r=t(e,n);return Hr(e,o,r)}),r)},Hr=(e,t,o)=>t.bind((t=>o.filter(h(e.eq,t)))),qr=Pr(),Vr=(e,t)=>((e,t,o)=>o.length>0?((e,t,o,n)=>n(e,t,o[0],o.slice(1)))(e,t,o,Fr):y.none())(qr,((t,o)=>e(o)),t),$r=e=>at(e,"table"),Ur=(e,t,o)=>{const n=e=>t=>void 0!==o&&o(t)||ve(t,e);return ve(e,t)?y.some({boxes:y.some([e]),start:e,finish:t}):$r(e).bind((r=>$r(t).bind((s=>{if(ve(r,s))return y.some({boxes:Mr(r,e,t),start:e,finish:t});if(ye(r,s)){const o=ot(t,"td,th",n(r)),l=o.length>0?o[o.length-1]:t;return y.some({boxes:jr(r,e,r,t,s),start:e,finish:l})}if(ye(s,r)){const o=ot(e,"td,th",n(s)),l=o.length>0?o[o.length-1]:e;return y.some({boxes:jr(s,e,r,t,s),start:e,finish:l})}return((e,t,o)=>((e,t,o,n=b)=>{const r=[t].concat(e.up().all(t)),s=[o].concat(e.up().all(o)),l=e=>W(e,n).fold((()=>e),(t=>e.slice(0,t+1))),a=l(r),c=l(s),i=A(a,(t=>R(c,((e,t)=>h(e.eq,t))(e,t))));return{firstpath:a,secondpath:c,shared:i}})(qr,e,t,void 0))(e,t).shared.bind((l=>mt(l,"table",o).bind((o=>{const l=ot(t,"td,th",n(o)),a=l.length>0?l[l.length-1]:t,c=ot(e,"td,th",n(o)),i=c.length>0?c[c.length-1]:e;return y.some({boxes:jr(o,e,r,t,s),start:i,finish:a})}))))}))))},Gr=(e,t)=>{const o=rt(e,t);return o.length>0?y.some(o):y.none()},Kr=(e,t,o)=>it(e,t).bind((t=>it(e,o).bind((e=>Vr($r,[t,e]).map((o=>({first:t,last:e,table:o}))))))),Yr=(e,t,o,n,r)=>((e,t)=>A(e,(e=>pe(e,t))))(e,r).bind((e=>((e,t,o)=>Pt(e).bind((n=>((e,t,o,n)=>Ko(e,t,ve).bind((t=>{const r=o>0?t.row+t.rowspan-1:t.row,s=n>0?t.column+t.colspan-1:t.column;return Go(e,r+o,s+n).map((e=>e.element))})))(_r(n),e,t,o))))(e,t,o).bind((e=>((e,t)=>at(e,"table").bind((o=>it(o,t).bind((t=>Ur(t,e).bind((e=>e.boxes.map((t=>({boxes:t,start:e.start,finish:e.finish}))))))))))(e,n))))),Jr=(e,t)=>Gr(e,t),Qr=(e,t,o)=>Kr(e,t,o).bind((t=>{const o=t=>ve(e,t),n="thead,tfoot,tbody,table",r=at(t.first,n,o),s=at(t.last,n,o);return r.bind((e=>s.bind((o=>ve(e,o)?((e,t,o)=>((e,t,o)=>Ar(e,t,o).bind((t=>((e,t)=>{let o=!0;const n=h(zr,t);for(let r=t.startRow;r<=t.finishRow;r++)for(let s=t.startCol;s<=t.finishCol;s++)o=o&&Go(e,r,s).exists(n);return o?y.some(t):y.none()})(e,t))))(_r(e),t,o))(t.table,t.first,t.last):y.none()))))})),Xr=f,Zr=e=>{const t=(e,t)=>de(e,t).exists((e=>parseInt(e,10)>1));return e.length>0&&j(e,(e=>t(e,"rowspan")||t(e,"colspan")))?y.some(e):y.none()},es=(e,t,o)=>t.length<=1?y.none():Qr(e,o.firstSelectedSelector,o.lastSelectedSelector).map((e=>({bounds:e,cells:t}))),ts={selected:"data-mce-selected",selectedSelector:"td[data-mce-selected],th[data-mce-selected]",firstSelected:"data-mce-first-selected",firstSelectedSelector:"td[data-mce-first-selected],th[data-mce-first-selected]",lastSelected:"data-mce-last-selected",lastSelectedSelector:"td[data-mce-last-selected],th[data-mce-last-selected]"},os=(e,t,o)=>({element:o,mergable:es(t,e,ts),unmergable:Zr(e),selection:Xr(e)}),ns=e=>(t,o)=>{const n=X(t),r="col"===n||"colgroup"===n?Pt(s=t).bind((e=>Jr(e,ts.firstSelectedSelector))).fold(u(s),(e=>e[0])):t;var s;return mt(r,e,o)},rs=ns("th,td,caption"),ss=ns("th,td"),ls=e=>{return t=e.model.table.getSelectedCells(),O(t,he.fromDom);var t},as=(e,t)=>{e.on("BeforeGetContent",(t=>{const o=o=>{t.preventDefault(),(e=>Pt(e[0]).map((e=>{const t=((e,t)=>{const o=e=>pe(e.element,t),n=He(e),r=$t(n),s=or(e),l=Uo(r),a=((e,t)=>{const o=e.grid.columns;let n=e.grid.rows,r=o,s=0,l=0;const a=[],c=[];return $(e.access,(e=>{if(a.push(e),t(e)){c.push(e);const t=e.row,o=t+e.rowspan-1,a=e.column,i=a+e.colspan-1;ts&&(s=o),al&&(l=i)}})),((e,t,o,n,r,s)=>({minRow:e,minCol:t,maxRow:o,maxCol:n,allCells:r,selectedCells:s}))(n,r,s,l,a,c)})(l,o),c="th:not("+t+"),td:not("+t+")",i=Mt(n,"th,td",(e=>pe(e,c)));k(i,_e),((e,t,o,n)=>{const r=N(e,(e=>"colgroup"!==e.section)),s=t.grid.columns,l=t.grid.rows;for(let e=0;eo.maxRow||ao.maxCol||(Go(t,e,a).filter(n).isNone()?sr(r,l,e):l=!0)}})(r,l,a,o);const m=((e,t,o,n)=>{if(0===n.minCol&&t.grid.columns===n.maxCol+1)return 0;const r=Qn(t,e,o),s=z(r,((e,t)=>e+t),0),l=z(r.slice(n.minCol,n.maxCol+1),((e,t)=>e+t),0),a=l/s*o.pixelWidth()-o.pixelWidth();return o.getCellDelta(a)})(e,$o(e),s,a);return((e,t,o,n)=>{$(o.columns,(e=>{(e.columnt.maxCol)&&_e(e.element)}));const r=N(Lt(e,"tr"),(e=>0===e.dom.childElementCount));k(r,_e),t.minCol!==t.maxCol&&t.minRow!==t.maxRow||k(Lt(e,"th,td"),(e=>{ue(e,"rowspan"),ue(e,"colspan")})),ue(e,Io),ue(e,"data-snooker-col-series"),or(e).adjustTableWidth(n)})(n,a,l,m),n})(e,"[data-mce-selected]");return Or(t),[t]})))(o).each((o=>{t.content="text"===t.format?(e=>O(e,(e=>e.dom.innerText)).join(""))(o):((e,t)=>O(t,(t=>e.selection.serializer.serialize(t.dom,{}))).join(""))(e,o)}))};if(!0===t.selection){const t=(e=>N(ls(e),(e=>pe(e,ts.selectedSelector))))(e);t.length>=1&&o(t)}})),e.on("BeforeSetContent",(o=>{if(!0===o.selection&&!0===o.paste){const n=ls(e);P(n).each((n=>{Pt(n).each((r=>{const s=N(((e,t)=>{const o=document.createElement("div");return o.innerHTML=e,ke(he.fromDom(o))})(o.content),(e=>"meta"!==X(e))),l=le("table");if(1===s.length&&l(s[0])){o.preventDefault();const l=he.fromDom(e.getDoc()),a=Tr(l),c=((e,t,o)=>({element:e,clipboard:t,generators:o}))(n,s[0],a);t.pasteCells(r,c).each((()=>{e.focus()}))}}))}))}}))},cs=(e,t)=>({element:e,offset:t}),is=(e,t,o)=>e.property().isText(t)&&0===e.property().getText(t).trim().length||e.property().isComment(t)?o(t).bind((t=>is(e,t,o).orThunk((()=>y.some(t))))):y.none(),ms=(e,t)=>e.property().isText(t)?e.property().getText(t).length:e.property().children(t).length,ds=(e,t)=>{const o=is(e,t,e.query().prevSibling).getOr(t);if(e.property().isText(o))return cs(o,ms(e,o));const n=e.property().children(o);return n.length>0?ds(e,n[n.length-1]):cs(o,ms(e,o))},us=ds,fs=Pr(),gs=(e,t)=>{if(!Nt(e)){const o=(e=>_n(e).bind((e=>{return t=e,o=["fixed","relative","empty"],y.from(kn.exec(t)).bind((e=>{const t=Number(e[1]),n=e[2];return((e,t)=>R(t,(t=>R(On[t],(t=>e===t)))))(n,o)?y.some({value:t,unit:n}):y.none()}));var t,o})))(e);o.each((o=>{const n=o.value/2;Hn(e,n,o.unit),Hn(t,n,o.unit)}))}},hs=e=>O(e,u(0)),ps=(e,t,o,n,r)=>r(e.slice(0,t)).concat(n).concat(r(e.slice(o))),ws=e=>(t,o,n,r)=>{if(e(n)){const e=Math.max(r,t[o]-Math.abs(n)),s=Math.abs(e-t[o]);return n>=0?s:-s}return n},bs=ws((e=>e<0)),vs=ws(v),ys=()=>{const e=(e,t,o,n)=>{const r=(100+o)/100,s=Math.max(n,(e[t]+o)/r);return O(e,((e,o)=>(o===t?s:e/r)-e))},t=(t,o,n,r,s,l)=>l?e(t,o,r,s):((e,t,o,n,r)=>{const s=bs(e,t,n,r);return ps(e,t,o+1,[s,0],hs)})(t,o,n,r,s);return{resizeTable:(e,t)=>e(t),clampTableDelta:bs,calcLeftEdgeDeltas:t,calcMiddleDeltas:(e,o,n,r,s,l,a)=>t(e,n,r,s,l,a),calcRightEdgeDeltas:(t,o,n,r,s,l)=>{if(l)return e(t,n,r,s);{const e=bs(t,n,r,s);return hs(t.slice(0,n)).concat([e])}},calcRedestributedWidths:(e,t,o,n)=>{if(n){const n=(t+o)/t,r=O(e,(e=>e/n));return{delta:100*n-100,newSizes:r}}return{delta:o,newSizes:e}}}},xs=()=>{const e=(e,t,o,n,r)=>{const s=vs(e,n>=0?o:t,n,r);return ps(e,t,o+1,[s,-s],hs)};return{resizeTable:(e,t,o)=>{o&&e(t)},clampTableDelta:(e,t,o,n,r)=>{if(r){if(o>=0)return o;{const t=z(e,((e,t)=>e+t-n),0);return Math.max(-t,o)}}return bs(e,t,o,n)},calcLeftEdgeDeltas:e,calcMiddleDeltas:(t,o,n,r,s,l)=>e(t,n,r,s,l),calcRightEdgeDeltas:(e,t,o,n,r,s)=>{if(s)return hs(e);{const t=n/e.length;return O(e,u(t))}},calcRedestributedWidths:(e,t,o,n)=>({delta:0,newSizes:e})}},Cs=e=>$o(e).grid,Ss=le("th"),Ts=e=>j(e,(e=>Ss(e.element))),Rs=(e,t)=>e&&t?"sectionCells":e?"section":"cells",Ds=e=>{const t="thead"===e.section,o=dt(Os(e.cells),"th");return"tfoot"===e.section?{type:"footer"}:t||o?{type:"header",subType:Rs(t,o)}:{type:"body"}},Os=e=>{const t=N(e,(e=>Ss(e.element)));return 0===t.length?y.some("td"):t.length===e.length?y.some("th"):y.none()},ks=(e,t,o)=>Ge(o(e.element,t),!0,e.isLocked),Es=(e,t)=>e.section!==t?Ke(e.element,e.cells,t,e.isNew):e,Ns=()=>({transformRow:Es,transformCell:(e,t,o)=>{const n=o(e.element,t),r="td"!==X(n)?((e,t)=>{const o=qe(e,"td");Be(e,o);const n=ke(e);return Me(o,n),_e(e),o})(n):n;return Ge(r,e.isNew,e.isLocked)}}),Bs=()=>({transformRow:Es,transformCell:ks}),zs=()=>({transformRow:(e,t)=>Es(e,"thead"===t?"tbody":t),transformCell:ks}),As=Ns,Ws=Bs,Ls=zs,Ms=()=>({transformRow:f,transformCell:ks}),js=e=>mt(e,"[contenteditable]"),_s=(e,t=!1)=>Ze(e)?e.dom.isContentEditable:js(e).fold(u(t),(e=>"true"===Is(e))),Is=e=>e.dom.contentEditable,Ps=(e,t,o,n)=>{o===n?ue(e,t):ce(e,t,o)},Fs=(e,t,o)=>{F(nt(e,t)).fold((()=>ze(e,o)),(e=>Be(e,o)))},Hs=(e,t)=>{const o=[],n=[],r=e=>O(e,(e=>{e.isNew&&o.push(e.element);const t=e.element;return je(t),k(e.cells,(e=>{e.isNew&&n.push(e.element),Ps(e.element,"colspan",e.colspan,1),Ps(e.element,"rowspan",e.rowspan,1),Ae(t,e.element)})),t})),s=e=>M(e,(e=>O(e.cells,(e=>(Ps(e.element,"span",e.colspan,1),e.element))))),l=(t,o)=>{const n=((e,t)=>{const o=ct(e,t).getOrThunk((()=>{const o=he.fromTag(t,Ce(e).dom);return"thead"===t?Fs(e,"caption,colgroup",o):"colgroup"===t?Fs(e,"caption",o):Ae(e,o),o}));return je(o),o})(e,o),l=("colgroup"===o?s:r)(t);Me(n,l)},a=(t,o)=>{t.length>0?l(t,o):(t=>{ct(e,t).each(_e)})(o)},c=[],i=[],m=[],d=[];return k(t,(e=>{switch(e.section){case"thead":c.push(e);break;case"tbody":i.push(e);break;case"tfoot":m.push(e);break;case"colgroup":d.push(e)}})),a(d,"colgroup"),a(c,"thead"),a(i,"tbody"),a(m,"tfoot"),{newRows:o,newCells:n}},qs=(e,t)=>{if(0===e.length)return 0;const o=e[0];return W(e,(e=>!t(o.element,e.element))).getOr(e.length)},Vs=(e,t)=>{const o=O(e,(e=>O(e.cells,b)));return O(e,((n,r)=>{const s=M(n.cells,((n,s)=>{if(!1===o[r][s]){const m=((e,t,o,n)=>{const r=((e,t)=>e[t])(e,t),s="colgroup"===r.section,l=qs(r.cells.slice(o),n),a=s?1:qs(((e,t)=>O(e,(e=>Wo(e,t))))(e.slice(t),o),n);return{colspan:l,rowspan:a}})(e,r,s,t);return((e,t,n,r)=>{for(let s=e;s({element:e,cells:t,section:o,isNew:n}))(n.element,s,n.section,n.isNew)}))},$s=(e,t,o)=>{const n=[];k(e.colgroups,(r=>{const s=[];for(let n=0;nGe(e.element,o,!1))).getOrThunk((()=>Ge(t.colGap(),!0,!1)));s.push(r)}n.push(Ke(r.element,s,"colgroup",o))}));for(let r=0;rGe(e.element,o,e.isLocked))).getOrThunk((()=>Ge(t.gap(),!0,!1)));s.push(l)}const l=e.all[r],a=Ke(l.element,s,l.section,o);n.push(a)}return n},Us=e=>Vs(e,ve),Gs=(e,t)=>H(e.all,(e=>A(e.cells,(e=>ve(t,e.element))))),Ks=(e,t,o)=>{const n=O(t.selection,(t=>jt(t).bind((t=>Gs(e,t))).filter(o))),r=ut(n);return ft(r.length>0,r)},Ys=(e,t,o,n,r)=>(s,l,a,c)=>{const i=$o(s),m=y.from(null==c?void 0:c.section).getOrThunk(Ms);return t(i,l).map((t=>{const o=((e,t)=>$s(e,t,!1))(i,a),n=e(o,t,ve,r(a),m),s=Fo(n.grid);return{info:t,grid:Us(n.grid),cursor:n.cursor,lockedColumns:s}})).bind((e=>{const t=Hs(s,e.grid),r=y.from(null==c?void 0:c.sizing).getOrThunk((()=>or(s))),l=y.from(null==c?void 0:c.resize).getOrThunk(xs);return o(s,e.grid,e.info,{sizing:r,resize:l,section:m}),n(s),ue(s,Io),e.lockedColumns.length>0&&ce(s,Io,e.lockedColumns.join(",")),y.some({cursor:e.cursor,newRows:t.newRows,newCells:t.newCells})}))},Js=(e,t)=>Ks(e,t,v).map((e=>({cells:e,generators:t.generators,clipboard:t.clipboard}))),Qs=(e,t)=>Ks(e,t,v),Xs=(e,t)=>Ks(e,t,(e=>!e.isLocked)),Zs=(e,t)=>j(t,(t=>((e,t)=>Gs(e,t).exists((e=>!e.isLocked)))(e,t))),el=(e,t,o,n)=>{const r=jo(e).rows;let s=!0;for(let e=0;e{const t=t=>t(e),o=u(e),n=()=>r,r={tag:!0,inner:e,fold:(t,o)=>o(e),isValue:v,isError:b,map:t=>nl.value(t(e)),mapError:n,bind:t,exists:t,forall:t,getOr:o,or:n,getOrThunk:o,orThunk:n,getOrDie:o,each:t=>{t(e)},toOptional:()=>y.some(e)};return r},ol=e=>{const t=()=>o,o={tag:!1,inner:e,fold:(t,o)=>t(e),isValue:b,isError:v,map:t,mapError:t=>nl.error(t(e)),bind:t,exists:b,forall:v,getOr:f,or:f,getOrThunk:w,orThunk:w,getOrDie:(n=String(e),()=>{throw new Error(n)}),each:d,toOptional:y.none};var n;return o},nl={value:tl,error:ol,fromOption:(e,t)=>e.fold((()=>ol(t)),tl)},rl=(e,t)=>({rowDelta:0,colDelta:Mo(e[0])-Mo(t[0])}),sl=(e,t)=>({rowDelta:e.length-t.length,colDelta:0}),ll=(e,t,o,n)=>{const r="colgroup"===t.section?o.col:o.cell;return D(e,(e=>Ge(r(),!0,n(e))))},al=(e,t,o,n)=>{const r=e[e.length-1];return e.concat(D(t,(()=>{const e="colgroup"===r.section?o.colgroup:o.row,t=_o(r,e,f),s=ll(t.cells.length,t,o,(e=>Q(n,e.toString())));return Ao(t,s)})))},cl=(e,t,o,n)=>O(e,(e=>{const r=ll(t,e,o,b);return No(e,n,r)})),il=(e,t,o)=>{const n=t.colDelta<0?cl:f,r=t.rowDelta<0?al:f,s=Fo(e),l=Mo(e[0]),a=R(s,(e=>e===l-1)),c=n(e,Math.abs(t.colDelta),o,a?l-1:l),i=Fo(c);return r(c,Math.abs(t.rowDelta),o,_(i,v))},ml=(e,t,o,n)=>{const r=h(n,Wo(e[t],o).element),s=e[t];return e.length>1&&Mo(s)>1&&(o>0&&r(Lo(s,o-1))||o0&&r(Lo(e[t-1],o))||tN(o,(o=>o>=e.column&&o<=Mo(t[0])+e.column)),ul=(e,t,o,n,r)=>{((e,t,o,n)=>{t>0&&t{const r=e.cells[t-1],s=e.cells[t];o(s.element,r.element)&&zo(e,t,Ge(n(),!0,s.isLocked))}))})(t,e,r,n.cell);const s=sl(o,t),l=il(o,s,n),a=sl(t,l),c=il(t,a,n);return O(c,((t,o)=>No(t,e,l[o].cells)))},fl=(e,t,o,n,r)=>{((e,t,o,n)=>{const r=jo(e).rows;if(t>0&&tz(e,((e,o)=>R(e,(e=>t(e.element,o.element)))?e:e.concat([o])),[]))(r[t-1].cells,o);k(e,(e=>{let s=y.none();for(let l=t;l{zo(a,t,Ge(e,!0,c.isLocked))})))}}))}})(t,e,r,n.cell);const s=Fo(t),l=rl(t,o),a={...l,colDelta:l.colDelta-s.length},c=il(t,a,n),{cols:i,rows:m}=jo(c),d=Fo(c),u=rl(o,t),f={...u,colDelta:u.colDelta+d.length},g=(p=n,w=d,O(o,(e=>z(w,((t,o)=>{const n=ll(1,e,p,v)[0];return Bo(t,o,n)}),e)))),h=il(g,f,n);var p,w;return[...i,...m.slice(0,e),...h,...m.slice(e,m.length)]},gl=(e,t,o,n,r)=>{const{rows:s,cols:l}=jo(e),a=s.slice(0,t),c=s.slice(t);return[...l,...a,((e,t,o,n)=>_o(e,(e=>n(e,o)),t))(s[o],((e,o)=>t>0&&tO(e,(e=>{const s=t>0&&t{if("colgroup"!==o&&n)return Wo(e,t);{const t=Wo(e,r);return Ge(l(t.element,s),!0,!1)}})(e,t,e.section,s,o,n,r);return Bo(e,t,l)})),pl=(e,t,o,n)=>((e,t,o,n)=>void 0!==Lo(e[t],o)&&t>0&&n(Lo(e[t-1],o),Lo(e[t],o)))(e,t,o,n)||((e,t,o)=>t>0&&o(Lo(e,t-1),Lo(e,t)))(e[t],o,n),wl=(e,t,o,n)=>{const r=e=>(e=>"row"===e?Bt(t):Nt(t))(e)?`${e}group`:e;return e?Ss(t)?r(o):null:n&&Ss(t)?r("row"===o?"col":"row"):null},bl=(e,t,o)=>Ge(o(e.element,t),!0,e.isLocked),vl=(e,t,o,n,r,s,l)=>O(e,((e,a)=>((e,c)=>{const i=e.cells,m=O(i,((e,c)=>{if((e=>R(t,(t=>o(e.element,t.element))))(e)){const t=l(e,a,c)?r(e,o,n):e;return s(t,a,c).each((e=>{var o,n;o=t.element,n={scope:y.from(e)},$(n,((e,t)=>{e.fold((()=>{ue(o,t)}),(e=>{ae(o.dom,t,e)}))}))})),t}return e}));return Ke(e.element,m,e.section,e.isNew)})(e))),yl=(e,t,o)=>M(e,((n,r)=>pl(e,r,t,o)?[]:[Wo(n,t)])),xl=(e,t,o,n,r)=>{const s=jo(e).rows,l=M(t,(e=>yl(s,e,n))),a=O(s,(e=>Ts(e.cells))),c=((e,t)=>j(t,f)&&Ts(e)?v:(e,o,n)=>!("th"===X(e.element)&&t[o]))(l,a),i=((e,t)=>(o,n)=>y.some(wl(e,o.element,"row",t[n])))(o,a);return vl(e,l,n,r,bl,i,c)},Cl=(e,t,o,n)=>{const r=jo(e).rows,s=O(t,(e=>Wo(r[e.row],e.column)));return vl(e,s,o,n,bl,y.none,v)},Sl=e=>{if(!s(e))throw new Error("cases must be an array");if(0===e.length)throw new Error("there must be at least one case");const t=[],o={};return k(e,((n,r)=>{const l=q(n);if(1!==l.length)throw new Error("one and only one name per case");const a=l[0],c=n[a];if(void 0!==o[a])throw new Error("duplicate key detected:"+a);if("cata"===a)throw new Error("cannot have a case named cata (sorry)");if(!s(c))throw new Error("case arguments must be an array");t.push(a),o[a]=(...o)=>{const n=o.length;if(n!==c.length)throw new Error("Wrong number of arguments to case "+a+". Expected "+c.length+" ("+c+"), got "+n);return{fold:(...t)=>{if(t.length!==e.length)throw new Error("Wrong number of arguments to fold. Expected "+e.length+", got "+t.length);return t[r].apply(null,o)},match:e=>{const n=q(e);if(t.length!==n.length)throw new Error("Wrong number of arguments to match. Expected: "+t.join(",")+"\nActual: "+n.join(","));if(!j(t,(e=>T(n,e))))throw new Error("Not all branches were specified when using match. Specified: "+n.join(", ")+"\nRequired: "+t.join(", "));return e[a].apply(null,o)},log:e=>{console.log(e,{constructors:t,constructor:a,params:o})}}}})),o},Tl={...Sl([{none:[]},{only:["index"]},{left:["index","next"]},{middle:["prev","index","next"]},{right:["prev","index"]}])},Rl=(e,t,o)=>{let n=0;for(let r=e;r{const o=Jo(e);return O(o,(e=>{const o=Rl(e.row,e.row+e.rowspan,t);return{element:e.element,height:o,rowspan:e.rowspan}}))},Ol=(e,t,o)=>{const n=((e,t)=>Xo(e)?((e,t)=>{const o=Qo(e);return O(o,((e,o)=>({element:e.element,width:t[o],colspan:e.colspan})))})(e,t):((e,t)=>{const o=Jo(e);return O(o,(e=>{const o=Rl(e.column,e.column+e.colspan,t);return{element:e.element,width:o,colspan:e.colspan}}))})(e,t))(e,t);k(n,(e=>{o.setElementWidth(e.element,e.width)}))},kl=(e,t,o,n,r)=>{const s=$o(e),l=r.getCellDelta(t),a=r.getWidths(s,r),c=o===s.grid.columns-1,i=n.clampTableDelta(a,o,l,r.minCellWidth(),c),m=((e,t,o,n,r)=>{const s=e.slice(0),l=((e,t)=>0===e.length?Tl.none():1===e.length?Tl.only(0):0===t?Tl.left(0,1):t===e.length-1?Tl.right(t-1,t):t>0&&tn.singleColumnWidth(s[e],o)),((e,t)=>r.calcLeftEdgeDeltas(s,e,t,o,n.minCellWidth(),n.isRelative)),((e,t,l)=>r.calcMiddleDeltas(s,e,t,l,o,n.minCellWidth(),n.isRelative)),((e,t)=>r.calcRightEdgeDeltas(s,e,t,o,n.minCellWidth(),n.isRelative)))})(a,o,i,r,n),d=O(m,((e,t)=>e+a[t]));Ol(s,d,r),n.resizeTable(r.adjustTableWidth,i,c)},El=e=>z(e,((e,t)=>R(e,(e=>e.column===t.column))?e:e.concat([t])),[]).sort(((e,t)=>e.column-t.column)),Nl=le("col"),Bl=le("colgroup"),zl=e=>"tr"===X(e)||Bl(e),Al=e=>({element:e,colspan:kt(e,"colspan",1),rowspan:kt(e,"rowspan",1)}),Wl=e=>de(e,"scope").map((e=>e.substr(0,3))),Ll=(e,t=Al)=>{const o=o=>{if(zl(o))return Bl((r={element:o}).element)?e.colgroup(r):e.row(r);{const r=o,s=(t=>Nl(t.element)?e.col(t):e.cell(t))(t(r));return n=y.some({item:r,replacement:s}),s}var r};let n=y.none();return{getOrInit:(e,t)=>n.fold((()=>o(e)),(n=>t(e,n.item)?n.replacement:o(e)))}},Ml=e=>t=>{const o=[],n=n=>{const r="td"===e?{scope:null}:{},s=t.replace(n,e,r);return o.push({item:n,sub:s}),s};return{replaceOrInit:(e,t)=>{if(zl(e)||Nl(e))return e;{const r=e;return((e,t)=>A(o,(o=>t(o.item,e))))(r,t).fold((()=>n(r)),(o=>t(e,o.item)?o.sub:n(r)))}}}},jl=e=>({unmerge:t=>{const o=Wl(t);return o.each((e=>ce(t,"scope",e))),()=>{const n=e.cell({element:t,colspan:1,rowspan:1});return Ot(n,"width"),Ot(t,"width"),o.each((e=>ce(n,"scope",e))),n}},merge:e=>(Ot(e[0],"width"),(()=>{const t=ut(O(e,Wl));if(0===t.length)return y.none();{const e=t[0],o=["row","col"];return R(t,(t=>t!==e&&T(o,t)))?y.none():y.from(e)}})().fold((()=>ue(e[0],"scope")),(t=>ce(e[0],"scope",t+"group"))),u(e[0]))}),_l=["body","p","div","article","aside","figcaption","figure","footer","header","nav","section","ol","ul","table","thead","tfoot","tbody","caption","tr","td","th","h1","h2","h3","h4","h5","h6","blockquote","pre","address"],Il=Pr(),Pl=e=>((e,t)=>{const o=e.property().name(t);return T(_l,o)})(Il,e),Fl=e=>((e,t)=>{const o=e.property().name(t);return T(["ol","ul"],o)})(Il,e),Hl=e=>{const t=le("br"),o=e=>gr(e).bind((o=>{const n=Oe(o).map((e=>!!Pl(e)||!!((e,t)=>T(["br","img","hr","input"],e.property().name(t)))(Il,e)&&"img"!==X(e))).getOr(!1);return Te(o).map((r=>{return!0===n||("li"===X(s=r)||lt(s,Fl).isSome())||t(o)||Pl(r)&&!ve(e,r)?[]:[he.fromTag("br")];var s}))})).getOr([]),n=(()=>{const n=M(e,(e=>{const n=ke(e);return(e=>j(e,(e=>t(e)||ne(e)&&0===ar(e).trim().length)))(n)?[]:n.concat(o(e))}));return 0===n.length?[he.fromTag("br")]:n})();je(e[0]),Me(e[0],n)},ql=e=>_s(e,!0),Vl=e=>{0===_t(e).length&&_e(e)},$l=(e,t)=>({grid:e,cursor:t}),Ul=(e,t,o)=>{const n=((e,t,o)=>{var n,r;const s=jo(e).rows;return y.from(null===(r=null===(n=s[t])||void 0===n?void 0:n.cells[o])||void 0===r?void 0:r.element).filter(ql).orThunk((()=>(e=>H(e,(e=>H(e.cells,(e=>{const t=e.element;return ft(ql(t),t)})))))(s)))})(e,t,o);return $l(e,n)},Gl=e=>z(e,((e,t)=>R(e,(e=>e.row===t.row))?e:e.concat([t])),[]).sort(((e,t)=>e.row-t.row)),Kl=(e,t)=>(o,n,r,s,l)=>{const a=Gl(n),c=O(a,(e=>e.row)),i=((e,t,o,n,r,s,l)=>{const{cols:a,rows:c}=jo(e),i=c[t[0]],m=M(t,(e=>((e,t,o)=>{const n=e[t];return M(n.cells,((n,r)=>pl(e,t,r,o)?[]:[n]))})(c,e,r))),d=O(i.cells,((e,t)=>Ts(yl(c,t,r)))),u=[...c];k(t,(e=>{u[e]=l.transformRow(c[e],o)}));const g=[...a,...u],h=((e,t)=>j(t,f)&&Ts(e.cells)?v:(e,o,n)=>!("th"===X(e.element)&&t[n]))(i,d),p=((e,t)=>(o,n,r)=>y.some(wl(e,o.element,"col",t[r])))(n,d);return vl(g,m,r,s,l.transformCell,p,h)})(o,c,e,t,r,s.replaceOrInit,l);return Ul(i,n[0].row,n[0].column)},Yl=Kl("thead",!0),Jl=Kl("tbody",!1),Ql=Kl("tfoot",!1),Xl=(e,t,o)=>{const n=((e,t)=>qt(e,(()=>t)))(e,o.section),r=Uo(n);return $s(r,t,!0)},Zl=(e,t,o,n)=>((e,t,o,n)=>{const r=Uo(t),s=n.getWidths(r,n);Ol(r,s,n)})(0,t,0,n.sizing),ea=(e,t,o,n)=>((e,t,o,n,r)=>{const s=Uo(t),l=n.getWidths(s,n),a=n.pixelWidth(),{newSizes:c,delta:i}=r.calcRedestributedWidths(l,a,o.pixelDelta,n.isRelative);Ol(s,c,n),n.adjustTableWidth(i)})(0,t,o,n.sizing,n.resize),ta=(e,t)=>R(t,(e=>0===e.column&&e.isLocked)),oa=(e,t)=>R(t,(t=>t.column+t.colspan>=e.grid.columns&&t.isLocked)),na=(e,t)=>{const o=en(e),n=El(t);return z(n,((e,t)=>e+o[t.column].map(ko).getOr(0)),0)},ra=e=>(t,o)=>Qs(t,o).filter((o=>!(e?ta:oa)(t,o))).map((e=>({details:e,pixelDelta:na(t,e)}))),sa=e=>(t,o)=>Js(t,o).filter((o=>!(e?ta:oa)(t,o.cells))),la=Ml("th"),aa=Ml("td"),ca=Ys(((e,t,o,n)=>{const r=t[0].row,s=Gl(t),l=B(s,((e,t)=>({grid:gl(e.grid,r,t.row+e.delta,o,n.getOrInit),delta:e.delta+1})),{grid:e,delta:0}).grid;return Ul(l,r,t[0].column)}),Qs,d,d,Ll),ia=Ys(((e,t,o,n)=>{const r=Gl(t),s=r[r.length-1],l=s.row+s.rowspan,a=B(r,((e,t)=>gl(e,l,t.row,o,n.getOrInit)),e);return Ul(a,l,t[0].column)}),Qs,d,d,Ll),ma=Ys(((e,t,o,n)=>{const r=t.details,s=El(r),l=s[0].column,a=B(s,((e,t)=>({grid:hl(e.grid,l,t.column+e.delta,o,n.getOrInit),delta:e.delta+1})),{grid:e,delta:0}).grid;return Ul(a,r[0].row,l)}),ra(!0),ea,d,Ll),da=Ys(((e,t,o,n)=>{const r=t.details,s=r[r.length-1],l=s.column+s.colspan,a=El(r),c=B(a,((e,t)=>hl(e,l,t.column,o,n.getOrInit)),e);return Ul(c,r[0].row,l)}),ra(!1),ea,d,Ll),ua=Ys(((e,t,o,n)=>{const r=El(t.details),s=((e,t)=>M(e,(e=>{const o=e.cells,n=B(t,((e,t)=>t>=0&&t0?[Ke(e.element,n,e.section,e.isNew)]:[]})))(e,O(r,(e=>e.column))),l=s.length>0?s[0].cells.length-1:0;return Ul(s,r[0].row,Math.min(r[0].column,l))}),((e,t)=>Xs(e,t).map((t=>({details:t,pixelDelta:-na(e,t)})))),ea,Vl,Ll),fa=Ys(((e,t,o,n)=>{const r=Gl(t),s=((e,t,o)=>{const{rows:n,cols:r}=jo(e);return[...r,...n.slice(0,t),...n.slice(o+1)]})(e,r[0].row,r[r.length-1].row),l=s.length>0?s.length-1:0;return Ul(s,Math.min(t[0].row,l),t[0].column)}),Qs,d,Vl,Ll),ga=Ys(((e,t,o,n)=>{const r=El(t),s=O(r,(e=>e.column)),l=xl(e,s,!0,o,n.replaceOrInit);return Ul(l,t[0].row,t[0].column)}),Xs,d,d,la),ha=Ys(((e,t,o,n)=>{const r=El(t),s=O(r,(e=>e.column)),l=xl(e,s,!1,o,n.replaceOrInit);return Ul(l,t[0].row,t[0].column)}),Xs,d,d,aa),pa=Ys(Yl,Xs,d,d,la),wa=Ys(Jl,Xs,d,d,aa),ba=Ys(Ql,Xs,d,d,aa),va=Ys(((e,t,o,n)=>{const r=Cl(e,t,o,n.replaceOrInit);return Ul(r,t[0].row,t[0].column)}),Xs,d,d,la),ya=Ys(((e,t,o,n)=>{const r=Cl(e,t,o,n.replaceOrInit);return Ul(r,t[0].row,t[0].column)}),Xs,d,d,aa),xa=Ys(((e,t,o,n)=>{const r=t.cells;Hl(r);const s=((e,t,o,n)=>{const r=jo(e).rows;if(0===r.length)return e;for(let e=t.startRow;e<=t.finishRow;e++)for(let o=t.startCol;o<=t.finishCol;o++){const t=r[e],s=Wo(t,o).isLocked;zo(t,o,Ge(n(),!1,s))}return e})(e,t.bounds,0,n.merge(r));return $l(s,y.from(r[0]))}),((e,t)=>((e,t)=>t.mergable)(0,t).filter((t=>Zs(e,t.cells)))),Zl,d,jl),Ca=Ys(((e,t,o,n)=>{const r=B(t,((e,t)=>el(e,t,o,n.unmerge(t))),e);return $l(r,y.from(t[0]))}),((e,t)=>((e,t)=>t.unmergable)(0,t).filter((t=>Zs(e,t)))),Zl,d,jl),Sa=Ys(((e,t,o,n)=>{const r=((e,t)=>{const o=$o(e);return $s(o,t,!0)})(t.clipboard,t.generators);var s,l;return((e,t,o,n,r)=>{const s=Fo(t),l=((e,t,o)=>{const n=Mo(t[0]),r=jo(t).cols.length+e.row,s=D(n-e.column,(t=>t+e.column));return{row:r,column:A(s,(e=>j(o,(t=>t!==e)))).getOr(n-1)}})(e,t,s),a=jo(o).rows,c=dl(l,a,s),i=((e,t,o)=>{if(e.row>=t.length||e.column>Mo(t[0]))return nl.error("invalid start address out of table bounds, row: "+e.row+", column: "+e.column);const n=t.slice(e.row),r=n[0].cells.slice(e.column),s=Mo(o[0]),l=o.length;return nl.value({rowDelta:n.length-l,colDelta:r.length-s})})(l,t,a);return i.map((e=>{const o={...e,colDelta:e.colDelta-c.length},s=il(t,o,n),i=Fo(s),m=dl(l,a,i);return((e,t,o,n,r,s)=>{const l=e.row,a=e.column,c=l+o.length,i=a+Mo(o[0])+s.length,m=_(s,v);for(let e=l;e$l(e,y.some(t.element))),(e=>Ul(e,t.row,t.column)))}),((e,t)=>jt(t.element).bind((o=>Gs(e,o).map((e=>({...e,generators:t.generators,clipboard:t.clipboard})))))),Zl,d,Ll),Ta=Ys(((e,t,o,n)=>{const r=jo(e).rows,s=t.cells[0].column,l=r[t.cells[0].row],a=Xl(t.clipboard,t.generators,l),c=ul(s,e,a,t.generators,o);return Ul(c,t.cells[0].row,t.cells[0].column)}),sa(!0),d,d,Ll),Ra=Ys(((e,t,o,n)=>{const r=jo(e).rows,s=t.cells[t.cells.length-1].column+t.cells[t.cells.length-1].colspan,l=r[t.cells[0].row],a=Xl(t.clipboard,t.generators,l),c=ul(s,e,a,t.generators,o);return Ul(c,t.cells[0].row,t.cells[0].column)}),sa(!1),d,d,Ll),Da=Ys(((e,t,o,n)=>{const r=jo(e).rows,s=t.cells[0].row,l=r[s],a=Xl(t.clipboard,t.generators,l),c=fl(s,e,a,t.generators,o);return Ul(c,t.cells[0].row,t.cells[0].column)}),Js,d,d,Ll),Oa=Ys(((e,t,o,n)=>{const r=jo(e).rows,s=t.cells[t.cells.length-1].row+t.cells[t.cells.length-1].rowspan,l=r[t.cells[0].row],a=Xl(t.clipboard,t.generators,l),c=fl(s,e,a,t.generators,o);return Ul(c,t.cells[0].row,t.cells[0].column)}),Js,d,d,Ll),ka=(e,t)=>{const o=$o(e);return Qs(o,t).bind((e=>{const t=e[e.length-1],n=e[0].column,r=t.column+t.colspan,s=L(O(o.all,(e=>N(e.cells,(e=>e.column>=n&&e.column{const o=$o(e);return Qs(o,t).bind(Os).getOr("")},Na=(e,t)=>{const o=$o(e);return Qs(o,t).bind((e=>{const t=e[e.length-1],n=e[0].row,r=t.row+t.rowspan;return(e=>{const t=O(e,(e=>Ds(e).type)),o=T(t,"header"),n=T(t,"footer");if(o||n){const e=T(t,"body");return!o||e||n?o||e||!n?y.none():y.some("footer"):y.some("header")}return y.some("body")})(o.all.slice(n,r))})).getOr("")},Ba=(e,t)=>e.dispatch("NewRow",{node:t}),za=(e,t)=>e.dispatch("NewCell",{node:t}),Aa=(e,t,o)=>{e.dispatch("TableModified",{...o,table:t})},Wa={structure:!1,style:!0},La={structure:!0,style:!1},Ma={structure:!0,style:!0},ja=e=>t=>t.options.get(e),_a=e=>y.from(e.options.get("table_clone_elements")),Ia=ja("table_header_type"),Pa=ja("table_column_resizing"),Fa=e=>"preservetable"===Pa(e),Ha=e=>"resizetable"===Pa(e),qa=ja("table_sizing_mode"),Va=e=>"relative"===qa(e),$a=e=>"fixed"===qa(e),Ua=e=>"responsive"===qa(e),Ga=ja("table_resize_bars"),Ka=ja("table_default_attributes"),Ya=ja("table_use_colgroups"),Ja=(e,t)=>Va(e)?rr(t):$a(e)?nr(t):or(t),Qa=(e,t,o)=>{const n=e=>"table"===X(Rr(e)),r=_a(e),s=Ha(e)?d:gs,l=t=>{switch(Ia(e)){case"section":return As();case"sectionCells":return Ws();case"cells":return Ls();default:return((e,t)=>{var o;switch((o=$o(e),H(o.all,(e=>{const t=Ds(e);return"header"===t.type?y.from(t.subType):y.none()}))).getOr(t)){case"section":return Ns();case"sectionCells":return Bs();case"cells":return zs()}})(t,"section")}},a=(n,s,a,c)=>(i,m,d=!1)=>{Or(i);const u=he.fromDom(e.getDoc()),f=Sr(a,u,r),g={sizing:Ja(e,i),resize:Ha(e)?ys():xs(),section:l(i)};return s(i)?n(i,m,f,g).bind((n=>{t.refresh(i.dom),k(n.newRows,(t=>{Ba(e,t.dom)})),k(n.newCells,(t=>{za(e,t.dom)}));const r=((t,n)=>n.cursor.fold((()=>{const n=_t(t);return P(n).filter(Ze).map((n=>{o.clearSelectedCells(t.dom);const r=e.dom.createRng();return r.selectNode(n.dom),e.selection.setRng(r),ce(n,"data-mce-selected","1"),r}))}),(n=>{const r=us(fs,n),s=e.dom.createRng();return s.setStart(r.element.dom,r.offset),s.setEnd(r.element.dom,r.offset),e.selection.setRng(s),o.clearSelectedCells(t.dom),y.some(s)})))(i,n);return Ze(i)&&(Or(i),d||Aa(e,i.dom,c)),r.map((e=>({rng:e,effect:c})))})):y.none()},c=a(fa,(t=>!1===n(e)||Cs(t).rows>1),d,La),i=a(ua,(t=>!1===n(e)||Cs(t).columns>1),d,La);return{deleteRow:c,deleteColumn:i,insertRowsBefore:a(ca,v,d,La),insertRowsAfter:a(ia,v,d,La),insertColumnsBefore:a(ma,v,s,La),insertColumnsAfter:a(da,v,s,La),mergeCells:a(xa,v,d,La),unmergeCells:a(Ca,v,d,La),pasteColsBefore:a(Ta,v,d,La),pasteColsAfter:a(Ra,v,d,La),pasteRowsBefore:a(Da,v,d,La),pasteRowsAfter:a(Oa,v,d,La),pasteCells:a(Sa,v,d,Ma),makeCellsHeader:a(va,v,d,La),unmakeCellsHeader:a(ya,v,d,La),makeColumnsHeader:a(ga,v,d,La),unmakeColumnsHeader:a(ha,v,d,La),makeRowsHeader:a(pa,v,d,La),makeRowsBody:a(wa,v,d,La),makeRowsFooter:a(ba,v,d,La),getTableRowType:Na,getTableCellType:Ea,getTableColType:ka}},Xa=(e,t,o)=>{const n=kt(e,t,1);1===o||n<=1?ue(e,t):ce(e,t,Math.min(o,n))},Za=Sl([{invalid:["raw"]},{pixels:["value"]},{percent:["value"]}]),ec=(e,t,o)=>{const n=o.substring(0,o.length-e.length),r=parseFloat(n);return n===r.toString()?t(r):Za.invalid(o)},tc={...Za,from:e=>wt(e,"%")?ec("%",Za.percent,e):wt(e,"px")?ec("px",Za.pixels,e):Za.invalid(e)},oc=(e,t,o)=>{const n=tc.from(o),r=j(e,(e=>"0px"===e))?((e,t)=>{const o=e.fold((()=>u("")),(e=>u(e/t+"px")),(()=>u(100/t+"%")));return D(t,o)})(n,e.length):((e,t,o)=>e.fold((()=>t),(e=>((e,t,o)=>{const n=o/t;return O(e,(e=>tc.from(e).fold((()=>e),(e=>e*n+"px"),(e=>e/100*o+"px"))))})(t,o,e)),(e=>((e,t)=>O(e,(e=>tc.from(e).fold((()=>e),(e=>e/t*100+"%"),(e=>e+"%")))))(t,o))))(n,e,t);return sc(r)},nc=(e,t)=>0===e.length?t:B(e,((e,t)=>tc.from(t).fold(u(0),f,f)+e),0),rc=(e,t)=>tc.from(e).fold(u(e),(e=>e+t+"px"),(e=>e+t+"%")),sc=e=>{if(0===e.length)return e;const t=B(e,((e,t)=>{const o=tc.from(t).fold((()=>({value:t,remainder:0})),(e=>((e,t)=>{const o=Math.floor(e);return{value:o+"px",remainder:e-o}})(e)),(e=>({value:e+"%",remainder:0})));return{output:[o.value].concat(e.output),remainder:e.remainder+o.remainder}}),{output:[],remainder:0}),o=t.output;return o.slice(0,o.length-1).concat([rc(o[o.length-1],Math.round(t.remainder))])},lc=tc.from,ac=e=>lc(e).fold(u("px"),u("px"),u("%")),cc=(e,t,o)=>{const n=$o(e),r=n.all,s=Jo(n),l=Qo(n);t.each((t=>{const o=ac(t),r=Oo(e),a=((e,t)=>Yn(e,t,Un,Jn))(n,e),c=oc(a,r,t);Xo(n)?((e,t,o)=>{k(t,((t,n)=>{const r=nc([e[n]],At());Ct(t.element,"width",r+o)}))})(c,l,o):((e,t,o)=>{k(t,(t=>{const n=e.slice(t.column,t.colspan+t.column),r=nc(n,At());Ct(t.element,"width",r+o)}))})(c,s,o),Ct(e,"width",t)})),o.each((t=>{const o=ac(t),l=ln(e),a=((e,t,o)=>Xn(e,t,o,Gn,Jn))(n,e,Tn);((e,t,o,n)=>{k(o,(t=>{const o=e.slice(t.row,t.rowspan+t.row),r=nc(o,Wt());Ct(t.element,"height",r+n)})),k(t,((t,o)=>{Ct(t.element,"height",e[o])}))})(oc(a,l,t),r,s,o),Ct(e,"height",t)}))},ic=e=>_n(e).exists((e=>En.test(e))),mc=e=>_n(e).exists((e=>Nn.test(e))),dc=e=>_n(e).isNone(),uc=e=>{ue(e,"width")},fc=e=>{const t=qn(e);cc(e,y.some(t),y.none()),uc(e)},gc=e=>{const t=(e=>Oo(e)+"px")(e);cc(e,y.some(t),y.none()),uc(e)},hc=e=>{Ot(e,"width");const t=It(e),o=t.length>0?t:_t(e);k(o,(e=>{Ot(e,"width"),uc(e)})),uc(e)},pc={styles:{"border-collapse":"collapse",width:"100%"},attributes:{border:"1"},colGroups:!1},wc=(e,t,o,n)=>D(e,(e=>((e,t,o,n)=>{const r=he.fromTag("tr");for(let s=0;s{e.selection.select(t.dom,!0),e.selection.collapse(!0)},vc=(e,t,o,r,s)=>{const l=(e=>{const t=e.options,o=t.get("table_default_styles");return t.isSet("table_default_styles")?o:((e,t)=>{var o;if($a(e)){const n=e.dom,r=null!==(o=n.getParent(e.selection.getStart(),n.isBlock))&&void 0!==o?o:e.getBody(),s=Eo(he.fromDom(r));return{...t,width:s+"px"}}return Ua(e)?K(t,((e,t)=>"width"!==t)):t})(e,o)})(e),a={styles:l,attributes:Ka(e),colGroups:Ya(e)};return e.undoManager.ignore((()=>{const n=((e,t,o,n,r,s=pc)=>{const l=he.fromTag("table"),a="cells"!==r;St(l,s.styles),ie(l,s.attributes),s.colGroups&&Ae(l,(e=>{const t=he.fromTag("colgroup");return D(e,(()=>Ae(t,he.fromTag("col")))),t})(t));const c=Math.min(e,o);if(a&&o>0){const e=he.fromTag("thead");Ae(l,e);const s=wc(o,t,"sectionCells"===r?c:0,n);Me(e,s)}const i=he.fromTag("tbody");Ae(l,i);const m=wc(a?e-c:e,t,a?0:o,n);return Me(i,m),l})(o,t,s,r,Ia(e),a);ce(n,"data-mce-id","__mce");const l=(e=>{const t=he.fromTag("div"),o=he.fromDom(e.dom.cloneNode(!0));return Ae(t,o),(e=>e.dom.innerHTML)(t)})(n);e.insertContent(l),e.addVisual()})),it(Rr(e),'table[data-mce-id="__mce"]').map((t=>($a(e)?gc(t):Ua(e)?hc(t):(Va(e)||(e=>n(e)&&-1!==e.indexOf("%"))(l.width))&&fc(t),Or(t),ue(t,"data-mce-id"),((e,t)=>{k(rt(t,"tr"),(t=>{Ba(e,t.dom),k(rt(t,"th,td"),(t=>{za(e,t.dom)}))}))})(e,t),((e,t)=>{it(t,"td,th").each(h(bc,e))})(e,t),t.dom))).getOr(null)};var yc=tinymce.util.Tools.resolve("tinymce.FakeClipboard");const xc="x-tinymce/dom-table-",Cc=xc+"rows",Sc=xc+"columns",Tc=e=>{const t=yc.FakeClipboardItem(e);yc.write([t])},Rc=e=>{var t;const o=null!==(t=yc.read())&&void 0!==t?t:[];return H(o,(t=>y.from(t.getType(e))))},Dc=e=>{Rc(e).isSome()&&yc.clear()},Oc=e=>{e.fold(Ec,(e=>Tc({[Cc]:e})))},kc=()=>Rc(Cc),Ec=()=>Dc(Cc),Nc=e=>{e.fold(zc,(e=>Tc({[Sc]:e})))},Bc=()=>Rc(Sc),zc=()=>Dc(Sc),Ac=e=>rs(kr(e),Dr(e)),Wc=(e,t)=>{const o=Dr(e),s=e=>Pt(e,o),l=t=>(e=>ss(kr(e),Dr(e)))(e).bind((e=>s(e).map((o=>t(o,e))))),a=t=>{e.focus()},c=(t,o=!1)=>l(((n,r)=>{const s=os(ls(e),n,r);t(n,s,o).each(a)})),i=()=>l(((t,o)=>((e,t,o)=>{const n=$o(e);return Qs(n,t).bind((e=>{const t=$s(n,o,!1),r=jo(t).rows.slice(e[0].row,e[e.length-1].row+e[e.length-1].rowspan),s=M(r,(e=>{const t=N(e.cells,(e=>!e.isLocked));return t.length>0?[{...e,cells:t}]:[]})),l=Us(s);return ft(l.length>0,l)})).map((e=>O(e,(e=>{const t=Fe(e.element);return k(e.cells,(e=>{const o=He(e.element);Ps(o,"colspan",e.colspan,1),Ps(o,"rowspan",e.rowspan,1),Ae(t,o)})),t}))))})(t,os(ls(e),t,o),Sr(d,he.fromDom(e.getDoc()),y.none())))),u=()=>l(((t,o)=>((e,t)=>{const o=$o(e);return Xs(o,t).map((e=>{const t=e[e.length-1],n=e[0].column,r=t.column+t.colspan,s=((e,t,o)=>{if(Xo(e)){const n=N(Qo(e),(e=>e.column>=t&&e.column{const n=He(e.element);return Xa(n,"span",o-t),n})),s=he.fromTag("colgroup");return Me(s,r),[s]}return[]})(o,n,r),l=((e,t,o)=>O(e.all,(e=>{const n=N(e.cells,(e=>e.column>=t&&e.column{const n=He(e.element);return Xa(n,"colspan",o-t),n})),s=he.fromTag("tr");return Me(s,r),s})))(o,n,r);return[...s,...l]}))})(t,os(ls(e),t,o)))),f=(t,o)=>o().each((o=>{const n=O(o,(e=>He(e)));l(((o,r)=>{const s=Tr(he.fromDom(e.getDoc())),l=((e,t,o,n)=>({selection:Xr(e),clipboard:o,generators:n}))(ls(e),0,n,s);t(o,l).each(a)}))})),g=e=>(t,o)=>((e,t)=>Q(e,t)?y.from(e.type):y.none())(o,"type").each((t=>{c(e(t),o.no_events)}));$({mceTableSplitCells:()=>c(t.unmergeCells),mceTableMergeCells:()=>c(t.mergeCells),mceTableInsertRowBefore:()=>c(t.insertRowsBefore),mceTableInsertRowAfter:()=>c(t.insertRowsAfter),mceTableInsertColBefore:()=>c(t.insertColumnsBefore),mceTableInsertColAfter:()=>c(t.insertColumnsAfter),mceTableDeleteCol:()=>c(t.deleteColumn),mceTableDeleteRow:()=>c(t.deleteRow),mceTableCutCol:()=>u().each((e=>{Nc(e),c(t.deleteColumn)})),mceTableCutRow:()=>i().each((e=>{Oc(e),c(t.deleteRow)})),mceTableCopyCol:()=>u().each((e=>Nc(e))),mceTableCopyRow:()=>i().each((e=>Oc(e))),mceTablePasteColBefore:()=>f(t.pasteColsBefore,Bc),mceTablePasteColAfter:()=>f(t.pasteColsAfter,Bc),mceTablePasteRowBefore:()=>f(t.pasteRowsBefore,kc),mceTablePasteRowAfter:()=>f(t.pasteRowsAfter,kc),mceTableDelete:()=>Ac(e).each((t=>{Pt(t,o).filter(p(o)).each((t=>{const o=he.fromText("");if(Be(t,o),_e(t),e.dom.isEmpty(e.getBody()))e.setContent(""),e.selection.setCursorLocation();else{const t=e.dom.createRng();t.setStart(o.dom,0),t.setEnd(o.dom,0),e.selection.setRng(t),e.nodeChanged()}}))})),mceTableCellToggleClass:(t,o)=>{l((t=>{const n=ls(e),r=j(n,(t=>e.formatter.match("tablecellclass",{value:o},t.dom))),s=r?e.formatter.remove:e.formatter.apply;k(n,(e=>s("tablecellclass",{value:o},e.dom))),Aa(e,t.dom,Wa)}))},mceTableToggleClass:(t,o)=>{l((t=>{e.formatter.toggle("tableclass",{value:o},t.dom),Aa(e,t.dom,Wa)}))},mceTableToggleCaption:()=>{Ac(e).each((t=>{Pt(t,o).each((o=>{ct(o,"caption").fold((()=>{const t=he.fromTag("caption");Ae(t,he.fromText("Caption")),((e,t,o)=>{Ee(e,0).fold((()=>{Ae(e,t)}),(e=>{Ne(e,t)}))})(o,t),e.selection.setCursorLocation(t.dom,0)}),(n=>{le("caption")(t)&&be("td",o).each((t=>e.selection.setCursorLocation(t.dom,0))),_e(n)})),Aa(e,o.dom,La)}))}))},mceTableSizingMode:(t,n)=>(t=>Ac(e).each((n=>{Ua(e)||$a(e)||Va(e)||Pt(n,o).each((o=>{"relative"!==t||ic(o)?"fixed"!==t||mc(o)?"responsive"!==t||dc(o)||hc(o):gc(o):fc(o),Or(o),Aa(e,o.dom,La)}))})))(n),mceTableCellType:g((e=>"th"===e?t.makeCellsHeader:t.unmakeCellsHeader)),mceTableColType:g((e=>"th"===e?t.makeColumnsHeader:t.unmakeColumnsHeader)),mceTableRowType:g((e=>{switch(e){case"header":return t.makeRowsHeader;case"footer":return t.makeRowsFooter;default:return t.makeRowsBody}}))},((t,o)=>e.addCommand(o,t))),e.addCommand("mceInsertTable",((t,o)=>{((e,t,o,n={})=>{const r=e=>m(e)&&e>0;if(r(t)&&r(o)){const r=n.headerRows||0,s=n.headerColumns||0;return vc(e,o,t,s,r)}console.error("Invalid values for mceInsertTable - rows and columns values are required to insert a table.")})(e,o.rows,o.columns,o.options)})),e.addCommand("mceTableApplyCellStyle",((t,o)=>{const l=e=>"tablecell"+e.toLowerCase().replace("-","");if(!r(o))return;const a=ls(e);if(0===a.length)return;const c=K(o,((t,o)=>e.formatter.has(l(o))&&n(t)));(e=>{for(const t in e)if(V.call(e,t))return!1;return!0})(c)||($(c,((t,o)=>{const n=l(o);k(a,(o=>{""===t?e.formatter.remove(n,{value:null},o.dom,!0):e.formatter.apply(n,{value:t},o.dom)}))})),s(a[0]).each((t=>Aa(e,t.dom,Wa))))}))},Lc=Sl([{before:["element"]},{on:["element","offset"]},{after:["element"]}]),Mc={before:Lc.before,on:Lc.on,after:Lc.after,cata:(e,t,o,n)=>e.fold(t,o,n),getStart:e=>e.fold(f,f,f)},jc=(e,t)=>({selection:e,kill:t}),_c=(e,t)=>{const o=e.document.createRange();return o.selectNode(t.dom),o},Ic=(e,t)=>{const o=e.document.createRange();return Pc(o,t),o},Pc=(e,t)=>e.selectNodeContents(t.dom),Fc=(e,t,o)=>{const n=e.document.createRange();var r;return r=n,t.fold((e=>{r.setStartBefore(e.dom)}),((e,t)=>{r.setStart(e.dom,t)}),(e=>{r.setStartAfter(e.dom)})),((e,t)=>{t.fold((t=>{e.setEndBefore(t.dom)}),((t,o)=>{e.setEnd(t.dom,o)}),(t=>{e.setEndAfter(t.dom)}))})(n,o),n},Hc=(e,t,o,n,r)=>{const s=e.document.createRange();return s.setStart(t.dom,o),s.setEnd(n.dom,r),s},qc=e=>({left:e.left,top:e.top,right:e.right,bottom:e.bottom,width:e.width,height:e.height}),Vc=Sl([{ltr:["start","soffset","finish","foffset"]},{rtl:["start","soffset","finish","foffset"]}]),$c=(e,t,o)=>t(he.fromDom(o.startContainer),o.startOffset,he.fromDom(o.endContainer),o.endOffset),Uc=(e,t)=>{const o=((e,t)=>t.match({domRange:e=>({ltr:u(e),rtl:y.none}),relative:(t,o)=>({ltr:Ut((()=>Fc(e,t,o))),rtl:Ut((()=>y.some(Fc(e,o,t))))}),exact:(t,o,n,r)=>({ltr:Ut((()=>Hc(e,t,o,n,r))),rtl:Ut((()=>y.some(Hc(e,n,r,t,o))))})}))(e,t);return((e,t)=>{const o=t.ltr();return o.collapsed?t.rtl().filter((e=>!1===e.collapsed)).map((e=>Vc.rtl(he.fromDom(e.endContainer),e.endOffset,he.fromDom(e.startContainer),e.startOffset))).getOrThunk((()=>$c(0,Vc.ltr,o))):$c(0,Vc.ltr,o)})(0,o)},Gc=(e,t)=>Uc(e,t).match({ltr:(t,o,n,r)=>{const s=e.document.createRange();return s.setStart(t.dom,o),s.setEnd(n.dom,r),s},rtl:(t,o,n,r)=>{const s=e.document.createRange();return s.setStart(n.dom,r),s.setEnd(t.dom,o),s}});Vc.ltr,Vc.rtl;const Kc=(e,t,o,n)=>({start:e,soffset:t,finish:o,foffset:n}),Yc=(e,t,o,n)=>({start:Mc.on(e,t),finish:Mc.on(o,n)}),Jc=(e,t)=>{const o=Gc(e,t);return Kc(he.fromDom(o.startContainer),o.startOffset,he.fromDom(o.endContainer),o.endOffset)},Qc=Yc,Xc=(e,t,o,n,r)=>ve(o,n)?y.none():Ur(o,n,t).bind((t=>{const n=t.boxes.getOr([]);return n.length>1?(r(e,n,t.start,t.finish),y.some(jc(y.some(Qc(o,0,o,mr(o))),!0))):y.none()})),Zc=(e,t)=>({item:e,mode:t}),ei=(e,t,o,n=ti)=>e.property().parent(t).map((e=>Zc(e,n))),ti=(e,t,o,n=oi)=>o.sibling(e,t).map((e=>Zc(e,n))),oi=(e,t,o,n=oi)=>{const r=e.property().children(t);return o.first(r).map((e=>Zc(e,n)))},ni=[{current:ei,next:ti,fallback:y.none()},{current:ti,next:oi,fallback:y.some(ei)},{current:oi,next:oi,fallback:y.some(ti)}],ri=(e,t,o,n,r=ni)=>A(r,(e=>e.current===o)).bind((o=>o.current(e,t,n,o.next).orThunk((()=>o.fallback.bind((o=>ri(e,t,o,n))))))),si=(e,t,o,n,r,s)=>ri(e,t,n,r).bind((t=>s(t.item)?y.none():o(t.item)?y.some(t.item):si(e,t.item,o,t.mode,r,s))),li=e=>t=>0===e.property().children(t).length,ai=(e,t,o,n)=>si(e,t,o,ti,{sibling:(e,t)=>e.query().prevSibling(t),first:e=>e.length>0?y.some(e[e.length-1]):y.none()},n),ci=(e,t,o,n)=>si(e,t,o,ti,{sibling:(e,t)=>e.query().nextSibling(t),first:e=>e.length>0?y.some(e[0]):y.none()},n),ii=Pr(),mi=(e,t)=>((e,t,o)=>ai(e,t,li(e),o))(ii,e,t),di=(e,t)=>((e,t,o)=>ci(e,t,li(e),o))(ii,e,t),ui=Sl([{none:["message"]},{success:[]},{failedUp:["cell"]},{failedDown:["cell"]}]),fi=e=>mt(e,"tr"),gi={...ui,verify:(e,t,o,n,r,s,l)=>mt(n,"td,th",l).bind((o=>mt(t,"td,th",l).map((t=>ve(o,t)?ve(n,o)&&mr(o)===r?s(t):ui.none("in same cell"):Vr(fi,[o,t]).fold((()=>((e,t,o)=>{const n=e.getRect(t),r=e.getRect(o);return r.right>n.left&&r.lefts(t))))))).getOr(ui.none("default")),cata:(e,t,o,n,r)=>e.fold(t,o,n,r)},hi=le("br"),pi=(e,t,o)=>t(e,o).bind((e=>ne(e)&&0===ar(e).trim().length?pi(e,t,o):y.some(e))),wi=(e,t,o,n)=>((e,t)=>Ee(e,t).filter(hi).orThunk((()=>Ee(e,t-1).filter(hi))))(t,o).bind((t=>n.traverse(t).fold((()=>pi(t,n.gather,e).map(n.relative)),(e=>(e=>Te(e).bind((t=>{const o=ke(t);return((e,t)=>W(e,h(ve,t)))(o,e).map((n=>((e,t,o,n)=>({parent:e,children:t,element:o,index:n}))(t,o,e,n)))})))(e).map((e=>Mc.on(e.parent,e.index))))))),bi=(e,t)=>({left:e.left,top:e.top+t,right:e.right,bottom:e.bottom+t}),vi=(e,t)=>({left:e.left,top:e.top-t,right:e.right,bottom:e.bottom-t}),yi=(e,t,o)=>({left:e.left+t,top:e.top+o,right:e.right+t,bottom:e.bottom+o}),xi=e=>({left:e.left,top:e.top,right:e.right,bottom:e.bottom}),Ci=(e,t)=>y.some(e.getRect(t)),Si=(e,t,o)=>oe(t)?Ci(e,t).map(xi):ne(t)?((e,t,o)=>o>=0&&o0?e.getRangedRect(t,o-1,t,o):y.none())(e,t,o).map(xi):y.none(),Ti=(e,t)=>oe(t)?Ci(e,t).map(xi):ne(t)?e.getRangedRect(t,0,t,mr(t)).map(xi):y.none(),Ri=Sl([{none:[]},{retry:["caret"]}]),Di=(e,t,o)=>{return(n=t,r=Pl,st(((e,t)=>t(e)),lt,n,r,undefined)).fold(b,(t=>Ti(e,t).exists((e=>((e,t)=>e.leftt.right)(o,e)))));var n,r},Oi={point:e=>e.bottom,adjuster:(e,t,o,n,r)=>{const s=bi(r,5);return Math.abs(o.bottom-n.bottom)<1||o.top>r.bottom?Ri.retry(s):o.top===r.bottom?Ri.retry(bi(r,1)):Di(e,t,r)?Ri.retry(yi(s,5,0)):Ri.none()},move:bi,gather:di},ki=(e,t,o,n,r)=>0===r?y.some(n):((e,t,o)=>e.elementFromPoint(t,o).filter((e=>"table"===X(e))).isSome())(e,n.left,t.point(n))?((e,t,o,n,r)=>ki(e,t,o,t.move(n,5),r))(e,t,o,n,r-1):e.situsFromPoint(n.left,t.point(n)).bind((s=>s.start.fold(y.none,(s=>Ti(e,s).bind((l=>t.adjuster(e,s,l,o,n).fold(y.none,(n=>ki(e,t,o,n,r-1))))).orThunk((()=>y.some(n)))),y.none))),Ei=(e,t,o)=>{const n=e.move(o,5),r=ki(t,e,o,n,100).getOr(n);return((e,t,o)=>e.point(t)>o.getInnerHeight()?y.some(e.point(t)-o.getInnerHeight()):e.point(t)<0?y.some(-e.point(t)):y.none())(e,r,t).fold((()=>t.situsFromPoint(r.left,e.point(r))),(o=>(t.scrollBy(0,o),t.situsFromPoint(r.left,e.point(r)-o))))},Ni={tryUp:h(Ei,{point:e=>e.top,adjuster:(e,t,o,n,r)=>{const s=vi(r,5);return Math.abs(o.top-n.top)<1||o.bottome.getSelection().bind((n=>((e,t,o,n)=>{const r=hi(t)?((e,t,o)=>o.traverse(t).orThunk((()=>pi(t,o.gather,e))).map(o.relative))(e,t,n):wi(e,t,o,n);return r.map((e=>({start:e,finish:e})))})(t,n.finish,n.foffset,o).fold((()=>y.some(cs(n.finish,n.foffset))),(r=>{const s=e.fromSitus(r);return l=gi.verify(e,n.finish,n.foffset,s.finish,s.foffset,o.failure,t),gi.cata(l,(e=>y.none()),(()=>y.none()),(e=>y.some(cs(e,0))),(e=>y.some(cs(e,mr(e)))));var l})))),zi=(e,t,o,n,r,s)=>0===s?y.none():Li(e,t,o,n,r).bind((l=>{const a=e.fromSitus(l),c=gi.verify(e,o,n,a.finish,a.foffset,r.failure,t);return gi.cata(c,(()=>y.none()),(()=>y.some(l)),(l=>ve(o,l)&&0===n?Ai(e,o,n,vi,r):zi(e,t,l,0,r,s-1)),(l=>ve(o,l)&&n===mr(l)?Ai(e,o,n,bi,r):zi(e,t,l,mr(l),r,s-1)))})),Ai=(e,t,o,n,r)=>Si(e,t,o).bind((t=>Wi(e,r,n(t,Ni.getJumpSize())))),Wi=(e,t,o)=>{const n=So().browser;return n.isChromium()||n.isSafari()||n.isFirefox()?t.retry(e,o):y.none()},Li=(e,t,o,n,r)=>Si(e,o,n).bind((t=>Wi(e,r,t))),Mi=(e,t,o,n,r)=>mt(n,"td,th",t).bind((n=>mt(n,"table",t).bind((s=>((e,t)=>lt(e,(e=>Te(e).exists((e=>ve(e,t)))),void 0).isSome())(r,s)?((e,t,o)=>Bi(e,t,o).bind((n=>zi(e,t,n.element,n.offset,o,20).map(e.fromSitus))))(e,t,o).bind((e=>mt(e.finish,"td,th",t).map((t=>({start:n,finish:t,range:e}))))):y.none())))),ji=(e,t,o,n,r,s)=>s(n,t).orThunk((()=>Mi(e,t,o,n,r).map((e=>{const t=e.range;return jc(y.some(Qc(t.start,t.soffset,t.finish,t.foffset)),!0)})))),_i=(e,t)=>mt(e,"tr",t).bind((e=>mt(e,"table",t).bind((o=>{const n=rt(o,"tr");return ve(e,n[0])?((e,t,o)=>ai(ii,e,(e=>gr(e).isSome()),o))(o,0,t).map((e=>{const t=mr(e);return jc(y.some(Qc(e,t,e,t)),!0)})):y.none()})))),Ii=(e,t)=>mt(e,"tr",t).bind((e=>mt(e,"table",t).bind((o=>{const n=rt(o,"tr");return ve(e,n[n.length-1])?((e,t,o)=>ci(ii,e,(e=>fr(e).isSome()),o))(o,0,t).map((e=>jc(y.some(Qc(e,0,e,0)),!0))):y.none()})))),Pi=(e,t,o,n,r,s,l)=>Mi(e,o,n,r,s).bind((e=>Xc(t,o,e.start,e.finish,l))),Fi=e=>{let t=e;return{get:()=>t,set:e=>{t=e}}},Hi=()=>{const e=(e=>{const t=Fi(y.none()),o=()=>t.get().each(e);return{clear:()=>{o(),t.set(y.none())},isSet:()=>t.get().isSome(),get:()=>t.get(),set:e=>{o(),t.set(y.some(e))}}})(d);return{...e,on:t=>e.get().each(t)}},qi=(e,t)=>mt(e,"td,th",t),Vi={traverse:Oe,gather:di,relative:Mc.before,retry:Ni.tryDown,failure:gi.failedDown},$i={traverse:De,gather:mi,relative:Mc.before,retry:Ni.tryUp,failure:gi.failedUp},Ui=e=>t=>t===e,Gi=Ui(38),Ki=Ui(40),Yi=e=>e>=37&&e<=40,Ji={isBackward:Ui(37),isForward:Ui(39)},Qi={isBackward:Ui(39),isForward:Ui(37)},Xi=Sl([{domRange:["rng"]},{relative:["startSitu","finishSitu"]},{exact:["start","soffset","finish","foffset"]}]),Zi={domRange:Xi.domRange,relative:Xi.relative,exact:Xi.exact,exactFromRange:e=>Xi.exact(e.start,e.soffset,e.finish,e.foffset),getWin:e=>{const t=(e=>e.match({domRange:e=>he.fromDom(e.startContainer),relative:(e,t)=>Mc.getStart(e),exact:(e,t,o,n)=>e}))(e);return he.fromDom(Se(t).dom.defaultView)},range:Kc},em=document.caretPositionFromPoint?(e,t,o)=>{var n,r;return y.from(null===(r=(n=e.dom).caretPositionFromPoint)||void 0===r?void 0:r.call(n,t,o)).bind((t=>{if(null===t.offsetNode)return y.none();const o=e.dom.createRange();return o.setStart(t.offsetNode,t.offset),o.collapse(),y.some(o)}))}:document.caretRangeFromPoint?(e,t,o)=>{var n,r;return y.from(null===(r=(n=e.dom).caretRangeFromPoint)||void 0===r?void 0:r.call(n,t,o))}:y.none,tm=(e,t)=>{const o=X(e);return"input"===o?Mc.after(e):T(["br","img"],o)?0===t?Mc.before(e):Mc.after(e):Mc.on(e,t)},om=e=>y.from(e.getSelection()),nm=(e,t)=>{om(e).each((e=>{e.removeAllRanges(),e.addRange(t)}))},rm=(e,t,o,n,r)=>{const s=Hc(e,t,o,n,r);nm(e,s)},sm=(e,t)=>Uc(e,t).match({ltr:(t,o,n,r)=>{rm(e,t,o,n,r)},rtl:(t,o,n,r)=>{om(e).each((s=>{if(s.setBaseAndExtent)s.setBaseAndExtent(t.dom,o,n.dom,r);else if(s.extend)try{((e,t,o,n,r,s)=>{t.collapse(o.dom,n),t.extend(r.dom,s)})(0,s,t,o,n,r)}catch(s){rm(e,n,r,t,o)}else rm(e,n,r,t,o)}))}}),lm=(e,t,o,n,r)=>{const s=((e,t,o,n)=>{const r=tm(e,t),s=tm(o,n);return Zi.relative(r,s)})(t,o,n,r);sm(e,s)},am=(e,t,o)=>{const n=((e,t)=>{const o=e.fold(Mc.before,tm,Mc.after),n=t.fold(Mc.before,tm,Mc.after);return Zi.relative(o,n)})(t,o);sm(e,n)},cm=e=>{if(e.rangeCount>0){const t=e.getRangeAt(0),o=e.getRangeAt(e.rangeCount-1);return y.some(Kc(he.fromDom(t.startContainer),t.startOffset,he.fromDom(o.endContainer),o.endOffset))}return y.none()},im=e=>{if(null===e.anchorNode||null===e.focusNode)return cm(e);{const t=he.fromDom(e.anchorNode),o=he.fromDom(e.focusNode);return((e,t,o,n)=>{const r=((e,t,o,n)=>{const r=Ce(e).dom.createRange();return r.setStart(e.dom,t),r.setEnd(o.dom,n),r})(e,t,o,n),s=ve(e,o)&&t===n;return r.collapsed&&!s})(t,e.anchorOffset,o,e.focusOffset)?y.some(Kc(t,e.anchorOffset,o,e.focusOffset)):cm(e)}},mm=(e,t,o=!0)=>{const n=(o?Ic:_c)(e,t);nm(e,n)},dm=e=>(e=>om(e).filter((e=>e.rangeCount>0)).bind(im))(e).map((e=>Zi.exact(e.start,e.soffset,e.finish,e.foffset))),um=e=>({elementFromPoint:(t,o)=>he.fromPoint(he.fromDom(e.document),t,o),getRect:e=>e.dom.getBoundingClientRect(),getRangedRect:(t,o,n,r)=>{const s=Zi.exact(t,o,n,r);return((e,t)=>(e=>{const t=e.getClientRects(),o=t.length>0?t[0]:e.getBoundingClientRect();return o.width>0||o.height>0?y.some(o).map(qc):y.none()})(Gc(e,t)))(e,s)},getSelection:()=>dm(e).map((t=>Jc(e,t))),fromSitus:t=>{const o=Zi.relative(t.start,t.finish);return Jc(e,o)},situsFromPoint:(t,o)=>((e,t,o)=>((e,t,o)=>{const n=he.fromDom(e.document);return em(n,t,o).map((e=>Kc(he.fromDom(e.startContainer),e.startOffset,he.fromDom(e.endContainer),e.endOffset)))})(e,t,o))(e,t,o).map((e=>Yc(e.start,e.soffset,e.finish,e.foffset))),clearSelection:()=>{(e=>{om(e).each((e=>e.removeAllRanges()))})(e)},collapseSelection:(t=!1)=>{dm(e).each((o=>o.fold((e=>e.collapse(t)),((o,n)=>{const r=t?o:n;am(e,r,r)}),((o,n,r,s)=>{const l=t?o:r,a=t?n:s;lm(e,l,a,l,a)}))))},setSelection:t=>{lm(e,t.start,t.soffset,t.finish,t.foffset)},setRelativeSelection:(t,o)=>{am(e,t,o)},selectNode:t=>{mm(e,t,!1)},selectContents:t=>{mm(e,t)},getInnerHeight:()=>e.innerHeight,getScrollY:()=>(e=>{const t=void 0!==e?e.dom:document,o=t.body.scrollLeft||t.documentElement.scrollLeft,n=t.body.scrollTop||t.documentElement.scrollTop;return mn(o,n)})(he.fromDom(e.document)).top,scrollBy:(t,o)=>{((e,t,o)=>{const n=(void 0!==o?o.dom:document).defaultView;n&&n.scrollBy(e,t)})(t,o,he.fromDom(e.document))}}),fm=(e,t)=>({rows:e,cols:t}),gm=e=>void 0!==e.dom.classList,hm=(e,t)=>((e,t,o)=>{const n=((e,t)=>{const o=me(e,t);return void 0===o||""===o?[]:o.split(" ")})(e,t).concat([o]);return ce(e,t,n.join(" ")),!0})(e,"class",t),pm=(e,t)=>{gm(e)?e.dom.classList.add(t):hm(e,t)},wm=(e,t)=>gm(e)&&e.dom.classList.contains(t),bm=()=>({tag:"none"}),vm=e=>({tag:"multiple",elements:e}),ym=e=>({tag:"single",element:e}),xm=e=>{const t=he.fromDom((e=>{if(Je()&&c(e.target)){const t=he.fromDom(e.target);if(oe(t)&&c(t.dom.shadowRoot)&&e.composed&&e.composedPath){const t=e.composedPath();if(t)return P(t)}}return y.from(e.target)})(e).getOr(e.target)),o=()=>e.stopPropagation(),n=()=>e.preventDefault(),r=(s=n,l=o,(...e)=>s(l.apply(null,e)));var s,l;return((e,t,o,n,r,s,l)=>({target:e,x:t,y:o,stop:n,prevent:r,kill:s,raw:l}))(t,e.clientX,e.clientY,o,n,r,e)},Cm=(e,t,o,n)=>{e.dom.removeEventListener(t,o,n)},Sm=v,Tm=(e,t,o)=>((e,t,o,n)=>((e,t,o,n,r)=>{const s=((e,t)=>o=>{e(o)&&t(xm(o))})(o,n);return e.dom.addEventListener(t,s,r),{unbind:h(Cm,e,t,s,r)}})(e,t,o,n,!1))(e,t,Sm,o),Rm=xm,Dm=e=>!1===wm(he.fromDom(e.target),"ephox-snooker-resizer-bar"),Om=(e,t)=>{const o=(r=ts.selectedSelector,{get:()=>Jr(he.fromDom(e.getBody()),r).fold((()=>ss(kr(e),Dr(e)).fold(bm,ym)),vm)}),n=((e,t,o)=>{const n=t=>{ue(t,e.selected),ue(t,e.firstSelected),ue(t,e.lastSelected)},r=t=>{ce(t,e.selected,"1")},s=e=>{l(e),o()},l=t=>{const o=rt(t,`${e.selectedSelector},${e.firstSelectedSelector},${e.lastSelectedSelector}`);k(o,n)};return{clearBeforeUpdate:l,clear:s,selectRange:(o,n,l,a)=>{s(o),k(n,r),ce(l,e.firstSelected,"1"),ce(a,e.lastSelected,"1"),t(n,l,a)},selectedSelector:e.selectedSelector,firstSelectedSelector:e.firstSelectedSelector,lastSelectedSelector:e.lastSelectedSelector}})(ts,((t,o,n)=>{Pt(o).each((r=>{const s=_a(e),l=Sr(d,he.fromDom(e.getDoc()),s),a=((e,t,o)=>{const n=$o(e);return Qs(n,t).map((e=>{const t=$s(n,o,!1),{rows:r}=jo(t),s=((e,t)=>{const o=e.slice(0,t[t.length-1].row+1),n=Us(o);return M(n,(e=>{const o=e.cells.slice(0,t[t.length-1].column+1);return O(o,(e=>e.element))}))})(r,e),l=((e,t)=>{const o=e.slice(t[0].row+t[0].rowspan-1,e.length),n=Us(o);return M(n,(e=>{const o=e.cells.slice(t[0].column+t[0].colspan-1,e.cells.length);return O(o,(e=>e.element))}))})(r,e);return{upOrLeftCells:s,downOrRightCells:l}}))})(r,{selection:ls(e)},l);((e,t,o,n,r)=>{e.dispatch("TableSelectionChange",{cells:t,start:o,finish:n,otherCells:r})})(e,t,o,n,a)}))}),(()=>(e=>{e.dispatch("TableSelectionClear")})(e)));var r;return e.on("init",(o=>{const r=e.getWin(),s=Rr(e),l=Dr(e),a=((e,t,o,n)=>{const r=((e,t,o,n)=>{const r=Hi(),s=r.clear,l=s=>{r.on((r=>{n.clearBeforeUpdate(t),qi(s.target,o).each((l=>{Ur(r,l,o).each((o=>{const r=o.boxes.getOr([]);if(1===r.length){const o=r[0],l="false"===Is(o),a=dt(js(s.target),o,ve);l&&a&&(n.selectRange(t,r,o,o),e.selectContents(o))}else r.length>1&&(n.selectRange(t,r,o.start,o.finish),e.selectContents(l))}))}))}))};return{clearstate:s,mousedown:e=>{n.clear(t),qi(e.target,o).each(r.set)},mouseover:e=>{l(e)},mouseup:e=>{l(e),s()}}})(um(e),t,o,n);return{clearstate:r.clearstate,mousedown:r.mousedown,mouseover:r.mouseover,mouseup:r.mouseup}})(r,s,l,n),c=((e,t,o,n)=>{const r=um(e),s=()=>(n.clear(t),y.none());return{keydown:(e,l,a,c,i,m)=>{const d=e.raw,u=d.which,f=!0===d.shiftKey,g=Gr(t,n.selectedSelector).fold((()=>(Yi(u)&&!f&&n.clearBeforeUpdate(t),Ki(u)&&f?h(Pi,r,t,o,Vi,c,l,n.selectRange):Gi(u)&&f?h(Pi,r,t,o,$i,c,l,n.selectRange):Ki(u)?h(ji,r,o,Vi,c,l,Ii):Gi(u)?h(ji,r,o,$i,c,l,_i):y.none)),(e=>{const o=o=>()=>{const s=H(o,(o=>((e,t,o,n,r)=>Yr(n,e,t,r.firstSelectedSelector,r.lastSelectedSelector).map((e=>(r.clearBeforeUpdate(o),r.selectRange(o,e.boxes,e.start,e.finish),e.boxes))))(o.rows,o.cols,t,e,n)));return s.fold((()=>Kr(t,n.firstSelectedSelector,n.lastSelectedSelector).map((e=>{const o=Ki(u)||m.isForward(u)?Mc.after:Mc.before;return r.setRelativeSelection(Mc.on(e.first,0),o(e.table)),n.clear(t),jc(y.none(),!0)}))),(e=>y.some(jc(y.none(),!0))))};return Ki(u)&&f?o([fm(1,0)]):Gi(u)&&f?o([fm(-1,0)]):m.isBackward(u)&&f?o([fm(0,-1),fm(-1,0)]):m.isForward(u)&&f?o([fm(0,1),fm(1,0)]):Yi(u)&&!f?s:y.none}));return g()},keyup:(e,r,s,l,a)=>Gr(t,n.selectedSelector).fold((()=>{const c=e.raw,i=c.which;return!0===c.shiftKey&&Yi(i)?((e,t,o,n,r,s,l)=>ve(o,r)&&n===s?y.none():mt(o,"td,th",t).bind((o=>mt(r,"td,th",t).bind((n=>Xc(e,t,o,n,l))))))(t,o,r,s,l,a,n.selectRange):y.none()}),y.none)}})(r,s,l,n),i=((e,t,o,n)=>{const r=um(e);return(e,s)=>{n.clearBeforeUpdate(t),Ur(e,s,o).each((e=>{const o=e.boxes.getOr([]);n.selectRange(t,o,e.start,e.finish),r.selectContents(s),r.collapseSelection()}))}})(r,s,l,n);e.on("TableSelectorChange",(e=>i(e.start,e.finish)));const m=(t,o)=>{(e=>!0===e.raw.shiftKey)(t)&&(o.kill&&t.kill(),o.selection.each((t=>{const o=Zi.relative(t.start,t.finish),n=Gc(r,o);e.selection.setRng(n)})))},u=e=>0===e.button,f=(()=>{const e=Fi(he.fromDom(s)),t=Fi(0);return{touchEnd:o=>{const n=he.fromDom(o.target);if(le("td")(n)||le("th")(n)){const r=e.get(),s=t.get();ve(r,n)&&o.timeStamp-s<300&&(o.preventDefault(),i(n,n))}e.set(n),t.set(o.timeStamp)}}})();e.on("dragstart",(e=>{a.clearstate()})),e.on("mousedown",(e=>{u(e)&&Dm(e)&&a.mousedown(Rm(e))})),e.on("mouseover",(e=>{var t;void 0!==(t=e).buttons&&0==(1&t.buttons)||!Dm(e)||a.mouseover(Rm(e))})),e.on("mouseup",(e=>{u(e)&&Dm(e)&&a.mouseup(Rm(e))})),e.on("touchend",f.touchEnd),e.on("keyup",(t=>{const o=Rm(t);if(o.raw.shiftKey&&Yi(o.raw.which)){const t=e.selection.getRng(),n=he.fromDom(t.startContainer),r=he.fromDom(t.endContainer);c.keyup(o,n,t.startOffset,r,t.endOffset).each((e=>{m(o,e)}))}})),e.on("keydown",(o=>{const n=Rm(o);t.hide();const r=e.selection.getRng(),s=he.fromDom(r.startContainer),l=he.fromDom(r.endContainer),a=nn(Ji,Qi)(he.fromDom(e.selection.getStart()));c.keydown(n,s,r.startOffset,l,r.endOffset,a).each((e=>{m(n,e)})),t.show()})),e.on("NodeChange",(()=>{const t=e.selection,o=he.fromDom(t.getStart()),r=he.fromDom(t.getEnd());Vr(Pt,[o,r]).fold((()=>n.clear(s)),d)}))})),e.on("PreInit",(()=>{e.serializer.addTempAttr(ts.firstSelected),e.serializer.addTempAttr(ts.lastSelected)})),{getSelectedCells:()=>((e,t,o,n)=>{switch(e.tag){case"none":return t();case"single":return(e=>[e.dom])(e.element);case"multiple":return(e=>O(e,(e=>e.dom)))(e.elements)}})(o.get(),u([])),clearSelectedCells:e=>n.clear(he.fromDom(e))}},km=e=>{let t=[];return{bind:e=>{if(void 0===e)throw new Error("Event bind error: undefined handler");t.push(e)},unbind:e=>{t=N(t,(t=>t!==e))},trigger:(...o)=>{const n={};k(e,((e,t)=>{n[e]=o[t]})),k(t,(e=>{e(n)}))}}},Em=e=>({registry:U(e,(e=>({bind:e.bind,unbind:e.unbind}))),trigger:U(e,(e=>e.trigger))}),Nm=e=>e.slice(0).sort(),Bm=(e,t)=>{const o=N(t,(t=>!T(e,t)));o.length>0&&(e=>{throw new Error("Unsupported keys for object: "+Nm(e).join(", "))})(o)},zm=e=>((e,t)=>((e,t,o)=>{if(0===t.length)throw new Error("You must specify at least one required field.");return((e,t)=>{if(!s(t))throw new Error("The required fields must be an array. Was: "+t+".");k(t,(t=>{if(!n(t))throw new Error("The value "+t+" in the "+e+" fields was not a string.")}))})("required",t),(e=>{const t=Nm(e);A(t,((e,o)=>o{throw new Error("The field: "+e+" occurs more than once in the combined fields: ["+t.join(", ")+"].")}))})(t),n=>{const r=q(n);j(t,(e=>T(r,e)))||((e,t)=>{throw new Error("All required keys ("+Nm(e).join(", ")+") were not specified. Specified keys were: "+Nm(t).join(", ")+".")})(t,r),e(t,r);const s=N(t,(e=>!o.validate(n[e],e)));return s.length>0&&((e,t)=>{throw new Error("All values need to be of type: "+t+". Keys ("+Nm(e).join(", ")+") were not.")})(s,o.label),n}})(e,t,{validate:i,label:"function"}))(Bm,e),Am=zm(["compare","extract","mutate","sink"]),Wm=zm(["element","start","stop","destroy"]),Lm=zm(["forceDrop","drop","move","delayDrop"]),Mm=()=>{const e=(()=>{const e=Em({move:km(["info"])});return{onEvent:d,reset:d,events:e.registry}})(),t=(()=>{let e=y.none();const t=Em({move:km(["info"])});return{onEvent:(o,n)=>{n.extract(o).each((o=>{const r=((t,o)=>{const n=e.map((e=>t.compare(e,o)));return e=y.some(o),n})(n,o);r.each((e=>{t.trigger.move(e)}))}))},reset:()=>{e=y.none()},events:t.registry}})();let o=e;return{on:()=>{o.reset(),o=t},off:()=>{o.reset(),o=e},isOn:()=>o===t,onEvent:(e,t)=>{o.onEvent(e,t)},events:t.events}},jm=e=>{const t=e.replace(/\./g,"-");return{resolve:e=>t+"-"+e}},_m=jm("ephox-dragster").resolve;var Im=Am({compare:(e,t)=>mn(t.left-e.left,t.top-e.top),extract:e=>y.some(mn(e.x,e.y)),sink:(e,t)=>{const o=(e=>{const t={layerClass:_m("blocker"),...e},o=he.fromTag("div");return ce(o,"role","presentation"),St(o,{position:"fixed",left:"0px",top:"0px",width:"100%",height:"100%"}),pm(o,_m("blocker")),pm(o,t.layerClass),{element:u(o),destroy:()=>{_e(o)}}})(t),n=Tm(o.element(),"mousedown",e.forceDrop),r=Tm(o.element(),"mouseup",e.drop),s=Tm(o.element(),"mousemove",e.move),l=Tm(o.element(),"mouseout",e.delayDrop);return Wm({element:o.element,start:e=>{Ae(e,o.element())},stop:()=>{_e(o.element())},destroy:()=>{o.destroy(),r.unbind(),s.unbind(),l.unbind(),n.unbind()}})},mutate:(e,t)=>{e.mutate(t.left,t.top)}});const Pm=jm("ephox-snooker").resolve,Fm=Pm("resizer-bar"),Hm=Pm("resizer-rows"),qm=Pm("resizer-cols"),Vm=e=>{const t=rt(e.parent(),"."+Fm);k(t,_e)},$m=(e,t,o)=>{const n=e.origin();k(t,(t=>{t.each((t=>{const r=o(n,t);pm(r,Fm),Ae(e.parent(),r)}))}))},Um=(e,t,o,n,r)=>{const s=un(o),l=t.isResizable,a=n.length>0?Tn.positions(n,o):[],c=a.length>0?((e,t)=>M(e.all,((e,o)=>t(e.element)?[o]:[])))(e,l):[];((e,t,o,n)=>{$m(e,t,((e,t)=>{const r=((e,t,o,n,r)=>{const s=he.fromTag("div");return St(s,{position:"absolute",left:t+"px",top:o-3.5+"px",height:"7px",width:n+"px"}),ie(s,{"data-row":e,role:"presentation"}),s})(t.row,o.left-e.left,t.y-e.top,n);return pm(r,Hm),r}))})(t,N(a,((e,t)=>R(c,(e=>t===e)))),s,ko(o));const i=r.length>0?Dn.positions(r,o):[],m=i.length>0?((e,t)=>{const o=[];return D(e.grid.columns,(n=>{Zo(e,n).map((e=>e.element)).forall(t)&&o.push(n)})),N(o,(o=>{const n=Yo(e,(e=>e.column===o));return j(n,(e=>t(e.element)))}))})(e,l):[];((e,t,o,n)=>{$m(e,t,((e,t)=>{const r=((e,t,o,n,r)=>{const s=he.fromTag("div");return St(s,{position:"absolute",left:t-3.5+"px",top:o+"px",height:r+"px",width:"7px"}),ie(s,{"data-column":e,role:"presentation"}),s})(t.col,t.x-e.left,o.top-e.top,0,n);return pm(r,qm),r}))})(t,N(i,((e,t)=>R(m,(e=>t===e)))),s,an(o))},Gm=(e,t)=>{if(Vm(e),e.isResizable(t)){const o=$o(t),n=on(o),r=en(o);Um(o,e,t,n,r)}},Km=(e,t)=>{const o=rt(e.parent(),"."+Fm);k(o,t)},Ym=e=>{Km(e,(e=>{Ct(e,"display","none")}))},Jm=e=>{Km(e,(e=>{Ct(e,"display","block")}))},Qm=Pm("resizer-bar-dragging"),Xm=e=>{const t=(()=>{const e=Em({drag:km(["xDelta","yDelta","target"])});let t=y.none();const o=(()=>{const e=Em({drag:km(["xDelta","yDelta"])});return{mutate:(t,o)=>{e.trigger.drag(t,o)},events:e.registry}})();return o.events.drag.bind((o=>{t.each((t=>{e.trigger.drag(o.xDelta,o.yDelta,t)}))})),{assign:e=>{t=y.some(e)},get:()=>t,mutate:o.mutate,events:e.registry}})(),o=((e,t={})=>{var o;return((e,t,o)=>{let n=!1;const r=Em({start:km([]),stop:km([])}),s=Mm(),a=()=>{m.stop(),s.isOn()&&(s.off(),r.trigger.stop())},c=((e,t)=>{let o=null;const n=()=>{l(o)||(clearTimeout(o),o=null)};return{cancel:n,throttle:(...t)=>{n(),o=setTimeout((()=>{o=null,e.apply(null,t)}),200)}}})(a);s.events.move.bind((o=>{t.mutate(e,o.info)}));const i=e=>(...t)=>{n&&e.apply(null,t)},m=t.sink(Lm({forceDrop:a,drop:i(a),move:i((e=>{c.cancel(),s.onEvent(e,t)})),delayDrop:i(c.throttle)}),o);return{element:m.element,go:e=>{m.start(e),s.on(),r.trigger.start()},on:()=>{n=!0},off:()=>{n=!1},destroy:()=>{m.destroy()},events:r.registry}})(e,null!==(o=t.mode)&&void 0!==o?o:Im,t)})(t,{});let n=y.none();const r=(e,t)=>y.from(me(e,t));t.events.drag.bind((e=>{r(e.target,"data-row").each((t=>{const o=zt(e.target,"top");Ct(e.target,"top",o+e.yDelta+"px")})),r(e.target,"data-column").each((t=>{const o=zt(e.target,"left");Ct(e.target,"left",o+e.xDelta+"px")}))}));const s=(e,t)=>zt(e,t)-kt(e,"data-initial-"+t,0);o.events.stop.bind((()=>{t.get().each((t=>{n.each((o=>{r(t,"data-row").each((e=>{const n=s(t,"top");ue(t,"data-initial-top"),d.trigger.adjustHeight(o,n,parseInt(e,10))})),r(t,"data-column").each((e=>{const n=s(t,"left");ue(t,"data-initial-left"),d.trigger.adjustWidth(o,n,parseInt(e,10))})),Gm(e,o)}))}))}));const a=(n,r)=>{d.trigger.startAdjust(),t.assign(n),ce(n,"data-initial-"+r,zt(n,r)),pm(n,Qm),Ct(n,"opacity","0.2"),o.go(e.parent())},c=Tm(e.parent(),"mousedown",(e=>{var t;t=e.target,wm(t,Hm)&&a(e.target,"top"),(e=>wm(e,qm))(e.target)&&a(e.target,"left")})),i=t=>ve(t,e.view()),m=Tm(e.view(),"mouseover",(t=>{var o;(o=t.target,mt(o,"table",i).filter(_s)).fold((()=>{Ze(t.target)&&Vm(e)}),(t=>{n=y.some(t),Gm(e,t)}))})),d=Em({adjustHeight:km(["table","delta","row"]),adjustWidth:km(["table","delta","column"]),startAdjust:km([])});return{destroy:()=>{c.unbind(),m.unbind(),o.destroy(),Vm(e)},refresh:t=>{Gm(e,t)},on:o.on,off:o.off,hideBars:h(Ym,e),showBars:h(Jm,e),events:d.registry}},Zm=(e,t,o)=>{const n=Tn,r=Dn,s=Xm(e),l=Em({beforeResize:km(["table","type"]),afterResize:km(["table","type"]),startDrag:km([])});return s.events.adjustHeight.bind((e=>{const t=e.table;l.trigger.beforeResize(t,"row");((e,t,o,n)=>{const r=$o(e),s=((e,t,o)=>Xn(e,t,o,Fn,(e=>e.getOrThunk(Wt))))(r,e,n),l=O(s,((e,n)=>o===n?Math.max(t+e,Wt()):e)),a=Dl(r,l),c=((e,t)=>O(e.all,((e,o)=>({element:e.element,height:t[o]}))))(r,l);k(c,(e=>{Ln(e.element,e.height)})),k(a,(e=>{Ln(e.element,e.height)}));const i=B(l,((e,t)=>e+t),0);Ln(e,i)})(t,n.delta(e.delta,t),e.row,n),l.trigger.afterResize(t,"row")})),s.events.startAdjust.bind((e=>{l.trigger.startDrag()})),s.events.adjustWidth.bind((e=>{const n=e.table;l.trigger.beforeResize(n,"col");const s=r.delta(e.delta,n),a=o(n);kl(n,s,e.column,t,a),l.trigger.afterResize(n,"col")})),{on:s.on,off:s.off,refreshBars:s.refresh,hideBars:s.hideBars,showBars:s.showBars,destroy:s.destroy,events:l.registry}},ed=e=>c(e)&&"TABLE"===e.tagName,td="bar-",od=e=>"false"!==me(e,"data-mce-resize"),nd=e=>{const t=Hi(),o=Hi(),n=Hi();let r,s;const l=t=>Ja(e,t),a=()=>Fa(e)?xs():ys();return e.on("init",(()=>{const r=((e,t)=>e.inline?((e,t,o)=>({parent:u(t),view:u(e),origin:u(mn(0,0)),isResizable:o}))(he.fromDom(e.getBody()),(()=>{const e=he.fromTag("div");return St(e,{position:"static",height:"0",width:"0",padding:"0",margin:"0",border:"0"}),Ae(et(he.fromDom(document)),e),e})(),t):((e,t)=>{const o=re(e)?(e=>he.fromDom(Se(e).dom.documentElement))(e):e;return{parent:u(o),view:u(e),origin:u(mn(0,0)),isResizable:t}})(he.fromDom(e.getDoc()),t))(e,od);if(n.set(r),(e=>{const t=e.options.get("object_resizing");return T(t.split(","),"table")})(e)&&Ga(e)){const n=a(),s=Zm(r,n,l);s.on(),s.events.startDrag.bind((o=>{t.set(e.selection.getRng())})),s.events.beforeResize.bind((t=>{const o=t.table.dom;((e,t,o,n,r)=>{e.dispatch("ObjectResizeStart",{target:t,width:o,height:n,origin:r})})(e,o,Er(o),Nr(o),td+t.type)})),s.events.afterResize.bind((o=>{const n=o.table,r=n.dom;Or(n),t.on((t=>{e.selection.setRng(t),e.focus()})),((e,t,o,n,r)=>{e.dispatch("ObjectResized",{target:t,width:o,height:n,origin:r})})(e,r,Er(r),Nr(r),td+o.type),e.undoManager.add()})),o.set(s)}})),e.on("ObjectResizeStart",(t=>{const o=t.target;if(ed(o)){const n=he.fromDom(o);k(e.dom.select(".mce-clonedresizable"),(t=>{e.dom.addClass(t,"mce-"+Pa(e)+"-columns")})),!mc(n)&&$a(e)?gc(n):!ic(n)&&Va(e)&&fc(n),dc(n)&&pt(t.origin,td)&&fc(n),r=t.width,s=Ua(e)?"":((e,t)=>{const o=e.dom.getStyle(t,"width")||e.dom.getAttrib(t,"width");return y.from(o).filter(vt)})(e,o).getOr("")}})),e.on("ObjectResized",(t=>{const o=t.target;if(ed(o)){const n=he.fromDom(o),c=t.origin;pt(c,"corner-")&&((t,o,n)=>{const c=wt(o,"e");if(""===s&&fc(t),n!==r&&""!==s){Ct(t,"width",s);const o=a(),i=l(t),m=Fa(e)||c?(e=>Cs(e).columns)(t)-1:0;kl(t,n-r,m,o,i)}else if((e=>/^(\d+(\.\d+)?)%$/.test(e))(s)){const e=parseFloat(s.replace("%",""));Ct(t,"width",n*e/r+"%")}(e=>/^(\d+(\.\d+)?)px$/.test(e))(s)&&(e=>{const t=$o(e);Xo(t)||k(_t(e),(e=>{const t=Tt(e,"width");Ct(e,"width",t),ue(e,"width")}))})(t)})(n,c,t.width),Or(n),Aa(e,n.dom,Wa)}})),e.on("SwitchMode",(()=>{o.on((t=>{e.mode.isReadOnly()?t.hideBars():t.showBars()}))})),e.on("remove",(()=>{o.on((e=>{e.destroy()})),n.on((t=>{((e,t)=>{e.inline&&_e(t.parent())})(e,t)}))})),{refresh:e=>{o.on((t=>t.refreshBars(he.fromDom(e))))},hide:()=>{o.on((e=>e.hideBars()))},show:()=>{o.on((e=>e.showBars()))}}},rd=e=>{(e=>{const t=e.options.register;t("table_clone_elements",{processor:"string[]"}),t("table_use_colgroups",{processor:"boolean",default:!0}),t("table_header_type",{processor:e=>{const t=T(["section","cells","sectionCells","auto"],e);return t?{value:e,valid:t}:{valid:!1,message:"Must be one of: section, cells, sectionCells or auto."}},default:"section"}),t("table_sizing_mode",{processor:"string",default:"auto"}),t("table_default_attributes",{processor:"object",default:{border:"1"}}),t("table_default_styles",{processor:"object",default:{"border-collapse":"collapse",width:"100%"}}),t("table_column_resizing",{processor:e=>{const t=T(["preservetable","resizetable"],e);return t?{value:e,valid:t}:{valid:!1,message:"Must be preservetable, or resizetable."}},default:"preservetable"}),t("table_resize_bars",{processor:"boolean",default:!0})})(e);const t=nd(e),o=Om(e,t),n=Qa(e,t,o);return Wc(e,n),((e,t)=>{const o=Dr(e),n=t=>ss(kr(e)).bind((n=>Pt(n,o).map((o=>{const r=os(ls(e),o,n);return t(o,r)})))).getOr("");$({mceTableRowType:()=>n(t.getTableRowType),mceTableCellType:()=>n(t.getTableCellType),mceTableColType:()=>n(t.getTableColType)},((t,o)=>e.addQueryValueHandler(o,t)))})(e,n),as(e,n),{getSelectedCells:o.getSelectedCells,clearSelectedCells:o.clearSelectedCells}};e.add("dom",(e=>({table:rd(e)})))}(); \ No newline at end of file diff --git a/vendor/tinymce/tinymce/package.json b/vendor/tinymce/tinymce/package.json new file mode 100644 index 00000000..78a22273 --- /dev/null +++ b/vendor/tinymce/tinymce/package.json @@ -0,0 +1,32 @@ +{ + "name": "tinymce", + "version": "6.0.2", + "repository": { + "type": "git", + "url": "https://github.com/tinymce/tinymce.git", + "directory": "modules/tinymce" + }, + "description": "Web based JavaScript HTML WYSIWYG editor control.", + "author": "Ephox Corporation DBA Tiny Technologies, Inc", + "main": "tinymce.js", + "types": "tinymce.d.ts", + "license": "MIT", + "keywords": [ + "wysiwyg", + "tinymce", + "richtext", + "javascript", + "html", + "text", + "rich editor", + "rich text editor", + "rte", + "rich text", + "contenteditable", + "editing" + ], + "homepage": "https://www.tiny.cloud/", + "bugs": { + "url": "https://github.com/tinymce/tinymce/issues" + } +} \ No newline at end of file diff --git a/vendor/tinymce/tinymce/plugins/advlist/index.js b/vendor/tinymce/tinymce/plugins/advlist/index.js new file mode 100644 index 00000000..7428d108 --- /dev/null +++ b/vendor/tinymce/tinymce/plugins/advlist/index.js @@ -0,0 +1,7 @@ +// Exports the "advlist" plugin for usage with module loaders +// Usage: +// CommonJS: +// require('tinymce/plugins/advlist') +// ES2015: +// import 'tinymce/plugins/advlist' +require('./plugin.js'); \ No newline at end of file diff --git a/vendor/tinymce/tinymce/plugins/advlist/plugin.js b/vendor/tinymce/tinymce/plugins/advlist/plugin.js new file mode 100644 index 00000000..29ffd47d --- /dev/null +++ b/vendor/tinymce/tinymce/plugins/advlist/plugin.js @@ -0,0 +1,246 @@ +/** + * TinyMCE version 6.0.2 (2022-04-27) + */ + +(function () { + 'use strict'; + + var global$1 = tinymce.util.Tools.resolve('tinymce.PluginManager'); + + const applyListFormat = (editor, listName, styleValue) => { + const cmd = listName === 'UL' ? 'InsertUnorderedList' : 'InsertOrderedList'; + editor.execCommand(cmd, false, styleValue === false ? null : { 'list-style-type': styleValue }); + }; + + const register$2 = editor => { + editor.addCommand('ApplyUnorderedListStyle', (ui, value) => { + applyListFormat(editor, 'UL', value['list-style-type']); + }); + editor.addCommand('ApplyOrderedListStyle', (ui, value) => { + applyListFormat(editor, 'OL', value['list-style-type']); + }); + }; + + const option = name => editor => editor.options.get(name); + const register$1 = editor => { + const registerOption = editor.options.register; + registerOption('advlist_number_styles', { + processor: 'string[]', + default: 'default,lower-alpha,lower-greek,lower-roman,upper-alpha,upper-roman'.split(',') + }); + registerOption('advlist_bullet_styles', { + processor: 'string[]', + default: 'default,circle,square'.split(',') + }); + }; + const getNumberStyles = option('advlist_number_styles'); + const getBulletStyles = option('advlist_bullet_styles'); + + var global = tinymce.util.Tools.resolve('tinymce.util.Tools'); + + const isNullable = a => a === null || a === undefined; + const isNonNullable = a => !isNullable(a); + + class Optional { + constructor(tag, value) { + this.tag = tag; + this.value = value; + } + static some(value) { + return new Optional(true, value); + } + static none() { + return Optional.singletonNone; + } + fold(onNone, onSome) { + if (this.tag) { + return onSome(this.value); + } else { + return onNone(); + } + } + isSome() { + return this.tag; + } + isNone() { + return !this.tag; + } + map(mapper) { + if (this.tag) { + return Optional.some(mapper(this.value)); + } else { + return Optional.none(); + } + } + bind(binder) { + if (this.tag) { + return binder(this.value); + } else { + return Optional.none(); + } + } + exists(predicate) { + return this.tag && predicate(this.value); + } + forall(predicate) { + return !this.tag || predicate(this.value); + } + filter(predicate) { + if (!this.tag || predicate(this.value)) { + return this; + } else { + return Optional.none(); + } + } + getOr(replacement) { + return this.tag ? this.value : replacement; + } + or(replacement) { + return this.tag ? this : replacement; + } + getOrThunk(thunk) { + return this.tag ? this.value : thunk(); + } + orThunk(thunk) { + return this.tag ? this : thunk(); + } + getOrDie(message) { + if (!this.tag) { + throw new Error(message !== null && message !== void 0 ? message : 'Called getOrDie on None'); + } else { + return this.value; + } + } + static from(value) { + return isNonNullable(value) ? Optional.some(value) : Optional.none(); + } + getOrNull() { + return this.tag ? this.value : null; + } + getOrUndefined() { + return this.value; + } + each(worker) { + if (this.tag) { + worker(this.value); + } + } + toArray() { + return this.tag ? [this.value] : []; + } + toString() { + return this.tag ? `some(${ this.value })` : 'none()'; + } + } + Optional.singletonNone = new Optional(false); + + const isChildOfBody = (editor, elm) => { + return editor.dom.isChildOf(elm, editor.getBody()); + }; + const isTableCellNode = node => { + return node && /^(TH|TD)$/.test(node.nodeName); + }; + const isListNode = editor => node => { + return node && /^(OL|UL|DL)$/.test(node.nodeName) && isChildOfBody(editor, node); + }; + const getSelectedStyleType = editor => { + const listElm = editor.dom.getParent(editor.selection.getNode(), 'ol,ul'); + const style = editor.dom.getStyle(listElm, 'listStyleType'); + return Optional.from(style); + }; + + const findIndex = (list, predicate) => { + for (let index = 0; index < list.length; index++) { + const element = list[index]; + if (predicate(element)) { + return index; + } + } + return -1; + }; + const styleValueToText = styleValue => { + return styleValue.replace(/\-/g, ' ').replace(/\b\w/g, chr => { + return chr.toUpperCase(); + }); + }; + const isWithinList = (editor, e, nodeName) => { + const tableCellIndex = findIndex(e.parents, isTableCellNode); + const parents = tableCellIndex !== -1 ? e.parents.slice(0, tableCellIndex) : e.parents; + const lists = global.grep(parents, isListNode(editor)); + return lists.length > 0 && lists[0].nodeName === nodeName; + }; + const makeSetupHandler = (editor, nodeName) => api => { + const nodeChangeHandler = e => { + api.setActive(isWithinList(editor, e, nodeName)); + }; + editor.on('NodeChange', nodeChangeHandler); + return () => editor.off('NodeChange', nodeChangeHandler); + }; + const addSplitButton = (editor, id, tooltip, cmd, nodeName, styles) => { + editor.ui.registry.addSplitButton(id, { + tooltip, + icon: nodeName === 'OL' ? 'ordered-list' : 'unordered-list', + presets: 'listpreview', + columns: 3, + fetch: callback => { + const items = global.map(styles, styleValue => { + const iconStyle = nodeName === 'OL' ? 'num' : 'bull'; + const iconName = styleValue === 'disc' || styleValue === 'decimal' ? 'default' : styleValue; + const itemValue = styleValue === 'default' ? '' : styleValue; + const displayText = styleValueToText(styleValue); + return { + type: 'choiceitem', + value: itemValue, + icon: 'list-' + iconStyle + '-' + iconName, + text: displayText + }; + }); + callback(items); + }, + onAction: () => editor.execCommand(cmd), + onItemAction: (_splitButtonApi, value) => { + applyListFormat(editor, nodeName, value); + }, + select: value => { + const listStyleType = getSelectedStyleType(editor); + return listStyleType.map(listStyle => value === listStyle).getOr(false); + }, + onSetup: makeSetupHandler(editor, nodeName) + }); + }; + const addButton = (editor, id, tooltip, cmd, nodeName, _styles) => { + editor.ui.registry.addToggleButton(id, { + active: false, + tooltip, + icon: nodeName === 'OL' ? 'ordered-list' : 'unordered-list', + onSetup: makeSetupHandler(editor, nodeName), + onAction: () => editor.execCommand(cmd) + }); + }; + const addControl = (editor, id, tooltip, cmd, nodeName, styles) => { + if (styles.length > 1) { + addSplitButton(editor, id, tooltip, cmd, nodeName, styles); + } else { + addButton(editor, id, tooltip, cmd, nodeName); + } + }; + const register = editor => { + addControl(editor, 'numlist', 'Numbered list', 'InsertOrderedList', 'OL', getNumberStyles(editor)); + addControl(editor, 'bullist', 'Bullet list', 'InsertUnorderedList', 'UL', getBulletStyles(editor)); + }; + + var Plugin = () => { + global$1.add('advlist', editor => { + if (editor.hasPlugin('lists')) { + register$1(editor); + register(editor); + register$2(editor); + } else { + console.error('Please use the Lists plugin together with the Advanced List plugin.'); + } + }); + }; + + Plugin(); + +})(); diff --git a/vendor/tinymce/tinymce/plugins/advlist/plugin.min.js b/vendor/tinymce/tinymce/plugins/advlist/plugin.min.js new file mode 100644 index 00000000..a9be5939 --- /dev/null +++ b/vendor/tinymce/tinymce/plugins/advlist/plugin.min.js @@ -0,0 +1,4 @@ +/** + * TinyMCE version 6.0.2 (2022-04-27) + */ +!function(){"use strict";var t=tinymce.util.Tools.resolve("tinymce.PluginManager");const e=(t,e,r)=>{const s="UL"===e?"InsertUnorderedList":"InsertOrderedList";t.execCommand(s,!1,!1===r?null:{"list-style-type":r})},r=t=>e=>e.options.get(t),s=r("advlist_number_styles"),n=r("advlist_bullet_styles");var i=tinymce.util.Tools.resolve("tinymce.util.Tools");class l{constructor(t,e){this.tag=t,this.value=e}static some(t){return new l(!0,t)}static none(){return l.singletonNone}fold(t,e){return this.tag?e(this.value):t()}isSome(){return this.tag}isNone(){return!this.tag}map(t){return this.tag?l.some(t(this.value)):l.none()}bind(t){return this.tag?t(this.value):l.none()}exists(t){return this.tag&&t(this.value)}forall(t){return!this.tag||t(this.value)}filter(t){return!this.tag||t(this.value)?this:l.none()}getOr(t){return this.tag?this.value:t}or(t){return this.tag?this:t}getOrThunk(t){return this.tag?this.value:t()}orThunk(t){return this.tag?this:t()}getOrDie(t){if(this.tag)return this.value;throw new Error(null!=t?t:"Called getOrDie on None")}static from(t){return null==t?l.none():l.some(t)}getOrNull(){return this.tag?this.value:null}getOrUndefined(){return this.value}each(t){this.tag&&t(this.value)}toArray(){return this.tag?[this.value]:[]}toString(){return this.tag?`some(${this.value})`:"none()"}}l.singletonNone=new l(!1);const o=t=>t&&/^(TH|TD)$/.test(t.nodeName),a=(t,e)=>r=>{const s=s=>{r.setActive(((t,e,r)=>{const s=((t,e)=>{for(let r=0;re=>e&&/^(OL|UL|DL)$/.test(e.nodeName)&&((t,e)=>t.dom.isChildOf(e,t.getBody()))(t,e))(t));return l.length>0&&l[0].nodeName===r})(t,s,e))};return t.on("NodeChange",s),()=>t.off("NodeChange",s)},u=(t,r,s,n,o,u)=>{u.length>1?((t,r,s,n,o,u)=>{t.ui.registry.addSplitButton(r,{tooltip:s,icon:"OL"===o?"ordered-list":"unordered-list",presets:"listpreview",columns:3,fetch:t=>{t(i.map(u,(t=>{const e="OL"===o?"num":"bull",r="disc"===t||"decimal"===t?"default":t,s="default"===t?"":t,n=(t=>t.replace(/\-/g," ").replace(/\b\w/g,(t=>t.toUpperCase())))(t);return{type:"choiceitem",value:s,icon:"list-"+e+"-"+r,text:n}})))},onAction:()=>t.execCommand(n),onItemAction:(r,s)=>{e(t,o,s)},select:e=>{const r=(t=>{const e=t.dom.getParent(t.selection.getNode(),"ol,ul"),r=t.dom.getStyle(e,"listStyleType");return l.from(r)})(t);return r.map((t=>e===t)).getOr(!1)},onSetup:a(t,o)})})(t,r,s,n,o,u):((t,e,r,s,n,i)=>{t.ui.registry.addToggleButton(e,{active:!1,tooltip:r,icon:"OL"===n?"ordered-list":"unordered-list",onSetup:a(t,n),onAction:()=>t.execCommand(s)})})(t,r,s,n,o)};t.add("advlist",(t=>{t.hasPlugin("lists")?((t=>{const e=t.options.register;e("advlist_number_styles",{processor:"string[]",default:"default,lower-alpha,lower-greek,lower-roman,upper-alpha,upper-roman".split(",")}),e("advlist_bullet_styles",{processor:"string[]",default:"default,circle,square".split(",")})})(t),(t=>{u(t,"numlist","Numbered list","InsertOrderedList","OL",s(t)),u(t,"bullist","Bullet list","InsertUnorderedList","UL",n(t))})(t),(t=>{t.addCommand("ApplyUnorderedListStyle",((r,s)=>{e(t,"UL",s["list-style-type"])})),t.addCommand("ApplyOrderedListStyle",((r,s)=>{e(t,"OL",s["list-style-type"])}))})(t)):console.error("Please use the Lists plugin together with the Advanced List plugin.")}))}(); \ No newline at end of file diff --git a/vendor/tinymce/tinymce/plugins/anchor/index.js b/vendor/tinymce/tinymce/plugins/anchor/index.js new file mode 100644 index 00000000..ceddfe3d --- /dev/null +++ b/vendor/tinymce/tinymce/plugins/anchor/index.js @@ -0,0 +1,7 @@ +// Exports the "anchor" plugin for usage with module loaders +// Usage: +// CommonJS: +// require('tinymce/plugins/anchor') +// ES2015: +// import 'tinymce/plugins/anchor' +require('./plugin.js'); \ No newline at end of file diff --git a/vendor/tinymce/tinymce/plugins/anchor/plugin.js b/vendor/tinymce/tinymce/plugins/anchor/plugin.js new file mode 100644 index 00000000..f11bf2f2 --- /dev/null +++ b/vendor/tinymce/tinymce/plugins/anchor/plugin.js @@ -0,0 +1,195 @@ +/** + * TinyMCE version 6.0.2 (2022-04-27) + */ + +(function () { + 'use strict'; + + var global$2 = tinymce.util.Tools.resolve('tinymce.PluginManager'); + + var global$1 = tinymce.util.Tools.resolve('tinymce.dom.RangeUtils'); + + var global = tinymce.util.Tools.resolve('tinymce.util.Tools'); + + const option = name => editor => editor.options.get(name); + const register$2 = editor => { + const registerOption = editor.options.register; + registerOption('allow_html_in_named_anchor', { + processor: 'boolean', + default: false + }); + }; + const allowHtmlInNamedAnchor = option('allow_html_in_named_anchor'); + + const namedAnchorSelector = 'a:not([href])'; + const isEmptyString = str => !str; + const getIdFromAnchor = elm => { + const id = elm.getAttribute('id') || elm.getAttribute('name'); + return id || ''; + }; + const isAnchor = elm => elm && elm.nodeName.toLowerCase() === 'a'; + const isNamedAnchor = elm => isAnchor(elm) && !elm.getAttribute('href') && getIdFromAnchor(elm) !== ''; + const isEmptyNamedAnchor = elm => isNamedAnchor(elm) && !elm.firstChild; + + const removeEmptyNamedAnchorsInSelection = editor => { + const dom = editor.dom; + global$1(dom).walk(editor.selection.getRng(), nodes => { + global.each(nodes, node => { + if (isEmptyNamedAnchor(node)) { + dom.remove(node, false); + } + }); + }); + }; + const isValidId = id => /^[A-Za-z][A-Za-z0-9\-:._]*$/.test(id); + const getNamedAnchor = editor => editor.dom.getParent(editor.selection.getStart(), namedAnchorSelector); + const getId = editor => { + const anchor = getNamedAnchor(editor); + if (anchor) { + return getIdFromAnchor(anchor); + } else { + return ''; + } + }; + const createAnchor = (editor, id) => { + editor.undoManager.transact(() => { + if (!allowHtmlInNamedAnchor(editor)) { + editor.selection.collapse(true); + } + if (editor.selection.isCollapsed()) { + editor.insertContent(editor.dom.createHTML('a', { id })); + } else { + removeEmptyNamedAnchorsInSelection(editor); + editor.formatter.remove('namedAnchor', null, null, true); + editor.formatter.apply('namedAnchor', { value: id }); + editor.addVisual(); + } + }); + }; + const updateAnchor = (editor, id, anchorElement) => { + anchorElement.removeAttribute('name'); + anchorElement.id = id; + editor.addVisual(); + editor.undoManager.add(); + }; + const insert = (editor, id) => { + const anchor = getNamedAnchor(editor); + if (anchor) { + updateAnchor(editor, id, anchor); + } else { + createAnchor(editor, id); + } + editor.focus(); + }; + + const insertAnchor = (editor, newId) => { + if (!isValidId(newId)) { + editor.windowManager.alert('ID should start with a letter, followed only by letters, numbers, dashes, dots, colons or underscores.'); + return false; + } else { + insert(editor, newId); + return true; + } + }; + const open = editor => { + const currentId = getId(editor); + editor.windowManager.open({ + title: 'Anchor', + size: 'normal', + body: { + type: 'panel', + items: [{ + name: 'id', + type: 'input', + label: 'ID', + placeholder: 'example' + }] + }, + buttons: [ + { + type: 'cancel', + name: 'cancel', + text: 'Cancel' + }, + { + type: 'submit', + name: 'save', + text: 'Save', + primary: true + } + ], + initialData: { id: currentId }, + onSubmit: api => { + if (insertAnchor(editor, api.getData().id)) { + api.close(); + } + } + }); + }; + + const register$1 = editor => { + editor.addCommand('mceAnchor', () => { + open(editor); + }); + }; + + const isNamedAnchorNode = node => node && isEmptyString(node.attr('href')) && !isEmptyString(node.attr('id') || node.attr('name')); + const isEmptyNamedAnchorNode = node => isNamedAnchorNode(node) && !node.firstChild; + const setContentEditable = state => nodes => { + for (let i = 0; i < nodes.length; i++) { + const node = nodes[i]; + if (isEmptyNamedAnchorNode(node)) { + node.attr('contenteditable', state); + } + } + }; + const setup = editor => { + editor.on('PreInit', () => { + editor.parser.addNodeFilter('a', setContentEditable('false')); + editor.serializer.addNodeFilter('a', setContentEditable(null)); + }); + }; + + const registerFormats = editor => { + editor.formatter.register('namedAnchor', { + inline: 'a', + selector: namedAnchorSelector, + remove: 'all', + split: true, + deep: true, + attributes: { id: '%value' }, + onmatch: (node, _fmt, _itemName) => { + return isNamedAnchor(node); + } + }); + }; + + const register = editor => { + editor.ui.registry.addToggleButton('anchor', { + icon: 'bookmark', + tooltip: 'Anchor', + onAction: () => editor.execCommand('mceAnchor'), + onSetup: buttonApi => editor.selection.selectorChangedWithUnbind('a:not([href])', buttonApi.setActive).unbind + }); + editor.ui.registry.addMenuItem('anchor', { + icon: 'bookmark', + text: 'Anchor...', + onAction: () => editor.execCommand('mceAnchor') + }); + }; + + var Plugin = () => { + global$2.add('anchor', editor => { + register$2(editor); + setup(editor); + register$1(editor); + register(editor); + editor.on('PreInit', () => { + registerFormats(editor); + }); + }); + }; + + Plugin(); + +})(); diff --git a/vendor/tinymce/tinymce/plugins/anchor/plugin.min.js b/vendor/tinymce/tinymce/plugins/anchor/plugin.min.js new file mode 100644 index 00000000..119ac545 --- /dev/null +++ b/vendor/tinymce/tinymce/plugins/anchor/plugin.min.js @@ -0,0 +1,4 @@ +/** + * TinyMCE version 6.0.2 (2022-04-27) + */ +!function(){"use strict";var e=tinymce.util.Tools.resolve("tinymce.PluginManager"),t=tinymce.util.Tools.resolve("tinymce.dom.RangeUtils"),n=tinymce.util.Tools.resolve("tinymce.util.Tools");const o=("allow_html_in_named_anchor",e=>e.options.get("allow_html_in_named_anchor"));const a="a:not([href])",r=e=>!e,i=e=>e.getAttribute("id")||e.getAttribute("name")||"",l=e=>(e=>e&&"a"===e.nodeName.toLowerCase())(e)&&!e.getAttribute("href")&&""!==i(e),s=e=>e.dom.getParent(e.selection.getStart(),a),c=(e,a)=>{const r=s(e);r?((e,t,n)=>{n.removeAttribute("name"),n.id=t,e.addVisual(),e.undoManager.add()})(e,a,r):((e,a)=>{e.undoManager.transact((()=>{o(e)||e.selection.collapse(!0),e.selection.isCollapsed()?e.insertContent(e.dom.createHTML("a",{id:a})):((e=>{const o=e.dom;t(o).walk(e.selection.getRng(),(e=>{n.each(e,(e=>{var t;l(t=e)&&!t.firstChild&&o.remove(e,!1)}))}))})(e),e.formatter.remove("namedAnchor",null,null,!0),e.formatter.apply("namedAnchor",{value:a}),e.addVisual())}))})(e,a),e.focus()},d=e=>(e=>e&&r(e.attr("href"))&&!r(e.attr("id")||e.attr("name")))(e)&&!e.firstChild,m=e=>t=>{for(let n=0;n{(e=>{(0,e.options.register)("allow_html_in_named_anchor",{processor:"boolean",default:!1})})(e),(e=>{e.on("PreInit",(()=>{e.parser.addNodeFilter("a",m("false")),e.serializer.addNodeFilter("a",m(null))}))})(e),(e=>{e.addCommand("mceAnchor",(()=>{(e=>{const t=(e=>{const t=s(e);return t?i(t):""})(e);e.windowManager.open({title:"Anchor",size:"normal",body:{type:"panel",items:[{name:"id",type:"input",label:"ID",placeholder:"example"}]},buttons:[{type:"cancel",name:"cancel",text:"Cancel"},{type:"submit",name:"save",text:"Save",primary:!0}],initialData:{id:t},onSubmit:t=>{((e,t)=>/^[A-Za-z][A-Za-z0-9\-:._]*$/.test(t)?(c(e,t),!0):(e.windowManager.alert("ID should start with a letter, followed only by letters, numbers, dashes, dots, colons or underscores."),!1))(e,t.getData().id)&&t.close()}})})(e)}))})(e),(e=>{e.ui.registry.addToggleButton("anchor",{icon:"bookmark",tooltip:"Anchor",onAction:()=>e.execCommand("mceAnchor"),onSetup:t=>e.selection.selectorChangedWithUnbind("a:not([href])",t.setActive).unbind}),e.ui.registry.addMenuItem("anchor",{icon:"bookmark",text:"Anchor...",onAction:()=>e.execCommand("mceAnchor")})})(e),e.on("PreInit",(()=>{(e=>{e.formatter.register("namedAnchor",{inline:"a",selector:a,remove:"all",split:!0,deep:!0,attributes:{id:"%value"},onmatch:(e,t,n)=>l(e)})})(e)}))}))}(); \ No newline at end of file diff --git a/vendor/tinymce/tinymce/plugins/autolink/index.js b/vendor/tinymce/tinymce/plugins/autolink/index.js new file mode 100644 index 00000000..ae8a759d --- /dev/null +++ b/vendor/tinymce/tinymce/plugins/autolink/index.js @@ -0,0 +1,7 @@ +// Exports the "autolink" plugin for usage with module loaders +// Usage: +// CommonJS: +// require('tinymce/plugins/autolink') +// ES2015: +// import 'tinymce/plugins/autolink' +require('./plugin.js'); \ No newline at end of file diff --git a/vendor/tinymce/tinymce/plugins/autolink/plugin.js b/vendor/tinymce/tinymce/plugins/autolink/plugin.js new file mode 100644 index 00000000..d69ed1be --- /dev/null +++ b/vendor/tinymce/tinymce/plugins/autolink/plugin.js @@ -0,0 +1,204 @@ +/** + * TinyMCE version 6.0.2 (2022-04-27) + */ + +(function () { + 'use strict'; + + var global = tinymce.util.Tools.resolve('tinymce.PluginManager'); + + const link = () => /(?:[A-Za-z][A-Za-z\d.+-]{0,14}:\/\/(?:[-.~*+=!&;:'%@?^${}(),\w]+@)?|www\.|[-;:&=+$,.\w]+@)[A-Za-z\d-]+(?:\.[A-Za-z\d-]+)*(?::\d+)?(?:\/(?:[-+~=.,%()\/\w]*[-+~=%()\/\w])?)?(?:\?(?:[-.~*+=!&;:'%@?^${}(),\/\w]+))?(?:#(?:[-.~*+=!&;:'%@?^${}(),\/\w]+))?/g; + + const option = name => editor => editor.options.get(name); + const register = editor => { + const registerOption = editor.options.register; + registerOption('autolink_pattern', { + processor: 'regexp', + default: new RegExp('^' + link().source + '$', 'i') + }); + registerOption('link_default_target', { processor: 'string' }); + registerOption('link_default_protocol', { + processor: 'string', + default: 'https' + }); + }; + const getAutoLinkPattern = option('autolink_pattern'); + const getDefaultLinkTarget = option('link_default_target'); + const getDefaultLinkProtocol = option('link_default_protocol'); + + const hasProto = (v, constructor, predicate) => { + var _a; + if (predicate(v, constructor.prototype)) { + return true; + } else { + return ((_a = v.constructor) === null || _a === void 0 ? void 0 : _a.name) === constructor.name; + } + }; + const typeOf = x => { + const t = typeof x; + if (x === null) { + return 'null'; + } else if (t === 'object' && Array.isArray(x)) { + return 'array'; + } else if (t === 'object' && hasProto(x, String, (o, proto) => proto.isPrototypeOf(o))) { + return 'string'; + } else { + return t; + } + }; + const isType = type => value => typeOf(value) === type; + const isString = isType('string'); + + const checkRange = (str, substr, start) => substr === '' || str.length >= substr.length && str.substr(start, start + substr.length) === substr; + const contains = (str, substr) => { + return str.indexOf(substr) !== -1; + }; + const startsWith = (str, prefix) => { + return checkRange(str, prefix, 0); + }; + + const rangeEqualsBracketOrSpace = rangeString => /^[(\[{ \u00a0]$/.test(rangeString); + const isTextNode = node => node.nodeType === 3; + const isElement = node => node.nodeType === 1; + const handleBracket = editor => parseCurrentLine(editor, -1); + const handleSpacebar = editor => parseCurrentLine(editor, 0); + const handleEnter = editor => parseCurrentLine(editor, -1); + const scopeIndex = (container, index) => { + if (index < 0) { + index = 0; + } + if (isTextNode(container)) { + const len = container.data.length; + if (index > len) { + index = len; + } + } + return index; + }; + const setStart = (rng, container, offset) => { + if (!isElement(container) || container.hasChildNodes()) { + rng.setStart(container, scopeIndex(container, offset)); + } else { + rng.setStartBefore(container); + } + }; + const setEnd = (rng, container, offset) => { + if (!isElement(container) || container.hasChildNodes()) { + rng.setEnd(container, scopeIndex(container, offset)); + } else { + rng.setEndAfter(container); + } + }; + const hasProtocol = url => /^([A-Za-z][A-Za-z\d.+-]*:\/\/)|mailto:/.test(url); + const isPunctuation = char => /[?!,.;:]/.test(char); + const parseCurrentLine = (editor, endOffset) => { + let end, endContainer, bookmark, text, prev, len, rngText; + const autoLinkPattern = getAutoLinkPattern(editor); + const defaultLinkTarget = getDefaultLinkTarget(editor); + if (editor.dom.getParent(editor.selection.getNode(), 'a[href]') !== null) { + return; + } + const rng = editor.selection.getRng().cloneRange(); + if (rng.startOffset < 5) { + prev = rng.endContainer.previousSibling; + if (!prev) { + if (!rng.endContainer.firstChild || !rng.endContainer.firstChild.nextSibling) { + return; + } + prev = rng.endContainer.firstChild.nextSibling; + } + len = prev.length; + setStart(rng, prev, len); + setEnd(rng, prev, len); + if (rng.endOffset < 5) { + return; + } + end = rng.endOffset; + endContainer = prev; + } else { + endContainer = rng.endContainer; + if (!isTextNode(endContainer) && endContainer.firstChild) { + while (!isTextNode(endContainer) && endContainer.firstChild) { + endContainer = endContainer.firstChild; + } + if (isTextNode(endContainer)) { + setStart(rng, endContainer, 0); + setEnd(rng, endContainer, endContainer.nodeValue.length); + } + } + if (rng.endOffset === 1) { + end = 2; + } else { + end = rng.endOffset - 1 - endOffset; + } + } + const start = end; + do { + setStart(rng, endContainer, end >= 2 ? end - 2 : 0); + setEnd(rng, endContainer, end >= 1 ? end - 1 : 0); + end -= 1; + rngText = rng.toString(); + } while (!rangeEqualsBracketOrSpace(rngText) && end - 2 >= 0); + if (rangeEqualsBracketOrSpace(rng.toString())) { + setStart(rng, endContainer, end); + setEnd(rng, endContainer, start); + end += 1; + } else if (rng.startOffset === 0) { + setStart(rng, endContainer, 0); + setEnd(rng, endContainer, start); + } else { + setStart(rng, endContainer, end); + setEnd(rng, endContainer, start); + } + text = rng.toString(); + if (isPunctuation(text.charAt(text.length - 1))) { + setEnd(rng, endContainer, start - 1); + } + text = rng.toString().trim(); + const matches = text.match(autoLinkPattern); + const protocol = getDefaultLinkProtocol(editor); + if (matches) { + let url = matches[0]; + if (startsWith(url, 'www.')) { + url = protocol + '://' + url; + } else if (contains(url, '@') && !hasProtocol(url)) { + url = 'mailto:' + url; + } + bookmark = editor.selection.getBookmark(); + editor.selection.setRng(rng); + editor.getDoc().execCommand('createlink', false, url); + if (isString(defaultLinkTarget)) { + editor.dom.setAttrib(editor.selection.getNode(), 'target', defaultLinkTarget); + } + editor.selection.moveToBookmark(bookmark); + editor.nodeChanged(); + } + }; + const setup = editor => { + editor.on('keydown', e => { + if (e.keyCode === 13) { + return handleEnter(editor); + } + }); + editor.on('keypress', e => { + if (e.keyCode === 41 || e.keyCode === 93 || e.keyCode === 125) { + return handleBracket(editor); + } + }); + editor.on('keyup', e => { + if (e.keyCode === 32) { + return handleSpacebar(editor); + } + }); + }; + + var Plugin = () => { + global.add('autolink', editor => { + register(editor); + setup(editor); + }); + }; + + Plugin(); + +})(); diff --git a/vendor/tinymce/tinymce/plugins/autolink/plugin.min.js b/vendor/tinymce/tinymce/plugins/autolink/plugin.min.js new file mode 100644 index 00000000..fe1418b6 --- /dev/null +++ b/vendor/tinymce/tinymce/plugins/autolink/plugin.min.js @@ -0,0 +1,4 @@ +/** + * TinyMCE version 6.0.2 (2022-04-27) + */ +!function(){"use strict";var t=tinymce.util.Tools.resolve("tinymce.PluginManager");const e=t=>e=>e.options.get(t),n=e("autolink_pattern"),o=e("link_default_target"),r=e("link_default_protocol"),i=("string",t=>"string"===(t=>{const e=typeof t;return null===t?"null":"object"===e&&Array.isArray(t)?"array":"object"===e&&(n=o=t,(r=String).prototype.isPrototypeOf(n)||(null===(i=o.constructor)||void 0===i?void 0:i.name)===r.name)?"string":e;var n,o,r,i})(t));const s=t=>/^[(\[{ \u00a0]$/.test(t),a=t=>3===t.nodeType,l=t=>1===t.nodeType,d=(t,e)=>{if(e<0&&(e=0),a(t)){const n=t.data.length;e>n&&(e=n)}return e},f=(t,e,n)=>{!l(e)||e.hasChildNodes()?t.setStart(e,d(e,n)):t.setStartBefore(e)},g=(t,e,n)=>{!l(e)||e.hasChildNodes()?t.setEnd(e,d(e,n)):t.setEndAfter(e)},c=(t,e)=>{let l,d,c,u,h,p,k;const C=n(t),y=o(t);if(null!==t.dom.getParent(t.selection.getNode(),"a[href]"))return;const m=t.selection.getRng().cloneRange();if(m.startOffset<5){if(h=m.endContainer.previousSibling,!h){if(!m.endContainer.firstChild||!m.endContainer.firstChild.nextSibling)return;h=m.endContainer.firstChild.nextSibling}if(p=h.length,f(m,h,p),g(m,h,p),m.endOffset<5)return;l=m.endOffset,d=h}else{if(d=m.endContainer,!a(d)&&d.firstChild){for(;!a(d)&&d.firstChild;)d=d.firstChild;a(d)&&(f(m,d,0),g(m,d,d.nodeValue.length))}l=1===m.endOffset?2:m.endOffset-1-e}const w=l;do{f(m,d,l>=2?l-2:0),g(m,d,l>=1?l-1:0),l-=1,k=m.toString()}while(!s(k)&&l-2>=0);var A;s(m.toString())?(f(m,d,l),g(m,d,w),l+=1):0===m.startOffset?(f(m,d,0),g(m,d,w)):(f(m,d,l),g(m,d,w)),u=m.toString(),A=u.charAt(u.length-1),/[?!,.;:]/.test(A)&&g(m,d,w-1),u=m.toString().trim();const S=u.match(C),_=r(t);if(S){let e=S[0];O="www.",(v=e).length>=O.length&&v.substr(0,0+O.length)===O?e=_+"://"+e:((t,e)=>-1!==t.indexOf("@"))(e)&&!(t=>/^([A-Za-z][A-Za-z\d.+-]*:\/\/)|mailto:/.test(t))(e)&&(e="mailto:"+e),c=t.selection.getBookmark(),t.selection.setRng(m),t.getDoc().execCommand("createlink",!1,e),i(y)&&t.dom.setAttrib(t.selection.getNode(),"target",y),t.selection.moveToBookmark(c),t.nodeChanged()}var v,O};t.add("autolink",(t=>{(t=>{const e=t.options.register;e("autolink_pattern",{processor:"regexp",default:new RegExp("^"+/(?:[A-Za-z][A-Za-z\d.+-]{0,14}:\/\/(?:[-.~*+=!&;:'%@?^${}(),\w]+@)?|www\.|[-;:&=+$,.\w]+@)[A-Za-z\d-]+(?:\.[A-Za-z\d-]+)*(?::\d+)?(?:\/(?:[-+~=.,%()\/\w]*[-+~=%()\/\w])?)?(?:\?(?:[-.~*+=!&;:'%@?^${}(),\/\w]+))?(?:#(?:[-.~*+=!&;:'%@?^${}(),\/\w]+))?/g.source+"$","i")}),e("link_default_target",{processor:"string"}),e("link_default_protocol",{processor:"string",default:"https"})})(t),(t=>{t.on("keydown",(e=>{if(13===e.keyCode)return(t=>c(t,-1))(t)})),t.on("keypress",(e=>{if(41===e.keyCode||93===e.keyCode||125===e.keyCode)return(t=>c(t,-1))(t)})),t.on("keyup",(e=>{if(32===e.keyCode)return(t=>c(t,0))(t)}))})(t)}))}(); \ No newline at end of file diff --git a/vendor/tinymce/tinymce/plugins/autoresize/index.js b/vendor/tinymce/tinymce/plugins/autoresize/index.js new file mode 100644 index 00000000..a4a7a42c --- /dev/null +++ b/vendor/tinymce/tinymce/plugins/autoresize/index.js @@ -0,0 +1,7 @@ +// Exports the "autoresize" plugin for usage with module loaders +// Usage: +// CommonJS: +// require('tinymce/plugins/autoresize') +// ES2015: +// import 'tinymce/plugins/autoresize' +require('./plugin.js'); \ No newline at end of file diff --git a/vendor/tinymce/tinymce/plugins/autoresize/plugin.js b/vendor/tinymce/tinymce/plugins/autoresize/plugin.js new file mode 100644 index 00000000..6a0966aa --- /dev/null +++ b/vendor/tinymce/tinymce/plugins/autoresize/plugin.js @@ -0,0 +1,156 @@ +/** + * TinyMCE version 6.0.2 (2022-04-27) + */ + +(function () { + 'use strict'; + + const Cell = initial => { + let value = initial; + const get = () => { + return value; + }; + const set = v => { + value = v; + }; + return { + get, + set + }; + }; + + var global$1 = tinymce.util.Tools.resolve('tinymce.PluginManager'); + + var global = tinymce.util.Tools.resolve('tinymce.Env'); + + const fireResizeEditor = editor => editor.dispatch('ResizeEditor'); + + const option = name => editor => editor.options.get(name); + const register$1 = editor => { + const registerOption = editor.options.register; + registerOption('autoresize_overflow_padding', { + processor: 'number', + default: 1 + }); + registerOption('autoresize_bottom_margin', { + processor: 'number', + default: 50 + }); + }; + const getMinHeight = option('min_height'); + const getMaxHeight = option('max_height'); + const getAutoResizeOverflowPadding = option('autoresize_overflow_padding'); + const getAutoResizeBottomMargin = option('autoresize_bottom_margin'); + + const isFullscreen = editor => editor.plugins.fullscreen && editor.plugins.fullscreen.isFullscreen(); + const toggleScrolling = (editor, state) => { + const body = editor.getBody(); + if (body) { + body.style.overflowY = state ? '' : 'hidden'; + if (!state) { + body.scrollTop = 0; + } + } + }; + const parseCssValueToInt = (dom, elm, name, computed) => { + const value = parseInt(dom.getStyle(elm, name, computed), 10); + return isNaN(value) ? 0 : value; + }; + const shouldScrollIntoView = trigger => { + if ((trigger === null || trigger === void 0 ? void 0 : trigger.type.toLowerCase()) === 'setcontent') { + const setContentEvent = trigger; + return setContentEvent.selection === true || setContentEvent.paste === true; + } else { + return false; + } + }; + const resize = (editor, oldSize, trigger) => { + var _a; + const dom = editor.dom; + const doc = editor.getDoc(); + if (!doc) { + return; + } + if (isFullscreen(editor)) { + toggleScrolling(editor, true); + return; + } + const docEle = doc.documentElement; + const resizeBottomMargin = getAutoResizeBottomMargin(editor); + const minHeight = (_a = getMinHeight(editor)) !== null && _a !== void 0 ? _a : editor.getElement().offsetHeight; + let resizeHeight = minHeight; + const marginTop = parseCssValueToInt(dom, docEle, 'margin-top', true); + const marginBottom = parseCssValueToInt(dom, docEle, 'margin-bottom', true); + let contentHeight = docEle.offsetHeight + marginTop + marginBottom + resizeBottomMargin; + if (contentHeight < 0) { + contentHeight = 0; + } + const containerHeight = editor.getContainer().offsetHeight; + const contentAreaHeight = editor.getContentAreaContainer().offsetHeight; + const chromeHeight = containerHeight - contentAreaHeight; + if (contentHeight + chromeHeight > minHeight) { + resizeHeight = contentHeight + chromeHeight; + } + const maxHeight = getMaxHeight(editor); + if (maxHeight && resizeHeight > maxHeight) { + resizeHeight = maxHeight; + toggleScrolling(editor, true); + } else { + toggleScrolling(editor, false); + } + if (resizeHeight !== oldSize.get()) { + const deltaSize = resizeHeight - oldSize.get(); + dom.setStyle(editor.getContainer(), 'height', resizeHeight + 'px'); + oldSize.set(resizeHeight); + fireResizeEditor(editor); + if (global.browser.isSafari() && (global.os.isMacOS() || global.os.isiOS())) { + const win = editor.getWin(); + win.scrollTo(win.pageXOffset, win.pageYOffset); + } + if (editor.hasFocus() && shouldScrollIntoView(trigger)) { + editor.selection.scrollIntoView(); + } + if ((global.browser.isSafari() || global.browser.isChromium()) && deltaSize < 0) { + resize(editor, oldSize, trigger); + } + } + }; + const setup = (editor, oldSize) => { + editor.on('init', () => { + const overflowPadding = getAutoResizeOverflowPadding(editor); + const dom = editor.dom; + dom.setStyles(editor.getDoc().documentElement, { height: 'auto' }); + dom.setStyles(editor.getBody(), { + 'paddingLeft': overflowPadding, + 'paddingRight': overflowPadding, + 'min-height': 0 + }); + }); + editor.on('NodeChange SetContent keyup FullscreenStateChanged ResizeContent', e => { + resize(editor, oldSize, e); + }); + }; + + const register = (editor, oldSize) => { + editor.addCommand('mceAutoResize', () => { + resize(editor, oldSize); + }); + }; + + var Plugin = () => { + global$1.add('autoresize', editor => { + register$1(editor); + if (!editor.options.isSet('resize')) { + editor.options.set('resize', false); + } + if (!editor.inline) { + const oldSize = Cell(0); + register(editor, oldSize); + setup(editor, oldSize); + } + }); + }; + + Plugin(); + +})(); diff --git a/vendor/tinymce/tinymce/plugins/autoresize/plugin.min.js b/vendor/tinymce/tinymce/plugins/autoresize/plugin.min.js new file mode 100644 index 00000000..4def645f --- /dev/null +++ b/vendor/tinymce/tinymce/plugins/autoresize/plugin.min.js @@ -0,0 +1,4 @@ +/** + * TinyMCE version 6.0.2 (2022-04-27) + */ +!function(){"use strict";var e=tinymce.util.Tools.resolve("tinymce.PluginManager"),t=tinymce.util.Tools.resolve("tinymce.Env");const o=e=>t=>t.options.get(e),n=o("min_height"),s=o("max_height"),i=o("autoresize_overflow_padding"),r=o("autoresize_bottom_margin"),l=(e,t)=>{const o=e.getBody();o&&(o.style.overflowY=t?"":"hidden",t||(o.scrollTop=0))},a=(e,t,o,n)=>{const s=parseInt(e.getStyle(t,o,n),10);return isNaN(s)?0:s},g=(e,o,i)=>{var c;const u=e.dom,d=e.getDoc();if(!d)return;if((e=>e.plugins.fullscreen&&e.plugins.fullscreen.isFullscreen())(e))return void l(e,!0);const f=d.documentElement,m=r(e),p=null!==(c=n(e))&&void 0!==c?c:e.getElement().offsetHeight;let h=p;const y=a(u,f,"margin-top",!0),v=a(u,f,"margin-bottom",!0);let C=f.offsetHeight+y+v+m;C<0&&(C=0);const S=e.getContainer().offsetHeight-e.getContentAreaContainer().offsetHeight;C+S>p&&(h=C+S);const z=s(e);if(z&&h>z?(h=z,l(e,!0)):l(e,!1),h!==o.get()){const n=h-o.get();if(u.setStyle(e.getContainer(),"height",h+"px"),o.set(h),(e=>{e.dispatch("ResizeEditor")})(e),t.browser.isSafari()&&(t.os.isMacOS()||t.os.isiOS())){const t=e.getWin();t.scrollTo(t.pageXOffset,t.pageYOffset)}e.hasFocus()&&(e=>{if("setcontent"===(null==e?void 0:e.type.toLowerCase())){const t=e;return!0===t.selection||!0===t.paste}return!1})(i)&&e.selection.scrollIntoView(),(t.browser.isSafari()||t.browser.isChromium())&&n<0&&g(e,o,i)}};e.add("autoresize",(e=>{if((e=>{const t=e.options.register;t("autoresize_overflow_padding",{processor:"number",default:1}),t("autoresize_bottom_margin",{processor:"number",default:50})})(e),e.options.isSet("resize")||e.options.set("resize",!1),!e.inline){const t=(e=>{let t=0;return{get:()=>t,set:e=>{t=e}}})();((e,t)=>{e.addCommand("mceAutoResize",(()=>{g(e,t)}))})(e,t),((e,t)=>{e.on("init",(()=>{const t=i(e),o=e.dom;o.setStyles(e.getDoc().documentElement,{height:"auto"}),o.setStyles(e.getBody(),{paddingLeft:t,paddingRight:t,"min-height":0})})),e.on("NodeChange SetContent keyup FullscreenStateChanged ResizeContent",(o=>{g(e,t,o)}))})(e,t)}}))}(); \ No newline at end of file diff --git a/vendor/tinymce/tinymce/plugins/autosave/index.js b/vendor/tinymce/tinymce/plugins/autosave/index.js new file mode 100644 index 00000000..261d5c99 --- /dev/null +++ b/vendor/tinymce/tinymce/plugins/autosave/index.js @@ -0,0 +1,7 @@ +// Exports the "autosave" plugin for usage with module loaders +// Usage: +// CommonJS: +// require('tinymce/plugins/autosave') +// ES2015: +// import 'tinymce/plugins/autosave' +require('./plugin.js'); \ No newline at end of file diff --git a/vendor/tinymce/tinymce/plugins/autosave/plugin.js b/vendor/tinymce/tinymce/plugins/autosave/plugin.js new file mode 100644 index 00000000..3ac2395f --- /dev/null +++ b/vendor/tinymce/tinymce/plugins/autosave/plugin.js @@ -0,0 +1,232 @@ +/** + * TinyMCE version 6.0.2 (2022-04-27) + */ + +(function () { + 'use strict'; + + var global$4 = tinymce.util.Tools.resolve('tinymce.PluginManager'); + + const hasProto = (v, constructor, predicate) => { + var _a; + if (predicate(v, constructor.prototype)) { + return true; + } else { + return ((_a = v.constructor) === null || _a === void 0 ? void 0 : _a.name) === constructor.name; + } + }; + const typeOf = x => { + const t = typeof x; + if (x === null) { + return 'null'; + } else if (t === 'object' && Array.isArray(x)) { + return 'array'; + } else if (t === 'object' && hasProto(x, String, (o, proto) => proto.isPrototypeOf(o))) { + return 'string'; + } else { + return t; + } + }; + const isType = type => value => typeOf(value) === type; + const eq = t => a => t === a; + const isString = isType('string'); + const isUndefined = eq(undefined); + + var global$3 = tinymce.util.Tools.resolve('tinymce.util.Delay'); + + var global$2 = tinymce.util.Tools.resolve('tinymce.util.LocalStorage'); + + var global$1 = tinymce.util.Tools.resolve('tinymce.util.Tools'); + + const fireRestoreDraft = editor => editor.dispatch('RestoreDraft'); + const fireStoreDraft = editor => editor.dispatch('StoreDraft'); + const fireRemoveDraft = editor => editor.dispatch('RemoveDraft'); + + const parse = timeString => { + const multiples = { + s: 1000, + m: 60000 + }; + const parsedTime = /^(\d+)([ms]?)$/.exec(timeString); + return (parsedTime[2] ? multiples[parsedTime[2]] : 1) * parseInt(timeString, 10); + }; + + const option = name => editor => editor.options.get(name); + const register$1 = editor => { + const registerOption = editor.options.register; + const timeProcessor = value => { + const valid = isString(value); + if (valid) { + return { + value: parse(value), + valid + }; + } else { + return { + valid: false, + message: 'Must be a string.' + }; + } + }; + registerOption('autosave_ask_before_unload', { + processor: 'boolean', + default: true + }); + registerOption('autosave_prefix', { + processor: 'string', + default: 'tinymce-autosave-{path}{query}{hash}-{id}-' + }); + registerOption('autosave_restore_when_empty', { + processor: 'boolean', + default: false + }); + registerOption('autosave_interval', { + processor: timeProcessor, + default: '30s' + }); + registerOption('autosave_retention', { + processor: timeProcessor, + default: '20m' + }); + }; + const shouldAskBeforeUnload = option('autosave_ask_before_unload'); + const shouldRestoreWhenEmpty = option('autosave_restore_when_empty'); + const getAutoSaveInterval = option('autosave_interval'); + const getAutoSaveRetention = option('autosave_retention'); + const getAutoSavePrefix = editor => { + const location = document.location; + return editor.options.get('autosave_prefix').replace(/{path}/g, location.pathname).replace(/{query}/g, location.search).replace(/{hash}/g, location.hash).replace(/{id}/g, editor.id); + }; + + const isEmpty = (editor, html) => { + if (isUndefined(html)) { + return editor.dom.isEmpty(editor.getBody()); + } else { + const trimmedHtml = global$1.trim(html); + if (trimmedHtml === '') { + return true; + } else { + const fragment = new DOMParser().parseFromString(trimmedHtml, 'text/html'); + return editor.dom.isEmpty(fragment); + } + } + }; + const hasDraft = editor => { + const time = parseInt(global$2.getItem(getAutoSavePrefix(editor) + 'time'), 10) || 0; + if (new Date().getTime() - time > getAutoSaveRetention(editor)) { + removeDraft(editor, false); + return false; + } + return true; + }; + const removeDraft = (editor, fire) => { + const prefix = getAutoSavePrefix(editor); + global$2.removeItem(prefix + 'draft'); + global$2.removeItem(prefix + 'time'); + if (fire !== false) { + fireRemoveDraft(editor); + } + }; + const storeDraft = editor => { + const prefix = getAutoSavePrefix(editor); + if (!isEmpty(editor) && editor.isDirty()) { + global$2.setItem(prefix + 'draft', editor.getContent({ + format: 'raw', + no_events: true + })); + global$2.setItem(prefix + 'time', new Date().getTime().toString()); + fireStoreDraft(editor); + } + }; + const restoreDraft = editor => { + const prefix = getAutoSavePrefix(editor); + if (hasDraft(editor)) { + editor.setContent(global$2.getItem(prefix + 'draft'), { format: 'raw' }); + fireRestoreDraft(editor); + } + }; + const startStoreDraft = editor => { + const interval = getAutoSaveInterval(editor); + global$3.setEditorInterval(editor, () => { + storeDraft(editor); + }, interval); + }; + const restoreLastDraft = editor => { + editor.undoManager.transact(() => { + restoreDraft(editor); + removeDraft(editor); + }); + editor.focus(); + }; + + const get = editor => ({ + hasDraft: () => hasDraft(editor), + storeDraft: () => storeDraft(editor), + restoreDraft: () => restoreDraft(editor), + removeDraft: fire => removeDraft(editor, fire), + isEmpty: html => isEmpty(editor, html) + }); + + var global = tinymce.util.Tools.resolve('tinymce.EditorManager'); + + const setup = editor => { + editor.editorManager.on('BeforeUnload', e => { + let msg; + global$1.each(global.get(), editor => { + if (editor.plugins.autosave) { + editor.plugins.autosave.storeDraft(); + } + if (!msg && editor.isDirty() && shouldAskBeforeUnload(editor)) { + msg = editor.translate('You have unsaved changes are you sure you want to navigate away?'); + } + }); + if (msg) { + e.preventDefault(); + e.returnValue = msg; + } + }); + }; + + const makeSetupHandler = editor => api => { + api.setEnabled(hasDraft(editor)); + const editorEventCallback = () => api.setEnabled(hasDraft(editor)); + editor.on('StoreDraft RestoreDraft RemoveDraft', editorEventCallback); + return () => editor.off('StoreDraft RestoreDraft RemoveDraft', editorEventCallback); + }; + const register = editor => { + startStoreDraft(editor); + editor.ui.registry.addButton('restoredraft', { + tooltip: 'Restore last draft', + icon: 'restore-draft', + onAction: () => { + restoreLastDraft(editor); + }, + onSetup: makeSetupHandler(editor) + }); + editor.ui.registry.addMenuItem('restoredraft', { + text: 'Restore last draft', + icon: 'restore-draft', + onAction: () => { + restoreLastDraft(editor); + }, + onSetup: makeSetupHandler(editor) + }); + }; + + var Plugin = () => { + global$4.add('autosave', editor => { + register$1(editor); + setup(editor); + register(editor); + editor.on('init', () => { + if (shouldRestoreWhenEmpty(editor) && editor.dom.isEmpty(editor.getBody())) { + restoreDraft(editor); + } + }); + return get(editor); + }); + }; + + Plugin(); + +})(); diff --git a/vendor/tinymce/tinymce/plugins/autosave/plugin.min.js b/vendor/tinymce/tinymce/plugins/autosave/plugin.min.js new file mode 100644 index 00000000..d19bd65d --- /dev/null +++ b/vendor/tinymce/tinymce/plugins/autosave/plugin.min.js @@ -0,0 +1,4 @@ +/** + * TinyMCE version 6.0.2 (2022-04-27) + */ +!function(){"use strict";var t=tinymce.util.Tools.resolve("tinymce.PluginManager");const e=("string",t=>"string"===(t=>{const e=typeof t;return null===t?"null":"object"===e&&Array.isArray(t)?"array":"object"===e&&(r=o=t,(a=String).prototype.isPrototypeOf(r)||(null===(s=o.constructor)||void 0===s?void 0:s.name)===a.name)?"string":e;var r,o,a,s})(t));const r=(void 0,t=>undefined===t);var o=tinymce.util.Tools.resolve("tinymce.util.Delay"),a=tinymce.util.Tools.resolve("tinymce.util.LocalStorage"),s=tinymce.util.Tools.resolve("tinymce.util.Tools");const n=t=>{const e=/^(\d+)([ms]?)$/.exec(t);return(e[2]?{s:1e3,m:6e4}[e[2]]:1)*parseInt(t,10)},i=t=>e=>e.options.get(t),u=i("autosave_ask_before_unload"),l=i("autosave_restore_when_empty"),c=i("autosave_interval"),m=i("autosave_retention"),d=t=>{const e=document.location;return t.options.get("autosave_prefix").replace(/{path}/g,e.pathname).replace(/{query}/g,e.search).replace(/{hash}/g,e.hash).replace(/{id}/g,t.id)},f=(t,e)=>{if(r(e))return t.dom.isEmpty(t.getBody());{const r=s.trim(e);if(""===r)return!0;{const e=(new DOMParser).parseFromString(r,"text/html");return t.dom.isEmpty(e)}}},v=t=>{const e=parseInt(a.getItem(d(t)+"time"),10)||0;return!((new Date).getTime()-e>m(t)&&(p(t,!1),1))},p=(t,e)=>{const r=d(t);a.removeItem(r+"draft"),a.removeItem(r+"time"),!1!==e&&(t=>{t.dispatch("RemoveDraft")})(t)},g=t=>{const e=d(t);!f(t)&&t.isDirty()&&(a.setItem(e+"draft",t.getContent({format:"raw",no_events:!0})),a.setItem(e+"time",(new Date).getTime().toString()),(t=>{t.dispatch("StoreDraft")})(t))},y=t=>{const e=d(t);v(t)&&(t.setContent(a.getItem(e+"draft"),{format:"raw"}),(t=>{t.dispatch("RestoreDraft")})(t))},D=t=>{t.undoManager.transact((()=>{y(t),p(t)})),t.focus()};var h=tinymce.util.Tools.resolve("tinymce.EditorManager");const _=t=>e=>{e.setEnabled(v(t));const r=()=>e.setEnabled(v(t));return t.on("StoreDraft RestoreDraft RemoveDraft",r),()=>t.off("StoreDraft RestoreDraft RemoveDraft",r)};t.add("autosave",(t=>((t=>{const r=t.options.register,o=t=>{const r=e(t);return r?{value:n(t),valid:r}:{valid:!1,message:"Must be a string."}};r("autosave_ask_before_unload",{processor:"boolean",default:!0}),r("autosave_prefix",{processor:"string",default:"tinymce-autosave-{path}{query}{hash}-{id}-"}),r("autosave_restore_when_empty",{processor:"boolean",default:!1}),r("autosave_interval",{processor:o,default:"30s"}),r("autosave_retention",{processor:o,default:"20m"})})(t),(t=>{t.editorManager.on("BeforeUnload",(t=>{let e;s.each(h.get(),(t=>{t.plugins.autosave&&t.plugins.autosave.storeDraft(),!e&&t.isDirty()&&u(t)&&(e=t.translate("You have unsaved changes are you sure you want to navigate away?"))})),e&&(t.preventDefault(),t.returnValue=e)}))})(t),(t=>{(t=>{const e=c(t);o.setEditorInterval(t,(()=>{g(t)}),e)})(t),t.ui.registry.addButton("restoredraft",{tooltip:"Restore last draft",icon:"restore-draft",onAction:()=>{D(t)},onSetup:_(t)}),t.ui.registry.addMenuItem("restoredraft",{text:"Restore last draft",icon:"restore-draft",onAction:()=>{D(t)},onSetup:_(t)})})(t),t.on("init",(()=>{l(t)&&t.dom.isEmpty(t.getBody())&&y(t)})),(t=>({hasDraft:()=>v(t),storeDraft:()=>g(t),restoreDraft:()=>y(t),removeDraft:e=>p(t,e),isEmpty:e=>f(t,e)}))(t))))}(); \ No newline at end of file diff --git a/vendor/tinymce/tinymce/plugins/charmap/index.js b/vendor/tinymce/tinymce/plugins/charmap/index.js new file mode 100644 index 00000000..13a16738 --- /dev/null +++ b/vendor/tinymce/tinymce/plugins/charmap/index.js @@ -0,0 +1,7 @@ +// Exports the "charmap" plugin for usage with module loaders +// Usage: +// CommonJS: +// require('tinymce/plugins/charmap') +// ES2015: +// import 'tinymce/plugins/charmap' +require('./plugin.js'); \ No newline at end of file diff --git a/vendor/tinymce/tinymce/plugins/charmap/plugin.js b/vendor/tinymce/tinymce/plugins/charmap/plugin.js new file mode 100644 index 00000000..941da378 --- /dev/null +++ b/vendor/tinymce/tinymce/plugins/charmap/plugin.js @@ -0,0 +1,1636 @@ +/** + * TinyMCE version 6.0.2 (2022-04-27) + */ + +(function () { + 'use strict'; + + var global$1 = tinymce.util.Tools.resolve('tinymce.PluginManager'); + + const fireInsertCustomChar = (editor, chr) => { + return editor.dispatch('insertCustomChar', { chr }); + }; + + const insertChar = (editor, chr) => { + const evtChr = fireInsertCustomChar(editor, chr).chr; + editor.execCommand('mceInsertContent', false, evtChr); + }; + + const hasProto = (v, constructor, predicate) => { + var _a; + if (predicate(v, constructor.prototype)) { + return true; + } else { + return ((_a = v.constructor) === null || _a === void 0 ? void 0 : _a.name) === constructor.name; + } + }; + const typeOf = x => { + const t = typeof x; + if (x === null) { + return 'null'; + } else if (t === 'object' && Array.isArray(x)) { + return 'array'; + } else if (t === 'object' && hasProto(x, String, (o, proto) => proto.isPrototypeOf(o))) { + return 'string'; + } else { + return t; + } + }; + const isType = type => value => typeOf(value) === type; + const isSimpleType = type => value => typeof value === type; + const eq = t => a => t === a; + const isArray$1 = isType('array'); + const isNull = eq(null); + const isNullable = a => a === null || a === undefined; + const isNonNullable = a => !isNullable(a); + const isFunction = isSimpleType('function'); + + const constant = value => { + return () => { + return value; + }; + }; + const never = constant(false); + + class Optional { + constructor(tag, value) { + this.tag = tag; + this.value = value; + } + static some(value) { + return new Optional(true, value); + } + static none() { + return Optional.singletonNone; + } + fold(onNone, onSome) { + if (this.tag) { + return onSome(this.value); + } else { + return onNone(); + } + } + isSome() { + return this.tag; + } + isNone() { + return !this.tag; + } + map(mapper) { + if (this.tag) { + return Optional.some(mapper(this.value)); + } else { + return Optional.none(); + } + } + bind(binder) { + if (this.tag) { + return binder(this.value); + } else { + return Optional.none(); + } + } + exists(predicate) { + return this.tag && predicate(this.value); + } + forall(predicate) { + return !this.tag || predicate(this.value); + } + filter(predicate) { + if (!this.tag || predicate(this.value)) { + return this; + } else { + return Optional.none(); + } + } + getOr(replacement) { + return this.tag ? this.value : replacement; + } + or(replacement) { + return this.tag ? this : replacement; + } + getOrThunk(thunk) { + return this.tag ? this.value : thunk(); + } + orThunk(thunk) { + return this.tag ? this : thunk(); + } + getOrDie(message) { + if (!this.tag) { + throw new Error(message !== null && message !== void 0 ? message : 'Called getOrDie on None'); + } else { + return this.value; + } + } + static from(value) { + return isNonNullable(value) ? Optional.some(value) : Optional.none(); + } + getOrNull() { + return this.tag ? this.value : null; + } + getOrUndefined() { + return this.value; + } + each(worker) { + if (this.tag) { + worker(this.value); + } + } + toArray() { + return this.tag ? [this.value] : []; + } + toString() { + return this.tag ? `some(${ this.value })` : 'none()'; + } + } + Optional.singletonNone = new Optional(false); + + const nativePush = Array.prototype.push; + const map = (xs, f) => { + const len = xs.length; + const r = new Array(len); + for (let i = 0; i < len; i++) { + const x = xs[i]; + r[i] = f(x, i); + } + return r; + }; + const each = (xs, f) => { + for (let i = 0, len = xs.length; i < len; i++) { + const x = xs[i]; + f(x, i); + } + }; + const findUntil = (xs, pred, until) => { + for (let i = 0, len = xs.length; i < len; i++) { + const x = xs[i]; + if (pred(x, i)) { + return Optional.some(x); + } else if (until(x, i)) { + break; + } + } + return Optional.none(); + }; + const find = (xs, pred) => { + return findUntil(xs, pred, never); + }; + const flatten = xs => { + const r = []; + for (let i = 0, len = xs.length; i < len; ++i) { + if (!isArray$1(xs[i])) { + throw new Error('Arr.flatten item ' + i + ' was not an array, input: ' + xs); + } + nativePush.apply(r, xs[i]); + } + return r; + }; + const bind = (xs, f) => flatten(map(xs, f)); + + var global = tinymce.util.Tools.resolve('tinymce.util.Tools'); + + const option = name => editor => editor.options.get(name); + const register$2 = editor => { + const registerOption = editor.options.register; + const charMapProcessor = value => isFunction(value) || isArray$1(value); + registerOption('charmap', { processor: charMapProcessor }); + registerOption('charmap_append', { processor: charMapProcessor }); + }; + const getCharMap$1 = option('charmap'); + const getCharMapAppend = option('charmap_append'); + + const isArray = global.isArray; + const UserDefined = 'User Defined'; + const getDefaultCharMap = () => { + return [ + { + name: 'Currency', + characters: [ + [ + 36, + 'dollar sign' + ], + [ + 162, + 'cent sign' + ], + [ + 8364, + 'euro sign' + ], + [ + 163, + 'pound sign' + ], + [ + 165, + 'yen sign' + ], + [ + 164, + 'currency sign' + ], + [ + 8352, + 'euro-currency sign' + ], + [ + 8353, + 'colon sign' + ], + [ + 8354, + 'cruzeiro sign' + ], + [ + 8355, + 'french franc sign' + ], + [ + 8356, + 'lira sign' + ], + [ + 8357, + 'mill sign' + ], + [ + 8358, + 'naira sign' + ], + [ + 8359, + 'peseta sign' + ], + [ + 8360, + 'rupee sign' + ], + [ + 8361, + 'won sign' + ], + [ + 8362, + 'new sheqel sign' + ], + [ + 8363, + 'dong sign' + ], + [ + 8365, + 'kip sign' + ], + [ + 8366, + 'tugrik sign' + ], + [ + 8367, + 'drachma sign' + ], + [ + 8368, + 'german penny symbol' + ], + [ + 8369, + 'peso sign' + ], + [ + 8370, + 'guarani sign' + ], + [ + 8371, + 'austral sign' + ], + [ + 8372, + 'hryvnia sign' + ], + [ + 8373, + 'cedi sign' + ], + [ + 8374, + 'livre tournois sign' + ], + [ + 8375, + 'spesmilo sign' + ], + [ + 8376, + 'tenge sign' + ], + [ + 8377, + 'indian rupee sign' + ], + [ + 8378, + 'turkish lira sign' + ], + [ + 8379, + 'nordic mark sign' + ], + [ + 8380, + 'manat sign' + ], + [ + 8381, + 'ruble sign' + ], + [ + 20870, + 'yen character' + ], + [ + 20803, + 'yuan character' + ], + [ + 22291, + 'yuan character, in hong kong and taiwan' + ], + [ + 22278, + 'yen/yuan character variant one' + ] + ] + }, + { + name: 'Text', + characters: [ + [ + 169, + 'copyright sign' + ], + [ + 174, + 'registered sign' + ], + [ + 8482, + 'trade mark sign' + ], + [ + 8240, + 'per mille sign' + ], + [ + 181, + 'micro sign' + ], + [ + 183, + 'middle dot' + ], + [ + 8226, + 'bullet' + ], + [ + 8230, + 'three dot leader' + ], + [ + 8242, + 'minutes / feet' + ], + [ + 8243, + 'seconds / inches' + ], + [ + 167, + 'section sign' + ], + [ + 182, + 'paragraph sign' + ], + [ + 223, + 'sharp s / ess-zed' + ] + ] + }, + { + name: 'Quotations', + characters: [ + [ + 8249, + 'single left-pointing angle quotation mark' + ], + [ + 8250, + 'single right-pointing angle quotation mark' + ], + [ + 171, + 'left pointing guillemet' + ], + [ + 187, + 'right pointing guillemet' + ], + [ + 8216, + 'left single quotation mark' + ], + [ + 8217, + 'right single quotation mark' + ], + [ + 8220, + 'left double quotation mark' + ], + [ + 8221, + 'right double quotation mark' + ], + [ + 8218, + 'single low-9 quotation mark' + ], + [ + 8222, + 'double low-9 quotation mark' + ], + [ + 60, + 'less-than sign' + ], + [ + 62, + 'greater-than sign' + ], + [ + 8804, + 'less-than or equal to' + ], + [ + 8805, + 'greater-than or equal to' + ], + [ + 8211, + 'en dash' + ], + [ + 8212, + 'em dash' + ], + [ + 175, + 'macron' + ], + [ + 8254, + 'overline' + ], + [ + 164, + 'currency sign' + ], + [ + 166, + 'broken bar' + ], + [ + 168, + 'diaeresis' + ], + [ + 161, + 'inverted exclamation mark' + ], + [ + 191, + 'turned question mark' + ], + [ + 710, + 'circumflex accent' + ], + [ + 732, + 'small tilde' + ], + [ + 176, + 'degree sign' + ], + [ + 8722, + 'minus sign' + ], + [ + 177, + 'plus-minus sign' + ], + [ + 247, + 'division sign' + ], + [ + 8260, + 'fraction slash' + ], + [ + 215, + 'multiplication sign' + ], + [ + 185, + 'superscript one' + ], + [ + 178, + 'superscript two' + ], + [ + 179, + 'superscript three' + ], + [ + 188, + 'fraction one quarter' + ], + [ + 189, + 'fraction one half' + ], + [ + 190, + 'fraction three quarters' + ] + ] + }, + { + name: 'Mathematical', + characters: [ + [ + 402, + 'function / florin' + ], + [ + 8747, + 'integral' + ], + [ + 8721, + 'n-ary sumation' + ], + [ + 8734, + 'infinity' + ], + [ + 8730, + 'square root' + ], + [ + 8764, + 'similar to' + ], + [ + 8773, + 'approximately equal to' + ], + [ + 8776, + 'almost equal to' + ], + [ + 8800, + 'not equal to' + ], + [ + 8801, + 'identical to' + ], + [ + 8712, + 'element of' + ], + [ + 8713, + 'not an element of' + ], + [ + 8715, + 'contains as member' + ], + [ + 8719, + 'n-ary product' + ], + [ + 8743, + 'logical and' + ], + [ + 8744, + 'logical or' + ], + [ + 172, + 'not sign' + ], + [ + 8745, + 'intersection' + ], + [ + 8746, + 'union' + ], + [ + 8706, + 'partial differential' + ], + [ + 8704, + 'for all' + ], + [ + 8707, + 'there exists' + ], + [ + 8709, + 'diameter' + ], + [ + 8711, + 'backward difference' + ], + [ + 8727, + 'asterisk operator' + ], + [ + 8733, + 'proportional to' + ], + [ + 8736, + 'angle' + ] + ] + }, + { + name: 'Extended Latin', + characters: [ + [ + 192, + 'A - grave' + ], + [ + 193, + 'A - acute' + ], + [ + 194, + 'A - circumflex' + ], + [ + 195, + 'A - tilde' + ], + [ + 196, + 'A - diaeresis' + ], + [ + 197, + 'A - ring above' + ], + [ + 256, + 'A - macron' + ], + [ + 198, + 'ligature AE' + ], + [ + 199, + 'C - cedilla' + ], + [ + 200, + 'E - grave' + ], + [ + 201, + 'E - acute' + ], + [ + 202, + 'E - circumflex' + ], + [ + 203, + 'E - diaeresis' + ], + [ + 274, + 'E - macron' + ], + [ + 204, + 'I - grave' + ], + [ + 205, + 'I - acute' + ], + [ + 206, + 'I - circumflex' + ], + [ + 207, + 'I - diaeresis' + ], + [ + 298, + 'I - macron' + ], + [ + 208, + 'ETH' + ], + [ + 209, + 'N - tilde' + ], + [ + 210, + 'O - grave' + ], + [ + 211, + 'O - acute' + ], + [ + 212, + 'O - circumflex' + ], + [ + 213, + 'O - tilde' + ], + [ + 214, + 'O - diaeresis' + ], + [ + 216, + 'O - slash' + ], + [ + 332, + 'O - macron' + ], + [ + 338, + 'ligature OE' + ], + [ + 352, + 'S - caron' + ], + [ + 217, + 'U - grave' + ], + [ + 218, + 'U - acute' + ], + [ + 219, + 'U - circumflex' + ], + [ + 220, + 'U - diaeresis' + ], + [ + 362, + 'U - macron' + ], + [ + 221, + 'Y - acute' + ], + [ + 376, + 'Y - diaeresis' + ], + [ + 562, + 'Y - macron' + ], + [ + 222, + 'THORN' + ], + [ + 224, + 'a - grave' + ], + [ + 225, + 'a - acute' + ], + [ + 226, + 'a - circumflex' + ], + [ + 227, + 'a - tilde' + ], + [ + 228, + 'a - diaeresis' + ], + [ + 229, + 'a - ring above' + ], + [ + 257, + 'a - macron' + ], + [ + 230, + 'ligature ae' + ], + [ + 231, + 'c - cedilla' + ], + [ + 232, + 'e - grave' + ], + [ + 233, + 'e - acute' + ], + [ + 234, + 'e - circumflex' + ], + [ + 235, + 'e - diaeresis' + ], + [ + 275, + 'e - macron' + ], + [ + 236, + 'i - grave' + ], + [ + 237, + 'i - acute' + ], + [ + 238, + 'i - circumflex' + ], + [ + 239, + 'i - diaeresis' + ], + [ + 299, + 'i - macron' + ], + [ + 240, + 'eth' + ], + [ + 241, + 'n - tilde' + ], + [ + 242, + 'o - grave' + ], + [ + 243, + 'o - acute' + ], + [ + 244, + 'o - circumflex' + ], + [ + 245, + 'o - tilde' + ], + [ + 246, + 'o - diaeresis' + ], + [ + 248, + 'o slash' + ], + [ + 333, + 'o macron' + ], + [ + 339, + 'ligature oe' + ], + [ + 353, + 's - caron' + ], + [ + 249, + 'u - grave' + ], + [ + 250, + 'u - acute' + ], + [ + 251, + 'u - circumflex' + ], + [ + 252, + 'u - diaeresis' + ], + [ + 363, + 'u - macron' + ], + [ + 253, + 'y - acute' + ], + [ + 254, + 'thorn' + ], + [ + 255, + 'y - diaeresis' + ], + [ + 563, + 'y - macron' + ], + [ + 913, + 'Alpha' + ], + [ + 914, + 'Beta' + ], + [ + 915, + 'Gamma' + ], + [ + 916, + 'Delta' + ], + [ + 917, + 'Epsilon' + ], + [ + 918, + 'Zeta' + ], + [ + 919, + 'Eta' + ], + [ + 920, + 'Theta' + ], + [ + 921, + 'Iota' + ], + [ + 922, + 'Kappa' + ], + [ + 923, + 'Lambda' + ], + [ + 924, + 'Mu' + ], + [ + 925, + 'Nu' + ], + [ + 926, + 'Xi' + ], + [ + 927, + 'Omicron' + ], + [ + 928, + 'Pi' + ], + [ + 929, + 'Rho' + ], + [ + 931, + 'Sigma' + ], + [ + 932, + 'Tau' + ], + [ + 933, + 'Upsilon' + ], + [ + 934, + 'Phi' + ], + [ + 935, + 'Chi' + ], + [ + 936, + 'Psi' + ], + [ + 937, + 'Omega' + ], + [ + 945, + 'alpha' + ], + [ + 946, + 'beta' + ], + [ + 947, + 'gamma' + ], + [ + 948, + 'delta' + ], + [ + 949, + 'epsilon' + ], + [ + 950, + 'zeta' + ], + [ + 951, + 'eta' + ], + [ + 952, + 'theta' + ], + [ + 953, + 'iota' + ], + [ + 954, + 'kappa' + ], + [ + 955, + 'lambda' + ], + [ + 956, + 'mu' + ], + [ + 957, + 'nu' + ], + [ + 958, + 'xi' + ], + [ + 959, + 'omicron' + ], + [ + 960, + 'pi' + ], + [ + 961, + 'rho' + ], + [ + 962, + 'final sigma' + ], + [ + 963, + 'sigma' + ], + [ + 964, + 'tau' + ], + [ + 965, + 'upsilon' + ], + [ + 966, + 'phi' + ], + [ + 967, + 'chi' + ], + [ + 968, + 'psi' + ], + [ + 969, + 'omega' + ] + ] + }, + { + name: 'Symbols', + characters: [ + [ + 8501, + 'alef symbol' + ], + [ + 982, + 'pi symbol' + ], + [ + 8476, + 'real part symbol' + ], + [ + 978, + 'upsilon - hook symbol' + ], + [ + 8472, + 'Weierstrass p' + ], + [ + 8465, + 'imaginary part' + ] + ] + }, + { + name: 'Arrows', + characters: [ + [ + 8592, + 'leftwards arrow' + ], + [ + 8593, + 'upwards arrow' + ], + [ + 8594, + 'rightwards arrow' + ], + [ + 8595, + 'downwards arrow' + ], + [ + 8596, + 'left right arrow' + ], + [ + 8629, + 'carriage return' + ], + [ + 8656, + 'leftwards double arrow' + ], + [ + 8657, + 'upwards double arrow' + ], + [ + 8658, + 'rightwards double arrow' + ], + [ + 8659, + 'downwards double arrow' + ], + [ + 8660, + 'left right double arrow' + ], + [ + 8756, + 'therefore' + ], + [ + 8834, + 'subset of' + ], + [ + 8835, + 'superset of' + ], + [ + 8836, + 'not a subset of' + ], + [ + 8838, + 'subset of or equal to' + ], + [ + 8839, + 'superset of or equal to' + ], + [ + 8853, + 'circled plus' + ], + [ + 8855, + 'circled times' + ], + [ + 8869, + 'perpendicular' + ], + [ + 8901, + 'dot operator' + ], + [ + 8968, + 'left ceiling' + ], + [ + 8969, + 'right ceiling' + ], + [ + 8970, + 'left floor' + ], + [ + 8971, + 'right floor' + ], + [ + 9001, + 'left-pointing angle bracket' + ], + [ + 9002, + 'right-pointing angle bracket' + ], + [ + 9674, + 'lozenge' + ], + [ + 9824, + 'black spade suit' + ], + [ + 9827, + 'black club suit' + ], + [ + 9829, + 'black heart suit' + ], + [ + 9830, + 'black diamond suit' + ], + [ + 8194, + 'en space' + ], + [ + 8195, + 'em space' + ], + [ + 8201, + 'thin space' + ], + [ + 8204, + 'zero width non-joiner' + ], + [ + 8205, + 'zero width joiner' + ], + [ + 8206, + 'left-to-right mark' + ], + [ + 8207, + 'right-to-left mark' + ] + ] + } + ]; + }; + const charmapFilter = charmap => { + return global.grep(charmap, item => { + return isArray(item) && item.length === 2; + }); + }; + const getCharsFromOption = optionValue => { + if (isArray(optionValue)) { + return charmapFilter(optionValue); + } + if (typeof optionValue === 'function') { + return optionValue(); + } + return []; + }; + const extendCharMap = (editor, charmap) => { + const userCharMap = getCharMap$1(editor); + if (userCharMap) { + charmap = [{ + name: UserDefined, + characters: getCharsFromOption(userCharMap) + }]; + } + const userCharMapAppend = getCharMapAppend(editor); + if (userCharMapAppend) { + const userDefinedGroup = global.grep(charmap, cg => cg.name === UserDefined); + if (userDefinedGroup.length) { + userDefinedGroup[0].characters = [].concat(userDefinedGroup[0].characters).concat(getCharsFromOption(userCharMapAppend)); + return charmap; + } + return charmap.concat({ + name: UserDefined, + characters: getCharsFromOption(userCharMapAppend) + }); + } + return charmap; + }; + const getCharMap = editor => { + const groups = extendCharMap(editor, getDefaultCharMap()); + return groups.length > 1 ? [{ + name: 'All', + characters: bind(groups, g => g.characters) + }].concat(groups) : groups; + }; + + const get = editor => { + const getCharMap$1 = () => { + return getCharMap(editor); + }; + const insertChar$1 = chr => { + insertChar(editor, chr); + }; + return { + getCharMap: getCharMap$1, + insertChar: insertChar$1 + }; + }; + + const Cell = initial => { + let value = initial; + const get = () => { + return value; + }; + const set = v => { + value = v; + }; + return { + get, + set + }; + }; + + const last = (fn, rate) => { + let timer = null; + const cancel = () => { + if (!isNull(timer)) { + clearTimeout(timer); + timer = null; + } + }; + const throttle = (...args) => { + cancel(); + timer = setTimeout(() => { + timer = null; + fn.apply(null, args); + }, rate); + }; + return { + cancel, + throttle + }; + }; + + const contains = (str, substr) => { + return str.indexOf(substr) !== -1; + }; + const fromCodePoint = String.fromCodePoint; + + const charMatches = (charCode, name, lowerCasePattern) => { + if (contains(fromCodePoint(charCode).toLowerCase(), lowerCasePattern)) { + return true; + } else { + return contains(name.toLowerCase(), lowerCasePattern) || contains(name.toLowerCase().replace(/\s+/g, ''), lowerCasePattern); + } + }; + const scan = (group, pattern) => { + const matches = []; + const lowerCasePattern = pattern.toLowerCase(); + each(group.characters, g => { + if (charMatches(g[0], g[1], lowerCasePattern)) { + matches.push(g); + } + }); + return map(matches, m => ({ + text: m[1], + value: fromCodePoint(m[0]), + icon: fromCodePoint(m[0]) + })); + }; + + const patternName = 'pattern'; + const open = (editor, charMap) => { + const makeGroupItems = () => [ + { + label: 'Search', + type: 'input', + name: patternName + }, + { + type: 'collection', + name: 'results' + } + ]; + const makeTabs = () => map(charMap, charGroup => ({ + title: charGroup.name, + name: charGroup.name, + items: makeGroupItems() + })); + const makePanel = () => ({ + type: 'panel', + items: makeGroupItems() + }); + const makeTabPanel = () => ({ + type: 'tabpanel', + tabs: makeTabs() + }); + const currentTab = charMap.length === 1 ? Cell(UserDefined) : Cell('All'); + const scanAndSet = (dialogApi, pattern) => { + find(charMap, group => group.name === currentTab.get()).each(f => { + const items = scan(f, pattern); + dialogApi.setData({ results: items }); + }); + }; + const SEARCH_DELAY = 40; + const updateFilter = last(dialogApi => { + const pattern = dialogApi.getData().pattern; + scanAndSet(dialogApi, pattern); + }, SEARCH_DELAY); + const body = charMap.length === 1 ? makePanel() : makeTabPanel(); + const initialData = { + pattern: '', + results: scan(charMap[0], '') + }; + const bridgeSpec = { + title: 'Special Character', + size: 'normal', + body, + buttons: [{ + type: 'cancel', + name: 'close', + text: 'Close', + primary: true + }], + initialData, + onAction: (api, details) => { + if (details.name === 'results') { + insertChar(editor, details.value); + api.close(); + } + }, + onTabChange: (dialogApi, details) => { + currentTab.set(details.newTabName); + updateFilter.throttle(dialogApi); + }, + onChange: (dialogApi, changeData) => { + if (changeData.name === patternName) { + updateFilter.throttle(dialogApi); + } + } + }; + const dialogApi = editor.windowManager.open(bridgeSpec); + dialogApi.focus(patternName); + }; + + const register$1 = (editor, charMap) => { + editor.addCommand('mceShowCharmap', () => { + open(editor, charMap); + }); + }; + + const init = (editor, all) => { + editor.ui.registry.addAutocompleter('charmap', { + ch: ':', + columns: 'auto', + minChars: 2, + fetch: (pattern, _maxResults) => new Promise((resolve, _reject) => { + resolve(scan(all, pattern)); + }), + onAction: (autocompleteApi, rng, value) => { + editor.selection.setRng(rng); + editor.insertContent(value); + autocompleteApi.hide(); + } + }); + }; + + const register = editor => { + editor.ui.registry.addButton('charmap', { + icon: 'insert-character', + tooltip: 'Special character', + onAction: () => editor.execCommand('mceShowCharmap') + }); + editor.ui.registry.addMenuItem('charmap', { + icon: 'insert-character', + text: 'Special character...', + onAction: () => editor.execCommand('mceShowCharmap') + }); + }; + + var Plugin = () => { + global$1.add('charmap', editor => { + register$2(editor); + const charMap = getCharMap(editor); + register$1(editor, charMap); + register(editor); + init(editor, charMap[0]); + return get(editor); + }); + }; + + Plugin(); + +})(); diff --git a/vendor/tinymce/tinymce/plugins/charmap/plugin.min.js b/vendor/tinymce/tinymce/plugins/charmap/plugin.min.js new file mode 100644 index 00000000..967f85f8 --- /dev/null +++ b/vendor/tinymce/tinymce/plugins/charmap/plugin.min.js @@ -0,0 +1,4 @@ +/** + * TinyMCE version 6.0.2 (2022-04-27) + */ +!function(){"use strict";var e=tinymce.util.Tools.resolve("tinymce.PluginManager");const t=(e,t)=>{const a=((e,t)=>e.dispatch("insertCustomChar",{chr:t}))(e,t).chr;e.execCommand("mceInsertContent",!1,a)},a=("array",e=>"array"===(e=>{const t=typeof e;return null===e?"null":"object"===t&&Array.isArray(e)?"array":"object"===t&&(a=r=e,(n=String).prototype.isPrototypeOf(a)||(null===(i=r.constructor)||void 0===i?void 0:i.name)===n.name)?"string":t;var a,r,n,i})(e));const r=(null,e=>null===e);const n=e=>"function"==typeof e,i=(!1,()=>false);class o{constructor(e,t){this.tag=e,this.value=t}static some(e){return new o(!0,e)}static none(){return o.singletonNone}fold(e,t){return this.tag?t(this.value):e()}isSome(){return this.tag}isNone(){return!this.tag}map(e){return this.tag?o.some(e(this.value)):o.none()}bind(e){return this.tag?e(this.value):o.none()}exists(e){return this.tag&&e(this.value)}forall(e){return!this.tag||e(this.value)}filter(e){return!this.tag||e(this.value)?this:o.none()}getOr(e){return this.tag?this.value:e}or(e){return this.tag?this:e}getOrThunk(e){return this.tag?this.value:e()}orThunk(e){return this.tag?this:e()}getOrDie(e){if(this.tag)return this.value;throw new Error(null!=e?e:"Called getOrDie on None")}static from(e){return null==e?o.none():o.some(e)}getOrNull(){return this.tag?this.value:null}getOrUndefined(){return this.value}each(e){this.tag&&e(this.value)}toArray(){return this.tag?[this.value]:[]}toString(){return this.tag?`some(${this.value})`:"none()"}}o.singletonNone=new o(!1);const s=Array.prototype.push,l=(e,t)=>{const a=e.length,r=new Array(a);for(let n=0;nt=>t.options.get(e),g=u("charmap"),h=u("charmap_append"),m=c.isArray,p="User Defined",d=e=>{return m(e)?(t=e,c.grep(t,(e=>m(e)&&2===e.length))):"function"==typeof e?e():[];var t},f=e=>{const t=((e,t)=>{const a=g(e);a&&(t=[{name:p,characters:d(a)}]);const r=h(e);if(r){const e=c.grep(t,(e=>e.name===p));return e.length?(e[0].characters=[].concat(e[0].characters).concat(d(r)),t):t.concat({name:p,characters:d(r)})}return t})(e,[{name:"Currency",characters:[[36,"dollar sign"],[162,"cent sign"],[8364,"euro sign"],[163,"pound sign"],[165,"yen sign"],[164,"currency sign"],[8352,"euro-currency sign"],[8353,"colon sign"],[8354,"cruzeiro sign"],[8355,"french franc sign"],[8356,"lira sign"],[8357,"mill sign"],[8358,"naira sign"],[8359,"peseta sign"],[8360,"rupee sign"],[8361,"won sign"],[8362,"new sheqel sign"],[8363,"dong sign"],[8365,"kip sign"],[8366,"tugrik sign"],[8367,"drachma sign"],[8368,"german penny symbol"],[8369,"peso sign"],[8370,"guarani sign"],[8371,"austral sign"],[8372,"hryvnia sign"],[8373,"cedi sign"],[8374,"livre tournois sign"],[8375,"spesmilo sign"],[8376,"tenge sign"],[8377,"indian rupee sign"],[8378,"turkish lira sign"],[8379,"nordic mark sign"],[8380,"manat sign"],[8381,"ruble sign"],[20870,"yen character"],[20803,"yuan character"],[22291,"yuan character, in hong kong and taiwan"],[22278,"yen/yuan character variant one"]]},{name:"Text",characters:[[169,"copyright sign"],[174,"registered sign"],[8482,"trade mark sign"],[8240,"per mille sign"],[181,"micro sign"],[183,"middle dot"],[8226,"bullet"],[8230,"three dot leader"],[8242,"minutes / feet"],[8243,"seconds / inches"],[167,"section sign"],[182,"paragraph sign"],[223,"sharp s / ess-zed"]]},{name:"Quotations",characters:[[8249,"single left-pointing angle quotation mark"],[8250,"single right-pointing angle quotation mark"],[171,"left pointing guillemet"],[187,"right pointing guillemet"],[8216,"left single quotation mark"],[8217,"right single quotation mark"],[8220,"left double quotation mark"],[8221,"right double quotation mark"],[8218,"single low-9 quotation mark"],[8222,"double low-9 quotation mark"],[60,"less-than sign"],[62,"greater-than sign"],[8804,"less-than or equal to"],[8805,"greater-than or equal to"],[8211,"en dash"],[8212,"em dash"],[175,"macron"],[8254,"overline"],[164,"currency sign"],[166,"broken bar"],[168,"diaeresis"],[161,"inverted exclamation mark"],[191,"turned question mark"],[710,"circumflex accent"],[732,"small tilde"],[176,"degree sign"],[8722,"minus sign"],[177,"plus-minus sign"],[247,"division sign"],[8260,"fraction slash"],[215,"multiplication sign"],[185,"superscript one"],[178,"superscript two"],[179,"superscript three"],[188,"fraction one quarter"],[189,"fraction one half"],[190,"fraction three quarters"]]},{name:"Mathematical",characters:[[402,"function / florin"],[8747,"integral"],[8721,"n-ary sumation"],[8734,"infinity"],[8730,"square root"],[8764,"similar to"],[8773,"approximately equal to"],[8776,"almost equal to"],[8800,"not equal to"],[8801,"identical to"],[8712,"element of"],[8713,"not an element of"],[8715,"contains as member"],[8719,"n-ary product"],[8743,"logical and"],[8744,"logical or"],[172,"not sign"],[8745,"intersection"],[8746,"union"],[8706,"partial differential"],[8704,"for all"],[8707,"there exists"],[8709,"diameter"],[8711,"backward difference"],[8727,"asterisk operator"],[8733,"proportional to"],[8736,"angle"]]},{name:"Extended Latin",characters:[[192,"A - grave"],[193,"A - acute"],[194,"A - circumflex"],[195,"A - tilde"],[196,"A - diaeresis"],[197,"A - ring above"],[256,"A - macron"],[198,"ligature AE"],[199,"C - cedilla"],[200,"E - grave"],[201,"E - acute"],[202,"E - circumflex"],[203,"E - diaeresis"],[274,"E - macron"],[204,"I - grave"],[205,"I - acute"],[206,"I - circumflex"],[207,"I - diaeresis"],[298,"I - macron"],[208,"ETH"],[209,"N - tilde"],[210,"O - grave"],[211,"O - acute"],[212,"O - circumflex"],[213,"O - tilde"],[214,"O - diaeresis"],[216,"O - slash"],[332,"O - macron"],[338,"ligature OE"],[352,"S - caron"],[217,"U - grave"],[218,"U - acute"],[219,"U - circumflex"],[220,"U - diaeresis"],[362,"U - macron"],[221,"Y - acute"],[376,"Y - diaeresis"],[562,"Y - macron"],[222,"THORN"],[224,"a - grave"],[225,"a - acute"],[226,"a - circumflex"],[227,"a - tilde"],[228,"a - diaeresis"],[229,"a - ring above"],[257,"a - macron"],[230,"ligature ae"],[231,"c - cedilla"],[232,"e - grave"],[233,"e - acute"],[234,"e - circumflex"],[235,"e - diaeresis"],[275,"e - macron"],[236,"i - grave"],[237,"i - acute"],[238,"i - circumflex"],[239,"i - diaeresis"],[299,"i - macron"],[240,"eth"],[241,"n - tilde"],[242,"o - grave"],[243,"o - acute"],[244,"o - circumflex"],[245,"o - tilde"],[246,"o - diaeresis"],[248,"o slash"],[333,"o macron"],[339,"ligature oe"],[353,"s - caron"],[249,"u - grave"],[250,"u - acute"],[251,"u - circumflex"],[252,"u - diaeresis"],[363,"u - macron"],[253,"y - acute"],[254,"thorn"],[255,"y - diaeresis"],[563,"y - macron"],[913,"Alpha"],[914,"Beta"],[915,"Gamma"],[916,"Delta"],[917,"Epsilon"],[918,"Zeta"],[919,"Eta"],[920,"Theta"],[921,"Iota"],[922,"Kappa"],[923,"Lambda"],[924,"Mu"],[925,"Nu"],[926,"Xi"],[927,"Omicron"],[928,"Pi"],[929,"Rho"],[931,"Sigma"],[932,"Tau"],[933,"Upsilon"],[934,"Phi"],[935,"Chi"],[936,"Psi"],[937,"Omega"],[945,"alpha"],[946,"beta"],[947,"gamma"],[948,"delta"],[949,"epsilon"],[950,"zeta"],[951,"eta"],[952,"theta"],[953,"iota"],[954,"kappa"],[955,"lambda"],[956,"mu"],[957,"nu"],[958,"xi"],[959,"omicron"],[960,"pi"],[961,"rho"],[962,"final sigma"],[963,"sigma"],[964,"tau"],[965,"upsilon"],[966,"phi"],[967,"chi"],[968,"psi"],[969,"omega"]]},{name:"Symbols",characters:[[8501,"alef symbol"],[982,"pi symbol"],[8476,"real part symbol"],[978,"upsilon - hook symbol"],[8472,"Weierstrass p"],[8465,"imaginary part"]]},{name:"Arrows",characters:[[8592,"leftwards arrow"],[8593,"upwards arrow"],[8594,"rightwards arrow"],[8595,"downwards arrow"],[8596,"left right arrow"],[8629,"carriage return"],[8656,"leftwards double arrow"],[8657,"upwards double arrow"],[8658,"rightwards double arrow"],[8659,"downwards double arrow"],[8660,"left right double arrow"],[8756,"therefore"],[8834,"subset of"],[8835,"superset of"],[8836,"not a subset of"],[8838,"subset of or equal to"],[8839,"superset of or equal to"],[8853,"circled plus"],[8855,"circled times"],[8869,"perpendicular"],[8901,"dot operator"],[8968,"left ceiling"],[8969,"right ceiling"],[8970,"left floor"],[8971,"right floor"],[9001,"left-pointing angle bracket"],[9002,"right-pointing angle bracket"],[9674,"lozenge"],[9824,"black spade suit"],[9827,"black club suit"],[9829,"black heart suit"],[9830,"black diamond suit"],[8194,"en space"],[8195,"em space"],[8201,"thin space"],[8204,"zero width non-joiner"],[8205,"zero width joiner"],[8206,"left-to-right mark"],[8207,"right-to-left mark"]]}]);return t.length>1?[{name:"All",characters:(r=t,n=e=>e.characters,(e=>{const t=[];for(let r=0,n=e.length;r{let t=e;return{get:()=>t,set:e=>{t=e}}},w=(e,t)=>-1!==e.indexOf(t),b=String.fromCodePoint,v=(e,t)=>{const a=[],r=t.toLowerCase();return((e,t)=>{for(let t=0,i=e.length;t!!w(b(e).toLowerCase(),a)||w(t.toLowerCase(),a)||w(t.toLowerCase().replace(/\s+/g,""),a))((n=e[t])[0],n[1],r)&&a.push(n);var n})(e.characters),l(a,(e=>({text:e[1],value:b(e[0]),icon:b(e[0])})))},k="pattern",C=(e,a)=>{const n=()=>[{label:"Search",type:"input",name:k},{type:"collection",name:"results"}],s=1===a.length?y(p):y("All"),c=((e,t)=>{let a=null;const n=()=>{r(a)||(clearTimeout(a),a=null)};return{cancel:n,throttle:(...t)=>{n(),a=setTimeout((()=>{a=null,e.apply(null,t)}),40)}}})((e=>{const t=e.getData().pattern;((e,t)=>{var r,n;(r=a,n=e=>e.name===s.get(),((e,t,a)=>{for(let r=0,n=e.length;r{const r=v(a,t);e.setData({results:r})}))})(e,t)})),u={title:"Special Character",size:"normal",body:1===a.length?{type:"panel",items:n()}:{type:"tabpanel",tabs:l(a,(e=>({title:e.name,name:e.name,items:n()})))},buttons:[{type:"cancel",name:"close",text:"Close",primary:!0}],initialData:{pattern:"",results:v(a[0],"")},onAction:(a,r)=>{"results"===r.name&&(t(e,r.value),a.close())},onTabChange:(e,t)=>{s.set(t.newTabName),c.throttle(e)},onChange:(e,t)=>{t.name===k&&c.throttle(e)}};e.windowManager.open(u).focus(k)};e.add("charmap",(e=>{(e=>{const t=e.options.register,r=e=>n(e)||a(e);t("charmap",{processor:r}),t("charmap_append",{processor:r})})(e);const r=f(e);return((e,t)=>{e.addCommand("mceShowCharmap",(()=>{C(e,t)}))})(e,r),(e=>{e.ui.registry.addButton("charmap",{icon:"insert-character",tooltip:"Special character",onAction:()=>e.execCommand("mceShowCharmap")}),e.ui.registry.addMenuItem("charmap",{icon:"insert-character",text:"Special character...",onAction:()=>e.execCommand("mceShowCharmap")})})(e),((e,t)=>{e.ui.registry.addAutocompleter("charmap",{ch:":",columns:"auto",minChars:2,fetch:(e,a)=>new Promise(((a,r)=>{a(v(t,e))})),onAction:(t,a,r)=>{e.selection.setRng(a),e.insertContent(r),t.hide()}})})(e,r[0]),(e=>({getCharMap:()=>f(e),insertChar:a=>{t(e,a)}}))(e)}))}(); \ No newline at end of file diff --git a/vendor/tinymce/tinymce/plugins/code/index.js b/vendor/tinymce/tinymce/plugins/code/index.js new file mode 100644 index 00000000..1e412f35 --- /dev/null +++ b/vendor/tinymce/tinymce/plugins/code/index.js @@ -0,0 +1,7 @@ +// Exports the "code" plugin for usage with module loaders +// Usage: +// CommonJS: +// require('tinymce/plugins/code') +// ES2015: +// import 'tinymce/plugins/code' +require('./plugin.js'); \ No newline at end of file diff --git a/vendor/tinymce/tinymce/plugins/code/plugin.js b/vendor/tinymce/tinymce/plugins/code/plugin.js new file mode 100644 index 00000000..1ab07a39 --- /dev/null +++ b/vendor/tinymce/tinymce/plugins/code/plugin.js @@ -0,0 +1,85 @@ +/** + * TinyMCE version 6.0.2 (2022-04-27) + */ + +(function () { + 'use strict'; + + var global = tinymce.util.Tools.resolve('tinymce.PluginManager'); + + const setContent = (editor, html) => { + editor.focus(); + editor.undoManager.transact(() => { + editor.setContent(html); + }); + editor.selection.setCursorLocation(); + editor.nodeChanged(); + }; + const getContent = editor => { + return editor.getContent({ source_view: true }); + }; + + const open = editor => { + const editorContent = getContent(editor); + editor.windowManager.open({ + title: 'Source Code', + size: 'large', + body: { + type: 'panel', + items: [{ + type: 'textarea', + name: 'code' + }] + }, + buttons: [ + { + type: 'cancel', + name: 'cancel', + text: 'Cancel' + }, + { + type: 'submit', + name: 'save', + text: 'Save', + primary: true + } + ], + initialData: { code: editorContent }, + onSubmit: api => { + setContent(editor, api.getData().code); + api.close(); + } + }); + }; + + const register$1 = editor => { + editor.addCommand('mceCodeEditor', () => { + open(editor); + }); + }; + + const register = editor => { + const onAction = () => editor.execCommand('mceCodeEditor'); + editor.ui.registry.addButton('code', { + icon: 'sourcecode', + tooltip: 'Source code', + onAction + }); + editor.ui.registry.addMenuItem('code', { + icon: 'sourcecode', + text: 'Source code', + onAction + }); + }; + + var Plugin = () => { + global.add('code', editor => { + register$1(editor); + register(editor); + return {}; + }); + }; + + Plugin(); + +})(); diff --git a/vendor/tinymce/tinymce/plugins/code/plugin.min.js b/vendor/tinymce/tinymce/plugins/code/plugin.min.js new file mode 100644 index 00000000..2bd4515c --- /dev/null +++ b/vendor/tinymce/tinymce/plugins/code/plugin.min.js @@ -0,0 +1,4 @@ +/** + * TinyMCE version 6.0.2 (2022-04-27) + */ +!function(){"use strict";tinymce.util.Tools.resolve("tinymce.PluginManager").add("code",(e=>((e=>{e.addCommand("mceCodeEditor",(()=>{(e=>{const o=(e=>e.getContent({source_view:!0}))(e);e.windowManager.open({title:"Source Code",size:"large",body:{type:"panel",items:[{type:"textarea",name:"code"}]},buttons:[{type:"cancel",name:"cancel",text:"Cancel"},{type:"submit",name:"save",text:"Save",primary:!0}],initialData:{code:o},onSubmit:o=>{((e,o)=>{e.focus(),e.undoManager.transact((()=>{e.setContent(o)})),e.selection.setCursorLocation(),e.nodeChanged()})(e,o.getData().code),o.close()}})})(e)}))})(e),(e=>{const o=()=>e.execCommand("mceCodeEditor");e.ui.registry.addButton("code",{icon:"sourcecode",tooltip:"Source code",onAction:o}),e.ui.registry.addMenuItem("code",{icon:"sourcecode",text:"Source code",onAction:o})})(e),{})))}(); \ No newline at end of file diff --git a/vendor/tinymce/tinymce/plugins/codesample/index.js b/vendor/tinymce/tinymce/plugins/codesample/index.js new file mode 100644 index 00000000..c400ec3d --- /dev/null +++ b/vendor/tinymce/tinymce/plugins/codesample/index.js @@ -0,0 +1,7 @@ +// Exports the "codesample" plugin for usage with module loaders +// Usage: +// CommonJS: +// require('tinymce/plugins/codesample') +// ES2015: +// import 'tinymce/plugins/codesample' +require('./plugin.js'); \ No newline at end of file diff --git a/vendor/tinymce/tinymce/plugins/codesample/plugin.js b/vendor/tinymce/tinymce/plugins/codesample/plugin.js new file mode 100644 index 00000000..7b45433f --- /dev/null +++ b/vendor/tinymce/tinymce/plugins/codesample/plugin.js @@ -0,0 +1,2407 @@ +/** + * TinyMCE version 6.0.2 (2022-04-27) + */ + +(function () { + 'use strict'; + + var global$2 = tinymce.util.Tools.resolve('tinymce.PluginManager'); + + const isNullable = a => a === null || a === undefined; + const isNonNullable = a => !isNullable(a); + + const constant = value => { + return () => { + return value; + }; + }; + + class Optional { + constructor(tag, value) { + this.tag = tag; + this.value = value; + } + static some(value) { + return new Optional(true, value); + } + static none() { + return Optional.singletonNone; + } + fold(onNone, onSome) { + if (this.tag) { + return onSome(this.value); + } else { + return onNone(); + } + } + isSome() { + return this.tag; + } + isNone() { + return !this.tag; + } + map(mapper) { + if (this.tag) { + return Optional.some(mapper(this.value)); + } else { + return Optional.none(); + } + } + bind(binder) { + if (this.tag) { + return binder(this.value); + } else { + return Optional.none(); + } + } + exists(predicate) { + return this.tag && predicate(this.value); + } + forall(predicate) { + return !this.tag || predicate(this.value); + } + filter(predicate) { + if (!this.tag || predicate(this.value)) { + return this; + } else { + return Optional.none(); + } + } + getOr(replacement) { + return this.tag ? this.value : replacement; + } + or(replacement) { + return this.tag ? this : replacement; + } + getOrThunk(thunk) { + return this.tag ? this.value : thunk(); + } + orThunk(thunk) { + return this.tag ? this : thunk(); + } + getOrDie(message) { + if (!this.tag) { + throw new Error(message !== null && message !== void 0 ? message : 'Called getOrDie on None'); + } else { + return this.value; + } + } + static from(value) { + return isNonNullable(value) ? Optional.some(value) : Optional.none(); + } + getOrNull() { + return this.tag ? this.value : null; + } + getOrUndefined() { + return this.value; + } + each(worker) { + if (this.tag) { + worker(this.value); + } + } + toArray() { + return this.tag ? [this.value] : []; + } + toString() { + return this.tag ? `some(${ this.value })` : 'none()'; + } + } + Optional.singletonNone = new Optional(false); + + const get$1 = (xs, i) => i >= 0 && i < xs.length ? Optional.some(xs[i]) : Optional.none(); + const head = xs => get$1(xs, 0); + + const someIf = (b, a) => b ? Optional.some(a) : Optional.none(); + + var global$1 = tinymce.util.Tools.resolve('tinymce.dom.DOMUtils'); + + const Global = typeof window !== 'undefined' ? window : Function('return this;')(); + + const prismjs = function (global, module, exports) { + const oldprism = window.Prism; + window.Prism = { manual: true }; + var _self = typeof window !== 'undefined' ? window : typeof WorkerGlobalScope !== 'undefined' && self instanceof WorkerGlobalScope ? self : {}; + var Prism = function (_self) { + var lang = /(?:^|\s)lang(?:uage)?-([\w-]+)(?=\s|$)/i; + var uniqueId = 0; + var plainTextGrammar = {}; + var _ = { + manual: _self.Prism && _self.Prism.manual, + disableWorkerMessageHandler: _self.Prism && _self.Prism.disableWorkerMessageHandler, + util: { + encode: function encode(tokens) { + if (tokens instanceof Token) { + return new Token(tokens.type, encode(tokens.content), tokens.alias); + } else if (Array.isArray(tokens)) { + return tokens.map(encode); + } else { + return tokens.replace(/&/g, '&').replace(/' + env.content + ''; + }; + function matchPattern(pattern, pos, text, lookbehind) { + pattern.lastIndex = pos; + var match = pattern.exec(text); + if (match && lookbehind && match[1]) { + var lookbehindLength = match[1].length; + match.index += lookbehindLength; + match[0] = match[0].slice(lookbehindLength); + } + return match; + } + function matchGrammar(text, tokenList, grammar, startNode, startPos, rematch) { + for (var token in grammar) { + if (!grammar.hasOwnProperty(token) || !grammar[token]) { + continue; + } + var patterns = grammar[token]; + patterns = Array.isArray(patterns) ? patterns : [patterns]; + for (var j = 0; j < patterns.length; ++j) { + if (rematch && rematch.cause == token + ',' + j) { + return; + } + var patternObj = patterns[j]; + var inside = patternObj.inside; + var lookbehind = !!patternObj.lookbehind; + var greedy = !!patternObj.greedy; + var alias = patternObj.alias; + if (greedy && !patternObj.pattern.global) { + var flags = patternObj.pattern.toString().match(/[imsuy]*$/)[0]; + patternObj.pattern = RegExp(patternObj.pattern.source, flags + 'g'); + } + var pattern = patternObj.pattern || patternObj; + for (var currentNode = startNode.next, pos = startPos; currentNode !== tokenList.tail; pos += currentNode.value.length, currentNode = currentNode.next) { + if (rematch && pos >= rematch.reach) { + break; + } + var str = currentNode.value; + if (tokenList.length > text.length) { + return; + } + if (str instanceof Token) { + continue; + } + var removeCount = 1; + var match; + if (greedy) { + match = matchPattern(pattern, pos, text, lookbehind); + if (!match || match.index >= text.length) { + break; + } + var from = match.index; + var to = match.index + match[0].length; + var p = pos; + p += currentNode.value.length; + while (from >= p) { + currentNode = currentNode.next; + p += currentNode.value.length; + } + p -= currentNode.value.length; + pos = p; + if (currentNode.value instanceof Token) { + continue; + } + for (var k = currentNode; k !== tokenList.tail && (p < to || typeof k.value === 'string'); k = k.next) { + removeCount++; + p += k.value.length; + } + removeCount--; + str = text.slice(pos, p); + match.index -= pos; + } else { + match = matchPattern(pattern, 0, str, lookbehind); + if (!match) { + continue; + } + } + var from = match.index; + var matchStr = match[0]; + var before = str.slice(0, from); + var after = str.slice(from + matchStr.length); + var reach = pos + str.length; + if (rematch && reach > rematch.reach) { + rematch.reach = reach; + } + var removeFrom = currentNode.prev; + if (before) { + removeFrom = addAfter(tokenList, removeFrom, before); + pos += before.length; + } + removeRange(tokenList, removeFrom, removeCount); + var wrapped = new Token(token, inside ? _.tokenize(matchStr, inside) : matchStr, alias, matchStr); + currentNode = addAfter(tokenList, removeFrom, wrapped); + if (after) { + addAfter(tokenList, currentNode, after); + } + if (removeCount > 1) { + var nestedRematch = { + cause: token + ',' + j, + reach: reach + }; + matchGrammar(text, tokenList, grammar, currentNode.prev, pos, nestedRematch); + if (rematch && nestedRematch.reach > rematch.reach) { + rematch.reach = nestedRematch.reach; + } + } + } + } + } + } + function LinkedList() { + var head = { + value: null, + prev: null, + next: null + }; + var tail = { + value: null, + prev: head, + next: null + }; + head.next = tail; + this.head = head; + this.tail = tail; + this.length = 0; + } + function addAfter(list, node, value) { + var next = node.next; + var newNode = { + value: value, + prev: node, + next: next + }; + node.next = newNode; + next.prev = newNode; + list.length++; + return newNode; + } + function removeRange(list, node, count) { + var next = node.next; + for (var i = 0; i < count && next !== list.tail; i++) { + next = next.next; + } + node.next = next; + next.prev = node; + list.length -= i; + } + function toArray(list) { + var array = []; + var node = list.head.next; + while (node !== list.tail) { + array.push(node.value); + node = node.next; + } + return array; + } + if (!_self.document) { + if (!_self.addEventListener) { + return _; + } + if (!_.disableWorkerMessageHandler) { + _self.addEventListener('message', function (evt) { + var message = JSON.parse(evt.data); + var lang = message.language; + var code = message.code; + var immediateClose = message.immediateClose; + _self.postMessage(_.highlight(code, _.languages[lang], lang)); + if (immediateClose) { + _self.close(); + } + }, false); + } + return _; + } + var script = _.util.currentScript(); + if (script) { + _.filename = script.src; + if (script.hasAttribute('data-manual')) { + _.manual = true; + } + } + function highlightAutomaticallyCallback() { + if (!_.manual) { + _.highlightAll(); + } + } + if (!_.manual) { + var readyState = document.readyState; + if (readyState === 'loading' || readyState === 'interactive' && script && script.defer) { + document.addEventListener('DOMContentLoaded', highlightAutomaticallyCallback); + } else { + if (window.requestAnimationFrame) { + window.requestAnimationFrame(highlightAutomaticallyCallback); + } else { + window.setTimeout(highlightAutomaticallyCallback, 16); + } + } + } + return _; + }(_self); + if (typeof module !== 'undefined' && module.exports) { + module.exports = Prism; + } + if (typeof global !== 'undefined') { + global.Prism = Prism; + } + Prism.languages.clike = { + 'comment': [ + { + pattern: /(^|[^\\])\/\*[\s\S]*?(?:\*\/|$)/, + lookbehind: true, + greedy: true + }, + { + pattern: /(^|[^\\:])\/\/.*/, + lookbehind: true, + greedy: true + } + ], + 'string': { + pattern: /(["'])(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/, + greedy: true + }, + 'class-name': { + pattern: /(\b(?:class|extends|implements|instanceof|interface|new|trait)\s+|\bcatch\s+\()[\w.\\]+/i, + lookbehind: true, + inside: { 'punctuation': /[.\\]/ } + }, + 'keyword': /\b(?:break|catch|continue|do|else|finally|for|function|if|in|instanceof|new|null|return|throw|try|while)\b/, + 'boolean': /\b(?:false|true)\b/, + 'function': /\b\w+(?=\()/, + 'number': /\b0x[\da-f]+\b|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:e[+-]?\d+)?/i, + 'operator': /[<>]=?|[!=]=?=?|--?|\+\+?|&&?|\|\|?|[?*/~^%]/, + 'punctuation': /[{}[\];(),.:]/ + }; + (function (Prism) { + function getPlaceholder(language, index) { + return '___' + language.toUpperCase() + index + '___'; + } + Object.defineProperties(Prism.languages['markup-templating'] = {}, { + buildPlaceholders: { + value: function (env, language, placeholderPattern, replaceFilter) { + if (env.language !== language) { + return; + } + var tokenStack = env.tokenStack = []; + env.code = env.code.replace(placeholderPattern, function (match) { + if (typeof replaceFilter === 'function' && !replaceFilter(match)) { + return match; + } + var i = tokenStack.length; + var placeholder; + while (env.code.indexOf(placeholder = getPlaceholder(language, i)) !== -1) { + ++i; + } + tokenStack[i] = match; + return placeholder; + }); + env.grammar = Prism.languages.markup; + } + }, + tokenizePlaceholders: { + value: function (env, language) { + if (env.language !== language || !env.tokenStack) { + return; + } + env.grammar = Prism.languages[language]; + var j = 0; + var keys = Object.keys(env.tokenStack); + function walkTokens(tokens) { + for (var i = 0; i < tokens.length; i++) { + if (j >= keys.length) { + break; + } + var token = tokens[i]; + if (typeof token === 'string' || token.content && typeof token.content === 'string') { + var k = keys[j]; + var t = env.tokenStack[k]; + var s = typeof token === 'string' ? token : token.content; + var placeholder = getPlaceholder(language, k); + var index = s.indexOf(placeholder); + if (index > -1) { + ++j; + var before = s.substring(0, index); + var middle = new Prism.Token(language, Prism.tokenize(t, env.grammar), 'language-' + language, t); + var after = s.substring(index + placeholder.length); + var replacement = []; + if (before) { + replacement.push.apply(replacement, walkTokens([before])); + } + replacement.push(middle); + if (after) { + replacement.push.apply(replacement, walkTokens([after])); + } + if (typeof token === 'string') { + tokens.splice.apply(tokens, [ + i, + 1 + ].concat(replacement)); + } else { + token.content = replacement; + } + } + } else if (token.content) { + walkTokens(token.content); + } + } + return tokens; + } + walkTokens(env.tokens); + } + } + }); + }(Prism)); + Prism.languages.c = Prism.languages.extend('clike', { + 'comment': { + pattern: /\/\/(?:[^\r\n\\]|\\(?:\r\n?|\n|(?![\r\n])))*|\/\*[\s\S]*?(?:\*\/|$)/, + greedy: true + }, + 'string': { + pattern: /"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"/, + greedy: true + }, + 'class-name': { + pattern: /(\b(?:enum|struct)\s+(?:__attribute__\s*\(\([\s\S]*?\)\)\s*)?)\w+|\b[a-z]\w*_t\b/, + lookbehind: true + }, + 'keyword': /\b(?:_Alignas|_Alignof|_Atomic|_Bool|_Complex|_Generic|_Imaginary|_Noreturn|_Static_assert|_Thread_local|__attribute__|asm|auto|break|case|char|const|continue|default|do|double|else|enum|extern|float|for|goto|if|inline|int|long|register|return|short|signed|sizeof|static|struct|switch|typedef|typeof|union|unsigned|void|volatile|while)\b/, + 'function': /\b[a-z_]\w*(?=\s*\()/i, + 'number': /(?:\b0x(?:[\da-f]+(?:\.[\da-f]*)?|\.[\da-f]+)(?:p[+-]?\d+)?|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:e[+-]?\d+)?)[ful]{0,4}/i, + 'operator': />>=?|<<=?|->|([-+&|:])\1|[?:~]|[-+*/%&|^!=<>]=?/ + }); + Prism.languages.insertBefore('c', 'string', { + 'char': { + pattern: /'(?:\\(?:\r\n|[\s\S])|[^'\\\r\n]){0,32}'/, + greedy: true + } + }); + Prism.languages.insertBefore('c', 'string', { + 'macro': { + pattern: /(^[\t ]*)#\s*[a-z](?:[^\r\n\\/]|\/(?!\*)|\/\*(?:[^*]|\*(?!\/))*\*\/|\\(?:\r\n|[\s\S]))*/im, + lookbehind: true, + greedy: true, + alias: 'property', + inside: { + 'string': [ + { + pattern: /^(#\s*include\s*)<[^>]+>/, + lookbehind: true + }, + Prism.languages.c['string'] + ], + 'char': Prism.languages.c['char'], + 'comment': Prism.languages.c['comment'], + 'macro-name': [ + { + pattern: /(^#\s*define\s+)\w+\b(?!\()/i, + lookbehind: true + }, + { + pattern: /(^#\s*define\s+)\w+\b(?=\()/i, + lookbehind: true, + alias: 'function' + } + ], + 'directive': { + pattern: /^(#\s*)[a-z]+/, + lookbehind: true, + alias: 'keyword' + }, + 'directive-hash': /^#/, + 'punctuation': /##|\\(?=[\r\n])/, + 'expression': { + pattern: /\S[\s\S]*/, + inside: Prism.languages.c + } + } + } + }); + Prism.languages.insertBefore('c', 'function', { 'constant': /\b(?:EOF|NULL|SEEK_CUR|SEEK_END|SEEK_SET|__DATE__|__FILE__|__LINE__|__TIMESTAMP__|__TIME__|__func__|stderr|stdin|stdout)\b/ }); + delete Prism.languages.c['boolean']; + (function (Prism) { + var keyword = /\b(?:alignas|alignof|asm|auto|bool|break|case|catch|char|char16_t|char32_t|char8_t|class|co_await|co_return|co_yield|compl|concept|const|const_cast|consteval|constexpr|constinit|continue|decltype|default|delete|do|double|dynamic_cast|else|enum|explicit|export|extern|final|float|for|friend|goto|if|import|inline|int|int16_t|int32_t|int64_t|int8_t|long|module|mutable|namespace|new|noexcept|nullptr|operator|override|private|protected|public|register|reinterpret_cast|requires|return|short|signed|sizeof|static|static_assert|static_cast|struct|switch|template|this|thread_local|throw|try|typedef|typeid|typename|uint16_t|uint32_t|uint64_t|uint8_t|union|unsigned|using|virtual|void|volatile|wchar_t|while)\b/; + var modName = /\b(?!)\w+(?:\s*\.\s*\w+)*\b/.source.replace(//g, function () { + return keyword.source; + }); + Prism.languages.cpp = Prism.languages.extend('c', { + 'class-name': [ + { + pattern: RegExp(/(\b(?:class|concept|enum|struct|typename)\s+)(?!)\w+/.source.replace(//g, function () { + return keyword.source; + })), + lookbehind: true + }, + /\b[A-Z]\w*(?=\s*::\s*\w+\s*\()/, + /\b[A-Z_]\w*(?=\s*::\s*~\w+\s*\()/i, + /\b\w+(?=\s*<(?:[^<>]|<(?:[^<>]|<[^<>]*>)*>)*>\s*::\s*\w+\s*\()/ + ], + 'keyword': keyword, + 'number': { + pattern: /(?:\b0b[01']+|\b0x(?:[\da-f']+(?:\.[\da-f']*)?|\.[\da-f']+)(?:p[+-]?[\d']+)?|(?:\b[\d']+(?:\.[\d']*)?|\B\.[\d']+)(?:e[+-]?[\d']+)?)[ful]{0,4}/i, + greedy: true + }, + 'operator': />>=?|<<=?|->|--|\+\+|&&|\|\||[?:~]|<=>|[-+*/%&|^!=<>]=?|\b(?:and|and_eq|bitand|bitor|not|not_eq|or|or_eq|xor|xor_eq)\b/, + 'boolean': /\b(?:false|true)\b/ + }); + Prism.languages.insertBefore('cpp', 'string', { + 'module': { + pattern: RegExp(/(\b(?:import|module)\s+)/.source + '(?:' + /"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"|<[^<>\r\n]*>/.source + '|' + /(?:\s*:\s*)?|:\s*/.source.replace(//g, function () { + return modName; + }) + ')'), + lookbehind: true, + greedy: true, + inside: { + 'string': /^[<"][\s\S]+/, + 'operator': /:/, + 'punctuation': /\./ + } + }, + 'raw-string': { + pattern: /R"([^()\\ ]{0,16})\([\s\S]*?\)\1"/, + alias: 'string', + greedy: true + } + }); + Prism.languages.insertBefore('cpp', 'keyword', { + 'generic-function': { + pattern: /\b(?!operator\b)[a-z_]\w*\s*<(?:[^<>]|<[^<>]*>)*>(?=\s*\()/i, + inside: { + 'function': /^\w+/, + 'generic': { + pattern: /<[\s\S]+/, + alias: 'class-name', + inside: Prism.languages.cpp + } + } + } + }); + Prism.languages.insertBefore('cpp', 'operator', { + 'double-colon': { + pattern: /::/, + alias: 'punctuation' + } + }); + Prism.languages.insertBefore('cpp', 'class-name', { + 'base-clause': { + pattern: /(\b(?:class|struct)\s+\w+\s*:\s*)[^;{}"'\s]+(?:\s+[^;{}"'\s]+)*(?=\s*[;{])/, + lookbehind: true, + greedy: true, + inside: Prism.languages.extend('cpp', {}) + } + }); + Prism.languages.insertBefore('inside', 'double-colon', { 'class-name': /\b[a-z_]\w*\b(?!\s*::)/i }, Prism.languages.cpp['base-clause']); + }(Prism)); + (function (Prism) { + function replace(pattern, replacements) { + return pattern.replace(/<<(\d+)>>/g, function (m, index) { + return '(?:' + replacements[+index] + ')'; + }); + } + function re(pattern, replacements, flags) { + return RegExp(replace(pattern, replacements), flags || ''); + } + function nested(pattern, depthLog2) { + for (var i = 0; i < depthLog2; i++) { + pattern = pattern.replace(/<>/g, function () { + return '(?:' + pattern + ')'; + }); + } + return pattern.replace(/<>/g, '[^\\s\\S]'); + } + var keywordKinds = { + type: 'bool byte char decimal double dynamic float int long object sbyte short string uint ulong ushort var void', + typeDeclaration: 'class enum interface record struct', + contextual: 'add alias and ascending async await by descending from(?=\\s*(?:\\w|$)) get global group into init(?=\\s*;) join let nameof not notnull on or orderby partial remove select set unmanaged value when where with(?=\\s*{)', + other: 'abstract as base break case catch checked const continue default delegate do else event explicit extern finally fixed for foreach goto if implicit in internal is lock namespace new null operator out override params private protected public readonly ref return sealed sizeof stackalloc static switch this throw try typeof unchecked unsafe using virtual volatile while yield' + }; + function keywordsToPattern(words) { + return '\\b(?:' + words.trim().replace(/ /g, '|') + ')\\b'; + } + var typeDeclarationKeywords = keywordsToPattern(keywordKinds.typeDeclaration); + var keywords = RegExp(keywordsToPattern(keywordKinds.type + ' ' + keywordKinds.typeDeclaration + ' ' + keywordKinds.contextual + ' ' + keywordKinds.other)); + var nonTypeKeywords = keywordsToPattern(keywordKinds.typeDeclaration + ' ' + keywordKinds.contextual + ' ' + keywordKinds.other); + var nonContextualKeywords = keywordsToPattern(keywordKinds.type + ' ' + keywordKinds.typeDeclaration + ' ' + keywordKinds.other); + var generic = nested(/<(?:[^<>;=+\-*/%&|^]|<>)*>/.source, 2); + var nestedRound = nested(/\((?:[^()]|<>)*\)/.source, 2); + var name = /@?\b[A-Za-z_]\w*\b/.source; + var genericName = replace(/<<0>>(?:\s*<<1>>)?/.source, [ + name, + generic + ]); + var identifier = replace(/(?!<<0>>)<<1>>(?:\s*\.\s*<<1>>)*/.source, [ + nonTypeKeywords, + genericName + ]); + var array = /\[\s*(?:,\s*)*\]/.source; + var typeExpressionWithoutTuple = replace(/<<0>>(?:\s*(?:\?\s*)?<<1>>)*(?:\s*\?)?/.source, [ + identifier, + array + ]); + var tupleElement = replace(/[^,()<>[\];=+\-*/%&|^]|<<0>>|<<1>>|<<2>>/.source, [ + generic, + nestedRound, + array + ]); + var tuple = replace(/\(<<0>>+(?:,<<0>>+)+\)/.source, [tupleElement]); + var typeExpression = replace(/(?:<<0>>|<<1>>)(?:\s*(?:\?\s*)?<<2>>)*(?:\s*\?)?/.source, [ + tuple, + identifier, + array + ]); + var typeInside = { + 'keyword': keywords, + 'punctuation': /[<>()?,.:[\]]/ + }; + var character = /'(?:[^\r\n'\\]|\\.|\\[Uux][\da-fA-F]{1,8})'/.source; + var regularString = /"(?:\\.|[^\\"\r\n])*"/.source; + var verbatimString = /@"(?:""|\\[\s\S]|[^\\"])*"(?!")/.source; + Prism.languages.csharp = Prism.languages.extend('clike', { + 'string': [ + { + pattern: re(/(^|[^$\\])<<0>>/.source, [verbatimString]), + lookbehind: true, + greedy: true + }, + { + pattern: re(/(^|[^@$\\])<<0>>/.source, [regularString]), + lookbehind: true, + greedy: true + } + ], + 'class-name': [ + { + pattern: re(/(\busing\s+static\s+)<<0>>(?=\s*;)/.source, [identifier]), + lookbehind: true, + inside: typeInside + }, + { + pattern: re(/(\busing\s+<<0>>\s*=\s*)<<1>>(?=\s*;)/.source, [ + name, + typeExpression + ]), + lookbehind: true, + inside: typeInside + }, + { + pattern: re(/(\busing\s+)<<0>>(?=\s*=)/.source, [name]), + lookbehind: true + }, + { + pattern: re(/(\b<<0>>\s+)<<1>>/.source, [ + typeDeclarationKeywords, + genericName + ]), + lookbehind: true, + inside: typeInside + }, + { + pattern: re(/(\bcatch\s*\(\s*)<<0>>/.source, [identifier]), + lookbehind: true, + inside: typeInside + }, + { + pattern: re(/(\bwhere\s+)<<0>>/.source, [name]), + lookbehind: true + }, + { + pattern: re(/(\b(?:is(?:\s+not)?|as)\s+)<<0>>/.source, [typeExpressionWithoutTuple]), + lookbehind: true, + inside: typeInside + }, + { + pattern: re(/\b<<0>>(?=\s+(?!<<1>>|with\s*\{)<<2>>(?:\s*[=,;:{)\]]|\s+(?:in|when)\b))/.source, [ + typeExpression, + nonContextualKeywords, + name + ]), + inside: typeInside + } + ], + 'keyword': keywords, + 'number': /(?:\b0(?:x[\da-f_]*[\da-f]|b[01_]*[01])|(?:\B\.\d+(?:_+\d+)*|\b\d+(?:_+\d+)*(?:\.\d+(?:_+\d+)*)?)(?:e[-+]?\d+(?:_+\d+)*)?)(?:[dflmu]|lu|ul)?\b/i, + 'operator': />>=?|<<=?|[-=]>|([-+&|])\1|~|\?\?=?|[-+*/%&|^!=<>]=?/, + 'punctuation': /\?\.?|::|[{}[\];(),.:]/ + }); + Prism.languages.insertBefore('csharp', 'number', { + 'range': { + pattern: /\.\./, + alias: 'operator' + } + }); + Prism.languages.insertBefore('csharp', 'punctuation', { + 'named-parameter': { + pattern: re(/([(,]\s*)<<0>>(?=\s*:)/.source, [name]), + lookbehind: true, + alias: 'punctuation' + } + }); + Prism.languages.insertBefore('csharp', 'class-name', { + 'namespace': { + pattern: re(/(\b(?:namespace|using)\s+)<<0>>(?:\s*\.\s*<<0>>)*(?=\s*[;{])/.source, [name]), + lookbehind: true, + inside: { 'punctuation': /\./ } + }, + 'type-expression': { + pattern: re(/(\b(?:default|sizeof|typeof)\s*\(\s*(?!\s))(?:[^()\s]|\s(?!\s)|<<0>>)*(?=\s*\))/.source, [nestedRound]), + lookbehind: true, + alias: 'class-name', + inside: typeInside + }, + 'return-type': { + pattern: re(/<<0>>(?=\s+(?:<<1>>\s*(?:=>|[({]|\.\s*this\s*\[)|this\s*\[))/.source, [ + typeExpression, + identifier + ]), + inside: typeInside, + alias: 'class-name' + }, + 'constructor-invocation': { + pattern: re(/(\bnew\s+)<<0>>(?=\s*[[({])/.source, [typeExpression]), + lookbehind: true, + inside: typeInside, + alias: 'class-name' + }, + 'generic-method': { + pattern: re(/<<0>>\s*<<1>>(?=\s*\()/.source, [ + name, + generic + ]), + inside: { + 'function': re(/^<<0>>/.source, [name]), + 'generic': { + pattern: RegExp(generic), + alias: 'class-name', + inside: typeInside + } + } + }, + 'type-list': { + pattern: re(/\b((?:<<0>>\s+<<1>>|record\s+<<1>>\s*<<5>>|where\s+<<2>>)\s*:\s*)(?:<<3>>|<<4>>|<<1>>\s*<<5>>|<<6>>)(?:\s*,\s*(?:<<3>>|<<4>>|<<6>>))*(?=\s*(?:where|[{;]|=>|$))/.source, [ + typeDeclarationKeywords, + genericName, + name, + typeExpression, + keywords.source, + nestedRound, + /\bnew\s*\(\s*\)/.source + ]), + lookbehind: true, + inside: { + 'record-arguments': { + pattern: re(/(^(?!new\s*\()<<0>>\s*)<<1>>/.source, [ + genericName, + nestedRound + ]), + lookbehind: true, + greedy: true, + inside: Prism.languages.csharp + }, + 'keyword': keywords, + 'class-name': { + pattern: RegExp(typeExpression), + greedy: true, + inside: typeInside + }, + 'punctuation': /[,()]/ + } + }, + 'preprocessor': { + pattern: /(^[\t ]*)#.*/m, + lookbehind: true, + alias: 'property', + inside: { + 'directive': { + pattern: /(#)\b(?:define|elif|else|endif|endregion|error|if|line|nullable|pragma|region|undef|warning)\b/, + lookbehind: true, + alias: 'keyword' + } + } + } + }); + var regularStringOrCharacter = regularString + '|' + character; + var regularStringCharacterOrComment = replace(/\/(?![*/])|\/\/[^\r\n]*[\r\n]|\/\*(?:[^*]|\*(?!\/))*\*\/|<<0>>/.source, [regularStringOrCharacter]); + var roundExpression = nested(replace(/[^"'/()]|<<0>>|\(<>*\)/.source, [regularStringCharacterOrComment]), 2); + var attrTarget = /\b(?:assembly|event|field|method|module|param|property|return|type)\b/.source; + var attr = replace(/<<0>>(?:\s*\(<<1>>*\))?/.source, [ + identifier, + roundExpression + ]); + Prism.languages.insertBefore('csharp', 'class-name', { + 'attribute': { + pattern: re(/((?:^|[^\s\w>)?])\s*\[\s*)(?:<<0>>\s*:\s*)?<<1>>(?:\s*,\s*<<1>>)*(?=\s*\])/.source, [ + attrTarget, + attr + ]), + lookbehind: true, + greedy: true, + inside: { + 'target': { + pattern: re(/^<<0>>(?=\s*:)/.source, [attrTarget]), + alias: 'keyword' + }, + 'attribute-arguments': { + pattern: re(/\(<<0>>*\)/.source, [roundExpression]), + inside: Prism.languages.csharp + }, + 'class-name': { + pattern: RegExp(identifier), + inside: { 'punctuation': /\./ } + }, + 'punctuation': /[:,]/ + } + } + }); + var formatString = /:[^}\r\n]+/.source; + var mInterpolationRound = nested(replace(/[^"'/()]|<<0>>|\(<>*\)/.source, [regularStringCharacterOrComment]), 2); + var mInterpolation = replace(/\{(?!\{)(?:(?![}:])<<0>>)*<<1>>?\}/.source, [ + mInterpolationRound, + formatString + ]); + var sInterpolationRound = nested(replace(/[^"'/()]|\/(?!\*)|\/\*(?:[^*]|\*(?!\/))*\*\/|<<0>>|\(<>*\)/.source, [regularStringOrCharacter]), 2); + var sInterpolation = replace(/\{(?!\{)(?:(?![}:])<<0>>)*<<1>>?\}/.source, [ + sInterpolationRound, + formatString + ]); + function createInterpolationInside(interpolation, interpolationRound) { + return { + 'interpolation': { + pattern: re(/((?:^|[^{])(?:\{\{)*)<<0>>/.source, [interpolation]), + lookbehind: true, + inside: { + 'format-string': { + pattern: re(/(^\{(?:(?![}:])<<0>>)*)<<1>>(?=\}$)/.source, [ + interpolationRound, + formatString + ]), + lookbehind: true, + inside: { 'punctuation': /^:/ } + }, + 'punctuation': /^\{|\}$/, + 'expression': { + pattern: /[\s\S]+/, + alias: 'language-csharp', + inside: Prism.languages.csharp + } + } + }, + 'string': /[\s\S]+/ + }; + } + Prism.languages.insertBefore('csharp', 'string', { + 'interpolation-string': [ + { + pattern: re(/(^|[^\\])(?:\$@|@\$)"(?:""|\\[\s\S]|\{\{|<<0>>|[^\\{"])*"/.source, [mInterpolation]), + lookbehind: true, + greedy: true, + inside: createInterpolationInside(mInterpolation, mInterpolationRound) + }, + { + pattern: re(/(^|[^@\\])\$"(?:\\.|\{\{|<<0>>|[^\\"{])*"/.source, [sInterpolation]), + lookbehind: true, + greedy: true, + inside: createInterpolationInside(sInterpolation, sInterpolationRound) + } + ], + 'char': { + pattern: RegExp(character), + greedy: true + } + }); + Prism.languages.dotnet = Prism.languages.cs = Prism.languages.csharp; + }(Prism)); + (function (Prism) { + var string = /(?:"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"|'(?:\\(?:\r\n|[\s\S])|[^'\\\r\n])*')/; + Prism.languages.css = { + 'comment': /\/\*[\s\S]*?\*\//, + 'atrule': { + pattern: /@[\w-](?:[^;{\s]|\s+(?![\s{]))*(?:;|(?=\s*\{))/, + inside: { + 'rule': /^@[\w-]+/, + 'selector-function-argument': { + pattern: /(\bselector\s*\(\s*(?![\s)]))(?:[^()\s]|\s+(?![\s)])|\((?:[^()]|\([^()]*\))*\))+(?=\s*\))/, + lookbehind: true, + alias: 'selector' + }, + 'keyword': { + pattern: /(^|[^\w-])(?:and|not|only|or)(?![\w-])/, + lookbehind: true + } + } + }, + 'url': { + pattern: RegExp('\\burl\\((?:' + string.source + '|' + /(?:[^\\\r\n()"']|\\[\s\S])*/.source + ')\\)', 'i'), + greedy: true, + inside: { + 'function': /^url/i, + 'punctuation': /^\(|\)$/, + 'string': { + pattern: RegExp('^' + string.source + '$'), + alias: 'url' + } + } + }, + 'selector': { + pattern: RegExp('(^|[{}\\s])[^{}\\s](?:[^{};"\'\\s]|\\s+(?![\\s{])|' + string.source + ')*(?=\\s*\\{)'), + lookbehind: true + }, + 'string': { + pattern: string, + greedy: true + }, + 'property': { + pattern: /(^|[^-\w\xA0-\uFFFF])(?!\s)[-_a-z\xA0-\uFFFF](?:(?!\s)[-\w\xA0-\uFFFF])*(?=\s*:)/i, + lookbehind: true + }, + 'important': /!important\b/i, + 'function': { + pattern: /(^|[^-a-z0-9])[-a-z0-9]+(?=\()/i, + lookbehind: true + }, + 'punctuation': /[(){};:,]/ + }; + Prism.languages.css['atrule'].inside.rest = Prism.languages.css; + var markup = Prism.languages.markup; + if (markup) { + markup.tag.addInlined('style', 'css'); + markup.tag.addAttribute('style', 'css'); + } + }(Prism)); + (function (Prism) { + var keywords = /\b(?:abstract|assert|boolean|break|byte|case|catch|char|class|const|continue|default|do|double|else|enum|exports|extends|final|finally|float|for|goto|if|implements|import|instanceof|int|interface|long|module|native|new|non-sealed|null|open|opens|package|permits|private|protected|provides|public|record|requires|return|sealed|short|static|strictfp|super|switch|synchronized|this|throw|throws|to|transient|transitive|try|uses|var|void|volatile|while|with|yield)\b/; + var classNamePrefix = /(^|[^\w.])(?:[a-z]\w*\s*\.\s*)*(?:[A-Z]\w*\s*\.\s*)*/.source; + var className = { + pattern: RegExp(classNamePrefix + /[A-Z](?:[\d_A-Z]*[a-z]\w*)?\b/.source), + lookbehind: true, + inside: { + 'namespace': { + pattern: /^[a-z]\w*(?:\s*\.\s*[a-z]\w*)*(?:\s*\.)?/, + inside: { 'punctuation': /\./ } + }, + 'punctuation': /\./ + } + }; + Prism.languages.java = Prism.languages.extend('clike', { + 'string': { + pattern: /(^|[^\\])"(?:\\.|[^"\\\r\n])*"/, + lookbehind: true, + greedy: true + }, + 'class-name': [ + className, + { + pattern: RegExp(classNamePrefix + /[A-Z]\w*(?=\s+\w+\s*[;,=()])/.source), + lookbehind: true, + inside: className.inside + } + ], + 'keyword': keywords, + 'function': [ + Prism.languages.clike.function, + { + pattern: /(::\s*)[a-z_]\w*/, + lookbehind: true + } + ], + 'number': /\b0b[01][01_]*L?\b|\b0x(?:\.[\da-f_p+-]+|[\da-f_]+(?:\.[\da-f_p+-]+)?)\b|(?:\b\d[\d_]*(?:\.[\d_]*)?|\B\.\d[\d_]*)(?:e[+-]?\d[\d_]*)?[dfl]?/i, + 'operator': { + pattern: /(^|[^.])(?:<<=?|>>>?=?|->|--|\+\+|&&|\|\||::|[?:~]|[-+*/%&|^!=<>]=?)/m, + lookbehind: true + } + }); + Prism.languages.insertBefore('java', 'string', { + 'triple-quoted-string': { + pattern: /"""[ \t]*[\r\n](?:(?:"|"")?(?:\\.|[^"\\]))*"""/, + greedy: true, + alias: 'string' + }, + 'char': { + pattern: /'(?:\\.|[^'\\\r\n]){1,6}'/, + greedy: true + } + }); + Prism.languages.insertBefore('java', 'class-name', { + 'annotation': { + pattern: /(^|[^.])@\w+(?:\s*\.\s*\w+)*/, + lookbehind: true, + alias: 'punctuation' + }, + 'generics': { + pattern: /<(?:[\w\s,.?]|&(?!&)|<(?:[\w\s,.?]|&(?!&)|<(?:[\w\s,.?]|&(?!&)|<(?:[\w\s,.?]|&(?!&))*>)*>)*>)*>/, + inside: { + 'class-name': className, + 'keyword': keywords, + 'punctuation': /[<>(),.:]/, + 'operator': /[?&|]/ + } + }, + 'namespace': { + pattern: RegExp(/(\b(?:exports|import(?:\s+static)?|module|open|opens|package|provides|requires|to|transitive|uses|with)\s+)(?!)[a-z]\w*(?:\.[a-z]\w*)*\.?/.source.replace(//g, function () { + return keywords.source; + })), + lookbehind: true, + inside: { 'punctuation': /\./ } + } + }); + }(Prism)); + Prism.languages.javascript = Prism.languages.extend('clike', { + 'class-name': [ + Prism.languages.clike['class-name'], + { + pattern: /(^|[^$\w\xA0-\uFFFF])(?!\s)[_$A-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\.(?:constructor|prototype))/, + lookbehind: true + } + ], + 'keyword': [ + { + pattern: /((?:^|\})\s*)catch\b/, + lookbehind: true + }, + { + pattern: /(^|[^.]|\.\.\.\s*)\b(?:as|assert(?=\s*\{)|async(?=\s*(?:function\b|\(|[$\w\xA0-\uFFFF]|$))|await|break|case|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally(?=\s*(?:\{|$))|for|from(?=\s*(?:['"]|$))|function|(?:get|set)(?=\s*(?:[#\[$\w\xA0-\uFFFF]|$))|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)\b/, + lookbehind: true + } + ], + 'function': /#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*(?:\.\s*(?:apply|bind|call)\s*)?\()/, + 'number': { + pattern: RegExp(/(^|[^\w$])/.source + '(?:' + (/NaN|Infinity/.source + '|' + /0[bB][01]+(?:_[01]+)*n?/.source + '|' + /0[oO][0-7]+(?:_[0-7]+)*n?/.source + '|' + /0[xX][\dA-Fa-f]+(?:_[\dA-Fa-f]+)*n?/.source + '|' + /\d+(?:_\d+)*n/.source + '|' + /(?:\d+(?:_\d+)*(?:\.(?:\d+(?:_\d+)*)?)?|\.\d+(?:_\d+)*)(?:[Ee][+-]?\d+(?:_\d+)*)?/.source) + ')' + /(?![\w$])/.source), + lookbehind: true + }, + 'operator': /--|\+\+|\*\*=?|=>|&&=?|\|\|=?|[!=]==|<<=?|>>>?=?|[-+*/%&|^!=<>]=?|\.{3}|\?\?=?|\?\.?|[~:]/ + }); + Prism.languages.javascript['class-name'][0].pattern = /(\b(?:class|extends|implements|instanceof|interface|new)\s+)[\w.\\]+/; + Prism.languages.insertBefore('javascript', 'keyword', { + 'regex': { + pattern: /((?:^|[^$\w\xA0-\uFFFF."'\])\s]|\b(?:return|yield))\s*)\/(?:\[(?:[^\]\\\r\n]|\\.)*\]|\\.|[^/\\\[\r\n])+\/[dgimyus]{0,7}(?=(?:\s|\/\*(?:[^*]|\*(?!\/))*\*\/)*(?:$|[\r\n,.;:})\]]|\/\/))/, + lookbehind: true, + greedy: true, + inside: { + 'regex-source': { + pattern: /^(\/)[\s\S]+(?=\/[a-z]*$)/, + lookbehind: true, + alias: 'language-regex', + inside: Prism.languages.regex + }, + 'regex-delimiter': /^\/|\/$/, + 'regex-flags': /^[a-z]+$/ + } + }, + 'function-variable': { + pattern: /#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*[=:]\s*(?:async\s*)?(?:\bfunction\b|(?:\((?:[^()]|\([^()]*\))*\)|(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)\s*=>))/, + alias: 'function' + }, + 'parameter': [ + { + pattern: /(function(?:\s+(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)?\s*\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\))/, + lookbehind: true, + inside: Prism.languages.javascript + }, + { + pattern: /(^|[^$\w\xA0-\uFFFF])(?!\s)[_$a-z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*=>)/i, + lookbehind: true, + inside: Prism.languages.javascript + }, + { + pattern: /(\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*=>)/, + lookbehind: true, + inside: Prism.languages.javascript + }, + { + pattern: /((?:\b|\s|^)(?!(?:as|async|await|break|case|catch|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally|for|from|function|get|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|set|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)(?![$\w\xA0-\uFFFF]))(?:(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*\s*)\(\s*|\]\s*\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*\{)/, + lookbehind: true, + inside: Prism.languages.javascript + } + ], + 'constant': /\b[A-Z](?:[A-Z_]|\dx?)*\b/ + }); + Prism.languages.insertBefore('javascript', 'string', { + 'hashbang': { + pattern: /^#!.*/, + greedy: true, + alias: 'comment' + }, + 'template-string': { + pattern: /`(?:\\[\s\S]|\$\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})+\}|(?!\$\{)[^\\`])*`/, + greedy: true, + inside: { + 'template-punctuation': { + pattern: /^`|`$/, + alias: 'string' + }, + 'interpolation': { + pattern: /((?:^|[^\\])(?:\\{2})*)\$\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})+\}/, + lookbehind: true, + inside: { + 'interpolation-punctuation': { + pattern: /^\$\{|\}$/, + alias: 'punctuation' + }, + rest: Prism.languages.javascript + } + }, + 'string': /[\s\S]+/ + } + }, + 'string-property': { + pattern: /((?:^|[,{])[ \t]*)(["'])(?:\\(?:\r\n|[\s\S])|(?!\2)[^\\\r\n])*\2(?=\s*:)/m, + lookbehind: true, + greedy: true, + alias: 'property' + } + }); + Prism.languages.insertBefore('javascript', 'operator', { + 'literal-property': { + pattern: /((?:^|[,{])[ \t]*)(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*:)/m, + lookbehind: true, + alias: 'property' + } + }); + if (Prism.languages.markup) { + Prism.languages.markup.tag.addInlined('script', 'javascript'); + Prism.languages.markup.tag.addAttribute(/on(?:abort|blur|change|click|composition(?:end|start|update)|dblclick|error|focus(?:in|out)?|key(?:down|up)|load|mouse(?:down|enter|leave|move|out|over|up)|reset|resize|scroll|select|slotchange|submit|unload|wheel)/.source, 'javascript'); + } + Prism.languages.js = Prism.languages.javascript; + Prism.languages.markup = { + 'comment': { + pattern: //, + greedy: true + }, + 'prolog': { + pattern: /<\?[\s\S]+?\?>/, + greedy: true + }, + 'doctype': { + pattern: /"'[\]]|"[^"]*"|'[^']*')+(?:\[(?:[^<"'\]]|"[^"]*"|'[^']*'|<(?!!--)|)*\]\s*)?>/i, + greedy: true, + inside: { + 'internal-subset': { + pattern: /(^[^\[]*\[)[\s\S]+(?=\]>$)/, + lookbehind: true, + greedy: true, + inside: null + }, + 'string': { + pattern: /"[^"]*"|'[^']*'/, + greedy: true + }, + 'punctuation': /^$|[[\]]/, + 'doctype-tag': /^DOCTYPE/i, + 'name': /[^\s<>'"]+/ + } + }, + 'cdata': { + pattern: //i, + greedy: true + }, + 'tag': { + pattern: /<\/?(?!\d)[^\s>\/=$<%]+(?:\s(?:\s*[^\s>\/=]+(?:\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+(?=[\s>]))|(?=[\s/>])))+)?\s*\/?>/, + greedy: true, + inside: { + 'tag': { + pattern: /^<\/?[^\s>\/]+/, + inside: { + 'punctuation': /^<\/?/, + 'namespace': /^[^\s>\/:]+:/ + } + }, + 'special-attr': [], + 'attr-value': { + pattern: /=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+)/, + inside: { + 'punctuation': [ + { + pattern: /^=/, + alias: 'attr-equals' + }, + /"|'/ + ] + } + }, + 'punctuation': /\/?>/, + 'attr-name': { + pattern: /[^\s>\/]+/, + inside: { 'namespace': /^[^\s>\/:]+:/ } + } + } + }, + 'entity': [ + { + pattern: /&[\da-z]{1,8};/i, + alias: 'named-entity' + }, + /&#x?[\da-f]{1,8};/i + ] + }; + Prism.languages.markup['tag'].inside['attr-value'].inside['entity'] = Prism.languages.markup['entity']; + Prism.languages.markup['doctype'].inside['internal-subset'].inside = Prism.languages.markup; + Prism.hooks.add('wrap', function (env) { + if (env.type === 'entity') { + env.attributes['title'] = env.content.replace(/&/, '&'); + } + }); + Object.defineProperty(Prism.languages.markup.tag, 'addInlined', { + value: function addInlined(tagName, lang) { + var includedCdataInside = {}; + includedCdataInside['language-' + lang] = { + pattern: /(^$)/i, + lookbehind: true, + inside: Prism.languages[lang] + }; + includedCdataInside['cdata'] = /^$/i; + var inside = { + 'included-cdata': { + pattern: //i, + inside: includedCdataInside + } + }; + inside['language-' + lang] = { + pattern: /[\s\S]+/, + inside: Prism.languages[lang] + }; + var def = {}; + def[tagName] = { + pattern: RegExp(/(<__[^>]*>)(?:))*\]\]>|(?!)/.source.replace(/__/g, function () { + return tagName; + }), 'i'), + lookbehind: true, + greedy: true, + inside: inside + }; + Prism.languages.insertBefore('markup', 'cdata', def); + } + }); + Object.defineProperty(Prism.languages.markup.tag, 'addAttribute', { + value: function (attrName, lang) { + Prism.languages.markup.tag.inside['special-attr'].push({ + pattern: RegExp(/(^|["'\s])/.source + '(?:' + attrName + ')' + /\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+(?=[\s>]))/.source, 'i'), + lookbehind: true, + inside: { + 'attr-name': /^[^\s=]+/, + 'attr-value': { + pattern: /=[\s\S]+/, + inside: { + 'value': { + pattern: /(^=\s*(["']|(?!["'])))\S[\s\S]*(?=\2$)/, + lookbehind: true, + alias: [ + lang, + 'language-' + lang + ], + inside: Prism.languages[lang] + }, + 'punctuation': [ + { + pattern: /^=/, + alias: 'attr-equals' + }, + /"|'/ + ] + } + } + } + }); + } + }); + Prism.languages.html = Prism.languages.markup; + Prism.languages.mathml = Prism.languages.markup; + Prism.languages.svg = Prism.languages.markup; + Prism.languages.xml = Prism.languages.extend('markup', {}); + Prism.languages.ssml = Prism.languages.xml; + Prism.languages.atom = Prism.languages.xml; + Prism.languages.rss = Prism.languages.xml; + (function (Prism) { + var comment = /\/\*[\s\S]*?\*\/|\/\/.*|#(?!\[).*/; + var constant = [ + { + pattern: /\b(?:false|true)\b/i, + alias: 'boolean' + }, + { + pattern: /(::\s*)\b[a-z_]\w*\b(?!\s*\()/i, + greedy: true, + lookbehind: true + }, + { + pattern: /(\b(?:case|const)\s+)\b[a-z_]\w*(?=\s*[;=])/i, + greedy: true, + lookbehind: true + }, + /\b(?:null)\b/i, + /\b[A-Z_][A-Z0-9_]*\b(?!\s*\()/ + ]; + var number = /\b0b[01]+(?:_[01]+)*\b|\b0o[0-7]+(?:_[0-7]+)*\b|\b0x[\da-f]+(?:_[\da-f]+)*\b|(?:\b\d+(?:_\d+)*\.?(?:\d+(?:_\d+)*)?|\B\.\d+)(?:e[+-]?\d+)?/i; + var operator = /|\?\?=?|\.{3}|\??->|[!=]=?=?|::|\*\*=?|--|\+\+|&&|\|\||<<|>>|[?~]|[/^|%*&<>.+-]=?/; + var punctuation = /[{}\[\](),:;]/; + Prism.languages.php = { + 'delimiter': { + pattern: /\?>$|^<\?(?:php(?=\s)|=)?/i, + alias: 'important' + }, + 'comment': comment, + 'variable': /\$+(?:\w+\b|(?=\{))/, + 'package': { + pattern: /(namespace\s+|use\s+(?:function\s+)?)(?:\\?\b[a-z_]\w*)+\b(?!\\)/i, + lookbehind: true, + inside: { 'punctuation': /\\/ } + }, + 'class-name-definition': { + pattern: /(\b(?:class|enum|interface|trait)\s+)\b[a-z_]\w*(?!\\)\b/i, + lookbehind: true, + alias: 'class-name' + }, + 'function-definition': { + pattern: /(\bfunction\s+)[a-z_]\w*(?=\s*\()/i, + lookbehind: true, + alias: 'function' + }, + 'keyword': [ + { + pattern: /(\(\s*)\b(?:array|bool|boolean|float|int|integer|object|string)\b(?=\s*\))/i, + alias: 'type-casting', + greedy: true, + lookbehind: true + }, + { + pattern: /([(,?]\s*)\b(?:array(?!\s*\()|bool|callable|(?:false|null)(?=\s*\|)|float|int|iterable|mixed|object|self|static|string)\b(?=\s*\$)/i, + alias: 'type-hint', + greedy: true, + lookbehind: true + }, + { + pattern: /(\)\s*:\s*(?:\?\s*)?)\b(?:array(?!\s*\()|bool|callable|(?:false|null)(?=\s*\|)|float|int|iterable|mixed|object|self|static|string|void)\b/i, + alias: 'return-type', + greedy: true, + lookbehind: true + }, + { + pattern: /\b(?:array(?!\s*\()|bool|float|int|iterable|mixed|object|string|void)\b/i, + alias: 'type-declaration', + greedy: true + }, + { + pattern: /(\|\s*)(?:false|null)\b|\b(?:false|null)(?=\s*\|)/i, + alias: 'type-declaration', + greedy: true, + lookbehind: true + }, + { + pattern: /\b(?:parent|self|static)(?=\s*::)/i, + alias: 'static-context', + greedy: true + }, + { + pattern: /(\byield\s+)from\b/i, + lookbehind: true + }, + /\bclass\b/i, + { + pattern: /((?:^|[^\s>:]|(?:^|[^-])>|(?:^|[^:]):)\s*)\b(?:abstract|and|array|as|break|callable|case|catch|clone|const|continue|declare|default|die|do|echo|else|elseif|empty|enddeclare|endfor|endforeach|endif|endswitch|endwhile|enum|eval|exit|extends|final|finally|fn|for|foreach|function|global|goto|if|implements|include|include_once|instanceof|insteadof|interface|isset|list|match|namespace|new|or|parent|print|private|protected|public|require|require_once|return|self|static|switch|throw|trait|try|unset|use|var|while|xor|yield|__halt_compiler)\b/i, + lookbehind: true + } + ], + 'argument-name': { + pattern: /([(,]\s+)\b[a-z_]\w*(?=\s*:(?!:))/i, + lookbehind: true + }, + 'class-name': [ + { + pattern: /(\b(?:extends|implements|instanceof|new(?!\s+self|\s+static))\s+|\bcatch\s*\()\b[a-z_]\w*(?!\\)\b/i, + greedy: true, + lookbehind: true + }, + { + pattern: /(\|\s*)\b[a-z_]\w*(?!\\)\b/i, + greedy: true, + lookbehind: true + }, + { + pattern: /\b[a-z_]\w*(?!\\)\b(?=\s*\|)/i, + greedy: true + }, + { + pattern: /(\|\s*)(?:\\?\b[a-z_]\w*)+\b/i, + alias: 'class-name-fully-qualified', + greedy: true, + lookbehind: true, + inside: { 'punctuation': /\\/ } + }, + { + pattern: /(?:\\?\b[a-z_]\w*)+\b(?=\s*\|)/i, + alias: 'class-name-fully-qualified', + greedy: true, + inside: { 'punctuation': /\\/ } + }, + { + pattern: /(\b(?:extends|implements|instanceof|new(?!\s+self\b|\s+static\b))\s+|\bcatch\s*\()(?:\\?\b[a-z_]\w*)+\b(?!\\)/i, + alias: 'class-name-fully-qualified', + greedy: true, + lookbehind: true, + inside: { 'punctuation': /\\/ } + }, + { + pattern: /\b[a-z_]\w*(?=\s*\$)/i, + alias: 'type-declaration', + greedy: true + }, + { + pattern: /(?:\\?\b[a-z_]\w*)+(?=\s*\$)/i, + alias: [ + 'class-name-fully-qualified', + 'type-declaration' + ], + greedy: true, + inside: { 'punctuation': /\\/ } + }, + { + pattern: /\b[a-z_]\w*(?=\s*::)/i, + alias: 'static-context', + greedy: true + }, + { + pattern: /(?:\\?\b[a-z_]\w*)+(?=\s*::)/i, + alias: [ + 'class-name-fully-qualified', + 'static-context' + ], + greedy: true, + inside: { 'punctuation': /\\/ } + }, + { + pattern: /([(,?]\s*)[a-z_]\w*(?=\s*\$)/i, + alias: 'type-hint', + greedy: true, + lookbehind: true + }, + { + pattern: /([(,?]\s*)(?:\\?\b[a-z_]\w*)+(?=\s*\$)/i, + alias: [ + 'class-name-fully-qualified', + 'type-hint' + ], + greedy: true, + lookbehind: true, + inside: { 'punctuation': /\\/ } + }, + { + pattern: /(\)\s*:\s*(?:\?\s*)?)\b[a-z_]\w*(?!\\)\b/i, + alias: 'return-type', + greedy: true, + lookbehind: true + }, + { + pattern: /(\)\s*:\s*(?:\?\s*)?)(?:\\?\b[a-z_]\w*)+\b(?!\\)/i, + alias: [ + 'class-name-fully-qualified', + 'return-type' + ], + greedy: true, + lookbehind: true, + inside: { 'punctuation': /\\/ } + } + ], + 'constant': constant, + 'function': { + pattern: /(^|[^\\\w])\\?[a-z_](?:[\w\\]*\w)?(?=\s*\()/i, + lookbehind: true, + inside: { 'punctuation': /\\/ } + }, + 'property': { + pattern: /(->\s*)\w+/, + lookbehind: true + }, + 'number': number, + 'operator': operator, + 'punctuation': punctuation + }; + var string_interpolation = { + pattern: /\{\$(?:\{(?:\{[^{}]+\}|[^{}]+)\}|[^{}])+\}|(^|[^\\{])\$+(?:\w+(?:\[[^\r\n\[\]]+\]|->\w+)?)/, + lookbehind: true, + inside: Prism.languages.php + }; + var string = [ + { + pattern: /<<<'([^']+)'[\r\n](?:.*[\r\n])*?\1;/, + alias: 'nowdoc-string', + greedy: true, + inside: { + 'delimiter': { + pattern: /^<<<'[^']+'|[a-z_]\w*;$/i, + alias: 'symbol', + inside: { 'punctuation': /^<<<'?|[';]$/ } + } + } + }, + { + pattern: /<<<(?:"([^"]+)"[\r\n](?:.*[\r\n])*?\1;|([a-z_]\w*)[\r\n](?:.*[\r\n])*?\2;)/i, + alias: 'heredoc-string', + greedy: true, + inside: { + 'delimiter': { + pattern: /^<<<(?:"[^"]+"|[a-z_]\w*)|[a-z_]\w*;$/i, + alias: 'symbol', + inside: { 'punctuation': /^<<<"?|[";]$/ } + }, + 'interpolation': string_interpolation + } + }, + { + pattern: /`(?:\\[\s\S]|[^\\`])*`/, + alias: 'backtick-quoted-string', + greedy: true + }, + { + pattern: /'(?:\\[\s\S]|[^\\'])*'/, + alias: 'single-quoted-string', + greedy: true + }, + { + pattern: /"(?:\\[\s\S]|[^\\"])*"/, + alias: 'double-quoted-string', + greedy: true, + inside: { 'interpolation': string_interpolation } + } + ]; + Prism.languages.insertBefore('php', 'variable', { + 'string': string, + 'attribute': { + pattern: /#\[(?:[^"'\/#]|\/(?![*/])|\/\/.*$|#(?!\[).*$|\/\*(?:[^*]|\*(?!\/))*\*\/|"(?:\\[\s\S]|[^\\"])*"|'(?:\\[\s\S]|[^\\'])*')+\](?=\s*[a-z$#])/im, + greedy: true, + inside: { + 'attribute-content': { + pattern: /^(#\[)[\s\S]+(?=\]$)/, + lookbehind: true, + inside: { + 'comment': comment, + 'string': string, + 'attribute-class-name': [ + { + pattern: /([^:]|^)\b[a-z_]\w*(?!\\)\b/i, + alias: 'class-name', + greedy: true, + lookbehind: true + }, + { + pattern: /([^:]|^)(?:\\?\b[a-z_]\w*)+/i, + alias: [ + 'class-name', + 'class-name-fully-qualified' + ], + greedy: true, + lookbehind: true, + inside: { 'punctuation': /\\/ } + } + ], + 'constant': constant, + 'number': number, + 'operator': operator, + 'punctuation': punctuation + } + }, + 'delimiter': { + pattern: /^#\[|\]$/, + alias: 'punctuation' + } + } + } + }); + Prism.hooks.add('before-tokenize', function (env) { + if (!/<\?/.test(env.code)) { + return; + } + var phpPattern = /<\?(?:[^"'/#]|\/(?![*/])|("|')(?:\\[\s\S]|(?!\1)[^\\])*\1|(?:\/\/|#(?!\[))(?:[^?\n\r]|\?(?!>))*(?=$|\?>|[\r\n])|#\[|\/\*(?:[^*]|\*(?!\/))*(?:\*\/|$))*?(?:\?>|$)/g; + Prism.languages['markup-templating'].buildPlaceholders(env, 'php', phpPattern); + }); + Prism.hooks.add('after-tokenize', function (env) { + Prism.languages['markup-templating'].tokenizePlaceholders(env, 'php'); + }); + }(Prism)); + Prism.languages.python = { + 'comment': { + pattern: /(^|[^\\])#.*/, + lookbehind: true, + greedy: true + }, + 'string-interpolation': { + pattern: /(?:f|fr|rf)(?:("""|''')[\s\S]*?\1|("|')(?:\\.|(?!\2)[^\\\r\n])*\2)/i, + greedy: true, + inside: { + 'interpolation': { + pattern: /((?:^|[^{])(?:\{\{)*)\{(?!\{)(?:[^{}]|\{(?!\{)(?:[^{}]|\{(?!\{)(?:[^{}])+\})+\})+\}/, + lookbehind: true, + inside: { + 'format-spec': { + pattern: /(:)[^:(){}]+(?=\}$)/, + lookbehind: true + }, + 'conversion-option': { + pattern: /![sra](?=[:}]$)/, + alias: 'punctuation' + }, + rest: null + } + }, + 'string': /[\s\S]+/ + } + }, + 'triple-quoted-string': { + pattern: /(?:[rub]|br|rb)?("""|''')[\s\S]*?\1/i, + greedy: true, + alias: 'string' + }, + 'string': { + pattern: /(?:[rub]|br|rb)?("|')(?:\\.|(?!\1)[^\\\r\n])*\1/i, + greedy: true + }, + 'function': { + pattern: /((?:^|\s)def[ \t]+)[a-zA-Z_]\w*(?=\s*\()/g, + lookbehind: true + }, + 'class-name': { + pattern: /(\bclass\s+)\w+/i, + lookbehind: true + }, + 'decorator': { + pattern: /(^[\t ]*)@\w+(?:\.\w+)*/m, + lookbehind: true, + alias: [ + 'annotation', + 'punctuation' + ], + inside: { 'punctuation': /\./ } + }, + 'keyword': /\b(?:_(?=\s*:)|and|as|assert|async|await|break|case|class|continue|def|del|elif|else|except|exec|finally|for|from|global|if|import|in|is|lambda|match|nonlocal|not|or|pass|print|raise|return|try|while|with|yield)\b/, + 'builtin': /\b(?:__import__|abs|all|any|apply|ascii|basestring|bin|bool|buffer|bytearray|bytes|callable|chr|classmethod|cmp|coerce|compile|complex|delattr|dict|dir|divmod|enumerate|eval|execfile|file|filter|float|format|frozenset|getattr|globals|hasattr|hash|help|hex|id|input|int|intern|isinstance|issubclass|iter|len|list|locals|long|map|max|memoryview|min|next|object|oct|open|ord|pow|property|range|raw_input|reduce|reload|repr|reversed|round|set|setattr|slice|sorted|staticmethod|str|sum|super|tuple|type|unichr|unicode|vars|xrange|zip)\b/, + 'boolean': /\b(?:False|None|True)\b/, + 'number': /\b0(?:b(?:_?[01])+|o(?:_?[0-7])+|x(?:_?[a-f0-9])+)\b|(?:\b\d+(?:_\d+)*(?:\.(?:\d+(?:_\d+)*)?)?|\B\.\d+(?:_\d+)*)(?:e[+-]?\d+(?:_\d+)*)?j?(?!\w)/i, + 'operator': /[-+%=]=?|!=|:=|\*\*?=?|\/\/?=?|<[<=>]?|>[=>]?|[&|^~]/, + 'punctuation': /[{}[\];(),.:]/ + }; + Prism.languages.python['string-interpolation'].inside['interpolation'].inside.rest = Prism.languages.python; + Prism.languages.py = Prism.languages.python; + (function (Prism) { + Prism.languages.ruby = Prism.languages.extend('clike', { + 'comment': { + pattern: /#.*|^=begin\s[\s\S]*?^=end/m, + greedy: true + }, + 'class-name': { + pattern: /(\b(?:class|module)\s+|\bcatch\s+\()[\w.\\]+|\b[A-Z_]\w*(?=\s*\.\s*new\b)/, + lookbehind: true, + inside: { 'punctuation': /[.\\]/ } + }, + 'keyword': /\b(?:BEGIN|END|alias|and|begin|break|case|class|def|define_method|defined|do|each|else|elsif|end|ensure|extend|for|if|in|include|module|new|next|nil|not|or|prepend|private|protected|public|raise|redo|require|rescue|retry|return|self|super|then|throw|undef|unless|until|when|while|yield)\b/, + 'operator': /\.{2,3}|&\.|===||[!=]?~|(?:&&|\|\||<<|>>|\*\*|[+\-*/%<>!^&|=])=?|[?:]/, + 'punctuation': /[(){}[\].,;]/ + }); + Prism.languages.insertBefore('ruby', 'operator', { + 'double-colon': { + pattern: /::/, + alias: 'punctuation' + } + }); + var interpolation = { + pattern: /((?:^|[^\\])(?:\\{2})*)#\{(?:[^{}]|\{[^{}]*\})*\}/, + lookbehind: true, + inside: { + 'content': { + pattern: /^(#\{)[\s\S]+(?=\}$)/, + lookbehind: true, + inside: Prism.languages.ruby + }, + 'delimiter': { + pattern: /^#\{|\}$/, + alias: 'punctuation' + } + } + }; + delete Prism.languages.ruby.function; + var percentExpression = '(?:' + [ + /([^a-zA-Z0-9\s{(\[<=])(?:(?!\1)[^\\]|\\[\s\S])*\1/.source, + /\((?:[^()\\]|\\[\s\S]|\((?:[^()\\]|\\[\s\S])*\))*\)/.source, + /\{(?:[^{}\\]|\\[\s\S]|\{(?:[^{}\\]|\\[\s\S])*\})*\}/.source, + /\[(?:[^\[\]\\]|\\[\s\S]|\[(?:[^\[\]\\]|\\[\s\S])*\])*\]/.source, + /<(?:[^<>\\]|\\[\s\S]|<(?:[^<>\\]|\\[\s\S])*>)*>/.source + ].join('|') + ')'; + var symbolName = /(?:"(?:\\.|[^"\\\r\n])*"|(?:\b[a-zA-Z_]\w*|[^\s\0-\x7F]+)[?!]?|\$.)/.source; + Prism.languages.insertBefore('ruby', 'keyword', { + 'regex-literal': [ + { + pattern: RegExp(/%r/.source + percentExpression + /[egimnosux]{0,6}/.source), + greedy: true, + inside: { + 'interpolation': interpolation, + 'regex': /[\s\S]+/ + } + }, + { + pattern: /(^|[^/])\/(?!\/)(?:\[[^\r\n\]]+\]|\\.|[^[/\\\r\n])+\/[egimnosux]{0,6}(?=\s*(?:$|[\r\n,.;})#]))/, + lookbehind: true, + greedy: true, + inside: { + 'interpolation': interpolation, + 'regex': /[\s\S]+/ + } + } + ], + 'variable': /[@$]+[a-zA-Z_]\w*(?:[?!]|\b)/, + 'symbol': [ + { + pattern: RegExp(/(^|[^:]):/.source + symbolName), + lookbehind: true, + greedy: true + }, + { + pattern: RegExp(/([\r\n{(,][ \t]*)/.source + symbolName + /(?=:(?!:))/.source), + lookbehind: true, + greedy: true + } + ], + 'method-definition': { + pattern: /(\bdef\s+)\w+(?:\s*\.\s*\w+)?/, + lookbehind: true, + inside: { + 'function': /\b\w+$/, + 'keyword': /^self\b/, + 'class-name': /^\w+/, + 'punctuation': /\./ + } + } + }); + Prism.languages.insertBefore('ruby', 'string', { + 'string-literal': [ + { + pattern: RegExp(/%[qQiIwWs]?/.source + percentExpression), + greedy: true, + inside: { + 'interpolation': interpolation, + 'string': /[\s\S]+/ + } + }, + { + pattern: /("|')(?:#\{[^}]+\}|#(?!\{)|\\(?:\r\n|[\s\S])|(?!\1)[^\\#\r\n])*\1/, + greedy: true, + inside: { + 'interpolation': interpolation, + 'string': /[\s\S]+/ + } + }, + { + pattern: /<<[-~]?([a-z_]\w*)[\r\n](?:.*[\r\n])*?[\t ]*\1/i, + alias: 'heredoc-string', + greedy: true, + inside: { + 'delimiter': { + pattern: /^<<[-~]?[a-z_]\w*|\b[a-z_]\w*$/i, + inside: { + 'symbol': /\b\w+/, + 'punctuation': /^<<[-~]?/ + } + }, + 'interpolation': interpolation, + 'string': /[\s\S]+/ + } + }, + { + pattern: /<<[-~]?'([a-z_]\w*)'[\r\n](?:.*[\r\n])*?[\t ]*\1/i, + alias: 'heredoc-string', + greedy: true, + inside: { + 'delimiter': { + pattern: /^<<[-~]?'[a-z_]\w*'|\b[a-z_]\w*$/i, + inside: { + 'symbol': /\b\w+/, + 'punctuation': /^<<[-~]?'|'$/ + } + }, + 'string': /[\s\S]+/ + } + } + ], + 'command-literal': [ + { + pattern: RegExp(/%x/.source + percentExpression), + greedy: true, + inside: { + 'interpolation': interpolation, + 'command': { + pattern: /[\s\S]+/, + alias: 'string' + } + } + }, + { + pattern: /`(?:#\{[^}]+\}|#(?!\{)|\\(?:\r\n|[\s\S])|[^\\`#\r\n])*`/, + greedy: true, + inside: { + 'interpolation': interpolation, + 'command': { + pattern: /[\s\S]+/, + alias: 'string' + } + } + } + ] + }); + delete Prism.languages.ruby.string; + Prism.languages.insertBefore('ruby', 'number', { + 'builtin': /\b(?:Array|Bignum|Binding|Class|Continuation|Dir|Exception|FalseClass|File|Fixnum|Float|Hash|IO|Integer|MatchData|Method|Module|NilClass|Numeric|Object|Proc|Range|Regexp|Stat|String|Struct|Symbol|TMS|Thread|ThreadGroup|Time|TrueClass)\b/, + 'constant': /\b[A-Z][A-Z0-9_]*(?:[?!]|\b)/ + }); + Prism.languages.rb = Prism.languages.ruby; + }(Prism)); + window.Prism = oldprism; + return Prism; + }(undefined, undefined); + + const option = name => editor => editor.options.get(name); + const register$2 = editor => { + const registerOption = editor.options.register; + registerOption('codesample_languages', { processor: 'object[]' }); + registerOption('codesample_global_prismjs', { + processor: 'boolean', + default: false + }); + }; + const getLanguages$1 = option('codesample_languages'); + const useGlobalPrismJS = option('codesample_global_prismjs'); + + const get = editor => Global.Prism && useGlobalPrismJS(editor) ? Global.Prism : prismjs; + + const isCodeSample = elm => { + return elm && elm.nodeName === 'PRE' && elm.className.indexOf('language-') !== -1; + }; + + const getSelectedCodeSample = editor => { + const node = editor.selection ? editor.selection.getNode() : null; + return someIf(isCodeSample(node), node); + }; + const insertCodeSample = (editor, language, code) => { + const dom = editor.dom; + editor.undoManager.transact(() => { + const node = getSelectedCodeSample(editor); + code = global$1.DOM.encode(code); + return node.fold(() => { + editor.insertContent('
    ' + code + '
    '); + const newPre = dom.select('#__new')[0]; + dom.setAttrib(newPre, 'id', null); + editor.selection.select(newPre); + }, n => { + dom.setAttrib(n, 'class', 'language-' + language); + n.innerHTML = code; + get(editor).highlightElement(n); + editor.selection.select(n); + }); + }); + }; + const getCurrentCode = editor => { + const node = getSelectedCodeSample(editor); + return node.fold(constant(''), n => n.textContent); + }; + + const getLanguages = editor => { + const defaultLanguages = [ + { + text: 'HTML/XML', + value: 'markup' + }, + { + text: 'JavaScript', + value: 'javascript' + }, + { + text: 'CSS', + value: 'css' + }, + { + text: 'PHP', + value: 'php' + }, + { + text: 'Ruby', + value: 'ruby' + }, + { + text: 'Python', + value: 'python' + }, + { + text: 'Java', + value: 'java' + }, + { + text: 'C', + value: 'c' + }, + { + text: 'C#', + value: 'csharp' + }, + { + text: 'C++', + value: 'cpp' + } + ]; + const customLanguages = getLanguages$1(editor); + return customLanguages ? customLanguages : defaultLanguages; + }; + const getCurrentLanguage = (editor, fallback) => { + const node = getSelectedCodeSample(editor); + return node.fold(() => fallback, n => { + const matches = n.className.match(/language-(\w+)/); + return matches ? matches[1] : fallback; + }); + }; + + const open = editor => { + const languages = getLanguages(editor); + const defaultLanguage = head(languages).fold(constant(''), l => l.value); + const currentLanguage = getCurrentLanguage(editor, defaultLanguage); + const currentCode = getCurrentCode(editor); + editor.windowManager.open({ + title: 'Insert/Edit Code Sample', + size: 'large', + body: { + type: 'panel', + items: [ + { + type: 'selectbox', + name: 'language', + label: 'Language', + items: languages + }, + { + type: 'textarea', + name: 'code', + label: 'Code view' + } + ] + }, + buttons: [ + { + type: 'cancel', + name: 'cancel', + text: 'Cancel' + }, + { + type: 'submit', + name: 'save', + text: 'Save', + primary: true + } + ], + initialData: { + language: currentLanguage, + code: currentCode + }, + onSubmit: api => { + const data = api.getData(); + insertCodeSample(editor, data.language, data.code); + api.close(); + } + }); + }; + + const register$1 = editor => { + editor.addCommand('codesample', () => { + const node = editor.selection.getNode(); + if (editor.selection.isCollapsed() || isCodeSample(node)) { + open(editor); + } else { + editor.formatter.toggle('code'); + } + }); + }; + + const blank = r => s => s.replace(r, ''); + const trim = blank(/^\s+|\s+$/g); + + var global = tinymce.util.Tools.resolve('tinymce.util.Tools'); + + const setup = editor => { + editor.on('PreProcess', e => { + const dom = editor.dom; + const pres = dom.select('pre[contenteditable=false]', e.node); + global.each(global.grep(pres, isCodeSample), elm => { + const code = elm.textContent; + dom.setAttrib(elm, 'class', trim(dom.getAttrib(elm, 'class'))); + dom.setAttrib(elm, 'contentEditable', null); + let child; + while (child = elm.firstChild) { + elm.removeChild(child); + } + const codeElm = dom.add(elm, 'code'); + codeElm.textContent = code; + }); + }); + editor.on('SetContent', () => { + const dom = editor.dom; + const unprocessedCodeSamples = global.grep(dom.select('pre'), elm => { + return isCodeSample(elm) && elm.contentEditable !== 'false'; + }); + if (unprocessedCodeSamples.length) { + editor.undoManager.transact(() => { + global.each(unprocessedCodeSamples, elm => { + global.each(dom.select('br', elm), elm => { + elm.parentNode.replaceChild(editor.getDoc().createTextNode('\n'), elm); + }); + elm.contentEditable = 'false'; + elm.innerHTML = dom.encode(elm.textContent); + get(editor).highlightElement(elm); + elm.className = trim(elm.className); + }); + }); + } + }); + }; + + const isCodeSampleSelection = editor => { + const node = editor.selection.getStart(); + return editor.dom.is(node, 'pre[class*="language-"]'); + }; + const register = editor => { + const onAction = () => editor.execCommand('codesample'); + editor.ui.registry.addToggleButton('codesample', { + icon: 'code-sample', + tooltip: 'Insert/edit code sample', + onAction, + onSetup: api => { + const nodeChangeHandler = () => { + api.setActive(isCodeSampleSelection(editor)); + }; + editor.on('NodeChange', nodeChangeHandler); + return () => editor.off('NodeChange', nodeChangeHandler); + } + }); + editor.ui.registry.addMenuItem('codesample', { + text: 'Code sample...', + icon: 'code-sample', + onAction + }); + }; + + var Plugin = () => { + global$2.add('codesample', editor => { + register$2(editor); + setup(editor); + register(editor); + register$1(editor); + editor.on('dblclick', ev => { + if (isCodeSample(ev.target)) { + open(editor); + } + }); + }); + }; + + Plugin(); + +})(); diff --git a/vendor/tinymce/tinymce/plugins/codesample/plugin.min.js b/vendor/tinymce/tinymce/plugins/codesample/plugin.min.js new file mode 100644 index 00000000..48858505 --- /dev/null +++ b/vendor/tinymce/tinymce/plugins/codesample/plugin.min.js @@ -0,0 +1,4 @@ +/** + * TinyMCE version 6.0.2 (2022-04-27) + */ +!function(){"use strict";var e=tinymce.util.Tools.resolve("tinymce.PluginManager");const t=e=>()=>e;class n{constructor(e,t){this.tag=e,this.value=t}static some(e){return new n(!0,e)}static none(){return n.singletonNone}fold(e,t){return this.tag?t(this.value):e()}isSome(){return this.tag}isNone(){return!this.tag}map(e){return this.tag?n.some(e(this.value)):n.none()}bind(e){return this.tag?e(this.value):n.none()}exists(e){return this.tag&&e(this.value)}forall(e){return!this.tag||e(this.value)}filter(e){return!this.tag||e(this.value)?this:n.none()}getOr(e){return this.tag?this.value:e}or(e){return this.tag?this:e}getOrThunk(e){return this.tag?this.value:e()}orThunk(e){return this.tag?this:e()}getOrDie(e){if(this.tag)return this.value;throw new Error(null!=e?e:"Called getOrDie on None")}static from(e){return null==e?n.none():n.some(e)}getOrNull(){return this.tag?this.value:null}getOrUndefined(){return this.value}each(e){this.tag&&e(this.value)}toArray(){return this.tag?[this.value]:[]}toString(){return this.tag?`some(${this.value})`:"none()"}}n.singletonNone=new n(!1);var a=tinymce.util.Tools.resolve("tinymce.dom.DOMUtils");const s="undefined"!=typeof window?window:Function("return this;")(),r=function(e,t,n){const a=window.Prism;window.Prism={manual:!0};var s=function(e){var t=/(?:^|\s)lang(?:uage)?-([\w-]+)(?=\s|$)/i,n=0,a={},s={manual:e.Prism&&e.Prism.manual,disableWorkerMessageHandler:e.Prism&&e.Prism.disableWorkerMessageHandler,util:{encode:function e(t){return t instanceof r?new r(t.type,e(t.content),t.alias):Array.isArray(t)?t.map(e):t.replace(/&/g,"&").replace(/=d.reach);x+=_.value.length,_=_.next){var F=_.value;if(t.length>e.length)return;if(!(F instanceof r)){var S,A=1;if(y){if(!(S=i(v,x,e,m))||S.index>=e.length)break;var $=S.index,z=S.index+S[0].length,E=x;for(E+=_.value.length;$>=E;)E+=(_=_.next).value.length;if(x=E-=_.value.length,_.value instanceof r)continue;for(var C=_;C!==t.tail&&(Ed.reach&&(d.reach=N);var P=_.prev;if(B&&(P=u(t,P,B),x+=B.length),c(t,P,A),_=u(t,P,new r(g,f?s.tokenize(j,f):j,w,j)),T&&u(t,_,T),A>1){var O={cause:g+","+b,reach:N};o(e,t,n,_.prev,x,O),d&&O.reach>d.reach&&(d.reach=O.reach)}}}}}}function l(){var e={value:null,prev:null,next:null},t={value:null,prev:e,next:null};e.next=t,this.head=e,this.tail=t,this.length=0}function u(e,t,n){var a=t.next,s={value:n,prev:t,next:a};return t.next=s,a.prev=s,e.length++,s}function c(e,t,n){for(var a=t.next,s=0;s"+r.content+""},!e.document)return e.addEventListener?(s.disableWorkerMessageHandler||e.addEventListener("message",(function(t){var n=JSON.parse(t.data),a=n.language,r=n.code,i=n.immediateClose;e.postMessage(s.highlight(r,s.languages[a],a)),i&&e.close()}),!1),s):s;var d=s.util.currentScript();function g(){s.manual||s.highlightAll()}if(d&&(s.filename=d.src,d.hasAttribute("data-manual")&&(s.manual=!0)),!s.manual){var p=document.readyState;"loading"===p||"interactive"===p&&d&&d.defer?document.addEventListener("DOMContentLoaded",g):window.requestAnimationFrame?window.requestAnimationFrame(g):window.setTimeout(g,16)}return s}("undefined"!=typeof window?window:"undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope?self:{});return s.languages.clike={comment:[{pattern:/(^|[^\\])\/\*[\s\S]*?(?:\*\/|$)/,lookbehind:!0,greedy:!0},{pattern:/(^|[^\\:])\/\/.*/,lookbehind:!0,greedy:!0}],string:{pattern:/(["'])(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/,greedy:!0},"class-name":{pattern:/(\b(?:class|extends|implements|instanceof|interface|new|trait)\s+|\bcatch\s+\()[\w.\\]+/i,lookbehind:!0,inside:{punctuation:/[.\\]/}},keyword:/\b(?:break|catch|continue|do|else|finally|for|function|if|in|instanceof|new|null|return|throw|try|while)\b/,boolean:/\b(?:false|true)\b/,function:/\b\w+(?=\()/,number:/\b0x[\da-f]+\b|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:e[+-]?\d+)?/i,operator:/[<>]=?|[!=]=?=?|--?|\+\+?|&&?|\|\|?|[?*/~^%]/,punctuation:/[{}[\];(),.:]/},function(e){function t(e,t){return"___"+e.toUpperCase()+t+"___"}Object.defineProperties(e.languages["markup-templating"]={},{buildPlaceholders:{value:function(n,a,s,r){if(n.language===a){var i=n.tokenStack=[];n.code=n.code.replace(s,(function(e){if("function"==typeof r&&!r(e))return e;for(var s,o=i.length;-1!==n.code.indexOf(s=t(a,o));)++o;return i[o]=e,s})),n.grammar=e.languages.markup}}},tokenizePlaceholders:{value:function(n,a){if(n.language===a&&n.tokenStack){n.grammar=e.languages[a];var s=0,r=Object.keys(n.tokenStack);!function i(o){for(var l=0;l=r.length);l++){var u=o[l];if("string"==typeof u||u.content&&"string"==typeof u.content){var c=r[s],d=n.tokenStack[c],g="string"==typeof u?u:u.content,p=t(a,c),b=g.indexOf(p);if(b>-1){++s;var h=g.substring(0,b),f=new e.Token(a,e.tokenize(d,n.grammar),"language-"+a,d),m=g.substring(b+p.length),y=[];h&&y.push.apply(y,i([h])),y.push(f),m&&y.push.apply(y,i([m])),"string"==typeof u?o.splice.apply(o,[l,1].concat(y)):u.content=y}}else u.content&&i(u.content)}return o}(n.tokens)}}}})}(s),s.languages.c=s.languages.extend("clike",{comment:{pattern:/\/\/(?:[^\r\n\\]|\\(?:\r\n?|\n|(?![\r\n])))*|\/\*[\s\S]*?(?:\*\/|$)/,greedy:!0},string:{pattern:/"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"/,greedy:!0},"class-name":{pattern:/(\b(?:enum|struct)\s+(?:__attribute__\s*\(\([\s\S]*?\)\)\s*)?)\w+|\b[a-z]\w*_t\b/,lookbehind:!0},keyword:/\b(?:_Alignas|_Alignof|_Atomic|_Bool|_Complex|_Generic|_Imaginary|_Noreturn|_Static_assert|_Thread_local|__attribute__|asm|auto|break|case|char|const|continue|default|do|double|else|enum|extern|float|for|goto|if|inline|int|long|register|return|short|signed|sizeof|static|struct|switch|typedef|typeof|union|unsigned|void|volatile|while)\b/,function:/\b[a-z_]\w*(?=\s*\()/i,number:/(?:\b0x(?:[\da-f]+(?:\.[\da-f]*)?|\.[\da-f]+)(?:p[+-]?\d+)?|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:e[+-]?\d+)?)[ful]{0,4}/i,operator:/>>=?|<<=?|->|([-+&|:])\1|[?:~]|[-+*/%&|^!=<>]=?/}),s.languages.insertBefore("c","string",{char:{pattern:/'(?:\\(?:\r\n|[\s\S])|[^'\\\r\n]){0,32}'/,greedy:!0}}),s.languages.insertBefore("c","string",{macro:{pattern:/(^[\t ]*)#\s*[a-z](?:[^\r\n\\/]|\/(?!\*)|\/\*(?:[^*]|\*(?!\/))*\*\/|\\(?:\r\n|[\s\S]))*/im,lookbehind:!0,greedy:!0,alias:"property",inside:{string:[{pattern:/^(#\s*include\s*)<[^>]+>/,lookbehind:!0},s.languages.c.string],char:s.languages.c.char,comment:s.languages.c.comment,"macro-name":[{pattern:/(^#\s*define\s+)\w+\b(?!\()/i,lookbehind:!0},{pattern:/(^#\s*define\s+)\w+\b(?=\()/i,lookbehind:!0,alias:"function"}],directive:{pattern:/^(#\s*)[a-z]+/,lookbehind:!0,alias:"keyword"},"directive-hash":/^#/,punctuation:/##|\\(?=[\r\n])/,expression:{pattern:/\S[\s\S]*/,inside:s.languages.c}}}}),s.languages.insertBefore("c","function",{constant:/\b(?:EOF|NULL|SEEK_CUR|SEEK_END|SEEK_SET|__DATE__|__FILE__|__LINE__|__TIMESTAMP__|__TIME__|__func__|stderr|stdin|stdout)\b/}),delete s.languages.c.boolean,function(e){var t=/\b(?:alignas|alignof|asm|auto|bool|break|case|catch|char|char16_t|char32_t|char8_t|class|co_await|co_return|co_yield|compl|concept|const|const_cast|consteval|constexpr|constinit|continue|decltype|default|delete|do|double|dynamic_cast|else|enum|explicit|export|extern|final|float|for|friend|goto|if|import|inline|int|int16_t|int32_t|int64_t|int8_t|long|module|mutable|namespace|new|noexcept|nullptr|operator|override|private|protected|public|register|reinterpret_cast|requires|return|short|signed|sizeof|static|static_assert|static_cast|struct|switch|template|this|thread_local|throw|try|typedef|typeid|typename|uint16_t|uint32_t|uint64_t|uint8_t|union|unsigned|using|virtual|void|volatile|wchar_t|while)\b/,n=/\b(?!)\w+(?:\s*\.\s*\w+)*\b/.source.replace(//g,(function(){return t.source}));e.languages.cpp=e.languages.extend("c",{"class-name":[{pattern:RegExp(/(\b(?:class|concept|enum|struct|typename)\s+)(?!)\w+/.source.replace(//g,(function(){return t.source}))),lookbehind:!0},/\b[A-Z]\w*(?=\s*::\s*\w+\s*\()/,/\b[A-Z_]\w*(?=\s*::\s*~\w+\s*\()/i,/\b\w+(?=\s*<(?:[^<>]|<(?:[^<>]|<[^<>]*>)*>)*>\s*::\s*\w+\s*\()/],keyword:t,number:{pattern:/(?:\b0b[01']+|\b0x(?:[\da-f']+(?:\.[\da-f']*)?|\.[\da-f']+)(?:p[+-]?[\d']+)?|(?:\b[\d']+(?:\.[\d']*)?|\B\.[\d']+)(?:e[+-]?[\d']+)?)[ful]{0,4}/i,greedy:!0},operator:/>>=?|<<=?|->|--|\+\+|&&|\|\||[?:~]|<=>|[-+*/%&|^!=<>]=?|\b(?:and|and_eq|bitand|bitor|not|not_eq|or|or_eq|xor|xor_eq)\b/,boolean:/\b(?:false|true)\b/}),e.languages.insertBefore("cpp","string",{module:{pattern:RegExp(/(\b(?:import|module)\s+)/.source+"(?:"+/"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"|<[^<>\r\n]*>/.source+"|"+/(?:\s*:\s*)?|:\s*/.source.replace(//g,(function(){return n}))+")"),lookbehind:!0,greedy:!0,inside:{string:/^[<"][\s\S]+/,operator:/:/,punctuation:/\./}},"raw-string":{pattern:/R"([^()\\ ]{0,16})\([\s\S]*?\)\1"/,alias:"string",greedy:!0}}),e.languages.insertBefore("cpp","keyword",{"generic-function":{pattern:/\b(?!operator\b)[a-z_]\w*\s*<(?:[^<>]|<[^<>]*>)*>(?=\s*\()/i,inside:{function:/^\w+/,generic:{pattern:/<[\s\S]+/,alias:"class-name",inside:e.languages.cpp}}}}),e.languages.insertBefore("cpp","operator",{"double-colon":{pattern:/::/,alias:"punctuation"}}),e.languages.insertBefore("cpp","class-name",{"base-clause":{pattern:/(\b(?:class|struct)\s+\w+\s*:\s*)[^;{}"'\s]+(?:\s+[^;{}"'\s]+)*(?=\s*[;{])/,lookbehind:!0,greedy:!0,inside:e.languages.extend("cpp",{})}}),e.languages.insertBefore("inside","double-colon",{"class-name":/\b[a-z_]\w*\b(?!\s*::)/i},e.languages.cpp["base-clause"])}(s),function(e){function t(e,t){return e.replace(/<<(\d+)>>/g,(function(e,n){return"(?:"+t[+n]+")"}))}function n(e,n,a){return RegExp(t(e,n),a||"")}function a(e,t){for(var n=0;n>/g,(function(){return"(?:"+e+")"}));return e.replace(/<>/g,"[^\\s\\S]")}var s="bool byte char decimal double dynamic float int long object sbyte short string uint ulong ushort var void",r="class enum interface record struct",i="add alias and ascending async await by descending from(?=\\s*(?:\\w|$)) get global group into init(?=\\s*;) join let nameof not notnull on or orderby partial remove select set unmanaged value when where with(?=\\s*{)",o="abstract as base break case catch checked const continue default delegate do else event explicit extern finally fixed for foreach goto if implicit in internal is lock namespace new null operator out override params private protected public readonly ref return sealed sizeof stackalloc static switch this throw try typeof unchecked unsafe using virtual volatile while yield";function l(e){return"\\b(?:"+e.trim().replace(/ /g,"|")+")\\b"}var u=l(r),c=RegExp(l(s+" "+r+" "+i+" "+o)),d=l(r+" "+i+" "+o),g=l(s+" "+r+" "+o),p=a(/<(?:[^<>;=+\-*/%&|^]|<>)*>/.source,2),b=a(/\((?:[^()]|<>)*\)/.source,2),h=/@?\b[A-Za-z_]\w*\b/.source,f=t(/<<0>>(?:\s*<<1>>)?/.source,[h,p]),m=t(/(?!<<0>>)<<1>>(?:\s*\.\s*<<1>>)*/.source,[d,f]),y=/\[\s*(?:,\s*)*\]/.source,w=t(/<<0>>(?:\s*(?:\?\s*)?<<1>>)*(?:\s*\?)?/.source,[m,y]),k=t(/[^,()<>[\];=+\-*/%&|^]|<<0>>|<<1>>|<<2>>/.source,[p,b,y]),v=t(/\(<<0>>+(?:,<<0>>+)+\)/.source,[k]),_=t(/(?:<<0>>|<<1>>)(?:\s*(?:\?\s*)?<<2>>)*(?:\s*\?)?/.source,[v,m,y]),x={keyword:c,punctuation:/[<>()?,.:[\]]/},F=/'(?:[^\r\n'\\]|\\.|\\[Uux][\da-fA-F]{1,8})'/.source,S=/"(?:\\.|[^\\"\r\n])*"/.source,A=/@"(?:""|\\[\s\S]|[^\\"])*"(?!")/.source;e.languages.csharp=e.languages.extend("clike",{string:[{pattern:n(/(^|[^$\\])<<0>>/.source,[A]),lookbehind:!0,greedy:!0},{pattern:n(/(^|[^@$\\])<<0>>/.source,[S]),lookbehind:!0,greedy:!0}],"class-name":[{pattern:n(/(\busing\s+static\s+)<<0>>(?=\s*;)/.source,[m]),lookbehind:!0,inside:x},{pattern:n(/(\busing\s+<<0>>\s*=\s*)<<1>>(?=\s*;)/.source,[h,_]),lookbehind:!0,inside:x},{pattern:n(/(\busing\s+)<<0>>(?=\s*=)/.source,[h]),lookbehind:!0},{pattern:n(/(\b<<0>>\s+)<<1>>/.source,[u,f]),lookbehind:!0,inside:x},{pattern:n(/(\bcatch\s*\(\s*)<<0>>/.source,[m]),lookbehind:!0,inside:x},{pattern:n(/(\bwhere\s+)<<0>>/.source,[h]),lookbehind:!0},{pattern:n(/(\b(?:is(?:\s+not)?|as)\s+)<<0>>/.source,[w]),lookbehind:!0,inside:x},{pattern:n(/\b<<0>>(?=\s+(?!<<1>>|with\s*\{)<<2>>(?:\s*[=,;:{)\]]|\s+(?:in|when)\b))/.source,[_,g,h]),inside:x}],keyword:c,number:/(?:\b0(?:x[\da-f_]*[\da-f]|b[01_]*[01])|(?:\B\.\d+(?:_+\d+)*|\b\d+(?:_+\d+)*(?:\.\d+(?:_+\d+)*)?)(?:e[-+]?\d+(?:_+\d+)*)?)(?:[dflmu]|lu|ul)?\b/i,operator:/>>=?|<<=?|[-=]>|([-+&|])\1|~|\?\?=?|[-+*/%&|^!=<>]=?/,punctuation:/\?\.?|::|[{}[\];(),.:]/}),e.languages.insertBefore("csharp","number",{range:{pattern:/\.\./,alias:"operator"}}),e.languages.insertBefore("csharp","punctuation",{"named-parameter":{pattern:n(/([(,]\s*)<<0>>(?=\s*:)/.source,[h]),lookbehind:!0,alias:"punctuation"}}),e.languages.insertBefore("csharp","class-name",{namespace:{pattern:n(/(\b(?:namespace|using)\s+)<<0>>(?:\s*\.\s*<<0>>)*(?=\s*[;{])/.source,[h]),lookbehind:!0,inside:{punctuation:/\./}},"type-expression":{pattern:n(/(\b(?:default|sizeof|typeof)\s*\(\s*(?!\s))(?:[^()\s]|\s(?!\s)|<<0>>)*(?=\s*\))/.source,[b]),lookbehind:!0,alias:"class-name",inside:x},"return-type":{pattern:n(/<<0>>(?=\s+(?:<<1>>\s*(?:=>|[({]|\.\s*this\s*\[)|this\s*\[))/.source,[_,m]),inside:x,alias:"class-name"},"constructor-invocation":{pattern:n(/(\bnew\s+)<<0>>(?=\s*[[({])/.source,[_]),lookbehind:!0,inside:x,alias:"class-name"},"generic-method":{pattern:n(/<<0>>\s*<<1>>(?=\s*\()/.source,[h,p]),inside:{function:n(/^<<0>>/.source,[h]),generic:{pattern:RegExp(p),alias:"class-name",inside:x}}},"type-list":{pattern:n(/\b((?:<<0>>\s+<<1>>|record\s+<<1>>\s*<<5>>|where\s+<<2>>)\s*:\s*)(?:<<3>>|<<4>>|<<1>>\s*<<5>>|<<6>>)(?:\s*,\s*(?:<<3>>|<<4>>|<<6>>))*(?=\s*(?:where|[{;]|=>|$))/.source,[u,f,h,_,c.source,b,/\bnew\s*\(\s*\)/.source]),lookbehind:!0,inside:{"record-arguments":{pattern:n(/(^(?!new\s*\()<<0>>\s*)<<1>>/.source,[f,b]),lookbehind:!0,greedy:!0,inside:e.languages.csharp},keyword:c,"class-name":{pattern:RegExp(_),greedy:!0,inside:x},punctuation:/[,()]/}},preprocessor:{pattern:/(^[\t ]*)#.*/m,lookbehind:!0,alias:"property",inside:{directive:{pattern:/(#)\b(?:define|elif|else|endif|endregion|error|if|line|nullable|pragma|region|undef|warning)\b/,lookbehind:!0,alias:"keyword"}}}});var $=S+"|"+F,z=t(/\/(?![*/])|\/\/[^\r\n]*[\r\n]|\/\*(?:[^*]|\*(?!\/))*\*\/|<<0>>/.source,[$]),E=a(t(/[^"'/()]|<<0>>|\(<>*\)/.source,[z]),2),C=/\b(?:assembly|event|field|method|module|param|property|return|type)\b/.source,j=t(/<<0>>(?:\s*\(<<1>>*\))?/.source,[m,E]);e.languages.insertBefore("csharp","class-name",{attribute:{pattern:n(/((?:^|[^\s\w>)?])\s*\[\s*)(?:<<0>>\s*:\s*)?<<1>>(?:\s*,\s*<<1>>)*(?=\s*\])/.source,[C,j]),lookbehind:!0,greedy:!0,inside:{target:{pattern:n(/^<<0>>(?=\s*:)/.source,[C]),alias:"keyword"},"attribute-arguments":{pattern:n(/\(<<0>>*\)/.source,[E]),inside:e.languages.csharp},"class-name":{pattern:RegExp(m),inside:{punctuation:/\./}},punctuation:/[:,]/}}});var B=/:[^}\r\n]+/.source,T=a(t(/[^"'/()]|<<0>>|\(<>*\)/.source,[z]),2),N=t(/\{(?!\{)(?:(?![}:])<<0>>)*<<1>>?\}/.source,[T,B]),P=a(t(/[^"'/()]|\/(?!\*)|\/\*(?:[^*]|\*(?!\/))*\*\/|<<0>>|\(<>*\)/.source,[$]),2),O=t(/\{(?!\{)(?:(?![}:])<<0>>)*<<1>>?\}/.source,[P,B]);function q(t,a){return{interpolation:{pattern:n(/((?:^|[^{])(?:\{\{)*)<<0>>/.source,[t]),lookbehind:!0,inside:{"format-string":{pattern:n(/(^\{(?:(?![}:])<<0>>)*)<<1>>(?=\}$)/.source,[a,B]),lookbehind:!0,inside:{punctuation:/^:/}},punctuation:/^\{|\}$/,expression:{pattern:/[\s\S]+/,alias:"language-csharp",inside:e.languages.csharp}}},string:/[\s\S]+/}}e.languages.insertBefore("csharp","string",{"interpolation-string":[{pattern:n(/(^|[^\\])(?:\$@|@\$)"(?:""|\\[\s\S]|\{\{|<<0>>|[^\\{"])*"/.source,[N]),lookbehind:!0,greedy:!0,inside:q(N,T)},{pattern:n(/(^|[^@\\])\$"(?:\\.|\{\{|<<0>>|[^\\"{])*"/.source,[O]),lookbehind:!0,greedy:!0,inside:q(O,P)}],char:{pattern:RegExp(F),greedy:!0}}),e.languages.dotnet=e.languages.cs=e.languages.csharp}(s),function(e){var t=/(?:"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"|'(?:\\(?:\r\n|[\s\S])|[^'\\\r\n])*')/;e.languages.css={comment:/\/\*[\s\S]*?\*\//,atrule:{pattern:/@[\w-](?:[^;{\s]|\s+(?![\s{]))*(?:;|(?=\s*\{))/,inside:{rule:/^@[\w-]+/,"selector-function-argument":{pattern:/(\bselector\s*\(\s*(?![\s)]))(?:[^()\s]|\s+(?![\s)])|\((?:[^()]|\([^()]*\))*\))+(?=\s*\))/,lookbehind:!0,alias:"selector"},keyword:{pattern:/(^|[^\w-])(?:and|not|only|or)(?![\w-])/,lookbehind:!0}}},url:{pattern:RegExp("\\burl\\((?:"+t.source+"|"+/(?:[^\\\r\n()"']|\\[\s\S])*/.source+")\\)","i"),greedy:!0,inside:{function:/^url/i,punctuation:/^\(|\)$/,string:{pattern:RegExp("^"+t.source+"$"),alias:"url"}}},selector:{pattern:RegExp("(^|[{}\\s])[^{}\\s](?:[^{};\"'\\s]|\\s+(?![\\s{])|"+t.source+")*(?=\\s*\\{)"),lookbehind:!0},string:{pattern:t,greedy:!0},property:{pattern:/(^|[^-\w\xA0-\uFFFF])(?!\s)[-_a-z\xA0-\uFFFF](?:(?!\s)[-\w\xA0-\uFFFF])*(?=\s*:)/i,lookbehind:!0},important:/!important\b/i,function:{pattern:/(^|[^-a-z0-9])[-a-z0-9]+(?=\()/i,lookbehind:!0},punctuation:/[(){};:,]/},e.languages.css.atrule.inside.rest=e.languages.css;var n=e.languages.markup;n&&(n.tag.addInlined("style","css"),n.tag.addAttribute("style","css"))}(s),function(e){var t=/\b(?:abstract|assert|boolean|break|byte|case|catch|char|class|const|continue|default|do|double|else|enum|exports|extends|final|finally|float|for|goto|if|implements|import|instanceof|int|interface|long|module|native|new|non-sealed|null|open|opens|package|permits|private|protected|provides|public|record|requires|return|sealed|short|static|strictfp|super|switch|synchronized|this|throw|throws|to|transient|transitive|try|uses|var|void|volatile|while|with|yield)\b/,n=/(^|[^\w.])(?:[a-z]\w*\s*\.\s*)*(?:[A-Z]\w*\s*\.\s*)*/.source,a={pattern:RegExp(n+/[A-Z](?:[\d_A-Z]*[a-z]\w*)?\b/.source),lookbehind:!0,inside:{namespace:{pattern:/^[a-z]\w*(?:\s*\.\s*[a-z]\w*)*(?:\s*\.)?/,inside:{punctuation:/\./}},punctuation:/\./}};e.languages.java=e.languages.extend("clike",{string:{pattern:/(^|[^\\])"(?:\\.|[^"\\\r\n])*"/,lookbehind:!0,greedy:!0},"class-name":[a,{pattern:RegExp(n+/[A-Z]\w*(?=\s+\w+\s*[;,=()])/.source),lookbehind:!0,inside:a.inside}],keyword:t,function:[e.languages.clike.function,{pattern:/(::\s*)[a-z_]\w*/,lookbehind:!0}],number:/\b0b[01][01_]*L?\b|\b0x(?:\.[\da-f_p+-]+|[\da-f_]+(?:\.[\da-f_p+-]+)?)\b|(?:\b\d[\d_]*(?:\.[\d_]*)?|\B\.\d[\d_]*)(?:e[+-]?\d[\d_]*)?[dfl]?/i,operator:{pattern:/(^|[^.])(?:<<=?|>>>?=?|->|--|\+\+|&&|\|\||::|[?:~]|[-+*/%&|^!=<>]=?)/m,lookbehind:!0}}),e.languages.insertBefore("java","string",{"triple-quoted-string":{pattern:/"""[ \t]*[\r\n](?:(?:"|"")?(?:\\.|[^"\\]))*"""/,greedy:!0,alias:"string"},char:{pattern:/'(?:\\.|[^'\\\r\n]){1,6}'/,greedy:!0}}),e.languages.insertBefore("java","class-name",{annotation:{pattern:/(^|[^.])@\w+(?:\s*\.\s*\w+)*/,lookbehind:!0,alias:"punctuation"},generics:{pattern:/<(?:[\w\s,.?]|&(?!&)|<(?:[\w\s,.?]|&(?!&)|<(?:[\w\s,.?]|&(?!&)|<(?:[\w\s,.?]|&(?!&))*>)*>)*>)*>/,inside:{"class-name":a,keyword:t,punctuation:/[<>(),.:]/,operator:/[?&|]/}},namespace:{pattern:RegExp(/(\b(?:exports|import(?:\s+static)?|module|open|opens|package|provides|requires|to|transitive|uses|with)\s+)(?!)[a-z]\w*(?:\.[a-z]\w*)*\.?/.source.replace(//g,(function(){return t.source}))),lookbehind:!0,inside:{punctuation:/\./}}})}(s),s.languages.javascript=s.languages.extend("clike",{"class-name":[s.languages.clike["class-name"],{pattern:/(^|[^$\w\xA0-\uFFFF])(?!\s)[_$A-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\.(?:constructor|prototype))/,lookbehind:!0}],keyword:[{pattern:/((?:^|\})\s*)catch\b/,lookbehind:!0},{pattern:/(^|[^.]|\.\.\.\s*)\b(?:as|assert(?=\s*\{)|async(?=\s*(?:function\b|\(|[$\w\xA0-\uFFFF]|$))|await|break|case|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally(?=\s*(?:\{|$))|for|from(?=\s*(?:['"]|$))|function|(?:get|set)(?=\s*(?:[#\[$\w\xA0-\uFFFF]|$))|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)\b/,lookbehind:!0}],function:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*(?:\.\s*(?:apply|bind|call)\s*)?\()/,number:{pattern:RegExp(/(^|[^\w$])/.source+"(?:"+/NaN|Infinity/.source+"|"+/0[bB][01]+(?:_[01]+)*n?/.source+"|"+/0[oO][0-7]+(?:_[0-7]+)*n?/.source+"|"+/0[xX][\dA-Fa-f]+(?:_[\dA-Fa-f]+)*n?/.source+"|"+/\d+(?:_\d+)*n/.source+"|"+/(?:\d+(?:_\d+)*(?:\.(?:\d+(?:_\d+)*)?)?|\.\d+(?:_\d+)*)(?:[Ee][+-]?\d+(?:_\d+)*)?/.source+")"+/(?![\w$])/.source),lookbehind:!0},operator:/--|\+\+|\*\*=?|=>|&&=?|\|\|=?|[!=]==|<<=?|>>>?=?|[-+*/%&|^!=<>]=?|\.{3}|\?\?=?|\?\.?|[~:]/}),s.languages.javascript["class-name"][0].pattern=/(\b(?:class|extends|implements|instanceof|interface|new)\s+)[\w.\\]+/,s.languages.insertBefore("javascript","keyword",{regex:{pattern:/((?:^|[^$\w\xA0-\uFFFF."'\])\s]|\b(?:return|yield))\s*)\/(?:\[(?:[^\]\\\r\n]|\\.)*\]|\\.|[^/\\\[\r\n])+\/[dgimyus]{0,7}(?=(?:\s|\/\*(?:[^*]|\*(?!\/))*\*\/)*(?:$|[\r\n,.;:})\]]|\/\/))/,lookbehind:!0,greedy:!0,inside:{"regex-source":{pattern:/^(\/)[\s\S]+(?=\/[a-z]*$)/,lookbehind:!0,alias:"language-regex",inside:s.languages.regex},"regex-delimiter":/^\/|\/$/,"regex-flags":/^[a-z]+$/}},"function-variable":{pattern:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*[=:]\s*(?:async\s*)?(?:\bfunction\b|(?:\((?:[^()]|\([^()]*\))*\)|(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)\s*=>))/,alias:"function"},parameter:[{pattern:/(function(?:\s+(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)?\s*\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\))/,lookbehind:!0,inside:s.languages.javascript},{pattern:/(^|[^$\w\xA0-\uFFFF])(?!\s)[_$a-z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*=>)/i,lookbehind:!0,inside:s.languages.javascript},{pattern:/(\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*=>)/,lookbehind:!0,inside:s.languages.javascript},{pattern:/((?:\b|\s|^)(?!(?:as|async|await|break|case|catch|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally|for|from|function|get|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|set|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)(?![$\w\xA0-\uFFFF]))(?:(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*\s*)\(\s*|\]\s*\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*\{)/,lookbehind:!0,inside:s.languages.javascript}],constant:/\b[A-Z](?:[A-Z_]|\dx?)*\b/}),s.languages.insertBefore("javascript","string",{hashbang:{pattern:/^#!.*/,greedy:!0,alias:"comment"},"template-string":{pattern:/`(?:\\[\s\S]|\$\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})+\}|(?!\$\{)[^\\`])*`/,greedy:!0,inside:{"template-punctuation":{pattern:/^`|`$/,alias:"string"},interpolation:{pattern:/((?:^|[^\\])(?:\\{2})*)\$\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})+\}/,lookbehind:!0,inside:{"interpolation-punctuation":{pattern:/^\$\{|\}$/,alias:"punctuation"},rest:s.languages.javascript}},string:/[\s\S]+/}},"string-property":{pattern:/((?:^|[,{])[ \t]*)(["'])(?:\\(?:\r\n|[\s\S])|(?!\2)[^\\\r\n])*\2(?=\s*:)/m,lookbehind:!0,greedy:!0,alias:"property"}}),s.languages.insertBefore("javascript","operator",{"literal-property":{pattern:/((?:^|[,{])[ \t]*)(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*:)/m,lookbehind:!0,alias:"property"}}),s.languages.markup&&(s.languages.markup.tag.addInlined("script","javascript"),s.languages.markup.tag.addAttribute(/on(?:abort|blur|change|click|composition(?:end|start|update)|dblclick|error|focus(?:in|out)?|key(?:down|up)|load|mouse(?:down|enter|leave|move|out|over|up)|reset|resize|scroll|select|slotchange|submit|unload|wheel)/.source,"javascript")),s.languages.js=s.languages.javascript,s.languages.markup={comment:{pattern://,greedy:!0},prolog:{pattern:/<\?[\s\S]+?\?>/,greedy:!0},doctype:{pattern:/"'[\]]|"[^"]*"|'[^']*')+(?:\[(?:[^<"'\]]|"[^"]*"|'[^']*'|<(?!!--)|)*\]\s*)?>/i,greedy:!0,inside:{"internal-subset":{pattern:/(^[^\[]*\[)[\s\S]+(?=\]>$)/,lookbehind:!0,greedy:!0,inside:null},string:{pattern:/"[^"]*"|'[^']*'/,greedy:!0},punctuation:/^$|[[\]]/,"doctype-tag":/^DOCTYPE/i,name:/[^\s<>'"]+/}},cdata:{pattern://i,greedy:!0},tag:{pattern:/<\/?(?!\d)[^\s>\/=$<%]+(?:\s(?:\s*[^\s>\/=]+(?:\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+(?=[\s>]))|(?=[\s/>])))+)?\s*\/?>/,greedy:!0,inside:{tag:{pattern:/^<\/?[^\s>\/]+/,inside:{punctuation:/^<\/?/,namespace:/^[^\s>\/:]+:/}},"special-attr":[],"attr-value":{pattern:/=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+)/,inside:{punctuation:[{pattern:/^=/,alias:"attr-equals"},/"|'/]}},punctuation:/\/?>/,"attr-name":{pattern:/[^\s>\/]+/,inside:{namespace:/^[^\s>\/:]+:/}}}},entity:[{pattern:/&[\da-z]{1,8};/i,alias:"named-entity"},/&#x?[\da-f]{1,8};/i]},s.languages.markup.tag.inside["attr-value"].inside.entity=s.languages.markup.entity,s.languages.markup.doctype.inside["internal-subset"].inside=s.languages.markup,s.hooks.add("wrap",(function(e){"entity"===e.type&&(e.attributes.title=e.content.replace(/&/,"&"))})),Object.defineProperty(s.languages.markup.tag,"addInlined",{value:function(e,t){var n={};n["language-"+t]={pattern:/(^$)/i,lookbehind:!0,inside:s.languages[t]},n.cdata=/^$/i;var a={"included-cdata":{pattern://i,inside:n}};a["language-"+t]={pattern:/[\s\S]+/,inside:s.languages[t]};var r={};r[e]={pattern:RegExp(/(<__[^>]*>)(?:))*\]\]>|(?!)/.source.replace(/__/g,(function(){return e})),"i"),lookbehind:!0,greedy:!0,inside:a},s.languages.insertBefore("markup","cdata",r)}}),Object.defineProperty(s.languages.markup.tag,"addAttribute",{value:function(e,t){s.languages.markup.tag.inside["special-attr"].push({pattern:RegExp(/(^|["'\s])/.source+"(?:"+e+")"+/\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+(?=[\s>]))/.source,"i"),lookbehind:!0,inside:{"attr-name":/^[^\s=]+/,"attr-value":{pattern:/=[\s\S]+/,inside:{value:{pattern:/(^=\s*(["']|(?!["'])))\S[\s\S]*(?=\2$)/,lookbehind:!0,alias:[t,"language-"+t],inside:s.languages[t]},punctuation:[{pattern:/^=/,alias:"attr-equals"},/"|'/]}}}})}}),s.languages.html=s.languages.markup,s.languages.mathml=s.languages.markup,s.languages.svg=s.languages.markup,s.languages.xml=s.languages.extend("markup",{}),s.languages.ssml=s.languages.xml,s.languages.atom=s.languages.xml,s.languages.rss=s.languages.xml,function(e){var t=/\/\*[\s\S]*?\*\/|\/\/.*|#(?!\[).*/,n=[{pattern:/\b(?:false|true)\b/i,alias:"boolean"},{pattern:/(::\s*)\b[a-z_]\w*\b(?!\s*\()/i,greedy:!0,lookbehind:!0},{pattern:/(\b(?:case|const)\s+)\b[a-z_]\w*(?=\s*[;=])/i,greedy:!0,lookbehind:!0},/\b(?:null)\b/i,/\b[A-Z_][A-Z0-9_]*\b(?!\s*\()/],a=/\b0b[01]+(?:_[01]+)*\b|\b0o[0-7]+(?:_[0-7]+)*\b|\b0x[\da-f]+(?:_[\da-f]+)*\b|(?:\b\d+(?:_\d+)*\.?(?:\d+(?:_\d+)*)?|\B\.\d+)(?:e[+-]?\d+)?/i,s=/|\?\?=?|\.{3}|\??->|[!=]=?=?|::|\*\*=?|--|\+\+|&&|\|\||<<|>>|[?~]|[/^|%*&<>.+-]=?/,r=/[{}\[\](),:;]/;e.languages.php={delimiter:{pattern:/\?>$|^<\?(?:php(?=\s)|=)?/i,alias:"important"},comment:t,variable:/\$+(?:\w+\b|(?=\{))/,package:{pattern:/(namespace\s+|use\s+(?:function\s+)?)(?:\\?\b[a-z_]\w*)+\b(?!\\)/i,lookbehind:!0,inside:{punctuation:/\\/}},"class-name-definition":{pattern:/(\b(?:class|enum|interface|trait)\s+)\b[a-z_]\w*(?!\\)\b/i,lookbehind:!0,alias:"class-name"},"function-definition":{pattern:/(\bfunction\s+)[a-z_]\w*(?=\s*\()/i,lookbehind:!0,alias:"function"},keyword:[{pattern:/(\(\s*)\b(?:array|bool|boolean|float|int|integer|object|string)\b(?=\s*\))/i,alias:"type-casting",greedy:!0,lookbehind:!0},{pattern:/([(,?]\s*)\b(?:array(?!\s*\()|bool|callable|(?:false|null)(?=\s*\|)|float|int|iterable|mixed|object|self|static|string)\b(?=\s*\$)/i,alias:"type-hint",greedy:!0,lookbehind:!0},{pattern:/(\)\s*:\s*(?:\?\s*)?)\b(?:array(?!\s*\()|bool|callable|(?:false|null)(?=\s*\|)|float|int|iterable|mixed|object|self|static|string|void)\b/i,alias:"return-type",greedy:!0,lookbehind:!0},{pattern:/\b(?:array(?!\s*\()|bool|float|int|iterable|mixed|object|string|void)\b/i,alias:"type-declaration",greedy:!0},{pattern:/(\|\s*)(?:false|null)\b|\b(?:false|null)(?=\s*\|)/i,alias:"type-declaration",greedy:!0,lookbehind:!0},{pattern:/\b(?:parent|self|static)(?=\s*::)/i,alias:"static-context",greedy:!0},{pattern:/(\byield\s+)from\b/i,lookbehind:!0},/\bclass\b/i,{pattern:/((?:^|[^\s>:]|(?:^|[^-])>|(?:^|[^:]):)\s*)\b(?:abstract|and|array|as|break|callable|case|catch|clone|const|continue|declare|default|die|do|echo|else|elseif|empty|enddeclare|endfor|endforeach|endif|endswitch|endwhile|enum|eval|exit|extends|final|finally|fn|for|foreach|function|global|goto|if|implements|include|include_once|instanceof|insteadof|interface|isset|list|match|namespace|new|or|parent|print|private|protected|public|require|require_once|return|self|static|switch|throw|trait|try|unset|use|var|while|xor|yield|__halt_compiler)\b/i,lookbehind:!0}],"argument-name":{pattern:/([(,]\s+)\b[a-z_]\w*(?=\s*:(?!:))/i,lookbehind:!0},"class-name":[{pattern:/(\b(?:extends|implements|instanceof|new(?!\s+self|\s+static))\s+|\bcatch\s*\()\b[a-z_]\w*(?!\\)\b/i,greedy:!0,lookbehind:!0},{pattern:/(\|\s*)\b[a-z_]\w*(?!\\)\b/i,greedy:!0,lookbehind:!0},{pattern:/\b[a-z_]\w*(?!\\)\b(?=\s*\|)/i,greedy:!0},{pattern:/(\|\s*)(?:\\?\b[a-z_]\w*)+\b/i,alias:"class-name-fully-qualified",greedy:!0,lookbehind:!0,inside:{punctuation:/\\/}},{pattern:/(?:\\?\b[a-z_]\w*)+\b(?=\s*\|)/i,alias:"class-name-fully-qualified",greedy:!0,inside:{punctuation:/\\/}},{pattern:/(\b(?:extends|implements|instanceof|new(?!\s+self\b|\s+static\b))\s+|\bcatch\s*\()(?:\\?\b[a-z_]\w*)+\b(?!\\)/i,alias:"class-name-fully-qualified",greedy:!0,lookbehind:!0,inside:{punctuation:/\\/}},{pattern:/\b[a-z_]\w*(?=\s*\$)/i,alias:"type-declaration",greedy:!0},{pattern:/(?:\\?\b[a-z_]\w*)+(?=\s*\$)/i,alias:["class-name-fully-qualified","type-declaration"],greedy:!0,inside:{punctuation:/\\/}},{pattern:/\b[a-z_]\w*(?=\s*::)/i,alias:"static-context",greedy:!0},{pattern:/(?:\\?\b[a-z_]\w*)+(?=\s*::)/i,alias:["class-name-fully-qualified","static-context"],greedy:!0,inside:{punctuation:/\\/}},{pattern:/([(,?]\s*)[a-z_]\w*(?=\s*\$)/i,alias:"type-hint",greedy:!0,lookbehind:!0},{pattern:/([(,?]\s*)(?:\\?\b[a-z_]\w*)+(?=\s*\$)/i,alias:["class-name-fully-qualified","type-hint"],greedy:!0,lookbehind:!0,inside:{punctuation:/\\/}},{pattern:/(\)\s*:\s*(?:\?\s*)?)\b[a-z_]\w*(?!\\)\b/i,alias:"return-type",greedy:!0,lookbehind:!0},{pattern:/(\)\s*:\s*(?:\?\s*)?)(?:\\?\b[a-z_]\w*)+\b(?!\\)/i,alias:["class-name-fully-qualified","return-type"],greedy:!0,lookbehind:!0,inside:{punctuation:/\\/}}],constant:n,function:{pattern:/(^|[^\\\w])\\?[a-z_](?:[\w\\]*\w)?(?=\s*\()/i,lookbehind:!0,inside:{punctuation:/\\/}},property:{pattern:/(->\s*)\w+/,lookbehind:!0},number:a,operator:s,punctuation:r};var i={pattern:/\{\$(?:\{(?:\{[^{}]+\}|[^{}]+)\}|[^{}])+\}|(^|[^\\{])\$+(?:\w+(?:\[[^\r\n\[\]]+\]|->\w+)?)/,lookbehind:!0,inside:e.languages.php},o=[{pattern:/<<<'([^']+)'[\r\n](?:.*[\r\n])*?\1;/,alias:"nowdoc-string",greedy:!0,inside:{delimiter:{pattern:/^<<<'[^']+'|[a-z_]\w*;$/i,alias:"symbol",inside:{punctuation:/^<<<'?|[';]$/}}}},{pattern:/<<<(?:"([^"]+)"[\r\n](?:.*[\r\n])*?\1;|([a-z_]\w*)[\r\n](?:.*[\r\n])*?\2;)/i,alias:"heredoc-string",greedy:!0,inside:{delimiter:{pattern:/^<<<(?:"[^"]+"|[a-z_]\w*)|[a-z_]\w*;$/i,alias:"symbol",inside:{punctuation:/^<<<"?|[";]$/}},interpolation:i}},{pattern:/`(?:\\[\s\S]|[^\\`])*`/,alias:"backtick-quoted-string",greedy:!0},{pattern:/'(?:\\[\s\S]|[^\\'])*'/,alias:"single-quoted-string",greedy:!0},{pattern:/"(?:\\[\s\S]|[^\\"])*"/,alias:"double-quoted-string",greedy:!0,inside:{interpolation:i}}];e.languages.insertBefore("php","variable",{string:o,attribute:{pattern:/#\[(?:[^"'\/#]|\/(?![*/])|\/\/.*$|#(?!\[).*$|\/\*(?:[^*]|\*(?!\/))*\*\/|"(?:\\[\s\S]|[^\\"])*"|'(?:\\[\s\S]|[^\\'])*')+\](?=\s*[a-z$#])/im,greedy:!0,inside:{"attribute-content":{pattern:/^(#\[)[\s\S]+(?=\]$)/,lookbehind:!0,inside:{comment:t,string:o,"attribute-class-name":[{pattern:/([^:]|^)\b[a-z_]\w*(?!\\)\b/i,alias:"class-name",greedy:!0,lookbehind:!0},{pattern:/([^:]|^)(?:\\?\b[a-z_]\w*)+/i,alias:["class-name","class-name-fully-qualified"],greedy:!0,lookbehind:!0,inside:{punctuation:/\\/}}],constant:n,number:a,operator:s,punctuation:r}},delimiter:{pattern:/^#\[|\]$/,alias:"punctuation"}}}}),e.hooks.add("before-tokenize",(function(t){/<\?/.test(t.code)&&e.languages["markup-templating"].buildPlaceholders(t,"php",/<\?(?:[^"'/#]|\/(?![*/])|("|')(?:\\[\s\S]|(?!\1)[^\\])*\1|(?:\/\/|#(?!\[))(?:[^?\n\r]|\?(?!>))*(?=$|\?>|[\r\n])|#\[|\/\*(?:[^*]|\*(?!\/))*(?:\*\/|$))*?(?:\?>|$)/g)})),e.hooks.add("after-tokenize",(function(t){e.languages["markup-templating"].tokenizePlaceholders(t,"php")}))}(s),s.languages.python={comment:{pattern:/(^|[^\\])#.*/,lookbehind:!0,greedy:!0},"string-interpolation":{pattern:/(?:f|fr|rf)(?:("""|''')[\s\S]*?\1|("|')(?:\\.|(?!\2)[^\\\r\n])*\2)/i,greedy:!0,inside:{interpolation:{pattern:/((?:^|[^{])(?:\{\{)*)\{(?!\{)(?:[^{}]|\{(?!\{)(?:[^{}]|\{(?!\{)(?:[^{}])+\})+\})+\}/,lookbehind:!0,inside:{"format-spec":{pattern:/(:)[^:(){}]+(?=\}$)/,lookbehind:!0},"conversion-option":{pattern:/![sra](?=[:}]$)/,alias:"punctuation"},rest:null}},string:/[\s\S]+/}},"triple-quoted-string":{pattern:/(?:[rub]|br|rb)?("""|''')[\s\S]*?\1/i,greedy:!0,alias:"string"},string:{pattern:/(?:[rub]|br|rb)?("|')(?:\\.|(?!\1)[^\\\r\n])*\1/i,greedy:!0},function:{pattern:/((?:^|\s)def[ \t]+)[a-zA-Z_]\w*(?=\s*\()/g,lookbehind:!0},"class-name":{pattern:/(\bclass\s+)\w+/i,lookbehind:!0},decorator:{pattern:/(^[\t ]*)@\w+(?:\.\w+)*/m,lookbehind:!0,alias:["annotation","punctuation"],inside:{punctuation:/\./}},keyword:/\b(?:_(?=\s*:)|and|as|assert|async|await|break|case|class|continue|def|del|elif|else|except|exec|finally|for|from|global|if|import|in|is|lambda|match|nonlocal|not|or|pass|print|raise|return|try|while|with|yield)\b/,builtin:/\b(?:__import__|abs|all|any|apply|ascii|basestring|bin|bool|buffer|bytearray|bytes|callable|chr|classmethod|cmp|coerce|compile|complex|delattr|dict|dir|divmod|enumerate|eval|execfile|file|filter|float|format|frozenset|getattr|globals|hasattr|hash|help|hex|id|input|int|intern|isinstance|issubclass|iter|len|list|locals|long|map|max|memoryview|min|next|object|oct|open|ord|pow|property|range|raw_input|reduce|reload|repr|reversed|round|set|setattr|slice|sorted|staticmethod|str|sum|super|tuple|type|unichr|unicode|vars|xrange|zip)\b/,boolean:/\b(?:False|None|True)\b/,number:/\b0(?:b(?:_?[01])+|o(?:_?[0-7])+|x(?:_?[a-f0-9])+)\b|(?:\b\d+(?:_\d+)*(?:\.(?:\d+(?:_\d+)*)?)?|\B\.\d+(?:_\d+)*)(?:e[+-]?\d+(?:_\d+)*)?j?(?!\w)/i,operator:/[-+%=]=?|!=|:=|\*\*?=?|\/\/?=?|<[<=>]?|>[=>]?|[&|^~]/,punctuation:/[{}[\];(),.:]/},s.languages.python["string-interpolation"].inside.interpolation.inside.rest=s.languages.python,s.languages.py=s.languages.python,function(e){e.languages.ruby=e.languages.extend("clike",{comment:{pattern:/#.*|^=begin\s[\s\S]*?^=end/m,greedy:!0},"class-name":{pattern:/(\b(?:class|module)\s+|\bcatch\s+\()[\w.\\]+|\b[A-Z_]\w*(?=\s*\.\s*new\b)/,lookbehind:!0,inside:{punctuation:/[.\\]/}},keyword:/\b(?:BEGIN|END|alias|and|begin|break|case|class|def|define_method|defined|do|each|else|elsif|end|ensure|extend|for|if|in|include|module|new|next|nil|not|or|prepend|private|protected|public|raise|redo|require|rescue|retry|return|self|super|then|throw|undef|unless|until|when|while|yield)\b/,operator:/\.{2,3}|&\.|===||[!=]?~|(?:&&|\|\||<<|>>|\*\*|[+\-*/%<>!^&|=])=?|[?:]/,punctuation:/[(){}[\].,;]/}),e.languages.insertBefore("ruby","operator",{"double-colon":{pattern:/::/,alias:"punctuation"}});var t={pattern:/((?:^|[^\\])(?:\\{2})*)#\{(?:[^{}]|\{[^{}]*\})*\}/,lookbehind:!0,inside:{content:{pattern:/^(#\{)[\s\S]+(?=\}$)/,lookbehind:!0,inside:e.languages.ruby},delimiter:{pattern:/^#\{|\}$/,alias:"punctuation"}}};delete e.languages.ruby.function;var n="(?:"+[/([^a-zA-Z0-9\s{(\[<=])(?:(?!\1)[^\\]|\\[\s\S])*\1/.source,/\((?:[^()\\]|\\[\s\S]|\((?:[^()\\]|\\[\s\S])*\))*\)/.source,/\{(?:[^{}\\]|\\[\s\S]|\{(?:[^{}\\]|\\[\s\S])*\})*\}/.source,/\[(?:[^\[\]\\]|\\[\s\S]|\[(?:[^\[\]\\]|\\[\s\S])*\])*\]/.source,/<(?:[^<>\\]|\\[\s\S]|<(?:[^<>\\]|\\[\s\S])*>)*>/.source].join("|")+")",a=/(?:"(?:\\.|[^"\\\r\n])*"|(?:\b[a-zA-Z_]\w*|[^\s\0-\x7F]+)[?!]?|\$.)/.source;e.languages.insertBefore("ruby","keyword",{"regex-literal":[{pattern:RegExp(/%r/.source+n+/[egimnosux]{0,6}/.source),greedy:!0,inside:{interpolation:t,regex:/[\s\S]+/}},{pattern:/(^|[^/])\/(?!\/)(?:\[[^\r\n\]]+\]|\\.|[^[/\\\r\n])+\/[egimnosux]{0,6}(?=\s*(?:$|[\r\n,.;})#]))/,lookbehind:!0,greedy:!0,inside:{interpolation:t,regex:/[\s\S]+/}}],variable:/[@$]+[a-zA-Z_]\w*(?:[?!]|\b)/,symbol:[{pattern:RegExp(/(^|[^:]):/.source+a),lookbehind:!0,greedy:!0},{pattern:RegExp(/([\r\n{(,][ \t]*)/.source+a+/(?=:(?!:))/.source),lookbehind:!0,greedy:!0}],"method-definition":{pattern:/(\bdef\s+)\w+(?:\s*\.\s*\w+)?/,lookbehind:!0,inside:{function:/\b\w+$/,keyword:/^self\b/,"class-name":/^\w+/,punctuation:/\./}}}),e.languages.insertBefore("ruby","string",{"string-literal":[{pattern:RegExp(/%[qQiIwWs]?/.source+n),greedy:!0,inside:{interpolation:t,string:/[\s\S]+/}},{pattern:/("|')(?:#\{[^}]+\}|#(?!\{)|\\(?:\r\n|[\s\S])|(?!\1)[^\\#\r\n])*\1/,greedy:!0,inside:{interpolation:t,string:/[\s\S]+/}},{pattern:/<<[-~]?([a-z_]\w*)[\r\n](?:.*[\r\n])*?[\t ]*\1/i,alias:"heredoc-string",greedy:!0,inside:{delimiter:{pattern:/^<<[-~]?[a-z_]\w*|\b[a-z_]\w*$/i,inside:{symbol:/\b\w+/,punctuation:/^<<[-~]?/}},interpolation:t,string:/[\s\S]+/}},{pattern:/<<[-~]?'([a-z_]\w*)'[\r\n](?:.*[\r\n])*?[\t ]*\1/i,alias:"heredoc-string",greedy:!0,inside:{delimiter:{pattern:/^<<[-~]?'[a-z_]\w*'|\b[a-z_]\w*$/i,inside:{symbol:/\b\w+/,punctuation:/^<<[-~]?'|'$/}},string:/[\s\S]+/}}],"command-literal":[{pattern:RegExp(/%x/.source+n),greedy:!0,inside:{interpolation:t,command:{pattern:/[\s\S]+/,alias:"string"}}},{pattern:/`(?:#\{[^}]+\}|#(?!\{)|\\(?:\r\n|[\s\S])|[^\\`#\r\n])*`/,greedy:!0,inside:{interpolation:t,command:{pattern:/[\s\S]+/,alias:"string"}}}]}),delete e.languages.ruby.string,e.languages.insertBefore("ruby","number",{builtin:/\b(?:Array|Bignum|Binding|Class|Continuation|Dir|Exception|FalseClass|File|Fixnum|Float|Hash|IO|Integer|MatchData|Method|Module|NilClass|Numeric|Object|Proc|Range|Regexp|Stat|String|Struct|Symbol|TMS|Thread|ThreadGroup|Time|TrueClass)\b/,constant:/\b[A-Z][A-Z0-9_]*(?:[?!]|\b)/}),e.languages.rb=e.languages.ruby}(s),window.Prism=a,s}(),i=e=>t=>t.options.get(e),o=i("codesample_languages"),l=i("codesample_global_prismjs"),u=e=>s.Prism&&l(e)?s.Prism:r,c=e=>e&&"PRE"===e.nodeName&&-1!==e.className.indexOf("language-"),d=e=>{const t=e.selection?e.selection.getNode():null;return a=t,c(t)?n.some(a):n.none();var a},g=e=>{const s=(e=>o(e)||[{text:"HTML/XML",value:"markup"},{text:"JavaScript",value:"javascript"},{text:"CSS",value:"css"},{text:"PHP",value:"php"},{text:"Ruby",value:"ruby"},{text:"Python",value:"python"},{text:"Java",value:"java"},{text:"C",value:"c"},{text:"C#",value:"csharp"},{text:"C++",value:"cpp"}])(e),r=(c=s,((e,t)=>0e.value)),i=((e,t)=>d(e).fold((()=>t),(e=>{const n=e.className.match(/language-(\w+)/);return n?n[1]:t})))(e,r),l=(e=>d(e).fold(t(""),(e=>e.textContent)))(e);var c;e.windowManager.open({title:"Insert/Edit Code Sample",size:"large",body:{type:"panel",items:[{type:"selectbox",name:"language",label:"Language",items:s},{type:"textarea",name:"code",label:"Code view"}]},buttons:[{type:"cancel",name:"cancel",text:"Cancel"},{type:"submit",name:"save",text:"Save",primary:!0}],initialData:{language:i,code:l},onSubmit:t=>{const n=t.getData();((e,t,n)=>{const s=e.dom;e.undoManager.transact((()=>{const r=d(e);return n=a.DOM.encode(n),r.fold((()=>{e.insertContent('
    '+n+"
    ");const a=s.select("#__new")[0];s.setAttrib(a,"id",null),e.selection.select(a)}),(a=>{s.setAttrib(a,"class","language-"+t),a.innerHTML=n,u(e).highlightElement(a),e.selection.select(a)}))}))})(e,n.language,n.code),t.close()}})},p=(b=/^\s+|\s+$/g,e=>e.replace(b,""));var b,h=tinymce.util.Tools.resolve("tinymce.util.Tools");e.add("codesample",(e=>{(e=>{const t=e.options.register;t("codesample_languages",{processor:"object[]"}),t("codesample_global_prismjs",{processor:"boolean",default:!1})})(e),(e=>{e.on("PreProcess",(t=>{const n=e.dom,a=n.select("pre[contenteditable=false]",t.node);h.each(h.grep(a,c),(e=>{const t=e.textContent;let a;for(n.setAttrib(e,"class",p(n.getAttrib(e,"class"))),n.setAttrib(e,"contentEditable",null);a=e.firstChild;)e.removeChild(a);n.add(e,"code").textContent=t}))})),e.on("SetContent",(()=>{const t=e.dom,n=h.grep(t.select("pre"),(e=>c(e)&&"false"!==e.contentEditable));n.length&&e.undoManager.transact((()=>{h.each(n,(n=>{h.each(t.select("br",n),(t=>{t.parentNode.replaceChild(e.getDoc().createTextNode("\n"),t)})),n.contentEditable="false",n.innerHTML=t.encode(n.textContent),u(e).highlightElement(n),n.className=p(n.className)}))}))}))})(e),(e=>{const t=()=>e.execCommand("codesample");e.ui.registry.addToggleButton("codesample",{icon:"code-sample",tooltip:"Insert/edit code sample",onAction:t,onSetup:t=>{const n=()=>{t.setActive((e=>{const t=e.selection.getStart();return e.dom.is(t,'pre[class*="language-"]')})(e))};return e.on("NodeChange",n),()=>e.off("NodeChange",n)}}),e.ui.registry.addMenuItem("codesample",{text:"Code sample...",icon:"code-sample",onAction:t})})(e),(e=>{e.addCommand("codesample",(()=>{const t=e.selection.getNode();e.selection.isCollapsed()||c(t)?g(e):e.formatter.toggle("code")}))})(e),e.on("dblclick",(t=>{c(t.target)&&g(e)}))}))}(); \ No newline at end of file diff --git a/vendor/tinymce/tinymce/plugins/directionality/index.js b/vendor/tinymce/tinymce/plugins/directionality/index.js new file mode 100644 index 00000000..e2740c3b --- /dev/null +++ b/vendor/tinymce/tinymce/plugins/directionality/index.js @@ -0,0 +1,7 @@ +// Exports the "directionality" plugin for usage with module loaders +// Usage: +// CommonJS: +// require('tinymce/plugins/directionality') +// ES2015: +// import 'tinymce/plugins/directionality' +require('./plugin.js'); \ No newline at end of file diff --git a/vendor/tinymce/tinymce/plugins/directionality/plugin.js b/vendor/tinymce/tinymce/plugins/directionality/plugin.js new file mode 100644 index 00000000..15d661a7 --- /dev/null +++ b/vendor/tinymce/tinymce/plugins/directionality/plugin.js @@ -0,0 +1,384 @@ +/** + * TinyMCE version 6.0.2 (2022-04-27) + */ + +(function () { + 'use strict'; + + var global = tinymce.util.Tools.resolve('tinymce.PluginManager'); + + const hasProto = (v, constructor, predicate) => { + var _a; + if (predicate(v, constructor.prototype)) { + return true; + } else { + return ((_a = v.constructor) === null || _a === void 0 ? void 0 : _a.name) === constructor.name; + } + }; + const typeOf = x => { + const t = typeof x; + if (x === null) { + return 'null'; + } else if (t === 'object' && Array.isArray(x)) { + return 'array'; + } else if (t === 'object' && hasProto(x, String, (o, proto) => proto.isPrototypeOf(o))) { + return 'string'; + } else { + return t; + } + }; + const isType$1 = type => value => typeOf(value) === type; + const isSimpleType = type => value => typeof value === type; + const isString = isType$1('string'); + const isBoolean = isSimpleType('boolean'); + const isNullable = a => a === null || a === undefined; + const isNonNullable = a => !isNullable(a); + const isFunction = isSimpleType('function'); + const isNumber = isSimpleType('number'); + + const compose1 = (fbc, fab) => a => fbc(fab(a)); + const constant = value => { + return () => { + return value; + }; + }; + const never = constant(false); + + class Optional { + constructor(tag, value) { + this.tag = tag; + this.value = value; + } + static some(value) { + return new Optional(true, value); + } + static none() { + return Optional.singletonNone; + } + fold(onNone, onSome) { + if (this.tag) { + return onSome(this.value); + } else { + return onNone(); + } + } + isSome() { + return this.tag; + } + isNone() { + return !this.tag; + } + map(mapper) { + if (this.tag) { + return Optional.some(mapper(this.value)); + } else { + return Optional.none(); + } + } + bind(binder) { + if (this.tag) { + return binder(this.value); + } else { + return Optional.none(); + } + } + exists(predicate) { + return this.tag && predicate(this.value); + } + forall(predicate) { + return !this.tag || predicate(this.value); + } + filter(predicate) { + if (!this.tag || predicate(this.value)) { + return this; + } else { + return Optional.none(); + } + } + getOr(replacement) { + return this.tag ? this.value : replacement; + } + or(replacement) { + return this.tag ? this : replacement; + } + getOrThunk(thunk) { + return this.tag ? this.value : thunk(); + } + orThunk(thunk) { + return this.tag ? this : thunk(); + } + getOrDie(message) { + if (!this.tag) { + throw new Error(message !== null && message !== void 0 ? message : 'Called getOrDie on None'); + } else { + return this.value; + } + } + static from(value) { + return isNonNullable(value) ? Optional.some(value) : Optional.none(); + } + getOrNull() { + return this.tag ? this.value : null; + } + getOrUndefined() { + return this.value; + } + each(worker) { + if (this.tag) { + worker(this.value); + } + } + toArray() { + return this.tag ? [this.value] : []; + } + toString() { + return this.tag ? `some(${ this.value })` : 'none()'; + } + } + Optional.singletonNone = new Optional(false); + + const map = (xs, f) => { + const len = xs.length; + const r = new Array(len); + for (let i = 0; i < len; i++) { + const x = xs[i]; + r[i] = f(x, i); + } + return r; + }; + const each = (xs, f) => { + for (let i = 0, len = xs.length; i < len; i++) { + const x = xs[i]; + f(x, i); + } + }; + const filter = (xs, pred) => { + const r = []; + for (let i = 0, len = xs.length; i < len; i++) { + const x = xs[i]; + if (pred(x, i)) { + r.push(x); + } + } + return r; + }; + + const DOCUMENT = 9; + const DOCUMENT_FRAGMENT = 11; + const ELEMENT = 1; + const TEXT = 3; + + const fromHtml = (html, scope) => { + const doc = scope || document; + const div = doc.createElement('div'); + div.innerHTML = html; + if (!div.hasChildNodes() || div.childNodes.length > 1) { + const message = 'HTML does not have a single root node'; + console.error(message, html); + throw new Error(message); + } + return fromDom(div.childNodes[0]); + }; + const fromTag = (tag, scope) => { + const doc = scope || document; + const node = doc.createElement(tag); + return fromDom(node); + }; + const fromText = (text, scope) => { + const doc = scope || document; + const node = doc.createTextNode(text); + return fromDom(node); + }; + const fromDom = node => { + if (node === null || node === undefined) { + throw new Error('Node cannot be null or undefined'); + } + return { dom: node }; + }; + const fromPoint = (docElm, x, y) => Optional.from(docElm.dom.elementFromPoint(x, y)).map(fromDom); + const SugarElement = { + fromHtml, + fromTag, + fromText, + fromDom, + fromPoint + }; + + const is = (element, selector) => { + const dom = element.dom; + if (dom.nodeType !== ELEMENT) { + return false; + } else { + const elem = dom; + if (elem.matches !== undefined) { + return elem.matches(selector); + } else if (elem.msMatchesSelector !== undefined) { + return elem.msMatchesSelector(selector); + } else if (elem.webkitMatchesSelector !== undefined) { + return elem.webkitMatchesSelector(selector); + } else if (elem.mozMatchesSelector !== undefined) { + return elem.mozMatchesSelector(selector); + } else { + throw new Error('Browser lacks native selectors'); + } + } + }; + + typeof window !== 'undefined' ? window : Function('return this;')(); + + const name = element => { + const r = element.dom.nodeName; + return r.toLowerCase(); + }; + const type = element => element.dom.nodeType; + const isType = t => element => type(element) === t; + const isElement = isType(ELEMENT); + const isText = isType(TEXT); + const isDocument = isType(DOCUMENT); + const isDocumentFragment = isType(DOCUMENT_FRAGMENT); + const isTag = tag => e => isElement(e) && name(e) === tag; + + const owner = element => SugarElement.fromDom(element.dom.ownerDocument); + const documentOrOwner = dos => isDocument(dos) ? dos : owner(dos); + const parent = element => Optional.from(element.dom.parentNode).map(SugarElement.fromDom); + const children$2 = element => map(element.dom.childNodes, SugarElement.fromDom); + + const rawSet = (dom, key, value) => { + if (isString(value) || isBoolean(value) || isNumber(value)) { + dom.setAttribute(key, value + ''); + } else { + console.error('Invalid call to Attribute.set. Key ', key, ':: Value ', value, ':: Element ', dom); + throw new Error('Attribute value was not simple'); + } + }; + const set = (element, key, value) => { + rawSet(element.dom, key, value); + }; + const remove = (element, key) => { + element.dom.removeAttribute(key); + }; + + const isShadowRoot = dos => isDocumentFragment(dos) && isNonNullable(dos.dom.host); + const supported = isFunction(Element.prototype.attachShadow) && isFunction(Node.prototype.getRootNode); + const getRootNode = supported ? e => SugarElement.fromDom(e.dom.getRootNode()) : documentOrOwner; + const getShadowRoot = e => { + const r = getRootNode(e); + return isShadowRoot(r) ? Optional.some(r) : Optional.none(); + }; + const getShadowHost = e => SugarElement.fromDom(e.dom.host); + + const inBody = element => { + const dom = isText(element) ? element.dom.parentNode : element.dom; + if (dom === undefined || dom === null || dom.ownerDocument === null) { + return false; + } + const doc = dom.ownerDocument; + return getShadowRoot(SugarElement.fromDom(dom)).fold(() => doc.body.contains(dom), compose1(inBody, getShadowHost)); + }; + + const ancestor$1 = (scope, predicate, isRoot) => { + let element = scope.dom; + const stop = isFunction(isRoot) ? isRoot : never; + while (element.parentNode) { + element = element.parentNode; + const el = SugarElement.fromDom(element); + if (predicate(el)) { + return Optional.some(el); + } else if (stop(el)) { + break; + } + } + return Optional.none(); + }; + + const ancestor = (scope, selector, isRoot) => ancestor$1(scope, e => is(e, selector), isRoot); + + const isSupported = dom => dom.style !== undefined && isFunction(dom.style.getPropertyValue); + + const get = (element, property) => { + const dom = element.dom; + const styles = window.getComputedStyle(dom); + const r = styles.getPropertyValue(property); + return r === '' && !inBody(element) ? getUnsafeProperty(dom, property) : r; + }; + const getUnsafeProperty = (dom, property) => isSupported(dom) ? dom.style.getPropertyValue(property) : ''; + + const getDirection = element => get(element, 'direction') === 'rtl' ? 'rtl' : 'ltr'; + + const children$1 = (scope, predicate) => filter(children$2(scope), predicate); + + const children = (scope, selector) => children$1(scope, e => is(e, selector)); + + const getParentElement = element => parent(element).filter(isElement); + const getNormalizedBlock = (element, isListItem) => { + const normalizedElement = isListItem ? ancestor(element, 'ol,ul') : Optional.some(element); + return normalizedElement.getOr(element); + }; + const isListItem = isTag('li'); + const setDir = (editor, dir) => { + const selectedBlocks = editor.selection.getSelectedBlocks(); + if (selectedBlocks.length > 0) { + each(selectedBlocks, block => { + const blockElement = SugarElement.fromDom(block); + const isBlockElementListItem = isListItem(blockElement); + const normalizedBlock = getNormalizedBlock(blockElement, isBlockElementListItem); + const normalizedBlockParent = getParentElement(normalizedBlock); + normalizedBlockParent.each(parent => { + const parentDirection = getDirection(parent); + if (parentDirection !== dir) { + set(normalizedBlock, 'dir', dir); + } else if (getDirection(normalizedBlock) !== dir) { + remove(normalizedBlock, 'dir'); + } + if (isBlockElementListItem) { + const listItems = children(normalizedBlock, 'li[dir]'); + each(listItems, listItem => remove(listItem, 'dir')); + } + }); + }); + editor.nodeChanged(); + } + }; + + const register$1 = editor => { + editor.addCommand('mceDirectionLTR', () => { + setDir(editor, 'ltr'); + }); + editor.addCommand('mceDirectionRTL', () => { + setDir(editor, 'rtl'); + }); + }; + + const getNodeChangeHandler = (editor, dir) => api => { + const nodeChangeHandler = e => { + const element = SugarElement.fromDom(e.element); + api.setActive(getDirection(element) === dir); + }; + editor.on('NodeChange', nodeChangeHandler); + return () => editor.off('NodeChange', nodeChangeHandler); + }; + const register = editor => { + editor.ui.registry.addToggleButton('ltr', { + tooltip: 'Left to right', + icon: 'ltr', + onAction: () => editor.execCommand('mceDirectionLTR'), + onSetup: getNodeChangeHandler(editor, 'ltr') + }); + editor.ui.registry.addToggleButton('rtl', { + tooltip: 'Right to left', + icon: 'rtl', + onAction: () => editor.execCommand('mceDirectionRTL'), + onSetup: getNodeChangeHandler(editor, 'rtl') + }); + }; + + var Plugin = () => { + global.add('directionality', editor => { + register$1(editor); + register(editor); + }); + }; + + Plugin(); + +})(); diff --git a/vendor/tinymce/tinymce/plugins/directionality/plugin.min.js b/vendor/tinymce/tinymce/plugins/directionality/plugin.min.js new file mode 100644 index 00000000..b9cdeb35 --- /dev/null +++ b/vendor/tinymce/tinymce/plugins/directionality/plugin.min.js @@ -0,0 +1,4 @@ +/** + * TinyMCE version 6.0.2 (2022-04-27) + */ +!function(){"use strict";var t=tinymce.util.Tools.resolve("tinymce.PluginManager");const e=t=>e=>typeof e===t,o=t=>"string"===(t=>{const e=typeof t;return null===t?"null":"object"===e&&Array.isArray(t)?"array":"object"===e&&(o=r=t,(n=String).prototype.isPrototypeOf(o)||(null===(i=r.constructor)||void 0===i?void 0:i.name)===n.name)?"string":e;var o,r,n,i})(t),r=e("boolean"),n=t=>!(t=>null==t)(t),i=e("function"),s=e("number"),l=(!1,()=>false);class a{constructor(t,e){this.tag=t,this.value=e}static some(t){return new a(!0,t)}static none(){return a.singletonNone}fold(t,e){return this.tag?e(this.value):t()}isSome(){return this.tag}isNone(){return!this.tag}map(t){return this.tag?a.some(t(this.value)):a.none()}bind(t){return this.tag?t(this.value):a.none()}exists(t){return this.tag&&t(this.value)}forall(t){return!this.tag||t(this.value)}filter(t){return!this.tag||t(this.value)?this:a.none()}getOr(t){return this.tag?this.value:t}or(t){return this.tag?this:t}getOrThunk(t){return this.tag?this.value:t()}orThunk(t){return this.tag?this:t()}getOrDie(t){if(this.tag)return this.value;throw new Error(null!=t?t:"Called getOrDie on None")}static from(t){return n(t)?a.some(t):a.none()}getOrNull(){return this.tag?this.value:null}getOrUndefined(){return this.value}each(t){this.tag&&t(this.value)}toArray(){return this.tag?[this.value]:[]}toString(){return this.tag?`some(${this.value})`:"none()"}}a.singletonNone=new a(!1);const u=(t,e)=>{for(let o=0,r=t.length;o{if(null==t)throw new Error("Node cannot be null or undefined");return{dom:t}},d=c,h=(t,e)=>{const o=t.dom;if(1!==o.nodeType)return!1;{const t=o;if(void 0!==t.matches)return t.matches(e);if(void 0!==t.msMatchesSelector)return t.msMatchesSelector(e);if(void 0!==t.webkitMatchesSelector)return t.webkitMatchesSelector(e);if(void 0!==t.mozMatchesSelector)return t.mozMatchesSelector(e);throw new Error("Browser lacks native selectors")}};"undefined"!=typeof window?window:Function("return this;")();const m=t=>e=>(t=>t.dom.nodeType)(e)===t,g=m(1),f=m(3),v=m(9),p=m(11),y=(t,e)=>{t.dom.removeAttribute(e)},w=i(Element.prototype.attachShadow)&&i(Node.prototype.getRootNode)?t=>d(t.dom.getRootNode()):t=>v(t)?t:d(t.dom.ownerDocument),N=t=>d(t.dom.host),b=t=>{const e=f(t)?t.dom.parentNode:t.dom;if(null==e||null===e.ownerDocument)return!1;const o=e.ownerDocument;return(t=>{const e=w(t);return p(o=e)&&n(o.dom.host)?a.some(e):a.none();var o})(d(e)).fold((()=>o.body.contains(e)),(r=b,i=N,t=>r(i(t))));var r,i},S=t=>"rtl"===((t,e)=>{const o=t.dom,r=window.getComputedStyle(o).getPropertyValue(e);return""!==r||b(t)?r:((t,e)=>(t=>void 0!==t.style&&i(t.style.getPropertyValue))(t)?t.style.getPropertyValue(e):"")(o,e)})(t,"direction")?"rtl":"ltr",A=(t,e)=>((t,o)=>((t,e)=>{const o=[];for(let r=0,n=t.length;r{const o=t.length,r=new Array(o);for(let n=0;nh(t,e))))(t),T=("li",t=>g(t)&&"li"===t.dom.nodeName.toLowerCase());const C=(t,e)=>{const n=t.selection.getSelectedBlocks();n.length>0&&(u(n,(t=>{const n=d(t),c=T(n),m=((t,e)=>{return(e?(o=t,r="ol,ul",((t,e,o)=>{let n=t.dom;const s=i(o)?o:l;for(;n.parentNode;){n=n.parentNode;const t=d(n);if(h(t,r))return a.some(t);if(s(t))break}return a.none()})(o,0,n)):a.some(t)).getOr(t);var o,r,n})(n,c);var f;(f=m,(t=>a.from(t.dom.parentNode).map(d))(f).filter(g)).each((t=>{if(S(t)!==e?((t,e,n)=>{((t,e,n)=>{if(!(o(n)||r(n)||s(n)))throw console.error("Invalid call to Attribute.set. Key ",e,":: Value ",n,":: Element ",t),new Error("Attribute value was not simple");t.setAttribute(e,n+"")})(t.dom,e,n)})(m,"dir",e):S(m)!==e&&y(m,"dir"),c){const t=A(m,"li[dir]");u(t,(t=>y(t,"dir")))}}))})),t.nodeChanged())},D=(t,e)=>o=>{const r=t=>{const r=d(t.element);o.setActive(S(r)===e)};return t.on("NodeChange",r),()=>t.off("NodeChange",r)};t.add("directionality",(t=>{(t=>{t.addCommand("mceDirectionLTR",(()=>{C(t,"ltr")})),t.addCommand("mceDirectionRTL",(()=>{C(t,"rtl")}))})(t),(t=>{t.ui.registry.addToggleButton("ltr",{tooltip:"Left to right",icon:"ltr",onAction:()=>t.execCommand("mceDirectionLTR"),onSetup:D(t,"ltr")}),t.ui.registry.addToggleButton("rtl",{tooltip:"Right to left",icon:"rtl",onAction:()=>t.execCommand("mceDirectionRTL"),onSetup:D(t,"rtl")})})(t)}))}(); \ No newline at end of file diff --git a/vendor/tinymce/tinymce/plugins/emoticons/index.js b/vendor/tinymce/tinymce/plugins/emoticons/index.js new file mode 100644 index 00000000..7a973798 --- /dev/null +++ b/vendor/tinymce/tinymce/plugins/emoticons/index.js @@ -0,0 +1,7 @@ +// Exports the "emoticons" plugin for usage with module loaders +// Usage: +// CommonJS: +// require('tinymce/plugins/emoticons') +// ES2015: +// import 'tinymce/plugins/emoticons' +require('./plugin.js'); \ No newline at end of file diff --git a/vendor/tinymce/tinymce/plugins/emoticons/js/emojiimages.js b/vendor/tinymce/tinymce/plugins/emoticons/js/emojiimages.js new file mode 100644 index 00000000..6fcec717 --- /dev/null +++ b/vendor/tinymce/tinymce/plugins/emoticons/js/emojiimages.js @@ -0,0 +1 @@ +window.tinymce.Resource.add("tinymce.plugins.emoticons",{100:{keywords:["score","perfect","numbers","century","exam","quiz","test","pass","hundred"],char:'💯',fitzpatrick_scale:false,category:"symbols"},1234:{keywords:["numbers","blue-square"],char:'🔢',fitzpatrick_scale:false,category:"symbols"},grinning:{keywords:["face","smile","happy","joy",":D","grin"],char:'😀',fitzpatrick_scale:false,category:"people"},grimacing:{keywords:["face","grimace","teeth"],char:'😬',fitzpatrick_scale:false,category:"people"},grin:{keywords:["face","happy","smile","joy","kawaii"],char:'😁',fitzpatrick_scale:false,category:"people"},joy:{keywords:["face","cry","tears","weep","happy","happytears","haha"],char:'😂',fitzpatrick_scale:false,category:"people"},rofl:{keywords:["face","rolling","floor","laughing","lol","haha"],char:'🤣',fitzpatrick_scale:false,category:"people"},partying:{keywords:["face","celebration","woohoo"],char:'🥳',fitzpatrick_scale:false,category:"people"},smiley:{keywords:["face","happy","joy","haha",":D",":)","smile","funny"],char:'😃',fitzpatrick_scale:false,category:"people"},smile:{keywords:["face","happy","joy","funny","haha","laugh","like",":D",":)"],char:'😄',fitzpatrick_scale:false,category:"people"},sweat_smile:{keywords:["face","hot","happy","laugh","sweat","smile","relief"],char:'😅',fitzpatrick_scale:false,category:"people"},laughing:{keywords:["happy","joy","lol","satisfied","haha","face","glad","XD","laugh"],char:'😆',fitzpatrick_scale:false,category:"people"},innocent:{keywords:["face","angel","heaven","halo"],char:'😇',fitzpatrick_scale:false,category:"people"},wink:{keywords:["face","happy","mischievous","secret",";)","smile","eye"],char:'😉',fitzpatrick_scale:false,category:"people"},blush:{keywords:["face","smile","happy","flushed","crush","embarrassed","shy","joy"],char:'😊',fitzpatrick_scale:false,category:"people"},slightly_smiling_face:{keywords:["face","smile"],char:'🙂',fitzpatrick_scale:false,category:"people"},upside_down_face:{keywords:["face","flipped","silly","smile"],char:'🙃',fitzpatrick_scale:false,category:"people"},relaxed:{keywords:["face","blush","massage","happiness"],char:'☺️',fitzpatrick_scale:false,category:"people"},yum:{keywords:["happy","joy","tongue","smile","face","silly","yummy","nom","delicious","savouring"],char:'😋',fitzpatrick_scale:false,category:"people"},relieved:{keywords:["face","relaxed","phew","massage","happiness"],char:'😌',fitzpatrick_scale:false,category:"people"},heart_eyes:{keywords:["face","love","like","affection","valentines","infatuation","crush","heart"],char:'😍',fitzpatrick_scale:false,category:"people"},smiling_face_with_three_hearts:{keywords:["face","love","like","affection","valentines","infatuation","crush","hearts","adore"],char:'🥰',fitzpatrick_scale:false,category:"people"},kissing_heart:{keywords:["face","love","like","affection","valentines","infatuation","kiss"],char:'😘',fitzpatrick_scale:false,category:"people"},kissing:{keywords:["love","like","face","3","valentines","infatuation","kiss"],char:'😗',fitzpatrick_scale:false,category:"people"},kissing_smiling_eyes:{keywords:["face","affection","valentines","infatuation","kiss"],char:'😙',fitzpatrick_scale:false,category:"people"},kissing_closed_eyes:{keywords:["face","love","like","affection","valentines","infatuation","kiss"],char:'😚',fitzpatrick_scale:false,category:"people"},stuck_out_tongue_winking_eye:{keywords:["face","prank","childish","playful","mischievous","smile","wink","tongue"],char:'😜',fitzpatrick_scale:false,category:"people"},zany:{keywords:["face","goofy","crazy"],char:'🤪',fitzpatrick_scale:false,category:"people"},raised_eyebrow:{keywords:["face","distrust","scepticism","disapproval","disbelief","surprise"],char:'🤨',fitzpatrick_scale:false,category:"people"},monocle:{keywords:["face","stuffy","wealthy"],char:'🧐',fitzpatrick_scale:false,category:"people"},stuck_out_tongue_closed_eyes:{keywords:["face","prank","playful","mischievous","smile","tongue"],char:'😝',fitzpatrick_scale:false,category:"people"},stuck_out_tongue:{keywords:["face","prank","childish","playful","mischievous","smile","tongue"],char:'😛',fitzpatrick_scale:false,category:"people"},money_mouth_face:{keywords:["face","rich","dollar","money"],char:'🤑',fitzpatrick_scale:false,category:"people"},nerd_face:{keywords:["face","nerdy","geek","dork"],char:'🤓',fitzpatrick_scale:false,category:"people"},sunglasses:{keywords:["face","cool","smile","summer","beach","sunglass"],char:'😎',fitzpatrick_scale:false,category:"people"},star_struck:{keywords:["face","smile","starry","eyes","grinning"],char:'🤩',fitzpatrick_scale:false,category:"people"},clown_face:{keywords:["face"],char:'🤡',fitzpatrick_scale:false,category:"people"},cowboy_hat_face:{keywords:["face","cowgirl","hat"],char:'🤠',fitzpatrick_scale:false,category:"people"},hugs:{keywords:["face","smile","hug"],char:'🤗',fitzpatrick_scale:false,category:"people"},smirk:{keywords:["face","smile","mean","prank","smug","sarcasm"],char:'😏',fitzpatrick_scale:false,category:"people"},no_mouth:{keywords:["face","hellokitty"],char:'😶',fitzpatrick_scale:false,category:"people"},neutral_face:{keywords:["indifference","meh",":|","neutral"],char:'😐',fitzpatrick_scale:false,category:"people"},expressionless:{keywords:["face","indifferent","-_-","meh","deadpan"],char:'😑',fitzpatrick_scale:false,category:"people"},unamused:{keywords:["indifference","bored","straight face","serious","sarcasm","unimpressed","skeptical","dubious","side_eye"],char:'😒',fitzpatrick_scale:false,category:"people"},roll_eyes:{keywords:["face","eyeroll","frustrated"],char:'🙄',fitzpatrick_scale:false,category:"people"},thinking:{keywords:["face","hmmm","think","consider"],char:'🤔',fitzpatrick_scale:false,category:"people"},lying_face:{keywords:["face","lie","pinocchio"],char:'🤥',fitzpatrick_scale:false,category:"people"},hand_over_mouth:{keywords:["face","whoops","shock","surprise"],char:'🤭',fitzpatrick_scale:false,category:"people"},shushing:{keywords:["face","quiet","shhh"],char:'🤫',fitzpatrick_scale:false,category:"people"},symbols_over_mouth:{keywords:["face","swearing","cursing","cussing","profanity","expletive"],char:'🤬',fitzpatrick_scale:false,category:"people"},exploding_head:{keywords:["face","shocked","mind","blown"],char:'🤯',fitzpatrick_scale:false,category:"people"},flushed:{keywords:["face","blush","shy","flattered"],char:'😳',fitzpatrick_scale:false,category:"people"},disappointed:{keywords:["face","sad","upset","depressed",":("],char:'😞',fitzpatrick_scale:false,category:"people"},worried:{keywords:["face","concern","nervous",":("],char:'😟',fitzpatrick_scale:false,category:"people"},angry:{keywords:["mad","face","annoyed","frustrated"],char:'😠',fitzpatrick_scale:false,category:"people"},rage:{keywords:["angry","mad","hate","despise"],char:'😡',fitzpatrick_scale:false,category:"people"},pensive:{keywords:["face","sad","depressed","upset"],char:'😔',fitzpatrick_scale:false,category:"people"},confused:{keywords:["face","indifference","huh","weird","hmmm",":/"],char:'😕',fitzpatrick_scale:false,category:"people"},slightly_frowning_face:{keywords:["face","frowning","disappointed","sad","upset"],char:'🙁',fitzpatrick_scale:false,category:"people"},frowning_face:{keywords:["face","sad","upset","frown"],char:'☹',fitzpatrick_scale:false,category:"people"},persevere:{keywords:["face","sick","no","upset","oops"],char:'😣',fitzpatrick_scale:false,category:"people"},confounded:{keywords:["face","confused","sick","unwell","oops",":S"],char:'😖',fitzpatrick_scale:false,category:"people"},tired_face:{keywords:["sick","whine","upset","frustrated"],char:'😫',fitzpatrick_scale:false,category:"people"},weary:{keywords:["face","tired","sleepy","sad","frustrated","upset"],char:'😩',fitzpatrick_scale:false,category:"people"},pleading:{keywords:["face","begging","mercy"],char:'🥺',fitzpatrick_scale:false,category:"people"},triumph:{keywords:["face","gas","phew","proud","pride"],char:'😤',fitzpatrick_scale:false,category:"people"},open_mouth:{keywords:["face","surprise","impressed","wow","whoa",":O"],char:'😮',fitzpatrick_scale:false,category:"people"},scream:{keywords:["face","munch","scared","omg"],char:'😱',fitzpatrick_scale:false,category:"people"},fearful:{keywords:["face","scared","terrified","nervous","oops","huh"],char:'😨',fitzpatrick_scale:false,category:"people"},cold_sweat:{keywords:["face","nervous","sweat"],char:'😰',fitzpatrick_scale:false,category:"people"},hushed:{keywords:["face","woo","shh"],char:'😯',fitzpatrick_scale:false,category:"people"},frowning:{keywords:["face","aw","what"],char:'😦',fitzpatrick_scale:false,category:"people"},anguished:{keywords:["face","stunned","nervous"],char:'😧',fitzpatrick_scale:false,category:"people"},cry:{keywords:["face","tears","sad","depressed","upset",":'("],char:'😢',fitzpatrick_scale:false,category:"people"},disappointed_relieved:{keywords:["face","phew","sweat","nervous"],char:'😥',fitzpatrick_scale:false,category:"people"},drooling_face:{keywords:["face"],char:'🤤',fitzpatrick_scale:false,category:"people"},sleepy:{keywords:["face","tired","rest","nap"],char:'😪',fitzpatrick_scale:false,category:"people"},sweat:{keywords:["face","hot","sad","tired","exercise"],char:'😓',fitzpatrick_scale:false,category:"people"},hot:{keywords:["face","feverish","heat","red","sweating"],char:'🥵',fitzpatrick_scale:false,category:"people"},cold:{keywords:["face","blue","freezing","frozen","frostbite","icicles"],char:'🥶',fitzpatrick_scale:false,category:"people"},sob:{keywords:["face","cry","tears","sad","upset","depressed"],char:'😭',fitzpatrick_scale:false,category:"people"},dizzy_face:{keywords:["spent","unconscious","xox","dizzy"],char:'😵',fitzpatrick_scale:false,category:"people"},astonished:{keywords:["face","xox","surprised","poisoned"],char:'😲',fitzpatrick_scale:false,category:"people"},zipper_mouth_face:{keywords:["face","sealed","zipper","secret"],char:'🤐',fitzpatrick_scale:false,category:"people"},nauseated_face:{keywords:["face","vomit","gross","green","sick","throw up","ill"],char:'🤢',fitzpatrick_scale:false,category:"people"},sneezing_face:{keywords:["face","gesundheit","sneeze","sick","allergy"],char:'🤧',fitzpatrick_scale:false,category:"people"},vomiting:{keywords:["face","sick"],char:'🤮',fitzpatrick_scale:false,category:"people"},mask:{keywords:["face","sick","ill","disease"],char:'😷',fitzpatrick_scale:false,category:"people"},face_with_thermometer:{keywords:["sick","temperature","thermometer","cold","fever"],char:'🤒',fitzpatrick_scale:false,category:"people"},face_with_head_bandage:{keywords:["injured","clumsy","bandage","hurt"],char:'🤕',fitzpatrick_scale:false,category:"people"},woozy:{keywords:["face","dizzy","intoxicated","tipsy","wavy"],char:'🥴',fitzpatrick_scale:false,category:"people"},sleeping:{keywords:["face","tired","sleepy","night","zzz"],char:'😴',fitzpatrick_scale:false,category:"people"},zzz:{keywords:["sleepy","tired","dream"],char:'💤',fitzpatrick_scale:false,category:"people"},poop:{keywords:["hankey","shitface","fail","turd","shit"],char:'💩',fitzpatrick_scale:false,category:"people"},smiling_imp:{keywords:["devil","horns"],char:'😈',fitzpatrick_scale:false,category:"people"},imp:{keywords:["devil","angry","horns"],char:'👿',fitzpatrick_scale:false,category:"people"},japanese_ogre:{keywords:["monster","red","mask","halloween","scary","creepy","devil","demon","japanese","ogre"],char:'👹',fitzpatrick_scale:false,category:"people"},japanese_goblin:{keywords:["red","evil","mask","monster","scary","creepy","japanese","goblin"],char:'👺',fitzpatrick_scale:false,category:"people"},skull:{keywords:["dead","skeleton","creepy","death"],char:'💀',fitzpatrick_scale:false,category:"people"},ghost:{keywords:["halloween","spooky","scary"],char:'👻',fitzpatrick_scale:false,category:"people"},alien:{keywords:["UFO","paul","weird","outer_space"],char:'👽',fitzpatrick_scale:false,category:"people"},robot:{keywords:["computer","machine","bot"],char:'🤖',fitzpatrick_scale:false,category:"people"},smiley_cat:{keywords:["animal","cats","happy","smile"],char:'😺',fitzpatrick_scale:false,category:"people"},smile_cat:{keywords:["animal","cats","smile"],char:'😸',fitzpatrick_scale:false,category:"people"},joy_cat:{keywords:["animal","cats","haha","happy","tears"],char:'😹',fitzpatrick_scale:false,category:"people"},heart_eyes_cat:{keywords:["animal","love","like","affection","cats","valentines","heart"],char:'😻',fitzpatrick_scale:false,category:"people"},smirk_cat:{keywords:["animal","cats","smirk"],char:'😼',fitzpatrick_scale:false,category:"people"},kissing_cat:{keywords:["animal","cats","kiss"],char:'😽',fitzpatrick_scale:false,category:"people"},scream_cat:{keywords:["animal","cats","munch","scared","scream"],char:'🙀',fitzpatrick_scale:false,category:"people"},crying_cat_face:{keywords:["animal","tears","weep","sad","cats","upset","cry"],char:'😿',fitzpatrick_scale:false,category:"people"},pouting_cat:{keywords:["animal","cats"],char:'😾',fitzpatrick_scale:false,category:"people"},palms_up:{keywords:["hands","gesture","cupped","prayer"],char:'🤲',fitzpatrick_scale:true,category:"people"},raised_hands:{keywords:["gesture","hooray","yea","celebration","hands"],char:'🙌',fitzpatrick_scale:true,category:"people"},clap:{keywords:["hands","praise","applause","congrats","yay"],char:'👏',fitzpatrick_scale:true,category:"people"},wave:{keywords:["hands","gesture","goodbye","solong","farewell","hello","hi","palm"],char:'👋',fitzpatrick_scale:true,category:"people"},call_me_hand:{keywords:["hands","gesture"],char:'🤙',fitzpatrick_scale:true,category:"people"},"+1":{keywords:["thumbsup","yes","awesome","good","agree","accept","cool","hand","like"],char:'👍',fitzpatrick_scale:true,category:"people"},"-1":{keywords:["thumbsdown","no","dislike","hand"],char:'👎',fitzpatrick_scale:true,category:"people"},facepunch:{keywords:["angry","violence","fist","hit","attack","hand"],char:'👊',fitzpatrick_scale:true,category:"people"},fist:{keywords:["fingers","hand","grasp"],char:'✊',fitzpatrick_scale:true,category:"people"},fist_left:{keywords:["hand","fistbump"],char:'🤛',fitzpatrick_scale:true,category:"people"},fist_right:{keywords:["hand","fistbump"],char:'🤜',fitzpatrick_scale:true,category:"people"},v:{keywords:["fingers","ohyeah","hand","peace","victory","two"],char:'✌',fitzpatrick_scale:true,category:"people"},ok_hand:{keywords:["fingers","limbs","perfect","ok","okay"],char:'👌',fitzpatrick_scale:true,category:"people"},raised_hand:{keywords:["fingers","stop","highfive","palm","ban"],char:'✋',fitzpatrick_scale:true,category:"people"},raised_back_of_hand:{keywords:["fingers","raised","backhand"],char:'🤚',fitzpatrick_scale:true,category:"people"},open_hands:{keywords:["fingers","butterfly","hands","open"],char:'👐',fitzpatrick_scale:true,category:"people"},muscle:{keywords:["arm","flex","hand","summer","strong","biceps"],char:'💪',fitzpatrick_scale:true,category:"people"},pray:{keywords:["please","hope","wish","namaste","highfive"],char:'🙏',fitzpatrick_scale:true,category:"people"},foot:{keywords:["kick","stomp"],char:'🦶',fitzpatrick_scale:true,category:"people"},leg:{keywords:["kick","limb"],char:'🦵',fitzpatrick_scale:true,category:"people"},handshake:{keywords:["agreement","shake"],char:'🤝',fitzpatrick_scale:false,category:"people"},point_up:{keywords:["hand","fingers","direction","up"],char:'☝',fitzpatrick_scale:true,category:"people"},point_up_2:{keywords:["fingers","hand","direction","up"],char:'👆',fitzpatrick_scale:true,category:"people"},point_down:{keywords:["fingers","hand","direction","down"],char:'👇',fitzpatrick_scale:true,category:"people"},point_left:{keywords:["direction","fingers","hand","left"],char:'👈',fitzpatrick_scale:true,category:"people"},point_right:{keywords:["fingers","hand","direction","right"],char:'👉',fitzpatrick_scale:true,category:"people"},fu:{keywords:["hand","fingers","rude","middle","flipping"],char:'🖕',fitzpatrick_scale:true,category:"people"},raised_hand_with_fingers_splayed:{keywords:["hand","fingers","palm"],char:'🖐',fitzpatrick_scale:true,category:"people"},love_you:{keywords:["hand","fingers","gesture"],char:'🤟',fitzpatrick_scale:true,category:"people"},metal:{keywords:["hand","fingers","evil_eye","sign_of_horns","rock_on"],char:'🤘',fitzpatrick_scale:true,category:"people"},crossed_fingers:{keywords:["good","lucky"],char:'🤞',fitzpatrick_scale:true,category:"people"},vulcan_salute:{keywords:["hand","fingers","spock","star trek"],char:'🖖',fitzpatrick_scale:true,category:"people"},writing_hand:{keywords:["lower_left_ballpoint_pen","stationery","write","compose"],char:'✍',fitzpatrick_scale:true,category:"people"},selfie:{keywords:["camera","phone"],char:'🤳',fitzpatrick_scale:true,category:"people"},nail_care:{keywords:["beauty","manicure","finger","fashion","nail"],char:'💅',fitzpatrick_scale:true,category:"people"},lips:{keywords:["mouth","kiss"],char:'👄',fitzpatrick_scale:false,category:"people"},tooth:{keywords:["teeth","dentist"],char:'🦷',fitzpatrick_scale:false,category:"people"},tongue:{keywords:["mouth","playful"],char:'👅',fitzpatrick_scale:false,category:"people"},ear:{keywords:["face","hear","sound","listen"],char:'👂',fitzpatrick_scale:true,category:"people"},nose:{keywords:["smell","sniff"],char:'👃',fitzpatrick_scale:true,category:"people"},eye:{keywords:["face","look","see","watch","stare"],char:'👁',fitzpatrick_scale:false,category:"people"},eyes:{keywords:["look","watch","stalk","peek","see"],char:'👀',fitzpatrick_scale:false,category:"people"},brain:{keywords:["smart","intelligent"],char:'🧠',fitzpatrick_scale:false,category:"people"},bust_in_silhouette:{keywords:["user","person","human"],char:'👤',fitzpatrick_scale:false,category:"people"},busts_in_silhouette:{keywords:["user","person","human","group","team"],char:'👥',fitzpatrick_scale:false,category:"people"},speaking_head:{keywords:["user","person","human","sing","say","talk"],char:'🗣',fitzpatrick_scale:false,category:"people"},baby:{keywords:["child","boy","girl","toddler"],char:'👶',fitzpatrick_scale:true,category:"people"},child:{keywords:["gender-neutral","young"],char:'🧒',fitzpatrick_scale:true,category:"people"},boy:{keywords:["man","male","guy","teenager"],char:'👦',fitzpatrick_scale:true,category:"people"},girl:{keywords:["female","woman","teenager"],char:'👧',fitzpatrick_scale:true,category:"people"},adult:{keywords:["gender-neutral","person"],char:'🧑',fitzpatrick_scale:true,category:"people"},man:{keywords:["mustache","father","dad","guy","classy","sir","moustache"],char:'👨',fitzpatrick_scale:true,category:"people"},woman:{keywords:["female","girls","lady"],char:'👩',fitzpatrick_scale:true,category:"people"},blonde_woman:{keywords:["woman","female","girl","blonde","person"],char:'👱‍♀️',fitzpatrick_scale:true,category:"people"},blonde_man:{keywords:["man","male","boy","blonde","guy","person"],char:'👱',fitzpatrick_scale:true,category:"people"},bearded_person:{keywords:["person","bewhiskered"],char:'🧔',fitzpatrick_scale:true,category:"people"},older_adult:{keywords:["human","elder","senior","gender-neutral"],char:'🧓',fitzpatrick_scale:true,category:"people"},older_man:{keywords:["human","male","men","old","elder","senior"],char:'👴',fitzpatrick_scale:true,category:"people"},older_woman:{keywords:["human","female","women","lady","old","elder","senior"],char:'👵',fitzpatrick_scale:true,category:"people"},man_with_gua_pi_mao:{keywords:["male","boy","chinese"],char:'👲',fitzpatrick_scale:true,category:"people"},woman_with_headscarf:{keywords:["female","hijab","mantilla","tichel"],char:'🧕',fitzpatrick_scale:true,category:"people"},woman_with_turban:{keywords:["female","indian","hinduism","arabs","woman"],char:'👳‍♀️',fitzpatrick_scale:true,category:"people"},man_with_turban:{keywords:["male","indian","hinduism","arabs"],char:'👳',fitzpatrick_scale:true,category:"people"},policewoman:{keywords:["woman","police","law","legal","enforcement","arrest","911","female"],char:'👮‍♀️',fitzpatrick_scale:true,category:"people"},policeman:{keywords:["man","police","law","legal","enforcement","arrest","911"],char:'👮',fitzpatrick_scale:true,category:"people"},construction_worker_woman:{keywords:["female","human","wip","build","construction","worker","labor","woman"],char:'👷‍♀️',fitzpatrick_scale:true,category:"people"},construction_worker_man:{keywords:["male","human","wip","guy","build","construction","worker","labor"],char:'👷',fitzpatrick_scale:true,category:"people"},guardswoman:{keywords:["uk","gb","british","female","royal","woman"],char:'💂‍♀️',fitzpatrick_scale:true,category:"people"},guardsman:{keywords:["uk","gb","british","male","guy","royal"],char:'💂',fitzpatrick_scale:true,category:"people"},female_detective:{keywords:["human","spy","detective","female","woman"],char:'🕵️‍♀️',fitzpatrick_scale:true,category:"people"},male_detective:{keywords:["human","spy","detective"],char:'🕵',fitzpatrick_scale:true,category:"people"},woman_health_worker:{keywords:["doctor","nurse","therapist","healthcare","woman","human"],char:'👩‍⚕️',fitzpatrick_scale:true,category:"people"},man_health_worker:{keywords:["doctor","nurse","therapist","healthcare","man","human"],char:'👨‍⚕️',fitzpatrick_scale:true,category:"people"},woman_farmer:{keywords:["rancher","gardener","woman","human"],char:'👩‍🌾',fitzpatrick_scale:true,category:"people"},man_farmer:{keywords:["rancher","gardener","man","human"],char:'👨‍🌾',fitzpatrick_scale:true,category:"people"},woman_cook:{keywords:["chef","woman","human"],char:'👩‍🍳',fitzpatrick_scale:true,category:"people"},man_cook:{keywords:["chef","man","human"],char:'👨‍🍳',fitzpatrick_scale:true,category:"people"},woman_student:{keywords:["graduate","woman","human"],char:'👩‍🎓',fitzpatrick_scale:true,category:"people"},man_student:{keywords:["graduate","man","human"],char:'👨‍🎓',fitzpatrick_scale:true,category:"people"},woman_singer:{keywords:["rockstar","entertainer","woman","human"],char:'👩‍🎤',fitzpatrick_scale:true,category:"people"},man_singer:{keywords:["rockstar","entertainer","man","human"],char:'👨‍🎤',fitzpatrick_scale:true,category:"people"},woman_teacher:{keywords:["instructor","professor","woman","human"],char:'👩‍🏫',fitzpatrick_scale:true,category:"people"},man_teacher:{keywords:["instructor","professor","man","human"],char:'👨‍🏫',fitzpatrick_scale:true,category:"people"},woman_factory_worker:{keywords:["assembly","industrial","woman","human"],char:'👩‍🏭',fitzpatrick_scale:true,category:"people"},man_factory_worker:{keywords:["assembly","industrial","man","human"],char:'👨‍🏭',fitzpatrick_scale:true,category:"people"},woman_technologist:{keywords:["coder","developer","engineer","programmer","software","woman","human","laptop","computer"],char:'👩‍💻',fitzpatrick_scale:true,category:"people"},man_technologist:{keywords:["coder","developer","engineer","programmer","software","man","human","laptop","computer"],char:'👨‍💻',fitzpatrick_scale:true,category:"people"},woman_office_worker:{keywords:["business","manager","woman","human"],char:'👩‍💼',fitzpatrick_scale:true,category:"people"},man_office_worker:{keywords:["business","manager","man","human"],char:'👨‍💼',fitzpatrick_scale:true,category:"people"},woman_mechanic:{keywords:["plumber","woman","human","wrench"],char:'👩‍🔧',fitzpatrick_scale:true,category:"people"},man_mechanic:{keywords:["plumber","man","human","wrench"],char:'👨‍🔧',fitzpatrick_scale:true,category:"people"},woman_scientist:{keywords:["biologist","chemist","engineer","physicist","woman","human"],char:'👩‍🔬',fitzpatrick_scale:true,category:"people"},man_scientist:{keywords:["biologist","chemist","engineer","physicist","man","human"],char:'👨‍🔬',fitzpatrick_scale:true,category:"people"},woman_artist:{keywords:["painter","woman","human"],char:'👩‍🎨',fitzpatrick_scale:true,category:"people"},man_artist:{keywords:["painter","man","human"],char:'👨‍🎨',fitzpatrick_scale:true,category:"people"},woman_firefighter:{keywords:["fireman","woman","human"],char:'👩‍🚒',fitzpatrick_scale:true,category:"people"},man_firefighter:{keywords:["fireman","man","human"],char:'👨‍🚒',fitzpatrick_scale:true,category:"people"},woman_pilot:{keywords:["aviator","plane","woman","human"],char:'👩‍✈️',fitzpatrick_scale:true,category:"people"},man_pilot:{keywords:["aviator","plane","man","human"],char:'👨‍✈️',fitzpatrick_scale:true,category:"people"},woman_astronaut:{keywords:["space","rocket","woman","human"],char:'👩‍🚀',fitzpatrick_scale:true,category:"people"},man_astronaut:{keywords:["space","rocket","man","human"],char:'👨‍🚀',fitzpatrick_scale:true,category:"people"},woman_judge:{keywords:["justice","court","woman","human"],char:'👩‍⚖️',fitzpatrick_scale:true,category:"people"},man_judge:{keywords:["justice","court","man","human"],char:'👨‍⚖️',fitzpatrick_scale:true,category:"people"},woman_superhero:{keywords:["woman","female","good","heroine","superpowers"],char:'🦸‍♀️',fitzpatrick_scale:true,category:"people"},man_superhero:{keywords:["man","male","good","hero","superpowers"],char:'🦸‍♂️',fitzpatrick_scale:true,category:"people"},woman_supervillain:{keywords:["woman","female","evil","bad","criminal","heroine","superpowers"],char:'🦹‍♀️',fitzpatrick_scale:true,category:"people"},man_supervillain:{keywords:["man","male","evil","bad","criminal","hero","superpowers"],char:'🦹‍♂️',fitzpatrick_scale:true,category:"people"},mrs_claus:{keywords:["woman","female","xmas","mother christmas"],char:'🤶',fitzpatrick_scale:true,category:"people"},santa:{keywords:["festival","man","male","xmas","father christmas"],char:'🎅',fitzpatrick_scale:true,category:"people"},sorceress:{keywords:["woman","female","mage","witch"],char:'🧙‍♀️',fitzpatrick_scale:true,category:"people"},wizard:{keywords:["man","male","mage","sorcerer"],char:'🧙‍♂️',fitzpatrick_scale:true,category:"people"},woman_elf:{keywords:["woman","female"],char:'🧝‍♀️',fitzpatrick_scale:true,category:"people"},man_elf:{keywords:["man","male"],char:'🧝‍♂️',fitzpatrick_scale:true,category:"people"},woman_vampire:{keywords:["woman","female"],char:'🧛‍♀️',fitzpatrick_scale:true,category:"people"},man_vampire:{keywords:["man","male","dracula"],char:'🧛‍♂️',fitzpatrick_scale:true,category:"people"},woman_zombie:{keywords:["woman","female","undead","walking dead"],char:'🧟‍♀️',fitzpatrick_scale:false,category:"people"},man_zombie:{keywords:["man","male","dracula","undead","walking dead"],char:'🧟‍♂️',fitzpatrick_scale:false,category:"people"},woman_genie:{keywords:["woman","female"],char:'🧞‍♀️',fitzpatrick_scale:false,category:"people"},man_genie:{keywords:["man","male"],char:'🧞‍♂️',fitzpatrick_scale:false,category:"people"},mermaid:{keywords:["woman","female","merwoman","ariel"],char:'🧜‍♀️',fitzpatrick_scale:true,category:"people"},merman:{keywords:["man","male","triton"],char:'🧜‍♂️',fitzpatrick_scale:true,category:"people"},woman_fairy:{keywords:["woman","female"],char:'🧚‍♀️',fitzpatrick_scale:true,category:"people"},man_fairy:{keywords:["man","male"],char:'🧚‍♂️',fitzpatrick_scale:true,category:"people"},angel:{keywords:["heaven","wings","halo"],char:'👼',fitzpatrick_scale:true,category:"people"},pregnant_woman:{keywords:["baby"],char:'🤰',fitzpatrick_scale:true,category:"people"},breastfeeding:{keywords:["nursing","baby"],char:'🤱',fitzpatrick_scale:true,category:"people"},princess:{keywords:["girl","woman","female","blond","crown","royal","queen"],char:'👸',fitzpatrick_scale:true,category:"people"},prince:{keywords:["boy","man","male","crown","royal","king"],char:'🤴',fitzpatrick_scale:true,category:"people"},bride_with_veil:{keywords:["couple","marriage","wedding","woman","bride"],char:'👰',fitzpatrick_scale:true,category:"people"},man_in_tuxedo:{keywords:["couple","marriage","wedding","groom"],char:'🤵',fitzpatrick_scale:true,category:"people"},running_woman:{keywords:["woman","walking","exercise","race","running","female"],char:'🏃‍♀️',fitzpatrick_scale:true,category:"people"},running_man:{keywords:["man","walking","exercise","race","running"],char:'🏃',fitzpatrick_scale:true,category:"people"},walking_woman:{keywords:["human","feet","steps","woman","female"],char:'🚶‍♀️',fitzpatrick_scale:true,category:"people"},walking_man:{keywords:["human","feet","steps"],char:'🚶',fitzpatrick_scale:true,category:"people"},dancer:{keywords:["female","girl","woman","fun"],char:'💃',fitzpatrick_scale:true,category:"people"},man_dancing:{keywords:["male","boy","fun","dancer"],char:'🕺',fitzpatrick_scale:true,category:"people"},dancing_women:{keywords:["female","bunny","women","girls"],char:'👯',fitzpatrick_scale:false,category:"people"},dancing_men:{keywords:["male","bunny","men","boys"],char:'👯‍♂️',fitzpatrick_scale:false,category:"people"},couple:{keywords:["pair","people","human","love","date","dating","like","affection","valentines","marriage"],char:'👫',fitzpatrick_scale:false,category:"people"},two_men_holding_hands:{keywords:["pair","couple","love","like","bromance","friendship","people","human"],char:'👬',fitzpatrick_scale:false,category:"people"},two_women_holding_hands:{keywords:["pair","friendship","couple","love","like","female","people","human"],char:'👭',fitzpatrick_scale:false,category:"people"},bowing_woman:{keywords:["woman","female","girl"],char:'🙇‍♀️',fitzpatrick_scale:true,category:"people"},bowing_man:{keywords:["man","male","boy"],char:'🙇',fitzpatrick_scale:true,category:"people"},man_facepalming:{keywords:["man","male","boy","disbelief"],char:'🤦‍♂️',fitzpatrick_scale:true,category:"people"},woman_facepalming:{keywords:["woman","female","girl","disbelief"],char:'🤦‍♀️',fitzpatrick_scale:true,category:"people"},woman_shrugging:{keywords:["woman","female","girl","confused","indifferent","doubt"],char:'🤷',fitzpatrick_scale:true,category:"people"},man_shrugging:{keywords:["man","male","boy","confused","indifferent","doubt"],char:'🤷‍♂️',fitzpatrick_scale:true,category:"people"},tipping_hand_woman:{keywords:["female","girl","woman","human","information"],char:'💁',fitzpatrick_scale:true,category:"people"},tipping_hand_man:{keywords:["male","boy","man","human","information"],char:'💁‍♂️',fitzpatrick_scale:true,category:"people"},no_good_woman:{keywords:["female","girl","woman","nope"],char:'🙅',fitzpatrick_scale:true,category:"people"},no_good_man:{keywords:["male","boy","man","nope"],char:'🙅‍♂️',fitzpatrick_scale:true,category:"people"},ok_woman:{keywords:["women","girl","female","pink","human","woman"],char:'🙆',fitzpatrick_scale:true,category:"people"},ok_man:{keywords:["men","boy","male","blue","human","man"],char:'🙆‍♂️',fitzpatrick_scale:true,category:"people"},raising_hand_woman:{keywords:["female","girl","woman"],char:'🙋',fitzpatrick_scale:true,category:"people"},raising_hand_man:{keywords:["male","boy","man"],char:'🙋‍♂️',fitzpatrick_scale:true,category:"people"},pouting_woman:{keywords:["female","girl","woman"],char:'🙎',fitzpatrick_scale:true,category:"people"},pouting_man:{keywords:["male","boy","man"],char:'🙎‍♂️',fitzpatrick_scale:true,category:"people"},frowning_woman:{keywords:["female","girl","woman","sad","depressed","discouraged","unhappy"],char:'🙍',fitzpatrick_scale:true,category:"people"},frowning_man:{keywords:["male","boy","man","sad","depressed","discouraged","unhappy"],char:'🙍‍♂️',fitzpatrick_scale:true,category:"people"},haircut_woman:{keywords:["female","girl","woman"],char:'💇',fitzpatrick_scale:true,category:"people"},haircut_man:{keywords:["male","boy","man"],char:'💇‍♂️',fitzpatrick_scale:true,category:"people"},massage_woman:{keywords:["female","girl","woman","head"],char:'💆',fitzpatrick_scale:true,category:"people"},massage_man:{keywords:["male","boy","man","head"],char:'💆‍♂️',fitzpatrick_scale:true,category:"people"},woman_in_steamy_room:{keywords:["female","woman","spa","steamroom","sauna"],char:'🧖‍♀️',fitzpatrick_scale:true,category:"people"},man_in_steamy_room:{keywords:["male","man","spa","steamroom","sauna"],char:'🧖‍♂️',fitzpatrick_scale:true,category:"people"},couple_with_heart_woman_man:{keywords:["pair","love","like","affection","human","dating","valentines","marriage"],char:'💑',fitzpatrick_scale:false,category:"people"},couple_with_heart_woman_woman:{keywords:["pair","love","like","affection","human","dating","valentines","marriage"],char:'👩‍❤️‍👩',fitzpatrick_scale:false,category:"people"},couple_with_heart_man_man:{keywords:["pair","love","like","affection","human","dating","valentines","marriage"],char:'👨‍❤️‍👨',fitzpatrick_scale:false,category:"people"},couplekiss_man_woman:{keywords:["pair","valentines","love","like","dating","marriage"],char:'💏',fitzpatrick_scale:false,category:"people"},couplekiss_woman_woman:{keywords:["pair","valentines","love","like","dating","marriage"],char:'👩‍❤️‍💋‍👩',fitzpatrick_scale:false,category:"people"},couplekiss_man_man:{keywords:["pair","valentines","love","like","dating","marriage"],char:'👨‍❤️‍💋‍👨',fitzpatrick_scale:false,category:"people"},family_man_woman_boy:{keywords:["home","parents","child","mom","dad","father","mother","people","human"],char:'👪',fitzpatrick_scale:false,category:"people"},family_man_woman_girl:{keywords:["home","parents","people","human","child"],char:'👨‍👩‍👧',fitzpatrick_scale:false,category:"people"},family_man_woman_girl_boy:{keywords:["home","parents","people","human","children"],char:'👨‍👩‍👧‍👦',fitzpatrick_scale:false,category:"people"},family_man_woman_boy_boy:{keywords:["home","parents","people","human","children"],char:'👨‍👩‍👦‍👦',fitzpatrick_scale:false,category:"people"},family_man_woman_girl_girl:{keywords:["home","parents","people","human","children"],char:'👨‍👩‍👧‍👧',fitzpatrick_scale:false,category:"people"},family_woman_woman_boy:{keywords:["home","parents","people","human","children"],char:'👩‍👩‍👦',fitzpatrick_scale:false,category:"people"},family_woman_woman_girl:{keywords:["home","parents","people","human","children"],char:'👩‍👩‍👧',fitzpatrick_scale:false,category:"people"},family_woman_woman_girl_boy:{keywords:["home","parents","people","human","children"],char:'👩‍👩‍👧‍👦',fitzpatrick_scale:false,category:"people"},family_woman_woman_boy_boy:{keywords:["home","parents","people","human","children"],char:'👩‍👩‍👦‍👦',fitzpatrick_scale:false,category:"people"},family_woman_woman_girl_girl:{keywords:["home","parents","people","human","children"],char:'👩‍👩‍👧‍👧',fitzpatrick_scale:false,category:"people"},family_man_man_boy:{keywords:["home","parents","people","human","children"],char:'👨‍👨‍👦',fitzpatrick_scale:false,category:"people"},family_man_man_girl:{keywords:["home","parents","people","human","children"],char:'👨‍👨‍👧',fitzpatrick_scale:false,category:"people"},family_man_man_girl_boy:{keywords:["home","parents","people","human","children"],char:'👨‍👨‍👧‍👦',fitzpatrick_scale:false,category:"people"},family_man_man_boy_boy:{keywords:["home","parents","people","human","children"],char:'👨‍👨‍👦‍👦',fitzpatrick_scale:false,category:"people"},family_man_man_girl_girl:{keywords:["home","parents","people","human","children"],char:'👨‍👨‍👧‍👧',fitzpatrick_scale:false,category:"people"},family_woman_boy:{keywords:["home","parent","people","human","child"],char:'👩‍👦',fitzpatrick_scale:false,category:"people"},family_woman_girl:{keywords:["home","parent","people","human","child"],char:'👩‍👧',fitzpatrick_scale:false,category:"people"},family_woman_girl_boy:{keywords:["home","parent","people","human","children"],char:'👩‍👧‍👦',fitzpatrick_scale:false,category:"people"},family_woman_boy_boy:{keywords:["home","parent","people","human","children"],char:'👩‍👦‍👦',fitzpatrick_scale:false,category:"people"},family_woman_girl_girl:{keywords:["home","parent","people","human","children"],char:'👩‍👧‍👧',fitzpatrick_scale:false,category:"people"},family_man_boy:{keywords:["home","parent","people","human","child"],char:'👨‍👦',fitzpatrick_scale:false,category:"people"},family_man_girl:{keywords:["home","parent","people","human","child"],char:'👨‍👧',fitzpatrick_scale:false,category:"people"},family_man_girl_boy:{keywords:["home","parent","people","human","children"],char:'👨‍👧‍👦',fitzpatrick_scale:false,category:"people"},family_man_boy_boy:{keywords:["home","parent","people","human","children"],char:'👨‍👦‍👦',fitzpatrick_scale:false,category:"people"},family_man_girl_girl:{keywords:["home","parent","people","human","children"],char:'👨‍👧‍👧',fitzpatrick_scale:false,category:"people"},yarn:{keywords:["ball","crochet","knit"],char:'🧶',fitzpatrick_scale:false,category:"people"},thread:{keywords:["needle","sewing","spool","string"],char:'🧵',fitzpatrick_scale:false,category:"people"},coat:{keywords:["jacket"],char:'🧥',fitzpatrick_scale:false,category:"people"},labcoat:{keywords:["doctor","experiment","scientist","chemist"],char:'🥼',fitzpatrick_scale:false,category:"people"},womans_clothes:{keywords:["fashion","shopping_bags","female"],char:'👚',fitzpatrick_scale:false,category:"people"},tshirt:{keywords:["fashion","cloth","casual","shirt","tee"],char:'👕',fitzpatrick_scale:false,category:"people"},jeans:{keywords:["fashion","shopping"],char:'👖',fitzpatrick_scale:false,category:"people"},necktie:{keywords:["shirt","suitup","formal","fashion","cloth","business"],char:'👔',fitzpatrick_scale:false,category:"people"},dress:{keywords:["clothes","fashion","shopping"],char:'👗',fitzpatrick_scale:false,category:"people"},bikini:{keywords:["swimming","female","woman","girl","fashion","beach","summer"],char:'👙',fitzpatrick_scale:false,category:"people"},kimono:{keywords:["dress","fashion","women","female","japanese"],char:'👘',fitzpatrick_scale:false,category:"people"},lipstick:{keywords:["female","girl","fashion","woman"],char:'💄',fitzpatrick_scale:false,category:"people"},kiss:{keywords:["face","lips","love","like","affection","valentines"],char:'💋',fitzpatrick_scale:false,category:"people"},footprints:{keywords:["feet","tracking","walking","beach"],char:'👣',fitzpatrick_scale:false,category:"people"},flat_shoe:{keywords:["ballet","slip-on","slipper"],char:'🥿',fitzpatrick_scale:false,category:"people"},high_heel:{keywords:["fashion","shoes","female","pumps","stiletto"],char:'👠',fitzpatrick_scale:false,category:"people"},sandal:{keywords:["shoes","fashion","flip flops"],char:'👡',fitzpatrick_scale:false,category:"people"},boot:{keywords:["shoes","fashion"],char:'👢',fitzpatrick_scale:false,category:"people"},mans_shoe:{keywords:["fashion","male"],char:'👞',fitzpatrick_scale:false,category:"people"},athletic_shoe:{keywords:["shoes","sports","sneakers"],char:'👟',fitzpatrick_scale:false,category:"people"},hiking_boot:{keywords:["backpacking","camping","hiking"],char:'🥾',fitzpatrick_scale:false,category:"people"},socks:{keywords:["stockings","clothes"],char:'🧦',fitzpatrick_scale:false,category:"people"},gloves:{keywords:["hands","winter","clothes"],char:'🧤',fitzpatrick_scale:false,category:"people"},scarf:{keywords:["neck","winter","clothes"],char:'🧣',fitzpatrick_scale:false,category:"people"},womans_hat:{keywords:["fashion","accessories","female","lady","spring"],char:'👒',fitzpatrick_scale:false,category:"people"},tophat:{keywords:["magic","gentleman","classy","circus"],char:'🎩',fitzpatrick_scale:false,category:"people"},billed_hat:{keywords:["cap","baseball"],char:'🧢',fitzpatrick_scale:false,category:"people"},rescue_worker_helmet:{keywords:["construction","build"],char:'⛑',fitzpatrick_scale:false,category:"people"},mortar_board:{keywords:["school","college","degree","university","graduation","cap","hat","legal","learn","education"],char:'🎓',fitzpatrick_scale:false,category:"people"},crown:{keywords:["king","kod","leader","royalty","lord"],char:'👑',fitzpatrick_scale:false,category:"people"},school_satchel:{keywords:["student","education","bag","backpack"],char:'🎒',fitzpatrick_scale:false,category:"people"},luggage:{keywords:["packing","travel"],char:'🧳',fitzpatrick_scale:false,category:"people"},pouch:{keywords:["bag","accessories","shopping"],char:'👝',fitzpatrick_scale:false,category:"people"},purse:{keywords:["fashion","accessories","money","sales","shopping"],char:'👛',fitzpatrick_scale:false,category:"people"},handbag:{keywords:["fashion","accessory","accessories","shopping"],char:'👜',fitzpatrick_scale:false,category:"people"},briefcase:{keywords:["business","documents","work","law","legal","job","career"],char:'💼',fitzpatrick_scale:false,category:"people"},eyeglasses:{keywords:["fashion","accessories","eyesight","nerdy","dork","geek"],char:'👓',fitzpatrick_scale:false,category:"people"},dark_sunglasses:{keywords:["face","cool","accessories"],char:'🕶',fitzpatrick_scale:false,category:"people"},goggles:{keywords:["eyes","protection","safety"],char:'🥽',fitzpatrick_scale:false,category:"people"},ring:{keywords:["wedding","propose","marriage","valentines","diamond","fashion","jewelry","gem","engagement"],char:'💍',fitzpatrick_scale:false,category:"people"},closed_umbrella:{keywords:["weather","rain","drizzle"],char:'🌂',fitzpatrick_scale:false,category:"people"},dog:{keywords:["animal","friend","nature","woof","puppy","pet","faithful"],char:'🐶',fitzpatrick_scale:false,category:"animals_and_nature"},cat:{keywords:["animal","meow","nature","pet","kitten"],char:'🐱',fitzpatrick_scale:false,category:"animals_and_nature"},mouse:{keywords:["animal","nature","cheese_wedge","rodent"],char:'🐭',fitzpatrick_scale:false,category:"animals_and_nature"},hamster:{keywords:["animal","nature"],char:'🐹',fitzpatrick_scale:false,category:"animals_and_nature"},rabbit:{keywords:["animal","nature","pet","spring","magic","bunny"],char:'🐰',fitzpatrick_scale:false,category:"animals_and_nature"},fox_face:{keywords:["animal","nature","face"],char:'🦊',fitzpatrick_scale:false,category:"animals_and_nature"},bear:{keywords:["animal","nature","wild"],char:'🐻',fitzpatrick_scale:false,category:"animals_and_nature"},panda_face:{keywords:["animal","nature","panda"],char:'🐼',fitzpatrick_scale:false,category:"animals_and_nature"},koala:{keywords:["animal","nature"],char:'🐨',fitzpatrick_scale:false,category:"animals_and_nature"},tiger:{keywords:["animal","cat","danger","wild","nature","roar"],char:'🐯',fitzpatrick_scale:false,category:"animals_and_nature"},lion:{keywords:["animal","nature"],char:'🦁',fitzpatrick_scale:false,category:"animals_and_nature"},cow:{keywords:["beef","ox","animal","nature","moo","milk"],char:'🐮',fitzpatrick_scale:false,category:"animals_and_nature"},pig:{keywords:["animal","oink","nature"],char:'🐷',fitzpatrick_scale:false,category:"animals_and_nature"},pig_nose:{keywords:["animal","oink"],char:'🐽',fitzpatrick_scale:false,category:"animals_and_nature"},frog:{keywords:["animal","nature","croak","toad"],char:'🐸',fitzpatrick_scale:false,category:"animals_and_nature"},squid:{keywords:["animal","nature","ocean","sea"],char:'🦑',fitzpatrick_scale:false,category:"animals_and_nature"},octopus:{keywords:["animal","creature","ocean","sea","nature","beach"],char:'🐙',fitzpatrick_scale:false,category:"animals_and_nature"},shrimp:{keywords:["animal","ocean","nature","seafood"],char:'🦐',fitzpatrick_scale:false,category:"animals_and_nature"},monkey_face:{keywords:["animal","nature","circus"],char:'🐵',fitzpatrick_scale:false,category:"animals_and_nature"},gorilla:{keywords:["animal","nature","circus"],char:'🦍',fitzpatrick_scale:false,category:"animals_and_nature"},see_no_evil:{keywords:["monkey","animal","nature","haha"],char:'🙈',fitzpatrick_scale:false,category:"animals_and_nature"},hear_no_evil:{keywords:["animal","monkey","nature"],char:'🙉',fitzpatrick_scale:false,category:"animals_and_nature"},speak_no_evil:{keywords:["monkey","animal","nature","omg"],char:'🙊',fitzpatrick_scale:false,category:"animals_and_nature"},monkey:{keywords:["animal","nature","banana","circus"],char:'🐒',fitzpatrick_scale:false,category:"animals_and_nature"},chicken:{keywords:["animal","cluck","nature","bird"],char:'🐔',fitzpatrick_scale:false,category:"animals_and_nature"},penguin:{keywords:["animal","nature"],char:'🐧',fitzpatrick_scale:false,category:"animals_and_nature"},bird:{keywords:["animal","nature","fly","tweet","spring"],char:'🐦',fitzpatrick_scale:false,category:"animals_and_nature"},baby_chick:{keywords:["animal","chicken","bird"],char:'🐤',fitzpatrick_scale:false,category:"animals_and_nature"},hatching_chick:{keywords:["animal","chicken","egg","born","baby","bird"],char:'🐣',fitzpatrick_scale:false,category:"animals_and_nature"},hatched_chick:{keywords:["animal","chicken","baby","bird"],char:'🐥',fitzpatrick_scale:false,category:"animals_and_nature"},duck:{keywords:["animal","nature","bird","mallard"],char:'🦆',fitzpatrick_scale:false,category:"animals_and_nature"},eagle:{keywords:["animal","nature","bird"],char:'🦅',fitzpatrick_scale:false,category:"animals_and_nature"},owl:{keywords:["animal","nature","bird","hoot"],char:'🦉',fitzpatrick_scale:false,category:"animals_and_nature"},bat:{keywords:["animal","nature","blind","vampire"],char:'🦇',fitzpatrick_scale:false,category:"animals_and_nature"},wolf:{keywords:["animal","nature","wild"],char:'🐺',fitzpatrick_scale:false,category:"animals_and_nature"},boar:{keywords:["animal","nature"],char:'🐗',fitzpatrick_scale:false,category:"animals_and_nature"},horse:{keywords:["animal","brown","nature"],char:'🐴',fitzpatrick_scale:false,category:"animals_and_nature"},unicorn:{keywords:["animal","nature","mystical"],char:'🦄',fitzpatrick_scale:false,category:"animals_and_nature"},honeybee:{keywords:["animal","insect","nature","bug","spring","honey"],char:'🐝',fitzpatrick_scale:false,category:"animals_and_nature"},bug:{keywords:["animal","insect","nature","worm"],char:'🐛',fitzpatrick_scale:false,category:"animals_and_nature"},butterfly:{keywords:["animal","insect","nature","caterpillar"],char:'🦋',fitzpatrick_scale:false,category:"animals_and_nature"},snail:{keywords:["slow","animal","shell"],char:'🐌',fitzpatrick_scale:false,category:"animals_and_nature"},beetle:{keywords:["animal","insect","nature","ladybug"],char:'🐞',fitzpatrick_scale:false,category:"animals_and_nature"},ant:{keywords:["animal","insect","nature","bug"],char:'🐜',fitzpatrick_scale:false,category:"animals_and_nature"},grasshopper:{keywords:["animal","cricket","chirp"],char:'🦗',fitzpatrick_scale:false,category:"animals_and_nature"},spider:{keywords:["animal","arachnid"],char:'🕷',fitzpatrick_scale:false,category:"animals_and_nature"},scorpion:{keywords:["animal","arachnid"],char:'🦂',fitzpatrick_scale:false,category:"animals_and_nature"},crab:{keywords:["animal","crustacean"],char:'🦀',fitzpatrick_scale:false,category:"animals_and_nature"},snake:{keywords:["animal","evil","nature","hiss","python"],char:'🐍',fitzpatrick_scale:false,category:"animals_and_nature"},lizard:{keywords:["animal","nature","reptile"],char:'🦎',fitzpatrick_scale:false,category:"animals_and_nature"},"t-rex":{keywords:["animal","nature","dinosaur","tyrannosaurus","extinct"],char:'🦖',fitzpatrick_scale:false,category:"animals_and_nature"},sauropod:{keywords:["animal","nature","dinosaur","brachiosaurus","brontosaurus","diplodocus","extinct"],char:'🦕',fitzpatrick_scale:false,category:"animals_and_nature"},turtle:{keywords:["animal","slow","nature","tortoise"],char:'🐢',fitzpatrick_scale:false,category:"animals_and_nature"},tropical_fish:{keywords:["animal","swim","ocean","beach","nemo"],char:'🐠',fitzpatrick_scale:false,category:"animals_and_nature"},fish:{keywords:["animal","food","nature"],char:'🐟',fitzpatrick_scale:false,category:"animals_and_nature"},blowfish:{keywords:["animal","nature","food","sea","ocean"],char:'🐡',fitzpatrick_scale:false,category:"animals_and_nature"},dolphin:{keywords:["animal","nature","fish","sea","ocean","flipper","fins","beach"],char:'🐬',fitzpatrick_scale:false,category:"animals_and_nature"},shark:{keywords:["animal","nature","fish","sea","ocean","jaws","fins","beach"],char:'🦈',fitzpatrick_scale:false,category:"animals_and_nature"},whale:{keywords:["animal","nature","sea","ocean"],char:'🐳',fitzpatrick_scale:false,category:"animals_and_nature"},whale2:{keywords:["animal","nature","sea","ocean"],char:'🐋',fitzpatrick_scale:false,category:"animals_and_nature"},crocodile:{keywords:["animal","nature","reptile","lizard","alligator"],char:'🐊',fitzpatrick_scale:false,category:"animals_and_nature"},leopard:{keywords:["animal","nature"],char:'🐆',fitzpatrick_scale:false,category:"animals_and_nature"},zebra:{keywords:["animal","nature","stripes","safari"],char:'🦓',fitzpatrick_scale:false,category:"animals_and_nature"},tiger2:{keywords:["animal","nature","roar"],char:'🐅',fitzpatrick_scale:false,category:"animals_and_nature"},water_buffalo:{keywords:["animal","nature","ox","cow"],char:'🐃',fitzpatrick_scale:false,category:"animals_and_nature"},ox:{keywords:["animal","cow","beef"],char:'🐂',fitzpatrick_scale:false,category:"animals_and_nature"},cow2:{keywords:["beef","ox","animal","nature","moo","milk"],char:'🐄',fitzpatrick_scale:false,category:"animals_and_nature"},deer:{keywords:["animal","nature","horns","venison"],char:'🦌',fitzpatrick_scale:false,category:"animals_and_nature"},dromedary_camel:{keywords:["animal","hot","desert","hump"],char:'🐪',fitzpatrick_scale:false,category:"animals_and_nature"},camel:{keywords:["animal","nature","hot","desert","hump"],char:'🐫',fitzpatrick_scale:false,category:"animals_and_nature"},giraffe:{keywords:["animal","nature","spots","safari"],char:'🦒',fitzpatrick_scale:false,category:"animals_and_nature"},elephant:{keywords:["animal","nature","nose","th","circus"],char:'🐘',fitzpatrick_scale:false,category:"animals_and_nature"},rhinoceros:{keywords:["animal","nature","horn"],char:'🦏',fitzpatrick_scale:false,category:"animals_and_nature"},goat:{keywords:["animal","nature"],char:'🐐',fitzpatrick_scale:false,category:"animals_and_nature"},ram:{keywords:["animal","sheep","nature"],char:'🐏',fitzpatrick_scale:false,category:"animals_and_nature"},sheep:{keywords:["animal","nature","wool","shipit"],char:'🐑',fitzpatrick_scale:false,category:"animals_and_nature"},racehorse:{keywords:["animal","gamble","luck"],char:'🐎',fitzpatrick_scale:false,category:"animals_and_nature"},pig2:{keywords:["animal","nature"],char:'🐖',fitzpatrick_scale:false,category:"animals_and_nature"},rat:{keywords:["animal","mouse","rodent"],char:'🐀',fitzpatrick_scale:false,category:"animals_and_nature"},mouse2:{keywords:["animal","nature","rodent"],char:'🐁',fitzpatrick_scale:false,category:"animals_and_nature"},rooster:{keywords:["animal","nature","chicken"],char:'🐓',fitzpatrick_scale:false,category:"animals_and_nature"},turkey:{keywords:["animal","bird"],char:'🦃',fitzpatrick_scale:false,category:"animals_and_nature"},dove:{keywords:["animal","bird"],char:'🕊',fitzpatrick_scale:false,category:"animals_and_nature"},dog2:{keywords:["animal","nature","friend","doge","pet","faithful"],char:'🐕',fitzpatrick_scale:false,category:"animals_and_nature"},poodle:{keywords:["dog","animal","101","nature","pet"],char:'🐩',fitzpatrick_scale:false,category:"animals_and_nature"},cat2:{keywords:["animal","meow","pet","cats"],char:'🐈',fitzpatrick_scale:false,category:"animals_and_nature"},rabbit2:{keywords:["animal","nature","pet","magic","spring"],char:'🐇',fitzpatrick_scale:false,category:"animals_and_nature"},chipmunk:{keywords:["animal","nature","rodent","squirrel"],char:'🐿',fitzpatrick_scale:false,category:"animals_and_nature"},hedgehog:{keywords:["animal","nature","spiny"],char:'🦔',fitzpatrick_scale:false,category:"animals_and_nature"},raccoon:{keywords:["animal","nature"],char:'🦝',fitzpatrick_scale:false,category:"animals_and_nature"},llama:{keywords:["animal","nature","alpaca"],char:'🦙',fitzpatrick_scale:false,category:"animals_and_nature"},hippopotamus:{keywords:["animal","nature"],char:'🦛',fitzpatrick_scale:false,category:"animals_and_nature"},kangaroo:{keywords:["animal","nature","australia","joey","hop","marsupial"],char:'🦘',fitzpatrick_scale:false,category:"animals_and_nature"},badger:{keywords:["animal","nature","honey"],char:'🦡',fitzpatrick_scale:false,category:"animals_and_nature"},swan:{keywords:["animal","nature","bird"],char:'🦢',fitzpatrick_scale:false,category:"animals_and_nature"},peacock:{keywords:["animal","nature","peahen","bird"],char:'🦚',fitzpatrick_scale:false,category:"animals_and_nature"},parrot:{keywords:["animal","nature","bird","pirate","talk"],char:'🦜',fitzpatrick_scale:false,category:"animals_and_nature"},lobster:{keywords:["animal","nature","bisque","claws","seafood"],char:'🦞',fitzpatrick_scale:false,category:"animals_and_nature"},mosquito:{keywords:["animal","nature","insect","malaria"],char:'🦟',fitzpatrick_scale:false,category:"animals_and_nature"},paw_prints:{keywords:["animal","tracking","footprints","dog","cat","pet","feet"],char:'🐾',fitzpatrick_scale:false,category:"animals_and_nature"},dragon:{keywords:["animal","myth","nature","chinese","green"],char:'🐉',fitzpatrick_scale:false,category:"animals_and_nature"},dragon_face:{keywords:["animal","myth","nature","chinese","green"],char:'🐲',fitzpatrick_scale:false,category:"animals_and_nature"},cactus:{keywords:["vegetable","plant","nature"],char:'🌵',fitzpatrick_scale:false,category:"animals_and_nature"},christmas_tree:{keywords:["festival","vacation","december","xmas","celebration"],char:'🎄',fitzpatrick_scale:false,category:"animals_and_nature"},evergreen_tree:{keywords:["plant","nature"],char:'🌲',fitzpatrick_scale:false,category:"animals_and_nature"},deciduous_tree:{keywords:["plant","nature"],char:'🌳',fitzpatrick_scale:false,category:"animals_and_nature"},palm_tree:{keywords:["plant","vegetable","nature","summer","beach","mojito","tropical"],char:'🌴',fitzpatrick_scale:false,category:"animals_and_nature"},seedling:{keywords:["plant","nature","grass","lawn","spring"],char:'🌱',fitzpatrick_scale:false,category:"animals_and_nature"},herb:{keywords:["vegetable","plant","medicine","weed","grass","lawn"],char:'🌿',fitzpatrick_scale:false,category:"animals_and_nature"},shamrock:{keywords:["vegetable","plant","nature","irish","clover"],char:'☘',fitzpatrick_scale:false,category:"animals_and_nature"},four_leaf_clover:{keywords:["vegetable","plant","nature","lucky","irish"],char:'🍀',fitzpatrick_scale:false,category:"animals_and_nature"},bamboo:{keywords:["plant","nature","vegetable","panda","pine_decoration"],char:'🎍',fitzpatrick_scale:false,category:"animals_and_nature"},tanabata_tree:{keywords:["plant","nature","branch","summer"],char:'🎋',fitzpatrick_scale:false,category:"animals_and_nature"},leaves:{keywords:["nature","plant","tree","vegetable","grass","lawn","spring"],char:'🍃',fitzpatrick_scale:false,category:"animals_and_nature"},fallen_leaf:{keywords:["nature","plant","vegetable","leaves"],char:'🍂',fitzpatrick_scale:false,category:"animals_and_nature"},maple_leaf:{keywords:["nature","plant","vegetable","ca","fall"],char:'🍁',fitzpatrick_scale:false,category:"animals_and_nature"},ear_of_rice:{keywords:["nature","plant"],char:'🌾',fitzpatrick_scale:false,category:"animals_and_nature"},hibiscus:{keywords:["plant","vegetable","flowers","beach"],char:'🌺',fitzpatrick_scale:false,category:"animals_and_nature"},sunflower:{keywords:["nature","plant","fall"],char:'🌻',fitzpatrick_scale:false,category:"animals_and_nature"},rose:{keywords:["flowers","valentines","love","spring"],char:'🌹',fitzpatrick_scale:false,category:"animals_and_nature"},wilted_flower:{keywords:["plant","nature","flower"],char:'🥀',fitzpatrick_scale:false,category:"animals_and_nature"},tulip:{keywords:["flowers","plant","nature","summer","spring"],char:'🌷',fitzpatrick_scale:false,category:"animals_and_nature"},blossom:{keywords:["nature","flowers","yellow"],char:'🌼',fitzpatrick_scale:false,category:"animals_and_nature"},cherry_blossom:{keywords:["nature","plant","spring","flower"],char:'🌸',fitzpatrick_scale:false,category:"animals_and_nature"},bouquet:{keywords:["flowers","nature","spring"],char:'💐',fitzpatrick_scale:false,category:"animals_and_nature"},mushroom:{keywords:["plant","vegetable"],char:'🍄',fitzpatrick_scale:false,category:"animals_and_nature"},chestnut:{keywords:["food","squirrel"],char:'🌰',fitzpatrick_scale:false,category:"animals_and_nature"},jack_o_lantern:{keywords:["halloween","light","pumpkin","creepy","fall"],char:'🎃',fitzpatrick_scale:false,category:"animals_and_nature"},shell:{keywords:["nature","sea","beach"],char:'🐚',fitzpatrick_scale:false,category:"animals_and_nature"},spider_web:{keywords:["animal","insect","arachnid","silk"],char:'🕸',fitzpatrick_scale:false,category:"animals_and_nature"},earth_americas:{keywords:["globe","world","USA","international"],char:'🌎',fitzpatrick_scale:false,category:"animals_and_nature"},earth_africa:{keywords:["globe","world","international"],char:'🌍',fitzpatrick_scale:false,category:"animals_and_nature"},earth_asia:{keywords:["globe","world","east","international"],char:'🌏',fitzpatrick_scale:false,category:"animals_and_nature"},full_moon:{keywords:["nature","yellow","twilight","planet","space","night","evening","sleep"],char:'🌕',fitzpatrick_scale:false,category:"animals_and_nature"},waning_gibbous_moon:{keywords:["nature","twilight","planet","space","night","evening","sleep","waxing_gibbous_moon"],char:'🌖',fitzpatrick_scale:false,category:"animals_and_nature"},last_quarter_moon:{keywords:["nature","twilight","planet","space","night","evening","sleep"],char:'🌗',fitzpatrick_scale:false,category:"animals_and_nature"},waning_crescent_moon:{keywords:["nature","twilight","planet","space","night","evening","sleep"],char:'🌘',fitzpatrick_scale:false,category:"animals_and_nature"},new_moon:{keywords:["nature","twilight","planet","space","night","evening","sleep"],char:'🌑',fitzpatrick_scale:false,category:"animals_and_nature"},waxing_crescent_moon:{keywords:["nature","twilight","planet","space","night","evening","sleep"],char:'🌒',fitzpatrick_scale:false,category:"animals_and_nature"},first_quarter_moon:{keywords:["nature","twilight","planet","space","night","evening","sleep"],char:'🌓',fitzpatrick_scale:false,category:"animals_and_nature"},waxing_gibbous_moon:{keywords:["nature","night","sky","gray","twilight","planet","space","evening","sleep"],char:'🌔',fitzpatrick_scale:false,category:"animals_and_nature"},new_moon_with_face:{keywords:["nature","twilight","planet","space","night","evening","sleep"],char:'🌚',fitzpatrick_scale:false,category:"animals_and_nature"},full_moon_with_face:{keywords:["nature","twilight","planet","space","night","evening","sleep"],char:'🌝',fitzpatrick_scale:false,category:"animals_and_nature"},first_quarter_moon_with_face:{keywords:["nature","twilight","planet","space","night","evening","sleep"],char:'🌛',fitzpatrick_scale:false,category:"animals_and_nature"},last_quarter_moon_with_face:{keywords:["nature","twilight","planet","space","night","evening","sleep"],char:'🌜',fitzpatrick_scale:false,category:"animals_and_nature"},sun_with_face:{keywords:["nature","morning","sky"],char:'🌞',fitzpatrick_scale:false,category:"animals_and_nature"},crescent_moon:{keywords:["night","sleep","sky","evening","magic"],char:'🌙',fitzpatrick_scale:false,category:"animals_and_nature"},star:{keywords:["night","yellow"],char:'⭐',fitzpatrick_scale:false,category:"animals_and_nature"},star2:{keywords:["night","sparkle","awesome","good","magic"],char:'🌟',fitzpatrick_scale:false,category:"animals_and_nature"},dizzy:{keywords:["star","sparkle","shoot","magic"],char:'💫',fitzpatrick_scale:false,category:"animals_and_nature"},sparkles:{keywords:["stars","shine","shiny","cool","awesome","good","magic"],char:'✨',fitzpatrick_scale:false,category:"animals_and_nature"},comet:{keywords:["space"],char:'☄',fitzpatrick_scale:false,category:"animals_and_nature"},sunny:{keywords:["weather","nature","brightness","summer","beach","spring"],char:'☀️',fitzpatrick_scale:false,category:"animals_and_nature"},sun_behind_small_cloud:{keywords:["weather"],char:'🌤',fitzpatrick_scale:false,category:"animals_and_nature"},partly_sunny:{keywords:["weather","nature","cloudy","morning","fall","spring"],char:'⛅',fitzpatrick_scale:false,category:"animals_and_nature"},sun_behind_large_cloud:{keywords:["weather"],char:'🌥',fitzpatrick_scale:false,category:"animals_and_nature"},sun_behind_rain_cloud:{keywords:["weather"],char:'🌦',fitzpatrick_scale:false,category:"animals_and_nature"},cloud:{keywords:["weather","sky"],char:'☁️',fitzpatrick_scale:false,category:"animals_and_nature"},cloud_with_rain:{keywords:["weather"],char:'🌧',fitzpatrick_scale:false,category:"animals_and_nature"},cloud_with_lightning_and_rain:{keywords:["weather","lightning"],char:'⛈',fitzpatrick_scale:false,category:"animals_and_nature"},cloud_with_lightning:{keywords:["weather","thunder"],char:'🌩',fitzpatrick_scale:false,category:"animals_and_nature"},zap:{keywords:["thunder","weather","lightning bolt","fast"],char:'⚡',fitzpatrick_scale:false,category:"animals_and_nature"},fire:{keywords:["hot","cook","flame"],char:'🔥',fitzpatrick_scale:false,category:"animals_and_nature"},boom:{keywords:["bomb","explode","explosion","collision","blown"],char:'💥',fitzpatrick_scale:false,category:"animals_and_nature"},snowflake:{keywords:["winter","season","cold","weather","christmas","xmas"],char:'❄️',fitzpatrick_scale:false,category:"animals_and_nature"},cloud_with_snow:{keywords:["weather"],char:'🌨',fitzpatrick_scale:false,category:"animals_and_nature"},snowman:{keywords:["winter","season","cold","weather","christmas","xmas","frozen","without_snow"],char:'⛄',fitzpatrick_scale:false,category:"animals_and_nature"},snowman_with_snow:{keywords:["winter","season","cold","weather","christmas","xmas","frozen"],char:'☃',fitzpatrick_scale:false,category:"animals_and_nature"},wind_face:{keywords:["gust","air"],char:'🌬',fitzpatrick_scale:false,category:"animals_and_nature"},dash:{keywords:["wind","air","fast","shoo","fart","smoke","puff"],char:'💨',fitzpatrick_scale:false,category:"animals_and_nature"},tornado:{keywords:["weather","cyclone","twister"],char:'🌪',fitzpatrick_scale:false,category:"animals_and_nature"},fog:{keywords:["weather"],char:'🌫',fitzpatrick_scale:false,category:"animals_and_nature"},open_umbrella:{keywords:["weather","spring"],char:'☂',fitzpatrick_scale:false,category:"animals_and_nature"},umbrella:{keywords:["rainy","weather","spring"],char:'☔',fitzpatrick_scale:false,category:"animals_and_nature"},droplet:{keywords:["water","drip","faucet","spring"],char:'💧',fitzpatrick_scale:false,category:"animals_and_nature"},sweat_drops:{keywords:["water","drip","oops"],char:'💦',fitzpatrick_scale:false,category:"animals_and_nature"},ocean:{keywords:["sea","water","wave","nature","tsunami","disaster"],char:'🌊',fitzpatrick_scale:false,category:"animals_and_nature"},green_apple:{keywords:["fruit","nature"],char:'🍏',fitzpatrick_scale:false,category:"food_and_drink"},apple:{keywords:["fruit","mac","school"],char:'🍎',fitzpatrick_scale:false,category:"food_and_drink"},pear:{keywords:["fruit","nature","food"],char:'🍐',fitzpatrick_scale:false,category:"food_and_drink"},tangerine:{keywords:["food","fruit","nature","orange"],char:'🍊',fitzpatrick_scale:false,category:"food_and_drink"},lemon:{keywords:["fruit","nature"],char:'🍋',fitzpatrick_scale:false,category:"food_and_drink"},banana:{keywords:["fruit","food","monkey"],char:'🍌',fitzpatrick_scale:false,category:"food_and_drink"},watermelon:{keywords:["fruit","food","picnic","summer"],char:'🍉',fitzpatrick_scale:false,category:"food_and_drink"},grapes:{keywords:["fruit","food","wine"],char:'🍇',fitzpatrick_scale:false,category:"food_and_drink"},strawberry:{keywords:["fruit","food","nature"],char:'🍓',fitzpatrick_scale:false,category:"food_and_drink"},melon:{keywords:["fruit","nature","food"],char:'🍈',fitzpatrick_scale:false,category:"food_and_drink"},cherries:{keywords:["food","fruit"],char:'🍒',fitzpatrick_scale:false,category:"food_and_drink"},peach:{keywords:["fruit","nature","food"],char:'🍑',fitzpatrick_scale:false,category:"food_and_drink"},pineapple:{keywords:["fruit","nature","food"],char:'🍍',fitzpatrick_scale:false,category:"food_and_drink"},coconut:{keywords:["fruit","nature","food","palm"],char:'🥥',fitzpatrick_scale:false,category:"food_and_drink"},kiwi_fruit:{keywords:["fruit","food"],char:'🥝',fitzpatrick_scale:false,category:"food_and_drink"},mango:{keywords:["fruit","food","tropical"],char:'🥭',fitzpatrick_scale:false,category:"food_and_drink"},avocado:{keywords:["fruit","food"],char:'🥑',fitzpatrick_scale:false,category:"food_and_drink"},broccoli:{keywords:["fruit","food","vegetable"],char:'🥦',fitzpatrick_scale:false,category:"food_and_drink"},tomato:{keywords:["fruit","vegetable","nature","food"],char:'🍅',fitzpatrick_scale:false,category:"food_and_drink"},eggplant:{keywords:["vegetable","nature","food","aubergine"],char:'🍆',fitzpatrick_scale:false,category:"food_and_drink"},cucumber:{keywords:["fruit","food","pickle"],char:'🥒',fitzpatrick_scale:false,category:"food_and_drink"},carrot:{keywords:["vegetable","food","orange"],char:'🥕',fitzpatrick_scale:false,category:"food_and_drink"},hot_pepper:{keywords:["food","spicy","chilli","chili"],char:'🌶',fitzpatrick_scale:false,category:"food_and_drink"},potato:{keywords:["food","tuber","vegatable","starch"],char:'🥔',fitzpatrick_scale:false,category:"food_and_drink"},corn:{keywords:["food","vegetable","plant"],char:'🌽',fitzpatrick_scale:false,category:"food_and_drink"},leafy_greens:{keywords:["food","vegetable","plant","bok choy","cabbage","kale","lettuce"],char:'🥬',fitzpatrick_scale:false,category:"food_and_drink"},sweet_potato:{keywords:["food","nature"],char:'🍠',fitzpatrick_scale:false,category:"food_and_drink"},peanuts:{keywords:["food","nut"],char:'🥜',fitzpatrick_scale:false,category:"food_and_drink"},honey_pot:{keywords:["bees","sweet","kitchen"],char:'🍯',fitzpatrick_scale:false,category:"food_and_drink"},croissant:{keywords:["food","bread","french"],char:'🥐',fitzpatrick_scale:false,category:"food_and_drink"},bread:{keywords:["food","wheat","breakfast","toast"],char:'🍞',fitzpatrick_scale:false,category:"food_and_drink"},baguette_bread:{keywords:["food","bread","french"],char:'🥖',fitzpatrick_scale:false,category:"food_and_drink"},bagel:{keywords:["food","bread","bakery","schmear"],char:'🥯',fitzpatrick_scale:false,category:"food_and_drink"},pretzel:{keywords:["food","bread","twisted"],char:'🥨',fitzpatrick_scale:false,category:"food_and_drink"},cheese:{keywords:["food","chadder"],char:'🧀',fitzpatrick_scale:false,category:"food_and_drink"},egg:{keywords:["food","chicken","breakfast"],char:'🥚',fitzpatrick_scale:false,category:"food_and_drink"},bacon:{keywords:["food","breakfast","pork","pig","meat"],char:'🥓',fitzpatrick_scale:false,category:"food_and_drink"},steak:{keywords:["food","cow","meat","cut","chop","lambchop","porkchop"],char:'🥩',fitzpatrick_scale:false,category:"food_and_drink"},pancakes:{keywords:["food","breakfast","flapjacks","hotcakes"],char:'🥞',fitzpatrick_scale:false,category:"food_and_drink"},poultry_leg:{keywords:["food","meat","drumstick","bird","chicken","turkey"],char:'🍗',fitzpatrick_scale:false,category:"food_and_drink"},meat_on_bone:{keywords:["good","food","drumstick"],char:'🍖',fitzpatrick_scale:false,category:"food_and_drink"},bone:{keywords:["skeleton"],char:'🦴',fitzpatrick_scale:false,category:"food_and_drink"},fried_shrimp:{keywords:["food","animal","appetizer","summer"],char:'🍤',fitzpatrick_scale:false,category:"food_and_drink"},fried_egg:{keywords:["food","breakfast","kitchen","egg"],char:'🍳',fitzpatrick_scale:false,category:"food_and_drink"},hamburger:{keywords:["meat","fast food","beef","cheeseburger","mcdonalds","burger king"],char:'🍔',fitzpatrick_scale:false,category:"food_and_drink"},fries:{keywords:["chips","snack","fast food"],char:'🍟',fitzpatrick_scale:false,category:"food_and_drink"},stuffed_flatbread:{keywords:["food","flatbread","stuffed","gyro"],char:'🥙',fitzpatrick_scale:false,category:"food_and_drink"},hotdog:{keywords:["food","frankfurter"],char:'🌭',fitzpatrick_scale:false,category:"food_and_drink"},pizza:{keywords:["food","party"],char:'🍕',fitzpatrick_scale:false,category:"food_and_drink"},sandwich:{keywords:["food","lunch","bread"],char:'🥪',fitzpatrick_scale:false,category:"food_and_drink"},canned_food:{keywords:["food","soup"],char:'🥫',fitzpatrick_scale:false,category:"food_and_drink"},spaghetti:{keywords:["food","italian","noodle"],char:'🍝',fitzpatrick_scale:false,category:"food_and_drink"},taco:{keywords:["food","mexican"],char:'🌮',fitzpatrick_scale:false,category:"food_and_drink"},burrito:{keywords:["food","mexican"],char:'🌯',fitzpatrick_scale:false,category:"food_and_drink"},green_salad:{keywords:["food","healthy","lettuce"],char:'🥗',fitzpatrick_scale:false,category:"food_and_drink"},shallow_pan_of_food:{keywords:["food","cooking","casserole","paella"],char:'🥘',fitzpatrick_scale:false,category:"food_and_drink"},ramen:{keywords:["food","japanese","noodle","chopsticks"],char:'🍜',fitzpatrick_scale:false,category:"food_and_drink"},stew:{keywords:["food","meat","soup"],char:'🍲',fitzpatrick_scale:false,category:"food_and_drink"},fish_cake:{keywords:["food","japan","sea","beach","narutomaki","pink","swirl","kamaboko","surimi","ramen"],char:'🍥',fitzpatrick_scale:false,category:"food_and_drink"},fortune_cookie:{keywords:["food","prophecy"],char:'🥠',fitzpatrick_scale:false,category:"food_and_drink"},sushi:{keywords:["food","fish","japanese","rice"],char:'🍣',fitzpatrick_scale:false,category:"food_and_drink"},bento:{keywords:["food","japanese","box"],char:'🍱',fitzpatrick_scale:false,category:"food_and_drink"},curry:{keywords:["food","spicy","hot","indian"],char:'🍛',fitzpatrick_scale:false,category:"food_and_drink"},rice_ball:{keywords:["food","japanese"],char:'🍙',fitzpatrick_scale:false,category:"food_and_drink"},rice:{keywords:["food","china","asian"],char:'🍚',fitzpatrick_scale:false,category:"food_and_drink"},rice_cracker:{keywords:["food","japanese"],char:'🍘',fitzpatrick_scale:false,category:"food_and_drink"},oden:{keywords:["food","japanese"],char:'🍢',fitzpatrick_scale:false,category:"food_and_drink"},dango:{keywords:["food","dessert","sweet","japanese","barbecue","meat"],char:'🍡',fitzpatrick_scale:false,category:"food_and_drink"},shaved_ice:{keywords:["hot","dessert","summer"],char:'🍧',fitzpatrick_scale:false,category:"food_and_drink"},ice_cream:{keywords:["food","hot","dessert"],char:'🍨',fitzpatrick_scale:false,category:"food_and_drink"},icecream:{keywords:["food","hot","dessert","summer"],char:'🍦',fitzpatrick_scale:false,category:"food_and_drink"},pie:{keywords:["food","dessert","pastry"],char:'🥧',fitzpatrick_scale:false,category:"food_and_drink"},cake:{keywords:["food","dessert"],char:'🍰',fitzpatrick_scale:false,category:"food_and_drink"},cupcake:{keywords:["food","dessert","bakery","sweet"],char:'🧁',fitzpatrick_scale:false,category:"food_and_drink"},moon_cake:{keywords:["food","autumn"],char:'🥮',fitzpatrick_scale:false,category:"food_and_drink"},birthday:{keywords:["food","dessert","cake"],char:'🎂',fitzpatrick_scale:false,category:"food_and_drink"},custard:{keywords:["dessert","food"],char:'🍮',fitzpatrick_scale:false,category:"food_and_drink"},candy:{keywords:["snack","dessert","sweet","lolly"],char:'🍬',fitzpatrick_scale:false,category:"food_and_drink"},lollipop:{keywords:["food","snack","candy","sweet"],char:'🍭',fitzpatrick_scale:false,category:"food_and_drink"},chocolate_bar:{keywords:["food","snack","dessert","sweet"],char:'🍫',fitzpatrick_scale:false,category:"food_and_drink"},popcorn:{keywords:["food","movie theater","films","snack"],char:'🍿',fitzpatrick_scale:false,category:"food_and_drink"},dumpling:{keywords:["food","empanada","pierogi","potsticker"],char:'🥟',fitzpatrick_scale:false,category:"food_and_drink"},doughnut:{keywords:["food","dessert","snack","sweet","donut"],char:'🍩',fitzpatrick_scale:false,category:"food_and_drink"},cookie:{keywords:["food","snack","oreo","chocolate","sweet","dessert"],char:'🍪',fitzpatrick_scale:false,category:"food_and_drink"},milk_glass:{keywords:["beverage","drink","cow"],char:'🥛',fitzpatrick_scale:false,category:"food_and_drink"},beer:{keywords:["relax","beverage","drink","drunk","party","pub","summer","alcohol","booze"],char:'🍺',fitzpatrick_scale:false,category:"food_and_drink"},beers:{keywords:["relax","beverage","drink","drunk","party","pub","summer","alcohol","booze"],char:'🍻',fitzpatrick_scale:false,category:"food_and_drink"},clinking_glasses:{keywords:["beverage","drink","party","alcohol","celebrate","cheers","wine","champagne","toast"],char:'🥂',fitzpatrick_scale:false,category:"food_and_drink"},wine_glass:{keywords:["drink","beverage","drunk","alcohol","booze"],char:'🍷',fitzpatrick_scale:false,category:"food_and_drink"},tumbler_glass:{keywords:["drink","beverage","drunk","alcohol","liquor","booze","bourbon","scotch","whisky","glass","shot"],char:'🥃',fitzpatrick_scale:false,category:"food_and_drink"},cocktail:{keywords:["drink","drunk","alcohol","beverage","booze","mojito"],char:'🍸',fitzpatrick_scale:false,category:"food_and_drink"},tropical_drink:{keywords:["beverage","cocktail","summer","beach","alcohol","booze","mojito"],char:'🍹',fitzpatrick_scale:false,category:"food_and_drink"},champagne:{keywords:["drink","wine","bottle","celebration"],char:'🍾',fitzpatrick_scale:false,category:"food_and_drink"},sake:{keywords:["wine","drink","drunk","beverage","japanese","alcohol","booze"],char:'🍶',fitzpatrick_scale:false,category:"food_and_drink"},tea:{keywords:["drink","bowl","breakfast","green","british"],char:'🍵',fitzpatrick_scale:false,category:"food_and_drink"},cup_with_straw:{keywords:["drink","soda"],char:'🥤',fitzpatrick_scale:false,category:"food_and_drink"},coffee:{keywords:["beverage","caffeine","latte","espresso"],char:'☕',fitzpatrick_scale:false,category:"food_and_drink"},baby_bottle:{keywords:["food","container","milk"],char:'🍼',fitzpatrick_scale:false,category:"food_and_drink"},salt:{keywords:["condiment","shaker"],char:'🧂',fitzpatrick_scale:false,category:"food_and_drink"},spoon:{keywords:["cutlery","kitchen","tableware"],char:'🥄',fitzpatrick_scale:false,category:"food_and_drink"},fork_and_knife:{keywords:["cutlery","kitchen"],char:'🍴',fitzpatrick_scale:false,category:"food_and_drink"},plate_with_cutlery:{keywords:["food","eat","meal","lunch","dinner","restaurant"],char:'🍽',fitzpatrick_scale:false,category:"food_and_drink"},bowl_with_spoon:{keywords:["food","breakfast","cereal","oatmeal","porridge"],char:'🥣',fitzpatrick_scale:false,category:"food_and_drink"},takeout_box:{keywords:["food","leftovers"],char:'🥡',fitzpatrick_scale:false,category:"food_and_drink"},chopsticks:{keywords:["food"],char:'🥢',fitzpatrick_scale:false,category:"food_and_drink"},soccer:{keywords:["sports","football"],char:'⚽',fitzpatrick_scale:false,category:"activity"},basketball:{keywords:["sports","balls","NBA"],char:'🏀',fitzpatrick_scale:false,category:"activity"},football:{keywords:["sports","balls","NFL"],char:'🏈',fitzpatrick_scale:false,category:"activity"},baseball:{keywords:["sports","balls"],char:'⚾',fitzpatrick_scale:false,category:"activity"},softball:{keywords:["sports","balls"],char:'🥎',fitzpatrick_scale:false,category:"activity"},tennis:{keywords:["sports","balls","green"],char:'🎾',fitzpatrick_scale:false,category:"activity"},volleyball:{keywords:["sports","balls"],char:'🏐',fitzpatrick_scale:false,category:"activity"},rugby_football:{keywords:["sports","team"],char:'🏉',fitzpatrick_scale:false,category:"activity"},flying_disc:{keywords:["sports","frisbee","ultimate"],char:'🥏',fitzpatrick_scale:false,category:"activity"},"8ball":{keywords:["pool","hobby","game","luck","magic"],char:'🎱',fitzpatrick_scale:false,category:"activity"},golf:{keywords:["sports","business","flag","hole","summer"],char:'⛳',fitzpatrick_scale:false,category:"activity"},golfing_woman:{keywords:["sports","business","woman","female"],char:'🏌️‍♀️',fitzpatrick_scale:false,category:"activity"},golfing_man:{keywords:["sports","business"],char:'🏌',fitzpatrick_scale:true,category:"activity"},ping_pong:{keywords:["sports","pingpong"],char:'🏓',fitzpatrick_scale:false,category:"activity"},badminton:{keywords:["sports"],char:'🏸',fitzpatrick_scale:false,category:"activity"},goal_net:{keywords:["sports"],char:'🥅',fitzpatrick_scale:false,category:"activity"},ice_hockey:{keywords:["sports"],char:'🏒',fitzpatrick_scale:false,category:"activity"},field_hockey:{keywords:["sports"],char:'🏑',fitzpatrick_scale:false,category:"activity"},lacrosse:{keywords:["sports","ball","stick"],char:'🥍',fitzpatrick_scale:false,category:"activity"},cricket:{keywords:["sports"],char:'🏏',fitzpatrick_scale:false,category:"activity"},ski:{keywords:["sports","winter","cold","snow"],char:'🎿',fitzpatrick_scale:false,category:"activity"},skier:{keywords:["sports","winter","snow"],char:'⛷',fitzpatrick_scale:false,category:"activity"},snowboarder:{keywords:["sports","winter"],char:'🏂',fitzpatrick_scale:true,category:"activity"},person_fencing:{keywords:["sports","fencing","sword"],char:'🤺',fitzpatrick_scale:false,category:"activity"},women_wrestling:{keywords:["sports","wrestlers"],char:'🤼‍♀️',fitzpatrick_scale:false,category:"activity"},men_wrestling:{keywords:["sports","wrestlers"],char:'🤼‍♂️',fitzpatrick_scale:false,category:"activity"},woman_cartwheeling:{keywords:["gymnastics"],char:'🤸‍♀️',fitzpatrick_scale:true,category:"activity"},man_cartwheeling:{keywords:["gymnastics"],char:'🤸‍♂️',fitzpatrick_scale:true,category:"activity"},woman_playing_handball:{keywords:["sports"],char:'🤾‍♀️',fitzpatrick_scale:true,category:"activity"},man_playing_handball:{keywords:["sports"],char:'🤾‍♂️',fitzpatrick_scale:true,category:"activity"},ice_skate:{keywords:["sports"],char:'⛸',fitzpatrick_scale:false,category:"activity"},curling_stone:{keywords:["sports"],char:'🥌',fitzpatrick_scale:false,category:"activity"},skateboard:{keywords:["board"],char:'🛹',fitzpatrick_scale:false,category:"activity"},sled:{keywords:["sleigh","luge","toboggan"],char:'🛷',fitzpatrick_scale:false,category:"activity"},bow_and_arrow:{keywords:["sports"],char:'🏹',fitzpatrick_scale:false,category:"activity"},fishing_pole_and_fish:{keywords:["food","hobby","summer"],char:'🎣',fitzpatrick_scale:false,category:"activity"},boxing_glove:{keywords:["sports","fighting"],char:'🥊',fitzpatrick_scale:false,category:"activity"},martial_arts_uniform:{keywords:["judo","karate","taekwondo"],char:'🥋',fitzpatrick_scale:false,category:"activity"},rowing_woman:{keywords:["sports","hobby","water","ship","woman","female"],char:'🚣‍♀️',fitzpatrick_scale:true,category:"activity"},rowing_man:{keywords:["sports","hobby","water","ship"],char:'🚣',fitzpatrick_scale:true,category:"activity"},climbing_woman:{keywords:["sports","hobby","woman","female","rock"],char:'🧗‍♀️',fitzpatrick_scale:true,category:"activity"},climbing_man:{keywords:["sports","hobby","man","male","rock"],char:'🧗‍♂️',fitzpatrick_scale:true,category:"activity"},swimming_woman:{keywords:["sports","exercise","human","athlete","water","summer","woman","female"],char:'🏊‍♀️',fitzpatrick_scale:true,category:"activity"},swimming_man:{keywords:["sports","exercise","human","athlete","water","summer"],char:'🏊',fitzpatrick_scale:true,category:"activity"},woman_playing_water_polo:{keywords:["sports","pool"],char:'🤽‍♀️',fitzpatrick_scale:true,category:"activity"},man_playing_water_polo:{keywords:["sports","pool"],char:'🤽‍♂️',fitzpatrick_scale:true,category:"activity"},woman_in_lotus_position:{keywords:["woman","female","meditation","yoga","serenity","zen","mindfulness"],char:'🧘‍♀️',fitzpatrick_scale:true,category:"activity"},man_in_lotus_position:{keywords:["man","male","meditation","yoga","serenity","zen","mindfulness"],char:'🧘‍♂️',fitzpatrick_scale:true,category:"activity"},surfing_woman:{keywords:["sports","ocean","sea","summer","beach","woman","female"],char:'🏄‍♀️',fitzpatrick_scale:true,category:"activity"},surfing_man:{keywords:["sports","ocean","sea","summer","beach"],char:'🏄',fitzpatrick_scale:true,category:"activity"},bath:{keywords:["clean","shower","bathroom"],char:'🛀',fitzpatrick_scale:true,category:"activity"},basketball_woman:{keywords:["sports","human","woman","female"],char:'⛹️‍♀️',fitzpatrick_scale:true,category:"activity"},basketball_man:{keywords:["sports","human"],char:'⛹',fitzpatrick_scale:true,category:"activity"},weight_lifting_woman:{keywords:["sports","training","exercise","woman","female"],char:'🏋️‍♀️',fitzpatrick_scale:true,category:"activity"},weight_lifting_man:{keywords:["sports","training","exercise"],char:'🏋',fitzpatrick_scale:true,category:"activity"},biking_woman:{keywords:["sports","bike","exercise","hipster","woman","female"],char:'🚴‍♀️',fitzpatrick_scale:true,category:"activity"},biking_man:{keywords:["sports","bike","exercise","hipster"],char:'🚴',fitzpatrick_scale:true,category:"activity"},mountain_biking_woman:{keywords:["transportation","sports","human","race","bike","woman","female"],char:'🚵‍♀️',fitzpatrick_scale:true,category:"activity"},mountain_biking_man:{keywords:["transportation","sports","human","race","bike"],char:'🚵',fitzpatrick_scale:true,category:"activity"},horse_racing:{keywords:["animal","betting","competition","gambling","luck"],char:'🏇',fitzpatrick_scale:true,category:"activity"},business_suit_levitating:{keywords:["suit","business","levitate","hover","jump"],char:'🕴',fitzpatrick_scale:true,category:"activity"},trophy:{keywords:["win","award","contest","place","ftw","ceremony"],char:'🏆',fitzpatrick_scale:false,category:"activity"},running_shirt_with_sash:{keywords:["play","pageant"],char:'🎽',fitzpatrick_scale:false,category:"activity"},medal_sports:{keywords:["award","winning"],char:'🏅',fitzpatrick_scale:false,category:"activity"},medal_military:{keywords:["award","winning","army"],char:'🎖',fitzpatrick_scale:false,category:"activity"},"1st_place_medal":{keywords:["award","winning","first"],char:'🥇',fitzpatrick_scale:false,category:"activity"},"2nd_place_medal":{keywords:["award","second"],char:'🥈',fitzpatrick_scale:false,category:"activity"},"3rd_place_medal":{keywords:["award","third"],char:'🥉',fitzpatrick_scale:false,category:"activity"},reminder_ribbon:{keywords:["sports","cause","support","awareness"],char:'🎗',fitzpatrick_scale:false,category:"activity"},rosette:{keywords:["flower","decoration","military"],char:'🏵',fitzpatrick_scale:false,category:"activity"},ticket:{keywords:["event","concert","pass"],char:'🎫',fitzpatrick_scale:false,category:"activity"},tickets:{keywords:["sports","concert","entrance"],char:'🎟',fitzpatrick_scale:false,category:"activity"},performing_arts:{keywords:["acting","theater","drama"],char:'🎭',fitzpatrick_scale:false,category:"activity"},art:{keywords:["design","paint","draw","colors"],char:'🎨',fitzpatrick_scale:false,category:"activity"},circus_tent:{keywords:["festival","carnival","party"],char:'🎪',fitzpatrick_scale:false,category:"activity"},woman_juggling:{keywords:["juggle","balance","skill","multitask"],char:'🤹‍♀️',fitzpatrick_scale:true,category:"activity"},man_juggling:{keywords:["juggle","balance","skill","multitask"],char:'🤹‍♂️',fitzpatrick_scale:true,category:"activity"},microphone:{keywords:["sound","music","PA","sing","talkshow"],char:'🎤',fitzpatrick_scale:false,category:"activity"},headphones:{keywords:["music","score","gadgets"],char:'🎧',fitzpatrick_scale:false,category:"activity"},musical_score:{keywords:["treble","clef","compose"],char:'🎼',fitzpatrick_scale:false,category:"activity"},musical_keyboard:{keywords:["piano","instrument","compose"],char:'🎹',fitzpatrick_scale:false,category:"activity"},drum:{keywords:["music","instrument","drumsticks","snare"],char:'🥁',fitzpatrick_scale:false,category:"activity"},saxophone:{keywords:["music","instrument","jazz","blues"],char:'🎷',fitzpatrick_scale:false,category:"activity"},trumpet:{keywords:["music","brass"],char:'🎺',fitzpatrick_scale:false,category:"activity"},guitar:{keywords:["music","instrument"],char:'🎸',fitzpatrick_scale:false,category:"activity"},violin:{keywords:["music","instrument","orchestra","symphony"],char:'🎻',fitzpatrick_scale:false,category:"activity"},clapper:{keywords:["movie","film","record"],char:'🎬',fitzpatrick_scale:false,category:"activity"},video_game:{keywords:["play","console","PS4","controller"],char:'🎮',fitzpatrick_scale:false,category:"activity"},space_invader:{keywords:["game","arcade","play"],char:'👾',fitzpatrick_scale:false,category:"activity"},dart:{keywords:["game","play","bar","target","bullseye"],char:'🎯',fitzpatrick_scale:false,category:"activity"},game_die:{keywords:["dice","random","tabletop","play","luck"],char:'🎲',fitzpatrick_scale:false,category:"activity"},chess_pawn:{keywords:["expendable"],char:"♟",fitzpatrick_scale:false,category:"activity"},slot_machine:{keywords:["bet","gamble","vegas","fruit machine","luck","casino"],char:'🎰',fitzpatrick_scale:false,category:"activity"},jigsaw:{keywords:["interlocking","puzzle","piece"],char:'🧩',fitzpatrick_scale:false,category:"activity"},bowling:{keywords:["sports","fun","play"],char:'🎳',fitzpatrick_scale:false,category:"activity"},red_car:{keywords:["red","transportation","vehicle"],char:'🚗',fitzpatrick_scale:false,category:"travel_and_places"},taxi:{keywords:["uber","vehicle","cars","transportation"],char:'🚕',fitzpatrick_scale:false,category:"travel_and_places"},blue_car:{keywords:["transportation","vehicle"],char:'🚙',fitzpatrick_scale:false,category:"travel_and_places"},bus:{keywords:["car","vehicle","transportation"],char:'🚌',fitzpatrick_scale:false,category:"travel_and_places"},trolleybus:{keywords:["bart","transportation","vehicle"],char:'🚎',fitzpatrick_scale:false,category:"travel_and_places"},racing_car:{keywords:["sports","race","fast","formula","f1"],char:'🏎',fitzpatrick_scale:false,category:"travel_and_places"},police_car:{keywords:["vehicle","cars","transportation","law","legal","enforcement"],char:'🚓',fitzpatrick_scale:false,category:"travel_and_places"},ambulance:{keywords:["health","911","hospital"],char:'🚑',fitzpatrick_scale:false,category:"travel_and_places"},fire_engine:{keywords:["transportation","cars","vehicle"],char:'🚒',fitzpatrick_scale:false,category:"travel_and_places"},minibus:{keywords:["vehicle","car","transportation"],char:'🚐',fitzpatrick_scale:false,category:"travel_and_places"},truck:{keywords:["cars","transportation"],char:'🚚',fitzpatrick_scale:false,category:"travel_and_places"},articulated_lorry:{keywords:["vehicle","cars","transportation","express"],char:'🚛',fitzpatrick_scale:false,category:"travel_and_places"},tractor:{keywords:["vehicle","car","farming","agriculture"],char:'🚜',fitzpatrick_scale:false,category:"travel_and_places"},kick_scooter:{keywords:["vehicle","kick","razor"],char:'🛴',fitzpatrick_scale:false,category:"travel_and_places"},motorcycle:{keywords:["race","sports","fast"],char:'🏍',fitzpatrick_scale:false,category:"travel_and_places"},bike:{keywords:["sports","bicycle","exercise","hipster"],char:'🚲',fitzpatrick_scale:false,category:"travel_and_places"},motor_scooter:{keywords:["vehicle","vespa","sasha"],char:'🛵',fitzpatrick_scale:false,category:"travel_and_places"},rotating_light:{keywords:["police","ambulance","911","emergency","alert","error","pinged","law","legal"],char:'🚨',fitzpatrick_scale:false,category:"travel_and_places"},oncoming_police_car:{keywords:["vehicle","law","legal","enforcement","911"],char:'🚔',fitzpatrick_scale:false,category:"travel_and_places"},oncoming_bus:{keywords:["vehicle","transportation"],char:'🚍',fitzpatrick_scale:false,category:"travel_and_places"},oncoming_automobile:{keywords:["car","vehicle","transportation"],char:'🚘',fitzpatrick_scale:false,category:"travel_and_places"},oncoming_taxi:{keywords:["vehicle","cars","uber"],char:'🚖',fitzpatrick_scale:false,category:"travel_and_places"},aerial_tramway:{keywords:["transportation","vehicle","ski"],char:'🚡',fitzpatrick_scale:false,category:"travel_and_places"},mountain_cableway:{keywords:["transportation","vehicle","ski"],char:'🚠',fitzpatrick_scale:false,category:"travel_and_places"},suspension_railway:{keywords:["vehicle","transportation"],char:'🚟',fitzpatrick_scale:false,category:"travel_and_places"},railway_car:{keywords:["transportation","vehicle"],char:'🚃',fitzpatrick_scale:false,category:"travel_and_places"},train:{keywords:["transportation","vehicle","carriage","public","travel"],char:'🚋',fitzpatrick_scale:false,category:"travel_and_places"},monorail:{keywords:["transportation","vehicle"],char:'🚝',fitzpatrick_scale:false,category:"travel_and_places"},bullettrain_side:{keywords:["transportation","vehicle"],char:'🚄',fitzpatrick_scale:false,category:"travel_and_places"},bullettrain_front:{keywords:["transportation","vehicle","speed","fast","public","travel"],char:'🚅',fitzpatrick_scale:false,category:"travel_and_places"},light_rail:{keywords:["transportation","vehicle"],char:'🚈',fitzpatrick_scale:false,category:"travel_and_places"},mountain_railway:{keywords:["transportation","vehicle"],char:'🚞',fitzpatrick_scale:false,category:"travel_and_places"},steam_locomotive:{keywords:["transportation","vehicle","train"],char:'🚂',fitzpatrick_scale:false,category:"travel_and_places"},train2:{keywords:["transportation","vehicle"],char:'🚆',fitzpatrick_scale:false,category:"travel_and_places"},metro:{keywords:["transportation","blue-square","mrt","underground","tube"],char:'🚇',fitzpatrick_scale:false,category:"travel_and_places"},tram:{keywords:["transportation","vehicle"],char:'🚊',fitzpatrick_scale:false,category:"travel_and_places"},station:{keywords:["transportation","vehicle","public"],char:'🚉',fitzpatrick_scale:false,category:"travel_and_places"},flying_saucer:{keywords:["transportation","vehicle","ufo"],char:'🛸',fitzpatrick_scale:false,category:"travel_and_places"},helicopter:{keywords:["transportation","vehicle","fly"],char:'🚁',fitzpatrick_scale:false,category:"travel_and_places"},small_airplane:{keywords:["flight","transportation","fly","vehicle"],char:'🛩',fitzpatrick_scale:false,category:"travel_and_places"},airplane:{keywords:["vehicle","transportation","flight","fly"],char:'✈️',fitzpatrick_scale:false,category:"travel_and_places"},flight_departure:{keywords:["airport","flight","landing"],char:'🛫',fitzpatrick_scale:false,category:"travel_and_places"},flight_arrival:{keywords:["airport","flight","boarding"],char:'🛬',fitzpatrick_scale:false,category:"travel_and_places"},sailboat:{keywords:["ship","summer","transportation","water","sailing"],char:'⛵',fitzpatrick_scale:false,category:"travel_and_places"},motor_boat:{keywords:["ship"],char:'🛥',fitzpatrick_scale:false,category:"travel_and_places"},speedboat:{keywords:["ship","transportation","vehicle","summer"],char:'🚤',fitzpatrick_scale:false,category:"travel_and_places"},ferry:{keywords:["boat","ship","yacht"],char:'⛴',fitzpatrick_scale:false,category:"travel_and_places"},passenger_ship:{keywords:["yacht","cruise","ferry"],char:'🛳',fitzpatrick_scale:false,category:"travel_and_places"},rocket:{keywords:["launch","ship","staffmode","NASA","outer space","outer_space","fly"],char:'🚀',fitzpatrick_scale:false,category:"travel_and_places"},artificial_satellite:{keywords:["communication","gps","orbit","spaceflight","NASA","ISS"],char:'🛰',fitzpatrick_scale:false,category:"travel_and_places"},seat:{keywords:["sit","airplane","transport","bus","flight","fly"],char:'💺',fitzpatrick_scale:false,category:"travel_and_places"},canoe:{keywords:["boat","paddle","water","ship"],char:'🛶',fitzpatrick_scale:false,category:"travel_and_places"},anchor:{keywords:["ship","ferry","sea","boat"],char:'⚓',fitzpatrick_scale:false,category:"travel_and_places"},construction:{keywords:["wip","progress","caution","warning"],char:'🚧',fitzpatrick_scale:false,category:"travel_and_places"},fuelpump:{keywords:["gas station","petroleum"],char:'⛽',fitzpatrick_scale:false,category:"travel_and_places"},busstop:{keywords:["transportation","wait"],char:'🚏',fitzpatrick_scale:false,category:"travel_and_places"},vertical_traffic_light:{keywords:["transportation","driving"],char:'🚦',fitzpatrick_scale:false,category:"travel_and_places"},traffic_light:{keywords:["transportation","signal"],char:'🚥',fitzpatrick_scale:false,category:"travel_and_places"},checkered_flag:{keywords:["contest","finishline","race","gokart"],char:'🏁',fitzpatrick_scale:false,category:"travel_and_places"},ship:{keywords:["transportation","titanic","deploy"],char:'🚢',fitzpatrick_scale:false,category:"travel_and_places"},ferris_wheel:{keywords:["photo","carnival","londoneye"],char:'🎡',fitzpatrick_scale:false,category:"travel_and_places"},roller_coaster:{keywords:["carnival","playground","photo","fun"],char:'🎢',fitzpatrick_scale:false,category:"travel_and_places"},carousel_horse:{keywords:["photo","carnival"],char:'🎠',fitzpatrick_scale:false,category:"travel_and_places"},building_construction:{keywords:["wip","working","progress"],char:'🏗',fitzpatrick_scale:false,category:"travel_and_places"},foggy:{keywords:["photo","mountain"],char:'🌁',fitzpatrick_scale:false,category:"travel_and_places"},tokyo_tower:{keywords:["photo","japanese"],char:'🗼',fitzpatrick_scale:false,category:"travel_and_places"},factory:{keywords:["building","industry","pollution","smoke"],char:'🏭',fitzpatrick_scale:false,category:"travel_and_places"},fountain:{keywords:["photo","summer","water","fresh"],char:'⛲',fitzpatrick_scale:false,category:"travel_and_places"},rice_scene:{keywords:["photo","japan","asia","tsukimi"],char:'🎑',fitzpatrick_scale:false,category:"travel_and_places"},mountain:{keywords:["photo","nature","environment"],char:'⛰',fitzpatrick_scale:false,category:"travel_and_places"},mountain_snow:{keywords:["photo","nature","environment","winter","cold"],char:'🏔',fitzpatrick_scale:false,category:"travel_and_places"},mount_fuji:{keywords:["photo","mountain","nature","japanese"],char:'🗻',fitzpatrick_scale:false,category:"travel_and_places"},volcano:{keywords:["photo","nature","disaster"],char:'🌋',fitzpatrick_scale:false,category:"travel_and_places"},japan:{keywords:["nation","country","japanese","asia"],char:'🗾',fitzpatrick_scale:false,category:"travel_and_places"},camping:{keywords:["photo","outdoors","tent"],char:'🏕',fitzpatrick_scale:false,category:"travel_and_places"},tent:{keywords:["photo","camping","outdoors"],char:'⛺',fitzpatrick_scale:false,category:"travel_and_places"},national_park:{keywords:["photo","environment","nature"],char:'🏞',fitzpatrick_scale:false,category:"travel_and_places"},motorway:{keywords:["road","cupertino","interstate","highway"],char:'🛣',fitzpatrick_scale:false,category:"travel_and_places"},railway_track:{keywords:["train","transportation"],char:'🛤',fitzpatrick_scale:false,category:"travel_and_places"},sunrise:{keywords:["morning","view","vacation","photo"],char:'🌅',fitzpatrick_scale:false,category:"travel_and_places"},sunrise_over_mountains:{keywords:["view","vacation","photo"],char:'🌄',fitzpatrick_scale:false,category:"travel_and_places"},desert:{keywords:["photo","warm","saharah"],char:'🏜',fitzpatrick_scale:false,category:"travel_and_places"},beach_umbrella:{keywords:["weather","summer","sunny","sand","mojito"],char:'🏖',fitzpatrick_scale:false,category:"travel_and_places"},desert_island:{keywords:["photo","tropical","mojito"],char:'🏝',fitzpatrick_scale:false,category:"travel_and_places"},city_sunrise:{keywords:["photo","good morning","dawn"],char:'🌇',fitzpatrick_scale:false,category:"travel_and_places"},city_sunset:{keywords:["photo","evening","sky","buildings"],char:'🌆',fitzpatrick_scale:false,category:"travel_and_places"},cityscape:{keywords:["photo","night life","urban"],char:'🏙',fitzpatrick_scale:false,category:"travel_and_places"},night_with_stars:{keywords:["evening","city","downtown"],char:'🌃',fitzpatrick_scale:false,category:"travel_and_places"},bridge_at_night:{keywords:["photo","sanfrancisco"],char:'🌉',fitzpatrick_scale:false,category:"travel_and_places"},milky_way:{keywords:["photo","space","stars"],char:'🌌',fitzpatrick_scale:false,category:"travel_and_places"},stars:{keywords:["night","photo"],char:'🌠',fitzpatrick_scale:false,category:"travel_and_places"},sparkler:{keywords:["stars","night","shine"],char:'🎇',fitzpatrick_scale:false,category:"travel_and_places"},fireworks:{keywords:["photo","festival","carnival","congratulations"],char:'🎆',fitzpatrick_scale:false,category:"travel_and_places"},rainbow:{keywords:["nature","happy","unicorn_face","photo","sky","spring"],char:'🌈',fitzpatrick_scale:false,category:"travel_and_places"},houses:{keywords:["buildings","photo"],char:'🏘',fitzpatrick_scale:false,category:"travel_and_places"},european_castle:{keywords:["building","royalty","history"],char:'🏰',fitzpatrick_scale:false,category:"travel_and_places"},japanese_castle:{keywords:["photo","building"],char:'🏯',fitzpatrick_scale:false,category:"travel_and_places"},stadium:{keywords:["photo","place","sports","concert","venue"],char:'🏟',fitzpatrick_scale:false,category:"travel_and_places"},statue_of_liberty:{keywords:["american","newyork"],char:'🗽',fitzpatrick_scale:false,category:"travel_and_places"},house:{keywords:["building","home"],char:'🏠',fitzpatrick_scale:false,category:"travel_and_places"},house_with_garden:{keywords:["home","plant","nature"],char:'🏡',fitzpatrick_scale:false,category:"travel_and_places"},derelict_house:{keywords:["abandon","evict","broken","building"],char:'🏚',fitzpatrick_scale:false,category:"travel_and_places"},office:{keywords:["building","bureau","work"],char:'🏢',fitzpatrick_scale:false,category:"travel_and_places"},department_store:{keywords:["building","shopping","mall"],char:'🏬',fitzpatrick_scale:false,category:"travel_and_places"},post_office:{keywords:["building","envelope","communication"],char:'🏣',fitzpatrick_scale:false,category:"travel_and_places"},european_post_office:{keywords:["building","email"],char:'🏤',fitzpatrick_scale:false,category:"travel_and_places"},hospital:{keywords:["building","health","surgery","doctor"],char:'🏥',fitzpatrick_scale:false,category:"travel_and_places"},bank:{keywords:["building","money","sales","cash","business","enterprise"],char:'🏦',fitzpatrick_scale:false,category:"travel_and_places"},hotel:{keywords:["building","accomodation","checkin"],char:'🏨',fitzpatrick_scale:false,category:"travel_and_places"},convenience_store:{keywords:["building","shopping","groceries"],char:'🏪',fitzpatrick_scale:false,category:"travel_and_places"},school:{keywords:["building","student","education","learn","teach"],char:'🏫',fitzpatrick_scale:false,category:"travel_and_places"},love_hotel:{keywords:["like","affection","dating"],char:'🏩',fitzpatrick_scale:false,category:"travel_and_places"},wedding:{keywords:["love","like","affection","couple","marriage","bride","groom"],char:'💒',fitzpatrick_scale:false,category:"travel_and_places"},classical_building:{keywords:["art","culture","history"],char:'🏛',fitzpatrick_scale:false,category:"travel_and_places"},church:{keywords:["building","religion","christ"],char:'⛪',fitzpatrick_scale:false,category:"travel_and_places"},mosque:{keywords:["islam","worship","minaret"],char:'🕌',fitzpatrick_scale:false,category:"travel_and_places"},synagogue:{keywords:["judaism","worship","temple","jewish"],char:'🕍',fitzpatrick_scale:false,category:"travel_and_places"},kaaba:{keywords:["mecca","mosque","islam"],char:'🕋',fitzpatrick_scale:false,category:"travel_and_places"},shinto_shrine:{keywords:["temple","japan","kyoto"],char:'⛩',fitzpatrick_scale:false,category:"travel_and_places"},watch:{keywords:["time","accessories"],char:'⌚',fitzpatrick_scale:false,category:"objects"},iphone:{keywords:["technology","apple","gadgets","dial"],char:'📱',fitzpatrick_scale:false,category:"objects"},calling:{keywords:["iphone","incoming"],char:'📲',fitzpatrick_scale:false,category:"objects"},computer:{keywords:["technology","laptop","screen","display","monitor"],char:'💻',fitzpatrick_scale:false,category:"objects"},keyboard:{keywords:["technology","computer","type","input","text"],char:'⌨',fitzpatrick_scale:false,category:"objects"},desktop_computer:{keywords:["technology","computing","screen"],char:'🖥',fitzpatrick_scale:false,category:"objects"},printer:{keywords:["paper","ink"],char:'🖨',fitzpatrick_scale:false,category:"objects"},computer_mouse:{keywords:["click"],char:'🖱',fitzpatrick_scale:false,category:"objects"},trackball:{keywords:["technology","trackpad"],char:'🖲',fitzpatrick_scale:false,category:"objects"},joystick:{keywords:["game","play"],char:'🕹',fitzpatrick_scale:false,category:"objects"},clamp:{keywords:["tool"],char:'🗜',fitzpatrick_scale:false,category:"objects"},minidisc:{keywords:["technology","record","data","disk","90s"],char:'💽',fitzpatrick_scale:false,category:"objects"},floppy_disk:{keywords:["oldschool","technology","save","90s","80s"],char:'💾',fitzpatrick_scale:false,category:"objects"},cd:{keywords:["technology","dvd","disk","disc","90s"],char:'💿',fitzpatrick_scale:false,category:"objects"},dvd:{keywords:["cd","disk","disc"],char:'📀',fitzpatrick_scale:false,category:"objects"},vhs:{keywords:["record","video","oldschool","90s","80s"],char:'📼',fitzpatrick_scale:false,category:"objects"},camera:{keywords:["gadgets","photography"],char:'📷',fitzpatrick_scale:false,category:"objects"},camera_flash:{keywords:["photography","gadgets"],char:'📸',fitzpatrick_scale:false,category:"objects"},video_camera:{keywords:["film","record"],char:'📹',fitzpatrick_scale:false,category:"objects"},movie_camera:{keywords:["film","record"],char:'🎥',fitzpatrick_scale:false,category:"objects"},film_projector:{keywords:["video","tape","record","movie"],char:'📽',fitzpatrick_scale:false,category:"objects"},film_strip:{keywords:["movie"],char:'🎞',fitzpatrick_scale:false,category:"objects"},telephone_receiver:{keywords:["technology","communication","dial"],char:'📞',fitzpatrick_scale:false,category:"objects"},phone:{keywords:["technology","communication","dial","telephone"],char:'☎️',fitzpatrick_scale:false,category:"objects"},pager:{keywords:["bbcall","oldschool","90s"],char:'📟',fitzpatrick_scale:false,category:"objects"},fax:{keywords:["communication","technology"],char:'📠',fitzpatrick_scale:false,category:"objects"},tv:{keywords:["technology","program","oldschool","show","television"],char:'📺',fitzpatrick_scale:false,category:"objects"},radio:{keywords:["communication","music","podcast","program"],char:'📻',fitzpatrick_scale:false,category:"objects"},studio_microphone:{keywords:["sing","recording","artist","talkshow"],char:'🎙',fitzpatrick_scale:false,category:"objects"},level_slider:{keywords:["scale"],char:'🎚',fitzpatrick_scale:false,category:"objects"},control_knobs:{keywords:["dial"],char:'🎛',fitzpatrick_scale:false,category:"objects"},compass:{keywords:["magnetic","navigation","orienteering"],char:'🧭',fitzpatrick_scale:false,category:"objects"},stopwatch:{keywords:["time","deadline"],char:'⏱',fitzpatrick_scale:false,category:"objects"},timer_clock:{keywords:["alarm"],char:'⏲',fitzpatrick_scale:false,category:"objects"},alarm_clock:{keywords:["time","wake"],char:'⏰',fitzpatrick_scale:false,category:"objects"},mantelpiece_clock:{keywords:["time"],char:'🕰',fitzpatrick_scale:false,category:"objects"},hourglass_flowing_sand:{keywords:["oldschool","time","countdown"],char:'⏳',fitzpatrick_scale:false,category:"objects"},hourglass:{keywords:["time","clock","oldschool","limit","exam","quiz","test"],char:'⌛',fitzpatrick_scale:false,category:"objects"},satellite:{keywords:["communication","future","radio","space"],char:'📡',fitzpatrick_scale:false,category:"objects"},battery:{keywords:["power","energy","sustain"],char:'🔋',fitzpatrick_scale:false,category:"objects"},electric_plug:{keywords:["charger","power"],char:'🔌',fitzpatrick_scale:false,category:"objects"},bulb:{keywords:["light","electricity","idea"],char:'💡',fitzpatrick_scale:false,category:"objects"},flashlight:{keywords:["dark","camping","sight","night"],char:'🔦',fitzpatrick_scale:false,category:"objects"},candle:{keywords:["fire","wax"],char:'🕯',fitzpatrick_scale:false,category:"objects"},fire_extinguisher:{keywords:["quench"],char:'🧯',fitzpatrick_scale:false,category:"objects"},wastebasket:{keywords:["bin","trash","rubbish","garbage","toss"],char:'🗑',fitzpatrick_scale:false,category:"objects"},oil_drum:{keywords:["barrell"],char:'🛢',fitzpatrick_scale:false,category:"objects"},money_with_wings:{keywords:["dollar","bills","payment","sale"],char:'💸',fitzpatrick_scale:false,category:"objects"},dollar:{keywords:["money","sales","bill","currency"],char:'💵',fitzpatrick_scale:false,category:"objects"},yen:{keywords:["money","sales","japanese","dollar","currency"],char:'💴',fitzpatrick_scale:false,category:"objects"},euro:{keywords:["money","sales","dollar","currency"],char:'💶',fitzpatrick_scale:false,category:"objects"},pound:{keywords:["british","sterling","money","sales","bills","uk","england","currency"],char:'💷',fitzpatrick_scale:false,category:"objects"},moneybag:{keywords:["dollar","payment","coins","sale"],char:'💰',fitzpatrick_scale:false,category:"objects"},credit_card:{keywords:["money","sales","dollar","bill","payment","shopping"],char:'💳',fitzpatrick_scale:false,category:"objects"},gem:{keywords:["blue","ruby","diamond","jewelry"],char:'💎',fitzpatrick_scale:false,category:"objects"},balance_scale:{keywords:["law","fairness","weight"],char:'⚖',fitzpatrick_scale:false,category:"objects"},toolbox:{keywords:["tools","diy","fix","maintainer","mechanic"],char:'🧰',fitzpatrick_scale:false,category:"objects"},wrench:{keywords:["tools","diy","ikea","fix","maintainer"],char:'🔧',fitzpatrick_scale:false,category:"objects"},hammer:{keywords:["tools","build","create"],char:'🔨',fitzpatrick_scale:false,category:"objects"},hammer_and_pick:{keywords:["tools","build","create"],char:'⚒',fitzpatrick_scale:false,category:"objects"},hammer_and_wrench:{keywords:["tools","build","create"],char:'🛠',fitzpatrick_scale:false,category:"objects"},pick:{keywords:["tools","dig"],char:'⛏',fitzpatrick_scale:false,category:"objects"},nut_and_bolt:{keywords:["handy","tools","fix"],char:'🔩',fitzpatrick_scale:false,category:"objects"},gear:{keywords:["cog"],char:'⚙',fitzpatrick_scale:false,category:"objects"},brick:{keywords:["bricks"],char:'🧱',fitzpatrick_scale:false,category:"objects"},chains:{keywords:["lock","arrest"],char:'⛓',fitzpatrick_scale:false,category:"objects"},magnet:{keywords:["attraction","magnetic"],char:'🧲',fitzpatrick_scale:false,category:"objects"},gun:{keywords:["violence","weapon","pistol","revolver"],char:'🔫',fitzpatrick_scale:false,category:"objects"},bomb:{keywords:["boom","explode","explosion","terrorism"],char:'💣',fitzpatrick_scale:false,category:"objects"},firecracker:{keywords:["dynamite","boom","explode","explosion","explosive"],char:'🧨',fitzpatrick_scale:false,category:"objects"},hocho:{keywords:["knife","blade","cutlery","kitchen","weapon"],char:'🔪',fitzpatrick_scale:false,category:"objects"},dagger:{keywords:["weapon"],char:'🗡',fitzpatrick_scale:false,category:"objects"},crossed_swords:{keywords:["weapon"],char:'⚔',fitzpatrick_scale:false,category:"objects"},shield:{keywords:["protection","security"],char:'🛡',fitzpatrick_scale:false,category:"objects"},smoking:{keywords:["kills","tobacco","cigarette","joint","smoke"],char:'🚬',fitzpatrick_scale:false,category:"objects"},skull_and_crossbones:{keywords:["poison","danger","deadly","scary","death","pirate","evil"],char:'☠',fitzpatrick_scale:false,category:"objects"},coffin:{keywords:["vampire","dead","die","death","rip","graveyard","cemetery","casket","funeral","box"],char:'⚰',fitzpatrick_scale:false,category:"objects"},funeral_urn:{keywords:["dead","die","death","rip","ashes"],char:'⚱',fitzpatrick_scale:false,category:"objects"},amphora:{keywords:["vase","jar"],char:'🏺',fitzpatrick_scale:false,category:"objects"},crystal_ball:{keywords:["disco","party","magic","circus","fortune_teller"],char:'🔮',fitzpatrick_scale:false,category:"objects"},prayer_beads:{keywords:["dhikr","religious"],char:'📿',fitzpatrick_scale:false,category:"objects"},nazar_amulet:{keywords:["bead","charm"],char:'🧿',fitzpatrick_scale:false,category:"objects"},barber:{keywords:["hair","salon","style"],char:'💈',fitzpatrick_scale:false,category:"objects"},alembic:{keywords:["distilling","science","experiment","chemistry"],char:'⚗',fitzpatrick_scale:false,category:"objects"},telescope:{keywords:["stars","space","zoom","science","astronomy"],char:'🔭',fitzpatrick_scale:false,category:"objects"},microscope:{keywords:["laboratory","experiment","zoomin","science","study"],char:'🔬',fitzpatrick_scale:false,category:"objects"},hole:{keywords:["embarrassing"],char:'🕳',fitzpatrick_scale:false,category:"objects"},pill:{keywords:["health","medicine","doctor","pharmacy","drug"],char:'💊',fitzpatrick_scale:false,category:"objects"},syringe:{keywords:["health","hospital","drugs","blood","medicine","needle","doctor","nurse"],char:'💉',fitzpatrick_scale:false,category:"objects"},dna:{keywords:["biologist","genetics","life"],char:'🧬',fitzpatrick_scale:false,category:"objects"},microbe:{keywords:["amoeba","bacteria","germs"],char:'🦠',fitzpatrick_scale:false,category:"objects"},petri_dish:{keywords:["bacteria","biology","culture","lab"],char:'🧫',fitzpatrick_scale:false,category:"objects"},test_tube:{keywords:["chemistry","experiment","lab","science"],char:'🧪',fitzpatrick_scale:false,category:"objects"},thermometer:{keywords:["weather","temperature","hot","cold"],char:'🌡',fitzpatrick_scale:false,category:"objects"},broom:{keywords:["cleaning","sweeping","witch"],char:'🧹',fitzpatrick_scale:false,category:"objects"},basket:{keywords:["laundry"],char:'🧺',fitzpatrick_scale:false,category:"objects"},toilet_paper:{keywords:["roll"],char:'🧻',fitzpatrick_scale:false,category:"objects"},label:{keywords:["sale","tag"],char:'🏷',fitzpatrick_scale:false,category:"objects"},bookmark:{keywords:["favorite","label","save"],char:'🔖',fitzpatrick_scale:false,category:"objects"},toilet:{keywords:["restroom","wc","washroom","bathroom","potty"],char:'🚽',fitzpatrick_scale:false,category:"objects"},shower:{keywords:["clean","water","bathroom"],char:'🚿',fitzpatrick_scale:false,category:"objects"},bathtub:{keywords:["clean","shower","bathroom"],char:'🛁',fitzpatrick_scale:false,category:"objects"},soap:{keywords:["bar","bathing","cleaning","lather"],char:'🧼',fitzpatrick_scale:false,category:"objects"},sponge:{keywords:["absorbing","cleaning","porous"],char:'🧽',fitzpatrick_scale:false,category:"objects"},lotion_bottle:{keywords:["moisturizer","sunscreen"],char:'🧴',fitzpatrick_scale:false,category:"objects"},key:{keywords:["lock","door","password"],char:'🔑',fitzpatrick_scale:false,category:"objects"},old_key:{keywords:["lock","door","password"],char:'🗝',fitzpatrick_scale:false,category:"objects"},couch_and_lamp:{keywords:["read","chill"],char:'🛋',fitzpatrick_scale:false,category:"objects"},sleeping_bed:{keywords:["bed","rest"],char:'🛌',fitzpatrick_scale:true,category:"objects"},bed:{keywords:["sleep","rest"],char:'🛏',fitzpatrick_scale:false,category:"objects"},door:{keywords:["house","entry","exit"],char:'🚪',fitzpatrick_scale:false,category:"objects"},bellhop_bell:{keywords:["service"],char:'🛎',fitzpatrick_scale:false,category:"objects"},teddy_bear:{keywords:["plush","stuffed"],char:'🧸',fitzpatrick_scale:false,category:"objects"},framed_picture:{keywords:["photography"],char:'🖼',fitzpatrick_scale:false,category:"objects"},world_map:{keywords:["location","direction"],char:'🗺',fitzpatrick_scale:false,category:"objects"},parasol_on_ground:{keywords:["weather","summer"],char:'⛱',fitzpatrick_scale:false,category:"objects"},moyai:{keywords:["rock","easter island","moai"],char:'🗿',fitzpatrick_scale:false,category:"objects"},shopping:{keywords:["mall","buy","purchase"],char:'🛍',fitzpatrick_scale:false,category:"objects"},shopping_cart:{keywords:["trolley"],char:'🛒',fitzpatrick_scale:false,category:"objects"},balloon:{keywords:["party","celebration","birthday","circus"],char:'🎈',fitzpatrick_scale:false,category:"objects"},flags:{keywords:["fish","japanese","koinobori","carp","banner"],char:'🎏',fitzpatrick_scale:false,category:"objects"},ribbon:{keywords:["decoration","pink","girl","bowtie"],char:'🎀',fitzpatrick_scale:false,category:"objects"},gift:{keywords:["present","birthday","christmas","xmas"],char:'🎁',fitzpatrick_scale:false,category:"objects"},confetti_ball:{keywords:["festival","party","birthday","circus"],char:'🎊',fitzpatrick_scale:false,category:"objects"},tada:{keywords:["party","congratulations","birthday","magic","circus","celebration"],char:'🎉',fitzpatrick_scale:false,category:"objects"},dolls:{keywords:["japanese","toy","kimono"],char:'🎎',fitzpatrick_scale:false,category:"objects"},wind_chime:{keywords:["nature","ding","spring","bell"],char:'🎐',fitzpatrick_scale:false,category:"objects"},crossed_flags:{keywords:["japanese","nation","country","border"],char:'🎌',fitzpatrick_scale:false,category:"objects"},izakaya_lantern:{keywords:["light","paper","halloween","spooky"],char:'🏮',fitzpatrick_scale:false,category:"objects"},red_envelope:{keywords:["gift"],char:'🧧',fitzpatrick_scale:false,category:"objects"},email:{keywords:["letter","postal","inbox","communication"],char:'✉️',fitzpatrick_scale:false,category:"objects"},envelope_with_arrow:{keywords:["email","communication"],char:'📩',fitzpatrick_scale:false,category:"objects"},incoming_envelope:{keywords:["email","inbox"],char:'📨',fitzpatrick_scale:false,category:"objects"},"e-mail":{keywords:["communication","inbox"],char:'📧',fitzpatrick_scale:false,category:"objects"},love_letter:{keywords:["email","like","affection","envelope","valentines"],char:'💌',fitzpatrick_scale:false,category:"objects"},postbox:{keywords:["email","letter","envelope"],char:'📮',fitzpatrick_scale:false,category:"objects"},mailbox_closed:{keywords:["email","communication","inbox"],char:'📪',fitzpatrick_scale:false,category:"objects"},mailbox:{keywords:["email","inbox","communication"],char:'📫',fitzpatrick_scale:false,category:"objects"},mailbox_with_mail:{keywords:["email","inbox","communication"],char:'📬',fitzpatrick_scale:false,category:"objects"},mailbox_with_no_mail:{keywords:["email","inbox"],char:'📭',fitzpatrick_scale:false,category:"objects"},package:{keywords:["mail","gift","cardboard","box","moving"],char:'📦',fitzpatrick_scale:false,category:"objects"},postal_horn:{keywords:["instrument","music"],char:'📯',fitzpatrick_scale:false,category:"objects"},inbox_tray:{keywords:["email","documents"],char:'📥',fitzpatrick_scale:false,category:"objects"},outbox_tray:{keywords:["inbox","email"],char:'📤',fitzpatrick_scale:false,category:"objects"},scroll:{keywords:["documents","ancient","history","paper"],char:'📜',fitzpatrick_scale:false,category:"objects"},page_with_curl:{keywords:["documents","office","paper"],char:'📃',fitzpatrick_scale:false,category:"objects"},bookmark_tabs:{keywords:["favorite","save","order","tidy"],char:'📑',fitzpatrick_scale:false,category:"objects"},receipt:{keywords:["accounting","expenses"],char:'🧾',fitzpatrick_scale:false,category:"objects"},bar_chart:{keywords:["graph","presentation","stats"],char:'📊',fitzpatrick_scale:false,category:"objects"},chart_with_upwards_trend:{keywords:["graph","presentation","stats","recovery","business","economics","money","sales","good","success"],char:'📈',fitzpatrick_scale:false,category:"objects"},chart_with_downwards_trend:{keywords:["graph","presentation","stats","recession","business","economics","money","sales","bad","failure"],char:'📉',fitzpatrick_scale:false,category:"objects"},page_facing_up:{keywords:["documents","office","paper","information"],char:'📄',fitzpatrick_scale:false,category:"objects"},date:{keywords:["calendar","schedule"],char:'📅',fitzpatrick_scale:false,category:"objects"},calendar:{keywords:["schedule","date","planning"],char:'📆',fitzpatrick_scale:false,category:"objects"},spiral_calendar:{keywords:["date","schedule","planning"],char:'🗓',fitzpatrick_scale:false,category:"objects"},card_index:{keywords:["business","stationery"],char:'📇',fitzpatrick_scale:false,category:"objects"},card_file_box:{keywords:["business","stationery"],char:'🗃',fitzpatrick_scale:false,category:"objects"},ballot_box:{keywords:["election","vote"],char:'🗳',fitzpatrick_scale:false,category:"objects"},file_cabinet:{keywords:["filing","organizing"],char:'🗄',fitzpatrick_scale:false,category:"objects"},clipboard:{keywords:["stationery","documents"],char:'📋',fitzpatrick_scale:false,category:"objects"},spiral_notepad:{keywords:["memo","stationery"],char:'🗒',fitzpatrick_scale:false,category:"objects"},file_folder:{keywords:["documents","business","office"],char:'📁',fitzpatrick_scale:false,category:"objects"},open_file_folder:{keywords:["documents","load"],char:'📂',fitzpatrick_scale:false,category:"objects"},card_index_dividers:{keywords:["organizing","business","stationery"],char:'🗂',fitzpatrick_scale:false,category:"objects"},newspaper_roll:{keywords:["press","headline"],char:'🗞',fitzpatrick_scale:false,category:"objects"},newspaper:{keywords:["press","headline"],char:'📰',fitzpatrick_scale:false,category:"objects"},notebook:{keywords:["stationery","record","notes","paper","study"],char:'📓',fitzpatrick_scale:false,category:"objects"},closed_book:{keywords:["read","library","knowledge","textbook","learn"],char:'📕',fitzpatrick_scale:false,category:"objects"},green_book:{keywords:["read","library","knowledge","study"],char:'📗',fitzpatrick_scale:false,category:"objects"},blue_book:{keywords:["read","library","knowledge","learn","study"],char:'📘',fitzpatrick_scale:false,category:"objects"},orange_book:{keywords:["read","library","knowledge","textbook","study"],char:'📙',fitzpatrick_scale:false,category:"objects"},notebook_with_decorative_cover:{keywords:["classroom","notes","record","paper","study"],char:'📔',fitzpatrick_scale:false,category:"objects"},ledger:{keywords:["notes","paper"],char:'📒',fitzpatrick_scale:false,category:"objects"},books:{keywords:["literature","library","study"],char:'📚',fitzpatrick_scale:false,category:"objects"},open_book:{keywords:["book","read","library","knowledge","literature","learn","study"],char:'📖',fitzpatrick_scale:false,category:"objects"},safety_pin:{keywords:["diaper"],char:'🧷',fitzpatrick_scale:false,category:"objects"},link:{keywords:["rings","url"],char:'🔗',fitzpatrick_scale:false,category:"objects"},paperclip:{keywords:["documents","stationery"],char:'📎',fitzpatrick_scale:false,category:"objects"},paperclips:{keywords:["documents","stationery"],char:'🖇',fitzpatrick_scale:false,category:"objects"},scissors:{keywords:["stationery","cut"],char:'✂️',fitzpatrick_scale:false,category:"objects"},triangular_ruler:{keywords:["stationery","math","architect","sketch"],char:'📐',fitzpatrick_scale:false,category:"objects"},straight_ruler:{keywords:["stationery","calculate","length","math","school","drawing","architect","sketch"],char:'📏',fitzpatrick_scale:false,category:"objects"},abacus:{keywords:["calculation"],char:'🧮',fitzpatrick_scale:false,category:"objects"},pushpin:{keywords:["stationery","mark","here"],char:'📌',fitzpatrick_scale:false,category:"objects"},round_pushpin:{keywords:["stationery","location","map","here"],char:'📍',fitzpatrick_scale:false,category:"objects"},triangular_flag_on_post:{keywords:["mark","milestone","place"],char:'🚩',fitzpatrick_scale:false,category:"objects"},white_flag:{keywords:["losing","loser","lost","surrender","give up","fail"],char:'🏳',fitzpatrick_scale:false,category:"objects"},black_flag:{keywords:["pirate"],char:'🏴',fitzpatrick_scale:false,category:"objects"},rainbow_flag:{keywords:["flag","rainbow","pride","gay","lgbt","glbt","queer","homosexual","lesbian","bisexual","transgender"],char:'🏳️‍🌈',fitzpatrick_scale:false,category:"objects"},closed_lock_with_key:{keywords:["security","privacy"],char:'🔐',fitzpatrick_scale:false,category:"objects"},lock:{keywords:["security","password","padlock"],char:'🔒',fitzpatrick_scale:false,category:"objects"},unlock:{keywords:["privacy","security"],char:'🔓',fitzpatrick_scale:false,category:"objects"},lock_with_ink_pen:{keywords:["security","secret"],char:'🔏',fitzpatrick_scale:false,category:"objects"},pen:{keywords:["stationery","writing","write"],char:'🖊',fitzpatrick_scale:false,category:"objects"},fountain_pen:{keywords:["stationery","writing","write"],char:'🖋',fitzpatrick_scale:false,category:"objects"},black_nib:{keywords:["pen","stationery","writing","write"],char:'✒️',fitzpatrick_scale:false,category:"objects"},memo:{keywords:["write","documents","stationery","pencil","paper","writing","legal","exam","quiz","test","study","compose"],char:'📝',fitzpatrick_scale:false,category:"objects"},pencil2:{keywords:["stationery","write","paper","writing","school","study"],char:'✏️',fitzpatrick_scale:false,category:"objects"},crayon:{keywords:["drawing","creativity"],char:'🖍',fitzpatrick_scale:false,category:"objects"},paintbrush:{keywords:["drawing","creativity","art"],char:'🖌',fitzpatrick_scale:false,category:"objects"},mag:{keywords:["search","zoom","find","detective"],char:'🔍',fitzpatrick_scale:false,category:"objects"},mag_right:{keywords:["search","zoom","find","detective"],char:'🔎',fitzpatrick_scale:false,category:"objects"},heart:{keywords:["love","like","valentines"],char:'❤️',fitzpatrick_scale:false,category:"symbols"},orange_heart:{keywords:["love","like","affection","valentines"],char:'🧡',fitzpatrick_scale:false,category:"symbols"},yellow_heart:{keywords:["love","like","affection","valentines"],char:'💛',fitzpatrick_scale:false,category:"symbols"},green_heart:{keywords:["love","like","affection","valentines"],char:'💚',fitzpatrick_scale:false,category:"symbols"},blue_heart:{keywords:["love","like","affection","valentines"],char:'💙',fitzpatrick_scale:false,category:"symbols"},purple_heart:{keywords:["love","like","affection","valentines"],char:'💜',fitzpatrick_scale:false,category:"symbols"},black_heart:{keywords:["evil"],char:'🖤',fitzpatrick_scale:false,category:"symbols"},broken_heart:{keywords:["sad","sorry","break","heart","heartbreak"],char:'💔',fitzpatrick_scale:false,category:"symbols"},heavy_heart_exclamation:{keywords:["decoration","love"],char:'❣',fitzpatrick_scale:false,category:"symbols"},two_hearts:{keywords:["love","like","affection","valentines","heart"],char:'💕',fitzpatrick_scale:false,category:"symbols"},revolving_hearts:{keywords:["love","like","affection","valentines"],char:'💞',fitzpatrick_scale:false,category:"symbols"},heartbeat:{keywords:["love","like","affection","valentines","pink","heart"],char:'💓',fitzpatrick_scale:false,category:"symbols"},heartpulse:{keywords:["like","love","affection","valentines","pink"],char:'💗',fitzpatrick_scale:false,category:"symbols"},sparkling_heart:{keywords:["love","like","affection","valentines"],char:'💖',fitzpatrick_scale:false,category:"symbols"},cupid:{keywords:["love","like","heart","affection","valentines"],char:'💘',fitzpatrick_scale:false,category:"symbols"},gift_heart:{keywords:["love","valentines"],char:'💝',fitzpatrick_scale:false,category:"symbols"},heart_decoration:{keywords:["purple-square","love","like"],char:'💟',fitzpatrick_scale:false,category:"symbols"},peace_symbol:{keywords:["hippie"],char:'☮',fitzpatrick_scale:false,category:"symbols"},latin_cross:{keywords:["christianity"],char:'✝',fitzpatrick_scale:false,category:"symbols"},star_and_crescent:{keywords:["islam"],char:'☪',fitzpatrick_scale:false,category:"symbols"},om:{keywords:["hinduism","buddhism","sikhism","jainism"],char:'🕉',fitzpatrick_scale:false,category:"symbols"},wheel_of_dharma:{keywords:["hinduism","buddhism","sikhism","jainism"],char:'☸',fitzpatrick_scale:false,category:"symbols"},star_of_david:{keywords:["judaism"],char:'✡',fitzpatrick_scale:false,category:"symbols"},six_pointed_star:{keywords:["purple-square","religion","jewish","hexagram"],char:'🔯',fitzpatrick_scale:false,category:"symbols"},menorah:{keywords:["hanukkah","candles","jewish"],char:'🕎',fitzpatrick_scale:false,category:"symbols"},yin_yang:{keywords:["balance"],char:'☯',fitzpatrick_scale:false,category:"symbols"},orthodox_cross:{keywords:["suppedaneum","religion"],char:'☦',fitzpatrick_scale:false,category:"symbols"},place_of_worship:{keywords:["religion","church","temple","prayer"],char:'🛐',fitzpatrick_scale:false,category:"symbols"},ophiuchus:{keywords:["sign","purple-square","constellation","astrology"],char:'⛎',fitzpatrick_scale:false,category:"symbols"},aries:{keywords:["sign","purple-square","zodiac","astrology"],char:'♈',fitzpatrick_scale:false,category:"symbols"},taurus:{keywords:["purple-square","sign","zodiac","astrology"],char:'♉',fitzpatrick_scale:false,category:"symbols"},gemini:{keywords:["sign","zodiac","purple-square","astrology"],char:'♊',fitzpatrick_scale:false,category:"symbols"},cancer:{keywords:["sign","zodiac","purple-square","astrology"],char:'♋',fitzpatrick_scale:false,category:"symbols"},leo:{keywords:["sign","purple-square","zodiac","astrology"],char:'♌',fitzpatrick_scale:false,category:"symbols"},virgo:{keywords:["sign","zodiac","purple-square","astrology"],char:'♍',fitzpatrick_scale:false,category:"symbols"},libra:{keywords:["sign","purple-square","zodiac","astrology"],char:'♎',fitzpatrick_scale:false,category:"symbols"},scorpius:{keywords:["sign","zodiac","purple-square","astrology","scorpio"],char:'♏',fitzpatrick_scale:false,category:"symbols"},sagittarius:{keywords:["sign","zodiac","purple-square","astrology"],char:'♐',fitzpatrick_scale:false,category:"symbols"},capricorn:{keywords:["sign","zodiac","purple-square","astrology"],char:'♑',fitzpatrick_scale:false,category:"symbols"},aquarius:{keywords:["sign","purple-square","zodiac","astrology"],char:'♒',fitzpatrick_scale:false,category:"symbols"},pisces:{keywords:["purple-square","sign","zodiac","astrology"],char:'♓',fitzpatrick_scale:false,category:"symbols"},id:{keywords:["purple-square","words"],char:'🆔',fitzpatrick_scale:false,category:"symbols"},atom_symbol:{keywords:["science","physics","chemistry"],char:'⚛',fitzpatrick_scale:false,category:"symbols"},u7a7a:{keywords:["kanji","japanese","chinese","empty","sky","blue-square"],char:'🈳',fitzpatrick_scale:false,category:"symbols"},u5272:{keywords:["cut","divide","chinese","kanji","pink-square"],char:'🈹',fitzpatrick_scale:false,category:"symbols"},radioactive:{keywords:["nuclear","danger"],char:'☢',fitzpatrick_scale:false,category:"symbols"},biohazard:{keywords:["danger"],char:'☣',fitzpatrick_scale:false,category:"symbols"},mobile_phone_off:{keywords:["mute","orange-square","silence","quiet"],char:'📴',fitzpatrick_scale:false,category:"symbols"},vibration_mode:{keywords:["orange-square","phone"],char:'📳',fitzpatrick_scale:false,category:"symbols"},u6709:{keywords:["orange-square","chinese","have","kanji"],char:'🈶',fitzpatrick_scale:false,category:"symbols"},u7121:{keywords:["nothing","chinese","kanji","japanese","orange-square"],char:'🈚',fitzpatrick_scale:false,category:"symbols"},u7533:{keywords:["chinese","japanese","kanji","orange-square"],char:'🈸',fitzpatrick_scale:false,category:"symbols"},u55b6:{keywords:["japanese","opening hours","orange-square"],char:'🈺',fitzpatrick_scale:false,category:"symbols"},u6708:{keywords:["chinese","month","moon","japanese","orange-square","kanji"],char:'🈷️',fitzpatrick_scale:false,category:"symbols"},eight_pointed_black_star:{keywords:["orange-square","shape","polygon"],char:'✴️',fitzpatrick_scale:false,category:"symbols"},vs:{keywords:["words","orange-square"],char:'🆚',fitzpatrick_scale:false,category:"symbols"},accept:{keywords:["ok","good","chinese","kanji","agree","yes","orange-circle"],char:'🉑',fitzpatrick_scale:false,category:"symbols"},white_flower:{keywords:["japanese","spring"],char:'💮',fitzpatrick_scale:false,category:"symbols"},ideograph_advantage:{keywords:["chinese","kanji","obtain","get","circle"],char:'🉐',fitzpatrick_scale:false,category:"symbols"},secret:{keywords:["privacy","chinese","sshh","kanji","red-circle"],char:'㊙️',fitzpatrick_scale:false,category:"symbols"},congratulations:{keywords:["chinese","kanji","japanese","red-circle"],char:'㊗️',fitzpatrick_scale:false,category:"symbols"},u5408:{keywords:["japanese","chinese","join","kanji","red-square"],char:'🈴',fitzpatrick_scale:false,category:"symbols"},u6e80:{keywords:["full","chinese","japanese","red-square","kanji"],char:'🈵',fitzpatrick_scale:false,category:"symbols"},u7981:{keywords:["kanji","japanese","chinese","forbidden","limit","restricted","red-square"],char:'🈲',fitzpatrick_scale:false,category:"symbols"},a:{keywords:["red-square","alphabet","letter"],char:'🅰️',fitzpatrick_scale:false,category:"symbols"},b:{keywords:["red-square","alphabet","letter"],char:'🅱️',fitzpatrick_scale:false,category:"symbols"},ab:{keywords:["red-square","alphabet"],char:'🆎',fitzpatrick_scale:false,category:"symbols"},cl:{keywords:["alphabet","words","red-square"],char:'🆑',fitzpatrick_scale:false,category:"symbols"},o2:{keywords:["alphabet","red-square","letter"],char:'🅾️',fitzpatrick_scale:false,category:"symbols"},sos:{keywords:["help","red-square","words","emergency","911"],char:'🆘',fitzpatrick_scale:false,category:"symbols"},no_entry:{keywords:["limit","security","privacy","bad","denied","stop","circle"],char:'⛔',fitzpatrick_scale:false,category:"symbols"},name_badge:{keywords:["fire","forbid"],char:'📛',fitzpatrick_scale:false,category:"symbols"},no_entry_sign:{keywords:["forbid","stop","limit","denied","disallow","circle"],char:'🚫',fitzpatrick_scale:false,category:"symbols"},x:{keywords:["no","delete","remove","cancel","red"],char:'❌',fitzpatrick_scale:false,category:"symbols"},o:{keywords:["circle","round"],char:'⭕',fitzpatrick_scale:false,category:"symbols"},stop_sign:{keywords:["stop"],char:'🛑',fitzpatrick_scale:false,category:"symbols"},anger:{keywords:["angry","mad"],char:'💢',fitzpatrick_scale:false,category:"symbols"},hotsprings:{keywords:["bath","warm","relax"],char:'♨️',fitzpatrick_scale:false,category:"symbols"},no_pedestrians:{keywords:["rules","crossing","walking","circle"],char:'🚷',fitzpatrick_scale:false,category:"symbols"},do_not_litter:{keywords:["trash","bin","garbage","circle"],char:'🚯',fitzpatrick_scale:false,category:"symbols"},no_bicycles:{keywords:["cyclist","prohibited","circle"],char:'🚳',fitzpatrick_scale:false,category:"symbols"},"non-potable_water":{keywords:["drink","faucet","tap","circle"],char:'🚱',fitzpatrick_scale:false,category:"symbols"},underage:{keywords:["18","drink","pub","night","minor","circle"],char:'🔞',fitzpatrick_scale:false,category:"symbols"},no_mobile_phones:{keywords:["iphone","mute","circle"],char:'📵',fitzpatrick_scale:false,category:"symbols"},exclamation:{keywords:["heavy_exclamation_mark","danger","surprise","punctuation","wow","warning"],char:'❗',fitzpatrick_scale:false,category:"symbols"},grey_exclamation:{keywords:["surprise","punctuation","gray","wow","warning"],char:'❕',fitzpatrick_scale:false,category:"symbols"},question:{keywords:["doubt","confused"],char:'❓',fitzpatrick_scale:false,category:"symbols"},grey_question:{keywords:["doubts","gray","huh","confused"],char:'❔',fitzpatrick_scale:false,category:"symbols"},bangbang:{keywords:["exclamation","surprise"],char:'‼️',fitzpatrick_scale:false,category:"symbols"},interrobang:{keywords:["wat","punctuation","surprise"],char:'⁉️',fitzpatrick_scale:false,category:"symbols"},low_brightness:{keywords:["sun","afternoon","warm","summer"],char:'🔅',fitzpatrick_scale:false,category:"symbols"},high_brightness:{keywords:["sun","light"],char:'🔆',fitzpatrick_scale:false,category:"symbols"},trident:{keywords:["weapon","spear"],char:'🔱',fitzpatrick_scale:false,category:"symbols"},fleur_de_lis:{keywords:["decorative","scout"],char:'⚜',fitzpatrick_scale:false,category:"symbols"},part_alternation_mark:{keywords:["graph","presentation","stats","business","economics","bad"],char:'〽️',fitzpatrick_scale:false,category:"symbols"},warning:{keywords:["exclamation","wip","alert","error","problem","issue"],char:'⚠️',fitzpatrick_scale:false,category:"symbols"},children_crossing:{keywords:["school","warning","danger","sign","driving","yellow-diamond"],char:'🚸',fitzpatrick_scale:false,category:"symbols"},beginner:{keywords:["badge","shield"],char:'🔰',fitzpatrick_scale:false,category:"symbols"},recycle:{keywords:["arrow","environment","garbage","trash"],char:'♻️',fitzpatrick_scale:false,category:"symbols"},u6307:{keywords:["chinese","point","green-square","kanji"],char:'🈯',fitzpatrick_scale:false,category:"symbols"},chart:{keywords:["green-square","graph","presentation","stats"],char:'💹',fitzpatrick_scale:false,category:"symbols"},sparkle:{keywords:["stars","green-square","awesome","good","fireworks"],char:'❇️',fitzpatrick_scale:false,category:"symbols"},eight_spoked_asterisk:{keywords:["star","sparkle","green-square"],char:'✳️',fitzpatrick_scale:false,category:"symbols"},negative_squared_cross_mark:{keywords:["x","green-square","no","deny"],char:'❎',fitzpatrick_scale:false,category:"symbols"},white_check_mark:{keywords:["green-square","ok","agree","vote","election","answer","tick"],char:'✅',fitzpatrick_scale:false,category:"symbols"},diamond_shape_with_a_dot_inside:{keywords:["jewel","blue","gem","crystal","fancy"],char:'💠',fitzpatrick_scale:false,category:"symbols"},cyclone:{keywords:["weather","swirl","blue","cloud","vortex","spiral","whirlpool","spin","tornado","hurricane","typhoon"],char:'🌀',fitzpatrick_scale:false,category:"symbols"},loop:{keywords:["tape","cassette"],char:'➿',fitzpatrick_scale:false,category:"symbols"},globe_with_meridians:{keywords:["earth","international","world","internet","interweb","i18n"],char:'🌐',fitzpatrick_scale:false,category:"symbols"},m:{keywords:["alphabet","blue-circle","letter"],char:'Ⓜ️',fitzpatrick_scale:false,category:"symbols"},atm:{keywords:["money","sales","cash","blue-square","payment","bank"],char:'🏧',fitzpatrick_scale:false,category:"symbols"},sa:{keywords:["japanese","blue-square","katakana"],char:'🈂️',fitzpatrick_scale:false,category:"symbols"},passport_control:{keywords:["custom","blue-square"],char:'🛂',fitzpatrick_scale:false,category:"symbols"},customs:{keywords:["passport","border","blue-square"],char:'🛃',fitzpatrick_scale:false,category:"symbols"},baggage_claim:{keywords:["blue-square","airport","transport"],char:'🛄',fitzpatrick_scale:false,category:"symbols"},left_luggage:{keywords:["blue-square","travel"],char:'🛅',fitzpatrick_scale:false,category:"symbols"},wheelchair:{keywords:["blue-square","disabled","a11y","accessibility"],char:'♿',fitzpatrick_scale:false,category:"symbols"},no_smoking:{keywords:["cigarette","blue-square","smell","smoke"],char:'🚭',fitzpatrick_scale:false,category:"symbols"},wc:{keywords:["toilet","restroom","blue-square"],char:'🚾',fitzpatrick_scale:false,category:"symbols"},parking:{keywords:["cars","blue-square","alphabet","letter"],char:'🅿️',fitzpatrick_scale:false,category:"symbols"},potable_water:{keywords:["blue-square","liquid","restroom","cleaning","faucet"],char:'🚰',fitzpatrick_scale:false,category:"symbols"},mens:{keywords:["toilet","restroom","wc","blue-square","gender","male"],char:'🚹',fitzpatrick_scale:false,category:"symbols"},womens:{keywords:["purple-square","woman","female","toilet","loo","restroom","gender"],char:'🚺',fitzpatrick_scale:false,category:"symbols"},baby_symbol:{keywords:["orange-square","child"],char:'🚼',fitzpatrick_scale:false,category:"symbols"},restroom:{keywords:["blue-square","toilet","refresh","wc","gender"],char:'🚻',fitzpatrick_scale:false,category:"symbols"},put_litter_in_its_place:{keywords:["blue-square","sign","human","info"],char:'🚮',fitzpatrick_scale:false,category:"symbols"},cinema:{keywords:["blue-square","record","film","movie","curtain","stage","theater"],char:'🎦',fitzpatrick_scale:false,category:"symbols"},signal_strength:{keywords:["blue-square","reception","phone","internet","connection","wifi","bluetooth","bars"],char:'📶',fitzpatrick_scale:false,category:"symbols"},koko:{keywords:["blue-square","here","katakana","japanese","destination"],char:'🈁',fitzpatrick_scale:false,category:"symbols"},ng:{keywords:["blue-square","words","shape","icon"],char:'🆖',fitzpatrick_scale:false,category:"symbols"},ok:{keywords:["good","agree","yes","blue-square"],char:'🆗',fitzpatrick_scale:false,category:"symbols"},up:{keywords:["blue-square","above","high"],char:'🆙',fitzpatrick_scale:false,category:"symbols"},cool:{keywords:["words","blue-square"],char:'🆒',fitzpatrick_scale:false,category:"symbols"},new:{keywords:["blue-square","words","start"],char:'🆕',fitzpatrick_scale:false,category:"symbols"},free:{keywords:["blue-square","words"],char:'🆓',fitzpatrick_scale:false,category:"symbols"},zero:{keywords:["0","numbers","blue-square","null"],char:'0️⃣',fitzpatrick_scale:false,category:"symbols"},one:{keywords:["blue-square","numbers","1"],char:'1️⃣',fitzpatrick_scale:false,category:"symbols"},two:{keywords:["numbers","2","prime","blue-square"],char:'2️⃣',fitzpatrick_scale:false,category:"symbols"},three:{keywords:["3","numbers","prime","blue-square"],char:'3️⃣',fitzpatrick_scale:false,category:"symbols"},four:{keywords:["4","numbers","blue-square"],char:'4️⃣',fitzpatrick_scale:false,category:"symbols"},five:{keywords:["5","numbers","blue-square","prime"],char:'5️⃣',fitzpatrick_scale:false,category:"symbols"},six:{keywords:["6","numbers","blue-square"],char:'6️⃣',fitzpatrick_scale:false,category:"symbols"},seven:{keywords:["7","numbers","blue-square","prime"],char:'7️⃣',fitzpatrick_scale:false,category:"symbols"},eight:{keywords:["8","blue-square","numbers"],char:'8️⃣',fitzpatrick_scale:false,category:"symbols"},nine:{keywords:["blue-square","numbers","9"],char:'9️⃣',fitzpatrick_scale:false,category:"symbols"},keycap_ten:{keywords:["numbers","10","blue-square"],char:'🔟',fitzpatrick_scale:false,category:"symbols"},asterisk:{keywords:["star","keycap"],char:'*⃣',fitzpatrick_scale:false,category:"symbols"},eject_button:{keywords:["blue-square"],char:'⏏️',fitzpatrick_scale:false,category:"symbols"},arrow_forward:{keywords:["blue-square","right","direction","play"],char:'▶️',fitzpatrick_scale:false,category:"symbols"},pause_button:{keywords:["pause","blue-square"],char:'⏸',fitzpatrick_scale:false,category:"symbols"},next_track_button:{keywords:["forward","next","blue-square"],char:'⏭',fitzpatrick_scale:false,category:"symbols"},stop_button:{keywords:["blue-square"],char:'⏹',fitzpatrick_scale:false,category:"symbols"},record_button:{keywords:["blue-square"],char:'⏺',fitzpatrick_scale:false,category:"symbols"},play_or_pause_button:{keywords:["blue-square","play","pause"],char:'⏯',fitzpatrick_scale:false,category:"symbols"},previous_track_button:{keywords:["backward"],char:'⏮',fitzpatrick_scale:false,category:"symbols"},fast_forward:{keywords:["blue-square","play","speed","continue"],char:'⏩',fitzpatrick_scale:false,category:"symbols"},rewind:{keywords:["play","blue-square"],char:'⏪',fitzpatrick_scale:false,category:"symbols"},twisted_rightwards_arrows:{keywords:["blue-square","shuffle","music","random"],char:'🔀',fitzpatrick_scale:false,category:"symbols"},repeat:{keywords:["loop","record"],char:'🔁',fitzpatrick_scale:false,category:"symbols"},repeat_one:{keywords:["blue-square","loop"],char:'🔂',fitzpatrick_scale:false,category:"symbols"},arrow_backward:{keywords:["blue-square","left","direction"],char:'◀️',fitzpatrick_scale:false,category:"symbols"},arrow_up_small:{keywords:["blue-square","triangle","direction","point","forward","top"],char:'🔼',fitzpatrick_scale:false,category:"symbols"},arrow_down_small:{keywords:["blue-square","direction","bottom"],char:'🔽',fitzpatrick_scale:false,category:"symbols"},arrow_double_up:{keywords:["blue-square","direction","top"],char:'⏫',fitzpatrick_scale:false,category:"symbols"},arrow_double_down:{keywords:["blue-square","direction","bottom"],char:'⏬',fitzpatrick_scale:false,category:"symbols"},arrow_right:{keywords:["blue-square","next"],char:'➡️',fitzpatrick_scale:false,category:"symbols"},arrow_left:{keywords:["blue-square","previous","back"],char:'⬅️',fitzpatrick_scale:false,category:"symbols"},arrow_up:{keywords:["blue-square","continue","top","direction"],char:'⬆️',fitzpatrick_scale:false,category:"symbols"},arrow_down:{keywords:["blue-square","direction","bottom"],char:'⬇️',fitzpatrick_scale:false,category:"symbols"},arrow_upper_right:{keywords:["blue-square","point","direction","diagonal","northeast"],char:'↗️',fitzpatrick_scale:false,category:"symbols"},arrow_lower_right:{keywords:["blue-square","direction","diagonal","southeast"],char:'↘️',fitzpatrick_scale:false,category:"symbols"},arrow_lower_left:{keywords:["blue-square","direction","diagonal","southwest"],char:'↙️',fitzpatrick_scale:false,category:"symbols"},arrow_upper_left:{keywords:["blue-square","point","direction","diagonal","northwest"],char:'↖️',fitzpatrick_scale:false,category:"symbols"},arrow_up_down:{keywords:["blue-square","direction","way","vertical"],char:'↕️',fitzpatrick_scale:false,category:"symbols"},left_right_arrow:{keywords:["shape","direction","horizontal","sideways"],char:'↔️',fitzpatrick_scale:false,category:"symbols"},arrows_counterclockwise:{keywords:["blue-square","sync","cycle"],char:'🔄',fitzpatrick_scale:false,category:"symbols"},arrow_right_hook:{keywords:["blue-square","return","rotate","direction"],char:'↪️',fitzpatrick_scale:false,category:"symbols"},leftwards_arrow_with_hook:{keywords:["back","return","blue-square","undo","enter"],char:'↩️',fitzpatrick_scale:false,category:"symbols"},arrow_heading_up:{keywords:["blue-square","direction","top"],char:'⤴️',fitzpatrick_scale:false,category:"symbols"},arrow_heading_down:{keywords:["blue-square","direction","bottom"],char:'⤵️',fitzpatrick_scale:false,category:"symbols"},hash:{keywords:["symbol","blue-square","twitter"],char:'#️⃣',fitzpatrick_scale:false,category:"symbols"},information_source:{keywords:["blue-square","alphabet","letter"],char:'ℹ️',fitzpatrick_scale:false,category:"symbols"},abc:{keywords:["blue-square","alphabet"],char:'🔤',fitzpatrick_scale:false,category:"symbols"},abcd:{keywords:["blue-square","alphabet"],char:'🔡',fitzpatrick_scale:false,category:"symbols"},capital_abcd:{keywords:["alphabet","words","blue-square"],char:'🔠',fitzpatrick_scale:false,category:"symbols"},symbols:{keywords:["blue-square","music","note","ampersand","percent","glyphs","characters"],char:'🔣',fitzpatrick_scale:false,category:"symbols"},musical_note:{keywords:["score","tone","sound"],char:'🎵',fitzpatrick_scale:false,category:"symbols"},notes:{keywords:["music","score"],char:'🎶',fitzpatrick_scale:false,category:"symbols"},wavy_dash:{keywords:["draw","line","moustache","mustache","squiggle","scribble"],char:'〰️',fitzpatrick_scale:false,category:"symbols"},curly_loop:{keywords:["scribble","draw","shape","squiggle"],char:'➰',fitzpatrick_scale:false,category:"symbols"},heavy_check_mark:{keywords:["ok","nike","answer","yes","tick"],char:'✔️',fitzpatrick_scale:false,category:"symbols"},arrows_clockwise:{keywords:["sync","cycle","round","repeat"],char:'🔃',fitzpatrick_scale:false,category:"symbols"},heavy_plus_sign:{keywords:["math","calculation","addition","more","increase"],char:'➕',fitzpatrick_scale:false,category:"symbols"},heavy_minus_sign:{keywords:["math","calculation","subtract","less"],char:'➖',fitzpatrick_scale:false,category:"symbols"},heavy_division_sign:{keywords:["divide","math","calculation"],char:'➗',fitzpatrick_scale:false,category:"symbols"},heavy_multiplication_x:{keywords:["math","calculation"],char:'✖️',fitzpatrick_scale:false,category:"symbols"},infinity:{keywords:["forever"],char:'♾',fitzpatrick_scale:false,category:"symbols"},heavy_dollar_sign:{keywords:["money","sales","payment","currency","buck"],char:'💲',fitzpatrick_scale:false,category:"symbols"},currency_exchange:{keywords:["money","sales","dollar","travel"],char:'💱',fitzpatrick_scale:false,category:"symbols"},copyright:{keywords:["ip","license","circle","law","legal"],char:'©️',fitzpatrick_scale:false,category:"symbols"},registered:{keywords:["alphabet","circle"],char:'®️',fitzpatrick_scale:false,category:"symbols"},tm:{keywords:["trademark","brand","law","legal"],char:'™️',fitzpatrick_scale:false,category:"symbols"},end:{keywords:["words","arrow"],char:'🔚',fitzpatrick_scale:false,category:"symbols"},back:{keywords:["arrow","words","return"],char:'🔙',fitzpatrick_scale:false,category:"symbols"},on:{keywords:["arrow","words"],char:'🔛',fitzpatrick_scale:false,category:"symbols"},top:{keywords:["words","blue-square"],char:'🔝',fitzpatrick_scale:false,category:"symbols"},soon:{keywords:["arrow","words"],char:'🔜',fitzpatrick_scale:false,category:"symbols"},ballot_box_with_check:{keywords:["ok","agree","confirm","black-square","vote","election","yes","tick"],char:'☑️',fitzpatrick_scale:false,category:"symbols"},radio_button:{keywords:["input","old","music","circle"],char:'🔘',fitzpatrick_scale:false,category:"symbols"},white_circle:{keywords:["shape","round"],char:'⚪',fitzpatrick_scale:false,category:"symbols"},black_circle:{keywords:["shape","button","round"],char:'⚫',fitzpatrick_scale:false,category:"symbols"},red_circle:{keywords:["shape","error","danger"],char:'🔴',fitzpatrick_scale:false,category:"symbols"},large_blue_circle:{keywords:["shape","icon","button"],char:'🔵',fitzpatrick_scale:false,category:"symbols"},small_orange_diamond:{keywords:["shape","jewel","gem"],char:'🔸',fitzpatrick_scale:false,category:"symbols"},small_blue_diamond:{keywords:["shape","jewel","gem"],char:'🔹',fitzpatrick_scale:false,category:"symbols"},large_orange_diamond:{keywords:["shape","jewel","gem"],char:'🔶',fitzpatrick_scale:false,category:"symbols"},large_blue_diamond:{keywords:["shape","jewel","gem"],char:'🔷',fitzpatrick_scale:false,category:"symbols"},small_red_triangle:{keywords:["shape","direction","up","top"],char:'🔺',fitzpatrick_scale:false,category:"symbols"},black_small_square:{keywords:["shape","icon"],char:'▪️',fitzpatrick_scale:false,category:"symbols"},white_small_square:{keywords:["shape","icon"],char:'▫️',fitzpatrick_scale:false,category:"symbols"},black_large_square:{keywords:["shape","icon","button"],char:'⬛',fitzpatrick_scale:false,category:"symbols"},white_large_square:{keywords:["shape","icon","stone","button"],char:'⬜',fitzpatrick_scale:false,category:"symbols"},small_red_triangle_down:{keywords:["shape","direction","bottom"],char:'🔻',fitzpatrick_scale:false,category:"symbols"},black_medium_square:{keywords:["shape","button","icon"],char:'◼️',fitzpatrick_scale:false,category:"symbols"},white_medium_square:{keywords:["shape","stone","icon"],char:'◻️',fitzpatrick_scale:false,category:"symbols"},black_medium_small_square:{keywords:["icon","shape","button"],char:'◾',fitzpatrick_scale:false,category:"symbols"},white_medium_small_square:{keywords:["shape","stone","icon","button"],char:'◽',fitzpatrick_scale:false,category:"symbols"},black_square_button:{keywords:["shape","input","frame"],char:'🔲',fitzpatrick_scale:false,category:"symbols"},white_square_button:{keywords:["shape","input"],char:'🔳',fitzpatrick_scale:false,category:"symbols"},speaker:{keywords:["sound","volume","silence","broadcast"],char:'🔈',fitzpatrick_scale:false,category:"symbols"},sound:{keywords:["volume","speaker","broadcast"],char:'🔉',fitzpatrick_scale:false,category:"symbols"},loud_sound:{keywords:["volume","noise","noisy","speaker","broadcast"],char:'🔊',fitzpatrick_scale:false,category:"symbols"},mute:{keywords:["sound","volume","silence","quiet"],char:'🔇',fitzpatrick_scale:false,category:"symbols"},mega:{keywords:["sound","speaker","volume"],char:'📣',fitzpatrick_scale:false,category:"symbols"},loudspeaker:{keywords:["volume","sound"],char:'📢',fitzpatrick_scale:false,category:"symbols"},bell:{keywords:["sound","notification","christmas","xmas","chime"],char:'🔔',fitzpatrick_scale:false,category:"symbols"},no_bell:{keywords:["sound","volume","mute","quiet","silent"],char:'🔕',fitzpatrick_scale:false,category:"symbols"},black_joker:{keywords:["poker","cards","game","play","magic"],char:'🃏',fitzpatrick_scale:false,category:"symbols"},mahjong:{keywords:["game","play","chinese","kanji"],char:'🀄',fitzpatrick_scale:false,category:"symbols"},spades:{keywords:["poker","cards","suits","magic"],char:'♠️',fitzpatrick_scale:false,category:"symbols"},clubs:{keywords:["poker","cards","magic","suits"],char:'♣️',fitzpatrick_scale:false,category:"symbols"},hearts:{keywords:["poker","cards","magic","suits"],char:'♥️',fitzpatrick_scale:false,category:"symbols"},diamonds:{keywords:["poker","cards","magic","suits"],char:'♦️',fitzpatrick_scale:false,category:"symbols"},flower_playing_cards:{keywords:["game","sunset","red"],char:'🎴',fitzpatrick_scale:false,category:"symbols"},thought_balloon:{keywords:["bubble","cloud","speech","thinking","dream"],char:'💭',fitzpatrick_scale:false,category:"symbols"},right_anger_bubble:{keywords:["caption","speech","thinking","mad"],char:'🗯',fitzpatrick_scale:false,category:"symbols"},speech_balloon:{keywords:["bubble","words","message","talk","chatting"],char:'💬',fitzpatrick_scale:false,category:"symbols"},left_speech_bubble:{keywords:["words","message","talk","chatting"],char:'🗨',fitzpatrick_scale:false,category:"symbols"},clock1:{keywords:["time","late","early","schedule"],char:'🕐',fitzpatrick_scale:false,category:"symbols"},clock2:{keywords:["time","late","early","schedule"],char:'🕑',fitzpatrick_scale:false,category:"symbols"},clock3:{keywords:["time","late","early","schedule"],char:'🕒',fitzpatrick_scale:false,category:"symbols"},clock4:{keywords:["time","late","early","schedule"],char:'🕓',fitzpatrick_scale:false,category:"symbols"},clock5:{keywords:["time","late","early","schedule"],char:'🕔',fitzpatrick_scale:false,category:"symbols"},clock6:{keywords:["time","late","early","schedule","dawn","dusk"],char:'🕕',fitzpatrick_scale:false,category:"symbols"},clock7:{keywords:["time","late","early","schedule"],char:'🕖',fitzpatrick_scale:false,category:"symbols"},clock8:{keywords:["time","late","early","schedule"],char:'🕗',fitzpatrick_scale:false,category:"symbols"},clock9:{keywords:["time","late","early","schedule"],char:'🕘',fitzpatrick_scale:false,category:"symbols"},clock10:{keywords:["time","late","early","schedule"],char:'🕙',fitzpatrick_scale:false,category:"symbols"},clock11:{keywords:["time","late","early","schedule"],char:'🕚',fitzpatrick_scale:false,category:"symbols"},clock12:{keywords:["time","noon","midnight","midday","late","early","schedule"],char:'🕛',fitzpatrick_scale:false,category:"symbols"},clock130:{keywords:["time","late","early","schedule"],char:'🕜',fitzpatrick_scale:false,category:"symbols"},clock230:{keywords:["time","late","early","schedule"],char:'🕝',fitzpatrick_scale:false,category:"symbols"},clock330:{keywords:["time","late","early","schedule"],char:'🕞',fitzpatrick_scale:false,category:"symbols"},clock430:{keywords:["time","late","early","schedule"],char:'🕟',fitzpatrick_scale:false,category:"symbols"},clock530:{keywords:["time","late","early","schedule"],char:'🕠',fitzpatrick_scale:false,category:"symbols"},clock630:{keywords:["time","late","early","schedule"],char:'🕡',fitzpatrick_scale:false,category:"symbols"},clock730:{keywords:["time","late","early","schedule"],char:'🕢',fitzpatrick_scale:false,category:"symbols"},clock830:{keywords:["time","late","early","schedule"],char:'🕣',fitzpatrick_scale:false,category:"symbols"},clock930:{keywords:["time","late","early","schedule"],char:'🕤',fitzpatrick_scale:false,category:"symbols"},clock1030:{keywords:["time","late","early","schedule"],char:'🕥',fitzpatrick_scale:false,category:"symbols"},clock1130:{keywords:["time","late","early","schedule"],char:'🕦',fitzpatrick_scale:false,category:"symbols"},clock1230:{keywords:["time","late","early","schedule"],char:'🕧',fitzpatrick_scale:false,category:"symbols"},afghanistan:{keywords:["af","flag","nation","country","banner"],char:'🇦🇫',fitzpatrick_scale:false,category:"flags"},aland_islands:{keywords:["Åland","islands","flag","nation","country","banner"],char:'🇦🇽',fitzpatrick_scale:false,category:"flags"},albania:{keywords:["al","flag","nation","country","banner"],char:'🇦🇱',fitzpatrick_scale:false,category:"flags"},algeria:{keywords:["dz","flag","nation","country","banner"],char:'🇩🇿',fitzpatrick_scale:false,category:"flags"},american_samoa:{keywords:["american","ws","flag","nation","country","banner"],char:'🇦🇸',fitzpatrick_scale:false,category:"flags"},andorra:{keywords:["ad","flag","nation","country","banner"],char:'🇦🇩',fitzpatrick_scale:false,category:"flags"},angola:{keywords:["ao","flag","nation","country","banner"],char:'🇦🇴',fitzpatrick_scale:false,category:"flags"},anguilla:{keywords:["ai","flag","nation","country","banner"],char:'🇦🇮',fitzpatrick_scale:false,category:"flags"},antarctica:{keywords:["aq","flag","nation","country","banner"],char:'🇦🇶',fitzpatrick_scale:false,category:"flags"},antigua_barbuda:{keywords:["antigua","barbuda","flag","nation","country","banner"],char:'🇦🇬',fitzpatrick_scale:false,category:"flags"},argentina:{keywords:["ar","flag","nation","country","banner"],char:'🇦🇷',fitzpatrick_scale:false,category:"flags"},armenia:{keywords:["am","flag","nation","country","banner"],char:'🇦🇲',fitzpatrick_scale:false,category:"flags"},aruba:{keywords:["aw","flag","nation","country","banner"],char:'🇦🇼',fitzpatrick_scale:false,category:"flags"},australia:{keywords:["au","flag","nation","country","banner"],char:'🇦🇺',fitzpatrick_scale:false,category:"flags"},austria:{keywords:["at","flag","nation","country","banner"],char:'🇦🇹',fitzpatrick_scale:false,category:"flags"},azerbaijan:{keywords:["az","flag","nation","country","banner"],char:'🇦🇿',fitzpatrick_scale:false,category:"flags"},bahamas:{keywords:["bs","flag","nation","country","banner"],char:'🇧🇸',fitzpatrick_scale:false,category:"flags"},bahrain:{keywords:["bh","flag","nation","country","banner"],char:'🇧🇭',fitzpatrick_scale:false,category:"flags"},bangladesh:{keywords:["bd","flag","nation","country","banner"],char:'🇧🇩',fitzpatrick_scale:false,category:"flags"},barbados:{keywords:["bb","flag","nation","country","banner"],char:'🇧🇧',fitzpatrick_scale:false,category:"flags"},belarus:{keywords:["by","flag","nation","country","banner"],char:'🇧🇾',fitzpatrick_scale:false,category:"flags"},belgium:{keywords:["be","flag","nation","country","banner"],char:'🇧🇪',fitzpatrick_scale:false,category:"flags"},belize:{keywords:["bz","flag","nation","country","banner"],char:'🇧🇿',fitzpatrick_scale:false,category:"flags"},benin:{keywords:["bj","flag","nation","country","banner"],char:'🇧🇯',fitzpatrick_scale:false,category:"flags"},bermuda:{keywords:["bm","flag","nation","country","banner"],char:'🇧🇲',fitzpatrick_scale:false,category:"flags"},bhutan:{keywords:["bt","flag","nation","country","banner"],char:'🇧🇹',fitzpatrick_scale:false,category:"flags"},bolivia:{keywords:["bo","flag","nation","country","banner"],char:'🇧🇴',fitzpatrick_scale:false,category:"flags"},caribbean_netherlands:{keywords:["bonaire","flag","nation","country","banner"],char:'🇧🇶',fitzpatrick_scale:false,category:"flags"},bosnia_herzegovina:{keywords:["bosnia","herzegovina","flag","nation","country","banner"],char:'🇧🇦',fitzpatrick_scale:false,category:"flags"},botswana:{keywords:["bw","flag","nation","country","banner"],char:'🇧🇼',fitzpatrick_scale:false,category:"flags"},brazil:{keywords:["br","flag","nation","country","banner"],char:'🇧🇷',fitzpatrick_scale:false,category:"flags"},british_indian_ocean_territory:{keywords:["british","indian","ocean","territory","flag","nation","country","banner"],char:'🇮🇴',fitzpatrick_scale:false,category:"flags"},british_virgin_islands:{keywords:["british","virgin","islands","bvi","flag","nation","country","banner"],char:'🇻🇬',fitzpatrick_scale:false,category:"flags"},brunei:{keywords:["bn","darussalam","flag","nation","country","banner"],char:'🇧🇳',fitzpatrick_scale:false,category:"flags"},bulgaria:{keywords:["bg","flag","nation","country","banner"],char:'🇧🇬',fitzpatrick_scale:false,category:"flags"},burkina_faso:{keywords:["burkina","faso","flag","nation","country","banner"],char:'🇧🇫',fitzpatrick_scale:false,category:"flags"},burundi:{keywords:["bi","flag","nation","country","banner"],char:'🇧🇮',fitzpatrick_scale:false,category:"flags"},cape_verde:{keywords:["cabo","verde","flag","nation","country","banner"],char:'🇨🇻',fitzpatrick_scale:false,category:"flags"},cambodia:{keywords:["kh","flag","nation","country","banner"],char:'🇰🇭',fitzpatrick_scale:false,category:"flags"},cameroon:{keywords:["cm","flag","nation","country","banner"],char:'🇨🇲',fitzpatrick_scale:false,category:"flags"},canada:{keywords:["ca","flag","nation","country","banner"],char:'🇨🇦',fitzpatrick_scale:false,category:"flags"},canary_islands:{keywords:["canary","islands","flag","nation","country","banner"],char:'🇮🇨',fitzpatrick_scale:false,category:"flags"},cayman_islands:{keywords:["cayman","islands","flag","nation","country","banner"],char:'🇰🇾',fitzpatrick_scale:false,category:"flags"},central_african_republic:{keywords:["central","african","republic","flag","nation","country","banner"],char:'🇨🇫',fitzpatrick_scale:false,category:"flags"},chad:{keywords:["td","flag","nation","country","banner"],char:'🇹🇩',fitzpatrick_scale:false,category:"flags"},chile:{keywords:["flag","nation","country","banner"],char:'🇨🇱',fitzpatrick_scale:false,category:"flags"},cn:{keywords:["china","chinese","prc","flag","country","nation","banner"],char:'🇨🇳',fitzpatrick_scale:false,category:"flags"},christmas_island:{keywords:["christmas","island","flag","nation","country","banner"],char:'🇨🇽',fitzpatrick_scale:false,category:"flags"},cocos_islands:{keywords:["cocos","keeling","islands","flag","nation","country","banner"],char:'🇨🇨',fitzpatrick_scale:false,category:"flags"},colombia:{keywords:["co","flag","nation","country","banner"],char:'🇨🇴',fitzpatrick_scale:false,category:"flags"},comoros:{keywords:["km","flag","nation","country","banner"],char:'🇰🇲',fitzpatrick_scale:false,category:"flags"},congo_brazzaville:{keywords:["congo","flag","nation","country","banner"],char:'🇨🇬',fitzpatrick_scale:false,category:"flags"},congo_kinshasa:{keywords:["congo","democratic","republic","flag","nation","country","banner"],char:'🇨🇩',fitzpatrick_scale:false,category:"flags"},cook_islands:{keywords:["cook","islands","flag","nation","country","banner"],char:'🇨🇰',fitzpatrick_scale:false,category:"flags"},costa_rica:{keywords:["costa","rica","flag","nation","country","banner"],char:'🇨🇷',fitzpatrick_scale:false,category:"flags"},croatia:{keywords:["hr","flag","nation","country","banner"],char:'🇭🇷',fitzpatrick_scale:false,category:"flags"},cuba:{keywords:["cu","flag","nation","country","banner"],char:'🇨🇺',fitzpatrick_scale:false,category:"flags"},curacao:{keywords:["curaçao","flag","nation","country","banner"],char:'🇨🇼',fitzpatrick_scale:false,category:"flags"},cyprus:{keywords:["cy","flag","nation","country","banner"],char:'🇨🇾',fitzpatrick_scale:false,category:"flags"},czech_republic:{keywords:["cz","flag","nation","country","banner"],char:'🇨🇿',fitzpatrick_scale:false,category:"flags"},denmark:{keywords:["dk","flag","nation","country","banner"],char:'🇩🇰',fitzpatrick_scale:false,category:"flags"},djibouti:{keywords:["dj","flag","nation","country","banner"],char:'🇩🇯',fitzpatrick_scale:false,category:"flags"},dominica:{keywords:["dm","flag","nation","country","banner"],char:'🇩🇲',fitzpatrick_scale:false,category:"flags"},dominican_republic:{keywords:["dominican","republic","flag","nation","country","banner"],char:'🇩🇴',fitzpatrick_scale:false,category:"flags"},ecuador:{keywords:["ec","flag","nation","country","banner"],char:'🇪🇨',fitzpatrick_scale:false,category:"flags"},egypt:{keywords:["eg","flag","nation","country","banner"],char:'🇪🇬',fitzpatrick_scale:false,category:"flags"},el_salvador:{keywords:["el","salvador","flag","nation","country","banner"],char:'🇸🇻',fitzpatrick_scale:false,category:"flags"},equatorial_guinea:{keywords:["equatorial","gn","flag","nation","country","banner"],char:'🇬🇶',fitzpatrick_scale:false,category:"flags"},eritrea:{keywords:["er","flag","nation","country","banner"],char:'🇪🇷',fitzpatrick_scale:false,category:"flags"},estonia:{keywords:["ee","flag","nation","country","banner"],char:'🇪🇪',fitzpatrick_scale:false,category:"flags"},ethiopia:{keywords:["et","flag","nation","country","banner"],char:'🇪🇹',fitzpatrick_scale:false,category:"flags"},eu:{keywords:["european","union","flag","banner"],char:'🇪🇺',fitzpatrick_scale:false,category:"flags"},falkland_islands:{keywords:["falkland","islands","malvinas","flag","nation","country","banner"],char:'🇫🇰',fitzpatrick_scale:false,category:"flags"},faroe_islands:{keywords:["faroe","islands","flag","nation","country","banner"],char:'🇫🇴',fitzpatrick_scale:false,category:"flags"},fiji:{keywords:["fj","flag","nation","country","banner"],char:'🇫🇯',fitzpatrick_scale:false,category:"flags"},finland:{keywords:["fi","flag","nation","country","banner"],char:'🇫🇮',fitzpatrick_scale:false,category:"flags"},fr:{keywords:["banner","flag","nation","france","french","country"],char:'🇫🇷',fitzpatrick_scale:false,category:"flags"},french_guiana:{keywords:["french","guiana","flag","nation","country","banner"],char:'🇬🇫',fitzpatrick_scale:false,category:"flags"},french_polynesia:{keywords:["french","polynesia","flag","nation","country","banner"],char:'🇵🇫',fitzpatrick_scale:false,category:"flags"},french_southern_territories:{keywords:["french","southern","territories","flag","nation","country","banner"],char:'🇹🇫',fitzpatrick_scale:false,category:"flags"},gabon:{keywords:["ga","flag","nation","country","banner"],char:'🇬🇦',fitzpatrick_scale:false,category:"flags"},gambia:{keywords:["gm","flag","nation","country","banner"],char:'🇬🇲',fitzpatrick_scale:false,category:"flags"},georgia:{keywords:["ge","flag","nation","country","banner"],char:'🇬🇪',fitzpatrick_scale:false,category:"flags"},de:{keywords:["german","nation","flag","country","banner"],char:'🇩🇪',fitzpatrick_scale:false,category:"flags"},ghana:{keywords:["gh","flag","nation","country","banner"],char:'🇬🇭',fitzpatrick_scale:false,category:"flags"},gibraltar:{keywords:["gi","flag","nation","country","banner"],char:'🇬🇮',fitzpatrick_scale:false,category:"flags"},greece:{keywords:["gr","flag","nation","country","banner"],char:'🇬🇷',fitzpatrick_scale:false,category:"flags"},greenland:{keywords:["gl","flag","nation","country","banner"],char:'🇬🇱',fitzpatrick_scale:false,category:"flags"},grenada:{keywords:["gd","flag","nation","country","banner"],char:'🇬🇩',fitzpatrick_scale:false,category:"flags"},guadeloupe:{keywords:["gp","flag","nation","country","banner"],char:'🇬🇵',fitzpatrick_scale:false,category:"flags"},guam:{keywords:["gu","flag","nation","country","banner"],char:'🇬🇺',fitzpatrick_scale:false,category:"flags"},guatemala:{keywords:["gt","flag","nation","country","banner"],char:'🇬🇹',fitzpatrick_scale:false,category:"flags"},guernsey:{keywords:["gg","flag","nation","country","banner"],char:'🇬🇬',fitzpatrick_scale:false,category:"flags"},guinea:{keywords:["gn","flag","nation","country","banner"],char:'🇬🇳',fitzpatrick_scale:false,category:"flags"},guinea_bissau:{keywords:["gw","bissau","flag","nation","country","banner"],char:'🇬🇼',fitzpatrick_scale:false,category:"flags"},guyana:{keywords:["gy","flag","nation","country","banner"],char:'🇬🇾',fitzpatrick_scale:false,category:"flags"},haiti:{keywords:["ht","flag","nation","country","banner"],char:'🇭🇹',fitzpatrick_scale:false,category:"flags"},honduras:{keywords:["hn","flag","nation","country","banner"],char:'🇭🇳',fitzpatrick_scale:false,category:"flags"},hong_kong:{keywords:["hong","kong","flag","nation","country","banner"],char:'🇭🇰',fitzpatrick_scale:false,category:"flags"},hungary:{keywords:["hu","flag","nation","country","banner"],char:'🇭🇺',fitzpatrick_scale:false,category:"flags"},iceland:{keywords:["is","flag","nation","country","banner"],char:'🇮🇸',fitzpatrick_scale:false,category:"flags"},india:{keywords:["in","flag","nation","country","banner"],char:'🇮🇳',fitzpatrick_scale:false,category:"flags"},indonesia:{keywords:["flag","nation","country","banner"],char:'🇮🇩',fitzpatrick_scale:false,category:"flags"},iran:{keywords:["iran,","islamic","republic","flag","nation","country","banner"],char:'🇮🇷',fitzpatrick_scale:false,category:"flags"},iraq:{keywords:["iq","flag","nation","country","banner"],char:'🇮🇶',fitzpatrick_scale:false,category:"flags"},ireland:{keywords:["ie","flag","nation","country","banner"],char:'🇮🇪',fitzpatrick_scale:false,category:"flags"},isle_of_man:{keywords:["isle","man","flag","nation","country","banner"],char:'🇮🇲',fitzpatrick_scale:false,category:"flags"},israel:{keywords:["il","flag","nation","country","banner"],char:'🇮🇱',fitzpatrick_scale:false,category:"flags"},it:{keywords:["italy","flag","nation","country","banner"],char:'🇮🇹',fitzpatrick_scale:false,category:"flags"},cote_divoire:{keywords:["ivory","coast","flag","nation","country","banner"],char:'🇨🇮',fitzpatrick_scale:false,category:"flags"},jamaica:{keywords:["jm","flag","nation","country","banner"],char:'🇯🇲',fitzpatrick_scale:false,category:"flags"},jp:{keywords:["japanese","nation","flag","country","banner"],char:'🇯🇵',fitzpatrick_scale:false,category:"flags"},jersey:{keywords:["je","flag","nation","country","banner"],char:'🇯🇪',fitzpatrick_scale:false,category:"flags"},jordan:{keywords:["jo","flag","nation","country","banner"],char:'🇯🇴',fitzpatrick_scale:false,category:"flags"},kazakhstan:{keywords:["kz","flag","nation","country","banner"],char:'🇰🇿',fitzpatrick_scale:false,category:"flags"},kenya:{keywords:["ke","flag","nation","country","banner"],char:'🇰🇪',fitzpatrick_scale:false,category:"flags"},kiribati:{keywords:["ki","flag","nation","country","banner"],char:'🇰🇮',fitzpatrick_scale:false,category:"flags"},kosovo:{keywords:["xk","flag","nation","country","banner"],char:'🇽🇰',fitzpatrick_scale:false,category:"flags"},kuwait:{keywords:["kw","flag","nation","country","banner"],char:'🇰🇼',fitzpatrick_scale:false,category:"flags"},kyrgyzstan:{keywords:["kg","flag","nation","country","banner"],char:'🇰🇬',fitzpatrick_scale:false,category:"flags"},laos:{keywords:["lao","democratic","republic","flag","nation","country","banner"],char:'🇱🇦',fitzpatrick_scale:false,category:"flags"},latvia:{keywords:["lv","flag","nation","country","banner"],char:'🇱🇻',fitzpatrick_scale:false,category:"flags"},lebanon:{keywords:["lb","flag","nation","country","banner"],char:'🇱🇧',fitzpatrick_scale:false,category:"flags"},lesotho:{keywords:["ls","flag","nation","country","banner"],char:'🇱🇸',fitzpatrick_scale:false,category:"flags"},liberia:{keywords:["lr","flag","nation","country","banner"],char:'🇱🇷',fitzpatrick_scale:false,category:"flags"},libya:{keywords:["ly","flag","nation","country","banner"],char:'🇱🇾',fitzpatrick_scale:false,category:"flags"},liechtenstein:{keywords:["li","flag","nation","country","banner"],char:'🇱🇮',fitzpatrick_scale:false,category:"flags"},lithuania:{keywords:["lt","flag","nation","country","banner"],char:'🇱🇹',fitzpatrick_scale:false,category:"flags"},luxembourg:{keywords:["lu","flag","nation","country","banner"],char:'🇱🇺',fitzpatrick_scale:false,category:"flags"},macau:{keywords:["macao","flag","nation","country","banner"],char:'🇲🇴',fitzpatrick_scale:false,category:"flags"},macedonia:{keywords:["macedonia,","flag","nation","country","banner"],char:'🇲🇰',fitzpatrick_scale:false,category:"flags"},madagascar:{keywords:["mg","flag","nation","country","banner"],char:'🇲🇬',fitzpatrick_scale:false,category:"flags"},malawi:{keywords:["mw","flag","nation","country","banner"],char:'🇲🇼',fitzpatrick_scale:false,category:"flags"},malaysia:{keywords:["my","flag","nation","country","banner"],char:'🇲🇾',fitzpatrick_scale:false,category:"flags"},maldives:{keywords:["mv","flag","nation","country","banner"],char:'🇲🇻',fitzpatrick_scale:false,category:"flags"},mali:{keywords:["ml","flag","nation","country","banner"],char:'🇲🇱',fitzpatrick_scale:false,category:"flags"},malta:{keywords:["mt","flag","nation","country","banner"],char:'🇲🇹',fitzpatrick_scale:false,category:"flags"},marshall_islands:{keywords:["marshall","islands","flag","nation","country","banner"],char:'🇲🇭',fitzpatrick_scale:false,category:"flags"},martinique:{keywords:["mq","flag","nation","country","banner"],char:'🇲🇶',fitzpatrick_scale:false,category:"flags"},mauritania:{keywords:["mr","flag","nation","country","banner"],char:'🇲🇷',fitzpatrick_scale:false,category:"flags"},mauritius:{keywords:["mu","flag","nation","country","banner"],char:'🇲🇺',fitzpatrick_scale:false,category:"flags"},mayotte:{keywords:["yt","flag","nation","country","banner"],char:'🇾🇹',fitzpatrick_scale:false,category:"flags"},mexico:{keywords:["mx","flag","nation","country","banner"],char:'🇲🇽',fitzpatrick_scale:false,category:"flags"},micronesia:{keywords:["micronesia,","federated","states","flag","nation","country","banner"],char:'🇫🇲',fitzpatrick_scale:false,category:"flags"},moldova:{keywords:["moldova,","republic","flag","nation","country","banner"],char:'🇲🇩',fitzpatrick_scale:false,category:"flags"},monaco:{keywords:["mc","flag","nation","country","banner"],char:'🇲🇨',fitzpatrick_scale:false,category:"flags"},mongolia:{keywords:["mn","flag","nation","country","banner"],char:'🇲🇳',fitzpatrick_scale:false,category:"flags"},montenegro:{keywords:["me","flag","nation","country","banner"],char:'🇲🇪',fitzpatrick_scale:false,category:"flags"},montserrat:{keywords:["ms","flag","nation","country","banner"],char:'🇲🇸',fitzpatrick_scale:false,category:"flags"},morocco:{keywords:["ma","flag","nation","country","banner"],char:'🇲🇦',fitzpatrick_scale:false,category:"flags"},mozambique:{keywords:["mz","flag","nation","country","banner"],char:'🇲🇿',fitzpatrick_scale:false,category:"flags"},myanmar:{keywords:["mm","flag","nation","country","banner"],char:'🇲🇲',fitzpatrick_scale:false,category:"flags"},namibia:{keywords:["na","flag","nation","country","banner"],char:'🇳🇦',fitzpatrick_scale:false,category:"flags"},nauru:{keywords:["nr","flag","nation","country","banner"],char:'🇳🇷',fitzpatrick_scale:false,category:"flags"},nepal:{keywords:["np","flag","nation","country","banner"],char:'🇳🇵',fitzpatrick_scale:false,category:"flags"},netherlands:{keywords:["nl","flag","nation","country","banner"],char:'🇳🇱',fitzpatrick_scale:false,category:"flags"},new_caledonia:{keywords:["new","caledonia","flag","nation","country","banner"],char:'🇳🇨',fitzpatrick_scale:false,category:"flags"},new_zealand:{keywords:["new","zealand","flag","nation","country","banner"],char:'🇳🇿',fitzpatrick_scale:false,category:"flags"},nicaragua:{keywords:["ni","flag","nation","country","banner"],char:'🇳🇮',fitzpatrick_scale:false,category:"flags"},niger:{keywords:["ne","flag","nation","country","banner"],char:'🇳🇪',fitzpatrick_scale:false,category:"flags"},nigeria:{keywords:["flag","nation","country","banner"],char:'🇳🇬',fitzpatrick_scale:false,category:"flags"},niue:{keywords:["nu","flag","nation","country","banner"],char:'🇳🇺',fitzpatrick_scale:false,category:"flags"},norfolk_island:{keywords:["norfolk","island","flag","nation","country","banner"],char:'🇳🇫',fitzpatrick_scale:false,category:"flags"},northern_mariana_islands:{keywords:["northern","mariana","islands","flag","nation","country","banner"],char:'🇲🇵',fitzpatrick_scale:false,category:"flags"},north_korea:{keywords:["north","korea","nation","flag","country","banner"],char:'🇰🇵',fitzpatrick_scale:false,category:"flags"},norway:{keywords:["no","flag","nation","country","banner"],char:'🇳🇴',fitzpatrick_scale:false,category:"flags"},oman:{keywords:["om_symbol","flag","nation","country","banner"],char:'🇴🇲',fitzpatrick_scale:false,category:"flags"},pakistan:{keywords:["pk","flag","nation","country","banner"],char:'🇵🇰',fitzpatrick_scale:false,category:"flags"},palau:{keywords:["pw","flag","nation","country","banner"],char:'🇵🇼',fitzpatrick_scale:false,category:"flags"},palestinian_territories:{keywords:["palestine","palestinian","territories","flag","nation","country","banner"],char:'🇵🇸',fitzpatrick_scale:false,category:"flags"},panama:{keywords:["pa","flag","nation","country","banner"],char:'🇵🇦',fitzpatrick_scale:false,category:"flags"},papua_new_guinea:{keywords:["papua","new","guinea","flag","nation","country","banner"],char:'🇵🇬',fitzpatrick_scale:false,category:"flags"},paraguay:{keywords:["py","flag","nation","country","banner"],char:'🇵🇾',fitzpatrick_scale:false,category:"flags"},peru:{keywords:["pe","flag","nation","country","banner"],char:'🇵🇪',fitzpatrick_scale:false,category:"flags"},philippines:{keywords:["ph","flag","nation","country","banner"],char:'🇵🇭',fitzpatrick_scale:false,category:"flags"},pitcairn_islands:{keywords:["pitcairn","flag","nation","country","banner"],char:'🇵🇳',fitzpatrick_scale:false,category:"flags"},poland:{keywords:["pl","flag","nation","country","banner"],char:'🇵🇱',fitzpatrick_scale:false,category:"flags"},portugal:{keywords:["pt","flag","nation","country","banner"],char:'🇵🇹',fitzpatrick_scale:false,category:"flags"},puerto_rico:{keywords:["puerto","rico","flag","nation","country","banner"],char:'🇵🇷',fitzpatrick_scale:false,category:"flags"},qatar:{keywords:["qa","flag","nation","country","banner"],char:'🇶🇦',fitzpatrick_scale:false,category:"flags"},reunion:{keywords:["réunion","flag","nation","country","banner"],char:'🇷🇪',fitzpatrick_scale:false,category:"flags"},romania:{keywords:["ro","flag","nation","country","banner"],char:'🇷🇴',fitzpatrick_scale:false,category:"flags"},ru:{keywords:["russian","federation","flag","nation","country","banner"],char:'🇷🇺',fitzpatrick_scale:false,category:"flags"},rwanda:{keywords:["rw","flag","nation","country","banner"],char:'🇷🇼',fitzpatrick_scale:false,category:"flags"},st_barthelemy:{keywords:["saint","barthélemy","flag","nation","country","banner"],char:'🇧🇱',fitzpatrick_scale:false,category:"flags"},st_helena:{keywords:["saint","helena","ascension","tristan","cunha","flag","nation","country","banner"],char:'🇸🇭',fitzpatrick_scale:false,category:"flags"},st_kitts_nevis:{keywords:["saint","kitts","nevis","flag","nation","country","banner"],char:'🇰🇳',fitzpatrick_scale:false,category:"flags"},st_lucia:{keywords:["saint","lucia","flag","nation","country","banner"],char:'🇱🇨',fitzpatrick_scale:false,category:"flags"},st_pierre_miquelon:{keywords:["saint","pierre","miquelon","flag","nation","country","banner"],char:'🇵🇲',fitzpatrick_scale:false,category:"flags"},st_vincent_grenadines:{keywords:["saint","vincent","grenadines","flag","nation","country","banner"],char:'🇻🇨',fitzpatrick_scale:false,category:"flags"},samoa:{keywords:["ws","flag","nation","country","banner"],char:'🇼🇸',fitzpatrick_scale:false,category:"flags"},san_marino:{keywords:["san","marino","flag","nation","country","banner"],char:'🇸🇲',fitzpatrick_scale:false,category:"flags"},sao_tome_principe:{keywords:["sao","tome","principe","flag","nation","country","banner"],char:'🇸🇹',fitzpatrick_scale:false,category:"flags"},saudi_arabia:{keywords:["flag","nation","country","banner"],char:'🇸🇦',fitzpatrick_scale:false,category:"flags"},senegal:{keywords:["sn","flag","nation","country","banner"],char:'🇸🇳',fitzpatrick_scale:false,category:"flags"},serbia:{keywords:["rs","flag","nation","country","banner"],char:'🇷🇸',fitzpatrick_scale:false,category:"flags"},seychelles:{keywords:["sc","flag","nation","country","banner"],char:'🇸🇨',fitzpatrick_scale:false,category:"flags"},sierra_leone:{keywords:["sierra","leone","flag","nation","country","banner"],char:'🇸🇱',fitzpatrick_scale:false,category:"flags"},singapore:{keywords:["sg","flag","nation","country","banner"],char:'🇸🇬',fitzpatrick_scale:false,category:"flags"},sint_maarten:{keywords:["sint","maarten","dutch","flag","nation","country","banner"],char:'🇸🇽',fitzpatrick_scale:false,category:"flags"},slovakia:{keywords:["sk","flag","nation","country","banner"],char:'🇸🇰',fitzpatrick_scale:false,category:"flags"},slovenia:{keywords:["si","flag","nation","country","banner"],char:'🇸🇮',fitzpatrick_scale:false,category:"flags"},solomon_islands:{keywords:["solomon","islands","flag","nation","country","banner"],char:'🇸🇧',fitzpatrick_scale:false,category:"flags"},somalia:{keywords:["so","flag","nation","country","banner"],char:'🇸🇴',fitzpatrick_scale:false,category:"flags"},south_africa:{keywords:["south","africa","flag","nation","country","banner"],char:'🇿🇦',fitzpatrick_scale:false,category:"flags"},south_georgia_south_sandwich_islands:{keywords:["south","georgia","sandwich","islands","flag","nation","country","banner"],char:'🇬🇸',fitzpatrick_scale:false,category:"flags"},kr:{keywords:["south","korea","nation","flag","country","banner"],char:'🇰🇷',fitzpatrick_scale:false,category:"flags"},south_sudan:{keywords:["south","sd","flag","nation","country","banner"],char:'🇸🇸',fitzpatrick_scale:false,category:"flags"},es:{keywords:["spain","flag","nation","country","banner"],char:'🇪🇸',fitzpatrick_scale:false,category:"flags"},sri_lanka:{keywords:["sri","lanka","flag","nation","country","banner"],char:'🇱🇰',fitzpatrick_scale:false,category:"flags"},sudan:{keywords:["sd","flag","nation","country","banner"],char:'🇸🇩',fitzpatrick_scale:false,category:"flags"},suriname:{keywords:["sr","flag","nation","country","banner"],char:'🇸🇷',fitzpatrick_scale:false,category:"flags"},swaziland:{keywords:["sz","flag","nation","country","banner"],char:'🇸🇿',fitzpatrick_scale:false,category:"flags"},sweden:{keywords:["se","flag","nation","country","banner"],char:'🇸🇪',fitzpatrick_scale:false,category:"flags"},switzerland:{keywords:["ch","flag","nation","country","banner"],char:'🇨🇭',fitzpatrick_scale:false,category:"flags"},syria:{keywords:["syrian","arab","republic","flag","nation","country","banner"],char:'🇸🇾',fitzpatrick_scale:false,category:"flags"},taiwan:{keywords:["tw","flag","nation","country","banner"],char:'🇹🇼',fitzpatrick_scale:false,category:"flags"},tajikistan:{keywords:["tj","flag","nation","country","banner"],char:'🇹🇯',fitzpatrick_scale:false,category:"flags"},tanzania:{keywords:["tanzania,","united","republic","flag","nation","country","banner"],char:'🇹🇿',fitzpatrick_scale:false,category:"flags"},thailand:{keywords:["th","flag","nation","country","banner"],char:'🇹🇭',fitzpatrick_scale:false,category:"flags"},timor_leste:{keywords:["timor","leste","flag","nation","country","banner"],char:'🇹🇱',fitzpatrick_scale:false,category:"flags"},togo:{keywords:["tg","flag","nation","country","banner"],char:'🇹🇬',fitzpatrick_scale:false,category:"flags"},tokelau:{keywords:["tk","flag","nation","country","banner"],char:'🇹🇰',fitzpatrick_scale:false,category:"flags"},tonga:{keywords:["to","flag","nation","country","banner"],char:'🇹🇴',fitzpatrick_scale:false,category:"flags"},trinidad_tobago:{keywords:["trinidad","tobago","flag","nation","country","banner"],char:'🇹🇹',fitzpatrick_scale:false,category:"flags"},tunisia:{keywords:["tn","flag","nation","country","banner"],char:'🇹🇳',fitzpatrick_scale:false,category:"flags"},tr:{keywords:["turkey","flag","nation","country","banner"],char:'🇹🇷',fitzpatrick_scale:false,category:"flags"},turkmenistan:{keywords:["flag","nation","country","banner"],char:'🇹🇲',fitzpatrick_scale:false,category:"flags"},turks_caicos_islands:{keywords:["turks","caicos","islands","flag","nation","country","banner"],char:'🇹🇨',fitzpatrick_scale:false,category:"flags"},tuvalu:{keywords:["flag","nation","country","banner"],char:'🇹🇻',fitzpatrick_scale:false,category:"flags"},uganda:{keywords:["ug","flag","nation","country","banner"],char:'🇺🇬',fitzpatrick_scale:false,category:"flags"},ukraine:{keywords:["ua","flag","nation","country","banner"],char:'🇺🇦',fitzpatrick_scale:false,category:"flags"},united_arab_emirates:{keywords:["united","arab","emirates","flag","nation","country","banner"],char:'🇦🇪',fitzpatrick_scale:false,category:"flags"},uk:{keywords:["united","kingdom","great","britain","northern","ireland","flag","nation","country","banner","british","UK","english","england","union jack"],char:'🇬🇧',fitzpatrick_scale:false,category:"flags"},england:{keywords:["flag","english"],char:'🏴󠁧󠁢󠁥󠁮󠁧󠁿',fitzpatrick_scale:false,category:"flags"},scotland:{keywords:["flag","scottish"],char:'🏴󠁧󠁢󠁳󠁣󠁴󠁿',fitzpatrick_scale:false,category:"flags"},wales:{keywords:["flag","welsh"],char:'🏴󠁧󠁢󠁷󠁬󠁳󠁿',fitzpatrick_scale:false,category:"flags"},us:{keywords:["united","states","america","flag","nation","country","banner"],char:'🇺🇸',fitzpatrick_scale:false,category:"flags"},us_virgin_islands:{keywords:["virgin","islands","us","flag","nation","country","banner"],char:'🇻🇮',fitzpatrick_scale:false,category:"flags"},uruguay:{keywords:["uy","flag","nation","country","banner"],char:'🇺🇾',fitzpatrick_scale:false,category:"flags"},uzbekistan:{keywords:["uz","flag","nation","country","banner"],char:'🇺🇿',fitzpatrick_scale:false,category:"flags"},vanuatu:{keywords:["vu","flag","nation","country","banner"],char:'🇻🇺',fitzpatrick_scale:false,category:"flags"},vatican_city:{keywords:["vatican","city","flag","nation","country","banner"],char:'🇻🇦',fitzpatrick_scale:false,category:"flags"},venezuela:{keywords:["ve","bolivarian","republic","flag","nation","country","banner"],char:'🇻🇪',fitzpatrick_scale:false,category:"flags"},vietnam:{keywords:["viet","nam","flag","nation","country","banner"],char:'🇻🇳',fitzpatrick_scale:false,category:"flags"},wallis_futuna:{keywords:["wallis","futuna","flag","nation","country","banner"],char:'🇼🇫',fitzpatrick_scale:false,category:"flags"},western_sahara:{keywords:["western","sahara","flag","nation","country","banner"],char:'🇪🇭',fitzpatrick_scale:false,category:"flags"},yemen:{keywords:["ye","flag","nation","country","banner"],char:'🇾🇪',fitzpatrick_scale:false,category:"flags"},zambia:{keywords:["zm","flag","nation","country","banner"],char:'🇿🇲',fitzpatrick_scale:false,category:"flags"},zimbabwe:{keywords:["zw","flag","nation","country","banner"],char:'🇿🇼',fitzpatrick_scale:false,category:"flags"},united_nations:{keywords:["un","flag","banner"],char:'🇺🇳',fitzpatrick_scale:false,category:"flags"},pirate_flag:{keywords:["skull","crossbones","flag","banner"],char:'🏴‍☠️',fitzpatrick_scale:false,category:"flags"}}); \ No newline at end of file diff --git a/vendor/tinymce/tinymce/plugins/emoticons/js/emojiimages.min.js b/vendor/tinymce/tinymce/plugins/emoticons/js/emojiimages.min.js new file mode 100644 index 00000000..37f3bcf8 --- /dev/null +++ b/vendor/tinymce/tinymce/plugins/emoticons/js/emojiimages.min.js @@ -0,0 +1,3 @@ +// Source: npm package: emojilib +// Images provided by twemoji: https://github.com/twitter/twemoji +window.tinymce.Resource.add("tinymce.plugins.emoticons",{100:{keywords:["score","perfect","numbers","century","exam","quiz","test","pass","hundred"],char:'\u{1f4af}',fitzpatrick_scale:!1,category:"symbols"},1234:{keywords:["numbers","blue-square"],char:'\u{1f522}',fitzpatrick_scale:!1,category:"symbols"},grinning:{keywords:["face","smile","happy","joy",":D","grin"],char:'\u{1f600}',fitzpatrick_scale:!1,category:"people"},grimacing:{keywords:["face","grimace","teeth"],char:'\u{1f62c}',fitzpatrick_scale:!1,category:"people"},grin:{keywords:["face","happy","smile","joy","kawaii"],char:'\u{1f601}',fitzpatrick_scale:!1,category:"people"},joy:{keywords:["face","cry","tears","weep","happy","happytears","haha"],char:'\u{1f602}',fitzpatrick_scale:!1,category:"people"},rofl:{keywords:["face","rolling","floor","laughing","lol","haha"],char:'\u{1f923}',fitzpatrick_scale:!1,category:"people"},partying:{keywords:["face","celebration","woohoo"],char:'\u{1f973}',fitzpatrick_scale:!1,category:"people"},smiley:{keywords:["face","happy","joy","haha",":D",":)","smile","funny"],char:'\u{1f603}',fitzpatrick_scale:!1,category:"people"},smile:{keywords:["face","happy","joy","funny","haha","laugh","like",":D",":)"],char:'\u{1f604}',fitzpatrick_scale:!1,category:"people"},sweat_smile:{keywords:["face","hot","happy","laugh","sweat","smile","relief"],char:'\u{1f605}',fitzpatrick_scale:!1,category:"people"},laughing:{keywords:["happy","joy","lol","satisfied","haha","face","glad","XD","laugh"],char:'\u{1f606}',fitzpatrick_scale:!1,category:"people"},innocent:{keywords:["face","angel","heaven","halo"],char:'\u{1f607}',fitzpatrick_scale:!1,category:"people"},wink:{keywords:["face","happy","mischievous","secret",";)","smile","eye"],char:'\u{1f609}',fitzpatrick_scale:!1,category:"people"},blush:{keywords:["face","smile","happy","flushed","crush","embarrassed","shy","joy"],char:'\u{1f60a}',fitzpatrick_scale:!1,category:"people"},slightly_smiling_face:{keywords:["face","smile"],char:'\u{1f642}',fitzpatrick_scale:!1,category:"people"},upside_down_face:{keywords:["face","flipped","silly","smile"],char:'\u{1f643}',fitzpatrick_scale:!1,category:"people"},relaxed:{keywords:["face","blush","massage","happiness"],char:'\u263a\ufe0f',fitzpatrick_scale:!1,category:"people"},yum:{keywords:["happy","joy","tongue","smile","face","silly","yummy","nom","delicious","savouring"],char:'\u{1f60b}',fitzpatrick_scale:!1,category:"people"},relieved:{keywords:["face","relaxed","phew","massage","happiness"],char:'\u{1f60c}',fitzpatrick_scale:!1,category:"people"},heart_eyes:{keywords:["face","love","like","affection","valentines","infatuation","crush","heart"],char:'\u{1f60d}',fitzpatrick_scale:!1,category:"people"},smiling_face_with_three_hearts:{keywords:["face","love","like","affection","valentines","infatuation","crush","hearts","adore"],char:'\u{1f970}',fitzpatrick_scale:!1,category:"people"},kissing_heart:{keywords:["face","love","like","affection","valentines","infatuation","kiss"],char:'\u{1f618}',fitzpatrick_scale:!1,category:"people"},kissing:{keywords:["love","like","face","3","valentines","infatuation","kiss"],char:'\u{1f617}',fitzpatrick_scale:!1,category:"people"},kissing_smiling_eyes:{keywords:["face","affection","valentines","infatuation","kiss"],char:'\u{1f619}',fitzpatrick_scale:!1,category:"people"},kissing_closed_eyes:{keywords:["face","love","like","affection","valentines","infatuation","kiss"],char:'\u{1f61a}',fitzpatrick_scale:!1,category:"people"},stuck_out_tongue_winking_eye:{keywords:["face","prank","childish","playful","mischievous","smile","wink","tongue"],char:'\u{1f61c}',fitzpatrick_scale:!1,category:"people"},zany:{keywords:["face","goofy","crazy"],char:'\u{1f92a}',fitzpatrick_scale:!1,category:"people"},raised_eyebrow:{keywords:["face","distrust","scepticism","disapproval","disbelief","surprise"],char:'\u{1f928}',fitzpatrick_scale:!1,category:"people"},monocle:{keywords:["face","stuffy","wealthy"],char:'\u{1f9d0}',fitzpatrick_scale:!1,category:"people"},stuck_out_tongue_closed_eyes:{keywords:["face","prank","playful","mischievous","smile","tongue"],char:'\u{1f61d}',fitzpatrick_scale:!1,category:"people"},stuck_out_tongue:{keywords:["face","prank","childish","playful","mischievous","smile","tongue"],char:'\u{1f61b}',fitzpatrick_scale:!1,category:"people"},money_mouth_face:{keywords:["face","rich","dollar","money"],char:'\u{1f911}',fitzpatrick_scale:!1,category:"people"},nerd_face:{keywords:["face","nerdy","geek","dork"],char:'\u{1f913}',fitzpatrick_scale:!1,category:"people"},sunglasses:{keywords:["face","cool","smile","summer","beach","sunglass"],char:'\u{1f60e}',fitzpatrick_scale:!1,category:"people"},star_struck:{keywords:["face","smile","starry","eyes","grinning"],char:'\u{1f929}',fitzpatrick_scale:!1,category:"people"},clown_face:{keywords:["face"],char:'\u{1f921}',fitzpatrick_scale:!1,category:"people"},cowboy_hat_face:{keywords:["face","cowgirl","hat"],char:'\u{1f920}',fitzpatrick_scale:!1,category:"people"},hugs:{keywords:["face","smile","hug"],char:'\u{1f917}',fitzpatrick_scale:!1,category:"people"},smirk:{keywords:["face","smile","mean","prank","smug","sarcasm"],char:'\u{1f60f}',fitzpatrick_scale:!1,category:"people"},no_mouth:{keywords:["face","hellokitty"],char:'\u{1f636}',fitzpatrick_scale:!1,category:"people"},neutral_face:{keywords:["indifference","meh",":|","neutral"],char:'\u{1f610}',fitzpatrick_scale:!1,category:"people"},expressionless:{keywords:["face","indifferent","-_-","meh","deadpan"],char:'\u{1f611}',fitzpatrick_scale:!1,category:"people"},unamused:{keywords:["indifference","bored","straight face","serious","sarcasm","unimpressed","skeptical","dubious","side_eye"],char:'\u{1f612}',fitzpatrick_scale:!1,category:"people"},roll_eyes:{keywords:["face","eyeroll","frustrated"],char:'\u{1f644}',fitzpatrick_scale:!1,category:"people"},thinking:{keywords:["face","hmmm","think","consider"],char:'\u{1f914}',fitzpatrick_scale:!1,category:"people"},lying_face:{keywords:["face","lie","pinocchio"],char:'\u{1f925}',fitzpatrick_scale:!1,category:"people"},hand_over_mouth:{keywords:["face","whoops","shock","surprise"],char:'\u{1f92d}',fitzpatrick_scale:!1,category:"people"},shushing:{keywords:["face","quiet","shhh"],char:'\u{1f92b}',fitzpatrick_scale:!1,category:"people"},symbols_over_mouth:{keywords:["face","swearing","cursing","cussing","profanity","expletive"],char:'\u{1f92c}',fitzpatrick_scale:!1,category:"people"},exploding_head:{keywords:["face","shocked","mind","blown"],char:'\u{1f92f}',fitzpatrick_scale:!1,category:"people"},flushed:{keywords:["face","blush","shy","flattered"],char:'\u{1f633}',fitzpatrick_scale:!1,category:"people"},disappointed:{keywords:["face","sad","upset","depressed",":("],char:'\u{1f61e}',fitzpatrick_scale:!1,category:"people"},worried:{keywords:["face","concern","nervous",":("],char:'\u{1f61f}',fitzpatrick_scale:!1,category:"people"},angry:{keywords:["mad","face","annoyed","frustrated"],char:'\u{1f620}',fitzpatrick_scale:!1,category:"people"},rage:{keywords:["angry","mad","hate","despise"],char:'\u{1f621}',fitzpatrick_scale:!1,category:"people"},pensive:{keywords:["face","sad","depressed","upset"],char:'\u{1f614}',fitzpatrick_scale:!1,category:"people"},confused:{keywords:["face","indifference","huh","weird","hmmm",":/"],char:'\u{1f615}',fitzpatrick_scale:!1,category:"people"},slightly_frowning_face:{keywords:["face","frowning","disappointed","sad","upset"],char:'\u{1f641}',fitzpatrick_scale:!1,category:"people"},frowning_face:{keywords:["face","sad","upset","frown"],char:'\u2639',fitzpatrick_scale:!1,category:"people"},persevere:{keywords:["face","sick","no","upset","oops"],char:'\u{1f623}',fitzpatrick_scale:!1,category:"people"},confounded:{keywords:["face","confused","sick","unwell","oops",":S"],char:'\u{1f616}',fitzpatrick_scale:!1,category:"people"},tired_face:{keywords:["sick","whine","upset","frustrated"],char:'\u{1f62b}',fitzpatrick_scale:!1,category:"people"},weary:{keywords:["face","tired","sleepy","sad","frustrated","upset"],char:'\u{1f629}',fitzpatrick_scale:!1,category:"people"},pleading:{keywords:["face","begging","mercy"],char:'\u{1f97a}',fitzpatrick_scale:!1,category:"people"},triumph:{keywords:["face","gas","phew","proud","pride"],char:'\u{1f624}',fitzpatrick_scale:!1,category:"people"},open_mouth:{keywords:["face","surprise","impressed","wow","whoa",":O"],char:'\u{1f62e}',fitzpatrick_scale:!1,category:"people"},scream:{keywords:["face","munch","scared","omg"],char:'\u{1f631}',fitzpatrick_scale:!1,category:"people"},fearful:{keywords:["face","scared","terrified","nervous","oops","huh"],char:'\u{1f628}',fitzpatrick_scale:!1,category:"people"},cold_sweat:{keywords:["face","nervous","sweat"],char:'\u{1f630}',fitzpatrick_scale:!1,category:"people"},hushed:{keywords:["face","woo","shh"],char:'\u{1f62f}',fitzpatrick_scale:!1,category:"people"},frowning:{keywords:["face","aw","what"],char:'\u{1f626}',fitzpatrick_scale:!1,category:"people"},anguished:{keywords:["face","stunned","nervous"],char:'\u{1f627}',fitzpatrick_scale:!1,category:"people"},cry:{keywords:["face","tears","sad","depressed","upset",":'("],char:'\u{1f622}',fitzpatrick_scale:!1,category:"people"},disappointed_relieved:{keywords:["face","phew","sweat","nervous"],char:'\u{1f625}',fitzpatrick_scale:!1,category:"people"},drooling_face:{keywords:["face"],char:'\u{1f924}',fitzpatrick_scale:!1,category:"people"},sleepy:{keywords:["face","tired","rest","nap"],char:'\u{1f62a}',fitzpatrick_scale:!1,category:"people"},sweat:{keywords:["face","hot","sad","tired","exercise"],char:'\u{1f613}',fitzpatrick_scale:!1,category:"people"},hot:{keywords:["face","feverish","heat","red","sweating"],char:'\u{1f975}',fitzpatrick_scale:!1,category:"people"},cold:{keywords:["face","blue","freezing","frozen","frostbite","icicles"],char:'\u{1f976}',fitzpatrick_scale:!1,category:"people"},sob:{keywords:["face","cry","tears","sad","upset","depressed"],char:'\u{1f62d}',fitzpatrick_scale:!1,category:"people"},dizzy_face:{keywords:["spent","unconscious","xox","dizzy"],char:'\u{1f635}',fitzpatrick_scale:!1,category:"people"},astonished:{keywords:["face","xox","surprised","poisoned"],char:'\u{1f632}',fitzpatrick_scale:!1,category:"people"},zipper_mouth_face:{keywords:["face","sealed","zipper","secret"],char:'\u{1f910}',fitzpatrick_scale:!1,category:"people"},nauseated_face:{keywords:["face","vomit","gross","green","sick","throw up","ill"],char:'\u{1f922}',fitzpatrick_scale:!1,category:"people"},sneezing_face:{keywords:["face","gesundheit","sneeze","sick","allergy"],char:'\u{1f927}',fitzpatrick_scale:!1,category:"people"},vomiting:{keywords:["face","sick"],char:'\u{1f92e}',fitzpatrick_scale:!1,category:"people"},mask:{keywords:["face","sick","ill","disease"],char:'\u{1f637}',fitzpatrick_scale:!1,category:"people"},face_with_thermometer:{keywords:["sick","temperature","thermometer","cold","fever"],char:'\u{1f912}',fitzpatrick_scale:!1,category:"people"},face_with_head_bandage:{keywords:["injured","clumsy","bandage","hurt"],char:'\u{1f915}',fitzpatrick_scale:!1,category:"people"},woozy:{keywords:["face","dizzy","intoxicated","tipsy","wavy"],char:'\u{1f974}',fitzpatrick_scale:!1,category:"people"},sleeping:{keywords:["face","tired","sleepy","night","zzz"],char:'\u{1f634}',fitzpatrick_scale:!1,category:"people"},zzz:{keywords:["sleepy","tired","dream"],char:'\u{1f4a4}',fitzpatrick_scale:!1,category:"people"},poop:{keywords:["hankey","shitface","fail","turd","shit"],char:'\u{1f4a9}',fitzpatrick_scale:!1,category:"people"},smiling_imp:{keywords:["devil","horns"],char:'\u{1f608}',fitzpatrick_scale:!1,category:"people"},imp:{keywords:["devil","angry","horns"],char:'\u{1f47f}',fitzpatrick_scale:!1,category:"people"},japanese_ogre:{keywords:["monster","red","mask","halloween","scary","creepy","devil","demon","japanese","ogre"],char:'\u{1f479}',fitzpatrick_scale:!1,category:"people"},japanese_goblin:{keywords:["red","evil","mask","monster","scary","creepy","japanese","goblin"],char:'\u{1f47a}',fitzpatrick_scale:!1,category:"people"},skull:{keywords:["dead","skeleton","creepy","death"],char:'\u{1f480}',fitzpatrick_scale:!1,category:"people"},ghost:{keywords:["halloween","spooky","scary"],char:'\u{1f47b}',fitzpatrick_scale:!1,category:"people"},alien:{keywords:["UFO","paul","weird","outer_space"],char:'\u{1f47d}',fitzpatrick_scale:!1,category:"people"},robot:{keywords:["computer","machine","bot"],char:'\u{1f916}',fitzpatrick_scale:!1,category:"people"},smiley_cat:{keywords:["animal","cats","happy","smile"],char:'\u{1f63a}',fitzpatrick_scale:!1,category:"people"},smile_cat:{keywords:["animal","cats","smile"],char:'\u{1f638}',fitzpatrick_scale:!1,category:"people"},joy_cat:{keywords:["animal","cats","haha","happy","tears"],char:'\u{1f639}',fitzpatrick_scale:!1,category:"people"},heart_eyes_cat:{keywords:["animal","love","like","affection","cats","valentines","heart"],char:'\u{1f63b}',fitzpatrick_scale:!1,category:"people"},smirk_cat:{keywords:["animal","cats","smirk"],char:'\u{1f63c}',fitzpatrick_scale:!1,category:"people"},kissing_cat:{keywords:["animal","cats","kiss"],char:'\u{1f63d}',fitzpatrick_scale:!1,category:"people"},scream_cat:{keywords:["animal","cats","munch","scared","scream"],char:'\u{1f640}',fitzpatrick_scale:!1,category:"people"},crying_cat_face:{keywords:["animal","tears","weep","sad","cats","upset","cry"],char:'\u{1f63f}',fitzpatrick_scale:!1,category:"people"},pouting_cat:{keywords:["animal","cats"],char:'\u{1f63e}',fitzpatrick_scale:!1,category:"people"},palms_up:{keywords:["hands","gesture","cupped","prayer"],char:'\u{1f932}',fitzpatrick_scale:!0,category:"people"},raised_hands:{keywords:["gesture","hooray","yea","celebration","hands"],char:'\u{1f64c}',fitzpatrick_scale:!0,category:"people"},clap:{keywords:["hands","praise","applause","congrats","yay"],char:'\u{1f44f}',fitzpatrick_scale:!0,category:"people"},wave:{keywords:["hands","gesture","goodbye","solong","farewell","hello","hi","palm"],char:'\u{1f44b}',fitzpatrick_scale:!0,category:"people"},call_me_hand:{keywords:["hands","gesture"],char:'\u{1f919}',fitzpatrick_scale:!0,category:"people"},"+1":{keywords:["thumbsup","yes","awesome","good","agree","accept","cool","hand","like"],char:'\u{1f44d}',fitzpatrick_scale:!0,category:"people"},"-1":{keywords:["thumbsdown","no","dislike","hand"],char:'\u{1f44e}',fitzpatrick_scale:!0,category:"people"},facepunch:{keywords:["angry","violence","fist","hit","attack","hand"],char:'\u{1f44a}',fitzpatrick_scale:!0,category:"people"},fist:{keywords:["fingers","hand","grasp"],char:'\u270a',fitzpatrick_scale:!0,category:"people"},fist_left:{keywords:["hand","fistbump"],char:'\u{1f91b}',fitzpatrick_scale:!0,category:"people"},fist_right:{keywords:["hand","fistbump"],char:'\u{1f91c}',fitzpatrick_scale:!0,category:"people"},v:{keywords:["fingers","ohyeah","hand","peace","victory","two"],char:'\u270c',fitzpatrick_scale:!0,category:"people"},ok_hand:{keywords:["fingers","limbs","perfect","ok","okay"],char:'\u{1f44c}',fitzpatrick_scale:!0,category:"people"},raised_hand:{keywords:["fingers","stop","highfive","palm","ban"],char:'\u270b',fitzpatrick_scale:!0,category:"people"},raised_back_of_hand:{keywords:["fingers","raised","backhand"],char:'\u{1f91a}',fitzpatrick_scale:!0,category:"people"},open_hands:{keywords:["fingers","butterfly","hands","open"],char:'\u{1f450}',fitzpatrick_scale:!0,category:"people"},muscle:{keywords:["arm","flex","hand","summer","strong","biceps"],char:'\u{1f4aa}',fitzpatrick_scale:!0,category:"people"},pray:{keywords:["please","hope","wish","namaste","highfive"],char:'\u{1f64f}',fitzpatrick_scale:!0,category:"people"},foot:{keywords:["kick","stomp"],char:'\u{1f9b6}',fitzpatrick_scale:!0,category:"people"},leg:{keywords:["kick","limb"],char:'\u{1f9b5}',fitzpatrick_scale:!0,category:"people"},handshake:{keywords:["agreement","shake"],char:'\u{1f91d}',fitzpatrick_scale:!1,category:"people"},point_up:{keywords:["hand","fingers","direction","up"],char:'\u261d',fitzpatrick_scale:!0,category:"people"},point_up_2:{keywords:["fingers","hand","direction","up"],char:'\u{1f446}',fitzpatrick_scale:!0,category:"people"},point_down:{keywords:["fingers","hand","direction","down"],char:'\u{1f447}',fitzpatrick_scale:!0,category:"people"},point_left:{keywords:["direction","fingers","hand","left"],char:'\u{1f448}',fitzpatrick_scale:!0,category:"people"},point_right:{keywords:["fingers","hand","direction","right"],char:'\u{1f449}',fitzpatrick_scale:!0,category:"people"},fu:{keywords:["hand","fingers","rude","middle","flipping"],char:'\u{1f595}',fitzpatrick_scale:!0,category:"people"},raised_hand_with_fingers_splayed:{keywords:["hand","fingers","palm"],char:'\u{1f590}',fitzpatrick_scale:!0,category:"people"},love_you:{keywords:["hand","fingers","gesture"],char:'\u{1f91f}',fitzpatrick_scale:!0,category:"people"},metal:{keywords:["hand","fingers","evil_eye","sign_of_horns","rock_on"],char:'\u{1f918}',fitzpatrick_scale:!0,category:"people"},crossed_fingers:{keywords:["good","lucky"],char:'\u{1f91e}',fitzpatrick_scale:!0,category:"people"},vulcan_salute:{keywords:["hand","fingers","spock","star trek"],char:'\u{1f596}',fitzpatrick_scale:!0,category:"people"},writing_hand:{keywords:["lower_left_ballpoint_pen","stationery","write","compose"],char:'\u270d',fitzpatrick_scale:!0,category:"people"},selfie:{keywords:["camera","phone"],char:'\u{1f933}',fitzpatrick_scale:!0,category:"people"},nail_care:{keywords:["beauty","manicure","finger","fashion","nail"],char:'\u{1f485}',fitzpatrick_scale:!0,category:"people"},lips:{keywords:["mouth","kiss"],char:'\u{1f444}',fitzpatrick_scale:!1,category:"people"},tooth:{keywords:["teeth","dentist"],char:'\u{1f9b7}',fitzpatrick_scale:!1,category:"people"},tongue:{keywords:["mouth","playful"],char:'\u{1f445}',fitzpatrick_scale:!1,category:"people"},ear:{keywords:["face","hear","sound","listen"],char:'\u{1f442}',fitzpatrick_scale:!0,category:"people"},nose:{keywords:["smell","sniff"],char:'\u{1f443}',fitzpatrick_scale:!0,category:"people"},eye:{keywords:["face","look","see","watch","stare"],char:'\u{1f441}',fitzpatrick_scale:!1,category:"people"},eyes:{keywords:["look","watch","stalk","peek","see"],char:'\u{1f440}',fitzpatrick_scale:!1,category:"people"},brain:{keywords:["smart","intelligent"],char:'\u{1f9e0}',fitzpatrick_scale:!1,category:"people"},bust_in_silhouette:{keywords:["user","person","human"],char:'\u{1f464}',fitzpatrick_scale:!1,category:"people"},busts_in_silhouette:{keywords:["user","person","human","group","team"],char:'\u{1f465}',fitzpatrick_scale:!1,category:"people"},speaking_head:{keywords:["user","person","human","sing","say","talk"],char:'\u{1f5e3}',fitzpatrick_scale:!1,category:"people"},baby:{keywords:["child","boy","girl","toddler"],char:'\u{1f476}',fitzpatrick_scale:!0,category:"people"},child:{keywords:["gender-neutral","young"],char:'\u{1f9d2}',fitzpatrick_scale:!0,category:"people"},boy:{keywords:["man","male","guy","teenager"],char:'\u{1f466}',fitzpatrick_scale:!0,category:"people"},girl:{keywords:["female","woman","teenager"],char:'\u{1f467}',fitzpatrick_scale:!0,category:"people"},adult:{keywords:["gender-neutral","person"],char:'\u{1f9d1}',fitzpatrick_scale:!0,category:"people"},man:{keywords:["mustache","father","dad","guy","classy","sir","moustache"],char:'\u{1f468}',fitzpatrick_scale:!0,category:"people"},woman:{keywords:["female","girls","lady"],char:'\u{1f469}',fitzpatrick_scale:!0,category:"people"},blonde_woman:{keywords:["woman","female","girl","blonde","person"],char:'\u{1f471}\u200d\u2640\ufe0f',fitzpatrick_scale:!0,category:"people"},blonde_man:{keywords:["man","male","boy","blonde","guy","person"],char:'\u{1f471}',fitzpatrick_scale:!0,category:"people"},bearded_person:{keywords:["person","bewhiskered"],char:'\u{1f9d4}',fitzpatrick_scale:!0,category:"people"},older_adult:{keywords:["human","elder","senior","gender-neutral"],char:'\u{1f9d3}',fitzpatrick_scale:!0,category:"people"},older_man:{keywords:["human","male","men","old","elder","senior"],char:'\u{1f474}',fitzpatrick_scale:!0,category:"people"},older_woman:{keywords:["human","female","women","lady","old","elder","senior"],char:'\u{1f475}',fitzpatrick_scale:!0,category:"people"},man_with_gua_pi_mao:{keywords:["male","boy","chinese"],char:'\u{1f472}',fitzpatrick_scale:!0,category:"people"},woman_with_headscarf:{keywords:["female","hijab","mantilla","tichel"],char:'\u{1f9d5}',fitzpatrick_scale:!0,category:"people"},woman_with_turban:{keywords:["female","indian","hinduism","arabs","woman"],char:'\u{1f473}\u200d\u2640\ufe0f',fitzpatrick_scale:!0,category:"people"},man_with_turban:{keywords:["male","indian","hinduism","arabs"],char:'\u{1f473}',fitzpatrick_scale:!0,category:"people"},policewoman:{keywords:["woman","police","law","legal","enforcement","arrest","911","female"],char:'\u{1f46e}\u200d\u2640\ufe0f',fitzpatrick_scale:!0,category:"people"},policeman:{keywords:["man","police","law","legal","enforcement","arrest","911"],char:'\u{1f46e}',fitzpatrick_scale:!0,category:"people"},construction_worker_woman:{keywords:["female","human","wip","build","construction","worker","labor","woman"],char:'\u{1f477}\u200d\u2640\ufe0f',fitzpatrick_scale:!0,category:"people"},construction_worker_man:{keywords:["male","human","wip","guy","build","construction","worker","labor"],char:'\u{1f477}',fitzpatrick_scale:!0,category:"people"},guardswoman:{keywords:["uk","gb","british","female","royal","woman"],char:'\u{1f482}\u200d\u2640\ufe0f',fitzpatrick_scale:!0,category:"people"},guardsman:{keywords:["uk","gb","british","male","guy","royal"],char:'\u{1f482}',fitzpatrick_scale:!0,category:"people"},female_detective:{keywords:["human","spy","detective","female","woman"],char:'\u{1f575}\ufe0f\u200d\u2640\ufe0f',fitzpatrick_scale:!0,category:"people"},male_detective:{keywords:["human","spy","detective"],char:'\u{1f575}',fitzpatrick_scale:!0,category:"people"},woman_health_worker:{keywords:["doctor","nurse","therapist","healthcare","woman","human"],char:'\u{1f469}\u200d\u2695\ufe0f',fitzpatrick_scale:!0,category:"people"},man_health_worker:{keywords:["doctor","nurse","therapist","healthcare","man","human"],char:'\u{1f468}\u200d\u2695\ufe0f',fitzpatrick_scale:!0,category:"people"},woman_farmer:{keywords:["rancher","gardener","woman","human"],char:'\u{1f469}\u200d\u{1f33e}',fitzpatrick_scale:!0,category:"people"},man_farmer:{keywords:["rancher","gardener","man","human"],char:'\u{1f468}\u200d\u{1f33e}',fitzpatrick_scale:!0,category:"people"},woman_cook:{keywords:["chef","woman","human"],char:'\u{1f469}\u200d\u{1f373}',fitzpatrick_scale:!0,category:"people"},man_cook:{keywords:["chef","man","human"],char:'\u{1f468}\u200d\u{1f373}',fitzpatrick_scale:!0,category:"people"},woman_student:{keywords:["graduate","woman","human"],char:'\u{1f469}\u200d\u{1f393}',fitzpatrick_scale:!0,category:"people"},man_student:{keywords:["graduate","man","human"],char:'\u{1f468}\u200d\u{1f393}',fitzpatrick_scale:!0,category:"people"},woman_singer:{keywords:["rockstar","entertainer","woman","human"],char:'\u{1f469}\u200d\u{1f3a4}',fitzpatrick_scale:!0,category:"people"},man_singer:{keywords:["rockstar","entertainer","man","human"],char:'\u{1f468}\u200d\u{1f3a4}',fitzpatrick_scale:!0,category:"people"},woman_teacher:{keywords:["instructor","professor","woman","human"],char:'\u{1f469}\u200d\u{1f3eb}',fitzpatrick_scale:!0,category:"people"},man_teacher:{keywords:["instructor","professor","man","human"],char:'\u{1f468}\u200d\u{1f3eb}',fitzpatrick_scale:!0,category:"people"},woman_factory_worker:{keywords:["assembly","industrial","woman","human"],char:'\u{1f469}\u200d\u{1f3ed}',fitzpatrick_scale:!0,category:"people"},man_factory_worker:{keywords:["assembly","industrial","man","human"],char:'\u{1f468}\u200d\u{1f3ed}',fitzpatrick_scale:!0,category:"people"},woman_technologist:{keywords:["coder","developer","engineer","programmer","software","woman","human","laptop","computer"],char:'\u{1f469}\u200d\u{1f4bb}',fitzpatrick_scale:!0,category:"people"},man_technologist:{keywords:["coder","developer","engineer","programmer","software","man","human","laptop","computer"],char:'\u{1f468}\u200d\u{1f4bb}',fitzpatrick_scale:!0,category:"people"},woman_office_worker:{keywords:["business","manager","woman","human"],char:'\u{1f469}\u200d\u{1f4bc}',fitzpatrick_scale:!0,category:"people"},man_office_worker:{keywords:["business","manager","man","human"],char:'\u{1f468}\u200d\u{1f4bc}',fitzpatrick_scale:!0,category:"people"},woman_mechanic:{keywords:["plumber","woman","human","wrench"],char:'\u{1f469}\u200d\u{1f527}',fitzpatrick_scale:!0,category:"people"},man_mechanic:{keywords:["plumber","man","human","wrench"],char:'\u{1f468}\u200d\u{1f527}',fitzpatrick_scale:!0,category:"people"},woman_scientist:{keywords:["biologist","chemist","engineer","physicist","woman","human"],char:'\u{1f469}\u200d\u{1f52c}',fitzpatrick_scale:!0,category:"people"},man_scientist:{keywords:["biologist","chemist","engineer","physicist","man","human"],char:'\u{1f468}\u200d\u{1f52c}',fitzpatrick_scale:!0,category:"people"},woman_artist:{keywords:["painter","woman","human"],char:'\u{1f469}\u200d\u{1f3a8}',fitzpatrick_scale:!0,category:"people"},man_artist:{keywords:["painter","man","human"],char:'\u{1f468}\u200d\u{1f3a8}',fitzpatrick_scale:!0,category:"people"},woman_firefighter:{keywords:["fireman","woman","human"],char:'\u{1f469}\u200d\u{1f692}',fitzpatrick_scale:!0,category:"people"},man_firefighter:{keywords:["fireman","man","human"],char:'\u{1f468}\u200d\u{1f692}',fitzpatrick_scale:!0,category:"people"},woman_pilot:{keywords:["aviator","plane","woman","human"],char:'\u{1f469}\u200d\u2708\ufe0f',fitzpatrick_scale:!0,category:"people"},man_pilot:{keywords:["aviator","plane","man","human"],char:'\u{1f468}\u200d\u2708\ufe0f',fitzpatrick_scale:!0,category:"people"},woman_astronaut:{keywords:["space","rocket","woman","human"],char:'\u{1f469}\u200d\u{1f680}',fitzpatrick_scale:!0,category:"people"},man_astronaut:{keywords:["space","rocket","man","human"],char:'\u{1f468}\u200d\u{1f680}',fitzpatrick_scale:!0,category:"people"},woman_judge:{keywords:["justice","court","woman","human"],char:'\u{1f469}\u200d\u2696\ufe0f',fitzpatrick_scale:!0,category:"people"},man_judge:{keywords:["justice","court","man","human"],char:'\u{1f468}\u200d\u2696\ufe0f',fitzpatrick_scale:!0,category:"people"},woman_superhero:{keywords:["woman","female","good","heroine","superpowers"],char:'\u{1f9b8}\u200d\u2640\ufe0f',fitzpatrick_scale:!0,category:"people"},man_superhero:{keywords:["man","male","good","hero","superpowers"],char:'\u{1f9b8}\u200d\u2642\ufe0f',fitzpatrick_scale:!0,category:"people"},woman_supervillain:{keywords:["woman","female","evil","bad","criminal","heroine","superpowers"],char:'\u{1f9b9}\u200d\u2640\ufe0f',fitzpatrick_scale:!0,category:"people"},man_supervillain:{keywords:["man","male","evil","bad","criminal","hero","superpowers"],char:'\u{1f9b9}\u200d\u2642\ufe0f',fitzpatrick_scale:!0,category:"people"},mrs_claus:{keywords:["woman","female","xmas","mother christmas"],char:'\u{1f936}',fitzpatrick_scale:!0,category:"people"},santa:{keywords:["festival","man","male","xmas","father christmas"],char:'\u{1f385}',fitzpatrick_scale:!0,category:"people"},sorceress:{keywords:["woman","female","mage","witch"],char:'\u{1f9d9}\u200d\u2640\ufe0f',fitzpatrick_scale:!0,category:"people"},wizard:{keywords:["man","male","mage","sorcerer"],char:'\u{1f9d9}\u200d\u2642\ufe0f',fitzpatrick_scale:!0,category:"people"},woman_elf:{keywords:["woman","female"],char:'\u{1f9dd}\u200d\u2640\ufe0f',fitzpatrick_scale:!0,category:"people"},man_elf:{keywords:["man","male"],char:'\u{1f9dd}\u200d\u2642\ufe0f',fitzpatrick_scale:!0,category:"people"},woman_vampire:{keywords:["woman","female"],char:'\u{1f9db}\u200d\u2640\ufe0f',fitzpatrick_scale:!0,category:"people"},man_vampire:{keywords:["man","male","dracula"],char:'\u{1f9db}\u200d\u2642\ufe0f',fitzpatrick_scale:!0,category:"people"},woman_zombie:{keywords:["woman","female","undead","walking dead"],char:'\u{1f9df}\u200d\u2640\ufe0f',fitzpatrick_scale:!1,category:"people"},man_zombie:{keywords:["man","male","dracula","undead","walking dead"],char:'\u{1f9df}\u200d\u2642\ufe0f',fitzpatrick_scale:!1,category:"people"},woman_genie:{keywords:["woman","female"],char:'\u{1f9de}\u200d\u2640\ufe0f',fitzpatrick_scale:!1,category:"people"},man_genie:{keywords:["man","male"],char:'\u{1f9de}\u200d\u2642\ufe0f',fitzpatrick_scale:!1,category:"people"},mermaid:{keywords:["woman","female","merwoman","ariel"],char:'\u{1f9dc}\u200d\u2640\ufe0f',fitzpatrick_scale:!0,category:"people"},merman:{keywords:["man","male","triton"],char:'\u{1f9dc}\u200d\u2642\ufe0f',fitzpatrick_scale:!0,category:"people"},woman_fairy:{keywords:["woman","female"],char:'\u{1f9da}\u200d\u2640\ufe0f',fitzpatrick_scale:!0,category:"people"},man_fairy:{keywords:["man","male"],char:'\u{1f9da}\u200d\u2642\ufe0f',fitzpatrick_scale:!0,category:"people"},angel:{keywords:["heaven","wings","halo"],char:'\u{1f47c}',fitzpatrick_scale:!0,category:"people"},pregnant_woman:{keywords:["baby"],char:'\u{1f930}',fitzpatrick_scale:!0,category:"people"},breastfeeding:{keywords:["nursing","baby"],char:'\u{1f931}',fitzpatrick_scale:!0,category:"people"},princess:{keywords:["girl","woman","female","blond","crown","royal","queen"],char:'\u{1f478}',fitzpatrick_scale:!0,category:"people"},prince:{keywords:["boy","man","male","crown","royal","king"],char:'\u{1f934}',fitzpatrick_scale:!0,category:"people"},bride_with_veil:{keywords:["couple","marriage","wedding","woman","bride"],char:'\u{1f470}',fitzpatrick_scale:!0,category:"people"},man_in_tuxedo:{keywords:["couple","marriage","wedding","groom"],char:'\u{1f935}',fitzpatrick_scale:!0,category:"people"},running_woman:{keywords:["woman","walking","exercise","race","running","female"],char:'\u{1f3c3}\u200d\u2640\ufe0f',fitzpatrick_scale:!0,category:"people"},running_man:{keywords:["man","walking","exercise","race","running"],char:'\u{1f3c3}',fitzpatrick_scale:!0,category:"people"},walking_woman:{keywords:["human","feet","steps","woman","female"],char:'\u{1f6b6}\u200d\u2640\ufe0f',fitzpatrick_scale:!0,category:"people"},walking_man:{keywords:["human","feet","steps"],char:'\u{1f6b6}',fitzpatrick_scale:!0,category:"people"},dancer:{keywords:["female","girl","woman","fun"],char:'\u{1f483}',fitzpatrick_scale:!0,category:"people"},man_dancing:{keywords:["male","boy","fun","dancer"],char:'\u{1f57a}',fitzpatrick_scale:!0,category:"people"},dancing_women:{keywords:["female","bunny","women","girls"],char:'\u{1f46f}',fitzpatrick_scale:!1,category:"people"},dancing_men:{keywords:["male","bunny","men","boys"],char:'\u{1f46f}\u200d\u2642\ufe0f',fitzpatrick_scale:!1,category:"people"},couple:{keywords:["pair","people","human","love","date","dating","like","affection","valentines","marriage"],char:'\u{1f46b}',fitzpatrick_scale:!1,category:"people"},two_men_holding_hands:{keywords:["pair","couple","love","like","bromance","friendship","people","human"],char:'\u{1f46c}',fitzpatrick_scale:!1,category:"people"},two_women_holding_hands:{keywords:["pair","friendship","couple","love","like","female","people","human"],char:'\u{1f46d}',fitzpatrick_scale:!1,category:"people"},bowing_woman:{keywords:["woman","female","girl"],char:'\u{1f647}\u200d\u2640\ufe0f',fitzpatrick_scale:!0,category:"people"},bowing_man:{keywords:["man","male","boy"],char:'\u{1f647}',fitzpatrick_scale:!0,category:"people"},man_facepalming:{keywords:["man","male","boy","disbelief"],char:'\u{1f926}\u200d\u2642\ufe0f',fitzpatrick_scale:!0,category:"people"},woman_facepalming:{keywords:["woman","female","girl","disbelief"],char:'\u{1f926}\u200d\u2640\ufe0f',fitzpatrick_scale:!0,category:"people"},woman_shrugging:{keywords:["woman","female","girl","confused","indifferent","doubt"],char:'\u{1f937}',fitzpatrick_scale:!0,category:"people"},man_shrugging:{keywords:["man","male","boy","confused","indifferent","doubt"],char:'\u{1f937}\u200d\u2642\ufe0f',fitzpatrick_scale:!0,category:"people"},tipping_hand_woman:{keywords:["female","girl","woman","human","information"],char:'\u{1f481}',fitzpatrick_scale:!0,category:"people"},tipping_hand_man:{keywords:["male","boy","man","human","information"],char:'\u{1f481}\u200d\u2642\ufe0f',fitzpatrick_scale:!0,category:"people"},no_good_woman:{keywords:["female","girl","woman","nope"],char:'\u{1f645}',fitzpatrick_scale:!0,category:"people"},no_good_man:{keywords:["male","boy","man","nope"],char:'\u{1f645}\u200d\u2642\ufe0f',fitzpatrick_scale:!0,category:"people"},ok_woman:{keywords:["women","girl","female","pink","human","woman"],char:'\u{1f646}',fitzpatrick_scale:!0,category:"people"},ok_man:{keywords:["men","boy","male","blue","human","man"],char:'\u{1f646}\u200d\u2642\ufe0f',fitzpatrick_scale:!0,category:"people"},raising_hand_woman:{keywords:["female","girl","woman"],char:'\u{1f64b}',fitzpatrick_scale:!0,category:"people"},raising_hand_man:{keywords:["male","boy","man"],char:'\u{1f64b}\u200d\u2642\ufe0f',fitzpatrick_scale:!0,category:"people"},pouting_woman:{keywords:["female","girl","woman"],char:'\u{1f64e}',fitzpatrick_scale:!0,category:"people"},pouting_man:{keywords:["male","boy","man"],char:'\u{1f64e}\u200d\u2642\ufe0f',fitzpatrick_scale:!0,category:"people"},frowning_woman:{keywords:["female","girl","woman","sad","depressed","discouraged","unhappy"],char:'\u{1f64d}',fitzpatrick_scale:!0,category:"people"},frowning_man:{keywords:["male","boy","man","sad","depressed","discouraged","unhappy"],char:'\u{1f64d}\u200d\u2642\ufe0f',fitzpatrick_scale:!0,category:"people"},haircut_woman:{keywords:["female","girl","woman"],char:'\u{1f487}',fitzpatrick_scale:!0,category:"people"},haircut_man:{keywords:["male","boy","man"],char:'\u{1f487}\u200d\u2642\ufe0f',fitzpatrick_scale:!0,category:"people"},massage_woman:{keywords:["female","girl","woman","head"],char:'\u{1f486}',fitzpatrick_scale:!0,category:"people"},massage_man:{keywords:["male","boy","man","head"],char:'\u{1f486}\u200d\u2642\ufe0f',fitzpatrick_scale:!0,category:"people"},woman_in_steamy_room:{keywords:["female","woman","spa","steamroom","sauna"],char:'\u{1f9d6}\u200d\u2640\ufe0f',fitzpatrick_scale:!0,category:"people"},man_in_steamy_room:{keywords:["male","man","spa","steamroom","sauna"],char:'\u{1f9d6}\u200d\u2642\ufe0f',fitzpatrick_scale:!0,category:"people"},couple_with_heart_woman_man:{keywords:["pair","love","like","affection","human","dating","valentines","marriage"],char:'\u{1f491}',fitzpatrick_scale:!1,category:"people"},couple_with_heart_woman_woman:{keywords:["pair","love","like","affection","human","dating","valentines","marriage"],char:'\u{1f469}\u200d\u2764\ufe0f\u200d\u{1f469}',fitzpatrick_scale:!1,category:"people"},couple_with_heart_man_man:{keywords:["pair","love","like","affection","human","dating","valentines","marriage"],char:'\u{1f468}\u200d\u2764\ufe0f\u200d\u{1f468}',fitzpatrick_scale:!1,category:"people"},couplekiss_man_woman:{keywords:["pair","valentines","love","like","dating","marriage"],char:'\u{1f48f}',fitzpatrick_scale:!1,category:"people"},couplekiss_woman_woman:{keywords:["pair","valentines","love","like","dating","marriage"],char:'\u{1f469}\u200d\u2764\ufe0f\u200d\u{1f48b}\u200d\u{1f469}',fitzpatrick_scale:!1,category:"people"},couplekiss_man_man:{keywords:["pair","valentines","love","like","dating","marriage"],char:'\u{1f468}\u200d\u2764\ufe0f\u200d\u{1f48b}\u200d\u{1f468}',fitzpatrick_scale:!1,category:"people"},family_man_woman_boy:{keywords:["home","parents","child","mom","dad","father","mother","people","human"],char:'\u{1f46a}',fitzpatrick_scale:!1,category:"people"},family_man_woman_girl:{keywords:["home","parents","people","human","child"],char:'\u{1f468}\u200d\u{1f469}\u200d\u{1f467}',fitzpatrick_scale:!1,category:"people"},family_man_woman_girl_boy:{keywords:["home","parents","people","human","children"],char:'\u{1f468}\u200d\u{1f469}\u200d\u{1f467}\u200d\u{1f466}',fitzpatrick_scale:!1,category:"people"},family_man_woman_boy_boy:{keywords:["home","parents","people","human","children"],char:'\u{1f468}\u200d\u{1f469}\u200d\u{1f466}\u200d\u{1f466}',fitzpatrick_scale:!1,category:"people"},family_man_woman_girl_girl:{keywords:["home","parents","people","human","children"],char:'\u{1f468}\u200d\u{1f469}\u200d\u{1f467}\u200d\u{1f467}',fitzpatrick_scale:!1,category:"people"},family_woman_woman_boy:{keywords:["home","parents","people","human","children"],char:'\u{1f469}\u200d\u{1f469}\u200d\u{1f466}',fitzpatrick_scale:!1,category:"people"},family_woman_woman_girl:{keywords:["home","parents","people","human","children"],char:'\u{1f469}\u200d\u{1f469}\u200d\u{1f467}',fitzpatrick_scale:!1,category:"people"},family_woman_woman_girl_boy:{keywords:["home","parents","people","human","children"],char:'\u{1f469}\u200d\u{1f469}\u200d\u{1f467}\u200d\u{1f466}',fitzpatrick_scale:!1,category:"people"},family_woman_woman_boy_boy:{keywords:["home","parents","people","human","children"],char:'\u{1f469}\u200d\u{1f469}\u200d\u{1f466}\u200d\u{1f466}',fitzpatrick_scale:!1,category:"people"},family_woman_woman_girl_girl:{keywords:["home","parents","people","human","children"],char:'\u{1f469}\u200d\u{1f469}\u200d\u{1f467}\u200d\u{1f467}',fitzpatrick_scale:!1,category:"people"},family_man_man_boy:{keywords:["home","parents","people","human","children"],char:'\u{1f468}\u200d\u{1f468}\u200d\u{1f466}',fitzpatrick_scale:!1,category:"people"},family_man_man_girl:{keywords:["home","parents","people","human","children"],char:'\u{1f468}\u200d\u{1f468}\u200d\u{1f467}',fitzpatrick_scale:!1,category:"people"},family_man_man_girl_boy:{keywords:["home","parents","people","human","children"],char:'\u{1f468}\u200d\u{1f468}\u200d\u{1f467}\u200d\u{1f466}',fitzpatrick_scale:!1,category:"people"},family_man_man_boy_boy:{keywords:["home","parents","people","human","children"],char:'\u{1f468}\u200d\u{1f468}\u200d\u{1f466}\u200d\u{1f466}',fitzpatrick_scale:!1,category:"people"},family_man_man_girl_girl:{keywords:["home","parents","people","human","children"],char:'\u{1f468}\u200d\u{1f468}\u200d\u{1f467}\u200d\u{1f467}',fitzpatrick_scale:!1,category:"people"},family_woman_boy:{keywords:["home","parent","people","human","child"],char:'\u{1f469}\u200d\u{1f466}',fitzpatrick_scale:!1,category:"people"},family_woman_girl:{keywords:["home","parent","people","human","child"],char:'\u{1f469}\u200d\u{1f467}',fitzpatrick_scale:!1,category:"people"},family_woman_girl_boy:{keywords:["home","parent","people","human","children"],char:'\u{1f469}\u200d\u{1f467}\u200d\u{1f466}',fitzpatrick_scale:!1,category:"people"},family_woman_boy_boy:{keywords:["home","parent","people","human","children"],char:'\u{1f469}\u200d\u{1f466}\u200d\u{1f466}',fitzpatrick_scale:!1,category:"people"},family_woman_girl_girl:{keywords:["home","parent","people","human","children"],char:'\u{1f469}\u200d\u{1f467}\u200d\u{1f467}',fitzpatrick_scale:!1,category:"people"},family_man_boy:{keywords:["home","parent","people","human","child"],char:'\u{1f468}\u200d\u{1f466}',fitzpatrick_scale:!1,category:"people"},family_man_girl:{keywords:["home","parent","people","human","child"],char:'\u{1f468}\u200d\u{1f467}',fitzpatrick_scale:!1,category:"people"},family_man_girl_boy:{keywords:["home","parent","people","human","children"],char:'\u{1f468}\u200d\u{1f467}\u200d\u{1f466}',fitzpatrick_scale:!1,category:"people"},family_man_boy_boy:{keywords:["home","parent","people","human","children"],char:'\u{1f468}\u200d\u{1f466}\u200d\u{1f466}',fitzpatrick_scale:!1,category:"people"},family_man_girl_girl:{keywords:["home","parent","people","human","children"],char:'\u{1f468}\u200d\u{1f467}\u200d\u{1f467}',fitzpatrick_scale:!1,category:"people"},yarn:{keywords:["ball","crochet","knit"],char:'\u{1f9f6}',fitzpatrick_scale:!1,category:"people"},thread:{keywords:["needle","sewing","spool","string"],char:'\u{1f9f5}',fitzpatrick_scale:!1,category:"people"},coat:{keywords:["jacket"],char:'\u{1f9e5}',fitzpatrick_scale:!1,category:"people"},labcoat:{keywords:["doctor","experiment","scientist","chemist"],char:'\u{1f97c}',fitzpatrick_scale:!1,category:"people"},womans_clothes:{keywords:["fashion","shopping_bags","female"],char:'\u{1f45a}',fitzpatrick_scale:!1,category:"people"},tshirt:{keywords:["fashion","cloth","casual","shirt","tee"],char:'\u{1f455}',fitzpatrick_scale:!1,category:"people"},jeans:{keywords:["fashion","shopping"],char:'\u{1f456}',fitzpatrick_scale:!1,category:"people"},necktie:{keywords:["shirt","suitup","formal","fashion","cloth","business"],char:'\u{1f454}',fitzpatrick_scale:!1,category:"people"},dress:{keywords:["clothes","fashion","shopping"],char:'\u{1f457}',fitzpatrick_scale:!1,category:"people"},bikini:{keywords:["swimming","female","woman","girl","fashion","beach","summer"],char:'\u{1f459}',fitzpatrick_scale:!1,category:"people"},kimono:{keywords:["dress","fashion","women","female","japanese"],char:'\u{1f458}',fitzpatrick_scale:!1,category:"people"},lipstick:{keywords:["female","girl","fashion","woman"],char:'\u{1f484}',fitzpatrick_scale:!1,category:"people"},kiss:{keywords:["face","lips","love","like","affection","valentines"],char:'\u{1f48b}',fitzpatrick_scale:!1,category:"people"},footprints:{keywords:["feet","tracking","walking","beach"],char:'\u{1f463}',fitzpatrick_scale:!1,category:"people"},flat_shoe:{keywords:["ballet","slip-on","slipper"],char:'\u{1f97f}',fitzpatrick_scale:!1,category:"people"},high_heel:{keywords:["fashion","shoes","female","pumps","stiletto"],char:'\u{1f460}',fitzpatrick_scale:!1,category:"people"},sandal:{keywords:["shoes","fashion","flip flops"],char:'\u{1f461}',fitzpatrick_scale:!1,category:"people"},boot:{keywords:["shoes","fashion"],char:'\u{1f462}',fitzpatrick_scale:!1,category:"people"},mans_shoe:{keywords:["fashion","male"],char:'\u{1f45e}',fitzpatrick_scale:!1,category:"people"},athletic_shoe:{keywords:["shoes","sports","sneakers"],char:'\u{1f45f}',fitzpatrick_scale:!1,category:"people"},hiking_boot:{keywords:["backpacking","camping","hiking"],char:'\u{1f97e}',fitzpatrick_scale:!1,category:"people"},socks:{keywords:["stockings","clothes"],char:'\u{1f9e6}',fitzpatrick_scale:!1,category:"people"},gloves:{keywords:["hands","winter","clothes"],char:'\u{1f9e4}',fitzpatrick_scale:!1,category:"people"},scarf:{keywords:["neck","winter","clothes"],char:'\u{1f9e3}',fitzpatrick_scale:!1,category:"people"},womans_hat:{keywords:["fashion","accessories","female","lady","spring"],char:'\u{1f452}',fitzpatrick_scale:!1,category:"people"},tophat:{keywords:["magic","gentleman","classy","circus"],char:'\u{1f3a9}',fitzpatrick_scale:!1,category:"people"},billed_hat:{keywords:["cap","baseball"],char:'\u{1f9e2}',fitzpatrick_scale:!1,category:"people"},rescue_worker_helmet:{keywords:["construction","build"],char:'\u26d1',fitzpatrick_scale:!1,category:"people"},mortar_board:{keywords:["school","college","degree","university","graduation","cap","hat","legal","learn","education"],char:'\u{1f393}',fitzpatrick_scale:!1,category:"people"},crown:{keywords:["king","kod","leader","royalty","lord"],char:'\u{1f451}',fitzpatrick_scale:!1,category:"people"},school_satchel:{keywords:["student","education","bag","backpack"],char:'\u{1f392}',fitzpatrick_scale:!1,category:"people"},luggage:{keywords:["packing","travel"],char:'\u{1f9f3}',fitzpatrick_scale:!1,category:"people"},pouch:{keywords:["bag","accessories","shopping"],char:'\u{1f45d}',fitzpatrick_scale:!1,category:"people"},purse:{keywords:["fashion","accessories","money","sales","shopping"],char:'\u{1f45b}',fitzpatrick_scale:!1,category:"people"},handbag:{keywords:["fashion","accessory","accessories","shopping"],char:'\u{1f45c}',fitzpatrick_scale:!1,category:"people"},briefcase:{keywords:["business","documents","work","law","legal","job","career"],char:'\u{1f4bc}',fitzpatrick_scale:!1,category:"people"},eyeglasses:{keywords:["fashion","accessories","eyesight","nerdy","dork","geek"],char:'\u{1f453}',fitzpatrick_scale:!1,category:"people"},dark_sunglasses:{keywords:["face","cool","accessories"],char:'\u{1f576}',fitzpatrick_scale:!1,category:"people"},goggles:{keywords:["eyes","protection","safety"],char:'\u{1f97d}',fitzpatrick_scale:!1,category:"people"},ring:{keywords:["wedding","propose","marriage","valentines","diamond","fashion","jewelry","gem","engagement"],char:'\u{1f48d}',fitzpatrick_scale:!1,category:"people"},closed_umbrella:{keywords:["weather","rain","drizzle"],char:'\u{1f302}',fitzpatrick_scale:!1,category:"people"},dog:{keywords:["animal","friend","nature","woof","puppy","pet","faithful"],char:'\u{1f436}',fitzpatrick_scale:!1,category:"animals_and_nature"},cat:{keywords:["animal","meow","nature","pet","kitten"],char:'\u{1f431}',fitzpatrick_scale:!1,category:"animals_and_nature"},mouse:{keywords:["animal","nature","cheese_wedge","rodent"],char:'\u{1f42d}',fitzpatrick_scale:!1,category:"animals_and_nature"},hamster:{keywords:["animal","nature"],char:'\u{1f439}',fitzpatrick_scale:!1,category:"animals_and_nature"},rabbit:{keywords:["animal","nature","pet","spring","magic","bunny"],char:'\u{1f430}',fitzpatrick_scale:!1,category:"animals_and_nature"},fox_face:{keywords:["animal","nature","face"],char:'\u{1f98a}',fitzpatrick_scale:!1,category:"animals_and_nature"},bear:{keywords:["animal","nature","wild"],char:'\u{1f43b}',fitzpatrick_scale:!1,category:"animals_and_nature"},panda_face:{keywords:["animal","nature","panda"],char:'\u{1f43c}',fitzpatrick_scale:!1,category:"animals_and_nature"},koala:{keywords:["animal","nature"],char:'\u{1f428}',fitzpatrick_scale:!1,category:"animals_and_nature"},tiger:{keywords:["animal","cat","danger","wild","nature","roar"],char:'\u{1f42f}',fitzpatrick_scale:!1,category:"animals_and_nature"},lion:{keywords:["animal","nature"],char:'\u{1f981}',fitzpatrick_scale:!1,category:"animals_and_nature"},cow:{keywords:["beef","ox","animal","nature","moo","milk"],char:'\u{1f42e}',fitzpatrick_scale:!1,category:"animals_and_nature"},pig:{keywords:["animal","oink","nature"],char:'\u{1f437}',fitzpatrick_scale:!1,category:"animals_and_nature"},pig_nose:{keywords:["animal","oink"],char:'\u{1f43d}',fitzpatrick_scale:!1,category:"animals_and_nature"},frog:{keywords:["animal","nature","croak","toad"],char:'\u{1f438}',fitzpatrick_scale:!1,category:"animals_and_nature"},squid:{keywords:["animal","nature","ocean","sea"],char:'\u{1f991}',fitzpatrick_scale:!1,category:"animals_and_nature"},octopus:{keywords:["animal","creature","ocean","sea","nature","beach"],char:'\u{1f419}',fitzpatrick_scale:!1,category:"animals_and_nature"},shrimp:{keywords:["animal","ocean","nature","seafood"],char:'\u{1f990}',fitzpatrick_scale:!1,category:"animals_and_nature"},monkey_face:{keywords:["animal","nature","circus"],char:'\u{1f435}',fitzpatrick_scale:!1,category:"animals_and_nature"},gorilla:{keywords:["animal","nature","circus"],char:'\u{1f98d}',fitzpatrick_scale:!1,category:"animals_and_nature"},see_no_evil:{keywords:["monkey","animal","nature","haha"],char:'\u{1f648}',fitzpatrick_scale:!1,category:"animals_and_nature"},hear_no_evil:{keywords:["animal","monkey","nature"],char:'\u{1f649}',fitzpatrick_scale:!1,category:"animals_and_nature"},speak_no_evil:{keywords:["monkey","animal","nature","omg"],char:'\u{1f64a}',fitzpatrick_scale:!1,category:"animals_and_nature"},monkey:{keywords:["animal","nature","banana","circus"],char:'\u{1f412}',fitzpatrick_scale:!1,category:"animals_and_nature"},chicken:{keywords:["animal","cluck","nature","bird"],char:'\u{1f414}',fitzpatrick_scale:!1,category:"animals_and_nature"},penguin:{keywords:["animal","nature"],char:'\u{1f427}',fitzpatrick_scale:!1,category:"animals_and_nature"},bird:{keywords:["animal","nature","fly","tweet","spring"],char:'\u{1f426}',fitzpatrick_scale:!1,category:"animals_and_nature"},baby_chick:{keywords:["animal","chicken","bird"],char:'\u{1f424}',fitzpatrick_scale:!1,category:"animals_and_nature"},hatching_chick:{keywords:["animal","chicken","egg","born","baby","bird"],char:'\u{1f423}',fitzpatrick_scale:!1,category:"animals_and_nature"},hatched_chick:{keywords:["animal","chicken","baby","bird"],char:'\u{1f425}',fitzpatrick_scale:!1,category:"animals_and_nature"},duck:{keywords:["animal","nature","bird","mallard"],char:'\u{1f986}',fitzpatrick_scale:!1,category:"animals_and_nature"},eagle:{keywords:["animal","nature","bird"],char:'\u{1f985}',fitzpatrick_scale:!1,category:"animals_and_nature"},owl:{keywords:["animal","nature","bird","hoot"],char:'\u{1f989}',fitzpatrick_scale:!1,category:"animals_and_nature"},bat:{keywords:["animal","nature","blind","vampire"],char:'\u{1f987}',fitzpatrick_scale:!1,category:"animals_and_nature"},wolf:{keywords:["animal","nature","wild"],char:'\u{1f43a}',fitzpatrick_scale:!1,category:"animals_and_nature"},boar:{keywords:["animal","nature"],char:'\u{1f417}',fitzpatrick_scale:!1,category:"animals_and_nature"},horse:{keywords:["animal","brown","nature"],char:'\u{1f434}',fitzpatrick_scale:!1,category:"animals_and_nature"},unicorn:{keywords:["animal","nature","mystical"],char:'\u{1f984}',fitzpatrick_scale:!1,category:"animals_and_nature"},honeybee:{keywords:["animal","insect","nature","bug","spring","honey"],char:'\u{1f41d}',fitzpatrick_scale:!1,category:"animals_and_nature"},bug:{keywords:["animal","insect","nature","worm"],char:'\u{1f41b}',fitzpatrick_scale:!1,category:"animals_and_nature"},butterfly:{keywords:["animal","insect","nature","caterpillar"],char:'\u{1f98b}',fitzpatrick_scale:!1,category:"animals_and_nature"},snail:{keywords:["slow","animal","shell"],char:'\u{1f40c}',fitzpatrick_scale:!1,category:"animals_and_nature"},beetle:{keywords:["animal","insect","nature","ladybug"],char:'\u{1f41e}',fitzpatrick_scale:!1,category:"animals_and_nature"},ant:{keywords:["animal","insect","nature","bug"],char:'\u{1f41c}',fitzpatrick_scale:!1,category:"animals_and_nature"},grasshopper:{keywords:["animal","cricket","chirp"],char:'\u{1f997}',fitzpatrick_scale:!1,category:"animals_and_nature"},spider:{keywords:["animal","arachnid"],char:'\u{1f577}',fitzpatrick_scale:!1,category:"animals_and_nature"},scorpion:{keywords:["animal","arachnid"],char:'\u{1f982}',fitzpatrick_scale:!1,category:"animals_and_nature"},crab:{keywords:["animal","crustacean"],char:'\u{1f980}',fitzpatrick_scale:!1,category:"animals_and_nature"},snake:{keywords:["animal","evil","nature","hiss","python"],char:'\u{1f40d}',fitzpatrick_scale:!1,category:"animals_and_nature"},lizard:{keywords:["animal","nature","reptile"],char:'\u{1f98e}',fitzpatrick_scale:!1,category:"animals_and_nature"},"t-rex":{keywords:["animal","nature","dinosaur","tyrannosaurus","extinct"],char:'\u{1f996}',fitzpatrick_scale:!1,category:"animals_and_nature"},sauropod:{keywords:["animal","nature","dinosaur","brachiosaurus","brontosaurus","diplodocus","extinct"],char:'\u{1f995}',fitzpatrick_scale:!1,category:"animals_and_nature"},turtle:{keywords:["animal","slow","nature","tortoise"],char:'\u{1f422}',fitzpatrick_scale:!1,category:"animals_and_nature"},tropical_fish:{keywords:["animal","swim","ocean","beach","nemo"],char:'\u{1f420}',fitzpatrick_scale:!1,category:"animals_and_nature"},fish:{keywords:["animal","food","nature"],char:'\u{1f41f}',fitzpatrick_scale:!1,category:"animals_and_nature"},blowfish:{keywords:["animal","nature","food","sea","ocean"],char:'\u{1f421}',fitzpatrick_scale:!1,category:"animals_and_nature"},dolphin:{keywords:["animal","nature","fish","sea","ocean","flipper","fins","beach"],char:'\u{1f42c}',fitzpatrick_scale:!1,category:"animals_and_nature"},shark:{keywords:["animal","nature","fish","sea","ocean","jaws","fins","beach"],char:'\u{1f988}',fitzpatrick_scale:!1,category:"animals_and_nature"},whale:{keywords:["animal","nature","sea","ocean"],char:'\u{1f433}',fitzpatrick_scale:!1,category:"animals_and_nature"},whale2:{keywords:["animal","nature","sea","ocean"],char:'\u{1f40b}',fitzpatrick_scale:!1,category:"animals_and_nature"},crocodile:{keywords:["animal","nature","reptile","lizard","alligator"],char:'\u{1f40a}',fitzpatrick_scale:!1,category:"animals_and_nature"},leopard:{keywords:["animal","nature"],char:'\u{1f406}',fitzpatrick_scale:!1,category:"animals_and_nature"},zebra:{keywords:["animal","nature","stripes","safari"],char:'\u{1f993}',fitzpatrick_scale:!1,category:"animals_and_nature"},tiger2:{keywords:["animal","nature","roar"],char:'\u{1f405}',fitzpatrick_scale:!1,category:"animals_and_nature"},water_buffalo:{keywords:["animal","nature","ox","cow"],char:'\u{1f403}',fitzpatrick_scale:!1,category:"animals_and_nature"},ox:{keywords:["animal","cow","beef"],char:'\u{1f402}',fitzpatrick_scale:!1,category:"animals_and_nature"},cow2:{keywords:["beef","ox","animal","nature","moo","milk"],char:'\u{1f404}',fitzpatrick_scale:!1,category:"animals_and_nature"},deer:{keywords:["animal","nature","horns","venison"],char:'\u{1f98c}',fitzpatrick_scale:!1,category:"animals_and_nature"},dromedary_camel:{keywords:["animal","hot","desert","hump"],char:'\u{1f42a}',fitzpatrick_scale:!1,category:"animals_and_nature"},camel:{keywords:["animal","nature","hot","desert","hump"],char:'\u{1f42b}',fitzpatrick_scale:!1,category:"animals_and_nature"},giraffe:{keywords:["animal","nature","spots","safari"],char:'\u{1f992}',fitzpatrick_scale:!1,category:"animals_and_nature"},elephant:{keywords:["animal","nature","nose","th","circus"],char:'\u{1f418}',fitzpatrick_scale:!1,category:"animals_and_nature"},rhinoceros:{keywords:["animal","nature","horn"],char:'\u{1f98f}',fitzpatrick_scale:!1,category:"animals_and_nature"},goat:{keywords:["animal","nature"],char:'\u{1f410}',fitzpatrick_scale:!1,category:"animals_and_nature"},ram:{keywords:["animal","sheep","nature"],char:'\u{1f40f}',fitzpatrick_scale:!1,category:"animals_and_nature"},sheep:{keywords:["animal","nature","wool","shipit"],char:'\u{1f411}',fitzpatrick_scale:!1,category:"animals_and_nature"},racehorse:{keywords:["animal","gamble","luck"],char:'\u{1f40e}',fitzpatrick_scale:!1,category:"animals_and_nature"},pig2:{keywords:["animal","nature"],char:'\u{1f416}',fitzpatrick_scale:!1,category:"animals_and_nature"},rat:{keywords:["animal","mouse","rodent"],char:'\u{1f400}',fitzpatrick_scale:!1,category:"animals_and_nature"},mouse2:{keywords:["animal","nature","rodent"],char:'\u{1f401}',fitzpatrick_scale:!1,category:"animals_and_nature"},rooster:{keywords:["animal","nature","chicken"],char:'\u{1f413}',fitzpatrick_scale:!1,category:"animals_and_nature"},turkey:{keywords:["animal","bird"],char:'\u{1f983}',fitzpatrick_scale:!1,category:"animals_and_nature"},dove:{keywords:["animal","bird"],char:'\u{1f54a}',fitzpatrick_scale:!1,category:"animals_and_nature"},dog2:{keywords:["animal","nature","friend","doge","pet","faithful"],char:'\u{1f415}',fitzpatrick_scale:!1,category:"animals_and_nature"},poodle:{keywords:["dog","animal","101","nature","pet"],char:'\u{1f429}',fitzpatrick_scale:!1,category:"animals_and_nature"},cat2:{keywords:["animal","meow","pet","cats"],char:'\u{1f408}',fitzpatrick_scale:!1,category:"animals_and_nature"},rabbit2:{keywords:["animal","nature","pet","magic","spring"],char:'\u{1f407}',fitzpatrick_scale:!1,category:"animals_and_nature"},chipmunk:{keywords:["animal","nature","rodent","squirrel"],char:'\u{1f43f}',fitzpatrick_scale:!1,category:"animals_and_nature"},hedgehog:{keywords:["animal","nature","spiny"],char:'\u{1f994}',fitzpatrick_scale:!1,category:"animals_and_nature"},raccoon:{keywords:["animal","nature"],char:'\u{1f99d}',fitzpatrick_scale:!1,category:"animals_and_nature"},llama:{keywords:["animal","nature","alpaca"],char:'\u{1f999}',fitzpatrick_scale:!1,category:"animals_and_nature"},hippopotamus:{keywords:["animal","nature"],char:'\u{1f99b}',fitzpatrick_scale:!1,category:"animals_and_nature"},kangaroo:{keywords:["animal","nature","australia","joey","hop","marsupial"],char:'\u{1f998}',fitzpatrick_scale:!1,category:"animals_and_nature"},badger:{keywords:["animal","nature","honey"],char:'\u{1f9a1}',fitzpatrick_scale:!1,category:"animals_and_nature"},swan:{keywords:["animal","nature","bird"],char:'\u{1f9a2}',fitzpatrick_scale:!1,category:"animals_and_nature"},peacock:{keywords:["animal","nature","peahen","bird"],char:'\u{1f99a}',fitzpatrick_scale:!1,category:"animals_and_nature"},parrot:{keywords:["animal","nature","bird","pirate","talk"],char:'\u{1f99c}',fitzpatrick_scale:!1,category:"animals_and_nature"},lobster:{keywords:["animal","nature","bisque","claws","seafood"],char:'\u{1f99e}',fitzpatrick_scale:!1,category:"animals_and_nature"},mosquito:{keywords:["animal","nature","insect","malaria"],char:'\u{1f99f}',fitzpatrick_scale:!1,category:"animals_and_nature"},paw_prints:{keywords:["animal","tracking","footprints","dog","cat","pet","feet"],char:'\u{1f43e}',fitzpatrick_scale:!1,category:"animals_and_nature"},dragon:{keywords:["animal","myth","nature","chinese","green"],char:'\u{1f409}',fitzpatrick_scale:!1,category:"animals_and_nature"},dragon_face:{keywords:["animal","myth","nature","chinese","green"],char:'\u{1f432}',fitzpatrick_scale:!1,category:"animals_and_nature"},cactus:{keywords:["vegetable","plant","nature"],char:'\u{1f335}',fitzpatrick_scale:!1,category:"animals_and_nature"},christmas_tree:{keywords:["festival","vacation","december","xmas","celebration"],char:'\u{1f384}',fitzpatrick_scale:!1,category:"animals_and_nature"},evergreen_tree:{keywords:["plant","nature"],char:'\u{1f332}',fitzpatrick_scale:!1,category:"animals_and_nature"},deciduous_tree:{keywords:["plant","nature"],char:'\u{1f333}',fitzpatrick_scale:!1,category:"animals_and_nature"},palm_tree:{keywords:["plant","vegetable","nature","summer","beach","mojito","tropical"],char:'\u{1f334}',fitzpatrick_scale:!1,category:"animals_and_nature"},seedling:{keywords:["plant","nature","grass","lawn","spring"],char:'\u{1f331}',fitzpatrick_scale:!1,category:"animals_and_nature"},herb:{keywords:["vegetable","plant","medicine","weed","grass","lawn"],char:'\u{1f33f}',fitzpatrick_scale:!1,category:"animals_and_nature"},shamrock:{keywords:["vegetable","plant","nature","irish","clover"],char:'\u2618',fitzpatrick_scale:!1,category:"animals_and_nature"},four_leaf_clover:{keywords:["vegetable","plant","nature","lucky","irish"],char:'\u{1f340}',fitzpatrick_scale:!1,category:"animals_and_nature"},bamboo:{keywords:["plant","nature","vegetable","panda","pine_decoration"],char:'\u{1f38d}',fitzpatrick_scale:!1,category:"animals_and_nature"},tanabata_tree:{keywords:["plant","nature","branch","summer"],char:'\u{1f38b}',fitzpatrick_scale:!1,category:"animals_and_nature"},leaves:{keywords:["nature","plant","tree","vegetable","grass","lawn","spring"],char:'\u{1f343}',fitzpatrick_scale:!1,category:"animals_and_nature"},fallen_leaf:{keywords:["nature","plant","vegetable","leaves"],char:'\u{1f342}',fitzpatrick_scale:!1,category:"animals_and_nature"},maple_leaf:{keywords:["nature","plant","vegetable","ca","fall"],char:'\u{1f341}',fitzpatrick_scale:!1,category:"animals_and_nature"},ear_of_rice:{keywords:["nature","plant"],char:'\u{1f33e}',fitzpatrick_scale:!1,category:"animals_and_nature"},hibiscus:{keywords:["plant","vegetable","flowers","beach"],char:'\u{1f33a}',fitzpatrick_scale:!1,category:"animals_and_nature"},sunflower:{keywords:["nature","plant","fall"],char:'\u{1f33b}',fitzpatrick_scale:!1,category:"animals_and_nature"},rose:{keywords:["flowers","valentines","love","spring"],char:'\u{1f339}',fitzpatrick_scale:!1,category:"animals_and_nature"},wilted_flower:{keywords:["plant","nature","flower"],char:'\u{1f940}',fitzpatrick_scale:!1,category:"animals_and_nature"},tulip:{keywords:["flowers","plant","nature","summer","spring"],char:'\u{1f337}',fitzpatrick_scale:!1,category:"animals_and_nature"},blossom:{keywords:["nature","flowers","yellow"],char:'\u{1f33c}',fitzpatrick_scale:!1,category:"animals_and_nature"},cherry_blossom:{keywords:["nature","plant","spring","flower"],char:'\u{1f338}',fitzpatrick_scale:!1,category:"animals_and_nature"},bouquet:{keywords:["flowers","nature","spring"],char:'\u{1f490}',fitzpatrick_scale:!1,category:"animals_and_nature"},mushroom:{keywords:["plant","vegetable"],char:'\u{1f344}',fitzpatrick_scale:!1,category:"animals_and_nature"},chestnut:{keywords:["food","squirrel"],char:'\u{1f330}',fitzpatrick_scale:!1,category:"animals_and_nature"},jack_o_lantern:{keywords:["halloween","light","pumpkin","creepy","fall"],char:'\u{1f383}',fitzpatrick_scale:!1,category:"animals_and_nature"},shell:{keywords:["nature","sea","beach"],char:'\u{1f41a}',fitzpatrick_scale:!1,category:"animals_and_nature"},spider_web:{keywords:["animal","insect","arachnid","silk"],char:'\u{1f578}',fitzpatrick_scale:!1,category:"animals_and_nature"},earth_americas:{keywords:["globe","world","USA","international"],char:'\u{1f30e}',fitzpatrick_scale:!1,category:"animals_and_nature"},earth_africa:{keywords:["globe","world","international"],char:'\u{1f30d}',fitzpatrick_scale:!1,category:"animals_and_nature"},earth_asia:{keywords:["globe","world","east","international"],char:'\u{1f30f}',fitzpatrick_scale:!1,category:"animals_and_nature"},full_moon:{keywords:["nature","yellow","twilight","planet","space","night","evening","sleep"],char:'\u{1f315}',fitzpatrick_scale:!1,category:"animals_and_nature"},waning_gibbous_moon:{keywords:["nature","twilight","planet","space","night","evening","sleep","waxing_gibbous_moon"],char:'\u{1f316}',fitzpatrick_scale:!1,category:"animals_and_nature"},last_quarter_moon:{keywords:["nature","twilight","planet","space","night","evening","sleep"],char:'\u{1f317}',fitzpatrick_scale:!1,category:"animals_and_nature"},waning_crescent_moon:{keywords:["nature","twilight","planet","space","night","evening","sleep"],char:'\u{1f318}',fitzpatrick_scale:!1,category:"animals_and_nature"},new_moon:{keywords:["nature","twilight","planet","space","night","evening","sleep"],char:'\u{1f311}',fitzpatrick_scale:!1,category:"animals_and_nature"},waxing_crescent_moon:{keywords:["nature","twilight","planet","space","night","evening","sleep"],char:'\u{1f312}',fitzpatrick_scale:!1,category:"animals_and_nature"},first_quarter_moon:{keywords:["nature","twilight","planet","space","night","evening","sleep"],char:'\u{1f313}',fitzpatrick_scale:!1,category:"animals_and_nature"},waxing_gibbous_moon:{keywords:["nature","night","sky","gray","twilight","planet","space","evening","sleep"],char:'\u{1f314}',fitzpatrick_scale:!1,category:"animals_and_nature"},new_moon_with_face:{keywords:["nature","twilight","planet","space","night","evening","sleep"],char:'\u{1f31a}',fitzpatrick_scale:!1,category:"animals_and_nature"},full_moon_with_face:{keywords:["nature","twilight","planet","space","night","evening","sleep"],char:'\u{1f31d}',fitzpatrick_scale:!1,category:"animals_and_nature"},first_quarter_moon_with_face:{keywords:["nature","twilight","planet","space","night","evening","sleep"],char:'\u{1f31b}',fitzpatrick_scale:!1,category:"animals_and_nature"},last_quarter_moon_with_face:{keywords:["nature","twilight","planet","space","night","evening","sleep"],char:'\u{1f31c}',fitzpatrick_scale:!1,category:"animals_and_nature"},sun_with_face:{keywords:["nature","morning","sky"],char:'\u{1f31e}',fitzpatrick_scale:!1,category:"animals_and_nature"},crescent_moon:{keywords:["night","sleep","sky","evening","magic"],char:'\u{1f319}',fitzpatrick_scale:!1,category:"animals_and_nature"},star:{keywords:["night","yellow"],char:'\u2b50',fitzpatrick_scale:!1,category:"animals_and_nature"},star2:{keywords:["night","sparkle","awesome","good","magic"],char:'\u{1f31f}',fitzpatrick_scale:!1,category:"animals_and_nature"},dizzy:{keywords:["star","sparkle","shoot","magic"],char:'\u{1f4ab}',fitzpatrick_scale:!1,category:"animals_and_nature"},sparkles:{keywords:["stars","shine","shiny","cool","awesome","good","magic"],char:'\u2728',fitzpatrick_scale:!1,category:"animals_and_nature"},comet:{keywords:["space"],char:'\u2604',fitzpatrick_scale:!1,category:"animals_and_nature"},sunny:{keywords:["weather","nature","brightness","summer","beach","spring"],char:'\u2600\ufe0f',fitzpatrick_scale:!1,category:"animals_and_nature"},sun_behind_small_cloud:{keywords:["weather"],char:'\u{1f324}',fitzpatrick_scale:!1,category:"animals_and_nature"},partly_sunny:{keywords:["weather","nature","cloudy","morning","fall","spring"],char:'\u26c5',fitzpatrick_scale:!1,category:"animals_and_nature"},sun_behind_large_cloud:{keywords:["weather"],char:'\u{1f325}',fitzpatrick_scale:!1,category:"animals_and_nature"},sun_behind_rain_cloud:{keywords:["weather"],char:'\u{1f326}',fitzpatrick_scale:!1,category:"animals_and_nature"},cloud:{keywords:["weather","sky"],char:'\u2601\ufe0f',fitzpatrick_scale:!1,category:"animals_and_nature"},cloud_with_rain:{keywords:["weather"],char:'\u{1f327}',fitzpatrick_scale:!1,category:"animals_and_nature"},cloud_with_lightning_and_rain:{keywords:["weather","lightning"],char:'\u26c8',fitzpatrick_scale:!1,category:"animals_and_nature"},cloud_with_lightning:{keywords:["weather","thunder"],char:'\u{1f329}',fitzpatrick_scale:!1,category:"animals_and_nature"},zap:{keywords:["thunder","weather","lightning bolt","fast"],char:'\u26a1',fitzpatrick_scale:!1,category:"animals_and_nature"},fire:{keywords:["hot","cook","flame"],char:'\u{1f525}',fitzpatrick_scale:!1,category:"animals_and_nature"},boom:{keywords:["bomb","explode","explosion","collision","blown"],char:'\u{1f4a5}',fitzpatrick_scale:!1,category:"animals_and_nature"},snowflake:{keywords:["winter","season","cold","weather","christmas","xmas"],char:'\u2744\ufe0f',fitzpatrick_scale:!1,category:"animals_and_nature"},cloud_with_snow:{keywords:["weather"],char:'\u{1f328}',fitzpatrick_scale:!1,category:"animals_and_nature"},snowman:{keywords:["winter","season","cold","weather","christmas","xmas","frozen","without_snow"],char:'\u26c4',fitzpatrick_scale:!1,category:"animals_and_nature"},snowman_with_snow:{keywords:["winter","season","cold","weather","christmas","xmas","frozen"],char:'\u2603',fitzpatrick_scale:!1,category:"animals_and_nature"},wind_face:{keywords:["gust","air"],char:'\u{1f32c}',fitzpatrick_scale:!1,category:"animals_and_nature"},dash:{keywords:["wind","air","fast","shoo","fart","smoke","puff"],char:'\u{1f4a8}',fitzpatrick_scale:!1,category:"animals_and_nature"},tornado:{keywords:["weather","cyclone","twister"],char:'\u{1f32a}',fitzpatrick_scale:!1,category:"animals_and_nature"},fog:{keywords:["weather"],char:'\u{1f32b}',fitzpatrick_scale:!1,category:"animals_and_nature"},open_umbrella:{keywords:["weather","spring"],char:'\u2602',fitzpatrick_scale:!1,category:"animals_and_nature"},umbrella:{keywords:["rainy","weather","spring"],char:'\u2614',fitzpatrick_scale:!1,category:"animals_and_nature"},droplet:{keywords:["water","drip","faucet","spring"],char:'\u{1f4a7}',fitzpatrick_scale:!1,category:"animals_and_nature"},sweat_drops:{keywords:["water","drip","oops"],char:'\u{1f4a6}',fitzpatrick_scale:!1,category:"animals_and_nature"},ocean:{keywords:["sea","water","wave","nature","tsunami","disaster"],char:'\u{1f30a}',fitzpatrick_scale:!1,category:"animals_and_nature"},green_apple:{keywords:["fruit","nature"],char:'\u{1f34f}',fitzpatrick_scale:!1,category:"food_and_drink"},apple:{keywords:["fruit","mac","school"],char:'\u{1f34e}',fitzpatrick_scale:!1,category:"food_and_drink"},pear:{keywords:["fruit","nature","food"],char:'\u{1f350}',fitzpatrick_scale:!1,category:"food_and_drink"},tangerine:{keywords:["food","fruit","nature","orange"],char:'\u{1f34a}',fitzpatrick_scale:!1,category:"food_and_drink"},lemon:{keywords:["fruit","nature"],char:'\u{1f34b}',fitzpatrick_scale:!1,category:"food_and_drink"},banana:{keywords:["fruit","food","monkey"],char:'\u{1f34c}',fitzpatrick_scale:!1,category:"food_and_drink"},watermelon:{keywords:["fruit","food","picnic","summer"],char:'\u{1f349}',fitzpatrick_scale:!1,category:"food_and_drink"},grapes:{keywords:["fruit","food","wine"],char:'\u{1f347}',fitzpatrick_scale:!1,category:"food_and_drink"},strawberry:{keywords:["fruit","food","nature"],char:'\u{1f353}',fitzpatrick_scale:!1,category:"food_and_drink"},melon:{keywords:["fruit","nature","food"],char:'\u{1f348}',fitzpatrick_scale:!1,category:"food_and_drink"},cherries:{keywords:["food","fruit"],char:'\u{1f352}',fitzpatrick_scale:!1,category:"food_and_drink"},peach:{keywords:["fruit","nature","food"],char:'\u{1f351}',fitzpatrick_scale:!1,category:"food_and_drink"},pineapple:{keywords:["fruit","nature","food"],char:'\u{1f34d}',fitzpatrick_scale:!1,category:"food_and_drink"},coconut:{keywords:["fruit","nature","food","palm"],char:'\u{1f965}',fitzpatrick_scale:!1,category:"food_and_drink"},kiwi_fruit:{keywords:["fruit","food"],char:'\u{1f95d}',fitzpatrick_scale:!1,category:"food_and_drink"},mango:{keywords:["fruit","food","tropical"],char:'\u{1f96d}',fitzpatrick_scale:!1,category:"food_and_drink"},avocado:{keywords:["fruit","food"],char:'\u{1f951}',fitzpatrick_scale:!1,category:"food_and_drink"},broccoli:{keywords:["fruit","food","vegetable"],char:'\u{1f966}',fitzpatrick_scale:!1,category:"food_and_drink"},tomato:{keywords:["fruit","vegetable","nature","food"],char:'\u{1f345}',fitzpatrick_scale:!1,category:"food_and_drink"},eggplant:{keywords:["vegetable","nature","food","aubergine"],char:'\u{1f346}',fitzpatrick_scale:!1,category:"food_and_drink"},cucumber:{keywords:["fruit","food","pickle"],char:'\u{1f952}',fitzpatrick_scale:!1,category:"food_and_drink"},carrot:{keywords:["vegetable","food","orange"],char:'\u{1f955}',fitzpatrick_scale:!1,category:"food_and_drink"},hot_pepper:{keywords:["food","spicy","chilli","chili"],char:'\u{1f336}',fitzpatrick_scale:!1,category:"food_and_drink"},potato:{keywords:["food","tuber","vegatable","starch"],char:'\u{1f954}',fitzpatrick_scale:!1,category:"food_and_drink"},corn:{keywords:["food","vegetable","plant"],char:'\u{1f33d}',fitzpatrick_scale:!1,category:"food_and_drink"},leafy_greens:{keywords:["food","vegetable","plant","bok choy","cabbage","kale","lettuce"],char:'\u{1f96c}',fitzpatrick_scale:!1,category:"food_and_drink"},sweet_potato:{keywords:["food","nature"],char:'\u{1f360}',fitzpatrick_scale:!1,category:"food_and_drink"},peanuts:{keywords:["food","nut"],char:'\u{1f95c}',fitzpatrick_scale:!1,category:"food_and_drink"},honey_pot:{keywords:["bees","sweet","kitchen"],char:'\u{1f36f}',fitzpatrick_scale:!1,category:"food_and_drink"},croissant:{keywords:["food","bread","french"],char:'\u{1f950}',fitzpatrick_scale:!1,category:"food_and_drink"},bread:{keywords:["food","wheat","breakfast","toast"],char:'\u{1f35e}',fitzpatrick_scale:!1,category:"food_and_drink"},baguette_bread:{keywords:["food","bread","french"],char:'\u{1f956}',fitzpatrick_scale:!1,category:"food_and_drink"},bagel:{keywords:["food","bread","bakery","schmear"],char:'\u{1f96f}',fitzpatrick_scale:!1,category:"food_and_drink"},pretzel:{keywords:["food","bread","twisted"],char:'\u{1f968}',fitzpatrick_scale:!1,category:"food_and_drink"},cheese:{keywords:["food","chadder"],char:'\u{1f9c0}',fitzpatrick_scale:!1,category:"food_and_drink"},egg:{keywords:["food","chicken","breakfast"],char:'\u{1f95a}',fitzpatrick_scale:!1,category:"food_and_drink"},bacon:{keywords:["food","breakfast","pork","pig","meat"],char:'\u{1f953}',fitzpatrick_scale:!1,category:"food_and_drink"},steak:{keywords:["food","cow","meat","cut","chop","lambchop","porkchop"],char:'\u{1f969}',fitzpatrick_scale:!1,category:"food_and_drink"},pancakes:{keywords:["food","breakfast","flapjacks","hotcakes"],char:'\u{1f95e}',fitzpatrick_scale:!1,category:"food_and_drink"},poultry_leg:{keywords:["food","meat","drumstick","bird","chicken","turkey"],char:'\u{1f357}',fitzpatrick_scale:!1,category:"food_and_drink"},meat_on_bone:{keywords:["good","food","drumstick"],char:'\u{1f356}',fitzpatrick_scale:!1,category:"food_and_drink"},bone:{keywords:["skeleton"],char:'\u{1f9b4}',fitzpatrick_scale:!1,category:"food_and_drink"},fried_shrimp:{keywords:["food","animal","appetizer","summer"],char:'\u{1f364}',fitzpatrick_scale:!1,category:"food_and_drink"},fried_egg:{keywords:["food","breakfast","kitchen","egg"],char:'\u{1f373}',fitzpatrick_scale:!1,category:"food_and_drink"},hamburger:{keywords:["meat","fast food","beef","cheeseburger","mcdonalds","burger king"],char:'\u{1f354}',fitzpatrick_scale:!1,category:"food_and_drink"},fries:{keywords:["chips","snack","fast food"],char:'\u{1f35f}',fitzpatrick_scale:!1,category:"food_and_drink"},stuffed_flatbread:{keywords:["food","flatbread","stuffed","gyro"],char:'\u{1f959}',fitzpatrick_scale:!1,category:"food_and_drink"},hotdog:{keywords:["food","frankfurter"],char:'\u{1f32d}',fitzpatrick_scale:!1,category:"food_and_drink"},pizza:{keywords:["food","party"],char:'\u{1f355}',fitzpatrick_scale:!1,category:"food_and_drink"},sandwich:{keywords:["food","lunch","bread"],char:'\u{1f96a}',fitzpatrick_scale:!1,category:"food_and_drink"},canned_food:{keywords:["food","soup"],char:'\u{1f96b}',fitzpatrick_scale:!1,category:"food_and_drink"},spaghetti:{keywords:["food","italian","noodle"],char:'\u{1f35d}',fitzpatrick_scale:!1,category:"food_and_drink"},taco:{keywords:["food","mexican"],char:'\u{1f32e}',fitzpatrick_scale:!1,category:"food_and_drink"},burrito:{keywords:["food","mexican"],char:'\u{1f32f}',fitzpatrick_scale:!1,category:"food_and_drink"},green_salad:{keywords:["food","healthy","lettuce"],char:'\u{1f957}',fitzpatrick_scale:!1,category:"food_and_drink"},shallow_pan_of_food:{keywords:["food","cooking","casserole","paella"],char:'\u{1f958}',fitzpatrick_scale:!1,category:"food_and_drink"},ramen:{keywords:["food","japanese","noodle","chopsticks"],char:'\u{1f35c}',fitzpatrick_scale:!1,category:"food_and_drink"},stew:{keywords:["food","meat","soup"],char:'\u{1f372}',fitzpatrick_scale:!1,category:"food_and_drink"},fish_cake:{keywords:["food","japan","sea","beach","narutomaki","pink","swirl","kamaboko","surimi","ramen"],char:'\u{1f365}',fitzpatrick_scale:!1,category:"food_and_drink"},fortune_cookie:{keywords:["food","prophecy"],char:'\u{1f960}',fitzpatrick_scale:!1,category:"food_and_drink"},sushi:{keywords:["food","fish","japanese","rice"],char:'\u{1f363}',fitzpatrick_scale:!1,category:"food_and_drink"},bento:{keywords:["food","japanese","box"],char:'\u{1f371}',fitzpatrick_scale:!1,category:"food_and_drink"},curry:{keywords:["food","spicy","hot","indian"],char:'\u{1f35b}',fitzpatrick_scale:!1,category:"food_and_drink"},rice_ball:{keywords:["food","japanese"],char:'\u{1f359}',fitzpatrick_scale:!1,category:"food_and_drink"},rice:{keywords:["food","china","asian"],char:'\u{1f35a}',fitzpatrick_scale:!1,category:"food_and_drink"},rice_cracker:{keywords:["food","japanese"],char:'\u{1f358}',fitzpatrick_scale:!1,category:"food_and_drink"},oden:{keywords:["food","japanese"],char:'\u{1f362}',fitzpatrick_scale:!1,category:"food_and_drink"},dango:{keywords:["food","dessert","sweet","japanese","barbecue","meat"],char:'\u{1f361}',fitzpatrick_scale:!1,category:"food_and_drink"},shaved_ice:{keywords:["hot","dessert","summer"],char:'\u{1f367}',fitzpatrick_scale:!1,category:"food_and_drink"},ice_cream:{keywords:["food","hot","dessert"],char:'\u{1f368}',fitzpatrick_scale:!1,category:"food_and_drink"},icecream:{keywords:["food","hot","dessert","summer"],char:'\u{1f366}',fitzpatrick_scale:!1,category:"food_and_drink"},pie:{keywords:["food","dessert","pastry"],char:'\u{1f967}',fitzpatrick_scale:!1,category:"food_and_drink"},cake:{keywords:["food","dessert"],char:'\u{1f370}',fitzpatrick_scale:!1,category:"food_and_drink"},cupcake:{keywords:["food","dessert","bakery","sweet"],char:'\u{1f9c1}',fitzpatrick_scale:!1,category:"food_and_drink"},moon_cake:{keywords:["food","autumn"],char:'\u{1f96e}',fitzpatrick_scale:!1,category:"food_and_drink"},birthday:{keywords:["food","dessert","cake"],char:'\u{1f382}',fitzpatrick_scale:!1,category:"food_and_drink"},custard:{keywords:["dessert","food"],char:'\u{1f36e}',fitzpatrick_scale:!1,category:"food_and_drink"},candy:{keywords:["snack","dessert","sweet","lolly"],char:'\u{1f36c}',fitzpatrick_scale:!1,category:"food_and_drink"},lollipop:{keywords:["food","snack","candy","sweet"],char:'\u{1f36d}',fitzpatrick_scale:!1,category:"food_and_drink"},chocolate_bar:{keywords:["food","snack","dessert","sweet"],char:'\u{1f36b}',fitzpatrick_scale:!1,category:"food_and_drink"},popcorn:{keywords:["food","movie theater","films","snack"],char:'\u{1f37f}',fitzpatrick_scale:!1,category:"food_and_drink"},dumpling:{keywords:["food","empanada","pierogi","potsticker"],char:'\u{1f95f}',fitzpatrick_scale:!1,category:"food_and_drink"},doughnut:{keywords:["food","dessert","snack","sweet","donut"],char:'\u{1f369}',fitzpatrick_scale:!1,category:"food_and_drink"},cookie:{keywords:["food","snack","oreo","chocolate","sweet","dessert"],char:'\u{1f36a}',fitzpatrick_scale:!1,category:"food_and_drink"},milk_glass:{keywords:["beverage","drink","cow"],char:'\u{1f95b}',fitzpatrick_scale:!1,category:"food_and_drink"},beer:{keywords:["relax","beverage","drink","drunk","party","pub","summer","alcohol","booze"],char:'\u{1f37a}',fitzpatrick_scale:!1,category:"food_and_drink"},beers:{keywords:["relax","beverage","drink","drunk","party","pub","summer","alcohol","booze"],char:'\u{1f37b}',fitzpatrick_scale:!1,category:"food_and_drink"},clinking_glasses:{keywords:["beverage","drink","party","alcohol","celebrate","cheers","wine","champagne","toast"],char:'\u{1f942}',fitzpatrick_scale:!1,category:"food_and_drink"},wine_glass:{keywords:["drink","beverage","drunk","alcohol","booze"],char:'\u{1f377}',fitzpatrick_scale:!1,category:"food_and_drink"},tumbler_glass:{keywords:["drink","beverage","drunk","alcohol","liquor","booze","bourbon","scotch","whisky","glass","shot"],char:'\u{1f943}',fitzpatrick_scale:!1,category:"food_and_drink"},cocktail:{keywords:["drink","drunk","alcohol","beverage","booze","mojito"],char:'\u{1f378}',fitzpatrick_scale:!1,category:"food_and_drink"},tropical_drink:{keywords:["beverage","cocktail","summer","beach","alcohol","booze","mojito"],char:'\u{1f379}',fitzpatrick_scale:!1,category:"food_and_drink"},champagne:{keywords:["drink","wine","bottle","celebration"],char:'\u{1f37e}',fitzpatrick_scale:!1,category:"food_and_drink"},sake:{keywords:["wine","drink","drunk","beverage","japanese","alcohol","booze"],char:'\u{1f376}',fitzpatrick_scale:!1,category:"food_and_drink"},tea:{keywords:["drink","bowl","breakfast","green","british"],char:'\u{1f375}',fitzpatrick_scale:!1,category:"food_and_drink"},cup_with_straw:{keywords:["drink","soda"],char:'\u{1f964}',fitzpatrick_scale:!1,category:"food_and_drink"},coffee:{keywords:["beverage","caffeine","latte","espresso"],char:'\u2615',fitzpatrick_scale:!1,category:"food_and_drink"},baby_bottle:{keywords:["food","container","milk"],char:'\u{1f37c}',fitzpatrick_scale:!1,category:"food_and_drink"},salt:{keywords:["condiment","shaker"],char:'\u{1f9c2}',fitzpatrick_scale:!1,category:"food_and_drink"},spoon:{keywords:["cutlery","kitchen","tableware"],char:'\u{1f944}',fitzpatrick_scale:!1,category:"food_and_drink"},fork_and_knife:{keywords:["cutlery","kitchen"],char:'\u{1f374}',fitzpatrick_scale:!1,category:"food_and_drink"},plate_with_cutlery:{keywords:["food","eat","meal","lunch","dinner","restaurant"],char:'\u{1f37d}',fitzpatrick_scale:!1,category:"food_and_drink"},bowl_with_spoon:{keywords:["food","breakfast","cereal","oatmeal","porridge"],char:'\u{1f963}',fitzpatrick_scale:!1,category:"food_and_drink"},takeout_box:{keywords:["food","leftovers"],char:'\u{1f961}',fitzpatrick_scale:!1,category:"food_and_drink"},chopsticks:{keywords:["food"],char:'\u{1f962}',fitzpatrick_scale:!1,category:"food_and_drink"},soccer:{keywords:["sports","football"],char:'\u26bd',fitzpatrick_scale:!1,category:"activity"},basketball:{keywords:["sports","balls","NBA"],char:'\u{1f3c0}',fitzpatrick_scale:!1,category:"activity"},football:{keywords:["sports","balls","NFL"],char:'\u{1f3c8}',fitzpatrick_scale:!1,category:"activity"},baseball:{keywords:["sports","balls"],char:'\u26be',fitzpatrick_scale:!1,category:"activity"},softball:{keywords:["sports","balls"],char:'\u{1f94e}',fitzpatrick_scale:!1,category:"activity"},tennis:{keywords:["sports","balls","green"],char:'\u{1f3be}',fitzpatrick_scale:!1,category:"activity"},volleyball:{keywords:["sports","balls"],char:'\u{1f3d0}',fitzpatrick_scale:!1,category:"activity"},rugby_football:{keywords:["sports","team"],char:'\u{1f3c9}',fitzpatrick_scale:!1,category:"activity"},flying_disc:{keywords:["sports","frisbee","ultimate"],char:'\u{1f94f}',fitzpatrick_scale:!1,category:"activity"},"8ball":{keywords:["pool","hobby","game","luck","magic"],char:'\u{1f3b1}',fitzpatrick_scale:!1,category:"activity"},golf:{keywords:["sports","business","flag","hole","summer"],char:'\u26f3',fitzpatrick_scale:!1,category:"activity"},golfing_woman:{keywords:["sports","business","woman","female"],char:'\u{1f3cc}\ufe0f\u200d\u2640\ufe0f',fitzpatrick_scale:!1,category:"activity"},golfing_man:{keywords:["sports","business"],char:'\u{1f3cc}',fitzpatrick_scale:!0,category:"activity"},ping_pong:{keywords:["sports","pingpong"],char:'\u{1f3d3}',fitzpatrick_scale:!1,category:"activity"},badminton:{keywords:["sports"],char:'\u{1f3f8}',fitzpatrick_scale:!1,category:"activity"},goal_net:{keywords:["sports"],char:'\u{1f945}',fitzpatrick_scale:!1,category:"activity"},ice_hockey:{keywords:["sports"],char:'\u{1f3d2}',fitzpatrick_scale:!1,category:"activity"},field_hockey:{keywords:["sports"],char:'\u{1f3d1}',fitzpatrick_scale:!1,category:"activity"},lacrosse:{keywords:["sports","ball","stick"],char:'\u{1f94d}',fitzpatrick_scale:!1,category:"activity"},cricket:{keywords:["sports"],char:'\u{1f3cf}',fitzpatrick_scale:!1,category:"activity"},ski:{keywords:["sports","winter","cold","snow"],char:'\u{1f3bf}',fitzpatrick_scale:!1,category:"activity"},skier:{keywords:["sports","winter","snow"],char:'\u26f7',fitzpatrick_scale:!1,category:"activity"},snowboarder:{keywords:["sports","winter"],char:'\u{1f3c2}',fitzpatrick_scale:!0,category:"activity"},person_fencing:{keywords:["sports","fencing","sword"],char:'\u{1f93a}',fitzpatrick_scale:!1,category:"activity"},women_wrestling:{keywords:["sports","wrestlers"],char:'\u{1f93c}\u200d\u2640\ufe0f',fitzpatrick_scale:!1,category:"activity"},men_wrestling:{keywords:["sports","wrestlers"],char:'\u{1f93c}\u200d\u2642\ufe0f',fitzpatrick_scale:!1,category:"activity"},woman_cartwheeling:{keywords:["gymnastics"],char:'\u{1f938}\u200d\u2640\ufe0f',fitzpatrick_scale:!0,category:"activity"},man_cartwheeling:{keywords:["gymnastics"],char:'\u{1f938}\u200d\u2642\ufe0f',fitzpatrick_scale:!0,category:"activity"},woman_playing_handball:{keywords:["sports"],char:'\u{1f93e}\u200d\u2640\ufe0f',fitzpatrick_scale:!0,category:"activity"},man_playing_handball:{keywords:["sports"],char:'\u{1f93e}\u200d\u2642\ufe0f',fitzpatrick_scale:!0,category:"activity"},ice_skate:{keywords:["sports"],char:'\u26f8',fitzpatrick_scale:!1,category:"activity"},curling_stone:{keywords:["sports"],char:'\u{1f94c}',fitzpatrick_scale:!1,category:"activity"},skateboard:{keywords:["board"],char:'\u{1f6f9}',fitzpatrick_scale:!1,category:"activity"},sled:{keywords:["sleigh","luge","toboggan"],char:'\u{1f6f7}',fitzpatrick_scale:!1,category:"activity"},bow_and_arrow:{keywords:["sports"],char:'\u{1f3f9}',fitzpatrick_scale:!1,category:"activity"},fishing_pole_and_fish:{keywords:["food","hobby","summer"],char:'\u{1f3a3}',fitzpatrick_scale:!1,category:"activity"},boxing_glove:{keywords:["sports","fighting"],char:'\u{1f94a}',fitzpatrick_scale:!1,category:"activity"},martial_arts_uniform:{keywords:["judo","karate","taekwondo"],char:'\u{1f94b}',fitzpatrick_scale:!1,category:"activity"},rowing_woman:{keywords:["sports","hobby","water","ship","woman","female"],char:'\u{1f6a3}\u200d\u2640\ufe0f',fitzpatrick_scale:!0,category:"activity"},rowing_man:{keywords:["sports","hobby","water","ship"],char:'\u{1f6a3}',fitzpatrick_scale:!0,category:"activity"},climbing_woman:{keywords:["sports","hobby","woman","female","rock"],char:'\u{1f9d7}\u200d\u2640\ufe0f',fitzpatrick_scale:!0,category:"activity"},climbing_man:{keywords:["sports","hobby","man","male","rock"],char:'\u{1f9d7}\u200d\u2642\ufe0f',fitzpatrick_scale:!0,category:"activity"},swimming_woman:{keywords:["sports","exercise","human","athlete","water","summer","woman","female"],char:'\u{1f3ca}\u200d\u2640\ufe0f',fitzpatrick_scale:!0,category:"activity"},swimming_man:{keywords:["sports","exercise","human","athlete","water","summer"],char:'\u{1f3ca}',fitzpatrick_scale:!0,category:"activity"},woman_playing_water_polo:{keywords:["sports","pool"],char:'\u{1f93d}\u200d\u2640\ufe0f',fitzpatrick_scale:!0,category:"activity"},man_playing_water_polo:{keywords:["sports","pool"],char:'\u{1f93d}\u200d\u2642\ufe0f',fitzpatrick_scale:!0,category:"activity"},woman_in_lotus_position:{keywords:["woman","female","meditation","yoga","serenity","zen","mindfulness"],char:'\u{1f9d8}\u200d\u2640\ufe0f',fitzpatrick_scale:!0,category:"activity"},man_in_lotus_position:{keywords:["man","male","meditation","yoga","serenity","zen","mindfulness"],char:'\u{1f9d8}\u200d\u2642\ufe0f',fitzpatrick_scale:!0,category:"activity"},surfing_woman:{keywords:["sports","ocean","sea","summer","beach","woman","female"],char:'\u{1f3c4}\u200d\u2640\ufe0f',fitzpatrick_scale:!0,category:"activity"},surfing_man:{keywords:["sports","ocean","sea","summer","beach"],char:'\u{1f3c4}',fitzpatrick_scale:!0,category:"activity"},bath:{keywords:["clean","shower","bathroom"],char:'\u{1f6c0}',fitzpatrick_scale:!0,category:"activity"},basketball_woman:{keywords:["sports","human","woman","female"],char:'\u26f9\ufe0f\u200d\u2640\ufe0f',fitzpatrick_scale:!0,category:"activity"},basketball_man:{keywords:["sports","human"],char:'\u26f9',fitzpatrick_scale:!0,category:"activity"},weight_lifting_woman:{keywords:["sports","training","exercise","woman","female"],char:'\u{1f3cb}\ufe0f\u200d\u2640\ufe0f',fitzpatrick_scale:!0,category:"activity"},weight_lifting_man:{keywords:["sports","training","exercise"],char:'\u{1f3cb}',fitzpatrick_scale:!0,category:"activity"},biking_woman:{keywords:["sports","bike","exercise","hipster","woman","female"],char:'\u{1f6b4}\u200d\u2640\ufe0f',fitzpatrick_scale:!0,category:"activity"},biking_man:{keywords:["sports","bike","exercise","hipster"],char:'\u{1f6b4}',fitzpatrick_scale:!0,category:"activity"},mountain_biking_woman:{keywords:["transportation","sports","human","race","bike","woman","female"],char:'\u{1f6b5}\u200d\u2640\ufe0f',fitzpatrick_scale:!0,category:"activity"},mountain_biking_man:{keywords:["transportation","sports","human","race","bike"],char:'\u{1f6b5}',fitzpatrick_scale:!0,category:"activity"},horse_racing:{keywords:["animal","betting","competition","gambling","luck"],char:'\u{1f3c7}',fitzpatrick_scale:!0,category:"activity"},business_suit_levitating:{keywords:["suit","business","levitate","hover","jump"],char:'\u{1f574}',fitzpatrick_scale:!0,category:"activity"},trophy:{keywords:["win","award","contest","place","ftw","ceremony"],char:'\u{1f3c6}',fitzpatrick_scale:!1,category:"activity"},running_shirt_with_sash:{keywords:["play","pageant"],char:'\u{1f3bd}',fitzpatrick_scale:!1,category:"activity"},medal_sports:{keywords:["award","winning"],char:'\u{1f3c5}',fitzpatrick_scale:!1,category:"activity"},medal_military:{keywords:["award","winning","army"],char:'\u{1f396}',fitzpatrick_scale:!1,category:"activity"},"1st_place_medal":{keywords:["award","winning","first"],char:'\u{1f947}',fitzpatrick_scale:!1,category:"activity"},"2nd_place_medal":{keywords:["award","second"],char:'\u{1f948}',fitzpatrick_scale:!1,category:"activity"},"3rd_place_medal":{keywords:["award","third"],char:'\u{1f949}',fitzpatrick_scale:!1,category:"activity"},reminder_ribbon:{keywords:["sports","cause","support","awareness"],char:'\u{1f397}',fitzpatrick_scale:!1,category:"activity"},rosette:{keywords:["flower","decoration","military"],char:'\u{1f3f5}',fitzpatrick_scale:!1,category:"activity"},ticket:{keywords:["event","concert","pass"],char:'\u{1f3ab}',fitzpatrick_scale:!1,category:"activity"},tickets:{keywords:["sports","concert","entrance"],char:'\u{1f39f}',fitzpatrick_scale:!1,category:"activity"},performing_arts:{keywords:["acting","theater","drama"],char:'\u{1f3ad}',fitzpatrick_scale:!1,category:"activity"},art:{keywords:["design","paint","draw","colors"],char:'\u{1f3a8}',fitzpatrick_scale:!1,category:"activity"},circus_tent:{keywords:["festival","carnival","party"],char:'\u{1f3aa}',fitzpatrick_scale:!1,category:"activity"},woman_juggling:{keywords:["juggle","balance","skill","multitask"],char:'\u{1f939}\u200d\u2640\ufe0f',fitzpatrick_scale:!0,category:"activity"},man_juggling:{keywords:["juggle","balance","skill","multitask"],char:'\u{1f939}\u200d\u2642\ufe0f',fitzpatrick_scale:!0,category:"activity"},microphone:{keywords:["sound","music","PA","sing","talkshow"],char:'\u{1f3a4}',fitzpatrick_scale:!1,category:"activity"},headphones:{keywords:["music","score","gadgets"],char:'\u{1f3a7}',fitzpatrick_scale:!1,category:"activity"},musical_score:{keywords:["treble","clef","compose"],char:'\u{1f3bc}',fitzpatrick_scale:!1,category:"activity"},musical_keyboard:{keywords:["piano","instrument","compose"],char:'\u{1f3b9}',fitzpatrick_scale:!1,category:"activity"},drum:{keywords:["music","instrument","drumsticks","snare"],char:'\u{1f941}',fitzpatrick_scale:!1,category:"activity"},saxophone:{keywords:["music","instrument","jazz","blues"],char:'\u{1f3b7}',fitzpatrick_scale:!1,category:"activity"},trumpet:{keywords:["music","brass"],char:'\u{1f3ba}',fitzpatrick_scale:!1,category:"activity"},guitar:{keywords:["music","instrument"],char:'\u{1f3b8}',fitzpatrick_scale:!1,category:"activity"},violin:{keywords:["music","instrument","orchestra","symphony"],char:'\u{1f3bb}',fitzpatrick_scale:!1,category:"activity"},clapper:{keywords:["movie","film","record"],char:'\u{1f3ac}',fitzpatrick_scale:!1,category:"activity"},video_game:{keywords:["play","console","PS4","controller"],char:'\u{1f3ae}',fitzpatrick_scale:!1,category:"activity"},space_invader:{keywords:["game","arcade","play"],char:'\u{1f47e}',fitzpatrick_scale:!1,category:"activity"},dart:{keywords:["game","play","bar","target","bullseye"],char:'\u{1f3af}',fitzpatrick_scale:!1,category:"activity"},game_die:{keywords:["dice","random","tabletop","play","luck"],char:'\u{1f3b2}',fitzpatrick_scale:!1,category:"activity"},chess_pawn:{keywords:["expendable"],char:"\u265f",fitzpatrick_scale:!1,category:"activity"},slot_machine:{keywords:["bet","gamble","vegas","fruit machine","luck","casino"],char:'\u{1f3b0}',fitzpatrick_scale:!1,category:"activity"},jigsaw:{keywords:["interlocking","puzzle","piece"],char:'\u{1f9e9}',fitzpatrick_scale:!1,category:"activity"},bowling:{keywords:["sports","fun","play"],char:'\u{1f3b3}',fitzpatrick_scale:!1,category:"activity"},red_car:{keywords:["red","transportation","vehicle"],char:'\u{1f697}',fitzpatrick_scale:!1,category:"travel_and_places"},taxi:{keywords:["uber","vehicle","cars","transportation"],char:'\u{1f695}',fitzpatrick_scale:!1,category:"travel_and_places"},blue_car:{keywords:["transportation","vehicle"],char:'\u{1f699}',fitzpatrick_scale:!1,category:"travel_and_places"},bus:{keywords:["car","vehicle","transportation"],char:'\u{1f68c}',fitzpatrick_scale:!1,category:"travel_and_places"},trolleybus:{keywords:["bart","transportation","vehicle"],char:'\u{1f68e}',fitzpatrick_scale:!1,category:"travel_and_places"},racing_car:{keywords:["sports","race","fast","formula","f1"],char:'\u{1f3ce}',fitzpatrick_scale:!1,category:"travel_and_places"},police_car:{keywords:["vehicle","cars","transportation","law","legal","enforcement"],char:'\u{1f693}',fitzpatrick_scale:!1,category:"travel_and_places"},ambulance:{keywords:["health","911","hospital"],char:'\u{1f691}',fitzpatrick_scale:!1,category:"travel_and_places"},fire_engine:{keywords:["transportation","cars","vehicle"],char:'\u{1f692}',fitzpatrick_scale:!1,category:"travel_and_places"},minibus:{keywords:["vehicle","car","transportation"],char:'\u{1f690}',fitzpatrick_scale:!1,category:"travel_and_places"},truck:{keywords:["cars","transportation"],char:'\u{1f69a}',fitzpatrick_scale:!1,category:"travel_and_places"},articulated_lorry:{keywords:["vehicle","cars","transportation","express"],char:'\u{1f69b}',fitzpatrick_scale:!1,category:"travel_and_places"},tractor:{keywords:["vehicle","car","farming","agriculture"],char:'\u{1f69c}',fitzpatrick_scale:!1,category:"travel_and_places"},kick_scooter:{keywords:["vehicle","kick","razor"],char:'\u{1f6f4}',fitzpatrick_scale:!1,category:"travel_and_places"},motorcycle:{keywords:["race","sports","fast"],char:'\u{1f3cd}',fitzpatrick_scale:!1,category:"travel_and_places"},bike:{keywords:["sports","bicycle","exercise","hipster"],char:'\u{1f6b2}',fitzpatrick_scale:!1,category:"travel_and_places"},motor_scooter:{keywords:["vehicle","vespa","sasha"],char:'\u{1f6f5}',fitzpatrick_scale:!1,category:"travel_and_places"},rotating_light:{keywords:["police","ambulance","911","emergency","alert","error","pinged","law","legal"],char:'\u{1f6a8}',fitzpatrick_scale:!1,category:"travel_and_places"},oncoming_police_car:{keywords:["vehicle","law","legal","enforcement","911"],char:'\u{1f694}',fitzpatrick_scale:!1,category:"travel_and_places"},oncoming_bus:{keywords:["vehicle","transportation"],char:'\u{1f68d}',fitzpatrick_scale:!1,category:"travel_and_places"},oncoming_automobile:{keywords:["car","vehicle","transportation"],char:'\u{1f698}',fitzpatrick_scale:!1,category:"travel_and_places"},oncoming_taxi:{keywords:["vehicle","cars","uber"],char:'\u{1f696}',fitzpatrick_scale:!1,category:"travel_and_places"},aerial_tramway:{keywords:["transportation","vehicle","ski"],char:'\u{1f6a1}',fitzpatrick_scale:!1,category:"travel_and_places"},mountain_cableway:{keywords:["transportation","vehicle","ski"],char:'\u{1f6a0}',fitzpatrick_scale:!1,category:"travel_and_places"},suspension_railway:{keywords:["vehicle","transportation"],char:'\u{1f69f}',fitzpatrick_scale:!1,category:"travel_and_places"},railway_car:{keywords:["transportation","vehicle"],char:'\u{1f683}',fitzpatrick_scale:!1,category:"travel_and_places"},train:{keywords:["transportation","vehicle","carriage","public","travel"],char:'\u{1f68b}',fitzpatrick_scale:!1,category:"travel_and_places"},monorail:{keywords:["transportation","vehicle"],char:'\u{1f69d}',fitzpatrick_scale:!1,category:"travel_and_places"},bullettrain_side:{keywords:["transportation","vehicle"],char:'\u{1f684}',fitzpatrick_scale:!1,category:"travel_and_places"},bullettrain_front:{keywords:["transportation","vehicle","speed","fast","public","travel"],char:'\u{1f685}',fitzpatrick_scale:!1,category:"travel_and_places"},light_rail:{keywords:["transportation","vehicle"],char:'\u{1f688}',fitzpatrick_scale:!1,category:"travel_and_places"},mountain_railway:{keywords:["transportation","vehicle"],char:'\u{1f69e}',fitzpatrick_scale:!1,category:"travel_and_places"},steam_locomotive:{keywords:["transportation","vehicle","train"],char:'\u{1f682}',fitzpatrick_scale:!1,category:"travel_and_places"},train2:{keywords:["transportation","vehicle"],char:'\u{1f686}',fitzpatrick_scale:!1,category:"travel_and_places"},metro:{keywords:["transportation","blue-square","mrt","underground","tube"],char:'\u{1f687}',fitzpatrick_scale:!1,category:"travel_and_places"},tram:{keywords:["transportation","vehicle"],char:'\u{1f68a}',fitzpatrick_scale:!1,category:"travel_and_places"},station:{keywords:["transportation","vehicle","public"],char:'\u{1f689}',fitzpatrick_scale:!1,category:"travel_and_places"},flying_saucer:{keywords:["transportation","vehicle","ufo"],char:'\u{1f6f8}',fitzpatrick_scale:!1,category:"travel_and_places"},helicopter:{keywords:["transportation","vehicle","fly"],char:'\u{1f681}',fitzpatrick_scale:!1,category:"travel_and_places"},small_airplane:{keywords:["flight","transportation","fly","vehicle"],char:'\u{1f6e9}',fitzpatrick_scale:!1,category:"travel_and_places"},airplane:{keywords:["vehicle","transportation","flight","fly"],char:'\u2708\ufe0f',fitzpatrick_scale:!1,category:"travel_and_places"},flight_departure:{keywords:["airport","flight","landing"],char:'\u{1f6eb}',fitzpatrick_scale:!1,category:"travel_and_places"},flight_arrival:{keywords:["airport","flight","boarding"],char:'\u{1f6ec}',fitzpatrick_scale:!1,category:"travel_and_places"},sailboat:{keywords:["ship","summer","transportation","water","sailing"],char:'\u26f5',fitzpatrick_scale:!1,category:"travel_and_places"},motor_boat:{keywords:["ship"],char:'\u{1f6e5}',fitzpatrick_scale:!1,category:"travel_and_places"},speedboat:{keywords:["ship","transportation","vehicle","summer"],char:'\u{1f6a4}',fitzpatrick_scale:!1,category:"travel_and_places"},ferry:{keywords:["boat","ship","yacht"],char:'\u26f4',fitzpatrick_scale:!1,category:"travel_and_places"},passenger_ship:{keywords:["yacht","cruise","ferry"],char:'\u{1f6f3}',fitzpatrick_scale:!1,category:"travel_and_places"},rocket:{keywords:["launch","ship","staffmode","NASA","outer space","outer_space","fly"],char:'\u{1f680}',fitzpatrick_scale:!1,category:"travel_and_places"},artificial_satellite:{keywords:["communication","gps","orbit","spaceflight","NASA","ISS"],char:'\u{1f6f0}',fitzpatrick_scale:!1,category:"travel_and_places"},seat:{keywords:["sit","airplane","transport","bus","flight","fly"],char:'\u{1f4ba}',fitzpatrick_scale:!1,category:"travel_and_places"},canoe:{keywords:["boat","paddle","water","ship"],char:'\u{1f6f6}',fitzpatrick_scale:!1,category:"travel_and_places"},anchor:{keywords:["ship","ferry","sea","boat"],char:'\u2693',fitzpatrick_scale:!1,category:"travel_and_places"},construction:{keywords:["wip","progress","caution","warning"],char:'\u{1f6a7}',fitzpatrick_scale:!1,category:"travel_and_places"},fuelpump:{keywords:["gas station","petroleum"],char:'\u26fd',fitzpatrick_scale:!1,category:"travel_and_places"},busstop:{keywords:["transportation","wait"],char:'\u{1f68f}',fitzpatrick_scale:!1,category:"travel_and_places"},vertical_traffic_light:{keywords:["transportation","driving"],char:'\u{1f6a6}',fitzpatrick_scale:!1,category:"travel_and_places"},traffic_light:{keywords:["transportation","signal"],char:'\u{1f6a5}',fitzpatrick_scale:!1,category:"travel_and_places"},checkered_flag:{keywords:["contest","finishline","race","gokart"],char:'\u{1f3c1}',fitzpatrick_scale:!1,category:"travel_and_places"},ship:{keywords:["transportation","titanic","deploy"],char:'\u{1f6a2}',fitzpatrick_scale:!1,category:"travel_and_places"},ferris_wheel:{keywords:["photo","carnival","londoneye"],char:'\u{1f3a1}',fitzpatrick_scale:!1,category:"travel_and_places"},roller_coaster:{keywords:["carnival","playground","photo","fun"],char:'\u{1f3a2}',fitzpatrick_scale:!1,category:"travel_and_places"},carousel_horse:{keywords:["photo","carnival"],char:'\u{1f3a0}',fitzpatrick_scale:!1,category:"travel_and_places"},building_construction:{keywords:["wip","working","progress"],char:'\u{1f3d7}',fitzpatrick_scale:!1,category:"travel_and_places"},foggy:{keywords:["photo","mountain"],char:'\u{1f301}',fitzpatrick_scale:!1,category:"travel_and_places"},tokyo_tower:{keywords:["photo","japanese"],char:'\u{1f5fc}',fitzpatrick_scale:!1,category:"travel_and_places"},factory:{keywords:["building","industry","pollution","smoke"],char:'\u{1f3ed}',fitzpatrick_scale:!1,category:"travel_and_places"},fountain:{keywords:["photo","summer","water","fresh"],char:'\u26f2',fitzpatrick_scale:!1,category:"travel_and_places"},rice_scene:{keywords:["photo","japan","asia","tsukimi"],char:'\u{1f391}',fitzpatrick_scale:!1,category:"travel_and_places"},mountain:{keywords:["photo","nature","environment"],char:'\u26f0',fitzpatrick_scale:!1,category:"travel_and_places"},mountain_snow:{keywords:["photo","nature","environment","winter","cold"],char:'\u{1f3d4}',fitzpatrick_scale:!1,category:"travel_and_places"},mount_fuji:{keywords:["photo","mountain","nature","japanese"],char:'\u{1f5fb}',fitzpatrick_scale:!1,category:"travel_and_places"},volcano:{keywords:["photo","nature","disaster"],char:'\u{1f30b}',fitzpatrick_scale:!1,category:"travel_and_places"},japan:{keywords:["nation","country","japanese","asia"],char:'\u{1f5fe}',fitzpatrick_scale:!1,category:"travel_and_places"},camping:{keywords:["photo","outdoors","tent"],char:'\u{1f3d5}',fitzpatrick_scale:!1,category:"travel_and_places"},tent:{keywords:["photo","camping","outdoors"],char:'\u26fa',fitzpatrick_scale:!1,category:"travel_and_places"},national_park:{keywords:["photo","environment","nature"],char:'\u{1f3de}',fitzpatrick_scale:!1,category:"travel_and_places"},motorway:{keywords:["road","cupertino","interstate","highway"],char:'\u{1f6e3}',fitzpatrick_scale:!1,category:"travel_and_places"},railway_track:{keywords:["train","transportation"],char:'\u{1f6e4}',fitzpatrick_scale:!1,category:"travel_and_places"},sunrise:{keywords:["morning","view","vacation","photo"],char:'\u{1f305}',fitzpatrick_scale:!1,category:"travel_and_places"},sunrise_over_mountains:{keywords:["view","vacation","photo"],char:'\u{1f304}',fitzpatrick_scale:!1,category:"travel_and_places"},desert:{keywords:["photo","warm","saharah"],char:'\u{1f3dc}',fitzpatrick_scale:!1,category:"travel_and_places"},beach_umbrella:{keywords:["weather","summer","sunny","sand","mojito"],char:'\u{1f3d6}',fitzpatrick_scale:!1,category:"travel_and_places"},desert_island:{keywords:["photo","tropical","mojito"],char:'\u{1f3dd}',fitzpatrick_scale:!1,category:"travel_and_places"},city_sunrise:{keywords:["photo","good morning","dawn"],char:'\u{1f307}',fitzpatrick_scale:!1,category:"travel_and_places"},city_sunset:{keywords:["photo","evening","sky","buildings"],char:'\u{1f306}',fitzpatrick_scale:!1,category:"travel_and_places"},cityscape:{keywords:["photo","night life","urban"],char:'\u{1f3d9}',fitzpatrick_scale:!1,category:"travel_and_places"},night_with_stars:{keywords:["evening","city","downtown"],char:'\u{1f303}',fitzpatrick_scale:!1,category:"travel_and_places"},bridge_at_night:{keywords:["photo","sanfrancisco"],char:'\u{1f309}',fitzpatrick_scale:!1,category:"travel_and_places"},milky_way:{keywords:["photo","space","stars"],char:'\u{1f30c}',fitzpatrick_scale:!1,category:"travel_and_places"},stars:{keywords:["night","photo"],char:'\u{1f320}',fitzpatrick_scale:!1,category:"travel_and_places"},sparkler:{keywords:["stars","night","shine"],char:'\u{1f387}',fitzpatrick_scale:!1,category:"travel_and_places"},fireworks:{keywords:["photo","festival","carnival","congratulations"],char:'\u{1f386}',fitzpatrick_scale:!1,category:"travel_and_places"},rainbow:{keywords:["nature","happy","unicorn_face","photo","sky","spring"],char:'\u{1f308}',fitzpatrick_scale:!1,category:"travel_and_places"},houses:{keywords:["buildings","photo"],char:'\u{1f3d8}',fitzpatrick_scale:!1,category:"travel_and_places"},european_castle:{keywords:["building","royalty","history"],char:'\u{1f3f0}',fitzpatrick_scale:!1,category:"travel_and_places"},japanese_castle:{keywords:["photo","building"],char:'\u{1f3ef}',fitzpatrick_scale:!1,category:"travel_and_places"},stadium:{keywords:["photo","place","sports","concert","venue"],char:'\u{1f3df}',fitzpatrick_scale:!1,category:"travel_and_places"},statue_of_liberty:{keywords:["american","newyork"],char:'\u{1f5fd}',fitzpatrick_scale:!1,category:"travel_and_places"},house:{keywords:["building","home"],char:'\u{1f3e0}',fitzpatrick_scale:!1,category:"travel_and_places"},house_with_garden:{keywords:["home","plant","nature"],char:'\u{1f3e1}',fitzpatrick_scale:!1,category:"travel_and_places"},derelict_house:{keywords:["abandon","evict","broken","building"],char:'\u{1f3da}',fitzpatrick_scale:!1,category:"travel_and_places"},office:{keywords:["building","bureau","work"],char:'\u{1f3e2}',fitzpatrick_scale:!1,category:"travel_and_places"},department_store:{keywords:["building","shopping","mall"],char:'\u{1f3ec}',fitzpatrick_scale:!1,category:"travel_and_places"},post_office:{keywords:["building","envelope","communication"],char:'\u{1f3e3}',fitzpatrick_scale:!1,category:"travel_and_places"},european_post_office:{keywords:["building","email"],char:'\u{1f3e4}',fitzpatrick_scale:!1,category:"travel_and_places"},hospital:{keywords:["building","health","surgery","doctor"],char:'\u{1f3e5}',fitzpatrick_scale:!1,category:"travel_and_places"},bank:{keywords:["building","money","sales","cash","business","enterprise"],char:'\u{1f3e6}',fitzpatrick_scale:!1,category:"travel_and_places"},hotel:{keywords:["building","accomodation","checkin"],char:'\u{1f3e8}',fitzpatrick_scale:!1,category:"travel_and_places"},convenience_store:{keywords:["building","shopping","groceries"],char:'\u{1f3ea}',fitzpatrick_scale:!1,category:"travel_and_places"},school:{keywords:["building","student","education","learn","teach"],char:'\u{1f3eb}',fitzpatrick_scale:!1,category:"travel_and_places"},love_hotel:{keywords:["like","affection","dating"],char:'\u{1f3e9}',fitzpatrick_scale:!1,category:"travel_and_places"},wedding:{keywords:["love","like","affection","couple","marriage","bride","groom"],char:'\u{1f492}',fitzpatrick_scale:!1,category:"travel_and_places"},classical_building:{keywords:["art","culture","history"],char:'\u{1f3db}',fitzpatrick_scale:!1,category:"travel_and_places"},church:{keywords:["building","religion","christ"],char:'\u26ea',fitzpatrick_scale:!1,category:"travel_and_places"},mosque:{keywords:["islam","worship","minaret"],char:'\u{1f54c}',fitzpatrick_scale:!1,category:"travel_and_places"},synagogue:{keywords:["judaism","worship","temple","jewish"],char:'\u{1f54d}',fitzpatrick_scale:!1,category:"travel_and_places"},kaaba:{keywords:["mecca","mosque","islam"],char:'\u{1f54b}',fitzpatrick_scale:!1,category:"travel_and_places"},shinto_shrine:{keywords:["temple","japan","kyoto"],char:'\u26e9',fitzpatrick_scale:!1,category:"travel_and_places"},watch:{keywords:["time","accessories"],char:'\u231a',fitzpatrick_scale:!1,category:"objects"},iphone:{keywords:["technology","apple","gadgets","dial"],char:'\u{1f4f1}',fitzpatrick_scale:!1,category:"objects"},calling:{keywords:["iphone","incoming"],char:'\u{1f4f2}',fitzpatrick_scale:!1,category:"objects"},computer:{keywords:["technology","laptop","screen","display","monitor"],char:'\u{1f4bb}',fitzpatrick_scale:!1,category:"objects"},keyboard:{keywords:["technology","computer","type","input","text"],char:'\u2328',fitzpatrick_scale:!1,category:"objects"},desktop_computer:{keywords:["technology","computing","screen"],char:'\u{1f5a5}',fitzpatrick_scale:!1,category:"objects"},printer:{keywords:["paper","ink"],char:'\u{1f5a8}',fitzpatrick_scale:!1,category:"objects"},computer_mouse:{keywords:["click"],char:'\u{1f5b1}',fitzpatrick_scale:!1,category:"objects"},trackball:{keywords:["technology","trackpad"],char:'\u{1f5b2}',fitzpatrick_scale:!1,category:"objects"},joystick:{keywords:["game","play"],char:'\u{1f579}',fitzpatrick_scale:!1,category:"objects"},clamp:{keywords:["tool"],char:'\u{1f5dc}',fitzpatrick_scale:!1,category:"objects"},minidisc:{keywords:["technology","record","data","disk","90s"],char:'\u{1f4bd}',fitzpatrick_scale:!1,category:"objects"},floppy_disk:{keywords:["oldschool","technology","save","90s","80s"],char:'\u{1f4be}',fitzpatrick_scale:!1,category:"objects"},cd:{keywords:["technology","dvd","disk","disc","90s"],char:'\u{1f4bf}',fitzpatrick_scale:!1,category:"objects"},dvd:{keywords:["cd","disk","disc"],char:'\u{1f4c0}',fitzpatrick_scale:!1,category:"objects"},vhs:{keywords:["record","video","oldschool","90s","80s"],char:'\u{1f4fc}',fitzpatrick_scale:!1,category:"objects"},camera:{keywords:["gadgets","photography"],char:'\u{1f4f7}',fitzpatrick_scale:!1,category:"objects"},camera_flash:{keywords:["photography","gadgets"],char:'\u{1f4f8}',fitzpatrick_scale:!1,category:"objects"},video_camera:{keywords:["film","record"],char:'\u{1f4f9}',fitzpatrick_scale:!1,category:"objects"},movie_camera:{keywords:["film","record"],char:'\u{1f3a5}',fitzpatrick_scale:!1,category:"objects"},film_projector:{keywords:["video","tape","record","movie"],char:'\u{1f4fd}',fitzpatrick_scale:!1,category:"objects"},film_strip:{keywords:["movie"],char:'\u{1f39e}',fitzpatrick_scale:!1,category:"objects"},telephone_receiver:{keywords:["technology","communication","dial"],char:'\u{1f4de}',fitzpatrick_scale:!1,category:"objects"},phone:{keywords:["technology","communication","dial","telephone"],char:'\u260e\ufe0f',fitzpatrick_scale:!1,category:"objects"},pager:{keywords:["bbcall","oldschool","90s"],char:'\u{1f4df}',fitzpatrick_scale:!1,category:"objects"},fax:{keywords:["communication","technology"],char:'\u{1f4e0}',fitzpatrick_scale:!1,category:"objects"},tv:{keywords:["technology","program","oldschool","show","television"],char:'\u{1f4fa}',fitzpatrick_scale:!1,category:"objects"},radio:{keywords:["communication","music","podcast","program"],char:'\u{1f4fb}',fitzpatrick_scale:!1,category:"objects"},studio_microphone:{keywords:["sing","recording","artist","talkshow"],char:'\u{1f399}',fitzpatrick_scale:!1,category:"objects"},level_slider:{keywords:["scale"],char:'\u{1f39a}',fitzpatrick_scale:!1,category:"objects"},control_knobs:{keywords:["dial"],char:'\u{1f39b}',fitzpatrick_scale:!1,category:"objects"},compass:{keywords:["magnetic","navigation","orienteering"],char:'\u{1f9ed}',fitzpatrick_scale:!1,category:"objects"},stopwatch:{keywords:["time","deadline"],char:'\u23f1',fitzpatrick_scale:!1,category:"objects"},timer_clock:{keywords:["alarm"],char:'\u23f2',fitzpatrick_scale:!1,category:"objects"},alarm_clock:{keywords:["time","wake"],char:'\u23f0',fitzpatrick_scale:!1,category:"objects"},mantelpiece_clock:{keywords:["time"],char:'\u{1f570}',fitzpatrick_scale:!1,category:"objects"},hourglass_flowing_sand:{keywords:["oldschool","time","countdown"],char:'\u23f3',fitzpatrick_scale:!1,category:"objects"},hourglass:{keywords:["time","clock","oldschool","limit","exam","quiz","test"],char:'\u231b',fitzpatrick_scale:!1,category:"objects"},satellite:{keywords:["communication","future","radio","space"],char:'\u{1f4e1}',fitzpatrick_scale:!1,category:"objects"},battery:{keywords:["power","energy","sustain"],char:'\u{1f50b}',fitzpatrick_scale:!1,category:"objects"},electric_plug:{keywords:["charger","power"],char:'\u{1f50c}',fitzpatrick_scale:!1,category:"objects"},bulb:{keywords:["light","electricity","idea"],char:'\u{1f4a1}',fitzpatrick_scale:!1,category:"objects"},flashlight:{keywords:["dark","camping","sight","night"],char:'\u{1f526}',fitzpatrick_scale:!1,category:"objects"},candle:{keywords:["fire","wax"],char:'\u{1f56f}',fitzpatrick_scale:!1,category:"objects"},fire_extinguisher:{keywords:["quench"],char:'\u{1f9ef}',fitzpatrick_scale:!1,category:"objects"},wastebasket:{keywords:["bin","trash","rubbish","garbage","toss"],char:'\u{1f5d1}',fitzpatrick_scale:!1,category:"objects"},oil_drum:{keywords:["barrell"],char:'\u{1f6e2}',fitzpatrick_scale:!1,category:"objects"},money_with_wings:{keywords:["dollar","bills","payment","sale"],char:'\u{1f4b8}',fitzpatrick_scale:!1,category:"objects"},dollar:{keywords:["money","sales","bill","currency"],char:'\u{1f4b5}',fitzpatrick_scale:!1,category:"objects"},yen:{keywords:["money","sales","japanese","dollar","currency"],char:'\u{1f4b4}',fitzpatrick_scale:!1,category:"objects"},euro:{keywords:["money","sales","dollar","currency"],char:'\u{1f4b6}',fitzpatrick_scale:!1,category:"objects"},pound:{keywords:["british","sterling","money","sales","bills","uk","england","currency"],char:'\u{1f4b7}',fitzpatrick_scale:!1,category:"objects"},moneybag:{keywords:["dollar","payment","coins","sale"],char:'\u{1f4b0}',fitzpatrick_scale:!1,category:"objects"},credit_card:{keywords:["money","sales","dollar","bill","payment","shopping"],char:'\u{1f4b3}',fitzpatrick_scale:!1,category:"objects"},gem:{keywords:["blue","ruby","diamond","jewelry"],char:'\u{1f48e}',fitzpatrick_scale:!1,category:"objects"},balance_scale:{keywords:["law","fairness","weight"],char:'\u2696',fitzpatrick_scale:!1,category:"objects"},toolbox:{keywords:["tools","diy","fix","maintainer","mechanic"],char:'\u{1f9f0}',fitzpatrick_scale:!1,category:"objects"},wrench:{keywords:["tools","diy","ikea","fix","maintainer"],char:'\u{1f527}',fitzpatrick_scale:!1,category:"objects"},hammer:{keywords:["tools","build","create"],char:'\u{1f528}',fitzpatrick_scale:!1,category:"objects"},hammer_and_pick:{keywords:["tools","build","create"],char:'\u2692',fitzpatrick_scale:!1,category:"objects"},hammer_and_wrench:{keywords:["tools","build","create"],char:'\u{1f6e0}',fitzpatrick_scale:!1,category:"objects"},pick:{keywords:["tools","dig"],char:'\u26cf',fitzpatrick_scale:!1,category:"objects"},nut_and_bolt:{keywords:["handy","tools","fix"],char:'\u{1f529}',fitzpatrick_scale:!1,category:"objects"},gear:{keywords:["cog"],char:'\u2699',fitzpatrick_scale:!1,category:"objects"},brick:{keywords:["bricks"],char:'\u{1f9f1}',fitzpatrick_scale:!1,category:"objects"},chains:{keywords:["lock","arrest"],char:'\u26d3',fitzpatrick_scale:!1,category:"objects"},magnet:{keywords:["attraction","magnetic"],char:'\u{1f9f2}',fitzpatrick_scale:!1,category:"objects"},gun:{keywords:["violence","weapon","pistol","revolver"],char:'\u{1f52b}',fitzpatrick_scale:!1,category:"objects"},bomb:{keywords:["boom","explode","explosion","terrorism"],char:'\u{1f4a3}',fitzpatrick_scale:!1,category:"objects"},firecracker:{keywords:["dynamite","boom","explode","explosion","explosive"],char:'\u{1f9e8}',fitzpatrick_scale:!1,category:"objects"},hocho:{keywords:["knife","blade","cutlery","kitchen","weapon"],char:'\u{1f52a}',fitzpatrick_scale:!1,category:"objects"},dagger:{keywords:["weapon"],char:'\u{1f5e1}',fitzpatrick_scale:!1,category:"objects"},crossed_swords:{keywords:["weapon"],char:'\u2694',fitzpatrick_scale:!1,category:"objects"},shield:{keywords:["protection","security"],char:'\u{1f6e1}',fitzpatrick_scale:!1,category:"objects"},smoking:{keywords:["kills","tobacco","cigarette","joint","smoke"],char:'\u{1f6ac}',fitzpatrick_scale:!1,category:"objects"},skull_and_crossbones:{keywords:["poison","danger","deadly","scary","death","pirate","evil"],char:'\u2620',fitzpatrick_scale:!1,category:"objects"},coffin:{keywords:["vampire","dead","die","death","rip","graveyard","cemetery","casket","funeral","box"],char:'\u26b0',fitzpatrick_scale:!1,category:"objects"},funeral_urn:{keywords:["dead","die","death","rip","ashes"],char:'\u26b1',fitzpatrick_scale:!1,category:"objects"},amphora:{keywords:["vase","jar"],char:'\u{1f3fa}',fitzpatrick_scale:!1,category:"objects"},crystal_ball:{keywords:["disco","party","magic","circus","fortune_teller"],char:'\u{1f52e}',fitzpatrick_scale:!1,category:"objects"},prayer_beads:{keywords:["dhikr","religious"],char:'\u{1f4ff}',fitzpatrick_scale:!1,category:"objects"},nazar_amulet:{keywords:["bead","charm"],char:'\u{1f9ff}',fitzpatrick_scale:!1,category:"objects"},barber:{keywords:["hair","salon","style"],char:'\u{1f488}',fitzpatrick_scale:!1,category:"objects"},alembic:{keywords:["distilling","science","experiment","chemistry"],char:'\u2697',fitzpatrick_scale:!1,category:"objects"},telescope:{keywords:["stars","space","zoom","science","astronomy"],char:'\u{1f52d}',fitzpatrick_scale:!1,category:"objects"},microscope:{keywords:["laboratory","experiment","zoomin","science","study"],char:'\u{1f52c}',fitzpatrick_scale:!1,category:"objects"},hole:{keywords:["embarrassing"],char:'\u{1f573}',fitzpatrick_scale:!1,category:"objects"},pill:{keywords:["health","medicine","doctor","pharmacy","drug"],char:'\u{1f48a}',fitzpatrick_scale:!1,category:"objects"},syringe:{keywords:["health","hospital","drugs","blood","medicine","needle","doctor","nurse"],char:'\u{1f489}',fitzpatrick_scale:!1,category:"objects"},dna:{keywords:["biologist","genetics","life"],char:'\u{1f9ec}',fitzpatrick_scale:!1,category:"objects"},microbe:{keywords:["amoeba","bacteria","germs"],char:'\u{1f9a0}',fitzpatrick_scale:!1,category:"objects"},petri_dish:{keywords:["bacteria","biology","culture","lab"],char:'\u{1f9eb}',fitzpatrick_scale:!1,category:"objects"},test_tube:{keywords:["chemistry","experiment","lab","science"],char:'\u{1f9ea}',fitzpatrick_scale:!1,category:"objects"},thermometer:{keywords:["weather","temperature","hot","cold"],char:'\u{1f321}',fitzpatrick_scale:!1,category:"objects"},broom:{keywords:["cleaning","sweeping","witch"],char:'\u{1f9f9}',fitzpatrick_scale:!1,category:"objects"},basket:{keywords:["laundry"],char:'\u{1f9fa}',fitzpatrick_scale:!1,category:"objects"},toilet_paper:{keywords:["roll"],char:'\u{1f9fb}',fitzpatrick_scale:!1,category:"objects"},label:{keywords:["sale","tag"],char:'\u{1f3f7}',fitzpatrick_scale:!1,category:"objects"},bookmark:{keywords:["favorite","label","save"],char:'\u{1f516}',fitzpatrick_scale:!1,category:"objects"},toilet:{keywords:["restroom","wc","washroom","bathroom","potty"],char:'\u{1f6bd}',fitzpatrick_scale:!1,category:"objects"},shower:{keywords:["clean","water","bathroom"],char:'\u{1f6bf}',fitzpatrick_scale:!1,category:"objects"},bathtub:{keywords:["clean","shower","bathroom"],char:'\u{1f6c1}',fitzpatrick_scale:!1,category:"objects"},soap:{keywords:["bar","bathing","cleaning","lather"],char:'\u{1f9fc}',fitzpatrick_scale:!1,category:"objects"},sponge:{keywords:["absorbing","cleaning","porous"],char:'\u{1f9fd}',fitzpatrick_scale:!1,category:"objects"},lotion_bottle:{keywords:["moisturizer","sunscreen"],char:'\u{1f9f4}',fitzpatrick_scale:!1,category:"objects"},key:{keywords:["lock","door","password"],char:'\u{1f511}',fitzpatrick_scale:!1,category:"objects"},old_key:{keywords:["lock","door","password"],char:'\u{1f5dd}',fitzpatrick_scale:!1,category:"objects"},couch_and_lamp:{keywords:["read","chill"],char:'\u{1f6cb}',fitzpatrick_scale:!1,category:"objects"},sleeping_bed:{keywords:["bed","rest"],char:'\u{1f6cc}',fitzpatrick_scale:!0,category:"objects"},bed:{keywords:["sleep","rest"],char:'\u{1f6cf}',fitzpatrick_scale:!1,category:"objects"},door:{keywords:["house","entry","exit"],char:'\u{1f6aa}',fitzpatrick_scale:!1,category:"objects"},bellhop_bell:{keywords:["service"],char:'\u{1f6ce}',fitzpatrick_scale:!1,category:"objects"},teddy_bear:{keywords:["plush","stuffed"],char:'\u{1f9f8}',fitzpatrick_scale:!1,category:"objects"},framed_picture:{keywords:["photography"],char:'\u{1f5bc}',fitzpatrick_scale:!1,category:"objects"},world_map:{keywords:["location","direction"],char:'\u{1f5fa}',fitzpatrick_scale:!1,category:"objects"},parasol_on_ground:{keywords:["weather","summer"],char:'\u26f1',fitzpatrick_scale:!1,category:"objects"},moyai:{keywords:["rock","easter island","moai"],char:'\u{1f5ff}',fitzpatrick_scale:!1,category:"objects"},shopping:{keywords:["mall","buy","purchase"],char:'\u{1f6cd}',fitzpatrick_scale:!1,category:"objects"},shopping_cart:{keywords:["trolley"],char:'\u{1f6d2}',fitzpatrick_scale:!1,category:"objects"},balloon:{keywords:["party","celebration","birthday","circus"],char:'\u{1f388}',fitzpatrick_scale:!1,category:"objects"},flags:{keywords:["fish","japanese","koinobori","carp","banner"],char:'\u{1f38f}',fitzpatrick_scale:!1,category:"objects"},ribbon:{keywords:["decoration","pink","girl","bowtie"],char:'\u{1f380}',fitzpatrick_scale:!1,category:"objects"},gift:{keywords:["present","birthday","christmas","xmas"],char:'\u{1f381}',fitzpatrick_scale:!1,category:"objects"},confetti_ball:{keywords:["festival","party","birthday","circus"],char:'\u{1f38a}',fitzpatrick_scale:!1,category:"objects"},tada:{keywords:["party","congratulations","birthday","magic","circus","celebration"],char:'\u{1f389}',fitzpatrick_scale:!1,category:"objects"},dolls:{keywords:["japanese","toy","kimono"],char:'\u{1f38e}',fitzpatrick_scale:!1,category:"objects"},wind_chime:{keywords:["nature","ding","spring","bell"],char:'\u{1f390}',fitzpatrick_scale:!1,category:"objects"},crossed_flags:{keywords:["japanese","nation","country","border"],char:'\u{1f38c}',fitzpatrick_scale:!1,category:"objects"},izakaya_lantern:{keywords:["light","paper","halloween","spooky"],char:'\u{1f3ee}',fitzpatrick_scale:!1,category:"objects"},red_envelope:{keywords:["gift"],char:'\u{1f9e7}',fitzpatrick_scale:!1,category:"objects"},email:{keywords:["letter","postal","inbox","communication"],char:'\u2709\ufe0f',fitzpatrick_scale:!1,category:"objects"},envelope_with_arrow:{keywords:["email","communication"],char:'\u{1f4e9}',fitzpatrick_scale:!1,category:"objects"},incoming_envelope:{keywords:["email","inbox"],char:'\u{1f4e8}',fitzpatrick_scale:!1,category:"objects"},"e-mail":{keywords:["communication","inbox"],char:'\u{1f4e7}',fitzpatrick_scale:!1,category:"objects"},love_letter:{keywords:["email","like","affection","envelope","valentines"],char:'\u{1f48c}',fitzpatrick_scale:!1,category:"objects"},postbox:{keywords:["email","letter","envelope"],char:'\u{1f4ee}',fitzpatrick_scale:!1,category:"objects"},mailbox_closed:{keywords:["email","communication","inbox"],char:'\u{1f4ea}',fitzpatrick_scale:!1,category:"objects"},mailbox:{keywords:["email","inbox","communication"],char:'\u{1f4eb}',fitzpatrick_scale:!1,category:"objects"},mailbox_with_mail:{keywords:["email","inbox","communication"],char:'\u{1f4ec}',fitzpatrick_scale:!1,category:"objects"},mailbox_with_no_mail:{keywords:["email","inbox"],char:'\u{1f4ed}',fitzpatrick_scale:!1,category:"objects"},package:{keywords:["mail","gift","cardboard","box","moving"],char:'\u{1f4e6}',fitzpatrick_scale:!1,category:"objects"},postal_horn:{keywords:["instrument","music"],char:'\u{1f4ef}',fitzpatrick_scale:!1,category:"objects"},inbox_tray:{keywords:["email","documents"],char:'\u{1f4e5}',fitzpatrick_scale:!1,category:"objects"},outbox_tray:{keywords:["inbox","email"],char:'\u{1f4e4}',fitzpatrick_scale:!1,category:"objects"},scroll:{keywords:["documents","ancient","history","paper"],char:'\u{1f4dc}',fitzpatrick_scale:!1,category:"objects"},page_with_curl:{keywords:["documents","office","paper"],char:'\u{1f4c3}',fitzpatrick_scale:!1,category:"objects"},bookmark_tabs:{keywords:["favorite","save","order","tidy"],char:'\u{1f4d1}',fitzpatrick_scale:!1,category:"objects"},receipt:{keywords:["accounting","expenses"],char:'\u{1f9fe}',fitzpatrick_scale:!1,category:"objects"},bar_chart:{keywords:["graph","presentation","stats"],char:'\u{1f4ca}',fitzpatrick_scale:!1,category:"objects"},chart_with_upwards_trend:{keywords:["graph","presentation","stats","recovery","business","economics","money","sales","good","success"],char:'\u{1f4c8}',fitzpatrick_scale:!1,category:"objects"},chart_with_downwards_trend:{keywords:["graph","presentation","stats","recession","business","economics","money","sales","bad","failure"],char:'\u{1f4c9}',fitzpatrick_scale:!1,category:"objects"},page_facing_up:{keywords:["documents","office","paper","information"],char:'\u{1f4c4}',fitzpatrick_scale:!1,category:"objects"},date:{keywords:["calendar","schedule"],char:'\u{1f4c5}',fitzpatrick_scale:!1,category:"objects"},calendar:{keywords:["schedule","date","planning"],char:'\u{1f4c6}',fitzpatrick_scale:!1,category:"objects"},spiral_calendar:{keywords:["date","schedule","planning"],char:'\u{1f5d3}',fitzpatrick_scale:!1,category:"objects"},card_index:{keywords:["business","stationery"],char:'\u{1f4c7}',fitzpatrick_scale:!1,category:"objects"},card_file_box:{keywords:["business","stationery"],char:'\u{1f5c3}',fitzpatrick_scale:!1,category:"objects"},ballot_box:{keywords:["election","vote"],char:'\u{1f5f3}',fitzpatrick_scale:!1,category:"objects"},file_cabinet:{keywords:["filing","organizing"],char:'\u{1f5c4}',fitzpatrick_scale:!1,category:"objects"},clipboard:{keywords:["stationery","documents"],char:'\u{1f4cb}',fitzpatrick_scale:!1,category:"objects"},spiral_notepad:{keywords:["memo","stationery"],char:'\u{1f5d2}',fitzpatrick_scale:!1,category:"objects"},file_folder:{keywords:["documents","business","office"],char:'\u{1f4c1}',fitzpatrick_scale:!1,category:"objects"},open_file_folder:{keywords:["documents","load"],char:'\u{1f4c2}',fitzpatrick_scale:!1,category:"objects"},card_index_dividers:{keywords:["organizing","business","stationery"],char:'\u{1f5c2}',fitzpatrick_scale:!1,category:"objects"},newspaper_roll:{keywords:["press","headline"],char:'\u{1f5de}',fitzpatrick_scale:!1,category:"objects"},newspaper:{keywords:["press","headline"],char:'\u{1f4f0}',fitzpatrick_scale:!1,category:"objects"},notebook:{keywords:["stationery","record","notes","paper","study"],char:'\u{1f4d3}',fitzpatrick_scale:!1,category:"objects"},closed_book:{keywords:["read","library","knowledge","textbook","learn"],char:'\u{1f4d5}',fitzpatrick_scale:!1,category:"objects"},green_book:{keywords:["read","library","knowledge","study"],char:'\u{1f4d7}',fitzpatrick_scale:!1,category:"objects"},blue_book:{keywords:["read","library","knowledge","learn","study"],char:'\u{1f4d8}',fitzpatrick_scale:!1,category:"objects"},orange_book:{keywords:["read","library","knowledge","textbook","study"],char:'\u{1f4d9}',fitzpatrick_scale:!1,category:"objects"},notebook_with_decorative_cover:{keywords:["classroom","notes","record","paper","study"],char:'\u{1f4d4}',fitzpatrick_scale:!1,category:"objects"},ledger:{keywords:["notes","paper"],char:'\u{1f4d2}',fitzpatrick_scale:!1,category:"objects"},books:{keywords:["literature","library","study"],char:'\u{1f4da}',fitzpatrick_scale:!1,category:"objects"},open_book:{keywords:["book","read","library","knowledge","literature","learn","study"],char:'\u{1f4d6}',fitzpatrick_scale:!1,category:"objects"},safety_pin:{keywords:["diaper"],char:'\u{1f9f7}',fitzpatrick_scale:!1,category:"objects"},link:{keywords:["rings","url"],char:'\u{1f517}',fitzpatrick_scale:!1,category:"objects"},paperclip:{keywords:["documents","stationery"],char:'\u{1f4ce}',fitzpatrick_scale:!1,category:"objects"},paperclips:{keywords:["documents","stationery"],char:'\u{1f587}',fitzpatrick_scale:!1,category:"objects"},scissors:{keywords:["stationery","cut"],char:'\u2702\ufe0f',fitzpatrick_scale:!1,category:"objects"},triangular_ruler:{keywords:["stationery","math","architect","sketch"],char:'\u{1f4d0}',fitzpatrick_scale:!1,category:"objects"},straight_ruler:{keywords:["stationery","calculate","length","math","school","drawing","architect","sketch"],char:'\u{1f4cf}',fitzpatrick_scale:!1,category:"objects"},abacus:{keywords:["calculation"],char:'\u{1f9ee}',fitzpatrick_scale:!1,category:"objects"},pushpin:{keywords:["stationery","mark","here"],char:'\u{1f4cc}',fitzpatrick_scale:!1,category:"objects"},round_pushpin:{keywords:["stationery","location","map","here"],char:'\u{1f4cd}',fitzpatrick_scale:!1,category:"objects"},triangular_flag_on_post:{keywords:["mark","milestone","place"],char:'\u{1f6a9}',fitzpatrick_scale:!1,category:"objects"},white_flag:{keywords:["losing","loser","lost","surrender","give up","fail"],char:'\u{1f3f3}',fitzpatrick_scale:!1,category:"objects"},black_flag:{keywords:["pirate"],char:'\u{1f3f4}',fitzpatrick_scale:!1,category:"objects"},rainbow_flag:{keywords:["flag","rainbow","pride","gay","lgbt","glbt","queer","homosexual","lesbian","bisexual","transgender"],char:'\u{1f3f3}\ufe0f\u200d\u{1f308}',fitzpatrick_scale:!1,category:"objects"},closed_lock_with_key:{keywords:["security","privacy"],char:'\u{1f510}',fitzpatrick_scale:!1,category:"objects"},lock:{keywords:["security","password","padlock"],char:'\u{1f512}',fitzpatrick_scale:!1,category:"objects"},unlock:{keywords:["privacy","security"],char:'\u{1f513}',fitzpatrick_scale:!1,category:"objects"},lock_with_ink_pen:{keywords:["security","secret"],char:'\u{1f50f}',fitzpatrick_scale:!1,category:"objects"},pen:{keywords:["stationery","writing","write"],char:'\u{1f58a}',fitzpatrick_scale:!1,category:"objects"},fountain_pen:{keywords:["stationery","writing","write"],char:'\u{1f58b}',fitzpatrick_scale:!1,category:"objects"},black_nib:{keywords:["pen","stationery","writing","write"],char:'\u2712\ufe0f',fitzpatrick_scale:!1,category:"objects"},memo:{keywords:["write","documents","stationery","pencil","paper","writing","legal","exam","quiz","test","study","compose"],char:'\u{1f4dd}',fitzpatrick_scale:!1,category:"objects"},pencil2:{keywords:["stationery","write","paper","writing","school","study"],char:'\u270f\ufe0f',fitzpatrick_scale:!1,category:"objects"},crayon:{keywords:["drawing","creativity"],char:'\u{1f58d}',fitzpatrick_scale:!1,category:"objects"},paintbrush:{keywords:["drawing","creativity","art"],char:'\u{1f58c}',fitzpatrick_scale:!1,category:"objects"},mag:{keywords:["search","zoom","find","detective"],char:'\u{1f50d}',fitzpatrick_scale:!1,category:"objects"},mag_right:{keywords:["search","zoom","find","detective"],char:'\u{1f50e}',fitzpatrick_scale:!1,category:"objects"},heart:{keywords:["love","like","valentines"],char:'\u2764\ufe0f',fitzpatrick_scale:!1,category:"symbols"},orange_heart:{keywords:["love","like","affection","valentines"],char:'\u{1f9e1}',fitzpatrick_scale:!1,category:"symbols"},yellow_heart:{keywords:["love","like","affection","valentines"],char:'\u{1f49b}',fitzpatrick_scale:!1,category:"symbols"},green_heart:{keywords:["love","like","affection","valentines"],char:'\u{1f49a}',fitzpatrick_scale:!1,category:"symbols"},blue_heart:{keywords:["love","like","affection","valentines"],char:'\u{1f499}',fitzpatrick_scale:!1,category:"symbols"},purple_heart:{keywords:["love","like","affection","valentines"],char:'\u{1f49c}',fitzpatrick_scale:!1,category:"symbols"},black_heart:{keywords:["evil"],char:'\u{1f5a4}',fitzpatrick_scale:!1,category:"symbols"},broken_heart:{keywords:["sad","sorry","break","heart","heartbreak"],char:'\u{1f494}',fitzpatrick_scale:!1,category:"symbols"},heavy_heart_exclamation:{keywords:["decoration","love"],char:'\u2763',fitzpatrick_scale:!1,category:"symbols"},two_hearts:{keywords:["love","like","affection","valentines","heart"],char:'\u{1f495}',fitzpatrick_scale:!1,category:"symbols"},revolving_hearts:{keywords:["love","like","affection","valentines"],char:'\u{1f49e}',fitzpatrick_scale:!1,category:"symbols"},heartbeat:{keywords:["love","like","affection","valentines","pink","heart"],char:'\u{1f493}',fitzpatrick_scale:!1,category:"symbols"},heartpulse:{keywords:["like","love","affection","valentines","pink"],char:'\u{1f497}',fitzpatrick_scale:!1,category:"symbols"},sparkling_heart:{keywords:["love","like","affection","valentines"],char:'\u{1f496}',fitzpatrick_scale:!1,category:"symbols"},cupid:{keywords:["love","like","heart","affection","valentines"],char:'\u{1f498}',fitzpatrick_scale:!1,category:"symbols"},gift_heart:{keywords:["love","valentines"],char:'\u{1f49d}',fitzpatrick_scale:!1,category:"symbols"},heart_decoration:{keywords:["purple-square","love","like"],char:'\u{1f49f}',fitzpatrick_scale:!1,category:"symbols"},peace_symbol:{keywords:["hippie"],char:'\u262e',fitzpatrick_scale:!1,category:"symbols"},latin_cross:{keywords:["christianity"],char:'\u271d',fitzpatrick_scale:!1,category:"symbols"},star_and_crescent:{keywords:["islam"],char:'\u262a',fitzpatrick_scale:!1,category:"symbols"},om:{keywords:["hinduism","buddhism","sikhism","jainism"],char:'\u{1f549}',fitzpatrick_scale:!1,category:"symbols"},wheel_of_dharma:{keywords:["hinduism","buddhism","sikhism","jainism"],char:'\u2638',fitzpatrick_scale:!1,category:"symbols"},star_of_david:{keywords:["judaism"],char:'\u2721',fitzpatrick_scale:!1,category:"symbols"},six_pointed_star:{keywords:["purple-square","religion","jewish","hexagram"],char:'\u{1f52f}',fitzpatrick_scale:!1,category:"symbols"},menorah:{keywords:["hanukkah","candles","jewish"],char:'\u{1f54e}',fitzpatrick_scale:!1,category:"symbols"},yin_yang:{keywords:["balance"],char:'\u262f',fitzpatrick_scale:!1,category:"symbols"},orthodox_cross:{keywords:["suppedaneum","religion"],char:'\u2626',fitzpatrick_scale:!1,category:"symbols"},place_of_worship:{keywords:["religion","church","temple","prayer"],char:'\u{1f6d0}',fitzpatrick_scale:!1,category:"symbols"},ophiuchus:{keywords:["sign","purple-square","constellation","astrology"],char:'\u26ce',fitzpatrick_scale:!1,category:"symbols"},aries:{keywords:["sign","purple-square","zodiac","astrology"],char:'\u2648',fitzpatrick_scale:!1,category:"symbols"},taurus:{keywords:["purple-square","sign","zodiac","astrology"],char:'\u2649',fitzpatrick_scale:!1,category:"symbols"},gemini:{keywords:["sign","zodiac","purple-square","astrology"],char:'\u264a',fitzpatrick_scale:!1,category:"symbols"},cancer:{keywords:["sign","zodiac","purple-square","astrology"],char:'\u264b',fitzpatrick_scale:!1,category:"symbols"},leo:{keywords:["sign","purple-square","zodiac","astrology"],char:'\u264c',fitzpatrick_scale:!1,category:"symbols"},virgo:{keywords:["sign","zodiac","purple-square","astrology"],char:'\u264d',fitzpatrick_scale:!1,category:"symbols"},libra:{keywords:["sign","purple-square","zodiac","astrology"],char:'\u264e',fitzpatrick_scale:!1,category:"symbols"},scorpius:{keywords:["sign","zodiac","purple-square","astrology","scorpio"],char:'\u264f',fitzpatrick_scale:!1,category:"symbols"},sagittarius:{keywords:["sign","zodiac","purple-square","astrology"],char:'\u2650',fitzpatrick_scale:!1,category:"symbols"},capricorn:{keywords:["sign","zodiac","purple-square","astrology"],char:'\u2651',fitzpatrick_scale:!1,category:"symbols"},aquarius:{keywords:["sign","purple-square","zodiac","astrology"],char:'\u2652',fitzpatrick_scale:!1,category:"symbols"},pisces:{keywords:["purple-square","sign","zodiac","astrology"],char:'\u2653',fitzpatrick_scale:!1,category:"symbols"},id:{keywords:["purple-square","words"],char:'\u{1f194}',fitzpatrick_scale:!1,category:"symbols"},atom_symbol:{keywords:["science","physics","chemistry"],char:'\u269b',fitzpatrick_scale:!1,category:"symbols"},u7a7a:{keywords:["kanji","japanese","chinese","empty","sky","blue-square"],char:'\u{1f233}',fitzpatrick_scale:!1,category:"symbols"},u5272:{keywords:["cut","divide","chinese","kanji","pink-square"],char:'\u{1f239}',fitzpatrick_scale:!1,category:"symbols"},radioactive:{keywords:["nuclear","danger"],char:'\u2622',fitzpatrick_scale:!1,category:"symbols"},biohazard:{keywords:["danger"],char:'\u2623',fitzpatrick_scale:!1,category:"symbols"},mobile_phone_off:{keywords:["mute","orange-square","silence","quiet"],char:'\u{1f4f4}',fitzpatrick_scale:!1,category:"symbols"},vibration_mode:{keywords:["orange-square","phone"],char:'\u{1f4f3}',fitzpatrick_scale:!1,category:"symbols"},u6709:{keywords:["orange-square","chinese","have","kanji"],char:'\u{1f236}',fitzpatrick_scale:!1,category:"symbols"},u7121:{keywords:["nothing","chinese","kanji","japanese","orange-square"],char:'\u{1f21a}',fitzpatrick_scale:!1,category:"symbols"},u7533:{keywords:["chinese","japanese","kanji","orange-square"],char:'\u{1f238}',fitzpatrick_scale:!1,category:"symbols"},u55b6:{keywords:["japanese","opening hours","orange-square"],char:'\u{1f23a}',fitzpatrick_scale:!1,category:"symbols"},u6708:{keywords:["chinese","month","moon","japanese","orange-square","kanji"],char:'\u{1f237}\ufe0f',fitzpatrick_scale:!1,category:"symbols"},eight_pointed_black_star:{keywords:["orange-square","shape","polygon"],char:'\u2734\ufe0f',fitzpatrick_scale:!1,category:"symbols"},vs:{keywords:["words","orange-square"],char:'\u{1f19a}',fitzpatrick_scale:!1,category:"symbols"},accept:{keywords:["ok","good","chinese","kanji","agree","yes","orange-circle"],char:'\u{1f251}',fitzpatrick_scale:!1,category:"symbols"},white_flower:{keywords:["japanese","spring"],char:'\u{1f4ae}',fitzpatrick_scale:!1,category:"symbols"},ideograph_advantage:{keywords:["chinese","kanji","obtain","get","circle"],char:'\u{1f250}',fitzpatrick_scale:!1,category:"symbols"},secret:{keywords:["privacy","chinese","sshh","kanji","red-circle"],char:'\u3299\ufe0f',fitzpatrick_scale:!1,category:"symbols"},congratulations:{keywords:["chinese","kanji","japanese","red-circle"],char:'\u3297\ufe0f',fitzpatrick_scale:!1,category:"symbols"},u5408:{keywords:["japanese","chinese","join","kanji","red-square"],char:'\u{1f234}',fitzpatrick_scale:!1,category:"symbols"},u6e80:{keywords:["full","chinese","japanese","red-square","kanji"],char:'\u{1f235}',fitzpatrick_scale:!1,category:"symbols"},u7981:{keywords:["kanji","japanese","chinese","forbidden","limit","restricted","red-square"],char:'\u{1f232}',fitzpatrick_scale:!1,category:"symbols"},a:{keywords:["red-square","alphabet","letter"],char:'\u{1f170}\ufe0f',fitzpatrick_scale:!1,category:"symbols"},b:{keywords:["red-square","alphabet","letter"],char:'\u{1f171}\ufe0f',fitzpatrick_scale:!1,category:"symbols"},ab:{keywords:["red-square","alphabet"],char:'\u{1f18e}',fitzpatrick_scale:!1,category:"symbols"},cl:{keywords:["alphabet","words","red-square"],char:'\u{1f191}',fitzpatrick_scale:!1,category:"symbols"},o2:{keywords:["alphabet","red-square","letter"],char:'\u{1f17e}\ufe0f',fitzpatrick_scale:!1,category:"symbols"},sos:{keywords:["help","red-square","words","emergency","911"],char:'\u{1f198}',fitzpatrick_scale:!1,category:"symbols"},no_entry:{keywords:["limit","security","privacy","bad","denied","stop","circle"],char:'\u26d4',fitzpatrick_scale:!1,category:"symbols"},name_badge:{keywords:["fire","forbid"],char:'\u{1f4db}',fitzpatrick_scale:!1,category:"symbols"},no_entry_sign:{keywords:["forbid","stop","limit","denied","disallow","circle"],char:'\u{1f6ab}',fitzpatrick_scale:!1,category:"symbols"},x:{keywords:["no","delete","remove","cancel","red"],char:'\u274c',fitzpatrick_scale:!1,category:"symbols"},o:{keywords:["circle","round"],char:'\u2b55',fitzpatrick_scale:!1,category:"symbols"},stop_sign:{keywords:["stop"],char:'\u{1f6d1}',fitzpatrick_scale:!1,category:"symbols"},anger:{keywords:["angry","mad"],char:'\u{1f4a2}',fitzpatrick_scale:!1,category:"symbols"},hotsprings:{keywords:["bath","warm","relax"],char:'\u2668\ufe0f',fitzpatrick_scale:!1,category:"symbols"},no_pedestrians:{keywords:["rules","crossing","walking","circle"],char:'\u{1f6b7}',fitzpatrick_scale:!1,category:"symbols"},do_not_litter:{keywords:["trash","bin","garbage","circle"],char:'\u{1f6af}',fitzpatrick_scale:!1,category:"symbols"},no_bicycles:{keywords:["cyclist","prohibited","circle"],char:'\u{1f6b3}',fitzpatrick_scale:!1,category:"symbols"},"non-potable_water":{keywords:["drink","faucet","tap","circle"],char:'\u{1f6b1}',fitzpatrick_scale:!1,category:"symbols"},underage:{keywords:["18","drink","pub","night","minor","circle"],char:'\u{1f51e}',fitzpatrick_scale:!1,category:"symbols"},no_mobile_phones:{keywords:["iphone","mute","circle"],char:'\u{1f4f5}',fitzpatrick_scale:!1,category:"symbols"},exclamation:{keywords:["heavy_exclamation_mark","danger","surprise","punctuation","wow","warning"],char:'\u2757',fitzpatrick_scale:!1,category:"symbols"},grey_exclamation:{keywords:["surprise","punctuation","gray","wow","warning"],char:'\u2755',fitzpatrick_scale:!1,category:"symbols"},question:{keywords:["doubt","confused"],char:'\u2753',fitzpatrick_scale:!1,category:"symbols"},grey_question:{keywords:["doubts","gray","huh","confused"],char:'\u2754',fitzpatrick_scale:!1,category:"symbols"},bangbang:{keywords:["exclamation","surprise"],char:'\u203c\ufe0f',fitzpatrick_scale:!1,category:"symbols"},interrobang:{keywords:["wat","punctuation","surprise"],char:'\u2049\ufe0f',fitzpatrick_scale:!1,category:"symbols"},low_brightness:{keywords:["sun","afternoon","warm","summer"],char:'\u{1f505}',fitzpatrick_scale:!1,category:"symbols"},high_brightness:{keywords:["sun","light"],char:'\u{1f506}',fitzpatrick_scale:!1,category:"symbols"},trident:{keywords:["weapon","spear"],char:'\u{1f531}',fitzpatrick_scale:!1,category:"symbols"},fleur_de_lis:{keywords:["decorative","scout"],char:'\u269c',fitzpatrick_scale:!1,category:"symbols"},part_alternation_mark:{keywords:["graph","presentation","stats","business","economics","bad"],char:'\u303d\ufe0f',fitzpatrick_scale:!1,category:"symbols"},warning:{keywords:["exclamation","wip","alert","error","problem","issue"],char:'\u26a0\ufe0f',fitzpatrick_scale:!1,category:"symbols"},children_crossing:{keywords:["school","warning","danger","sign","driving","yellow-diamond"],char:'\u{1f6b8}',fitzpatrick_scale:!1,category:"symbols"},beginner:{keywords:["badge","shield"],char:'\u{1f530}',fitzpatrick_scale:!1,category:"symbols"},recycle:{keywords:["arrow","environment","garbage","trash"],char:'\u267b\ufe0f',fitzpatrick_scale:!1,category:"symbols"},u6307:{keywords:["chinese","point","green-square","kanji"],char:'\u{1f22f}',fitzpatrick_scale:!1,category:"symbols"},chart:{keywords:["green-square","graph","presentation","stats"],char:'\u{1f4b9}',fitzpatrick_scale:!1,category:"symbols"},sparkle:{keywords:["stars","green-square","awesome","good","fireworks"],char:'\u2747\ufe0f',fitzpatrick_scale:!1,category:"symbols"},eight_spoked_asterisk:{keywords:["star","sparkle","green-square"],char:'\u2733\ufe0f',fitzpatrick_scale:!1,category:"symbols"},negative_squared_cross_mark:{keywords:["x","green-square","no","deny"],char:'\u274e',fitzpatrick_scale:!1,category:"symbols"},white_check_mark:{keywords:["green-square","ok","agree","vote","election","answer","tick"],char:'\u2705',fitzpatrick_scale:!1,category:"symbols"},diamond_shape_with_a_dot_inside:{keywords:["jewel","blue","gem","crystal","fancy"],char:'\u{1f4a0}',fitzpatrick_scale:!1,category:"symbols"},cyclone:{keywords:["weather","swirl","blue","cloud","vortex","spiral","whirlpool","spin","tornado","hurricane","typhoon"],char:'\u{1f300}',fitzpatrick_scale:!1,category:"symbols"},loop:{keywords:["tape","cassette"],char:'\u27bf',fitzpatrick_scale:!1,category:"symbols"},globe_with_meridians:{keywords:["earth","international","world","internet","interweb","i18n"],char:'\u{1f310}',fitzpatrick_scale:!1,category:"symbols"},m:{keywords:["alphabet","blue-circle","letter"],char:'\u24c2\ufe0f',fitzpatrick_scale:!1,category:"symbols"},atm:{keywords:["money","sales","cash","blue-square","payment","bank"],char:'\u{1f3e7}',fitzpatrick_scale:!1,category:"symbols"},sa:{keywords:["japanese","blue-square","katakana"],char:'\u{1f202}\ufe0f',fitzpatrick_scale:!1,category:"symbols"},passport_control:{keywords:["custom","blue-square"],char:'\u{1f6c2}',fitzpatrick_scale:!1,category:"symbols"},customs:{keywords:["passport","border","blue-square"],char:'\u{1f6c3}',fitzpatrick_scale:!1,category:"symbols"},baggage_claim:{keywords:["blue-square","airport","transport"],char:'\u{1f6c4}',fitzpatrick_scale:!1,category:"symbols"},left_luggage:{keywords:["blue-square","travel"],char:'\u{1f6c5}',fitzpatrick_scale:!1,category:"symbols"},wheelchair:{keywords:["blue-square","disabled","a11y","accessibility"],char:'\u267f',fitzpatrick_scale:!1,category:"symbols"},no_smoking:{keywords:["cigarette","blue-square","smell","smoke"],char:'\u{1f6ad}',fitzpatrick_scale:!1,category:"symbols"},wc:{keywords:["toilet","restroom","blue-square"],char:'\u{1f6be}',fitzpatrick_scale:!1,category:"symbols"},parking:{keywords:["cars","blue-square","alphabet","letter"],char:'\u{1f17f}\ufe0f',fitzpatrick_scale:!1,category:"symbols"},potable_water:{keywords:["blue-square","liquid","restroom","cleaning","faucet"],char:'\u{1f6b0}',fitzpatrick_scale:!1,category:"symbols"},mens:{keywords:["toilet","restroom","wc","blue-square","gender","male"],char:'\u{1f6b9}',fitzpatrick_scale:!1,category:"symbols"},womens:{keywords:["purple-square","woman","female","toilet","loo","restroom","gender"],char:'\u{1f6ba}',fitzpatrick_scale:!1,category:"symbols"},baby_symbol:{keywords:["orange-square","child"],char:'\u{1f6bc}',fitzpatrick_scale:!1,category:"symbols"},restroom:{keywords:["blue-square","toilet","refresh","wc","gender"],char:'\u{1f6bb}',fitzpatrick_scale:!1,category:"symbols"},put_litter_in_its_place:{keywords:["blue-square","sign","human","info"],char:'\u{1f6ae}',fitzpatrick_scale:!1,category:"symbols"},cinema:{keywords:["blue-square","record","film","movie","curtain","stage","theater"],char:'\u{1f3a6}',fitzpatrick_scale:!1,category:"symbols"},signal_strength:{keywords:["blue-square","reception","phone","internet","connection","wifi","bluetooth","bars"],char:'\u{1f4f6}',fitzpatrick_scale:!1,category:"symbols"},koko:{keywords:["blue-square","here","katakana","japanese","destination"],char:'\u{1f201}',fitzpatrick_scale:!1,category:"symbols"},ng:{keywords:["blue-square","words","shape","icon"],char:'\u{1f196}',fitzpatrick_scale:!1,category:"symbols"},ok:{keywords:["good","agree","yes","blue-square"],char:'\u{1f197}',fitzpatrick_scale:!1,category:"symbols"},up:{keywords:["blue-square","above","high"],char:'\u{1f199}',fitzpatrick_scale:!1,category:"symbols"},cool:{keywords:["words","blue-square"],char:'\u{1f192}',fitzpatrick_scale:!1,category:"symbols"},new:{keywords:["blue-square","words","start"],char:'\u{1f195}',fitzpatrick_scale:!1,category:"symbols"},free:{keywords:["blue-square","words"],char:'\u{1f193}',fitzpatrick_scale:!1,category:"symbols"},zero:{keywords:["0","numbers","blue-square","null"],char:'0\ufe0f\u20e3',fitzpatrick_scale:!1,category:"symbols"},one:{keywords:["blue-square","numbers","1"],char:'1\ufe0f\u20e3',fitzpatrick_scale:!1,category:"symbols"},two:{keywords:["numbers","2","prime","blue-square"],char:'2\ufe0f\u20e3',fitzpatrick_scale:!1,category:"symbols"},three:{keywords:["3","numbers","prime","blue-square"],char:'3\ufe0f\u20e3',fitzpatrick_scale:!1,category:"symbols"},four:{keywords:["4","numbers","blue-square"],char:'4\ufe0f\u20e3',fitzpatrick_scale:!1,category:"symbols"},five:{keywords:["5","numbers","blue-square","prime"],char:'5\ufe0f\u20e3',fitzpatrick_scale:!1,category:"symbols"},six:{keywords:["6","numbers","blue-square"],char:'6\ufe0f\u20e3',fitzpatrick_scale:!1,category:"symbols"},seven:{keywords:["7","numbers","blue-square","prime"],char:'7\ufe0f\u20e3',fitzpatrick_scale:!1,category:"symbols"},eight:{keywords:["8","blue-square","numbers"],char:'8\ufe0f\u20e3',fitzpatrick_scale:!1,category:"symbols"},nine:{keywords:["blue-square","numbers","9"],char:'9\ufe0f\u20e3',fitzpatrick_scale:!1,category:"symbols"},keycap_ten:{keywords:["numbers","10","blue-square"],char:'\u{1f51f}',fitzpatrick_scale:!1,category:"symbols"},asterisk:{keywords:["star","keycap"],char:'*\u20e3',fitzpatrick_scale:!1,category:"symbols"},eject_button:{keywords:["blue-square"],char:'\u23cf\ufe0f',fitzpatrick_scale:!1,category:"symbols"},arrow_forward:{keywords:["blue-square","right","direction","play"],char:'\u25b6\ufe0f',fitzpatrick_scale:!1,category:"symbols"},pause_button:{keywords:["pause","blue-square"],char:'\u23f8',fitzpatrick_scale:!1,category:"symbols"},next_track_button:{keywords:["forward","next","blue-square"],char:'\u23ed',fitzpatrick_scale:!1,category:"symbols"},stop_button:{keywords:["blue-square"],char:'\u23f9',fitzpatrick_scale:!1,category:"symbols"},record_button:{keywords:["blue-square"],char:'\u23fa',fitzpatrick_scale:!1,category:"symbols"},play_or_pause_button:{keywords:["blue-square","play","pause"],char:'\u23ef',fitzpatrick_scale:!1,category:"symbols"},previous_track_button:{keywords:["backward"],char:'\u23ee',fitzpatrick_scale:!1,category:"symbols"},fast_forward:{keywords:["blue-square","play","speed","continue"],char:'\u23e9',fitzpatrick_scale:!1,category:"symbols"},rewind:{keywords:["play","blue-square"],char:'\u23ea',fitzpatrick_scale:!1,category:"symbols"},twisted_rightwards_arrows:{keywords:["blue-square","shuffle","music","random"],char:'\u{1f500}',fitzpatrick_scale:!1,category:"symbols"},repeat:{keywords:["loop","record"],char:'\u{1f501}',fitzpatrick_scale:!1,category:"symbols"},repeat_one:{keywords:["blue-square","loop"],char:'\u{1f502}',fitzpatrick_scale:!1,category:"symbols"},arrow_backward:{keywords:["blue-square","left","direction"],char:'\u25c0\ufe0f',fitzpatrick_scale:!1,category:"symbols"},arrow_up_small:{keywords:["blue-square","triangle","direction","point","forward","top"],char:'\u{1f53c}',fitzpatrick_scale:!1,category:"symbols"},arrow_down_small:{keywords:["blue-square","direction","bottom"],char:'\u{1f53d}',fitzpatrick_scale:!1,category:"symbols"},arrow_double_up:{keywords:["blue-square","direction","top"],char:'\u23eb',fitzpatrick_scale:!1,category:"symbols"},arrow_double_down:{keywords:["blue-square","direction","bottom"],char:'\u23ec',fitzpatrick_scale:!1,category:"symbols"},arrow_right:{keywords:["blue-square","next"],char:'\u27a1\ufe0f',fitzpatrick_scale:!1,category:"symbols"},arrow_left:{keywords:["blue-square","previous","back"],char:'\u2b05\ufe0f',fitzpatrick_scale:!1,category:"symbols"},arrow_up:{keywords:["blue-square","continue","top","direction"],char:'\u2b06\ufe0f',fitzpatrick_scale:!1,category:"symbols"},arrow_down:{keywords:["blue-square","direction","bottom"],char:'\u2b07\ufe0f',fitzpatrick_scale:!1,category:"symbols"},arrow_upper_right:{keywords:["blue-square","point","direction","diagonal","northeast"],char:'\u2197\ufe0f',fitzpatrick_scale:!1,category:"symbols"},arrow_lower_right:{keywords:["blue-square","direction","diagonal","southeast"],char:'\u2198\ufe0f',fitzpatrick_scale:!1,category:"symbols"},arrow_lower_left:{keywords:["blue-square","direction","diagonal","southwest"],char:'\u2199\ufe0f',fitzpatrick_scale:!1,category:"symbols"},arrow_upper_left:{keywords:["blue-square","point","direction","diagonal","northwest"],char:'\u2196\ufe0f',fitzpatrick_scale:!1,category:"symbols"},arrow_up_down:{keywords:["blue-square","direction","way","vertical"],char:'\u2195\ufe0f',fitzpatrick_scale:!1,category:"symbols"},left_right_arrow:{keywords:["shape","direction","horizontal","sideways"],char:'\u2194\ufe0f',fitzpatrick_scale:!1,category:"symbols"},arrows_counterclockwise:{keywords:["blue-square","sync","cycle"],char:'\u{1f504}',fitzpatrick_scale:!1,category:"symbols"},arrow_right_hook:{keywords:["blue-square","return","rotate","direction"],char:'\u21aa\ufe0f',fitzpatrick_scale:!1,category:"symbols"},leftwards_arrow_with_hook:{keywords:["back","return","blue-square","undo","enter"],char:'\u21a9\ufe0f',fitzpatrick_scale:!1,category:"symbols"},arrow_heading_up:{keywords:["blue-square","direction","top"],char:'\u2934\ufe0f',fitzpatrick_scale:!1,category:"symbols"},arrow_heading_down:{keywords:["blue-square","direction","bottom"],char:'\u2935\ufe0f',fitzpatrick_scale:!1,category:"symbols"},hash:{keywords:["symbol","blue-square","twitter"],char:'#\ufe0f\u20e3',fitzpatrick_scale:!1,category:"symbols"},information_source:{keywords:["blue-square","alphabet","letter"],char:'\u2139\ufe0f',fitzpatrick_scale:!1,category:"symbols"},abc:{keywords:["blue-square","alphabet"],char:'\u{1f524}',fitzpatrick_scale:!1,category:"symbols"},abcd:{keywords:["blue-square","alphabet"],char:'\u{1f521}',fitzpatrick_scale:!1,category:"symbols"},capital_abcd:{keywords:["alphabet","words","blue-square"],char:'\u{1f520}',fitzpatrick_scale:!1,category:"symbols"},symbols:{keywords:["blue-square","music","note","ampersand","percent","glyphs","characters"],char:'\u{1f523}',fitzpatrick_scale:!1,category:"symbols"},musical_note:{keywords:["score","tone","sound"],char:'\u{1f3b5}',fitzpatrick_scale:!1,category:"symbols"},notes:{keywords:["music","score"],char:'\u{1f3b6}',fitzpatrick_scale:!1,category:"symbols"},wavy_dash:{keywords:["draw","line","moustache","mustache","squiggle","scribble"],char:'\u3030\ufe0f',fitzpatrick_scale:!1,category:"symbols"},curly_loop:{keywords:["scribble","draw","shape","squiggle"],char:'\u27b0',fitzpatrick_scale:!1,category:"symbols"},heavy_check_mark:{keywords:["ok","nike","answer","yes","tick"],char:'\u2714\ufe0f',fitzpatrick_scale:!1,category:"symbols"},arrows_clockwise:{keywords:["sync","cycle","round","repeat"],char:'\u{1f503}',fitzpatrick_scale:!1,category:"symbols"},heavy_plus_sign:{keywords:["math","calculation","addition","more","increase"],char:'\u2795',fitzpatrick_scale:!1,category:"symbols"},heavy_minus_sign:{keywords:["math","calculation","subtract","less"],char:'\u2796',fitzpatrick_scale:!1,category:"symbols"},heavy_division_sign:{keywords:["divide","math","calculation"],char:'\u2797',fitzpatrick_scale:!1,category:"symbols"},heavy_multiplication_x:{keywords:["math","calculation"],char:'\u2716\ufe0f',fitzpatrick_scale:!1,category:"symbols"},infinity:{keywords:["forever"],char:'\u267e',fitzpatrick_scale:!1,category:"symbols"},heavy_dollar_sign:{keywords:["money","sales","payment","currency","buck"],char:'\u{1f4b2}',fitzpatrick_scale:!1,category:"symbols"},currency_exchange:{keywords:["money","sales","dollar","travel"],char:'\u{1f4b1}',fitzpatrick_scale:!1,category:"symbols"},copyright:{keywords:["ip","license","circle","law","legal"],char:'\xa9\ufe0f',fitzpatrick_scale:!1,category:"symbols"},registered:{keywords:["alphabet","circle"],char:'\xae\ufe0f',fitzpatrick_scale:!1,category:"symbols"},tm:{keywords:["trademark","brand","law","legal"],char:'\u2122\ufe0f',fitzpatrick_scale:!1,category:"symbols"},end:{keywords:["words","arrow"],char:'\u{1f51a}',fitzpatrick_scale:!1,category:"symbols"},back:{keywords:["arrow","words","return"],char:'\u{1f519}',fitzpatrick_scale:!1,category:"symbols"},on:{keywords:["arrow","words"],char:'\u{1f51b}',fitzpatrick_scale:!1,category:"symbols"},top:{keywords:["words","blue-square"],char:'\u{1f51d}',fitzpatrick_scale:!1,category:"symbols"},soon:{keywords:["arrow","words"],char:'\u{1f51c}',fitzpatrick_scale:!1,category:"symbols"},ballot_box_with_check:{keywords:["ok","agree","confirm","black-square","vote","election","yes","tick"],char:'\u2611\ufe0f',fitzpatrick_scale:!1,category:"symbols"},radio_button:{keywords:["input","old","music","circle"],char:'\u{1f518}',fitzpatrick_scale:!1,category:"symbols"},white_circle:{keywords:["shape","round"],char:'\u26aa',fitzpatrick_scale:!1,category:"symbols"},black_circle:{keywords:["shape","button","round"],char:'\u26ab',fitzpatrick_scale:!1,category:"symbols"},red_circle:{keywords:["shape","error","danger"],char:'\u{1f534}',fitzpatrick_scale:!1,category:"symbols"},large_blue_circle:{keywords:["shape","icon","button"],char:'\u{1f535}',fitzpatrick_scale:!1,category:"symbols"},small_orange_diamond:{keywords:["shape","jewel","gem"],char:'\u{1f538}',fitzpatrick_scale:!1,category:"symbols"},small_blue_diamond:{keywords:["shape","jewel","gem"],char:'\u{1f539}',fitzpatrick_scale:!1,category:"symbols"},large_orange_diamond:{keywords:["shape","jewel","gem"],char:'\u{1f536}',fitzpatrick_scale:!1,category:"symbols"},large_blue_diamond:{keywords:["shape","jewel","gem"],char:'\u{1f537}',fitzpatrick_scale:!1,category:"symbols"},small_red_triangle:{keywords:["shape","direction","up","top"],char:'\u{1f53a}',fitzpatrick_scale:!1,category:"symbols"},black_small_square:{keywords:["shape","icon"],char:'\u25aa\ufe0f',fitzpatrick_scale:!1,category:"symbols"},white_small_square:{keywords:["shape","icon"],char:'\u25ab\ufe0f',fitzpatrick_scale:!1,category:"symbols"},black_large_square:{keywords:["shape","icon","button"],char:'\u2b1b',fitzpatrick_scale:!1,category:"symbols"},white_large_square:{keywords:["shape","icon","stone","button"],char:'\u2b1c',fitzpatrick_scale:!1,category:"symbols"},small_red_triangle_down:{keywords:["shape","direction","bottom"],char:'\u{1f53b}',fitzpatrick_scale:!1,category:"symbols"},black_medium_square:{keywords:["shape","button","icon"],char:'\u25fc\ufe0f',fitzpatrick_scale:!1,category:"symbols"},white_medium_square:{keywords:["shape","stone","icon"],char:'\u25fb\ufe0f',fitzpatrick_scale:!1,category:"symbols"},black_medium_small_square:{keywords:["icon","shape","button"],char:'\u25fe',fitzpatrick_scale:!1,category:"symbols"},white_medium_small_square:{keywords:["shape","stone","icon","button"],char:'\u25fd',fitzpatrick_scale:!1,category:"symbols"},black_square_button:{keywords:["shape","input","frame"],char:'\u{1f532}',fitzpatrick_scale:!1,category:"symbols"},white_square_button:{keywords:["shape","input"],char:'\u{1f533}',fitzpatrick_scale:!1,category:"symbols"},speaker:{keywords:["sound","volume","silence","broadcast"],char:'\u{1f508}',fitzpatrick_scale:!1,category:"symbols"},sound:{keywords:["volume","speaker","broadcast"],char:'\u{1f509}',fitzpatrick_scale:!1,category:"symbols"},loud_sound:{keywords:["volume","noise","noisy","speaker","broadcast"],char:'\u{1f50a}',fitzpatrick_scale:!1,category:"symbols"},mute:{keywords:["sound","volume","silence","quiet"],char:'\u{1f507}',fitzpatrick_scale:!1,category:"symbols"},mega:{keywords:["sound","speaker","volume"],char:'\u{1f4e3}',fitzpatrick_scale:!1,category:"symbols"},loudspeaker:{keywords:["volume","sound"],char:'\u{1f4e2}',fitzpatrick_scale:!1,category:"symbols"},bell:{keywords:["sound","notification","christmas","xmas","chime"],char:'\u{1f514}',fitzpatrick_scale:!1,category:"symbols"},no_bell:{keywords:["sound","volume","mute","quiet","silent"],char:'\u{1f515}',fitzpatrick_scale:!1,category:"symbols"},black_joker:{keywords:["poker","cards","game","play","magic"],char:'\u{1f0cf}',fitzpatrick_scale:!1,category:"symbols"},mahjong:{keywords:["game","play","chinese","kanji"],char:'\u{1f004}',fitzpatrick_scale:!1,category:"symbols"},spades:{keywords:["poker","cards","suits","magic"],char:'\u2660\ufe0f',fitzpatrick_scale:!1,category:"symbols"},clubs:{keywords:["poker","cards","magic","suits"],char:'\u2663\ufe0f',fitzpatrick_scale:!1,category:"symbols"},hearts:{keywords:["poker","cards","magic","suits"],char:'\u2665\ufe0f',fitzpatrick_scale:!1,category:"symbols"},diamonds:{keywords:["poker","cards","magic","suits"],char:'\u2666\ufe0f',fitzpatrick_scale:!1,category:"symbols"},flower_playing_cards:{keywords:["game","sunset","red"],char:'\u{1f3b4}',fitzpatrick_scale:!1,category:"symbols"},thought_balloon:{keywords:["bubble","cloud","speech","thinking","dream"],char:'\u{1f4ad}',fitzpatrick_scale:!1,category:"symbols"},right_anger_bubble:{keywords:["caption","speech","thinking","mad"],char:'\u{1f5ef}',fitzpatrick_scale:!1,category:"symbols"},speech_balloon:{keywords:["bubble","words","message","talk","chatting"],char:'\u{1f4ac}',fitzpatrick_scale:!1,category:"symbols"},left_speech_bubble:{keywords:["words","message","talk","chatting"],char:'\u{1f5e8}',fitzpatrick_scale:!1,category:"symbols"},clock1:{keywords:["time","late","early","schedule"],char:'\u{1f550}',fitzpatrick_scale:!1,category:"symbols"},clock2:{keywords:["time","late","early","schedule"],char:'\u{1f551}',fitzpatrick_scale:!1,category:"symbols"},clock3:{keywords:["time","late","early","schedule"],char:'\u{1f552}',fitzpatrick_scale:!1,category:"symbols"},clock4:{keywords:["time","late","early","schedule"],char:'\u{1f553}',fitzpatrick_scale:!1,category:"symbols"},clock5:{keywords:["time","late","early","schedule"],char:'\u{1f554}',fitzpatrick_scale:!1,category:"symbols"},clock6:{keywords:["time","late","early","schedule","dawn","dusk"],char:'\u{1f555}',fitzpatrick_scale:!1,category:"symbols"},clock7:{keywords:["time","late","early","schedule"],char:'\u{1f556}',fitzpatrick_scale:!1,category:"symbols"},clock8:{keywords:["time","late","early","schedule"],char:'\u{1f557}',fitzpatrick_scale:!1,category:"symbols"},clock9:{keywords:["time","late","early","schedule"],char:'\u{1f558}',fitzpatrick_scale:!1,category:"symbols"},clock10:{keywords:["time","late","early","schedule"],char:'\u{1f559}',fitzpatrick_scale:!1,category:"symbols"},clock11:{keywords:["time","late","early","schedule"],char:'\u{1f55a}',fitzpatrick_scale:!1,category:"symbols"},clock12:{keywords:["time","noon","midnight","midday","late","early","schedule"],char:'\u{1f55b}',fitzpatrick_scale:!1,category:"symbols"},clock130:{keywords:["time","late","early","schedule"],char:'\u{1f55c}',fitzpatrick_scale:!1,category:"symbols"},clock230:{keywords:["time","late","early","schedule"],char:'\u{1f55d}',fitzpatrick_scale:!1,category:"symbols"},clock330:{keywords:["time","late","early","schedule"],char:'\u{1f55e}',fitzpatrick_scale:!1,category:"symbols"},clock430:{keywords:["time","late","early","schedule"],char:'\u{1f55f}',fitzpatrick_scale:!1,category:"symbols"},clock530:{keywords:["time","late","early","schedule"],char:'\u{1f560}',fitzpatrick_scale:!1,category:"symbols"},clock630:{keywords:["time","late","early","schedule"],char:'\u{1f561}',fitzpatrick_scale:!1,category:"symbols"},clock730:{keywords:["time","late","early","schedule"],char:'\u{1f562}',fitzpatrick_scale:!1,category:"symbols"},clock830:{keywords:["time","late","early","schedule"],char:'\u{1f563}',fitzpatrick_scale:!1,category:"symbols"},clock930:{keywords:["time","late","early","schedule"],char:'\u{1f564}',fitzpatrick_scale:!1,category:"symbols"},clock1030:{keywords:["time","late","early","schedule"],char:'\u{1f565}',fitzpatrick_scale:!1,category:"symbols"},clock1130:{keywords:["time","late","early","schedule"],char:'\u{1f566}',fitzpatrick_scale:!1,category:"symbols"},clock1230:{keywords:["time","late","early","schedule"],char:'\u{1f567}',fitzpatrick_scale:!1,category:"symbols"},afghanistan:{keywords:["af","flag","nation","country","banner"],char:'\u{1f1e6}\u{1f1eb}',fitzpatrick_scale:!1,category:"flags"},aland_islands:{keywords:["\xc5land","islands","flag","nation","country","banner"],char:'\u{1f1e6}\u{1f1fd}',fitzpatrick_scale:!1,category:"flags"},albania:{keywords:["al","flag","nation","country","banner"],char:'\u{1f1e6}\u{1f1f1}',fitzpatrick_scale:!1,category:"flags"},algeria:{keywords:["dz","flag","nation","country","banner"],char:'\u{1f1e9}\u{1f1ff}',fitzpatrick_scale:!1,category:"flags"},american_samoa:{keywords:["american","ws","flag","nation","country","banner"],char:'\u{1f1e6}\u{1f1f8}',fitzpatrick_scale:!1,category:"flags"},andorra:{keywords:["ad","flag","nation","country","banner"],char:'\u{1f1e6}\u{1f1e9}',fitzpatrick_scale:!1,category:"flags"},angola:{keywords:["ao","flag","nation","country","banner"],char:'\u{1f1e6}\u{1f1f4}',fitzpatrick_scale:!1,category:"flags"},anguilla:{keywords:["ai","flag","nation","country","banner"],char:'\u{1f1e6}\u{1f1ee}',fitzpatrick_scale:!1,category:"flags"},antarctica:{keywords:["aq","flag","nation","country","banner"],char:'\u{1f1e6}\u{1f1f6}',fitzpatrick_scale:!1,category:"flags"},antigua_barbuda:{keywords:["antigua","barbuda","flag","nation","country","banner"],char:'\u{1f1e6}\u{1f1ec}',fitzpatrick_scale:!1,category:"flags"},argentina:{keywords:["ar","flag","nation","country","banner"],char:'\u{1f1e6}\u{1f1f7}',fitzpatrick_scale:!1,category:"flags"},armenia:{keywords:["am","flag","nation","country","banner"],char:'\u{1f1e6}\u{1f1f2}',fitzpatrick_scale:!1,category:"flags"},aruba:{keywords:["aw","flag","nation","country","banner"],char:'\u{1f1e6}\u{1f1fc}',fitzpatrick_scale:!1,category:"flags"},australia:{keywords:["au","flag","nation","country","banner"],char:'\u{1f1e6}\u{1f1fa}',fitzpatrick_scale:!1,category:"flags"},austria:{keywords:["at","flag","nation","country","banner"],char:'\u{1f1e6}\u{1f1f9}',fitzpatrick_scale:!1,category:"flags"},azerbaijan:{keywords:["az","flag","nation","country","banner"],char:'\u{1f1e6}\u{1f1ff}',fitzpatrick_scale:!1,category:"flags"},bahamas:{keywords:["bs","flag","nation","country","banner"],char:'\u{1f1e7}\u{1f1f8}',fitzpatrick_scale:!1,category:"flags"},bahrain:{keywords:["bh","flag","nation","country","banner"],char:'\u{1f1e7}\u{1f1ed}',fitzpatrick_scale:!1,category:"flags"},bangladesh:{keywords:["bd","flag","nation","country","banner"],char:'\u{1f1e7}\u{1f1e9}',fitzpatrick_scale:!1,category:"flags"},barbados:{keywords:["bb","flag","nation","country","banner"],char:'\u{1f1e7}\u{1f1e7}',fitzpatrick_scale:!1,category:"flags"},belarus:{keywords:["by","flag","nation","country","banner"],char:'\u{1f1e7}\u{1f1fe}',fitzpatrick_scale:!1,category:"flags"},belgium:{keywords:["be","flag","nation","country","banner"],char:'\u{1f1e7}\u{1f1ea}',fitzpatrick_scale:!1,category:"flags"},belize:{keywords:["bz","flag","nation","country","banner"],char:'\u{1f1e7}\u{1f1ff}',fitzpatrick_scale:!1,category:"flags"},benin:{keywords:["bj","flag","nation","country","banner"],char:'\u{1f1e7}\u{1f1ef}',fitzpatrick_scale:!1,category:"flags"},bermuda:{keywords:["bm","flag","nation","country","banner"],char:'\u{1f1e7}\u{1f1f2}',fitzpatrick_scale:!1,category:"flags"},bhutan:{keywords:["bt","flag","nation","country","banner"],char:'\u{1f1e7}\u{1f1f9}',fitzpatrick_scale:!1,category:"flags"},bolivia:{keywords:["bo","flag","nation","country","banner"],char:'\u{1f1e7}\u{1f1f4}',fitzpatrick_scale:!1,category:"flags"},caribbean_netherlands:{keywords:["bonaire","flag","nation","country","banner"],char:'\u{1f1e7}\u{1f1f6}',fitzpatrick_scale:!1,category:"flags"},bosnia_herzegovina:{keywords:["bosnia","herzegovina","flag","nation","country","banner"],char:'\u{1f1e7}\u{1f1e6}',fitzpatrick_scale:!1,category:"flags"},botswana:{keywords:["bw","flag","nation","country","banner"],char:'\u{1f1e7}\u{1f1fc}',fitzpatrick_scale:!1,category:"flags"},brazil:{keywords:["br","flag","nation","country","banner"],char:'\u{1f1e7}\u{1f1f7}',fitzpatrick_scale:!1,category:"flags"},british_indian_ocean_territory:{keywords:["british","indian","ocean","territory","flag","nation","country","banner"],char:'\u{1f1ee}\u{1f1f4}',fitzpatrick_scale:!1,category:"flags"},british_virgin_islands:{keywords:["british","virgin","islands","bvi","flag","nation","country","banner"],char:'\u{1f1fb}\u{1f1ec}',fitzpatrick_scale:!1,category:"flags"},brunei:{keywords:["bn","darussalam","flag","nation","country","banner"],char:'\u{1f1e7}\u{1f1f3}',fitzpatrick_scale:!1,category:"flags"},bulgaria:{keywords:["bg","flag","nation","country","banner"],char:'\u{1f1e7}\u{1f1ec}',fitzpatrick_scale:!1,category:"flags"},burkina_faso:{keywords:["burkina","faso","flag","nation","country","banner"],char:'\u{1f1e7}\u{1f1eb}',fitzpatrick_scale:!1,category:"flags"},burundi:{keywords:["bi","flag","nation","country","banner"],char:'\u{1f1e7}\u{1f1ee}',fitzpatrick_scale:!1,category:"flags"},cape_verde:{keywords:["cabo","verde","flag","nation","country","banner"],char:'\u{1f1e8}\u{1f1fb}',fitzpatrick_scale:!1,category:"flags"},cambodia:{keywords:["kh","flag","nation","country","banner"],char:'\u{1f1f0}\u{1f1ed}',fitzpatrick_scale:!1,category:"flags"},cameroon:{keywords:["cm","flag","nation","country","banner"],char:'\u{1f1e8}\u{1f1f2}',fitzpatrick_scale:!1,category:"flags"},canada:{keywords:["ca","flag","nation","country","banner"],char:'\u{1f1e8}\u{1f1e6}',fitzpatrick_scale:!1,category:"flags"},canary_islands:{keywords:["canary","islands","flag","nation","country","banner"],char:'\u{1f1ee}\u{1f1e8}',fitzpatrick_scale:!1,category:"flags"},cayman_islands:{keywords:["cayman","islands","flag","nation","country","banner"],char:'\u{1f1f0}\u{1f1fe}',fitzpatrick_scale:!1,category:"flags"},central_african_republic:{keywords:["central","african","republic","flag","nation","country","banner"],char:'\u{1f1e8}\u{1f1eb}',fitzpatrick_scale:!1,category:"flags"},chad:{keywords:["td","flag","nation","country","banner"],char:'\u{1f1f9}\u{1f1e9}',fitzpatrick_scale:!1,category:"flags"},chile:{keywords:["flag","nation","country","banner"],char:'\u{1f1e8}\u{1f1f1}',fitzpatrick_scale:!1,category:"flags"},cn:{keywords:["china","chinese","prc","flag","country","nation","banner"],char:'\u{1f1e8}\u{1f1f3}',fitzpatrick_scale:!1,category:"flags"},christmas_island:{keywords:["christmas","island","flag","nation","country","banner"],char:'\u{1f1e8}\u{1f1fd}',fitzpatrick_scale:!1,category:"flags"},cocos_islands:{keywords:["cocos","keeling","islands","flag","nation","country","banner"],char:'\u{1f1e8}\u{1f1e8}',fitzpatrick_scale:!1,category:"flags"},colombia:{keywords:["co","flag","nation","country","banner"],char:'\u{1f1e8}\u{1f1f4}',fitzpatrick_scale:!1,category:"flags"},comoros:{keywords:["km","flag","nation","country","banner"],char:'\u{1f1f0}\u{1f1f2}',fitzpatrick_scale:!1,category:"flags"},congo_brazzaville:{keywords:["congo","flag","nation","country","banner"],char:'\u{1f1e8}\u{1f1ec}',fitzpatrick_scale:!1,category:"flags"},congo_kinshasa:{keywords:["congo","democratic","republic","flag","nation","country","banner"],char:'\u{1f1e8}\u{1f1e9}',fitzpatrick_scale:!1,category:"flags"},cook_islands:{keywords:["cook","islands","flag","nation","country","banner"],char:'\u{1f1e8}\u{1f1f0}',fitzpatrick_scale:!1,category:"flags"},costa_rica:{keywords:["costa","rica","flag","nation","country","banner"],char:'\u{1f1e8}\u{1f1f7}',fitzpatrick_scale:!1,category:"flags"},croatia:{keywords:["hr","flag","nation","country","banner"],char:'\u{1f1ed}\u{1f1f7}',fitzpatrick_scale:!1,category:"flags"},cuba:{keywords:["cu","flag","nation","country","banner"],char:'\u{1f1e8}\u{1f1fa}',fitzpatrick_scale:!1,category:"flags"},curacao:{keywords:["cura\xe7ao","flag","nation","country","banner"],char:'\u{1f1e8}\u{1f1fc}',fitzpatrick_scale:!1,category:"flags"},cyprus:{keywords:["cy","flag","nation","country","banner"],char:'\u{1f1e8}\u{1f1fe}',fitzpatrick_scale:!1,category:"flags"},czech_republic:{keywords:["cz","flag","nation","country","banner"],char:'\u{1f1e8}\u{1f1ff}',fitzpatrick_scale:!1,category:"flags"},denmark:{keywords:["dk","flag","nation","country","banner"],char:'\u{1f1e9}\u{1f1f0}',fitzpatrick_scale:!1,category:"flags"},djibouti:{keywords:["dj","flag","nation","country","banner"],char:'\u{1f1e9}\u{1f1ef}',fitzpatrick_scale:!1,category:"flags"},dominica:{keywords:["dm","flag","nation","country","banner"],char:'\u{1f1e9}\u{1f1f2}',fitzpatrick_scale:!1,category:"flags"},dominican_republic:{keywords:["dominican","republic","flag","nation","country","banner"],char:'\u{1f1e9}\u{1f1f4}',fitzpatrick_scale:!1,category:"flags"},ecuador:{keywords:["ec","flag","nation","country","banner"],char:'\u{1f1ea}\u{1f1e8}',fitzpatrick_scale:!1,category:"flags"},egypt:{keywords:["eg","flag","nation","country","banner"],char:'\u{1f1ea}\u{1f1ec}',fitzpatrick_scale:!1,category:"flags"},el_salvador:{keywords:["el","salvador","flag","nation","country","banner"],char:'\u{1f1f8}\u{1f1fb}',fitzpatrick_scale:!1,category:"flags"},equatorial_guinea:{keywords:["equatorial","gn","flag","nation","country","banner"],char:'\u{1f1ec}\u{1f1f6}',fitzpatrick_scale:!1,category:"flags"},eritrea:{keywords:["er","flag","nation","country","banner"],char:'\u{1f1ea}\u{1f1f7}',fitzpatrick_scale:!1,category:"flags"},estonia:{keywords:["ee","flag","nation","country","banner"],char:'\u{1f1ea}\u{1f1ea}',fitzpatrick_scale:!1,category:"flags"},ethiopia:{keywords:["et","flag","nation","country","banner"],char:'\u{1f1ea}\u{1f1f9}',fitzpatrick_scale:!1,category:"flags"},eu:{keywords:["european","union","flag","banner"],char:'\u{1f1ea}\u{1f1fa}',fitzpatrick_scale:!1,category:"flags"},falkland_islands:{keywords:["falkland","islands","malvinas","flag","nation","country","banner"],char:'\u{1f1eb}\u{1f1f0}',fitzpatrick_scale:!1,category:"flags"},faroe_islands:{keywords:["faroe","islands","flag","nation","country","banner"],char:'\u{1f1eb}\u{1f1f4}',fitzpatrick_scale:!1,category:"flags"},fiji:{keywords:["fj","flag","nation","country","banner"],char:'\u{1f1eb}\u{1f1ef}',fitzpatrick_scale:!1,category:"flags"},finland:{keywords:["fi","flag","nation","country","banner"],char:'\u{1f1eb}\u{1f1ee}',fitzpatrick_scale:!1,category:"flags"},fr:{keywords:["banner","flag","nation","france","french","country"],char:'\u{1f1eb}\u{1f1f7}',fitzpatrick_scale:!1,category:"flags"},french_guiana:{keywords:["french","guiana","flag","nation","country","banner"],char:'\u{1f1ec}\u{1f1eb}',fitzpatrick_scale:!1,category:"flags"},french_polynesia:{keywords:["french","polynesia","flag","nation","country","banner"],char:'\u{1f1f5}\u{1f1eb}',fitzpatrick_scale:!1,category:"flags"},french_southern_territories:{keywords:["french","southern","territories","flag","nation","country","banner"],char:'\u{1f1f9}\u{1f1eb}',fitzpatrick_scale:!1,category:"flags"},gabon:{keywords:["ga","flag","nation","country","banner"],char:'\u{1f1ec}\u{1f1e6}',fitzpatrick_scale:!1,category:"flags"},gambia:{keywords:["gm","flag","nation","country","banner"],char:'\u{1f1ec}\u{1f1f2}',fitzpatrick_scale:!1,category:"flags"},georgia:{keywords:["ge","flag","nation","country","banner"],char:'\u{1f1ec}\u{1f1ea}',fitzpatrick_scale:!1,category:"flags"},de:{keywords:["german","nation","flag","country","banner"],char:'\u{1f1e9}\u{1f1ea}',fitzpatrick_scale:!1,category:"flags"},ghana:{keywords:["gh","flag","nation","country","banner"],char:'\u{1f1ec}\u{1f1ed}',fitzpatrick_scale:!1,category:"flags"},gibraltar:{keywords:["gi","flag","nation","country","banner"],char:'\u{1f1ec}\u{1f1ee}',fitzpatrick_scale:!1,category:"flags"},greece:{keywords:["gr","flag","nation","country","banner"],char:'\u{1f1ec}\u{1f1f7}',fitzpatrick_scale:!1,category:"flags"},greenland:{keywords:["gl","flag","nation","country","banner"],char:'\u{1f1ec}\u{1f1f1}',fitzpatrick_scale:!1,category:"flags"},grenada:{keywords:["gd","flag","nation","country","banner"],char:'\u{1f1ec}\u{1f1e9}',fitzpatrick_scale:!1,category:"flags"},guadeloupe:{keywords:["gp","flag","nation","country","banner"],char:'\u{1f1ec}\u{1f1f5}',fitzpatrick_scale:!1,category:"flags"},guam:{keywords:["gu","flag","nation","country","banner"],char:'\u{1f1ec}\u{1f1fa}',fitzpatrick_scale:!1,category:"flags"},guatemala:{keywords:["gt","flag","nation","country","banner"],char:'\u{1f1ec}\u{1f1f9}',fitzpatrick_scale:!1,category:"flags"},guernsey:{keywords:["gg","flag","nation","country","banner"],char:'\u{1f1ec}\u{1f1ec}',fitzpatrick_scale:!1,category:"flags"},guinea:{keywords:["gn","flag","nation","country","banner"],char:'\u{1f1ec}\u{1f1f3}',fitzpatrick_scale:!1,category:"flags"},guinea_bissau:{keywords:["gw","bissau","flag","nation","country","banner"],char:'\u{1f1ec}\u{1f1fc}',fitzpatrick_scale:!1,category:"flags"},guyana:{keywords:["gy","flag","nation","country","banner"],char:'\u{1f1ec}\u{1f1fe}',fitzpatrick_scale:!1,category:"flags"},haiti:{keywords:["ht","flag","nation","country","banner"],char:'\u{1f1ed}\u{1f1f9}',fitzpatrick_scale:!1,category:"flags"},honduras:{keywords:["hn","flag","nation","country","banner"],char:'\u{1f1ed}\u{1f1f3}',fitzpatrick_scale:!1,category:"flags"},hong_kong:{keywords:["hong","kong","flag","nation","country","banner"],char:'\u{1f1ed}\u{1f1f0}',fitzpatrick_scale:!1,category:"flags"},hungary:{keywords:["hu","flag","nation","country","banner"],char:'\u{1f1ed}\u{1f1fa}',fitzpatrick_scale:!1,category:"flags"},iceland:{keywords:["is","flag","nation","country","banner"],char:'\u{1f1ee}\u{1f1f8}',fitzpatrick_scale:!1,category:"flags"},india:{keywords:["in","flag","nation","country","banner"],char:'\u{1f1ee}\u{1f1f3}',fitzpatrick_scale:!1,category:"flags"},indonesia:{keywords:["flag","nation","country","banner"],char:'\u{1f1ee}\u{1f1e9}',fitzpatrick_scale:!1,category:"flags"},iran:{keywords:["iran,","islamic","republic","flag","nation","country","banner"],char:'\u{1f1ee}\u{1f1f7}',fitzpatrick_scale:!1,category:"flags"},iraq:{keywords:["iq","flag","nation","country","banner"],char:'\u{1f1ee}\u{1f1f6}',fitzpatrick_scale:!1,category:"flags"},ireland:{keywords:["ie","flag","nation","country","banner"],char:'\u{1f1ee}\u{1f1ea}',fitzpatrick_scale:!1,category:"flags"},isle_of_man:{keywords:["isle","man","flag","nation","country","banner"],char:'\u{1f1ee}\u{1f1f2}',fitzpatrick_scale:!1,category:"flags"},israel:{keywords:["il","flag","nation","country","banner"],char:'\u{1f1ee}\u{1f1f1}',fitzpatrick_scale:!1,category:"flags"},it:{keywords:["italy","flag","nation","country","banner"],char:'\u{1f1ee}\u{1f1f9}',fitzpatrick_scale:!1,category:"flags"},cote_divoire:{keywords:["ivory","coast","flag","nation","country","banner"],char:'\u{1f1e8}\u{1f1ee}',fitzpatrick_scale:!1,category:"flags"},jamaica:{keywords:["jm","flag","nation","country","banner"],char:'\u{1f1ef}\u{1f1f2}',fitzpatrick_scale:!1,category:"flags"},jp:{keywords:["japanese","nation","flag","country","banner"],char:'\u{1f1ef}\u{1f1f5}',fitzpatrick_scale:!1,category:"flags"},jersey:{keywords:["je","flag","nation","country","banner"],char:'\u{1f1ef}\u{1f1ea}',fitzpatrick_scale:!1,category:"flags"},jordan:{keywords:["jo","flag","nation","country","banner"],char:'\u{1f1ef}\u{1f1f4}',fitzpatrick_scale:!1,category:"flags"},kazakhstan:{keywords:["kz","flag","nation","country","banner"],char:'\u{1f1f0}\u{1f1ff}',fitzpatrick_scale:!1,category:"flags"},kenya:{keywords:["ke","flag","nation","country","banner"],char:'\u{1f1f0}\u{1f1ea}',fitzpatrick_scale:!1,category:"flags"},kiribati:{keywords:["ki","flag","nation","country","banner"],char:'\u{1f1f0}\u{1f1ee}',fitzpatrick_scale:!1,category:"flags"},kosovo:{keywords:["xk","flag","nation","country","banner"],char:'\u{1f1fd}\u{1f1f0}',fitzpatrick_scale:!1,category:"flags"},kuwait:{keywords:["kw","flag","nation","country","banner"],char:'\u{1f1f0}\u{1f1fc}',fitzpatrick_scale:!1,category:"flags"},kyrgyzstan:{keywords:["kg","flag","nation","country","banner"],char:'\u{1f1f0}\u{1f1ec}',fitzpatrick_scale:!1,category:"flags"},laos:{keywords:["lao","democratic","republic","flag","nation","country","banner"],char:'\u{1f1f1}\u{1f1e6}',fitzpatrick_scale:!1,category:"flags"},latvia:{keywords:["lv","flag","nation","country","banner"],char:'\u{1f1f1}\u{1f1fb}',fitzpatrick_scale:!1,category:"flags"},lebanon:{keywords:["lb","flag","nation","country","banner"],char:'\u{1f1f1}\u{1f1e7}',fitzpatrick_scale:!1,category:"flags"},lesotho:{keywords:["ls","flag","nation","country","banner"],char:'\u{1f1f1}\u{1f1f8}',fitzpatrick_scale:!1,category:"flags"},liberia:{keywords:["lr","flag","nation","country","banner"],char:'\u{1f1f1}\u{1f1f7}',fitzpatrick_scale:!1,category:"flags"},libya:{keywords:["ly","flag","nation","country","banner"],char:'\u{1f1f1}\u{1f1fe}',fitzpatrick_scale:!1,category:"flags"},liechtenstein:{keywords:["li","flag","nation","country","banner"],char:'\u{1f1f1}\u{1f1ee}',fitzpatrick_scale:!1,category:"flags"},lithuania:{keywords:["lt","flag","nation","country","banner"],char:'\u{1f1f1}\u{1f1f9}',fitzpatrick_scale:!1,category:"flags"},luxembourg:{keywords:["lu","flag","nation","country","banner"],char:'\u{1f1f1}\u{1f1fa}',fitzpatrick_scale:!1,category:"flags"},macau:{keywords:["macao","flag","nation","country","banner"],char:'\u{1f1f2}\u{1f1f4}',fitzpatrick_scale:!1,category:"flags"},macedonia:{keywords:["macedonia,","flag","nation","country","banner"],char:'\u{1f1f2}\u{1f1f0}',fitzpatrick_scale:!1,category:"flags"},madagascar:{keywords:["mg","flag","nation","country","banner"],char:'\u{1f1f2}\u{1f1ec}',fitzpatrick_scale:!1,category:"flags"},malawi:{keywords:["mw","flag","nation","country","banner"],char:'\u{1f1f2}\u{1f1fc}',fitzpatrick_scale:!1,category:"flags"},malaysia:{keywords:["my","flag","nation","country","banner"],char:'\u{1f1f2}\u{1f1fe}',fitzpatrick_scale:!1,category:"flags"},maldives:{keywords:["mv","flag","nation","country","banner"],char:'\u{1f1f2}\u{1f1fb}',fitzpatrick_scale:!1,category:"flags"},mali:{keywords:["ml","flag","nation","country","banner"],char:'\u{1f1f2}\u{1f1f1}',fitzpatrick_scale:!1,category:"flags"},malta:{keywords:["mt","flag","nation","country","banner"],char:'\u{1f1f2}\u{1f1f9}',fitzpatrick_scale:!1,category:"flags"},marshall_islands:{keywords:["marshall","islands","flag","nation","country","banner"],char:'\u{1f1f2}\u{1f1ed}',fitzpatrick_scale:!1,category:"flags"},martinique:{keywords:["mq","flag","nation","country","banner"],char:'\u{1f1f2}\u{1f1f6}',fitzpatrick_scale:!1,category:"flags"},mauritania:{keywords:["mr","flag","nation","country","banner"],char:'\u{1f1f2}\u{1f1f7}',fitzpatrick_scale:!1,category:"flags"},mauritius:{keywords:["mu","flag","nation","country","banner"],char:'\u{1f1f2}\u{1f1fa}',fitzpatrick_scale:!1,category:"flags"},mayotte:{keywords:["yt","flag","nation","country","banner"],char:'\u{1f1fe}\u{1f1f9}',fitzpatrick_scale:!1,category:"flags"},mexico:{keywords:["mx","flag","nation","country","banner"],char:'\u{1f1f2}\u{1f1fd}',fitzpatrick_scale:!1,category:"flags"},micronesia:{keywords:["micronesia,","federated","states","flag","nation","country","banner"],char:'\u{1f1eb}\u{1f1f2}',fitzpatrick_scale:!1,category:"flags"},moldova:{keywords:["moldova,","republic","flag","nation","country","banner"],char:'\u{1f1f2}\u{1f1e9}',fitzpatrick_scale:!1,category:"flags"},monaco:{keywords:["mc","flag","nation","country","banner"],char:'\u{1f1f2}\u{1f1e8}',fitzpatrick_scale:!1,category:"flags"},mongolia:{keywords:["mn","flag","nation","country","banner"],char:'\u{1f1f2}\u{1f1f3}',fitzpatrick_scale:!1,category:"flags"},montenegro:{keywords:["me","flag","nation","country","banner"],char:'\u{1f1f2}\u{1f1ea}',fitzpatrick_scale:!1,category:"flags"},montserrat:{keywords:["ms","flag","nation","country","banner"],char:'\u{1f1f2}\u{1f1f8}',fitzpatrick_scale:!1,category:"flags"},morocco:{keywords:["ma","flag","nation","country","banner"],char:'\u{1f1f2}\u{1f1e6}',fitzpatrick_scale:!1,category:"flags"},mozambique:{keywords:["mz","flag","nation","country","banner"],char:'\u{1f1f2}\u{1f1ff}',fitzpatrick_scale:!1,category:"flags"},myanmar:{keywords:["mm","flag","nation","country","banner"],char:'\u{1f1f2}\u{1f1f2}',fitzpatrick_scale:!1,category:"flags"},namibia:{keywords:["na","flag","nation","country","banner"],char:'\u{1f1f3}\u{1f1e6}',fitzpatrick_scale:!1,category:"flags"},nauru:{keywords:["nr","flag","nation","country","banner"],char:'\u{1f1f3}\u{1f1f7}',fitzpatrick_scale:!1,category:"flags"},nepal:{keywords:["np","flag","nation","country","banner"],char:'\u{1f1f3}\u{1f1f5}',fitzpatrick_scale:!1,category:"flags"},netherlands:{keywords:["nl","flag","nation","country","banner"],char:'\u{1f1f3}\u{1f1f1}',fitzpatrick_scale:!1,category:"flags"},new_caledonia:{keywords:["new","caledonia","flag","nation","country","banner"],char:'\u{1f1f3}\u{1f1e8}',fitzpatrick_scale:!1,category:"flags"},new_zealand:{keywords:["new","zealand","flag","nation","country","banner"],char:'\u{1f1f3}\u{1f1ff}',fitzpatrick_scale:!1,category:"flags"},nicaragua:{keywords:["ni","flag","nation","country","banner"],char:'\u{1f1f3}\u{1f1ee}',fitzpatrick_scale:!1,category:"flags"},niger:{keywords:["ne","flag","nation","country","banner"],char:'\u{1f1f3}\u{1f1ea}',fitzpatrick_scale:!1,category:"flags"},nigeria:{keywords:["flag","nation","country","banner"],char:'\u{1f1f3}\u{1f1ec}',fitzpatrick_scale:!1,category:"flags"},niue:{keywords:["nu","flag","nation","country","banner"],char:'\u{1f1f3}\u{1f1fa}',fitzpatrick_scale:!1,category:"flags"},norfolk_island:{keywords:["norfolk","island","flag","nation","country","banner"],char:'\u{1f1f3}\u{1f1eb}',fitzpatrick_scale:!1,category:"flags"},northern_mariana_islands:{keywords:["northern","mariana","islands","flag","nation","country","banner"],char:'\u{1f1f2}\u{1f1f5}',fitzpatrick_scale:!1,category:"flags"},north_korea:{keywords:["north","korea","nation","flag","country","banner"],char:'\u{1f1f0}\u{1f1f5}',fitzpatrick_scale:!1,category:"flags"},norway:{keywords:["no","flag","nation","country","banner"],char:'\u{1f1f3}\u{1f1f4}',fitzpatrick_scale:!1,category:"flags"},oman:{keywords:["om_symbol","flag","nation","country","banner"],char:'\u{1f1f4}\u{1f1f2}',fitzpatrick_scale:!1,category:"flags"},pakistan:{keywords:["pk","flag","nation","country","banner"],char:'\u{1f1f5}\u{1f1f0}',fitzpatrick_scale:!1,category:"flags"},palau:{keywords:["pw","flag","nation","country","banner"],char:'\u{1f1f5}\u{1f1fc}',fitzpatrick_scale:!1,category:"flags"},palestinian_territories:{keywords:["palestine","palestinian","territories","flag","nation","country","banner"],char:'\u{1f1f5}\u{1f1f8}',fitzpatrick_scale:!1,category:"flags"},panama:{keywords:["pa","flag","nation","country","banner"],char:'\u{1f1f5}\u{1f1e6}',fitzpatrick_scale:!1,category:"flags"},papua_new_guinea:{keywords:["papua","new","guinea","flag","nation","country","banner"],char:'\u{1f1f5}\u{1f1ec}',fitzpatrick_scale:!1,category:"flags"},paraguay:{keywords:["py","flag","nation","country","banner"],char:'\u{1f1f5}\u{1f1fe}',fitzpatrick_scale:!1,category:"flags"},peru:{keywords:["pe","flag","nation","country","banner"],char:'\u{1f1f5}\u{1f1ea}',fitzpatrick_scale:!1,category:"flags"},philippines:{keywords:["ph","flag","nation","country","banner"],char:'\u{1f1f5}\u{1f1ed}',fitzpatrick_scale:!1,category:"flags"},pitcairn_islands:{keywords:["pitcairn","flag","nation","country","banner"],char:'\u{1f1f5}\u{1f1f3}',fitzpatrick_scale:!1,category:"flags"},poland:{keywords:["pl","flag","nation","country","banner"],char:'\u{1f1f5}\u{1f1f1}',fitzpatrick_scale:!1,category:"flags"},portugal:{keywords:["pt","flag","nation","country","banner"],char:'\u{1f1f5}\u{1f1f9}',fitzpatrick_scale:!1,category:"flags"},puerto_rico:{keywords:["puerto","rico","flag","nation","country","banner"],char:'\u{1f1f5}\u{1f1f7}',fitzpatrick_scale:!1,category:"flags"},qatar:{keywords:["qa","flag","nation","country","banner"],char:'\u{1f1f6}\u{1f1e6}',fitzpatrick_scale:!1,category:"flags"},reunion:{keywords:["r\xe9union","flag","nation","country","banner"],char:'\u{1f1f7}\u{1f1ea}',fitzpatrick_scale:!1,category:"flags"},romania:{keywords:["ro","flag","nation","country","banner"],char:'\u{1f1f7}\u{1f1f4}',fitzpatrick_scale:!1,category:"flags"},ru:{keywords:["russian","federation","flag","nation","country","banner"],char:'\u{1f1f7}\u{1f1fa}',fitzpatrick_scale:!1,category:"flags"},rwanda:{keywords:["rw","flag","nation","country","banner"],char:'\u{1f1f7}\u{1f1fc}',fitzpatrick_scale:!1,category:"flags"},st_barthelemy:{keywords:["saint","barth\xe9lemy","flag","nation","country","banner"],char:'\u{1f1e7}\u{1f1f1}',fitzpatrick_scale:!1,category:"flags"},st_helena:{keywords:["saint","helena","ascension","tristan","cunha","flag","nation","country","banner"],char:'\u{1f1f8}\u{1f1ed}',fitzpatrick_scale:!1,category:"flags"},st_kitts_nevis:{keywords:["saint","kitts","nevis","flag","nation","country","banner"],char:'\u{1f1f0}\u{1f1f3}',fitzpatrick_scale:!1,category:"flags"},st_lucia:{keywords:["saint","lucia","flag","nation","country","banner"],char:'\u{1f1f1}\u{1f1e8}',fitzpatrick_scale:!1,category:"flags"},st_pierre_miquelon:{keywords:["saint","pierre","miquelon","flag","nation","country","banner"],char:'\u{1f1f5}\u{1f1f2}',fitzpatrick_scale:!1,category:"flags"},st_vincent_grenadines:{keywords:["saint","vincent","grenadines","flag","nation","country","banner"],char:'\u{1f1fb}\u{1f1e8}',fitzpatrick_scale:!1,category:"flags"},samoa:{keywords:["ws","flag","nation","country","banner"],char:'\u{1f1fc}\u{1f1f8}',fitzpatrick_scale:!1,category:"flags"},san_marino:{keywords:["san","marino","flag","nation","country","banner"],char:'\u{1f1f8}\u{1f1f2}',fitzpatrick_scale:!1,category:"flags"},sao_tome_principe:{keywords:["sao","tome","principe","flag","nation","country","banner"],char:'\u{1f1f8}\u{1f1f9}',fitzpatrick_scale:!1,category:"flags"},saudi_arabia:{keywords:["flag","nation","country","banner"],char:'\u{1f1f8}\u{1f1e6}',fitzpatrick_scale:!1,category:"flags"},senegal:{keywords:["sn","flag","nation","country","banner"],char:'\u{1f1f8}\u{1f1f3}',fitzpatrick_scale:!1,category:"flags"},serbia:{keywords:["rs","flag","nation","country","banner"],char:'\u{1f1f7}\u{1f1f8}',fitzpatrick_scale:!1,category:"flags"},seychelles:{keywords:["sc","flag","nation","country","banner"],char:'\u{1f1f8}\u{1f1e8}',fitzpatrick_scale:!1,category:"flags"},sierra_leone:{keywords:["sierra","leone","flag","nation","country","banner"],char:'\u{1f1f8}\u{1f1f1}',fitzpatrick_scale:!1,category:"flags"},singapore:{keywords:["sg","flag","nation","country","banner"],char:'\u{1f1f8}\u{1f1ec}',fitzpatrick_scale:!1,category:"flags"},sint_maarten:{keywords:["sint","maarten","dutch","flag","nation","country","banner"],char:'\u{1f1f8}\u{1f1fd}',fitzpatrick_scale:!1,category:"flags"},slovakia:{keywords:["sk","flag","nation","country","banner"],char:'\u{1f1f8}\u{1f1f0}',fitzpatrick_scale:!1,category:"flags"},slovenia:{keywords:["si","flag","nation","country","banner"],char:'\u{1f1f8}\u{1f1ee}',fitzpatrick_scale:!1,category:"flags"},solomon_islands:{keywords:["solomon","islands","flag","nation","country","banner"],char:'\u{1f1f8}\u{1f1e7}',fitzpatrick_scale:!1,category:"flags"},somalia:{keywords:["so","flag","nation","country","banner"],char:'\u{1f1f8}\u{1f1f4}',fitzpatrick_scale:!1,category:"flags"},south_africa:{keywords:["south","africa","flag","nation","country","banner"],char:'\u{1f1ff}\u{1f1e6}',fitzpatrick_scale:!1,category:"flags"},south_georgia_south_sandwich_islands:{keywords:["south","georgia","sandwich","islands","flag","nation","country","banner"],char:'\u{1f1ec}\u{1f1f8}',fitzpatrick_scale:!1,category:"flags"},kr:{keywords:["south","korea","nation","flag","country","banner"],char:'\u{1f1f0}\u{1f1f7}',fitzpatrick_scale:!1,category:"flags"},south_sudan:{keywords:["south","sd","flag","nation","country","banner"],char:'\u{1f1f8}\u{1f1f8}',fitzpatrick_scale:!1,category:"flags"},es:{keywords:["spain","flag","nation","country","banner"],char:'\u{1f1ea}\u{1f1f8}',fitzpatrick_scale:!1,category:"flags"},sri_lanka:{keywords:["sri","lanka","flag","nation","country","banner"],char:'\u{1f1f1}\u{1f1f0}',fitzpatrick_scale:!1,category:"flags"},sudan:{keywords:["sd","flag","nation","country","banner"],char:'\u{1f1f8}\u{1f1e9}',fitzpatrick_scale:!1,category:"flags"},suriname:{keywords:["sr","flag","nation","country","banner"],char:'\u{1f1f8}\u{1f1f7}',fitzpatrick_scale:!1,category:"flags"},swaziland:{keywords:["sz","flag","nation","country","banner"],char:'\u{1f1f8}\u{1f1ff}',fitzpatrick_scale:!1,category:"flags"},sweden:{keywords:["se","flag","nation","country","banner"],char:'\u{1f1f8}\u{1f1ea}',fitzpatrick_scale:!1,category:"flags"},switzerland:{keywords:["ch","flag","nation","country","banner"],char:'\u{1f1e8}\u{1f1ed}',fitzpatrick_scale:!1,category:"flags"},syria:{keywords:["syrian","arab","republic","flag","nation","country","banner"],char:'\u{1f1f8}\u{1f1fe}',fitzpatrick_scale:!1,category:"flags"},taiwan:{keywords:["tw","flag","nation","country","banner"],char:'\u{1f1f9}\u{1f1fc}',fitzpatrick_scale:!1,category:"flags"},tajikistan:{keywords:["tj","flag","nation","country","banner"],char:'\u{1f1f9}\u{1f1ef}',fitzpatrick_scale:!1,category:"flags"},tanzania:{keywords:["tanzania,","united","republic","flag","nation","country","banner"],char:'\u{1f1f9}\u{1f1ff}',fitzpatrick_scale:!1,category:"flags"},thailand:{keywords:["th","flag","nation","country","banner"],char:'\u{1f1f9}\u{1f1ed}',fitzpatrick_scale:!1,category:"flags"},timor_leste:{keywords:["timor","leste","flag","nation","country","banner"],char:'\u{1f1f9}\u{1f1f1}',fitzpatrick_scale:!1,category:"flags"},togo:{keywords:["tg","flag","nation","country","banner"],char:'\u{1f1f9}\u{1f1ec}',fitzpatrick_scale:!1,category:"flags"},tokelau:{keywords:["tk","flag","nation","country","banner"],char:'\u{1f1f9}\u{1f1f0}',fitzpatrick_scale:!1,category:"flags"},tonga:{keywords:["to","flag","nation","country","banner"],char:'\u{1f1f9}\u{1f1f4}',fitzpatrick_scale:!1,category:"flags"},trinidad_tobago:{keywords:["trinidad","tobago","flag","nation","country","banner"],char:'\u{1f1f9}\u{1f1f9}',fitzpatrick_scale:!1,category:"flags"},tunisia:{keywords:["tn","flag","nation","country","banner"],char:'\u{1f1f9}\u{1f1f3}',fitzpatrick_scale:!1,category:"flags"},tr:{keywords:["turkey","flag","nation","country","banner"],char:'\u{1f1f9}\u{1f1f7}',fitzpatrick_scale:!1,category:"flags"},turkmenistan:{keywords:["flag","nation","country","banner"],char:'\u{1f1f9}\u{1f1f2}',fitzpatrick_scale:!1,category:"flags"},turks_caicos_islands:{keywords:["turks","caicos","islands","flag","nation","country","banner"],char:'\u{1f1f9}\u{1f1e8}',fitzpatrick_scale:!1,category:"flags"},tuvalu:{keywords:["flag","nation","country","banner"],char:'\u{1f1f9}\u{1f1fb}',fitzpatrick_scale:!1,category:"flags"},uganda:{keywords:["ug","flag","nation","country","banner"],char:'\u{1f1fa}\u{1f1ec}',fitzpatrick_scale:!1,category:"flags"},ukraine:{keywords:["ua","flag","nation","country","banner"],char:'\u{1f1fa}\u{1f1e6}',fitzpatrick_scale:!1,category:"flags"},united_arab_emirates:{keywords:["united","arab","emirates","flag","nation","country","banner"],char:'\u{1f1e6}\u{1f1ea}',fitzpatrick_scale:!1,category:"flags"},uk:{keywords:["united","kingdom","great","britain","northern","ireland","flag","nation","country","banner","british","UK","english","england","union jack"],char:'\u{1f1ec}\u{1f1e7}',fitzpatrick_scale:!1,category:"flags"},england:{keywords:["flag","english"],char:'\u{1f3f4}\u{e0067}\u{e0062}\u{e0065}\u{e006e}\u{e0067}\u{e007f}',fitzpatrick_scale:!1,category:"flags"},scotland:{keywords:["flag","scottish"],char:'\u{1f3f4}\u{e0067}\u{e0062}\u{e0073}\u{e0063}\u{e0074}\u{e007f}',fitzpatrick_scale:!1,category:"flags"},wales:{keywords:["flag","welsh"],char:'\u{1f3f4}\u{e0067}\u{e0062}\u{e0077}\u{e006c}\u{e0073}\u{e007f}',fitzpatrick_scale:!1,category:"flags"},us:{keywords:["united","states","america","flag","nation","country","banner"],char:'\u{1f1fa}\u{1f1f8}',fitzpatrick_scale:!1,category:"flags"},us_virgin_islands:{keywords:["virgin","islands","us","flag","nation","country","banner"],char:'\u{1f1fb}\u{1f1ee}',fitzpatrick_scale:!1,category:"flags"},uruguay:{keywords:["uy","flag","nation","country","banner"],char:'\u{1f1fa}\u{1f1fe}',fitzpatrick_scale:!1,category:"flags"},uzbekistan:{keywords:["uz","flag","nation","country","banner"],char:'\u{1f1fa}\u{1f1ff}',fitzpatrick_scale:!1,category:"flags"},vanuatu:{keywords:["vu","flag","nation","country","banner"],char:'\u{1f1fb}\u{1f1fa}',fitzpatrick_scale:!1,category:"flags"},vatican_city:{keywords:["vatican","city","flag","nation","country","banner"],char:'\u{1f1fb}\u{1f1e6}',fitzpatrick_scale:!1,category:"flags"},venezuela:{keywords:["ve","bolivarian","republic","flag","nation","country","banner"],char:'\u{1f1fb}\u{1f1ea}',fitzpatrick_scale:!1,category:"flags"},vietnam:{keywords:["viet","nam","flag","nation","country","banner"],char:'\u{1f1fb}\u{1f1f3}',fitzpatrick_scale:!1,category:"flags"},wallis_futuna:{keywords:["wallis","futuna","flag","nation","country","banner"],char:'\u{1f1fc}\u{1f1eb}',fitzpatrick_scale:!1,category:"flags"},western_sahara:{keywords:["western","sahara","flag","nation","country","banner"],char:'\u{1f1ea}\u{1f1ed}',fitzpatrick_scale:!1,category:"flags"},yemen:{keywords:["ye","flag","nation","country","banner"],char:'\u{1f1fe}\u{1f1ea}',fitzpatrick_scale:!1,category:"flags"},zambia:{keywords:["zm","flag","nation","country","banner"],char:'\u{1f1ff}\u{1f1f2}',fitzpatrick_scale:!1,category:"flags"},zimbabwe:{keywords:["zw","flag","nation","country","banner"],char:'\u{1f1ff}\u{1f1fc}',fitzpatrick_scale:!1,category:"flags"},united_nations:{keywords:["un","flag","banner"],char:'\u{1f1fa}\u{1f1f3}',fitzpatrick_scale:!1,category:"flags"},pirate_flag:{keywords:["skull","crossbones","flag","banner"],char:'\u{1f3f4}\u200d\u2620\ufe0f',fitzpatrick_scale:!1,category:"flags"}}); \ No newline at end of file diff --git a/vendor/tinymce/tinymce/plugins/emoticons/js/emojis.js b/vendor/tinymce/tinymce/plugins/emoticons/js/emojis.js new file mode 100644 index 00000000..88455e9a --- /dev/null +++ b/vendor/tinymce/tinymce/plugins/emoticons/js/emojis.js @@ -0,0 +1 @@ +window.tinymce.Resource.add("tinymce.plugins.emoticons",{grinning:{keywords:["face","smile","happy","joy",":D","grin"],char:"😀",fitzpatrick_scale:false,category:"people"},grimacing:{keywords:["face","grimace","teeth"],char:"😬",fitzpatrick_scale:false,category:"people"},grin:{keywords:["face","happy","smile","joy","kawaii"],char:"😁",fitzpatrick_scale:false,category:"people"},joy:{keywords:["face","cry","tears","weep","happy","happytears","haha"],char:"😂",fitzpatrick_scale:false,category:"people"},rofl:{keywords:["face","rolling","floor","laughing","lol","haha"],char:"🤣",fitzpatrick_scale:false,category:"people"},partying:{keywords:["face","celebration","woohoo"],char:"🥳",fitzpatrick_scale:false,category:"people"},smiley:{keywords:["face","happy","joy","haha",":D",":)","smile","funny"],char:"😃",fitzpatrick_scale:false,category:"people"},smile:{keywords:["face","happy","joy","funny","haha","laugh","like",":D",":)"],char:"😄",fitzpatrick_scale:false,category:"people"},sweat_smile:{keywords:["face","hot","happy","laugh","sweat","smile","relief"],char:"😅",fitzpatrick_scale:false,category:"people"},laughing:{keywords:["happy","joy","lol","satisfied","haha","face","glad","XD","laugh"],char:"😆",fitzpatrick_scale:false,category:"people"},innocent:{keywords:["face","angel","heaven","halo"],char:"😇",fitzpatrick_scale:false,category:"people"},wink:{keywords:["face","happy","mischievous","secret",";)","smile","eye"],char:"😉",fitzpatrick_scale:false,category:"people"},blush:{keywords:["face","smile","happy","flushed","crush","embarrassed","shy","joy"],char:"😊",fitzpatrick_scale:false,category:"people"},slightly_smiling_face:{keywords:["face","smile"],char:"🙂",fitzpatrick_scale:false,category:"people"},upside_down_face:{keywords:["face","flipped","silly","smile"],char:"🙃",fitzpatrick_scale:false,category:"people"},relaxed:{keywords:["face","blush","massage","happiness"],char:"☺️",fitzpatrick_scale:false,category:"people"},yum:{keywords:["happy","joy","tongue","smile","face","silly","yummy","nom","delicious","savouring"],char:"😋",fitzpatrick_scale:false,category:"people"},relieved:{keywords:["face","relaxed","phew","massage","happiness"],char:"😌",fitzpatrick_scale:false,category:"people"},heart_eyes:{keywords:["face","love","like","affection","valentines","infatuation","crush","heart"],char:"😍",fitzpatrick_scale:false,category:"people"},smiling_face_with_three_hearts:{keywords:["face","love","like","affection","valentines","infatuation","crush","hearts","adore"],char:"🥰",fitzpatrick_scale:false,category:"people"},kissing_heart:{keywords:["face","love","like","affection","valentines","infatuation","kiss"],char:"😘",fitzpatrick_scale:false,category:"people"},kissing:{keywords:["love","like","face","3","valentines","infatuation","kiss"],char:"😗",fitzpatrick_scale:false,category:"people"},kissing_smiling_eyes:{keywords:["face","affection","valentines","infatuation","kiss"],char:"😙",fitzpatrick_scale:false,category:"people"},kissing_closed_eyes:{keywords:["face","love","like","affection","valentines","infatuation","kiss"],char:"😚",fitzpatrick_scale:false,category:"people"},stuck_out_tongue_winking_eye:{keywords:["face","prank","childish","playful","mischievous","smile","wink","tongue"],char:"😜",fitzpatrick_scale:false,category:"people"},zany:{keywords:["face","goofy","crazy"],char:"🤪",fitzpatrick_scale:false,category:"people"},raised_eyebrow:{keywords:["face","distrust","scepticism","disapproval","disbelief","surprise"],char:"🤨",fitzpatrick_scale:false,category:"people"},monocle:{keywords:["face","stuffy","wealthy"],char:"🧐",fitzpatrick_scale:false,category:"people"},stuck_out_tongue_closed_eyes:{keywords:["face","prank","playful","mischievous","smile","tongue"],char:"😝",fitzpatrick_scale:false,category:"people"},stuck_out_tongue:{keywords:["face","prank","childish","playful","mischievous","smile","tongue"],char:"😛",fitzpatrick_scale:false,category:"people"},money_mouth_face:{keywords:["face","rich","dollar","money"],char:"🤑",fitzpatrick_scale:false,category:"people"},nerd_face:{keywords:["face","nerdy","geek","dork"],char:"🤓",fitzpatrick_scale:false,category:"people"},sunglasses:{keywords:["face","cool","smile","summer","beach","sunglass"],char:"😎",fitzpatrick_scale:false,category:"people"},star_struck:{keywords:["face","smile","starry","eyes","grinning"],char:"🤩",fitzpatrick_scale:false,category:"people"},clown_face:{keywords:["face"],char:"🤡",fitzpatrick_scale:false,category:"people"},cowboy_hat_face:{keywords:["face","cowgirl","hat"],char:"🤠",fitzpatrick_scale:false,category:"people"},hugs:{keywords:["face","smile","hug"],char:"🤗",fitzpatrick_scale:false,category:"people"},smirk:{keywords:["face","smile","mean","prank","smug","sarcasm"],char:"😏",fitzpatrick_scale:false,category:"people"},no_mouth:{keywords:["face","hellokitty"],char:"😶",fitzpatrick_scale:false,category:"people"},neutral_face:{keywords:["indifference","meh",":|","neutral"],char:"😐",fitzpatrick_scale:false,category:"people"},expressionless:{keywords:["face","indifferent","-_-","meh","deadpan"],char:"😑",fitzpatrick_scale:false,category:"people"},unamused:{keywords:["indifference","bored","straight face","serious","sarcasm","unimpressed","skeptical","dubious","side_eye"],char:"😒",fitzpatrick_scale:false,category:"people"},roll_eyes:{keywords:["face","eyeroll","frustrated"],char:"🙄",fitzpatrick_scale:false,category:"people"},thinking:{keywords:["face","hmmm","think","consider"],char:"🤔",fitzpatrick_scale:false,category:"people"},lying_face:{keywords:["face","lie","pinocchio"],char:"🤥",fitzpatrick_scale:false,category:"people"},hand_over_mouth:{keywords:["face","whoops","shock","surprise"],char:"🤭",fitzpatrick_scale:false,category:"people"},shushing:{keywords:["face","quiet","shhh"],char:"🤫",fitzpatrick_scale:false,category:"people"},symbols_over_mouth:{keywords:["face","swearing","cursing","cussing","profanity","expletive"],char:"🤬",fitzpatrick_scale:false,category:"people"},exploding_head:{keywords:["face","shocked","mind","blown"],char:"🤯",fitzpatrick_scale:false,category:"people"},flushed:{keywords:["face","blush","shy","flattered"],char:"😳",fitzpatrick_scale:false,category:"people"},disappointed:{keywords:["face","sad","upset","depressed",":("],char:"😞",fitzpatrick_scale:false,category:"people"},worried:{keywords:["face","concern","nervous",":("],char:"😟",fitzpatrick_scale:false,category:"people"},angry:{keywords:["mad","face","annoyed","frustrated"],char:"😠",fitzpatrick_scale:false,category:"people"},rage:{keywords:["angry","mad","hate","despise"],char:"😡",fitzpatrick_scale:false,category:"people"},pensive:{keywords:["face","sad","depressed","upset"],char:"😔",fitzpatrick_scale:false,category:"people"},confused:{keywords:["face","indifference","huh","weird","hmmm",":/"],char:"😕",fitzpatrick_scale:false,category:"people"},slightly_frowning_face:{keywords:["face","frowning","disappointed","sad","upset"],char:"🙁",fitzpatrick_scale:false,category:"people"},frowning_face:{keywords:["face","sad","upset","frown"],char:"☹",fitzpatrick_scale:false,category:"people"},persevere:{keywords:["face","sick","no","upset","oops"],char:"😣",fitzpatrick_scale:false,category:"people"},confounded:{keywords:["face","confused","sick","unwell","oops",":S"],char:"😖",fitzpatrick_scale:false,category:"people"},tired_face:{keywords:["sick","whine","upset","frustrated"],char:"😫",fitzpatrick_scale:false,category:"people"},weary:{keywords:["face","tired","sleepy","sad","frustrated","upset"],char:"😩",fitzpatrick_scale:false,category:"people"},pleading:{keywords:["face","begging","mercy"],char:"🥺",fitzpatrick_scale:false,category:"people"},triumph:{keywords:["face","gas","phew","proud","pride"],char:"😤",fitzpatrick_scale:false,category:"people"},open_mouth:{keywords:["face","surprise","impressed","wow","whoa",":O"],char:"😮",fitzpatrick_scale:false,category:"people"},scream:{keywords:["face","munch","scared","omg"],char:"😱",fitzpatrick_scale:false,category:"people"},fearful:{keywords:["face","scared","terrified","nervous","oops","huh"],char:"😨",fitzpatrick_scale:false,category:"people"},cold_sweat:{keywords:["face","nervous","sweat"],char:"😰",fitzpatrick_scale:false,category:"people"},hushed:{keywords:["face","woo","shh"],char:"😯",fitzpatrick_scale:false,category:"people"},frowning:{keywords:["face","aw","what"],char:"😦",fitzpatrick_scale:false,category:"people"},anguished:{keywords:["face","stunned","nervous"],char:"😧",fitzpatrick_scale:false,category:"people"},cry:{keywords:["face","tears","sad","depressed","upset",":'("],char:"😢",fitzpatrick_scale:false,category:"people"},disappointed_relieved:{keywords:["face","phew","sweat","nervous"],char:"😥",fitzpatrick_scale:false,category:"people"},drooling_face:{keywords:["face"],char:"🤤",fitzpatrick_scale:false,category:"people"},sleepy:{keywords:["face","tired","rest","nap"],char:"😪",fitzpatrick_scale:false,category:"people"},sweat:{keywords:["face","hot","sad","tired","exercise"],char:"😓",fitzpatrick_scale:false,category:"people"},hot:{keywords:["face","feverish","heat","red","sweating"],char:"🥵",fitzpatrick_scale:false,category:"people"},cold:{keywords:["face","blue","freezing","frozen","frostbite","icicles"],char:"🥶",fitzpatrick_scale:false,category:"people"},sob:{keywords:["face","cry","tears","sad","upset","depressed"],char:"😭",fitzpatrick_scale:false,category:"people"},dizzy_face:{keywords:["spent","unconscious","xox","dizzy"],char:"😵",fitzpatrick_scale:false,category:"people"},astonished:{keywords:["face","xox","surprised","poisoned"],char:"😲",fitzpatrick_scale:false,category:"people"},zipper_mouth_face:{keywords:["face","sealed","zipper","secret"],char:"🤐",fitzpatrick_scale:false,category:"people"},nauseated_face:{keywords:["face","vomit","gross","green","sick","throw up","ill"],char:"🤢",fitzpatrick_scale:false,category:"people"},sneezing_face:{keywords:["face","gesundheit","sneeze","sick","allergy"],char:"🤧",fitzpatrick_scale:false,category:"people"},vomiting:{keywords:["face","sick"],char:"🤮",fitzpatrick_scale:false,category:"people"},mask:{keywords:["face","sick","ill","disease"],char:"😷",fitzpatrick_scale:false,category:"people"},face_with_thermometer:{keywords:["sick","temperature","thermometer","cold","fever"],char:"🤒",fitzpatrick_scale:false,category:"people"},face_with_head_bandage:{keywords:["injured","clumsy","bandage","hurt"],char:"🤕",fitzpatrick_scale:false,category:"people"},woozy:{keywords:["face","dizzy","intoxicated","tipsy","wavy"],char:"🥴",fitzpatrick_scale:false,category:"people"},sleeping:{keywords:["face","tired","sleepy","night","zzz"],char:"😴",fitzpatrick_scale:false,category:"people"},zzz:{keywords:["sleepy","tired","dream"],char:"💤",fitzpatrick_scale:false,category:"people"},poop:{keywords:["hankey","shitface","fail","turd","shit"],char:"💩",fitzpatrick_scale:false,category:"people"},smiling_imp:{keywords:["devil","horns"],char:"😈",fitzpatrick_scale:false,category:"people"},imp:{keywords:["devil","angry","horns"],char:"👿",fitzpatrick_scale:false,category:"people"},japanese_ogre:{keywords:["monster","red","mask","halloween","scary","creepy","devil","demon","japanese","ogre"],char:"👹",fitzpatrick_scale:false,category:"people"},japanese_goblin:{keywords:["red","evil","mask","monster","scary","creepy","japanese","goblin"],char:"👺",fitzpatrick_scale:false,category:"people"},skull:{keywords:["dead","skeleton","creepy","death"],char:"💀",fitzpatrick_scale:false,category:"people"},ghost:{keywords:["halloween","spooky","scary"],char:"👻",fitzpatrick_scale:false,category:"people"},alien:{keywords:["UFO","paul","weird","outer_space"],char:"👽",fitzpatrick_scale:false,category:"people"},robot:{keywords:["computer","machine","bot"],char:"🤖",fitzpatrick_scale:false,category:"people"},smiley_cat:{keywords:["animal","cats","happy","smile"],char:"😺",fitzpatrick_scale:false,category:"people"},smile_cat:{keywords:["animal","cats","smile"],char:"😸",fitzpatrick_scale:false,category:"people"},joy_cat:{keywords:["animal","cats","haha","happy","tears"],char:"😹",fitzpatrick_scale:false,category:"people"},heart_eyes_cat:{keywords:["animal","love","like","affection","cats","valentines","heart"],char:"😻",fitzpatrick_scale:false,category:"people"},smirk_cat:{keywords:["animal","cats","smirk"],char:"😼",fitzpatrick_scale:false,category:"people"},kissing_cat:{keywords:["animal","cats","kiss"],char:"😽",fitzpatrick_scale:false,category:"people"},scream_cat:{keywords:["animal","cats","munch","scared","scream"],char:"🙀",fitzpatrick_scale:false,category:"people"},crying_cat_face:{keywords:["animal","tears","weep","sad","cats","upset","cry"],char:"😿",fitzpatrick_scale:false,category:"people"},pouting_cat:{keywords:["animal","cats"],char:"😾",fitzpatrick_scale:false,category:"people"},palms_up:{keywords:["hands","gesture","cupped","prayer"],char:"🤲",fitzpatrick_scale:true,category:"people"},raised_hands:{keywords:["gesture","hooray","yea","celebration","hands"],char:"🙌",fitzpatrick_scale:true,category:"people"},clap:{keywords:["hands","praise","applause","congrats","yay"],char:"👏",fitzpatrick_scale:true,category:"people"},wave:{keywords:["hands","gesture","goodbye","solong","farewell","hello","hi","palm"],char:"👋",fitzpatrick_scale:true,category:"people"},call_me_hand:{keywords:["hands","gesture"],char:"🤙",fitzpatrick_scale:true,category:"people"},"+1":{keywords:["thumbsup","yes","awesome","good","agree","accept","cool","hand","like"],char:"👍",fitzpatrick_scale:true,category:"people"},"-1":{keywords:["thumbsdown","no","dislike","hand"],char:"👎",fitzpatrick_scale:true,category:"people"},facepunch:{keywords:["angry","violence","fist","hit","attack","hand"],char:"👊",fitzpatrick_scale:true,category:"people"},fist:{keywords:["fingers","hand","grasp"],char:"✊",fitzpatrick_scale:true,category:"people"},fist_left:{keywords:["hand","fistbump"],char:"🤛",fitzpatrick_scale:true,category:"people"},fist_right:{keywords:["hand","fistbump"],char:"🤜",fitzpatrick_scale:true,category:"people"},v:{keywords:["fingers","ohyeah","hand","peace","victory","two"],char:"✌",fitzpatrick_scale:true,category:"people"},ok_hand:{keywords:["fingers","limbs","perfect","ok","okay"],char:"👌",fitzpatrick_scale:true,category:"people"},raised_hand:{keywords:["fingers","stop","highfive","palm","ban"],char:"✋",fitzpatrick_scale:true,category:"people"},raised_back_of_hand:{keywords:["fingers","raised","backhand"],char:"🤚",fitzpatrick_scale:true,category:"people"},open_hands:{keywords:["fingers","butterfly","hands","open"],char:"👐",fitzpatrick_scale:true,category:"people"},muscle:{keywords:["arm","flex","hand","summer","strong","biceps"],char:"💪",fitzpatrick_scale:true,category:"people"},pray:{keywords:["please","hope","wish","namaste","highfive"],char:"🙏",fitzpatrick_scale:true,category:"people"},foot:{keywords:["kick","stomp"],char:"🦶",fitzpatrick_scale:true,category:"people"},leg:{keywords:["kick","limb"],char:"🦵",fitzpatrick_scale:true,category:"people"},handshake:{keywords:["agreement","shake"],char:"🤝",fitzpatrick_scale:false,category:"people"},point_up:{keywords:["hand","fingers","direction","up"],char:"☝",fitzpatrick_scale:true,category:"people"},point_up_2:{keywords:["fingers","hand","direction","up"],char:"👆",fitzpatrick_scale:true,category:"people"},point_down:{keywords:["fingers","hand","direction","down"],char:"👇",fitzpatrick_scale:true,category:"people"},point_left:{keywords:["direction","fingers","hand","left"],char:"👈",fitzpatrick_scale:true,category:"people"},point_right:{keywords:["fingers","hand","direction","right"],char:"👉",fitzpatrick_scale:true,category:"people"},fu:{keywords:["hand","fingers","rude","middle","flipping"],char:"🖕",fitzpatrick_scale:true,category:"people"},raised_hand_with_fingers_splayed:{keywords:["hand","fingers","palm"],char:"🖐",fitzpatrick_scale:true,category:"people"},love_you:{keywords:["hand","fingers","gesture"],char:"🤟",fitzpatrick_scale:true,category:"people"},metal:{keywords:["hand","fingers","evil_eye","sign_of_horns","rock_on"],char:"🤘",fitzpatrick_scale:true,category:"people"},crossed_fingers:{keywords:["good","lucky"],char:"🤞",fitzpatrick_scale:true,category:"people"},vulcan_salute:{keywords:["hand","fingers","spock","star trek"],char:"🖖",fitzpatrick_scale:true,category:"people"},writing_hand:{keywords:["lower_left_ballpoint_pen","stationery","write","compose"],char:"✍",fitzpatrick_scale:true,category:"people"},selfie:{keywords:["camera","phone"],char:"🤳",fitzpatrick_scale:true,category:"people"},nail_care:{keywords:["beauty","manicure","finger","fashion","nail"],char:"💅",fitzpatrick_scale:true,category:"people"},lips:{keywords:["mouth","kiss"],char:"👄",fitzpatrick_scale:false,category:"people"},tooth:{keywords:["teeth","dentist"],char:"🦷",fitzpatrick_scale:false,category:"people"},tongue:{keywords:["mouth","playful"],char:"👅",fitzpatrick_scale:false,category:"people"},ear:{keywords:["face","hear","sound","listen"],char:"👂",fitzpatrick_scale:true,category:"people"},nose:{keywords:["smell","sniff"],char:"👃",fitzpatrick_scale:true,category:"people"},eye:{keywords:["face","look","see","watch","stare"],char:"👁",fitzpatrick_scale:false,category:"people"},eyes:{keywords:["look","watch","stalk","peek","see"],char:"👀",fitzpatrick_scale:false,category:"people"},brain:{keywords:["smart","intelligent"],char:"🧠",fitzpatrick_scale:false,category:"people"},bust_in_silhouette:{keywords:["user","person","human"],char:"👤",fitzpatrick_scale:false,category:"people"},busts_in_silhouette:{keywords:["user","person","human","group","team"],char:"👥",fitzpatrick_scale:false,category:"people"},speaking_head:{keywords:["user","person","human","sing","say","talk"],char:"🗣",fitzpatrick_scale:false,category:"people"},baby:{keywords:["child","boy","girl","toddler"],char:"👶",fitzpatrick_scale:true,category:"people"},child:{keywords:["gender-neutral","young"],char:"🧒",fitzpatrick_scale:true,category:"people"},boy:{keywords:["man","male","guy","teenager"],char:"👦",fitzpatrick_scale:true,category:"people"},girl:{keywords:["female","woman","teenager"],char:"👧",fitzpatrick_scale:true,category:"people"},adult:{keywords:["gender-neutral","person"],char:"🧑",fitzpatrick_scale:true,category:"people"},man:{keywords:["mustache","father","dad","guy","classy","sir","moustache"],char:"👨",fitzpatrick_scale:true,category:"people"},woman:{keywords:["female","girls","lady"],char:"👩",fitzpatrick_scale:true,category:"people"},blonde_woman:{keywords:["woman","female","girl","blonde","person"],char:"👱‍♀️",fitzpatrick_scale:true,category:"people"},blonde_man:{keywords:["man","male","boy","blonde","guy","person"],char:"👱",fitzpatrick_scale:true,category:"people"},bearded_person:{keywords:["person","bewhiskered"],char:"🧔",fitzpatrick_scale:true,category:"people"},older_adult:{keywords:["human","elder","senior","gender-neutral"],char:"🧓",fitzpatrick_scale:true,category:"people"},older_man:{keywords:["human","male","men","old","elder","senior"],char:"👴",fitzpatrick_scale:true,category:"people"},older_woman:{keywords:["human","female","women","lady","old","elder","senior"],char:"👵",fitzpatrick_scale:true,category:"people"},man_with_gua_pi_mao:{keywords:["male","boy","chinese"],char:"👲",fitzpatrick_scale:true,category:"people"},woman_with_headscarf:{keywords:["female","hijab","mantilla","tichel"],char:"🧕",fitzpatrick_scale:true,category:"people"},woman_with_turban:{keywords:["female","indian","hinduism","arabs","woman"],char:"👳‍♀️",fitzpatrick_scale:true,category:"people"},man_with_turban:{keywords:["male","indian","hinduism","arabs"],char:"👳",fitzpatrick_scale:true,category:"people"},policewoman:{keywords:["woman","police","law","legal","enforcement","arrest","911","female"],char:"👮‍♀️",fitzpatrick_scale:true,category:"people"},policeman:{keywords:["man","police","law","legal","enforcement","arrest","911"],char:"👮",fitzpatrick_scale:true,category:"people"},construction_worker_woman:{keywords:["female","human","wip","build","construction","worker","labor","woman"],char:"👷‍♀️",fitzpatrick_scale:true,category:"people"},construction_worker_man:{keywords:["male","human","wip","guy","build","construction","worker","labor"],char:"👷",fitzpatrick_scale:true,category:"people"},guardswoman:{keywords:["uk","gb","british","female","royal","woman"],char:"💂‍♀️",fitzpatrick_scale:true,category:"people"},guardsman:{keywords:["uk","gb","british","male","guy","royal"],char:"💂",fitzpatrick_scale:true,category:"people"},female_detective:{keywords:["human","spy","detective","female","woman"],char:"🕵️‍♀️",fitzpatrick_scale:true,category:"people"},male_detective:{keywords:["human","spy","detective"],char:"🕵",fitzpatrick_scale:true,category:"people"},woman_health_worker:{keywords:["doctor","nurse","therapist","healthcare","woman","human"],char:"👩‍⚕️",fitzpatrick_scale:true,category:"people"},man_health_worker:{keywords:["doctor","nurse","therapist","healthcare","man","human"],char:"👨‍⚕️",fitzpatrick_scale:true,category:"people"},woman_farmer:{keywords:["rancher","gardener","woman","human"],char:"👩‍🌾",fitzpatrick_scale:true,category:"people"},man_farmer:{keywords:["rancher","gardener","man","human"],char:"👨‍🌾",fitzpatrick_scale:true,category:"people"},woman_cook:{keywords:["chef","woman","human"],char:"👩‍🍳",fitzpatrick_scale:true,category:"people"},man_cook:{keywords:["chef","man","human"],char:"👨‍🍳",fitzpatrick_scale:true,category:"people"},woman_student:{keywords:["graduate","woman","human"],char:"👩‍🎓",fitzpatrick_scale:true,category:"people"},man_student:{keywords:["graduate","man","human"],char:"👨‍🎓",fitzpatrick_scale:true,category:"people"},woman_singer:{keywords:["rockstar","entertainer","woman","human"],char:"👩‍🎤",fitzpatrick_scale:true,category:"people"},man_singer:{keywords:["rockstar","entertainer","man","human"],char:"👨‍🎤",fitzpatrick_scale:true,category:"people"},woman_teacher:{keywords:["instructor","professor","woman","human"],char:"👩‍🏫",fitzpatrick_scale:true,category:"people"},man_teacher:{keywords:["instructor","professor","man","human"],char:"👨‍🏫",fitzpatrick_scale:true,category:"people"},woman_factory_worker:{keywords:["assembly","industrial","woman","human"],char:"👩‍🏭",fitzpatrick_scale:true,category:"people"},man_factory_worker:{keywords:["assembly","industrial","man","human"],char:"👨‍🏭",fitzpatrick_scale:true,category:"people"},woman_technologist:{keywords:["coder","developer","engineer","programmer","software","woman","human","laptop","computer"],char:"👩‍💻",fitzpatrick_scale:true,category:"people"},man_technologist:{keywords:["coder","developer","engineer","programmer","software","man","human","laptop","computer"],char:"👨‍💻",fitzpatrick_scale:true,category:"people"},woman_office_worker:{keywords:["business","manager","woman","human"],char:"👩‍💼",fitzpatrick_scale:true,category:"people"},man_office_worker:{keywords:["business","manager","man","human"],char:"👨‍💼",fitzpatrick_scale:true,category:"people"},woman_mechanic:{keywords:["plumber","woman","human","wrench"],char:"👩‍🔧",fitzpatrick_scale:true,category:"people"},man_mechanic:{keywords:["plumber","man","human","wrench"],char:"👨‍🔧",fitzpatrick_scale:true,category:"people"},woman_scientist:{keywords:["biologist","chemist","engineer","physicist","woman","human"],char:"👩‍🔬",fitzpatrick_scale:true,category:"people"},man_scientist:{keywords:["biologist","chemist","engineer","physicist","man","human"],char:"👨‍🔬",fitzpatrick_scale:true,category:"people"},woman_artist:{keywords:["painter","woman","human"],char:"👩‍🎨",fitzpatrick_scale:true,category:"people"},man_artist:{keywords:["painter","man","human"],char:"👨‍🎨",fitzpatrick_scale:true,category:"people"},woman_firefighter:{keywords:["fireman","woman","human"],char:"👩‍🚒",fitzpatrick_scale:true,category:"people"},man_firefighter:{keywords:["fireman","man","human"],char:"👨‍🚒",fitzpatrick_scale:true,category:"people"},woman_pilot:{keywords:["aviator","plane","woman","human"],char:"👩‍✈️",fitzpatrick_scale:true,category:"people"},man_pilot:{keywords:["aviator","plane","man","human"],char:"👨‍✈️",fitzpatrick_scale:true,category:"people"},woman_astronaut:{keywords:["space","rocket","woman","human"],char:"👩‍🚀",fitzpatrick_scale:true,category:"people"},man_astronaut:{keywords:["space","rocket","man","human"],char:"👨‍🚀",fitzpatrick_scale:true,category:"people"},woman_judge:{keywords:["justice","court","woman","human"],char:"👩‍⚖️",fitzpatrick_scale:true,category:"people"},man_judge:{keywords:["justice","court","man","human"],char:"👨‍⚖️",fitzpatrick_scale:true,category:"people"},woman_superhero:{keywords:["woman","female","good","heroine","superpowers"],char:"🦸‍♀️",fitzpatrick_scale:true,category:"people"},man_superhero:{keywords:["man","male","good","hero","superpowers"],char:"🦸‍♂️",fitzpatrick_scale:true,category:"people"},woman_supervillain:{keywords:["woman","female","evil","bad","criminal","heroine","superpowers"],char:"🦹‍♀️",fitzpatrick_scale:true,category:"people"},man_supervillain:{keywords:["man","male","evil","bad","criminal","hero","superpowers"],char:"🦹‍♂️",fitzpatrick_scale:true,category:"people"},mrs_claus:{keywords:["woman","female","xmas","mother christmas"],char:"🤶",fitzpatrick_scale:true,category:"people"},santa:{keywords:["festival","man","male","xmas","father christmas"],char:"🎅",fitzpatrick_scale:true,category:"people"},sorceress:{keywords:["woman","female","mage","witch"],char:"🧙‍♀️",fitzpatrick_scale:true,category:"people"},wizard:{keywords:["man","male","mage","sorcerer"],char:"🧙‍♂️",fitzpatrick_scale:true,category:"people"},woman_elf:{keywords:["woman","female"],char:"🧝‍♀️",fitzpatrick_scale:true,category:"people"},man_elf:{keywords:["man","male"],char:"🧝‍♂️",fitzpatrick_scale:true,category:"people"},woman_vampire:{keywords:["woman","female"],char:"🧛‍♀️",fitzpatrick_scale:true,category:"people"},man_vampire:{keywords:["man","male","dracula"],char:"🧛‍♂️",fitzpatrick_scale:true,category:"people"},woman_zombie:{keywords:["woman","female","undead","walking dead"],char:"🧟‍♀️",fitzpatrick_scale:false,category:"people"},man_zombie:{keywords:["man","male","dracula","undead","walking dead"],char:"🧟‍♂️",fitzpatrick_scale:false,category:"people"},woman_genie:{keywords:["woman","female"],char:"🧞‍♀️",fitzpatrick_scale:false,category:"people"},man_genie:{keywords:["man","male"],char:"🧞‍♂️",fitzpatrick_scale:false,category:"people"},mermaid:{keywords:["woman","female","merwoman","ariel"],char:"🧜‍♀️",fitzpatrick_scale:true,category:"people"},merman:{keywords:["man","male","triton"],char:"🧜‍♂️",fitzpatrick_scale:true,category:"people"},woman_fairy:{keywords:["woman","female"],char:"🧚‍♀️",fitzpatrick_scale:true,category:"people"},man_fairy:{keywords:["man","male"],char:"🧚‍♂️",fitzpatrick_scale:true,category:"people"},angel:{keywords:["heaven","wings","halo"],char:"👼",fitzpatrick_scale:true,category:"people"},pregnant_woman:{keywords:["baby"],char:"🤰",fitzpatrick_scale:true,category:"people"},breastfeeding:{keywords:["nursing","baby"],char:"🤱",fitzpatrick_scale:true,category:"people"},princess:{keywords:["girl","woman","female","blond","crown","royal","queen"],char:"👸",fitzpatrick_scale:true,category:"people"},prince:{keywords:["boy","man","male","crown","royal","king"],char:"🤴",fitzpatrick_scale:true,category:"people"},bride_with_veil:{keywords:["couple","marriage","wedding","woman","bride"],char:"👰",fitzpatrick_scale:true,category:"people"},man_in_tuxedo:{keywords:["couple","marriage","wedding","groom"],char:"🤵",fitzpatrick_scale:true,category:"people"},running_woman:{keywords:["woman","walking","exercise","race","running","female"],char:"🏃‍♀️",fitzpatrick_scale:true,category:"people"},running_man:{keywords:["man","walking","exercise","race","running"],char:"🏃",fitzpatrick_scale:true,category:"people"},walking_woman:{keywords:["human","feet","steps","woman","female"],char:"🚶‍♀️",fitzpatrick_scale:true,category:"people"},walking_man:{keywords:["human","feet","steps"],char:"🚶",fitzpatrick_scale:true,category:"people"},dancer:{keywords:["female","girl","woman","fun"],char:"💃",fitzpatrick_scale:true,category:"people"},man_dancing:{keywords:["male","boy","fun","dancer"],char:"🕺",fitzpatrick_scale:true,category:"people"},dancing_women:{keywords:["female","bunny","women","girls"],char:"👯",fitzpatrick_scale:false,category:"people"},dancing_men:{keywords:["male","bunny","men","boys"],char:"👯‍♂️",fitzpatrick_scale:false,category:"people"},couple:{keywords:["pair","people","human","love","date","dating","like","affection","valentines","marriage"],char:"👫",fitzpatrick_scale:false,category:"people"},two_men_holding_hands:{keywords:["pair","couple","love","like","bromance","friendship","people","human"],char:"👬",fitzpatrick_scale:false,category:"people"},two_women_holding_hands:{keywords:["pair","friendship","couple","love","like","female","people","human"],char:"👭",fitzpatrick_scale:false,category:"people"},bowing_woman:{keywords:["woman","female","girl"],char:"🙇‍♀️",fitzpatrick_scale:true,category:"people"},bowing_man:{keywords:["man","male","boy"],char:"🙇",fitzpatrick_scale:true,category:"people"},man_facepalming:{keywords:["man","male","boy","disbelief"],char:"🤦‍♂️",fitzpatrick_scale:true,category:"people"},woman_facepalming:{keywords:["woman","female","girl","disbelief"],char:"🤦‍♀️",fitzpatrick_scale:true,category:"people"},woman_shrugging:{keywords:["woman","female","girl","confused","indifferent","doubt"],char:"🤷",fitzpatrick_scale:true,category:"people"},man_shrugging:{keywords:["man","male","boy","confused","indifferent","doubt"],char:"🤷‍♂️",fitzpatrick_scale:true,category:"people"},tipping_hand_woman:{keywords:["female","girl","woman","human","information"],char:"💁",fitzpatrick_scale:true,category:"people"},tipping_hand_man:{keywords:["male","boy","man","human","information"],char:"💁‍♂️",fitzpatrick_scale:true,category:"people"},no_good_woman:{keywords:["female","girl","woman","nope"],char:"🙅",fitzpatrick_scale:true,category:"people"},no_good_man:{keywords:["male","boy","man","nope"],char:"🙅‍♂️",fitzpatrick_scale:true,category:"people"},ok_woman:{keywords:["women","girl","female","pink","human","woman"],char:"🙆",fitzpatrick_scale:true,category:"people"},ok_man:{keywords:["men","boy","male","blue","human","man"],char:"🙆‍♂️",fitzpatrick_scale:true,category:"people"},raising_hand_woman:{keywords:["female","girl","woman"],char:"🙋",fitzpatrick_scale:true,category:"people"},raising_hand_man:{keywords:["male","boy","man"],char:"🙋‍♂️",fitzpatrick_scale:true,category:"people"},pouting_woman:{keywords:["female","girl","woman"],char:"🙎",fitzpatrick_scale:true,category:"people"},pouting_man:{keywords:["male","boy","man"],char:"🙎‍♂️",fitzpatrick_scale:true,category:"people"},frowning_woman:{keywords:["female","girl","woman","sad","depressed","discouraged","unhappy"],char:"🙍",fitzpatrick_scale:true,category:"people"},frowning_man:{keywords:["male","boy","man","sad","depressed","discouraged","unhappy"],char:"🙍‍♂️",fitzpatrick_scale:true,category:"people"},haircut_woman:{keywords:["female","girl","woman"],char:"💇",fitzpatrick_scale:true,category:"people"},haircut_man:{keywords:["male","boy","man"],char:"💇‍♂️",fitzpatrick_scale:true,category:"people"},massage_woman:{keywords:["female","girl","woman","head"],char:"💆",fitzpatrick_scale:true,category:"people"},massage_man:{keywords:["male","boy","man","head"],char:"💆‍♂️",fitzpatrick_scale:true,category:"people"},woman_in_steamy_room:{keywords:["female","woman","spa","steamroom","sauna"],char:"🧖‍♀️",fitzpatrick_scale:true,category:"people"},man_in_steamy_room:{keywords:["male","man","spa","steamroom","sauna"],char:"🧖‍♂️",fitzpatrick_scale:true,category:"people"},couple_with_heart_woman_man:{keywords:["pair","love","like","affection","human","dating","valentines","marriage"],char:"💑",fitzpatrick_scale:false,category:"people"},couple_with_heart_woman_woman:{keywords:["pair","love","like","affection","human","dating","valentines","marriage"],char:"👩‍❤️‍👩",fitzpatrick_scale:false,category:"people"},couple_with_heart_man_man:{keywords:["pair","love","like","affection","human","dating","valentines","marriage"],char:"👨‍❤️‍👨",fitzpatrick_scale:false,category:"people"},couplekiss_man_woman:{keywords:["pair","valentines","love","like","dating","marriage"],char:"💏",fitzpatrick_scale:false,category:"people"},couplekiss_woman_woman:{keywords:["pair","valentines","love","like","dating","marriage"],char:"👩‍❤️‍💋‍👩",fitzpatrick_scale:false,category:"people"},couplekiss_man_man:{keywords:["pair","valentines","love","like","dating","marriage"],char:"👨‍❤️‍💋‍👨",fitzpatrick_scale:false,category:"people"},family_man_woman_boy:{keywords:["home","parents","child","mom","dad","father","mother","people","human"],char:"👪",fitzpatrick_scale:false,category:"people"},family_man_woman_girl:{keywords:["home","parents","people","human","child"],char:"👨‍👩‍👧",fitzpatrick_scale:false,category:"people"},family_man_woman_girl_boy:{keywords:["home","parents","people","human","children"],char:"👨‍👩‍👧‍👦",fitzpatrick_scale:false,category:"people"},family_man_woman_boy_boy:{keywords:["home","parents","people","human","children"],char:"👨‍👩‍👦‍👦",fitzpatrick_scale:false,category:"people"},family_man_woman_girl_girl:{keywords:["home","parents","people","human","children"],char:"👨‍👩‍👧‍👧",fitzpatrick_scale:false,category:"people"},family_woman_woman_boy:{keywords:["home","parents","people","human","children"],char:"👩‍👩‍👦",fitzpatrick_scale:false,category:"people"},family_woman_woman_girl:{keywords:["home","parents","people","human","children"],char:"👩‍👩‍👧",fitzpatrick_scale:false,category:"people"},family_woman_woman_girl_boy:{keywords:["home","parents","people","human","children"],char:"👩‍👩‍👧‍👦",fitzpatrick_scale:false,category:"people"},family_woman_woman_boy_boy:{keywords:["home","parents","people","human","children"],char:"👩‍👩‍👦‍👦",fitzpatrick_scale:false,category:"people"},family_woman_woman_girl_girl:{keywords:["home","parents","people","human","children"],char:"👩‍👩‍👧‍👧",fitzpatrick_scale:false,category:"people"},family_man_man_boy:{keywords:["home","parents","people","human","children"],char:"👨‍👨‍👦",fitzpatrick_scale:false,category:"people"},family_man_man_girl:{keywords:["home","parents","people","human","children"],char:"👨‍👨‍👧",fitzpatrick_scale:false,category:"people"},family_man_man_girl_boy:{keywords:["home","parents","people","human","children"],char:"👨‍👨‍👧‍👦",fitzpatrick_scale:false,category:"people"},family_man_man_boy_boy:{keywords:["home","parents","people","human","children"],char:"👨‍👨‍👦‍👦",fitzpatrick_scale:false,category:"people"},family_man_man_girl_girl:{keywords:["home","parents","people","human","children"],char:"👨‍👨‍👧‍👧",fitzpatrick_scale:false,category:"people"},family_woman_boy:{keywords:["home","parent","people","human","child"],char:"👩‍👦",fitzpatrick_scale:false,category:"people"},family_woman_girl:{keywords:["home","parent","people","human","child"],char:"👩‍👧",fitzpatrick_scale:false,category:"people"},family_woman_girl_boy:{keywords:["home","parent","people","human","children"],char:"👩‍👧‍👦",fitzpatrick_scale:false,category:"people"},family_woman_boy_boy:{keywords:["home","parent","people","human","children"],char:"👩‍👦‍👦",fitzpatrick_scale:false,category:"people"},family_woman_girl_girl:{keywords:["home","parent","people","human","children"],char:"👩‍👧‍👧",fitzpatrick_scale:false,category:"people"},family_man_boy:{keywords:["home","parent","people","human","child"],char:"👨‍👦",fitzpatrick_scale:false,category:"people"},family_man_girl:{keywords:["home","parent","people","human","child"],char:"👨‍👧",fitzpatrick_scale:false,category:"people"},family_man_girl_boy:{keywords:["home","parent","people","human","children"],char:"👨‍👧‍👦",fitzpatrick_scale:false,category:"people"},family_man_boy_boy:{keywords:["home","parent","people","human","children"],char:"👨‍👦‍👦",fitzpatrick_scale:false,category:"people"},family_man_girl_girl:{keywords:["home","parent","people","human","children"],char:"👨‍👧‍👧",fitzpatrick_scale:false,category:"people"},yarn:{keywords:["ball","crochet","knit"],char:"🧶",fitzpatrick_scale:false,category:"people"},thread:{keywords:["needle","sewing","spool","string"],char:"🧵",fitzpatrick_scale:false,category:"people"},coat:{keywords:["jacket"],char:"🧥",fitzpatrick_scale:false,category:"people"},labcoat:{keywords:["doctor","experiment","scientist","chemist"],char:"🥼",fitzpatrick_scale:false,category:"people"},womans_clothes:{keywords:["fashion","shopping_bags","female"],char:"👚",fitzpatrick_scale:false,category:"people"},tshirt:{keywords:["fashion","cloth","casual","shirt","tee"],char:"👕",fitzpatrick_scale:false,category:"people"},jeans:{keywords:["fashion","shopping"],char:"👖",fitzpatrick_scale:false,category:"people"},necktie:{keywords:["shirt","suitup","formal","fashion","cloth","business"],char:"👔",fitzpatrick_scale:false,category:"people"},dress:{keywords:["clothes","fashion","shopping"],char:"👗",fitzpatrick_scale:false,category:"people"},bikini:{keywords:["swimming","female","woman","girl","fashion","beach","summer"],char:"👙",fitzpatrick_scale:false,category:"people"},kimono:{keywords:["dress","fashion","women","female","japanese"],char:"👘",fitzpatrick_scale:false,category:"people"},lipstick:{keywords:["female","girl","fashion","woman"],char:"💄",fitzpatrick_scale:false,category:"people"},kiss:{keywords:["face","lips","love","like","affection","valentines"],char:"💋",fitzpatrick_scale:false,category:"people"},footprints:{keywords:["feet","tracking","walking","beach"],char:"👣",fitzpatrick_scale:false,category:"people"},flat_shoe:{keywords:["ballet","slip-on","slipper"],char:"🥿",fitzpatrick_scale:false,category:"people"},high_heel:{keywords:["fashion","shoes","female","pumps","stiletto"],char:"👠",fitzpatrick_scale:false,category:"people"},sandal:{keywords:["shoes","fashion","flip flops"],char:"👡",fitzpatrick_scale:false,category:"people"},boot:{keywords:["shoes","fashion"],char:"👢",fitzpatrick_scale:false,category:"people"},mans_shoe:{keywords:["fashion","male"],char:"👞",fitzpatrick_scale:false,category:"people"},athletic_shoe:{keywords:["shoes","sports","sneakers"],char:"👟",fitzpatrick_scale:false,category:"people"},hiking_boot:{keywords:["backpacking","camping","hiking"],char:"🥾",fitzpatrick_scale:false,category:"people"},socks:{keywords:["stockings","clothes"],char:"🧦",fitzpatrick_scale:false,category:"people"},gloves:{keywords:["hands","winter","clothes"],char:"🧤",fitzpatrick_scale:false,category:"people"},scarf:{keywords:["neck","winter","clothes"],char:"🧣",fitzpatrick_scale:false,category:"people"},womans_hat:{keywords:["fashion","accessories","female","lady","spring"],char:"👒",fitzpatrick_scale:false,category:"people"},tophat:{keywords:["magic","gentleman","classy","circus"],char:"🎩",fitzpatrick_scale:false,category:"people"},billed_hat:{keywords:["cap","baseball"],char:"🧢",fitzpatrick_scale:false,category:"people"},rescue_worker_helmet:{keywords:["construction","build"],char:"⛑",fitzpatrick_scale:false,category:"people"},mortar_board:{keywords:["school","college","degree","university","graduation","cap","hat","legal","learn","education"],char:"🎓",fitzpatrick_scale:false,category:"people"},crown:{keywords:["king","kod","leader","royalty","lord"],char:"👑",fitzpatrick_scale:false,category:"people"},school_satchel:{keywords:["student","education","bag","backpack"],char:"🎒",fitzpatrick_scale:false,category:"people"},luggage:{keywords:["packing","travel"],char:"🧳",fitzpatrick_scale:false,category:"people"},pouch:{keywords:["bag","accessories","shopping"],char:"👝",fitzpatrick_scale:false,category:"people"},purse:{keywords:["fashion","accessories","money","sales","shopping"],char:"👛",fitzpatrick_scale:false,category:"people"},handbag:{keywords:["fashion","accessory","accessories","shopping"],char:"👜",fitzpatrick_scale:false,category:"people"},briefcase:{keywords:["business","documents","work","law","legal","job","career"],char:"💼",fitzpatrick_scale:false,category:"people"},eyeglasses:{keywords:["fashion","accessories","eyesight","nerdy","dork","geek"],char:"👓",fitzpatrick_scale:false,category:"people"},dark_sunglasses:{keywords:["face","cool","accessories"],char:"🕶",fitzpatrick_scale:false,category:"people"},goggles:{keywords:["eyes","protection","safety"],char:"🥽",fitzpatrick_scale:false,category:"people"},ring:{keywords:["wedding","propose","marriage","valentines","diamond","fashion","jewelry","gem","engagement"],char:"💍",fitzpatrick_scale:false,category:"people"},closed_umbrella:{keywords:["weather","rain","drizzle"],char:"🌂",fitzpatrick_scale:false,category:"people"},dog:{keywords:["animal","friend","nature","woof","puppy","pet","faithful"],char:"🐶",fitzpatrick_scale:false,category:"animals_and_nature"},cat:{keywords:["animal","meow","nature","pet","kitten"],char:"🐱",fitzpatrick_scale:false,category:"animals_and_nature"},mouse:{keywords:["animal","nature","cheese_wedge","rodent"],char:"🐭",fitzpatrick_scale:false,category:"animals_and_nature"},hamster:{keywords:["animal","nature"],char:"🐹",fitzpatrick_scale:false,category:"animals_and_nature"},rabbit:{keywords:["animal","nature","pet","spring","magic","bunny"],char:"🐰",fitzpatrick_scale:false,category:"animals_and_nature"},fox_face:{keywords:["animal","nature","face"],char:"🦊",fitzpatrick_scale:false,category:"animals_and_nature"},bear:{keywords:["animal","nature","wild"],char:"🐻",fitzpatrick_scale:false,category:"animals_and_nature"},panda_face:{keywords:["animal","nature","panda"],char:"🐼",fitzpatrick_scale:false,category:"animals_and_nature"},koala:{keywords:["animal","nature"],char:"🐨",fitzpatrick_scale:false,category:"animals_and_nature"},tiger:{keywords:["animal","cat","danger","wild","nature","roar"],char:"🐯",fitzpatrick_scale:false,category:"animals_and_nature"},lion:{keywords:["animal","nature"],char:"🦁",fitzpatrick_scale:false,category:"animals_and_nature"},cow:{keywords:["beef","ox","animal","nature","moo","milk"],char:"🐮",fitzpatrick_scale:false,category:"animals_and_nature"},pig:{keywords:["animal","oink","nature"],char:"🐷",fitzpatrick_scale:false,category:"animals_and_nature"},pig_nose:{keywords:["animal","oink"],char:"🐽",fitzpatrick_scale:false,category:"animals_and_nature"},frog:{keywords:["animal","nature","croak","toad"],char:"🐸",fitzpatrick_scale:false,category:"animals_and_nature"},squid:{keywords:["animal","nature","ocean","sea"],char:"🦑",fitzpatrick_scale:false,category:"animals_and_nature"},octopus:{keywords:["animal","creature","ocean","sea","nature","beach"],char:"🐙",fitzpatrick_scale:false,category:"animals_and_nature"},shrimp:{keywords:["animal","ocean","nature","seafood"],char:"🦐",fitzpatrick_scale:false,category:"animals_and_nature"},monkey_face:{keywords:["animal","nature","circus"],char:"🐵",fitzpatrick_scale:false,category:"animals_and_nature"},gorilla:{keywords:["animal","nature","circus"],char:"🦍",fitzpatrick_scale:false,category:"animals_and_nature"},see_no_evil:{keywords:["monkey","animal","nature","haha"],char:"🙈",fitzpatrick_scale:false,category:"animals_and_nature"},hear_no_evil:{keywords:["animal","monkey","nature"],char:"🙉",fitzpatrick_scale:false,category:"animals_and_nature"},speak_no_evil:{keywords:["monkey","animal","nature","omg"],char:"🙊",fitzpatrick_scale:false,category:"animals_and_nature"},monkey:{keywords:["animal","nature","banana","circus"],char:"🐒",fitzpatrick_scale:false,category:"animals_and_nature"},chicken:{keywords:["animal","cluck","nature","bird"],char:"🐔",fitzpatrick_scale:false,category:"animals_and_nature"},penguin:{keywords:["animal","nature"],char:"🐧",fitzpatrick_scale:false,category:"animals_and_nature"},bird:{keywords:["animal","nature","fly","tweet","spring"],char:"🐦",fitzpatrick_scale:false,category:"animals_and_nature"},baby_chick:{keywords:["animal","chicken","bird"],char:"🐤",fitzpatrick_scale:false,category:"animals_and_nature"},hatching_chick:{keywords:["animal","chicken","egg","born","baby","bird"],char:"🐣",fitzpatrick_scale:false,category:"animals_and_nature"},hatched_chick:{keywords:["animal","chicken","baby","bird"],char:"🐥",fitzpatrick_scale:false,category:"animals_and_nature"},duck:{keywords:["animal","nature","bird","mallard"],char:"🦆",fitzpatrick_scale:false,category:"animals_and_nature"},eagle:{keywords:["animal","nature","bird"],char:"🦅",fitzpatrick_scale:false,category:"animals_and_nature"},owl:{keywords:["animal","nature","bird","hoot"],char:"🦉",fitzpatrick_scale:false,category:"animals_and_nature"},bat:{keywords:["animal","nature","blind","vampire"],char:"🦇",fitzpatrick_scale:false,category:"animals_and_nature"},wolf:{keywords:["animal","nature","wild"],char:"🐺",fitzpatrick_scale:false,category:"animals_and_nature"},boar:{keywords:["animal","nature"],char:"🐗",fitzpatrick_scale:false,category:"animals_and_nature"},horse:{keywords:["animal","brown","nature"],char:"🐴",fitzpatrick_scale:false,category:"animals_and_nature"},unicorn:{keywords:["animal","nature","mystical"],char:"🦄",fitzpatrick_scale:false,category:"animals_and_nature"},honeybee:{keywords:["animal","insect","nature","bug","spring","honey"],char:"🐝",fitzpatrick_scale:false,category:"animals_and_nature"},bug:{keywords:["animal","insect","nature","worm"],char:"🐛",fitzpatrick_scale:false,category:"animals_and_nature"},butterfly:{keywords:["animal","insect","nature","caterpillar"],char:"🦋",fitzpatrick_scale:false,category:"animals_and_nature"},snail:{keywords:["slow","animal","shell"],char:"🐌",fitzpatrick_scale:false,category:"animals_and_nature"},beetle:{keywords:["animal","insect","nature","ladybug"],char:"🐞",fitzpatrick_scale:false,category:"animals_and_nature"},ant:{keywords:["animal","insect","nature","bug"],char:"🐜",fitzpatrick_scale:false,category:"animals_and_nature"},grasshopper:{keywords:["animal","cricket","chirp"],char:"🦗",fitzpatrick_scale:false,category:"animals_and_nature"},spider:{keywords:["animal","arachnid"],char:"🕷",fitzpatrick_scale:false,category:"animals_and_nature"},scorpion:{keywords:["animal","arachnid"],char:"🦂",fitzpatrick_scale:false,category:"animals_and_nature"},crab:{keywords:["animal","crustacean"],char:"🦀",fitzpatrick_scale:false,category:"animals_and_nature"},snake:{keywords:["animal","evil","nature","hiss","python"],char:"🐍",fitzpatrick_scale:false,category:"animals_and_nature"},lizard:{keywords:["animal","nature","reptile"],char:"🦎",fitzpatrick_scale:false,category:"animals_and_nature"},"t-rex":{keywords:["animal","nature","dinosaur","tyrannosaurus","extinct"],char:"🦖",fitzpatrick_scale:false,category:"animals_and_nature"},sauropod:{keywords:["animal","nature","dinosaur","brachiosaurus","brontosaurus","diplodocus","extinct"],char:"🦕",fitzpatrick_scale:false,category:"animals_and_nature"},turtle:{keywords:["animal","slow","nature","tortoise"],char:"🐢",fitzpatrick_scale:false,category:"animals_and_nature"},tropical_fish:{keywords:["animal","swim","ocean","beach","nemo"],char:"🐠",fitzpatrick_scale:false,category:"animals_and_nature"},fish:{keywords:["animal","food","nature"],char:"🐟",fitzpatrick_scale:false,category:"animals_and_nature"},blowfish:{keywords:["animal","nature","food","sea","ocean"],char:"🐡",fitzpatrick_scale:false,category:"animals_and_nature"},dolphin:{keywords:["animal","nature","fish","sea","ocean","flipper","fins","beach"],char:"🐬",fitzpatrick_scale:false,category:"animals_and_nature"},shark:{keywords:["animal","nature","fish","sea","ocean","jaws","fins","beach"],char:"🦈",fitzpatrick_scale:false,category:"animals_and_nature"},whale:{keywords:["animal","nature","sea","ocean"],char:"🐳",fitzpatrick_scale:false,category:"animals_and_nature"},whale2:{keywords:["animal","nature","sea","ocean"],char:"🐋",fitzpatrick_scale:false,category:"animals_and_nature"},crocodile:{keywords:["animal","nature","reptile","lizard","alligator"],char:"🐊",fitzpatrick_scale:false,category:"animals_and_nature"},leopard:{keywords:["animal","nature"],char:"🐆",fitzpatrick_scale:false,category:"animals_and_nature"},zebra:{keywords:["animal","nature","stripes","safari"],char:"🦓",fitzpatrick_scale:false,category:"animals_and_nature"},tiger2:{keywords:["animal","nature","roar"],char:"🐅",fitzpatrick_scale:false,category:"animals_and_nature"},water_buffalo:{keywords:["animal","nature","ox","cow"],char:"🐃",fitzpatrick_scale:false,category:"animals_and_nature"},ox:{keywords:["animal","cow","beef"],char:"🐂",fitzpatrick_scale:false,category:"animals_and_nature"},cow2:{keywords:["beef","ox","animal","nature","moo","milk"],char:"🐄",fitzpatrick_scale:false,category:"animals_and_nature"},deer:{keywords:["animal","nature","horns","venison"],char:"🦌",fitzpatrick_scale:false,category:"animals_and_nature"},dromedary_camel:{keywords:["animal","hot","desert","hump"],char:"🐪",fitzpatrick_scale:false,category:"animals_and_nature"},camel:{keywords:["animal","nature","hot","desert","hump"],char:"🐫",fitzpatrick_scale:false,category:"animals_and_nature"},giraffe:{keywords:["animal","nature","spots","safari"],char:"🦒",fitzpatrick_scale:false,category:"animals_and_nature"},elephant:{keywords:["animal","nature","nose","th","circus"],char:"🐘",fitzpatrick_scale:false,category:"animals_and_nature"},rhinoceros:{keywords:["animal","nature","horn"],char:"🦏",fitzpatrick_scale:false,category:"animals_and_nature"},goat:{keywords:["animal","nature"],char:"🐐",fitzpatrick_scale:false,category:"animals_and_nature"},ram:{keywords:["animal","sheep","nature"],char:"🐏",fitzpatrick_scale:false,category:"animals_and_nature"},sheep:{keywords:["animal","nature","wool","shipit"],char:"🐑",fitzpatrick_scale:false,category:"animals_and_nature"},racehorse:{keywords:["animal","gamble","luck"],char:"🐎",fitzpatrick_scale:false,category:"animals_and_nature"},pig2:{keywords:["animal","nature"],char:"🐖",fitzpatrick_scale:false,category:"animals_and_nature"},rat:{keywords:["animal","mouse","rodent"],char:"🐀",fitzpatrick_scale:false,category:"animals_and_nature"},mouse2:{keywords:["animal","nature","rodent"],char:"🐁",fitzpatrick_scale:false,category:"animals_and_nature"},rooster:{keywords:["animal","nature","chicken"],char:"🐓",fitzpatrick_scale:false,category:"animals_and_nature"},turkey:{keywords:["animal","bird"],char:"🦃",fitzpatrick_scale:false,category:"animals_and_nature"},dove:{keywords:["animal","bird"],char:"🕊",fitzpatrick_scale:false,category:"animals_and_nature"},dog2:{keywords:["animal","nature","friend","doge","pet","faithful"],char:"🐕",fitzpatrick_scale:false,category:"animals_and_nature"},poodle:{keywords:["dog","animal","101","nature","pet"],char:"🐩",fitzpatrick_scale:false,category:"animals_and_nature"},cat2:{keywords:["animal","meow","pet","cats"],char:"🐈",fitzpatrick_scale:false,category:"animals_and_nature"},rabbit2:{keywords:["animal","nature","pet","magic","spring"],char:"🐇",fitzpatrick_scale:false,category:"animals_and_nature"},chipmunk:{keywords:["animal","nature","rodent","squirrel"],char:"🐿",fitzpatrick_scale:false,category:"animals_and_nature"},hedgehog:{keywords:["animal","nature","spiny"],char:"🦔",fitzpatrick_scale:false,category:"animals_and_nature"},raccoon:{keywords:["animal","nature"],char:"🦝",fitzpatrick_scale:false,category:"animals_and_nature"},llama:{keywords:["animal","nature","alpaca"],char:"🦙",fitzpatrick_scale:false,category:"animals_and_nature"},hippopotamus:{keywords:["animal","nature"],char:"🦛",fitzpatrick_scale:false,category:"animals_and_nature"},kangaroo:{keywords:["animal","nature","australia","joey","hop","marsupial"],char:"🦘",fitzpatrick_scale:false,category:"animals_and_nature"},badger:{keywords:["animal","nature","honey"],char:"🦡",fitzpatrick_scale:false,category:"animals_and_nature"},swan:{keywords:["animal","nature","bird"],char:"🦢",fitzpatrick_scale:false,category:"animals_and_nature"},peacock:{keywords:["animal","nature","peahen","bird"],char:"🦚",fitzpatrick_scale:false,category:"animals_and_nature"},parrot:{keywords:["animal","nature","bird","pirate","talk"],char:"🦜",fitzpatrick_scale:false,category:"animals_and_nature"},lobster:{keywords:["animal","nature","bisque","claws","seafood"],char:"🦞",fitzpatrick_scale:false,category:"animals_and_nature"},mosquito:{keywords:["animal","nature","insect","malaria"],char:"🦟",fitzpatrick_scale:false,category:"animals_and_nature"},paw_prints:{keywords:["animal","tracking","footprints","dog","cat","pet","feet"],char:"🐾",fitzpatrick_scale:false,category:"animals_and_nature"},dragon:{keywords:["animal","myth","nature","chinese","green"],char:"🐉",fitzpatrick_scale:false,category:"animals_and_nature"},dragon_face:{keywords:["animal","myth","nature","chinese","green"],char:"🐲",fitzpatrick_scale:false,category:"animals_and_nature"},cactus:{keywords:["vegetable","plant","nature"],char:"🌵",fitzpatrick_scale:false,category:"animals_and_nature"},christmas_tree:{keywords:["festival","vacation","december","xmas","celebration"],char:"🎄",fitzpatrick_scale:false,category:"animals_and_nature"},evergreen_tree:{keywords:["plant","nature"],char:"🌲",fitzpatrick_scale:false,category:"animals_and_nature"},deciduous_tree:{keywords:["plant","nature"],char:"🌳",fitzpatrick_scale:false,category:"animals_and_nature"},palm_tree:{keywords:["plant","vegetable","nature","summer","beach","mojito","tropical"],char:"🌴",fitzpatrick_scale:false,category:"animals_and_nature"},seedling:{keywords:["plant","nature","grass","lawn","spring"],char:"🌱",fitzpatrick_scale:false,category:"animals_and_nature"},herb:{keywords:["vegetable","plant","medicine","weed","grass","lawn"],char:"🌿",fitzpatrick_scale:false,category:"animals_and_nature"},shamrock:{keywords:["vegetable","plant","nature","irish","clover"],char:"☘",fitzpatrick_scale:false,category:"animals_and_nature"},four_leaf_clover:{keywords:["vegetable","plant","nature","lucky","irish"],char:"🍀",fitzpatrick_scale:false,category:"animals_and_nature"},bamboo:{keywords:["plant","nature","vegetable","panda","pine_decoration"],char:"🎍",fitzpatrick_scale:false,category:"animals_and_nature"},tanabata_tree:{keywords:["plant","nature","branch","summer"],char:"🎋",fitzpatrick_scale:false,category:"animals_and_nature"},leaves:{keywords:["nature","plant","tree","vegetable","grass","lawn","spring"],char:"🍃",fitzpatrick_scale:false,category:"animals_and_nature"},fallen_leaf:{keywords:["nature","plant","vegetable","leaves"],char:"🍂",fitzpatrick_scale:false,category:"animals_and_nature"},maple_leaf:{keywords:["nature","plant","vegetable","ca","fall"],char:"🍁",fitzpatrick_scale:false,category:"animals_and_nature"},ear_of_rice:{keywords:["nature","plant"],char:"🌾",fitzpatrick_scale:false,category:"animals_and_nature"},hibiscus:{keywords:["plant","vegetable","flowers","beach"],char:"🌺",fitzpatrick_scale:false,category:"animals_and_nature"},sunflower:{keywords:["nature","plant","fall"],char:"🌻",fitzpatrick_scale:false,category:"animals_and_nature"},rose:{keywords:["flowers","valentines","love","spring"],char:"🌹",fitzpatrick_scale:false,category:"animals_and_nature"},wilted_flower:{keywords:["plant","nature","flower"],char:"🥀",fitzpatrick_scale:false,category:"animals_and_nature"},tulip:{keywords:["flowers","plant","nature","summer","spring"],char:"🌷",fitzpatrick_scale:false,category:"animals_and_nature"},blossom:{keywords:["nature","flowers","yellow"],char:"🌼",fitzpatrick_scale:false,category:"animals_and_nature"},cherry_blossom:{keywords:["nature","plant","spring","flower"],char:"🌸",fitzpatrick_scale:false,category:"animals_and_nature"},bouquet:{keywords:["flowers","nature","spring"],char:"💐",fitzpatrick_scale:false,category:"animals_and_nature"},mushroom:{keywords:["plant","vegetable"],char:"🍄",fitzpatrick_scale:false,category:"animals_and_nature"},chestnut:{keywords:["food","squirrel"],char:"🌰",fitzpatrick_scale:false,category:"animals_and_nature"},jack_o_lantern:{keywords:["halloween","light","pumpkin","creepy","fall"],char:"🎃",fitzpatrick_scale:false,category:"animals_and_nature"},shell:{keywords:["nature","sea","beach"],char:"🐚",fitzpatrick_scale:false,category:"animals_and_nature"},spider_web:{keywords:["animal","insect","arachnid","silk"],char:"🕸",fitzpatrick_scale:false,category:"animals_and_nature"},earth_americas:{keywords:["globe","world","USA","international"],char:"🌎",fitzpatrick_scale:false,category:"animals_and_nature"},earth_africa:{keywords:["globe","world","international"],char:"🌍",fitzpatrick_scale:false,category:"animals_and_nature"},earth_asia:{keywords:["globe","world","east","international"],char:"🌏",fitzpatrick_scale:false,category:"animals_and_nature"},full_moon:{keywords:["nature","yellow","twilight","planet","space","night","evening","sleep"],char:"🌕",fitzpatrick_scale:false,category:"animals_and_nature"},waning_gibbous_moon:{keywords:["nature","twilight","planet","space","night","evening","sleep","waxing_gibbous_moon"],char:"🌖",fitzpatrick_scale:false,category:"animals_and_nature"},last_quarter_moon:{keywords:["nature","twilight","planet","space","night","evening","sleep"],char:"🌗",fitzpatrick_scale:false,category:"animals_and_nature"},waning_crescent_moon:{keywords:["nature","twilight","planet","space","night","evening","sleep"],char:"🌘",fitzpatrick_scale:false,category:"animals_and_nature"},new_moon:{keywords:["nature","twilight","planet","space","night","evening","sleep"],char:"🌑",fitzpatrick_scale:false,category:"animals_and_nature"},waxing_crescent_moon:{keywords:["nature","twilight","planet","space","night","evening","sleep"],char:"🌒",fitzpatrick_scale:false,category:"animals_and_nature"},first_quarter_moon:{keywords:["nature","twilight","planet","space","night","evening","sleep"],char:"🌓",fitzpatrick_scale:false,category:"animals_and_nature"},waxing_gibbous_moon:{keywords:["nature","night","sky","gray","twilight","planet","space","evening","sleep"],char:"🌔",fitzpatrick_scale:false,category:"animals_and_nature"},new_moon_with_face:{keywords:["nature","twilight","planet","space","night","evening","sleep"],char:"🌚",fitzpatrick_scale:false,category:"animals_and_nature"},full_moon_with_face:{keywords:["nature","twilight","planet","space","night","evening","sleep"],char:"🌝",fitzpatrick_scale:false,category:"animals_and_nature"},first_quarter_moon_with_face:{keywords:["nature","twilight","planet","space","night","evening","sleep"],char:"🌛",fitzpatrick_scale:false,category:"animals_and_nature"},last_quarter_moon_with_face:{keywords:["nature","twilight","planet","space","night","evening","sleep"],char:"🌜",fitzpatrick_scale:false,category:"animals_and_nature"},sun_with_face:{keywords:["nature","morning","sky"],char:"🌞",fitzpatrick_scale:false,category:"animals_and_nature"},crescent_moon:{keywords:["night","sleep","sky","evening","magic"],char:"🌙",fitzpatrick_scale:false,category:"animals_and_nature"},star:{keywords:["night","yellow"],char:"⭐",fitzpatrick_scale:false,category:"animals_and_nature"},star2:{keywords:["night","sparkle","awesome","good","magic"],char:"🌟",fitzpatrick_scale:false,category:"animals_and_nature"},dizzy:{keywords:["star","sparkle","shoot","magic"],char:"💫",fitzpatrick_scale:false,category:"animals_and_nature"},sparkles:{keywords:["stars","shine","shiny","cool","awesome","good","magic"],char:"✨",fitzpatrick_scale:false,category:"animals_and_nature"},comet:{keywords:["space"],char:"☄",fitzpatrick_scale:false,category:"animals_and_nature"},sunny:{keywords:["weather","nature","brightness","summer","beach","spring"],char:"☀️",fitzpatrick_scale:false,category:"animals_and_nature"},sun_behind_small_cloud:{keywords:["weather"],char:"🌤",fitzpatrick_scale:false,category:"animals_and_nature"},partly_sunny:{keywords:["weather","nature","cloudy","morning","fall","spring"],char:"⛅",fitzpatrick_scale:false,category:"animals_and_nature"},sun_behind_large_cloud:{keywords:["weather"],char:"🌥",fitzpatrick_scale:false,category:"animals_and_nature"},sun_behind_rain_cloud:{keywords:["weather"],char:"🌦",fitzpatrick_scale:false,category:"animals_and_nature"},cloud:{keywords:["weather","sky"],char:"☁️",fitzpatrick_scale:false,category:"animals_and_nature"},cloud_with_rain:{keywords:["weather"],char:"🌧",fitzpatrick_scale:false,category:"animals_and_nature"},cloud_with_lightning_and_rain:{keywords:["weather","lightning"],char:"⛈",fitzpatrick_scale:false,category:"animals_and_nature"},cloud_with_lightning:{keywords:["weather","thunder"],char:"🌩",fitzpatrick_scale:false,category:"animals_and_nature"},zap:{keywords:["thunder","weather","lightning bolt","fast"],char:"⚡",fitzpatrick_scale:false,category:"animals_and_nature"},fire:{keywords:["hot","cook","flame"],char:"🔥",fitzpatrick_scale:false,category:"animals_and_nature"},boom:{keywords:["bomb","explode","explosion","collision","blown"],char:"💥",fitzpatrick_scale:false,category:"animals_and_nature"},snowflake:{keywords:["winter","season","cold","weather","christmas","xmas"],char:"❄️",fitzpatrick_scale:false,category:"animals_and_nature"},cloud_with_snow:{keywords:["weather"],char:"🌨",fitzpatrick_scale:false,category:"animals_and_nature"},snowman:{keywords:["winter","season","cold","weather","christmas","xmas","frozen","without_snow"],char:"⛄",fitzpatrick_scale:false,category:"animals_and_nature"},snowman_with_snow:{keywords:["winter","season","cold","weather","christmas","xmas","frozen"],char:"☃",fitzpatrick_scale:false,category:"animals_and_nature"},wind_face:{keywords:["gust","air"],char:"🌬",fitzpatrick_scale:false,category:"animals_and_nature"},dash:{keywords:["wind","air","fast","shoo","fart","smoke","puff"],char:"💨",fitzpatrick_scale:false,category:"animals_and_nature"},tornado:{keywords:["weather","cyclone","twister"],char:"🌪",fitzpatrick_scale:false,category:"animals_and_nature"},fog:{keywords:["weather"],char:"🌫",fitzpatrick_scale:false,category:"animals_and_nature"},open_umbrella:{keywords:["weather","spring"],char:"☂",fitzpatrick_scale:false,category:"animals_and_nature"},umbrella:{keywords:["rainy","weather","spring"],char:"☔",fitzpatrick_scale:false,category:"animals_and_nature"},droplet:{keywords:["water","drip","faucet","spring"],char:"💧",fitzpatrick_scale:false,category:"animals_and_nature"},sweat_drops:{keywords:["water","drip","oops"],char:"💦",fitzpatrick_scale:false,category:"animals_and_nature"},ocean:{keywords:["sea","water","wave","nature","tsunami","disaster"],char:"🌊",fitzpatrick_scale:false,category:"animals_and_nature"},green_apple:{keywords:["fruit","nature"],char:"🍏",fitzpatrick_scale:false,category:"food_and_drink"},apple:{keywords:["fruit","mac","school"],char:"🍎",fitzpatrick_scale:false,category:"food_and_drink"},pear:{keywords:["fruit","nature","food"],char:"🍐",fitzpatrick_scale:false,category:"food_and_drink"},tangerine:{keywords:["food","fruit","nature","orange"],char:"🍊",fitzpatrick_scale:false,category:"food_and_drink"},lemon:{keywords:["fruit","nature"],char:"🍋",fitzpatrick_scale:false,category:"food_and_drink"},banana:{keywords:["fruit","food","monkey"],char:"🍌",fitzpatrick_scale:false,category:"food_and_drink"},watermelon:{keywords:["fruit","food","picnic","summer"],char:"🍉",fitzpatrick_scale:false,category:"food_and_drink"},grapes:{keywords:["fruit","food","wine"],char:"🍇",fitzpatrick_scale:false,category:"food_and_drink"},strawberry:{keywords:["fruit","food","nature"],char:"🍓",fitzpatrick_scale:false,category:"food_and_drink"},melon:{keywords:["fruit","nature","food"],char:"🍈",fitzpatrick_scale:false,category:"food_and_drink"},cherries:{keywords:["food","fruit"],char:"🍒",fitzpatrick_scale:false,category:"food_and_drink"},peach:{keywords:["fruit","nature","food"],char:"🍑",fitzpatrick_scale:false,category:"food_and_drink"},pineapple:{keywords:["fruit","nature","food"],char:"🍍",fitzpatrick_scale:false,category:"food_and_drink"},coconut:{keywords:["fruit","nature","food","palm"],char:"🥥",fitzpatrick_scale:false,category:"food_and_drink"},kiwi_fruit:{keywords:["fruit","food"],char:"🥝",fitzpatrick_scale:false,category:"food_and_drink"},mango:{keywords:["fruit","food","tropical"],char:"🥭",fitzpatrick_scale:false,category:"food_and_drink"},avocado:{keywords:["fruit","food"],char:"🥑",fitzpatrick_scale:false,category:"food_and_drink"},broccoli:{keywords:["fruit","food","vegetable"],char:"🥦",fitzpatrick_scale:false,category:"food_and_drink"},tomato:{keywords:["fruit","vegetable","nature","food"],char:"🍅",fitzpatrick_scale:false,category:"food_and_drink"},eggplant:{keywords:["vegetable","nature","food","aubergine"],char:"🍆",fitzpatrick_scale:false,category:"food_and_drink"},cucumber:{keywords:["fruit","food","pickle"],char:"🥒",fitzpatrick_scale:false,category:"food_and_drink"},carrot:{keywords:["vegetable","food","orange"],char:"🥕",fitzpatrick_scale:false,category:"food_and_drink"},hot_pepper:{keywords:["food","spicy","chilli","chili"],char:"🌶",fitzpatrick_scale:false,category:"food_and_drink"},potato:{keywords:["food","tuber","vegatable","starch"],char:"🥔",fitzpatrick_scale:false,category:"food_and_drink"},corn:{keywords:["food","vegetable","plant"],char:"🌽",fitzpatrick_scale:false,category:"food_and_drink"},leafy_greens:{keywords:["food","vegetable","plant","bok choy","cabbage","kale","lettuce"],char:"🥬",fitzpatrick_scale:false,category:"food_and_drink"},sweet_potato:{keywords:["food","nature"],char:"🍠",fitzpatrick_scale:false,category:"food_and_drink"},peanuts:{keywords:["food","nut"],char:"🥜",fitzpatrick_scale:false,category:"food_and_drink"},honey_pot:{keywords:["bees","sweet","kitchen"],char:"🍯",fitzpatrick_scale:false,category:"food_and_drink"},croissant:{keywords:["food","bread","french"],char:"🥐",fitzpatrick_scale:false,category:"food_and_drink"},bread:{keywords:["food","wheat","breakfast","toast"],char:"🍞",fitzpatrick_scale:false,category:"food_and_drink"},baguette_bread:{keywords:["food","bread","french"],char:"🥖",fitzpatrick_scale:false,category:"food_and_drink"},bagel:{keywords:["food","bread","bakery","schmear"],char:"🥯",fitzpatrick_scale:false,category:"food_and_drink"},pretzel:{keywords:["food","bread","twisted"],char:"🥨",fitzpatrick_scale:false,category:"food_and_drink"},cheese:{keywords:["food","chadder"],char:"🧀",fitzpatrick_scale:false,category:"food_and_drink"},egg:{keywords:["food","chicken","breakfast"],char:"🥚",fitzpatrick_scale:false,category:"food_and_drink"},bacon:{keywords:["food","breakfast","pork","pig","meat"],char:"🥓",fitzpatrick_scale:false,category:"food_and_drink"},steak:{keywords:["food","cow","meat","cut","chop","lambchop","porkchop"],char:"🥩",fitzpatrick_scale:false,category:"food_and_drink"},pancakes:{keywords:["food","breakfast","flapjacks","hotcakes"],char:"🥞",fitzpatrick_scale:false,category:"food_and_drink"},poultry_leg:{keywords:["food","meat","drumstick","bird","chicken","turkey"],char:"🍗",fitzpatrick_scale:false,category:"food_and_drink"},meat_on_bone:{keywords:["good","food","drumstick"],char:"🍖",fitzpatrick_scale:false,category:"food_and_drink"},bone:{keywords:["skeleton"],char:"🦴",fitzpatrick_scale:false,category:"food_and_drink"},fried_shrimp:{keywords:["food","animal","appetizer","summer"],char:"🍤",fitzpatrick_scale:false,category:"food_and_drink"},fried_egg:{keywords:["food","breakfast","kitchen","egg"],char:"🍳",fitzpatrick_scale:false,category:"food_and_drink"},hamburger:{keywords:["meat","fast food","beef","cheeseburger","mcdonalds","burger king"],char:"🍔",fitzpatrick_scale:false,category:"food_and_drink"},fries:{keywords:["chips","snack","fast food"],char:"🍟",fitzpatrick_scale:false,category:"food_and_drink"},stuffed_flatbread:{keywords:["food","flatbread","stuffed","gyro"],char:"🥙",fitzpatrick_scale:false,category:"food_and_drink"},hotdog:{keywords:["food","frankfurter"],char:"🌭",fitzpatrick_scale:false,category:"food_and_drink"},pizza:{keywords:["food","party"],char:"🍕",fitzpatrick_scale:false,category:"food_and_drink"},sandwich:{keywords:["food","lunch","bread"],char:"🥪",fitzpatrick_scale:false,category:"food_and_drink"},canned_food:{keywords:["food","soup"],char:"🥫",fitzpatrick_scale:false,category:"food_and_drink"},spaghetti:{keywords:["food","italian","noodle"],char:"🍝",fitzpatrick_scale:false,category:"food_and_drink"},taco:{keywords:["food","mexican"],char:"🌮",fitzpatrick_scale:false,category:"food_and_drink"},burrito:{keywords:["food","mexican"],char:"🌯",fitzpatrick_scale:false,category:"food_and_drink"},green_salad:{keywords:["food","healthy","lettuce"],char:"🥗",fitzpatrick_scale:false,category:"food_and_drink"},shallow_pan_of_food:{keywords:["food","cooking","casserole","paella"],char:"🥘",fitzpatrick_scale:false,category:"food_and_drink"},ramen:{keywords:["food","japanese","noodle","chopsticks"],char:"🍜",fitzpatrick_scale:false,category:"food_and_drink"},stew:{keywords:["food","meat","soup"],char:"🍲",fitzpatrick_scale:false,category:"food_and_drink"},fish_cake:{keywords:["food","japan","sea","beach","narutomaki","pink","swirl","kamaboko","surimi","ramen"],char:"🍥",fitzpatrick_scale:false,category:"food_and_drink"},fortune_cookie:{keywords:["food","prophecy"],char:"🥠",fitzpatrick_scale:false,category:"food_and_drink"},sushi:{keywords:["food","fish","japanese","rice"],char:"🍣",fitzpatrick_scale:false,category:"food_and_drink"},bento:{keywords:["food","japanese","box"],char:"🍱",fitzpatrick_scale:false,category:"food_and_drink"},curry:{keywords:["food","spicy","hot","indian"],char:"🍛",fitzpatrick_scale:false,category:"food_and_drink"},rice_ball:{keywords:["food","japanese"],char:"🍙",fitzpatrick_scale:false,category:"food_and_drink"},rice:{keywords:["food","china","asian"],char:"🍚",fitzpatrick_scale:false,category:"food_and_drink"},rice_cracker:{keywords:["food","japanese"],char:"🍘",fitzpatrick_scale:false,category:"food_and_drink"},oden:{keywords:["food","japanese"],char:"🍢",fitzpatrick_scale:false,category:"food_and_drink"},dango:{keywords:["food","dessert","sweet","japanese","barbecue","meat"],char:"🍡",fitzpatrick_scale:false,category:"food_and_drink"},shaved_ice:{keywords:["hot","dessert","summer"],char:"🍧",fitzpatrick_scale:false,category:"food_and_drink"},ice_cream:{keywords:["food","hot","dessert"],char:"🍨",fitzpatrick_scale:false,category:"food_and_drink"},icecream:{keywords:["food","hot","dessert","summer"],char:"🍦",fitzpatrick_scale:false,category:"food_and_drink"},pie:{keywords:["food","dessert","pastry"],char:"🥧",fitzpatrick_scale:false,category:"food_and_drink"},cake:{keywords:["food","dessert"],char:"🍰",fitzpatrick_scale:false,category:"food_and_drink"},cupcake:{keywords:["food","dessert","bakery","sweet"],char:"🧁",fitzpatrick_scale:false,category:"food_and_drink"},moon_cake:{keywords:["food","autumn"],char:"🥮",fitzpatrick_scale:false,category:"food_and_drink"},birthday:{keywords:["food","dessert","cake"],char:"🎂",fitzpatrick_scale:false,category:"food_and_drink"},custard:{keywords:["dessert","food"],char:"🍮",fitzpatrick_scale:false,category:"food_and_drink"},candy:{keywords:["snack","dessert","sweet","lolly"],char:"🍬",fitzpatrick_scale:false,category:"food_and_drink"},lollipop:{keywords:["food","snack","candy","sweet"],char:"🍭",fitzpatrick_scale:false,category:"food_and_drink"},chocolate_bar:{keywords:["food","snack","dessert","sweet"],char:"🍫",fitzpatrick_scale:false,category:"food_and_drink"},popcorn:{keywords:["food","movie theater","films","snack"],char:"🍿",fitzpatrick_scale:false,category:"food_and_drink"},dumpling:{keywords:["food","empanada","pierogi","potsticker"],char:"🥟",fitzpatrick_scale:false,category:"food_and_drink"},doughnut:{keywords:["food","dessert","snack","sweet","donut"],char:"🍩",fitzpatrick_scale:false,category:"food_and_drink"},cookie:{keywords:["food","snack","oreo","chocolate","sweet","dessert"],char:"🍪",fitzpatrick_scale:false,category:"food_and_drink"},milk_glass:{keywords:["beverage","drink","cow"],char:"🥛",fitzpatrick_scale:false,category:"food_and_drink"},beer:{keywords:["relax","beverage","drink","drunk","party","pub","summer","alcohol","booze"],char:"🍺",fitzpatrick_scale:false,category:"food_and_drink"},beers:{keywords:["relax","beverage","drink","drunk","party","pub","summer","alcohol","booze"],char:"🍻",fitzpatrick_scale:false,category:"food_and_drink"},clinking_glasses:{keywords:["beverage","drink","party","alcohol","celebrate","cheers","wine","champagne","toast"],char:"🥂",fitzpatrick_scale:false,category:"food_and_drink"},wine_glass:{keywords:["drink","beverage","drunk","alcohol","booze"],char:"🍷",fitzpatrick_scale:false,category:"food_and_drink"},tumbler_glass:{keywords:["drink","beverage","drunk","alcohol","liquor","booze","bourbon","scotch","whisky","glass","shot"],char:"🥃",fitzpatrick_scale:false,category:"food_and_drink"},cocktail:{keywords:["drink","drunk","alcohol","beverage","booze","mojito"],char:"🍸",fitzpatrick_scale:false,category:"food_and_drink"},tropical_drink:{keywords:["beverage","cocktail","summer","beach","alcohol","booze","mojito"],char:"🍹",fitzpatrick_scale:false,category:"food_and_drink"},champagne:{keywords:["drink","wine","bottle","celebration"],char:"🍾",fitzpatrick_scale:false,category:"food_and_drink"},sake:{keywords:["wine","drink","drunk","beverage","japanese","alcohol","booze"],char:"🍶",fitzpatrick_scale:false,category:"food_and_drink"},tea:{keywords:["drink","bowl","breakfast","green","british"],char:"🍵",fitzpatrick_scale:false,category:"food_and_drink"},cup_with_straw:{keywords:["drink","soda"],char:"🥤",fitzpatrick_scale:false,category:"food_and_drink"},coffee:{keywords:["beverage","caffeine","latte","espresso"],char:"☕",fitzpatrick_scale:false,category:"food_and_drink"},baby_bottle:{keywords:["food","container","milk"],char:"🍼",fitzpatrick_scale:false,category:"food_and_drink"},salt:{keywords:["condiment","shaker"],char:"🧂",fitzpatrick_scale:false,category:"food_and_drink"},spoon:{keywords:["cutlery","kitchen","tableware"],char:"🥄",fitzpatrick_scale:false,category:"food_and_drink"},fork_and_knife:{keywords:["cutlery","kitchen"],char:"🍴",fitzpatrick_scale:false,category:"food_and_drink"},plate_with_cutlery:{keywords:["food","eat","meal","lunch","dinner","restaurant"],char:"🍽",fitzpatrick_scale:false,category:"food_and_drink"},bowl_with_spoon:{keywords:["food","breakfast","cereal","oatmeal","porridge"],char:"🥣",fitzpatrick_scale:false,category:"food_and_drink"},takeout_box:{keywords:["food","leftovers"],char:"🥡",fitzpatrick_scale:false,category:"food_and_drink"},chopsticks:{keywords:["food"],char:"🥢",fitzpatrick_scale:false,category:"food_and_drink"},soccer:{keywords:["sports","football"],char:"⚽",fitzpatrick_scale:false,category:"activity"},basketball:{keywords:["sports","balls","NBA"],char:"🏀",fitzpatrick_scale:false,category:"activity"},football:{keywords:["sports","balls","NFL"],char:"🏈",fitzpatrick_scale:false,category:"activity"},baseball:{keywords:["sports","balls"],char:"⚾",fitzpatrick_scale:false,category:"activity"},softball:{keywords:["sports","balls"],char:"🥎",fitzpatrick_scale:false,category:"activity"},tennis:{keywords:["sports","balls","green"],char:"🎾",fitzpatrick_scale:false,category:"activity"},volleyball:{keywords:["sports","balls"],char:"🏐",fitzpatrick_scale:false,category:"activity"},rugby_football:{keywords:["sports","team"],char:"🏉",fitzpatrick_scale:false,category:"activity"},flying_disc:{keywords:["sports","frisbee","ultimate"],char:"🥏",fitzpatrick_scale:false,category:"activity"},"8ball":{keywords:["pool","hobby","game","luck","magic"],char:"🎱",fitzpatrick_scale:false,category:"activity"},golf:{keywords:["sports","business","flag","hole","summer"],char:"⛳",fitzpatrick_scale:false,category:"activity"},golfing_woman:{keywords:["sports","business","woman","female"],char:"🏌️‍♀️",fitzpatrick_scale:false,category:"activity"},golfing_man:{keywords:["sports","business"],char:"🏌",fitzpatrick_scale:true,category:"activity"},ping_pong:{keywords:["sports","pingpong"],char:"🏓",fitzpatrick_scale:false,category:"activity"},badminton:{keywords:["sports"],char:"🏸",fitzpatrick_scale:false,category:"activity"},goal_net:{keywords:["sports"],char:"🥅",fitzpatrick_scale:false,category:"activity"},ice_hockey:{keywords:["sports"],char:"🏒",fitzpatrick_scale:false,category:"activity"},field_hockey:{keywords:["sports"],char:"🏑",fitzpatrick_scale:false,category:"activity"},lacrosse:{keywords:["sports","ball","stick"],char:"🥍",fitzpatrick_scale:false,category:"activity"},cricket:{keywords:["sports"],char:"🏏",fitzpatrick_scale:false,category:"activity"},ski:{keywords:["sports","winter","cold","snow"],char:"🎿",fitzpatrick_scale:false,category:"activity"},skier:{keywords:["sports","winter","snow"],char:"⛷",fitzpatrick_scale:false,category:"activity"},snowboarder:{keywords:["sports","winter"],char:"🏂",fitzpatrick_scale:true,category:"activity"},person_fencing:{keywords:["sports","fencing","sword"],char:"🤺",fitzpatrick_scale:false,category:"activity"},women_wrestling:{keywords:["sports","wrestlers"],char:"🤼‍♀️",fitzpatrick_scale:false,category:"activity"},men_wrestling:{keywords:["sports","wrestlers"],char:"🤼‍♂️",fitzpatrick_scale:false,category:"activity"},woman_cartwheeling:{keywords:["gymnastics"],char:"🤸‍♀️",fitzpatrick_scale:true,category:"activity"},man_cartwheeling:{keywords:["gymnastics"],char:"🤸‍♂️",fitzpatrick_scale:true,category:"activity"},woman_playing_handball:{keywords:["sports"],char:"🤾‍♀️",fitzpatrick_scale:true,category:"activity"},man_playing_handball:{keywords:["sports"],char:"🤾‍♂️",fitzpatrick_scale:true,category:"activity"},ice_skate:{keywords:["sports"],char:"⛸",fitzpatrick_scale:false,category:"activity"},curling_stone:{keywords:["sports"],char:"🥌",fitzpatrick_scale:false,category:"activity"},skateboard:{keywords:["board"],char:"🛹",fitzpatrick_scale:false,category:"activity"},sled:{keywords:["sleigh","luge","toboggan"],char:"🛷",fitzpatrick_scale:false,category:"activity"},bow_and_arrow:{keywords:["sports"],char:"🏹",fitzpatrick_scale:false,category:"activity"},fishing_pole_and_fish:{keywords:["food","hobby","summer"],char:"🎣",fitzpatrick_scale:false,category:"activity"},boxing_glove:{keywords:["sports","fighting"],char:"🥊",fitzpatrick_scale:false,category:"activity"},martial_arts_uniform:{keywords:["judo","karate","taekwondo"],char:"🥋",fitzpatrick_scale:false,category:"activity"},rowing_woman:{keywords:["sports","hobby","water","ship","woman","female"],char:"🚣‍♀️",fitzpatrick_scale:true,category:"activity"},rowing_man:{keywords:["sports","hobby","water","ship"],char:"🚣",fitzpatrick_scale:true,category:"activity"},climbing_woman:{keywords:["sports","hobby","woman","female","rock"],char:"🧗‍♀️",fitzpatrick_scale:true,category:"activity"},climbing_man:{keywords:["sports","hobby","man","male","rock"],char:"🧗‍♂️",fitzpatrick_scale:true,category:"activity"},swimming_woman:{keywords:["sports","exercise","human","athlete","water","summer","woman","female"],char:"🏊‍♀️",fitzpatrick_scale:true,category:"activity"},swimming_man:{keywords:["sports","exercise","human","athlete","water","summer"],char:"🏊",fitzpatrick_scale:true,category:"activity"},woman_playing_water_polo:{keywords:["sports","pool"],char:"🤽‍♀️",fitzpatrick_scale:true,category:"activity"},man_playing_water_polo:{keywords:["sports","pool"],char:"🤽‍♂️",fitzpatrick_scale:true,category:"activity"},woman_in_lotus_position:{keywords:["woman","female","meditation","yoga","serenity","zen","mindfulness"],char:"🧘‍♀️",fitzpatrick_scale:true,category:"activity"},man_in_lotus_position:{keywords:["man","male","meditation","yoga","serenity","zen","mindfulness"],char:"🧘‍♂️",fitzpatrick_scale:true,category:"activity"},surfing_woman:{keywords:["sports","ocean","sea","summer","beach","woman","female"],char:"🏄‍♀️",fitzpatrick_scale:true,category:"activity"},surfing_man:{keywords:["sports","ocean","sea","summer","beach"],char:"🏄",fitzpatrick_scale:true,category:"activity"},bath:{keywords:["clean","shower","bathroom"],char:"🛀",fitzpatrick_scale:true,category:"activity"},basketball_woman:{keywords:["sports","human","woman","female"],char:"⛹️‍♀️",fitzpatrick_scale:true,category:"activity"},basketball_man:{keywords:["sports","human"],char:"⛹",fitzpatrick_scale:true,category:"activity"},weight_lifting_woman:{keywords:["sports","training","exercise","woman","female"],char:"🏋️‍♀️",fitzpatrick_scale:true,category:"activity"},weight_lifting_man:{keywords:["sports","training","exercise"],char:"🏋",fitzpatrick_scale:true,category:"activity"},biking_woman:{keywords:["sports","bike","exercise","hipster","woman","female"],char:"🚴‍♀️",fitzpatrick_scale:true,category:"activity"},biking_man:{keywords:["sports","bike","exercise","hipster"],char:"🚴",fitzpatrick_scale:true,category:"activity"},mountain_biking_woman:{keywords:["transportation","sports","human","race","bike","woman","female"],char:"🚵‍♀️",fitzpatrick_scale:true,category:"activity"},mountain_biking_man:{keywords:["transportation","sports","human","race","bike"],char:"🚵",fitzpatrick_scale:true,category:"activity"},horse_racing:{keywords:["animal","betting","competition","gambling","luck"],char:"🏇",fitzpatrick_scale:true,category:"activity"},business_suit_levitating:{keywords:["suit","business","levitate","hover","jump"],char:"🕴",fitzpatrick_scale:true,category:"activity"},trophy:{keywords:["win","award","contest","place","ftw","ceremony"],char:"🏆",fitzpatrick_scale:false,category:"activity"},running_shirt_with_sash:{keywords:["play","pageant"],char:"🎽",fitzpatrick_scale:false,category:"activity"},medal_sports:{keywords:["award","winning"],char:"🏅",fitzpatrick_scale:false,category:"activity"},medal_military:{keywords:["award","winning","army"],char:"🎖",fitzpatrick_scale:false,category:"activity"},"1st_place_medal":{keywords:["award","winning","first"],char:"🥇",fitzpatrick_scale:false,category:"activity"},"2nd_place_medal":{keywords:["award","second"],char:"🥈",fitzpatrick_scale:false,category:"activity"},"3rd_place_medal":{keywords:["award","third"],char:"🥉",fitzpatrick_scale:false,category:"activity"},reminder_ribbon:{keywords:["sports","cause","support","awareness"],char:"🎗",fitzpatrick_scale:false,category:"activity"},rosette:{keywords:["flower","decoration","military"],char:"🏵",fitzpatrick_scale:false,category:"activity"},ticket:{keywords:["event","concert","pass"],char:"🎫",fitzpatrick_scale:false,category:"activity"},tickets:{keywords:["sports","concert","entrance"],char:"🎟",fitzpatrick_scale:false,category:"activity"},performing_arts:{keywords:["acting","theater","drama"],char:"🎭",fitzpatrick_scale:false,category:"activity"},art:{keywords:["design","paint","draw","colors"],char:"🎨",fitzpatrick_scale:false,category:"activity"},circus_tent:{keywords:["festival","carnival","party"],char:"🎪",fitzpatrick_scale:false,category:"activity"},woman_juggling:{keywords:["juggle","balance","skill","multitask"],char:"🤹‍♀️",fitzpatrick_scale:true,category:"activity"},man_juggling:{keywords:["juggle","balance","skill","multitask"],char:"🤹‍♂️",fitzpatrick_scale:true,category:"activity"},microphone:{keywords:["sound","music","PA","sing","talkshow"],char:"🎤",fitzpatrick_scale:false,category:"activity"},headphones:{keywords:["music","score","gadgets"],char:"🎧",fitzpatrick_scale:false,category:"activity"},musical_score:{keywords:["treble","clef","compose"],char:"🎼",fitzpatrick_scale:false,category:"activity"},musical_keyboard:{keywords:["piano","instrument","compose"],char:"🎹",fitzpatrick_scale:false,category:"activity"},drum:{keywords:["music","instrument","drumsticks","snare"],char:"🥁",fitzpatrick_scale:false,category:"activity"},saxophone:{keywords:["music","instrument","jazz","blues"],char:"🎷",fitzpatrick_scale:false,category:"activity"},trumpet:{keywords:["music","brass"],char:"🎺",fitzpatrick_scale:false,category:"activity"},guitar:{keywords:["music","instrument"],char:"🎸",fitzpatrick_scale:false,category:"activity"},violin:{keywords:["music","instrument","orchestra","symphony"],char:"🎻",fitzpatrick_scale:false,category:"activity"},clapper:{keywords:["movie","film","record"],char:"🎬",fitzpatrick_scale:false,category:"activity"},video_game:{keywords:["play","console","PS4","controller"],char:"🎮",fitzpatrick_scale:false,category:"activity"},space_invader:{keywords:["game","arcade","play"],char:"👾",fitzpatrick_scale:false,category:"activity"},dart:{keywords:["game","play","bar","target","bullseye"],char:"🎯",fitzpatrick_scale:false,category:"activity"},game_die:{keywords:["dice","random","tabletop","play","luck"],char:"🎲",fitzpatrick_scale:false,category:"activity"},chess_pawn:{keywords:["expendable"],char:"♟",fitzpatrick_scale:false,category:"activity"},slot_machine:{keywords:["bet","gamble","vegas","fruit machine","luck","casino"],char:"🎰",fitzpatrick_scale:false,category:"activity"},jigsaw:{keywords:["interlocking","puzzle","piece"],char:"🧩",fitzpatrick_scale:false,category:"activity"},bowling:{keywords:["sports","fun","play"],char:"🎳",fitzpatrick_scale:false,category:"activity"},red_car:{keywords:["red","transportation","vehicle"],char:"🚗",fitzpatrick_scale:false,category:"travel_and_places"},taxi:{keywords:["uber","vehicle","cars","transportation"],char:"🚕",fitzpatrick_scale:false,category:"travel_and_places"},blue_car:{keywords:["transportation","vehicle"],char:"🚙",fitzpatrick_scale:false,category:"travel_and_places"},bus:{keywords:["car","vehicle","transportation"],char:"🚌",fitzpatrick_scale:false,category:"travel_and_places"},trolleybus:{keywords:["bart","transportation","vehicle"],char:"🚎",fitzpatrick_scale:false,category:"travel_and_places"},racing_car:{keywords:["sports","race","fast","formula","f1"],char:"🏎",fitzpatrick_scale:false,category:"travel_and_places"},police_car:{keywords:["vehicle","cars","transportation","law","legal","enforcement"],char:"🚓",fitzpatrick_scale:false,category:"travel_and_places"},ambulance:{keywords:["health","911","hospital"],char:"🚑",fitzpatrick_scale:false,category:"travel_and_places"},fire_engine:{keywords:["transportation","cars","vehicle"],char:"🚒",fitzpatrick_scale:false,category:"travel_and_places"},minibus:{keywords:["vehicle","car","transportation"],char:"🚐",fitzpatrick_scale:false,category:"travel_and_places"},truck:{keywords:["cars","transportation"],char:"🚚",fitzpatrick_scale:false,category:"travel_and_places"},articulated_lorry:{keywords:["vehicle","cars","transportation","express"],char:"🚛",fitzpatrick_scale:false,category:"travel_and_places"},tractor:{keywords:["vehicle","car","farming","agriculture"],char:"🚜",fitzpatrick_scale:false,category:"travel_and_places"},kick_scooter:{keywords:["vehicle","kick","razor"],char:"🛴",fitzpatrick_scale:false,category:"travel_and_places"},motorcycle:{keywords:["race","sports","fast"],char:"🏍",fitzpatrick_scale:false,category:"travel_and_places"},bike:{keywords:["sports","bicycle","exercise","hipster"],char:"🚲",fitzpatrick_scale:false,category:"travel_and_places"},motor_scooter:{keywords:["vehicle","vespa","sasha"],char:"🛵",fitzpatrick_scale:false,category:"travel_and_places"},rotating_light:{keywords:["police","ambulance","911","emergency","alert","error","pinged","law","legal"],char:"🚨",fitzpatrick_scale:false,category:"travel_and_places"},oncoming_police_car:{keywords:["vehicle","law","legal","enforcement","911"],char:"🚔",fitzpatrick_scale:false,category:"travel_and_places"},oncoming_bus:{keywords:["vehicle","transportation"],char:"🚍",fitzpatrick_scale:false,category:"travel_and_places"},oncoming_automobile:{keywords:["car","vehicle","transportation"],char:"🚘",fitzpatrick_scale:false,category:"travel_and_places"},oncoming_taxi:{keywords:["vehicle","cars","uber"],char:"🚖",fitzpatrick_scale:false,category:"travel_and_places"},aerial_tramway:{keywords:["transportation","vehicle","ski"],char:"🚡",fitzpatrick_scale:false,category:"travel_and_places"},mountain_cableway:{keywords:["transportation","vehicle","ski"],char:"🚠",fitzpatrick_scale:false,category:"travel_and_places"},suspension_railway:{keywords:["vehicle","transportation"],char:"🚟",fitzpatrick_scale:false,category:"travel_and_places"},railway_car:{keywords:["transportation","vehicle"],char:"🚃",fitzpatrick_scale:false,category:"travel_and_places"},train:{keywords:["transportation","vehicle","carriage","public","travel"],char:"🚋",fitzpatrick_scale:false,category:"travel_and_places"},monorail:{keywords:["transportation","vehicle"],char:"🚝",fitzpatrick_scale:false,category:"travel_and_places"},bullettrain_side:{keywords:["transportation","vehicle"],char:"🚄",fitzpatrick_scale:false,category:"travel_and_places"},bullettrain_front:{keywords:["transportation","vehicle","speed","fast","public","travel"],char:"🚅",fitzpatrick_scale:false,category:"travel_and_places"},light_rail:{keywords:["transportation","vehicle"],char:"🚈",fitzpatrick_scale:false,category:"travel_and_places"},mountain_railway:{keywords:["transportation","vehicle"],char:"🚞",fitzpatrick_scale:false,category:"travel_and_places"},steam_locomotive:{keywords:["transportation","vehicle","train"],char:"🚂",fitzpatrick_scale:false,category:"travel_and_places"},train2:{keywords:["transportation","vehicle"],char:"🚆",fitzpatrick_scale:false,category:"travel_and_places"},metro:{keywords:["transportation","blue-square","mrt","underground","tube"],char:"🚇",fitzpatrick_scale:false,category:"travel_and_places"},tram:{keywords:["transportation","vehicle"],char:"🚊",fitzpatrick_scale:false,category:"travel_and_places"},station:{keywords:["transportation","vehicle","public"],char:"🚉",fitzpatrick_scale:false,category:"travel_and_places"},flying_saucer:{keywords:["transportation","vehicle","ufo"],char:"🛸",fitzpatrick_scale:false,category:"travel_and_places"},helicopter:{keywords:["transportation","vehicle","fly"],char:"🚁",fitzpatrick_scale:false,category:"travel_and_places"},small_airplane:{keywords:["flight","transportation","fly","vehicle"],char:"🛩",fitzpatrick_scale:false,category:"travel_and_places"},airplane:{keywords:["vehicle","transportation","flight","fly"],char:"✈️",fitzpatrick_scale:false,category:"travel_and_places"},flight_departure:{keywords:["airport","flight","landing"],char:"🛫",fitzpatrick_scale:false,category:"travel_and_places"},flight_arrival:{keywords:["airport","flight","boarding"],char:"🛬",fitzpatrick_scale:false,category:"travel_and_places"},sailboat:{keywords:["ship","summer","transportation","water","sailing"],char:"⛵",fitzpatrick_scale:false,category:"travel_and_places"},motor_boat:{keywords:["ship"],char:"🛥",fitzpatrick_scale:false,category:"travel_and_places"},speedboat:{keywords:["ship","transportation","vehicle","summer"],char:"🚤",fitzpatrick_scale:false,category:"travel_and_places"},ferry:{keywords:["boat","ship","yacht"],char:"⛴",fitzpatrick_scale:false,category:"travel_and_places"},passenger_ship:{keywords:["yacht","cruise","ferry"],char:"🛳",fitzpatrick_scale:false,category:"travel_and_places"},rocket:{keywords:["launch","ship","staffmode","NASA","outer space","outer_space","fly"],char:"🚀",fitzpatrick_scale:false,category:"travel_and_places"},artificial_satellite:{keywords:["communication","gps","orbit","spaceflight","NASA","ISS"],char:"🛰",fitzpatrick_scale:false,category:"travel_and_places"},seat:{keywords:["sit","airplane","transport","bus","flight","fly"],char:"💺",fitzpatrick_scale:false,category:"travel_and_places"},canoe:{keywords:["boat","paddle","water","ship"],char:"🛶",fitzpatrick_scale:false,category:"travel_and_places"},anchor:{keywords:["ship","ferry","sea","boat"],char:"⚓",fitzpatrick_scale:false,category:"travel_and_places"},construction:{keywords:["wip","progress","caution","warning"],char:"🚧",fitzpatrick_scale:false,category:"travel_and_places"},fuelpump:{keywords:["gas station","petroleum"],char:"⛽",fitzpatrick_scale:false,category:"travel_and_places"},busstop:{keywords:["transportation","wait"],char:"🚏",fitzpatrick_scale:false,category:"travel_and_places"},vertical_traffic_light:{keywords:["transportation","driving"],char:"🚦",fitzpatrick_scale:false,category:"travel_and_places"},traffic_light:{keywords:["transportation","signal"],char:"🚥",fitzpatrick_scale:false,category:"travel_and_places"},checkered_flag:{keywords:["contest","finishline","race","gokart"],char:"🏁",fitzpatrick_scale:false,category:"travel_and_places"},ship:{keywords:["transportation","titanic","deploy"],char:"🚢",fitzpatrick_scale:false,category:"travel_and_places"},ferris_wheel:{keywords:["photo","carnival","londoneye"],char:"🎡",fitzpatrick_scale:false,category:"travel_and_places"},roller_coaster:{keywords:["carnival","playground","photo","fun"],char:"🎢",fitzpatrick_scale:false,category:"travel_and_places"},carousel_horse:{keywords:["photo","carnival"],char:"🎠",fitzpatrick_scale:false,category:"travel_and_places"},building_construction:{keywords:["wip","working","progress"],char:"🏗",fitzpatrick_scale:false,category:"travel_and_places"},foggy:{keywords:["photo","mountain"],char:"🌁",fitzpatrick_scale:false,category:"travel_and_places"},tokyo_tower:{keywords:["photo","japanese"],char:"🗼",fitzpatrick_scale:false,category:"travel_and_places"},factory:{keywords:["building","industry","pollution","smoke"],char:"🏭",fitzpatrick_scale:false,category:"travel_and_places"},fountain:{keywords:["photo","summer","water","fresh"],char:"⛲",fitzpatrick_scale:false,category:"travel_and_places"},rice_scene:{keywords:["photo","japan","asia","tsukimi"],char:"🎑",fitzpatrick_scale:false,category:"travel_and_places"},mountain:{keywords:["photo","nature","environment"],char:"⛰",fitzpatrick_scale:false,category:"travel_and_places"},mountain_snow:{keywords:["photo","nature","environment","winter","cold"],char:"🏔",fitzpatrick_scale:false,category:"travel_and_places"},mount_fuji:{keywords:["photo","mountain","nature","japanese"],char:"🗻",fitzpatrick_scale:false,category:"travel_and_places"},volcano:{keywords:["photo","nature","disaster"],char:"🌋",fitzpatrick_scale:false,category:"travel_and_places"},japan:{keywords:["nation","country","japanese","asia"],char:"🗾",fitzpatrick_scale:false,category:"travel_and_places"},camping:{keywords:["photo","outdoors","tent"],char:"🏕",fitzpatrick_scale:false,category:"travel_and_places"},tent:{keywords:["photo","camping","outdoors"],char:"⛺",fitzpatrick_scale:false,category:"travel_and_places"},national_park:{keywords:["photo","environment","nature"],char:"🏞",fitzpatrick_scale:false,category:"travel_and_places"},motorway:{keywords:["road","cupertino","interstate","highway"],char:"🛣",fitzpatrick_scale:false,category:"travel_and_places"},railway_track:{keywords:["train","transportation"],char:"🛤",fitzpatrick_scale:false,category:"travel_and_places"},sunrise:{keywords:["morning","view","vacation","photo"],char:"🌅",fitzpatrick_scale:false,category:"travel_and_places"},sunrise_over_mountains:{keywords:["view","vacation","photo"],char:"🌄",fitzpatrick_scale:false,category:"travel_and_places"},desert:{keywords:["photo","warm","saharah"],char:"🏜",fitzpatrick_scale:false,category:"travel_and_places"},beach_umbrella:{keywords:["weather","summer","sunny","sand","mojito"],char:"🏖",fitzpatrick_scale:false,category:"travel_and_places"},desert_island:{keywords:["photo","tropical","mojito"],char:"🏝",fitzpatrick_scale:false,category:"travel_and_places"},city_sunrise:{keywords:["photo","good morning","dawn"],char:"🌇",fitzpatrick_scale:false,category:"travel_and_places"},city_sunset:{keywords:["photo","evening","sky","buildings"],char:"🌆",fitzpatrick_scale:false,category:"travel_and_places"},cityscape:{keywords:["photo","night life","urban"],char:"🏙",fitzpatrick_scale:false,category:"travel_and_places"},night_with_stars:{keywords:["evening","city","downtown"],char:"🌃",fitzpatrick_scale:false,category:"travel_and_places"},bridge_at_night:{keywords:["photo","sanfrancisco"],char:"🌉",fitzpatrick_scale:false,category:"travel_and_places"},milky_way:{keywords:["photo","space","stars"],char:"🌌",fitzpatrick_scale:false,category:"travel_and_places"},stars:{keywords:["night","photo"],char:"🌠",fitzpatrick_scale:false,category:"travel_and_places"},sparkler:{keywords:["stars","night","shine"],char:"🎇",fitzpatrick_scale:false,category:"travel_and_places"},fireworks:{keywords:["photo","festival","carnival","congratulations"],char:"🎆",fitzpatrick_scale:false,category:"travel_and_places"},rainbow:{keywords:["nature","happy","unicorn_face","photo","sky","spring"],char:"🌈",fitzpatrick_scale:false,category:"travel_and_places"},houses:{keywords:["buildings","photo"],char:"🏘",fitzpatrick_scale:false,category:"travel_and_places"},european_castle:{keywords:["building","royalty","history"],char:"🏰",fitzpatrick_scale:false,category:"travel_and_places"},japanese_castle:{keywords:["photo","building"],char:"🏯",fitzpatrick_scale:false,category:"travel_and_places"},stadium:{keywords:["photo","place","sports","concert","venue"],char:"🏟",fitzpatrick_scale:false,category:"travel_and_places"},statue_of_liberty:{keywords:["american","newyork"],char:"🗽",fitzpatrick_scale:false,category:"travel_and_places"},house:{keywords:["building","home"],char:"🏠",fitzpatrick_scale:false,category:"travel_and_places"},house_with_garden:{keywords:["home","plant","nature"],char:"🏡",fitzpatrick_scale:false,category:"travel_and_places"},derelict_house:{keywords:["abandon","evict","broken","building"],char:"🏚",fitzpatrick_scale:false,category:"travel_and_places"},office:{keywords:["building","bureau","work"],char:"🏢",fitzpatrick_scale:false,category:"travel_and_places"},department_store:{keywords:["building","shopping","mall"],char:"🏬",fitzpatrick_scale:false,category:"travel_and_places"},post_office:{keywords:["building","envelope","communication"],char:"🏣",fitzpatrick_scale:false,category:"travel_and_places"},european_post_office:{keywords:["building","email"],char:"🏤",fitzpatrick_scale:false,category:"travel_and_places"},hospital:{keywords:["building","health","surgery","doctor"],char:"🏥",fitzpatrick_scale:false,category:"travel_and_places"},bank:{keywords:["building","money","sales","cash","business","enterprise"],char:"🏦",fitzpatrick_scale:false,category:"travel_and_places"},hotel:{keywords:["building","accomodation","checkin"],char:"🏨",fitzpatrick_scale:false,category:"travel_and_places"},convenience_store:{keywords:["building","shopping","groceries"],char:"🏪",fitzpatrick_scale:false,category:"travel_and_places"},school:{keywords:["building","student","education","learn","teach"],char:"🏫",fitzpatrick_scale:false,category:"travel_and_places"},love_hotel:{keywords:["like","affection","dating"],char:"🏩",fitzpatrick_scale:false,category:"travel_and_places"},wedding:{keywords:["love","like","affection","couple","marriage","bride","groom"],char:"💒",fitzpatrick_scale:false,category:"travel_and_places"},classical_building:{keywords:["art","culture","history"],char:"🏛",fitzpatrick_scale:false,category:"travel_and_places"},church:{keywords:["building","religion","christ"],char:"⛪",fitzpatrick_scale:false,category:"travel_and_places"},mosque:{keywords:["islam","worship","minaret"],char:"🕌",fitzpatrick_scale:false,category:"travel_and_places"},synagogue:{keywords:["judaism","worship","temple","jewish"],char:"🕍",fitzpatrick_scale:false,category:"travel_and_places"},kaaba:{keywords:["mecca","mosque","islam"],char:"🕋",fitzpatrick_scale:false,category:"travel_and_places"},shinto_shrine:{keywords:["temple","japan","kyoto"],char:"⛩",fitzpatrick_scale:false,category:"travel_and_places"},watch:{keywords:["time","accessories"],char:"⌚",fitzpatrick_scale:false,category:"objects"},iphone:{keywords:["technology","apple","gadgets","dial"],char:"📱",fitzpatrick_scale:false,category:"objects"},calling:{keywords:["iphone","incoming"],char:"📲",fitzpatrick_scale:false,category:"objects"},computer:{keywords:["technology","laptop","screen","display","monitor"],char:"💻",fitzpatrick_scale:false,category:"objects"},keyboard:{keywords:["technology","computer","type","input","text"],char:"⌨",fitzpatrick_scale:false,category:"objects"},desktop_computer:{keywords:["technology","computing","screen"],char:"🖥",fitzpatrick_scale:false,category:"objects"},printer:{keywords:["paper","ink"],char:"🖨",fitzpatrick_scale:false,category:"objects"},computer_mouse:{keywords:["click"],char:"🖱",fitzpatrick_scale:false,category:"objects"},trackball:{keywords:["technology","trackpad"],char:"🖲",fitzpatrick_scale:false,category:"objects"},joystick:{keywords:["game","play"],char:"🕹",fitzpatrick_scale:false,category:"objects"},clamp:{keywords:["tool"],char:"🗜",fitzpatrick_scale:false,category:"objects"},minidisc:{keywords:["technology","record","data","disk","90s"],char:"💽",fitzpatrick_scale:false,category:"objects"},floppy_disk:{keywords:["oldschool","technology","save","90s","80s"],char:"💾",fitzpatrick_scale:false,category:"objects"},cd:{keywords:["technology","dvd","disk","disc","90s"],char:"💿",fitzpatrick_scale:false,category:"objects"},dvd:{keywords:["cd","disk","disc"],char:"📀",fitzpatrick_scale:false,category:"objects"},vhs:{keywords:["record","video","oldschool","90s","80s"],char:"📼",fitzpatrick_scale:false,category:"objects"},camera:{keywords:["gadgets","photography"],char:"📷",fitzpatrick_scale:false,category:"objects"},camera_flash:{keywords:["photography","gadgets"],char:"📸",fitzpatrick_scale:false,category:"objects"},video_camera:{keywords:["film","record"],char:"📹",fitzpatrick_scale:false,category:"objects"},movie_camera:{keywords:["film","record"],char:"🎥",fitzpatrick_scale:false,category:"objects"},film_projector:{keywords:["video","tape","record","movie"],char:"📽",fitzpatrick_scale:false,category:"objects"},film_strip:{keywords:["movie"],char:"🎞",fitzpatrick_scale:false,category:"objects"},telephone_receiver:{keywords:["technology","communication","dial"],char:"📞",fitzpatrick_scale:false,category:"objects"},phone:{keywords:["technology","communication","dial","telephone"],char:"☎️",fitzpatrick_scale:false,category:"objects"},pager:{keywords:["bbcall","oldschool","90s"],char:"📟",fitzpatrick_scale:false,category:"objects"},fax:{keywords:["communication","technology"],char:"📠",fitzpatrick_scale:false,category:"objects"},tv:{keywords:["technology","program","oldschool","show","television"],char:"📺",fitzpatrick_scale:false,category:"objects"},radio:{keywords:["communication","music","podcast","program"],char:"📻",fitzpatrick_scale:false,category:"objects"},studio_microphone:{keywords:["sing","recording","artist","talkshow"],char:"🎙",fitzpatrick_scale:false,category:"objects"},level_slider:{keywords:["scale"],char:"🎚",fitzpatrick_scale:false,category:"objects"},control_knobs:{keywords:["dial"],char:"🎛",fitzpatrick_scale:false,category:"objects"},compass:{keywords:["magnetic","navigation","orienteering"],char:"🧭",fitzpatrick_scale:false,category:"objects"},stopwatch:{keywords:["time","deadline"],char:"⏱",fitzpatrick_scale:false,category:"objects"},timer_clock:{keywords:["alarm"],char:"⏲",fitzpatrick_scale:false,category:"objects"},alarm_clock:{keywords:["time","wake"],char:"⏰",fitzpatrick_scale:false,category:"objects"},mantelpiece_clock:{keywords:["time"],char:"🕰",fitzpatrick_scale:false,category:"objects"},hourglass_flowing_sand:{keywords:["oldschool","time","countdown"],char:"⏳",fitzpatrick_scale:false,category:"objects"},hourglass:{keywords:["time","clock","oldschool","limit","exam","quiz","test"],char:"⌛",fitzpatrick_scale:false,category:"objects"},satellite:{keywords:["communication","future","radio","space"],char:"📡",fitzpatrick_scale:false,category:"objects"},battery:{keywords:["power","energy","sustain"],char:"🔋",fitzpatrick_scale:false,category:"objects"},electric_plug:{keywords:["charger","power"],char:"🔌",fitzpatrick_scale:false,category:"objects"},bulb:{keywords:["light","electricity","idea"],char:"💡",fitzpatrick_scale:false,category:"objects"},flashlight:{keywords:["dark","camping","sight","night"],char:"🔦",fitzpatrick_scale:false,category:"objects"},candle:{keywords:["fire","wax"],char:"🕯",fitzpatrick_scale:false,category:"objects"},fire_extinguisher:{keywords:["quench"],char:"🧯",fitzpatrick_scale:false,category:"objects"},wastebasket:{keywords:["bin","trash","rubbish","garbage","toss"],char:"🗑",fitzpatrick_scale:false,category:"objects"},oil_drum:{keywords:["barrell"],char:"🛢",fitzpatrick_scale:false,category:"objects"},money_with_wings:{keywords:["dollar","bills","payment","sale"],char:"💸",fitzpatrick_scale:false,category:"objects"},dollar:{keywords:["money","sales","bill","currency"],char:"💵",fitzpatrick_scale:false,category:"objects"},yen:{keywords:["money","sales","japanese","dollar","currency"],char:"💴",fitzpatrick_scale:false,category:"objects"},euro:{keywords:["money","sales","dollar","currency"],char:"💶",fitzpatrick_scale:false,category:"objects"},pound:{keywords:["british","sterling","money","sales","bills","uk","england","currency"],char:"💷",fitzpatrick_scale:false,category:"objects"},moneybag:{keywords:["dollar","payment","coins","sale"],char:"💰",fitzpatrick_scale:false,category:"objects"},credit_card:{keywords:["money","sales","dollar","bill","payment","shopping"],char:"💳",fitzpatrick_scale:false,category:"objects"},gem:{keywords:["blue","ruby","diamond","jewelry"],char:"💎",fitzpatrick_scale:false,category:"objects"},balance_scale:{keywords:["law","fairness","weight"],char:"⚖",fitzpatrick_scale:false,category:"objects"},toolbox:{keywords:["tools","diy","fix","maintainer","mechanic"],char:"🧰",fitzpatrick_scale:false,category:"objects"},wrench:{keywords:["tools","diy","ikea","fix","maintainer"],char:"🔧",fitzpatrick_scale:false,category:"objects"},hammer:{keywords:["tools","build","create"],char:"🔨",fitzpatrick_scale:false,category:"objects"},hammer_and_pick:{keywords:["tools","build","create"],char:"⚒",fitzpatrick_scale:false,category:"objects"},hammer_and_wrench:{keywords:["tools","build","create"],char:"🛠",fitzpatrick_scale:false,category:"objects"},pick:{keywords:["tools","dig"],char:"⛏",fitzpatrick_scale:false,category:"objects"},nut_and_bolt:{keywords:["handy","tools","fix"],char:"🔩",fitzpatrick_scale:false,category:"objects"},gear:{keywords:["cog"],char:"⚙",fitzpatrick_scale:false,category:"objects"},brick:{keywords:["bricks"],char:"🧱",fitzpatrick_scale:false,category:"objects"},chains:{keywords:["lock","arrest"],char:"⛓",fitzpatrick_scale:false,category:"objects"},magnet:{keywords:["attraction","magnetic"],char:"🧲",fitzpatrick_scale:false,category:"objects"},gun:{keywords:["violence","weapon","pistol","revolver"],char:"🔫",fitzpatrick_scale:false,category:"objects"},bomb:{keywords:["boom","explode","explosion","terrorism"],char:"💣",fitzpatrick_scale:false,category:"objects"},firecracker:{keywords:["dynamite","boom","explode","explosion","explosive"],char:"🧨",fitzpatrick_scale:false,category:"objects"},hocho:{keywords:["knife","blade","cutlery","kitchen","weapon"],char:"🔪",fitzpatrick_scale:false,category:"objects"},dagger:{keywords:["weapon"],char:"🗡",fitzpatrick_scale:false,category:"objects"},crossed_swords:{keywords:["weapon"],char:"⚔",fitzpatrick_scale:false,category:"objects"},shield:{keywords:["protection","security"],char:"🛡",fitzpatrick_scale:false,category:"objects"},smoking:{keywords:["kills","tobacco","cigarette","joint","smoke"],char:"🚬",fitzpatrick_scale:false,category:"objects"},skull_and_crossbones:{keywords:["poison","danger","deadly","scary","death","pirate","evil"],char:"☠",fitzpatrick_scale:false,category:"objects"},coffin:{keywords:["vampire","dead","die","death","rip","graveyard","cemetery","casket","funeral","box"],char:"⚰",fitzpatrick_scale:false,category:"objects"},funeral_urn:{keywords:["dead","die","death","rip","ashes"],char:"⚱",fitzpatrick_scale:false,category:"objects"},amphora:{keywords:["vase","jar"],char:"🏺",fitzpatrick_scale:false,category:"objects"},crystal_ball:{keywords:["disco","party","magic","circus","fortune_teller"],char:"🔮",fitzpatrick_scale:false,category:"objects"},prayer_beads:{keywords:["dhikr","religious"],char:"📿",fitzpatrick_scale:false,category:"objects"},nazar_amulet:{keywords:["bead","charm"],char:"🧿",fitzpatrick_scale:false,category:"objects"},barber:{keywords:["hair","salon","style"],char:"💈",fitzpatrick_scale:false,category:"objects"},alembic:{keywords:["distilling","science","experiment","chemistry"],char:"⚗",fitzpatrick_scale:false,category:"objects"},telescope:{keywords:["stars","space","zoom","science","astronomy"],char:"🔭",fitzpatrick_scale:false,category:"objects"},microscope:{keywords:["laboratory","experiment","zoomin","science","study"],char:"🔬",fitzpatrick_scale:false,category:"objects"},hole:{keywords:["embarrassing"],char:"🕳",fitzpatrick_scale:false,category:"objects"},pill:{keywords:["health","medicine","doctor","pharmacy","drug"],char:"💊",fitzpatrick_scale:false,category:"objects"},syringe:{keywords:["health","hospital","drugs","blood","medicine","needle","doctor","nurse"],char:"💉",fitzpatrick_scale:false,category:"objects"},dna:{keywords:["biologist","genetics","life"],char:"🧬",fitzpatrick_scale:false,category:"objects"},microbe:{keywords:["amoeba","bacteria","germs"],char:"🦠",fitzpatrick_scale:false,category:"objects"},petri_dish:{keywords:["bacteria","biology","culture","lab"],char:"🧫",fitzpatrick_scale:false,category:"objects"},test_tube:{keywords:["chemistry","experiment","lab","science"],char:"🧪",fitzpatrick_scale:false,category:"objects"},thermometer:{keywords:["weather","temperature","hot","cold"],char:"🌡",fitzpatrick_scale:false,category:"objects"},broom:{keywords:["cleaning","sweeping","witch"],char:"🧹",fitzpatrick_scale:false,category:"objects"},basket:{keywords:["laundry"],char:"🧺",fitzpatrick_scale:false,category:"objects"},toilet_paper:{keywords:["roll"],char:"🧻",fitzpatrick_scale:false,category:"objects"},label:{keywords:["sale","tag"],char:"🏷",fitzpatrick_scale:false,category:"objects"},bookmark:{keywords:["favorite","label","save"],char:"🔖",fitzpatrick_scale:false,category:"objects"},toilet:{keywords:["restroom","wc","washroom","bathroom","potty"],char:"🚽",fitzpatrick_scale:false,category:"objects"},shower:{keywords:["clean","water","bathroom"],char:"🚿",fitzpatrick_scale:false,category:"objects"},bathtub:{keywords:["clean","shower","bathroom"],char:"🛁",fitzpatrick_scale:false,category:"objects"},soap:{keywords:["bar","bathing","cleaning","lather"],char:"🧼",fitzpatrick_scale:false,category:"objects"},sponge:{keywords:["absorbing","cleaning","porous"],char:"🧽",fitzpatrick_scale:false,category:"objects"},lotion_bottle:{keywords:["moisturizer","sunscreen"],char:"🧴",fitzpatrick_scale:false,category:"objects"},key:{keywords:["lock","door","password"],char:"🔑",fitzpatrick_scale:false,category:"objects"},old_key:{keywords:["lock","door","password"],char:"🗝",fitzpatrick_scale:false,category:"objects"},couch_and_lamp:{keywords:["read","chill"],char:"🛋",fitzpatrick_scale:false,category:"objects"},sleeping_bed:{keywords:["bed","rest"],char:"🛌",fitzpatrick_scale:true,category:"objects"},bed:{keywords:["sleep","rest"],char:"🛏",fitzpatrick_scale:false,category:"objects"},door:{keywords:["house","entry","exit"],char:"🚪",fitzpatrick_scale:false,category:"objects"},bellhop_bell:{keywords:["service"],char:"🛎",fitzpatrick_scale:false,category:"objects"},teddy_bear:{keywords:["plush","stuffed"],char:"🧸",fitzpatrick_scale:false,category:"objects"},framed_picture:{keywords:["photography"],char:"🖼",fitzpatrick_scale:false,category:"objects"},world_map:{keywords:["location","direction"],char:"🗺",fitzpatrick_scale:false,category:"objects"},parasol_on_ground:{keywords:["weather","summer"],char:"⛱",fitzpatrick_scale:false,category:"objects"},moyai:{keywords:["rock","easter island","moai"],char:"🗿",fitzpatrick_scale:false,category:"objects"},shopping:{keywords:["mall","buy","purchase"],char:"🛍",fitzpatrick_scale:false,category:"objects"},shopping_cart:{keywords:["trolley"],char:"🛒",fitzpatrick_scale:false,category:"objects"},balloon:{keywords:["party","celebration","birthday","circus"],char:"🎈",fitzpatrick_scale:false,category:"objects"},flags:{keywords:["fish","japanese","koinobori","carp","banner"],char:"🎏",fitzpatrick_scale:false,category:"objects"},ribbon:{keywords:["decoration","pink","girl","bowtie"],char:"🎀",fitzpatrick_scale:false,category:"objects"},gift:{keywords:["present","birthday","christmas","xmas"],char:"🎁",fitzpatrick_scale:false,category:"objects"},confetti_ball:{keywords:["festival","party","birthday","circus"],char:"🎊",fitzpatrick_scale:false,category:"objects"},tada:{keywords:["party","congratulations","birthday","magic","circus","celebration"],char:"🎉",fitzpatrick_scale:false,category:"objects"},dolls:{keywords:["japanese","toy","kimono"],char:"🎎",fitzpatrick_scale:false,category:"objects"},wind_chime:{keywords:["nature","ding","spring","bell"],char:"🎐",fitzpatrick_scale:false,category:"objects"},crossed_flags:{keywords:["japanese","nation","country","border"],char:"🎌",fitzpatrick_scale:false,category:"objects"},izakaya_lantern:{keywords:["light","paper","halloween","spooky"],char:"🏮",fitzpatrick_scale:false,category:"objects"},red_envelope:{keywords:["gift"],char:"🧧",fitzpatrick_scale:false,category:"objects"},email:{keywords:["letter","postal","inbox","communication"],char:"✉️",fitzpatrick_scale:false,category:"objects"},envelope_with_arrow:{keywords:["email","communication"],char:"📩",fitzpatrick_scale:false,category:"objects"},incoming_envelope:{keywords:["email","inbox"],char:"📨",fitzpatrick_scale:false,category:"objects"},"e-mail":{keywords:["communication","inbox"],char:"📧",fitzpatrick_scale:false,category:"objects"},love_letter:{keywords:["email","like","affection","envelope","valentines"],char:"💌",fitzpatrick_scale:false,category:"objects"},postbox:{keywords:["email","letter","envelope"],char:"📮",fitzpatrick_scale:false,category:"objects"},mailbox_closed:{keywords:["email","communication","inbox"],char:"📪",fitzpatrick_scale:false,category:"objects"},mailbox:{keywords:["email","inbox","communication"],char:"📫",fitzpatrick_scale:false,category:"objects"},mailbox_with_mail:{keywords:["email","inbox","communication"],char:"📬",fitzpatrick_scale:false,category:"objects"},mailbox_with_no_mail:{keywords:["email","inbox"],char:"📭",fitzpatrick_scale:false,category:"objects"},package:{keywords:["mail","gift","cardboard","box","moving"],char:"📦",fitzpatrick_scale:false,category:"objects"},postal_horn:{keywords:["instrument","music"],char:"📯",fitzpatrick_scale:false,category:"objects"},inbox_tray:{keywords:["email","documents"],char:"📥",fitzpatrick_scale:false,category:"objects"},outbox_tray:{keywords:["inbox","email"],char:"📤",fitzpatrick_scale:false,category:"objects"},scroll:{keywords:["documents","ancient","history","paper"],char:"📜",fitzpatrick_scale:false,category:"objects"},page_with_curl:{keywords:["documents","office","paper"],char:"📃",fitzpatrick_scale:false,category:"objects"},bookmark_tabs:{keywords:["favorite","save","order","tidy"],char:"📑",fitzpatrick_scale:false,category:"objects"},receipt:{keywords:["accounting","expenses"],char:"🧾",fitzpatrick_scale:false,category:"objects"},bar_chart:{keywords:["graph","presentation","stats"],char:"📊",fitzpatrick_scale:false,category:"objects"},chart_with_upwards_trend:{keywords:["graph","presentation","stats","recovery","business","economics","money","sales","good","success"],char:"📈",fitzpatrick_scale:false,category:"objects"},chart_with_downwards_trend:{keywords:["graph","presentation","stats","recession","business","economics","money","sales","bad","failure"],char:"📉",fitzpatrick_scale:false,category:"objects"},page_facing_up:{keywords:["documents","office","paper","information"],char:"📄",fitzpatrick_scale:false,category:"objects"},date:{keywords:["calendar","schedule"],char:"📅",fitzpatrick_scale:false,category:"objects"},calendar:{keywords:["schedule","date","planning"],char:"📆",fitzpatrick_scale:false,category:"objects"},spiral_calendar:{keywords:["date","schedule","planning"],char:"🗓",fitzpatrick_scale:false,category:"objects"},card_index:{keywords:["business","stationery"],char:"📇",fitzpatrick_scale:false,category:"objects"},card_file_box:{keywords:["business","stationery"],char:"🗃",fitzpatrick_scale:false,category:"objects"},ballot_box:{keywords:["election","vote"],char:"🗳",fitzpatrick_scale:false,category:"objects"},file_cabinet:{keywords:["filing","organizing"],char:"🗄",fitzpatrick_scale:false,category:"objects"},clipboard:{keywords:["stationery","documents"],char:"📋",fitzpatrick_scale:false,category:"objects"},spiral_notepad:{keywords:["memo","stationery"],char:"🗒",fitzpatrick_scale:false,category:"objects"},file_folder:{keywords:["documents","business","office"],char:"📁",fitzpatrick_scale:false,category:"objects"},open_file_folder:{keywords:["documents","load"],char:"📂",fitzpatrick_scale:false,category:"objects"},card_index_dividers:{keywords:["organizing","business","stationery"],char:"🗂",fitzpatrick_scale:false,category:"objects"},newspaper_roll:{keywords:["press","headline"],char:"🗞",fitzpatrick_scale:false,category:"objects"},newspaper:{keywords:["press","headline"],char:"📰",fitzpatrick_scale:false,category:"objects"},notebook:{keywords:["stationery","record","notes","paper","study"],char:"📓",fitzpatrick_scale:false,category:"objects"},closed_book:{keywords:["read","library","knowledge","textbook","learn"],char:"📕",fitzpatrick_scale:false,category:"objects"},green_book:{keywords:["read","library","knowledge","study"],char:"📗",fitzpatrick_scale:false,category:"objects"},blue_book:{keywords:["read","library","knowledge","learn","study"],char:"📘",fitzpatrick_scale:false,category:"objects"},orange_book:{keywords:["read","library","knowledge","textbook","study"],char:"📙",fitzpatrick_scale:false,category:"objects"},notebook_with_decorative_cover:{keywords:["classroom","notes","record","paper","study"],char:"📔",fitzpatrick_scale:false,category:"objects"},ledger:{keywords:["notes","paper"],char:"📒",fitzpatrick_scale:false,category:"objects"},books:{keywords:["literature","library","study"],char:"📚",fitzpatrick_scale:false,category:"objects"},open_book:{keywords:["book","read","library","knowledge","literature","learn","study"],char:"📖",fitzpatrick_scale:false,category:"objects"},safety_pin:{keywords:["diaper"],char:"🧷",fitzpatrick_scale:false,category:"objects"},link:{keywords:["rings","url"],char:"🔗",fitzpatrick_scale:false,category:"objects"},paperclip:{keywords:["documents","stationery"],char:"📎",fitzpatrick_scale:false,category:"objects"},paperclips:{keywords:["documents","stationery"],char:"🖇",fitzpatrick_scale:false,category:"objects"},scissors:{keywords:["stationery","cut"],char:"✂️",fitzpatrick_scale:false,category:"objects"},triangular_ruler:{keywords:["stationery","math","architect","sketch"],char:"📐",fitzpatrick_scale:false,category:"objects"},straight_ruler:{keywords:["stationery","calculate","length","math","school","drawing","architect","sketch"],char:"📏",fitzpatrick_scale:false,category:"objects"},abacus:{keywords:["calculation"],char:"🧮",fitzpatrick_scale:false,category:"objects"},pushpin:{keywords:["stationery","mark","here"],char:"📌",fitzpatrick_scale:false,category:"objects"},round_pushpin:{keywords:["stationery","location","map","here"],char:"📍",fitzpatrick_scale:false,category:"objects"},triangular_flag_on_post:{keywords:["mark","milestone","place"],char:"🚩",fitzpatrick_scale:false,category:"objects"},white_flag:{keywords:["losing","loser","lost","surrender","give up","fail"],char:"🏳",fitzpatrick_scale:false,category:"objects"},black_flag:{keywords:["pirate"],char:"🏴",fitzpatrick_scale:false,category:"objects"},rainbow_flag:{keywords:["flag","rainbow","pride","gay","lgbt","glbt","queer","homosexual","lesbian","bisexual","transgender"],char:"🏳️‍🌈",fitzpatrick_scale:false,category:"objects"},closed_lock_with_key:{keywords:["security","privacy"],char:"🔐",fitzpatrick_scale:false,category:"objects"},lock:{keywords:["security","password","padlock"],char:"🔒",fitzpatrick_scale:false,category:"objects"},unlock:{keywords:["privacy","security"],char:"🔓",fitzpatrick_scale:false,category:"objects"},lock_with_ink_pen:{keywords:["security","secret"],char:"🔏",fitzpatrick_scale:false,category:"objects"},pen:{keywords:["stationery","writing","write"],char:"🖊",fitzpatrick_scale:false,category:"objects"},fountain_pen:{keywords:["stationery","writing","write"],char:"🖋",fitzpatrick_scale:false,category:"objects"},black_nib:{keywords:["pen","stationery","writing","write"],char:"✒️",fitzpatrick_scale:false,category:"objects"},memo:{keywords:["write","documents","stationery","pencil","paper","writing","legal","exam","quiz","test","study","compose"],char:"📝",fitzpatrick_scale:false,category:"objects"},pencil2:{keywords:["stationery","write","paper","writing","school","study"],char:"✏️",fitzpatrick_scale:false,category:"objects"},crayon:{keywords:["drawing","creativity"],char:"🖍",fitzpatrick_scale:false,category:"objects"},paintbrush:{keywords:["drawing","creativity","art"],char:"🖌",fitzpatrick_scale:false,category:"objects"},mag:{keywords:["search","zoom","find","detective"],char:"🔍",fitzpatrick_scale:false,category:"objects"},mag_right:{keywords:["search","zoom","find","detective"],char:"🔎",fitzpatrick_scale:false,category:"objects"},heart:{keywords:["love","like","valentines"],char:"❤️",fitzpatrick_scale:false,category:"symbols"},orange_heart:{keywords:["love","like","affection","valentines"],char:"🧡",fitzpatrick_scale:false,category:"symbols"},yellow_heart:{keywords:["love","like","affection","valentines"],char:"💛",fitzpatrick_scale:false,category:"symbols"},green_heart:{keywords:["love","like","affection","valentines"],char:"💚",fitzpatrick_scale:false,category:"symbols"},blue_heart:{keywords:["love","like","affection","valentines"],char:"💙",fitzpatrick_scale:false,category:"symbols"},purple_heart:{keywords:["love","like","affection","valentines"],char:"💜",fitzpatrick_scale:false,category:"symbols"},black_heart:{keywords:["evil"],char:"🖤",fitzpatrick_scale:false,category:"symbols"},broken_heart:{keywords:["sad","sorry","break","heart","heartbreak"],char:"💔",fitzpatrick_scale:false,category:"symbols"},heavy_heart_exclamation:{keywords:["decoration","love"],char:"❣",fitzpatrick_scale:false,category:"symbols"},two_hearts:{keywords:["love","like","affection","valentines","heart"],char:"💕",fitzpatrick_scale:false,category:"symbols"},revolving_hearts:{keywords:["love","like","affection","valentines"],char:"💞",fitzpatrick_scale:false,category:"symbols"},heartbeat:{keywords:["love","like","affection","valentines","pink","heart"],char:"💓",fitzpatrick_scale:false,category:"symbols"},heartpulse:{keywords:["like","love","affection","valentines","pink"],char:"💗",fitzpatrick_scale:false,category:"symbols"},sparkling_heart:{keywords:["love","like","affection","valentines"],char:"💖",fitzpatrick_scale:false,category:"symbols"},cupid:{keywords:["love","like","heart","affection","valentines"],char:"💘",fitzpatrick_scale:false,category:"symbols"},gift_heart:{keywords:["love","valentines"],char:"💝",fitzpatrick_scale:false,category:"symbols"},heart_decoration:{keywords:["purple-square","love","like"],char:"💟",fitzpatrick_scale:false,category:"symbols"},peace_symbol:{keywords:["hippie"],char:"☮",fitzpatrick_scale:false,category:"symbols"},latin_cross:{keywords:["christianity"],char:"✝",fitzpatrick_scale:false,category:"symbols"},star_and_crescent:{keywords:["islam"],char:"☪",fitzpatrick_scale:false,category:"symbols"},om:{keywords:["hinduism","buddhism","sikhism","jainism"],char:"🕉",fitzpatrick_scale:false,category:"symbols"},wheel_of_dharma:{keywords:["hinduism","buddhism","sikhism","jainism"],char:"☸",fitzpatrick_scale:false,category:"symbols"},star_of_david:{keywords:["judaism"],char:"✡",fitzpatrick_scale:false,category:"symbols"},six_pointed_star:{keywords:["purple-square","religion","jewish","hexagram"],char:"🔯",fitzpatrick_scale:false,category:"symbols"},menorah:{keywords:["hanukkah","candles","jewish"],char:"🕎",fitzpatrick_scale:false,category:"symbols"},yin_yang:{keywords:["balance"],char:"☯",fitzpatrick_scale:false,category:"symbols"},orthodox_cross:{keywords:["suppedaneum","religion"],char:"☦",fitzpatrick_scale:false,category:"symbols"},place_of_worship:{keywords:["religion","church","temple","prayer"],char:"🛐",fitzpatrick_scale:false,category:"symbols"},ophiuchus:{keywords:["sign","purple-square","constellation","astrology"],char:"⛎",fitzpatrick_scale:false,category:"symbols"},aries:{keywords:["sign","purple-square","zodiac","astrology"],char:"♈",fitzpatrick_scale:false,category:"symbols"},taurus:{keywords:["purple-square","sign","zodiac","astrology"],char:"♉",fitzpatrick_scale:false,category:"symbols"},gemini:{keywords:["sign","zodiac","purple-square","astrology"],char:"♊",fitzpatrick_scale:false,category:"symbols"},cancer:{keywords:["sign","zodiac","purple-square","astrology"],char:"♋",fitzpatrick_scale:false,category:"symbols"},leo:{keywords:["sign","purple-square","zodiac","astrology"],char:"♌",fitzpatrick_scale:false,category:"symbols"},virgo:{keywords:["sign","zodiac","purple-square","astrology"],char:"♍",fitzpatrick_scale:false,category:"symbols"},libra:{keywords:["sign","purple-square","zodiac","astrology"],char:"♎",fitzpatrick_scale:false,category:"symbols"},scorpius:{keywords:["sign","zodiac","purple-square","astrology","scorpio"],char:"♏",fitzpatrick_scale:false,category:"symbols"},sagittarius:{keywords:["sign","zodiac","purple-square","astrology"],char:"♐",fitzpatrick_scale:false,category:"symbols"},capricorn:{keywords:["sign","zodiac","purple-square","astrology"],char:"♑",fitzpatrick_scale:false,category:"symbols"},aquarius:{keywords:["sign","purple-square","zodiac","astrology"],char:"♒",fitzpatrick_scale:false,category:"symbols"},pisces:{keywords:["purple-square","sign","zodiac","astrology"],char:"♓",fitzpatrick_scale:false,category:"symbols"},id:{keywords:["purple-square","words"],char:"🆔",fitzpatrick_scale:false,category:"symbols"},atom_symbol:{keywords:["science","physics","chemistry"],char:"⚛",fitzpatrick_scale:false,category:"symbols"},u7a7a:{keywords:["kanji","japanese","chinese","empty","sky","blue-square"],char:"🈳",fitzpatrick_scale:false,category:"symbols"},u5272:{keywords:["cut","divide","chinese","kanji","pink-square"],char:"🈹",fitzpatrick_scale:false,category:"symbols"},radioactive:{keywords:["nuclear","danger"],char:"☢",fitzpatrick_scale:false,category:"symbols"},biohazard:{keywords:["danger"],char:"☣",fitzpatrick_scale:false,category:"symbols"},mobile_phone_off:{keywords:["mute","orange-square","silence","quiet"],char:"📴",fitzpatrick_scale:false,category:"symbols"},vibration_mode:{keywords:["orange-square","phone"],char:"📳",fitzpatrick_scale:false,category:"symbols"},u6709:{keywords:["orange-square","chinese","have","kanji"],char:"🈶",fitzpatrick_scale:false,category:"symbols"},u7121:{keywords:["nothing","chinese","kanji","japanese","orange-square"],char:"🈚",fitzpatrick_scale:false,category:"symbols"},u7533:{keywords:["chinese","japanese","kanji","orange-square"],char:"🈸",fitzpatrick_scale:false,category:"symbols"},u55b6:{keywords:["japanese","opening hours","orange-square"],char:"🈺",fitzpatrick_scale:false,category:"symbols"},u6708:{keywords:["chinese","month","moon","japanese","orange-square","kanji"],char:"🈷️",fitzpatrick_scale:false,category:"symbols"},eight_pointed_black_star:{keywords:["orange-square","shape","polygon"],char:"✴️",fitzpatrick_scale:false,category:"symbols"},vs:{keywords:["words","orange-square"],char:"🆚",fitzpatrick_scale:false,category:"symbols"},accept:{keywords:["ok","good","chinese","kanji","agree","yes","orange-circle"],char:"🉑",fitzpatrick_scale:false,category:"symbols"},white_flower:{keywords:["japanese","spring"],char:"💮",fitzpatrick_scale:false,category:"symbols"},ideograph_advantage:{keywords:["chinese","kanji","obtain","get","circle"],char:"🉐",fitzpatrick_scale:false,category:"symbols"},secret:{keywords:["privacy","chinese","sshh","kanji","red-circle"],char:"㊙️",fitzpatrick_scale:false,category:"symbols"},congratulations:{keywords:["chinese","kanji","japanese","red-circle"],char:"㊗️",fitzpatrick_scale:false,category:"symbols"},u5408:{keywords:["japanese","chinese","join","kanji","red-square"],char:"🈴",fitzpatrick_scale:false,category:"symbols"},u6e80:{keywords:["full","chinese","japanese","red-square","kanji"],char:"🈵",fitzpatrick_scale:false,category:"symbols"},u7981:{keywords:["kanji","japanese","chinese","forbidden","limit","restricted","red-square"],char:"🈲",fitzpatrick_scale:false,category:"symbols"},a:{keywords:["red-square","alphabet","letter"],char:"🅰️",fitzpatrick_scale:false,category:"symbols"},b:{keywords:["red-square","alphabet","letter"],char:"🅱️",fitzpatrick_scale:false,category:"symbols"},ab:{keywords:["red-square","alphabet"],char:"🆎",fitzpatrick_scale:false,category:"symbols"},cl:{keywords:["alphabet","words","red-square"],char:"🆑",fitzpatrick_scale:false,category:"symbols"},o2:{keywords:["alphabet","red-square","letter"],char:"🅾️",fitzpatrick_scale:false,category:"symbols"},sos:{keywords:["help","red-square","words","emergency","911"],char:"🆘",fitzpatrick_scale:false,category:"symbols"},no_entry:{keywords:["limit","security","privacy","bad","denied","stop","circle"],char:"⛔",fitzpatrick_scale:false,category:"symbols"},name_badge:{keywords:["fire","forbid"],char:"📛",fitzpatrick_scale:false,category:"symbols"},no_entry_sign:{keywords:["forbid","stop","limit","denied","disallow","circle"],char:"🚫",fitzpatrick_scale:false,category:"symbols"},x:{keywords:["no","delete","remove","cancel","red"],char:"❌",fitzpatrick_scale:false,category:"symbols"},o:{keywords:["circle","round"],char:"⭕",fitzpatrick_scale:false,category:"symbols"},stop_sign:{keywords:["stop"],char:"🛑",fitzpatrick_scale:false,category:"symbols"},anger:{keywords:["angry","mad"],char:"💢",fitzpatrick_scale:false,category:"symbols"},hotsprings:{keywords:["bath","warm","relax"],char:"♨️",fitzpatrick_scale:false,category:"symbols"},no_pedestrians:{keywords:["rules","crossing","walking","circle"],char:"🚷",fitzpatrick_scale:false,category:"symbols"},do_not_litter:{keywords:["trash","bin","garbage","circle"],char:"🚯",fitzpatrick_scale:false,category:"symbols"},no_bicycles:{keywords:["cyclist","prohibited","circle"],char:"🚳",fitzpatrick_scale:false,category:"symbols"},"non-potable_water":{keywords:["drink","faucet","tap","circle"],char:"🚱",fitzpatrick_scale:false,category:"symbols"},underage:{keywords:["18","drink","pub","night","minor","circle"],char:"🔞",fitzpatrick_scale:false,category:"symbols"},no_mobile_phones:{keywords:["iphone","mute","circle"],char:"📵",fitzpatrick_scale:false,category:"symbols"},exclamation:{keywords:["heavy_exclamation_mark","danger","surprise","punctuation","wow","warning"],char:"❗",fitzpatrick_scale:false,category:"symbols"},grey_exclamation:{keywords:["surprise","punctuation","gray","wow","warning"],char:"❕",fitzpatrick_scale:false,category:"symbols"},question:{keywords:["doubt","confused"],char:"❓",fitzpatrick_scale:false,category:"symbols"},grey_question:{keywords:["doubts","gray","huh","confused"],char:"❔",fitzpatrick_scale:false,category:"symbols"},bangbang:{keywords:["exclamation","surprise"],char:"‼️",fitzpatrick_scale:false,category:"symbols"},interrobang:{keywords:["wat","punctuation","surprise"],char:"⁉️",fitzpatrick_scale:false,category:"symbols"},100:{keywords:["score","perfect","numbers","century","exam","quiz","test","pass","hundred"],char:"💯",fitzpatrick_scale:false,category:"symbols"},low_brightness:{keywords:["sun","afternoon","warm","summer"],char:"🔅",fitzpatrick_scale:false,category:"symbols"},high_brightness:{keywords:["sun","light"],char:"🔆",fitzpatrick_scale:false,category:"symbols"},trident:{keywords:["weapon","spear"],char:"🔱",fitzpatrick_scale:false,category:"symbols"},fleur_de_lis:{keywords:["decorative","scout"],char:"⚜",fitzpatrick_scale:false,category:"symbols"},part_alternation_mark:{keywords:["graph","presentation","stats","business","economics","bad"],char:"〽️",fitzpatrick_scale:false,category:"symbols"},warning:{keywords:["exclamation","wip","alert","error","problem","issue"],char:"⚠️",fitzpatrick_scale:false,category:"symbols"},children_crossing:{keywords:["school","warning","danger","sign","driving","yellow-diamond"],char:"🚸",fitzpatrick_scale:false,category:"symbols"},beginner:{keywords:["badge","shield"],char:"🔰",fitzpatrick_scale:false,category:"symbols"},recycle:{keywords:["arrow","environment","garbage","trash"],char:"♻️",fitzpatrick_scale:false,category:"symbols"},u6307:{keywords:["chinese","point","green-square","kanji"],char:"🈯",fitzpatrick_scale:false,category:"symbols"},chart:{keywords:["green-square","graph","presentation","stats"],char:"💹",fitzpatrick_scale:false,category:"symbols"},sparkle:{keywords:["stars","green-square","awesome","good","fireworks"],char:"❇️",fitzpatrick_scale:false,category:"symbols"},eight_spoked_asterisk:{keywords:["star","sparkle","green-square"],char:"✳️",fitzpatrick_scale:false,category:"symbols"},negative_squared_cross_mark:{keywords:["x","green-square","no","deny"],char:"❎",fitzpatrick_scale:false,category:"symbols"},white_check_mark:{keywords:["green-square","ok","agree","vote","election","answer","tick"],char:"✅",fitzpatrick_scale:false,category:"symbols"},diamond_shape_with_a_dot_inside:{keywords:["jewel","blue","gem","crystal","fancy"],char:"💠",fitzpatrick_scale:false,category:"symbols"},cyclone:{keywords:["weather","swirl","blue","cloud","vortex","spiral","whirlpool","spin","tornado","hurricane","typhoon"],char:"🌀",fitzpatrick_scale:false,category:"symbols"},loop:{keywords:["tape","cassette"],char:"➿",fitzpatrick_scale:false,category:"symbols"},globe_with_meridians:{keywords:["earth","international","world","internet","interweb","i18n"],char:"🌐",fitzpatrick_scale:false,category:"symbols"},m:{keywords:["alphabet","blue-circle","letter"],char:"Ⓜ️",fitzpatrick_scale:false,category:"symbols"},atm:{keywords:["money","sales","cash","blue-square","payment","bank"],char:"🏧",fitzpatrick_scale:false,category:"symbols"},sa:{keywords:["japanese","blue-square","katakana"],char:"🈂️",fitzpatrick_scale:false,category:"symbols"},passport_control:{keywords:["custom","blue-square"],char:"🛂",fitzpatrick_scale:false,category:"symbols"},customs:{keywords:["passport","border","blue-square"],char:"🛃",fitzpatrick_scale:false,category:"symbols"},baggage_claim:{keywords:["blue-square","airport","transport"],char:"🛄",fitzpatrick_scale:false,category:"symbols"},left_luggage:{keywords:["blue-square","travel"],char:"🛅",fitzpatrick_scale:false,category:"symbols"},wheelchair:{keywords:["blue-square","disabled","a11y","accessibility"],char:"♿",fitzpatrick_scale:false,category:"symbols"},no_smoking:{keywords:["cigarette","blue-square","smell","smoke"],char:"🚭",fitzpatrick_scale:false,category:"symbols"},wc:{keywords:["toilet","restroom","blue-square"],char:"🚾",fitzpatrick_scale:false,category:"symbols"},parking:{keywords:["cars","blue-square","alphabet","letter"],char:"🅿️",fitzpatrick_scale:false,category:"symbols"},potable_water:{keywords:["blue-square","liquid","restroom","cleaning","faucet"],char:"🚰",fitzpatrick_scale:false,category:"symbols"},mens:{keywords:["toilet","restroom","wc","blue-square","gender","male"],char:"🚹",fitzpatrick_scale:false,category:"symbols"},womens:{keywords:["purple-square","woman","female","toilet","loo","restroom","gender"],char:"🚺",fitzpatrick_scale:false,category:"symbols"},baby_symbol:{keywords:["orange-square","child"],char:"🚼",fitzpatrick_scale:false,category:"symbols"},restroom:{keywords:["blue-square","toilet","refresh","wc","gender"],char:"🚻",fitzpatrick_scale:false,category:"symbols"},put_litter_in_its_place:{keywords:["blue-square","sign","human","info"],char:"🚮",fitzpatrick_scale:false,category:"symbols"},cinema:{keywords:["blue-square","record","film","movie","curtain","stage","theater"],char:"🎦",fitzpatrick_scale:false,category:"symbols"},signal_strength:{keywords:["blue-square","reception","phone","internet","connection","wifi","bluetooth","bars"],char:"📶",fitzpatrick_scale:false,category:"symbols"},koko:{keywords:["blue-square","here","katakana","japanese","destination"],char:"🈁",fitzpatrick_scale:false,category:"symbols"},ng:{keywords:["blue-square","words","shape","icon"],char:"🆖",fitzpatrick_scale:false,category:"symbols"},ok:{keywords:["good","agree","yes","blue-square"],char:"🆗",fitzpatrick_scale:false,category:"symbols"},up:{keywords:["blue-square","above","high"],char:"🆙",fitzpatrick_scale:false,category:"symbols"},cool:{keywords:["words","blue-square"],char:"🆒",fitzpatrick_scale:false,category:"symbols"},new:{keywords:["blue-square","words","start"],char:"🆕",fitzpatrick_scale:false,category:"symbols"},free:{keywords:["blue-square","words"],char:"🆓",fitzpatrick_scale:false,category:"symbols"},zero:{keywords:["0","numbers","blue-square","null"],char:"0️⃣",fitzpatrick_scale:false,category:"symbols"},one:{keywords:["blue-square","numbers","1"],char:"1️⃣",fitzpatrick_scale:false,category:"symbols"},two:{keywords:["numbers","2","prime","blue-square"],char:"2️⃣",fitzpatrick_scale:false,category:"symbols"},three:{keywords:["3","numbers","prime","blue-square"],char:"3️⃣",fitzpatrick_scale:false,category:"symbols"},four:{keywords:["4","numbers","blue-square"],char:"4️⃣",fitzpatrick_scale:false,category:"symbols"},five:{keywords:["5","numbers","blue-square","prime"],char:"5️⃣",fitzpatrick_scale:false,category:"symbols"},six:{keywords:["6","numbers","blue-square"],char:"6️⃣",fitzpatrick_scale:false,category:"symbols"},seven:{keywords:["7","numbers","blue-square","prime"],char:"7️⃣",fitzpatrick_scale:false,category:"symbols"},eight:{keywords:["8","blue-square","numbers"],char:"8️⃣",fitzpatrick_scale:false,category:"symbols"},nine:{keywords:["blue-square","numbers","9"],char:"9️⃣",fitzpatrick_scale:false,category:"symbols"},keycap_ten:{keywords:["numbers","10","blue-square"],char:"🔟",fitzpatrick_scale:false,category:"symbols"},asterisk:{keywords:["star","keycap"],char:"*⃣",fitzpatrick_scale:false,category:"symbols"},1234:{keywords:["numbers","blue-square"],char:"🔢",fitzpatrick_scale:false,category:"symbols"},eject_button:{keywords:["blue-square"],char:"⏏️",fitzpatrick_scale:false,category:"symbols"},arrow_forward:{keywords:["blue-square","right","direction","play"],char:"▶️",fitzpatrick_scale:false,category:"symbols"},pause_button:{keywords:["pause","blue-square"],char:"⏸",fitzpatrick_scale:false,category:"symbols"},next_track_button:{keywords:["forward","next","blue-square"],char:"⏭",fitzpatrick_scale:false,category:"symbols"},stop_button:{keywords:["blue-square"],char:"⏹",fitzpatrick_scale:false,category:"symbols"},record_button:{keywords:["blue-square"],char:"⏺",fitzpatrick_scale:false,category:"symbols"},play_or_pause_button:{keywords:["blue-square","play","pause"],char:"⏯",fitzpatrick_scale:false,category:"symbols"},previous_track_button:{keywords:["backward"],char:"⏮",fitzpatrick_scale:false,category:"symbols"},fast_forward:{keywords:["blue-square","play","speed","continue"],char:"⏩",fitzpatrick_scale:false,category:"symbols"},rewind:{keywords:["play","blue-square"],char:"⏪",fitzpatrick_scale:false,category:"symbols"},twisted_rightwards_arrows:{keywords:["blue-square","shuffle","music","random"],char:"🔀",fitzpatrick_scale:false,category:"symbols"},repeat:{keywords:["loop","record"],char:"🔁",fitzpatrick_scale:false,category:"symbols"},repeat_one:{keywords:["blue-square","loop"],char:"🔂",fitzpatrick_scale:false,category:"symbols"},arrow_backward:{keywords:["blue-square","left","direction"],char:"◀️",fitzpatrick_scale:false,category:"symbols"},arrow_up_small:{keywords:["blue-square","triangle","direction","point","forward","top"],char:"🔼",fitzpatrick_scale:false,category:"symbols"},arrow_down_small:{keywords:["blue-square","direction","bottom"],char:"🔽",fitzpatrick_scale:false,category:"symbols"},arrow_double_up:{keywords:["blue-square","direction","top"],char:"⏫",fitzpatrick_scale:false,category:"symbols"},arrow_double_down:{keywords:["blue-square","direction","bottom"],char:"⏬",fitzpatrick_scale:false,category:"symbols"},arrow_right:{keywords:["blue-square","next"],char:"➡️",fitzpatrick_scale:false,category:"symbols"},arrow_left:{keywords:["blue-square","previous","back"],char:"⬅️",fitzpatrick_scale:false,category:"symbols"},arrow_up:{keywords:["blue-square","continue","top","direction"],char:"⬆️",fitzpatrick_scale:false,category:"symbols"},arrow_down:{keywords:["blue-square","direction","bottom"],char:"⬇️",fitzpatrick_scale:false,category:"symbols"},arrow_upper_right:{keywords:["blue-square","point","direction","diagonal","northeast"],char:"↗️",fitzpatrick_scale:false,category:"symbols"},arrow_lower_right:{keywords:["blue-square","direction","diagonal","southeast"],char:"↘️",fitzpatrick_scale:false,category:"symbols"},arrow_lower_left:{keywords:["blue-square","direction","diagonal","southwest"],char:"↙️",fitzpatrick_scale:false,category:"symbols"},arrow_upper_left:{keywords:["blue-square","point","direction","diagonal","northwest"],char:"↖️",fitzpatrick_scale:false,category:"symbols"},arrow_up_down:{keywords:["blue-square","direction","way","vertical"],char:"↕️",fitzpatrick_scale:false,category:"symbols"},left_right_arrow:{keywords:["shape","direction","horizontal","sideways"],char:"↔️",fitzpatrick_scale:false,category:"symbols"},arrows_counterclockwise:{keywords:["blue-square","sync","cycle"],char:"🔄",fitzpatrick_scale:false,category:"symbols"},arrow_right_hook:{keywords:["blue-square","return","rotate","direction"],char:"↪️",fitzpatrick_scale:false,category:"symbols"},leftwards_arrow_with_hook:{keywords:["back","return","blue-square","undo","enter"],char:"↩️",fitzpatrick_scale:false,category:"symbols"},arrow_heading_up:{keywords:["blue-square","direction","top"],char:"⤴️",fitzpatrick_scale:false,category:"symbols"},arrow_heading_down:{keywords:["blue-square","direction","bottom"],char:"⤵️",fitzpatrick_scale:false,category:"symbols"},hash:{keywords:["symbol","blue-square","twitter"],char:"#️⃣",fitzpatrick_scale:false,category:"symbols"},information_source:{keywords:["blue-square","alphabet","letter"],char:"ℹ️",fitzpatrick_scale:false,category:"symbols"},abc:{keywords:["blue-square","alphabet"],char:"🔤",fitzpatrick_scale:false,category:"symbols"},abcd:{keywords:["blue-square","alphabet"],char:"🔡",fitzpatrick_scale:false,category:"symbols"},capital_abcd:{keywords:["alphabet","words","blue-square"],char:"🔠",fitzpatrick_scale:false,category:"symbols"},symbols:{keywords:["blue-square","music","note","ampersand","percent","glyphs","characters"],char:"🔣",fitzpatrick_scale:false,category:"symbols"},musical_note:{keywords:["score","tone","sound"],char:"🎵",fitzpatrick_scale:false,category:"symbols"},notes:{keywords:["music","score"],char:"🎶",fitzpatrick_scale:false,category:"symbols"},wavy_dash:{keywords:["draw","line","moustache","mustache","squiggle","scribble"],char:"〰️",fitzpatrick_scale:false,category:"symbols"},curly_loop:{keywords:["scribble","draw","shape","squiggle"],char:"➰",fitzpatrick_scale:false,category:"symbols"},heavy_check_mark:{keywords:["ok","nike","answer","yes","tick"],char:"✔️",fitzpatrick_scale:false,category:"symbols"},arrows_clockwise:{keywords:["sync","cycle","round","repeat"],char:"🔃",fitzpatrick_scale:false,category:"symbols"},heavy_plus_sign:{keywords:["math","calculation","addition","more","increase"],char:"➕",fitzpatrick_scale:false,category:"symbols"},heavy_minus_sign:{keywords:["math","calculation","subtract","less"],char:"➖",fitzpatrick_scale:false,category:"symbols"},heavy_division_sign:{keywords:["divide","math","calculation"],char:"➗",fitzpatrick_scale:false,category:"symbols"},heavy_multiplication_x:{keywords:["math","calculation"],char:"✖️",fitzpatrick_scale:false,category:"symbols"},infinity:{keywords:["forever"],char:"♾",fitzpatrick_scale:false,category:"symbols"},heavy_dollar_sign:{keywords:["money","sales","payment","currency","buck"],char:"💲",fitzpatrick_scale:false,category:"symbols"},currency_exchange:{keywords:["money","sales","dollar","travel"],char:"💱",fitzpatrick_scale:false,category:"symbols"},copyright:{keywords:["ip","license","circle","law","legal"],char:"©️",fitzpatrick_scale:false,category:"symbols"},registered:{keywords:["alphabet","circle"],char:"®️",fitzpatrick_scale:false,category:"symbols"},tm:{keywords:["trademark","brand","law","legal"],char:"™️",fitzpatrick_scale:false,category:"symbols"},end:{keywords:["words","arrow"],char:"🔚",fitzpatrick_scale:false,category:"symbols"},back:{keywords:["arrow","words","return"],char:"🔙",fitzpatrick_scale:false,category:"symbols"},on:{keywords:["arrow","words"],char:"🔛",fitzpatrick_scale:false,category:"symbols"},top:{keywords:["words","blue-square"],char:"🔝",fitzpatrick_scale:false,category:"symbols"},soon:{keywords:["arrow","words"],char:"🔜",fitzpatrick_scale:false,category:"symbols"},ballot_box_with_check:{keywords:["ok","agree","confirm","black-square","vote","election","yes","tick"],char:"☑️",fitzpatrick_scale:false,category:"symbols"},radio_button:{keywords:["input","old","music","circle"],char:"🔘",fitzpatrick_scale:false,category:"symbols"},white_circle:{keywords:["shape","round"],char:"⚪",fitzpatrick_scale:false,category:"symbols"},black_circle:{keywords:["shape","button","round"],char:"⚫",fitzpatrick_scale:false,category:"symbols"},red_circle:{keywords:["shape","error","danger"],char:"🔴",fitzpatrick_scale:false,category:"symbols"},large_blue_circle:{keywords:["shape","icon","button"],char:"🔵",fitzpatrick_scale:false,category:"symbols"},small_orange_diamond:{keywords:["shape","jewel","gem"],char:"🔸",fitzpatrick_scale:false,category:"symbols"},small_blue_diamond:{keywords:["shape","jewel","gem"],char:"🔹",fitzpatrick_scale:false,category:"symbols"},large_orange_diamond:{keywords:["shape","jewel","gem"],char:"🔶",fitzpatrick_scale:false,category:"symbols"},large_blue_diamond:{keywords:["shape","jewel","gem"],char:"🔷",fitzpatrick_scale:false,category:"symbols"},small_red_triangle:{keywords:["shape","direction","up","top"],char:"🔺",fitzpatrick_scale:false,category:"symbols"},black_small_square:{keywords:["shape","icon"],char:"▪️",fitzpatrick_scale:false,category:"symbols"},white_small_square:{keywords:["shape","icon"],char:"▫️",fitzpatrick_scale:false,category:"symbols"},black_large_square:{keywords:["shape","icon","button"],char:"⬛",fitzpatrick_scale:false,category:"symbols"},white_large_square:{keywords:["shape","icon","stone","button"],char:"⬜",fitzpatrick_scale:false,category:"symbols"},small_red_triangle_down:{keywords:["shape","direction","bottom"],char:"🔻",fitzpatrick_scale:false,category:"symbols"},black_medium_square:{keywords:["shape","button","icon"],char:"◼️",fitzpatrick_scale:false,category:"symbols"},white_medium_square:{keywords:["shape","stone","icon"],char:"◻️",fitzpatrick_scale:false,category:"symbols"},black_medium_small_square:{keywords:["icon","shape","button"],char:"◾",fitzpatrick_scale:false,category:"symbols"},white_medium_small_square:{keywords:["shape","stone","icon","button"],char:"◽",fitzpatrick_scale:false,category:"symbols"},black_square_button:{keywords:["shape","input","frame"],char:"🔲",fitzpatrick_scale:false,category:"symbols"},white_square_button:{keywords:["shape","input"],char:"🔳",fitzpatrick_scale:false,category:"symbols"},speaker:{keywords:["sound","volume","silence","broadcast"],char:"🔈",fitzpatrick_scale:false,category:"symbols"},sound:{keywords:["volume","speaker","broadcast"],char:"🔉",fitzpatrick_scale:false,category:"symbols"},loud_sound:{keywords:["volume","noise","noisy","speaker","broadcast"],char:"🔊",fitzpatrick_scale:false,category:"symbols"},mute:{keywords:["sound","volume","silence","quiet"],char:"🔇",fitzpatrick_scale:false,category:"symbols"},mega:{keywords:["sound","speaker","volume"],char:"📣",fitzpatrick_scale:false,category:"symbols"},loudspeaker:{keywords:["volume","sound"],char:"📢",fitzpatrick_scale:false,category:"symbols"},bell:{keywords:["sound","notification","christmas","xmas","chime"],char:"🔔",fitzpatrick_scale:false,category:"symbols"},no_bell:{keywords:["sound","volume","mute","quiet","silent"],char:"🔕",fitzpatrick_scale:false,category:"symbols"},black_joker:{keywords:["poker","cards","game","play","magic"],char:"🃏",fitzpatrick_scale:false,category:"symbols"},mahjong:{keywords:["game","play","chinese","kanji"],char:"🀄",fitzpatrick_scale:false,category:"symbols"},spades:{keywords:["poker","cards","suits","magic"],char:"♠️",fitzpatrick_scale:false,category:"symbols"},clubs:{keywords:["poker","cards","magic","suits"],char:"♣️",fitzpatrick_scale:false,category:"symbols"},hearts:{keywords:["poker","cards","magic","suits"],char:"♥️",fitzpatrick_scale:false,category:"symbols"},diamonds:{keywords:["poker","cards","magic","suits"],char:"♦️",fitzpatrick_scale:false,category:"symbols"},flower_playing_cards:{keywords:["game","sunset","red"],char:"🎴",fitzpatrick_scale:false,category:"symbols"},thought_balloon:{keywords:["bubble","cloud","speech","thinking","dream"],char:"💭",fitzpatrick_scale:false,category:"symbols"},right_anger_bubble:{keywords:["caption","speech","thinking","mad"],char:"🗯",fitzpatrick_scale:false,category:"symbols"},speech_balloon:{keywords:["bubble","words","message","talk","chatting"],char:"💬",fitzpatrick_scale:false,category:"symbols"},left_speech_bubble:{keywords:["words","message","talk","chatting"],char:"🗨",fitzpatrick_scale:false,category:"symbols"},clock1:{keywords:["time","late","early","schedule"],char:"🕐",fitzpatrick_scale:false,category:"symbols"},clock2:{keywords:["time","late","early","schedule"],char:"🕑",fitzpatrick_scale:false,category:"symbols"},clock3:{keywords:["time","late","early","schedule"],char:"🕒",fitzpatrick_scale:false,category:"symbols"},clock4:{keywords:["time","late","early","schedule"],char:"🕓",fitzpatrick_scale:false,category:"symbols"},clock5:{keywords:["time","late","early","schedule"],char:"🕔",fitzpatrick_scale:false,category:"symbols"},clock6:{keywords:["time","late","early","schedule","dawn","dusk"],char:"🕕",fitzpatrick_scale:false,category:"symbols"},clock7:{keywords:["time","late","early","schedule"],char:"🕖",fitzpatrick_scale:false,category:"symbols"},clock8:{keywords:["time","late","early","schedule"],char:"🕗",fitzpatrick_scale:false,category:"symbols"},clock9:{keywords:["time","late","early","schedule"],char:"🕘",fitzpatrick_scale:false,category:"symbols"},clock10:{keywords:["time","late","early","schedule"],char:"🕙",fitzpatrick_scale:false,category:"symbols"},clock11:{keywords:["time","late","early","schedule"],char:"🕚",fitzpatrick_scale:false,category:"symbols"},clock12:{keywords:["time","noon","midnight","midday","late","early","schedule"],char:"🕛",fitzpatrick_scale:false,category:"symbols"},clock130:{keywords:["time","late","early","schedule"],char:"🕜",fitzpatrick_scale:false,category:"symbols"},clock230:{keywords:["time","late","early","schedule"],char:"🕝",fitzpatrick_scale:false,category:"symbols"},clock330:{keywords:["time","late","early","schedule"],char:"🕞",fitzpatrick_scale:false,category:"symbols"},clock430:{keywords:["time","late","early","schedule"],char:"🕟",fitzpatrick_scale:false,category:"symbols"},clock530:{keywords:["time","late","early","schedule"],char:"🕠",fitzpatrick_scale:false,category:"symbols"},clock630:{keywords:["time","late","early","schedule"],char:"🕡",fitzpatrick_scale:false,category:"symbols"},clock730:{keywords:["time","late","early","schedule"],char:"🕢",fitzpatrick_scale:false,category:"symbols"},clock830:{keywords:["time","late","early","schedule"],char:"🕣",fitzpatrick_scale:false,category:"symbols"},clock930:{keywords:["time","late","early","schedule"],char:"🕤",fitzpatrick_scale:false,category:"symbols"},clock1030:{keywords:["time","late","early","schedule"],char:"🕥",fitzpatrick_scale:false,category:"symbols"},clock1130:{keywords:["time","late","early","schedule"],char:"🕦",fitzpatrick_scale:false,category:"symbols"},clock1230:{keywords:["time","late","early","schedule"],char:"🕧",fitzpatrick_scale:false,category:"symbols"},afghanistan:{keywords:["af","flag","nation","country","banner"],char:"🇦🇫",fitzpatrick_scale:false,category:"flags"},aland_islands:{keywords:["Åland","islands","flag","nation","country","banner"],char:"🇦🇽",fitzpatrick_scale:false,category:"flags"},albania:{keywords:["al","flag","nation","country","banner"],char:"🇦🇱",fitzpatrick_scale:false,category:"flags"},algeria:{keywords:["dz","flag","nation","country","banner"],char:"🇩🇿",fitzpatrick_scale:false,category:"flags"},american_samoa:{keywords:["american","ws","flag","nation","country","banner"],char:"🇦🇸",fitzpatrick_scale:false,category:"flags"},andorra:{keywords:["ad","flag","nation","country","banner"],char:"🇦🇩",fitzpatrick_scale:false,category:"flags"},angola:{keywords:["ao","flag","nation","country","banner"],char:"🇦🇴",fitzpatrick_scale:false,category:"flags"},anguilla:{keywords:["ai","flag","nation","country","banner"],char:"🇦🇮",fitzpatrick_scale:false,category:"flags"},antarctica:{keywords:["aq","flag","nation","country","banner"],char:"🇦🇶",fitzpatrick_scale:false,category:"flags"},antigua_barbuda:{keywords:["antigua","barbuda","flag","nation","country","banner"],char:"🇦🇬",fitzpatrick_scale:false,category:"flags"},argentina:{keywords:["ar","flag","nation","country","banner"],char:"🇦🇷",fitzpatrick_scale:false,category:"flags"},armenia:{keywords:["am","flag","nation","country","banner"],char:"🇦🇲",fitzpatrick_scale:false,category:"flags"},aruba:{keywords:["aw","flag","nation","country","banner"],char:"🇦🇼",fitzpatrick_scale:false,category:"flags"},australia:{keywords:["au","flag","nation","country","banner"],char:"🇦🇺",fitzpatrick_scale:false,category:"flags"},austria:{keywords:["at","flag","nation","country","banner"],char:"🇦🇹",fitzpatrick_scale:false,category:"flags"},azerbaijan:{keywords:["az","flag","nation","country","banner"],char:"🇦🇿",fitzpatrick_scale:false,category:"flags"},bahamas:{keywords:["bs","flag","nation","country","banner"],char:"🇧🇸",fitzpatrick_scale:false,category:"flags"},bahrain:{keywords:["bh","flag","nation","country","banner"],char:"🇧🇭",fitzpatrick_scale:false,category:"flags"},bangladesh:{keywords:["bd","flag","nation","country","banner"],char:"🇧🇩",fitzpatrick_scale:false,category:"flags"},barbados:{keywords:["bb","flag","nation","country","banner"],char:"🇧🇧",fitzpatrick_scale:false,category:"flags"},belarus:{keywords:["by","flag","nation","country","banner"],char:"🇧🇾",fitzpatrick_scale:false,category:"flags"},belgium:{keywords:["be","flag","nation","country","banner"],char:"🇧🇪",fitzpatrick_scale:false,category:"flags"},belize:{keywords:["bz","flag","nation","country","banner"],char:"🇧🇿",fitzpatrick_scale:false,category:"flags"},benin:{keywords:["bj","flag","nation","country","banner"],char:"🇧🇯",fitzpatrick_scale:false,category:"flags"},bermuda:{keywords:["bm","flag","nation","country","banner"],char:"🇧🇲",fitzpatrick_scale:false,category:"flags"},bhutan:{keywords:["bt","flag","nation","country","banner"],char:"🇧🇹",fitzpatrick_scale:false,category:"flags"},bolivia:{keywords:["bo","flag","nation","country","banner"],char:"🇧🇴",fitzpatrick_scale:false,category:"flags"},caribbean_netherlands:{keywords:["bonaire","flag","nation","country","banner"],char:"🇧🇶",fitzpatrick_scale:false,category:"flags"},bosnia_herzegovina:{keywords:["bosnia","herzegovina","flag","nation","country","banner"],char:"🇧🇦",fitzpatrick_scale:false,category:"flags"},botswana:{keywords:["bw","flag","nation","country","banner"],char:"🇧🇼",fitzpatrick_scale:false,category:"flags"},brazil:{keywords:["br","flag","nation","country","banner"],char:"🇧🇷",fitzpatrick_scale:false,category:"flags"},british_indian_ocean_territory:{keywords:["british","indian","ocean","territory","flag","nation","country","banner"],char:"🇮🇴",fitzpatrick_scale:false,category:"flags"},british_virgin_islands:{keywords:["british","virgin","islands","bvi","flag","nation","country","banner"],char:"🇻🇬",fitzpatrick_scale:false,category:"flags"},brunei:{keywords:["bn","darussalam","flag","nation","country","banner"],char:"🇧🇳",fitzpatrick_scale:false,category:"flags"},bulgaria:{keywords:["bg","flag","nation","country","banner"],char:"🇧🇬",fitzpatrick_scale:false,category:"flags"},burkina_faso:{keywords:["burkina","faso","flag","nation","country","banner"],char:"🇧🇫",fitzpatrick_scale:false,category:"flags"},burundi:{keywords:["bi","flag","nation","country","banner"],char:"🇧🇮",fitzpatrick_scale:false,category:"flags"},cape_verde:{keywords:["cabo","verde","flag","nation","country","banner"],char:"🇨🇻",fitzpatrick_scale:false,category:"flags"},cambodia:{keywords:["kh","flag","nation","country","banner"],char:"🇰🇭",fitzpatrick_scale:false,category:"flags"},cameroon:{keywords:["cm","flag","nation","country","banner"],char:"🇨🇲",fitzpatrick_scale:false,category:"flags"},canada:{keywords:["ca","flag","nation","country","banner"],char:"🇨🇦",fitzpatrick_scale:false,category:"flags"},canary_islands:{keywords:["canary","islands","flag","nation","country","banner"],char:"🇮🇨",fitzpatrick_scale:false,category:"flags"},cayman_islands:{keywords:["cayman","islands","flag","nation","country","banner"],char:"🇰🇾",fitzpatrick_scale:false,category:"flags"},central_african_republic:{keywords:["central","african","republic","flag","nation","country","banner"],char:"🇨🇫",fitzpatrick_scale:false,category:"flags"},chad:{keywords:["td","flag","nation","country","banner"],char:"🇹🇩",fitzpatrick_scale:false,category:"flags"},chile:{keywords:["flag","nation","country","banner"],char:"🇨🇱",fitzpatrick_scale:false,category:"flags"},cn:{keywords:["china","chinese","prc","flag","country","nation","banner"],char:"🇨🇳",fitzpatrick_scale:false,category:"flags"},christmas_island:{keywords:["christmas","island","flag","nation","country","banner"],char:"🇨🇽",fitzpatrick_scale:false,category:"flags"},cocos_islands:{keywords:["cocos","keeling","islands","flag","nation","country","banner"],char:"🇨🇨",fitzpatrick_scale:false,category:"flags"},colombia:{keywords:["co","flag","nation","country","banner"],char:"🇨🇴",fitzpatrick_scale:false,category:"flags"},comoros:{keywords:["km","flag","nation","country","banner"],char:"🇰🇲",fitzpatrick_scale:false,category:"flags"},congo_brazzaville:{keywords:["congo","flag","nation","country","banner"],char:"🇨🇬",fitzpatrick_scale:false,category:"flags"},congo_kinshasa:{keywords:["congo","democratic","republic","flag","nation","country","banner"],char:"🇨🇩",fitzpatrick_scale:false,category:"flags"},cook_islands:{keywords:["cook","islands","flag","nation","country","banner"],char:"🇨🇰",fitzpatrick_scale:false,category:"flags"},costa_rica:{keywords:["costa","rica","flag","nation","country","banner"],char:"🇨🇷",fitzpatrick_scale:false,category:"flags"},croatia:{keywords:["hr","flag","nation","country","banner"],char:"🇭🇷",fitzpatrick_scale:false,category:"flags"},cuba:{keywords:["cu","flag","nation","country","banner"],char:"🇨🇺",fitzpatrick_scale:false,category:"flags"},curacao:{keywords:["curaçao","flag","nation","country","banner"],char:"🇨🇼",fitzpatrick_scale:false,category:"flags"},cyprus:{keywords:["cy","flag","nation","country","banner"],char:"🇨🇾",fitzpatrick_scale:false,category:"flags"},czech_republic:{keywords:["cz","flag","nation","country","banner"],char:"🇨🇿",fitzpatrick_scale:false,category:"flags"},denmark:{keywords:["dk","flag","nation","country","banner"],char:"🇩🇰",fitzpatrick_scale:false,category:"flags"},djibouti:{keywords:["dj","flag","nation","country","banner"],char:"🇩🇯",fitzpatrick_scale:false,category:"flags"},dominica:{keywords:["dm","flag","nation","country","banner"],char:"🇩🇲",fitzpatrick_scale:false,category:"flags"},dominican_republic:{keywords:["dominican","republic","flag","nation","country","banner"],char:"🇩🇴",fitzpatrick_scale:false,category:"flags"},ecuador:{keywords:["ec","flag","nation","country","banner"],char:"🇪🇨",fitzpatrick_scale:false,category:"flags"},egypt:{keywords:["eg","flag","nation","country","banner"],char:"🇪🇬",fitzpatrick_scale:false,category:"flags"},el_salvador:{keywords:["el","salvador","flag","nation","country","banner"],char:"🇸🇻",fitzpatrick_scale:false,category:"flags"},equatorial_guinea:{keywords:["equatorial","gn","flag","nation","country","banner"],char:"🇬🇶",fitzpatrick_scale:false,category:"flags"},eritrea:{keywords:["er","flag","nation","country","banner"],char:"🇪🇷",fitzpatrick_scale:false,category:"flags"},estonia:{keywords:["ee","flag","nation","country","banner"],char:"🇪🇪",fitzpatrick_scale:false,category:"flags"},ethiopia:{keywords:["et","flag","nation","country","banner"],char:"🇪🇹",fitzpatrick_scale:false,category:"flags"},eu:{keywords:["european","union","flag","banner"],char:"🇪🇺",fitzpatrick_scale:false,category:"flags"},falkland_islands:{keywords:["falkland","islands","malvinas","flag","nation","country","banner"],char:"🇫🇰",fitzpatrick_scale:false,category:"flags"},faroe_islands:{keywords:["faroe","islands","flag","nation","country","banner"],char:"🇫🇴",fitzpatrick_scale:false,category:"flags"},fiji:{keywords:["fj","flag","nation","country","banner"],char:"🇫🇯",fitzpatrick_scale:false,category:"flags"},finland:{keywords:["fi","flag","nation","country","banner"],char:"🇫🇮",fitzpatrick_scale:false,category:"flags"},fr:{keywords:["banner","flag","nation","france","french","country"],char:"🇫🇷",fitzpatrick_scale:false,category:"flags"},french_guiana:{keywords:["french","guiana","flag","nation","country","banner"],char:"🇬🇫",fitzpatrick_scale:false,category:"flags"},french_polynesia:{keywords:["french","polynesia","flag","nation","country","banner"],char:"🇵🇫",fitzpatrick_scale:false,category:"flags"},french_southern_territories:{keywords:["french","southern","territories","flag","nation","country","banner"],char:"🇹🇫",fitzpatrick_scale:false,category:"flags"},gabon:{keywords:["ga","flag","nation","country","banner"],char:"🇬🇦",fitzpatrick_scale:false,category:"flags"},gambia:{keywords:["gm","flag","nation","country","banner"],char:"🇬🇲",fitzpatrick_scale:false,category:"flags"},georgia:{keywords:["ge","flag","nation","country","banner"],char:"🇬🇪",fitzpatrick_scale:false,category:"flags"},de:{keywords:["german","nation","flag","country","banner"],char:"🇩🇪",fitzpatrick_scale:false,category:"flags"},ghana:{keywords:["gh","flag","nation","country","banner"],char:"🇬🇭",fitzpatrick_scale:false,category:"flags"},gibraltar:{keywords:["gi","flag","nation","country","banner"],char:"🇬🇮",fitzpatrick_scale:false,category:"flags"},greece:{keywords:["gr","flag","nation","country","banner"],char:"🇬🇷",fitzpatrick_scale:false,category:"flags"},greenland:{keywords:["gl","flag","nation","country","banner"],char:"🇬🇱",fitzpatrick_scale:false,category:"flags"},grenada:{keywords:["gd","flag","nation","country","banner"],char:"🇬🇩",fitzpatrick_scale:false,category:"flags"},guadeloupe:{keywords:["gp","flag","nation","country","banner"],char:"🇬🇵",fitzpatrick_scale:false,category:"flags"},guam:{keywords:["gu","flag","nation","country","banner"],char:"🇬🇺",fitzpatrick_scale:false,category:"flags"},guatemala:{keywords:["gt","flag","nation","country","banner"],char:"🇬🇹",fitzpatrick_scale:false,category:"flags"},guernsey:{keywords:["gg","flag","nation","country","banner"],char:"🇬🇬",fitzpatrick_scale:false,category:"flags"},guinea:{keywords:["gn","flag","nation","country","banner"],char:"🇬🇳",fitzpatrick_scale:false,category:"flags"},guinea_bissau:{keywords:["gw","bissau","flag","nation","country","banner"],char:"🇬🇼",fitzpatrick_scale:false,category:"flags"},guyana:{keywords:["gy","flag","nation","country","banner"],char:"🇬🇾",fitzpatrick_scale:false,category:"flags"},haiti:{keywords:["ht","flag","nation","country","banner"],char:"🇭🇹",fitzpatrick_scale:false,category:"flags"},honduras:{keywords:["hn","flag","nation","country","banner"],char:"🇭🇳",fitzpatrick_scale:false,category:"flags"},hong_kong:{keywords:["hong","kong","flag","nation","country","banner"],char:"🇭🇰",fitzpatrick_scale:false,category:"flags"},hungary:{keywords:["hu","flag","nation","country","banner"],char:"🇭🇺",fitzpatrick_scale:false,category:"flags"},iceland:{keywords:["is","flag","nation","country","banner"],char:"🇮🇸",fitzpatrick_scale:false,category:"flags"},india:{keywords:["in","flag","nation","country","banner"],char:"🇮🇳",fitzpatrick_scale:false,category:"flags"},indonesia:{keywords:["flag","nation","country","banner"],char:"🇮🇩",fitzpatrick_scale:false,category:"flags"},iran:{keywords:["iran,","islamic","republic","flag","nation","country","banner"],char:"🇮🇷",fitzpatrick_scale:false,category:"flags"},iraq:{keywords:["iq","flag","nation","country","banner"],char:"🇮🇶",fitzpatrick_scale:false,category:"flags"},ireland:{keywords:["ie","flag","nation","country","banner"],char:"🇮🇪",fitzpatrick_scale:false,category:"flags"},isle_of_man:{keywords:["isle","man","flag","nation","country","banner"],char:"🇮🇲",fitzpatrick_scale:false,category:"flags"},israel:{keywords:["il","flag","nation","country","banner"],char:"🇮🇱",fitzpatrick_scale:false,category:"flags"},it:{keywords:["italy","flag","nation","country","banner"],char:"🇮🇹",fitzpatrick_scale:false,category:"flags"},cote_divoire:{keywords:["ivory","coast","flag","nation","country","banner"],char:"🇨🇮",fitzpatrick_scale:false,category:"flags"},jamaica:{keywords:["jm","flag","nation","country","banner"],char:"🇯🇲",fitzpatrick_scale:false,category:"flags"},jp:{keywords:["japanese","nation","flag","country","banner"],char:"🇯🇵",fitzpatrick_scale:false,category:"flags"},jersey:{keywords:["je","flag","nation","country","banner"],char:"🇯🇪",fitzpatrick_scale:false,category:"flags"},jordan:{keywords:["jo","flag","nation","country","banner"],char:"🇯🇴",fitzpatrick_scale:false,category:"flags"},kazakhstan:{keywords:["kz","flag","nation","country","banner"],char:"🇰🇿",fitzpatrick_scale:false,category:"flags"},kenya:{keywords:["ke","flag","nation","country","banner"],char:"🇰🇪",fitzpatrick_scale:false,category:"flags"},kiribati:{keywords:["ki","flag","nation","country","banner"],char:"🇰🇮",fitzpatrick_scale:false,category:"flags"},kosovo:{keywords:["xk","flag","nation","country","banner"],char:"🇽🇰",fitzpatrick_scale:false,category:"flags"},kuwait:{keywords:["kw","flag","nation","country","banner"],char:"🇰🇼",fitzpatrick_scale:false,category:"flags"},kyrgyzstan:{keywords:["kg","flag","nation","country","banner"],char:"🇰🇬",fitzpatrick_scale:false,category:"flags"},laos:{keywords:["lao","democratic","republic","flag","nation","country","banner"],char:"🇱🇦",fitzpatrick_scale:false,category:"flags"},latvia:{keywords:["lv","flag","nation","country","banner"],char:"🇱🇻",fitzpatrick_scale:false,category:"flags"},lebanon:{keywords:["lb","flag","nation","country","banner"],char:"🇱🇧",fitzpatrick_scale:false,category:"flags"},lesotho:{keywords:["ls","flag","nation","country","banner"],char:"🇱🇸",fitzpatrick_scale:false,category:"flags"},liberia:{keywords:["lr","flag","nation","country","banner"],char:"🇱🇷",fitzpatrick_scale:false,category:"flags"},libya:{keywords:["ly","flag","nation","country","banner"],char:"🇱🇾",fitzpatrick_scale:false,category:"flags"},liechtenstein:{keywords:["li","flag","nation","country","banner"],char:"🇱🇮",fitzpatrick_scale:false,category:"flags"},lithuania:{keywords:["lt","flag","nation","country","banner"],char:"🇱🇹",fitzpatrick_scale:false,category:"flags"},luxembourg:{keywords:["lu","flag","nation","country","banner"],char:"🇱🇺",fitzpatrick_scale:false,category:"flags"},macau:{keywords:["macao","flag","nation","country","banner"],char:"🇲🇴",fitzpatrick_scale:false,category:"flags"},macedonia:{keywords:["macedonia,","flag","nation","country","banner"],char:"🇲🇰",fitzpatrick_scale:false,category:"flags"},madagascar:{keywords:["mg","flag","nation","country","banner"],char:"🇲🇬",fitzpatrick_scale:false,category:"flags"},malawi:{keywords:["mw","flag","nation","country","banner"],char:"🇲🇼",fitzpatrick_scale:false,category:"flags"},malaysia:{keywords:["my","flag","nation","country","banner"],char:"🇲🇾",fitzpatrick_scale:false,category:"flags"},maldives:{keywords:["mv","flag","nation","country","banner"],char:"🇲🇻",fitzpatrick_scale:false,category:"flags"},mali:{keywords:["ml","flag","nation","country","banner"],char:"🇲🇱",fitzpatrick_scale:false,category:"flags"},malta:{keywords:["mt","flag","nation","country","banner"],char:"🇲🇹",fitzpatrick_scale:false,category:"flags"},marshall_islands:{keywords:["marshall","islands","flag","nation","country","banner"],char:"🇲🇭",fitzpatrick_scale:false,category:"flags"},martinique:{keywords:["mq","flag","nation","country","banner"],char:"🇲🇶",fitzpatrick_scale:false,category:"flags"},mauritania:{keywords:["mr","flag","nation","country","banner"],char:"🇲🇷",fitzpatrick_scale:false,category:"flags"},mauritius:{keywords:["mu","flag","nation","country","banner"],char:"🇲🇺",fitzpatrick_scale:false,category:"flags"},mayotte:{keywords:["yt","flag","nation","country","banner"],char:"🇾🇹",fitzpatrick_scale:false,category:"flags"},mexico:{keywords:["mx","flag","nation","country","banner"],char:"🇲🇽",fitzpatrick_scale:false,category:"flags"},micronesia:{keywords:["micronesia,","federated","states","flag","nation","country","banner"],char:"🇫🇲",fitzpatrick_scale:false,category:"flags"},moldova:{keywords:["moldova,","republic","flag","nation","country","banner"],char:"🇲🇩",fitzpatrick_scale:false,category:"flags"},monaco:{keywords:["mc","flag","nation","country","banner"],char:"🇲🇨",fitzpatrick_scale:false,category:"flags"},mongolia:{keywords:["mn","flag","nation","country","banner"],char:"🇲🇳",fitzpatrick_scale:false,category:"flags"},montenegro:{keywords:["me","flag","nation","country","banner"],char:"🇲🇪",fitzpatrick_scale:false,category:"flags"},montserrat:{keywords:["ms","flag","nation","country","banner"],char:"🇲🇸",fitzpatrick_scale:false,category:"flags"},morocco:{keywords:["ma","flag","nation","country","banner"],char:"🇲🇦",fitzpatrick_scale:false,category:"flags"},mozambique:{keywords:["mz","flag","nation","country","banner"],char:"🇲🇿",fitzpatrick_scale:false,category:"flags"},myanmar:{keywords:["mm","flag","nation","country","banner"],char:"🇲🇲",fitzpatrick_scale:false,category:"flags"},namibia:{keywords:["na","flag","nation","country","banner"],char:"🇳🇦",fitzpatrick_scale:false,category:"flags"},nauru:{keywords:["nr","flag","nation","country","banner"],char:"🇳🇷",fitzpatrick_scale:false,category:"flags"},nepal:{keywords:["np","flag","nation","country","banner"],char:"🇳🇵",fitzpatrick_scale:false,category:"flags"},netherlands:{keywords:["nl","flag","nation","country","banner"],char:"🇳🇱",fitzpatrick_scale:false,category:"flags"},new_caledonia:{keywords:["new","caledonia","flag","nation","country","banner"],char:"🇳🇨",fitzpatrick_scale:false,category:"flags"},new_zealand:{keywords:["new","zealand","flag","nation","country","banner"],char:"🇳🇿",fitzpatrick_scale:false,category:"flags"},nicaragua:{keywords:["ni","flag","nation","country","banner"],char:"🇳🇮",fitzpatrick_scale:false,category:"flags"},niger:{keywords:["ne","flag","nation","country","banner"],char:"🇳🇪",fitzpatrick_scale:false,category:"flags"},nigeria:{keywords:["flag","nation","country","banner"],char:"🇳🇬",fitzpatrick_scale:false,category:"flags"},niue:{keywords:["nu","flag","nation","country","banner"],char:"🇳🇺",fitzpatrick_scale:false,category:"flags"},norfolk_island:{keywords:["norfolk","island","flag","nation","country","banner"],char:"🇳🇫",fitzpatrick_scale:false,category:"flags"},northern_mariana_islands:{keywords:["northern","mariana","islands","flag","nation","country","banner"],char:"🇲🇵",fitzpatrick_scale:false,category:"flags"},north_korea:{keywords:["north","korea","nation","flag","country","banner"],char:"🇰🇵",fitzpatrick_scale:false,category:"flags"},norway:{keywords:["no","flag","nation","country","banner"],char:"🇳🇴",fitzpatrick_scale:false,category:"flags"},oman:{keywords:["om_symbol","flag","nation","country","banner"],char:"🇴🇲",fitzpatrick_scale:false,category:"flags"},pakistan:{keywords:["pk","flag","nation","country","banner"],char:"🇵🇰",fitzpatrick_scale:false,category:"flags"},palau:{keywords:["pw","flag","nation","country","banner"],char:"🇵🇼",fitzpatrick_scale:false,category:"flags"},palestinian_territories:{keywords:["palestine","palestinian","territories","flag","nation","country","banner"],char:"🇵🇸",fitzpatrick_scale:false,category:"flags"},panama:{keywords:["pa","flag","nation","country","banner"],char:"🇵🇦",fitzpatrick_scale:false,category:"flags"},papua_new_guinea:{keywords:["papua","new","guinea","flag","nation","country","banner"],char:"🇵🇬",fitzpatrick_scale:false,category:"flags"},paraguay:{keywords:["py","flag","nation","country","banner"],char:"🇵🇾",fitzpatrick_scale:false,category:"flags"},peru:{keywords:["pe","flag","nation","country","banner"],char:"🇵🇪",fitzpatrick_scale:false,category:"flags"},philippines:{keywords:["ph","flag","nation","country","banner"],char:"🇵🇭",fitzpatrick_scale:false,category:"flags"},pitcairn_islands:{keywords:["pitcairn","flag","nation","country","banner"],char:"🇵🇳",fitzpatrick_scale:false,category:"flags"},poland:{keywords:["pl","flag","nation","country","banner"],char:"🇵🇱",fitzpatrick_scale:false,category:"flags"},portugal:{keywords:["pt","flag","nation","country","banner"],char:"🇵🇹",fitzpatrick_scale:false,category:"flags"},puerto_rico:{keywords:["puerto","rico","flag","nation","country","banner"],char:"🇵🇷",fitzpatrick_scale:false,category:"flags"},qatar:{keywords:["qa","flag","nation","country","banner"],char:"🇶🇦",fitzpatrick_scale:false,category:"flags"},reunion:{keywords:["réunion","flag","nation","country","banner"],char:"🇷🇪",fitzpatrick_scale:false,category:"flags"},romania:{keywords:["ro","flag","nation","country","banner"],char:"🇷🇴",fitzpatrick_scale:false,category:"flags"},ru:{keywords:["russian","federation","flag","nation","country","banner"],char:"🇷🇺",fitzpatrick_scale:false,category:"flags"},rwanda:{keywords:["rw","flag","nation","country","banner"],char:"🇷🇼",fitzpatrick_scale:false,category:"flags"},st_barthelemy:{keywords:["saint","barthélemy","flag","nation","country","banner"],char:"🇧🇱",fitzpatrick_scale:false,category:"flags"},st_helena:{keywords:["saint","helena","ascension","tristan","cunha","flag","nation","country","banner"],char:"🇸🇭",fitzpatrick_scale:false,category:"flags"},st_kitts_nevis:{keywords:["saint","kitts","nevis","flag","nation","country","banner"],char:"🇰🇳",fitzpatrick_scale:false,category:"flags"},st_lucia:{keywords:["saint","lucia","flag","nation","country","banner"],char:"🇱🇨",fitzpatrick_scale:false,category:"flags"},st_pierre_miquelon:{keywords:["saint","pierre","miquelon","flag","nation","country","banner"],char:"🇵🇲",fitzpatrick_scale:false,category:"flags"},st_vincent_grenadines:{keywords:["saint","vincent","grenadines","flag","nation","country","banner"],char:"🇻🇨",fitzpatrick_scale:false,category:"flags"},samoa:{keywords:["ws","flag","nation","country","banner"],char:"🇼🇸",fitzpatrick_scale:false,category:"flags"},san_marino:{keywords:["san","marino","flag","nation","country","banner"],char:"🇸🇲",fitzpatrick_scale:false,category:"flags"},sao_tome_principe:{keywords:["sao","tome","principe","flag","nation","country","banner"],char:"🇸🇹",fitzpatrick_scale:false,category:"flags"},saudi_arabia:{keywords:["flag","nation","country","banner"],char:"🇸🇦",fitzpatrick_scale:false,category:"flags"},senegal:{keywords:["sn","flag","nation","country","banner"],char:"🇸🇳",fitzpatrick_scale:false,category:"flags"},serbia:{keywords:["rs","flag","nation","country","banner"],char:"🇷🇸",fitzpatrick_scale:false,category:"flags"},seychelles:{keywords:["sc","flag","nation","country","banner"],char:"🇸🇨",fitzpatrick_scale:false,category:"flags"},sierra_leone:{keywords:["sierra","leone","flag","nation","country","banner"],char:"🇸🇱",fitzpatrick_scale:false,category:"flags"},singapore:{keywords:["sg","flag","nation","country","banner"],char:"🇸🇬",fitzpatrick_scale:false,category:"flags"},sint_maarten:{keywords:["sint","maarten","dutch","flag","nation","country","banner"],char:"🇸🇽",fitzpatrick_scale:false,category:"flags"},slovakia:{keywords:["sk","flag","nation","country","banner"],char:"🇸🇰",fitzpatrick_scale:false,category:"flags"},slovenia:{keywords:["si","flag","nation","country","banner"],char:"🇸🇮",fitzpatrick_scale:false,category:"flags"},solomon_islands:{keywords:["solomon","islands","flag","nation","country","banner"],char:"🇸🇧",fitzpatrick_scale:false,category:"flags"},somalia:{keywords:["so","flag","nation","country","banner"],char:"🇸🇴",fitzpatrick_scale:false,category:"flags"},south_africa:{keywords:["south","africa","flag","nation","country","banner"],char:"🇿🇦",fitzpatrick_scale:false,category:"flags"},south_georgia_south_sandwich_islands:{keywords:["south","georgia","sandwich","islands","flag","nation","country","banner"],char:"🇬🇸",fitzpatrick_scale:false,category:"flags"},kr:{keywords:["south","korea","nation","flag","country","banner"],char:"🇰🇷",fitzpatrick_scale:false,category:"flags"},south_sudan:{keywords:["south","sd","flag","nation","country","banner"],char:"🇸🇸",fitzpatrick_scale:false,category:"flags"},es:{keywords:["spain","flag","nation","country","banner"],char:"🇪🇸",fitzpatrick_scale:false,category:"flags"},sri_lanka:{keywords:["sri","lanka","flag","nation","country","banner"],char:"🇱🇰",fitzpatrick_scale:false,category:"flags"},sudan:{keywords:["sd","flag","nation","country","banner"],char:"🇸🇩",fitzpatrick_scale:false,category:"flags"},suriname:{keywords:["sr","flag","nation","country","banner"],char:"🇸🇷",fitzpatrick_scale:false,category:"flags"},swaziland:{keywords:["sz","flag","nation","country","banner"],char:"🇸🇿",fitzpatrick_scale:false,category:"flags"},sweden:{keywords:["se","flag","nation","country","banner"],char:"🇸🇪",fitzpatrick_scale:false,category:"flags"},switzerland:{keywords:["ch","flag","nation","country","banner"],char:"🇨🇭",fitzpatrick_scale:false,category:"flags"},syria:{keywords:["syrian","arab","republic","flag","nation","country","banner"],char:"🇸🇾",fitzpatrick_scale:false,category:"flags"},taiwan:{keywords:["tw","flag","nation","country","banner"],char:"🇹🇼",fitzpatrick_scale:false,category:"flags"},tajikistan:{keywords:["tj","flag","nation","country","banner"],char:"🇹🇯",fitzpatrick_scale:false,category:"flags"},tanzania:{keywords:["tanzania,","united","republic","flag","nation","country","banner"],char:"🇹🇿",fitzpatrick_scale:false,category:"flags"},thailand:{keywords:["th","flag","nation","country","banner"],char:"🇹🇭",fitzpatrick_scale:false,category:"flags"},timor_leste:{keywords:["timor","leste","flag","nation","country","banner"],char:"🇹🇱",fitzpatrick_scale:false,category:"flags"},togo:{keywords:["tg","flag","nation","country","banner"],char:"🇹🇬",fitzpatrick_scale:false,category:"flags"},tokelau:{keywords:["tk","flag","nation","country","banner"],char:"🇹🇰",fitzpatrick_scale:false,category:"flags"},tonga:{keywords:["to","flag","nation","country","banner"],char:"🇹🇴",fitzpatrick_scale:false,category:"flags"},trinidad_tobago:{keywords:["trinidad","tobago","flag","nation","country","banner"],char:"🇹🇹",fitzpatrick_scale:false,category:"flags"},tunisia:{keywords:["tn","flag","nation","country","banner"],char:"🇹🇳",fitzpatrick_scale:false,category:"flags"},tr:{keywords:["turkey","flag","nation","country","banner"],char:"🇹🇷",fitzpatrick_scale:false,category:"flags"},turkmenistan:{keywords:["flag","nation","country","banner"],char:"🇹🇲",fitzpatrick_scale:false,category:"flags"},turks_caicos_islands:{keywords:["turks","caicos","islands","flag","nation","country","banner"],char:"🇹🇨",fitzpatrick_scale:false,category:"flags"},tuvalu:{keywords:["flag","nation","country","banner"],char:"🇹🇻",fitzpatrick_scale:false,category:"flags"},uganda:{keywords:["ug","flag","nation","country","banner"],char:"🇺🇬",fitzpatrick_scale:false,category:"flags"},ukraine:{keywords:["ua","flag","nation","country","banner"],char:"🇺🇦",fitzpatrick_scale:false,category:"flags"},united_arab_emirates:{keywords:["united","arab","emirates","flag","nation","country","banner"],char:"🇦🇪",fitzpatrick_scale:false,category:"flags"},uk:{keywords:["united","kingdom","great","britain","northern","ireland","flag","nation","country","banner","british","UK","english","england","union jack"],char:"🇬🇧",fitzpatrick_scale:false,category:"flags"},england:{keywords:["flag","english"],char:"🏴󠁧󠁢󠁥󠁮󠁧󠁿",fitzpatrick_scale:false,category:"flags"},scotland:{keywords:["flag","scottish"],char:"🏴󠁧󠁢󠁳󠁣󠁴󠁿",fitzpatrick_scale:false,category:"flags"},wales:{keywords:["flag","welsh"],char:"🏴󠁧󠁢󠁷󠁬󠁳󠁿",fitzpatrick_scale:false,category:"flags"},us:{keywords:["united","states","america","flag","nation","country","banner"],char:"🇺🇸",fitzpatrick_scale:false,category:"flags"},us_virgin_islands:{keywords:["virgin","islands","us","flag","nation","country","banner"],char:"🇻🇮",fitzpatrick_scale:false,category:"flags"},uruguay:{keywords:["uy","flag","nation","country","banner"],char:"🇺🇾",fitzpatrick_scale:false,category:"flags"},uzbekistan:{keywords:["uz","flag","nation","country","banner"],char:"🇺🇿",fitzpatrick_scale:false,category:"flags"},vanuatu:{keywords:["vu","flag","nation","country","banner"],char:"🇻🇺",fitzpatrick_scale:false,category:"flags"},vatican_city:{keywords:["vatican","city","flag","nation","country","banner"],char:"🇻🇦",fitzpatrick_scale:false,category:"flags"},venezuela:{keywords:["ve","bolivarian","republic","flag","nation","country","banner"],char:"🇻🇪",fitzpatrick_scale:false,category:"flags"},vietnam:{keywords:["viet","nam","flag","nation","country","banner"],char:"🇻🇳",fitzpatrick_scale:false,category:"flags"},wallis_futuna:{keywords:["wallis","futuna","flag","nation","country","banner"],char:"🇼🇫",fitzpatrick_scale:false,category:"flags"},western_sahara:{keywords:["western","sahara","flag","nation","country","banner"],char:"🇪🇭",fitzpatrick_scale:false,category:"flags"},yemen:{keywords:["ye","flag","nation","country","banner"],char:"🇾🇪",fitzpatrick_scale:false,category:"flags"},zambia:{keywords:["zm","flag","nation","country","banner"],char:"🇿🇲",fitzpatrick_scale:false,category:"flags"},zimbabwe:{keywords:["zw","flag","nation","country","banner"],char:"🇿🇼",fitzpatrick_scale:false,category:"flags"},united_nations:{keywords:["un","flag","banner"],char:"🇺🇳",fitzpatrick_scale:false,category:"flags"},pirate_flag:{keywords:["skull","crossbones","flag","banner"],char:"🏴‍☠️",fitzpatrick_scale:false,category:"flags"}}); \ No newline at end of file diff --git a/vendor/tinymce/tinymce/plugins/emoticons/js/emojis.min.js b/vendor/tinymce/tinymce/plugins/emoticons/js/emojis.min.js new file mode 100644 index 00000000..5a1c4916 --- /dev/null +++ b/vendor/tinymce/tinymce/plugins/emoticons/js/emojis.min.js @@ -0,0 +1,2 @@ +// Source: npm package: emojilib, file:emojis.json +window.tinymce.Resource.add("tinymce.plugins.emoticons",{grinning:{keywords:["face","smile","happy","joy",":D","grin"],char:"\u{1f600}",fitzpatrick_scale:!1,category:"people"},grimacing:{keywords:["face","grimace","teeth"],char:"\u{1f62c}",fitzpatrick_scale:!1,category:"people"},grin:{keywords:["face","happy","smile","joy","kawaii"],char:"\u{1f601}",fitzpatrick_scale:!1,category:"people"},joy:{keywords:["face","cry","tears","weep","happy","happytears","haha"],char:"\u{1f602}",fitzpatrick_scale:!1,category:"people"},rofl:{keywords:["face","rolling","floor","laughing","lol","haha"],char:"\u{1f923}",fitzpatrick_scale:!1,category:"people"},partying:{keywords:["face","celebration","woohoo"],char:"\u{1f973}",fitzpatrick_scale:!1,category:"people"},smiley:{keywords:["face","happy","joy","haha",":D",":)","smile","funny"],char:"\u{1f603}",fitzpatrick_scale:!1,category:"people"},smile:{keywords:["face","happy","joy","funny","haha","laugh","like",":D",":)"],char:"\u{1f604}",fitzpatrick_scale:!1,category:"people"},sweat_smile:{keywords:["face","hot","happy","laugh","sweat","smile","relief"],char:"\u{1f605}",fitzpatrick_scale:!1,category:"people"},laughing:{keywords:["happy","joy","lol","satisfied","haha","face","glad","XD","laugh"],char:"\u{1f606}",fitzpatrick_scale:!1,category:"people"},innocent:{keywords:["face","angel","heaven","halo"],char:"\u{1f607}",fitzpatrick_scale:!1,category:"people"},wink:{keywords:["face","happy","mischievous","secret",";)","smile","eye"],char:"\u{1f609}",fitzpatrick_scale:!1,category:"people"},blush:{keywords:["face","smile","happy","flushed","crush","embarrassed","shy","joy"],char:"\u{1f60a}",fitzpatrick_scale:!1,category:"people"},slightly_smiling_face:{keywords:["face","smile"],char:"\u{1f642}",fitzpatrick_scale:!1,category:"people"},upside_down_face:{keywords:["face","flipped","silly","smile"],char:"\u{1f643}",fitzpatrick_scale:!1,category:"people"},relaxed:{keywords:["face","blush","massage","happiness"],char:"\u263a\ufe0f",fitzpatrick_scale:!1,category:"people"},yum:{keywords:["happy","joy","tongue","smile","face","silly","yummy","nom","delicious","savouring"],char:"\u{1f60b}",fitzpatrick_scale:!1,category:"people"},relieved:{keywords:["face","relaxed","phew","massage","happiness"],char:"\u{1f60c}",fitzpatrick_scale:!1,category:"people"},heart_eyes:{keywords:["face","love","like","affection","valentines","infatuation","crush","heart"],char:"\u{1f60d}",fitzpatrick_scale:!1,category:"people"},smiling_face_with_three_hearts:{keywords:["face","love","like","affection","valentines","infatuation","crush","hearts","adore"],char:"\u{1f970}",fitzpatrick_scale:!1,category:"people"},kissing_heart:{keywords:["face","love","like","affection","valentines","infatuation","kiss"],char:"\u{1f618}",fitzpatrick_scale:!1,category:"people"},kissing:{keywords:["love","like","face","3","valentines","infatuation","kiss"],char:"\u{1f617}",fitzpatrick_scale:!1,category:"people"},kissing_smiling_eyes:{keywords:["face","affection","valentines","infatuation","kiss"],char:"\u{1f619}",fitzpatrick_scale:!1,category:"people"},kissing_closed_eyes:{keywords:["face","love","like","affection","valentines","infatuation","kiss"],char:"\u{1f61a}",fitzpatrick_scale:!1,category:"people"},stuck_out_tongue_winking_eye:{keywords:["face","prank","childish","playful","mischievous","smile","wink","tongue"],char:"\u{1f61c}",fitzpatrick_scale:!1,category:"people"},zany:{keywords:["face","goofy","crazy"],char:"\u{1f92a}",fitzpatrick_scale:!1,category:"people"},raised_eyebrow:{keywords:["face","distrust","scepticism","disapproval","disbelief","surprise"],char:"\u{1f928}",fitzpatrick_scale:!1,category:"people"},monocle:{keywords:["face","stuffy","wealthy"],char:"\u{1f9d0}",fitzpatrick_scale:!1,category:"people"},stuck_out_tongue_closed_eyes:{keywords:["face","prank","playful","mischievous","smile","tongue"],char:"\u{1f61d}",fitzpatrick_scale:!1,category:"people"},stuck_out_tongue:{keywords:["face","prank","childish","playful","mischievous","smile","tongue"],char:"\u{1f61b}",fitzpatrick_scale:!1,category:"people"},money_mouth_face:{keywords:["face","rich","dollar","money"],char:"\u{1f911}",fitzpatrick_scale:!1,category:"people"},nerd_face:{keywords:["face","nerdy","geek","dork"],char:"\u{1f913}",fitzpatrick_scale:!1,category:"people"},sunglasses:{keywords:["face","cool","smile","summer","beach","sunglass"],char:"\u{1f60e}",fitzpatrick_scale:!1,category:"people"},star_struck:{keywords:["face","smile","starry","eyes","grinning"],char:"\u{1f929}",fitzpatrick_scale:!1,category:"people"},clown_face:{keywords:["face"],char:"\u{1f921}",fitzpatrick_scale:!1,category:"people"},cowboy_hat_face:{keywords:["face","cowgirl","hat"],char:"\u{1f920}",fitzpatrick_scale:!1,category:"people"},hugs:{keywords:["face","smile","hug"],char:"\u{1f917}",fitzpatrick_scale:!1,category:"people"},smirk:{keywords:["face","smile","mean","prank","smug","sarcasm"],char:"\u{1f60f}",fitzpatrick_scale:!1,category:"people"},no_mouth:{keywords:["face","hellokitty"],char:"\u{1f636}",fitzpatrick_scale:!1,category:"people"},neutral_face:{keywords:["indifference","meh",":|","neutral"],char:"\u{1f610}",fitzpatrick_scale:!1,category:"people"},expressionless:{keywords:["face","indifferent","-_-","meh","deadpan"],char:"\u{1f611}",fitzpatrick_scale:!1,category:"people"},unamused:{keywords:["indifference","bored","straight face","serious","sarcasm","unimpressed","skeptical","dubious","side_eye"],char:"\u{1f612}",fitzpatrick_scale:!1,category:"people"},roll_eyes:{keywords:["face","eyeroll","frustrated"],char:"\u{1f644}",fitzpatrick_scale:!1,category:"people"},thinking:{keywords:["face","hmmm","think","consider"],char:"\u{1f914}",fitzpatrick_scale:!1,category:"people"},lying_face:{keywords:["face","lie","pinocchio"],char:"\u{1f925}",fitzpatrick_scale:!1,category:"people"},hand_over_mouth:{keywords:["face","whoops","shock","surprise"],char:"\u{1f92d}",fitzpatrick_scale:!1,category:"people"},shushing:{keywords:["face","quiet","shhh"],char:"\u{1f92b}",fitzpatrick_scale:!1,category:"people"},symbols_over_mouth:{keywords:["face","swearing","cursing","cussing","profanity","expletive"],char:"\u{1f92c}",fitzpatrick_scale:!1,category:"people"},exploding_head:{keywords:["face","shocked","mind","blown"],char:"\u{1f92f}",fitzpatrick_scale:!1,category:"people"},flushed:{keywords:["face","blush","shy","flattered"],char:"\u{1f633}",fitzpatrick_scale:!1,category:"people"},disappointed:{keywords:["face","sad","upset","depressed",":("],char:"\u{1f61e}",fitzpatrick_scale:!1,category:"people"},worried:{keywords:["face","concern","nervous",":("],char:"\u{1f61f}",fitzpatrick_scale:!1,category:"people"},angry:{keywords:["mad","face","annoyed","frustrated"],char:"\u{1f620}",fitzpatrick_scale:!1,category:"people"},rage:{keywords:["angry","mad","hate","despise"],char:"\u{1f621}",fitzpatrick_scale:!1,category:"people"},pensive:{keywords:["face","sad","depressed","upset"],char:"\u{1f614}",fitzpatrick_scale:!1,category:"people"},confused:{keywords:["face","indifference","huh","weird","hmmm",":/"],char:"\u{1f615}",fitzpatrick_scale:!1,category:"people"},slightly_frowning_face:{keywords:["face","frowning","disappointed","sad","upset"],char:"\u{1f641}",fitzpatrick_scale:!1,category:"people"},frowning_face:{keywords:["face","sad","upset","frown"],char:"\u2639",fitzpatrick_scale:!1,category:"people"},persevere:{keywords:["face","sick","no","upset","oops"],char:"\u{1f623}",fitzpatrick_scale:!1,category:"people"},confounded:{keywords:["face","confused","sick","unwell","oops",":S"],char:"\u{1f616}",fitzpatrick_scale:!1,category:"people"},tired_face:{keywords:["sick","whine","upset","frustrated"],char:"\u{1f62b}",fitzpatrick_scale:!1,category:"people"},weary:{keywords:["face","tired","sleepy","sad","frustrated","upset"],char:"\u{1f629}",fitzpatrick_scale:!1,category:"people"},pleading:{keywords:["face","begging","mercy"],char:"\u{1f97a}",fitzpatrick_scale:!1,category:"people"},triumph:{keywords:["face","gas","phew","proud","pride"],char:"\u{1f624}",fitzpatrick_scale:!1,category:"people"},open_mouth:{keywords:["face","surprise","impressed","wow","whoa",":O"],char:"\u{1f62e}",fitzpatrick_scale:!1,category:"people"},scream:{keywords:["face","munch","scared","omg"],char:"\u{1f631}",fitzpatrick_scale:!1,category:"people"},fearful:{keywords:["face","scared","terrified","nervous","oops","huh"],char:"\u{1f628}",fitzpatrick_scale:!1,category:"people"},cold_sweat:{keywords:["face","nervous","sweat"],char:"\u{1f630}",fitzpatrick_scale:!1,category:"people"},hushed:{keywords:["face","woo","shh"],char:"\u{1f62f}",fitzpatrick_scale:!1,category:"people"},frowning:{keywords:["face","aw","what"],char:"\u{1f626}",fitzpatrick_scale:!1,category:"people"},anguished:{keywords:["face","stunned","nervous"],char:"\u{1f627}",fitzpatrick_scale:!1,category:"people"},cry:{keywords:["face","tears","sad","depressed","upset",":'("],char:"\u{1f622}",fitzpatrick_scale:!1,category:"people"},disappointed_relieved:{keywords:["face","phew","sweat","nervous"],char:"\u{1f625}",fitzpatrick_scale:!1,category:"people"},drooling_face:{keywords:["face"],char:"\u{1f924}",fitzpatrick_scale:!1,category:"people"},sleepy:{keywords:["face","tired","rest","nap"],char:"\u{1f62a}",fitzpatrick_scale:!1,category:"people"},sweat:{keywords:["face","hot","sad","tired","exercise"],char:"\u{1f613}",fitzpatrick_scale:!1,category:"people"},hot:{keywords:["face","feverish","heat","red","sweating"],char:"\u{1f975}",fitzpatrick_scale:!1,category:"people"},cold:{keywords:["face","blue","freezing","frozen","frostbite","icicles"],char:"\u{1f976}",fitzpatrick_scale:!1,category:"people"},sob:{keywords:["face","cry","tears","sad","upset","depressed"],char:"\u{1f62d}",fitzpatrick_scale:!1,category:"people"},dizzy_face:{keywords:["spent","unconscious","xox","dizzy"],char:"\u{1f635}",fitzpatrick_scale:!1,category:"people"},astonished:{keywords:["face","xox","surprised","poisoned"],char:"\u{1f632}",fitzpatrick_scale:!1,category:"people"},zipper_mouth_face:{keywords:["face","sealed","zipper","secret"],char:"\u{1f910}",fitzpatrick_scale:!1,category:"people"},nauseated_face:{keywords:["face","vomit","gross","green","sick","throw up","ill"],char:"\u{1f922}",fitzpatrick_scale:!1,category:"people"},sneezing_face:{keywords:["face","gesundheit","sneeze","sick","allergy"],char:"\u{1f927}",fitzpatrick_scale:!1,category:"people"},vomiting:{keywords:["face","sick"],char:"\u{1f92e}",fitzpatrick_scale:!1,category:"people"},mask:{keywords:["face","sick","ill","disease"],char:"\u{1f637}",fitzpatrick_scale:!1,category:"people"},face_with_thermometer:{keywords:["sick","temperature","thermometer","cold","fever"],char:"\u{1f912}",fitzpatrick_scale:!1,category:"people"},face_with_head_bandage:{keywords:["injured","clumsy","bandage","hurt"],char:"\u{1f915}",fitzpatrick_scale:!1,category:"people"},woozy:{keywords:["face","dizzy","intoxicated","tipsy","wavy"],char:"\u{1f974}",fitzpatrick_scale:!1,category:"people"},sleeping:{keywords:["face","tired","sleepy","night","zzz"],char:"\u{1f634}",fitzpatrick_scale:!1,category:"people"},zzz:{keywords:["sleepy","tired","dream"],char:"\u{1f4a4}",fitzpatrick_scale:!1,category:"people"},poop:{keywords:["hankey","shitface","fail","turd","shit"],char:"\u{1f4a9}",fitzpatrick_scale:!1,category:"people"},smiling_imp:{keywords:["devil","horns"],char:"\u{1f608}",fitzpatrick_scale:!1,category:"people"},imp:{keywords:["devil","angry","horns"],char:"\u{1f47f}",fitzpatrick_scale:!1,category:"people"},japanese_ogre:{keywords:["monster","red","mask","halloween","scary","creepy","devil","demon","japanese","ogre"],char:"\u{1f479}",fitzpatrick_scale:!1,category:"people"},japanese_goblin:{keywords:["red","evil","mask","monster","scary","creepy","japanese","goblin"],char:"\u{1f47a}",fitzpatrick_scale:!1,category:"people"},skull:{keywords:["dead","skeleton","creepy","death"],char:"\u{1f480}",fitzpatrick_scale:!1,category:"people"},ghost:{keywords:["halloween","spooky","scary"],char:"\u{1f47b}",fitzpatrick_scale:!1,category:"people"},alien:{keywords:["UFO","paul","weird","outer_space"],char:"\u{1f47d}",fitzpatrick_scale:!1,category:"people"},robot:{keywords:["computer","machine","bot"],char:"\u{1f916}",fitzpatrick_scale:!1,category:"people"},smiley_cat:{keywords:["animal","cats","happy","smile"],char:"\u{1f63a}",fitzpatrick_scale:!1,category:"people"},smile_cat:{keywords:["animal","cats","smile"],char:"\u{1f638}",fitzpatrick_scale:!1,category:"people"},joy_cat:{keywords:["animal","cats","haha","happy","tears"],char:"\u{1f639}",fitzpatrick_scale:!1,category:"people"},heart_eyes_cat:{keywords:["animal","love","like","affection","cats","valentines","heart"],char:"\u{1f63b}",fitzpatrick_scale:!1,category:"people"},smirk_cat:{keywords:["animal","cats","smirk"],char:"\u{1f63c}",fitzpatrick_scale:!1,category:"people"},kissing_cat:{keywords:["animal","cats","kiss"],char:"\u{1f63d}",fitzpatrick_scale:!1,category:"people"},scream_cat:{keywords:["animal","cats","munch","scared","scream"],char:"\u{1f640}",fitzpatrick_scale:!1,category:"people"},crying_cat_face:{keywords:["animal","tears","weep","sad","cats","upset","cry"],char:"\u{1f63f}",fitzpatrick_scale:!1,category:"people"},pouting_cat:{keywords:["animal","cats"],char:"\u{1f63e}",fitzpatrick_scale:!1,category:"people"},palms_up:{keywords:["hands","gesture","cupped","prayer"],char:"\u{1f932}",fitzpatrick_scale:!0,category:"people"},raised_hands:{keywords:["gesture","hooray","yea","celebration","hands"],char:"\u{1f64c}",fitzpatrick_scale:!0,category:"people"},clap:{keywords:["hands","praise","applause","congrats","yay"],char:"\u{1f44f}",fitzpatrick_scale:!0,category:"people"},wave:{keywords:["hands","gesture","goodbye","solong","farewell","hello","hi","palm"],char:"\u{1f44b}",fitzpatrick_scale:!0,category:"people"},call_me_hand:{keywords:["hands","gesture"],char:"\u{1f919}",fitzpatrick_scale:!0,category:"people"},"+1":{keywords:["thumbsup","yes","awesome","good","agree","accept","cool","hand","like"],char:"\u{1f44d}",fitzpatrick_scale:!0,category:"people"},"-1":{keywords:["thumbsdown","no","dislike","hand"],char:"\u{1f44e}",fitzpatrick_scale:!0,category:"people"},facepunch:{keywords:["angry","violence","fist","hit","attack","hand"],char:"\u{1f44a}",fitzpatrick_scale:!0,category:"people"},fist:{keywords:["fingers","hand","grasp"],char:"\u270a",fitzpatrick_scale:!0,category:"people"},fist_left:{keywords:["hand","fistbump"],char:"\u{1f91b}",fitzpatrick_scale:!0,category:"people"},fist_right:{keywords:["hand","fistbump"],char:"\u{1f91c}",fitzpatrick_scale:!0,category:"people"},v:{keywords:["fingers","ohyeah","hand","peace","victory","two"],char:"\u270c",fitzpatrick_scale:!0,category:"people"},ok_hand:{keywords:["fingers","limbs","perfect","ok","okay"],char:"\u{1f44c}",fitzpatrick_scale:!0,category:"people"},raised_hand:{keywords:["fingers","stop","highfive","palm","ban"],char:"\u270b",fitzpatrick_scale:!0,category:"people"},raised_back_of_hand:{keywords:["fingers","raised","backhand"],char:"\u{1f91a}",fitzpatrick_scale:!0,category:"people"},open_hands:{keywords:["fingers","butterfly","hands","open"],char:"\u{1f450}",fitzpatrick_scale:!0,category:"people"},muscle:{keywords:["arm","flex","hand","summer","strong","biceps"],char:"\u{1f4aa}",fitzpatrick_scale:!0,category:"people"},pray:{keywords:["please","hope","wish","namaste","highfive"],char:"\u{1f64f}",fitzpatrick_scale:!0,category:"people"},foot:{keywords:["kick","stomp"],char:"\u{1f9b6}",fitzpatrick_scale:!0,category:"people"},leg:{keywords:["kick","limb"],char:"\u{1f9b5}",fitzpatrick_scale:!0,category:"people"},handshake:{keywords:["agreement","shake"],char:"\u{1f91d}",fitzpatrick_scale:!1,category:"people"},point_up:{keywords:["hand","fingers","direction","up"],char:"\u261d",fitzpatrick_scale:!0,category:"people"},point_up_2:{keywords:["fingers","hand","direction","up"],char:"\u{1f446}",fitzpatrick_scale:!0,category:"people"},point_down:{keywords:["fingers","hand","direction","down"],char:"\u{1f447}",fitzpatrick_scale:!0,category:"people"},point_left:{keywords:["direction","fingers","hand","left"],char:"\u{1f448}",fitzpatrick_scale:!0,category:"people"},point_right:{keywords:["fingers","hand","direction","right"],char:"\u{1f449}",fitzpatrick_scale:!0,category:"people"},fu:{keywords:["hand","fingers","rude","middle","flipping"],char:"\u{1f595}",fitzpatrick_scale:!0,category:"people"},raised_hand_with_fingers_splayed:{keywords:["hand","fingers","palm"],char:"\u{1f590}",fitzpatrick_scale:!0,category:"people"},love_you:{keywords:["hand","fingers","gesture"],char:"\u{1f91f}",fitzpatrick_scale:!0,category:"people"},metal:{keywords:["hand","fingers","evil_eye","sign_of_horns","rock_on"],char:"\u{1f918}",fitzpatrick_scale:!0,category:"people"},crossed_fingers:{keywords:["good","lucky"],char:"\u{1f91e}",fitzpatrick_scale:!0,category:"people"},vulcan_salute:{keywords:["hand","fingers","spock","star trek"],char:"\u{1f596}",fitzpatrick_scale:!0,category:"people"},writing_hand:{keywords:["lower_left_ballpoint_pen","stationery","write","compose"],char:"\u270d",fitzpatrick_scale:!0,category:"people"},selfie:{keywords:["camera","phone"],char:"\u{1f933}",fitzpatrick_scale:!0,category:"people"},nail_care:{keywords:["beauty","manicure","finger","fashion","nail"],char:"\u{1f485}",fitzpatrick_scale:!0,category:"people"},lips:{keywords:["mouth","kiss"],char:"\u{1f444}",fitzpatrick_scale:!1,category:"people"},tooth:{keywords:["teeth","dentist"],char:"\u{1f9b7}",fitzpatrick_scale:!1,category:"people"},tongue:{keywords:["mouth","playful"],char:"\u{1f445}",fitzpatrick_scale:!1,category:"people"},ear:{keywords:["face","hear","sound","listen"],char:"\u{1f442}",fitzpatrick_scale:!0,category:"people"},nose:{keywords:["smell","sniff"],char:"\u{1f443}",fitzpatrick_scale:!0,category:"people"},eye:{keywords:["face","look","see","watch","stare"],char:"\u{1f441}",fitzpatrick_scale:!1,category:"people"},eyes:{keywords:["look","watch","stalk","peek","see"],char:"\u{1f440}",fitzpatrick_scale:!1,category:"people"},brain:{keywords:["smart","intelligent"],char:"\u{1f9e0}",fitzpatrick_scale:!1,category:"people"},bust_in_silhouette:{keywords:["user","person","human"],char:"\u{1f464}",fitzpatrick_scale:!1,category:"people"},busts_in_silhouette:{keywords:["user","person","human","group","team"],char:"\u{1f465}",fitzpatrick_scale:!1,category:"people"},speaking_head:{keywords:["user","person","human","sing","say","talk"],char:"\u{1f5e3}",fitzpatrick_scale:!1,category:"people"},baby:{keywords:["child","boy","girl","toddler"],char:"\u{1f476}",fitzpatrick_scale:!0,category:"people"},child:{keywords:["gender-neutral","young"],char:"\u{1f9d2}",fitzpatrick_scale:!0,category:"people"},boy:{keywords:["man","male","guy","teenager"],char:"\u{1f466}",fitzpatrick_scale:!0,category:"people"},girl:{keywords:["female","woman","teenager"],char:"\u{1f467}",fitzpatrick_scale:!0,category:"people"},adult:{keywords:["gender-neutral","person"],char:"\u{1f9d1}",fitzpatrick_scale:!0,category:"people"},man:{keywords:["mustache","father","dad","guy","classy","sir","moustache"],char:"\u{1f468}",fitzpatrick_scale:!0,category:"people"},woman:{keywords:["female","girls","lady"],char:"\u{1f469}",fitzpatrick_scale:!0,category:"people"},blonde_woman:{keywords:["woman","female","girl","blonde","person"],char:"\u{1f471}\u200d\u2640\ufe0f",fitzpatrick_scale:!0,category:"people"},blonde_man:{keywords:["man","male","boy","blonde","guy","person"],char:"\u{1f471}",fitzpatrick_scale:!0,category:"people"},bearded_person:{keywords:["person","bewhiskered"],char:"\u{1f9d4}",fitzpatrick_scale:!0,category:"people"},older_adult:{keywords:["human","elder","senior","gender-neutral"],char:"\u{1f9d3}",fitzpatrick_scale:!0,category:"people"},older_man:{keywords:["human","male","men","old","elder","senior"],char:"\u{1f474}",fitzpatrick_scale:!0,category:"people"},older_woman:{keywords:["human","female","women","lady","old","elder","senior"],char:"\u{1f475}",fitzpatrick_scale:!0,category:"people"},man_with_gua_pi_mao:{keywords:["male","boy","chinese"],char:"\u{1f472}",fitzpatrick_scale:!0,category:"people"},woman_with_headscarf:{keywords:["female","hijab","mantilla","tichel"],char:"\u{1f9d5}",fitzpatrick_scale:!0,category:"people"},woman_with_turban:{keywords:["female","indian","hinduism","arabs","woman"],char:"\u{1f473}\u200d\u2640\ufe0f",fitzpatrick_scale:!0,category:"people"},man_with_turban:{keywords:["male","indian","hinduism","arabs"],char:"\u{1f473}",fitzpatrick_scale:!0,category:"people"},policewoman:{keywords:["woman","police","law","legal","enforcement","arrest","911","female"],char:"\u{1f46e}\u200d\u2640\ufe0f",fitzpatrick_scale:!0,category:"people"},policeman:{keywords:["man","police","law","legal","enforcement","arrest","911"],char:"\u{1f46e}",fitzpatrick_scale:!0,category:"people"},construction_worker_woman:{keywords:["female","human","wip","build","construction","worker","labor","woman"],char:"\u{1f477}\u200d\u2640\ufe0f",fitzpatrick_scale:!0,category:"people"},construction_worker_man:{keywords:["male","human","wip","guy","build","construction","worker","labor"],char:"\u{1f477}",fitzpatrick_scale:!0,category:"people"},guardswoman:{keywords:["uk","gb","british","female","royal","woman"],char:"\u{1f482}\u200d\u2640\ufe0f",fitzpatrick_scale:!0,category:"people"},guardsman:{keywords:["uk","gb","british","male","guy","royal"],char:"\u{1f482}",fitzpatrick_scale:!0,category:"people"},female_detective:{keywords:["human","spy","detective","female","woman"],char:"\u{1f575}\ufe0f\u200d\u2640\ufe0f",fitzpatrick_scale:!0,category:"people"},male_detective:{keywords:["human","spy","detective"],char:"\u{1f575}",fitzpatrick_scale:!0,category:"people"},woman_health_worker:{keywords:["doctor","nurse","therapist","healthcare","woman","human"],char:"\u{1f469}\u200d\u2695\ufe0f",fitzpatrick_scale:!0,category:"people"},man_health_worker:{keywords:["doctor","nurse","therapist","healthcare","man","human"],char:"\u{1f468}\u200d\u2695\ufe0f",fitzpatrick_scale:!0,category:"people"},woman_farmer:{keywords:["rancher","gardener","woman","human"],char:"\u{1f469}\u200d\u{1f33e}",fitzpatrick_scale:!0,category:"people"},man_farmer:{keywords:["rancher","gardener","man","human"],char:"\u{1f468}\u200d\u{1f33e}",fitzpatrick_scale:!0,category:"people"},woman_cook:{keywords:["chef","woman","human"],char:"\u{1f469}\u200d\u{1f373}",fitzpatrick_scale:!0,category:"people"},man_cook:{keywords:["chef","man","human"],char:"\u{1f468}\u200d\u{1f373}",fitzpatrick_scale:!0,category:"people"},woman_student:{keywords:["graduate","woman","human"],char:"\u{1f469}\u200d\u{1f393}",fitzpatrick_scale:!0,category:"people"},man_student:{keywords:["graduate","man","human"],char:"\u{1f468}\u200d\u{1f393}",fitzpatrick_scale:!0,category:"people"},woman_singer:{keywords:["rockstar","entertainer","woman","human"],char:"\u{1f469}\u200d\u{1f3a4}",fitzpatrick_scale:!0,category:"people"},man_singer:{keywords:["rockstar","entertainer","man","human"],char:"\u{1f468}\u200d\u{1f3a4}",fitzpatrick_scale:!0,category:"people"},woman_teacher:{keywords:["instructor","professor","woman","human"],char:"\u{1f469}\u200d\u{1f3eb}",fitzpatrick_scale:!0,category:"people"},man_teacher:{keywords:["instructor","professor","man","human"],char:"\u{1f468}\u200d\u{1f3eb}",fitzpatrick_scale:!0,category:"people"},woman_factory_worker:{keywords:["assembly","industrial","woman","human"],char:"\u{1f469}\u200d\u{1f3ed}",fitzpatrick_scale:!0,category:"people"},man_factory_worker:{keywords:["assembly","industrial","man","human"],char:"\u{1f468}\u200d\u{1f3ed}",fitzpatrick_scale:!0,category:"people"},woman_technologist:{keywords:["coder","developer","engineer","programmer","software","woman","human","laptop","computer"],char:"\u{1f469}\u200d\u{1f4bb}",fitzpatrick_scale:!0,category:"people"},man_technologist:{keywords:["coder","developer","engineer","programmer","software","man","human","laptop","computer"],char:"\u{1f468}\u200d\u{1f4bb}",fitzpatrick_scale:!0,category:"people"},woman_office_worker:{keywords:["business","manager","woman","human"],char:"\u{1f469}\u200d\u{1f4bc}",fitzpatrick_scale:!0,category:"people"},man_office_worker:{keywords:["business","manager","man","human"],char:"\u{1f468}\u200d\u{1f4bc}",fitzpatrick_scale:!0,category:"people"},woman_mechanic:{keywords:["plumber","woman","human","wrench"],char:"\u{1f469}\u200d\u{1f527}",fitzpatrick_scale:!0,category:"people"},man_mechanic:{keywords:["plumber","man","human","wrench"],char:"\u{1f468}\u200d\u{1f527}",fitzpatrick_scale:!0,category:"people"},woman_scientist:{keywords:["biologist","chemist","engineer","physicist","woman","human"],char:"\u{1f469}\u200d\u{1f52c}",fitzpatrick_scale:!0,category:"people"},man_scientist:{keywords:["biologist","chemist","engineer","physicist","man","human"],char:"\u{1f468}\u200d\u{1f52c}",fitzpatrick_scale:!0,category:"people"},woman_artist:{keywords:["painter","woman","human"],char:"\u{1f469}\u200d\u{1f3a8}",fitzpatrick_scale:!0,category:"people"},man_artist:{keywords:["painter","man","human"],char:"\u{1f468}\u200d\u{1f3a8}",fitzpatrick_scale:!0,category:"people"},woman_firefighter:{keywords:["fireman","woman","human"],char:"\u{1f469}\u200d\u{1f692}",fitzpatrick_scale:!0,category:"people"},man_firefighter:{keywords:["fireman","man","human"],char:"\u{1f468}\u200d\u{1f692}",fitzpatrick_scale:!0,category:"people"},woman_pilot:{keywords:["aviator","plane","woman","human"],char:"\u{1f469}\u200d\u2708\ufe0f",fitzpatrick_scale:!0,category:"people"},man_pilot:{keywords:["aviator","plane","man","human"],char:"\u{1f468}\u200d\u2708\ufe0f",fitzpatrick_scale:!0,category:"people"},woman_astronaut:{keywords:["space","rocket","woman","human"],char:"\u{1f469}\u200d\u{1f680}",fitzpatrick_scale:!0,category:"people"},man_astronaut:{keywords:["space","rocket","man","human"],char:"\u{1f468}\u200d\u{1f680}",fitzpatrick_scale:!0,category:"people"},woman_judge:{keywords:["justice","court","woman","human"],char:"\u{1f469}\u200d\u2696\ufe0f",fitzpatrick_scale:!0,category:"people"},man_judge:{keywords:["justice","court","man","human"],char:"\u{1f468}\u200d\u2696\ufe0f",fitzpatrick_scale:!0,category:"people"},woman_superhero:{keywords:["woman","female","good","heroine","superpowers"],char:"\u{1f9b8}\u200d\u2640\ufe0f",fitzpatrick_scale:!0,category:"people"},man_superhero:{keywords:["man","male","good","hero","superpowers"],char:"\u{1f9b8}\u200d\u2642\ufe0f",fitzpatrick_scale:!0,category:"people"},woman_supervillain:{keywords:["woman","female","evil","bad","criminal","heroine","superpowers"],char:"\u{1f9b9}\u200d\u2640\ufe0f",fitzpatrick_scale:!0,category:"people"},man_supervillain:{keywords:["man","male","evil","bad","criminal","hero","superpowers"],char:"\u{1f9b9}\u200d\u2642\ufe0f",fitzpatrick_scale:!0,category:"people"},mrs_claus:{keywords:["woman","female","xmas","mother christmas"],char:"\u{1f936}",fitzpatrick_scale:!0,category:"people"},santa:{keywords:["festival","man","male","xmas","father christmas"],char:"\u{1f385}",fitzpatrick_scale:!0,category:"people"},sorceress:{keywords:["woman","female","mage","witch"],char:"\u{1f9d9}\u200d\u2640\ufe0f",fitzpatrick_scale:!0,category:"people"},wizard:{keywords:["man","male","mage","sorcerer"],char:"\u{1f9d9}\u200d\u2642\ufe0f",fitzpatrick_scale:!0,category:"people"},woman_elf:{keywords:["woman","female"],char:"\u{1f9dd}\u200d\u2640\ufe0f",fitzpatrick_scale:!0,category:"people"},man_elf:{keywords:["man","male"],char:"\u{1f9dd}\u200d\u2642\ufe0f",fitzpatrick_scale:!0,category:"people"},woman_vampire:{keywords:["woman","female"],char:"\u{1f9db}\u200d\u2640\ufe0f",fitzpatrick_scale:!0,category:"people"},man_vampire:{keywords:["man","male","dracula"],char:"\u{1f9db}\u200d\u2642\ufe0f",fitzpatrick_scale:!0,category:"people"},woman_zombie:{keywords:["woman","female","undead","walking dead"],char:"\u{1f9df}\u200d\u2640\ufe0f",fitzpatrick_scale:!1,category:"people"},man_zombie:{keywords:["man","male","dracula","undead","walking dead"],char:"\u{1f9df}\u200d\u2642\ufe0f",fitzpatrick_scale:!1,category:"people"},woman_genie:{keywords:["woman","female"],char:"\u{1f9de}\u200d\u2640\ufe0f",fitzpatrick_scale:!1,category:"people"},man_genie:{keywords:["man","male"],char:"\u{1f9de}\u200d\u2642\ufe0f",fitzpatrick_scale:!1,category:"people"},mermaid:{keywords:["woman","female","merwoman","ariel"],char:"\u{1f9dc}\u200d\u2640\ufe0f",fitzpatrick_scale:!0,category:"people"},merman:{keywords:["man","male","triton"],char:"\u{1f9dc}\u200d\u2642\ufe0f",fitzpatrick_scale:!0,category:"people"},woman_fairy:{keywords:["woman","female"],char:"\u{1f9da}\u200d\u2640\ufe0f",fitzpatrick_scale:!0,category:"people"},man_fairy:{keywords:["man","male"],char:"\u{1f9da}\u200d\u2642\ufe0f",fitzpatrick_scale:!0,category:"people"},angel:{keywords:["heaven","wings","halo"],char:"\u{1f47c}",fitzpatrick_scale:!0,category:"people"},pregnant_woman:{keywords:["baby"],char:"\u{1f930}",fitzpatrick_scale:!0,category:"people"},breastfeeding:{keywords:["nursing","baby"],char:"\u{1f931}",fitzpatrick_scale:!0,category:"people"},princess:{keywords:["girl","woman","female","blond","crown","royal","queen"],char:"\u{1f478}",fitzpatrick_scale:!0,category:"people"},prince:{keywords:["boy","man","male","crown","royal","king"],char:"\u{1f934}",fitzpatrick_scale:!0,category:"people"},bride_with_veil:{keywords:["couple","marriage","wedding","woman","bride"],char:"\u{1f470}",fitzpatrick_scale:!0,category:"people"},man_in_tuxedo:{keywords:["couple","marriage","wedding","groom"],char:"\u{1f935}",fitzpatrick_scale:!0,category:"people"},running_woman:{keywords:["woman","walking","exercise","race","running","female"],char:"\u{1f3c3}\u200d\u2640\ufe0f",fitzpatrick_scale:!0,category:"people"},running_man:{keywords:["man","walking","exercise","race","running"],char:"\u{1f3c3}",fitzpatrick_scale:!0,category:"people"},walking_woman:{keywords:["human","feet","steps","woman","female"],char:"\u{1f6b6}\u200d\u2640\ufe0f",fitzpatrick_scale:!0,category:"people"},walking_man:{keywords:["human","feet","steps"],char:"\u{1f6b6}",fitzpatrick_scale:!0,category:"people"},dancer:{keywords:["female","girl","woman","fun"],char:"\u{1f483}",fitzpatrick_scale:!0,category:"people"},man_dancing:{keywords:["male","boy","fun","dancer"],char:"\u{1f57a}",fitzpatrick_scale:!0,category:"people"},dancing_women:{keywords:["female","bunny","women","girls"],char:"\u{1f46f}",fitzpatrick_scale:!1,category:"people"},dancing_men:{keywords:["male","bunny","men","boys"],char:"\u{1f46f}\u200d\u2642\ufe0f",fitzpatrick_scale:!1,category:"people"},couple:{keywords:["pair","people","human","love","date","dating","like","affection","valentines","marriage"],char:"\u{1f46b}",fitzpatrick_scale:!1,category:"people"},two_men_holding_hands:{keywords:["pair","couple","love","like","bromance","friendship","people","human"],char:"\u{1f46c}",fitzpatrick_scale:!1,category:"people"},two_women_holding_hands:{keywords:["pair","friendship","couple","love","like","female","people","human"],char:"\u{1f46d}",fitzpatrick_scale:!1,category:"people"},bowing_woman:{keywords:["woman","female","girl"],char:"\u{1f647}\u200d\u2640\ufe0f",fitzpatrick_scale:!0,category:"people"},bowing_man:{keywords:["man","male","boy"],char:"\u{1f647}",fitzpatrick_scale:!0,category:"people"},man_facepalming:{keywords:["man","male","boy","disbelief"],char:"\u{1f926}\u200d\u2642\ufe0f",fitzpatrick_scale:!0,category:"people"},woman_facepalming:{keywords:["woman","female","girl","disbelief"],char:"\u{1f926}\u200d\u2640\ufe0f",fitzpatrick_scale:!0,category:"people"},woman_shrugging:{keywords:["woman","female","girl","confused","indifferent","doubt"],char:"\u{1f937}",fitzpatrick_scale:!0,category:"people"},man_shrugging:{keywords:["man","male","boy","confused","indifferent","doubt"],char:"\u{1f937}\u200d\u2642\ufe0f",fitzpatrick_scale:!0,category:"people"},tipping_hand_woman:{keywords:["female","girl","woman","human","information"],char:"\u{1f481}",fitzpatrick_scale:!0,category:"people"},tipping_hand_man:{keywords:["male","boy","man","human","information"],char:"\u{1f481}\u200d\u2642\ufe0f",fitzpatrick_scale:!0,category:"people"},no_good_woman:{keywords:["female","girl","woman","nope"],char:"\u{1f645}",fitzpatrick_scale:!0,category:"people"},no_good_man:{keywords:["male","boy","man","nope"],char:"\u{1f645}\u200d\u2642\ufe0f",fitzpatrick_scale:!0,category:"people"},ok_woman:{keywords:["women","girl","female","pink","human","woman"],char:"\u{1f646}",fitzpatrick_scale:!0,category:"people"},ok_man:{keywords:["men","boy","male","blue","human","man"],char:"\u{1f646}\u200d\u2642\ufe0f",fitzpatrick_scale:!0,category:"people"},raising_hand_woman:{keywords:["female","girl","woman"],char:"\u{1f64b}",fitzpatrick_scale:!0,category:"people"},raising_hand_man:{keywords:["male","boy","man"],char:"\u{1f64b}\u200d\u2642\ufe0f",fitzpatrick_scale:!0,category:"people"},pouting_woman:{keywords:["female","girl","woman"],char:"\u{1f64e}",fitzpatrick_scale:!0,category:"people"},pouting_man:{keywords:["male","boy","man"],char:"\u{1f64e}\u200d\u2642\ufe0f",fitzpatrick_scale:!0,category:"people"},frowning_woman:{keywords:["female","girl","woman","sad","depressed","discouraged","unhappy"],char:"\u{1f64d}",fitzpatrick_scale:!0,category:"people"},frowning_man:{keywords:["male","boy","man","sad","depressed","discouraged","unhappy"],char:"\u{1f64d}\u200d\u2642\ufe0f",fitzpatrick_scale:!0,category:"people"},haircut_woman:{keywords:["female","girl","woman"],char:"\u{1f487}",fitzpatrick_scale:!0,category:"people"},haircut_man:{keywords:["male","boy","man"],char:"\u{1f487}\u200d\u2642\ufe0f",fitzpatrick_scale:!0,category:"people"},massage_woman:{keywords:["female","girl","woman","head"],char:"\u{1f486}",fitzpatrick_scale:!0,category:"people"},massage_man:{keywords:["male","boy","man","head"],char:"\u{1f486}\u200d\u2642\ufe0f",fitzpatrick_scale:!0,category:"people"},woman_in_steamy_room:{keywords:["female","woman","spa","steamroom","sauna"],char:"\u{1f9d6}\u200d\u2640\ufe0f",fitzpatrick_scale:!0,category:"people"},man_in_steamy_room:{keywords:["male","man","spa","steamroom","sauna"],char:"\u{1f9d6}\u200d\u2642\ufe0f",fitzpatrick_scale:!0,category:"people"},couple_with_heart_woman_man:{keywords:["pair","love","like","affection","human","dating","valentines","marriage"],char:"\u{1f491}",fitzpatrick_scale:!1,category:"people"},couple_with_heart_woman_woman:{keywords:["pair","love","like","affection","human","dating","valentines","marriage"],char:"\u{1f469}\u200d\u2764\ufe0f\u200d\u{1f469}",fitzpatrick_scale:!1,category:"people"},couple_with_heart_man_man:{keywords:["pair","love","like","affection","human","dating","valentines","marriage"],char:"\u{1f468}\u200d\u2764\ufe0f\u200d\u{1f468}",fitzpatrick_scale:!1,category:"people"},couplekiss_man_woman:{keywords:["pair","valentines","love","like","dating","marriage"],char:"\u{1f48f}",fitzpatrick_scale:!1,category:"people"},couplekiss_woman_woman:{keywords:["pair","valentines","love","like","dating","marriage"],char:"\u{1f469}\u200d\u2764\ufe0f\u200d\u{1f48b}\u200d\u{1f469}",fitzpatrick_scale:!1,category:"people"},couplekiss_man_man:{keywords:["pair","valentines","love","like","dating","marriage"],char:"\u{1f468}\u200d\u2764\ufe0f\u200d\u{1f48b}\u200d\u{1f468}",fitzpatrick_scale:!1,category:"people"},family_man_woman_boy:{keywords:["home","parents","child","mom","dad","father","mother","people","human"],char:"\u{1f46a}",fitzpatrick_scale:!1,category:"people"},family_man_woman_girl:{keywords:["home","parents","people","human","child"],char:"\u{1f468}\u200d\u{1f469}\u200d\u{1f467}",fitzpatrick_scale:!1,category:"people"},family_man_woman_girl_boy:{keywords:["home","parents","people","human","children"],char:"\u{1f468}\u200d\u{1f469}\u200d\u{1f467}\u200d\u{1f466}",fitzpatrick_scale:!1,category:"people"},family_man_woman_boy_boy:{keywords:["home","parents","people","human","children"],char:"\u{1f468}\u200d\u{1f469}\u200d\u{1f466}\u200d\u{1f466}",fitzpatrick_scale:!1,category:"people"},family_man_woman_girl_girl:{keywords:["home","parents","people","human","children"],char:"\u{1f468}\u200d\u{1f469}\u200d\u{1f467}\u200d\u{1f467}",fitzpatrick_scale:!1,category:"people"},family_woman_woman_boy:{keywords:["home","parents","people","human","children"],char:"\u{1f469}\u200d\u{1f469}\u200d\u{1f466}",fitzpatrick_scale:!1,category:"people"},family_woman_woman_girl:{keywords:["home","parents","people","human","children"],char:"\u{1f469}\u200d\u{1f469}\u200d\u{1f467}",fitzpatrick_scale:!1,category:"people"},family_woman_woman_girl_boy:{keywords:["home","parents","people","human","children"],char:"\u{1f469}\u200d\u{1f469}\u200d\u{1f467}\u200d\u{1f466}",fitzpatrick_scale:!1,category:"people"},family_woman_woman_boy_boy:{keywords:["home","parents","people","human","children"],char:"\u{1f469}\u200d\u{1f469}\u200d\u{1f466}\u200d\u{1f466}",fitzpatrick_scale:!1,category:"people"},family_woman_woman_girl_girl:{keywords:["home","parents","people","human","children"],char:"\u{1f469}\u200d\u{1f469}\u200d\u{1f467}\u200d\u{1f467}",fitzpatrick_scale:!1,category:"people"},family_man_man_boy:{keywords:["home","parents","people","human","children"],char:"\u{1f468}\u200d\u{1f468}\u200d\u{1f466}",fitzpatrick_scale:!1,category:"people"},family_man_man_girl:{keywords:["home","parents","people","human","children"],char:"\u{1f468}\u200d\u{1f468}\u200d\u{1f467}",fitzpatrick_scale:!1,category:"people"},family_man_man_girl_boy:{keywords:["home","parents","people","human","children"],char:"\u{1f468}\u200d\u{1f468}\u200d\u{1f467}\u200d\u{1f466}",fitzpatrick_scale:!1,category:"people"},family_man_man_boy_boy:{keywords:["home","parents","people","human","children"],char:"\u{1f468}\u200d\u{1f468}\u200d\u{1f466}\u200d\u{1f466}",fitzpatrick_scale:!1,category:"people"},family_man_man_girl_girl:{keywords:["home","parents","people","human","children"],char:"\u{1f468}\u200d\u{1f468}\u200d\u{1f467}\u200d\u{1f467}",fitzpatrick_scale:!1,category:"people"},family_woman_boy:{keywords:["home","parent","people","human","child"],char:"\u{1f469}\u200d\u{1f466}",fitzpatrick_scale:!1,category:"people"},family_woman_girl:{keywords:["home","parent","people","human","child"],char:"\u{1f469}\u200d\u{1f467}",fitzpatrick_scale:!1,category:"people"},family_woman_girl_boy:{keywords:["home","parent","people","human","children"],char:"\u{1f469}\u200d\u{1f467}\u200d\u{1f466}",fitzpatrick_scale:!1,category:"people"},family_woman_boy_boy:{keywords:["home","parent","people","human","children"],char:"\u{1f469}\u200d\u{1f466}\u200d\u{1f466}",fitzpatrick_scale:!1,category:"people"},family_woman_girl_girl:{keywords:["home","parent","people","human","children"],char:"\u{1f469}\u200d\u{1f467}\u200d\u{1f467}",fitzpatrick_scale:!1,category:"people"},family_man_boy:{keywords:["home","parent","people","human","child"],char:"\u{1f468}\u200d\u{1f466}",fitzpatrick_scale:!1,category:"people"},family_man_girl:{keywords:["home","parent","people","human","child"],char:"\u{1f468}\u200d\u{1f467}",fitzpatrick_scale:!1,category:"people"},family_man_girl_boy:{keywords:["home","parent","people","human","children"],char:"\u{1f468}\u200d\u{1f467}\u200d\u{1f466}",fitzpatrick_scale:!1,category:"people"},family_man_boy_boy:{keywords:["home","parent","people","human","children"],char:"\u{1f468}\u200d\u{1f466}\u200d\u{1f466}",fitzpatrick_scale:!1,category:"people"},family_man_girl_girl:{keywords:["home","parent","people","human","children"],char:"\u{1f468}\u200d\u{1f467}\u200d\u{1f467}",fitzpatrick_scale:!1,category:"people"},yarn:{keywords:["ball","crochet","knit"],char:"\u{1f9f6}",fitzpatrick_scale:!1,category:"people"},thread:{keywords:["needle","sewing","spool","string"],char:"\u{1f9f5}",fitzpatrick_scale:!1,category:"people"},coat:{keywords:["jacket"],char:"\u{1f9e5}",fitzpatrick_scale:!1,category:"people"},labcoat:{keywords:["doctor","experiment","scientist","chemist"],char:"\u{1f97c}",fitzpatrick_scale:!1,category:"people"},womans_clothes:{keywords:["fashion","shopping_bags","female"],char:"\u{1f45a}",fitzpatrick_scale:!1,category:"people"},tshirt:{keywords:["fashion","cloth","casual","shirt","tee"],char:"\u{1f455}",fitzpatrick_scale:!1,category:"people"},jeans:{keywords:["fashion","shopping"],char:"\u{1f456}",fitzpatrick_scale:!1,category:"people"},necktie:{keywords:["shirt","suitup","formal","fashion","cloth","business"],char:"\u{1f454}",fitzpatrick_scale:!1,category:"people"},dress:{keywords:["clothes","fashion","shopping"],char:"\u{1f457}",fitzpatrick_scale:!1,category:"people"},bikini:{keywords:["swimming","female","woman","girl","fashion","beach","summer"],char:"\u{1f459}",fitzpatrick_scale:!1,category:"people"},kimono:{keywords:["dress","fashion","women","female","japanese"],char:"\u{1f458}",fitzpatrick_scale:!1,category:"people"},lipstick:{keywords:["female","girl","fashion","woman"],char:"\u{1f484}",fitzpatrick_scale:!1,category:"people"},kiss:{keywords:["face","lips","love","like","affection","valentines"],char:"\u{1f48b}",fitzpatrick_scale:!1,category:"people"},footprints:{keywords:["feet","tracking","walking","beach"],char:"\u{1f463}",fitzpatrick_scale:!1,category:"people"},flat_shoe:{keywords:["ballet","slip-on","slipper"],char:"\u{1f97f}",fitzpatrick_scale:!1,category:"people"},high_heel:{keywords:["fashion","shoes","female","pumps","stiletto"],char:"\u{1f460}",fitzpatrick_scale:!1,category:"people"},sandal:{keywords:["shoes","fashion","flip flops"],char:"\u{1f461}",fitzpatrick_scale:!1,category:"people"},boot:{keywords:["shoes","fashion"],char:"\u{1f462}",fitzpatrick_scale:!1,category:"people"},mans_shoe:{keywords:["fashion","male"],char:"\u{1f45e}",fitzpatrick_scale:!1,category:"people"},athletic_shoe:{keywords:["shoes","sports","sneakers"],char:"\u{1f45f}",fitzpatrick_scale:!1,category:"people"},hiking_boot:{keywords:["backpacking","camping","hiking"],char:"\u{1f97e}",fitzpatrick_scale:!1,category:"people"},socks:{keywords:["stockings","clothes"],char:"\u{1f9e6}",fitzpatrick_scale:!1,category:"people"},gloves:{keywords:["hands","winter","clothes"],char:"\u{1f9e4}",fitzpatrick_scale:!1,category:"people"},scarf:{keywords:["neck","winter","clothes"],char:"\u{1f9e3}",fitzpatrick_scale:!1,category:"people"},womans_hat:{keywords:["fashion","accessories","female","lady","spring"],char:"\u{1f452}",fitzpatrick_scale:!1,category:"people"},tophat:{keywords:["magic","gentleman","classy","circus"],char:"\u{1f3a9}",fitzpatrick_scale:!1,category:"people"},billed_hat:{keywords:["cap","baseball"],char:"\u{1f9e2}",fitzpatrick_scale:!1,category:"people"},rescue_worker_helmet:{keywords:["construction","build"],char:"\u26d1",fitzpatrick_scale:!1,category:"people"},mortar_board:{keywords:["school","college","degree","university","graduation","cap","hat","legal","learn","education"],char:"\u{1f393}",fitzpatrick_scale:!1,category:"people"},crown:{keywords:["king","kod","leader","royalty","lord"],char:"\u{1f451}",fitzpatrick_scale:!1,category:"people"},school_satchel:{keywords:["student","education","bag","backpack"],char:"\u{1f392}",fitzpatrick_scale:!1,category:"people"},luggage:{keywords:["packing","travel"],char:"\u{1f9f3}",fitzpatrick_scale:!1,category:"people"},pouch:{keywords:["bag","accessories","shopping"],char:"\u{1f45d}",fitzpatrick_scale:!1,category:"people"},purse:{keywords:["fashion","accessories","money","sales","shopping"],char:"\u{1f45b}",fitzpatrick_scale:!1,category:"people"},handbag:{keywords:["fashion","accessory","accessories","shopping"],char:"\u{1f45c}",fitzpatrick_scale:!1,category:"people"},briefcase:{keywords:["business","documents","work","law","legal","job","career"],char:"\u{1f4bc}",fitzpatrick_scale:!1,category:"people"},eyeglasses:{keywords:["fashion","accessories","eyesight","nerdy","dork","geek"],char:"\u{1f453}",fitzpatrick_scale:!1,category:"people"},dark_sunglasses:{keywords:["face","cool","accessories"],char:"\u{1f576}",fitzpatrick_scale:!1,category:"people"},goggles:{keywords:["eyes","protection","safety"],char:"\u{1f97d}",fitzpatrick_scale:!1,category:"people"},ring:{keywords:["wedding","propose","marriage","valentines","diamond","fashion","jewelry","gem","engagement"],char:"\u{1f48d}",fitzpatrick_scale:!1,category:"people"},closed_umbrella:{keywords:["weather","rain","drizzle"],char:"\u{1f302}",fitzpatrick_scale:!1,category:"people"},dog:{keywords:["animal","friend","nature","woof","puppy","pet","faithful"],char:"\u{1f436}",fitzpatrick_scale:!1,category:"animals_and_nature"},cat:{keywords:["animal","meow","nature","pet","kitten"],char:"\u{1f431}",fitzpatrick_scale:!1,category:"animals_and_nature"},mouse:{keywords:["animal","nature","cheese_wedge","rodent"],char:"\u{1f42d}",fitzpatrick_scale:!1,category:"animals_and_nature"},hamster:{keywords:["animal","nature"],char:"\u{1f439}",fitzpatrick_scale:!1,category:"animals_and_nature"},rabbit:{keywords:["animal","nature","pet","spring","magic","bunny"],char:"\u{1f430}",fitzpatrick_scale:!1,category:"animals_and_nature"},fox_face:{keywords:["animal","nature","face"],char:"\u{1f98a}",fitzpatrick_scale:!1,category:"animals_and_nature"},bear:{keywords:["animal","nature","wild"],char:"\u{1f43b}",fitzpatrick_scale:!1,category:"animals_and_nature"},panda_face:{keywords:["animal","nature","panda"],char:"\u{1f43c}",fitzpatrick_scale:!1,category:"animals_and_nature"},koala:{keywords:["animal","nature"],char:"\u{1f428}",fitzpatrick_scale:!1,category:"animals_and_nature"},tiger:{keywords:["animal","cat","danger","wild","nature","roar"],char:"\u{1f42f}",fitzpatrick_scale:!1,category:"animals_and_nature"},lion:{keywords:["animal","nature"],char:"\u{1f981}",fitzpatrick_scale:!1,category:"animals_and_nature"},cow:{keywords:["beef","ox","animal","nature","moo","milk"],char:"\u{1f42e}",fitzpatrick_scale:!1,category:"animals_and_nature"},pig:{keywords:["animal","oink","nature"],char:"\u{1f437}",fitzpatrick_scale:!1,category:"animals_and_nature"},pig_nose:{keywords:["animal","oink"],char:"\u{1f43d}",fitzpatrick_scale:!1,category:"animals_and_nature"},frog:{keywords:["animal","nature","croak","toad"],char:"\u{1f438}",fitzpatrick_scale:!1,category:"animals_and_nature"},squid:{keywords:["animal","nature","ocean","sea"],char:"\u{1f991}",fitzpatrick_scale:!1,category:"animals_and_nature"},octopus:{keywords:["animal","creature","ocean","sea","nature","beach"],char:"\u{1f419}",fitzpatrick_scale:!1,category:"animals_and_nature"},shrimp:{keywords:["animal","ocean","nature","seafood"],char:"\u{1f990}",fitzpatrick_scale:!1,category:"animals_and_nature"},monkey_face:{keywords:["animal","nature","circus"],char:"\u{1f435}",fitzpatrick_scale:!1,category:"animals_and_nature"},gorilla:{keywords:["animal","nature","circus"],char:"\u{1f98d}",fitzpatrick_scale:!1,category:"animals_and_nature"},see_no_evil:{keywords:["monkey","animal","nature","haha"],char:"\u{1f648}",fitzpatrick_scale:!1,category:"animals_and_nature"},hear_no_evil:{keywords:["animal","monkey","nature"],char:"\u{1f649}",fitzpatrick_scale:!1,category:"animals_and_nature"},speak_no_evil:{keywords:["monkey","animal","nature","omg"],char:"\u{1f64a}",fitzpatrick_scale:!1,category:"animals_and_nature"},monkey:{keywords:["animal","nature","banana","circus"],char:"\u{1f412}",fitzpatrick_scale:!1,category:"animals_and_nature"},chicken:{keywords:["animal","cluck","nature","bird"],char:"\u{1f414}",fitzpatrick_scale:!1,category:"animals_and_nature"},penguin:{keywords:["animal","nature"],char:"\u{1f427}",fitzpatrick_scale:!1,category:"animals_and_nature"},bird:{keywords:["animal","nature","fly","tweet","spring"],char:"\u{1f426}",fitzpatrick_scale:!1,category:"animals_and_nature"},baby_chick:{keywords:["animal","chicken","bird"],char:"\u{1f424}",fitzpatrick_scale:!1,category:"animals_and_nature"},hatching_chick:{keywords:["animal","chicken","egg","born","baby","bird"],char:"\u{1f423}",fitzpatrick_scale:!1,category:"animals_and_nature"},hatched_chick:{keywords:["animal","chicken","baby","bird"],char:"\u{1f425}",fitzpatrick_scale:!1,category:"animals_and_nature"},duck:{keywords:["animal","nature","bird","mallard"],char:"\u{1f986}",fitzpatrick_scale:!1,category:"animals_and_nature"},eagle:{keywords:["animal","nature","bird"],char:"\u{1f985}",fitzpatrick_scale:!1,category:"animals_and_nature"},owl:{keywords:["animal","nature","bird","hoot"],char:"\u{1f989}",fitzpatrick_scale:!1,category:"animals_and_nature"},bat:{keywords:["animal","nature","blind","vampire"],char:"\u{1f987}",fitzpatrick_scale:!1,category:"animals_and_nature"},wolf:{keywords:["animal","nature","wild"],char:"\u{1f43a}",fitzpatrick_scale:!1,category:"animals_and_nature"},boar:{keywords:["animal","nature"],char:"\u{1f417}",fitzpatrick_scale:!1,category:"animals_and_nature"},horse:{keywords:["animal","brown","nature"],char:"\u{1f434}",fitzpatrick_scale:!1,category:"animals_and_nature"},unicorn:{keywords:["animal","nature","mystical"],char:"\u{1f984}",fitzpatrick_scale:!1,category:"animals_and_nature"},honeybee:{keywords:["animal","insect","nature","bug","spring","honey"],char:"\u{1f41d}",fitzpatrick_scale:!1,category:"animals_and_nature"},bug:{keywords:["animal","insect","nature","worm"],char:"\u{1f41b}",fitzpatrick_scale:!1,category:"animals_and_nature"},butterfly:{keywords:["animal","insect","nature","caterpillar"],char:"\u{1f98b}",fitzpatrick_scale:!1,category:"animals_and_nature"},snail:{keywords:["slow","animal","shell"],char:"\u{1f40c}",fitzpatrick_scale:!1,category:"animals_and_nature"},beetle:{keywords:["animal","insect","nature","ladybug"],char:"\u{1f41e}",fitzpatrick_scale:!1,category:"animals_and_nature"},ant:{keywords:["animal","insect","nature","bug"],char:"\u{1f41c}",fitzpatrick_scale:!1,category:"animals_and_nature"},grasshopper:{keywords:["animal","cricket","chirp"],char:"\u{1f997}",fitzpatrick_scale:!1,category:"animals_and_nature"},spider:{keywords:["animal","arachnid"],char:"\u{1f577}",fitzpatrick_scale:!1,category:"animals_and_nature"},scorpion:{keywords:["animal","arachnid"],char:"\u{1f982}",fitzpatrick_scale:!1,category:"animals_and_nature"},crab:{keywords:["animal","crustacean"],char:"\u{1f980}",fitzpatrick_scale:!1,category:"animals_and_nature"},snake:{keywords:["animal","evil","nature","hiss","python"],char:"\u{1f40d}",fitzpatrick_scale:!1,category:"animals_and_nature"},lizard:{keywords:["animal","nature","reptile"],char:"\u{1f98e}",fitzpatrick_scale:!1,category:"animals_and_nature"},"t-rex":{keywords:["animal","nature","dinosaur","tyrannosaurus","extinct"],char:"\u{1f996}",fitzpatrick_scale:!1,category:"animals_and_nature"},sauropod:{keywords:["animal","nature","dinosaur","brachiosaurus","brontosaurus","diplodocus","extinct"],char:"\u{1f995}",fitzpatrick_scale:!1,category:"animals_and_nature"},turtle:{keywords:["animal","slow","nature","tortoise"],char:"\u{1f422}",fitzpatrick_scale:!1,category:"animals_and_nature"},tropical_fish:{keywords:["animal","swim","ocean","beach","nemo"],char:"\u{1f420}",fitzpatrick_scale:!1,category:"animals_and_nature"},fish:{keywords:["animal","food","nature"],char:"\u{1f41f}",fitzpatrick_scale:!1,category:"animals_and_nature"},blowfish:{keywords:["animal","nature","food","sea","ocean"],char:"\u{1f421}",fitzpatrick_scale:!1,category:"animals_and_nature"},dolphin:{keywords:["animal","nature","fish","sea","ocean","flipper","fins","beach"],char:"\u{1f42c}",fitzpatrick_scale:!1,category:"animals_and_nature"},shark:{keywords:["animal","nature","fish","sea","ocean","jaws","fins","beach"],char:"\u{1f988}",fitzpatrick_scale:!1,category:"animals_and_nature"},whale:{keywords:["animal","nature","sea","ocean"],char:"\u{1f433}",fitzpatrick_scale:!1,category:"animals_and_nature"},whale2:{keywords:["animal","nature","sea","ocean"],char:"\u{1f40b}",fitzpatrick_scale:!1,category:"animals_and_nature"},crocodile:{keywords:["animal","nature","reptile","lizard","alligator"],char:"\u{1f40a}",fitzpatrick_scale:!1,category:"animals_and_nature"},leopard:{keywords:["animal","nature"],char:"\u{1f406}",fitzpatrick_scale:!1,category:"animals_and_nature"},zebra:{keywords:["animal","nature","stripes","safari"],char:"\u{1f993}",fitzpatrick_scale:!1,category:"animals_and_nature"},tiger2:{keywords:["animal","nature","roar"],char:"\u{1f405}",fitzpatrick_scale:!1,category:"animals_and_nature"},water_buffalo:{keywords:["animal","nature","ox","cow"],char:"\u{1f403}",fitzpatrick_scale:!1,category:"animals_and_nature"},ox:{keywords:["animal","cow","beef"],char:"\u{1f402}",fitzpatrick_scale:!1,category:"animals_and_nature"},cow2:{keywords:["beef","ox","animal","nature","moo","milk"],char:"\u{1f404}",fitzpatrick_scale:!1,category:"animals_and_nature"},deer:{keywords:["animal","nature","horns","venison"],char:"\u{1f98c}",fitzpatrick_scale:!1,category:"animals_and_nature"},dromedary_camel:{keywords:["animal","hot","desert","hump"],char:"\u{1f42a}",fitzpatrick_scale:!1,category:"animals_and_nature"},camel:{keywords:["animal","nature","hot","desert","hump"],char:"\u{1f42b}",fitzpatrick_scale:!1,category:"animals_and_nature"},giraffe:{keywords:["animal","nature","spots","safari"],char:"\u{1f992}",fitzpatrick_scale:!1,category:"animals_and_nature"},elephant:{keywords:["animal","nature","nose","th","circus"],char:"\u{1f418}",fitzpatrick_scale:!1,category:"animals_and_nature"},rhinoceros:{keywords:["animal","nature","horn"],char:"\u{1f98f}",fitzpatrick_scale:!1,category:"animals_and_nature"},goat:{keywords:["animal","nature"],char:"\u{1f410}",fitzpatrick_scale:!1,category:"animals_and_nature"},ram:{keywords:["animal","sheep","nature"],char:"\u{1f40f}",fitzpatrick_scale:!1,category:"animals_and_nature"},sheep:{keywords:["animal","nature","wool","shipit"],char:"\u{1f411}",fitzpatrick_scale:!1,category:"animals_and_nature"},racehorse:{keywords:["animal","gamble","luck"],char:"\u{1f40e}",fitzpatrick_scale:!1,category:"animals_and_nature"},pig2:{keywords:["animal","nature"],char:"\u{1f416}",fitzpatrick_scale:!1,category:"animals_and_nature"},rat:{keywords:["animal","mouse","rodent"],char:"\u{1f400}",fitzpatrick_scale:!1,category:"animals_and_nature"},mouse2:{keywords:["animal","nature","rodent"],char:"\u{1f401}",fitzpatrick_scale:!1,category:"animals_and_nature"},rooster:{keywords:["animal","nature","chicken"],char:"\u{1f413}",fitzpatrick_scale:!1,category:"animals_and_nature"},turkey:{keywords:["animal","bird"],char:"\u{1f983}",fitzpatrick_scale:!1,category:"animals_and_nature"},dove:{keywords:["animal","bird"],char:"\u{1f54a}",fitzpatrick_scale:!1,category:"animals_and_nature"},dog2:{keywords:["animal","nature","friend","doge","pet","faithful"],char:"\u{1f415}",fitzpatrick_scale:!1,category:"animals_and_nature"},poodle:{keywords:["dog","animal","101","nature","pet"],char:"\u{1f429}",fitzpatrick_scale:!1,category:"animals_and_nature"},cat2:{keywords:["animal","meow","pet","cats"],char:"\u{1f408}",fitzpatrick_scale:!1,category:"animals_and_nature"},rabbit2:{keywords:["animal","nature","pet","magic","spring"],char:"\u{1f407}",fitzpatrick_scale:!1,category:"animals_and_nature"},chipmunk:{keywords:["animal","nature","rodent","squirrel"],char:"\u{1f43f}",fitzpatrick_scale:!1,category:"animals_and_nature"},hedgehog:{keywords:["animal","nature","spiny"],char:"\u{1f994}",fitzpatrick_scale:!1,category:"animals_and_nature"},raccoon:{keywords:["animal","nature"],char:"\u{1f99d}",fitzpatrick_scale:!1,category:"animals_and_nature"},llama:{keywords:["animal","nature","alpaca"],char:"\u{1f999}",fitzpatrick_scale:!1,category:"animals_and_nature"},hippopotamus:{keywords:["animal","nature"],char:"\u{1f99b}",fitzpatrick_scale:!1,category:"animals_and_nature"},kangaroo:{keywords:["animal","nature","australia","joey","hop","marsupial"],char:"\u{1f998}",fitzpatrick_scale:!1,category:"animals_and_nature"},badger:{keywords:["animal","nature","honey"],char:"\u{1f9a1}",fitzpatrick_scale:!1,category:"animals_and_nature"},swan:{keywords:["animal","nature","bird"],char:"\u{1f9a2}",fitzpatrick_scale:!1,category:"animals_and_nature"},peacock:{keywords:["animal","nature","peahen","bird"],char:"\u{1f99a}",fitzpatrick_scale:!1,category:"animals_and_nature"},parrot:{keywords:["animal","nature","bird","pirate","talk"],char:"\u{1f99c}",fitzpatrick_scale:!1,category:"animals_and_nature"},lobster:{keywords:["animal","nature","bisque","claws","seafood"],char:"\u{1f99e}",fitzpatrick_scale:!1,category:"animals_and_nature"},mosquito:{keywords:["animal","nature","insect","malaria"],char:"\u{1f99f}",fitzpatrick_scale:!1,category:"animals_and_nature"},paw_prints:{keywords:["animal","tracking","footprints","dog","cat","pet","feet"],char:"\u{1f43e}",fitzpatrick_scale:!1,category:"animals_and_nature"},dragon:{keywords:["animal","myth","nature","chinese","green"],char:"\u{1f409}",fitzpatrick_scale:!1,category:"animals_and_nature"},dragon_face:{keywords:["animal","myth","nature","chinese","green"],char:"\u{1f432}",fitzpatrick_scale:!1,category:"animals_and_nature"},cactus:{keywords:["vegetable","plant","nature"],char:"\u{1f335}",fitzpatrick_scale:!1,category:"animals_and_nature"},christmas_tree:{keywords:["festival","vacation","december","xmas","celebration"],char:"\u{1f384}",fitzpatrick_scale:!1,category:"animals_and_nature"},evergreen_tree:{keywords:["plant","nature"],char:"\u{1f332}",fitzpatrick_scale:!1,category:"animals_and_nature"},deciduous_tree:{keywords:["plant","nature"],char:"\u{1f333}",fitzpatrick_scale:!1,category:"animals_and_nature"},palm_tree:{keywords:["plant","vegetable","nature","summer","beach","mojito","tropical"],char:"\u{1f334}",fitzpatrick_scale:!1,category:"animals_and_nature"},seedling:{keywords:["plant","nature","grass","lawn","spring"],char:"\u{1f331}",fitzpatrick_scale:!1,category:"animals_and_nature"},herb:{keywords:["vegetable","plant","medicine","weed","grass","lawn"],char:"\u{1f33f}",fitzpatrick_scale:!1,category:"animals_and_nature"},shamrock:{keywords:["vegetable","plant","nature","irish","clover"],char:"\u2618",fitzpatrick_scale:!1,category:"animals_and_nature"},four_leaf_clover:{keywords:["vegetable","plant","nature","lucky","irish"],char:"\u{1f340}",fitzpatrick_scale:!1,category:"animals_and_nature"},bamboo:{keywords:["plant","nature","vegetable","panda","pine_decoration"],char:"\u{1f38d}",fitzpatrick_scale:!1,category:"animals_and_nature"},tanabata_tree:{keywords:["plant","nature","branch","summer"],char:"\u{1f38b}",fitzpatrick_scale:!1,category:"animals_and_nature"},leaves:{keywords:["nature","plant","tree","vegetable","grass","lawn","spring"],char:"\u{1f343}",fitzpatrick_scale:!1,category:"animals_and_nature"},fallen_leaf:{keywords:["nature","plant","vegetable","leaves"],char:"\u{1f342}",fitzpatrick_scale:!1,category:"animals_and_nature"},maple_leaf:{keywords:["nature","plant","vegetable","ca","fall"],char:"\u{1f341}",fitzpatrick_scale:!1,category:"animals_and_nature"},ear_of_rice:{keywords:["nature","plant"],char:"\u{1f33e}",fitzpatrick_scale:!1,category:"animals_and_nature"},hibiscus:{keywords:["plant","vegetable","flowers","beach"],char:"\u{1f33a}",fitzpatrick_scale:!1,category:"animals_and_nature"},sunflower:{keywords:["nature","plant","fall"],char:"\u{1f33b}",fitzpatrick_scale:!1,category:"animals_and_nature"},rose:{keywords:["flowers","valentines","love","spring"],char:"\u{1f339}",fitzpatrick_scale:!1,category:"animals_and_nature"},wilted_flower:{keywords:["plant","nature","flower"],char:"\u{1f940}",fitzpatrick_scale:!1,category:"animals_and_nature"},tulip:{keywords:["flowers","plant","nature","summer","spring"],char:"\u{1f337}",fitzpatrick_scale:!1,category:"animals_and_nature"},blossom:{keywords:["nature","flowers","yellow"],char:"\u{1f33c}",fitzpatrick_scale:!1,category:"animals_and_nature"},cherry_blossom:{keywords:["nature","plant","spring","flower"],char:"\u{1f338}",fitzpatrick_scale:!1,category:"animals_and_nature"},bouquet:{keywords:["flowers","nature","spring"],char:"\u{1f490}",fitzpatrick_scale:!1,category:"animals_and_nature"},mushroom:{keywords:["plant","vegetable"],char:"\u{1f344}",fitzpatrick_scale:!1,category:"animals_and_nature"},chestnut:{keywords:["food","squirrel"],char:"\u{1f330}",fitzpatrick_scale:!1,category:"animals_and_nature"},jack_o_lantern:{keywords:["halloween","light","pumpkin","creepy","fall"],char:"\u{1f383}",fitzpatrick_scale:!1,category:"animals_and_nature"},shell:{keywords:["nature","sea","beach"],char:"\u{1f41a}",fitzpatrick_scale:!1,category:"animals_and_nature"},spider_web:{keywords:["animal","insect","arachnid","silk"],char:"\u{1f578}",fitzpatrick_scale:!1,category:"animals_and_nature"},earth_americas:{keywords:["globe","world","USA","international"],char:"\u{1f30e}",fitzpatrick_scale:!1,category:"animals_and_nature"},earth_africa:{keywords:["globe","world","international"],char:"\u{1f30d}",fitzpatrick_scale:!1,category:"animals_and_nature"},earth_asia:{keywords:["globe","world","east","international"],char:"\u{1f30f}",fitzpatrick_scale:!1,category:"animals_and_nature"},full_moon:{keywords:["nature","yellow","twilight","planet","space","night","evening","sleep"],char:"\u{1f315}",fitzpatrick_scale:!1,category:"animals_and_nature"},waning_gibbous_moon:{keywords:["nature","twilight","planet","space","night","evening","sleep","waxing_gibbous_moon"],char:"\u{1f316}",fitzpatrick_scale:!1,category:"animals_and_nature"},last_quarter_moon:{keywords:["nature","twilight","planet","space","night","evening","sleep"],char:"\u{1f317}",fitzpatrick_scale:!1,category:"animals_and_nature"},waning_crescent_moon:{keywords:["nature","twilight","planet","space","night","evening","sleep"],char:"\u{1f318}",fitzpatrick_scale:!1,category:"animals_and_nature"},new_moon:{keywords:["nature","twilight","planet","space","night","evening","sleep"],char:"\u{1f311}",fitzpatrick_scale:!1,category:"animals_and_nature"},waxing_crescent_moon:{keywords:["nature","twilight","planet","space","night","evening","sleep"],char:"\u{1f312}",fitzpatrick_scale:!1,category:"animals_and_nature"},first_quarter_moon:{keywords:["nature","twilight","planet","space","night","evening","sleep"],char:"\u{1f313}",fitzpatrick_scale:!1,category:"animals_and_nature"},waxing_gibbous_moon:{keywords:["nature","night","sky","gray","twilight","planet","space","evening","sleep"],char:"\u{1f314}",fitzpatrick_scale:!1,category:"animals_and_nature"},new_moon_with_face:{keywords:["nature","twilight","planet","space","night","evening","sleep"],char:"\u{1f31a}",fitzpatrick_scale:!1,category:"animals_and_nature"},full_moon_with_face:{keywords:["nature","twilight","planet","space","night","evening","sleep"],char:"\u{1f31d}",fitzpatrick_scale:!1,category:"animals_and_nature"},first_quarter_moon_with_face:{keywords:["nature","twilight","planet","space","night","evening","sleep"],char:"\u{1f31b}",fitzpatrick_scale:!1,category:"animals_and_nature"},last_quarter_moon_with_face:{keywords:["nature","twilight","planet","space","night","evening","sleep"],char:"\u{1f31c}",fitzpatrick_scale:!1,category:"animals_and_nature"},sun_with_face:{keywords:["nature","morning","sky"],char:"\u{1f31e}",fitzpatrick_scale:!1,category:"animals_and_nature"},crescent_moon:{keywords:["night","sleep","sky","evening","magic"],char:"\u{1f319}",fitzpatrick_scale:!1,category:"animals_and_nature"},star:{keywords:["night","yellow"],char:"\u2b50",fitzpatrick_scale:!1,category:"animals_and_nature"},star2:{keywords:["night","sparkle","awesome","good","magic"],char:"\u{1f31f}",fitzpatrick_scale:!1,category:"animals_and_nature"},dizzy:{keywords:["star","sparkle","shoot","magic"],char:"\u{1f4ab}",fitzpatrick_scale:!1,category:"animals_and_nature"},sparkles:{keywords:["stars","shine","shiny","cool","awesome","good","magic"],char:"\u2728",fitzpatrick_scale:!1,category:"animals_and_nature"},comet:{keywords:["space"],char:"\u2604",fitzpatrick_scale:!1,category:"animals_and_nature"},sunny:{keywords:["weather","nature","brightness","summer","beach","spring"],char:"\u2600\ufe0f",fitzpatrick_scale:!1,category:"animals_and_nature"},sun_behind_small_cloud:{keywords:["weather"],char:"\u{1f324}",fitzpatrick_scale:!1,category:"animals_and_nature"},partly_sunny:{keywords:["weather","nature","cloudy","morning","fall","spring"],char:"\u26c5",fitzpatrick_scale:!1,category:"animals_and_nature"},sun_behind_large_cloud:{keywords:["weather"],char:"\u{1f325}",fitzpatrick_scale:!1,category:"animals_and_nature"},sun_behind_rain_cloud:{keywords:["weather"],char:"\u{1f326}",fitzpatrick_scale:!1,category:"animals_and_nature"},cloud:{keywords:["weather","sky"],char:"\u2601\ufe0f",fitzpatrick_scale:!1,category:"animals_and_nature"},cloud_with_rain:{keywords:["weather"],char:"\u{1f327}",fitzpatrick_scale:!1,category:"animals_and_nature"},cloud_with_lightning_and_rain:{keywords:["weather","lightning"],char:"\u26c8",fitzpatrick_scale:!1,category:"animals_and_nature"},cloud_with_lightning:{keywords:["weather","thunder"],char:"\u{1f329}",fitzpatrick_scale:!1,category:"animals_and_nature"},zap:{keywords:["thunder","weather","lightning bolt","fast"],char:"\u26a1",fitzpatrick_scale:!1,category:"animals_and_nature"},fire:{keywords:["hot","cook","flame"],char:"\u{1f525}",fitzpatrick_scale:!1,category:"animals_and_nature"},boom:{keywords:["bomb","explode","explosion","collision","blown"],char:"\u{1f4a5}",fitzpatrick_scale:!1,category:"animals_and_nature"},snowflake:{keywords:["winter","season","cold","weather","christmas","xmas"],char:"\u2744\ufe0f",fitzpatrick_scale:!1,category:"animals_and_nature"},cloud_with_snow:{keywords:["weather"],char:"\u{1f328}",fitzpatrick_scale:!1,category:"animals_and_nature"},snowman:{keywords:["winter","season","cold","weather","christmas","xmas","frozen","without_snow"],char:"\u26c4",fitzpatrick_scale:!1,category:"animals_and_nature"},snowman_with_snow:{keywords:["winter","season","cold","weather","christmas","xmas","frozen"],char:"\u2603",fitzpatrick_scale:!1,category:"animals_and_nature"},wind_face:{keywords:["gust","air"],char:"\u{1f32c}",fitzpatrick_scale:!1,category:"animals_and_nature"},dash:{keywords:["wind","air","fast","shoo","fart","smoke","puff"],char:"\u{1f4a8}",fitzpatrick_scale:!1,category:"animals_and_nature"},tornado:{keywords:["weather","cyclone","twister"],char:"\u{1f32a}",fitzpatrick_scale:!1,category:"animals_and_nature"},fog:{keywords:["weather"],char:"\u{1f32b}",fitzpatrick_scale:!1,category:"animals_and_nature"},open_umbrella:{keywords:["weather","spring"],char:"\u2602",fitzpatrick_scale:!1,category:"animals_and_nature"},umbrella:{keywords:["rainy","weather","spring"],char:"\u2614",fitzpatrick_scale:!1,category:"animals_and_nature"},droplet:{keywords:["water","drip","faucet","spring"],char:"\u{1f4a7}",fitzpatrick_scale:!1,category:"animals_and_nature"},sweat_drops:{keywords:["water","drip","oops"],char:"\u{1f4a6}",fitzpatrick_scale:!1,category:"animals_and_nature"},ocean:{keywords:["sea","water","wave","nature","tsunami","disaster"],char:"\u{1f30a}",fitzpatrick_scale:!1,category:"animals_and_nature"},green_apple:{keywords:["fruit","nature"],char:"\u{1f34f}",fitzpatrick_scale:!1,category:"food_and_drink"},apple:{keywords:["fruit","mac","school"],char:"\u{1f34e}",fitzpatrick_scale:!1,category:"food_and_drink"},pear:{keywords:["fruit","nature","food"],char:"\u{1f350}",fitzpatrick_scale:!1,category:"food_and_drink"},tangerine:{keywords:["food","fruit","nature","orange"],char:"\u{1f34a}",fitzpatrick_scale:!1,category:"food_and_drink"},lemon:{keywords:["fruit","nature"],char:"\u{1f34b}",fitzpatrick_scale:!1,category:"food_and_drink"},banana:{keywords:["fruit","food","monkey"],char:"\u{1f34c}",fitzpatrick_scale:!1,category:"food_and_drink"},watermelon:{keywords:["fruit","food","picnic","summer"],char:"\u{1f349}",fitzpatrick_scale:!1,category:"food_and_drink"},grapes:{keywords:["fruit","food","wine"],char:"\u{1f347}",fitzpatrick_scale:!1,category:"food_and_drink"},strawberry:{keywords:["fruit","food","nature"],char:"\u{1f353}",fitzpatrick_scale:!1,category:"food_and_drink"},melon:{keywords:["fruit","nature","food"],char:"\u{1f348}",fitzpatrick_scale:!1,category:"food_and_drink"},cherries:{keywords:["food","fruit"],char:"\u{1f352}",fitzpatrick_scale:!1,category:"food_and_drink"},peach:{keywords:["fruit","nature","food"],char:"\u{1f351}",fitzpatrick_scale:!1,category:"food_and_drink"},pineapple:{keywords:["fruit","nature","food"],char:"\u{1f34d}",fitzpatrick_scale:!1,category:"food_and_drink"},coconut:{keywords:["fruit","nature","food","palm"],char:"\u{1f965}",fitzpatrick_scale:!1,category:"food_and_drink"},kiwi_fruit:{keywords:["fruit","food"],char:"\u{1f95d}",fitzpatrick_scale:!1,category:"food_and_drink"},mango:{keywords:["fruit","food","tropical"],char:"\u{1f96d}",fitzpatrick_scale:!1,category:"food_and_drink"},avocado:{keywords:["fruit","food"],char:"\u{1f951}",fitzpatrick_scale:!1,category:"food_and_drink"},broccoli:{keywords:["fruit","food","vegetable"],char:"\u{1f966}",fitzpatrick_scale:!1,category:"food_and_drink"},tomato:{keywords:["fruit","vegetable","nature","food"],char:"\u{1f345}",fitzpatrick_scale:!1,category:"food_and_drink"},eggplant:{keywords:["vegetable","nature","food","aubergine"],char:"\u{1f346}",fitzpatrick_scale:!1,category:"food_and_drink"},cucumber:{keywords:["fruit","food","pickle"],char:"\u{1f952}",fitzpatrick_scale:!1,category:"food_and_drink"},carrot:{keywords:["vegetable","food","orange"],char:"\u{1f955}",fitzpatrick_scale:!1,category:"food_and_drink"},hot_pepper:{keywords:["food","spicy","chilli","chili"],char:"\u{1f336}",fitzpatrick_scale:!1,category:"food_and_drink"},potato:{keywords:["food","tuber","vegatable","starch"],char:"\u{1f954}",fitzpatrick_scale:!1,category:"food_and_drink"},corn:{keywords:["food","vegetable","plant"],char:"\u{1f33d}",fitzpatrick_scale:!1,category:"food_and_drink"},leafy_greens:{keywords:["food","vegetable","plant","bok choy","cabbage","kale","lettuce"],char:"\u{1f96c}",fitzpatrick_scale:!1,category:"food_and_drink"},sweet_potato:{keywords:["food","nature"],char:"\u{1f360}",fitzpatrick_scale:!1,category:"food_and_drink"},peanuts:{keywords:["food","nut"],char:"\u{1f95c}",fitzpatrick_scale:!1,category:"food_and_drink"},honey_pot:{keywords:["bees","sweet","kitchen"],char:"\u{1f36f}",fitzpatrick_scale:!1,category:"food_and_drink"},croissant:{keywords:["food","bread","french"],char:"\u{1f950}",fitzpatrick_scale:!1,category:"food_and_drink"},bread:{keywords:["food","wheat","breakfast","toast"],char:"\u{1f35e}",fitzpatrick_scale:!1,category:"food_and_drink"},baguette_bread:{keywords:["food","bread","french"],char:"\u{1f956}",fitzpatrick_scale:!1,category:"food_and_drink"},bagel:{keywords:["food","bread","bakery","schmear"],char:"\u{1f96f}",fitzpatrick_scale:!1,category:"food_and_drink"},pretzel:{keywords:["food","bread","twisted"],char:"\u{1f968}",fitzpatrick_scale:!1,category:"food_and_drink"},cheese:{keywords:["food","chadder"],char:"\u{1f9c0}",fitzpatrick_scale:!1,category:"food_and_drink"},egg:{keywords:["food","chicken","breakfast"],char:"\u{1f95a}",fitzpatrick_scale:!1,category:"food_and_drink"},bacon:{keywords:["food","breakfast","pork","pig","meat"],char:"\u{1f953}",fitzpatrick_scale:!1,category:"food_and_drink"},steak:{keywords:["food","cow","meat","cut","chop","lambchop","porkchop"],char:"\u{1f969}",fitzpatrick_scale:!1,category:"food_and_drink"},pancakes:{keywords:["food","breakfast","flapjacks","hotcakes"],char:"\u{1f95e}",fitzpatrick_scale:!1,category:"food_and_drink"},poultry_leg:{keywords:["food","meat","drumstick","bird","chicken","turkey"],char:"\u{1f357}",fitzpatrick_scale:!1,category:"food_and_drink"},meat_on_bone:{keywords:["good","food","drumstick"],char:"\u{1f356}",fitzpatrick_scale:!1,category:"food_and_drink"},bone:{keywords:["skeleton"],char:"\u{1f9b4}",fitzpatrick_scale:!1,category:"food_and_drink"},fried_shrimp:{keywords:["food","animal","appetizer","summer"],char:"\u{1f364}",fitzpatrick_scale:!1,category:"food_and_drink"},fried_egg:{keywords:["food","breakfast","kitchen","egg"],char:"\u{1f373}",fitzpatrick_scale:!1,category:"food_and_drink"},hamburger:{keywords:["meat","fast food","beef","cheeseburger","mcdonalds","burger king"],char:"\u{1f354}",fitzpatrick_scale:!1,category:"food_and_drink"},fries:{keywords:["chips","snack","fast food"],char:"\u{1f35f}",fitzpatrick_scale:!1,category:"food_and_drink"},stuffed_flatbread:{keywords:["food","flatbread","stuffed","gyro"],char:"\u{1f959}",fitzpatrick_scale:!1,category:"food_and_drink"},hotdog:{keywords:["food","frankfurter"],char:"\u{1f32d}",fitzpatrick_scale:!1,category:"food_and_drink"},pizza:{keywords:["food","party"],char:"\u{1f355}",fitzpatrick_scale:!1,category:"food_and_drink"},sandwich:{keywords:["food","lunch","bread"],char:"\u{1f96a}",fitzpatrick_scale:!1,category:"food_and_drink"},canned_food:{keywords:["food","soup"],char:"\u{1f96b}",fitzpatrick_scale:!1,category:"food_and_drink"},spaghetti:{keywords:["food","italian","noodle"],char:"\u{1f35d}",fitzpatrick_scale:!1,category:"food_and_drink"},taco:{keywords:["food","mexican"],char:"\u{1f32e}",fitzpatrick_scale:!1,category:"food_and_drink"},burrito:{keywords:["food","mexican"],char:"\u{1f32f}",fitzpatrick_scale:!1,category:"food_and_drink"},green_salad:{keywords:["food","healthy","lettuce"],char:"\u{1f957}",fitzpatrick_scale:!1,category:"food_and_drink"},shallow_pan_of_food:{keywords:["food","cooking","casserole","paella"],char:"\u{1f958}",fitzpatrick_scale:!1,category:"food_and_drink"},ramen:{keywords:["food","japanese","noodle","chopsticks"],char:"\u{1f35c}",fitzpatrick_scale:!1,category:"food_and_drink"},stew:{keywords:["food","meat","soup"],char:"\u{1f372}",fitzpatrick_scale:!1,category:"food_and_drink"},fish_cake:{keywords:["food","japan","sea","beach","narutomaki","pink","swirl","kamaboko","surimi","ramen"],char:"\u{1f365}",fitzpatrick_scale:!1,category:"food_and_drink"},fortune_cookie:{keywords:["food","prophecy"],char:"\u{1f960}",fitzpatrick_scale:!1,category:"food_and_drink"},sushi:{keywords:["food","fish","japanese","rice"],char:"\u{1f363}",fitzpatrick_scale:!1,category:"food_and_drink"},bento:{keywords:["food","japanese","box"],char:"\u{1f371}",fitzpatrick_scale:!1,category:"food_and_drink"},curry:{keywords:["food","spicy","hot","indian"],char:"\u{1f35b}",fitzpatrick_scale:!1,category:"food_and_drink"},rice_ball:{keywords:["food","japanese"],char:"\u{1f359}",fitzpatrick_scale:!1,category:"food_and_drink"},rice:{keywords:["food","china","asian"],char:"\u{1f35a}",fitzpatrick_scale:!1,category:"food_and_drink"},rice_cracker:{keywords:["food","japanese"],char:"\u{1f358}",fitzpatrick_scale:!1,category:"food_and_drink"},oden:{keywords:["food","japanese"],char:"\u{1f362}",fitzpatrick_scale:!1,category:"food_and_drink"},dango:{keywords:["food","dessert","sweet","japanese","barbecue","meat"],char:"\u{1f361}",fitzpatrick_scale:!1,category:"food_and_drink"},shaved_ice:{keywords:["hot","dessert","summer"],char:"\u{1f367}",fitzpatrick_scale:!1,category:"food_and_drink"},ice_cream:{keywords:["food","hot","dessert"],char:"\u{1f368}",fitzpatrick_scale:!1,category:"food_and_drink"},icecream:{keywords:["food","hot","dessert","summer"],char:"\u{1f366}",fitzpatrick_scale:!1,category:"food_and_drink"},pie:{keywords:["food","dessert","pastry"],char:"\u{1f967}",fitzpatrick_scale:!1,category:"food_and_drink"},cake:{keywords:["food","dessert"],char:"\u{1f370}",fitzpatrick_scale:!1,category:"food_and_drink"},cupcake:{keywords:["food","dessert","bakery","sweet"],char:"\u{1f9c1}",fitzpatrick_scale:!1,category:"food_and_drink"},moon_cake:{keywords:["food","autumn"],char:"\u{1f96e}",fitzpatrick_scale:!1,category:"food_and_drink"},birthday:{keywords:["food","dessert","cake"],char:"\u{1f382}",fitzpatrick_scale:!1,category:"food_and_drink"},custard:{keywords:["dessert","food"],char:"\u{1f36e}",fitzpatrick_scale:!1,category:"food_and_drink"},candy:{keywords:["snack","dessert","sweet","lolly"],char:"\u{1f36c}",fitzpatrick_scale:!1,category:"food_and_drink"},lollipop:{keywords:["food","snack","candy","sweet"],char:"\u{1f36d}",fitzpatrick_scale:!1,category:"food_and_drink"},chocolate_bar:{keywords:["food","snack","dessert","sweet"],char:"\u{1f36b}",fitzpatrick_scale:!1,category:"food_and_drink"},popcorn:{keywords:["food","movie theater","films","snack"],char:"\u{1f37f}",fitzpatrick_scale:!1,category:"food_and_drink"},dumpling:{keywords:["food","empanada","pierogi","potsticker"],char:"\u{1f95f}",fitzpatrick_scale:!1,category:"food_and_drink"},doughnut:{keywords:["food","dessert","snack","sweet","donut"],char:"\u{1f369}",fitzpatrick_scale:!1,category:"food_and_drink"},cookie:{keywords:["food","snack","oreo","chocolate","sweet","dessert"],char:"\u{1f36a}",fitzpatrick_scale:!1,category:"food_and_drink"},milk_glass:{keywords:["beverage","drink","cow"],char:"\u{1f95b}",fitzpatrick_scale:!1,category:"food_and_drink"},beer:{keywords:["relax","beverage","drink","drunk","party","pub","summer","alcohol","booze"],char:"\u{1f37a}",fitzpatrick_scale:!1,category:"food_and_drink"},beers:{keywords:["relax","beverage","drink","drunk","party","pub","summer","alcohol","booze"],char:"\u{1f37b}",fitzpatrick_scale:!1,category:"food_and_drink"},clinking_glasses:{keywords:["beverage","drink","party","alcohol","celebrate","cheers","wine","champagne","toast"],char:"\u{1f942}",fitzpatrick_scale:!1,category:"food_and_drink"},wine_glass:{keywords:["drink","beverage","drunk","alcohol","booze"],char:"\u{1f377}",fitzpatrick_scale:!1,category:"food_and_drink"},tumbler_glass:{keywords:["drink","beverage","drunk","alcohol","liquor","booze","bourbon","scotch","whisky","glass","shot"],char:"\u{1f943}",fitzpatrick_scale:!1,category:"food_and_drink"},cocktail:{keywords:["drink","drunk","alcohol","beverage","booze","mojito"],char:"\u{1f378}",fitzpatrick_scale:!1,category:"food_and_drink"},tropical_drink:{keywords:["beverage","cocktail","summer","beach","alcohol","booze","mojito"],char:"\u{1f379}",fitzpatrick_scale:!1,category:"food_and_drink"},champagne:{keywords:["drink","wine","bottle","celebration"],char:"\u{1f37e}",fitzpatrick_scale:!1,category:"food_and_drink"},sake:{keywords:["wine","drink","drunk","beverage","japanese","alcohol","booze"],char:"\u{1f376}",fitzpatrick_scale:!1,category:"food_and_drink"},tea:{keywords:["drink","bowl","breakfast","green","british"],char:"\u{1f375}",fitzpatrick_scale:!1,category:"food_and_drink"},cup_with_straw:{keywords:["drink","soda"],char:"\u{1f964}",fitzpatrick_scale:!1,category:"food_and_drink"},coffee:{keywords:["beverage","caffeine","latte","espresso"],char:"\u2615",fitzpatrick_scale:!1,category:"food_and_drink"},baby_bottle:{keywords:["food","container","milk"],char:"\u{1f37c}",fitzpatrick_scale:!1,category:"food_and_drink"},salt:{keywords:["condiment","shaker"],char:"\u{1f9c2}",fitzpatrick_scale:!1,category:"food_and_drink"},spoon:{keywords:["cutlery","kitchen","tableware"],char:"\u{1f944}",fitzpatrick_scale:!1,category:"food_and_drink"},fork_and_knife:{keywords:["cutlery","kitchen"],char:"\u{1f374}",fitzpatrick_scale:!1,category:"food_and_drink"},plate_with_cutlery:{keywords:["food","eat","meal","lunch","dinner","restaurant"],char:"\u{1f37d}",fitzpatrick_scale:!1,category:"food_and_drink"},bowl_with_spoon:{keywords:["food","breakfast","cereal","oatmeal","porridge"],char:"\u{1f963}",fitzpatrick_scale:!1,category:"food_and_drink"},takeout_box:{keywords:["food","leftovers"],char:"\u{1f961}",fitzpatrick_scale:!1,category:"food_and_drink"},chopsticks:{keywords:["food"],char:"\u{1f962}",fitzpatrick_scale:!1,category:"food_and_drink"},soccer:{keywords:["sports","football"],char:"\u26bd",fitzpatrick_scale:!1,category:"activity"},basketball:{keywords:["sports","balls","NBA"],char:"\u{1f3c0}",fitzpatrick_scale:!1,category:"activity"},football:{keywords:["sports","balls","NFL"],char:"\u{1f3c8}",fitzpatrick_scale:!1,category:"activity"},baseball:{keywords:["sports","balls"],char:"\u26be",fitzpatrick_scale:!1,category:"activity"},softball:{keywords:["sports","balls"],char:"\u{1f94e}",fitzpatrick_scale:!1,category:"activity"},tennis:{keywords:["sports","balls","green"],char:"\u{1f3be}",fitzpatrick_scale:!1,category:"activity"},volleyball:{keywords:["sports","balls"],char:"\u{1f3d0}",fitzpatrick_scale:!1,category:"activity"},rugby_football:{keywords:["sports","team"],char:"\u{1f3c9}",fitzpatrick_scale:!1,category:"activity"},flying_disc:{keywords:["sports","frisbee","ultimate"],char:"\u{1f94f}",fitzpatrick_scale:!1,category:"activity"},"8ball":{keywords:["pool","hobby","game","luck","magic"],char:"\u{1f3b1}",fitzpatrick_scale:!1,category:"activity"},golf:{keywords:["sports","business","flag","hole","summer"],char:"\u26f3",fitzpatrick_scale:!1,category:"activity"},golfing_woman:{keywords:["sports","business","woman","female"],char:"\u{1f3cc}\ufe0f\u200d\u2640\ufe0f",fitzpatrick_scale:!1,category:"activity"},golfing_man:{keywords:["sports","business"],char:"\u{1f3cc}",fitzpatrick_scale:!0,category:"activity"},ping_pong:{keywords:["sports","pingpong"],char:"\u{1f3d3}",fitzpatrick_scale:!1,category:"activity"},badminton:{keywords:["sports"],char:"\u{1f3f8}",fitzpatrick_scale:!1,category:"activity"},goal_net:{keywords:["sports"],char:"\u{1f945}",fitzpatrick_scale:!1,category:"activity"},ice_hockey:{keywords:["sports"],char:"\u{1f3d2}",fitzpatrick_scale:!1,category:"activity"},field_hockey:{keywords:["sports"],char:"\u{1f3d1}",fitzpatrick_scale:!1,category:"activity"},lacrosse:{keywords:["sports","ball","stick"],char:"\u{1f94d}",fitzpatrick_scale:!1,category:"activity"},cricket:{keywords:["sports"],char:"\u{1f3cf}",fitzpatrick_scale:!1,category:"activity"},ski:{keywords:["sports","winter","cold","snow"],char:"\u{1f3bf}",fitzpatrick_scale:!1,category:"activity"},skier:{keywords:["sports","winter","snow"],char:"\u26f7",fitzpatrick_scale:!1,category:"activity"},snowboarder:{keywords:["sports","winter"],char:"\u{1f3c2}",fitzpatrick_scale:!0,category:"activity"},person_fencing:{keywords:["sports","fencing","sword"],char:"\u{1f93a}",fitzpatrick_scale:!1,category:"activity"},women_wrestling:{keywords:["sports","wrestlers"],char:"\u{1f93c}\u200d\u2640\ufe0f",fitzpatrick_scale:!1,category:"activity"},men_wrestling:{keywords:["sports","wrestlers"],char:"\u{1f93c}\u200d\u2642\ufe0f",fitzpatrick_scale:!1,category:"activity"},woman_cartwheeling:{keywords:["gymnastics"],char:"\u{1f938}\u200d\u2640\ufe0f",fitzpatrick_scale:!0,category:"activity"},man_cartwheeling:{keywords:["gymnastics"],char:"\u{1f938}\u200d\u2642\ufe0f",fitzpatrick_scale:!0,category:"activity"},woman_playing_handball:{keywords:["sports"],char:"\u{1f93e}\u200d\u2640\ufe0f",fitzpatrick_scale:!0,category:"activity"},man_playing_handball:{keywords:["sports"],char:"\u{1f93e}\u200d\u2642\ufe0f",fitzpatrick_scale:!0,category:"activity"},ice_skate:{keywords:["sports"],char:"\u26f8",fitzpatrick_scale:!1,category:"activity"},curling_stone:{keywords:["sports"],char:"\u{1f94c}",fitzpatrick_scale:!1,category:"activity"},skateboard:{keywords:["board"],char:"\u{1f6f9}",fitzpatrick_scale:!1,category:"activity"},sled:{keywords:["sleigh","luge","toboggan"],char:"\u{1f6f7}",fitzpatrick_scale:!1,category:"activity"},bow_and_arrow:{keywords:["sports"],char:"\u{1f3f9}",fitzpatrick_scale:!1,category:"activity"},fishing_pole_and_fish:{keywords:["food","hobby","summer"],char:"\u{1f3a3}",fitzpatrick_scale:!1,category:"activity"},boxing_glove:{keywords:["sports","fighting"],char:"\u{1f94a}",fitzpatrick_scale:!1,category:"activity"},martial_arts_uniform:{keywords:["judo","karate","taekwondo"],char:"\u{1f94b}",fitzpatrick_scale:!1,category:"activity"},rowing_woman:{keywords:["sports","hobby","water","ship","woman","female"],char:"\u{1f6a3}\u200d\u2640\ufe0f",fitzpatrick_scale:!0,category:"activity"},rowing_man:{keywords:["sports","hobby","water","ship"],char:"\u{1f6a3}",fitzpatrick_scale:!0,category:"activity"},climbing_woman:{keywords:["sports","hobby","woman","female","rock"],char:"\u{1f9d7}\u200d\u2640\ufe0f",fitzpatrick_scale:!0,category:"activity"},climbing_man:{keywords:["sports","hobby","man","male","rock"],char:"\u{1f9d7}\u200d\u2642\ufe0f",fitzpatrick_scale:!0,category:"activity"},swimming_woman:{keywords:["sports","exercise","human","athlete","water","summer","woman","female"],char:"\u{1f3ca}\u200d\u2640\ufe0f",fitzpatrick_scale:!0,category:"activity"},swimming_man:{keywords:["sports","exercise","human","athlete","water","summer"],char:"\u{1f3ca}",fitzpatrick_scale:!0,category:"activity"},woman_playing_water_polo:{keywords:["sports","pool"],char:"\u{1f93d}\u200d\u2640\ufe0f",fitzpatrick_scale:!0,category:"activity"},man_playing_water_polo:{keywords:["sports","pool"],char:"\u{1f93d}\u200d\u2642\ufe0f",fitzpatrick_scale:!0,category:"activity"},woman_in_lotus_position:{keywords:["woman","female","meditation","yoga","serenity","zen","mindfulness"],char:"\u{1f9d8}\u200d\u2640\ufe0f",fitzpatrick_scale:!0,category:"activity"},man_in_lotus_position:{keywords:["man","male","meditation","yoga","serenity","zen","mindfulness"],char:"\u{1f9d8}\u200d\u2642\ufe0f",fitzpatrick_scale:!0,category:"activity"},surfing_woman:{keywords:["sports","ocean","sea","summer","beach","woman","female"],char:"\u{1f3c4}\u200d\u2640\ufe0f",fitzpatrick_scale:!0,category:"activity"},surfing_man:{keywords:["sports","ocean","sea","summer","beach"],char:"\u{1f3c4}",fitzpatrick_scale:!0,category:"activity"},bath:{keywords:["clean","shower","bathroom"],char:"\u{1f6c0}",fitzpatrick_scale:!0,category:"activity"},basketball_woman:{keywords:["sports","human","woman","female"],char:"\u26f9\ufe0f\u200d\u2640\ufe0f",fitzpatrick_scale:!0,category:"activity"},basketball_man:{keywords:["sports","human"],char:"\u26f9",fitzpatrick_scale:!0,category:"activity"},weight_lifting_woman:{keywords:["sports","training","exercise","woman","female"],char:"\u{1f3cb}\ufe0f\u200d\u2640\ufe0f",fitzpatrick_scale:!0,category:"activity"},weight_lifting_man:{keywords:["sports","training","exercise"],char:"\u{1f3cb}",fitzpatrick_scale:!0,category:"activity"},biking_woman:{keywords:["sports","bike","exercise","hipster","woman","female"],char:"\u{1f6b4}\u200d\u2640\ufe0f",fitzpatrick_scale:!0,category:"activity"},biking_man:{keywords:["sports","bike","exercise","hipster"],char:"\u{1f6b4}",fitzpatrick_scale:!0,category:"activity"},mountain_biking_woman:{keywords:["transportation","sports","human","race","bike","woman","female"],char:"\u{1f6b5}\u200d\u2640\ufe0f",fitzpatrick_scale:!0,category:"activity"},mountain_biking_man:{keywords:["transportation","sports","human","race","bike"],char:"\u{1f6b5}",fitzpatrick_scale:!0,category:"activity"},horse_racing:{keywords:["animal","betting","competition","gambling","luck"],char:"\u{1f3c7}",fitzpatrick_scale:!0,category:"activity"},business_suit_levitating:{keywords:["suit","business","levitate","hover","jump"],char:"\u{1f574}",fitzpatrick_scale:!0,category:"activity"},trophy:{keywords:["win","award","contest","place","ftw","ceremony"],char:"\u{1f3c6}",fitzpatrick_scale:!1,category:"activity"},running_shirt_with_sash:{keywords:["play","pageant"],char:"\u{1f3bd}",fitzpatrick_scale:!1,category:"activity"},medal_sports:{keywords:["award","winning"],char:"\u{1f3c5}",fitzpatrick_scale:!1,category:"activity"},medal_military:{keywords:["award","winning","army"],char:"\u{1f396}",fitzpatrick_scale:!1,category:"activity"},"1st_place_medal":{keywords:["award","winning","first"],char:"\u{1f947}",fitzpatrick_scale:!1,category:"activity"},"2nd_place_medal":{keywords:["award","second"],char:"\u{1f948}",fitzpatrick_scale:!1,category:"activity"},"3rd_place_medal":{keywords:["award","third"],char:"\u{1f949}",fitzpatrick_scale:!1,category:"activity"},reminder_ribbon:{keywords:["sports","cause","support","awareness"],char:"\u{1f397}",fitzpatrick_scale:!1,category:"activity"},rosette:{keywords:["flower","decoration","military"],char:"\u{1f3f5}",fitzpatrick_scale:!1,category:"activity"},ticket:{keywords:["event","concert","pass"],char:"\u{1f3ab}",fitzpatrick_scale:!1,category:"activity"},tickets:{keywords:["sports","concert","entrance"],char:"\u{1f39f}",fitzpatrick_scale:!1,category:"activity"},performing_arts:{keywords:["acting","theater","drama"],char:"\u{1f3ad}",fitzpatrick_scale:!1,category:"activity"},art:{keywords:["design","paint","draw","colors"],char:"\u{1f3a8}",fitzpatrick_scale:!1,category:"activity"},circus_tent:{keywords:["festival","carnival","party"],char:"\u{1f3aa}",fitzpatrick_scale:!1,category:"activity"},woman_juggling:{keywords:["juggle","balance","skill","multitask"],char:"\u{1f939}\u200d\u2640\ufe0f",fitzpatrick_scale:!0,category:"activity"},man_juggling:{keywords:["juggle","balance","skill","multitask"],char:"\u{1f939}\u200d\u2642\ufe0f",fitzpatrick_scale:!0,category:"activity"},microphone:{keywords:["sound","music","PA","sing","talkshow"],char:"\u{1f3a4}",fitzpatrick_scale:!1,category:"activity"},headphones:{keywords:["music","score","gadgets"],char:"\u{1f3a7}",fitzpatrick_scale:!1,category:"activity"},musical_score:{keywords:["treble","clef","compose"],char:"\u{1f3bc}",fitzpatrick_scale:!1,category:"activity"},musical_keyboard:{keywords:["piano","instrument","compose"],char:"\u{1f3b9}",fitzpatrick_scale:!1,category:"activity"},drum:{keywords:["music","instrument","drumsticks","snare"],char:"\u{1f941}",fitzpatrick_scale:!1,category:"activity"},saxophone:{keywords:["music","instrument","jazz","blues"],char:"\u{1f3b7}",fitzpatrick_scale:!1,category:"activity"},trumpet:{keywords:["music","brass"],char:"\u{1f3ba}",fitzpatrick_scale:!1,category:"activity"},guitar:{keywords:["music","instrument"],char:"\u{1f3b8}",fitzpatrick_scale:!1,category:"activity"},violin:{keywords:["music","instrument","orchestra","symphony"],char:"\u{1f3bb}",fitzpatrick_scale:!1,category:"activity"},clapper:{keywords:["movie","film","record"],char:"\u{1f3ac}",fitzpatrick_scale:!1,category:"activity"},video_game:{keywords:["play","console","PS4","controller"],char:"\u{1f3ae}",fitzpatrick_scale:!1,category:"activity"},space_invader:{keywords:["game","arcade","play"],char:"\u{1f47e}",fitzpatrick_scale:!1,category:"activity"},dart:{keywords:["game","play","bar","target","bullseye"],char:"\u{1f3af}",fitzpatrick_scale:!1,category:"activity"},game_die:{keywords:["dice","random","tabletop","play","luck"],char:"\u{1f3b2}",fitzpatrick_scale:!1,category:"activity"},chess_pawn:{keywords:["expendable"],char:"\u265f",fitzpatrick_scale:!1,category:"activity"},slot_machine:{keywords:["bet","gamble","vegas","fruit machine","luck","casino"],char:"\u{1f3b0}",fitzpatrick_scale:!1,category:"activity"},jigsaw:{keywords:["interlocking","puzzle","piece"],char:"\u{1f9e9}",fitzpatrick_scale:!1,category:"activity"},bowling:{keywords:["sports","fun","play"],char:"\u{1f3b3}",fitzpatrick_scale:!1,category:"activity"},red_car:{keywords:["red","transportation","vehicle"],char:"\u{1f697}",fitzpatrick_scale:!1,category:"travel_and_places"},taxi:{keywords:["uber","vehicle","cars","transportation"],char:"\u{1f695}",fitzpatrick_scale:!1,category:"travel_and_places"},blue_car:{keywords:["transportation","vehicle"],char:"\u{1f699}",fitzpatrick_scale:!1,category:"travel_and_places"},bus:{keywords:["car","vehicle","transportation"],char:"\u{1f68c}",fitzpatrick_scale:!1,category:"travel_and_places"},trolleybus:{keywords:["bart","transportation","vehicle"],char:"\u{1f68e}",fitzpatrick_scale:!1,category:"travel_and_places"},racing_car:{keywords:["sports","race","fast","formula","f1"],char:"\u{1f3ce}",fitzpatrick_scale:!1,category:"travel_and_places"},police_car:{keywords:["vehicle","cars","transportation","law","legal","enforcement"],char:"\u{1f693}",fitzpatrick_scale:!1,category:"travel_and_places"},ambulance:{keywords:["health","911","hospital"],char:"\u{1f691}",fitzpatrick_scale:!1,category:"travel_and_places"},fire_engine:{keywords:["transportation","cars","vehicle"],char:"\u{1f692}",fitzpatrick_scale:!1,category:"travel_and_places"},minibus:{keywords:["vehicle","car","transportation"],char:"\u{1f690}",fitzpatrick_scale:!1,category:"travel_and_places"},truck:{keywords:["cars","transportation"],char:"\u{1f69a}",fitzpatrick_scale:!1,category:"travel_and_places"},articulated_lorry:{keywords:["vehicle","cars","transportation","express"],char:"\u{1f69b}",fitzpatrick_scale:!1,category:"travel_and_places"},tractor:{keywords:["vehicle","car","farming","agriculture"],char:"\u{1f69c}",fitzpatrick_scale:!1,category:"travel_and_places"},kick_scooter:{keywords:["vehicle","kick","razor"],char:"\u{1f6f4}",fitzpatrick_scale:!1,category:"travel_and_places"},motorcycle:{keywords:["race","sports","fast"],char:"\u{1f3cd}",fitzpatrick_scale:!1,category:"travel_and_places"},bike:{keywords:["sports","bicycle","exercise","hipster"],char:"\u{1f6b2}",fitzpatrick_scale:!1,category:"travel_and_places"},motor_scooter:{keywords:["vehicle","vespa","sasha"],char:"\u{1f6f5}",fitzpatrick_scale:!1,category:"travel_and_places"},rotating_light:{keywords:["police","ambulance","911","emergency","alert","error","pinged","law","legal"],char:"\u{1f6a8}",fitzpatrick_scale:!1,category:"travel_and_places"},oncoming_police_car:{keywords:["vehicle","law","legal","enforcement","911"],char:"\u{1f694}",fitzpatrick_scale:!1,category:"travel_and_places"},oncoming_bus:{keywords:["vehicle","transportation"],char:"\u{1f68d}",fitzpatrick_scale:!1,category:"travel_and_places"},oncoming_automobile:{keywords:["car","vehicle","transportation"],char:"\u{1f698}",fitzpatrick_scale:!1,category:"travel_and_places"},oncoming_taxi:{keywords:["vehicle","cars","uber"],char:"\u{1f696}",fitzpatrick_scale:!1,category:"travel_and_places"},aerial_tramway:{keywords:["transportation","vehicle","ski"],char:"\u{1f6a1}",fitzpatrick_scale:!1,category:"travel_and_places"},mountain_cableway:{keywords:["transportation","vehicle","ski"],char:"\u{1f6a0}",fitzpatrick_scale:!1,category:"travel_and_places"},suspension_railway:{keywords:["vehicle","transportation"],char:"\u{1f69f}",fitzpatrick_scale:!1,category:"travel_and_places"},railway_car:{keywords:["transportation","vehicle"],char:"\u{1f683}",fitzpatrick_scale:!1,category:"travel_and_places"},train:{keywords:["transportation","vehicle","carriage","public","travel"],char:"\u{1f68b}",fitzpatrick_scale:!1,category:"travel_and_places"},monorail:{keywords:["transportation","vehicle"],char:"\u{1f69d}",fitzpatrick_scale:!1,category:"travel_and_places"},bullettrain_side:{keywords:["transportation","vehicle"],char:"\u{1f684}",fitzpatrick_scale:!1,category:"travel_and_places"},bullettrain_front:{keywords:["transportation","vehicle","speed","fast","public","travel"],char:"\u{1f685}",fitzpatrick_scale:!1,category:"travel_and_places"},light_rail:{keywords:["transportation","vehicle"],char:"\u{1f688}",fitzpatrick_scale:!1,category:"travel_and_places"},mountain_railway:{keywords:["transportation","vehicle"],char:"\u{1f69e}",fitzpatrick_scale:!1,category:"travel_and_places"},steam_locomotive:{keywords:["transportation","vehicle","train"],char:"\u{1f682}",fitzpatrick_scale:!1,category:"travel_and_places"},train2:{keywords:["transportation","vehicle"],char:"\u{1f686}",fitzpatrick_scale:!1,category:"travel_and_places"},metro:{keywords:["transportation","blue-square","mrt","underground","tube"],char:"\u{1f687}",fitzpatrick_scale:!1,category:"travel_and_places"},tram:{keywords:["transportation","vehicle"],char:"\u{1f68a}",fitzpatrick_scale:!1,category:"travel_and_places"},station:{keywords:["transportation","vehicle","public"],char:"\u{1f689}",fitzpatrick_scale:!1,category:"travel_and_places"},flying_saucer:{keywords:["transportation","vehicle","ufo"],char:"\u{1f6f8}",fitzpatrick_scale:!1,category:"travel_and_places"},helicopter:{keywords:["transportation","vehicle","fly"],char:"\u{1f681}",fitzpatrick_scale:!1,category:"travel_and_places"},small_airplane:{keywords:["flight","transportation","fly","vehicle"],char:"\u{1f6e9}",fitzpatrick_scale:!1,category:"travel_and_places"},airplane:{keywords:["vehicle","transportation","flight","fly"],char:"\u2708\ufe0f",fitzpatrick_scale:!1,category:"travel_and_places"},flight_departure:{keywords:["airport","flight","landing"],char:"\u{1f6eb}",fitzpatrick_scale:!1,category:"travel_and_places"},flight_arrival:{keywords:["airport","flight","boarding"],char:"\u{1f6ec}",fitzpatrick_scale:!1,category:"travel_and_places"},sailboat:{keywords:["ship","summer","transportation","water","sailing"],char:"\u26f5",fitzpatrick_scale:!1,category:"travel_and_places"},motor_boat:{keywords:["ship"],char:"\u{1f6e5}",fitzpatrick_scale:!1,category:"travel_and_places"},speedboat:{keywords:["ship","transportation","vehicle","summer"],char:"\u{1f6a4}",fitzpatrick_scale:!1,category:"travel_and_places"},ferry:{keywords:["boat","ship","yacht"],char:"\u26f4",fitzpatrick_scale:!1,category:"travel_and_places"},passenger_ship:{keywords:["yacht","cruise","ferry"],char:"\u{1f6f3}",fitzpatrick_scale:!1,category:"travel_and_places"},rocket:{keywords:["launch","ship","staffmode","NASA","outer space","outer_space","fly"],char:"\u{1f680}",fitzpatrick_scale:!1,category:"travel_and_places"},artificial_satellite:{keywords:["communication","gps","orbit","spaceflight","NASA","ISS"],char:"\u{1f6f0}",fitzpatrick_scale:!1,category:"travel_and_places"},seat:{keywords:["sit","airplane","transport","bus","flight","fly"],char:"\u{1f4ba}",fitzpatrick_scale:!1,category:"travel_and_places"},canoe:{keywords:["boat","paddle","water","ship"],char:"\u{1f6f6}",fitzpatrick_scale:!1,category:"travel_and_places"},anchor:{keywords:["ship","ferry","sea","boat"],char:"\u2693",fitzpatrick_scale:!1,category:"travel_and_places"},construction:{keywords:["wip","progress","caution","warning"],char:"\u{1f6a7}",fitzpatrick_scale:!1,category:"travel_and_places"},fuelpump:{keywords:["gas station","petroleum"],char:"\u26fd",fitzpatrick_scale:!1,category:"travel_and_places"},busstop:{keywords:["transportation","wait"],char:"\u{1f68f}",fitzpatrick_scale:!1,category:"travel_and_places"},vertical_traffic_light:{keywords:["transportation","driving"],char:"\u{1f6a6}",fitzpatrick_scale:!1,category:"travel_and_places"},traffic_light:{keywords:["transportation","signal"],char:"\u{1f6a5}",fitzpatrick_scale:!1,category:"travel_and_places"},checkered_flag:{keywords:["contest","finishline","race","gokart"],char:"\u{1f3c1}",fitzpatrick_scale:!1,category:"travel_and_places"},ship:{keywords:["transportation","titanic","deploy"],char:"\u{1f6a2}",fitzpatrick_scale:!1,category:"travel_and_places"},ferris_wheel:{keywords:["photo","carnival","londoneye"],char:"\u{1f3a1}",fitzpatrick_scale:!1,category:"travel_and_places"},roller_coaster:{keywords:["carnival","playground","photo","fun"],char:"\u{1f3a2}",fitzpatrick_scale:!1,category:"travel_and_places"},carousel_horse:{keywords:["photo","carnival"],char:"\u{1f3a0}",fitzpatrick_scale:!1,category:"travel_and_places"},building_construction:{keywords:["wip","working","progress"],char:"\u{1f3d7}",fitzpatrick_scale:!1,category:"travel_and_places"},foggy:{keywords:["photo","mountain"],char:"\u{1f301}",fitzpatrick_scale:!1,category:"travel_and_places"},tokyo_tower:{keywords:["photo","japanese"],char:"\u{1f5fc}",fitzpatrick_scale:!1,category:"travel_and_places"},factory:{keywords:["building","industry","pollution","smoke"],char:"\u{1f3ed}",fitzpatrick_scale:!1,category:"travel_and_places"},fountain:{keywords:["photo","summer","water","fresh"],char:"\u26f2",fitzpatrick_scale:!1,category:"travel_and_places"},rice_scene:{keywords:["photo","japan","asia","tsukimi"],char:"\u{1f391}",fitzpatrick_scale:!1,category:"travel_and_places"},mountain:{keywords:["photo","nature","environment"],char:"\u26f0",fitzpatrick_scale:!1,category:"travel_and_places"},mountain_snow:{keywords:["photo","nature","environment","winter","cold"],char:"\u{1f3d4}",fitzpatrick_scale:!1,category:"travel_and_places"},mount_fuji:{keywords:["photo","mountain","nature","japanese"],char:"\u{1f5fb}",fitzpatrick_scale:!1,category:"travel_and_places"},volcano:{keywords:["photo","nature","disaster"],char:"\u{1f30b}",fitzpatrick_scale:!1,category:"travel_and_places"},japan:{keywords:["nation","country","japanese","asia"],char:"\u{1f5fe}",fitzpatrick_scale:!1,category:"travel_and_places"},camping:{keywords:["photo","outdoors","tent"],char:"\u{1f3d5}",fitzpatrick_scale:!1,category:"travel_and_places"},tent:{keywords:["photo","camping","outdoors"],char:"\u26fa",fitzpatrick_scale:!1,category:"travel_and_places"},national_park:{keywords:["photo","environment","nature"],char:"\u{1f3de}",fitzpatrick_scale:!1,category:"travel_and_places"},motorway:{keywords:["road","cupertino","interstate","highway"],char:"\u{1f6e3}",fitzpatrick_scale:!1,category:"travel_and_places"},railway_track:{keywords:["train","transportation"],char:"\u{1f6e4}",fitzpatrick_scale:!1,category:"travel_and_places"},sunrise:{keywords:["morning","view","vacation","photo"],char:"\u{1f305}",fitzpatrick_scale:!1,category:"travel_and_places"},sunrise_over_mountains:{keywords:["view","vacation","photo"],char:"\u{1f304}",fitzpatrick_scale:!1,category:"travel_and_places"},desert:{keywords:["photo","warm","saharah"],char:"\u{1f3dc}",fitzpatrick_scale:!1,category:"travel_and_places"},beach_umbrella:{keywords:["weather","summer","sunny","sand","mojito"],char:"\u{1f3d6}",fitzpatrick_scale:!1,category:"travel_and_places"},desert_island:{keywords:["photo","tropical","mojito"],char:"\u{1f3dd}",fitzpatrick_scale:!1,category:"travel_and_places"},city_sunrise:{keywords:["photo","good morning","dawn"],char:"\u{1f307}",fitzpatrick_scale:!1,category:"travel_and_places"},city_sunset:{keywords:["photo","evening","sky","buildings"],char:"\u{1f306}",fitzpatrick_scale:!1,category:"travel_and_places"},cityscape:{keywords:["photo","night life","urban"],char:"\u{1f3d9}",fitzpatrick_scale:!1,category:"travel_and_places"},night_with_stars:{keywords:["evening","city","downtown"],char:"\u{1f303}",fitzpatrick_scale:!1,category:"travel_and_places"},bridge_at_night:{keywords:["photo","sanfrancisco"],char:"\u{1f309}",fitzpatrick_scale:!1,category:"travel_and_places"},milky_way:{keywords:["photo","space","stars"],char:"\u{1f30c}",fitzpatrick_scale:!1,category:"travel_and_places"},stars:{keywords:["night","photo"],char:"\u{1f320}",fitzpatrick_scale:!1,category:"travel_and_places"},sparkler:{keywords:["stars","night","shine"],char:"\u{1f387}",fitzpatrick_scale:!1,category:"travel_and_places"},fireworks:{keywords:["photo","festival","carnival","congratulations"],char:"\u{1f386}",fitzpatrick_scale:!1,category:"travel_and_places"},rainbow:{keywords:["nature","happy","unicorn_face","photo","sky","spring"],char:"\u{1f308}",fitzpatrick_scale:!1,category:"travel_and_places"},houses:{keywords:["buildings","photo"],char:"\u{1f3d8}",fitzpatrick_scale:!1,category:"travel_and_places"},european_castle:{keywords:["building","royalty","history"],char:"\u{1f3f0}",fitzpatrick_scale:!1,category:"travel_and_places"},japanese_castle:{keywords:["photo","building"],char:"\u{1f3ef}",fitzpatrick_scale:!1,category:"travel_and_places"},stadium:{keywords:["photo","place","sports","concert","venue"],char:"\u{1f3df}",fitzpatrick_scale:!1,category:"travel_and_places"},statue_of_liberty:{keywords:["american","newyork"],char:"\u{1f5fd}",fitzpatrick_scale:!1,category:"travel_and_places"},house:{keywords:["building","home"],char:"\u{1f3e0}",fitzpatrick_scale:!1,category:"travel_and_places"},house_with_garden:{keywords:["home","plant","nature"],char:"\u{1f3e1}",fitzpatrick_scale:!1,category:"travel_and_places"},derelict_house:{keywords:["abandon","evict","broken","building"],char:"\u{1f3da}",fitzpatrick_scale:!1,category:"travel_and_places"},office:{keywords:["building","bureau","work"],char:"\u{1f3e2}",fitzpatrick_scale:!1,category:"travel_and_places"},department_store:{keywords:["building","shopping","mall"],char:"\u{1f3ec}",fitzpatrick_scale:!1,category:"travel_and_places"},post_office:{keywords:["building","envelope","communication"],char:"\u{1f3e3}",fitzpatrick_scale:!1,category:"travel_and_places"},european_post_office:{keywords:["building","email"],char:"\u{1f3e4}",fitzpatrick_scale:!1,category:"travel_and_places"},hospital:{keywords:["building","health","surgery","doctor"],char:"\u{1f3e5}",fitzpatrick_scale:!1,category:"travel_and_places"},bank:{keywords:["building","money","sales","cash","business","enterprise"],char:"\u{1f3e6}",fitzpatrick_scale:!1,category:"travel_and_places"},hotel:{keywords:["building","accomodation","checkin"],char:"\u{1f3e8}",fitzpatrick_scale:!1,category:"travel_and_places"},convenience_store:{keywords:["building","shopping","groceries"],char:"\u{1f3ea}",fitzpatrick_scale:!1,category:"travel_and_places"},school:{keywords:["building","student","education","learn","teach"],char:"\u{1f3eb}",fitzpatrick_scale:!1,category:"travel_and_places"},love_hotel:{keywords:["like","affection","dating"],char:"\u{1f3e9}",fitzpatrick_scale:!1,category:"travel_and_places"},wedding:{keywords:["love","like","affection","couple","marriage","bride","groom"],char:"\u{1f492}",fitzpatrick_scale:!1,category:"travel_and_places"},classical_building:{keywords:["art","culture","history"],char:"\u{1f3db}",fitzpatrick_scale:!1,category:"travel_and_places"},church:{keywords:["building","religion","christ"],char:"\u26ea",fitzpatrick_scale:!1,category:"travel_and_places"},mosque:{keywords:["islam","worship","minaret"],char:"\u{1f54c}",fitzpatrick_scale:!1,category:"travel_and_places"},synagogue:{keywords:["judaism","worship","temple","jewish"],char:"\u{1f54d}",fitzpatrick_scale:!1,category:"travel_and_places"},kaaba:{keywords:["mecca","mosque","islam"],char:"\u{1f54b}",fitzpatrick_scale:!1,category:"travel_and_places"},shinto_shrine:{keywords:["temple","japan","kyoto"],char:"\u26e9",fitzpatrick_scale:!1,category:"travel_and_places"},watch:{keywords:["time","accessories"],char:"\u231a",fitzpatrick_scale:!1,category:"objects"},iphone:{keywords:["technology","apple","gadgets","dial"],char:"\u{1f4f1}",fitzpatrick_scale:!1,category:"objects"},calling:{keywords:["iphone","incoming"],char:"\u{1f4f2}",fitzpatrick_scale:!1,category:"objects"},computer:{keywords:["technology","laptop","screen","display","monitor"],char:"\u{1f4bb}",fitzpatrick_scale:!1,category:"objects"},keyboard:{keywords:["technology","computer","type","input","text"],char:"\u2328",fitzpatrick_scale:!1,category:"objects"},desktop_computer:{keywords:["technology","computing","screen"],char:"\u{1f5a5}",fitzpatrick_scale:!1,category:"objects"},printer:{keywords:["paper","ink"],char:"\u{1f5a8}",fitzpatrick_scale:!1,category:"objects"},computer_mouse:{keywords:["click"],char:"\u{1f5b1}",fitzpatrick_scale:!1,category:"objects"},trackball:{keywords:["technology","trackpad"],char:"\u{1f5b2}",fitzpatrick_scale:!1,category:"objects"},joystick:{keywords:["game","play"],char:"\u{1f579}",fitzpatrick_scale:!1,category:"objects"},clamp:{keywords:["tool"],char:"\u{1f5dc}",fitzpatrick_scale:!1,category:"objects"},minidisc:{keywords:["technology","record","data","disk","90s"],char:"\u{1f4bd}",fitzpatrick_scale:!1,category:"objects"},floppy_disk:{keywords:["oldschool","technology","save","90s","80s"],char:"\u{1f4be}",fitzpatrick_scale:!1,category:"objects"},cd:{keywords:["technology","dvd","disk","disc","90s"],char:"\u{1f4bf}",fitzpatrick_scale:!1,category:"objects"},dvd:{keywords:["cd","disk","disc"],char:"\u{1f4c0}",fitzpatrick_scale:!1,category:"objects"},vhs:{keywords:["record","video","oldschool","90s","80s"],char:"\u{1f4fc}",fitzpatrick_scale:!1,category:"objects"},camera:{keywords:["gadgets","photography"],char:"\u{1f4f7}",fitzpatrick_scale:!1,category:"objects"},camera_flash:{keywords:["photography","gadgets"],char:"\u{1f4f8}",fitzpatrick_scale:!1,category:"objects"},video_camera:{keywords:["film","record"],char:"\u{1f4f9}",fitzpatrick_scale:!1,category:"objects"},movie_camera:{keywords:["film","record"],char:"\u{1f3a5}",fitzpatrick_scale:!1,category:"objects"},film_projector:{keywords:["video","tape","record","movie"],char:"\u{1f4fd}",fitzpatrick_scale:!1,category:"objects"},film_strip:{keywords:["movie"],char:"\u{1f39e}",fitzpatrick_scale:!1,category:"objects"},telephone_receiver:{keywords:["technology","communication","dial"],char:"\u{1f4de}",fitzpatrick_scale:!1,category:"objects"},phone:{keywords:["technology","communication","dial","telephone"],char:"\u260e\ufe0f",fitzpatrick_scale:!1,category:"objects"},pager:{keywords:["bbcall","oldschool","90s"],char:"\u{1f4df}",fitzpatrick_scale:!1,category:"objects"},fax:{keywords:["communication","technology"],char:"\u{1f4e0}",fitzpatrick_scale:!1,category:"objects"},tv:{keywords:["technology","program","oldschool","show","television"],char:"\u{1f4fa}",fitzpatrick_scale:!1,category:"objects"},radio:{keywords:["communication","music","podcast","program"],char:"\u{1f4fb}",fitzpatrick_scale:!1,category:"objects"},studio_microphone:{keywords:["sing","recording","artist","talkshow"],char:"\u{1f399}",fitzpatrick_scale:!1,category:"objects"},level_slider:{keywords:["scale"],char:"\u{1f39a}",fitzpatrick_scale:!1,category:"objects"},control_knobs:{keywords:["dial"],char:"\u{1f39b}",fitzpatrick_scale:!1,category:"objects"},compass:{keywords:["magnetic","navigation","orienteering"],char:"\u{1f9ed}",fitzpatrick_scale:!1,category:"objects"},stopwatch:{keywords:["time","deadline"],char:"\u23f1",fitzpatrick_scale:!1,category:"objects"},timer_clock:{keywords:["alarm"],char:"\u23f2",fitzpatrick_scale:!1,category:"objects"},alarm_clock:{keywords:["time","wake"],char:"\u23f0",fitzpatrick_scale:!1,category:"objects"},mantelpiece_clock:{keywords:["time"],char:"\u{1f570}",fitzpatrick_scale:!1,category:"objects"},hourglass_flowing_sand:{keywords:["oldschool","time","countdown"],char:"\u23f3",fitzpatrick_scale:!1,category:"objects"},hourglass:{keywords:["time","clock","oldschool","limit","exam","quiz","test"],char:"\u231b",fitzpatrick_scale:!1,category:"objects"},satellite:{keywords:["communication","future","radio","space"],char:"\u{1f4e1}",fitzpatrick_scale:!1,category:"objects"},battery:{keywords:["power","energy","sustain"],char:"\u{1f50b}",fitzpatrick_scale:!1,category:"objects"},electric_plug:{keywords:["charger","power"],char:"\u{1f50c}",fitzpatrick_scale:!1,category:"objects"},bulb:{keywords:["light","electricity","idea"],char:"\u{1f4a1}",fitzpatrick_scale:!1,category:"objects"},flashlight:{keywords:["dark","camping","sight","night"],char:"\u{1f526}",fitzpatrick_scale:!1,category:"objects"},candle:{keywords:["fire","wax"],char:"\u{1f56f}",fitzpatrick_scale:!1,category:"objects"},fire_extinguisher:{keywords:["quench"],char:"\u{1f9ef}",fitzpatrick_scale:!1,category:"objects"},wastebasket:{keywords:["bin","trash","rubbish","garbage","toss"],char:"\u{1f5d1}",fitzpatrick_scale:!1,category:"objects"},oil_drum:{keywords:["barrell"],char:"\u{1f6e2}",fitzpatrick_scale:!1,category:"objects"},money_with_wings:{keywords:["dollar","bills","payment","sale"],char:"\u{1f4b8}",fitzpatrick_scale:!1,category:"objects"},dollar:{keywords:["money","sales","bill","currency"],char:"\u{1f4b5}",fitzpatrick_scale:!1,category:"objects"},yen:{keywords:["money","sales","japanese","dollar","currency"],char:"\u{1f4b4}",fitzpatrick_scale:!1,category:"objects"},euro:{keywords:["money","sales","dollar","currency"],char:"\u{1f4b6}",fitzpatrick_scale:!1,category:"objects"},pound:{keywords:["british","sterling","money","sales","bills","uk","england","currency"],char:"\u{1f4b7}",fitzpatrick_scale:!1,category:"objects"},moneybag:{keywords:["dollar","payment","coins","sale"],char:"\u{1f4b0}",fitzpatrick_scale:!1,category:"objects"},credit_card:{keywords:["money","sales","dollar","bill","payment","shopping"],char:"\u{1f4b3}",fitzpatrick_scale:!1,category:"objects"},gem:{keywords:["blue","ruby","diamond","jewelry"],char:"\u{1f48e}",fitzpatrick_scale:!1,category:"objects"},balance_scale:{keywords:["law","fairness","weight"],char:"\u2696",fitzpatrick_scale:!1,category:"objects"},toolbox:{keywords:["tools","diy","fix","maintainer","mechanic"],char:"\u{1f9f0}",fitzpatrick_scale:!1,category:"objects"},wrench:{keywords:["tools","diy","ikea","fix","maintainer"],char:"\u{1f527}",fitzpatrick_scale:!1,category:"objects"},hammer:{keywords:["tools","build","create"],char:"\u{1f528}",fitzpatrick_scale:!1,category:"objects"},hammer_and_pick:{keywords:["tools","build","create"],char:"\u2692",fitzpatrick_scale:!1,category:"objects"},hammer_and_wrench:{keywords:["tools","build","create"],char:"\u{1f6e0}",fitzpatrick_scale:!1,category:"objects"},pick:{keywords:["tools","dig"],char:"\u26cf",fitzpatrick_scale:!1,category:"objects"},nut_and_bolt:{keywords:["handy","tools","fix"],char:"\u{1f529}",fitzpatrick_scale:!1,category:"objects"},gear:{keywords:["cog"],char:"\u2699",fitzpatrick_scale:!1,category:"objects"},brick:{keywords:["bricks"],char:"\u{1f9f1}",fitzpatrick_scale:!1,category:"objects"},chains:{keywords:["lock","arrest"],char:"\u26d3",fitzpatrick_scale:!1,category:"objects"},magnet:{keywords:["attraction","magnetic"],char:"\u{1f9f2}",fitzpatrick_scale:!1,category:"objects"},gun:{keywords:["violence","weapon","pistol","revolver"],char:"\u{1f52b}",fitzpatrick_scale:!1,category:"objects"},bomb:{keywords:["boom","explode","explosion","terrorism"],char:"\u{1f4a3}",fitzpatrick_scale:!1,category:"objects"},firecracker:{keywords:["dynamite","boom","explode","explosion","explosive"],char:"\u{1f9e8}",fitzpatrick_scale:!1,category:"objects"},hocho:{keywords:["knife","blade","cutlery","kitchen","weapon"],char:"\u{1f52a}",fitzpatrick_scale:!1,category:"objects"},dagger:{keywords:["weapon"],char:"\u{1f5e1}",fitzpatrick_scale:!1,category:"objects"},crossed_swords:{keywords:["weapon"],char:"\u2694",fitzpatrick_scale:!1,category:"objects"},shield:{keywords:["protection","security"],char:"\u{1f6e1}",fitzpatrick_scale:!1,category:"objects"},smoking:{keywords:["kills","tobacco","cigarette","joint","smoke"],char:"\u{1f6ac}",fitzpatrick_scale:!1,category:"objects"},skull_and_crossbones:{keywords:["poison","danger","deadly","scary","death","pirate","evil"],char:"\u2620",fitzpatrick_scale:!1,category:"objects"},coffin:{keywords:["vampire","dead","die","death","rip","graveyard","cemetery","casket","funeral","box"],char:"\u26b0",fitzpatrick_scale:!1,category:"objects"},funeral_urn:{keywords:["dead","die","death","rip","ashes"],char:"\u26b1",fitzpatrick_scale:!1,category:"objects"},amphora:{keywords:["vase","jar"],char:"\u{1f3fa}",fitzpatrick_scale:!1,category:"objects"},crystal_ball:{keywords:["disco","party","magic","circus","fortune_teller"],char:"\u{1f52e}",fitzpatrick_scale:!1,category:"objects"},prayer_beads:{keywords:["dhikr","religious"],char:"\u{1f4ff}",fitzpatrick_scale:!1,category:"objects"},nazar_amulet:{keywords:["bead","charm"],char:"\u{1f9ff}",fitzpatrick_scale:!1,category:"objects"},barber:{keywords:["hair","salon","style"],char:"\u{1f488}",fitzpatrick_scale:!1,category:"objects"},alembic:{keywords:["distilling","science","experiment","chemistry"],char:"\u2697",fitzpatrick_scale:!1,category:"objects"},telescope:{keywords:["stars","space","zoom","science","astronomy"],char:"\u{1f52d}",fitzpatrick_scale:!1,category:"objects"},microscope:{keywords:["laboratory","experiment","zoomin","science","study"],char:"\u{1f52c}",fitzpatrick_scale:!1,category:"objects"},hole:{keywords:["embarrassing"],char:"\u{1f573}",fitzpatrick_scale:!1,category:"objects"},pill:{keywords:["health","medicine","doctor","pharmacy","drug"],char:"\u{1f48a}",fitzpatrick_scale:!1,category:"objects"},syringe:{keywords:["health","hospital","drugs","blood","medicine","needle","doctor","nurse"],char:"\u{1f489}",fitzpatrick_scale:!1,category:"objects"},dna:{keywords:["biologist","genetics","life"],char:"\u{1f9ec}",fitzpatrick_scale:!1,category:"objects"},microbe:{keywords:["amoeba","bacteria","germs"],char:"\u{1f9a0}",fitzpatrick_scale:!1,category:"objects"},petri_dish:{keywords:["bacteria","biology","culture","lab"],char:"\u{1f9eb}",fitzpatrick_scale:!1,category:"objects"},test_tube:{keywords:["chemistry","experiment","lab","science"],char:"\u{1f9ea}",fitzpatrick_scale:!1,category:"objects"},thermometer:{keywords:["weather","temperature","hot","cold"],char:"\u{1f321}",fitzpatrick_scale:!1,category:"objects"},broom:{keywords:["cleaning","sweeping","witch"],char:"\u{1f9f9}",fitzpatrick_scale:!1,category:"objects"},basket:{keywords:["laundry"],char:"\u{1f9fa}",fitzpatrick_scale:!1,category:"objects"},toilet_paper:{keywords:["roll"],char:"\u{1f9fb}",fitzpatrick_scale:!1,category:"objects"},label:{keywords:["sale","tag"],char:"\u{1f3f7}",fitzpatrick_scale:!1,category:"objects"},bookmark:{keywords:["favorite","label","save"],char:"\u{1f516}",fitzpatrick_scale:!1,category:"objects"},toilet:{keywords:["restroom","wc","washroom","bathroom","potty"],char:"\u{1f6bd}",fitzpatrick_scale:!1,category:"objects"},shower:{keywords:["clean","water","bathroom"],char:"\u{1f6bf}",fitzpatrick_scale:!1,category:"objects"},bathtub:{keywords:["clean","shower","bathroom"],char:"\u{1f6c1}",fitzpatrick_scale:!1,category:"objects"},soap:{keywords:["bar","bathing","cleaning","lather"],char:"\u{1f9fc}",fitzpatrick_scale:!1,category:"objects"},sponge:{keywords:["absorbing","cleaning","porous"],char:"\u{1f9fd}",fitzpatrick_scale:!1,category:"objects"},lotion_bottle:{keywords:["moisturizer","sunscreen"],char:"\u{1f9f4}",fitzpatrick_scale:!1,category:"objects"},key:{keywords:["lock","door","password"],char:"\u{1f511}",fitzpatrick_scale:!1,category:"objects"},old_key:{keywords:["lock","door","password"],char:"\u{1f5dd}",fitzpatrick_scale:!1,category:"objects"},couch_and_lamp:{keywords:["read","chill"],char:"\u{1f6cb}",fitzpatrick_scale:!1,category:"objects"},sleeping_bed:{keywords:["bed","rest"],char:"\u{1f6cc}",fitzpatrick_scale:!0,category:"objects"},bed:{keywords:["sleep","rest"],char:"\u{1f6cf}",fitzpatrick_scale:!1,category:"objects"},door:{keywords:["house","entry","exit"],char:"\u{1f6aa}",fitzpatrick_scale:!1,category:"objects"},bellhop_bell:{keywords:["service"],char:"\u{1f6ce}",fitzpatrick_scale:!1,category:"objects"},teddy_bear:{keywords:["plush","stuffed"],char:"\u{1f9f8}",fitzpatrick_scale:!1,category:"objects"},framed_picture:{keywords:["photography"],char:"\u{1f5bc}",fitzpatrick_scale:!1,category:"objects"},world_map:{keywords:["location","direction"],char:"\u{1f5fa}",fitzpatrick_scale:!1,category:"objects"},parasol_on_ground:{keywords:["weather","summer"],char:"\u26f1",fitzpatrick_scale:!1,category:"objects"},moyai:{keywords:["rock","easter island","moai"],char:"\u{1f5ff}",fitzpatrick_scale:!1,category:"objects"},shopping:{keywords:["mall","buy","purchase"],char:"\u{1f6cd}",fitzpatrick_scale:!1,category:"objects"},shopping_cart:{keywords:["trolley"],char:"\u{1f6d2}",fitzpatrick_scale:!1,category:"objects"},balloon:{keywords:["party","celebration","birthday","circus"],char:"\u{1f388}",fitzpatrick_scale:!1,category:"objects"},flags:{keywords:["fish","japanese","koinobori","carp","banner"],char:"\u{1f38f}",fitzpatrick_scale:!1,category:"objects"},ribbon:{keywords:["decoration","pink","girl","bowtie"],char:"\u{1f380}",fitzpatrick_scale:!1,category:"objects"},gift:{keywords:["present","birthday","christmas","xmas"],char:"\u{1f381}",fitzpatrick_scale:!1,category:"objects"},confetti_ball:{keywords:["festival","party","birthday","circus"],char:"\u{1f38a}",fitzpatrick_scale:!1,category:"objects"},tada:{keywords:["party","congratulations","birthday","magic","circus","celebration"],char:"\u{1f389}",fitzpatrick_scale:!1,category:"objects"},dolls:{keywords:["japanese","toy","kimono"],char:"\u{1f38e}",fitzpatrick_scale:!1,category:"objects"},wind_chime:{keywords:["nature","ding","spring","bell"],char:"\u{1f390}",fitzpatrick_scale:!1,category:"objects"},crossed_flags:{keywords:["japanese","nation","country","border"],char:"\u{1f38c}",fitzpatrick_scale:!1,category:"objects"},izakaya_lantern:{keywords:["light","paper","halloween","spooky"],char:"\u{1f3ee}",fitzpatrick_scale:!1,category:"objects"},red_envelope:{keywords:["gift"],char:"\u{1f9e7}",fitzpatrick_scale:!1,category:"objects"},email:{keywords:["letter","postal","inbox","communication"],char:"\u2709\ufe0f",fitzpatrick_scale:!1,category:"objects"},envelope_with_arrow:{keywords:["email","communication"],char:"\u{1f4e9}",fitzpatrick_scale:!1,category:"objects"},incoming_envelope:{keywords:["email","inbox"],char:"\u{1f4e8}",fitzpatrick_scale:!1,category:"objects"},"e-mail":{keywords:["communication","inbox"],char:"\u{1f4e7}",fitzpatrick_scale:!1,category:"objects"},love_letter:{keywords:["email","like","affection","envelope","valentines"],char:"\u{1f48c}",fitzpatrick_scale:!1,category:"objects"},postbox:{keywords:["email","letter","envelope"],char:"\u{1f4ee}",fitzpatrick_scale:!1,category:"objects"},mailbox_closed:{keywords:["email","communication","inbox"],char:"\u{1f4ea}",fitzpatrick_scale:!1,category:"objects"},mailbox:{keywords:["email","inbox","communication"],char:"\u{1f4eb}",fitzpatrick_scale:!1,category:"objects"},mailbox_with_mail:{keywords:["email","inbox","communication"],char:"\u{1f4ec}",fitzpatrick_scale:!1,category:"objects"},mailbox_with_no_mail:{keywords:["email","inbox"],char:"\u{1f4ed}",fitzpatrick_scale:!1,category:"objects"},package:{keywords:["mail","gift","cardboard","box","moving"],char:"\u{1f4e6}",fitzpatrick_scale:!1,category:"objects"},postal_horn:{keywords:["instrument","music"],char:"\u{1f4ef}",fitzpatrick_scale:!1,category:"objects"},inbox_tray:{keywords:["email","documents"],char:"\u{1f4e5}",fitzpatrick_scale:!1,category:"objects"},outbox_tray:{keywords:["inbox","email"],char:"\u{1f4e4}",fitzpatrick_scale:!1,category:"objects"},scroll:{keywords:["documents","ancient","history","paper"],char:"\u{1f4dc}",fitzpatrick_scale:!1,category:"objects"},page_with_curl:{keywords:["documents","office","paper"],char:"\u{1f4c3}",fitzpatrick_scale:!1,category:"objects"},bookmark_tabs:{keywords:["favorite","save","order","tidy"],char:"\u{1f4d1}",fitzpatrick_scale:!1,category:"objects"},receipt:{keywords:["accounting","expenses"],char:"\u{1f9fe}",fitzpatrick_scale:!1,category:"objects"},bar_chart:{keywords:["graph","presentation","stats"],char:"\u{1f4ca}",fitzpatrick_scale:!1,category:"objects"},chart_with_upwards_trend:{keywords:["graph","presentation","stats","recovery","business","economics","money","sales","good","success"],char:"\u{1f4c8}",fitzpatrick_scale:!1,category:"objects"},chart_with_downwards_trend:{keywords:["graph","presentation","stats","recession","business","economics","money","sales","bad","failure"],char:"\u{1f4c9}",fitzpatrick_scale:!1,category:"objects"},page_facing_up:{keywords:["documents","office","paper","information"],char:"\u{1f4c4}",fitzpatrick_scale:!1,category:"objects"},date:{keywords:["calendar","schedule"],char:"\u{1f4c5}",fitzpatrick_scale:!1,category:"objects"},calendar:{keywords:["schedule","date","planning"],char:"\u{1f4c6}",fitzpatrick_scale:!1,category:"objects"},spiral_calendar:{keywords:["date","schedule","planning"],char:"\u{1f5d3}",fitzpatrick_scale:!1,category:"objects"},card_index:{keywords:["business","stationery"],char:"\u{1f4c7}",fitzpatrick_scale:!1,category:"objects"},card_file_box:{keywords:["business","stationery"],char:"\u{1f5c3}",fitzpatrick_scale:!1,category:"objects"},ballot_box:{keywords:["election","vote"],char:"\u{1f5f3}",fitzpatrick_scale:!1,category:"objects"},file_cabinet:{keywords:["filing","organizing"],char:"\u{1f5c4}",fitzpatrick_scale:!1,category:"objects"},clipboard:{keywords:["stationery","documents"],char:"\u{1f4cb}",fitzpatrick_scale:!1,category:"objects"},spiral_notepad:{keywords:["memo","stationery"],char:"\u{1f5d2}",fitzpatrick_scale:!1,category:"objects"},file_folder:{keywords:["documents","business","office"],char:"\u{1f4c1}",fitzpatrick_scale:!1,category:"objects"},open_file_folder:{keywords:["documents","load"],char:"\u{1f4c2}",fitzpatrick_scale:!1,category:"objects"},card_index_dividers:{keywords:["organizing","business","stationery"],char:"\u{1f5c2}",fitzpatrick_scale:!1,category:"objects"},newspaper_roll:{keywords:["press","headline"],char:"\u{1f5de}",fitzpatrick_scale:!1,category:"objects"},newspaper:{keywords:["press","headline"],char:"\u{1f4f0}",fitzpatrick_scale:!1,category:"objects"},notebook:{keywords:["stationery","record","notes","paper","study"],char:"\u{1f4d3}",fitzpatrick_scale:!1,category:"objects"},closed_book:{keywords:["read","library","knowledge","textbook","learn"],char:"\u{1f4d5}",fitzpatrick_scale:!1,category:"objects"},green_book:{keywords:["read","library","knowledge","study"],char:"\u{1f4d7}",fitzpatrick_scale:!1,category:"objects"},blue_book:{keywords:["read","library","knowledge","learn","study"],char:"\u{1f4d8}",fitzpatrick_scale:!1,category:"objects"},orange_book:{keywords:["read","library","knowledge","textbook","study"],char:"\u{1f4d9}",fitzpatrick_scale:!1,category:"objects"},notebook_with_decorative_cover:{keywords:["classroom","notes","record","paper","study"],char:"\u{1f4d4}",fitzpatrick_scale:!1,category:"objects"},ledger:{keywords:["notes","paper"],char:"\u{1f4d2}",fitzpatrick_scale:!1,category:"objects"},books:{keywords:["literature","library","study"],char:"\u{1f4da}",fitzpatrick_scale:!1,category:"objects"},open_book:{keywords:["book","read","library","knowledge","literature","learn","study"],char:"\u{1f4d6}",fitzpatrick_scale:!1,category:"objects"},safety_pin:{keywords:["diaper"],char:"\u{1f9f7}",fitzpatrick_scale:!1,category:"objects"},link:{keywords:["rings","url"],char:"\u{1f517}",fitzpatrick_scale:!1,category:"objects"},paperclip:{keywords:["documents","stationery"],char:"\u{1f4ce}",fitzpatrick_scale:!1,category:"objects"},paperclips:{keywords:["documents","stationery"],char:"\u{1f587}",fitzpatrick_scale:!1,category:"objects"},scissors:{keywords:["stationery","cut"],char:"\u2702\ufe0f",fitzpatrick_scale:!1,category:"objects"},triangular_ruler:{keywords:["stationery","math","architect","sketch"],char:"\u{1f4d0}",fitzpatrick_scale:!1,category:"objects"},straight_ruler:{keywords:["stationery","calculate","length","math","school","drawing","architect","sketch"],char:"\u{1f4cf}",fitzpatrick_scale:!1,category:"objects"},abacus:{keywords:["calculation"],char:"\u{1f9ee}",fitzpatrick_scale:!1,category:"objects"},pushpin:{keywords:["stationery","mark","here"],char:"\u{1f4cc}",fitzpatrick_scale:!1,category:"objects"},round_pushpin:{keywords:["stationery","location","map","here"],char:"\u{1f4cd}",fitzpatrick_scale:!1,category:"objects"},triangular_flag_on_post:{keywords:["mark","milestone","place"],char:"\u{1f6a9}",fitzpatrick_scale:!1,category:"objects"},white_flag:{keywords:["losing","loser","lost","surrender","give up","fail"],char:"\u{1f3f3}",fitzpatrick_scale:!1,category:"objects"},black_flag:{keywords:["pirate"],char:"\u{1f3f4}",fitzpatrick_scale:!1,category:"objects"},rainbow_flag:{keywords:["flag","rainbow","pride","gay","lgbt","glbt","queer","homosexual","lesbian","bisexual","transgender"],char:"\u{1f3f3}\ufe0f\u200d\u{1f308}",fitzpatrick_scale:!1,category:"objects"},closed_lock_with_key:{keywords:["security","privacy"],char:"\u{1f510}",fitzpatrick_scale:!1,category:"objects"},lock:{keywords:["security","password","padlock"],char:"\u{1f512}",fitzpatrick_scale:!1,category:"objects"},unlock:{keywords:["privacy","security"],char:"\u{1f513}",fitzpatrick_scale:!1,category:"objects"},lock_with_ink_pen:{keywords:["security","secret"],char:"\u{1f50f}",fitzpatrick_scale:!1,category:"objects"},pen:{keywords:["stationery","writing","write"],char:"\u{1f58a}",fitzpatrick_scale:!1,category:"objects"},fountain_pen:{keywords:["stationery","writing","write"],char:"\u{1f58b}",fitzpatrick_scale:!1,category:"objects"},black_nib:{keywords:["pen","stationery","writing","write"],char:"\u2712\ufe0f",fitzpatrick_scale:!1,category:"objects"},memo:{keywords:["write","documents","stationery","pencil","paper","writing","legal","exam","quiz","test","study","compose"],char:"\u{1f4dd}",fitzpatrick_scale:!1,category:"objects"},pencil2:{keywords:["stationery","write","paper","writing","school","study"],char:"\u270f\ufe0f",fitzpatrick_scale:!1,category:"objects"},crayon:{keywords:["drawing","creativity"],char:"\u{1f58d}",fitzpatrick_scale:!1,category:"objects"},paintbrush:{keywords:["drawing","creativity","art"],char:"\u{1f58c}",fitzpatrick_scale:!1,category:"objects"},mag:{keywords:["search","zoom","find","detective"],char:"\u{1f50d}",fitzpatrick_scale:!1,category:"objects"},mag_right:{keywords:["search","zoom","find","detective"],char:"\u{1f50e}",fitzpatrick_scale:!1,category:"objects"},heart:{keywords:["love","like","valentines"],char:"\u2764\ufe0f",fitzpatrick_scale:!1,category:"symbols"},orange_heart:{keywords:["love","like","affection","valentines"],char:"\u{1f9e1}",fitzpatrick_scale:!1,category:"symbols"},yellow_heart:{keywords:["love","like","affection","valentines"],char:"\u{1f49b}",fitzpatrick_scale:!1,category:"symbols"},green_heart:{keywords:["love","like","affection","valentines"],char:"\u{1f49a}",fitzpatrick_scale:!1,category:"symbols"},blue_heart:{keywords:["love","like","affection","valentines"],char:"\u{1f499}",fitzpatrick_scale:!1,category:"symbols"},purple_heart:{keywords:["love","like","affection","valentines"],char:"\u{1f49c}",fitzpatrick_scale:!1,category:"symbols"},black_heart:{keywords:["evil"],char:"\u{1f5a4}",fitzpatrick_scale:!1,category:"symbols"},broken_heart:{keywords:["sad","sorry","break","heart","heartbreak"],char:"\u{1f494}",fitzpatrick_scale:!1,category:"symbols"},heavy_heart_exclamation:{keywords:["decoration","love"],char:"\u2763",fitzpatrick_scale:!1,category:"symbols"},two_hearts:{keywords:["love","like","affection","valentines","heart"],char:"\u{1f495}",fitzpatrick_scale:!1,category:"symbols"},revolving_hearts:{keywords:["love","like","affection","valentines"],char:"\u{1f49e}",fitzpatrick_scale:!1,category:"symbols"},heartbeat:{keywords:["love","like","affection","valentines","pink","heart"],char:"\u{1f493}",fitzpatrick_scale:!1,category:"symbols"},heartpulse:{keywords:["like","love","affection","valentines","pink"],char:"\u{1f497}",fitzpatrick_scale:!1,category:"symbols"},sparkling_heart:{keywords:["love","like","affection","valentines"],char:"\u{1f496}",fitzpatrick_scale:!1,category:"symbols"},cupid:{keywords:["love","like","heart","affection","valentines"],char:"\u{1f498}",fitzpatrick_scale:!1,category:"symbols"},gift_heart:{keywords:["love","valentines"],char:"\u{1f49d}",fitzpatrick_scale:!1,category:"symbols"},heart_decoration:{keywords:["purple-square","love","like"],char:"\u{1f49f}",fitzpatrick_scale:!1,category:"symbols"},peace_symbol:{keywords:["hippie"],char:"\u262e",fitzpatrick_scale:!1,category:"symbols"},latin_cross:{keywords:["christianity"],char:"\u271d",fitzpatrick_scale:!1,category:"symbols"},star_and_crescent:{keywords:["islam"],char:"\u262a",fitzpatrick_scale:!1,category:"symbols"},om:{keywords:["hinduism","buddhism","sikhism","jainism"],char:"\u{1f549}",fitzpatrick_scale:!1,category:"symbols"},wheel_of_dharma:{keywords:["hinduism","buddhism","sikhism","jainism"],char:"\u2638",fitzpatrick_scale:!1,category:"symbols"},star_of_david:{keywords:["judaism"],char:"\u2721",fitzpatrick_scale:!1,category:"symbols"},six_pointed_star:{keywords:["purple-square","religion","jewish","hexagram"],char:"\u{1f52f}",fitzpatrick_scale:!1,category:"symbols"},menorah:{keywords:["hanukkah","candles","jewish"],char:"\u{1f54e}",fitzpatrick_scale:!1,category:"symbols"},yin_yang:{keywords:["balance"],char:"\u262f",fitzpatrick_scale:!1,category:"symbols"},orthodox_cross:{keywords:["suppedaneum","religion"],char:"\u2626",fitzpatrick_scale:!1,category:"symbols"},place_of_worship:{keywords:["religion","church","temple","prayer"],char:"\u{1f6d0}",fitzpatrick_scale:!1,category:"symbols"},ophiuchus:{keywords:["sign","purple-square","constellation","astrology"],char:"\u26ce",fitzpatrick_scale:!1,category:"symbols"},aries:{keywords:["sign","purple-square","zodiac","astrology"],char:"\u2648",fitzpatrick_scale:!1,category:"symbols"},taurus:{keywords:["purple-square","sign","zodiac","astrology"],char:"\u2649",fitzpatrick_scale:!1,category:"symbols"},gemini:{keywords:["sign","zodiac","purple-square","astrology"],char:"\u264a",fitzpatrick_scale:!1,category:"symbols"},cancer:{keywords:["sign","zodiac","purple-square","astrology"],char:"\u264b",fitzpatrick_scale:!1,category:"symbols"},leo:{keywords:["sign","purple-square","zodiac","astrology"],char:"\u264c",fitzpatrick_scale:!1,category:"symbols"},virgo:{keywords:["sign","zodiac","purple-square","astrology"],char:"\u264d",fitzpatrick_scale:!1,category:"symbols"},libra:{keywords:["sign","purple-square","zodiac","astrology"],char:"\u264e",fitzpatrick_scale:!1,category:"symbols"},scorpius:{keywords:["sign","zodiac","purple-square","astrology","scorpio"],char:"\u264f",fitzpatrick_scale:!1,category:"symbols"},sagittarius:{keywords:["sign","zodiac","purple-square","astrology"],char:"\u2650",fitzpatrick_scale:!1,category:"symbols"},capricorn:{keywords:["sign","zodiac","purple-square","astrology"],char:"\u2651",fitzpatrick_scale:!1,category:"symbols"},aquarius:{keywords:["sign","purple-square","zodiac","astrology"],char:"\u2652",fitzpatrick_scale:!1,category:"symbols"},pisces:{keywords:["purple-square","sign","zodiac","astrology"],char:"\u2653",fitzpatrick_scale:!1,category:"symbols"},id:{keywords:["purple-square","words"],char:"\u{1f194}",fitzpatrick_scale:!1,category:"symbols"},atom_symbol:{keywords:["science","physics","chemistry"],char:"\u269b",fitzpatrick_scale:!1,category:"symbols"},u7a7a:{keywords:["kanji","japanese","chinese","empty","sky","blue-square"],char:"\u{1f233}",fitzpatrick_scale:!1,category:"symbols"},u5272:{keywords:["cut","divide","chinese","kanji","pink-square"],char:"\u{1f239}",fitzpatrick_scale:!1,category:"symbols"},radioactive:{keywords:["nuclear","danger"],char:"\u2622",fitzpatrick_scale:!1,category:"symbols"},biohazard:{keywords:["danger"],char:"\u2623",fitzpatrick_scale:!1,category:"symbols"},mobile_phone_off:{keywords:["mute","orange-square","silence","quiet"],char:"\u{1f4f4}",fitzpatrick_scale:!1,category:"symbols"},vibration_mode:{keywords:["orange-square","phone"],char:"\u{1f4f3}",fitzpatrick_scale:!1,category:"symbols"},u6709:{keywords:["orange-square","chinese","have","kanji"],char:"\u{1f236}",fitzpatrick_scale:!1,category:"symbols"},u7121:{keywords:["nothing","chinese","kanji","japanese","orange-square"],char:"\u{1f21a}",fitzpatrick_scale:!1,category:"symbols"},u7533:{keywords:["chinese","japanese","kanji","orange-square"],char:"\u{1f238}",fitzpatrick_scale:!1,category:"symbols"},u55b6:{keywords:["japanese","opening hours","orange-square"],char:"\u{1f23a}",fitzpatrick_scale:!1,category:"symbols"},u6708:{keywords:["chinese","month","moon","japanese","orange-square","kanji"],char:"\u{1f237}\ufe0f",fitzpatrick_scale:!1,category:"symbols"},eight_pointed_black_star:{keywords:["orange-square","shape","polygon"],char:"\u2734\ufe0f",fitzpatrick_scale:!1,category:"symbols"},vs:{keywords:["words","orange-square"],char:"\u{1f19a}",fitzpatrick_scale:!1,category:"symbols"},accept:{keywords:["ok","good","chinese","kanji","agree","yes","orange-circle"],char:"\u{1f251}",fitzpatrick_scale:!1,category:"symbols"},white_flower:{keywords:["japanese","spring"],char:"\u{1f4ae}",fitzpatrick_scale:!1,category:"symbols"},ideograph_advantage:{keywords:["chinese","kanji","obtain","get","circle"],char:"\u{1f250}",fitzpatrick_scale:!1,category:"symbols"},secret:{keywords:["privacy","chinese","sshh","kanji","red-circle"],char:"\u3299\ufe0f",fitzpatrick_scale:!1,category:"symbols"},congratulations:{keywords:["chinese","kanji","japanese","red-circle"],char:"\u3297\ufe0f",fitzpatrick_scale:!1,category:"symbols"},u5408:{keywords:["japanese","chinese","join","kanji","red-square"],char:"\u{1f234}",fitzpatrick_scale:!1,category:"symbols"},u6e80:{keywords:["full","chinese","japanese","red-square","kanji"],char:"\u{1f235}",fitzpatrick_scale:!1,category:"symbols"},u7981:{keywords:["kanji","japanese","chinese","forbidden","limit","restricted","red-square"],char:"\u{1f232}",fitzpatrick_scale:!1,category:"symbols"},a:{keywords:["red-square","alphabet","letter"],char:"\u{1f170}\ufe0f",fitzpatrick_scale:!1,category:"symbols"},b:{keywords:["red-square","alphabet","letter"],char:"\u{1f171}\ufe0f",fitzpatrick_scale:!1,category:"symbols"},ab:{keywords:["red-square","alphabet"],char:"\u{1f18e}",fitzpatrick_scale:!1,category:"symbols"},cl:{keywords:["alphabet","words","red-square"],char:"\u{1f191}",fitzpatrick_scale:!1,category:"symbols"},o2:{keywords:["alphabet","red-square","letter"],char:"\u{1f17e}\ufe0f",fitzpatrick_scale:!1,category:"symbols"},sos:{keywords:["help","red-square","words","emergency","911"],char:"\u{1f198}",fitzpatrick_scale:!1,category:"symbols"},no_entry:{keywords:["limit","security","privacy","bad","denied","stop","circle"],char:"\u26d4",fitzpatrick_scale:!1,category:"symbols"},name_badge:{keywords:["fire","forbid"],char:"\u{1f4db}",fitzpatrick_scale:!1,category:"symbols"},no_entry_sign:{keywords:["forbid","stop","limit","denied","disallow","circle"],char:"\u{1f6ab}",fitzpatrick_scale:!1,category:"symbols"},x:{keywords:["no","delete","remove","cancel","red"],char:"\u274c",fitzpatrick_scale:!1,category:"symbols"},o:{keywords:["circle","round"],char:"\u2b55",fitzpatrick_scale:!1,category:"symbols"},stop_sign:{keywords:["stop"],char:"\u{1f6d1}",fitzpatrick_scale:!1,category:"symbols"},anger:{keywords:["angry","mad"],char:"\u{1f4a2}",fitzpatrick_scale:!1,category:"symbols"},hotsprings:{keywords:["bath","warm","relax"],char:"\u2668\ufe0f",fitzpatrick_scale:!1,category:"symbols"},no_pedestrians:{keywords:["rules","crossing","walking","circle"],char:"\u{1f6b7}",fitzpatrick_scale:!1,category:"symbols"},do_not_litter:{keywords:["trash","bin","garbage","circle"],char:"\u{1f6af}",fitzpatrick_scale:!1,category:"symbols"},no_bicycles:{keywords:["cyclist","prohibited","circle"],char:"\u{1f6b3}",fitzpatrick_scale:!1,category:"symbols"},"non-potable_water":{keywords:["drink","faucet","tap","circle"],char:"\u{1f6b1}",fitzpatrick_scale:!1,category:"symbols"},underage:{keywords:["18","drink","pub","night","minor","circle"],char:"\u{1f51e}",fitzpatrick_scale:!1,category:"symbols"},no_mobile_phones:{keywords:["iphone","mute","circle"],char:"\u{1f4f5}",fitzpatrick_scale:!1,category:"symbols"},exclamation:{keywords:["heavy_exclamation_mark","danger","surprise","punctuation","wow","warning"],char:"\u2757",fitzpatrick_scale:!1,category:"symbols"},grey_exclamation:{keywords:["surprise","punctuation","gray","wow","warning"],char:"\u2755",fitzpatrick_scale:!1,category:"symbols"},question:{keywords:["doubt","confused"],char:"\u2753",fitzpatrick_scale:!1,category:"symbols"},grey_question:{keywords:["doubts","gray","huh","confused"],char:"\u2754",fitzpatrick_scale:!1,category:"symbols"},bangbang:{keywords:["exclamation","surprise"],char:"\u203c\ufe0f",fitzpatrick_scale:!1,category:"symbols"},interrobang:{keywords:["wat","punctuation","surprise"],char:"\u2049\ufe0f",fitzpatrick_scale:!1,category:"symbols"},100:{keywords:["score","perfect","numbers","century","exam","quiz","test","pass","hundred"],char:"\u{1f4af}",fitzpatrick_scale:!1,category:"symbols"},low_brightness:{keywords:["sun","afternoon","warm","summer"],char:"\u{1f505}",fitzpatrick_scale:!1,category:"symbols"},high_brightness:{keywords:["sun","light"],char:"\u{1f506}",fitzpatrick_scale:!1,category:"symbols"},trident:{keywords:["weapon","spear"],char:"\u{1f531}",fitzpatrick_scale:!1,category:"symbols"},fleur_de_lis:{keywords:["decorative","scout"],char:"\u269c",fitzpatrick_scale:!1,category:"symbols"},part_alternation_mark:{keywords:["graph","presentation","stats","business","economics","bad"],char:"\u303d\ufe0f",fitzpatrick_scale:!1,category:"symbols"},warning:{keywords:["exclamation","wip","alert","error","problem","issue"],char:"\u26a0\ufe0f",fitzpatrick_scale:!1,category:"symbols"},children_crossing:{keywords:["school","warning","danger","sign","driving","yellow-diamond"],char:"\u{1f6b8}",fitzpatrick_scale:!1,category:"symbols"},beginner:{keywords:["badge","shield"],char:"\u{1f530}",fitzpatrick_scale:!1,category:"symbols"},recycle:{keywords:["arrow","environment","garbage","trash"],char:"\u267b\ufe0f",fitzpatrick_scale:!1,category:"symbols"},u6307:{keywords:["chinese","point","green-square","kanji"],char:"\u{1f22f}",fitzpatrick_scale:!1,category:"symbols"},chart:{keywords:["green-square","graph","presentation","stats"],char:"\u{1f4b9}",fitzpatrick_scale:!1,category:"symbols"},sparkle:{keywords:["stars","green-square","awesome","good","fireworks"],char:"\u2747\ufe0f",fitzpatrick_scale:!1,category:"symbols"},eight_spoked_asterisk:{keywords:["star","sparkle","green-square"],char:"\u2733\ufe0f",fitzpatrick_scale:!1,category:"symbols"},negative_squared_cross_mark:{keywords:["x","green-square","no","deny"],char:"\u274e",fitzpatrick_scale:!1,category:"symbols"},white_check_mark:{keywords:["green-square","ok","agree","vote","election","answer","tick"],char:"\u2705",fitzpatrick_scale:!1,category:"symbols"},diamond_shape_with_a_dot_inside:{keywords:["jewel","blue","gem","crystal","fancy"],char:"\u{1f4a0}",fitzpatrick_scale:!1,category:"symbols"},cyclone:{keywords:["weather","swirl","blue","cloud","vortex","spiral","whirlpool","spin","tornado","hurricane","typhoon"],char:"\u{1f300}",fitzpatrick_scale:!1,category:"symbols"},loop:{keywords:["tape","cassette"],char:"\u27bf",fitzpatrick_scale:!1,category:"symbols"},globe_with_meridians:{keywords:["earth","international","world","internet","interweb","i18n"],char:"\u{1f310}",fitzpatrick_scale:!1,category:"symbols"},m:{keywords:["alphabet","blue-circle","letter"],char:"\u24c2\ufe0f",fitzpatrick_scale:!1,category:"symbols"},atm:{keywords:["money","sales","cash","blue-square","payment","bank"],char:"\u{1f3e7}",fitzpatrick_scale:!1,category:"symbols"},sa:{keywords:["japanese","blue-square","katakana"],char:"\u{1f202}\ufe0f",fitzpatrick_scale:!1,category:"symbols"},passport_control:{keywords:["custom","blue-square"],char:"\u{1f6c2}",fitzpatrick_scale:!1,category:"symbols"},customs:{keywords:["passport","border","blue-square"],char:"\u{1f6c3}",fitzpatrick_scale:!1,category:"symbols"},baggage_claim:{keywords:["blue-square","airport","transport"],char:"\u{1f6c4}",fitzpatrick_scale:!1,category:"symbols"},left_luggage:{keywords:["blue-square","travel"],char:"\u{1f6c5}",fitzpatrick_scale:!1,category:"symbols"},wheelchair:{keywords:["blue-square","disabled","a11y","accessibility"],char:"\u267f",fitzpatrick_scale:!1,category:"symbols"},no_smoking:{keywords:["cigarette","blue-square","smell","smoke"],char:"\u{1f6ad}",fitzpatrick_scale:!1,category:"symbols"},wc:{keywords:["toilet","restroom","blue-square"],char:"\u{1f6be}",fitzpatrick_scale:!1,category:"symbols"},parking:{keywords:["cars","blue-square","alphabet","letter"],char:"\u{1f17f}\ufe0f",fitzpatrick_scale:!1,category:"symbols"},potable_water:{keywords:["blue-square","liquid","restroom","cleaning","faucet"],char:"\u{1f6b0}",fitzpatrick_scale:!1,category:"symbols"},mens:{keywords:["toilet","restroom","wc","blue-square","gender","male"],char:"\u{1f6b9}",fitzpatrick_scale:!1,category:"symbols"},womens:{keywords:["purple-square","woman","female","toilet","loo","restroom","gender"],char:"\u{1f6ba}",fitzpatrick_scale:!1,category:"symbols"},baby_symbol:{keywords:["orange-square","child"],char:"\u{1f6bc}",fitzpatrick_scale:!1,category:"symbols"},restroom:{keywords:["blue-square","toilet","refresh","wc","gender"],char:"\u{1f6bb}",fitzpatrick_scale:!1,category:"symbols"},put_litter_in_its_place:{keywords:["blue-square","sign","human","info"],char:"\u{1f6ae}",fitzpatrick_scale:!1,category:"symbols"},cinema:{keywords:["blue-square","record","film","movie","curtain","stage","theater"],char:"\u{1f3a6}",fitzpatrick_scale:!1,category:"symbols"},signal_strength:{keywords:["blue-square","reception","phone","internet","connection","wifi","bluetooth","bars"],char:"\u{1f4f6}",fitzpatrick_scale:!1,category:"symbols"},koko:{keywords:["blue-square","here","katakana","japanese","destination"],char:"\u{1f201}",fitzpatrick_scale:!1,category:"symbols"},ng:{keywords:["blue-square","words","shape","icon"],char:"\u{1f196}",fitzpatrick_scale:!1,category:"symbols"},ok:{keywords:["good","agree","yes","blue-square"],char:"\u{1f197}",fitzpatrick_scale:!1,category:"symbols"},up:{keywords:["blue-square","above","high"],char:"\u{1f199}",fitzpatrick_scale:!1,category:"symbols"},cool:{keywords:["words","blue-square"],char:"\u{1f192}",fitzpatrick_scale:!1,category:"symbols"},new:{keywords:["blue-square","words","start"],char:"\u{1f195}",fitzpatrick_scale:!1,category:"symbols"},free:{keywords:["blue-square","words"],char:"\u{1f193}",fitzpatrick_scale:!1,category:"symbols"},zero:{keywords:["0","numbers","blue-square","null"],char:"0\ufe0f\u20e3",fitzpatrick_scale:!1,category:"symbols"},one:{keywords:["blue-square","numbers","1"],char:"1\ufe0f\u20e3",fitzpatrick_scale:!1,category:"symbols"},two:{keywords:["numbers","2","prime","blue-square"],char:"2\ufe0f\u20e3",fitzpatrick_scale:!1,category:"symbols"},three:{keywords:["3","numbers","prime","blue-square"],char:"3\ufe0f\u20e3",fitzpatrick_scale:!1,category:"symbols"},four:{keywords:["4","numbers","blue-square"],char:"4\ufe0f\u20e3",fitzpatrick_scale:!1,category:"symbols"},five:{keywords:["5","numbers","blue-square","prime"],char:"5\ufe0f\u20e3",fitzpatrick_scale:!1,category:"symbols"},six:{keywords:["6","numbers","blue-square"],char:"6\ufe0f\u20e3",fitzpatrick_scale:!1,category:"symbols"},seven:{keywords:["7","numbers","blue-square","prime"],char:"7\ufe0f\u20e3",fitzpatrick_scale:!1,category:"symbols"},eight:{keywords:["8","blue-square","numbers"],char:"8\ufe0f\u20e3",fitzpatrick_scale:!1,category:"symbols"},nine:{keywords:["blue-square","numbers","9"],char:"9\ufe0f\u20e3",fitzpatrick_scale:!1,category:"symbols"},keycap_ten:{keywords:["numbers","10","blue-square"],char:"\u{1f51f}",fitzpatrick_scale:!1,category:"symbols"},asterisk:{keywords:["star","keycap"],char:"*\u20e3",fitzpatrick_scale:!1,category:"symbols"},1234:{keywords:["numbers","blue-square"],char:"\u{1f522}",fitzpatrick_scale:!1,category:"symbols"},eject_button:{keywords:["blue-square"],char:"\u23cf\ufe0f",fitzpatrick_scale:!1,category:"symbols"},arrow_forward:{keywords:["blue-square","right","direction","play"],char:"\u25b6\ufe0f",fitzpatrick_scale:!1,category:"symbols"},pause_button:{keywords:["pause","blue-square"],char:"\u23f8",fitzpatrick_scale:!1,category:"symbols"},next_track_button:{keywords:["forward","next","blue-square"],char:"\u23ed",fitzpatrick_scale:!1,category:"symbols"},stop_button:{keywords:["blue-square"],char:"\u23f9",fitzpatrick_scale:!1,category:"symbols"},record_button:{keywords:["blue-square"],char:"\u23fa",fitzpatrick_scale:!1,category:"symbols"},play_or_pause_button:{keywords:["blue-square","play","pause"],char:"\u23ef",fitzpatrick_scale:!1,category:"symbols"},previous_track_button:{keywords:["backward"],char:"\u23ee",fitzpatrick_scale:!1,category:"symbols"},fast_forward:{keywords:["blue-square","play","speed","continue"],char:"\u23e9",fitzpatrick_scale:!1,category:"symbols"},rewind:{keywords:["play","blue-square"],char:"\u23ea",fitzpatrick_scale:!1,category:"symbols"},twisted_rightwards_arrows:{keywords:["blue-square","shuffle","music","random"],char:"\u{1f500}",fitzpatrick_scale:!1,category:"symbols"},repeat:{keywords:["loop","record"],char:"\u{1f501}",fitzpatrick_scale:!1,category:"symbols"},repeat_one:{keywords:["blue-square","loop"],char:"\u{1f502}",fitzpatrick_scale:!1,category:"symbols"},arrow_backward:{keywords:["blue-square","left","direction"],char:"\u25c0\ufe0f",fitzpatrick_scale:!1,category:"symbols"},arrow_up_small:{keywords:["blue-square","triangle","direction","point","forward","top"],char:"\u{1f53c}",fitzpatrick_scale:!1,category:"symbols"},arrow_down_small:{keywords:["blue-square","direction","bottom"],char:"\u{1f53d}",fitzpatrick_scale:!1,category:"symbols"},arrow_double_up:{keywords:["blue-square","direction","top"],char:"\u23eb",fitzpatrick_scale:!1,category:"symbols"},arrow_double_down:{keywords:["blue-square","direction","bottom"],char:"\u23ec",fitzpatrick_scale:!1,category:"symbols"},arrow_right:{keywords:["blue-square","next"],char:"\u27a1\ufe0f",fitzpatrick_scale:!1,category:"symbols"},arrow_left:{keywords:["blue-square","previous","back"],char:"\u2b05\ufe0f",fitzpatrick_scale:!1,category:"symbols"},arrow_up:{keywords:["blue-square","continue","top","direction"],char:"\u2b06\ufe0f",fitzpatrick_scale:!1,category:"symbols"},arrow_down:{keywords:["blue-square","direction","bottom"],char:"\u2b07\ufe0f",fitzpatrick_scale:!1,category:"symbols"},arrow_upper_right:{keywords:["blue-square","point","direction","diagonal","northeast"],char:"\u2197\ufe0f",fitzpatrick_scale:!1,category:"symbols"},arrow_lower_right:{keywords:["blue-square","direction","diagonal","southeast"],char:"\u2198\ufe0f",fitzpatrick_scale:!1,category:"symbols"},arrow_lower_left:{keywords:["blue-square","direction","diagonal","southwest"],char:"\u2199\ufe0f",fitzpatrick_scale:!1,category:"symbols"},arrow_upper_left:{keywords:["blue-square","point","direction","diagonal","northwest"],char:"\u2196\ufe0f",fitzpatrick_scale:!1,category:"symbols"},arrow_up_down:{keywords:["blue-square","direction","way","vertical"],char:"\u2195\ufe0f",fitzpatrick_scale:!1,category:"symbols"},left_right_arrow:{keywords:["shape","direction","horizontal","sideways"],char:"\u2194\ufe0f",fitzpatrick_scale:!1,category:"symbols"},arrows_counterclockwise:{keywords:["blue-square","sync","cycle"],char:"\u{1f504}",fitzpatrick_scale:!1,category:"symbols"},arrow_right_hook:{keywords:["blue-square","return","rotate","direction"],char:"\u21aa\ufe0f",fitzpatrick_scale:!1,category:"symbols"},leftwards_arrow_with_hook:{keywords:["back","return","blue-square","undo","enter"],char:"\u21a9\ufe0f",fitzpatrick_scale:!1,category:"symbols"},arrow_heading_up:{keywords:["blue-square","direction","top"],char:"\u2934\ufe0f",fitzpatrick_scale:!1,category:"symbols"},arrow_heading_down:{keywords:["blue-square","direction","bottom"],char:"\u2935\ufe0f",fitzpatrick_scale:!1,category:"symbols"},hash:{keywords:["symbol","blue-square","twitter"],char:"#\ufe0f\u20e3",fitzpatrick_scale:!1,category:"symbols"},information_source:{keywords:["blue-square","alphabet","letter"],char:"\u2139\ufe0f",fitzpatrick_scale:!1,category:"symbols"},abc:{keywords:["blue-square","alphabet"],char:"\u{1f524}",fitzpatrick_scale:!1,category:"symbols"},abcd:{keywords:["blue-square","alphabet"],char:"\u{1f521}",fitzpatrick_scale:!1,category:"symbols"},capital_abcd:{keywords:["alphabet","words","blue-square"],char:"\u{1f520}",fitzpatrick_scale:!1,category:"symbols"},symbols:{keywords:["blue-square","music","note","ampersand","percent","glyphs","characters"],char:"\u{1f523}",fitzpatrick_scale:!1,category:"symbols"},musical_note:{keywords:["score","tone","sound"],char:"\u{1f3b5}",fitzpatrick_scale:!1,category:"symbols"},notes:{keywords:["music","score"],char:"\u{1f3b6}",fitzpatrick_scale:!1,category:"symbols"},wavy_dash:{keywords:["draw","line","moustache","mustache","squiggle","scribble"],char:"\u3030\ufe0f",fitzpatrick_scale:!1,category:"symbols"},curly_loop:{keywords:["scribble","draw","shape","squiggle"],char:"\u27b0",fitzpatrick_scale:!1,category:"symbols"},heavy_check_mark:{keywords:["ok","nike","answer","yes","tick"],char:"\u2714\ufe0f",fitzpatrick_scale:!1,category:"symbols"},arrows_clockwise:{keywords:["sync","cycle","round","repeat"],char:"\u{1f503}",fitzpatrick_scale:!1,category:"symbols"},heavy_plus_sign:{keywords:["math","calculation","addition","more","increase"],char:"\u2795",fitzpatrick_scale:!1,category:"symbols"},heavy_minus_sign:{keywords:["math","calculation","subtract","less"],char:"\u2796",fitzpatrick_scale:!1,category:"symbols"},heavy_division_sign:{keywords:["divide","math","calculation"],char:"\u2797",fitzpatrick_scale:!1,category:"symbols"},heavy_multiplication_x:{keywords:["math","calculation"],char:"\u2716\ufe0f",fitzpatrick_scale:!1,category:"symbols"},infinity:{keywords:["forever"],char:"\u267e",fitzpatrick_scale:!1,category:"symbols"},heavy_dollar_sign:{keywords:["money","sales","payment","currency","buck"],char:"\u{1f4b2}",fitzpatrick_scale:!1,category:"symbols"},currency_exchange:{keywords:["money","sales","dollar","travel"],char:"\u{1f4b1}",fitzpatrick_scale:!1,category:"symbols"},copyright:{keywords:["ip","license","circle","law","legal"],char:"\xa9\ufe0f",fitzpatrick_scale:!1,category:"symbols"},registered:{keywords:["alphabet","circle"],char:"\xae\ufe0f",fitzpatrick_scale:!1,category:"symbols"},tm:{keywords:["trademark","brand","law","legal"],char:"\u2122\ufe0f",fitzpatrick_scale:!1,category:"symbols"},end:{keywords:["words","arrow"],char:"\u{1f51a}",fitzpatrick_scale:!1,category:"symbols"},back:{keywords:["arrow","words","return"],char:"\u{1f519}",fitzpatrick_scale:!1,category:"symbols"},on:{keywords:["arrow","words"],char:"\u{1f51b}",fitzpatrick_scale:!1,category:"symbols"},top:{keywords:["words","blue-square"],char:"\u{1f51d}",fitzpatrick_scale:!1,category:"symbols"},soon:{keywords:["arrow","words"],char:"\u{1f51c}",fitzpatrick_scale:!1,category:"symbols"},ballot_box_with_check:{keywords:["ok","agree","confirm","black-square","vote","election","yes","tick"],char:"\u2611\ufe0f",fitzpatrick_scale:!1,category:"symbols"},radio_button:{keywords:["input","old","music","circle"],char:"\u{1f518}",fitzpatrick_scale:!1,category:"symbols"},white_circle:{keywords:["shape","round"],char:"\u26aa",fitzpatrick_scale:!1,category:"symbols"},black_circle:{keywords:["shape","button","round"],char:"\u26ab",fitzpatrick_scale:!1,category:"symbols"},red_circle:{keywords:["shape","error","danger"],char:"\u{1f534}",fitzpatrick_scale:!1,category:"symbols"},large_blue_circle:{keywords:["shape","icon","button"],char:"\u{1f535}",fitzpatrick_scale:!1,category:"symbols"},small_orange_diamond:{keywords:["shape","jewel","gem"],char:"\u{1f538}",fitzpatrick_scale:!1,category:"symbols"},small_blue_diamond:{keywords:["shape","jewel","gem"],char:"\u{1f539}",fitzpatrick_scale:!1,category:"symbols"},large_orange_diamond:{keywords:["shape","jewel","gem"],char:"\u{1f536}",fitzpatrick_scale:!1,category:"symbols"},large_blue_diamond:{keywords:["shape","jewel","gem"],char:"\u{1f537}",fitzpatrick_scale:!1,category:"symbols"},small_red_triangle:{keywords:["shape","direction","up","top"],char:"\u{1f53a}",fitzpatrick_scale:!1,category:"symbols"},black_small_square:{keywords:["shape","icon"],char:"\u25aa\ufe0f",fitzpatrick_scale:!1,category:"symbols"},white_small_square:{keywords:["shape","icon"],char:"\u25ab\ufe0f",fitzpatrick_scale:!1,category:"symbols"},black_large_square:{keywords:["shape","icon","button"],char:"\u2b1b",fitzpatrick_scale:!1,category:"symbols"},white_large_square:{keywords:["shape","icon","stone","button"],char:"\u2b1c",fitzpatrick_scale:!1,category:"symbols"},small_red_triangle_down:{keywords:["shape","direction","bottom"],char:"\u{1f53b}",fitzpatrick_scale:!1,category:"symbols"},black_medium_square:{keywords:["shape","button","icon"],char:"\u25fc\ufe0f",fitzpatrick_scale:!1,category:"symbols"},white_medium_square:{keywords:["shape","stone","icon"],char:"\u25fb\ufe0f",fitzpatrick_scale:!1,category:"symbols"},black_medium_small_square:{keywords:["icon","shape","button"],char:"\u25fe",fitzpatrick_scale:!1,category:"symbols"},white_medium_small_square:{keywords:["shape","stone","icon","button"],char:"\u25fd",fitzpatrick_scale:!1,category:"symbols"},black_square_button:{keywords:["shape","input","frame"],char:"\u{1f532}",fitzpatrick_scale:!1,category:"symbols"},white_square_button:{keywords:["shape","input"],char:"\u{1f533}",fitzpatrick_scale:!1,category:"symbols"},speaker:{keywords:["sound","volume","silence","broadcast"],char:"\u{1f508}",fitzpatrick_scale:!1,category:"symbols"},sound:{keywords:["volume","speaker","broadcast"],char:"\u{1f509}",fitzpatrick_scale:!1,category:"symbols"},loud_sound:{keywords:["volume","noise","noisy","speaker","broadcast"],char:"\u{1f50a}",fitzpatrick_scale:!1,category:"symbols"},mute:{keywords:["sound","volume","silence","quiet"],char:"\u{1f507}",fitzpatrick_scale:!1,category:"symbols"},mega:{keywords:["sound","speaker","volume"],char:"\u{1f4e3}",fitzpatrick_scale:!1,category:"symbols"},loudspeaker:{keywords:["volume","sound"],char:"\u{1f4e2}",fitzpatrick_scale:!1,category:"symbols"},bell:{keywords:["sound","notification","christmas","xmas","chime"],char:"\u{1f514}",fitzpatrick_scale:!1,category:"symbols"},no_bell:{keywords:["sound","volume","mute","quiet","silent"],char:"\u{1f515}",fitzpatrick_scale:!1,category:"symbols"},black_joker:{keywords:["poker","cards","game","play","magic"],char:"\u{1f0cf}",fitzpatrick_scale:!1,category:"symbols"},mahjong:{keywords:["game","play","chinese","kanji"],char:"\u{1f004}",fitzpatrick_scale:!1,category:"symbols"},spades:{keywords:["poker","cards","suits","magic"],char:"\u2660\ufe0f",fitzpatrick_scale:!1,category:"symbols"},clubs:{keywords:["poker","cards","magic","suits"],char:"\u2663\ufe0f",fitzpatrick_scale:!1,category:"symbols"},hearts:{keywords:["poker","cards","magic","suits"],char:"\u2665\ufe0f",fitzpatrick_scale:!1,category:"symbols"},diamonds:{keywords:["poker","cards","magic","suits"],char:"\u2666\ufe0f",fitzpatrick_scale:!1,category:"symbols"},flower_playing_cards:{keywords:["game","sunset","red"],char:"\u{1f3b4}",fitzpatrick_scale:!1,category:"symbols"},thought_balloon:{keywords:["bubble","cloud","speech","thinking","dream"],char:"\u{1f4ad}",fitzpatrick_scale:!1,category:"symbols"},right_anger_bubble:{keywords:["caption","speech","thinking","mad"],char:"\u{1f5ef}",fitzpatrick_scale:!1,category:"symbols"},speech_balloon:{keywords:["bubble","words","message","talk","chatting"],char:"\u{1f4ac}",fitzpatrick_scale:!1,category:"symbols"},left_speech_bubble:{keywords:["words","message","talk","chatting"],char:"\u{1f5e8}",fitzpatrick_scale:!1,category:"symbols"},clock1:{keywords:["time","late","early","schedule"],char:"\u{1f550}",fitzpatrick_scale:!1,category:"symbols"},clock2:{keywords:["time","late","early","schedule"],char:"\u{1f551}",fitzpatrick_scale:!1,category:"symbols"},clock3:{keywords:["time","late","early","schedule"],char:"\u{1f552}",fitzpatrick_scale:!1,category:"symbols"},clock4:{keywords:["time","late","early","schedule"],char:"\u{1f553}",fitzpatrick_scale:!1,category:"symbols"},clock5:{keywords:["time","late","early","schedule"],char:"\u{1f554}",fitzpatrick_scale:!1,category:"symbols"},clock6:{keywords:["time","late","early","schedule","dawn","dusk"],char:"\u{1f555}",fitzpatrick_scale:!1,category:"symbols"},clock7:{keywords:["time","late","early","schedule"],char:"\u{1f556}",fitzpatrick_scale:!1,category:"symbols"},clock8:{keywords:["time","late","early","schedule"],char:"\u{1f557}",fitzpatrick_scale:!1,category:"symbols"},clock9:{keywords:["time","late","early","schedule"],char:"\u{1f558}",fitzpatrick_scale:!1,category:"symbols"},clock10:{keywords:["time","late","early","schedule"],char:"\u{1f559}",fitzpatrick_scale:!1,category:"symbols"},clock11:{keywords:["time","late","early","schedule"],char:"\u{1f55a}",fitzpatrick_scale:!1,category:"symbols"},clock12:{keywords:["time","noon","midnight","midday","late","early","schedule"],char:"\u{1f55b}",fitzpatrick_scale:!1,category:"symbols"},clock130:{keywords:["time","late","early","schedule"],char:"\u{1f55c}",fitzpatrick_scale:!1,category:"symbols"},clock230:{keywords:["time","late","early","schedule"],char:"\u{1f55d}",fitzpatrick_scale:!1,category:"symbols"},clock330:{keywords:["time","late","early","schedule"],char:"\u{1f55e}",fitzpatrick_scale:!1,category:"symbols"},clock430:{keywords:["time","late","early","schedule"],char:"\u{1f55f}",fitzpatrick_scale:!1,category:"symbols"},clock530:{keywords:["time","late","early","schedule"],char:"\u{1f560}",fitzpatrick_scale:!1,category:"symbols"},clock630:{keywords:["time","late","early","schedule"],char:"\u{1f561}",fitzpatrick_scale:!1,category:"symbols"},clock730:{keywords:["time","late","early","schedule"],char:"\u{1f562}",fitzpatrick_scale:!1,category:"symbols"},clock830:{keywords:["time","late","early","schedule"],char:"\u{1f563}",fitzpatrick_scale:!1,category:"symbols"},clock930:{keywords:["time","late","early","schedule"],char:"\u{1f564}",fitzpatrick_scale:!1,category:"symbols"},clock1030:{keywords:["time","late","early","schedule"],char:"\u{1f565}",fitzpatrick_scale:!1,category:"symbols"},clock1130:{keywords:["time","late","early","schedule"],char:"\u{1f566}",fitzpatrick_scale:!1,category:"symbols"},clock1230:{keywords:["time","late","early","schedule"],char:"\u{1f567}",fitzpatrick_scale:!1,category:"symbols"},afghanistan:{keywords:["af","flag","nation","country","banner"],char:"\u{1f1e6}\u{1f1eb}",fitzpatrick_scale:!1,category:"flags"},aland_islands:{keywords:["\xc5land","islands","flag","nation","country","banner"],char:"\u{1f1e6}\u{1f1fd}",fitzpatrick_scale:!1,category:"flags"},albania:{keywords:["al","flag","nation","country","banner"],char:"\u{1f1e6}\u{1f1f1}",fitzpatrick_scale:!1,category:"flags"},algeria:{keywords:["dz","flag","nation","country","banner"],char:"\u{1f1e9}\u{1f1ff}",fitzpatrick_scale:!1,category:"flags"},american_samoa:{keywords:["american","ws","flag","nation","country","banner"],char:"\u{1f1e6}\u{1f1f8}",fitzpatrick_scale:!1,category:"flags"},andorra:{keywords:["ad","flag","nation","country","banner"],char:"\u{1f1e6}\u{1f1e9}",fitzpatrick_scale:!1,category:"flags"},angola:{keywords:["ao","flag","nation","country","banner"],char:"\u{1f1e6}\u{1f1f4}",fitzpatrick_scale:!1,category:"flags"},anguilla:{keywords:["ai","flag","nation","country","banner"],char:"\u{1f1e6}\u{1f1ee}",fitzpatrick_scale:!1,category:"flags"},antarctica:{keywords:["aq","flag","nation","country","banner"],char:"\u{1f1e6}\u{1f1f6}",fitzpatrick_scale:!1,category:"flags"},antigua_barbuda:{keywords:["antigua","barbuda","flag","nation","country","banner"],char:"\u{1f1e6}\u{1f1ec}",fitzpatrick_scale:!1,category:"flags"},argentina:{keywords:["ar","flag","nation","country","banner"],char:"\u{1f1e6}\u{1f1f7}",fitzpatrick_scale:!1,category:"flags"},armenia:{keywords:["am","flag","nation","country","banner"],char:"\u{1f1e6}\u{1f1f2}",fitzpatrick_scale:!1,category:"flags"},aruba:{keywords:["aw","flag","nation","country","banner"],char:"\u{1f1e6}\u{1f1fc}",fitzpatrick_scale:!1,category:"flags"},australia:{keywords:["au","flag","nation","country","banner"],char:"\u{1f1e6}\u{1f1fa}",fitzpatrick_scale:!1,category:"flags"},austria:{keywords:["at","flag","nation","country","banner"],char:"\u{1f1e6}\u{1f1f9}",fitzpatrick_scale:!1,category:"flags"},azerbaijan:{keywords:["az","flag","nation","country","banner"],char:"\u{1f1e6}\u{1f1ff}",fitzpatrick_scale:!1,category:"flags"},bahamas:{keywords:["bs","flag","nation","country","banner"],char:"\u{1f1e7}\u{1f1f8}",fitzpatrick_scale:!1,category:"flags"},bahrain:{keywords:["bh","flag","nation","country","banner"],char:"\u{1f1e7}\u{1f1ed}",fitzpatrick_scale:!1,category:"flags"},bangladesh:{keywords:["bd","flag","nation","country","banner"],char:"\u{1f1e7}\u{1f1e9}",fitzpatrick_scale:!1,category:"flags"},barbados:{keywords:["bb","flag","nation","country","banner"],char:"\u{1f1e7}\u{1f1e7}",fitzpatrick_scale:!1,category:"flags"},belarus:{keywords:["by","flag","nation","country","banner"],char:"\u{1f1e7}\u{1f1fe}",fitzpatrick_scale:!1,category:"flags"},belgium:{keywords:["be","flag","nation","country","banner"],char:"\u{1f1e7}\u{1f1ea}",fitzpatrick_scale:!1,category:"flags"},belize:{keywords:["bz","flag","nation","country","banner"],char:"\u{1f1e7}\u{1f1ff}",fitzpatrick_scale:!1,category:"flags"},benin:{keywords:["bj","flag","nation","country","banner"],char:"\u{1f1e7}\u{1f1ef}",fitzpatrick_scale:!1,category:"flags"},bermuda:{keywords:["bm","flag","nation","country","banner"],char:"\u{1f1e7}\u{1f1f2}",fitzpatrick_scale:!1,category:"flags"},bhutan:{keywords:["bt","flag","nation","country","banner"],char:"\u{1f1e7}\u{1f1f9}",fitzpatrick_scale:!1,category:"flags"},bolivia:{keywords:["bo","flag","nation","country","banner"],char:"\u{1f1e7}\u{1f1f4}",fitzpatrick_scale:!1,category:"flags"},caribbean_netherlands:{keywords:["bonaire","flag","nation","country","banner"],char:"\u{1f1e7}\u{1f1f6}",fitzpatrick_scale:!1,category:"flags"},bosnia_herzegovina:{keywords:["bosnia","herzegovina","flag","nation","country","banner"],char:"\u{1f1e7}\u{1f1e6}",fitzpatrick_scale:!1,category:"flags"},botswana:{keywords:["bw","flag","nation","country","banner"],char:"\u{1f1e7}\u{1f1fc}",fitzpatrick_scale:!1,category:"flags"},brazil:{keywords:["br","flag","nation","country","banner"],char:"\u{1f1e7}\u{1f1f7}",fitzpatrick_scale:!1,category:"flags"},british_indian_ocean_territory:{keywords:["british","indian","ocean","territory","flag","nation","country","banner"],char:"\u{1f1ee}\u{1f1f4}",fitzpatrick_scale:!1,category:"flags"},british_virgin_islands:{keywords:["british","virgin","islands","bvi","flag","nation","country","banner"],char:"\u{1f1fb}\u{1f1ec}",fitzpatrick_scale:!1,category:"flags"},brunei:{keywords:["bn","darussalam","flag","nation","country","banner"],char:"\u{1f1e7}\u{1f1f3}",fitzpatrick_scale:!1,category:"flags"},bulgaria:{keywords:["bg","flag","nation","country","banner"],char:"\u{1f1e7}\u{1f1ec}",fitzpatrick_scale:!1,category:"flags"},burkina_faso:{keywords:["burkina","faso","flag","nation","country","banner"],char:"\u{1f1e7}\u{1f1eb}",fitzpatrick_scale:!1,category:"flags"},burundi:{keywords:["bi","flag","nation","country","banner"],char:"\u{1f1e7}\u{1f1ee}",fitzpatrick_scale:!1,category:"flags"},cape_verde:{keywords:["cabo","verde","flag","nation","country","banner"],char:"\u{1f1e8}\u{1f1fb}",fitzpatrick_scale:!1,category:"flags"},cambodia:{keywords:["kh","flag","nation","country","banner"],char:"\u{1f1f0}\u{1f1ed}",fitzpatrick_scale:!1,category:"flags"},cameroon:{keywords:["cm","flag","nation","country","banner"],char:"\u{1f1e8}\u{1f1f2}",fitzpatrick_scale:!1,category:"flags"},canada:{keywords:["ca","flag","nation","country","banner"],char:"\u{1f1e8}\u{1f1e6}",fitzpatrick_scale:!1,category:"flags"},canary_islands:{keywords:["canary","islands","flag","nation","country","banner"],char:"\u{1f1ee}\u{1f1e8}",fitzpatrick_scale:!1,category:"flags"},cayman_islands:{keywords:["cayman","islands","flag","nation","country","banner"],char:"\u{1f1f0}\u{1f1fe}",fitzpatrick_scale:!1,category:"flags"},central_african_republic:{keywords:["central","african","republic","flag","nation","country","banner"],char:"\u{1f1e8}\u{1f1eb}",fitzpatrick_scale:!1,category:"flags"},chad:{keywords:["td","flag","nation","country","banner"],char:"\u{1f1f9}\u{1f1e9}",fitzpatrick_scale:!1,category:"flags"},chile:{keywords:["flag","nation","country","banner"],char:"\u{1f1e8}\u{1f1f1}",fitzpatrick_scale:!1,category:"flags"},cn:{keywords:["china","chinese","prc","flag","country","nation","banner"],char:"\u{1f1e8}\u{1f1f3}",fitzpatrick_scale:!1,category:"flags"},christmas_island:{keywords:["christmas","island","flag","nation","country","banner"],char:"\u{1f1e8}\u{1f1fd}",fitzpatrick_scale:!1,category:"flags"},cocos_islands:{keywords:["cocos","keeling","islands","flag","nation","country","banner"],char:"\u{1f1e8}\u{1f1e8}",fitzpatrick_scale:!1,category:"flags"},colombia:{keywords:["co","flag","nation","country","banner"],char:"\u{1f1e8}\u{1f1f4}",fitzpatrick_scale:!1,category:"flags"},comoros:{keywords:["km","flag","nation","country","banner"],char:"\u{1f1f0}\u{1f1f2}",fitzpatrick_scale:!1,category:"flags"},congo_brazzaville:{keywords:["congo","flag","nation","country","banner"],char:"\u{1f1e8}\u{1f1ec}",fitzpatrick_scale:!1,category:"flags"},congo_kinshasa:{keywords:["congo","democratic","republic","flag","nation","country","banner"],char:"\u{1f1e8}\u{1f1e9}",fitzpatrick_scale:!1,category:"flags"},cook_islands:{keywords:["cook","islands","flag","nation","country","banner"],char:"\u{1f1e8}\u{1f1f0}",fitzpatrick_scale:!1,category:"flags"},costa_rica:{keywords:["costa","rica","flag","nation","country","banner"],char:"\u{1f1e8}\u{1f1f7}",fitzpatrick_scale:!1,category:"flags"},croatia:{keywords:["hr","flag","nation","country","banner"],char:"\u{1f1ed}\u{1f1f7}",fitzpatrick_scale:!1,category:"flags"},cuba:{keywords:["cu","flag","nation","country","banner"],char:"\u{1f1e8}\u{1f1fa}",fitzpatrick_scale:!1,category:"flags"},curacao:{keywords:["cura\xe7ao","flag","nation","country","banner"],char:"\u{1f1e8}\u{1f1fc}",fitzpatrick_scale:!1,category:"flags"},cyprus:{keywords:["cy","flag","nation","country","banner"],char:"\u{1f1e8}\u{1f1fe}",fitzpatrick_scale:!1,category:"flags"},czech_republic:{keywords:["cz","flag","nation","country","banner"],char:"\u{1f1e8}\u{1f1ff}",fitzpatrick_scale:!1,category:"flags"},denmark:{keywords:["dk","flag","nation","country","banner"],char:"\u{1f1e9}\u{1f1f0}",fitzpatrick_scale:!1,category:"flags"},djibouti:{keywords:["dj","flag","nation","country","banner"],char:"\u{1f1e9}\u{1f1ef}",fitzpatrick_scale:!1,category:"flags"},dominica:{keywords:["dm","flag","nation","country","banner"],char:"\u{1f1e9}\u{1f1f2}",fitzpatrick_scale:!1,category:"flags"},dominican_republic:{keywords:["dominican","republic","flag","nation","country","banner"],char:"\u{1f1e9}\u{1f1f4}",fitzpatrick_scale:!1,category:"flags"},ecuador:{keywords:["ec","flag","nation","country","banner"],char:"\u{1f1ea}\u{1f1e8}",fitzpatrick_scale:!1,category:"flags"},egypt:{keywords:["eg","flag","nation","country","banner"],char:"\u{1f1ea}\u{1f1ec}",fitzpatrick_scale:!1,category:"flags"},el_salvador:{keywords:["el","salvador","flag","nation","country","banner"],char:"\u{1f1f8}\u{1f1fb}",fitzpatrick_scale:!1,category:"flags"},equatorial_guinea:{keywords:["equatorial","gn","flag","nation","country","banner"],char:"\u{1f1ec}\u{1f1f6}",fitzpatrick_scale:!1,category:"flags"},eritrea:{keywords:["er","flag","nation","country","banner"],char:"\u{1f1ea}\u{1f1f7}",fitzpatrick_scale:!1,category:"flags"},estonia:{keywords:["ee","flag","nation","country","banner"],char:"\u{1f1ea}\u{1f1ea}",fitzpatrick_scale:!1,category:"flags"},ethiopia:{keywords:["et","flag","nation","country","banner"],char:"\u{1f1ea}\u{1f1f9}",fitzpatrick_scale:!1,category:"flags"},eu:{keywords:["european","union","flag","banner"],char:"\u{1f1ea}\u{1f1fa}",fitzpatrick_scale:!1,category:"flags"},falkland_islands:{keywords:["falkland","islands","malvinas","flag","nation","country","banner"],char:"\u{1f1eb}\u{1f1f0}",fitzpatrick_scale:!1,category:"flags"},faroe_islands:{keywords:["faroe","islands","flag","nation","country","banner"],char:"\u{1f1eb}\u{1f1f4}",fitzpatrick_scale:!1,category:"flags"},fiji:{keywords:["fj","flag","nation","country","banner"],char:"\u{1f1eb}\u{1f1ef}",fitzpatrick_scale:!1,category:"flags"},finland:{keywords:["fi","flag","nation","country","banner"],char:"\u{1f1eb}\u{1f1ee}",fitzpatrick_scale:!1,category:"flags"},fr:{keywords:["banner","flag","nation","france","french","country"],char:"\u{1f1eb}\u{1f1f7}",fitzpatrick_scale:!1,category:"flags"},french_guiana:{keywords:["french","guiana","flag","nation","country","banner"],char:"\u{1f1ec}\u{1f1eb}",fitzpatrick_scale:!1,category:"flags"},french_polynesia:{keywords:["french","polynesia","flag","nation","country","banner"],char:"\u{1f1f5}\u{1f1eb}",fitzpatrick_scale:!1,category:"flags"},french_southern_territories:{keywords:["french","southern","territories","flag","nation","country","banner"],char:"\u{1f1f9}\u{1f1eb}",fitzpatrick_scale:!1,category:"flags"},gabon:{keywords:["ga","flag","nation","country","banner"],char:"\u{1f1ec}\u{1f1e6}",fitzpatrick_scale:!1,category:"flags"},gambia:{keywords:["gm","flag","nation","country","banner"],char:"\u{1f1ec}\u{1f1f2}",fitzpatrick_scale:!1,category:"flags"},georgia:{keywords:["ge","flag","nation","country","banner"],char:"\u{1f1ec}\u{1f1ea}",fitzpatrick_scale:!1,category:"flags"},de:{keywords:["german","nation","flag","country","banner"],char:"\u{1f1e9}\u{1f1ea}",fitzpatrick_scale:!1,category:"flags"},ghana:{keywords:["gh","flag","nation","country","banner"],char:"\u{1f1ec}\u{1f1ed}",fitzpatrick_scale:!1,category:"flags"},gibraltar:{keywords:["gi","flag","nation","country","banner"],char:"\u{1f1ec}\u{1f1ee}",fitzpatrick_scale:!1,category:"flags"},greece:{keywords:["gr","flag","nation","country","banner"],char:"\u{1f1ec}\u{1f1f7}",fitzpatrick_scale:!1,category:"flags"},greenland:{keywords:["gl","flag","nation","country","banner"],char:"\u{1f1ec}\u{1f1f1}",fitzpatrick_scale:!1,category:"flags"},grenada:{keywords:["gd","flag","nation","country","banner"],char:"\u{1f1ec}\u{1f1e9}",fitzpatrick_scale:!1,category:"flags"},guadeloupe:{keywords:["gp","flag","nation","country","banner"],char:"\u{1f1ec}\u{1f1f5}",fitzpatrick_scale:!1,category:"flags"},guam:{keywords:["gu","flag","nation","country","banner"],char:"\u{1f1ec}\u{1f1fa}",fitzpatrick_scale:!1,category:"flags"},guatemala:{keywords:["gt","flag","nation","country","banner"],char:"\u{1f1ec}\u{1f1f9}",fitzpatrick_scale:!1,category:"flags"},guernsey:{keywords:["gg","flag","nation","country","banner"],char:"\u{1f1ec}\u{1f1ec}",fitzpatrick_scale:!1,category:"flags"},guinea:{keywords:["gn","flag","nation","country","banner"],char:"\u{1f1ec}\u{1f1f3}",fitzpatrick_scale:!1,category:"flags"},guinea_bissau:{keywords:["gw","bissau","flag","nation","country","banner"],char:"\u{1f1ec}\u{1f1fc}",fitzpatrick_scale:!1,category:"flags"},guyana:{keywords:["gy","flag","nation","country","banner"],char:"\u{1f1ec}\u{1f1fe}",fitzpatrick_scale:!1,category:"flags"},haiti:{keywords:["ht","flag","nation","country","banner"],char:"\u{1f1ed}\u{1f1f9}",fitzpatrick_scale:!1,category:"flags"},honduras:{keywords:["hn","flag","nation","country","banner"],char:"\u{1f1ed}\u{1f1f3}",fitzpatrick_scale:!1,category:"flags"},hong_kong:{keywords:["hong","kong","flag","nation","country","banner"],char:"\u{1f1ed}\u{1f1f0}",fitzpatrick_scale:!1,category:"flags"},hungary:{keywords:["hu","flag","nation","country","banner"],char:"\u{1f1ed}\u{1f1fa}",fitzpatrick_scale:!1,category:"flags"},iceland:{keywords:["is","flag","nation","country","banner"],char:"\u{1f1ee}\u{1f1f8}",fitzpatrick_scale:!1,category:"flags"},india:{keywords:["in","flag","nation","country","banner"],char:"\u{1f1ee}\u{1f1f3}",fitzpatrick_scale:!1,category:"flags"},indonesia:{keywords:["flag","nation","country","banner"],char:"\u{1f1ee}\u{1f1e9}",fitzpatrick_scale:!1,category:"flags"},iran:{keywords:["iran,","islamic","republic","flag","nation","country","banner"],char:"\u{1f1ee}\u{1f1f7}",fitzpatrick_scale:!1,category:"flags"},iraq:{keywords:["iq","flag","nation","country","banner"],char:"\u{1f1ee}\u{1f1f6}",fitzpatrick_scale:!1,category:"flags"},ireland:{keywords:["ie","flag","nation","country","banner"],char:"\u{1f1ee}\u{1f1ea}",fitzpatrick_scale:!1,category:"flags"},isle_of_man:{keywords:["isle","man","flag","nation","country","banner"],char:"\u{1f1ee}\u{1f1f2}",fitzpatrick_scale:!1,category:"flags"},israel:{keywords:["il","flag","nation","country","banner"],char:"\u{1f1ee}\u{1f1f1}",fitzpatrick_scale:!1,category:"flags"},it:{keywords:["italy","flag","nation","country","banner"],char:"\u{1f1ee}\u{1f1f9}",fitzpatrick_scale:!1,category:"flags"},cote_divoire:{keywords:["ivory","coast","flag","nation","country","banner"],char:"\u{1f1e8}\u{1f1ee}",fitzpatrick_scale:!1,category:"flags"},jamaica:{keywords:["jm","flag","nation","country","banner"],char:"\u{1f1ef}\u{1f1f2}",fitzpatrick_scale:!1,category:"flags"},jp:{keywords:["japanese","nation","flag","country","banner"],char:"\u{1f1ef}\u{1f1f5}",fitzpatrick_scale:!1,category:"flags"},jersey:{keywords:["je","flag","nation","country","banner"],char:"\u{1f1ef}\u{1f1ea}",fitzpatrick_scale:!1,category:"flags"},jordan:{keywords:["jo","flag","nation","country","banner"],char:"\u{1f1ef}\u{1f1f4}",fitzpatrick_scale:!1,category:"flags"},kazakhstan:{keywords:["kz","flag","nation","country","banner"],char:"\u{1f1f0}\u{1f1ff}",fitzpatrick_scale:!1,category:"flags"},kenya:{keywords:["ke","flag","nation","country","banner"],char:"\u{1f1f0}\u{1f1ea}",fitzpatrick_scale:!1,category:"flags"},kiribati:{keywords:["ki","flag","nation","country","banner"],char:"\u{1f1f0}\u{1f1ee}",fitzpatrick_scale:!1,category:"flags"},kosovo:{keywords:["xk","flag","nation","country","banner"],char:"\u{1f1fd}\u{1f1f0}",fitzpatrick_scale:!1,category:"flags"},kuwait:{keywords:["kw","flag","nation","country","banner"],char:"\u{1f1f0}\u{1f1fc}",fitzpatrick_scale:!1,category:"flags"},kyrgyzstan:{keywords:["kg","flag","nation","country","banner"],char:"\u{1f1f0}\u{1f1ec}",fitzpatrick_scale:!1,category:"flags"},laos:{keywords:["lao","democratic","republic","flag","nation","country","banner"],char:"\u{1f1f1}\u{1f1e6}",fitzpatrick_scale:!1,category:"flags"},latvia:{keywords:["lv","flag","nation","country","banner"],char:"\u{1f1f1}\u{1f1fb}",fitzpatrick_scale:!1,category:"flags"},lebanon:{keywords:["lb","flag","nation","country","banner"],char:"\u{1f1f1}\u{1f1e7}",fitzpatrick_scale:!1,category:"flags"},lesotho:{keywords:["ls","flag","nation","country","banner"],char:"\u{1f1f1}\u{1f1f8}",fitzpatrick_scale:!1,category:"flags"},liberia:{keywords:["lr","flag","nation","country","banner"],char:"\u{1f1f1}\u{1f1f7}",fitzpatrick_scale:!1,category:"flags"},libya:{keywords:["ly","flag","nation","country","banner"],char:"\u{1f1f1}\u{1f1fe}",fitzpatrick_scale:!1,category:"flags"},liechtenstein:{keywords:["li","flag","nation","country","banner"],char:"\u{1f1f1}\u{1f1ee}",fitzpatrick_scale:!1,category:"flags"},lithuania:{keywords:["lt","flag","nation","country","banner"],char:"\u{1f1f1}\u{1f1f9}",fitzpatrick_scale:!1,category:"flags"},luxembourg:{keywords:["lu","flag","nation","country","banner"],char:"\u{1f1f1}\u{1f1fa}",fitzpatrick_scale:!1,category:"flags"},macau:{keywords:["macao","flag","nation","country","banner"],char:"\u{1f1f2}\u{1f1f4}",fitzpatrick_scale:!1,category:"flags"},macedonia:{keywords:["macedonia,","flag","nation","country","banner"],char:"\u{1f1f2}\u{1f1f0}",fitzpatrick_scale:!1,category:"flags"},madagascar:{keywords:["mg","flag","nation","country","banner"],char:"\u{1f1f2}\u{1f1ec}",fitzpatrick_scale:!1,category:"flags"},malawi:{keywords:["mw","flag","nation","country","banner"],char:"\u{1f1f2}\u{1f1fc}",fitzpatrick_scale:!1,category:"flags"},malaysia:{keywords:["my","flag","nation","country","banner"],char:"\u{1f1f2}\u{1f1fe}",fitzpatrick_scale:!1,category:"flags"},maldives:{keywords:["mv","flag","nation","country","banner"],char:"\u{1f1f2}\u{1f1fb}",fitzpatrick_scale:!1,category:"flags"},mali:{keywords:["ml","flag","nation","country","banner"],char:"\u{1f1f2}\u{1f1f1}",fitzpatrick_scale:!1,category:"flags"},malta:{keywords:["mt","flag","nation","country","banner"],char:"\u{1f1f2}\u{1f1f9}",fitzpatrick_scale:!1,category:"flags"},marshall_islands:{keywords:["marshall","islands","flag","nation","country","banner"],char:"\u{1f1f2}\u{1f1ed}",fitzpatrick_scale:!1,category:"flags"},martinique:{keywords:["mq","flag","nation","country","banner"],char:"\u{1f1f2}\u{1f1f6}",fitzpatrick_scale:!1,category:"flags"},mauritania:{keywords:["mr","flag","nation","country","banner"],char:"\u{1f1f2}\u{1f1f7}",fitzpatrick_scale:!1,category:"flags"},mauritius:{keywords:["mu","flag","nation","country","banner"],char:"\u{1f1f2}\u{1f1fa}",fitzpatrick_scale:!1,category:"flags"},mayotte:{keywords:["yt","flag","nation","country","banner"],char:"\u{1f1fe}\u{1f1f9}",fitzpatrick_scale:!1,category:"flags"},mexico:{keywords:["mx","flag","nation","country","banner"],char:"\u{1f1f2}\u{1f1fd}",fitzpatrick_scale:!1,category:"flags"},micronesia:{keywords:["micronesia,","federated","states","flag","nation","country","banner"],char:"\u{1f1eb}\u{1f1f2}",fitzpatrick_scale:!1,category:"flags"},moldova:{keywords:["moldova,","republic","flag","nation","country","banner"],char:"\u{1f1f2}\u{1f1e9}",fitzpatrick_scale:!1,category:"flags"},monaco:{keywords:["mc","flag","nation","country","banner"],char:"\u{1f1f2}\u{1f1e8}",fitzpatrick_scale:!1,category:"flags"},mongolia:{keywords:["mn","flag","nation","country","banner"],char:"\u{1f1f2}\u{1f1f3}",fitzpatrick_scale:!1,category:"flags"},montenegro:{keywords:["me","flag","nation","country","banner"],char:"\u{1f1f2}\u{1f1ea}",fitzpatrick_scale:!1,category:"flags"},montserrat:{keywords:["ms","flag","nation","country","banner"],char:"\u{1f1f2}\u{1f1f8}",fitzpatrick_scale:!1,category:"flags"},morocco:{keywords:["ma","flag","nation","country","banner"],char:"\u{1f1f2}\u{1f1e6}",fitzpatrick_scale:!1,category:"flags"},mozambique:{keywords:["mz","flag","nation","country","banner"],char:"\u{1f1f2}\u{1f1ff}",fitzpatrick_scale:!1,category:"flags"},myanmar:{keywords:["mm","flag","nation","country","banner"],char:"\u{1f1f2}\u{1f1f2}",fitzpatrick_scale:!1,category:"flags"},namibia:{keywords:["na","flag","nation","country","banner"],char:"\u{1f1f3}\u{1f1e6}",fitzpatrick_scale:!1,category:"flags"},nauru:{keywords:["nr","flag","nation","country","banner"],char:"\u{1f1f3}\u{1f1f7}",fitzpatrick_scale:!1,category:"flags"},nepal:{keywords:["np","flag","nation","country","banner"],char:"\u{1f1f3}\u{1f1f5}",fitzpatrick_scale:!1,category:"flags"},netherlands:{keywords:["nl","flag","nation","country","banner"],char:"\u{1f1f3}\u{1f1f1}",fitzpatrick_scale:!1,category:"flags"},new_caledonia:{keywords:["new","caledonia","flag","nation","country","banner"],char:"\u{1f1f3}\u{1f1e8}",fitzpatrick_scale:!1,category:"flags"},new_zealand:{keywords:["new","zealand","flag","nation","country","banner"],char:"\u{1f1f3}\u{1f1ff}",fitzpatrick_scale:!1,category:"flags"},nicaragua:{keywords:["ni","flag","nation","country","banner"],char:"\u{1f1f3}\u{1f1ee}",fitzpatrick_scale:!1,category:"flags"},niger:{keywords:["ne","flag","nation","country","banner"],char:"\u{1f1f3}\u{1f1ea}",fitzpatrick_scale:!1,category:"flags"},nigeria:{keywords:["flag","nation","country","banner"],char:"\u{1f1f3}\u{1f1ec}",fitzpatrick_scale:!1,category:"flags"},niue:{keywords:["nu","flag","nation","country","banner"],char:"\u{1f1f3}\u{1f1fa}",fitzpatrick_scale:!1,category:"flags"},norfolk_island:{keywords:["norfolk","island","flag","nation","country","banner"],char:"\u{1f1f3}\u{1f1eb}",fitzpatrick_scale:!1,category:"flags"},northern_mariana_islands:{keywords:["northern","mariana","islands","flag","nation","country","banner"],char:"\u{1f1f2}\u{1f1f5}",fitzpatrick_scale:!1,category:"flags"},north_korea:{keywords:["north","korea","nation","flag","country","banner"],char:"\u{1f1f0}\u{1f1f5}",fitzpatrick_scale:!1,category:"flags"},norway:{keywords:["no","flag","nation","country","banner"],char:"\u{1f1f3}\u{1f1f4}",fitzpatrick_scale:!1,category:"flags"},oman:{keywords:["om_symbol","flag","nation","country","banner"],char:"\u{1f1f4}\u{1f1f2}",fitzpatrick_scale:!1,category:"flags"},pakistan:{keywords:["pk","flag","nation","country","banner"],char:"\u{1f1f5}\u{1f1f0}",fitzpatrick_scale:!1,category:"flags"},palau:{keywords:["pw","flag","nation","country","banner"],char:"\u{1f1f5}\u{1f1fc}",fitzpatrick_scale:!1,category:"flags"},palestinian_territories:{keywords:["palestine","palestinian","territories","flag","nation","country","banner"],char:"\u{1f1f5}\u{1f1f8}",fitzpatrick_scale:!1,category:"flags"},panama:{keywords:["pa","flag","nation","country","banner"],char:"\u{1f1f5}\u{1f1e6}",fitzpatrick_scale:!1,category:"flags"},papua_new_guinea:{keywords:["papua","new","guinea","flag","nation","country","banner"],char:"\u{1f1f5}\u{1f1ec}",fitzpatrick_scale:!1,category:"flags"},paraguay:{keywords:["py","flag","nation","country","banner"],char:"\u{1f1f5}\u{1f1fe}",fitzpatrick_scale:!1,category:"flags"},peru:{keywords:["pe","flag","nation","country","banner"],char:"\u{1f1f5}\u{1f1ea}",fitzpatrick_scale:!1,category:"flags"},philippines:{keywords:["ph","flag","nation","country","banner"],char:"\u{1f1f5}\u{1f1ed}",fitzpatrick_scale:!1,category:"flags"},pitcairn_islands:{keywords:["pitcairn","flag","nation","country","banner"],char:"\u{1f1f5}\u{1f1f3}",fitzpatrick_scale:!1,category:"flags"},poland:{keywords:["pl","flag","nation","country","banner"],char:"\u{1f1f5}\u{1f1f1}",fitzpatrick_scale:!1,category:"flags"},portugal:{keywords:["pt","flag","nation","country","banner"],char:"\u{1f1f5}\u{1f1f9}",fitzpatrick_scale:!1,category:"flags"},puerto_rico:{keywords:["puerto","rico","flag","nation","country","banner"],char:"\u{1f1f5}\u{1f1f7}",fitzpatrick_scale:!1,category:"flags"},qatar:{keywords:["qa","flag","nation","country","banner"],char:"\u{1f1f6}\u{1f1e6}",fitzpatrick_scale:!1,category:"flags"},reunion:{keywords:["r\xe9union","flag","nation","country","banner"],char:"\u{1f1f7}\u{1f1ea}",fitzpatrick_scale:!1,category:"flags"},romania:{keywords:["ro","flag","nation","country","banner"],char:"\u{1f1f7}\u{1f1f4}",fitzpatrick_scale:!1,category:"flags"},ru:{keywords:["russian","federation","flag","nation","country","banner"],char:"\u{1f1f7}\u{1f1fa}",fitzpatrick_scale:!1,category:"flags"},rwanda:{keywords:["rw","flag","nation","country","banner"],char:"\u{1f1f7}\u{1f1fc}",fitzpatrick_scale:!1,category:"flags"},st_barthelemy:{keywords:["saint","barth\xe9lemy","flag","nation","country","banner"],char:"\u{1f1e7}\u{1f1f1}",fitzpatrick_scale:!1,category:"flags"},st_helena:{keywords:["saint","helena","ascension","tristan","cunha","flag","nation","country","banner"],char:"\u{1f1f8}\u{1f1ed}",fitzpatrick_scale:!1,category:"flags"},st_kitts_nevis:{keywords:["saint","kitts","nevis","flag","nation","country","banner"],char:"\u{1f1f0}\u{1f1f3}",fitzpatrick_scale:!1,category:"flags"},st_lucia:{keywords:["saint","lucia","flag","nation","country","banner"],char:"\u{1f1f1}\u{1f1e8}",fitzpatrick_scale:!1,category:"flags"},st_pierre_miquelon:{keywords:["saint","pierre","miquelon","flag","nation","country","banner"],char:"\u{1f1f5}\u{1f1f2}",fitzpatrick_scale:!1,category:"flags"},st_vincent_grenadines:{keywords:["saint","vincent","grenadines","flag","nation","country","banner"],char:"\u{1f1fb}\u{1f1e8}",fitzpatrick_scale:!1,category:"flags"},samoa:{keywords:["ws","flag","nation","country","banner"],char:"\u{1f1fc}\u{1f1f8}",fitzpatrick_scale:!1,category:"flags"},san_marino:{keywords:["san","marino","flag","nation","country","banner"],char:"\u{1f1f8}\u{1f1f2}",fitzpatrick_scale:!1,category:"flags"},sao_tome_principe:{keywords:["sao","tome","principe","flag","nation","country","banner"],char:"\u{1f1f8}\u{1f1f9}",fitzpatrick_scale:!1,category:"flags"},saudi_arabia:{keywords:["flag","nation","country","banner"],char:"\u{1f1f8}\u{1f1e6}",fitzpatrick_scale:!1,category:"flags"},senegal:{keywords:["sn","flag","nation","country","banner"],char:"\u{1f1f8}\u{1f1f3}",fitzpatrick_scale:!1,category:"flags"},serbia:{keywords:["rs","flag","nation","country","banner"],char:"\u{1f1f7}\u{1f1f8}",fitzpatrick_scale:!1,category:"flags"},seychelles:{keywords:["sc","flag","nation","country","banner"],char:"\u{1f1f8}\u{1f1e8}",fitzpatrick_scale:!1,category:"flags"},sierra_leone:{keywords:["sierra","leone","flag","nation","country","banner"],char:"\u{1f1f8}\u{1f1f1}",fitzpatrick_scale:!1,category:"flags"},singapore:{keywords:["sg","flag","nation","country","banner"],char:"\u{1f1f8}\u{1f1ec}",fitzpatrick_scale:!1,category:"flags"},sint_maarten:{keywords:["sint","maarten","dutch","flag","nation","country","banner"],char:"\u{1f1f8}\u{1f1fd}",fitzpatrick_scale:!1,category:"flags"},slovakia:{keywords:["sk","flag","nation","country","banner"],char:"\u{1f1f8}\u{1f1f0}",fitzpatrick_scale:!1,category:"flags"},slovenia:{keywords:["si","flag","nation","country","banner"],char:"\u{1f1f8}\u{1f1ee}",fitzpatrick_scale:!1,category:"flags"},solomon_islands:{keywords:["solomon","islands","flag","nation","country","banner"],char:"\u{1f1f8}\u{1f1e7}",fitzpatrick_scale:!1,category:"flags"},somalia:{keywords:["so","flag","nation","country","banner"],char:"\u{1f1f8}\u{1f1f4}",fitzpatrick_scale:!1,category:"flags"},south_africa:{keywords:["south","africa","flag","nation","country","banner"],char:"\u{1f1ff}\u{1f1e6}",fitzpatrick_scale:!1,category:"flags"},south_georgia_south_sandwich_islands:{keywords:["south","georgia","sandwich","islands","flag","nation","country","banner"],char:"\u{1f1ec}\u{1f1f8}",fitzpatrick_scale:!1,category:"flags"},kr:{keywords:["south","korea","nation","flag","country","banner"],char:"\u{1f1f0}\u{1f1f7}",fitzpatrick_scale:!1,category:"flags"},south_sudan:{keywords:["south","sd","flag","nation","country","banner"],char:"\u{1f1f8}\u{1f1f8}",fitzpatrick_scale:!1,category:"flags"},es:{keywords:["spain","flag","nation","country","banner"],char:"\u{1f1ea}\u{1f1f8}",fitzpatrick_scale:!1,category:"flags"},sri_lanka:{keywords:["sri","lanka","flag","nation","country","banner"],char:"\u{1f1f1}\u{1f1f0}",fitzpatrick_scale:!1,category:"flags"},sudan:{keywords:["sd","flag","nation","country","banner"],char:"\u{1f1f8}\u{1f1e9}",fitzpatrick_scale:!1,category:"flags"},suriname:{keywords:["sr","flag","nation","country","banner"],char:"\u{1f1f8}\u{1f1f7}",fitzpatrick_scale:!1,category:"flags"},swaziland:{keywords:["sz","flag","nation","country","banner"],char:"\u{1f1f8}\u{1f1ff}",fitzpatrick_scale:!1,category:"flags"},sweden:{keywords:["se","flag","nation","country","banner"],char:"\u{1f1f8}\u{1f1ea}",fitzpatrick_scale:!1,category:"flags"},switzerland:{keywords:["ch","flag","nation","country","banner"],char:"\u{1f1e8}\u{1f1ed}",fitzpatrick_scale:!1,category:"flags"},syria:{keywords:["syrian","arab","republic","flag","nation","country","banner"],char:"\u{1f1f8}\u{1f1fe}",fitzpatrick_scale:!1,category:"flags"},taiwan:{keywords:["tw","flag","nation","country","banner"],char:"\u{1f1f9}\u{1f1fc}",fitzpatrick_scale:!1,category:"flags"},tajikistan:{keywords:["tj","flag","nation","country","banner"],char:"\u{1f1f9}\u{1f1ef}",fitzpatrick_scale:!1,category:"flags"},tanzania:{keywords:["tanzania,","united","republic","flag","nation","country","banner"],char:"\u{1f1f9}\u{1f1ff}",fitzpatrick_scale:!1,category:"flags"},thailand:{keywords:["th","flag","nation","country","banner"],char:"\u{1f1f9}\u{1f1ed}",fitzpatrick_scale:!1,category:"flags"},timor_leste:{keywords:["timor","leste","flag","nation","country","banner"],char:"\u{1f1f9}\u{1f1f1}",fitzpatrick_scale:!1,category:"flags"},togo:{keywords:["tg","flag","nation","country","banner"],char:"\u{1f1f9}\u{1f1ec}",fitzpatrick_scale:!1,category:"flags"},tokelau:{keywords:["tk","flag","nation","country","banner"],char:"\u{1f1f9}\u{1f1f0}",fitzpatrick_scale:!1,category:"flags"},tonga:{keywords:["to","flag","nation","country","banner"],char:"\u{1f1f9}\u{1f1f4}",fitzpatrick_scale:!1,category:"flags"},trinidad_tobago:{keywords:["trinidad","tobago","flag","nation","country","banner"],char:"\u{1f1f9}\u{1f1f9}",fitzpatrick_scale:!1,category:"flags"},tunisia:{keywords:["tn","flag","nation","country","banner"],char:"\u{1f1f9}\u{1f1f3}",fitzpatrick_scale:!1,category:"flags"},tr:{keywords:["turkey","flag","nation","country","banner"],char:"\u{1f1f9}\u{1f1f7}",fitzpatrick_scale:!1,category:"flags"},turkmenistan:{keywords:["flag","nation","country","banner"],char:"\u{1f1f9}\u{1f1f2}",fitzpatrick_scale:!1,category:"flags"},turks_caicos_islands:{keywords:["turks","caicos","islands","flag","nation","country","banner"],char:"\u{1f1f9}\u{1f1e8}",fitzpatrick_scale:!1,category:"flags"},tuvalu:{keywords:["flag","nation","country","banner"],char:"\u{1f1f9}\u{1f1fb}",fitzpatrick_scale:!1,category:"flags"},uganda:{keywords:["ug","flag","nation","country","banner"],char:"\u{1f1fa}\u{1f1ec}",fitzpatrick_scale:!1,category:"flags"},ukraine:{keywords:["ua","flag","nation","country","banner"],char:"\u{1f1fa}\u{1f1e6}",fitzpatrick_scale:!1,category:"flags"},united_arab_emirates:{keywords:["united","arab","emirates","flag","nation","country","banner"],char:"\u{1f1e6}\u{1f1ea}",fitzpatrick_scale:!1,category:"flags"},uk:{keywords:["united","kingdom","great","britain","northern","ireland","flag","nation","country","banner","british","UK","english","england","union jack"],char:"\u{1f1ec}\u{1f1e7}",fitzpatrick_scale:!1,category:"flags"},england:{keywords:["flag","english"],char:"\u{1f3f4}\u{e0067}\u{e0062}\u{e0065}\u{e006e}\u{e0067}\u{e007f}",fitzpatrick_scale:!1,category:"flags"},scotland:{keywords:["flag","scottish"],char:"\u{1f3f4}\u{e0067}\u{e0062}\u{e0073}\u{e0063}\u{e0074}\u{e007f}",fitzpatrick_scale:!1,category:"flags"},wales:{keywords:["flag","welsh"],char:"\u{1f3f4}\u{e0067}\u{e0062}\u{e0077}\u{e006c}\u{e0073}\u{e007f}",fitzpatrick_scale:!1,category:"flags"},us:{keywords:["united","states","america","flag","nation","country","banner"],char:"\u{1f1fa}\u{1f1f8}",fitzpatrick_scale:!1,category:"flags"},us_virgin_islands:{keywords:["virgin","islands","us","flag","nation","country","banner"],char:"\u{1f1fb}\u{1f1ee}",fitzpatrick_scale:!1,category:"flags"},uruguay:{keywords:["uy","flag","nation","country","banner"],char:"\u{1f1fa}\u{1f1fe}",fitzpatrick_scale:!1,category:"flags"},uzbekistan:{keywords:["uz","flag","nation","country","banner"],char:"\u{1f1fa}\u{1f1ff}",fitzpatrick_scale:!1,category:"flags"},vanuatu:{keywords:["vu","flag","nation","country","banner"],char:"\u{1f1fb}\u{1f1fa}",fitzpatrick_scale:!1,category:"flags"},vatican_city:{keywords:["vatican","city","flag","nation","country","banner"],char:"\u{1f1fb}\u{1f1e6}",fitzpatrick_scale:!1,category:"flags"},venezuela:{keywords:["ve","bolivarian","republic","flag","nation","country","banner"],char:"\u{1f1fb}\u{1f1ea}",fitzpatrick_scale:!1,category:"flags"},vietnam:{keywords:["viet","nam","flag","nation","country","banner"],char:"\u{1f1fb}\u{1f1f3}",fitzpatrick_scale:!1,category:"flags"},wallis_futuna:{keywords:["wallis","futuna","flag","nation","country","banner"],char:"\u{1f1fc}\u{1f1eb}",fitzpatrick_scale:!1,category:"flags"},western_sahara:{keywords:["western","sahara","flag","nation","country","banner"],char:"\u{1f1ea}\u{1f1ed}",fitzpatrick_scale:!1,category:"flags"},yemen:{keywords:["ye","flag","nation","country","banner"],char:"\u{1f1fe}\u{1f1ea}",fitzpatrick_scale:!1,category:"flags"},zambia:{keywords:["zm","flag","nation","country","banner"],char:"\u{1f1ff}\u{1f1f2}",fitzpatrick_scale:!1,category:"flags"},zimbabwe:{keywords:["zw","flag","nation","country","banner"],char:"\u{1f1ff}\u{1f1fc}",fitzpatrick_scale:!1,category:"flags"},united_nations:{keywords:["un","flag","banner"],char:"\u{1f1fa}\u{1f1f3}",fitzpatrick_scale:!1,category:"flags"},pirate_flag:{keywords:["skull","crossbones","flag","banner"],char:"\u{1f3f4}\u200d\u2620\ufe0f",fitzpatrick_scale:!1,category:"flags"}}); \ No newline at end of file diff --git a/vendor/tinymce/tinymce/plugins/emoticons/plugin.js b/vendor/tinymce/tinymce/plugins/emoticons/plugin.js new file mode 100644 index 00000000..4679de1b --- /dev/null +++ b/vendor/tinymce/tinymce/plugins/emoticons/plugin.js @@ -0,0 +1,577 @@ +/** + * TinyMCE version 6.0.2 (2022-04-27) + */ + +(function () { + 'use strict'; + + var global$1 = tinymce.util.Tools.resolve('tinymce.PluginManager'); + + const eq = t => a => t === a; + const isNull = eq(null); + const isNullable = a => a === null || a === undefined; + const isNonNullable = a => !isNullable(a); + + const noop = () => { + }; + const constant = value => { + return () => { + return value; + }; + }; + const never = constant(false); + + class Optional { + constructor(tag, value) { + this.tag = tag; + this.value = value; + } + static some(value) { + return new Optional(true, value); + } + static none() { + return Optional.singletonNone; + } + fold(onNone, onSome) { + if (this.tag) { + return onSome(this.value); + } else { + return onNone(); + } + } + isSome() { + return this.tag; + } + isNone() { + return !this.tag; + } + map(mapper) { + if (this.tag) { + return Optional.some(mapper(this.value)); + } else { + return Optional.none(); + } + } + bind(binder) { + if (this.tag) { + return binder(this.value); + } else { + return Optional.none(); + } + } + exists(predicate) { + return this.tag && predicate(this.value); + } + forall(predicate) { + return !this.tag || predicate(this.value); + } + filter(predicate) { + if (!this.tag || predicate(this.value)) { + return this; + } else { + return Optional.none(); + } + } + getOr(replacement) { + return this.tag ? this.value : replacement; + } + or(replacement) { + return this.tag ? this : replacement; + } + getOrThunk(thunk) { + return this.tag ? this.value : thunk(); + } + orThunk(thunk) { + return this.tag ? this : thunk(); + } + getOrDie(message) { + if (!this.tag) { + throw new Error(message !== null && message !== void 0 ? message : 'Called getOrDie on None'); + } else { + return this.value; + } + } + static from(value) { + return isNonNullable(value) ? Optional.some(value) : Optional.none(); + } + getOrNull() { + return this.tag ? this.value : null; + } + getOrUndefined() { + return this.value; + } + each(worker) { + if (this.tag) { + worker(this.value); + } + } + toArray() { + return this.tag ? [this.value] : []; + } + toString() { + return this.tag ? `some(${ this.value })` : 'none()'; + } + } + Optional.singletonNone = new Optional(false); + + const exists = (xs, pred) => { + for (let i = 0, len = xs.length; i < len; i++) { + const x = xs[i]; + if (pred(x, i)) { + return true; + } + } + return false; + }; + const map$1 = (xs, f) => { + const len = xs.length; + const r = new Array(len); + for (let i = 0; i < len; i++) { + const x = xs[i]; + r[i] = f(x, i); + } + return r; + }; + const each$1 = (xs, f) => { + for (let i = 0, len = xs.length; i < len; i++) { + const x = xs[i]; + f(x, i); + } + }; + + const Cell = initial => { + let value = initial; + const get = () => { + return value; + }; + const set = v => { + value = v; + }; + return { + get, + set + }; + }; + + const last = (fn, rate) => { + let timer = null; + const cancel = () => { + if (!isNull(timer)) { + clearTimeout(timer); + timer = null; + } + }; + const throttle = (...args) => { + cancel(); + timer = setTimeout(() => { + timer = null; + fn.apply(null, args); + }, rate); + }; + return { + cancel, + throttle + }; + }; + + const insertEmoticon = (editor, ch) => { + editor.insertContent(ch); + }; + + const keys = Object.keys; + const hasOwnProperty = Object.hasOwnProperty; + const each = (obj, f) => { + const props = keys(obj); + for (let k = 0, len = props.length; k < len; k++) { + const i = props[k]; + const x = obj[i]; + f(x, i); + } + }; + const map = (obj, f) => { + return tupleMap(obj, (x, i) => ({ + k: i, + v: f(x, i) + })); + }; + const tupleMap = (obj, f) => { + const r = {}; + each(obj, (x, i) => { + const tuple = f(x, i); + r[tuple.k] = tuple.v; + }); + return r; + }; + const has = (obj, key) => hasOwnProperty.call(obj, key); + + const shallow = (old, nu) => { + return nu; + }; + const baseMerge = merger => { + return (...objects) => { + if (objects.length === 0) { + throw new Error(`Can't merge zero objects`); + } + const ret = {}; + for (let j = 0; j < objects.length; j++) { + const curObject = objects[j]; + for (const key in curObject) { + if (has(curObject, key)) { + ret[key] = merger(ret[key], curObject[key]); + } + } + } + return ret; + }; + }; + const merge = baseMerge(shallow); + + const singleton = doRevoke => { + const subject = Cell(Optional.none()); + const revoke = () => subject.get().each(doRevoke); + const clear = () => { + revoke(); + subject.set(Optional.none()); + }; + const isSet = () => subject.get().isSome(); + const get = () => subject.get(); + const set = s => { + revoke(); + subject.set(Optional.some(s)); + }; + return { + clear, + isSet, + get, + set + }; + }; + const value = () => { + const subject = singleton(noop); + const on = f => subject.get().each(f); + return { + ...subject, + on + }; + }; + + const checkRange = (str, substr, start) => substr === '' || str.length >= substr.length && str.substr(start, start + substr.length) === substr; + const contains = (str, substr) => { + return str.indexOf(substr) !== -1; + }; + const startsWith = (str, prefix) => { + return checkRange(str, prefix, 0); + }; + + var global = tinymce.util.Tools.resolve('tinymce.Resource'); + + const DEFAULT_ID = 'tinymce.plugins.emoticons'; + const option = name => editor => editor.options.get(name); + const register$2 = (editor, pluginUrl) => { + const registerOption = editor.options.register; + registerOption('emoticons_database', { + processor: 'string', + default: 'emojis' + }); + registerOption('emoticons_database_url', { + processor: 'string', + default: `${ pluginUrl }/js/${ getEmojiDatabase(editor) }${ editor.suffix }.js` + }); + registerOption('emoticons_database_id', { + processor: 'string', + default: DEFAULT_ID + }); + registerOption('emoticons_append', { + processor: 'object', + default: {} + }); + registerOption('emoticons_images_url', { + processor: 'string', + default: 'https://twemoji.maxcdn.com/v/13.0.1/72x72/' + }); + }; + const getEmojiDatabase = option('emoticons_database'); + const getEmojiDatabaseUrl = option('emoticons_database_url'); + const getEmojiDatabaseId = option('emoticons_database_id'); + const getAppendedEmoji = option('emoticons_append'); + const getEmojiImageUrl = option('emoticons_images_url'); + + const ALL_CATEGORY = 'All'; + const categoryNameMap = { + symbols: 'Symbols', + people: 'People', + animals_and_nature: 'Animals and Nature', + food_and_drink: 'Food and Drink', + activity: 'Activity', + travel_and_places: 'Travel and Places', + objects: 'Objects', + flags: 'Flags', + user: 'User Defined' + }; + const translateCategory = (categories, name) => has(categories, name) ? categories[name] : name; + const getUserDefinedEmoji = editor => { + const userDefinedEmoticons = getAppendedEmoji(editor); + return map(userDefinedEmoticons, value => ({ + keywords: [], + category: 'user', + ...value + })); + }; + const initDatabase = (editor, databaseUrl, databaseId) => { + const categories = value(); + const all = value(); + const emojiImagesUrl = getEmojiImageUrl(editor); + const getEmoji = lib => { + if (startsWith(lib.char, ' `src="${ emojiImagesUrl }${ url }"`); + } else { + return lib.char; + } + }; + const processEmojis = emojis => { + const cats = {}; + const everything = []; + each(emojis, (lib, title) => { + const entry = { + title, + keywords: lib.keywords, + char: getEmoji(lib), + category: translateCategory(categoryNameMap, lib.category) + }; + const current = cats[entry.category] !== undefined ? cats[entry.category] : []; + cats[entry.category] = current.concat([entry]); + everything.push(entry); + }); + categories.set(cats); + all.set(everything); + }; + editor.on('init', () => { + global.load(databaseId, databaseUrl).then(emojis => { + const userEmojis = getUserDefinedEmoji(editor); + processEmojis(merge(emojis, userEmojis)); + }, err => { + console.log(`Failed to load emojis: ${ err }`); + categories.set({}); + all.set([]); + }); + }); + const listCategory = category => { + if (category === ALL_CATEGORY) { + return listAll(); + } + return categories.get().bind(cats => Optional.from(cats[category])).getOr([]); + }; + const listAll = () => all.get().getOr([]); + const listCategories = () => [ALL_CATEGORY].concat(keys(categories.get().getOr({}))); + const waitForLoad = () => { + if (hasLoaded()) { + return Promise.resolve(true); + } else { + return new Promise((resolve, reject) => { + let numRetries = 15; + const interval = setInterval(() => { + if (hasLoaded()) { + clearInterval(interval); + resolve(true); + } else { + numRetries--; + if (numRetries < 0) { + console.log('Could not load emojis from url: ' + databaseUrl); + clearInterval(interval); + reject(false); + } + } + }, 100); + }); + } + }; + const hasLoaded = () => categories.isSet() && all.isSet(); + return { + listCategories, + hasLoaded, + waitForLoad, + listAll, + listCategory + }; + }; + + const emojiMatches = (emoji, lowerCasePattern) => contains(emoji.title.toLowerCase(), lowerCasePattern) || exists(emoji.keywords, k => contains(k.toLowerCase(), lowerCasePattern)); + const emojisFrom = (list, pattern, maxResults) => { + const matches = []; + const lowerCasePattern = pattern.toLowerCase(); + const reachedLimit = maxResults.fold(() => never, max => size => size >= max); + for (let i = 0; i < list.length; i++) { + if (pattern.length === 0 || emojiMatches(list[i], lowerCasePattern)) { + matches.push({ + value: list[i].char, + text: list[i].title, + icon: list[i].char + }); + if (reachedLimit(matches.length)) { + break; + } + } + } + return matches; + }; + + const patternName = 'pattern'; + const open = (editor, database) => { + const initialState = { + pattern: '', + results: emojisFrom(database.listAll(), '', Optional.some(300)) + }; + const currentTab = Cell(ALL_CATEGORY); + const scan = dialogApi => { + const dialogData = dialogApi.getData(); + const category = currentTab.get(); + const candidates = database.listCategory(category); + const results = emojisFrom(candidates, dialogData[patternName], category === ALL_CATEGORY ? Optional.some(300) : Optional.none()); + dialogApi.setData({ results }); + }; + const updateFilter = last(dialogApi => { + scan(dialogApi); + }, 200); + const searchField = { + label: 'Search', + type: 'input', + name: patternName + }; + const resultsField = { + type: 'collection', + name: 'results' + }; + const getInitialState = () => { + const body = { + type: 'tabpanel', + tabs: map$1(database.listCategories(), cat => ({ + title: cat, + name: cat, + items: [ + searchField, + resultsField + ] + })) + }; + return { + title: 'Emojis', + size: 'normal', + body, + initialData: initialState, + onTabChange: (dialogApi, details) => { + currentTab.set(details.newTabName); + updateFilter.throttle(dialogApi); + }, + onChange: updateFilter.throttle, + onAction: (dialogApi, actionData) => { + if (actionData.name === 'results') { + insertEmoticon(editor, actionData.value); + dialogApi.close(); + } + }, + buttons: [{ + type: 'cancel', + text: 'Close', + primary: true + }] + }; + }; + const dialogApi = editor.windowManager.open(getInitialState()); + dialogApi.focus(patternName); + if (!database.hasLoaded()) { + dialogApi.block('Loading emojis...'); + database.waitForLoad().then(() => { + dialogApi.redial(getInitialState()); + updateFilter.throttle(dialogApi); + dialogApi.focus(patternName); + dialogApi.unblock(); + }).catch(_err => { + dialogApi.redial({ + title: 'Emojis', + body: { + type: 'panel', + items: [{ + type: 'alertbanner', + level: 'error', + icon: 'warning', + text: 'Could not load emojis' + }] + }, + buttons: [{ + type: 'cancel', + text: 'Close', + primary: true + }], + initialData: { + pattern: '', + results: [] + } + }); + dialogApi.focus(patternName); + dialogApi.unblock(); + }); + } + }; + + const register$1 = (editor, database) => { + editor.addCommand('mceEmoticons', () => open(editor, database)); + }; + + const setup = editor => { + editor.on('PreInit', () => { + editor.parser.addAttributeFilter('data-emoticon', nodes => { + each$1(nodes, node => { + node.attr('data-mce-resize', 'false'); + node.attr('data-mce-placeholder', '1'); + }); + }); + }); + }; + + const init = (editor, database) => { + editor.ui.registry.addAutocompleter('emoticons', { + ch: ':', + columns: 'auto', + minChars: 2, + fetch: (pattern, maxResults) => database.waitForLoad().then(() => { + const candidates = database.listAll(); + return emojisFrom(candidates, pattern, Optional.some(maxResults)); + }), + onAction: (autocompleteApi, rng, value) => { + editor.selection.setRng(rng); + editor.insertContent(value); + autocompleteApi.hide(); + } + }); + }; + + const register = editor => { + const onAction = () => editor.execCommand('mceEmoticons'); + editor.ui.registry.addButton('emoticons', { + tooltip: 'Emojis', + icon: 'emoji', + onAction + }); + editor.ui.registry.addMenuItem('emoticons', { + text: 'Emojis...', + icon: 'emoji', + onAction + }); + }; + + var Plugin = () => { + global$1.add('emoticons', (editor, pluginUrl) => { + register$2(editor, pluginUrl); + const databaseUrl = getEmojiDatabaseUrl(editor); + const databaseId = getEmojiDatabaseId(editor); + const database = initDatabase(editor, databaseUrl, databaseId); + register$1(editor, database); + register(editor); + init(editor, database); + setup(editor); + }); + }; + + Plugin(); + +})(); diff --git a/vendor/tinymce/tinymce/plugins/emoticons/plugin.min.js b/vendor/tinymce/tinymce/plugins/emoticons/plugin.min.js new file mode 100644 index 00000000..20942595 --- /dev/null +++ b/vendor/tinymce/tinymce/plugins/emoticons/plugin.min.js @@ -0,0 +1,4 @@ +/** + * TinyMCE version 6.0.2 (2022-04-27) + */ +!function(){"use strict";var t=tinymce.util.Tools.resolve("tinymce.PluginManager");const e=(null,t=>null===t);const o=()=>{},n=()=>!1;class s{constructor(t,e){this.tag=t,this.value=e}static some(t){return new s(!0,t)}static none(){return s.singletonNone}fold(t,e){return this.tag?e(this.value):t()}isSome(){return this.tag}isNone(){return!this.tag}map(t){return this.tag?s.some(t(this.value)):s.none()}bind(t){return this.tag?t(this.value):s.none()}exists(t){return this.tag&&t(this.value)}forall(t){return!this.tag||t(this.value)}filter(t){return!this.tag||t(this.value)?this:s.none()}getOr(t){return this.tag?this.value:t}or(t){return this.tag?this:t}getOrThunk(t){return this.tag?this.value:t()}orThunk(t){return this.tag?this:t()}getOrDie(t){if(this.tag)return this.value;throw new Error(null!=t?t:"Called getOrDie on None")}static from(t){return null==t?s.none():s.some(t)}getOrNull(){return this.tag?this.value:null}getOrUndefined(){return this.value}each(t){this.tag&&t(this.value)}toArray(){return this.tag?[this.value]:[]}toString(){return this.tag?`some(${this.value})`:"none()"}}s.singletonNone=new s(!1);const r=(t,e)=>{const o=t.length,n=new Array(o);for(let s=0;s{let e=t;return{get:()=>e,set:t=>{e=t}}},i=Object.keys,l=Object.hasOwnProperty,c=(t,e)=>{const o=i(t);for(let n=0,s=o.length;nl.call(t,e),g=(m=(t,e)=>e,(...t)=>{if(0===t.length)throw new Error("Can't merge zero objects");const e={};for(let o=0;o{const t=(t=>{const e=a(s.none()),o=()=>e.get().each(t);return{clear:()=>{o(),e.set(s.none())},isSet:()=>e.get().isSome(),get:()=>e.get(),set:t=>{o(),e.set(s.some(t))}}})(o);return{...t,on:e=>t.get().each(e)}},d=(t,e)=>-1!==t.indexOf(e);var p=tinymce.util.Tools.resolve("tinymce.Resource");const y=t=>e=>e.options.get(t),v=y("emoticons_database"),f=y("emoticons_database_url"),b=y("emoticons_database_id"),w=y("emoticons_append"),_=y("emoticons_images_url"),j="All",C={symbols:"Symbols",people:"People",animals_and_nature:"Animals and Nature",food_and_drink:"Food and Drink",activity:"Activity",travel_and_places:"Travel and Places",objects:"Objects",flags:"Flags",user:"User Defined"},k=(t,e)=>u(t,e)?t[e]:e,A=t=>{const e=w(t);return o=t=>({keywords:[],category:"user",...t}),((t,e)=>{const o={};return c(t,((t,n)=>{const s=e(t,n);o[s.k]=s.v})),o})(e,((t,e)=>({k:e,v:o(t)})));var o},O=(t,e)=>d(t.title.toLowerCase(),e)||((t,o)=>{for(let o=0,s=t.length;o{const s=[],r=e.toLowerCase(),a=o.fold((()=>n),(t=>e=>e>=t));for(let o=0;o{const n={pattern:"",results:x(o.listAll(),"",s.some(300))},i=a(j),l=((t,o)=>{let n=null;const s=()=>{e(n)||(clearTimeout(n),n=null)};return{cancel:s,throttle:(...e)=>{s(),n=setTimeout((()=>{n=null,t.apply(null,e)}),200)}}})((t=>{(t=>{const e=t.getData(),n=i.get(),r=o.listCategory(n),a=x(r,e.pattern,n===j?s.some(300):s.none());t.setData({results:a})})(t)})),c={label:"Search",type:"input",name:L},u={type:"collection",name:"results"},g=()=>({title:"Emojis",size:"normal",body:{type:"tabpanel",tabs:r(o.listCategories(),(t=>({title:t,name:t,items:[c,u]})))},initialData:n,onTabChange:(t,e)=>{i.set(e.newTabName),l.throttle(t)},onChange:l.throttle,onAction:(e,o)=>{"results"===o.name&&(((t,e)=>{t.insertContent(e)})(t,o.value),e.close())},buttons:[{type:"cancel",text:"Close",primary:!0}]}),m=t.windowManager.open(g());m.focus(L),o.hasLoaded()||(m.block("Loading emojis..."),o.waitForLoad().then((()=>{m.redial(g()),l.throttle(m),m.focus(L),m.unblock()})).catch((t=>{m.redial({title:"Emojis",body:{type:"panel",items:[{type:"alertbanner",level:"error",icon:"warning",text:"Could not load emojis"}]},buttons:[{type:"cancel",text:"Close",primary:!0}],initialData:{pattern:"",results:[]}}),m.focus(L),m.unblock()})))};t.add("emoticons",((t,e)=>{((t,e)=>{const o=t.options.register;o("emoticons_database",{processor:"string",default:"emojis"}),o("emoticons_database_url",{processor:"string",default:`${e}/js/${v(t)}${t.suffix}.js`}),o("emoticons_database_id",{processor:"string",default:"tinymce.plugins.emoticons"}),o("emoticons_append",{processor:"object",default:{}}),o("emoticons_images_url",{processor:"string",default:"https://twemoji.maxcdn.com/v/13.0.1/72x72/"})})(t,e);const o=((t,e,o)=>{const n=h(),r=h(),a=_(t),l=t=>{return o="=o.length&&e.substr(0,0+o.length)===o?t.char.replace(/src="([^"]+)"/,((t,e)=>`src="${a}${e}"`)):t.char;var e,o};t.on("init",(()=>{p.load(o,e).then((e=>{const o=A(t);(t=>{const e={},o=[];c(t,((t,n)=>{const s={title:n,keywords:t.keywords,char:l(t),category:k(C,t.category)},r=void 0!==e[s.category]?e[s.category]:[];e[s.category]=r.concat([s]),o.push(s)})),n.set(e),r.set(o)})(g(e,o))}),(t=>{console.log(`Failed to load emojis: ${t}`),n.set({}),r.set([])}))}));const u=()=>r.get().getOr([]),m=()=>n.isSet()&&r.isSet();return{listCategories:()=>[j].concat(i(n.get().getOr({}))),hasLoaded:m,waitForLoad:()=>m()?Promise.resolve(!0):new Promise(((t,o)=>{let n=15;const s=setInterval((()=>{m()?(clearInterval(s),t(!0)):(n--,n<0&&(console.log("Could not load emojis from url: "+e),clearInterval(s),o(!1)))}),100)})),listAll:u,listCategory:t=>t===j?u():n.get().bind((e=>s.from(e[t]))).getOr([])}})(t,f(t),b(t));((t,e)=>{t.addCommand("mceEmoticons",(()=>T(t,e)))})(t,o),(t=>{const e=()=>t.execCommand("mceEmoticons");t.ui.registry.addButton("emoticons",{tooltip:"Emojis",icon:"emoji",onAction:e}),t.ui.registry.addMenuItem("emoticons",{text:"Emojis...",icon:"emoji",onAction:e})})(t),((t,e)=>{t.ui.registry.addAutocompleter("emoticons",{ch:":",columns:"auto",minChars:2,fetch:(t,o)=>e.waitForLoad().then((()=>{const n=e.listAll();return x(n,t,s.some(o))})),onAction:(e,o,n)=>{t.selection.setRng(o),t.insertContent(n),e.hide()}})})(t,o),(t=>{t.on("PreInit",(()=>{t.parser.addAttributeFilter("data-emoticon",(t=>{((t,e)=>{for(let e=0,n=t.length;e { + let value = initial; + const get = () => { + return value; + }; + const set = v => { + value = v; + }; + return { + get, + set + }; + }; + + var global$2 = tinymce.util.Tools.resolve('tinymce.PluginManager'); + + const get$5 = fullscreenState => ({ isFullscreen: () => fullscreenState.get() !== null }); + + const hasProto = (v, constructor, predicate) => { + var _a; + if (predicate(v, constructor.prototype)) { + return true; + } else { + return ((_a = v.constructor) === null || _a === void 0 ? void 0 : _a.name) === constructor.name; + } + }; + const typeOf = x => { + const t = typeof x; + if (x === null) { + return 'null'; + } else if (t === 'object' && Array.isArray(x)) { + return 'array'; + } else if (t === 'object' && hasProto(x, String, (o, proto) => proto.isPrototypeOf(o))) { + return 'string'; + } else { + return t; + } + }; + const isType$1 = type => value => typeOf(value) === type; + const isSimpleType = type => value => typeof value === type; + const eq$1 = t => a => t === a; + const isString = isType$1('string'); + const isArray = isType$1('array'); + const isNull = eq$1(null); + const isBoolean = isSimpleType('boolean'); + const isNullable = a => a === null || a === undefined; + const isNonNullable = a => !isNullable(a); + const isFunction = isSimpleType('function'); + const isNumber = isSimpleType('number'); + + const noop = () => { + }; + const compose = (fa, fb) => { + return (...args) => { + return fa(fb.apply(null, args)); + }; + }; + const compose1 = (fbc, fab) => a => fbc(fab(a)); + const constant = value => { + return () => { + return value; + }; + }; + function curry(fn, ...initialArgs) { + return (...restArgs) => { + const all = initialArgs.concat(restArgs); + return fn.apply(null, all); + }; + } + const never = constant(false); + const always = constant(true); + + class Optional { + constructor(tag, value) { + this.tag = tag; + this.value = value; + } + static some(value) { + return new Optional(true, value); + } + static none() { + return Optional.singletonNone; + } + fold(onNone, onSome) { + if (this.tag) { + return onSome(this.value); + } else { + return onNone(); + } + } + isSome() { + return this.tag; + } + isNone() { + return !this.tag; + } + map(mapper) { + if (this.tag) { + return Optional.some(mapper(this.value)); + } else { + return Optional.none(); + } + } + bind(binder) { + if (this.tag) { + return binder(this.value); + } else { + return Optional.none(); + } + } + exists(predicate) { + return this.tag && predicate(this.value); + } + forall(predicate) { + return !this.tag || predicate(this.value); + } + filter(predicate) { + if (!this.tag || predicate(this.value)) { + return this; + } else { + return Optional.none(); + } + } + getOr(replacement) { + return this.tag ? this.value : replacement; + } + or(replacement) { + return this.tag ? this : replacement; + } + getOrThunk(thunk) { + return this.tag ? this.value : thunk(); + } + orThunk(thunk) { + return this.tag ? this : thunk(); + } + getOrDie(message) { + if (!this.tag) { + throw new Error(message !== null && message !== void 0 ? message : 'Called getOrDie on None'); + } else { + return this.value; + } + } + static from(value) { + return isNonNullable(value) ? Optional.some(value) : Optional.none(); + } + getOrNull() { + return this.tag ? this.value : null; + } + getOrUndefined() { + return this.value; + } + each(worker) { + if (this.tag) { + worker(this.value); + } + } + toArray() { + return this.tag ? [this.value] : []; + } + toString() { + return this.tag ? `some(${ this.value })` : 'none()'; + } + } + Optional.singletonNone = new Optional(false); + + const singleton = doRevoke => { + const subject = Cell(Optional.none()); + const revoke = () => subject.get().each(doRevoke); + const clear = () => { + revoke(); + subject.set(Optional.none()); + }; + const isSet = () => subject.get().isSome(); + const get = () => subject.get(); + const set = s => { + revoke(); + subject.set(Optional.some(s)); + }; + return { + clear, + isSet, + get, + set + }; + }; + const unbindable = () => singleton(s => s.unbind()); + const value = () => { + const subject = singleton(noop); + const on = f => subject.get().each(f); + return { + ...subject, + on + }; + }; + + const first = (fn, rate) => { + let timer = null; + const cancel = () => { + if (!isNull(timer)) { + clearTimeout(timer); + timer = null; + } + }; + const throttle = (...args) => { + if (isNull(timer)) { + timer = setTimeout(() => { + timer = null; + fn.apply(null, args); + }, rate); + } + }; + return { + cancel, + throttle + }; + }; + + const nativePush = Array.prototype.push; + const map = (xs, f) => { + const len = xs.length; + const r = new Array(len); + for (let i = 0; i < len; i++) { + const x = xs[i]; + r[i] = f(x, i); + } + return r; + }; + const each$1 = (xs, f) => { + for (let i = 0, len = xs.length; i < len; i++) { + const x = xs[i]; + f(x, i); + } + }; + const filter$1 = (xs, pred) => { + const r = []; + for (let i = 0, len = xs.length; i < len; i++) { + const x = xs[i]; + if (pred(x, i)) { + r.push(x); + } + } + return r; + }; + const findUntil = (xs, pred, until) => { + for (let i = 0, len = xs.length; i < len; i++) { + const x = xs[i]; + if (pred(x, i)) { + return Optional.some(x); + } else if (until(x, i)) { + break; + } + } + return Optional.none(); + }; + const find$1 = (xs, pred) => { + return findUntil(xs, pred, never); + }; + const flatten = xs => { + const r = []; + for (let i = 0, len = xs.length; i < len; ++i) { + if (!isArray(xs[i])) { + throw new Error('Arr.flatten item ' + i + ' was not an array, input: ' + xs); + } + nativePush.apply(r, xs[i]); + } + return r; + }; + const bind$3 = (xs, f) => flatten(map(xs, f)); + const get$4 = (xs, i) => i >= 0 && i < xs.length ? Optional.some(xs[i]) : Optional.none(); + const head = xs => get$4(xs, 0); + const findMap = (arr, f) => { + for (let i = 0; i < arr.length; i++) { + const r = f(arr[i], i); + if (r.isSome()) { + return r; + } + } + return Optional.none(); + }; + + const keys = Object.keys; + const each = (obj, f) => { + const props = keys(obj); + for (let k = 0, len = props.length; k < len; k++) { + const i = props[k]; + const x = obj[i]; + f(x, i); + } + }; + + const contains = (str, substr) => { + return str.indexOf(substr) !== -1; + }; + + const isSupported$1 = dom => dom.style !== undefined && isFunction(dom.style.getPropertyValue); + + const fromHtml = (html, scope) => { + const doc = scope || document; + const div = doc.createElement('div'); + div.innerHTML = html; + if (!div.hasChildNodes() || div.childNodes.length > 1) { + const message = 'HTML does not have a single root node'; + console.error(message, html); + throw new Error(message); + } + return fromDom(div.childNodes[0]); + }; + const fromTag = (tag, scope) => { + const doc = scope || document; + const node = doc.createElement(tag); + return fromDom(node); + }; + const fromText = (text, scope) => { + const doc = scope || document; + const node = doc.createTextNode(text); + return fromDom(node); + }; + const fromDom = node => { + if (node === null || node === undefined) { + throw new Error('Node cannot be null or undefined'); + } + return { dom: node }; + }; + const fromPoint = (docElm, x, y) => Optional.from(docElm.dom.elementFromPoint(x, y)).map(fromDom); + const SugarElement = { + fromHtml, + fromTag, + fromText, + fromDom, + fromPoint + }; + + typeof window !== 'undefined' ? window : Function('return this;')(); + + const DOCUMENT = 9; + const DOCUMENT_FRAGMENT = 11; + const ELEMENT = 1; + const TEXT = 3; + + const type = element => element.dom.nodeType; + const isType = t => element => type(element) === t; + const isElement = isType(ELEMENT); + const isText = isType(TEXT); + const isDocument = isType(DOCUMENT); + const isDocumentFragment = isType(DOCUMENT_FRAGMENT); + + const is = (element, selector) => { + const dom = element.dom; + if (dom.nodeType !== ELEMENT) { + return false; + } else { + const elem = dom; + if (elem.matches !== undefined) { + return elem.matches(selector); + } else if (elem.msMatchesSelector !== undefined) { + return elem.msMatchesSelector(selector); + } else if (elem.webkitMatchesSelector !== undefined) { + return elem.webkitMatchesSelector(selector); + } else if (elem.mozMatchesSelector !== undefined) { + return elem.mozMatchesSelector(selector); + } else { + throw new Error('Browser lacks native selectors'); + } + } + }; + const bypassSelector = dom => dom.nodeType !== ELEMENT && dom.nodeType !== DOCUMENT && dom.nodeType !== DOCUMENT_FRAGMENT || dom.childElementCount === 0; + const all$1 = (selector, scope) => { + const base = scope === undefined ? document : scope.dom; + return bypassSelector(base) ? [] : map(base.querySelectorAll(selector), SugarElement.fromDom); + }; + + const eq = (e1, e2) => e1.dom === e2.dom; + + const owner = element => SugarElement.fromDom(element.dom.ownerDocument); + const documentOrOwner = dos => isDocument(dos) ? dos : owner(dos); + const parent = element => Optional.from(element.dom.parentNode).map(SugarElement.fromDom); + const parents = (element, isRoot) => { + const stop = isFunction(isRoot) ? isRoot : never; + let dom = element.dom; + const ret = []; + while (dom.parentNode !== null && dom.parentNode !== undefined) { + const rawParent = dom.parentNode; + const p = SugarElement.fromDom(rawParent); + ret.push(p); + if (stop(p) === true) { + break; + } else { + dom = rawParent; + } + } + return ret; + }; + const siblings$2 = element => { + const filterSelf = elements => filter$1(elements, x => !eq(element, x)); + return parent(element).map(children).map(filterSelf).getOr([]); + }; + const children = element => map(element.dom.childNodes, SugarElement.fromDom); + + const isShadowRoot = dos => isDocumentFragment(dos) && isNonNullable(dos.dom.host); + const supported = isFunction(Element.prototype.attachShadow) && isFunction(Node.prototype.getRootNode); + const isSupported = constant(supported); + const getRootNode = supported ? e => SugarElement.fromDom(e.dom.getRootNode()) : documentOrOwner; + const getShadowRoot = e => { + const r = getRootNode(e); + return isShadowRoot(r) ? Optional.some(r) : Optional.none(); + }; + const getShadowHost = e => SugarElement.fromDom(e.dom.host); + const getOriginalEventTarget = event => { + if (isSupported() && isNonNullable(event.target)) { + const el = SugarElement.fromDom(event.target); + if (isElement(el) && isOpenShadowHost(el)) { + if (event.composed && event.composedPath) { + const composedPath = event.composedPath(); + if (composedPath) { + return head(composedPath); + } + } + } + } + return Optional.from(event.target); + }; + const isOpenShadowHost = element => isNonNullable(element.dom.shadowRoot); + + const inBody = element => { + const dom = isText(element) ? element.dom.parentNode : element.dom; + if (dom === undefined || dom === null || dom.ownerDocument === null) { + return false; + } + const doc = dom.ownerDocument; + return getShadowRoot(SugarElement.fromDom(dom)).fold(() => doc.body.contains(dom), compose1(inBody, getShadowHost)); + }; + const getBody = doc => { + const b = doc.dom.body; + if (b === null || b === undefined) { + throw new Error('Body is not available yet'); + } + return SugarElement.fromDom(b); + }; + + const rawSet = (dom, key, value) => { + if (isString(value) || isBoolean(value) || isNumber(value)) { + dom.setAttribute(key, value + ''); + } else { + console.error('Invalid call to Attribute.set. Key ', key, ':: Value ', value, ':: Element ', dom); + throw new Error('Attribute value was not simple'); + } + }; + const set = (element, key, value) => { + rawSet(element.dom, key, value); + }; + const get$3 = (element, key) => { + const v = element.dom.getAttribute(key); + return v === null ? undefined : v; + }; + const remove = (element, key) => { + element.dom.removeAttribute(key); + }; + + const internalSet = (dom, property, value) => { + if (!isString(value)) { + console.error('Invalid call to CSS.set. Property ', property, ':: Value ', value, ':: Element ', dom); + throw new Error('CSS value must be a string: ' + value); + } + if (isSupported$1(dom)) { + dom.style.setProperty(property, value); + } + }; + const setAll = (element, css) => { + const dom = element.dom; + each(css, (v, k) => { + internalSet(dom, k, v); + }); + }; + const get$2 = (element, property) => { + const dom = element.dom; + const styles = window.getComputedStyle(dom); + const r = styles.getPropertyValue(property); + return r === '' && !inBody(element) ? getUnsafeProperty(dom, property) : r; + }; + const getUnsafeProperty = (dom, property) => isSupported$1(dom) ? dom.style.getPropertyValue(property) : ''; + + const mkEvent = (target, x, y, stop, prevent, kill, raw) => ({ + target, + x, + y, + stop, + prevent, + kill, + raw + }); + const fromRawEvent = rawEvent => { + const target = SugarElement.fromDom(getOriginalEventTarget(rawEvent).getOr(rawEvent.target)); + const stop = () => rawEvent.stopPropagation(); + const prevent = () => rawEvent.preventDefault(); + const kill = compose(prevent, stop); + return mkEvent(target, rawEvent.clientX, rawEvent.clientY, stop, prevent, kill, rawEvent); + }; + const handle = (filter, handler) => rawEvent => { + if (filter(rawEvent)) { + handler(fromRawEvent(rawEvent)); + } + }; + const binder = (element, event, filter, handler, useCapture) => { + const wrapped = handle(filter, handler); + element.dom.addEventListener(event, wrapped, useCapture); + return { unbind: curry(unbind, element, event, wrapped, useCapture) }; + }; + const bind$2 = (element, event, filter, handler) => binder(element, event, filter, handler, false); + const unbind = (element, event, handler, useCapture) => { + element.dom.removeEventListener(event, handler, useCapture); + }; + + const filter = always; + const bind$1 = (element, event, handler) => bind$2(element, event, filter, handler); + + const cached = f => { + let called = false; + let r; + return (...args) => { + if (!called) { + called = true; + r = f.apply(null, args); + } + return r; + }; + }; + + const DeviceType = (os, browser, userAgent, mediaMatch) => { + const isiPad = os.isiOS() && /ipad/i.test(userAgent) === true; + const isiPhone = os.isiOS() && !isiPad; + const isMobile = os.isiOS() || os.isAndroid(); + const isTouch = isMobile || mediaMatch('(pointer:coarse)'); + const isTablet = isiPad || !isiPhone && isMobile && mediaMatch('(min-device-width:768px)'); + const isPhone = isiPhone || isMobile && !isTablet; + const iOSwebview = browser.isSafari() && os.isiOS() && /safari/i.test(userAgent) === false; + const isDesktop = !isPhone && !isTablet && !iOSwebview; + return { + isiPad: constant(isiPad), + isiPhone: constant(isiPhone), + isTablet: constant(isTablet), + isPhone: constant(isPhone), + isTouch: constant(isTouch), + isAndroid: os.isAndroid, + isiOS: os.isiOS, + isWebView: constant(iOSwebview), + isDesktop: constant(isDesktop) + }; + }; + + const firstMatch = (regexes, s) => { + for (let i = 0; i < regexes.length; i++) { + const x = regexes[i]; + if (x.test(s)) { + return x; + } + } + return undefined; + }; + const find = (regexes, agent) => { + const r = firstMatch(regexes, agent); + if (!r) { + return { + major: 0, + minor: 0 + }; + } + const group = i => { + return Number(agent.replace(r, '$' + i)); + }; + return nu$2(group(1), group(2)); + }; + const detect$3 = (versionRegexes, agent) => { + const cleanedAgent = String(agent).toLowerCase(); + if (versionRegexes.length === 0) { + return unknown$2(); + } + return find(versionRegexes, cleanedAgent); + }; + const unknown$2 = () => { + return nu$2(0, 0); + }; + const nu$2 = (major, minor) => { + return { + major, + minor + }; + }; + const Version = { + nu: nu$2, + detect: detect$3, + unknown: unknown$2 + }; + + const detectBrowser$1 = (browsers, userAgentData) => { + return findMap(userAgentData.brands, uaBrand => { + const lcBrand = uaBrand.brand.toLowerCase(); + return find$1(browsers, browser => { + var _a; + return lcBrand === ((_a = browser.brand) === null || _a === void 0 ? void 0 : _a.toLowerCase()); + }).map(info => ({ + current: info.name, + version: Version.nu(parseInt(uaBrand.version, 10), 0) + })); + }); + }; + + const detect$2 = (candidates, userAgent) => { + const agent = String(userAgent).toLowerCase(); + return find$1(candidates, candidate => { + return candidate.search(agent); + }); + }; + const detectBrowser = (browsers, userAgent) => { + return detect$2(browsers, userAgent).map(browser => { + const version = Version.detect(browser.versionRegexes, userAgent); + return { + current: browser.name, + version + }; + }); + }; + const detectOs = (oses, userAgent) => { + return detect$2(oses, userAgent).map(os => { + const version = Version.detect(os.versionRegexes, userAgent); + return { + current: os.name, + version + }; + }); + }; + + const normalVersionRegex = /.*?version\/\ ?([0-9]+)\.([0-9]+).*/; + const checkContains = target => { + return uastring => { + return contains(uastring, target); + }; + }; + const browsers = [ + { + name: 'Edge', + versionRegexes: [/.*?edge\/ ?([0-9]+)\.([0-9]+)$/], + search: uastring => { + return contains(uastring, 'edge/') && contains(uastring, 'chrome') && contains(uastring, 'safari') && contains(uastring, 'applewebkit'); + } + }, + { + name: 'Chromium', + brand: 'Chromium', + versionRegexes: [ + /.*?chrome\/([0-9]+)\.([0-9]+).*/, + normalVersionRegex + ], + search: uastring => { + return contains(uastring, 'chrome') && !contains(uastring, 'chromeframe'); + } + }, + { + name: 'IE', + versionRegexes: [ + /.*?msie\ ?([0-9]+)\.([0-9]+).*/, + /.*?rv:([0-9]+)\.([0-9]+).*/ + ], + search: uastring => { + return contains(uastring, 'msie') || contains(uastring, 'trident'); + } + }, + { + name: 'Opera', + versionRegexes: [ + normalVersionRegex, + /.*?opera\/([0-9]+)\.([0-9]+).*/ + ], + search: checkContains('opera') + }, + { + name: 'Firefox', + versionRegexes: [/.*?firefox\/\ ?([0-9]+)\.([0-9]+).*/], + search: checkContains('firefox') + }, + { + name: 'Safari', + versionRegexes: [ + normalVersionRegex, + /.*?cpu os ([0-9]+)_([0-9]+).*/ + ], + search: uastring => { + return (contains(uastring, 'safari') || contains(uastring, 'mobile/')) && contains(uastring, 'applewebkit'); + } + } + ]; + const oses = [ + { + name: 'Windows', + search: checkContains('win'), + versionRegexes: [/.*?windows\ nt\ ?([0-9]+)\.([0-9]+).*/] + }, + { + name: 'iOS', + search: uastring => { + return contains(uastring, 'iphone') || contains(uastring, 'ipad'); + }, + versionRegexes: [ + /.*?version\/\ ?([0-9]+)\.([0-9]+).*/, + /.*cpu os ([0-9]+)_([0-9]+).*/, + /.*cpu iphone os ([0-9]+)_([0-9]+).*/ + ] + }, + { + name: 'Android', + search: checkContains('android'), + versionRegexes: [/.*?android\ ?([0-9]+)\.([0-9]+).*/] + }, + { + name: 'macOS', + search: checkContains('mac os x'), + versionRegexes: [/.*?mac\ os\ x\ ?([0-9]+)_([0-9]+).*/] + }, + { + name: 'Linux', + search: checkContains('linux'), + versionRegexes: [] + }, + { + name: 'Solaris', + search: checkContains('sunos'), + versionRegexes: [] + }, + { + name: 'FreeBSD', + search: checkContains('freebsd'), + versionRegexes: [] + }, + { + name: 'ChromeOS', + search: checkContains('cros'), + versionRegexes: [/.*?chrome\/([0-9]+)\.([0-9]+).*/] + } + ]; + const PlatformInfo = { + browsers: constant(browsers), + oses: constant(oses) + }; + + const edge = 'Edge'; + const chromium = 'Chromium'; + const ie = 'IE'; + const opera = 'Opera'; + const firefox = 'Firefox'; + const safari = 'Safari'; + const unknown$1 = () => { + return nu$1({ + current: undefined, + version: Version.unknown() + }); + }; + const nu$1 = info => { + const current = info.current; + const version = info.version; + const isBrowser = name => () => current === name; + return { + current, + version, + isEdge: isBrowser(edge), + isChromium: isBrowser(chromium), + isIE: isBrowser(ie), + isOpera: isBrowser(opera), + isFirefox: isBrowser(firefox), + isSafari: isBrowser(safari) + }; + }; + const Browser = { + unknown: unknown$1, + nu: nu$1, + edge: constant(edge), + chromium: constant(chromium), + ie: constant(ie), + opera: constant(opera), + firefox: constant(firefox), + safari: constant(safari) + }; + + const windows = 'Windows'; + const ios = 'iOS'; + const android = 'Android'; + const linux = 'Linux'; + const macos = 'macOS'; + const solaris = 'Solaris'; + const freebsd = 'FreeBSD'; + const chromeos = 'ChromeOS'; + const unknown = () => { + return nu({ + current: undefined, + version: Version.unknown() + }); + }; + const nu = info => { + const current = info.current; + const version = info.version; + const isOS = name => () => current === name; + return { + current, + version, + isWindows: isOS(windows), + isiOS: isOS(ios), + isAndroid: isOS(android), + isMacOS: isOS(macos), + isLinux: isOS(linux), + isSolaris: isOS(solaris), + isFreeBSD: isOS(freebsd), + isChromeOS: isOS(chromeos) + }; + }; + const OperatingSystem = { + unknown, + nu, + windows: constant(windows), + ios: constant(ios), + android: constant(android), + linux: constant(linux), + macos: constant(macos), + solaris: constant(solaris), + freebsd: constant(freebsd), + chromeos: constant(chromeos) + }; + + const detect$1 = (userAgent, userAgentDataOpt, mediaMatch) => { + const browsers = PlatformInfo.browsers(); + const oses = PlatformInfo.oses(); + const browser = userAgentDataOpt.bind(userAgentData => detectBrowser$1(browsers, userAgentData)).orThunk(() => detectBrowser(browsers, userAgent)).fold(Browser.unknown, Browser.nu); + const os = detectOs(oses, userAgent).fold(OperatingSystem.unknown, OperatingSystem.nu); + const deviceType = DeviceType(os, browser, userAgent, mediaMatch); + return { + browser, + os, + deviceType + }; + }; + const PlatformDetection = { detect: detect$1 }; + + const mediaMatch = query => window.matchMedia(query).matches; + let platform = cached(() => PlatformDetection.detect(navigator.userAgent, Optional.from(navigator.userAgentData), mediaMatch)); + const detect = () => platform(); + + const r = (left, top) => { + const translate = (x, y) => r(left + x, top + y); + return { + left, + top, + translate + }; + }; + const SugarPosition = r; + + const get$1 = _DOC => { + const doc = _DOC !== undefined ? _DOC.dom : document; + const x = doc.body.scrollLeft || doc.documentElement.scrollLeft; + const y = doc.body.scrollTop || doc.documentElement.scrollTop; + return SugarPosition(x, y); + }; + + const get = _win => { + const win = _win === undefined ? window : _win; + if (detect().browser.isFirefox()) { + return Optional.none(); + } else { + return Optional.from(win.visualViewport); + } + }; + const bounds = (x, y, width, height) => ({ + x, + y, + width, + height, + right: x + width, + bottom: y + height + }); + const getBounds = _win => { + const win = _win === undefined ? window : _win; + const doc = win.document; + const scroll = get$1(SugarElement.fromDom(doc)); + return get(win).fold(() => { + const html = win.document.documentElement; + const width = html.clientWidth; + const height = html.clientHeight; + return bounds(scroll.left, scroll.top, width, height); + }, visualViewport => bounds(Math.max(visualViewport.pageLeft, scroll.left), Math.max(visualViewport.pageTop, scroll.top), visualViewport.width, visualViewport.height)); + }; + const bind = (name, callback, _win) => get(_win).map(visualViewport => { + const handler = e => callback(fromRawEvent(e)); + visualViewport.addEventListener(name, handler); + return { unbind: () => visualViewport.removeEventListener(name, handler) }; + }).getOrThunk(() => ({ unbind: noop })); + + var global$1 = tinymce.util.Tools.resolve('tinymce.dom.DOMUtils'); + + var global = tinymce.util.Tools.resolve('tinymce.Env'); + + const fireFullscreenStateChanged = (editor, state) => { + editor.dispatch('FullscreenStateChanged', { state }); + }; + + const option = name => editor => editor.options.get(name); + const register$2 = editor => { + const registerOption = editor.options.register; + registerOption('fullscreen_native', { + processor: 'boolean', + default: false + }); + }; + const getFullscreenNative = option('fullscreen_native'); + + const getFullscreenRoot = editor => { + const elem = SugarElement.fromDom(editor.getElement()); + return getShadowRoot(elem).map(getShadowHost).getOrThunk(() => getBody(owner(elem))); + }; + const getFullscreenElement = root => { + if (root.fullscreenElement !== undefined) { + return root.fullscreenElement; + } else if (root.msFullscreenElement !== undefined) { + return root.msFullscreenElement; + } else if (root.webkitFullscreenElement !== undefined) { + return root.webkitFullscreenElement; + } else { + return null; + } + }; + const getFullscreenchangeEventName = () => { + if (document.fullscreenElement !== undefined) { + return 'fullscreenchange'; + } else if (document.msFullscreenElement !== undefined) { + return 'MSFullscreenChange'; + } else if (document.webkitFullscreenElement !== undefined) { + return 'webkitfullscreenchange'; + } else { + return 'fullscreenchange'; + } + }; + const requestFullscreen = sugarElem => { + const elem = sugarElem.dom; + if (elem.requestFullscreen) { + elem.requestFullscreen(); + } else if (elem.msRequestFullscreen) { + elem.msRequestFullscreen(); + } else if (elem.webkitRequestFullScreen) { + elem.webkitRequestFullScreen(); + } + }; + const exitFullscreen = sugarDoc => { + const doc = sugarDoc.dom; + if (doc.exitFullscreen) { + doc.exitFullscreen(); + } else if (doc.msExitFullscreen) { + doc.msExitFullscreen(); + } else if (doc.webkitCancelFullScreen) { + doc.webkitCancelFullScreen(); + } + }; + const isFullscreenElement = elem => elem.dom === getFullscreenElement(owner(elem).dom); + + const ancestors$1 = (scope, predicate, isRoot) => filter$1(parents(scope, isRoot), predicate); + const siblings$1 = (scope, predicate) => filter$1(siblings$2(scope), predicate); + + const all = selector => all$1(selector); + const ancestors = (scope, selector, isRoot) => ancestors$1(scope, e => is(e, selector), isRoot); + const siblings = (scope, selector) => siblings$1(scope, e => is(e, selector)); + + const attr = 'data-ephox-mobile-fullscreen-style'; + const siblingStyles = 'display:none!important;'; + const ancestorPosition = 'position:absolute!important;'; + const ancestorStyles = 'top:0!important;left:0!important;margin:0!important;padding:0!important;width:100%!important;height:100%!important;overflow:visible!important;'; + const bgFallback = 'background-color:rgb(255,255,255)!important;'; + const isAndroid = global.os.isAndroid(); + const matchColor = editorBody => { + const color = get$2(editorBody, 'background-color'); + return color !== undefined && color !== '' ? 'background-color:' + color + '!important' : bgFallback; + }; + const clobberStyles = (dom, container, editorBody) => { + const gatherSiblings = element => { + return siblings(element, '*:not(.tox-silver-sink)'); + }; + const clobber = clobberStyle => element => { + const styles = get$3(element, 'style'); + const backup = styles === undefined ? 'no-styles' : styles.trim(); + if (backup === clobberStyle) { + return; + } else { + set(element, attr, backup); + setAll(element, dom.parseStyle(clobberStyle)); + } + }; + const ancestors$1 = ancestors(container, '*'); + const siblings$1 = bind$3(ancestors$1, gatherSiblings); + const bgColor = matchColor(editorBody); + each$1(siblings$1, clobber(siblingStyles)); + each$1(ancestors$1, clobber(ancestorPosition + ancestorStyles + bgColor)); + const containerStyles = isAndroid === true ? '' : ancestorPosition; + clobber(containerStyles + ancestorStyles + bgColor)(container); + }; + const restoreStyles = dom => { + const clobberedEls = all('[' + attr + ']'); + each$1(clobberedEls, element => { + const restore = get$3(element, attr); + if (restore !== 'no-styles') { + setAll(element, dom.parseStyle(restore)); + } else { + remove(element, 'style'); + } + remove(element, attr); + }); + }; + + const DOM = global$1.DOM; + const getScrollPos = () => getBounds(window); + const setScrollPos = pos => window.scrollTo(pos.x, pos.y); + const viewportUpdate = get().fold(() => ({ + bind: noop, + unbind: noop + }), visualViewport => { + const editorContainer = value(); + const resizeBinder = unbindable(); + const scrollBinder = unbindable(); + const refreshScroll = () => { + document.body.scrollTop = 0; + document.documentElement.scrollTop = 0; + }; + const refreshVisualViewport = () => { + window.requestAnimationFrame(() => { + editorContainer.on(container => setAll(container, { + top: visualViewport.offsetTop + 'px', + left: visualViewport.offsetLeft + 'px', + height: visualViewport.height + 'px', + width: visualViewport.width + 'px' + })); + }); + }; + const update = first(() => { + refreshScroll(); + refreshVisualViewport(); + }, 50); + const bind$1 = element => { + editorContainer.set(element); + update.throttle(); + resizeBinder.set(bind('resize', update.throttle)); + scrollBinder.set(bind('scroll', update.throttle)); + }; + const unbind = () => { + editorContainer.on(() => { + resizeBinder.clear(); + scrollBinder.clear(); + }); + editorContainer.clear(); + }; + return { + bind: bind$1, + unbind + }; + }); + const toggleFullscreen = (editor, fullscreenState) => { + const body = document.body; + const documentElement = document.documentElement; + const editorContainer = editor.getContainer(); + const editorContainerS = SugarElement.fromDom(editorContainer); + const fullscreenRoot = getFullscreenRoot(editor); + const fullscreenInfo = fullscreenState.get(); + const editorBody = SugarElement.fromDom(editor.getBody()); + const isTouch = global.deviceType.isTouch(); + const editorContainerStyle = editorContainer.style; + const iframe = editor.iframeElement; + const iframeStyle = iframe.style; + const handleClasses = handler => { + handler(body, 'tox-fullscreen'); + handler(documentElement, 'tox-fullscreen'); + handler(editorContainer, 'tox-fullscreen'); + getShadowRoot(editorContainerS).map(root => getShadowHost(root).dom).each(host => { + handler(host, 'tox-fullscreen'); + handler(host, 'tox-shadowhost'); + }); + }; + const cleanup = () => { + if (isTouch) { + restoreStyles(editor.dom); + } + handleClasses(DOM.removeClass); + viewportUpdate.unbind(); + Optional.from(fullscreenState.get()).each(info => info.fullscreenChangeHandler.unbind()); + }; + if (!fullscreenInfo) { + const fullscreenChangeHandler = bind$1(owner(fullscreenRoot), getFullscreenchangeEventName(), _evt => { + if (getFullscreenNative(editor)) { + if (!isFullscreenElement(fullscreenRoot) && fullscreenState.get() !== null) { + toggleFullscreen(editor, fullscreenState); + } + } + }); + const newFullScreenInfo = { + scrollPos: getScrollPos(), + containerWidth: editorContainerStyle.width, + containerHeight: editorContainerStyle.height, + containerTop: editorContainerStyle.top, + containerLeft: editorContainerStyle.left, + iframeWidth: iframeStyle.width, + iframeHeight: iframeStyle.height, + fullscreenChangeHandler + }; + if (isTouch) { + clobberStyles(editor.dom, editorContainerS, editorBody); + } + iframeStyle.width = iframeStyle.height = '100%'; + editorContainerStyle.width = editorContainerStyle.height = ''; + handleClasses(DOM.addClass); + viewportUpdate.bind(editorContainerS); + editor.on('remove', cleanup); + fullscreenState.set(newFullScreenInfo); + if (getFullscreenNative(editor)) { + requestFullscreen(fullscreenRoot); + } + fireFullscreenStateChanged(editor, true); + } else { + fullscreenInfo.fullscreenChangeHandler.unbind(); + if (getFullscreenNative(editor) && isFullscreenElement(fullscreenRoot)) { + exitFullscreen(owner(fullscreenRoot)); + } + iframeStyle.width = fullscreenInfo.iframeWidth; + iframeStyle.height = fullscreenInfo.iframeHeight; + editorContainerStyle.width = fullscreenInfo.containerWidth; + editorContainerStyle.height = fullscreenInfo.containerHeight; + editorContainerStyle.top = fullscreenInfo.containerTop; + editorContainerStyle.left = fullscreenInfo.containerLeft; + cleanup(); + setScrollPos(fullscreenInfo.scrollPos); + fullscreenState.set(null); + fireFullscreenStateChanged(editor, false); + editor.off('remove', cleanup); + } + }; + + const register$1 = (editor, fullscreenState) => { + editor.addCommand('mceFullScreen', () => { + toggleFullscreen(editor, fullscreenState); + }); + }; + + const makeSetupHandler = (editor, fullscreenState) => api => { + api.setActive(fullscreenState.get() !== null); + const editorEventCallback = e => api.setActive(e.state); + editor.on('FullscreenStateChanged', editorEventCallback); + return () => editor.off('FullscreenStateChanged', editorEventCallback); + }; + const register = (editor, fullscreenState) => { + const onAction = () => editor.execCommand('mceFullScreen'); + editor.ui.registry.addToggleMenuItem('fullscreen', { + text: 'Fullscreen', + icon: 'fullscreen', + shortcut: 'Meta+Shift+F', + onAction, + onSetup: makeSetupHandler(editor, fullscreenState) + }); + editor.ui.registry.addToggleButton('fullscreen', { + tooltip: 'Fullscreen', + icon: 'fullscreen', + onAction, + onSetup: makeSetupHandler(editor, fullscreenState) + }); + }; + + var Plugin = () => { + global$2.add('fullscreen', editor => { + const fullscreenState = Cell(null); + if (editor.inline) { + return get$5(fullscreenState); + } + register$2(editor); + register$1(editor, fullscreenState); + register(editor, fullscreenState); + editor.addShortcut('Meta+Shift+F', '', 'mceFullScreen'); + return get$5(fullscreenState); + }); + }; + + Plugin(); + +})(); diff --git a/vendor/tinymce/tinymce/plugins/fullscreen/plugin.min.js b/vendor/tinymce/tinymce/plugins/fullscreen/plugin.min.js new file mode 100644 index 00000000..25d6f463 --- /dev/null +++ b/vendor/tinymce/tinymce/plugins/fullscreen/plugin.min.js @@ -0,0 +1,4 @@ +/** + * TinyMCE version 6.0.2 (2022-04-27) + */ +!function(){"use strict";const e=e=>{let t=e;return{get:()=>t,set:e=>{t=e}}};var t=tinymce.util.Tools.resolve("tinymce.PluginManager");const n=e=>t=>(e=>{const t=typeof e;return null===e?"null":"object"===t&&Array.isArray(e)?"array":"object"===t&&(n=r=e,(o=String).prototype.isPrototypeOf(n)||(null===(s=r.constructor)||void 0===s?void 0:s.name)===o.name)?"string":t;var n,r,o,s})(t)===e,r=e=>t=>typeof t===e,o=n("string"),s=n("array"),i=(null,e=>null===e);const l=r("boolean"),a=e=>!(e=>null==e)(e),c=r("function"),u=r("number"),d=()=>{},m=e=>()=>e;function h(e,...t){return(...n)=>{const r=t.concat(n);return e.apply(null,r)}}const g=m(!1),p=m(!0);class f{constructor(e,t){this.tag=e,this.value=t}static some(e){return new f(!0,e)}static none(){return f.singletonNone}fold(e,t){return this.tag?t(this.value):e()}isSome(){return this.tag}isNone(){return!this.tag}map(e){return this.tag?f.some(e(this.value)):f.none()}bind(e){return this.tag?e(this.value):f.none()}exists(e){return this.tag&&e(this.value)}forall(e){return!this.tag||e(this.value)}filter(e){return!this.tag||e(this.value)?this:f.none()}getOr(e){return this.tag?this.value:e}or(e){return this.tag?this:e}getOrThunk(e){return this.tag?this.value:e()}orThunk(e){return this.tag?this:e()}getOrDie(e){if(this.tag)return this.value;throw new Error(null!=e?e:"Called getOrDie on None")}static from(e){return a(e)?f.some(e):f.none()}getOrNull(){return this.tag?this.value:null}getOrUndefined(){return this.value}each(e){this.tag&&e(this.value)}toArray(){return this.tag?[this.value]:[]}toString(){return this.tag?`some(${this.value})`:"none()"}}f.singletonNone=new f(!1);const v=t=>{const n=e(f.none()),r=()=>n.get().each(t);return{clear:()=>{r(),n.set(f.none())},isSet:()=>n.get().isSome(),get:()=>n.get(),set:e=>{r(),n.set(f.some(e))}}},w=()=>v((e=>e.unbind())),y=Array.prototype.push,b=(e,t)=>{const n=e.length,r=new Array(n);for(let o=0;o{for(let n=0,r=e.length;n{const n=[];for(let r=0,o=e.length;r((e,t,n)=>{for(let r=0,o=e.length;r-1!==e.indexOf(t),T=e=>void 0!==e.style&&c(e.style.getPropertyValue),k=e=>{if(null==e)throw new Error("Node cannot be null or undefined");return{dom:e}},C=k;"undefined"!=typeof window?window:Function("return this;")();const A=e=>t=>(e=>e.dom.nodeType)(t)===e,R=A(1),L=A(3),M=A(9),N=A(11),P=(e,t)=>{const n=e.dom;if(1!==n.nodeType)return!1;{const e=n;if(void 0!==e.matches)return e.matches(t);if(void 0!==e.msMatchesSelector)return e.msMatchesSelector(t);if(void 0!==e.webkitMatchesSelector)return e.webkitMatchesSelector(t);if(void 0!==e.mozMatchesSelector)return e.mozMatchesSelector(t);throw new Error("Browser lacks native selectors")}},D=e=>C(e.dom.ownerDocument),W=e=>b(e.dom.childNodes,C),q=c(Element.prototype.attachShadow)&&c(Node.prototype.getRootNode),H=m(q),I=q?e=>C(e.dom.getRootNode()):e=>M(e)?e:D(e),B=e=>{const t=I(e);return N(n=t)&&a(n.dom.host)?f.some(t):f.none();var n},V=e=>C(e.dom.host),_=e=>{const t=L(e)?e.dom.parentNode:e.dom;if(null==t||null===t.ownerDocument)return!1;const n=t.ownerDocument;return B(C(t)).fold((()=>n.body.contains(t)),(r=_,o=V,e=>r(o(e))));var r,o},j=(e,t)=>{const n=e.dom.getAttribute(t);return null===n?void 0:n},z=(e,t)=>{e.dom.removeAttribute(t)},$=(e,t)=>{const n=e.dom;((e,t)=>{const n=F(e);for(let r=0,o=n.length;r{((e,t,n)=>{if(!o(n))throw console.error("Invalid call to CSS.set. Property ",t,":: Value ",n,":: Element ",e),new Error("CSS value must be a string: "+n);T(e)&&e.style.setProperty(t,n)})(n,t,e)}))},U=e=>{const t=C((e=>{if(H()&&a(e.target)){const t=C(e.target);if(R(t)&&a(t.dom.shadowRoot)&&e.composed&&e.composedPath){const t=e.composedPath();if(t)return((e,t)=>0e.stopPropagation(),r=()=>e.preventDefault(),o=(s=r,i=n,(...e)=>s(i.apply(null,e)));var s,i;return((e,t,n,r,o,s,i)=>({target:e,x:t,y:n,stop:r,prevent:o,kill:s,raw:i}))(t,e.clientX,e.clientY,n,r,o,e)},K=(e,t,n,r)=>{e.dom.removeEventListener(t,n,r)},X=p,Y=(e,t,n)=>((e,t,n,r)=>((e,t,n,r,o)=>{const s=((e,t)=>n=>{e(n)&&t(U(n))})(n,r);return e.dom.addEventListener(t,s,o),{unbind:h(K,e,t,s,o)}})(e,t,n,r,!1))(e,t,X,n),G=()=>J(0,0),J=(e,t)=>({major:e,minor:t}),Q={nu:J,detect:(e,t)=>{const n=String(t).toLowerCase();return 0===e.length?G():((e,t)=>{const n=((e,t)=>{for(let n=0;nNumber(t.replace(n,"$"+e));return J(r(1),r(2))})(e,n)},unknown:G},Z=(e,t)=>{const n=String(t).toLowerCase();return E(e,(e=>e.search(n)))},ee=/.*?version\/\ ?([0-9]+)\.([0-9]+).*/,te=e=>t=>O(t,e),ne=[{name:"Edge",versionRegexes:[/.*?edge\/ ?([0-9]+)\.([0-9]+)$/],search:e=>O(e,"edge/")&&O(e,"chrome")&&O(e,"safari")&&O(e,"applewebkit")},{name:"Chromium",brand:"Chromium",versionRegexes:[/.*?chrome\/([0-9]+)\.([0-9]+).*/,ee],search:e=>O(e,"chrome")&&!O(e,"chromeframe")},{name:"IE",versionRegexes:[/.*?msie\ ?([0-9]+)\.([0-9]+).*/,/.*?rv:([0-9]+)\.([0-9]+).*/],search:e=>O(e,"msie")||O(e,"trident")},{name:"Opera",versionRegexes:[ee,/.*?opera\/([0-9]+)\.([0-9]+).*/],search:te("opera")},{name:"Firefox",versionRegexes:[/.*?firefox\/\ ?([0-9]+)\.([0-9]+).*/],search:te("firefox")},{name:"Safari",versionRegexes:[ee,/.*?cpu os ([0-9]+)_([0-9]+).*/],search:e=>(O(e,"safari")||O(e,"mobile/"))&&O(e,"applewebkit")}],re=[{name:"Windows",search:te("win"),versionRegexes:[/.*?windows\ nt\ ?([0-9]+)\.([0-9]+).*/]},{name:"iOS",search:e=>O(e,"iphone")||O(e,"ipad"),versionRegexes:[/.*?version\/\ ?([0-9]+)\.([0-9]+).*/,/.*cpu os ([0-9]+)_([0-9]+).*/,/.*cpu iphone os ([0-9]+)_([0-9]+).*/]},{name:"Android",search:te("android"),versionRegexes:[/.*?android\ ?([0-9]+)\.([0-9]+).*/]},{name:"macOS",search:te("mac os x"),versionRegexes:[/.*?mac\ os\ x\ ?([0-9]+)_([0-9]+).*/]},{name:"Linux",search:te("linux"),versionRegexes:[]},{name:"Solaris",search:te("sunos"),versionRegexes:[]},{name:"FreeBSD",search:te("freebsd"),versionRegexes:[]},{name:"ChromeOS",search:te("cros"),versionRegexes:[/.*?chrome\/([0-9]+)\.([0-9]+).*/]}],oe={browsers:m(ne),oses:m(re)},se="Edge",ie="Chromium",le="Opera",ae="Firefox",ce="Safari",ue=e=>{const t=e.current,n=e.version,r=e=>()=>t===e;return{current:t,version:n,isEdge:r(se),isChromium:r(ie),isIE:r("IE"),isOpera:r(le),isFirefox:r(ae),isSafari:r(ce)}},de=()=>ue({current:void 0,version:Q.unknown()}),me=ue,he=(m(se),m(ie),m("IE"),m(le),m(ae),m(ce),"Windows"),ge="Android",pe="Linux",fe="macOS",ve="Solaris",we="FreeBSD",ye="ChromeOS",be=e=>{const t=e.current,n=e.version,r=e=>()=>t===e;return{current:t,version:n,isWindows:r(he),isiOS:r("iOS"),isAndroid:r(ge),isMacOS:r(fe),isLinux:r(pe),isSolaris:r(ve),isFreeBSD:r(we),isChromeOS:r(ye)}},Se=()=>be({current:void 0,version:Q.unknown()}),xe=be,Ee=(m(he),m("iOS"),m(ge),m(pe),m(fe),m(ve),m(we),m(ye),(e,t,n)=>{const r=oe.browsers(),o=oe.oses(),s=t.bind((e=>((e,t)=>((e,t)=>{for(let n=0;n{const n=t.brand.toLowerCase();return E(e,(e=>{var t;return n===(null===(t=e.brand)||void 0===t?void 0:t.toLowerCase())})).map((e=>({current:e.name,version:Q.nu(parseInt(t.version,10),0)})))})))(r,e))).orThunk((()=>((e,t)=>Z(e,t).map((e=>{const n=Q.detect(e.versionRegexes,t);return{current:e.name,version:n}})))(r,e))).fold(de,me),i=((e,t)=>Z(e,t).map((e=>{const n=Q.detect(e.versionRegexes,t);return{current:e.name,version:n}})))(o,e).fold(Se,xe),l=((e,t,n,r)=>{const o=e.isiOS()&&!0===/ipad/i.test(n),s=e.isiOS()&&!o,i=e.isiOS()||e.isAndroid(),l=i||r("(pointer:coarse)"),a=o||!s&&i&&r("(min-device-width:768px)"),c=s||i&&!a,u=t.isSafari()&&e.isiOS()&&!1===/safari/i.test(n),d=!c&&!a&&!u;return{isiPad:m(o),isiPhone:m(s),isTablet:m(a),isPhone:m(c),isTouch:m(l),isAndroid:e.isAndroid,isiOS:e.isiOS,isWebView:m(u),isDesktop:m(d)}})(i,s,e,n);return{browser:s,os:i,deviceType:l}}),Fe=e=>window.matchMedia(e).matches;let Oe=(e=>{let t,n=!1;return(...r)=>(n||(n=!0,t=e.apply(null,r)),t)})((()=>Ee(navigator.userAgent,f.from(navigator.userAgentData),Fe)));const Te=(e,t)=>({left:e,top:t,translate:(n,r)=>Te(e+n,t+r)}),ke=Te,Ce=e=>{const t=void 0===e?window:e;return Oe().browser.isFirefox()?f.none():f.from(t.visualViewport)},Ae=(e,t,n,r)=>({x:e,y:t,width:n,height:r,right:e+n,bottom:t+r}),Re=e=>{const t=void 0===e?window:e,n=t.document,r=(e=>{const t=void 0!==e?e.dom:document,n=t.body.scrollLeft||t.documentElement.scrollLeft,r=t.body.scrollTop||t.documentElement.scrollTop;return ke(n,r)})(C(n));return Ce(t).fold((()=>{const e=t.document.documentElement,n=e.clientWidth,o=e.clientHeight;return Ae(r.left,r.top,n,o)}),(e=>Ae(Math.max(e.pageLeft,r.left),Math.max(e.pageTop,r.top),e.width,e.height)))},Le=(e,t,n)=>Ce(n).map((n=>{const r=e=>t(U(e));return n.addEventListener(e,r),{unbind:()=>n.removeEventListener(e,r)}})).getOrThunk((()=>({unbind:d})));var Me=tinymce.util.Tools.resolve("tinymce.dom.DOMUtils"),Ne=tinymce.util.Tools.resolve("tinymce.Env");const Pe=(e,t)=>{e.dispatch("FullscreenStateChanged",{state:t})},De=("fullscreen_native",e=>e.options.get("fullscreen_native"));const We=e=>{return e.dom===(void 0!==(t=D(e).dom).fullscreenElement?t.fullscreenElement:void 0!==t.msFullscreenElement?t.msFullscreenElement:void 0!==t.webkitFullscreenElement?t.webkitFullscreenElement:null);var t},qe=(e,t,n)=>((e,t,n)=>x(((e,t)=>{const n=c(t)?t:g;let r=e.dom;const o=[];for(;null!==r.parentNode&&void 0!==r.parentNode;){const e=r.parentNode,t=C(e);if(o.push(t),!0===n(t))break;r=e}return o})(e,n),t))(e,(e=>P(e,t)),n),He=(e,t)=>((e,n)=>{return x((e=>f.from(e.dom.parentNode).map(C))(r=e).map(W).map((e=>x(e,(e=>{return t=e,!(r.dom===t.dom);var t})))).getOr([]),(e=>P(e,t)));var r})(e),Ie="data-ephox-mobile-fullscreen-style",Be="position:absolute!important;",Ve="top:0!important;left:0!important;margin:0!important;padding:0!important;width:100%!important;height:100%!important;overflow:visible!important;",_e=Ne.os.isAndroid(),je=e=>{const t=((e,t)=>{const n=e.dom,r=window.getComputedStyle(n).getPropertyValue(t);return""!==r||_(e)?r:((e,t)=>T(e)?e.style.getPropertyValue(t):"")(n,t)})(e,"background-color");return void 0!==t&&""!==t?"background-color:"+t+"!important":"background-color:rgb(255,255,255)!important;"},ze=Me.DOM,$e=Ce().fold((()=>({bind:d,unbind:d})),(e=>{const t=(()=>{const e=v(d);return{...e,on:t=>e.get().each(t)}})(),n=w(),r=w(),o=((e,t)=>{let n=null;return{cancel:()=>{i(n)||(clearTimeout(n),n=null)},throttle:(...t)=>{i(n)&&(n=setTimeout((()=>{n=null,e.apply(null,t)}),50))}}})((()=>{document.body.scrollTop=0,document.documentElement.scrollTop=0,window.requestAnimationFrame((()=>{t.on((t=>$(t,{top:e.offsetTop+"px",left:e.offsetLeft+"px",height:e.height+"px",width:e.width+"px"})))}))}));return{bind:e=>{t.set(e),o.throttle(),n.set(Le("resize",o.throttle)),r.set(Le("scroll",o.throttle))},unbind:()=>{t.on((()=>{n.clear(),r.clear()})),t.clear()}}})),Ue=(e,t)=>{const n=document.body,r=document.documentElement,i=e.getContainer(),a=C(i),c=(e=>{const t=C(e.getElement());return B(t).map(V).getOrThunk((()=>(e=>{const t=e.dom.body;if(null==t)throw new Error("Body is not available yet");return C(t)})(D(t))))})(e),d=t.get(),m=C(e.getBody()),h=Ne.deviceType.isTouch(),g=i.style,p=e.iframeElement.style,v=e=>{e(n,"tox-fullscreen"),e(r,"tox-fullscreen"),e(i,"tox-fullscreen"),B(a).map((e=>V(e).dom)).each((t=>{e(t,"tox-fullscreen"),e(t,"tox-shadowhost")}))},w=()=>{h&&(e=>{const t=((e,t)=>{const n=document;return 1!==(r=n).nodeType&&9!==r.nodeType&&11!==r.nodeType||0===r.childElementCount?[]:b(n.querySelectorAll(e),C);var r})("["+Ie+"]");S(t,(t=>{const n=j(t,Ie);"no-styles"!==n?$(t,e.parseStyle(n)):z(t,"style"),z(t,Ie)}))})(e.dom),v(ze.removeClass),$e.unbind(),f.from(t.get()).each((e=>e.fullscreenChangeHandler.unbind()))};if(d)d.fullscreenChangeHandler.unbind(),De(e)&&We(c)&&(e=>{const t=e.dom;t.exitFullscreen?t.exitFullscreen():t.msExitFullscreen?t.msExitFullscreen():t.webkitCancelFullScreen&&t.webkitCancelFullScreen()})(D(c)),p.width=d.iframeWidth,p.height=d.iframeHeight,g.width=d.containerWidth,g.height=d.containerHeight,g.top=d.containerTop,g.left=d.containerLeft,w(),x=d.scrollPos,window.scrollTo(x.x,x.y),t.set(null),Pe(e,!1),e.off("remove",w);else{const n=Y(D(c),void 0!==document.fullscreenElement?"fullscreenchange":void 0!==document.msFullscreenElement?"MSFullscreenChange":void 0!==document.webkitFullscreenElement?"webkitfullscreenchange":"fullscreenchange",(n=>{De(e)&&(We(c)||null===t.get()||Ue(e,t))})),r={scrollPos:Re(window),containerWidth:g.width,containerHeight:g.height,containerTop:g.top,containerLeft:g.left,iframeWidth:p.width,iframeHeight:p.height,fullscreenChangeHandler:n};h&&((e,t,n)=>{const r=t=>n=>{const r=j(n,"style"),s=void 0===r?"no-styles":r.trim();s!==t&&(((e,t,n)=>{((e,t,n)=>{if(!(o(n)||l(n)||u(n)))throw console.error("Invalid call to Attribute.set. Key ",t,":: Value ",n,":: Element ",e),new Error("Attribute value was not simple");e.setAttribute(t,n+"")})(e.dom,t,n)})(n,Ie,s),$(n,e.parseStyle(t)))},i=qe(t,"*"),a=(e=>{const t=[];for(let n=0,r=e.length;nHe(e,"*:not(.tox-silver-sink)")))),c=je(n);S(a,r("display:none!important;")),S(i,r(Be+Ve+c)),r((!0===_e?"":Be)+Ve+c)(t)})(e.dom,a,m),p.width=p.height="100%",g.width=g.height="",v(ze.addClass),$e.bind(a),e.on("remove",w),t.set(r),De(e)&&(e=>{const t=e.dom;t.requestFullscreen?t.requestFullscreen():t.msRequestFullscreen?t.msRequestFullscreen():t.webkitRequestFullScreen&&t.webkitRequestFullScreen()})(c),Pe(e,!0)}var x},Ke=(e,t)=>n=>{n.setActive(null!==t.get());const r=e=>n.setActive(e.state);return e.on("FullscreenStateChanged",r),()=>e.off("FullscreenStateChanged",r)};t.add("fullscreen",(t=>{const n=e(null);return t.inline||((e=>{(0,e.options.register)("fullscreen_native",{processor:"boolean",default:!1})})(t),((e,t)=>{e.addCommand("mceFullScreen",(()=>{Ue(e,t)}))})(t,n),((e,t)=>{const n=()=>e.execCommand("mceFullScreen");e.ui.registry.addToggleMenuItem("fullscreen",{text:"Fullscreen",icon:"fullscreen",shortcut:"Meta+Shift+F",onAction:n,onSetup:Ke(e,t)}),e.ui.registry.addToggleButton("fullscreen",{tooltip:"Fullscreen",icon:"fullscreen",onAction:n,onSetup:Ke(e,t)})})(t,n),t.addShortcut("Meta+Shift+F","","mceFullScreen")),(e=>({isFullscreen:()=>null!==e.get()}))(n)}))}(); \ No newline at end of file diff --git a/vendor/tinymce/tinymce/plugins/help/index.js b/vendor/tinymce/tinymce/plugins/help/index.js new file mode 100644 index 00000000..7f4bfe02 --- /dev/null +++ b/vendor/tinymce/tinymce/plugins/help/index.js @@ -0,0 +1,7 @@ +// Exports the "help" plugin for usage with module loaders +// Usage: +// CommonJS: +// require('tinymce/plugins/help') +// ES2015: +// import 'tinymce/plugins/help' +require('./plugin.js'); \ No newline at end of file diff --git a/vendor/tinymce/tinymce/plugins/help/plugin.js b/vendor/tinymce/tinymce/plugins/help/plugin.js new file mode 100644 index 00000000..5cb64a03 --- /dev/null +++ b/vendor/tinymce/tinymce/plugins/help/plugin.js @@ -0,0 +1,848 @@ +/** + * TinyMCE version 6.0.2 (2022-04-27) + */ + +(function () { + 'use strict'; + + const Cell = initial => { + let value = initial; + const get = () => { + return value; + }; + const set = v => { + value = v; + }; + return { + get, + set + }; + }; + + var global$3 = tinymce.util.Tools.resolve('tinymce.PluginManager'); + + const get$1 = customTabs => { + const addTab = spec => { + const currentCustomTabs = customTabs.get(); + currentCustomTabs[spec.name] = spec; + customTabs.set(currentCustomTabs); + }; + return { addTab }; + }; + + const register$2 = (editor, dialogOpener) => { + editor.addCommand('mceHelp', dialogOpener); + }; + + const option = name => editor => editor.options.get(name); + const register$1 = editor => { + const registerOption = editor.options.register; + registerOption('help_tabs', { processor: 'array' }); + }; + const getHelpTabs = option('help_tabs'); + const getForcedPlugins = option('forced_plugins'); + + const register = (editor, dialogOpener) => { + editor.ui.registry.addButton('help', { + icon: 'help', + tooltip: 'Help', + onAction: dialogOpener + }); + editor.ui.registry.addMenuItem('help', { + text: 'Help', + icon: 'help', + shortcut: 'Alt+0', + onAction: dialogOpener + }); + }; + + const eq = t => a => t === a; + const isUndefined = eq(undefined); + const isNullable = a => a === null || a === undefined; + const isNonNullable = a => !isNullable(a); + + const constant = value => { + return () => { + return value; + }; + }; + const never = constant(false); + + class Optional { + constructor(tag, value) { + this.tag = tag; + this.value = value; + } + static some(value) { + return new Optional(true, value); + } + static none() { + return Optional.singletonNone; + } + fold(onNone, onSome) { + if (this.tag) { + return onSome(this.value); + } else { + return onNone(); + } + } + isSome() { + return this.tag; + } + isNone() { + return !this.tag; + } + map(mapper) { + if (this.tag) { + return Optional.some(mapper(this.value)); + } else { + return Optional.none(); + } + } + bind(binder) { + if (this.tag) { + return binder(this.value); + } else { + return Optional.none(); + } + } + exists(predicate) { + return this.tag && predicate(this.value); + } + forall(predicate) { + return !this.tag || predicate(this.value); + } + filter(predicate) { + if (!this.tag || predicate(this.value)) { + return this; + } else { + return Optional.none(); + } + } + getOr(replacement) { + return this.tag ? this.value : replacement; + } + or(replacement) { + return this.tag ? this : replacement; + } + getOrThunk(thunk) { + return this.tag ? this.value : thunk(); + } + orThunk(thunk) { + return this.tag ? this : thunk(); + } + getOrDie(message) { + if (!this.tag) { + throw new Error(message !== null && message !== void 0 ? message : 'Called getOrDie on None'); + } else { + return this.value; + } + } + static from(value) { + return isNonNullable(value) ? Optional.some(value) : Optional.none(); + } + getOrNull() { + return this.tag ? this.value : null; + } + getOrUndefined() { + return this.value; + } + each(worker) { + if (this.tag) { + worker(this.value); + } + } + toArray() { + return this.tag ? [this.value] : []; + } + toString() { + return this.tag ? `some(${ this.value })` : 'none()'; + } + } + Optional.singletonNone = new Optional(false); + + const nativeIndexOf = Array.prototype.indexOf; + const rawIndexOf = (ts, t) => nativeIndexOf.call(ts, t); + const contains = (xs, x) => rawIndexOf(xs, x) > -1; + const map = (xs, f) => { + const len = xs.length; + const r = new Array(len); + for (let i = 0; i < len; i++) { + const x = xs[i]; + r[i] = f(x, i); + } + return r; + }; + const filter = (xs, pred) => { + const r = []; + for (let i = 0, len = xs.length; i < len; i++) { + const x = xs[i]; + if (pred(x, i)) { + r.push(x); + } + } + return r; + }; + const findUntil = (xs, pred, until) => { + for (let i = 0, len = xs.length; i < len; i++) { + const x = xs[i]; + if (pred(x, i)) { + return Optional.some(x); + } else if (until(x, i)) { + break; + } + } + return Optional.none(); + }; + const find = (xs, pred) => { + return findUntil(xs, pred, never); + }; + + const keys = Object.keys; + const hasOwnProperty = Object.hasOwnProperty; + const get = (obj, key) => { + return has(obj, key) ? Optional.from(obj[key]) : Optional.none(); + }; + const has = (obj, key) => hasOwnProperty.call(obj, key); + + const cat = arr => { + const r = []; + const push = x => { + r.push(x); + }; + for (let i = 0; i < arr.length; i++) { + arr[i].each(push); + } + return r; + }; + + const description = `

    Editor UI keyboard navigation

    + +

    Activating keyboard navigation

    + +

    The sections of the outer UI of the editor - the menubar, toolbar, sidebar and footer - are all keyboard navigable. As such, there are multiple ways to activate keyboard navigation:

    +
      +
    • Focus the menubar: Alt + F9 (Windows) or ⌥F9 (MacOS)
    • +
    • Focus the toolbar: Alt + F10 (Windows) or ⌥F10 (MacOS)
    • +
    • Focus the footer: Alt + F11 (Windows) or ⌥F11 (MacOS)
    • +
    + +

    Focusing the menubar or toolbar will start keyboard navigation at the first item in the menubar or toolbar, which will be highlighted with a gray background. Focusing the footer will start keyboard navigation at the first item in the element path, which will be highlighted with an underline.

    + +

    Moving between UI sections

    + +

    When keyboard navigation is active, pressing tab will move the focus to the next major section of the UI, where applicable. These sections are:

    +
      +
    • the menubar
    • +
    • each group of the toolbar
    • +
    • the sidebar
    • +
    • the element path in the footer
    • +
    • the wordcount toggle button in the footer
    • +
    • the branding link in the footer
    • +
    • the editor resize handle in the footer
    • +
    + +

    Pressing shift + tab will move backwards through the same sections, except when moving from the footer to the toolbar. Focusing the element path then pressing shift + tab will move focus to the first toolbar group, not the last.

    + +

    Moving within UI sections

    + +

    Keyboard navigation within UI sections can usually be achieved using the left and right arrow keys. This includes:

    +
      +
    • moving between menus in the menubar
    • +
    • moving between buttons in a toolbar group
    • +
    • moving between items in the element path
    • +
    + +

    In all these UI sections, keyboard navigation will cycle within the section. For example, focusing the last button in a toolbar group then pressing right arrow will move focus to the first item in the same toolbar group.

    + +

    Executing buttons

    + +

    To execute a button, navigate the selection to the desired button and hit space or enter.

    + +

    Opening, navigating and closing menus

    + +

    When focusing a menubar button or a toolbar button with a menu, pressing space, enter or down arrow will open the menu. When the menu opens the first item will be selected. To move up or down the menu, press the up or down arrow key respectively. This is the same for submenus, which can also be opened and closed using the left and right arrow keys.

    + +

    To close any active menu, hit the escape key. When a menu is closed the selection will be restored to its previous selection. This also works for closing submenus.

    + +

    Context toolbars and menus

    + +

    To focus an open context toolbar such as the table context toolbar, press Ctrl + F9 (Windows) or ⌃F9 (MacOS).

    + +

    Context toolbar navigation is the same as toolbar navigation, and context menu navigation is the same as standard menu navigation.

    + +

    Dialog navigation

    + +

    There are two types of dialog UIs in TinyMCE: tabbed dialogs and non-tabbed dialogs.

    + +

    When a non-tabbed dialog is opened, the first interactive component in the dialog will be focused. Users can navigate between interactive components by pressing tab. This includes any footer buttons. Navigation will cycle back to the first dialog component if tab is pressed while focusing the last component in the dialog. Pressing shift + tab will navigate backwards.

    + +

    When a tabbed dialog is opened, the first button in the tab menu is focused. Pressing tab will navigate to the first interactive component in that tab, and will cycle through the tab\u2019s components, the footer buttons, then back to the tab button. To switch to another tab, focus the tab button for the current tab, then use the arrow keys to cycle through the tab buttons.

    `; + const tab$3 = () => { + const body = { + type: 'htmlpanel', + presets: 'document', + html: description + }; + return { + name: 'keyboardnav', + title: 'Keyboard Navigation', + items: [body] + }; + }; + + var global$2 = tinymce.util.Tools.resolve('tinymce.Env'); + + const convertText = source => { + const isMac = global$2.os.isMacOS() || global$2.os.isiOS(); + const mac = { + alt: '⌥', + ctrl: '⌃', + shift: '⇧', + meta: '⌘', + access: '⌃⌥' + }; + const other = { + meta: 'Ctrl ', + access: 'Shift + Alt ' + }; + const replace = isMac ? mac : other; + const shortcut = source.split('+'); + const updated = map(shortcut, segment => { + const search = segment.toLowerCase().trim(); + return has(replace, search) ? replace[search] : segment; + }); + return isMac ? updated.join('').replace(/\s/, '') : updated.join('+'); + }; + + const shortcuts = [ + { + shortcuts: ['Meta + B'], + action: 'Bold' + }, + { + shortcuts: ['Meta + I'], + action: 'Italic' + }, + { + shortcuts: ['Meta + U'], + action: 'Underline' + }, + { + shortcuts: ['Meta + A'], + action: 'Select all' + }, + { + shortcuts: [ + 'Meta + Y', + 'Meta + Shift + Z' + ], + action: 'Redo' + }, + { + shortcuts: ['Meta + Z'], + action: 'Undo' + }, + { + shortcuts: ['Access + 1'], + action: 'Heading 1' + }, + { + shortcuts: ['Access + 2'], + action: 'Heading 2' + }, + { + shortcuts: ['Access + 3'], + action: 'Heading 3' + }, + { + shortcuts: ['Access + 4'], + action: 'Heading 4' + }, + { + shortcuts: ['Access + 5'], + action: 'Heading 5' + }, + { + shortcuts: ['Access + 6'], + action: 'Heading 6' + }, + { + shortcuts: ['Access + 7'], + action: 'Paragraph' + }, + { + shortcuts: ['Access + 8'], + action: 'Div' + }, + { + shortcuts: ['Access + 9'], + action: 'Address' + }, + { + shortcuts: ['Alt + 0'], + action: 'Open help dialog' + }, + { + shortcuts: ['Alt + F9'], + action: 'Focus to menubar' + }, + { + shortcuts: ['Alt + F10'], + action: 'Focus to toolbar' + }, + { + shortcuts: ['Alt + F11'], + action: 'Focus to element path' + }, + { + shortcuts: ['Ctrl + F9'], + action: 'Focus to contextual toolbar' + }, + { + shortcuts: ['Shift + Enter'], + action: 'Open popup menu for split buttons' + }, + { + shortcuts: ['Meta + K'], + action: 'Insert link (if link plugin activated)' + }, + { + shortcuts: ['Meta + S'], + action: 'Save (if save plugin activated)' + }, + { + shortcuts: ['Meta + F'], + action: 'Find (if searchreplace plugin activated)' + }, + { + shortcuts: ['Meta + Shift + F'], + action: 'Switch to or from fullscreen mode' + } + ]; + + const tab$2 = () => { + const shortcutList = map(shortcuts, shortcut => { + const shortcutText = map(shortcut.shortcuts, convertText).join(' or '); + return [ + shortcut.action, + shortcutText + ]; + }); + const tablePanel = { + type: 'table', + header: [ + 'Action', + 'Shortcut' + ], + cells: shortcutList + }; + return { + name: 'shortcuts', + title: 'Handy Shortcuts', + items: [tablePanel] + }; + }; + + var global$1 = tinymce.util.Tools.resolve('tinymce.util.I18n'); + + const urls = map([ + { + key: 'advlist', + name: 'Advanced List' + }, + { + key: 'anchor', + name: 'Anchor' + }, + { + key: 'autolink', + name: 'Autolink' + }, + { + key: 'autoresize', + name: 'Autoresize' + }, + { + key: 'autosave', + name: 'Autosave' + }, + { + key: 'charmap', + name: 'Character Map' + }, + { + key: 'code', + name: 'Code' + }, + { + key: 'codesample', + name: 'Code Sample' + }, + { + key: 'colorpicker', + name: 'Color Picker' + }, + { + key: 'directionality', + name: 'Directionality' + }, + { + key: 'emoticons', + name: 'Emoticons' + }, + { + key: 'fullscreen', + name: 'Full Screen' + }, + { + key: 'help', + name: 'Help' + }, + { + key: 'image', + name: 'Image' + }, + { + key: 'importcss', + name: 'Import CSS' + }, + { + key: 'insertdatetime', + name: 'Insert Date/Time' + }, + { + key: 'link', + name: 'Link' + }, + { + key: 'lists', + name: 'Lists' + }, + { + key: 'media', + name: 'Media' + }, + { + key: 'nonbreaking', + name: 'Nonbreaking' + }, + { + key: 'pagebreak', + name: 'Page Break' + }, + { + key: 'preview', + name: 'Preview' + }, + { + key: 'quickbars', + name: 'Quick Toolbars' + }, + { + key: 'save', + name: 'Save' + }, + { + key: 'searchreplace', + name: 'Search and Replace' + }, + { + key: 'table', + name: 'Table' + }, + { + key: 'template', + name: 'Template' + }, + { + key: 'textcolor', + name: 'Text Color' + }, + { + key: 'visualblocks', + name: 'Visual Blocks' + }, + { + key: 'visualchars', + name: 'Visual Characters' + }, + { + key: 'wordcount', + name: 'Word Count' + }, + { + key: 'a11ychecker', + name: 'Accessibility Checker', + type: 'premium' + }, + { + key: 'advcode', + name: 'Advanced Code Editor', + type: 'premium' + }, + { + key: 'advtable', + name: 'Advanced Tables', + type: 'premium' + }, + { + key: 'autocorrect', + name: 'Autocorrect', + type: 'premium' + }, + { + key: 'casechange', + name: 'Case Change', + type: 'premium' + }, + { + key: 'checklist', + name: 'Checklist', + type: 'premium' + }, + { + key: 'editimage', + name: 'Enhanced Image Editing', + type: 'premium' + }, + { + key: 'mediaembed', + name: 'Enhanced Media Embed', + type: 'premium', + slug: 'introduction-to-mediaembed' + }, + { + key: 'export', + name: 'Export', + type: 'premium' + }, + { + key: 'formatpainter', + name: 'Format Painter', + type: 'premium' + }, + { + key: 'linkchecker', + name: 'Link Checker', + type: 'premium' + }, + { + key: 'mentions', + name: 'Mentions', + type: 'premium' + }, + { + key: 'pageembed', + name: 'Page Embed', + type: 'premium' + }, + { + key: 'permanentpen', + name: 'Permanent Pen', + type: 'premium' + }, + { + key: 'powerpaste', + name: 'PowerPaste', + type: 'premium', + slug: 'introduction-to-powerpaste' + }, + { + key: 'rtc', + name: 'Real-Time Collaboration', + type: 'premium', + slug: 'rtc-introduction' + }, + { + key: 'tinymcespellchecker', + name: 'Spell Checker Pro', + type: 'premium', + slug: 'introduction-to-tiny-spellchecker' + }, + { + key: 'tinycomments', + name: 'Tiny Comments', + type: 'premium', + slug: 'introduction-to-tiny-comments' + }, + { + key: 'tinydrive', + name: 'Tiny Drive', + type: 'premium', + slug: 'tinydrive-introduction' + }, + { + key: 'tableofcontents', + name: 'Table of Contents', + type: 'premium' + } + ], item => ({ + ...item, + type: item.type || 'opensource', + slug: item.slug || item.key + })); + + const tab$1 = editor => { + const availablePlugins = () => { + const premiumPlugins = filter(urls, ({key, type}) => { + return key !== 'autocorrect' && type === 'premium'; + }); + const premiumPluginList = map(premiumPlugins, plugin => '
  • ' + global$1.translate(plugin.name) + '
  • ').join(''); + return '
    ' + '

    ' + global$1.translate('Premium plugins:') + '

    ' + '' + '
    '; + }; + const makeLink = p => `${ p.name }`; + const maybeUrlize = (editor, key) => find(urls, x => { + return x.key === key; + }).fold(() => { + const getMetadata = editor.plugins[key].getMetadata; + return typeof getMetadata === 'function' ? makeLink(getMetadata()) : key; + }, x => { + const name = x.type === 'premium' ? `${ x.name }*` : x.name; + return makeLink({ + name, + url: `https://www.tiny.cloud/docs/tinymce/6/${ x.slug }/` + }); + }); + const getPluginKeys = editor => { + const keys$1 = keys(editor.plugins); + const forcedPlugins = getForcedPlugins(editor); + return isUndefined(forcedPlugins) ? keys$1 : filter(keys$1, k => !contains(forcedPlugins, k)); + }; + const pluginLister = editor => { + const pluginKeys = getPluginKeys(editor); + const pluginLis = map(pluginKeys, key => { + return '
  • ' + maybeUrlize(editor, key) + '
  • '; + }); + const count = pluginLis.length; + const pluginsString = pluginLis.join(''); + const html = '

    ' + global$1.translate([ + 'Plugins installed ({0}):', + count + ]) + '

    ' + '
      ' + pluginsString + '
    '; + return html; + }; + const installedPlugins = editor => { + if (editor == null) { + return ''; + } + return '
    ' + pluginLister(editor) + '
    '; + }; + const htmlPanel = { + type: 'htmlpanel', + presets: 'document', + html: [ + installedPlugins(editor), + availablePlugins() + ].join('') + }; + return { + name: 'plugins', + title: 'Plugins', + items: [htmlPanel] + }; + }; + + var global = tinymce.util.Tools.resolve('tinymce.EditorManager'); + + const tab = () => { + const getVersion = (major, minor) => major.indexOf('@') === 0 ? 'X.X.X' : major + '.' + minor; + const version = getVersion(global.majorVersion, global.minorVersion); + const changeLogLink = 'TinyMCE ' + version + ''; + const htmlPanel = { + type: 'htmlpanel', + html: '

    ' + global$1.translate([ + 'You are using {0}', + changeLogLink + ]) + '

    ', + presets: 'document' + }; + return { + name: 'versions', + title: 'Version', + items: [htmlPanel] + }; + }; + + const parseHelpTabsSetting = (tabsFromSettings, tabs) => { + const newTabs = {}; + const names = map(tabsFromSettings, t => { + if (typeof t === 'string') { + if (has(tabs, t)) { + newTabs[t] = tabs[t]; + } + return t; + } else { + newTabs[t.name] = t; + return t.name; + } + }); + return { + tabs: newTabs, + names + }; + }; + const getNamesFromTabs = tabs => { + const names = keys(tabs); + const idx = names.indexOf('versions'); + if (idx !== -1) { + names.splice(idx, 1); + names.push('versions'); + } + return { + tabs, + names + }; + }; + const parseCustomTabs = (editor, customTabs) => { + const shortcuts = tab$2(); + const nav = tab$3(); + const plugins = tab$1(editor); + const versions = tab(); + const tabs = { + [shortcuts.name]: shortcuts, + [nav.name]: nav, + [plugins.name]: plugins, + [versions.name]: versions, + ...customTabs.get() + }; + return Optional.from(getHelpTabs(editor)).fold(() => getNamesFromTabs(tabs), tabsFromSettings => parseHelpTabsSetting(tabsFromSettings, tabs)); + }; + const init = (editor, customTabs) => () => { + const {tabs, names} = parseCustomTabs(editor, customTabs); + const foundTabs = map(names, name => get(tabs, name)); + const dialogTabs = cat(foundTabs); + const body = { + type: 'tabpanel', + tabs: dialogTabs + }; + editor.windowManager.open({ + title: 'Help', + size: 'medium', + body, + buttons: [{ + type: 'cancel', + name: 'close', + text: 'Close', + primary: true + }], + initialData: {} + }); + }; + + var Plugin = () => { + global$3.add('help', editor => { + const customTabs = Cell({}); + const api = get$1(customTabs); + register$1(editor); + const dialogOpener = init(editor, customTabs); + register(editor, dialogOpener); + register$2(editor, dialogOpener); + editor.shortcuts.add('Alt+0', 'Open help dialog', 'mceHelp'); + return api; + }); + }; + + Plugin(); + +})(); diff --git a/vendor/tinymce/tinymce/plugins/help/plugin.min.js b/vendor/tinymce/tinymce/plugins/help/plugin.min.js new file mode 100644 index 00000000..97336bf3 --- /dev/null +++ b/vendor/tinymce/tinymce/plugins/help/plugin.min.js @@ -0,0 +1,4 @@ +/** + * TinyMCE version 6.0.2 (2022-04-27) + */ +!function(){"use strict";var e=tinymce.util.Tools.resolve("tinymce.PluginManager");const t=e=>t=>t.options.get(e),n=t("help_tabs"),a=t("forced_plugins"),o=(void 0,e=>undefined===e);const i=(!1,()=>false);class s{constructor(e,t){this.tag=e,this.value=t}static some(e){return new s(!0,e)}static none(){return s.singletonNone}fold(e,t){return this.tag?t(this.value):e()}isSome(){return this.tag}isNone(){return!this.tag}map(e){return this.tag?s.some(e(this.value)):s.none()}bind(e){return this.tag?e(this.value):s.none()}exists(e){return this.tag&&e(this.value)}forall(e){return!this.tag||e(this.value)}filter(e){return!this.tag||e(this.value)?this:s.none()}getOr(e){return this.tag?this.value:e}or(e){return this.tag?this:e}getOrThunk(e){return this.tag?this.value:e()}orThunk(e){return this.tag?this:e()}getOrDie(e){if(this.tag)return this.value;throw new Error(null!=e?e:"Called getOrDie on None")}static from(e){return null==e?s.none():s.some(e)}getOrNull(){return this.tag?this.value:null}getOrUndefined(){return this.value}each(e){this.tag&&e(this.value)}toArray(){return this.tag?[this.value]:[]}toString(){return this.tag?`some(${this.value})`:"none()"}}s.singletonNone=new s(!1);const r=Array.prototype.indexOf,l=(e,t)=>{const n=e.length,a=new Array(n);for(let o=0;o{const n=[];for(let a=0,o=e.length;ah.call(e,t);var p=tinymce.util.Tools.resolve("tinymce.Env");const d=e=>{const t=p.os.isMacOS()||p.os.isiOS(),n=t?{alt:"⌥",ctrl:"⌃",shift:"⇧",meta:"⌘",access:"⌃⌥"}:{meta:"Ctrl ",access:"Shift + Alt "},a=e.split("+"),o=l(a,(e=>{const t=e.toLowerCase().trim();return m(n,t)?n[t]:e}));return t?o.join("").replace(/\s/,""):o.join("+")},g=[{shortcuts:["Meta + B"],action:"Bold"},{shortcuts:["Meta + I"],action:"Italic"},{shortcuts:["Meta + U"],action:"Underline"},{shortcuts:["Meta + A"],action:"Select all"},{shortcuts:["Meta + Y","Meta + Shift + Z"],action:"Redo"},{shortcuts:["Meta + Z"],action:"Undo"},{shortcuts:["Access + 1"],action:"Heading 1"},{shortcuts:["Access + 2"],action:"Heading 2"},{shortcuts:["Access + 3"],action:"Heading 3"},{shortcuts:["Access + 4"],action:"Heading 4"},{shortcuts:["Access + 5"],action:"Heading 5"},{shortcuts:["Access + 6"],action:"Heading 6"},{shortcuts:["Access + 7"],action:"Paragraph"},{shortcuts:["Access + 8"],action:"Div"},{shortcuts:["Access + 9"],action:"Address"},{shortcuts:["Alt + 0"],action:"Open help dialog"},{shortcuts:["Alt + F9"],action:"Focus to menubar"},{shortcuts:["Alt + F10"],action:"Focus to toolbar"},{shortcuts:["Alt + F11"],action:"Focus to element path"},{shortcuts:["Ctrl + F9"],action:"Focus to contextual toolbar"},{shortcuts:["Shift + Enter"],action:"Open popup menu for split buttons"},{shortcuts:["Meta + K"],action:"Insert link (if link plugin activated)"},{shortcuts:["Meta + S"],action:"Save (if save plugin activated)"},{shortcuts:["Meta + F"],action:"Find (if searchreplace plugin activated)"},{shortcuts:["Meta + Shift + F"],action:"Switch to or from fullscreen mode"}],y=()=>({name:"shortcuts",title:"Handy Shortcuts",items:[{type:"table",header:["Action","Shortcut"],cells:l(g,(e=>{const t=l(e.shortcuts,d).join(" or ");return[e.action,t]}))}]});var b=tinymce.util.Tools.resolve("tinymce.util.I18n");const k=l([{key:"advlist",name:"Advanced List"},{key:"anchor",name:"Anchor"},{key:"autolink",name:"Autolink"},{key:"autoresize",name:"Autoresize"},{key:"autosave",name:"Autosave"},{key:"charmap",name:"Character Map"},{key:"code",name:"Code"},{key:"codesample",name:"Code Sample"},{key:"colorpicker",name:"Color Picker"},{key:"directionality",name:"Directionality"},{key:"emoticons",name:"Emoticons"},{key:"fullscreen",name:"Full Screen"},{key:"help",name:"Help"},{key:"image",name:"Image"},{key:"importcss",name:"Import CSS"},{key:"insertdatetime",name:"Insert Date/Time"},{key:"link",name:"Link"},{key:"lists",name:"Lists"},{key:"media",name:"Media"},{key:"nonbreaking",name:"Nonbreaking"},{key:"pagebreak",name:"Page Break"},{key:"preview",name:"Preview"},{key:"quickbars",name:"Quick Toolbars"},{key:"save",name:"Save"},{key:"searchreplace",name:"Search and Replace"},{key:"table",name:"Table"},{key:"template",name:"Template"},{key:"textcolor",name:"Text Color"},{key:"visualblocks",name:"Visual Blocks"},{key:"visualchars",name:"Visual Characters"},{key:"wordcount",name:"Word Count"},{key:"a11ychecker",name:"Accessibility Checker",type:"premium"},{key:"advcode",name:"Advanced Code Editor",type:"premium"},{key:"advtable",name:"Advanced Tables",type:"premium"},{key:"autocorrect",name:"Autocorrect",type:"premium"},{key:"casechange",name:"Case Change",type:"premium"},{key:"checklist",name:"Checklist",type:"premium"},{key:"editimage",name:"Enhanced Image Editing",type:"premium"},{key:"mediaembed",name:"Enhanced Media Embed",type:"premium",slug:"introduction-to-mediaembed"},{key:"export",name:"Export",type:"premium"},{key:"formatpainter",name:"Format Painter",type:"premium"},{key:"linkchecker",name:"Link Checker",type:"premium"},{key:"mentions",name:"Mentions",type:"premium"},{key:"pageembed",name:"Page Embed",type:"premium"},{key:"permanentpen",name:"Permanent Pen",type:"premium"},{key:"powerpaste",name:"PowerPaste",type:"premium",slug:"introduction-to-powerpaste"},{key:"rtc",name:"Real-Time Collaboration",type:"premium",slug:"rtc-introduction"},{key:"tinymcespellchecker",name:"Spell Checker Pro",type:"premium",slug:"introduction-to-tiny-spellchecker"},{key:"tinycomments",name:"Tiny Comments",type:"premium",slug:"introduction-to-tiny-comments"},{key:"tinydrive",name:"Tiny Drive",type:"premium",slug:"tinydrive-introduction"},{key:"tableofcontents",name:"Table of Contents",type:"premium"}],(e=>({...e,type:e.type||"opensource",slug:e.slug||e.key}))),v=e=>{const t=e=>`${e.name}`,n=e=>{const n=(e=>{const t=u(e.plugins),n=a(e);return o(n)?t:c(t,(e=>!(((e,t)=>r.call(e,t))(n,e)>-1)))})(e),h=l(n,(n=>"
  • "+((e,n)=>{return(a=k,o=e=>e.key===n,((e,t,n)=>{for(let a=0,o=e.length;a{const a=e.plugins[n].getMetadata;return"function"==typeof a?t(a()):n}),(e=>{const n="premium"===e.type?`${e.name}*`:e.name;return t({name:n,url:`https://www.tiny.cloud/docs/tinymce/6/${e.slug}/`})}));var a,o})(e,n)+"
  • ")),m=h.length,p=h.join("");return"

    "+b.translate(["Plugins installed ({0}):",m])+"

      "+p+"
    "},h={type:"htmlpanel",presets:"document",html:[(e=>null==e?"":'
    '+n(e)+"
    ")(e),(()=>{const e=c(k,(({key:e,type:t})=>"autocorrect"!==e&&"premium"===t)),t=l(e,(e=>"
  • "+b.translate(e.name)+"
  • ")).join("");return'

    '+b.translate("Premium plugins:")+"

    "})()].join("")};return{name:"plugins",title:"Plugins",items:[h]}};var f=tinymce.util.Tools.resolve("tinymce.EditorManager");const w=(e,t)=>()=>{const{tabs:a,names:o}=((e,t)=>{const a=y(),o={name:"keyboardnav",title:"Keyboard Navigation",items:[{type:"htmlpanel",presets:"document",html:"

    Editor UI keyboard navigation

    \n\n

    Activating keyboard navigation

    \n\n

    The sections of the outer UI of the editor - the menubar, toolbar, sidebar and footer - are all keyboard navigable. As such, there are multiple ways to activate keyboard navigation:

    \n
      \n
    • Focus the menubar: Alt + F9 (Windows) or ⌥F9 (MacOS)
    • \n
    • Focus the toolbar: Alt + F10 (Windows) or ⌥F10 (MacOS)
    • \n
    • Focus the footer: Alt + F11 (Windows) or ⌥F11 (MacOS)
    • \n
    \n\n

    Focusing the menubar or toolbar will start keyboard navigation at the first item in the menubar or toolbar, which will be highlighted with a gray background. Focusing the footer will start keyboard navigation at the first item in the element path, which will be highlighted with an underline.

    \n\n

    Moving between UI sections

    \n\n

    When keyboard navigation is active, pressing tab will move the focus to the next major section of the UI, where applicable. These sections are:

    \n
      \n
    • the menubar
    • \n
    • each group of the toolbar
    • \n
    • the sidebar
    • \n
    • the element path in the footer
    • \n
    • the wordcount toggle button in the footer
    • \n
    • the branding link in the footer
    • \n
    • the editor resize handle in the footer
    • \n
    \n\n

    Pressing shift + tab will move backwards through the same sections, except when moving from the footer to the toolbar. Focusing the element path then pressing shift + tab will move focus to the first toolbar group, not the last.

    \n\n

    Moving within UI sections

    \n\n

    Keyboard navigation within UI sections can usually be achieved using the left and right arrow keys. This includes:

    \n
      \n
    • moving between menus in the menubar
    • \n
    • moving between buttons in a toolbar group
    • \n
    • moving between items in the element path
    • \n
    \n\n

    In all these UI sections, keyboard navigation will cycle within the section. For example, focusing the last button in a toolbar group then pressing right arrow will move focus to the first item in the same toolbar group.

    \n\n

    Executing buttons

    \n\n

    To execute a button, navigate the selection to the desired button and hit space or enter.

    \n\n

    Opening, navigating and closing menus

    \n\n

    When focusing a menubar button or a toolbar button with a menu, pressing space, enter or down arrow will open the menu. When the menu opens the first item will be selected. To move up or down the menu, press the up or down arrow key respectively. This is the same for submenus, which can also be opened and closed using the left and right arrow keys.

    \n\n

    To close any active menu, hit the escape key. When a menu is closed the selection will be restored to its previous selection. This also works for closing submenus.

    \n\n

    Context toolbars and menus

    \n\n

    To focus an open context toolbar such as the table context toolbar, press Ctrl + F9 (Windows) or ⌃F9 (MacOS).

    \n\n

    Context toolbar navigation is the same as toolbar navigation, and context menu navigation is the same as standard menu navigation.

    \n\n

    Dialog navigation

    \n\n

    There are two types of dialog UIs in TinyMCE: tabbed dialogs and non-tabbed dialogs.

    \n\n

    When a non-tabbed dialog is opened, the first interactive component in the dialog will be focused. Users can navigate between interactive components by pressing tab. This includes any footer buttons. Navigation will cycle back to the first dialog component if tab is pressed while focusing the last component in the dialog. Pressing shift + tab will navigate backwards.

    \n\n

    When a tabbed dialog is opened, the first button in the tab menu is focused. Pressing tab will navigate to the first interactive component in that tab, and will cycle through the tab\u2019s components, the footer buttons, then back to the tab button. To switch to another tab, focus the tab button for the current tab, then use the arrow keys to cycle through the tab buttons.

    "}]},i=v(e),r=(()=>{var e,t;const n='TinyMCE '+(e=f.majorVersion,t=f.minorVersion,(0===e.indexOf("@")?"X.X.X":e+"."+t)+"");return{name:"versions",title:"Version",items:[{type:"htmlpanel",html:"

    "+b.translate(["You are using {0}",n])+"

    ",presets:"document"}]}})(),c={[a.name]:a,[o.name]:o,[i.name]:i,[r.name]:r,...t.get()};return s.from(n(e)).fold((()=>(e=>{const t=u(e),n=t.indexOf("versions");return-1!==n&&(t.splice(n,1),t.push("versions")),{tabs:e,names:t}})(c)),(e=>((e,t)=>{const n={},a=l(e,(e=>"string"==typeof e?(m(t,e)&&(n[e]=t[e]),e):(n[e.name]=e,e.name)));return{tabs:n,names:a}})(e,c)))})(e,t),i={type:"tabpanel",tabs:(e=>{const t=[],n=e=>{t.push(e)};for(let t=0;t{return m(t=a,n=e)?s.from(t[n]):s.none();var t,n})))};e.windowManager.open({title:"Help",size:"medium",body:i,buttons:[{type:"cancel",name:"close",text:"Close",primary:!0}],initialData:{}})};e.add("help",(e=>{const t=(e=>{let t={};return{get:()=>t,set:e=>{t=e}}})(),n=(e=>({addTab:t=>{const n=e.get();n[t.name]=t,e.set(n)}}))(t);(e=>{(0,e.options.register)("help_tabs",{processor:"array"})})(e);const a=w(e,t);return((e,t)=>{e.ui.registry.addButton("help",{icon:"help",tooltip:"Help",onAction:t}),e.ui.registry.addMenuItem("help",{text:"Help",icon:"help",shortcut:"Alt+0",onAction:t})})(e,a),((e,t)=>{e.addCommand("mceHelp",t)})(e,a),e.shortcuts.add("Alt+0","Open help dialog","mceHelp"),n}))}(); \ No newline at end of file diff --git a/vendor/tinymce/tinymce/plugins/image/index.js b/vendor/tinymce/tinymce/plugins/image/index.js new file mode 100644 index 00000000..092c73ad --- /dev/null +++ b/vendor/tinymce/tinymce/plugins/image/index.js @@ -0,0 +1,7 @@ +// Exports the "image" plugin for usage with module loaders +// Usage: +// CommonJS: +// require('tinymce/plugins/image') +// ES2015: +// import 'tinymce/plugins/image' +require('./plugin.js'); \ No newline at end of file diff --git a/vendor/tinymce/tinymce/plugins/image/plugin.js b/vendor/tinymce/tinymce/plugins/image/plugin.js new file mode 100644 index 00000000..e1bf9eb0 --- /dev/null +++ b/vendor/tinymce/tinymce/plugins/image/plugin.js @@ -0,0 +1,1475 @@ +/** + * TinyMCE version 6.0.2 (2022-04-27) + */ + +(function () { + 'use strict'; + + var global$4 = tinymce.util.Tools.resolve('tinymce.PluginManager'); + + const getPrototypeOf = Object.getPrototypeOf; + const hasProto = (v, constructor, predicate) => { + var _a; + if (predicate(v, constructor.prototype)) { + return true; + } else { + return ((_a = v.constructor) === null || _a === void 0 ? void 0 : _a.name) === constructor.name; + } + }; + const typeOf = x => { + const t = typeof x; + if (x === null) { + return 'null'; + } else if (t === 'object' && Array.isArray(x)) { + return 'array'; + } else if (t === 'object' && hasProto(x, String, (o, proto) => proto.isPrototypeOf(o))) { + return 'string'; + } else { + return t; + } + }; + const isType = type => value => typeOf(value) === type; + const isSimpleType = type => value => typeof value === type; + const eq = t => a => t === a; + const is = (value, constructor) => isObject(value) && hasProto(value, constructor, (o, proto) => getPrototypeOf(o) === proto); + const isString = isType('string'); + const isObject = isType('object'); + const isPlainObject = value => is(value, Object); + const isArray = isType('array'); + const isNull = eq(null); + const isBoolean = isSimpleType('boolean'); + const isNullable = a => a === null || a === undefined; + const isNonNullable = a => !isNullable(a); + const isFunction = isSimpleType('function'); + const isNumber = isSimpleType('number'); + const isArrayOf = (value, pred) => { + if (isArray(value)) { + for (let i = 0, len = value.length; i < len; ++i) { + if (!pred(value[i])) { + return false; + } + } + return true; + } + return false; + }; + + const noop = () => { + }; + + class Optional { + constructor(tag, value) { + this.tag = tag; + this.value = value; + } + static some(value) { + return new Optional(true, value); + } + static none() { + return Optional.singletonNone; + } + fold(onNone, onSome) { + if (this.tag) { + return onSome(this.value); + } else { + return onNone(); + } + } + isSome() { + return this.tag; + } + isNone() { + return !this.tag; + } + map(mapper) { + if (this.tag) { + return Optional.some(mapper(this.value)); + } else { + return Optional.none(); + } + } + bind(binder) { + if (this.tag) { + return binder(this.value); + } else { + return Optional.none(); + } + } + exists(predicate) { + return this.tag && predicate(this.value); + } + forall(predicate) { + return !this.tag || predicate(this.value); + } + filter(predicate) { + if (!this.tag || predicate(this.value)) { + return this; + } else { + return Optional.none(); + } + } + getOr(replacement) { + return this.tag ? this.value : replacement; + } + or(replacement) { + return this.tag ? this : replacement; + } + getOrThunk(thunk) { + return this.tag ? this.value : thunk(); + } + orThunk(thunk) { + return this.tag ? this : thunk(); + } + getOrDie(message) { + if (!this.tag) { + throw new Error(message !== null && message !== void 0 ? message : 'Called getOrDie on None'); + } else { + return this.value; + } + } + static from(value) { + return isNonNullable(value) ? Optional.some(value) : Optional.none(); + } + getOrNull() { + return this.tag ? this.value : null; + } + getOrUndefined() { + return this.value; + } + each(worker) { + if (this.tag) { + worker(this.value); + } + } + toArray() { + return this.tag ? [this.value] : []; + } + toString() { + return this.tag ? `some(${ this.value })` : 'none()'; + } + } + Optional.singletonNone = new Optional(false); + + const keys = Object.keys; + const hasOwnProperty = Object.hasOwnProperty; + const each = (obj, f) => { + const props = keys(obj); + for (let k = 0, len = props.length; k < len; k++) { + const i = props[k]; + const x = obj[i]; + f(x, i); + } + }; + const objAcc = r => (x, i) => { + r[i] = x; + }; + const internalFilter = (obj, pred, onTrue, onFalse) => { + const r = {}; + each(obj, (x, i) => { + (pred(x, i) ? onTrue : onFalse)(x, i); + }); + return r; + }; + const filter = (obj, pred) => { + const t = {}; + internalFilter(obj, pred, objAcc(t), noop); + return t; + }; + const has = (obj, key) => hasOwnProperty.call(obj, key); + const hasNonNullableKey = (obj, key) => has(obj, key) && obj[key] !== undefined && obj[key] !== null; + + const nativePush = Array.prototype.push; + const flatten = xs => { + const r = []; + for (let i = 0, len = xs.length; i < len; ++i) { + if (!isArray(xs[i])) { + throw new Error('Arr.flatten item ' + i + ' was not an array, input: ' + xs); + } + nativePush.apply(r, xs[i]); + } + return r; + }; + const get = (xs, i) => i >= 0 && i < xs.length ? Optional.some(xs[i]) : Optional.none(); + const head = xs => get(xs, 0); + const findMap = (arr, f) => { + for (let i = 0; i < arr.length; i++) { + const r = f(arr[i], i); + if (r.isSome()) { + return r; + } + } + return Optional.none(); + }; + + typeof window !== 'undefined' ? window : Function('return this;')(); + + const rawSet = (dom, key, value) => { + if (isString(value) || isBoolean(value) || isNumber(value)) { + dom.setAttribute(key, value + ''); + } else { + console.error('Invalid call to Attribute.set. Key ', key, ':: Value ', value, ':: Element ', dom); + throw new Error('Attribute value was not simple'); + } + }; + const set = (element, key, value) => { + rawSet(element.dom, key, value); + }; + const remove = (element, key) => { + element.dom.removeAttribute(key); + }; + + const fromHtml = (html, scope) => { + const doc = scope || document; + const div = doc.createElement('div'); + div.innerHTML = html; + if (!div.hasChildNodes() || div.childNodes.length > 1) { + const message = 'HTML does not have a single root node'; + console.error(message, html); + throw new Error(message); + } + return fromDom(div.childNodes[0]); + }; + const fromTag = (tag, scope) => { + const doc = scope || document; + const node = doc.createElement(tag); + return fromDom(node); + }; + const fromText = (text, scope) => { + const doc = scope || document; + const node = doc.createTextNode(text); + return fromDom(node); + }; + const fromDom = node => { + if (node === null || node === undefined) { + throw new Error('Node cannot be null or undefined'); + } + return { dom: node }; + }; + const fromPoint = (docElm, x, y) => Optional.from(docElm.dom.elementFromPoint(x, y)).map(fromDom); + const SugarElement = { + fromHtml, + fromTag, + fromText, + fromDom, + fromPoint + }; + + var global$3 = tinymce.util.Tools.resolve('tinymce.dom.DOMUtils'); + + var global$2 = tinymce.util.Tools.resolve('tinymce.util.URI'); + + const isNotEmpty = s => s.length > 0; + + const option = name => editor => editor.options.get(name); + const register$2 = editor => { + const registerOption = editor.options.register; + registerOption('image_dimensions', { + processor: 'boolean', + default: true + }); + registerOption('image_advtab', { + processor: 'boolean', + default: false + }); + registerOption('image_uploadtab', { + processor: 'boolean', + default: true + }); + registerOption('image_prepend_url', { + processor: 'string', + default: '' + }); + registerOption('image_class_list', { processor: 'object[]' }); + registerOption('image_description', { + processor: 'boolean', + default: true + }); + registerOption('image_title', { + processor: 'boolean', + default: false + }); + registerOption('image_caption', { + processor: 'boolean', + default: false + }); + registerOption('image_list', { + processor: value => { + const valid = value === false || isString(value) || isArrayOf(value, isObject) || isFunction(value); + return valid ? { + value, + valid + } : { + valid: false, + message: 'Must be false, a string, an array or a function.' + }; + }, + default: false + }); + }; + const hasDimensions = option('image_dimensions'); + const hasAdvTab = option('image_advtab'); + const hasUploadTab = option('image_uploadtab'); + const getPrependUrl = option('image_prepend_url'); + const getClassList = option('image_class_list'); + const hasDescription = option('image_description'); + const hasImageTitle = option('image_title'); + const hasImageCaption = option('image_caption'); + const getImageList = option('image_list'); + const showAccessibilityOptions = option('a11y_advanced_options'); + const isAutomaticUploadsEnabled = option('automatic_uploads'); + const hasUploadUrl = editor => isNotEmpty(editor.options.get('images_upload_url')); + const hasUploadHandler = editor => isNonNullable(editor.options.get('images_upload_handler')); + + const parseIntAndGetMax = (val1, val2) => Math.max(parseInt(val1, 10), parseInt(val2, 10)); + const getImageSize = url => new Promise(callback => { + const img = document.createElement('img'); + const done = dimensions => { + img.onload = img.onerror = null; + if (img.parentNode) { + img.parentNode.removeChild(img); + } + callback(dimensions); + }; + img.onload = () => { + const width = parseIntAndGetMax(img.width, img.clientWidth); + const height = parseIntAndGetMax(img.height, img.clientHeight); + const dimensions = { + width, + height + }; + done(Promise.resolve(dimensions)); + }; + img.onerror = () => { + done(Promise.reject(`Failed to get image dimensions for: ${ url }`)); + }; + const style = img.style; + style.visibility = 'hidden'; + style.position = 'fixed'; + style.bottom = style.left = '0px'; + style.width = style.height = 'auto'; + document.body.appendChild(img); + img.src = url; + }); + const removePixelSuffix = value => { + if (value) { + value = value.replace(/px$/, ''); + } + return value; + }; + const addPixelSuffix = value => { + if (value.length > 0 && /^[0-9]+$/.test(value)) { + value += 'px'; + } + return value; + }; + const mergeMargins = css => { + if (css.margin) { + const splitMargin = String(css.margin).split(' '); + switch (splitMargin.length) { + case 1: + css['margin-top'] = css['margin-top'] || splitMargin[0]; + css['margin-right'] = css['margin-right'] || splitMargin[0]; + css['margin-bottom'] = css['margin-bottom'] || splitMargin[0]; + css['margin-left'] = css['margin-left'] || splitMargin[0]; + break; + case 2: + css['margin-top'] = css['margin-top'] || splitMargin[0]; + css['margin-right'] = css['margin-right'] || splitMargin[1]; + css['margin-bottom'] = css['margin-bottom'] || splitMargin[0]; + css['margin-left'] = css['margin-left'] || splitMargin[1]; + break; + case 3: + css['margin-top'] = css['margin-top'] || splitMargin[0]; + css['margin-right'] = css['margin-right'] || splitMargin[1]; + css['margin-bottom'] = css['margin-bottom'] || splitMargin[2]; + css['margin-left'] = css['margin-left'] || splitMargin[1]; + break; + case 4: + css['margin-top'] = css['margin-top'] || splitMargin[0]; + css['margin-right'] = css['margin-right'] || splitMargin[1]; + css['margin-bottom'] = css['margin-bottom'] || splitMargin[2]; + css['margin-left'] = css['margin-left'] || splitMargin[3]; + } + delete css.margin; + } + return css; + }; + const createImageList = (editor, callback) => { + const imageList = getImageList(editor); + if (isString(imageList)) { + fetch(imageList).then(res => { + if (res.ok) { + res.json().then(callback); + } + }); + } else if (isFunction(imageList)) { + imageList(callback); + } else { + callback(imageList); + } + }; + const waitLoadImage = (editor, data, imgElm) => { + const selectImage = () => { + imgElm.onload = imgElm.onerror = null; + if (editor.selection) { + editor.selection.select(imgElm); + editor.nodeChanged(); + } + }; + imgElm.onload = () => { + if (!data.width && !data.height && hasDimensions(editor)) { + editor.dom.setAttribs(imgElm, { + width: String(imgElm.clientWidth), + height: String(imgElm.clientHeight) + }); + } + selectImage(); + }; + imgElm.onerror = selectImage; + }; + const blobToDataUri = blob => new Promise((resolve, reject) => { + const reader = new FileReader(); + reader.onload = () => { + resolve(reader.result); + }; + reader.onerror = () => { + reject(reader.error.message); + }; + reader.readAsDataURL(blob); + }); + const isPlaceholderImage = imgElm => imgElm.nodeName === 'IMG' && (imgElm.hasAttribute('data-mce-object') || imgElm.hasAttribute('data-mce-placeholder')); + const isSafeImageUrl = (editor, src) => { + const getOption = editor.options.get; + return global$2.isDomSafe(src, 'img', { + allow_html_data_urls: getOption('allow_html_data_urls'), + allow_script_urls: getOption('allow_script_urls'), + allow_svg_data_urls: getOption('allow_svg_data_urls') + }); + }; + + const DOM = global$3.DOM; + const getHspace = image => { + if (image.style.marginLeft && image.style.marginRight && image.style.marginLeft === image.style.marginRight) { + return removePixelSuffix(image.style.marginLeft); + } else { + return ''; + } + }; + const getVspace = image => { + if (image.style.marginTop && image.style.marginBottom && image.style.marginTop === image.style.marginBottom) { + return removePixelSuffix(image.style.marginTop); + } else { + return ''; + } + }; + const getBorder = image => { + if (image.style.borderWidth) { + return removePixelSuffix(image.style.borderWidth); + } else { + return ''; + } + }; + const getAttrib = (image, name) => { + if (image.hasAttribute(name)) { + return image.getAttribute(name); + } else { + return ''; + } + }; + const getStyle = (image, name) => image.style[name] ? image.style[name] : ''; + const hasCaption = image => image.parentNode !== null && image.parentNode.nodeName === 'FIGURE'; + const updateAttrib = (image, name, value) => { + if (value === '') { + image.removeAttribute(name); + } else { + image.setAttribute(name, value); + } + }; + const wrapInFigure = image => { + const figureElm = DOM.create('figure', { class: 'image' }); + DOM.insertAfter(figureElm, image); + figureElm.appendChild(image); + figureElm.appendChild(DOM.create('figcaption', { contentEditable: 'true' }, 'Caption')); + figureElm.contentEditable = 'false'; + }; + const removeFigure = image => { + const figureElm = image.parentNode; + DOM.insertAfter(image, figureElm); + DOM.remove(figureElm); + }; + const toggleCaption = image => { + if (hasCaption(image)) { + removeFigure(image); + } else { + wrapInFigure(image); + } + }; + const normalizeStyle = (image, normalizeCss) => { + const attrValue = image.getAttribute('style'); + const value = normalizeCss(attrValue !== null ? attrValue : ''); + if (value.length > 0) { + image.setAttribute('style', value); + image.setAttribute('data-mce-style', value); + } else { + image.removeAttribute('style'); + } + }; + const setSize = (name, normalizeCss) => (image, name, value) => { + if (image.style[name]) { + image.style[name] = addPixelSuffix(value); + normalizeStyle(image, normalizeCss); + } else { + updateAttrib(image, name, value); + } + }; + const getSize = (image, name) => { + if (image.style[name]) { + return removePixelSuffix(image.style[name]); + } else { + return getAttrib(image, name); + } + }; + const setHspace = (image, value) => { + const pxValue = addPixelSuffix(value); + image.style.marginLeft = pxValue; + image.style.marginRight = pxValue; + }; + const setVspace = (image, value) => { + const pxValue = addPixelSuffix(value); + image.style.marginTop = pxValue; + image.style.marginBottom = pxValue; + }; + const setBorder = (image, value) => { + const pxValue = addPixelSuffix(value); + image.style.borderWidth = pxValue; + }; + const setBorderStyle = (image, value) => { + image.style.borderStyle = value; + }; + const getBorderStyle = image => getStyle(image, 'borderStyle'); + const isFigure = elm => elm.nodeName === 'FIGURE'; + const isImage = elm => elm.nodeName === 'IMG'; + const getIsDecorative = image => DOM.getAttrib(image, 'alt').length === 0 && DOM.getAttrib(image, 'role') === 'presentation'; + const getAlt = image => { + if (getIsDecorative(image)) { + return ''; + } else { + return getAttrib(image, 'alt'); + } + }; + const defaultData = () => ({ + src: '', + alt: '', + title: '', + width: '', + height: '', + class: '', + style: '', + caption: false, + hspace: '', + vspace: '', + border: '', + borderStyle: '', + isDecorative: false + }); + const getStyleValue = (normalizeCss, data) => { + const image = document.createElement('img'); + updateAttrib(image, 'style', data.style); + if (getHspace(image) || data.hspace !== '') { + setHspace(image, data.hspace); + } + if (getVspace(image) || data.vspace !== '') { + setVspace(image, data.vspace); + } + if (getBorder(image) || data.border !== '') { + setBorder(image, data.border); + } + if (getBorderStyle(image) || data.borderStyle !== '') { + setBorderStyle(image, data.borderStyle); + } + return normalizeCss(image.getAttribute('style')); + }; + const create = (normalizeCss, data) => { + const image = document.createElement('img'); + write(normalizeCss, { + ...data, + caption: false + }, image); + setAlt(image, data.alt, data.isDecorative); + if (data.caption) { + const figure = DOM.create('figure', { class: 'image' }); + figure.appendChild(image); + figure.appendChild(DOM.create('figcaption', { contentEditable: 'true' }, 'Caption')); + figure.contentEditable = 'false'; + return figure; + } else { + return image; + } + }; + const read = (normalizeCss, image) => ({ + src: getAttrib(image, 'src'), + alt: getAlt(image), + title: getAttrib(image, 'title'), + width: getSize(image, 'width'), + height: getSize(image, 'height'), + class: getAttrib(image, 'class'), + style: normalizeCss(getAttrib(image, 'style')), + caption: hasCaption(image), + hspace: getHspace(image), + vspace: getVspace(image), + border: getBorder(image), + borderStyle: getStyle(image, 'borderStyle'), + isDecorative: getIsDecorative(image) + }); + const updateProp = (image, oldData, newData, name, set) => { + if (newData[name] !== oldData[name]) { + set(image, name, newData[name]); + } + }; + const setAlt = (image, alt, isDecorative) => { + if (isDecorative) { + DOM.setAttrib(image, 'role', 'presentation'); + const sugarImage = SugarElement.fromDom(image); + set(sugarImage, 'alt', ''); + } else { + if (isNull(alt)) { + const sugarImage = SugarElement.fromDom(image); + remove(sugarImage, 'alt'); + } else { + const sugarImage = SugarElement.fromDom(image); + set(sugarImage, 'alt', alt); + } + if (DOM.getAttrib(image, 'role') === 'presentation') { + DOM.setAttrib(image, 'role', ''); + } + } + }; + const updateAlt = (image, oldData, newData) => { + if (newData.alt !== oldData.alt || newData.isDecorative !== oldData.isDecorative) { + setAlt(image, newData.alt, newData.isDecorative); + } + }; + const normalized = (set, normalizeCss) => (image, name, value) => { + set(image, value); + normalizeStyle(image, normalizeCss); + }; + const write = (normalizeCss, newData, image) => { + const oldData = read(normalizeCss, image); + updateProp(image, oldData, newData, 'caption', (image, _name, _value) => toggleCaption(image)); + updateProp(image, oldData, newData, 'src', updateAttrib); + updateProp(image, oldData, newData, 'title', updateAttrib); + updateProp(image, oldData, newData, 'width', setSize('width', normalizeCss)); + updateProp(image, oldData, newData, 'height', setSize('height', normalizeCss)); + updateProp(image, oldData, newData, 'class', updateAttrib); + updateProp(image, oldData, newData, 'style', normalized((image, value) => updateAttrib(image, 'style', value), normalizeCss)); + updateProp(image, oldData, newData, 'hspace', normalized(setHspace, normalizeCss)); + updateProp(image, oldData, newData, 'vspace', normalized(setVspace, normalizeCss)); + updateProp(image, oldData, newData, 'border', normalized(setBorder, normalizeCss)); + updateProp(image, oldData, newData, 'borderStyle', normalized(setBorderStyle, normalizeCss)); + updateAlt(image, oldData, newData); + }; + + const normalizeCss$1 = (editor, cssText) => { + const css = editor.dom.styles.parse(cssText); + const mergedCss = mergeMargins(css); + const compressed = editor.dom.styles.parse(editor.dom.styles.serialize(mergedCss)); + return editor.dom.styles.serialize(compressed); + }; + const getSelectedImage = editor => { + const imgElm = editor.selection.getNode(); + const figureElm = editor.dom.getParent(imgElm, 'figure.image'); + if (figureElm) { + return editor.dom.select('img', figureElm)[0]; + } + if (imgElm && (imgElm.nodeName !== 'IMG' || isPlaceholderImage(imgElm))) { + return null; + } + return imgElm; + }; + const splitTextBlock = (editor, figure) => { + const dom = editor.dom; + const textBlockElements = filter(editor.schema.getTextBlockElements(), (_, parentElm) => !editor.schema.isValidChild(parentElm, 'figure')); + const textBlock = dom.getParent(figure.parentNode, node => hasNonNullableKey(textBlockElements, node.nodeName), editor.getBody()); + if (textBlock) { + return dom.split(textBlock, figure); + } else { + return figure; + } + }; + const readImageDataFromSelection = editor => { + const image = getSelectedImage(editor); + return image ? read(css => normalizeCss$1(editor, css), image) : defaultData(); + }; + const insertImageAtCaret = (editor, data) => { + const elm = create(css => normalizeCss$1(editor, css), data); + editor.dom.setAttrib(elm, 'data-mce-id', '__mcenew'); + editor.focus(); + editor.selection.setContent(elm.outerHTML); + const insertedElm = editor.dom.select('*[data-mce-id="__mcenew"]')[0]; + editor.dom.setAttrib(insertedElm, 'data-mce-id', null); + if (isFigure(insertedElm)) { + const figure = splitTextBlock(editor, insertedElm); + editor.selection.select(figure); + } else { + editor.selection.select(insertedElm); + } + }; + const syncSrcAttr = (editor, image) => { + editor.dom.setAttrib(image, 'src', image.getAttribute('src')); + }; + const deleteImage = (editor, image) => { + if (image) { + const elm = editor.dom.is(image.parentNode, 'figure.image') ? image.parentNode : image; + editor.dom.remove(elm); + editor.focus(); + editor.nodeChanged(); + if (editor.dom.isEmpty(editor.getBody())) { + editor.setContent(''); + editor.selection.setCursorLocation(); + } + } + }; + const writeImageDataToSelection = (editor, data) => { + const image = getSelectedImage(editor); + write(css => normalizeCss$1(editor, css), data, image); + syncSrcAttr(editor, image); + if (isFigure(image.parentNode)) { + const figure = image.parentNode; + splitTextBlock(editor, figure); + editor.selection.select(image.parentNode); + } else { + editor.selection.select(image); + waitLoadImage(editor, data, image); + } + }; + const sanitizeImageData = (editor, data) => { + const src = data.src; + return { + ...data, + src: isSafeImageUrl(editor, src) ? src : '' + }; + }; + const insertOrUpdateImage = (editor, partialData) => { + const image = getSelectedImage(editor); + if (image) { + const selectedImageData = read(css => normalizeCss$1(editor, css), image); + const data = { + ...selectedImageData, + ...partialData + }; + const sanitizedData = sanitizeImageData(editor, data); + if (data.src) { + writeImageDataToSelection(editor, sanitizedData); + } else { + deleteImage(editor, image); + } + } else if (partialData.src) { + insertImageAtCaret(editor, { + ...defaultData(), + ...partialData + }); + } + }; + + const deep = (old, nu) => { + const bothObjects = isPlainObject(old) && isPlainObject(nu); + return bothObjects ? deepMerge(old, nu) : nu; + }; + const baseMerge = merger => { + return (...objects) => { + if (objects.length === 0) { + throw new Error(`Can't merge zero objects`); + } + const ret = {}; + for (let j = 0; j < objects.length; j++) { + const curObject = objects[j]; + for (const key in curObject) { + if (has(curObject, key)) { + ret[key] = merger(ret[key], curObject[key]); + } + } + } + return ret; + }; + }; + const deepMerge = baseMerge(deep); + + var global$1 = tinymce.util.Tools.resolve('tinymce.util.ImageUploader'); + + var global = tinymce.util.Tools.resolve('tinymce.util.Tools'); + + const getValue = item => isString(item.value) ? item.value : ''; + const getText = item => { + if (isString(item.text)) { + return item.text; + } else if (isString(item.title)) { + return item.title; + } else { + return ''; + } + }; + const sanitizeList = (list, extractValue) => { + const out = []; + global.each(list, item => { + const text = getText(item); + if (item.menu !== undefined) { + const items = sanitizeList(item.menu, extractValue); + out.push({ + text, + items + }); + } else { + const value = extractValue(item); + out.push({ + text, + value + }); + } + }); + return out; + }; + const sanitizer = (extractor = getValue) => list => { + if (list) { + return Optional.from(list).map(list => sanitizeList(list, extractor)); + } else { + return Optional.none(); + } + }; + const sanitize = list => sanitizer(getValue)(list); + const isGroup = item => has(item, 'items'); + const findEntryDelegate = (list, value) => findMap(list, item => { + if (isGroup(item)) { + return findEntryDelegate(item.items, value); + } else if (item.value === value) { + return Optional.some(item); + } else { + return Optional.none(); + } + }); + const findEntry = (optList, value) => optList.bind(list => findEntryDelegate(list, value)); + const ListUtils = { + sanitizer, + sanitize, + findEntry + }; + + const makeTab$2 = _info => ({ + title: 'Advanced', + name: 'advanced', + items: [{ + type: 'grid', + columns: 2, + items: [ + { + type: 'input', + label: 'Vertical space', + name: 'vspace', + inputMode: 'numeric' + }, + { + type: 'input', + label: 'Horizontal space', + name: 'hspace', + inputMode: 'numeric' + }, + { + type: 'input', + label: 'Border width', + name: 'border', + inputMode: 'numeric' + }, + { + type: 'listbox', + name: 'borderstyle', + label: 'Border style', + items: [ + { + text: 'Select...', + value: '' + }, + { + text: 'Solid', + value: 'solid' + }, + { + text: 'Dotted', + value: 'dotted' + }, + { + text: 'Dashed', + value: 'dashed' + }, + { + text: 'Double', + value: 'double' + }, + { + text: 'Groove', + value: 'groove' + }, + { + text: 'Ridge', + value: 'ridge' + }, + { + text: 'Inset', + value: 'inset' + }, + { + text: 'Outset', + value: 'outset' + }, + { + text: 'None', + value: 'none' + }, + { + text: 'Hidden', + value: 'hidden' + } + ] + } + ] + }] + }); + const AdvTab = { makeTab: makeTab$2 }; + + const collect = editor => { + const urlListSanitizer = ListUtils.sanitizer(item => editor.convertURL(item.value || item.url, 'src')); + const futureImageList = new Promise(completer => { + createImageList(editor, imageList => { + completer(urlListSanitizer(imageList).map(items => flatten([ + [{ + text: 'None', + value: '' + }], + items + ]))); + }); + }); + const classList = ListUtils.sanitize(getClassList(editor)); + const hasAdvTab$1 = hasAdvTab(editor); + const hasUploadTab$1 = hasUploadTab(editor); + const hasUploadUrl$1 = hasUploadUrl(editor); + const hasUploadHandler$1 = hasUploadHandler(editor); + const image = readImageDataFromSelection(editor); + const hasDescription$1 = hasDescription(editor); + const hasImageTitle$1 = hasImageTitle(editor); + const hasDimensions$1 = hasDimensions(editor); + const hasImageCaption$1 = hasImageCaption(editor); + const hasAccessibilityOptions = showAccessibilityOptions(editor); + const automaticUploads = isAutomaticUploadsEnabled(editor); + const prependURL = Optional.some(getPrependUrl(editor)).filter(preUrl => isString(preUrl) && preUrl.length > 0); + return futureImageList.then(imageList => ({ + image, + imageList, + classList, + hasAdvTab: hasAdvTab$1, + hasUploadTab: hasUploadTab$1, + hasUploadUrl: hasUploadUrl$1, + hasUploadHandler: hasUploadHandler$1, + hasDescription: hasDescription$1, + hasImageTitle: hasImageTitle$1, + hasDimensions: hasDimensions$1, + hasImageCaption: hasImageCaption$1, + prependURL, + hasAccessibilityOptions, + automaticUploads + })); + }; + + const makeItems = info => { + const imageUrl = { + name: 'src', + type: 'urlinput', + filetype: 'image', + label: 'Source' + }; + const imageList = info.imageList.map(items => ({ + name: 'images', + type: 'listbox', + label: 'Image list', + items + })); + const imageDescription = { + name: 'alt', + type: 'input', + label: 'Alternative description', + enabled: !(info.hasAccessibilityOptions && info.image.isDecorative) + }; + const imageTitle = { + name: 'title', + type: 'input', + label: 'Image title' + }; + const imageDimensions = { + name: 'dimensions', + type: 'sizeinput' + }; + const isDecorative = { + type: 'label', + label: 'Accessibility', + items: [{ + name: 'isDecorative', + type: 'checkbox', + label: 'Image is decorative' + }] + }; + const classList = info.classList.map(items => ({ + name: 'classes', + type: 'listbox', + label: 'Class', + items + })); + const caption = { + type: 'label', + label: 'Caption', + items: [{ + type: 'checkbox', + name: 'caption', + label: 'Show caption' + }] + }; + const getDialogContainerType = useColumns => useColumns ? { + type: 'grid', + columns: 2 + } : { type: 'panel' }; + return flatten([ + [imageUrl], + imageList.toArray(), + info.hasAccessibilityOptions && info.hasDescription ? [isDecorative] : [], + info.hasDescription ? [imageDescription] : [], + info.hasImageTitle ? [imageTitle] : [], + info.hasDimensions ? [imageDimensions] : [], + [{ + ...getDialogContainerType(info.classList.isSome() && info.hasImageCaption), + items: flatten([ + classList.toArray(), + info.hasImageCaption ? [caption] : [] + ]) + }] + ]); + }; + const makeTab$1 = info => ({ + title: 'General', + name: 'general', + items: makeItems(info) + }); + const MainTab = { + makeTab: makeTab$1, + makeItems + }; + + const makeTab = _info => { + const items = [{ + type: 'dropzone', + name: 'fileinput' + }]; + return { + title: 'Upload', + name: 'upload', + items + }; + }; + const UploadTab = { makeTab }; + + const createState = info => ({ + prevImage: ListUtils.findEntry(info.imageList, info.image.src), + prevAlt: info.image.alt, + open: true + }); + const fromImageData = image => ({ + src: { + value: image.src, + meta: {} + }, + images: image.src, + alt: image.alt, + title: image.title, + dimensions: { + width: image.width, + height: image.height + }, + classes: image.class, + caption: image.caption, + style: image.style, + vspace: image.vspace, + border: image.border, + hspace: image.hspace, + borderstyle: image.borderStyle, + fileinput: [], + isDecorative: image.isDecorative + }); + const toImageData = (data, removeEmptyAlt) => ({ + src: data.src.value, + alt: data.alt.length === 0 && removeEmptyAlt ? null : data.alt, + title: data.title, + width: data.dimensions.width, + height: data.dimensions.height, + class: data.classes, + style: data.style, + caption: data.caption, + hspace: data.hspace, + vspace: data.vspace, + border: data.border, + borderStyle: data.borderstyle, + isDecorative: data.isDecorative + }); + const addPrependUrl2 = (info, srcURL) => { + if (!/^(?:[a-zA-Z]+:)?\/\//.test(srcURL)) { + return info.prependURL.bind(prependUrl => { + if (srcURL.substring(0, prependUrl.length) !== prependUrl) { + return Optional.some(prependUrl + srcURL); + } + return Optional.none(); + }); + } + return Optional.none(); + }; + const addPrependUrl = (info, api) => { + const data = api.getData(); + addPrependUrl2(info, data.src.value).each(srcURL => { + api.setData({ + src: { + value: srcURL, + meta: data.src.meta + } + }); + }); + }; + const formFillFromMeta2 = (info, data, meta) => { + if (info.hasDescription && isString(meta.alt)) { + data.alt = meta.alt; + } + if (info.hasAccessibilityOptions) { + data.isDecorative = meta.isDecorative || data.isDecorative || false; + } + if (info.hasImageTitle && isString(meta.title)) { + data.title = meta.title; + } + if (info.hasDimensions) { + if (isString(meta.width)) { + data.dimensions.width = meta.width; + } + if (isString(meta.height)) { + data.dimensions.height = meta.height; + } + } + if (isString(meta.class)) { + ListUtils.findEntry(info.classList, meta.class).each(entry => { + data.classes = entry.value; + }); + } + if (info.hasImageCaption) { + if (isBoolean(meta.caption)) { + data.caption = meta.caption; + } + } + if (info.hasAdvTab) { + if (isString(meta.style)) { + data.style = meta.style; + } + if (isString(meta.vspace)) { + data.vspace = meta.vspace; + } + if (isString(meta.border)) { + data.border = meta.border; + } + if (isString(meta.hspace)) { + data.hspace = meta.hspace; + } + if (isString(meta.borderstyle)) { + data.borderstyle = meta.borderstyle; + } + } + }; + const formFillFromMeta = (info, api) => { + const data = api.getData(); + const meta = data.src.meta; + if (meta !== undefined) { + const newData = deepMerge({}, data); + formFillFromMeta2(info, newData, meta); + api.setData(newData); + } + }; + const calculateImageSize = (helpers, info, state, api) => { + const data = api.getData(); + const url = data.src.value; + const meta = data.src.meta || {}; + if (!meta.width && !meta.height && info.hasDimensions) { + if (isNotEmpty(url)) { + helpers.imageSize(url).then(size => { + if (state.open) { + api.setData({ dimensions: size }); + } + }).catch(e => console.error(e)); + } else { + api.setData({ + dimensions: { + width: '', + height: '' + } + }); + } + } + }; + const updateImagesDropdown = (info, state, api) => { + const data = api.getData(); + const image = ListUtils.findEntry(info.imageList, data.src.value); + state.prevImage = image; + api.setData({ images: image.map(entry => entry.value).getOr('') }); + }; + const changeSrc = (helpers, info, state, api) => { + addPrependUrl(info, api); + formFillFromMeta(info, api); + calculateImageSize(helpers, info, state, api); + updateImagesDropdown(info, state, api); + }; + const changeImages = (helpers, info, state, api) => { + const data = api.getData(); + const image = ListUtils.findEntry(info.imageList, data.images); + image.each(img => { + const updateAlt = data.alt === '' || state.prevImage.map(image => image.text === data.alt).getOr(false); + if (updateAlt) { + if (img.value === '') { + api.setData({ + src: img, + alt: state.prevAlt + }); + } else { + api.setData({ + src: img, + alt: img.text + }); + } + } else { + api.setData({ src: img }); + } + }); + state.prevImage = image; + changeSrc(helpers, info, state, api); + }; + const changeFileInput = (helpers, info, state, api) => { + const data = api.getData(); + api.block('Uploading image'); + head(data.fileinput).fold(() => { + api.unblock(); + }, file => { + const blobUri = URL.createObjectURL(file); + const finalize = () => { + api.unblock(); + URL.revokeObjectURL(blobUri); + }; + const updateSrcAndSwitchTab = url => { + api.setData({ + src: { + value: url, + meta: {} + } + }); + api.showTab('general'); + changeSrc(helpers, info, state, api); + }; + blobToDataUri(file).then(dataUrl => { + const blobInfo = helpers.createBlobCache(file, blobUri, dataUrl); + if (info.automaticUploads) { + helpers.uploadImage(blobInfo).then(result => { + updateSrcAndSwitchTab(result.url); + finalize(); + }).catch(err => { + finalize(); + helpers.alertErr(err); + }); + } else { + helpers.addToBlobCache(blobInfo); + updateSrcAndSwitchTab(blobInfo.blobUri()); + api.unblock(); + } + }); + }); + }; + const changeHandler = (helpers, info, state) => (api, evt) => { + if (evt.name === 'src') { + changeSrc(helpers, info, state, api); + } else if (evt.name === 'images') { + changeImages(helpers, info, state, api); + } else if (evt.name === 'alt') { + state.prevAlt = api.getData().alt; + } else if (evt.name === 'fileinput') { + changeFileInput(helpers, info, state, api); + } else if (evt.name === 'isDecorative') { + api.setEnabled('alt', !api.getData().isDecorative); + } + }; + const closeHandler = state => () => { + state.open = false; + }; + const makeDialogBody = info => { + if (info.hasAdvTab || info.hasUploadUrl || info.hasUploadHandler) { + const tabPanel = { + type: 'tabpanel', + tabs: flatten([ + [MainTab.makeTab(info)], + info.hasAdvTab ? [AdvTab.makeTab(info)] : [], + info.hasUploadTab && (info.hasUploadUrl || info.hasUploadHandler) ? [UploadTab.makeTab(info)] : [] + ]) + }; + return tabPanel; + } else { + const panel = { + type: 'panel', + items: MainTab.makeItems(info) + }; + return panel; + } + }; + const submitHandler = (editor, info, helpers) => api => { + const data = deepMerge(fromImageData(info.image), api.getData()); + const finalData = { + ...data, + style: getStyleValue(helpers.normalizeCss, toImageData(data, false)) + }; + editor.execCommand('mceUpdateImage', false, toImageData(finalData, info.hasAccessibilityOptions)); + editor.editorUpload.uploadImagesAuto(); + api.close(); + }; + const imageSize = editor => url => { + if (!isSafeImageUrl(editor, url)) { + return Promise.resolve({ + width: '', + height: '' + }); + } else { + return getImageSize(editor.documentBaseURI.toAbsolute(url)).then(dimensions => ({ + width: String(dimensions.width), + height: String(dimensions.height) + })); + } + }; + const createBlobCache = editor => (file, blobUri, dataUrl) => editor.editorUpload.blobCache.create({ + blob: file, + blobUri, + name: file.name ? file.name.replace(/\.[^\.]+$/, '') : null, + filename: file.name, + base64: dataUrl.split(',')[1] + }); + const addToBlobCache = editor => blobInfo => { + editor.editorUpload.blobCache.add(blobInfo); + }; + const alertErr = editor => message => { + editor.windowManager.alert(message); + }; + const normalizeCss = editor => cssText => normalizeCss$1(editor, cssText); + const parseStyle = editor => cssText => editor.dom.parseStyle(cssText); + const serializeStyle = editor => (stylesArg, name) => editor.dom.serializeStyle(stylesArg, name); + const uploadImage = editor => blobInfo => global$1(editor).upload([blobInfo], false).then(results => { + if (results.length === 0) { + return Promise.reject('Failed to upload image'); + } else if (results[0].status === false) { + return Promise.reject(results[0].error.message); + } else { + return results[0]; + } + }); + const Dialog = editor => { + const helpers = { + imageSize: imageSize(editor), + addToBlobCache: addToBlobCache(editor), + createBlobCache: createBlobCache(editor), + alertErr: alertErr(editor), + normalizeCss: normalizeCss(editor), + parseStyle: parseStyle(editor), + serializeStyle: serializeStyle(editor), + uploadImage: uploadImage(editor) + }; + const open = () => { + collect(editor).then(info => { + const state = createState(info); + return { + title: 'Insert/Edit Image', + size: 'normal', + body: makeDialogBody(info), + buttons: [ + { + type: 'cancel', + name: 'cancel', + text: 'Cancel' + }, + { + type: 'submit', + name: 'save', + text: 'Save', + primary: true + } + ], + initialData: fromImageData(info.image), + onSubmit: submitHandler(editor, info, helpers), + onChange: changeHandler(helpers, info, state), + onClose: closeHandler(state) + }; + }).then(editor.windowManager.open); + }; + return { open }; + }; + + const register$1 = editor => { + editor.addCommand('mceImage', Dialog(editor).open); + editor.addCommand('mceUpdateImage', (_ui, data) => { + editor.undoManager.transact(() => insertOrUpdateImage(editor, data)); + }); + }; + + const hasImageClass = node => { + const className = node.attr('class'); + return className && /\bimage\b/.test(className); + }; + const toggleContentEditableState = state => nodes => { + let i = nodes.length; + const toggleContentEditable = node => { + node.attr('contenteditable', state ? 'true' : null); + }; + while (i--) { + const node = nodes[i]; + if (hasImageClass(node)) { + node.attr('contenteditable', state ? 'false' : null); + global.each(node.getAll('figcaption'), toggleContentEditable); + } + } + }; + const setup = editor => { + editor.on('PreInit', () => { + editor.parser.addNodeFilter('figure', toggleContentEditableState(true)); + editor.serializer.addNodeFilter('figure', toggleContentEditableState(false)); + }); + }; + + const register = editor => { + editor.ui.registry.addToggleButton('image', { + icon: 'image', + tooltip: 'Insert/edit image', + onAction: Dialog(editor).open, + onSetup: buttonApi => { + buttonApi.setActive(isNonNullable(getSelectedImage(editor))); + return editor.selection.selectorChangedWithUnbind('img:not([data-mce-object]):not([data-mce-placeholder]),figure.image', buttonApi.setActive).unbind; + } + }); + editor.ui.registry.addMenuItem('image', { + icon: 'image', + text: 'Image...', + onAction: Dialog(editor).open + }); + editor.ui.registry.addContextMenu('image', { update: element => isFigure(element) || isImage(element) && !isPlaceholderImage(element) ? ['image'] : [] }); + }; + + var Plugin = () => { + global$4.add('image', editor => { + register$2(editor); + setup(editor); + register(editor); + register$1(editor); + }); + }; + + Plugin(); + +})(); diff --git a/vendor/tinymce/tinymce/plugins/image/plugin.min.js b/vendor/tinymce/tinymce/plugins/image/plugin.min.js new file mode 100644 index 00000000..96a08116 --- /dev/null +++ b/vendor/tinymce/tinymce/plugins/image/plugin.min.js @@ -0,0 +1,4 @@ +/** + * TinyMCE version 6.0.2 (2022-04-27) + */ +!function(){"use strict";var e=tinymce.util.Tools.resolve("tinymce.PluginManager");const t=Object.getPrototypeOf,a=(e,t,a)=>{var i;return!!a(e,t.prototype)||(null===(i=e.constructor)||void 0===i?void 0:i.name)===t.name},i=e=>t=>(e=>{const t=typeof e;return null===e?"null":"object"===t&&Array.isArray(e)?"array":"object"===t&&a(e,String,((e,t)=>t.isPrototypeOf(e)))?"string":t})(t)===e,s=e=>t=>typeof t===e,r=i("string"),o=i("object"),n=e=>((e,i)=>o(e)&&a(e,i,((e,a)=>t(e)===a)))(e,Object),l=i("array"),c=(null,e=>null===e);const m=s("boolean"),d=e=>!(e=>null==e)(e),g=s("function"),p=s("number"),u=()=>{};class h{constructor(e,t){this.tag=e,this.value=t}static some(e){return new h(!0,e)}static none(){return h.singletonNone}fold(e,t){return this.tag?t(this.value):e()}isSome(){return this.tag}isNone(){return!this.tag}map(e){return this.tag?h.some(e(this.value)):h.none()}bind(e){return this.tag?e(this.value):h.none()}exists(e){return this.tag&&e(this.value)}forall(e){return!this.tag||e(this.value)}filter(e){return!this.tag||e(this.value)?this:h.none()}getOr(e){return this.tag?this.value:e}or(e){return this.tag?this:e}getOrThunk(e){return this.tag?this.value:e()}orThunk(e){return this.tag?this:e()}getOrDie(e){if(this.tag)return this.value;throw new Error(null!=e?e:"Called getOrDie on None")}static from(e){return d(e)?h.some(e):h.none()}getOrNull(){return this.tag?this.value:null}getOrUndefined(){return this.value}each(e){this.tag&&e(this.value)}toArray(){return this.tag?[this.value]:[]}toString(){return this.tag?`some(${this.value})`:"none()"}}h.singletonNone=new h(!1);const b=Object.keys,y=Object.hasOwnProperty,v=(e,t)=>y.call(e,t),f=Array.prototype.push,w=e=>{const t=[];for(let a=0,i=e.length;a{((e,t,a)=>{if(!(r(a)||m(a)||p(a)))throw console.error("Invalid call to Attribute.set. Key ",t,":: Value ",a,":: Element ",e),new Error("Attribute value was not simple");e.setAttribute(t,a+"")})(e.dom,t,a)},D=e=>{if(null==e)throw new Error("Node cannot be null or undefined");return{dom:e}},_=D;var C=tinymce.util.Tools.resolve("tinymce.dom.DOMUtils"),I=tinymce.util.Tools.resolve("tinymce.util.URI");const U=e=>e.length>0,x=e=>t=>t.options.get(e),S=x("image_dimensions"),N=x("image_advtab"),T=x("image_uploadtab"),O=x("image_prepend_url"),L=x("image_class_list"),E=x("image_description"),j=x("image_title"),M=x("image_caption"),R=x("image_list"),k=x("a11y_advanced_options"),z=x("automatic_uploads"),P=(e,t)=>Math.max(parseInt(e,10),parseInt(t,10)),B=e=>(e&&(e=e.replace(/px$/,"")),e),F=e=>(e.length>0&&/^[0-9]+$/.test(e)&&(e+="px"),e),H=e=>"IMG"===e.nodeName&&(e.hasAttribute("data-mce-object")||e.hasAttribute("data-mce-placeholder")),G=(e,t)=>{const a=e.options.get;return I.isDomSafe(t,"img",{allow_html_data_urls:a("allow_html_data_urls"),allow_script_urls:a("allow_script_urls"),allow_svg_data_urls:a("allow_svg_data_urls")})},W=C.DOM,$=e=>e.style.marginLeft&&e.style.marginRight&&e.style.marginLeft===e.style.marginRight?B(e.style.marginLeft):"",V=e=>e.style.marginTop&&e.style.marginBottom&&e.style.marginTop===e.style.marginBottom?B(e.style.marginTop):"",K=e=>e.style.borderWidth?B(e.style.borderWidth):"",Z=(e,t)=>e.hasAttribute(t)?e.getAttribute(t):"",q=(e,t)=>e.style[t]?e.style[t]:"",J=e=>null!==e.parentNode&&"FIGURE"===e.parentNode.nodeName,Q=(e,t,a)=>{""===a?e.removeAttribute(t):e.setAttribute(t,a)},X=(e,t)=>{const a=e.getAttribute("style"),i=t(null!==a?a:"");i.length>0?(e.setAttribute("style",i),e.setAttribute("data-mce-style",i)):e.removeAttribute("style")},Y=(e,t)=>(e,a,i)=>{e.style[a]?(e.style[a]=F(i),X(e,t)):Q(e,a,i)},ee=(e,t)=>e.style[t]?B(e.style[t]):Z(e,t),te=(e,t)=>{const a=F(t);e.style.marginLeft=a,e.style.marginRight=a},ae=(e,t)=>{const a=F(t);e.style.marginTop=a,e.style.marginBottom=a},ie=(e,t)=>{const a=F(t);e.style.borderWidth=a},se=(e,t)=>{e.style.borderStyle=t},re=e=>"FIGURE"===e.nodeName,oe=e=>0===W.getAttrib(e,"alt").length&&"presentation"===W.getAttrib(e,"role"),ne=e=>oe(e)?"":Z(e,"alt"),le=(e,t)=>{const a=document.createElement("img");return Q(a,"style",t.style),($(a)||""!==t.hspace)&&te(a,t.hspace),(V(a)||""!==t.vspace)&&ae(a,t.vspace),(K(a)||""!==t.border)&&ie(a,t.border),((e=>q(e,"borderStyle"))(a)||""!==t.borderStyle)&&se(a,t.borderStyle),e(a.getAttribute("style"))},ce=(e,t)=>({src:Z(t,"src"),alt:ne(t),title:Z(t,"title"),width:ee(t,"width"),height:ee(t,"height"),class:Z(t,"class"),style:e(Z(t,"style")),caption:J(t),hspace:$(t),vspace:V(t),border:K(t),borderStyle:q(t,"borderStyle"),isDecorative:oe(t)}),me=(e,t,a,i,s)=>{a[i]!==t[i]&&s(e,i,a[i])},de=(e,t,a)=>{if(a){W.setAttrib(e,"role","presentation");const t=_(e);A(t,"alt","")}else{if(c(t)){"alt",_(e).dom.removeAttribute("alt")}else{const a=_(e);A(a,"alt",t)}"presentation"===W.getAttrib(e,"role")&&W.setAttrib(e,"role","")}},ge=(e,t)=>(a,i,s)=>{e(a,s),X(a,t)},pe=(e,t,a)=>{const i=ce(e,a);me(a,i,t,"caption",((e,t,a)=>(e=>{J(e)?(e=>{const t=e.parentNode;W.insertAfter(e,t),W.remove(t)})(e):(e=>{const t=W.create("figure",{class:"image"});W.insertAfter(t,e),t.appendChild(e),t.appendChild(W.create("figcaption",{contentEditable:"true"},"Caption")),t.contentEditable="false"})(e)})(e))),me(a,i,t,"src",Q),me(a,i,t,"title",Q),me(a,i,t,"width",Y(0,e)),me(a,i,t,"height",Y(0,e)),me(a,i,t,"class",Q),me(a,i,t,"style",ge(((e,t)=>Q(e,"style",t)),e)),me(a,i,t,"hspace",ge(te,e)),me(a,i,t,"vspace",ge(ae,e)),me(a,i,t,"border",ge(ie,e)),me(a,i,t,"borderStyle",ge(se,e)),((e,t,a)=>{a.alt===t.alt&&a.isDecorative===t.isDecorative||de(e,a.alt,a.isDecorative)})(a,i,t)},ue=(e,t)=>{const a=(e=>{if(e.margin){const t=String(e.margin).split(" ");switch(t.length){case 1:e["margin-top"]=e["margin-top"]||t[0],e["margin-right"]=e["margin-right"]||t[0],e["margin-bottom"]=e["margin-bottom"]||t[0],e["margin-left"]=e["margin-left"]||t[0];break;case 2:e["margin-top"]=e["margin-top"]||t[0],e["margin-right"]=e["margin-right"]||t[1],e["margin-bottom"]=e["margin-bottom"]||t[0],e["margin-left"]=e["margin-left"]||t[1];break;case 3:e["margin-top"]=e["margin-top"]||t[0],e["margin-right"]=e["margin-right"]||t[1],e["margin-bottom"]=e["margin-bottom"]||t[2],e["margin-left"]=e["margin-left"]||t[1];break;case 4:e["margin-top"]=e["margin-top"]||t[0],e["margin-right"]=e["margin-right"]||t[1],e["margin-bottom"]=e["margin-bottom"]||t[2],e["margin-left"]=e["margin-left"]||t[3]}delete e.margin}return e})(e.dom.styles.parse(t)),i=e.dom.styles.parse(e.dom.styles.serialize(a));return e.dom.styles.serialize(i)},he=e=>{const t=e.selection.getNode(),a=e.dom.getParent(t,"figure.image");return a?e.dom.select("img",a)[0]:t&&("IMG"!==t.nodeName||H(t))?null:t},be=(e,t)=>{const a=e.dom,i=((t,a)=>{const i={};var s;return((e,t,a,i)=>{((e,t)=>{const a=b(e);for(let i=0,s=a.length;i{(t(e,s)?a:i)(e,s)}))})(t,((t,a)=>!e.schema.isValidChild(a,"figure")),(s=i,(e,t)=>{s[t]=e}),u),i})(e.schema.getTextBlockElements()),s=a.getParent(t.parentNode,(e=>{return t=i,a=e.nodeName,v(t,a)&&void 0!==t[a]&&null!==t[a];var t,a}),e.getBody());return s?a.split(s,t):t},ye=(e,t)=>{const a=((t,a)=>{const i=document.createElement("img");if(pe((t=>ue(e,t)),{...a,caption:!1},i),de(i,a.alt,a.isDecorative),a.caption){const e=W.create("figure",{class:"image"});return e.appendChild(i),e.appendChild(W.create("figcaption",{contentEditable:"true"},"Caption")),e.contentEditable="false",e}return i})(0,t);e.dom.setAttrib(a,"data-mce-id","__mcenew"),e.focus(),e.selection.setContent(a.outerHTML);const i=e.dom.select('*[data-mce-id="__mcenew"]')[0];if(e.dom.setAttrib(i,"data-mce-id",null),re(i)){const t=be(e,i);e.selection.select(t)}else e.selection.select(i)},ve=(e,t)=>{const a=he(e);if(a){const i={...ce((t=>ue(e,t)),a),...t},s=((e,t)=>{const a=t.src;return{...t,src:G(e,a)?a:""}})(e,i);i.src?((e,t)=>{const a=he(e);if(pe((t=>ue(e,t)),t,a),((e,t)=>{e.dom.setAttrib(t,"src",t.getAttribute("src"))})(e,a),re(a.parentNode)){const t=a.parentNode;be(e,t),e.selection.select(a.parentNode)}else e.selection.select(a),((e,t,a)=>{const i=()=>{a.onload=a.onerror=null,e.selection&&(e.selection.select(a),e.nodeChanged())};a.onload=()=>{t.width||t.height||!S(e)||e.dom.setAttribs(a,{width:String(a.clientWidth),height:String(a.clientHeight)}),i()},a.onerror=i})(e,t,a)})(e,s):((e,t)=>{if(t){const a=e.dom.is(t.parentNode,"figure.image")?t.parentNode:t;e.dom.remove(a),e.focus(),e.nodeChanged(),e.dom.isEmpty(e.getBody())&&(e.setContent(""),e.selection.setCursorLocation())}})(e,a)}else t.src&&ye(e,{src:"",alt:"",title:"",width:"",height:"",class:"",style:"",caption:!1,hspace:"",vspace:"",border:"",borderStyle:"",isDecorative:!1,...t})},fe=(we=(e,t)=>n(e)&&n(t)?fe(e,t):t,(...e)=>{if(0===e.length)throw new Error("Can't merge zero objects");const t={};for(let a=0;ar(e.value)?e.value:"",Ce=(e,t)=>{const a=[];return De.each(e,(e=>{const i=(e=>r(e.text)?e.text:r(e.title)?e.title:"")(e);if(void 0!==e.menu){const s=Ce(e.menu,t);a.push({text:i,items:s})}else{const s=t(e);a.push({text:i,value:s})}})),a},Ie=(e=_e)=>t=>t?h.from(t).map((t=>Ce(t,e))):h.none(),Ue=(e,t)=>((e,a)=>{for(let a=0;av(e,"items"))(i=e[a])?Ue(i.items,t):i.value===t?h.some(i):h.none();if(s.isSome())return s}var i;return h.none()})(e),xe=Ie,Se=(e,t)=>e.bind((e=>Ue(e,t))),Ne=e=>{const t=xe((t=>e.convertURL(t.value||t.url,"src"))),a=new Promise((a=>{((e,t)=>{const a=R(e);r(a)?fetch(a).then((e=>{e.ok&&e.json().then(t)})):g(a)?a(t):t(a)})(e,(e=>{a(t(e).map((e=>w([[{text:"None",value:""}],e]))))}))})),i=(A=L(e),Ie(_e)(A)),s=N(e),o=T(e),n=(e=>U(e.options.get("images_upload_url")))(e),l=(e=>d(e.options.get("images_upload_handler")))(e),c=(e=>{const t=he(e);return t?ce((t=>ue(e,t)),t):{src:"",alt:"",title:"",width:"",height:"",class:"",style:"",caption:!1,hspace:"",vspace:"",border:"",borderStyle:"",isDecorative:!1}})(e),m=E(e),p=j(e),u=S(e),b=M(e),y=k(e),v=z(e),f=h.some(O(e)).filter((e=>r(e)&&e.length>0));var A;return a.then((e=>({image:c,imageList:e,classList:i,hasAdvTab:s,hasUploadTab:o,hasUploadUrl:n,hasUploadHandler:l,hasDescription:m,hasImageTitle:p,hasDimensions:u,hasImageCaption:b,prependURL:f,hasAccessibilityOptions:y,automaticUploads:v})))},Te=e=>{const t=e.imageList.map((e=>({name:"images",type:"listbox",label:"Image list",items:e}))),a={name:"alt",type:"input",label:"Alternative description",enabled:!(e.hasAccessibilityOptions&&e.image.isDecorative)},i=e.classList.map((e=>({name:"classes",type:"listbox",label:"Class",items:e})));return w([[{name:"src",type:"urlinput",filetype:"image",label:"Source"}],t.toArray(),e.hasAccessibilityOptions&&e.hasDescription?[{type:"label",label:"Accessibility",items:[{name:"isDecorative",type:"checkbox",label:"Image is decorative"}]}]:[],e.hasDescription?[a]:[],e.hasImageTitle?[{name:"title",type:"input",label:"Image title"}]:[],e.hasDimensions?[{name:"dimensions",type:"sizeinput"}]:[],[{...(s=e.classList.isSome()&&e.hasImageCaption,s?{type:"grid",columns:2}:{type:"panel"}),items:w([i.toArray(),e.hasImageCaption?[{type:"label",label:"Caption",items:[{type:"checkbox",name:"caption",label:"Show caption"}]}]:[]])}]]);var s},Oe=e=>({title:"General",name:"general",items:Te(e)}),Le=Te,Ee=e=>({src:{value:e.src,meta:{}},images:e.src,alt:e.alt,title:e.title,dimensions:{width:e.width,height:e.height},classes:e.class,caption:e.caption,style:e.style,vspace:e.vspace,border:e.border,hspace:e.hspace,borderstyle:e.borderStyle,fileinput:[],isDecorative:e.isDecorative}),je=(e,t)=>({src:e.src.value,alt:0===e.alt.length&&t?null:e.alt,title:e.title,width:e.dimensions.width,height:e.dimensions.height,class:e.classes,style:e.style,caption:e.caption,hspace:e.hspace,vspace:e.vspace,border:e.border,borderStyle:e.borderstyle,isDecorative:e.isDecorative}),Me=(e,t,a,i)=>{((e,t)=>{const a=t.getData();((e,t)=>/^(?:[a-zA-Z]+:)?\/\//.test(t)?h.none():e.prependURL.bind((e=>t.substring(0,e.length)!==e?h.some(e+t):h.none())))(e,a.src.value).each((e=>{t.setData({src:{value:e,meta:a.src.meta}})}))})(t,i),((e,t)=>{const a=t.getData(),i=a.src.meta;if(void 0!==i){const s=fe({},a);((e,t,a)=>{e.hasDescription&&r(a.alt)&&(t.alt=a.alt),e.hasAccessibilityOptions&&(t.isDecorative=a.isDecorative||t.isDecorative||!1),e.hasImageTitle&&r(a.title)&&(t.title=a.title),e.hasDimensions&&(r(a.width)&&(t.dimensions.width=a.width),r(a.height)&&(t.dimensions.height=a.height)),r(a.class)&&Se(e.classList,a.class).each((e=>{t.classes=e.value})),e.hasImageCaption&&m(a.caption)&&(t.caption=a.caption),e.hasAdvTab&&(r(a.style)&&(t.style=a.style),r(a.vspace)&&(t.vspace=a.vspace),r(a.border)&&(t.border=a.border),r(a.hspace)&&(t.hspace=a.hspace),r(a.borderstyle)&&(t.borderstyle=a.borderstyle))})(e,s,i),t.setData(s)}})(t,i),((e,t,a,i)=>{const s=i.getData(),r=s.src.value,o=s.src.meta||{};o.width||o.height||!t.hasDimensions||(U(r)?e.imageSize(r).then((e=>{a.open&&i.setData({dimensions:e})})).catch((e=>console.error(e))):i.setData({dimensions:{width:"",height:""}}))})(e,t,a,i),((e,t,a)=>{const i=a.getData(),s=Se(e.imageList,i.src.value);t.prevImage=s,a.setData({images:s.map((e=>e.value)).getOr("")})})(t,a,i)},Re=(e,t,a,i)=>{const s=i.getData();var r;i.block("Uploading image"),(r=s.fileinput,((e,t)=>0{i.unblock()}),(s=>{const r=URL.createObjectURL(s),o=()=>{i.unblock(),URL.revokeObjectURL(r)},n=s=>{i.setData({src:{value:s,meta:{}}}),i.showTab("general"),Me(e,t,a,i)};var l;(l=s,new Promise(((e,t)=>{const a=new FileReader;a.onload=()=>{e(a.result)},a.onerror=()=>{t(a.error.message)},a.readAsDataURL(l)}))).then((a=>{const l=e.createBlobCache(s,r,a);t.automaticUploads?e.uploadImage(l).then((e=>{n(e.url),o()})).catch((t=>{o(),e.alertErr(t)})):(e.addToBlobCache(l),n(l.blobUri()),i.unblock())}))}))},ke=(e,t,a)=>(i,s)=>{"src"===s.name?Me(e,t,a,i):"images"===s.name?((e,t,a,i)=>{const s=i.getData(),r=Se(t.imageList,s.images);r.each((e=>{const t=""===s.alt||a.prevImage.map((e=>e.text===s.alt)).getOr(!1);t?""===e.value?i.setData({src:e,alt:a.prevAlt}):i.setData({src:e,alt:e.text}):i.setData({src:e})})),a.prevImage=r,Me(e,t,a,i)})(e,t,a,i):"alt"===s.name?a.prevAlt=i.getData().alt:"fileinput"===s.name?Re(e,t,a,i):"isDecorative"===s.name&&i.setEnabled("alt",!i.getData().isDecorative)},ze=e=>()=>{e.open=!1},Pe=e=>e.hasAdvTab||e.hasUploadUrl||e.hasUploadHandler?{type:"tabpanel",tabs:w([[Oe(e)],e.hasAdvTab?[{title:"Advanced",name:"advanced",items:[{type:"grid",columns:2,items:[{type:"input",label:"Vertical space",name:"vspace",inputMode:"numeric"},{type:"input",label:"Horizontal space",name:"hspace",inputMode:"numeric"},{type:"input",label:"Border width",name:"border",inputMode:"numeric"},{type:"listbox",name:"borderstyle",label:"Border style",items:[{text:"Select...",value:""},{text:"Solid",value:"solid"},{text:"Dotted",value:"dotted"},{text:"Dashed",value:"dashed"},{text:"Double",value:"double"},{text:"Groove",value:"groove"},{text:"Ridge",value:"ridge"},{text:"Inset",value:"inset"},{text:"Outset",value:"outset"},{text:"None",value:"none"},{text:"Hidden",value:"hidden"}]}]}]}]:[],e.hasUploadTab&&(e.hasUploadUrl||e.hasUploadHandler)?[{title:"Upload",name:"upload",items:[{type:"dropzone",name:"fileinput"}]}]:[]])}:{type:"panel",items:Le(e)},Be=(e,t,a)=>i=>{const s=fe(Ee(t.image),i.getData()),r={...s,style:le(a.normalizeCss,je(s,!1))};e.execCommand("mceUpdateImage",!1,je(r,t.hasAccessibilityOptions)),e.editorUpload.uploadImagesAuto(),i.close()},Fe=e=>t=>G(e,t)?(e=>new Promise((t=>{const a=document.createElement("img"),i=e=>{a.onload=a.onerror=null,a.parentNode&&a.parentNode.removeChild(a),t(e)};a.onload=()=>{const e={width:P(a.width,a.clientWidth),height:P(a.height,a.clientHeight)};i(Promise.resolve(e))},a.onerror=()=>{i(Promise.reject(`Failed to get image dimensions for: ${e}`))};const s=a.style;s.visibility="hidden",s.position="fixed",s.bottom=s.left="0px",s.width=s.height="auto",document.body.appendChild(a),a.src=e})))(e.documentBaseURI.toAbsolute(t)).then((e=>({width:String(e.width),height:String(e.height)}))):Promise.resolve({width:"",height:""}),He=e=>(t,a,i)=>e.editorUpload.blobCache.create({blob:t,blobUri:a,name:t.name?t.name.replace(/\.[^\.]+$/,""):null,filename:t.name,base64:i.split(",")[1]}),Ge=e=>t=>{e.editorUpload.blobCache.add(t)},We=e=>t=>{e.windowManager.alert(t)},$e=e=>t=>ue(e,t),Ve=e=>t=>e.dom.parseStyle(t),Ke=e=>(t,a)=>e.dom.serializeStyle(t,a),Ze=e=>t=>Ae(e).upload([t],!1).then((e=>0===e.length?Promise.reject("Failed to upload image"):!1===e[0].status?Promise.reject(e[0].error.message):e[0])),qe=e=>{const t={imageSize:Fe(e),addToBlobCache:Ge(e),createBlobCache:He(e),alertErr:We(e),normalizeCss:$e(e),parseStyle:Ve(e),serializeStyle:Ke(e),uploadImage:Ze(e)};return{open:()=>{Ne(e).then((a=>{const i=(e=>({prevImage:Se(e.imageList,e.image.src),prevAlt:e.image.alt,open:!0}))(a);return{title:"Insert/Edit Image",size:"normal",body:Pe(a),buttons:[{type:"cancel",name:"cancel",text:"Cancel"},{type:"submit",name:"save",text:"Save",primary:!0}],initialData:Ee(a.image),onSubmit:Be(e,a,t),onChange:ke(t,a,i),onClose:ze(i)}})).then(e.windowManager.open)}}},Je=e=>{const t=e.attr("class");return t&&/\bimage\b/.test(t)},Qe=e=>t=>{let a=t.length;const i=t=>{t.attr("contenteditable",e?"true":null)};for(;a--;){const s=t[a];Je(s)&&(s.attr("contenteditable",e?"false":null),De.each(s.getAll("figcaption"),i))}};e.add("image",(e=>{(e=>{const t=e.options.register;t("image_dimensions",{processor:"boolean",default:!0}),t("image_advtab",{processor:"boolean",default:!1}),t("image_uploadtab",{processor:"boolean",default:!0}),t("image_prepend_url",{processor:"string",default:""}),t("image_class_list",{processor:"object[]"}),t("image_description",{processor:"boolean",default:!0}),t("image_title",{processor:"boolean",default:!1}),t("image_caption",{processor:"boolean",default:!1}),t("image_list",{processor:e=>{const t=!1===e||r(e)||((e,t)=>{if(l(e)){for(let a=0,i=e.length;a{e.on("PreInit",(()=>{e.parser.addNodeFilter("figure",Qe(!0)),e.serializer.addNodeFilter("figure",Qe(!1))}))})(e),(e=>{e.ui.registry.addToggleButton("image",{icon:"image",tooltip:"Insert/edit image",onAction:qe(e).open,onSetup:t=>(t.setActive(d(he(e))),e.selection.selectorChangedWithUnbind("img:not([data-mce-object]):not([data-mce-placeholder]),figure.image",t.setActive).unbind)}),e.ui.registry.addMenuItem("image",{icon:"image",text:"Image...",onAction:qe(e).open}),e.ui.registry.addContextMenu("image",{update:e=>re(e)||"IMG"===e.nodeName&&!H(e)?["image"]:[]})})(e),(e=>{e.addCommand("mceImage",qe(e).open),e.addCommand("mceUpdateImage",((t,a)=>{e.undoManager.transact((()=>ve(e,a)))}))})(e)}))}(); \ No newline at end of file diff --git a/vendor/tinymce/tinymce/plugins/importcss/index.js b/vendor/tinymce/tinymce/plugins/importcss/index.js new file mode 100644 index 00000000..b78264c9 --- /dev/null +++ b/vendor/tinymce/tinymce/plugins/importcss/index.js @@ -0,0 +1,7 @@ +// Exports the "importcss" plugin for usage with module loaders +// Usage: +// CommonJS: +// require('tinymce/plugins/importcss') +// ES2015: +// import 'tinymce/plugins/importcss' +require('./plugin.js'); \ No newline at end of file diff --git a/vendor/tinymce/tinymce/plugins/importcss/plugin.js b/vendor/tinymce/tinymce/plugins/importcss/plugin.js new file mode 100644 index 00000000..3c31dd84 --- /dev/null +++ b/vendor/tinymce/tinymce/plugins/importcss/plugin.js @@ -0,0 +1,342 @@ +/** + * TinyMCE version 6.0.2 (2022-04-27) + */ + +(function () { + 'use strict'; + + var global$4 = tinymce.util.Tools.resolve('tinymce.PluginManager'); + + const hasProto = (v, constructor, predicate) => { + var _a; + if (predicate(v, constructor.prototype)) { + return true; + } else { + return ((_a = v.constructor) === null || _a === void 0 ? void 0 : _a.name) === constructor.name; + } + }; + const typeOf = x => { + const t = typeof x; + if (x === null) { + return 'null'; + } else if (t === 'object' && Array.isArray(x)) { + return 'array'; + } else if (t === 'object' && hasProto(x, String, (o, proto) => proto.isPrototypeOf(o))) { + return 'string'; + } else { + return t; + } + }; + const isType = type => value => typeOf(value) === type; + const isSimpleType = type => value => typeof value === type; + const isString = isType('string'); + const isObject = isType('object'); + const isArray = isType('array'); + const isFunction = isSimpleType('function'); + + var global$3 = tinymce.util.Tools.resolve('tinymce.dom.DOMUtils'); + + var global$2 = tinymce.util.Tools.resolve('tinymce.EditorManager'); + + var global$1 = tinymce.util.Tools.resolve('tinymce.Env'); + + var global = tinymce.util.Tools.resolve('tinymce.util.Tools'); + + const option = name => editor => editor.options.get(name); + const register = editor => { + const registerOption = editor.options.register; + const filterProcessor = value => isString(value) || isFunction(value) || isObject(value); + registerOption('importcss_merge_classes', { + processor: 'boolean', + default: true + }); + registerOption('importcss_exclusive', { + processor: 'boolean', + default: true + }); + registerOption('importcss_selector_converter', { processor: 'function' }); + registerOption('importcss_selector_filter', { processor: filterProcessor }); + registerOption('importcss_file_filter', { processor: filterProcessor }); + registerOption('importcss_groups', { processor: 'object[]' }); + registerOption('importcss_append', { + processor: 'boolean', + default: false + }); + }; + const shouldMergeClasses = option('importcss_merge_classes'); + const shouldImportExclusive = option('importcss_exclusive'); + const getSelectorConverter = option('importcss_selector_converter'); + const getSelectorFilter = option('importcss_selector_filter'); + const getCssGroups = option('importcss_groups'); + const shouldAppend = option('importcss_append'); + const getFileFilter = option('importcss_file_filter'); + const getSkin = option('skin'); + const getSkinUrl = option('skin_url'); + + const nativePush = Array.prototype.push; + const map = (xs, f) => { + const len = xs.length; + const r = new Array(len); + for (let i = 0; i < len; i++) { + const x = xs[i]; + r[i] = f(x, i); + } + return r; + }; + const flatten = xs => { + const r = []; + for (let i = 0, len = xs.length; i < len; ++i) { + if (!isArray(xs[i])) { + throw new Error('Arr.flatten item ' + i + ' was not an array, input: ' + xs); + } + nativePush.apply(r, xs[i]); + } + return r; + }; + const bind = (xs, f) => flatten(map(xs, f)); + + const generate = () => { + const ungroupedOrder = []; + const groupOrder = []; + const groups = {}; + const addItemToGroup = (groupTitle, itemInfo) => { + if (groups[groupTitle]) { + groups[groupTitle].push(itemInfo); + } else { + groupOrder.push(groupTitle); + groups[groupTitle] = [itemInfo]; + } + }; + const addItem = itemInfo => { + ungroupedOrder.push(itemInfo); + }; + const toFormats = () => { + const groupItems = bind(groupOrder, g => { + const items = groups[g]; + return items.length === 0 ? [] : [{ + title: g, + items + }]; + }); + return groupItems.concat(ungroupedOrder); + }; + return { + addItemToGroup, + addItem, + toFormats + }; + }; + + const internalEditorStyle = /^\.(?:ephox|tiny-pageembed|mce)(?:[.-]+\w+)+$/; + const removeCacheSuffix = url => { + const cacheSuffix = global$1.cacheSuffix; + if (isString(url)) { + url = url.replace('?' + cacheSuffix, '').replace('&' + cacheSuffix, ''); + } + return url; + }; + const isSkinContentCss = (editor, href) => { + const skin = getSkin(editor); + if (skin) { + const skinUrlBase = getSkinUrl(editor); + const skinUrl = skinUrlBase ? editor.documentBaseURI.toAbsolute(skinUrlBase) : global$2.baseURL + '/skins/ui/' + skin; + const contentSkinUrlPart = global$2.baseURL + '/skins/content/'; + return href === skinUrl + '/content' + (editor.inline ? '.inline' : '') + '.min.css' || href.indexOf(contentSkinUrlPart) !== -1; + } + return false; + }; + const compileFilter = filter => { + if (isString(filter)) { + return value => { + return value.indexOf(filter) !== -1; + }; + } else if (filter instanceof RegExp) { + return value => { + return filter.test(value); + }; + } + return filter; + }; + const isCssImportRule = rule => rule.styleSheet; + const isCssPageRule = rule => rule.selectorText; + const getSelectors = (editor, doc, fileFilter) => { + const selectors = []; + const contentCSSUrls = {}; + const append = (styleSheet, imported) => { + let href = styleSheet.href, rules; + href = removeCacheSuffix(href); + if (!href || !fileFilter(href, imported) || isSkinContentCss(editor, href)) { + return; + } + global.each(styleSheet.imports, styleSheet => { + append(styleSheet, true); + }); + try { + rules = styleSheet.cssRules || styleSheet.rules; + } catch (e) { + } + global.each(rules, cssRule => { + if (isCssImportRule(cssRule)) { + append(cssRule.styleSheet, true); + } else if (isCssPageRule(cssRule)) { + global.each(cssRule.selectorText.split(','), selector => { + selectors.push(global.trim(selector)); + }); + } + }); + }; + global.each(editor.contentCSS, url => { + contentCSSUrls[url] = true; + }); + if (!fileFilter) { + fileFilter = (href, imported) => { + return imported || contentCSSUrls[href]; + }; + } + try { + global.each(doc.styleSheets, styleSheet => { + append(styleSheet); + }); + } catch (e) { + } + return selectors; + }; + const defaultConvertSelectorToFormat = (editor, selectorText) => { + let format; + const selector = /^(?:([a-z0-9\-_]+))?(\.[a-z0-9_\-\.]+)$/i.exec(selectorText); + if (!selector) { + return; + } + const elementName = selector[1]; + const classes = selector[2].substr(1).split('.').join(' '); + const inlineSelectorElements = global.makeMap('a,img'); + if (selector[1]) { + format = { title: selectorText }; + if (editor.schema.getTextBlockElements()[elementName]) { + format.block = elementName; + } else if (editor.schema.getBlockElements()[elementName] || inlineSelectorElements[elementName.toLowerCase()]) { + format.selector = elementName; + } else { + format.inline = elementName; + } + } else if (selector[2]) { + format = { + inline: 'span', + title: selectorText.substr(1), + classes + }; + } + if (shouldMergeClasses(editor)) { + format.classes = classes; + } else { + format.attributes = { class: classes }; + } + return format; + }; + const getGroupsBySelector = (groups, selector) => { + return global.grep(groups, group => { + return !group.filter || group.filter(selector); + }); + }; + const compileUserDefinedGroups = groups => { + return global.map(groups, group => { + return global.extend({}, group, { + original: group, + selectors: {}, + filter: compileFilter(group.filter) + }); + }); + }; + const isExclusiveMode = (editor, group) => { + return group === null || shouldImportExclusive(editor); + }; + const isUniqueSelector = (editor, selector, group, globallyUniqueSelectors) => { + return !(isExclusiveMode(editor, group) ? selector in globallyUniqueSelectors : selector in group.selectors); + }; + const markUniqueSelector = (editor, selector, group, globallyUniqueSelectors) => { + if (isExclusiveMode(editor, group)) { + globallyUniqueSelectors[selector] = true; + } else { + group.selectors[selector] = true; + } + }; + const convertSelectorToFormat = (editor, plugin, selector, group) => { + let selectorConverter; + if (group && group.selector_converter) { + selectorConverter = group.selector_converter; + } else if (getSelectorConverter(editor)) { + selectorConverter = getSelectorConverter(editor); + } else { + selectorConverter = () => { + return defaultConvertSelectorToFormat(editor, selector); + }; + } + return selectorConverter.call(plugin, selector, group); + }; + const setup = editor => { + editor.on('init', () => { + const model = generate(); + const globallyUniqueSelectors = {}; + const selectorFilter = compileFilter(getSelectorFilter(editor)); + const groups = compileUserDefinedGroups(getCssGroups(editor)); + const processSelector = (selector, group) => { + if (isUniqueSelector(editor, selector, group, globallyUniqueSelectors)) { + markUniqueSelector(editor, selector, group, globallyUniqueSelectors); + const format = convertSelectorToFormat(editor, editor.plugins.importcss, selector, group); + if (format) { + const formatName = format.name || global$3.DOM.uniqueId(); + editor.formatter.register(formatName, format); + return { + title: format.title, + format: formatName + }; + } + } + return null; + }; + global.each(getSelectors(editor, editor.getDoc(), compileFilter(getFileFilter(editor))), selector => { + if (!internalEditorStyle.test(selector)) { + if (!selectorFilter || selectorFilter(selector)) { + const selectorGroups = getGroupsBySelector(groups, selector); + if (selectorGroups.length > 0) { + global.each(selectorGroups, group => { + const menuItem = processSelector(selector, group); + if (menuItem) { + model.addItemToGroup(group.title, menuItem); + } + }); + } else { + const menuItem = processSelector(selector, null); + if (menuItem) { + model.addItem(menuItem); + } + } + } + } + }); + const items = model.toFormats(); + editor.dispatch('addStyleModifications', { + items, + replace: !shouldAppend(editor) + }); + }); + }; + + const get = editor => { + const convertSelectorToFormat = selectorText => { + return defaultConvertSelectorToFormat(editor, selectorText); + }; + return { convertSelectorToFormat }; + }; + + var Plugin = () => { + global$4.add('importcss', editor => { + register(editor); + setup(editor); + return get(editor); + }); + }; + + Plugin(); + +})(); diff --git a/vendor/tinymce/tinymce/plugins/importcss/plugin.min.js b/vendor/tinymce/tinymce/plugins/importcss/plugin.min.js new file mode 100644 index 00000000..4e2ed0c7 --- /dev/null +++ b/vendor/tinymce/tinymce/plugins/importcss/plugin.min.js @@ -0,0 +1,4 @@ +/** + * TinyMCE version 6.0.2 (2022-04-27) + */ +!function(){"use strict";var e=tinymce.util.Tools.resolve("tinymce.PluginManager");const t=e=>t=>(e=>{const t=typeof e;return null===e?"null":"object"===t&&Array.isArray(e)?"array":"object"===t&&(s=r=e,(o=String).prototype.isPrototypeOf(s)||(null===(n=r.constructor)||void 0===n?void 0:n.name)===o.name)?"string":t;var s,r,o,n})(t)===e,s=t("string"),r=t("object"),o=t("array"),n=("function",e=>"function"==typeof e);var c=tinymce.util.Tools.resolve("tinymce.dom.DOMUtils"),i=tinymce.util.Tools.resolve("tinymce.EditorManager"),l=tinymce.util.Tools.resolve("tinymce.Env"),a=tinymce.util.Tools.resolve("tinymce.util.Tools");const p=e=>t=>t.options.get(e),u=p("importcss_merge_classes"),m=p("importcss_exclusive"),f=p("importcss_selector_converter"),y=p("importcss_selector_filter"),d=p("importcss_groups"),h=p("importcss_append"),_=p("importcss_file_filter"),g=p("skin"),v=p("skin_url"),b=Array.prototype.push,x=/^\.(?:ephox|tiny-pageembed|mce)(?:[.-]+\w+)+$/,T=e=>s(e)?t=>-1!==t.indexOf(e):e instanceof RegExp?t=>e.test(t):e,S=(e,t)=>{let s;const r=/^(?:([a-z0-9\-_]+))?(\.[a-z0-9_\-\.]+)$/i.exec(t);if(!r)return;const o=r[1],n=r[2].substr(1).split(".").join(" "),c=a.makeMap("a,img");return r[1]?(s={title:t},e.schema.getTextBlockElements()[o]?s.block=o:e.schema.getBlockElements()[o]||c[o.toLowerCase()]?s.selector=o:s.inline=o):r[2]&&(s={inline:"span",title:t.substr(1),classes:n}),u(e)?s.classes=n:s.attributes={class:n},s},k=(e,t)=>null===t||m(e),w=e=>{e.on("init",(()=>{const t=(()=>{const e=[],t=[],s={};return{addItemToGroup:(e,r)=>{s[e]?s[e].push(r):(t.push(e),s[e]=[r])},addItem:t=>{e.push(t)},toFormats:()=>{return(r=t,n=e=>{const t=s[e];return 0===t.length?[]:[{title:e,items:t}]},(e=>{const t=[];for(let s=0,r=e.length;s{const s=e.length,r=new Array(s);for(let o=0;oa.map(e,(e=>a.extend({},e,{original:e,selectors:{},filter:T(e.filter)}))))(d(e)),u=(t,s)=>{if(((e,t,s,r)=>!(k(e,s)?t in r:t in s.selectors))(e,t,s,r)){((e,t,s,r)=>{k(e,s)?r[t]=!0:s.selectors[t]=!0})(e,t,s,r);const o=((e,t,s,r)=>{let o;return o=r&&r.selector_converter?r.selector_converter:f(e)?f(e):()=>S(e,s),o.call(t,s,r)})(e,e.plugins.importcss,t,s);if(o){const t=o.name||c.DOM.uniqueId();return e.formatter.register(t,o),{title:o.title,format:t}}}return null};a.each(((e,t,r)=>{const o=[],n={},c=(t,n)=>{let p,u=t.href;if(u=(e=>{const t=l.cacheSuffix;return s(e)&&(e=e.replace("?"+t,"").replace("&"+t,"")),e})(u),u&&r(u,n)&&!((e,t)=>{const s=g(e);if(s){const r=v(e),o=r?e.documentBaseURI.toAbsolute(r):i.baseURL+"/skins/ui/"+s,n=i.baseURL+"/skins/content/";return t===o+"/content"+(e.inline?".inline":"")+".min.css"||-1!==t.indexOf(n)}return!1})(e,u)){a.each(t.imports,(e=>{c(e,!0)}));try{p=t.cssRules||t.rules}catch(e){}a.each(p,(e=>{e.styleSheet?c(e.styleSheet,!0):e.selectorText&&a.each(e.selectorText.split(","),(e=>{o.push(a.trim(e))}))}))}};a.each(e.contentCSS,(e=>{n[e]=!0})),r||(r=(e,t)=>t||n[e]);try{a.each(t.styleSheets,(e=>{c(e)}))}catch(e){}return o})(e,e.getDoc(),T(_(e))),(e=>{if(!x.test(e)&&(!n||n(e))){const s=((e,t)=>a.grep(e,(e=>!e.filter||e.filter(t))))(p,e);if(s.length>0)a.each(s,(s=>{const r=u(e,s);r&&t.addItemToGroup(s.title,r)}));else{const s=u(e,null);s&&t.addItem(s)}}}));const m=t.toFormats();e.dispatch("addStyleModifications",{items:m,replace:!h(e)})}))};e.add("importcss",(e=>((e=>{const t=e.options.register,o=e=>s(e)||n(e)||r(e);t("importcss_merge_classes",{processor:"boolean",default:!0}),t("importcss_exclusive",{processor:"boolean",default:!0}),t("importcss_selector_converter",{processor:"function"}),t("importcss_selector_filter",{processor:o}),t("importcss_file_filter",{processor:o}),t("importcss_groups",{processor:"object[]"}),t("importcss_append",{processor:"boolean",default:!1})})(e),w(e),(e=>({convertSelectorToFormat:t=>S(e,t)}))(e))))}(); \ No newline at end of file diff --git a/vendor/tinymce/tinymce/plugins/insertdatetime/index.js b/vendor/tinymce/tinymce/plugins/insertdatetime/index.js new file mode 100644 index 00000000..22a7f6e1 --- /dev/null +++ b/vendor/tinymce/tinymce/plugins/insertdatetime/index.js @@ -0,0 +1,7 @@ +// Exports the "insertdatetime" plugin for usage with module loaders +// Usage: +// CommonJS: +// require('tinymce/plugins/insertdatetime') +// ES2015: +// import 'tinymce/plugins/insertdatetime' +require('./plugin.js'); \ No newline at end of file diff --git a/vendor/tinymce/tinymce/plugins/insertdatetime/plugin.js b/vendor/tinymce/tinymce/plugins/insertdatetime/plugin.js new file mode 100644 index 00000000..c0f3c8c9 --- /dev/null +++ b/vendor/tinymce/tinymce/plugins/insertdatetime/plugin.js @@ -0,0 +1,176 @@ +/** + * TinyMCE version 6.0.2 (2022-04-27) + */ + +(function () { + 'use strict'; + + var global$1 = tinymce.util.Tools.resolve('tinymce.PluginManager'); + + const option = name => editor => editor.options.get(name); + const register$2 = editor => { + const registerOption = editor.options.register; + registerOption('insertdatetime_dateformat', { + processor: 'string', + default: editor.translate('%Y-%m-%d') + }); + registerOption('insertdatetime_timeformat', { + processor: 'string', + default: editor.translate('%H:%M:%S') + }); + registerOption('insertdatetime_formats', { + processor: 'string[]', + default: [ + '%H:%M:%S', + '%Y-%m-%d', + '%I:%M:%S %p', + '%D' + ] + }); + registerOption('insertdatetime_element', { + processor: 'boolean', + default: false + }); + }; + const getDateFormat = option('insertdatetime_dateformat'); + const getTimeFormat = option('insertdatetime_timeformat'); + const getFormats = option('insertdatetime_formats'); + const shouldInsertTimeElement = option('insertdatetime_element'); + const getDefaultDateTime = editor => { + const formats = getFormats(editor); + return formats.length > 0 ? formats[0] : getTimeFormat(editor); + }; + + const daysShort = 'Sun Mon Tue Wed Thu Fri Sat Sun'.split(' '); + const daysLong = 'Sunday Monday Tuesday Wednesday Thursday Friday Saturday Sunday'.split(' '); + const monthsShort = 'Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec'.split(' '); + const monthsLong = 'January February March April May June July August September October November December'.split(' '); + const addZeros = (value, len) => { + value = '' + value; + if (value.length < len) { + for (let i = 0; i < len - value.length; i++) { + value = '0' + value; + } + } + return value; + }; + const getDateTime = (editor, fmt, date = new Date()) => { + fmt = fmt.replace('%D', '%m/%d/%Y'); + fmt = fmt.replace('%r', '%I:%M:%S %p'); + fmt = fmt.replace('%Y', '' + date.getFullYear()); + fmt = fmt.replace('%y', '' + date.getYear()); + fmt = fmt.replace('%m', addZeros(date.getMonth() + 1, 2)); + fmt = fmt.replace('%d', addZeros(date.getDate(), 2)); + fmt = fmt.replace('%H', '' + addZeros(date.getHours(), 2)); + fmt = fmt.replace('%M', '' + addZeros(date.getMinutes(), 2)); + fmt = fmt.replace('%S', '' + addZeros(date.getSeconds(), 2)); + fmt = fmt.replace('%I', '' + ((date.getHours() + 11) % 12 + 1)); + fmt = fmt.replace('%p', '' + (date.getHours() < 12 ? 'AM' : 'PM')); + fmt = fmt.replace('%B', '' + editor.translate(monthsLong[date.getMonth()])); + fmt = fmt.replace('%b', '' + editor.translate(monthsShort[date.getMonth()])); + fmt = fmt.replace('%A', '' + editor.translate(daysLong[date.getDay()])); + fmt = fmt.replace('%a', '' + editor.translate(daysShort[date.getDay()])); + fmt = fmt.replace('%%', '%'); + return fmt; + }; + const updateElement = (editor, timeElm, computerTime, userTime) => { + const newTimeElm = editor.dom.create('time', { datetime: computerTime }, userTime); + timeElm.parentNode.insertBefore(newTimeElm, timeElm); + editor.dom.remove(timeElm); + editor.selection.select(newTimeElm, true); + editor.selection.collapse(false); + }; + const insertDateTime = (editor, format) => { + if (shouldInsertTimeElement(editor)) { + const userTime = getDateTime(editor, format); + let computerTime; + if (/%[HMSIp]/.test(format)) { + computerTime = getDateTime(editor, '%Y-%m-%dT%H:%M'); + } else { + computerTime = getDateTime(editor, '%Y-%m-%d'); + } + const timeElm = editor.dom.getParent(editor.selection.getStart(), 'time'); + if (timeElm) { + updateElement(editor, timeElm, computerTime, userTime); + } else { + editor.insertContent(''); + } + } else { + editor.insertContent(getDateTime(editor, format)); + } + }; + + const register$1 = editor => { + editor.addCommand('mceInsertDate', (_ui, value) => { + insertDateTime(editor, value !== null && value !== void 0 ? value : getDateFormat(editor)); + }); + editor.addCommand('mceInsertTime', (_ui, value) => { + insertDateTime(editor, value !== null && value !== void 0 ? value : getTimeFormat(editor)); + }); + }; + + const Cell = initial => { + let value = initial; + const get = () => { + return value; + }; + const set = v => { + value = v; + }; + return { + get, + set + }; + }; + + var global = tinymce.util.Tools.resolve('tinymce.util.Tools'); + + const register = editor => { + const formats = getFormats(editor); + const defaultFormat = Cell(getDefaultDateTime(editor)); + const insertDateTime = format => editor.execCommand('mceInsertDate', false, format); + editor.ui.registry.addSplitButton('insertdatetime', { + icon: 'insert-time', + tooltip: 'Insert date/time', + select: value => value === defaultFormat.get(), + fetch: done => { + done(global.map(formats, format => ({ + type: 'choiceitem', + text: getDateTime(editor, format), + value: format + }))); + }, + onAction: _api => { + insertDateTime(defaultFormat.get()); + }, + onItemAction: (_api, value) => { + defaultFormat.set(value); + insertDateTime(value); + } + }); + const makeMenuItemHandler = format => () => { + defaultFormat.set(format); + insertDateTime(format); + }; + editor.ui.registry.addNestedMenuItem('insertdatetime', { + icon: 'insert-time', + text: 'Date/time', + getSubmenuItems: () => global.map(formats, format => ({ + type: 'menuitem', + text: getDateTime(editor, format), + onAction: makeMenuItemHandler(format) + })) + }); + }; + + var Plugin = () => { + global$1.add('insertdatetime', editor => { + register$2(editor); + register$1(editor); + register(editor); + }); + }; + + Plugin(); + +})(); diff --git a/vendor/tinymce/tinymce/plugins/insertdatetime/plugin.min.js b/vendor/tinymce/tinymce/plugins/insertdatetime/plugin.min.js new file mode 100644 index 00000000..b89c3455 --- /dev/null +++ b/vendor/tinymce/tinymce/plugins/insertdatetime/plugin.min.js @@ -0,0 +1,4 @@ +/** + * TinyMCE version 6.0.2 (2022-04-27) + */ +!function(){"use strict";var e=tinymce.util.Tools.resolve("tinymce.PluginManager");const t=e=>t=>t.options.get(e),r=t("insertdatetime_dateformat"),a=t("insertdatetime_timeformat"),n=t("insertdatetime_formats"),s=t("insertdatetime_element"),i="Sun Mon Tue Wed Thu Fri Sat Sun".split(" "),o="Sunday Monday Tuesday Wednesday Thursday Friday Saturday Sunday".split(" "),l="Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec".split(" "),m="January February March April May June July August September October November December".split(" "),c=(e,t)=>{if((e=""+e).length(t=(t=(t=(t=(t=(t=(t=(t=(t=(t=(t=(t=(t=(t=(t=t.replace("%D","%m/%d/%Y")).replace("%r","%I:%M:%S %p")).replace("%Y",""+r.getFullYear())).replace("%y",""+r.getYear())).replace("%m",c(r.getMonth()+1,2))).replace("%d",c(r.getDate(),2))).replace("%H",""+c(r.getHours(),2))).replace("%M",""+c(r.getMinutes(),2))).replace("%S",""+c(r.getSeconds(),2))).replace("%I",""+((r.getHours()+11)%12+1))).replace("%p",r.getHours()<12?"AM":"PM")).replace("%B",""+e.translate(m[r.getMonth()]))).replace("%b",""+e.translate(l[r.getMonth()]))).replace("%A",""+e.translate(o[r.getDay()]))).replace("%a",""+e.translate(i[r.getDay()]))).replace("%%","%"),u=(e,t)=>{if(s(e)){const r=d(e,t);let a;a=/%[HMSIp]/.test(t)?d(e,"%Y-%m-%dT%H:%M"):d(e,"%Y-%m-%d");const n=e.dom.getParent(e.selection.getStart(),"time");n?((e,t,r,a)=>{const n=e.dom.create("time",{datetime:r},a);t.parentNode.insertBefore(n,t),e.dom.remove(t),e.selection.select(n,!0),e.selection.collapse(!1)})(e,n,a,r):e.insertContent('")}else e.insertContent(d(e,t))};var p=tinymce.util.Tools.resolve("tinymce.util.Tools");e.add("insertdatetime",(e=>{(e=>{const t=e.options.register;t("insertdatetime_dateformat",{processor:"string",default:e.translate("%Y-%m-%d")}),t("insertdatetime_timeformat",{processor:"string",default:e.translate("%H:%M:%S")}),t("insertdatetime_formats",{processor:"string[]",default:["%H:%M:%S","%Y-%m-%d","%I:%M:%S %p","%D"]}),t("insertdatetime_element",{processor:"boolean",default:!1})})(e),(e=>{e.addCommand("mceInsertDate",((t,a)=>{u(e,null!=a?a:r(e))})),e.addCommand("mceInsertTime",((t,r)=>{u(e,null!=r?r:a(e))}))})(e),(e=>{const t=n(e),r=(e=>{let t=e;return{get:()=>t,set:e=>{t=e}}})((e=>{const t=n(e);return t.length>0?t[0]:a(e)})(e)),s=t=>e.execCommand("mceInsertDate",!1,t);e.ui.registry.addSplitButton("insertdatetime",{icon:"insert-time",tooltip:"Insert date/time",select:e=>e===r.get(),fetch:r=>{r(p.map(t,(t=>({type:"choiceitem",text:d(e,t),value:t}))))},onAction:e=>{s(r.get())},onItemAction:(e,t)=>{r.set(t),s(t)}});const i=e=>()=>{r.set(e),s(e)};e.ui.registry.addNestedMenuItem("insertdatetime",{icon:"insert-time",text:"Date/time",getSubmenuItems:()=>p.map(t,(t=>({type:"menuitem",text:d(e,t),onAction:i(t)})))})})(e)}))}(); \ No newline at end of file diff --git a/vendor/tinymce/tinymce/plugins/link/index.js b/vendor/tinymce/tinymce/plugins/link/index.js new file mode 100644 index 00000000..ff52930f --- /dev/null +++ b/vendor/tinymce/tinymce/plugins/link/index.js @@ -0,0 +1,7 @@ +// Exports the "link" plugin for usage with module loaders +// Usage: +// CommonJS: +// require('tinymce/plugins/link') +// ES2015: +// import 'tinymce/plugins/link' +require('./plugin.js'); \ No newline at end of file diff --git a/vendor/tinymce/tinymce/plugins/link/plugin.js b/vendor/tinymce/tinymce/plugins/link/plugin.js new file mode 100644 index 00000000..8cd20809 --- /dev/null +++ b/vendor/tinymce/tinymce/plugins/link/plugin.js @@ -0,0 +1,1188 @@ +/** + * TinyMCE version 6.0.2 (2022-04-27) + */ + +(function () { + 'use strict'; + + var global$5 = tinymce.util.Tools.resolve('tinymce.PluginManager'); + + var global$4 = tinymce.util.Tools.resolve('tinymce.util.VK'); + + const hasProto = (v, constructor, predicate) => { + var _a; + if (predicate(v, constructor.prototype)) { + return true; + } else { + return ((_a = v.constructor) === null || _a === void 0 ? void 0 : _a.name) === constructor.name; + } + }; + const typeOf = x => { + const t = typeof x; + if (x === null) { + return 'null'; + } else if (t === 'object' && Array.isArray(x)) { + return 'array'; + } else if (t === 'object' && hasProto(x, String, (o, proto) => proto.isPrototypeOf(o))) { + return 'string'; + } else { + return t; + } + }; + const isType = type => value => typeOf(value) === type; + const isSimpleType = type => value => typeof value === type; + const eq = t => a => t === a; + const isString = isType('string'); + const isObject = isType('object'); + const isArray = isType('array'); + const isNull = eq(null); + const isBoolean = isSimpleType('boolean'); + const isNullable = a => a === null || a === undefined; + const isNonNullable = a => !isNullable(a); + const isFunction = isSimpleType('function'); + const isArrayOf = (value, pred) => { + if (isArray(value)) { + for (let i = 0, len = value.length; i < len; ++i) { + if (!pred(value[i])) { + return false; + } + } + return true; + } + return false; + }; + + const noop = () => { + }; + const tripleEquals = (a, b) => { + return a === b; + }; + + class Optional { + constructor(tag, value) { + this.tag = tag; + this.value = value; + } + static some(value) { + return new Optional(true, value); + } + static none() { + return Optional.singletonNone; + } + fold(onNone, onSome) { + if (this.tag) { + return onSome(this.value); + } else { + return onNone(); + } + } + isSome() { + return this.tag; + } + isNone() { + return !this.tag; + } + map(mapper) { + if (this.tag) { + return Optional.some(mapper(this.value)); + } else { + return Optional.none(); + } + } + bind(binder) { + if (this.tag) { + return binder(this.value); + } else { + return Optional.none(); + } + } + exists(predicate) { + return this.tag && predicate(this.value); + } + forall(predicate) { + return !this.tag || predicate(this.value); + } + filter(predicate) { + if (!this.tag || predicate(this.value)) { + return this; + } else { + return Optional.none(); + } + } + getOr(replacement) { + return this.tag ? this.value : replacement; + } + or(replacement) { + return this.tag ? this : replacement; + } + getOrThunk(thunk) { + return this.tag ? this.value : thunk(); + } + orThunk(thunk) { + return this.tag ? this : thunk(); + } + getOrDie(message) { + if (!this.tag) { + throw new Error(message !== null && message !== void 0 ? message : 'Called getOrDie on None'); + } else { + return this.value; + } + } + static from(value) { + return isNonNullable(value) ? Optional.some(value) : Optional.none(); + } + getOrNull() { + return this.tag ? this.value : null; + } + getOrUndefined() { + return this.value; + } + each(worker) { + if (this.tag) { + worker(this.value); + } + } + toArray() { + return this.tag ? [this.value] : []; + } + toString() { + return this.tag ? `some(${ this.value })` : 'none()'; + } + } + Optional.singletonNone = new Optional(false); + + const nativeIndexOf = Array.prototype.indexOf; + const nativePush = Array.prototype.push; + const rawIndexOf = (ts, t) => nativeIndexOf.call(ts, t); + const contains = (xs, x) => rawIndexOf(xs, x) > -1; + const map = (xs, f) => { + const len = xs.length; + const r = new Array(len); + for (let i = 0; i < len; i++) { + const x = xs[i]; + r[i] = f(x, i); + } + return r; + }; + const each$1 = (xs, f) => { + for (let i = 0, len = xs.length; i < len; i++) { + const x = xs[i]; + f(x, i); + } + }; + const foldl = (xs, f, acc) => { + each$1(xs, (x, i) => { + acc = f(acc, x, i); + }); + return acc; + }; + const flatten = xs => { + const r = []; + for (let i = 0, len = xs.length; i < len; ++i) { + if (!isArray(xs[i])) { + throw new Error('Arr.flatten item ' + i + ' was not an array, input: ' + xs); + } + nativePush.apply(r, xs[i]); + } + return r; + }; + const bind = (xs, f) => flatten(map(xs, f)); + const findMap = (arr, f) => { + for (let i = 0; i < arr.length; i++) { + const r = f(arr[i], i); + if (r.isSome()) { + return r; + } + } + return Optional.none(); + }; + + const is = (lhs, rhs, comparator = tripleEquals) => lhs.exists(left => comparator(left, rhs)); + const cat = arr => { + const r = []; + const push = x => { + r.push(x); + }; + for (let i = 0; i < arr.length; i++) { + arr[i].each(push); + } + return r; + }; + const someIf = (b, a) => b ? Optional.some(a) : Optional.none(); + + const option = name => editor => editor.options.get(name); + const register$1 = editor => { + const registerOption = editor.options.register; + registerOption('link_assume_external_targets', { + processor: value => { + const valid = isString(value) || isBoolean(value); + if (valid) { + if (value === true) { + return { + value: 1, + valid + }; + } else if (value === 'http' || value === 'https') { + return { + value, + valid + }; + } else { + return { + value: 0, + valid + }; + } + } else { + return { + valid: false, + message: 'Must be a string or a boolean.' + }; + } + }, + default: false + }); + registerOption('link_context_toolbar', { + processor: 'boolean', + default: false + }); + registerOption('link_list', { processor: value => isString(value) || isFunction(value) || isArrayOf(value, isObject) }); + registerOption('link_default_target', { processor: 'string' }); + registerOption('link_default_protocol', { + processor: 'string', + default: 'https' + }); + registerOption('link_target_list', { + processor: value => isBoolean(value) || isArrayOf(value, isObject), + default: true + }); + registerOption('link_rel_list', { + processor: 'object[]', + default: [] + }); + registerOption('link_class_list', { + processor: 'object[]', + default: [] + }); + registerOption('link_title', { + processor: 'boolean', + default: true + }); + registerOption('allow_unsafe_link_target', { + processor: 'boolean', + default: false + }); + registerOption('link_quicklink', { + processor: 'boolean', + default: false + }); + }; + const assumeExternalTargets = option('link_assume_external_targets'); + const hasContextToolbar = option('link_context_toolbar'); + const getLinkList = option('link_list'); + const getDefaultLinkTarget = option('link_default_target'); + const getDefaultLinkProtocol = option('link_default_protocol'); + const getTargetList = option('link_target_list'); + const getRelList = option('link_rel_list'); + const getLinkClassList = option('link_class_list'); + const shouldShowLinkTitle = option('link_title'); + const allowUnsafeLinkTarget = option('allow_unsafe_link_target'); + const useQuickLink = option('link_quicklink'); + + var global$3 = tinymce.util.Tools.resolve('tinymce.util.Tools'); + + const getValue = item => isString(item.value) ? item.value : ''; + const getText = item => { + if (isString(item.text)) { + return item.text; + } else if (isString(item.title)) { + return item.title; + } else { + return ''; + } + }; + const sanitizeList = (list, extractValue) => { + const out = []; + global$3.each(list, item => { + const text = getText(item); + if (item.menu !== undefined) { + const items = sanitizeList(item.menu, extractValue); + out.push({ + text, + items + }); + } else { + const value = extractValue(item); + out.push({ + text, + value + }); + } + }); + return out; + }; + const sanitizeWith = (extracter = getValue) => list => Optional.from(list).map(list => sanitizeList(list, extracter)); + const sanitize = list => sanitizeWith(getValue)(list); + const createUi = (name, label) => items => ({ + name, + type: 'listbox', + label, + items + }); + const ListOptions = { + sanitize, + sanitizeWith, + createUi, + getValue + }; + + const keys = Object.keys; + const hasOwnProperty = Object.hasOwnProperty; + const each = (obj, f) => { + const props = keys(obj); + for (let k = 0, len = props.length; k < len; k++) { + const i = props[k]; + const x = obj[i]; + f(x, i); + } + }; + const objAcc = r => (x, i) => { + r[i] = x; + }; + const internalFilter = (obj, pred, onTrue, onFalse) => { + const r = {}; + each(obj, (x, i) => { + (pred(x, i) ? onTrue : onFalse)(x, i); + }); + return r; + }; + const filter = (obj, pred) => { + const t = {}; + internalFilter(obj, pred, objAcc(t), noop); + return t; + }; + const has = (obj, key) => hasOwnProperty.call(obj, key); + const hasNonNullableKey = (obj, key) => has(obj, key) && obj[key] !== undefined && obj[key] !== null; + + var global$2 = tinymce.util.Tools.resolve('tinymce.dom.TreeWalker'); + + var global$1 = tinymce.util.Tools.resolve('tinymce.util.URI'); + + const isAnchor = elm => elm && elm.nodeName.toLowerCase() === 'a'; + const isLink = elm => isAnchor(elm) && !!getHref(elm); + const collectNodesInRange = (rng, predicate) => { + if (rng.collapsed) { + return []; + } else { + const contents = rng.cloneContents(); + const walker = new global$2(contents.firstChild, contents); + const elements = []; + let current = contents.firstChild; + do { + if (predicate(current)) { + elements.push(current); + } + } while (current = walker.next()); + return elements; + } + }; + const hasProtocol = url => /^\w+:/i.test(url); + const getHref = elm => { + const href = elm.getAttribute('data-mce-href'); + return href ? href : elm.getAttribute('href'); + }; + const applyRelTargetRules = (rel, isUnsafe) => { + const rules = ['noopener']; + const rels = rel ? rel.split(/\s+/) : []; + const toString = rels => global$3.trim(rels.sort().join(' ')); + const addTargetRules = rels => { + rels = removeTargetRules(rels); + return rels.length > 0 ? rels.concat(rules) : rules; + }; + const removeTargetRules = rels => rels.filter(val => global$3.inArray(rules, val) === -1); + const newRels = isUnsafe ? addTargetRules(rels) : removeTargetRules(rels); + return newRels.length > 0 ? toString(newRels) : ''; + }; + const trimCaretContainers = text => text.replace(/\uFEFF/g, ''); + const getAnchorElement = (editor, selectedElm) => { + selectedElm = selectedElm || editor.selection.getNode(); + if (isImageFigure(selectedElm)) { + return editor.dom.select('a[href]', selectedElm)[0]; + } else { + return editor.dom.getParent(selectedElm, 'a[href]'); + } + }; + const getAnchorText = (selection, anchorElm) => { + const text = anchorElm ? anchorElm.innerText || anchorElm.textContent : selection.getContent({ format: 'text' }); + return trimCaretContainers(text); + }; + const hasLinks = elements => global$3.grep(elements, isLink).length > 0; + const hasLinksInSelection = rng => collectNodesInRange(rng, isLink).length > 0; + const isOnlyTextSelected = editor => { + const inlineTextElements = editor.schema.getTextInlineElements(); + const isElement = elm => elm.nodeType === 1 && !isAnchor(elm) && !has(inlineTextElements, elm.nodeName.toLowerCase()); + const elements = collectNodesInRange(editor.selection.getRng(), isElement); + return elements.length === 0; + }; + const isImageFigure = elm => elm && elm.nodeName === 'FIGURE' && /\bimage\b/i.test(elm.className); + const getLinkAttrs = data => { + const attrs = [ + 'title', + 'rel', + 'class', + 'target' + ]; + return foldl(attrs, (acc, key) => { + data[key].each(value => { + acc[key] = value.length > 0 ? value : null; + }); + return acc; + }, { href: data.href }); + }; + const handleExternalTargets = (href, assumeExternalTargets) => { + if ((assumeExternalTargets === 'http' || assumeExternalTargets === 'https') && !hasProtocol(href)) { + return assumeExternalTargets + '://' + href; + } + return href; + }; + const applyLinkOverrides = (editor, linkAttrs) => { + const newLinkAttrs = { ...linkAttrs }; + if (getRelList(editor).length === 0 && !allowUnsafeLinkTarget(editor)) { + const newRel = applyRelTargetRules(newLinkAttrs.rel, newLinkAttrs.target === '_blank'); + newLinkAttrs.rel = newRel ? newRel : null; + } + if (Optional.from(newLinkAttrs.target).isNone() && getTargetList(editor) === false) { + newLinkAttrs.target = getDefaultLinkTarget(editor); + } + newLinkAttrs.href = handleExternalTargets(newLinkAttrs.href, assumeExternalTargets(editor)); + return newLinkAttrs; + }; + const updateLink = (editor, anchorElm, text, linkAttrs) => { + text.each(text => { + if (has(anchorElm, 'innerText')) { + anchorElm.innerText = text; + } else { + anchorElm.textContent = text; + } + }); + editor.dom.setAttribs(anchorElm, linkAttrs); + editor.selection.select(anchorElm); + }; + const createLink = (editor, selectedElm, text, linkAttrs) => { + if (isImageFigure(selectedElm)) { + linkImageFigure(editor, selectedElm, linkAttrs); + } else { + text.fold(() => { + editor.execCommand('mceInsertLink', false, linkAttrs); + }, text => { + editor.insertContent(editor.dom.createHTML('a', linkAttrs, editor.dom.encode(text))); + }); + } + }; + const linkDomMutation = (editor, attachState, data) => { + const selectedElm = editor.selection.getNode(); + const anchorElm = getAnchorElement(editor, selectedElm); + const linkAttrs = applyLinkOverrides(editor, getLinkAttrs(data)); + editor.undoManager.transact(() => { + if (data.href === attachState.href) { + attachState.attach(); + } + if (anchorElm) { + editor.focus(); + updateLink(editor, anchorElm, data.text, linkAttrs); + } else { + createLink(editor, selectedElm, data.text, linkAttrs); + } + }); + }; + const unlinkSelection = editor => { + const dom = editor.dom, selection = editor.selection; + const bookmark = selection.getBookmark(); + const rng = selection.getRng().cloneRange(); + const startAnchorElm = dom.getParent(rng.startContainer, 'a[href]', editor.getBody()); + const endAnchorElm = dom.getParent(rng.endContainer, 'a[href]', editor.getBody()); + if (startAnchorElm) { + rng.setStartBefore(startAnchorElm); + } + if (endAnchorElm) { + rng.setEndAfter(endAnchorElm); + } + selection.setRng(rng); + editor.execCommand('unlink'); + selection.moveToBookmark(bookmark); + }; + const unlinkDomMutation = editor => { + editor.undoManager.transact(() => { + const node = editor.selection.getNode(); + if (isImageFigure(node)) { + unlinkImageFigure(editor, node); + } else { + unlinkSelection(editor); + } + editor.focus(); + }); + }; + const unwrapOptions = data => { + const { + class: cls, + href, + rel, + target, + text, + title + } = data; + return filter({ + class: cls.getOrNull(), + href, + rel: rel.getOrNull(), + target: target.getOrNull(), + text: text.getOrNull(), + title: title.getOrNull() + }, (v, _k) => isNull(v) === false); + }; + const sanitizeData = (editor, data) => { + const getOption = editor.options.get; + const uriOptions = { + allow_html_data_urls: getOption('allow_html_data_urls'), + allow_script_urls: getOption('allow_script_urls'), + allow_svg_data_urls: getOption('allow_svg_data_urls') + }; + const href = data.href; + return { + ...data, + href: global$1.isDomSafe(href, 'a', uriOptions) ? href : '' + }; + }; + const link = (editor, attachState, data) => { + const sanitizedData = sanitizeData(editor, data); + editor.hasPlugin('rtc', true) ? editor.execCommand('createlink', false, unwrapOptions(sanitizedData)) : linkDomMutation(editor, attachState, sanitizedData); + }; + const unlink = editor => { + editor.hasPlugin('rtc', true) ? editor.execCommand('unlink') : unlinkDomMutation(editor); + }; + const unlinkImageFigure = (editor, fig) => { + const img = editor.dom.select('img', fig)[0]; + if (img) { + const a = editor.dom.getParents(img, 'a[href]', fig)[0]; + if (a) { + a.parentNode.insertBefore(img, a); + editor.dom.remove(a); + } + } + }; + const linkImageFigure = (editor, fig, attrs) => { + const img = editor.dom.select('img', fig)[0]; + if (img) { + const a = editor.dom.create('a', attrs); + img.parentNode.insertBefore(a, img); + a.appendChild(img); + } + }; + + const isListGroup = item => hasNonNullableKey(item, 'items'); + const findTextByValue = (value, catalog) => findMap(catalog, item => { + if (isListGroup(item)) { + return findTextByValue(value, item.items); + } else { + return someIf(item.value === value, item); + } + }); + const getDelta = (persistentText, fieldName, catalog, data) => { + const value = data[fieldName]; + const hasPersistentText = persistentText.length > 0; + return value !== undefined ? findTextByValue(value, catalog).map(i => ({ + url: { + value: i.value, + meta: { + text: hasPersistentText ? persistentText : i.text, + attach: noop + } + }, + text: hasPersistentText ? persistentText : i.text + })) : Optional.none(); + }; + const findCatalog = (catalogs, fieldName) => { + if (fieldName === 'link') { + return catalogs.link; + } else if (fieldName === 'anchor') { + return catalogs.anchor; + } else { + return Optional.none(); + } + }; + const init = (initialData, linkCatalog) => { + const persistentData = { + text: initialData.text, + title: initialData.title + }; + const getTitleFromUrlChange = url => someIf(persistentData.title.length <= 0, Optional.from(url.meta.title).getOr('')); + const getTextFromUrlChange = url => someIf(persistentData.text.length <= 0, Optional.from(url.meta.text).getOr(url.value)); + const onUrlChange = data => { + const text = getTextFromUrlChange(data.url); + const title = getTitleFromUrlChange(data.url); + if (text.isSome() || title.isSome()) { + return Optional.some({ + ...text.map(text => ({ text })).getOr({}), + ...title.map(title => ({ title })).getOr({}) + }); + } else { + return Optional.none(); + } + }; + const onCatalogChange = (data, change) => { + const catalog = findCatalog(linkCatalog, change.name).getOr([]); + return getDelta(persistentData.text, change.name, catalog, data); + }; + const onChange = (getData, change) => { + const name = change.name; + if (name === 'url') { + return onUrlChange(getData()); + } else if (contains([ + 'anchor', + 'link' + ], name)) { + return onCatalogChange(getData(), change); + } else if (name === 'text' || name === 'title') { + persistentData[name] = getData()[name]; + return Optional.none(); + } else { + return Optional.none(); + } + }; + return { onChange }; + }; + const DialogChanges = { + init, + getDelta + }; + + var global = tinymce.util.Tools.resolve('tinymce.util.Delay'); + + const delayedConfirm = (editor, message, callback) => { + const rng = editor.selection.getRng(); + global.setEditorTimeout(editor, () => { + editor.windowManager.confirm(message, state => { + editor.selection.setRng(rng); + callback(state); + }); + }); + }; + const tryEmailTransform = data => { + const url = data.href; + const suggestMailTo = url.indexOf('@') > 0 && url.indexOf('/') === -1 && url.indexOf('mailto:') === -1; + return suggestMailTo ? Optional.some({ + message: 'The URL you entered seems to be an email address. Do you want to add the required mailto: prefix?', + preprocess: oldData => ({ + ...oldData, + href: 'mailto:' + url + }) + }) : Optional.none(); + }; + const tryProtocolTransform = (assumeExternalTargets, defaultLinkProtocol) => data => { + const url = data.href; + const suggestProtocol = assumeExternalTargets === 1 && !hasProtocol(url) || assumeExternalTargets === 0 && /^\s*www(\.|\d\.)/i.test(url); + return suggestProtocol ? Optional.some({ + message: `The URL you entered seems to be an external link. Do you want to add the required ${ defaultLinkProtocol }:// prefix?`, + preprocess: oldData => ({ + ...oldData, + href: defaultLinkProtocol + '://' + url + }) + }) : Optional.none(); + }; + const preprocess = (editor, data) => findMap([ + tryEmailTransform, + tryProtocolTransform(assumeExternalTargets(editor), getDefaultLinkProtocol(editor)) + ], f => f(data)).fold(() => Promise.resolve(data), transform => new Promise(callback => { + delayedConfirm(editor, transform.message, state => { + callback(state ? transform.preprocess(data) : data); + }); + })); + const DialogConfirms = { preprocess }; + + const getAnchors = editor => { + const anchorNodes = editor.dom.select('a:not([href])'); + const anchors = bind(anchorNodes, anchor => { + const id = anchor.name || anchor.id; + return id ? [{ + text: id, + value: '#' + id + }] : []; + }); + return anchors.length > 0 ? Optional.some([{ + text: 'None', + value: '' + }].concat(anchors)) : Optional.none(); + }; + const AnchorListOptions = { getAnchors }; + + const getClasses = editor => { + const list = getLinkClassList(editor); + if (list.length > 0) { + return ListOptions.sanitize(list); + } + return Optional.none(); + }; + const ClassListOptions = { getClasses }; + + const parseJson = text => { + try { + return Optional.some(JSON.parse(text)); + } catch (err) { + return Optional.none(); + } + }; + const getLinks = editor => { + const extractor = item => editor.convertURL(item.value || item.url, 'href'); + const linkList = getLinkList(editor); + return new Promise(resolve => { + if (isString(linkList)) { + fetch(linkList).then(res => res.ok ? res.text().then(parseJson) : Promise.reject()).then(resolve, () => resolve(Optional.none())); + } else if (isFunction(linkList)) { + linkList(output => resolve(Optional.some(output))); + } else { + resolve(Optional.from(linkList)); + } + }).then(optItems => optItems.bind(ListOptions.sanitizeWith(extractor)).map(items => { + if (items.length > 0) { + const noneItem = [{ + text: 'None', + value: '' + }]; + return noneItem.concat(items); + } else { + return items; + } + })); + }; + const LinkListOptions = { getLinks }; + + const getRels = (editor, initialTarget) => { + const list = getRelList(editor); + if (list.length > 0) { + const isTargetBlank = is(initialTarget, '_blank'); + const enforceSafe = allowUnsafeLinkTarget(editor) === false; + const safeRelExtractor = item => applyRelTargetRules(ListOptions.getValue(item), isTargetBlank); + const sanitizer = enforceSafe ? ListOptions.sanitizeWith(safeRelExtractor) : ListOptions.sanitize; + return sanitizer(list); + } + return Optional.none(); + }; + const RelOptions = { getRels }; + + const fallbacks = [ + { + text: 'Current window', + value: '' + }, + { + text: 'New window', + value: '_blank' + } + ]; + const getTargets = editor => { + const list = getTargetList(editor); + if (isArray(list)) { + return ListOptions.sanitize(list).orThunk(() => Optional.some(fallbacks)); + } else if (list === false) { + return Optional.none(); + } + return Optional.some(fallbacks); + }; + const TargetOptions = { getTargets }; + + const nonEmptyAttr = (dom, elem, name) => { + const val = dom.getAttrib(elem, name); + return val !== null && val.length > 0 ? Optional.some(val) : Optional.none(); + }; + const extractFromAnchor = (editor, anchor) => { + const dom = editor.dom; + const onlyText = isOnlyTextSelected(editor); + const text = onlyText ? Optional.some(getAnchorText(editor.selection, anchor)) : Optional.none(); + const url = anchor ? Optional.some(dom.getAttrib(anchor, 'href')) : Optional.none(); + const target = anchor ? Optional.from(dom.getAttrib(anchor, 'target')) : Optional.none(); + const rel = nonEmptyAttr(dom, anchor, 'rel'); + const linkClass = nonEmptyAttr(dom, anchor, 'class'); + const title = nonEmptyAttr(dom, anchor, 'title'); + return { + url, + text, + title, + target, + rel, + linkClass + }; + }; + const collect = (editor, linkNode) => LinkListOptions.getLinks(editor).then(links => { + const anchor = extractFromAnchor(editor, linkNode); + return { + anchor, + catalogs: { + targets: TargetOptions.getTargets(editor), + rels: RelOptions.getRels(editor, anchor.target), + classes: ClassListOptions.getClasses(editor), + anchor: AnchorListOptions.getAnchors(editor), + link: links + }, + optNode: Optional.from(linkNode), + flags: { titleEnabled: shouldShowLinkTitle(editor) } + }; + }); + const DialogInfo = { collect }; + + const handleSubmit = (editor, info) => api => { + const data = api.getData(); + if (!data.url.value) { + unlink(editor); + api.close(); + return; + } + const getChangedValue = key => Optional.from(data[key]).filter(value => !is(info.anchor[key], value)); + const changedData = { + href: data.url.value, + text: getChangedValue('text'), + target: getChangedValue('target'), + rel: getChangedValue('rel'), + class: getChangedValue('linkClass'), + title: getChangedValue('title') + }; + const attachState = { + href: data.url.value, + attach: data.url.meta !== undefined && data.url.meta.attach ? data.url.meta.attach : noop + }; + DialogConfirms.preprocess(editor, changedData).then(pData => { + link(editor, attachState, pData); + }); + api.close(); + }; + const collectData = editor => { + const anchorNode = getAnchorElement(editor); + return DialogInfo.collect(editor, anchorNode); + }; + const getInitialData = (info, defaultTarget) => { + const anchor = info.anchor; + const url = anchor.url.getOr(''); + return { + url: { + value: url, + meta: { original: { value: url } } + }, + text: anchor.text.getOr(''), + title: anchor.title.getOr(''), + anchor: url, + link: url, + rel: anchor.rel.getOr(''), + target: anchor.target.or(defaultTarget).getOr(''), + linkClass: anchor.linkClass.getOr('') + }; + }; + const makeDialog = (settings, onSubmit, editor) => { + const urlInput = [{ + name: 'url', + type: 'urlinput', + filetype: 'file', + label: 'URL' + }]; + const displayText = settings.anchor.text.map(() => ({ + name: 'text', + type: 'input', + label: 'Text to display' + })).toArray(); + const titleText = settings.flags.titleEnabled ? [{ + name: 'title', + type: 'input', + label: 'Title' + }] : []; + const defaultTarget = Optional.from(getDefaultLinkTarget(editor)); + const initialData = getInitialData(settings, defaultTarget); + const catalogs = settings.catalogs; + const dialogDelta = DialogChanges.init(initialData, catalogs); + const body = { + type: 'panel', + items: flatten([ + urlInput, + displayText, + titleText, + cat([ + catalogs.anchor.map(ListOptions.createUi('anchor', 'Anchors')), + catalogs.rels.map(ListOptions.createUi('rel', 'Rel')), + catalogs.targets.map(ListOptions.createUi('target', 'Open link in...')), + catalogs.link.map(ListOptions.createUi('link', 'Link list')), + catalogs.classes.map(ListOptions.createUi('linkClass', 'Class')) + ]) + ]) + }; + return { + title: 'Insert/Edit Link', + size: 'normal', + body, + buttons: [ + { + type: 'cancel', + name: 'cancel', + text: 'Cancel' + }, + { + type: 'submit', + name: 'save', + text: 'Save', + primary: true + } + ], + initialData, + onChange: (api, {name}) => { + dialogDelta.onChange(api.getData, { name }).each(newData => { + api.setData(newData); + }); + }, + onSubmit + }; + }; + const open$1 = editor => { + const data = collectData(editor); + data.then(info => { + const onSubmit = handleSubmit(editor, info); + return makeDialog(info, onSubmit, editor); + }).then(spec => { + editor.windowManager.open(spec); + }); + }; + + const appendClickRemove = (link, evt) => { + document.body.appendChild(link); + link.dispatchEvent(evt); + document.body.removeChild(link); + }; + const open = url => { + const link = document.createElement('a'); + link.target = '_blank'; + link.href = url; + link.rel = 'noreferrer noopener'; + const evt = document.createEvent('MouseEvents'); + evt.initMouseEvent('click', true, true, window, 0, 0, 0, 0, 0, false, false, false, false, 0, null); + appendClickRemove(link, evt); + }; + + const getLink = (editor, elm) => editor.dom.getParent(elm, 'a[href]'); + const getSelectedLink = editor => getLink(editor, editor.selection.getStart()); + const hasOnlyAltModifier = e => { + return e.altKey === true && e.shiftKey === false && e.ctrlKey === false && e.metaKey === false; + }; + const gotoLink = (editor, a) => { + if (a) { + const href = getHref(a); + if (/^#/.test(href)) { + const targetEl = editor.dom.select(href); + if (targetEl.length) { + editor.selection.scrollIntoView(targetEl[0], true); + } + } else { + open(a.href); + } + } + }; + const openDialog = editor => () => { + open$1(editor); + }; + const gotoSelectedLink = editor => () => { + gotoLink(editor, getSelectedLink(editor)); + }; + const setupGotoLinks = editor => { + editor.on('click', e => { + const link = getLink(editor, e.target); + if (link && global$4.metaKeyPressed(e)) { + e.preventDefault(); + gotoLink(editor, link); + } + }); + editor.on('keydown', e => { + const link = getSelectedLink(editor); + if (link && e.keyCode === 13 && hasOnlyAltModifier(e)) { + e.preventDefault(); + gotoLink(editor, link); + } + }); + }; + const toggleState = (editor, toggler) => { + editor.on('NodeChange', toggler); + return () => editor.off('NodeChange', toggler); + }; + const toggleActiveState = editor => api => { + const updateState = () => api.setActive(!editor.mode.isReadOnly() && getAnchorElement(editor, editor.selection.getNode()) !== null); + updateState(); + return toggleState(editor, updateState); + }; + const toggleEnabledState = editor => api => { + const updateState = () => api.setEnabled(getAnchorElement(editor, editor.selection.getNode()) !== null); + updateState(); + return toggleState(editor, updateState); + }; + const toggleUnlinkState = editor => api => { + const hasLinks$1 = parents => hasLinks(parents) || hasLinksInSelection(editor.selection.getRng()); + const parents = editor.dom.getParents(editor.selection.getStart()); + api.setEnabled(hasLinks$1(parents)); + return toggleState(editor, e => api.setEnabled(hasLinks$1(e.parents))); + }; + + const register = editor => { + editor.addCommand('mceLink', () => { + if (useQuickLink(editor)) { + editor.dispatch('contexttoolbar-show', { toolbarKey: 'quicklink' }); + } else { + openDialog(editor)(); + } + }); + }; + + const setup = editor => { + editor.addShortcut('Meta+K', '', () => { + editor.execCommand('mceLink'); + }); + }; + + const setupButtons = editor => { + editor.ui.registry.addToggleButton('link', { + icon: 'link', + tooltip: 'Insert/edit link', + onAction: openDialog(editor), + onSetup: toggleActiveState(editor) + }); + editor.ui.registry.addButton('openlink', { + icon: 'new-tab', + tooltip: 'Open link', + onAction: gotoSelectedLink(editor), + onSetup: toggleEnabledState(editor) + }); + editor.ui.registry.addButton('unlink', { + icon: 'unlink', + tooltip: 'Remove link', + onAction: () => unlink(editor), + onSetup: toggleUnlinkState(editor) + }); + }; + const setupMenuItems = editor => { + editor.ui.registry.addMenuItem('openlink', { + text: 'Open link', + icon: 'new-tab', + onAction: gotoSelectedLink(editor), + onSetup: toggleEnabledState(editor) + }); + editor.ui.registry.addMenuItem('link', { + icon: 'link', + text: 'Link...', + shortcut: 'Meta+K', + onAction: openDialog(editor) + }); + editor.ui.registry.addMenuItem('unlink', { + icon: 'unlink', + text: 'Remove link', + onAction: () => unlink(editor), + onSetup: toggleUnlinkState(editor) + }); + }; + const setupContextMenu = editor => { + const inLink = 'link unlink openlink'; + const noLink = 'link'; + editor.ui.registry.addContextMenu('link', { update: element => hasLinks(editor.dom.getParents(element, 'a')) ? inLink : noLink }); + }; + const setupContextToolbars = editor => { + const collapseSelectionToEnd = editor => { + editor.selection.collapse(false); + }; + const onSetupLink = buttonApi => { + const node = editor.selection.getNode(); + buttonApi.setEnabled(getAnchorElement(editor, node) !== null); + return noop; + }; + const getLinkText = value => { + const anchor = getAnchorElement(editor); + const onlyText = isOnlyTextSelected(editor); + if (!anchor && onlyText) { + const text = getAnchorText(editor.selection, anchor); + return Optional.some(text.length > 0 ? text : value); + } else { + return Optional.none(); + } + }; + editor.ui.registry.addContextForm('quicklink', { + launch: { + type: 'contextformtogglebutton', + icon: 'link', + tooltip: 'Link', + onSetup: toggleActiveState(editor) + }, + label: 'Link', + predicate: node => !!getAnchorElement(editor, node) && hasContextToolbar(editor), + initValue: () => { + const elm = getAnchorElement(editor); + return !!elm ? getHref(elm) : ''; + }, + commands: [ + { + type: 'contextformtogglebutton', + icon: 'link', + tooltip: 'Link', + primary: true, + onSetup: buttonApi => { + const node = editor.selection.getNode(); + buttonApi.setActive(!!getAnchorElement(editor, node)); + return toggleActiveState(editor)(buttonApi); + }, + onAction: formApi => { + const value = formApi.getValue(); + const text = getLinkText(value); + const attachState = { + href: value, + attach: noop + }; + link(editor, attachState, { + href: value, + text, + title: Optional.none(), + rel: Optional.none(), + target: Optional.none(), + class: Optional.none() + }); + collapseSelectionToEnd(editor); + formApi.hide(); + } + }, + { + type: 'contextformbutton', + icon: 'unlink', + tooltip: 'Remove link', + onSetup: onSetupLink, + onAction: formApi => { + unlink(editor); + formApi.hide(); + } + }, + { + type: 'contextformbutton', + icon: 'new-tab', + tooltip: 'Open link', + onSetup: onSetupLink, + onAction: formApi => { + gotoSelectedLink(editor)(); + formApi.hide(); + } + } + ] + }); + }; + + var Plugin = () => { + global$5.add('link', editor => { + register$1(editor); + setupButtons(editor); + setupMenuItems(editor); + setupContextMenu(editor); + setupContextToolbars(editor); + setupGotoLinks(editor); + register(editor); + setup(editor); + }); + }; + + Plugin(); + +})(); diff --git a/vendor/tinymce/tinymce/plugins/link/plugin.min.js b/vendor/tinymce/tinymce/plugins/link/plugin.min.js new file mode 100644 index 00000000..3b80199e --- /dev/null +++ b/vendor/tinymce/tinymce/plugins/link/plugin.min.js @@ -0,0 +1,4 @@ +/** + * TinyMCE version 6.0.2 (2022-04-27) + */ +!function(){"use strict";var e=tinymce.util.Tools.resolve("tinymce.PluginManager"),t=tinymce.util.Tools.resolve("tinymce.util.VK");const n=e=>t=>(e=>{const t=typeof e;return null===e?"null":"object"===t&&Array.isArray(e)?"array":"object"===t&&(n=o=e,(r=String).prototype.isPrototypeOf(n)||(null===(l=o.constructor)||void 0===l?void 0:l.name)===r.name)?"string":t;var n,o,r,l})(t)===e,o=e=>t=>typeof t===e,r=n("string"),l=n("object"),a=n("array"),s=(null,e=>null===e);const i=o("boolean"),c=o("function"),u=(e,t)=>{if(a(e)){for(let n=0,o=e.length;n{},m=(e,t)=>e===t;class h{constructor(e,t){this.tag=e,this.value=t}static some(e){return new h(!0,e)}static none(){return h.singletonNone}fold(e,t){return this.tag?t(this.value):e()}isSome(){return this.tag}isNone(){return!this.tag}map(e){return this.tag?h.some(e(this.value)):h.none()}bind(e){return this.tag?e(this.value):h.none()}exists(e){return this.tag&&e(this.value)}forall(e){return!this.tag||e(this.value)}filter(e){return!this.tag||e(this.value)?this:h.none()}getOr(e){return this.tag?this.value:e}or(e){return this.tag?this:e}getOrThunk(e){return this.tag?this.value:e()}orThunk(e){return this.tag?this:e()}getOrDie(e){if(this.tag)return this.value;throw new Error(null!=e?e:"Called getOrDie on None")}static from(e){return null==e?h.none():h.some(e)}getOrNull(){return this.tag?this.value:null}getOrUndefined(){return this.value}each(e){this.tag&&e(this.value)}toArray(){return this.tag?[this.value]:[]}toString(){return this.tag?`some(${this.value})`:"none()"}}h.singletonNone=new h(!1);const d=Array.prototype.indexOf,p=Array.prototype.push,f=e=>{const t=[];for(let n=0,o=e.length;n{for(let n=0;ne.exists((e=>n(e,t))),y=e=>{const t=[],n=e=>{t.push(e)};for(let t=0;te?h.some(t):h.none(),_=e=>t=>t.options.get(e),b=_("link_assume_external_targets"),w=_("link_context_toolbar"),C=_("link_list"),O=_("link_default_target"),N=_("link_default_protocol"),A=_("link_target_list"),T=_("link_rel_list"),S=_("link_class_list"),E=_("link_title"),R=_("allow_unsafe_link_target"),P=_("link_quicklink");var L=tinymce.util.Tools.resolve("tinymce.util.Tools");const M=e=>r(e.value)?e.value:"",D=(e,t)=>{const n=[];return L.each(e,(e=>{const o=(e=>r(e.text)?e.text:r(e.title)?e.title:"")(e);if(void 0!==e.menu){const r=D(e.menu,t);n.push({text:o,items:r})}else{const r=t(e);n.push({text:o,value:r})}})),n},B=(e=M)=>t=>h.from(t).map((t=>D(t,e))),I=e=>B(M)(e),j=B,K=(e,t)=>n=>({name:e,type:"listbox",label:t,items:n}),U=M,q=Object.keys,F=Object.hasOwnProperty,V=(e,t)=>F.call(e,t);var $=tinymce.util.Tools.resolve("tinymce.dom.TreeWalker"),z=tinymce.util.Tools.resolve("tinymce.util.URI");const G=e=>e&&"a"===e.nodeName.toLowerCase(),H=e=>G(e)&&!!Q(e),J=(e,t)=>{if(e.collapsed)return[];{const n=e.cloneContents(),o=new $(n.firstChild,n),r=[];let l=n.firstChild;do{t(l)&&r.push(l)}while(l=o.next());return r}},W=e=>/^\w+:/i.test(e),Q=e=>e.getAttribute("data-mce-href")||e.getAttribute("href"),X=(e,t)=>{const n=["noopener"],o=e?e.split(/\s+/):[],r=e=>e.filter((e=>-1===L.inArray(n,e))),l=t?(e=>(e=r(e)).length>0?e.concat(n):n)(o):r(o);return l.length>0?(e=>L.trim(e.sort().join(" ")))(l):""},Y=(e,t)=>(t=t||e.selection.getNode(),ne(t)?e.dom.select("a[href]",t)[0]:e.dom.getParent(t,"a[href]")),Z=(e,t)=>(t?t.innerText||t.textContent:e.getContent({format:"text"})).replace(/\uFEFF/g,""),ee=e=>L.grep(e,H).length>0,te=e=>{const t=e.schema.getTextInlineElements();return 0===J(e.selection.getRng(),(e=>1===e.nodeType&&!G(e)&&!V(t,e.nodeName.toLowerCase()))).length},ne=e=>e&&"FIGURE"===e.nodeName&&/\bimage\b/i.test(e.className),oe=(e,t,n)=>{const o=e.selection.getNode(),r=Y(e,o),l=((e,t)=>{const n={...t};if(0===T(e).length&&!R(e)){const e=X(n.rel,"_blank"===n.target);n.rel=e||null}return h.from(n.target).isNone()&&!1===A(e)&&(n.target=O(e)),n.href=((e,t)=>"http"!==t&&"https"!==t||W(e)?e:t+"://"+e)(n.href,b(e)),n})(e,(e=>{return t=["title","rel","class","target"],n=(t,n)=>(e[n].each((e=>{t[n]=e.length>0?e:null})),t),o={href:e.href},((e,t)=>{for(let n=0,o=e.length;n{o=n(o,e)})),o;var t,n,o})(n));e.undoManager.transact((()=>{n.href===t.href&&t.attach(),r?(e.focus(),((e,t,n,o)=>{n.each((e=>{V(t,"innerText")?t.innerText=e:t.textContent=e})),e.dom.setAttribs(t,o),e.selection.select(t)})(e,r,n.text,l)):((e,t,n,o)=>{ne(t)?ie(e,t,o):n.fold((()=>{e.execCommand("mceInsertLink",!1,o)}),(t=>{e.insertContent(e.dom.createHTML("a",o,e.dom.encode(t)))}))})(e,o,n.text,l)}))},re=e=>{const{class:t,href:n,rel:o,target:r,text:l,title:a}=e;return((e,t)=>{const n={};var o;return((e,t,n,o)=>{((e,t)=>{const n=q(e);for(let o=0,r=n.length;o{(t(e,r)?n:o)(e,r)}))})(e,((e,t)=>!1===s(e)),(o=n,(e,t)=>{o[t]=e}),g),n})({class:t.getOrNull(),href:n,rel:o.getOrNull(),target:r.getOrNull(),text:l.getOrNull(),title:a.getOrNull()})},le=(e,t,n)=>{const o=((e,t)=>{const n=e.options.get,o={allow_html_data_urls:n("allow_html_data_urls"),allow_script_urls:n("allow_script_urls"),allow_svg_data_urls:n("allow_svg_data_urls")},r=t.href;return{...t,href:z.isDomSafe(r,"a",o)?r:""}})(e,n);e.hasPlugin("rtc",!0)?e.execCommand("createlink",!1,re(o)):oe(e,t,o)},ae=e=>{e.hasPlugin("rtc",!0)?e.execCommand("unlink"):(e=>{e.undoManager.transact((()=>{const t=e.selection.getNode();ne(t)?se(e,t):(e=>{const t=e.dom,n=e.selection,o=n.getBookmark(),r=n.getRng().cloneRange(),l=t.getParent(r.startContainer,"a[href]",e.getBody()),a=t.getParent(r.endContainer,"a[href]",e.getBody());l&&r.setStartBefore(l),a&&r.setEndAfter(a),n.setRng(r),e.execCommand("unlink"),n.moveToBookmark(o)})(e),e.focus()}))})(e)},se=(e,t)=>{const n=e.dom.select("img",t)[0];if(n){const o=e.dom.getParents(n,"a[href]",t)[0];o&&(o.parentNode.insertBefore(n,o),e.dom.remove(o))}},ie=(e,t,n)=>{const o=e.dom.select("img",t)[0];if(o){const t=e.dom.create("a",n);o.parentNode.insertBefore(t,o),t.appendChild(o)}},ce=(e,t)=>k(t,(t=>(e=>{return V(t=e,n="items")&&void 0!==t[n]&&null!==t[n];var t,n})(t)?ce(e,t.items):x(t.value===e,t))),ue=(e,t)=>{const n={text:e.text,title:e.title},o=(e,o)=>{const r=(l=t,a=o.name,"link"===a?l.link:"anchor"===a?l.anchor:h.none()).getOr([]);var l,a;return((e,t,n,o)=>{const r=o[t],l=e.length>0;return void 0!==r?ce(r,n).map((t=>({url:{value:t.value,meta:{text:l?e:t.text,attach:g}},text:l?e:t.text}))):h.none()})(n.text,o.name,r,e)};return{onChange:(e,t)=>{const r=t.name;return"url"===r?(e=>{const t=(o=e.url,x(n.text.length<=0,h.from(o.meta.text).getOr(o.value)));var o;const r=(e=>x(n.title.length<=0,h.from(e.meta.title).getOr("")))(e.url);return t.isSome()||r.isSome()?h.some({...t.map((e=>({text:e}))).getOr({}),...r.map((e=>({title:e}))).getOr({})}):h.none()})(e()):((e,t)=>d.call(e,t))(["anchor","link"],r)>-1?o(e(),t):"text"===r||"title"===r?(n[r]=e()[r],h.none()):h.none()}}};var ge=tinymce.util.Tools.resolve("tinymce.util.Delay");const me=e=>{const t=e.href;return t.indexOf("@")>0&&-1===t.indexOf("/")&&-1===t.indexOf("mailto:")?h.some({message:"The URL you entered seems to be an email address. Do you want to add the required mailto: prefix?",preprocess:e=>({...e,href:"mailto:"+t})}):h.none()},he=(e,t)=>n=>{const o=n.href;return 1===e&&!W(o)||0===e&&/^\s*www(\.|\d\.)/i.test(o)?h.some({message:`The URL you entered seems to be an external link. Do you want to add the required ${t}:// prefix?`,preprocess:e=>({...e,href:t+"://"+o})}):h.none()},de=e=>{const t=e.dom.select("a:not([href])"),n=f(((e,t)=>{const n=e.length,o=new Array(n);for(let r=0;r{const t=e.name||e.id;return t?[{text:t,value:"#"+t}]:[]})));return n.length>0?h.some([{text:"None",value:""}].concat(n)):h.none()},pe=e=>{const t=S(e);return t.length>0?I(t):h.none()},fe=e=>{try{return h.some(JSON.parse(e))}catch(e){return h.none()}},ke=(e,t)=>{const n=T(e);if(n.length>0){const o=v(t,"_blank"),r=e=>X(U(e),o);return(!1===R(e)?j(r):I)(n)}return h.none()},ve=[{text:"Current window",value:""},{text:"New window",value:"_blank"}],ye=e=>{const t=A(e);return a(t)?I(t).orThunk((()=>h.some(ve))):!1===t?h.none():h.some(ve)},xe=(e,t,n)=>{const o=e.getAttrib(t,n);return null!==o&&o.length>0?h.some(o):h.none()},_e=(e,t)=>(e=>{const t=t=>e.convertURL(t.value||t.url,"href"),n=C(e);return new Promise((e=>{r(n)?fetch(n).then((e=>e.ok?e.text().then(fe):Promise.reject())).then(e,(()=>e(h.none()))):c(n)?n((t=>e(h.some(t)))):e(h.from(n))})).then((e=>e.bind(j(t)).map((e=>e.length>0?[{text:"None",value:""}].concat(e):e))))})(e).then((n=>{const o=((e,t)=>{const n=e.dom,o=te(e)?h.some(Z(e.selection,t)):h.none(),r=t?h.some(n.getAttrib(t,"href")):h.none(),l=t?h.from(n.getAttrib(t,"target")):h.none(),a=xe(n,t,"rel"),s=xe(n,t,"class");return{url:r,text:o,title:xe(n,t,"title"),target:l,rel:a,linkClass:s}})(e,t);return{anchor:o,catalogs:{targets:ye(e),rels:ke(e,o.target),classes:pe(e),anchor:de(e),link:n},optNode:h.from(t),flags:{titleEnabled:E(e)}}})),be=e=>{const t=(e=>{const t=Y(e);return _e(e,t)})(e);t.then((t=>{const n=((e,t)=>n=>{const o=n.getData();if(!o.url.value)return ae(e),void n.close();const r=e=>h.from(o[e]).filter((n=>!v(t.anchor[e],n))),l={href:o.url.value,text:r("text"),target:r("target"),rel:r("rel"),class:r("linkClass"),title:r("title")},a={href:o.url.value,attach:void 0!==o.url.meta&&o.url.meta.attach?o.url.meta.attach:g};((e,t)=>k([me,he(b(e),N(e))],(e=>e(t))).fold((()=>Promise.resolve(t)),(n=>new Promise((o=>{((e,t,n)=>{const o=e.selection.getRng();ge.setEditorTimeout(e,(()=>{e.windowManager.confirm(t,(t=>{e.selection.setRng(o),n(t)}))}))})(e,n.message,(e=>{o(e?n.preprocess(t):t)}))})))))(e,l).then((t=>{le(e,a,t)})),n.close()})(e,t);return((e,t,n)=>{const o=e.anchor.text.map((()=>({name:"text",type:"input",label:"Text to display"}))).toArray(),r=e.flags.titleEnabled?[{name:"title",type:"input",label:"Title"}]:[],l=((e,t)=>{const n=e.anchor,o=n.url.getOr("");return{url:{value:o,meta:{original:{value:o}}},text:n.text.getOr(""),title:n.title.getOr(""),anchor:o,link:o,rel:n.rel.getOr(""),target:n.target.or(t).getOr(""),linkClass:n.linkClass.getOr("")}})(e,h.from(O(n))),a=e.catalogs,s=ue(l,a);return{title:"Insert/Edit Link",size:"normal",body:{type:"panel",items:f([[{name:"url",type:"urlinput",filetype:"file",label:"URL"}],o,r,y([a.anchor.map(K("anchor","Anchors")),a.rels.map(K("rel","Rel")),a.targets.map(K("target","Open link in...")),a.link.map(K("link","Link list")),a.classes.map(K("linkClass","Class"))])])},buttons:[{type:"cancel",name:"cancel",text:"Cancel"},{type:"submit",name:"save",text:"Save",primary:!0}],initialData:l,onChange:(e,{name:t})=>{s.onChange(e.getData,{name:t}).each((t=>{e.setData(t)}))},onSubmit:t}})(t,n,e)})).then((t=>{e.windowManager.open(t)}))},we=(e,t)=>e.dom.getParent(t,"a[href]"),Ce=e=>we(e,e.selection.getStart()),Oe=(e,t)=>{if(t){const n=Q(t);if(/^#/.test(n)){const t=e.dom.select(n);t.length&&e.selection.scrollIntoView(t[0],!0)}else(e=>{const t=document.createElement("a");t.target="_blank",t.href=e,t.rel="noreferrer noopener";const n=document.createEvent("MouseEvents");n.initMouseEvent("click",!0,!0,window,0,0,0,0,0,!1,!1,!1,!1,0,null),((e,t)=>{document.body.appendChild(e),e.dispatchEvent(t),document.body.removeChild(e)})(t,n)})(t.href)}},Ne=e=>()=>{be(e)},Ae=e=>()=>{Oe(e,Ce(e))},Te=(e,t)=>(e.on("NodeChange",t),()=>e.off("NodeChange",t)),Se=e=>t=>{const n=()=>t.setActive(!e.mode.isReadOnly()&&null!==Y(e,e.selection.getNode()));return n(),Te(e,n)},Ee=e=>t=>{const n=()=>t.setEnabled(null!==Y(e,e.selection.getNode()));return n(),Te(e,n)},Re=e=>t=>{const n=t=>{return ee(t)||(n=e.selection.getRng(),J(n,H).length>0);var n},o=e.dom.getParents(e.selection.getStart());return t.setEnabled(n(o)),Te(e,(e=>t.setEnabled(n(e.parents))))};e.add("link",(e=>{(e=>{const t=e.options.register;t("link_assume_external_targets",{processor:e=>{const t=r(e)||i(e);return t?!0===e?{value:1,valid:t}:"http"===e||"https"===e?{value:e,valid:t}:{value:0,valid:t}:{valid:!1,message:"Must be a string or a boolean."}},default:!1}),t("link_context_toolbar",{processor:"boolean",default:!1}),t("link_list",{processor:e=>r(e)||c(e)||u(e,l)}),t("link_default_target",{processor:"string"}),t("link_default_protocol",{processor:"string",default:"https"}),t("link_target_list",{processor:e=>i(e)||u(e,l),default:!0}),t("link_rel_list",{processor:"object[]",default:[]}),t("link_class_list",{processor:"object[]",default:[]}),t("link_title",{processor:"boolean",default:!0}),t("allow_unsafe_link_target",{processor:"boolean",default:!1}),t("link_quicklink",{processor:"boolean",default:!1})})(e),(e=>{e.ui.registry.addToggleButton("link",{icon:"link",tooltip:"Insert/edit link",onAction:Ne(e),onSetup:Se(e)}),e.ui.registry.addButton("openlink",{icon:"new-tab",tooltip:"Open link",onAction:Ae(e),onSetup:Ee(e)}),e.ui.registry.addButton("unlink",{icon:"unlink",tooltip:"Remove link",onAction:()=>ae(e),onSetup:Re(e)})})(e),(e=>{e.ui.registry.addMenuItem("openlink",{text:"Open link",icon:"new-tab",onAction:Ae(e),onSetup:Ee(e)}),e.ui.registry.addMenuItem("link",{icon:"link",text:"Link...",shortcut:"Meta+K",onAction:Ne(e)}),e.ui.registry.addMenuItem("unlink",{icon:"unlink",text:"Remove link",onAction:()=>ae(e),onSetup:Re(e)})})(e),(e=>{e.ui.registry.addContextMenu("link",{update:t=>ee(e.dom.getParents(t,"a"))?"link unlink openlink":"link"})})(e),(e=>{const t=t=>{const n=e.selection.getNode();return t.setEnabled(null!==Y(e,n)),g};e.ui.registry.addContextForm("quicklink",{launch:{type:"contextformtogglebutton",icon:"link",tooltip:"Link",onSetup:Se(e)},label:"Link",predicate:t=>!!Y(e,t)&&w(e),initValue:()=>{const t=Y(e);return t?Q(t):""},commands:[{type:"contextformtogglebutton",icon:"link",tooltip:"Link",primary:!0,onSetup:t=>{const n=e.selection.getNode();return t.setActive(!!Y(e,n)),Se(e)(t)},onAction:t=>{const n=t.getValue(),o=(t=>{const n=Y(e),o=te(e);if(!n&&o){const o=Z(e.selection,n);return h.some(o.length>0?o:t)}return h.none()})(n);le(e,{href:n,attach:g},{href:n,text:o,title:h.none(),rel:h.none(),target:h.none(),class:h.none()}),(e=>{e.selection.collapse(!1)})(e),t.hide()}},{type:"contextformbutton",icon:"unlink",tooltip:"Remove link",onSetup:t,onAction:t=>{ae(e),t.hide()}},{type:"contextformbutton",icon:"new-tab",tooltip:"Open link",onSetup:t,onAction:t=>{Ae(e)(),t.hide()}}]})})(e),(e=>{e.on("click",(n=>{const o=we(e,n.target);o&&t.metaKeyPressed(n)&&(n.preventDefault(),Oe(e,o))})),e.on("keydown",(t=>{const n=Ce(e);n&&13===t.keyCode&&(e=>!0===e.altKey&&!1===e.shiftKey&&!1===e.ctrlKey&&!1===e.metaKey)(t)&&(t.preventDefault(),Oe(e,n))}))})(e),(e=>{e.addCommand("mceLink",(()=>{P(e)?e.dispatch("contexttoolbar-show",{toolbarKey:"quicklink"}):Ne(e)()}))})(e),(e=>{e.addShortcut("Meta+K","",(()=>{e.execCommand("mceLink")}))})(e)}))}(); \ No newline at end of file diff --git a/vendor/tinymce/tinymce/plugins/lists/index.js b/vendor/tinymce/tinymce/plugins/lists/index.js new file mode 100644 index 00000000..c7d055ea --- /dev/null +++ b/vendor/tinymce/tinymce/plugins/lists/index.js @@ -0,0 +1,7 @@ +// Exports the "lists" plugin for usage with module loaders +// Usage: +// CommonJS: +// require('tinymce/plugins/lists') +// ES2015: +// import 'tinymce/plugins/lists' +require('./plugin.js'); \ No newline at end of file diff --git a/vendor/tinymce/tinymce/plugins/lists/plugin.js b/vendor/tinymce/tinymce/plugins/lists/plugin.js new file mode 100644 index 00000000..9558f4e6 --- /dev/null +++ b/vendor/tinymce/tinymce/plugins/lists/plugin.js @@ -0,0 +1,1757 @@ +/** + * TinyMCE version 6.0.2 (2022-04-27) + */ + +(function () { + 'use strict'; + + var global$6 = tinymce.util.Tools.resolve('tinymce.PluginManager'); + + const hasProto = (v, constructor, predicate) => { + var _a; + if (predicate(v, constructor.prototype)) { + return true; + } else { + return ((_a = v.constructor) === null || _a === void 0 ? void 0 : _a.name) === constructor.name; + } + }; + const typeOf = x => { + const t = typeof x; + if (x === null) { + return 'null'; + } else if (t === 'object' && Array.isArray(x)) { + return 'array'; + } else if (t === 'object' && hasProto(x, String, (o, proto) => proto.isPrototypeOf(o))) { + return 'string'; + } else { + return t; + } + }; + const isType$1 = type => value => typeOf(value) === type; + const isSimpleType = type => value => typeof value === type; + const isString = isType$1('string'); + const isObject = isType$1('object'); + const isArray = isType$1('array'); + const isBoolean = isSimpleType('boolean'); + const isNullable = a => a === null || a === undefined; + const isNonNullable = a => !isNullable(a); + const isFunction = isSimpleType('function'); + const isNumber = isSimpleType('number'); + + const noop = () => { + }; + const constant = value => { + return () => { + return value; + }; + }; + const tripleEquals = (a, b) => { + return a === b; + }; + const not = f => t => !f(t); + const never = constant(false); + + class Optional { + constructor(tag, value) { + this.tag = tag; + this.value = value; + } + static some(value) { + return new Optional(true, value); + } + static none() { + return Optional.singletonNone; + } + fold(onNone, onSome) { + if (this.tag) { + return onSome(this.value); + } else { + return onNone(); + } + } + isSome() { + return this.tag; + } + isNone() { + return !this.tag; + } + map(mapper) { + if (this.tag) { + return Optional.some(mapper(this.value)); + } else { + return Optional.none(); + } + } + bind(binder) { + if (this.tag) { + return binder(this.value); + } else { + return Optional.none(); + } + } + exists(predicate) { + return this.tag && predicate(this.value); + } + forall(predicate) { + return !this.tag || predicate(this.value); + } + filter(predicate) { + if (!this.tag || predicate(this.value)) { + return this; + } else { + return Optional.none(); + } + } + getOr(replacement) { + return this.tag ? this.value : replacement; + } + or(replacement) { + return this.tag ? this : replacement; + } + getOrThunk(thunk) { + return this.tag ? this.value : thunk(); + } + orThunk(thunk) { + return this.tag ? this : thunk(); + } + getOrDie(message) { + if (!this.tag) { + throw new Error(message !== null && message !== void 0 ? message : 'Called getOrDie on None'); + } else { + return this.value; + } + } + static from(value) { + return isNonNullable(value) ? Optional.some(value) : Optional.none(); + } + getOrNull() { + return this.tag ? this.value : null; + } + getOrUndefined() { + return this.value; + } + each(worker) { + if (this.tag) { + worker(this.value); + } + } + toArray() { + return this.tag ? [this.value] : []; + } + toString() { + return this.tag ? `some(${ this.value })` : 'none()'; + } + } + Optional.singletonNone = new Optional(false); + + const nativeSlice = Array.prototype.slice; + const nativeIndexOf = Array.prototype.indexOf; + const nativePush = Array.prototype.push; + const rawIndexOf = (ts, t) => nativeIndexOf.call(ts, t); + const contains$1 = (xs, x) => rawIndexOf(xs, x) > -1; + const exists = (xs, pred) => { + for (let i = 0, len = xs.length; i < len; i++) { + const x = xs[i]; + if (pred(x, i)) { + return true; + } + } + return false; + }; + const map = (xs, f) => { + const len = xs.length; + const r = new Array(len); + for (let i = 0; i < len; i++) { + const x = xs[i]; + r[i] = f(x, i); + } + return r; + }; + const each$1 = (xs, f) => { + for (let i = 0, len = xs.length; i < len; i++) { + const x = xs[i]; + f(x, i); + } + }; + const filter$1 = (xs, pred) => { + const r = []; + for (let i = 0, len = xs.length; i < len; i++) { + const x = xs[i]; + if (pred(x, i)) { + r.push(x); + } + } + return r; + }; + const groupBy = (xs, f) => { + if (xs.length === 0) { + return []; + } else { + let wasType = f(xs[0]); + const r = []; + let group = []; + for (let i = 0, len = xs.length; i < len; i++) { + const x = xs[i]; + const type = f(x); + if (type !== wasType) { + r.push(group); + group = []; + } + wasType = type; + group.push(x); + } + if (group.length !== 0) { + r.push(group); + } + return r; + } + }; + const foldl = (xs, f, acc) => { + each$1(xs, (x, i) => { + acc = f(acc, x, i); + }); + return acc; + }; + const findUntil = (xs, pred, until) => { + for (let i = 0, len = xs.length; i < len; i++) { + const x = xs[i]; + if (pred(x, i)) { + return Optional.some(x); + } else if (until(x, i)) { + break; + } + } + return Optional.none(); + }; + const find = (xs, pred) => { + return findUntil(xs, pred, never); + }; + const flatten = xs => { + const r = []; + for (let i = 0, len = xs.length; i < len; ++i) { + if (!isArray(xs[i])) { + throw new Error('Arr.flatten item ' + i + ' was not an array, input: ' + xs); + } + nativePush.apply(r, xs[i]); + } + return r; + }; + const bind = (xs, f) => flatten(map(xs, f)); + const reverse = xs => { + const r = nativeSlice.call(xs, 0); + r.reverse(); + return r; + }; + const get$1 = (xs, i) => i >= 0 && i < xs.length ? Optional.some(xs[i]) : Optional.none(); + const head = xs => get$1(xs, 0); + const last = xs => get$1(xs, xs.length - 1); + const unique = (xs, comparator) => { + const r = []; + const isDuplicated = isFunction(comparator) ? x => exists(r, i => comparator(i, x)) : x => contains$1(r, x); + for (let i = 0, len = xs.length; i < len; i++) { + const x = xs[i]; + if (!isDuplicated(x)) { + r.push(x); + } + } + return r; + }; + + const ELEMENT = 1; + + const fromHtml = (html, scope) => { + const doc = scope || document; + const div = doc.createElement('div'); + div.innerHTML = html; + if (!div.hasChildNodes() || div.childNodes.length > 1) { + const message = 'HTML does not have a single root node'; + console.error(message, html); + throw new Error(message); + } + return fromDom(div.childNodes[0]); + }; + const fromTag = (tag, scope) => { + const doc = scope || document; + const node = doc.createElement(tag); + return fromDom(node); + }; + const fromText = (text, scope) => { + const doc = scope || document; + const node = doc.createTextNode(text); + return fromDom(node); + }; + const fromDom = node => { + if (node === null || node === undefined) { + throw new Error('Node cannot be null or undefined'); + } + return { dom: node }; + }; + const fromPoint = (docElm, x, y) => Optional.from(docElm.dom.elementFromPoint(x, y)).map(fromDom); + const SugarElement = { + fromHtml, + fromTag, + fromText, + fromDom, + fromPoint + }; + + const is$2 = (element, selector) => { + const dom = element.dom; + if (dom.nodeType !== ELEMENT) { + return false; + } else { + const elem = dom; + if (elem.matches !== undefined) { + return elem.matches(selector); + } else if (elem.msMatchesSelector !== undefined) { + return elem.msMatchesSelector(selector); + } else if (elem.webkitMatchesSelector !== undefined) { + return elem.webkitMatchesSelector(selector); + } else if (elem.mozMatchesSelector !== undefined) { + return elem.mozMatchesSelector(selector); + } else { + throw new Error('Browser lacks native selectors'); + } + } + }; + + const eq = (e1, e2) => e1.dom === e2.dom; + const contains = (e1, e2) => { + const d1 = e1.dom; + const d2 = e2.dom; + return d1 === d2 ? false : d1.contains(d2); + }; + const is$1 = is$2; + + typeof window !== 'undefined' ? window : Function('return this;')(); + + const name = element => { + const r = element.dom.nodeName; + return r.toLowerCase(); + }; + const type = element => element.dom.nodeType; + const isType = t => element => type(element) === t; + const isElement = isType(ELEMENT); + const isTag = tag => e => isElement(e) && name(e) === tag; + + const parent = element => Optional.from(element.dom.parentNode).map(SugarElement.fromDom); + const nextSibling = element => Optional.from(element.dom.nextSibling).map(SugarElement.fromDom); + const children = element => map(element.dom.childNodes, SugarElement.fromDom); + const child = (element, index) => { + const cs = element.dom.childNodes; + return Optional.from(cs[index]).map(SugarElement.fromDom); + }; + const firstChild = element => child(element, 0); + const lastChild = element => child(element, element.dom.childNodes.length - 1); + + const before$1 = (marker, element) => { + const parent$1 = parent(marker); + parent$1.each(v => { + v.dom.insertBefore(element.dom, marker.dom); + }); + }; + const after = (marker, element) => { + const sibling = nextSibling(marker); + sibling.fold(() => { + const parent$1 = parent(marker); + parent$1.each(v => { + append$1(v, element); + }); + }, v => { + before$1(v, element); + }); + }; + const append$1 = (parent, element) => { + parent.dom.appendChild(element.dom); + }; + + const before = (marker, elements) => { + each$1(elements, x => { + before$1(marker, x); + }); + }; + const append = (parent, elements) => { + each$1(elements, x => { + append$1(parent, x); + }); + }; + + const empty = element => { + element.dom.textContent = ''; + each$1(children(element), rogue => { + remove(rogue); + }); + }; + const remove = element => { + const dom = element.dom; + if (dom.parentNode !== null) { + dom.parentNode.removeChild(dom); + } + }; + + var global$5 = tinymce.util.Tools.resolve('tinymce.dom.RangeUtils'); + + var global$4 = tinymce.util.Tools.resolve('tinymce.dom.TreeWalker'); + + var global$3 = tinymce.util.Tools.resolve('tinymce.util.VK'); + + const keys = Object.keys; + const each = (obj, f) => { + const props = keys(obj); + for (let k = 0, len = props.length; k < len; k++) { + const i = props[k]; + const x = obj[i]; + f(x, i); + } + }; + const objAcc = r => (x, i) => { + r[i] = x; + }; + const internalFilter = (obj, pred, onTrue, onFalse) => { + const r = {}; + each(obj, (x, i) => { + (pred(x, i) ? onTrue : onFalse)(x, i); + }); + return r; + }; + const filter = (obj, pred) => { + const t = {}; + internalFilter(obj, pred, objAcc(t), noop); + return t; + }; + + const rawSet = (dom, key, value) => { + if (isString(value) || isBoolean(value) || isNumber(value)) { + dom.setAttribute(key, value + ''); + } else { + console.error('Invalid call to Attribute.set. Key ', key, ':: Value ', value, ':: Element ', dom); + throw new Error('Attribute value was not simple'); + } + }; + const setAll = (element, attrs) => { + const dom = element.dom; + each(attrs, (v, k) => { + rawSet(dom, k, v); + }); + }; + const clone$1 = element => foldl(element.dom.attributes, (acc, attr) => { + acc[attr.name] = attr.value; + return acc; + }, {}); + + const clone = (original, isDeep) => SugarElement.fromDom(original.dom.cloneNode(isDeep)); + const deep = original => clone(original, true); + const shallowAs = (original, tag) => { + const nu = SugarElement.fromTag(tag); + const attributes = clone$1(original); + setAll(nu, attributes); + return nu; + }; + const mutate = (original, tag) => { + const nu = shallowAs(original, tag); + after(original, nu); + const children$1 = children(original); + append(nu, children$1); + remove(original); + return nu; + }; + + var global$2 = tinymce.util.Tools.resolve('tinymce.dom.DOMUtils'); + + var global$1 = tinymce.util.Tools.resolve('tinymce.util.Tools'); + + const matchNodeName = name => node => node && node.nodeName.toLowerCase() === name; + const matchNodeNames = regex => node => node && regex.test(node.nodeName); + const isTextNode = node => node && node.nodeType === 3; + const isListNode = matchNodeNames(/^(OL|UL|DL)$/); + const isOlUlNode = matchNodeNames(/^(OL|UL)$/); + const isOlNode = matchNodeName('ol'); + const isListItemNode = matchNodeNames(/^(LI|DT|DD)$/); + const isDlItemNode = matchNodeNames(/^(DT|DD)$/); + const isTableCellNode = matchNodeNames(/^(TH|TD)$/); + const isBr = matchNodeName('br'); + const isFirstChild = node => node.parentNode.firstChild === node; + const isTextBlock = (editor, node) => node && !!editor.schema.getTextBlockElements()[node.nodeName]; + const isBlock = (node, blockElements) => node && node.nodeName in blockElements; + const isBogusBr = (dom, node) => { + if (!isBr(node)) { + return false; + } + return dom.isBlock(node.nextSibling) && !isBr(node.previousSibling); + }; + const isEmpty$1 = (dom, elm, keepBookmarks) => { + const empty = dom.isEmpty(elm); + if (keepBookmarks && dom.select('span[data-mce-type=bookmark]', elm).length > 0) { + return false; + } + return empty; + }; + const isChildOfBody = (dom, elm) => dom.isChildOf(elm, dom.getRoot()); + + const option = name => editor => editor.options.get(name); + const register$3 = editor => { + const registerOption = editor.options.register; + registerOption('lists_indent_on_tab', { + processor: 'boolean', + default: true + }); + }; + const shouldIndentOnTab = option('lists_indent_on_tab'); + const getForcedRootBlock = option('forced_root_block'); + const getForcedRootBlockAttrs = option('forced_root_block_attrs'); + + const createTextBlock = (editor, contentNode) => { + const dom = editor.dom; + const blockElements = editor.schema.getBlockElements(); + const fragment = dom.createFragment(); + const blockName = getForcedRootBlock(editor); + const blockAttrs = getForcedRootBlockAttrs(editor); + let node, textBlock, hasContentNode; + textBlock = dom.create(blockName, blockAttrs); + if (!isBlock(contentNode.firstChild, blockElements)) { + fragment.appendChild(textBlock); + } + while (node = contentNode.firstChild) { + const nodeName = node.nodeName; + if (!hasContentNode && (nodeName !== 'SPAN' || node.getAttribute('data-mce-type') !== 'bookmark')) { + hasContentNode = true; + } + if (isBlock(node, blockElements)) { + fragment.appendChild(node); + textBlock = null; + } else { + if (!textBlock) { + textBlock = dom.create(blockName, blockAttrs); + fragment.appendChild(textBlock); + } + textBlock.appendChild(node); + } + } + if (!hasContentNode) { + textBlock.appendChild(dom.create('br', { 'data-mce-bogus': '1' })); + } + return fragment; + }; + + const DOM$2 = global$2.DOM; + const splitList = (editor, list, li) => { + const removeAndKeepBookmarks = targetNode => { + global$1.each(bookmarks, node => { + targetNode.parentNode.insertBefore(node, li.parentNode); + }); + DOM$2.remove(targetNode); + }; + const bookmarks = DOM$2.select('span[data-mce-type="bookmark"]', list); + const newBlock = createTextBlock(editor, li); + const tmpRng = DOM$2.createRng(); + tmpRng.setStartAfter(li); + tmpRng.setEndAfter(list); + const fragment = tmpRng.extractContents(); + for (let node = fragment.firstChild; node; node = node.firstChild) { + if (node.nodeName === 'LI' && editor.dom.isEmpty(node)) { + DOM$2.remove(node); + break; + } + } + if (!editor.dom.isEmpty(fragment)) { + DOM$2.insertAfter(fragment, list); + } + DOM$2.insertAfter(newBlock, list); + if (isEmpty$1(editor.dom, li.parentNode)) { + removeAndKeepBookmarks(li.parentNode); + } + DOM$2.remove(li); + if (isEmpty$1(editor.dom, list)) { + DOM$2.remove(list); + } + }; + + const isDescriptionDetail = isTag('dd'); + const isDescriptionTerm = isTag('dt'); + const outdentDlItem = (editor, item) => { + if (isDescriptionDetail(item)) { + mutate(item, 'dt'); + } else if (isDescriptionTerm(item)) { + parent(item).each(dl => splitList(editor, dl.dom, item.dom)); + } + }; + const indentDlItem = item => { + if (isDescriptionTerm(item)) { + mutate(item, 'dd'); + } + }; + const dlIndentation = (editor, indentation, dlItems) => { + if (indentation === 'Indent') { + each$1(dlItems, indentDlItem); + } else { + each$1(dlItems, item => outdentDlItem(editor, item)); + } + }; + + const getNormalizedPoint = (container, offset) => { + if (isTextNode(container)) { + return { + container, + offset + }; + } + const node = global$5.getNode(container, offset); + if (isTextNode(node)) { + return { + container: node, + offset: offset >= container.childNodes.length ? node.data.length : 0 + }; + } else if (node.previousSibling && isTextNode(node.previousSibling)) { + return { + container: node.previousSibling, + offset: node.previousSibling.data.length + }; + } else if (node.nextSibling && isTextNode(node.nextSibling)) { + return { + container: node.nextSibling, + offset: 0 + }; + } + return { + container, + offset + }; + }; + const normalizeRange = rng => { + const outRng = rng.cloneRange(); + const rangeStart = getNormalizedPoint(rng.startContainer, rng.startOffset); + outRng.setStart(rangeStart.container, rangeStart.offset); + const rangeEnd = getNormalizedPoint(rng.endContainer, rng.endOffset); + outRng.setEnd(rangeEnd.container, rangeEnd.offset); + return outRng; + }; + + const getParentList = (editor, node) => { + const selectionStart = node || editor.selection.getStart(true); + return editor.dom.getParent(selectionStart, 'OL,UL,DL', getClosestListRootElm(editor, selectionStart)); + }; + const isParentListSelected = (parentList, selectedBlocks) => parentList && selectedBlocks.length === 1 && selectedBlocks[0] === parentList; + const findSubLists = parentList => filter$1(parentList.querySelectorAll('ol,ul,dl'), isListNode); + const getSelectedSubLists = editor => { + const parentList = getParentList(editor); + const selectedBlocks = editor.selection.getSelectedBlocks(); + if (isParentListSelected(parentList, selectedBlocks)) { + return findSubLists(parentList); + } else { + return filter$1(selectedBlocks, elm => { + return isListNode(elm) && parentList !== elm; + }); + } + }; + const findParentListItemsNodes = (editor, elms) => { + const listItemsElms = global$1.map(elms, elm => { + const parentLi = editor.dom.getParent(elm, 'li,dd,dt', getClosestListRootElm(editor, elm)); + return parentLi ? parentLi : elm; + }); + return unique(listItemsElms); + }; + const getSelectedListItems = editor => { + const selectedBlocks = editor.selection.getSelectedBlocks(); + return filter$1(findParentListItemsNodes(editor, selectedBlocks), isListItemNode); + }; + const getSelectedDlItems = editor => filter$1(getSelectedListItems(editor), isDlItemNode); + const getClosestListRootElm = (editor, elm) => { + const parentTableCell = editor.dom.getParents(elm, 'TD,TH'); + return parentTableCell.length > 0 ? parentTableCell[0] : editor.getBody(); + }; + const findLastParentListNode = (editor, elm) => { + const parentLists = editor.dom.getParents(elm, 'ol,ul', getClosestListRootElm(editor, elm)); + return last(parentLists); + }; + const getSelectedLists = editor => { + const firstList = findLastParentListNode(editor, editor.selection.getStart()); + const subsequentLists = filter$1(editor.selection.getSelectedBlocks(), isOlUlNode); + return firstList.toArray().concat(subsequentLists); + }; + const getSelectedListRoots = editor => { + const selectedLists = getSelectedLists(editor); + return getUniqueListRoots(editor, selectedLists); + }; + const getUniqueListRoots = (editor, lists) => { + const listRoots = map(lists, list => findLastParentListNode(editor, list).getOr(list)); + return unique(listRoots); + }; + + const is = (lhs, rhs, comparator = tripleEquals) => lhs.exists(left => comparator(left, rhs)); + const lift2 = (oa, ob, f) => oa.isSome() && ob.isSome() ? Optional.some(f(oa.getOrDie(), ob.getOrDie())) : Optional.none(); + + const fromElements = (elements, scope) => { + const doc = scope || document; + const fragment = doc.createDocumentFragment(); + each$1(elements, element => { + fragment.appendChild(element.dom); + }); + return SugarElement.fromDom(fragment); + }; + + const fireListEvent = (editor, action, element) => editor.dispatch('ListMutation', { + action, + element + }); + + const blank = r => s => s.replace(r, ''); + const trim = blank(/^\s+|\s+$/g); + const isNotEmpty = s => s.length > 0; + const isEmpty = s => !isNotEmpty(s); + + const isSupported = dom => dom.style !== undefined && isFunction(dom.style.getPropertyValue); + + const internalSet = (dom, property, value) => { + if (!isString(value)) { + console.error('Invalid call to CSS.set. Property ', property, ':: Value ', value, ':: Element ', dom); + throw new Error('CSS value must be a string: ' + value); + } + if (isSupported(dom)) { + dom.style.setProperty(property, value); + } + }; + const set = (element, property, value) => { + const dom = element.dom; + internalSet(dom, property, value); + }; + + const joinSegment = (parent, child) => { + append$1(parent.item, child.list); + }; + const joinSegments = segments => { + for (let i = 1; i < segments.length; i++) { + joinSegment(segments[i - 1], segments[i]); + } + }; + const appendSegments = (head$1, tail) => { + lift2(last(head$1), head(tail), joinSegment); + }; + const createSegment = (scope, listType) => { + const segment = { + list: SugarElement.fromTag(listType, scope), + item: SugarElement.fromTag('li', scope) + }; + append$1(segment.list, segment.item); + return segment; + }; + const createSegments = (scope, entry, size) => { + const segments = []; + for (let i = 0; i < size; i++) { + segments.push(createSegment(scope, entry.listType)); + } + return segments; + }; + const populateSegments = (segments, entry) => { + for (let i = 0; i < segments.length - 1; i++) { + set(segments[i].item, 'list-style-type', 'none'); + } + last(segments).each(segment => { + setAll(segment.list, entry.listAttributes); + setAll(segment.item, entry.itemAttributes); + append(segment.item, entry.content); + }); + }; + const normalizeSegment = (segment, entry) => { + if (name(segment.list) !== entry.listType) { + segment.list = mutate(segment.list, entry.listType); + } + setAll(segment.list, entry.listAttributes); + }; + const createItem = (scope, attr, content) => { + const item = SugarElement.fromTag('li', scope); + setAll(item, attr); + append(item, content); + return item; + }; + const appendItem = (segment, item) => { + append$1(segment.list, item); + segment.item = item; + }; + const writeShallow = (scope, cast, entry) => { + const newCast = cast.slice(0, entry.depth); + last(newCast).each(segment => { + const item = createItem(scope, entry.itemAttributes, entry.content); + appendItem(segment, item); + normalizeSegment(segment, entry); + }); + return newCast; + }; + const writeDeep = (scope, cast, entry) => { + const segments = createSegments(scope, entry, entry.depth - cast.length); + joinSegments(segments); + populateSegments(segments, entry); + appendSegments(cast, segments); + return cast.concat(segments); + }; + const composeList = (scope, entries) => { + const cast = foldl(entries, (cast, entry) => { + return entry.depth > cast.length ? writeDeep(scope, cast, entry) : writeShallow(scope, cast, entry); + }, []); + return head(cast).map(segment => segment.list); + }; + + const isList = el => is$1(el, 'OL,UL'); + const hasFirstChildList = el => firstChild(el).exists(isList); + const hasLastChildList = el => lastChild(el).exists(isList); + + const isIndented = entry => entry.depth > 0; + const isSelected = entry => entry.isSelected; + const cloneItemContent = li => { + const children$1 = children(li); + const content = hasLastChildList(li) ? children$1.slice(0, -1) : children$1; + return map(content, deep); + }; + const createEntry = (li, depth, isSelected) => parent(li).filter(isElement).map(list => ({ + depth, + dirty: false, + isSelected, + content: cloneItemContent(li), + itemAttributes: clone$1(li), + listAttributes: clone$1(list), + listType: name(list) + })); + + const indentEntry = (indentation, entry) => { + switch (indentation) { + case 'Indent': + entry.depth++; + break; + case 'Outdent': + entry.depth--; + break; + case 'Flatten': + entry.depth = 0; + } + entry.dirty = true; + }; + + const cloneListProperties = (target, source) => { + target.listType = source.listType; + target.listAttributes = { ...source.listAttributes }; + }; + const cleanListProperties = entry => { + entry.listAttributes = filter(entry.listAttributes, (_value, key) => key !== 'start'); + }; + const closestSiblingEntry = (entries, start) => { + const depth = entries[start].depth; + const matches = entry => entry.depth === depth && !entry.dirty; + const until = entry => entry.depth < depth; + return findUntil(reverse(entries.slice(0, start)), matches, until).orThunk(() => findUntil(entries.slice(start + 1), matches, until)); + }; + const normalizeEntries = entries => { + each$1(entries, (entry, i) => { + closestSiblingEntry(entries, i).fold(() => { + if (entry.dirty) { + cleanListProperties(entry); + } + }, matchingEntry => cloneListProperties(entry, matchingEntry)); + }); + return entries; + }; + + const Cell = initial => { + let value = initial; + const get = () => { + return value; + }; + const set = v => { + value = v; + }; + return { + get, + set + }; + }; + + const parseItem = (depth, itemSelection, selectionState, item) => firstChild(item).filter(isList).fold(() => { + itemSelection.each(selection => { + if (eq(selection.start, item)) { + selectionState.set(true); + } + }); + const currentItemEntry = createEntry(item, depth, selectionState.get()); + itemSelection.each(selection => { + if (eq(selection.end, item)) { + selectionState.set(false); + } + }); + const childListEntries = lastChild(item).filter(isList).map(list => parseList(depth, itemSelection, selectionState, list)).getOr([]); + return currentItemEntry.toArray().concat(childListEntries); + }, list => parseList(depth, itemSelection, selectionState, list)); + const parseList = (depth, itemSelection, selectionState, list) => bind(children(list), element => { + const parser = isList(element) ? parseList : parseItem; + const newDepth = depth + 1; + return parser(newDepth, itemSelection, selectionState, element); + }); + const parseLists = (lists, itemSelection) => { + const selectionState = Cell(false); + const initialDepth = 0; + return map(lists, list => ({ + sourceList: list, + entries: parseList(initialDepth, itemSelection, selectionState, list) + })); + }; + + const outdentedComposer = (editor, entries) => { + const normalizedEntries = normalizeEntries(entries); + return map(normalizedEntries, entry => { + const content = fromElements(entry.content); + return SugarElement.fromDom(createTextBlock(editor, content.dom)); + }); + }; + const indentedComposer = (editor, entries) => { + const normalizedEntries = normalizeEntries(entries); + return composeList(editor.contentDocument, normalizedEntries).toArray(); + }; + const composeEntries = (editor, entries) => bind(groupBy(entries, isIndented), entries => { + const groupIsIndented = head(entries).exists(isIndented); + return groupIsIndented ? indentedComposer(editor, entries) : outdentedComposer(editor, entries); + }); + const indentSelectedEntries = (entries, indentation) => { + each$1(filter$1(entries, isSelected), entry => indentEntry(indentation, entry)); + }; + const getItemSelection = editor => { + const selectedListItems = map(getSelectedListItems(editor), SugarElement.fromDom); + return lift2(find(selectedListItems, not(hasFirstChildList)), find(reverse(selectedListItems), not(hasFirstChildList)), (start, end) => ({ + start, + end + })); + }; + const listIndentation = (editor, lists, indentation) => { + const entrySets = parseLists(lists, getItemSelection(editor)); + each$1(entrySets, entrySet => { + indentSelectedEntries(entrySet.entries, indentation); + const composedLists = composeEntries(editor, entrySet.entries); + each$1(composedLists, composedList => { + fireListEvent(editor, indentation === 'Indent' ? 'IndentList' : 'OutdentList', composedList.dom); + }); + before(entrySet.sourceList, composedLists); + remove(entrySet.sourceList); + }); + }; + + const selectionIndentation = (editor, indentation) => { + const lists = map(getSelectedListRoots(editor), SugarElement.fromDom); + const dlItems = map(getSelectedDlItems(editor), SugarElement.fromDom); + let isHandled = false; + if (lists.length || dlItems.length) { + const bookmark = editor.selection.getBookmark(); + listIndentation(editor, lists, indentation); + dlIndentation(editor, indentation, dlItems); + editor.selection.moveToBookmark(bookmark); + editor.selection.setRng(normalizeRange(editor.selection.getRng())); + editor.nodeChanged(); + isHandled = true; + } + return isHandled; + }; + const indentListSelection = editor => selectionIndentation(editor, 'Indent'); + const outdentListSelection = editor => selectionIndentation(editor, 'Outdent'); + const flattenListSelection = editor => selectionIndentation(editor, 'Flatten'); + + var global = tinymce.util.Tools.resolve('tinymce.dom.BookmarkManager'); + + const DOM$1 = global$2.DOM; + const createBookmark = rng => { + const bookmark = {}; + const setupEndPoint = start => { + let container = rng[start ? 'startContainer' : 'endContainer']; + let offset = rng[start ? 'startOffset' : 'endOffset']; + if (container.nodeType === 1) { + const offsetNode = DOM$1.create('span', { 'data-mce-type': 'bookmark' }); + if (container.hasChildNodes()) { + offset = Math.min(offset, container.childNodes.length - 1); + if (start) { + container.insertBefore(offsetNode, container.childNodes[offset]); + } else { + DOM$1.insertAfter(offsetNode, container.childNodes[offset]); + } + } else { + container.appendChild(offsetNode); + } + container = offsetNode; + offset = 0; + } + bookmark[start ? 'startContainer' : 'endContainer'] = container; + bookmark[start ? 'startOffset' : 'endOffset'] = offset; + }; + setupEndPoint(true); + if (!rng.collapsed) { + setupEndPoint(); + } + return bookmark; + }; + const resolveBookmark = bookmark => { + const restoreEndPoint = start => { + let node; + const nodeIndex = container => { + let node = container.parentNode.firstChild, idx = 0; + while (node) { + if (node === container) { + return idx; + } + if (node.nodeType !== 1 || node.getAttribute('data-mce-type') !== 'bookmark') { + idx++; + } + node = node.nextSibling; + } + return -1; + }; + let container = node = bookmark[start ? 'startContainer' : 'endContainer']; + let offset = bookmark[start ? 'startOffset' : 'endOffset']; + if (!container) { + return; + } + if (container.nodeType === 1) { + offset = nodeIndex(container); + container = container.parentNode; + DOM$1.remove(node); + if (!container.hasChildNodes() && DOM$1.isBlock(container)) { + container.appendChild(DOM$1.create('br')); + } + } + bookmark[start ? 'startContainer' : 'endContainer'] = container; + bookmark[start ? 'startOffset' : 'endOffset'] = offset; + }; + restoreEndPoint(true); + restoreEndPoint(); + const rng = DOM$1.createRng(); + rng.setStart(bookmark.startContainer, bookmark.startOffset); + if (bookmark.endContainer) { + rng.setEnd(bookmark.endContainer, bookmark.endOffset); + } + return normalizeRange(rng); + }; + + const listToggleActionFromListName = listName => { + switch (listName) { + case 'UL': + return 'ToggleUlList'; + case 'OL': + return 'ToggleOlList'; + case 'DL': + return 'ToggleDLList'; + } + }; + + const isCustomList = list => /\btox\-/.test(list.className); + const listState = (editor, listName, activate) => { + const nodeChangeHandler = e => { + const inList = findUntil(e.parents, isListNode, isTableCellNode).filter(list => list.nodeName === listName && !isCustomList(list)).isSome(); + activate(inList); + }; + const parents = editor.dom.getParents(editor.selection.getNode()); + nodeChangeHandler({ parents }); + editor.on('NodeChange', nodeChangeHandler); + return () => editor.off('NodeChange', nodeChangeHandler); + }; + + const updateListStyle = (dom, el, detail) => { + const type = detail['list-style-type'] ? detail['list-style-type'] : null; + dom.setStyle(el, 'list-style-type', type); + }; + const setAttribs = (elm, attrs) => { + global$1.each(attrs, (value, key) => { + elm.setAttribute(key, value); + }); + }; + const updateListAttrs = (dom, el, detail) => { + setAttribs(el, detail['list-attributes']); + global$1.each(dom.select('li', el), li => { + setAttribs(li, detail['list-item-attributes']); + }); + }; + const updateListWithDetails = (dom, el, detail) => { + updateListStyle(dom, el, detail); + updateListAttrs(dom, el, detail); + }; + const removeStyles = (dom, element, styles) => { + global$1.each(styles, style => dom.setStyle(element, style, '')); + }; + const getEndPointNode = (editor, rng, start, root) => { + let container = rng[start ? 'startContainer' : 'endContainer']; + const offset = rng[start ? 'startOffset' : 'endOffset']; + if (container.nodeType === 1) { + container = container.childNodes[Math.min(offset, container.childNodes.length - 1)] || container; + } + if (!start && isBr(container.nextSibling)) { + container = container.nextSibling; + } + while (container.parentNode !== root) { + if (isTextBlock(editor, container)) { + return container; + } + if (/^(TD|TH)$/.test(container.parentNode.nodeName)) { + return container; + } + container = container.parentNode; + } + return container; + }; + const getSelectedTextBlocks = (editor, rng, root) => { + const textBlocks = []; + const dom = editor.dom; + const startNode = getEndPointNode(editor, rng, true, root); + const endNode = getEndPointNode(editor, rng, false, root); + let block; + const siblings = []; + for (let node = startNode; node; node = node.nextSibling) { + siblings.push(node); + if (node === endNode) { + break; + } + } + global$1.each(siblings, node => { + if (isTextBlock(editor, node)) { + textBlocks.push(node); + block = null; + return; + } + if (dom.isBlock(node) || isBr(node)) { + if (isBr(node)) { + dom.remove(node); + } + block = null; + return; + } + const nextSibling = node.nextSibling; + if (global.isBookmarkNode(node)) { + if (isListNode(nextSibling) || isTextBlock(editor, nextSibling) || !nextSibling && node.parentNode === root) { + block = null; + return; + } + } + if (!block) { + block = dom.create('p'); + node.parentNode.insertBefore(block, node); + textBlocks.push(block); + } + block.appendChild(node); + }); + return textBlocks; + }; + const hasCompatibleStyle = (dom, sib, detail) => { + const sibStyle = dom.getStyle(sib, 'list-style-type'); + let detailStyle = detail ? detail['list-style-type'] : ''; + detailStyle = detailStyle === null ? '' : detailStyle; + return sibStyle === detailStyle; + }; + const applyList = (editor, listName, detail) => { + const rng = editor.selection.getRng(); + let listItemName = 'LI'; + const root = getClosestListRootElm(editor, editor.selection.getStart(true)); + const dom = editor.dom; + if (dom.getContentEditable(editor.selection.getNode()) === 'false') { + return; + } + listName = listName.toUpperCase(); + if (listName === 'DL') { + listItemName = 'DT'; + } + const bookmark = createBookmark(rng); + const selectedTextBlocks = getSelectedTextBlocks(editor, rng, root); + global$1.each(selectedTextBlocks, block => { + let listBlock; + const sibling = block.previousSibling; + const parent = block.parentNode; + if (!isListItemNode(parent)) { + if (sibling && isListNode(sibling) && sibling.nodeName === listName && hasCompatibleStyle(dom, sibling, detail)) { + listBlock = sibling; + block = dom.rename(block, listItemName); + sibling.appendChild(block); + } else { + listBlock = dom.create(listName); + block.parentNode.insertBefore(listBlock, block); + listBlock.appendChild(block); + block = dom.rename(block, listItemName); + } + removeStyles(dom, block, [ + 'margin', + 'margin-right', + 'margin-bottom', + 'margin-left', + 'margin-top', + 'padding', + 'padding-right', + 'padding-bottom', + 'padding-left', + 'padding-top' + ]); + updateListWithDetails(dom, listBlock, detail); + mergeWithAdjacentLists(editor.dom, listBlock); + } + }); + editor.selection.setRng(resolveBookmark(bookmark)); + }; + const isValidLists = (list1, list2) => { + return list1 && list2 && isListNode(list1) && list1.nodeName === list2.nodeName; + }; + const hasSameListStyle = (dom, list1, list2) => { + const targetStyle = dom.getStyle(list1, 'list-style-type', true); + const style = dom.getStyle(list2, 'list-style-type', true); + return targetStyle === style; + }; + const hasSameClasses = (elm1, elm2) => { + return elm1.className === elm2.className; + }; + const shouldMerge = (dom, list1, list2) => { + return isValidLists(list1, list2) && hasSameListStyle(dom, list1, list2) && hasSameClasses(list1, list2); + }; + const mergeWithAdjacentLists = (dom, listBlock) => { + let sibling, node; + sibling = listBlock.nextSibling; + if (shouldMerge(dom, listBlock, sibling)) { + while (node = sibling.firstChild) { + listBlock.appendChild(node); + } + dom.remove(sibling); + } + sibling = listBlock.previousSibling; + if (shouldMerge(dom, listBlock, sibling)) { + while (node = sibling.lastChild) { + listBlock.insertBefore(node, listBlock.firstChild); + } + dom.remove(sibling); + } + }; + const updateList$1 = (editor, list, listName, detail) => { + if (list.nodeName !== listName) { + const newList = editor.dom.rename(list, listName); + updateListWithDetails(editor.dom, newList, detail); + fireListEvent(editor, listToggleActionFromListName(listName), newList); + } else { + updateListWithDetails(editor.dom, list, detail); + fireListEvent(editor, listToggleActionFromListName(listName), list); + } + }; + const toggleMultipleLists = (editor, parentList, lists, listName, detail) => { + const parentIsList = isListNode(parentList); + if (parentIsList && parentList.nodeName === listName && !hasListStyleDetail(detail)) { + flattenListSelection(editor); + } else { + applyList(editor, listName, detail); + const bookmark = createBookmark(editor.selection.getRng()); + const allLists = parentIsList ? [ + parentList, + ...lists + ] : lists; + global$1.each(allLists, elm => { + updateList$1(editor, elm, listName, detail); + }); + editor.selection.setRng(resolveBookmark(bookmark)); + } + }; + const hasListStyleDetail = detail => { + return 'list-style-type' in detail; + }; + const toggleSingleList = (editor, parentList, listName, detail) => { + if (parentList === editor.getBody()) { + return; + } + if (parentList) { + if (parentList.nodeName === listName && !hasListStyleDetail(detail) && !isCustomList(parentList)) { + flattenListSelection(editor); + } else { + const bookmark = createBookmark(editor.selection.getRng()); + updateListWithDetails(editor.dom, parentList, detail); + const newList = editor.dom.rename(parentList, listName); + mergeWithAdjacentLists(editor.dom, newList); + editor.selection.setRng(resolveBookmark(bookmark)); + applyList(editor, listName, detail); + fireListEvent(editor, listToggleActionFromListName(listName), newList); + } + } else { + applyList(editor, listName, detail); + fireListEvent(editor, listToggleActionFromListName(listName), parentList); + } + }; + const toggleList = (editor, listName, _detail) => { + const parentList = getParentList(editor); + const selectedSubLists = getSelectedSubLists(editor); + const detail = isObject(_detail) ? _detail : {}; + if (selectedSubLists.length > 0) { + toggleMultipleLists(editor, parentList, selectedSubLists, listName, detail); + } else { + toggleSingleList(editor, parentList, listName, detail); + } + }; + + const DOM = global$2.DOM; + const normalizeList = (dom, list) => { + const parentNode = list.parentNode; + if (parentNode.nodeName === 'LI' && parentNode.firstChild === list) { + const sibling = parentNode.previousSibling; + if (sibling && sibling.nodeName === 'LI') { + sibling.appendChild(list); + if (isEmpty$1(dom, parentNode)) { + DOM.remove(parentNode); + } + } else { + DOM.setStyle(parentNode, 'listStyleType', 'none'); + } + } + if (isListNode(parentNode)) { + const sibling = parentNode.previousSibling; + if (sibling && sibling.nodeName === 'LI') { + sibling.appendChild(list); + } + } + }; + const normalizeLists = (dom, element) => { + const lists = global$1.grep(dom.select('ol,ul', element)); + global$1.each(lists, list => { + normalizeList(dom, list); + }); + }; + + const findNextCaretContainer = (editor, rng, isForward, root) => { + let node = rng.startContainer; + const offset = rng.startOffset; + if (isTextNode(node) && (isForward ? offset < node.data.length : offset > 0)) { + return node; + } + const nonEmptyBlocks = editor.schema.getNonEmptyElements(); + if (node.nodeType === 1) { + node = global$5.getNode(node, offset); + } + const walker = new global$4(node, root); + if (isForward) { + if (isBogusBr(editor.dom, node)) { + walker.next(); + } + } + while (node = walker[isForward ? 'next' : 'prev2']()) { + if (node.nodeName === 'LI' && !node.hasChildNodes()) { + return node; + } + if (nonEmptyBlocks[node.nodeName]) { + return node; + } + if (isTextNode(node) && node.data.length > 0) { + return node; + } + } + }; + const hasOnlyOneBlockChild = (dom, elm) => { + const childNodes = elm.childNodes; + return childNodes.length === 1 && !isListNode(childNodes[0]) && dom.isBlock(childNodes[0]); + }; + const unwrapSingleBlockChild = (dom, elm) => { + if (hasOnlyOneBlockChild(dom, elm)) { + dom.remove(elm.firstChild, true); + } + }; + const moveChildren = (dom, fromElm, toElm) => { + let node; + const targetElm = hasOnlyOneBlockChild(dom, toElm) ? toElm.firstChild : toElm; + unwrapSingleBlockChild(dom, fromElm); + if (!isEmpty$1(dom, fromElm, true)) { + while (node = fromElm.firstChild) { + targetElm.appendChild(node); + } + } + }; + const mergeLiElements = (dom, fromElm, toElm) => { + let listNode; + const ul = fromElm.parentNode; + if (!isChildOfBody(dom, fromElm) || !isChildOfBody(dom, toElm)) { + return; + } + if (isListNode(toElm.lastChild)) { + listNode = toElm.lastChild; + } + if (ul === toElm.lastChild) { + if (isBr(ul.previousSibling)) { + dom.remove(ul.previousSibling); + } + } + const node = toElm.lastChild; + if (node && isBr(node) && fromElm.hasChildNodes()) { + dom.remove(node); + } + if (isEmpty$1(dom, toElm, true)) { + empty(SugarElement.fromDom(toElm)); + } + moveChildren(dom, fromElm, toElm); + if (listNode) { + toElm.appendChild(listNode); + } + const contains$1 = contains(SugarElement.fromDom(toElm), SugarElement.fromDom(fromElm)); + const nestedLists = contains$1 ? dom.getParents(fromElm, isListNode, toElm) : []; + dom.remove(fromElm); + each$1(nestedLists, list => { + if (isEmpty$1(dom, list) && list !== dom.getRoot()) { + dom.remove(list); + } + }); + }; + const mergeIntoEmptyLi = (editor, fromLi, toLi) => { + empty(SugarElement.fromDom(toLi)); + mergeLiElements(editor.dom, fromLi, toLi); + editor.selection.setCursorLocation(toLi, 0); + }; + const mergeForward = (editor, rng, fromLi, toLi) => { + const dom = editor.dom; + if (dom.isEmpty(toLi)) { + mergeIntoEmptyLi(editor, fromLi, toLi); + } else { + const bookmark = createBookmark(rng); + mergeLiElements(dom, fromLi, toLi); + editor.selection.setRng(resolveBookmark(bookmark)); + } + }; + const mergeBackward = (editor, rng, fromLi, toLi) => { + const bookmark = createBookmark(rng); + mergeLiElements(editor.dom, fromLi, toLi); + const resolvedBookmark = resolveBookmark(bookmark); + editor.selection.setRng(resolvedBookmark); + }; + const backspaceDeleteFromListToListCaret = (editor, isForward) => { + const dom = editor.dom, selection = editor.selection; + const selectionStartElm = selection.getStart(); + const root = getClosestListRootElm(editor, selectionStartElm); + const li = dom.getParent(selection.getStart(), 'LI', root); + if (li) { + const ul = li.parentNode; + if (ul === editor.getBody() && isEmpty$1(dom, ul)) { + return true; + } + const rng = normalizeRange(selection.getRng()); + const otherLi = dom.getParent(findNextCaretContainer(editor, rng, isForward, root), 'LI', root); + if (otherLi && otherLi !== li) { + editor.undoManager.transact(() => { + if (isForward) { + mergeForward(editor, rng, otherLi, li); + } else { + if (isFirstChild(li)) { + outdentListSelection(editor); + } else { + mergeBackward(editor, rng, li, otherLi); + } + } + }); + return true; + } else if (!otherLi) { + if (!isForward && rng.startOffset === 0 && rng.endOffset === 0) { + editor.undoManager.transact(() => { + flattenListSelection(editor); + }); + return true; + } + } + } + return false; + }; + const removeBlock = (dom, block, root) => { + const parentBlock = dom.getParent(block.parentNode, dom.isBlock, root); + dom.remove(block); + if (parentBlock && dom.isEmpty(parentBlock)) { + dom.remove(parentBlock); + } + }; + const backspaceDeleteIntoListCaret = (editor, isForward) => { + const dom = editor.dom; + const selectionStartElm = editor.selection.getStart(); + const root = getClosestListRootElm(editor, selectionStartElm); + const block = dom.getParent(selectionStartElm, dom.isBlock, root); + if (block && dom.isEmpty(block)) { + const rng = normalizeRange(editor.selection.getRng()); + const otherLi = dom.getParent(findNextCaretContainer(editor, rng, isForward, root), 'LI', root); + if (otherLi) { + editor.undoManager.transact(() => { + removeBlock(dom, block, root); + mergeWithAdjacentLists(dom, otherLi.parentNode); + editor.selection.select(otherLi, true); + editor.selection.collapse(isForward); + }); + return true; + } + } + return false; + }; + const backspaceDeleteCaret = (editor, isForward) => { + return backspaceDeleteFromListToListCaret(editor, isForward) || backspaceDeleteIntoListCaret(editor, isForward); + }; + const backspaceDeleteRange = editor => { + const selectionStartElm = editor.selection.getStart(); + const root = getClosestListRootElm(editor, selectionStartElm); + const startListParent = editor.dom.getParent(selectionStartElm, 'LI,DT,DD', root); + if (startListParent || getSelectedListItems(editor).length > 0) { + editor.undoManager.transact(() => { + editor.execCommand('Delete'); + normalizeLists(editor.dom, editor.getBody()); + }); + return true; + } + return false; + }; + const backspaceDelete = (editor, isForward) => { + return editor.selection.isCollapsed() ? backspaceDeleteCaret(editor, isForward) : backspaceDeleteRange(editor); + }; + const setup$1 = editor => { + editor.on('keydown', e => { + if (e.keyCode === global$3.BACKSPACE) { + if (backspaceDelete(editor, false)) { + e.preventDefault(); + } + } else if (e.keyCode === global$3.DELETE) { + if (backspaceDelete(editor, true)) { + e.preventDefault(); + } + } + }); + }; + + const get = editor => ({ + backspaceDelete: isForward => { + backspaceDelete(editor, isForward); + } + }); + + const updateList = (editor, update) => { + const parentList = getParentList(editor); + editor.undoManager.transact(() => { + if (isObject(update.styles)) { + editor.dom.setStyles(parentList, update.styles); + } + if (isObject(update.attrs)) { + each(update.attrs, (v, k) => editor.dom.setAttrib(parentList, k, v)); + } + }); + }; + + const parseAlphabeticBase26 = str => { + const chars = reverse(trim(str).split('')); + const values = map(chars, (char, i) => { + const charValue = char.toUpperCase().charCodeAt(0) - 'A'.charCodeAt(0) + 1; + return Math.pow(26, i) * charValue; + }); + return foldl(values, (sum, v) => sum + v, 0); + }; + const composeAlphabeticBase26 = value => { + value--; + if (value < 0) { + return ''; + } else { + const remainder = value % 26; + const quotient = Math.floor(value / 26); + const rest = composeAlphabeticBase26(quotient); + const char = String.fromCharCode('A'.charCodeAt(0) + remainder); + return rest + char; + } + }; + const isUppercase = str => /^[A-Z]+$/.test(str); + const isLowercase = str => /^[a-z]+$/.test(str); + const isNumeric = str => /^[0-9]+$/.test(str); + const deduceListType = start => { + if (isNumeric(start)) { + return 2; + } else if (isUppercase(start)) { + return 0; + } else if (isLowercase(start)) { + return 1; + } else if (isEmpty(start)) { + return 3; + } else { + return 4; + } + }; + const parseStartValue = start => { + switch (deduceListType(start)) { + case 2: + return Optional.some({ + listStyleType: Optional.none(), + start + }); + case 0: + return Optional.some({ + listStyleType: Optional.some('upper-alpha'), + start: parseAlphabeticBase26(start).toString() + }); + case 1: + return Optional.some({ + listStyleType: Optional.some('lower-alpha'), + start: parseAlphabeticBase26(start).toString() + }); + case 3: + return Optional.some({ + listStyleType: Optional.none(), + start: '' + }); + case 4: + return Optional.none(); + } + }; + const parseDetail = detail => { + const start = parseInt(detail.start, 10); + if (is(detail.listStyleType, 'upper-alpha')) { + return composeAlphabeticBase26(start); + } else if (is(detail.listStyleType, 'lower-alpha')) { + return composeAlphabeticBase26(start).toLowerCase(); + } else { + return detail.start; + } + }; + + const open = editor => { + const currentList = getParentList(editor); + if (!isOlNode(currentList)) { + return; + } + editor.windowManager.open({ + title: 'List Properties', + body: { + type: 'panel', + items: [{ + type: 'input', + name: 'start', + label: 'Start list at number', + inputMode: 'numeric' + }] + }, + initialData: { + start: parseDetail({ + start: editor.dom.getAttrib(currentList, 'start', '1'), + listStyleType: Optional.some(editor.dom.getStyle(currentList, 'list-style-type')) + }) + }, + buttons: [ + { + type: 'cancel', + name: 'cancel', + text: 'Cancel' + }, + { + type: 'submit', + name: 'save', + text: 'Save', + primary: true + } + ], + onSubmit: api => { + const data = api.getData(); + parseStartValue(data.start).each(detail => { + editor.execCommand('mceListUpdate', false, { + attrs: { start: detail.start === '1' ? '' : detail.start }, + styles: { 'list-style-type': detail.listStyleType.getOr('') } + }); + }); + api.close(); + } + }); + }; + + const queryListCommandState = (editor, listName) => () => { + const parentList = getParentList(editor); + return parentList && parentList.nodeName === listName; + }; + const registerDialog = editor => { + editor.addCommand('mceListProps', () => { + open(editor); + }); + }; + const register$2 = editor => { + editor.on('BeforeExecCommand', e => { + const cmd = e.command.toLowerCase(); + if (cmd === 'indent') { + indentListSelection(editor); + } else if (cmd === 'outdent') { + outdentListSelection(editor); + } + }); + editor.addCommand('InsertUnorderedList', (ui, detail) => { + toggleList(editor, 'UL', detail); + }); + editor.addCommand('InsertOrderedList', (ui, detail) => { + toggleList(editor, 'OL', detail); + }); + editor.addCommand('InsertDefinitionList', (ui, detail) => { + toggleList(editor, 'DL', detail); + }); + editor.addCommand('RemoveList', () => { + flattenListSelection(editor); + }); + registerDialog(editor); + editor.addCommand('mceListUpdate', (ui, detail) => { + if (isObject(detail)) { + updateList(editor, detail); + } + }); + editor.addQueryStateHandler('InsertUnorderedList', queryListCommandState(editor, 'UL')); + editor.addQueryStateHandler('InsertOrderedList', queryListCommandState(editor, 'OL')); + editor.addQueryStateHandler('InsertDefinitionList', queryListCommandState(editor, 'DL')); + }; + + const setupTabKey = editor => { + editor.on('keydown', e => { + if (e.keyCode !== global$3.TAB || global$3.metaKeyPressed(e)) { + return; + } + editor.undoManager.transact(() => { + if (e.shiftKey ? outdentListSelection(editor) : indentListSelection(editor)) { + e.preventDefault(); + } + }); + }); + }; + const setup = editor => { + if (shouldIndentOnTab(editor)) { + setupTabKey(editor); + } + setup$1(editor); + }; + + const register$1 = editor => { + const exec = command => () => editor.execCommand(command); + if (!editor.hasPlugin('advlist')) { + editor.ui.registry.addToggleButton('numlist', { + icon: 'ordered-list', + active: false, + tooltip: 'Numbered list', + onAction: exec('InsertOrderedList'), + onSetup: api => listState(editor, 'OL', api.setActive) + }); + editor.ui.registry.addToggleButton('bullist', { + icon: 'unordered-list', + active: false, + tooltip: 'Bullet list', + onAction: exec('InsertUnorderedList'), + onSetup: api => listState(editor, 'UL', api.setActive) + }); + } + }; + + const register = editor => { + const listProperties = { + text: 'List properties...', + icon: 'ordered-list', + onAction: () => editor.execCommand('mceListProps'), + onSetup: api => listState(editor, 'OL', api.setEnabled) + }; + editor.ui.registry.addMenuItem('listprops', listProperties); + editor.ui.registry.addContextMenu('lists', { + update: node => { + const parentList = getParentList(editor, node); + return isOlNode(parentList) ? ['listprops'] : []; + } + }); + }; + + var Plugin = () => { + global$6.add('lists', editor => { + register$3(editor); + if (editor.hasPlugin('rtc', true) === false) { + setup(editor); + register$2(editor); + } else { + registerDialog(editor); + } + register$1(editor); + register(editor); + return get(editor); + }); + }; + + Plugin(); + +})(); diff --git a/vendor/tinymce/tinymce/plugins/lists/plugin.min.js b/vendor/tinymce/tinymce/plugins/lists/plugin.min.js new file mode 100644 index 00000000..2217f0b5 --- /dev/null +++ b/vendor/tinymce/tinymce/plugins/lists/plugin.min.js @@ -0,0 +1,4 @@ +/** + * TinyMCE version 6.0.2 (2022-04-27) + */ +!function(){"use strict";var t=tinymce.util.Tools.resolve("tinymce.PluginManager");const e=t=>e=>(t=>{const e=typeof t;return null===t?"null":"object"===e&&Array.isArray(t)?"array":"object"===e&&(n=r=t,(o=String).prototype.isPrototypeOf(n)||(null===(s=r.constructor)||void 0===s?void 0:s.name)===o.name)?"string":e;var n,r,o,s})(e)===t,n=t=>e=>typeof e===t,r=e("string"),o=e("object"),s=e("array"),i=n("boolean"),a=n("function"),l=n("number"),d=()=>{},c=(t,e)=>t===e,u=t=>e=>!t(e),m=(!1,()=>false);class p{constructor(t,e){this.tag=t,this.value=e}static some(t){return new p(!0,t)}static none(){return p.singletonNone}fold(t,e){return this.tag?e(this.value):t()}isSome(){return this.tag}isNone(){return!this.tag}map(t){return this.tag?p.some(t(this.value)):p.none()}bind(t){return this.tag?t(this.value):p.none()}exists(t){return this.tag&&t(this.value)}forall(t){return!this.tag||t(this.value)}filter(t){return!this.tag||t(this.value)?this:p.none()}getOr(t){return this.tag?this.value:t}or(t){return this.tag?this:t}getOrThunk(t){return this.tag?this.value:t()}orThunk(t){return this.tag?this:t()}getOrDie(t){if(this.tag)return this.value;throw new Error(null!=t?t:"Called getOrDie on None")}static from(t){return null==t?p.none():p.some(t)}getOrNull(){return this.tag?this.value:null}getOrUndefined(){return this.value}each(t){this.tag&&t(this.value)}toArray(){return this.tag?[this.value]:[]}toString(){return this.tag?`some(${this.value})`:"none()"}}p.singletonNone=new p(!1);const g=Array.prototype.slice,h=Array.prototype.indexOf,f=Array.prototype.push,y=(t,e)=>{const n=t.length,r=new Array(n);for(let o=0;o{for(let n=0,r=t.length;n{const n=[];for(let r=0,o=t.length;r(C(t,((t,r)=>{n=e(n,t,r)})),n),S=(t,e,n)=>{for(let r=0,o=t.length;rS(t,e,m),L=(t,e)=>(t=>{const e=[];for(let n=0,r=t.length;n{const e=g.call(t,0);return e.reverse(),e},O=(t,e)=>e>=0&&eO(t,0),k=t=>O(t,t.length-1),D=(t,e)=>{const n=[],r=a(e)?t=>((t,e)=>{for(let n=0,r=t.length;ne(n,t))):t=>((t,e)=>{return n=t,r=e,h.call(n,r)>-1;var n,r})(n,t);for(let e=0,o=t.length;e{if(null==t)throw new Error("Node cannot be null or undefined");return{dom:t}},x=(t,e)=>{const n=(e||document).createElement(t);return w(n)},B=w,E=(t,e)=>t.dom===e.dom;"undefined"!=typeof window?window:Function("return this;")();const I=t=>t.dom.nodeName.toLowerCase(),M=(1,t=>1===(t=>t.dom.nodeType)(t));const P=t=>e=>M(e)&&I(e)===t,R=t=>p.from(t.dom.parentNode).map(B),U=t=>y(t.dom.childNodes,B),$=(t,e)=>{const n=t.dom.childNodes;return p.from(n[e]).map(B)},_=t=>$(t,0),H=t=>$(t,t.dom.childNodes.length-1),F=(t,e)=>{R(t).each((n=>{n.dom.insertBefore(e.dom,t.dom)}))},K=(t,e)=>{t.dom.appendChild(e.dom)},j=(t,e)=>{C(e,(e=>{K(t,e)}))},V=t=>{t.dom.textContent="",C(U(t),(t=>{z(t)}))},z=t=>{const e=t.dom;null!==e.parentNode&&e.parentNode.removeChild(e)};var Q=tinymce.util.Tools.resolve("tinymce.dom.RangeUtils"),q=tinymce.util.Tools.resolve("tinymce.dom.TreeWalker"),W=tinymce.util.Tools.resolve("tinymce.util.VK");const Z=Object.keys,G=(t,e)=>{const n=Z(t);for(let r=0,o=n.length;r{const n=t.dom;G(e,((t,e)=>{((t,e,n)=>{if(!(r(n)||i(n)||l(n)))throw console.error("Invalid call to Attribute.set. Key ",e,":: Value ",n,":: Element ",t),new Error("Attribute value was not simple");t.setAttribute(e,n+"")})(n,e,t)}))},X=t=>b(t.dom.attributes,((t,e)=>(t[e.name]=e.value,t)),{}),Y=t=>((t,e)=>B(t.dom.cloneNode(!0)))(t),tt=(t,e)=>{const n=((t,e)=>{const n=x(e),r=X(t);return J(n,r),n})(t,e);((t,e)=>{const n=(t=>p.from(t.dom.nextSibling).map(B))(t);n.fold((()=>{R(t).each((t=>{K(t,e)}))}),(t=>{F(t,e)}))})(t,n);const r=U(t);return j(n,r),z(t),n};var et=tinymce.util.Tools.resolve("tinymce.dom.DOMUtils"),nt=tinymce.util.Tools.resolve("tinymce.util.Tools");const rt=t=>e=>e&&e.nodeName.toLowerCase()===t,ot=t=>e=>e&&t.test(e.nodeName),st=t=>t&&3===t.nodeType,it=ot(/^(OL|UL|DL)$/),at=ot(/^(OL|UL)$/),lt=rt("ol"),dt=ot(/^(LI|DT|DD)$/),ct=ot(/^(DT|DD)$/),ut=ot(/^(TH|TD)$/),mt=rt("br"),pt=(t,e)=>e&&!!t.schema.getTextBlockElements()[e.nodeName],gt=(t,e)=>t&&t.nodeName in e,ht=(t,e,n)=>{const r=t.isEmpty(e);return!(n&&t.select("span[data-mce-type=bookmark]",e).length>0)&&r},ft=(t,e)=>t.isChildOf(e,t.getRoot()),yt=t=>e=>e.options.get(t),Ct=yt("lists_indent_on_tab"),vt=yt("forced_root_block"),bt=yt("forced_root_block_attrs"),St=(t,e)=>{const n=t.dom,r=t.schema.getBlockElements(),o=n.createFragment(),s=vt(t),i=bt(t);let a,l,d;for(l=n.create(s,i),gt(e.firstChild,r)||o.appendChild(l);a=e.firstChild;){const t=a.nodeName;d||"SPAN"===t&&"bookmark"===a.getAttribute("data-mce-type")||(d=!0),gt(a,r)?(o.appendChild(a),l=null):(l||(l=n.create(s,i),o.appendChild(l)),l.appendChild(a))}return d||l.appendChild(n.create("br",{"data-mce-bogus":"1"})),o},Nt=et.DOM,Lt=P("dd"),Tt=P("dt"),Ot=t=>{Tt(t)&&tt(t,"dd")},At=(t,e,n)=>{C(n,"Indent"===e?Ot:e=>((t,e)=>{Lt(e)?tt(e,"dt"):Tt(e)&&R(e).each((n=>((t,e,n)=>{const r=Nt.select('span[data-mce-type="bookmark"]',e),o=St(t,n),s=Nt.createRng();s.setStartAfter(n),s.setEndAfter(e);const i=s.extractContents();for(let e=i.firstChild;e;e=e.firstChild)if("LI"===e.nodeName&&t.dom.isEmpty(e)){Nt.remove(e);break}var a;t.dom.isEmpty(i)||Nt.insertAfter(i,e),Nt.insertAfter(o,e),ht(t.dom,n.parentNode)&&(a=n.parentNode,nt.each(r,(t=>{a.parentNode.insertBefore(t,n.parentNode)})),Nt.remove(a)),Nt.remove(n),ht(t.dom,e)&&Nt.remove(e)})(t,n.dom,e.dom)))})(t,e))},kt=(t,e)=>{if(st(t))return{container:t,offset:e};const n=Q.getNode(t,e);return st(n)?{container:n,offset:e>=t.childNodes.length?n.data.length:0}:n.previousSibling&&st(n.previousSibling)?{container:n.previousSibling,offset:n.previousSibling.data.length}:n.nextSibling&&st(n.nextSibling)?{container:n.nextSibling,offset:0}:{container:t,offset:e}},Dt=t=>{const e=t.cloneRange(),n=kt(t.startContainer,t.startOffset);e.setStart(n.container,n.offset);const r=kt(t.endContainer,t.endOffset);return e.setEnd(r.container,r.offset),e},wt=(t,e)=>{const n=e||t.selection.getStart(!0);return t.dom.getParent(n,"OL,UL,DL",Bt(t,n))},xt=t=>{const e=t.selection.getSelectedBlocks();return v(((t,e)=>{const n=nt.map(e,(e=>t.dom.getParent(e,"li,dd,dt",Bt(t,e))||e));return D(n)})(t,e),dt)},Bt=(t,e)=>{const n=t.dom.getParents(e,"TD,TH");return n.length>0?n[0]:t.getBody()},Et=(t,e)=>{const n=t.dom.getParents(e,"ol,ul",Bt(t,e));return k(n)},It=(t,e)=>{const n=y(e,(e=>Et(t,e).getOr(e)));return D(n)},Mt=(t,e,n=c)=>t.exists((t=>n(t,e))),Pt=(t,e,n)=>t.isSome()&&e.isSome()?p.some(n(t.getOrDie(),e.getOrDie())):p.none(),Rt=(t,e,n)=>t.dispatch("ListMutation",{action:e,element:n}),Ut=($t=/^\s+|\s+$/g,t=>t.replace($t,""));var $t;const _t=(t,e,n)=>{((t,e,n)=>{if(!r(n))throw console.error("Invalid call to CSS.set. Property ",e,":: Value ",n,":: Element ",t),new Error("CSS value must be a string: "+n);(t=>void 0!==t.style&&a(t.style.getPropertyValue))(t)&&t.style.setProperty(e,n)})(t.dom,e,n)},Ht=(t,e)=>{K(t.item,e.list)},Ft=(t,e)=>{const n={list:x(e,t),item:x("li",t)};return K(n.list,n.item),n},Kt=t=>((t,e)=>{const n=t.dom;if(1!==n.nodeType)return!1;{const t=n;if(void 0!==t.matches)return t.matches(e);if(void 0!==t.msMatchesSelector)return t.msMatchesSelector(e);if(void 0!==t.webkitMatchesSelector)return t.webkitMatchesSelector(e);if(void 0!==t.mozMatchesSelector)return t.mozMatchesSelector(e);throw new Error("Browser lacks native selectors")}})(t,"OL,UL"),jt=t=>_(t).exists(Kt),Vt=t=>t.depth>0,zt=t=>t.isSelected,Qt=t=>{const e=U(t),n=H(t).exists(Kt)?e.slice(0,-1):e;return y(n,Y)},qt=t=>(C(t,((e,n)=>{((t,e)=>{const n=t[e].depth,r=t=>t.depth===n&&!t.dirty,o=t=>t.depthS(t.slice(e+1),r,o)))})(t,n).fold((()=>{e.dirty&&(t=>{t.listAttributes=((t,e)=>{const n={};var r;return((t,e,n,r)=>{G(t,((t,o)=>{(e(t,o)?n:r)(t,o)}))})(t,e,(r=n,(t,e)=>{r[e]=t}),d),n})(t.listAttributes,((t,e)=>"start"!==e))})(e)}),(t=>{return r=t,(n=e).listType=r.listType,void(n.listAttributes={...r.listAttributes});var n,r}))})),t),Wt=(t,e,n,r)=>_(r).filter(Kt).fold((()=>{e.each((t=>{E(t.start,r)&&n.set(!0)}));const o=((t,e,n)=>R(t).filter(M).map((r=>({depth:e,dirty:!1,isSelected:n,content:Qt(t),itemAttributes:X(t),listAttributes:X(r),listType:I(r)}))))(r,t,n.get());e.each((t=>{E(t.end,r)&&n.set(!1)}));const s=H(r).filter(Kt).map((r=>Zt(t,e,n,r))).getOr([]);return o.toArray().concat(s)}),(r=>Zt(t,e,n,r))),Zt=(t,e,n,r)=>L(U(r),(r=>(Kt(r)?Zt:Wt)(t+1,e,n,r))),Gt=(t,e)=>{const n=qt(e);return((t,e)=>{const n=b(e,((e,n)=>n.depth>e.length?((t,e,n)=>{const r=((t,e,n)=>{const r=[];for(let o=0;o{for(let e=1;e{for(let e=0;e{J(t.list,e.listAttributes),J(t.item,e.itemAttributes),j(t.item,e.content)}))})(r,n),o=r,Pt(k(e),A(o),Ht),e.concat(r)})(t,e,n):((t,e,n)=>{const r=e.slice(0,n.depth);return k(r).each((e=>{const r=((t,e,n)=>{const r=x("li",t);return J(r,e),j(r,n),r})(t,n.itemAttributes,n.content);((t,e)=>{K(t.list,e),t.item=e})(e,r),((t,e)=>{I(t.list)!==e.listType&&(t.list=tt(t.list,e.listType)),J(t.list,e.listAttributes)})(e,n)})),r})(t,e,n)),[]);return A(n).map((t=>t.list))})(t.contentDocument,n).toArray()},Jt=(t,e,n)=>{const r=((t,e)=>{const n=(t=>{let e=!1;return{get:()=>e,set:t=>{e=t}}})();return y(t,(t=>({sourceList:t,entries:Zt(0,e,n,t)})))})(e,(t=>{const e=y(xt(t),B);return Pt(N(e,u(jt)),N(T(e),u(jt)),((t,e)=>({start:t,end:e})))})(t));C(r,(e=>{((t,e)=>{C(v(t,zt),(t=>((t,e)=>{switch(t){case"Indent":e.depth++;break;case"Outdent":e.depth--;break;case"Flatten":e.depth=0}e.dirty=!0})(e,t)))})(e.entries,n);const r=((t,e)=>L(((t,e)=>{if(0===t.length)return[];{let n=e(t[0]);const r=[];let o=[];for(let s=0,i=t.length;sA(e).exists(Vt)?Gt(t,e):((t,e)=>{const n=qt(e);return y(n,(e=>{const n=((t,e)=>{const n=document.createDocumentFragment();return C(t,(t=>{n.appendChild(t.dom)})),B(n)})(e.content);return B(St(t,n.dom))}))})(t,e))))(t,e.entries);var o;C(r,(e=>{Rt(t,"Indent"===n?"IndentList":"OutdentList",e.dom)})),o=e.sourceList,C(r,(t=>{F(o,t)})),z(e.sourceList)}))},Xt=(t,e)=>{const n=y((t=>{const e=(t=>{const e=Et(t,t.selection.getStart()),n=v(t.selection.getSelectedBlocks(),at);return e.toArray().concat(n)})(t);return It(t,e)})(t),B),r=y((t=>v(xt(t),ct))(t),B);let o=!1;if(n.length||r.length){const s=t.selection.getBookmark();Jt(t,n,e),At(t,e,r),t.selection.moveToBookmark(s),t.selection.setRng(Dt(t.selection.getRng())),t.nodeChanged(),o=!0}return o},Yt=t=>Xt(t,"Indent"),te=t=>Xt(t,"Outdent"),ee=t=>Xt(t,"Flatten");var ne=tinymce.util.Tools.resolve("tinymce.dom.BookmarkManager");const re=et.DOM,oe=t=>{const e={},n=n=>{let r=t[n?"startContainer":"endContainer"],o=t[n?"startOffset":"endOffset"];if(1===r.nodeType){const t=re.create("span",{"data-mce-type":"bookmark"});r.hasChildNodes()?(o=Math.min(o,r.childNodes.length-1),n?r.insertBefore(t,r.childNodes[o]):re.insertAfter(t,r.childNodes[o])):r.appendChild(t),r=t,o=0}e[n?"startContainer":"endContainer"]=r,e[n?"startOffset":"endOffset"]=o};return n(!0),t.collapsed||n(),e},se=t=>{const e=e=>{let n,r=n=t[e?"startContainer":"endContainer"],o=t[e?"startOffset":"endOffset"];r&&(1===r.nodeType&&(o=(t=>{let e=t.parentNode.firstChild,n=0;for(;e;){if(e===t)return n;1===e.nodeType&&"bookmark"===e.getAttribute("data-mce-type")||n++,e=e.nextSibling}return-1})(r),r=r.parentNode,re.remove(n),!r.hasChildNodes()&&re.isBlock(r)&&r.appendChild(re.create("br"))),t[e?"startContainer":"endContainer"]=r,t[e?"startOffset":"endOffset"]=o)};e(!0),e();const n=re.createRng();return n.setStart(t.startContainer,t.startOffset),t.endContainer&&n.setEnd(t.endContainer,t.endOffset),Dt(n)},ie=t=>{switch(t){case"UL":return"ToggleUlList";case"OL":return"ToggleOlList";case"DL":return"ToggleDLList"}},ae=t=>/\btox\-/.test(t.className),le=(t,e,n)=>{const r=t=>{const r=S(t.parents,it,ut).filter((t=>t.nodeName===e&&!ae(t))).isSome();n(r)},o=t.dom.getParents(t.selection.getNode());return r({parents:o}),t.on("NodeChange",r),()=>t.off("NodeChange",r)},de=(t,e)=>{nt.each(e,((e,n)=>{t.setAttribute(n,e)}))},ce=(t,e,n)=>{((t,e,n)=>{const r=n["list-style-type"]?n["list-style-type"]:null;t.setStyle(e,"list-style-type",r)})(t,e,n),((t,e,n)=>{de(e,n["list-attributes"]),nt.each(t.select("li",e),(t=>{de(t,n["list-item-attributes"])}))})(t,e,n)},ue=(t,e,n,r)=>{let o=e[n?"startContainer":"endContainer"];const s=e[n?"startOffset":"endOffset"];for(1===o.nodeType&&(o=o.childNodes[Math.min(s,o.childNodes.length-1)]||o),!n&&mt(o.nextSibling)&&(o=o.nextSibling);o.parentNode!==r;){if(pt(t,o))return o;if(/^(TD|TH)$/.test(o.parentNode.nodeName))return o;o=o.parentNode}return o},me=(t,e,n)=>{const r=t.selection.getRng();let o="LI";const s=Bt(t,t.selection.getStart(!0)),i=t.dom;if("false"===i.getContentEditable(t.selection.getNode()))return;"DL"===(e=e.toUpperCase())&&(o="DT");const a=oe(r),l=((t,e,n)=>{const r=[],o=t.dom,s=ue(t,e,!0,n),i=ue(t,e,!1,n);let a;const l=[];for(let t=s;t&&(l.push(t),t!==i);t=t.nextSibling);return nt.each(l,(e=>{if(pt(t,e))return r.push(e),void(a=null);if(o.isBlock(e)||mt(e))return mt(e)&&o.remove(e),void(a=null);const s=e.nextSibling;ne.isBookmarkNode(e)&&(it(s)||pt(t,s)||!s&&e.parentNode===n)?a=null:(a||(a=o.create("p"),e.parentNode.insertBefore(a,e),r.push(a)),a.appendChild(e))})),r})(t,r,s);nt.each(l,(r=>{let s;const a=r.previousSibling,l=r.parentNode;dt(l)||(a&&it(a)&&a.nodeName===e&&((t,e,n)=>{const r=t.getStyle(e,"list-style-type");let o=n?n["list-style-type"]:"";return o=null===o?"":o,r===o})(i,a,n)?(s=a,r=i.rename(r,o),a.appendChild(r)):(s=i.create(e),r.parentNode.insertBefore(s,r),s.appendChild(r),r=i.rename(r,o)),((t,e,n)=>{nt.each(["margin","margin-right","margin-bottom","margin-left","margin-top","padding","padding-right","padding-bottom","padding-left","padding-top"],(n=>t.setStyle(e,n,"")))})(i,r),ce(i,s,n),ge(t.dom,s))})),t.selection.setRng(se(a))},pe=(t,e,n)=>{return((t,e)=>t&&e&&it(t)&&t.nodeName===e.nodeName)(e,n)&&((t,e,n)=>t.getStyle(e,"list-style-type",!0)===t.getStyle(n,"list-style-type",!0))(t,e,n)&&(r=n,e.className===r.className);var r},ge=(t,e)=>{let n,r;if(n=e.nextSibling,pe(t,e,n)){for(;r=n.firstChild;)e.appendChild(r);t.remove(n)}if(n=e.previousSibling,pe(t,e,n)){for(;r=n.lastChild;)e.insertBefore(r,e.firstChild);t.remove(n)}},he=t=>"list-style-type"in t,fe=(t,e,n)=>{const r=wt(t),s=(t=>{const e=wt(t),n=t.selection.getSelectedBlocks();return((t,e)=>t&&1===e.length&&e[0]===t)(e,n)?(t=>v(t.querySelectorAll("ol,ul,dl"),it))(e):v(n,(t=>it(t)&&e!==t))})(t),i=o(n)?n:{};s.length>0?((t,e,n,r,o)=>{const s=it(e);if(s&&e.nodeName===r&&!he(o))ee(t);else{me(t,r,o);const i=oe(t.selection.getRng()),a=s?[e,...n]:n;nt.each(a,(e=>{((t,e,n,r)=>{if(e.nodeName!==n){const o=t.dom.rename(e,n);ce(t.dom,o,r),Rt(t,ie(n),o)}else ce(t.dom,e,r),Rt(t,ie(n),e)})(t,e,r,o)})),t.selection.setRng(se(i))}})(t,r,s,e,i):((t,e,n,r)=>{if(e!==t.getBody())if(e)if(e.nodeName!==n||he(r)||ae(e)){const o=oe(t.selection.getRng());ce(t.dom,e,r);const s=t.dom.rename(e,n);ge(t.dom,s),t.selection.setRng(se(o)),me(t,n,r),Rt(t,ie(n),s)}else ee(t);else me(t,n,r),Rt(t,ie(n),e)})(t,r,e,i)},ye=et.DOM,Ce=(t,e,n,r)=>{let o=e.startContainer;const s=e.startOffset;if(st(o)&&(n?s0))return o;const i=t.schema.getNonEmptyElements();1===o.nodeType&&(o=Q.getNode(o,s));const a=new q(o,r);for(n&&((t,e)=>!!mt(e)&&t.isBlock(e.nextSibling)&&!mt(e.previousSibling))(t.dom,o)&&a.next();o=a[n?"next":"prev2"]();){if("LI"===o.nodeName&&!o.hasChildNodes())return o;if(i[o.nodeName])return o;if(st(o)&&o.data.length>0)return o}},ve=(t,e)=>{const n=e.childNodes;return 1===n.length&&!it(n[0])&&t.isBlock(n[0])},be=(t,e,n)=>{let r;const o=e.parentNode;if(!ft(t,e)||!ft(t,n))return;it(n.lastChild)&&(r=n.lastChild),o===n.lastChild&&mt(o.previousSibling)&&t.remove(o.previousSibling);const s=n.lastChild;s&&mt(s)&&e.hasChildNodes()&&t.remove(s),ht(t,n,!0)&&V(B(n)),((t,e,n)=>{let r;const o=ve(t,n)?n.firstChild:n;if(((t,e)=>{ve(t,e)&&t.remove(e.firstChild,!0)})(t,e),!ht(t,e,!0))for(;r=e.firstChild;)o.appendChild(r)})(t,e,n),r&&n.appendChild(r);const i=((t,e)=>{const n=t.dom,r=e.dom;return n!==r&&n.contains(r)})(B(n),B(e))?t.getParents(e,it,n):[];t.remove(e),C(i,(e=>{ht(t,e)&&e!==t.getRoot()&&t.remove(e)}))},Se=(t,e)=>{const n=t.dom,r=t.selection,o=r.getStart(),s=Bt(t,o),i=n.getParent(r.getStart(),"LI",s);if(i){const o=i.parentNode;if(o===t.getBody()&&ht(n,o))return!0;const a=Dt(r.getRng()),l=n.getParent(Ce(t,a,e,s),"LI",s);if(l&&l!==i)return t.undoManager.transact((()=>{var n;e?((t,e,n,r)=>{const o=t.dom;if(o.isEmpty(r))((t,e,n)=>{V(B(n)),be(t.dom,e,n),t.selection.setCursorLocation(n,0)})(t,n,r);else{const s=oe(e);be(o,n,r),t.selection.setRng(se(s))}})(t,a,l,i):(n=i).parentNode.firstChild===n?te(t):((t,e,n,r)=>{const o=oe(e);be(t.dom,n,r);const s=se(o);t.selection.setRng(s)})(t,a,i,l)})),!0;if(!l&&!e&&0===a.startOffset&&0===a.endOffset)return t.undoManager.transact((()=>{ee(t)})),!0}return!1},Ne=(t,e)=>t.selection.isCollapsed()?((t,e)=>Se(t,e)||((t,e)=>{const n=t.dom,r=t.selection.getStart(),o=Bt(t,r),s=n.getParent(r,n.isBlock,o);if(s&&n.isEmpty(s)){const r=Dt(t.selection.getRng()),i=n.getParent(Ce(t,r,e,o),"LI",o);if(i)return t.undoManager.transact((()=>{((t,e,n)=>{const r=t.getParent(e.parentNode,t.isBlock,n);t.remove(e),r&&t.isEmpty(r)&&t.remove(r)})(n,s,o),ge(n,i.parentNode),t.selection.select(i,!0),t.selection.collapse(e)})),!0}return!1})(t,e))(t,e):(t=>{const e=t.selection.getStart(),n=Bt(t,e);return!!(t.dom.getParent(e,"LI,DT,DD",n)||xt(t).length>0)&&(t.undoManager.transact((()=>{t.execCommand("Delete"),((t,e)=>{const n=nt.grep(t.select("ol,ul",e));nt.each(n,(e=>{((t,e)=>{const n=e.parentNode;if("LI"===n.nodeName&&n.firstChild===e){const r=n.previousSibling;r&&"LI"===r.nodeName?(r.appendChild(e),ht(t,n)&&ye.remove(n)):ye.setStyle(n,"listStyleType","none")}if(it(n)){const t=n.previousSibling;t&&"LI"===t.nodeName&&t.appendChild(e)}})(t,e)}))})(t.dom,t.getBody())})),!0)})(t),Le=t=>{const e=T(Ut(t).split("")),n=y(e,((t,e)=>{const n=t.toUpperCase().charCodeAt(0)-"A".charCodeAt(0)+1;return Math.pow(26,e)*n}));return b(n,((t,e)=>t+e),0)},Te=t=>{if(--t<0)return"";{const e=t%26,n=Math.floor(t/26);return Te(n)+String.fromCharCode("A".charCodeAt(0)+e)}},Oe=t=>{const e=parseInt(t.start,10);return Mt(t.listStyleType,"upper-alpha")?Te(e):Mt(t.listStyleType,"lower-alpha")?Te(e).toLowerCase():t.start},Ae=(t,e)=>()=>{const n=wt(t);return n&&n.nodeName===e},ke=t=>{t.addCommand("mceListProps",(()=>{(t=>{const e=wt(t);lt(e)&&t.windowManager.open({title:"List Properties",body:{type:"panel",items:[{type:"input",name:"start",label:"Start list at number",inputMode:"numeric"}]},initialData:{start:Oe({start:t.dom.getAttrib(e,"start","1"),listStyleType:p.some(t.dom.getStyle(e,"list-style-type"))})},buttons:[{type:"cancel",name:"cancel",text:"Cancel"},{type:"submit",name:"save",text:"Save",primary:!0}],onSubmit:e=>{(t=>{switch((t=>/^[0-9]+$/.test(t)?2:/^[A-Z]+$/.test(t)?0:/^[a-z]+$/.test(t)?1:t.length>0?4:3)(t)){case 2:return p.some({listStyleType:p.none(),start:t});case 0:return p.some({listStyleType:p.some("upper-alpha"),start:Le(t).toString()});case 1:return p.some({listStyleType:p.some("lower-alpha"),start:Le(t).toString()});case 3:return p.some({listStyleType:p.none(),start:""});case 4:return p.none()}})(e.getData().start).each((e=>{t.execCommand("mceListUpdate",!1,{attrs:{start:"1"===e.start?"":e.start},styles:{"list-style-type":e.listStyleType.getOr("")}})})),e.close()}})})(t)}))};t.add("lists",(t=>((t=>{(0,t.options.register)("lists_indent_on_tab",{processor:"boolean",default:!0})})(t),!1===t.hasPlugin("rtc",!0)?((t=>{Ct(t)&&(t=>{t.on("keydown",(e=>{e.keyCode!==W.TAB||W.metaKeyPressed(e)||t.undoManager.transact((()=>{(e.shiftKey?te(t):Yt(t))&&e.preventDefault()}))}))})(t),(t=>{t.on("keydown",(e=>{e.keyCode===W.BACKSPACE?Ne(t,!1)&&e.preventDefault():e.keyCode===W.DELETE&&Ne(t,!0)&&e.preventDefault()}))})(t)})(t),(t=>{t.on("BeforeExecCommand",(e=>{const n=e.command.toLowerCase();"indent"===n?Yt(t):"outdent"===n&&te(t)})),t.addCommand("InsertUnorderedList",((e,n)=>{fe(t,"UL",n)})),t.addCommand("InsertOrderedList",((e,n)=>{fe(t,"OL",n)})),t.addCommand("InsertDefinitionList",((e,n)=>{fe(t,"DL",n)})),t.addCommand("RemoveList",(()=>{ee(t)})),ke(t),t.addCommand("mceListUpdate",((e,n)=>{o(n)&&((t,e)=>{const n=wt(t);t.undoManager.transact((()=>{o(e.styles)&&t.dom.setStyles(n,e.styles),o(e.attrs)&&G(e.attrs,((e,r)=>t.dom.setAttrib(n,r,e)))}))})(t,n)})),t.addQueryStateHandler("InsertUnorderedList",Ae(t,"UL")),t.addQueryStateHandler("InsertOrderedList",Ae(t,"OL")),t.addQueryStateHandler("InsertDefinitionList",Ae(t,"DL"))})(t)):ke(t),(t=>{const e=e=>()=>t.execCommand(e);t.hasPlugin("advlist")||(t.ui.registry.addToggleButton("numlist",{icon:"ordered-list",active:!1,tooltip:"Numbered list",onAction:e("InsertOrderedList"),onSetup:e=>le(t,"OL",e.setActive)}),t.ui.registry.addToggleButton("bullist",{icon:"unordered-list",active:!1,tooltip:"Bullet list",onAction:e("InsertUnorderedList"),onSetup:e=>le(t,"UL",e.setActive)}))})(t),(t=>{const e={text:"List properties...",icon:"ordered-list",onAction:()=>t.execCommand("mceListProps"),onSetup:e=>le(t,"OL",e.setEnabled)};t.ui.registry.addMenuItem("listprops",e),t.ui.registry.addContextMenu("lists",{update:e=>{const n=wt(t,e);return lt(n)?["listprops"]:[]}})})(t),(t=>({backspaceDelete:e=>{Ne(t,e)}}))(t))))}(); \ No newline at end of file diff --git a/vendor/tinymce/tinymce/plugins/media/index.js b/vendor/tinymce/tinymce/plugins/media/index.js new file mode 100644 index 00000000..b69a10dc --- /dev/null +++ b/vendor/tinymce/tinymce/plugins/media/index.js @@ -0,0 +1,7 @@ +// Exports the "media" plugin for usage with module loaders +// Usage: +// CommonJS: +// require('tinymce/plugins/media') +// ES2015: +// import 'tinymce/plugins/media' +require('./plugin.js'); \ No newline at end of file diff --git a/vendor/tinymce/tinymce/plugins/media/plugin.js b/vendor/tinymce/tinymce/plugins/media/plugin.js new file mode 100644 index 00000000..4afc8a54 --- /dev/null +++ b/vendor/tinymce/tinymce/plugins/media/plugin.js @@ -0,0 +1,1150 @@ +/** + * TinyMCE version 6.0.2 (2022-04-27) + */ + +(function () { + 'use strict'; + + var global$6 = tinymce.util.Tools.resolve('tinymce.PluginManager'); + + const hasProto = (v, constructor, predicate) => { + var _a; + if (predicate(v, constructor.prototype)) { + return true; + } else { + return ((_a = v.constructor) === null || _a === void 0 ? void 0 : _a.name) === constructor.name; + } + }; + const typeOf = x => { + const t = typeof x; + if (x === null) { + return 'null'; + } else if (t === 'object' && Array.isArray(x)) { + return 'array'; + } else if (t === 'object' && hasProto(x, String, (o, proto) => proto.isPrototypeOf(o))) { + return 'string'; + } else { + return t; + } + }; + const isType = type => value => typeOf(value) === type; + const isString = isType('string'); + const isObject = isType('object'); + const isArray = isType('array'); + const isNullable = a => a === null || a === undefined; + const isNonNullable = a => !isNullable(a); + + class Optional { + constructor(tag, value) { + this.tag = tag; + this.value = value; + } + static some(value) { + return new Optional(true, value); + } + static none() { + return Optional.singletonNone; + } + fold(onNone, onSome) { + if (this.tag) { + return onSome(this.value); + } else { + return onNone(); + } + } + isSome() { + return this.tag; + } + isNone() { + return !this.tag; + } + map(mapper) { + if (this.tag) { + return Optional.some(mapper(this.value)); + } else { + return Optional.none(); + } + } + bind(binder) { + if (this.tag) { + return binder(this.value); + } else { + return Optional.none(); + } + } + exists(predicate) { + return this.tag && predicate(this.value); + } + forall(predicate) { + return !this.tag || predicate(this.value); + } + filter(predicate) { + if (!this.tag || predicate(this.value)) { + return this; + } else { + return Optional.none(); + } + } + getOr(replacement) { + return this.tag ? this.value : replacement; + } + or(replacement) { + return this.tag ? this : replacement; + } + getOrThunk(thunk) { + return this.tag ? this.value : thunk(); + } + orThunk(thunk) { + return this.tag ? this : thunk(); + } + getOrDie(message) { + if (!this.tag) { + throw new Error(message !== null && message !== void 0 ? message : 'Called getOrDie on None'); + } else { + return this.value; + } + } + static from(value) { + return isNonNullable(value) ? Optional.some(value) : Optional.none(); + } + getOrNull() { + return this.tag ? this.value : null; + } + getOrUndefined() { + return this.value; + } + each(worker) { + if (this.tag) { + worker(this.value); + } + } + toArray() { + return this.tag ? [this.value] : []; + } + toString() { + return this.tag ? `some(${ this.value })` : 'none()'; + } + } + Optional.singletonNone = new Optional(false); + + const nativePush = Array.prototype.push; + const each$1 = (xs, f) => { + for (let i = 0, len = xs.length; i < len; i++) { + const x = xs[i]; + f(x, i); + } + }; + const flatten = xs => { + const r = []; + for (let i = 0, len = xs.length; i < len; ++i) { + if (!isArray(xs[i])) { + throw new Error('Arr.flatten item ' + i + ' was not an array, input: ' + xs); + } + nativePush.apply(r, xs[i]); + } + return r; + }; + + const Cell = initial => { + let value = initial; + const get = () => { + return value; + }; + const set = v => { + value = v; + }; + return { + get, + set + }; + }; + + const keys = Object.keys; + const hasOwnProperty = Object.hasOwnProperty; + const each = (obj, f) => { + const props = keys(obj); + for (let k = 0, len = props.length; k < len; k++) { + const i = props[k]; + const x = obj[i]; + f(x, i); + } + }; + const get$1 = (obj, key) => { + return has(obj, key) ? Optional.from(obj[key]) : Optional.none(); + }; + const has = (obj, key) => hasOwnProperty.call(obj, key); + + const option = name => editor => editor.options.get(name); + const register$2 = editor => { + const registerOption = editor.options.register; + registerOption('audio_template_callback', { processor: 'function' }); + registerOption('video_template_callback', { processor: 'function' }); + registerOption('media_live_embeds', { + processor: 'boolean', + default: true + }); + registerOption('media_filter_html', { + processor: 'boolean', + default: true + }); + registerOption('media_url_resolver', { processor: 'function' }); + registerOption('media_alt_source', { + processor: 'boolean', + default: true + }); + registerOption('media_poster', { + processor: 'boolean', + default: true + }); + registerOption('media_dimensions', { + processor: 'boolean', + default: true + }); + }; + const getAudioTemplateCallback = option('audio_template_callback'); + const getVideoTemplateCallback = option('video_template_callback'); + const hasLiveEmbeds = option('media_live_embeds'); + const shouldFilterHtml = option('media_filter_html'); + const getUrlResolver = option('media_url_resolver'); + const hasAltSource = option('media_alt_source'); + const hasPoster = option('media_poster'); + const hasDimensions = option('media_dimensions'); + + var global$5 = tinymce.util.Tools.resolve('tinymce.util.Tools'); + + var global$4 = tinymce.util.Tools.resolve('tinymce.dom.DOMUtils'); + + var global$3 = tinymce.util.Tools.resolve('tinymce.html.DomParser'); + + const DOM$1 = global$4.DOM; + const trimPx = value => value.replace(/px$/, ''); + const getEphoxEmbedData = node => { + const style = node.attr('style'); + const styles = style ? DOM$1.parseStyle(style) : {}; + return { + type: 'ephox-embed-iri', + source: node.attr('data-ephox-embed-iri'), + altsource: '', + poster: '', + width: get$1(styles, 'max-width').map(trimPx).getOr(''), + height: get$1(styles, 'max-height').map(trimPx).getOr('') + }; + }; + const htmlToData = (html, schema) => { + let data = {}; + const parser = global$3({ + validate: false, + forced_root_block: false + }, schema); + const rootNode = parser.parse(html); + for (let node = rootNode; node; node = node.walk()) { + if (node.type === 1) { + const name = node.name; + if (node.attr('data-ephox-embed-iri')) { + data = getEphoxEmbedData(node); + break; + } else { + if (!data.source && name === 'param') { + data.source = node.attr('movie'); + } + if (name === 'iframe' || name === 'object' || name === 'embed' || name === 'video' || name === 'audio') { + if (!data.type) { + data.type = name; + } + data = global$5.extend(node.attributes.map, data); + } + if (name === 'script') { + data = { + type: 'script', + source: node.attr('src') + }; + } + if (name === 'source') { + if (!data.source) { + data.source = node.attr('src'); + } else if (!data.altsource) { + data.altsource = node.attr('src'); + } + } + if (name === 'img' && !data.poster) { + data.poster = node.attr('src'); + } + } + } + } + data.source = data.source || data.src || data.data; + data.altsource = data.altsource || ''; + data.poster = data.poster || ''; + return data; + }; + + const guess = url => { + const mimes = { + mp3: 'audio/mpeg', + m4a: 'audio/x-m4a', + wav: 'audio/wav', + mp4: 'video/mp4', + webm: 'video/webm', + ogg: 'video/ogg', + swf: 'application/x-shockwave-flash' + }; + const fileEnd = url.toLowerCase().split('.').pop(); + const mime = mimes[fileEnd]; + return mime ? mime : ''; + }; + + var global$2 = tinymce.util.Tools.resolve('tinymce.html.Node'); + + var global$1 = tinymce.util.Tools.resolve('tinymce.html.Serializer'); + + const Parser = (schema, settings = {}) => global$3({ + forced_root_block: false, + validate: false, + allow_conditional_comments: true, + ...settings + }, schema); + + const DOM = global$4.DOM; + const addPx = value => /^[0-9.]+$/.test(value) ? value + 'px' : value; + const updateEphoxEmbed = (data, node) => { + const style = node.attr('style'); + const styleMap = style ? DOM.parseStyle(style) : {}; + styleMap['max-width'] = addPx(data.width); + styleMap['max-height'] = addPx(data.height); + node.attr('style', DOM.serializeStyle(styleMap)); + }; + const sources = [ + 'source', + 'altsource' + ]; + const updateHtml = (html, data, updateAll, schema) => { + let numSources = 0; + let sourceCount = 0; + const parser = Parser(schema); + parser.addNodeFilter('source', nodes => numSources = nodes.length); + const rootNode = parser.parse(html); + for (let node = rootNode; node; node = node.walk()) { + if (node.type === 1) { + const name = node.name; + if (node.attr('data-ephox-embed-iri')) { + updateEphoxEmbed(data, node); + break; + } else { + switch (name) { + case 'video': + case 'object': + case 'embed': + case 'img': + case 'iframe': + if (data.height !== undefined && data.width !== undefined) { + node.attr('width', data.width); + node.attr('height', data.height); + } + break; + } + if (updateAll) { + switch (name) { + case 'video': + node.attr('poster', data.poster); + node.attr('src', null); + for (let index = numSources; index < 2; index++) { + if (data[sources[index]]) { + const source = new global$2('source', 1); + source.attr('src', data[sources[index]]); + source.attr('type', data[sources[index] + 'mime'] || null); + node.append(source); + } + } + break; + case 'iframe': + node.attr('src', data.source); + break; + case 'object': + const hasImage = node.getAll('img').length > 0; + if (data.poster && !hasImage) { + node.attr('src', data.poster); + const img = new global$2('img', 1); + img.attr('src', data.poster); + img.attr('width', data.width); + img.attr('height', data.height); + node.append(img); + } + break; + case 'source': + if (sourceCount < 2) { + node.attr('src', data[sources[sourceCount]]); + node.attr('type', data[sources[sourceCount] + 'mime'] || null); + if (!data[sources[sourceCount]]) { + node.remove(); + continue; + } + } + sourceCount++; + break; + case 'img': + if (!data.poster) { + node.remove(); + } + break; + } + } + } + } + } + return global$1({}, schema).serialize(rootNode); + }; + + const urlPatterns = [ + { + regex: /youtu\.be\/([\w\-_\?&=.]+)/i, + type: 'iframe', + w: 560, + h: 314, + url: 'www.youtube.com/embed/$1', + allowFullscreen: true + }, + { + regex: /youtube\.com(.+)v=([^&]+)(&([a-z0-9&=\-_]+))?/i, + type: 'iframe', + w: 560, + h: 314, + url: 'www.youtube.com/embed/$2?$4', + allowFullscreen: true + }, + { + regex: /youtube.com\/embed\/([a-z0-9\?&=\-_]+)/i, + type: 'iframe', + w: 560, + h: 314, + url: 'www.youtube.com/embed/$1', + allowFullscreen: true + }, + { + regex: /vimeo\.com\/([0-9]+)/, + type: 'iframe', + w: 425, + h: 350, + url: 'player.vimeo.com/video/$1?title=0&byline=0&portrait=0&color=8dc7dc', + allowFullscreen: true + }, + { + regex: /vimeo\.com\/(.*)\/([0-9]+)/, + type: 'iframe', + w: 425, + h: 350, + url: 'player.vimeo.com/video/$2?title=0&byline=0', + allowFullscreen: true + }, + { + regex: /maps\.google\.([a-z]{2,3})\/maps\/(.+)msid=(.+)/, + type: 'iframe', + w: 425, + h: 350, + url: 'maps.google.com/maps/ms?msid=$2&output=embed"', + allowFullscreen: false + }, + { + regex: /dailymotion\.com\/video\/([^_]+)/, + type: 'iframe', + w: 480, + h: 270, + url: 'www.dailymotion.com/embed/video/$1', + allowFullscreen: true + }, + { + regex: /dai\.ly\/([^_]+)/, + type: 'iframe', + w: 480, + h: 270, + url: 'www.dailymotion.com/embed/video/$1', + allowFullscreen: true + } + ]; + const getProtocol = url => { + const protocolMatches = url.match(/^(https?:\/\/|www\.)(.+)$/i); + if (protocolMatches && protocolMatches.length > 1) { + return protocolMatches[1] === 'www.' ? 'https://' : protocolMatches[1]; + } else { + return 'https://'; + } + }; + const getUrl = (pattern, url) => { + const protocol = getProtocol(url); + const match = pattern.regex.exec(url); + let newUrl = protocol + pattern.url; + for (let i = 0; i < match.length; i++) { + newUrl = newUrl.replace('$' + i, () => match[i] ? match[i] : ''); + } + return newUrl.replace(/\?$/, ''); + }; + const matchPattern = url => { + const patterns = urlPatterns.filter(pattern => pattern.regex.test(url)); + if (patterns.length > 0) { + return global$5.extend({}, patterns[0], { url: getUrl(patterns[0], url) }); + } else { + return null; + } + }; + + const getIframeHtml = data => { + const allowFullscreen = data.allowfullscreen ? ' allowFullscreen="1"' : ''; + return ''; + }; + const getFlashHtml = data => { + let html = ''; + if (data.poster) { + html += ''; + } + html += ''; + return html; + }; + const getAudioHtml = (data, audioTemplateCallback) => { + if (audioTemplateCallback) { + return audioTemplateCallback(data); + } else { + return ''; + } + }; + const getVideoHtml = (data, videoTemplateCallback) => { + if (videoTemplateCallback) { + return videoTemplateCallback(data); + } else { + return ''; + } + }; + const getScriptHtml = data => { + return ''; + }; + const dataToHtml = (editor, dataIn) => { + const data = global$5.extend({}, dataIn); + if (!data.source) { + global$5.extend(data, htmlToData(data.embed, editor.schema)); + if (!data.source) { + return ''; + } + } + if (!data.altsource) { + data.altsource = ''; + } + if (!data.poster) { + data.poster = ''; + } + data.source = editor.convertURL(data.source, 'source'); + data.altsource = editor.convertURL(data.altsource, 'source'); + data.sourcemime = guess(data.source); + data.altsourcemime = guess(data.altsource); + data.poster = editor.convertURL(data.poster, 'poster'); + const pattern = matchPattern(data.source); + if (pattern) { + data.source = pattern.url; + data.type = pattern.type; + data.allowfullscreen = pattern.allowFullscreen; + data.width = data.width || String(pattern.w); + data.height = data.height || String(pattern.h); + } + if (data.embed) { + return updateHtml(data.embed, data, true, editor.schema); + } else { + const audioTemplateCallback = getAudioTemplateCallback(editor); + const videoTemplateCallback = getVideoTemplateCallback(editor); + data.width = data.width || '300'; + data.height = data.height || '150'; + global$5.each(data, (value, key) => { + data[key] = editor.dom.encode('' + value); + }); + if (data.type === 'iframe') { + return getIframeHtml(data); + } else if (data.sourcemime === 'application/x-shockwave-flash') { + return getFlashHtml(data); + } else if (data.sourcemime.indexOf('audio') !== -1) { + return getAudioHtml(data, audioTemplateCallback); + } else if (data.type === 'script') { + return getScriptHtml(data); + } else { + return getVideoHtml(data, videoTemplateCallback); + } + } + }; + + const isMediaElement = element => element.hasAttribute('data-mce-object') || element.hasAttribute('data-ephox-embed-iri'); + const setup$2 = editor => { + editor.on('click keyup touchend', () => { + const selectedNode = editor.selection.getNode(); + if (selectedNode && editor.dom.hasClass(selectedNode, 'mce-preview-object')) { + if (editor.dom.getAttrib(selectedNode, 'data-mce-selected')) { + selectedNode.setAttribute('data-mce-selected', '2'); + } + } + }); + editor.on('ObjectSelected', e => { + const objectType = e.target.getAttribute('data-mce-object'); + if (objectType === 'script') { + e.preventDefault(); + } + }); + editor.on('ObjectResized', e => { + const target = e.target; + if (target.getAttribute('data-mce-object')) { + let html = target.getAttribute('data-mce-html'); + if (html) { + html = unescape(html); + target.setAttribute('data-mce-html', escape(updateHtml(html, { + width: String(e.width), + height: String(e.height) + }, false, editor.schema))); + } + } + }); + }; + + const cache = {}; + const embedPromise = (data, dataToHtml, handler) => { + return new Promise((res, rej) => { + const wrappedResolve = response => { + if (response.html) { + cache[data.source] = response; + } + return res({ + url: data.source, + html: response.html ? response.html : dataToHtml(data) + }); + }; + if (cache[data.source]) { + wrappedResolve(cache[data.source]); + } else { + handler({ url: data.source }, wrappedResolve, rej); + } + }); + }; + const defaultPromise = (data, dataToHtml) => Promise.resolve({ + html: dataToHtml(data), + url: data.source + }); + const loadedData = editor => data => dataToHtml(editor, data); + const getEmbedHtml = (editor, data) => { + const embedHandler = getUrlResolver(editor); + return embedHandler ? embedPromise(data, loadedData(editor), embedHandler) : defaultPromise(data, loadedData(editor)); + }; + const isCached = url => has(cache, url); + + const extractMeta = (sourceInput, data) => get$1(data, sourceInput).bind(mainData => get$1(mainData, 'meta')); + const getValue = (data, metaData, sourceInput) => prop => { + const getFromData = () => get$1(data, prop); + const getFromMetaData = () => get$1(metaData, prop); + const getNonEmptyValue = c => get$1(c, 'value').bind(v => v.length > 0 ? Optional.some(v) : Optional.none()); + const getFromValueFirst = () => getFromData().bind(child => isObject(child) ? getNonEmptyValue(child).orThunk(getFromMetaData) : getFromMetaData().orThunk(() => Optional.from(child))); + const getFromMetaFirst = () => getFromMetaData().orThunk(() => getFromData().bind(child => isObject(child) ? getNonEmptyValue(child) : Optional.from(child))); + return { [prop]: (prop === sourceInput ? getFromValueFirst() : getFromMetaFirst()).getOr('') }; + }; + const getDimensions = (data, metaData) => { + const dimensions = {}; + get$1(data, 'dimensions').each(dims => { + each$1([ + 'width', + 'height' + ], prop => { + get$1(metaData, prop).orThunk(() => get$1(dims, prop)).each(value => dimensions[prop] = value); + }); + }); + return dimensions; + }; + const unwrap = (data, sourceInput) => { + const metaData = sourceInput ? extractMeta(sourceInput, data).getOr({}) : {}; + const get = getValue(data, metaData, sourceInput); + return { + ...get('source'), + ...get('altsource'), + ...get('poster'), + ...get('embed'), + ...getDimensions(data, metaData) + }; + }; + const wrap = data => { + const wrapped = { + ...data, + source: { value: get$1(data, 'source').getOr('') }, + altsource: { value: get$1(data, 'altsource').getOr('') }, + poster: { value: get$1(data, 'poster').getOr('') } + }; + each$1([ + 'width', + 'height' + ], prop => { + get$1(data, prop).each(value => { + const dimensions = wrapped.dimensions || {}; + dimensions[prop] = value; + wrapped.dimensions = dimensions; + }); + }); + return wrapped; + }; + const handleError = editor => error => { + const errorMessage = error && error.msg ? 'Media embed handler error: ' + error.msg : 'Media embed handler threw unknown error.'; + editor.notificationManager.open({ + type: 'error', + text: errorMessage + }); + }; + const getEditorData = editor => { + const element = editor.selection.getNode(); + const snippet = isMediaElement(element) ? editor.serializer.serialize(element, { selection: true }) : ''; + return { + embed: snippet, + ...htmlToData(snippet, editor.schema) + }; + }; + const addEmbedHtml = (api, editor) => response => { + if (isString(response.url) && response.url.trim().length > 0) { + const html = response.html; + const snippetData = htmlToData(html, editor.schema); + const nuData = { + ...snippetData, + source: response.url, + embed: html + }; + api.setData(wrap(nuData)); + } + }; + const selectPlaceholder = (editor, beforeObjects) => { + const afterObjects = editor.dom.select('*[data-mce-object]'); + for (let i = 0; i < beforeObjects.length; i++) { + for (let y = afterObjects.length - 1; y >= 0; y--) { + if (beforeObjects[i] === afterObjects[y]) { + afterObjects.splice(y, 1); + } + } + } + editor.selection.select(afterObjects[0]); + }; + const handleInsert = (editor, html) => { + const beforeObjects = editor.dom.select('*[data-mce-object]'); + editor.insertContent(html); + selectPlaceholder(editor, beforeObjects); + editor.nodeChanged(); + }; + const submitForm = (prevData, newData, editor) => { + newData.embed = updateHtml(newData.embed, newData, false, editor.schema); + if (newData.embed && (prevData.source === newData.source || isCached(newData.source))) { + handleInsert(editor, newData.embed); + } else { + getEmbedHtml(editor, newData).then(response => { + handleInsert(editor, response.html); + }).catch(handleError(editor)); + } + }; + const showDialog = editor => { + const editorData = getEditorData(editor); + const currentData = Cell(editorData); + const initialData = wrap(editorData); + const handleSource = (prevData, api) => { + const serviceData = unwrap(api.getData(), 'source'); + if (prevData.source !== serviceData.source) { + addEmbedHtml(win, editor)({ + url: serviceData.source, + html: '' + }); + getEmbedHtml(editor, serviceData).then(addEmbedHtml(win, editor)).catch(handleError(editor)); + } + }; + const handleEmbed = api => { + const data = unwrap(api.getData()); + const dataFromEmbed = htmlToData(data.embed, editor.schema); + api.setData(wrap(dataFromEmbed)); + }; + const handleUpdate = (api, sourceInput) => { + const data = unwrap(api.getData(), sourceInput); + const embed = dataToHtml(editor, data); + api.setData(wrap({ + ...data, + embed + })); + }; + const mediaInput = [{ + name: 'source', + type: 'urlinput', + filetype: 'media', + label: 'Source' + }]; + const sizeInput = !hasDimensions(editor) ? [] : [{ + type: 'sizeinput', + name: 'dimensions', + label: 'Constrain proportions', + constrain: true + }]; + const generalTab = { + title: 'General', + name: 'general', + items: flatten([ + mediaInput, + sizeInput + ]) + }; + const embedTextarea = { + type: 'textarea', + name: 'embed', + label: 'Paste your embed code below:' + }; + const embedTab = { + title: 'Embed', + items: [embedTextarea] + }; + const advancedFormItems = []; + if (hasAltSource(editor)) { + advancedFormItems.push({ + name: 'altsource', + type: 'urlinput', + filetype: 'media', + label: 'Alternative source URL' + }); + } + if (hasPoster(editor)) { + advancedFormItems.push({ + name: 'poster', + type: 'urlinput', + filetype: 'image', + label: 'Media poster (Image URL)' + }); + } + const advancedTab = { + title: 'Advanced', + name: 'advanced', + items: advancedFormItems + }; + const tabs = [ + generalTab, + embedTab + ]; + if (advancedFormItems.length > 0) { + tabs.push(advancedTab); + } + const body = { + type: 'tabpanel', + tabs + }; + const win = editor.windowManager.open({ + title: 'Insert/Edit Media', + size: 'normal', + body, + buttons: [ + { + type: 'cancel', + name: 'cancel', + text: 'Cancel' + }, + { + type: 'submit', + name: 'save', + text: 'Save', + primary: true + } + ], + onSubmit: api => { + const serviceData = unwrap(api.getData()); + submitForm(currentData.get(), serviceData, editor); + api.close(); + }, + onChange: (api, detail) => { + switch (detail.name) { + case 'source': + handleSource(currentData.get(), api); + break; + case 'embed': + handleEmbed(api); + break; + case 'dimensions': + case 'altsource': + case 'poster': + handleUpdate(api, detail.name); + break; + } + currentData.set(unwrap(api.getData())); + }, + initialData + }); + }; + + const get = editor => { + const showDialog$1 = () => { + showDialog(editor); + }; + return { showDialog: showDialog$1 }; + }; + + const register$1 = editor => { + const showDialog$1 = () => { + showDialog(editor); + }; + editor.addCommand('mceMedia', showDialog$1); + }; + + const checkRange = (str, substr, start) => substr === '' || str.length >= substr.length && str.substr(start, start + substr.length) === substr; + const startsWith = (str, prefix) => { + return checkRange(str, prefix, 0); + }; + + var global = tinymce.util.Tools.resolve('tinymce.Env'); + + const isLiveEmbedNode = node => { + const name = node.name; + return name === 'iframe' || name === 'video' || name === 'audio'; + }; + const getDimension = (node, styles, dimension, defaultValue = null) => { + const value = node.attr(dimension); + if (isNonNullable(value)) { + return value; + } else if (!has(styles, dimension)) { + return defaultValue; + } else { + return null; + } + }; + const setDimensions = (node, previewNode, styles) => { + const useDefaults = previewNode.name === 'img' || node.name === 'video'; + const defaultWidth = useDefaults ? '300' : null; + const fallbackHeight = node.name === 'audio' ? '30' : '150'; + const defaultHeight = useDefaults ? fallbackHeight : null; + previewNode.attr({ + width: getDimension(node, styles, 'width', defaultWidth), + height: getDimension(node, styles, 'height', defaultHeight) + }); + }; + const appendNodeContent = (editor, nodeName, previewNode, html) => { + const newNode = Parser(editor.schema).parse(html, { context: nodeName }); + while (newNode.firstChild) { + previewNode.append(newNode.firstChild); + } + }; + const createPlaceholderNode = (editor, node) => { + const name = node.name; + const placeHolder = new global$2('img', 1); + retainAttributesAndInnerHtml(editor, node, placeHolder); + setDimensions(node, placeHolder, {}); + placeHolder.attr({ + 'style': node.attr('style'), + 'src': global.transparentSrc, + 'data-mce-object': name, + 'class': 'mce-object mce-object-' + name + }); + return placeHolder; + }; + const createPreviewNode = (editor, node) => { + const name = node.name; + const previewWrapper = new global$2('span', 1); + previewWrapper.attr({ + 'contentEditable': 'false', + 'style': node.attr('style'), + 'data-mce-object': name, + 'class': 'mce-preview-object mce-object-' + name + }); + retainAttributesAndInnerHtml(editor, node, previewWrapper); + const styles = editor.dom.parseStyle(node.attr('style')); + const previewNode = new global$2(name, 1); + setDimensions(node, previewNode, styles); + previewNode.attr({ + src: node.attr('src'), + style: node.attr('style'), + class: node.attr('class') + }); + if (name === 'iframe') { + previewNode.attr({ + allowfullscreen: node.attr('allowfullscreen'), + frameborder: '0' + }); + } else { + const attrs = [ + 'controls', + 'crossorigin', + 'currentTime', + 'loop', + 'muted', + 'poster', + 'preload' + ]; + each$1(attrs, attrName => { + previewNode.attr(attrName, node.attr(attrName)); + }); + const sanitizedHtml = previewWrapper.attr('data-mce-html'); + if (isNonNullable(sanitizedHtml)) { + appendNodeContent(editor, name, previewNode, unescape(sanitizedHtml)); + } + } + const shimNode = new global$2('span', 1); + shimNode.attr('class', 'mce-shim'); + previewWrapper.append(previewNode); + previewWrapper.append(shimNode); + return previewWrapper; + }; + const retainAttributesAndInnerHtml = (editor, sourceNode, targetNode) => { + const attribs = sourceNode.attributes; + let ai = attribs.length; + while (ai--) { + const attrName = attribs[ai].name; + let attrValue = attribs[ai].value; + if (attrName !== 'width' && attrName !== 'height' && attrName !== 'style' && !startsWith(attrName, 'data-mce-')) { + if (attrName === 'data' || attrName === 'src') { + attrValue = editor.convertURL(attrValue, attrName); + } + targetNode.attr('data-mce-p-' + attrName, attrValue); + } + } + const serializer = global$1({ inner: true }, editor.schema); + const tempNode = new global$2('div', 1); + each$1(sourceNode.children(), child => tempNode.append(child)); + const innerHtml = serializer.serialize(tempNode); + if (innerHtml) { + targetNode.attr('data-mce-html', escape(innerHtml)); + targetNode.empty(); + } + }; + const isPageEmbedWrapper = node => { + const nodeClass = node.attr('class'); + return nodeClass && /\btiny-pageembed\b/.test(nodeClass); + }; + const isWithinEmbedWrapper = node => { + while (node = node.parent) { + if (node.attr('data-ephox-embed-iri') || isPageEmbedWrapper(node)) { + return true; + } + } + return false; + }; + const placeHolderConverter = editor => nodes => { + let i = nodes.length; + let node; + while (i--) { + node = nodes[i]; + if (!node.parent) { + continue; + } + if (node.parent.attr('data-mce-object')) { + continue; + } + if (isLiveEmbedNode(node) && hasLiveEmbeds(editor)) { + if (!isWithinEmbedWrapper(node)) { + node.replace(createPreviewNode(editor, node)); + } + } else { + if (!isWithinEmbedWrapper(node)) { + node.replace(createPlaceholderNode(editor, node)); + } + } + } + }; + + const parseAndSanitize = (editor, context, html) => { + const validate = shouldFilterHtml(editor); + return Parser(editor.schema, { validate }).parse(html, { context }); + }; + + const setup$1 = editor => { + editor.on('PreInit', () => { + const {schema, serializer, parser} = editor; + const boolAttrs = schema.getBoolAttrs(); + each$1('webkitallowfullscreen mozallowfullscreen'.split(' '), name => { + boolAttrs[name] = {}; + }); + each({ embed: ['wmode'] }, (attrs, name) => { + const rule = schema.getElementRule(name); + each$1(attrs, attr => { + rule.attributes[attr] = {}; + rule.attributesOrder.push(attr); + }); + }); + parser.addNodeFilter('iframe,video,audio,object,embed,script', placeHolderConverter(editor)); + serializer.addAttributeFilter('data-mce-object', (nodes, name) => { + let i = nodes.length; + while (i--) { + const node = nodes[i]; + if (!node.parent) { + continue; + } + const realElmName = node.attr(name); + const realElm = new global$2(realElmName, 1); + if (realElmName !== 'audio' && realElmName !== 'script') { + const className = node.attr('class'); + if (className && className.indexOf('mce-preview-object') !== -1) { + realElm.attr({ + width: node.firstChild.attr('width'), + height: node.firstChild.attr('height') + }); + } else { + realElm.attr({ + width: node.attr('width'), + height: node.attr('height') + }); + } + } + realElm.attr({ style: node.attr('style') }); + const attribs = node.attributes; + let ai = attribs.length; + while (ai--) { + const attrName = attribs[ai].name; + if (attrName.indexOf('data-mce-p-') === 0) { + realElm.attr(attrName.substr(11), attribs[ai].value); + } + } + if (realElmName === 'script') { + realElm.attr('type', 'text/javascript'); + } + const innerHtml = node.attr('data-mce-html'); + if (innerHtml) { + const fragment = parseAndSanitize(editor, realElmName, unescape(innerHtml)); + each$1(fragment.children(), child => realElm.append(child)); + } + node.replace(realElm); + } + }); + }); + editor.on('SetContent', () => { + const dom = editor.dom; + each$1(dom.select('span.mce-preview-object'), elm => { + if (dom.select('span.mce-shim', elm).length === 0) { + dom.add(elm, 'span', { class: 'mce-shim' }); + } + }); + }); + }; + + const setup = editor => { + editor.on('ResolveName', e => { + let name; + if (e.target.nodeType === 1 && (name = e.target.getAttribute('data-mce-object'))) { + e.name = name; + } + }); + }; + + const register = editor => { + const onAction = () => editor.execCommand('mceMedia'); + editor.ui.registry.addToggleButton('media', { + tooltip: 'Insert/edit media', + icon: 'embed', + onAction, + onSetup: buttonApi => { + const selection = editor.selection; + buttonApi.setActive(isMediaElement(selection.getNode())); + return selection.selectorChangedWithUnbind('img[data-mce-object],span[data-mce-object],div[data-ephox-embed-iri]', buttonApi.setActive).unbind; + } + }); + editor.ui.registry.addMenuItem('media', { + icon: 'embed', + text: 'Media...', + onAction + }); + }; + + var Plugin = () => { + global$6.add('media', editor => { + register$2(editor); + register$1(editor); + register(editor); + setup(editor); + setup$1(editor); + setup$2(editor); + return get(editor); + }); + }; + + Plugin(); + +})(); diff --git a/vendor/tinymce/tinymce/plugins/media/plugin.min.js b/vendor/tinymce/tinymce/plugins/media/plugin.min.js new file mode 100644 index 00000000..6c28b1d7 --- /dev/null +++ b/vendor/tinymce/tinymce/plugins/media/plugin.min.js @@ -0,0 +1,4 @@ +/** + * TinyMCE version 6.0.2 (2022-04-27) + */ +!function(){"use strict";var e=tinymce.util.Tools.resolve("tinymce.PluginManager");const t=e=>t=>(e=>{const t=typeof e;return null===e?"null":"object"===t&&Array.isArray(e)?"array":"object"===t&&(r=a=e,(o=String).prototype.isPrototypeOf(r)||(null===(s=a.constructor)||void 0===s?void 0:s.name)===o.name)?"string":t;var r,a,o,s})(t)===e,r=t("string"),a=t("object"),o=t("array"),s=e=>!(e=>null==e)(e);class i{constructor(e,t){this.tag=e,this.value=t}static some(e){return new i(!0,e)}static none(){return i.singletonNone}fold(e,t){return this.tag?t(this.value):e()}isSome(){return this.tag}isNone(){return!this.tag}map(e){return this.tag?i.some(e(this.value)):i.none()}bind(e){return this.tag?e(this.value):i.none()}exists(e){return this.tag&&e(this.value)}forall(e){return!this.tag||e(this.value)}filter(e){return!this.tag||e(this.value)?this:i.none()}getOr(e){return this.tag?this.value:e}or(e){return this.tag?this:e}getOrThunk(e){return this.tag?this.value:e()}orThunk(e){return this.tag?this:e()}getOrDie(e){if(this.tag)return this.value;throw new Error(null!=e?e:"Called getOrDie on None")}static from(e){return s(e)?i.some(e):i.none()}getOrNull(){return this.tag?this.value:null}getOrUndefined(){return this.value}each(e){this.tag&&e(this.value)}toArray(){return this.tag?[this.value]:[]}toString(){return this.tag?`some(${this.value})`:"none()"}}i.singletonNone=new i(!1);const c=Array.prototype.push,n=(e,t)=>{for(let r=0,a=e.length;r{const t=[];for(let r=0,a=e.length;rh(e,t)?i.from(e[t]):i.none(),h=(e,t)=>u.call(e,t),p=e=>t=>t.options.get(e),g=p("audio_template_callback"),b=p("video_template_callback"),w=p("media_live_embeds"),y=p("media_filter_html"),f=p("media_url_resolver"),v=p("media_alt_source"),x=p("media_poster"),_=p("media_dimensions");var j=tinymce.util.Tools.resolve("tinymce.util.Tools"),k=tinymce.util.Tools.resolve("tinymce.dom.DOMUtils"),O=tinymce.util.Tools.resolve("tinymce.html.DomParser");const A=k.DOM,S=e=>e.replace(/px$/,""),D=e=>{const t=e.attr("style"),r=t?A.parseStyle(t):{};return{type:"ephox-embed-iri",source:e.attr("data-ephox-embed-iri"),altsource:"",poster:"",width:d(r,"max-width").map(S).getOr(""),height:d(r,"max-height").map(S).getOr("")}},T=(e,t)=>{let r={};for(let a=O({validate:!1,forced_root_block:!1},t).parse(e);a;a=a.walk())if(1===a.type){const e=a.name;if(a.attr("data-ephox-embed-iri")){r=D(a);break}r.source||"param"!==e||(r.source=a.attr("movie")),"iframe"!==e&&"object"!==e&&"embed"!==e&&"video"!==e&&"audio"!==e||(r.type||(r.type=e),r=j.extend(a.attributes.map,r)),"script"===e&&(r={type:"script",source:a.attr("src")}),"source"===e&&(r.source?r.altsource||(r.altsource=a.attr("src")):r.source=a.attr("src")),"img"!==e||r.poster||(r.poster=a.attr("src"))}return r.source=r.source||r.src||r.data,r.altsource=r.altsource||"",r.poster=r.poster||"",r},C=e=>({mp3:"audio/mpeg",m4a:"audio/x-m4a",wav:"audio/wav",mp4:"video/mp4",webm:"video/webm",ogg:"video/ogg",swf:"application/x-shockwave-flash"}[e.toLowerCase().split(".").pop()]||"");var $=tinymce.util.Tools.resolve("tinymce.html.Node"),z=tinymce.util.Tools.resolve("tinymce.html.Serializer");const M=(e,t={})=>O({forced_root_block:!1,validate:!1,allow_conditional_comments:!0,...t},e),F=k.DOM,N=e=>/^[0-9.]+$/.test(e)?e+"px":e,R=(e,t)=>{const r=t.attr("style"),a=r?F.parseStyle(r):{};a["max-width"]=N(e.width),a["max-height"]=N(e.height),t.attr("style",F.serializeStyle(a))},U=["source","altsource"],P=(e,t,r,a)=>{let o=0,s=0;const i=M(a);i.addNodeFilter("source",(e=>o=e.length));const c=i.parse(e);for(let e=c;e;e=e.walk())if(1===e.type){const a=e.name;if(e.attr("data-ephox-embed-iri")){R(t,e);break}switch(a){case"video":case"object":case"embed":case"img":case"iframe":void 0!==t.height&&void 0!==t.width&&(e.attr("width",t.width),e.attr("height",t.height))}if(r)switch(a){case"video":e.attr("poster",t.poster),e.attr("src",null);for(let r=o;r<2;r++)if(t[U[r]]){const a=new $("source",1);a.attr("src",t[U[r]]),a.attr("type",t[U[r]+"mime"]||null),e.append(a)}break;case"iframe":e.attr("src",t.source);break;case"object":const r=e.getAll("img").length>0;if(t.poster&&!r){e.attr("src",t.poster);const r=new $("img",1);r.attr("src",t.poster),r.attr("width",t.width),r.attr("height",t.height),e.append(r)}break;case"source":if(s<2&&(e.attr("src",t[U[s]]),e.attr("type",t[U[s]+"mime"]||null),!t[U[s]])){e.remove();continue}s++;break;case"img":t.poster||e.remove()}}return z({},a).serialize(c)},E=[{regex:/youtu\.be\/([\w\-_\?&=.]+)/i,type:"iframe",w:560,h:314,url:"www.youtube.com/embed/$1",allowFullscreen:!0},{regex:/youtube\.com(.+)v=([^&]+)(&([a-z0-9&=\-_]+))?/i,type:"iframe",w:560,h:314,url:"www.youtube.com/embed/$2?$4",allowFullscreen:!0},{regex:/youtube.com\/embed\/([a-z0-9\?&=\-_]+)/i,type:"iframe",w:560,h:314,url:"www.youtube.com/embed/$1",allowFullscreen:!0},{regex:/vimeo\.com\/([0-9]+)/,type:"iframe",w:425,h:350,url:"player.vimeo.com/video/$1?title=0&byline=0&portrait=0&color=8dc7dc",allowFullscreen:!0},{regex:/vimeo\.com\/(.*)\/([0-9]+)/,type:"iframe",w:425,h:350,url:"player.vimeo.com/video/$2?title=0&byline=0",allowFullscreen:!0},{regex:/maps\.google\.([a-z]{2,3})\/maps\/(.+)msid=(.+)/,type:"iframe",w:425,h:350,url:'maps.google.com/maps/ms?msid=$2&output=embed"',allowFullscreen:!1},{regex:/dailymotion\.com\/video\/([^_]+)/,type:"iframe",w:480,h:270,url:"www.dailymotion.com/embed/video/$1",allowFullscreen:!0},{regex:/dai\.ly\/([^_]+)/,type:"iframe",w:480,h:270,url:"www.dailymotion.com/embed/video/$1",allowFullscreen:!0}],L=(e,t)=>{const r=(e=>{const t=e.match(/^(https?:\/\/|www\.)(.+)$/i);return t&&t.length>1?"www."===t[1]?"https://":t[1]:"https://"})(t),a=e.regex.exec(t);let o=r+e.url;for(let e=0;ea[e]?a[e]:""));return o.replace(/\?$/,"")},I=(e,t)=>{const r=j.extend({},t);if(!r.source&&(j.extend(r,T(r.embed,e.schema)),!r.source))return"";r.altsource||(r.altsource=""),r.poster||(r.poster=""),r.source=e.convertURL(r.source,"source"),r.altsource=e.convertURL(r.altsource,"source"),r.sourcemime=C(r.source),r.altsourcemime=C(r.altsource),r.poster=e.convertURL(r.poster,"poster");const a=(e=>{const t=E.filter((t=>t.regex.test(e)));return t.length>0?j.extend({},t[0],{url:L(t[0],e)}):null})(r.source);if(a&&(r.source=a.url,r.type=a.type,r.allowfullscreen=a.allowFullscreen,r.width=r.width||String(a.w),r.height=r.height||String(a.h)),r.embed)return P(r.embed,r,!0,e.schema);{const t=g(e),a=b(e);return r.width=r.width||"300",r.height=r.height||"150",j.each(r,((t,a)=>{r[a]=e.dom.encode(""+t)})),"iframe"===r.type?(e=>{const t=e.allowfullscreen?' allowFullscreen="1"':"";return'"})(r):"application/x-shockwave-flash"===r.sourcemime?(e=>{let t='';return e.poster&&(t+=''),t+="",t})(r):-1!==r.sourcemime.indexOf("audio")?((e,t)=>t?t(e):'")(r,t):"script"===r.type?(e=>' '; + const directionality = editor.getBody().dir; + const dirAttr = directionality ? ' dir="' + encode(directionality) + '"' : ''; + const previewHtml = '' + '' + '' + headHtml + '' + '' + editor.getContent() + preventClicksOnLinksScript + '' + ''; + return previewHtml; + }; + + const open = editor => { + const content = getPreviewHtml(editor); + const dataApi = editor.windowManager.open({ + title: 'Preview', + size: 'large', + body: { + type: 'panel', + items: [{ + name: 'preview', + type: 'iframe', + sandboxed: true + }] + }, + buttons: [{ + type: 'cancel', + name: 'close', + text: 'Close', + primary: true + }], + initialData: { preview: content } + }); + dataApi.focus('close'); + }; + + const register$1 = editor => { + editor.addCommand('mcePreview', () => { + open(editor); + }); + }; + + const register = editor => { + const onAction = () => editor.execCommand('mcePreview'); + editor.ui.registry.addButton('preview', { + icon: 'preview', + tooltip: 'Preview', + onAction + }); + editor.ui.registry.addMenuItem('preview', { + icon: 'preview', + text: 'Preview', + onAction + }); + }; + + var Plugin = () => { + global$2.add('preview', editor => { + register$1(editor); + register(editor); + }); + }; + + Plugin(); + +})(); diff --git a/vendor/tinymce/tinymce/plugins/preview/plugin.min.js b/vendor/tinymce/tinymce/plugins/preview/plugin.min.js new file mode 100644 index 00000000..85c2785a --- /dev/null +++ b/vendor/tinymce/tinymce/plugins/preview/plugin.min.js @@ -0,0 +1,4 @@ +/** + * TinyMCE version 6.0.2 (2022-04-27) + */ +!function(){"use strict";var e=tinymce.util.Tools.resolve("tinymce.PluginManager"),t=tinymce.util.Tools.resolve("tinymce.Env"),o=tinymce.util.Tools.resolve("tinymce.util.Tools");const n=e=>t=>t.options.get(e),i=n("content_style"),s=n("content_css_cors"),c=n("body_class"),r=n("body_id");e.add("preview",(e=>{(e=>{e.addCommand("mcePreview",(()=>{(e=>{const n=(e=>{var n;let l="";const a=e.dom.encode,d=null!==(n=i(e))&&void 0!==n?n:"";l+='';const m=s(e)?' crossorigin="anonymous"':"";o.each(e.contentCSS,(t=>{l+='"})),d&&(l+='");const y=r(e),u=c(e),v=' '; + const directionality = editor.getBody().dir; + const dirAttr = directionality ? ' dir="' + encode(directionality) + '"' : ''; + html = '' + '' + '' + '' + contentCssEntries + preventClicksOnLinksScript + '' + '' + html + '' + ''; + } + return replaceTemplateValues(html, getPreviewReplaceValues(editor)); + }; + const open = (editor, templateList) => { + const createTemplates = () => { + if (!templateList || templateList.length === 0) { + const message = editor.translate('No templates defined.'); + editor.notificationManager.open({ + text: message, + type: 'info' + }); + return Optional.none(); + } + return Optional.from(global$1.map(templateList, (template, index) => { + const isUrlTemplate = t => t.url !== undefined; + return { + selected: index === 0, + text: template.title, + value: { + url: isUrlTemplate(template) ? Optional.from(template.url) : Optional.none(), + content: !isUrlTemplate(template) ? Optional.from(template.content) : Optional.none(), + description: template.description + } + }; + })); + }; + const createSelectBoxItems = templates => map(templates, t => ({ + text: t.text, + value: t.text + })); + const findTemplate = (templates, templateTitle) => find(templates, t => t.text === templateTitle); + const loadFailedAlert = api => { + editor.windowManager.alert('Could not load the specified template.', () => api.focus('template')); + }; + const getTemplateContent = t => t.value.url.fold(() => Promise.resolve(t.value.content.getOr('')), url => fetch(url).then(res => res.ok ? res.text() : Promise.reject())); + const onChange = (templates, updateDialog) => (api, change) => { + if (change.name === 'template') { + const newTemplateTitle = api.getData().template; + findTemplate(templates, newTemplateTitle).each(t => { + api.block('Loading...'); + getTemplateContent(t).then(previewHtml => { + updateDialog(api, t, previewHtml); + }).catch(() => { + updateDialog(api, t, ''); + api.setEnabled('save', false); + loadFailedAlert(api); + }); + }); + } + }; + const onSubmit = templates => api => { + const data = api.getData(); + findTemplate(templates, data.template).each(t => { + getTemplateContent(t).then(previewHtml => { + editor.execCommand('mceInsertTemplate', false, previewHtml); + api.close(); + }).catch(() => { + api.setEnabled('save', false); + loadFailedAlert(api); + }); + }); + }; + const openDialog = templates => { + const selectBoxItems = createSelectBoxItems(templates); + const buildDialogSpec = (bodyItems, initialData) => ({ + title: 'Insert Template', + size: 'large', + body: { + type: 'panel', + items: bodyItems + }, + initialData, + buttons: [ + { + type: 'cancel', + name: 'cancel', + text: 'Cancel' + }, + { + type: 'submit', + name: 'save', + text: 'Save', + primary: true + } + ], + onSubmit: onSubmit(templates), + onChange: onChange(templates, updateDialog) + }); + const updateDialog = (dialogApi, template, previewHtml) => { + const content = getPreviewContent(editor, previewHtml); + const bodyItems = [ + { + type: 'selectbox', + name: 'template', + label: 'Templates', + items: selectBoxItems + }, + { + type: 'htmlpanel', + html: `

    ${ htmlEscape(template.value.description) }

    ` + }, + { + label: 'Preview', + type: 'iframe', + name: 'preview', + sandboxed: false + } + ]; + const initialData = { + template: template.text, + preview: content + }; + dialogApi.unblock(); + dialogApi.redial(buildDialogSpec(bodyItems, initialData)); + dialogApi.focus('template'); + }; + const dialogApi = editor.windowManager.open(buildDialogSpec([], { + template: '', + preview: '' + })); + dialogApi.block('Loading...'); + getTemplateContent(templates[0]).then(previewHtml => { + updateDialog(dialogApi, templates[0], previewHtml); + }).catch(() => { + updateDialog(dialogApi, templates[0], ''); + dialogApi.setEnabled('save', false); + loadFailedAlert(dialogApi); + }); + }; + const optTemplates = createTemplates(); + optTemplates.each(openDialog); + }; + + const showDialog = editor => templates => { + open(editor, templates); + }; + const register$1 = editor => { + editor.addCommand('mceInsertTemplate', curry(insertTemplate, editor)); + editor.addCommand('mceTemplate', createTemplateList(editor, showDialog(editor))); + }; + + const setup = editor => { + editor.on('PreProcess', o => { + const dom = editor.dom, dateFormat = getMdateFormat(editor); + global$1.each(dom.select('div', o.node), e => { + if (dom.hasClass(e, 'mceTmpl')) { + global$1.each(dom.select('*', e), e => { + if (dom.hasClass(e, getModificationDateClasses(editor).replace(/\s+/g, '|'))) { + e.innerHTML = getDateTime(editor, dateFormat); + } + }); + replaceVals(editor, e); + } + }); + }); + }; + + const register = editor => { + const onAction = () => editor.execCommand('mceTemplate'); + editor.ui.registry.addButton('template', { + icon: 'template', + tooltip: 'Insert template', + onAction + }); + editor.ui.registry.addMenuItem('template', { + icon: 'template', + text: 'Insert template...', + onAction + }); + }; + + var Plugin = () => { + global$2.add('template', editor => { + register$2(editor); + register(editor); + register$1(editor); + setup(editor); + }); + }; + + Plugin(); + +})(); diff --git a/vendor/tinymce/tinymce/plugins/template/plugin.min.js b/vendor/tinymce/tinymce/plugins/template/plugin.min.js new file mode 100644 index 00000000..70578026 --- /dev/null +++ b/vendor/tinymce/tinymce/plugins/template/plugin.min.js @@ -0,0 +1,4 @@ +/** + * TinyMCE version 6.0.2 (2022-04-27) + */ +!function(){"use strict";var e=tinymce.util.Tools.resolve("tinymce.PluginManager");const t=e=>t=>(e=>{const t=typeof e;return null===e?"null":"object"===t&&Array.isArray(e)?"array":"object"===t&&(a=n=e,(r=String).prototype.isPrototypeOf(a)||(null===(s=n.constructor)||void 0===s?void 0:s.name)===r.name)?"string":t;var a,n,r,s})(t)===e,a=t("string"),n=t("object"),r=t("array"),s=("function",e=>"function"==typeof e);const l=(!1,()=>false);var o=tinymce.util.Tools.resolve("tinymce.util.Tools");const c=e=>t=>t.options.get(e),i=c("template_cdate_classes"),u=c("template_mdate_classes"),m=c("template_selected_content_classes"),p=c("template_preview_replace_values"),d=c("template_replace_values"),h=c("templates"),g=c("template_cdate_format"),v=c("template_mdate_format"),y=c("content_style"),f=c("content_css_cors"),b=c("body_class"),_=(e,t)=>{if((e=""+e).length{const n="Sun Mon Tue Wed Thu Fri Sat Sun".split(" "),r="Sunday Monday Tuesday Wednesday Thursday Friday Saturday Sunday".split(" "),s="Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec".split(" "),l="January February March April May June July August September October November December".split(" ");return(t=(t=(t=(t=(t=(t=(t=(t=(t=(t=(t=(t=(t=(t=(t=t.replace("%D","%m/%d/%Y")).replace("%r","%I:%M:%S %p")).replace("%Y",""+a.getFullYear())).replace("%y",""+a.getYear())).replace("%m",_(a.getMonth()+1,2))).replace("%d",_(a.getDate(),2))).replace("%H",""+_(a.getHours(),2))).replace("%M",""+_(a.getMinutes(),2))).replace("%S",""+_(a.getSeconds(),2))).replace("%I",""+((a.getHours()+11)%12+1))).replace("%p",a.getHours()<12?"AM":"PM")).replace("%B",""+e.translate(l[a.getMonth()]))).replace("%b",""+e.translate(s[a.getMonth()]))).replace("%A",""+e.translate(r[a.getDay()]))).replace("%a",""+e.translate(n[a.getDay()]))).replace("%%","%")},T=(e,t)=>(o.each(t,((t,a)=>{s(t)&&(t=t(a)),e=e.replace(new RegExp("\\{\\$"+a+"\\}","g"),t)})),e),x=(e,t)=>{const a=e.dom,n=d(e);o.each(a.select("*",t),(e=>{o.each(n,((t,n)=>{a.hasClass(e,n)&&s(t)&&t(e)}))}))},S=(e,t)=>new RegExp("\\b"+t+"\\b","g").test(e.className),w=(e,t,a)=>{const n=e.dom,r=e.selection.getContent();a=T(a,d(e));let s=n.create("div",null,a);const l=n.select(".mceTmpl",s);l&&l.length>0&&(s=n.create("div",null),s.appendChild(l[0].cloneNode(!0))),o.each(n.select("*",s),(t=>{S(t,i(e).replace(/\s+/g,"|"))&&(t.innerHTML=M(e,g(e))),S(t,u(e).replace(/\s+/g,"|"))&&(t.innerHTML=M(e,v(e))),S(t,m(e).replace(/\s+/g,"|"))&&(t.innerHTML=r)})),x(e,s),e.execCommand("mceInsertContent",!1,s.innerHTML),e.addVisual()};class C{constructor(e,t){this.tag=e,this.value=t}static some(e){return new C(!0,e)}static none(){return C.singletonNone}fold(e,t){return this.tag?t(this.value):e()}isSome(){return this.tag}isNone(){return!this.tag}map(e){return this.tag?C.some(e(this.value)):C.none()}bind(e){return this.tag?e(this.value):C.none()}exists(e){return this.tag&&e(this.value)}forall(e){return!this.tag||e(this.value)}filter(e){return!this.tag||e(this.value)?this:C.none()}getOr(e){return this.tag?this.value:e}or(e){return this.tag?this:e}getOrThunk(e){return this.tag?this.value:e()}orThunk(e){return this.tag?this:e()}getOrDie(e){if(this.tag)return this.value;throw new Error(null!=e?e:"Called getOrDie on None")}static from(e){return null==e?C.none():C.some(e)}getOrNull(){return this.tag?this.value:null}getOrUndefined(){return this.value}each(e){this.tag&&e(this.value)}toArray(){return this.tag?[this.value]:[]}toString(){return this.tag?`some(${this.value})`:"none()"}}C.singletonNone=new C(!1);var O=tinymce.util.Tools.resolve("tinymce.Env");const A=Object.hasOwnProperty,D={'"':""","<":"<",">":">","&":"&","'":"'"},I=e=>e.replace(/["'<>&]/g,(e=>{return(t=D,a=e,((e,t)=>A.call(e,t))(t,a)?C.from(t[a]):C.none()).getOr(e);var t,a})),N=(e,t)=>{const a=(e,t)=>((e,t,a)=>{for(let n=0,r=e.length;ne.text===t),l),n=t=>{e.windowManager.alert("Could not load the specified template.",(()=>t.focus("template")))},r=e=>e.value.url.fold((()=>Promise.resolve(e.value.content.getOr(""))),(e=>fetch(e).then((e=>e.ok?e.text():Promise.reject())))),s=(e,t)=>(s,l)=>{if("template"===l.name){const l=s.getData().template;a(e,l).each((e=>{s.block("Loading..."),r(e).then((a=>{t(s,e,a)})).catch((()=>{t(s,e,""),s.setEnabled("save",!1),n(s)}))}))}},c=t=>s=>{const l=s.getData();a(t,l.template).each((t=>{r(t).then((t=>{e.execCommand("mceInsertTemplate",!1,t),s.close()})).catch((()=>{s.setEnabled("save",!1),n(s)}))}))};(()=>{if(!t||0===t.length){const t=e.translate("No templates defined.");return e.notificationManager.open({text:t,type:"info"}),C.none()}return C.from(o.map(t,((e,t)=>{const a=e=>void 0!==e.url;return{selected:0===t,text:e.title,value:{url:a(e)?C.from(e.url):C.none(),content:a(e)?C.none():C.from(e.content),description:e.description}}})))})().each((t=>{const a=(e=>((e,t)=>{const a=e.length,n=new Array(a);for(let t=0;t({title:"Insert Template",size:"large",body:{type:"panel",items:e},initialData:a,buttons:[{type:"cancel",name:"cancel",text:"Cancel"},{type:"submit",name:"save",text:"Save",primary:!0}],onSubmit:c(t),onChange:s(t,i)}),i=(t,n,r)=>{const s=((e,t)=>{var a;if(-1===t.indexOf("")){let n="";const r=null!==(a=y(e))&&void 0!==a?a:"",s=f(e)?' crossorigin="anonymous"':"";o.each(e.contentCSS,(t=>{n+='"})),r&&(n+='");const l=b(e),c=e.dom.encode,i=' 1 question added the toolbar wont show, user has to save & refresh or preview - // if ($question_i < 1) { // ? prevent json error for $question_id with {{}}'s - // $question_id = 0; - // } - // $input = $question->get_question_explanation(); - // $editor_id = "enp-question-explanation__$question_id"; - // $editor_name = 'enp_question[' . $question_i . '][question_explanation]'; - // $settings = array( - // 'textarea_name' => $editor_name, - // 'media_buttons' => false, // ? no media upload option - // 'quicktags' => true, - // 'teeny' => false, - // 'tinymce' => array( - // 'toolbar1' => 'link,unlink', // ? limit what shows on the toolbar - // 'toolbar2' => '', - // 'toolbar3' => '', - // ), - // ); - // wp_editor($input, $editor_id, $settings); + if ($question_i < 1) { // ? prevent json error for $question_id with {{}}'s + $question_id = 0; + } + $input = $question->get_question_explanation(); + $editor_id = "enp-question-explanation__$question_id"; + $editor_name = 'enp_question[' . $question_i . '][question_explanation]'; + $settings = array( + 'textarea_name' => $editor_name, + 'media_buttons' => false, // ? no media upload option + 'quicktags' => true, + 'teeny' => false, + 'tinymce' => array( + 'toolbar1' => 'link,unlink', // ? limit what shows on the toolbar + 'toolbar2' => '', + 'toolbar3' => '', + ), + ); + wp_editor($input, $editor_id, $settings); + ?> - \ No newline at end of file From 05eaa21f0c415a725354652e68ad9ba57bd0827f Mon Sep 17 00:00:00 2001 From: Luke Carl Hartman Date: Tue, 3 May 2022 21:01:28 -0700 Subject: [PATCH 12/32] adding images to each mc option for questions --- database/class-enp_quiz_save_mc_option.php | 105 +- enp_quiz.php | 2 +- includes/class-enp_quiz-activator.php | 2 + includes/class-enp_quiz-mc_option.php | 122 ++ includes/class-enp_quiz-question.php | 1423 +++++++++-------- public/quiz-create/class-enp_quiz-create.php | 1 + .../quiz-create/css/enp_quiz-create.min.css | 2 +- .../css/enp_quiz-create.min.css.map | 2 +- public/quiz-create/css/sass/_ab-create.scss | 7 + public/quiz-create/css/sass/_ab-results.scss | 1 + public/quiz-create/css/sass/_base.scss | 1 + public/quiz-create/css/sass/_dashboard.scss | 10 +- public/quiz-create/css/sass/_forms.scss | 5 +- public/quiz-create/css/sass/_quiz-create.scss | 6 +- .../quiz-create/css/sass/_quiz-preview.scss | 5 +- .../quiz-create/css/sass/_quiz-publish.scss | 11 +- public/quiz-create/css/sass/_structure.scss | 2 +- public/quiz-create/css/sass/_typography.scss | 3 + public/quiz-create/css/sass/_utilities.scss | 2 +- public/quiz-create/css/sass/_variables.scss | 2 +- .../includes/class-enp_quiz-quiz_create.php | 117 +- public/quiz-create/js/dist/quiz-create.min.js | 2 +- public/quiz-create/js/dist/tinymce.min.js | 2 + public/quiz-create/templates/ab-results.php | 156 +- public/quiz-create/templates/ab-test.php | 56 +- .../templates/partials/dashboard-ab-item.php | 22 +- .../quiz-create-mc-option-image-upload.php | 6 +- .../partials/quiz-create-mc-option-image.php | 10 +- .../partials/quiz-create-mc-option.php | 1 + .../partials/quiz-create-question.php | 118 +- public/quiz-create/templates/quiz-create.php | 31 +- public/quiz-create/templates/quiz-preview.php | 4 +- public/quiz-create/templates/quiz-publish.php | 12 +- public/quiz-take/css/enp_quiz-take.min.css | 2 +- .../quiz-take/css/enp_quiz-take.min.css.map | 2 +- public/quiz-take/css/sass/_variables.scss | 7 +- public/quiz-take/svg/symbol-defs.svg | 4 +- .../templates/partials/mc-option-image.php | 6 + vendor/tinymce/tinymce/tinymce.min.js | 4 - 39 files changed, 1333 insertions(+), 943 deletions(-) create mode 100644 public/quiz-create/js/dist/tinymce.min.js create mode 100644 public/quiz-take/templates/partials/mc-option-image.php delete mode 100644 vendor/tinymce/tinymce/tinymce.min.js diff --git a/database/class-enp_quiz_save_mc_option.php b/database/class-enp_quiz_save_mc_option.php index 0695f038..1b6d8329 100644 --- a/database/class-enp_quiz_save_mc_option.php +++ b/database/class-enp_quiz_save_mc_option.php @@ -45,14 +45,20 @@ protected function prepare_submitted_mc_option($mc_option) { // set the defaults/get the submitted values $mc_option_id = $this->set_mc_option_value('mc_option_id', 0); $mc_option_content = $this->set_mc_option_value('mc_option_content', ''); + $mc_option_image_alt = $this->set_mc_option_value('mc_option_image_alt', ''); $mc_option_order = $mc_option['mc_option_order']; // set our mc_option array self::$mc_option = array( 'mc_option_id' => $mc_option_id, 'mc_option_content' => $mc_option_content, + 'mc_option_image_alt' => $mc_option_image_alt, 'mc_option_order' => $mc_option_order, ); + + self::$mc_option = array_merge(self::$mc_option, $mc_option); + // set the image + self::$mc_option['mc_option_image'] = $this->set_mc_option_image(); // add in if it's correct or not. // we need this after setting the mc_option because set_mc_option_correct needs // the mc_option_id @@ -98,6 +104,85 @@ protected function set_mc_option_value($key, $default) { return $param_value; } + + /** + * Sets our mc image, uploads an image, or deletes it + */ + protected function set_mc_option_image() { + // set our default + $mc_option_image = $this->set_question_value('mc_option_image', ''); + // see if the user is trying to delete the image + if(parent::$user_action_action === 'delete' && parent::$user_action_element === 'mc_option_image') { + // see if it matches this question + if(parent::$user_action_details['mc_option_id'] === (int)self::$mc_option['mc_option_id']) { + // they want to delete this image. I wonder what was so bad about it? + $mc_option_image = ''; + parent::$response_obj->add_success('Image deleted for MC Option #'.(self::$mc_option['mc_option_order']+1).'.'); + } + } + + // process images if necessary + // See if there's an image trying to be uploaded for this question + if(!empty($_FILES)) { + // This is the name="" field for that question image in the form + $mc_option_image_file = 'mc_option_image_upload_'.self::$mc_option['mc_option_id']; + // some question has a file submitted, let's see if it's this one + // check for size being set and that the size is greater than 0 + if( isset($_FILES[$mc_option_image_file]["size"]) && $_FILES[$mc_option_image_file]["size"] > 0 ) { + // we have a new image to upload! + // upload it + $new_mc_option_image = $this->upload_mc_option_image($mc_option_image_file); + // see if it worked + if($new_mc_option_image !== false) { + // if it worked, set it as the question_image + $mc_option_image = $new_mc_option_image; + } + } + } + + return $mc_option_image; + } + + /* + * Uploads an image to + * @param $question_image_file (string) name of "name" field in HTML form for that question + * @return (string) filename of image uploaded to save to DB + */ + protected function upload_mc_option_image($mc_option_image_file) { + $new_image_name = false; + $image_upload = wp_upload_bits( $_FILES[$mc_option_image_file]['name'], null, @file_get_contents( $_FILES[$mc_option_image_file]['tmp_name'] ) ); + // check to make sure there are no errors + if($image_upload['error'] === false) { + // success! set the image + // set the URL to the image as our question_image + // create / delete our directory for these images + $this->prepare_quiz_image_dir(); + $path = $this->prepare_mc_option_image_dir(); + + // now upload all the resized images we'll need + $new_image_name = $this->resize_image($image_upload, $path, null); + // we have the full path, but we just need the filename + $new_image_name = str_replace(ENP_QUIZ_IMAGE_DIR . parent::$quiz['quiz_id'].'/'.self::$mc_option['mc_option_id'].'/', '', $new_image_name); + // resize all the other images + $this->resize_image($image_upload, $path, 1000); + $this->resize_image($image_upload, $path, 740); + $this->resize_image($image_upload, $path, 580); + $this->resize_image($image_upload, $path, 320); + $this->resize_image($image_upload, $path, 200); + + // delete the image we initially uploaded from the wp-content dir + $this->delete_file($image_upload['file']); + + // add a success message + parent::$response_obj->add_success('Image uploaded for Question #'.(self::$mc_option['mc_option_order']+1).'.'); + } else { + // add an error message + parent::$response_obj->add_error('Image upload failed for Question #'.(self::$mc_option['mc_option_order']+1).'.'); + } + + return $new_image_name; + } + /** * we need to check if an option is trying to be set as correct or not, * and unset any other options that were set as correct (until we allow @@ -193,16 +278,20 @@ protected function insert_mc_option() { // connect to PDO $pdo = new enp_quiz_Db(); // Get our Parameters ready - $params = array(':question_id' => parent::$question['question_id'], - ':mc_option_content'=> self::$mc_option['mc_option_content'], - ':mc_option_correct'=> self::$mc_option['mc_option_correct'], - ':mc_option_order' => self::$mc_option['mc_option_order'], - ':mc_option_responses' => 0 + $params = array(':question_id' => parent::$question['question_id'], + ':mc_option_content' => self::$mc_option['mc_option_content'], + ':mc_option_image' => self::$mc_option['mc_option_image'], + ':mc_option_image_alt' => self::$mc_option['mc_option_image_alt'], + ':mc_option_correct' => self::$mc_option['mc_option_correct'], + ':mc_option_order' => self::$mc_option['mc_option_order'], + ':mc_option_responses' => 0 ); // write our SQL statement $sql = "INSERT INTO ".$pdo->question_mc_option_table." ( question_id, mc_option_content, + mc_option_image, + mc_option_image_alt, mc_option_correct, mc_option_order, mc_option_responses @@ -210,6 +299,8 @@ protected function insert_mc_option() { VALUES( :question_id, :mc_option_content, + :mc_option_image, + :mc_option_image_alt, :mc_option_correct, :mc_option_order, :mc_option_responses @@ -250,6 +341,8 @@ protected function update_mc_option() { // Get our Parameters ready $params = array(':mc_option_id' => self::$mc_option['mc_option_id'], ':mc_option_content'=> self::$mc_option['mc_option_content'], + ':mc_option_image' => self::$mc_option['mc_option_image'], + ':mc_option_image_alt' => self::$mc_option['mc_option_image_alt'], ':mc_option_correct'=> self::$mc_option['mc_option_correct'], ':mc_option_order' => self::$mc_option['mc_option_order'], ':mc_option_is_deleted' => self::$mc_option['mc_option_is_deleted'], @@ -257,6 +350,8 @@ protected function update_mc_option() { // write our SQL statement $sql = "UPDATE ".$pdo->question_mc_option_table." SET mc_option_content = :mc_option_content, + mc_option_image = :mc_option_image, + mc_option_image_alt = :mc_option_image_alt, mc_option_correct = :mc_option_correct, mc_option_order = :mc_option_order, mc_option_is_deleted = :mc_option_is_deleted diff --git a/enp_quiz.php b/enp_quiz.php index 23e7626f..09a3fa9d 100755 --- a/enp_quiz.php +++ b/enp_quiz.php @@ -16,7 +16,7 @@ * Plugin Name: Engaging Quiz Creator * Plugin URI: http://engagingnewsproject.org/quiz-tool * Description: Create quizzes for embedding on websites - * Version: 0.0.1 + * Version: 0.0.2 * Author: Engaging News Project * Author URI: http://engagingnewsproject.org * License: GPL-3.0+ diff --git a/includes/class-enp_quiz-activator.php b/includes/class-enp_quiz-activator.php index 9ca56f0f..adb00e32 100755 --- a/includes/class-enp_quiz-activator.php +++ b/includes/class-enp_quiz-activator.php @@ -220,6 +220,8 @@ public function create_tables() mc_option_id BIGINT(20) NOT NULL AUTO_INCREMENT, question_id BIGINT(20) NOT NULL, mc_option_content VARCHAR(255) NOT NULL, + mc_option_image TEXT NOT NULL, + mc_option_image_alt VARCHAR(3060) NOT NULL, mc_option_correct BOOLEAN NOT NULL, mc_option_order BIGINT(3) NOT NULL, mc_option_responses BIGINT(20) NOT NULL, diff --git a/includes/class-enp_quiz-mc_option.php b/includes/class-enp_quiz-mc_option.php index c1b58eb0..1b01563b 100644 --- a/includes/class-enp_quiz-mc_option.php +++ b/includes/class-enp_quiz-mc_option.php @@ -7,6 +7,10 @@ class Enp_quiz_MC_option { public $mc_option_id, $mc_option_content, + $mc_option_image, + $mc_option_image_src, + $mc_option_image_srcset, + $mc_option_image_alt, $mc_option_correct, $mc_option_order, $mc_option_responses, @@ -62,6 +66,10 @@ public function select_mc_option_by_id($mc_option_id) { protected function set_mc_option_object_values() { $this->mc_option_id = $this->set_mc_option_id(); $this->mc_option_content = $this->set_mc_option_content(); + $this->mc_option_image = $this->set_mc_option_image(); + $this->mc_option_image_src = $this->set_mc_option_image_src(); + $this->mc_option_image_srcset = $this->set_mc_option_image_srcset(); + $this->mc_option_image_alt = $this->set_mc_option_image_alt(); $this->mc_option_correct = $this->set_mc_option_correct(); $this->mc_option_order = $this->set_mc_option_order(); $this->mc_option_responses = $this->set_mc_option_responses(); @@ -88,6 +96,68 @@ protected function set_mc_option_content() { return $mc_option_content; } + + /** + * Set the question_image path for our Quiz Object + * @param $question = question row from question database table + * @return mc_option_image path from the database + */ + protected function set_mc_option_image() { + $mc_option_image = self::$mc_option['mc_option_image']; + + return $mc_option_image; + } + + /** + * Set the question_image for our Quiz Object + * We want to set the url, but the question_image just sets the filename + * we need to build it based on our ENP_QUIZ_IMAGE_URL, quiz_id and question_id + * @param $question = question object + * @return mc_option_image from the object + */ + public function set_mc_option_image_src() { + $mc_option_image_src = ''; + $mc_option_image = $this->mc_option_image; + if(!empty($mc_option_image)) { + $mc_option_image_src = ENP_QUIZ_IMAGE_URL.$this->quiz_id.'/'.$this->mc_option_id.'/'.$mc_option_image; + } + return $mc_option_image_src; + } + + /** + * Set the question_image for our Quiz Object + * @param $question = question object + * @return question_image from the object + */ + public function set_mc_option_image_srcset() { + if(empty($this->mc_option_image)) { + return ''; + } + // -original is our stored filename so we can explode by that + // and generate our new filenames + $filename = explode('-original', $this->mc_option_image); + $name = $filename[0]; + $ext = $filename[1]; + $sizes = array(1000,740,580,320,200); + $srcset = ''; + foreach($sizes as $size) { + $srcset .= ENP_QUIZ_IMAGE_URL.$this->quiz_id.'/'.$this->mc_option_id.'/'.$name.$size.'w'.$ext.' '.($size+10).'w,'; + } + // remove the trailing comma + $srcset = rtrim($srcset, ","); + return $srcset; + } + + /** + * Set the question_image_alt for our Quiz Object + * @param $question = question row from question database table + * @return mc_option_image_alt field from the database + */ + protected function set_mc_option_image_alt() { + $mc_option_image_alt = stripslashes(self::$mc_option['mc_option_image_alt']); + return $mc_option_image_alt; + } + /** * Set the mc_option_correct for our Quiz Object * @param $mc_option = mc_option row from mc_option database table @@ -148,6 +218,58 @@ public function get_mc_option_content() { return $mc_option_content; } + /** + * Get the mc_option_image for our Quiz Object + * @param $question = question object + * @return mc_option_image from the object + */ + public function get_mc_option_image() { + $mc_option_image = $this->mc_option_image; + return $mc_option_image; + } + + /** + * Get the mc_option_image_src for our Quiz Object + * @param $question = question object + * @return mc_option_image_src from the object + */ + public function get_mc_option_image_src() { + $mc_option_image_src = $this->mc_option_image_src; + return $mc_option_image_src; + } + + /** + * Get the mc_option_image_srcset for our Quiz Object + * @param $question = question object + * @return mc_option_image_srcset from the object + */ + public function get_mc_option_image_srcset() { + $mc_option_image_srcset = $this->mc_option_image_srcset; + return $mc_option_image_srcset; + } + + public function get_mc_option_image_thumbnail() { + if(empty($this->mc_option_image)) { + return ''; + } + $filename = explode('-original', $this->mc_option_image); + $name = $filename[0]; + $ext = $filename[1]; + $thumbnail = $name.'-w200'.$ext; + return $thumbnail; + } + + /** + * Get the mc_option_image_alt for our Quiz Object + * @param $question = question object + * @return mc_option_image_alt from the object + */ + public function get_mc_option_image_alt() { + $mc_option_image_alt = $this->mc_option_image_alt; + return $mc_option_image_alt; + } + + /** * Get the mc_option_correct for our Quiz Object * @param $mc_option = mc_option object diff --git a/includes/class-enp_quiz-question.php b/includes/class-enp_quiz-question.php index d576a790..fdd16842 100644 --- a/includes/class-enp_quiz-question.php +++ b/includes/class-enp_quiz-question.php @@ -5,707 +5,726 @@ * @return question object */ class Enp_quiz_Question { - public $quiz_id, - $question_id, - $question_title, - $question_image, - $question_image_src, - $question_image_srcset, - $question_image_alt, - $question_type, - $question_explanation, - $question_order, - $question_views, - $question_responses, - $question_responses_correct, - $question_responses_incorrect, - $question_responses_correct_percentage, - $question_responses_incorrect_percentage, - $question_score_average, - $question_time_spent, - $question_time_spent_average, - $mc_options = array(), - $slider = ''; - - protected static $question, - $options; - /** - * Build the question object - * @param $options = array() for passing various options on how to set the question objet - * 'mc_options_order'=> 'user_order'||'random' if you want the mc_options order to be randomized or not; - */ - public function __construct($question_id, $options = array()) { - $default_options = array( - 'mc_options_order' => 'user_order', - ); - // merge default options with passed options - self::$options = array_merge($default_options, $options); - // returns false if no question found - $this->get_question_by_id($question_id); - } - - /** - * Build question object by id - * - * @param $question_id = question_id that you want to select - * @return question object, false if not found - **/ - public function get_question_by_id($question_id) { - self::$question = $this->select_question_by_id($question_id); - if(self::$question !== false) { - self::$question = $this->set_question_object_values(); - } - return self::$question; - } - - /** - * For using PDO to select one question row - * - * @param $question_id = question_id that you want to select - * @return row from database table if found, false if not found - **/ - public function select_question_by_id($question_id) { - $pdo = new enp_quiz_Db(); - // Do a select query to see if we get a returned row - $params = array( - ":question_id" => $question_id - ); - $sql = "SELECT * from ".$pdo->question_table." WHERE - question_id = :question_id - AND question_is_deleted = 0"; - $stmt = $pdo->query($sql, $params); - $question_row = $stmt->fetch(); - // return the found question row - return $question_row; - } - - /** - * Hook up all the values for the object - * @param $question = row from the question_table - */ - protected function set_question_object_values() { - $this->question_id = $this->set_question_id(); - $this->quiz_id = $this->set_quiz_id(); - $this->question_title = $this->set_question_title(); - $this->question_image = $this->set_question_image(); - $this->question_image_src = $this->set_question_image_src(); - $this->question_image_srcset = $this->set_question_image_srcset(); - $this->question_image_alt = $this->set_question_image_alt(); - $this->question_type = $this->set_question_type(); - $this->question_explanation = $this->set_question_explanation(); - $this->question_order = $this->set_question_order(); - // response/view data - $this->question_views = $this->set_question_views(); - $this->question_responses = $this->set_question_responses(); - $this->question_responses_correct = $this->set_question_responses_correct(); - $this->question_responses_incorrect = $this->set_question_responses_incorrect(); - $this->question_responses_correct_percentage = $this->set_question_responses_correct_percentage(); - $this->question_responses_incorrect_percentage = $this->set_question_responses_incorrect_percentage(); - $this->question_score_average = $this->set_question_score_average(); - $this->question_time_spent = $this->set_question_time_spent(); - $this->question_time_spent_average = $this->set_question_time_spent_average(); - - $this->question_is_deleted = $this->set_question_is_deleted(); - // we need to know both mc option ids and slider ids - // when creating a quiz. We could limit this by adding a "published" - // check on the question or quiz - $this->mc_options = $this->set_mc_options(); - $this->slider = $this->set_slider(); - } - - /** - * Set the question_id for our Question Object - * @param $question = question row from question database table - * @return question_id field from the database - */ - protected function set_question_id() { - $question_id = self::$question['question_id']; - return $question_id; - } - - /** - * Set the quiz_id for our Question Object - * @param $question = question row from question database table - * @return quiz_id field from the database - */ - protected function set_quiz_id() { - $quiz_id = self::$question['quiz_id']; - return $quiz_id; - } - - /** - * Set the question_title for our Quiz Object - * @param $question = question row from question database table - * @return question_title field from the database - */ - protected function set_question_title() { - $question_title = stripslashes(self::$question['question_title']); - return $question_title; - } - - /** - * Set the question_image path for our Quiz Object - * @param $question = question row from question database table - * @return question_image path from the database - */ - protected function set_question_image() { - $question_image = self::$question['question_image']; - - return $question_image; - } - - /** - * Set the question_image for our Quiz Object - * We want to set the url, but the question_image just sets the filename - * we need to build it based on our ENP_QUIZ_IMAGE_URL, quiz_id and question_id - * @param $question = question object - * @return question_image from the object - */ - public function set_question_image_src() { - $question_image_src = ''; - $question_image = $this->question_image; - if(!empty($question_image)) { - $question_image_src = ENP_QUIZ_IMAGE_URL.$this->quiz_id.'/'.$this->question_id.'/'.$question_image; - } - return $question_image_src; - } - - /** - * Set the question_image for our Quiz Object - * @param $question = question object - * @return question_image from the object - */ - public function set_question_image_srcset() { - if(empty($this->question_image)) { - return ''; - } - // -original is our stored filename so we can explode by that - // and generate our new filenames - $filename = explode('-original', $this->question_image); - $name = $filename[0]; - $ext = $filename[1]; - $sizes = array(1000,740,580,320,200); - $srcset = ''; - foreach($sizes as $size) { - $srcset .= ENP_QUIZ_IMAGE_URL.$this->quiz_id.'/'.$this->question_id.'/'.$name.$size.'w'.$ext.' '.($size+10).'w,'; - } - // remove the trailing comma - $srcset = rtrim($srcset, ","); - return $srcset; - } - - /** - * Set the question_image_alt for our Quiz Object - * @param $question = question row from question database table - * @return question_image_alt field from the database - */ - protected function set_question_image_alt() { - $question_image_alt = stripslashes(self::$question['question_image_alt']); - return $question_image_alt; - } - - /** - * Set the question_type for our Quiz Object - * @param $question = question row from question database table - * @return question_type field from the database - */ - protected function set_question_type() { - $question_type = stripslashes(self::$question['question_type']); - return $question_type; - } - - /** - * Set the question_explanation for our Quiz Object - * @param $question = question row from question database table - * @return question_explanation field from the database - */ - protected function set_question_explanation() { - $question_explanation = stripslashes(self::$question['question_explanation']); - return $question_explanation; - } - - /** - * Set the question_order for our Quiz Object - * @param $question = question row from question database table - * @return question_order field from the database - */ - protected function set_question_order() { - $question_order = self::$question['question_order']; - return $question_order; - } - - /** - * Set the question_is_deleted for our Quiz Object - * @param $question = question row from question database table - * @return question_is_deleted field from the database - */ - protected function set_question_is_deleted() { - $question_is_deleted = self::$question['question_is_deleted']; - return $question_is_deleted; - } - - /** - * Set the mc_options for our Questions Object - * @param $quiz_id - * @return mc_options array of ids array(3,4,5) from the database - */ - protected function set_mc_options() { - $question_id = self::$question['question_id']; - - $pdo = new enp_quiz_Db(); - // Do a select query to see if we get a returned row - $params = array( - ":question_id" => $question_id - ); - $sql = "SELECT mc_option_id from ".$pdo->question_mc_option_table." WHERE - question_id = :question_id - AND mc_option_is_deleted = 0 - ORDER BY mc_option_order ASC"; - $stmt = $pdo->query($sql, $params); - $mc_option_rows = $stmt->fetchAll(PDO::FETCH_ASSOC); - - $mc_options = array(); - - foreach($mc_option_rows as $row => $mc_option) { - - $mc_options[] = (int) $mc_option['mc_option_id']; - } - - // see if we should randomize the order of the options - if(self::$options['mc_options_order'] === 'random') { - // we could use RAND() in the query, but people warn against using RAND() for performance issues. - shuffle($mc_options); - } - - return $mc_options; - } - - /** - * Set the slider for our Question Object - * @param $quiz_id - * @return slider id from the database - */ - protected function set_slider() { - $question_id = self::$question['question_id']; - - $pdo = new enp_quiz_Db(); - // Do a select query to see if we get a returned row - $params = array( - ":question_id" => $question_id - ); - $sql = "SELECT slider_id from ".$pdo->question_slider_table." WHERE - question_id = :question_id - AND slider_is_deleted = 0"; - $stmt = $pdo->query($sql, $params); - $slider_id = $stmt->fetch(); - return $slider_id['slider_id']; - } - - /** - * Set the question_views for our Quiz Object - * @param $question = question row from question database table - * @return question_views field from the database - */ - protected function set_question_views() { - $question_views = self::$question['question_views']; - return $question_views; - } - - /** - * Set the question_responses for our Quiz Object - * @param $question = question row from question database table - * @return question_responses field from the database - */ - protected function set_question_responses() { - $question_responses = self::$question['question_responses']; - return $question_responses; - } - - /** - * Set the question_responses_correct for our Quiz Object - * @param $question = question row from question database table - * @return question_responses_correct field from the database - */ - protected function set_question_responses_correct() { - $question_responses_correct = self::$question['question_responses_correct']; - return $question_responses_correct; - } - - /** - * Set the question_responses_incorrect for our Quiz Object - * @param $question = question row from question database table - * @return question_responses_incorrect field from the database - */ - protected function set_question_responses_incorrect() { - $question_responses_incorrect = self::$question['question_responses_incorrect']; - return $question_responses_incorrect; - } - - /** - * Set the question_responses_correct_percentage for our Quiz Object - * @param $question = question row from question database table - * @return question_responses_correct_percentage field from the database - */ - protected function set_question_responses_correct_percentage() { - $question_responses_correct_percentage = self::$question['question_responses_correct_percentage']; - return $question_responses_correct_percentage; - } - - /** - * Set the question_responses_incorrect_percentage for our Quiz Object - * @param $question = question row from question database table - * @return question_responses_incorrect_percentage field from the database - */ - protected function set_question_responses_incorrect_percentage() { - $question_responses_incorrect_percentage = self::$question['question_responses_incorrect_percentage']; - return $question_responses_incorrect_percentage; - } - - /** - * Set the question_score_average for our Quiz Object - * @param $question = question row from question database table - * @return question_score_average field from the database - */ - protected function set_question_score_average() { - $question_score_average = self::$question['question_score_average']; - return $question_score_average; - } - - /** - * Set the question_time_spent for our Quiz Object - * @param $question = question row from question database table - * @return question_time_spent field from the database - */ - protected function set_question_time_spent() { - $question_time_spent = self::$question['question_time_spent']; - return $question_time_spent; - } - - /** - * Set the question_time_spent_average for our Quiz Object - * @param $question = question row from question database table - * @return question_time_spent_average field from the database - */ - protected function set_question_time_spent_average() { - $question_time_spent_average = self::$question['question_time_spent_average']; - return $question_time_spent_average; - } - - /** - * Get the question_id for our Quiz Object - * @param $question = question object - * @return question_id from the object - */ - public function get_question_id() { - $question_id = $this->question_id; - return $question_id; - } - - /** - * Get the quiz_id for our Quiz Object - * @param $question = question object - * @return quiz_id from the object - */ - public function get_quiz_id() { - $quiz_id = $this->quiz_id; - return $quiz_id; - } - - /** - * Get the question_title for our Quiz Object - * @param $question = question object - * @return question_title from the object - */ - public function get_question_title() { - $question_title = $this->question_title; - return $question_title; - } - - /** - * Get the question_image for our Quiz Object - * @param $question = question object - * @return question_image from the object - */ - public function get_question_image() { - $question_image = $this->question_image; - return $question_image; - } - - /** - * Get the question_image_src for our Quiz Object - * @param $question = question object - * @return question_image_src from the object - */ - public function get_question_image_src() { - $question_image_src = $this->question_image_src; - return $question_image_src; - } - - /** - * Get the question_image_srcset for our Quiz Object - * @param $question = question object - * @return question_image_srcset from the object - */ - public function get_question_image_srcset() { - $question_image_srcset = $this->question_image_srcset; - return $question_image_srcset; - } - - public function get_question_image_thumbnail() { - if(empty($this->question_image)) { - return ''; - } - $filename = explode('-original', $this->question_image); - $name = $filename[0]; - $ext = $filename[1]; - $thumbnail = $name.'-w200'.$ext; - return $thumbnail; - } - /** - * Get the question_image_alt for our Quiz Object - * @param $question = question object - * @return question_image_alt from the object - */ - public function get_question_image_alt() { - $question_image_alt = $this->question_image_alt; - return $question_image_alt; - } - - /** - * Get the question_type for our Quiz Object - * @param $question = question object - * @return question_type from the object - */ - public function get_question_type() { - $question_type = $this->question_type; - return $question_type; - } - - /** - * Get the question_explanation for our Quiz Object - * @param $question = question object - * @return question_explanation from the object - */ - public function get_question_explanation() { - $question_explanation = $this->question_explanation; - // ? TODO: perfect the target attribute add. kindof buggy. - - $question_explanation = htmlentities($question_explanation); - // = preg_replace('/(<]*)>/i', '$1 target="_blank">', $question_explanation); - return $question_explanation; - } - - /** - * Get the question_order for our Quiz Object - * @param $question = question object - * @return question_order from the object - */ - public function get_question_order() { - $question_order = $this->question_order; - return $question_order; - } - - /** - * Get the question_is_deleted for our Quiz Object - * @param $question = question object - * @return question_is_deleted from the object - */ - public function get_question_is_deleted() { - $question_is_deleted = $this->question_is_deleted; - return $question_is_deleted; - } - - /** - * Get the mc_options for our Question Object - * @param $question = question object - * @return array of mc_option_id's as integers - */ - public function get_mc_options() { - $mc_options = $this->mc_options; - return $mc_options; - } - - /** - * Get the slider_id for our Question Object - * @param $question = question object - * @return slider_id - */ - public function get_slider() { - $slider = $this->slider; - return $slider; - } - - /** - * Get the question_views for our Question Object - * @param $question = question object - * @return int question_views - */ - public function get_question_views() { - $question_views = $this->question_views; - return $question_views; - } - - /** - * Get the question_responses for our Question Object - * @param $question = question object - * @return int question_responses - */ - public function get_question_responses() { - $question_responses = $this->question_responses; - return $question_responses; - } - - /** - * Get the question_responses_correct for our Question Object - * @param $question = question object - * @return int question_responses_correct - */ - public function get_question_responses_correct() { - $question_responses_correct = $this->question_responses_correct; - return $question_responses_correct; - } - - /** - * Get the question_incorrect for our Question Object - * @param $question = question object - * @return int question_responses_incorrect - */ - public function get_question_incorrect() { - $question_incorrect = $this->question_incorrect; - return $question_incorrect; - } - - /** - * Get the question_responses_correct_percentage for our Question Object - * and format it as a percentage (43%); - * @param $question = question object - * @return string '44%'; - */ - public function get_question_responses_correct_percentage() { - $question_responses_correct_percentage = round($this->question_responses_correct_percentage * 100 ); - return $question_responses_correct_percentage; - } - - /** - * Get the question_responses_incorrect_percentage for our Question Object - * and format it as a percentage (43%); - * @param $question = question object - * @return string '44%'; - */ - public function get_question_responses_incorrect_percentage() { - $question_responses_incorrect_percentage = round($this->question_responses_incorrect_percentage * 100 ); - return $question_responses_incorrect_percentage; - } - - /** - * Get the question_score_average for our Question Object - * @param $question = question object - * @return array of mc_option_id's as integers - */ - public function get_question_score_average() { - $question_score_average = $this->question_score_average; - return $question_score_average; - } - - /** - * Get the question_time_spent for our Question Object - * @param $question = question object - * @return array of mc_option_id's as integers - */ - public function get_question_time_spent() { - $question_time_spent = $this->question_time_spent; - return $question_time_spent; - } - - /** - * Get the question_views for our Question Object - * @param $question = question object - * @return array of mc_option_id's as integers - */ - public function get_question_time_spent_average() { - $question_time_spent_average = $this->question_time_spent_average; - return $question_time_spent_average; - } - - /** - * Get the built question with all MC Option / Slider data for taking quizzes - * - * @param $question = question object - * @return array with full question data for taking quizzes or converting to JSON - */ - public function get_take_question_array() { - // cast object to array - $question_array = (array) $this; - // remove what we don't need - unset($question_array['quiz_id']); - unset($question_array['mc_options']); - // get question type - $question_type = $this->get_question_type(); - // get question images info - $question_array['question_image_src'] = $this->get_question_image_src(); - $question_array['question_image_srcset'] = $this->get_question_image_srcset(); - // if mc, get mc options - if($question_type === 'mc') { - // get the mc options - $mc_option_ids = $this->get_mc_options(); - // create a mc_options_array - $question_array['mc_option'] = array(); - // create the MC Options - foreach($mc_option_ids as $mc_option_id) { - // build mc option object - $mc_option = new Enp_quiz_MC_option($mc_option_id); - // cast object to array in question_array - $mc_option_array = $mc_option->get_take_mc_option_array(); - $question_array['mc_option'][] = $mc_option_array; - } - } elseif($question_type === 'slider') { - $slider_id = $this->get_slider(); - $slider = new Enp_quiz_Slider($slider_id); - $question_array['slider'] = (array) $slider; - } - return $question_array; - } - - public function get_take_question_json() { - $question = $this->get_take_question_array(); - return json_encode($question); - } - - /** - * Get the value we should be saving on a question - * get posted if present, if not, get object. This is so we give them their - * current entry if we didn't *actually* save yet - * (like if there was an error on save they won't lose all their work). - * @param $string = what you want to get ('question_title', 'question_explanation', whatever) - * @param $quetion_id = which question you're trying to get a value from - * @return $value - */ - /* I don't think we need this anymore. Questions always have an ID now - public function get_value($key, $question_id) { - $value = ''; - if(isset($_POST['enp_question'])) { - $posted_value = $_POST['enp_question']; - // find our question_id - foreach($posted_value as $question) { - // see if we matched our question_id - if($question['question_id'] === $question_id) { - $value = stripslashes($question[$key]); - } - } - - - } - // if the value didn't get set, try with our object - if($value === '') { - $get_obj_value = 'get_'.$key; - $obj_value = $this->$get_obj_value(); - if($obj_value !== null) { - $value = $obj_value; - } - } - // send them back whatever the value should be - return $value; - } - */ + public $quiz_id, + $question_id, + $question_title, + $question_image, + $question_image_src, + $question_image_srcset, + $question_image_alt, + $question_type, + $question_explanation, + $question_order, + $question_views, + $question_responses, + $question_responses_correct, + $question_responses_incorrect, + $question_responses_correct_percentage, + $question_responses_incorrect_percentage, + $question_score_average, + $question_time_spent, + $question_time_spent_average, + $mc_options = array(), + $slider = ''; + + protected static $question, + $options, + $mc_option; + /** + * Build the question object + * @param $options = array() for passing various options on how to set the question objet + * 'mc_options_order'=> 'user_order'||'random' if you want the mc_options order to be randomized or not; + */ + public function __construct($question_id, $options = array()) { + $default_options = array( + 'mc_options_order' => 'user_order', + ); + // merge default options with passed options + self::$options = array_merge($default_options, $options); + // returns false if no question found + $this->get_question_by_id($question_id); + } + + /** + * Build question object by id + * + * @param $question_id = question_id that you want to select + * @return question object, false if not found + **/ + public function get_question_by_id($question_id) { + self::$question = $this->select_question_by_id($question_id); + if(self::$question !== false) { + self::$question = $this->set_question_object_values(); + } + return self::$question; + } + + /** + * For using PDO to select one question row + * + * @param $question_id = question_id that you want to select + * @return row from database table if found, false if not found + **/ + public function select_question_by_id($question_id) { + $pdo = new enp_quiz_Db(); + // Do a select query to see if we get a returned row + $params = array( + ":question_id" => $question_id + ); + $sql = "SELECT * from ".$pdo->question_table." WHERE + question_id = :question_id + AND question_is_deleted = 0"; + $stmt = $pdo->query($sql, $params); + $question_row = $stmt->fetch(); + // return the found question row + return $question_row; + } + +// // // // // // // // +// SET SET SET SET +// // // // // // // // + + /** + * Hook up all the values for the object + * @param $question = row from the question_table + */ + protected function set_question_object_values() { + $this->question_id = $this->set_question_id(); + $this->quiz_id = $this->set_quiz_id(); + $this->question_title = $this->set_question_title(); + $this->question_image = $this->set_question_image(); + $this->question_image_src = $this->set_question_image_src(); + $this->question_image_srcset = $this->set_question_image_srcset(); + $this->question_image_alt = $this->set_question_image_alt(); + $this->question_type = $this->set_question_type(); + $this->question_explanation = $this->set_question_explanation(); + $this->question_order = $this->set_question_order(); + // response/view data + $this->question_views = $this->set_question_views(); + $this->question_responses = $this->set_question_responses(); + $this->question_responses_correct = $this->set_question_responses_correct(); + $this->question_responses_incorrect = $this->set_question_responses_incorrect(); + $this->question_responses_correct_percentage = $this->set_question_responses_correct_percentage(); + $this->question_responses_incorrect_percentage = $this->set_question_responses_incorrect_percentage(); + $this->question_score_average = $this->set_question_score_average(); + $this->question_time_spent = $this->set_question_time_spent(); + $this->question_time_spent_average = $this->set_question_time_spent_average(); + + $this->question_is_deleted = $this->set_question_is_deleted(); + // we need to know both mc option ids and slider ids + // when creating a quiz. We could limit this by adding a "published" + // check on the question or quiz + $this->mc_options = $this->set_mc_options(); + $this->slider = $this->set_slider(); + } + + /** + * Set the question_id for our Question Object + * @param $question = question row from question database table + * @return question_id field from the database + */ + protected function set_question_id() { + $question_id = self::$question['question_id']; + return $question_id; + } + + /** + * Set the quiz_id for our Question Object + * @param $question = question row from question database table + * @return quiz_id field from the database + */ + protected function set_quiz_id() { + $quiz_id = self::$question['quiz_id']; + return $quiz_id; + } + + /** + * Set the question_title for our Quiz Object + * @param $question = question row from question database table + * @return question_title field from the database + */ + protected function set_question_title() { + $question_title = stripslashes(self::$question['question_title']); + return $question_title; + } + + /** + * Set the question_image path for our Quiz Object + * @param $question = question row from question database table + * @return question_image path from the database + */ + protected function set_question_image() { + $question_image = self::$question['question_image']; + + return $question_image; + } + + /** + * Set the question_image for our Quiz Object + * We want to set the url, but the question_image just sets the filename + * we need to build it based on our ENP_QUIZ_IMAGE_URL, quiz_id and question_id + * @param $question = question object + * @return question_image from the object + */ + public function set_question_image_src() { + $question_image_src = ''; + $question_image = $this->question_image; + if(!empty($question_image)) { + $question_image_src = ENP_QUIZ_IMAGE_URL.$this->quiz_id.'/'.$this->question_id.'/'.$question_image; + } + return $question_image_src; + } + + /** + * Set the question_image for our Quiz Object + * @param $question = question object + * @return question_image from the object + */ + public function set_question_image_srcset() { + if(empty($this->question_image)) { + return ''; + } + // -original is our stored filename so we can explode by that + // and generate our new filenames + $filename = explode('-original', $this->question_image); + $name = $filename[0]; + $ext = $filename[1]; + $sizes = array(1000,740,580,320,200); + $srcset = ''; + foreach($sizes as $size) { + $srcset .= ENP_QUIZ_IMAGE_URL.$this->quiz_id.'/'.$this->question_id.'/'.$name.$size.'w'.$ext.' '.($size+10).'w,'; + } + // remove the trailing comma + $srcset = rtrim($srcset, ","); + return $srcset; + } + + /** + * Set the question_image_alt for our Quiz Object + * @param $question = question row from question database table + * @return question_image_alt field from the database + */ + protected function set_question_image_alt() { + $question_image_alt = stripslashes(self::$question['question_image_alt']); + return $question_image_alt; + } + + /** + * Set the question_type for our Quiz Object + * @param $question = question row from question database table + * @return question_type field from the database + */ + protected function set_question_type() { + $question_type = stripslashes(self::$question['question_type']); + return $question_type; + } + + /** + * Set the question_explanation for our Quiz Object + * @param $question = question row from question database table + * @return question_explanation field from the database + */ + protected function set_question_explanation() { + // $question_explanation = stripslashes(self::$question['question_explanation']); + $question_explanation = self::$question['question_explanation']; + + return $question_explanation; + } + + /** + * Set the question_order for our Quiz Object + * @param $question = question row from question database table + * @return question_order field from the database + */ + protected function set_question_order() { + $question_order = self::$question['question_order']; + return $question_order; + } + + /** + * Set the question_is_deleted for our Quiz Object + * @param $question = question row from question database table + * @return question_is_deleted field from the database + */ + protected function set_question_is_deleted() { + $question_is_deleted = self::$question['question_is_deleted']; + return $question_is_deleted; + } + + + /** + * Set the mc_options for our Questions Object + * @param $quiz_id + * @return mc_options array of ids array(3,4,5) from the database + */ + protected function set_mc_options() { + $question_id = self::$question['question_id']; + + $pdo = new enp_quiz_Db(); + // Do a select query to see if we get a returned row + $params = array( + ":question_id" => $question_id + ); + $sql = "SELECT mc_option_id from ".$pdo->question_mc_option_table." WHERE + question_id = :question_id + AND mc_option_is_deleted = 0 + ORDER BY mc_option_order ASC"; + $stmt = $pdo->query($sql, $params); + $mc_option_rows = $stmt->fetchAll(PDO::FETCH_ASSOC); + + $mc_options = array(); + + foreach($mc_option_rows as $row => $mc_option) { + + $mc_options[] = (int) $mc_option['mc_option_id']; + } + + // see if we should randomize the order of the options + if(self::$options['mc_options_order'] === 'random') { + // we could use RAND() in the query, but people warn against using RAND() for performance issues. + shuffle($mc_options); + } + + return $mc_options; + } + + /** + * Set the slider for our Question Object + * @param $quiz_id + * @return slider id from the database + */ + protected function set_slider() { + $question_id = self::$question['question_id']; + + $pdo = new enp_quiz_Db(); + // Do a select query to see if we get a returned row + $params = array( + ":question_id" => $question_id + ); + $sql = "SELECT slider_id from ".$pdo->question_slider_table." WHERE + question_id = :question_id + AND slider_is_deleted = 0"; + $stmt = $pdo->query($sql, $params); + $slider_id = $stmt->fetch(); + return $slider_id['slider_id']; + } + + /** + * Set the question_views for our Quiz Object + * @param $question = question row from question database table + * @return question_views field from the database + */ + protected function set_question_views() { + $question_views = self::$question['question_views']; + return $question_views; + } + + /** + * Set the question_responses for our Quiz Object + * @param $question = question row from question database table + * @return question_responses field from the database + */ + protected function set_question_responses() { + $question_responses = self::$question['question_responses']; + return $question_responses; + } + + /** + * Set the question_responses_correct for our Quiz Object + * @param $question = question row from question database table + * @return question_responses_correct field from the database + */ + protected function set_question_responses_correct() { + $question_responses_correct = self::$question['question_responses_correct']; + return $question_responses_correct; + } + + /** + * Set the question_responses_incorrect for our Quiz Object + * @param $question = question row from question database table + * @return question_responses_incorrect field from the database + */ + protected function set_question_responses_incorrect() { + $question_responses_incorrect = self::$question['question_responses_incorrect']; + return $question_responses_incorrect; + } + + /** + * Set the question_responses_correct_percentage for our Quiz Object + * @param $question = question row from question database table + * @return question_responses_correct_percentage field from the database + */ + protected function set_question_responses_correct_percentage() { + $question_responses_correct_percentage = self::$question['question_responses_correct_percentage']; + return $question_responses_correct_percentage; + } + + /** + * Set the question_responses_incorrect_percentage for our Quiz Object + * @param $question = question row from question database table + * @return question_responses_incorrect_percentage field from the database + */ + protected function set_question_responses_incorrect_percentage() { + $question_responses_incorrect_percentage = self::$question['question_responses_incorrect_percentage']; + return $question_responses_incorrect_percentage; + } + + /** + * Set the question_score_average for our Quiz Object + * @param $question = question row from question database table + * @return question_score_average field from the database + */ + protected function set_question_score_average() { + $question_score_average = self::$question['question_score_average']; + return $question_score_average; + } + + /** + * Set the question_time_spent for our Quiz Object + * @param $question = question row from question database table + * @return question_time_spent field from the database + */ + protected function set_question_time_spent() { + $question_time_spent = self::$question['question_time_spent']; + return $question_time_spent; + } + + /** + * Set the question_time_spent_average for our Quiz Object + * @param $question = question row from question database table + * @return question_time_spent_average field from the database + */ + protected function set_question_time_spent_average() { + $question_time_spent_average = self::$question['question_time_spent_average']; + return $question_time_spent_average; + } + +// // // // // // // // +// GET GET GET GET +// // // // // // // // + + /** + * Get the question_id for our Quiz Object + * @param $question = question object + * @return question_id from the object + */ + public function get_question_id() { + $question_id = $this->question_id; + return $question_id; + } + + /** + * Get the quiz_id for our Quiz Object + * @param $question = question object + * @return quiz_id from the object + */ + public function get_quiz_id() { + $quiz_id = $this->quiz_id; + return $quiz_id; + } + + /** + * Get the question_title for our Quiz Object + * @param $question = question object + * @return question_title from the object + */ + public function get_question_title() { + $question_title = $this->question_title; + return $question_title; + } + + /** + * Get the question_image for our Quiz Object + * @param $question = question object + * @return question_image from the object + */ + public function get_question_image() { + $question_image = $this->question_image; + return $question_image; + } + + /** + * Get the question_image_src for our Quiz Object + * @param $question = question object + * @return question_image_src from the object + */ + public function get_question_image_src() { + $question_image_src = $this->question_image_src; + return $question_image_src; + } + + /** + * Get the question_image_srcset for our Quiz Object + * @param $question = question object + * @return question_image_srcset from the object + */ + public function get_question_image_srcset() { + $question_image_srcset = $this->question_image_srcset; + return $question_image_srcset; + } + + public function get_question_image_thumbnail() { + if(empty($this->question_image)) { + return ''; + } + $filename = explode('-original', $this->question_image); + $name = $filename[0]; + $ext = $filename[1]; + $thumbnail = $name.'-w200'.$ext; + return $thumbnail; + } + /** + * Get the question_image_alt for our Quiz Object + * @param $question = question object + * @return question_image_alt from the object + */ + public function get_question_image_alt() { + $question_image_alt = $this->question_image_alt; + return $question_image_alt; + } + +// Start get MC Image + +// END get MC Image + + /** + * Get the question_type for our Quiz Object + * @param $question = question object + * @return question_type from the object + */ + public function get_question_type() { + $question_type = $this->question_type; + return $question_type; + } + + /** + * Get the question_explanation for our Quiz Object + * @param $question = question object + * @return question_explanation from the object + */ + public function get_question_explanation() { + $question_explanation = $this->question_explanation; + // ? TODO: perfect the target attribute add. kindof buggy. + // var_dump($question_explanation); + // $question_explanation = html_entity_decode($question_explanation); + $question_explanation = preg_replace('/(<]*)>/i', '$1 target="_blank">', $question_explanation); + // $question_explanation = apply_filters( 'the_content', $question_explanation ); + // $question_explanation = str_replace( ']]>', ']]>', $question_explanation ); + // = preg_replace('/(<]*)>/i', '$1 target="_blank">', $question_explanation); + return $question_explanation; + } + + /** + * Get the question_order for our Quiz Object + * @param $question = question object + * @return question_order from the object + */ + public function get_question_order() { + $question_order = $this->question_order; + return $question_order; + } + + /** + * Get the question_is_deleted for our Quiz Object + * @param $question = question object + * @return question_is_deleted from the object + */ + public function get_question_is_deleted() { + $question_is_deleted = $this->question_is_deleted; + return $question_is_deleted; + } + + /** + * Get the mc_options for our Question Object + * @param $question = question object + * @return array of mc_option_id's as integers + */ + public function get_mc_options() { + $mc_options = $this->mc_options; + return $mc_options; + } + + /** + * Get the slider_id for our Question Object + * @param $question = question object + * @return slider_id + */ + public function get_slider() { + $slider = $this->slider; + return $slider; + } + + /** + * Get the question_views for our Question Object + * @param $question = question object + * @return int question_views + */ + public function get_question_views() { + $question_views = $this->question_views; + return $question_views; + } + + /** + * Get the question_responses for our Question Object + * @param $question = question object + * @return int question_responses + */ + public function get_question_responses() { + $question_responses = $this->question_responses; + return $question_responses; + } + + /** + * Get the question_responses_correct for our Question Object + * @param $question = question object + * @return int question_responses_correct + */ + public function get_question_responses_correct() { + $question_responses_correct = $this->question_responses_correct; + return $question_responses_correct; + } + + /** + * Get the question_incorrect for our Question Object + * @param $question = question object + * @return int question_responses_incorrect + */ + public function get_question_incorrect() { + $question_incorrect = $this->question_incorrect; + return $question_incorrect; + } + + /** + * Get the question_responses_correct_percentage for our Question Object + * and format it as a percentage (43%); + * @param $question = question object + * @return string '44%'; + */ + public function get_question_responses_correct_percentage() { + $question_responses_correct_percentage = round($this->question_responses_correct_percentage * 100 ); + return $question_responses_correct_percentage; + } + + /** + * Get the question_responses_incorrect_percentage for our Question Object + * and format it as a percentage (43%); + * @param $question = question object + * @return string '44%'; + */ + public function get_question_responses_incorrect_percentage() { + $question_responses_incorrect_percentage = round($this->question_responses_incorrect_percentage * 100 ); + return $question_responses_incorrect_percentage; + } + + /** + * Get the question_score_average for our Question Object + * @param $question = question object + * @return array of mc_option_id's as integers + */ + public function get_question_score_average() { + $question_score_average = $this->question_score_average; + return $question_score_average; + } + + /** + * Get the question_time_spent for our Question Object + * @param $question = question object + * @return array of mc_option_id's as integers + */ + public function get_question_time_spent() { + $question_time_spent = $this->question_time_spent; + return $question_time_spent; + } + + /** + * Get the question_views for our Question Object + * @param $question = question object + * @return array of mc_option_id's as integers + */ + public function get_question_time_spent_average() { + $question_time_spent_average = $this->question_time_spent_average; + return $question_time_spent_average; + } + + /** + * Get the built question with all MC Option / Slider data for taking quizzes + * + * @param $question = question object + * @return array with full question data for taking quizzes or converting to JSON + */ + public function get_take_question_array() { + // cast object to array + $question_array = (array) $this; + // remove what we don't need + unset($question_array['quiz_id']); + unset($question_array['mc_options']); + // get question type + $question_type = $this->get_question_type(); + // get question images info + $question_array['question_image_src'] = $this->get_question_image_src(); + $question_array['question_image_srcset'] = $this->get_question_image_srcset(); + // if mc, get mc options + if($question_type === 'mc') { + // get the mc options + $mc_option_ids = $this->get_mc_options(); + // create a mc_options_array + $question_array['mc_option'] = array(); + // create the MC Options + foreach($mc_option_ids as $mc_option_id) { + // build mc option object + $mc_option = new Enp_quiz_MC_option($mc_option_id); + // cast object to array in question_array + $mc_option_array = $mc_option->get_take_mc_option_array(); + $question_array['mc_option'][] = $mc_option_array; + } + } elseif($question_type === 'slider') { + $slider_id = $this->get_slider(); + $slider = new Enp_quiz_Slider($slider_id); + $question_array['slider'] = (array) $slider; + } + return $question_array; + } + + public function get_take_question_json() { + $question = $this->get_take_question_array(); + return json_encode($question); + } + + /** + * Get the value we should be saving on a question + * get posted if present, if not, get object. This is so we give them their + * current entry if we didn't *actually* save yet + * (like if there was an error on save they won't lose all their work). + * @param $string = what you want to get ('question_title', 'question_explanation', whatever) + * @param $quetion_id = which question you're trying to get a value from + * @return $value + */ + /* I don't think we need this anymore. Questions always have an ID now + public function get_value($key, $question_id) { + $value = ''; + if(isset($_POST['enp_question'])) { + $posted_value = $_POST['enp_question']; + // find our question_id + foreach($posted_value as $question) { + // see if we matched our question_id + if($question['question_id'] === $question_id) { + $value = stripslashes($question[$key]); + } + } + + + } + // if the value didn't get set, try with our object + if($value === '') { + $get_obj_value = 'get_'.$key; + $obj_value = $this->$get_obj_value(); + if($obj_value !== null) { + $value = $obj_value; + } + } + // send them back whatever the value should be + return $value; + } + */ } ?> diff --git a/public/quiz-create/class-enp_quiz-create.php b/public/quiz-create/class-enp_quiz-create.php index 492d7e53..0f8c8c15 100755 --- a/public/quiz-create/class-enp_quiz-create.php +++ b/public/quiz-create/class-enp_quiz-create.php @@ -111,6 +111,7 @@ public function override_wp_admin_bar_css() */ public function enqueue_scripts() { + wp_enqueue_script( 'tinymce', 'https://cdn.tiny.cloud/1/tpynz31lszn8p1eu7c0q58q5ua138xorj80slits2knm9zao/tinymce/6/tinymce.min.js' ); } /* * Adds a enp_quiz_template parameter for WordPress to look for diff --git a/public/quiz-create/css/enp_quiz-create.min.css b/public/quiz-create/css/enp_quiz-create.min.css index 44bf9eb7..c27c0940 100644 --- a/public/quiz-create/css/enp_quiz-create.min.css +++ b/public/quiz-create/css/enp_quiz-create.min.css @@ -1,2 +1,2 @@ -html{font-size:16px!important}html #enp-quiz{box-sizing:border-box}body #enp-quiz{background:#fff;overflow:hidden}#enp-quiz *,#enp-quiz :after,#enp-quiz :before{box-sizing:inherit}#enp-quiz ol,#enp-quiz ul{margin:0 0 1.6rem 1.25rem;padding:0}#enp-quiz textarea{margin-bottom:1rem}#enp-quiz button,#enp-quiz button:active,#enp-quiz button:focus,#enp-quiz button:hover,#enp-quiz iframe,#enp-quiz input[type=button],#enp-quiz input[type=button]:active,#enp-quiz input[type=button]:focus,#enp-quiz input[type=button]:hover,#enp-quiz input[type=reset],#enp-quiz input[type=reset]:active,#enp-quiz input[type=reset]:focus,#enp-quiz input[type=reset]:hover,#enp-quiz input[type=submit],#enp-quiz input[type=submit]:active,#enp-quiz input[type=submit]:focus,#enp-quiz input[type=submit]:hover{border:none}#enp-quiz .enp-screen-reader-text{clip:rect(1px,1px,1px,1px);position:absolute!important;left:-10000px;top:auto;width:1px;height:1px;overflow:hidden}#enp-quiz .enp-screen-reader-text:active,#enp-quiz .enp-screen-reader-text:focus,#enp-quiz .enp-screen-reader-text:hover{background-color:#f1f1f1;border-radius:3px;box-shadow:0 0 2px 2px rgba(0,0,0,.6);clip:auto!important;color:#21759b;display:block;font-size:14px;font-weight:700;height:auto;left:5px;line-height:normal;padding:15px 23px 14px;text-decoration:none;top:5px;width:auto;z-index:100000}#enp-quiz .enp-accordion-header{background:#fff;width:100%;box-shadow:inset 1px 1px 0 #ccc,inset -1px -1px 0 #ccc;color:#1d1c25;font-family:Arial,monospace,helvetica,arial,sans-serif;font-size:.9rem;font-weight:400;line-height:1.5;text-transform:none;letter-spacing:0;text-align:left;border:none;border-radius:3px;min-height:3.065rem;padding:1rem 2rem 1rem 1rem;margin:1.6rem 0 0;position:relative;z-index:9;cursor:pointer;transition:all .2s cubic-bezier(0,0,.3,1)}#enp-quiz .enp-accordion-header:first-of-type{margin-top:0}#enp-quiz .enp-accordion-header .enp-accordion-header__icon{position:absolute;fill:#e8e4ed;right:.75rem;bottom:.75rem;transition:all .35s cubic-bezier(0,0,.3,1)}#enp-quiz .enp-accordion-header--open .enp-accordion-header__icon{transform:rotateX(180deg)}#enp-quiz .enp-quiz-settings__form .enp-accordion-header{position:relative;overflow-y:hidden}#enp-quiz .enp-accordion-content{background:#fff;width:100%;box-shadow:inset 1px -1px 0 #ccc,inset -1px -1px 0 #ccc;display:block;position:relative;height:auto;overflow:visible;margin-bottom:1.6rem}#enp-quiz .enp-accordion-content--closed{margin-top:0;padding-top:0;animation:d .25s cubic-bezier(0,0,.3,1) forwards;display:none}#enp-quiz .enp-accordion-content--open{padding-top:1.6rem;margin-bottom:2rem;animation:b .45s cubic-bezier(0,0,.3,1) forwards}#enp-quiz .enp-quiz-message{max-width:740px;margin:0 auto;background:#fff;border:1px solid #eee;border-bottom:1px solid #ccc;padding:1rem;margin-bottom:1.6rem;position:fixed;bottom:0;left:0}#enp-quiz .enp-quiz-message:after{content:"";display:table;clear:both}#enp-quiz .enp-quiz-message__title{font-size:1rem;text-transform:uppercase}#enp-quiz .enp-message__list{list-style:none;margin-left:0;font-size:1.1rem;margin-bottom:0}#enp-quiz .enp-quiz-message--error{border-left:6px solid #bf5700;color:#bf5700}#enp-quiz .enp-quiz-message__title--error{color:#964400}#enp-quiz .enp-quiz-message--success{border-left:6px solid #60aaad;color:#4e9497}#enp-quiz .enp-quiz-message__title--success{color:#4e9497}#enp-quiz .enp-quiz-message--note{border-left:6px solid #cca562}#enp-quiz .enp-quiz-message__title--note{color:#333f48}#enp-quiz .enp-quiz-message__close{border:none;background:none;box-shadow:none;padding:0;margin:0;position:absolute;top:5px;right:5px}#enp-quiz .enp-quiz-message--ajax{margin-bottom:.6rem;animation:a .3s}#enp-quiz .enp-quiz-message-ajax-container{z-index:9999;position:fixed;bottom:10px}#enp-quiz .enp-quiz-message--saving__spinner{margin-left:-10px}#enp-quiz .enp-quiz-message--saving__text{font-size:1rem}#enp-quiz input.limited-chars,#enp-quiz textarea.limited-chars{margin-bottom:.2rem}#enp-quiz .limited-chars__container{color:#fdfcfd;font-size:.8rem;display:block;text-align:right;margin-bottom:1.2rem}#enp-quiz .limited-chars__counter{color:#e8e4ed}#enp-quiz .limited-chars__container--error,#enp-quiz .limited-chars__container--error .limited-chars__counter{color:#964400}#enp-quiz input.has-error,#enp-quiz textarea.has-error{border:1px solid #bf5700}#enp-quiz input.has-error:focus,#enp-quiz textarea.has-error:focus{outline-color:#bf5700}#enp-quiz .enp-tooltip{position:relative}#enp-quiz .enp-tooltip__activator:focus+.enp-tooltip__description,#enp-quiz .enp-tooltip__activator:focus>.enp-tooltip__description{display:block}#enp-quiz .enp-tooltip__description{display:none;position:absolute;left:103%;margin-bottom:2rem;border-radius:3px;background:#faf9fb;font-size:.9rem;padding:.9rem;max-width:200px}.enp-sticky{position:relative;left:0;right:0;top:0;z-index:999}.enp-sticky.enp-sticky--fixed{position:fixed}.enp-breadcrumb-link{font-size:.85rem}.enp-breadcrumb-link__icon{position:relative;top:.45rem;left:.4rem}body #enp-quiz{color:#1d1c25;font-family:Arial,monospace,helvetica,arial,sans-serif;font-size:1em;line-height:1.6;font-weight:400}@media (min-width:700px){body #enp-quiz{font-size:1.3em}}#enp-quiz h1,#enp-quiz h2,#enp-quiz h3,#enp-quiz h4,#enp-quiz h5,#enp-quiz h6{font-family:Arial,monospace,helvetica,arial,sans-serif;color:#5d5e5f;clear:both;margin:0 0 .2rem;font-weight:700;line-height:1.2em}#enp-quiz h1{font-size:2em}#enp-quiz h2{font-size:1.75em}#enp-quiz h3{font-size:1.475em}#enp-quiz h4{font-size:1.3em}#enp-quiz h5{font-size:1.125em}#enp-quiz h6{font-size:1em}#enp-quiz p+h1,#enp-quiz p+h2,#enp-quiz p+h3,#enp-quiz p+h4,#enp-quiz p+h5,#enp-quiz p+h6,#enp-quiz ul+h1,#enp-quiz ul+h2,#enp-quiz ul+h3,#enp-quiz ul+h4,#enp-quiz ul+h5,#enp-quiz ul+h6{margin-top:1.8em}#enp-quiz p{font-size:.85em;margin-bottom:1.125em;font-weight:300}#enp-quiz ol,#enp-quiz ul{margin:0 0 1.6em 1.25em}#enp-quiz ul{list-style:disc}#enp-quiz ol{list-style:decimal}#enp-quiz li>ol,#enp-quiz li>ul{margin-bottom:0;margin-left:1.6em}#enp-quiz b,#enp-quiz strong{font-weight:700}#enp-quiz cite,#enp-quiz dfn,#enp-quiz em{font-family:georgia,times,serif;font-style:italic}#enp-quiz pre{background:#eee;font-family:Courier\ 10 Pitch,Courier,monospace;font-size:.95em;line-height:1.6;margin-bottom:1.6em;padding:1.6em;overflow:auto;max-width:100%}#enp-quiz .code,#enp-quiz code,#enp-quiz kbd,#enp-quiz tt,#enp-quiz var{font:.7em Monaco,Consolas,Andale Mono,DejaVu Sans Mono,monospace}#enp-quiz table{border:none}#enp-quiz table th{font-size:.8rem;text-transform:uppercase;border:none;border-bottom:1px solid #ddd}#enp-quiz table td,#enp-quiz table th{font-family:Arial,monospace,helvetica,arial,sans-serif}#enp-quiz table td{font-size:1rem;border:none;border-bottom:1px solid #eee}#enp-quiz table tr:nth-child(2n) td{background:#fdfcfd}#enp-quiz table tr:last-child td{border-bottom:none}#enp-quiz figure{margin:0}#enp-quiz img{height:auto;max-width:100%}#enp-quiz a{color:#bf5700;text-decoration:none;transition:color .2s;touch-action:manipulation}#enp-quiz a .enp-icon{fill:#bf5700}#enp-quiz a:active,#enp-quiz a:focus,#enp-quiz a:hover{color:#964400}#enp-quiz a:active .enp-icon,#enp-quiz a:focus .enp-icon,#enp-quiz a:hover .enp-icon{fill:#964400}#enp-quiz button:focus{outline-color:#4d90fe;outline-offset:-2px;outline-style:auto;outline-width:5px}#enp-quiz .enp-btn{text-align:center;border:none;border-radius:3px;padding:.85em 1.4em .75em;font-size:15px;font-weight:400;letter-spacing:.05em;color:#fff;box-shadow:inset 0 -2px 0 rgba(0,0,0,.2);background:#bf5700;cursor:pointer;text-transform:uppercase;transition:all .2s;line-height:1.6}#enp-quiz .enp-btn:focus,#enp-quiz .enp-btn:hover{color:#fff;box-shadow:none;background:#964400}#enp-quiz .enp-btn:active{color:#fff;box-shadow:inset 0 2px 0 rgba(0,0,0,.1);background:#1eeeff}#enp-quiz .enp-btn:focus{outline-color:#4d90fe;outline-offset:-2px;outline-style:auto;outline-width:5px}#enp-quiz .enp-btn:disabled,#enp-quiz .enp-btn:disabled:focus,#enp-quiz .enp-btn:disabled:hover{background:#bf5700;cursor:default;opacity:.5}#enp-quiz .enp-btn--add{text-align:center;border:none;border-radius:3px;padding:.85em 1.4em .75em;font-size:15px;font-weight:400;letter-spacing:.05em;color:#fff;box-shadow:inset 0 -2px 0 rgba(0,0,0,.2);background:#bf5700;cursor:pointer;text-transform:uppercase;transition:all .2s;line-height:1.6;border:1px dashed #b5a6c4;background:none;color:#545454;box-shadow:none;width:100%}#enp-quiz .enp-btn--add:focus,#enp-quiz .enp-btn--add:hover{color:#fff;box-shadow:none;background:#964400}#enp-quiz .enp-btn--add:active{color:#fff;box-shadow:inset 0 2px 0 rgba(0,0,0,.1);background:#1eeeff}#enp-quiz .enp-btn--add:focus{outline-color:#4d90fe;outline-offset:-2px;outline-style:auto;outline-width:5px}#enp-quiz .enp-btn--add:disabled,#enp-quiz .enp-btn--add:disabled:focus,#enp-quiz .enp-btn--add:disabled:hover{background:#bf5700;cursor:default;opacity:.5}#enp-quiz .enp-btn--add:focus,#enp-quiz .enp-btn--add:hover{border:1px dashed #69547e;color:#b5a6c4;background:hsla(0,0%,100%,.9)}#enp-quiz .enp-btn--disabled{opacity:.65;cursor:default}#enp-quiz .enp-btn--enabled{animation:f .6s}#enp-quiz .enp-icon{width:24px;height:24px;transition:all .2s}#enp-quiz .enp-page-title{font-size:1.6rem}@keyframes a{0%{opacity:0;transform:translate3d(0,100px,0)}to{opacity:1;transform:translateZ(0)}}@keyframes b{0%{opacity:0;height:auto;transform:translate3d(0,-20px,0)}to{opacity:1;height:auto;transform:translateZ(0)}}@keyframes c{0%{opacity:0;height:auto;transform:translate3d(0,-20px,0)}to{opacity:.8;height:auto;transform:translateZ(0)}}@keyframes d{0%{overflow:hidden;height:100px;opacity:1;transform:translateZ(0)}to{height:0;opacity:0;transform:translate3d(0,-20px,0)}}@keyframes e{0%{opacity:1;transform:translateZ(0)}to{padding:0;margin:0;opacity:0;height:0;z-index:-1;transform:translate3d(-200px,0,0)}}@keyframes f{0%{opacity:.8;transform:scaleX(1);box-shadow:0 0 0 rgba(0,0,0,.3)}40%{opacity:1}70%{opacity:1;transform:scale3d(1.1,1.1,1);box-shadow:0 0 8px rgba(0,0,0,.4)}to{opacity:1;transform:scaleX(1);box-shadow:0 0 0 rgba(0,0,0,.3),inset 0 2px 0 rgba(0,0,0,.2)}}@keyframes g{0%{opacity:0}to{opacity:1}}@keyframes h{0%{transform:translate3d(0,-200px,0)}to{transform:translateZ(0)}}.spinner{margin:0 auto;width:70px;text-align:center}.spinner>div{width:18px;height:18px;background-color:#333;border-radius:100%;display:inline-block;animation:i 1.4s infinite ease-in-out both}.spinner .bounce1{animation-delay:-.32s}.spinner .bounce2{animation-delay:-.16s}@keyframes i{0%,80%,to{transform:scale(0)}40%{transform:scale(1)}}#enp-quiz{transition:background .25s cubic-bezier(0,0,.3,1)}#enp-quiz .enp-aside{padding:1.6rem;margin-bottom:1.6rem;background:#94a6b3;border-radius:3px;border:1px solid #eee;border-bottom-color:#ccc;max-width:740px;margin:0 auto;font-size:1.2rem}@media (min-width:700px){#enp-quiz .enp-aside{margin-bottom:2.6rem;padding:1.6rem 2rem}}#enp-quiz .enp-aside:after{content:"";display:table;clear:both}#enp-quiz .enp-aside__title{font-size:1rem;text-transform:uppercase;font-weight:600}#enp-quiz .enp-page-title{border-bottom:2px solid #00a9b7}#enp-quiz fieldset{border:none;margin:0;padding:0}#enp-quiz .enp-label{display:block;color:#343242;font-weight:400;font-size:.85rem;text-transform:uppercase}#enp-quiz .enp-label__sm{font-size:small}#enp-quiz .enp-legend{display:block;color:#343242;font-weight:400;font-size:.85rem;text-transform:uppercase;padding-top:1.6rem;margin-bottom:.2rem;border:none;padding-top:0}#enp-quiz .enp-input{font-size:1rem;font-family:Arial,monospace,helvetica,arial,sans-serif;padding:.8rem .5rem;background:#fff;border:1px solid #aaa;border-radius:3px;width:20rem;max-width:100%;margin-bottom:1.2rem}@media (min-width:700px){#enp-quiz .enp-input{padding:.8rem;width:100%}}#enp-quiz .enp-input__sm{padding:5px;margin-bottom:5px}#enp-quiz .enp-input.enp-input--has-description{margin-bottom:.2rem}#enp-quiz .enp-input-description,#enp-quiz .enp-textarea-description{margin-bottom:1rem;font-size:.85rem}#enp-quiz .enp-input-description--before,#enp-quiz .enp-textarea-description--before{margin-bottom:0}#enp-quiz .enp-input::-webkit-input-placeholder,#enp-quiz .enp-textarea::-webkit-input-placeholder{font-family:Arial,monospace,helvetica,arial,sans-serif;font-weight:300;color:#7a7697}#enp-quiz .enp-input:-ms-input-placeholder,#enp-quiz .enp-input::-ms-input-placeholder,#enp-quiz .enp-textarea:-ms-input-placeholder,#enp-quiz .enp-textarea::-ms-input-placeholder{font-family:Arial,monospace,helvetica,arial,sans-serif;font-weight:300;color:#7a7697}#enp-quiz .enp-input::placeholder,#enp-quiz .enp-textarea::placeholder{font-family:Arial,monospace,helvetica,arial,sans-serif;font-weight:300;color:#7a7697}#enp-quiz .enp-textarea{font-size:1rem;font-family:Arial,monospace,helvetica,arial,sans-serif;padding:.8rem .5rem;background:#fff;border:1px solid #aaa;border-radius:3px;width:20rem;max-width:100%;margin-bottom:1.2rem;line-height:1.5}@media (min-width:700px){#enp-quiz .enp-textarea{padding:.8rem;width:100%}}#enp-quiz .enp-textarea:focus{outline-color:#4d90fe;outline-offset:-2px;outline-style:auto;outline-width:5px}#enp-quiz .enp-textarea.enp-textarea--has-description{margin-bottom:.2rem}#enp-quiz .enp-textarea.enp-textarea--has-description--before{margin-bottom:1.2rem}#enp-quiz .enp-embed-code{font-size:1rem;font-family:Arial,monospace,helvetica,arial,sans-serif;padding:.8rem .5rem;background:#fff;border:1px solid #aaa;border-radius:3px;width:20rem;max-width:100%;margin-bottom:1.2rem;line-height:1.5;padding:1.6rem;font-size:.7rem;font-family:Monaco,Consolas,Andale Mono,DejaVu Sans Mono,monospace}@media (min-width:700px){#enp-quiz .enp-embed-code{padding:.8rem;width:100%}}#enp-quiz .enp-embed-code:focus{outline-color:#4d90fe;outline-offset:-2px;outline-style:auto;outline-width:5px}#enp-quiz .enp-preview-page-container,#enp-quiz .enp-publish-page-container,#enp-quiz .enp-quiz-form-container{display:grid;grid-column:2/-1;gap:1rem;width:100%;justify-items:center}@media (min-width:700px){#enp-quiz .enp-preview-page-container,#enp-quiz .enp-publish-page-container,#enp-quiz .enp-quiz-form-container{justify-items:start}}#enp-quiz .enp-quiz-form{display:grid;padding-left:0;padding-right:0}@media (min-width:700px){#enp-quiz .enp-quiz-form{width:100%;max-width:40rem}}#enp-quiz .enp-preview-page-flex-container{display:grid;gap:1rem}@media (min-width:700px){#enp-quiz .enp-preview-page-flex-container{grid-template-columns:1fr 3fr}}#enp-quiz .enp-quiz-title__label{display:block;color:#343242;font-weight:400;font-size:.85rem;text-transform:uppercase;font-weight:500}#enp-quiz .enp-quiz-title__textarea{font-size:1rem;font-family:Arial,monospace,helvetica,arial,sans-serif;padding:.8rem .5rem;background:#fff;border:1px solid #aaa;border-radius:3px;width:20rem;max-width:100%;margin-bottom:1.2rem;font-weight:700;font-size:1.6rem;margin-bottom:1rem}@media (min-width:700px){#enp-quiz .enp-quiz-title__textarea{padding:.8rem;width:100%}}#enp-quiz .enp-quiz-title__textarea::-webkit-input-placeholder{font-weight:700}#enp-quiz .enp-quiz-title__textarea:-ms-input-placeholder,#enp-quiz .enp-quiz-title__textarea::-ms-input-placeholder{font-weight:700}#enp-quiz .enp-quiz-title__textarea::placeholder{font-weight:700}#enp-quiz textarea{color:#000}#enp-quiz .enp-accordion-container{margin-bottom:1.6rem;position:relative}#enp-quiz .enp-question-content{background:#fff;width:100%;padding-top:0;position:relative}#enp-quiz .enp-question-inner{padding:1.6rem 1.6rem 1rem}@media (min-width:700px){#enp-quiz .enp-question-inner{padding-right:2.8rem;padding-left:2.9rem}}#enp-quiz .enp-question-title__label{display:block;color:#343242;font-weight:400;font-size:.85rem;text-transform:uppercase;font-weight:500}#enp-quiz .enp-question-title__textarea{font-family:Arial,monospace,helvetica,arial,sans-serif;padding:.8rem .5rem;background:#fff;border:1px solid #aaa;border-radius:3px;width:20rem;max-width:100%;margin-bottom:1.2rem;padding:1rem 1.2rem;font-size:1rem}@media (min-width:700px){#enp-quiz .enp-question-title__textarea{padding:.8rem;width:100%}}#enp-quiz .enp-question-image-upload{text-align:center;border:none;border-radius:3px;padding:.85em 1.4em .75em;font-size:15px;font-weight:400;letter-spacing:.05em;color:#fff;box-shadow:inset 0 -2px 0 rgba(0,0,0,.2);background:#bf5700;cursor:pointer;line-height:1.6;border:1px dashed #b5a6c4;background:none;color:#545454;box-shadow:none;border:2px dashed #b5a6c4;color:#e8e4ed;transition:all .2s;background:#faf9fb;font-size:1rem;text-transform:uppercase;position:relative;margin-bottom:2rem;transform:translateZ(0);transition:all .3s cubic-bezier(0,0,.3,1)}#enp-quiz .enp-question-image-upload:focus,#enp-quiz .enp-question-image-upload:hover{color:#fff;box-shadow:none;background:#964400}#enp-quiz .enp-question-image-upload:active{color:#fff;box-shadow:inset 0 2px 0 rgba(0,0,0,.1);background:#1eeeff}#enp-quiz .enp-question-image-upload:focus{outline-color:#4d90fe;outline-offset:-2px;outline-style:auto;outline-width:5px}#enp-quiz .enp-question-image-upload:disabled,#enp-quiz .enp-question-image-upload:disabled:focus,#enp-quiz .enp-question-image-upload:disabled:hover{background:#bf5700;cursor:default;opacity:.5}#enp-quiz .enp-question-image-upload:focus,#enp-quiz .enp-question-image-upload:hover{border:1px dashed #69547e;background:hsla(0,0%,100%,.9);color:#b5a6c4;border:2px dashed #999}#enp-quiz .enp-question-image-upload .enp-question-image-upload__icon--photo{width:2.8rem;height:2.8rem;opacity:0;position:absolute;top:0;left:0;right:0;margin:0 auto;transform:translateZ(0);z-index:-1;transition:opacity .2s,transform .3s cubic-bezier(0,0,.3,1)}#enp-quiz .enp-question-image-upload .enp-question-image-upload__icon--add{width:1rem;height:1rem;border-radius:50%;fill:#fff;padding:.02rem;background:#e8e4ed;fill:#faf9fb;margin-right:5px;position:relative;top:.2rem}#enp-quiz .enp-question-image-upload:active,#enp-quiz .enp-question-image-upload:focus,#enp-quiz .enp-question-image-upload:hover{padding-top:5rem;padding-bottom:2rem}#enp-quiz .enp-question-image-upload:active .enp-question-image-upload__icon--photo,#enp-quiz .enp-question-image-upload:focus .enp-question-image-upload__icon--photo,#enp-quiz .enp-question-image-upload:hover .enp-question-image-upload__icon--photo{opacity:1;z-index:1;transform:translate3d(0,1.75rem,0)}#enp-quiz .enp-question-image-upload:active .enp-question-image-upload__icon--add,#enp-quiz .enp-question-image-upload:focus .enp-question-image-upload__icon--add,#enp-quiz .enp-question-image-upload:hover .enp-question-image-upload__icon--add{fill:#fff;background:#b5a6c4}#enp-quiz .enp-question-image__container{position:relative;margin-bottom:1rem}#enp-quiz .enp-question-image{margin-bottom:1.2rem}#enp-quiz .enp-question-type__legend{display:block;color:#343242;font-weight:400;font-size:.85rem;text-transform:uppercase;padding-top:1.6rem;margin-bottom:.2rem;border:none}#enp-quiz .enp-question-type__input{clip:rect(1px,1px,1px,1px);position:absolute!important;left:-10000px;top:auto;width:1px;height:1px;overflow:hidden}#enp-quiz .enp-question-type__label{text-transform:capitalize;display:inline-block;padding:.2rem .5rem;border-radius:3px;cursor:pointer}#enp-quiz .enp-question-type__input:checked+.enp-question-type__label{background:#00a9b7;color:#fff;text-shadow:0 0 1px rgba(0,0,0,.7)}#enp-quiz .enp-question-type__input:focus+.enp-question-type__label{z-index:8;outline-color:#4d90fe;outline-offset:-2px;outline-style:auto;outline-width:5px}#enp-quiz .enp-question-type__label{position:relative;z-index:9}#enp-quiz .enp-mc-options,#enp-quiz .enp-slider-options{margin-top:0;display:none;animation:d .25s cubic-bezier(0,0,.3,1) forwards;animation-delay:0s,.05s}#enp-quiz .enp-question-type__input--mc:checked~.enp-mc-options,#enp-quiz .enp-question-type__input--slider:checked~.enp-slider-options{visibility:visible;display:block;animation:g .45s cubic-bezier(0,0,.3,1) forwards}#enp-quiz .enp-mc-options__list{list-style:none;margin-left:0}#enp-quiz .enp-mc-option{position:relative;padding-left:6px}@media (min-width:700px){#enp-quiz .enp-mc-option{padding-left:0}}#enp-quiz .enp-mc-options__legend{display:block;color:#343242;font-weight:400;font-size:.85rem;text-transform:uppercase;font-weight:500}#enp-quiz .enp-mc-option__add,#enp-quiz .enp-mc-option__button--correct,#enp-quiz .enp-mc-option__button--delete{display:none}#enp-quiz .enp-question-type__input--mc:checked~.enp-mc-options .enp-mc-option__add,#enp-quiz .enp-question-type__input--mc:checked~.enp-mc-options .enp-mc-option__button--correct,#enp-quiz .enp-question-type__input--mc:checked~.enp-mc-options .enp-mc-option__button--delete{display:block}#enp-quiz .enp-button__question-image-delete,#enp-quiz .enp-mc-option__button--delete{border:none;background:none;box-shadow:none;padding:0;margin:0;position:absolute;top:9px;right:-24px;fill:#bbb;cursor:pointer}@media (min-width:700px){#enp-quiz .enp-button__question-image-delete,#enp-quiz .enp-mc-option__button--delete{right:-30px}}#enp-quiz .enp-button__question-image-delete:focus,#enp-quiz .enp-button__question-image-delete:hover,#enp-quiz .enp-mc-option__button--delete:focus,#enp-quiz .enp-mc-option__button--delete:hover{fill:#bf5700}#enp-quiz .enp-mc-option__button--correct{border:none;background:none;box-shadow:none;padding:0;margin:0;position:absolute;top:8px;left:-24px}@media (min-width:700px){#enp-quiz .enp-mc-option__button--correct{left:-35px}}#enp-quiz .enp-mc-option__button--correct .enp-mc-option__icon--correct{border-radius:50%;padding:.05em;width:28px;height:28px;fill:#fff;background:#fff;cursor:pointer;border:2px solid #c1893e;transition:all .2s}@media (min-width:700px){#enp-quiz .enp-mc-option__button--correct .enp-mc-option__icon--correct{padding:.15em}}#enp-quiz .enp-mc-option__button--correct:focus .enp-mc-option__icon--correct,#enp-quiz .enp-mc-option__button--correct:hover .enp-mc-option__icon--correct{background:#fff;border-color:#60aaad;fill:#60aaad}#enp-quiz .enp-mc-option__button--correct:disabled{opacity:1}#enp-quiz .enp-mc-option__button--correct:disabled .enp-mc-option__icon--correct{cursor:default;fill:#fff;border:2px solid transparent}#enp-quiz .enp-mc-option--correct .enp-mc-option__input{box-shadow:inset 0 0 3px #00a9b7;border:1px solid #00a9b7}#enp-quiz .enp-mc-option--correct .enp-mc-option__button--correct:focus .enp-mc-option__icon--correct,#enp-quiz .enp-mc-option--correct .enp-mc-option__button--correct:hover .enp-mc-option__icon--correct,#enp-quiz .enp-mc-option--correct .enp-mc-option__icon--correct{fill:#fff;border-color:#00a9b7;background:#00a9b7}#enp-quiz .enp-mc-option__add{text-align:center;border:none;border-radius:3px;padding:.85em 1.4em .75em;font-size:15px;font-weight:400;letter-spacing:.05em;color:#fff;box-shadow:inset 0 -2px 0 rgba(0,0,0,.2);background:#bf5700;cursor:pointer;line-height:1.6;border:1px dashed #b5a6c4;background:none;color:#545454;box-shadow:none;border:2px dashed #b5a6c4;color:#e8e4ed;transition:all .2s;background:#faf9fb;font-size:1rem;text-transform:uppercase;text-align:left;padding:.7rem .75rem .8rem}#enp-quiz .enp-mc-option__add:focus,#enp-quiz .enp-mc-option__add:hover{color:#fff;box-shadow:none;background:#964400}#enp-quiz .enp-mc-option__add:active{color:#fff;box-shadow:inset 0 2px 0 rgba(0,0,0,.1);background:#1eeeff}#enp-quiz .enp-mc-option__add:focus{outline-color:#4d90fe;outline-offset:-2px;outline-style:auto;outline-width:5px}#enp-quiz .enp-mc-option__add:disabled,#enp-quiz .enp-mc-option__add:disabled:focus,#enp-quiz .enp-mc-option__add:disabled:hover{background:#bf5700;cursor:default;opacity:.5}#enp-quiz .enp-mc-option__add:focus,#enp-quiz .enp-mc-option__add:hover{border:1px dashed #69547e;background:hsla(0,0%,100%,.9);color:#b5a6c4;border:2px dashed #999}#enp-quiz .enp-mc-option__add .enp-mc-option__add__icon{width:1rem;height:1rem;border-radius:50%;fill:#fff;padding:.02rem;margin-right:5px;background:#e8e4ed;fill:#faf9fb;position:relative;top:.2rem}#enp-quiz .enp-mc-option__add:hover .enp-mc-option__add__icon{fill:#fff;background:#b5a6c4}#enp-quiz .enp-slider-options .enp-input{max-width:11.8rem}#enp-quiz .enp-slider-correct__container .enp-input,#enp-quiz .enp-slider-range__container .enp-input{max-width:8.8rem}@media (min-width:400px){#enp-quiz .enp-slider-correct__container .enp-input,#enp-quiz .enp-slider-range__container .enp-input{max-width:11.8rem}}#enp-quiz .enp-slider-preview{border:1px solid #ddd;margin-top:.2rem;margin-bottom:1.6rem;padding:1.6rem 1.6rem .6rem;position:relative}#enp-quiz .enp-slider-preview .enp-label--slider-preview{position:absolute;width:100%;top:.2rem;left:.4rem;font-size:.75rem;text-transform:uppercase}#enp-quiz .enp-slider-correct__container,#enp-quiz .enp-slider-range__container{display:flex;justify-content:space-between;align-items:center}#enp-quiz .enp-slider-correct__helper,#enp-quiz .enp-slider-range__helper{color:#777;font-size:.85rem;background:#fff;padding:0 .3rem;position:relative}#enp-quiz .enp-slider-correct__helper:before,#enp-quiz .enp-slider-range__helper:before{content:"";position:absolute;top:44%;height:4px;background:#ddd;width:120px;left:-60px;z-index:-1;transition:width .7s cubic-bezier(0,0,.3,1),background 1.6s cubic-bezier(0,0,.3,1)}#enp-quiz .enp-slider-options{margin-bottom:2rem}#enp-quiz .enp-slider-options .enp-accordion-header{text-transform:uppercase;font-size:.85rem;padding:.675rem}#enp-quiz .enp-slider-options .enp-slider-advanced-options__content{border:none;box-shadow:none;padding-top:1rem;padding-bottom:0;margin-bottom:0}#enp-quiz .enp-slider-correct-high__container{position:relative}#enp-quiz .enp-slider-correct-high__input-container--hidden{display:none}#enp-quiz .enp-slider-correct__helper--hidden:before{width:0;background:#60aaad}#enp-quiz .enp-slider-correct-answer-range--add-range{text-align:center;border:none;border-radius:3px;padding:.85em 1.4em .75em;font-size:15px;font-weight:400;letter-spacing:.05em;color:#fff;box-shadow:inset 0 -2px 0 rgba(0,0,0,.2);background:#bf5700;cursor:pointer;text-transform:uppercase;line-height:1.6;border:1px dashed #b5a6c4;background:none;color:#545454;box-shadow:none;border:2px dashed #b5a6c4;color:#e8e4ed;transition:all .2s;background:#faf9fb;margin-left:.8rem;font-size:.7rem}#enp-quiz .enp-slider-correct-answer-range--add-range:focus,#enp-quiz .enp-slider-correct-answer-range--add-range:hover{color:#fff;box-shadow:none;background:#964400}#enp-quiz .enp-slider-correct-answer-range--add-range:active{color:#fff;box-shadow:inset 0 2px 0 rgba(0,0,0,.1);background:#1eeeff}#enp-quiz .enp-slider-correct-answer-range--add-range:focus{outline-color:#4d90fe;outline-offset:-2px;outline-style:auto;outline-width:5px}#enp-quiz .enp-slider-correct-answer-range--add-range:disabled,#enp-quiz .enp-slider-correct-answer-range--add-range:disabled:focus,#enp-quiz .enp-slider-correct-answer-range--add-range:disabled:hover{background:#bf5700;cursor:default;opacity:.5}#enp-quiz .enp-slider-correct-answer-range--add-range:focus,#enp-quiz .enp-slider-correct-answer-range--add-range:hover{border:1px dashed #69547e;background:hsla(0,0%,100%,.9);color:#b5a6c4;border:2px dashed #999}@media (min-width:400px){#enp-quiz .enp-slider-correct-answer-range--add-range{font-size:.8rem;padding:.7rem}}@media (min-width:700px){#enp-quiz .enp-slider-correct-answer-range--add-range{padding:.7rem 1.2rem;min-width:11.4rem}}#enp-quiz .enp-slider-correct-answer-range--add-range .enp-slider-correct-answer-range__icon{width:1rem;height:1rem;border-radius:50%;fill:#fff;padding:.02rem;margin-right:5px;background:#e8e4ed;fill:#faf9fb;position:relative;left:-.2rem}#enp-quiz .enp-slider-correct-answer-range--add-range:hover .enp-slider-correct-answer-range__icon{fill:#fff;background:#b5a6c4}#enp-quiz .enp-slider-correct-answer-range--remove-range{position:absolute;right:-1.6rem;bottom:1.6rem;background:none;border:none;box-shadow:none;padding:0 .1rem}#enp-quiz .enp-slider-correct-answer-range--remove-range .enp-slider-correct-answer-range__icon{width:1.2em;height:1.2em;fill:#e8e4ed}#enp-quiz .enp-slider-correct-answer-range--remove-range:focus .enp-slider-correct-answer-range__icon,#enp-quiz .enp-slider-correct-answer-range--remove-range:hover .enp-slider-correct-answer-range__icon{fill:#bf5700}@media (min-width:700px){#enp-quiz .enp-slider-correct-answer-range--remove-range{top:-.2rem;right:-.2rem;bottom:auto}}#enp-quiz .enp-slider-options .enp-input:-moz-read-only{background:#faf9fb}#enp-quiz .enp-slider-options .enp-input:read-only{background:#faf9fb}#enp-quiz .enp-answer-explanation{background:#faf9fb;padding-top:2rem;box-shadow:inset 1px 0 0 #ccc,inset -1px -1px 0 #ccc,inset 0 1px 0 #ddd}#enp-quiz .enp-answer-explanation__label{display:block;color:#343242;font-weight:400;font-size:.85rem;text-transform:uppercase;font-weight:500}#enp-quiz .enp-question__button--delete{border:none;background:none;box-shadow:none;padding:0;margin:0;position:absolute;top:9px;right:9px;fill:#bbb;cursor:pointer}@media (min-width:700px){#enp-quiz .enp-question__button--delete{right:-30px}}#enp-quiz .enp-question__button--delete:hover{fill:#bf5700}#enp-quiz .enp-question__move{position:absolute;left:15px}@media (min-width:700px){#enp-quiz .enp-question__move{left:-40px}}#enp-quiz .enp-sort__placeholder{background:#ddd;height:60px;width:100%;max-height:120px;margin-bottom:1.6rem}#enp-quiz .ui-sortable .ui-sortable-helper .ui-sortable-handle{cursor:move;cursor:grabbing;cursor:-webkit-grabbing}#enp-quiz .enp-question__button--move{border:none;background:none;box-shadow:none;padding:0;margin:0;position:absolute;fill:#bbb;cursor:pointer}#enp-quiz .enp-question__button--move:focus,#enp-quiz .enp-question__button--move:hover{fill:#333}#enp-quiz .enp-question__button--move:disabled{opacity:.5}#enp-quiz .enp-question__button--move--up{top:0;left:-9px}#enp-quiz .enp-question__button--move--down{top:3px;right:-9px}#enp-quiz .enp-quiz-form__add-question{padding:.75em .8em .7em 1.4em;text-align:center;border:none;border-radius:3px;padding:.85em 1.4em .75em;font-size:15px;font-weight:400;letter-spacing:.05em;color:#fff;box-shadow:inset 0 -2px 0 rgba(0,0,0,.2);background:#bf5700;cursor:pointer;text-transform:uppercase;transition:all .2s;line-height:1.6;border:1px dashed #b5a6c4;background:none;color:#545454;box-shadow:none;padding-top:1rem;padding-bottom:1rem;margin-top:1.6rem;margin-bottom:2rem}#enp-quiz .enp-quiz-form__add-question:focus,#enp-quiz .enp-quiz-form__add-question:hover{color:#fff;box-shadow:none;background:#964400}#enp-quiz .enp-quiz-form__add-question:active{color:#fff;box-shadow:inset 0 2px 0 rgba(0,0,0,.1);background:#1eeeff}#enp-quiz .enp-quiz-form__add-question:focus{outline-color:#4d90fe;outline-offset:-2px;outline-style:auto;outline-width:5px}#enp-quiz .enp-quiz-form__add-question:disabled,#enp-quiz .enp-quiz-form__add-question:disabled:focus,#enp-quiz .enp-quiz-form__add-question:disabled:hover{background:#bf5700;cursor:default;opacity:.5}#enp-quiz .enp-quiz-form__add-question:focus,#enp-quiz .enp-quiz-form__add-question:hover{border:1px dashed #69547e;color:#b5a6c4;background:hsla(0,0%,100%,.9)}#enp-quiz .enp-quiz-form__add-question .enp-add-question__icon{width:1rem;height:1rem;border-radius:50%;fill:#fff;padding:.02rem;margin-right:5px;width:1.2rem;height:1.2rem;background:#e8e4ed;fill:#faf9fb;position:relative;top:.2rem}#enp-quiz .enp-quiz-form__add-question:hover .enp-add-question__icon{fill:#fff;background:#b5a6c4}#enp-quiz .enp-btn--save__btns{display:flex;align-items:center;align-items:flex-start}#enp-quiz .enp-quiz-form__save{text-align:center;border:none;border-radius:3px;padding:.85em 1.4em .75em;font-size:15px;font-weight:400;letter-spacing:.05em;color:#fff;box-shadow:inset 0 -2px 0 rgba(0,0,0,.2);background:#bf5700;cursor:pointer;text-transform:uppercase;transition:all .2s;line-height:1.6;width:100%;margin-bottom:1rem;opacity:.8;text-shadow:0 -1px 2px rgba(0,0,0,.6)}#enp-quiz .enp-quiz-form__save:focus,#enp-quiz .enp-quiz-form__save:hover{color:#fff;box-shadow:none;background:#964400}#enp-quiz .enp-quiz-form__save:active{color:#fff;box-shadow:inset 0 2px 0 rgba(0,0,0,.1);background:#1eeeff}#enp-quiz .enp-quiz-form__save:focus{outline-color:#4d90fe;outline-offset:-2px;outline-style:auto;outline-width:5px}#enp-quiz .enp-quiz-form__save:disabled,#enp-quiz .enp-quiz-form__save:disabled:focus,#enp-quiz .enp-quiz-form__save:disabled:hover{background:#bf5700;cursor:default;opacity:.5}#enp-quiz .enp-quiz-form__save:focus,#enp-quiz .enp-quiz-form__save:hover{opacity:1}@media (min-width:400px){#enp-quiz .enp-quiz-form__save{padding:1.2rem 1.8rem 1.1rem;width:27%;margin-right:3%;position:relative}}#enp-quiz .enp-quiz-form__save--reveal{animation:c .3s cubic-bezier(0,0,.3,1)}#enp-quiz .enp-btn--next-step{text-align:center;border:none;border-radius:3px;padding:.85em 1.4em .75em;font-size:15px;font-weight:400;letter-spacing:.05em;color:#fff;box-shadow:inset 0 -2px 0 rgba(0,0,0,.2);background:#bf5700;cursor:pointer;text-transform:uppercase;transition:all .2s;line-height:1.6;padding:.65em 1.2em .85em 1.4em}#enp-quiz .enp-btn--next-step:focus,#enp-quiz .enp-btn--next-step:hover{color:#fff;box-shadow:none;background:#964400}#enp-quiz .enp-btn--next-step:active{color:#fff;box-shadow:inset 0 2px 0 rgba(0,0,0,.1);background:#1eeeff}#enp-quiz .enp-btn--next-step:focus{outline-color:#4d90fe;outline-offset:-2px;outline-style:auto;outline-width:5px}#enp-quiz .enp-btn--next-step:disabled,#enp-quiz .enp-btn--next-step:disabled:focus,#enp-quiz .enp-btn--next-step:disabled:hover{background:#bf5700;cursor:default;opacity:.5}#enp-quiz .enp-btn--next-step__icon{border-radius:50%;fill:#fff;background:#fff;fill:#bf5700;width:1.2rem;height:1.2rem;margin-left:.5em;position:relative;top:.15rem}#enp-quiz .enp-btn--next-step__icon:hover{background:#fff;fill:#964400}#enp-quiz .enp-btn--next-step{width:100%;padding:1rem 1.4rem}@media (min-width:700px){#enp-quiz .enp-btn--next-step{padding:1.2rem 1.8rem 1.1rem}}#enp-quiz .enp-btn--next-step .enp-btn--next-step__icon{width:1rem;height:1rem}#enp-quiz .enp-btn--next-step--reveal{animation:b .3s cubic-bezier(0,0,.3,1)}#enp-quiz .enp-accordion-header--inserting,#enp-quiz .enp-mc-option--inputs{animation:a .4s cubic-bezier(0,0,.3,1) forwards}#enp-quiz .enp-mc-option--remove,#enp-quiz .enp-question--remove,#enp-quiz .enp-question__image--remove{animation:e .5s cubic-bezier(0,0,.3,1) forwards}#enp-quiz .enp-image-upload-wait{text-align:center;border:none;border-radius:3px;padding:.85em 1.4em .75em;font-size:15px;font-weight:400;letter-spacing:.05em;color:#fff;box-shadow:inset 0 -2px 0 rgba(0,0,0,.2);background:#bf5700;cursor:pointer;text-transform:uppercase;line-height:1.6;border:1px dashed #b5a6c4;background:none;color:#545454;box-shadow:none;border:2px dashed #b5a6c4;color:#e8e4ed;transition:all .2s;background:#faf9fb;padding-top:4rem;padding-bottom:4rem;margin-bottom:1rem;width:100%}#enp-quiz .enp-image-upload-wait:focus,#enp-quiz .enp-image-upload-wait:hover{color:#fff;box-shadow:none;background:#964400}#enp-quiz .enp-image-upload-wait:active{color:#fff;box-shadow:inset 0 2px 0 rgba(0,0,0,.1);background:#1eeeff}#enp-quiz .enp-image-upload-wait:focus{outline-color:#4d90fe;outline-offset:-2px;outline-style:auto;outline-width:5px}#enp-quiz .enp-image-upload-wait:disabled,#enp-quiz .enp-image-upload-wait:disabled:focus,#enp-quiz .enp-image-upload-wait:disabled:hover{background:#bf5700;cursor:default;opacity:.5}#enp-quiz .enp-image-upload-wait:focus,#enp-quiz .enp-image-upload-wait:hover{border:1px dashed #69547e;background:hsla(0,0%,100%,.9);color:#b5a6c4;border:2px dashed #999}#enp-quiz .enp-accordion-header.question-has-error{color:#bf5700;box-shadow:0 0 3px #bf5700}.enp-quiz.ui-sortable--sorting #enp-quiz .enp-accordion-content{display:none}#enp-quiz .enp-quiz-settings__title,#enp-quiz .enp-quiz-share__legend{position:relative;font-size:1rem;text-transform:uppercase;font-weight:600;padding-top:0}@media (min-width:700px){#enp-quiz .enp-quiz-settings__title,#enp-quiz .enp-quiz-share__legend{padding:1em 0}}#enp-quiz .enp-quiz-settings__form{margin-bottom:3rem;overflow:visible}@media (min-width:1000px){#enp-quiz .enp-quiz-settings__form{padding:0;margin-bottom:0}}@media (min-width:700px){#enp-quiz .enp-fieldset{position:relative}}#enp-quiz .enp-title-display__legend{padding-top:0}@media (min-width:700px){#enp-quiz .enp-title-display__legend{padding-top:.4rem}}#enp-quiz .enp-quiz-share__input,#enp-quiz .enp-quiz-styles__input{width:100%}#enp-quiz .enp-quiz-styles__textarea--custom-css{font-family:Monaco,Consolas,Andale Mono,DejaVu Sans Mono,monospace;font-size:.9rem;min-height:200px}#enp-quiz .enp-fieldset--section{padding:1.6rem 1rem}#enp-quiz .enp-fieldset--section.enp-accordion-content--open{margin-bottom:0}#enp-quiz .enp-quiz-share--facebook{margin-bottom:2rem}#enp-quiz .enp-title-display__legend{display:block;color:#343242;font-weight:400;font-size:.85rem;text-transform:uppercase;padding-top:1.6rem;margin-bottom:.2rem;border:none}#enp-quiz .enp-title-display__input{clip:rect(1px,1px,1px,1px);position:absolute!important;left:-10000px;top:auto;width:1px;height:1px;overflow:hidden}#enp-quiz .enp-title-display__label{text-transform:capitalize;display:inline-block;padding:.2rem .5rem;border-radius:3px;cursor:pointer}#enp-quiz .enp-title-display__input:checked+.enp-title-display__label{background:#00a9b7;color:#fff;text-shadow:0 0 1px rgba(0,0,0,.7)}#enp-quiz .enp-title-display__input:focus+.enp-title-display__label{z-index:8;outline-color:#4d90fe;outline-offset:-2px;outline-style:auto;outline-width:5px}#enp-quiz .enp-mc-options-order__legend{display:block;color:#343242;font-weight:400;font-size:.85rem;text-transform:uppercase;padding-top:1.6rem;margin-bottom:.2rem;border:none}#enp-quiz .enp-mc-options-order__input{clip:rect(1px,1px,1px,1px);position:absolute!important;left:-10000px;top:auto;width:1px;height:1px;overflow:hidden}#enp-quiz .enp-mc-options-order__label{text-transform:capitalize;display:inline-block;padding:.2rem .5rem;border-radius:3px;cursor:pointer}#enp-quiz .enp-mc-options-order__input:checked+.enp-mc-options-order__label{background:#00a9b7;color:#fff;text-shadow:0 0 1px rgba(0,0,0,.7)}#enp-quiz .enp-mc-options-order__input:focus+.enp-mc-options-order__label{z-index:8;outline-color:#4d90fe;outline-offset:-2px;outline-style:auto;outline-width:5px}#enp-quiz .enp-mc-options-order{margin-bottom:1.6rem}#enp-quiz .enp-quiz-share__textarea{min-height:7.6rem;margin-bottom:2rem}@media (min-width:700px){#enp-quiz .enp-quiz-share__textarea{min-height:4.6rem}}@media (min-width:1000px){#enp-quiz .enp-quiz-share__textarea{min-height:7.6rem}}#enp-quiz .enp-preview-form__submit{margin-top:1.6rem;margin-bottom:1.6rem}#enp-quiz .enp-quiz-preview__title{font-size:1rem;text-transform:uppercase;font-weight:600}@media (min-width:700px){#enp-quiz .enp-quiz-preview__title{padding:1em 0}}#enp-quiz .enp-preview-form__submit{text-align:center;border:none;border-radius:3px;padding:.85em 1.4em .75em;font-size:15px;font-weight:400;letter-spacing:.05em;color:#fff;box-shadow:inset 0 -2px 0 rgba(0,0,0,.2);background:#bf5700;cursor:pointer;text-transform:uppercase;transition:all .2s;line-height:1.6;width:100%;padding-top:.85rem;padding-bottom:.85rem;margin-bottom:1rem;opacity:.8;text-shadow:0 -1px 2px rgba(0,0,0,.6)}#enp-quiz .enp-preview-form__submit:focus,#enp-quiz .enp-preview-form__submit:hover{color:#fff;box-shadow:none;background:#964400}#enp-quiz .enp-preview-form__submit:active{color:#fff;box-shadow:inset 0 2px 0 rgba(0,0,0,.1);background:#1eeeff}#enp-quiz .enp-preview-form__submit:focus{outline-color:#4d90fe;outline-offset:-2px;outline-style:auto;outline-width:5px}#enp-quiz .enp-preview-form__submit:disabled,#enp-quiz .enp-preview-form__submit:disabled:focus,#enp-quiz .enp-preview-form__submit:disabled:hover{background:#bf5700;cursor:default;opacity:.5}#enp-quiz .enp-preview-form__submit:focus,#enp-quiz .enp-preview-form__submit:hover{opacity:1}#enp-quiz .enp-preview-form__submit--publish{width:100%;position:relative;z-index:99999999;padding:1.05rem 1.8rem .95rem}#enp-quiz .enp-quiz-styles__iris-wrapper{position:relative}#enp-quiz .iris-picker{box-sizing:content-box;position:relative;z-index:9999999999;top:-1.2rem;margin-bottom:1rem;padding-bottom:3rem;padding-right:30px}@media (min-width:1000px){#enp-quiz .iris-picker{position:absolute;top:-4px;left:0}}#enp-quiz .iris-picker:last-of-type{margin-bottom:0}#enp-quiz .iris-picker .ui-draggable-handle:focus .ui-slider-handle,#enp-quiz .iris-picker .ui-slider-handle:focus{box-shadow:0 0 3px rgba(0,0,0,.75)}#enp-quiz .enp-quiz-styles__set-default{text-align:center;border:none;border-radius:3px;padding:.85em 1.4em .75em;font-size:15px;font-weight:400;letter-spacing:.05em;color:#fff;box-shadow:inset 0 -2px 0 rgba(0,0,0,.2);background:#bf5700;cursor:pointer;text-transform:uppercase;transition:all .2s;line-height:1.6;border:2px solid #bf5700;background:transparent;color:#bf5700;box-shadow:none;font-size:.75rem;position:absolute;left:10px;bottom:10px}#enp-quiz .enp-quiz-styles__set-default:focus,#enp-quiz .enp-quiz-styles__set-default:hover{color:#fff;box-shadow:none;background:#964400}#enp-quiz .enp-quiz-styles__set-default:active{color:#fff;box-shadow:inset 0 2px 0 rgba(0,0,0,.1);background:#1eeeff}#enp-quiz .enp-quiz-styles__set-default:focus{outline-color:#4d90fe;outline-offset:-2px;outline-style:auto;outline-width:5px}#enp-quiz .enp-quiz-styles__set-default:disabled,#enp-quiz .enp-quiz-styles__set-default:disabled:focus,#enp-quiz .enp-quiz-styles__set-default:disabled:hover{background:#bf5700;cursor:default;opacity:.5}#enp-quiz .enp-quiz-styles__set-default:focus,#enp-quiz .enp-quiz-styles__set-default:hover{background:transparent;border:2px solid #964400;color:#964400}#enp-quiz .enp-iris__close{border:none;background:none;box-shadow:none;padding:0;margin:0;position:absolute;top:5px;right:5px;fill:#888;cursor:pointer}#enp-quiz .enp-quiz-styles__input--color{padding-left:45px}#enp-quiz .enp-quiz-styles__color-demo{width:30px;height:30px;border:1px solid #ccc;top:8px;left:8px;border-radius:3px;position:absolute}#enp-quiz .enp-share-quiz__url{display:block;font-size:1.5rem;line-height:1.4;word-wrap:break-word}#enp-quiz .enp-share-quiz{list-style:none;margin-left:0;display:flex;justify-content:center;align-content:center;align-items:center}#enp-quiz .enp-share-quiz__item{margin-right:20px}#enp-quiz .enp-share-quiz__item:last-child{margin-right:0}#enp-quiz .enp-share-quiz__item__icon{width:2.4rem;height:2.4rem;border-radius:50%;fill:#fff;padding:.6rem;fill:#fff!important}#enp-quiz .enp-share-quiz__item__icon--facebook{background-color:#3a5795}#enp-quiz .enp-share-quiz__item__icon--twitter{background-color:#4099ff}#enp-quiz .enp-share-quiz{justify-content:space-around;margin-bottom:0}#enp-quiz .enp-ab-create__container{max-width:740px;margin:0 auto;width:100%;background:#fdfcfd;padding-top:3rem;padding-bottom:3rem}#enp-quiz .enp-ab-create__container:after{content:"";display:table;clear:both}@media (min-width:700px){#enp-quiz .enp-ab-create__container{max-width:1000px}}@media (min-width:1000px){#enp-quiz .enp-ab-create__container{max-width:1440px}}#enp-quiz .enp-ab-create__form{max-width:740px;margin:0 auto}#enp-quiz .enp-ab-create__form:after{content:"";display:table;clear:both}#enp-quiz .enp-ab-create__label{display:block;color:#343242;font-weight:400;font-size:.85rem;text-transform:uppercase;font-weight:500}#enp-quiz .enp-ab-create-title__textarea{font-size:1rem;font-family:Arial,monospace,helvetica,arial,sans-serif;padding:.8rem .5rem;background:#fff;border:1px solid #aaa;border-radius:3px;width:20rem;max-width:100%;margin-bottom:1.2rem;font-weight:700;font-size:1.6rem;margin-bottom:1rem;width:100%}@media (min-width:700px){#enp-quiz .enp-ab-create-title__textarea{padding:.8rem;width:100%}}#enp-quiz .enp-ab-create-title__textarea::-webkit-input-placeholder{font-weight:700}#enp-quiz .enp-ab-create-title__textarea:-ms-input-placeholder,#enp-quiz .enp-ab-create-title__textarea::-ms-input-placeholder{font-weight:700}#enp-quiz .enp-ab-create-title__textarea::placeholder{font-weight:700}#enp-quiz .enp-ab-create__select{width:100%;-webkit-appearance:none;-moz-appearance:none;appearance:none;font-size:.85rem;padding:.7rem 32px .7rem .8rem;border:1px solid #bbb;border-radius:3px;margin-bottom:1.6rem;background:url(../svg/chevron-down.svg) 100% 50% no-repeat;background-color:#fff;box-shadow:inset -26px 0 0 rgba(0,0,0,.1)}#enp-quiz .enp-ab-create__submit{width:100%;padding-top:1em;padding-bottom:1em}#headerimg h1{text-align:center;font-size:40px!important}#enp-quiz.enp-quiz__main{max-width:740px;margin:0 auto;display:grid;gap:1em;min-height:85vh}#enp-quiz.enp-quiz__main:after{content:"";display:table;clear:both}@media (min-width:1000px){#enp-quiz.enp-quiz__main{max-width:740px;margin:0 auto;grid-template-columns:1fr 4fr}#enp-quiz.enp-quiz__main:after{content:"";display:table;clear:both}}@media (min-width:1000px) and (min-width:700px){#enp-quiz.enp-quiz__main{max-width:1000px}}@media (min-width:1000px) and (min-width:1000px){#enp-quiz.enp-quiz__main{max-width:1440px}}#enp-quiz .enp-dash-container{padding:2rem;transition:all .25s cubic-bezier(0,0,.3,1)}#enp-quiz .enp-dash__section-aside{background-color:#faf9fb}@media (min-width:700px){#enp-quiz .enp-dash__section-aside{padding:2rem}}#enp-quiz .enp-breadcrumb-link__container{padding-bottom:2rem}#enp-quiz .enp-search-quizzes{display:flex;justify-content:space-between;flex-wrap:wrap;padding:1em}@media (min-width:700px){#enp-quiz .enp-search-quizzes{padding:.2rem 0;flex-wrap:nowrap}}@media (min-width:1000px){#enp-quiz .enp-search-quizzes{display:flex;justify-content:space-between;flex-direction:column}}#enp-quiz .enp-search-quizzes__form-item{margin-bottom:.6rem;flex:0 1 48%}@media (min-width:400px){#enp-quiz .enp-search-quizzes__form-item{margin-bottom:0;margin-right:1rem;flex:1 0 auto}}#enp-quiz .enp-quiz-search{flex:1 0 100%;position:relative}@media (min-width:700px){#enp-quiz .enp-quiz-search{flex:1 0 auto}}#enp-quiz .enp-search-quizzes__label{margin-bottom:0;clip:rect(1px,1px,1px,1px);position:absolute!important;left:-10000px;top:auto;width:1px;height:1px;overflow:hidden}#enp-quiz .enp-search-quizzes__select{padding:.3rem;border-radius:3px;width:100%}@media (min-width:1000px){#enp-quiz .enp-search-quizzes__select{min-width:200px;font-size:.85rem}}#enp-quiz .enp-quiz-search__input{width:100%;margin:0 0 .1rem;padding:.3rem .3rem .3rem 26px;font-size:.85rem}#enp-quiz .enp-quiz-search__icon{position:absolute;bottom:.3rem;left:.2rem;width:21px;height:21px}#enp-quiz .enp-search-quizzes__button{padding:.2rem .8rem}#enp-quiz .enp-search-results-description{font-size:.85rem}#enp-quiz .enp-search-results-description__link{white-space:nowrap}#enp-quiz .enp-search-results-description__icon{width:1.3em;height:1.3em;position:relative;top:4px;left:2px}#enp-quiz .enp-dash__section-title{font-size:1rem;text-transform:uppercase;margin-bottom:.325rem;border-bottom:1px solid #e8e4ed}@media (min-width:700px){#enp-quiz .enp-dash__section-title{padding:1em 0}}#enp-quiz .enp-dash__ab-test-helper--not-enough-quizzes{color:#b5a6c4}#enp-quiz .enp-view-toggle{cursor:pointer;opacity:.5;display:none}@media (min-width:700px){#enp-quiz .enp-view-toggle{display:flex}}#enp-quiz .enp-view-toggle__active{opacity:1}#enp-quiz .enp-sort-by{margin-left:5px}#enp-quiz .enp-dash-list{display:flex;flex-flow:column wrap;align-items:stretch;list-style:none;margin-left:0}#enp-quiz .enp-dash-item{flex-basis:100%;padding:1rem 1.2rem;background:#fff;border:1px solid #eee;border-bottom:1px solid #ddd;list-style:none;transition:all .35s cubic-bezier(0,0,.3,1);margin:0 0 .8rem;justify-content:space-between;display:flex;z-index:1;flex-direction:column;align-content:flex-end;justify-content:flex-end;border:none;border-radius:3px;background-color:#f5f3f7}#enp-quiz .enp-dash-item--published{box-shadow:inset 4px 0 0 #00a9b7,0 1px 0 rgba(0,0,0,.1)}#enp-quiz .enp-dash-item--draft{box-shadow:inset 4px 0 0 #94a6b3,0 1px 0 rgba(0,0,0,.1)}#enp-quiz .enp-dash-item--draft .enp-dash-item__title a{color:#333f48}#enp-quiz .enp-dash-item--remove{animation:e .5s cubic-bezier(0,0,.3,1) forwards}#enp-quiz .enp-dash-list--list-view .enp-dash-item{margin:0 0 .8rem;flex-basis:100%}#enp-quiz .enp-dash-item__spinner{display:flex;justify-content:center;align-content:center;align-items:center;position:absolute;top:0;bottom:0;left:0;right:0;background:hsla(0,59%,90%,.8);width:100%;animation:g .3s cubic-bezier(0,0,.3,1)}#enp-quiz .enp-dash-item__header{padding:.5rem 1rem;background:#faf9fb;border-bottom:1px solid #e8e4ed;display:flex;justify-content:space-between;align-items:center;border-radius:3px}#enp-quiz .enp-dash-item__title{font-size:1rem;padding-bottom:.5rem;padding:0;margin-bottom:0}#enp-quiz .enp-dash-item__title a{color:#00a9b7}#enp-quiz .enp-dash-item__content{padding:0 0 .375rem;position:relative;transition:all .2s cubic-bezier(0,0,.3,1)}#enp-quiz .enp-dash-item__meta{font-size:.7rem;font-weight:300;color:#565656;font-size:.75rem}#enp-quiz .enp-dash-item__username{word-wrap:break-word;padding-left:.4rem;margin-left:.2rem;border-left:1px solid #ddd}#enp-quiz .enp-dash-item__title--ab-test{padding-bottom:0}#enp-quiz .enp-dash-item__ab-quizzes{list-style:none;margin-left:0;font-size:.85rem;color:#e8e4ed;margin-bottom:.8rem}#enp-quiz .enp-dash-item__nav{list-style:none;margin-left:0;margin-bottom:0;font-size:.85rem}#enp-quiz .enp-dash-item__nav__item{display:flex;margin:0;width:100%;align-items:center}#enp-quiz .enp-dash-item__nav__item:hover{background-color:#f5f3f7}#enp-quiz .enp-dash-item__nav__item:hover .enp-dash-item__icon{fill:#bf5700}#enp-quiz .enp-dash-item__nav__item a{font-weight:400;color:#b5a6c4;display:flex;align-items:center;width:100%;padding:12px}#enp-quiz .enp-dash-item__nav__item a:focus,#enp-quiz .enp-dash-item__nav__item a:hover{color:#bf5700;outline:1px dotted #bf5700;outline-offset:1px}#enp-quiz .enp-dash-item__nav__item a:focus .enp-dash-item__icon,#enp-quiz .enp-dash-item__nav__item a:hover .enp-dash-item__icon{fill:#bf5700}#enp-quiz .enp-delete-quiz{width:100%}#enp-quiz .enp-delete-quiz:hover .enp-dash-item__delete{color:#bf5700}#enp-quiz .enp-delete-quiz:hover .enp-icon{fill:#bf5700}#enp-quiz .enp-dash-item__delete{border:none;background:none;box-shadow:none;padding:0;margin:0;display:flex;padding:12px;align-items:center;position:relative;line-height:1.6;color:#b5a6c4;cursor:pointer;width:100%}#enp-quiz .enp-dash-item__delete .enp-icon{fill:#b5a6c4}#enp-quiz .enp-dash-item__icon{fill:#b5a6c4;width:15px;height:15px;margin-right:10px}#enp-quiz .enp-dash-item__nav--collapsible{display:none;position:absolute;z-index:2;top:44px;right:-17px;width:195px;background-color:#fff;text-align:left;transform:translateZ(0);transition:all .2s cubic-bezier(0,0,.3,1)}#enp-quiz .enp-dash-item__nav--collapsible .enp-dash-item__nav__item{cursor:pointer}#enp-quiz .enp-dash-item__menu-action{height:24px;background:none;border:none;color:#444;padding:0;bottom:.2rem;right:1.5rem;top:1.5rem;cursor:pointer}#enp-quiz .enp-dash-item__menu-action-wrap{max-width:0;display:flex;flex-direction:column;align-items:flex-end}#enp-quiz .enp-dash-item__menu-action__icon{width:15px;height:15px;fill:#b5a6c4;transition:all .3s cubic-bezier(0,0,.3,1)}#enp-quiz .enp-dash-item--menu-active{transform:translate3d(0,-3px,0);z-index:2}#enp-quiz .enp-dash-item--menu-active .enp-dash-item__nav-wrap{position:relative}#enp-quiz .enp-dash-item--menu-active.enp-dash-item--published{box-shadow:inset 4px 0 0 #60aaad,0 2px 2px rgba(0,0,0,.2)}#enp-quiz .enp-dash-item--menu-active.enp-dash-item--draft{box-shadow:inset 4px 0 0 #b4d7d8,0 2px 2px rgba(0,0,0,.2)}#enp-quiz .enp-dash-item--menu-active .enp-dash-item__menu-action__icon--bottom{transform:rotateX(180deg)}#enp-quiz .enp-dash-item--menu-active .enp-dash-item__nav--collapsible{display:block;animation:b .25s cubic-bezier(0,0,.3,1) forwards;border-radius:3px;box-shadow:0 2px 2px rgba(0,0,0,.2)}#enp-quiz .enp-dash-item--menu-active .enp-dash-item__content{opacity:.4}#enp-quiz .enp-quiz-results{display:flex;justify-content:space-around;list-style:none;margin:.8rem 0 0;padding:0;text-align:center}#enp-quiz .enp-quiz-results__item{margin:0 2% 0 0;padding:0;color:#454545}@media (max-width:280px){#enp-quiz .enp-quiz-results__item{width:100%;padding:0;margin-bottom:.6rem}}#enp-quiz .enp-quiz-results__number{font-size:1.6rem;line-height:1;position:relative}#enp-quiz .enp-dash-item--draft .enp-quiz-results__number{opacity:.5}#enp-quiz .enp-quiz-results__number--average-score{color:#4e9497}#enp-quiz .enp-quiz-results__number--average-score:after{content:"%";font-size:.9rem;position:absolute;top:.3rem;right:-1rem}#enp-quiz .enp-quiz-results__label{text-transform:uppercase;font-size:.7rem;font-weight:300;color:#888}#enp-quiz .enp-dash-item--add-new__wrap{display:grid;gap:1em;grid-template-columns:1fr 1fr}#enp-quiz .enp-dash-list--quiz__container{display:grid;gap:1em}@media (min-width:1000px){#enp-quiz .enp-dash-list--quiz__container{grid-template-columns:1fr 1fr}}#enp-quiz .enp-dash-item--add-new{background:none;border:none;padding:0;position:relative}@media (min-width:1000px){#enp-quiz .enp-dash-item--add-new{padding-top:7rem}}#enp-quiz .enp-dash-link--add-new{text-align:center;border:none;border-radius:3px;padding:.85em 1.4em .75em;font-size:15px;font-weight:400;letter-spacing:.05em;color:#fff;box-shadow:inset 0 -2px 0 rgba(0,0,0,.2);background:#bf5700;cursor:pointer;text-transform:uppercase;line-height:1.6;border:1px dashed #b5a6c4;background:none;color:#545454;box-shadow:none;border:2px dashed #b5a6c4;color:#e8e4ed;transition:all .2s;justify-content:flex-start;color:#94a6b3;padding:1rem 1.2rem}#enp-quiz .enp-dash-link--add-new:focus,#enp-quiz .enp-dash-link--add-new:hover{color:#fff;box-shadow:none;background:#964400}#enp-quiz .enp-dash-link--add-new:active{color:#fff;box-shadow:inset 0 2px 0 rgba(0,0,0,.1);background:#1eeeff}#enp-quiz .enp-dash-link--add-new:focus{outline-color:#4d90fe;outline-offset:-2px;outline-style:auto;outline-width:5px}#enp-quiz .enp-dash-link--add-new:disabled,#enp-quiz .enp-dash-link--add-new:disabled:focus,#enp-quiz .enp-dash-link--add-new:disabled:hover{background:#bf5700;cursor:default;opacity:.5}#enp-quiz .enp-dash-link--add-new:focus,#enp-quiz .enp-dash-link--add-new:hover{border:1px dashed #69547e;background:hsla(0,0%,100%,.9);color:#b5a6c4;border:2px dashed #999}@media (min-width:700px){#enp-quiz .enp-dash-link--add-new{font-size:1rem;text-transform:uppercase;display:flex;justify-content:center;align-content:center;align-items:center;flex-direction:column;position:absolute;top:0;left:0;right:0;bottom:0}}#enp-quiz .enp-dash-link--add-new .enp-dash-link__icon{border-radius:50%;fill:#fff;width:1.2rem;height:1.2rem;margin-right:5px;background-color:#94a6b3}@media (min-width:700px){#enp-quiz .enp-dash-link--add-new .enp-dash-link__icon{width:2rem;height:2rem;margin:.8rem 0 .2rem}}#enp-quiz .enp-dash-link--add-new:hover{color:#333f48}#enp-quiz .enp-dash-link--add-new:hover .enp-dash-link__icon{fill:#fff;background:#333f48}#enp-quiz .enp-quiz-message--welcome p{color:#1d1c25}#enp-quiz .enp-paginate{list-style:none;margin-left:0;font-size:1rem}#enp-quiz .enp-paginate,#enp-quiz .enp-paginate__link{display:flex;justify-content:center;align-content:center;align-items:center}#enp-quiz .enp-paginate__link{margin:0 .2rem;padding:0 .4rem;border-radius:3px;font-weight:400}#enp-quiz .enp-paginate__link--current-page{border:2px solid #00a9b7}#enp-quiz .enp-paginate__item--first-page,#enp-quiz .enp-paginate__item--last-page{display:flex}#enp-quiz .enp-paginate__item--first-page:after,#enp-quiz .enp-paginate__item--last-page:before{content:"...";font-size:1rem;position:relative;bottom:.2rem;opacity:.6}#enp-quiz .enp-paginate__item--no-gap:after,#enp-quiz .enp-paginate__item--no-gap:before{content:""}#enp-quiz .enp-paginate__item--next-page{margin-left:.2rem}#enp-quiz .enp-paginate__item--previous-page{margin-right:.2rem}#enp-quiz .enp-quiz-breadcrumbs{grid-row:1}#enp-quiz .enp-quiz-breadcrumbs__list{display:flex;list-style:none;margin-left:0;margin-bottom:0}#enp-quiz .enp-quiz-breadcrumbs__item{margin-right:10px;display:flex;justify-content:center;align-content:center;align-items:center;fill:#bf5700;margin-right:5px}#enp-quiz .enp-quiz-breadcrumbs__item:last-of-type{margin-right:0}@media (min-width:400px){#enp-quiz .enp-quiz-breadcrumbs__item{margin-right:10px}}#enp-quiz .enp-quiz-breadcrumbs__link--disabled{opacity:.65;cursor:default}#enp-quiz .enp-quiz-breadcrumbs__link--active{text-align:center;border:none;border-radius:3px;padding:.85em 1.4em .75em;font-size:15px;font-weight:400;letter-spacing:.05em;color:#fff;box-shadow:inset 0 -2px 0 rgba(0,0,0,.2);background:#bf5700;cursor:pointer;text-transform:uppercase;transition:all .2s;line-height:1.6;border:2px solid #bf5700;background:transparent;color:#bf5700;box-shadow:none;padding:.4em 1em}#enp-quiz .enp-quiz-breadcrumbs__link--active:focus,#enp-quiz .enp-quiz-breadcrumbs__link--active:hover{color:#fff;box-shadow:none;background:#964400}#enp-quiz .enp-quiz-breadcrumbs__link--active:active{color:#fff;box-shadow:inset 0 2px 0 rgba(0,0,0,.1);background:#1eeeff}#enp-quiz .enp-quiz-breadcrumbs__link--active:focus{outline-color:#4d90fe;outline-offset:-2px;outline-style:auto;outline-width:5px}#enp-quiz .enp-quiz-breadcrumbs__link--active:disabled,#enp-quiz .enp-quiz-breadcrumbs__link--active:disabled:focus,#enp-quiz .enp-quiz-breadcrumbs__link--active:disabled:hover{background:#bf5700;cursor:default;opacity:.5}#enp-quiz .enp-quiz-breadcrumbs__link--active:focus,#enp-quiz .enp-quiz-breadcrumbs__link--active:hover{background:transparent;border:2px solid #964400;color:#964400}#enp-quiz .enp-quiz-breadcrumbs__link{font-size:1rem;font-weight:400;text-transform:none;letter-spacing:0}#enp-quiz .enp-quiz-breadcrumbs--fixed{top:0;position:fixed;animation:h .25s}#enp-quiz .enp-results-title{font-size:1.6rem;text-align:center;padding:3.2rem 20px 2.6rem;background:#fdfcfd;margin:-1.2rem 0 2rem;border-bottom:1px solid #ddd}#enp-quiz .enp-results-title:after{font-size:1rem;text-transform:uppercase;display:block;content:"RESULTS";font-weight:400}#enp-quiz .enp-results__container{max-width:740px;margin:0 auto;display:block}#enp-quiz .enp-results__container:after{content:"";display:table;clear:both}@media (min-width:700px){#enp-quiz .enp-results__container{max-width:1000px}}@media (min-width:1000px){#enp-quiz .enp-results__container{max-width:1440px;display:flex;justify-content:space-between}}#enp-quiz .enp-quiz-scores__container,#enp-quiz .enp-results-flow__container{width:100%}@media (min-width:1000px){#enp-quiz .enp-quiz-scores__container,#enp-quiz .enp-results-flow__container{width:48%}}#enp-quiz .enp-quiz-scores{margin-top:2.6rem}#enp-quiz .enp-quiz-score__line-chart{height:300px;margin-bottom:1rem}#enp-quiz .enp-quiz-score__line-chart .ct-label{color:#1d1c25}#enp-quiz .enp-quiz-score__line-chart .ct-grid{stroke:#dadada;stroke-dasharray:0}#enp-quiz .enp-quiz-score__line-chart .ct-line{stroke:#60aaad;stroke-width:2px}#enp-quiz .enp-quiz-score__line-chart .ct-point{stroke:#60aaad;stroke-width:8px}#enp-quiz .enp-quiz-scores-table{width:100%;max-width:500px;margin:0 auto}#enp-quiz .enp-quiz-scores-table tr th{background-color:#fff}#enp-quiz .enp-quiz-scores-table__label{padding-left:5%}#enp-quiz .enp-quiz-scores-table__score{text-align:right;padding-right:5%}#enp-quiz .enp-results-flow{position:relative;margin:2rem auto;width:320px;height:320px;border-radius:50%}@media (min-width:400px){#enp-quiz .enp-results-flow{width:390px;height:390px}}@media (min-width:700px){#enp-quiz .enp-results-flow{width:450px;height:450px}}@media (min-width:1000px){#enp-quiz .enp-results-flow{width:400px;height:400px}}#enp-quiz .enp-results-flow__section-title{clip:rect(1px,1px,1px,1px);position:absolute!important;left:-10000px;top:auto;width:1px;height:1px;overflow:hidden}#enp-quiz .enp-results-flow__item{border-radius:50%;text-align:center;height:100%;width:100%;margin:0 auto;left:0;right:0;padding:12.5% 0 0;letter-spacing:.05rem;border:2px solid #60aaad;animation:.85s a cubic-bezier(0,0,.3,1) forwards}#enp-quiz .enp-results-flow__item--total-views{background:#fff}#enp-quiz .enp-results-flow__item--quiz-starts{width:65%;height:65%;position:absolute;padding-top:8%;bottom:2.5%;background:#fff}#enp-quiz .enp-results-flow__item--quiz-finishes{width:35%;height:35%;position:absolute;bottom:5%;background:#d6e9ea}#enp-quiz .enp-results-flow__title{font-size:1rem;text-transform:uppercase;color:#444;font-size:.7rem;margin-bottom:0}@media (min-width:700px){#enp-quiz .enp-results-flow__title{font-weight:700;margin-bottom:2px}}#enp-quiz .enp-results-flow__number{font-weight:700;font-size:1.4rem;line-height:1.2}#enp-quiz .enp-results-flow__number--total-views{font-size:2rem}#enp-quiz .enp-results-flow__number--quiz-starts{font-size:1.65rem}#enp-quiz .enp-results-flow__percentage{font-size:.8rem;font-weight:400;position:relative;display:inline-block;top:-.7em;left:-.1rem;color:#444}#enp-quiz .enp-results-flow__percentage:after{content:"%";position:absolute;right:-.75rem;font-size:.7rem;color:#444}#enp-quiz .enp-results-questions__section{padding-top:5rem;padding-bottom:3rem;margin-top:5rem;margin-bottom:3rem}@media (min-width:700px){#enp-quiz .enp-results-questions__section{margin-right:2rem;margin-left:2rem}}#enp-quiz .enp-results-questions__header{align-items:flex-start;flex-direction:column}@media (min-width:400px){#enp-quiz .enp-results-questions__header{display:flex;justify-content:space-between;flex-direction:row;align-items:flex-end}}#enp-quiz .enp-results-questions__key,#enp-quiz .enp-results-questions__title{font-size:1rem;text-transform:uppercase}#enp-quiz .enp-results-questions{list-style:none;margin-left:0}#enp-quiz .enp-results-question{width:100%;font-size:1rem;padding:0;margin-bottom:1rem}#enp-quiz .enp-results-question__header{padding:1rem 1.2rem;position:relative}#enp-quiz .enp-results-question__question,#enp-quiz .enp-results-question__stats{font-size:1rem;line-height:1.4}#enp-quiz .enp-results-question__question{font-weight:400}@media (min-width:400px){#enp-quiz .enp-results-question__question{padding-right:7em;margin-bottom:0}}#enp-quiz .enp-results-question__stats{font-size:.9rem}@media (min-width:400px){#enp-quiz .enp-results-question__stats{position:absolute;bottom:1rem;right:1.2rem;text-align:right}}#enp-quiz .enp-results-question__stats,#enp-quiz .enp-results-questions__key{font-weight:300}#enp-quiz .enp-results-question__content{padding:2rem 1.2rem 1.2rem;border-radius:3px}#enp-quiz .enp-results-question__deep-stats{display:flex;justify-content:space-around;list-style:none;margin-left:0;text-align:center}#enp-quiz .enp-results-question__deep-stat__number{font-size:1.8rem;line-height:1;position:relative}#enp-quiz .enp-results-question__deep-stat__number--correct,#enp-quiz .enp-results-question__deep-stat__number--finishes{color:#4e9497}#enp-quiz .enp-results-question__deep-stat__number--incorrect{color:#c1893e}#enp-quiz .enp-results-question__deep-stat__number--correct:after,#enp-quiz .enp-results-question__deep-stat__number--finishes:after,#enp-quiz .enp-results-question__deep-stat__number--incorrect:after{content:"%";font-size:.9rem;position:absolute;top:.3rem;right:-1rem}#enp-quiz .enp-results-question__deep-stat__label{font-size:1rem;text-transform:uppercase;font-size:.8rem}#enp-quiz .enp-results-question__options{list-style:none;margin-left:0;margin-bottom:0}#enp-quiz .enp-results-question__option{padding:.8rem .8rem .8rem .4rem;border-top:1px solid #ddd}@media (min-width:400px){#enp-quiz .enp-results-question__option{display:flex;justify-content:space-between;flex-direction:row}}#enp-quiz .enp-results-question__option:first-of-type{margin-top:1.4rem}#enp-quiz .enp-results-question__option--correct{background:#fff}#enp-quiz .enp-results-question__option__text{flex-grow:100;margin-right:1rem}#enp-quiz .enp-results-question__option__text__helper{font-weight:300;font-size:1rem;text-transform:uppercase;margin-right:.4rem}@media (min-width:400px){#enp-quiz .enp-results-question__option__icon{margin-right:.3rem;min-width:1.6rem}}#enp-quiz .enp-results-question__option__icon--incorrect{fill:#c1893e;opacity:.5}#enp-quiz .enp-results-question__option__icon--correct{fill:#4e9497;opacity:1}#enp-quiz .enp-results-question__option__percentage--incorrect{color:#c1893e}#enp-quiz .enp-results-question__option__percentage--correct{color:#4e9497}#enp-quiz .enp-results-question__option__number-selected{font-weight:300}#enp-quiz .enp-slider-responses__title{font-size:1rem;text-transform:uppercase;font-weight:400;margin-top:1.6rem}#enp-quiz .enp-slider-responses__line-chart .ct-point{stroke-width:8px}#enp-quiz .enp-slider-responses__line-chart--high,#enp-quiz .enp-slider-responses__line-chart--low{stroke:#bf5700}#enp-quiz .enp-slider-responses__line-chart--correct{stroke:#60aaad}#enp-quiz .enp-slider-responses-table{width:100%}#enp-quiz .enp-slider-responses-table tr.enp-slider-responses-table__response--correct td,#enp-quiz .enp-slider-responses-table tr:nth-child(2n) td{background-color:#fff}#enp-quiz .enp-slider-responses-table__content{box-shadow:none;padding-top:1rem}#enp-quiz .enp-slider-responses-table--hide-zero .enp-slider-responses-table__frequency--zero{display:none}#enp-quiz .enp-slider-responses-table__response-frequency{display:flex;justify-content:space-between;align-items:center}#enp-quiz .enp-slider-responses-table__toggle-zero-frequency{background:#fff;width:100%;box-shadow:inset 1px 1px 0 #ccc,inset -1px -1px 0 #ccc;color:#1d1c25;font-family:Arial,monospace,helvetica,arial,sans-serif;font-size:.9rem;font-weight:400;line-height:1.5;text-transform:none;letter-spacing:0;text-align:left;border:none;border-radius:3px;min-height:3.065rem;padding:1rem 2rem 1rem 1rem;margin:1.6rem 0 0;position:relative;z-index:9;cursor:pointer;transition:all .2s cubic-bezier(0,0,.3,1);width:auto;padding:0 .6rem;margin:0}.enp-quiz-results #enp-quiz .enp-aside{border:none}.enp-quiz-results .enp-results-questions__title__quiz-title{clip:rect(1px,1px,1px,1px);position:absolute!important;left:-10000px;top:auto;width:1px;height:1px;overflow:hidden}#enp-quiz .enp-results--ab{display:block;margin-bottom:3rem}@media (min-width:1000px){#enp-quiz .enp-results--ab{display:flex;flex-wrap:wrap;align-content:flex-end;width:50%;padding:10px}}@media (min-width:1000px){#enp-quiz .enp-results--a{padding-right:1rem;border-right:1px solid #ddd}}@media (min-width:1000px){#enp-quiz .enp-results--b{padding-left:1rem}}#enp-quiz .enp-results-title--ab,#enp-quiz .enp-results__container--ab .enp-results-flow__container{min-width:100%}#enp-quiz .enp-results--loser .enp-results-flow__item{border:2px solid #bf5700}#enp-quiz .enp-results--loser .enp-results-flow__item--quiz-starts{background:#ffc696}#enp-quiz .enp-results--loser .enp-results-flow__item--quiz-finishes{background:#ffb06d}#enp-quiz .enp-results--loser .enp-results-questions__title,#enp-quiz .enp-results--loser th{color:#964400}#enp-quiz .enp-results--winner .enp-results-questions__title,#enp-quiz .enp-results--winner th{color:#4e9497}#enp-quiz .enp-results-title--a,#enp-quiz .enp-results-title--b{background:transparent}#enp-quiz .enp-ab-scores{max-width:740px;margin:0 auto}#enp-quiz .enp-ab-scores:after{content:"";display:table;clear:both}@media (min-width:700px){#enp-quiz .enp-ab-scores{max-width:1000px}}@media (min-width:1000px){#enp-quiz .enp-ab-scores{max-width:1440px}}#enp-quiz .enp-ab-scores th.enp-quiz-scores-table__label,#enp-quiz .enp-ab-scores th.enp-quiz-scores-table__score{padding-left:0;padding-right:0}#enp-quiz .enp-ab-scores__title{padding-left:50px;font-size:1rem;text-transform:uppercase}#enp-quiz .enp-quiz-score__line-chart .enp-test-loser .ct-line,#enp-quiz .enp-quiz-score__line-chart .enp-test-loser .ct-point{stroke:#bf5700}#enp-quiz .enp-quiz-scores{margin-top:0}#enp-quiz .enp-ab-scores .enp-quiz-scores-table,#enp-quiz .enp-question-results{margin-bottom:1.6rem}@media (min-width:1000px){#enp-quiz .enp-ab-scores .enp-quiz-scores-table,#enp-quiz .enp-question-results{float:left;width:48%;margin:0}#enp-quiz .enp-ab-scores .enp-quiz-scores-table:first-of-type,#enp-quiz .enp-question-results:first-of-type{margin-right:4%}}#enp-quiz .enp-question-results__container{max-width:740px;margin:0 auto}#enp-quiz .enp-question-results__container:after{content:"";display:table;clear:both}@media (min-width:700px){#enp-quiz .enp-question-results__container{max-width:1000px}}@media (min-width:1000px){#enp-quiz .enp-question-results__container{max-width:1440px}}#enp-quiz .enp-question-results--ab .enp-results-questions__section{background:#fff;border:none;padding:1.6rem 0;margin:1.6rem auto}#enp-quiz .enp-question-results--ab .enp-results-questions__container{padding:0}#enp-quiz .enp-ab-new-embed-code__section{max-width:740px;margin:0 auto;max-width:540px;padding-bottom:2rem;margin-bottom:2rem}#enp-quiz .enp-ab-new-embed-code__section:after{content:"";display:table;clear:both}#enp-quiz .enp-ab-new-embed-code__section .enp-ab-embed-code{padding:0;margin:0}#enp-quiz .enp-ab-embed-code__section{background:#faf9fb;border-bottom:1px solid #ddd;border-top:1px solid #ddd;padding-top:3rem;padding-bottom:3rem;margin-top:3rem;margin-bottom:3rem;padding-top:5rem;margin-top:5rem}#enp-quiz .enp-ab-embed-code{max-width:740px;margin:0 auto}#enp-quiz .enp-ab-embed-code:after{content:"";display:table;clear:both}#enp-quiz .enp-ab-embed-code__title{font-size:1rem;text-transform:uppercase}#enp-quiz .enp-embed-code__textarea{margin-bottom:0}#enp-quiz .enp-embed-code__instructions{font-size:1.1rem}#enp-quiz .enp-slider{margin-bottom:1.6rem}#enp-quiz .enp-slider-input__container{display:flex;align-items:center;justify-content:center;margin:1.6rem auto;position:relative}#enp-quiz .enp-slider-input__label{display:block;color:#343242;font-weight:400;font-size:.85rem;text-transform:uppercase}#enp-quiz .enp-slider-input__prefix,#enp-quiz .enp-slider-input__suffix{font-size:1rem}#enp-quiz .enp-slider-input__prefix{margin-right:.2rem;white-space:pre}#enp-quiz .enp-slider-input__suffix{margin-left:.2rem;white-space:pre}#enp-quiz .enp-slider-input__input{font-size:1rem;font-family:Arial,monospace,helvetica,arial,sans-serif;padding:.8rem .5rem;background:#fff;border:1px solid #aaa;border-radius:3px;width:20rem;max-width:100%;margin-bottom:1.2rem;margin-bottom:0;padding:.75rem;width:auto;transition:all .25s cubic-bezier(0,0,.3,1)}@media (min-width:700px){#enp-quiz .enp-slider-input__input{padding:.8rem;width:100%}}#enp-quiz .enp-slider-input__input--incorrect{color:#bf5700}#enp-quiz .enp-slider-input__input--correct{color:#4e9497}#enp-quiz .enp-slider-input__input--invalid-animation{box-shadow:0 0 2px 1px #c1893e}#enp-quiz .enp-slider_input__range-helper{position:absolute;bottom:-1.2rem;font-size:.8rem}#enp-quiz .enp-slider_input__range-helper--low{left:0}#enp-quiz .enp-slider_input__range-helper--high{right:0}#enp-quiz .enp-slider-input__range-helper__number{position:relative;color:#e8e4ed}#enp-quiz .ui-slider-range-show-correct__tooltip-container{position:relative}#enp-quiz .ui-slider-range-show-correct__tooltip{position:absolute;top:-.4rem;margin-left:-.55rem;height:1rem;width:1.1rem;height:1.1rem;border:2px solid #60aaad;background-color:#fff;border-radius:50%;z-index:9999}#enp-quiz .ui-slider-range-show-correct__tooltip--low{left:0}#enp-quiz .ui-slider-range-show-correct__tooltip--high{right:-.55rem}#enp-quiz .ui-slider-range-show-correct__tooltip__text{position:relative;color:#417d7f;top:-1.35rem;font-size:.825rem;min-width:100%;display:inline-block;text-align:center;text-shadow:0 1px 0 #fff}#enp-quiz .enp-slider{position:relative;text-align:left;background:#ddd}#enp-quiz .enp-slider .ui-helper-hidden{display:none}#enp-quiz .enp-slider .ui-helper-hidden-accessible{border:0;clip:rect(0 0 0 0);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px}#enp-quiz .enp-slider .ui-helper-reset{margin:0;padding:0;border:0;outline:0;line-height:1.3;text-decoration:none;font-size:100%;list-style:none}#enp-quiz .enp-slider .ui-helper-clearfix:after,#enp-quiz .enp-slider .ui-helper-clearfix:before{content:"";display:table;border-collapse:collapse}#enp-quiz .enp-slider .ui-helper-clearfix:after{clear:both}#enp-quiz .enp-slider .ui-helper-clearfix{min-height:0}#enp-quiz .enp-slider .ui-helper-zfix{width:100%;height:100%;top:0;left:0;position:absolute;opacity:0;filter:alpha(opacity=0)}#enp-quiz .enp-slider .ui-front{z-index:100}#enp-quiz .enp-slider .ui-state-disabled{cursor:default!important}#enp-quiz .enp-slider .ui-icon{display:block;text-indent:-99999px;overflow:hidden;background-repeat:no-repeat}#enp-quiz .enp-slider .ui-widget-overlay{position:fixed;top:0;left:0;width:100%;height:100%}#enp-quiz .enp-slider .ui-slider-handle{background:#fff;border-radius:50%;border:1px solid #aaa;position:absolute;z-index:2;width:1.2rem;height:1.2rem;top:-.4rem;margin-left:-.6rem;cursor:default;touch-action:none;transition:opacity .2s cubic-bezier(0,0,.3,1),height .18s cubic-bezier(0,0,.3,1),width .18s cubic-bezier(0,0,.3,1),transform .18s cubic-bezier(0,0,.3,1)}#enp-quiz .enp-slider .ui-slider-handle:focus{outline:none;box-shadow:0 0 3px 1px #4d90fe}#enp-quiz .enp-slider .ui-slider-handle--correct,#enp-quiz .enp-slider .ui-slider-handle--incorrect{width:1.1rem;height:1.1rem;top:-.4rem;margin-left:-.55rem}#enp-quiz .enp-slider .ui-slider-handle--incorrect{z-index:1;border:2px solid #bf5700}#enp-quiz .enp-slider .ui-slider-handle--correct{border:2px solid #60aaad;z-index:99999}#enp-quiz .enp-slider .ui-slider-range{position:absolute;z-index:1;font-size:.7rem;display:block;border:0;background-position:0 0;top:0;height:100%}#enp-quiz .enp-slider .ui-slider-range-show-correct{background:#60aaad;z-index:9}#enp-quiz .enp-slider .ui-slider-range-min{left:0;background:#00a9b7}#enp-quiz .enp-slider .ui-slider-range-max{right:0}#enp-quiz .enp-slider.ui-state-disabled .ui-slider-handle,#enp-quiz .enp-slider.ui-state-disabled .ui-slider-range{filter:inherit}#enp-quiz .ui-slider-horizontal{height:.3rem}#enp-quiz .enp-question__answered .enp-slider{background:#bbb}#enp-quiz .enp-question__answered .ui-slider-range-min{background:#fff} +html{font-size:16px!important}html #enp-quiz{box-sizing:border-box}body #enp-quiz{background:#fff;overflow:hidden}#enp-quiz *,#enp-quiz :after,#enp-quiz :before{box-sizing:inherit}#enp-quiz ol,#enp-quiz ul{margin:0 0 1.6rem 1.25rem;padding:0}#enp-quiz textarea{margin-bottom:1rem}#enp-quiz button,#enp-quiz button:active,#enp-quiz button:focus,#enp-quiz button:hover,#enp-quiz iframe,#enp-quiz input[type=button],#enp-quiz input[type=button]:active,#enp-quiz input[type=button]:focus,#enp-quiz input[type=button]:hover,#enp-quiz input[type=reset],#enp-quiz input[type=reset]:active,#enp-quiz input[type=reset]:focus,#enp-quiz input[type=reset]:hover,#enp-quiz input[type=submit],#enp-quiz input[type=submit]:active,#enp-quiz input[type=submit]:focus,#enp-quiz input[type=submit]:hover{border:none}#enp-quiz .enp-screen-reader-text{clip:rect(1px,1px,1px,1px);position:absolute!important;left:-10000px;top:auto;width:1px;height:1px;overflow:hidden}#enp-quiz .enp-screen-reader-text:active,#enp-quiz .enp-screen-reader-text:focus,#enp-quiz .enp-screen-reader-text:hover{background-color:#f1f1f1;border-radius:3px;box-shadow:0 0 2px 2px rgba(0,0,0,.6);clip:auto!important;color:#21759b;display:block;font-size:14px;font-weight:700;height:auto;left:5px;line-height:normal;padding:15px 23px 14px;text-decoration:none;top:5px;width:auto;z-index:100000}#enp-quiz .enp-accordion-header{background:#fff;width:100%;box-shadow:inset 1px 1px 0 #ccc,inset -1px -1px 0 #ccc;color:#1d1c25;font-family:Arial,monospace,helvetica,arial,sans-serif;font-size:.9rem;font-weight:400;line-height:1.5;text-transform:none;letter-spacing:0;text-align:left;border:none;border-radius:3px;min-height:3.065rem;padding:1rem 2rem 1rem 1rem;margin:1.6rem 0 0;position:relative;z-index:9;cursor:pointer;transition:all .2s cubic-bezier(0,0,.3,1)}#enp-quiz .enp-accordion-header:first-of-type{margin-top:0}#enp-quiz .enp-accordion-header .enp-accordion-header__icon{position:absolute;fill:#e8e4ed;right:.75rem;bottom:.75rem;transition:all .35s cubic-bezier(0,0,.3,1)}#enp-quiz .enp-accordion-header--open .enp-accordion-header__icon{transform:rotateX(180deg)}#enp-quiz .enp-quiz-settings__form .enp-accordion-header{position:relative;overflow-y:hidden}#enp-quiz .enp-accordion-content{background:#fff;width:100%;box-shadow:inset 1px -1px 0 #ccc,inset -1px -1px 0 #ccc;display:block;position:relative;height:auto;overflow:visible;margin-bottom:1.6rem}#enp-quiz .enp-accordion-content--closed{margin-top:0;padding-top:0;animation:d .25s cubic-bezier(0,0,.3,1) forwards;display:none}#enp-quiz .enp-accordion-content--open{padding-top:1.6rem;margin-bottom:2rem;animation:b .45s cubic-bezier(0,0,.3,1) forwards}#enp-quiz .enp-quiz-message{max-width:740px;margin:0 auto;background:#fff;border:1px solid #eee;border-bottom:1px solid #ccc;padding:1rem;margin-bottom:1.6rem;position:fixed;bottom:0;left:0}#enp-quiz .enp-quiz-message:after{content:"";display:table;clear:both}#enp-quiz .enp-quiz-message__title{font-size:1rem;text-transform:uppercase}#enp-quiz .enp-message__list{list-style:none;margin-left:0;font-size:1.1rem;margin-bottom:0}#enp-quiz .enp-quiz-message--error{border-left:6px solid #bf5700;color:#bf5700}#enp-quiz .enp-quiz-message__title--error{color:#964400}#enp-quiz .enp-quiz-message--success{border-left:6px solid #60aaad;color:#4e9497}#enp-quiz .enp-quiz-message__title--success{color:#4e9497}#enp-quiz .enp-quiz-message--note{border-left:6px solid #cca562}#enp-quiz .enp-quiz-message__title--note{color:#333f48}#enp-quiz .enp-quiz-message__close{border:none;background:none;box-shadow:none;padding:0;margin:0;position:absolute;top:5px;right:5px}#enp-quiz .enp-quiz-message--ajax{margin-bottom:.6rem;animation:a .3s}#enp-quiz .enp-quiz-message-ajax-container{z-index:9999;position:fixed;bottom:10px}#enp-quiz .enp-quiz-message--saving__spinner{margin-left:-10px}#enp-quiz .enp-quiz-message--saving__text{font-size:1rem}#enp-quiz input.limited-chars,#enp-quiz textarea.limited-chars{margin-bottom:.2rem}#enp-quiz .limited-chars__container{color:#fdfcfd;font-size:.8rem;display:block;text-align:right;margin-bottom:1.2rem}#enp-quiz .limited-chars__counter{color:#e8e4ed}#enp-quiz .limited-chars__container--error,#enp-quiz .limited-chars__container--error .limited-chars__counter{color:#964400}#enp-quiz input.has-error,#enp-quiz textarea.has-error{border:1px solid #bf5700}#enp-quiz input.has-error:focus,#enp-quiz textarea.has-error:focus{outline-color:#bf5700}#enp-quiz .enp-tooltip{position:relative}#enp-quiz .enp-tooltip__activator:focus+.enp-tooltip__description,#enp-quiz .enp-tooltip__activator:focus>.enp-tooltip__description{display:block}#enp-quiz .enp-tooltip__description{display:none;position:absolute;left:103%;margin-bottom:2rem;border-radius:3px;background:#faf9fb;font-size:.9rem;padding:.9rem;max-width:200px}.enp-sticky{position:relative;left:0;right:0;top:0;z-index:999}.enp-sticky.enp-sticky--fixed{position:fixed}.enp-breadcrumb-link{font-size:.85rem}.enp-breadcrumb-link__icon{position:relative;top:.45rem;left:.4rem}body #enp-quiz{color:#1d1c25;font-family:Arial,monospace,helvetica,arial,sans-serif;font-size:1em;line-height:1.6;font-weight:400}@media (min-width:700px){body #enp-quiz{font-size:1.3em}}#enp-quiz h1,#enp-quiz h2,#enp-quiz h3,#enp-quiz h4,#enp-quiz h5,#enp-quiz h6{font-family:Arial,monospace,helvetica,arial,sans-serif;color:#5d5e5f;clear:both;margin:0 0 .2rem;font-weight:700;line-height:1.2em}#enp-quiz h1{font-size:2em}#enp-quiz h2{font-size:1.75em}#enp-quiz h3{font-size:1.475em}#enp-quiz h4{font-size:1.3em}#enp-quiz h5{font-size:1.125em}#enp-quiz h6{font-size:1em}#enp-quiz p+h1,#enp-quiz p+h2,#enp-quiz p+h3,#enp-quiz p+h4,#enp-quiz p+h5,#enp-quiz p+h6,#enp-quiz ul+h1,#enp-quiz ul+h2,#enp-quiz ul+h3,#enp-quiz ul+h4,#enp-quiz ul+h5,#enp-quiz ul+h6{margin-top:1.8em}#enp-quiz p{font-size:.85em;margin-bottom:1.125em;font-weight:300}#enp-quiz ol,#enp-quiz ul{margin:0 0 1.6em 1.25em}#enp-quiz ul{list-style:disc}#enp-quiz ol{list-style:decimal}#enp-quiz li>ol,#enp-quiz li>ul{margin-bottom:0;margin-left:1.6em}#enp-quiz b,#enp-quiz strong{font-weight:700}#enp-quiz cite,#enp-quiz dfn,#enp-quiz em{font-family:georgia,times,serif;font-style:italic}#enp-quiz pre{background:#eee;font-family:Courier\ 10 Pitch,Courier,monospace;font-size:.95em;line-height:1.6;margin-bottom:1.6em;padding:1.6em;overflow:auto;max-width:100%;overflow:scroll;max-width:68vw;overflow-wrap:break-word}#enp-quiz .code,#enp-quiz code,#enp-quiz kbd,#enp-quiz tt,#enp-quiz var{font:.7em Monaco,Consolas,Andale Mono,DejaVu Sans Mono,monospace}#enp-quiz table{border:none}#enp-quiz table th{font-size:.8rem;text-transform:uppercase;border:none;border-bottom:1px solid #ddd}#enp-quiz table td,#enp-quiz table th{font-family:Arial,monospace,helvetica,arial,sans-serif}#enp-quiz table td{font-size:1rem;border:none;border-bottom:1px solid #eee}#enp-quiz table tr:nth-child(2n) td{background:#fdfcfd}#enp-quiz table tr:last-child td{border-bottom:none}#enp-quiz figure{margin:0}#enp-quiz img{height:auto;max-width:100%}#enp-quiz a{color:#bf5700;text-decoration:none;transition:color .2s;touch-action:manipulation}#enp-quiz a .enp-icon{fill:#bf5700}#enp-quiz a:active,#enp-quiz a:focus,#enp-quiz a:hover{color:#964400}#enp-quiz a:active .enp-icon,#enp-quiz a:focus .enp-icon,#enp-quiz a:hover .enp-icon{fill:#964400}#enp-quiz button:focus{outline-color:#4d90fe;outline-offset:-2px;outline-style:auto;outline-width:5px}#enp-quiz .enp-btn{text-align:center;border:none;border-radius:3px;padding:.85em 1.4em .75em;font-size:15px;font-weight:400;letter-spacing:.05em;color:#fff;box-shadow:inset 0 -2px 0 rgba(0,0,0,.2);background:#bf5700;cursor:pointer;text-transform:uppercase;transition:all .2s;line-height:1.6}#enp-quiz .enp-btn:focus,#enp-quiz .enp-btn:hover{color:#fff;box-shadow:none;background:#964400}#enp-quiz .enp-btn:active{color:#fff;box-shadow:inset 0 2px 0 rgba(0,0,0,.1);background:#1eeeff}#enp-quiz .enp-btn:focus{outline-color:#4d90fe;outline-offset:-2px;outline-style:auto;outline-width:5px}#enp-quiz .enp-btn:disabled,#enp-quiz .enp-btn:disabled:focus,#enp-quiz .enp-btn:disabled:hover{background:#bf5700;cursor:default;opacity:.5}#enp-quiz .enp-btn--add{text-align:center;border:none;border-radius:3px;padding:.85em 1.4em .75em;font-size:15px;font-weight:400;letter-spacing:.05em;color:#fff;box-shadow:inset 0 -2px 0 rgba(0,0,0,.2);background:#bf5700;cursor:pointer;text-transform:uppercase;transition:all .2s;line-height:1.6;border:1px dashed #a897ba;background:none;color:#545454;box-shadow:none;width:100%}#enp-quiz .enp-btn--add:focus,#enp-quiz .enp-btn--add:hover{color:#fff;box-shadow:none;background:#964400}#enp-quiz .enp-btn--add:active{color:#fff;box-shadow:inset 0 2px 0 rgba(0,0,0,.1);background:#1eeeff}#enp-quiz .enp-btn--add:focus{outline-color:#4d90fe;outline-offset:-2px;outline-style:auto;outline-width:5px}#enp-quiz .enp-btn--add:disabled,#enp-quiz .enp-btn--add:disabled:focus,#enp-quiz .enp-btn--add:disabled:hover{background:#bf5700;cursor:default;opacity:.5}#enp-quiz .enp-btn--add:focus,#enp-quiz .enp-btn--add:hover{border:1px dashed #69547e;color:#a897ba;background:hsla(0,0%,100%,.9)}#enp-quiz .enp-btn--disabled{opacity:.65;cursor:default}#enp-quiz .enp-btn--enabled{animation:f .6s}#enp-quiz .enp-icon{width:24px;height:24px;transition:all .2s}#enp-quiz .enp-page-title{font-size:1.6rem}@keyframes a{0%{opacity:0;transform:translate3d(0,100px,0)}to{opacity:1;transform:translateZ(0)}}@keyframes b{0%{opacity:0;height:auto;transform:translate3d(0,-20px,0)}to{opacity:1;height:auto;transform:translateZ(0)}}@keyframes c{0%{opacity:0;height:auto;transform:translate3d(0,-20px,0)}to{opacity:.8;height:auto;transform:translateZ(0)}}@keyframes d{0%{overflow:hidden;height:100px;opacity:1;transform:translateZ(0)}to{height:0;opacity:0;transform:translate3d(0,-20px,0)}}@keyframes e{0%{opacity:1;transform:translateZ(0)}to{padding:0;margin:0;opacity:0;height:0;z-index:-1;transform:translate3d(-200px,0,0)}}@keyframes f{0%{opacity:.8;transform:scaleX(1);box-shadow:0 0 0 rgba(0,0,0,.3)}40%{opacity:1}70%{opacity:1;transform:scale3d(1.1,1.1,1);box-shadow:0 0 8px rgba(0,0,0,.4)}to{opacity:1;transform:scaleX(1);box-shadow:0 0 0 rgba(0,0,0,.3),inset 0 2px 0 rgba(0,0,0,.2)}}@keyframes g{0%{opacity:0}to{opacity:1}}@keyframes h{0%{transform:translate3d(0,-200px,0)}to{transform:translateZ(0)}}.spinner{margin:0 auto;width:70px;text-align:center}.spinner>div{width:18px;height:18px;background-color:#333;border-radius:100%;display:inline-block;animation:i 1.4s infinite ease-in-out both}.spinner .bounce1{animation-delay:-.32s}.spinner .bounce2{animation-delay:-.16s}@keyframes i{0%,80%,to{transform:scale(0)}40%{transform:scale(1)}}#enp-quiz{transition:background .25s cubic-bezier(0,0,.3,1)}#enp-quiz .enp-aside{padding:1.6rem;margin-bottom:1.6rem;background:#94a6b3;border-radius:3px;border:1px solid #eee;border-bottom-color:#ccc;max-width:740px;margin:0 auto;font-size:1.2rem;background:#faf9fb}@media (min-width:700px){#enp-quiz .enp-aside{margin-bottom:2.6rem;padding:1.6rem 2rem}}#enp-quiz .enp-aside:after{content:"";display:table;clear:both}#enp-quiz .enp-aside__title{font-size:1rem;text-transform:uppercase;font-weight:600}#enp-quiz .enp-page-title{border-bottom:2px solid #00a9b7}#enp-quiz fieldset{border:none;margin:0;padding:0}#enp-quiz .enp-label{display:block;color:#343242;font-weight:400;font-size:.85rem;text-transform:uppercase}#enp-quiz .enp-label__sm{font-size:.85rem}#enp-quiz .enp-label.enp-quiz-winlose__label{padding:1rem 0 0}#enp-quiz .enp-legend{display:block;color:#343242;font-weight:400;font-size:.85rem;text-transform:uppercase;padding-top:1.6rem;margin-bottom:.2rem;border:none;padding-top:0}#enp-quiz .enp-input{font-size:1rem;font-family:Arial,monospace,helvetica,arial,sans-serif;padding:.8rem .5rem;background:#fff;border:1px solid #aaa;border-radius:3px;width:20rem;max-width:100%;margin-bottom:1.2rem}@media (min-width:700px){#enp-quiz .enp-input{padding:.8rem;width:100%}}#enp-quiz .enp-input__sm{padding:5px;margin-bottom:5px}#enp-quiz .enp-input.enp-input--has-description{margin-bottom:.2rem}#enp-quiz .enp-input-description,#enp-quiz .enp-textarea-description{margin-bottom:1rem;font-size:.85rem}#enp-quiz .enp-input-description--before,#enp-quiz .enp-textarea-description--before{margin-bottom:0}#enp-quiz .enp-input::-webkit-input-placeholder,#enp-quiz .enp-textarea::-webkit-input-placeholder{font-family:Arial,monospace,helvetica,arial,sans-serif;font-weight:300;color:#7a7697}#enp-quiz .enp-input:-ms-input-placeholder,#enp-quiz .enp-input::-ms-input-placeholder,#enp-quiz .enp-textarea:-ms-input-placeholder,#enp-quiz .enp-textarea::-ms-input-placeholder{font-family:Arial,monospace,helvetica,arial,sans-serif;font-weight:300;color:#7a7697}#enp-quiz .enp-input::placeholder,#enp-quiz .enp-textarea::placeholder{font-family:Arial,monospace,helvetica,arial,sans-serif;font-weight:300;color:#7a7697}#enp-quiz .enp-textarea{font-size:1rem;font-family:Arial,monospace,helvetica,arial,sans-serif;padding:.8rem .5rem;background:#fff;border:1px solid #aaa;border-radius:3px;width:20rem;max-width:100%;margin-bottom:1.2rem;line-height:1.5}@media (min-width:700px){#enp-quiz .enp-textarea{padding:.8rem;width:100%}}#enp-quiz .enp-textarea:focus{outline-color:#4d90fe;outline-offset:-2px;outline-style:auto;outline-width:5px}#enp-quiz .enp-textarea.enp-textarea--has-description{margin-bottom:.2rem}#enp-quiz .enp-textarea.enp-textarea--has-description--before{margin-bottom:1.2rem}#enp-quiz .enp-embed-code{font-size:1rem;font-family:Arial,monospace,helvetica,arial,sans-serif;padding:.8rem .5rem;background:#fff;border:1px solid #aaa;border-radius:3px;width:20rem;max-width:100%;margin-bottom:1.2rem;line-height:1.5;padding:1.6rem;font-size:.7rem;font-family:Monaco,Consolas,Andale Mono,DejaVu Sans Mono,monospace}@media (min-width:700px){#enp-quiz .enp-embed-code{padding:.8rem;width:100%}}#enp-quiz .enp-embed-code:focus{outline-color:#4d90fe;outline-offset:-2px;outline-style:auto;outline-width:5px}#enp-quiz .enp-preview-page-container,#enp-quiz .enp-publish-page-container,#enp-quiz .enp-quiz-form-container{display:grid;grid-column:2/-1;gap:1rem;width:100%;justify-items:center}@media (min-width:700px){#enp-quiz .enp-preview-page-container,#enp-quiz .enp-publish-page-container,#enp-quiz .enp-quiz-form-container{justify-items:start}}#enp-quiz .enp-quiz-form{display:grid;padding-left:0;padding-right:0}@media (min-width:700px){#enp-quiz .enp-quiz-form{width:100%;max-width:40rem}}#enp-quiz .enp-preview-page-flex-container{display:grid;gap:1rem}@media (min-width:700px){#enp-quiz .enp-preview-page-flex-container{grid-template-columns:1fr 3fr}}#enp-quiz .enp-quiz-title__label{display:block;color:#343242;font-weight:400;font-size:.85rem;text-transform:uppercase;font-weight:500}#enp-quiz .enp-quiz-title__textarea{font-size:1rem;font-family:Arial,monospace,helvetica,arial,sans-serif;padding:.8rem .5rem;background:#fff;border:1px solid #aaa;border-radius:3px;width:20rem;max-width:100%;margin-bottom:1.2rem;font-weight:700;font-size:1.6rem;margin-bottom:1rem}@media (min-width:700px){#enp-quiz .enp-quiz-title__textarea{padding:.8rem;width:100%}}#enp-quiz .enp-quiz-title__textarea::-webkit-input-placeholder{font-weight:700}#enp-quiz .enp-quiz-title__textarea:-ms-input-placeholder,#enp-quiz .enp-quiz-title__textarea::-ms-input-placeholder{font-weight:700}#enp-quiz .enp-quiz-title__textarea::placeholder{font-weight:700}#enp-quiz textarea{color:#000}#enp-quiz .enp-accordion-container{margin-bottom:1.6rem;position:relative}#enp-quiz .enp-question-content{background:#fff;width:100%;padding-top:0;position:relative}#enp-quiz .enp-question-inner{padding:1.6rem 1.6rem 1rem}@media (min-width:700px){#enp-quiz .enp-question-inner{padding-right:2.8rem;padding-left:2.9rem}}#enp-quiz .enp-question-title__label{display:block;color:#343242;font-weight:400;font-size:.85rem;text-transform:uppercase;font-weight:500}#enp-quiz .enp-question-title__textarea{font-family:Arial,monospace,helvetica,arial,sans-serif;padding:.8rem .5rem;background:#fff;border:1px solid #aaa;border-radius:3px;width:20rem;max-width:100%;margin-bottom:1.2rem;padding:1rem 1.2rem;font-size:1rem}@media (min-width:700px){#enp-quiz .enp-question-title__textarea{padding:.8rem;width:100%}}#enp-quiz .enp-question-image-upload{text-align:center;border:none;border-radius:3px;padding:.85em 1.4em .75em;font-size:15px;font-weight:400;letter-spacing:.05em;color:#fff;box-shadow:inset 0 -2px 0 rgba(0,0,0,.2);background:#bf5700;cursor:pointer;line-height:1.6;border:1px dashed #a897ba;background:none;color:#545454;box-shadow:none;border:2px dashed #a897ba;color:#e8e4ed;transition:all .2s;background:#faf9fb;font-size:1rem;text-transform:uppercase;position:relative;margin-bottom:2rem;transform:translateZ(0);transition:all .3s cubic-bezier(0,0,.3,1)}#enp-quiz .enp-question-image-upload:focus,#enp-quiz .enp-question-image-upload:hover{color:#fff;box-shadow:none;background:#964400}#enp-quiz .enp-question-image-upload:active{color:#fff;box-shadow:inset 0 2px 0 rgba(0,0,0,.1);background:#1eeeff}#enp-quiz .enp-question-image-upload:focus{outline-color:#4d90fe;outline-offset:-2px;outline-style:auto;outline-width:5px}#enp-quiz .enp-question-image-upload:disabled,#enp-quiz .enp-question-image-upload:disabled:focus,#enp-quiz .enp-question-image-upload:disabled:hover{background:#bf5700;cursor:default;opacity:.5}#enp-quiz .enp-question-image-upload:focus,#enp-quiz .enp-question-image-upload:hover{border:1px dashed #69547e;background:hsla(0,0%,100%,.9);color:#a897ba;border:2px dashed #999}#enp-quiz .enp-question-image-upload .enp-question-image-upload__icon--photo{width:2.8rem;height:2.8rem;opacity:0;position:absolute;top:0;left:0;right:0;margin:0 auto;transform:translateZ(0);z-index:-1;transition:opacity .2s,transform .3s cubic-bezier(0,0,.3,1)}#enp-quiz .enp-question-image-upload .enp-question-image-upload__icon--add{width:1rem;height:1rem;border-radius:50%;fill:#fff;padding:.02rem;background:#e8e4ed;fill:#faf9fb;margin-right:5px;position:relative;top:.2rem}#enp-quiz .enp-question-image-upload:active,#enp-quiz .enp-question-image-upload:focus,#enp-quiz .enp-question-image-upload:hover{padding-top:5rem;padding-bottom:2rem}#enp-quiz .enp-question-image-upload:active .enp-question-image-upload__icon--photo,#enp-quiz .enp-question-image-upload:focus .enp-question-image-upload__icon--photo,#enp-quiz .enp-question-image-upload:hover .enp-question-image-upload__icon--photo{opacity:1;z-index:1;transform:translate3d(0,1.75rem,0)}#enp-quiz .enp-question-image-upload:active .enp-question-image-upload__icon--add,#enp-quiz .enp-question-image-upload:focus .enp-question-image-upload__icon--add,#enp-quiz .enp-question-image-upload:hover .enp-question-image-upload__icon--add{fill:#fff;background:#a897ba}#enp-quiz .enp-question-image__container{position:relative;margin-bottom:1rem}#enp-quiz .enp-question-image{margin-bottom:1.2rem}#enp-quiz .enp-question-type__legend{display:block;color:#343242;font-weight:400;font-size:.85rem;text-transform:uppercase;padding-top:1.6rem;margin-bottom:.2rem;border:none}#enp-quiz .enp-question-type__input{clip:rect(1px,1px,1px,1px);position:absolute!important;left:-10000px;top:auto;width:1px;height:1px;overflow:hidden}#enp-quiz .enp-question-type__label{text-transform:capitalize;display:inline-block;padding:.2rem .5rem;border-radius:3px;cursor:pointer}#enp-quiz .enp-question-type__input:checked+.enp-question-type__label{background:#00a9b7;color:#fff;text-shadow:0 0 1px rgba(0,0,0,.7)}#enp-quiz .enp-question-type__input:focus+.enp-question-type__label{z-index:8;outline-color:#4d90fe;outline-offset:-2px;outline-style:auto;outline-width:5px}#enp-quiz .enp-question-type__label{position:relative;z-index:9}#enp-quiz .enp-mc-options,#enp-quiz .enp-slider-options{margin-top:0;display:none;animation:d .25s cubic-bezier(0,0,.3,1) forwards;animation-delay:0s,.05s}#enp-quiz .enp-question-type__input--mc:checked~.enp-mc-options,#enp-quiz .enp-question-type__input--slider:checked~.enp-slider-options{visibility:visible;display:block;animation:g .45s cubic-bezier(0,0,.3,1) forwards}#enp-quiz .enp-mc-options__list{list-style:none;margin-left:0}#enp-quiz .enp-mc-option{position:relative;padding-left:6px}@media (min-width:700px){#enp-quiz .enp-mc-option{padding-left:0}}#enp-quiz .enp-mc-options__legend{display:block;color:#343242;font-weight:400;font-size:.85rem;text-transform:uppercase;font-weight:500}#enp-quiz .enp-mc-option__add,#enp-quiz .enp-mc-option__button--correct,#enp-quiz .enp-mc-option__button--delete{display:none}#enp-quiz .enp-question-type__input--mc:checked~.enp-mc-options .enp-mc-option__add,#enp-quiz .enp-question-type__input--mc:checked~.enp-mc-options .enp-mc-option__button--correct,#enp-quiz .enp-question-type__input--mc:checked~.enp-mc-options .enp-mc-option__button--delete{display:block}#enp-quiz .enp-button__question-image-delete,#enp-quiz .enp-mc-option__button--delete{border:none;background:none;box-shadow:none;padding:0;margin:0;position:absolute;top:9px;right:-24px;fill:#bbb;cursor:pointer}@media (min-width:700px){#enp-quiz .enp-button__question-image-delete,#enp-quiz .enp-mc-option__button--delete{right:-30px}}#enp-quiz .enp-button__question-image-delete:focus,#enp-quiz .enp-button__question-image-delete:hover,#enp-quiz .enp-mc-option__button--delete:focus,#enp-quiz .enp-mc-option__button--delete:hover{fill:#bf5700}#enp-quiz .enp-mc-option__button--correct{border:none;background:none;box-shadow:none;padding:0;margin:0;position:absolute;top:8px;left:-24px}@media (min-width:700px){#enp-quiz .enp-mc-option__button--correct{left:-35px}}#enp-quiz .enp-mc-option__button--correct .enp-mc-option__icon--correct{border-radius:50%;padding:.05em;width:28px;height:28px;fill:#fff;background:#fff;cursor:pointer;border:2px solid #c1893e;transition:all .2s}@media (min-width:700px){#enp-quiz .enp-mc-option__button--correct .enp-mc-option__icon--correct{padding:.15em}}#enp-quiz .enp-mc-option__button--correct:focus .enp-mc-option__icon--correct,#enp-quiz .enp-mc-option__button--correct:hover .enp-mc-option__icon--correct{background:#fff;border-color:#60aaad;fill:#60aaad}#enp-quiz .enp-mc-option__button--correct:disabled{opacity:1}#enp-quiz .enp-mc-option__button--correct:disabled .enp-mc-option__icon--correct{cursor:default;fill:#fff;border:2px solid transparent}#enp-quiz .enp-mc-option--correct .enp-mc-option__input{box-shadow:inset 0 0 3px #00a9b7;border:1px solid #00a9b7}#enp-quiz .enp-mc-option--correct .enp-mc-option__button--correct:focus .enp-mc-option__icon--correct,#enp-quiz .enp-mc-option--correct .enp-mc-option__button--correct:hover .enp-mc-option__icon--correct,#enp-quiz .enp-mc-option--correct .enp-mc-option__icon--correct{fill:#fff;border-color:#00a9b7;background:#00a9b7}#enp-quiz .enp-mc-option__add{text-align:center;border:none;border-radius:3px;padding:.85em 1.4em .75em;font-size:15px;font-weight:400;letter-spacing:.05em;color:#fff;box-shadow:inset 0 -2px 0 rgba(0,0,0,.2);background:#bf5700;cursor:pointer;line-height:1.6;border:1px dashed #a897ba;background:none;color:#545454;box-shadow:none;border:2px dashed #a897ba;color:#e8e4ed;transition:all .2s;background:#faf9fb;font-size:1rem;text-transform:uppercase;text-align:left;padding:.7rem .75rem .8rem}#enp-quiz .enp-mc-option__add:focus,#enp-quiz .enp-mc-option__add:hover{color:#fff;box-shadow:none;background:#964400}#enp-quiz .enp-mc-option__add:active{color:#fff;box-shadow:inset 0 2px 0 rgba(0,0,0,.1);background:#1eeeff}#enp-quiz .enp-mc-option__add:focus{outline-color:#4d90fe;outline-offset:-2px;outline-style:auto;outline-width:5px}#enp-quiz .enp-mc-option__add:disabled,#enp-quiz .enp-mc-option__add:disabled:focus,#enp-quiz .enp-mc-option__add:disabled:hover{background:#bf5700;cursor:default;opacity:.5}#enp-quiz .enp-mc-option__add:focus,#enp-quiz .enp-mc-option__add:hover{border:1px dashed #69547e;background:hsla(0,0%,100%,.9);color:#a897ba;border:2px dashed #999}#enp-quiz .enp-mc-option__add .enp-mc-option__add__icon{width:1rem;height:1rem;border-radius:50%;fill:#fff;padding:.02rem;margin-right:5px;background:#e8e4ed;fill:#faf9fb;position:relative;top:.2rem}#enp-quiz .enp-mc-option__add:hover .enp-mc-option__add__icon{fill:#fff;background:#a897ba}#enp-quiz .enp-slider-options .enp-input{max-width:11.8rem}#enp-quiz .enp-slider-correct__container .enp-input,#enp-quiz .enp-slider-range__container .enp-input{max-width:8.8rem}@media (min-width:400px){#enp-quiz .enp-slider-correct__container .enp-input,#enp-quiz .enp-slider-range__container .enp-input{max-width:11.8rem}}#enp-quiz .enp-slider-preview{border:1px solid #ddd;margin-top:.2rem;margin-bottom:1.6rem;padding:1.6rem 1.6rem .6rem;position:relative}#enp-quiz .enp-slider-preview .enp-label--slider-preview{position:absolute;width:100%;top:.2rem;left:.4rem;font-size:.75rem;text-transform:uppercase}#enp-quiz .enp-slider-correct__container,#enp-quiz .enp-slider-range__container{display:flex;justify-content:space-between;align-items:center}#enp-quiz .enp-slider-correct__helper,#enp-quiz .enp-slider-range__helper{color:#777;font-size:.85rem;background:#fff;padding:0 .3rem;position:relative}#enp-quiz .enp-slider-correct__helper:before,#enp-quiz .enp-slider-range__helper:before{content:"";position:absolute;top:44%;height:4px;background:#ddd;width:120px;left:-60px;z-index:-1;transition:width .7s cubic-bezier(0,0,.3,1),background 1.6s cubic-bezier(0,0,.3,1)}#enp-quiz .enp-slider-options{margin-bottom:2rem}#enp-quiz .enp-slider-options .enp-accordion-header{text-transform:uppercase;font-size:.85rem;padding:.675rem}#enp-quiz .enp-slider-options .enp-slider-advanced-options__content{border:none;box-shadow:none;padding-top:1rem;padding-bottom:0;margin-bottom:0}#enp-quiz .enp-slider-correct-high__container{position:relative}#enp-quiz .enp-slider-correct-high__input-container--hidden{display:none}#enp-quiz .enp-slider-correct__helper--hidden:before{width:0;background:#60aaad}#enp-quiz .enp-slider-correct-answer-range--add-range{text-align:center;border:none;border-radius:3px;padding:.85em 1.4em .75em;font-size:15px;font-weight:400;letter-spacing:.05em;color:#fff;box-shadow:inset 0 -2px 0 rgba(0,0,0,.2);background:#bf5700;cursor:pointer;text-transform:uppercase;line-height:1.6;border:1px dashed #a897ba;background:none;color:#545454;box-shadow:none;border:2px dashed #a897ba;color:#e8e4ed;transition:all .2s;background:#faf9fb;margin-left:.8rem;font-size:.7rem}#enp-quiz .enp-slider-correct-answer-range--add-range:focus,#enp-quiz .enp-slider-correct-answer-range--add-range:hover{color:#fff;box-shadow:none;background:#964400}#enp-quiz .enp-slider-correct-answer-range--add-range:active{color:#fff;box-shadow:inset 0 2px 0 rgba(0,0,0,.1);background:#1eeeff}#enp-quiz .enp-slider-correct-answer-range--add-range:focus{outline-color:#4d90fe;outline-offset:-2px;outline-style:auto;outline-width:5px}#enp-quiz .enp-slider-correct-answer-range--add-range:disabled,#enp-quiz .enp-slider-correct-answer-range--add-range:disabled:focus,#enp-quiz .enp-slider-correct-answer-range--add-range:disabled:hover{background:#bf5700;cursor:default;opacity:.5}#enp-quiz .enp-slider-correct-answer-range--add-range:focus,#enp-quiz .enp-slider-correct-answer-range--add-range:hover{border:1px dashed #69547e;background:hsla(0,0%,100%,.9);color:#a897ba;border:2px dashed #999}@media (min-width:400px){#enp-quiz .enp-slider-correct-answer-range--add-range{font-size:.8rem;padding:.7rem}}@media (min-width:700px){#enp-quiz .enp-slider-correct-answer-range--add-range{padding:.7rem 1.2rem;min-width:11.4rem}}#enp-quiz .enp-slider-correct-answer-range--add-range .enp-slider-correct-answer-range__icon{width:1rem;height:1rem;border-radius:50%;fill:#fff;padding:.02rem;margin-right:5px;background:#e8e4ed;fill:#faf9fb;position:relative;left:-.2rem}#enp-quiz .enp-slider-correct-answer-range--add-range:hover .enp-slider-correct-answer-range__icon{fill:#fff;background:#a897ba}#enp-quiz .enp-slider-correct-answer-range--remove-range{position:absolute;right:-1.6rem;bottom:1.6rem;background:none;border:none;box-shadow:none;padding:0 .1rem}#enp-quiz .enp-slider-correct-answer-range--remove-range .enp-slider-correct-answer-range__icon{width:1.2em;height:1.2em;fill:#e8e4ed}#enp-quiz .enp-slider-correct-answer-range--remove-range:focus .enp-slider-correct-answer-range__icon,#enp-quiz .enp-slider-correct-answer-range--remove-range:hover .enp-slider-correct-answer-range__icon{fill:#bf5700}@media (min-width:700px){#enp-quiz .enp-slider-correct-answer-range--remove-range{top:-.2rem;right:-.2rem;bottom:auto}}#enp-quiz .enp-slider-options .enp-input:-moz-read-only{background:#faf9fb}#enp-quiz .enp-slider-options .enp-input:read-only{background:#faf9fb}#enp-quiz .enp-answer-explanation{background:#faf9fb;padding-top:2rem;box-shadow:inset 1px 0 0 #ccc,inset -1px -1px 0 #ccc,inset 0 1px 0 #ddd}#enp-quiz .enp-answer-explanation__label{display:block;color:#343242;font-weight:400;font-size:.85rem;text-transform:uppercase;font-weight:500}#enp-quiz .enp-question__button--delete{border:none;background:none;box-shadow:none;padding:0;margin:0;position:absolute;top:9px;right:9px;fill:#bbb;cursor:pointer}@media (min-width:700px){#enp-quiz .enp-question__button--delete{right:-30px}}#enp-quiz .enp-question__button--delete:hover{fill:#bf5700}#enp-quiz .enp-question__move{position:absolute;left:15px}@media (min-width:700px){#enp-quiz .enp-question__move{left:-40px}}#enp-quiz .enp-sort__placeholder{background:#ddd;height:60px;width:100%;max-height:120px;margin-bottom:1.6rem}#enp-quiz .ui-sortable .ui-sortable-helper .ui-sortable-handle{cursor:move;cursor:grabbing;cursor:-webkit-grabbing}#enp-quiz .enp-question__button--move{border:none;background:none;box-shadow:none;padding:0;margin:0;position:absolute;fill:#bbb;cursor:pointer}#enp-quiz .enp-question__button--move:focus,#enp-quiz .enp-question__button--move:hover{fill:#333}#enp-quiz .enp-question__button--move:disabled{opacity:.5}#enp-quiz .enp-question__button--move--up{top:-25px;left:-4px}#enp-quiz .enp-question__button--move--down{top:3px;right:-20px}#enp-quiz .enp-quiz-form__add-question{padding:.75em .8em .7em 1.4em;text-align:center;border:none;border-radius:3px;padding:.85em 1.4em .75em;font-size:15px;font-weight:400;letter-spacing:.05em;color:#fff;box-shadow:inset 0 -2px 0 rgba(0,0,0,.2);background:#bf5700;cursor:pointer;text-transform:uppercase;transition:all .2s;line-height:1.6;border:1px dashed #a897ba;background:none;color:#545454;box-shadow:none;padding-top:1rem;padding-bottom:1rem;margin-top:1.6rem;margin-bottom:2rem}#enp-quiz .enp-quiz-form__add-question:focus,#enp-quiz .enp-quiz-form__add-question:hover{color:#fff;box-shadow:none;background:#964400}#enp-quiz .enp-quiz-form__add-question:active{color:#fff;box-shadow:inset 0 2px 0 rgba(0,0,0,.1);background:#1eeeff}#enp-quiz .enp-quiz-form__add-question:focus{outline-color:#4d90fe;outline-offset:-2px;outline-style:auto;outline-width:5px}#enp-quiz .enp-quiz-form__add-question:disabled,#enp-quiz .enp-quiz-form__add-question:disabled:focus,#enp-quiz .enp-quiz-form__add-question:disabled:hover{background:#bf5700;cursor:default;opacity:.5}#enp-quiz .enp-quiz-form__add-question:focus,#enp-quiz .enp-quiz-form__add-question:hover{border:1px dashed #69547e;color:#a897ba;background:hsla(0,0%,100%,.9)}#enp-quiz .enp-quiz-form__add-question .enp-add-question__icon{width:1rem;height:1rem;border-radius:50%;fill:#fff;padding:.02rem;margin-right:5px;width:1.2rem;height:1.2rem;background:#e8e4ed;fill:#faf9fb;position:relative;top:.2rem}#enp-quiz .enp-quiz-form__add-question:hover .enp-add-question__icon{fill:#fff;background:#a897ba}#enp-quiz .enp-btn--save__btns{display:flex;align-items:center;align-items:flex-start}#enp-quiz .enp-quiz-form__save{text-align:center;border:none;border-radius:3px;padding:.85em 1.4em .75em;font-size:15px;font-weight:400;letter-spacing:.05em;color:#fff;box-shadow:inset 0 -2px 0 rgba(0,0,0,.2);background:#bf5700;cursor:pointer;text-transform:uppercase;transition:all .2s;line-height:1.6;width:100%;margin-bottom:1rem;opacity:.8;text-shadow:0 -1px 2px rgba(0,0,0,.6)}#enp-quiz .enp-quiz-form__save:focus,#enp-quiz .enp-quiz-form__save:hover{color:#fff;box-shadow:none;background:#964400}#enp-quiz .enp-quiz-form__save:active{color:#fff;box-shadow:inset 0 2px 0 rgba(0,0,0,.1);background:#1eeeff}#enp-quiz .enp-quiz-form__save:focus{outline-color:#4d90fe;outline-offset:-2px;outline-style:auto;outline-width:5px}#enp-quiz .enp-quiz-form__save:disabled,#enp-quiz .enp-quiz-form__save:disabled:focus,#enp-quiz .enp-quiz-form__save:disabled:hover{background:#bf5700;cursor:default;opacity:.5}#enp-quiz .enp-quiz-form__save:focus,#enp-quiz .enp-quiz-form__save:hover{opacity:1}@media (min-width:400px){#enp-quiz .enp-quiz-form__save{padding:1.2rem 1.8rem 1.1rem;width:27%;margin-right:3%;position:relative}}#enp-quiz .enp-quiz-form__save--reveal{animation:c .3s cubic-bezier(0,0,.3,1)}#enp-quiz .enp-btn--next-step{text-align:center;border:none;border-radius:3px;padding:.85em 1.4em .75em;font-size:15px;font-weight:400;letter-spacing:.05em;color:#fff;box-shadow:inset 0 -2px 0 rgba(0,0,0,.2);background:#bf5700;cursor:pointer;text-transform:uppercase;transition:all .2s;line-height:1.6;padding:.65em 1.2em .85em 1.4em}#enp-quiz .enp-btn--next-step:focus,#enp-quiz .enp-btn--next-step:hover{color:#fff;box-shadow:none;background:#964400}#enp-quiz .enp-btn--next-step:active{color:#fff;box-shadow:inset 0 2px 0 rgba(0,0,0,.1);background:#1eeeff}#enp-quiz .enp-btn--next-step:focus{outline-color:#4d90fe;outline-offset:-2px;outline-style:auto;outline-width:5px}#enp-quiz .enp-btn--next-step:disabled,#enp-quiz .enp-btn--next-step:disabled:focus,#enp-quiz .enp-btn--next-step:disabled:hover{background:#bf5700;cursor:default;opacity:.5}#enp-quiz .enp-btn--next-step__icon{border-radius:50%;fill:#fff;background:#fff;fill:#bf5700;width:1.2rem;height:1.2rem;margin-left:.5em;position:relative;top:.15rem}#enp-quiz .enp-btn--next-step__icon:hover{background:#fff;fill:#964400}#enp-quiz .enp-btn--next-step{width:100%;padding:1rem 1.4rem}@media (min-width:700px){#enp-quiz .enp-btn--next-step{padding:1.2rem 1.8rem 1.1rem}}#enp-quiz .enp-btn--next-step .enp-btn--next-step__icon{width:1rem;height:1rem}#enp-quiz .enp-btn--next-step--reveal{animation:b .3s cubic-bezier(0,0,.3,1)}#enp-quiz .enp-accordion-header--inserting,#enp-quiz .enp-mc-option--inputs{animation:a .4s cubic-bezier(0,0,.3,1) forwards}#enp-quiz .enp-mc-option--remove,#enp-quiz .enp-question--remove,#enp-quiz .enp-question__image--remove{animation:e .5s cubic-bezier(0,0,.3,1) forwards}#enp-quiz .enp-image-upload-wait{text-align:center;border:none;border-radius:3px;padding:.85em 1.4em .75em;font-size:15px;font-weight:400;letter-spacing:.05em;color:#fff;box-shadow:inset 0 -2px 0 rgba(0,0,0,.2);background:#bf5700;cursor:pointer;text-transform:uppercase;line-height:1.6;border:1px dashed #a897ba;background:none;color:#545454;box-shadow:none;border:2px dashed #a897ba;color:#e8e4ed;transition:all .2s;background:#faf9fb;padding-top:4rem;padding-bottom:4rem;margin-bottom:1rem;width:100%}#enp-quiz .enp-image-upload-wait:focus,#enp-quiz .enp-image-upload-wait:hover{color:#fff;box-shadow:none;background:#964400}#enp-quiz .enp-image-upload-wait:active{color:#fff;box-shadow:inset 0 2px 0 rgba(0,0,0,.1);background:#1eeeff}#enp-quiz .enp-image-upload-wait:focus{outline-color:#4d90fe;outline-offset:-2px;outline-style:auto;outline-width:5px}#enp-quiz .enp-image-upload-wait:disabled,#enp-quiz .enp-image-upload-wait:disabled:focus,#enp-quiz .enp-image-upload-wait:disabled:hover{background:#bf5700;cursor:default;opacity:.5}#enp-quiz .enp-image-upload-wait:focus,#enp-quiz .enp-image-upload-wait:hover{border:1px dashed #69547e;background:hsla(0,0%,100%,.9);color:#a897ba;border:2px dashed #999}#enp-quiz .enp-accordion-header.question-has-error{color:#bf5700;box-shadow:0 0 3px #bf5700}.enp-quiz.ui-sortable--sorting #enp-quiz .enp-accordion-content{display:none}#enp-quiz .enp-quiz-settings__title,#enp-quiz .enp-quiz-share__legend{position:relative;font-size:1rem;text-transform:uppercase;font-weight:600;padding-top:0}@media (min-width:700px){#enp-quiz .enp-quiz-settings__title,#enp-quiz .enp-quiz-share__legend{padding:1em 0}}#enp-quiz .enp-quiz-settings__form{margin-bottom:3rem;overflow:visible}@media (min-width:1000px){#enp-quiz .enp-quiz-settings__form{padding:0;margin-bottom:0}}@media (min-width:700px){#enp-quiz .enp-fieldset{position:relative}}#enp-quiz .enp-title-display__legend{padding-top:0}@media (min-width:700px){#enp-quiz .enp-title-display__legend{padding-top:.4rem}}#enp-quiz .enp-quiz-share__input,#enp-quiz .enp-quiz-styles__input{width:100%}#enp-quiz .enp-quiz-styles__textarea--custom-css{font-family:Monaco,Consolas,Andale Mono,DejaVu Sans Mono,monospace;font-size:.9rem;min-height:200px}#enp-quiz .enp-fieldset--section{padding:1.6rem 1rem}@media (min-width:1000px){#enp-quiz .enp-fieldset--section{padding:1rem}}#enp-quiz .enp-fieldset--section.enp-accordion-content--open{margin-bottom:0}#enp-quiz .enp-quiz-share--facebook{margin-bottom:2rem}#enp-quiz .enp-title-display__legend{display:block;color:#343242;font-weight:400;font-size:.85rem;text-transform:uppercase;padding-top:1.6rem;margin-bottom:.2rem;border:none}#enp-quiz .enp-title-display__input{clip:rect(1px,1px,1px,1px);position:absolute!important;left:-10000px;top:auto;width:1px;height:1px;overflow:hidden}#enp-quiz .enp-title-display__label{text-transform:capitalize;display:inline-block;padding:.2rem .5rem;border-radius:3px;cursor:pointer}#enp-quiz .enp-title-display__input:checked+.enp-title-display__label{background:#00a9b7;color:#fff;text-shadow:0 0 1px rgba(0,0,0,.7)}#enp-quiz .enp-title-display__input:focus+.enp-title-display__label{z-index:8;outline-color:#4d90fe;outline-offset:-2px;outline-style:auto;outline-width:5px}#enp-quiz .enp-mc-options-order__legend{display:block;color:#343242;font-weight:400;font-size:.85rem;text-transform:uppercase;padding-top:1.6rem;margin-bottom:.2rem;border:none}#enp-quiz .enp-mc-options-order__input{clip:rect(1px,1px,1px,1px);position:absolute!important;left:-10000px;top:auto;width:1px;height:1px;overflow:hidden}#enp-quiz .enp-mc-options-order__label{text-transform:capitalize;display:inline-block;padding:.2rem .5rem;border-radius:3px;cursor:pointer}#enp-quiz .enp-mc-options-order__input:checked+.enp-mc-options-order__label{background:#00a9b7;color:#fff;text-shadow:0 0 1px rgba(0,0,0,.7)}#enp-quiz .enp-mc-options-order__input:focus+.enp-mc-options-order__label{z-index:8;outline-color:#4d90fe;outline-offset:-2px;outline-style:auto;outline-width:5px}#enp-quiz .enp-mc-options-order{margin-bottom:1.6rem}#enp-quiz .enp-quiz-share__textarea{min-height:7.6rem;margin-bottom:2rem}@media (min-width:700px){#enp-quiz .enp-quiz-share__textarea{min-height:4.6rem}}@media (min-width:1000px){#enp-quiz .enp-quiz-share__textarea{min-height:7.6rem}}#enp-quiz .enp-preview-form__submit{margin-top:1.6rem;margin-bottom:1.6rem}#enp-quiz .enp-quiz-preview__title{font-size:1rem;text-transform:uppercase;font-weight:600}@media (min-width:700px){#enp-quiz .enp-quiz-preview__title{padding:1em 0}}#enp-quiz .enp-preview-form__submit{text-align:center;border:none;border-radius:3px;padding:.85em 1.4em .75em;font-size:15px;font-weight:400;letter-spacing:.05em;color:#fff;box-shadow:inset 0 -2px 0 rgba(0,0,0,.2);background:#bf5700;cursor:pointer;text-transform:uppercase;transition:all .2s;line-height:1.6;width:100%;padding-top:.85rem;padding-bottom:.85rem;margin-bottom:1rem;opacity:.8;text-shadow:0 -1px 2px rgba(0,0,0,.6)}#enp-quiz .enp-preview-form__submit:focus,#enp-quiz .enp-preview-form__submit:hover{color:#fff;box-shadow:none;background:#964400}#enp-quiz .enp-preview-form__submit:active{color:#fff;box-shadow:inset 0 2px 0 rgba(0,0,0,.1);background:#1eeeff}#enp-quiz .enp-preview-form__submit:focus{outline-color:#4d90fe;outline-offset:-2px;outline-style:auto;outline-width:5px}#enp-quiz .enp-preview-form__submit:disabled,#enp-quiz .enp-preview-form__submit:disabled:focus,#enp-quiz .enp-preview-form__submit:disabled:hover{background:#bf5700;cursor:default;opacity:.5}#enp-quiz .enp-preview-form__submit:focus,#enp-quiz .enp-preview-form__submit:hover{opacity:1}#enp-quiz .enp-preview-form__submit--publish{width:100%;position:relative;z-index:99999999;padding:1.05rem 1.8rem .95rem}#enp-quiz .enp-quiz-styles__iris-wrapper{position:relative}#enp-quiz .iris-picker{box-sizing:content-box;position:relative;z-index:9999999999;top:-1.2rem;margin-bottom:1rem;padding-bottom:3rem;padding-right:30px}@media (min-width:1000px){#enp-quiz .iris-picker{position:absolute;top:50px;left:0}}#enp-quiz .iris-picker:last-of-type{margin-bottom:0}#enp-quiz .iris-picker .ui-draggable-handle:focus .ui-slider-handle,#enp-quiz .iris-picker .ui-slider-handle:focus{box-shadow:0 0 3px rgba(0,0,0,.75)}#enp-quiz .enp-quiz-styles__set-default{text-align:center;border:none;border-radius:3px;padding:.85em 1.4em .75em;font-size:15px;font-weight:400;letter-spacing:.05em;color:#fff;box-shadow:inset 0 -2px 0 rgba(0,0,0,.2);background:#bf5700;cursor:pointer;text-transform:uppercase;transition:all .2s;line-height:1.6;border:2px solid #bf5700;background:transparent;color:#bf5700;box-shadow:none;font-size:.75rem;position:absolute;left:10px;bottom:10px}#enp-quiz .enp-quiz-styles__set-default:focus,#enp-quiz .enp-quiz-styles__set-default:hover{color:#fff;box-shadow:none;background:#964400}#enp-quiz .enp-quiz-styles__set-default:active{color:#fff;box-shadow:inset 0 2px 0 rgba(0,0,0,.1);background:#1eeeff}#enp-quiz .enp-quiz-styles__set-default:focus{outline-color:#4d90fe;outline-offset:-2px;outline-style:auto;outline-width:5px}#enp-quiz .enp-quiz-styles__set-default:disabled,#enp-quiz .enp-quiz-styles__set-default:disabled:focus,#enp-quiz .enp-quiz-styles__set-default:disabled:hover{background:#bf5700;cursor:default;opacity:.5}#enp-quiz .enp-quiz-styles__set-default:focus,#enp-quiz .enp-quiz-styles__set-default:hover{background:transparent;border:2px solid #964400;color:#964400}#enp-quiz .enp-iris__close{border:none;background:none;box-shadow:none;padding:0;margin:0;position:absolute;top:5px;right:5px;fill:#888;cursor:pointer}#enp-quiz .enp-quiz-styles__input--color{padding-left:45px}#enp-quiz .enp-quiz-styles__color-demo{width:30px;height:30px;border:1px solid #ccc;top:8px;left:8px;border-radius:3px;position:absolute}@media (min-width:700px){#enp-quiz .enp-share-quiz__container{padding:0;border:none}}#enp-quiz .enp-share-quiz__url{display:block;font-size:1rem;line-height:1.4;word-wrap:break-word}#enp-quiz .enp-share-quiz{list-style:none;margin-left:0;display:flex;justify-content:center;align-content:center;align-items:center}#enp-quiz .enp-share-quiz__item{margin-right:20px}#enp-quiz .enp-share-quiz__item:last-child{margin-right:0}#enp-quiz .enp-share-quiz__item__icon{width:2.4rem;height:2.4rem;border-radius:50%;fill:#fff;padding:.6rem;fill:#fff!important}#enp-quiz .enp-share-quiz__item__icon--facebook{background-color:#3a5795}#enp-quiz .enp-share-quiz__item__icon--twitter{background-color:#4099ff}#enp-quiz .enp-share-quiz{justify-content:space-around;margin-bottom:0}#enp-quiz .enp-share-quiz .enp-icon--mail{background:#00a9b7}#enp-quiz .enp-ab-create__container{max-width:740px;margin:0 auto;width:100%;background:#fdfcfd;padding-top:3rem;padding-bottom:3rem}#enp-quiz .enp-ab-create__container:after{content:"";display:table;clear:both}@media (min-width:700px){#enp-quiz .enp-ab-create__container{max-width:1000px}}@media (min-width:1000px){#enp-quiz .enp-ab-create__container{max-width:1440px;padding-top:0}}#enp-quiz .enp-ab-create__form{max-width:740px;margin:0 auto}#enp-quiz .enp-ab-create__form:after{content:"";display:table;clear:both}@media (min-width:1000px){#enp-quiz .enp-ab-create__form{max-width:740px;margin:0 auto;margin:unset}#enp-quiz .enp-ab-create__form:after{content:"";display:table;clear:both}}#enp-quiz .enp-ab-create__label{display:block;color:#343242;font-weight:400;font-size:.85rem;text-transform:uppercase;font-weight:500}#enp-quiz .enp-ab-create-title__textarea{font-size:1rem;font-family:Arial,monospace,helvetica,arial,sans-serif;padding:.8rem .5rem;background:#fff;border:1px solid #aaa;border-radius:3px;width:20rem;max-width:100%;margin-bottom:1.2rem;font-weight:700;font-size:1.6rem;margin-bottom:1rem;width:100%}@media (min-width:700px){#enp-quiz .enp-ab-create-title__textarea{padding:.8rem;width:100%}}#enp-quiz .enp-ab-create-title__textarea::-webkit-input-placeholder{font-weight:700}#enp-quiz .enp-ab-create-title__textarea:-ms-input-placeholder,#enp-quiz .enp-ab-create-title__textarea::-ms-input-placeholder{font-weight:700}#enp-quiz .enp-ab-create-title__textarea::placeholder{font-weight:700}#enp-quiz .enp-ab-create__select{width:100%;-webkit-appearance:none;-moz-appearance:none;appearance:none;font-size:.85rem;padding:.7rem 32px .7rem .8rem;border:1px solid #bbb;border-radius:3px;margin-bottom:1.6rem;background:url(../svg/chevron-down.svg) 100% 50% no-repeat;background-color:#fff;box-shadow:inset -26px 0 0 rgba(0,0,0,.1)}#enp-quiz .enp-ab-create__submit{width:100%;padding-top:1em;padding-bottom:1em}#headerimg h1{text-align:center;font-size:40px!important}#enp-quiz.enp-quiz__main{max-width:740px;margin:0 auto;display:grid;gap:1em;min-height:85vh}#enp-quiz.enp-quiz__main:after{content:"";display:table;clear:both}@media (min-width:1000px){#enp-quiz.enp-quiz__main{max-width:740px;margin:0 auto;grid-template-columns:1fr 4fr}#enp-quiz.enp-quiz__main:after{content:"";display:table;clear:both}}@media (min-width:1000px) and (min-width:700px){#enp-quiz.enp-quiz__main{max-width:1000px}}@media (min-width:1000px) and (min-width:1000px){#enp-quiz.enp-quiz__main{max-width:1440px}}#enp-quiz .enp-dash-container{padding:2rem;transition:all .25s cubic-bezier(0,0,.3,1)}#enp-quiz .enp-dash__section-aside{background-color:#faf9fb}@media (min-width:700px){#enp-quiz .enp-dash__section-aside{padding:2rem}}#enp-quiz .enp-breadcrumb-link__container{padding-bottom:2rem}#enp-quiz .enp-search-quizzes{display:flex;justify-content:space-between;flex-wrap:wrap;padding:1em}@media (min-width:700px){#enp-quiz .enp-search-quizzes{padding:.2rem 0;flex-wrap:nowrap}}@media (min-width:1000px){#enp-quiz .enp-search-quizzes{display:flex;justify-content:space-between;flex-direction:column}}#enp-quiz .enp-search-quizzes__form-item{margin-bottom:.6rem;flex:0 1 48%}@media (min-width:400px){#enp-quiz .enp-search-quizzes__form-item{margin-bottom:0;margin-right:1rem;flex:1 0 auto}}#enp-quiz .enp-quiz-search{flex:1 0 100%;position:relative}@media (min-width:700px){#enp-quiz .enp-quiz-search{flex:1 0 auto}}#enp-quiz .enp-search-quizzes__label{margin-bottom:0;clip:rect(1px,1px,1px,1px);position:absolute!important;left:-10000px;top:auto;width:1px;height:1px;overflow:hidden}#enp-quiz .enp-search-quizzes__select{padding:.3rem;border-radius:3px;width:100%}@media (min-width:1000px){#enp-quiz .enp-search-quizzes__select{min-width:200px;font-size:.85rem}}#enp-quiz .enp-quiz-search__input{width:100%;margin:0 0 .1rem;padding:.3rem .3rem .3rem 26px;font-size:.85rem}#enp-quiz .enp-quiz-search__icon{position:absolute;bottom:.3rem;left:.2rem;width:21px;height:21px}#enp-quiz .enp-search-quizzes__button{padding:.2rem .8rem}#enp-quiz .enp-search-results-description{font-size:.85rem}#enp-quiz .enp-search-results-description__link{white-space:nowrap}#enp-quiz .enp-search-results-description__icon{width:1.3em;height:1.3em;position:relative;top:4px;left:2px}#enp-quiz .enp-dash__section-title{font-size:1rem;text-transform:uppercase;margin-bottom:.325rem;border-bottom:1px solid #e8e4ed}@media (min-width:700px){#enp-quiz .enp-dash__section-title{padding:1em 0}}#enp-quiz .enp-dash__ab-test-helper--not-enough-quizzes{color:#a897ba}#enp-quiz .enp-view-toggle{cursor:pointer;opacity:.5;display:none}@media (min-width:700px){#enp-quiz .enp-view-toggle{display:flex}}#enp-quiz .enp-view-toggle__active{opacity:1}#enp-quiz .enp-sort-by{margin-left:5px}#enp-quiz .enp-dash-list{display:flex;flex-flow:column wrap;align-items:stretch;list-style:none;margin-left:0}#enp-quiz .enp-dash-item{flex-basis:100%;padding:1rem 1.2rem;background-color:#f5f3f7;border:1px solid #eee;border-bottom:1px solid #ddd;list-style:none;transition:all .35s cubic-bezier(0,0,.3,1);margin:0 0 .8rem;justify-content:space-between;display:flex;z-index:1;flex-direction:column;align-content:flex-end;justify-content:flex-end;border:none;border-radius:3px}#enp-quiz .enp-dash-item--published{box-shadow:inset 4px 0 0 #00a9b7,0 1px 0 rgba(0,0,0,.1)}#enp-quiz .enp-dash-item--draft{box-shadow:inset 4px 0 0 #94a6b3,0 1px 0 rgba(0,0,0,.1)}#enp-quiz .enp-dash-item--draft .enp-dash-item__title a{color:#333f48}#enp-quiz .enp-dash-item--remove{animation:e .5s cubic-bezier(0,0,.3,1) forwards}#enp-quiz .enp-dash-list--list-view .enp-dash-item{margin:0 0 .8rem;flex-basis:100%}#enp-quiz .enp-dash-item__spinner{display:flex;justify-content:center;align-content:center;align-items:center;position:absolute;top:0;bottom:0;left:0;right:0;background:hsla(0,59%,90%,.8);width:100%;animation:g .3s cubic-bezier(0,0,.3,1)}#enp-quiz .enp-dash-item__header{padding:.5rem 1rem;background:#faf9fb;border-bottom:1px solid #e8e4ed;display:flex;justify-content:space-between;align-items:center;border-radius:3px}#enp-quiz .enp-dash-item__title{font-size:1rem;padding-bottom:.5rem;padding:0;margin-bottom:0}#enp-quiz .enp-dash-item__title a{color:#00a9b7}#enp-quiz .enp-dash-item__content{padding:0 0 .375rem;position:relative;transition:all .2s cubic-bezier(0,0,.3,1)}#enp-quiz .enp-dash-item__meta{font-size:.7rem;font-weight:300;color:#a897ba;font-size:.75rem}#enp-quiz .enp-dash-item__username{word-wrap:break-word;padding-left:.4rem;margin-left:.2rem;border-left:1px solid #ddd}#enp-quiz .enp-dash-item__title--ab-test{padding-bottom:0}#enp-quiz .enp-dash-item__ab-quizzes{list-style:none;margin-left:0;font-size:.75rem;color:#a897ba;margin-bottom:.8rem}#enp-quiz .enp-dash-item__nav{list-style:none;margin-left:0;margin-bottom:0;font-size:.85rem}#enp-quiz .enp-dash-item__nav__item{display:flex;margin:0;width:100%;align-items:center}#enp-quiz .enp-dash-item__nav__item:hover{background-color:#f5f3f7}#enp-quiz .enp-dash-item__nav__item:hover .enp-dash-item__icon{fill:#bf5700}#enp-quiz .enp-dash-item__nav__item a{font-weight:400;color:#a897ba;display:flex;align-items:center;width:100%;padding:12px}#enp-quiz .enp-dash-item__nav__item a:focus,#enp-quiz .enp-dash-item__nav__item a:hover{color:#bf5700;outline:1px dotted #bf5700;outline-offset:1px}#enp-quiz .enp-dash-item__nav__item a:focus .enp-dash-item__icon,#enp-quiz .enp-dash-item__nav__item a:hover .enp-dash-item__icon{fill:#bf5700}#enp-quiz .enp-delete-quiz{width:100%}#enp-quiz .enp-delete-quiz:hover .enp-dash-item__delete{color:#bf5700}#enp-quiz .enp-delete-quiz:hover .enp-icon{fill:#bf5700}#enp-quiz .enp-dash-item__delete{border:none;background:none;box-shadow:none;padding:0;margin:0;display:flex;padding:12px;align-items:center;position:relative;line-height:1.6;color:#a897ba;cursor:pointer;width:100%;font-size:.85rem}#enp-quiz .enp-dash-item__delete .enp-icon{fill:#a897ba}#enp-quiz .enp-dash-item__icon{fill:#a897ba;width:15px;height:15px;margin-right:10px}#enp-quiz .enp-dash-item__nav--collapsible{display:none;position:absolute;z-index:2;top:44px;right:-17px;width:195px;background-color:#fff;text-align:left;transform:translateZ(0);transition:all .2s cubic-bezier(0,0,.3,1)}#enp-quiz .enp-dash-item__nav--collapsible .enp-dash-item__nav__item{cursor:pointer}#enp-quiz .enp-dash-item__menu-action{height:24px;background:none;border:none;color:#444;padding:0;bottom:.2rem;right:1.5rem;top:1.5rem;cursor:pointer}#enp-quiz .enp-dash-item__menu-action-wrap{max-width:0;display:flex;flex-direction:column;align-items:flex-end}#enp-quiz .enp-dash-item__menu-action__icon{width:15px;height:15px;fill:#a897ba;transition:all .3s cubic-bezier(0,0,.3,1)}#enp-quiz .enp-dash-item--menu-active{transform:translate3d(0,-3px,0);z-index:2}#enp-quiz .enp-dash-item--menu-active .enp-dash-item__nav-wrap{position:relative}#enp-quiz .enp-dash-item--menu-active.enp-dash-item--published{box-shadow:inset 4px 0 0 #60aaad,0 2px 2px rgba(0,0,0,.2)}#enp-quiz .enp-dash-item--menu-active.enp-dash-item--draft{box-shadow:inset 4px 0 0 #b4d7d8,0 2px 2px rgba(0,0,0,.2)}#enp-quiz .enp-dash-item--menu-active .enp-dash-item__menu-action__icon--bottom{transform:rotateX(180deg)}#enp-quiz .enp-dash-item--menu-active .enp-dash-item__nav--collapsible{display:block;animation:b .25s cubic-bezier(0,0,.3,1) forwards;border-radius:3px;box-shadow:0 2px 2px rgba(0,0,0,.2)}#enp-quiz .enp-dash-item--menu-active .enp-dash-item__content{opacity:.4}#enp-quiz .enp-quiz-results{display:flex;justify-content:space-around;list-style:none;margin:.8rem 0 0;padding:0;text-align:center}#enp-quiz .enp-quiz-results__item{margin:0 2% 0 0;padding:0;color:#5d5e5f}@media (max-width:280px){#enp-quiz .enp-quiz-results__item{width:100%;padding:0;margin-bottom:.6rem}}#enp-quiz .enp-quiz-results__number{font-size:1.6rem;line-height:1;position:relative}#enp-quiz .enp-dash-item--draft .enp-quiz-results__number{opacity:.5}#enp-quiz .enp-quiz-results__number--average-score{color:#4e9497}#enp-quiz .enp-quiz-results__number--average-score:after{content:"%";font-size:.9rem;position:absolute;top:.3rem;right:-1rem}#enp-quiz .enp-quiz-results__label{text-transform:uppercase;font-size:.7rem;font-weight:300;color:#a897ba}#enp-quiz .enp-dash-item--add-new__wrap{display:grid;gap:1em;grid-template-columns:1fr 1fr}#enp-quiz .enp-dash-list--quiz__container{display:grid;gap:1em}@media (min-width:1000px){#enp-quiz .enp-dash-list--quiz__container{grid-template-columns:1fr 1fr}}#enp-quiz .enp-dash-item--add-new{background:none;border:none;padding:0;position:relative}@media (min-width:1000px){#enp-quiz .enp-dash-item--add-new{padding-top:7rem}}#enp-quiz .enp-dash-link--add-new{text-align:center;border:none;border-radius:3px;padding:.85em 1.4em .75em;font-size:15px;font-weight:400;letter-spacing:.05em;color:#fff;box-shadow:inset 0 -2px 0 rgba(0,0,0,.2);background:#bf5700;cursor:pointer;text-transform:uppercase;line-height:1.6;border:1px dashed #a897ba;background:none;color:#545454;box-shadow:none;border:2px dashed #a897ba;color:#e8e4ed;transition:all .2s;justify-content:flex-start;color:#94a6b3;padding:1rem 1.2rem}#enp-quiz .enp-dash-link--add-new:focus,#enp-quiz .enp-dash-link--add-new:hover{color:#fff;box-shadow:none;background:#964400}#enp-quiz .enp-dash-link--add-new:active{color:#fff;box-shadow:inset 0 2px 0 rgba(0,0,0,.1);background:#1eeeff}#enp-quiz .enp-dash-link--add-new:focus{outline-color:#4d90fe;outline-offset:-2px;outline-style:auto;outline-width:5px}#enp-quiz .enp-dash-link--add-new:disabled,#enp-quiz .enp-dash-link--add-new:disabled:focus,#enp-quiz .enp-dash-link--add-new:disabled:hover{background:#bf5700;cursor:default;opacity:.5}#enp-quiz .enp-dash-link--add-new:focus,#enp-quiz .enp-dash-link--add-new:hover{border:1px dashed #69547e;background:hsla(0,0%,100%,.9);color:#a897ba;border:2px dashed #999}@media (min-width:700px){#enp-quiz .enp-dash-link--add-new{font-size:1rem;text-transform:uppercase;display:flex;justify-content:center;align-content:center;align-items:center;flex-direction:column;position:absolute;top:0;left:0;right:0;bottom:0}}#enp-quiz .enp-dash-link--add-new .enp-dash-link__icon{border-radius:50%;fill:#fff;width:1.2rem;height:1.2rem;margin-right:5px;background-color:#94a6b3}@media (min-width:700px){#enp-quiz .enp-dash-link--add-new .enp-dash-link__icon{width:2rem;height:2rem;margin:.8rem 0 .2rem}}#enp-quiz .enp-dash-link--add-new:hover{color:#333f48}#enp-quiz .enp-dash-link--add-new:hover .enp-dash-link__icon{fill:#fff;background:#333f48}#enp-quiz .enp-quiz-message--welcome p{color:#1d1c25}#enp-quiz .enp-paginate{list-style:none;margin-left:0;font-size:1rem}#enp-quiz .enp-paginate,#enp-quiz .enp-paginate__link{display:flex;justify-content:center;align-content:center;align-items:center}#enp-quiz .enp-paginate__link{margin:0 .2rem;padding:0 .4rem;border-radius:3px;font-weight:400}#enp-quiz .enp-paginate__link--current-page{border:2px solid #00a9b7}#enp-quiz .enp-paginate__item--first-page,#enp-quiz .enp-paginate__item--last-page{display:flex}#enp-quiz .enp-paginate__item--first-page:after,#enp-quiz .enp-paginate__item--last-page:before{content:"...";font-size:1rem;position:relative;bottom:.2rem;opacity:.6}#enp-quiz .enp-paginate__item--no-gap:after,#enp-quiz .enp-paginate__item--no-gap:before{content:""}#enp-quiz .enp-paginate__item--next-page{margin-left:.2rem}#enp-quiz .enp-paginate__item--previous-page{margin-right:.2rem}#enp-quiz .enp-quiz-breadcrumbs{grid-row:1}#enp-quiz .enp-quiz-breadcrumbs__list{display:flex;list-style:none;margin-left:0;margin-bottom:0}#enp-quiz .enp-quiz-breadcrumbs__item{margin-right:10px;display:flex;justify-content:center;align-content:center;align-items:center;fill:#bf5700;margin-right:5px}#enp-quiz .enp-quiz-breadcrumbs__item:last-of-type{margin-right:0}@media (min-width:400px){#enp-quiz .enp-quiz-breadcrumbs__item{margin-right:10px}}#enp-quiz .enp-quiz-breadcrumbs__link--disabled{opacity:.65;cursor:default}#enp-quiz .enp-quiz-breadcrumbs__link--active{text-align:center;border:none;border-radius:3px;padding:.85em 1.4em .75em;font-size:15px;font-weight:400;letter-spacing:.05em;color:#fff;box-shadow:inset 0 -2px 0 rgba(0,0,0,.2);background:#bf5700;cursor:pointer;text-transform:uppercase;transition:all .2s;line-height:1.6;border:2px solid #bf5700;background:transparent;color:#bf5700;box-shadow:none;padding:.4em 1em}#enp-quiz .enp-quiz-breadcrumbs__link--active:focus,#enp-quiz .enp-quiz-breadcrumbs__link--active:hover{color:#fff;box-shadow:none;background:#964400}#enp-quiz .enp-quiz-breadcrumbs__link--active:active{color:#fff;box-shadow:inset 0 2px 0 rgba(0,0,0,.1);background:#1eeeff}#enp-quiz .enp-quiz-breadcrumbs__link--active:focus{outline-color:#4d90fe;outline-offset:-2px;outline-style:auto;outline-width:5px}#enp-quiz .enp-quiz-breadcrumbs__link--active:disabled,#enp-quiz .enp-quiz-breadcrumbs__link--active:disabled:focus,#enp-quiz .enp-quiz-breadcrumbs__link--active:disabled:hover{background:#bf5700;cursor:default;opacity:.5}#enp-quiz .enp-quiz-breadcrumbs__link--active:focus,#enp-quiz .enp-quiz-breadcrumbs__link--active:hover{background:transparent;border:2px solid #964400;color:#964400}#enp-quiz .enp-quiz-breadcrumbs__link{font-size:1rem;font-weight:400;text-transform:none;letter-spacing:0}#enp-quiz .enp-quiz-breadcrumbs--fixed{top:0;position:fixed;animation:h .25s}#enp-quiz .enp-results-title{font-size:1.6rem;text-align:center;padding:3.2rem 20px 2.6rem;background:#fdfcfd;margin:-1.2rem 0 2rem;border-bottom:1px solid #ddd}#enp-quiz .enp-results-title:after{font-size:1rem;text-transform:uppercase;display:block;content:"RESULTS";font-weight:400}#enp-quiz .enp-results__container{max-width:740px;margin:0 auto;display:block}#enp-quiz .enp-results__container:after{content:"";display:table;clear:both}@media (min-width:700px){#enp-quiz .enp-results__container{max-width:1000px}}@media (min-width:1000px){#enp-quiz .enp-results__container{max-width:1440px;display:flex;justify-content:space-between}}#enp-quiz .enp-quiz-scores__container,#enp-quiz .enp-results-flow__container{width:100%}@media (min-width:1000px){#enp-quiz .enp-quiz-scores__container,#enp-quiz .enp-results-flow__container{width:48%}}#enp-quiz .enp-quiz-scores{margin-top:2.6rem}#enp-quiz .enp-quiz-score__line-chart{height:300px;margin-bottom:1rem}#enp-quiz .enp-quiz-score__line-chart .ct-label{color:#1d1c25}#enp-quiz .enp-quiz-score__line-chart .ct-grid{stroke:#dadada;stroke-dasharray:0}#enp-quiz .enp-quiz-score__line-chart .ct-line{stroke:#60aaad;stroke-width:2px}#enp-quiz .enp-quiz-score__line-chart .ct-point{stroke:#60aaad;stroke-width:8px}#enp-quiz .enp-quiz-scores-table{width:100%;max-width:500px;margin:0 auto}#enp-quiz .enp-quiz-scores-table tr th{background-color:#fff}#enp-quiz .enp-quiz-scores-table__label{padding-left:5%}#enp-quiz .enp-quiz-scores-table__score{text-align:right;padding-right:5%}#enp-quiz .enp-results-flow{position:relative;margin:2rem auto;width:320px;height:320px;border-radius:50%}@media (min-width:400px){#enp-quiz .enp-results-flow{width:390px;height:390px}}@media (min-width:700px){#enp-quiz .enp-results-flow{width:450px;height:450px}}@media (min-width:1000px){#enp-quiz .enp-results-flow{width:400px;height:400px}}#enp-quiz .enp-results-flow__section-title{clip:rect(1px,1px,1px,1px);position:absolute!important;left:-10000px;top:auto;width:1px;height:1px;overflow:hidden}#enp-quiz .enp-results-flow__item{border-radius:50%;text-align:center;height:100%;width:100%;margin:0 auto;left:0;right:0;padding:12.5% 0 0;letter-spacing:.05rem;border:2px solid #60aaad;animation:.85s a cubic-bezier(0,0,.3,1) forwards}#enp-quiz .enp-results-flow__item--total-views{background:#fff}#enp-quiz .enp-results-flow__item--quiz-starts{width:65%;height:65%;position:absolute;padding-top:8%;bottom:2.5%;background:#fff}#enp-quiz .enp-results-flow__item--quiz-finishes{width:35%;height:35%;position:absolute;bottom:5%;background:#d6e9ea}#enp-quiz .enp-results-flow__title{font-size:1rem;text-transform:uppercase;color:#444;font-size:.7rem;margin-bottom:0}@media (min-width:700px){#enp-quiz .enp-results-flow__title{font-weight:700;margin-bottom:2px}}#enp-quiz .enp-results-flow__number{font-weight:700;font-size:1.4rem;line-height:1.2}#enp-quiz .enp-results-flow__number--total-views{font-size:2rem}#enp-quiz .enp-results-flow__number--quiz-starts{font-size:1.65rem}#enp-quiz .enp-results-flow__percentage{font-size:.8rem;font-weight:400;position:relative;display:inline-block;top:-.7em;left:-.1rem;color:#444}#enp-quiz .enp-results-flow__percentage:after{content:"%";position:absolute;right:-.75rem;font-size:.7rem;color:#444}#enp-quiz .enp-results-questions__section{padding-top:5rem;padding-bottom:3rem;margin-top:5rem;margin-bottom:3rem}@media (min-width:700px){#enp-quiz .enp-results-questions__section{margin-right:2rem;margin-left:2rem}}#enp-quiz .enp-results-questions__header{align-items:flex-start;flex-direction:column}@media (min-width:400px){#enp-quiz .enp-results-questions__header{display:flex;justify-content:space-between;flex-direction:row;align-items:flex-end}}#enp-quiz .enp-results-questions__key,#enp-quiz .enp-results-questions__title{font-size:1rem;text-transform:uppercase}#enp-quiz .enp-results-questions{list-style:none;margin-left:0}#enp-quiz .enp-results-question{width:100%;font-size:1rem;padding:0;margin-bottom:1rem}#enp-quiz .enp-results-question__header{padding:1rem 1.2rem;position:relative}#enp-quiz .enp-results-question__question,#enp-quiz .enp-results-question__stats{font-size:1rem;line-height:1.4}#enp-quiz .enp-results-question__question{font-weight:400}@media (min-width:400px){#enp-quiz .enp-results-question__question{padding-right:7em;margin-bottom:0}}#enp-quiz .enp-results-question__stats{font-size:.9rem}@media (min-width:400px){#enp-quiz .enp-results-question__stats{position:absolute;bottom:1rem;right:1.2rem;text-align:right}}#enp-quiz .enp-results-question__stats,#enp-quiz .enp-results-questions__key{font-weight:300}#enp-quiz .enp-results-question__content{padding:2rem 1.2rem 1.2rem;border-radius:3px}#enp-quiz .enp-results-question__deep-stats{display:flex;justify-content:space-around;list-style:none;margin-left:0;text-align:center}#enp-quiz .enp-results-question__deep-stat__number{font-size:1.8rem;line-height:1;position:relative}#enp-quiz .enp-results-question__deep-stat__number--correct,#enp-quiz .enp-results-question__deep-stat__number--finishes{color:#4e9497}#enp-quiz .enp-results-question__deep-stat__number--incorrect{color:#c1893e}#enp-quiz .enp-results-question__deep-stat__number--correct:after,#enp-quiz .enp-results-question__deep-stat__number--finishes:after,#enp-quiz .enp-results-question__deep-stat__number--incorrect:after{content:"%";font-size:.9rem;position:absolute;top:.3rem;right:-1rem}#enp-quiz .enp-results-question__deep-stat__label{font-size:1rem;text-transform:uppercase;font-size:.8rem}#enp-quiz .enp-results-question__options{list-style:none;margin-left:0;margin-bottom:0}#enp-quiz .enp-results-question__option{padding:.8rem .8rem .8rem .4rem;border-top:1px solid #ddd}@media (min-width:400px){#enp-quiz .enp-results-question__option{display:flex;justify-content:space-between;flex-direction:row}}#enp-quiz .enp-results-question__option:first-of-type{margin-top:1.4rem}#enp-quiz .enp-results-question__option--correct{background:#fff}#enp-quiz .enp-results-question__option__text{flex-grow:100;margin-right:1rem}#enp-quiz .enp-results-question__option__text__helper{font-weight:300;font-size:1rem;text-transform:uppercase;margin-right:.4rem}@media (min-width:400px){#enp-quiz .enp-results-question__option__icon{margin-right:.3rem;min-width:1.6rem}}#enp-quiz .enp-results-question__option__icon--incorrect{fill:#c1893e;opacity:.5}#enp-quiz .enp-results-question__option__icon--correct{fill:#4e9497;opacity:1}#enp-quiz .enp-results-question__option__percentage--incorrect{color:#c1893e}#enp-quiz .enp-results-question__option__percentage--correct{color:#4e9497}#enp-quiz .enp-results-question__option__number-selected{font-weight:300}#enp-quiz .enp-slider-responses__title{font-size:1rem;text-transform:uppercase;font-weight:400;margin-top:1.6rem}#enp-quiz .enp-slider-responses__line-chart .ct-point{stroke-width:8px}#enp-quiz .enp-slider-responses__line-chart--high,#enp-quiz .enp-slider-responses__line-chart--low{stroke:#bf5700}#enp-quiz .enp-slider-responses__line-chart--correct{stroke:#60aaad}#enp-quiz .enp-slider-responses-table{width:100%}#enp-quiz .enp-slider-responses-table tr.enp-slider-responses-table__response--correct td,#enp-quiz .enp-slider-responses-table tr:nth-child(2n) td{background-color:#fff}#enp-quiz .enp-slider-responses-table__content{box-shadow:none;padding-top:1rem}#enp-quiz .enp-slider-responses-table--hide-zero .enp-slider-responses-table__frequency--zero{display:none}#enp-quiz .enp-slider-responses-table__response-frequency{display:flex;justify-content:space-between;align-items:center}#enp-quiz .enp-slider-responses-table__toggle-zero-frequency{background:#fff;width:100%;box-shadow:inset 1px 1px 0 #ccc,inset -1px -1px 0 #ccc;color:#1d1c25;font-family:Arial,monospace,helvetica,arial,sans-serif;font-size:.9rem;font-weight:400;line-height:1.5;text-transform:none;letter-spacing:0;text-align:left;border:none;border-radius:3px;min-height:3.065rem;padding:1rem 2rem 1rem 1rem;margin:1.6rem 0 0;position:relative;z-index:9;cursor:pointer;transition:all .2s cubic-bezier(0,0,.3,1);width:auto;padding:0 .6rem;margin:0}.enp-quiz-results #enp-quiz .enp-aside{border:none}.enp-quiz-results .enp-results-questions__title__quiz-title{clip:rect(1px,1px,1px,1px);position:absolute!important;left:-10000px;top:auto;width:1px;height:1px;overflow:hidden}#enp-quiz .enp-results--ab{display:block;margin-bottom:3rem}@media (min-width:1000px){#enp-quiz .enp-results--ab{display:flex;flex-wrap:wrap;align-content:flex-end;width:50%;padding:10px}}@media (min-width:1000px){#enp-quiz .enp-results--a{padding-right:1rem;border-right:1px solid #ddd}}@media (min-width:1000px){#enp-quiz .enp-results--b{padding-left:1rem}}#enp-quiz .enp-results-title--ab,#enp-quiz .enp-results__container--ab .enp-results-flow__container{min-width:100%}#enp-quiz .enp-results--loser .enp-results-flow__item{border:2px solid #bf5700}#enp-quiz .enp-results--loser .enp-results-flow__item--quiz-starts{background:#ffc696}#enp-quiz .enp-results--loser .enp-results-flow__item--quiz-finishes{background:#ffb06d}#enp-quiz .enp-results--loser .enp-results-questions__title,#enp-quiz .enp-results--loser th{color:#964400}#enp-quiz .enp-results--winner .enp-results-questions__title,#enp-quiz .enp-results--winner th{color:#4e9497}#enp-quiz .enp-results-title--a,#enp-quiz .enp-results-title--b{background:transparent}#enp-quiz .enp-ab-scores{max-width:740px;margin:0 auto}#enp-quiz .enp-ab-scores:after{content:"";display:table;clear:both}@media (min-width:700px){#enp-quiz .enp-ab-scores{max-width:1000px}}@media (min-width:1000px){#enp-quiz .enp-ab-scores{max-width:1440px}}#enp-quiz .enp-ab-scores th.enp-quiz-scores-table__label,#enp-quiz .enp-ab-scores th.enp-quiz-scores-table__score{padding-left:0;padding-right:0}#enp-quiz .enp-ab-scores__title{padding-left:50px;font-size:1rem;text-transform:uppercase}#enp-quiz .enp-quiz-score__line-chart .enp-test-loser .ct-line,#enp-quiz .enp-quiz-score__line-chart .enp-test-loser .ct-point{stroke:#bf5700}#enp-quiz .enp-quiz-scores{margin-top:0}#enp-quiz .enp-ab-scores .enp-quiz-scores-table,#enp-quiz .enp-question-results{margin-bottom:1.6rem}@media (min-width:1000px){#enp-quiz .enp-ab-scores .enp-quiz-scores-table,#enp-quiz .enp-question-results{float:left;width:48%;margin:0}#enp-quiz .enp-ab-scores .enp-quiz-scores-table:first-of-type,#enp-quiz .enp-question-results:first-of-type{margin-right:4%}}#enp-quiz .enp-question-results__container{max-width:740px;margin:0 auto;padding-top:3rem}#enp-quiz .enp-question-results__container:after{content:"";display:table;clear:both}@media (min-width:700px){#enp-quiz .enp-question-results__container{max-width:1000px}}@media (min-width:1000px){#enp-quiz .enp-question-results__container{max-width:1440px}}#enp-quiz .enp-question-results--ab .enp-results-questions__section{background:#fff;border:none;padding:1.6rem 0;margin:1.6rem auto}#enp-quiz .enp-question-results--ab .enp-results-questions__container{padding:0}#enp-quiz .enp-ab-new-embed-code__section{max-width:740px;margin:0 auto;max-width:540px;padding-bottom:2rem;margin-bottom:2rem}#enp-quiz .enp-ab-new-embed-code__section:after{content:"";display:table;clear:both}#enp-quiz .enp-ab-new-embed-code__section .enp-ab-embed-code{padding:0;margin:0}#enp-quiz .enp-ab-embed-code__section{background:#faf9fb;border-bottom:1px solid #ddd;border-top:1px solid #ddd;padding-top:3rem;padding-bottom:3rem;margin-top:3rem;margin-bottom:3rem;padding-top:5rem;margin-top:5rem}#enp-quiz .enp-ab-embed-code{max-width:740px;margin:0 auto}#enp-quiz .enp-ab-embed-code:after{content:"";display:table;clear:both}#enp-quiz .enp-ab-embed-code__title{font-size:1rem;text-transform:uppercase}#enp-quiz .enp-embed-code__textarea{margin-bottom:0}#enp-quiz .enp-embed-code__instructions{font-size:1.1rem}#enp-quiz .enp-slider{margin-bottom:1.6rem}#enp-quiz .enp-slider-input__container{display:flex;align-items:center;justify-content:center;margin:1.6rem auto;position:relative}#enp-quiz .enp-slider-input__label{display:block;color:#343242;font-weight:400;font-size:.85rem;text-transform:uppercase}#enp-quiz .enp-slider-input__prefix,#enp-quiz .enp-slider-input__suffix{font-size:1rem}#enp-quiz .enp-slider-input__prefix{margin-right:.2rem;white-space:pre}#enp-quiz .enp-slider-input__suffix{margin-left:.2rem;white-space:pre}#enp-quiz .enp-slider-input__input{font-size:1rem;font-family:Arial,monospace,helvetica,arial,sans-serif;padding:.8rem .5rem;background:#fff;border:1px solid #aaa;border-radius:3px;width:20rem;max-width:100%;margin-bottom:1.2rem;margin-bottom:0;padding:.75rem;width:auto;transition:all .25s cubic-bezier(0,0,.3,1)}@media (min-width:700px){#enp-quiz .enp-slider-input__input{padding:.8rem;width:100%}}#enp-quiz .enp-slider-input__input--incorrect{color:#bf5700}#enp-quiz .enp-slider-input__input--correct{color:#4e9497}#enp-quiz .enp-slider-input__input--invalid-animation{box-shadow:0 0 2px 1px #c1893e}#enp-quiz .enp-slider_input__range-helper{position:absolute;bottom:-1.2rem;font-size:.8rem}#enp-quiz .enp-slider_input__range-helper--low{left:0}#enp-quiz .enp-slider_input__range-helper--high{right:0}#enp-quiz .enp-slider-input__range-helper__number{position:relative;color:#e8e4ed}#enp-quiz .ui-slider-range-show-correct__tooltip-container{position:relative}#enp-quiz .ui-slider-range-show-correct__tooltip{position:absolute;top:-.4rem;margin-left:-.55rem;height:1rem;width:1.1rem;height:1.1rem;border:2px solid #60aaad;background-color:#fff;border-radius:50%;z-index:9999}#enp-quiz .ui-slider-range-show-correct__tooltip--low{left:0}#enp-quiz .ui-slider-range-show-correct__tooltip--high{right:-.55rem}#enp-quiz .ui-slider-range-show-correct__tooltip__text{position:relative;color:#417d7f;top:-1.35rem;font-size:.825rem;min-width:100%;display:inline-block;text-align:center;text-shadow:0 1px 0 #fff}#enp-quiz .enp-slider{position:relative;text-align:left;background:#ddd}#enp-quiz .enp-slider .ui-helper-hidden{display:none}#enp-quiz .enp-slider .ui-helper-hidden-accessible{border:0;clip:rect(0 0 0 0);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px}#enp-quiz .enp-slider .ui-helper-reset{margin:0;padding:0;border:0;outline:0;line-height:1.3;text-decoration:none;font-size:100%;list-style:none}#enp-quiz .enp-slider .ui-helper-clearfix:after,#enp-quiz .enp-slider .ui-helper-clearfix:before{content:"";display:table;border-collapse:collapse}#enp-quiz .enp-slider .ui-helper-clearfix:after{clear:both}#enp-quiz .enp-slider .ui-helper-clearfix{min-height:0}#enp-quiz .enp-slider .ui-helper-zfix{width:100%;height:100%;top:0;left:0;position:absolute;opacity:0;filter:alpha(opacity=0)}#enp-quiz .enp-slider .ui-front{z-index:100}#enp-quiz .enp-slider .ui-state-disabled{cursor:default!important}#enp-quiz .enp-slider .ui-icon{display:block;text-indent:-99999px;overflow:hidden;background-repeat:no-repeat}#enp-quiz .enp-slider .ui-widget-overlay{position:fixed;top:0;left:0;width:100%;height:100%}#enp-quiz .enp-slider .ui-slider-handle{background:#fff;border-radius:50%;border:1px solid #aaa;position:absolute;z-index:2;width:1.2rem;height:1.2rem;top:-.4rem;margin-left:-.6rem;cursor:default;touch-action:none;transition:opacity .2s cubic-bezier(0,0,.3,1),height .18s cubic-bezier(0,0,.3,1),width .18s cubic-bezier(0,0,.3,1),transform .18s cubic-bezier(0,0,.3,1)}#enp-quiz .enp-slider .ui-slider-handle:focus{outline:none;box-shadow:0 0 3px 1px #4d90fe}#enp-quiz .enp-slider .ui-slider-handle--correct,#enp-quiz .enp-slider .ui-slider-handle--incorrect{width:1.1rem;height:1.1rem;top:-.4rem;margin-left:-.55rem}#enp-quiz .enp-slider .ui-slider-handle--incorrect{z-index:1;border:2px solid #bf5700}#enp-quiz .enp-slider .ui-slider-handle--correct{border:2px solid #60aaad;z-index:99999}#enp-quiz .enp-slider .ui-slider-range{position:absolute;z-index:1;font-size:.7rem;display:block;border:0;background-position:0 0;top:0;height:100%}#enp-quiz .enp-slider .ui-slider-range-show-correct{background:#60aaad;z-index:9}#enp-quiz .enp-slider .ui-slider-range-min{left:0;background:#00a9b7}#enp-quiz .enp-slider .ui-slider-range-max{right:0}#enp-quiz .enp-slider.ui-state-disabled .ui-slider-handle,#enp-quiz .enp-slider.ui-state-disabled .ui-slider-range{filter:inherit}#enp-quiz .ui-slider-horizontal{height:.3rem}#enp-quiz .enp-question__answered .enp-slider{background:#bbb}#enp-quiz .enp-question__answered .ui-slider-range-min{background:#fff} /*# sourceMappingURL=enp_quiz-create.min.css.map */ diff --git a/public/quiz-create/css/enp_quiz-create.min.css.map b/public/quiz-create/css/enp_quiz-create.min.css.map index 16a87c9e..c46b3f91 100644 --- a/public/quiz-create/css/enp_quiz-create.min.css.map +++ b/public/quiz-create/css/enp_quiz-create.min.css.map @@ -1 +1 @@ -{"version":3,"sources":["_setup.scss","_utilities.scss","_variables.scss","_structure.scss","_typography.scss","_animations.scss","_base.scss","_forms.scss","_quiz-create.scss","_quiz-preview.scss","_quiz-publish.scss","_ab-create.scss","_dashboard.scss","_breadcrumbs.scss","_quiz-results.scss","_ab-results.scss","../../../quiz-take/css/sass/_slider.scss"],"names":[],"mappings":"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","file":"enp_quiz-create.min.css","sourcesContent":["html {\n font-size: 16px!important; // set our rem value reference\n}\n\nhtml #enp-quiz {\n box-sizing: border-box;\n}\n\nbody #enp-quiz {\n background: #fff;\n overflow: hidden;\n}\n\n#enp-quiz {\n *, *:before, *:after {\n box-sizing: inherit;\n }\n\n ul, ol {\n margin: 0 0 1.6rem 1.25rem;\n padding: 0;\n }\n\n textarea {\n margin-bottom: 1rem;\n }\n\n button, input[type=\"button\"], input[type=\"reset\"], input[type=\"submit\"] {\n border: none;\n &:active,\n &:focus,\n &:hover {\n border: none;\n }\n }\n\n iframe {\n border: none;\n }\n}\n","@mixin focus--glow {\n outline-color: #4D90FE;\n outline-offset: -2px;\n outline-style: auto;\n outline-width: 5px;\n}\n\n@mixin disabled {\n opacity: 0.65;\n cursor: default;\n}\n\n@mixin btn {\n text-align: center;\n border: none;\n border-radius: 3px;\n padding: .85em 1.4em .75em;\n font-size: 15px;\n font-weight: 400;\n letter-spacing: .05em;\n color: #fff;\n box-shadow: inset 0 -2px 0 rgba(0,0,0,.2);\n background: $link;\n cursor: pointer;\n text-transform: uppercase;\n transition: all .2s;\n line-height: 1.6;\n\n &:focus,\n &:hover {\n color: #fff;\n box-shadow: none;\n background: $link_hover;\n }\n\n &:active {\n color: #fff;\n box-shadow: inset 0 2px 0 rgba(0,0,0,.1);\n background: lighten($blue, 20);\n }\n\n &:focus {\n @include focus--glow;\n }\n\n &:disabled,\n &:disabled:focus,\n &:disabled:hover {\n background: $link;\n cursor: default;\n opacity: .5;\n\n\n }\n}\n\n@mixin btn--reset {\n border: none;\n background: none;\n box-shadow: none;\n padding: 0;\n margin: 0;\n}\n\n@mixin btn--submit {\n @include btn;\n}\n\n@mixin btn--ghost {\n @include btn;\n border: 2px solid $link;\n background: transparent;\n color: $link;\n box-shadow: none;\n\n &:focus,\n &:hover {\n background: transparent;\n border: 2px solid $link_hover;\n color: $link_hover;\n }\n}\n\n@mixin box-shadow {\n box-shadow: 0 2px 2px rgba(0,0,0,.2);\n}\n\n@mixin btn--dashed {\n @include btn;\n border: 1px dashed $darker_gray;\n background: none;\n color: #545454;\n box-shadow: none;\n\n &:hover,\n &:focus {\n border: 1px dashed $darkest_gray;\n color: $darker_gray;\n background: rgba(255,255,255,.9);\n }\n}\n\n@mixin btn--dashed--light {\n @include btn--dashed;\n border: 2px dashed $darker-gray;\n color: $dark_gray;\n transition: all .2s;\n\n &:hover,\n &:focus {\n color: $darker_gray;\n border: 2px dashed #999;\n }\n}\n\n@mixin btn--dashed--light--alt-bg {\n @include btn--dashed--light ;\n background: $light_gray;\n}\n\n@mixin btn--small {\n font-size: 13px;\n}\n\n@mixin btn--thin {\n padding: 0.4em 1em;\n}\n\n@mixin btn--icon {\n @include btn;\n padding: .75em 0.8em .7em 1.4em;\n}\n\n@mixin btn--icon__icon {\n @include icon--white;\n @include icon--xl;\n position: relative;\n top: 4px;\n}\n\n/*\n* @usage: @include btn--icon(BEM-root-class);\n* Button with icon with white circular background.\n* --------------\n* | BTN TEXT > |\n* --------------\n* @param $rootBEM: root class name that will be extended\n\n@mixin btn--icon($rootBEM) {\n .(#){$rootBEM} {\n @include btn--icon;\n }\n\n .(#){$rootBEM}__icon {\n @include btn--icon__icon ;\n }\n}\n*/\n\n@mixin btn--icon--icon-circle {\n @include btn;\n padding: .65em 1.2em .85em 1.4em;\n}\n\n// use when the icon is larger and on the right\n@mixin btn--icon__icon--circle {\n @include icon--circle;\n @include icon--white-bg;\n @include icon--normal;\n margin-left: 0.5em;\n position: relative;\n top: 0.15rem;\n}\n\n@mixin btn--icon__icon--circle--hover {\n @include icon--white-bg--hover;\n}\n\n/*\n* @usage: @include btn--icon--circle(BEM-root-class);\n* Button with icon with white circular background.\n* ---------------\n* | BTN TEXT (>) |\n* ---------------\n* @param $rootBEM: root class name that will be extended\n*/\n@mixin btn--icon--circle($rootBEM) {\n .#{$rootBEM} {\n @include btn--icon--icon-circle;\n }\n\n .#{$rootBEM}__icon {\n @include btn--icon__icon--circle ;\n\n\n &:hover {\n @include btn--icon__icon--circle--hover ;\n }\n }\n}\n\n/*\n* @usage: @include btn--icon--hover-circle(BEM-root-class);\n* Button with icon. Hovering/focusing button moves\n* the icon to right and fades in a white circular background\n* -------------- ----------------\n* | BTN TEXT > | --hover/focus--> | BTN TEXT (>) |\n* -------------- ----------------\n* @param $rootBEM: root class name that will be extended\n*/\n@mixin btn--icon--hover-circle($rootBEM) {\n .#{$rootBEM} {\n @include btn--icon--icon-circle;\n padding-right: 0.8em;\n }\n\n .#{$rootBEM}__icon {\n @include btn--icon__icon--circle ;\n margin-left: 0;\n width: 1em;\n height: 1em;\n background: transparent;\n fill: #fff;\n transform: translate3d(0, 0, 0);\n transition: all .3s ease-in-out;\n }\n\n .#{$rootBEM}:hover .#{$rootBEM}__icon {\n @include btn--icon__icon--circle--hover ;\n transform: translate3d(1em, 0, 0);\n margin-right: 1em;\n }\n\n\n}\n\n// use on small icons and placed on the left\n@mixin btn--icon__icon--circle--small {\n @include icon--circle--small;\n margin-right: 5px;\n}\n\n\n// use this to match the icon to the inline font-size\n@mixin icon--inline {\n width: 1em;\n height: 1em;\n position: relative;\n top: .125em;\n}\n\n@mixin icon--small {\n width: 1rem;\n height: 1rem;\n}\n\n@mixin icon--normal {\n width: 1.2rem;\n height: 1.2rem;\n}\n\n@mixin icon--large {\n width: 1.5rem;\n height: 1.5rem;\n}\n\n@mixin icon--xl {\n width: 1.8rem;\n height: 1.8rem;\n}\n\n@mixin icon--xxl {\n width: 2.4rem;\n height: 2.4rem;\n}\n\n@mixin icon--xxxl {\n width: 2.8rem;\n height: 2.8rem;\n}\n\n@mixin icon--circle {\n border-radius: 50%;\n fill: #fff;\n}\n\n@mixin border-radius {\n border-radius: 3px;\n}\n\n@mixin icon--circle--pad {\n @include icon--circle ;\n padding: 0.05em;\n\n @include breakpoint(medium) {\n padding: 0.15em;\n }\n}\n\n@mixin icon--circle--pad--xl {\n @include icon--circle ;\n padding: 0.6rem;\n}\n\n@mixin icon--circle--small {\n @include icon--small;\n @include icon--circle;\n padding: 0.02rem;\n}\n\n@mixin icon--white {\n fill: #fff;\n}\n\n@mixin icon--white-bg {\n background: #fff;\n fill: $link;\n}\n\n@mixin icon--white-bg--hover {\n background: #fff;\n fill: $link_hover;\n}\n\n@mixin icon--gray-bg {\n background: $dark_gray;\n fill: $light_gray;\n}\n\n@mixin icon--gray-bg--hover {\n fill: #fff;\n background: $darker_gray;\n}\n\n@mixin small-uppercase {\n font-size: 1rem;\n text-transform: uppercase;\n}\n\n@mixin hint {\n font-size: .7rem;\n font-weight: 300;\n color: #565656;\n}\n\n@mixin green {\n color: $green;\n}\n\n@mixin dark-green {\n color: $dark_green;\n}\n\n@mixin red {\n color: $red;\n}\n\n@mixin fade-red {\n color: $fade_red;\n}\n\n/* Text meant only for screen readers */\n@mixin screen-reader-text {\n clip: rect(1px, 1px, 1px, 1px);\n position: absolute !important;\n left:-10000px;\n top:auto;\n width:1px;\n height:1px;\n overflow:hidden;\n}\n\n@mixin screen-reader-text--hover {\n background-color: #f1f1f1;\n border-radius: 3px;\n box-shadow: 0 0 2px 2px rgba(0, 0, 0, 0.6);\n clip: auto !important;\n color: #21759b;\n display: block;\n font-size: 14px;\n font-weight: bold;\n height: auto;\n left: 5px;\n line-height: normal;\n padding: 15px 23px 14px;\n text-decoration: none;\n top: 5px;\n width: auto;\n z-index: 100000;\n}\n\n@mixin xmargin-vertical {\n margin-top: 2rem;\n margin-bottom: 2rem;\n}\n\n@mixin xmargin-horizontal {\n margin-right: 2rem;\n margin-left: 2rem;\n}\n\n@mixin xpadding-vertical {\n padding-top: 2rem;\n padding-bottom: 2rem;\n}\n\n@mixin xpadding-vertical-top {\n padding-top: 2rem;\n}\n\n@mixin xpadding-horizontal {\n padding-right: 2rem;\n padding-left: 2rem;\n}\n\n@mixin header-space {\n @include breakpoint(large) {\n padding-top: 7rem;\n }\n}\n\n@mixin ul-no-style {\n list-style: none;\n margin-left: 0;\n}\n\n@mixin hidden--accessible {\n height: 0;\n opacity: 0;\n padding: 0;\n overflow: hidden;\n}\n\n@mixin accordion {\n background: #fff;\n width: 100%;\n}\n\n@mixin accordion__header {\n @include accordion ;\n box-shadow: inset 1px 1px 0 #ccc, inset -1px -1px 0 #ccc;\n color: $font;\n font-family: $fontTitle;\n font-size: .9rem;\n font-weight: 400;\n line-height: 1.5;\n text-transform: none;\n letter-spacing: 0;\n text-align: left;\n border: none;\n border-radius: 3px;\n min-height: 3.065rem;\n padding: 1rem 2rem 1rem 1rem;\n margin: 1.6rem 0 0;\n position: relative;\n z-index: 9;\n cursor: pointer;\n transition: all .2s $fastInEaseOut;\n}\n\n@mixin accordion__content {\n @include accordion ;\n box-shadow: inset 1px -1px 0 #ccc, inset -1px -1px 0 #ccc;\n display: block;\n position: relative;\n height: auto;\n overflow: visible;\n margin-bottom: 1.6rem;\n}\n\n@mixin accordion__content--closed {\n margin-top: 0;\n padding-top: 0rem;\n animation: slideOutTop .25s $fastInEaseOut forwards;\n display: none;\n}\n\n@mixin accordion__content--open {\n padding-top: 1.6rem;\n margin-bottom: 2rem;\n animation: slideInTop .45s $fastInEaseOut forwards;\n}\n\n// Share Icons\n@mixin share_icons($rootBEM) {\n\n .#{$rootBEM} {\n @include ul-no-style;\n @include flex-center;\n }\n\n .#{$rootBEM}__item {\n margin-right: 20px;\n\n &:last-child {\n margin-right: 0;\n }\n }\n\n .#{$rootBEM}__item__icon {\n @include icon--xxl;\n @include icon--circle--pad--xl;\n\n fill: #fff!important;\n }\n\n .#{$rootBEM}__item__icon--facebook {\n background-color: #3a5795;\n }\n\n .#{$rootBEM}__item__icon--twitter {\n background-color: #4099ff;\n }\n}\n\n@mixin section--alt {\n background: $light_gray;\n border-bottom: 1px solid #ddd;\n border-top: 1px solid #ddd;\n padding-top: 3rem;\n padding-bottom: 3rem;\n margin-top: 3rem;\n margin-bottom: 3rem;\n}\n\n#enp-quiz {\n .enp-screen-reader-text {\n @include screen-reader-text;\n }\n\n .enp-screen-reader-text:hover,\n .enp-screen-reader-text:active,\n .enp-screen-reader-text:focus {\n @include screen-reader-text--hover;\n }\n\n .enp-accordion-header {\n @include accordion__header ;\n\n &:first-of-type {\n margin-top: 0;\n }\n\n .enp-accordion-header__icon {\n position: absolute;\n fill: $dark_gray;\n right: 0.75rem;\n bottom: 0.75rem;\n transition: all .35s $fastInEaseOut;\n }\n }\n\n .enp-accordion-header--open {\n\n .enp-accordion-header__icon {\n transform: rotateX(180deg);\n }\n\n }\n\n .enp-quiz-settings__form .enp-accordion-header {\n position: relative;\n overflow-y: hidden;\n }\n\n .enp-accordion-content {\n @include accordion__content ;\n }\n\n .enp-accordion-content--closed {\n @include accordion__content--closed ;\n }\n\n .enp-accordion-content--open {\n @include accordion__content--open ;\n }\n\n .enp-quiz-message {\n @include container--thin;\n background: #fff;\n border: 1px solid #eee;\n border-bottom: 1px solid #ccc;\n padding: 1rem;\n margin-bottom: 1.6rem;\n position: fixed;\n bottom: 0;\n left: 0;\n }\n\n .enp-quiz-message__title {\n @include small-uppercase;\n }\n\n .enp-message__list {\n @include ul-no-style;\n font-size: 1.1rem;\n margin-bottom: 0;\n }\n\n .enp-quiz-message--error {\n border-left: 6px solid $red;\n color: $red;\n }\n\n .enp-quiz-message__title--error {\n color: $dark_red;\n }\n\n .enp-quiz-message--success {\n border-left: 6px solid $green;\n color: $dark_green;\n }\n\n .enp-quiz-message__title--success {\n color: $dark_green;\n }\n\n .enp-quiz-message--note {\n border-left: 6px solid $khaki;\n }\n\n .enp-quiz-message__title--note {\n color: $dark_blue;\n }\n\n .enp-quiz-message__close {\n @include btn--reset;\n position: absolute;\n top: 5px;\n right: 5px;\n }\n\n .enp-quiz-message--ajax {\n margin-bottom: .6rem;\n animation: slideInBottom .3s;\n }\n\n .enp-quiz-message-ajax-container {\n z-index: 9999;\n position: fixed;\n bottom: 10px;\n }\n\n .enp-quiz-message--saving__spinner {\n margin-left: -10px;\n }\n\n .enp-quiz-message--saving__text {\n font-size: 1rem;\n }\n\n textarea.limited-chars,\n input.limited-chars {\n margin-bottom: 0.2rem;\n }\n\n .limited-chars__container {\n color: lighten($dark_gray, 8);\n font-size: 0.8rem;\n display: block;\n text-align: right;\n margin-bottom: 1.2rem;\n }\n\n .limited-chars__counter {\n color: $dark_gray;\n }\n\n .limited-chars__container--error {\n color: $dark_red;\n\n .limited-chars__counter {\n color: $dark_red;\n }\n }\n\n textarea.has-error,\n input.has-error {\n border: 1px solid $red;\n &:focus {\n outline-color: $red;\n }\n\n }\n\n\n\n .enp-tooltip {\n position: relative;\n }\n\n .enp-tooltip__activator {\n\n &:focus + .enp-tooltip__description,\n &:focus > .enp-tooltip__description {\n display: block;\n }\n }\n\n .enp-tooltip__description {\n display: none;\n position: absolute;\n left: 103%;\n margin-bottom: 2rem;\n border-radius: 3px;\n background: $light_gray;\n font-size: 0.9rem;\n padding: 0.9rem;\n max-width: 200px;\n }\n\n\n}\n\n.enp-sticky {\n position: relative;\n left: 0;\n right: 0;\n top: 0;\n z-index: 999;\n\n &.enp-sticky--fixed {\n position: fixed;\n }\n}\n\n.enp-breadcrumb-link {\n font-size: 0.85rem;\n}\n\n.enp-breadcrumb-link__icon {\n position: relative;\n top: 0.45rem;\n left: 0.4rem;\n}\n","//fonts\n$fontBody : Arial,monospace, helvetica, arial, sans-serif;\n$fontTitle : Arial,monospace, helvetica, arial, sans-serif;\n\n// // // colors\n$font : #1d1c25;\n$background: #FAF9FB;\n$title : #5D5E5F;\n\n// Blues\n$blue: #00A9B7;\n$dark_blue: #333F48;\n$light_blue: lighten($dark_blue, 40);\n\n// Grays\n$light_gray: #FAF9FB;\n$really_light_gray: lighten($light_gray, 1);\n$gray: darken($light_gray, 2);\n$dark_gray: darken($gray, 5);\n$darker_gray: darken($dark_gray, 20);\n$darkest_gray: darken($dark_gray, 50);\n\n// Other colors\n$khaki: #CCA562;\n$green: #60AAAD;\n$dark_green: darken($green, 8);\n$red: #bf5700;\n$dark_red: darken($red, 8);\n$fade_red: #C1893E;\n\n// Elements\n$link: #bf5700;\n$link_hover: darken($link, 8);\n// animation\n$fastInEaseOut: cubic-bezier(0.000, 0, .3, 1);\n\n\n$breakpoints: (\n \"small\" : 400px,\n \"medium\" : 700px,\n \"large\" : 1000px\n);\n\n// -----------------------------------------------------------------------------\n// Core\n// -----------------------------------------------------------------------------\n\n// Caching current breakpoint\n// Not meant to be manually edited\n$default-breakpoint: root;\n$current-breakpoint: $default-breakpoint;\n\n// The usual breakpoint mixin\n// Except it updates the $current-breakpoint variable\n// 1. If breakpoint name exists in map\n// 2. Update $current-breakpoint\n// 3. Open a media query\n// 4. Let the user dump content\n// 5. Then reset $current-breakpoint\n// 6. If breakpoint name doesn't exist in map, warn the user\n@mixin breakpoint($breakpoint) {\n $value: map-get($breakpoints, $breakpoint);\n\n @if $value != null { // 1\n $current-breakpoint: $breakpoint !global; // 2\n @media (min-width: $value) { @content; } // 3\n $current-breakpoint: $default-breakpoint !global; // 5\n }\n\n @else {\n @warn \"Invalid breakpoint `#{$breakpoint}`.\"; // 6\n }\n}\n\n// for only targeting a specific device\n// NOTE: DOESN'T SUPPORT THE @include placeholders!!!\n@mixin media($query) {\n @if $query == max-small {\n $media_query: \"max-width: #{map-get($breakpoints, \"small\")}\";\n } @else if $query == only-medium {\n $media_query: \"min-width: #{map-get($breakpoints, \"medium\")}) and (max-width: #{(map-get($breakpoints, \"large\") - 1px)}\";\n } @else if $query == max-medium {\n $media_query: \"max-width: #{(map-get($breakpoints, \"medium\") - 1px)}\";\n } @else if $query == max-large {\n $media_query: \"max-width: #{(map-get($breakpoints, \"large\") - 1px)}\";\n } @else {\n // just use the number provided as a max width\n $media_query: \"max-width: #{$query}\";\n }\n\n @if variable-exists(media_query) {\n @media ($media_query) {\n @content;\n }\n }\n\n}\n","@mixin clearfix {\n &:after {\n content: \"\";\n display: table;\n clear: both;\n }\n}\n\n@mixin container {\n max-width: 740px;\n margin: 0 auto;\n @include clearfix;\n}\n\n@mixin well {\n padding: 1.6rem;\n margin-bottom: 1.6rem;\n background: $light_blue;\n @include border-radius;\n border: 1px solid #eee;\n border-bottom-color: #ccc;\n\n @include breakpoint(medium) {\n margin-bottom: 2.6rem;\n padding: 1.6rem 2rem;\n }\n}\n\n@mixin container--wide {\n @include container;\n\n @include breakpoint(medium) {\n max-width: 1000px;\n }\n\n @include breakpoint(large) {\n max-width: 1440px;\n }\n}\n\n\n@mixin container--thin {\n @include container;\n // max-width: 512px;\n}\n\n@mixin container--really-thin {\n @include container;\n max-width: 300px;\n}\n\n@mixin container--form {\n @include container--thin;\n\n .enp-input,\n .enp-textarea {\n width: 100%;\n }\n}\n\n@mixin container--form--thin {\n @include well;\n @include container--really-thin;\n\n .enp-input,\n .enp-textarea {\n width: 100%;\n }\n}\n\n@mixin flex-container { // no pseudo element to clear and break spacing\n @include container;\n}\n\n@mixin flex-container--wide { // no pseudo element to clear and break spacing\n @include flex-container;\n\n @include breakpoint(medium) {\n max-width: 840px;\n }\n\n @include breakpoint(large) {\n max-width: 1000px;\n }\n}\n\n@mixin flex {\n display: flex;\n}\n\n@mixin flex-list__item {\n flex-basis: 100%;\n margin: 0;\n border-bottom-color: #ddd;\n}\n\n@mixin flex-spread {\n @include flex;\n justify-content: space-between;\n}\n\n@mixin flex-spread-vertical {\n @include flex-spread;\n flex-direction: column;\n}\n\n@mixin flex-spread-around {\n @include flex;\n justify-content: space-around;\n}\n\n@mixin flex-bottom {\n @include flex;\n align-items: flex-end;\n align-content: flex-end;\n}\n\n@mixin flex-center {\n @include flex;\n justify-content: center;\n align-content: center;\n align-items: center;\n}\n\n@mixin flex-vertical-center {\n @include flex;\n align-content: center;\n align-items: center;\n}\n\n@mixin flex-inline {\n @include flex;\n @include ul-no-style;\n margin-bottom: 0;\n}\n\n@mixin flex-inline__item {\n margin-right: 10px;\n\n &:last-of-type {\n margin-right: 0;\n }\n}\n\n\n@mixin flex-grid {\n @include flex;\n flex-flow: column wrap;\n align-items: stretch;\n @include ul-no-style;\n}\n\n@mixin flex-grid__item {\n flex-basis: 100%;\n padding: 1rem 1.2rem;\n background: #fff;\n border: 1px solid #eee;\n border-bottom: 1px solid #ddd;\n list-style: none;\n transition: all .35s $fastInEaseOut;\n margin: 0 0 0.8rem;\n\n // @include breakpoint(medium) {\n // flex-basis: 100%;\n // max-width: 100%;\n // margin: 0 2% 0.8rem 0;\n\n // &:nth-child(2n) {\n // margin-right: 0;\n // }\n // }\n\n // @include breakpoint(large) {\n // flex-basis: 100%;\n // max-width: 100%;\n // margin-right: 1.25%;\n\n // &:nth-child(2n) {\n // margin-right: 1.25%;\n // }\n\n // &:nth-child(3n) {\n // margin-right: 0;\n // }\n // }\n}\n\n@mixin flex-grid__title {\n font-size: 1rem;\n padding-bottom: 0.5rem;\n}\n","body #enp-quiz {\n color: $font;\n font-family: $fontBody;\n font-size: 1em;\n line-height: 1.6;\n font-weight: 400;\n\n @include breakpoint(medium) {\n font-size: 1.3em;\n }\n}\n\n#enp-quiz {\n /* Headings */\n h1,h2,h3,h4,h5,h6 {\n font-family: $fontTitle;\n color: $title;\n clear: both;\n margin: 0 0 .2rem;\n font-weight: bold;\n line-height: 1.2em;\n }\n\n h1 {\n font-size: 2em;\n }\n\n h2 {\n font-size: 1.75em;\n }\n\n h3 {\n font-size: 1.475em;\n }\n\n h4 {\n font-size: 1.3em;\n }\n\n h5 {\n font-size: 1.125em;\n }\n\n h6 {\n font-size: 1em;\n }\n\n p+h1, ul+h1,\n p+h2, ul+h2,\n p+h3, ul+h3,\n p+h4, ul+h4,\n p+h5, ul+h5,\n p+h6, ul+h6 {\n margin-top: 1.8em;\n }\n\n /* Text elements */\n p {\n font-size: 0.85em;\n margin-bottom: 1.125em;\n font-weight: 300;\n }\n ul, ol {\n margin: 0 0 1.6em 1.25em;\n }\n ul {\n list-style: disc;\n }\n ol {\n list-style: decimal;\n }\n li > ul,\n li > ol {\n margin-bottom: 0;\n margin-left: 1.6em;\n }\n\n b, strong {\n font-weight: bold;\n }\n\n dfn, cite, em {\n font-family: georgia, times, serif;\n font-style: italic;\n }\n\n pre {\n background: #eee;\n font-family: \"Courier 10 Pitch\", Courier, monospace;\n font-size: .95em;\n line-height: 1.6;\n margin-bottom: 1.6em;\n padding: 1.6em;\n overflow: auto;\n max-width: 100%;\n }\n .code, code, kbd, tt, var {\n font: .7em Monaco, Consolas, \"Andale Mono\", \"DejaVu Sans Mono\", monospace;\n }\n\n table {\n border: none;\n\n th {\n font-family: $fontTitle;\n font-size: .8rem;\n text-transform: uppercase;\n border: none;\n border-bottom: 1px solid #ddd;\n }\n\n td {\n font-family: $fontBody;\n font-size: 1rem;\n border: none;\n border-bottom: 1px solid #eee;\n }\n\n tr:nth-child(even) td {\n background: $really_light_gray;\n }\n\n tr:last-child td {\n border-bottom: none;\n }\n }\n\n figure {\n margin: 0;\n }\n\n img {\n height: auto; /* Make sure images are scaled correctly. */\n max-width: 100%; /* Adhere to container width. */\n }\n\n /* Links */\n a {\n color: $link;\n text-decoration: none;\n transition: color .2s;\n touch-action: manipulation; // remove 300ms delay for ie\n\n .enp-icon {\n fill: $link;\n }\n }\n\n a:hover,\n a:focus,\n a:active {\n color: $link_hover;\n\n .enp-icon {\n fill: $link_hover;\n }\n }\n\n button {\n &:focus {\n @include focus--glow;\n }\n }\n\n .enp-btn {\n @include btn;\n }\n\n\n .enp-btn--add {\n @include btn--dashed;\n width: 100%;\n }\n\n .enp-btn--disabled {\n @include disabled;\n }\n\n .enp-btn--enabled {\n animation: expand .6s;\n }\n\n .enp-icon {\n width: 24px;\n height: 24px;\n transition: all .2s;\n }\n\n .enp-page-title {\n font-size: 1.6rem;\n }\n}\n","@keyframes slideInBottom {\n 0% {\n opacity: 0;\n transform: translate3d(0, 100px, 0);\n }\n 100% {\n opacity: 1;\n transform: translate3d(0, 0, 0);\n }\n}\n\n@keyframes slideInTop {\n 0% {\n opacity: 0;\n height: auto;\n transform: translate3d(0, -20px, 0);\n }\n 100% {\n opacity: 1;\n height: auto;\n transform: translate3d(0, 0, 0);\n }\n}\n\n@keyframes slideInTop--reduced-opacity {\n 0% {\n opacity: 0;\n height: auto;\n transform: translate3d(0, -20px, 0);\n }\n 100% {\n opacity: 0.8;\n height: auto;\n transform: translate3d(0, 0, 0);\n }\n}\n\n\n@keyframes slideOutTop {\n 0% {\n overflow: hidden;\n height: 100px;\n opacity: 1;\n transform: translate3d(0, 0, 0);\n }\n 100% {\n height: 0;\n opacity: 0;\n transform: translate3d(0, -20px, 0);\n }\n}\n\n@keyframes removeElement {\n 0% {\n opacity: 1;\n transform: translate3d(0, 0, 0);\n }\n 100% {\n padding: 0;\n margin: 0;\n opacity: 0;\n height: 0;\n z-index: -1;\n transform: translate3d(-200px, 0, 0);\n }\n}\n\n@keyframes removeAnswers {\n 0% {\n opacity: 1;\n transform: translate3d(0, 0, 0);\n }\n 100% {\n padding: 0;\n opacity: 0;\n display: none;\n height: 0;\n z-index: -1;\n transform: translate3d(-200px, 0, 0);\n }\n}\n\n@keyframes removeQuestion {\n 0% {\n opacity: 1;\n transform: translateX(0);\n }\n 100% {\n opacity: 0;\n transform: translateX(-200px);\n }\n}\n\n@keyframes showNextQuestion {\n 0% {\n opacity: 0;\n transform: translateX(200px);\n }\n\n 100% {\n opacity: 1;\n transform: translateX(0);\n }\n}\n\n@keyframes expand {\n 0% {\n opacity: 0.8;\n transform: scale3d(1, 1, 1);\n box-shadow: 0 0 0px rgba(0,0,0,.3);\n }\n\n 40% {\n opacity: 1;\n }\n\n 70% {\n opacity: 1;\n transform: scale3d(1.1, 1.1, 1);\n box-shadow: 0 0 8px rgba(0,0,0,.4);\n }\n\n 100% {\n opacity: 1;\n transform: scale3d(1, 1, 1);\n box-shadow: 0 0 0px rgba(0,0,0,.3), inset 0 2px 0 rgba(0,0,0,.2);\n }\n}\n\n@keyframes checkmark {\n 0% {\n opacity: 0;\n transform: scale3d(0.2, 0.2, 1);\n }\n 5% {\n opacity: 1;\n }\n 10% {\n transform: scale3d(1.4, 1.4, 1);\n }\n 12% {\n transform: scale3d(1, 1, 1);\n }\n 90% {\n opacity: 1;\n transform: scale3d(1, 1, 1);\n }\n 92% {\n transform: scale3d(1.4, 1.4, 1);\n }\n 100% {\n opacity: 0;\n transform: scale3d(0.2, 0.2, 1);\n }\n\n}\n\n@keyframes fadeOut {\n 0% {\n opacity: 1;\n }\n 100% {\n opacity: 0;\n }\n}\n\n@keyframes fadeIn {\n 0% {\n opacity: 0;\n }\n 100% {\n opacity: 1;\n }\n}\n\n@keyframes navSlideIn {\n 0% {\n transform: translate3d(0, -200px, 0);\n }\n 100% {\n transform: translate3d(0, 0, 0);\n }\n}\n\n\n.spinner {\n margin: 0 auto;\n width: 70px;\n text-align: center;\n}\n\n.spinner > div {\n width: 18px;\n height: 18px;\n background-color: #333;\n\n border-radius: 100%;\n display: inline-block;\n -webkit-animation: sk-bouncedelay 1.4s infinite ease-in-out both;\n animation: sk-bouncedelay 1.4s infinite ease-in-out both;\n}\n\n.spinner .bounce1 {\n -webkit-animation-delay: -0.32s;\n animation-delay: -0.32s;\n}\n\n.spinner .bounce2 {\n -webkit-animation-delay: -0.16s;\n animation-delay: -0.16s;\n}\n\n@-webkit-keyframes sk-bouncedelay {\n 0%, 80%, 100% { -webkit-transform: scale(0) }\n 40% { -webkit-transform: scale(1.0) }\n}\n\n@keyframes sk-bouncedelay {\n 0%, 80%, 100% {\n -webkit-transform: scale(0);\n transform: scale(0);\n } 40% {\n -webkit-transform: scale(1.0);\n transform: scale(1.0);\n }\n}\n","#enp-quiz {\n transition: background .25s $fastInEaseOut;\n\n .enp-container {\n // @include container;\n }\n\n .enp-aside {\n @include well;\n @include container--thin;\n font-size: 1.2rem;\n }\n\n .enp-aside__title {\n @include small-uppercase;\n font-weight: 600;\n }\n\n .enp-page-title {\n border-bottom: 2px solid $blue;\n }\n}\n","\n\n// enter the root BEM class and this will output the correct CSS for you\n@mixin radio-block($rootBEM) {\n .#{$rootBEM}__legend {\n @include radio-block__legend ;\n }\n\n .#{$rootBEM}__input {\n @include radio-block__input ;\n }\n\n .#{$rootBEM}__label {\n @include radio-block__label ;\n }\n\n .#{$rootBEM}__input:checked + .#{$rootBEM}__label {\n @include radio-block__label--checked ;\n }\n\n .#{$rootBEM}__input:focus + .#{$rootBEM}__label {\n @include radio-block__label--focus ;\n }\n}\n\n@mixin radio-inline($rootBEM) {\n .#{$rootBEM}__legend {\n @include radio-inline__legend ;\n }\n\n .#{$rootBEM}__input {\n @include radio-inline__input ;\n }\n\n .#{$rootBEM}__label {\n @include radio-inline__label ;\n }\n\n .#{$rootBEM}__input:checked + .#{$rootBEM}__label {\n @include radio-inline__label--checked ;\n }\n\n .#{$rootBEM}__input:focus + .#{$rootBEM}__label {\n @include radio-inline__label--focus ;\n }\n\n}\n\n@mixin label {\n display: block;\n color: lighten($font, 10);\n font-weight: normal;\n font-size: 0.85rem;\n text-transform: uppercase;\n}\n\n@mixin legend {\n @include label;\n padding-top: 1.6rem;\n margin-bottom: 0.2rem;\n border: none;\n}\n\n@mixin label--bold {\n @include label;\n font-weight: 500;\n}\n\n@mixin legend--bold {\n @include label--bold;\n}\n\n@mixin input {\n font-size: 1rem;\n font-family: $fontBody;\n padding: 0.8rem 0.5rem;\n background: #fff;\n border: 1px solid #aaa;\n border-radius: 3px;\n width: 20rem;\n max-width: 100%;\n margin-bottom: 1.2rem;\n\n @include breakpoint(medium) {\n padding: 0.8rem;\n width: 100%;\n }\n}\n\n@mixin input--large {\n @include input;\n padding: 1rem 1.2rem;\n font-size: 1rem;\n}\n\n@mixin input--xl {\n @include input;\n font-weight: bold;\n font-size: 1.6rem;\n margin-bottom: 1rem;\n\n &::placeholder {\n font-weight: bold;\n }\n}\n\n@mixin textarea {\n @include input;\n line-height: 1.5;\n\n &:focus {\n @include focus--glow;\n }\n}\n\n\n/*\n@mixin no-radio__input {\n display: inline-block;\n width: 0;\n margin: 0;\n padding: 0;\n opacity: 0;\n overflow: hidden;\n}\n\n@mixin no-radio__label {\n display: inline-block;\n position: relative;\n left: -1rem;\n padding: .2rem .6rem;\n @include small-uppercase;\n font-size: .8rem;\n font-weight: normal;\n background: transparent;\n border-radius: 3px;\n transition: all .2s;\n}*/\n\n@mixin radio-block__legend {\n @include legend;\n margin-bottom: 0.6rem;\n}\n\n@mixin radio-block__input {\n position: absolute;\n z-index: 9;\n margin-left: 9px;\n}\n\n@mixin radio-block__label {\n text-transform: capitalize;\n background: #f2f2f2;\n display: block;\n padding: 5px 10px 5px 39px;\n position: relative;\n top: -6px;\n box-shadow: inset -1px -1px 0 rgba(0,0,0,.1), inset 30px 0px 0 rgba(255,255,255,.7), inset 31px 0px 0 rgba(0,0,0,.1);\n}\n\n@mixin radio-block__label--checked {\n background: $blue;\n color: #fff;\n text-shadow: 0 0 1px rgba(0,0,0,.7);\n}\n\n@mixin radio-block__label--focus {\n z-index: 8;\n @include focus--glow ;\n}\n\n@mixin radio-inline__legend {\n @include legend;\n}\n\n@mixin radio-inline__input {\n @include screen-reader-text;\n}\n\n@mixin radio-inline__label {\n text-transform: capitalize;\n display: inline-block;\n padding: 0.2rem 0.5rem;\n border-radius: 3px;\n cursor: pointer;\n}\n\n@mixin radio-inline__label--checked {\n @include radio-block__label--checked ;\n}\n\n@mixin radio-inline__label--focus {\n @include radio-block__label--focus ;\n}\n\n@mixin select--wide--chevron {\n width: 100%;\n -webkit-appearance: none;\n -moz-appearance: none;\n appearance: none;\n font-size: 0.85rem;\n padding: 0.7rem 32px 0.7rem 0.8rem;\n border: 1px solid #bbb;\n border-radius: 3px;\n margin-bottom: 1.6rem;\n background: url(../svg/chevron-down.svg) 100% 50% no-repeat;\n background-color: #fff;\n box-shadow: inset -26px 0 0 rgba(0,0,0,.1);\n}\n\n\n#enp-quiz {\n\n fieldset {\n border: none;\n margin: 0;\n padding: 0;\n }\n\n .enp-label {\n @include label;\n &__sm {\n font-size: small;\n }\n }\n\n .enp-legend {\n @include legend;\n padding-top: 0;\n }\n\n .enp-input {\n @include input;\n &__sm {\n padding: 5px;\n margin-bottom: 5px;\n }\n &.enp-input--has-description {\n margin-bottom: 0.2rem;\n }\n }\n\n .enp-textarea-description,\n .enp-input-description {\n margin-bottom: 1rem;\n font-size: 0.85rem;\n }\n\n .enp-textarea-description--before,\n .enp-input-description--before {\n margin-bottom: 0;\n }\n\n .enp-input::placeholder,\n .enp-textarea::placeholder {\n font-family: $fontBody;\n font-weight: 300;\n color: lighten($font, 40);\n }\n\n .enp-textarea {\n @include textarea;\n\n &.enp-textarea--has-description {\n margin-bottom: 0.2rem;\n }\n &.enp-textarea--has-description--before {\n margin-bottom: 1.2rem;\n }\n }\n\n .enp-embed-code {\n @include textarea;\n padding: 1.6rem;\n font-size: 0.7rem;\n font-family: Monaco, Consolas, \"Andale Mono\", \"DejaVu Sans Mono\", monospace;\n\n @include media(max-medium) {\n padding: .8rem;\n }\n }\n}\n","#enp-quiz {\n // .enp-publish-page-container,\n // .enp-preview-page-container {\n // @include container--wide;\n // position: relative;\n // @include xpadding-vertical;\n // background: $really_light_gray;\n\n\n // }\n\n .enp-publish-page-container,\n .enp-quiz-form-container,\n .enp-preview-page-container {\n display: grid;\n grid-column: 2/-1;\n gap: 1rem;;\n width: 100%;\n justify-items: center;\n \n @include media(max-small) {\n padding-left: 8px;\n padding-right: 8px;\n }\n @include breakpoint(medium) {\n justify-items: start;\n }\n }\n // .enp-breadcrumb-link__container {\n // display: grid;\n // grid-column: 1/span 1;\n // justify-content: center;\n // align-items: flex-start;\n // @include xpadding-vertical;\n // }\n .enp-quiz-form {\n display: grid;\n padding-left: 0;\n padding-right: 0;\n @include breakpoint(medium) {\n width: 100%;\n max-width: 40rem;\n }\n }\n\n .enp-preview-page-flex-container {\n display: grid;\n gap: 1rem;\n\n @include breakpoint(medium) {\n grid-template-columns: 1fr 3fr;\n // padding: 0 2rem;\n }\n }\n\n .enp-quiz-title__label {\n @include label--bold;\n }\n\n .enp-quiz-title__textarea {\n @include input--xl;\n }\n \n textarea {\n color: #000;\n }\n\n .enp-accordion-container {\n margin-bottom: 1.6rem;\n position: relative;\n }\n\n .enp-question-content {\n @include accordion;\n padding-top: 0;\n position: relative;\n }\n\n .enp-question-inner {\n padding: 1.6rem 1.6rem 1rem;\n\n @include breakpoint(medium) {\n padding-right: 2.8rem;\n padding-left: 2.9rem;\n }\n\n }\n\n .enp-question-title__label {\n @include label--bold;\n }\n\n .enp-question-title__textarea {\n @include input--large;\n }\n\n .enp-question-image-upload {\n @include btn--dashed--light--alt-bg;\n @include small-uppercase;\n position: relative;\n margin-bottom: 2rem;\n transform: translate3d(0, 0, 0);\n transition: all .3s $fastInEaseOut;\n\n .enp-question-image-upload__icon--photo {\n @include icon--xxxl;\n opacity: 0;\n position: absolute;\n top: 0;\n left: 0;\n right: 0;\n margin: 0 auto;\n transform: translate3d(0, 0, 0);\n z-index: -1;\n transition: opacity .2s, transform .3s $fastInEaseOut;\n }\n\n .enp-question-image-upload__icon--add {\n @include icon--circle--small;\n @include icon--gray-bg;\n margin-right: 5px;\n position: relative;\n top: 0.2rem;\n }\n\n &:hover,\n &:focus,\n &:active {\n padding-top: 5rem;\n padding-bottom: 2rem;\n\n .enp-question-image-upload__icon--photo {\n opacity: 1;\n z-index: 1;\n transform: translate3d(0, 1.75rem, 0);\n }\n\n .enp-question-image-upload__icon--add {\n @include icon--gray-bg--hover;\n }\n }\n }\n\n .enp-question-image__container {\n position: relative;\n margin-bottom: 1rem;\n }\n\n .enp-question-image {\n margin-bottom: 1.2rem;\n }\n\n @include radio-inline(enp-question-type);\n\n .enp-question-type__label {\n position: relative;\n z-index: 9;\n }\n\n .enp-slider-options,\n .enp-mc-options {\n margin-top: 0rem;\n display: none;\n animation: slideOutTop .25s $fastInEaseOut forwards;\n animation-delay: 0s, .05s;\n }\n\n .enp-question-type__input--slider:checked ~ .enp-slider-options,\n .enp-question-type__input--mc:checked ~ .enp-mc-options {\n visibility: visible;\n display: block;\n animation: fadeIn .45s $fastInEaseOut forwards;\n }\n\n .enp-mc-options__list {\n @include ul-no-style;\n }\n\n .enp-mc-option {\n position: relative;\n padding-left: 6px;\n\n @include breakpoint(medium) {\n padding-left: 0;\n }\n }\n\n .enp-mc-options__legend {\n @include legend--bold;\n }\n\n .enp-mc-option__add,\n .enp-mc-option__button--correct,\n .enp-mc-option__button--delete {\n display: none;\n }\n\n .enp-question-type__input--mc:checked ~ .enp-mc-options {\n .enp-mc-option__add,\n .enp-mc-option__button--correct,\n .enp-mc-option__button--delete {\n display: block;\n }\n }\n\n .enp-button__question-image-delete,\n .enp-mc-option__button--delete {\n @include btn--reset;\n position: absolute;\n top: 9px;\n right: -24px;\n fill: #bbb;\n cursor: pointer;\n\n @include breakpoint(medium) {\n right: -30px;\n }\n\n &:focus,\n &:hover {\n fill: $red;\n }\n }\n\n .enp-mc-option__button--correct {\n @include btn--reset;\n position: absolute;\n top: 8px;\n left: -24px;\n\n @include breakpoint(medium) {\n left: -35px;\n }\n\n .enp-mc-option__icon--correct {\n @include icon--circle--pad;\n width: 28px;\n height: 28px;\n fill: #fff;\n background: #fff;\n cursor: pointer;\n border: 2px solid $fade_red;\n transition: all .2s;\n }\n\n &:focus .enp-mc-option__icon--correct,\n &:hover .enp-mc-option__icon--correct {\n background: #fff;\n border-color: $green;\n fill: $green;\n }\n\n &:disabled {\n opacity: 1;\n\n .enp-mc-option__icon--correct {\n cursor: default;\n fill: #fff;\n border: 2px solid transparent;\n }\n }\n }\n\n .enp-mc-option--correct {\n .enp-mc-option__input {\n box-shadow: inset 0 0 3px $blue;\n border: 1px solid $blue;\n }\n\n .enp-mc-option__button--correct:focus .enp-mc-option__icon--correct,\n .enp-mc-option__button--correct:hover .enp-mc-option__icon--correct,\n .enp-mc-option__icon--correct {\n fill: #fff;\n border-color: $blue;\n background: $blue;\n }\n }\n\n .enp-mc-option__add {\n @include btn--dashed--light--alt-bg;\n @include small-uppercase;\n text-align: left;\n padding: 0.7rem 0.75rem 0.8rem;\n\n .enp-mc-option__add__icon {\n @include btn--icon__icon--circle--small ;\n @include icon--gray-bg;\n position: relative;\n top: 0.2rem;\n }\n\n &:hover .enp-mc-option__add__icon {\n @include icon--gray-bg--hover;\n }\n }\n\n .enp-slider-options .enp-input {\n max-width: 11.8rem;\n }\n\n .enp-slider-range__container .enp-input,\n .enp-slider-correct__container .enp-input {\n max-width: 8.8rem;\n @include breakpoint('small') {\n max-width: 11.8rem;\n }\n }\n\n .enp-slider-preview {\n border: 1px solid #ddd;\n margin-top: 0.2rem;\n margin-bottom: 1.6rem;\n padding: 1.6rem 1.6rem .6rem;\n position: relative;\n\n .enp-label--slider-preview {\n position: absolute;\n width: 100%;\n top: 0.2rem;\n left: 0.4rem;\n font-size: 0.75rem;\n text-transform: uppercase;\n }\n }\n\n .enp-slider-range__container,\n .enp-slider-correct__container {\n @include flex-spread;\n align-items: center;\n }\n\n .enp-slider-range__helper,\n .enp-slider-correct__helper {\n color: #777;\n font-size: 0.85rem;\n background: #fff;\n padding: 0 .3rem;\n position: relative;\n\n &:before {\n content: '';\n position: absolute;\n top: 44%;\n height: 4px;\n background: #ddd;\n width: 120px;\n left: -60px;\n z-index: -1;\n transition: width 0.7s $fastInEaseOut, background 1.6s $fastInEaseOut;\n }\n }\n\n .enp-slider-options {\n margin-bottom: 2rem;\n\n .enp-accordion-header {\n text-transform: uppercase;\n font-size: 0.85rem;\n padding: 0.675rem;\n }\n\n .enp-slider-advanced-options__content {\n border: none;\n box-shadow: none;\n padding-top: 1rem;\n padding-bottom: 0;\n margin-bottom: 0;\n }\n }\n\n .enp-slider-correct-high__container {\n position: relative;\n }\n\n .enp-slider-correct-high__input-container--hidden {\n display: none;\n }\n\n .enp-slider-correct__helper--hidden {\n &:before {\n width: 0;\n background: $green;\n }\n }\n\n .enp-slider-correct-answer-range--add-range {\n @include btn--dashed--light--alt-bg;\n margin-left: 0.8rem;\n font-size: 0.7rem;\n\n @include breakpoint('small') {\n font-size: 0.8rem;\n padding: .7rem;\n }\n\n @include breakpoint('medium') {\n padding: .7rem 1.2rem;\n min-width: 11.4rem;\n }\n\n .enp-slider-correct-answer-range__icon {\n @include btn--icon__icon--circle--small ;\n @include icon--gray-bg;\n position: relative;\n left: -0.2rem;\n }\n\n &:hover .enp-slider-correct-answer-range__icon {\n @include icon--gray-bg--hover;\n }\n }\n\n .enp-slider-correct-answer-range--remove-range {\n position: absolute;\n right: -1.6rem;\n bottom: 1.6rem;\n background: none;\n border: none;\n box-shadow: none;\n padding: 0 0.1rem;\n\n .enp-slider-correct-answer-range__icon {\n width: 1.2em;\n height: 1.2em;\n fill: $dark_gray;\n }\n\n &:hover,\n &:focus {\n .enp-slider-correct-answer-range__icon {\n fill: $red;\n }\n }\n\n @include breakpoint(medium) {\n top: -0.2rem;\n right: -0.2rem;\n bottom: auto;\n }\n\n }\n\n .enp-slider-options .enp-input:read-only {\n background: $light_gray;\n }\n\n .enp-answer-explanation {\n background: $light_gray;\n padding-top: 2rem;\n box-shadow: inset 1px 0px 0 #ccc, inset -1px -1px 0 #ccc, inset 0 1px 0 #ddd;\n }\n\n .enp-answer-explanation__label {\n @include label--bold;\n\n }\n\n .enp-question__button--delete {\n @include btn--reset;\n position: absolute;\n top: 9px;\n right: 9px;\n fill: #bbb;\n cursor: pointer;\n\n @include breakpoint(medium) {\n right: -30px;\n }\n\n &:hover {\n fill: $red;\n }\n }\n\n .enp-question__move {\n position: absolute;\n left: 15px;\n\n @include breakpoint(medium) {\n left: -40px;\n }\n }\n\n .enp-sort__placeholder {\n background: #ddd;\n height: 60px;\n width: 100%;\n max-height: 120px;\n margin-bottom: 1.6rem;\n }\n\n .ui-sortable .ui-sortable-helper {\n .ui-sortable-handle {\n cursor: move;\n cursor: grabbing;\n cursor: -webkit-grabbing;\n }\n }\n \n\n .enp-question__button--move {\n @include btn--reset;\n position: absolute;\n fill: #bbb;\n cursor: pointer;\n\n &:hover, &:focus {\n fill: #333;\n }\n\n &:disabled {\n opacity: 0.5;\n }\n }\n\n .enp-question__button--move--up {\n top: 0px;\n left: -9px;\n }\n\n\n .enp-question__button--move--down {\n top: 3px;\n right: -9px;\n }\n\n .enp-quiz-form__add-question {\n @include btn--icon;\n @include btn--dashed;\n padding-top: 1rem;\n padding-bottom: 1rem;\n margin-top: 1.6rem;\n margin-bottom: 2rem;\n\n .enp-add-question__icon {\n @include btn--icon__icon--circle--small;\n @include icon--normal;\n @include icon--gray-bg;\n position: relative;\n top: 0.2rem;\n }\n\n &:hover .enp-add-question__icon {\n @include icon--gray-bg--hover;\n }\n }\n\n .enp-btn--save__btns {\n @include flex;\n align-items: center;\n align-items: flex-start;\n }\n\n .enp-quiz-form__save {\n @include btn;\n width: 100%;\n margin-bottom: 1rem;\n opacity: 0.8;\n text-shadow: 0px -1px 2px rgba(0,0,0,.6);\n\n &:hover,\n &:focus {\n opacity: 1;\n }\n\n @include breakpoint(small) {\n padding: 1.2rem 1.8rem 1.1rem;\n width: 27%;\n margin-right: 3%;\n position: relative;\n }\n }\n\n .enp-quiz-form__save--reveal {\n animation: slideInTop--reduced-opacity .3s $fastInEaseOut;\n }\n\n @include btn--icon--circle(enp-btn--next-step);\n\n .enp-btn--next-step {\n // @include btn;\n width: 100%;\n padding: 1rem 1.4rem 1rem;\n\n @include breakpoint(medium) {\n padding: 1.2rem 1.8rem 1.1rem;\n }\n .enp-btn--next-step__icon {\n width: 1rem;\n height: 1rem;\n }\n // @include breakpoint(small) {\n // width: auto;\n // }\n\n /*\n * AFTER we have removed the Save button,\n * use this code to add the preview button into the\n * header\n @include media(max-medium) {\n padding: 1rem 1.4rem 1rem;\n }\n\n @include breakpoint(medium) {\n position: absolute;\n right: 20px;\n top: 10px;\n width: auto;\n z-index: 999999;\n\n &.enp-btn--next-step--fixed {\n position: fixed;\n animation: navSlideIn .25s;\n }\n }*/\n\n }\n\n .enp-btn--next-step--reveal {\n animation: slideInTop .3s $fastInEaseOut;\n }\n\n\n // UX interactions\n .enp-mc-option--inputs,\n .enp-accordion-header--inserting {\n animation: slideInBottom .4s $fastInEaseOut forwards;\n }\n\n .enp-mc-option--remove,\n .enp-question--remove,\n .enp-question__image--remove {\n animation: removeElement .5s $fastInEaseOut forwards;\n }\n\n .enp-image-upload-wait {\n @include btn--dashed--light--alt-bg;\n padding-top: 4rem;\n padding-bottom: 4rem;\n margin-bottom: 1rem;\n width: 100%;\n }\n\n // validation\n .enp-accordion-header.question-has-error {\n color: $red;\n box-shadow: 0 0 3px $red;\n }\n\n}\n\n.enp-quiz.ui-sortable--sorting #enp-quiz .enp-accordion-content {\n display: none;\n}","#enp-quiz {\n\n\n .enp-quiz-settings-container {\n\n @include breakpoint(large) {\n // margin: 0;\n // width: 40%;\n // float: left;\n }\n }\n\n .enp-quiz-preview-container {\n\n @include breakpoint(large) {\n // width: 60%;\n // float: left;\n }\n\n }\n\n .enp-quiz-share__legend,\n .enp-quiz-settings__title {\n position: relative;\n @include small-uppercase;\n font-weight: 600;\n padding-top: 0;\n\n @include breakpoint(medium) {\n padding: 1em 0;\n }\n }\n\n .enp-quiz-settings__form {\n margin-bottom: 3rem;\n overflow: visible;\n @include breakpoint(large) {\n padding: 0;\n margin-bottom: 0;\n }\n }\n\n .enp-fieldset {\n @include breakpoint(medium) {\n // this is necessary to keep the form elements visible on top of the\n // white BG on the sidebar. We can't set this on the whole form bc\n // then the publish button won't be positioned right\n position: relative;\n }\n }\n\n .enp-title-display__legend {\n padding-top: 0;\n\n @include breakpoint(medium) {\n padding-top: 0.4rem;\n }\n }\n\n .enp-quiz-share__input,\n .enp-quiz-styles__input {\n width: 100%;\n }\n\n .enp-quiz-styles__textarea--custom-css {\n font-family: Monaco,Consolas,\"Andale Mono\",\"DejaVu Sans Mono\",monospace;\n font-size: 0.9rem;\n min-height: 200px;\n }\n\n .enp-fieldset--section {\n padding: 1.6rem 1rem;\n\n &.enp-accordion-content--open {\n margin-bottom: 0;\n }\n }\n\n .enp-quiz-share--facebook {\n margin-bottom: 2rem;\n }\n\n @include radio-inline(enp-title-display);\n @include radio-inline(enp-mc-options-order);\n\n .enp-mc-options-order {\n margin-bottom: 1.6rem;\n }\n\n .enp-quiz-share__textarea {\n min-height: 7.6rem;\n margin-bottom: 2rem;\n\n @include breakpoint('medium') {\n min-height: 4.6rem;\n }\n\n @include breakpoint('large') {\n min-height: 7.6rem;\n }\n\n\n }\n\n .enp-preview-form__submit {\n margin-top: 1.6rem;\n margin-bottom: 1.6rem;\n }\n\n .enp-quiz-preview__title {\n @include small-uppercase;\n font-weight: 600;\n @include breakpoint(medium) {\n padding: 1em 0;\n }\n }\n\n .enp-preview-form__submit {\n @include btn;\n width: 100%;\n padding-top: 0.85rem;\n padding-bottom: 0.85rem;\n margin-bottom: 1rem;\n opacity: 0.8;\n text-shadow: 0px -1px 2px rgba(0,0,0,.6);\n\n &:hover,\n &:focus {\n opacity: 1;\n }\n }\n\n .enp-preview-form__submit--publish {\n width: 100%;\n position: relative;\n z-index: 99999999;\n padding: 1.05rem 1.8rem .95rem;\n }\n\n .enp-quiz-styles__iris-wrapper {\n position: relative;\n }\n\n // Fix for WP Color Picker formatting\n .iris-picker {\n box-sizing: content-box;\n position: relative;\n z-index: 9999999999;\n top: -1.2rem;\n margin-bottom: 1rem;\n padding-bottom: 3rem;\n padding-right: 30px;\n\n @include breakpoint(large) {\n position: absolute;\n top: -4px;\n left: 0;\n }\n\n &:last-of-type {\n margin-bottom: 0;\n }\n\n .ui-slider-handle:focus,\n .ui-draggable-handle:focus .ui-slider-handle {\n box-shadow: 0 0 3px rgba(0,0,0,.75);\n }\n\n }\n\n .enp-quiz-styles__set-default {\n @include btn--ghost;\n font-size: 0.75rem;\n position: absolute;\n left: 10px;\n bottom: 10px;\n }\n\n .enp-iris__close {\n @include btn--reset;\n position: absolute;\n top: 5px;\n right: 5px;\n fill: #888;\n cursor: pointer;\n }\n\n .enp-quiz-styles__input--color {\n padding-left: 45px;\n }\n\n .enp-quiz-styles__color-demo {\n width: 30px;\n height: 30px;\n border: 1px solid #ccc;\n top: 8px;\n left: 8px;\n border-radius: 3px;\n\n position: absolute;\n }\n\n\n}\n","#enp-quiz {\n /* Removing flexbox layout temporarily\n * because it wasn't laying out correctly before content loading\n * It would snap into the correct layout after a resize or textarea highlight\n .enp-publish-page-container {\n &:before {\n @include breakpoint(medium) {\n position: absolute;\n top: 0;\n bottom: 0;\n left: -100%;\n width: 128%;\n content: '';\n background: #fff;\n border-right: 1px solid #ddd;\n }\n\n @include breakpoint(large) {\n width: 124%;\n }\n }\n\n .enp-quiz-message {\n @include breakpoint(medium) {\n margin-left: 33%;\n }\n\n @include breakpoint(large) {\n margin-left: 26%;\n }\n }\n }\n\n .enp-publish-page-flex-container {\n @include breakpoint(medium) {\n @include flex;\n align-items: stretch;\n flex-direction: row-reverse;\n }\n }\n\n .enp-publish-page__aside-container {\n\n @include breakpoint(medium) {\n position: relative;\n margin: 0 6% 0 0;\n padding: 0;\n width: 24%;\n }\n\n @include breakpoint(large) {\n margin: 0;\n //padding-left: 20px;\n width: 20%;\n }\n }\n\n .enp-share-quiz__container,\n .enp-ab-ad__container {\n @include breakpoint(medium) {\n padding: 0;\n border: none;\n }\n }\n */\n\n .enp-share-quiz__url {\n display: block;\n font-size: 1.5rem;\n line-height: 1.4;\n word-wrap: break-word;\n }\n\n @include share_icons(enp-share-quiz);\n\n .enp-share-quiz {\n justify-content: space-around;\n margin-bottom: 0;\n }\n}\n","#enp-quiz {\n .enp-ab-create__container {\n @include container--wide;\n width: 100%;\n background: $really_light_gray;\n padding-top: 3rem;\n padding-bottom: 3rem;\n }\n\n .enp-ab-create__form {\n @include container--thin;\n }\n\n .enp-ab-create__label {\n @include label--bold;\n }\n\n .enp-ab-create-title__textarea {\n @include input--xl;\n width: 100%;\n }\n\n .enp-ab-create__select {\n @include select--wide--chevron;\n }\n\n .enp-ab-create__submit {\n width: 100%;\n padding-top: 1em;\n padding-bottom: 1em;\n }\n}\n","// TEMP for dev theme\n#headerimg h1 {\n text-align: center;\n font-size: 40px !important;\n}\n#enp-quiz {\n\n &.enp-quiz__main {\n @include container;\n display: grid;\n gap: 1em;\n min-height: 85vh;\n \n @include breakpoint(large) {\n @include container--wide;\n grid-template-columns: 1fr 4fr;\n }\n }\n\n .enp-dash-container {\n @include xpadding-vertical;\n @include xpadding-horizontal;\n transition: all .25s $fastInEaseOut;\n }\n\n .enp-dash__section-aside {\n background-color: $background;\n @include breakpoint(medium) {\n @include xpadding-vertical;\n @include xpadding-horizontal;\n }\n }\n\n .enp-breadcrumb-link__container {\n padding-bottom: 2rem;\n }\n\n .enp-search-quizzes {\n display: flex;\n justify-content: space-between;\n flex-wrap: wrap;\n padding: 1em;\n\n @include breakpoint(medium) {\n padding: 0.2rem 0;\n flex-wrap: nowrap;\n }\n @include breakpoint(large) {\n @include flex-spread-vertical;\n }\n }\n\n .enp-search-quizzes__form-item {\n margin-bottom: 0.6rem;\n flex: 0 1 48%;\n\n @include breakpoint(small) {\n margin-bottom: 0;\n margin-right: 1rem;\n flex: 1 0 auto;\n }\n\n }\n\n .enp-quiz-search {\n flex: 1 0 100%;\n position: relative;\n @include breakpoint(medium) {\n flex: 1 0 auto;\n }\n }\n\n .enp-search-quizzes__label {\n margin-bottom: 0;\n @include screen-reader-text ;\n }\n\n .enp-search-quizzes__select {\n padding: .3rem;\n border-radius: 3px;\n width: 100%;\n @include breakpoint(large) {\n min-width: 200px;\n font-size: 0.85rem;\n }\n }\n\n .enp-quiz-search__input {\n width: 100%;\n margin: 0 0 0.1rem;\n padding: .3rem .3rem .3rem 26px;\n font-size: 0.85rem;\n @include breakpoint(medium) {\n // max-width: 200px;\n }\n }\n\n .enp-quiz-search__icon {\n position: absolute;\n bottom: 0.3rem;\n left: 0.2rem;\n width: 21px;\n height: 21px;\n }\n\n .enp-search-quizzes__button {\n padding: 0.2rem 0.8rem;\n }\n\n .enp-search-results-description {\n font-size: 0.85rem;\n }\n\n .enp-search-results-description__link {\n white-space: nowrap;\n }\n\n .enp-search-results-description__icon {\n width: 1.3em;\n height: 1.3em;\n position: relative;\n top: 4px;\n left: 2px;\n }\n\n .enp-dash__section-title {\n @include small-uppercase;\n margin-bottom: 0.325rem;\n border-bottom: 1px solid $dark-gray;\n @include breakpoint(medium) {\n padding: 1em 0;\n }\n }\n\n .enp-dash__ab-test-helper--not-enough-quizzes {\n color: $darker-gray;\n }\n\n .enp-view-toggle {\n cursor: pointer;\n opacity: .5;\n display: none; // hide the buttons for small screens\n\n @include breakpoint(medium) {\n display: flex;\n }\n }\n\n .enp-view-toggle__active {\n opacity: 1;\n }\n\n .enp-sort-by {\n margin-left: 5px;\n }\n\n .enp-dash-list {\n @include flex-grid;\n }\n\n .enp-dash-item {\n @include flex-grid__item ;\n @include flex-spread-vertical;\n display: flex;\n z-index: 1;\n flex-direction: column;\n align-content: flex-end;\n justify-content: flex-end;\n border: none;\n border-radius: 3px;\n background-color: $gray;\n }\n\n .enp-dash-item--published {\n box-shadow: inset 4px 0 0 $blue, 0 1px 0 rgba(0,0,0,.1);\n }\n\n .enp-dash-item--draft {\n box-shadow: inset 4px 0 0 $light_blue, 0 1px 0 rgba(0,0,0,.1);\n .enp-dash-item__title a {\n color: $dark_blue;\n }\n }\n\n .enp-dash-item--remove {\n animation: removeElement .5s $fastInEaseOut forwards;\n }\n\n .enp-dash-list--list-view {\n .enp-dash-item {\n margin: 0 0 0.8rem;\n flex-basis: 100%;\n }\n }\n\n .enp-dash-item__spinner {\n @include flex-center ;\n position: absolute;\n top: 0;\n bottom: 0;\n left: 0;\n right: 0;\n background: rgba(245,216,216,0.8);\n width: 100%;\n animation: fadeIn .3s $fastInEaseOut;\n }\n\n .enp-dash-item__header {\n padding: 0.5rem 1rem;\n background: $light_gray;\n border-bottom: 1px solid $dark_gray;\n display: flex;\n justify-content: space-between;\n align-items: center;\n @include border-radius;\n }\n\n .enp-dash-item__title {\n @include flex-grid__title ;\n padding: 0;\n margin-bottom: 0;\n a {\n color: $blue;\n }\n }\n\n .enp-dash-item__content {\n padding: 0rem 0 0.375rem;\n position: relative;\n transition: all .2s $fastInEaseOut;\n }\n\n .enp-dash-item__meta {\n @include hint;\n font-size: 0.75rem;\n }\n\n .enp-dash-item__username {\n word-wrap: break-word;\n padding-left: 0.4rem;\n margin-left: 0.2rem;\n border-left: 1px solid #ddd;\n }\n\n .enp-dash-item__title--ab-test {\n padding-bottom: 0;\n }\n\n .enp-dash-item__ab-quizzes {\n @include ul-no-style;\n font-size: 0.85rem;\n color: $dark_gray;\n margin-bottom: 0.8rem;\n }\n\n .enp-dash-item__nav {\n @include ul-no-style;\n margin-bottom: 0;\n font-size: 0.85rem;\n }\n\n .enp-dash-item__nav__item {\n display: flex;\n margin: 0;\n width: 100%;\n align-items: center;\n &:hover {\n background-color: $gray;\n .enp-dash-item__icon {\n fill: $red;\n }\n }\n a {\n font-weight: normal;\n color: $darker_gray;\n @include flex;\n align-items: center;\n width: 100%;\n padding: 12px;\n &:focus,\n &:hover {\n color: $red;\n outline: 1px dotted $link;\n outline-offset: 1px;\n .enp-dash-item__icon {\n fill: $red;\n }\n }\n }\n }\n .enp-delete-quiz {\n width: 100%;\n &:hover {\n .enp-dash-item__delete {\n color: $red;\n }\n .enp-icon {\n fill: $red;\n }\n }\n }\n .enp-dash-item__delete {\n @include btn--reset;\n @include flex;\n padding: 12px;\n align-items: center;\n position: relative;\n line-height: 1.6;\n color: $darker_gray;\n cursor: pointer;\n width: 100%;\n .enp-icon {\n fill: $darker_gray;\n }\n }\n .enp-dash-item__icon {\n fill: $darker_gray;\n width: 15px;\n height: 15px;\n margin-right: 10px;\n }\n\n .enp-dash-item__nav--collapsible {\n display: none;\n position: absolute;\n z-index: 2;\n top: 44px;\n right: -17px;\n width: 195px;\n background-color: #fff;\n text-align: left;\n transform: translate3d(0,0,0);\n transition: all .2s $fastInEaseOut;\n\n .enp-dash-item__nav__item {\n cursor: pointer;\n }\n }\n\n .enp-dash-item__menu-action {\n height: 24px;\n background: none;\n border: none;\n color: #444;\n padding: 0;\n bottom: 0.2rem;\n right: 1.5rem;\n top: 1.5rem;\n cursor: pointer;\n }\n\n .enp-dash-item__menu-action-wrap {\n max-width: 0;\n display: flex;\n flex-direction: column;\n align-items: flex-end;\n }\n\n .enp-dash-item__menu-action__icon {\n width: 15px;\n height: 15px;\n fill: $darker_gray;\n transition: all .3s $fastInEaseOut;\n }\n\n .enp-dash-item__menu-action__icon--bottom {\n \n }\n\n .enp-dash-item--menu-active {\n transform: translate3d(0,-3px,0);\n z-index: 2;\n .enp-dash-item__nav-wrap {\n position: relative;\n }\n\n &.enp-dash-item--published {\n box-shadow: inset 4px 0 0 $green, 0 2px 2px rgba(0,0,0,.2);\n }\n\n &.enp-dash-item--draft {\n box-shadow: inset 4px 0 0 lighten($green, 25%), 0 2px 2px rgba(0,0,0,.2);\n }\n\n .enp-dash-item__menu-action__icon--bottom {\n transform: rotateX(180deg);\n }\n\n .enp-dash-item__nav--collapsible {\n display: block;\n animation: slideInTop .25s $fastInEaseOut forwards;\n @include border-radius;\n @include box-shadow;\n }\n\n .enp-dash-item__content {\n opacity: 0.4;\n }\n\n }\n\n\n .enp-quiz-results {\n display: flex;\n justify-content: space-around;\n list-style: none;\n margin: 0.8rem 0 0;\n padding: 0;\n text-align: center;\n }\n\n .enp-quiz-results__item {\n\n margin: 0 2% 0 0;\n padding: 0;\n color: #454545;\n\n @media (max-width:280px) {\n width: 100%;\n padding: 0;\n margin-bottom: 0.6rem;\n }\n }\n\n .enp-quiz-results__number {\n font-size: 1.6rem;\n line-height: 1;\n position: relative;\n }\n\n .enp-dash-item--draft .enp-quiz-results__number {\n opacity: 0.5;\n }\n\n .enp-quiz-results__number--average-score {\n color: darken($green, 8);\n\n &:after {\n content: '%';\n font-size: .9rem;\n position: absolute;\n top: .3rem;\n right: -1rem;\n }\n }\n\n .enp-quiz-results__label {\n text-transform: uppercase;\n font-size: .7rem;\n font-weight: 300;\n color: #888;\n }\n\n\n .enp-quiz-list__view {\n // @include flex-bottom;\n }\n\n .enp-dash-item--add-new__wrap {\n display: grid;\n gap: 1em;\n grid-template-columns: 1fr 1fr;\n }\n\n .enp-dash-list--quiz__container {\n display: grid;\n gap: 1em;\n @include breakpoint(large) {\n grid-template-columns: 1fr 1fr;\n }\n }\n\n .enp-dash-item--add-new {\n background: none;\n border: none;\n padding: 0;\n position: relative;\n @include header-space;\n }\n\n .enp-dash-link--add-new {\n @include btn--dashed--light;\n justify-content: flex-start;\n color: $light_blue;\n padding: 1rem 1.2rem;\n\n\n @include breakpoint(medium) {\n @include small-uppercase;\n @include flex-center;\n flex-direction: column;\n position: absolute;\n top: 0;\n left: 0;\n right: 0;\n bottom: 0;\n }\n\n .enp-dash-link__icon {\n @include icon--circle;\n @include icon--normal;\n margin-right: 5px;\n background-color: $light_blue;\n\n @include breakpoint(medium) {\n width: 2rem;\n height: 2rem;\n margin: 0.8rem 0 0.2rem;\n }\n }\n\n &:hover {\n color: $dark_blue;\n\n .enp-dash-link__icon {\n fill: #fff;\n background: $dark_blue;\n }\n }\n\n }\n\n .enp-quiz-message--welcome p {\n color: $font;\n }\n\n // pagination\n .enp-paginate {\n @include ul-no-style ;\n @include flex-center ;\n font-size: 1rem;\n }\n\n .enp-paginate__link {\n @include flex-center ;\n margin: 0 0.2rem;\n padding: 0 0.4rem;\n border-radius: 3px;\n font-weight: normal;\n\n }\n\n .enp-paginate__link--current-page {\n border: 2px solid $blue;\n }\n\n .enp-paginate__item--last-page,\n .enp-paginate__item--first-page {\n display: flex;\n }\n\n .enp-paginate__item--first-page:after,\n .enp-paginate__item--last-page:before {\n content: '...';\n font-size: 1rem;\n position: relative;\n bottom: 0.2rem;\n opacity: 0.6;\n }\n\n .enp-paginate__item--no-gap {\n &:before,\n &:after {\n content:'';\n }\n }\n\n .enp-paginate__item--next-page {\n margin-left: 0.2rem;\n }\n\n .enp-paginate__item--previous-page {\n margin-right: 0.2rem;\n }\n}\n","#enp-quiz {\n .enp-quiz-breadcrumbs {\n grid-row: 1;\n // @include flex-center;\n // position: absolute;\n // top: 0;\n // width: 1000%;\n // left: -500%;\n // right: -500%;\n // margin-left: auto;\n // margin-right: auto;\n // background: #fff;\n // border-bottom: 1px solid #ddd;\n // padding: 10px;\n // z-index: 99999;\n }\n\n .enp-quiz-breadcrumbs__list {\n @include flex-inline;\n }\n\n .enp-quiz-breadcrumbs__item {\n @include flex-inline__item ;\n @include flex-center;\n fill: $link;\n margin-right: 5px;\n\n @include breakpoint(small) {\n margin-right: 10px;\n }\n }\n\n .enp-quiz-breadcrumbs__link--disabled {\n @include disabled;\n }\n\n .enp-quiz-breadcrumbs__link--active {\n @include btn--ghost;\n @include btn--thin;\n }\n\n .enp-quiz-breadcrumbs__link {\n font-size: 1rem;\n font-weight: 400;\n text-transform: none;\n letter-spacing: 0;\n }\n\n // JS\n .enp-quiz-breadcrumbs--fixed {\n top: 0;\n position: fixed;\n animation: navSlideIn .25s;\n }\n}\n","#enp-quiz {\n .enp-results-title {\n font-size: 1.6rem;\n text-align: center;\n padding: 3.2rem 20px 2.6rem;\n background: $really_light_gray;\n margin: -1.2rem 0 2rem;\n border-bottom: 1px solid #ddd;\n\n &:after {\n @include small-uppercase;\n display: block;\n content: \"RESULTS\";\n font-weight: normal;\n }\n }\n\n .enp-results__container {\n @include container--wide;\n display: block;\n\n @include breakpoint(large) {\n display: flex;\n @include flex-spread;\n }\n }\n\n .enp-results__container,\n .enp-quiz-scores__container,\n .enp-results-flow__container {\n @include media(max-medium) {\n padding: 8px;\n }\n }\n\n .enp-quiz-scores__container,\n .enp-results-flow__container {\n width: 100%;\n\n @include breakpoint(large) {\n width: 48%;\n }\n }\n\n .enp-quiz-scores {\n margin-top: 2.6rem;\n }\n\n .enp-quiz-score__line-chart {\n height: 300px;\n margin-bottom: 1rem;\n\n .ct-label {\n color: $font;\n }\n\n .ct-grid {\n stroke: #dadada;\n stroke-dasharray: 0;\n }\n\n .ct-line {\n stroke: $green;\n stroke-width: 2px;\n }\n\n .ct-point {\n stroke: $green;\n stroke-width: 8px;\n }\n }\n\n .enp-quiz-scores-table {\n width: 100%;\n max-width: 500px;\n margin: 0 auto;\n\n tr th {\n background-color: #fff;\n }\n }\n\n .enp-quiz-scores-table__label {\n padding-left: 5%;\n }\n\n .enp-quiz-scores-table__score {\n text-align: right;\n padding-right: 5%;\n }\n\n .enp-results-flow {\n position: relative;\n margin: 2rem auto;\n width: 320px;\n height: 320px;\n border-radius: 50%;\n\n @include media(300px) {\n left: -100px;\n }\n\n @include breakpoint(small) {\n width: 390px;\n height: 390px;\n }\n\n @include breakpoint(medium) {\n width: 450px;\n height: 450px;\n }\n\n @include breakpoint(large) {\n width: 400px;\n height: 400px;\n }\n\n }\n\n .enp-results-flow__section-title {\n @include screen-reader-text;\n }\n\n .enp-results-flow__item {\n border-radius: 50%;\n text-align: center;\n height: 100%;\n width: 100%;\n margin: 0 auto;\n left: 0;\n right: 0;\n padding: 12.5% 0 0;\n letter-spacing: 0.05rem;\n border: 2px solid $green;\n animation: 0.85s slideInBottom $fastInEaseOut forwards;\n }\n\n .enp-results-flow__item--total-views {\n background: #fff;\n }\n\n .enp-results-flow__item--quiz-starts {\n width: 65%;\n height: 65%;\n position: absolute;\n padding-top: 8%;\n bottom: 2.5%;\n background: lighten($green, 48);\n }\n\n .enp-results-flow__item--quiz-finishes {\n width: 35%;\n height: 35%;\n position: absolute;\n bottom: 5%;\n background: lighten($green, 35);\n }\n\n .enp-results-flow__title {\n @include small-uppercase;\n color: #444;\n font-size: .7rem;\n margin-bottom: 0px;\n\n @include breakpoint(medium) {\n font-weight: bold;\n margin-bottom: 2px;\n }\n }\n\n .enp-results-flow__number {\n font-weight: bold;\n font-size: 1.4rem;\n line-height: 1.2;\n }\n\n .enp-results-flow__number--total-views {\n font-size: 2rem;\n }\n\n .enp-results-flow__number--quiz-starts {\n font-size: 1.65rem;\n }\n\n .enp-results-flow__percentage {\n font-size: .8rem;\n font-weight: normal;\n position: relative;\n display: inline-block;\n top: -0.7em;\n left: -.1rem;\n color: #444;\n\n &:after {\n content: '%';\n position: absolute;\n right: -0.75rem;\n font-size: .7rem;\n color: #444;\n }\n }\n\n .enp-results-questions__section {\n // @include section--alt;\n padding-top: 5rem;\n padding-bottom: 3rem;\n margin-top: 5rem;\n margin-bottom: 3rem;\n @include breakpoint(medium) {\n @include xmargin-horizontal;\n }\n }\n\n .enp-results-questions__container {\n @include media(max-small) {\n padding-left: 8px;\n padding-right: 8px;\n }\n }\n\n .enp-results-questions__header {\n align-items: flex-start;\n flex-direction: column;\n\n @include breakpoint(small) {\n @include flex-spread;\n flex-direction: row;\n align-items: flex-end;\n }\n }\n\n .enp-results-questions__title {\n @include small-uppercase;\n }\n\n .enp-results-questions__key {\n @include small-uppercase;\n }\n\n .enp-results-questions {\n @include ul-no-style;\n }\n\n .enp-results-question {\n width: 100%;\n font-size: 1rem;\n padding: 0;\n margin-bottom: 1rem;\n }\n\n .enp-results-question__header {\n padding: 1rem 1.2rem;\n position: relative;\n }\n\n .enp-results-question__question,\n .enp-results-question__stats {\n font-size: 1rem;\n line-height: 1.4;\n }\n\n .enp-results-question__question {\n font-weight: normal;\n\n @include breakpoint(small) {\n padding-right: 7em;\n margin-bottom: 0;\n }\n }\n\n .enp-results-question__stats {\n font-size: .9rem;\n\n @include breakpoint(small) {\n position: absolute;\n bottom: 1rem;\n right: 1.2rem;\n text-align: right;\n }\n }\n\n .enp-results-questions__key,\n .enp-results-question__stats {\n font-weight: 300;\n }\n\n .enp-results-question__content {\n padding: 2rem 1.2rem 1.2rem;\n @include border-radius;\n }\n\n .enp-results-question__deep-stats {\n @include flex-spread-around;\n @include ul-no-style;\n text-align: center;\n\n @include media(500px) {\n flex-wrap: wrap;\n }\n }\n\n .enp-results-question__deep-stat {\n\n @include media(500px) {\n width: 48%;\n margin: 0 2% 2% 0;\n padding: 1.6rem 0;\n\n &:nth-child(even) {\n margin-right: 0;\n }\n }\n\n @include media(280px) {\n width: 100%;\n padding: 0;\n margin-bottom: 1.6rem;\n }\n }\n\n .enp-results-question__deep-stat__number {\n font-size: 1.8rem;\n line-height: 1;\n position: relative;\n }\n\n .enp-results-question__deep-stat__number--finishes,\n .enp-results-question__deep-stat__number--correct {\n @include dark-green;\n }\n\n .enp-results-question__deep-stat__number--incorrect {\n @include fade-red;\n }\n\n .enp-results-question__deep-stat__number--correct,\n .enp-results-question__deep-stat__number--incorrect,\n .enp-results-question__deep-stat__number--finishes {\n &:after {\n content: '%';\n font-size: .9rem;\n position: absolute;\n top: .3rem;\n right: -1rem;\n }\n }\n\n .enp-results-question__deep-stat__label {\n @include small-uppercase;\n font-size: .8rem;\n }\n\n .enp-results-question__options {\n @include ul-no-style;\n margin-bottom: 0;\n }\n\n .enp-results-question__option {\n padding: 0.8rem 0.8rem 0.8rem 0.4rem;\n border-top: 1px solid #ddd;\n @include media(max-small) {\n position: relative;\n flex-direction: column;\n }\n\n @include breakpoint(small) {\n @include flex-spread;\n flex-direction: row;\n }\n\n &:first-of-type {\n margin-top: 1.4rem;\n }\n\n }\n\n .enp-results-question__option--correct {\n background: lighten($green, 48);\n }\n\n .enp-results-question__option__text {\n flex-grow: 100;\n margin-right: 1rem;\n }\n\n .enp-results-question__option__text__helper {\n font-weight: 300;\n @include small-uppercase;\n margin-right: 0.4rem;\n }\n\n .enp-results-question__option__icon {\n @include media(max-small) {\n position: relative;\n left: -3px;\n }\n\n @include breakpoint(small) {\n margin-right: 0.3rem;\n min-width: 1.6rem;\n }\n }\n\n .enp-results-question__option__icon--incorrect {\n fill: $fade_red;\n opacity: 0.5;\n }\n\n .enp-results-question__option__icon--correct {\n fill: $dark_green;\n opacity: 1;\n }\n\n .enp-results-question__option__percentage--incorrect {\n @include fade-red;\n }\n\n .enp-results-question__option__percentage--correct {\n @include dark-green;\n }\n\n .enp-results-question__option__number-selected {\n font-weight: 300;\n\n @include media(max-small) {\n position: absolute;\n top: 0.8rem;\n right: 0.8rem;\n }\n }\n\n .enp-slider-responses__title {\n @include small-uppercase;\n font-weight: 400;\n margin-top: 1.6rem;\n }\n\n .enp-slider-responses__line-chart {\n .ct-point {\n stroke-width: 8px;\n }\n }\n\n .enp-slider-responses__line-chart--low,\n .enp-slider-responses__line-chart--high {\n stroke: $red;\n }\n\n .enp-slider-responses__line-chart--correct {\n stroke: $green;\n }\n\n .enp-slider-responses-table {\n width: 100%;\n }\n\n .enp-slider-responses-table tr:nth-child(even) td {\n background-color: #fff;\n }\n\n .enp-slider-responses-table tr.enp-slider-responses-table__response--correct td {\n background-color: lighten($green, 48);\n }\n\n .enp-slider-responses-table__content {\n box-shadow: none;\n padding-top: 1rem;\n }\n\n .enp-slider-responses-table--hide-zero {\n .enp-slider-responses-table__frequency--zero {\n display: none;\n }\n }\n\n .enp-slider-responses-table__response-frequency {\n @include flex-spread ;\n align-items: center;\n }\n\n .enp-slider-responses-table__toggle-zero-frequency {\n @include accordion__header ;\n width: auto;\n padding: 0 0.6rem;\n margin: 0;\n }\n\n\n\n}\n\n.enp-quiz-results {\n #enp-quiz .enp-aside {\n border: none;\n }\n\n .enp-results-questions__title__quiz-title {\n @include screen-reader-text;\n }\n}\n","#enp-quiz {\n\n .enp-results--ab {\n display: block;\n margin-bottom: 3rem;\n\n @include breakpoint(large) {\n display: flex;\n flex-wrap: wrap;\n align-content: flex-end;\n width: 50%;\n padding: 10px;\n }\n\n }\n\n .enp-results--a {\n @include breakpoint(large) {\n padding-right: 1rem;\n border-right: 1px solid #ddd;\n }\n }\n\n .enp-results--b {\n @include breakpoint(large) {\n padding-left: 1rem;\n }\n }\n\n .enp-results-title--ab,\n .enp-results__container--ab .enp-results-flow__container {\n min-width: 100%;\n }\n\n .enp-results--loser {\n .enp-results-flow__item {\n border: 2px solid $red;\n }\n\n .enp-results-flow__item--quiz-starts {\n background: lighten($red, 42);\n }\n\n .enp-results-flow__item--quiz-finishes {\n background: lighten($red, 34);\n }\n\n th,\n .enp-results-questions__title {\n color: $dark_red;\n }\n\n }\n\n .enp-results--winner {\n th,\n .enp-results-questions__title {\n color: $dark_green;\n }\n\n }\n\n .enp-results-title--a,\n .enp-results-title--b {\n background: transparent;\n }\n\n .enp-ab-scores {\n @include container--wide;\n\n th.enp-quiz-scores-table__label,\n th.enp-quiz-scores-table__score {\n padding-left: 0;\n padding-right: 0;\n }\n }\n\n .enp-ab-scores__title {\n padding-left: 50px;\n @include small-uppercase;\n }\n\n .enp-quiz-score__line-chart .enp-test-loser {\n\n .ct-line,\n .ct-point {\n stroke: $red;\n }\n }\n\n .enp-quiz-scores {\n margin-top: 0;\n }\n\n .enp-question-results,\n .enp-ab-scores .enp-quiz-scores-table {\n margin-bottom: 1.6rem;\n\n @include breakpoint(large) {\n float: left;\n width: 48%;\n margin: 0;\n\n &:first-of-type {\n margin-right: 4%;\n }\n }\n }\n\n .enp-question-results__container {\n @include container--wide;\n }\n\n .enp-question-results--ab {\n\n .enp-results-questions__section {\n background: #fff;\n border: none;\n padding: 1.6rem 0;\n margin: 1.6rem auto;\n }\n\n .enp-results-questions__container {\n padding: 0;\n }\n\n }\n\n .enp-ab-new-embed-code__section {\n @include container--thin;\n max-width: 540px;\n padding-bottom: 2rem;\n margin-bottom: 2rem;\n\n .enp-ab-embed-code {\n padding: 0;\n margin: 0;\n }\n }\n\n .enp-ab-embed-code__section {\n @include section--alt;\n padding-top: 5rem;\n margin-top: 5rem;\n }\n\n .enp-ab-embed-code {\n @include container;\n }\n\n .enp-ab-embed-code__title {\n @include small-uppercase;\n }\n\n .enp-embed-code__textarea {\n margin-bottom: 0;\n }\n\n .enp-embed-code__instructions {\n font-size: 1.1rem;\n }\n}\n","#enp-quiz {\n\n .enp-slider {\n margin-bottom: 1.6rem;\n }\n\n .enp-slider-input__container {\n display: flex;\n align-items: center;\n justify-content: center;\n margin: 1.6rem auto;\n position: relative;\n }\n\n .enp-slider-input__label {\n @include label;\n }\n\n .enp-slider-input__prefix,\n .enp-slider-input__suffix {\n font-size: 1rem;\n }\n\n .enp-slider-input__prefix {\n margin-right: .2rem;\n white-space: pre;\n }\n\n .enp-slider-input__suffix {\n margin-left: .2rem;\n white-space: pre;\n }\n\n .enp-slider-input__input {\n @include input;\n margin-bottom: 0;\n padding: .75rem;\n width: auto;\n transition: all .25s $fastInEaseOut;\n }\n\n .enp-slider-input__input--incorrect {\n color: $red;\n }\n\n .enp-slider-input__input--correct {\n color: $dark_green;\n }\n\n .enp-slider-input__input--invalid-animation {\n box-shadow: 0 0 2px 1px $fade_red;\n }\n\n .enp-slider_input__range-helper {\n position: absolute;\n bottom: -1.2rem;\n font-size: 0.8rem;\n }\n\n .enp-slider_input__range-helper--low {\n left: 0;\n }\n\n .enp-slider_input__range-helper--high {\n right: 0;\n }\n\n .enp-slider-input__range-helper__number {\n position: relative;\n color: $dark_gray;\n }\n\n .enp-slider_input__range-helper__number--low {\n\n }\n\n .enp-slider_input__range-helper__number--high {\n\n }\n\n .ui-slider-range-show-correct__tooltip-container {\n position: relative;\n }\n\n .ui-slider-range-show-correct__tooltip {\n position: absolute;\n top: -0.4rem;\n margin-left: -0.55rem;\n height: 1rem;\n width: 1.1rem;\n height: 1.1rem;\n border: 2px solid $green;\n background-color: #fff;\n border-radius: 50%;\n z-index: 9999;\n }\n\n .ui-slider-range-show-correct__tooltip--low {\n left: 0;\n }\n\n .ui-slider-range-show-correct__tooltip--high {\n right: -0.55rem;\n }\n\n .ui-slider-range-show-correct__tooltip__text {\n position: relative;\n color: darken($green, 15);\n top: -1.35rem;\n font-size: .825rem;\n min-width: 100%;\n display: inline-block;\n text-align: center;\n text-shadow: 0 1px 0 #fff;\n }\n\n .ui-slider-range-show-correct__tooltip__text--low {\n\n }\n\n .ui-slider-range-show-correct__tooltip__text--high {\n\n }\n\n .ui-slider-range-show-correct__tooltip__text--low-center {\n //left: 0; // not perfectly centered for huge numbers, but is for small numbers\n }\n\n // JQUERY SLIDER\n .enp-slider {\n\t\tposition: relative;\n\t\ttext-align: left;\n\t\tbackground: #ddd;\n\n\t\t/* Layout helpers\n\t\t----------------------------------*/\n\t\t.ui-helper-hidden {\n\t\t\tdisplay: none;\n\t\t}\n\t\t.ui-helper-hidden-accessible {\n\t\t\tborder: 0;\n\t\t\tclip: rect(0 0 0 0);\n\t\t\theight: 1px;\n\t\t\tmargin: -1px;\n\t\t\toverflow: hidden;\n\t\t\tpadding: 0;\n\t\t\tposition: absolute;\n\t\t\twidth: 1px;\n\t\t}\n\t\t.ui-helper-reset {\n\t\t\tmargin: 0;\n\t\t\tpadding: 0;\n\t\t\tborder: 0;\n\t\t\toutline: 0;\n\t\t\tline-height: 1.3;\n\t\t\ttext-decoration: none;\n\t\t\tfont-size: 100%;\n\t\t\tlist-style: none;\n\t\t}\n\t\t.ui-helper-clearfix:before,\n\t\t.ui-helper-clearfix:after {\n\t\t\tcontent: \"\";\n\t\t\tdisplay: table;\n\t\t\tborder-collapse: collapse;\n\t\t}\n\t\t.ui-helper-clearfix:after {\n\t\t\tclear: both;\n\t\t}\n\t\t.ui-helper-clearfix {\n\t\t\tmin-height: 0; /* support: IE7 */\n\t\t}\n\t\t.ui-helper-zfix {\n\t\t\twidth: 100%;\n\t\t\theight: 100%;\n\t\t\ttop: 0;\n\t\t\tleft: 0;\n\t\t\tposition: absolute;\n\t\t\topacity: 0;\n\t\t\tfilter:alpha(opacity=0); /* support: IE8 */\n\t\t}\n\n\t\t.ui-front {\n\t\t\tz-index: 100;\n\t\t}\n\n\n\t\t/* Interaction Cues\n\t\t----------------------------------*/\n\t\t.ui-state-disabled {\n\t\t\tcursor: default !important;\n\t\t}\n\n\n\t\t/* Icons\n\t\t----------------------------------*/\n\n\t\t/* states and images */\n\t\t.ui-icon {\n\t\t\tdisplay: block;\n\t\t\ttext-indent: -99999px;\n\t\t\toverflow: hidden;\n\t\t\tbackground-repeat: no-repeat;\n\t\t}\n\n\n\t\t/* Misc visuals\n\t\t----------------------------------*/\n\n\t\t/* Overlays */\n\t\t.ui-widget-overlay {\n\t\t\tposition: fixed;\n\t\t\ttop: 0;\n\t\t\tleft: 0;\n\t\t\twidth: 100%;\n\t\t\theight: 100%;\n\t\t}\n\n\t\t.ui-slider-handle {\n\t\t\tbackground: #fff;\n\t\t\tborder-radius: 50%;\n\t\t\tborder: 1px solid #aaa;\n\t\t\tposition: absolute;\n\t\t\tz-index: 2;\n\t\t\twidth: 1.2rem;\n\t\t\theight: 1.2rem;\n top: -.4rem;\n\t\t\tmargin-left: -.6rem;\n\t\t\tcursor: default;\n\t\t\t-ms-touch-action: none;\n\t\t\ttouch-action: none;\n\t\t\ttransition: opacity 0.2s $fastInEaseOut, height .18s $fastInEaseOut, width .18s $fastInEaseOut, transform 0.18s $fastInEaseOut;\n\n @include media(max-medium) {\n width: 2rem;\n \t\t\theight: 2rem;\n top: -.85rem;\n margin-left: -1rem;\n transform: rotate(225deg);\n }\n\n\t\t\t&:focus {\n\t\t\t\toutline: none;\n\t\t\t\tbox-shadow: 0 0 3px 1px #4D90FE;\n\t\t\t}\n\n &.ui-state-active {\n @include media(max-medium) {\n width: 2.2rem;\n height: 2.2rem;\n border-top-left-radius: 0;\n transform: translate3d(-0.2rem, -0.8rem, 0) rotate(225deg);\n }\n\n }\n\n\t\t}\n\n .ui-slider-handle--correct,\n\t\t.ui-slider-handle--incorrect {\n width: 1.1rem;\n\t\t\theight: 1.1rem;\n top: -.4rem;\n margin-left: -.55rem;\n }\n\n .ui-slider-handle--incorrect {\n z-index: 1;\n\t\t\tborder: 2px solid $red;\n\t\t}\n\n .ui-slider-handle--correct {\n border: 2px solid $green;\n z-index: 99999;\n }\n\n\t\t.ui-slider-range {\n\t\t\tposition: absolute;\n\t\t\tz-index: 1;\n\t\t\tfont-size: .7rem;\n\t\t\tdisplay: block;\n\t\t\tborder: 0;\n\t\t\tbackground-position: 0 0;\n\t\t\ttop: 0;\n\t\t\theight: 100%;\n\t\t}\n\n .ui-slider-range-show-correct {\n background: $green;\n z-index: 9;\n }\n\n\t\t.ui-slider-range-min {\n\t\t\tleft: 0;\n\t\t\tbackground: $blue;\n\t\t}\n\n\t\t.ui-slider-range-max {\n\t\t\tright: 0;\n\t\t}\n\n\t\t/* support: IE8 - See #6727 */\n\t\t&.ui-state-disabled .ui-slider-handle,\n\t\t&.ui-state-disabled .ui-slider-range {\n\t\t\tfilter: inherit;\n\t\t}\n\t}\n\n\t.ui-slider-horizontal {\n\t\theight: .3rem;\n\t}\n\n\t.enp-question__answered {\n\t\t.enp-slider {\n\t\t\tbackground: #bbb;\n\t\t}\n\n\t\t.ui-slider-range-min {\n\t\t\tbackground: #fff;\n\t\t}\n\n\t}\n\n}\n"]} \ No newline at end of file +{"version":3,"sources":["_setup.scss","_utilities.scss","_variables.scss","_structure.scss","_typography.scss","_animations.scss","_base.scss","_forms.scss","_quiz-create.scss","_quiz-preview.scss","_quiz-publish.scss","_ab-create.scss","_dashboard.scss","_breadcrumbs.scss","_quiz-results.scss","_ab-results.scss","../../../quiz-take/css/sass/_slider.scss"],"names":[],"mappings":"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","file":"enp_quiz-create.min.css","sourcesContent":["html {\n font-size: 16px!important; // set our rem value reference\n}\n\nhtml #enp-quiz {\n box-sizing: border-box;\n}\n\nbody #enp-quiz {\n background: #fff;\n overflow: hidden;\n}\n\n#enp-quiz {\n *, *:before, *:after {\n box-sizing: inherit;\n }\n\n ul, ol {\n margin: 0 0 1.6rem 1.25rem;\n padding: 0;\n }\n\n textarea {\n margin-bottom: 1rem;\n }\n\n button, input[type=\"button\"], input[type=\"reset\"], input[type=\"submit\"] {\n border: none;\n &:active,\n &:focus,\n &:hover {\n border: none;\n }\n }\n\n iframe {\n border: none;\n }\n}\n","@mixin focus--glow {\n outline-color: #4D90FE;\n outline-offset: -2px;\n outline-style: auto;\n outline-width: 5px;\n}\n\n@mixin disabled {\n opacity: 0.65;\n cursor: default;\n}\n\n@mixin btn {\n text-align: center;\n border: none;\n border-radius: 3px;\n padding: .85em 1.4em .75em;\n font-size: 15px;\n font-weight: 400;\n letter-spacing: .05em;\n color: #fff;\n box-shadow: inset 0 -2px 0 rgba(0,0,0,.2);\n background: $link;\n cursor: pointer;\n text-transform: uppercase;\n transition: all .2s;\n line-height: 1.6;\n\n &:focus,\n &:hover {\n color: #fff;\n box-shadow: none;\n background: $link_hover;\n }\n\n &:active {\n color: #fff;\n box-shadow: inset 0 2px 0 rgba(0,0,0,.1);\n background: lighten($blue, 20);\n }\n\n &:focus {\n @include focus--glow;\n }\n\n &:disabled,\n &:disabled:focus,\n &:disabled:hover {\n background: $link;\n cursor: default;\n opacity: .5;\n\n\n }\n}\n\n@mixin btn--reset {\n border: none;\n background: none;\n box-shadow: none;\n padding: 0;\n margin: 0;\n}\n\n@mixin btn--submit {\n @include btn;\n}\n\n@mixin btn--ghost {\n @include btn;\n border: 2px solid $link;\n background: transparent;\n color: $link;\n box-shadow: none;\n\n &:focus,\n &:hover {\n background: transparent;\n border: 2px solid $link_hover;\n color: $link_hover;\n }\n}\n\n@mixin box-shadow {\n box-shadow: 0 2px 2px rgba(0,0,0,.2);\n}\n\n@mixin btn--dashed {\n @include btn;\n border: 1px dashed $darker_gray;\n background: none;\n color: #545454;\n box-shadow: none;\n\n &:hover,\n &:focus {\n border: 1px dashed $darkest_gray;\n color: $darker_gray;\n background: rgba(255,255,255,.9);\n }\n}\n\n@mixin btn--dashed--light {\n @include btn--dashed;\n border: 2px dashed $darker-gray;\n color: $dark_gray;\n transition: all .2s;\n\n &:hover,\n &:focus {\n color: $darker_gray;\n border: 2px dashed #999;\n }\n}\n\n@mixin btn--dashed--light--alt-bg {\n @include btn--dashed--light ;\n background: $light_gray;\n}\n\n@mixin btn--small {\n font-size: 13px;\n}\n\n@mixin btn--thin {\n padding: 0.4em 1em;\n}\n\n@mixin btn--icon {\n @include btn;\n padding: .75em 0.8em .7em 1.4em;\n}\n\n@mixin btn--icon__icon {\n @include icon--white;\n @include icon--xl;\n position: relative;\n top: 4px;\n}\n\n/*\n* @usage: @include btn--icon(BEM-root-class);\n* Button with icon with white circular background.\n* --------------\n* | BTN TEXT > |\n* --------------\n* @param $rootBEM: root class name that will be extended\n\n@mixin btn--icon($rootBEM) {\n .(#){$rootBEM} {\n @include btn--icon;\n }\n\n .(#){$rootBEM}__icon {\n @include btn--icon__icon ;\n }\n}\n*/\n\n@mixin btn--icon--icon-circle {\n @include btn;\n padding: .65em 1.2em .85em 1.4em;\n}\n\n// use when the icon is larger and on the right\n@mixin btn--icon__icon--circle {\n @include icon--circle;\n @include icon--white-bg;\n @include icon--normal;\n margin-left: 0.5em;\n position: relative;\n top: 0.15rem;\n}\n\n@mixin btn--icon__icon--circle--hover {\n @include icon--white-bg--hover;\n}\n\n/*\n* @usage: @include btn--icon--circle(BEM-root-class);\n* Button with icon with white circular background.\n* ---------------\n* | BTN TEXT (>) |\n* ---------------\n* @param $rootBEM: root class name that will be extended\n*/\n@mixin btn--icon--circle($rootBEM) {\n .#{$rootBEM} {\n @include btn--icon--icon-circle;\n }\n\n .#{$rootBEM}__icon {\n @include btn--icon__icon--circle ;\n\n\n &:hover {\n @include btn--icon__icon--circle--hover ;\n }\n }\n}\n\n/*\n* @usage: @include btn--icon--hover-circle(BEM-root-class);\n* Button with icon. Hovering/focusing button moves\n* the icon to right and fades in a white circular background\n* -------------- ----------------\n* | BTN TEXT > | --hover/focus--> | BTN TEXT (>) |\n* -------------- ----------------\n* @param $rootBEM: root class name that will be extended\n*/\n@mixin btn--icon--hover-circle($rootBEM) {\n .#{$rootBEM} {\n @include btn--icon--icon-circle;\n padding-right: 0.8em;\n }\n\n .#{$rootBEM}__icon {\n @include btn--icon__icon--circle ;\n margin-left: 0;\n width: 1em;\n height: 1em;\n background: transparent;\n fill: #fff;\n transform: translate3d(0, 0, 0);\n transition: all .3s ease-in-out;\n }\n\n .#{$rootBEM}:hover .#{$rootBEM}__icon {\n @include btn--icon__icon--circle--hover ;\n transform: translate3d(1em, 0, 0);\n margin-right: 1em;\n }\n\n\n}\n\n// use on small icons and placed on the left\n@mixin btn--icon__icon--circle--small {\n @include icon--circle--small;\n margin-right: 5px;\n}\n\n\n// use this to match the icon to the inline font-size\n@mixin icon--inline {\n width: 1em;\n height: 1em;\n position: relative;\n top: .125em;\n}\n\n@mixin icon--small {\n width: 1rem;\n height: 1rem;\n}\n\n@mixin icon--normal {\n width: 1.2rem;\n height: 1.2rem;\n}\n\n@mixin icon--large {\n width: 1.5rem;\n height: 1.5rem;\n}\n\n@mixin icon--xl {\n width: 1.8rem;\n height: 1.8rem;\n}\n\n@mixin icon--xxl {\n width: 2.4rem;\n height: 2.4rem;\n}\n\n@mixin icon--xxxl {\n width: 2.8rem;\n height: 2.8rem;\n}\n\n@mixin icon--circle {\n border-radius: 50%;\n fill: #fff;\n}\n\n@mixin border-radius {\n border-radius: 3px;\n}\n\n@mixin icon--circle--pad {\n @include icon--circle ;\n padding: 0.05em;\n\n @include breakpoint(medium) {\n padding: 0.15em;\n }\n}\n\n@mixin icon--circle--pad--xl {\n @include icon--circle ;\n padding: 0.6rem;\n}\n\n@mixin icon--circle--small {\n @include icon--small;\n @include icon--circle;\n padding: 0.02rem;\n}\n\n@mixin icon--white {\n fill: #fff;\n}\n\n@mixin icon--white-bg {\n background: #fff;\n fill: $link;\n}\n\n@mixin icon--white-bg--hover {\n background: #fff;\n fill: $link_hover;\n}\n\n@mixin icon--gray-bg {\n background: $dark_gray;\n fill: $light_gray;\n}\n\n@mixin icon--gray-bg--hover {\n fill: #fff;\n background: $darker_gray;\n}\n\n@mixin small-uppercase {\n font-size: 1rem;\n text-transform: uppercase;\n}\n\n@mixin hint {\n font-size: .7rem;\n font-weight: 300;\n color: $darker_gray;\n}\n\n@mixin green {\n color: $green;\n}\n\n@mixin dark-green {\n color: $dark_green;\n}\n\n@mixin red {\n color: $red;\n}\n\n@mixin fade-red {\n color: $fade_red;\n}\n\n/* Text meant only for screen readers */\n@mixin screen-reader-text {\n clip: rect(1px, 1px, 1px, 1px);\n position: absolute !important;\n left:-10000px;\n top:auto;\n width:1px;\n height:1px;\n overflow:hidden;\n}\n\n@mixin screen-reader-text--hover {\n background-color: #f1f1f1;\n border-radius: 3px;\n box-shadow: 0 0 2px 2px rgba(0, 0, 0, 0.6);\n clip: auto !important;\n color: #21759b;\n display: block;\n font-size: 14px;\n font-weight: bold;\n height: auto;\n left: 5px;\n line-height: normal;\n padding: 15px 23px 14px;\n text-decoration: none;\n top: 5px;\n width: auto;\n z-index: 100000;\n}\n\n@mixin xmargin-vertical {\n margin-top: 2rem;\n margin-bottom: 2rem;\n}\n\n@mixin xmargin-horizontal {\n margin-right: 2rem;\n margin-left: 2rem;\n}\n\n@mixin xpadding-vertical {\n padding-top: 2rem;\n padding-bottom: 2rem;\n}\n\n@mixin xpadding-vertical-top {\n padding-top: 2rem;\n}\n\n@mixin xpadding-horizontal {\n padding-right: 2rem;\n padding-left: 2rem;\n}\n\n@mixin header-space {\n @include breakpoint(large) {\n padding-top: 7rem;\n }\n}\n\n@mixin ul-no-style {\n list-style: none;\n margin-left: 0;\n}\n\n@mixin hidden--accessible {\n height: 0;\n opacity: 0;\n padding: 0;\n overflow: hidden;\n}\n\n@mixin accordion {\n background: #fff;\n width: 100%;\n}\n\n@mixin accordion__header {\n @include accordion ;\n box-shadow: inset 1px 1px 0 #ccc, inset -1px -1px 0 #ccc;\n color: $font;\n font-family: $fontTitle;\n font-size: .9rem;\n font-weight: 400;\n line-height: 1.5;\n text-transform: none;\n letter-spacing: 0;\n text-align: left;\n border: none;\n border-radius: 3px;\n min-height: 3.065rem;\n padding: 1rem 2rem 1rem 1rem;\n margin: 1.6rem 0 0;\n position: relative;\n z-index: 9;\n cursor: pointer;\n transition: all .2s $fastInEaseOut;\n}\n\n@mixin accordion__content {\n @include accordion ;\n box-shadow: inset 1px -1px 0 #ccc, inset -1px -1px 0 #ccc;\n display: block;\n position: relative;\n height: auto;\n overflow: visible;\n margin-bottom: 1.6rem;\n}\n\n@mixin accordion__content--closed {\n margin-top: 0;\n padding-top: 0rem;\n animation: slideOutTop .25s $fastInEaseOut forwards;\n display: none;\n}\n\n@mixin accordion__content--open {\n padding-top: 1.6rem;\n margin-bottom: 2rem;\n animation: slideInTop .45s $fastInEaseOut forwards;\n}\n\n// Share Icons\n@mixin share_icons($rootBEM) {\n\n .#{$rootBEM} {\n @include ul-no-style;\n @include flex-center;\n }\n\n .#{$rootBEM}__item {\n margin-right: 20px;\n\n &:last-child {\n margin-right: 0;\n }\n }\n\n .#{$rootBEM}__item__icon {\n @include icon--xxl;\n @include icon--circle--pad--xl;\n\n fill: #fff!important;\n }\n\n .#{$rootBEM}__item__icon--facebook {\n background-color: #3a5795;\n }\n\n .#{$rootBEM}__item__icon--twitter {\n background-color: #4099ff;\n }\n}\n\n@mixin section--alt {\n background: $light_gray;\n border-bottom: 1px solid #ddd;\n border-top: 1px solid #ddd;\n padding-top: 3rem;\n padding-bottom: 3rem;\n margin-top: 3rem;\n margin-bottom: 3rem;\n}\n\n#enp-quiz {\n .enp-screen-reader-text {\n @include screen-reader-text;\n }\n\n .enp-screen-reader-text:hover,\n .enp-screen-reader-text:active,\n .enp-screen-reader-text:focus {\n @include screen-reader-text--hover;\n }\n\n .enp-accordion-header {\n @include accordion__header ;\n\n &:first-of-type {\n margin-top: 0;\n }\n\n .enp-accordion-header__icon {\n position: absolute;\n fill: $dark_gray;\n right: 0.75rem;\n bottom: 0.75rem;\n transition: all .35s $fastInEaseOut;\n }\n }\n\n .enp-accordion-header--open {\n\n .enp-accordion-header__icon {\n transform: rotateX(180deg);\n }\n\n }\n\n .enp-quiz-settings__form .enp-accordion-header {\n position: relative;\n overflow-y: hidden;\n }\n\n .enp-accordion-content {\n @include accordion__content ;\n }\n\n .enp-accordion-content--closed {\n @include accordion__content--closed ;\n }\n\n .enp-accordion-content--open {\n @include accordion__content--open ;\n }\n\n .enp-quiz-message {\n @include container--thin;\n background: #fff;\n border: 1px solid #eee;\n border-bottom: 1px solid #ccc;\n padding: 1rem;\n margin-bottom: 1.6rem;\n position: fixed;\n bottom: 0;\n left: 0;\n }\n\n .enp-quiz-message__title {\n @include small-uppercase;\n }\n\n .enp-message__list {\n @include ul-no-style;\n font-size: 1.1rem;\n margin-bottom: 0;\n }\n\n .enp-quiz-message--error {\n border-left: 6px solid $red;\n color: $red;\n }\n\n .enp-quiz-message__title--error {\n color: $dark_red;\n }\n\n .enp-quiz-message--success {\n border-left: 6px solid $green;\n color: $dark_green;\n }\n\n .enp-quiz-message__title--success {\n color: $dark_green;\n }\n\n .enp-quiz-message--note {\n border-left: 6px solid $khaki;\n }\n\n .enp-quiz-message__title--note {\n color: $dark_blue;\n }\n\n .enp-quiz-message__close {\n @include btn--reset;\n position: absolute;\n top: 5px;\n right: 5px;\n }\n\n .enp-quiz-message--ajax {\n margin-bottom: .6rem;\n animation: slideInBottom .3s;\n }\n\n .enp-quiz-message-ajax-container {\n z-index: 9999;\n position: fixed;\n bottom: 10px;\n }\n\n .enp-quiz-message--saving__spinner {\n margin-left: -10px;\n }\n\n .enp-quiz-message--saving__text {\n font-size: 1rem;\n }\n\n textarea.limited-chars,\n input.limited-chars {\n margin-bottom: 0.2rem;\n }\n\n .limited-chars__container {\n color: lighten($dark_gray, 8);\n font-size: 0.8rem;\n display: block;\n text-align: right;\n margin-bottom: 1.2rem;\n }\n\n .limited-chars__counter {\n color: $dark_gray;\n }\n\n .limited-chars__container--error {\n color: $dark_red;\n\n .limited-chars__counter {\n color: $dark_red;\n }\n }\n\n textarea.has-error,\n input.has-error {\n border: 1px solid $red;\n &:focus {\n outline-color: $red;\n }\n\n }\n\n\n\n .enp-tooltip {\n position: relative;\n }\n\n .enp-tooltip__activator {\n\n &:focus + .enp-tooltip__description,\n &:focus > .enp-tooltip__description {\n display: block;\n }\n }\n\n .enp-tooltip__description {\n display: none;\n position: absolute;\n left: 103%;\n margin-bottom: 2rem;\n border-radius: 3px;\n background: $light_gray;\n font-size: 0.9rem;\n padding: 0.9rem;\n max-width: 200px;\n }\n\n\n}\n\n.enp-sticky {\n position: relative;\n left: 0;\n right: 0;\n top: 0;\n z-index: 999;\n\n &.enp-sticky--fixed {\n position: fixed;\n }\n}\n\n.enp-breadcrumb-link {\n font-size: 0.85rem;\n}\n\n.enp-breadcrumb-link__icon {\n position: relative;\n top: 0.45rem;\n left: 0.4rem;\n}\n","//fonts\n$fontBody : Arial,monospace, helvetica, arial, sans-serif;\n$fontTitle : Arial,monospace, helvetica, arial, sans-serif;\n\n// // // colors\n$font : #1d1c25;\n$background: #FAF9FB;\n$title : #5D5E5F;\n\n// Blues\n$blue: #00A9B7;\n$dark_blue: #333F48;\n$light_blue: lighten($dark_blue, 40);\n\n// Grays\n$light_gray: #FAF9FB;\n$really_light_gray: lighten($light_gray, 1);\n$gray: darken($light_gray, 2);\n$dark_gray: darken($gray, 5);\n$darker_gray: darken($dark_gray, 25);\n$darkest_gray: darken($dark_gray, 50);\n\n// Other colors\n$khaki: #CCA562;\n$green: #60AAAD;\n$dark_green: darken($green, 8);\n$red: #bf5700;\n$dark_red: darken($red, 8);\n$fade_red: #C1893E;\n\n// Elements\n$link: #bf5700;\n$link_hover: darken($link, 8);\n// animation\n$fastInEaseOut: cubic-bezier(0.000, 0, .3, 1);\n\n\n$breakpoints: (\n \"small\" : 400px,\n \"medium\" : 700px,\n \"large\" : 1000px\n);\n\n// -----------------------------------------------------------------------------\n// Core\n// -----------------------------------------------------------------------------\n\n// Caching current breakpoint\n// Not meant to be manually edited\n$default-breakpoint: root;\n$current-breakpoint: $default-breakpoint;\n\n// The usual breakpoint mixin\n// Except it updates the $current-breakpoint variable\n// 1. If breakpoint name exists in map\n// 2. Update $current-breakpoint\n// 3. Open a media query\n// 4. Let the user dump content\n// 5. Then reset $current-breakpoint\n// 6. If breakpoint name doesn't exist in map, warn the user\n@mixin breakpoint($breakpoint) {\n $value: map-get($breakpoints, $breakpoint);\n\n @if $value != null { // 1\n $current-breakpoint: $breakpoint !global; // 2\n @media (min-width: $value) { @content; } // 3\n $current-breakpoint: $default-breakpoint !global; // 5\n }\n\n @else {\n @warn \"Invalid breakpoint `#{$breakpoint}`.\"; // 6\n }\n}\n\n// for only targeting a specific device\n// NOTE: DOESN'T SUPPORT THE @include placeholders!!!\n@mixin media($query) {\n @if $query == max-small {\n $media_query: \"max-width: #{map-get($breakpoints, \"small\")}\";\n } @else if $query == only-medium {\n $media_query: \"min-width: #{map-get($breakpoints, \"medium\")}) and (max-width: #{(map-get($breakpoints, \"large\") - 1px)}\";\n } @else if $query == max-medium {\n $media_query: \"max-width: #{(map-get($breakpoints, \"medium\") - 1px)}\";\n } @else if $query == max-large {\n $media_query: \"max-width: #{(map-get($breakpoints, \"large\") - 1px)}\";\n } @else {\n // just use the number provided as a max width\n $media_query: \"max-width: #{$query}\";\n }\n\n @if variable-exists(media_query) {\n @media ($media_query) {\n @content;\n }\n }\n\n}\n","@mixin clearfix {\n &:after {\n content: \"\";\n display: table;\n clear: both;\n }\n}\n\n@mixin container {\n max-width: 740px;\n margin: 0 auto;\n @include clearfix;\n}\n\n@mixin well {\n padding: 1.6rem;\n margin-bottom: 1.6rem;\n background: $light_blue;\n @include border-radius;\n border: 1px solid #eee;\n border-bottom-color: #ccc;\n\n @include breakpoint(medium) {\n margin-bottom: 2.6rem;\n padding: 1.6rem 2rem;\n }\n}\n\n@mixin container--wide {\n @include container;\n\n @include breakpoint(medium) {\n max-width: 1000px;\n }\n\n @include breakpoint(large) {\n max-width: 1440px;\n }\n}\n\n\n@mixin container--thin {\n @include container;\n // max-width: 512px;\n}\n\n@mixin container--really-thin {\n @include container;\n max-width: 300px;\n}\n\n@mixin container--form {\n @include container--thin;\n\n .enp-input,\n .enp-textarea {\n width: 100%;\n }\n}\n\n@mixin container--form--thin {\n @include well;\n @include container--really-thin;\n\n .enp-input,\n .enp-textarea {\n width: 100%;\n }\n}\n\n@mixin flex-container { // no pseudo element to clear and break spacing\n @include container;\n}\n\n@mixin flex-container--wide { // no pseudo element to clear and break spacing\n @include flex-container;\n\n @include breakpoint(medium) {\n max-width: 840px;\n }\n\n @include breakpoint(large) {\n max-width: 1000px;\n }\n}\n\n@mixin flex {\n display: flex;\n}\n\n@mixin flex-list__item {\n flex-basis: 100%;\n margin: 0;\n border-bottom-color: #ddd;\n}\n\n@mixin flex-spread {\n @include flex;\n justify-content: space-between;\n}\n\n@mixin flex-spread-vertical {\n @include flex-spread;\n flex-direction: column;\n}\n\n@mixin flex-spread-around {\n @include flex;\n justify-content: space-around;\n}\n\n@mixin flex-bottom {\n @include flex;\n align-items: flex-end;\n align-content: flex-end;\n}\n\n@mixin flex-center {\n @include flex;\n justify-content: center;\n align-content: center;\n align-items: center;\n}\n\n@mixin flex-vertical-center {\n @include flex;\n align-content: center;\n align-items: center;\n}\n\n@mixin flex-inline {\n @include flex;\n @include ul-no-style;\n margin-bottom: 0;\n}\n\n@mixin flex-inline__item {\n margin-right: 10px;\n\n &:last-of-type {\n margin-right: 0;\n }\n}\n\n\n@mixin flex-grid {\n @include flex;\n flex-flow: column wrap;\n align-items: stretch;\n @include ul-no-style;\n}\n\n@mixin flex-grid__item {\n flex-basis: 100%;\n padding: 1rem 1.2rem;\n background-color: $gray;\n border: 1px solid #eee;\n border-bottom: 1px solid #ddd;\n list-style: none;\n transition: all .35s $fastInEaseOut;\n margin: 0 0 0.8rem;\n\n // @include breakpoint(medium) {\n // flex-basis: 100%;\n // max-width: 100%;\n // margin: 0 2% 0.8rem 0;\n\n // &:nth-child(2n) {\n // margin-right: 0;\n // }\n // }\n\n // @include breakpoint(large) {\n // flex-basis: 100%;\n // max-width: 100%;\n // margin-right: 1.25%;\n\n // &:nth-child(2n) {\n // margin-right: 1.25%;\n // }\n\n // &:nth-child(3n) {\n // margin-right: 0;\n // }\n // }\n}\n\n@mixin flex-grid__title {\n font-size: 1rem;\n padding-bottom: 0.5rem;\n}\n","body #enp-quiz {\n color: $font;\n font-family: $fontBody;\n font-size: 1em;\n line-height: 1.6;\n font-weight: 400;\n\n @include breakpoint(medium) {\n font-size: 1.3em;\n }\n}\n\n#enp-quiz {\n /* Headings */\n h1,h2,h3,h4,h5,h6 {\n font-family: $fontTitle;\n color: $title;\n clear: both;\n margin: 0 0 .2rem;\n font-weight: bold;\n line-height: 1.2em;\n }\n\n h1 {\n font-size: 2em;\n }\n\n h2 {\n font-size: 1.75em;\n }\n\n h3 {\n font-size: 1.475em;\n }\n\n h4 {\n font-size: 1.3em;\n }\n\n h5 {\n font-size: 1.125em;\n }\n\n h6 {\n font-size: 1em;\n }\n\n p+h1, ul+h1,\n p+h2, ul+h2,\n p+h3, ul+h3,\n p+h4, ul+h4,\n p+h5, ul+h5,\n p+h6, ul+h6 {\n margin-top: 1.8em;\n }\n\n /* Text elements */\n p {\n font-size: 0.85em;\n margin-bottom: 1.125em;\n font-weight: 300;\n }\n ul, ol {\n margin: 0 0 1.6em 1.25em;\n }\n ul {\n list-style: disc;\n }\n ol {\n list-style: decimal;\n }\n li > ul,\n li > ol {\n margin-bottom: 0;\n margin-left: 1.6em;\n }\n\n b, strong {\n font-weight: bold;\n }\n\n dfn, cite, em {\n font-family: georgia, times, serif;\n font-style: italic;\n }\n\n pre {\n background: #eee;\n font-family: \"Courier 10 Pitch\", Courier, monospace;\n font-size: .95em;\n line-height: 1.6;\n margin-bottom: 1.6em;\n padding: 1.6em;\n overflow: auto;\n max-width: 100%;\n overflow: scroll;\n max-width: 68vw;\n overflow-wrap: break-word;\n }\n .code, code, kbd, tt, var {\n font: .7em Monaco, Consolas, \"Andale Mono\", \"DejaVu Sans Mono\", monospace;\n }\n\n table {\n border: none;\n\n th {\n font-family: $fontTitle;\n font-size: .8rem;\n text-transform: uppercase;\n border: none;\n border-bottom: 1px solid #ddd;\n }\n\n td {\n font-family: $fontBody;\n font-size: 1rem;\n border: none;\n border-bottom: 1px solid #eee;\n }\n\n tr:nth-child(even) td {\n background: $really_light_gray;\n }\n\n tr:last-child td {\n border-bottom: none;\n }\n }\n\n figure {\n margin: 0;\n }\n\n img {\n height: auto; /* Make sure images are scaled correctly. */\n max-width: 100%; /* Adhere to container width. */\n }\n\n /* Links */\n a {\n color: $link;\n text-decoration: none;\n transition: color .2s;\n touch-action: manipulation; // remove 300ms delay for ie\n\n .enp-icon {\n fill: $link;\n }\n }\n\n a:hover,\n a:focus,\n a:active {\n color: $link_hover;\n\n .enp-icon {\n fill: $link_hover;\n }\n }\n\n button {\n &:focus {\n @include focus--glow;\n }\n }\n\n .enp-btn {\n @include btn;\n }\n\n\n .enp-btn--add {\n @include btn--dashed;\n width: 100%;\n }\n\n .enp-btn--disabled {\n @include disabled;\n }\n\n .enp-btn--enabled {\n animation: expand .6s;\n }\n\n .enp-icon {\n width: 24px;\n height: 24px;\n transition: all .2s;\n }\n\n .enp-page-title {\n font-size: 1.6rem;\n }\n}\n","@keyframes slideInBottom {\n 0% {\n opacity: 0;\n transform: translate3d(0, 100px, 0);\n }\n 100% {\n opacity: 1;\n transform: translate3d(0, 0, 0);\n }\n}\n\n@keyframes slideInTop {\n 0% {\n opacity: 0;\n height: auto;\n transform: translate3d(0, -20px, 0);\n }\n 100% {\n opacity: 1;\n height: auto;\n transform: translate3d(0, 0, 0);\n }\n}\n\n@keyframes slideInTop--reduced-opacity {\n 0% {\n opacity: 0;\n height: auto;\n transform: translate3d(0, -20px, 0);\n }\n 100% {\n opacity: 0.8;\n height: auto;\n transform: translate3d(0, 0, 0);\n }\n}\n\n\n@keyframes slideOutTop {\n 0% {\n overflow: hidden;\n height: 100px;\n opacity: 1;\n transform: translate3d(0, 0, 0);\n }\n 100% {\n height: 0;\n opacity: 0;\n transform: translate3d(0, -20px, 0);\n }\n}\n\n@keyframes removeElement {\n 0% {\n opacity: 1;\n transform: translate3d(0, 0, 0);\n }\n 100% {\n padding: 0;\n margin: 0;\n opacity: 0;\n height: 0;\n z-index: -1;\n transform: translate3d(-200px, 0, 0);\n }\n}\n\n@keyframes removeAnswers {\n 0% {\n opacity: 1;\n transform: translate3d(0, 0, 0);\n }\n 100% {\n padding: 0;\n opacity: 0;\n display: none;\n height: 0;\n z-index: -1;\n transform: translate3d(-200px, 0, 0);\n }\n}\n\n@keyframes removeQuestion {\n 0% {\n opacity: 1;\n transform: translateX(0);\n }\n 100% {\n opacity: 0;\n transform: translateX(-200px);\n }\n}\n\n@keyframes showNextQuestion {\n 0% {\n opacity: 0;\n transform: translateX(200px);\n }\n\n 100% {\n opacity: 1;\n transform: translateX(0);\n }\n}\n\n@keyframes expand {\n 0% {\n opacity: 0.8;\n transform: scale3d(1, 1, 1);\n box-shadow: 0 0 0px rgba(0,0,0,.3);\n }\n\n 40% {\n opacity: 1;\n }\n\n 70% {\n opacity: 1;\n transform: scale3d(1.1, 1.1, 1);\n box-shadow: 0 0 8px rgba(0,0,0,.4);\n }\n\n 100% {\n opacity: 1;\n transform: scale3d(1, 1, 1);\n box-shadow: 0 0 0px rgba(0,0,0,.3), inset 0 2px 0 rgba(0,0,0,.2);\n }\n}\n\n@keyframes checkmark {\n 0% {\n opacity: 0;\n transform: scale3d(0.2, 0.2, 1);\n }\n 5% {\n opacity: 1;\n }\n 10% {\n transform: scale3d(1.4, 1.4, 1);\n }\n 12% {\n transform: scale3d(1, 1, 1);\n }\n 90% {\n opacity: 1;\n transform: scale3d(1, 1, 1);\n }\n 92% {\n transform: scale3d(1.4, 1.4, 1);\n }\n 100% {\n opacity: 0;\n transform: scale3d(0.2, 0.2, 1);\n }\n\n}\n\n@keyframes fadeOut {\n 0% {\n opacity: 1;\n }\n 100% {\n opacity: 0;\n }\n}\n\n@keyframes fadeIn {\n 0% {\n opacity: 0;\n }\n 100% {\n opacity: 1;\n }\n}\n\n@keyframes navSlideIn {\n 0% {\n transform: translate3d(0, -200px, 0);\n }\n 100% {\n transform: translate3d(0, 0, 0);\n }\n}\n\n\n.spinner {\n margin: 0 auto;\n width: 70px;\n text-align: center;\n}\n\n.spinner > div {\n width: 18px;\n height: 18px;\n background-color: #333;\n\n border-radius: 100%;\n display: inline-block;\n -webkit-animation: sk-bouncedelay 1.4s infinite ease-in-out both;\n animation: sk-bouncedelay 1.4s infinite ease-in-out both;\n}\n\n.spinner .bounce1 {\n -webkit-animation-delay: -0.32s;\n animation-delay: -0.32s;\n}\n\n.spinner .bounce2 {\n -webkit-animation-delay: -0.16s;\n animation-delay: -0.16s;\n}\n\n@-webkit-keyframes sk-bouncedelay {\n 0%, 80%, 100% { -webkit-transform: scale(0) }\n 40% { -webkit-transform: scale(1.0) }\n}\n\n@keyframes sk-bouncedelay {\n 0%, 80%, 100% {\n -webkit-transform: scale(0);\n transform: scale(0);\n } 40% {\n -webkit-transform: scale(1.0);\n transform: scale(1.0);\n }\n}\n","#enp-quiz {\n transition: background .25s $fastInEaseOut;\n\n .enp-container {\n // @include container;\n }\n\n .enp-aside {\n @include well;\n @include container--thin;\n font-size: 1.2rem;\n background: $light_gray;\n }\n\n .enp-aside__title {\n @include small-uppercase;\n font-weight: 600;\n }\n\n .enp-page-title {\n border-bottom: 2px solid $blue;\n }\n}\n","\n\n// enter the root BEM class and this will output the correct CSS for you\n@mixin radio-block($rootBEM) {\n .#{$rootBEM}__legend {\n @include radio-block__legend ;\n }\n\n .#{$rootBEM}__input {\n @include radio-block__input ;\n }\n\n .#{$rootBEM}__label {\n @include radio-block__label ;\n }\n\n .#{$rootBEM}__input:checked + .#{$rootBEM}__label {\n @include radio-block__label--checked ;\n }\n\n .#{$rootBEM}__input:focus + .#{$rootBEM}__label {\n @include radio-block__label--focus ;\n }\n}\n\n@mixin radio-inline($rootBEM) {\n .#{$rootBEM}__legend {\n @include radio-inline__legend ;\n }\n\n .#{$rootBEM}__input {\n @include radio-inline__input ;\n }\n\n .#{$rootBEM}__label {\n @include radio-inline__label ;\n }\n\n .#{$rootBEM}__input:checked + .#{$rootBEM}__label {\n @include radio-inline__label--checked ;\n }\n\n .#{$rootBEM}__input:focus + .#{$rootBEM}__label {\n @include radio-inline__label--focus ;\n }\n\n}\n\n@mixin label {\n display: block;\n color: lighten($font, 10);\n font-weight: normal;\n font-size: 0.85rem;\n text-transform: uppercase;\n}\n\n@mixin legend {\n @include label;\n padding-top: 1.6rem;\n margin-bottom: 0.2rem;\n border: none;\n}\n\n@mixin label--bold {\n @include label;\n font-weight: 500;\n}\n\n@mixin legend--bold {\n @include label--bold;\n}\n\n@mixin input {\n font-size: 1rem;\n font-family: $fontBody;\n padding: 0.8rem 0.5rem;\n background: #fff;\n border: 1px solid #aaa;\n border-radius: 3px;\n width: 20rem;\n max-width: 100%;\n margin-bottom: 1.2rem;\n\n @include breakpoint(medium) {\n padding: 0.8rem;\n width: 100%;\n }\n}\n\n@mixin input--large {\n @include input;\n padding: 1rem 1.2rem;\n font-size: 1rem;\n}\n\n@mixin input--xl {\n @include input;\n font-weight: bold;\n font-size: 1.6rem;\n margin-bottom: 1rem;\n\n &::placeholder {\n font-weight: bold;\n }\n}\n\n@mixin textarea {\n @include input;\n line-height: 1.5;\n\n &:focus {\n @include focus--glow;\n }\n}\n\n\n/*\n@mixin no-radio__input {\n display: inline-block;\n width: 0;\n margin: 0;\n padding: 0;\n opacity: 0;\n overflow: hidden;\n}\n\n@mixin no-radio__label {\n display: inline-block;\n position: relative;\n left: -1rem;\n padding: .2rem .6rem;\n @include small-uppercase;\n font-size: .8rem;\n font-weight: normal;\n background: transparent;\n border-radius: 3px;\n transition: all .2s;\n}*/\n\n@mixin radio-block__legend {\n @include legend;\n margin-bottom: 0.6rem;\n}\n\n@mixin radio-block__input {\n position: absolute;\n z-index: 9;\n margin-left: 9px;\n}\n\n@mixin radio-block__label {\n text-transform: capitalize;\n background: #f2f2f2;\n display: block;\n padding: 5px 10px 5px 39px;\n position: relative;\n top: -6px;\n box-shadow: inset -1px -1px 0 rgba(0,0,0,.1), inset 30px 0px 0 rgba(255,255,255,.7), inset 31px 0px 0 rgba(0,0,0,.1);\n}\n\n@mixin radio-block__label--checked {\n background: $blue;\n color: #fff;\n text-shadow: 0 0 1px rgba(0,0,0,.7);\n}\n\n@mixin radio-block__label--focus {\n z-index: 8;\n @include focus--glow ;\n}\n\n@mixin radio-inline__legend {\n @include legend;\n}\n\n@mixin radio-inline__input {\n @include screen-reader-text;\n}\n\n@mixin radio-inline__label {\n text-transform: capitalize;\n display: inline-block;\n padding: 0.2rem 0.5rem;\n border-radius: 3px;\n cursor: pointer;\n}\n\n@mixin radio-inline__label--checked {\n @include radio-block__label--checked ;\n}\n\n@mixin radio-inline__label--focus {\n @include radio-block__label--focus ;\n}\n\n@mixin select--wide--chevron {\n width: 100%;\n -webkit-appearance: none;\n -moz-appearance: none;\n appearance: none;\n font-size: 0.85rem;\n padding: 0.7rem 32px 0.7rem 0.8rem;\n border: 1px solid #bbb;\n border-radius: 3px;\n margin-bottom: 1.6rem;\n background: url(../svg/chevron-down.svg) 100% 50% no-repeat;\n background-color: #fff;\n box-shadow: inset -26px 0 0 rgba(0,0,0,.1);\n}\n\n\n#enp-quiz {\n\n fieldset {\n border: none;\n margin: 0;\n padding: 0;\n }\n\n .enp-label {\n @include label;\n &__sm {\n font-size: 0.85rem;\n }\n &.enp-quiz-winlose__label {\n padding: 1rem 0 0 0;\n }\n }\n\n .enp-legend {\n @include legend;\n padding-top: 0;\n }\n\n .enp-input {\n @include input;\n &__sm {\n padding: 5px;\n margin-bottom: 5px;\n }\n &.enp-input--has-description {\n margin-bottom: 0.2rem;\n }\n }\n\n .enp-textarea-description,\n .enp-input-description {\n margin-bottom: 1rem;\n font-size: 0.85rem;\n }\n\n .enp-textarea-description--before,\n .enp-input-description--before {\n margin-bottom: 0;\n }\n\n .enp-input::placeholder,\n .enp-textarea::placeholder {\n font-family: $fontBody;\n font-weight: 300;\n color: lighten($font, 40);\n }\n\n .enp-textarea {\n @include textarea;\n\n &.enp-textarea--has-description {\n margin-bottom: 0.2rem;\n }\n &.enp-textarea--has-description--before {\n margin-bottom: 1.2rem;\n }\n }\n\n .enp-embed-code {\n @include textarea;\n padding: 1.6rem;\n font-size: 0.7rem;\n font-family: Monaco, Consolas, \"Andale Mono\", \"DejaVu Sans Mono\", monospace;\n\n @include media(max-medium) {\n padding: .8rem;\n }\n }\n}\n","#enp-quiz {\n // .enp-publish-page-container,\n // .enp-preview-page-container {\n // @include container--wide;\n // position: relative;\n // @include xpadding-vertical;\n // background: $really_light_gray;\n\n\n // }\n\n .enp-publish-page-container,\n .enp-quiz-form-container,\n .enp-preview-page-container {\n display: grid;\n grid-column: 2/-1;\n gap: 1rem;;\n width: 100%;\n justify-items: center;\n \n @include media(max-small) {\n padding-left: 8px;\n padding-right: 8px;\n }\n @include breakpoint(medium) {\n justify-items: start;\n }\n }\n // .enp-breadcrumb-link__container {\n // display: grid;\n // grid-column: 1/span 1;\n // justify-content: center;\n // align-items: flex-start;\n // @include xpadding-vertical;\n // }\n .enp-quiz-form {\n display: grid;\n padding-left: 0;\n padding-right: 0;\n @include breakpoint(medium) {\n width: 100%;\n max-width: 40rem;\n }\n }\n\n .enp-preview-page-flex-container {\n display: grid;\n gap: 1rem;\n\n @include breakpoint(medium) {\n grid-template-columns: 1fr 3fr;\n // padding: 0 2rem;\n }\n }\n\n .enp-quiz-title__label {\n @include label--bold;\n }\n\n .enp-quiz-title__textarea {\n @include input--xl;\n }\n \n textarea {\n color: #000;\n }\n\n .enp-accordion-container {\n margin-bottom: 1.6rem;\n position: relative;\n }\n\n .enp-question-content {\n @include accordion;\n padding-top: 0;\n position: relative;\n }\n\n .enp-question-inner {\n padding: 1.6rem 1.6rem 1rem;\n\n @include breakpoint(medium) {\n padding-right: 2.8rem;\n padding-left: 2.9rem;\n }\n\n }\n\n .enp-question-title__label {\n @include label--bold;\n }\n\n .enp-question-title__textarea {\n @include input--large;\n }\n\n .enp-question-image-upload {\n @include btn--dashed--light--alt-bg;\n @include small-uppercase;\n position: relative;\n margin-bottom: 2rem;\n transform: translate3d(0, 0, 0);\n transition: all .3s $fastInEaseOut;\n\n .enp-question-image-upload__icon--photo {\n @include icon--xxxl;\n opacity: 0;\n position: absolute;\n top: 0;\n left: 0;\n right: 0;\n margin: 0 auto;\n transform: translate3d(0, 0, 0);\n z-index: -1;\n transition: opacity .2s, transform .3s $fastInEaseOut;\n }\n\n .enp-question-image-upload__icon--add {\n @include icon--circle--small;\n @include icon--gray-bg;\n margin-right: 5px;\n position: relative;\n top: 0.2rem;\n }\n\n &:hover,\n &:focus,\n &:active {\n padding-top: 5rem;\n padding-bottom: 2rem;\n\n .enp-question-image-upload__icon--photo {\n opacity: 1;\n z-index: 1;\n transform: translate3d(0, 1.75rem, 0);\n }\n\n .enp-question-image-upload__icon--add {\n @include icon--gray-bg--hover;\n }\n }\n }\n\n .enp-question-image__container {\n position: relative;\n margin-bottom: 1rem;\n }\n\n .enp-question-image {\n margin-bottom: 1.2rem;\n }\n\n @include radio-inline(enp-question-type);\n\n .enp-question-type__label {\n position: relative;\n z-index: 9;\n }\n\n .enp-slider-options,\n .enp-mc-options {\n margin-top: 0rem;\n display: none;\n animation: slideOutTop .25s $fastInEaseOut forwards;\n animation-delay: 0s, .05s;\n }\n\n .enp-question-type__input--slider:checked ~ .enp-slider-options,\n .enp-question-type__input--mc:checked ~ .enp-mc-options {\n visibility: visible;\n display: block;\n animation: fadeIn .45s $fastInEaseOut forwards;\n }\n\n .enp-mc-options__list {\n @include ul-no-style;\n }\n\n .enp-mc-option {\n position: relative;\n padding-left: 6px;\n\n @include breakpoint(medium) {\n padding-left: 0;\n }\n }\n\n .enp-mc-options__legend {\n @include legend--bold;\n }\n\n .enp-mc-option__add,\n .enp-mc-option__button--correct,\n .enp-mc-option__button--delete {\n display: none;\n }\n\n .enp-question-type__input--mc:checked ~ .enp-mc-options {\n .enp-mc-option__add,\n .enp-mc-option__button--correct,\n .enp-mc-option__button--delete {\n display: block;\n }\n }\n\n .enp-button__question-image-delete,\n .enp-mc-option__button--delete {\n @include btn--reset;\n position: absolute;\n top: 9px;\n right: -24px;\n fill: #bbb;\n cursor: pointer;\n\n @include breakpoint(medium) {\n right: -30px;\n }\n\n &:focus,\n &:hover {\n fill: $red;\n }\n }\n\n .enp-mc-option__button--correct {\n @include btn--reset;\n position: absolute;\n top: 8px;\n left: -24px;\n\n @include breakpoint(medium) {\n left: -35px;\n }\n\n .enp-mc-option__icon--correct {\n @include icon--circle--pad;\n width: 28px;\n height: 28px;\n fill: #fff;\n background: #fff;\n cursor: pointer;\n border: 2px solid $fade_red;\n transition: all .2s;\n }\n\n &:focus .enp-mc-option__icon--correct,\n &:hover .enp-mc-option__icon--correct {\n background: #fff;\n border-color: $green;\n fill: $green;\n }\n\n &:disabled {\n opacity: 1;\n\n .enp-mc-option__icon--correct {\n cursor: default;\n fill: #fff;\n border: 2px solid transparent;\n }\n }\n }\n\n .enp-mc-option--correct {\n .enp-mc-option__input {\n box-shadow: inset 0 0 3px $blue;\n border: 1px solid $blue;\n }\n\n .enp-mc-option__button--correct:focus .enp-mc-option__icon--correct,\n .enp-mc-option__button--correct:hover .enp-mc-option__icon--correct,\n .enp-mc-option__icon--correct {\n fill: #fff;\n border-color: $blue;\n background: $blue;\n }\n }\n\n .enp-mc-option__add {\n @include btn--dashed--light--alt-bg;\n @include small-uppercase;\n text-align: left;\n padding: 0.7rem 0.75rem 0.8rem;\n\n .enp-mc-option__add__icon {\n @include btn--icon__icon--circle--small ;\n @include icon--gray-bg;\n position: relative;\n top: 0.2rem;\n }\n\n &:hover .enp-mc-option__add__icon {\n @include icon--gray-bg--hover;\n }\n }\n\n .enp-slider-options .enp-input {\n max-width: 11.8rem;\n }\n\n .enp-slider-range__container .enp-input,\n .enp-slider-correct__container .enp-input {\n max-width: 8.8rem;\n @include breakpoint('small') {\n max-width: 11.8rem;\n }\n }\n\n .enp-slider-preview {\n border: 1px solid #ddd;\n margin-top: 0.2rem;\n margin-bottom: 1.6rem;\n padding: 1.6rem 1.6rem .6rem;\n position: relative;\n\n .enp-label--slider-preview {\n position: absolute;\n width: 100%;\n top: 0.2rem;\n left: 0.4rem;\n font-size: 0.75rem;\n text-transform: uppercase;\n }\n }\n\n .enp-slider-range__container,\n .enp-slider-correct__container {\n @include flex-spread;\n align-items: center;\n }\n\n .enp-slider-range__helper,\n .enp-slider-correct__helper {\n color: #777;\n font-size: 0.85rem;\n background: #fff;\n padding: 0 .3rem;\n position: relative;\n\n &:before {\n content: '';\n position: absolute;\n top: 44%;\n height: 4px;\n background: #ddd;\n width: 120px;\n left: -60px;\n z-index: -1;\n transition: width 0.7s $fastInEaseOut, background 1.6s $fastInEaseOut;\n }\n }\n\n .enp-slider-options {\n margin-bottom: 2rem;\n\n .enp-accordion-header {\n text-transform: uppercase;\n font-size: 0.85rem;\n padding: 0.675rem;\n }\n\n .enp-slider-advanced-options__content {\n border: none;\n box-shadow: none;\n padding-top: 1rem;\n padding-bottom: 0;\n margin-bottom: 0;\n }\n }\n\n .enp-slider-correct-high__container {\n position: relative;\n }\n\n .enp-slider-correct-high__input-container--hidden {\n display: none;\n }\n\n .enp-slider-correct__helper--hidden {\n &:before {\n width: 0;\n background: $green;\n }\n }\n\n .enp-slider-correct-answer-range--add-range {\n @include btn--dashed--light--alt-bg;\n margin-left: 0.8rem;\n font-size: 0.7rem;\n\n @include breakpoint('small') {\n font-size: 0.8rem;\n padding: .7rem;\n }\n\n @include breakpoint('medium') {\n padding: .7rem 1.2rem;\n min-width: 11.4rem;\n }\n\n .enp-slider-correct-answer-range__icon {\n @include btn--icon__icon--circle--small ;\n @include icon--gray-bg;\n position: relative;\n left: -0.2rem;\n }\n\n &:hover .enp-slider-correct-answer-range__icon {\n @include icon--gray-bg--hover;\n }\n }\n\n .enp-slider-correct-answer-range--remove-range {\n position: absolute;\n right: -1.6rem;\n bottom: 1.6rem;\n background: none;\n border: none;\n box-shadow: none;\n padding: 0 0.1rem;\n\n .enp-slider-correct-answer-range__icon {\n width: 1.2em;\n height: 1.2em;\n fill: $dark_gray;\n }\n\n &:hover,\n &:focus {\n .enp-slider-correct-answer-range__icon {\n fill: $red;\n }\n }\n\n @include breakpoint(medium) {\n top: -0.2rem;\n right: -0.2rem;\n bottom: auto;\n }\n\n }\n\n .enp-slider-options .enp-input:read-only {\n background: $light_gray;\n }\n\n .enp-answer-explanation {\n background: $light_gray;\n padding-top: 2rem;\n box-shadow: inset 1px 0px 0 #ccc, inset -1px -1px 0 #ccc, inset 0 1px 0 #ddd;\n }\n\n .enp-answer-explanation__label {\n @include label--bold;\n\n }\n\n .enp-question__button--delete {\n @include btn--reset;\n position: absolute;\n top: 9px;\n right: 9px;\n fill: #bbb;\n cursor: pointer;\n\n @include breakpoint(medium) {\n right: -30px;\n }\n\n &:hover {\n fill: $red;\n }\n }\n\n .enp-question__move {\n position: absolute;\n left: 15px;\n\n @include breakpoint(medium) {\n left: -40px;\n }\n }\n\n .enp-sort__placeholder {\n background: #ddd;\n height: 60px;\n width: 100%;\n max-height: 120px;\n margin-bottom: 1.6rem;\n }\n\n .ui-sortable .ui-sortable-helper {\n .ui-sortable-handle {\n cursor: move;\n cursor: grabbing;\n cursor: -webkit-grabbing;\n }\n }\n \n\n .enp-question__button--move {\n @include btn--reset;\n position: absolute;\n fill: #bbb;\n cursor: pointer;\n\n &:hover, &:focus {\n fill: #333;\n }\n\n &:disabled {\n opacity: 0.5;\n }\n }\n\n .enp-question__button--move--up {\n top: -25px;\n left: -4px;\n }\n\n\n .enp-question__button--move--down {\n top: 3px;\n right: -20px;\n }\n\n .enp-quiz-form__add-question {\n @include btn--icon;\n @include btn--dashed;\n padding-top: 1rem;\n padding-bottom: 1rem;\n margin-top: 1.6rem;\n margin-bottom: 2rem;\n\n .enp-add-question__icon {\n @include btn--icon__icon--circle--small;\n @include icon--normal;\n @include icon--gray-bg;\n position: relative;\n top: 0.2rem;\n }\n\n &:hover .enp-add-question__icon {\n @include icon--gray-bg--hover;\n }\n }\n\n .enp-btn--save__btns {\n @include flex;\n align-items: center;\n align-items: flex-start;\n }\n\n .enp-quiz-form__save {\n @include btn;\n width: 100%;\n margin-bottom: 1rem;\n opacity: 0.8;\n text-shadow: 0px -1px 2px rgba(0,0,0,.6);\n\n &:hover,\n &:focus {\n opacity: 1;\n }\n\n @include breakpoint(small) {\n padding: 1.2rem 1.8rem 1.1rem;\n width: 27%;\n margin-right: 3%;\n position: relative;\n }\n }\n\n .enp-quiz-form__save--reveal {\n animation: slideInTop--reduced-opacity .3s $fastInEaseOut;\n }\n\n @include btn--icon--circle(enp-btn--next-step);\n\n .enp-btn--next-step {\n // @include btn;\n width: 100%;\n padding: 1rem 1.4rem 1rem;\n\n @include breakpoint(medium) {\n padding: 1.2rem 1.8rem 1.1rem;\n }\n .enp-btn--next-step__icon {\n width: 1rem;\n height: 1rem;\n }\n // @include breakpoint(small) {\n // width: auto;\n // }\n\n /*\n * AFTER we have removed the Save button,\n * use this code to add the preview button into the\n * header\n @include media(max-medium) {\n padding: 1rem 1.4rem 1rem;\n }\n\n @include breakpoint(medium) {\n position: absolute;\n right: 20px;\n top: 10px;\n width: auto;\n z-index: 999999;\n\n &.enp-btn--next-step--fixed {\n position: fixed;\n animation: navSlideIn .25s;\n }\n }*/\n\n }\n\n .enp-btn--next-step--reveal {\n animation: slideInTop .3s $fastInEaseOut;\n }\n\n\n // UX interactions\n .enp-mc-option--inputs,\n .enp-accordion-header--inserting {\n animation: slideInBottom .4s $fastInEaseOut forwards;\n }\n\n .enp-mc-option--remove,\n .enp-question--remove,\n .enp-question__image--remove {\n animation: removeElement .5s $fastInEaseOut forwards;\n }\n\n .enp-image-upload-wait {\n @include btn--dashed--light--alt-bg;\n padding-top: 4rem;\n padding-bottom: 4rem;\n margin-bottom: 1rem;\n width: 100%;\n }\n\n // validation\n .enp-accordion-header.question-has-error {\n color: $red;\n box-shadow: 0 0 3px $red;\n }\n\n}\n\n.enp-quiz.ui-sortable--sorting #enp-quiz .enp-accordion-content {\n display: none;\n}","#enp-quiz {\n\n\n .enp-quiz-settings-container {\n\n @include breakpoint(large) {\n // margin: 0;\n // width: 40%;\n // float: left;\n }\n }\n\n .enp-quiz-preview-container {\n\n @include breakpoint(large) {\n // width: 60%;\n // float: left;\n }\n\n }\n\n .enp-quiz-share__legend,\n .enp-quiz-settings__title {\n position: relative;\n @include small-uppercase;\n font-weight: 600;\n padding-top: 0;\n\n @include breakpoint(medium) {\n padding: 1em 0;\n }\n }\n\n .enp-quiz-settings__form {\n margin-bottom: 3rem;\n overflow: visible;\n @include breakpoint(large) {\n padding: 0;\n margin-bottom: 0;\n }\n }\n\n .enp-fieldset {\n @include breakpoint(medium) {\n // this is necessary to keep the form elements visible on top of the\n // white BG on the sidebar. We can't set this on the whole form bc\n // then the publish button won't be positioned right\n position: relative;\n }\n }\n\n .enp-title-display__legend {\n padding-top: 0;\n\n @include breakpoint(medium) {\n padding-top: 0.4rem;\n }\n }\n\n .enp-quiz-share__input,\n .enp-quiz-styles__input {\n width: 100%;\n }\n\n .enp-quiz-styles__textarea--custom-css {\n font-family: Monaco,Consolas,\"Andale Mono\",\"DejaVu Sans Mono\",monospace;\n font-size: 0.9rem;\n min-height: 200px;\n }\n\n .enp-fieldset--section {\n padding: 1.6rem 1rem;\n @include breakpoint(large) {\n padding: 1rem;\n }\n\n &.enp-accordion-content--open {\n margin-bottom: 0;\n }\n }\n\n .enp-quiz-share--facebook {\n margin-bottom: 2rem;\n }\n\n @include radio-inline(enp-title-display);\n @include radio-inline(enp-mc-options-order);\n\n .enp-mc-options-order {\n margin-bottom: 1.6rem;\n }\n\n .enp-quiz-share__textarea {\n min-height: 7.6rem;\n margin-bottom: 2rem;\n\n @include breakpoint('medium') {\n min-height: 4.6rem;\n }\n\n @include breakpoint('large') {\n min-height: 7.6rem;\n }\n\n\n }\n\n .enp-preview-form__submit {\n margin-top: 1.6rem;\n margin-bottom: 1.6rem;\n }\n\n .enp-quiz-preview__title {\n @include small-uppercase;\n font-weight: 600;\n @include breakpoint(medium) {\n padding: 1em 0;\n }\n }\n\n .enp-preview-form__submit {\n @include btn;\n width: 100%;\n padding-top: 0.85rem;\n padding-bottom: 0.85rem;\n margin-bottom: 1rem;\n opacity: 0.8;\n text-shadow: 0px -1px 2px rgba(0,0,0,.6);\n\n &:hover,\n &:focus {\n opacity: 1;\n }\n }\n\n .enp-preview-form__submit--publish {\n width: 100%;\n position: relative;\n z-index: 99999999;\n padding: 1.05rem 1.8rem .95rem;\n }\n\n .enp-quiz-styles__iris-wrapper {\n position: relative;\n }\n\n // Fix for WP Color Picker formatting\n .iris-picker {\n box-sizing: content-box;\n position: relative;\n z-index: 9999999999;\n top: -1.2rem;\n margin-bottom: 1rem;\n padding-bottom: 3rem;\n padding-right: 30px;\n\n @include breakpoint(large) {\n position: absolute;\n top: 50px;\n left: 0;\n }\n\n &:last-of-type {\n margin-bottom: 0;\n }\n\n .ui-slider-handle:focus,\n .ui-draggable-handle:focus .ui-slider-handle {\n box-shadow: 0 0 3px rgba(0,0,0,.75);\n }\n\n }\n\n .enp-quiz-styles__set-default {\n @include btn--ghost;\n font-size: 0.75rem;\n position: absolute;\n left: 10px;\n bottom: 10px;\n }\n\n .enp-iris__close {\n @include btn--reset;\n position: absolute;\n top: 5px;\n right: 5px;\n fill: #888;\n cursor: pointer;\n }\n\n .enp-quiz-styles__input--color {\n padding-left: 45px;\n }\n\n .enp-quiz-styles__color-demo {\n width: 30px;\n height: 30px;\n border: 1px solid #ccc;\n top: 8px;\n left: 8px;\n border-radius: 3px;\n\n position: absolute;\n }\n\n\n}\n","#enp-quiz {\n .enp-share-quiz__container {\n @include breakpoint(medium) {\n padding: 0;\n border: none;\n }\n }\n /* Removing flexbox layout temporarily\n * because it wasn't laying out correctly before content loading\n * It would snap into the correct layout after a resize or textarea highlight\n .enp-publish-page-container {\n &:before {\n @include breakpoint(medium) {\n position: absolute;\n top: 0;\n bottom: 0;\n left: -100%;\n width: 128%;\n content: '';\n background: #fff;\n border-right: 1px solid #ddd;\n }\n\n @include breakpoint(large) {\n width: 124%;\n }\n }\n\n .enp-quiz-message {\n @include breakpoint(medium) {\n margin-left: 33%;\n }\n\n @include breakpoint(large) {\n margin-left: 26%;\n }\n }\n }\n\n .enp-publish-page-flex-container {\n @include breakpoint(medium) {\n @include flex;\n align-items: stretch;\n flex-direction: row-reverse;\n }\n }\n\n .enp-publish-page__aside-container {\n\n @include breakpoint(medium) {\n position: relative;\n margin: 0 6% 0 0;\n padding: 0;\n width: 24%;\n }\n\n @include breakpoint(large) {\n margin: 0;\n //padding-left: 20px;\n width: 20%;\n }\n }\n\n .enp-share-quiz__container,\n .enp-ab-ad__container {\n @include breakpoint(medium) {\n padding: 0;\n border: none;\n }\n }\n */\n\n .enp-share-quiz__url {\n display: block;\n font-size: 1rem;\n line-height: 1.4;\n word-wrap: break-word;\n }\n\n @include share_icons(enp-share-quiz);\n\n .enp-share-quiz {\n justify-content: space-around;\n margin-bottom: 0;\n .enp-icon--mail {\n background: $blue;\n }\n }\n}\n","#enp-quiz {\n .enp-ab-create__container {\n @include container--wide;\n width: 100%;\n background: $really_light_gray;\n padding-top: 3rem;\n padding-bottom: 3rem;\n @include breakpoint(large) {\n padding-top: 0;\n }\n }\n\n .enp-ab-create__form {\n @include container--thin;\n @include breakpoint(large) {\n @include container;\n margin: unset;\n }\n }\n\n .enp-ab-create__label {\n @include label--bold;\n }\n\n .enp-ab-create-title__textarea {\n @include input--xl;\n width: 100%;\n }\n\n .enp-ab-create__select {\n @include select--wide--chevron;\n }\n\n .enp-ab-create__submit {\n width: 100%;\n padding-top: 1em;\n padding-bottom: 1em;\n }\n}\n","// TEMP for dev theme\n#headerimg h1 {\n text-align: center;\n font-size: 40px !important;\n}\n#enp-quiz {\n\n &.enp-quiz__main {\n @include container;\n display: grid;\n gap: 1em;\n min-height: 85vh;\n \n @include breakpoint(large) {\n @include container--wide;\n grid-template-columns: 1fr 4fr;\n }\n }\n\n .enp-dash-container {\n @include xpadding-vertical;\n @include xpadding-horizontal;\n transition: all .25s $fastInEaseOut;\n }\n\n .enp-dash__section-aside {\n background-color: $background;\n @include breakpoint(medium) {\n @include xpadding-vertical;\n @include xpadding-horizontal;\n }\n }\n\n .enp-breadcrumb-link__container {\n padding-bottom: 2rem;\n }\n\n .enp-search-quizzes {\n display: flex;\n justify-content: space-between;\n flex-wrap: wrap;\n padding: 1em;\n\n @include breakpoint(medium) {\n padding: 0.2rem 0;\n flex-wrap: nowrap;\n }\n @include breakpoint(large) {\n @include flex-spread-vertical;\n }\n }\n\n .enp-search-quizzes__form-item {\n margin-bottom: 0.6rem;\n flex: 0 1 48%;\n\n @include breakpoint(small) {\n margin-bottom: 0;\n margin-right: 1rem;\n flex: 1 0 auto;\n }\n\n }\n\n .enp-quiz-search {\n flex: 1 0 100%;\n position: relative;\n @include breakpoint(medium) {\n flex: 1 0 auto;\n }\n }\n\n .enp-search-quizzes__label {\n margin-bottom: 0;\n @include screen-reader-text ;\n }\n\n .enp-search-quizzes__select {\n padding: .3rem;\n border-radius: 3px;\n width: 100%;\n @include breakpoint(large) {\n min-width: 200px;\n font-size: 0.85rem;\n }\n }\n\n .enp-quiz-search__input {\n width: 100%;\n margin: 0 0 0.1rem;\n padding: .3rem .3rem .3rem 26px;\n font-size: 0.85rem;\n @include breakpoint(medium) {\n // max-width: 200px;\n }\n }\n\n .enp-quiz-search__icon {\n position: absolute;\n bottom: 0.3rem;\n left: 0.2rem;\n width: 21px;\n height: 21px;\n }\n\n .enp-search-quizzes__button {\n padding: 0.2rem 0.8rem;\n }\n\n .enp-search-results-description {\n font-size: 0.85rem;\n }\n\n .enp-search-results-description__link {\n white-space: nowrap;\n }\n\n .enp-search-results-description__icon {\n width: 1.3em;\n height: 1.3em;\n position: relative;\n top: 4px;\n left: 2px;\n }\n\n .enp-dash__section-title {\n @include small-uppercase;\n margin-bottom: 0.325rem;\n border-bottom: 1px solid $dark-gray;\n @include breakpoint(medium) {\n padding: 1em 0;\n }\n }\n\n .enp-dash__ab-test-helper--not-enough-quizzes {\n color: $darker-gray;\n }\n\n .enp-view-toggle {\n cursor: pointer;\n opacity: .5;\n display: none; // hide the buttons for small screens\n\n @include breakpoint(medium) {\n display: flex;\n }\n }\n\n .enp-view-toggle__active {\n opacity: 1;\n }\n\n .enp-sort-by {\n margin-left: 5px;\n }\n\n .enp-dash-list {\n @include flex-grid;\n }\n\n .enp-dash-item {\n @include flex-grid__item ;\n @include flex-spread-vertical;\n display: flex;\n z-index: 1;\n flex-direction: column;\n align-content: flex-end;\n justify-content: flex-end;\n border: none;\n border-radius: 3px;\n }\n\n .enp-dash-item--published {\n box-shadow: inset 4px 0 0 $blue, 0 1px 0 rgba(0,0,0,.1);\n }\n\n .enp-dash-item--draft {\n box-shadow: inset 4px 0 0 $light_blue, 0 1px 0 rgba(0,0,0,.1);\n .enp-dash-item__title a {\n color: $dark_blue;\n }\n }\n\n .enp-dash-item--remove {\n animation: removeElement .5s $fastInEaseOut forwards;\n }\n\n .enp-dash-list--list-view {\n .enp-dash-item {\n margin: 0 0 0.8rem;\n flex-basis: 100%;\n }\n }\n\n .enp-dash-item__spinner {\n @include flex-center ;\n position: absolute;\n top: 0;\n bottom: 0;\n left: 0;\n right: 0;\n background: rgba(245,216,216,0.8);\n width: 100%;\n animation: fadeIn .3s $fastInEaseOut;\n }\n\n .enp-dash-item__header {\n padding: 0.5rem 1rem;\n background: $light_gray;\n border-bottom: 1px solid $dark_gray;\n display: flex;\n justify-content: space-between;\n align-items: center;\n @include border-radius;\n }\n\n .enp-dash-item__title {\n @include flex-grid__title ;\n padding: 0;\n margin-bottom: 0;\n a {\n color: $blue;\n }\n }\n\n .enp-dash-item__content {\n padding: 0rem 0 0.375rem;\n position: relative;\n transition: all .2s $fastInEaseOut;\n }\n\n .enp-dash-item__meta {\n @include hint;\n font-size: 0.75rem;\n }\n\n .enp-dash-item__username {\n word-wrap: break-word;\n padding-left: 0.4rem;\n margin-left: 0.2rem;\n border-left: 1px solid #ddd;\n }\n\n .enp-dash-item__title--ab-test {\n padding-bottom: 0;\n }\n\n .enp-dash-item__ab-quizzes {\n @include ul-no-style;\n font-size: 0.75rem;\n color: $darker_gray;\n margin-bottom: 0.8rem;\n }\n\n .enp-dash-item__nav {\n @include ul-no-style;\n margin-bottom: 0;\n font-size: 0.85rem;\n }\n\n .enp-dash-item__nav__item {\n display: flex;\n margin: 0;\n width: 100%;\n align-items: center;\n &:hover {\n background-color: $gray;\n .enp-dash-item__icon {\n fill: $red;\n }\n }\n a {\n font-weight: normal;\n color: $darker_gray;\n @include flex;\n align-items: center;\n width: 100%;\n padding: 12px;\n &:focus,\n &:hover {\n color: $red;\n outline: 1px dotted $link;\n outline-offset: 1px;\n .enp-dash-item__icon {\n fill: $red;\n }\n }\n }\n }\n .enp-delete-quiz {\n width: 100%;\n &:hover {\n .enp-dash-item__delete {\n color: $red;\n }\n .enp-icon {\n fill: $red;\n }\n }\n }\n .enp-dash-item__delete {\n @include btn--reset;\n @include flex;\n padding: 12px;\n align-items: center;\n position: relative;\n line-height: 1.6;\n color: $darker_gray;\n cursor: pointer;\n width: 100%;\n font-size: 0.85rem;\n .enp-icon {\n fill: $darker_gray;\n }\n }\n .enp-dash-item__icon {\n fill: $darker_gray;\n width: 15px;\n height: 15px;\n margin-right: 10px;\n }\n\n .enp-dash-item__nav--collapsible {\n display: none;\n position: absolute;\n z-index: 2;\n top: 44px;\n right: -17px;\n width: 195px;\n background-color: #fff;\n text-align: left;\n transform: translate3d(0,0,0);\n transition: all .2s $fastInEaseOut;\n\n .enp-dash-item__nav__item {\n cursor: pointer;\n }\n }\n\n .enp-dash-item__menu-action {\n height: 24px;\n background: none;\n border: none;\n color: #444;\n padding: 0;\n bottom: 0.2rem;\n right: 1.5rem;\n top: 1.5rem;\n cursor: pointer;\n }\n\n .enp-dash-item__menu-action-wrap {\n max-width: 0;\n display: flex;\n flex-direction: column;\n align-items: flex-end;\n }\n\n .enp-dash-item__menu-action__icon {\n width: 15px;\n height: 15px;\n fill: $darker_gray;\n transition: all .3s $fastInEaseOut;\n }\n\n .enp-dash-item__menu-action__icon--bottom {\n \n }\n\n .enp-dash-item--menu-active {\n transform: translate3d(0,-3px,0);\n z-index: 2;\n .enp-dash-item__nav-wrap {\n position: relative;\n }\n\n &.enp-dash-item--published {\n box-shadow: inset 4px 0 0 $green, 0 2px 2px rgba(0,0,0,.2);\n }\n\n &.enp-dash-item--draft {\n box-shadow: inset 4px 0 0 lighten($green, 25%), 0 2px 2px rgba(0,0,0,.2);\n }\n\n .enp-dash-item__menu-action__icon--bottom {\n transform: rotateX(180deg);\n }\n\n .enp-dash-item__nav--collapsible {\n display: block;\n animation: slideInTop .25s $fastInEaseOut forwards;\n @include border-radius;\n @include box-shadow;\n }\n\n .enp-dash-item__content {\n opacity: 0.4;\n }\n\n }\n\n\n .enp-quiz-results {\n display: flex;\n justify-content: space-around;\n list-style: none;\n margin: 0.8rem 0 0;\n padding: 0;\n text-align: center;\n }\n\n .enp-quiz-results__item {\n\n margin: 0 2% 0 0;\n padding: 0;\n color: $title;\n\n @media (max-width:280px) {\n width: 100%;\n padding: 0;\n margin-bottom: 0.6rem;\n }\n }\n\n .enp-quiz-results__number {\n font-size: 1.6rem;\n line-height: 1;\n position: relative;\n }\n\n .enp-dash-item--draft .enp-quiz-results__number {\n opacity: 0.5;\n }\n\n .enp-quiz-results__number--average-score {\n color: darken($green, 8);\n\n &:after {\n content: '%';\n font-size: .9rem;\n position: absolute;\n top: .3rem;\n right: -1rem;\n }\n }\n\n .enp-quiz-results__label {\n text-transform: uppercase;\n font-size: .7rem;\n font-weight: 300;\n color: $darker_gray;\n }\n\n\n .enp-quiz-list__view {\n // @include flex-bottom;\n }\n\n .enp-dash-item--add-new__wrap {\n display: grid;\n gap: 1em;\n grid-template-columns: 1fr 1fr;\n }\n\n .enp-dash-list--quiz__container {\n display: grid;\n gap: 1em;\n @include breakpoint(large) {\n grid-template-columns: 1fr 1fr;\n }\n }\n\n .enp-dash-item--add-new {\n background: none;\n border: none;\n padding: 0;\n position: relative;\n @include header-space;\n }\n\n .enp-dash-link--add-new {\n @include btn--dashed--light;\n justify-content: flex-start;\n color: $light_blue;\n padding: 1rem 1.2rem;\n\n\n @include breakpoint(medium) {\n @include small-uppercase;\n @include flex-center;\n flex-direction: column;\n position: absolute;\n top: 0;\n left: 0;\n right: 0;\n bottom: 0;\n }\n\n .enp-dash-link__icon {\n @include icon--circle;\n @include icon--normal;\n margin-right: 5px;\n background-color: $light_blue;\n\n @include breakpoint(medium) {\n width: 2rem;\n height: 2rem;\n margin: 0.8rem 0 0.2rem;\n }\n }\n\n &:hover {\n color: $dark_blue;\n\n .enp-dash-link__icon {\n fill: #fff;\n background: $dark_blue;\n }\n }\n\n }\n\n .enp-quiz-message--welcome p {\n color: $font;\n }\n\n // pagination\n .enp-paginate {\n @include ul-no-style ;\n @include flex-center ;\n font-size: 1rem;\n }\n\n .enp-paginate__link {\n @include flex-center ;\n margin: 0 0.2rem;\n padding: 0 0.4rem;\n border-radius: 3px;\n font-weight: normal;\n\n }\n\n .enp-paginate__link--current-page {\n border: 2px solid $blue;\n }\n\n .enp-paginate__item--last-page,\n .enp-paginate__item--first-page {\n display: flex;\n }\n\n .enp-paginate__item--first-page:after,\n .enp-paginate__item--last-page:before {\n content: '...';\n font-size: 1rem;\n position: relative;\n bottom: 0.2rem;\n opacity: 0.6;\n }\n\n .enp-paginate__item--no-gap {\n &:before,\n &:after {\n content:'';\n }\n }\n\n .enp-paginate__item--next-page {\n margin-left: 0.2rem;\n }\n\n .enp-paginate__item--previous-page {\n margin-right: 0.2rem;\n }\n}\n","#enp-quiz {\n .enp-quiz-breadcrumbs {\n grid-row: 1;\n // @include flex-center;\n // position: absolute;\n // top: 0;\n // width: 1000%;\n // left: -500%;\n // right: -500%;\n // margin-left: auto;\n // margin-right: auto;\n // background: #fff;\n // border-bottom: 1px solid #ddd;\n // padding: 10px;\n // z-index: 99999;\n }\n\n .enp-quiz-breadcrumbs__list {\n @include flex-inline;\n }\n\n .enp-quiz-breadcrumbs__item {\n @include flex-inline__item ;\n @include flex-center;\n fill: $link;\n margin-right: 5px;\n\n @include breakpoint(small) {\n margin-right: 10px;\n }\n }\n\n .enp-quiz-breadcrumbs__link--disabled {\n @include disabled;\n }\n\n .enp-quiz-breadcrumbs__link--active {\n @include btn--ghost;\n @include btn--thin;\n }\n\n .enp-quiz-breadcrumbs__link {\n font-size: 1rem;\n font-weight: 400;\n text-transform: none;\n letter-spacing: 0;\n }\n\n // JS\n .enp-quiz-breadcrumbs--fixed {\n top: 0;\n position: fixed;\n animation: navSlideIn .25s;\n }\n}\n","#enp-quiz {\n .enp-results-title {\n font-size: 1.6rem;\n text-align: center;\n padding: 3.2rem 20px 2.6rem;\n background: $really_light_gray;\n margin: -1.2rem 0 2rem;\n border-bottom: 1px solid #ddd;\n\n &:after {\n @include small-uppercase;\n display: block;\n content: \"RESULTS\";\n font-weight: normal;\n }\n }\n\n .enp-results__container {\n @include container--wide;\n display: block;\n\n @include breakpoint(large) {\n display: flex;\n @include flex-spread;\n }\n }\n\n .enp-results__container,\n .enp-quiz-scores__container,\n .enp-results-flow__container {\n @include media(max-medium) {\n padding: 8px;\n }\n }\n\n .enp-quiz-scores__container,\n .enp-results-flow__container {\n width: 100%;\n\n @include breakpoint(large) {\n width: 48%;\n }\n }\n\n .enp-quiz-scores {\n margin-top: 2.6rem;\n }\n\n .enp-quiz-score__line-chart {\n height: 300px;\n margin-bottom: 1rem;\n\n .ct-label {\n color: $font;\n }\n\n .ct-grid {\n stroke: #dadada;\n stroke-dasharray: 0;\n }\n\n .ct-line {\n stroke: $green;\n stroke-width: 2px;\n }\n\n .ct-point {\n stroke: $green;\n stroke-width: 8px;\n }\n }\n\n .enp-quiz-scores-table {\n width: 100%;\n max-width: 500px;\n margin: 0 auto;\n\n tr th {\n background-color: #fff;\n }\n }\n\n .enp-quiz-scores-table__label {\n padding-left: 5%;\n }\n\n .enp-quiz-scores-table__score {\n text-align: right;\n padding-right: 5%;\n }\n\n .enp-results-flow {\n position: relative;\n margin: 2rem auto;\n width: 320px;\n height: 320px;\n border-radius: 50%;\n\n @include media(300px) {\n left: -100px;\n }\n\n @include breakpoint(small) {\n width: 390px;\n height: 390px;\n }\n\n @include breakpoint(medium) {\n width: 450px;\n height: 450px;\n }\n\n @include breakpoint(large) {\n width: 400px;\n height: 400px;\n }\n\n }\n\n .enp-results-flow__section-title {\n @include screen-reader-text;\n }\n\n .enp-results-flow__item {\n border-radius: 50%;\n text-align: center;\n height: 100%;\n width: 100%;\n margin: 0 auto;\n left: 0;\n right: 0;\n padding: 12.5% 0 0;\n letter-spacing: 0.05rem;\n border: 2px solid $green;\n animation: 0.85s slideInBottom $fastInEaseOut forwards;\n }\n\n .enp-results-flow__item--total-views {\n background: #fff;\n }\n\n .enp-results-flow__item--quiz-starts {\n width: 65%;\n height: 65%;\n position: absolute;\n padding-top: 8%;\n bottom: 2.5%;\n background: lighten($green, 48);\n }\n\n .enp-results-flow__item--quiz-finishes {\n width: 35%;\n height: 35%;\n position: absolute;\n bottom: 5%;\n background: lighten($green, 35);\n }\n\n .enp-results-flow__title {\n @include small-uppercase;\n color: #444;\n font-size: .7rem;\n margin-bottom: 0px;\n\n @include breakpoint(medium) {\n font-weight: bold;\n margin-bottom: 2px;\n }\n }\n\n .enp-results-flow__number {\n font-weight: bold;\n font-size: 1.4rem;\n line-height: 1.2;\n }\n\n .enp-results-flow__number--total-views {\n font-size: 2rem;\n }\n\n .enp-results-flow__number--quiz-starts {\n font-size: 1.65rem;\n }\n\n .enp-results-flow__percentage {\n font-size: .8rem;\n font-weight: normal;\n position: relative;\n display: inline-block;\n top: -0.7em;\n left: -.1rem;\n color: #444;\n\n &:after {\n content: '%';\n position: absolute;\n right: -0.75rem;\n font-size: .7rem;\n color: #444;\n }\n }\n\n .enp-results-questions__section {\n // @include section--alt;\n padding-top: 5rem;\n padding-bottom: 3rem;\n margin-top: 5rem;\n margin-bottom: 3rem;\n @include breakpoint(medium) {\n @include xmargin-horizontal;\n }\n }\n\n .enp-results-questions__container {\n @include media(max-small) {\n padding-left: 8px;\n padding-right: 8px;\n }\n }\n\n .enp-results-questions__header {\n align-items: flex-start;\n flex-direction: column;\n\n @include breakpoint(small) {\n @include flex-spread;\n flex-direction: row;\n align-items: flex-end;\n }\n }\n\n .enp-results-questions__title {\n @include small-uppercase;\n }\n\n .enp-results-questions__key {\n @include small-uppercase;\n }\n\n .enp-results-questions {\n @include ul-no-style;\n }\n\n .enp-results-question {\n width: 100%;\n font-size: 1rem;\n padding: 0;\n margin-bottom: 1rem;\n }\n\n .enp-results-question__header {\n padding: 1rem 1.2rem;\n position: relative;\n }\n\n .enp-results-question__question,\n .enp-results-question__stats {\n font-size: 1rem;\n line-height: 1.4;\n }\n\n .enp-results-question__question {\n font-weight: normal;\n\n @include breakpoint(small) {\n padding-right: 7em;\n margin-bottom: 0;\n }\n }\n\n .enp-results-question__stats {\n font-size: .9rem;\n\n @include breakpoint(small) {\n position: absolute;\n bottom: 1rem;\n right: 1.2rem;\n text-align: right;\n }\n }\n\n .enp-results-questions__key,\n .enp-results-question__stats {\n font-weight: 300;\n }\n\n .enp-results-question__content {\n padding: 2rem 1.2rem 1.2rem;\n @include border-radius;\n }\n\n .enp-results-question__deep-stats {\n @include flex-spread-around;\n @include ul-no-style;\n text-align: center;\n\n @include media(500px) {\n flex-wrap: wrap;\n }\n }\n\n .enp-results-question__deep-stat {\n\n @include media(500px) {\n width: 48%;\n margin: 0 2% 2% 0;\n padding: 1.6rem 0;\n\n &:nth-child(even) {\n margin-right: 0;\n }\n }\n\n @include media(280px) {\n width: 100%;\n padding: 0;\n margin-bottom: 1.6rem;\n }\n }\n\n .enp-results-question__deep-stat__number {\n font-size: 1.8rem;\n line-height: 1;\n position: relative;\n }\n\n .enp-results-question__deep-stat__number--finishes,\n .enp-results-question__deep-stat__number--correct {\n @include dark-green;\n }\n\n .enp-results-question__deep-stat__number--incorrect {\n @include fade-red;\n }\n\n .enp-results-question__deep-stat__number--correct,\n .enp-results-question__deep-stat__number--incorrect,\n .enp-results-question__deep-stat__number--finishes {\n &:after {\n content: '%';\n font-size: .9rem;\n position: absolute;\n top: .3rem;\n right: -1rem;\n }\n }\n\n .enp-results-question__deep-stat__label {\n @include small-uppercase;\n font-size: .8rem;\n }\n\n .enp-results-question__options {\n @include ul-no-style;\n margin-bottom: 0;\n }\n\n .enp-results-question__option {\n padding: 0.8rem 0.8rem 0.8rem 0.4rem;\n border-top: 1px solid #ddd;\n @include media(max-small) {\n position: relative;\n flex-direction: column;\n }\n\n @include breakpoint(small) {\n @include flex-spread;\n flex-direction: row;\n }\n\n &:first-of-type {\n margin-top: 1.4rem;\n }\n\n }\n\n .enp-results-question__option--correct {\n background: lighten($green, 48);\n }\n\n .enp-results-question__option__text {\n flex-grow: 100;\n margin-right: 1rem;\n }\n\n .enp-results-question__option__text__helper {\n font-weight: 300;\n @include small-uppercase;\n margin-right: 0.4rem;\n }\n\n .enp-results-question__option__icon {\n @include media(max-small) {\n position: relative;\n left: -3px;\n }\n\n @include breakpoint(small) {\n margin-right: 0.3rem;\n min-width: 1.6rem;\n }\n }\n\n .enp-results-question__option__icon--incorrect {\n fill: $fade_red;\n opacity: 0.5;\n }\n\n .enp-results-question__option__icon--correct {\n fill: $dark_green;\n opacity: 1;\n }\n\n .enp-results-question__option__percentage--incorrect {\n @include fade-red;\n }\n\n .enp-results-question__option__percentage--correct {\n @include dark-green;\n }\n\n .enp-results-question__option__number-selected {\n font-weight: 300;\n\n @include media(max-small) {\n position: absolute;\n top: 0.8rem;\n right: 0.8rem;\n }\n }\n\n .enp-slider-responses__title {\n @include small-uppercase;\n font-weight: 400;\n margin-top: 1.6rem;\n }\n\n .enp-slider-responses__line-chart {\n .ct-point {\n stroke-width: 8px;\n }\n }\n\n .enp-slider-responses__line-chart--low,\n .enp-slider-responses__line-chart--high {\n stroke: $red;\n }\n\n .enp-slider-responses__line-chart--correct {\n stroke: $green;\n }\n\n .enp-slider-responses-table {\n width: 100%;\n }\n\n .enp-slider-responses-table tr:nth-child(even) td {\n background-color: #fff;\n }\n\n .enp-slider-responses-table tr.enp-slider-responses-table__response--correct td {\n background-color: lighten($green, 48);\n }\n\n .enp-slider-responses-table__content {\n box-shadow: none;\n padding-top: 1rem;\n }\n\n .enp-slider-responses-table--hide-zero {\n .enp-slider-responses-table__frequency--zero {\n display: none;\n }\n }\n\n .enp-slider-responses-table__response-frequency {\n @include flex-spread ;\n align-items: center;\n }\n\n .enp-slider-responses-table__toggle-zero-frequency {\n @include accordion__header ;\n width: auto;\n padding: 0 0.6rem;\n margin: 0;\n }\n\n\n\n}\n\n.enp-quiz-results {\n #enp-quiz .enp-aside {\n border: none;\n }\n\n .enp-results-questions__title__quiz-title {\n @include screen-reader-text;\n }\n}\n","#enp-quiz {\n\n .enp-results--ab {\n display: block;\n margin-bottom: 3rem;\n\n @include breakpoint(large) {\n display: flex;\n flex-wrap: wrap;\n align-content: flex-end;\n width: 50%;\n padding: 10px;\n }\n\n }\n\n .enp-results--a {\n @include breakpoint(large) {\n padding-right: 1rem;\n border-right: 1px solid #ddd;\n }\n }\n\n .enp-results--b {\n @include breakpoint(large) {\n padding-left: 1rem;\n }\n }\n\n .enp-results-title--ab,\n .enp-results__container--ab .enp-results-flow__container {\n min-width: 100%;\n }\n\n .enp-results--loser {\n .enp-results-flow__item {\n border: 2px solid $red;\n }\n\n .enp-results-flow__item--quiz-starts {\n background: lighten($red, 42);\n }\n\n .enp-results-flow__item--quiz-finishes {\n background: lighten($red, 34);\n }\n\n th,\n .enp-results-questions__title {\n color: $dark_red;\n }\n\n }\n\n .enp-results--winner {\n th,\n .enp-results-questions__title {\n color: $dark_green;\n }\n\n }\n\n .enp-results-title--a,\n .enp-results-title--b {\n background: transparent;\n }\n\n .enp-ab-scores {\n @include container--wide;\n\n th.enp-quiz-scores-table__label,\n th.enp-quiz-scores-table__score {\n padding-left: 0;\n padding-right: 0;\n }\n }\n\n .enp-ab-scores__title {\n padding-left: 50px;\n @include small-uppercase;\n }\n\n .enp-quiz-score__line-chart .enp-test-loser {\n\n .ct-line,\n .ct-point {\n stroke: $red;\n }\n }\n\n .enp-quiz-scores {\n margin-top: 0;\n }\n\n .enp-question-results,\n .enp-ab-scores .enp-quiz-scores-table {\n margin-bottom: 1.6rem;\n\n @include breakpoint(large) {\n float: left;\n width: 48%;\n margin: 0;\n\n &:first-of-type {\n margin-right: 4%;\n }\n }\n }\n\n .enp-question-results__container {\n @include container--wide;\n padding-top: 3rem;\n }\n\n .enp-question-results--ab {\n\n .enp-results-questions__section {\n background: #fff;\n border: none;\n padding: 1.6rem 0;\n margin: 1.6rem auto;\n }\n\n .enp-results-questions__container {\n padding: 0;\n }\n\n }\n\n .enp-ab-new-embed-code__section {\n @include container--thin;\n max-width: 540px;\n padding-bottom: 2rem;\n margin-bottom: 2rem;\n\n .enp-ab-embed-code {\n padding: 0;\n margin: 0;\n }\n }\n\n .enp-ab-embed-code__section {\n @include section--alt;\n padding-top: 5rem;\n margin-top: 5rem;\n }\n\n .enp-ab-embed-code {\n @include container;\n }\n\n .enp-ab-embed-code__title {\n @include small-uppercase;\n }\n\n .enp-embed-code__textarea {\n margin-bottom: 0;\n }\n\n .enp-embed-code__instructions {\n font-size: 1.1rem;\n }\n}\n","#enp-quiz {\n\n .enp-slider {\n margin-bottom: 1.6rem;\n }\n\n .enp-slider-input__container {\n display: flex;\n align-items: center;\n justify-content: center;\n margin: 1.6rem auto;\n position: relative;\n }\n\n .enp-slider-input__label {\n @include label;\n }\n\n .enp-slider-input__prefix,\n .enp-slider-input__suffix {\n font-size: 1rem;\n }\n\n .enp-slider-input__prefix {\n margin-right: .2rem;\n white-space: pre;\n }\n\n .enp-slider-input__suffix {\n margin-left: .2rem;\n white-space: pre;\n }\n\n .enp-slider-input__input {\n @include input;\n margin-bottom: 0;\n padding: .75rem;\n width: auto;\n transition: all .25s $fastInEaseOut;\n }\n\n .enp-slider-input__input--incorrect {\n color: $red;\n }\n\n .enp-slider-input__input--correct {\n color: $dark_green;\n }\n\n .enp-slider-input__input--invalid-animation {\n box-shadow: 0 0 2px 1px $fade_red;\n }\n\n .enp-slider_input__range-helper {\n position: absolute;\n bottom: -1.2rem;\n font-size: 0.8rem;\n }\n\n .enp-slider_input__range-helper--low {\n left: 0;\n }\n\n .enp-slider_input__range-helper--high {\n right: 0;\n }\n\n .enp-slider-input__range-helper__number {\n position: relative;\n color: $dark_gray;\n }\n\n .enp-slider_input__range-helper__number--low {\n\n }\n\n .enp-slider_input__range-helper__number--high {\n\n }\n\n .ui-slider-range-show-correct__tooltip-container {\n position: relative;\n }\n\n .ui-slider-range-show-correct__tooltip {\n position: absolute;\n top: -0.4rem;\n margin-left: -0.55rem;\n height: 1rem;\n width: 1.1rem;\n height: 1.1rem;\n border: 2px solid $green;\n background-color: #fff;\n border-radius: 50%;\n z-index: 9999;\n }\n\n .ui-slider-range-show-correct__tooltip--low {\n left: 0;\n }\n\n .ui-slider-range-show-correct__tooltip--high {\n right: -0.55rem;\n }\n\n .ui-slider-range-show-correct__tooltip__text {\n position: relative;\n color: darken($green, 15);\n top: -1.35rem;\n font-size: .825rem;\n min-width: 100%;\n display: inline-block;\n text-align: center;\n text-shadow: 0 1px 0 #fff;\n }\n\n .ui-slider-range-show-correct__tooltip__text--low {\n\n }\n\n .ui-slider-range-show-correct__tooltip__text--high {\n\n }\n\n .ui-slider-range-show-correct__tooltip__text--low-center {\n //left: 0; // not perfectly centered for huge numbers, but is for small numbers\n }\n\n // JQUERY SLIDER\n .enp-slider {\n\t\tposition: relative;\n\t\ttext-align: left;\n\t\tbackground: #ddd;\n\n\t\t/* Layout helpers\n\t\t----------------------------------*/\n\t\t.ui-helper-hidden {\n\t\t\tdisplay: none;\n\t\t}\n\t\t.ui-helper-hidden-accessible {\n\t\t\tborder: 0;\n\t\t\tclip: rect(0 0 0 0);\n\t\t\theight: 1px;\n\t\t\tmargin: -1px;\n\t\t\toverflow: hidden;\n\t\t\tpadding: 0;\n\t\t\tposition: absolute;\n\t\t\twidth: 1px;\n\t\t}\n\t\t.ui-helper-reset {\n\t\t\tmargin: 0;\n\t\t\tpadding: 0;\n\t\t\tborder: 0;\n\t\t\toutline: 0;\n\t\t\tline-height: 1.3;\n\t\t\ttext-decoration: none;\n\t\t\tfont-size: 100%;\n\t\t\tlist-style: none;\n\t\t}\n\t\t.ui-helper-clearfix:before,\n\t\t.ui-helper-clearfix:after {\n\t\t\tcontent: \"\";\n\t\t\tdisplay: table;\n\t\t\tborder-collapse: collapse;\n\t\t}\n\t\t.ui-helper-clearfix:after {\n\t\t\tclear: both;\n\t\t}\n\t\t.ui-helper-clearfix {\n\t\t\tmin-height: 0; /* support: IE7 */\n\t\t}\n\t\t.ui-helper-zfix {\n\t\t\twidth: 100%;\n\t\t\theight: 100%;\n\t\t\ttop: 0;\n\t\t\tleft: 0;\n\t\t\tposition: absolute;\n\t\t\topacity: 0;\n\t\t\tfilter:alpha(opacity=0); /* support: IE8 */\n\t\t}\n\n\t\t.ui-front {\n\t\t\tz-index: 100;\n\t\t}\n\n\n\t\t/* Interaction Cues\n\t\t----------------------------------*/\n\t\t.ui-state-disabled {\n\t\t\tcursor: default !important;\n\t\t}\n\n\n\t\t/* Icons\n\t\t----------------------------------*/\n\n\t\t/* states and images */\n\t\t.ui-icon {\n\t\t\tdisplay: block;\n\t\t\ttext-indent: -99999px;\n\t\t\toverflow: hidden;\n\t\t\tbackground-repeat: no-repeat;\n\t\t}\n\n\n\t\t/* Misc visuals\n\t\t----------------------------------*/\n\n\t\t/* Overlays */\n\t\t.ui-widget-overlay {\n\t\t\tposition: fixed;\n\t\t\ttop: 0;\n\t\t\tleft: 0;\n\t\t\twidth: 100%;\n\t\t\theight: 100%;\n\t\t}\n\n\t\t.ui-slider-handle {\n\t\t\tbackground: #fff;\n\t\t\tborder-radius: 50%;\n\t\t\tborder: 1px solid #aaa;\n\t\t\tposition: absolute;\n\t\t\tz-index: 2;\n\t\t\twidth: 1.2rem;\n\t\t\theight: 1.2rem;\n top: -.4rem;\n\t\t\tmargin-left: -.6rem;\n\t\t\tcursor: default;\n\t\t\t-ms-touch-action: none;\n\t\t\ttouch-action: none;\n\t\t\ttransition: opacity 0.2s $fastInEaseOut, height .18s $fastInEaseOut, width .18s $fastInEaseOut, transform 0.18s $fastInEaseOut;\n\n @include media(max-medium) {\n width: 2rem;\n \t\t\theight: 2rem;\n top: -.85rem;\n margin-left: -1rem;\n transform: rotate(225deg);\n }\n\n\t\t\t&:focus {\n\t\t\t\toutline: none;\n\t\t\t\tbox-shadow: 0 0 3px 1px #4D90FE;\n\t\t\t}\n\n &.ui-state-active {\n @include media(max-medium) {\n width: 2.2rem;\n height: 2.2rem;\n border-top-left-radius: 0;\n transform: translate3d(-0.2rem, -0.8rem, 0) rotate(225deg);\n }\n\n }\n\n\t\t}\n\n .ui-slider-handle--correct,\n\t\t.ui-slider-handle--incorrect {\n width: 1.1rem;\n\t\t\theight: 1.1rem;\n top: -.4rem;\n margin-left: -.55rem;\n }\n\n .ui-slider-handle--incorrect {\n z-index: 1;\n\t\t\tborder: 2px solid $red;\n\t\t}\n\n .ui-slider-handle--correct {\n border: 2px solid $green;\n z-index: 99999;\n }\n\n\t\t.ui-slider-range {\n\t\t\tposition: absolute;\n\t\t\tz-index: 1;\n\t\t\tfont-size: .7rem;\n\t\t\tdisplay: block;\n\t\t\tborder: 0;\n\t\t\tbackground-position: 0 0;\n\t\t\ttop: 0;\n\t\t\theight: 100%;\n\t\t}\n\n .ui-slider-range-show-correct {\n background: $green;\n z-index: 9;\n }\n\n\t\t.ui-slider-range-min {\n\t\t\tleft: 0;\n\t\t\tbackground: $blue;\n\t\t}\n\n\t\t.ui-slider-range-max {\n\t\t\tright: 0;\n\t\t}\n\n\t\t/* support: IE8 - See #6727 */\n\t\t&.ui-state-disabled .ui-slider-handle,\n\t\t&.ui-state-disabled .ui-slider-range {\n\t\t\tfilter: inherit;\n\t\t}\n\t}\n\n\t.ui-slider-horizontal {\n\t\theight: .3rem;\n\t}\n\n\t.enp-question__answered {\n\t\t.enp-slider {\n\t\t\tbackground: #bbb;\n\t\t}\n\n\t\t.ui-slider-range-min {\n\t\t\tbackground: #fff;\n\t\t}\n\n\t}\n\n}\n"]} \ No newline at end of file diff --git a/public/quiz-create/css/sass/_ab-create.scss b/public/quiz-create/css/sass/_ab-create.scss index 7d9d945d..d4b1677b 100644 --- a/public/quiz-create/css/sass/_ab-create.scss +++ b/public/quiz-create/css/sass/_ab-create.scss @@ -5,10 +5,17 @@ background: $really_light_gray; padding-top: 3rem; padding-bottom: 3rem; + @include breakpoint(large) { + padding-top: 0; + } } .enp-ab-create__form { @include container--thin; + @include breakpoint(large) { + @include container; + margin: unset; + } } .enp-ab-create__label { diff --git a/public/quiz-create/css/sass/_ab-results.scss b/public/quiz-create/css/sass/_ab-results.scss index 10299006..2881314f 100644 --- a/public/quiz-create/css/sass/_ab-results.scss +++ b/public/quiz-create/css/sass/_ab-results.scss @@ -109,6 +109,7 @@ .enp-question-results__container { @include container--wide; + padding-top: 3rem; } .enp-question-results--ab { diff --git a/public/quiz-create/css/sass/_base.scss b/public/quiz-create/css/sass/_base.scss index aac109ea..8a246031 100644 --- a/public/quiz-create/css/sass/_base.scss +++ b/public/quiz-create/css/sass/_base.scss @@ -9,6 +9,7 @@ @include well; @include container--thin; font-size: 1.2rem; + background: $light_gray; } .enp-aside__title { diff --git a/public/quiz-create/css/sass/_dashboard.scss b/public/quiz-create/css/sass/_dashboard.scss index 6e4b6f6b..553f9aa2 100644 --- a/public/quiz-create/css/sass/_dashboard.scss +++ b/public/quiz-create/css/sass/_dashboard.scss @@ -168,7 +168,6 @@ justify-content: flex-end; border: none; border-radius: 3px; - background-color: $gray; } .enp-dash-item--published { @@ -248,8 +247,8 @@ .enp-dash-item__ab-quizzes { @include ul-no-style; - font-size: 0.85rem; - color: $dark_gray; + font-size: 0.75rem; + color: $darker_gray; margin-bottom: 0.8rem; } @@ -309,6 +308,7 @@ color: $darker_gray; cursor: pointer; width: 100%; + font-size: 0.85rem; .enp-icon { fill: $darker_gray; } @@ -413,7 +413,7 @@ margin: 0 2% 0 0; padding: 0; - color: #454545; + color: $title; @media (max-width:280px) { width: 100%; @@ -448,7 +448,7 @@ text-transform: uppercase; font-size: .7rem; font-weight: 300; - color: #888; + color: $darker_gray; } diff --git a/public/quiz-create/css/sass/_forms.scss b/public/quiz-create/css/sass/_forms.scss index d6ed75c8..f3f624b5 100644 --- a/public/quiz-create/css/sass/_forms.scss +++ b/public/quiz-create/css/sass/_forms.scss @@ -220,7 +220,10 @@ .enp-label { @include label; &__sm { - font-size: small; + font-size: 0.85rem; + } + &.enp-quiz-winlose__label { + padding: 1rem 0 0 0; } } diff --git a/public/quiz-create/css/sass/_quiz-create.scss b/public/quiz-create/css/sass/_quiz-create.scss index 7f23d432..c999ea35 100644 --- a/public/quiz-create/css/sass/_quiz-create.scss +++ b/public/quiz-create/css/sass/_quiz-create.scss @@ -514,14 +514,14 @@ } .enp-question__button--move--up { - top: 0px; - left: -9px; + top: -25px; + left: -4px; } .enp-question__button--move--down { top: 3px; - right: -9px; + right: -20px; } .enp-quiz-form__add-question { diff --git a/public/quiz-create/css/sass/_quiz-preview.scss b/public/quiz-create/css/sass/_quiz-preview.scss index 9496d947..5892f255 100644 --- a/public/quiz-create/css/sass/_quiz-preview.scss +++ b/public/quiz-create/css/sass/_quiz-preview.scss @@ -70,6 +70,9 @@ .enp-fieldset--section { padding: 1.6rem 1rem; + @include breakpoint(large) { + padding: 1rem; + } &.enp-accordion-content--open { margin-bottom: 0; @@ -153,7 +156,7 @@ @include breakpoint(large) { position: absolute; - top: -4px; + top: 50px; left: 0; } diff --git a/public/quiz-create/css/sass/_quiz-publish.scss b/public/quiz-create/css/sass/_quiz-publish.scss index cb258c0f..7c1e2370 100644 --- a/public/quiz-create/css/sass/_quiz-publish.scss +++ b/public/quiz-create/css/sass/_quiz-publish.scss @@ -1,4 +1,10 @@ #enp-quiz { + .enp-share-quiz__container { + @include breakpoint(medium) { + padding: 0; + border: none; + } + } /* Removing flexbox layout temporarily * because it wasn't laying out correctly before content loading * It would snap into the correct layout after a resize or textarea highlight @@ -66,7 +72,7 @@ .enp-share-quiz__url { display: block; - font-size: 1.5rem; + font-size: 1rem; line-height: 1.4; word-wrap: break-word; } @@ -76,5 +82,8 @@ .enp-share-quiz { justify-content: space-around; margin-bottom: 0; + .enp-icon--mail { + background: $blue; + } } } diff --git a/public/quiz-create/css/sass/_structure.scss b/public/quiz-create/css/sass/_structure.scss index befa5d2e..02c2a271 100644 --- a/public/quiz-create/css/sass/_structure.scss +++ b/public/quiz-create/css/sass/_structure.scss @@ -153,7 +153,7 @@ @mixin flex-grid__item { flex-basis: 100%; padding: 1rem 1.2rem; - background: #fff; + background-color: $gray; border: 1px solid #eee; border-bottom: 1px solid #ddd; list-style: none; diff --git a/public/quiz-create/css/sass/_typography.scss b/public/quiz-create/css/sass/_typography.scss index 72f0802e..fe3a5502 100644 --- a/public/quiz-create/css/sass/_typography.scss +++ b/public/quiz-create/css/sass/_typography.scss @@ -93,6 +93,9 @@ body #enp-quiz { padding: 1.6em; overflow: auto; max-width: 100%; + overflow: scroll; + max-width: 68vw; + overflow-wrap: break-word; } .code, code, kbd, tt, var { font: .7em Monaco, Consolas, "Andale Mono", "DejaVu Sans Mono", monospace; diff --git a/public/quiz-create/css/sass/_utilities.scss b/public/quiz-create/css/sass/_utilities.scss index 81126c81..90338cce 100644 --- a/public/quiz-create/css/sass/_utilities.scss +++ b/public/quiz-create/css/sass/_utilities.scss @@ -340,7 +340,7 @@ @mixin hint { font-size: .7rem; font-weight: 300; - color: #565656; + color: $darker_gray; } @mixin green { diff --git a/public/quiz-create/css/sass/_variables.scss b/public/quiz-create/css/sass/_variables.scss index afb92666..ecb3d2e9 100644 --- a/public/quiz-create/css/sass/_variables.scss +++ b/public/quiz-create/css/sass/_variables.scss @@ -17,7 +17,7 @@ $light_gray: #FAF9FB; $really_light_gray: lighten($light_gray, 1); $gray: darken($light_gray, 2); $dark_gray: darken($gray, 5); -$darker_gray: darken($dark_gray, 20); +$darker_gray: darken($dark_gray, 25); $darkest_gray: darken($dark_gray, 50); // Other colors diff --git a/public/quiz-create/includes/class-enp_quiz-quiz_create.php b/public/quiz-create/includes/class-enp_quiz-quiz_create.php index c6da8d67..93458de7 100644 --- a/public/quiz-create/includes/class-enp_quiz-quiz_create.php +++ b/public/quiz-create/includes/class-enp_quiz-quiz_create.php @@ -22,9 +22,10 @@ */ class Enp_quiz_Quiz_create extends Enp_quiz_Create { - public $quiz, - $quiz_action_url, - $new_quiz_flag; + public $quiz, + $quiz_action_url, + $new_quiz_flag; + public function __construct() { // load the quiz @@ -157,6 +158,10 @@ public function hidden_fields() return $quiz_id_input . "\n" . $quiz_new_flag_input; } + + /** + * Multiple choice: add another option/choice button + */ public function get_mc_option_add_button($question_id) { $mc_option_add_button = ''; @@ -182,6 +187,9 @@ public function get_mc_option_delete_button($mc_option_id) return $mc_option_delete_button; } + /** + * Multiple choice: correct option checkbox/circle + */ public function get_mc_option_correct_button($question_id, $mc_option_id) { $mc_option_correct_button = ''; @@ -205,7 +213,7 @@ public function get_question_delete_button($question_id) public function get_question_move_button($question_id, $position, $direction, $questions) { $move_button = ''; - $new_position = ($direction === 'up' ? $position - 1 : $position + 1); + $new_position = ( $direction === 'up' ? $position - 1 : $position + 1 ); $disabled = false; if ($position === 0 && $direction === 'up') { $disabled = true; @@ -222,6 +230,9 @@ public function get_question_move_button($question_id, $position, $direction, $q return $move_button; } + /** + * Question image: GET js template + */ public function get_question_image_template($question, $question_id, $question_i, $question_image) { ob_start(); @@ -274,6 +285,42 @@ public function get_question_type_input($question, $question_id, $question_i) return $question_type_input; } + /** + * MC Option image: GET js template + */ + public function get_mc_option_image_template($mc_option, $mc_option_id, $mc_option_i, $mc_option_image) + { + ob_start(); + if (!empty($mc_option_image)) { + include(ENP_QUIZ_CREATE_TEMPLATES_PATH . '/partials/quiz-create-mc-option-image.php'); + } elseif ($mc_option_id !== '{{question_id}}') { + include(ENP_QUIZ_CREATE_TEMPLATES_PATH . '/partials/quiz-create-mc-option-image-upload.php'); + } + $mc_option_image_template = ob_get_contents(); + // don't use ob_get_length first as this is a nested ob (output buffer) + // inside question template and messes up the JS template output + ob_end_clean(); + + return $mc_option_image_template; + } + + public function get_quiz_create_mc_option_image($mc_option, $question_id) + { + $mc_option_image = ''; + if ($question_id !== '{{question_id}}') { + $mc_option_image = '' . $mc_option->get_mc_option_image_alt() . ''; + } + return $mc_option_image; + } + + /** + * Multiple choice: question type selector + */ public function get_question_type_mc_input($question, $question_id, $question_i) { $mc_input = 'get_question_type(), 'mc', false) . '/> @@ -366,7 +413,6 @@ public function is_quiz_fully_editable() return $fully_editable; } - public function quiz_create_js_templates() { $Quiz_create = $this; @@ -399,11 +445,13 @@ public function question_js_template($Quiz_create, $question_id, $question_i) return $js_template; } - + /** + * Question image: upload button js template + */ public function question_image_upload_button_js_template($Quiz_create, $question_id, $question_i) { $js_template = ''; + + return $js_template; + } + + /** + * MC option image: (uploaded) js template + */ + public function mc_option_image_js_template($Quiz_create, $question, $question_id, $question_i) + { + $js_template = ''; + return $js_template; + } + + /** + * MC option image: upload wrapper + */ + public function mc_option_image_upload_js_template($question_id) + { + $js_template = ''; + return $js_template; + } + + /** + * Multiple choice: js template wrapper + */ public function mc_option_js_template($Quiz_create, $question_id, $question_i) { $mc_option_id = '{{mc_option_id}}'; @@ -444,6 +546,7 @@ public function mc_option_js_template($Quiz_create, $question_id, $question_i) $js_template = ' + + - \ No newline at end of file + + \ No newline at end of file diff --git a/public/quiz-create/templates/quiz-create.php b/public/quiz-create/templates/quiz-create.php index fa951cc3..fb0a4995 100644 --- a/public/quiz-create/templates/quiz-create.php +++ b/public/quiz-create/templates/quiz-create.php @@ -20,11 +20,13 @@ * for reference, * $this = $Quiz_create = Enp_quiz_Quiz_create class */ + ?>
    +
    @@ -33,8 +35,12 @@
    outputKey(); - echo $Quiz_create->hidden_fields(); ?> - + echo $Quiz_create->hidden_fields(); + // var_dump($quiz); + // $input = $question->get_question_explanation(); + // var_dump($input); + + ?>
    @@ -100,13 +108,4 @@
    - - - outputKey(); - // echo $Quiz_create->hidden_fields(); ?> - - - -
    - Winners & Losers + Results Screen
    -

    How would you like to address your winners & losers?

    +

    Text to display on quiz completion.